@lovrabet/rabetbase-cli 2.5.4 → 2.5.5-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +2 -1
  357. package/skills/rabetbase/SKILL.md +1 -1
  358. package/skills/rabetbase-page-generation/SKILL.md +39 -0
  359. package/skills/rabetbase-page-generation/references/component-baseline.md +18 -0
  360. package/skills/rabetbase-page-generation/references/generation.md +126 -0
  361. package/skills/rabetbase-page-generation/templates/onepage/build.mjs +48 -0
  362. package/skills/rabetbase-page-generation/templates/onepage/create/README.md +20 -0
  363. package/skills/rabetbase-page-generation/templates/onepage/create/index.jsx +4 -0
  364. package/skills/rabetbase-page-generation/templates/onepage/create/preview.png +0 -0
  365. package/skills/rabetbase-page-generation/templates/onepage/detail/README.md +20 -0
  366. package/skills/rabetbase-page-generation/templates/onepage/detail/index.jsx +194 -0
  367. package/skills/rabetbase-page-generation/templates/onepage/detail/preview.png +0 -0
  368. package/skills/rabetbase-page-generation/templates/onepage/list/README.md +20 -0
  369. package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +721 -0
  370. package/skills/rabetbase-page-generation/templates/onepage/list/preview.png +0 -0
  371. package/skills/rabetbase-page-generation/templates/onepage/shared/editor.jsx +395 -0
  372. package/skills/rabetbase-page-generation/templates/onepage/shared/model.js +141 -0
  373. package/skills/rabetbase-page-generation/templates/onepage/shared/page.css +377 -0
  374. package/skills/rabetbase-page-generation/templates/onepage/shared/record-layout.jsx +90 -0
  375. package/skills/rabetbase-page-generation/templates/onepage/shared/responsive.jsx +70 -0
  376. package/skills/rabetbase-page-generation/templates/onepage/update/README.md +21 -0
  377. package/skills/rabetbase-page-generation/templates/onepage/update/index.jsx +4 -0
  378. package/skills/rabetbase-page-generation/templates/onepage/update/preview.png +0 -0
  379. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a169_0x36feb0=a169_0x9ecc;(function(_0x200ce4,_0x4e5e4d){const _0x23b9d2=a169_0x9ecc,_0x3a02aa=_0x200ce4();while(!![]){try{const _0x17bb4a=parseInt(_0x23b9d2(0x1b1))/0x1*(-parseInt(_0x23b9d2(0x1ac))/0x2)+-parseInt(_0x23b9d2(0x1c9))/0x3+-parseInt(_0x23b9d2(0x1f9))/0x4*(parseInt(_0x23b9d2(0x20a))/0x5)+parseInt(_0x23b9d2(0x1d5))/0x6*(parseInt(_0x23b9d2(0x1d6))/0x7)+-parseInt(_0x23b9d2(0x1af))/0x8+-parseInt(_0x23b9d2(0x1c8))/0x9*(parseInt(_0x23b9d2(0x1ab))/0xa)+parseInt(_0x23b9d2(0x1f8))/0xb*(parseInt(_0x23b9d2(0x1bc))/0xc);if(_0x17bb4a===_0x4e5e4d)break;else _0x3a02aa['push'](_0x3a02aa['shift']());}catch(_0x200728){_0x3a02aa['push'](_0x3a02aa['shift']());}}}(a169_0xe3b5,0xa2c08));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':a169_0x36feb0(0x1c7),'required':!![],'description':a169_0x36feb0(0x208)};function a169_0xe3b5(){const _0x511bd6=['Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','snapshotHash','unknown','get','\x20is\x20type\x20\x22','type','cookie','defineProperty','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','failed','warnings','num','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','Exact\x20online\x20menu\x20id','code','5WORcqB','Menu\x20','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','byId','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','before','targets','isSafeInteger','verification','\x22,\x20not\x20folder.','recheck\x20online\x20menu\x20facts\x20before\x20','backend','parentId','parent-id','cascade','hasOwnProperty','5414740mRfBLU','2tstknF','appCode','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','4311496sZtovc','data','746839gwVtEw','test','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','menu_sort_overflow',',\x20current\x20','menu_sort_invalid','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','\x20menu\x20','expect-parent-id','Permission\x20denied\x20while\x20attempting\x20to\x20','toLowerCase','3636czULju','operation','pre-write-recheck','Reorder\x20sibling\x20menus\x20below\x20','read\x20online\x20menu\x20facts\x20before\x20','path','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','sort','succeeded','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','number','9eTyOEv','3126195PDmFZm','expect-path','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','plannedActions','length','selector','menu_verification_failed','menu_not_found','folder','validation','str','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','6yBnPHK','4151294CkVMnE','api_error','trim','failedRecords','deleteOrder','planFile','Online\x20menu\x20not\x20found:\x20','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','flagMissing','\x20parent\x20changed:\x20expected\x20','menu_confirmation_required','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','menu_state_drift','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','string','after','rawFlags',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','required','\x20child\x20count\x20changed:\x20expected\x20','root','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','Cannot\x20append\x20a\x20','Online\x20menu\x20state\x20changed\x20before\x20','max','expected-children-count','filter','hash','menu_mutation_failed','stringify','message','bool','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','menu_parent_not_folder','130658MVVZrM','2624516QPCphm','hint'];a169_0xe3b5=function(){return _0x511bd6;};return a169_0xe3b5();}export const MENU_SORT_FLAG={'name':a169_0x36feb0(0x1c3),'type':a169_0x36feb0(0x1c7),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':a169_0x36feb0(0x1a8),'type':'string','description':a169_0x36feb0(0x20c)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a169_0x36feb0(0x1b9),'type':a169_0x36feb0(0x1e4),'description':a169_0x36feb0(0x203)};function a169_0x9ecc(_0x2e785e,_0xa07085){_0x2e785e=_0x2e785e-0x1a7;const _0xe3b594=a169_0xe3b5();let _0x9eccdf=_0xe3b594[_0x2e785e];return _0x9eccdf;}export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':'string','description':a169_0x36feb0(0x1b7)},{'name':a169_0x36feb0(0x1ef),'type':a169_0x36feb0(0x1c7),'description':a169_0x36feb0(0x1e3)}];export function validateExactId(_0x4c36a7){const _0x1fe91f=a169_0x36feb0,_0x4e1b10=_0x4c36a7['num']('id');if(!Number[_0x1fe91f(0x211)](_0x4e1b10)||_0x4e1b10<=0x0)throw CliErrors[_0x1fe91f(0x1d2)](_0x1fe91f(0x1e1));return _0x4e1b10;}export function validateSort(_0x1f3349,_0x37b61b=a169_0x36feb0(0x1c3)){const _0x521471=a169_0x36feb0;if(!hasFlag(_0x1f3349,_0x37b61b))return undefined;const _0x1583e5=_0x1f3349[_0x521471(0x206)](_0x37b61b);if(!Number['isSafeInteger'](_0x1583e5)||_0x1583e5<0x0||_0x1583e5>MAX_MENU_SORT)throw menuError(_0x521471(0x1b6),'--'+_0x37b61b+_0x521471(0x1dd)+MAX_MENU_SORT+'.',_0x521471(0x207));return _0x1583e5;}export function nextSiblingSort(_0x325bb0,_0x4ec24b,_0x40c6a1){const _0x350ee4=a169_0x36feb0,_0x15e105=getChildren(_0x325bb0,_0x4ec24b)['map'](_0x401a7c=>_0x401a7c[_0x350ee4(0x1c3)])[_0x350ee4(0x1f0)](_0x34c861=>typeof _0x34c861===_0x350ee4(0x1c7));if(_0x15e105[_0x350ee4(0x1cd)]===0x0)return 0x0;const _0x27da21=Math[_0x350ee4(0x1ee)](..._0x15e105);if(_0x27da21>=MAX_MENU_SORT)throw menuError(_0x350ee4(0x1b4),_0x350ee4(0x1ec)+_0x40c6a1+_0x350ee4(0x1d4)+_0x27da21+'.',_0x350ee4(0x1bf)+MAX_MENU_SORT+',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.');return _0x27da21+0x1;}export function requireExplicitYes(_0x36cc0f){const _0x2ebe08=a169_0x36feb0;if(_0x36cc0f[_0x2ebe08(0x1f5)]('dry-run'))return;if(!_0x36cc0f['bool']('yes'))throw menuError(_0x2ebe08(0x1e0),_0x2ebe08(0x1c5),_0x2ebe08(0x1c2));}export async function fetchMutationSnapshot(_0x101b95,_0x1de1fd,_0x228ecd){const _0x2ec776=a169_0x36feb0;try{return await fetchMenuSnapshot(_0x101b95[_0x2ec776(0x1ad)],_0x101b95[_0x2ec776(0x201)]);}catch(_0x50a947){throw mapMenuApiError(_0x50a947,_0x2ec776(0x1c0)+_0x1de1fd,_0x228ecd);}}export async function recheckMutationSnapshot(_0x2fa97c,_0x73e30e,_0x532016,_0x264949){const _0x1feab7=a169_0x36feb0;let _0x525e3a;try{_0x525e3a=await fetchMenuSnapshot(_0x2fa97c[_0x1feab7(0x1ad)],_0x2fa97c['cookie']);}catch(_0x1c6530){const _0x2e7c42=mapMenuApiError(_0x1c6530,_0x1feab7(0x214)+_0x532016,_0x264949);throw menuFailure(_0x2e7c42,_0x73e30e,{'stage':_0x1feab7(0x1be),'failed':_0x264949==null?{}:{'id':_0x264949}});}if(_0x525e3a[_0x1feab7(0x1f1)]!==_0x73e30e[_0x1feab7(0x1fc)]){const _0x4dd25b=menuError(_0x1feab7(0x1e2),_0x1feab7(0x1ed)+_0x532016+_0x1feab7(0x1e7),_0x1feab7(0x20e));throw menuFailure(_0x4dd25b,_0x73e30e,{'stage':_0x1feab7(0x1be),'failed':{..._0x264949==null?{}:{'id':_0x264949},'expectedSnapshotHash':_0x73e30e[_0x1feab7(0x1fc)],'currentSnapshotHash':_0x525e3a['hash']}});}return _0x525e3a;}export function parseParentId(_0x28b022,_0x39c4f6,_0x1ea72a={}){const _0x4d39d8=a169_0x36feb0;if(!hasFlag(_0x28b022,_0x39c4f6)){if(_0x1ea72a[_0x4d39d8(0x1e8)])throw CliErrors[_0x4d39d8(0x1de)](_0x39c4f6);return undefined;}const _0x1f4a55=_0x28b022[_0x4d39d8(0x1d3)](_0x39c4f6)[_0x4d39d8(0x1d8)]();if(_0x1f4a55[_0x4d39d8(0x1bb)]()===_0x4d39d8(0x1ea))return null;if(!/^\d+$/[_0x4d39d8(0x1b2)](_0x1f4a55))throw CliErrors['validation']('--'+_0x39c4f6+_0x4d39d8(0x1f6));const _0x64c80a=Number(_0x1f4a55);if(!Number['isSafeInteger'](_0x64c80a)||_0x64c80a<=0x0)throw CliErrors[_0x4d39d8(0x1d2)]('--'+_0x39c4f6+_0x4d39d8(0x1f6));return _0x64c80a;}export function requireMenu(_0x458666,_0x1c2033){const _0x58ac26=a169_0x36feb0,_0x1000c2=_0x458666[_0x58ac26(0x20d)][_0x58ac26(0x1fe)](_0x1c2033);if(!_0x1000c2)throw menuError(_0x58ac26(0x1d0),_0x58ac26(0x1dc)+_0x1c2033,'Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.');return _0x1000c2;}export function requireFolder(_0x1d4910,_0x36a31f){const _0x213dbe=a169_0x36feb0,_0x3b271f=requireMenu(_0x1d4910,_0x36a31f);if(_0x3b271f[_0x213dbe(0x200)]!==_0x213dbe(0x1d1))throw menuError(_0x213dbe(0x1f7),'Menu\x20'+_0x36a31f+_0x213dbe(0x1ff)+(_0x3b271f[_0x213dbe(0x200)]||_0x213dbe(0x1fd))+_0x213dbe(0x213),_0x213dbe(0x1ae));return _0x3b271f;}export function assertExpectedState(_0x467d49,_0x1e6662){const _0x14a156=a169_0x36feb0;if(hasFlag(_0x467d49,_0x14a156(0x1b9))){const _0x1ca48e=parseParentId(_0x467d49,'expect-parent-id',{'required':!![]});if(_0x1e6662[_0x14a156(0x1a7)]!==_0x1ca48e)throw stateDrift(_0x14a156(0x20b)+_0x1e6662['id']+_0x14a156(0x1df)+formatParent(_0x1ca48e)+_0x14a156(0x1b5)+formatParent(_0x1e6662[_0x14a156(0x1a7)])+'.');}if(hasFlag(_0x467d49,_0x14a156(0x1ca))){const _0x24f871=_0x467d49['str'](_0x14a156(0x1ca));if(_0x1e6662[_0x14a156(0x1c1)]!==_0x24f871)throw stateDrift(_0x14a156(0x20b)+_0x1e6662['id']+'\x20path\x20changed:\x20expected\x20'+JSON[_0x14a156(0x1f3)](_0x24f871)+_0x14a156(0x1b5)+JSON[_0x14a156(0x1f3)](_0x1e6662[_0x14a156(0x1c1)])+'.');}if(hasFlag(_0x467d49,_0x14a156(0x1ef))){const _0x25ac98=_0x467d49['num'](_0x14a156(0x1ef));if(!Number['isSafeInteger'](_0x25ac98)||_0x25ac98<0x0)throw CliErrors[_0x14a156(0x1d2)]('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x1e6662['childrenCount']!==_0x25ac98)throw stateDrift(_0x14a156(0x20b)+_0x1e6662['id']+_0x14a156(0x1e9)+_0x25ac98+_0x14a156(0x1b5)+_0x1e6662['childrenCount']+'.');}}export function assertVerified(_0x1917df,_0x260b4e,_0x125a0f=a169_0x36feb0(0x1eb)){const _0x433630=a169_0x36feb0;if(!_0x1917df)throw menuError(_0x433630(0x1cf),_0x260b4e,_0x125a0f);}export function mutationResult(_0x4003f0){const _0x24cf2d=a169_0x36feb0;return{'operation':_0x4003f0[_0x24cf2d(0x1bd)],'selector':_0x4003f0[_0x24cf2d(0x1ce)],'before':_0x4003f0[_0x24cf2d(0x20f)],'after':_0x4003f0['after'],'dryRun':_0x4003f0['dryRun'],'backend':_0x4003f0[_0x24cf2d(0x215)],..._0x4003f0[_0x24cf2d(0x1cc)]?{'plannedActions':_0x4003f0[_0x24cf2d(0x1cc)]}:{},..._0x4003f0[_0x24cf2d(0x210)]?{'targets':_0x4003f0[_0x24cf2d(0x210)]}:{},..._0x4003f0[_0x24cf2d(0x1da)]?{'deleteOrder':_0x4003f0[_0x24cf2d(0x1da)]}:{},'snapshotHash':_0x4003f0[_0x24cf2d(0x1fc)],..._0x4003f0[_0x24cf2d(0x1a9)]?{'cascade':_0x4003f0[_0x24cf2d(0x1a9)]}:{},..._0x4003f0[_0x24cf2d(0x1db)]?{'planFile':_0x4003f0[_0x24cf2d(0x1db)]}:{},'succeeded':_0x4003f0[_0x24cf2d(0x1c4)]??[],'failed':_0x4003f0[_0x24cf2d(0x204)]??[],'warnings':_0x4003f0[_0x24cf2d(0x205)]??[],'verification':_0x4003f0[_0x24cf2d(0x212)],'error':_0x4003f0['error']};}export function menuDryRunResult(_0x70ca08,_0x21708f){return{..._0x70ca08,..._0x21708f};}export function menuFailure(_0x3d2620,_0x36eeb6,_0x38a992){const _0x25c6ba=a169_0x36feb0,_0x53735f=mutationResult({..._0x36eeb6,'after':_0x38a992[_0x25c6ba(0x1e5)]===undefined?_0x36eeb6[_0x25c6ba(0x1e5)]:_0x38a992[_0x25c6ba(0x1e5)],'backend':_0x38a992[_0x25c6ba(0x215)]??_0x36eeb6[_0x25c6ba(0x215)],'dryRun':![],'succeeded':_0x38a992[_0x25c6ba(0x1c4)]??[],'failed':_0x38a992[_0x25c6ba(0x1d9)]??[{..._0x38a992[_0x25c6ba(0x204)]??{},'stage':_0x38a992['stage'],'code':_0x3d2620['code'],'message':_0x3d2620[_0x25c6ba(0x1f4)]}],'warnings':[..._0x36eeb6[_0x25c6ba(0x205)],..._0x38a992[_0x25c6ba(0x205)]??[]],'verification':_0x38a992[_0x25c6ba(0x212)],'error':{'code':_0x3d2620[_0x25c6ba(0x209)],'message':_0x3d2620[_0x25c6ba(0x1f4)],..._0x3d2620['hint']?{'hint':_0x3d2620[_0x25c6ba(0x1fa)]}:{}}});return Object[_0x25c6ba(0x202)](_0x3d2620,_0x25c6ba(0x1b0),{'value':_0x53735f,'enumerable':!![],'configurable':!![]}),_0x3d2620;}export function asVerificationError(_0x5eaa51,_0x1e28e4){const _0x40ed70=a169_0x36feb0;if(_0x5eaa51 instanceof CliError&&_0x5eaa51['code']==='menu_verification_failed')return _0x5eaa51;const _0x5aa2a9=_0x5eaa51 instanceof Error?_0x5eaa51['message']:String(_0x5eaa51);return menuError(_0x40ed70(0x1cf),''+_0x1e28e4+(_0x5aa2a9?':\x20'+_0x5aa2a9:''),_0x40ed70(0x1c6));}export function describeMenuErrorCause(_0x4aa0ee,_0x1b813,_0x26d8b6){const _0x2eb6ed=a169_0x36feb0,_0x5ad991=mapMenuApiError(_0x4aa0ee,_0x1b813,_0x26d8b6);return{'causeCode':_0x5ad991[_0x2eb6ed(0x209)],'causeMessage':_0x5ad991[_0x2eb6ed(0x1f4)]};}export function hasFlag(_0x1ffbe3,_0x15cbd7){const _0x1cbd2f=a169_0x36feb0;return Object['prototype'][_0x1cbd2f(0x1aa)]['call'](_0x1ffbe3[_0x1cbd2f(0x1e6)],_0x15cbd7)&&_0x1ffbe3[_0x1cbd2f(0x1e6)][_0x15cbd7]!==undefined;}export function toApiParentId(_0x210d5d){return _0x210d5d??0x0;}export function formatParent(_0x3e2693){const _0x33d6c4=a169_0x36feb0;return _0x3e2693==null?_0x33d6c4(0x1ea):String(_0x3e2693);}export function menuError(_0x1140d0,_0x2103c2,_0x2b532a){return new CliError(_0x1140d0,0x1,_0x2103c2,_0x2b532a);}export function mapMenuApiError(_0x590d84,_0x14a3e0,_0x57a0e5){const _0x4b2ee9=a169_0x36feb0;if(_0x590d84 instanceof CliError&&_0x590d84['code']!==_0x4b2ee9(0x1d7))return _0x590d84;const _0x31f378=_0x590d84 instanceof Error?_0x590d84['message']:String(_0x590d84);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x4b2ee9(0x1b2)](_0x31f378))return menuError('menu_permission_denied',_0x4b2ee9(0x1ba)+_0x14a3e0+(_0x57a0e5?_0x4b2ee9(0x1b8)+_0x57a0e5:'')+'.',_0x4b2ee9(0x1fb));return menuError(_0x4b2ee9(0x1f2),'Failed\x20to\x20'+_0x14a3e0+(_0x57a0e5?'\x20menu\x20'+_0x57a0e5:'')+':\x20'+_0x31f378,_0x4b2ee9(0x1b3));}export function isMenuResponseLoss(_0x2fa87c){const _0x4fd326=a169_0x36feb0,_0x11940b=_0x2fa87c instanceof Error?_0x2fa87c[_0x4fd326(0x1f4)]:String(_0x2fa87c);if(_0x2fa87c instanceof CliError)return _0x2fa87c[_0x4fd326(0x209)]==='api_error'&&/^Request (?:failed|timeout):/i[_0x4fd326(0x1b2)](_0x11940b);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x4fd326(0x1b2)](_0x11940b);}function stateDrift(_0x1f6baa){const _0x29f09c=a169_0x36feb0;return menuError('menu_state_drift',_0x1f6baa,_0x29f09c(0x1cb));}
1
+ const a169_0x395969=a169_0x1eab;(function(_0x58f2a4,_0x5b94ee){const _0x244cd0=a169_0x1eab,_0x695d87=_0x58f2a4();while(!![]){try{const _0x923d0f=parseInt(_0x244cd0(0x192))/0x1*(parseInt(_0x244cd0(0x194))/0x2)+-parseInt(_0x244cd0(0x1ba))/0x3*(-parseInt(_0x244cd0(0x1e1))/0x4)+-parseInt(_0x244cd0(0x19c))/0x5+parseInt(_0x244cd0(0x18a))/0x6*(-parseInt(_0x244cd0(0x1cc))/0x7)+parseInt(_0x244cd0(0x1c2))/0x8+-parseInt(_0x244cd0(0x1d1))/0x9+parseInt(_0x244cd0(0x1c0))/0xa;if(_0x923d0f===_0x5b94ee)break;else _0x695d87['push'](_0x695d87['shift']());}catch(_0x141406){_0x695d87['push'](_0x695d87['shift']());}}}(a169_0x4356,0x5e4b7));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':a169_0x395969(0x198),'required':!![],'description':a169_0x395969(0x1c8)};export const MENU_SORT_FLAG={'name':a169_0x395969(0x1cd),'type':a169_0x395969(0x198),'description':a169_0x395969(0x1d3)};export const MENU_PARENT_ID_FLAG={'name':a169_0x395969(0x1c3),'type':'string','description':a169_0x395969(0x1f4)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a169_0x395969(0x1ec),'type':a169_0x395969(0x1db),'description':a169_0x395969(0x1be)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a169_0x395969(0x1e7),'type':a169_0x395969(0x1db),'description':a169_0x395969(0x1ef)},{'name':'expected-children-count','type':a169_0x395969(0x198),'description':a169_0x395969(0x1e8)}];function a169_0x1eab(_0x4879de,_0x4a724b){_0x4879de=_0x4879de-0x186;const _0x435682=a169_0x4356();let _0x1eabbd=_0x435682[_0x4879de];return _0x1eabbd;}export function validateExactId(_0x5aef6f){const _0x5e6d3b=a169_0x395969,_0x3d8ff0=_0x5aef6f['num']('id');if(!Number[_0x5e6d3b(0x1f2)](_0x3d8ff0)||_0x3d8ff0<=0x0)throw CliErrors[_0x5e6d3b(0x1a6)](_0x5e6d3b(0x1ee));return _0x3d8ff0;}export function validateSort(_0x305773,_0x2b2193=a169_0x395969(0x1cd)){const _0x4061af=a169_0x395969;if(!hasFlag(_0x305773,_0x2b2193))return undefined;const _0x577517=_0x305773[_0x4061af(0x1b1)](_0x2b2193);if(!Number[_0x4061af(0x1f2)](_0x577517)||_0x577517<0x0||_0x577517>MAX_MENU_SORT)throw menuError(_0x4061af(0x1d4),'--'+_0x2b2193+_0x4061af(0x1e0)+MAX_MENU_SORT+'.',_0x4061af(0x1a2));return _0x577517;}export function nextSiblingSort(_0x2ec4b6,_0x38093c,_0x5b6a84){const _0x3f5ab1=a169_0x395969,_0x3884f4=getChildren(_0x2ec4b6,_0x38093c)[_0x3f5ab1(0x1a5)](_0x161ceb=>_0x161ceb[_0x3f5ab1(0x1cd)])['filter'](_0x2b745e=>typeof _0x2b745e===_0x3f5ab1(0x198));if(_0x3884f4[_0x3f5ab1(0x1a1)]===0x0)return 0x0;const _0x5c497a=Math[_0x3f5ab1(0x1f0)](..._0x3884f4);if(_0x5c497a>=MAX_MENU_SORT)throw menuError(_0x3f5ab1(0x1bb),_0x3f5ab1(0x1d0)+_0x5b6a84+_0x3f5ab1(0x199)+_0x5c497a+'.',_0x3f5ab1(0x1d6)+MAX_MENU_SORT+_0x3f5ab1(0x1e9));return _0x5c497a+0x1;}export function requireExplicitYes(_0x402a76){const _0x55605a=a169_0x395969;if(_0x402a76['bool']('dry-run'))return;if(!_0x402a76[_0x55605a(0x18e)](_0x55605a(0x1a9)))throw menuError(_0x55605a(0x18f),_0x55605a(0x1b8),'Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.');}export async function fetchMutationSnapshot(_0x34728b,_0x5d8f64,_0x5c5ffc){const _0x1b7715=a169_0x395969;try{return await fetchMenuSnapshot(_0x34728b['appCode'],_0x34728b[_0x1b7715(0x1f3)]);}catch(_0xb8d07d){throw mapMenuApiError(_0xb8d07d,_0x1b7715(0x189)+_0x5d8f64,_0x5c5ffc);}}export async function recheckMutationSnapshot(_0x1b8d90,_0x497db1,_0x50ecaa,_0x5c6cc0){const _0x18c8be=a169_0x395969;let _0x3f900d;try{_0x3f900d=await fetchMenuSnapshot(_0x1b8d90['appCode'],_0x1b8d90[_0x18c8be(0x1f3)]);}catch(_0x135d78){const _0x4b551e=mapMenuApiError(_0x135d78,_0x18c8be(0x1c9)+_0x50ecaa,_0x5c6cc0);throw menuFailure(_0x4b551e,_0x497db1,{'stage':_0x18c8be(0x1ab),'failed':_0x5c6cc0==null?{}:{'id':_0x5c6cc0}});}if(_0x3f900d[_0x18c8be(0x19d)]!==_0x497db1[_0x18c8be(0x1d7)]){const _0x284754=menuError(_0x18c8be(0x1e3),_0x18c8be(0x1ae)+_0x50ecaa+_0x18c8be(0x1c4),_0x18c8be(0x1ca));throw menuFailure(_0x284754,_0x497db1,{'stage':_0x18c8be(0x1ab),'failed':{..._0x5c6cc0==null?{}:{'id':_0x5c6cc0},'expectedSnapshotHash':_0x497db1[_0x18c8be(0x1d7)],'currentSnapshotHash':_0x3f900d[_0x18c8be(0x19d)]}});}return _0x3f900d;}export function parseParentId(_0xb6d708,_0x1e99c1,_0x8b2a31={}){const _0x2e4312=a169_0x395969;if(!hasFlag(_0xb6d708,_0x1e99c1)){if(_0x8b2a31['required'])throw CliErrors['flagMissing'](_0x1e99c1);return undefined;}const _0x2243f6=_0xb6d708[_0x2e4312(0x1ea)](_0x1e99c1)[_0x2e4312(0x1b4)]();if(_0x2243f6[_0x2e4312(0x1c7)]()==='root')return null;if(!/^\d+$/['test'](_0x2243f6))throw CliErrors['validation']('--'+_0x1e99c1+_0x2e4312(0x1bc));const _0x26a11e=Number(_0x2243f6);if(!Number[_0x2e4312(0x1f2)](_0x26a11e)||_0x26a11e<=0x0)throw CliErrors[_0x2e4312(0x1a6)]('--'+_0x1e99c1+_0x2e4312(0x1bc));return _0x26a11e;}export function requireMenu(_0x43d54b,_0x480709){const _0x5e639e=a169_0x395969,_0x1b05c0=_0x43d54b['byId'][_0x5e639e(0x1de)](_0x480709);if(!_0x1b05c0)throw menuError(_0x5e639e(0x1d2),_0x5e639e(0x1cb)+_0x480709,_0x5e639e(0x1d5));return _0x1b05c0;}export function requireFolder(_0x365235,_0x163ec1){const _0x5e1b5b=a169_0x395969,_0x787f6a=requireMenu(_0x365235,_0x163ec1);if(_0x787f6a[_0x5e1b5b(0x188)]!==_0x5e1b5b(0x1f5))throw menuError(_0x5e1b5b(0x1b0),_0x5e1b5b(0x1eb)+_0x163ec1+_0x5e1b5b(0x1dd)+(_0x787f6a[_0x5e1b5b(0x188)]||_0x5e1b5b(0x1a8))+_0x5e1b5b(0x1b7),'Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.');return _0x787f6a;}export function assertExpectedState(_0x24a857,_0xf2aa49){const _0x2c1778=a169_0x395969;if(hasFlag(_0x24a857,_0x2c1778(0x1ec))){const _0x3efee2=parseParentId(_0x24a857,_0x2c1778(0x1ec),{'required':!![]});if(_0xf2aa49[_0x2c1778(0x19e)]!==_0x3efee2)throw stateDrift('Menu\x20'+_0xf2aa49['id']+_0x2c1778(0x187)+formatParent(_0x3efee2)+_0x2c1778(0x1c1)+formatParent(_0xf2aa49[_0x2c1778(0x19e)])+'.');}if(hasFlag(_0x24a857,'expect-path')){const _0xf73add=_0x24a857['str'](_0x2c1778(0x1e7));if(_0xf2aa49[_0x2c1778(0x1a4)]!==_0xf73add)throw stateDrift(_0x2c1778(0x1eb)+_0xf2aa49['id']+_0x2c1778(0x1b2)+JSON[_0x2c1778(0x197)](_0xf73add)+',\x20current\x20'+JSON[_0x2c1778(0x197)](_0xf2aa49[_0x2c1778(0x1a4)])+'.');}if(hasFlag(_0x24a857,_0x2c1778(0x1ad))){const _0x4d10c8=_0x24a857['num'](_0x2c1778(0x1ad));if(!Number[_0x2c1778(0x1f2)](_0x4d10c8)||_0x4d10c8<0x0)throw CliErrors[_0x2c1778(0x1a6)](_0x2c1778(0x1e5));if(_0xf2aa49[_0x2c1778(0x1bd)]!==_0x4d10c8)throw stateDrift(_0x2c1778(0x1eb)+_0xf2aa49['id']+_0x2c1778(0x1bf)+_0x4d10c8+_0x2c1778(0x1c1)+_0xf2aa49[_0x2c1778(0x1bd)]+'.');}}export function assertVerified(_0x557067,_0x186054,_0x365537=a169_0x395969(0x1da)){const _0x246fb6=a169_0x395969;if(!_0x557067)throw menuError(_0x246fb6(0x1e2),_0x186054,_0x365537);}export function mutationResult(_0x34aae0){const _0x3306cb=a169_0x395969;return{'operation':_0x34aae0['operation'],'selector':_0x34aae0[_0x3306cb(0x1e4)],'before':_0x34aae0['before'],'after':_0x34aae0['after'],'dryRun':_0x34aae0[_0x3306cb(0x193)],'backend':_0x34aae0[_0x3306cb(0x1c5)],..._0x34aae0[_0x3306cb(0x191)]?{'plannedActions':_0x34aae0[_0x3306cb(0x191)]}:{},..._0x34aae0['targets']?{'targets':_0x34aae0['targets']}:{},..._0x34aae0[_0x3306cb(0x196)]?{'deleteOrder':_0x34aae0[_0x3306cb(0x196)]}:{},'snapshotHash':_0x34aae0[_0x3306cb(0x1d7)],..._0x34aae0[_0x3306cb(0x19f)]?{'cascade':_0x34aae0[_0x3306cb(0x19f)]}:{},..._0x34aae0['planFile']?{'planFile':_0x34aae0[_0x3306cb(0x18b)]}:{},'succeeded':_0x34aae0[_0x3306cb(0x1a7)]??[],'failed':_0x34aae0['failed']??[],'warnings':_0x34aae0[_0x3306cb(0x1ed)]??[],'verification':_0x34aae0[_0x3306cb(0x1c6)],'error':_0x34aae0[_0x3306cb(0x18d)]};}export function menuDryRunResult(_0x418b23,_0x1f5181){return{..._0x418b23,..._0x1f5181};}export function menuFailure(_0x291ac1,_0x44a578,_0x4c57d6){const _0x2ecb80=a169_0x395969,_0x447872=mutationResult({..._0x44a578,'after':_0x4c57d6['after']===undefined?_0x44a578[_0x2ecb80(0x1d9)]:_0x4c57d6[_0x2ecb80(0x1d9)],'backend':_0x4c57d6[_0x2ecb80(0x1c5)]??_0x44a578[_0x2ecb80(0x1c5)],'dryRun':![],'succeeded':_0x4c57d6['succeeded']??[],'failed':_0x4c57d6[_0x2ecb80(0x1e6)]??[{..._0x4c57d6['failed']??{},'stage':_0x4c57d6[_0x2ecb80(0x195)],'code':_0x291ac1['code'],'message':_0x291ac1[_0x2ecb80(0x1af)]}],'warnings':[..._0x44a578[_0x2ecb80(0x1ed)],..._0x4c57d6[_0x2ecb80(0x1ed)]??[]],'verification':_0x4c57d6[_0x2ecb80(0x1c6)],'error':{'code':_0x291ac1[_0x2ecb80(0x19a)],'message':_0x291ac1[_0x2ecb80(0x1af)],..._0x291ac1[_0x2ecb80(0x1df)]?{'hint':_0x291ac1[_0x2ecb80(0x1df)]}:{}}});return Object[_0x2ecb80(0x1f1)](_0x291ac1,_0x2ecb80(0x18c),{'value':_0x447872,'enumerable':!![],'configurable':!![]}),_0x291ac1;}export function asVerificationError(_0x5e0116,_0x1eded1){const _0x13d4bd=a169_0x395969;if(_0x5e0116 instanceof CliError&&_0x5e0116[_0x13d4bd(0x19a)]===_0x13d4bd(0x1e2))return _0x5e0116;const _0x958d0=_0x5e0116 instanceof Error?_0x5e0116[_0x13d4bd(0x1af)]:String(_0x5e0116);return menuError(_0x13d4bd(0x1e2),''+_0x1eded1+(_0x958d0?':\x20'+_0x958d0:''),_0x13d4bd(0x19b));}function a169_0x4356(){const _0x4fcf50=['Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','Reorder\x20sibling\x20menus\x20below\x20','snapshotHash','api_error','after','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','string','hasOwnProperty','\x20is\x20type\x20\x22','get','hint','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','2336996wqJVsx','menu_verification_failed','menu_state_drift','selector','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','failedRecords','expect-path','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','str','Menu\x20','expect-parent-id','warnings','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','max','defineProperty','isSafeInteger','cookie','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','folder','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','\x20parent\x20changed:\x20expected\x20','type','read\x20online\x20menu\x20facts\x20before\x20','19194GeTVcW','planFile','data','error','bool','menu_confirmation_required','Failed\x20to\x20','plannedActions','3RJABKF','dryRun','107444cliVsm','stage','deleteOrder','stringify','number','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','code','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','1206995ojMqsC','hash','parentId','cascade','prototype','length','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','root','path','map','validation','succeeded','unknown','yes','\x20menu\x20','pre-write-recheck','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','expected-children-count','Online\x20menu\x20state\x20changed\x20before\x20','message','menu_parent_not_folder','num','\x20path\x20changed:\x20expected\x20','test','trim','Permission\x20denied\x20while\x20attempting\x20to\x20','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x22,\x20not\x20folder.','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','call','3MTyvVC','menu_sort_overflow','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','childrenCount','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','\x20child\x20count\x20changed:\x20expected\x20','1505040CqrOOu',',\x20current\x20','540248QxqRlx','parent-id',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','backend','verification','toLowerCase','Exact\x20online\x20menu\x20id','recheck\x20online\x20menu\x20facts\x20before\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','Online\x20menu\x20not\x20found:\x20','301xhRiNx','sort','rawFlags','menu_permission_denied','Cannot\x20append\x20a\x20','1784367qFVhLK','menu_not_found','Sibling\x20sort\x20value\x20(non-negative\x20integer)','menu_sort_invalid'];a169_0x4356=function(){return _0x4fcf50;};return a169_0x4356();}export function describeMenuErrorCause(_0x33ad9e,_0x46ca5f,_0x565457){const _0x857d9a=a169_0x395969,_0x836b7c=mapMenuApiError(_0x33ad9e,_0x46ca5f,_0x565457);return{'causeCode':_0x836b7c['code'],'causeMessage':_0x836b7c[_0x857d9a(0x1af)]};}export function hasFlag(_0x282717,_0x5a92ee){const _0x5d7e11=a169_0x395969;return Object[_0x5d7e11(0x1a0)][_0x5d7e11(0x1dc)][_0x5d7e11(0x1b9)](_0x282717['rawFlags'],_0x5a92ee)&&_0x282717[_0x5d7e11(0x1ce)][_0x5a92ee]!==undefined;}export function toApiParentId(_0x2869e6){return _0x2869e6??0x0;}export function formatParent(_0x152920){const _0x2c8c9a=a169_0x395969;return _0x152920==null?_0x2c8c9a(0x1a3):String(_0x152920);}export function menuError(_0x155e5c,_0x5a0705,_0x38e0c2){return new CliError(_0x155e5c,0x1,_0x5a0705,_0x38e0c2);}export function mapMenuApiError(_0xc7f012,_0x411052,_0x3dbbb5){const _0x5d3127=a169_0x395969;if(_0xc7f012 instanceof CliError&&_0xc7f012[_0x5d3127(0x19a)]!==_0x5d3127(0x1d8))return _0xc7f012;const _0xfea93a=_0xc7f012 instanceof Error?_0xc7f012['message']:String(_0xc7f012);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x5d3127(0x1b3)](_0xfea93a))return menuError(_0x5d3127(0x1cf),_0x5d3127(0x1b5)+_0x411052+(_0x3dbbb5?_0x5d3127(0x1aa)+_0x3dbbb5:'')+'.',_0x5d3127(0x1b6));return menuError('menu_mutation_failed',_0x5d3127(0x190)+_0x411052+(_0x3dbbb5?_0x5d3127(0x1aa)+_0x3dbbb5:'')+':\x20'+_0xfea93a,_0x5d3127(0x1ac));}export function isMenuResponseLoss(_0x27e796){const _0x6d3d29=a169_0x395969,_0x288308=_0x27e796 instanceof Error?_0x27e796[_0x6d3d29(0x1af)]:String(_0x27e796);if(_0x27e796 instanceof CliError)return _0x27e796[_0x6d3d29(0x19a)]==='api_error'&&/^Request (?:failed|timeout):/i[_0x6d3d29(0x1b3)](_0x288308);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x6d3d29(0x1b3)](_0x288308);}function stateDrift(_0x12a28b){const _0x33eb72=a169_0x395969;return menuError(_0x33eb72(0x1e3),_0x12a28b,_0x33eb72(0x186));}
@@ -1 +1 @@
1
- function a170_0x4301(_0x269fc0,_0x851943){_0x269fc0=_0x269fc0-0xbd;const _0x10e7a8=a170_0x10e7();let _0x43019c=_0x10e7a8[_0x269fc0];return _0x43019c;}(function(_0x1dba6a,_0x3a65df){const _0x8de57b=a170_0x4301,_0x10b0a4=_0x1dba6a();while(!![]){try{const _0x3b134f=-parseInt(_0x8de57b(0xbf))/0x1*(-parseInt(_0x8de57b(0xc0))/0x2)+parseInt(_0x8de57b(0xbe))/0x3*(-parseInt(_0x8de57b(0xc9))/0x4)+-parseInt(_0x8de57b(0xc7))/0x5+-parseInt(_0x8de57b(0xc3))/0x6*(-parseInt(_0x8de57b(0xc4))/0x7)+-parseInt(_0x8de57b(0xc1))/0x8+parseInt(_0x8de57b(0xc5))/0x9*(parseInt(_0x8de57b(0xc2))/0xa)+parseInt(_0x8de57b(0xc6))/0xb*(parseInt(_0x8de57b(0xbd))/0xc);if(_0x3b134f===_0x3a65df)break;else _0x10b0a4['push'](_0x10b0a4['shift']());}catch(_0x2c65a7){_0x10b0a4['push'](_0x10b0a4['shift']());}}}(a170_0x10e7,0x667a6));export function menuPathKey(_0x5f501d){const _0x4b8930=a170_0x4301,_0xb539b5=_0x5f501d[_0x4b8930(0xc8)]();if(!_0xb539b5)return'';return _0xb539b5['replace'](/^\/+/,'')['replace'](/\/+$/,'')||'/';}function a170_0x10e7(){const _0x3504fe=['187EGVrcZ','1566980XYmjFr','trim','106132ELbPLq','421296dWSjIv','93YmFCRV','410485kWvawP','4ljReHH','2807992xKDwRq','390oHNiWY','2330154AtBpun','7aJziUh','23193zKHWHi'];a170_0x10e7=function(){return _0x3504fe;};return a170_0x10e7();}
1
+ function a170_0x3482(_0xbbb58e,_0x32ef15){_0xbbb58e=_0xbbb58e-0xc1;const _0x306fd1=a170_0x306f();let _0x348266=_0x306fd1[_0xbbb58e];return _0x348266;}(function(_0x17dcf2,_0x1cae7e){const _0x4452e5=a170_0x3482,_0xa58000=_0x17dcf2();while(!![]){try{const _0x161200=parseInt(_0x4452e5(0xc5))/0x1*(-parseInt(_0x4452e5(0xc3))/0x2)+parseInt(_0x4452e5(0xc6))/0x3*(parseInt(_0x4452e5(0xcc))/0x4)+-parseInt(_0x4452e5(0xca))/0x5*(-parseInt(_0x4452e5(0xc8))/0x6)+-parseInt(_0x4452e5(0xc9))/0x7+-parseInt(_0x4452e5(0xc4))/0x8+-parseInt(_0x4452e5(0xcb))/0x9+parseInt(_0x4452e5(0xc7))/0xa;if(_0x161200===_0x1cae7e)break;else _0xa58000['push'](_0xa58000['shift']());}catch(_0x136979){_0xa58000['push'](_0xa58000['shift']());}}}(a170_0x306f,0xc1e51));function a170_0x306f(){const _0x3aa197=['trim','replace','2184328AHpvzu','10623056nmrlZQ','1MtYNSt','896724CiDhCy','42066500iBrRLA','24372tgUBwk','8571808UnRQms','55sMLrAX','11763801HBnEfZ','20BPwzDE'];a170_0x306f=function(){return _0x3aa197;};return a170_0x306f();}export function menuPathKey(_0x52831e){const _0x54f567=a170_0x3482,_0x5a15f2=_0x52831e[_0x54f567(0xc1)]();if(!_0x5a15f2)return'';return _0x5a15f2['replace'](/^\/+/,'')[_0x54f567(0xc2)](/\/+$/,'')||'/';}
@@ -1 +1 @@
1
- (function(_0x4426f7,_0x5608c1){const _0x374716=a171_0x454e,_0x41ec18=_0x4426f7();while(!![]){try{const _0x1ccbab=-parseInt(_0x374716(0x107))/0x1+-parseInt(_0x374716(0x102))/0x2+-parseInt(_0x374716(0x100))/0x3+parseInt(_0x374716(0x114))/0x4+parseInt(_0x374716(0x10b))/0x5+-parseInt(_0x374716(0xf9))/0x6+parseInt(_0x374716(0x118))/0x7*(parseInt(_0x374716(0x11b))/0x8);if(_0x1ccbab===_0x5608c1)break;else _0x41ec18['push'](_0x41ec18['shift']());}catch(_0x3c8036){_0x41ec18['push'](_0x41ec18['shift']());}}}(a171_0x255f,0x5ce68));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 a171_0x2248c0,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1d7664,_0x4790ee){const _0x3f7133=a171_0x454e,_0x5c97ab=getEnv();logger[_0x3f7133(0x11d)](_0x3f7133(0x11c),isProduction(_0x5c97ab)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x1d7664+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x1d7664+')');const _0x30c6b6=await fetchMenuSnapshot(_0x1d7664,_0x4790ee,{'verbose':!![]});return logger[_0x3f7133(0x11d)]('get-online-menu-list','Fetched\x20'+_0x30c6b6['total']+'\x20online\x20menus\x20successfully'),_0x30c6b6[_0x3f7133(0x116)][_0x3f7133(0xf6)](toProcessedMenuItem);}export async function createMenu(_0x56ea77,_0x45114c,_0x1e6781){const _0x2fed26=a171_0x454e;logger[_0x2fed26(0x11d)](_0x2fed26(0x115),_0x2fed26(0x10a)+_0x1e6781[_0x2fed26(0x110)]+'\x20('+_0x1e6781[_0x2fed26(0x105)]+')');const _0x165ea0={'appCode':_0x56ea77,'type':_0x2fed26(0xf7),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x1e6781[_0x2fed26(0xf8)]?JSON[_0x2fed26(0x111)](_0x1e6781[_0x2fed26(0xf8)]):undefined},..._0x1e6781},_0x30cdb8=await createMenuRecord(_0x165ea0,_0x45114c,'Create\x20menu\x20\x22'+_0x1e6781[_0x2fed26(0x110)]+'\x22');return logger['info'](_0x2fed26(0x115),'Menu\x20created\x20successfully:\x20'+_0x1e6781[_0x2fed26(0x110)]),_0x30cdb8;}function a171_0x255f(){const _0x2adc47=['Menu\x20created\x20successfully:\x20','\x20menu\x20group(s)','import','Updating\x20menu\x20asset\x20links:\x20','1762992FBSXLo','\x20menu','602928NNXpZi','Menu\x20assets\x20synced:\x20','visible','path','all','58471vJbAeD','length','boolean','Creating\x20menu:\x20','633300RCkIOC','extend','update-menu-cdn-url','parentId','Create\x20menu\x20\x22','label','stringify','create-menus','appName','822624cnecuL','create-menu','menus','Update\x20menu\x20assets\x20\x22','8903335MOkYxp','Batch\x20menu\x20creation\x20completed,\x20total\x20','order','8AJhWSL','get-online-menu-list','info','number','map','procode','resources','1656612cpPmCk','loadScriptMode','Regroup\x20'];a171_0x255f=function(){return _0x2adc47;};return a171_0x255f();}async function createSingleMenu(_0x2eb70a,_0x454f2f,_0x45d9ce,_0x40e1bc,_0x5afd57){const _0x48c6d0=a171_0x454e,_0xc002fd={'appCode':_0x2eb70a,'type':'procode','sort':_0x48c6d0(0x11a)in _0x45d9ce&&typeof _0x45d9ce[_0x48c6d0(0x11a)]==='number'?_0x45d9ce[_0x48c6d0(0x11a)]:0x0,..._0x48c6d0(0x104)in _0x45d9ce&&typeof _0x45d9ce[_0x48c6d0(0x104)]===_0x48c6d0(0x109)?{'visible':_0x45d9ce[_0x48c6d0(0x104)]}:{},..._0x48c6d0(0x10e)in _0x45d9ce&&typeof _0x45d9ce[_0x48c6d0(0x10e)]===_0x48c6d0(0x11e)?{'parentId':_0x45d9ce[_0x48c6d0(0x10e)]}:{},'extend':{..._0x5afd57?.[_0x48c6d0(0x113)]?{'appName':_0x5afd57[_0x48c6d0(0x113)]}:{},'loadScriptMode':_0x48c6d0(0xfe),'resources':_0x40e1bc?JSON[_0x48c6d0(0x111)](_0x40e1bc):undefined},'label':_0x45d9ce[_0x48c6d0(0x110)],'path':_0x45d9ce['path']},_0x288c6b=await createMenuRecord(_0xc002fd,_0x454f2f,_0x48c6d0(0x10f)+_0x45d9ce[_0x48c6d0(0x110)]+'\x22');return logger[_0x48c6d0(0x11d)](_0x48c6d0(0x115),_0x48c6d0(0xfc)+_0x45d9ce['label']),_0x288c6b;}export async function createMenus(_0x45e652,_0x25b0cf,_0x426a14,_0x4d456a,_0xc7b150){const _0x4d0f9e=a171_0x454e;logger[_0x4d0f9e(0x11d)]('create-menus','Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x426a14[_0x4d0f9e(0x108)]);const _0x287fb9=await Promise[_0x4d0f9e(0x106)](_0x426a14[_0x4d0f9e(0xf6)](_0x55869b=>createSingleMenu(_0x45e652,_0x25b0cf,_0x55869b,_0x4d456a,_0xc7b150)));return logger[_0x4d0f9e(0x11d)](_0x4d0f9e(0x112),_0x4d0f9e(0x119)+_0x426a14['length']),_0x287fb9;}export async function updateMenuCdnUrl(_0x1625d4,_0x236305,_0x21d54f){const _0x156b25=a171_0x454e;logger[_0x156b25(0x11d)](_0x156b25(0x10d),_0x156b25(0xff)+_0x21d54f[_0x156b25(0x110)]+'\x20('+_0x21d54f['path']+')');const _0x35c117={'id':_0x21d54f['id'],'appCode':_0x1625d4,'extend':{..._0x21d54f[_0x156b25(0x10c)]??{},..._0x21d54f[_0x156b25(0xfa)]?{'loadScriptMode':_0x21d54f[_0x156b25(0xfa)]}:{},'resources':_0x21d54f['resources']?JSON[_0x156b25(0x111)](_0x21d54f['resources']):undefined}},_0xa43cb4=await updateMenuRecord(_0x35c117,_0x236305,_0x156b25(0x117)+_0x21d54f[_0x156b25(0x110)]+'\x22');return logger['info'](_0x156b25(0x10d),_0x156b25(0x103)+_0x21d54f[_0x156b25(0x110)],undefined),_0xa43cb4;}export async function createMenuEntity(_0x490b57,_0x4cd603,_0xbdebc2){const _0xd90f66=a171_0x454e;return createMenuRecord({'appCode':_0x490b57,..._0xbdebc2},_0x4cd603,_0xd90f66(0x10f)+_0xbdebc2['label']+'\x22');}export async function updateMenuEntity(_0x517e29,_0x580e52,_0x94fe76){return updateMenuRecord({'appCode':_0x517e29,..._0x94fe76},_0x580e52,'Update\x20menu\x20'+_0x94fe76['id']);}function a171_0x454e(_0x34c66a,_0x394c58){_0x34c66a=_0x34c66a-0xf6;const _0x255f3f=a171_0x255f();let _0x454e4a=_0x255f3f[_0x34c66a];return _0x454e4a;}export async function batchDeleteMenuEntities(_0x144f78,_0x176e75){const _0x5109fd=a171_0x454e;return batchDeleteMenuRecords(_0x176e75,_0x144f78,'Delete\x20'+_0x176e75[_0x5109fd(0x108)]+_0x5109fd(0x101)+(_0x176e75[_0x5109fd(0x108)]===0x1?'':'s'));}export async function startMenuRegroup(_0x2f148c,_0xb9b261){const _0x47d419=a171_0x454e;return a171_0x2248c0(_0xb9b261,_0x2f148c,_0x47d419(0xfb)+_0xb9b261['menuGroups'][_0x47d419(0x108)]+_0x47d419(0xfd));}
1
+ (function(_0xc0030b,_0x34cb02){const _0x5aded9=a171_0x4d72,_0x4137ca=_0xc0030b();while(!![]){try{const _0xfac9a1=-parseInt(_0x5aded9(0x7f))/0x1+-parseInt(_0x5aded9(0x77))/0x2+-parseInt(_0x5aded9(0x80))/0x3*(parseInt(_0x5aded9(0x6a))/0x4)+-parseInt(_0x5aded9(0x71))/0x5+-parseInt(_0x5aded9(0x89))/0x6+parseInt(_0x5aded9(0x85))/0x7*(parseInt(_0x5aded9(0x75))/0x8)+parseInt(_0x5aded9(0x87))/0x9;if(_0xfac9a1===_0x34cb02)break;else _0x4137ca['push'](_0x4137ca['shift']());}catch(_0x48af74){_0x4137ca['push'](_0x4137ca['shift']());}}}(a171_0x5b01,0x699b8));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 a171_0x592217,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x7ff540,_0x251504){const _0x1dda46=a171_0x4d72,_0xeda938=getEnv();logger['info'](_0x1dda46(0x69),isProduction(_0xeda938)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x7ff540+')':_0x1dda46(0x70)+_0x7ff540+')');const _0xd2c78=await fetchMenuSnapshot(_0x7ff540,_0x251504,{'verbose':!![]});return logger[_0x1dda46(0x6c)](_0x1dda46(0x69),_0x1dda46(0x8b)+_0xd2c78['total']+_0x1dda46(0x76)),_0xd2c78[_0x1dda46(0x7a)][_0x1dda46(0x90)](toProcessedMenuItem);}export async function createMenu(_0x4178fb,_0x1c6b15,_0x46222f){const _0x50503d=a171_0x4d72;logger['info'](_0x50503d(0x88),'Creating\x20menu:\x20'+_0x46222f[_0x50503d(0x8c)]+'\x20('+_0x46222f['path']+')');const _0x457a65={'appCode':_0x4178fb,'type':_0x50503d(0x68),'sort':0x0,'extend':{'loadScriptMode':_0x50503d(0x81),'resources':_0x46222f[_0x50503d(0x73)]?JSON['stringify'](_0x46222f[_0x50503d(0x73)]):undefined},..._0x46222f},_0x414902=await createMenuRecord(_0x457a65,_0x1c6b15,'Create\x20menu\x20\x22'+_0x46222f['label']+'\x22');return logger[_0x50503d(0x6c)](_0x50503d(0x88),_0x50503d(0x72)+_0x46222f[_0x50503d(0x8c)]),_0x414902;}async function createSingleMenu(_0x1fad43,_0x7b87db,_0x23ab33,_0x15b9b5,_0x12c611){const _0x39db43=a171_0x4d72,_0x513d35={'appCode':_0x1fad43,'type':_0x39db43(0x68),'sort':_0x39db43(0x8e)in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x8e)]===_0x39db43(0x84)?_0x23ab33[_0x39db43(0x8e)]:0x0,..._0x39db43(0x6d)in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x6d)]===_0x39db43(0x6f)?{'visible':_0x23ab33[_0x39db43(0x6d)]}:{},...'parentId'in _0x23ab33&&typeof _0x23ab33[_0x39db43(0x6e)]===_0x39db43(0x84)?{'parentId':_0x23ab33[_0x39db43(0x6e)]}:{},'extend':{..._0x12c611?.[_0x39db43(0x83)]?{'appName':_0x12c611['appName']}:{},'loadScriptMode':_0x39db43(0x81),'resources':_0x15b9b5?JSON[_0x39db43(0x8d)](_0x15b9b5):undefined},'label':_0x23ab33[_0x39db43(0x8c)],'path':_0x23ab33['path']},_0x3fa7c0=await createMenuRecord(_0x513d35,_0x7b87db,_0x39db43(0x7d)+_0x23ab33[_0x39db43(0x8c)]+'\x22');return logger[_0x39db43(0x6c)](_0x39db43(0x88),_0x39db43(0x72)+_0x23ab33['label']),_0x3fa7c0;}export async function createMenus(_0x51266b,_0x444c70,_0x3555b2,_0x21510b,_0x4e09fd){const _0x4c0801=a171_0x4d72;logger['info']('create-menus',_0x4c0801(0x8a)+_0x3555b2[_0x4c0801(0x82)]);const _0x1eb1f1=await Promise['all'](_0x3555b2['map'](_0x5a4ba7=>createSingleMenu(_0x51266b,_0x444c70,_0x5a4ba7,_0x21510b,_0x4e09fd)));return logger[_0x4c0801(0x6c)]('create-menus',_0x4c0801(0x78)+_0x3555b2[_0x4c0801(0x82)]),_0x1eb1f1;}export async function updateMenuCdnUrl(_0x5c7d68,_0x3a0712,_0x2e5dab){const _0x5a5826=a171_0x4d72;logger['info'](_0x5a5826(0x6b),_0x5a5826(0x7b)+_0x2e5dab['label']+'\x20('+_0x2e5dab['path']+')');const _0x5ec8ec={'id':_0x2e5dab['id'],'appCode':_0x5c7d68,'extend':{..._0x2e5dab['extend']??{},..._0x2e5dab[_0x5a5826(0x7c)]?{'loadScriptMode':_0x2e5dab[_0x5a5826(0x7c)]}:{},'resources':_0x2e5dab['resources']?JSON[_0x5a5826(0x8d)](_0x2e5dab[_0x5a5826(0x73)]):undefined}},_0x17e68b=await updateMenuRecord(_0x5ec8ec,_0x3a0712,_0x5a5826(0x7e)+_0x2e5dab['label']+'\x22');return logger[_0x5a5826(0x6c)](_0x5a5826(0x6b),'Menu\x20assets\x20synced:\x20'+_0x2e5dab[_0x5a5826(0x8c)],undefined),_0x17e68b;}export async function createMenuEntity(_0x205054,_0x21ac4e,_0xb1c25f){return createMenuRecord({'appCode':_0x205054,..._0xb1c25f},_0x21ac4e,'Create\x20menu\x20\x22'+_0xb1c25f['label']+'\x22');}function a171_0x4d72(_0x41dd9d,_0x4a4df6){_0x41dd9d=_0x41dd9d-0x68;const _0x5b01da=a171_0x5b01();let _0x4d72b6=_0x5b01da[_0x41dd9d];return _0x4d72b6;}export async function updateMenuEntity(_0x2adff6,_0x3ad60b,_0x5740a2){const _0x564c73=a171_0x4d72;return updateMenuRecord({'appCode':_0x2adff6,..._0x5740a2},_0x3ad60b,_0x564c73(0x8f)+_0x5740a2['id']);}export async function batchDeleteMenuEntities(_0x2faa2a,_0x4921f5){const _0x569e29=a171_0x4d72;return batchDeleteMenuRecords(_0x4921f5,_0x2faa2a,_0x569e29(0x86)+_0x4921f5['length']+'\x20menu'+(_0x4921f5['length']===0x1?'':'s'));}export async function startMenuRegroup(_0x55756c,_0x4cd5ea){const _0x2af7c1=a171_0x4d72;return a171_0x592217(_0x4cd5ea,_0x55756c,_0x2af7c1(0x79)+_0x4cd5ea['menuGroups'][_0x2af7c1(0x82)]+_0x2af7c1(0x74));}function a171_0x5b01(){const _0x282716=['visible','parentId','boolean','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','836210BqswjQ','Menu\x20created\x20successfully:\x20','resources','\x20menu\x20group(s)','705384irxSbu','\x20online\x20menus\x20successfully','1142434qEUKtr','Batch\x20menu\x20creation\x20completed,\x20total\x20','Regroup\x20','menus','Updating\x20menu\x20asset\x20links:\x20','loadScriptMode','Create\x20menu\x20\x22','Update\x20menu\x20assets\x20\x22','835524aUXDub','564348VueeLM','import','length','appName','number','14HZtdWq','Delete\x20','26155728DKGBpj','create-menu','4198530FLPzWH','Start\x20batch\x20menu\x20creation,\x20total\x20','Fetched\x20','label','stringify','order','Update\x20menu\x20','map','procode','get-online-menu-list','8XNvSjK','update-menu-cdn-url','info'];a171_0x5b01=function(){return _0x282716;};return a171_0x5b01();}
@@ -1 +1 @@
1
- function a172_0x228b(){const _0x5ddd33=['1777512vaAOaq','map','validation','app','string','2643861errxEY','780sdnLyC','app.extend.assets\x20must\x20be\x20an\x20array.','\x20resources','length','trim','menu\x20','246301QnQDbw','\x20must\x20be\x20an\x20array\x20of\x20URLs.','sharedResources','893014UebciJ','102294ZQXGPI','object','app.extend','str','10crcpjZ','message','assets','Duplicate\x20subapp\x20records\x20for\x20','\x20contains\x20invalid\x20JSON.','--app-name\x20is\x20required.','menu','resources','filter','appCode','subapp.resources','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','appName','stringify','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','\x20must\x20be\x20a\x20JSON\x20object.','21QPcDlm','extend','36BCsdpw','parse','app-name','No\x20shared\x20resources\x20configured\x20for\x20','isArray','path','62332LuWBKo','sharedConfigured','623892UWhjOc','some'];a172_0x228b=function(){return _0x5ddd33;};return a172_0x228b();}const a172_0x371033=a172_0x30a4;(function(_0x45a35b,_0x3fa892){const _0x269411=a172_0x30a4,_0x4dd415=_0x45a35b();while(!![]){try{const _0x10101b=-parseInt(_0x269411(0x1db))/0x1+-parseInt(_0x269411(0x1dc))/0x2+-parseInt(_0x269411(0x1d1))/0x3+parseInt(_0x269411(0x1c8))/0x4*(parseInt(_0x269411(0x1af))/0x5)+parseInt(_0x269411(0x1ca))/0x6*(-parseInt(_0x269411(0x1c0))/0x7)+-parseInt(_0x269411(0x1cc))/0x8*(-parseInt(_0x269411(0x1c2))/0x9)+-parseInt(_0x269411(0x1d2))/0xa*(-parseInt(_0x269411(0x1d8))/0xb);if(_0x10101b===_0x3fa892)break;else _0x4dd415['push'](_0x4dd415['shift']());}catch(_0x15e248){_0x4dd415['push'](_0x4dd415['shift']());}}}(a172_0x228b,0x81282));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x371c53,_0x3ac569){const _0x465867=a172_0x30a4,_0x5289ec=typeof _0x371c53===_0x465867(0x1d0)?parseJson(_0x371c53,_0x3ac569):_0x371c53;if(!_0x5289ec||typeof _0x5289ec!==_0x465867(0x1dd)||Array[_0x465867(0x1c6)](_0x5289ec))throw CliErrors[_0x465867(0x1ce)](_0x3ac569+_0x465867(0x1bf));return _0x5289ec;}function parseJson(_0x4f0121,_0x998f2e){const _0x52438b=a172_0x30a4;try{return JSON[_0x52438b(0x1c3)](_0x4f0121);}catch{throw CliErrors[_0x52438b(0x1ce)](_0x998f2e+_0x52438b(0x1b3));}}function resourceList(_0x28a40a,_0x2145e6){const _0x1227da=a172_0x30a4;if(typeof _0x28a40a!==_0x1227da(0x1d0))throw CliErrors[_0x1227da(0x1ce)](_0x2145e6+_0x1227da(0x1ba));const _0x1ae707=parseJson(_0x28a40a,_0x2145e6);if(!Array[_0x1227da(0x1c6)](_0x1ae707)||_0x1ae707[_0x1227da(0x1cb)](_0x421d6e=>typeof _0x421d6e!==_0x1227da(0x1d0)))throw CliErrors['validation'](_0x2145e6+_0x1227da(0x1d9));return _0x1ae707;}function a172_0x30a4(_0x586cf7,_0x105aae){_0x586cf7=_0x586cf7-0x1ad;const _0x228ba4=a172_0x228b();let _0x30a440=_0x228ba4[_0x586cf7];return _0x30a440;}export function buildSubappAssetsStatus(_0x22a441,_0x55582d,_0x1a9fa0){const _0x131777=a172_0x30a4,_0x5a9522=_0x22a441[_0x131777(0x1c1)]==null?{}:objectValue(_0x22a441[_0x131777(0x1c1)],_0x131777(0x1ad)),_0x2eb0db=_0x5a9522['assets']==null?[]:typeof _0x5a9522[_0x131777(0x1b1)]===_0x131777(0x1d0)?parseJson(_0x5a9522[_0x131777(0x1b1)],'app.extend.assets'):_0x5a9522['assets'];if(!Array[_0x131777(0x1c6)](_0x2eb0db))throw CliErrors[_0x131777(0x1ce)](_0x131777(0x1d3));const _0x47ee82=_0x2eb0db[_0x131777(0x1cd)]((_0x2a6703,_0x3cdcc0)=>objectValue(_0x2a6703,'app.extend.assets['+_0x3cdcc0+']')),_0x5a42e3=_0x47ee82[_0x131777(0x1b7)](_0x29a87d=>_0x29a87d[_0x131777(0x1bc)]===_0x1a9fa0);if(_0x5a42e3[_0x131777(0x1d5)]>0x1)throw CliErrors[_0x131777(0x1ce)](_0x131777(0x1b2)+_0x1a9fa0+'.');const _0x437a99=_0x5a42e3[0x0],_0x52a254=_0x437a99?.[_0x131777(0x1b6)]==null?[]:resourceList(_0x437a99['resources'],_0x131777(0x1b9)),_0x40281d=_0x55582d[_0x131777(0x1b7)](_0x35bd91=>_0x35bd91['extend']?.['appName']===_0x1a9fa0),_0x25e5b7=_0x40281d[_0x131777(0x1cd)](_0xcbcdc=>{const _0x296b62=_0x131777;let _0x2f13ed=null,_0x49293b=null;try{_0x2f13ed=_0xcbcdc[_0x296b62(0x1c1)]?.[_0x296b62(0x1b6)]==null?_0xcbcdc[_0x296b62(0x1b6)]:resourceList(_0xcbcdc[_0x296b62(0x1c1)][_0x296b62(0x1b6)],_0x296b62(0x1d7)+_0xcbcdc['id']+_0x296b62(0x1d4));}catch(_0x37590b){_0x49293b=_0x37590b instanceof Error?_0x37590b[_0x296b62(0x1b0)]:String(_0x37590b);}const _0x42f178=_0x52a254[_0x296b62(0x1d5)]>0x0?'app':_0x296b62(0x1b5),_0x3ae1b7=_0x42f178===_0x296b62(0x1cf)?_0x52a254:_0x2f13ed;return{'id':_0xcbcdc['id'],'path':_0xcbcdc[_0x296b62(0x1c7)],'preferredSourceIfSupported':_0x42f178,'preferredResourcesIfSupported':_0x3ae1b7,'menuFallbackResources':_0x2f13ed,'menuFallbackError':_0x49293b,'fallbackDiffers':_0x2f13ed===null?null:_0x42f178===_0x296b62(0x1cf)&&_0x2f13ed['length']>0x0&&JSON[_0x296b62(0x1bd)](_0x2f13ed)!==JSON[_0x296b62(0x1bd)](_0x3ae1b7)};});return{'appName':_0x1a9fa0,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x437a99),'sharedResources':_0x52a254,'loadScriptMode':_0x437a99?.['loadScriptMode']??null,'basename':_0x437a99?.['basename']??null,'boundMenus':_0x25e5b7['length'],'staleMenuFallbacks':_0x25e5b7[_0x131777(0x1b7)](_0x22859a=>_0x22859a['fallbackDiffers'])[_0x131777(0x1d5)],'menus':_0x25e5b7};}export async function assertSharedResourcesConfigured(_0x404ec0,_0x50b38d,_0x199ed2){const _0x5857e0=a172_0x30a4,_0x23cb18=await getSmartAppRecord(_0x404ec0,_0x50b38d),_0x4d4753=buildSubappAssetsStatus(_0x23cb18,[],_0x199ed2);if(!_0x4d4753[_0x5857e0(0x1c9)]||_0x4d4753[_0x5857e0(0x1da)][_0x5857e0(0x1d5)]===0x0)throw CliErrors[_0x5857e0(0x1ce)](_0x5857e0(0x1c5)+_0x199ed2+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a172_0x371033(0x1be)},{'name':a172_0x371033(0x1c4),'type':'string','required':!![],'description':a172_0x371033(0x1bb)}];export function getSubappSelector(_0x417f43){const _0x2aa590=a172_0x371033,_0x46dd67=_0x417f43[_0x2aa590(0x1b8)],_0x2039f6=_0x417f43[_0x2aa590(0x1ae)](_0x2aa590(0x1c4))[_0x2aa590(0x1d6)]();if(!_0x2039f6)throw CliErrors[_0x2aa590(0x1ce)](_0x2aa590(0x1b4));return{'appCode':_0x46dd67,'appName':_0x2039f6};}
1
+ const a172_0x58259e=a172_0x3212;(function(_0x63bef,_0x349252){const _0x4af907=a172_0x3212,_0x3cfe80=_0x63bef();while(!![]){try{const _0x385b18=parseInt(_0x4af907(0x13d))/0x1*(-parseInt(_0x4af907(0x13f))/0x2)+-parseInt(_0x4af907(0x13a))/0x3*(-parseInt(_0x4af907(0x137))/0x4)+parseInt(_0x4af907(0x121))/0x5*(-parseInt(_0x4af907(0x114))/0x6)+parseInt(_0x4af907(0x123))/0x7+parseInt(_0x4af907(0x127))/0x8+parseInt(_0x4af907(0x120))/0x9*(parseInt(_0x4af907(0x116))/0xa)+-parseInt(_0x4af907(0x12a))/0xb;if(_0x385b18===_0x349252)break;else _0x3cfe80['push'](_0x3cfe80['shift']());}catch(_0x420cbb){_0x3cfe80['push'](_0x3cfe80['shift']());}}}(a172_0x42b4,0xe2252));import{getSmartAppRecord}from'../../../core/api-client.js';function a172_0x42b4(){const _0x40b8f1=['\x20contains\x20invalid\x20JSON.','length','message','basename','isArray','\x20must\x20be\x20an\x20array\x20of\x20URLs.','11365569xBEHTk','10NiPMLr','resources','4622548rLTdSs','app.extend.assets[','string','trim','11790144zbmebd','filter','appName','10228889wokgBu','appCode','app','parse','object','loadScriptMode','validation','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','No\x20shared\x20resources\x20configured\x20for\x20','sharedResources','sharedConfigured','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','str','387052BdMkyN','menu\x20','some','15PwJwNV','--app-name\x20is\x20required.','assets','15389gqBwUb','menu','218WHIkZt','path','extend','app.extend.assets','\x20resources','1041594ETOpjP','fallbackDiffers','10LIvdjf','stringify','map','\x20must\x20be\x20a\x20JSON\x20object.'];a172_0x42b4=function(){return _0x40b8f1;};return a172_0x42b4();}import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x207470,_0x5c7b88){const _0x15b15e=a172_0x3212,_0x163b95=typeof _0x207470===_0x15b15e(0x125)?parseJson(_0x207470,_0x5c7b88):_0x207470;if(!_0x163b95||typeof _0x163b95!==_0x15b15e(0x12e)||Array[_0x15b15e(0x11e)](_0x163b95))throw CliErrors[_0x15b15e(0x130)](_0x5c7b88+_0x15b15e(0x119));return _0x163b95;}function a172_0x3212(_0x52d201,_0x45ac0c){_0x52d201=_0x52d201-0x112;const _0x42b4ac=a172_0x42b4();let _0x3212c0=_0x42b4ac[_0x52d201];return _0x3212c0;}function parseJson(_0x40084b,_0x54517c){const _0xebbc74=a172_0x3212;try{return JSON[_0xebbc74(0x12d)](_0x40084b);}catch{throw CliErrors[_0xebbc74(0x130)](_0x54517c+_0xebbc74(0x11a));}}function resourceList(_0x16dc20,_0x4279b8){const _0x283674=a172_0x3212;if(typeof _0x16dc20!==_0x283674(0x125))throw CliErrors[_0x283674(0x130)](_0x4279b8+'\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.');const _0x18d496=parseJson(_0x16dc20,_0x4279b8);if(!Array[_0x283674(0x11e)](_0x18d496)||_0x18d496[_0x283674(0x139)](_0x4b9ec8=>typeof _0x4b9ec8!==_0x283674(0x125)))throw CliErrors[_0x283674(0x130)](_0x4279b8+_0x283674(0x11f));return _0x18d496;}export function buildSubappAssetsStatus(_0x43bed0,_0x1305ff,_0xfd0f34){const _0x5cf808=a172_0x3212,_0x51850d=_0x43bed0['extend']==null?{}:objectValue(_0x43bed0[_0x5cf808(0x141)],'app.extend'),_0x502efc=_0x51850d[_0x5cf808(0x13c)]==null?[]:typeof _0x51850d[_0x5cf808(0x13c)]==='string'?parseJson(_0x51850d[_0x5cf808(0x13c)],_0x5cf808(0x112)):_0x51850d['assets'];if(!Array[_0x5cf808(0x11e)](_0x502efc))throw CliErrors[_0x5cf808(0x130)]('app.extend.assets\x20must\x20be\x20an\x20array.');const _0x15b2c8=_0x502efc[_0x5cf808(0x118)]((_0x391f2d,_0x4253de)=>objectValue(_0x391f2d,_0x5cf808(0x124)+_0x4253de+']')),_0x33f6c9=_0x15b2c8[_0x5cf808(0x128)](_0x5f44ca=>_0x5f44ca[_0x5cf808(0x129)]===_0xfd0f34);if(_0x33f6c9['length']>0x1)throw CliErrors['validation']('Duplicate\x20subapp\x20records\x20for\x20'+_0xfd0f34+'.');const _0x24268e=_0x33f6c9[0x0],_0x108efc=_0x24268e?.['resources']==null?[]:resourceList(_0x24268e['resources'],'subapp.resources'),_0x4605bb=_0x1305ff[_0x5cf808(0x128)](_0x1881b4=>_0x1881b4[_0x5cf808(0x141)]?.['appName']===_0xfd0f34),_0x298fc7=_0x4605bb[_0x5cf808(0x118)](_0x5c6816=>{const _0x22e51b=_0x5cf808;let _0x1b3a31=null,_0x1a9584=null;try{_0x1b3a31=_0x5c6816[_0x22e51b(0x141)]?.['resources']==null?_0x5c6816[_0x22e51b(0x122)]:resourceList(_0x5c6816[_0x22e51b(0x141)]['resources'],_0x22e51b(0x138)+_0x5c6816['id']+_0x22e51b(0x113));}catch(_0x25367e){_0x1a9584=_0x25367e instanceof Error?_0x25367e[_0x22e51b(0x11c)]:String(_0x25367e);}const _0x23de36=_0x108efc[_0x22e51b(0x11b)]>0x0?_0x22e51b(0x12c):_0x22e51b(0x13e),_0x2f5a3f=_0x23de36===_0x22e51b(0x12c)?_0x108efc:_0x1b3a31;return{'id':_0x5c6816['id'],'path':_0x5c6816[_0x22e51b(0x140)],'preferredSourceIfSupported':_0x23de36,'preferredResourcesIfSupported':_0x2f5a3f,'menuFallbackResources':_0x1b3a31,'menuFallbackError':_0x1a9584,'fallbackDiffers':_0x1b3a31===null?null:_0x23de36===_0x22e51b(0x12c)&&_0x1b3a31[_0x22e51b(0x11b)]>0x0&&JSON[_0x22e51b(0x117)](_0x1b3a31)!==JSON[_0x22e51b(0x117)](_0x2f5a3f)};});return{'appName':_0xfd0f34,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x24268e),'sharedResources':_0x108efc,'loadScriptMode':_0x24268e?.[_0x5cf808(0x12f)]??null,'basename':_0x24268e?.[_0x5cf808(0x11d)]??null,'boundMenus':_0x298fc7['length'],'staleMenuFallbacks':_0x298fc7[_0x5cf808(0x128)](_0x49fbe7=>_0x49fbe7[_0x5cf808(0x115)])['length'],'menus':_0x298fc7};}export async function assertSharedResourcesConfigured(_0x20d9e7,_0x234354,_0x2f9cae){const _0x35c276=a172_0x3212,_0x127f3a=await getSmartAppRecord(_0x20d9e7,_0x234354),_0x3aa471=buildSubappAssetsStatus(_0x127f3a,[],_0x2f9cae);if(!_0x3aa471[_0x35c276(0x134)]||_0x3aa471[_0x35c276(0x133)][_0x35c276(0x11b)]===0x0)throw CliErrors[_0x35c276(0x130)](_0x35c276(0x132)+_0x2f9cae+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a172_0x58259e(0x131)},{'name':'app-name','type':'string','required':!![],'description':a172_0x58259e(0x135)}];export function getSubappSelector(_0x187dbc){const _0x2a08c3=a172_0x58259e,_0x40c26f=_0x187dbc[_0x2a08c3(0x12b)],_0x478084=_0x187dbc[_0x2a08c3(0x136)]('app-name')[_0x2a08c3(0x126)]();if(!_0x478084)throw CliErrors[_0x2a08c3(0x130)](_0x2a08c3(0x13b));return{'appCode':_0x40c26f,'appName':_0x478084};}
@@ -1 +1 @@
1
- const a173_0x1849ab=a173_0x3d41;(function(_0x231e52,_0x3b1e74){const _0x395f32=a173_0x3d41,_0x287289=_0x231e52();while(!![]){try{const _0x50ed4f=parseInt(_0x395f32(0x1f1))/0x1*(-parseInt(_0x395f32(0x207))/0x2)+parseInt(_0x395f32(0x1d2))/0x3*(-parseInt(_0x395f32(0x200))/0x4)+-parseInt(_0x395f32(0x1e5))/0x5*(parseInt(_0x395f32(0x1eb))/0x6)+-parseInt(_0x395f32(0x1ce))/0x7*(-parseInt(_0x395f32(0x209))/0x8)+-parseInt(_0x395f32(0x1d1))/0x9*(parseInt(_0x395f32(0x1f4))/0xa)+-parseInt(_0x395f32(0x1e0))/0xb*(-parseInt(_0x395f32(0x1ea))/0xc)+-parseInt(_0x395f32(0x1f7))/0xd*(-parseInt(_0x395f32(0x1e8))/0xe);if(_0x50ed4f===_0x3b1e74)break;else _0x287289['push'](_0x287289['shift']());}catch(_0x44a052){_0x287289['push'](_0x287289['shift']());}}}(a173_0x1a85,0xe0bc1));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a173_0x3d41(_0x31408b,_0x3fd168){_0x31408b=_0x31408b-0x1cd;const _0x1a85e7=a173_0x1a85();let _0x3d410f=_0x1a85e7[_0x31408b];return _0x3d410f;}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';function a173_0x1a85(){const _0xe96fe0=['label','field','13VStHWx','filter','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','dryRun','Invalid\x20--params.','isArray','Invalid\x20--params:\x20','object','string','111956zbYTRK','group','visible','Parent\x20','CSS\x20URL\x20is\x20unreachable:\x20','isInteger','menu-sync','348388UmHJYp','join','12744272eVqFEL','JS\x20URL\x20is\x20unreachable:\x20','hasOwn','path','7NdxYkZ','Menu\x20sync\x20completed','get','2470536AoPqbH','3yAmehc','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL',':\x20expected\x20a\x20non-empty\x20string.','type','Start\x20non-interactive\x20menu\x20sync','jsUrl','appName','has','cwd','Expected\x20one\x20folder\x20named\x20\x22','trim','--params.','import','order','13644983oRuuHP','Invalid\x20--params\x20fields:\x20','cssUrl','setLogPath','push','10IsVUnP','length','No\x20local\x20pages\x20matched\x20paths:\x20','7812378elEbXu','\x0a\x20\x20Available\x20local\x20paths:\x20','12OdeWuV','1200426eTdWZx','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','boolean','number','map','7YlZfaj','keys','parentId','30uTSscr'];a173_0x1a85=function(){return _0xe96fe0;};return a173_0x1a85();}import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a173_0x1849ab(0x1d7),a173_0x1849ab(0x1e2),'appName',a173_0x1849ab(0x202),'parentId']);export function resolvePage(_0x496a3c,_0x49ac05,_0x2c8c64){const _0x5dccb0=a173_0x1849ab;let _0x145635=_0x49ac05['parentId']??_0x496a3c[_0x5dccb0(0x1f3)];if(_0x145635===undefined&&_0x496a3c[_0x5dccb0(0x201)]){const _0xe6f0ef=_0x2c8c64[_0x5dccb0(0x1f8)](_0x218576=>_0x218576[_0x5dccb0(0x1d5)]==='folder'&&_0x218576[_0x5dccb0(0x1f5)]===_0x496a3c[_0x5dccb0(0x201)]);if(_0xe6f0ef['length']!==0x1)throw new Error(_0x5dccb0(0x1db)+_0x496a3c[_0x5dccb0(0x201)]+'\x22\x20for\x20'+_0x496a3c[_0x5dccb0(0x1cd)]+';\x20found\x20'+_0xe6f0ef[_0x5dccb0(0x1e6)]);_0x145635=_0xe6f0ef[0x0]['id'];}if(_0x145635!==undefined&&_0x145635!==0x0&&_0x2c8c64['filter'](_0xf286a1=>_0xf286a1['id']===_0x145635&&_0xf286a1[_0x5dccb0(0x1d5)]==='folder')[_0x5dccb0(0x1e6)]!==0x1)throw new Error(_0x5dccb0(0x203)+_0x145635+'\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.');return{..._0x496a3c,..._0x145635===undefined?{}:{'parentId':_0x145635},..._0x49ac05['visible']===undefined?{}:{'visible':_0x49ac05['visible']}};}function validateParams(_0x49594a){const _0x33dc7c=a173_0x1849ab,_0x4f3480=[];return _0x49594a[_0x33dc7c(0x1d7)]&&!isValidJsHttpsUrl(_0x49594a[_0x33dc7c(0x1d7)])&&_0x4f3480[_0x33dc7c(0x1e4)]({'field':_0x33dc7c(0x1d7),'message':_0x33dc7c(0x1d3)}),_0x49594a[_0x33dc7c(0x1e2)]&&!isValidCssHttpsUrl(_0x49594a[_0x33dc7c(0x1e2)])&&_0x4f3480['push']({'field':_0x33dc7c(0x1e2),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x4f3480;}export async function runMenuSyncCore(_0x42206b,_0x1536dc,_0xaf3ec1=[],_0x1160d5,_0x5c4eb9={}){const _0x2527d4=a173_0x1849ab,_0x3225a9=parseMenuSyncParams(_0x1160d5),_0x59b7a3=[...new Set(_0xaf3ec1[_0x2527d4(0x1f0)](_0xb49c88=>_0xb49c88[_0x2527d4(0x1dc)]())[_0x2527d4(0x1f8)](Boolean)[_0x2527d4(0x1f0)](menuPathKey))],_0x236533=_0x3225a9[_0x2527d4(0x1d7)],_0x38622e=_0x3225a9['cssUrl'],_0x45b3c3=[];if(_0x236533)_0x45b3c3[_0x2527d4(0x1e4)](_0x236533);if(_0x38622e)_0x45b3c3['push'](_0x38622e);const _0x5dfd3b=validateParams(_0x3225a9);if(_0x5dfd3b[_0x2527d4(0x1e6)]>0x0){const _0x30bb31=_0x5dfd3b[_0x2527d4(0x1f0)](_0x26a170=>_0x2527d4(0x1dd)+_0x26a170[_0x2527d4(0x1f6)]+':\x20'+_0x26a170['message'])[_0x2527d4(0x208)](';\x20');throw new Error(_0x2527d4(0x1fd)+_0x30bb31);}logger[_0x2527d4(0x1e3)](process[_0x2527d4(0x1da)]()),logger['info'](_0x2527d4(0x206),_0x2527d4(0x1d6),{'appCode':_0x42206b,'selectedCount':_0x59b7a3[_0x2527d4(0x1e6)],'jsUrl':_0x236533,'cssUrl':_0x38622e});if(_0x236533){const _0x481778=await isUrlReachable(_0x236533);if(!_0x481778)throw new Error(_0x2527d4(0x20a)+_0x236533);}if(_0x38622e){const _0x5d0eb2=await isUrlReachable(_0x38622e);if(!_0x5d0eb2)throw new Error(_0x2527d4(0x204)+_0x38622e);}const _0x5c9970=getLocalPages();if(_0x5c9970[_0x2527d4(0x1e6)]===0x0){if(_0x59b7a3[_0x2527d4(0x1e6)]>0x0)throw new Error(_0x2527d4(0x1e7)+_0x59b7a3[_0x2527d4(0x208)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x5c4eb9[_0x2527d4(0x1fa)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x1b5ddd=await getOnlineMenuList(_0x42206b,_0x1536dc),_0x358663=new Set(_0x1b5ddd['map'](_0x564d05=>menuPathKey(_0x564d05[_0x2527d4(0x1cd)])));let _0x50755e;if(_0x59b7a3[_0x2527d4(0x1e6)]>0x0){const _0x42ac63=new Map(_0x5c9970[_0x2527d4(0x1f0)](_0x2b6a0f=>[menuPathKey(_0x2b6a0f['path']),_0x2b6a0f])),_0x5be530=_0x59b7a3[_0x2527d4(0x1f8)](_0x31b853=>!_0x42ac63[_0x2527d4(0x1d9)](_0x31b853));if(_0x5be530['length']>0x0){const _0xd971ef=_0x5c9970[_0x2527d4(0x1f0)](_0x151c74=>_0x151c74[_0x2527d4(0x1cd)])[_0x2527d4(0x208)](',\x20');throw new Error(_0x2527d4(0x1e7)+_0x5be530[_0x2527d4(0x208)](',\x20')+_0x2527d4(0x1e9)+_0xd971ef);}const _0x11a927=_0x59b7a3[_0x2527d4(0x1f8)](_0x3fa9bc=>_0x358663['has'](_0x3fa9bc));if(_0x11a927[_0x2527d4(0x1e6)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x11a927[_0x2527d4(0x208)](',\x20'));_0x50755e=_0x59b7a3[_0x2527d4(0x1f0)](_0x21501b=>_0x42ac63[_0x2527d4(0x1d0)](_0x21501b));}else _0x50755e=_0x5c9970[_0x2527d4(0x1f8)](_0x3f12d8=>!_0x358663[_0x2527d4(0x1d9)](menuPathKey(_0x3f12d8[_0x2527d4(0x1cd)])));if(_0x50755e[_0x2527d4(0x1e6)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x5c4eb9[_0x2527d4(0x1fa)]===!![],'targetPages':[],'plannedMenus':[]};_0x50755e=_0x50755e['map'](_0x1839d6=>resolvePage(_0x1839d6,_0x3225a9,_0x1b5ddd));_0x3225a9[_0x2527d4(0x1d8)]&&_0x45b3c3[_0x2527d4(0x1e6)]===0x0&&await assertSharedResourcesConfigured(_0x42206b,_0x1536dc,_0x3225a9[_0x2527d4(0x1d8)]);const _0x3393f6=_0x50755e[_0x2527d4(0x1f0)](_0x1d5682=>({'type':'procode','path':_0x1d5682[_0x2527d4(0x1cd)],'label':_0x1d5682[_0x2527d4(0x1f5)],'loadScriptMode':_0x2527d4(0x1de),'resources':[..._0x45b3c3],..._0x1d5682[_0x2527d4(0x202)]===undefined?{}:{'visible':_0x1d5682[_0x2527d4(0x202)]},..._0x1d5682[_0x2527d4(0x1f3)]===undefined?{}:{'parentId':_0x1d5682[_0x2527d4(0x1f3)]},..._0x1d5682[_0x2527d4(0x1df)]===undefined?{}:{'sort':_0x1d5682[_0x2527d4(0x1df)]},..._0x3225a9[_0x2527d4(0x1d8)]===undefined?{}:{'appName':_0x3225a9[_0x2527d4(0x1d8)]}}));if(_0x5c4eb9[_0x2527d4(0x1fa)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x50755e,'plannedMenus':_0x3393f6};const _0xb49d00=_0x3225a9[_0x2527d4(0x1d8)]?await createMenus(_0x42206b,_0x1536dc,_0x50755e,_0x45b3c3['length']>0x0?_0x45b3c3:undefined,{'appName':_0x3225a9[_0x2527d4(0x1d8)]}):await createMenus(_0x42206b,_0x1536dc,_0x50755e,_0x45b3c3[_0x2527d4(0x1e6)]>0x0?_0x45b3c3:undefined);return logger['info'](_0x2527d4(0x206),_0x2527d4(0x1cf),{'count':_0x50755e[_0x2527d4(0x1e6)],'resources':_0x45b3c3}),{'created':_0xb49d00[_0x2527d4(0x1e6)],'skipped':![],'dryRun':![],'targetPages':_0x50755e,'plannedMenus':_0x3393f6,'menus':_0xb49d00};}export function parseMenuSyncParams(_0x7ce868){const _0x1c09a4=a173_0x1849ab;if(!_0x7ce868||typeof _0x7ce868!=='string')return{};let _0x5b1e0d;try{_0x5b1e0d=JSON['parse'](_0x7ce868);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x5b1e0d!==_0x1c09a4(0x1fe)||_0x5b1e0d===null||Array[_0x1c09a4(0x1fc)](_0x5b1e0d))throw new Error(_0x1c09a4(0x1ec));const _0x45cb41=_0x5b1e0d;if(Object[_0x1c09a4(0x20b)](_0x45cb41,'pages'))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0xf6f7fa=Object[_0x1c09a4(0x1f2)](_0x45cb41)[_0x1c09a4(0x1f8)](_0x5695a7=>!MENU_SYNC_PARAM_KEYS[_0x1c09a4(0x1d9)](_0x5695a7));if(_0xf6f7fa[_0x1c09a4(0x1e6)]>0x0)throw new Error(_0x1c09a4(0x1e1)+_0xf6f7fa[_0x1c09a4(0x208)](',\x20')+'.');for(const _0x1990d3 of[_0x1c09a4(0x1d7),_0x1c09a4(0x1e2),_0x1c09a4(0x1d8)]){const _0xdcbdaf=_0x45cb41[_0x1990d3];if(_0xdcbdaf!==undefined&&(typeof _0xdcbdaf!=='string'||_0xdcbdaf[_0x1c09a4(0x1dc)]()===''))throw new Error(_0x1c09a4(0x1fb)+_0x1990d3+_0x1c09a4(0x1d4));}if(_0x45cb41['visible']!==undefined&&typeof _0x45cb41['visible']!==_0x1c09a4(0x1ee))throw new Error(_0x1c09a4(0x1ed));if(_0x45cb41[_0x1c09a4(0x1f3)]!==undefined&&(!Number[_0x1c09a4(0x205)](_0x45cb41['parentId'])||_0x45cb41['parentId']<0x0))throw new Error(_0x1c09a4(0x1f9));return{'jsUrl':typeof _0x45cb41[_0x1c09a4(0x1d7)]===_0x1c09a4(0x1ff)?_0x45cb41['jsUrl']['trim']():undefined,'cssUrl':typeof _0x45cb41[_0x1c09a4(0x1e2)]===_0x1c09a4(0x1ff)?_0x45cb41['cssUrl'][_0x1c09a4(0x1dc)]():undefined,'appName':typeof _0x45cb41[_0x1c09a4(0x1d8)]===_0x1c09a4(0x1ff)?_0x45cb41[_0x1c09a4(0x1d8)][_0x1c09a4(0x1dc)]():undefined,'visible':typeof _0x45cb41['visible']===_0x1c09a4(0x1ee)?_0x45cb41[_0x1c09a4(0x202)]:undefined,'parentId':typeof _0x45cb41['parentId']===_0x1c09a4(0x1ef)?_0x45cb41[_0x1c09a4(0x1f3)]:undefined};}
1
+ const a173_0x400a3c=a173_0x82c8;(function(_0x11c732,_0x2a528b){const _0x1f827c=a173_0x82c8,_0x4466d9=_0x11c732();while(!![]){try{const _0xc7053e=-parseInt(_0x1f827c(0xac))/0x1*(parseInt(_0x1f827c(0x99))/0x2)+parseInt(_0x1f827c(0x95))/0x3*(-parseInt(_0x1f827c(0xa4))/0x4)+-parseInt(_0x1f827c(0xaa))/0x5+parseInt(_0x1f827c(0xb4))/0x6+-parseInt(_0x1f827c(0x9f))/0x7*(parseInt(_0x1f827c(0xbe))/0x8)+-parseInt(_0x1f827c(0xbb))/0x9+parseInt(_0x1f827c(0xb9))/0xa;if(_0xc7053e===_0x2a528b)break;else _0x4466d9['push'](_0x4466d9['shift']());}catch(_0x2bd7ef){_0x4466d9['push'](_0x4466d9['shift']());}}}(a173_0x1add,0x8a058));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{menuPathKey}from'../../../commands/menu/shared/path.js';import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a173_0x400a3c(0xc2),a173_0x400a3c(0xbc),a173_0x400a3c(0xa6),'visible',a173_0x400a3c(0x8e)]);function a173_0x1add(){const _0x39ccbc=['jsUrl','Invalid\x20--params\x20JSON.','menu-sync','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','folder','Invalid\x20--params:\x20','parentId','filter',';\x20found\x20','pages','procode','\x0a\x20\x20Available\x20local\x20paths:\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','412668xTyJqv','trim','JS\x20URL\x20is\x20unreachable:\x20','get','628206tmviBR','\x22\x20for\x20','path','No\x20local\x20pages\x20matched\x20paths:\x20','type','string','7rxqccS','group','cwd','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','join','16IphAPH','field','appName','info','keys','Menu\x20sync\x20completed','1048620ATLAlG','object','1kINUoB','parse','visible','Parent\x20','push','CSS\x20URL\x20is\x20unreachable:\x20','boolean','Invalid\x20--params\x20fields:\x20','5283654jxSoYj','has','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','number','11923240uDDAwW','length','2994615pvERBX','cssUrl','Invalid\x20--params.','806488ebVfTE','label','map','order'];a173_0x1add=function(){return _0x39ccbc;};return a173_0x1add();}export function resolvePage(_0x5aef15,_0x291118,_0x5113ae){const _0x3c4f99=a173_0x400a3c;let _0x5189dd=_0x291118[_0x3c4f99(0x8e)]??_0x5aef15[_0x3c4f99(0x8e)];if(_0x5189dd===undefined&&_0x5aef15['group']){const _0x1de383=_0x5113ae['filter'](_0x4204c9=>_0x4204c9['type']===_0x3c4f99(0x8c)&&_0x4204c9[_0x3c4f99(0xbf)]===_0x5aef15['group']);if(_0x1de383[_0x3c4f99(0xba)]!==0x1)throw new Error('Expected\x20one\x20folder\x20named\x20\x22'+_0x5aef15[_0x3c4f99(0xa0)]+_0x3c4f99(0x9a)+_0x5aef15[_0x3c4f99(0x9b)]+_0x3c4f99(0x90)+_0x1de383[_0x3c4f99(0xba)]);_0x5189dd=_0x1de383[0x0]['id'];}if(_0x5189dd!==undefined&&_0x5189dd!==0x0&&_0x5113ae['filter'](_0x555dc6=>_0x555dc6['id']===_0x5189dd&&_0x555dc6[_0x3c4f99(0x9d)]===_0x3c4f99(0x8c))[_0x3c4f99(0xba)]!==0x1)throw new Error(_0x3c4f99(0xaf)+_0x5189dd+'\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.');return{..._0x5aef15,..._0x5189dd===undefined?{}:{'parentId':_0x5189dd},..._0x291118[_0x3c4f99(0xae)]===undefined?{}:{'visible':_0x291118['visible']}};}function a173_0x82c8(_0x315e65,_0x3c600a){_0x315e65=_0x315e65-0x8a;const _0x1add80=a173_0x1add();let _0x82c8=_0x1add80[_0x315e65];return _0x82c8;}function validateParams(_0x31e51f){const _0x5cc397=a173_0x400a3c,_0x342269=[];return _0x31e51f[_0x5cc397(0xc2)]&&!isValidJsHttpsUrl(_0x31e51f[_0x5cc397(0xc2)])&&_0x342269[_0x5cc397(0xb0)]({'field':_0x5cc397(0xc2),'message':_0x5cc397(0x94)}),_0x31e51f[_0x5cc397(0xbc)]&&!isValidCssHttpsUrl(_0x31e51f['cssUrl'])&&_0x342269[_0x5cc397(0xb0)]({'field':_0x5cc397(0xbc),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x342269;}export async function runMenuSyncCore(_0xddc55b,_0x325923,_0x1d93c7=[],_0x486429,_0x156bd9={}){const _0x188138=a173_0x400a3c,_0x161de2=parseMenuSyncParams(_0x486429),_0x4904ce=[...new Set(_0x1d93c7[_0x188138(0xc0)](_0x561c79=>_0x561c79[_0x188138(0x96)]())[_0x188138(0x8f)](Boolean)['map'](menuPathKey))],_0x3db513=_0x161de2['jsUrl'],_0x2f3544=_0x161de2['cssUrl'],_0x58d7d4=[];if(_0x3db513)_0x58d7d4[_0x188138(0xb0)](_0x3db513);if(_0x2f3544)_0x58d7d4[_0x188138(0xb0)](_0x2f3544);const _0x2ef5a2=validateParams(_0x161de2);if(_0x2ef5a2[_0x188138(0xba)]>0x0){const _0x509415=_0x2ef5a2[_0x188138(0xc0)](_0x16d6f6=>'--params.'+_0x16d6f6[_0x188138(0xa5)]+':\x20'+_0x16d6f6['message'])['join'](';\x20');throw new Error(_0x188138(0x8d)+_0x509415);}logger['setLogPath'](process[_0x188138(0xa1)]()),logger[_0x188138(0xa7)](_0x188138(0x8a),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0xddc55b,'selectedCount':_0x4904ce[_0x188138(0xba)],'jsUrl':_0x3db513,'cssUrl':_0x2f3544});if(_0x3db513){const _0x3ddda3=await isUrlReachable(_0x3db513);if(!_0x3ddda3)throw new Error(_0x188138(0x97)+_0x3db513);}if(_0x2f3544){const _0x55c930=await isUrlReachable(_0x2f3544);if(!_0x55c930)throw new Error(_0x188138(0xb1)+_0x2f3544);}const _0x533989=getLocalPages();if(_0x533989['length']===0x0){if(_0x4904ce[_0x188138(0xba)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x4904ce[_0x188138(0xa3)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x156bd9['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x374981=await getOnlineMenuList(_0xddc55b,_0x325923),_0x5ae841=new Set(_0x374981['map'](_0x466896=>menuPathKey(_0x466896[_0x188138(0x9b)])));let _0x4cd56f;if(_0x4904ce[_0x188138(0xba)]>0x0){const _0x404731=new Map(_0x533989[_0x188138(0xc0)](_0x5bfdba=>[menuPathKey(_0x5bfdba[_0x188138(0x9b)]),_0x5bfdba])),_0x443c52=_0x4904ce[_0x188138(0x8f)](_0x5f05f0=>!_0x404731['has'](_0x5f05f0));if(_0x443c52['length']>0x0){const _0x49768a=_0x533989[_0x188138(0xc0)](_0x36e77d=>_0x36e77d[_0x188138(0x9b)])[_0x188138(0xa3)](',\x20');throw new Error(_0x188138(0x9c)+_0x443c52[_0x188138(0xa3)](',\x20')+_0x188138(0x93)+_0x49768a);}const _0x4cd4a0=_0x4904ce[_0x188138(0x8f)](_0x243e46=>_0x5ae841[_0x188138(0xb5)](_0x243e46));if(_0x4cd4a0[_0x188138(0xba)]>0x0)throw new Error(_0x188138(0x8b)+_0x4cd4a0[_0x188138(0xa3)](',\x20'));_0x4cd56f=_0x4904ce[_0x188138(0xc0)](_0x53268b=>_0x404731[_0x188138(0x98)](_0x53268b));}else _0x4cd56f=_0x533989[_0x188138(0x8f)](_0x38a783=>!_0x5ae841[_0x188138(0xb5)](menuPathKey(_0x38a783[_0x188138(0x9b)])));if(_0x4cd56f[_0x188138(0xba)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x156bd9['dryRun']===!![],'targetPages':[],'plannedMenus':[]};_0x4cd56f=_0x4cd56f[_0x188138(0xc0)](_0x8a2c0b=>resolvePage(_0x8a2c0b,_0x161de2,_0x374981));_0x161de2[_0x188138(0xa6)]&&_0x58d7d4['length']===0x0&&await assertSharedResourcesConfigured(_0xddc55b,_0x325923,_0x161de2['appName']);const _0x118f91=_0x4cd56f[_0x188138(0xc0)](_0x25e772=>({'type':_0x188138(0x92),'path':_0x25e772['path'],'label':_0x25e772[_0x188138(0xbf)],'loadScriptMode':'import','resources':[..._0x58d7d4],..._0x25e772[_0x188138(0xae)]===undefined?{}:{'visible':_0x25e772[_0x188138(0xae)]},..._0x25e772[_0x188138(0x8e)]===undefined?{}:{'parentId':_0x25e772[_0x188138(0x8e)]},..._0x25e772[_0x188138(0xc1)]===undefined?{}:{'sort':_0x25e772[_0x188138(0xc1)]},..._0x161de2[_0x188138(0xa6)]===undefined?{}:{'appName':_0x161de2[_0x188138(0xa6)]}}));if(_0x156bd9['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x4cd56f,'plannedMenus':_0x118f91};const _0x55c50a=_0x161de2[_0x188138(0xa6)]?await createMenus(_0xddc55b,_0x325923,_0x4cd56f,_0x58d7d4[_0x188138(0xba)]>0x0?_0x58d7d4:undefined,{'appName':_0x161de2[_0x188138(0xa6)]}):await createMenus(_0xddc55b,_0x325923,_0x4cd56f,_0x58d7d4[_0x188138(0xba)]>0x0?_0x58d7d4:undefined);return logger[_0x188138(0xa7)](_0x188138(0x8a),_0x188138(0xa9),{'count':_0x4cd56f[_0x188138(0xba)],'resources':_0x58d7d4}),{'created':_0x55c50a['length'],'skipped':![],'dryRun':![],'targetPages':_0x4cd56f,'plannedMenus':_0x118f91,'menus':_0x55c50a};}export function parseMenuSyncParams(_0x4feab8){const _0x4d3924=a173_0x400a3c;if(!_0x4feab8||typeof _0x4feab8!==_0x4d3924(0x9e))return{};let _0x28f384;try{_0x28f384=JSON[_0x4d3924(0xad)](_0x4feab8);}catch{throw new Error(_0x4d3924(0xc3));}if(typeof _0x28f384!==_0x4d3924(0xab)||_0x28f384===null||Array['isArray'](_0x28f384))throw new Error(_0x4d3924(0xa2));const _0x4df2f2=_0x28f384;if(Object['hasOwn'](_0x4df2f2,_0x4d3924(0x91)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x1d46e7=Object[_0x4d3924(0xa8)](_0x4df2f2)[_0x4d3924(0x8f)](_0x34dcbb=>!MENU_SYNC_PARAM_KEYS[_0x4d3924(0xb5)](_0x34dcbb));if(_0x1d46e7['length']>0x0)throw new Error(_0x4d3924(0xb3)+_0x1d46e7[_0x4d3924(0xa3)](',\x20')+'.');for(const _0x430e5d of[_0x4d3924(0xc2),_0x4d3924(0xbc),'appName']){const _0x2e7740=_0x4df2f2[_0x430e5d];if(_0x2e7740!==undefined&&(typeof _0x2e7740!=='string'||_0x2e7740[_0x4d3924(0x96)]()===''))throw new Error(_0x4d3924(0xbd)+_0x430e5d+':\x20expected\x20a\x20non-empty\x20string.');}if(_0x4df2f2[_0x4d3924(0xae)]!==undefined&&typeof _0x4df2f2[_0x4d3924(0xae)]!=='boolean')throw new Error(_0x4d3924(0xb7));if(_0x4df2f2[_0x4d3924(0x8e)]!==undefined&&(!Number['isInteger'](_0x4df2f2[_0x4d3924(0x8e)])||_0x4df2f2[_0x4d3924(0x8e)]<0x0))throw new Error(_0x4d3924(0xb6));return{'jsUrl':typeof _0x4df2f2['jsUrl']==='string'?_0x4df2f2[_0x4d3924(0xc2)][_0x4d3924(0x96)]():undefined,'cssUrl':typeof _0x4df2f2[_0x4d3924(0xbc)]===_0x4d3924(0x9e)?_0x4df2f2[_0x4d3924(0xbc)][_0x4d3924(0x96)]():undefined,'appName':typeof _0x4df2f2[_0x4d3924(0xa6)]===_0x4d3924(0x9e)?_0x4df2f2['appName'][_0x4d3924(0x96)]():undefined,'visible':typeof _0x4df2f2[_0x4d3924(0xae)]===_0x4d3924(0xb2)?_0x4df2f2[_0x4d3924(0xae)]:undefined,'parentId':typeof _0x4df2f2[_0x4d3924(0x8e)]===_0x4d3924(0xb8)?_0x4df2f2[_0x4d3924(0x8e)]:undefined};}
@@ -1 +1 @@
1
- (function(_0x44358a,_0x2b8c80){const _0x12950c=a175_0x4f14,_0x57ea0b=_0x44358a();while(!![]){try{const _0x5c4e77=parseInt(_0x12950c(0xdd))/0x1+parseInt(_0x12950c(0xd9))/0x2+-parseInt(_0x12950c(0xb0))/0x3*(-parseInt(_0x12950c(0xe6))/0x4)+-parseInt(_0x12950c(0xca))/0x5+-parseInt(_0x12950c(0xdc))/0x6*(-parseInt(_0x12950c(0xef))/0x7)+parseInt(_0x12950c(0xb6))/0x8*(parseInt(_0x12950c(0xb3))/0x9)+-parseInt(_0x12950c(0xd8))/0xa;if(_0x5c4e77===_0x2b8c80)break;else _0x57ea0b['push'](_0x57ea0b['shift']());}catch(_0x2f05e0){_0x57ea0b['push'](_0x57ea0b['shift']());}}}(a175_0x257e,0x4f0d8));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x2c750a){const _0x2adf02=a175_0x4f14,_0x47399e=[];return _0x2c750a[_0x2adf02(0xe4)]&&!isValidJsHttpsUrl(_0x2c750a['jsUrl'])&&_0x47399e['push']({'field':_0x2adf02(0xe4),'message':_0x2adf02(0xaf)}),_0x2c750a['cssUrl']&&!isValidCssHttpsUrl(_0x2c750a[_0x2adf02(0xec)])&&_0x47399e['push']({'field':'cssUrl','message':_0x2adf02(0xdb)}),_0x47399e;}export async function runMenuUpdateCore(_0x450bad,_0x47bca6,_0x48bc8e,_0x2559e2={}){const _0xdc3604=a175_0x4f14,_0x19df46=parseUpdateParamsFlag(_0x48bc8e),_0x8d5159=normalizeMode(_0x2559e2[_0xdc3604(0xac)]);validateSelection(_0x2559e2[_0xdc3604(0xe0)]);const _0xe52a1f=[];if(_0x19df46[_0xdc3604(0xe4)])_0xe52a1f[_0xdc3604(0xbf)](_0x19df46[_0xdc3604(0xe4)]);if(_0x19df46[_0xdc3604(0xec)])_0xe52a1f[_0xdc3604(0xbf)](_0x19df46['cssUrl']);const _0x4da46d=validateParams(_0x19df46);if(_0x4da46d[_0xdc3604(0xdf)]>0x0){const _0x44f234=_0x4da46d['map'](_0x16af2f=>_0xdc3604(0xd3)+_0x16af2f[_0xdc3604(0xbc)]+':\x20'+_0x16af2f['message'])[_0xdc3604(0xc8)](';\x20');throw new Error(_0xdc3604(0xce)+_0x44f234);}if(_0xe52a1f[_0xdc3604(0xdf)]===0x0)throw new Error(_0xdc3604(0xd0)+'Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.');logger[_0xdc3604(0xb1)](process['cwd']()),logger[_0xdc3604(0xea)]('menu-asset-update',_0xdc3604(0xb5),{'appCode':_0x450bad,'jsUrl':_0x19df46[_0xdc3604(0xe4)],'cssUrl':_0x19df46[_0xdc3604(0xec)],'mode':_0x8d5159,'dryRun':_0x2559e2[_0xdc3604(0xc4)]===!![]});if(_0x19df46[_0xdc3604(0xe4)]){const _0x529e22=await isUrlReachable(_0x19df46[_0xdc3604(0xe4)]);if(!_0x529e22)throw new Error(_0xdc3604(0xb9)+_0x19df46[_0xdc3604(0xe4)]);}if(_0x19df46['cssUrl']){const _0x50762e=await isUrlReachable(_0x19df46[_0xdc3604(0xec)]);if(!_0x50762e)throw new Error(_0xdc3604(0xe3)+_0x19df46['cssUrl']);}const _0x3debc7=await getOnlineMenuList(_0x450bad,_0x47bca6),_0x252b44=_0x3debc7[_0xdc3604(0xc3)](_0x2e6c19=>_0x2e6c19['resources'][_0xdc3604(0xdf)]>0x0),_0x3fb464=selectMenusForUpdate(_0x252b44,_0x2559e2[_0xdc3604(0xe0)]);if(_0x3fb464[_0xdc3604(0xdf)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x2559e2[_0xdc3604(0xc4)]===!![]};const _0x2cf937=_0x3fb464[_0xdc3604(0xed)](_0x2d34db=>buildMenuUpdateDiff(_0x2d34db,_0x19df46,_0x8d5159,_0x2559e2[_0xdc3604(0xbd)]===!![],_0x2559e2['loadScriptMode']));if(_0x2559e2[_0xdc3604(0xc4)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2cf937};const _0x79ac24=await Promise[_0xdc3604(0xcd)](_0x3fb464[_0xdc3604(0xed)]((_0x15be96,_0x32454c)=>updateMenuCdnUrl(_0x450bad,_0x47bca6,{'id':_0x15be96['id'],'label':_0x15be96[_0xdc3604(0xf0)],'path':_0x15be96[_0xdc3604(0xb4)],'resources':_0x2cf937[_0x32454c][_0xdc3604(0xb2)]['resources'],'extend':_0x15be96[_0xdc3604(0xeb)]??null,'loadScriptMode':_0x2559e2[_0xdc3604(0xe5)]}))),_0x1a9f55=_0x79ac24[_0xdc3604(0xc3)](_0x29241e=>_0x29241e[_0xdc3604(0xe2)]===_0xdc3604(0xd2))[_0xdc3604(0xed)](_0x3e8443=>_0x3e8443[_0xdc3604(0xc1)]),_0x16c3f4=_0x79ac24[_0xdc3604(0xc3)](_0x5db429=>_0x5db429[_0xdc3604(0xe2)]===_0xdc3604(0xbe))[_0xdc3604(0xdf)];return logger[_0xdc3604(0xea)](_0xdc3604(0xd7),_0xdc3604(0xc5),{'count':_0x3fb464['length'],'resources':_0xe52a1f}),{'updated':_0x1a9f55[_0xdc3604(0xdf)],'failed':_0x16c3f4,'skipped':![],'menus':_0x1a9f55};}function validateSelection(_0x4713b6){const _0x204b0c=a175_0x4f14;if(!_0x4713b6)throw new Error(_0x204b0c(0xb8));if(_0x4713b6[_0x204b0c(0xd6)]&&(_0x4713b6[_0x204b0c(0xe1)]['length']>0x0||_0x4713b6[_0x204b0c(0xcf)]['length']>0x0))throw new Error(_0x204b0c(0xda));if(!_0x4713b6[_0x204b0c(0xd6)]&&_0x4713b6[_0x204b0c(0xe1)][_0x204b0c(0xdf)]===0x0&&_0x4713b6[_0x204b0c(0xcf)]['length']===0x0)throw new Error(_0x204b0c(0xb8));}export function selectMenusForUpdate(_0x4d209a,_0x5c89cf){const _0x5e6f15=a175_0x4f14;validateSelection(_0x5c89cf);if(_0x5c89cf['all'])return _0x4d209a;const _0x4e6af=new Set(_0x4d209a[_0x5e6f15(0xed)](_0x188e1b=>_0x188e1b['id'])),_0x130583=new Set(_0x4d209a['map'](_0x1309b3=>_0x1309b3[_0x5e6f15(0xb4)])),_0x1dd3b0=_0x5c89cf[_0x5e6f15(0xe1)][_0x5e6f15(0xc3)](_0x20de20=>!_0x4e6af[_0x5e6f15(0xc9)](_0x20de20)),_0x3eaaca=_0x5c89cf[_0x5e6f15(0xcf)][_0x5e6f15(0xc3)](_0x5695f0=>!_0x130583[_0x5e6f15(0xc9)](_0x5695f0));if(_0x1dd3b0[_0x5e6f15(0xdf)]>0x0||_0x3eaaca[_0x5e6f15(0xdf)]>0x0){const _0x2cd338=[..._0x1dd3b0[_0x5e6f15(0xed)](_0x527519=>String(_0x527519)),..._0x3eaaca][_0x5e6f15(0xc8)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x2cd338);}const _0x3d75b4=new Set(_0x5c89cf[_0x5e6f15(0xe1)]),_0x5324be=new Set(_0x5c89cf['paths']);return _0x4d209a[_0x5e6f15(0xc3)](_0x5d3453=>_0x3d75b4[_0x5e6f15(0xc9)](_0x5d3453['id'])||_0x5324be[_0x5e6f15(0xc9)](_0x5d3453[_0x5e6f15(0xb4)]));}function normalizeMode(_0x305652){const _0x288976=a175_0x4f14;if(!_0x305652)return'patch';if(_0x305652==='replace'||_0x305652===_0x288976(0xbb))return _0x305652;throw new Error(_0x288976(0xcb)+_0x305652+_0x288976(0xd5));}function buildMenuUpdateDiff(_0x1d7919,_0x205ffd,_0x1a2247,_0xd5bfa1,_0x1e7c60){const _0x5ece0b=a175_0x4f14,_0x3a80af=[..._0x1d7919[_0x5ece0b(0xd1)]];_0x1a2247===_0x5ece0b(0xbb)&&assertUnambiguousPatchResources(_0x1d7919,_0x3a80af,_0x205ffd);const _0x21cce8=_0x1a2247===_0x5ece0b(0xbb)?patchResources(_0x3a80af,_0x205ffd):replaceResources(_0x205ffd),_0x112b45=[],_0x17863e=_0x3a80af['some'](isJsResource),_0x2000dc=_0x21cce8['some'](isJsResource);if(_0x17863e&&!_0x2000dc){const _0x23ad81=_0x5ece0b(0xe8)+_0x1d7919[_0x5ece0b(0xf0)]+_0x5ece0b(0xc7)+_0x1d7919[_0x5ece0b(0xb4)]+').\x20'+_0x5ece0b(0xe7);if(!_0xd5bfa1)throw new Error(_0x23ad81);_0x112b45['push'](_0x23ad81);}const _0x3086d7=_0x3a80af[_0x5ece0b(0xd4)](isCssResource),_0x261ecb=_0x21cce8[_0x5ece0b(0xd4)](isCssResource);_0x3086d7&&!_0x261ecb&&_0x112b45[_0x5ece0b(0xbf)](_0x5ece0b(0xc0)+_0x1d7919[_0x5ece0b(0xf0)]+_0x5ece0b(0xc7)+_0x1d7919[_0x5ece0b(0xb4)]+').');const _0x5cd311=typeof _0x1d7919[_0x5ece0b(0xeb)]?.['loadScriptMode']===_0x5ece0b(0xde)?_0x1d7919[_0x5ece0b(0xeb)][_0x5ece0b(0xe5)]:null,_0x5ce32f=_0x1e7c60?{'loadScriptMode':_0x5cd311}:{},_0x26fbb0=_0x1e7c60?{'loadScriptMode':_0x1e7c60}:{};return{'id':_0x1d7919['id'],'label':_0x1d7919['label'],'path':_0x1d7919[_0x5ece0b(0xb4)],'mode':_0x1a2247,'before':{'resources':_0x3a80af,..._0x5ce32f},'after':{'resources':_0x21cce8,..._0x26fbb0},'warnings':_0x112b45};}function a175_0x4f14(_0xb20085,_0x51e446){_0xb20085=_0xb20085-0xab;const _0x257e2f=a175_0x257e();let _0x4f1412=_0x257e2f[_0xb20085];return _0x4f1412;}function replaceResources(_0x2bb33a){const _0x28177f=a175_0x4f14;return[_0x2bb33a[_0x28177f(0xe4)],_0x2bb33a['cssUrl']][_0x28177f(0xc3)](_0x2e9ca6=>!!_0x2e9ca6);}function assertUnambiguousPatchResources(_0x4f73a2,_0x56aa2c,_0x3bf993){const _0xabc873=a175_0x4f14,_0x24c3b4=_0x56aa2c[_0xabc873(0xc3)](isJsResource)[_0xabc873(0xdf)];if(_0x3bf993[_0xabc873(0xe4)]&&_0x24c3b4>0x1)throw new Error(_0xabc873(0xf2)+_0x24c3b4+_0xabc873(0xab)+_0x4f73a2[_0xabc873(0xf0)]+_0xabc873(0xc7)+_0x4f73a2[_0xabc873(0xb4)]+')\x20'+_0xabc873(0xad));const _0x95e933=_0x56aa2c[_0xabc873(0xc3)](isCssResource)['length'];if(_0x3bf993[_0xabc873(0xec)]&&_0x95e933>0x1)throw new Error('menu\x20asset-update\x20cannot\x20patch\x20'+_0x95e933+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x4f73a2[_0xabc873(0xf0)]+_0xabc873(0xc7)+_0x4f73a2[_0xabc873(0xb4)]+')\x20'+'with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');}function patchResources(_0x9e7e6b,_0x51f69d){const _0x597d0c=a175_0x4f14;let _0x1221c4=![],_0x3b6832=![];const _0x2dfe19=[];for(const _0x3e23af of _0x9e7e6b){if(isJsResource(_0x3e23af)){if(_0x51f69d['jsUrl']&&!_0x1221c4)_0x2dfe19[_0x597d0c(0xbf)](_0x51f69d['jsUrl']),_0x1221c4=!![];else!_0x51f69d[_0x597d0c(0xe4)]&&_0x2dfe19[_0x597d0c(0xbf)](_0x3e23af);continue;}if(isCssResource(_0x3e23af)){if(_0x51f69d[_0x597d0c(0xec)]&&!_0x3b6832)_0x2dfe19[_0x597d0c(0xbf)](_0x51f69d[_0x597d0c(0xec)]),_0x3b6832=!![];else!_0x51f69d[_0x597d0c(0xec)]&&_0x2dfe19[_0x597d0c(0xbf)](_0x3e23af);continue;}_0x2dfe19['push'](_0x3e23af);}return _0x51f69d[_0x597d0c(0xe4)]&&!_0x1221c4&&_0x2dfe19[_0x597d0c(0xc6)](_0x51f69d[_0x597d0c(0xe4)]),_0x51f69d[_0x597d0c(0xec)]&&!_0x3b6832&&_0x2dfe19[_0x597d0c(0xbf)](_0x51f69d[_0x597d0c(0xec)]),_0x2dfe19;}function isJsResource(_0xd3abb2){const _0xd5b0c=a175_0x4f14;return stripQuery(_0xd3abb2)[_0xd5b0c(0xae)]()[_0xd5b0c(0xb7)](_0xd5b0c(0xee));}function isCssResource(_0x498e51){const _0x322888=a175_0x4f14;return stripQuery(_0x498e51)['toLowerCase']()[_0x322888(0xb7)]('.css');}function stripQuery(_0xe4f429){const _0x20ecfd=a175_0x4f14;return _0xe4f429[_0x20ecfd(0xe9)]('?')[0x0]??_0xe4f429;}function parseUpdateParamsFlag(_0x2dd0a0){const _0x1473e5=a175_0x4f14;if(!_0x2dd0a0||typeof _0x2dd0a0!=='string')return{};try{const _0x304aa6=JSON[_0x1473e5(0xc2)](_0x2dd0a0);if(typeof _0x304aa6!==_0x1473e5(0xf1)||_0x304aa6===null||Array[_0x1473e5(0xba)](_0x304aa6))return{};return{'jsUrl':typeof _0x304aa6[_0x1473e5(0xe4)]===_0x1473e5(0xde)?_0x304aa6[_0x1473e5(0xe4)][_0x1473e5(0xcc)]():undefined,'cssUrl':typeof _0x304aa6[_0x1473e5(0xec)]===_0x1473e5(0xde)?_0x304aa6[_0x1473e5(0xec)]['trim']():undefined};}catch{return{};}}function a175_0x257e(){const _0x57761c=['some','.\x20Allowed\x20values:\x20replace,\x20patch','all','menu-asset-update','6992460FyuRKm','668546XOrTjE','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2118RUsJvF','501655FtAPCZ','string','length','selection','menuIds','status','CSS\x20URL\x20is\x20unreachable:\x20','jsUrl','loadScriptMode','8tqgTkw','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','split','info','extend','cssUrl','map','.js','2072aWLsfj','label','object','menu\x20asset-update\x20cannot\x20patch\x20','\x20existing\x20JS\x20resources\x20for\x20\x22','mode','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','toLowerCase','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','281661ySONKH','setLogPath','after','59346TeFzcN','path','Start\x20non-interactive\x20menu\x20asset\x20update','56EQgNjm','endsWith','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','JS\x20URL\x20is\x20unreachable:\x20','isArray','patch','field','force','rejected','push','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','value','parse','filter','dryRun','Menu\x20asset\x20update\x20completed','unshift','\x22\x20(','join','has','756510ISGmUK','Invalid\x20--mode:\x20','trim','allSettled','Invalid\x20--params:\x20','paths','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','resources','fulfilled','--params.'];a175_0x257e=function(){return _0x57761c;};return a175_0x257e();}
1
+ (function(_0xacbf53,_0x42ae51){const _0x3d5033=a175_0x15f7,_0x3297d5=_0xacbf53();while(!![]){try{const _0x227bc5=parseInt(_0x3d5033(0xa1))/0x1*(parseInt(_0x3d5033(0xc6))/0x2)+-parseInt(_0x3d5033(0xdf))/0x3*(parseInt(_0x3d5033(0xd2))/0x4)+parseInt(_0x3d5033(0xc0))/0x5+parseInt(_0x3d5033(0xa8))/0x6+-parseInt(_0x3d5033(0xce))/0x7*(-parseInt(_0x3d5033(0xbb))/0x8)+parseInt(_0x3d5033(0xcb))/0x9*(parseInt(_0x3d5033(0xc2))/0xa)+-parseInt(_0x3d5033(0xa3))/0xb;if(_0x227bc5===_0x42ae51)break;else _0x3297d5['push'](_0x3297d5['shift']());}catch(_0xa5a325){_0x3297d5['push'](_0x3297d5['shift']());}}}(a175_0x1f11,0x841c8));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x4b5bf4){const _0x354fe0=a175_0x15f7,_0x4a2161=[];return _0x4b5bf4[_0x354fe0(0xa0)]&&!isValidJsHttpsUrl(_0x4b5bf4['jsUrl'])&&_0x4a2161['push']({'field':_0x354fe0(0xa0),'message':_0x354fe0(0xa6)}),_0x4b5bf4[_0x354fe0(0xc5)]&&!isValidCssHttpsUrl(_0x4b5bf4[_0x354fe0(0xc5)])&&_0x4a2161[_0x354fe0(0x9e)]({'field':_0x354fe0(0xc5),'message':_0x354fe0(0xab)}),_0x4a2161;}export async function runMenuUpdateCore(_0x5a7d35,_0x4a5fa0,_0x109938,_0x1b56f4={}){const _0x2f6458=a175_0x15f7,_0x195255=parseUpdateParamsFlag(_0x109938),_0x209da5=normalizeMode(_0x1b56f4['mode']);validateSelection(_0x1b56f4[_0x2f6458(0xda)]);const _0x1926a=[];if(_0x195255['jsUrl'])_0x1926a[_0x2f6458(0x9e)](_0x195255[_0x2f6458(0xa0)]);if(_0x195255[_0x2f6458(0xc5)])_0x1926a['push'](_0x195255[_0x2f6458(0xc5)]);const _0x10727b=validateParams(_0x195255);if(_0x10727b[_0x2f6458(0xd9)]>0x0){const _0x48ff7b=_0x10727b[_0x2f6458(0xaa)](_0x4488ea=>_0x2f6458(0xdc)+_0x4488ea['field']+':\x20'+_0x4488ea[_0x2f6458(0xd0)])['join'](';\x20');throw new Error(_0x2f6458(0xca)+_0x48ff7b);}if(_0x1926a[_0x2f6458(0xd9)]===0x0)throw new Error(_0x2f6458(0x9f)+_0x2f6458(0xa7));logger[_0x2f6458(0xae)](process[_0x2f6458(0xe0)]()),logger['info'](_0x2f6458(0xbd),_0x2f6458(0xc7),{'appCode':_0x5a7d35,'jsUrl':_0x195255[_0x2f6458(0xa0)],'cssUrl':_0x195255[_0x2f6458(0xc5)],'mode':_0x209da5,'dryRun':_0x1b56f4[_0x2f6458(0xa5)]===!![]});if(_0x195255[_0x2f6458(0xa0)]){const _0x1bb127=await isUrlReachable(_0x195255[_0x2f6458(0xa0)]);if(!_0x1bb127)throw new Error(_0x2f6458(0xd1)+_0x195255[_0x2f6458(0xa0)]);}if(_0x195255[_0x2f6458(0xc5)]){const _0x3fa8c9=await isUrlReachable(_0x195255[_0x2f6458(0xc5)]);if(!_0x3fa8c9)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x195255[_0x2f6458(0xc5)]);}const _0x2de5fe=await getOnlineMenuList(_0x5a7d35,_0x4a5fa0),_0x260c58=_0x2de5fe[_0x2f6458(0xbf)](_0x344797=>_0x344797[_0x2f6458(0xa2)][_0x2f6458(0xd9)]>0x0),_0xa24995=selectMenusForUpdate(_0x260c58,_0x1b56f4['selection']);if(_0xa24995['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1b56f4['dryRun']===!![]};const _0x505dd6=_0xa24995[_0x2f6458(0xaa)](_0x973b03=>buildMenuUpdateDiff(_0x973b03,_0x195255,_0x209da5,_0x1b56f4[_0x2f6458(0xb8)]===!![],_0x1b56f4[_0x2f6458(0xc1)]));if(_0x1b56f4[_0x2f6458(0xa5)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x505dd6};const _0x5c8771=await Promise[_0x2f6458(0xad)](_0xa24995[_0x2f6458(0xaa)]((_0x559b69,_0x4255f4)=>updateMenuCdnUrl(_0x5a7d35,_0x4a5fa0,{'id':_0x559b69['id'],'label':_0x559b69[_0x2f6458(0xcd)],'path':_0x559b69[_0x2f6458(0xb9)],'resources':_0x505dd6[_0x4255f4]['after'][_0x2f6458(0xa2)],'extend':_0x559b69[_0x2f6458(0xd5)]??null,'loadScriptMode':_0x1b56f4[_0x2f6458(0xc1)]}))),_0x17a6d0=_0x5c8771['filter'](_0x4063b7=>_0x4063b7[_0x2f6458(0xdd)]===_0x2f6458(0x9c))['map'](_0x5c8101=>_0x5c8101[_0x2f6458(0x9d)]),_0x537dde=_0x5c8771[_0x2f6458(0xbf)](_0xaadbcc=>_0xaadbcc[_0x2f6458(0xdd)]==='rejected')[_0x2f6458(0xd9)];return logger[_0x2f6458(0xa9)](_0x2f6458(0xbd),_0x2f6458(0xb5),{'count':_0xa24995[_0x2f6458(0xd9)],'resources':_0x1926a}),{'updated':_0x17a6d0[_0x2f6458(0xd9)],'failed':_0x537dde,'skipped':![],'menus':_0x17a6d0};}function validateSelection(_0x51a989){const _0x4bb447=a175_0x15f7;if(!_0x51a989)throw new Error(_0x4bb447(0xb0));if(_0x51a989['all']&&(_0x51a989[_0x4bb447(0xc3)]['length']>0x0||_0x51a989[_0x4bb447(0xc8)]['length']>0x0))throw new Error(_0x4bb447(0xb1));if(!_0x51a989[_0x4bb447(0xc4)]&&_0x51a989[_0x4bb447(0xc3)]['length']===0x0&&_0x51a989[_0x4bb447(0xc8)]['length']===0x0)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x1fca6f,_0x534dda){const _0x121e16=a175_0x15f7;validateSelection(_0x534dda);if(_0x534dda[_0x121e16(0xc4)])return _0x1fca6f;const _0x4851f5=new Set(_0x1fca6f[_0x121e16(0xaa)](_0x47388b=>_0x47388b['id'])),_0x237275=new Set(_0x1fca6f[_0x121e16(0xaa)](_0x1e5d35=>_0x1e5d35[_0x121e16(0xb9)])),_0x2a3bed=_0x534dda['menuIds'][_0x121e16(0xbf)](_0x42e003=>!_0x4851f5[_0x121e16(0xd3)](_0x42e003)),_0x524512=_0x534dda[_0x121e16(0xc8)]['filter'](_0x3d3140=>!_0x237275[_0x121e16(0xd3)](_0x3d3140));if(_0x2a3bed['length']>0x0||_0x524512['length']>0x0){const _0x2adccd=[..._0x2a3bed['map'](_0x280eec=>String(_0x280eec)),..._0x524512][_0x121e16(0xc9)](',\x20');throw new Error(_0x121e16(0xcc)+_0x2adccd);}const _0x25c5c7=new Set(_0x534dda[_0x121e16(0xc3)]),_0x526eec=new Set(_0x534dda['paths']);return _0x1fca6f[_0x121e16(0xbf)](_0x1f335b=>_0x25c5c7[_0x121e16(0xd3)](_0x1f335b['id'])||_0x526eec[_0x121e16(0xd3)](_0x1f335b[_0x121e16(0xb9)]));}function normalizeMode(_0x1a193e){const _0x47ffec=a175_0x15f7;if(!_0x1a193e)return _0x47ffec(0xb4);if(_0x1a193e===_0x47ffec(0xd7)||_0x1a193e===_0x47ffec(0xb4))return _0x1a193e;throw new Error(_0x47ffec(0xd6)+_0x1a193e+_0x47ffec(0xac));}function buildMenuUpdateDiff(_0x21b445,_0x1120c5,_0xf6acf7,_0x238cbc,_0x15d0cd){const _0x3cbe44=a175_0x15f7,_0x292e86=[..._0x21b445[_0x3cbe44(0xa2)]];_0xf6acf7===_0x3cbe44(0xb4)&&assertUnambiguousPatchResources(_0x21b445,_0x292e86,_0x1120c5);const _0x404d3e=_0xf6acf7===_0x3cbe44(0xb4)?patchResources(_0x292e86,_0x1120c5):replaceResources(_0x1120c5),_0x3920a7=[],_0x553371=_0x292e86['some'](isJsResource),_0x1cbc59=_0x404d3e['some'](isJsResource);if(_0x553371&&!_0x1cbc59){const _0x464230='menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x21b445[_0x3cbe44(0xcd)]+'\x22\x20('+_0x21b445[_0x3cbe44(0xb9)]+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x238cbc)throw new Error(_0x464230);_0x3920a7[_0x3cbe44(0x9e)](_0x464230);}const _0x2c17e3=_0x292e86[_0x3cbe44(0xdb)](isCssResource),_0x2c8f35=_0x404d3e[_0x3cbe44(0xdb)](isCssResource);_0x2c17e3&&!_0x2c8f35&&_0x3920a7[_0x3cbe44(0x9e)](_0x3cbe44(0xd4)+_0x21b445[_0x3cbe44(0xcd)]+_0x3cbe44(0xcf)+_0x21b445[_0x3cbe44(0xb9)]+').');const _0x2491da=typeof _0x21b445[_0x3cbe44(0xd5)]?.[_0x3cbe44(0xc1)]===_0x3cbe44(0xba)?_0x21b445[_0x3cbe44(0xd5)][_0x3cbe44(0xc1)]:null,_0x6da538=_0x15d0cd?{'loadScriptMode':_0x2491da}:{},_0x19b41e=_0x15d0cd?{'loadScriptMode':_0x15d0cd}:{};return{'id':_0x21b445['id'],'label':_0x21b445[_0x3cbe44(0xcd)],'path':_0x21b445['path'],'mode':_0xf6acf7,'before':{'resources':_0x292e86,..._0x6da538},'after':{'resources':_0x404d3e,..._0x19b41e},'warnings':_0x3920a7};}function replaceResources(_0xab2539){const _0x3f8fe4=a175_0x15f7;return[_0xab2539['jsUrl'],_0xab2539[_0x3f8fe4(0xc5)]][_0x3f8fe4(0xbf)](_0xe999d6=>!!_0xe999d6);}function a175_0x15f7(_0x143fd9,_0x181633){_0x143fd9=_0x143fd9-0x9b;const _0x1f1127=a175_0x1f11();let _0x15f7cd=_0x1f1127[_0x143fd9];return _0x15f7cd;}function assertUnambiguousPatchResources(_0x592aa5,_0x16913a,_0x3d3728){const _0x2b0cd3=a175_0x15f7,_0x3798f4=_0x16913a[_0x2b0cd3(0xbf)](isJsResource)['length'];if(_0x3d3728[_0x2b0cd3(0xa0)]&&_0x3798f4>0x1)throw new Error(_0x2b0cd3(0xde)+_0x3798f4+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x592aa5['label']+_0x2b0cd3(0xcf)+_0x592aa5[_0x2b0cd3(0xb9)]+')\x20'+_0x2b0cd3(0xa4));const _0x412dc1=_0x16913a[_0x2b0cd3(0xbf)](isCssResource)[_0x2b0cd3(0xd9)];if(_0x3d3728[_0x2b0cd3(0xc5)]&&_0x412dc1>0x1)throw new Error(_0x2b0cd3(0xde)+_0x412dc1+_0x2b0cd3(0xaf)+_0x592aa5['label']+_0x2b0cd3(0xcf)+_0x592aa5['path']+')\x20'+_0x2b0cd3(0xb7));}function patchResources(_0x1c9e78,_0x25f623){const _0x52a1cb=a175_0x15f7;let _0x34b652=![],_0x2f62ed=![];const _0x522eb4=[];for(const _0x31cc82 of _0x1c9e78){if(isJsResource(_0x31cc82)){if(_0x25f623[_0x52a1cb(0xa0)]&&!_0x34b652)_0x522eb4[_0x52a1cb(0x9e)](_0x25f623[_0x52a1cb(0xa0)]),_0x34b652=!![];else!_0x25f623[_0x52a1cb(0xa0)]&&_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);continue;}if(isCssResource(_0x31cc82)){if(_0x25f623[_0x52a1cb(0xc5)]&&!_0x2f62ed)_0x522eb4[_0x52a1cb(0x9e)](_0x25f623[_0x52a1cb(0xc5)]),_0x2f62ed=!![];else!_0x25f623[_0x52a1cb(0xc5)]&&_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);continue;}_0x522eb4[_0x52a1cb(0x9e)](_0x31cc82);}return _0x25f623[_0x52a1cb(0xa0)]&&!_0x34b652&&_0x522eb4[_0x52a1cb(0xbc)](_0x25f623[_0x52a1cb(0xa0)]),_0x25f623['cssUrl']&&!_0x2f62ed&&_0x522eb4['push'](_0x25f623[_0x52a1cb(0xc5)]),_0x522eb4;}function a175_0x1f11(){const _0x5e9656=['284901BKyHqR','cwd','isArray','fulfilled','value','push','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','jsUrl','1231jrDxor','resources','18205418usmNAr','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','dryRun','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','5409540FLplLU','info','map','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','.\x20Allowed\x20values:\x20replace,\x20patch','allSettled','setLogPath','\x20existing\x20CSS\x20resources\x20for\x20\x22','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','.js','split','patch','Menu\x20asset\x20update\x20completed','trim','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','force','path','string','8qsaxJd','unshift','menu-asset-update','endsWith','filter','1431530HvAiow','loadScriptMode','20poDFsS','menuIds','all','cssUrl','812RPIjhj','Start\x20non-interactive\x20menu\x20asset\x20update','paths','join','Invalid\x20--params:\x20','2414619xmdIcY','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','label','7115773ZePHyZ','\x22\x20(','message','JS\x20URL\x20is\x20unreachable:\x20','44XgliUZ','has','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','extend','Invalid\x20--mode:\x20','replace','toLowerCase','length','selection','some','--params.','status','menu\x20asset-update\x20cannot\x20patch\x20'];a175_0x1f11=function(){return _0x5e9656;};return a175_0x1f11();}function isJsResource(_0x193117){const _0x58a457=a175_0x15f7;return stripQuery(_0x193117)[_0x58a457(0xd8)]()[_0x58a457(0xbe)](_0x58a457(0xb2));}function isCssResource(_0x3c03dc){const _0x24b347=a175_0x15f7;return stripQuery(_0x3c03dc)[_0x24b347(0xd8)]()[_0x24b347(0xbe)]('.css');}function stripQuery(_0x48ff9a){const _0x12fc73=a175_0x15f7;return _0x48ff9a[_0x12fc73(0xb3)]('?')[0x0]??_0x48ff9a;}function parseUpdateParamsFlag(_0x33bc17){const _0x22c448=a175_0x15f7;if(!_0x33bc17||typeof _0x33bc17!==_0x22c448(0xba))return{};try{const _0x163f1f=JSON['parse'](_0x33bc17);if(typeof _0x163f1f!=='object'||_0x163f1f===null||Array[_0x22c448(0x9b)](_0x163f1f))return{};return{'jsUrl':typeof _0x163f1f[_0x22c448(0xa0)]===_0x22c448(0xba)?_0x163f1f[_0x22c448(0xa0)][_0x22c448(0xb6)]():undefined,'cssUrl':typeof _0x163f1f['cssUrl']===_0x22c448(0xba)?_0x163f1f['cssUrl']['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x11c0d1,_0x40f258){const _0x25242d=a176_0x185f,_0x564648=_0x11c0d1();while(!![]){try{const _0x2715fc=parseInt(_0x25242d(0x8b))/0x1*(parseInt(_0x25242d(0x95))/0x2)+parseInt(_0x25242d(0x94))/0x3*(-parseInt(_0x25242d(0x91))/0x4)+-parseInt(_0x25242d(0x90))/0x5*(-parseInt(_0x25242d(0x8e))/0x6)+-parseInt(_0x25242d(0x93))/0x7+parseInt(_0x25242d(0x97))/0x8+parseInt(_0x25242d(0x99))/0x9+-parseInt(_0x25242d(0x98))/0xa;if(_0x2715fc===_0x40f258)break;else _0x564648['push'](_0x564648['shift']());}catch(_0x43a2e0){_0x564648['push'](_0x564648['shift']());}}}(a176_0x1f70,0xebf09));export function isValidJsHttpsUrl(_0x5cfd0e){const _0x5cf388=a176_0x185f;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x5cfd0e[_0x5cf388(0x96)]());}function a176_0x185f(_0x1df799,_0x52ab08){_0x1df799=_0x1df799-0x8b;const _0x1f701c=a176_0x1f70();let _0x185fbf=_0x1f701c[_0x1df799];return _0x185fbf;}export function isValidCssHttpsUrl(_0x3b61de){const _0x44e1de=a176_0x185f;return/^https:\/\/.+\.css(\?.*)?$/[_0x44e1de(0x8f)](_0x3b61de[_0x44e1de(0x96)]());}export async function isUrlReachable(_0x5c8ed4){const _0x34fbbd=a176_0x185f;try{const _0x41cb8d=await fetch(_0x5c8ed4,{'method':_0x34fbbd(0x9a)});if(_0x41cb8d['ok'])return!![];}catch{}try{const _0xb92b46=await fetch(_0x5c8ed4,{'method':_0x34fbbd(0x8c),'headers':{'Range':'bytes=0-0'}}),_0x51ae21=_0xb92b46['ok'];try{await _0xb92b46[_0x34fbbd(0x92)]?.[_0x34fbbd(0x8d)]();}catch{}return _0x51ae21;}catch{return![];}}function a176_0x1f70(){const _0xe465dc=['902388OjTOFz','4jjCHgt','trim','445968ijsDYD','5980450gVqmWw','13949748cMnHEM','HEAD','900534OJJwrK','GET','cancel','551886AeCOig','test','5CskwHF','4HFRKVp','body','11434619McKEiT'];a176_0x1f70=function(){return _0xe465dc;};return a176_0x1f70();}
1
+ function a176_0x3b62(){const _0x28e066=['330anFEWf','21BxxvFE','3340064jwZgTP','trim','63084otWvFK','3082374ztfQWg','test','373293tmIejU','441908GohHDP','bytes=0-0','body','HEAD','722226qVrFMv','1758486KLWVNw'];a176_0x3b62=function(){return _0x28e066;};return a176_0x3b62();}(function(_0x51e6b9,_0x5dd46c){const _0x7d0df4=a176_0x3deb,_0x34d6d0=_0x51e6b9();while(!![]){try{const _0xb3b352=-parseInt(_0x7d0df4(0xe4))/0x1+parseInt(_0x7d0df4(0xee))/0x2+-parseInt(_0x7d0df4(0xed))/0x3+parseInt(_0x7d0df4(0xea))/0x4*(parseInt(_0x7d0df4(0xe6))/0x5)+parseInt(_0x7d0df4(0xe5))/0x6*(parseInt(_0x7d0df4(0xe7))/0x7)+-parseInt(_0x7d0df4(0xe8))/0x8+-parseInt(_0x7d0df4(0xeb))/0x9;if(_0xb3b352===_0x5dd46c)break;else _0x34d6d0['push'](_0x34d6d0['shift']());}catch(_0x25bfc4){_0x34d6d0['push'](_0x34d6d0['shift']());}}}(a176_0x3b62,0x827a0));export function isValidJsHttpsUrl(_0xf4d4d1){const _0x2c14c5=a176_0x3deb;return/^https:\/\/.+\.js(\?.*)?$/[_0x2c14c5(0xec)](_0xf4d4d1[_0x2c14c5(0xe9)]());}function a176_0x3deb(_0x3b2939,_0x203585){_0x3b2939=_0x3b2939-0xe3;const _0x3b6213=a176_0x3b62();let _0x3debd6=_0x3b6213[_0x3b2939];return _0x3debd6;}export function isValidCssHttpsUrl(_0x574c54){const _0x2db354=a176_0x3deb;return/^https:\/\/.+\.css(\?.*)?$/[_0x2db354(0xec)](_0x574c54[_0x2db354(0xe9)]());}export async function isUrlReachable(_0x6a2869){const _0x36fd43=a176_0x3deb;try{const _0x297b58=await fetch(_0x6a2869,{'method':_0x36fd43(0xe3)});if(_0x297b58['ok'])return!![];}catch{}try{const _0x5f30f4=await fetch(_0x6a2869,{'method':'GET','headers':{'Range':_0x36fd43(0xef)}}),_0x2de10e=_0x5f30f4['ok'];try{await _0x5f30f4[_0x36fd43(0xf0)]?.['cancel']();}catch{}return _0x2de10e;}catch{return![];}}
@@ -1 +1 @@
1
- function a177_0x2a4e(_0x3eb686,_0x5851fc){_0x3eb686=_0x3eb686-0xfa;const _0x52f612=a177_0x52f6();let _0x2a4ea6=_0x52f612[_0x3eb686];return _0x2a4ea6;}const a177_0x53fe0d=a177_0x2a4e;(function(_0x3fdf5f,_0x1e4578){const _0x5d66ce=a177_0x2a4e,_0xf85418=_0x3fdf5f();while(!![]){try{const _0x96db0e=-parseInt(_0x5d66ce(0xfd))/0x1+parseInt(_0x5d66ce(0x108))/0x2+-parseInt(_0x5d66ce(0xfb))/0x3+parseInt(_0x5d66ce(0x107))/0x4*(parseInt(_0x5d66ce(0xfa))/0x5)+parseInt(_0x5d66ce(0x105))/0x6+-parseInt(_0x5d66ce(0x104))/0x7*(parseInt(_0x5d66ce(0x103))/0x8)+-parseInt(_0x5d66ce(0xff))/0x9;if(_0x96db0e===_0x1e4578)break;else _0xf85418['push'](_0xf85418['shift']());}catch(_0x2edd94){_0xf85418['push'](_0xf85418['shift']());}}}(a177_0x52f6,0x44126));import{getSmartAppRecord}from'../../core/api-client.js';function a177_0x52f6(){const _0x500618=['2497650wOWpsM','\x20menu(s)\x20for\x20','1590388TNblsy','929196BDdyPQ','5KEcmRn','819234qepqoH','boundMenus','241804zmetGN','menu','311094kKSOrh','cookie','all','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','36016ouqKAy','700PkeTvF'];a177_0x52f6=function(){return _0x500618;};return a177_0x52f6();}import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':a177_0x53fe0d(0xfe),'command':'subapp-assets-status','description':a177_0x53fe0d(0x102),'risk':'read','strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x140386){getSubappSelector(_0x140386);},async 'execute'(_0x4a6293){const _0x106825=a177_0x53fe0d,{appCode:_0x4bf44c,appName:_0x9e27ea}=getSubappSelector(_0x4a6293),[_0x48e9ba,_0x948078]=await Promise[_0x106825(0x101)]([getSmartAppRecord(_0x4bf44c,_0x4a6293[_0x106825(0x100)]),getOnlineMenuList(_0x4bf44c,_0x4a6293[_0x106825(0x100)])]),_0x3d9dc9={'appCode':_0x4bf44c,...buildSubappAssetsStatus(_0x48e9ba,_0x948078,_0x9e27ea)};return{'ok':!![],'data':_0x3d9dc9,'message':'Inspected\x20'+_0x3d9dc9[_0x106825(0xfc)]+_0x106825(0x106)+_0x9e27ea+'\x20in\x20menu\x20host\x20'+_0x4bf44c+'.'};}};
1
+ const a177_0x335fd0=a177_0x152f;(function(_0x46b264,_0x1ae2cf){const _0x270ba8=a177_0x152f,_0x4c86b3=_0x46b264();while(!![]){try{const _0x5b1d02=-parseInt(_0x270ba8(0x1bf))/0x1+parseInt(_0x270ba8(0x1cb))/0x2*(-parseInt(_0x270ba8(0x1be))/0x3)+parseInt(_0x270ba8(0x1c1))/0x4+parseInt(_0x270ba8(0x1c6))/0x5+-parseInt(_0x270ba8(0x1ca))/0x6+parseInt(_0x270ba8(0x1c8))/0x7*(parseInt(_0x270ba8(0x1c5))/0x8)+parseInt(_0x270ba8(0x1c4))/0x9;if(_0x5b1d02===_0x1ae2cf)break;else _0x4c86b3['push'](_0x4c86b3['shift']());}catch(_0x16ca3d){_0x4c86b3['push'](_0x4c86b3['shift']());}}}(a177_0x1cc9,0xe0866));import{getSmartAppRecord}from'../../core/api-client.js';function a177_0x1cc9(){const _0x355f98=['\x20in\x20menu\x20host\x20','3heMAwU','1192053IOKEaR','Inspect\x20shared\x20frontend\x20subapp\x20resources\x20and\x20menu\x20fallbacks\x20in\x20the\x20selected\x20menu\x20host','2384364GVQvfJ','\x20menu(s)\x20for\x20','read','20132352YscQkm','2491144NyzpEH','5660355RrmZHP','Inspected\x20','7zAeEfH','cookie','9015240MNiQvq','1324472eWjrXU','boundMenus'];a177_0x1cc9=function(){return _0x355f98;};return a177_0x1cc9();}function a177_0x152f(_0x2ee4aa,_0x1a9bdf){_0x2ee4aa=_0x2ee4aa-0x1bc;const _0x1cc948=a177_0x1cc9();let _0x152fc3=_0x1cc948[_0x2ee4aa];return _0x152fc3;}import{getOnlineMenuList}from'../../commands/menu/shared/service.js';import{buildSubappAssetsStatus,getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';export const menuSubappAssetsStatus={'service':'menu','command':'subapp-assets-status','description':a177_0x335fd0(0x1c0),'risk':a177_0x335fd0(0x1c3),'strictFlags':!![],'flags':SUBAPP_ASSET_SELECTOR_FLAGS,async 'validate'(_0x161a78){getSubappSelector(_0x161a78);},async 'execute'(_0x587762){const _0x3c7d7a=a177_0x335fd0,{appCode:_0xb1b7e8,appName:_0x1206cb}=getSubappSelector(_0x587762),[_0x2e72c4,_0x35956a]=await Promise['all']([getSmartAppRecord(_0xb1b7e8,_0x587762[_0x3c7d7a(0x1c9)]),getOnlineMenuList(_0xb1b7e8,_0x587762[_0x3c7d7a(0x1c9)])]),_0x203cce={'appCode':_0xb1b7e8,...buildSubappAssetsStatus(_0x2e72c4,_0x35956a,_0x1206cb)};return{'ok':!![],'data':_0x203cce,'message':_0x3c7d7a(0x1c7)+_0x203cce[_0x3c7d7a(0x1bc)]+_0x3c7d7a(0x1c2)+_0x1206cb+_0x3c7d7a(0x1bd)+_0xb1b7e8+'.'};}};
@@ -1 +1 @@
1
- const a178_0xe7b19c=a178_0x1d2f;function a178_0x589c(){const _0x43f326=['skinColor','accessKey','1863363Ethdgx','size','Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','test','map','.\x20Refusing\x20update.','some',';\x20independent\x20deployment\x20not\x20verified.','object','extend','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','string','keys','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20','Would\x20update\x20shared\x20assets\x20for\x20','Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.','cookie','app.extend.assets','unchanged','directDbEnabled','nextExtend','digest','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','expectedHash','stringify','hex','vipDeploy','24WdUjgk','46642WZxYtB','sha256','enableOpenApi','https:','has','/smartapi/app/update','\x20in\x20menu\x20host\x20','str','--resources\x20is\x20required.','Updated\x20shared\x20resources\x20for\x20','verified\x20app.extend','3826963kifJbq','\x20must\x20be\x20a\x20JSON\x20object.',']\x20must\x20be\x20a\x20URL\x20string.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','trim','JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs','15wIjKuy','isArray','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','resources','6037390AvgiWx','resources[','filter','316809vjZZsn','apiError','6mgXWty','\x20must\x20be\x20a\x20JSON\x20array.','entries','enableSample','validation','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','directDbId','length','subapp-assets-update','appPublishStatus','appCode','689932yLWpOZ','--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.','expected-hash','parse','before','assets','\x20contains\x20invalid\x20JSON.','enableAutoSync',']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.','POST','551925ttUAOx'];a178_0x589c=function(){return _0x43f326;};return a178_0x589c();}(function(_0x3c8b7f,_0x3d18d0){const _0x83ce97=a178_0x1d2f,_0x15126c=_0x3c8b7f();while(!![]){try{const _0x2116c7=-parseInt(_0x83ce97(0xc1))/0x1+-parseInt(_0x83ce97(0xe1))/0x2+-parseInt(_0x83ce97(0xc4))/0x3+parseInt(_0x83ce97(0xb7))/0x4*(parseInt(_0x83ce97(0xa3))/0x5)+parseInt(_0x83ce97(0xac))/0x6*(parseInt(_0x83ce97(0x9d))/0x7)+-parseInt(_0x83ce97(0xe0))/0x8*(parseInt(_0x83ce97(0xaa))/0x9)+parseInt(_0x83ce97(0xa7))/0xa;if(_0x2116c7===_0x3d18d0)break;else _0x15126c['push'](_0x15126c['shift']());}catch(_0x3c6d14){_0x15126c['push'](_0x15126c['shift']());}}}(a178_0x589c,0x59567));import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0xe7b19c(0xc2),a178_0xe7b19c(0xe3),a178_0xe7b19c(0xc3),'assets','tenantColumn',a178_0xe7b19c(0xaf),a178_0xe7b19c(0xdf),a178_0xe7b19c(0xbe),a178_0xe7b19c(0xb2),a178_0xe7b19c(0xd8)]);function parseObject(_0x4e3497,_0x4403d6){const _0x2ee1a0=a178_0xe7b19c;let _0x99593=_0x4e3497;if(typeof _0x4e3497===_0x2ee1a0(0xd0))try{_0x99593=JSON[_0x2ee1a0(0xba)](_0x4e3497);}catch{throw CliErrors['validation'](_0x4403d6+_0x2ee1a0(0xbd));}if(!_0x99593||typeof _0x99593!==_0x2ee1a0(0xcc)||Array[_0x2ee1a0(0xa4)](_0x99593))throw CliErrors[_0x2ee1a0(0xb0)](_0x4403d6+_0x2ee1a0(0x9e));return _0x99593;}function parseArray(_0x14fbf2,_0xb9421c){const _0x50e0ac=a178_0xe7b19c;let _0x2151a7;try{_0x2151a7=JSON['parse'](_0x14fbf2);}catch{throw CliErrors[_0x50e0ac(0xb0)](_0xb9421c+_0x50e0ac(0xbd));}if(!Array['isArray'](_0x2151a7))throw CliErrors[_0x50e0ac(0xb0)](_0xb9421c+_0x50e0ac(0xad));return _0x2151a7[_0x50e0ac(0xc8)]((_0x589dab,_0x3c0ed0)=>parseObject(_0x589dab,_0xb9421c+'['+_0x3c0ed0+']'));}function a178_0x1d2f(_0x321a85,_0x24fed4){_0x321a85=_0x321a85-0x97;const _0x589c25=a178_0x589c();let _0x1d2f79=_0x589c25[_0x321a85];return _0x1d2f79;}function validateResources(_0x483330){const _0x2eed06=a178_0xe7b19c;if(_0x483330[_0x2eed06(0xb3)]===0x0)throw CliErrors[_0x2eed06(0xb0)]('At\x20least\x20one\x20resource\x20URL\x20is\x20required.');for(const [_0x534d91,_0x293ea6]of _0x483330[_0x2eed06(0xae)]()){if(typeof _0x293ea6!==_0x2eed06(0xd0))throw CliErrors[_0x2eed06(0xb0)](_0x2eed06(0xa8)+_0x534d91+_0x2eed06(0x9f));try{if(new URL(_0x293ea6)['protocol']!==_0x2eed06(0xe4))throw new Error('not\x20HTTPS');}catch{throw CliErrors['validation']('resources['+_0x534d91+_0x2eed06(0xbf));}}if(new Set(_0x483330)[_0x2eed06(0xc5)]!==_0x483330['length']||!_0x483330[_0x2eed06(0xca)](_0x1a9b85=>/\.m?js(?:[?#]|$)/i[_0x2eed06(0xc7)](_0x1a9b85)))throw CliErrors[_0x2eed06(0xb0)](_0x2eed06(0xd4));return _0x483330;}function prepare(_0x2582e0,_0x34e15e,_0x2a81e5){const _0x31f68a=a178_0xe7b19c;if(!Number['isSafeInteger'](_0x2582e0['id'])||(_0x2582e0['id']??0x0)<=0x0||typeof _0x2582e0[_0x31f68a(0xb5)]!==_0x31f68a(0xd0)||!_0x2582e0[_0x31f68a(0xb5)])throw CliErrors[_0x31f68a(0xb0)](_0x31f68a(0xa5));const _0x34a2d0=parseObject(_0x2582e0[_0x31f68a(0xcd)],'app.extend'),_0x3f7c6f=Object[_0x31f68a(0xd1)](_0x34a2d0)['filter'](_0x47ec8b=>!KNOWN_EXTEND_KEYS[_0x31f68a(0xe5)](_0x47ec8b));if(_0x3f7c6f[_0x31f68a(0xb3)])throw CliErrors[_0x31f68a(0xb0)]('Unknown\x20app.extend\x20fields:\x20'+_0x3f7c6f['join'](',\x20')+_0x31f68a(0xc9));if(typeof _0x34a2d0[_0x31f68a(0xbc)]!==_0x31f68a(0xd0))throw CliErrors[_0x31f68a(0xb0)]('app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.');const _0x4fc138=parseArray(_0x34a2d0[_0x31f68a(0xbc)],_0x31f68a(0xd6)),_0x474b3d=_0x4fc138[_0x31f68a(0xa9)](_0x5911f4=>_0x5911f4['appName']===_0x34e15e);if(_0x474b3d[_0x31f68a(0xb3)]!==0x1)throw CliErrors[_0x31f68a(0xb0)](_0x31f68a(0xd2)+_0x34e15e+';\x20found\x20'+_0x474b3d['length']+'.');const _0x4b7626=_0x474b3d[0x0];if(typeof _0x4b7626[_0x31f68a(0xa6)]!==_0x31f68a(0xd0))throw CliErrors[_0x31f68a(0xb0)](_0x31f68a(0xce));let _0x330e6a;try{_0x330e6a=JSON[_0x31f68a(0xba)](_0x4b7626[_0x31f68a(0xa6)]);}catch{throw CliErrors[_0x31f68a(0xb0)]('Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.');}if(!Array[_0x31f68a(0xa4)](_0x330e6a)||_0x330e6a[_0x31f68a(0xca)](_0x1efef5=>typeof _0x1efef5!==_0x31f68a(0xd0)))throw CliErrors['validation'](_0x31f68a(0xa0));const _0x5a8ec3=_0x4fc138[_0x31f68a(0xc8)](_0x47df66=>_0x47df66===_0x4b7626?{..._0x47df66,'resources':JSON[_0x31f68a(0xdd)](_0x2a81e5)}:_0x47df66),_0x12d274={..._0x34a2d0,'assets':JSON['stringify'](_0x5a8ec3)},_0x494d1e=createHash(_0x31f68a(0xe2))['update'](JSON[_0x31f68a(0xdd)]({'appCode':_0x2582e0[_0x31f68a(0xb6)],'id':_0x2582e0['id'],'appPublishStatus':_0x2582e0['appPublishStatus'],'extend':_0x34a2d0,'appName':_0x34e15e,'resources':_0x2a81e5}))[_0x31f68a(0xda)](_0x31f68a(0xde));return{'before':_0x330e6a,'nextExtend':_0x12d274,'expectedHash':_0x494d1e,'unchanged':isDeepStrictEqual(_0x330e6a,_0x2a81e5)};}function flags(_0x4c0622){const _0x38807a=a178_0xe7b19c,{appCode:_0x88ab13,appName:_0x29b52}=getSubappSelector(_0x4c0622),_0x4b0456=_0x4c0622[_0x38807a(0x99)](_0x38807a(0xa6))[_0x38807a(0xa1)]();if(!_0x4b0456)throw CliErrors[_0x38807a(0xb0)](_0x38807a(0x9a));let _0x3038d;try{_0x3038d=JSON[_0x38807a(0xba)](_0x4b0456);}catch{throw CliErrors[_0x38807a(0xb0)](_0x38807a(0xb8));}if(!Array[_0x38807a(0xa4)](_0x3038d))throw CliErrors[_0x38807a(0xb0)](_0x38807a(0xb8));return{'appCode':_0x88ab13,'appName':_0x29b52,'resources':validateResources(_0x3038d)};}export const menuSubappAssetsUpdate={'service':'menu','command':a178_0xe7b19c(0xb4),'description':a178_0xe7b19c(0xc6),'risk':'write','strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a178_0xe7b19c(0xa6),'type':a178_0xe7b19c(0xd0),'required':!![],'description':a178_0xe7b19c(0xa2)},{'name':'expected-hash','type':a178_0xe7b19c(0xd0),'description':a178_0xe7b19c(0xb1)}],async 'validate'(_0x9aefed){flags(_0x9aefed);},async 'dryRun'(_0x348a5f){const _0x2d100e=a178_0xe7b19c,{appCode:_0x1a6691,appName:_0xf56ee2,resources:_0x29fb47}=flags(_0x348a5f),_0x3cfa8b=await getSmartAppRecord(_0x1a6691,_0x348a5f[_0x2d100e(0xd5)]),_0x183cfe=prepare(_0x3cfa8b,_0xf56ee2,_0x29fb47);return{'method':_0x2d100e(0xc0),'url':_0x2d100e(0x97),'body':{'preview':{'appCode':_0x1a6691,'appName':_0xf56ee2,'before':_0x183cfe[_0x2d100e(0xbb)],'after':_0x29fb47,'expectedHash':_0x183cfe['expectedHash'],'unchanged':_0x183cfe['unchanged'],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x183cfe[_0x2d100e(0xd7)]?'Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.':_0x2d100e(0xd3)+_0xf56ee2+'.'};},async 'execute'(_0x8272d0){const _0x2efe1f=a178_0xe7b19c,{appCode:_0x32919d,appName:_0x23dc95,resources:_0x58629c}=flags(_0x8272d0),_0x32eea5=_0x8272d0[_0x2efe1f(0x99)](_0x2efe1f(0xb9))[_0x2efe1f(0xa1)]();if(!/^[a-f0-9]{64}$/i[_0x2efe1f(0xc7)](_0x32eea5))throw CliErrors[_0x2efe1f(0xb0)](_0x2efe1f(0xcf));const _0x2541d7=await getSmartAppRecord(_0x32919d,_0x8272d0[_0x2efe1f(0xd5)]),_0xff9de5=prepare(_0x2541d7,_0x23dc95,_0x58629c);if(_0x32eea5!==_0xff9de5[_0x2efe1f(0xdc)])throw CliErrors['validation']('App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.');if(_0xff9de5[_0x2efe1f(0xd7)])return{'ok':!![],'data':{'appCode':_0x32919d,'appName':_0x23dc95,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2efe1f(0xdb)};await updateSmartAppRecord({'id':_0x2541d7['id'],'appCode':_0x32919d,'appPublishStatus':_0x2541d7[_0x2efe1f(0xb5)],'extend':_0xff9de5[_0x2efe1f(0xd9)]},_0x8272d0['cookie']);const _0x491e49=await getSmartAppRecord(_0x32919d,_0x8272d0[_0x2efe1f(0xd5)]),_0x2c35d7=parseObject(_0x491e49[_0x2efe1f(0xcd)],_0x2efe1f(0x9c));if(_0x491e49['id']!==_0x2541d7['id']||_0x491e49[_0x2efe1f(0xb5)]!==_0x2541d7[_0x2efe1f(0xb5)]||!isDeepStrictEqual(_0x2c35d7,_0xff9de5[_0x2efe1f(0xd9)]))throw CliErrors[_0x2efe1f(0xab)]('App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.');return{'ok':!![],'data':{'appCode':_0x32919d,'appName':_0x23dc95,'updated':!![],'resources':_0x58629c,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x2efe1f(0x9b)+_0x23dc95+_0x2efe1f(0x98)+_0x32919d+_0x2efe1f(0xcb)};}};
1
+ const a178_0x4c9f97=a178_0x1be7;(function(_0x4074bc,_0x43ec7a){const _0x2a80a8=a178_0x1be7,_0x2d3fa6=_0x4074bc();while(!![]){try{const _0x209754=parseInt(_0x2a80a8(0x15f))/0x1*(-parseInt(_0x2a80a8(0x18d))/0x2)+-parseInt(_0x2a80a8(0x189))/0x3+parseInt(_0x2a80a8(0x19a))/0x4*(-parseInt(_0x2a80a8(0x159))/0x5)+-parseInt(_0x2a80a8(0x1a3))/0x6*(parseInt(_0x2a80a8(0x17f))/0x7)+-parseInt(_0x2a80a8(0x184))/0x8+-parseInt(_0x2a80a8(0x16c))/0x9+parseInt(_0x2a80a8(0x178))/0xa*(parseInt(_0x2a80a8(0x176))/0xb);if(_0x209754===_0x43ec7a)break;else _0x2d3fa6['push'](_0x2d3fa6['shift']());}catch(_0x2b5a4e){_0x2d3fa6['push'](_0x2d3fa6['shift']());}}}(a178_0x2cc3,0xdc470));function a178_0x2cc3(){const _0x3f5f52=['\x20must\x20be\x20a\x20JSON\x20array.','Unknown\x20app.extend\x20fields:\x20','Existing\x20subapp.resources\x20contains\x20invalid\x20JSON.','4202511eiUckb','enableSample','object','appPublishStatus','4oWrngh','sha256','update','parse','App\x20assets\x20or\x20update\x20target\x20changed\x20since\x20preview;\x20the\x20fingerprint\x20does\x20not\x20match.\x20Run\x20a\x20new\x20dry-run.','subapp-assets-update','POST','resources','some','unchanged','enableOpenApi','App\x20asset\x20update\x20verification\x20failed;\x20inspect\x20the\x20app\x20before\x20retrying.','appCode','8GcHYJD','string','assets','\x20must\x20be\x20a\x20JSON\x20object.','tenantColumn','--expected-hash\x20from\x20a\x20dry-run\x20is\x20required.','filter','vipDeploy','verified\x20app.extend','1247718NJuEIY','app.extend','stringify','Would\x20update\x20shared\x20assets\x20for\x20','has','apiError','write','3210755jlQpQp','extend','Shared\x20assets\x20already\x20match\x20the\x20requested\x20URLs.',';\x20found\x20','keys','before','288853CDKGuW','Preview\x20fingerprint\x20binding\x20the\x20host,\x20subapp,\x20resource\x20URLs\x20and\x20current\x20config;\x20required\x20for\x20writes','str','isSafeInteger','join','Existing\x20subapp.resources\x20must\x20be\x20a\x20JSON\x20string.','enableAutoSync','length','Expected\x20exactly\x20one\x20existing\x20subapp\x20entry\x20for\x20',';\x20independent\x20deployment\x20not\x20verified.','cookie','validation','App\x20ID\x20or\x20publish\x20status\x20is\x20missing;\x20refusing\x20a\x20generic\x20app\x20update.','14817393yTDtCh','.\x20Refusing\x20update.','entries','expectedHash','https:','nextExtend','map','directDbEnabled','Management\x20app\x20assets\x20already\x20match;\x20independent\x20deployment\x20not\x20verified.','test','11RtxGKl',']\x20must\x20be\x20a\x20URL\x20string.','76389990Uyhcsi','skinColor','resources[','isArray','trim','At\x20least\x20one\x20resource\x20URL\x20is\x20required.','expected-hash','28CEVmpA','not\x20HTTPS','\x20contains\x20invalid\x20JSON.','app.extend.assets\x20must\x20be\x20a\x20JSON\x20string;\x20refusing\x20update.','Existing\x20subapp.resources\x20must\x20be\x20an\x20array\x20of\x20URLs.','7965672LveTxf','accessKey'];a178_0x2cc3=function(){return _0x3f5f52;};return a178_0x2cc3();}import{createHash}from'node:crypto';import{isDeepStrictEqual}from'node:util';import{getSmartAppRecord,updateSmartAppRecord}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{getSubappSelector,SUBAPP_ASSET_SELECTOR_FLAGS}from'../../commands/menu/shared/subapp-assets.js';const KNOWN_EXTEND_KEYS=new Set([a178_0x4c9f97(0x179),a178_0x4c9f97(0x197),a178_0x4c9f97(0x185),a178_0x4c9f97(0x19c),a178_0x4c9f97(0x19e),a178_0x4c9f97(0x18a),a178_0x4c9f97(0x1a1),a178_0x4c9f97(0x165),'directDbId',a178_0x4c9f97(0x173)]);function parseObject(_0x1593ca,_0x475cd1){const _0xc8935e=a178_0x4c9f97;let _0x5591e6=_0x1593ca;if(typeof _0x1593ca===_0xc8935e(0x19b))try{_0x5591e6=JSON[_0xc8935e(0x190)](_0x1593ca);}catch{throw CliErrors['validation'](_0x475cd1+_0xc8935e(0x181));}if(!_0x5591e6||typeof _0x5591e6!==_0xc8935e(0x18b)||Array[_0xc8935e(0x17b)](_0x5591e6))throw CliErrors[_0xc8935e(0x16a)](_0x475cd1+_0xc8935e(0x19d));return _0x5591e6;}function parseArray(_0x2f1ec0,_0x3c2211){const _0x5e837d=a178_0x4c9f97;let _0x3fbdd5;try{_0x3fbdd5=JSON['parse'](_0x2f1ec0);}catch{throw CliErrors['validation'](_0x3c2211+_0x5e837d(0x181));}if(!Array[_0x5e837d(0x17b)](_0x3fbdd5))throw CliErrors[_0x5e837d(0x16a)](_0x3c2211+_0x5e837d(0x186));return _0x3fbdd5[_0x5e837d(0x172)]((_0x337a64,_0x2ea8cb)=>parseObject(_0x337a64,_0x3c2211+'['+_0x2ea8cb+']'));}function validateResources(_0x374870){const _0x2bf1d8=a178_0x4c9f97;if(_0x374870[_0x2bf1d8(0x166)]===0x0)throw CliErrors[_0x2bf1d8(0x16a)](_0x2bf1d8(0x17d));for(const [_0x229ca8,_0x468fd7]of _0x374870[_0x2bf1d8(0x16e)]()){if(typeof _0x468fd7!==_0x2bf1d8(0x19b))throw CliErrors['validation'](_0x2bf1d8(0x17a)+_0x229ca8+_0x2bf1d8(0x177));try{if(new URL(_0x468fd7)['protocol']!==_0x2bf1d8(0x170))throw new Error(_0x2bf1d8(0x180));}catch{throw CliErrors['validation'](_0x2bf1d8(0x17a)+_0x229ca8+']\x20must\x20be\x20an\x20absolute\x20HTTPS\x20URL.');}}if(new Set(_0x374870)['size']!==_0x374870[_0x2bf1d8(0x166)]||!_0x374870['some'](_0x4dcaa7=>/\.m?js(?:[?#]|$)/i[_0x2bf1d8(0x175)](_0x4dcaa7)))throw CliErrors['validation']('Resources\x20need\x20one\x20JS\x20entry\x20and\x20no\x20duplicate\x20URLs.');return _0x374870;}function a178_0x1be7(_0x3fb9f8,_0x197be8){_0x3fb9f8=_0x3fb9f8-0x157;const _0x2cc33a=a178_0x2cc3();let _0x1be7d4=_0x2cc33a[_0x3fb9f8];return _0x1be7d4;}function prepare(_0x3ee00d,_0x516144,_0x4f6076){const _0x270c33=a178_0x4c9f97;if(!Number[_0x270c33(0x162)](_0x3ee00d['id'])||(_0x3ee00d['id']??0x0)<=0x0||typeof _0x3ee00d[_0x270c33(0x18c)]!=='string'||!_0x3ee00d[_0x270c33(0x18c)])throw CliErrors['validation'](_0x270c33(0x16b));const _0x21a477=parseObject(_0x3ee00d[_0x270c33(0x15a)],_0x270c33(0x1a4)),_0x3e679a=Object[_0x270c33(0x15d)](_0x21a477)['filter'](_0xdd65=>!KNOWN_EXTEND_KEYS[_0x270c33(0x1a7)](_0xdd65));if(_0x3e679a[_0x270c33(0x166)])throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x187)+_0x3e679a[_0x270c33(0x163)](',\x20')+_0x270c33(0x16d));if(typeof _0x21a477[_0x270c33(0x19c)]!==_0x270c33(0x19b))throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x182));const _0x257d0e=parseArray(_0x21a477[_0x270c33(0x19c)],'app.extend.assets'),_0x312c53=_0x257d0e[_0x270c33(0x1a0)](_0x2aaafc=>_0x2aaafc['appName']===_0x516144);if(_0x312c53['length']!==0x1)throw CliErrors['validation'](_0x270c33(0x167)+_0x516144+_0x270c33(0x15c)+_0x312c53[_0x270c33(0x166)]+'.');const _0x4721d3=_0x312c53[0x0];if(typeof _0x4721d3['resources']!==_0x270c33(0x19b))throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x164));let _0x582d87;try{_0x582d87=JSON['parse'](_0x4721d3['resources']);}catch{throw CliErrors[_0x270c33(0x16a)](_0x270c33(0x188));}if(!Array[_0x270c33(0x17b)](_0x582d87)||_0x582d87[_0x270c33(0x195)](_0xcf3f38=>typeof _0xcf3f38!=='string'))throw CliErrors['validation'](_0x270c33(0x183));const _0x48b493=_0x257d0e[_0x270c33(0x172)](_0x1fa6f0=>_0x1fa6f0===_0x4721d3?{..._0x1fa6f0,'resources':JSON['stringify'](_0x4f6076)}:_0x1fa6f0),_0x20b384={..._0x21a477,'assets':JSON[_0x270c33(0x1a5)](_0x48b493)},_0x27dbf5=createHash(_0x270c33(0x18e))[_0x270c33(0x18f)](JSON[_0x270c33(0x1a5)]({'appCode':_0x3ee00d[_0x270c33(0x199)],'id':_0x3ee00d['id'],'appPublishStatus':_0x3ee00d['appPublishStatus'],'extend':_0x21a477,'appName':_0x516144,'resources':_0x4f6076}))['digest']('hex');return{'before':_0x582d87,'nextExtend':_0x20b384,'expectedHash':_0x27dbf5,'unchanged':isDeepStrictEqual(_0x582d87,_0x4f6076)};}function flags(_0x57f969){const _0x531113=a178_0x4c9f97,{appCode:_0x339b87,appName:_0x57e1ee}=getSubappSelector(_0x57f969),_0xa55627=_0x57f969[_0x531113(0x161)](_0x531113(0x194))[_0x531113(0x17c)]();if(!_0xa55627)throw CliErrors[_0x531113(0x16a)]('--resources\x20is\x20required.');let _0x469f80;try{_0x469f80=JSON['parse'](_0xa55627);}catch{throw CliErrors[_0x531113(0x16a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');}if(!Array[_0x531113(0x17b)](_0x469f80))throw CliErrors[_0x531113(0x16a)]('--resources\x20must\x20be\x20a\x20JSON\x20array\x20of\x20HTTPS\x20URLs.');return{'appCode':_0x339b87,'appName':_0x57e1ee,'resources':validateResources(_0x469f80)};}export const menuSubappAssetsUpdate={'service':'menu','command':a178_0x4c9f97(0x192),'description':'Update\x20one\x20frontend\x20subapp\x20resource\x20URL\x20set\x20in\x20the\x20selected\x20menu\x20host','risk':a178_0x4c9f97(0x158),'strictFlags':!![],'flags':[...SUBAPP_ASSET_SELECTOR_FLAGS,{'name':a178_0x4c9f97(0x194),'type':a178_0x4c9f97(0x19b),'required':!![],'description':'JSON\x20array\x20of\x20HTTPS\x20resource\x20URLs'},{'name':a178_0x4c9f97(0x17e),'type':a178_0x4c9f97(0x19b),'description':a178_0x4c9f97(0x160)}],async 'validate'(_0x130661){flags(_0x130661);},async 'dryRun'(_0x303526){const _0x36e59c=a178_0x4c9f97,{appCode:_0x4857bf,appName:_0x703dd5,resources:_0x33cba9}=flags(_0x303526),_0x186e61=await getSmartAppRecord(_0x4857bf,_0x303526[_0x36e59c(0x169)]),_0x375fe5=prepare(_0x186e61,_0x703dd5,_0x33cba9);return{'method':_0x36e59c(0x193),'url':'/smartapi/app/update','body':{'preview':{'appCode':_0x4857bf,'appName':_0x703dd5,'before':_0x375fe5[_0x36e59c(0x15e)],'after':_0x33cba9,'expectedHash':_0x375fe5[_0x36e59c(0x16f)],'unchanged':_0x375fe5['unchanged'],'remoteContentVerified':![],'independentDeploymentVerified':![]}},'description':_0x375fe5[_0x36e59c(0x196)]?_0x36e59c(0x15b):_0x36e59c(0x1a6)+_0x703dd5+'.'};},async 'execute'(_0x3ad7ac){const _0x1ae34d=a178_0x4c9f97,{appCode:_0x40b2dc,appName:_0x130e2b,resources:_0xb1ee7}=flags(_0x3ad7ac),_0x11f02a=_0x3ad7ac['str'](_0x1ae34d(0x17e))['trim']();if(!/^[a-f0-9]{64}$/i['test'](_0x11f02a))throw CliErrors['validation'](_0x1ae34d(0x19f));const _0x2e60d2=await getSmartAppRecord(_0x40b2dc,_0x3ad7ac[_0x1ae34d(0x169)]),_0x11b24e=prepare(_0x2e60d2,_0x130e2b,_0xb1ee7);if(_0x11f02a!==_0x11b24e[_0x1ae34d(0x16f)])throw CliErrors[_0x1ae34d(0x16a)](_0x1ae34d(0x191));if(_0x11b24e[_0x1ae34d(0x196)])return{'ok':!![],'data':{'appCode':_0x40b2dc,'appName':_0x130e2b,'updated':![],'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':_0x1ae34d(0x174)};await updateSmartAppRecord({'id':_0x2e60d2['id'],'appCode':_0x40b2dc,'appPublishStatus':_0x2e60d2[_0x1ae34d(0x18c)],'extend':_0x11b24e[_0x1ae34d(0x171)]},_0x3ad7ac[_0x1ae34d(0x169)]);const _0x11eff1=await getSmartAppRecord(_0x40b2dc,_0x3ad7ac['cookie']),_0x4d64d0=parseObject(_0x11eff1[_0x1ae34d(0x15a)],_0x1ae34d(0x1a2));if(_0x11eff1['id']!==_0x2e60d2['id']||_0x11eff1['appPublishStatus']!==_0x2e60d2['appPublishStatus']||!isDeepStrictEqual(_0x4d64d0,_0x11b24e[_0x1ae34d(0x171)]))throw CliErrors[_0x1ae34d(0x157)](_0x1ae34d(0x198));return{'ok':!![],'data':{'appCode':_0x40b2dc,'appName':_0x130e2b,'updated':!![],'resources':_0xb1ee7,'managementConfirmed':!![],'independentDeploymentVerified':![],'remoteContentVerified':![]},'message':'Updated\x20shared\x20resources\x20for\x20'+_0x130e2b+'\x20in\x20menu\x20host\x20'+_0x40b2dc+_0x1ae34d(0x168)};}};
@@ -1 +1 @@
1
- const a179_0x4f5273=a179_0x4dbd;(function(_0x80c1aa,_0x48439a){const _0x313e40=a179_0x4dbd,_0x2b9960=_0x80c1aa();while(!![]){try{const _0x651843=parseInt(_0x313e40(0x18f))/0x1+-parseInt(_0x313e40(0x19e))/0x2*(parseInt(_0x313e40(0x1c6))/0x3)+-parseInt(_0x313e40(0x197))/0x4+-parseInt(_0x313e40(0x1c7))/0x5+parseInt(_0x313e40(0x195))/0x6*(parseInt(_0x313e40(0x193))/0x7)+parseInt(_0x313e40(0x1bf))/0x8+parseInt(_0x313e40(0x198))/0x9*(-parseInt(_0x313e40(0x19b))/0xa);if(_0x651843===_0x48439a)break;else _0x2b9960['push'](_0x2b9960['shift']());}catch(_0x1024b3){_0x2b9960['push'](_0x2b9960['shift']());}}}(a179_0x71fd,0x786ce));import a179_0x29d165 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,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';function a179_0x4dbd(_0x18a5e5,_0x2f4e71){_0x18a5e5=_0x18a5e5-0x18d;const _0x71fd73=a179_0x71fd();let _0x4dbd5c=_0x71fd73[_0x18a5e5];return _0x4dbd5c;}export const menuSync={'service':'menu','command':a179_0x4f5273(0x1b9),'description':'Register\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a179_0x4f5273(0x1a9),'type':a179_0x4f5273(0x1ab),'description':a179_0x4f5273(0x1a0)+a179_0x4f5273(0x19f)},{'name':a179_0x4f5273(0x1d0),'type':'string','description':a179_0x4f5273(0x1bd)},{'name':a179_0x4f5273(0x1c8),'type':a179_0x4f5273(0x1b0),'description':a179_0x4f5273(0x1cb)}],async 'dryRun'(_0x5a261a){const _0x210b27=a179_0x4f5273;ensureRunnableContext(_0x5a261a['rawFlags'],_0x5a261a[_0x210b27(0x1cc)]);const _0x10a359=await runMenuSyncCore(_0x5a261a[_0x210b27(0x1b2)],_0x5a261a[_0x210b27(0x1cf)],parsePaths(_0x5a261a[_0x210b27(0x1ad)](_0x210b27(0x1d0))),_0x5a261a[_0x210b27(0x1ad)](_0x210b27(0x1a9)),{'dryRun':!![]});return{'method':_0x210b27(0x1a8),'url':_0x210b27(0x1b4),'body':_0x10a359,'description':_0x10a359[_0x210b27(0x1b3)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':'Would\x20create\x20'+_0x10a359[_0x210b27(0x1ca)][_0x210b27(0x1c0)]+_0x210b27(0x1c4)};},async 'execute'(_0x28d0ba){const _0x1396ed=a179_0x4f5273;ensureRunnableContext(_0x28d0ba[_0x1396ed(0x1a6)],_0x28d0ba[_0x1396ed(0x1cc)]);const _0x42bb42=_0x28d0ba[_0x1396ed(0x1af)]('yes'),_0x371c92=_0x28d0ba[_0x1396ed(0x1ad)](_0x1396ed(0x1a9)),_0x82f8bb=parsePaths(_0x28d0ba[_0x1396ed(0x1ad)]('paths')),_0x807a75=parseMenuSyncParams(_0x371c92);if(_0x42bb42){const _0x39ef92=await runMenuSyncCore(_0x28d0ba[_0x1396ed(0x1b2)],_0x28d0ba[_0x1396ed(0x1cf)],_0x82f8bb,_0x371c92);if(_0x39ef92[_0x1396ed(0x1b3)]){const _0x3b3396=getLocalPages();_0x3b3396['length']===0x0?writeCliSideChannelLine(_0x1396ed(0x191)):writeCliSideChannelLine(_0x1396ed(0x18d));}else writeCliSideChannelLine('✓\x20Menu\x20sync\x20completed:\x20'+_0x39ef92[_0x1396ed(0x1a4)]+_0x1396ed(0x1c2));return{'ok':!![],'data':_0x39ef92,'message':_0x39ef92[_0x1396ed(0x1b3)]?_0x1396ed(0x1ce):_0x1396ed(0x1be)+_0x39ef92['created']+_0x1396ed(0x1bb)};}if(_0x82f8bb[_0x1396ed(0x1c0)]>0x0)throw CliErrors[_0x1396ed(0x1d2)]('menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.',_0x1396ed(0x1d1));if(!isInteractive()&&_0x371c92)throw CliErrors['validation'](_0x1396ed(0x19c),_0x1396ed(0x1d1));requireInteractive(),writeCliSideChannelLine(_0x1396ed(0x1b8));const _0x438844=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x1c3a36,_0x485dd8,_0x5dda26;try{const _0x3972ec=await fetchMenuData(_0x28d0ba[_0x1396ed(0x1b2)],_0x28d0ba[_0x1396ed(0x1cf)]);_0x1c3a36=_0x3972ec[_0x1396ed(0x19d)],_0x485dd8=_0x3972ec[_0x1396ed(0x196)],_0x5dda26=_0x3972ec[_0x1396ed(0x192)],stopSpinner(_0x438844,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x50c6d0){stopSpinner(_0x438844,_0x1396ed(0x199),![]);throw CliErrors[_0x1396ed(0x1d2)](_0x50c6d0 instanceof Error?_0x50c6d0[_0x1396ed(0x1a7)]:_0x1396ed(0x199));}if(_0x1c3a36[_0x1396ed(0x1c0)]===0x0)return writeCliSideChannelLine(a179_0x29d165['yellow'](_0x1396ed(0x190))),{'ok':!![]};const _0x5aad15=buildCompareRows(_0x1c3a36,_0x485dd8);writeCliSideChannelLine(renderCompareTable(_0x5aad15)),writeCliSideChannelLine('');const _0x59c8cf=await selectPages(_0x1c3a36,_0x485dd8);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x29d165[_0x1396ed(0x1a1)]('\x20\x20✓\x20Selected:\x20'+_0x59c8cf['length']+'\x20page(s)'));const _0xcb5151=_0x807a75[_0x1396ed(0x1c3)]&&_0x807a75[_0x1396ed(0x1b1)];if(!_0xcb5151){writeCliSideChannelLine(renderSyncSummary(_0x59c8cf,_0x485dd8['size']>0x0));const _0x3acb4f=await askConfirm(_0x1396ed(0x18e));if(!_0x3acb4f)return writeCliSideChannelLine(a179_0x29d165['gray']('\x20\x20Cancelled.')),{'ok':!![]};}let _0xada97c=_0x807a75[_0x1396ed(0x1c3)],_0x226929=_0x807a75[_0x1396ed(0x1b1)];!_0xada97c&&!_0x807a75[_0x1396ed(0x1b6)]&&(_0xada97c=await askJsUrl());!_0x226929&&!_0x807a75[_0x1396ed(0x1b6)]&&(_0x226929=await askCssUrl());const _0x4326b4=await askConfirm(_0x807a75[_0x1396ed(0x1b6)]?_0x1396ed(0x1bc)+_0x59c8cf[_0x1396ed(0x1c0)]+_0x1396ed(0x1cd)+_0x807a75[_0x1396ed(0x1b6)]+'?':'\x20\x20Create\x20'+_0x59c8cf[_0x1396ed(0x1c0)]+'\x20menu(s)\x20with\x20JS:\x20'+_0xada97c+'\x20and\x20CSS:\x20'+_0x226929+'?');if(!_0x4326b4)return writeCliSideChannelLine(a179_0x29d165[_0x1396ed(0x19a)](_0x1396ed(0x194))),{'ok':!![]};const _0x264601=[_0xada97c,_0x226929][_0x1396ed(0x1ae)](_0x3a4416=>Boolean(_0x3a4416));_0x807a75[_0x1396ed(0x1b6)]&&_0x264601[_0x1396ed(0x1c0)]===0x0&&await assertSharedResourcesConfigured(_0x28d0ba[_0x1396ed(0x1b2)],_0x28d0ba[_0x1396ed(0x1cf)],_0x807a75[_0x1396ed(0x1b6)]);const _0x54d371=startSpinner(_0x1396ed(0x1ba)+_0x59c8cf[_0x1396ed(0x1c0)]+'\x20menu(s)...');try{const _0xb8d41a=_0x59c8cf[_0x1396ed(0x1a5)](_0x14996a=>resolvePage(_0x14996a,_0x807a75,_0x5dda26)),_0x3f3d72=await doCreateMenus(_0x28d0ba[_0x1396ed(0x1b2)],_0x28d0ba[_0x1396ed(0x1cf)],_0xb8d41a,_0x264601,_0x807a75[_0x1396ed(0x1b6)]?{'appName':_0x807a75[_0x1396ed(0x1b6)]}:undefined);return stopSpinner(_0x54d371,_0x1396ed(0x1b7)+_0x3f3d72['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x3f3d72,'message':_0x1396ed(0x1be)+_0x3f3d72['created']+_0x1396ed(0x1d3)+_0x3f3d72[_0x1396ed(0x1c1)]+_0x1396ed(0x1c9)};}catch(_0xcc7b39){stopSpinner(_0x54d371,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x1396ed(0x1d2)](_0xcc7b39 instanceof Error?_0xcc7b39['message']:_0x1396ed(0x1ac));}}};function ensureRunnableContext(_0xc63261,_0x42cce8){const _0x8a2922=a179_0x4f5273,_0x347b83=_0xc63261['appcode']?String(_0xc63261[_0x8a2922(0x1a3)])[_0x8a2922(0x1c5)]():'';if(!isInProject()&&!_0x42cce8&&!_0x347b83)throw CliErrors[_0x8a2922(0x1d2)](_0x8a2922(0x1b5)+_0x8a2922(0x1aa));}function a179_0x71fd(){const _0x2a51f8=['appcode','created','map','rawFlags','message','POST','params','Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.','string','Menu\x20creation\x20failed','str','filter','flag','boolean','cssUrl','appCode','skipped','/smartapi/menu/create','menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20','appName','Created\x20','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','sync','Creating\x20','\x20created.','\x20\x20Create\x20','Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync','Menu\x20sync\x20completed:\x20','7307880DKaVaI','length','failed','\x20menu(s)\x20created','jsUrl','\x20local\x20microfrontend\x20menu(s).','trim','2661471EvSxUO','1451700jwwDPi','yes','\x20failed.','targetPages','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','selectedAppName','\x20menu(s)\x20bound\x20to\x20','Menu\x20sync\x20skipped','cookie','paths','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','validation','\x20created,\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20\x20Continue\x20with\x20creation?','765224yGXzzN','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','onlineMenuList','123095NXpMoW','\x20\x20Cancelled.','84ICTqeZ','onlinePaths','6932OSCncm','13131LtJFmk','Failed\x20to\x20fetch\x20online\x20menu\x20list','gray','1730bhmViu','Non-interactive\x20menu\x20sync\x20requires\x20--yes.','localPages','2aKOktj','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','cyan','split'];a179_0x71fd=function(){return _0x2a51f8;};return a179_0x71fd();}function parsePaths(_0x2844e9){const _0x24a7ae=a179_0x4f5273;return[...new Set(_0x2844e9[_0x24a7ae(0x1a2)](',')[_0x24a7ae(0x1a5)](_0x4a84ce=>_0x4a84ce[_0x24a7ae(0x1c5)]())[_0x24a7ae(0x1ae)](Boolean))];}
1
+ const a179_0x1f6886=a179_0x50f5;(function(_0x3d0ac2,_0xb65ea5){const _0x24f006=a179_0x50f5,_0x50f29f=_0x3d0ac2();while(!![]){try{const _0x2c8bcd=parseInt(_0x24f006(0x17d))/0x1+-parseInt(_0x24f006(0x18b))/0x2*(parseInt(_0x24f006(0x159))/0x3)+parseInt(_0x24f006(0x162))/0x4*(parseInt(_0x24f006(0x15d))/0x5)+-parseInt(_0x24f006(0x16a))/0x6+-parseInt(_0x24f006(0x17e))/0x7*(parseInt(_0x24f006(0x171))/0x8)+parseInt(_0x24f006(0x158))/0x9+parseInt(_0x24f006(0x180))/0xa*(-parseInt(_0x24f006(0x194))/0xb);if(_0x2c8bcd===_0xb65ea5)break;else _0x50f29f['push'](_0x50f29f['shift']());}catch(_0x30f3ce){_0x50f29f['push'](_0x50f29f['shift']());}}}(a179_0xa406,0xf1b7d));import a179_0x52b630 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,resolvePage,runMenuSyncCore}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';import{isInProject}from'../../context.js';function a179_0x50f5(_0x1d5650,_0x1dc12b){_0x1d5650=_0x1d5650-0x155;const _0xa40681=a179_0xa406();let _0x50f54b=_0xa40681[_0x1d5650];return _0x50f54b;}function a179_0xa406(){const _0x40428d=['skipped','\x20menu(s)\x20with\x20JS:\x20','\x20created.','Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.','message','Tip:\x20For\x20frontend\x20subapps,\x20prefer\x20Agent-planned\x20menu\x20groups\x20and\x20shared\x20resources.\x20This\x20manual\x20sync\x20workflow\x20remains\x20available\x20as\x20a\x20fallback.','1507174LRfqtz','menu\x20sync\x20--paths\x20requires\x20--yes\x20for\x20execution.','sync','menu','validation','boolean','string','\x20local\x20microfrontend\x20menu(s).','\x20menu(s)...','15235cyLOtS','\x20\x20Continue\x20with\x20creation?','cookie','length','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Confirm\x20non-interactive\x20sync;\x20without\x20--paths,\x20create\x20all\x20missing\x20local\x20pages','Register\x20local\x20pages\x20as\x20platform\x20menus','rawFlags','selectedAppName','params','jsUrl','appName','POST','5620446dsIhch','3tUwcPV','trim','\x20menu(s)\x20created','Fetching\x20online\x20menu\x20list...','1514305XxuDjx','Failed\x20to\x20fetch\x20online\x20menu\x20list','/smartapi/menu/create','map','\x20\x20Cancelled.','16urUOPy','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','Menu\x20sync\x20skipped','created','\x20failed.','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','gray','\x20menu(s)\x20bound\x20to\x20','6611664sDkhJZ','\x20and\x20CSS:\x20','paths','Would\x20create\x20','flag','size','filter','136afkTTj','cssUrl','\x20\x20Create\x20','str','Prefer\x20appName\x20for\x20shared\x20subapp\x20resources\x20and\x20parentId\x20for\x20planned\x20groups.\x20','onlinePaths','\x20\x20✓\x20Selected:\x20','onlineMenuList','cyan','appcode','split','Creating\x20','1848612QAeOQX','55167meitjD','✓\x20Menu\x20sync\x20completed:\x20','5090zHsiWS','Menu\x20sync\x20completed:\x20','yes','JSON:\x20{\x22appName\x22:\x22store-app\x22,\x22parentId\x22:42,\x22visible\x22:false};\x20jsUrl\x20and\x20cssUrl\x20remain\x20available\x20for\x20individual\x20menu\x20resources.','appCode'];a179_0xa406=function(){return _0x40428d;};return a179_0xa406();}import{assertSharedResourcesConfigured}from'../../commands/menu/shared/subapp-assets.js';export const menuSync={'service':a179_0x1f6886(0x18e),'command':a179_0x1f6886(0x18d),'description':a179_0x1f6886(0x19b),'risk':'write','flags':[{'name':a179_0x1f6886(0x19e),'type':a179_0x1f6886(0x191),'description':a179_0x1f6886(0x175)+a179_0x1f6886(0x183)},{'name':a179_0x1f6886(0x16c),'type':a179_0x1f6886(0x191),'description':'Exact\x20comma-separated\x20local\x20page\x20paths\x20to\x20sync'},{'name':'yes','type':a179_0x1f6886(0x190),'description':a179_0x1f6886(0x19a)}],async 'dryRun'(_0x7ea108){const _0x408571=a179_0x1f6886;ensureRunnableContext(_0x7ea108[_0x408571(0x19c)],_0x7ea108[_0x408571(0x19d)]);const _0x5e3dac=await runMenuSyncCore(_0x7ea108[_0x408571(0x184)],_0x7ea108['cookie'],parsePaths(_0x7ea108[_0x408571(0x174)](_0x408571(0x16c))),_0x7ea108[_0x408571(0x174)](_0x408571(0x19e)),{'dryRun':!![]});return{'method':_0x408571(0x157),'url':_0x408571(0x15f),'body':_0x5e3dac,'description':_0x5e3dac[_0x408571(0x185)]?'No\x20local\x20microfrontend\x20menus\x20would\x20be\x20created.':_0x408571(0x16d)+_0x5e3dac['targetPages']['length']+_0x408571(0x192)};},async 'execute'(_0x1f12f4){const _0x1283c9=a179_0x1f6886;ensureRunnableContext(_0x1f12f4[_0x1283c9(0x19c)],_0x1f12f4[_0x1283c9(0x19d)]);const _0x31ba56=_0x1f12f4[_0x1283c9(0x16e)](_0x1283c9(0x182)),_0x1c2ecc=_0x1f12f4['str']('params'),_0x462a08=parsePaths(_0x1f12f4[_0x1283c9(0x174)]('paths')),_0x4fc88a=parseMenuSyncParams(_0x1c2ecc);if(_0x31ba56){const _0x4a556a=await runMenuSyncCore(_0x1f12f4['appCode'],_0x1f12f4[_0x1283c9(0x196)],_0x462a08,_0x1c2ecc);if(_0x4a556a[_0x1283c9(0x185)]){const _0x3636a7=getLocalPages();_0x3636a7[_0x1283c9(0x197)]===0x0?writeCliSideChannelLine(_0x1283c9(0x199)):writeCliSideChannelLine(_0x1283c9(0x163));}else writeCliSideChannelLine(_0x1283c9(0x17f)+_0x4a556a[_0x1283c9(0x165)]+_0x1283c9(0x15b));return{'ok':!![],'data':_0x4a556a,'message':_0x4a556a['skipped']?_0x1283c9(0x164):_0x1283c9(0x181)+_0x4a556a['created']+_0x1283c9(0x187)};}if(_0x462a08[_0x1283c9(0x197)]>0x0)throw CliErrors[_0x1283c9(0x18f)](_0x1283c9(0x18c),'Preview\x20with\x20--dry-run,\x20then\x20reuse\x20the\x20same\x20--paths\x20and\x20--params\x20with\x20--yes.');if(!isInteractive()&&_0x1c2ecc)throw CliErrors[_0x1283c9(0x18f)]('Non-interactive\x20menu\x20sync\x20requires\x20--yes.',_0x1283c9(0x188));requireInteractive(),writeCliSideChannelLine(_0x1283c9(0x18a));const _0x4e901c=startSpinner(_0x1283c9(0x15c));let _0x153cda,_0x59cc5c,_0x331c89;try{const _0x412f54=await fetchMenuData(_0x1f12f4['appCode'],_0x1f12f4[_0x1283c9(0x196)]);_0x153cda=_0x412f54['localPages'],_0x59cc5c=_0x412f54[_0x1283c9(0x176)],_0x331c89=_0x412f54[_0x1283c9(0x178)],stopSpinner(_0x4e901c,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x4e4d3d){stopSpinner(_0x4e901c,_0x1283c9(0x15e),![]);throw CliErrors[_0x1283c9(0x18f)](_0x4e4d3d instanceof Error?_0x4e4d3d[_0x1283c9(0x189)]:_0x1283c9(0x15e));}if(_0x153cda[_0x1283c9(0x197)]===0x0)return writeCliSideChannelLine(a179_0x52b630['yellow'](_0x1283c9(0x167))),{'ok':!![]};const _0x2cc7a3=buildCompareRows(_0x153cda,_0x59cc5c);writeCliSideChannelLine(renderCompareTable(_0x2cc7a3)),writeCliSideChannelLine('');const _0x3b66b1=await selectPages(_0x153cda,_0x59cc5c);writeCliSideChannelLine(''),writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x179)](_0x1283c9(0x177)+_0x3b66b1[_0x1283c9(0x197)]+'\x20page(s)'));const _0x46e868=_0x4fc88a[_0x1283c9(0x155)]&&_0x4fc88a[_0x1283c9(0x172)];if(!_0x46e868){writeCliSideChannelLine(renderSyncSummary(_0x3b66b1,_0x59cc5c[_0x1283c9(0x16f)]>0x0));const _0x3ef60e=await askConfirm(_0x1283c9(0x195));if(!_0x3ef60e)return writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x168)](_0x1283c9(0x161))),{'ok':!![]};}let _0x14b6ea=_0x4fc88a[_0x1283c9(0x155)],_0x326076=_0x4fc88a[_0x1283c9(0x172)];!_0x14b6ea&&!_0x4fc88a[_0x1283c9(0x156)]&&(_0x14b6ea=await askJsUrl());!_0x326076&&!_0x4fc88a['appName']&&(_0x326076=await askCssUrl());const _0x4c7cd5=await askConfirm(_0x4fc88a[_0x1283c9(0x156)]?_0x1283c9(0x173)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x169)+_0x4fc88a[_0x1283c9(0x156)]+'?':_0x1283c9(0x173)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x186)+_0x14b6ea+_0x1283c9(0x16b)+_0x326076+'?');if(!_0x4c7cd5)return writeCliSideChannelLine(a179_0x52b630[_0x1283c9(0x168)](_0x1283c9(0x161))),{'ok':!![]};const _0x5e4a94=[_0x14b6ea,_0x326076][_0x1283c9(0x170)](_0x121713=>Boolean(_0x121713));_0x4fc88a['appName']&&_0x5e4a94[_0x1283c9(0x197)]===0x0&&await assertSharedResourcesConfigured(_0x1f12f4[_0x1283c9(0x184)],_0x1f12f4[_0x1283c9(0x196)],_0x4fc88a['appName']);const _0x29192c=startSpinner(_0x1283c9(0x17c)+_0x3b66b1[_0x1283c9(0x197)]+_0x1283c9(0x193));try{const _0x312372=_0x3b66b1['map'](_0x2a286d=>resolvePage(_0x2a286d,_0x4fc88a,_0x331c89)),_0x44a007=await doCreateMenus(_0x1f12f4[_0x1283c9(0x184)],_0x1f12f4['cookie'],_0x312372,_0x5e4a94,_0x4fc88a[_0x1283c9(0x156)]?{'appName':_0x4fc88a[_0x1283c9(0x156)]}:undefined);return stopSpinner(_0x29192c,'Created\x20'+_0x44a007['created']+'\x20menu(s)',!![]),{'ok':!![],'data':_0x44a007,'message':_0x1283c9(0x181)+_0x44a007[_0x1283c9(0x165)]+'\x20created,\x20'+_0x44a007['failed']+_0x1283c9(0x166)};}catch(_0x5673b7){stopSpinner(_0x29192c,_0x1283c9(0x198),![]);throw CliErrors[_0x1283c9(0x18f)](_0x5673b7 instanceof Error?_0x5673b7[_0x1283c9(0x189)]:_0x1283c9(0x198));}}};function ensureRunnableContext(_0x2cbdcd,_0x1196ef){const _0x5a6d34=a179_0x1f6886,_0x317ed0=_0x2cbdcd[_0x5a6d34(0x17a)]?String(_0x2cbdcd['appcode'])[_0x5a6d34(0x15a)]():'';if(!isInProject()&&!_0x1196ef&&!_0x317ed0)throw CliErrors[_0x5a6d34(0x18f)]('menu\x20sync\x20requires\x20a\x20project\x20context\x20or\x20explicit\x20--appcode.\x20'+'Run\x20inside\x20a\x20directory\x20with\x20.rabetbase.json,\x20or\x20pass\x20--appcode\x20<code>.');}function parsePaths(_0x590f5f){const _0xc06e37=a179_0x1f6886;return[...new Set(_0x590f5f[_0xc06e37(0x17b)](',')[_0xc06e37(0x160)](_0x24a0b8=>_0x24a0b8[_0xc06e37(0x15a)]())[_0xc06e37(0x170)](Boolean))];}