@lovrabet/rabetbase-cli 2.3.11 → 2.3.12

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 (260) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.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-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x109cb9,_0xde13c9){const _0xa029e4=a113_0x3952,_0x42e7d1=_0x109cb9();while(!![]){try{const _0x9ebe09=parseInt(_0xa029e4(0xb5))/0x1*(-parseInt(_0xa029e4(0xbb))/0x2)+-parseInt(_0xa029e4(0x9c))/0x3*(-parseInt(_0xa029e4(0xa8))/0x4)+-parseInt(_0xa029e4(0xad))/0x5*(parseInt(_0xa029e4(0xc2))/0x6)+parseInt(_0xa029e4(0xb8))/0x7*(-parseInt(_0xa029e4(0xb0))/0x8)+parseInt(_0xa029e4(0xbd))/0x9+-parseInt(_0xa029e4(0xb6))/0xa*(parseInt(_0xa029e4(0xc3))/0xb)+parseInt(_0xa029e4(0xb3))/0xc*(parseInt(_0xa029e4(0xb1))/0xd);if(_0x9ebe09===_0xde13c9)break;else _0x42e7d1['push'](_0x42e7d1['shift']());}catch(_0x1fedec){_0x42e7d1['push'](_0x42e7d1['shift']());}}}(a113_0x5507,0x9bae2));import a113_0x19fd15 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a113_0x5072fb from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function a113_0x3952(_0x4eaf8c,_0x5c836e){_0x4eaf8c=_0x4eaf8c-0x95;const _0x5507ff=a113_0x5507();let _0x395251=_0x5507ff[_0x4eaf8c];return _0x395251;}function onCancel(_0x122be4){return _0x122be4['catch'](_0x101973=>{const _0x3c80e7=a113_0x3952;if(_0x101973?.[_0x3c80e7(0x9b)]===_0x3c80e7(0x97))throw CliErrors[_0x3c80e7(0xaf)](_0x3c80e7(0xab));throw _0x101973;});}export function startSpinner(_0x48ad27){const _0x44fbac=a113_0x3952;return a113_0x5072fb({'text':_0x48ad27,'color':_0x44fbac(0x98)})[_0x44fbac(0xa3)]();}export function stopSpinner(_0x332bca,_0xbc3d32,_0x5cc700){const _0x42699e=a113_0x3952;_0x5cc700?_0x332bca[_0x42699e(0xb2)](_0xbc3d32):_0x332bca[_0x42699e(0xa9)](_0xbc3d32);}export async function askConfirm(_0x455e06){return onCancel(confirm({'message':_0x455e06,'theme':{'prefix':''}}));}export async function askJsUrl(_0x12c67b){const _0x2ac429=a113_0x3952;while(!![]){const _0x31cad3=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x12c67b,'theme':{'prefix':''}}));if(_0x31cad3[_0x2ac429(0x96)]()==='')throw CliErrors[_0x2ac429(0xaf)](_0x2ac429(0xab));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x2ac429(0x99)](_0x31cad3[_0x2ac429(0x96)]())){console[_0x2ac429(0xae)](a113_0x19fd15['red'](_0x2ac429(0xbc)));continue;}const _0x167220=startSpinner(_0x2ac429(0xa7));try{const _0x2ea10b=await isUrlReachable(_0x31cad3[_0x2ac429(0x96)]());stopSpinner(_0x167220,_0x2ac429(0xa5),_0x2ea10b);if(!_0x2ea10b){console[_0x2ac429(0xae)](a113_0x19fd15[_0x2ac429(0x9e)](_0x2ac429(0x9a)));continue;}return _0x31cad3[_0x2ac429(0x96)]();}catch(_0x85031e){stopSpinner(_0x167220,'JS\x20URL\x20check\x20failed',![]);throw _0x85031e;}}}export async function askCssUrl(_0x4cf7e2){const _0x11b2fa=a113_0x3952;while(!![]){const _0x37244f=await onCancel(input({'message':_0x11b2fa(0xac),'default':_0x4cf7e2,'theme':{'prefix':''}}));if(_0x37244f['trim']()==='')throw CliErrors[_0x11b2fa(0xaf)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x37244f[_0x11b2fa(0x96)]())){console['error'](a113_0x19fd15[_0x11b2fa(0x9e)](_0x11b2fa(0xc0)));continue;}const _0x3f1fa4=startSpinner(_0x11b2fa(0xb7));try{const _0x57fa3d=await isUrlReachable(_0x37244f[_0x11b2fa(0x96)]());stopSpinner(_0x3f1fa4,'CSS\x20URL\x20checked',_0x57fa3d);if(!_0x57fa3d){console[_0x11b2fa(0xae)](a113_0x19fd15[_0x11b2fa(0x9e)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x37244f[_0x11b2fa(0x96)]();}catch(_0x5efc5f){stopSpinner(_0x3f1fa4,_0x11b2fa(0xb9),![]);throw _0x5efc5f;}}}function a113_0x5507(){const _0x54a418=['includes','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','green','6SBkffv','11eFlGOo','[new]','trim','ExitPromptError','cyan','test','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','name','27kVbDkT','has','red','path','stdin','length','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','start','filter','JS\x20URL\x20checked','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20Checking\x20JS\x20URL\x20reachability...','30396zYiIuk','fail','map','Cancelled.','\x20\x20CSS\x20URL:','2643080eCCDwY','error','cancelled','40EVlAMW','130741SNOpFz','succeed','2388CeIYnp','isTTY','5suBVwF','9920910xXMfQA','\x20\x20Checking\x20CSS\x20URL\x20reachability...','198443zuUqBj','CSS\x20URL\x20check\x20failed','gray','306564yCzCPf','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','8971146hGZoOZ','No\x20menus\x20selected.'];a113_0x5507=function(){return _0x54a418;};return a113_0x5507();}export async function selectPages(_0x3a42c0,_0x1eeda6){const _0x36c623=a113_0x3952,_0x2759e9=_0x3a42c0[_0x36c623(0xaa)](_0x21bfe5=>{const _0x770caa=_0x36c623,_0xf0b7dd=_0x1eeda6[_0x770caa(0x9d)](_0x21bfe5[_0x770caa(0x9f)]);return{'name':_0x21bfe5['label']+'\x20\x20'+a113_0x19fd15[_0x770caa(0xba)](_0x21bfe5[_0x770caa(0x9f)])+'\x20\x20'+(_0xf0b7dd?a113_0x19fd15[_0x770caa(0xba)]('[already\x20on\x20platform]'):a113_0x19fd15[_0x770caa(0xc1)](_0x770caa(0x95))),'value':_0x21bfe5['path'],'checked':!_0xf0b7dd,'disabled':_0xf0b7dd};});if(_0x2759e9['length']===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x456ec2=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x2759e9,'loop':![],'theme':{'prefix':''}}));if(_0x456ec2[_0x36c623(0xa1)]===0x0)throw new Error(_0x36c623(0xbe));return _0x3a42c0[_0x36c623(0xa4)](_0xec1ef2=>_0x456ec2[_0x36c623(0xbf)](_0xec1ef2[_0x36c623(0x9f)]));}export function isInteractive(){const _0x559642=a113_0x3952;return process[_0x559642(0xa0)][_0x559642(0xb4)]===!![];}export function requireInteractive(){const _0x180e98=a113_0x3952;if(!isInteractive())throw new Error(_0x180e98(0xa6)+_0x180e98(0xa2));}
1
+ (function(_0x324ff3,_0xf1174d){const _0xa17baa=a113_0x4e8d,_0x3d1687=_0x324ff3();while(!![]){try{const _0x4c1980=parseInt(_0xa17baa(0x20f))/0x1+-parseInt(_0xa17baa(0x1fc))/0x2+-parseInt(_0xa17baa(0x1fb))/0x3*(-parseInt(_0xa17baa(0x215))/0x4)+parseInt(_0xa17baa(0x212))/0x5+-parseInt(_0xa17baa(0x1fa))/0x6+parseInt(_0xa17baa(0x1f3))/0x7*(parseInt(_0xa17baa(0x20a))/0x8)+-parseInt(_0xa17baa(0x204))/0x9*(parseInt(_0xa17baa(0x20d))/0xa);if(_0x4c1980===_0xf1174d)break;else _0x3d1687['push'](_0x3d1687['shift']());}catch(_0x21b3a3){_0x3d1687['push'](_0x3d1687['shift']());}}}(a113_0x1257,0xa367f));import a113_0x2dda2f from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a113_0x4db50a from'ora';function a113_0x4e8d(_0x245056,_0x1edfe2){_0x245056=_0x245056-0x1eb;const _0x125742=a113_0x1257();let _0x4e8d75=_0x125742[_0x245056];return _0x4e8d75;}import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x4545e6){return _0x4545e6['catch'](_0xaea1df=>{const _0x5d7fb8=a113_0x4e8d;if(_0xaea1df?.[_0x5d7fb8(0x213)]===_0x5d7fb8(0x1ff))throw CliErrors[_0x5d7fb8(0x208)](_0x5d7fb8(0x207));throw _0xaea1df;});}export function startSpinner(_0x19ab47){const _0x1a1538=a113_0x4e8d;return a113_0x4db50a({'text':_0x19ab47,'color':_0x1a1538(0x1fd)})['start']();}function a113_0x1257(){const _0x52c37e=['red','JS\x20URL\x20checked','length','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','269024DguXIv','gray','label','CSS\x20URL\x20check\x20failed','path','trim','No\x20local\x20pages\x20found.','3329226ZCtIAg','1149Gmrljw','206432WQauLS','cyan','map','ExitPromptError','includes','\x20\x20JS\x20URL:','error','isTTY','9yBRsJh','test','[already\x20on\x20platform]','Cancelled.','cancelled','No\x20menus\x20selected.','216PGYXtw','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','JS\x20URL\x20check\x20failed','20458750LJXBld','\x20\x20Checking\x20CSS\x20URL\x20reachability...','467112ZtQMHj','[new]','fail','6328275NGipoy','name','\x20\x20CSS\x20URL:','6296QtxNhm','CSS\x20URL\x20checked','green','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.'];a113_0x1257=function(){return _0x52c37e;};return a113_0x1257();}export function stopSpinner(_0x467c59,_0x105d57,_0x401259){const _0x2b8fd7=a113_0x4e8d;_0x401259?_0x467c59['succeed'](_0x105d57):_0x467c59[_0x2b8fd7(0x211)](_0x105d57);}export async function askConfirm(_0x10bdbd){return onCancel(confirm({'message':_0x10bdbd,'theme':{'prefix':''}}));}export async function askJsUrl(_0x269fac){const _0x2ef407=a113_0x4e8d;while(!![]){const _0x29b1d4=await onCancel(input({'message':_0x2ef407(0x201),'default':_0x269fac,'theme':{'prefix':''}}));if(_0x29b1d4[_0x2ef407(0x1f8)]()==='')throw CliErrors['cancelled'](_0x2ef407(0x207));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x2ef407(0x205)](_0x29b1d4[_0x2ef407(0x1f8)]())){console[_0x2ef407(0x202)](a113_0x2dda2f[_0x2ef407(0x1ee)]('\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'));continue;}const _0x3f623b=startSpinner('\x20\x20Checking\x20JS\x20URL\x20reachability...');try{const _0x1ca705=await isUrlReachable(_0x29b1d4[_0x2ef407(0x1f8)]());stopSpinner(_0x3f623b,_0x2ef407(0x1ef),_0x1ca705);if(!_0x1ca705){console[_0x2ef407(0x202)](a113_0x2dda2f[_0x2ef407(0x1ee)](_0x2ef407(0x1f1)));continue;}return _0x29b1d4[_0x2ef407(0x1f8)]();}catch(_0x66cf6a){stopSpinner(_0x3f623b,_0x2ef407(0x20c),![]);throw _0x66cf6a;}}}export async function askCssUrl(_0x555ff8){const _0x2ec414=a113_0x4e8d;while(!![]){const _0x12e481=await onCancel(input({'message':_0x2ec414(0x214),'default':_0x555ff8,'theme':{'prefix':''}}));if(_0x12e481[_0x2ec414(0x1f8)]()==='')throw CliErrors[_0x2ec414(0x208)](_0x2ec414(0x207));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x2ec414(0x205)](_0x12e481['trim']())){console[_0x2ec414(0x202)](a113_0x2dda2f[_0x2ec414(0x1ee)]('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x2a7af0=startSpinner(_0x2ec414(0x20e));try{const _0x2b1b69=await isUrlReachable(_0x12e481[_0x2ec414(0x1f8)]());stopSpinner(_0x2a7af0,_0x2ec414(0x1eb),_0x2b1b69);if(!_0x2b1b69){console[_0x2ec414(0x202)](a113_0x2dda2f['red']('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x12e481[_0x2ec414(0x1f8)]();}catch(_0x35f8ae){stopSpinner(_0x2a7af0,_0x2ec414(0x1f6),![]);throw _0x35f8ae;}}}export async function selectPages(_0x4793e9,_0x3548ad){const _0x441c92=a113_0x4e8d,_0x1fc0d9=_0x4793e9[_0x441c92(0x1fe)](_0x1d1f19=>{const _0xe3f2d9=_0x441c92,_0x19716f=_0x3548ad['has'](_0x1d1f19[_0xe3f2d9(0x1f7)]);return{'name':_0x1d1f19[_0xe3f2d9(0x1f5)]+'\x20\x20'+a113_0x2dda2f[_0xe3f2d9(0x1f4)](_0x1d1f19[_0xe3f2d9(0x1f7)])+'\x20\x20'+(_0x19716f?a113_0x2dda2f[_0xe3f2d9(0x1f4)](_0xe3f2d9(0x206)):a113_0x2dda2f[_0xe3f2d9(0x1ec)](_0xe3f2d9(0x210))),'value':_0x1d1f19[_0xe3f2d9(0x1f7)],'checked':!_0x19716f,'disabled':_0x19716f};});if(_0x1fc0d9[_0x441c92(0x1f0)]===0x0)throw new Error(_0x441c92(0x1f9));const _0x5dc2cf=await onCancel(checkbox({'message':_0x441c92(0x1f2),'choices':_0x1fc0d9,'loop':![],'theme':{'prefix':''}}));if(_0x5dc2cf[_0x441c92(0x1f0)]===0x0)throw new Error(_0x441c92(0x209));return _0x4793e9['filter'](_0x3a4344=>_0x5dc2cf[_0x441c92(0x200)](_0x3a4344[_0x441c92(0x1f7)]));}export function isInteractive(){const _0x9191b2=a113_0x4e8d;return process['stdin'][_0x9191b2(0x203)]===!![];}export function requireInteractive(){const _0x2657c9=a113_0x4e8d;if(!isInteractive())throw new Error(_0x2657c9(0x20b)+_0x2657c9(0x1ed));}
@@ -1 +1 @@
1
- const a114_0x26eaca=a114_0x490a;function a114_0x490a(_0x259cbd,_0x15933a){_0x259cbd=_0x259cbd-0xdb;const _0x4fdc86=a114_0x4fdc();let _0x490af5=_0x4fdc86[_0x259cbd];return _0x490af5;}(function(_0x1b956c,_0x183eda){const _0x477136=a114_0x490a,_0x89c68b=_0x1b956c();while(!![]){try{const _0x380030=-parseInt(_0x477136(0xec))/0x1+-parseInt(_0x477136(0xe6))/0x2*(-parseInt(_0x477136(0xe2))/0x3)+parseInt(_0x477136(0xf4))/0x4*(-parseInt(_0x477136(0xf5))/0x5)+parseInt(_0x477136(0xe1))/0x6*(-parseInt(_0x477136(0xe3))/0x7)+-parseInt(_0x477136(0xea))/0x8+parseInt(_0x477136(0xee))/0x9+parseInt(_0x477136(0xf0))/0xa;if(_0x380030===_0x183eda)break;else _0x89c68b['push'](_0x89c68b['shift']());}catch(_0xcc34ef){_0x89c68b['push'](_0x89c68b['shift']());}}}(a114_0x4fdc,0xe8555));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a114_0x26eaca(0xf1)](),'src/pages');export function extractTitleFromComment(_0x54d444){const _0x5337aa=a114_0x26eaca;try{const _0x2a1aca=readFileSync(_0x54d444,_0x5337aa(0xf3)),_0x144ce8=_0x2a1aca['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x144ce8&&_0x144ce8[0x1]){const _0x50697d=_0x144ce8[0x1],_0x500801=_0x50697d[_0x5337aa(0xdd)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x500801&&_0x500801[0x1])return _0x500801[0x1][_0x5337aa(0xe8)]();}let _0x95bd86=null;const _0x430753=_0x2a1aca['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x430753&&_0x430753[0x1]&&(_0x95bd86=_0x430753[0x1]);if(!_0x95bd86){const _0x340f14=_0x2a1aca['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x340f14&&_0x340f14[0x1]&&(_0x95bd86=_0x340f14[0x1]);}if(_0x95bd86){const _0x56ae6f=new RegExp('\x5cb'+_0x95bd86+_0x5337aa(0xe4)),_0x3ec5ec=_0x2a1aca['match'](_0x56ae6f);if(_0x3ec5ec&&_0x3ec5ec[0x1])return _0x3ec5ec[0x1];return _0x95bd86;}return null;}catch(_0x507f8b){return null;}}function a114_0x4fdc(){const _0x5c44a2=['3VlIuqL','861EezCwv','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','join','3101054qHvLDx','path','trim','.tsx','334768FxAcXk','split','1372171aAQjZw','endsWith','9146079QddWAP','concat','20635970JanjMg','cwd','forEach','utf-8','32408vOpbUr','1030LSQQNL','replaceAll','push','match','index.tsx','slice','filter','29058QivBoe'];a114_0x4fdc=function(){return _0x5c44a2;};return a114_0x4fdc();}export function getLocalPages(_0x12c06f=pagesDir,_0x236908=pagesDir){const _0x1872cf=a114_0x26eaca;let _0x33197f=[];const _0x5941fc=readdirSync(_0x12c06f);return _0x5941fc[_0x1872cf(0xf2)](_0x4ae745=>{const _0x259dae=_0x1872cf,_0x2a7f1f=join(_0x12c06f,_0x4ae745),_0x5efd7d=statSync(_0x2a7f1f);if(_0x5efd7d&&_0x5efd7d['isDirectory']())_0x33197f=_0x33197f[_0x259dae(0xef)](getLocalPages(_0x2a7f1f,_0x236908));else{if(_0x4ae745[_0x259dae(0xed)](_0x259dae(0xe9))){let _0x1f4649=relative(_0x236908,_0x2a7f1f);_0x1f4649[_0x259dae(0xed)](_0x259dae(0xde))?_0x1f4649=_0x1f4649['replace'](/index\.tsx$/,''):_0x1f4649=_0x1f4649['replace'](/\.tsx$/,'');_0x1f4649[_0x259dae(0xed)](sep)&&(_0x1f4649=_0x1f4649[_0x259dae(0xdf)](0x0,-0x1));const _0x10000f=_0x1f4649[_0x259dae(0xeb)](sep)[_0x259dae(0xe5)]('/'),_0x336c0e=extractTitleFromComment(_0x2a7f1f),_0x547a12=_0x336c0e||_0x10000f;_0x33197f[_0x259dae(0xdc)]({'path':_0x10000f[_0x259dae(0xdb)]('$',':'),'label':_0x547a12});}}}),_0x33197f[_0x1872cf(0xe0)](_0x38cb5f=>_0x38cb5f[_0x1872cf(0xe7)]!=='');}
1
+ function a114_0x2c2e(_0x670dfb,_0x777ad4){_0x670dfb=_0x670dfb-0x137;const _0x42c7ad=a114_0x42c7();let _0x2c2ea2=_0x42c7ad[_0x670dfb];return _0x2c2ea2;}const a114_0x398ac3=a114_0x2c2e;(function(_0x635cb3,_0x208a28){const _0x23d4cd=a114_0x2c2e,_0x4b3ddd=_0x635cb3();while(!![]){try{const _0x962166=parseInt(_0x23d4cd(0x145))/0x1+parseInt(_0x23d4cd(0x14f))/0x2*(parseInt(_0x23d4cd(0x13f))/0x3)+parseInt(_0x23d4cd(0x141))/0x4+-parseInt(_0x23d4cd(0x147))/0x5*(-parseInt(_0x23d4cd(0x140))/0x6)+-parseInt(_0x23d4cd(0x14b))/0x7+-parseInt(_0x23d4cd(0x144))/0x8+parseInt(_0x23d4cd(0x148))/0x9*(-parseInt(_0x23d4cd(0x137))/0xa);if(_0x962166===_0x208a28)break;else _0x4b3ddd['push'](_0x4b3ddd['shift']());}catch(_0x418c6b){_0x4b3ddd['push'](_0x4b3ddd['shift']());}}}(a114_0x42c7,0x9bb0d));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a114_0x398ac3(0x14e)](),'src/pages');export function extractTitleFromComment(_0x33d2d8){const _0x19b9b0=a114_0x398ac3;try{const _0x28e1d5=readFileSync(_0x33d2d8,_0x19b9b0(0x14d)),_0x4c4dcd=_0x28e1d5[_0x19b9b0(0x139)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x4c4dcd&&_0x4c4dcd[0x1]){const _0x13cfa1=_0x4c4dcd[0x1],_0x290509=_0x13cfa1['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x290509&&_0x290509[0x1])return _0x290509[0x1][_0x19b9b0(0x13b)]();}let _0x4cf9e9=null;const _0x49736d=_0x28e1d5['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x49736d&&_0x49736d[0x1]&&(_0x4cf9e9=_0x49736d[0x1]);if(!_0x4cf9e9){const _0x103b1f=_0x28e1d5[_0x19b9b0(0x139)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x103b1f&&_0x103b1f[0x1]&&(_0x4cf9e9=_0x103b1f[0x1]);}if(_0x4cf9e9){const _0x2e6449=new RegExp('\x5cb'+_0x4cf9e9+_0x19b9b0(0x138)),_0x371d8f=_0x28e1d5[_0x19b9b0(0x139)](_0x2e6449);if(_0x371d8f&&_0x371d8f[0x1])return _0x371d8f[0x1];return _0x4cf9e9;}return null;}catch(_0x1005d3){return null;}}export function getLocalPages(_0x1694d6=pagesDir,_0x2a1f5b=pagesDir){const _0x5c8201=a114_0x398ac3;let _0x2674a2=[];const _0xf20b5c=readdirSync(_0x1694d6);return _0xf20b5c[_0x5c8201(0x146)](_0x4a5154=>{const _0xdf9668=_0x5c8201,_0x12f83b=join(_0x1694d6,_0x4a5154),_0x5e568c=statSync(_0x12f83b);if(_0x5e568c&&_0x5e568c[_0xdf9668(0x143)]())_0x2674a2=_0x2674a2[_0xdf9668(0x13c)](getLocalPages(_0x12f83b,_0x2a1f5b));else{if(_0x4a5154[_0xdf9668(0x149)]('.tsx')){let _0x29f5c9=relative(_0x2a1f5b,_0x12f83b);_0x29f5c9[_0xdf9668(0x149)]('index.tsx')?_0x29f5c9=_0x29f5c9[_0xdf9668(0x142)](/index\.tsx$/,''):_0x29f5c9=_0x29f5c9[_0xdf9668(0x142)](/\.tsx$/,'');_0x29f5c9[_0xdf9668(0x149)](sep)&&(_0x29f5c9=_0x29f5c9[_0xdf9668(0x14a)](0x0,-0x1));const _0x5e4507=_0x29f5c9[_0xdf9668(0x13e)](sep)[_0xdf9668(0x13a)]('/'),_0x52d3e1=extractTitleFromComment(_0x12f83b),_0x474bb8=_0x52d3e1||_0x5e4507;_0x2674a2['push']({'path':_0x5e4507['replaceAll']('$',':'),'label':_0x474bb8});}}}),_0x2674a2[_0x5c8201(0x14c)](_0xf2d9ee=>_0xf2d9ee[_0x5c8201(0x13d)]!=='');}function a114_0x42c7(){const _0x3a34cb=['slice','1455804GOmSvI','filter','utf-8','cwd','411562yUFqHp','113150dqkaNS','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','match','join','trim','concat','path','split','6bWjdZV','678bJOKRE','4291292BWkHHj','replace','isDirectory','4322608ZQksjT','21663nnQDJO','forEach','14715iXXEqE','360uoqycS','endsWith'];a114_0x42c7=function(){return _0x3a34cb;};return a114_0x42c7();}
@@ -1 +1 @@
1
- (function(_0x4dc6d1,_0x151cc9){const _0x3d05e4=a115_0x5288,_0x58aa66=_0x4dc6d1();while(!![]){try{const _0x201ad8=parseInt(_0x3d05e4(0x1f8))/0x1+parseInt(_0x3d05e4(0x200))/0x2+parseInt(_0x3d05e4(0x1ef))/0x3*(-parseInt(_0x3d05e4(0x1fd))/0x4)+-parseInt(_0x3d05e4(0x1fa))/0x5*(-parseInt(_0x3d05e4(0x1fb))/0x6)+parseInt(_0x3d05e4(0x1f4))/0x7*(-parseInt(_0x3d05e4(0x203))/0x8)+parseInt(_0x3d05e4(0x1f1))/0x9*(parseInt(_0x3d05e4(0x1f2))/0xa)+-parseInt(_0x3d05e4(0x201))/0xb*(parseInt(_0x3d05e4(0x1fe))/0xc);if(_0x201ad8===_0x151cc9)break;else _0x58aa66['push'](_0x58aa66['shift']());}catch(_0x2cb476){_0x58aa66['push'](_0x58aa66['shift']());}}}(a115_0x117b,0xe9dfa));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a115_0x5288(_0x4fd3f2,_0x28eab9){_0x4fd3f2=_0x4fd3f2-0x1ef;const _0x117b36=a115_0x117b();let _0x5288c9=_0x117b36[_0x4fd3f2];return _0x5288c9;}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x2f8fae){const _0x229d93=a115_0x5288,_0x4063e0=[];return!isValidJsHttpsUrl(_0x2f8fae)&&_0x4063e0[_0x229d93(0x1f7)](_0x229d93(0x1f0)),{'ok':_0x4063e0[_0x229d93(0x1f6)]===0x0,'errors':_0x4063e0};}export function validateCssUrl(_0x1f71b0){const _0x521fe1=a115_0x5288,_0x3452d7=[];return!isValidCssHttpsUrl(_0x1f71b0)&&_0x3452d7[_0x521fe1(0x1f7)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x3452d7[_0x521fe1(0x1f6)]===0x0,'errors':_0x3452d7};}export async function validateJsUrlReachable(_0x17e5c0){const _0x4097b7=a115_0x5288,_0x18b259=validateJsUrl(_0x17e5c0);if(!_0x18b259['ok'])return _0x18b259;const _0x57d1f3=await isUrlReachable(_0x17e5c0);if(!_0x57d1f3)_0x18b259[_0x4097b7(0x1f9)][_0x4097b7(0x1f7)](_0x4097b7(0x202));return{'ok':_0x18b259['errors'][_0x4097b7(0x1f6)]===0x0,'errors':_0x18b259[_0x4097b7(0x1f9)]};}export async function validateCssUrlReachable(_0x2a7bf1){const _0x1d358a=a115_0x5288,_0xd8e863=validateCssUrl(_0x2a7bf1);if(!_0xd8e863['ok'])return _0xd8e863;const _0x288117=await isUrlReachable(_0x2a7bf1);if(!_0x288117)_0xd8e863[_0x1d358a(0x1f9)][_0x1d358a(0x1f7)](_0x1d358a(0x1f5));return{'ok':_0xd8e863['errors'][_0x1d358a(0x1f6)]===0x0,'errors':_0xd8e863['errors']};}export function buildCompareRows(_0x514e6c,_0x39f6a1){const _0x46d78a=a115_0x5288;return _0x514e6c[_0x46d78a(0x1ff)](_0x5891af=>({'label':_0x5891af[_0x46d78a(0x1f3)],'path':_0x5891af[_0x46d78a(0x1fc)],'local':!![],'online':_0x39f6a1[_0x46d78a(0x204)](_0x5891af['path'])}));}export async function doCreateMenus(_0x44f41f,_0x2841d1,_0x2d360d,_0x50bb41){const _0xf26922=a115_0x5288,_0x1afff8=await createMenus(_0x44f41f,_0x2841d1,_0x2d360d,_0x50bb41);return{'created':_0x1afff8[_0xf26922(0x1f6)],'failed':0x0,'labels':_0x2d360d['map'](_0x472d9e=>_0x472d9e[_0xf26922(0x1f3)]),'menus':_0x1afff8};}export function filterMenusWithResources(_0x554f8d){return _0x554f8d['filter'](_0x511b32=>_0x511b32['resources']['length']>0x0);}export async function fetchMenuData(_0x4c1288,_0x38f851){const _0x2fa9ec=a115_0x5288,_0x3300cb=getLocalPages(),_0x2ab8c5=await getOnlineMenuList(_0x4c1288,_0x38f851),_0x281a6b=new Set(_0x2ab8c5[_0x2fa9ec(0x1ff)](_0x2f062d=>_0x2f062d[_0x2fa9ec(0x1fc)]));return{'localPages':_0x3300cb,'onlineMenuList':_0x2ab8c5,'onlinePaths':_0x281a6b};}function a115_0x117b(){const _0x38a382=['push','1002930mGATaY','errors','80JZFXUs','437592alHguy','path','4bqUjah','468aBMncI','map','3477192QBfiYA','162052fbyfqE','JS\x20URL\x20is\x20unreachable','40xgbHaH','has','2335311BMYHKk','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','419517fFnPMl','60QsGKeZ','label','2628059RhJmmG','CSS\x20URL\x20is\x20unreachable','length'];a115_0x117b=function(){return _0x38a382;};return a115_0x117b();}export async function fetchOnlineMenuList(_0x48b0b4,_0x7e20eb){return getOnlineMenuList(_0x48b0b4,_0x7e20eb);}
1
+ (function(_0x4f5553,_0x47e290){const _0x3ee1c9=a115_0x2c16,_0x14c12d=_0x4f5553();while(!![]){try{const _0x4d5474=parseInt(_0x3ee1c9(0xaa))/0x1*(parseInt(_0x3ee1c9(0xae))/0x2)+parseInt(_0x3ee1c9(0xb5))/0x3+parseInt(_0x3ee1c9(0xaf))/0x4+parseInt(_0x3ee1c9(0xb7))/0x5*(-parseInt(_0x3ee1c9(0xbd))/0x6)+-parseInt(_0x3ee1c9(0xc0))/0x7*(-parseInt(_0x3ee1c9(0xac))/0x8)+parseInt(_0x3ee1c9(0xad))/0x9*(-parseInt(_0x3ee1c9(0xbc))/0xa)+-parseInt(_0x3ee1c9(0xbb))/0xb*(parseInt(_0x3ee1c9(0xbf))/0xc);if(_0x4d5474===_0x47e290)break;else _0x14c12d['push'](_0x14c12d['shift']());}catch(_0x2281d2){_0x14c12d['push'](_0x14c12d['shift']());}}}(a115_0x3bb1,0x834da));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';export function validateJsUrl(_0x2c3636){const _0x106ad2=a115_0x2c16,_0x200670=[];return!isValidJsHttpsUrl(_0x2c3636)&&_0x200670['push'](_0x106ad2(0xb4)),{'ok':_0x200670['length']===0x0,'errors':_0x200670};}function a115_0x3bb1(){const _0x5a74fc=['JS\x20URL\x20is\x20unreachable','8zjMWpy','3919302ssgQkp','2vSZcMw','1042364rYFmOu','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','filter','has','errors','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','308760afEsxw','length','4195uLZIry','path','resources','label','6095375YplZsQ','20ywXUJP','804NPhkKd','push','12WsqxyK','6504757AyuwKr','CSS\x20URL\x20is\x20unreachable','782563MoUpcJ'];a115_0x3bb1=function(){return _0x5a74fc;};return a115_0x3bb1();}export function validateCssUrl(_0x5820da){const _0x46decc=a115_0x2c16,_0x188667=[];return!isValidCssHttpsUrl(_0x5820da)&&_0x188667[_0x46decc(0xbe)](_0x46decc(0xb0)),{'ok':_0x188667[_0x46decc(0xb6)]===0x0,'errors':_0x188667};}export async function validateJsUrlReachable(_0xd04f19){const _0x789ef4=a115_0x2c16,_0x532d20=validateJsUrl(_0xd04f19);if(!_0x532d20['ok'])return _0x532d20;const _0x3d1a05=await isUrlReachable(_0xd04f19);if(!_0x3d1a05)_0x532d20[_0x789ef4(0xb3)][_0x789ef4(0xbe)](_0x789ef4(0xab));return{'ok':_0x532d20[_0x789ef4(0xb3)][_0x789ef4(0xb6)]===0x0,'errors':_0x532d20[_0x789ef4(0xb3)]};}export async function validateCssUrlReachable(_0x2d774f){const _0x5a647d=a115_0x2c16,_0x468bac=validateCssUrl(_0x2d774f);if(!_0x468bac['ok'])return _0x468bac;const _0x6c9abc=await isUrlReachable(_0x2d774f);if(!_0x6c9abc)_0x468bac[_0x5a647d(0xb3)]['push'](_0x5a647d(0xa9));return{'ok':_0x468bac[_0x5a647d(0xb3)]['length']===0x0,'errors':_0x468bac[_0x5a647d(0xb3)]};}export function buildCompareRows(_0x486a6a,_0x554a29){const _0x45d4d2=a115_0x2c16;return _0x486a6a['map'](_0x2ecc10=>({'label':_0x2ecc10[_0x45d4d2(0xba)],'path':_0x2ecc10[_0x45d4d2(0xb8)],'local':!![],'online':_0x554a29[_0x45d4d2(0xb2)](_0x2ecc10[_0x45d4d2(0xb8)])}));}export async function doCreateMenus(_0x17eebb,_0x1ba330,_0x29944c,_0x49c5f0){const _0x58e47e=a115_0x2c16,_0x522cbb=await createMenus(_0x17eebb,_0x1ba330,_0x29944c,_0x49c5f0);return{'created':_0x522cbb[_0x58e47e(0xb6)],'failed':0x0,'labels':_0x29944c['map'](_0x2aad28=>_0x2aad28[_0x58e47e(0xba)]),'menus':_0x522cbb};}function a115_0x2c16(_0x48e5f3,_0x1a53da){_0x48e5f3=_0x48e5f3-0xa9;const _0x3bb1cf=a115_0x3bb1();let _0x2c1667=_0x3bb1cf[_0x48e5f3];return _0x2c1667;}export function filterMenusWithResources(_0x401693){const _0x124dfd=a115_0x2c16;return _0x401693[_0x124dfd(0xb1)](_0x42e801=>_0x42e801[_0x124dfd(0xb9)][_0x124dfd(0xb6)]>0x0);}export async function fetchMenuData(_0x514d7f,_0xbde007){const _0x3f5933=getLocalPages(),_0x92e1ea=await getOnlineMenuList(_0x514d7f,_0xbde007),_0x58a744=new Set(_0x92e1ea['map'](_0x4dd9ed=>_0x4dd9ed['path']));return{'localPages':_0x3f5933,'onlineMenuList':_0x92e1ea,'onlinePaths':_0x58a744};}export async function fetchOnlineMenuList(_0x19a3ba,_0x552cf6){return getOnlineMenuList(_0x19a3ba,_0x552cf6);}
@@ -1 +1 @@
1
- const a116_0x201b3c=a116_0x4dc6;(function(_0x2d2741,_0x51c0df){const _0x4e375d=a116_0x4dc6,_0x2c7d74=_0x2d2741();while(!![]){try{const _0x3f7bca=parseInt(_0x4e375d(0x83))/0x1+-parseInt(_0x4e375d(0xaf))/0x2+parseInt(_0x4e375d(0xa7))/0x3*(-parseInt(_0x4e375d(0xae))/0x4)+parseInt(_0x4e375d(0xc5))/0x5*(-parseInt(_0x4e375d(0xd1))/0x6)+-parseInt(_0x4e375d(0x77))/0x7+parseInt(_0x4e375d(0xd4))/0x8+parseInt(_0x4e375d(0x89))/0x9*(parseInt(_0x4e375d(0xba))/0xa);if(_0x3f7bca===_0x51c0df)break;else _0x2c7d74['push'](_0x2c7d74['shift']());}catch(_0x3b62e5){_0x2c7d74['push'](_0x2c7d74['shift']());}}}(a116_0x1825,0x70cb5));function a116_0x1825(){const _0x32a46f=['hint','after','folder','deleteOrder','parentId','expect-parent-id','645pGketI','Permission\x20denied\x20while\x20attempting\x20to\x20','required','prototype','api_error','Cannot\x20append\x20a\x20','recheck\x20online\x20menu\x20facts\x20before\x20','menu_verification_failed','byId','failed','plannedActions','menu_parent_not_folder','4926cTlgnO','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','num','1727512rwCjFX','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','expected-children-count','type','expect-path','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','toLowerCase','planFile','filter','string','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','\x20is\x20type\x20\x22','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','succeeded','Menu\x20','hasOwnProperty','\x20menu\x20','childrenCount','isSafeInteger','3189844YXApnm','menu_sort_overflow','menu_state_drift','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','targets','yes','verification','\x20path\x20changed:\x20expected\x20','message','\x20parent\x20changed:\x20expected\x20','cascade','menu_not_found','290246mKMvSu','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','get','code','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','stage','9Zekslt','warnings','Online\x20menu\x20state\x20changed\x20before\x20','number','data','dryRun','read\x20online\x20menu\x20facts\x20before\x20','Exact\x20online\x20menu\x20id','unknown','validation','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','call','root','menu_mutation_failed','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','appCode','path','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','snapshotHash','trim','flagMissing','sort','test','length','bool','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','map','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','before','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','21KivtnV','rawFlags','cookie','menu_permission_denied','pre-write-recheck','menu_sort_invalid','hash','391544Eeezts','861938GwDeIF',',\x20current\x20','Failed\x20to\x20','dry-run','parent-id','operation','str','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','backend','selector',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','16335920OBfORA','stringify','Sibling\x20sort\x20value\x20(non-negative\x20integer)','error','\x22,\x20not\x20folder.'];a116_0x1825=function(){return _0x32a46f;};return a116_0x1825();}import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a116_0x201b3c(0x8c),'required':!![],'description':a116_0x201b3c(0x90)};export const MENU_SORT_FLAG={'name':a116_0x201b3c(0x9e),'type':a116_0x201b3c(0x8c),'description':a116_0x201b3c(0xbc)};export const MENU_PARENT_ID_FLAG={'name':a116_0x201b3c(0xb3),'type':a116_0x201b3c(0x6d),'description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a116_0x201b3c(0xc4),'type':a116_0x201b3c(0x6d),'description':'Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level'};function a116_0x4dc6(_0x5a92fa,_0x5a1fa1){_0x5a92fa=_0x5a92fa-0x6d;const _0x182513=a116_0x1825();let _0x4dc6c1=_0x182513[_0x5a92fa];return _0x4dc6c1;}export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':a116_0x201b3c(0x6d),'description':a116_0x201b3c(0xa4)},{'name':a116_0x201b3c(0xd6),'type':a116_0x201b3c(0x8c),'description':a116_0x201b3c(0x93)}];export function validateExactId(_0x489dd8){const _0x5e56a5=a116_0x201b3c,_0x170c34=_0x489dd8[_0x5e56a5(0xd3)]('id');if(!Number[_0x5e56a5(0x76)](_0x170c34)||_0x170c34<=0x0)throw CliErrors['validation']('--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.');return _0x170c34;}export function validateSort(_0x110722,_0xa5f5a5=a116_0x201b3c(0x9e)){const _0x4585be=a116_0x201b3c;if(!hasFlag(_0x110722,_0xa5f5a5))return undefined;const _0x3ad2fc=_0x110722[_0x4585be(0xd3)](_0xa5f5a5);if(!Number[_0x4585be(0x76)](_0x3ad2fc)||_0x3ad2fc<0x0||_0x3ad2fc>MAX_MENU_SORT)throw menuError(_0x4585be(0xac),'--'+_0xa5f5a5+_0x4585be(0xa6)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x3ad2fc;}export function nextSiblingSort(_0x35c0ad,_0x263c58,_0x255d07){const _0x4fab77=a116_0x201b3c,_0x52f19c=getChildren(_0x35c0ad,_0x263c58)[_0x4fab77(0xa3)](_0xf79388=>_0xf79388[_0x4fab77(0x9e)])[_0x4fab77(0xdc)](_0xe9c017=>typeof _0xe9c017===_0x4fab77(0x8c));if(_0x52f19c[_0x4fab77(0xa0)]===0x0)return 0x0;const _0x42421b=Math['max'](..._0x52f19c);if(_0x42421b>=MAX_MENU_SORT)throw menuError(_0x4fab77(0x78),_0x4fab77(0xca)+_0x255d07+'\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0x42421b+'.','Reorder\x20sibling\x20menus\x20below\x20'+MAX_MENU_SORT+_0x4fab77(0xb9));return _0x42421b+0x1;}export function requireExplicitYes(_0x50dc11){const _0x8a080f=a116_0x201b3c;if(_0x50dc11[_0x8a080f(0xa1)](_0x8a080f(0xb2)))return;if(!_0x50dc11[_0x8a080f(0xa1)](_0x8a080f(0x7c)))throw menuError('menu_confirmation_required',_0x8a080f(0x97),_0x8a080f(0xd9));}export async function fetchMutationSnapshot(_0x5f4587,_0x44c05d,_0x127529){const _0x20c58e=a116_0x201b3c;try{return await fetchMenuSnapshot(_0x5f4587[_0x20c58e(0x98)],_0x5f4587[_0x20c58e(0xa9)]);}catch(_0x2ae1ce){throw mapMenuApiError(_0x2ae1ce,_0x20c58e(0x8f)+_0x44c05d,_0x127529);}}export async function recheckMutationSnapshot(_0x566873,_0x424430,_0x3c7ad4,_0x54bee7){const _0x3b2d69=a116_0x201b3c;let _0x26eb40;try{_0x26eb40=await fetchMenuSnapshot(_0x566873[_0x3b2d69(0x98)],_0x566873['cookie']);}catch(_0x12eec1){const _0x14b5bc=mapMenuApiError(_0x12eec1,_0x3b2d69(0xcb)+_0x3c7ad4,_0x54bee7);throw menuFailure(_0x14b5bc,_0x424430,{'stage':'pre-write-recheck','failed':_0x54bee7==null?{}:{'id':_0x54bee7}});}if(_0x26eb40['hash']!==_0x424430['snapshotHash']){const _0x51461d=menuError(_0x3b2d69(0x79),_0x3b2d69(0x8b)+_0x3c7ad4+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0x3b2d69(0x6e));throw menuFailure(_0x51461d,_0x424430,{'stage':_0x3b2d69(0xab),'failed':{..._0x54bee7==null?{}:{'id':_0x54bee7},'expectedSnapshotHash':_0x424430[_0x3b2d69(0x9b)],'currentSnapshotHash':_0x26eb40[_0x3b2d69(0xad)]}});}return _0x26eb40;}export function parseParentId(_0x1184f6,_0x373a00,_0x50c733={}){const _0x244e88=a116_0x201b3c;if(!hasFlag(_0x1184f6,_0x373a00)){if(_0x50c733[_0x244e88(0xc7)])throw CliErrors[_0x244e88(0x9d)](_0x373a00);return undefined;}const _0x25d24d=_0x1184f6['str'](_0x373a00)[_0x244e88(0x9c)]();if(_0x25d24d[_0x244e88(0xda)]()===_0x244e88(0x95))return null;if(!/^\d+$/[_0x244e88(0x9f)](_0x25d24d))throw CliErrors[_0x244e88(0x92)]('--'+_0x373a00+_0x244e88(0x9a));const _0x41e56e=Number(_0x25d24d);if(!Number[_0x244e88(0x76)](_0x41e56e)||_0x41e56e<=0x0)throw CliErrors[_0x244e88(0x92)]('--'+_0x373a00+_0x244e88(0x9a));return _0x41e56e;}export function requireMenu(_0x59aa5f,_0x59ceb3){const _0x7b3cd7=a116_0x201b3c,_0x284b40=_0x59aa5f[_0x7b3cd7(0xcd)][_0x7b3cd7(0x85)](_0x59ceb3);if(!_0x284b40)throw menuError(_0x7b3cd7(0x82),'Online\x20menu\x20not\x20found:\x20'+_0x59ceb3,_0x7b3cd7(0x84));return _0x284b40;}export function requireFolder(_0x4ec8bb,_0x452000){const _0x27c604=a116_0x201b3c,_0xb093c4=requireMenu(_0x4ec8bb,_0x452000);if(_0xb093c4[_0x27c604(0xd7)]!==_0x27c604(0xc1))throw menuError(_0x27c604(0xd0),_0x27c604(0x72)+_0x452000+_0x27c604(0x6f)+(_0xb093c4['type']||_0x27c604(0x91))+_0x27c604(0xbe),_0x27c604(0x87));return _0xb093c4;}export function assertExpectedState(_0x4c1c8d,_0x4f5ff6){const _0x434a96=a116_0x201b3c;if(hasFlag(_0x4c1c8d,_0x434a96(0xc4))){const _0x20979=parseParentId(_0x4c1c8d,_0x434a96(0xc4),{'required':!![]});if(_0x4f5ff6[_0x434a96(0xc3)]!==_0x20979)throw stateDrift(_0x434a96(0x72)+_0x4f5ff6['id']+_0x434a96(0x80)+formatParent(_0x20979)+_0x434a96(0xb0)+formatParent(_0x4f5ff6[_0x434a96(0xc3)])+'.');}if(hasFlag(_0x4c1c8d,_0x434a96(0xd8))){const _0x2dfc37=_0x4c1c8d[_0x434a96(0xb5)](_0x434a96(0xd8));if(_0x4f5ff6[_0x434a96(0x99)]!==_0x2dfc37)throw stateDrift(_0x434a96(0x72)+_0x4f5ff6['id']+_0x434a96(0x7e)+JSON['stringify'](_0x2dfc37)+_0x434a96(0xb0)+JSON[_0x434a96(0xbb)](_0x4f5ff6[_0x434a96(0x99)])+'.');}if(hasFlag(_0x4c1c8d,'expected-children-count')){const _0x4007a1=_0x4c1c8d[_0x434a96(0xd3)]('expected-children-count');if(!Number['isSafeInteger'](_0x4007a1)||_0x4007a1<0x0)throw CliErrors['validation'](_0x434a96(0xa2));if(_0x4f5ff6[_0x434a96(0x75)]!==_0x4007a1)throw stateDrift(_0x434a96(0x72)+_0x4f5ff6['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x4007a1+_0x434a96(0xb0)+_0x4f5ff6[_0x434a96(0x75)]+'.');}}export function assertVerified(_0x2b4053,_0x1ea603,_0x2941ec=a116_0x201b3c(0x7a)){const _0xc11186=a116_0x201b3c;if(!_0x2b4053)throw menuError(_0xc11186(0xcc),_0x1ea603,_0x2941ec);}export function mutationResult(_0xd3bfbc){const _0xa02296=a116_0x201b3c;return{'operation':_0xd3bfbc[_0xa02296(0xb4)],'selector':_0xd3bfbc[_0xa02296(0xb8)],'before':_0xd3bfbc[_0xa02296(0xa5)],'after':_0xd3bfbc[_0xa02296(0xc0)],'dryRun':_0xd3bfbc[_0xa02296(0x8e)],'backend':_0xd3bfbc[_0xa02296(0xb7)],..._0xd3bfbc[_0xa02296(0xcf)]?{'plannedActions':_0xd3bfbc['plannedActions']}:{},..._0xd3bfbc[_0xa02296(0x7b)]?{'targets':_0xd3bfbc[_0xa02296(0x7b)]}:{},..._0xd3bfbc[_0xa02296(0xc2)]?{'deleteOrder':_0xd3bfbc[_0xa02296(0xc2)]}:{},'snapshotHash':_0xd3bfbc[_0xa02296(0x9b)],..._0xd3bfbc[_0xa02296(0x81)]?{'cascade':_0xd3bfbc[_0xa02296(0x81)]}:{},..._0xd3bfbc[_0xa02296(0xdb)]?{'planFile':_0xd3bfbc[_0xa02296(0xdb)]}:{},'succeeded':_0xd3bfbc[_0xa02296(0x71)]??[],'failed':_0xd3bfbc['failed']??[],'warnings':_0xd3bfbc[_0xa02296(0x8a)]??[],'verification':_0xd3bfbc[_0xa02296(0x7d)],'error':_0xd3bfbc[_0xa02296(0xbd)]};}export function menuDryRunResult(_0x106a59,_0x225bd7){return{..._0x106a59,..._0x225bd7};}export function menuFailure(_0x49a11b,_0x40baa2,_0x5c8cc3){const _0x315e66=a116_0x201b3c,_0x5aa94e=mutationResult({..._0x40baa2,'after':_0x5c8cc3['after']===undefined?_0x40baa2[_0x315e66(0xc0)]:_0x5c8cc3[_0x315e66(0xc0)],'backend':_0x5c8cc3['backend']??_0x40baa2[_0x315e66(0xb7)],'dryRun':![],'succeeded':_0x5c8cc3[_0x315e66(0x71)]??[],'failed':[{..._0x5c8cc3[_0x315e66(0xce)]??{},'stage':_0x5c8cc3[_0x315e66(0x88)],'code':_0x49a11b[_0x315e66(0x86)],'message':_0x49a11b['message']}],'warnings':[..._0x40baa2[_0x315e66(0x8a)],..._0x5c8cc3['warnings']??[]],'verification':_0x5c8cc3[_0x315e66(0x7d)],'error':{'code':_0x49a11b[_0x315e66(0x86)],'message':_0x49a11b[_0x315e66(0x7f)],..._0x49a11b['hint']?{'hint':_0x49a11b[_0x315e66(0xbf)]}:{}}});return Object['defineProperty'](_0x49a11b,_0x315e66(0x8d),{'value':_0x5aa94e,'enumerable':!![],'configurable':!![]}),_0x49a11b;}export function asVerificationError(_0x4425a6,_0x5b5995){const _0x8191bf=a116_0x201b3c;if(_0x4425a6 instanceof CliError&&_0x4425a6[_0x8191bf(0x86)]===_0x8191bf(0xcc))return _0x4425a6;const _0x27f5b6=_0x4425a6 instanceof Error?_0x4425a6[_0x8191bf(0x7f)]:String(_0x4425a6);return menuError(_0x8191bf(0xcc),''+_0x5b5995+(_0x27f5b6?':\x20'+_0x27f5b6:''),_0x8191bf(0xb6));}export function describeMenuErrorCause(_0xca91a1,_0x808b55,_0x4e4e59){const _0x27dfbe=a116_0x201b3c,_0x39f875=mapMenuApiError(_0xca91a1,_0x808b55,_0x4e4e59);return{'causeCode':_0x39f875[_0x27dfbe(0x86)],'causeMessage':_0x39f875['message']};}export function hasFlag(_0x20c258,_0x145d68){const _0x464627=a116_0x201b3c;return Object[_0x464627(0xc8)][_0x464627(0x73)][_0x464627(0x94)](_0x20c258[_0x464627(0xa8)],_0x145d68)&&_0x20c258[_0x464627(0xa8)][_0x145d68]!==undefined;}export function toApiParentId(_0x36ef75){return _0x36ef75??0x0;}export function formatParent(_0x179c9b){const _0x3fb14f=a116_0x201b3c;return _0x179c9b==null?_0x3fb14f(0x95):String(_0x179c9b);}export function menuError(_0x421963,_0x21fd38,_0x125a5e){return new CliError(_0x421963,0x1,_0x21fd38,_0x125a5e);}export function mapMenuApiError(_0x25806b,_0x57bb3c,_0x328e0f){const _0x373846=a116_0x201b3c;if(_0x25806b instanceof CliError&&_0x25806b['code']!==_0x373846(0xc9))return _0x25806b;const _0x3ac959=_0x25806b instanceof Error?_0x25806b[_0x373846(0x7f)]:String(_0x25806b);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x373846(0x9f)](_0x3ac959))return menuError(_0x373846(0xaa),_0x373846(0xc6)+_0x57bb3c+(_0x328e0f?_0x373846(0x74)+_0x328e0f:'')+'.',_0x373846(0xd2));return menuError(_0x373846(0x96),_0x373846(0xb1)+_0x57bb3c+(_0x328e0f?_0x373846(0x74)+_0x328e0f:'')+':\x20'+_0x3ac959,_0x373846(0xd5));}function stateDrift(_0x203e6e){const _0x47102d=a116_0x201b3c;return menuError(_0x47102d(0x79),_0x203e6e,_0x47102d(0x70));}
1
+ const a116_0x1a4050=a116_0x25a4;(function(_0x55a6ea,_0x18c8b9){const _0x5a90f3=a116_0x25a4,_0x57406b=_0x55a6ea();while(!![]){try{const _0x5390d0=parseInt(_0x5a90f3(0x186))/0x1+-parseInt(_0x5a90f3(0x174))/0x2*(-parseInt(_0x5a90f3(0x16f))/0x3)+parseInt(_0x5a90f3(0x15c))/0x4*(-parseInt(_0x5a90f3(0x17a))/0x5)+parseInt(_0x5a90f3(0x172))/0x6*(-parseInt(_0x5a90f3(0x17e))/0x7)+-parseInt(_0x5a90f3(0x16d))/0x8*(-parseInt(_0x5a90f3(0x157))/0x9)+parseInt(_0x5a90f3(0x179))/0xa+parseInt(_0x5a90f3(0x193))/0xb*(-parseInt(_0x5a90f3(0x181))/0xc);if(_0x5390d0===_0x18c8b9)break;else _0x57406b['push'](_0x57406b['shift']());}catch(_0x2f1358){_0x57406b['push'](_0x57406b['shift']());}}}(a116_0x1054,0x224b0));function a116_0x1054(){const _0x409d7b=['expected-children-count','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','8NCiuWO','number','deleteOrder','selector','call','yes','expect-parent-id','message','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','hasOwnProperty','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Online\x20menu\x20state\x20changed\x20before\x20','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','unknown','succeeded','174272cFhrzd','menu_state_drift','740871qrexKU','num','\x20is\x20type\x20\x22','94374jyyIau','backend','2eAoHth','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','Online\x20menu\x20not\x20found:\x20','Permission\x20denied\x20while\x20attempting\x20to\x20','warnings','1305390jgaFbV','176020HlPIbL','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','cookie','menu_parent_not_folder','35MjYKIi','pre-write-recheck','bool','1600836FeyUVl','appCode','stage','filter','Exact\x20online\x20menu\x20id','137958zVXOPl','before','snapshotHash','length','dryRun','failed',',\x20current\x20','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','parentId','max','isSafeInteger','menu_verification_failed','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','33OaAuGd','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','root','planFile','Cannot\x20append\x20a\x20','get','folder','prototype','path','menu_confirmation_required','menu_not_found','operation','hint','byId','sort','\x22,\x20not\x20folder.','string','code','data','menu_sort_overflow','Failed\x20to\x20','menu_mutation_failed','str','menu_sort_invalid','verification','rawFlags','toLowerCase','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','error','after','Menu\x20','cascade','type','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','expect-path','api_error','test','validation','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','stringify','flagMissing','plannedActions','parent-id','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','menu_permission_denied','childrenCount','72hVcZRK','Sibling\x20sort\x20value\x20(non-negative\x20integer)','\x20menu\x20'];a116_0x1054=function(){return _0x409d7b;};return a116_0x1054();}import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a116_0x1a4050(0x15d),'required':!![],'description':a116_0x1a4050(0x185)};export const MENU_SORT_FLAG={'name':a116_0x1a4050(0x1a1),'type':a116_0x1a4050(0x15d),'description':a116_0x1a4050(0x158)};export const MENU_PARENT_ID_FLAG={'name':a116_0x1a4050(0x153),'type':'string','description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a116_0x1a4050(0x162),'type':a116_0x1a4050(0x1a3),'description':a116_0x1a4050(0x18d)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a116_0x1a4050(0x1b6),'type':'string','description':a116_0x1a4050(0x1ae)},{'name':a116_0x1a4050(0x15a),'type':a116_0x1a4050(0x15d),'description':a116_0x1a4050(0x194)}];export function validateExactId(_0x5978de){const _0x4c5a22=a116_0x1a4050,_0x9c8fa1=_0x5978de[_0x4c5a22(0x170)]('id');if(!Number[_0x4c5a22(0x190)](_0x9c8fa1)||_0x9c8fa1<=0x0)throw CliErrors['validation'](_0x4c5a22(0x169));return _0x9c8fa1;}export function validateSort(_0x545ce6,_0x127b17='sort'){const _0x17c540=a116_0x1a4050;if(!hasFlag(_0x545ce6,_0x127b17))return undefined;const _0x1adaa7=_0x545ce6['num'](_0x127b17);if(!Number['isSafeInteger'](_0x1adaa7)||_0x1adaa7<0x0||_0x1adaa7>MAX_MENU_SORT)throw menuError(_0x17c540(0x1aa),'--'+_0x127b17+_0x17c540(0x168)+MAX_MENU_SORT+'.',_0x17c540(0x175));return _0x1adaa7;}export function nextSiblingSort(_0x427248,_0x5443b4,_0x18e09c){const _0x26827c=a116_0x1a4050,_0x231fed=getChildren(_0x427248,_0x5443b4)['map'](_0x161afa=>_0x161afa['sort'])[_0x26827c(0x184)](_0x5d9584=>typeof _0x5d9584===_0x26827c(0x15d));if(_0x231fed[_0x26827c(0x189)]===0x0)return 0x0;const _0x523a68=Math[_0x26827c(0x18f)](..._0x231fed);if(_0x523a68>=MAX_MENU_SORT)throw menuError(_0x26827c(0x1a6),_0x26827c(0x197)+_0x18e09c+'\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0x523a68+'.','Reorder\x20sibling\x20menus\x20below\x20'+MAX_MENU_SORT+_0x26827c(0x1af));return _0x523a68+0x1;}export function requireExplicitYes(_0x5f1d47){const _0x5c907e=a116_0x1a4050;if(_0x5f1d47[_0x5c907e(0x180)]('dry-run'))return;if(!_0x5f1d47['bool'](_0x5c907e(0x161)))throw menuError(_0x5c907e(0x19c),_0x5c907e(0x192),_0x5c907e(0x166));}export async function fetchMutationSnapshot(_0x3cae87,_0x29bec5,_0x2ba03c){const _0x3425bf=a116_0x1a4050;try{return await fetchMenuSnapshot(_0x3cae87[_0x3425bf(0x182)],_0x3cae87[_0x3425bf(0x17c)]);}catch(_0x38867f){throw mapMenuApiError(_0x38867f,'read\x20online\x20menu\x20facts\x20before\x20'+_0x29bec5,_0x2ba03c);}}export async function recheckMutationSnapshot(_0x158044,_0x480aec,_0x5cda7a,_0x50bc35){const _0x590c1d=a116_0x1a4050;let _0x21a6d8;try{_0x21a6d8=await fetchMenuSnapshot(_0x158044['appCode'],_0x158044[_0x590c1d(0x17c)]);}catch(_0x391c2b){const _0x45e2fb=mapMenuApiError(_0x391c2b,'recheck\x20online\x20menu\x20facts\x20before\x20'+_0x5cda7a,_0x50bc35);throw menuFailure(_0x45e2fb,_0x480aec,{'stage':_0x590c1d(0x17f),'failed':_0x50bc35==null?{}:{'id':_0x50bc35}});}if(_0x21a6d8['hash']!==_0x480aec[_0x590c1d(0x188)]){const _0x4f5c34=menuError('menu_state_drift',_0x590c1d(0x167)+_0x5cda7a+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0x4f5c34,_0x480aec,{'stage':_0x590c1d(0x17f),'failed':{..._0x50bc35==null?{}:{'id':_0x50bc35},'expectedSnapshotHash':_0x480aec['snapshotHash'],'currentSnapshotHash':_0x21a6d8['hash']}});}return _0x21a6d8;}export function parseParentId(_0x5e3e8d,_0x2f1cf9,_0x5bc950={}){const _0xcc2c99=a116_0x1a4050;if(!hasFlag(_0x5e3e8d,_0x2f1cf9)){if(_0x5bc950['required'])throw CliErrors[_0xcc2c99(0x1bc)](_0x2f1cf9);return undefined;}const _0x239a49=_0x5e3e8d['str'](_0x2f1cf9)['trim']();if(_0x239a49[_0xcc2c99(0x1ad)]()==='root')return null;if(!/^\d+$/[_0xcc2c99(0x1b8)](_0x239a49))throw CliErrors[_0xcc2c99(0x1b9)]('--'+_0x2f1cf9+_0xcc2c99(0x17b));const _0x1c96fb=Number(_0x239a49);if(!Number[_0xcc2c99(0x190)](_0x1c96fb)||_0x1c96fb<=0x0)throw CliErrors[_0xcc2c99(0x1b9)]('--'+_0x2f1cf9+_0xcc2c99(0x17b));return _0x1c96fb;}export function requireMenu(_0x4e6eea,_0x3afbe0){const _0x5819e5=a116_0x1a4050,_0x6b0e8c=_0x4e6eea[_0x5819e5(0x1a0)][_0x5819e5(0x198)](_0x3afbe0);if(!_0x6b0e8c)throw menuError(_0x5819e5(0x19d),_0x5819e5(0x176)+_0x3afbe0,_0x5819e5(0x164));return _0x6b0e8c;}export function requireFolder(_0x22f3c8,_0x2e3f0d){const _0x52c345=a116_0x1a4050,_0x397edf=requireMenu(_0x22f3c8,_0x2e3f0d);if(_0x397edf[_0x52c345(0x1b4)]!==_0x52c345(0x199))throw menuError(_0x52c345(0x17d),_0x52c345(0x1b2)+_0x2e3f0d+_0x52c345(0x171)+(_0x397edf[_0x52c345(0x1b4)]||_0x52c345(0x16b))+_0x52c345(0x1a2),_0x52c345(0x1b5));return _0x397edf;}export function assertExpectedState(_0x114d7b,_0x1cec72){const _0x2675cb=a116_0x1a4050;if(hasFlag(_0x114d7b,'expect-parent-id')){const _0x5e619b=parseParentId(_0x114d7b,_0x2675cb(0x162),{'required':!![]});if(_0x1cec72[_0x2675cb(0x18e)]!==_0x5e619b)throw stateDrift(_0x2675cb(0x1b2)+_0x1cec72['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x5e619b)+',\x20current\x20'+formatParent(_0x1cec72[_0x2675cb(0x18e)])+'.');}if(hasFlag(_0x114d7b,'expect-path')){const _0x2a43a0=_0x114d7b[_0x2675cb(0x1a9)](_0x2675cb(0x1b6));if(_0x1cec72['path']!==_0x2a43a0)throw stateDrift(_0x2675cb(0x1b2)+_0x1cec72['id']+'\x20path\x20changed:\x20expected\x20'+JSON[_0x2675cb(0x1bb)](_0x2a43a0)+',\x20current\x20'+JSON['stringify'](_0x1cec72[_0x2675cb(0x19b)])+'.');}if(hasFlag(_0x114d7b,_0x2675cb(0x15a))){const _0x183724=_0x114d7b['num'](_0x2675cb(0x15a));if(!Number[_0x2675cb(0x190)](_0x183724)||_0x183724<0x0)throw CliErrors[_0x2675cb(0x1b9)](_0x2675cb(0x1ba));if(_0x1cec72[_0x2675cb(0x156)]!==_0x183724)throw stateDrift('Menu\x20'+_0x1cec72['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x183724+_0x2675cb(0x18c)+_0x1cec72[_0x2675cb(0x156)]+'.');}}export function assertVerified(_0x2029bd,_0x2610f9,_0x559b0c='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x4ed7d2=a116_0x1a4050;if(!_0x2029bd)throw menuError(_0x4ed7d2(0x191),_0x2610f9,_0x559b0c);}export function mutationResult(_0x4cfb38){const _0x5df00f=a116_0x1a4050;return{'operation':_0x4cfb38[_0x5df00f(0x19e)],'selector':_0x4cfb38[_0x5df00f(0x15f)],'before':_0x4cfb38[_0x5df00f(0x187)],'after':_0x4cfb38[_0x5df00f(0x1b1)],'dryRun':_0x4cfb38[_0x5df00f(0x18a)],'backend':_0x4cfb38[_0x5df00f(0x173)],..._0x4cfb38[_0x5df00f(0x152)]?{'plannedActions':_0x4cfb38[_0x5df00f(0x152)]}:{},..._0x4cfb38['targets']?{'targets':_0x4cfb38['targets']}:{},..._0x4cfb38[_0x5df00f(0x15e)]?{'deleteOrder':_0x4cfb38[_0x5df00f(0x15e)]}:{},'snapshotHash':_0x4cfb38[_0x5df00f(0x188)],..._0x4cfb38[_0x5df00f(0x1b3)]?{'cascade':_0x4cfb38[_0x5df00f(0x1b3)]}:{},..._0x4cfb38[_0x5df00f(0x196)]?{'planFile':_0x4cfb38[_0x5df00f(0x196)]}:{},'succeeded':_0x4cfb38['succeeded']??[],'failed':_0x4cfb38[_0x5df00f(0x18b)]??[],'warnings':_0x4cfb38[_0x5df00f(0x178)]??[],'verification':_0x4cfb38[_0x5df00f(0x1ab)],'error':_0x4cfb38[_0x5df00f(0x1b0)]};}export function menuDryRunResult(_0x4641d0,_0x2c108f){return{..._0x4641d0,..._0x2c108f};}export function menuFailure(_0x1bbf73,_0x3f428b,_0x568569){const _0x3c2102=a116_0x1a4050,_0x53b33f=mutationResult({..._0x3f428b,'after':_0x568569[_0x3c2102(0x1b1)]===undefined?_0x3f428b[_0x3c2102(0x1b1)]:_0x568569[_0x3c2102(0x1b1)],'backend':_0x568569['backend']??_0x3f428b['backend'],'dryRun':![],'succeeded':_0x568569[_0x3c2102(0x16c)]??[],'failed':[{..._0x568569[_0x3c2102(0x18b)]??{},'stage':_0x568569[_0x3c2102(0x183)],'code':_0x1bbf73[_0x3c2102(0x1a4)],'message':_0x1bbf73[_0x3c2102(0x163)]}],'warnings':[..._0x3f428b[_0x3c2102(0x178)],..._0x568569[_0x3c2102(0x178)]??[]],'verification':_0x568569[_0x3c2102(0x1ab)],'error':{'code':_0x1bbf73[_0x3c2102(0x1a4)],'message':_0x1bbf73[_0x3c2102(0x163)],..._0x1bbf73[_0x3c2102(0x19f)]?{'hint':_0x1bbf73['hint']}:{}}});return Object['defineProperty'](_0x1bbf73,_0x3c2102(0x1a5),{'value':_0x53b33f,'enumerable':!![],'configurable':!![]}),_0x1bbf73;}export function asVerificationError(_0x4a3ce9,_0x2abd09){const _0x4cc30b=a116_0x1a4050;if(_0x4a3ce9 instanceof CliError&&_0x4a3ce9[_0x4cc30b(0x1a4)]==='menu_verification_failed')return _0x4a3ce9;const _0x3336dd=_0x4a3ce9 instanceof Error?_0x4a3ce9[_0x4cc30b(0x163)]:String(_0x4a3ce9);return menuError(_0x4cc30b(0x191),''+_0x2abd09+(_0x3336dd?':\x20'+_0x3336dd:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}export function describeMenuErrorCause(_0x229a3b,_0x4b1371,_0x4cc2d8){const _0x3d1988=a116_0x1a4050,_0x29dece=mapMenuApiError(_0x229a3b,_0x4b1371,_0x4cc2d8);return{'causeCode':_0x29dece['code'],'causeMessage':_0x29dece[_0x3d1988(0x163)]};}function a116_0x25a4(_0x597311,_0x5f1478){_0x597311=_0x597311-0x152;const _0x105426=a116_0x1054();let _0x25a409=_0x105426[_0x597311];return _0x25a409;}export function hasFlag(_0x252260,_0x1f5ee9){const _0x147765=a116_0x1a4050;return Object[_0x147765(0x19a)][_0x147765(0x165)][_0x147765(0x160)](_0x252260[_0x147765(0x1ac)],_0x1f5ee9)&&_0x252260['rawFlags'][_0x1f5ee9]!==undefined;}export function toApiParentId(_0x2ef6d9){return _0x2ef6d9??0x0;}export function formatParent(_0xe540a2){const _0x151254=a116_0x1a4050;return _0xe540a2==null?_0x151254(0x195):String(_0xe540a2);}export function menuError(_0x2f09cf,_0x307390,_0x318f65){return new CliError(_0x2f09cf,0x1,_0x307390,_0x318f65);}export function mapMenuApiError(_0x52cf93,_0x40d051,_0x126f1f){const _0x513f7d=a116_0x1a4050;if(_0x52cf93 instanceof CliError&&_0x52cf93[_0x513f7d(0x1a4)]!==_0x513f7d(0x1b7))return _0x52cf93;const _0x4b3d1f=_0x52cf93 instanceof Error?_0x52cf93[_0x513f7d(0x163)]:String(_0x52cf93);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x513f7d(0x1b8)](_0x4b3d1f))return menuError(_0x513f7d(0x155),_0x513f7d(0x177)+_0x40d051+(_0x126f1f?_0x513f7d(0x159)+_0x126f1f:'')+'.',_0x513f7d(0x154));return menuError(_0x513f7d(0x1a8),_0x513f7d(0x1a7)+_0x40d051+(_0x126f1f?'\x20menu\x20'+_0x126f1f:'')+':\x20'+_0x4b3d1f,_0x513f7d(0x15b));}function stateDrift(_0x3f40fb){const _0x3527c0=a116_0x1a4050;return menuError(_0x3527c0(0x16e),_0x3f40fb,_0x3527c0(0x16a));}
@@ -1 +1 @@
1
- (function(_0x4fb90f,_0xf66054){const _0x455600=a117_0x533f,_0x4ff548=_0x4fb90f();while(!![]){try{const _0x4235ff=parseInt(_0x455600(0x1c2))/0x1*(-parseInt(_0x455600(0x1da))/0x2)+parseInt(_0x455600(0x1dd))/0x3+-parseInt(_0x455600(0x1d4))/0x4+-parseInt(_0x455600(0x1e7))/0x5*(-parseInt(_0x455600(0x1cd))/0x6)+-parseInt(_0x455600(0x1c6))/0x7+parseInt(_0x455600(0x1c5))/0x8*(parseInt(_0x455600(0x1e0))/0x9)+parseInt(_0x455600(0x1ce))/0xa*(-parseInt(_0x455600(0x1d3))/0xb);if(_0x4235ff===_0xf66054)break;else _0x4ff548['push'](_0x4ff548['shift']());}catch(_0x327013){_0x4ff548['push'](_0x4ff548['shift']());}}}(a117_0x33dc,0x71fa9));function a117_0x33dc(){const _0x465c19=['\x20online\x20menus\x20successfully','create-menus','304435tmDIhC','label','Update\x20menu\x20','extend','get-online-menu-list','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','90757TdyqbX','Creating\x20menu:\x20','Delete\x20','72712iAmeay','5023739SdZVoi','map','create-menu','menus','Menu\x20assets\x20synced:\x20','path','Start\x20batch\x20menu\x20creation,\x20total\x20','78BCNIEc','525830vbKOMs','Batch\x20menu\x20creation\x20completed,\x20total\x20','resources','all','stringify','44HTmQil','3176332xxbNkY','info','loadScriptMode','\x20menu','import','length','2lqWJgP','total','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','1846893gaPPPP','update-menu-cdn-url','Fetched\x20','864lgAoHX','Create\x20menu\x20\x22','Menu\x20created\x20successfully:\x20','procode','\x20menu\x20group(s)'];a117_0x33dc=function(){return _0x465c19;};return a117_0x33dc();}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 a117_0x370494,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x508de2,_0x4bd792){const _0x3533a0=a117_0x533f,_0x3957f0=getEnv();logger[_0x3533a0(0x1d5)](_0x3533a0(0x1c0),isProduction(_0x3957f0)?_0x3533a0(0x1dc)+_0x508de2+')':_0x3533a0(0x1c1)+_0x508de2+')');const _0x24f3a8=await fetchMenuSnapshot(_0x508de2,_0x4bd792,{'verbose':!![]});return logger[_0x3533a0(0x1d5)]('get-online-menu-list',_0x3533a0(0x1df)+_0x24f3a8[_0x3533a0(0x1db)]+_0x3533a0(0x1e5)),_0x24f3a8[_0x3533a0(0x1c9)][_0x3533a0(0x1c7)](toProcessedMenuItem);}export async function createMenu(_0x57673c,_0x52cb49,_0x5f48c1){const _0x3fc9de=a117_0x533f;logger['info']('create-menu',_0x3fc9de(0x1c3)+_0x5f48c1[_0x3fc9de(0x1e8)]+'\x20('+_0x5f48c1['path']+')');const _0x2b8193={'appCode':_0x57673c,'type':_0x3fc9de(0x1e3),'sort':0x0,'extend':{'loadScriptMode':_0x3fc9de(0x1d8),'resources':_0x5f48c1['resources']?JSON[_0x3fc9de(0x1d2)](_0x5f48c1[_0x3fc9de(0x1d0)]):undefined},..._0x5f48c1},_0x19a197=await createMenuRecord(_0x2b8193,_0x52cb49,_0x3fc9de(0x1e1)+_0x5f48c1[_0x3fc9de(0x1e8)]+'\x22');return logger['info'](_0x3fc9de(0x1c8),_0x3fc9de(0x1e2)+_0x5f48c1[_0x3fc9de(0x1e8)]),_0x19a197;}async function createSingleMenu(_0x430f1f,_0x4ce1c2,_0x4b8a9c,_0x48aa9d){const _0x129dae=a117_0x533f,_0x31692f={'appCode':_0x430f1f,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x129dae(0x1d8),'resources':_0x48aa9d?JSON[_0x129dae(0x1d2)](_0x48aa9d):undefined},'label':_0x4b8a9c[_0x129dae(0x1e8)],'path':_0x4b8a9c[_0x129dae(0x1cb)]},_0x1e041d=await createMenuRecord(_0x31692f,_0x4ce1c2,_0x129dae(0x1e1)+_0x4b8a9c['label']+'\x22');return logger['info']('create-menu',_0x129dae(0x1e2)+_0x4b8a9c[_0x129dae(0x1e8)]),_0x1e041d;}export async function createMenus(_0x49d2cf,_0x3f6fa4,_0x27fe68,_0x201d90){const _0x141e07=a117_0x533f;logger[_0x141e07(0x1d5)](_0x141e07(0x1e6),_0x141e07(0x1cc)+_0x27fe68[_0x141e07(0x1d9)]);const _0x1f045d=await Promise[_0x141e07(0x1d1)](_0x27fe68[_0x141e07(0x1c7)](_0x3f0145=>createSingleMenu(_0x49d2cf,_0x3f6fa4,_0x3f0145,_0x201d90)));return logger[_0x141e07(0x1d5)](_0x141e07(0x1e6),_0x141e07(0x1cf)+_0x27fe68[_0x141e07(0x1d9)]),_0x1f045d;}export async function updateMenuCdnUrl(_0x35fccf,_0x3eca96,_0x29d5c7){const _0x4bce57=a117_0x533f;logger[_0x4bce57(0x1d5)](_0x4bce57(0x1de),'Updating\x20menu\x20asset\x20links:\x20'+_0x29d5c7[_0x4bce57(0x1e8)]+'\x20('+_0x29d5c7[_0x4bce57(0x1cb)]+')');const _0x540e89={'id':_0x29d5c7['id'],'appCode':_0x35fccf,'extend':{..._0x29d5c7[_0x4bce57(0x1ea)]??{},..._0x29d5c7[_0x4bce57(0x1d6)]?{'loadScriptMode':_0x29d5c7[_0x4bce57(0x1d6)]}:{},'resources':_0x29d5c7[_0x4bce57(0x1d0)]?JSON[_0x4bce57(0x1d2)](_0x29d5c7[_0x4bce57(0x1d0)]):undefined}},_0x308c60=await updateMenuRecord(_0x540e89,_0x3eca96,'Update\x20menu\x20assets\x20\x22'+_0x29d5c7[_0x4bce57(0x1e8)]+'\x22');return logger['info'](_0x4bce57(0x1de),_0x4bce57(0x1ca)+_0x29d5c7[_0x4bce57(0x1e8)],undefined),_0x308c60;}function a117_0x533f(_0x2676f0,_0x295b75){_0x2676f0=_0x2676f0-0x1c0;const _0x33dc45=a117_0x33dc();let _0x533f26=_0x33dc45[_0x2676f0];return _0x533f26;}export async function createMenuEntity(_0x20ed8e,_0x3b313a,_0xe8682a){const _0x730f32=a117_0x533f;return createMenuRecord({'appCode':_0x20ed8e,..._0xe8682a},_0x3b313a,_0x730f32(0x1e1)+_0xe8682a[_0x730f32(0x1e8)]+'\x22');}export async function updateMenuEntity(_0x33c2bf,_0x353ba8,_0x2fc40e){const _0x5b91ee=a117_0x533f;return updateMenuRecord({'appCode':_0x33c2bf,..._0x2fc40e},_0x353ba8,_0x5b91ee(0x1e9)+_0x2fc40e['id']);}export async function batchDeleteMenuEntities(_0x95010c,_0x52f766){const _0x3f665b=a117_0x533f;return batchDeleteMenuRecords(_0x52f766,_0x95010c,_0x3f665b(0x1c4)+_0x52f766['length']+_0x3f665b(0x1d7)+(_0x52f766[_0x3f665b(0x1d9)]===0x1?'':'s'));}export async function startMenuRegroup(_0x56be49,_0x5d0874){const _0x4b3365=a117_0x533f;return a117_0x370494(_0x5d0874,_0x56be49,'Regroup\x20'+_0x5d0874['menuGroups'][_0x4b3365(0x1d9)]+_0x4b3365(0x1e4));}
1
+ (function(_0x18c6a8,_0x2be128){const _0x17fc74=a117_0x6bf7,_0xa1bcc5=_0x18c6a8();while(!![]){try{const _0x399ab8=-parseInt(_0x17fc74(0x11b))/0x1+-parseInt(_0x17fc74(0x11f))/0x2+-parseInt(_0x17fc74(0x12f))/0x3*(parseInt(_0x17fc74(0x124))/0x4)+-parseInt(_0x17fc74(0x10f))/0x5+-parseInt(_0x17fc74(0x12e))/0x6*(-parseInt(_0x17fc74(0x135))/0x7)+-parseInt(_0x17fc74(0x136))/0x8*(-parseInt(_0x17fc74(0x137))/0x9)+-parseInt(_0x17fc74(0x126))/0xa*(-parseInt(_0x17fc74(0x115))/0xb);if(_0x399ab8===_0x2be128)break;else _0xa1bcc5['push'](_0xa1bcc5['shift']());}catch(_0x1571f3){_0xa1bcc5['push'](_0xa1bcc5['shift']());}}}(a117_0x3ca3,0x340af));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 a117_0x4c4855,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x4b297d,_0x349300){const _0xcc1899=a117_0x6bf7,_0x2c19c3=getEnv();logger[_0xcc1899(0x131)](_0xcc1899(0x119),isProduction(_0x2c19c3)?_0xcc1899(0x127)+_0x4b297d+')':_0xcc1899(0x118)+_0x4b297d+')');const _0x428da7=await fetchMenuSnapshot(_0x4b297d,_0x349300,{'verbose':!![]});return logger[_0xcc1899(0x131)]('get-online-menu-list',_0xcc1899(0x121)+_0x428da7[_0xcc1899(0x129)]+_0xcc1899(0x130)),_0x428da7[_0xcc1899(0x128)][_0xcc1899(0x12d)](toProcessedMenuItem);}function a117_0x3ca3(){const _0x1b4a8f=['menus','total','Create\x20menu\x20\x22','create-menus','label','map','6tbwhHT','159567dpIqTP','\x20online\x20menus\x20successfully','info','stringify','Batch\x20menu\x20creation\x20completed,\x20total\x20','import','907221HdSQgb','8pgjyAa','1205937Westkt','resources','Update\x20menu\x20assets\x20\x22','create-menu','299990NTZWxe','Menu\x20assets\x20synced:\x20','all','\x20menu\x20group(s)','procode','loadScriptMode','253cQRDcI','path','Update\x20menu\x20','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','Start\x20batch\x20menu\x20creation,\x20total\x20','281811dBmzMz','update-menu-cdn-url','Menu\x20created\x20successfully:\x20','Regroup\x20','574660FsSANl','menuGroups','Fetched\x20','Creating\x20menu:\x20','length','12oqEsOc','\x20menu','320990WeGZqx','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'];a117_0x3ca3=function(){return _0x1b4a8f;};return a117_0x3ca3();}export async function createMenu(_0x476f6e,_0x184979,_0x70c445){const _0x359430=a117_0x6bf7;logger[_0x359430(0x131)](_0x359430(0x13a),_0x359430(0x122)+_0x70c445[_0x359430(0x12c)]+'\x20('+_0x70c445[_0x359430(0x116)]+')');const _0x31662b={'appCode':_0x476f6e,'type':_0x359430(0x113),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x70c445[_0x359430(0x138)]?JSON[_0x359430(0x132)](_0x70c445['resources']):undefined},..._0x70c445},_0x176ed5=await createMenuRecord(_0x31662b,_0x184979,_0x359430(0x12a)+_0x70c445[_0x359430(0x12c)]+'\x22');return logger[_0x359430(0x131)](_0x359430(0x13a),_0x359430(0x11d)+_0x70c445[_0x359430(0x12c)]),_0x176ed5;}async function createSingleMenu(_0x9bb637,_0x4e6b82,_0x33d7dd,_0x45b27f){const _0x32cc72=a117_0x6bf7,_0x4f5431={'appCode':_0x9bb637,'type':_0x32cc72(0x113),'sort':0x0,'extend':{'loadScriptMode':_0x32cc72(0x134),'resources':_0x45b27f?JSON[_0x32cc72(0x132)](_0x45b27f):undefined},'label':_0x33d7dd[_0x32cc72(0x12c)],'path':_0x33d7dd['path']},_0x548b02=await createMenuRecord(_0x4f5431,_0x4e6b82,_0x32cc72(0x12a)+_0x33d7dd['label']+'\x22');return logger[_0x32cc72(0x131)]('create-menu',_0x32cc72(0x11d)+_0x33d7dd[_0x32cc72(0x12c)]),_0x548b02;}export async function createMenus(_0x5e6e42,_0x445b46,_0x1d5bae,_0x31e59c){const _0x5f086c=a117_0x6bf7;logger[_0x5f086c(0x131)](_0x5f086c(0x12b),_0x5f086c(0x11a)+_0x1d5bae[_0x5f086c(0x123)]);const _0x1adc5d=await Promise[_0x5f086c(0x111)](_0x1d5bae[_0x5f086c(0x12d)](_0x198091=>createSingleMenu(_0x5e6e42,_0x445b46,_0x198091,_0x31e59c)));return logger['info'](_0x5f086c(0x12b),_0x5f086c(0x133)+_0x1d5bae[_0x5f086c(0x123)]),_0x1adc5d;}export async function updateMenuCdnUrl(_0x2beb77,_0x37b794,_0x26ae64){const _0x32d8af=a117_0x6bf7;logger[_0x32d8af(0x131)]('update-menu-cdn-url','Updating\x20menu\x20asset\x20links:\x20'+_0x26ae64[_0x32d8af(0x12c)]+'\x20('+_0x26ae64[_0x32d8af(0x116)]+')');const _0x30b02b={'id':_0x26ae64['id'],'appCode':_0x2beb77,'extend':{..._0x26ae64['extend']??{},..._0x26ae64['loadScriptMode']?{'loadScriptMode':_0x26ae64[_0x32d8af(0x114)]}:{},'resources':_0x26ae64['resources']?JSON[_0x32d8af(0x132)](_0x26ae64[_0x32d8af(0x138)]):undefined}},_0x57ba1a=await updateMenuRecord(_0x30b02b,_0x37b794,_0x32d8af(0x139)+_0x26ae64[_0x32d8af(0x12c)]+'\x22');return logger[_0x32d8af(0x131)](_0x32d8af(0x11c),_0x32d8af(0x110)+_0x26ae64[_0x32d8af(0x12c)],undefined),_0x57ba1a;}export async function createMenuEntity(_0x2ffb14,_0x2fbe36,_0x202d10){const _0x3edfea=a117_0x6bf7;return createMenuRecord({'appCode':_0x2ffb14,..._0x202d10},_0x2fbe36,_0x3edfea(0x12a)+_0x202d10[_0x3edfea(0x12c)]+'\x22');}function a117_0x6bf7(_0x522513,_0x51b9bd){_0x522513=_0x522513-0x10f;const _0x3ca301=a117_0x3ca3();let _0x6bf707=_0x3ca301[_0x522513];return _0x6bf707;}export async function updateMenuEntity(_0x1b6fe2,_0x8764fb,_0x5b4fbe){const _0x4b14fc=a117_0x6bf7;return updateMenuRecord({'appCode':_0x1b6fe2,..._0x5b4fbe},_0x8764fb,_0x4b14fc(0x117)+_0x5b4fbe['id']);}export async function batchDeleteMenuEntities(_0x467f1e,_0x5067be){const _0x184e9f=a117_0x6bf7;return batchDeleteMenuRecords(_0x5067be,_0x467f1e,'Delete\x20'+_0x5067be[_0x184e9f(0x123)]+_0x184e9f(0x125)+(_0x5067be[_0x184e9f(0x123)]===0x1?'':'s'));}export async function startMenuRegroup(_0x25d795,_0x2b9b99){const _0x39eea3=a117_0x6bf7;return a117_0x4c4855(_0x2b9b99,_0x25d795,_0x39eea3(0x11e)+_0x2b9b99[_0x39eea3(0x120)][_0x39eea3(0x123)]+_0x39eea3(0x112));}
@@ -1 +1 @@
1
- const a118_0x2eae=a118_0x53f9;(function(_0x192203,_0x273900){const _0x50a171=a118_0x53f9,_0x4c21be=_0x192203();while(!![]){try{const _0x2330fc=-parseInt(_0x50a171(0x141))/0x1*(parseInt(_0x50a171(0x150))/0x2)+-parseInt(_0x50a171(0x140))/0x3+parseInt(_0x50a171(0x148))/0x4+-parseInt(_0x50a171(0x14a))/0x5+-parseInt(_0x50a171(0x161))/0x6+-parseInt(_0x50a171(0x142))/0x7+parseInt(_0x50a171(0x14f))/0x8;if(_0x2330fc===_0x273900)break;else _0x4c21be['push'](_0x4c21be['shift']());}catch(_0x4f9bc5){_0x4c21be['push'](_0x4c21be['shift']());}}}(a118_0x2207,0xb0a42));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a118_0x53f9(_0x67748e,_0x3b2405){_0x67748e=_0x67748e-0x13a;const _0x2207e4=a118_0x2207();let _0x53f9f6=_0x2207e4[_0x67748e];return _0x53f9f6;}const MENU_SYNC_PARAM_KEYS=new Set([a118_0x2eae(0x13a),a118_0x2eae(0x15e)]);function validateParams(_0x41a5d2){const _0x289906=a118_0x2eae,_0x478bd7=[];return _0x41a5d2[_0x289906(0x13a)]&&!isValidJsHttpsUrl(_0x41a5d2[_0x289906(0x13a)])&&_0x478bd7[_0x289906(0x145)]({'field':_0x289906(0x13a),'message':_0x289906(0x13b)}),_0x41a5d2[_0x289906(0x15e)]&&!isValidCssHttpsUrl(_0x41a5d2['cssUrl'])&&_0x478bd7[_0x289906(0x145)]({'field':'cssUrl','message':_0x289906(0x155)}),_0x478bd7;}export async function runMenuSyncCore(_0x4f68d0,_0x2ee7d6,_0x44f378=[],_0x239281,_0x5dc5ac={}){const _0xb6abb=a118_0x2eae,_0x24c0f5=parseMenuSyncParams(_0x239281),_0x102b63=[...new Set(_0x44f378['map'](_0x373e11=>_0x373e11[_0xb6abb(0x15f)]())['filter'](Boolean))],_0xd20bdb=_0x24c0f5[_0xb6abb(0x13a)],_0xa9ed11=_0x24c0f5[_0xb6abb(0x15e)],_0x40814b=[];if(_0xd20bdb)_0x40814b[_0xb6abb(0x145)](_0xd20bdb);if(_0xa9ed11)_0x40814b['push'](_0xa9ed11);const _0x50cc1c=validateParams(_0x24c0f5);if(_0x50cc1c[_0xb6abb(0x162)]>0x0){const _0x4f5419=_0x50cc1c['map'](_0x37d8e9=>'--params.'+_0x37d8e9['field']+':\x20'+_0x37d8e9[_0xb6abb(0x15b)])[_0xb6abb(0x156)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x4f5419);}logger[_0xb6abb(0x143)](process[_0xb6abb(0x15d)]()),logger[_0xb6abb(0x147)](_0xb6abb(0x14b),_0xb6abb(0x14c),{'appCode':_0x4f68d0,'selectedCount':_0x102b63['length'],'jsUrl':_0xd20bdb,'cssUrl':_0xa9ed11});if(_0xd20bdb){const _0x13f04c=await isUrlReachable(_0xd20bdb);if(!_0x13f04c)throw new Error(_0xb6abb(0x154)+_0xd20bdb);}if(_0xa9ed11){const _0x47bb7c=await isUrlReachable(_0xa9ed11);if(!_0x47bb7c)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0xa9ed11);}const _0x569621=getLocalPages();if(_0x569621[_0xb6abb(0x162)]===0x0){if(_0x102b63[_0xb6abb(0x162)]>0x0)throw new Error(_0xb6abb(0x146)+_0x102b63['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x5dc5ac['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x2c81ee=await getOnlineMenuList(_0x4f68d0,_0x2ee7d6),_0x19d781=new Set(_0x2c81ee[_0xb6abb(0x144)](_0x266fa3=>_0x266fa3[_0xb6abb(0x157)]));let _0x2e2677;if(_0x102b63[_0xb6abb(0x162)]>0x0){const _0x512bfc=new Map(_0x569621[_0xb6abb(0x144)](_0x3029d6=>[_0x3029d6[_0xb6abb(0x157)],_0x3029d6])),_0x1604a7=_0x102b63['filter'](_0x18e75e=>!_0x512bfc[_0xb6abb(0x13e)](_0x18e75e));if(_0x1604a7[_0xb6abb(0x162)]>0x0){const _0x873364=_0x569621['map'](_0x18e988=>_0x18e988['path'])[_0xb6abb(0x156)](',\x20');throw new Error(_0xb6abb(0x146)+_0x1604a7[_0xb6abb(0x156)](',\x20')+_0xb6abb(0x149)+_0x873364);}const _0x5e5942=_0x102b63[_0xb6abb(0x14d)](_0x1908bb=>_0x19d781[_0xb6abb(0x13e)](_0x1908bb));if(_0x5e5942[_0xb6abb(0x162)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x5e5942['join'](',\x20'));_0x2e2677=_0x102b63[_0xb6abb(0x144)](_0x11efa6=>_0x512bfc['get'](_0x11efa6));}else _0x2e2677=_0x569621[_0xb6abb(0x14d)](_0x5aef5f=>!_0x19d781[_0xb6abb(0x13e)](_0x5aef5f[_0xb6abb(0x157)]));if(_0x2e2677[_0xb6abb(0x162)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x5dc5ac['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0x494864=_0x2e2677[_0xb6abb(0x144)](_0x399e57=>({'type':_0xb6abb(0x151),'path':_0x399e57[_0xb6abb(0x157)],'label':_0x399e57[_0xb6abb(0x160)],'loadScriptMode':_0xb6abb(0x158),'resources':[..._0x40814b]}));if(_0x5dc5ac['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x2e2677,'plannedMenus':_0x494864};const _0xd87f4=await createMenus(_0x4f68d0,_0x2ee7d6,_0x2e2677,_0x40814b[_0xb6abb(0x162)]>0x0?_0x40814b:undefined);return logger[_0xb6abb(0x147)](_0xb6abb(0x14b),_0xb6abb(0x13f),{'count':_0x2e2677[_0xb6abb(0x162)],'resources':_0x40814b}),{'created':_0xd87f4[_0xb6abb(0x162)],'skipped':![],'dryRun':![],'targetPages':_0x2e2677,'plannedMenus':_0x494864,'menus':_0xd87f4};}function a118_0x2207(){const _0x4fb295=['jsUrl','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','string','has','Menu\x20sync\x20completed','1667436zGIkAt','8117aEqRev','1211091zYBNna','setLogPath','map','push','No\x20local\x20pages\x20matched\x20paths:\x20','info','4545276jpBrRN','\x0a\x20\x20Available\x20local\x20paths:\x20','1624240nIxTfa','menu-sync','Start\x20non-interactive\x20menu\x20sync','filter','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','23700952FZxkFw','300ZTcpPN','procode','object','Invalid\x20--params.','JS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','join','path','import','Invalid\x20--params\x20fields:\x20','Invalid\x20--params\x20JSON.','message','parse','cwd','cssUrl','trim','label','6625158BRRiTT','length'];a118_0x2207=function(){return _0x4fb295;};return a118_0x2207();}export function parseMenuSyncParams(_0x2baf31){const _0x26fa13=a118_0x2eae;if(!_0x2baf31||typeof _0x2baf31!=='string')return{};let _0x3dbe9c;try{_0x3dbe9c=JSON[_0x26fa13(0x15c)](_0x2baf31);}catch{throw new Error(_0x26fa13(0x15a));}if(typeof _0x3dbe9c!==_0x26fa13(0x152)||_0x3dbe9c===null||Array['isArray'](_0x3dbe9c))throw new Error(_0x26fa13(0x14e));const _0x406240=_0x3dbe9c;if(Object['hasOwn'](_0x406240,'pages'))throw new Error(_0x26fa13(0x13c));const _0x1750b9=Object['keys'](_0x406240)[_0x26fa13(0x14d)](_0x2ea994=>!MENU_SYNC_PARAM_KEYS['has'](_0x2ea994));if(_0x1750b9[_0x26fa13(0x162)]>0x0)throw new Error(_0x26fa13(0x159)+_0x1750b9['join'](',\x20')+'.');for(const _0xc9b869 of MENU_SYNC_PARAM_KEYS){const _0x16efb9=_0x406240[_0xc9b869];if(_0x16efb9!==undefined&&(typeof _0x16efb9!==_0x26fa13(0x13d)||_0x16efb9[_0x26fa13(0x15f)]()===''))throw new Error(_0x26fa13(0x153)+_0xc9b869+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x406240[_0x26fa13(0x13a)]==='string'?_0x406240[_0x26fa13(0x13a)][_0x26fa13(0x15f)]():undefined,'cssUrl':typeof _0x406240['cssUrl']==='string'?_0x406240[_0x26fa13(0x15e)]['trim']():undefined};}
1
+ const a118_0x4e9b56=a118_0x6d29;function a118_0x6d29(_0x410cb2,_0x1b1618){_0x410cb2=_0x410cb2-0x81;const _0x310e9c=a118_0x310e();let _0x6d29b3=_0x310e9c[_0x410cb2];return _0x6d29b3;}function a118_0x310e(){const _0x3c63a6=['join','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','menu-sync','has','1582fgbPAd','Invalid\x20--params\x20fields:\x20','327369EqWLJO','message','366712aFwcCk','976815UvQBVp','cssUrl','JS\x20URL\x20is\x20unreachable:\x20','jsUrl','filter','procode','object','field','get','trim','5532pQCDch','Start\x20non-interactive\x20menu\x20sync','dryRun','setLogPath','pages','length','map','string','Invalid\x20--params:\x20','Menu\x20sync\x20completed','927872mqVwbW','1081010qpTUxY','push','info','\x0a\x20\x20Available\x20local\x20paths:\x20','label','211fsjAyZ','238QwxjEB','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','import','cwd','parse',':\x20expected\x20a\x20non-empty\x20string.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Invalid\x20--params\x20JSON.','path','No\x20local\x20pages\x20matched\x20paths:\x20','isArray','CSS\x20URL\x20is\x20unreachable:\x20'];a118_0x310e=function(){return _0x3c63a6;};return a118_0x310e();}(function(_0x1e763f,_0x172ea9){const _0x5ee634=a118_0x6d29,_0x5b7503=_0x1e763f();while(!![]){try{const _0x470927=-parseInt(_0x5ee634(0x97))/0x1*(-parseInt(_0x5ee634(0xa9))/0x2)+parseInt(_0x5ee634(0xab))/0x3+parseInt(_0x5ee634(0xad))/0x4+-parseInt(_0x5ee634(0x92))/0x5+parseInt(_0x5ee634(0x87))/0x6*(-parseInt(_0x5ee634(0x98))/0x7)+parseInt(_0x5ee634(0x91))/0x8+-parseInt(_0x5ee634(0xae))/0x9;if(_0x470927===_0x172ea9)break;else _0x5b7503['push'](_0x5b7503['shift']());}catch(_0x2fc546){_0x5b7503['push'](_0x5b7503['shift']());}}}(a118_0x310e,0x1f271));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';const MENU_SYNC_PARAM_KEYS=new Set(['jsUrl',a118_0x4e9b56(0xaf)]);function validateParams(_0x5ce5f5){const _0x426ff1=a118_0x4e9b56,_0x325235=[];return _0x5ce5f5['jsUrl']&&!isValidJsHttpsUrl(_0x5ce5f5['jsUrl'])&&_0x325235[_0x426ff1(0x93)]({'field':_0x426ff1(0xb1),'message':_0x426ff1(0xa6)}),_0x5ce5f5['cssUrl']&&!isValidCssHttpsUrl(_0x5ce5f5[_0x426ff1(0xaf)])&&_0x325235['push']({'field':'cssUrl','message':_0x426ff1(0x9f)}),_0x325235;}export async function runMenuSyncCore(_0x2aacf9,_0x19789f,_0x15af0c=[],_0x134466,_0x20dbcc={}){const _0x3d649b=a118_0x4e9b56,_0x3856c8=parseMenuSyncParams(_0x134466),_0x304b87=[...new Set(_0x15af0c['map'](_0x3b148e=>_0x3b148e[_0x3d649b(0x86)]())[_0x3d649b(0x81)](Boolean))],_0x8f9099=_0x3856c8[_0x3d649b(0xb1)],_0x4c31a9=_0x3856c8[_0x3d649b(0xaf)],_0x10d8dd=[];if(_0x8f9099)_0x10d8dd[_0x3d649b(0x93)](_0x8f9099);if(_0x4c31a9)_0x10d8dd[_0x3d649b(0x93)](_0x4c31a9);const _0x270338=validateParams(_0x3856c8);if(_0x270338[_0x3d649b(0x8c)]>0x0){const _0x526a8c=_0x270338[_0x3d649b(0x8d)](_0x1b069b=>'--params.'+_0x1b069b[_0x3d649b(0x84)]+':\x20'+_0x1b069b[_0x3d649b(0xac)])[_0x3d649b(0xa5)](';\x20');throw new Error(_0x3d649b(0x8f)+_0x526a8c);}logger[_0x3d649b(0x8a)](process[_0x3d649b(0x9b)]()),logger[_0x3d649b(0x94)](_0x3d649b(0xa7),_0x3d649b(0x88),{'appCode':_0x2aacf9,'selectedCount':_0x304b87['length'],'jsUrl':_0x8f9099,'cssUrl':_0x4c31a9});if(_0x8f9099){const _0x466e24=await isUrlReachable(_0x8f9099);if(!_0x466e24)throw new Error(_0x3d649b(0xb0)+_0x8f9099);}if(_0x4c31a9){const _0x1f52c8=await isUrlReachable(_0x4c31a9);if(!_0x1f52c8)throw new Error(_0x3d649b(0xa4)+_0x4c31a9);}const _0x35a83e=getLocalPages();if(_0x35a83e[_0x3d649b(0x8c)]===0x0){if(_0x304b87[_0x3d649b(0x8c)]>0x0)throw new Error(_0x3d649b(0xa2)+_0x304b87['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x20dbcc[_0x3d649b(0x89)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x5435c2=await getOnlineMenuList(_0x2aacf9,_0x19789f),_0x146d38=new Set(_0x5435c2[_0x3d649b(0x8d)](_0x8a9d02=>_0x8a9d02[_0x3d649b(0xa1)]));let _0x4d609d;if(_0x304b87[_0x3d649b(0x8c)]>0x0){const _0xe31c28=new Map(_0x35a83e[_0x3d649b(0x8d)](_0x1577eb=>[_0x1577eb[_0x3d649b(0xa1)],_0x1577eb])),_0x54f747=_0x304b87[_0x3d649b(0x81)](_0xb88970=>!_0xe31c28[_0x3d649b(0xa8)](_0xb88970));if(_0x54f747[_0x3d649b(0x8c)]>0x0){const _0x34b92e=_0x35a83e['map'](_0x1749cd=>_0x1749cd[_0x3d649b(0xa1)])[_0x3d649b(0xa5)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x54f747[_0x3d649b(0xa5)](',\x20')+_0x3d649b(0x95)+_0x34b92e);}const _0x1d934a=_0x304b87[_0x3d649b(0x81)](_0x58b61=>_0x146d38[_0x3d649b(0xa8)](_0x58b61));if(_0x1d934a[_0x3d649b(0x8c)]>0x0)throw new Error(_0x3d649b(0x9e)+_0x1d934a['join'](',\x20'));_0x4d609d=_0x304b87[_0x3d649b(0x8d)](_0x11e4d3=>_0xe31c28[_0x3d649b(0x85)](_0x11e4d3));}else _0x4d609d=_0x35a83e[_0x3d649b(0x81)](_0x34ebcc=>!_0x146d38[_0x3d649b(0xa8)](_0x34ebcc[_0x3d649b(0xa1)]));if(_0x4d609d[_0x3d649b(0x8c)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x20dbcc[_0x3d649b(0x89)]===!![],'targetPages':[],'plannedMenus':[]};const _0x13f87a=_0x4d609d[_0x3d649b(0x8d)](_0x58d19e=>({'type':_0x3d649b(0x82),'path':_0x58d19e[_0x3d649b(0xa1)],'label':_0x58d19e[_0x3d649b(0x96)],'loadScriptMode':_0x3d649b(0x9a),'resources':[..._0x10d8dd]}));if(_0x20dbcc[_0x3d649b(0x89)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x4d609d,'plannedMenus':_0x13f87a};const _0x4672a9=await createMenus(_0x2aacf9,_0x19789f,_0x4d609d,_0x10d8dd['length']>0x0?_0x10d8dd:undefined);return logger[_0x3d649b(0x94)](_0x3d649b(0xa7),_0x3d649b(0x90),{'count':_0x4d609d[_0x3d649b(0x8c)],'resources':_0x10d8dd}),{'created':_0x4672a9['length'],'skipped':![],'dryRun':![],'targetPages':_0x4d609d,'plannedMenus':_0x13f87a,'menus':_0x4672a9};}export function parseMenuSyncParams(_0x2b9a1f){const _0x3dfc6a=a118_0x4e9b56;if(!_0x2b9a1f||typeof _0x2b9a1f!==_0x3dfc6a(0x8e))return{};let _0x296c23;try{_0x296c23=JSON[_0x3dfc6a(0x9c)](_0x2b9a1f);}catch{throw new Error(_0x3dfc6a(0xa0));}if(typeof _0x296c23!==_0x3dfc6a(0x83)||_0x296c23===null||Array[_0x3dfc6a(0xa3)](_0x296c23))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x4b2837=_0x296c23;if(Object['hasOwn'](_0x4b2837,_0x3dfc6a(0x8b)))throw new Error(_0x3dfc6a(0x99));const _0x3ce7ba=Object['keys'](_0x4b2837)[_0x3dfc6a(0x81)](_0x169e3b=>!MENU_SYNC_PARAM_KEYS['has'](_0x169e3b));if(_0x3ce7ba[_0x3dfc6a(0x8c)]>0x0)throw new Error(_0x3dfc6a(0xaa)+_0x3ce7ba[_0x3dfc6a(0xa5)](',\x20')+'.');for(const _0x3fda11 of MENU_SYNC_PARAM_KEYS){const _0x1244b8=_0x4b2837[_0x3fda11];if(_0x1244b8!==undefined&&(typeof _0x1244b8!==_0x3dfc6a(0x8e)||_0x1244b8[_0x3dfc6a(0x86)]()===''))throw new Error('Invalid\x20--params.'+_0x3fda11+_0x3dfc6a(0x9d));}return{'jsUrl':typeof _0x4b2837['jsUrl']===_0x3dfc6a(0x8e)?_0x4b2837[_0x3dfc6a(0xb1)][_0x3dfc6a(0x86)]():undefined,'cssUrl':typeof _0x4b2837[_0x3dfc6a(0xaf)]===_0x3dfc6a(0x8e)?_0x4b2837[_0x3dfc6a(0xaf)]['trim']():undefined};}
@@ -1 +1 @@
1
- (function(_0x5abed8,_0x413fb6){const _0x47a5e5=a120_0x5345,_0x4d56bf=_0x5abed8();while(!![]){try{const _0x6cf8fd=parseInt(_0x47a5e5(0x1e3))/0x1*(parseInt(_0x47a5e5(0x1c5))/0x2)+parseInt(_0x47a5e5(0x1c3))/0x3*(parseInt(_0x47a5e5(0x1f9))/0x4)+parseInt(_0x47a5e5(0x1d9))/0x5+-parseInt(_0x47a5e5(0x1fa))/0x6+parseInt(_0x47a5e5(0x1ce))/0x7*(parseInt(_0x47a5e5(0x1ea))/0x8)+-parseInt(_0x47a5e5(0x1f6))/0x9*(-parseInt(_0x47a5e5(0x1e7))/0xa)+parseInt(_0x47a5e5(0x1c0))/0xb*(-parseInt(_0x47a5e5(0x1ec))/0xc);if(_0x6cf8fd===_0x413fb6)break;else _0x4d56bf['push'](_0x4d56bf['shift']());}catch(_0x2b5089){_0x4d56bf['push'](_0x4d56bf['shift']());}}}(a120_0x5874,0x2dceb));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x10cd05){const _0x40ebc9=a120_0x5345,_0x1792a1=[];return _0x10cd05['jsUrl']&&!isValidJsHttpsUrl(_0x10cd05['jsUrl'])&&_0x1792a1[_0x40ebc9(0x1c1)]({'field':_0x40ebc9(0x1fc),'message':_0x40ebc9(0x1d7)}),_0x10cd05[_0x40ebc9(0x1e8)]&&!isValidCssHttpsUrl(_0x10cd05['cssUrl'])&&_0x1792a1[_0x40ebc9(0x1c1)]({'field':'cssUrl','message':_0x40ebc9(0x1fd)}),_0x1792a1;}export async function runMenuUpdateCore(_0x57fe02,_0x2afa49,_0x11121f,_0x1330b5={}){const _0x310b79=a120_0x5345,_0x2ffc39=parseUpdateParamsFlag(_0x11121f),_0x3609a7=normalizeMode(_0x1330b5[_0x310b79(0x1f1)]);validateSelection(_0x1330b5[_0x310b79(0x1c4)]);const _0x15e0e0=[];if(_0x2ffc39[_0x310b79(0x1fc)])_0x15e0e0['push'](_0x2ffc39['jsUrl']);if(_0x2ffc39['cssUrl'])_0x15e0e0[_0x310b79(0x1c1)](_0x2ffc39[_0x310b79(0x1e8)]);const _0x4ed667=validateParams(_0x2ffc39);if(_0x4ed667[_0x310b79(0x1fe)]>0x0){const _0x63ecc7=_0x4ed667[_0x310b79(0x1bf)](_0x30ad0c=>_0x310b79(0x1fb)+_0x30ad0c[_0x310b79(0x1f3)]+':\x20'+_0x30ad0c['message'])[_0x310b79(0x1c6)](';\x20');throw new Error(_0x310b79(0x1c8)+_0x63ecc7);}if(_0x15e0e0['length']===0x0)throw new Error(_0x310b79(0x1e6)+_0x310b79(0x1e0));logger[_0x310b79(0x1ed)](process['cwd']()),logger[_0x310b79(0x1bd)](_0x310b79(0x1dd),_0x310b79(0x1d4),{'appCode':_0x57fe02,'jsUrl':_0x2ffc39[_0x310b79(0x1fc)],'cssUrl':_0x2ffc39[_0x310b79(0x1e8)],'mode':_0x3609a7,'dryRun':_0x1330b5['dryRun']===!![]});if(_0x2ffc39[_0x310b79(0x1fc)]){const _0x58c2c3=await isUrlReachable(_0x2ffc39[_0x310b79(0x1fc)]);if(!_0x58c2c3)throw new Error(_0x310b79(0x1cb)+_0x2ffc39['jsUrl']);}if(_0x2ffc39[_0x310b79(0x1e8)]){const _0x3023f6=await isUrlReachable(_0x2ffc39[_0x310b79(0x1e8)]);if(!_0x3023f6)throw new Error(_0x310b79(0x1e1)+_0x2ffc39[_0x310b79(0x1e8)]);}const _0xb485ff=await getOnlineMenuList(_0x57fe02,_0x2afa49),_0x2c04f1=_0xb485ff[_0x310b79(0x1de)](_0x3a780d=>_0x3a780d[_0x310b79(0x1e4)]['length']>0x0),_0x1409a3=selectMenusForUpdate(_0x2c04f1,_0x1330b5[_0x310b79(0x1c4)]);if(_0x1409a3[_0x310b79(0x1fe)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1330b5[_0x310b79(0x1c2)]===!![]};const _0x43075d=_0x1409a3['map'](_0x36df24=>buildMenuUpdateDiff(_0x36df24,_0x2ffc39,_0x3609a7,_0x1330b5['force']===!![],_0x1330b5[_0x310b79(0x1da)]));if(_0x1330b5['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x43075d};const _0x218a87=await Promise[_0x310b79(0x1e9)](_0x1409a3['map']((_0x4f7958,_0xca7c55)=>updateMenuCdnUrl(_0x57fe02,_0x2afa49,{'id':_0x4f7958['id'],'label':_0x4f7958[_0x310b79(0x1d2)],'path':_0x4f7958['path'],'resources':_0x43075d[_0xca7c55][_0x310b79(0x1f2)][_0x310b79(0x1e4)],'extend':_0x4f7958[_0x310b79(0x1be)]??null,'loadScriptMode':_0x1330b5['loadScriptMode']}))),_0x4bc78c=_0x218a87[_0x310b79(0x1de)](_0x491c88=>_0x491c88[_0x310b79(0x1bc)]===_0x310b79(0x1f0))[_0x310b79(0x1bf)](_0x1868b7=>_0x1868b7['value']),_0x39a7bb=_0x218a87[_0x310b79(0x1de)](_0x5e0aea=>_0x5e0aea[_0x310b79(0x1bc)]==='rejected')['length'];return logger['info'](_0x310b79(0x1dd),_0x310b79(0x1df),{'count':_0x1409a3['length'],'resources':_0x15e0e0}),{'updated':_0x4bc78c[_0x310b79(0x1fe)],'failed':_0x39a7bb,'skipped':![],'menus':_0x4bc78c};}function validateSelection(_0x5b34e1){const _0x560543=a120_0x5345;if(!_0x5b34e1)throw new Error('menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x5b34e1[_0x560543(0x1d8)]&&(_0x5b34e1['menuIds'][_0x560543(0x1fe)]>0x0||_0x5b34e1[_0x560543(0x1ee)][_0x560543(0x1fe)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x5b34e1[_0x560543(0x1d8)]&&_0x5b34e1[_0x560543(0x1f7)]['length']===0x0&&_0x5b34e1[_0x560543(0x1ee)]['length']===0x0)throw new Error(_0x560543(0x1d3));}export function selectMenusForUpdate(_0x4a7410,_0x2d981e){const _0x412abb=a120_0x5345;validateSelection(_0x2d981e);if(_0x2d981e[_0x412abb(0x1d8)])return _0x4a7410;const _0x1bc777=new Set(_0x4a7410[_0x412abb(0x1bf)](_0x454792=>_0x454792['id'])),_0x161c71=new Set(_0x4a7410[_0x412abb(0x1bf)](_0x506b96=>_0x506b96['path'])),_0x5b2e8d=_0x2d981e[_0x412abb(0x1f7)][_0x412abb(0x1de)](_0x18cb60=>!_0x1bc777[_0x412abb(0x1dc)](_0x18cb60)),_0x1402ad=_0x2d981e['paths'][_0x412abb(0x1de)](_0x46c08f=>!_0x161c71[_0x412abb(0x1dc)](_0x46c08f));if(_0x5b2e8d[_0x412abb(0x1fe)]>0x0||_0x1402ad['length']>0x0){const _0x33b610=[..._0x5b2e8d[_0x412abb(0x1bf)](_0x1e4ba5=>String(_0x1e4ba5)),..._0x1402ad][_0x412abb(0x1c6)](',\x20');throw new Error(_0x412abb(0x1e5)+_0x33b610);}const _0x3d51d2=new Set(_0x2d981e[_0x412abb(0x1f7)]),_0x209eec=new Set(_0x2d981e[_0x412abb(0x1ee)]);return _0x4a7410[_0x412abb(0x1de)](_0x4fde1b=>_0x3d51d2[_0x412abb(0x1dc)](_0x4fde1b['id'])||_0x209eec[_0x412abb(0x1dc)](_0x4fde1b[_0x412abb(0x1ef)]));}function normalizeMode(_0x1733bd){const _0x5e48ed=a120_0x5345;if(!_0x1733bd)return'patch';if(_0x1733bd==='replace'||_0x1733bd==='patch')return _0x1733bd;throw new Error(_0x5e48ed(0x1c7)+_0x1733bd+_0x5e48ed(0x1e2));}function a120_0x5874(){const _0x30c2da=['Menu\x20update\x20completed','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','CSS\x20URL\x20is\x20unreachable:\x20','.\x20Allowed\x20values:\x20replace,\x20patch','477tSTmET','resources','menu\x20update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','290JljOjP','cssUrl','allSettled','96OOJehg','isArray','156EcLRWw','setLogPath','paths','path','fulfilled','mode','after','field','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.','28449WdTFhS','menuIds','toLowerCase','64748ckSCCR','2165310jxXEWJ','--params.','jsUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','length','some','endsWith','.css','menu\x20update\x20cannot\x20patch\x20','status','info','extend','map','400004OFJNhK','push','dryRun','39tFGjbw','selection','236SdlGKl','join','Invalid\x20--mode:\x20','Invalid\x20--params:\x20','string','trim','JS\x20URL\x20is\x20unreachable:\x20','\x20existing\x20CSS\x20resources\x20for\x20\x22','\x22\x20(','203175aElJph','parse','unshift','.js','label','menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','Start\x20non-interactive\x20menu\x20update','patch','object','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','all','1572790hDxHNJ','loadScriptMode','\x20existing\x20JS\x20resources\x20for\x20\x22','has','menu-update','filter'];a120_0x5874=function(){return _0x30c2da;};return a120_0x5874();}function buildMenuUpdateDiff(_0x444c77,_0x38d7d6,_0x22decb,_0x46702d,_0x366940){const _0x4a311f=a120_0x5345,_0xea77d5=[..._0x444c77['resources']];_0x22decb===_0x4a311f(0x1d5)&&assertUnambiguousPatchResources(_0x444c77,_0xea77d5,_0x38d7d6);const _0x5a7ff0=_0x22decb===_0x4a311f(0x1d5)?patchResources(_0xea77d5,_0x38d7d6):replaceResources(_0x38d7d6),_0x55d405=[],_0x690f33=_0xea77d5[_0x4a311f(0x1ff)](isJsResource),_0x4ef8e7=_0x5a7ff0[_0x4a311f(0x1ff)](isJsResource);if(_0x690f33&&!_0x4ef8e7){const _0x3633ce='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x444c77[_0x4a311f(0x1d2)]+_0x4a311f(0x1cd)+_0x444c77['path']+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x46702d)throw new Error(_0x3633ce);_0x55d405[_0x4a311f(0x1c1)](_0x3633ce);}const _0x2c0cff=_0xea77d5['some'](isCssResource),_0x1ef93c=_0x5a7ff0[_0x4a311f(0x1ff)](isCssResource);_0x2c0cff&&!_0x1ef93c&&_0x55d405[_0x4a311f(0x1c1)]('menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x444c77[_0x4a311f(0x1d2)]+_0x4a311f(0x1cd)+_0x444c77[_0x4a311f(0x1ef)]+').');const _0x590008=typeof _0x444c77[_0x4a311f(0x1be)]?.[_0x4a311f(0x1da)]===_0x4a311f(0x1c9)?_0x444c77['extend']['loadScriptMode']:null,_0x3d62ca=_0x366940?{'loadScriptMode':_0x590008}:{},_0x4bf561=_0x366940?{'loadScriptMode':_0x366940}:{};return{'id':_0x444c77['id'],'label':_0x444c77[_0x4a311f(0x1d2)],'path':_0x444c77['path'],'mode':_0x22decb,'before':{'resources':_0xea77d5,..._0x3d62ca},'after':{'resources':_0x5a7ff0,..._0x4bf561},'warnings':_0x55d405};}function replaceResources(_0x29da6f){const _0x113be9=a120_0x5345;return[_0x29da6f[_0x113be9(0x1fc)],_0x29da6f[_0x113be9(0x1e8)]][_0x113be9(0x1de)](_0xe1775b=>!!_0xe1775b);}function assertUnambiguousPatchResources(_0x2c6c47,_0x270b02,_0x2313eb){const _0x1a2aa1=a120_0x5345,_0x13f547=_0x270b02[_0x1a2aa1(0x1de)](isJsResource)['length'];if(_0x2313eb[_0x1a2aa1(0x1fc)]&&_0x13f547>0x1)throw new Error(_0x1a2aa1(0x1bb)+_0x13f547+_0x1a2aa1(0x1db)+_0x2c6c47[_0x1a2aa1(0x1d2)]+_0x1a2aa1(0x1cd)+_0x2c6c47[_0x1a2aa1(0x1ef)]+')\x20'+_0x1a2aa1(0x1f5));const _0x282456=_0x270b02[_0x1a2aa1(0x1de)](isCssResource)['length'];if(_0x2313eb[_0x1a2aa1(0x1e8)]&&_0x282456>0x1)throw new Error(_0x1a2aa1(0x1bb)+_0x282456+_0x1a2aa1(0x1cc)+_0x2c6c47['label']+'\x22\x20('+_0x2c6c47[_0x1a2aa1(0x1ef)]+')\x20'+_0x1a2aa1(0x1f4));}function patchResources(_0x4114fc,_0x53cc47){const _0x5157b6=a120_0x5345;let _0x7cbc16=![],_0x2c0568=![];const _0x289060=[];for(const _0x2308f6 of _0x4114fc){if(isJsResource(_0x2308f6)){if(_0x53cc47[_0x5157b6(0x1fc)]&&!_0x7cbc16)_0x289060[_0x5157b6(0x1c1)](_0x53cc47[_0x5157b6(0x1fc)]),_0x7cbc16=!![];else!_0x53cc47[_0x5157b6(0x1fc)]&&_0x289060['push'](_0x2308f6);continue;}if(isCssResource(_0x2308f6)){if(_0x53cc47['cssUrl']&&!_0x2c0568)_0x289060[_0x5157b6(0x1c1)](_0x53cc47[_0x5157b6(0x1e8)]),_0x2c0568=!![];else!_0x53cc47['cssUrl']&&_0x289060[_0x5157b6(0x1c1)](_0x2308f6);continue;}_0x289060[_0x5157b6(0x1c1)](_0x2308f6);}return _0x53cc47['jsUrl']&&!_0x7cbc16&&_0x289060[_0x5157b6(0x1d0)](_0x53cc47[_0x5157b6(0x1fc)]),_0x53cc47[_0x5157b6(0x1e8)]&&!_0x2c0568&&_0x289060[_0x5157b6(0x1c1)](_0x53cc47[_0x5157b6(0x1e8)]),_0x289060;}function a120_0x5345(_0x590230,_0x3f7df1){_0x590230=_0x590230-0x1ba;const _0x58746a=a120_0x5874();let _0x534559=_0x58746a[_0x590230];return _0x534559;}function isJsResource(_0x5b8830){const _0x584b33=a120_0x5345;return stripQuery(_0x5b8830)[_0x584b33(0x1f8)]()[_0x584b33(0x200)](_0x584b33(0x1d1));}function isCssResource(_0x487b20){const _0x1b4a99=a120_0x5345;return stripQuery(_0x487b20)[_0x1b4a99(0x1f8)]()[_0x1b4a99(0x200)](_0x1b4a99(0x1ba));}function stripQuery(_0x461dd2){return _0x461dd2['split']('?')[0x0]??_0x461dd2;}function parseUpdateParamsFlag(_0x2d35d3){const _0x5b83bb=a120_0x5345;if(!_0x2d35d3||typeof _0x2d35d3!==_0x5b83bb(0x1c9))return{};try{const _0x504033=JSON[_0x5b83bb(0x1cf)](_0x2d35d3);if(typeof _0x504033!==_0x5b83bb(0x1d6)||_0x504033===null||Array[_0x5b83bb(0x1eb)](_0x504033))return{};return{'jsUrl':typeof _0x504033['jsUrl']===_0x5b83bb(0x1c9)?_0x504033[_0x5b83bb(0x1fc)][_0x5b83bb(0x1ca)]():undefined,'cssUrl':typeof _0x504033[_0x5b83bb(0x1e8)]===_0x5b83bb(0x1c9)?_0x504033['cssUrl'][_0x5b83bb(0x1ca)]():undefined};}catch{return{};}}
1
+ (function(_0x39f531,_0x233d5b){const _0x15b5b3=a120_0x3afc,_0x267433=_0x39f531();while(!![]){try{const _0x59d918=-parseInt(_0x15b5b3(0x1f6))/0x1*(parseInt(_0x15b5b3(0x1d2))/0x2)+-parseInt(_0x15b5b3(0x1dc))/0x3+-parseInt(_0x15b5b3(0x1c0))/0x4+-parseInt(_0x15b5b3(0x1f2))/0x5+parseInt(_0x15b5b3(0x1e0))/0x6+parseInt(_0x15b5b3(0x1b2))/0x7*(-parseInt(_0x15b5b3(0x1da))/0x8)+-parseInt(_0x15b5b3(0x1c8))/0x9*(-parseInt(_0x15b5b3(0x1f0))/0xa);if(_0x59d918===_0x233d5b)break;else _0x267433['push'](_0x267433['shift']());}catch(_0x69a7a0){_0x267433['push'](_0x267433['shift']());}}}(a120_0x2c4e,0x66543));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a120_0x3afc(_0x2d81b8,_0x2015d0){_0x2d81b8=_0x2d81b8-0x1b1;const _0x2c4e93=a120_0x2c4e();let _0x3afc80=_0x2c4e93[_0x2d81b8];return _0x3afc80;}import{logger}from'../../../utils/logger.js';function validateParams(_0x1fc82b){const _0x41670c=a120_0x3afc,_0xdca9f9=[];return _0x1fc82b[_0x41670c(0x1bd)]&&!isValidJsHttpsUrl(_0x1fc82b['jsUrl'])&&_0xdca9f9[_0x41670c(0x1b9)]({'field':_0x41670c(0x1bd),'message':_0x41670c(0x1e2)}),_0x1fc82b[_0x41670c(0x1b3)]&&!isValidCssHttpsUrl(_0x1fc82b[_0x41670c(0x1b3)])&&_0xdca9f9[_0x41670c(0x1b9)]({'field':'cssUrl','message':_0x41670c(0x1ec)}),_0xdca9f9;}export async function runMenuUpdateCore(_0x3aa768,_0x295051,_0x487901,_0x4c3cb2={}){const _0x5fb553=a120_0x3afc,_0x1d678f=parseUpdateParamsFlag(_0x487901),_0x270747=normalizeMode(_0x4c3cb2[_0x5fb553(0x1eb)]);validateSelection(_0x4c3cb2[_0x5fb553(0x1b8)]);const _0x2c645b=[];if(_0x1d678f[_0x5fb553(0x1bd)])_0x2c645b['push'](_0x1d678f[_0x5fb553(0x1bd)]);if(_0x1d678f[_0x5fb553(0x1b3)])_0x2c645b[_0x5fb553(0x1b9)](_0x1d678f['cssUrl']);const _0xa0024=validateParams(_0x1d678f);if(_0xa0024[_0x5fb553(0x1c6)]>0x0){const _0x2fef37=_0xa0024[_0x5fb553(0x1db)](_0x24c34a=>_0x5fb553(0x1f3)+_0x24c34a[_0x5fb553(0x1d9)]+':\x20'+_0x24c34a[_0x5fb553(0x1c5)])[_0x5fb553(0x1ce)](';\x20');throw new Error(_0x5fb553(0x1df)+_0x2fef37);}if(_0x2c645b[_0x5fb553(0x1c6)]===0x0)throw new Error(_0x5fb553(0x1c4)+_0x5fb553(0x1d6));logger[_0x5fb553(0x1e9)](process[_0x5fb553(0x1bb)]()),logger[_0x5fb553(0x1f1)](_0x5fb553(0x1ba),'Start\x20non-interactive\x20menu\x20update',{'appCode':_0x3aa768,'jsUrl':_0x1d678f['jsUrl'],'cssUrl':_0x1d678f['cssUrl'],'mode':_0x270747,'dryRun':_0x4c3cb2[_0x5fb553(0x1e7)]===!![]});if(_0x1d678f[_0x5fb553(0x1bd)]){const _0x3965c9=await isUrlReachable(_0x1d678f[_0x5fb553(0x1bd)]);if(!_0x3965c9)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x1d678f['jsUrl']);}if(_0x1d678f[_0x5fb553(0x1b3)]){const _0x10c5a3=await isUrlReachable(_0x1d678f[_0x5fb553(0x1b3)]);if(!_0x10c5a3)throw new Error(_0x5fb553(0x1e1)+_0x1d678f[_0x5fb553(0x1b3)]);}const _0x3b8750=await getOnlineMenuList(_0x3aa768,_0x295051),_0x1c3b92=_0x3b8750[_0x5fb553(0x1ea)](_0x2445c2=>_0x2445c2[_0x5fb553(0x1cf)][_0x5fb553(0x1c6)]>0x0),_0xfb0f28=selectMenusForUpdate(_0x1c3b92,_0x4c3cb2[_0x5fb553(0x1b8)]);if(_0xfb0f28[_0x5fb553(0x1c6)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x4c3cb2['dryRun']===!![]};const _0x1e038c=_0xfb0f28[_0x5fb553(0x1db)](_0x4977a9=>buildMenuUpdateDiff(_0x4977a9,_0x1d678f,_0x270747,_0x4c3cb2[_0x5fb553(0x1e6)]===!![],_0x4c3cb2[_0x5fb553(0x1cc)]));if(_0x4c3cb2[_0x5fb553(0x1e7)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x1e038c};const _0x1f3fa5=await Promise['allSettled'](_0xfb0f28[_0x5fb553(0x1db)]((_0x10109f,_0x133fa3)=>updateMenuCdnUrl(_0x3aa768,_0x295051,{'id':_0x10109f['id'],'label':_0x10109f[_0x5fb553(0x1b4)],'path':_0x10109f['path'],'resources':_0x1e038c[_0x133fa3][_0x5fb553(0x1e4)]['resources'],'extend':_0x10109f[_0x5fb553(0x1d3)]??null,'loadScriptMode':_0x4c3cb2['loadScriptMode']}))),_0x489402=_0x1f3fa5[_0x5fb553(0x1ea)](_0x1d954a=>_0x1d954a['status']===_0x5fb553(0x1c7))['map'](_0xee3603=>_0xee3603['value']),_0x30244d=_0x1f3fa5[_0x5fb553(0x1ea)](_0xe39ad5=>_0xe39ad5[_0x5fb553(0x1f7)]===_0x5fb553(0x1ee))[_0x5fb553(0x1c6)];return logger[_0x5fb553(0x1f1)]('menu-update',_0x5fb553(0x1c9),{'count':_0xfb0f28['length'],'resources':_0x2c645b}),{'updated':_0x489402[_0x5fb553(0x1c6)],'failed':_0x30244d,'skipped':![],'menus':_0x489402};}function validateSelection(_0x74a6cd){const _0x259f5c=a120_0x3afc;if(!_0x74a6cd)throw new Error(_0x259f5c(0x1f8));if(_0x74a6cd[_0x259f5c(0x1d7)]&&(_0x74a6cd[_0x259f5c(0x1d4)][_0x259f5c(0x1c6)]>0x0||_0x74a6cd[_0x259f5c(0x1e3)][_0x259f5c(0x1c6)]>0x0))throw new Error(_0x259f5c(0x1b5));if(!_0x74a6cd[_0x259f5c(0x1d7)]&&_0x74a6cd[_0x259f5c(0x1d4)][_0x259f5c(0x1c6)]===0x0&&_0x74a6cd['paths']['length']===0x0)throw new Error(_0x259f5c(0x1f8));}export function selectMenusForUpdate(_0x5d20ff,_0x1ee1fa){const _0x3bce44=a120_0x3afc;validateSelection(_0x1ee1fa);if(_0x1ee1fa[_0x3bce44(0x1d7)])return _0x5d20ff;const _0x33aee5=new Set(_0x5d20ff[_0x3bce44(0x1db)](_0x252f3f=>_0x252f3f['id'])),_0x169f8a=new Set(_0x5d20ff[_0x3bce44(0x1db)](_0x493f26=>_0x493f26[_0x3bce44(0x1c3)])),_0x565e8a=_0x1ee1fa['menuIds']['filter'](_0x1a454d=>!_0x33aee5[_0x3bce44(0x1bc)](_0x1a454d)),_0x2aa549=_0x1ee1fa['paths'][_0x3bce44(0x1ea)](_0x572c34=>!_0x169f8a[_0x3bce44(0x1bc)](_0x572c34));if(_0x565e8a[_0x3bce44(0x1c6)]>0x0||_0x2aa549[_0x3bce44(0x1c6)]>0x0){const _0x1f9222=[..._0x565e8a[_0x3bce44(0x1db)](_0x16350b=>String(_0x16350b)),..._0x2aa549][_0x3bce44(0x1ce)](',\x20');throw new Error('menu\x20update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x1f9222);}const _0x2d2068=new Set(_0x1ee1fa['menuIds']),_0x602787=new Set(_0x1ee1fa[_0x3bce44(0x1e3)]);return _0x5d20ff[_0x3bce44(0x1ea)](_0x9fa852=>_0x2d2068[_0x3bce44(0x1bc)](_0x9fa852['id'])||_0x602787[_0x3bce44(0x1bc)](_0x9fa852[_0x3bce44(0x1c3)]));}function normalizeMode(_0x31d165){const _0x5d8281=a120_0x3afc;if(!_0x31d165)return _0x5d8281(0x1d5);if(_0x31d165===_0x5d8281(0x1de)||_0x31d165===_0x5d8281(0x1d5))return _0x31d165;throw new Error(_0x5d8281(0x1cb)+_0x31d165+_0x5d8281(0x1cd));}function buildMenuUpdateDiff(_0x285428,_0x2290e5,_0x2a9c62,_0x147a89,_0x5022bb){const _0x46783d=a120_0x3afc,_0x45def3=[..._0x285428['resources']];_0x2a9c62==='patch'&&assertUnambiguousPatchResources(_0x285428,_0x45def3,_0x2290e5);const _0x516b6e=_0x2a9c62===_0x46783d(0x1d5)?patchResources(_0x45def3,_0x2290e5):replaceResources(_0x2290e5),_0x210e82=[],_0x1427e5=_0x45def3[_0x46783d(0x1b1)](isJsResource),_0x31dacc=_0x516b6e[_0x46783d(0x1b1)](isJsResource);if(_0x1427e5&&!_0x31dacc){const _0x23df0a='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x285428[_0x46783d(0x1b4)]+_0x46783d(0x1e8)+_0x285428['path']+_0x46783d(0x1b7)+_0x46783d(0x1ed);if(!_0x147a89)throw new Error(_0x23df0a);_0x210e82['push'](_0x23df0a);}const _0x1694d2=_0x45def3['some'](isCssResource),_0x525b28=_0x516b6e[_0x46783d(0x1b1)](isCssResource);_0x1694d2&&!_0x525b28&&_0x210e82['push'](_0x46783d(0x1e5)+_0x285428['label']+_0x46783d(0x1e8)+_0x285428[_0x46783d(0x1c3)]+').');const _0x491438=typeof _0x285428[_0x46783d(0x1d3)]?.['loadScriptMode']===_0x46783d(0x1ca)?_0x285428[_0x46783d(0x1d3)][_0x46783d(0x1cc)]:null,_0x39295c=_0x5022bb?{'loadScriptMode':_0x491438}:{},_0x1131d2=_0x5022bb?{'loadScriptMode':_0x5022bb}:{};return{'id':_0x285428['id'],'label':_0x285428[_0x46783d(0x1b4)],'path':_0x285428[_0x46783d(0x1c3)],'mode':_0x2a9c62,'before':{'resources':_0x45def3,..._0x39295c},'after':{'resources':_0x516b6e,..._0x1131d2},'warnings':_0x210e82};}function a120_0x2c4e(){const _0x2a5401=['split','2021240HSmFOH','endsWith','trim','path','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','message','length','fulfilled','836127IPkCbo','Menu\x20update\x20completed','string','Invalid\x20--mode:\x20','loadScriptMode','.\x20Allowed\x20values:\x20replace,\x20patch','join','resources','menu\x20update\x20cannot\x20patch\x20','.js','2YNyFBB','extend','menuIds','patch','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','all','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','field','416NLzUCG','map','1335555RuqvKs','parse','replace','Invalid\x20--params:\x20','3364782CBzSIS','CSS\x20URL\x20is\x20unreachable:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','paths','after','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','force','dryRun','\x22\x20(','setLogPath','filter','mode','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','rejected','isArray','230zQPRqn','info','2459295uThbvb','--params.','\x20existing\x20CSS\x20resources\x20for\x20\x22','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','766549eMXVff','status','menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','some','9359OjnsCU','cssUrl','label','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.css',').\x20','selection','push','menu-update','cwd','has','jsUrl','toLowerCase'];a120_0x2c4e=function(){return _0x2a5401;};return a120_0x2c4e();}function replaceResources(_0x492efd){const _0x58b90b=a120_0x3afc;return[_0x492efd[_0x58b90b(0x1bd)],_0x492efd[_0x58b90b(0x1b3)]][_0x58b90b(0x1ea)](_0x4ade30=>!!_0x4ade30);}function assertUnambiguousPatchResources(_0x5b696a,_0x2a12aa,_0x327ea6){const _0x4051af=a120_0x3afc,_0x47b322=_0x2a12aa[_0x4051af(0x1ea)](isJsResource)[_0x4051af(0x1c6)];if(_0x327ea6['jsUrl']&&_0x47b322>0x1)throw new Error(_0x4051af(0x1d0)+_0x47b322+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x5b696a[_0x4051af(0x1b4)]+_0x4051af(0x1e8)+_0x5b696a[_0x4051af(0x1c3)]+')\x20'+_0x4051af(0x1f5));const _0xd1ae39=_0x2a12aa[_0x4051af(0x1ea)](isCssResource)[_0x4051af(0x1c6)];if(_0x327ea6[_0x4051af(0x1b3)]&&_0xd1ae39>0x1)throw new Error(_0x4051af(0x1d0)+_0xd1ae39+_0x4051af(0x1f4)+_0x5b696a['label']+_0x4051af(0x1e8)+_0x5b696a[_0x4051af(0x1c3)]+')\x20'+_0x4051af(0x1d8));}function patchResources(_0x7cc110,_0x2f6b09){const _0x47855f=a120_0x3afc;let _0xe76e3d=![],_0x51e760=![];const _0x68b1a5=[];for(const _0x3a5808 of _0x7cc110){if(isJsResource(_0x3a5808)){if(_0x2f6b09[_0x47855f(0x1bd)]&&!_0xe76e3d)_0x68b1a5[_0x47855f(0x1b9)](_0x2f6b09[_0x47855f(0x1bd)]),_0xe76e3d=!![];else!_0x2f6b09[_0x47855f(0x1bd)]&&_0x68b1a5[_0x47855f(0x1b9)](_0x3a5808);continue;}if(isCssResource(_0x3a5808)){if(_0x2f6b09[_0x47855f(0x1b3)]&&!_0x51e760)_0x68b1a5[_0x47855f(0x1b9)](_0x2f6b09[_0x47855f(0x1b3)]),_0x51e760=!![];else!_0x2f6b09[_0x47855f(0x1b3)]&&_0x68b1a5[_0x47855f(0x1b9)](_0x3a5808);continue;}_0x68b1a5[_0x47855f(0x1b9)](_0x3a5808);}return _0x2f6b09['jsUrl']&&!_0xe76e3d&&_0x68b1a5['unshift'](_0x2f6b09['jsUrl']),_0x2f6b09[_0x47855f(0x1b3)]&&!_0x51e760&&_0x68b1a5[_0x47855f(0x1b9)](_0x2f6b09[_0x47855f(0x1b3)]),_0x68b1a5;}function isJsResource(_0x1eb490){const _0x5dd8ae=a120_0x3afc;return stripQuery(_0x1eb490)['toLowerCase']()[_0x5dd8ae(0x1c1)](_0x5dd8ae(0x1d1));}function isCssResource(_0x1c726c){const _0x38670a=a120_0x3afc;return stripQuery(_0x1c726c)[_0x38670a(0x1be)]()['endsWith'](_0x38670a(0x1b6));}function stripQuery(_0x5c6ee2){const _0x4c9ae1=a120_0x3afc;return _0x5c6ee2[_0x4c9ae1(0x1bf)]('?')[0x0]??_0x5c6ee2;}function parseUpdateParamsFlag(_0x4c2ccb){const _0xc4adce=a120_0x3afc;if(!_0x4c2ccb||typeof _0x4c2ccb!==_0xc4adce(0x1ca))return{};try{const _0x3e8315=JSON[_0xc4adce(0x1dd)](_0x4c2ccb);if(typeof _0x3e8315!=='object'||_0x3e8315===null||Array[_0xc4adce(0x1ef)](_0x3e8315))return{};return{'jsUrl':typeof _0x3e8315[_0xc4adce(0x1bd)]==='string'?_0x3e8315[_0xc4adce(0x1bd)][_0xc4adce(0x1c2)]():undefined,'cssUrl':typeof _0x3e8315[_0xc4adce(0x1b3)]===_0xc4adce(0x1ca)?_0x3e8315[_0xc4adce(0x1b3)][_0xc4adce(0x1c2)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a121_0x3d51(_0x315405,_0x1b0e5a){_0x315405=_0x315405-0x143;const _0x2ec773=a121_0x2ec7();let _0x3d516f=_0x2ec773[_0x315405];return _0x3d516f;}(function(_0x523e9b,_0x289ea3){const _0x3cc758=a121_0x3d51,_0x1b23f9=_0x523e9b();while(!![]){try{const _0x437cab=-parseInt(_0x3cc758(0x14d))/0x1*(parseInt(_0x3cc758(0x14b))/0x2)+parseInt(_0x3cc758(0x144))/0x3+parseInt(_0x3cc758(0x146))/0x4*(-parseInt(_0x3cc758(0x148))/0x5)+-parseInt(_0x3cc758(0x145))/0x6*(-parseInt(_0x3cc758(0x14e))/0x7)+parseInt(_0x3cc758(0x147))/0x8+-parseInt(_0x3cc758(0x14a))/0x9+-parseInt(_0x3cc758(0x14f))/0xa*(-parseInt(_0x3cc758(0x143))/0xb);if(_0x437cab===_0x289ea3)break;else _0x1b23f9['push'](_0x1b23f9['shift']());}catch(_0x14b3e6){_0x1b23f9['push'](_0x1b23f9['shift']());}}}(a121_0x2ec7,0xb7a7f));function a121_0x2ec7(){const _0x412445=['99409OosqFr','189XFPbUm','10160UqcmnD','trim','19536FhJOnL','2332608OvgCEu','214422AmhJUG','12wejOxv','7586320zkkEYj','1950385nmrlOu','HEAD','13312404hvRICP','22srRhBA','test'];a121_0x2ec7=function(){return _0x412445;};return a121_0x2ec7();}export function isValidJsHttpsUrl(_0xc03167){const _0x5401f5=a121_0x3d51;return/^https:\/\/.+\.js(\?.*)?$/[_0x5401f5(0x14c)](_0xc03167[_0x5401f5(0x150)]());}export function isValidCssHttpsUrl(_0x39cd63){const _0x54b90d=a121_0x3d51;return/^https:\/\/.+\.css(\?.*)?$/[_0x54b90d(0x14c)](_0x39cd63[_0x54b90d(0x150)]());}export async function isUrlReachable(_0x370fab){const _0x339160=a121_0x3d51;try{const _0x98e7dc=await fetch(_0x370fab,{'method':_0x339160(0x149)});return _0x98e7dc['ok'];}catch{return![];}}
1
+ (function(_0x502068,_0x20293f){const _0x5b5799=a121_0x45e6,_0x5c7cba=_0x502068();while(!![]){try{const _0x3b75ad=parseInt(_0x5b5799(0x1cf))/0x1*(-parseInt(_0x5b5799(0x1cb))/0x2)+-parseInt(_0x5b5799(0x1c8))/0x3+-parseInt(_0x5b5799(0x1c9))/0x4+parseInt(_0x5b5799(0x1ca))/0x5+-parseInt(_0x5b5799(0x1c7))/0x6*(-parseInt(_0x5b5799(0x1d1))/0x7)+parseInt(_0x5b5799(0x1c5))/0x8+-parseInt(_0x5b5799(0x1cd))/0x9*(-parseInt(_0x5b5799(0x1d0))/0xa);if(_0x3b75ad===_0x20293f)break;else _0x5c7cba['push'](_0x5c7cba['shift']());}catch(_0x2b267e){_0x5c7cba['push'](_0x5c7cba['shift']());}}}(a121_0x805d,0x20e9b));function a121_0x45e6(_0x1a8d06,_0x6fc14d){_0x1a8d06=_0x1a8d06-0x1c5;const _0x805dab=a121_0x805d();let _0x45e696=_0x805dab[_0x1a8d06];return _0x45e696;}function a121_0x805d(){const _0x423cb9=['1qZzzeZ','5710jKTUDd','1777244mUnkYP','847584ZVfrUa','trim','6GCXXPE','168873FEhSsd','598748NMZnXm','112250bgkkPU','126398vBMasn','HEAD','342oJhkVw','test'];a121_0x805d=function(){return _0x423cb9;};return a121_0x805d();}export function isValidJsHttpsUrl(_0x3ca0df){const _0x331859=a121_0x45e6;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x3ca0df[_0x331859(0x1c6)]());}export function isValidCssHttpsUrl(_0x1ae4c4){const _0x837955=a121_0x45e6;return/^https:\/\/.+\.css(\?.*)?$/[_0x837955(0x1ce)](_0x1ae4c4[_0x837955(0x1c6)]());}export async function isUrlReachable(_0x2c33f5){const _0x2fcd4b=a121_0x45e6;try{const _0x5edad1=await fetch(_0x2c33f5,{'method':_0x2fcd4b(0x1cc)});return _0x5edad1['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- function a122_0x1623(_0x52d944,_0xca4d5b){_0x52d944=_0x52d944-0x17b;const _0x1e241d=a122_0x1e24();let _0x1623b8=_0x1e241d[_0x52d944];return _0x1623b8;}const a122_0x4c58f6=a122_0x1623;(function(_0x399a74,_0x2d1988){const _0xc107b9=a122_0x1623,_0x442ca9=_0x399a74();while(!![]){try{const _0xa275eb=parseInt(_0xc107b9(0x196))/0x1+parseInt(_0xc107b9(0x1b0))/0x2+-parseInt(_0xc107b9(0x194))/0x3*(-parseInt(_0xc107b9(0x17e))/0x4)+-parseInt(_0xc107b9(0x1bc))/0x5*(-parseInt(_0xc107b9(0x1c4))/0x6)+parseInt(_0xc107b9(0x1a2))/0x7*(parseInt(_0xc107b9(0x1af))/0x8)+-parseInt(_0xc107b9(0x1b2))/0x9+-parseInt(_0xc107b9(0x1bf))/0xa;if(_0xa275eb===_0x2d1988)break;else _0x442ca9['push'](_0x442ca9['shift']());}catch(_0x99fd02){_0x442ca9['push'](_0x442ca9['shift']());}}}(a122_0x1e24,0x80a1f));import a122_0x22b34a from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a122_0x1e24(){const _0x1f2c0b=['menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','\x20menu(s)\x20with\x20JS:\x20','\x20page(s)','\x20menu(s)...','Menu\x20creation\x20failed','2427315lMFMzC','\x20failed.','Menu\x20sync\x20skipped','22130710aQEWXb','filter','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Would\x20create\x20','split','12aenxpV','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Menu\x20sync\x20completed:\x20','\x20created.','str','454640KKKCXC','\x20local\x20microfrontend\x20menu(s).','skipped','gray','onlineMenuList','params','yellow','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','write','paths','targetPages','validation','message','/smartapi/menu/create','cssUrl','created','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','yes','\x20menu(s)','sync','flag','9ZiFzkv','\x20and\x20CSS:\x20','940473XmhTwU','boolean','Fetching\x20online\x20menu\x20list...','\x20\x20Create\x20','cookie','\x20\x20Continue\x20with\x20creation?','appcode','\x20created,\x20','Created\x20','string','localPages','\x20\x20Cancelled.','25620wtkHgA','map','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','jsUrl','selectedAppName','trim','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','POST','\x20menu(s)\x20created','✓\x20Menu\x20sync\x20completed:\x20','Pre-fill\x20JS/CSS\x20URLs.\x20','Creating\x20','\x20\x20✓\x20Selected:\x20','792FWOjZZ','1341274xCvxzH','appCode','4908654yEyiET','length','failed','size','rawFlags'];a122_0x1e24=function(){return _0x1f2c0b;};return a122_0x1e24();}export const menuSync={'service':'menu','command':a122_0x4c58f6(0x192),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a122_0x4c58f6(0x186),'flags':[{'name':'params','type':a122_0x4c58f6(0x19f),'description':a122_0x4c58f6(0x1ac)+a122_0x4c58f6(0x185)},{'name':a122_0x4c58f6(0x187),'type':'string','description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':a122_0x4c58f6(0x190),'type':a122_0x4c58f6(0x197),'description':a122_0x4c58f6(0x1c1)}],async 'dryRun'(_0x4ef9ab){const _0x26ae2e=a122_0x4c58f6;ensureRunnableContext(_0x4ef9ab[_0x26ae2e(0x1b6)],_0x4ef9ab['selectedAppName']);const _0x534fff=await runMenuSyncCore(_0x4ef9ab[_0x26ae2e(0x1b1)],_0x4ef9ab['cookie'],parsePaths(_0x4ef9ab[_0x26ae2e(0x17d)](_0x26ae2e(0x187))),_0x4ef9ab['str'](_0x26ae2e(0x183)),{'dryRun':!![]});return{'method':_0x26ae2e(0x1a9),'url':_0x26ae2e(0x18b),'body':_0x534fff,'description':_0x534fff['skipped']?_0x26ae2e(0x1a8):_0x26ae2e(0x1c2)+_0x534fff[_0x26ae2e(0x188)]['length']+_0x26ae2e(0x17f)};},async 'execute'(_0xb2e730){const _0x9ac003=a122_0x4c58f6;ensureRunnableContext(_0xb2e730[_0x9ac003(0x1b6)],_0xb2e730[_0x9ac003(0x1a6)]);const _0x5d91c0=_0xb2e730[_0x9ac003(0x193)]('yes'),_0x3cb0c2=_0xb2e730[_0x9ac003(0x17d)](_0x9ac003(0x183)),_0x8b84b6=parsePaths(_0xb2e730['str'](_0x9ac003(0x187))),_0x431571=parseMenuSyncParams(_0x3cb0c2);if(_0x5d91c0){const _0x531379=await runMenuSyncCore(_0xb2e730[_0x9ac003(0x1b1)],_0xb2e730[_0x9ac003(0x19a)],_0x8b84b6,_0x3cb0c2);if(_0x531379[_0x9ac003(0x180)]){const _0x174c07=getLocalPages();_0x174c07[_0x9ac003(0x1b3)]===0x0?writeCliSideChannelLine(_0x9ac003(0x1c5)):writeCliSideChannelLine(_0x9ac003(0x18e));}else writeCliSideChannelLine(_0x9ac003(0x1ab)+_0x531379['created']+_0x9ac003(0x1aa));return{'ok':!![],'data':_0x531379,'message':_0x531379[_0x9ac003(0x180)]?_0x9ac003(0x1be):_0x9ac003(0x17b)+_0x531379[_0x9ac003(0x18d)]+_0x9ac003(0x17c)};}if(_0x8b84b6[_0x9ac003(0x1b3)]>0x0)throw CliErrors['validation'](_0x9ac003(0x1b7),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x3cb0c2)throw CliErrors[_0x9ac003(0x189)](_0x9ac003(0x1a4),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');requireInteractive();const _0x12bceb=startSpinner(_0x9ac003(0x198));let _0x3d8bf7,_0x39dedf,_0x5c23ae;try{const _0x48716c=await fetchMenuData(_0xb2e730[_0x9ac003(0x1b1)],_0xb2e730[_0x9ac003(0x19a)]);_0x3d8bf7=_0x48716c[_0x9ac003(0x1a0)],_0x39dedf=_0x48716c['onlinePaths'],_0x5c23ae=_0x48716c[_0x9ac003(0x182)],stopSpinner(_0x12bceb,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x529091){stopSpinner(_0x12bceb,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x9ac003(0x189)](_0x529091 instanceof Error?_0x529091[_0x9ac003(0x18a)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}if(_0x3d8bf7[_0x9ac003(0x1b3)]===0x0)return writeCliSideChannelLine(a122_0x22b34a[_0x9ac003(0x184)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x367fac=buildCompareRows(_0x3d8bf7,_0x39dedf);writeCliSideChannelLine(renderCompareTable(_0x367fac)),writeCliSideChannelLine('');const _0x962aa3=await selectPages(_0x3d8bf7,_0x39dedf);writeCliSideChannelLine(''),writeCliSideChannelLine(a122_0x22b34a['cyan'](_0x9ac003(0x1ae)+_0x962aa3[_0x9ac003(0x1b3)]+_0x9ac003(0x1b9)));const _0x4c17d8=_0x431571[_0x9ac003(0x1a5)]&&_0x431571[_0x9ac003(0x18c)];if(!_0x4c17d8){writeCliSideChannelLine(renderSyncSummary(_0x962aa3,_0x39dedf[_0x9ac003(0x1b5)]>0x0));const _0x300592=await askConfirm(_0x9ac003(0x19b));if(!_0x300592)return writeCliSideChannelLine(a122_0x22b34a[_0x9ac003(0x181)](_0x9ac003(0x1a1))),{'ok':!![]};}let _0x553b1c=_0x431571[_0x9ac003(0x1a5)],_0x516c5c=_0x431571[_0x9ac003(0x18c)];!_0x553b1c&&(_0x553b1c=await askJsUrl());!_0x516c5c&&(_0x516c5c=await askCssUrl());const _0x5f4035=await askConfirm(_0x9ac003(0x199)+_0x962aa3[_0x9ac003(0x1b3)]+_0x9ac003(0x1b8)+_0x553b1c+_0x9ac003(0x195)+_0x516c5c+'?');if(!_0x5f4035)return writeCliSideChannelLine(a122_0x22b34a[_0x9ac003(0x181)](_0x9ac003(0x1a1))),{'ok':!![]};const _0x5a4c82=[_0x553b1c,_0x516c5c],_0x4ae19f=startSpinner(_0x9ac003(0x1ad)+_0x962aa3[_0x9ac003(0x1b3)]+_0x9ac003(0x1ba));try{const _0x356486=await doCreateMenus(_0xb2e730[_0x9ac003(0x1b1)],_0xb2e730[_0x9ac003(0x19a)],_0x962aa3,_0x5a4c82);return stopSpinner(_0x4ae19f,_0x9ac003(0x19e)+_0x356486['created']+_0x9ac003(0x191),!![]),{'ok':!![],'data':_0x356486,'message':'Menu\x20sync\x20completed:\x20'+_0x356486[_0x9ac003(0x18d)]+_0x9ac003(0x19d)+_0x356486[_0x9ac003(0x1b4)]+_0x9ac003(0x1bd)};}catch(_0x17e2fe){stopSpinner(_0x4ae19f,_0x9ac003(0x1bb),![]);throw CliErrors[_0x9ac003(0x189)](_0x17e2fe instanceof Error?_0x17e2fe[_0x9ac003(0x18a)]:_0x9ac003(0x1bb));}}};function ensureRunnableContext(_0x488566,_0x3c78ef){const _0x3e9a6f=a122_0x4c58f6,_0x288696=_0x488566[_0x3e9a6f(0x19c)]?String(_0x488566['appcode'])[_0x3e9a6f(0x1a7)]():'';if(!isInProject()&&!_0x3c78ef&&!_0x288696)throw CliErrors[_0x3e9a6f(0x189)](_0x3e9a6f(0x18f)+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x3ede9d){const _0x3c3ec2=a122_0x4c58f6;return[...new Set(_0x3ede9d[_0x3c3ec2(0x1c3)](',')[_0x3c3ec2(0x1a3)](_0x4fb0d3=>_0x4fb0d3['trim']())[_0x3c3ec2(0x1c0)](Boolean))];}
1
+ const a122_0x2023d7=a122_0x108a;(function(_0x1ee893,_0x521c26){const _0x4fa94b=a122_0x108a,_0x12b2a1=_0x1ee893();while(!![]){try{const _0x1bccdf=-parseInt(_0x4fa94b(0xdd))/0x1*(parseInt(_0x4fa94b(0xfb))/0x2)+-parseInt(_0x4fa94b(0xfe))/0x3+parseInt(_0x4fa94b(0xee))/0x4+-parseInt(_0x4fa94b(0x10c))/0x5*(parseInt(_0x4fa94b(0x115))/0x6)+parseInt(_0x4fa94b(0x118))/0x7*(parseInt(_0x4fa94b(0x11d))/0x8)+-parseInt(_0x4fa94b(0x10b))/0x9*(-parseInt(_0x4fa94b(0x116))/0xa)+parseInt(_0x4fa94b(0xe6))/0xb*(-parseInt(_0x4fa94b(0x101))/0xc);if(_0x1bccdf===_0x521c26)break;else _0x12b2a1['push'](_0x12b2a1['shift']());}catch(_0x1c73c7){_0x12b2a1['push'](_0x12b2a1['shift']());}}}(a122_0x36ae,0x5e4df));import a122_0xbe3f2f from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{parseMenuSyncParams,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';function a122_0x108a(_0x5cac50,_0x48fdf1){_0x5cac50=_0x5cac50-0xdd;const _0x36aeba=a122_0x36ae();let _0x108ac9=_0x36aeba[_0x5cac50];return _0x108ac9;}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':a122_0x2023d7(0x119),'command':a122_0x2023d7(0xfd),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a122_0x2023d7(0xe3),'type':a122_0x2023d7(0x100),'description':a122_0x2023d7(0x120)+a122_0x2023d7(0x11a)},{'name':'paths','type':a122_0x2023d7(0x100),'description':a122_0x2023d7(0x126)},{'name':a122_0x2023d7(0xef),'type':a122_0x2023d7(0x129),'description':a122_0x2023d7(0xfc)}],async 'dryRun'(_0x14ecaf){const _0x28692c=a122_0x2023d7;ensureRunnableContext(_0x14ecaf['rawFlags'],_0x14ecaf[_0x28692c(0xf7)]);const _0x35ef37=await runMenuSyncCore(_0x14ecaf[_0x28692c(0xed)],_0x14ecaf[_0x28692c(0xe4)],parsePaths(_0x14ecaf['str'](_0x28692c(0xf1))),_0x14ecaf[_0x28692c(0xde)](_0x28692c(0xe3)),{'dryRun':!![]});return{'method':_0x28692c(0xe5),'url':_0x28692c(0x112),'body':_0x35ef37,'description':_0x35ef37['skipped']?_0x28692c(0x106):_0x28692c(0xec)+_0x35ef37[_0x28692c(0xf2)][_0x28692c(0xea)]+_0x28692c(0x11e)};},async 'execute'(_0x5e7d61){const _0x552145=a122_0x2023d7;ensureRunnableContext(_0x5e7d61[_0x552145(0x122)],_0x5e7d61[_0x552145(0xf7)]);const _0x25ed5b=_0x5e7d61[_0x552145(0x128)]('yes'),_0x591dac=_0x5e7d61[_0x552145(0xde)](_0x552145(0xe3)),_0x2f17d7=parsePaths(_0x5e7d61[_0x552145(0xde)](_0x552145(0xf1))),_0x40d1d2=parseMenuSyncParams(_0x591dac);if(_0x25ed5b){const _0x251784=await runMenuSyncCore(_0x5e7d61[_0x552145(0xed)],_0x5e7d61['cookie'],_0x2f17d7,_0x591dac);if(_0x251784['skipped']){const _0x5735b6=getLocalPages();_0x5735b6['length']===0x0?writeCliSideChannelLine(_0x552145(0xe8)):writeCliSideChannelLine(_0x552145(0x123));}else writeCliSideChannelLine(_0x552145(0xe2)+_0x251784[_0x552145(0x104)]+_0x552145(0x124));return{'ok':!![],'data':_0x251784,'message':_0x251784[_0x552145(0x114)]?'Menu\x20sync\x20skipped':_0x552145(0xf4)+_0x251784['created']+_0x552145(0x11f)};}if(_0x2f17d7[_0x552145(0xea)]>0x0)throw CliErrors[_0x552145(0x113)]('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x552145(0x108));if(!isInteractive()&&_0x591dac)throw CliErrors[_0x552145(0x113)](_0x552145(0xf5),_0x552145(0x108));requireInteractive();const _0x148246=startSpinner(_0x552145(0x111));let _0x1d94de,_0x5383b,_0x38e873;try{const _0x13b43e=await fetchMenuData(_0x5e7d61['appCode'],_0x5e7d61[_0x552145(0xe4)]);_0x1d94de=_0x13b43e[_0x552145(0xff)],_0x5383b=_0x13b43e[_0x552145(0x121)],_0x38e873=_0x13b43e[_0x552145(0x12a)],stopSpinner(_0x148246,_0x552145(0xeb),!![]);}catch(_0x1b0b1c){stopSpinner(_0x148246,_0x552145(0x109),![]);throw CliErrors['validation'](_0x1b0b1c instanceof Error?_0x1b0b1c[_0x552145(0x110)]:_0x552145(0x109));}if(_0x1d94de[_0x552145(0xea)]===0x0)return writeCliSideChannelLine(a122_0xbe3f2f[_0x552145(0xf6)](_0x552145(0x11c))),{'ok':!![]};const _0x86a401=buildCompareRows(_0x1d94de,_0x5383b);writeCliSideChannelLine(renderCompareTable(_0x86a401)),writeCliSideChannelLine('');const _0x1daf21=await selectPages(_0x1d94de,_0x5383b);writeCliSideChannelLine(''),writeCliSideChannelLine(a122_0xbe3f2f[_0x552145(0x10d)](_0x552145(0x102)+_0x1daf21[_0x552145(0xea)]+_0x552145(0x103)));const _0x5e3998=_0x40d1d2[_0x552145(0x10e)]&&_0x40d1d2[_0x552145(0xfa)];if(!_0x5e3998){writeCliSideChannelLine(renderSyncSummary(_0x1daf21,_0x5383b[_0x552145(0xe0)]>0x0));const _0x4bb792=await askConfirm(_0x552145(0xe1));if(!_0x4bb792)return writeCliSideChannelLine(a122_0xbe3f2f[_0x552145(0x10a)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x2d0e5d=_0x40d1d2[_0x552145(0x10e)],_0x2f7835=_0x40d1d2[_0x552145(0xfa)];!_0x2d0e5d&&(_0x2d0e5d=await askJsUrl());!_0x2f7835&&(_0x2f7835=await askCssUrl());const _0x325cb9=await askConfirm(_0x552145(0x105)+_0x1daf21[_0x552145(0xea)]+_0x552145(0xe7)+_0x2d0e5d+_0x552145(0xf9)+_0x2f7835+'?');if(!_0x325cb9)return writeCliSideChannelLine(a122_0xbe3f2f[_0x552145(0x10a)](_0x552145(0xe9))),{'ok':!![]};const _0x3bb9b6=[_0x2d0e5d,_0x2f7835],_0x477c89=startSpinner('Creating\x20'+_0x1daf21['length']+'\x20menu(s)...');try{const _0x4d8987=await doCreateMenus(_0x5e7d61[_0x552145(0xed)],_0x5e7d61[_0x552145(0xe4)],_0x1daf21,_0x3bb9b6);return stopSpinner(_0x477c89,_0x552145(0x127)+_0x4d8987[_0x552145(0x104)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x4d8987,'message':_0x552145(0xf4)+_0x4d8987['created']+_0x552145(0x10f)+_0x4d8987[_0x552145(0xf3)]+_0x552145(0x117)};}catch(_0x4bc0b1){stopSpinner(_0x477c89,_0x552145(0x125),![]);throw CliErrors[_0x552145(0x113)](_0x4bc0b1 instanceof Error?_0x4bc0b1['message']:_0x552145(0x125));}}};function a122_0x36ae(){const _0x8021ff=['yellow','selectedAppName','appcode','\x20and\x20CSS:\x20','cssUrl','2hUfoyb','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','sync','72804KHWWKH','localPages','string','1232004lDKjKN','\x20\x20✓\x20Selected:\x20','\x20page(s)','created','\x20\x20Create\x20','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','Failed\x20to\x20fetch\x20online\x20menu\x20list','gray','45dEXplP','35WarYoK','cyan','jsUrl','\x20created,\x20','message','Fetching\x20online\x20menu\x20list...','/smartapi/menu/create','validation','skipped','20256ZhmyYZ','944550CZNepG','\x20failed.','7QqEYRM','menu','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','split','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','4344024igvfPb','\x20local\x20microfrontend\x20menu(s).','\x20created.','Pre-fill\x20JS/CSS\x20URLs.\x20','onlinePaths','rawFlags','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20menu(s)\x20created','Menu\x20creation\x20failed','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Created\x20','flag','boolean','onlineMenuList','388160LSdcOK','str','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','size','\x20\x20Continue\x20with\x20creation?','✓\x20Menu\x20sync\x20completed:\x20','params','cookie','POST','77BZAfQA','\x20menu(s)\x20with\x20JS:\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','\x20\x20Cancelled.','length','Online\x20menu\x20list\x20fetched','Would\x20create\x20','appCode','2102888ijeICn','yes','trim','paths','targetPages','failed','Menu\x20sync\x20completed:\x20','Non-interactive\x20menu\x20sync\x20requires\x20--yes.'];a122_0x36ae=function(){return _0x8021ff;};return a122_0x36ae();}function ensureRunnableContext(_0x5724bd,_0x419ab4){const _0x58076b=a122_0x2023d7,_0x4f8419=_0x5724bd['appcode']?String(_0x5724bd[_0x58076b(0xf8)])['trim']():'';if(!isInProject()&&!_0x419ab4&&!_0x4f8419)throw CliErrors[_0x58076b(0x113)](_0x58076b(0x107)+_0x58076b(0xdf));}function parsePaths(_0x55458c){const _0x5b46a7=a122_0x2023d7;return[...new Set(_0x55458c[_0x5b46a7(0x11b)](',')['map'](_0x49e6a7=>_0x49e6a7[_0x5b46a7(0xf0)]())['filter'](Boolean))];}
@@ -1 +1 @@
1
- const a123_0x7df938=a123_0x501c;(function(_0xda9ff0,_0x1a56b4){const _0x1f3f65=a123_0x501c,_0x45f84a=_0xda9ff0();while(!![]){try{const _0x20def4=parseInt(_0x1f3f65(0x15e))/0x1+-parseInt(_0x1f3f65(0x176))/0x2+-parseInt(_0x1f3f65(0x17b))/0x3*(parseInt(_0x1f3f65(0x164))/0x4)+parseInt(_0x1f3f65(0x15c))/0x5+-parseInt(_0x1f3f65(0x157))/0x6+-parseInt(_0x1f3f65(0x16f))/0x7*(-parseInt(_0x1f3f65(0x187))/0x8)+-parseInt(_0x1f3f65(0x136))/0x9;if(_0x20def4===_0x1a56b4)break;else _0x45f84a['push'](_0x45f84a['shift']());}catch(_0x525666){_0x45f84a['push'](_0x45f84a['shift']());}}}(a123_0xac20,0xd80a3));import a123_0x4eaf9d from'chalk';import{filterMenusWithResources,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{selectMenusForUpdate}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';function a123_0x501c(_0x56351d,_0x32b0a7){_0x56351d=_0x56351d-0x134;const _0xac200=a123_0xac20();let _0x501cc2=_0xac200[_0x56351d];return _0x501cc2;}export const menuUpdate={'service':a123_0x7df938(0x153),'command':a123_0x7df938(0x159),'description':a123_0x7df938(0x146),'risk':'high-risk-write','flags':[{'name':a123_0x7df938(0x15a),'type':a123_0x7df938(0x167),'description':a123_0x7df938(0x13b)+a123_0x7df938(0x183)},{'name':a123_0x7df938(0x16b),'type':'string','description':a123_0x7df938(0x173)+a123_0x7df938(0x151),'enum':['replace',a123_0x7df938(0x14f)],'default':a123_0x7df938(0x14f)},{'name':a123_0x7df938(0x18a),'type':'boolean','description':a123_0x7df938(0x158)},{'name':'menu-ids','type':a123_0x7df938(0x167),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a123_0x7df938(0x181),'type':a123_0x7df938(0x167),'description':a123_0x7df938(0x152)},{'name':a123_0x7df938(0x154),'type':a123_0x7df938(0x15f),'description':a123_0x7df938(0x165)},{'name':a123_0x7df938(0x147),'type':'string','enum':[a123_0x7df938(0x178),a123_0x7df938(0x18b),'fetch'],'description':a123_0x7df938(0x160)}],async 'dryRun'(_0x34247c){const _0x1f5dde=a123_0x7df938;ensureRunnableContext(_0x34247c[_0x1f5dde(0x17e)],_0x34247c['selectedAppName']);const _0x5837ee=await runMenuUpdateCore(_0x34247c['appCode'],_0x34247c['cookie'],_0x34247c['str'](_0x1f5dde(0x15a)),{'mode':parseMode(_0x34247c[_0x1f5dde(0x188)](_0x1f5dde(0x16b))),'dryRun':!![],'force':_0x34247c[_0x1f5dde(0x17f)]('force'),'selection':parseSelection(_0x34247c),'loadScriptMode':parseLoadScriptMode(_0x34247c[_0x1f5dde(0x188)](_0x1f5dde(0x147)))});return{'method':_0x1f5dde(0x14c),'url':_0x1f5dde(0x143),'body':_0x5837ee,'description':_0x5837ee[_0x1f5dde(0x135)]?_0x1f5dde(0x189):'Would\x20update\x20'+(_0x5837ee[_0x1f5dde(0x177)]?.[_0x1f5dde(0x185)]??0x0)+'\x20menu\x20resource\x20set(s).'};},async 'execute'(_0x5d801f){const _0x4cfdd4=a123_0x7df938;ensureRunnableContext(_0x5d801f[_0x4cfdd4(0x17e)],_0x5d801f[_0x4cfdd4(0x186)]);const _0x5fc363=_0x5d801f[_0x4cfdd4(0x180)](_0x4cfdd4(0x16c)),_0x52233b=_0x5d801f[_0x4cfdd4(0x188)](_0x4cfdd4(0x15a)),_0x3c43a0=parseMode(_0x5d801f['str'](_0x4cfdd4(0x16b))),_0x1c717f=_0x5d801f[_0x4cfdd4(0x17f)]('force'),_0x4fd534=parseLoadScriptMode(_0x5d801f[_0x4cfdd4(0x188)]('load-mode')),_0x561669=parseParams(_0x52233b),_0x107ee8=!!(_0x561669['jsUrl']||_0x561669[_0x4cfdd4(0x139)]);if(_0x5fc363||_0x107ee8&&!isInteractive()){const _0x3a5f20=await runMenuUpdateCore(_0x5d801f[_0x4cfdd4(0x182)],_0x5d801f[_0x4cfdd4(0x179)],_0x52233b,{'mode':_0x3c43a0,'force':_0x1c717f,'selection':parseSelection(_0x5d801f),'loadScriptMode':_0x4fd534});return _0x3a5f20[_0x4cfdd4(0x135)]?writeCliSideChannelLine('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(writeCliSideChannelLine(_0x4cfdd4(0x170)+_0x3a5f20[_0x4cfdd4(0x17a)]+_0x4cfdd4(0x168)),_0x3a5f20['failed']>0x0&&writeCliSideChannelLine('!\x20'+_0x3a5f20[_0x4cfdd4(0x17d)]+_0x4cfdd4(0x16e))),{'ok':_0x3a5f20['failed']===0x0,'data':_0x3a5f20,'message':_0x3a5f20[_0x4cfdd4(0x135)]?_0x4cfdd4(0x14d):_0x4cfdd4(0x175)+_0x3a5f20[_0x4cfdd4(0x17a)]+_0x4cfdd4(0x137)+_0x3a5f20[_0x4cfdd4(0x17d)]+_0x4cfdd4(0x163)};}requireInteractive();const _0x1d3399=startSpinner(_0x4cfdd4(0x13a));let _0xe302eb;try{_0xe302eb=await fetchOnlineMenuList(_0x5d801f[_0x4cfdd4(0x182)],_0x5d801f[_0x4cfdd4(0x179)]),stopSpinner(_0x1d3399,_0x4cfdd4(0x14e),!![]);}catch(_0x49aed8){stopSpinner(_0x1d3399,_0x4cfdd4(0x184),![]);throw CliErrors[_0x4cfdd4(0x138)](_0x49aed8 instanceof Error?_0x49aed8['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x38224d=filterMenusWithResources(_0xe302eb),_0x5a065d=parseSelection(_0x5d801f,![]),_0x585a84=_0x5a065d?selectMenusForUpdate(_0x38224d,_0x5a065d):_0x38224d;if(_0x585a84[_0x4cfdd4(0x185)]===0x0)return writeCliSideChannelLine(a123_0x4eaf9d[_0x4cfdd4(0x148)]('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a123_0x4eaf9d['cyan'](_0x4cfdd4(0x15b)+_0x585a84['length']+'\x20menu(s)\x20with\x20existing\x20resources')),writeCliSideChannelLine(renderUpdateSummary(_0x585a84[_0x4cfdd4(0x16a)](_0x2eaf29=>_0x2eaf29[_0x4cfdd4(0x17c)]),[_0x561669[_0x4cfdd4(0x156)],_0x561669[_0x4cfdd4(0x139)]])),writeCliSideChannelLine('');let _0x46f616=_0x561669[_0x4cfdd4(0x156)],_0x225ab1=_0x561669[_0x4cfdd4(0x139)];!_0x46f616&&(_0x46f616=await askJsUrl());!_0x225ab1&&(_0x225ab1=await askCssUrl());const _0x297a45=await askConfirm('\x20\x20Update\x20'+_0x585a84[_0x4cfdd4(0x185)]+_0x4cfdd4(0x145)+_0x46f616+_0x4cfdd4(0x14a)+_0x225ab1+'?');if(!_0x297a45)return writeCliSideChannelLine(a123_0x4eaf9d['gray'](_0x4cfdd4(0x171))),{'ok':!![]};const _0x2f28ab=startSpinner(_0x4cfdd4(0x13f)+_0x585a84[_0x4cfdd4(0x185)]+'\x20menu(s)...');try{const _0x57e06e=await runMenuUpdateCore(_0x5d801f['appCode'],_0x5d801f[_0x4cfdd4(0x179)],JSON['stringify']({'jsUrl':_0x46f616,'cssUrl':_0x225ab1}),{'mode':_0x3c43a0,'force':_0x1c717f,'selection':{'all':![],'menuIds':_0x585a84['map'](_0x2d6a58=>_0x2d6a58['id']),'paths':[]},'loadScriptMode':_0x4fd534});return stopSpinner(_0x2f28ab,_0x4cfdd4(0x142)+_0x57e06e[_0x4cfdd4(0x17a)]+_0x4cfdd4(0x16d),_0x57e06e[_0x4cfdd4(0x17d)]===0x0),{'ok':_0x57e06e['failed']===0x0,'data':_0x57e06e,'message':_0x57e06e[_0x4cfdd4(0x17d)]>0x0?_0x4cfdd4(0x175)+_0x57e06e[_0x4cfdd4(0x17a)]+'\x20updated,\x20'+_0x57e06e[_0x4cfdd4(0x17d)]+'\x20failed.':_0x4cfdd4(0x175)+_0x57e06e[_0x4cfdd4(0x17a)]+'\x20updated.'};}catch(_0x172039){stopSpinner(_0x2f28ab,_0x4cfdd4(0x140),![]);throw CliErrors['validation'](_0x172039 instanceof Error?_0x172039[_0x4cfdd4(0x134)]:_0x4cfdd4(0x140));}}};function ensureRunnableContext(_0x279efd,_0x2b4c37){const _0x4f6c9c=a123_0x7df938,_0x31dd46=_0x279efd[_0x4f6c9c(0x169)]?String(_0x279efd['appcode'])[_0x4f6c9c(0x15d)]():'';if(!isInProject()&&!_0x2b4c37&&!_0x31dd46)throw CliErrors[_0x4f6c9c(0x138)]('menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+_0x4f6c9c(0x149));}function parseMode(_0x1d0510){const _0x4be1f3=a123_0x7df938;if(!_0x1d0510)return _0x4be1f3(0x14f);if(_0x1d0510===_0x4be1f3(0x172)||_0x1d0510===_0x4be1f3(0x14f))return _0x1d0510;throw CliErrors[_0x4be1f3(0x138)](_0x4be1f3(0x166));}function a123_0xac20(){const _0x3e42ab=['Updated\x20','/smartapi/menu/update','fetch','\x20menu(s)\x20with\x20JS:\x20','Update\x20CDN\x20asset\x20URLs\x20for\x20selected\x20online\x20menus\x20with\x20existing\x20resources','load-mode','yellow','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','\x20and\x20CSS:\x20','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','POST','Menu\x20update\x20skipped','Online\x20menu\x20list\x20fetched','patch','parse','patch\x20replaces\x20a\x20supplied\x20type\x20only\x20when\x20the\x20existing\x20target\x20is\x20unambiguous','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','menu','all','object','jsUrl','47706SiJiTS','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','update','params','\x20\x20Found\x20','4037905ekIgCP','trim','792324wKiQDb','boolean','Explicitly\x20change\x20the\x20microfrontend\x20resource\x20loading\x20mode','isSafeInteger','menu-ids','\x20failed.','797332algOhJ','Explicitly\x20update\x20every\x20menu\x20that\x20has\x20resources','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','string','\x20menu(s)\x20updated','appcode','map','mode','yes','\x20menu(s)','\x20menu(s)\x20failed','11400158AgsGYQ','✓\x20Menu\x20update\x20completed:\x20','\x20\x20Cancelled.','replace','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20','some','Menu\x20update\x20completed:\x20','1333374VMlgUw','diffs','import','cookie','updated','3mUdswd','label','failed','rawFlags','bool','flag','paths','appCode','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Failed\x20to\x20fetch\x20online\x20menu\x20list','length','selectedAppName','8djvDOJ','str','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','force','script','message','skipped','13226661mgkWOt','\x20updated,\x20','validation','cssUrl','Fetching\x20online\x20menu\x20list...','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','isArray','Invalid\x20--load-mode.\x20Allowed\x20values:\x20import,\x20script,\x20fetch','Updating\x20','Menu\x20update\x20failed','split'];a123_0xac20=function(){return _0x3e42ab;};return a123_0xac20();}function parseSelection(_0x8f4415,_0x43d0f4=!![]){const _0x28bf68=a123_0x7df938,_0x3774bc=_0x8f4415[_0x28bf68(0x17f)](_0x28bf68(0x154)),_0x3cb7e9=parseMenuIds(_0x8f4415[_0x28bf68(0x188)](_0x28bf68(0x162))),_0x5ab3e9=parseCsv(_0x8f4415[_0x28bf68(0x188)](_0x28bf68(0x181))),_0xac8d9e=_0x3cb7e9[_0x28bf68(0x185)]>0x0||_0x5ab3e9[_0x28bf68(0x185)]>0x0;if(_0x3774bc&&_0xac8d9e)throw CliErrors[_0x28bf68(0x138)](_0x28bf68(0x13c));if(!_0x3774bc&&!_0xac8d9e){if(!_0x43d0f4)return undefined;throw CliErrors[_0x28bf68(0x138)]('menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}return{'all':_0x3774bc,'menuIds':_0x3cb7e9,'paths':_0x5ab3e9};}function parseMenuIds(_0x50b485){const _0x3275ea=a123_0x7df938,_0x2adb92=parseCsv(_0x50b485),_0x5e26ba=_0x2adb92['map'](Number);if(_0x5e26ba[_0x3275ea(0x174)](_0x2c7199=>!Number[_0x3275ea(0x161)](_0x2c7199)||_0x2c7199<=0x0))throw CliErrors['validation'](_0x3275ea(0x14b));return[...new Set(_0x5e26ba)];}function parseCsv(_0x4986b0){const _0x80ae2b=a123_0x7df938;return[...new Set(_0x4986b0[_0x80ae2b(0x141)](',')[_0x80ae2b(0x16a)](_0x46d933=>_0x46d933[_0x80ae2b(0x15d)]())['filter'](Boolean))];}function parseLoadScriptMode(_0x50a39a){const _0x4dd335=a123_0x7df938;if(!_0x50a39a)return undefined;if(_0x50a39a==='import'||_0x50a39a==='script'||_0x50a39a===_0x4dd335(0x144))return _0x50a39a;throw CliErrors[_0x4dd335(0x138)](_0x4dd335(0x13e));}function parseParams(_0x487823){const _0x23ec88=a123_0x7df938;if(!_0x487823)return{};try{const _0x1edcd8=JSON[_0x23ec88(0x150)](_0x487823);if(typeof _0x1edcd8!==_0x23ec88(0x155)||_0x1edcd8===null||Array[_0x23ec88(0x13d)](_0x1edcd8))return{};return{'jsUrl':typeof _0x1edcd8[_0x23ec88(0x156)]===_0x23ec88(0x167)?_0x1edcd8[_0x23ec88(0x156)][_0x23ec88(0x15d)]():undefined,'cssUrl':typeof _0x1edcd8[_0x23ec88(0x139)]===_0x23ec88(0x167)?_0x1edcd8['cssUrl'][_0x23ec88(0x15d)]():undefined};}catch{return{};}}
1
+ const a123_0x1d8f38=a123_0x4ea6;(function(_0x14202e,_0x4281ef){const _0xbe60bc=a123_0x4ea6,_0xcaf499=_0x14202e();while(!![]){try{const _0x161841=parseInt(_0xbe60bc(0x1a2))/0x1+parseInt(_0xbe60bc(0x18f))/0x2+-parseInt(_0xbe60bc(0x1a7))/0x3+-parseInt(_0xbe60bc(0x177))/0x4*(-parseInt(_0xbe60bc(0x180))/0x5)+-parseInt(_0xbe60bc(0x1b7))/0x6*(parseInt(_0xbe60bc(0x1a1))/0x7)+parseInt(_0xbe60bc(0x192))/0x8*(parseInt(_0xbe60bc(0x19a))/0x9)+parseInt(_0xbe60bc(0x1a8))/0xa;if(_0x161841===_0x4281ef)break;else _0xcaf499['push'](_0xcaf499['shift']());}catch(_0x126cc5){_0xcaf499['push'](_0xcaf499['shift']());}}}(a123_0x1c77,0x4b50d));import a123_0x4002b0 from'chalk';import{filterMenusWithResources,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';import{selectMenusForUpdate}from'../../commands/menu/shared/update-core.js';import{isInProject}from'../../context.js';function a123_0x1c77(){const _0x3fab4a=['351IZxedf','some','failed','Would\x20update\x20','mode','Menu\x20update\x20skipped','length','5362AULCmq','404353uqnNyU','\x20menu\x20resource\x20set(s).','Menu\x20update\x20failed','menu-ids','Exact\x20comma-separated\x20menu\x20paths\x20to\x20update','1728804SUvsBo','2174360OdREZg','load-mode','update','\x20failed.','\x20updated.','Menu\x20update\x20completed:\x20','Update\x20CDN\x20asset\x20URLs\x20for\x20selected\x20online\x20menus\x20with\x20existing\x20resources','\x20updated,\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','cssUrl','message','Updating\x20','menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','params','force','2664DVNFog','cookie','patch\x20replaces\x20a\x20supplied\x20type\x20only\x20when\x20the\x20existing\x20target\x20is\x20unambiguous','stringify','\x20menu(s)\x20with\x20existing\x20resources','\x20menu(s)','object','isSafeInteger','\x20menu(s)\x20with\x20JS:\x20','Invalid\x20--load-mode.\x20Allowed\x20values:\x20import,\x20script,\x20fetch','\x20\x20Cancelled.','✓\x20Menu\x20update\x20completed:\x20','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','\x20and\x20CSS:\x20','menu','appCode','all','parse','\x20\x20Update\x20','Explicitly\x20update\x20every\x20menu\x20that\x20has\x20resources','yes','\x20menu(s)...','selectedAppName','diffs','rawFlags','jsUrl','33684TrSSFE','updated','boolean','--menu-ids\x20must\x20contain\x20positive\x20safe\x20integers.','Online\x20menu\x20list\x20fetched','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','import','No\x20menus\x20with\x20existing\x20resources\x20would\x20be\x20updated.','isArray','15DsfXcp','string','bool','yellow','script','trim','paths','Resource\x20update\x20mode:\x20replace\x20rewrites\x20resources\x20from\x20supplied\x20URLs;\x20','POST','replace','cyan','str','map','validation','Allow\x20replace\x20mode\x20to\x20remove\x20existing\x20JS\x20resources','457682SEUVWD','\x20menu(s)\x20updated','Invalid\x20--mode.\x20Allowed\x20values:\x20replace,\x20patch','71584WYZlBs','\x20menu(s)\x20failed','split','patch','\x20\x20Found\x20','appcode','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','skipped'];a123_0x1c77=function(){return _0x3fab4a;};return a123_0x1c77();}export const menuUpdate={'service':a123_0x1d8f38(0x16b),'command':a123_0x1d8f38(0x1aa),'description':a123_0x1d8f38(0x1ae),'risk':'high-risk-write','flags':[{'name':'params','type':'string','description':a123_0x1d8f38(0x169)+a123_0x1d8f38(0x198)},{'name':a123_0x1d8f38(0x19e),'type':a123_0x1d8f38(0x181),'description':a123_0x1d8f38(0x187)+a123_0x1d8f38(0x1b9),'enum':['replace',a123_0x1d8f38(0x195)],'default':a123_0x1d8f38(0x195)},{'name':a123_0x1d8f38(0x1b6),'type':'boolean','description':a123_0x1d8f38(0x18e)},{'name':a123_0x1d8f38(0x1a5),'type':a123_0x1d8f38(0x181),'description':'Exact\x20comma-separated\x20menu\x20IDs\x20to\x20update'},{'name':a123_0x1d8f38(0x186),'type':a123_0x1d8f38(0x181),'description':a123_0x1d8f38(0x1a6)},{'name':a123_0x1d8f38(0x16d),'type':a123_0x1d8f38(0x179),'description':a123_0x1d8f38(0x170)},{'name':a123_0x1d8f38(0x1a9),'type':'string','enum':['import',a123_0x1d8f38(0x184),'fetch'],'description':'Explicitly\x20change\x20the\x20microfrontend\x20resource\x20loading\x20mode'}],async 'dryRun'(_0x1a9333){const _0x496828=a123_0x1d8f38;ensureRunnableContext(_0x1a9333['rawFlags'],_0x1a9333['selectedAppName']);const _0x8d6d6d=await runMenuUpdateCore(_0x1a9333[_0x496828(0x16c)],_0x1a9333[_0x496828(0x1b8)],_0x1a9333[_0x496828(0x18b)](_0x496828(0x1b5)),{'mode':parseMode(_0x1a9333[_0x496828(0x18b)](_0x496828(0x19e))),'dryRun':!![],'force':_0x1a9333[_0x496828(0x182)](_0x496828(0x1b6)),'selection':parseSelection(_0x1a9333),'loadScriptMode':parseLoadScriptMode(_0x1a9333[_0x496828(0x18b)](_0x496828(0x1a9)))});return{'method':_0x496828(0x188),'url':'/smartapi/menu/update','body':_0x8d6d6d,'description':_0x8d6d6d[_0x496828(0x199)]?_0x496828(0x17e):_0x496828(0x19d)+(_0x8d6d6d[_0x496828(0x174)]?.[_0x496828(0x1a0)]??0x0)+_0x496828(0x1a3)};},async 'execute'(_0x2731f1){const _0x46a517=a123_0x1d8f38;ensureRunnableContext(_0x2731f1[_0x46a517(0x175)],_0x2731f1[_0x46a517(0x173)]);const _0x24004b=_0x2731f1['flag'](_0x46a517(0x171)),_0x5348b0=_0x2731f1[_0x46a517(0x18b)](_0x46a517(0x1b5)),_0x1eb474=parseMode(_0x2731f1[_0x46a517(0x18b)]('mode')),_0x913d6c=_0x2731f1[_0x46a517(0x182)](_0x46a517(0x1b6)),_0x44abe0=parseLoadScriptMode(_0x2731f1[_0x46a517(0x18b)](_0x46a517(0x1a9))),_0x502395=parseParams(_0x5348b0),_0xb0a588=!!(_0x502395[_0x46a517(0x176)]||_0x502395[_0x46a517(0x1b1)]);if(_0x24004b||_0xb0a588&&!isInteractive()){const _0x415ca8=await runMenuUpdateCore(_0x2731f1[_0x46a517(0x16c)],_0x2731f1[_0x46a517(0x1b8)],_0x5348b0,{'mode':_0x1eb474,'force':_0x913d6c,'selection':parseSelection(_0x2731f1),'loadScriptMode':_0x44abe0});return _0x415ca8[_0x46a517(0x199)]?writeCliSideChannelLine('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(writeCliSideChannelLine(_0x46a517(0x1c2)+_0x415ca8[_0x46a517(0x178)]+_0x46a517(0x190)),_0x415ca8[_0x46a517(0x19c)]>0x0&&writeCliSideChannelLine('!\x20'+_0x415ca8[_0x46a517(0x19c)]+_0x46a517(0x193))),{'ok':_0x415ca8['failed']===0x0,'data':_0x415ca8,'message':_0x415ca8[_0x46a517(0x199)]?_0x46a517(0x19f):'Menu\x20update\x20completed:\x20'+_0x415ca8[_0x46a517(0x178)]+_0x46a517(0x1af)+_0x415ca8[_0x46a517(0x19c)]+_0x46a517(0x1ab)};}requireInteractive();const _0x52783c=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x59ba94;try{_0x59ba94=await fetchOnlineMenuList(_0x2731f1['appCode'],_0x2731f1['cookie']),stopSpinner(_0x52783c,_0x46a517(0x17b),!![]);}catch(_0x3067fa){stopSpinner(_0x52783c,_0x46a517(0x1b0),![]);throw CliErrors[_0x46a517(0x18d)](_0x3067fa instanceof Error?_0x3067fa[_0x46a517(0x1b2)]:_0x46a517(0x1b0));}const _0x46c8dd=filterMenusWithResources(_0x59ba94),_0x99c8aa=parseSelection(_0x2731f1,![]),_0xa0c5ef=_0x99c8aa?selectMenusForUpdate(_0x46c8dd,_0x99c8aa):_0x46c8dd;if(_0xa0c5ef['length']===0x0)return writeCliSideChannelLine(a123_0x4002b0[_0x46a517(0x183)](_0x46a517(0x17c))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a123_0x4002b0[_0x46a517(0x18a)](_0x46a517(0x196)+_0xa0c5ef[_0x46a517(0x1a0)]+_0x46a517(0x1bb))),writeCliSideChannelLine(renderUpdateSummary(_0xa0c5ef['map'](_0x419c41=>_0x419c41['label']),[_0x502395['jsUrl'],_0x502395[_0x46a517(0x1b1)]])),writeCliSideChannelLine('');let _0x5b0f7d=_0x502395[_0x46a517(0x176)],_0x2c9f2a=_0x502395[_0x46a517(0x1b1)];!_0x5b0f7d&&(_0x5b0f7d=await askJsUrl());!_0x2c9f2a&&(_0x2c9f2a=await askCssUrl());const _0x49f787=await askConfirm(_0x46a517(0x16f)+_0xa0c5ef[_0x46a517(0x1a0)]+_0x46a517(0x1bf)+_0x5b0f7d+_0x46a517(0x16a)+_0x2c9f2a+'?');if(!_0x49f787)return writeCliSideChannelLine(a123_0x4002b0['gray'](_0x46a517(0x1c1))),{'ok':!![]};const _0x27a1ae=startSpinner(_0x46a517(0x1b3)+_0xa0c5ef[_0x46a517(0x1a0)]+_0x46a517(0x172));try{const _0x1ba576=await runMenuUpdateCore(_0x2731f1[_0x46a517(0x16c)],_0x2731f1[_0x46a517(0x1b8)],JSON[_0x46a517(0x1ba)]({'jsUrl':_0x5b0f7d,'cssUrl':_0x2c9f2a}),{'mode':_0x1eb474,'force':_0x913d6c,'selection':{'all':![],'menuIds':_0xa0c5ef[_0x46a517(0x18c)](_0x263dfd=>_0x263dfd['id']),'paths':[]},'loadScriptMode':_0x44abe0});return stopSpinner(_0x27a1ae,'Updated\x20'+_0x1ba576[_0x46a517(0x178)]+_0x46a517(0x1bc),_0x1ba576[_0x46a517(0x19c)]===0x0),{'ok':_0x1ba576[_0x46a517(0x19c)]===0x0,'data':_0x1ba576,'message':_0x1ba576[_0x46a517(0x19c)]>0x0?_0x46a517(0x1ad)+_0x1ba576[_0x46a517(0x178)]+'\x20updated,\x20'+_0x1ba576['failed']+_0x46a517(0x1ab):_0x46a517(0x1ad)+_0x1ba576[_0x46a517(0x178)]+_0x46a517(0x1ac)};}catch(_0x1f44de){stopSpinner(_0x27a1ae,_0x46a517(0x1a4),![]);throw CliErrors[_0x46a517(0x18d)](_0x1f44de instanceof Error?_0x1f44de[_0x46a517(0x1b2)]:_0x46a517(0x1a4));}}};function ensureRunnableContext(_0x48b801,_0x4641f3){const _0x4c651d=a123_0x1d8f38,_0x41eab7=_0x48b801[_0x4c651d(0x197)]?String(_0x48b801[_0x4c651d(0x197)])[_0x4c651d(0x185)]():'';if(!isInProject()&&!_0x4641f3&&!_0x41eab7)throw CliErrors['validation']('menu\x20update\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function a123_0x4ea6(_0x4534a7,_0x34733e){_0x4534a7=_0x4534a7-0x169;const _0x1c779a=a123_0x1c77();let _0x4ea673=_0x1c779a[_0x4534a7];return _0x4ea673;}function parseMode(_0x56610e){const _0x57212b=a123_0x1d8f38;if(!_0x56610e)return _0x57212b(0x195);if(_0x56610e===_0x57212b(0x189)||_0x56610e===_0x57212b(0x195))return _0x56610e;throw CliErrors[_0x57212b(0x18d)](_0x57212b(0x191));}function parseSelection(_0x1b0e97,_0x10481f=!![]){const _0x10c5d1=a123_0x1d8f38,_0x430270=_0x1b0e97[_0x10c5d1(0x182)]('all'),_0xf7604f=parseMenuIds(_0x1b0e97[_0x10c5d1(0x18b)](_0x10c5d1(0x1a5))),_0x380efd=parseCsv(_0x1b0e97['str'](_0x10c5d1(0x186))),_0x2589e2=_0xf7604f['length']>0x0||_0x380efd['length']>0x0;if(_0x430270&&_0x2589e2)throw CliErrors[_0x10c5d1(0x18d)]('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x430270&&!_0x2589e2){if(!_0x10481f)return undefined;throw CliErrors[_0x10c5d1(0x18d)](_0x10c5d1(0x1b4));}return{'all':_0x430270,'menuIds':_0xf7604f,'paths':_0x380efd};}function parseMenuIds(_0x1b3707){const _0x1dded0=a123_0x1d8f38,_0x199673=parseCsv(_0x1b3707),_0x5eb49c=_0x199673['map'](Number);if(_0x5eb49c[_0x1dded0(0x19b)](_0x61d2ff=>!Number[_0x1dded0(0x1be)](_0x61d2ff)||_0x61d2ff<=0x0))throw CliErrors[_0x1dded0(0x18d)](_0x1dded0(0x17a));return[...new Set(_0x5eb49c)];}function parseCsv(_0x1348a3){const _0x5d071c=a123_0x1d8f38;return[...new Set(_0x1348a3[_0x5d071c(0x194)](',')['map'](_0x55837a=>_0x55837a[_0x5d071c(0x185)]())['filter'](Boolean))];}function parseLoadScriptMode(_0x30a3db){const _0x31a0ce=a123_0x1d8f38;if(!_0x30a3db)return undefined;if(_0x30a3db===_0x31a0ce(0x17d)||_0x30a3db===_0x31a0ce(0x184)||_0x30a3db==='fetch')return _0x30a3db;throw CliErrors['validation'](_0x31a0ce(0x1c0));}function parseParams(_0xa9404d){const _0x13f74c=a123_0x1d8f38;if(!_0xa9404d)return{};try{const _0x42d79d=JSON[_0x13f74c(0x16e)](_0xa9404d);if(typeof _0x42d79d!==_0x13f74c(0x1bd)||_0x42d79d===null||Array[_0x13f74c(0x17f)](_0x42d79d))return{};return{'jsUrl':typeof _0x42d79d[_0x13f74c(0x176)]===_0x13f74c(0x181)?_0x42d79d['jsUrl'][_0x13f74c(0x185)]():undefined,'cssUrl':typeof _0x42d79d['cssUrl']===_0x13f74c(0x181)?_0x42d79d[_0x13f74c(0x1b1)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a124_0x2b0283=a124_0x5e2d;(function(_0x218b23,_0x4749e2){const _0x2f2856=a124_0x5e2d,_0xae9a42=_0x218b23();while(!![]){try{const _0x132717=parseInt(_0x2f2856(0x1ba))/0x1+-parseInt(_0x2f2856(0x1c7))/0x2*(parseInt(_0x2f2856(0x1c1))/0x3)+parseInt(_0x2f2856(0x1a7))/0x4*(-parseInt(_0x2f2856(0x1af))/0x5)+parseInt(_0x2f2856(0x1b5))/0x6+-parseInt(_0x2f2856(0x1c9))/0x7*(-parseInt(_0x2f2856(0x1b8))/0x8)+-parseInt(_0x2f2856(0x1aa))/0x9+-parseInt(_0x2f2856(0x1b4))/0xa;if(_0x132717===_0x4749e2)break;else _0xae9a42['push'](_0xae9a42['shift']());}catch(_0x494f30){_0xae9a42['push'](_0xae9a42['shift']());}}}(a124_0x2802,0xdf97a));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';function a124_0x5e2d(_0x51ad4c,_0x32af6a){_0x51ad4c=_0x51ad4c-0x1a7;const _0x2802e4=a124_0x2802();let _0x5e2d85=_0x2802e4[_0x51ad4c];return _0x5e2d85;}import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a124_0x2b0283(0x1b2),'FEISHU',a124_0x2b0283(0x1bb),a124_0x2b0283(0x1bc),'WEBHOOK'];export const notificationConfigList={'service':a124_0x2b0283(0x1bd),'command':a124_0x2b0283(0x1c3),'description':a124_0x2b0283(0x1c5),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a124_0x2b0283(0x1c0),'type':a124_0x2b0283(0x1b0),'description':a124_0x2b0283(0x1b9),'enum':NOTIFICATION_CHANNEL_TYPES,'default':a124_0x2b0283(0x1b2)}],async 'validate'(_0x5501a8){readChannelType(_0x5501a8);},async 'execute'(_0xc78f3d){const _0x4476bc=a124_0x2b0283,_0x2149dc=readChannelType(_0xc78f3d),_0x193f61=await listNotificationChannelConfigs(_0xc78f3d[_0x4476bc(0x1be)],_0x2149dc),_0x35ef0c=_0x193f61[_0x4476bc(0x1c8)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0xc78f3d[_0x4476bc(0x1be)],'channelType':_0x2149dc,'count':_0x35ef0c[_0x4476bc(0x1ab)],'configs':_0x35ef0c},'message':'Found\x20'+_0x35ef0c[_0x4476bc(0x1ab)]+'\x20'+_0x2149dc+_0x4476bc(0x1ac)};}};function a124_0x2802(){const _0x44e5dc=['trim','type','3PKdWof','Allowed\x20values:\x20','config-list','number','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','createTime','969378RzFOrl','map','12229TJfESJ','856oUuWSj','Invalid\x20--type:\x20','Item\x20','8559378Zsqlxt','length','\x20notification\x20config(s)','configName','apiError','590wIincZ','string','\x20is\x20missing\x20required\x20field\x20\x22','EMAIL','Invalid\x20notification\x20config\x20response.','1733050CUkPrk','6864240ZnmIVU','join','validation','368umiRSx','Notification\x20channel\x20type','1325720tHrfeF','DINGTALK','WECOM','notification','appCode'];a124_0x2802=function(){return _0x44e5dc;};return a124_0x2802();}function readChannelType(_0x591b9e){const _0x5050ab=a124_0x2b0283,_0x3c50aa=_0x591b9e['str'](_0x5050ab(0x1c0))[_0x5050ab(0x1bf)]()||_0x5050ab(0x1b2);if(!NOTIFICATION_CHANNEL_TYPES['includes'](_0x3c50aa))throw CliErrors[_0x5050ab(0x1b7)](_0x5050ab(0x1a8)+_0x3c50aa,_0x5050ab(0x1c2)+NOTIFICATION_CHANNEL_TYPES[_0x5050ab(0x1b6)](',\x20')+'.');return _0x3c50aa;}function projectNotificationConfig(_0x10e47b,_0x2119be){const _0x3b9ebe=a124_0x2b0283;return{'id':typeof _0x10e47b['id']===_0x3b9ebe(0x1c4)?_0x10e47b['id']:null,'configCode':requireConfigString(_0x10e47b,'configCode',_0x2119be),'configName':requireConfigString(_0x10e47b,_0x3b9ebe(0x1ad),_0x2119be),'channelType':requireConfigString(_0x10e47b,'channelType',_0x2119be),'description':normalizeNullableString(_0x10e47b['description']),'createTime':normalizeNullableString(_0x10e47b[_0x3b9ebe(0x1c6)]),'updateTime':normalizeNullableString(_0x10e47b['updateTime'])};}function requireConfigString(_0x139421,_0x159919,_0x166960){const _0x5672f8=a124_0x2b0283,_0x2957ad=_0x139421[_0x159919];if(typeof _0x2957ad!==_0x5672f8(0x1b0)||_0x2957ad[_0x5672f8(0x1bf)]()==='')throw CliErrors[_0x5672f8(0x1ae)](_0x5672f8(0x1b3),_0x5672f8(0x1a9)+(_0x166960+0x1)+_0x5672f8(0x1b1)+_0x159919+'\x22.');return _0x2957ad[_0x5672f8(0x1bf)]();}function normalizeNullableString(_0x29ed3f){const _0x199d6e=a124_0x2b0283;return typeof _0x29ed3f===_0x199d6e(0x1b0)?_0x29ed3f:null;}
1
+ const a124_0x2516b6=a124_0x1c3d;function a124_0xeff3(){const _0x301dd9=['5qyTMtx','WEBHOOK','string','Invalid\x20notification\x20config\x20response.','validation','updateTime','length','7LtvFxs','4865598uJSoAJ','2165640nPpLsJ','str','9JFoGXj','List\x20app-level\x20notification\x20configs\x20and\x20their\x20configCode\x20values','Found\x20','read','\x20is\x20missing\x20required\x20field\x20\x22','EMAIL','includes','join','2965384JwvNqL','50TMybTd','DINGTALK','283481uzZsDZ','233784KUNpxa','map','apiError','trim','configName','WECOM','config-list','Item\x20','configCode','appCode','669016DrBzFe','\x20notification\x20config(s)','2sATskC','189508TgpUEG','Allowed\x20values:\x20','number'];a124_0xeff3=function(){return _0x301dd9;};return a124_0xeff3();}function a124_0x1c3d(_0x2e217c,_0x12d62c){_0x2e217c=_0x2e217c-0x1d5;const _0xeff3ef=a124_0xeff3();let _0x1c3df6=_0xeff3ef[_0x2e217c];return _0x1c3df6;}(function(_0x52a70f,_0x4002e7){const _0x473eed=a124_0x1c3d,_0x85d048=_0x52a70f();while(!![]){try{const _0x470bc5=-parseInt(_0x473eed(0x1dd))/0x1*(parseInt(_0x473eed(0x1dc))/0x2)+parseInt(_0x473eed(0x1eb))/0x3*(parseInt(_0x473eed(0x1da))/0x4)+-parseInt(_0x473eed(0x1e0))/0x5*(-parseInt(_0x473eed(0x1e8))/0x6)+-parseInt(_0x473eed(0x1e7))/0x7*(parseInt(_0x473eed(0x1f3))/0x8)+parseInt(_0x473eed(0x1f7))/0x9+parseInt(_0x473eed(0x1f4))/0xa*(-parseInt(_0x473eed(0x1f6))/0xb)+-parseInt(_0x473eed(0x1e9))/0xc;if(_0x470bc5===_0x4002e7)break;else _0x85d048['push'](_0x85d048['shift']());}catch(_0x2f57b2){_0x85d048['push'](_0x85d048['shift']());}}}(a124_0xeff3,0x728ad));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{listNotificationChannelConfigs}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const NOTIFICATION_CHANNEL_TYPES=[a124_0x2516b6(0x1f0),'FEISHU',a124_0x2516b6(0x1f5),a124_0x2516b6(0x1d5),a124_0x2516b6(0x1e1)];export const notificationConfigList={'service':'notification','command':a124_0x2516b6(0x1d6),'description':a124_0x2516b6(0x1ec),'risk':a124_0x2516b6(0x1ee),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a124_0x2516b6(0x1e2),'description':'Notification\x20channel\x20type','enum':NOTIFICATION_CHANNEL_TYPES,'default':'EMAIL'}],async 'validate'(_0x219622){readChannelType(_0x219622);},async 'execute'(_0x4003f4){const _0x5367fb=a124_0x2516b6,_0x2301a1=readChannelType(_0x4003f4),_0x467fc1=await listNotificationChannelConfigs(_0x4003f4[_0x5367fb(0x1d9)],_0x2301a1),_0x526ce2=_0x467fc1[_0x5367fb(0x1f8)](projectNotificationConfig);return{'ok':!![],'data':{'appCode':_0x4003f4['appCode'],'channelType':_0x2301a1,'count':_0x526ce2['length'],'configs':_0x526ce2},'message':_0x5367fb(0x1ed)+_0x526ce2[_0x5367fb(0x1e6)]+'\x20'+_0x2301a1+_0x5367fb(0x1db)};}};function readChannelType(_0x5673ea){const _0x3fbed8=a124_0x2516b6,_0x5a45b6=_0x5673ea[_0x3fbed8(0x1ea)]('type')[_0x3fbed8(0x1fa)]()||'EMAIL';if(!NOTIFICATION_CHANNEL_TYPES[_0x3fbed8(0x1f1)](_0x5a45b6))throw CliErrors[_0x3fbed8(0x1e4)]('Invalid\x20--type:\x20'+_0x5a45b6,_0x3fbed8(0x1de)+NOTIFICATION_CHANNEL_TYPES[_0x3fbed8(0x1f2)](',\x20')+'.');return _0x5a45b6;}function projectNotificationConfig(_0xaeb56b,_0x51f483){const _0x2460c7=a124_0x2516b6;return{'id':typeof _0xaeb56b['id']===_0x2460c7(0x1df)?_0xaeb56b['id']:null,'configCode':requireConfigString(_0xaeb56b,_0x2460c7(0x1d8),_0x51f483),'configName':requireConfigString(_0xaeb56b,_0x2460c7(0x1fb),_0x51f483),'channelType':requireConfigString(_0xaeb56b,'channelType',_0x51f483),'description':normalizeNullableString(_0xaeb56b['description']),'createTime':normalizeNullableString(_0xaeb56b['createTime']),'updateTime':normalizeNullableString(_0xaeb56b[_0x2460c7(0x1e5)])};}function requireConfigString(_0x150dab,_0x20999f,_0x170abc){const _0x569f58=a124_0x2516b6,_0x5934a3=_0x150dab[_0x20999f];if(typeof _0x5934a3!==_0x569f58(0x1e2)||_0x5934a3[_0x569f58(0x1fa)]()==='')throw CliErrors[_0x569f58(0x1f9)](_0x569f58(0x1e3),_0x569f58(0x1d7)+(_0x170abc+0x1)+_0x569f58(0x1ef)+_0x20999f+'\x22.');return _0x5934a3[_0x569f58(0x1fa)]();}function normalizeNullableString(_0x1ead46){const _0x42066a=a124_0x2516b6;return typeof _0x1ead46===_0x42066a(0x1e2)?_0x1ead46:null;}
@@ -1 +1 @@
1
- function a125_0x125d(){const _0x307313=['25786JLHkJa','15543OilJaz','1047803tWGOpT','6952944TqGZLU','24vtPDkm','11611271tYBlrh','480CIXWZi','971612DAitVG','3011600PXSRmD'];a125_0x125d=function(){return _0x307313;};return a125_0x125d();}function a125_0x50a0(_0x4a6bdc,_0x3607aa){_0x4a6bdc=_0x4a6bdc-0xde;const _0x125d3c=a125_0x125d();let _0x50a0ea=_0x125d3c[_0x4a6bdc];return _0x50a0ea;}(function(_0x588c33,_0x3b977a){const _0x3c7911=a125_0x50a0,_0x115226=_0x588c33();while(!![]){try{const _0xac5f9=parseInt(_0x3c7911(0xde))/0x1+parseInt(_0x3c7911(0xe5))/0x2*(parseInt(_0x3c7911(0xe0))/0x3)+-parseInt(_0x3c7911(0xe3))/0x4+parseInt(_0x3c7911(0xe4))/0x5+parseInt(_0x3c7911(0xdf))/0x6+-parseInt(_0x3c7911(0xe1))/0x7+-parseInt(_0x3c7911(0xe2))/0x8*(parseInt(_0x3c7911(0xe6))/0x9);if(_0xac5f9===_0x3b977a)break;else _0x115226['push'](_0x115226['shift']());}catch(_0x27a40d){_0x115226['push'](_0x115226['shift']());}}}(a125_0x125d,0xdd63f));import{notificationConfigList}from'../../commands/notification/config-list.js';export const notificationDefinitions=[notificationConfigList];
1
+ (function(_0x57de4b,_0x464a14){const _0x2c1942=a125_0x3a95,_0x5b6a0a=_0x57de4b();while(!![]){try{const _0x39897e=parseInt(_0x2c1942(0x1a4))/0x1+-parseInt(_0x2c1942(0x1a3))/0x2*(-parseInt(_0x2c1942(0x1aa))/0x3)+-parseInt(_0x2c1942(0x1a6))/0x4*(-parseInt(_0x2c1942(0x1a2))/0x5)+-parseInt(_0x2c1942(0x1a9))/0x6*(parseInt(_0x2c1942(0x1a1))/0x7)+parseInt(_0x2c1942(0x1a7))/0x8+-parseInt(_0x2c1942(0x1ab))/0x9*(-parseInt(_0x2c1942(0x1a8))/0xa)+-parseInt(_0x2c1942(0x1a5))/0xb;if(_0x39897e===_0x464a14)break;else _0x5b6a0a['push'](_0x5b6a0a['shift']());}catch(_0x4387ed){_0x5b6a0a['push'](_0x5b6a0a['shift']());}}}(a125_0x5285,0x45623));function a125_0x5285(){const _0x53aaa5=['2zhRDfz','230767XppYff','1286252RzJSER','18728ThLeHx','2613608ShqEBj','60sWZfhF','40632IGpaiY','181731pJYfTY','134361XEVhOn','462TgOeFD','150jivlxM'];a125_0x5285=function(){return _0x53aaa5;};return a125_0x5285();}import{notificationConfigList}from'../../commands/notification/config-list.js';function a125_0x3a95(_0x448870,_0x56f1a4){_0x448870=_0x448870-0x1a1;const _0x5285ae=a125_0x5285();let _0x3a95e0=_0x5285ae[_0x448870];return _0x3a95e0;}export const notificationDefinitions=[notificationConfigList];