@lovrabet/rabetbase-cli 2.4.3 → 2.4.4-beta.1

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 (381) 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/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.d.ts +2 -0
  87. package/lib/commands/db/diff-refresh-start.js +1 -0
  88. package/lib/commands/db/diff-refresh-status.d.ts +2 -0
  89. package/lib/commands/db/diff-refresh-status.js +1 -0
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.d.ts +2 -0
  137. package/lib/commands/notification/config-create.js +1 -0
  138. package/lib/commands/notification/config-delete.d.ts +2 -0
  139. package/lib/commands/notification/config-delete.js +1 -0
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.d.ts +2 -0
  142. package/lib/commands/notification/config-update.js +1 -0
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.d.ts +97 -0
  145. package/lib/commands/notification/shared.js +1 -0
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/generate-start.js +1 -1
  148. package/lib/commands/page/generate-status.js +1 -1
  149. package/lib/commands/page/index.js +1 -1
  150. package/lib/commands/page/pull.js +1 -1
  151. package/lib/commands/page/push.js +1 -1
  152. package/lib/commands/page/react/create.js +1 -1
  153. package/lib/commands/page/react/detail.js +1 -1
  154. package/lib/commands/page/react/list.js +1 -1
  155. package/lib/commands/page/react/publish.js +1 -1
  156. package/lib/commands/page/react/shared.js +1 -1
  157. package/lib/commands/page/react/syntax.js +1 -1
  158. package/lib/commands/page/react/template.js +1 -1
  159. package/lib/commands/page/react/update.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/standard-page-status.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/permit/index.js +1 -1
  166. package/lib/commands/permit/page-get.js +1 -1
  167. package/lib/commands/permit/page-set.js +1 -1
  168. package/lib/commands/permit/role-apis-set.js +1 -1
  169. package/lib/commands/permit/role-menus-set.js +1 -1
  170. package/lib/commands/permit/role-menus.js +1 -1
  171. package/lib/commands/permit/shared.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.d.ts +1 -0
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
  177. package/lib/commands/project/create/materialize-project-template.js +1 -0
  178. package/lib/commands/project/create/project-name.d.ts +2 -0
  179. package/lib/commands/project/create/project-name.js +1 -0
  180. package/lib/commands/project/create/project-template-archive.d.ts +6 -0
  181. package/lib/commands/project/create/project-template-archive.js +1 -0
  182. package/lib/commands/project/create/project-template-path.d.ts +1 -3
  183. package/lib/commands/project/create/project-template-path.js +1 -1
  184. package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/index.js +1 -1
  189. package/lib/commands/project/upgrade.js +1 -1
  190. package/lib/commands/registry.js +1 -1
  191. package/lib/commands/role/create.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/run/index.js +1 -1
  202. package/lib/commands/schema.js +1 -1
  203. package/lib/commands/sql/create.js +1 -1
  204. package/lib/commands/sql/delete.js +1 -1
  205. package/lib/commands/sql/detail.js +1 -1
  206. package/lib/commands/sql/exec.js +1 -1
  207. package/lib/commands/sql/index.js +1 -1
  208. package/lib/commands/sql/list.js +1 -1
  209. package/lib/commands/sql/pull.js +1 -1
  210. package/lib/commands/sql/push.js +1 -1
  211. package/lib/commands/sql/shared.js +1 -1
  212. package/lib/commands/sql/status.js +1 -1
  213. package/lib/commands/sql/validate.js +1 -1
  214. package/lib/commands/task/index.js +1 -1
  215. package/lib/commands/task/status.js +1 -1
  216. package/lib/commands/tenant/index.js +1 -1
  217. package/lib/commands/tenant/members-list.js +1 -1
  218. package/lib/commands/tenant/shared.js +1 -1
  219. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  220. package/lib/commands/user-account/index.js +1 -1
  221. package/lib/commands/workspace/add.js +1 -1
  222. package/lib/commands/workspace/index.js +1 -1
  223. package/lib/commands/workspace/remove.js +1 -1
  224. package/lib/config/schema.js +1 -1
  225. package/lib/constant/cdn.d.ts +2 -0
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.js +1 -1
  230. package/lib/constant/env.js +1 -1
  231. package/lib/constant/output.js +1 -1
  232. package/lib/constant/paths.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/context/app-resolver.js +1 -1
  235. package/lib/context/auth-resolver.js +1 -1
  236. package/lib/context/config-loader.js +1 -1
  237. package/lib/context.d.ts +1 -1
  238. package/lib/context.js +1 -1
  239. package/lib/core/alias-resolver.js +1 -1
  240. package/lib/core/api-client.d.ts +29 -2
  241. package/lib/core/api-client.js +1 -1
  242. package/lib/core/bff/config.js +1 -1
  243. package/lib/core/bff/file-system.js +1 -1
  244. package/lib/core/bff/hash.js +1 -1
  245. package/lib/core/bff/lock.js +1 -1
  246. package/lib/core/bff/utils.js +1 -1
  247. package/lib/core/db-resolver.js +1 -1
  248. package/lib/core/page/file-system.js +1 -1
  249. package/lib/core/page/hash.js +1 -1
  250. package/lib/core/page/lock.js +1 -1
  251. package/lib/core/sql-index-auditor.js +1 -1
  252. package/lib/core/sql-sync/config.js +1 -1
  253. package/lib/core/sql-sync/file-system.js +1 -1
  254. package/lib/core/sql-sync/hash.js +1 -1
  255. package/lib/core/sql-sync/lock.js +1 -1
  256. package/lib/core/sql-sync/utils.js +1 -1
  257. package/lib/core/sql-validator.js +1 -1
  258. package/lib/errors.js +1 -1
  259. package/lib/framework/build-all-flags.js +1 -1
  260. package/lib/framework/error-output.js +1 -1
  261. package/lib/framework/explicit-yes.js +1 -1
  262. package/lib/framework/flags.js +1 -1
  263. package/lib/framework/help.js +1 -1
  264. package/lib/framework/index.js +1 -1
  265. package/lib/framework/output.js +1 -1
  266. package/lib/framework/response.js +1 -1
  267. package/lib/framework/runner-alias.js +1 -1
  268. package/lib/framework/runner.js +1 -1
  269. package/lib/framework/schema-export.js +1 -1
  270. package/lib/framework/types.js +1 -1
  271. package/lib/generated/build-info.d.ts +4 -4
  272. package/lib/generated/build-info.js +1 -1
  273. package/lib/help.js +1 -1
  274. package/lib/postinstall.js +1 -1
  275. package/lib/runtime/confirmation.js +1 -1
  276. package/lib/runtime/event.js +1 -1
  277. package/lib/runtime/index.js +1 -1
  278. package/lib/runtime/queue.js +1 -1
  279. package/lib/runtime/resolve.js +1 -1
  280. package/lib/skills/builtin-skill.js +1 -1
  281. package/lib/skills/main.js +1 -1
  282. package/lib/skills/npx-skills-add.js +1 -1
  283. package/lib/skills/skill-presence.js +1 -1
  284. package/lib/telemetry/cli-command-trace.js +1 -1
  285. package/lib/telemetry/cli-help-trace.js +1 -1
  286. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  287. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  288. package/lib/telemetry/send-cli-trace-log.js +1 -1
  289. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  290. package/lib/utils/ai_config.js +1 -1
  291. package/lib/utils/apply-jq-filter.js +1 -1
  292. package/lib/utils/cdn-config.js +1 -1
  293. package/lib/utils/check-sdk-version.js +1 -1
  294. package/lib/utils/cli-version-check.js +1 -1
  295. package/lib/utils/cli-version-policy.d.ts +13 -0
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/rules-cdn.js +1 -1
  307. package/lib/utils/sleep.js +1 -1
  308. package/lib/utils/template-replacer.js +1 -1
  309. package/lib/utils/update-notice.js +1 -1
  310. package/lib/utils/version.js +1 -1
  311. package/lib/utils/with-active-cookie.js +1 -1
  312. package/lib/utils/write-cli-side-channel.js +1 -1
  313. package/package.json +9 -4
  314. package/skills/rabetbase/SKILL.md +33 -22
  315. package/skills/rabetbase/guides/backend-function.md +5 -3
  316. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
  317. package/skills/rabetbase/guides/conflict-detection.md +2 -2
  318. package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
  320. package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
  321. package/skills/rabetbase/guides/sql-mybatis.md +2 -2
  322. package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
  323. package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
  324. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  325. package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
  326. package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
  327. package/skills/rabetbase/references/rabetbase-config.md +2 -2
  328. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  329. package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
  330. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
  331. package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
  332. package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-kb.md +5 -3
  334. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
  335. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
  336. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
  337. package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
  338. package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
  339. package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
  340. package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
  342. package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
  343. package/skills/rabetbase/references/rabetbase-run.md +1 -1
  344. package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
  345. package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
  346. package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
  347. package/skills/rabetbase.manifest.json +5 -5
  348. package/templates/README.md +14 -2
  349. package/lib/commands/project/create/non-interactive.d.ts +0 -9
  350. package/lib/commands/project/create/non-interactive.js +0 -1
  351. package/lib/utils/copy-directory.d.ts +0 -1
  352. package/lib/utils/copy-directory.js +0 -1
  353. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
  354. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
  355. package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
  356. package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
  357. package/templates/projects/sub-app-react-demo/README.md +0 -246
  358. package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
  359. package/templates/projects/sub-app-react-demo/index.html +0 -27
  360. package/templates/projects/sub-app-react-demo/package.json +0 -34
  361. package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
  362. package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
  363. package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
  364. package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
  365. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
  366. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
  367. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
  368. package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
  369. package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
  370. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
  371. package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
  372. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
  373. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
  374. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
  375. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
  376. package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
  377. package/templates/projects/sub-app-react-demo/src/style.css +0 -108
  378. package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
  379. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
  380. package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
  381. package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
@@ -1 +1 @@
1
- (function(_0x24ffcf,_0x278bfb){const _0x447922=a120_0x58b8,_0x54ba75=_0x24ffcf();while(!![]){try{const _0x4446bf=-parseInt(_0x447922(0x1a1))/0x1*(parseInt(_0x447922(0x187))/0x2)+parseInt(_0x447922(0x196))/0x3+parseInt(_0x447922(0x177))/0x4+-parseInt(_0x447922(0x197))/0x5*(-parseInt(_0x447922(0x17e))/0x6)+-parseInt(_0x447922(0x18d))/0x7+parseInt(_0x447922(0x178))/0x8+-parseInt(_0x447922(0x19e))/0x9*(-parseInt(_0x447922(0x176))/0xa);if(_0x4446bf===_0x278bfb)break;else _0x54ba75['push'](_0x54ba75['shift']());}catch(_0x382df2){_0x54ba75['push'](_0x54ba75['shift']());}}}(a120_0xe96a,0x626ad));import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';function a120_0xe96a(){const _0x20dd5b=['1orhHuA','resources','values','number','350UcyGge','244984rkMDAA','720Yskbiy','verbose','boolean','digest','updateTime','parse','165588PkLDse','sort','length','label','POSITIVE_INFINITY','url','depth','push','stringify','1055550eieLGk','isFinite','childrenIds','menus','path','sha256:','3966431xiZfRu','updateUserId','index','parentId','datasetCode','updateUserName','isArray','string','pageType','699858dRXKNN','55diPWfC','datasetId','type','extend','map','item','valid','231255ZaUoeR','modelType','children'];a120_0xe96a=function(){return _0x20dd5b;};return a120_0xe96a();}export async function fetchMenuSnapshot(_0x3fc7bf,_0x210eae,_0x71c6ef={}){const _0x425d73=a120_0x58b8,_0x8b418b=await getMenuTree(_0x3fc7bf,_0x210eae);return buildMenuSnapshot(Array[_0x425d73(0x193)](_0x8b418b)?_0x8b418b:[],_0x71c6ef);}export function buildMenuSnapshot(_0xecc137,_0x251b69={}){const _0x514ac7=a120_0x58b8,_0x2fde3e=flattenMenuItems(_0xecc137,{'verbose':_0x251b69[_0x514ac7(0x179)]===!![],'parentId':null,'depth':0x0}),_0x22a36d=new Map(_0x2fde3e[_0x514ac7(0x19b)](_0x1786c2=>[_0x1786c2['id'],_0x1786c2])),_0x4a72da=createHash('sha256')['update'](JSON[_0x514ac7(0x186)](_0x2fde3e[_0x514ac7(0x19b)](toHashInput)))[_0x514ac7(0x17b)]('hex');return{'total':_0x2fde3e[_0x514ac7(0x180)],'hash':_0x514ac7(0x18c)+_0x4a72da,'menus':_0x2fde3e,'byId':_0x22a36d};}export function toProcessedMenuItem(_0x5b1236){const _0x2b4f11=a120_0x58b8;return{'id':_0x5b1236['id'],'path':_0x5b1236[_0x2b4f11(0x18b)],'label':_0x5b1236[_0x2b4f11(0x181)],'resources':[..._0x5b1236['resources']],'extend':_0x5b1236['extend']??null};}export function toMenuListItem(_0x369e8e){const {modelType:_0x1ca6f5,datasetId:_0x5745f5,datasetCode:_0x54cf08,resourcesValid:_0x3ff089,..._0x57db28}=_0x369e8e;return _0x57db28;}export function getChildren(_0x17f74f,_0xf7e4a5){const _0x135886=a120_0x58b8;return _0x17f74f[_0x135886(0x18a)]['filter'](_0x43b060=>_0x43b060[_0x135886(0x190)]===_0xf7e4a5);}function a120_0x58b8(_0x4e756e,_0xf4ab8b){_0x4e756e=_0x4e756e-0x176;const _0xe96a20=a120_0xe96a();let _0x58b81a=_0xe96a20[_0x4e756e];return _0x58b81a;}function flattenMenuItems(_0x43f859,_0x3aedd5){const _0x417879=a120_0x58b8,_0x3c839d=sortMenuItems(_0x43f859),_0x448bcc=[];for(const _0xfc956b of _0x3c839d){const _0x4b67c3=sortMenuItems(Array['isArray'](_0xfc956b['children'])?_0xfc956b[_0x417879(0x1a0)]:[]);_0x448bcc[_0x417879(0x185)](toMenuFact(_0xfc956b,_0x4b67c3,_0x3aedd5)),_0x4b67c3[_0x417879(0x180)]>0x0&&_0x448bcc[_0x417879(0x185)](...flattenMenuItems(_0x4b67c3,{'verbose':_0x3aedd5[_0x417879(0x179)],'parentId':_0xfc956b['id'],'depth':_0x3aedd5[_0x417879(0x184)]+0x1}));}return _0x448bcc;}function sortMenuItems(_0x1c7d78){const _0x3ecc8e=a120_0x58b8;return _0x1c7d78[_0x3ecc8e(0x19b)]((_0x350bca,_0x4fa7ee)=>({'item':_0x350bca,'index':_0x4fa7ee}))[_0x3ecc8e(0x17f)]((_0x91f3a0,_0x555e72)=>{const _0x2b18a5=_0x3ecc8e,_0x205299=normalizeSort(_0x91f3a0['item'][_0x2b18a5(0x17f)]),_0x19ee5d=normalizeSort(_0x555e72[_0x2b18a5(0x19c)][_0x2b18a5(0x17f)]);if(_0x205299!==_0x19ee5d)return _0x205299-_0x19ee5d;return _0x91f3a0[_0x2b18a5(0x18f)]-_0x555e72[_0x2b18a5(0x18f)];})['map'](({item:_0x4b16ac})=>_0x4b16ac);}function toMenuFact(_0x502f45,_0x479b0f,_0x5a1c53){const _0x548416=a120_0x58b8,_0x51df43=normalizeResourceValue(_0x502f45[_0x548416(0x19a)]?.[_0x548416(0x1a2)]),_0x12b742={'id':_0x502f45['id'],'parentId':_0x5a1c53['parentId'],'depth':_0x5a1c53[_0x548416(0x184)],'label':normalizeString(_0x502f45[_0x548416(0x181)]),'path':normalizeString(_0x502f45[_0x548416(0x18b)]),'url':normalizeString(_0x502f45[_0x548416(0x183)]),'type':normalizeString(_0x502f45[_0x548416(0x199)]),'visible':typeof _0x502f45['visible']===_0x548416(0x17a)?_0x502f45['visible']:null,'sort':typeof _0x502f45['sort']==='number'&&Number[_0x548416(0x188)](_0x502f45[_0x548416(0x17f)])?_0x502f45[_0x548416(0x17f)]:null,'resources':_0x51df43[_0x548416(0x1a3)],'resourcesValid':_0x51df43[_0x548416(0x19d)],'childrenIds':_0x479b0f[_0x548416(0x19b)](_0x2ec1eb=>_0x2ec1eb['id']),'childrenCount':_0x479b0f['length'],'pageId':normalizeNullableNumber(_0x502f45['pageId']),'pageType':normalizeString(_0x502f45[_0x548416(0x195)]),'modelType':normalizeString(_0x502f45['modelType']),'datasetId':normalizeNullableNumber(_0x502f45[_0x548416(0x198)]),'datasetCode':normalizeString(_0x502f45[_0x548416(0x191)]),'updateUserId':normalizeNullableString(_0x502f45[_0x548416(0x18e)]),'updateUserName':normalizeNullableString(_0x502f45[_0x548416(0x192)]),'updateTime':normalizeNullableTimestamp(_0x502f45[_0x548416(0x17c)])};return _0x5a1c53[_0x548416(0x179)]&&(_0x12b742['extend']=_0x502f45[_0x548416(0x19a)]??null),_0x12b742;}function toHashInput(_0x4eff6e){const _0xffb647=a120_0x58b8;return{'id':_0x4eff6e['id'],'parentId':_0x4eff6e[_0xffb647(0x190)],'label':_0x4eff6e['label'],'path':_0x4eff6e[_0xffb647(0x18b)],'url':_0x4eff6e[_0xffb647(0x183)],'type':_0x4eff6e[_0xffb647(0x199)],'visible':_0x4eff6e['visible'],'sort':_0x4eff6e[_0xffb647(0x17f)],'resources':_0x4eff6e[_0xffb647(0x1a2)],'resourcesValid':_0x4eff6e['resourcesValid'],'childrenIds':_0x4eff6e[_0xffb647(0x189)],'pageId':_0x4eff6e['pageId'],'pageType':_0x4eff6e['pageType'],'modelType':_0x4eff6e[_0xffb647(0x19f)],'datasetId':_0x4eff6e[_0xffb647(0x198)],'datasetCode':_0x4eff6e['datasetCode'],'updateUserId':_0x4eff6e[_0xffb647(0x18e)],'updateUserName':_0x4eff6e[_0xffb647(0x192)],'updateTime':_0x4eff6e['updateTime']};}function normalizeSort(_0x5722c5){const _0x1236b3=a120_0x58b8;return typeof _0x5722c5===_0x1236b3(0x1a4)&&Number[_0x1236b3(0x188)](_0x5722c5)?_0x5722c5:Number[_0x1236b3(0x182)];}function normalizeString(_0x331148){const _0x2162f5=a120_0x58b8;return typeof _0x331148===_0x2162f5(0x194)?_0x331148:'';}function normalizeNullableNumber(_0x387554){const _0x40983c=a120_0x58b8;return typeof _0x387554===_0x40983c(0x1a4)&&Number[_0x40983c(0x188)](_0x387554)?_0x387554:null;}function normalizeNullableString(_0x44702f){const _0x4a563d=a120_0x58b8;return typeof _0x44702f==='string'&&_0x44702f[_0x4a563d(0x180)]>0x0?_0x44702f:null;}function normalizeNullableTimestamp(_0x42b94f){const _0x52d51e=a120_0x58b8;if(typeof _0x42b94f==='string')return _0x42b94f[_0x52d51e(0x180)]>0x0?_0x42b94f:null;return typeof _0x42b94f===_0x52d51e(0x1a4)&&Number[_0x52d51e(0x188)](_0x42b94f)?_0x42b94f:null;}export function normalizeResources(_0xe270a){const _0x23f5a0=a120_0x58b8;return normalizeResourceValue(_0xe270a)[_0x23f5a0(0x1a3)];}function normalizeResourceValue(_0x58cbd6){const _0x24e921=a120_0x58b8;if(_0x58cbd6==null)return{'values':[],'valid':!![]};if(Array[_0x24e921(0x193)](_0x58cbd6))return{'values':_0x58cbd6['map'](String),'valid':!![]};if(typeof _0x58cbd6!==_0x24e921(0x194))return{'values':[],'valid':![]};try{const _0x4ca861=JSON[_0x24e921(0x17d)](_0x58cbd6);return Array[_0x24e921(0x193)](_0x4ca861)?{'values':_0x4ca861[_0x24e921(0x19b)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
1
+ (function(_0x4cf61b,_0xd72a49){const _0x1a4cfa=a122_0x2253,_0x356573=_0x4cf61b();while(!![]){try{const _0x22d65b=parseInt(_0x1a4cfa(0x18a))/0x1*(-parseInt(_0x1a4cfa(0x17a))/0x2)+parseInt(_0x1a4cfa(0x16c))/0x3*(-parseInt(_0x1a4cfa(0x192))/0x4)+parseInt(_0x1a4cfa(0x171))/0x5*(-parseInt(_0x1a4cfa(0x17f))/0x6)+-parseInt(_0x1a4cfa(0x188))/0x7+-parseInt(_0x1a4cfa(0x180))/0x8+parseInt(_0x1a4cfa(0x176))/0x9*(parseInt(_0x1a4cfa(0x189))/0xa)+parseInt(_0x1a4cfa(0x185))/0xb;if(_0x22d65b===_0xd72a49)break;else _0x356573['push'](_0x356573['shift']());}catch(_0x4ba404){_0x356573['push'](_0x356573['shift']());}}}(a122_0xbc57,0x94a08));import{createHash}from'node:crypto';function a122_0xbc57(){const _0x10ba03=['pageId','number','label','6153093IXgCSG','values','push','stringify','2TiicaC','isFinite','map','item','path','1223610PXDuzk','744232JOJJIM','hex','updateUserId','parse','parentId','29449046pTmHQM','depth','children','5032965cRPGzB','10mvKwCl','562097MAYaVT','updateUserName','length','visible','updateTime','isArray','sort','resources','4IGioaD','verbose','pageType','sha256','extend','url','datasetId','string','index','1074873MNJUGE','menus','datasetCode','digest','resourcesValid','25DRtiRD','valid'];a122_0xbc57=function(){return _0x10ba03;};return a122_0xbc57();}import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x36d2c9,_0x4183b4,_0x2ea613={}){const _0x25aa4b=a122_0x2253,_0x54ab93=await getMenuTree(_0x36d2c9,_0x4183b4);return buildMenuSnapshot(Array[_0x25aa4b(0x18f)](_0x54ab93)?_0x54ab93:[],_0x2ea613);}export function buildMenuSnapshot(_0x326b60,_0x46ae30={}){const _0x4ef6d6=a122_0x2253,_0x434536=flattenMenuItems(_0x326b60,{'verbose':_0x46ae30[_0x4ef6d6(0x193)]===!![],'parentId':null,'depth':0x0}),_0x4658fe=new Map(_0x434536['map'](_0x2d48f3=>[_0x2d48f3['id'],_0x2d48f3])),_0x406984=createHash(_0x4ef6d6(0x166))['update'](JSON[_0x4ef6d6(0x179)](_0x434536['map'](toHashInput)))[_0x4ef6d6(0x16f)](_0x4ef6d6(0x181));return{'total':_0x434536['length'],'hash':'sha256:'+_0x406984,'menus':_0x434536,'byId':_0x4658fe};}export function toProcessedMenuItem(_0x12f27c){const _0x59e7f1=a122_0x2253;return{'id':_0x12f27c['id'],'path':_0x12f27c[_0x59e7f1(0x17e)],'label':_0x12f27c[_0x59e7f1(0x175)],'resources':[..._0x12f27c[_0x59e7f1(0x191)]],'extend':_0x12f27c[_0x59e7f1(0x167)]??null};}export function toMenuListItem(_0x4e7bff){const {modelType:_0x49774c,datasetId:_0xeec4b3,datasetCode:_0xbb9478,resourcesValid:_0x36130b,..._0x167149}=_0x4e7bff;return _0x167149;}export function getChildren(_0x53d82c,_0x2f2d47){const _0x27b7b3=a122_0x2253;return _0x53d82c[_0x27b7b3(0x16d)]['filter'](_0x7cd546=>_0x7cd546[_0x27b7b3(0x184)]===_0x2f2d47);}function flattenMenuItems(_0x52daf9,_0x502c35){const _0x4f0cf2=a122_0x2253,_0x2ad8f=sortMenuItems(_0x52daf9),_0x38c8d1=[];for(const _0x3c35c3 of _0x2ad8f){const _0x273638=sortMenuItems(Array[_0x4f0cf2(0x18f)](_0x3c35c3[_0x4f0cf2(0x187)])?_0x3c35c3[_0x4f0cf2(0x187)]:[]);_0x38c8d1[_0x4f0cf2(0x178)](toMenuFact(_0x3c35c3,_0x273638,_0x502c35)),_0x273638[_0x4f0cf2(0x18c)]>0x0&&_0x38c8d1[_0x4f0cf2(0x178)](...flattenMenuItems(_0x273638,{'verbose':_0x502c35[_0x4f0cf2(0x193)],'parentId':_0x3c35c3['id'],'depth':_0x502c35[_0x4f0cf2(0x186)]+0x1}));}return _0x38c8d1;}function sortMenuItems(_0x5acd5d){const _0x925c70=a122_0x2253;return _0x5acd5d[_0x925c70(0x17c)]((_0x2b3ed7,_0x2dbc53)=>({'item':_0x2b3ed7,'index':_0x2dbc53}))[_0x925c70(0x190)]((_0x513186,_0xd8f320)=>{const _0x123a23=_0x925c70,_0x221718=normalizeSort(_0x513186[_0x123a23(0x17d)][_0x123a23(0x190)]),_0x48a8b8=normalizeSort(_0xd8f320[_0x123a23(0x17d)][_0x123a23(0x190)]);if(_0x221718!==_0x48a8b8)return _0x221718-_0x48a8b8;return _0x513186[_0x123a23(0x16b)]-_0xd8f320[_0x123a23(0x16b)];})[_0x925c70(0x17c)](({item:_0x535585})=>_0x535585);}function toMenuFact(_0x595632,_0xb2eaaa,_0x4f1f27){const _0x269370=a122_0x2253,_0x494bdb=normalizeResourceValue(_0x595632[_0x269370(0x167)]?.['resources']),_0xd2beb0={'id':_0x595632['id'],'parentId':_0x4f1f27['parentId'],'depth':_0x4f1f27['depth'],'label':normalizeString(_0x595632[_0x269370(0x175)]),'path':normalizeString(_0x595632['path']),'url':normalizeString(_0x595632[_0x269370(0x168)]),'type':normalizeString(_0x595632['type']),'visible':typeof _0x595632['visible']==='boolean'?_0x595632[_0x269370(0x18d)]:null,'sort':typeof _0x595632[_0x269370(0x190)]===_0x269370(0x174)&&Number['isFinite'](_0x595632[_0x269370(0x190)])?_0x595632[_0x269370(0x190)]:null,'resources':_0x494bdb[_0x269370(0x177)],'resourcesValid':_0x494bdb[_0x269370(0x172)],'childrenIds':_0xb2eaaa[_0x269370(0x17c)](_0xc39715=>_0xc39715['id']),'childrenCount':_0xb2eaaa[_0x269370(0x18c)],'pageId':normalizeNullableNumber(_0x595632[_0x269370(0x173)]),'pageType':normalizeString(_0x595632['pageType']),'modelType':normalizeString(_0x595632['modelType']),'datasetId':normalizeNullableNumber(_0x595632[_0x269370(0x169)]),'datasetCode':normalizeString(_0x595632[_0x269370(0x16e)]),'updateUserId':normalizeNullableString(_0x595632[_0x269370(0x182)]),'updateUserName':normalizeNullableString(_0x595632['updateUserName']),'updateTime':normalizeNullableTimestamp(_0x595632['updateTime'])};return _0x4f1f27[_0x269370(0x193)]&&(_0xd2beb0['extend']=_0x595632[_0x269370(0x167)]??null),_0xd2beb0;}function toHashInput(_0x36b8dc){const _0x12afe7=a122_0x2253;return{'id':_0x36b8dc['id'],'parentId':_0x36b8dc['parentId'],'label':_0x36b8dc['label'],'path':_0x36b8dc[_0x12afe7(0x17e)],'url':_0x36b8dc[_0x12afe7(0x168)],'type':_0x36b8dc['type'],'visible':_0x36b8dc['visible'],'sort':_0x36b8dc[_0x12afe7(0x190)],'resources':_0x36b8dc[_0x12afe7(0x191)],'resourcesValid':_0x36b8dc[_0x12afe7(0x170)],'childrenIds':_0x36b8dc['childrenIds'],'pageId':_0x36b8dc[_0x12afe7(0x173)],'pageType':_0x36b8dc[_0x12afe7(0x165)],'modelType':_0x36b8dc['modelType'],'datasetId':_0x36b8dc['datasetId'],'datasetCode':_0x36b8dc[_0x12afe7(0x16e)],'updateUserId':_0x36b8dc[_0x12afe7(0x182)],'updateUserName':_0x36b8dc[_0x12afe7(0x18b)],'updateTime':_0x36b8dc[_0x12afe7(0x18e)]};}function normalizeSort(_0x50e584){const _0x396629=a122_0x2253;return typeof _0x50e584===_0x396629(0x174)&&Number[_0x396629(0x17b)](_0x50e584)?_0x50e584:Number['POSITIVE_INFINITY'];}function normalizeString(_0x4ba9e6){const _0x342f2e=a122_0x2253;return typeof _0x4ba9e6===_0x342f2e(0x16a)?_0x4ba9e6:'';}function normalizeNullableNumber(_0x2b41db){const _0x288883=a122_0x2253;return typeof _0x2b41db===_0x288883(0x174)&&Number[_0x288883(0x17b)](_0x2b41db)?_0x2b41db:null;}function normalizeNullableString(_0x5d2310){const _0x9650a6=a122_0x2253;return typeof _0x5d2310==='string'&&_0x5d2310[_0x9650a6(0x18c)]>0x0?_0x5d2310:null;}function normalizeNullableTimestamp(_0x150a4e){const _0x44a133=a122_0x2253;if(typeof _0x150a4e==='string')return _0x150a4e[_0x44a133(0x18c)]>0x0?_0x150a4e:null;return typeof _0x150a4e==='number'&&Number['isFinite'](_0x150a4e)?_0x150a4e:null;}export function normalizeResources(_0x60b136){const _0x23f471=a122_0x2253;return normalizeResourceValue(_0x60b136)[_0x23f471(0x177)];}function a122_0x2253(_0x255464,_0x1f41b7){_0x255464=_0x255464-0x165;const _0xbc57da=a122_0xbc57();let _0x225384=_0xbc57da[_0x255464];return _0x225384;}function normalizeResourceValue(_0x2f28fb){const _0x22363f=a122_0x2253;if(_0x2f28fb==null)return{'values':[],'valid':!![]};if(Array['isArray'](_0x2f28fb))return{'values':_0x2f28fb[_0x22363f(0x17c)](String),'valid':!![]};if(typeof _0x2f28fb!==_0x22363f(0x16a))return{'values':[],'valid':![]};try{const _0x1c7812=JSON[_0x22363f(0x183)](_0x2f28fb);return Array[_0x22363f(0x18f)](_0x1c7812)?{'values':_0x1c7812['map'](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
@@ -1 +1 @@
1
- (function(_0x1b4eb4,_0x27df54){var _0x4b085d=a121_0x2d93,_0xfe2a6a=_0x1b4eb4();while(!![]){try{var _0x425991=parseInt(_0x4b085d(0x144))/0x1+parseInt(_0x4b085d(0x145))/0x2*(-parseInt(_0x4b085d(0x14d))/0x3)+-parseInt(_0x4b085d(0x148))/0x4+-parseInt(_0x4b085d(0x14c))/0x5*(parseInt(_0x4b085d(0x14a))/0x6)+parseInt(_0x4b085d(0x146))/0x7*(-parseInt(_0x4b085d(0x14b))/0x8)+parseInt(_0x4b085d(0x149))/0x9*(-parseInt(_0x4b085d(0x143))/0xa)+parseInt(_0x4b085d(0x14e))/0xb*(parseInt(_0x4b085d(0x147))/0xc);if(_0x425991===_0x27df54)break;else _0xfe2a6a['push'](_0xfe2a6a['shift']());}catch(_0x5d5373){_0xfe2a6a['push'](_0xfe2a6a['shift']());}}}(a121_0x3cb6,0x6154f));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a121_0x3cb6(){var _0x471d4b=['224aGOALN','5069748BCrKjs','3068880cMalue','5495220OoDNCF','1261470NbYPwM','123928nUjPXJ','15XtsnYB','559347tVnFKW','88GuvtFa','10KWUKKy','82433iCIhUI','6kMuAKZ'];a121_0x3cb6=function(){return _0x471d4b;};return a121_0x3cb6();}export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a121_0x2d93(_0x347d30,_0x328f67){_0x347d30=_0x347d30-0x143;var _0x3cb632=a121_0x3cb6();var _0x2d9336=_0x3cb632[_0x347d30];return _0x2d9336;}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0x2a5869,_0x1b34cc){var _0x381fad=a123_0x597f,_0x5f206c=_0x2a5869();while(!![]){try{var _0x3b179a=parseInt(_0x381fad(0x1f2))/0x1+-parseInt(_0x381fad(0x1ed))/0x2*(-parseInt(_0x381fad(0x1ee))/0x3)+-parseInt(_0x381fad(0x1e9))/0x4+parseInt(_0x381fad(0x1f0))/0x5+parseInt(_0x381fad(0x1eb))/0x6*(parseInt(_0x381fad(0x1f1))/0x7)+parseInt(_0x381fad(0x1f3))/0x8*(-parseInt(_0x381fad(0x1ef))/0x9)+-parseInt(_0x381fad(0x1ec))/0xa*(parseInt(_0x381fad(0x1ea))/0xb);if(_0x3b179a===_0x1b34cc)break;else _0x5f206c['push'](_0x5f206c['shift']());}catch(_0x47eb86){_0x5f206c['push'](_0x5f206c['shift']());}}}(a123_0x396c,0x7dee1));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a123_0x597f(_0x3f4cb1,_0xb14e04){_0x3f4cb1=_0x3f4cb1-0x1e9;var _0x396cb0=a123_0x396c();var _0x597f2c=_0x396cb0[_0x3f4cb1];return _0x597f2c;}export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a123_0x396c(){var _0xb9478e=['63XaJcxw','3955205gjmwAQ','746816YESnnN','444322YERUiD','351032apgxZF','1588236pdGgpt','10543291lDJHnt','24DYUzJw','10JpmkSM','8006PxzYxL','387WeLgsU'];a123_0x396c=function(){return _0xb9478e;};return a123_0x396c();}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
@@ -1 +1 @@
1
- (function(_0x15467b,_0x36dea1){const _0x4c5acd=a122_0x1a86,_0x3d8bd0=_0x15467b();while(!![]){try{const _0x19029e=parseInt(_0x4c5acd(0x103))/0x1+-parseInt(_0x4c5acd(0xe2))/0x2*(-parseInt(_0x4c5acd(0xfb))/0x3)+parseInt(_0x4c5acd(0xd9))/0x4*(parseInt(_0x4c5acd(0xe0))/0x5)+-parseInt(_0x4c5acd(0xef))/0x6*(parseInt(_0x4c5acd(0xdd))/0x7)+parseInt(_0x4c5acd(0xdc))/0x8*(parseInt(_0x4c5acd(0x102))/0x9)+parseInt(_0x4c5acd(0xf9))/0xa+-parseInt(_0x4c5acd(0xdf))/0xb;if(_0x19029e===_0x36dea1)break;else _0x3d8bd0['push'](_0x3d8bd0['shift']());}catch(_0xd60f51){_0x3d8bd0['push'](_0x3d8bd0['shift']());}}}(a122_0x1b7c,0x7ed1e));import a122_0x1aac88 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a122_0x4e1777 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';function a122_0x1a86(_0x17e451,_0x39961f){_0x17e451=_0x17e451-0xd9;const _0x1b7c07=a122_0x1b7c();let _0x1a8619=_0x1b7c07[_0x17e451];return _0x1a8619;}import{CliErrors}from'../../../errors.js';function a122_0x1b7c(){const _0x3ac20a=['map','CSS\x20URL\x20checked','catch','error','1767609OYtTOC','66718WXTadK','JS\x20URL\x20checked','has','cancelled','4VNymYd','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','red','8feiZYp','7BtGodd','path','7377887kUusGj','2630330fPhXSb','[already\x20on\x20platform]','50658JeuJHI','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','ExitPromptError','filter','fail','\x20\x20Checking\x20CSS\x20URL\x20reachability...','test','No\x20menus\x20selected.','trim','name','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','CSS\x20URL\x20check\x20failed','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','3282018mTWAle','Cancelled.','No\x20local\x20pages\x20found.','\x20\x20Checking\x20JS\x20URL\x20reachability...','[new]','includes','JS\x20URL\x20check\x20failed','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20CSS\x20URL:','label','7200280EQspwM','length','27IRnGFV','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','gray'];a122_0x1b7c=function(){return _0x3ac20a;};return a122_0x1b7c();}function onCancel(_0x5dcf17){const _0x332fae=a122_0x1a86;return _0x5dcf17[_0x332fae(0x100)](_0x11c4c2=>{const _0x54c27e=_0x332fae;if(_0x11c4c2?.[_0x54c27e(0xeb)]===_0x54c27e(0xe4))throw CliErrors[_0x54c27e(0x106)](_0x54c27e(0xf0));throw _0x11c4c2;});}export function startSpinner(_0x2ff43d){return a122_0x4e1777({'text':_0x2ff43d,'color':'cyan'})['start']();}export function stopSpinner(_0x31c9c8,_0xb23f3,_0x35a715){const _0x4f82f3=a122_0x1a86;_0x35a715?_0x31c9c8['succeed'](_0xb23f3):_0x31c9c8[_0x4f82f3(0xe6)](_0xb23f3);}export async function askConfirm(_0x167add){return onCancel(confirm({'message':_0x167add,'theme':{'prefix':''}}));}export async function askJsUrl(_0x44aded){const _0x2cce34=a122_0x1a86;while(!![]){const _0x42d769=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x44aded,'theme':{'prefix':''}}));if(_0x42d769[_0x2cce34(0xea)]()==='')throw CliErrors[_0x2cce34(0x106)](_0x2cce34(0xf0));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x2cce34(0xe8)](_0x42d769[_0x2cce34(0xea)]())){console[_0x2cce34(0x101)](a122_0x1aac88['red'](_0x2cce34(0xf6)));continue;}const _0x113494=startSpinner(_0x2cce34(0xf2));try{const _0x20ebc0=await isUrlReachable(_0x42d769['trim']());stopSpinner(_0x113494,_0x2cce34(0x104),_0x20ebc0);if(!_0x20ebc0){console[_0x2cce34(0x101)](a122_0x1aac88[_0x2cce34(0xdb)](_0x2cce34(0xda)));continue;}return _0x42d769['trim']();}catch(_0x16ebbd){stopSpinner(_0x113494,_0x2cce34(0xf5),![]);throw _0x16ebbd;}}}export async function askCssUrl(_0x25abda){const _0x25c905=a122_0x1a86;while(!![]){const _0x19a8fe=await onCancel(input({'message':_0x25c905(0xf7),'default':_0x25abda,'theme':{'prefix':''}}));if(_0x19a8fe[_0x25c905(0xea)]()==='')throw CliErrors[_0x25c905(0x106)](_0x25c905(0xf0));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x25c905(0xe8)](_0x19a8fe[_0x25c905(0xea)]())){console[_0x25c905(0x101)](a122_0x1aac88['red'](_0x25c905(0xfc)));continue;}const _0x4b5eb2=startSpinner(_0x25c905(0xe7));try{const _0x4eb47b=await isUrlReachable(_0x19a8fe[_0x25c905(0xea)]());stopSpinner(_0x4b5eb2,_0x25c905(0xff),_0x4eb47b);if(!_0x4eb47b){console[_0x25c905(0x101)](a122_0x1aac88[_0x25c905(0xdb)](_0x25c905(0xec)));continue;}return _0x19a8fe[_0x25c905(0xea)]();}catch(_0x4bb2f2){stopSpinner(_0x4b5eb2,_0x25c905(0xed),![]);throw _0x4bb2f2;}}}export async function selectPages(_0x5cdf27,_0x5a3438){const _0x57535f=a122_0x1a86,_0x2650ee=_0x5cdf27[_0x57535f(0xfe)](_0x2508d3=>{const _0x7b6c31=_0x57535f,_0x7433a=_0x5a3438[_0x7b6c31(0x105)](_0x2508d3[_0x7b6c31(0xde)]);return{'name':_0x2508d3[_0x7b6c31(0xf8)]+'\x20\x20'+a122_0x1aac88[_0x7b6c31(0xfd)](_0x2508d3[_0x7b6c31(0xde)])+'\x20\x20'+(_0x7433a?a122_0x1aac88['gray'](_0x7b6c31(0xe1)):a122_0x1aac88['green'](_0x7b6c31(0xf3))),'value':_0x2508d3['path'],'checked':!_0x7433a,'disabled':_0x7433a};});if(_0x2650ee[_0x57535f(0xfa)]===0x0)throw new Error(_0x57535f(0xf1));const _0x4a4e5b=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x2650ee,'loop':![],'theme':{'prefix':''}}));if(_0x4a4e5b[_0x57535f(0xfa)]===0x0)throw new Error(_0x57535f(0xe9));return _0x5cdf27[_0x57535f(0xe5)](_0x44862a=>_0x4a4e5b[_0x57535f(0xf4)](_0x44862a['path']));}export function isInteractive(){return process['stdin']['isTTY']===!![];}export function requireInteractive(){const _0x48f01a=a122_0x1a86;if(!isInteractive())throw new Error(_0x48f01a(0xe3)+_0x48f01a(0xee));}
1
+ (function(_0x2992da,_0x6a8d34){const _0x3ae4cb=a124_0x3db0,_0x1a73cc=_0x2992da();while(!![]){try{const _0x221306=parseInt(_0x3ae4cb(0x107))/0x1*(parseInt(_0x3ae4cb(0xff))/0x2)+-parseInt(_0x3ae4cb(0x102))/0x3+-parseInt(_0x3ae4cb(0xf6))/0x4+parseInt(_0x3ae4cb(0x103))/0x5*(parseInt(_0x3ae4cb(0x10c))/0x6)+-parseInt(_0x3ae4cb(0xef))/0x7*(parseInt(_0x3ae4cb(0xf8))/0x8)+parseInt(_0x3ae4cb(0xf2))/0x9*(parseInt(_0x3ae4cb(0xf9))/0xa)+parseInt(_0x3ae4cb(0xfb))/0xb;if(_0x221306===_0x6a8d34)break;else _0x1a73cc['push'](_0x1a73cc['shift']());}catch(_0xc3105d){_0x1a73cc['push'](_0x1a73cc['shift']());}}}(a124_0x3967,0x1dbe1));import a124_0x53e8b6 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a124_0x223e84 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x5cfdbd){return _0x5cfdbd['catch'](_0xe4a53=>{const _0x1b478f=a124_0x3db0;if(_0xe4a53?.[_0x1b478f(0x111)]===_0x1b478f(0x101))throw CliErrors['cancelled'](_0x1b478f(0xfd));throw _0xe4a53;});}export function startSpinner(_0x3bc4b7){return a124_0x223e84({'text':_0x3bc4b7,'color':'cyan'})['start']();}function a124_0x3db0(_0x2c05fb,_0x155a97){_0x2c05fb=_0x2c05fb-0xee;const _0x3967fc=a124_0x3967();let _0x3db0c4=_0x3967fc[_0x2c05fb];return _0x3db0c4;}export function stopSpinner(_0x21efe6,_0x16e850,_0x3f31f6){const _0x775fa6=a124_0x3db0;_0x3f31f6?_0x21efe6[_0x775fa6(0xf0)](_0x16e850):_0x21efe6[_0x775fa6(0x117)](_0x16e850);}export async function askConfirm(_0x32f300){return onCancel(confirm({'message':_0x32f300,'theme':{'prefix':''}}));}export async function askJsUrl(_0x454092){const _0x1ecd47=a124_0x3db0;while(!![]){const _0x27290c=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x454092,'theme':{'prefix':''}}));if(_0x27290c['trim']()==='')throw CliErrors[_0x1ecd47(0x108)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x27290c[_0x1ecd47(0x10b)]())){console[_0x1ecd47(0x116)](a124_0x53e8b6[_0x1ecd47(0x115)](_0x1ecd47(0x104)));continue;}const _0x377649=startSpinner(_0x1ecd47(0x112));try{const _0x43f636=await isUrlReachable(_0x27290c[_0x1ecd47(0x10b)]());stopSpinner(_0x377649,_0x1ecd47(0xee),_0x43f636);if(!_0x43f636){console[_0x1ecd47(0x116)](a124_0x53e8b6[_0x1ecd47(0x115)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x27290c[_0x1ecd47(0x10b)]();}catch(_0x3e3ecd){stopSpinner(_0x377649,'JS\x20URL\x20check\x20failed',![]);throw _0x3e3ecd;}}}export async function askCssUrl(_0x57c70b){const _0x1ff17d=a124_0x3db0;while(!![]){const _0x4a2950=await onCancel(input({'message':_0x1ff17d(0x118),'default':_0x57c70b,'theme':{'prefix':''}}));if(_0x4a2950[_0x1ff17d(0x10b)]()==='')throw CliErrors[_0x1ff17d(0x108)](_0x1ff17d(0xfd));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x1ff17d(0x110)](_0x4a2950[_0x1ff17d(0x10b)]())){console['error'](a124_0x53e8b6[_0x1ff17d(0x115)](_0x1ff17d(0x10e)));continue;}const _0x4b73bc=startSpinner(_0x1ff17d(0x105));try{const _0x58c61b=await isUrlReachable(_0x4a2950['trim']());stopSpinner(_0x4b73bc,_0x1ff17d(0x100),_0x58c61b);if(!_0x58c61b){console[_0x1ff17d(0x116)](a124_0x53e8b6[_0x1ff17d(0x115)](_0x1ff17d(0x11a)));continue;}return _0x4a2950['trim']();}catch(_0x3a7899){stopSpinner(_0x4b73bc,'CSS\x20URL\x20check\x20failed',![]);throw _0x3a7899;}}}export async function selectPages(_0x3ec6e4,_0x318296){const _0x5ad4e4=a124_0x3db0,_0x3ad7ce=_0x3ec6e4[_0x5ad4e4(0x10a)](_0x32ce99=>{const _0x4b2d78=_0x5ad4e4,_0x229785=_0x318296[_0x4b2d78(0x109)](_0x32ce99['path']);return{'name':_0x32ce99[_0x4b2d78(0x106)]+'\x20\x20'+a124_0x53e8b6['gray'](_0x32ce99[_0x4b2d78(0x10d)])+'\x20\x20'+(_0x229785?a124_0x53e8b6[_0x4b2d78(0xfa)](_0x4b2d78(0xf3)):a124_0x53e8b6['green'](_0x4b2d78(0x10f))),'value':_0x32ce99[_0x4b2d78(0x10d)],'checked':!_0x229785,'disabled':_0x229785};});if(_0x3ad7ce[_0x5ad4e4(0x113)]===0x0)throw new Error(_0x5ad4e4(0xfc));const _0x176165=await onCancel(checkbox({'message':_0x5ad4e4(0xf5),'choices':_0x3ad7ce,'loop':![],'theme':{'prefix':''}}));if(_0x176165[_0x5ad4e4(0x113)]===0x0)throw new Error(_0x5ad4e4(0x114));return _0x3ec6e4[_0x5ad4e4(0xfe)](_0x55c9d3=>_0x176165['includes'](_0x55c9d3[_0x5ad4e4(0x10d)]));}export function isInteractive(){const _0xe2afbf=a124_0x3db0;return process[_0xe2afbf(0xf7)][_0xe2afbf(0xf1)]===!![];}function a124_0x3967(){const _0x34c319=['No\x20menus\x20selected.','red','error','fail','\x20\x20CSS\x20URL:','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','JS\x20URL\x20checked','4137GcBGwD','succeed','isTTY','71559GVKltY','[already\x20on\x20platform]','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','75264bkqjnw','stdin','1808hEZdBC','130Cxodqn','gray','844877bQtcNe','No\x20local\x20pages\x20found.','Cancelled.','filter','2306vuHpJh','CSS\x20URL\x20checked','ExitPromptError','652362TxwGbL','188120TKDjPo','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20Checking\x20CSS\x20URL\x20reachability...','label','107pTYTVE','cancelled','has','map','trim','30EzKjQo','path','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','[new]','test','name','\x20\x20Checking\x20JS\x20URL\x20reachability...','length'];a124_0x3967=function(){return _0x34c319;};return a124_0x3967();}export function requireInteractive(){const _0x3f1950=a124_0x3db0;if(!isInteractive())throw new Error(_0x3f1950(0x119)+_0x3f1950(0xf4));}
@@ -1 +1 @@
1
- function a123_0xcf8c(_0xc93dc3,_0x1a4288){_0xc93dc3=_0xc93dc3-0x73;const _0x3285f9=a123_0x3285();let _0xcf8cb9=_0x3285f9[_0xc93dc3];return _0xcf8cb9;}const a123_0x35f0be=a123_0xcf8c;(function(_0x250c28,_0x14e4c9){const _0x4413d9=a123_0xcf8c,_0x202dda=_0x250c28();while(!![]){try{const _0x3af9df=parseInt(_0x4413d9(0x87))/0x1+parseInt(_0x4413d9(0x79))/0x2+parseInt(_0x4413d9(0x7e))/0x3*(parseInt(_0x4413d9(0x76))/0x4)+-parseInt(_0x4413d9(0x8c))/0x5+parseInt(_0x4413d9(0x77))/0x6+parseInt(_0x4413d9(0x83))/0x7+parseInt(_0x4413d9(0x81))/0x8*(parseInt(_0x4413d9(0x73))/0x9);if(_0x3af9df===_0x14e4c9)break;else _0x202dda['push'](_0x202dda['shift']());}catch(_0x450e2e){_0x202dda['push'](_0x202dda['shift']());}}}(a123_0x3285,0x9adb7));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a123_0x35f0be(0x82)](),a123_0x35f0be(0x89));export function extractTitleFromComment(_0x12a595){const _0x3a8c20=a123_0x35f0be;try{const _0x17a18c=readFileSync(_0x12a595,_0x3a8c20(0x88)),_0x1acc4f=_0x17a18c[_0x3a8c20(0x7b)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1acc4f&&_0x1acc4f[0x1]){const _0x2661ff=_0x1acc4f[0x1],_0x26059f=_0x2661ff[_0x3a8c20(0x7b)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x26059f&&_0x26059f[0x1])return _0x26059f[0x1][_0x3a8c20(0x7f)]();}let _0x4da816=null;const _0x5382e6=_0x17a18c[_0x3a8c20(0x7b)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5382e6&&_0x5382e6[0x1]&&(_0x4da816=_0x5382e6[0x1]);if(!_0x4da816){const _0x5e72b3=_0x17a18c[_0x3a8c20(0x7b)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x5e72b3&&_0x5e72b3[0x1]&&(_0x4da816=_0x5e72b3[0x1]);}if(_0x4da816){const _0x3ada52=new RegExp('\x5cb'+_0x4da816+_0x3a8c20(0x80)),_0x1e06cf=_0x17a18c['match'](_0x3ada52);if(_0x1e06cf&&_0x1e06cf[0x1])return _0x1e06cf[0x1];return _0x4da816;}return null;}catch(_0x950360){return null;}}export function getLocalPages(_0x1b7f51=pagesDir,_0x31c3c8=pagesDir){const _0x2f510c=a123_0x35f0be;let _0x2790cc=[];const _0x51c2a8=readdirSync(_0x1b7f51);return _0x51c2a8[_0x2f510c(0x75)](_0x2afa74=>{const _0x448d13=_0x2f510c,_0x144552=join(_0x1b7f51,_0x2afa74),_0x3dfd43=statSync(_0x144552);if(_0x3dfd43&&_0x3dfd43[_0x448d13(0x86)]())_0x2790cc=_0x2790cc[_0x448d13(0x7a)](getLocalPages(_0x144552,_0x31c3c8));else{if(_0x2afa74['endsWith'](_0x448d13(0x7d))){let _0x16f3f9=relative(_0x31c3c8,_0x144552);_0x16f3f9['endsWith'](_0x448d13(0x7c))?_0x16f3f9=_0x16f3f9[_0x448d13(0x74)](/index\.tsx$/,''):_0x16f3f9=_0x16f3f9[_0x448d13(0x74)](/\.tsx$/,'');_0x16f3f9[_0x448d13(0x8a)](sep)&&(_0x16f3f9=_0x16f3f9['slice'](0x0,-0x1));const _0xe367a3=_0x16f3f9['split'](sep)[_0x448d13(0x8b)]('/'),_0x2625f5=extractTitleFromComment(_0x144552),_0x182116=_0x2625f5||_0xe367a3;_0x2790cc[_0x448d13(0x85)]({'path':_0xe367a3[_0x448d13(0x84)]('$',':'),'label':_0x182116});}}}),_0x2790cc[_0x2f510c(0x78)](_0x15a5dc=>_0x15a5dc['path']!=='');}function a123_0x3285(){const _0x264570=['trim','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','24zLAlyj','cwd','4195149rizSjJ','replaceAll','push','isDirectory','214781nEhtwE','utf-8','src/pages','endsWith','join','4545575gWofvV','1363113KnhlbV','replace','forEach','632DLSDjW','461766nIKaUf','filter','279376ATUwtr','concat','match','index.tsx','.tsx','1107MvgymZ'];a123_0x3285=function(){return _0x264570;};return a123_0x3285();}
1
+ function a125_0x4b33(){const _0x535928=['6854712jAnaNt','split','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','3548180oDQNEM','path','index.tsx','3535028NTAgTM','24wTYDuN','6639248wLWmXg','.tsx','endsWith','102713JIgrSU','match','trim','4575951ViNSmT','2103696WSxMlH','push','4TGGBIA','replace','replaceAll'];a125_0x4b33=function(){return _0x535928;};return a125_0x4b33();}(function(_0x503a75,_0x471128){const _0x634f1a=a125_0x5d87,_0x421fa4=_0x503a75();while(!![]){try{const _0x293ee1=parseInt(_0x634f1a(0x14a))/0x1*(parseInt(_0x634f1a(0x13c))/0x2)+parseInt(_0x634f1a(0x14e))/0x3+-parseInt(_0x634f1a(0x145))/0x4+-parseInt(_0x634f1a(0x142))/0x5+-parseInt(_0x634f1a(0x13f))/0x6+parseInt(_0x634f1a(0x147))/0x7+parseInt(_0x634f1a(0x146))/0x8*(parseInt(_0x634f1a(0x14d))/0x9);if(_0x293ee1===_0x471128)break;else _0x421fa4['push'](_0x421fa4['shift']());}catch(_0x29de1c){_0x421fa4['push'](_0x421fa4['shift']());}}}(a125_0x4b33,0x9d5f2));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),'src/pages');export function extractTitleFromComment(_0x424883){const _0x37caf8=a125_0x5d87;try{const _0x218465=readFileSync(_0x424883,'utf-8'),_0x833070=_0x218465[_0x37caf8(0x14b)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x833070&&_0x833070[0x1]){const _0x59e109=_0x833070[0x1],_0x3aa39f=_0x59e109[_0x37caf8(0x14b)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x3aa39f&&_0x3aa39f[0x1])return _0x3aa39f[0x1][_0x37caf8(0x14c)]();}let _0x661abd=null;const _0x55ca6e=_0x218465[_0x37caf8(0x14b)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x55ca6e&&_0x55ca6e[0x1]&&(_0x661abd=_0x55ca6e[0x1]);if(!_0x661abd){const _0x20ce97=_0x218465[_0x37caf8(0x14b)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x20ce97&&_0x20ce97[0x1]&&(_0x661abd=_0x20ce97[0x1]);}if(_0x661abd){const _0x76f828=new RegExp('\x5cb'+_0x661abd+_0x37caf8(0x141)),_0x120ee8=_0x218465[_0x37caf8(0x14b)](_0x76f828);if(_0x120ee8&&_0x120ee8[0x1])return _0x120ee8[0x1];return _0x661abd;}return null;}catch(_0x41b1a2){return null;}}function a125_0x5d87(_0xe71ca,_0x214d1c){_0xe71ca=_0xe71ca-0x13b;const _0x4b3387=a125_0x4b33();let _0x5d87fe=_0x4b3387[_0xe71ca];return _0x5d87fe;}export function getLocalPages(_0x565055=pagesDir,_0x48cfdd=pagesDir){const _0x3aabe6=a125_0x5d87;let _0x162bee=[];const _0x2728b9=readdirSync(_0x565055);return _0x2728b9['forEach'](_0x10ca2e=>{const _0x425cd5=a125_0x5d87,_0x57c7d3=join(_0x565055,_0x10ca2e),_0x15b234=statSync(_0x57c7d3);if(_0x15b234&&_0x15b234['isDirectory']())_0x162bee=_0x162bee['concat'](getLocalPages(_0x57c7d3,_0x48cfdd));else{if(_0x10ca2e[_0x425cd5(0x149)](_0x425cd5(0x148))){let _0xac27fa=relative(_0x48cfdd,_0x57c7d3);_0xac27fa['endsWith'](_0x425cd5(0x144))?_0xac27fa=_0xac27fa[_0x425cd5(0x13d)](/index\.tsx$/,''):_0xac27fa=_0xac27fa[_0x425cd5(0x13d)](/\.tsx$/,'');_0xac27fa['endsWith'](sep)&&(_0xac27fa=_0xac27fa['slice'](0x0,-0x1));const _0x5bebf6=_0xac27fa[_0x425cd5(0x140)](sep)['join']('/'),_0x374a3f=extractTitleFromComment(_0x57c7d3),_0x479739=_0x374a3f||_0x5bebf6;_0x162bee[_0x425cd5(0x13b)]({'path':_0x5bebf6[_0x425cd5(0x13e)]('$',':'),'label':_0x479739});}}}),_0x162bee['filter'](_0x55df95=>_0x55df95[_0x3aabe6(0x143)]!=='');}
@@ -1 +1 @@
1
- (function(_0x2d326b,_0x2563e9){const _0x201b4c=a124_0x1237,_0x3b7079=_0x2d326b();while(!![]){try{const _0x2f97ca=parseInt(_0x201b4c(0x12a))/0x1*(-parseInt(_0x201b4c(0x133))/0x2)+-parseInt(_0x201b4c(0x135))/0x3+-parseInt(_0x201b4c(0x125))/0x4*(parseInt(_0x201b4c(0x131))/0x5)+parseInt(_0x201b4c(0x122))/0x6+-parseInt(_0x201b4c(0x129))/0x7+-parseInt(_0x201b4c(0x12b))/0x8*(-parseInt(_0x201b4c(0x134))/0x9)+parseInt(_0x201b4c(0x124))/0xa;if(_0x2f97ca===_0x2563e9)break;else _0x3b7079['push'](_0x3b7079['shift']());}catch(_0x1856ad){_0x3b7079['push'](_0x3b7079['shift']());}}}(a124_0x2ac5,0xbf6c0));function a124_0x1237(_0x6e8d13,_0x41a8d3){_0x6e8d13=_0x6e8d13-0x121;const _0x2ac5d3=a124_0x2ac5();let _0x123728=_0x2ac5d3[_0x6e8d13];return _0x123728;}function a124_0x2ac5(){const _0x5df454=['CSS\x20URL\x20is\x20unreachable','5572847yTBmxv','4859ZwsFSZ','64744JvIfrf','has','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','push','JS\x20URL\x20is\x20unreachable','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','465910msGZks','map','296OJJKIK','1341gprqAu','1630242dzIKKM','filter','label','9332088iDJkew','errors','5474360ISlEZC','20kfETvY','path','length'];a124_0x2ac5=function(){return _0x5df454;};return a124_0x2ac5();}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(_0x22ad71){const _0x2078bd=a124_0x1237,_0x4c667f=[];return!isValidJsHttpsUrl(_0x22ad71)&&_0x4c667f[_0x2078bd(0x12e)](_0x2078bd(0x12d)),{'ok':_0x4c667f[_0x2078bd(0x127)]===0x0,'errors':_0x4c667f};}export function validateCssUrl(_0x3352ec){const _0x54f44c=a124_0x1237,_0x127c06=[];return!isValidCssHttpsUrl(_0x3352ec)&&_0x127c06['push'](_0x54f44c(0x130)),{'ok':_0x127c06['length']===0x0,'errors':_0x127c06};}export async function validateJsUrlReachable(_0x3be701){const _0x3b1f6d=a124_0x1237,_0x2c632b=validateJsUrl(_0x3be701);if(!_0x2c632b['ok'])return _0x2c632b;const _0xd2811c=await isUrlReachable(_0x3be701);if(!_0xd2811c)_0x2c632b[_0x3b1f6d(0x123)][_0x3b1f6d(0x12e)](_0x3b1f6d(0x12f));return{'ok':_0x2c632b[_0x3b1f6d(0x123)][_0x3b1f6d(0x127)]===0x0,'errors':_0x2c632b['errors']};}export async function validateCssUrlReachable(_0x844162){const _0x41eb22=a124_0x1237,_0x207730=validateCssUrl(_0x844162);if(!_0x207730['ok'])return _0x207730;const _0x211121=await isUrlReachable(_0x844162);if(!_0x211121)_0x207730['errors'][_0x41eb22(0x12e)](_0x41eb22(0x128));return{'ok':_0x207730[_0x41eb22(0x123)][_0x41eb22(0x127)]===0x0,'errors':_0x207730['errors']};}export function buildCompareRows(_0x222ee5,_0x4afdde){const _0x3a779b=a124_0x1237;return _0x222ee5[_0x3a779b(0x132)](_0x438e92=>({'label':_0x438e92[_0x3a779b(0x121)],'path':_0x438e92[_0x3a779b(0x126)],'local':!![],'online':_0x4afdde[_0x3a779b(0x12c)](_0x438e92[_0x3a779b(0x126)])}));}export async function doCreateMenus(_0x3d7a5c,_0x2eaf73,_0x533390,_0x5b8919){const _0x8a27f2=a124_0x1237,_0x53dccd=await createMenus(_0x3d7a5c,_0x2eaf73,_0x533390,_0x5b8919);return{'created':_0x53dccd[_0x8a27f2(0x127)],'failed':0x0,'labels':_0x533390['map'](_0x270045=>_0x270045[_0x8a27f2(0x121)]),'menus':_0x53dccd};}export function filterMenusWithResources(_0x4c83fd){const _0x2b1c25=a124_0x1237;return _0x4c83fd[_0x2b1c25(0x136)](_0x25a9bd=>_0x25a9bd['resources'][_0x2b1c25(0x127)]>0x0);}export async function fetchMenuData(_0x30c039,_0xa4ad89){const _0x3143d1=a124_0x1237,_0x1f3962=getLocalPages(),_0x33d764=await getOnlineMenuList(_0x30c039,_0xa4ad89),_0x1af7ab=new Set(_0x33d764[_0x3143d1(0x132)](_0xedc048=>_0xedc048[_0x3143d1(0x126)]));return{'localPages':_0x1f3962,'onlineMenuList':_0x33d764,'onlinePaths':_0x1af7ab};}export async function fetchOnlineMenuList(_0x255f1e,_0x32ee8d){return getOnlineMenuList(_0x255f1e,_0x32ee8d);}
1
+ (function(_0x357c9f,_0xd83cee){const _0xd45ba8=a126_0x2041,_0x5b154c=_0x357c9f();while(!![]){try{const _0x146662=-parseInt(_0xd45ba8(0xe6))/0x1+parseInt(_0xd45ba8(0xf6))/0x2+-parseInt(_0xd45ba8(0xf3))/0x3*(parseInt(_0xd45ba8(0xef))/0x4)+-parseInt(_0xd45ba8(0xec))/0x5*(-parseInt(_0xd45ba8(0xf4))/0x6)+-parseInt(_0xd45ba8(0xe4))/0x7*(-parseInt(_0xd45ba8(0xf7))/0x8)+-parseInt(_0xd45ba8(0xe9))/0x9+parseInt(_0xd45ba8(0xe8))/0xa*(parseInt(_0xd45ba8(0xf0))/0xb);if(_0x146662===_0xd83cee)break;else _0x5b154c['push'](_0x5b154c['shift']());}catch(_0x128879){_0x5b154c['push'](_0x5b154c['shift']());}}}(a126_0x158c,0xd627f));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(_0x51418e){const _0x7c85a5=a126_0x2041,_0x513e2c=[];return!isValidJsHttpsUrl(_0x51418e)&&_0x513e2c[_0x7c85a5(0xe2)](_0x7c85a5(0xe5)),{'ok':_0x513e2c[_0x7c85a5(0xf2)]===0x0,'errors':_0x513e2c};}export function validateCssUrl(_0x57be73){const _0x29e0d2=a126_0x2041,_0x930643=[];return!isValidCssHttpsUrl(_0x57be73)&&_0x930643[_0x29e0d2(0xe2)](_0x29e0d2(0xeb)),{'ok':_0x930643[_0x29e0d2(0xf2)]===0x0,'errors':_0x930643};}export async function validateJsUrlReachable(_0x2bd5ca){const _0x55e9f8=a126_0x2041,_0x44ba1d=validateJsUrl(_0x2bd5ca);if(!_0x44ba1d['ok'])return _0x44ba1d;const _0x3ac432=await isUrlReachable(_0x2bd5ca);if(!_0x3ac432)_0x44ba1d[_0x55e9f8(0xee)][_0x55e9f8(0xe2)](_0x55e9f8(0xe3));return{'ok':_0x44ba1d[_0x55e9f8(0xee)][_0x55e9f8(0xf2)]===0x0,'errors':_0x44ba1d['errors']};}export async function validateCssUrlReachable(_0x5e739f){const _0x51da62=a126_0x2041,_0x43b56d=validateCssUrl(_0x5e739f);if(!_0x43b56d['ok'])return _0x43b56d;const _0x2e86ab=await isUrlReachable(_0x5e739f);if(!_0x2e86ab)_0x43b56d[_0x51da62(0xee)][_0x51da62(0xe2)](_0x51da62(0xed));return{'ok':_0x43b56d[_0x51da62(0xee)][_0x51da62(0xf2)]===0x0,'errors':_0x43b56d[_0x51da62(0xee)]};}export function buildCompareRows(_0x57b2a2,_0xe427c7){const _0x51822a=a126_0x2041;return _0x57b2a2[_0x51822a(0xf5)](_0x2fce54=>({'label':_0x2fce54[_0x51822a(0xea)],'path':_0x2fce54[_0x51822a(0xe7)],'local':!![],'online':_0xe427c7[_0x51822a(0xf8)](_0x2fce54[_0x51822a(0xe7)])}));}export async function doCreateMenus(_0x439e98,_0x5112f5,_0x44b73c,_0x3c3b8e){const _0x535c55=a126_0x2041,_0x2517dc=await createMenus(_0x439e98,_0x5112f5,_0x44b73c,_0x3c3b8e);return{'created':_0x2517dc['length'],'failed':0x0,'labels':_0x44b73c['map'](_0x4a066c=>_0x4a066c[_0x535c55(0xea)]),'menus':_0x2517dc};}function a126_0x158c(){const _0x50559f=['JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','1111124tQWcbY','path','10rMGUoW','9939186znrfWc','label','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','65060RlFDto','CSS\x20URL\x20is\x20unreachable','errors','130136lbtfVG','6308269QfjGJS','resources','length','15uHPoTo','522IUUVLb','map','726444gXbcdm','8gWlWWj','has','push','JS\x20URL\x20is\x20unreachable','8306102Xyxguh'];a126_0x158c=function(){return _0x50559f;};return a126_0x158c();}export function filterMenusWithResources(_0x1c53d0){const _0x13e256=a126_0x2041;return _0x1c53d0['filter'](_0x5ca6b1=>_0x5ca6b1[_0x13e256(0xf1)][_0x13e256(0xf2)]>0x0);}export async function fetchMenuData(_0x49c5bb,_0x3b289c){const _0x34cfe4=a126_0x2041,_0x80cd12=getLocalPages(),_0x287adc=await getOnlineMenuList(_0x49c5bb,_0x3b289c),_0x107923=new Set(_0x287adc['map'](_0x22548c=>_0x22548c[_0x34cfe4(0xe7)]));return{'localPages':_0x80cd12,'onlineMenuList':_0x287adc,'onlinePaths':_0x107923};}function a126_0x2041(_0x1c0243,_0x16966a){_0x1c0243=_0x1c0243-0xe2;const _0x158c60=a126_0x158c();let _0x2041bf=_0x158c60[_0x1c0243];return _0x2041bf;}export async function fetchOnlineMenuList(_0x46696e,_0x2162ba){return getOnlineMenuList(_0x46696e,_0x2162ba);}
@@ -1 +1 @@
1
- const a125_0x66eb8a=a125_0x1cac;(function(_0x3bab01,_0x8b4f29){const _0x221c62=a125_0x1cac,_0xcfbe91=_0x3bab01();while(!![]){try{const _0xdec0ea=parseInt(_0x221c62(0x173))/0x1*(parseInt(_0x221c62(0x15c))/0x2)+parseInt(_0x221c62(0x12b))/0x3+-parseInt(_0x221c62(0x145))/0x4+-parseInt(_0x221c62(0x142))/0x5*(-parseInt(_0x221c62(0x15d))/0x6)+parseInt(_0x221c62(0x150))/0x7*(-parseInt(_0x221c62(0x136))/0x8)+-parseInt(_0x221c62(0x119))/0x9+parseInt(_0x221c62(0x158))/0xa*(-parseInt(_0x221c62(0x131))/0xb);if(_0xdec0ea===_0x8b4f29)break;else _0xcfbe91['push'](_0xcfbe91['shift']());}catch(_0x1983f4){_0xcfbe91['push'](_0xcfbe91['shift']());}}}(a125_0x2b2d,0x5dd7d));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':'number','required':!![],'description':'Exact\x20online\x20menu\x20id'};function a125_0x2b2d(){const _0x17c4e3=['backend','read\x20online\x20menu\x20facts\x20before\x20','cookie','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','parentId','string','\x20parent\x20changed:\x20expected\x20','Menu\x20','verification','validation','21837BpVBEz','failed','byId','menu_sort_invalid','yes','planFile','Online\x20menu\x20not\x20found:\x20','code','message','call','map','938943YsHveL','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','isSafeInteger',',\x20current\x20','number','dry-run','after','hasOwnProperty',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','max','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','defineProperty','cascade','length','hash','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','1358817jAXlnm','Reorder\x20sibling\x20menus\x20below\x20','num','Permission\x20denied\x20while\x20attempting\x20to\x20','menu_sort_overflow','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','924VtUMZZ','menu_permission_denied','expected-children-count','expect-parent-id','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','86712mSSPfK','menu_parent_not_folder','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','filter','prototype','Online\x20menu\x20state\x20changed\x20before\x20','folder','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','str','toLowerCase','\x20path\x20changed:\x20expected\x20','api_error','1857265CUwklS','warnings','bool','175760KAtsrO','succeeded','childrenCount','get','type','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','test','menu_state_drift','recheck\x20online\x20menu\x20facts\x20before\x20','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','133mHeLvA','hint','data','flagMissing','path','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','expect-path','44010qPdrFU','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','error','menu_not_found','26qnDAcO','6CrLBat','deleteOrder','menu_confirmation_required','stage','rawFlags','\x20menu\x20','root','stringify','plannedActions','snapshotHash','menu_verification_failed','pre-write-recheck'];a125_0x2b2d=function(){return _0x17c4e3;};return a125_0x2b2d();}export const MENU_SORT_FLAG={'name':'sort','type':a125_0x66eb8a(0x11f),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':'parent-id','type':a125_0x66eb8a(0x16e),'description':a125_0x66eb8a(0x130)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a125_0x66eb8a(0x134),'type':'string','description':a125_0x66eb8a(0x13d)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':'string','description':a125_0x66eb8a(0x12a)},{'name':a125_0x66eb8a(0x133),'type':'number','description':a125_0x66eb8a(0x125)}];export function validateExactId(_0x35a973){const _0x1909e2=a125_0x66eb8a,_0x3758af=_0x35a973[_0x1909e2(0x12d)]('id');if(!Number[_0x1909e2(0x11d)](_0x3758af)||_0x3758af<=0x0)throw CliErrors[_0x1909e2(0x172)](_0x1909e2(0x155));return _0x3758af;}export function validateSort(_0x40f885,_0x30b4aa='sort'){const _0x295593=a125_0x66eb8a;if(!hasFlag(_0x40f885,_0x30b4aa))return undefined;const _0x2e89e4=_0x40f885[_0x295593(0x12d)](_0x30b4aa);if(!Number[_0x295593(0x11d)](_0x2e89e4)||_0x2e89e4<0x0||_0x2e89e4>MAX_MENU_SORT)throw menuError(_0x295593(0x111),'--'+_0x30b4aa+_0x295593(0x159)+MAX_MENU_SORT+'.',_0x295593(0x138));return _0x2e89e4;}export function nextSiblingSort(_0x4943a0,_0x3b95db,_0x4b56c4){const _0x5a7393=a125_0x66eb8a,_0x10210f=getChildren(_0x4943a0,_0x3b95db)[_0x5a7393(0x118)](_0x24b789=>_0x24b789['sort'])[_0x5a7393(0x139)](_0x1dad9b=>typeof _0x1dad9b===_0x5a7393(0x11f));if(_0x10210f[_0x5a7393(0x128)]===0x0)return 0x0;const _0x255779=Math[_0x5a7393(0x124)](..._0x10210f);if(_0x255779>=MAX_MENU_SORT)throw menuError(_0x5a7393(0x12f),'Cannot\x20append\x20a\x20'+_0x4b56c4+_0x5a7393(0x11b)+_0x255779+'.',_0x5a7393(0x12c)+MAX_MENU_SORT+_0x5a7393(0x123));return _0x255779+0x1;}export function requireExplicitYes(_0x244c28){const _0x37545c=a125_0x66eb8a;if(_0x244c28['bool'](_0x37545c(0x120)))return;if(!_0x244c28[_0x37545c(0x144)](_0x37545c(0x112)))throw menuError(_0x37545c(0x15f),_0x37545c(0x135),_0x37545c(0x16c));}export async function fetchMutationSnapshot(_0x293693,_0x3d4232,_0x3d2c0e){const _0x58606e=a125_0x66eb8a;try{return await fetchMenuSnapshot(_0x293693['appCode'],_0x293693[_0x58606e(0x16b)]);}catch(_0x5529ae){throw mapMenuApiError(_0x5529ae,_0x58606e(0x16a)+_0x3d4232,_0x3d2c0e);}}export async function recheckMutationSnapshot(_0x33c0f5,_0x27c5e5,_0x1b33c7,_0x210821){const _0x450a98=a125_0x66eb8a;let _0x5eb0fd;try{_0x5eb0fd=await fetchMenuSnapshot(_0x33c0f5['appCode'],_0x33c0f5['cookie']);}catch(_0x66e468){const _0xa4bc5e=mapMenuApiError(_0x66e468,_0x450a98(0x14e)+_0x1b33c7,_0x210821);throw menuFailure(_0xa4bc5e,_0x27c5e5,{'stage':_0x450a98(0x168),'failed':_0x210821==null?{}:{'id':_0x210821}});}if(_0x5eb0fd[_0x450a98(0x129)]!==_0x27c5e5['snapshotHash']){const _0x4aecf3=menuError(_0x450a98(0x14d),_0x450a98(0x13b)+_0x1b33c7+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0x450a98(0x14b));throw menuFailure(_0x4aecf3,_0x27c5e5,{'stage':_0x450a98(0x168),'failed':{..._0x210821==null?{}:{'id':_0x210821},'expectedSnapshotHash':_0x27c5e5[_0x450a98(0x166)],'currentSnapshotHash':_0x5eb0fd[_0x450a98(0x129)]}});}return _0x5eb0fd;}export function parseParentId(_0x6e17e1,_0x231f90,_0x44f5a5={}){const _0x3a0bde=a125_0x66eb8a;if(!hasFlag(_0x6e17e1,_0x231f90)){if(_0x44f5a5['required'])throw CliErrors[_0x3a0bde(0x153)](_0x231f90);return undefined;}const _0x85c21f=_0x6e17e1[_0x3a0bde(0x13e)](_0x231f90)['trim']();if(_0x85c21f[_0x3a0bde(0x13f)]()===_0x3a0bde(0x163))return null;if(!/^\d+$/[_0x3a0bde(0x14c)](_0x85c21f))throw CliErrors[_0x3a0bde(0x172)]('--'+_0x231f90+_0x3a0bde(0x156));const _0x49a883=Number(_0x85c21f);if(!Number['isSafeInteger'](_0x49a883)||_0x49a883<=0x0)throw CliErrors[_0x3a0bde(0x172)]('--'+_0x231f90+_0x3a0bde(0x156));return _0x49a883;}export function requireMenu(_0x2510d9,_0x1abf36){const _0x339f1f=a125_0x66eb8a,_0x40a389=_0x2510d9[_0x339f1f(0x110)][_0x339f1f(0x148)](_0x1abf36);if(!_0x40a389)throw menuError(_0x339f1f(0x15b),_0x339f1f(0x114)+_0x1abf36,_0x339f1f(0x11a));return _0x40a389;}export function requireFolder(_0x2b048d,_0x4c642f){const _0x39cafb=a125_0x66eb8a,_0x15c2a2=requireMenu(_0x2b048d,_0x4c642f);if(_0x15c2a2[_0x39cafb(0x149)]!==_0x39cafb(0x13c))throw menuError(_0x39cafb(0x137),_0x39cafb(0x170)+_0x4c642f+'\x20is\x20type\x20\x22'+(_0x15c2a2[_0x39cafb(0x149)]||'unknown')+'\x22,\x20not\x20folder.','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x15c2a2;}export function assertExpectedState(_0x5ba332,_0x599721){const _0x4d2180=a125_0x66eb8a;if(hasFlag(_0x5ba332,_0x4d2180(0x134))){const _0x2d216e=parseParentId(_0x5ba332,_0x4d2180(0x134),{'required':!![]});if(_0x599721[_0x4d2180(0x16d)]!==_0x2d216e)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+_0x4d2180(0x16f)+formatParent(_0x2d216e)+',\x20current\x20'+formatParent(_0x599721[_0x4d2180(0x16d)])+'.');}if(hasFlag(_0x5ba332,_0x4d2180(0x157))){const _0x417906=_0x5ba332[_0x4d2180(0x13e)](_0x4d2180(0x157));if(_0x599721[_0x4d2180(0x154)]!==_0x417906)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+_0x4d2180(0x140)+JSON['stringify'](_0x417906)+_0x4d2180(0x11e)+JSON[_0x4d2180(0x164)](_0x599721['path'])+'.');}if(hasFlag(_0x5ba332,_0x4d2180(0x133))){const _0x1593fd=_0x5ba332[_0x4d2180(0x12d)](_0x4d2180(0x133));if(!Number[_0x4d2180(0x11d)](_0x1593fd)||_0x1593fd<0x0)throw CliErrors[_0x4d2180(0x172)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x599721['childrenCount']!==_0x1593fd)throw stateDrift(_0x4d2180(0x170)+_0x599721['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x1593fd+_0x4d2180(0x11e)+_0x599721[_0x4d2180(0x147)]+'.');}}export function assertVerified(_0x22ba93,_0x590228,_0x545da1='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){if(!_0x22ba93)throw menuError('menu_verification_failed',_0x590228,_0x545da1);}export function mutationResult(_0xbea17f){const _0x420447=a125_0x66eb8a;return{'operation':_0xbea17f['operation'],'selector':_0xbea17f['selector'],'before':_0xbea17f['before'],'after':_0xbea17f['after'],'dryRun':_0xbea17f['dryRun'],'backend':_0xbea17f[_0x420447(0x169)],..._0xbea17f[_0x420447(0x165)]?{'plannedActions':_0xbea17f[_0x420447(0x165)]}:{},..._0xbea17f['targets']?{'targets':_0xbea17f['targets']}:{},..._0xbea17f[_0x420447(0x15e)]?{'deleteOrder':_0xbea17f[_0x420447(0x15e)]}:{},'snapshotHash':_0xbea17f[_0x420447(0x166)],..._0xbea17f[_0x420447(0x127)]?{'cascade':_0xbea17f['cascade']}:{},..._0xbea17f[_0x420447(0x113)]?{'planFile':_0xbea17f['planFile']}:{},'succeeded':_0xbea17f[_0x420447(0x146)]??[],'failed':_0xbea17f[_0x420447(0x10f)]??[],'warnings':_0xbea17f['warnings']??[],'verification':_0xbea17f['verification'],'error':_0xbea17f[_0x420447(0x15a)]};}export function menuDryRunResult(_0x23c930,_0x54ed4e){return{..._0x23c930,..._0x54ed4e};}export function menuFailure(_0x16fb8e,_0x1d1d42,_0x5c4ada){const _0x1ac368=a125_0x66eb8a,_0x20e2b8=mutationResult({..._0x1d1d42,'after':_0x5c4ada['after']===undefined?_0x1d1d42[_0x1ac368(0x121)]:_0x5c4ada[_0x1ac368(0x121)],'backend':_0x5c4ada[_0x1ac368(0x169)]??_0x1d1d42[_0x1ac368(0x169)],'dryRun':![],'succeeded':_0x5c4ada['succeeded']??[],'failed':[{..._0x5c4ada[_0x1ac368(0x10f)]??{},'stage':_0x5c4ada[_0x1ac368(0x160)],'code':_0x16fb8e[_0x1ac368(0x115)],'message':_0x16fb8e[_0x1ac368(0x116)]}],'warnings':[..._0x1d1d42[_0x1ac368(0x143)],..._0x5c4ada[_0x1ac368(0x143)]??[]],'verification':_0x5c4ada[_0x1ac368(0x171)],'error':{'code':_0x16fb8e['code'],'message':_0x16fb8e[_0x1ac368(0x116)],..._0x16fb8e['hint']?{'hint':_0x16fb8e[_0x1ac368(0x151)]}:{}}});return Object[_0x1ac368(0x126)](_0x16fb8e,_0x1ac368(0x152),{'value':_0x20e2b8,'enumerable':!![],'configurable':!![]}),_0x16fb8e;}function a125_0x1cac(_0x33a518,_0x589112){_0x33a518=_0x33a518-0x10f;const _0x2b2d74=a125_0x2b2d();let _0x1cacbf=_0x2b2d74[_0x33a518];return _0x1cacbf;}export function asVerificationError(_0x345546,_0x46da4f){const _0x5a92b5=a125_0x66eb8a;if(_0x345546 instanceof CliError&&_0x345546[_0x5a92b5(0x115)]===_0x5a92b5(0x167))return _0x345546;const _0x38aae4=_0x345546 instanceof Error?_0x345546[_0x5a92b5(0x116)]:String(_0x345546);return menuError(_0x5a92b5(0x167),''+_0x46da4f+(_0x38aae4?':\x20'+_0x38aae4:''),_0x5a92b5(0x11c));}export function describeMenuErrorCause(_0x5f0b5a,_0x119404,_0x4c837a){const _0x14e9ce=a125_0x66eb8a,_0x3b52dc=mapMenuApiError(_0x5f0b5a,_0x119404,_0x4c837a);return{'causeCode':_0x3b52dc[_0x14e9ce(0x115)],'causeMessage':_0x3b52dc[_0x14e9ce(0x116)]};}export function hasFlag(_0xa63a4d,_0x2235cb){const _0x3889ad=a125_0x66eb8a;return Object[_0x3889ad(0x13a)][_0x3889ad(0x122)][_0x3889ad(0x117)](_0xa63a4d[_0x3889ad(0x161)],_0x2235cb)&&_0xa63a4d[_0x3889ad(0x161)][_0x2235cb]!==undefined;}export function toApiParentId(_0x5e76e0){return _0x5e76e0??0x0;}export function formatParent(_0x480b48){const _0x16c5c8=a125_0x66eb8a;return _0x480b48==null?_0x16c5c8(0x163):String(_0x480b48);}export function menuError(_0x1e5d39,_0x2e591a,_0x2d3ef4){return new CliError(_0x1e5d39,0x1,_0x2e591a,_0x2d3ef4);}export function mapMenuApiError(_0x83aeb,_0x5e8bb0,_0x505dcd){const _0x53e4a2=a125_0x66eb8a;if(_0x83aeb instanceof CliError&&_0x83aeb[_0x53e4a2(0x115)]!==_0x53e4a2(0x141))return _0x83aeb;const _0x2f4df9=_0x83aeb instanceof Error?_0x83aeb[_0x53e4a2(0x116)]:String(_0x83aeb);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x53e4a2(0x14c)](_0x2f4df9))return menuError(_0x53e4a2(0x132),_0x53e4a2(0x12e)+_0x5e8bb0+(_0x505dcd?_0x53e4a2(0x162)+_0x505dcd:'')+'.',_0x53e4a2(0x14a));return menuError('menu_mutation_failed','Failed\x20to\x20'+_0x5e8bb0+(_0x505dcd?_0x53e4a2(0x162)+_0x505dcd:'')+':\x20'+_0x2f4df9,_0x53e4a2(0x14f));}export function isMenuResponseLoss(_0x217fc2){const _0x8470e0=a125_0x66eb8a,_0x4edfdb=_0x217fc2 instanceof Error?_0x217fc2[_0x8470e0(0x116)]:String(_0x217fc2);if(_0x217fc2 instanceof CliError)return _0x217fc2[_0x8470e0(0x115)]===_0x8470e0(0x141)&&/^Request (?:failed|timeout):/i['test'](_0x4edfdb);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x8470e0(0x14c)](_0x4edfdb);}function stateDrift(_0x47a11a){return menuError('menu_state_drift',_0x47a11a,'Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.');}
1
+ const a127_0x2b5dc7=a127_0x2019;(function(_0x26c920,_0x64c708){const _0x1a032e=a127_0x2019,_0x134155=_0x26c920();while(!![]){try{const _0x5c5138=-parseInt(_0x1a032e(0x1ff))/0x1*(parseInt(_0x1a032e(0x250))/0x2)+-parseInt(_0x1a032e(0x1f8))/0x3+parseInt(_0x1a032e(0x22d))/0x4*(-parseInt(_0x1a032e(0x257))/0x5)+-parseInt(_0x1a032e(0x244))/0x6+-parseInt(_0x1a032e(0x21a))/0x7*(-parseInt(_0x1a032e(0x217))/0x8)+-parseInt(_0x1a032e(0x230))/0x9+parseInt(_0x1a032e(0x21f))/0xa*(parseInt(_0x1a032e(0x24d))/0xb);if(_0x5c5138===_0x64c708)break;else _0x134155['push'](_0x134155['shift']());}catch(_0x41c913){_0x134155['push'](_0x134155['shift']());}}}(a127_0x3e59,0x366dd));import{CliError,CliErrors}from'../../../errors.js';function a127_0x3e59(){const _0x4a18e9=['Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','Permission\x20denied\x20while\x20attempting\x20to\x20','map','call','stringify','prototype','code',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','\x20path\x20changed:\x20expected\x20','743496OIuLLH','api_error','after','\x20is\x20type\x20\x22','yes','flagMissing','max','snapshotHash','get','13678423GGCgcn','planFile','Failed\x20to\x20','11826RQMsbF','str','test','menu_sort_overflow','defineProperty','\x20parent\x20changed:\x20expected\x20','hash','25mBBtIw','read\x20online\x20menu\x20facts\x20before\x20','targets','menu_mutation_failed','expected-children-count','menu_confirmation_required','Online\x20menu\x20state\x20changed\x20before\x20','data','menu_sort_invalid','appCode','Menu\x20','toLowerCase','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','rawFlags','number','plannedActions','\x20menu\x20','verification','817488eOvbLs','required','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','menu_parent_not_folder','folder','message','pre-write-recheck','20zLfEmC','num','Reorder\x20sibling\x20menus\x20below\x20','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','menu_not_found','before','Exact\x20online\x20menu\x20id','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','bool','childrenCount','parent-id','length','warnings','expect-parent-id','sort','byId','root','failed','error','backend','succeeded','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','validation','expect-path','8OprabD','\x20child\x20count\x20changed:\x20expected\x20','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','1810081BiXszZ','\x22,\x20not\x20folder.','deleteOrder','Cannot\x20append\x20a\x20','type','10NnPmuf','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.',',\x20current\x20','menu_permission_denied','menu_state_drift','selector','trim','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','path','parentId','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','hint','cascade',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','261204pEgebM','dry-run','string','3941622hONlOj','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','isSafeInteger','unknown','filter','menu_verification_failed','recheck\x20online\x20menu\x20facts\x20before\x20','cookie','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','hasOwnProperty','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.'];a127_0x3e59=function(){return _0x4a18e9;};return a127_0x3e59();}import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;function a127_0x2019(_0x33b244,_0x5276f0){_0x33b244=_0x33b244-0x1f0;const _0x3e599f=a127_0x3e59();let _0x2019e6=_0x3e599f[_0x33b244];return _0x2019e6;}export const MENU_ID_FLAG={'name':'id','type':a127_0x2b5dc7(0x1f4),'required':!![],'description':a127_0x2b5dc7(0x205)};export const MENU_SORT_FLAG={'name':a127_0x2b5dc7(0x20d),'type':a127_0x2b5dc7(0x1f4),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':a127_0x2b5dc7(0x209),'type':a127_0x2b5dc7(0x22f),'description':a127_0x2b5dc7(0x1f2)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':'expect-parent-id','type':'string','description':a127_0x2b5dc7(0x219)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a127_0x2b5dc7(0x216),'type':a127_0x2b5dc7(0x22f),'description':a127_0x2b5dc7(0x229)},{'name':a127_0x2b5dc7(0x25b),'type':a127_0x2b5dc7(0x1f4),'description':a127_0x2b5dc7(0x206)}];export function validateExactId(_0xac832b){const _0x35fd70=a127_0x2b5dc7,_0x19cb95=_0xac832b[_0x35fd70(0x200)]('id');if(!Number['isSafeInteger'](_0x19cb95)||_0x19cb95<=0x0)throw CliErrors['validation']('--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.');return _0x19cb95;}export function validateSort(_0x5d9108,_0x2d83b4='sort'){const _0x23ba5b=a127_0x2b5dc7;if(!hasFlag(_0x5d9108,_0x2d83b4))return undefined;const _0x25f8e9=_0x5d9108['num'](_0x2d83b4);if(!Number[_0x23ba5b(0x232)](_0x25f8e9)||_0x25f8e9<0x0||_0x25f8e9>MAX_MENU_SORT)throw menuError(_0x23ba5b(0x25f),'--'+_0x2d83b4+'\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20'+MAX_MENU_SORT+'.',_0x23ba5b(0x231));return _0x25f8e9;}export function nextSiblingSort(_0x4efbc8,_0x12ad85,_0x237297){const _0x104fd8=a127_0x2b5dc7,_0x1f1496=getChildren(_0x4efbc8,_0x12ad85)[_0x104fd8(0x23d)](_0x2061dc=>_0x2061dc['sort'])[_0x104fd8(0x234)](_0x54f9ff=>typeof _0x54f9ff===_0x104fd8(0x1f4));if(_0x1f1496[_0x104fd8(0x20a)]===0x0)return 0x0;const _0xb7886f=Math[_0x104fd8(0x24a)](..._0x1f1496);if(_0xb7886f>=MAX_MENU_SORT)throw menuError(_0x104fd8(0x253),_0x104fd8(0x21d)+_0x237297+'\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0xb7886f+'.',_0x104fd8(0x201)+MAX_MENU_SORT+_0x104fd8(0x242));return _0xb7886f+0x1;}export function requireExplicitYes(_0x4f97ab){const _0x1ad199=a127_0x2b5dc7;if(_0x4f97ab['bool'](_0x1ad199(0x22e)))return;if(!_0x4f97ab[_0x1ad199(0x207)](_0x1ad199(0x248)))throw menuError(_0x1ad199(0x25c),_0x1ad199(0x214),_0x1ad199(0x23a));}export async function fetchMutationSnapshot(_0x569470,_0x240568,_0x3e974c){const _0xbda81=a127_0x2b5dc7;try{return await fetchMenuSnapshot(_0x569470[_0xbda81(0x260)],_0x569470[_0xbda81(0x237)]);}catch(_0x184291){throw mapMenuApiError(_0x184291,_0xbda81(0x258)+_0x240568,_0x3e974c);}}export async function recheckMutationSnapshot(_0x182d9c,_0x1cd671,_0x5ee075,_0x2c8990){const _0x184ec3=a127_0x2b5dc7;let _0x1edbba;try{_0x1edbba=await fetchMenuSnapshot(_0x182d9c[_0x184ec3(0x260)],_0x182d9c[_0x184ec3(0x237)]);}catch(_0x6193ea){const _0x4a3d66=mapMenuApiError(_0x6193ea,_0x184ec3(0x236)+_0x5ee075,_0x2c8990);throw menuFailure(_0x4a3d66,_0x1cd671,{'stage':_0x184ec3(0x1fe),'failed':_0x2c8990==null?{}:{'id':_0x2c8990}});}if(_0x1edbba[_0x184ec3(0x256)]!==_0x1cd671['snapshotHash']){const _0xa0cbfa=menuError(_0x184ec3(0x223),_0x184ec3(0x25d)+_0x5ee075+_0x184ec3(0x22c),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.');throw menuFailure(_0xa0cbfa,_0x1cd671,{'stage':_0x184ec3(0x1fe),'failed':{..._0x2c8990==null?{}:{'id':_0x2c8990},'expectedSnapshotHash':_0x1cd671[_0x184ec3(0x24b)],'currentSnapshotHash':_0x1edbba[_0x184ec3(0x256)]}});}return _0x1edbba;}export function parseParentId(_0x3142ef,_0xe785c4,_0x359514={}){const _0x12d9ba=a127_0x2b5dc7;if(!hasFlag(_0x3142ef,_0xe785c4)){if(_0x359514[_0x12d9ba(0x1f9)])throw CliErrors[_0x12d9ba(0x249)](_0xe785c4);return undefined;}const _0x412acb=_0x3142ef[_0x12d9ba(0x251)](_0xe785c4)[_0x12d9ba(0x225)]();if(_0x412acb[_0x12d9ba(0x1f1)]()===_0x12d9ba(0x20f))return null;if(!/^\d+$/[_0x12d9ba(0x252)](_0x412acb))throw CliErrors[_0x12d9ba(0x215)]('--'+_0xe785c4+_0x12d9ba(0x220));const _0x412351=Number(_0x412acb);if(!Number['isSafeInteger'](_0x412351)||_0x412351<=0x0)throw CliErrors[_0x12d9ba(0x215)]('--'+_0xe785c4+_0x12d9ba(0x220));return _0x412351;}export function requireMenu(_0x181f6e,_0x19a352){const _0xd2829a=a127_0x2b5dc7,_0x5d08f1=_0x181f6e[_0xd2829a(0x20e)][_0xd2829a(0x24c)](_0x19a352);if(!_0x5d08f1)throw menuError(_0xd2829a(0x203),'Online\x20menu\x20not\x20found:\x20'+_0x19a352,_0xd2829a(0x226));return _0x5d08f1;}export function requireFolder(_0x28b0e4,_0x984aab){const _0x1ef1bc=a127_0x2b5dc7,_0x5abd5a=requireMenu(_0x28b0e4,_0x984aab);if(_0x5abd5a[_0x1ef1bc(0x21e)]!==_0x1ef1bc(0x1fc))throw menuError(_0x1ef1bc(0x1fb),_0x1ef1bc(0x1f0)+_0x984aab+_0x1ef1bc(0x247)+(_0x5abd5a[_0x1ef1bc(0x21e)]||_0x1ef1bc(0x233))+_0x1ef1bc(0x21b),_0x1ef1bc(0x1fa));return _0x5abd5a;}export function assertExpectedState(_0xda2024,_0xc38bf1){const _0x5d1f74=a127_0x2b5dc7;if(hasFlag(_0xda2024,_0x5d1f74(0x20c))){const _0x2d8c3e=parseParentId(_0xda2024,_0x5d1f74(0x20c),{'required':!![]});if(_0xc38bf1['parentId']!==_0x2d8c3e)throw stateDrift(_0x5d1f74(0x1f0)+_0xc38bf1['id']+_0x5d1f74(0x255)+formatParent(_0x2d8c3e)+_0x5d1f74(0x221)+formatParent(_0xc38bf1[_0x5d1f74(0x228)])+'.');}if(hasFlag(_0xda2024,_0x5d1f74(0x216))){const _0x1132d8=_0xda2024[_0x5d1f74(0x251)](_0x5d1f74(0x216));if(_0xc38bf1[_0x5d1f74(0x227)]!==_0x1132d8)throw stateDrift(_0x5d1f74(0x1f0)+_0xc38bf1['id']+_0x5d1f74(0x243)+JSON['stringify'](_0x1132d8)+_0x5d1f74(0x221)+JSON[_0x5d1f74(0x23f)](_0xc38bf1[_0x5d1f74(0x227)])+'.');}if(hasFlag(_0xda2024,_0x5d1f74(0x25b))){const _0x3cf5ad=_0xda2024[_0x5d1f74(0x200)]('expected-children-count');if(!Number[_0x5d1f74(0x232)](_0x3cf5ad)||_0x3cf5ad<0x0)throw CliErrors[_0x5d1f74(0x215)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0xc38bf1['childrenCount']!==_0x3cf5ad)throw stateDrift(_0x5d1f74(0x1f0)+_0xc38bf1['id']+_0x5d1f74(0x218)+_0x3cf5ad+_0x5d1f74(0x221)+_0xc38bf1[_0x5d1f74(0x208)]+'.');}}export function assertVerified(_0x2e12a9,_0x2a7e3f,_0x1b4814=a127_0x2b5dc7(0x23b)){if(!_0x2e12a9)throw menuError('menu_verification_failed',_0x2a7e3f,_0x1b4814);}export function mutationResult(_0x3e553d){const _0x27f0b1=a127_0x2b5dc7;return{'operation':_0x3e553d['operation'],'selector':_0x3e553d[_0x27f0b1(0x224)],'before':_0x3e553d[_0x27f0b1(0x204)],'after':_0x3e553d[_0x27f0b1(0x246)],'dryRun':_0x3e553d['dryRun'],'backend':_0x3e553d[_0x27f0b1(0x212)],..._0x3e553d['plannedActions']?{'plannedActions':_0x3e553d[_0x27f0b1(0x1f5)]}:{},..._0x3e553d['targets']?{'targets':_0x3e553d[_0x27f0b1(0x259)]}:{},..._0x3e553d[_0x27f0b1(0x21c)]?{'deleteOrder':_0x3e553d[_0x27f0b1(0x21c)]}:{},'snapshotHash':_0x3e553d['snapshotHash'],..._0x3e553d[_0x27f0b1(0x22b)]?{'cascade':_0x3e553d[_0x27f0b1(0x22b)]}:{},..._0x3e553d[_0x27f0b1(0x24e)]?{'planFile':_0x3e553d[_0x27f0b1(0x24e)]}:{},'succeeded':_0x3e553d[_0x27f0b1(0x213)]??[],'failed':_0x3e553d[_0x27f0b1(0x210)]??[],'warnings':_0x3e553d[_0x27f0b1(0x20b)]??[],'verification':_0x3e553d[_0x27f0b1(0x1f7)],'error':_0x3e553d[_0x27f0b1(0x211)]};}export function menuDryRunResult(_0x1971d6,_0x584542){return{..._0x1971d6,..._0x584542};}export function menuFailure(_0x1b9401,_0x2cfe54,_0x501e53){const _0x55ecc5=a127_0x2b5dc7,_0x203608=mutationResult({..._0x2cfe54,'after':_0x501e53[_0x55ecc5(0x246)]===undefined?_0x2cfe54['after']:_0x501e53[_0x55ecc5(0x246)],'backend':_0x501e53[_0x55ecc5(0x212)]??_0x2cfe54['backend'],'dryRun':![],'succeeded':_0x501e53[_0x55ecc5(0x213)]??[],'failed':[{..._0x501e53[_0x55ecc5(0x210)]??{},'stage':_0x501e53['stage'],'code':_0x1b9401[_0x55ecc5(0x241)],'message':_0x1b9401[_0x55ecc5(0x1fd)]}],'warnings':[..._0x2cfe54['warnings'],..._0x501e53[_0x55ecc5(0x20b)]??[]],'verification':_0x501e53[_0x55ecc5(0x1f7)],'error':{'code':_0x1b9401[_0x55ecc5(0x241)],'message':_0x1b9401[_0x55ecc5(0x1fd)],..._0x1b9401[_0x55ecc5(0x22a)]?{'hint':_0x1b9401[_0x55ecc5(0x22a)]}:{}}});return Object[_0x55ecc5(0x254)](_0x1b9401,_0x55ecc5(0x25e),{'value':_0x203608,'enumerable':!![],'configurable':!![]}),_0x1b9401;}export function asVerificationError(_0x26a781,_0x36a69b){const _0x450de5=a127_0x2b5dc7;if(_0x26a781 instanceof CliError&&_0x26a781['code']==='menu_verification_failed')return _0x26a781;const _0x4de11f=_0x26a781 instanceof Error?_0x26a781[_0x450de5(0x1fd)]:String(_0x26a781);return menuError(_0x450de5(0x235),''+_0x36a69b+(_0x4de11f?':\x20'+_0x4de11f:''),_0x450de5(0x238));}export function describeMenuErrorCause(_0x1d5a09,_0x15aeca,_0x531a12){const _0x180af7=a127_0x2b5dc7,_0x21d1c5=mapMenuApiError(_0x1d5a09,_0x15aeca,_0x531a12);return{'causeCode':_0x21d1c5[_0x180af7(0x241)],'causeMessage':_0x21d1c5[_0x180af7(0x1fd)]};}export function hasFlag(_0x5f102f,_0x37a2d1){const _0x54bfd6=a127_0x2b5dc7;return Object[_0x54bfd6(0x240)][_0x54bfd6(0x239)][_0x54bfd6(0x23e)](_0x5f102f['rawFlags'],_0x37a2d1)&&_0x5f102f[_0x54bfd6(0x1f3)][_0x37a2d1]!==undefined;}export function toApiParentId(_0xda6fa6){return _0xda6fa6??0x0;}export function formatParent(_0x3018e3){const _0x48f718=a127_0x2b5dc7;return _0x3018e3==null?_0x48f718(0x20f):String(_0x3018e3);}export function menuError(_0x283f19,_0x380126,_0x575f40){return new CliError(_0x283f19,0x1,_0x380126,_0x575f40);}export function mapMenuApiError(_0x4196a1,_0x3c9f7b,_0x52ff3c){const _0x4368b1=a127_0x2b5dc7;if(_0x4196a1 instanceof CliError&&_0x4196a1['code']!==_0x4368b1(0x245))return _0x4196a1;const _0x2bff85=_0x4196a1 instanceof Error?_0x4196a1[_0x4368b1(0x1fd)]:String(_0x4196a1);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i['test'](_0x2bff85))return menuError(_0x4368b1(0x222),_0x4368b1(0x23c)+_0x3c9f7b+(_0x52ff3c?_0x4368b1(0x1f6)+_0x52ff3c:'')+'.','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.');return menuError(_0x4368b1(0x25a),_0x4368b1(0x24f)+_0x3c9f7b+(_0x52ff3c?'\x20menu\x20'+_0x52ff3c:'')+':\x20'+_0x2bff85,'Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.');}export function isMenuResponseLoss(_0x1d8439){const _0x4bb986=a127_0x2b5dc7,_0x1542b2=_0x1d8439 instanceof Error?_0x1d8439[_0x4bb986(0x1fd)]:String(_0x1d8439);if(_0x1d8439 instanceof CliError)return _0x1d8439[_0x4bb986(0x241)]===_0x4bb986(0x245)&&/^Request (?:failed|timeout):/i[_0x4bb986(0x252)](_0x1542b2);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x4bb986(0x252)](_0x1542b2);}function stateDrift(_0x3bc4e2){const _0x5ce2b5=a127_0x2b5dc7;return menuError(_0x5ce2b5(0x223),_0x3bc4e2,_0x5ce2b5(0x202));}
@@ -1 +1 @@
1
- (function(_0x313321,_0x4b583d){const _0x3084ed=a126_0x31d8,_0x3a39e4=_0x313321();while(!![]){try{const _0x2f1d00=-parseInt(_0x3084ed(0x124))/0x1*(-parseInt(_0x3084ed(0x133))/0x2)+parseInt(_0x3084ed(0x122))/0x3+-parseInt(_0x3084ed(0x125))/0x4*(-parseInt(_0x3084ed(0x11f))/0x5)+-parseInt(_0x3084ed(0x12c))/0x6+-parseInt(_0x3084ed(0x134))/0x7*(-parseInt(_0x3084ed(0x136))/0x8)+parseInt(_0x3084ed(0x132))/0x9*(-parseInt(_0x3084ed(0x116))/0xa)+parseInt(_0x3084ed(0x12b))/0xb;if(_0x2f1d00===_0x4b583d)break;else _0x3a39e4['push'](_0x3a39e4['shift']());}catch(_0x155f1c){_0x3a39e4['push'](_0x3a39e4['shift']());}}}(a126_0x906d,0x9efe1));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 a126_0x18bd05,updateMenuRecord}from'../../../core/api-client.js';function a126_0x906d(){const _0x57241e=['16945Gpmgvr','stringify','update-menu-cdn-url','1243782bBhwPj','extend','1WnILUt','164dXMddZ','label','Batch\x20menu\x20creation\x20completed,\x20total\x20','menus','total','Menu\x20assets\x20synced:\x20','3674066Qrhnfs','2784438iRJxza','create-menu','\x20menu','procode','Delete\x20','Creating\x20menu:\x20','28206wSZlUo','1209262tgaEKO','488096aeyxZM','Update\x20menu\x20','24jQMBJk','Create\x20menu\x20\x22','\x20menu\x20group(s)','Start\x20batch\x20menu\x20creation,\x20total\x20','info','Regroup\x20','path','menuGroups','all','loadScriptMode','\x20online\x20menus\x20successfully','get-online-menu-list','Menu\x20created\x20successfully:\x20','1870zbWdPm','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','map','Fetched\x20','resources','Updating\x20menu\x20asset\x20links:\x20','create-menus','import','length'];a126_0x906d=function(){return _0x57241e;};return a126_0x906d();}export async function getOnlineMenuList(_0x560f49,_0x5a7f97){const _0x185438=a126_0x31d8,_0x585c60=getEnv();logger[_0x185438(0x10d)](_0x185438(0x114),isProduction(_0x585c60)?_0x185438(0x117)+_0x560f49+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x560f49+')');const _0x3401b7=await fetchMenuSnapshot(_0x560f49,_0x5a7f97,{'verbose':!![]});return logger['info']('get-online-menu-list',_0x185438(0x119)+_0x3401b7[_0x185438(0x129)]+_0x185438(0x113)),_0x3401b7[_0x185438(0x128)]['map'](toProcessedMenuItem);}export async function createMenu(_0xa703ad,_0x503acc,_0x3f2234){const _0x48ca82=a126_0x31d8;logger[_0x48ca82(0x10d)](_0x48ca82(0x12d),_0x48ca82(0x131)+_0x3f2234[_0x48ca82(0x126)]+'\x20('+_0x3f2234[_0x48ca82(0x10f)]+')');const _0xdc9d1c={'appCode':_0xa703ad,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x48ca82(0x11d),'resources':_0x3f2234[_0x48ca82(0x11a)]?JSON[_0x48ca82(0x120)](_0x3f2234['resources']):undefined},..._0x3f2234},_0x15c03b=await createMenuRecord(_0xdc9d1c,_0x503acc,'Create\x20menu\x20\x22'+_0x3f2234[_0x48ca82(0x126)]+'\x22');return logger[_0x48ca82(0x10d)](_0x48ca82(0x12d),_0x48ca82(0x115)+_0x3f2234[_0x48ca82(0x126)]),_0x15c03b;}async function createSingleMenu(_0x428018,_0x47733a,_0x1bec2c,_0x66f519){const _0x478e2d=a126_0x31d8,_0x42ee55={'appCode':_0x428018,'type':_0x478e2d(0x12f),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x66f519?JSON[_0x478e2d(0x120)](_0x66f519):undefined},'label':_0x1bec2c[_0x478e2d(0x126)],'path':_0x1bec2c[_0x478e2d(0x10f)]},_0x2dd97e=await createMenuRecord(_0x42ee55,_0x47733a,_0x478e2d(0x137)+_0x1bec2c[_0x478e2d(0x126)]+'\x22');return logger[_0x478e2d(0x10d)]('create-menu',_0x478e2d(0x115)+_0x1bec2c[_0x478e2d(0x126)]),_0x2dd97e;}export async function createMenus(_0x1e6d9f,_0x4f6f79,_0x2027cf,_0x31fdc5){const _0x89e957=a126_0x31d8;logger['info']('create-menus',_0x89e957(0x10c)+_0x2027cf[_0x89e957(0x11e)]);const _0x4df405=await Promise[_0x89e957(0x111)](_0x2027cf[_0x89e957(0x118)](_0x10f149=>createSingleMenu(_0x1e6d9f,_0x4f6f79,_0x10f149,_0x31fdc5)));return logger[_0x89e957(0x10d)](_0x89e957(0x11c),_0x89e957(0x127)+_0x2027cf[_0x89e957(0x11e)]),_0x4df405;}export async function updateMenuCdnUrl(_0x5e7e08,_0x5391ac,_0x39e127){const _0x3793e7=a126_0x31d8;logger['info'](_0x3793e7(0x121),_0x3793e7(0x11b)+_0x39e127['label']+'\x20('+_0x39e127[_0x3793e7(0x10f)]+')');const _0x245377={'id':_0x39e127['id'],'appCode':_0x5e7e08,'extend':{..._0x39e127[_0x3793e7(0x123)]??{},..._0x39e127[_0x3793e7(0x112)]?{'loadScriptMode':_0x39e127[_0x3793e7(0x112)]}:{},'resources':_0x39e127[_0x3793e7(0x11a)]?JSON[_0x3793e7(0x120)](_0x39e127[_0x3793e7(0x11a)]):undefined}},_0x332014=await updateMenuRecord(_0x245377,_0x5391ac,'Update\x20menu\x20assets\x20\x22'+_0x39e127[_0x3793e7(0x126)]+'\x22');return logger['info'](_0x3793e7(0x121),_0x3793e7(0x12a)+_0x39e127['label'],undefined),_0x332014;}export async function createMenuEntity(_0x4dcb1e,_0x59266,_0x2c23cb){const _0x18cd8e=a126_0x31d8;return createMenuRecord({'appCode':_0x4dcb1e,..._0x2c23cb},_0x59266,_0x18cd8e(0x137)+_0x2c23cb[_0x18cd8e(0x126)]+'\x22');}export async function updateMenuEntity(_0x4fe703,_0x500563,_0x4d8364){const _0x41daf2=a126_0x31d8;return updateMenuRecord({'appCode':_0x4fe703,..._0x4d8364},_0x500563,_0x41daf2(0x135)+_0x4d8364['id']);}export async function batchDeleteMenuEntities(_0x44633c,_0x5ed3e6){const _0x55a460=a126_0x31d8;return batchDeleteMenuRecords(_0x5ed3e6,_0x44633c,_0x55a460(0x130)+_0x5ed3e6['length']+_0x55a460(0x12e)+(_0x5ed3e6[_0x55a460(0x11e)]===0x1?'':'s'));}function a126_0x31d8(_0x526e8c,_0x429759){_0x526e8c=_0x526e8c-0x10c;const _0x906d80=a126_0x906d();let _0x31d828=_0x906d80[_0x526e8c];return _0x31d828;}export async function startMenuRegroup(_0xbe6828,_0x11db6b){const _0x46d55d=a126_0x31d8;return a126_0x18bd05(_0x11db6b,_0xbe6828,_0x46d55d(0x10e)+_0x11db6b[_0x46d55d(0x110)][_0x46d55d(0x11e)]+_0x46d55d(0x138));}
1
+ (function(_0x4576e3,_0x168f9e){const _0x403869=a128_0x52db,_0x25af76=_0x4576e3();while(!![]){try{const _0x2c90bf=parseInt(_0x403869(0x149))/0x1*(-parseInt(_0x403869(0x151))/0x2)+-parseInt(_0x403869(0x156))/0x3*(-parseInt(_0x403869(0x13f))/0x4)+parseInt(_0x403869(0x152))/0x5*(parseInt(_0x403869(0x140))/0x6)+parseInt(_0x403869(0x15f))/0x7*(-parseInt(_0x403869(0x145))/0x8)+-parseInt(_0x403869(0x143))/0x9+-parseInt(_0x403869(0x146))/0xa+parseInt(_0x403869(0x154))/0xb;if(_0x2c90bf===_0x168f9e)break;else _0x25af76['push'](_0x25af76['shift']());}catch(_0x16098b){_0x25af76['push'](_0x25af76['shift']());}}}(a128_0x13b2,0xef8ac));function a128_0x13b2(){const _0x15d48e=['menus','all','label','path','get-online-menu-list','create-menu','665382NuBfoi','136715fciCps','Menu\x20created\x20successfully:\x20','51627532SyXiQl','update-menu-cdn-url','37293vaUHYg','stringify','extend','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','info','Delete\x20','Regroup\x20','7uirplI','import','Creating\x20menu:\x20','Create\x20menu\x20\x22','Update\x20menu\x20','resources','Update\x20menu\x20assets\x20\x22','map','length','284JJNUSd','222XoscVq','\x20menu\x20group(s)','create-menus','9705960aFeMsd','loadScriptMode','13960568vdRNFa','11195740ySWmDT','Updating\x20menu\x20asset\x20links:\x20','procode','5GRAArb','Menu\x20assets\x20synced:\x20'];a128_0x13b2=function(){return _0x15d48e;};return a128_0x13b2();}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 a128_0xdd1563,updateMenuRecord}from'../../../core/api-client.js';function a128_0x52db(_0x52e89c,_0x5c5822){_0x52e89c=_0x52e89c-0x138;const _0x13b252=a128_0x13b2();let _0x52dbab=_0x13b252[_0x52e89c];return _0x52dbab;}export async function getOnlineMenuList(_0x3e3720,_0x332026){const _0x5d461a=a128_0x52db,_0x123e4d=getEnv();logger['info'](_0x5d461a(0x14f),isProduction(_0x123e4d)?_0x5d461a(0x15a)+_0x3e3720+')':_0x5d461a(0x159)+_0x3e3720+')');const _0x121594=await fetchMenuSnapshot(_0x3e3720,_0x332026,{'verbose':!![]});return logger[_0x5d461a(0x15c)](_0x5d461a(0x14f),'Fetched\x20'+_0x121594['total']+'\x20online\x20menus\x20successfully'),_0x121594[_0x5d461a(0x14b)][_0x5d461a(0x13d)](toProcessedMenuItem);}export async function createMenu(_0x26694c,_0x294f1f,_0x22867d){const _0x441ba3=a128_0x52db;logger[_0x441ba3(0x15c)](_0x441ba3(0x150),_0x441ba3(0x138)+_0x22867d[_0x441ba3(0x14d)]+'\x20('+_0x22867d[_0x441ba3(0x14e)]+')');const _0x1cf7eb={'appCode':_0x26694c,'type':_0x441ba3(0x148),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x22867d[_0x441ba3(0x13b)]?JSON[_0x441ba3(0x157)](_0x22867d[_0x441ba3(0x13b)]):undefined},..._0x22867d},_0x599577=await createMenuRecord(_0x1cf7eb,_0x294f1f,'Create\x20menu\x20\x22'+_0x22867d['label']+'\x22');return logger[_0x441ba3(0x15c)]('create-menu',_0x441ba3(0x153)+_0x22867d['label']),_0x599577;}async function createSingleMenu(_0x3060b0,_0x142aaa,_0x3c8a3e,_0x51e52b){const _0x795a3a=a128_0x52db,_0x51457d={'appCode':_0x3060b0,'type':_0x795a3a(0x148),'sort':0x0,'extend':{'loadScriptMode':_0x795a3a(0x160),'resources':_0x51e52b?JSON[_0x795a3a(0x157)](_0x51e52b):undefined},'label':_0x3c8a3e[_0x795a3a(0x14d)],'path':_0x3c8a3e[_0x795a3a(0x14e)]},_0x4232b3=await createMenuRecord(_0x51457d,_0x142aaa,_0x795a3a(0x139)+_0x3c8a3e[_0x795a3a(0x14d)]+'\x22');return logger['info']('create-menu',_0x795a3a(0x153)+_0x3c8a3e[_0x795a3a(0x14d)]),_0x4232b3;}export async function createMenus(_0x4e76b9,_0x5bb08b,_0x48ddfe,_0x4bb7aa){const _0x37f089=a128_0x52db;logger[_0x37f089(0x15c)]('create-menus',_0x37f089(0x15b)+_0x48ddfe[_0x37f089(0x13e)]);const _0x15ebdc=await Promise[_0x37f089(0x14c)](_0x48ddfe[_0x37f089(0x13d)](_0x39ebd5=>createSingleMenu(_0x4e76b9,_0x5bb08b,_0x39ebd5,_0x4bb7aa)));return logger['info'](_0x37f089(0x142),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x48ddfe[_0x37f089(0x13e)]),_0x15ebdc;}export async function updateMenuCdnUrl(_0x579e42,_0xb83a06,_0x32540b){const _0x238b9c=a128_0x52db;logger[_0x238b9c(0x15c)](_0x238b9c(0x155),_0x238b9c(0x147)+_0x32540b[_0x238b9c(0x14d)]+'\x20('+_0x32540b[_0x238b9c(0x14e)]+')');const _0x642d53={'id':_0x32540b['id'],'appCode':_0x579e42,'extend':{..._0x32540b[_0x238b9c(0x158)]??{},..._0x32540b[_0x238b9c(0x144)]?{'loadScriptMode':_0x32540b['loadScriptMode']}:{},'resources':_0x32540b[_0x238b9c(0x13b)]?JSON[_0x238b9c(0x157)](_0x32540b['resources']):undefined}},_0x281408=await updateMenuRecord(_0x642d53,_0xb83a06,_0x238b9c(0x13c)+_0x32540b[_0x238b9c(0x14d)]+'\x22');return logger[_0x238b9c(0x15c)](_0x238b9c(0x155),_0x238b9c(0x14a)+_0x32540b[_0x238b9c(0x14d)],undefined),_0x281408;}export async function createMenuEntity(_0x1659a8,_0x46ab7c,_0x1238aa){const _0x50c6c2=a128_0x52db;return createMenuRecord({'appCode':_0x1659a8,..._0x1238aa},_0x46ab7c,_0x50c6c2(0x139)+_0x1238aa['label']+'\x22');}export async function updateMenuEntity(_0x366161,_0x27eb8b,_0x58f5eb){const _0x1b7205=a128_0x52db;return updateMenuRecord({'appCode':_0x366161,..._0x58f5eb},_0x27eb8b,_0x1b7205(0x13a)+_0x58f5eb['id']);}export async function batchDeleteMenuEntities(_0x59f759,_0x72c34b){const _0xc25e3b=a128_0x52db;return batchDeleteMenuRecords(_0x72c34b,_0x59f759,_0xc25e3b(0x15d)+_0x72c34b['length']+'\x20menu'+(_0x72c34b[_0xc25e3b(0x13e)]===0x1?'':'s'));}export async function startMenuRegroup(_0x4d2b4d,_0x4e0c35){const _0x50eb74=a128_0x52db;return a128_0xdd1563(_0x4e0c35,_0x4d2b4d,_0x50eb74(0x15e)+_0x4e0c35['menuGroups'][_0x50eb74(0x13e)]+_0x50eb74(0x141));}
@@ -1 +1 @@
1
- const a127_0x3056d4=a127_0xea9a;(function(_0x1220ff,_0x2310db){const _0x212ac8=a127_0xea9a,_0x15a73b=_0x1220ff();while(!![]){try{const _0x39a77c=-parseInt(_0x212ac8(0x1ed))/0x1+parseInt(_0x212ac8(0x1fc))/0x2*(parseInt(_0x212ac8(0x1fe))/0x3)+-parseInt(_0x212ac8(0x212))/0x4*(-parseInt(_0x212ac8(0x201))/0x5)+-parseInt(_0x212ac8(0x1fa))/0x6*(-parseInt(_0x212ac8(0x1eb))/0x7)+-parseInt(_0x212ac8(0x20f))/0x8+parseInt(_0x212ac8(0x20c))/0x9+parseInt(_0x212ac8(0x217))/0xa*(parseInt(_0x212ac8(0x1f8))/0xb);if(_0x39a77c===_0x2310db)break;else _0x15a73b['push'](_0x15a73b['shift']());}catch(_0x2468a2){_0x15a73b['push'](_0x15a73b['shift']());}}}(a127_0x5263,0x8b34d));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([a127_0x3056d4(0x211),a127_0x3056d4(0x207)]);function a127_0xea9a(_0x1c1252,_0x53d856){_0x1c1252=_0x1c1252-0x1ea;const _0x526317=a127_0x5263();let _0xea9a19=_0x526317[_0x1c1252];return _0xea9a19;}function a127_0x5263(){const _0x115c17=['Invalid\x20--params:\x20','6296456WElJih','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','jsUrl','11668EeVwql','Menu\x20sync\x20completed','map','path','message','53630ATxZEr','info','2789731GMMmfc','isArray','495936jnnWJc','has','string','object','filter','Invalid\x20--params.','label','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x0a\x20\x20Available\x20local\x20paths:\x20','Invalid\x20--params\x20fields:\x20',':\x20expected\x20a\x20non-empty\x20string.','1298oeTxoJ','menu-sync','6akIyLS','--params.','36482bpwLru','get','129pjFlPp','field','length','25fLDkUl','dryRun','procode','push','Start\x20non-interactive\x20menu\x20sync','setLogPath','cssUrl','pages','import','No\x20local\x20pages\x20matched\x20paths:\x20','trim','205803TZAKeE','join'];a127_0x5263=function(){return _0x115c17;};return a127_0x5263();}function validateParams(_0x36f0b5){const _0x3c639a=a127_0x3056d4,_0x201ef7=[];return _0x36f0b5[_0x3c639a(0x211)]&&!isValidJsHttpsUrl(_0x36f0b5[_0x3c639a(0x211)])&&_0x201ef7['push']({'field':_0x3c639a(0x211),'message':_0x3c639a(0x1f4)}),_0x36f0b5['cssUrl']&&!isValidCssHttpsUrl(_0x36f0b5[_0x3c639a(0x207)])&&_0x201ef7[_0x3c639a(0x204)]({'field':_0x3c639a(0x207),'message':_0x3c639a(0x210)}),_0x201ef7;}export async function runMenuSyncCore(_0x2d88f3,_0x15d7ed,_0x4b5f27=[],_0x982309,_0x363396={}){const _0x17f240=a127_0x3056d4,_0x45e86c=parseMenuSyncParams(_0x982309),_0x401af9=[...new Set(_0x4b5f27[_0x17f240(0x214)](_0x468fb9=>_0x468fb9[_0x17f240(0x20b)]())['filter'](Boolean))],_0x3e8904=_0x45e86c[_0x17f240(0x211)],_0x939ef=_0x45e86c['cssUrl'],_0x2fafc5=[];if(_0x3e8904)_0x2fafc5[_0x17f240(0x204)](_0x3e8904);if(_0x939ef)_0x2fafc5[_0x17f240(0x204)](_0x939ef);const _0x571fe7=validateParams(_0x45e86c);if(_0x571fe7[_0x17f240(0x200)]>0x0){const _0x238e60=_0x571fe7[_0x17f240(0x214)](_0x5b3800=>_0x17f240(0x1fb)+_0x5b3800[_0x17f240(0x1ff)]+':\x20'+_0x5b3800[_0x17f240(0x216)])[_0x17f240(0x20d)](';\x20');throw new Error(_0x17f240(0x20e)+_0x238e60);}logger[_0x17f240(0x206)](process['cwd']()),logger[_0x17f240(0x1ea)]('menu-sync',_0x17f240(0x205),{'appCode':_0x2d88f3,'selectedCount':_0x401af9[_0x17f240(0x200)],'jsUrl':_0x3e8904,'cssUrl':_0x939ef});if(_0x3e8904){const _0x3b0f83=await isUrlReachable(_0x3e8904);if(!_0x3b0f83)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x3e8904);}if(_0x939ef){const _0x5648ba=await isUrlReachable(_0x939ef);if(!_0x5648ba)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x939ef);}const _0x4ccb21=getLocalPages();if(_0x4ccb21[_0x17f240(0x200)]===0x0){if(_0x401af9['length']>0x0)throw new Error(_0x17f240(0x20a)+_0x401af9[_0x17f240(0x20d)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x363396[_0x17f240(0x202)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x20e54a=await getOnlineMenuList(_0x2d88f3,_0x15d7ed),_0x45bdab=new Set(_0x20e54a[_0x17f240(0x214)](_0x4c9e2b=>_0x4c9e2b[_0x17f240(0x215)]));let _0x179422;if(_0x401af9[_0x17f240(0x200)]>0x0){const _0x3beeaf=new Map(_0x4ccb21[_0x17f240(0x214)](_0x4e8cfb=>[_0x4e8cfb['path'],_0x4e8cfb])),_0x2b6b82=_0x401af9[_0x17f240(0x1f1)](_0x450e0d=>!_0x3beeaf['has'](_0x450e0d));if(_0x2b6b82[_0x17f240(0x200)]>0x0){const _0x4bc10c=_0x4ccb21[_0x17f240(0x214)](_0x368cd8=>_0x368cd8[_0x17f240(0x215)])[_0x17f240(0x20d)](',\x20');throw new Error(_0x17f240(0x20a)+_0x2b6b82[_0x17f240(0x20d)](',\x20')+_0x17f240(0x1f5)+_0x4bc10c);}const _0x3845d8=_0x401af9[_0x17f240(0x1f1)](_0x28d497=>_0x45bdab['has'](_0x28d497));if(_0x3845d8[_0x17f240(0x200)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x3845d8[_0x17f240(0x20d)](',\x20'));_0x179422=_0x401af9[_0x17f240(0x214)](_0x597879=>_0x3beeaf[_0x17f240(0x1fd)](_0x597879));}else _0x179422=_0x4ccb21[_0x17f240(0x1f1)](_0x31a1b6=>!_0x45bdab[_0x17f240(0x1ee)](_0x31a1b6[_0x17f240(0x215)]));if(_0x179422[_0x17f240(0x200)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x363396[_0x17f240(0x202)]===!![],'targetPages':[],'plannedMenus':[]};const _0x30f659=_0x179422[_0x17f240(0x214)](_0x38f1b3=>({'type':_0x17f240(0x203),'path':_0x38f1b3['path'],'label':_0x38f1b3[_0x17f240(0x1f3)],'loadScriptMode':_0x17f240(0x209),'resources':[..._0x2fafc5]}));if(_0x363396[_0x17f240(0x202)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x179422,'plannedMenus':_0x30f659};const _0x38a761=await createMenus(_0x2d88f3,_0x15d7ed,_0x179422,_0x2fafc5['length']>0x0?_0x2fafc5:undefined);return logger[_0x17f240(0x1ea)](_0x17f240(0x1f9),_0x17f240(0x213),{'count':_0x179422['length'],'resources':_0x2fafc5}),{'created':_0x38a761[_0x17f240(0x200)],'skipped':![],'dryRun':![],'targetPages':_0x179422,'plannedMenus':_0x30f659,'menus':_0x38a761};}export function parseMenuSyncParams(_0x33b061){const _0xe25a46=a127_0x3056d4;if(!_0x33b061||typeof _0x33b061!==_0xe25a46(0x1ef))return{};let _0x2e1720;try{_0x2e1720=JSON['parse'](_0x33b061);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x2e1720!==_0xe25a46(0x1f0)||_0x2e1720===null||Array[_0xe25a46(0x1ec)](_0x2e1720))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x16d876=_0x2e1720;if(Object['hasOwn'](_0x16d876,_0xe25a46(0x208)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x10d453=Object['keys'](_0x16d876)['filter'](_0x5c55cf=>!MENU_SYNC_PARAM_KEYS[_0xe25a46(0x1ee)](_0x5c55cf));if(_0x10d453[_0xe25a46(0x200)]>0x0)throw new Error(_0xe25a46(0x1f6)+_0x10d453[_0xe25a46(0x20d)](',\x20')+'.');for(const _0x1e4cf7 of MENU_SYNC_PARAM_KEYS){const _0x10190c=_0x16d876[_0x1e4cf7];if(_0x10190c!==undefined&&(typeof _0x10190c!==_0xe25a46(0x1ef)||_0x10190c[_0xe25a46(0x20b)]()===''))throw new Error(_0xe25a46(0x1f2)+_0x1e4cf7+_0xe25a46(0x1f7));}return{'jsUrl':typeof _0x16d876[_0xe25a46(0x211)]===_0xe25a46(0x1ef)?_0x16d876[_0xe25a46(0x211)]['trim']():undefined,'cssUrl':typeof _0x16d876[_0xe25a46(0x207)]===_0xe25a46(0x1ef)?_0x16d876[_0xe25a46(0x207)][_0xe25a46(0x20b)]():undefined};}
1
+ const a129_0x5af3f7=a129_0x1b45;function a129_0x1b45(_0x5e5713,_0x3195a2){_0x5e5713=_0x5e5713-0x92;const _0x300f29=a129_0x300f();let _0x1b450a=_0x300f29[_0x5e5713];return _0x1b450a;}(function(_0x3492d9,_0x4beba4){const _0xb87243=a129_0x1b45,_0x30bfef=_0x3492d9();while(!![]){try{const _0x3f0ff8=parseInt(_0xb87243(0xa0))/0x1+parseInt(_0xb87243(0xb7))/0x2+parseInt(_0xb87243(0xb2))/0x3+parseInt(_0xb87243(0xa6))/0x4*(parseInt(_0xb87243(0xb9))/0x5)+-parseInt(_0xb87243(0xa8))/0x6*(-parseInt(_0xb87243(0xba))/0x7)+parseInt(_0xb87243(0xb6))/0x8*(parseInt(_0xb87243(0xa1))/0x9)+-parseInt(_0xb87243(0xa9))/0xa;if(_0x3f0ff8===_0x4beba4)break;else _0x30bfef['push'](_0x30bfef['shift']());}catch(_0x5aa597){_0x30bfef['push'](_0x30bfef['shift']());}}}(a129_0x300f,0x66bd9));function a129_0x300f(){const _0x9de5c0=['trim','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','603088ISBFHD','1314184GlzPNp','pages','115ypfXgz','21EOIBAP','Invalid\x20--params:\x20','length','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','get','push','filter','join','has','CSS\x20URL\x20is\x20unreachable:\x20','jsUrl','--params.','dryRun','Invalid\x20--params\x20JSON.','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','isArray','JS\x20URL\x20is\x20unreachable:\x20','cssUrl',':\x20expected\x20a\x20non-empty\x20string.','menu-sync','671102UYMTlI','63hJFnHd','keys','map','string','import','132316kuyBkB','Invalid\x20--params\x20fields:\x20','616386nsvRFJ','27403610QUhdle','info','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','label','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','setLogPath','No\x20local\x20pages\x20matched\x20paths:\x20','path','parse','708840myrjvG','hasOwn'];a129_0x300f=function(){return _0x9de5c0;};return a129_0x300f();}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([a129_0x5af3f7(0x96),a129_0x5af3f7(0x9d)]);function validateParams(_0x4374bf){const _0xf19e9b=a129_0x5af3f7,_0x2fae26=[];return _0x4374bf[_0xf19e9b(0x96)]&&!isValidJsHttpsUrl(_0x4374bf[_0xf19e9b(0x96)])&&_0x2fae26[_0xf19e9b(0xbf)]({'field':_0xf19e9b(0x96),'message':_0xf19e9b(0xad)}),_0x4374bf['cssUrl']&&!isValidCssHttpsUrl(_0x4374bf[_0xf19e9b(0x9d)])&&_0x2fae26[_0xf19e9b(0xbf)]({'field':_0xf19e9b(0x9d),'message':_0xf19e9b(0xab)}),_0x2fae26;}export async function runMenuSyncCore(_0x43c5fd,_0x46dd63,_0x4a2dd0=[],_0x14feca,_0x21139c={}){const _0xc2f13b=a129_0x5af3f7,_0x3f373c=parseMenuSyncParams(_0x14feca),_0x4b20fc=[...new Set(_0x4a2dd0[_0xc2f13b(0xa3)](_0x42c411=>_0x42c411['trim']())[_0xc2f13b(0x92)](Boolean))],_0x2870f6=_0x3f373c[_0xc2f13b(0x96)],_0x2ccf11=_0x3f373c['cssUrl'],_0x5ceb93=[];if(_0x2870f6)_0x5ceb93[_0xc2f13b(0xbf)](_0x2870f6);if(_0x2ccf11)_0x5ceb93[_0xc2f13b(0xbf)](_0x2ccf11);const _0x52578b=validateParams(_0x3f373c);if(_0x52578b[_0xc2f13b(0xbc)]>0x0){const _0x26e526=_0x52578b[_0xc2f13b(0xa3)](_0x5def1e=>_0xc2f13b(0x97)+_0x5def1e['field']+':\x20'+_0x5def1e['message'])[_0xc2f13b(0x93)](';\x20');throw new Error(_0xc2f13b(0xbb)+_0x26e526);}logger[_0xc2f13b(0xae)](process['cwd']()),logger['info'](_0xc2f13b(0x9f),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x43c5fd,'selectedCount':_0x4b20fc[_0xc2f13b(0xbc)],'jsUrl':_0x2870f6,'cssUrl':_0x2ccf11});if(_0x2870f6){const _0x55aca9=await isUrlReachable(_0x2870f6);if(!_0x55aca9)throw new Error(_0xc2f13b(0x9c)+_0x2870f6);}if(_0x2ccf11){const _0x37b12a=await isUrlReachable(_0x2ccf11);if(!_0x37b12a)throw new Error(_0xc2f13b(0x95)+_0x2ccf11);}const _0x18ab45=getLocalPages();if(_0x18ab45[_0xc2f13b(0xbc)]===0x0){if(_0x4b20fc[_0xc2f13b(0xbc)]>0x0)throw new Error(_0xc2f13b(0xaf)+_0x4b20fc[_0xc2f13b(0x93)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x21139c['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x3f33cd=await getOnlineMenuList(_0x43c5fd,_0x46dd63),_0x1cdb3a=new Set(_0x3f33cd['map'](_0x5cfdff=>_0x5cfdff[_0xc2f13b(0xb0)]));let _0x5e9790;if(_0x4b20fc[_0xc2f13b(0xbc)]>0x0){const _0x435422=new Map(_0x18ab45[_0xc2f13b(0xa3)](_0x5e84ed=>[_0x5e84ed[_0xc2f13b(0xb0)],_0x5e84ed])),_0x7f7269=_0x4b20fc[_0xc2f13b(0x92)](_0x1ef16a=>!_0x435422[_0xc2f13b(0x94)](_0x1ef16a));if(_0x7f7269[_0xc2f13b(0xbc)]>0x0){const _0x34335f=_0x18ab45[_0xc2f13b(0xa3)](_0x1a928a=>_0x1a928a[_0xc2f13b(0xb0)])[_0xc2f13b(0x93)](',\x20');throw new Error(_0xc2f13b(0xaf)+_0x7f7269[_0xc2f13b(0x93)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x34335f);}const _0x2ae071=_0x4b20fc[_0xc2f13b(0x92)](_0x2a881f=>_0x1cdb3a[_0xc2f13b(0x94)](_0x2a881f));if(_0x2ae071[_0xc2f13b(0xbc)]>0x0)throw new Error(_0xc2f13b(0x9a)+_0x2ae071['join'](',\x20'));_0x5e9790=_0x4b20fc[_0xc2f13b(0xa3)](_0x51c1d7=>_0x435422[_0xc2f13b(0xbe)](_0x51c1d7));}else _0x5e9790=_0x18ab45['filter'](_0x5c1f18=>!_0x1cdb3a[_0xc2f13b(0x94)](_0x5c1f18[_0xc2f13b(0xb0)]));if(_0x5e9790[_0xc2f13b(0xbc)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x21139c[_0xc2f13b(0x98)]===!![],'targetPages':[],'plannedMenus':[]};const _0x1f07b2=_0x5e9790[_0xc2f13b(0xa3)](_0xfb391=>({'type':'procode','path':_0xfb391['path'],'label':_0xfb391[_0xc2f13b(0xac)],'loadScriptMode':_0xc2f13b(0xa5),'resources':[..._0x5ceb93]}));if(_0x21139c[_0xc2f13b(0x98)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x5e9790,'plannedMenus':_0x1f07b2};const _0x340a3d=await createMenus(_0x43c5fd,_0x46dd63,_0x5e9790,_0x5ceb93[_0xc2f13b(0xbc)]>0x0?_0x5ceb93:undefined);return logger[_0xc2f13b(0xaa)](_0xc2f13b(0x9f),'Menu\x20sync\x20completed',{'count':_0x5e9790[_0xc2f13b(0xbc)],'resources':_0x5ceb93}),{'created':_0x340a3d['length'],'skipped':![],'dryRun':![],'targetPages':_0x5e9790,'plannedMenus':_0x1f07b2,'menus':_0x340a3d};}export function parseMenuSyncParams(_0x556fc6){const _0x22d72f=a129_0x5af3f7;if(!_0x556fc6||typeof _0x556fc6!==_0x22d72f(0xa4))return{};let _0x575167;try{_0x575167=JSON[_0x22d72f(0xb1)](_0x556fc6);}catch{throw new Error(_0x22d72f(0x99));}if(typeof _0x575167!=='object'||_0x575167===null||Array[_0x22d72f(0x9b)](_0x575167))throw new Error(_0x22d72f(0xb5));const _0x5f4b7c=_0x575167;if(Object[_0x22d72f(0xb3)](_0x5f4b7c,_0x22d72f(0xb8)))throw new Error(_0x22d72f(0xbd));const _0xad2c4=Object[_0x22d72f(0xa2)](_0x5f4b7c)[_0x22d72f(0x92)](_0x2c3ba0=>!MENU_SYNC_PARAM_KEYS[_0x22d72f(0x94)](_0x2c3ba0));if(_0xad2c4[_0x22d72f(0xbc)]>0x0)throw new Error(_0x22d72f(0xa7)+_0xad2c4[_0x22d72f(0x93)](',\x20')+'.');for(const _0x258182 of MENU_SYNC_PARAM_KEYS){const _0x5b82f0=_0x5f4b7c[_0x258182];if(_0x5b82f0!==undefined&&(typeof _0x5b82f0!==_0x22d72f(0xa4)||_0x5b82f0[_0x22d72f(0xb4)]()===''))throw new Error('Invalid\x20--params.'+_0x258182+_0x22d72f(0x9e));}return{'jsUrl':typeof _0x5f4b7c[_0x22d72f(0x96)]===_0x22d72f(0xa4)?_0x5f4b7c[_0x22d72f(0x96)][_0x22d72f(0xb4)]():undefined,'cssUrl':typeof _0x5f4b7c['cssUrl']===_0x22d72f(0xa4)?_0x5f4b7c['cssUrl'][_0x22d72f(0xb4)]():undefined};}
@@ -1 +1 @@
1
- (function(_0x43ab48,_0x41fa1b){const _0x2b3390=a129_0x1b19,_0x4fe94e=_0x43ab48();while(!![]){try{const _0x1d759b=parseInt(_0x2b3390(0xd0))/0x1+-parseInt(_0x2b3390(0x103))/0x2+-parseInt(_0x2b3390(0xf4))/0x3*(parseInt(_0x2b3390(0xf1))/0x4)+parseInt(_0x2b3390(0xe2))/0x5*(parseInt(_0x2b3390(0xcf))/0x6)+parseInt(_0x2b3390(0xd7))/0x7*(-parseInt(_0x2b3390(0xc6))/0x8)+parseInt(_0x2b3390(0xc5))/0x9*(-parseInt(_0x2b3390(0xdb))/0xa)+parseInt(_0x2b3390(0xe5))/0xb*(parseInt(_0x2b3390(0xf5))/0xc);if(_0x1d759b===_0x41fa1b)break;else _0x4fe94e['push'](_0x4fe94e['shift']());}catch(_0x69b909){_0x4fe94e['push'](_0x4fe94e['shift']());}}}(a129_0x529c,0xe0eb0));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 a129_0x1b19(_0x1b2fb1,_0x2e31b6){_0x1b2fb1=_0x1b2fb1-0xbb;const _0x529cc1=a129_0x529c();let _0x1b1987=_0x529cc1[_0x1b2fb1];return _0x1b1987;}function validateParams(_0x1a4569){const _0x41ed18=a129_0x1b19,_0x36e89d=[];return _0x1a4569[_0x41ed18(0xd8)]&&!isValidJsHttpsUrl(_0x1a4569[_0x41ed18(0xd8)])&&_0x36e89d[_0x41ed18(0xdd)]({'field':'jsUrl','message':_0x41ed18(0xbd)}),_0x1a4569[_0x41ed18(0xfd)]&&!isValidCssHttpsUrl(_0x1a4569[_0x41ed18(0xfd)])&&_0x36e89d['push']({'field':_0x41ed18(0xfd),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x36e89d;}export async function runMenuUpdateCore(_0x37f535,_0xe9f61e,_0x341def,_0x275a86={}){const _0x128d24=a129_0x1b19,_0x553776=parseUpdateParamsFlag(_0x341def),_0x1a2b26=normalizeMode(_0x275a86[_0x128d24(0xc2)]);validateSelection(_0x275a86[_0x128d24(0xf8)]);const _0x19250d=[];if(_0x553776['jsUrl'])_0x19250d[_0x128d24(0xdd)](_0x553776['jsUrl']);if(_0x553776[_0x128d24(0xfd)])_0x19250d[_0x128d24(0xdd)](_0x553776[_0x128d24(0xfd)]);const _0x13934b=validateParams(_0x553776);if(_0x13934b[_0x128d24(0xbf)]>0x0){const _0xf4bfe8=_0x13934b[_0x128d24(0xf7)](_0x331309=>_0x128d24(0xe9)+_0x331309[_0x128d24(0xdf)]+':\x20'+_0x331309[_0x128d24(0x101)])['join'](';\x20');throw new Error(_0x128d24(0xc8)+_0xf4bfe8);}if(_0x19250d[_0x128d24(0xbf)]===0x0)throw new Error(_0x128d24(0xf3)+_0x128d24(0xd2));logger[_0x128d24(0xee)](process['cwd']()),logger[_0x128d24(0xcc)](_0x128d24(0xfc),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0x37f535,'jsUrl':_0x553776[_0x128d24(0xd8)],'cssUrl':_0x553776['cssUrl'],'mode':_0x1a2b26,'dryRun':_0x275a86[_0x128d24(0xe8)]===!![]});if(_0x553776['jsUrl']){const _0x1509d1=await isUrlReachable(_0x553776[_0x128d24(0xd8)]);if(!_0x1509d1)throw new Error(_0x128d24(0xd5)+_0x553776[_0x128d24(0xd8)]);}if(_0x553776['cssUrl']){const _0x3b5622=await isUrlReachable(_0x553776[_0x128d24(0xfd)]);if(!_0x3b5622)throw new Error(_0x128d24(0xd3)+_0x553776['cssUrl']);}const _0x15b02b=await getOnlineMenuList(_0x37f535,_0xe9f61e),_0x2d9ee4=_0x15b02b[_0x128d24(0xdc)](_0x492dac=>_0x492dac[_0x128d24(0xea)][_0x128d24(0xbf)]>0x0),_0x6b8436=selectMenusForUpdate(_0x2d9ee4,_0x275a86[_0x128d24(0xf8)]);if(_0x6b8436[_0x128d24(0xbf)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x275a86[_0x128d24(0xe8)]===!![]};const _0x49d2ca=_0x6b8436[_0x128d24(0xf7)](_0x559f7b=>buildMenuUpdateDiff(_0x559f7b,_0x553776,_0x1a2b26,_0x275a86[_0x128d24(0xe1)]===!![],_0x275a86['loadScriptMode']));if(_0x275a86['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x49d2ca};const _0x431b25=await Promise['allSettled'](_0x6b8436[_0x128d24(0xf7)]((_0x430095,_0x5717ec)=>updateMenuCdnUrl(_0x37f535,_0xe9f61e,{'id':_0x430095['id'],'label':_0x430095['label'],'path':_0x430095['path'],'resources':_0x49d2ca[_0x5717ec][_0x128d24(0xd1)][_0x128d24(0xea)],'extend':_0x430095[_0x128d24(0xfb)]??null,'loadScriptMode':_0x275a86[_0x128d24(0x102)]}))),_0x1fa52a=_0x431b25['filter'](_0x39914c=>_0x39914c[_0x128d24(0xce)]===_0x128d24(0xf2))[_0x128d24(0xf7)](_0x7241c=>_0x7241c[_0x128d24(0xd4)]),_0xfb424b=_0x431b25['filter'](_0x1f76f5=>_0x1f76f5[_0x128d24(0xce)]===_0x128d24(0xc0))[_0x128d24(0xbf)];return logger[_0x128d24(0xcc)]('menu-asset-update',_0x128d24(0xbe),{'count':_0x6b8436[_0x128d24(0xbf)],'resources':_0x19250d}),{'updated':_0x1fa52a[_0x128d24(0xbf)],'failed':_0xfb424b,'skipped':![],'menus':_0x1fa52a};}function validateSelection(_0x2c3c2d){const _0x595b97=a129_0x1b19;if(!_0x2c3c2d)throw new Error(_0x595b97(0x104));if(_0x2c3c2d['all']&&(_0x2c3c2d['menuIds']['length']>0x0||_0x2c3c2d[_0x595b97(0xeb)]['length']>0x0))throw new Error(_0x595b97(0xff));if(!_0x2c3c2d[_0x595b97(0xfe)]&&_0x2c3c2d['menuIds'][_0x595b97(0xbf)]===0x0&&_0x2c3c2d[_0x595b97(0xeb)][_0x595b97(0xbf)]===0x0)throw new Error(_0x595b97(0x104));}export function selectMenusForUpdate(_0xcee3f5,_0x1849d6){const _0xd5e8cc=a129_0x1b19;validateSelection(_0x1849d6);if(_0x1849d6[_0xd5e8cc(0xfe)])return _0xcee3f5;const _0x1e5290=new Set(_0xcee3f5[_0xd5e8cc(0xf7)](_0xd17097=>_0xd17097['id'])),_0x5f3aa6=new Set(_0xcee3f5['map'](_0x50924c=>_0x50924c['path'])),_0x1f9294=_0x1849d6[_0xd5e8cc(0xc9)][_0xd5e8cc(0xdc)](_0x5e3b2c=>!_0x1e5290['has'](_0x5e3b2c)),_0xaf00d5=_0x1849d6['paths'][_0xd5e8cc(0xdc)](_0x5a6dbc=>!_0x5f3aa6['has'](_0x5a6dbc));if(_0x1f9294[_0xd5e8cc(0xbf)]>0x0||_0xaf00d5[_0xd5e8cc(0xbf)]>0x0){const _0x34f738=[..._0x1f9294['map'](_0x30c3f6=>String(_0x30c3f6)),..._0xaf00d5][_0xd5e8cc(0xf9)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x34f738);}const _0x31fa2a=new Set(_0x1849d6['menuIds']),_0xb93eb5=new Set(_0x1849d6[_0xd5e8cc(0xeb)]);return _0xcee3f5['filter'](_0x2a8277=>_0x31fa2a[_0xd5e8cc(0xd9)](_0x2a8277['id'])||_0xb93eb5['has'](_0x2a8277[_0xd5e8cc(0xbb)]));}function a129_0x529c(){const _0x166aa3=['Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','136020SLDwLF','25893408YXLYsS','some','map','selection','join','\x20existing\x20JS\x20resources\x20for\x20\x22','extend','menu-asset-update','cssUrl','all','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','label','message','loadScriptMode','1058506kKDOnh','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','path','parse','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Menu\x20asset\x20update\x20completed','length','rejected','string','mode','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','.\x20Allowed\x20values:\x20replace,\x20patch','9tRGuxL','1387208pIdVDf','endsWith','Invalid\x20--params:\x20','menuIds','.css','\x22\x20(','info','menu\x20asset-update\x20cannot\x20patch\x20','status','533886LOCKQd','1679736JoGEKh','after','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','CSS\x20URL\x20is\x20unreachable:\x20','value','JS\x20URL\x20is\x20unreachable:\x20','isArray','21xoHZQw','jsUrl','has','unshift','17438390hVJMWg','filter','push','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','field','object','force','95fTzulA','replace','patch','11vZySNT','toLowerCase','split','dryRun','--params.','resources','paths','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.js','setLogPath','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','Invalid\x20--mode:\x20','160QzKNeR','fulfilled'];a129_0x529c=function(){return _0x166aa3;};return a129_0x529c();}function normalizeMode(_0x27f45a){const _0x442546=a129_0x1b19;if(!_0x27f45a)return _0x442546(0xe4);if(_0x27f45a===_0x442546(0xe3)||_0x27f45a===_0x442546(0xe4))return _0x27f45a;throw new Error(_0x442546(0xf0)+_0x27f45a+_0x442546(0xc4));}function buildMenuUpdateDiff(_0x1f71bc,_0x1f3c6a,_0x2ce3be,_0x3cd85f,_0x4da31e){const _0x4c35ff=a129_0x1b19,_0x3eb021=[..._0x1f71bc['resources']];_0x2ce3be===_0x4c35ff(0xe4)&&assertUnambiguousPatchResources(_0x1f71bc,_0x3eb021,_0x1f3c6a);const _0x1dcab0=_0x2ce3be===_0x4c35ff(0xe4)?patchResources(_0x3eb021,_0x1f3c6a):replaceResources(_0x1f3c6a),_0x5c7dd0=[],_0x45fdf1=_0x3eb021['some'](isJsResource),_0x276154=_0x1dcab0[_0x4c35ff(0xf6)](isJsResource);if(_0x45fdf1&&!_0x276154){const _0x227c05=_0x4c35ff(0xc3)+_0x1f71bc[_0x4c35ff(0x100)]+_0x4c35ff(0xcb)+_0x1f71bc['path']+').\x20'+_0x4c35ff(0xde);if(!_0x3cd85f)throw new Error(_0x227c05);_0x5c7dd0[_0x4c35ff(0xdd)](_0x227c05);}const _0x8ad16=_0x3eb021['some'](isCssResource),_0x5cb8ef=_0x1dcab0[_0x4c35ff(0xf6)](isCssResource);_0x8ad16&&!_0x5cb8ef&&_0x5c7dd0[_0x4c35ff(0xdd)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x1f71bc['label']+_0x4c35ff(0xcb)+_0x1f71bc[_0x4c35ff(0xbb)]+').');const _0x591c97=typeof _0x1f71bc[_0x4c35ff(0xfb)]?.[_0x4c35ff(0x102)]===_0x4c35ff(0xc1)?_0x1f71bc[_0x4c35ff(0xfb)][_0x4c35ff(0x102)]:null,_0x18c1ce=_0x4da31e?{'loadScriptMode':_0x591c97}:{},_0x285871=_0x4da31e?{'loadScriptMode':_0x4da31e}:{};return{'id':_0x1f71bc['id'],'label':_0x1f71bc['label'],'path':_0x1f71bc[_0x4c35ff(0xbb)],'mode':_0x2ce3be,'before':{'resources':_0x3eb021,..._0x18c1ce},'after':{'resources':_0x1dcab0,..._0x285871},'warnings':_0x5c7dd0};}function replaceResources(_0x55a8ec){const _0x31a525=a129_0x1b19;return[_0x55a8ec[_0x31a525(0xd8)],_0x55a8ec[_0x31a525(0xfd)]]['filter'](_0x32ffa8=>!!_0x32ffa8);}function assertUnambiguousPatchResources(_0xf0f3f3,_0x1e891d,_0x560d70){const _0x5ef08b=a129_0x1b19,_0x1473d5=_0x1e891d[_0x5ef08b(0xdc)](isJsResource)['length'];if(_0x560d70[_0x5ef08b(0xd8)]&&_0x1473d5>0x1)throw new Error(_0x5ef08b(0xcd)+_0x1473d5+_0x5ef08b(0xfa)+_0xf0f3f3['label']+_0x5ef08b(0xcb)+_0xf0f3f3[_0x5ef08b(0xbb)]+')\x20'+_0x5ef08b(0xef));const _0x1780c1=_0x1e891d[_0x5ef08b(0xdc)](isCssResource)['length'];if(_0x560d70[_0x5ef08b(0xfd)]&&_0x1780c1>0x1)throw new Error(_0x5ef08b(0xcd)+_0x1780c1+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0xf0f3f3['label']+_0x5ef08b(0xcb)+_0xf0f3f3['path']+')\x20'+_0x5ef08b(0xec));}function patchResources(_0x91df4,_0x180bdf){const _0x14f1f8=a129_0x1b19;let _0x5927ef=![],_0x2ddee4=![];const _0x40c353=[];for(const _0x10989b of _0x91df4){if(isJsResource(_0x10989b)){if(_0x180bdf[_0x14f1f8(0xd8)]&&!_0x5927ef)_0x40c353[_0x14f1f8(0xdd)](_0x180bdf['jsUrl']),_0x5927ef=!![];else!_0x180bdf[_0x14f1f8(0xd8)]&&_0x40c353['push'](_0x10989b);continue;}if(isCssResource(_0x10989b)){if(_0x180bdf[_0x14f1f8(0xfd)]&&!_0x2ddee4)_0x40c353['push'](_0x180bdf[_0x14f1f8(0xfd)]),_0x2ddee4=!![];else!_0x180bdf[_0x14f1f8(0xfd)]&&_0x40c353[_0x14f1f8(0xdd)](_0x10989b);continue;}_0x40c353['push'](_0x10989b);}return _0x180bdf[_0x14f1f8(0xd8)]&&!_0x5927ef&&_0x40c353[_0x14f1f8(0xda)](_0x180bdf['jsUrl']),_0x180bdf[_0x14f1f8(0xfd)]&&!_0x2ddee4&&_0x40c353['push'](_0x180bdf['cssUrl']),_0x40c353;}function isJsResource(_0x27a2f4){const _0x3c03e7=a129_0x1b19;return stripQuery(_0x27a2f4)[_0x3c03e7(0xe6)]()[_0x3c03e7(0xc7)](_0x3c03e7(0xed));}function isCssResource(_0x2f9954){const _0x372225=a129_0x1b19;return stripQuery(_0x2f9954)[_0x372225(0xe6)]()['endsWith'](_0x372225(0xca));}function stripQuery(_0x3bf777){const _0xcd1fa9=a129_0x1b19;return _0x3bf777[_0xcd1fa9(0xe7)]('?')[0x0]??_0x3bf777;}function parseUpdateParamsFlag(_0x13f8b0){const _0x2961cb=a129_0x1b19;if(!_0x13f8b0||typeof _0x13f8b0!==_0x2961cb(0xc1))return{};try{const _0x3a2cf2=JSON[_0x2961cb(0xbc)](_0x13f8b0);if(typeof _0x3a2cf2!==_0x2961cb(0xe0)||_0x3a2cf2===null||Array[_0x2961cb(0xd6)](_0x3a2cf2))return{};return{'jsUrl':typeof _0x3a2cf2[_0x2961cb(0xd8)]===_0x2961cb(0xc1)?_0x3a2cf2['jsUrl']['trim']():undefined,'cssUrl':typeof _0x3a2cf2[_0x2961cb(0xfd)]===_0x2961cb(0xc1)?_0x3a2cf2[_0x2961cb(0xfd)]['trim']():undefined};}catch{return{};}}
1
+ (function(_0x1bf7d1,_0x11a2ef){const _0x2a21ab=a131_0xb5de,_0x26f3df=_0x1bf7d1();while(!![]){try{const _0x3a98d2=-parseInt(_0x2a21ab(0x18d))/0x1+-parseInt(_0x2a21ab(0x17a))/0x2*(-parseInt(_0x2a21ab(0x177))/0x3)+parseInt(_0x2a21ab(0x164))/0x4+-parseInt(_0x2a21ab(0x180))/0x5*(parseInt(_0x2a21ab(0x189))/0x6)+parseInt(_0x2a21ab(0x193))/0x7+parseInt(_0x2a21ab(0x165))/0x8*(parseInt(_0x2a21ab(0x17c))/0x9)+-parseInt(_0x2a21ab(0x187))/0xa;if(_0x3a98d2===_0x11a2ef)break;else _0x26f3df['push'](_0x26f3df['shift']());}catch(_0x3bbd1b){_0x26f3df['push'](_0x26f3df['shift']());}}}(a131_0x24e4,0x89052));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 a131_0x24e4(){const _0xb9152f=['has','allSettled','menuIds','patch','after','extend','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','.\x20Allowed\x20values:\x20replace,\x20patch','\x20existing\x20JS\x20resources\x20for\x20\x22','Start\x20non-interactive\x20menu\x20asset\x20update','status','paths','resources','\x22\x20(','JS\x20URL\x20is\x20unreachable:\x20','--params.','1233OWQCvY','mode','selection','302QrkuCD','message','45ENFQjO','label','dryRun','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','20YJwHEt','loadScriptMode','filter','trim','.css','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','force','2378580VJvAFz','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','1339836ESKwxw','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','join','menu\x20asset-update\x20cannot\x20patch\x20','601624KmbZhl','Menu\x20asset\x20update\x20completed','map','toLowerCase','all','replace','5571090JzQgPi','cwd','jsUrl','some','Invalid\x20--mode:\x20','string','cssUrl','info','Invalid\x20--params:\x20','parse','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','field','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','rejected','path','length','push','CSS\x20URL\x20is\x20unreachable:\x20','menu-asset-update','setLogPath','split','3120976SYBntC','1049224jCZQrs','fulfilled'];a131_0x24e4=function(){return _0xb9152f;};return a131_0x24e4();}function validateParams(_0x3f7e05){const _0x9a1271=a131_0xb5de,_0x4eb2b7=[];return _0x3f7e05[_0x9a1271(0x195)]&&!isValidJsHttpsUrl(_0x3f7e05[_0x9a1271(0x195)])&&_0x4eb2b7[_0x9a1271(0x15f)]({'field':_0x9a1271(0x195),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3f7e05[_0x9a1271(0x199)]&&!isValidCssHttpsUrl(_0x3f7e05[_0x9a1271(0x199)])&&_0x4eb2b7[_0x9a1271(0x15f)]({'field':_0x9a1271(0x199),'message':_0x9a1271(0x18a)}),_0x4eb2b7;}export async function runMenuUpdateCore(_0xe2b849,_0x5d4624,_0x2f0bfe,_0x3f9052={}){const _0x51fc6c=a131_0xb5de,_0xa1e67=parseUpdateParamsFlag(_0x2f0bfe),_0xedab56=normalizeMode(_0x3f9052[_0x51fc6c(0x178)]);validateSelection(_0x3f9052['selection']);const _0x32f4a2=[];if(_0xa1e67['jsUrl'])_0x32f4a2[_0x51fc6c(0x15f)](_0xa1e67[_0x51fc6c(0x195)]);if(_0xa1e67['cssUrl'])_0x32f4a2['push'](_0xa1e67[_0x51fc6c(0x199)]);const _0x4ec184=validateParams(_0xa1e67);if(_0x4ec184[_0x51fc6c(0x15e)]>0x0){const _0x4dfc41=_0x4ec184[_0x51fc6c(0x18f)](_0x15718f=>_0x51fc6c(0x176)+_0x15718f[_0x51fc6c(0x158)]+':\x20'+_0x15718f[_0x51fc6c(0x17b)])[_0x51fc6c(0x18b)](';\x20');throw new Error(_0x51fc6c(0x155)+_0x4dfc41);}if(_0x32f4a2[_0x51fc6c(0x15e)]===0x0)throw new Error(_0x51fc6c(0x185)+_0x51fc6c(0x159));logger[_0x51fc6c(0x162)](process[_0x51fc6c(0x194)]()),logger[_0x51fc6c(0x154)](_0x51fc6c(0x161),_0x51fc6c(0x170),{'appCode':_0xe2b849,'jsUrl':_0xa1e67[_0x51fc6c(0x195)],'cssUrl':_0xa1e67[_0x51fc6c(0x199)],'mode':_0xedab56,'dryRun':_0x3f9052['dryRun']===!![]});if(_0xa1e67['jsUrl']){const _0x5702b3=await isUrlReachable(_0xa1e67['jsUrl']);if(!_0x5702b3)throw new Error(_0x51fc6c(0x175)+_0xa1e67[_0x51fc6c(0x195)]);}if(_0xa1e67['cssUrl']){const _0x135fa6=await isUrlReachable(_0xa1e67[_0x51fc6c(0x199)]);if(!_0x135fa6)throw new Error(_0x51fc6c(0x160)+_0xa1e67[_0x51fc6c(0x199)]);}const _0x58c49c=await getOnlineMenuList(_0xe2b849,_0x5d4624),_0x1b6927=_0x58c49c[_0x51fc6c(0x182)](_0x1a4ece=>_0x1a4ece[_0x51fc6c(0x173)][_0x51fc6c(0x15e)]>0x0),_0x4f696a=selectMenusForUpdate(_0x1b6927,_0x3f9052[_0x51fc6c(0x179)]);if(_0x4f696a[_0x51fc6c(0x15e)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x3f9052['dryRun']===!![]};const _0x123106=_0x4f696a['map'](_0x30d647=>buildMenuUpdateDiff(_0x30d647,_0xa1e67,_0xedab56,_0x3f9052[_0x51fc6c(0x186)]===!![],_0x3f9052[_0x51fc6c(0x181)]));if(_0x3f9052[_0x51fc6c(0x17e)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x123106};const _0x1e60cb=await Promise[_0x51fc6c(0x168)](_0x4f696a['map']((_0x327eb2,_0x11e50e)=>updateMenuCdnUrl(_0xe2b849,_0x5d4624,{'id':_0x327eb2['id'],'label':_0x327eb2[_0x51fc6c(0x17d)],'path':_0x327eb2['path'],'resources':_0x123106[_0x11e50e][_0x51fc6c(0x16b)][_0x51fc6c(0x173)],'extend':_0x327eb2[_0x51fc6c(0x16c)]??null,'loadScriptMode':_0x3f9052['loadScriptMode']}))),_0x45e7e9=_0x1e60cb[_0x51fc6c(0x182)](_0x4f62f2=>_0x4f62f2[_0x51fc6c(0x171)]===_0x51fc6c(0x166))[_0x51fc6c(0x18f)](_0x5c4b3e=>_0x5c4b3e['value']),_0x4cda90=_0x1e60cb[_0x51fc6c(0x182)](_0x48331f=>_0x48331f[_0x51fc6c(0x171)]===_0x51fc6c(0x15c))['length'];return logger['info']('menu-asset-update',_0x51fc6c(0x18e),{'count':_0x4f696a[_0x51fc6c(0x15e)],'resources':_0x32f4a2}),{'updated':_0x45e7e9[_0x51fc6c(0x15e)],'failed':_0x4cda90,'skipped':![],'menus':_0x45e7e9};}function validateSelection(_0x4aa0a4){const _0x430939=a131_0xb5de;if(!_0x4aa0a4)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x4aa0a4[_0x430939(0x191)]&&(_0x4aa0a4['menuIds'][_0x430939(0x15e)]>0x0||_0x4aa0a4[_0x430939(0x172)][_0x430939(0x15e)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x4aa0a4[_0x430939(0x191)]&&_0x4aa0a4[_0x430939(0x169)][_0x430939(0x15e)]===0x0&&_0x4aa0a4[_0x430939(0x172)][_0x430939(0x15e)]===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}function a131_0xb5de(_0x14ea03,_0x384514){_0x14ea03=_0x14ea03-0x154;const _0x24e494=a131_0x24e4();let _0xb5de4b=_0x24e494[_0x14ea03];return _0xb5de4b;}export function selectMenusForUpdate(_0x3d7ded,_0x5ce6d5){const _0x44e526=a131_0xb5de;validateSelection(_0x5ce6d5);if(_0x5ce6d5[_0x44e526(0x191)])return _0x3d7ded;const _0x153100=new Set(_0x3d7ded[_0x44e526(0x18f)](_0x47ce6c=>_0x47ce6c['id'])),_0x23aacf=new Set(_0x3d7ded[_0x44e526(0x18f)](_0x2186ce=>_0x2186ce[_0x44e526(0x15d)])),_0x2b996b=_0x5ce6d5[_0x44e526(0x169)][_0x44e526(0x182)](_0x4ba82c=>!_0x153100[_0x44e526(0x167)](_0x4ba82c)),_0x2b818c=_0x5ce6d5[_0x44e526(0x172)][_0x44e526(0x182)](_0x46bb30=>!_0x23aacf['has'](_0x46bb30));if(_0x2b996b[_0x44e526(0x15e)]>0x0||_0x2b818c[_0x44e526(0x15e)]>0x0){const _0x5046ce=[..._0x2b996b['map'](_0x2ee8d9=>String(_0x2ee8d9)),..._0x2b818c][_0x44e526(0x18b)](',\x20');throw new Error(_0x44e526(0x157)+_0x5046ce);}const _0x3a94b3=new Set(_0x5ce6d5[_0x44e526(0x169)]),_0x2026df=new Set(_0x5ce6d5[_0x44e526(0x172)]);return _0x3d7ded[_0x44e526(0x182)](_0x48dccb=>_0x3a94b3[_0x44e526(0x167)](_0x48dccb['id'])||_0x2026df[_0x44e526(0x167)](_0x48dccb[_0x44e526(0x15d)]));}function normalizeMode(_0x4e2cb7){const _0x2f6a76=a131_0xb5de;if(!_0x4e2cb7)return _0x2f6a76(0x16a);if(_0x4e2cb7===_0x2f6a76(0x192)||_0x4e2cb7===_0x2f6a76(0x16a))return _0x4e2cb7;throw new Error(_0x2f6a76(0x197)+_0x4e2cb7+_0x2f6a76(0x16e));}function buildMenuUpdateDiff(_0x4a0565,_0x2067a2,_0x16a573,_0x3ea1f3,_0x2bd029){const _0x146361=a131_0xb5de,_0x116f91=[..._0x4a0565[_0x146361(0x173)]];_0x16a573===_0x146361(0x16a)&&assertUnambiguousPatchResources(_0x4a0565,_0x116f91,_0x2067a2);const _0x2c903a=_0x16a573===_0x146361(0x16a)?patchResources(_0x116f91,_0x2067a2):replaceResources(_0x2067a2),_0x380531=[],_0x4264a0=_0x116f91[_0x146361(0x196)](isJsResource),_0x2bab9d=_0x2c903a[_0x146361(0x196)](isJsResource);if(_0x4264a0&&!_0x2bab9d){const _0x354d0a=_0x146361(0x15b)+_0x4a0565[_0x146361(0x17d)]+'\x22\x20('+_0x4a0565[_0x146361(0x15d)]+').\x20'+_0x146361(0x17f);if(!_0x3ea1f3)throw new Error(_0x354d0a);_0x380531[_0x146361(0x15f)](_0x354d0a);}const _0x89063b=_0x116f91[_0x146361(0x196)](isCssResource),_0x39f4be=_0x2c903a[_0x146361(0x196)](isCssResource);_0x89063b&&!_0x39f4be&&_0x380531['push'](_0x146361(0x15a)+_0x4a0565['label']+_0x146361(0x174)+_0x4a0565[_0x146361(0x15d)]+').');const _0x427806=typeof _0x4a0565[_0x146361(0x16c)]?.['loadScriptMode']===_0x146361(0x198)?_0x4a0565[_0x146361(0x16c)][_0x146361(0x181)]:null,_0x2e5ab0=_0x2bd029?{'loadScriptMode':_0x427806}:{},_0xa0006e=_0x2bd029?{'loadScriptMode':_0x2bd029}:{};return{'id':_0x4a0565['id'],'label':_0x4a0565[_0x146361(0x17d)],'path':_0x4a0565[_0x146361(0x15d)],'mode':_0x16a573,'before':{'resources':_0x116f91,..._0x2e5ab0},'after':{'resources':_0x2c903a,..._0xa0006e},'warnings':_0x380531};}function replaceResources(_0x3e1627){const _0x445782=a131_0xb5de;return[_0x3e1627[_0x445782(0x195)],_0x3e1627[_0x445782(0x199)]][_0x445782(0x182)](_0x3c8f11=>!!_0x3c8f11);}function assertUnambiguousPatchResources(_0x5f1c3a,_0x4637c7,_0x3699ed){const _0x286472=a131_0xb5de,_0x1fe4c6=_0x4637c7['filter'](isJsResource)['length'];if(_0x3699ed[_0x286472(0x195)]&&_0x1fe4c6>0x1)throw new Error(_0x286472(0x18c)+_0x1fe4c6+_0x286472(0x16f)+_0x5f1c3a[_0x286472(0x17d)]+_0x286472(0x174)+_0x5f1c3a['path']+')\x20'+_0x286472(0x188));const _0x337917=_0x4637c7['filter'](isCssResource)['length'];if(_0x3699ed['cssUrl']&&_0x337917>0x1)throw new Error(_0x286472(0x18c)+_0x337917+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x5f1c3a[_0x286472(0x17d)]+'\x22\x20('+_0x5f1c3a['path']+')\x20'+_0x286472(0x16d));}function patchResources(_0x41dfc1,_0x453337){const _0xd45b67=a131_0xb5de;let _0xbaae5c=![],_0x5e5331=![];const _0x49a2cb=[];for(const _0x4d7906 of _0x41dfc1){if(isJsResource(_0x4d7906)){if(_0x453337['jsUrl']&&!_0xbaae5c)_0x49a2cb['push'](_0x453337['jsUrl']),_0xbaae5c=!![];else!_0x453337[_0xd45b67(0x195)]&&_0x49a2cb[_0xd45b67(0x15f)](_0x4d7906);continue;}if(isCssResource(_0x4d7906)){if(_0x453337[_0xd45b67(0x199)]&&!_0x5e5331)_0x49a2cb[_0xd45b67(0x15f)](_0x453337[_0xd45b67(0x199)]),_0x5e5331=!![];else!_0x453337[_0xd45b67(0x199)]&&_0x49a2cb['push'](_0x4d7906);continue;}_0x49a2cb[_0xd45b67(0x15f)](_0x4d7906);}return _0x453337[_0xd45b67(0x195)]&&!_0xbaae5c&&_0x49a2cb['unshift'](_0x453337['jsUrl']),_0x453337[_0xd45b67(0x199)]&&!_0x5e5331&&_0x49a2cb['push'](_0x453337[_0xd45b67(0x199)]),_0x49a2cb;}function isJsResource(_0x14fe44){const _0x2b2254=a131_0xb5de;return stripQuery(_0x14fe44)[_0x2b2254(0x190)]()['endsWith']('.js');}function isCssResource(_0x2fc344){const _0x27301f=a131_0xb5de;return stripQuery(_0x2fc344)['toLowerCase']()['endsWith'](_0x27301f(0x184));}function stripQuery(_0x38eb13){const _0x32eaec=a131_0xb5de;return _0x38eb13[_0x32eaec(0x163)]('?')[0x0]??_0x38eb13;}function parseUpdateParamsFlag(_0x49aea4){const _0x5d05ed=a131_0xb5de;if(!_0x49aea4||typeof _0x49aea4!=='string')return{};try{const _0x3581b1=JSON[_0x5d05ed(0x156)](_0x49aea4);if(typeof _0x3581b1!=='object'||_0x3581b1===null||Array['isArray'](_0x3581b1))return{};return{'jsUrl':typeof _0x3581b1[_0x5d05ed(0x195)]==='string'?_0x3581b1[_0x5d05ed(0x195)][_0x5d05ed(0x183)]():undefined,'cssUrl':typeof _0x3581b1[_0x5d05ed(0x199)]==='string'?_0x3581b1[_0x5d05ed(0x199)][_0x5d05ed(0x183)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x503287,_0x2dcc34){const _0x149283=a130_0x4509,_0x4b099c=_0x503287();while(!![]){try{const _0x18472e=-parseInt(_0x149283(0x1a3))/0x1*(parseInt(_0x149283(0x1a7))/0x2)+-parseInt(_0x149283(0x19f))/0x3+-parseInt(_0x149283(0x1a5))/0x4+-parseInt(_0x149283(0x19d))/0x5*(-parseInt(_0x149283(0x19c))/0x6)+parseInt(_0x149283(0x1a1))/0x7+-parseInt(_0x149283(0x1a8))/0x8*(parseInt(_0x149283(0x19e))/0x9)+parseInt(_0x149283(0x1a0))/0xa*(parseInt(_0x149283(0x1a6))/0xb);if(_0x18472e===_0x2dcc34)break;else _0x4b099c['push'](_0x4b099c['shift']());}catch(_0x3b11bf){_0x4b099c['push'](_0x4b099c['shift']());}}}(a130_0x4c29,0xba594));export function isValidJsHttpsUrl(_0x17ab1b){const _0x41122e=a130_0x4509;return/^https:\/\/.+\.js(\?.*)?$/[_0x41122e(0x1a9)](_0x17ab1b[_0x41122e(0x1a4)]());}export function isValidCssHttpsUrl(_0x8ff6aa){const _0x4a8309=a130_0x4509;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x8ff6aa[_0x4a8309(0x1a4)]());}function a130_0x4509(_0x396c8c,_0x5894a2){_0x396c8c=_0x396c8c-0x19c;const _0x4c29bc=a130_0x4c29();let _0x45097d=_0x4c29bc[_0x396c8c];return _0x45097d;}function a130_0x4c29(){const _0x47f025=['29488019twoxLs','36154FMUEZL','248iHDTlo','test','12zvjuRm','2693295TAFqtT','442899zzlYev','644994sSUOwp','10mHIElm','830312byVqJI','HEAD','18KwgHQD','trim','4189816dqMUpK'];a130_0x4c29=function(){return _0x47f025;};return a130_0x4c29();}export async function isUrlReachable(_0x5abfd4){const _0x157bb0=a130_0x4509;try{const _0x2bd7d6=await fetch(_0x5abfd4,{'method':_0x157bb0(0x1a2)});return _0x2bd7d6['ok'];}catch{return![];}}
1
+ (function(_0x2ef9f6,_0x1229bc){const _0x2f7fec=a132_0x4477,_0x598ed8=_0x2ef9f6();while(!![]){try{const _0x54b345=parseInt(_0x2f7fec(0x69))/0x1+-parseInt(_0x2f7fec(0x68))/0x2+-parseInt(_0x2f7fec(0x6c))/0x3+-parseInt(_0x2f7fec(0x70))/0x4*(parseInt(_0x2f7fec(0x6a))/0x5)+-parseInt(_0x2f7fec(0x6b))/0x6+-parseInt(_0x2f7fec(0x67))/0x7+-parseInt(_0x2f7fec(0x6e))/0x8*(-parseInt(_0x2f7fec(0x6f))/0x9);if(_0x54b345===_0x1229bc)break;else _0x598ed8['push'](_0x598ed8['shift']());}catch(_0x1f02c5){_0x598ed8['push'](_0x598ed8['shift']());}}}(a132_0x3bbf,0xe330d));function a132_0x4477(_0x2cb734,_0x3fced1){_0x2cb734=_0x2cb734-0x67;const _0x3bbf6b=a132_0x3bbf();let _0x447742=_0x3bbf6b[_0x2cb734];return _0x447742;}export function isValidJsHttpsUrl(_0xe5cc1f){const _0x3eec96=a132_0x4477;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0xe5cc1f[_0x3eec96(0x6d)]());}export function isValidCssHttpsUrl(_0x1c362a){const _0x28f478=a132_0x4477;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x1c362a[_0x28f478(0x6d)]());}function a132_0x3bbf(){const _0x2ada19=['1032VpTVeJ','445941BelPil','980424AXFfpY','12765193QAYuqO','2787842EwsPzC','339660jpLBhX','10siyHwv','9644664eicztC','1457196SaNeNK','trim'];a132_0x3bbf=function(){return _0x2ada19;};return a132_0x3bbf();}export async function isUrlReachable(_0x1358c4){try{const _0x5f2ede=await fetch(_0x1358c4,{'method':'HEAD'});return _0x5f2ede['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a131_0x2cddf5=a131_0x3565;function a131_0x3565(_0x558339,_0x2929a3){_0x558339=_0x558339-0x18b;const _0xd9fe12=a131_0xd9fe();let _0x3565b8=_0xd9fe12[_0x558339];return _0x3565b8;}(function(_0x50b98e,_0x7c1ef7){const _0x5621be=a131_0x3565,_0xd00eb2=_0x50b98e();while(!![]){try{const _0x4ea4e1=-parseInt(_0x5621be(0x1ab))/0x1+-parseInt(_0x5621be(0x1b6))/0x2*(-parseInt(_0x5621be(0x1d2))/0x3)+-parseInt(_0x5621be(0x1c2))/0x4*(-parseInt(_0x5621be(0x19b))/0x5)+-parseInt(_0x5621be(0x1a1))/0x6+parseInt(_0x5621be(0x1ba))/0x7*(-parseInt(_0x5621be(0x1ca))/0x8)+-parseInt(_0x5621be(0x1a3))/0x9*(-parseInt(_0x5621be(0x1b4))/0xa)+parseInt(_0x5621be(0x1be))/0xb*(-parseInt(_0x5621be(0x1d1))/0xc);if(_0x4ea4e1===_0x7c1ef7)break;else _0xd00eb2['push'](_0xd00eb2['shift']());}catch(_0x55efd4){_0xd00eb2['push'](_0xd00eb2['shift']());}}}(a131_0xd9fe,0xb4fcd));import a131_0x4fff0c 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 a131_0xd9fe(){const _0x33b874=['900392CpyzgQ','\x20menu(s)\x20created','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','map','POST','appCode','trim','72BObsYi','20598fmNKti','Created\x20','\x20menu(s)\x20with\x20JS:\x20','boolean','\x20created.','sync','validation','str','Menu\x20sync\x20skipped','\x20menu(s)...','\x20local\x20microfrontend\x20menu(s).','\x20\x20Cancelled.','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','localPages','/smartapi/menu/create','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','write','\x20and\x20CSS:\x20','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','rawFlags','2555hqqPLs','size','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','\x20\x20Create\x20','Pre-fill\x20JS/CSS\x20URLs.\x20','cookie','4289160VlxUoM','split','18UAnYrF','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','Menu\x20sync\x20completed:\x20','Would\x20create\x20','✓\x20Menu\x20sync\x20completed:\x20','\x20menu(s)','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','skipped','343025xsQVWp','\x20\x20✓\x20Selected:\x20','Fetching\x20online\x20menu\x20list...','Failed\x20to\x20fetch\x20online\x20menu\x20list','filter','cssUrl','gray','length','\x20\x20Continue\x20with\x20creation?','5469370aEPCJt','Creating\x20','148QXUPpC','appcode','message','Menu\x20creation\x20failed','7CviFIM','cyan','Online\x20menu\x20list\x20fetched','string','1874356lVlUis','flag','\x20failed.','created','10428KkgcXL','Sync\x20local\x20pages\x20as\x20platform\x20menus','selectedAppName','params','jsUrl','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','paths'];a131_0xd9fe=function(){return _0x33b874;};return a131_0xd9fe();}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';export const menuSync={'service':'menu','command':a131_0x2cddf5(0x18b),'description':a131_0x2cddf5(0x1c3),'risk':a131_0x2cddf5(0x196),'flags':[{'name':a131_0x2cddf5(0x1c5),'type':a131_0x2cddf5(0x1bd),'description':a131_0x2cddf5(0x19f)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a131_0x2cddf5(0x1c9),'type':a131_0x2cddf5(0x1bd),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':a131_0x2cddf5(0x1d5),'description':a131_0x2cddf5(0x198)}],async 'dryRun'(_0x1f75f8){const _0x2a8cad=a131_0x2cddf5;ensureRunnableContext(_0x1f75f8[_0x2a8cad(0x19a)],_0x1f75f8[_0x2a8cad(0x1c4)]);const _0x1e8ff9=await runMenuSyncCore(_0x1f75f8['appCode'],_0x1f75f8['cookie'],parsePaths(_0x1f75f8['str']('paths')),_0x1f75f8['str']('params'),{'dryRun':!![]});return{'method':_0x2a8cad(0x1ce),'url':_0x2a8cad(0x194),'body':_0x1e8ff9,'description':_0x1e8ff9[_0x2a8cad(0x1aa)]?_0x2a8cad(0x199):_0x2a8cad(0x1a6)+_0x1e8ff9['targetPages'][_0x2a8cad(0x1b2)]+_0x2a8cad(0x190)};},async 'execute'(_0x5232dd){const _0x6a903f=a131_0x2cddf5;ensureRunnableContext(_0x5232dd[_0x6a903f(0x19a)],_0x5232dd['selectedAppName']);const _0xad6a93=_0x5232dd[_0x6a903f(0x1bf)]('yes'),_0x1bc743=_0x5232dd[_0x6a903f(0x18d)](_0x6a903f(0x1c5)),_0x3456f2=parsePaths(_0x5232dd[_0x6a903f(0x18d)](_0x6a903f(0x1c9))),_0x138291=parseMenuSyncParams(_0x1bc743);if(_0xad6a93){const _0x3b7ab9=await runMenuSyncCore(_0x5232dd[_0x6a903f(0x1cf)],_0x5232dd[_0x6a903f(0x1a0)],_0x3456f2,_0x1bc743);if(_0x3b7ab9['skipped']){const _0x36881c=getLocalPages();_0x36881c[_0x6a903f(0x1b2)]===0x0?writeCliSideChannelLine(_0x6a903f(0x1c8)):writeCliSideChannelLine(_0x6a903f(0x195));}else writeCliSideChannelLine(_0x6a903f(0x1a7)+_0x3b7ab9['created']+_0x6a903f(0x1cb));return{'ok':!![],'data':_0x3b7ab9,'message':_0x3b7ab9[_0x6a903f(0x1aa)]?_0x6a903f(0x18e):_0x6a903f(0x1a5)+_0x3b7ab9['created']+_0x6a903f(0x1d6)};}if(_0x3456f2['length']>0x0)throw CliErrors[_0x6a903f(0x18c)](_0x6a903f(0x192),_0x6a903f(0x1a9));if(!isInteractive()&&_0x1bc743)throw CliErrors[_0x6a903f(0x18c)](_0x6a903f(0x1c7),_0x6a903f(0x1a9));requireInteractive();const _0x35063e=startSpinner(_0x6a903f(0x1ad));let _0x240454,_0x5c0cfa,_0x150415;try{const _0x271d70=await fetchMenuData(_0x5232dd[_0x6a903f(0x1cf)],_0x5232dd['cookie']);_0x240454=_0x271d70[_0x6a903f(0x193)],_0x5c0cfa=_0x271d70['onlinePaths'],_0x150415=_0x271d70['onlineMenuList'],stopSpinner(_0x35063e,_0x6a903f(0x1bc),!![]);}catch(_0x2fbe96){stopSpinner(_0x35063e,_0x6a903f(0x1ae),![]);throw CliErrors[_0x6a903f(0x18c)](_0x2fbe96 instanceof Error?_0x2fbe96[_0x6a903f(0x1b8)]:_0x6a903f(0x1ae));}if(_0x240454[_0x6a903f(0x1b2)]===0x0)return writeCliSideChannelLine(a131_0x4fff0c['yellow'](_0x6a903f(0x19d))),{'ok':!![]};const _0x480ef6=buildCompareRows(_0x240454,_0x5c0cfa);writeCliSideChannelLine(renderCompareTable(_0x480ef6)),writeCliSideChannelLine('');const _0x5a69b9=await selectPages(_0x240454,_0x5c0cfa);writeCliSideChannelLine(''),writeCliSideChannelLine(a131_0x4fff0c[_0x6a903f(0x1bb)](_0x6a903f(0x1ac)+_0x5a69b9[_0x6a903f(0x1b2)]+'\x20page(s)'));const _0x1097c0=_0x138291[_0x6a903f(0x1c6)]&&_0x138291[_0x6a903f(0x1b0)];if(!_0x1097c0){writeCliSideChannelLine(renderSyncSummary(_0x5a69b9,_0x5c0cfa[_0x6a903f(0x19c)]>0x0));const _0x4c47b0=await askConfirm(_0x6a903f(0x1b3));if(!_0x4c47b0)return writeCliSideChannelLine(a131_0x4fff0c['gray'](_0x6a903f(0x191))),{'ok':!![]};}let _0x448426=_0x138291['jsUrl'],_0x1a2d34=_0x138291[_0x6a903f(0x1b0)];!_0x448426&&(_0x448426=await askJsUrl());!_0x1a2d34&&(_0x1a2d34=await askCssUrl());const _0x37c720=await askConfirm(_0x6a903f(0x19e)+_0x5a69b9['length']+_0x6a903f(0x1d4)+_0x448426+_0x6a903f(0x197)+_0x1a2d34+'?');if(!_0x37c720)return writeCliSideChannelLine(a131_0x4fff0c[_0x6a903f(0x1b1)](_0x6a903f(0x191))),{'ok':!![]};const _0x31d127=[_0x448426,_0x1a2d34],_0x266141=startSpinner(_0x6a903f(0x1b5)+_0x5a69b9[_0x6a903f(0x1b2)]+_0x6a903f(0x18f));try{const _0x30cb35=await doCreateMenus(_0x5232dd[_0x6a903f(0x1cf)],_0x5232dd[_0x6a903f(0x1a0)],_0x5a69b9,_0x31d127);return stopSpinner(_0x266141,_0x6a903f(0x1d3)+_0x30cb35['created']+_0x6a903f(0x1a8),!![]),{'ok':!![],'data':_0x30cb35,'message':_0x6a903f(0x1a5)+_0x30cb35[_0x6a903f(0x1c1)]+'\x20created,\x20'+_0x30cb35['failed']+_0x6a903f(0x1c0)};}catch(_0x17d7b9){stopSpinner(_0x266141,_0x6a903f(0x1b9),![]);throw CliErrors['validation'](_0x17d7b9 instanceof Error?_0x17d7b9[_0x6a903f(0x1b8)]:_0x6a903f(0x1b9));}}};function ensureRunnableContext(_0x56e36c,_0xb1497f){const _0x104528=a131_0x2cddf5,_0x22da3e=_0x56e36c['appcode']?String(_0x56e36c[_0x104528(0x1b7)])['trim']():'';if(!isInProject()&&!_0xb1497f&&!_0x22da3e)throw CliErrors['validation'](_0x104528(0x1cc)+_0x104528(0x1a4));}function parsePaths(_0x2ab70c){const _0x17dd00=a131_0x2cddf5;return[...new Set(_0x2ab70c[_0x17dd00(0x1a2)](',')[_0x17dd00(0x1cd)](_0x3555eb=>_0x3555eb[_0x17dd00(0x1d0)]())[_0x17dd00(0x1af)](Boolean))];}
1
+ const a133_0x5e7f23=a133_0x2b7c;(function(_0x481bf8,_0x5d78af){const _0x10ee69=a133_0x2b7c,_0x286089=_0x481bf8();while(!![]){try{const _0x520179=parseInt(_0x10ee69(0x158))/0x1*(-parseInt(_0x10ee69(0x156))/0x2)+parseInt(_0x10ee69(0x142))/0x3*(parseInt(_0x10ee69(0x165))/0x4)+parseInt(_0x10ee69(0x171))/0x5*(parseInt(_0x10ee69(0x175))/0x6)+parseInt(_0x10ee69(0x14e))/0x7+-parseInt(_0x10ee69(0x152))/0x8*(-parseInt(_0x10ee69(0x15f))/0x9)+-parseInt(_0x10ee69(0x172))/0xa+-parseInt(_0x10ee69(0x15b))/0xb;if(_0x520179===_0x5d78af)break;else _0x286089['push'](_0x286089['shift']());}catch(_0x42f9ab){_0x286089['push'](_0x286089['shift']());}}}(a133_0xf9c3,0xbae88));import a133_0x446a77 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a133_0xf9c3(){const _0x3e214f=['yellow','length','\x20menu(s)...','validation','rawFlags','\x20page(s)','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','str','\x20\x20Cancelled.','onlineMenuList','15ozgkuy','876020vmQxbY','gray','cyan','1939782plPgoP','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','sync','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','filter','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','appCode','skipped','trim','paths','yes','failed','\x20local\x20microfrontend\x20menu(s).','/smartapi/menu/create','\x20and\x20CSS:\x20','boolean','Menu\x20sync\x20completed:\x20','\x20\x20✓\x20Selected:\x20','cssUrl','jsUrl','93jidgoI','localPages','POST','size','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','\x20created.','split','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','Creating\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20\x20Create\x20','flag','4087923cAOPXx','map','menu','\x20failed.','1090592kAbQRM','appcode','No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.','created','5926GVfIWE','Menu\x20creation\x20failed','181FLBItO','string','params','9259987pHbegR','Failed\x20to\x20fetch\x20online\x20menu\x20list','cookie','targetPages','36gUiajy','Menu\x20sync\x20skipped','Would\x20create\x20','selectedAppName','write','✓\x20Menu\x20sync\x20completed:\x20','17048SFLsWt'];a133_0xf9c3=function(){return _0x3e214f;};return a133_0xf9c3();}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 a133_0x2b7c(_0xc30ae,_0x509d92){_0xc30ae=_0xc30ae-0x142;const _0xf9c3ba=a133_0xf9c3();let _0x2b7c89=_0xf9c3ba[_0xc30ae];return _0x2b7c89;}export const menuSync={'service':a133_0x5e7f23(0x150),'command':a133_0x5e7f23(0x177),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a133_0x5e7f23(0x163),'flags':[{'name':a133_0x5e7f23(0x15a),'type':a133_0x5e7f23(0x159),'description':'Pre-fill\x20JS/CSS\x20URLs.\x20'+a133_0x5e7f23(0x14b)},{'name':a133_0x5e7f23(0x17e),'type':a133_0x5e7f23(0x159),'description':a133_0x5e7f23(0x17a)},{'name':a133_0x5e7f23(0x17f),'type':a133_0x5e7f23(0x184),'description':'Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages'}],async 'dryRun'(_0xcf40db){const _0x7dfdbc=a133_0x5e7f23;ensureRunnableContext(_0xcf40db[_0x7dfdbc(0x16a)],_0xcf40db[_0x7dfdbc(0x162)]);const _0x8ea460=await runMenuSyncCore(_0xcf40db[_0x7dfdbc(0x17b)],_0xcf40db['cookie'],parsePaths(_0xcf40db[_0x7dfdbc(0x16e)](_0x7dfdbc(0x17e))),_0xcf40db[_0x7dfdbc(0x16e)](_0x7dfdbc(0x15a)),{'dryRun':!![]});return{'method':_0x7dfdbc(0x144),'url':_0x7dfdbc(0x182),'body':_0x8ea460,'description':_0x8ea460[_0x7dfdbc(0x17c)]?_0x7dfdbc(0x154):_0x7dfdbc(0x161)+_0x8ea460[_0x7dfdbc(0x15e)][_0x7dfdbc(0x167)]+_0x7dfdbc(0x181)};},async 'execute'(_0x2feb44){const _0x3c4613=a133_0x5e7f23;ensureRunnableContext(_0x2feb44[_0x3c4613(0x16a)],_0x2feb44[_0x3c4613(0x162)]);const _0x4a7c5d=_0x2feb44[_0x3c4613(0x14d)](_0x3c4613(0x17f)),_0x18e9b5=_0x2feb44['str'](_0x3c4613(0x15a)),_0x510a2b=parsePaths(_0x2feb44[_0x3c4613(0x16e)](_0x3c4613(0x17e))),_0x7294fa=parseMenuSyncParams(_0x18e9b5);if(_0x4a7c5d){const _0x4b9add=await runMenuSyncCore(_0x2feb44[_0x3c4613(0x17b)],_0x2feb44[_0x3c4613(0x15d)],_0x510a2b,_0x18e9b5);if(_0x4b9add[_0x3c4613(0x17c)]){const _0x2e726a=getLocalPages();_0x2e726a[_0x3c4613(0x167)]===0x0?writeCliSideChannelLine(_0x3c4613(0x16c)):writeCliSideChannelLine('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else writeCliSideChannelLine(_0x3c4613(0x164)+_0x4b9add['created']+'\x20menu(s)\x20created');return{'ok':!![],'data':_0x4b9add,'message':_0x4b9add[_0x3c4613(0x17c)]?_0x3c4613(0x160):_0x3c4613(0x185)+_0x4b9add[_0x3c4613(0x155)]+_0x3c4613(0x147)};}if(_0x510a2b[_0x3c4613(0x167)]>0x0)throw CliErrors[_0x3c4613(0x169)](_0x3c4613(0x178),_0x3c4613(0x146));if(!isInteractive()&&_0x18e9b5)throw CliErrors[_0x3c4613(0x169)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x3c4613(0x146));requireInteractive();const _0x4ea91d=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x2ce2eb,_0x39feec,_0x15b95e;try{const _0x126ec7=await fetchMenuData(_0x2feb44['appCode'],_0x2feb44['cookie']);_0x2ce2eb=_0x126ec7[_0x3c4613(0x143)],_0x39feec=_0x126ec7['onlinePaths'],_0x15b95e=_0x126ec7[_0x3c4613(0x170)],stopSpinner(_0x4ea91d,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x41a1d9){stopSpinner(_0x4ea91d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x41a1d9 instanceof Error?_0x41a1d9['message']:_0x3c4613(0x15c));}if(_0x2ce2eb['length']===0x0)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x166)](_0x3c4613(0x149))),{'ok':!![]};const _0x513e3b=buildCompareRows(_0x2ce2eb,_0x39feec);writeCliSideChannelLine(renderCompareTable(_0x513e3b)),writeCliSideChannelLine('');const _0x184e46=await selectPages(_0x2ce2eb,_0x39feec);writeCliSideChannelLine(''),writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x174)](_0x3c4613(0x186)+_0x184e46[_0x3c4613(0x167)]+_0x3c4613(0x16b)));const _0x3ac40d=_0x7294fa[_0x3c4613(0x188)]&&_0x7294fa[_0x3c4613(0x187)];if(!_0x3ac40d){writeCliSideChannelLine(renderSyncSummary(_0x184e46,_0x39feec[_0x3c4613(0x145)]>0x0));const _0x183cec=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x183cec)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x173)](_0x3c4613(0x16f))),{'ok':!![]};}let _0x2effbc=_0x7294fa['jsUrl'],_0x2a7146=_0x7294fa[_0x3c4613(0x187)];!_0x2effbc&&(_0x2effbc=await askJsUrl());!_0x2a7146&&(_0x2a7146=await askCssUrl());const _0x1dba33=await askConfirm(_0x3c4613(0x14c)+_0x184e46[_0x3c4613(0x167)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x2effbc+_0x3c4613(0x183)+_0x2a7146+'?');if(!_0x1dba33)return writeCliSideChannelLine(a133_0x446a77[_0x3c4613(0x173)](_0x3c4613(0x16f))),{'ok':!![]};const _0x56d93b=[_0x2effbc,_0x2a7146],_0x4af1a6=startSpinner(_0x3c4613(0x14a)+_0x184e46['length']+_0x3c4613(0x168));try{const _0x44b0b1=await doCreateMenus(_0x2feb44[_0x3c4613(0x17b)],_0x2feb44['cookie'],_0x184e46,_0x56d93b);return stopSpinner(_0x4af1a6,'Created\x20'+_0x44b0b1[_0x3c4613(0x155)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x44b0b1,'message':_0x3c4613(0x185)+_0x44b0b1[_0x3c4613(0x155)]+'\x20created,\x20'+_0x44b0b1[_0x3c4613(0x180)]+_0x3c4613(0x151)};}catch(_0x338528){stopSpinner(_0x4af1a6,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x3c4613(0x169)](_0x338528 instanceof Error?_0x338528['message']:_0x3c4613(0x157));}}};function ensureRunnableContext(_0x36448d,_0x20a224){const _0x12b603=a133_0x5e7f23,_0x1f76fd=_0x36448d[_0x12b603(0x153)]?String(_0x36448d['appcode'])[_0x12b603(0x17d)]():'';if(!isInProject()&&!_0x20a224&&!_0x1f76fd)throw CliErrors[_0x12b603(0x169)](_0x12b603(0x16d)+_0x12b603(0x176));}function parsePaths(_0xa5c9ed){const _0x2c63f6=a133_0x5e7f23;return[...new Set(_0xa5c9ed[_0x2c63f6(0x148)](',')[_0x2c63f6(0x14f)](_0x260ee6=>_0x260ee6[_0x2c63f6(0x17d)]())[_0x2c63f6(0x179)](Boolean))];}
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationConfigCreate: CommandDefinition;
@@ -0,0 +1 @@
1
+ const a134_0x5d9504=a134_0x4368;(function(_0x2814ef,_0x2138cb){const _0x15d0f7=a134_0x4368,_0x35e619=_0x2814ef();while(!![]){try{const _0xf3366d=-parseInt(_0x15d0f7(0xda))/0x1*(parseInt(_0x15d0f7(0xe5))/0x2)+parseInt(_0x15d0f7(0xd4))/0x3+-parseInt(_0x15d0f7(0xcb))/0x4+parseInt(_0x15d0f7(0xc7))/0x5+-parseInt(_0x15d0f7(0xc9))/0x6+-parseInt(_0x15d0f7(0xd0))/0x7+parseInt(_0x15d0f7(0xcd))/0x8*(parseInt(_0x15d0f7(0xe0))/0x9);if(_0xf3366d===_0x2138cb)break;else _0x35e619['push'](_0x35e619['shift']());}catch(_0x5ccb03){_0x35e619['push'](_0x35e619['shift']());}}}(a134_0x575c,0xe7c69));import{asDryRunResult}from'../../commands/common/dry-run.js';import{createNotificationChannelConfig,getNotificationChannelConfig,isPlatformTransportFailure}from'../../core/api-client.js';function a134_0x575c(){const _0x3cdb64=['2262808oGjycA','verification','readTimeout','POST','Created\x20notification\x20config\x20','7197225BxejCT','appCode','4819656GaaeNl',';\x20do\x20not\x20resubmit\x20automatically.','4552400zkboVK','notification_config_create_outcome_unknown','13110992jIzvnv','connectTimeout','verified','5961004dCuNse','planned','mutation','Create\x20an\x20app-level\x20notification\x20config\x20from\x20a\x20secure\x20JSON\x20source','5386158yaDvrM','/notification/channel-config/create','endpointUrl','Notification\x20config\x20create\x20returned\x20no\x20usable\x20server\x20ID.','notification','isSafeInteger','1iBbMVX','channelType','config-create','channelConfig','Inspect\x20with\x20','document','9XewmQA','configCode',';\x20do\x20not\x20resubmit.','configName','create'];a134_0x575c=function(){return _0x3cdb64;};return a134_0x575c();}import{assertSingleNotificationSource,createMutationInput,DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,DEFAULT_NOTIFICATION_READ_TIMEOUT,normalizeExactNotificationConfig,notificationError,notificationLookupCommand,NOTIFICATION_APP_FLAG,NOTIFICATION_INPUT_FLAGS,projectNotificationConfig,readNotificationDocument,safeApiFailure}from'../../commands/notification/shared.js';const CREATE_PATH=a134_0x5d9504(0xd5);function a134_0x4368(_0xcf468,_0x3f59be){_0xcf468=_0xcf468-0xc3;const _0x575cb9=a134_0x575c();let _0x4368d2=_0x575cb9[_0xcf468];return _0x4368d2;}async function prepareCreate(_0x13079c){const _0x3c80f1=a134_0x5d9504,_0x21bb4c=await readNotificationDocument(_0x13079c,_0x3c80f1(0xe4)),_0xed7960=createMutationInput(_0x13079c['appCode'],_0x21bb4c);return{'document':_0x21bb4c,'input':_0xed7960,'planned':projectNotificationConfig({'appCode':_0x13079c[_0x3c80f1(0xc8)],'configName':_0x21bb4c[_0x3c80f1(0xe3)],'channelType':_0x21bb4c['channelType'],'endpointUrl':_0x21bb4c[_0x3c80f1(0xd6)],'channelConfig':_0x21bb4c[_0x3c80f1(0xdd)],'description':_0x21bb4c['description'],'connectTimeout':_0x21bb4c[_0x3c80f1(0xce)]??DEFAULT_NOTIFICATION_CONNECT_TIMEOUT,'readTimeout':_0x21bb4c[_0x3c80f1(0xc4)]??DEFAULT_NOTIFICATION_READ_TIMEOUT})};}export const notificationConfigCreate={'service':a134_0x5d9504(0xd8),'command':a134_0x5d9504(0xdc),'description':a134_0x5d9504(0xd3),'risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[...NOTIFICATION_INPUT_FLAGS,NOTIFICATION_APP_FLAG],async 'validate'(_0x35bf70){assertSingleNotificationSource(_0x35bf70);},async 'dryRun'(_0x26159f){const _0x3bcf74=a134_0x5d9504,_0x21690c=await prepareCreate(_0x26159f),_0x288357=notificationLookupCommand(_0x26159f[_0x3bcf74(0xc8)],_0x21690c[_0x3bcf74(0xdf)][_0x3bcf74(0xdb)]);return asDryRunResult({'operation':_0x3bcf74(0xe4),'selector':{'appCode':_0x26159f['appCode'],'configName':_0x21690c[_0x3bcf74(0xdf)]['configName'],'channelType':_0x21690c[_0x3bcf74(0xdf)][_0x3bcf74(0xdb)]},'before':null,'after':_0x21690c[_0x3bcf74(0xd1)],'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[],'verification':{'status':_0x3bcf74(0xd1),'lookupCommand':_0x288357}},{'method':_0x3bcf74(0xc5),'url':CREATE_PATH});},async 'execute'(_0x4745d3){const _0x45e0b0=a134_0x5d9504,_0x404056=await prepareCreate(_0x4745d3),_0x2073dd=notificationLookupCommand(_0x4745d3[_0x45e0b0(0xc8)],_0x404056[_0x45e0b0(0xdf)]['channelType']);let _0x3b4b1f;try{_0x3b4b1f=await createNotificationChannelConfig(_0x404056['input']);}catch(_0x5dc486){if(isPlatformTransportFailure(_0x5dc486))throw notificationError(_0x45e0b0(0xcc),'Notification\x20config\x20create\x20outcome\x20is\x20unknown\x20because\x20no\x20server\x20ID\x20was\x20received.',_0x45e0b0(0xde)+_0x2073dd+_0x45e0b0(0xe2));throw safeApiFailure(_0x45e0b0(0xe4),_0x45e0b0(0xd2),_0x45e0b0(0xde)+_0x2073dd+';\x20no\x20automatic\x20retry\x20was\x20attempted.');}if(!Number[_0x45e0b0(0xd9)](_0x3b4b1f)||_0x3b4b1f<=0x0)throw notificationError('notification_config_create_outcome_unknown',_0x45e0b0(0xd7),_0x45e0b0(0xde)+_0x2073dd+_0x45e0b0(0xe2));let _0x32e26d;try{const _0x3ae744=await getNotificationChannelConfig(_0x3b4b1f,_0x4745d3['appCode']);_0x32e26d=normalizeExactNotificationConfig(_0x3ae744,_0x3b4b1f,_0x4745d3[_0x45e0b0(0xc8)]);}catch{throw safeApiFailure(_0x45e0b0(0xe4),_0x45e0b0(0xc3),'Inspect\x20with\x20'+_0x2073dd+_0x45e0b0(0xca));}return{'ok':!![],'data':{'operation':'create','selector':{'appCode':_0x32e26d[_0x45e0b0(0xc8)],'id':_0x32e26d['id'],'configCode':_0x32e26d[_0x45e0b0(0xe1)],'configName':_0x32e26d[_0x45e0b0(0xe3)],'channelType':_0x32e26d['channelType']},'before':null,'after':projectNotificationConfig(_0x32e26d),'dryRun':![],'backend':{'method':_0x45e0b0(0xc5),'path':CREATE_PATH},'warnings':[],'verification':{'status':_0x45e0b0(0xcf),'lookupCommand':_0x2073dd}},'message':_0x45e0b0(0xc6)+_0x32e26d['id']};}};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const notificationConfigDelete: CommandDefinition;