@lovrabet/rabetbase-cli 2.5.9-beta.1 → 2.5.9

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 (376) 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/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/kb-management-client.js +1 -1
  301. package/lib/core/kb-search-client.js +1 -1
  302. package/lib/core/page/file-system.js +1 -1
  303. package/lib/core/page/hash.js +1 -1
  304. package/lib/core/page/lock.js +1 -1
  305. package/lib/core/page/lr-smart-jsx.js +1 -1
  306. package/lib/core/sql-index-auditor.js +1 -1
  307. package/lib/core/sql-sync/config.js +1 -1
  308. package/lib/core/sql-sync/file-system.js +1 -1
  309. package/lib/core/sql-sync/hash.js +1 -1
  310. package/lib/core/sql-sync/lock.js +1 -1
  311. package/lib/core/sql-sync/utils.js +1 -1
  312. package/lib/core/sql-validator.js +1 -1
  313. package/lib/errors.js +1 -1
  314. package/lib/framework/build-all-flags.js +1 -1
  315. package/lib/framework/error-output.js +1 -1
  316. package/lib/framework/explicit-yes.js +1 -1
  317. package/lib/framework/flags.js +1 -1
  318. package/lib/framework/help.js +1 -1
  319. package/lib/framework/index.js +1 -1
  320. package/lib/framework/output.js +1 -1
  321. package/lib/framework/response.js +1 -1
  322. package/lib/framework/runner-alias.js +1 -1
  323. package/lib/framework/runner.js +1 -1
  324. package/lib/framework/schema-export.js +1 -1
  325. package/lib/framework/supported-flags.js +1 -1
  326. package/lib/framework/types.js +1 -1
  327. package/lib/generated/build-info.d.ts +4 -4
  328. package/lib/generated/build-info.js +1 -1
  329. package/lib/generated/official-routing.js +1 -1
  330. package/lib/generated/routing-contract.js +1 -1
  331. package/lib/help.js +1 -1
  332. package/lib/postinstall.js +1 -1
  333. package/lib/runtime/confirmation.js +1 -1
  334. package/lib/runtime/event.js +1 -1
  335. package/lib/runtime/index.js +1 -1
  336. package/lib/runtime/queue.js +1 -1
  337. package/lib/runtime/resolve.js +1 -1
  338. package/lib/services/dataset-design/checkpoint.js +1 -1
  339. package/lib/services/dataset-design/commands.js +1 -1
  340. package/lib/services/dataset-design/contract.js +1 -1
  341. package/lib/skills/builtin-skill.js +1 -1
  342. package/lib/skills/main.js +1 -1
  343. package/lib/skills/npx-skills-add.js +1 -1
  344. package/lib/skills/skill-presence.js +1 -1
  345. package/lib/telemetry/cli-command-trace.js +1 -1
  346. package/lib/telemetry/cli-help-trace.js +1 -1
  347. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  348. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  349. package/lib/telemetry/send-cli-trace-log.js +1 -1
  350. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  375. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  376. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x2d0a25,_0xecbbf5){const _0x7eeab=a175_0x4ba3,_0x2a1f59=_0x2d0a25();while(!![]){try{const _0x1b0b96=parseInt(_0x7eeab(0x139))/0x1+parseInt(_0x7eeab(0x13d))/0x2+parseInt(_0x7eeab(0x132))/0x3+parseInt(_0x7eeab(0x119))/0x4*(-parseInt(_0x7eeab(0x125))/0x5)+parseInt(_0x7eeab(0x113))/0x6+parseInt(_0x7eeab(0x11d))/0x7*(-parseInt(_0x7eeab(0x12d))/0x8)+-parseInt(_0x7eeab(0x140))/0x9;if(_0x1b0b96===_0xecbbf5)break;else _0x2a1f59['push'](_0x2a1f59['shift']());}catch(_0x55dbc7){_0x2a1f59['push'](_0x2a1f59['shift']());}}}(a175_0xa434,0x1cbdf));import{createHash}from'node:crypto';function a175_0xa434(){const _0x1686ea=['updateUserId','item','288oyvpYK','valid','pageType','parentId','length','543060iZyZxJ','updateUserName','depth','verbose','update','values','visible','46388tZUFAU','datasetId','filter','sha256:','134384rrHZET','childrenIds','children','957339EteXGL','resources','updateTime','isArray','label','1010094KlFwvV','extend','resourcesValid','isFinite','pageId','number','178236AZDkdW','map','sha256','hex','37779WoswgR','POSITIVE_INFINITY','parse','datasetCode','stringify','url','path','string','5CCjBye','modelType','type','sort','push','menus'];a175_0xa434=function(){return _0x1686ea;};return a175_0xa434();}import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x574cce,_0x326ee7,_0x4dbb00={}){const _0x4fcd1e=a175_0x4ba3,_0x5a2f5c=await getMenuTree(_0x574cce,_0x326ee7);return buildMenuSnapshot(Array[_0x4fcd1e(0x111)](_0x5a2f5c)?_0x5a2f5c:[],_0x4dbb00);}export function buildMenuSnapshot(_0xa33690,_0x4ef032={}){const _0x354cf5=a175_0x4ba3,_0x2ab0cd=flattenMenuItems(_0xa33690,{'verbose':_0x4ef032[_0x354cf5(0x135)]===!![],'parentId':null,'depth':0x0}),_0x3214d1=new Map(_0x2ab0cd['map'](_0x9a6b3c=>[_0x9a6b3c['id'],_0x9a6b3c])),_0x4c83ea=createHash(_0x354cf5(0x11b))[_0x354cf5(0x136)](JSON[_0x354cf5(0x121)](_0x2ab0cd['map'](toHashInput)))['digest'](_0x354cf5(0x11c));return{'total':_0x2ab0cd[_0x354cf5(0x131)],'hash':_0x354cf5(0x13c)+_0x4c83ea,'menus':_0x2ab0cd,'byId':_0x3214d1};}export function toProcessedMenuItem(_0x2c2907){const _0x206049=a175_0x4ba3;return{'id':_0x2c2907['id'],'path':_0x2c2907[_0x206049(0x123)],'label':_0x2c2907['label'],'resources':[..._0x2c2907[_0x206049(0x141)]],'extend':_0x2c2907[_0x206049(0x114)]??null,'type':_0x2c2907['type'],'parentId':_0x2c2907[_0x206049(0x130)]};}export function toMenuListItem(_0x21f4d1){const {modelType:_0x19c8f3,datasetId:_0x527205,datasetCode:_0x108e5e,resourcesValid:_0x4ab80b,..._0x30ad29}=_0x21f4d1;return _0x30ad29;}export function getChildren(_0x85bcc0,_0x56a205){const _0x222de7=a175_0x4ba3;return _0x85bcc0[_0x222de7(0x12a)][_0x222de7(0x13b)](_0x112b7a=>_0x112b7a[_0x222de7(0x130)]===_0x56a205);}function flattenMenuItems(_0x259edb,_0xce9181){const _0x2c8cd5=a175_0x4ba3,_0x553499=sortMenuItems(_0x259edb),_0x158fcc=[];for(const _0x4ffc24 of _0x553499){const _0x3e5152=sortMenuItems(Array[_0x2c8cd5(0x111)](_0x4ffc24[_0x2c8cd5(0x13f)])?_0x4ffc24[_0x2c8cd5(0x13f)]:[]);_0x158fcc[_0x2c8cd5(0x129)](toMenuFact(_0x4ffc24,_0x3e5152,_0xce9181)),_0x3e5152[_0x2c8cd5(0x131)]>0x0&&_0x158fcc[_0x2c8cd5(0x129)](...flattenMenuItems(_0x3e5152,{'verbose':_0xce9181[_0x2c8cd5(0x135)],'parentId':_0x4ffc24['id'],'depth':_0xce9181[_0x2c8cd5(0x134)]+0x1}));}return _0x158fcc;}function sortMenuItems(_0xfe30c){const _0x2d702f=a175_0x4ba3;return _0xfe30c[_0x2d702f(0x11a)]((_0x3b59ce,_0x1ae0c7)=>({'item':_0x3b59ce,'index':_0x1ae0c7}))['sort']((_0x4de789,_0x4911cd)=>{const _0x46a75a=_0x2d702f,_0x16a45b=normalizeSort(_0x4de789[_0x46a75a(0x12c)][_0x46a75a(0x128)]),_0x5acd8d=normalizeSort(_0x4911cd[_0x46a75a(0x12c)]['sort']);if(_0x16a45b!==_0x5acd8d)return _0x16a45b-_0x5acd8d;return _0x4de789['index']-_0x4911cd['index'];})[_0x2d702f(0x11a)](({item:_0x31c384})=>_0x31c384);}function toMenuFact(_0x5726ca,_0x25e60e,_0x393f06){const _0x52f58b=a175_0x4ba3,_0x40fcb1=normalizeResourceValue(_0x5726ca[_0x52f58b(0x114)]?.[_0x52f58b(0x141)]),_0xaa08de={'id':_0x5726ca['id'],'parentId':_0x393f06[_0x52f58b(0x130)],'depth':_0x393f06[_0x52f58b(0x134)],'label':normalizeString(_0x5726ca[_0x52f58b(0x112)]),'path':normalizeString(_0x5726ca['path']),'url':normalizeString(_0x5726ca[_0x52f58b(0x122)]),'type':normalizeString(_0x5726ca[_0x52f58b(0x127)]),'visible':typeof _0x5726ca['visible']==='boolean'?_0x5726ca[_0x52f58b(0x138)]:null,'sort':typeof _0x5726ca['sort']==='number'&&Number['isFinite'](_0x5726ca['sort'])?_0x5726ca[_0x52f58b(0x128)]:null,'resources':_0x40fcb1[_0x52f58b(0x137)],'resourcesValid':_0x40fcb1[_0x52f58b(0x12e)],'childrenIds':_0x25e60e[_0x52f58b(0x11a)](_0x3f1d58=>_0x3f1d58['id']),'childrenCount':_0x25e60e[_0x52f58b(0x131)],'pageId':normalizeNullableNumber(_0x5726ca[_0x52f58b(0x117)]),'pageType':normalizeString(_0x5726ca[_0x52f58b(0x12f)]),'modelType':normalizeString(_0x5726ca['modelType']),'datasetId':normalizeNullableNumber(_0x5726ca['datasetId']),'datasetCode':normalizeString(_0x5726ca[_0x52f58b(0x120)]),'updateUserId':normalizeNullableString(_0x5726ca[_0x52f58b(0x12b)]),'updateUserName':normalizeNullableString(_0x5726ca[_0x52f58b(0x133)]),'updateTime':normalizeNullableTimestamp(_0x5726ca[_0x52f58b(0x142)])};return _0x393f06[_0x52f58b(0x135)]&&(_0xaa08de['extend']=_0x5726ca['extend']??null),_0xaa08de;}function toHashInput(_0x27e679){const _0x3878e4=a175_0x4ba3;return{'id':_0x27e679['id'],'parentId':_0x27e679[_0x3878e4(0x130)],'label':_0x27e679[_0x3878e4(0x112)],'path':_0x27e679[_0x3878e4(0x123)],'url':_0x27e679[_0x3878e4(0x122)],'type':_0x27e679[_0x3878e4(0x127)],'visible':_0x27e679['visible'],'sort':_0x27e679[_0x3878e4(0x128)],'resources':_0x27e679[_0x3878e4(0x141)],'resourcesValid':_0x27e679[_0x3878e4(0x115)],'childrenIds':_0x27e679[_0x3878e4(0x13e)],'pageId':_0x27e679['pageId'],'pageType':_0x27e679[_0x3878e4(0x12f)],'modelType':_0x27e679[_0x3878e4(0x126)],'datasetId':_0x27e679[_0x3878e4(0x13a)],'datasetCode':_0x27e679[_0x3878e4(0x120)],'updateUserId':_0x27e679[_0x3878e4(0x12b)],'updateUserName':_0x27e679[_0x3878e4(0x133)],'updateTime':_0x27e679[_0x3878e4(0x142)]};}function normalizeSort(_0x360d47){const _0x3d20e0=a175_0x4ba3;return typeof _0x360d47==='number'&&Number[_0x3d20e0(0x116)](_0x360d47)?_0x360d47:Number[_0x3d20e0(0x11e)];}function normalizeString(_0x4e6fbe){const _0xfa5487=a175_0x4ba3;return typeof _0x4e6fbe===_0xfa5487(0x124)?_0x4e6fbe:'';}function normalizeNullableNumber(_0x5693e9){const _0x227636=a175_0x4ba3;return typeof _0x5693e9==='number'&&Number[_0x227636(0x116)](_0x5693e9)?_0x5693e9:null;}function normalizeNullableString(_0x75910a){const _0x27abc2=a175_0x4ba3;return typeof _0x75910a===_0x27abc2(0x124)&&_0x75910a[_0x27abc2(0x131)]>0x0?_0x75910a:null;}function normalizeNullableTimestamp(_0x3638b0){const _0xac87f7=a175_0x4ba3;if(typeof _0x3638b0===_0xac87f7(0x124))return _0x3638b0[_0xac87f7(0x131)]>0x0?_0x3638b0:null;return typeof _0x3638b0===_0xac87f7(0x118)&&Number[_0xac87f7(0x116)](_0x3638b0)?_0x3638b0:null;}export function normalizeResources(_0x2a9f55){return normalizeResourceValue(_0x2a9f55)['values'];}function a175_0x4ba3(_0x308830,_0x4ce363){_0x308830=_0x308830-0x111;const _0xa4346e=a175_0xa434();let _0x4ba388=_0xa4346e[_0x308830];return _0x4ba388;}function normalizeResourceValue(_0x3a5e5e){const _0x290c5e=a175_0x4ba3;if(_0x3a5e5e==null)return{'values':[],'valid':!![]};if(Array['isArray'](_0x3a5e5e))return{'values':_0x3a5e5e[_0x290c5e(0x11a)](String),'valid':!![]};if(typeof _0x3a5e5e!=='string')return{'values':[],'valid':![]};try{const _0x106364=JSON[_0x290c5e(0x11f)](_0x3a5e5e);return Array[_0x290c5e(0x111)](_0x106364)?{'values':_0x106364[_0x290c5e(0x11a)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
1
+ (function(_0x2908bf,_0x305a8a){const _0x1877cd=a175_0x7be3,_0x3206fc=_0x2908bf();while(!![]){try{const _0x2f6e81=parseInt(_0x1877cd(0xe6))/0x1*(-parseInt(_0x1877cd(0xf2))/0x2)+parseInt(_0x1877cd(0xfc))/0x3*(-parseInt(_0x1877cd(0x108))/0x4)+parseInt(_0x1877cd(0x107))/0x5+-parseInt(_0x1877cd(0x10d))/0x6*(parseInt(_0x1877cd(0xec))/0x7)+-parseInt(_0x1877cd(0xfb))/0x8*(parseInt(_0x1877cd(0xe8))/0x9)+parseInt(_0x1877cd(0x103))/0xa*(-parseInt(_0x1877cd(0xed))/0xb)+-parseInt(_0x1877cd(0x10e))/0xc*(-parseInt(_0x1877cd(0x101))/0xd);if(_0x2f6e81===_0x305a8a)break;else _0x3206fc['push'](_0x3206fc['shift']());}catch(_0x2ffd42){_0x3206fc['push'](_0x3206fc['shift']());}}}(a175_0x4807,0x1ebeb));import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x3270ad,_0x28b73e,_0x37e73f={}){const _0x3f7b51=a175_0x7be3,_0x587ea1=await getMenuTree(_0x3270ad,_0x28b73e);return buildMenuSnapshot(Array[_0x3f7b51(0xf7)](_0x587ea1)?_0x587ea1:[],_0x37e73f);}export function buildMenuSnapshot(_0x4edf27,_0x32fbf8={}){const _0x14c5ff=a175_0x7be3,_0xedcf7=flattenMenuItems(_0x4edf27,{'verbose':_0x32fbf8[_0x14c5ff(0xf1)]===!![],'parentId':null,'depth':0x0}),_0x4a8713=new Map(_0xedcf7['map'](_0x181ba8=>[_0x181ba8['id'],_0x181ba8])),_0x1e866b=createHash('sha256')[_0x14c5ff(0xf5)](JSON['stringify'](_0xedcf7[_0x14c5ff(0xff)](toHashInput)))['digest'](_0x14c5ff(0xfa));return{'total':_0xedcf7[_0x14c5ff(0xee)],'hash':'sha256:'+_0x1e866b,'menus':_0xedcf7,'byId':_0x4a8713};}export function toProcessedMenuItem(_0xae1b76){const _0x3fa6ed=a175_0x7be3;return{'id':_0xae1b76['id'],'path':_0xae1b76[_0x3fa6ed(0x111)],'label':_0xae1b76[_0x3fa6ed(0xe5)],'resources':[..._0xae1b76[_0x3fa6ed(0x10a)]],'extend':_0xae1b76[_0x3fa6ed(0x105)]??null,'type':_0xae1b76[_0x3fa6ed(0xef)],'parentId':_0xae1b76[_0x3fa6ed(0xe7)]};}export function toMenuListItem(_0x44dc7f){const {modelType:_0xf8cb15,datasetId:_0x233952,datasetCode:_0x17fecd,resourcesValid:_0x1eff24,..._0x44cc5a}=_0x44dc7f;return _0x44cc5a;}export function getChildren(_0x52f80e,_0x5b1eb0){const _0x47586a=a175_0x7be3;return _0x52f80e['menus'][_0x47586a(0x106)](_0x529ae0=>_0x529ae0[_0x47586a(0xe7)]===_0x5b1eb0);}function flattenMenuItems(_0x4a32e9,_0x3e761d){const _0x4395e8=a175_0x7be3,_0x10663c=sortMenuItems(_0x4a32e9),_0x3d465d=[];for(const _0x1de0a5 of _0x10663c){const _0x20a9ef=sortMenuItems(Array[_0x4395e8(0xf7)](_0x1de0a5[_0x4395e8(0xe3)])?_0x1de0a5[_0x4395e8(0xe3)]:[]);_0x3d465d[_0x4395e8(0xeb)](toMenuFact(_0x1de0a5,_0x20a9ef,_0x3e761d)),_0x20a9ef[_0x4395e8(0xee)]>0x0&&_0x3d465d[_0x4395e8(0xeb)](...flattenMenuItems(_0x20a9ef,{'verbose':_0x3e761d['verbose'],'parentId':_0x1de0a5['id'],'depth':_0x3e761d[_0x4395e8(0xf8)]+0x1}));}return _0x3d465d;}function sortMenuItems(_0x23c15c){const _0x54997b=a175_0x7be3;return _0x23c15c[_0x54997b(0xff)]((_0x32e6c2,_0x27faa3)=>({'item':_0x32e6c2,'index':_0x27faa3}))[_0x54997b(0x112)]((_0x4fb97e,_0x405d28)=>{const _0x4e8bc2=_0x54997b,_0x2071a8=normalizeSort(_0x4fb97e[_0x4e8bc2(0xe4)][_0x4e8bc2(0x112)]),_0x5697fd=normalizeSort(_0x405d28['item'][_0x4e8bc2(0x112)]);if(_0x2071a8!==_0x5697fd)return _0x2071a8-_0x5697fd;return _0x4fb97e['index']-_0x405d28['index'];})[_0x54997b(0xff)](({item:_0x484f3c})=>_0x484f3c);}function toMenuFact(_0x3c78d7,_0x477834,_0x212dab){const _0xf9700c=a175_0x7be3,_0x258e83=normalizeResourceValue(_0x3c78d7[_0xf9700c(0x105)]?.[_0xf9700c(0x10a)]),_0x3c2719={'id':_0x3c78d7['id'],'parentId':_0x212dab[_0xf9700c(0xe7)],'depth':_0x212dab[_0xf9700c(0xf8)],'label':normalizeString(_0x3c78d7[_0xf9700c(0xe5)]),'path':normalizeString(_0x3c78d7[_0xf9700c(0x111)]),'url':normalizeString(_0x3c78d7[_0xf9700c(0xe2)]),'type':normalizeString(_0x3c78d7[_0xf9700c(0xef)]),'visible':typeof _0x3c78d7[_0xf9700c(0xf4)]===_0xf9700c(0x10b)?_0x3c78d7[_0xf9700c(0xf4)]:null,'sort':typeof _0x3c78d7[_0xf9700c(0x112)]===_0xf9700c(0x102)&&Number[_0xf9700c(0x104)](_0x3c78d7['sort'])?_0x3c78d7['sort']:null,'resources':_0x258e83['values'],'resourcesValid':_0x258e83[_0xf9700c(0xf6)],'childrenIds':_0x477834[_0xf9700c(0xff)](_0x4f710f=>_0x4f710f['id']),'childrenCount':_0x477834[_0xf9700c(0xee)],'pageId':normalizeNullableNumber(_0x3c78d7[_0xf9700c(0x10f)]),'pageType':normalizeString(_0x3c78d7['pageType']),'modelType':normalizeString(_0x3c78d7[_0xf9700c(0x10c)]),'datasetId':normalizeNullableNumber(_0x3c78d7[_0xf9700c(0xea)]),'datasetCode':normalizeString(_0x3c78d7[_0xf9700c(0xf0)]),'updateUserId':normalizeNullableString(_0x3c78d7[_0xf9700c(0xf3)]),'updateUserName':normalizeNullableString(_0x3c78d7[_0xf9700c(0x110)]),'updateTime':normalizeNullableTimestamp(_0x3c78d7[_0xf9700c(0x109)])};return _0x212dab[_0xf9700c(0xf1)]&&(_0x3c2719['extend']=_0x3c78d7[_0xf9700c(0x105)]??null),_0x3c2719;}function toHashInput(_0x57a370){const _0x2a3e9c=a175_0x7be3;return{'id':_0x57a370['id'],'parentId':_0x57a370[_0x2a3e9c(0xe7)],'label':_0x57a370[_0x2a3e9c(0xe5)],'path':_0x57a370[_0x2a3e9c(0x111)],'url':_0x57a370[_0x2a3e9c(0xe2)],'type':_0x57a370[_0x2a3e9c(0xef)],'visible':_0x57a370['visible'],'sort':_0x57a370['sort'],'resources':_0x57a370[_0x2a3e9c(0x10a)],'resourcesValid':_0x57a370[_0x2a3e9c(0xfe)],'childrenIds':_0x57a370[_0x2a3e9c(0xf9)],'pageId':_0x57a370[_0x2a3e9c(0x10f)],'pageType':_0x57a370['pageType'],'modelType':_0x57a370[_0x2a3e9c(0x10c)],'datasetId':_0x57a370[_0x2a3e9c(0xea)],'datasetCode':_0x57a370[_0x2a3e9c(0xf0)],'updateUserId':_0x57a370['updateUserId'],'updateUserName':_0x57a370[_0x2a3e9c(0x110)],'updateTime':_0x57a370[_0x2a3e9c(0x109)]};}function normalizeSort(_0x49a14b){const _0xe13eb9=a175_0x7be3;return typeof _0x49a14b==='number'&&Number[_0xe13eb9(0x104)](_0x49a14b)?_0x49a14b:Number['POSITIVE_INFINITY'];}function normalizeString(_0x4611a9){const _0x19465d=a175_0x7be3;return typeof _0x4611a9===_0x19465d(0xfd)?_0x4611a9:'';}function normalizeNullableNumber(_0x59968f){const _0x1b23de=a175_0x7be3;return typeof _0x59968f==='number'&&Number[_0x1b23de(0x104)](_0x59968f)?_0x59968f:null;}function normalizeNullableString(_0x253dfd){const _0x50f8dd=a175_0x7be3;return typeof _0x253dfd===_0x50f8dd(0xfd)&&_0x253dfd[_0x50f8dd(0xee)]>0x0?_0x253dfd:null;}function a175_0x4807(){const _0x2492ef=['datasetId','push','308fVIMdE','570845toogZD','length','type','datasetCode','verbose','7966nDjzQh','updateUserId','visible','update','valid','isArray','depth','childrenIds','hex','64VxFNTr','942YAsfHQ','string','resourcesValid','map','values','312949zBkzHn','number','10koKqjn','isFinite','extend','filter','1230300TjkIZD','1988XoNTRt','updateTime','resources','boolean','modelType','30108lmqQfe','300QZYhzv','pageId','updateUserName','path','sort','url','children','item','label','55RuZkrb','parentId','83412tDhZZD','parse'];a175_0x4807=function(){return _0x2492ef;};return a175_0x4807();}function normalizeNullableTimestamp(_0x3a1085){const _0x135b12=a175_0x7be3;if(typeof _0x3a1085==='string')return _0x3a1085[_0x135b12(0xee)]>0x0?_0x3a1085:null;return typeof _0x3a1085===_0x135b12(0x102)&&Number[_0x135b12(0x104)](_0x3a1085)?_0x3a1085:null;}function a175_0x7be3(_0x2971c2,_0x183b32){_0x2971c2=_0x2971c2-0xe2;const _0x4807f8=a175_0x4807();let _0x7be31d=_0x4807f8[_0x2971c2];return _0x7be31d;}export function normalizeResources(_0x57638c){const _0x5ae5bb=a175_0x7be3;return normalizeResourceValue(_0x57638c)[_0x5ae5bb(0x100)];}function normalizeResourceValue(_0x2968a3){const _0x1082ca=a175_0x7be3;if(_0x2968a3==null)return{'values':[],'valid':!![]};if(Array['isArray'](_0x2968a3))return{'values':_0x2968a3[_0x1082ca(0xff)](String),'valid':!![]};if(typeof _0x2968a3!==_0x1082ca(0xfd))return{'values':[],'valid':![]};try{const _0x33ee61=JSON[_0x1082ca(0xe9)](_0x2968a3);return Array['isArray'](_0x33ee61)?{'values':_0x33ee61[_0x1082ca(0xff)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
@@ -1 +1 @@
1
- (function(_0x42dea1,_0x3c7ca3){var _0x131b9f=a176_0x7550,_0x22a8c6=_0x42dea1();while(!![]){try{var _0x239798=-parseInt(_0x131b9f(0x163))/0x1+-parseInt(_0x131b9f(0x16b))/0x2*(parseInt(_0x131b9f(0x166))/0x3)+parseInt(_0x131b9f(0x16d))/0x4*(-parseInt(_0x131b9f(0x169))/0x5)+-parseInt(_0x131b9f(0x168))/0x6*(-parseInt(_0x131b9f(0x164))/0x7)+parseInt(_0x131b9f(0x165))/0x8*(-parseInt(_0x131b9f(0x16c))/0x9)+parseInt(_0x131b9f(0x167))/0xa+parseInt(_0x131b9f(0x16a))/0xb;if(_0x239798===_0x3c7ca3)break;else _0x22a8c6['push'](_0x22a8c6['shift']());}catch(_0x1fe119){_0x22a8c6['push'](_0x22a8c6['shift']());}}}(a176_0x3f8a,0xd6203));export*from'../../../commands/menu/shared/types.js';function a176_0x7550(_0x5612b9,_0x541ef9){_0x5612b9=_0x5612b9-0x163;var _0x3f8a62=a176_0x3f8a();var _0x7550e1=_0x3f8a62[_0x5612b9];return _0x7550e1;}export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';function a176_0x3f8a(){var _0xada02=['1193256yqvVgY','63jQNbct','4950620rsURCC','264KBaBsq','10195VKqJjS','37444055wShHAX','119602zCFkEb','9zhlSzl','3092cfZKgn','986663qMiDBc','150465zaUTBd'];a176_0x3f8a=function(){return _0xada02;};return a176_0x3f8a();}export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
1
+ (function(_0x9ad301,_0x4c860e){var _0x124a03=a176_0xbb38,_0x58aafd=_0x9ad301();while(!![]){try{var _0x1853ab=parseInt(_0x124a03(0x1d0))/0x1+parseInt(_0x124a03(0x1c7))/0x2*(-parseInt(_0x124a03(0x1c8))/0x3)+parseInt(_0x124a03(0x1c6))/0x4*(parseInt(_0x124a03(0x1cf))/0x5)+-parseInt(_0x124a03(0x1cc))/0x6*(-parseInt(_0x124a03(0x1cb))/0x7)+-parseInt(_0x124a03(0x1ca))/0x8*(-parseInt(_0x124a03(0x1ce))/0x9)+parseInt(_0x124a03(0x1d1))/0xa*(-parseInt(_0x124a03(0x1cd))/0xb)+parseInt(_0x124a03(0x1c9))/0xc;if(_0x1853ab===_0x4c860e)break;else _0x58aafd['push'](_0x58aafd['shift']());}catch(_0x34f9d9){_0x58aafd['push'](_0x58aafd['shift']());}}}(a176_0xf63a,0xeb135));export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';function a176_0xbb38(_0x31658f,_0x3a2675){_0x31658f=_0x31658f-0x1c6;var _0xf63a29=a176_0xf63a();var _0xbb381d=_0xf63a29[_0x31658f];return _0xbb381d;}export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';function a176_0xf63a(){var _0x1b09d2=['14umWMzE','4061526AUiQlC','132MTVVED','90198OKEwxL','75620YSjdtz','9487xlndFN','1525190cReInq','228RNHyIa','164KyWgAP','6789pXczvX','259920HkYQlW','584VyVBoh'];a176_0xf63a=function(){return _0x1b09d2;};return a176_0xf63a();}
@@ -1 +1 @@
1
- (function(_0x1a9b27,_0xad9bce){const _0x88805a=a177_0x28b9,_0xc14766=_0x1a9b27();while(!![]){try{const _0x354c85=parseInt(_0x88805a(0x167))/0x1*(parseInt(_0x88805a(0x163))/0x2)+parseInt(_0x88805a(0x172))/0x3+-parseInt(_0x88805a(0x14b))/0x4+parseInt(_0x88805a(0x154))/0x5+-parseInt(_0x88805a(0x14a))/0x6+parseInt(_0x88805a(0x14f))/0x7*(parseInt(_0x88805a(0x15f))/0x8)+parseInt(_0x88805a(0x153))/0x9*(-parseInt(_0x88805a(0x164))/0xa);if(_0x354c85===_0xad9bce)break;else _0xc14766['push'](_0xc14766['shift']());}catch(_0x2bf322){_0xc14766['push'](_0xc14766['shift']());}}}(a177_0x46d4,0xae5ba));import a177_0x11e6c5 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a177_0x189ad1 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x11a9ed){const _0x4138ba=a177_0x28b9;return _0x11a9ed[_0x4138ba(0x170)](_0x5778cb=>{const _0x1b73c1=_0x4138ba;if(_0x5778cb?.[_0x1b73c1(0x169)]===_0x1b73c1(0x15b))throw CliErrors['cancelled'](_0x1b73c1(0x173));throw _0x5778cb;});}export function startSpinner(_0xc15ed6){const _0x5a6457=a177_0x28b9;return a177_0x189ad1({'text':_0xc15ed6,'color':_0x5a6457(0x15c)})[_0x5a6457(0x159)]();}function a177_0x46d4(){const _0xf72501=['14ltzLWd','749690zpwnFK','map','green','200597stvgeG','\x20\x20CSS\x20URL:','name','No\x20menus\x20selected.','[new]','path','isTTY','JS\x20URL\x20checked','[already\x20on\x20platform]','catch','error','2718867FATpYT','Cancelled.','test','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','2733510ATAZBk','5111876tNlOIP','CSS\x20URL\x20check\x20failed','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','filter','3080btuFDB','gray','red','\x20\x20Checking\x20JS\x20URL\x20reachability...','207YICuWt','4727315axuvfF','No\x20local\x20pages\x20found.','cancelled','includes','length','start','label','ExitPromptError','cyan','trim','CSS\x20URL\x20checked','16656PdTRCi','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','has','fail'];a177_0x46d4=function(){return _0xf72501;};return a177_0x46d4();}export function stopSpinner(_0x3cc811,_0x130ad5,_0x20f98b){const _0x3d6082=a177_0x28b9;_0x20f98b?_0x3cc811['succeed'](_0x130ad5):_0x3cc811[_0x3d6082(0x162)](_0x130ad5);}export async function askConfirm(_0x478f02){return onCancel(confirm({'message':_0x478f02,'theme':{'prefix':''}}));}export async function askJsUrl(_0x42c11d){const _0x583903=a177_0x28b9;while(!![]){const _0x415989=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x42c11d,'theme':{'prefix':''}}));if(_0x415989[_0x583903(0x15d)]()==='')throw CliErrors[_0x583903(0x156)]('Cancelled.');if(!/^https:\/\/.+\.js(\?.*)?$/['test'](_0x415989[_0x583903(0x15d)]())){console['error'](a177_0x11e6c5['red'](_0x583903(0x14d)));continue;}const _0x2db331=startSpinner(_0x583903(0x152));try{const _0x264232=await isUrlReachable(_0x415989['trim']());stopSpinner(_0x2db331,_0x583903(0x16e),_0x264232);if(!_0x264232){console[_0x583903(0x171)](a177_0x11e6c5['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x415989['trim']();}catch(_0x30bb55){stopSpinner(_0x2db331,'JS\x20URL\x20check\x20failed',![]);throw _0x30bb55;}}}export async function askCssUrl(_0x5f41fd){const _0x5aa20a=a177_0x28b9;while(!![]){const _0x1c93d4=await onCancel(input({'message':_0x5aa20a(0x168),'default':_0x5f41fd,'theme':{'prefix':''}}));if(_0x1c93d4[_0x5aa20a(0x15d)]()==='')throw CliErrors[_0x5aa20a(0x156)](_0x5aa20a(0x173));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x5aa20a(0x174)](_0x1c93d4[_0x5aa20a(0x15d)]())){console[_0x5aa20a(0x171)](a177_0x11e6c5[_0x5aa20a(0x151)](_0x5aa20a(0x160)));continue;}const _0x26a934=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x538590=await isUrlReachable(_0x1c93d4[_0x5aa20a(0x15d)]());stopSpinner(_0x26a934,_0x5aa20a(0x15e),_0x538590);if(!_0x538590){console[_0x5aa20a(0x171)](a177_0x11e6c5[_0x5aa20a(0x151)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x1c93d4[_0x5aa20a(0x15d)]();}catch(_0x31a765){stopSpinner(_0x26a934,_0x5aa20a(0x14c),![]);throw _0x31a765;}}}function a177_0x28b9(_0x358f91,_0x43084d){_0x358f91=_0x358f91-0x14a;const _0x46d448=a177_0x46d4();let _0x28b9c1=_0x46d448[_0x358f91];return _0x28b9c1;}export async function selectPages(_0xe7601f,_0x40ec84){const _0x537286=a177_0x28b9,_0x438800=_0xe7601f[_0x537286(0x165)](_0x218786=>{const _0x4ff4b7=_0x537286,_0xf34813=_0x40ec84[_0x4ff4b7(0x161)](menuPathKey(_0x218786[_0x4ff4b7(0x16c)]));return{'name':_0x218786[_0x4ff4b7(0x15a)]+'\x20\x20'+a177_0x11e6c5[_0x4ff4b7(0x150)](_0x218786[_0x4ff4b7(0x16c)])+'\x20\x20'+(_0xf34813?a177_0x11e6c5[_0x4ff4b7(0x150)](_0x4ff4b7(0x16f)):a177_0x11e6c5[_0x4ff4b7(0x166)](_0x4ff4b7(0x16b))),'value':_0x218786[_0x4ff4b7(0x16c)],'checked':!_0xf34813,'disabled':_0xf34813};});if(_0x438800[_0x537286(0x158)]===0x0)throw new Error(_0x537286(0x155));const _0x538a15=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x438800,'loop':![],'theme':{'prefix':''}}));if(_0x538a15[_0x537286(0x158)]===0x0)throw new Error(_0x537286(0x16a));return _0xe7601f[_0x537286(0x14e)](_0x4af014=>_0x538a15[_0x537286(0x157)](_0x4af014[_0x537286(0x16c)]));}export function isInteractive(){const _0x572fed=a177_0x28b9;return process['stdin'][_0x572fed(0x16d)]===!![];}export function requireInteractive(){const _0x179af9=a177_0x28b9;if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+_0x179af9(0x175));}
1
+ (function(_0x46439b,_0x2cbb54){const _0x445b11=a177_0x2668,_0x2f082c=_0x46439b();while(!![]){try{const _0x4f0e1f=parseInt(_0x445b11(0x1a5))/0x1+parseInt(_0x445b11(0x1c4))/0x2*(parseInt(_0x445b11(0x1a0))/0x3)+-parseInt(_0x445b11(0x19c))/0x4+parseInt(_0x445b11(0x1bc))/0x5*(-parseInt(_0x445b11(0x1c1))/0x6)+parseInt(_0x445b11(0x1ab))/0x7*(-parseInt(_0x445b11(0x1b5))/0x8)+parseInt(_0x445b11(0x1ae))/0x9*(-parseInt(_0x445b11(0x1a2))/0xa)+parseInt(_0x445b11(0x1b3))/0xb;if(_0x4f0e1f===_0x2cbb54)break;else _0x2f082c['push'](_0x2f082c['shift']());}catch(_0x5dc03f){_0x2f082c['push'](_0x2f082c['shift']());}}}(a177_0x52c8,0x35bfc));function a177_0x52c8(){const _0xdc7551=['gray','red','327710VajRgt','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','name','12znBKkw','error','CSS\x20URL\x20checked','2BJHurV','has','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','1020064LiTnXk','JS\x20URL\x20check\x20failed','cancelled','test','1231377AmXiPT','includes','3630ZGJHyu','fail','cyan','145486dKFVuh','filter','path','isTTY','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','succeed','527023drBXHL','stdin','length','3123pjRbdT','No\x20menus\x20selected.','ExitPromptError','[new]','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','6079887NeFqcK','Cancelled.','40MrkpGn','trim','\x20\x20Checking\x20CSS\x20URL\x20reachability...','\x20\x20CSS\x20URL:','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'];a177_0x52c8=function(){return _0xdc7551;};return a177_0x52c8();}import a177_0x5100ba from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a177_0x4b76c7 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{menuPathKey}from'../../../commands/menu/shared/path.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x1468d7){return _0x1468d7['catch'](_0x2a5ea7=>{const _0x5390e0=a177_0x2668;if(_0x2a5ea7?.[_0x5390e0(0x1c0)]===_0x5390e0(0x1b0))throw CliErrors[_0x5390e0(0x19e)](_0x5390e0(0x1b4));throw _0x2a5ea7;});}function a177_0x2668(_0x5140b1,_0x11411d){_0x5140b1=_0x5140b1-0x19c;const _0x52c85b=a177_0x52c8();let _0x2668ab=_0x52c85b[_0x5140b1];return _0x2668ab;}export function startSpinner(_0x54902d){const _0x4e72ae=a177_0x2668;return a177_0x4b76c7({'text':_0x54902d,'color':_0x4e72ae(0x1a4)})['start']();}export function stopSpinner(_0x14c9b2,_0x2f065d,_0x291fc4){const _0x1e8e43=a177_0x2668;_0x291fc4?_0x14c9b2[_0x1e8e43(0x1aa)](_0x2f065d):_0x14c9b2[_0x1e8e43(0x1a3)](_0x2f065d);}export async function askConfirm(_0x44a65e){return onCancel(confirm({'message':_0x44a65e,'theme':{'prefix':''}}));}export async function askJsUrl(_0x14b095){const _0x181be5=a177_0x2668;while(!![]){const _0x37185a=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x14b095,'theme':{'prefix':''}}));if(_0x37185a['trim']()==='')throw CliErrors['cancelled'](_0x181be5(0x1b4));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x181be5(0x19f)](_0x37185a['trim']())){console[_0x181be5(0x1c2)](a177_0x5100ba[_0x181be5(0x1bb)](_0x181be5(0x1b2)));continue;}const _0x58a59c=startSpinner(_0x181be5(0x1be));try{const _0x5c6a53=await isUrlReachable(_0x37185a[_0x181be5(0x1b6)]());stopSpinner(_0x58a59c,'JS\x20URL\x20checked',_0x5c6a53);if(!_0x5c6a53){console['error'](a177_0x5100ba['red'](_0x181be5(0x1bd)));continue;}return _0x37185a[_0x181be5(0x1b6)]();}catch(_0x2e0db2){stopSpinner(_0x58a59c,_0x181be5(0x19d),![]);throw _0x2e0db2;}}}export async function askCssUrl(_0x76832b){const _0x203802=a177_0x2668;while(!![]){const _0x2e8db2=await onCancel(input({'message':_0x203802(0x1b8),'default':_0x76832b,'theme':{'prefix':''}}));if(_0x2e8db2['trim']()==='')throw CliErrors[_0x203802(0x19e)](_0x203802(0x1b4));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x203802(0x19f)](_0x2e8db2['trim']())){console['error'](a177_0x5100ba['red']('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x269674=startSpinner(_0x203802(0x1b7));try{const _0x19cfdd=await isUrlReachable(_0x2e8db2[_0x203802(0x1b6)]());stopSpinner(_0x269674,_0x203802(0x1c3),_0x19cfdd);if(!_0x19cfdd){console[_0x203802(0x1c2)](a177_0x5100ba[_0x203802(0x1bb)](_0x203802(0x1bf)));continue;}return _0x2e8db2['trim']();}catch(_0x2b8778){stopSpinner(_0x269674,'CSS\x20URL\x20check\x20failed',![]);throw _0x2b8778;}}}export async function selectPages(_0x3088f6,_0x49a855){const _0x2f84fe=a177_0x2668,_0x308bfc=_0x3088f6['map'](_0x18d968=>{const _0x3125cf=a177_0x2668,_0x232d37=_0x49a855[_0x3125cf(0x1c5)](menuPathKey(_0x18d968[_0x3125cf(0x1a7)]));return{'name':_0x18d968['label']+'\x20\x20'+a177_0x5100ba[_0x3125cf(0x1ba)](_0x18d968['path'])+'\x20\x20'+(_0x232d37?a177_0x5100ba['gray']('[already\x20on\x20platform]'):a177_0x5100ba['green'](_0x3125cf(0x1b1))),'value':_0x18d968[_0x3125cf(0x1a7)],'checked':!_0x232d37,'disabled':_0x232d37};});if(_0x308bfc['length']===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x5ef9eb=await onCancel(checkbox({'message':_0x2f84fe(0x1c6),'choices':_0x308bfc,'loop':![],'theme':{'prefix':''}}));if(_0x5ef9eb[_0x2f84fe(0x1ad)]===0x0)throw new Error(_0x2f84fe(0x1af));return _0x3088f6[_0x2f84fe(0x1a6)](_0x1a8a1f=>_0x5ef9eb[_0x2f84fe(0x1a1)](_0x1a8a1f['path']));}export function isInteractive(){const _0x46b8b7=a177_0x2668;return process[_0x46b8b7(0x1ac)][_0x46b8b7(0x1a8)]===!![];}export function requireInteractive(){const _0x3e55aa=a177_0x2668;if(!isInteractive())throw new Error(_0x3e55aa(0x1b9)+_0x3e55aa(0x1a9));}
@@ -1 +1 @@
1
- const a178_0x34be6c=a178_0x4072;(function(_0x16b4bd,_0x5f4d10){const _0xf651dd=a178_0x4072,_0x510d6b=_0x16b4bd();while(!![]){try{const _0x28aa94=parseInt(_0xf651dd(0xc9))/0x1+-parseInt(_0xf651dd(0xf5))/0x2*(-parseInt(_0xf651dd(0xf4))/0x3)+parseInt(_0xf651dd(0xcf))/0x4+-parseInt(_0xf651dd(0xc1))/0x5+-parseInt(_0xf651dd(0xd5))/0x6*(-parseInt(_0xf651dd(0xe9))/0x7)+parseInt(_0xf651dd(0xd2))/0x8*(parseInt(_0xf651dd(0xe5))/0x9)+-parseInt(_0xf651dd(0xcb))/0xa;if(_0x28aa94===_0x5f4d10)break;else _0x510d6b['push'](_0x510d6b['shift']());}catch(_0x56dcb6){_0x510d6b['push'](_0x510d6b['shift']());}}}(a178_0x40d9,0x4a8e2));import{existsSync,readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a178_0x34be6c(0xf3)](),a178_0x34be6c(0xc7));export function extractTitleFromComment(_0x16f929){const _0x3076f7=a178_0x34be6c;try{const _0x57b886=readFileSync(_0x16f929,_0x3076f7(0xeb)),_0x2c6175=_0x57b886[_0x3076f7(0xe0)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x2c6175&&_0x2c6175[0x1]){const _0x29a005=_0x2c6175[0x1],_0x54509e=_0x29a005[_0x3076f7(0xe0)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x54509e&&_0x54509e[0x1])return _0x54509e[0x1][_0x3076f7(0xcc)]();}let _0x425eaf=null;const _0x18f24e=_0x57b886['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x18f24e&&_0x18f24e[0x1]&&(_0x425eaf=_0x18f24e[0x1]);if(!_0x425eaf){const _0x4143c6=_0x57b886['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4143c6&&_0x4143c6[0x1]&&(_0x425eaf=_0x4143c6[0x1]);}if(_0x425eaf){const _0x377abc=new RegExp('\x5cb'+_0x425eaf+_0x3076f7(0xd7)),_0x49eafc=_0x57b886['match'](_0x377abc);if(_0x49eafc&&_0x49eafc[0x1])return _0x49eafc[0x1];return _0x425eaf;}return null;}catch(_0x33ed56){return null;}}export function getLocalPages(_0x105bc0=pagesDir,_0x588b41=pagesDir,_0xba5acf=process['cwd']()){const _0x29d18b=a178_0x34be6c;if(resolve(_0x105bc0)===resolve(_0x588b41)){const _0x3d01b7=join(_0xba5acf,_0x29d18b(0xf2));if(existsSync(_0x3d01b7))return getDeclaredPages(_0x3d01b7,_0xba5acf);}let _0x44c0d8=[];const _0x435e3d=readdirSync(_0x105bc0);return _0x435e3d[_0x29d18b(0xee)](_0x4cd04e=>{const _0x1bb6fc=_0x29d18b,_0x351c52=join(_0x105bc0,_0x4cd04e),_0x3d9259=statSync(_0x351c52);if(_0x3d9259&&_0x3d9259[_0x1bb6fc(0xda)]())_0x44c0d8=_0x44c0d8[_0x1bb6fc(0xce)](getLocalPages(_0x351c52,_0x588b41,_0xba5acf));else{if(_0x4cd04e[_0x1bb6fc(0xc4)]('.tsx')){let _0x33ff0b=relative(_0x588b41,_0x351c52);_0x33ff0b['endsWith'](_0x1bb6fc(0xdd))?_0x33ff0b=_0x33ff0b[_0x1bb6fc(0xc2)](/index\.tsx$/,''):_0x33ff0b=_0x33ff0b[_0x1bb6fc(0xc2)](/\.tsx$/,'');_0x33ff0b[_0x1bb6fc(0xc4)](sep)&&(_0x33ff0b=_0x33ff0b[_0x1bb6fc(0xc3)](0x0,-0x1));const _0x894872=_0x33ff0b[_0x1bb6fc(0xc8)](sep)[_0x1bb6fc(0xde)]('/'),_0x33548c=extractTitleFromComment(_0x351c52),_0x23b174=_0x33548c||_0x894872;_0x44c0d8[_0x1bb6fc(0xd3)]({'path':_0x894872[_0x1bb6fc(0xed)]('$',':'),'label':_0x23b174});}}}),_0x44c0d8[_0x29d18b(0xc0)](_0x415a25=>_0x415a25[_0x29d18b(0xd8)]!=='');}function a178_0x4072(_0xe553bf,_0x4c443d){_0xe553bf=_0xe553bf-0xc0;const _0x40d9d8=a178_0x40d9();let _0x407209=_0x40d9d8[_0xe553bf];return _0x407209;}function a178_0x40d9(){const _0x34f784=['Invalid\x20route\x20group\x20for\x20','Route\x20page\x20file\x20does\x20not\x20exist:\x20','has','12168FAgCig',';\x20expected\x20','string','isArray','12271YWdIlQ','order','utf-8','pageFile','replaceAll','forEach','add',':$1','label','src/features/routing/routes.json','cwd','1655226TykCAN','2RexMaE','filter','1386280AZeBin','replace','slice','endsWith','object','boolean','src/pages','split','296250YIcLhy','Invalid\x20route\x20manifest\x20row\x20','9673340MQFlvD','trim','visible','concat','1729888taibnZ','group','test','184joiJnx','push','src/pages/','816jJJAve','\x20disagrees\x20with\x20pageFile\x20','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','path',':\x20path,\x20label,\x20pageFile\x20and\x20visible\x20are\x20required','isDirectory','Duplicate\x20route\x20path\x20in\x20manifest:\x20','Invalid\x20route\x20manifest\x20','index.tsx','join','utf8','match','index'];a178_0x40d9=function(){return _0x34f784;};return a178_0x40d9();}function getDeclaredPages(_0x17095f,_0x5c7617){const _0x5affef=a178_0x34be6c;let _0x1ba165;try{_0x1ba165=JSON['parse'](readFileSync(_0x17095f,_0x5affef(0xdf)));}catch(_0x8f99ee){throw new Error(_0x5affef(0xdc)+_0x17095f+':\x20'+String(_0x8f99ee));}if(!Array[_0x5affef(0xe8)](_0x1ba165))throw new Error('Route\x20manifest\x20must\x20contain\x20an\x20array:\x20'+_0x17095f);const _0x96704e=new Set();return _0x1ba165['map']((_0x4e71ec,_0x13a437)=>{const _0x14162c=_0x5affef;if(!_0x4e71ec||typeof _0x4e71ec!==_0x14162c(0xc5)||Array['isArray'](_0x4e71ec))throw new Error(_0x14162c(0xca)+(_0x13a437+0x1));const _0x5a0894=_0x4e71ec,_0x42e2b9=_0x5a0894[_0x14162c(0xd8)],_0x13c0f1=_0x5a0894[_0x14162c(0xf1)],_0x2a6fcd=_0x5a0894[_0x14162c(0xec)];if(typeof _0x42e2b9!==_0x14162c(0xe7)||!/^\/(?!\/)[^?#]*$/[_0x14162c(0xd1)](_0x42e2b9)||typeof _0x13c0f1!=='string'||!_0x13c0f1[_0x14162c(0xcc)]()||typeof _0x2a6fcd!==_0x14162c(0xe7)||!/^src\/pages\/(?!.*\.\.)[^/].*\.tsx$/[_0x14162c(0xd1)](_0x2a6fcd)||typeof _0x5a0894[_0x14162c(0xcd)]!==_0x14162c(0xc6))throw new Error(_0x14162c(0xca)+(_0x13a437+0x1)+_0x14162c(0xd9));if(_0x96704e[_0x14162c(0xe4)](_0x42e2b9))throw new Error(_0x14162c(0xdb)+_0x42e2b9);_0x96704e[_0x14162c(0xef)](_0x42e2b9);if(!existsSync(resolve(_0x5c7617,_0x2a6fcd)))throw new Error(_0x14162c(0xe3)+_0x2a6fcd);const _0x542400=_0x2a6fcd[_0x14162c(0xc3)](_0x14162c(0xd4)['length'])[_0x14162c(0xc2)](/\/index\.tsx$/,'')[_0x14162c(0xc2)](/\.tsx$/,'')[_0x14162c(0xed)]('$',':')['replace'](/\[([^/\]]+)\]/g,_0x14162c(0xf0)),_0x516844=_0x542400===_0x14162c(0xe1)?'/':'/'+_0x542400;if(_0x42e2b9!==_0x516844)throw new Error('Route\x20'+_0x42e2b9+_0x14162c(0xd6)+_0x2a6fcd+_0x14162c(0xe6)+_0x516844);if(_0x5a0894[_0x14162c(0xd0)]!==undefined&&(typeof _0x5a0894[_0x14162c(0xd0)]!==_0x14162c(0xe7)||!_0x5a0894[_0x14162c(0xd0)]['trim']()))throw new Error(_0x14162c(0xe2)+_0x42e2b9);if(_0x5a0894['order']!==undefined&&(!Number['isInteger'](_0x5a0894[_0x14162c(0xea)])||_0x5a0894[_0x14162c(0xea)]<0x0))throw new Error('Invalid\x20route\x20order\x20for\x20'+_0x42e2b9);return{'path':_0x42e2b9,'label':_0x13c0f1[_0x14162c(0xcc)](),'visible':_0x5a0894[_0x14162c(0xcd)],..._0x5a0894[_0x14162c(0xd0)]===undefined?{}:{'group':_0x5a0894[_0x14162c(0xd0)][_0x14162c(0xcc)]()},..._0x5a0894[_0x14162c(0xea)]===undefined?{}:{'order':_0x5a0894[_0x14162c(0xea)]}};});}
1
+ const a178_0x447df5=a178_0x2a0d;(function(_0x28938e,_0x14edf7){const _0x23a64a=a178_0x2a0d,_0x551729=_0x28938e();while(!![]){try{const _0x51c3b0=-parseInt(_0x23a64a(0x121))/0x1+parseInt(_0x23a64a(0x127))/0x2+parseInt(_0x23a64a(0x11d))/0x3+parseInt(_0x23a64a(0x111))/0x4*(-parseInt(_0x23a64a(0x137))/0x5)+-parseInt(_0x23a64a(0x10d))/0x6*(parseInt(_0x23a64a(0x13a))/0x7)+-parseInt(_0x23a64a(0x122))/0x8+-parseInt(_0x23a64a(0x110))/0x9*(-parseInt(_0x23a64a(0x132))/0xa);if(_0x51c3b0===_0x14edf7)break;else _0x551729['push'](_0x551729['shift']());}catch(_0x563cc2){_0x551729['push'](_0x551729['shift']());}}}(a178_0x2fbf,0xeeff8));import{existsSync,readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a178_0x447df5(0x13c)](),a178_0x447df5(0x131));function a178_0x2a0d(_0x5a637e,_0x2f5bb2){_0x5a637e=_0x5a637e-0x10d;const _0x2fbff8=a178_0x2fbf();let _0x2a0da8=_0x2fbff8[_0x5a637e];return _0x2a0da8;}export function extractTitleFromComment(_0x1f788a){const _0x24dadb=a178_0x447df5;try{const _0x5416f8=readFileSync(_0x1f788a,_0x24dadb(0x112)),_0x25e2c1=_0x5416f8[_0x24dadb(0x11f)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x25e2c1&&_0x25e2c1[0x1]){const _0x294843=_0x25e2c1[0x1],_0x5491aa=_0x294843['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x5491aa&&_0x5491aa[0x1])return _0x5491aa[0x1][_0x24dadb(0x13e)]();}let _0x3310e9=null;const _0x53c993=_0x5416f8[_0x24dadb(0x11f)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x53c993&&_0x53c993[0x1]&&(_0x3310e9=_0x53c993[0x1]);if(!_0x3310e9){const _0x55f9ca=_0x5416f8[_0x24dadb(0x11f)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x55f9ca&&_0x55f9ca[0x1]&&(_0x3310e9=_0x55f9ca[0x1]);}if(_0x3310e9){const _0x3cc834=new RegExp('\x5cb'+_0x3310e9+_0x24dadb(0x134)),_0x3da9e8=_0x5416f8[_0x24dadb(0x11f)](_0x3cc834);if(_0x3da9e8&&_0x3da9e8[0x1])return _0x3da9e8[0x1];return _0x3310e9;}return null;}catch(_0x7541bf){return null;}}export function getLocalPages(_0x4beb72=pagesDir,_0x2796bb=pagesDir,_0x531d02=process['cwd']()){const _0x532d9e=a178_0x447df5;if(resolve(_0x4beb72)===resolve(_0x2796bb)){const _0x3b2754=join(_0x531d02,_0x532d9e(0x124));if(existsSync(_0x3b2754))return getDeclaredPages(_0x3b2754,_0x531d02);}let _0xca9f7e=[];const _0x39e606=readdirSync(_0x4beb72);return _0x39e606[_0x532d9e(0x133)](_0x45603e=>{const _0x2dad4a=_0x532d9e,_0x461507=join(_0x4beb72,_0x45603e),_0x11da07=statSync(_0x461507);if(_0x11da07&&_0x11da07['isDirectory']())_0xca9f7e=_0xca9f7e['concat'](getLocalPages(_0x461507,_0x2796bb,_0x531d02));else{if(_0x45603e[_0x2dad4a(0x13f)](_0x2dad4a(0x126))){let _0x34caaa=relative(_0x2796bb,_0x461507);_0x34caaa['endsWith'](_0x2dad4a(0x10e))?_0x34caaa=_0x34caaa['replace'](/index\.tsx$/,''):_0x34caaa=_0x34caaa[_0x2dad4a(0x11b)](/\.tsx$/,'');_0x34caaa[_0x2dad4a(0x13f)](sep)&&(_0x34caaa=_0x34caaa['slice'](0x0,-0x1));const _0x3a3d55=_0x34caaa['split'](sep)[_0x2dad4a(0x10f)]('/'),_0x5990c0=extractTitleFromComment(_0x461507),_0x10ed07=_0x5990c0||_0x3a3d55;_0xca9f7e[_0x2dad4a(0x13d)]({'path':_0x3a3d55['replaceAll']('$',':'),'label':_0x10ed07});}}}),_0xca9f7e[_0x532d9e(0x129)](_0x6e0a89=>_0x6e0a89[_0x532d9e(0x12a)]!=='');}function a178_0x2fbf(){const _0x5a066b=['1522158XpuCem','12527144dIsyiq','Invalid\x20route\x20manifest\x20row\x20','src/features/routing/routes.json','Invalid\x20route\x20order\x20for\x20','.tsx','1523462udUEnu','parse','filter','path','Duplicate\x20route\x20path\x20in\x20manifest:\x20','index','object','Route\x20manifest\x20must\x20contain\x20an\x20array:\x20',';\x20expected\x20','has','src/pages','20HLfBGI','forEach','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','Route\x20page\x20file\x20does\x20not\x20exist:\x20','Invalid\x20route\x20manifest\x20','7738515NYdeCy','visible','isArray','13123103izyrja','src/pages/','cwd','push','trim','endsWith',':$1','6VBHBmP','index.tsx','join','24770331uNeycq','4dejiRw','utf-8','Invalid\x20route\x20group\x20for\x20',':\x20path,\x20label,\x20pageFile\x20and\x20visible\x20are\x20required','map','group','pageFile','order','test','slice','replace','isInteger','3669510JkrBbE','replaceAll','match','string'];a178_0x2fbf=function(){return _0x5a066b;};return a178_0x2fbf();}function getDeclaredPages(_0x31c4a1,_0xbe0f09){const _0xa5e276=a178_0x447df5;let _0x95be2c;try{_0x95be2c=JSON[_0xa5e276(0x128)](readFileSync(_0x31c4a1,'utf8'));}catch(_0x259e2d){throw new Error(_0xa5e276(0x136)+_0x31c4a1+':\x20'+String(_0x259e2d));}if(!Array[_0xa5e276(0x139)](_0x95be2c))throw new Error(_0xa5e276(0x12e)+_0x31c4a1);const _0x1d6bd2=new Set();return _0x95be2c[_0xa5e276(0x115)]((_0x54ce34,_0x3c20a5)=>{const _0x27b4da=_0xa5e276;if(!_0x54ce34||typeof _0x54ce34!==_0x27b4da(0x12d)||Array[_0x27b4da(0x139)](_0x54ce34))throw new Error(_0x27b4da(0x123)+(_0x3c20a5+0x1));const _0x12bc1e=_0x54ce34,_0x341c06=_0x12bc1e[_0x27b4da(0x12a)],_0x5884b2=_0x12bc1e['label'],_0x32f115=_0x12bc1e[_0x27b4da(0x117)];if(typeof _0x341c06!==_0x27b4da(0x120)||!/^\/(?!\/)[^?#]*$/['test'](_0x341c06)||typeof _0x5884b2!==_0x27b4da(0x120)||!_0x5884b2[_0x27b4da(0x13e)]()||typeof _0x32f115!=='string'||!/^src\/pages\/(?!.*\.\.)[^/].*\.tsx$/[_0x27b4da(0x119)](_0x32f115)||typeof _0x12bc1e[_0x27b4da(0x138)]!=='boolean')throw new Error(_0x27b4da(0x123)+(_0x3c20a5+0x1)+_0x27b4da(0x114));if(_0x1d6bd2[_0x27b4da(0x130)](_0x341c06))throw new Error(_0x27b4da(0x12b)+_0x341c06);_0x1d6bd2['add'](_0x341c06);if(!existsSync(resolve(_0xbe0f09,_0x32f115)))throw new Error(_0x27b4da(0x135)+_0x32f115);const _0x28fa92=_0x32f115[_0x27b4da(0x11a)](_0x27b4da(0x13b)['length'])['replace'](/\/index\.tsx$/,'')[_0x27b4da(0x11b)](/\.tsx$/,'')[_0x27b4da(0x11e)]('$',':')[_0x27b4da(0x11b)](/\[([^/\]]+)\]/g,_0x27b4da(0x140)),_0x17d596=_0x28fa92===_0x27b4da(0x12c)?'/':'/'+_0x28fa92;if(_0x341c06!==_0x17d596)throw new Error('Route\x20'+_0x341c06+'\x20disagrees\x20with\x20pageFile\x20'+_0x32f115+_0x27b4da(0x12f)+_0x17d596);if(_0x12bc1e[_0x27b4da(0x116)]!==undefined&&(typeof _0x12bc1e[_0x27b4da(0x116)]!=='string'||!_0x12bc1e['group'][_0x27b4da(0x13e)]()))throw new Error(_0x27b4da(0x113)+_0x341c06);if(_0x12bc1e[_0x27b4da(0x118)]!==undefined&&(!Number[_0x27b4da(0x11c)](_0x12bc1e[_0x27b4da(0x118)])||_0x12bc1e[_0x27b4da(0x118)]<0x0))throw new Error(_0x27b4da(0x125)+_0x341c06);return{'path':_0x341c06,'label':_0x5884b2[_0x27b4da(0x13e)](),'visible':_0x12bc1e[_0x27b4da(0x138)],..._0x12bc1e[_0x27b4da(0x116)]===undefined?{}:{'group':_0x12bc1e['group']['trim']()},..._0x12bc1e[_0x27b4da(0x118)]===undefined?{}:{'order':_0x12bc1e['order']}};});}
@@ -1 +1 @@
1
- (function(_0x2da5b1,_0x590769){const _0x2b988e=a179_0x2f54,_0x2e173e=_0x2da5b1();while(!![]){try{const _0x3555d3=-parseInt(_0x2b988e(0xa4))/0x1+-parseInt(_0x2b988e(0xb4))/0x2*(-parseInt(_0x2b988e(0x9e))/0x3)+parseInt(_0x2b988e(0xab))/0x4+parseInt(_0x2b988e(0xb0))/0x5*(parseInt(_0x2b988e(0xa1))/0x6)+-parseInt(_0x2b988e(0xb1))/0x7*(parseInt(_0x2b988e(0xb3))/0x8)+parseInt(_0x2b988e(0x9f))/0x9*(parseInt(_0x2b988e(0xa8))/0xa)+-parseInt(_0x2b988e(0xaa))/0xb*(parseInt(_0x2b988e(0xae))/0xc);if(_0x3555d3===_0x590769)break;else _0x2e173e['push'](_0x2e173e['shift']());}catch(_0x608e89){_0x2e173e['push'](_0x2e173e['shift']());}}}(a179_0x39dd,0xbebd4));import{menuPathKey}from'../../../commands/menu/shared/path.js';import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a179_0x39dd(){const _0x50aef0=['2NsQogD','length','errors','903183aVQjan','9JAgqyP','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','62076EDJytf','filter','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','2094AZwVpx','label','JS\x20URL\x20is\x20unreachable','resources','7746710guIrZr','CSS\x20URL\x20is\x20unreachable','1716xBVuum','3931212eplonh','path','map','68844DbrJru','push','470qjPpBf','35GApAtq','has','2164360zGooYC'];a179_0x39dd=function(){return _0x50aef0;};return a179_0x39dd();}export function validateJsUrl(_0x183461){const _0x35a276=a179_0x2f54,_0x37eb9c=[];return!isValidJsHttpsUrl(_0x183461)&&_0x37eb9c[_0x35a276(0xaf)](_0x35a276(0xa0)),{'ok':_0x37eb9c['length']===0x0,'errors':_0x37eb9c};}export function validateCssUrl(_0x3abb45){const _0x5254b6=a179_0x2f54,_0x388e15=[];return!isValidCssHttpsUrl(_0x3abb45)&&_0x388e15['push'](_0x5254b6(0xa3)),{'ok':_0x388e15[_0x5254b6(0xb5)]===0x0,'errors':_0x388e15};}export async function validateJsUrlReachable(_0x57a55){const _0x4690f8=a179_0x2f54,_0x371ebd=validateJsUrl(_0x57a55);if(!_0x371ebd['ok'])return _0x371ebd;const _0x10ba1a=await isUrlReachable(_0x57a55);if(!_0x10ba1a)_0x371ebd[_0x4690f8(0x9d)]['push'](_0x4690f8(0xa6));return{'ok':_0x371ebd[_0x4690f8(0x9d)]['length']===0x0,'errors':_0x371ebd[_0x4690f8(0x9d)]};}export async function validateCssUrlReachable(_0x1d83a2){const _0x3ce582=a179_0x2f54,_0x2c8aac=validateCssUrl(_0x1d83a2);if(!_0x2c8aac['ok'])return _0x2c8aac;const _0x1fd38f=await isUrlReachable(_0x1d83a2);if(!_0x1fd38f)_0x2c8aac[_0x3ce582(0x9d)]['push'](_0x3ce582(0xa9));return{'ok':_0x2c8aac['errors'][_0x3ce582(0xb5)]===0x0,'errors':_0x2c8aac['errors']};}export function buildCompareRows(_0xb7cc3a,_0x4e5928){const _0x572db1=a179_0x2f54;return _0xb7cc3a[_0x572db1(0xad)](_0x4d9da3=>({'label':_0x4d9da3['label'],'path':_0x4d9da3['path'],'local':!![],'online':_0x4e5928[_0x572db1(0xb2)](menuPathKey(_0x4d9da3['path']))}));}function a179_0x2f54(_0x5eddae,_0x8afd94){_0x5eddae=_0x5eddae-0x9d;const _0x39dd92=a179_0x39dd();let _0x2f5463=_0x39dd92[_0x5eddae];return _0x2f5463;}export async function doCreateMenus(_0x2feafc,_0x1a467f,_0x1331f1,_0x52511e,_0x14ca15){const _0x486a9f=a179_0x2f54,_0x72807c=_0x14ca15?await createMenus(_0x2feafc,_0x1a467f,_0x1331f1,_0x52511e,_0x14ca15):await createMenus(_0x2feafc,_0x1a467f,_0x1331f1,_0x52511e);return{'created':_0x72807c[_0x486a9f(0xb5)],'failed':0x0,'labels':_0x1331f1[_0x486a9f(0xad)](_0x1ff1d6=>_0x1ff1d6[_0x486a9f(0xa5)]),'menus':_0x72807c};}export function filterMenusWithResources(_0x2e538c){const _0x29c997=a179_0x2f54;return _0x2e538c[_0x29c997(0xa2)](_0x371e72=>_0x371e72[_0x29c997(0xa7)]['length']>0x0);}export async function fetchMenuData(_0x5831b7,_0x1ce13e){const _0x405b5d=a179_0x2f54,_0x2cabec=getLocalPages(),_0x35b941=await getOnlineMenuList(_0x5831b7,_0x1ce13e),_0x4a34bd=new Set(_0x35b941[_0x405b5d(0xad)](_0x38c536=>menuPathKey(_0x38c536[_0x405b5d(0xac)])));return{'localPages':_0x2cabec,'onlineMenuList':_0x35b941,'onlinePaths':_0x4a34bd};}export async function fetchOnlineMenuList(_0x3de1da,_0x12b4a0){return getOnlineMenuList(_0x3de1da,_0x12b4a0);}
1
+ (function(_0x134c97,_0x30fdf3){const _0x18918d=a179_0x3f5d,_0x1816a9=_0x134c97();while(!![]){try{const _0x2220a0=parseInt(_0x18918d(0x176))/0x1+parseInt(_0x18918d(0x180))/0x2*(parseInt(_0x18918d(0x173))/0x3)+-parseInt(_0x18918d(0x177))/0x4*(-parseInt(_0x18918d(0x16e))/0x5)+parseInt(_0x18918d(0x178))/0x6*(-parseInt(_0x18918d(0x17a))/0x7)+parseInt(_0x18918d(0x17e))/0x8+parseInt(_0x18918d(0x182))/0x9*(parseInt(_0x18918d(0x179))/0xa)+-parseInt(_0x18918d(0x17f))/0xb*(parseInt(_0x18918d(0x172))/0xc);if(_0x2220a0===_0x30fdf3)break;else _0x1816a9['push'](_0x1816a9['shift']());}catch(_0x528440){_0x1816a9['push'](_0x1816a9['shift']());}}}(a179_0x36cb,0xdd27b));function a179_0x36cb(){const _0x2cb475=['errors','5552576MGjkYA','244574ZCtQTN','10arRrOm','resources','1547568RrvnnI','length','CSS\x20URL\x20is\x20unreachable','20PDEqhw','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','map','JS\x20URL\x20is\x20unreachable','1452vniOgf','577506iMmxFx','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','path','1725907UzFvVx','1633580mBkPQx','672djvEcm','10LlhFFL','99491oLIgWx','label','push'];a179_0x36cb=function(){return _0x2cb475;};return a179_0x36cb();}import{menuPathKey}from'../../../commands/menu/shared/path.js';import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x4d6ff1){const _0x5ba63a=a179_0x3f5d,_0x39c201=[];return!isValidJsHttpsUrl(_0x4d6ff1)&&_0x39c201['push'](_0x5ba63a(0x16f)),{'ok':_0x39c201[_0x5ba63a(0x183)]===0x0,'errors':_0x39c201};}export function validateCssUrl(_0x4b6968){const _0x2f0fd8=a179_0x3f5d,_0x27ad0d=[];return!isValidCssHttpsUrl(_0x4b6968)&&_0x27ad0d[_0x2f0fd8(0x17c)](_0x2f0fd8(0x174)),{'ok':_0x27ad0d[_0x2f0fd8(0x183)]===0x0,'errors':_0x27ad0d};}function a179_0x3f5d(_0x2af09c,_0x4db45f){_0x2af09c=_0x2af09c-0x16e;const _0x36cb58=a179_0x36cb();let _0x3f5d85=_0x36cb58[_0x2af09c];return _0x3f5d85;}export async function validateJsUrlReachable(_0xf74cfd){const _0x3c03b3=a179_0x3f5d,_0xe3823f=validateJsUrl(_0xf74cfd);if(!_0xe3823f['ok'])return _0xe3823f;const _0x403191=await isUrlReachable(_0xf74cfd);if(!_0x403191)_0xe3823f[_0x3c03b3(0x17d)][_0x3c03b3(0x17c)](_0x3c03b3(0x171));return{'ok':_0xe3823f[_0x3c03b3(0x17d)]['length']===0x0,'errors':_0xe3823f[_0x3c03b3(0x17d)]};}export async function validateCssUrlReachable(_0x62c5ae){const _0x1a1137=a179_0x3f5d,_0x59da5a=validateCssUrl(_0x62c5ae);if(!_0x59da5a['ok'])return _0x59da5a;const _0x18bf3b=await isUrlReachable(_0x62c5ae);if(!_0x18bf3b)_0x59da5a[_0x1a1137(0x17d)][_0x1a1137(0x17c)](_0x1a1137(0x184));return{'ok':_0x59da5a['errors']['length']===0x0,'errors':_0x59da5a['errors']};}export function buildCompareRows(_0x22d4d7,_0x4e7ae8){const _0x8a3c87=a179_0x3f5d;return _0x22d4d7[_0x8a3c87(0x170)](_0x3d5e3e=>({'label':_0x3d5e3e[_0x8a3c87(0x17b)],'path':_0x3d5e3e[_0x8a3c87(0x175)],'local':!![],'online':_0x4e7ae8['has'](menuPathKey(_0x3d5e3e['path']))}));}export async function doCreateMenus(_0x48826f,_0x2dc343,_0x2db947,_0x4b0b49,_0x2d7b18){const _0x59ae81=a179_0x3f5d,_0x178b35=_0x2d7b18?await createMenus(_0x48826f,_0x2dc343,_0x2db947,_0x4b0b49,_0x2d7b18):await createMenus(_0x48826f,_0x2dc343,_0x2db947,_0x4b0b49);return{'created':_0x178b35[_0x59ae81(0x183)],'failed':0x0,'labels':_0x2db947['map'](_0xaa0e93=>_0xaa0e93[_0x59ae81(0x17b)]),'menus':_0x178b35};}export function filterMenusWithResources(_0x738d11){const _0x12c840=a179_0x3f5d;return _0x738d11['filter'](_0x187e63=>_0x187e63[_0x12c840(0x181)][_0x12c840(0x183)]>0x0);}export async function fetchMenuData(_0x2078df,_0x178143){const _0x237b4c=a179_0x3f5d,_0x179e60=getLocalPages(),_0x126d23=await getOnlineMenuList(_0x2078df,_0x178143),_0x233399=new Set(_0x126d23[_0x237b4c(0x170)](_0x2f3261=>menuPathKey(_0x2f3261['path'])));return{'localPages':_0x179e60,'onlineMenuList':_0x126d23,'onlinePaths':_0x233399};}export async function fetchOnlineMenuList(_0x2fa0f,_0x2f6066){return getOnlineMenuList(_0x2fa0f,_0x2f6066);}
@@ -1 +1 @@
1
- const a180_0x58dae7=a180_0x3f02;(function(_0x470dc5,_0x55bd0c){const _0x4660f6=a180_0x3f02,_0x51589c=_0x470dc5();while(!![]){try{const _0x2a4aba=-parseInt(_0x4660f6(0xfa))/0x1*(-parseInt(_0x4660f6(0x129))/0x2)+-parseInt(_0x4660f6(0x157))/0x3*(-parseInt(_0x4660f6(0x10e))/0x4)+parseInt(_0x4660f6(0x156))/0x5+-parseInt(_0x4660f6(0x131))/0x6+-parseInt(_0x4660f6(0x146))/0x7+-parseInt(_0x4660f6(0xf9))/0x8+-parseInt(_0x4660f6(0x153))/0x9*(-parseInt(_0x4660f6(0x111))/0xa);if(_0x2a4aba===_0x55bd0c)break;else _0x51589c['push'](_0x51589c['shift']());}catch(_0x47bc3c){_0x51589c['push'](_0x51589c['shift']());}}}(a180_0x2f22,0x9374a));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':a180_0x58dae7(0x13f),'required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':a180_0x58dae7(0x13a),'type':a180_0x58dae7(0x13f),'description':a180_0x58dae7(0xf5)};export const MENU_PARENT_ID_FLAG={'name':a180_0x58dae7(0x119),'type':a180_0x58dae7(0x12c),'description':a180_0x58dae7(0x11c)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a180_0x58dae7(0x118),'type':a180_0x58dae7(0x12c),'description':a180_0x58dae7(0x10c)};function a180_0x3f02(_0x429378,_0x410907){_0x429378=_0x429378-0xe7;const _0x2f22f2=a180_0x2f22();let _0x3f02a4=_0x2f22f2[_0x429378];return _0x3f02a4;}export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a180_0x58dae7(0xe8),'type':a180_0x58dae7(0x12c),'description':a180_0x58dae7(0x107)},{'name':'expected-children-count','type':a180_0x58dae7(0x13f),'description':a180_0x58dae7(0x12d)}];export function validateExactId(_0xd161c){const _0x3c5a38=a180_0x58dae7,_0x434430=_0xd161c[_0x3c5a38(0x13b)]('id');if(!Number[_0x3c5a38(0x103)](_0x434430)||_0x434430<=0x0)throw CliErrors[_0x3c5a38(0x116)](_0x3c5a38(0xef));return _0x434430;}export function validateSort(_0x1f2453,_0x3e93bf='sort'){const _0xf15a63=a180_0x58dae7;if(!hasFlag(_0x1f2453,_0x3e93bf))return undefined;const _0x3add5c=_0x1f2453['num'](_0x3e93bf);if(!Number['isSafeInteger'](_0x3add5c)||_0x3add5c<0x0||_0x3add5c>MAX_MENU_SORT)throw menuError(_0xf15a63(0x126),'--'+_0x3e93bf+_0xf15a63(0x10a)+MAX_MENU_SORT+'.',_0xf15a63(0x140));return _0x3add5c;}export function nextSiblingSort(_0x2b825,_0x29b2bb,_0x1520d9){const _0x4fb7c4=a180_0x58dae7,_0x2a8966=getChildren(_0x2b825,_0x29b2bb)[_0x4fb7c4(0xed)](_0x34f59d=>_0x34f59d[_0x4fb7c4(0x13a)])[_0x4fb7c4(0xec)](_0x1b9ba9=>typeof _0x1b9ba9==='number');if(_0x2a8966[_0x4fb7c4(0x11e)]===0x0)return 0x0;const _0x14d6d0=Math[_0x4fb7c4(0xf1)](..._0x2a8966);if(_0x14d6d0>=MAX_MENU_SORT)throw menuError('menu_sort_overflow',_0x4fb7c4(0x14c)+_0x1520d9+_0x4fb7c4(0x149)+_0x14d6d0+'.',_0x4fb7c4(0x155)+MAX_MENU_SORT+_0x4fb7c4(0x100));return _0x14d6d0+0x1;}export function requireExplicitYes(_0x5689e0){const _0x1f2b8d=a180_0x58dae7;if(_0x5689e0[_0x1f2b8d(0x133)](_0x1f2b8d(0x14e)))return;if(!_0x5689e0[_0x1f2b8d(0x133)](_0x1f2b8d(0xf3)))throw menuError(_0x1f2b8d(0x108),_0x1f2b8d(0x138),_0x1f2b8d(0x10f));}export async function fetchMutationSnapshot(_0x561b1f,_0x42906f,_0x34c7d4){const _0x4414e0=a180_0x58dae7;try{return await fetchMenuSnapshot(_0x561b1f[_0x4414e0(0x143)],_0x561b1f[_0x4414e0(0xff)]);}catch(_0x1b5b21){throw mapMenuApiError(_0x1b5b21,_0x4414e0(0x11f)+_0x42906f,_0x34c7d4);}}export async function recheckMutationSnapshot(_0x1e1dd5,_0x4a2209,_0x189f7f,_0x252521){const _0x23d734=a180_0x58dae7;let _0x51ab36;try{_0x51ab36=await fetchMenuSnapshot(_0x1e1dd5[_0x23d734(0x143)],_0x1e1dd5[_0x23d734(0xff)]);}catch(_0x319267){const _0xa84306=mapMenuApiError(_0x319267,_0x23d734(0xeb)+_0x189f7f,_0x252521);throw menuFailure(_0xa84306,_0x4a2209,{'stage':_0x23d734(0x154),'failed':_0x252521==null?{}:{'id':_0x252521}});}if(_0x51ab36['hash']!==_0x4a2209['snapshotHash']){const _0x121cce=menuError(_0x23d734(0x151),'Online\x20menu\x20state\x20changed\x20before\x20'+_0x189f7f+_0x23d734(0x102),_0x23d734(0xe7));throw menuFailure(_0x121cce,_0x4a2209,{'stage':_0x23d734(0x154),'failed':{..._0x252521==null?{}:{'id':_0x252521},'expectedSnapshotHash':_0x4a2209['snapshotHash'],'currentSnapshotHash':_0x51ab36[_0x23d734(0x12e)]}});}return _0x51ab36;}export function parseParentId(_0x25d5c9,_0x420f15,_0x5499a0={}){const _0x646085=a180_0x58dae7;if(!hasFlag(_0x25d5c9,_0x420f15)){if(_0x5499a0[_0x646085(0x152)])throw CliErrors[_0x646085(0x104)](_0x420f15);return undefined;}const _0x48cc0a=_0x25d5c9[_0x646085(0x145)](_0x420f15)[_0x646085(0xfc)]();if(_0x48cc0a['toLowerCase']()===_0x646085(0xe9))return null;if(!/^\d+$/['test'](_0x48cc0a))throw CliErrors[_0x646085(0x116)]('--'+_0x420f15+_0x646085(0x14a));const _0x482266=Number(_0x48cc0a);if(!Number[_0x646085(0x103)](_0x482266)||_0x482266<=0x0)throw CliErrors['validation']('--'+_0x420f15+_0x646085(0x14a));return _0x482266;}export function requireMenu(_0x5457c8,_0x4df839){const _0x482b93=a180_0x58dae7,_0xf0a9b9=_0x5457c8['byId'][_0x482b93(0x114)](_0x4df839);if(!_0xf0a9b9)throw menuError(_0x482b93(0x14b),_0x482b93(0xf0)+_0x4df839,'Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.');return _0xf0a9b9;}export function requireFolder(_0x5c2da7,_0x2ab8cc){const _0x18fcce=a180_0x58dae7,_0x485220=requireMenu(_0x5c2da7,_0x2ab8cc);if(_0x485220[_0x18fcce(0x13d)]!==_0x18fcce(0x121))throw menuError(_0x18fcce(0x134),'Menu\x20'+_0x2ab8cc+_0x18fcce(0x109)+(_0x485220[_0x18fcce(0x13d)]||_0x18fcce(0xf2))+_0x18fcce(0x117),_0x18fcce(0x139));return _0x485220;}function a180_0x2f22(){const _0x3a83a6=['Cannot\x20append\x20a\x20','error','dry-run','after','snapshotHash','menu_state_drift','required','225fVCbpS','pre-write-recheck','Reorder\x20sibling\x20menus\x20below\x20','905900czPCVh','31854qCYpvT','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','expect-path','root','\x20path\x20changed:\x20expected\x20','recheck\x20online\x20menu\x20facts\x20before\x20','filter','map','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','Online\x20menu\x20not\x20found:\x20','max','unknown','yes','plannedActions','Sibling\x20sort\x20value\x20(non-negative\x20integer)','cascade','parentId','failed','3106448lyOWya','1GgzxXR','data','trim','backend','\x20child\x20count\x20changed:\x20expected\x20','cookie',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','menu_permission_denied',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','isSafeInteger','flagMissing','test','\x20menu\x20','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','menu_confirmation_required','\x20is\x20type\x20\x22','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','planFile','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','message','52oQpdwX','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','Failed\x20to\x20','95120CXHbCM','deleteOrder',',\x20current\x20','get','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','validation','\x22,\x20not\x20folder.','expect-parent-id','parent-id','failedRecords','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','length','read\x20online\x20menu\x20facts\x20before\x20','warnings','folder','prototype','defineProperty','menu_mutation_failed','stage','menu_sort_invalid','Menu\x20','dryRun','1500702KZILWE','api_error','childrenCount','string','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','hash','rawFlags','verification','988698TQFtwx','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','bool','menu_parent_not_folder','code','selector','hint','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','sort','num','operation','type','targets','number','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','menu_verification_failed','path','appCode','expected-children-count','str','1052086wcDdoj','before','stringify','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','menu_not_found'];a180_0x2f22=function(){return _0x3a83a6;};return a180_0x2f22();}export function assertExpectedState(_0x44762e,_0x219216){const _0x2977b7=a180_0x58dae7;if(hasFlag(_0x44762e,_0x2977b7(0x118))){const _0x55f8bc=parseParentId(_0x44762e,'expect-parent-id',{'required':!![]});if(_0x219216[_0x2977b7(0xf7)]!==_0x55f8bc)throw stateDrift('Menu\x20'+_0x219216['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x55f8bc)+',\x20current\x20'+formatParent(_0x219216['parentId'])+'.');}if(hasFlag(_0x44762e,'expect-path')){const _0x3bb491=_0x44762e['str'](_0x2977b7(0xe8));if(_0x219216[_0x2977b7(0x142)]!==_0x3bb491)throw stateDrift('Menu\x20'+_0x219216['id']+_0x2977b7(0xea)+JSON[_0x2977b7(0x148)](_0x3bb491)+_0x2977b7(0x113)+JSON['stringify'](_0x219216[_0x2977b7(0x142)])+'.');}if(hasFlag(_0x44762e,_0x2977b7(0x144))){const _0x1dbc90=_0x44762e[_0x2977b7(0x13b)](_0x2977b7(0x144));if(!Number[_0x2977b7(0x103)](_0x1dbc90)||_0x1dbc90<0x0)throw CliErrors['validation'](_0x2977b7(0x115));if(_0x219216['childrenCount']!==_0x1dbc90)throw stateDrift(_0x2977b7(0x127)+_0x219216['id']+_0x2977b7(0xfe)+_0x1dbc90+_0x2977b7(0x113)+_0x219216[_0x2977b7(0x12b)]+'.');}}export function assertVerified(_0x5d38fa,_0x4d7a05,_0x2829f4='Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.'){const _0x216cba=a180_0x58dae7;if(!_0x5d38fa)throw menuError(_0x216cba(0x141),_0x4d7a05,_0x2829f4);}export function mutationResult(_0x3e4d1b){const _0x31d42e=a180_0x58dae7;return{'operation':_0x3e4d1b[_0x31d42e(0x13c)],'selector':_0x3e4d1b[_0x31d42e(0x136)],'before':_0x3e4d1b[_0x31d42e(0x147)],'after':_0x3e4d1b[_0x31d42e(0x14f)],'dryRun':_0x3e4d1b[_0x31d42e(0x128)],'backend':_0x3e4d1b[_0x31d42e(0xfd)],..._0x3e4d1b[_0x31d42e(0xf4)]?{'plannedActions':_0x3e4d1b[_0x31d42e(0xf4)]}:{},..._0x3e4d1b[_0x31d42e(0x13e)]?{'targets':_0x3e4d1b['targets']}:{},..._0x3e4d1b[_0x31d42e(0x112)]?{'deleteOrder':_0x3e4d1b[_0x31d42e(0x112)]}:{},'snapshotHash':_0x3e4d1b[_0x31d42e(0x150)],..._0x3e4d1b[_0x31d42e(0xf6)]?{'cascade':_0x3e4d1b[_0x31d42e(0xf6)]}:{},..._0x3e4d1b[_0x31d42e(0x10b)]?{'planFile':_0x3e4d1b[_0x31d42e(0x10b)]}:{},'succeeded':_0x3e4d1b['succeeded']??[],'failed':_0x3e4d1b[_0x31d42e(0xf8)]??[],'warnings':_0x3e4d1b[_0x31d42e(0x120)]??[],'verification':_0x3e4d1b['verification'],'error':_0x3e4d1b[_0x31d42e(0x14d)]};}export function menuDryRunResult(_0x10352e,_0x4156cc){return{..._0x10352e,..._0x4156cc};}export function menuFailure(_0x23c2e2,_0x53ab12,_0x1a7bc7){const _0x224b4d=a180_0x58dae7,_0xe23e79=mutationResult({..._0x53ab12,'after':_0x1a7bc7[_0x224b4d(0x14f)]===undefined?_0x53ab12['after']:_0x1a7bc7['after'],'backend':_0x1a7bc7[_0x224b4d(0xfd)]??_0x53ab12[_0x224b4d(0xfd)],'dryRun':![],'succeeded':_0x1a7bc7['succeeded']??[],'failed':_0x1a7bc7[_0x224b4d(0x11a)]??[{..._0x1a7bc7[_0x224b4d(0xf8)]??{},'stage':_0x1a7bc7[_0x224b4d(0x125)],'code':_0x23c2e2[_0x224b4d(0x135)],'message':_0x23c2e2[_0x224b4d(0x10d)]}],'warnings':[..._0x53ab12[_0x224b4d(0x120)],..._0x1a7bc7[_0x224b4d(0x120)]??[]],'verification':_0x1a7bc7[_0x224b4d(0x130)],'error':{'code':_0x23c2e2[_0x224b4d(0x135)],'message':_0x23c2e2[_0x224b4d(0x10d)],..._0x23c2e2[_0x224b4d(0x137)]?{'hint':_0x23c2e2[_0x224b4d(0x137)]}:{}}});return Object[_0x224b4d(0x123)](_0x23c2e2,_0x224b4d(0xfb),{'value':_0xe23e79,'enumerable':!![],'configurable':!![]}),_0x23c2e2;}export function asVerificationError(_0x4a76ca,_0x5481a3){const _0x14414e=a180_0x58dae7;if(_0x4a76ca instanceof CliError&&_0x4a76ca[_0x14414e(0x135)]==='menu_verification_failed')return _0x4a76ca;const _0x48113c=_0x4a76ca instanceof Error?_0x4a76ca[_0x14414e(0x10d)]:String(_0x4a76ca);return menuError(_0x14414e(0x141),''+_0x5481a3+(_0x48113c?':\x20'+_0x48113c:''),_0x14414e(0xee));}export function describeMenuErrorCause(_0x459901,_0x18fe49,_0x444562){const _0x5a59a2=a180_0x58dae7,_0x2d4543=mapMenuApiError(_0x459901,_0x18fe49,_0x444562);return{'causeCode':_0x2d4543[_0x5a59a2(0x135)],'causeMessage':_0x2d4543[_0x5a59a2(0x10d)]};}export function hasFlag(_0x171cf2,_0x1bcafe){const _0x24005e=a180_0x58dae7;return Object[_0x24005e(0x122)]['hasOwnProperty']['call'](_0x171cf2[_0x24005e(0x12f)],_0x1bcafe)&&_0x171cf2[_0x24005e(0x12f)][_0x1bcafe]!==undefined;}export function toApiParentId(_0x13008a){return _0x13008a??0x0;}export function formatParent(_0x572151){const _0x2e83e6=a180_0x58dae7;return _0x572151==null?_0x2e83e6(0xe9):String(_0x572151);}export function menuError(_0x567eb5,_0x504cea,_0x47a8b5){return new CliError(_0x567eb5,0x1,_0x504cea,_0x47a8b5);}export function mapMenuApiError(_0x1c0155,_0x2678b6,_0x2393c9){const _0x2682b1=a180_0x58dae7;if(_0x1c0155 instanceof CliError&&_0x1c0155[_0x2682b1(0x135)]!=='api_error')return _0x1c0155;const _0x4850cf=_0x1c0155 instanceof Error?_0x1c0155[_0x2682b1(0x10d)]:String(_0x1c0155);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x2682b1(0x105)](_0x4850cf))return menuError(_0x2682b1(0x101),'Permission\x20denied\x20while\x20attempting\x20to\x20'+_0x2678b6+(_0x2393c9?_0x2682b1(0x106)+_0x2393c9:'')+'.',_0x2682b1(0x11b));return menuError(_0x2682b1(0x124),_0x2682b1(0x110)+_0x2678b6+(_0x2393c9?_0x2682b1(0x106)+_0x2393c9:'')+':\x20'+_0x4850cf,_0x2682b1(0x132));}export function isMenuResponseLoss(_0x30f6db){const _0x1bda4f=a180_0x58dae7,_0x23c7ac=_0x30f6db instanceof Error?_0x30f6db['message']:String(_0x30f6db);if(_0x30f6db instanceof CliError)return _0x30f6db[_0x1bda4f(0x135)]===_0x1bda4f(0x12a)&&/^Request (?:failed|timeout):/i[_0x1bda4f(0x105)](_0x23c7ac);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x1bda4f(0x105)](_0x23c7ac);}function stateDrift(_0x20720d){const _0x334c42=a180_0x58dae7;return menuError(_0x334c42(0x151),_0x20720d,_0x334c42(0x11d));}
1
+ const a180_0x4f6c0f=a180_0x3b8b;(function(_0x581fc6,_0x19b88d){const _0x351399=a180_0x3b8b,_0x5e20fc=_0x581fc6();while(!![]){try{const _0x5788cd=-parseInt(_0x351399(0xda))/0x1+parseInt(_0x351399(0xcf))/0x2+parseInt(_0x351399(0xfa))/0x3+parseInt(_0x351399(0x118))/0x4+parseInt(_0x351399(0xd2))/0x5+-parseInt(_0x351399(0x110))/0x6*(-parseInt(_0x351399(0xdd))/0x7)+-parseInt(_0x351399(0xe0))/0x8;if(_0x5788cd===_0x19b88d)break;else _0x5e20fc['push'](_0x5e20fc['shift']());}catch(_0x31f262){_0x5e20fc['push'](_0x5e20fc['shift']());}}}(a180_0x3ca1,0x74ed8));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':a180_0x4f6c0f(0xc4),'required':!![],'description':a180_0x4f6c0f(0x10e)};export const MENU_SORT_FLAG={'name':a180_0x4f6c0f(0xf0),'type':a180_0x4f6c0f(0xc4),'description':a180_0x4f6c0f(0xc9)};export const MENU_PARENT_ID_FLAG={'name':a180_0x4f6c0f(0x105),'type':'string','description':a180_0x4f6c0f(0xf4)};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a180_0x4f6c0f(0xee),'type':'string','description':a180_0x4f6c0f(0x102)};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a180_0x4f6c0f(0xe1),'type':a180_0x4f6c0f(0xeb),'description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':'expected-children-count','type':a180_0x4f6c0f(0xc4),'description':'Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches'}];export function validateExactId(_0x4a9b84){const _0x464272=a180_0x4f6c0f,_0x2d3328=_0x4a9b84[_0x464272(0xf6)]('id');if(!Number['isSafeInteger'](_0x2d3328)||_0x2d3328<=0x0)throw CliErrors[_0x464272(0xe3)](_0x464272(0x10a));return _0x2d3328;}export function validateSort(_0x526e18,_0x25c10d=a180_0x4f6c0f(0xf0)){const _0x29baf4=a180_0x4f6c0f;if(!hasFlag(_0x526e18,_0x25c10d))return undefined;const _0x5ff994=_0x526e18['num'](_0x25c10d);if(!Number[_0x29baf4(0xdf)](_0x5ff994)||_0x5ff994<0x0||_0x5ff994>MAX_MENU_SORT)throw menuError('menu_sort_invalid','--'+_0x25c10d+_0x29baf4(0xc5)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x5ff994;}export function nextSiblingSort(_0x5cb1a9,_0x2bdd39,_0x2fcaba){const _0x12ebd2=a180_0x4f6c0f,_0x3e1c63=getChildren(_0x5cb1a9,_0x2bdd39)[_0x12ebd2(0x11c)](_0x17b4fa=>_0x17b4fa['sort'])[_0x12ebd2(0xd8)](_0x3aabc4=>typeof _0x3aabc4===_0x12ebd2(0xc4));if(_0x3e1c63[_0x12ebd2(0x104)]===0x0)return 0x0;const _0x219720=Math[_0x12ebd2(0x11a)](..._0x3e1c63);if(_0x219720>=MAX_MENU_SORT)throw menuError(_0x12ebd2(0x10d),_0x12ebd2(0x12f)+_0x2fcaba+_0x12ebd2(0xea)+_0x219720+'.',_0x12ebd2(0x113)+MAX_MENU_SORT+_0x12ebd2(0xcb));return _0x219720+0x1;}export function requireExplicitYes(_0x1ba839){const _0x3ad8b0=a180_0x4f6c0f;if(_0x1ba839['bool']('dry-run'))return;if(!_0x1ba839[_0x3ad8b0(0x108)](_0x3ad8b0(0xed)))throw menuError(_0x3ad8b0(0x107),_0x3ad8b0(0xe7),_0x3ad8b0(0xf7));}export async function fetchMutationSnapshot(_0x1fb477,_0x5658c3,_0x2b75fb){const _0x3081ed=a180_0x4f6c0f;try{return await fetchMenuSnapshot(_0x1fb477[_0x3081ed(0x124)],_0x1fb477[_0x3081ed(0x117)]);}catch(_0x51bf8b){throw mapMenuApiError(_0x51bf8b,_0x3081ed(0x128)+_0x5658c3,_0x2b75fb);}}export async function recheckMutationSnapshot(_0x22a2c2,_0x25190d,_0x35ce5c,_0x5d0cab){const _0x4a3157=a180_0x4f6c0f;let _0x4d7f57;try{_0x4d7f57=await fetchMenuSnapshot(_0x22a2c2[_0x4a3157(0x124)],_0x22a2c2[_0x4a3157(0x117)]);}catch(_0x1e2b3e){const _0x5f2fd8=mapMenuApiError(_0x1e2b3e,_0x4a3157(0x11b)+_0x35ce5c,_0x5d0cab);throw menuFailure(_0x5f2fd8,_0x25190d,{'stage':_0x4a3157(0xe5),'failed':_0x5d0cab==null?{}:{'id':_0x5d0cab}});}if(_0x4d7f57['hash']!==_0x25190d[_0x4a3157(0xf2)]){const _0x54c7db=menuError(_0x4a3157(0x119),'Online\x20menu\x20state\x20changed\x20before\x20'+_0x35ce5c+_0x4a3157(0x10c),_0x4a3157(0x115));throw menuFailure(_0x54c7db,_0x25190d,{'stage':'pre-write-recheck','failed':{..._0x5d0cab==null?{}:{'id':_0x5d0cab},'expectedSnapshotHash':_0x25190d[_0x4a3157(0xf2)],'currentSnapshotHash':_0x4d7f57[_0x4a3157(0xcc)]}});}return _0x4d7f57;}export function parseParentId(_0x487d58,_0x4413d1,_0x4b63d3={}){const _0x109f8a=a180_0x4f6c0f;if(!hasFlag(_0x487d58,_0x4413d1)){if(_0x4b63d3[_0x109f8a(0x11f)])throw CliErrors['flagMissing'](_0x4413d1);return undefined;}const _0x562aa5=_0x487d58[_0x109f8a(0xec)](_0x4413d1)[_0x109f8a(0xe4)]();if(_0x562aa5[_0x109f8a(0x10f)]()===_0x109f8a(0x100))return null;if(!/^\d+$/[_0x109f8a(0x125)](_0x562aa5))throw CliErrors['validation']('--'+_0x4413d1+_0x109f8a(0xdc));const _0x1ea2a8=Number(_0x562aa5);if(!Number[_0x109f8a(0xdf)](_0x1ea2a8)||_0x1ea2a8<=0x0)throw CliErrors['validation']('--'+_0x4413d1+_0x109f8a(0xdc));return _0x1ea2a8;}export function requireMenu(_0x2656ff,_0x34f9e7){const _0x20d3c9=a180_0x4f6c0f,_0x35d507=_0x2656ff[_0x20d3c9(0xc3)][_0x20d3c9(0xd6)](_0x34f9e7);if(!_0x35d507)throw menuError(_0x20d3c9(0xc7),_0x20d3c9(0xfb)+_0x34f9e7,_0x20d3c9(0x120));return _0x35d507;}export function requireFolder(_0x136c53,_0x2937e0){const _0x4f7ac4=a180_0x4f6c0f,_0x3d7f41=requireMenu(_0x136c53,_0x2937e0);if(_0x3d7f41[_0x4f7ac4(0xe2)]!==_0x4f7ac4(0x126))throw menuError(_0x4f7ac4(0x112),_0x4f7ac4(0x114)+_0x2937e0+_0x4f7ac4(0x10b)+(_0x3d7f41[_0x4f7ac4(0xe2)]||_0x4f7ac4(0xca))+_0x4f7ac4(0xff),_0x4f7ac4(0x103));return _0x3d7f41;}export function assertExpectedState(_0x36cc55,_0x40011a){const _0xe9fc6a=a180_0x4f6c0f;if(hasFlag(_0x36cc55,'expect-parent-id')){const _0x2e5e80=parseParentId(_0x36cc55,_0xe9fc6a(0xee),{'required':!![]});if(_0x40011a[_0xe9fc6a(0x121)]!==_0x2e5e80)throw stateDrift(_0xe9fc6a(0x114)+_0x40011a['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x2e5e80)+',\x20current\x20'+formatParent(_0x40011a[_0xe9fc6a(0x121)])+'.');}if(hasFlag(_0x36cc55,_0xe9fc6a(0xe1))){const _0x4a9a7c=_0x36cc55[_0xe9fc6a(0xec)](_0xe9fc6a(0xe1));if(_0x40011a[_0xe9fc6a(0x101)]!==_0x4a9a7c)throw stateDrift('Menu\x20'+_0x40011a['id']+'\x20path\x20changed:\x20expected\x20'+JSON[_0xe9fc6a(0xd1)](_0x4a9a7c)+',\x20current\x20'+JSON['stringify'](_0x40011a[_0xe9fc6a(0x101)])+'.');}if(hasFlag(_0x36cc55,_0xe9fc6a(0xfc))){const _0xdf76c2=_0x36cc55[_0xe9fc6a(0xf6)](_0xe9fc6a(0xfc));if(!Number[_0xe9fc6a(0xdf)](_0xdf76c2)||_0xdf76c2<0x0)throw CliErrors[_0xe9fc6a(0xe3)](_0xe9fc6a(0xde));if(_0x40011a[_0xe9fc6a(0xd4)]!==_0xdf76c2)throw stateDrift('Menu\x20'+_0x40011a['id']+_0xe9fc6a(0x11e)+_0xdf76c2+_0xe9fc6a(0xd3)+_0x40011a[_0xe9fc6a(0xd4)]+'.');}}export function assertVerified(_0x340d1a,_0x4c7f82,_0x16f46d=a180_0x4f6c0f(0x123)){if(!_0x340d1a)throw menuError('menu_verification_failed',_0x4c7f82,_0x16f46d);}function a180_0x3b8b(_0xfe1cdc,_0x513f98){_0xfe1cdc=_0xfe1cdc-0xc3;const _0x3ca112=a180_0x3ca1();let _0x3b8bf1=_0x3ca112[_0xfe1cdc];return _0x3b8bf1;}export function mutationResult(_0x479457){const _0x5df7c8=a180_0x4f6c0f;return{'operation':_0x479457[_0x5df7c8(0x12a)],'selector':_0x479457[_0x5df7c8(0xd9)],'before':_0x479457[_0x5df7c8(0xd7)],'after':_0x479457[_0x5df7c8(0xce)],'dryRun':_0x479457[_0x5df7c8(0xf3)],'backend':_0x479457[_0x5df7c8(0x11d)],..._0x479457['plannedActions']?{'plannedActions':_0x479457['plannedActions']}:{},..._0x479457[_0x5df7c8(0xd5)]?{'targets':_0x479457[_0x5df7c8(0xd5)]}:{},..._0x479457[_0x5df7c8(0x12e)]?{'deleteOrder':_0x479457['deleteOrder']}:{},'snapshotHash':_0x479457['snapshotHash'],..._0x479457[_0x5df7c8(0x129)]?{'cascade':_0x479457[_0x5df7c8(0x129)]}:{},..._0x479457['planFile']?{'planFile':_0x479457[_0x5df7c8(0xe8)]}:{},'succeeded':_0x479457[_0x5df7c8(0xfd)]??[],'failed':_0x479457[_0x5df7c8(0xef)]??[],'warnings':_0x479457[_0x5df7c8(0x12c)]??[],'verification':_0x479457[_0x5df7c8(0xdb)],'error':_0x479457['error']};}export function menuDryRunResult(_0x5cdbce,_0x288341){return{..._0x5cdbce,..._0x288341};}export function menuFailure(_0x384693,_0x351441,_0x5580bf){const _0x3bd589=a180_0x4f6c0f,_0x57fa87=mutationResult({..._0x351441,'after':_0x5580bf[_0x3bd589(0xce)]===undefined?_0x351441[_0x3bd589(0xce)]:_0x5580bf[_0x3bd589(0xce)],'backend':_0x5580bf[_0x3bd589(0x11d)]??_0x351441[_0x3bd589(0x11d)],'dryRun':![],'succeeded':_0x5580bf[_0x3bd589(0xfd)]??[],'failed':_0x5580bf['failedRecords']??[{..._0x5580bf['failed']??{},'stage':_0x5580bf[_0x3bd589(0xe6)],'code':_0x384693['code'],'message':_0x384693[_0x3bd589(0xcd)]}],'warnings':[..._0x351441[_0x3bd589(0x12c)],..._0x5580bf[_0x3bd589(0x12c)]??[]],'verification':_0x5580bf['verification'],'error':{'code':_0x384693[_0x3bd589(0x106)],'message':_0x384693[_0x3bd589(0xcd)],..._0x384693[_0x3bd589(0x109)]?{'hint':_0x384693['hint']}:{}}});return Object[_0x3bd589(0x122)](_0x384693,_0x3bd589(0xf9),{'value':_0x57fa87,'enumerable':!![],'configurable':!![]}),_0x384693;}export function asVerificationError(_0x186dbb,_0x2b3796){const _0x5ba40f=a180_0x4f6c0f;if(_0x186dbb instanceof CliError&&_0x186dbb['code']===_0x5ba40f(0x127))return _0x186dbb;const _0x15843b=_0x186dbb instanceof Error?_0x186dbb[_0x5ba40f(0xcd)]:String(_0x186dbb);return menuError(_0x5ba40f(0x127),''+_0x2b3796+(_0x15843b?':\x20'+_0x15843b:''),_0x5ba40f(0xf1));}export function describeMenuErrorCause(_0x2726f8,_0x284a07,_0x2dc808){const _0x13f4b6=a180_0x4f6c0f,_0x5bcaf9=mapMenuApiError(_0x2726f8,_0x284a07,_0x2dc808);return{'causeCode':_0x5bcaf9[_0x13f4b6(0x106)],'causeMessage':_0x5bcaf9[_0x13f4b6(0xcd)]};}export function hasFlag(_0x2e1f7,_0x23be20){const _0x58277e=a180_0x4f6c0f;return Object[_0x58277e(0xf5)][_0x58277e(0xc6)][_0x58277e(0xf8)](_0x2e1f7['rawFlags'],_0x23be20)&&_0x2e1f7['rawFlags'][_0x23be20]!==undefined;}export function toApiParentId(_0x6932ff){return _0x6932ff??0x0;}function a180_0x3ca1(){const _0x1c3226=['after','474678yoPKqW','Permission\x20denied\x20while\x20attempting\x20to\x20','stringify','4040900xeoZLJ',',\x20current\x20','childrenCount','targets','get','before','filter','selector','578177DVgyru','verification','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','793709CguioT','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','isSafeInteger','20946592AaUDiy','expect-path','type','validation','trim','pre-write-recheck','stage','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','planFile','\x20menu\x20','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','string','str','yes','expect-parent-id','failed','sort','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','snapshotHash','dryRun','Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node','prototype','num','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','call','data','2305452DSMcAw','Online\x20menu\x20not\x20found:\x20','expected-children-count','succeeded','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','\x22,\x20not\x20folder.','root','path','Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','length','parent-id','code','menu_confirmation_required','bool','hint','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','\x20is\x20type\x20\x22',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','menu_sort_overflow','Exact\x20online\x20menu\x20id','toLowerCase','48dfxOPI','Failed\x20to\x20','menu_parent_not_folder','Reorder\x20sibling\x20menus\x20below\x20','Menu\x20','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','cookie','3817352obrgSq','menu_state_drift','max','recheck\x20online\x20menu\x20facts\x20before\x20','map','backend','\x20child\x20count\x20changed:\x20expected\x20','required','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','parentId','defineProperty','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','appCode','test','folder','menu_verification_failed','read\x20online\x20menu\x20facts\x20before\x20','cascade','operation','api_error','warnings','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','deleteOrder','Cannot\x20append\x20a\x20','byId','number','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','hasOwnProperty','menu_not_found','menu_permission_denied','Sibling\x20sort\x20value\x20(non-negative\x20integer)','unknown',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','hash','message'];a180_0x3ca1=function(){return _0x1c3226;};return a180_0x3ca1();}export function formatParent(_0x956819){return _0x956819==null?'root':String(_0x956819);}export function menuError(_0x5db20a,_0x1d50d5,_0x805d8d){return new CliError(_0x5db20a,0x1,_0x1d50d5,_0x805d8d);}export function mapMenuApiError(_0x263ac9,_0x31c068,_0x1813e4){const _0x4b142f=a180_0x4f6c0f;if(_0x263ac9 instanceof CliError&&_0x263ac9[_0x4b142f(0x106)]!==_0x4b142f(0x12b))return _0x263ac9;const _0x51694a=_0x263ac9 instanceof Error?_0x263ac9[_0x4b142f(0xcd)]:String(_0x263ac9);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x4b142f(0x125)](_0x51694a))return menuError(_0x4b142f(0xc8),_0x4b142f(0xd0)+_0x31c068+(_0x1813e4?'\x20menu\x20'+_0x1813e4:'')+'.',_0x4b142f(0xfe));return menuError('menu_mutation_failed',_0x4b142f(0x111)+_0x31c068+(_0x1813e4?_0x4b142f(0xe9)+_0x1813e4:'')+':\x20'+_0x51694a,_0x4b142f(0x12d));}export function isMenuResponseLoss(_0x29ef87){const _0x5a8a38=a180_0x4f6c0f,_0x115014=_0x29ef87 instanceof Error?_0x29ef87['message']:String(_0x29ef87);if(_0x29ef87 instanceof CliError)return _0x29ef87['code']==='api_error'&&/^Request (?:failed|timeout):/i[_0x5a8a38(0x125)](_0x115014);return/timeout|timed out|ECONNRESET|socket hang up|network|fetch failed|connection closed|aborted|terminated|unexpected end of JSON|premature close|body stream/i[_0x5a8a38(0x125)](_0x115014);}function stateDrift(_0x1b0633){const _0x2fb8d9=a180_0x4f6c0f;return menuError('menu_state_drift',_0x1b0633,_0x2fb8d9(0x116));}
@@ -1 +1 @@
1
- function a181_0x2cf4(_0x72b45b,_0x14afb5){_0x72b45b=_0x72b45b-0x16e;const _0x550eae=a181_0x550e();let _0x2cf432=_0x550eae[_0x72b45b];return _0x2cf432;}(function(_0x3a9953,_0x4654d3){const _0x5091fe=a181_0x2cf4,_0xd36b11=_0x3a9953();while(!![]){try{const _0x56aede=parseInt(_0x5091fe(0x16e))/0x1+parseInt(_0x5091fe(0x173))/0x2*(-parseInt(_0x5091fe(0x176))/0x3)+parseInt(_0x5091fe(0x174))/0x4+parseInt(_0x5091fe(0x179))/0x5*(-parseInt(_0x5091fe(0x175))/0x6)+-parseInt(_0x5091fe(0x178))/0x7+parseInt(_0x5091fe(0x177))/0x8*(parseInt(_0x5091fe(0x171))/0x9)+-parseInt(_0x5091fe(0x16f))/0xa*(-parseInt(_0x5091fe(0x172))/0xb);if(_0x56aede===_0x4654d3)break;else _0xd36b11['push'](_0xd36b11['shift']());}catch(_0x345349){_0xd36b11['push'](_0xd36b11['shift']());}}}(a181_0x550e,0x90b58));export function menuPathKey(_0x3e01d4){const _0x4e5088=a181_0x2cf4,_0x50851f=_0x3e01d4[_0x4e5088(0x17a)]();if(!_0x50851f)return'';return _0x50851f[_0x4e5088(0x170)](/^\/+/,'')[_0x4e5088(0x170)](/\/+$/,'')||'/';}function a181_0x550e(){const _0x4b94d9=['2283149WMTovH','2622FfBXhf','3197332VAtZvg','115458kkAtuk','1209tnWoye','4558616yYWjMA','5981150SdmMmf','65PMZnCE','trim','648951TVGXNe','10zqABAP','replace','9QBimYS'];a181_0x550e=function(){return _0x4b94d9;};return a181_0x550e();}
1
+ function a181_0x2226(_0x184cb9,_0x3b16b6){_0x184cb9=_0x184cb9-0x19f;const _0x219099=a181_0x2190();let _0x222605=_0x219099[_0x184cb9];return _0x222605;}(function(_0x29663a,_0x205f4f){const _0xb3d65a=a181_0x2226,_0x13eb69=_0x29663a();while(!![]){try{const _0x433a02=parseInt(_0xb3d65a(0x1a9))/0x1*(-parseInt(_0xb3d65a(0x1a2))/0x2)+-parseInt(_0xb3d65a(0x1a6))/0x3+parseInt(_0xb3d65a(0x1a1))/0x4+-parseInt(_0xb3d65a(0x1a7))/0x5*(parseInt(_0xb3d65a(0x1a4))/0x6)+-parseInt(_0xb3d65a(0x1a3))/0x7+parseInt(_0xb3d65a(0x1a0))/0x8+parseInt(_0xb3d65a(0x1a5))/0x9;if(_0x433a02===_0x205f4f)break;else _0x13eb69['push'](_0x13eb69['shift']());}catch(_0x3a38b5){_0x13eb69['push'](_0x13eb69['shift']());}}}(a181_0x2190,0x2981a));function a181_0x2190(){const _0x1ed93d=['505044nWgyDj','20050ZyNfjH','trim','109345VgNYle','replace','183368MiJOPj','258120FcAQhT','2TPULIt','1342502ebhOMx','258pjpOpc','6520212ViRGbV'];a181_0x2190=function(){return _0x1ed93d;};return a181_0x2190();}export function menuPathKey(_0x587ab5){const _0x370181=a181_0x2226,_0x3df7f6=_0x587ab5[_0x370181(0x1a8)]();if(!_0x3df7f6)return'';return _0x3df7f6[_0x370181(0x19f)](/^\/+/,'')[_0x370181(0x19f)](/\/+$/,'')||'/';}
@@ -1 +1 @@
1
- (function(_0x431d01,_0x264d67){const _0x27fc5d=a182_0x20dd,_0x653f38=_0x431d01();while(!![]){try{const _0x11fbbe=parseInt(_0x27fc5d(0x164))/0x1*(-parseInt(_0x27fc5d(0x169))/0x2)+-parseInt(_0x27fc5d(0x16d))/0x3*(parseInt(_0x27fc5d(0x171))/0x4)+parseInt(_0x27fc5d(0x157))/0x5+-parseInt(_0x27fc5d(0x167))/0x6+-parseInt(_0x27fc5d(0x172))/0x7*(-parseInt(_0x27fc5d(0x17c))/0x8)+-parseInt(_0x27fc5d(0x159))/0x9*(-parseInt(_0x27fc5d(0x168))/0xa)+-parseInt(_0x27fc5d(0x165))/0xb*(-parseInt(_0x27fc5d(0x15e))/0xc);if(_0x11fbbe===_0x264d67)break;else _0x653f38['push'](_0x653f38['shift']());}catch(_0x3b1d70){_0x653f38['push'](_0x653f38['shift']());}}}(a182_0x1e2d,0x73106));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 a182_0x21ad8f,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x1d73eb,_0x1ec66b){const _0x61d94b=a182_0x20dd,_0x1b480a=getEnv();logger['info'](_0x61d94b(0x156),isProduction(_0x1b480a)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x1d73eb+')':_0x61d94b(0x173)+_0x1d73eb+')');const _0x225572=await fetchMenuSnapshot(_0x1d73eb,_0x1ec66b,{'verbose':!![]});return logger[_0x61d94b(0x174)](_0x61d94b(0x156),_0x61d94b(0x17a)+_0x225572[_0x61d94b(0x184)]+_0x61d94b(0x180)),_0x225572[_0x61d94b(0x16b)][_0x61d94b(0x16a)](toProcessedMenuItem);}export async function createMenu(_0xe7e295,_0x1990a6,_0x21186c){const _0x55862c=a182_0x20dd;logger[_0x55862c(0x174)]('create-menu',_0x55862c(0x160)+_0x21186c['label']+'\x20('+_0x21186c['path']+')');const _0x5abc63={'appCode':_0xe7e295,'type':_0x55862c(0x16e),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x21186c[_0x55862c(0x15b)]?JSON[_0x55862c(0x162)](_0x21186c[_0x55862c(0x15b)]):undefined},..._0x21186c},_0x1a2505=await createMenuRecord(_0x5abc63,_0x1990a6,_0x55862c(0x16f)+_0x21186c[_0x55862c(0x17d)]+'\x22');return logger['info'](_0x55862c(0x176),'Menu\x20created\x20successfully:\x20'+_0x21186c['label']),_0x1a2505;}function a182_0x1e2d(){const _0x8262e0=['number','328797Yixwhi','Batch\x20menu\x20creation\x20completed,\x20total\x20','resources','Update\x20menu\x20assets\x20\x22','update-menu-cdn-url','24ORddaH','create-menus','Creating\x20menu:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','stringify','parentId','103TqxsuL','593549zvJMJk','import','4218216rEKJfk','210FUOtko','10966MonLZN','map','menus','\x20menu','9249uleEpW','procode','Create\x20menu\x20\x22','order','184bLXGHA','826kNPiPd','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','info','appName','create-menu','Delete\x20','all','path','Fetched\x20','menuGroups','60728XyYzWf','label','Updating\x20menu\x20asset\x20links:\x20','\x20menu\x20group(s)','\x20online\x20menus\x20successfully','length','Menu\x20assets\x20synced:\x20','visible','total','extend','get-online-menu-list','550280icYWtt'];a182_0x1e2d=function(){return _0x8262e0;};return a182_0x1e2d();}async function createSingleMenu(_0x5cf440,_0x577b82,_0x42879e,_0x337efc,_0x517c32){const _0xfc5f3f=a182_0x20dd,_0x4a506d={'appCode':_0x5cf440,'type':_0xfc5f3f(0x16e),'sort':_0xfc5f3f(0x170)in _0x42879e&&typeof _0x42879e['order']===_0xfc5f3f(0x158)?_0x42879e[_0xfc5f3f(0x170)]:0x0,..._0xfc5f3f(0x183)in _0x42879e&&typeof _0x42879e[_0xfc5f3f(0x183)]==='boolean'?{'visible':_0x42879e[_0xfc5f3f(0x183)]}:{},..._0xfc5f3f(0x163)in _0x42879e&&typeof _0x42879e[_0xfc5f3f(0x163)]===_0xfc5f3f(0x158)?{'parentId':_0x42879e['parentId']}:{},'extend':{..._0x517c32?.[_0xfc5f3f(0x175)]?{'appName':_0x517c32['appName']}:{},'loadScriptMode':_0xfc5f3f(0x166),'resources':_0x337efc?JSON[_0xfc5f3f(0x162)](_0x337efc):undefined},'label':_0x42879e[_0xfc5f3f(0x17d)],'path':_0x42879e[_0xfc5f3f(0x179)]},_0x5959e3=await createMenuRecord(_0x4a506d,_0x577b82,'Create\x20menu\x20\x22'+_0x42879e['label']+'\x22');return logger[_0xfc5f3f(0x174)](_0xfc5f3f(0x176),'Menu\x20created\x20successfully:\x20'+_0x42879e[_0xfc5f3f(0x17d)]),_0x5959e3;}export async function createMenus(_0x28a530,_0x287831,_0x31144a,_0x549357,_0xdefc7d){const _0x25f7f3=a182_0x20dd;logger[_0x25f7f3(0x174)]('create-menus',_0x25f7f3(0x161)+_0x31144a[_0x25f7f3(0x181)]);const _0xf77d65=await Promise[_0x25f7f3(0x178)](_0x31144a[_0x25f7f3(0x16a)](_0x48657a=>createSingleMenu(_0x28a530,_0x287831,_0x48657a,_0x549357,_0xdefc7d)));return logger['info'](_0x25f7f3(0x15f),_0x25f7f3(0x15a)+_0x31144a[_0x25f7f3(0x181)]),_0xf77d65;}export async function updateMenuCdnUrl(_0x2f335e,_0x18d089,_0x48b06d){const _0x1ba2ff=a182_0x20dd;logger['info'](_0x1ba2ff(0x15d),_0x1ba2ff(0x17e)+_0x48b06d['label']+'\x20('+_0x48b06d[_0x1ba2ff(0x179)]+')');const _0x5d6082={'id':_0x48b06d['id'],'appCode':_0x2f335e,'extend':{..._0x48b06d[_0x1ba2ff(0x155)]??{},..._0x48b06d['loadScriptMode']?{'loadScriptMode':_0x48b06d['loadScriptMode']}:{},'resources':_0x48b06d[_0x1ba2ff(0x15b)]?JSON['stringify'](_0x48b06d[_0x1ba2ff(0x15b)]):undefined}},_0x46670e=await updateMenuRecord(_0x5d6082,_0x18d089,_0x1ba2ff(0x15c)+_0x48b06d['label']+'\x22');return logger[_0x1ba2ff(0x174)](_0x1ba2ff(0x15d),_0x1ba2ff(0x182)+_0x48b06d[_0x1ba2ff(0x17d)],undefined),_0x46670e;}function a182_0x20dd(_0xed1924,_0x1af1c1){_0xed1924=_0xed1924-0x155;const _0x1e2d37=a182_0x1e2d();let _0x20dd2a=_0x1e2d37[_0xed1924];return _0x20dd2a;}export async function createMenuEntity(_0x92c2f7,_0x4a9599,_0x4dae40){const _0x930796=a182_0x20dd;return createMenuRecord({'appCode':_0x92c2f7,..._0x4dae40},_0x4a9599,'Create\x20menu\x20\x22'+_0x4dae40[_0x930796(0x17d)]+'\x22');}export async function updateMenuEntity(_0x346625,_0x1df40c,_0x192738){return updateMenuRecord({'appCode':_0x346625,..._0x192738},_0x1df40c,'Update\x20menu\x20'+_0x192738['id']);}export async function batchDeleteMenuEntities(_0x2732e9,_0x14081b){const _0x5b9eb6=a182_0x20dd;return batchDeleteMenuRecords(_0x14081b,_0x2732e9,_0x5b9eb6(0x177)+_0x14081b[_0x5b9eb6(0x181)]+_0x5b9eb6(0x16c)+(_0x14081b[_0x5b9eb6(0x181)]===0x1?'':'s'));}export async function startMenuRegroup(_0x55a35d,_0x2cdac9){const _0x27a928=a182_0x20dd;return a182_0x21ad8f(_0x2cdac9,_0x55a35d,'Regroup\x20'+_0x2cdac9[_0x27a928(0x17b)]['length']+_0x27a928(0x17f));}
1
+ (function(_0x54993f,_0x14f720){const _0x4f1edb=a182_0x38b5,_0x13e61c=_0x54993f();while(!![]){try{const _0x16b49e=parseInt(_0x4f1edb(0x13a))/0x1*(-parseInt(_0x4f1edb(0x12c))/0x2)+-parseInt(_0x4f1edb(0x12f))/0x3*(parseInt(_0x4f1edb(0x12a))/0x4)+parseInt(_0x4f1edb(0x120))/0x5+parseInt(_0x4f1edb(0x118))/0x6+-parseInt(_0x4f1edb(0x117))/0x7*(-parseInt(_0x4f1edb(0x11b))/0x8)+parseInt(_0x4f1edb(0x139))/0x9+parseInt(_0x4f1edb(0x113))/0xa;if(_0x16b49e===_0x14f720)break;else _0x13e61c['push'](_0x13e61c['shift']());}catch(_0x5bd10e){_0x13e61c['push'](_0x13e61c['shift']());}}}(a182_0x1cce,0xa316c));function a182_0x1cce(){const _0x4b1961=['Updating\x20menu\x20asset\x20links:\x20','parentId','Menu\x20assets\x20synced:\x20','914710bBRAKN','Creating\x20menu:\x20','label','update-menu-cdn-url','889TODIsO','2213118NGTEWC','path','menuGroups','12088mQKWVy','length','\x20online\x20menus\x20successfully','resources','loadScriptMode','6196040EtERMC','appName','Batch\x20menu\x20creation\x20completed,\x20total\x20','Regroup\x20','menus','visible','Menu\x20created\x20successfully:\x20','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','number','82376JfOgAH','create-menu','2padTsk','total','map','192pomkgT','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20','create-menus','procode','order','Fetched\x20','stringify','Create\x20menu\x20\x22','import','7684920qCQjry','759281qXoSpN','Update\x20menu\x20','info','boolean'];a182_0x1cce=function(){return _0x4b1961;};return a182_0x1cce();}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 a182_0x422c74,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x12da1b,_0x317b1c){const _0x2b1ffc=a182_0x38b5,_0x574f3d=getEnv();logger['info'](_0x2b1ffc(0x128),isProduction(_0x574f3d)?_0x2b1ffc(0x127)+_0x12da1b+')':_0x2b1ffc(0x130)+_0x12da1b+')');const _0x51467a=await fetchMenuSnapshot(_0x12da1b,_0x317b1c,{'verbose':!![]});return logger[_0x2b1ffc(0x13c)](_0x2b1ffc(0x128),_0x2b1ffc(0x135)+_0x51467a[_0x2b1ffc(0x12d)]+_0x2b1ffc(0x11d)),_0x51467a[_0x2b1ffc(0x124)]['map'](toProcessedMenuItem);}function a182_0x38b5(_0x1b3d6c,_0x515d15){_0x1b3d6c=_0x1b3d6c-0x112;const _0x1cce31=a182_0x1cce();let _0x38b57c=_0x1cce31[_0x1b3d6c];return _0x38b57c;}export async function createMenu(_0x2a1c7f,_0x54c6f7,_0x522664){const _0x588e66=a182_0x38b5;logger[_0x588e66(0x13c)](_0x588e66(0x12b),_0x588e66(0x114)+_0x522664[_0x588e66(0x115)]+'\x20('+_0x522664[_0x588e66(0x119)]+')');const _0x156fd6={'appCode':_0x2a1c7f,'type':_0x588e66(0x133),'sort':0x0,'extend':{'loadScriptMode':_0x588e66(0x138),'resources':_0x522664[_0x588e66(0x11e)]?JSON['stringify'](_0x522664['resources']):undefined},..._0x522664},_0x5cb9c1=await createMenuRecord(_0x156fd6,_0x54c6f7,_0x588e66(0x137)+_0x522664[_0x588e66(0x115)]+'\x22');return logger[_0x588e66(0x13c)](_0x588e66(0x12b),_0x588e66(0x126)+_0x522664[_0x588e66(0x115)]),_0x5cb9c1;}async function createSingleMenu(_0x33df37,_0x49d69a,_0x35d61b,_0x17a142,_0x292d62){const _0x7a85e3=a182_0x38b5,_0xbe3ec0={'appCode':_0x33df37,'type':_0x7a85e3(0x133),'sort':_0x7a85e3(0x134)in _0x35d61b&&typeof _0x35d61b[_0x7a85e3(0x134)]===_0x7a85e3(0x129)?_0x35d61b[_0x7a85e3(0x134)]:0x0,...'visible'in _0x35d61b&&typeof _0x35d61b[_0x7a85e3(0x125)]===_0x7a85e3(0x13d)?{'visible':_0x35d61b['visible']}:{},..._0x7a85e3(0x13f)in _0x35d61b&&typeof _0x35d61b[_0x7a85e3(0x13f)]===_0x7a85e3(0x129)?{'parentId':_0x35d61b[_0x7a85e3(0x13f)]}:{},'extend':{..._0x292d62?.[_0x7a85e3(0x121)]?{'appName':_0x292d62['appName']}:{},'loadScriptMode':_0x7a85e3(0x138),'resources':_0x17a142?JSON['stringify'](_0x17a142):undefined},'label':_0x35d61b['label'],'path':_0x35d61b[_0x7a85e3(0x119)]},_0x1da33b=await createMenuRecord(_0xbe3ec0,_0x49d69a,'Create\x20menu\x20\x22'+_0x35d61b[_0x7a85e3(0x115)]+'\x22');return logger[_0x7a85e3(0x13c)](_0x7a85e3(0x12b),_0x7a85e3(0x126)+_0x35d61b['label']),_0x1da33b;}export async function createMenus(_0x4359d4,_0x2e0f97,_0x41c4ed,_0x39de5d,_0x376449){const _0x40c8da=a182_0x38b5;logger['info'](_0x40c8da(0x132),_0x40c8da(0x131)+_0x41c4ed['length']);const _0x4b4f7e=await Promise['all'](_0x41c4ed[_0x40c8da(0x12e)](_0x48ea8b=>createSingleMenu(_0x4359d4,_0x2e0f97,_0x48ea8b,_0x39de5d,_0x376449)));return logger[_0x40c8da(0x13c)](_0x40c8da(0x132),_0x40c8da(0x122)+_0x41c4ed[_0x40c8da(0x11c)]),_0x4b4f7e;}export async function updateMenuCdnUrl(_0x4e710a,_0x12a007,_0x4826b5){const _0xb116d9=a182_0x38b5;logger[_0xb116d9(0x13c)](_0xb116d9(0x116),_0xb116d9(0x13e)+_0x4826b5[_0xb116d9(0x115)]+'\x20('+_0x4826b5[_0xb116d9(0x119)]+')');const _0x20aed8={'id':_0x4826b5['id'],'appCode':_0x4e710a,'extend':{..._0x4826b5['extend']??{},..._0x4826b5[_0xb116d9(0x11f)]?{'loadScriptMode':_0x4826b5['loadScriptMode']}:{},'resources':_0x4826b5[_0xb116d9(0x11e)]?JSON[_0xb116d9(0x136)](_0x4826b5[_0xb116d9(0x11e)]):undefined}},_0x3881f0=await updateMenuRecord(_0x20aed8,_0x12a007,'Update\x20menu\x20assets\x20\x22'+_0x4826b5[_0xb116d9(0x115)]+'\x22');return logger[_0xb116d9(0x13c)](_0xb116d9(0x116),_0xb116d9(0x112)+_0x4826b5['label'],undefined),_0x3881f0;}export async function createMenuEntity(_0x246626,_0x309aa0,_0xc9f9){const _0x36290f=a182_0x38b5;return createMenuRecord({'appCode':_0x246626,..._0xc9f9},_0x309aa0,_0x36290f(0x137)+_0xc9f9[_0x36290f(0x115)]+'\x22');}export async function updateMenuEntity(_0x42fa81,_0x1c7357,_0x279020){const _0x50cc6d=a182_0x38b5;return updateMenuRecord({'appCode':_0x42fa81,..._0x279020},_0x1c7357,_0x50cc6d(0x13b)+_0x279020['id']);}export async function batchDeleteMenuEntities(_0x9664b6,_0x19deb5){const _0x1a8b02=a182_0x38b5;return batchDeleteMenuRecords(_0x19deb5,_0x9664b6,'Delete\x20'+_0x19deb5[_0x1a8b02(0x11c)]+'\x20menu'+(_0x19deb5[_0x1a8b02(0x11c)]===0x1?'':'s'));}export async function startMenuRegroup(_0x1b85bb,_0x4d3869){const _0x373b75=a182_0x38b5;return a182_0x422c74(_0x4d3869,_0x1b85bb,_0x373b75(0x123)+_0x4d3869[_0x373b75(0x11a)]['length']+'\x20menu\x20group(s)');}
@@ -1 +1 @@
1
- const a183_0x3bdeac=a183_0x4241;(function(_0x484128,_0x326be9){const _0x578931=a183_0x4241,_0x5a1f30=_0x484128();while(!![]){try{const _0x208825=-parseInt(_0x578931(0x182))/0x1+parseInt(_0x578931(0x19a))/0x2*(-parseInt(_0x578931(0x175))/0x3)+parseInt(_0x578931(0x198))/0x4*(parseInt(_0x578931(0x19b))/0x5)+parseInt(_0x578931(0x183))/0x6*(parseInt(_0x578931(0x18c))/0x7)+-parseInt(_0x578931(0x189))/0x8*(-parseInt(_0x578931(0x192))/0x9)+parseInt(_0x578931(0x188))/0xa+parseInt(_0x578931(0x172))/0xb*(-parseInt(_0x578931(0x18f))/0xc);if(_0x208825===_0x326be9)break;else _0x5a1f30['push'](_0x5a1f30['shift']());}catch(_0x309b74){_0x5a1f30['push'](_0x5a1f30['shift']());}}}(a183_0x5256,0x90faa));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function objectValue(_0x175959,_0x32bea5){const _0x256b2f=a183_0x4241,_0x31b98e=typeof _0x175959===_0x256b2f(0x17c)?parseJson(_0x175959,_0x32bea5):_0x175959;if(!_0x31b98e||typeof _0x31b98e!==_0x256b2f(0x173)||Array['isArray'](_0x31b98e))throw CliErrors[_0x256b2f(0x180)](_0x32bea5+'\x20must\x20be\x20a\x20JSON\x20object.');return _0x31b98e;}function parseJson(_0xc55fc3,_0xb3c5f1){const _0x2546fd=a183_0x4241;try{return JSON[_0x2546fd(0x193)](_0xc55fc3);}catch{throw CliErrors[_0x2546fd(0x180)](_0xb3c5f1+_0x2546fd(0x197));}}function resourceList(_0x4dd0f4,_0x3ac3e2){const _0x1c77aa=a183_0x4241;if(typeof _0x4dd0f4!==_0x1c77aa(0x17c))throw CliErrors[_0x1c77aa(0x180)](_0x3ac3e2+_0x1c77aa(0x178));const _0x578efa=parseJson(_0x4dd0f4,_0x3ac3e2);if(!Array[_0x1c77aa(0x194)](_0x578efa)||_0x578efa[_0x1c77aa(0x184)](_0x10da92=>typeof _0x10da92!==_0x1c77aa(0x17c)))throw CliErrors[_0x1c77aa(0x180)](_0x3ac3e2+_0x1c77aa(0x177));return _0x578efa;}export function buildSubappAssetsStatus(_0x1d43c7,_0x523708,_0x164048){const _0x160612=a183_0x4241,_0x14fe47=_0x1d43c7['extend']==null?{}:objectValue(_0x1d43c7[_0x160612(0x17e)],'app.extend'),_0xe6f797=_0x14fe47[_0x160612(0x19d)]==null?[]:typeof _0x14fe47[_0x160612(0x19d)]===_0x160612(0x17c)?parseJson(_0x14fe47['assets'],_0x160612(0x18a)):_0x14fe47[_0x160612(0x19d)];if(!Array[_0x160612(0x194)](_0xe6f797))throw CliErrors[_0x160612(0x180)](_0x160612(0x16f));const _0x5be829=_0xe6f797[_0x160612(0x16e)]((_0x1b36a9,_0x3f00f0)=>objectValue(_0x1b36a9,_0x160612(0x185)+_0x3f00f0+']')),_0x151461=_0x5be829[_0x160612(0x195)](_0x345bbc=>_0x345bbc[_0x160612(0x176)]===_0x164048);if(_0x151461[_0x160612(0x187)]>0x1)throw CliErrors[_0x160612(0x180)](_0x160612(0x170)+_0x164048+'.');const _0x2f7330=_0x151461[0x0],_0x17ddae=_0x2f7330?.[_0x160612(0x191)]==null?[]:resourceList(_0x2f7330[_0x160612(0x191)],_0x160612(0x19c)),_0xac7e94=_0x523708[_0x160612(0x195)](_0x1b0d7e=>_0x1b0d7e[_0x160612(0x17e)]?.[_0x160612(0x176)]===_0x164048),_0x2b3de7=_0xac7e94[_0x160612(0x16e)](_0x584cb5=>{const _0x2a1c53=_0x160612;let _0x5ea37c=null,_0x369219=null;try{_0x5ea37c=_0x584cb5[_0x2a1c53(0x17e)]?.[_0x2a1c53(0x191)]==null?_0x584cb5['resources']:resourceList(_0x584cb5['extend'][_0x2a1c53(0x191)],'menu\x20'+_0x584cb5['id']+_0x2a1c53(0x199));}catch(_0x33b126){_0x369219=_0x33b126 instanceof Error?_0x33b126[_0x2a1c53(0x196)]:String(_0x33b126);}const _0xc31d7=_0x17ddae[_0x2a1c53(0x187)]>0x0?_0x2a1c53(0x179):_0x2a1c53(0x186),_0xd00b24=_0xc31d7===_0x2a1c53(0x179)?_0x17ddae:_0x5ea37c;return{'id':_0x584cb5['id'],'path':_0x584cb5['path'],'preferredSourceIfSupported':_0xc31d7,'preferredResourcesIfSupported':_0xd00b24,'menuFallbackResources':_0x5ea37c,'menuFallbackError':_0x369219,'fallbackDiffers':_0x5ea37c===null?null:_0xc31d7===_0x2a1c53(0x179)&&_0x5ea37c['length']>0x0&&JSON[_0x2a1c53(0x17d)](_0x5ea37c)!==JSON[_0x2a1c53(0x17d)](_0xd00b24)};});return{'appName':_0x164048,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x2f7330),'sharedResources':_0x17ddae,'loadScriptMode':_0x2f7330?.[_0x160612(0x171)]??null,'basename':_0x2f7330?.[_0x160612(0x18b)]??null,'boundMenus':_0x2b3de7['length'],'staleMenuFallbacks':_0x2b3de7[_0x160612(0x195)](_0x14fc97=>_0x14fc97[_0x160612(0x181)])[_0x160612(0x187)],'menus':_0x2b3de7};}function a183_0x5256(){const _0x481b64=['length','4915630EKAzfa','1112EYIXJd','app.extend.assets','basename','1681141YGXFpd','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','--app-name\x20is\x20required.','1149204wEKrzc','No\x20shared\x20resources\x20configured\x20for\x20','resources','38322WYQtPl','parse','isArray','filter','message','\x20contains\x20invalid\x20JSON.','345248fxKYyO','\x20resources','2vUmYwi','65WLXAGJ','subapp.resources','assets','trim','map','app.extend.assets\x20must\x20be\x20an\x20array.','Duplicate\x20subapp\x20records\x20for\x20','loadScriptMode','121uNweRj','object','sharedResources','3120030LvcLZk','appName','\x20must\x20be\x20an\x20array\x20of\x20URLs.','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','app','app-name','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','string','stringify','extend','sharedConfigured','validation','fallbackDiffers','478852daZyKL','24DqmiWE','some','app.extend.assets[','menu'];a183_0x5256=function(){return _0x481b64;};return a183_0x5256();}function a183_0x4241(_0x328226,_0x48de77){_0x328226=_0x328226-0x16e;const _0x525697=a183_0x5256();let _0x424134=_0x525697[_0x328226];return _0x424134;}export async function assertSharedResourcesConfigured(_0x3e5c9f,_0x16d02a,_0x8c6ca1){const _0x4e4a11=a183_0x4241,_0x263421=await getSmartAppRecord(_0x3e5c9f,_0x16d02a),_0x1a6007=buildSubappAssetsStatus(_0x263421,[],_0x8c6ca1);if(!_0x1a6007[_0x4e4a11(0x17f)]||_0x1a6007[_0x4e4a11(0x174)]['length']===0x0)throw CliErrors[_0x4e4a11(0x180)](_0x4e4a11(0x190)+_0x8c6ca1+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a183_0x3bdeac(0x17b)},{'name':'app-name','type':a183_0x3bdeac(0x17c),'required':!![],'description':a183_0x3bdeac(0x18d)}];export function getSubappSelector(_0x56754d){const _0x33afa1=a183_0x3bdeac,_0xe4a403=_0x56754d['appCode'],_0x16eb47=_0x56754d['str'](_0x33afa1(0x17a))[_0x33afa1(0x19e)]();if(!_0x16eb47)throw CliErrors['validation'](_0x33afa1(0x18e));return{'appCode':_0xe4a403,'appName':_0x16eb47};}
1
+ const a183_0x4e9c27=a183_0x1014;(function(_0xdfe549,_0x4e2d5b){const _0xf77fe3=a183_0x1014,_0x2baca8=_0xdfe549();while(!![]){try{const _0x4092c0=-parseInt(_0xf77fe3(0x97))/0x1+-parseInt(_0xf77fe3(0xbb))/0x2*(-parseInt(_0xf77fe3(0xab))/0x3)+-parseInt(_0xf77fe3(0x93))/0x4+-parseInt(_0xf77fe3(0xbc))/0x5*(parseInt(_0xf77fe3(0xac))/0x6)+parseInt(_0xf77fe3(0xa4))/0x7*(-parseInt(_0xf77fe3(0x9b))/0x8)+parseInt(_0xf77fe3(0x92))/0x9+parseInt(_0xf77fe3(0xa2))/0xa;if(_0x4092c0===_0x4e2d5b)break;else _0x2baca8['push'](_0x2baca8['shift']());}catch(_0x56a573){_0x2baca8['push'](_0x2baca8['shift']());}}}(a183_0x37ef,0x911a9));import{getSmartAppRecord}from'../../../core/api-client.js';import{APPCODE_FLAG}from'../../../commands/common/flags.js';import{CliErrors}from'../../../errors.js';function a183_0x1014(_0x57b1e9,_0x2be199){_0x57b1e9=_0x57b1e9-0x90;const _0x37ef70=a183_0x37ef();let _0x1014d2=_0x37ef70[_0x57b1e9];return _0x1014d2;}function a183_0x37ef(){const _0x222eec=['sharedResources','extend','846mzakxr','2938870FChJOM','app','stringify','3522348BySpHv','2122056QyYYpU','\x20must\x20be\x20an\x20array\x20of\x20URLs.','app-name','appCode','328471VnHuFn','subapp.resources','\x20must\x20be\x20a\x20JSON\x20object.','trim','32nvqDlh','\x20contains\x20invalid\x20JSON.','\x20must\x20be\x20a\x20JSON\x20string\x20of\x20URLs.','sharedConfigured','menu','appName','validation','13028210avsILf','isArray','888951GkcipV','resources','--app-name\x20is\x20required.','basename','menu\x20','assets','filter','6063XNHiBq','6TFAqSO','parse','app.extend.assets[','app.extend','loadScriptMode','Explicit\x20frontend\x20subapp\x20appName\x20matching\x20host\x20assets\x20and\x20menu\x20bindings;\x20not\x20inferred\x20from\x20package\x20name\x20or\x20app\x20code','str','app.extend.assets','length','fallbackDiffers','Menu\x20host\x20app\x20code;\x20overrides\x20the\x20selected\x20workspace\x20app','message','string'];a183_0x37ef=function(){return _0x222eec;};return a183_0x37ef();}function objectValue(_0x2e072c,_0x32c1f2){const _0x409cd0=a183_0x1014,_0x4c637f=typeof _0x2e072c===_0x409cd0(0xb8)?parseJson(_0x2e072c,_0x32c1f2):_0x2e072c;if(!_0x4c637f||typeof _0x4c637f!=='object'||Array[_0x409cd0(0xa3)](_0x4c637f))throw CliErrors[_0x409cd0(0xa1)](_0x32c1f2+_0x409cd0(0x99));return _0x4c637f;}function parseJson(_0x20d8ce,_0x57d0b8){const _0x5861ca=a183_0x1014;try{return JSON[_0x5861ca(0xad)](_0x20d8ce);}catch{throw CliErrors[_0x5861ca(0xa1)](_0x57d0b8+_0x5861ca(0x9c));}}function resourceList(_0x361a78,_0x5c9521){const _0x433584=a183_0x1014;if(typeof _0x361a78!=='string')throw CliErrors['validation'](_0x5c9521+_0x433584(0x9d));const _0x32c10d=parseJson(_0x361a78,_0x5c9521);if(!Array[_0x433584(0xa3)](_0x32c10d)||_0x32c10d['some'](_0x57c8dc=>typeof _0x57c8dc!==_0x433584(0xb8)))throw CliErrors[_0x433584(0xa1)](_0x5c9521+_0x433584(0x94));return _0x32c10d;}export function buildSubappAssetsStatus(_0x18472c,_0xe8e6e6,_0xff9616){const _0x15bc6d=a183_0x1014,_0x15d825=_0x18472c[_0x15bc6d(0xba)]==null?{}:objectValue(_0x18472c[_0x15bc6d(0xba)],_0x15bc6d(0xaf)),_0xcdd9f8=_0x15d825[_0x15bc6d(0xa9)]==null?[]:typeof _0x15d825[_0x15bc6d(0xa9)]===_0x15bc6d(0xb8)?parseJson(_0x15d825[_0x15bc6d(0xa9)],_0x15bc6d(0xb3)):_0x15d825[_0x15bc6d(0xa9)];if(!Array['isArray'](_0xcdd9f8))throw CliErrors[_0x15bc6d(0xa1)]('app.extend.assets\x20must\x20be\x20an\x20array.');const _0x367ab4=_0xcdd9f8['map']((_0x4e2e33,_0x490de9)=>objectValue(_0x4e2e33,_0x15bc6d(0xae)+_0x490de9+']')),_0x18e536=_0x367ab4[_0x15bc6d(0xaa)](_0x1683be=>_0x1683be[_0x15bc6d(0xa0)]===_0xff9616);if(_0x18e536[_0x15bc6d(0xb4)]>0x1)throw CliErrors['validation']('Duplicate\x20subapp\x20records\x20for\x20'+_0xff9616+'.');const _0x11de69=_0x18e536[0x0],_0x4ab2e7=_0x11de69?.[_0x15bc6d(0xa5)]==null?[]:resourceList(_0x11de69[_0x15bc6d(0xa5)],_0x15bc6d(0x98)),_0x1b4975=_0xe8e6e6[_0x15bc6d(0xaa)](_0x198484=>_0x198484[_0x15bc6d(0xba)]?.[_0x15bc6d(0xa0)]===_0xff9616),_0x1cdbfd=_0x1b4975['map'](_0x518833=>{const _0x5246d2=_0x15bc6d;let _0x2e659b=null,_0x4436eb=null;try{_0x2e659b=_0x518833[_0x5246d2(0xba)]?.['resources']==null?_0x518833['resources']:resourceList(_0x518833[_0x5246d2(0xba)]['resources'],_0x5246d2(0xa8)+_0x518833['id']+'\x20resources');}catch(_0x349c86){_0x4436eb=_0x349c86 instanceof Error?_0x349c86[_0x5246d2(0xb7)]:String(_0x349c86);}const _0x9c1f55=_0x4ab2e7[_0x5246d2(0xb4)]>0x0?_0x5246d2(0x90):_0x5246d2(0x9f),_0x380c7d=_0x9c1f55===_0x5246d2(0x90)?_0x4ab2e7:_0x2e659b;return{'id':_0x518833['id'],'path':_0x518833['path'],'preferredSourceIfSupported':_0x9c1f55,'preferredResourcesIfSupported':_0x380c7d,'menuFallbackResources':_0x2e659b,'menuFallbackError':_0x4436eb,'fallbackDiffers':_0x2e659b===null?null:_0x9c1f55==='app'&&_0x2e659b['length']>0x0&&JSON['stringify'](_0x2e659b)!==JSON[_0x5246d2(0x91)](_0x380c7d)};});return{'appName':_0xff9616,'hostCapabilityVerified':![],'sharedConfigured':Boolean(_0x11de69),'sharedResources':_0x4ab2e7,'loadScriptMode':_0x11de69?.[_0x15bc6d(0xb0)]??null,'basename':_0x11de69?.[_0x15bc6d(0xa7)]??null,'boundMenus':_0x1cdbfd[_0x15bc6d(0xb4)],'staleMenuFallbacks':_0x1cdbfd[_0x15bc6d(0xaa)](_0x361342=>_0x361342[_0x15bc6d(0xb5)])[_0x15bc6d(0xb4)],'menus':_0x1cdbfd};}export async function assertSharedResourcesConfigured(_0x25d534,_0x2347fa,_0x3f4eab){const _0x8f08b3=a183_0x1014,_0x2e4aee=await getSmartAppRecord(_0x25d534,_0x2347fa),_0x3fe709=buildSubappAssetsStatus(_0x2e4aee,[],_0x3f4eab);if(!_0x3fe709[_0x8f08b3(0x9e)]||_0x3fe709[_0x8f08b3(0xb9)][_0x8f08b3(0xb4)]===0x0)throw CliErrors['validation']('No\x20shared\x20resources\x20configured\x20for\x20'+_0x3f4eab+'.');}export const SUBAPP_ASSET_SELECTOR_FLAGS=[{...APPCODE_FLAG,'required':![],'description':a183_0x4e9c27(0xb6)},{'name':a183_0x4e9c27(0x95),'type':'string','required':!![],'description':a183_0x4e9c27(0xb1)}];export function getSubappSelector(_0x2f28f4){const _0x44e3ef=a183_0x4e9c27,_0x2fc0b9=_0x2f28f4[_0x44e3ef(0x96)],_0x23d989=_0x2f28f4[_0x44e3ef(0xb2)](_0x44e3ef(0x95))[_0x44e3ef(0x9a)]();if(!_0x23d989)throw CliErrors['validation'](_0x44e3ef(0xa6));return{'appCode':_0x2fc0b9,'appName':_0x23d989};}
@@ -1 +1 @@
1
- const a184_0x5e1d43=a184_0x5034;(function(_0x869ccc,_0x236276){const _0x2d9807=a184_0x5034,_0x20bce2=_0x869ccc();while(!![]){try{const _0x2932a4=-parseInt(_0x2d9807(0x1c2))/0x1+-parseInt(_0x2d9807(0x1dd))/0x2+parseInt(_0x2d9807(0x1be))/0x3*(parseInt(_0x2d9807(0x1e9))/0x4)+parseInt(_0x2d9807(0x1d5))/0x5*(-parseInt(_0x2d9807(0x1b3))/0x6)+-parseInt(_0x2d9807(0x1d2))/0x7+parseInt(_0x2d9807(0x1ca))/0x8+-parseInt(_0x2d9807(0x1c6))/0x9*(-parseInt(_0x2d9807(0x1b9))/0xa);if(_0x2932a4===_0x236276)break;else _0x20bce2['push'](_0x20bce2['shift']());}catch(_0x451146){_0x20bce2['push'](_0x20bce2['shift']());}}}(a184_0x51c1,0xc14f0));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a184_0x5034(_0x1f3a01,_0x7fd4b4){_0x1f3a01=_0x1f3a01-0x1b2;const _0x51c1aa=a184_0x51c1();let _0x5034eb=_0x51c1aa[_0x1f3a01];return _0x5034eb;}function a184_0x51c1(){const _0x1e60b8=['string','hasOwn','5879736nRXfqg','Expected\x20one\x20folder\x20named\x20\x22','isArray','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','boolean','folder','parse','--params.','3727738unugVh','appName','\x22\x20for\x20','404450uwQCjm','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','object','cssUrl','Start\x20non-interactive\x20menu\x20sync',';\x20found\x20','import','Parent\x20','2901136vYNrmV','has','visible','join','\x0a\x20\x20Available\x20local\x20paths:\x20','Invalid\x20--params:\x20','filter','pages','Invalid\x20--params.','dryRun','menu-sync','map','28Mvbviv','jsUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','30fYyLCJ','path','info','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','parentId','push','25455020oDalwm','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','trim','keys','No\x20local\x20pages\x20matched\x20paths:\x20','231909OkCLcr','length','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','label','642246ZMZZXm','procode','group','order','9enojur','type'];a184_0x51c1=function(){return _0x1e60b8;};return a184_0x51c1();}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([a184_0x5e1d43(0x1ea),a184_0x5e1d43(0x1d8),'appName','visible','parentId']);export function resolvePage(_0x2d9f51,_0x1c82cf,_0x58c8b2){const _0x5c684f=a184_0x5e1d43;let _0x21f6ee=_0x1c82cf[_0x5c684f(0x1b7)]??_0x2d9f51['parentId'];if(_0x21f6ee===undefined&&_0x2d9f51[_0x5c684f(0x1c4)]){const _0x211a92=_0x58c8b2['filter'](_0x3b70b2=>_0x3b70b2[_0x5c684f(0x1c7)]==='folder'&&_0x3b70b2[_0x5c684f(0x1c1)]===_0x2d9f51[_0x5c684f(0x1c4)]);if(_0x211a92[_0x5c684f(0x1bf)]!==0x1)throw new Error(_0x5c684f(0x1cb)+_0x2d9f51[_0x5c684f(0x1c4)]+_0x5c684f(0x1d4)+_0x2d9f51[_0x5c684f(0x1b4)]+_0x5c684f(0x1da)+_0x211a92[_0x5c684f(0x1bf)]);_0x21f6ee=_0x211a92[0x0]['id'];}if(_0x21f6ee!==undefined&&_0x21f6ee!==0x0&&_0x58c8b2['filter'](_0x125cf2=>_0x125cf2['id']===_0x21f6ee&&_0x125cf2['type']===_0x5c684f(0x1cf))[_0x5c684f(0x1bf)]!==0x1)throw new Error(_0x5c684f(0x1dc)+_0x21f6ee+_0x5c684f(0x1c0));return{..._0x2d9f51,..._0x21f6ee===undefined?{}:{'parentId':_0x21f6ee},..._0x1c82cf[_0x5c684f(0x1df)]===undefined?{}:{'visible':_0x1c82cf[_0x5c684f(0x1df)]}};}function validateParams(_0x479f65){const _0x4ff065=a184_0x5e1d43,_0x5759bd=[];return _0x479f65['jsUrl']&&!isValidJsHttpsUrl(_0x479f65['jsUrl'])&&_0x5759bd['push']({'field':_0x4ff065(0x1ea),'message':_0x4ff065(0x1d6)}),_0x479f65[_0x4ff065(0x1d8)]&&!isValidCssHttpsUrl(_0x479f65['cssUrl'])&&_0x5759bd[_0x4ff065(0x1b8)]({'field':_0x4ff065(0x1d8),'message':_0x4ff065(0x1b2)}),_0x5759bd;}export async function runMenuSyncCore(_0x38d510,_0x507cab,_0x3f2e55=[],_0x452ab6,_0x23cdce={}){const _0x147c8f=a184_0x5e1d43,_0x507354=parseMenuSyncParams(_0x452ab6),_0x12279f=[...new Set(_0x3f2e55[_0x147c8f(0x1e8)](_0x36ad64=>_0x36ad64['trim']())['filter'](Boolean)[_0x147c8f(0x1e8)](menuPathKey))],_0x4ede5c=_0x507354[_0x147c8f(0x1ea)],_0x4a5ca8=_0x507354['cssUrl'],_0x568470=[];if(_0x4ede5c)_0x568470[_0x147c8f(0x1b8)](_0x4ede5c);if(_0x4a5ca8)_0x568470[_0x147c8f(0x1b8)](_0x4a5ca8);const _0x3501df=validateParams(_0x507354);if(_0x3501df['length']>0x0){const _0x2f5b4d=_0x3501df['map'](_0x454518=>_0x147c8f(0x1d1)+_0x454518['field']+':\x20'+_0x454518['message'])['join'](';\x20');throw new Error(_0x147c8f(0x1e2)+_0x2f5b4d);}logger['setLogPath'](process['cwd']()),logger[_0x147c8f(0x1b5)](_0x147c8f(0x1e7),_0x147c8f(0x1d9),{'appCode':_0x38d510,'selectedCount':_0x12279f['length'],'jsUrl':_0x4ede5c,'cssUrl':_0x4a5ca8});if(_0x4ede5c){const _0x4afdfc=await isUrlReachable(_0x4ede5c);if(!_0x4afdfc)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x4ede5c);}if(_0x4a5ca8){const _0x11328c=await isUrlReachable(_0x4a5ca8);if(!_0x11328c)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x4a5ca8);}const _0x104ad7=getLocalPages();if(_0x104ad7[_0x147c8f(0x1bf)]===0x0){if(_0x12279f['length']>0x0)throw new Error(_0x147c8f(0x1bd)+_0x12279f[_0x147c8f(0x1e0)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x23cdce[_0x147c8f(0x1e6)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x5f55ac=await getOnlineMenuList(_0x38d510,_0x507cab),_0x21d2b8=new Set(_0x5f55ac['map'](_0x1c5dc2=>menuPathKey(_0x1c5dc2[_0x147c8f(0x1b4)])));let _0x5e987b;if(_0x12279f[_0x147c8f(0x1bf)]>0x0){const _0x134b9d=new Map(_0x104ad7[_0x147c8f(0x1e8)](_0x31e774=>[menuPathKey(_0x31e774[_0x147c8f(0x1b4)]),_0x31e774])),_0x1abd54=_0x12279f['filter'](_0x18508a=>!_0x134b9d['has'](_0x18508a));if(_0x1abd54[_0x147c8f(0x1bf)]>0x0){const _0x26e386=_0x104ad7[_0x147c8f(0x1e8)](_0x52dcb3=>_0x52dcb3['path'])[_0x147c8f(0x1e0)](',\x20');throw new Error(_0x147c8f(0x1bd)+_0x1abd54[_0x147c8f(0x1e0)](',\x20')+_0x147c8f(0x1e1)+_0x26e386);}const _0x309166=_0x12279f[_0x147c8f(0x1e3)](_0x4bc524=>_0x21d2b8[_0x147c8f(0x1de)](_0x4bc524));if(_0x309166[_0x147c8f(0x1bf)]>0x0)throw new Error(_0x147c8f(0x1cd)+_0x309166[_0x147c8f(0x1e0)](',\x20'));_0x5e987b=_0x12279f[_0x147c8f(0x1e8)](_0x3a1c1b=>_0x134b9d['get'](_0x3a1c1b));}else _0x5e987b=_0x104ad7[_0x147c8f(0x1e3)](_0x555f43=>!_0x21d2b8[_0x147c8f(0x1de)](menuPathKey(_0x555f43[_0x147c8f(0x1b4)])));if(_0x5e987b[_0x147c8f(0x1bf)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x23cdce['dryRun']===!![],'targetPages':[],'plannedMenus':[]};_0x5e987b=_0x5e987b['map'](_0x5b41b0=>resolvePage(_0x5b41b0,_0x507354,_0x5f55ac));_0x507354['appName']&&_0x568470[_0x147c8f(0x1bf)]===0x0&&await assertSharedResourcesConfigured(_0x38d510,_0x507cab,_0x507354['appName']);const _0x9d592f=_0x5e987b[_0x147c8f(0x1e8)](_0x4f1e6f=>({'type':_0x147c8f(0x1c3),'path':_0x4f1e6f['path'],'label':_0x4f1e6f['label'],'loadScriptMode':_0x147c8f(0x1db),'resources':[..._0x568470],..._0x4f1e6f['visible']===undefined?{}:{'visible':_0x4f1e6f[_0x147c8f(0x1df)]},..._0x4f1e6f['parentId']===undefined?{}:{'parentId':_0x4f1e6f[_0x147c8f(0x1b7)]},..._0x4f1e6f[_0x147c8f(0x1c5)]===undefined?{}:{'sort':_0x4f1e6f['order']},..._0x507354[_0x147c8f(0x1d3)]===undefined?{}:{'appName':_0x507354[_0x147c8f(0x1d3)]}}));if(_0x23cdce[_0x147c8f(0x1e6)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x5e987b,'plannedMenus':_0x9d592f};const _0x29660f=_0x507354[_0x147c8f(0x1d3)]?await createMenus(_0x38d510,_0x507cab,_0x5e987b,_0x568470[_0x147c8f(0x1bf)]>0x0?_0x568470:undefined,{'appName':_0x507354[_0x147c8f(0x1d3)]}):await createMenus(_0x38d510,_0x507cab,_0x5e987b,_0x568470['length']>0x0?_0x568470:undefined);return logger[_0x147c8f(0x1b5)](_0x147c8f(0x1e7),'Menu\x20sync\x20completed',{'count':_0x5e987b['length'],'resources':_0x568470}),{'created':_0x29660f['length'],'skipped':![],'dryRun':![],'targetPages':_0x5e987b,'plannedMenus':_0x9d592f,'menus':_0x29660f};}export function parseMenuSyncParams(_0x1b5e96){const _0x1ac044=a184_0x5e1d43;if(!_0x1b5e96||typeof _0x1b5e96!=='string')return{};let _0x217f4b;try{_0x217f4b=JSON[_0x1ac044(0x1d0)](_0x1b5e96);}catch{throw new Error('Invalid\x20--params\x20JSON.');}if(typeof _0x217f4b!==_0x1ac044(0x1d7)||_0x217f4b===null||Array[_0x1ac044(0x1cc)](_0x217f4b))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x1b0218=_0x217f4b;if(Object[_0x1ac044(0x1c9)](_0x1b0218,_0x1ac044(0x1e4)))throw new Error('--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.');const _0x1fabca=Object[_0x1ac044(0x1bc)](_0x1b0218)['filter'](_0x5c430c=>!MENU_SYNC_PARAM_KEYS[_0x1ac044(0x1de)](_0x5c430c));if(_0x1fabca[_0x1ac044(0x1bf)]>0x0)throw new Error('Invalid\x20--params\x20fields:\x20'+_0x1fabca[_0x1ac044(0x1e0)](',\x20')+'.');for(const _0x37b61d of[_0x1ac044(0x1ea),_0x1ac044(0x1d8),_0x1ac044(0x1d3)]){const _0x2a5147=_0x1b0218[_0x37b61d];if(_0x2a5147!==undefined&&(typeof _0x2a5147!==_0x1ac044(0x1c8)||_0x2a5147[_0x1ac044(0x1bb)]()===''))throw new Error(_0x1ac044(0x1e5)+_0x37b61d+':\x20expected\x20a\x20non-empty\x20string.');}if(_0x1b0218['visible']!==undefined&&typeof _0x1b0218[_0x1ac044(0x1df)]!==_0x1ac044(0x1ce))throw new Error(_0x1ac044(0x1b6));if(_0x1b0218[_0x1ac044(0x1b7)]!==undefined&&(!Number['isInteger'](_0x1b0218[_0x1ac044(0x1b7)])||_0x1b0218[_0x1ac044(0x1b7)]<0x0))throw new Error(_0x1ac044(0x1ba));return{'jsUrl':typeof _0x1b0218['jsUrl']===_0x1ac044(0x1c8)?_0x1b0218['jsUrl'][_0x1ac044(0x1bb)]():undefined,'cssUrl':typeof _0x1b0218['cssUrl']===_0x1ac044(0x1c8)?_0x1b0218['cssUrl']['trim']():undefined,'appName':typeof _0x1b0218[_0x1ac044(0x1d3)]===_0x1ac044(0x1c8)?_0x1b0218[_0x1ac044(0x1d3)][_0x1ac044(0x1bb)]():undefined,'visible':typeof _0x1b0218[_0x1ac044(0x1df)]===_0x1ac044(0x1ce)?_0x1b0218[_0x1ac044(0x1df)]:undefined,'parentId':typeof _0x1b0218[_0x1ac044(0x1b7)]==='number'?_0x1b0218[_0x1ac044(0x1b7)]:undefined};}
1
+ const a184_0x51da87=a184_0x5e4c;(function(_0x5dfb9d,_0x3d2312){const _0x56543c=a184_0x5e4c,_0x2f0d9f=_0x5dfb9d();while(!![]){try{const _0x111f59=-parseInt(_0x56543c(0x13c))/0x1*(parseInt(_0x56543c(0x112))/0x2)+-parseInt(_0x56543c(0x106))/0x3+parseInt(_0x56543c(0x124))/0x4+-parseInt(_0x56543c(0x12c))/0x5+parseInt(_0x56543c(0x12d))/0x6+-parseInt(_0x56543c(0x138))/0x7+parseInt(_0x56543c(0x102))/0x8;if(_0x111f59===_0x3d2312)break;else _0x2f0d9f['push'](_0x2f0d9f['shift']());}catch(_0x308a14){_0x2f0d9f['push'](_0x2f0d9f['shift']());}}}(a184_0xf385,0x192c5));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a184_0x5e4c(_0xb8f0f7,_0x4f84fb){_0xb8f0f7=_0xb8f0f7-0x102;const _0xf38584=a184_0xf385();let _0x5e4c8b=_0xf38584[_0xb8f0f7];return _0x5e4c8b;}import{menuPathKey}from'../../../commands/menu/shared/path.js';function a184_0xf385(){const _0x52bd23=['251130meuBJh','98262QgFIxm','Invalid\x20--params:\x20','folder','visible','--params.','\x20must\x20be\x20an\x20existing\x20folder\x20in\x20the\x20selected\x20menu\x20host.','cwd','join','filter','path','Invalid\x20--params\x20JSON.','1018143cRyTbG',':\x20expected\x20a\x20non-empty\x20string.','appName','parse','2976WATMlQ','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','jsUrl','group','1661296HUNGHB',';\x20found\x20','Invalid\x20--params.visible:\x20expected\x20a\x20boolean.','map','27099aRDuvk','cssUrl','Invalid\x20--params\x20fields:\x20','Start\x20non-interactive\x20menu\x20sync','Invalid\x20--params.','Invalid\x20--params.parentId:\x20expected\x20a\x20non-negative\x20integer.','push','trim','Parent\x20','parentId','pages','isInteger','8SuKjGY','JS\x20URL\x20is\x20unreachable:\x20','label','keys','setLogPath','type','Menu\x20sync\x20completed','hasOwn','dryRun','Expected\x20one\x20folder\x20named\x20\x22','length','import','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','string','has','CSS\x20URL\x20is\x20unreachable:\x20','menu-sync','message','382728zUsFpj','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','isArray','\x22\x20for\x20','order','\x0a\x20\x20Available\x20local\x20paths:\x20','procode'];a184_0xf385=function(){return _0x52bd23;};return a184_0xf385();}import{logger}from'../../../utils/logger.js';import{assertSharedResourcesConfigured}from'../../../commands/menu/shared/subapp-assets.js';const MENU_SYNC_PARAM_KEYS=new Set([a184_0x51da87(0x13e),a184_0x51da87(0x107),a184_0x51da87(0x13a),a184_0x51da87(0x130),a184_0x51da87(0x10f)]);export function resolvePage(_0x26eee4,_0x4560cc,_0x51ff07){const _0x5dc9fa=a184_0x51da87;let _0x5441a6=_0x4560cc[_0x5dc9fa(0x10f)]??_0x26eee4[_0x5dc9fa(0x10f)];if(_0x5441a6===undefined&&_0x26eee4[_0x5dc9fa(0x13f)]){const _0x1ce2f6=_0x51ff07[_0x5dc9fa(0x135)](_0x502b98=>_0x502b98[_0x5dc9fa(0x117)]===_0x5dc9fa(0x12f)&&_0x502b98[_0x5dc9fa(0x114)]===_0x26eee4[_0x5dc9fa(0x13f)]);if(_0x1ce2f6['length']!==0x1)throw new Error(_0x5dc9fa(0x11b)+_0x26eee4[_0x5dc9fa(0x13f)]+_0x5dc9fa(0x128)+_0x26eee4['path']+_0x5dc9fa(0x103)+_0x1ce2f6[_0x5dc9fa(0x11c)]);_0x5441a6=_0x1ce2f6[0x0]['id'];}if(_0x5441a6!==undefined&&_0x5441a6!==0x0&&_0x51ff07[_0x5dc9fa(0x135)](_0x4d32d7=>_0x4d32d7['id']===_0x5441a6&&_0x4d32d7[_0x5dc9fa(0x117)]===_0x5dc9fa(0x12f))[_0x5dc9fa(0x11c)]!==0x1)throw new Error(_0x5dc9fa(0x10e)+_0x5441a6+_0x5dc9fa(0x132));return{..._0x26eee4,..._0x5441a6===undefined?{}:{'parentId':_0x5441a6},..._0x4560cc[_0x5dc9fa(0x130)]===undefined?{}:{'visible':_0x4560cc['visible']}};}function validateParams(_0x45e227){const _0x5b9740=a184_0x51da87,_0x449949=[];return _0x45e227['jsUrl']&&!isValidJsHttpsUrl(_0x45e227[_0x5b9740(0x13e)])&&_0x449949[_0x5b9740(0x10c)]({'field':'jsUrl','message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x45e227[_0x5b9740(0x107)]&&!isValidCssHttpsUrl(_0x45e227[_0x5b9740(0x107)])&&_0x449949[_0x5b9740(0x10c)]({'field':_0x5b9740(0x107),'message':_0x5b9740(0x11e)}),_0x449949;}export async function runMenuSyncCore(_0x1fc77c,_0xb924de,_0x41036c=[],_0x5c8500,_0x52910d={}){const _0x4f84e6=a184_0x51da87,_0x174ed6=parseMenuSyncParams(_0x5c8500),_0x7350f8=[...new Set(_0x41036c[_0x4f84e6(0x105)](_0x13a98e=>_0x13a98e['trim']())[_0x4f84e6(0x135)](Boolean)[_0x4f84e6(0x105)](menuPathKey))],_0xc9fa39=_0x174ed6[_0x4f84e6(0x13e)],_0x1a2e3d=_0x174ed6[_0x4f84e6(0x107)],_0x30c9e3=[];if(_0xc9fa39)_0x30c9e3[_0x4f84e6(0x10c)](_0xc9fa39);if(_0x1a2e3d)_0x30c9e3[_0x4f84e6(0x10c)](_0x1a2e3d);const _0x531b9e=validateParams(_0x174ed6);if(_0x531b9e[_0x4f84e6(0x11c)]>0x0){const _0x2da98a=_0x531b9e['map'](_0x5a2222=>_0x4f84e6(0x131)+_0x5a2222['field']+':\x20'+_0x5a2222[_0x4f84e6(0x123)])['join'](';\x20');throw new Error(_0x4f84e6(0x12e)+_0x2da98a);}logger[_0x4f84e6(0x116)](process[_0x4f84e6(0x133)]()),logger['info'](_0x4f84e6(0x122),_0x4f84e6(0x109),{'appCode':_0x1fc77c,'selectedCount':_0x7350f8[_0x4f84e6(0x11c)],'jsUrl':_0xc9fa39,'cssUrl':_0x1a2e3d});if(_0xc9fa39){const _0xa81e72=await isUrlReachable(_0xc9fa39);if(!_0xa81e72)throw new Error(_0x4f84e6(0x113)+_0xc9fa39);}if(_0x1a2e3d){const _0x4fadb1=await isUrlReachable(_0x1a2e3d);if(!_0x4fadb1)throw new Error(_0x4f84e6(0x121)+_0x1a2e3d);}const _0x2b1dbf=getLocalPages();if(_0x2b1dbf['length']===0x0){if(_0x7350f8[_0x4f84e6(0x11c)]>0x0)throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x7350f8[_0x4f84e6(0x134)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x52910d[_0x4f84e6(0x11a)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x59f480=await getOnlineMenuList(_0x1fc77c,_0xb924de),_0x183a10=new Set(_0x59f480[_0x4f84e6(0x105)](_0x392f11=>menuPathKey(_0x392f11[_0x4f84e6(0x136)])));let _0x2f114f;if(_0x7350f8[_0x4f84e6(0x11c)]>0x0){const _0x8f97c1=new Map(_0x2b1dbf['map'](_0x3abaaa=>[menuPathKey(_0x3abaaa[_0x4f84e6(0x136)]),_0x3abaaa])),_0x5f4319=_0x7350f8[_0x4f84e6(0x135)](_0x5b3d61=>!_0x8f97c1[_0x4f84e6(0x120)](_0x5b3d61));if(_0x5f4319['length']>0x0){const _0x2a2a20=_0x2b1dbf[_0x4f84e6(0x105)](_0x2326ba=>_0x2326ba[_0x4f84e6(0x136)])['join'](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x5f4319['join'](',\x20')+_0x4f84e6(0x12a)+_0x2a2a20);}const _0x4a823d=_0x7350f8[_0x4f84e6(0x135)](_0x335e34=>_0x183a10[_0x4f84e6(0x120)](_0x335e34));if(_0x4a823d[_0x4f84e6(0x11c)]>0x0)throw new Error(_0x4f84e6(0x125)+_0x4a823d[_0x4f84e6(0x134)](',\x20'));_0x2f114f=_0x7350f8[_0x4f84e6(0x105)](_0x337fb4=>_0x8f97c1['get'](_0x337fb4));}else _0x2f114f=_0x2b1dbf[_0x4f84e6(0x135)](_0x4bc18f=>!_0x183a10[_0x4f84e6(0x120)](menuPathKey(_0x4bc18f[_0x4f84e6(0x136)])));if(_0x2f114f[_0x4f84e6(0x11c)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x52910d['dryRun']===!![],'targetPages':[],'plannedMenus':[]};_0x2f114f=_0x2f114f[_0x4f84e6(0x105)](_0x3abf06=>resolvePage(_0x3abf06,_0x174ed6,_0x59f480));_0x174ed6[_0x4f84e6(0x13a)]&&_0x30c9e3[_0x4f84e6(0x11c)]===0x0&&await assertSharedResourcesConfigured(_0x1fc77c,_0xb924de,_0x174ed6[_0x4f84e6(0x13a)]);const _0x366b24=_0x2f114f[_0x4f84e6(0x105)](_0x27633f=>({'type':_0x4f84e6(0x12b),'path':_0x27633f[_0x4f84e6(0x136)],'label':_0x27633f[_0x4f84e6(0x114)],'loadScriptMode':_0x4f84e6(0x11d),'resources':[..._0x30c9e3],..._0x27633f[_0x4f84e6(0x130)]===undefined?{}:{'visible':_0x27633f[_0x4f84e6(0x130)]},..._0x27633f['parentId']===undefined?{}:{'parentId':_0x27633f[_0x4f84e6(0x10f)]},..._0x27633f[_0x4f84e6(0x129)]===undefined?{}:{'sort':_0x27633f[_0x4f84e6(0x129)]},..._0x174ed6['appName']===undefined?{}:{'appName':_0x174ed6[_0x4f84e6(0x13a)]}}));if(_0x52910d['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x2f114f,'plannedMenus':_0x366b24};const _0x213bb5=_0x174ed6[_0x4f84e6(0x13a)]?await createMenus(_0x1fc77c,_0xb924de,_0x2f114f,_0x30c9e3[_0x4f84e6(0x11c)]>0x0?_0x30c9e3:undefined,{'appName':_0x174ed6['appName']}):await createMenus(_0x1fc77c,_0xb924de,_0x2f114f,_0x30c9e3[_0x4f84e6(0x11c)]>0x0?_0x30c9e3:undefined);return logger['info'](_0x4f84e6(0x122),_0x4f84e6(0x118),{'count':_0x2f114f['length'],'resources':_0x30c9e3}),{'created':_0x213bb5[_0x4f84e6(0x11c)],'skipped':![],'dryRun':![],'targetPages':_0x2f114f,'plannedMenus':_0x366b24,'menus':_0x213bb5};}export function parseMenuSyncParams(_0x3c4196){const _0x470844=a184_0x51da87;if(!_0x3c4196||typeof _0x3c4196!=='string')return{};let _0x16d82f;try{_0x16d82f=JSON[_0x470844(0x13b)](_0x3c4196);}catch{throw new Error(_0x470844(0x137));}if(typeof _0x16d82f!=='object'||_0x16d82f===null||Array[_0x470844(0x127)](_0x16d82f))throw new Error(_0x470844(0x126));const _0x45ca96=_0x16d82f;if(Object[_0x470844(0x119)](_0x45ca96,_0x470844(0x110)))throw new Error(_0x470844(0x13d));const _0x4fe240=Object[_0x470844(0x115)](_0x45ca96)[_0x470844(0x135)](_0x20cdb5=>!MENU_SYNC_PARAM_KEYS[_0x470844(0x120)](_0x20cdb5));if(_0x4fe240[_0x470844(0x11c)]>0x0)throw new Error(_0x470844(0x108)+_0x4fe240[_0x470844(0x134)](',\x20')+'.');for(const _0x24611b of[_0x470844(0x13e),_0x470844(0x107),_0x470844(0x13a)]){const _0x1639a3=_0x45ca96[_0x24611b];if(_0x1639a3!==undefined&&(typeof _0x1639a3!==_0x470844(0x11f)||_0x1639a3[_0x470844(0x10d)]()===''))throw new Error(_0x470844(0x10a)+_0x24611b+_0x470844(0x139));}if(_0x45ca96[_0x470844(0x130)]!==undefined&&typeof _0x45ca96[_0x470844(0x130)]!=='boolean')throw new Error(_0x470844(0x104));if(_0x45ca96[_0x470844(0x10f)]!==undefined&&(!Number[_0x470844(0x111)](_0x45ca96[_0x470844(0x10f)])||_0x45ca96[_0x470844(0x10f)]<0x0))throw new Error(_0x470844(0x10b));return{'jsUrl':typeof _0x45ca96[_0x470844(0x13e)]==='string'?_0x45ca96['jsUrl'][_0x470844(0x10d)]():undefined,'cssUrl':typeof _0x45ca96[_0x470844(0x107)]===_0x470844(0x11f)?_0x45ca96[_0x470844(0x107)]['trim']():undefined,'appName':typeof _0x45ca96[_0x470844(0x13a)]===_0x470844(0x11f)?_0x45ca96[_0x470844(0x13a)]['trim']():undefined,'visible':typeof _0x45ca96[_0x470844(0x130)]==='boolean'?_0x45ca96[_0x470844(0x130)]:undefined,'parentId':typeof _0x45ca96[_0x470844(0x10f)]==='number'?_0x45ca96['parentId']:undefined};}
@@ -1 +1 @@
1
- (function(_0x32302f,_0x2a570f){const _0x4f638d=a186_0x21e5,_0x53660c=_0x32302f();while(!![]){try{const _0x32bb87=-parseInt(_0x4f638d(0x1a4))/0x1*(parseInt(_0x4f638d(0x1b3))/0x2)+-parseInt(_0x4f638d(0x1b9))/0x3*(parseInt(_0x4f638d(0x1e1))/0x4)+parseInt(_0x4f638d(0x1b2))/0x5*(-parseInt(_0x4f638d(0x1a5))/0x6)+-parseInt(_0x4f638d(0x1c5))/0x7+parseInt(_0x4f638d(0x1c7))/0x8+-parseInt(_0x4f638d(0x1d7))/0x9+parseInt(_0x4f638d(0x1c2))/0xa*(parseInt(_0x4f638d(0x1d4))/0xb);if(_0x32bb87===_0x2a570f)break;else _0x53660c['push'](_0x53660c['shift']());}catch(_0x1d8fc4){_0x53660c['push'](_0x53660c['shift']());}}}(a186_0x4475,0x5d404));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 a186_0x4475(){const _0x2ba635=['all','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','resources','object','toLowerCase',').\x20','some','info','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','force','length','dryRun','80DJuMdI','8HLXcNz','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','trim','rejected','--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.','menu\x20asset-update\x20cannot\x20patch\x20','172332xaNisC','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','extend','.css','\x22\x20(','fulfilled','CSS\x20URL\x20is\x20unreachable:\x20','map','.\x20Allowed\x20values:\x20replace,\x20patch','1681180UHbeMU','menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','setLogPath','2609201EjOyUc','cssUrl','1116336WHjveu','menuIds','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','field','after','status','jsUrl','loadScriptMode','menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','path','Menu\x20asset\x20update\x20completed','\x20existing\x20CSS\x20resources\x20for\x20\x22','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','88HMscXP','menu-asset-update','paths','2895651nAxvqy','label','endsWith','split','unshift','string','message','join','isArray','.js','4fihqir','parse','JS\x20URL\x20is\x20unreachable:\x20','patch','push','Invalid\x20--params:\x20','has','filter','Invalid\x20--mode:\x20','--params.','allSettled','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','28947hBqclO','88056EnbwPv'];a186_0x4475=function(){return _0x2ba635;};return a186_0x4475();}function validateParams(_0x36fb0d){const _0x158dc5=a186_0x21e5,_0x5740fe=[];return _0x36fb0d[_0x158dc5(0x1cd)]&&!isValidJsHttpsUrl(_0x36fb0d[_0x158dc5(0x1cd)])&&_0x5740fe[_0x158dc5(0x1e5)]({'field':_0x158dc5(0x1cd),'message':_0x158dc5(0x1ae)}),_0x36fb0d[_0x158dc5(0x1c6)]&&!isValidCssHttpsUrl(_0x36fb0d['cssUrl'])&&_0x5740fe[_0x158dc5(0x1e5)]({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x5740fe;}export async function runMenuUpdateCore(_0xfc3039,_0x43d29e,_0x3e12eb,_0x31ca9b={}){const _0x49df87=a186_0x21e5,_0x5eb037=parseUpdateParamsFlag(_0x3e12eb),_0x535677=normalizeMode(_0x31ca9b['mode']);validateSelection(_0x31ca9b['selection']);const _0x5a341b=[];if(_0x5eb037[_0x49df87(0x1cd)])_0x5a341b[_0x49df87(0x1e5)](_0x5eb037[_0x49df87(0x1cd)]);if(_0x5eb037['cssUrl'])_0x5a341b[_0x49df87(0x1e5)](_0x5eb037[_0x49df87(0x1c6)]);const _0xcb298c=validateParams(_0x5eb037);if(_0xcb298c[_0x49df87(0x1b0)]>0x0){const _0x1d961b=_0xcb298c[_0x49df87(0x1c0)](_0x95534b=>_0x49df87(0x1ea)+_0x95534b[_0x49df87(0x1ca)]+':\x20'+_0x95534b[_0x49df87(0x1dd)])[_0x49df87(0x1de)](';\x20');throw new Error(_0x49df87(0x1e6)+_0x1d961b);}if(_0x5a341b['length']===0x0)throw new Error('Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20'+_0x49df87(0x1c9));logger[_0x49df87(0x1c4)](process['cwd']()),logger[_0x49df87(0x1ad)](_0x49df87(0x1d5),'Start\x20non-interactive\x20menu\x20asset\x20update',{'appCode':_0xfc3039,'jsUrl':_0x5eb037['jsUrl'],'cssUrl':_0x5eb037[_0x49df87(0x1c6)],'mode':_0x535677,'dryRun':_0x31ca9b['dryRun']===!![]});if(_0x5eb037[_0x49df87(0x1cd)]){const _0x4826c3=await isUrlReachable(_0x5eb037[_0x49df87(0x1cd)]);if(!_0x4826c3)throw new Error(_0x49df87(0x1e3)+_0x5eb037['jsUrl']);}if(_0x5eb037[_0x49df87(0x1c6)]){const _0x56ac3c=await isUrlReachable(_0x5eb037[_0x49df87(0x1c6)]);if(!_0x56ac3c)throw new Error(_0x49df87(0x1bf)+_0x5eb037[_0x49df87(0x1c6)]);}const _0x366000=await getOnlineMenuList(_0xfc3039,_0x43d29e),_0x59cd68=_0x366000[_0x49df87(0x1e8)](_0x1cff40=>_0x1cff40[_0x49df87(0x1a8)][_0x49df87(0x1b0)]>0x0),_0x1d1d5a=selectMenusForUpdate(_0x59cd68,_0x31ca9b['selection']);if(_0x1d1d5a[_0x49df87(0x1b0)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x31ca9b[_0x49df87(0x1b1)]===!![]};const _0x40c4c8=_0x1d1d5a[_0x49df87(0x1c0)](_0x57bdcd=>buildMenuUpdateDiff(_0x57bdcd,_0x5eb037,_0x535677,_0x31ca9b[_0x49df87(0x1af)]===!![],_0x31ca9b[_0x49df87(0x1ce)]));if(_0x31ca9b[_0x49df87(0x1b1)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x40c4c8};const _0x1e5c52=await Promise[_0x49df87(0x1eb)](_0x1d1d5a[_0x49df87(0x1c0)]((_0x2537ae,_0x1ccb50)=>updateMenuCdnUrl(_0xfc3039,_0x43d29e,{'id':_0x2537ae['id'],'label':_0x2537ae[_0x49df87(0x1d8)],'path':_0x2537ae[_0x49df87(0x1d0)],'resources':_0x40c4c8[_0x1ccb50][_0x49df87(0x1cb)]['resources'],'extend':_0x2537ae[_0x49df87(0x1bb)]??null,'loadScriptMode':_0x31ca9b[_0x49df87(0x1ce)]}))),_0x151417=_0x1e5c52['filter'](_0x22f53e=>_0x22f53e[_0x49df87(0x1cc)]===_0x49df87(0x1be))[_0x49df87(0x1c0)](_0x5db50d=>_0x5db50d['value']),_0x522906=_0x1e5c52[_0x49df87(0x1e8)](_0x49d01d=>_0x49d01d[_0x49df87(0x1cc)]===_0x49df87(0x1b6))[_0x49df87(0x1b0)];return logger[_0x49df87(0x1ad)]('menu-asset-update',_0x49df87(0x1d1),{'count':_0x1d1d5a['length'],'resources':_0x5a341b}),{'updated':_0x151417['length'],'failed':_0x522906,'skipped':![],'menus':_0x151417};}function validateSelection(_0x383ec8){const _0x354363=a186_0x21e5;if(!_0x383ec8)throw new Error(_0x354363(0x1a7));if(_0x383ec8[_0x354363(0x1a6)]&&(_0x383ec8[_0x354363(0x1c8)]['length']>0x0||_0x383ec8['paths'][_0x354363(0x1b0)]>0x0))throw new Error(_0x354363(0x1b7));if(!_0x383ec8[_0x354363(0x1a6)]&&_0x383ec8['menuIds']['length']===0x0&&_0x383ec8['paths'][_0x354363(0x1b0)]===0x0)throw new Error(_0x354363(0x1a7));}export function selectMenusForUpdate(_0x37f05e,_0x4b568c){const _0x206fd4=a186_0x21e5;validateSelection(_0x4b568c);if(_0x4b568c[_0x206fd4(0x1a6)])return _0x37f05e;const _0x380319=new Set(_0x37f05e[_0x206fd4(0x1c0)](_0xb0e38a=>_0xb0e38a['id'])),_0x4e2bc8=new Set(_0x37f05e[_0x206fd4(0x1c0)](_0x42b4c2=>_0x42b4c2['path'])),_0x24e1fa=_0x4b568c[_0x206fd4(0x1c8)][_0x206fd4(0x1e8)](_0xefa729=>!_0x380319[_0x206fd4(0x1e7)](_0xefa729)),_0x26b937=_0x4b568c[_0x206fd4(0x1d6)]['filter'](_0x23b34e=>!_0x4e2bc8[_0x206fd4(0x1e7)](_0x23b34e));if(_0x24e1fa[_0x206fd4(0x1b0)]>0x0||_0x26b937[_0x206fd4(0x1b0)]>0x0){const _0x3a5484=[..._0x24e1fa[_0x206fd4(0x1c0)](_0x4c57da=>String(_0x4c57da)),..._0x26b937][_0x206fd4(0x1de)](',\x20');throw new Error(_0x206fd4(0x1c3)+_0x3a5484);}const _0x154cd6=new Set(_0x4b568c[_0x206fd4(0x1c8)]),_0x293442=new Set(_0x4b568c[_0x206fd4(0x1d6)]);return _0x37f05e['filter'](_0x40f55e=>_0x154cd6[_0x206fd4(0x1e7)](_0x40f55e['id'])||_0x293442[_0x206fd4(0x1e7)](_0x40f55e[_0x206fd4(0x1d0)]));}function normalizeMode(_0x331001){const _0x4ccc0e=a186_0x21e5;if(!_0x331001)return _0x4ccc0e(0x1e4);if(_0x331001==='replace'||_0x331001===_0x4ccc0e(0x1e4))return _0x331001;throw new Error(_0x4ccc0e(0x1e9)+_0x331001+_0x4ccc0e(0x1c1));}function buildMenuUpdateDiff(_0x491df0,_0x5d6782,_0x547d3a,_0x95a37f,_0x24fc75){const _0x2dbf67=a186_0x21e5,_0x37f7ff=[..._0x491df0[_0x2dbf67(0x1a8)]];_0x547d3a===_0x2dbf67(0x1e4)&&assertUnambiguousPatchResources(_0x491df0,_0x37f7ff,_0x5d6782);const _0x244cd3=_0x547d3a===_0x2dbf67(0x1e4)?patchResources(_0x37f7ff,_0x5d6782):replaceResources(_0x5d6782),_0x176eec=[],_0x3c6c79=_0x37f7ff[_0x2dbf67(0x1ac)](isJsResource),_0x418a33=_0x244cd3['some'](isJsResource);if(_0x3c6c79&&!_0x418a33){const _0x24b958=_0x2dbf67(0x1ec)+_0x491df0[_0x2dbf67(0x1d8)]+_0x2dbf67(0x1bd)+_0x491df0[_0x2dbf67(0x1d0)]+_0x2dbf67(0x1ab)+_0x2dbf67(0x1b4);if(!_0x95a37f)throw new Error(_0x24b958);_0x176eec[_0x2dbf67(0x1e5)](_0x24b958);}const _0x12ccec=_0x37f7ff[_0x2dbf67(0x1ac)](isCssResource),_0x290f9f=_0x244cd3[_0x2dbf67(0x1ac)](isCssResource);_0x12ccec&&!_0x290f9f&&_0x176eec['push'](_0x2dbf67(0x1cf)+_0x491df0[_0x2dbf67(0x1d8)]+_0x2dbf67(0x1bd)+_0x491df0[_0x2dbf67(0x1d0)]+').');const _0x44f5c2=typeof _0x491df0[_0x2dbf67(0x1bb)]?.[_0x2dbf67(0x1ce)]===_0x2dbf67(0x1dc)?_0x491df0['extend']['loadScriptMode']:null,_0x174288=_0x24fc75?{'loadScriptMode':_0x44f5c2}:{},_0x5d192c=_0x24fc75?{'loadScriptMode':_0x24fc75}:{};return{'id':_0x491df0['id'],'label':_0x491df0['label'],'path':_0x491df0[_0x2dbf67(0x1d0)],'mode':_0x547d3a,'before':{'resources':_0x37f7ff,..._0x174288},'after':{'resources':_0x244cd3,..._0x5d192c},'warnings':_0x176eec};}function replaceResources(_0x465669){const _0x55e29=a186_0x21e5;return[_0x465669[_0x55e29(0x1cd)],_0x465669[_0x55e29(0x1c6)]]['filter'](_0x4d4698=>!!_0x4d4698);}function assertUnambiguousPatchResources(_0x386619,_0x406bbf,_0x3a7967){const _0x31cfb9=a186_0x21e5,_0x5cbd15=_0x406bbf['filter'](isJsResource)[_0x31cfb9(0x1b0)];if(_0x3a7967['jsUrl']&&_0x5cbd15>0x1)throw new Error(_0x31cfb9(0x1b8)+_0x5cbd15+'\x20existing\x20JS\x20resources\x20for\x20\x22'+_0x386619['label']+_0x31cfb9(0x1bd)+_0x386619[_0x31cfb9(0x1d0)]+')\x20'+_0x31cfb9(0x1ba));const _0xc1a54e=_0x406bbf[_0x31cfb9(0x1e8)](isCssResource)['length'];if(_0x3a7967[_0x31cfb9(0x1c6)]&&_0xc1a54e>0x1)throw new Error(_0x31cfb9(0x1b8)+_0xc1a54e+_0x31cfb9(0x1d2)+_0x386619[_0x31cfb9(0x1d8)]+_0x31cfb9(0x1bd)+_0x386619['path']+')\x20'+_0x31cfb9(0x1d3));}function patchResources(_0x334037,_0x1e6ef2){const _0x443b88=a186_0x21e5;let _0x1fe90e=![],_0x1469c6=![];const _0xa75ef7=[];for(const _0x589465 of _0x334037){if(isJsResource(_0x589465)){if(_0x1e6ef2[_0x443b88(0x1cd)]&&!_0x1fe90e)_0xa75ef7[_0x443b88(0x1e5)](_0x1e6ef2[_0x443b88(0x1cd)]),_0x1fe90e=!![];else!_0x1e6ef2[_0x443b88(0x1cd)]&&_0xa75ef7[_0x443b88(0x1e5)](_0x589465);continue;}if(isCssResource(_0x589465)){if(_0x1e6ef2['cssUrl']&&!_0x1469c6)_0xa75ef7['push'](_0x1e6ef2[_0x443b88(0x1c6)]),_0x1469c6=!![];else!_0x1e6ef2['cssUrl']&&_0xa75ef7[_0x443b88(0x1e5)](_0x589465);continue;}_0xa75ef7[_0x443b88(0x1e5)](_0x589465);}return _0x1e6ef2[_0x443b88(0x1cd)]&&!_0x1fe90e&&_0xa75ef7[_0x443b88(0x1db)](_0x1e6ef2[_0x443b88(0x1cd)]),_0x1e6ef2[_0x443b88(0x1c6)]&&!_0x1469c6&&_0xa75ef7[_0x443b88(0x1e5)](_0x1e6ef2['cssUrl']),_0xa75ef7;}function isJsResource(_0xaadd28){const _0xce7451=a186_0x21e5;return stripQuery(_0xaadd28)[_0xce7451(0x1aa)]()[_0xce7451(0x1d9)](_0xce7451(0x1e0));}function a186_0x21e5(_0x402a43,_0x38aa5d){_0x402a43=_0x402a43-0x1a4;const _0x447572=a186_0x4475();let _0x21e5ed=_0x447572[_0x402a43];return _0x21e5ed;}function isCssResource(_0x5c16cb){const _0x5c1824=a186_0x21e5;return stripQuery(_0x5c16cb)['toLowerCase']()[_0x5c1824(0x1d9)](_0x5c1824(0x1bc));}function stripQuery(_0xfce4e3){const _0x2d0a4d=a186_0x21e5;return _0xfce4e3[_0x2d0a4d(0x1da)]('?')[0x0]??_0xfce4e3;}function parseUpdateParamsFlag(_0x247a95){const _0x275f80=a186_0x21e5;if(!_0x247a95||typeof _0x247a95!=='string')return{};try{const _0x117035=JSON[_0x275f80(0x1e2)](_0x247a95);if(typeof _0x117035!==_0x275f80(0x1a9)||_0x117035===null||Array[_0x275f80(0x1df)](_0x117035))return{};return{'jsUrl':typeof _0x117035[_0x275f80(0x1cd)]===_0x275f80(0x1dc)?_0x117035[_0x275f80(0x1cd)][_0x275f80(0x1b5)]():undefined,'cssUrl':typeof _0x117035[_0x275f80(0x1c6)]===_0x275f80(0x1dc)?_0x117035['cssUrl'][_0x275f80(0x1b5)]():undefined};}catch{return{};}}
1
+ (function(_0x5bcea2,_0x1f770d){const _0x30a035=a186_0xc74f,_0x17fb13=_0x5bcea2();while(!![]){try{const _0x47b3e3=parseInt(_0x30a035(0x1a6))/0x1*(parseInt(_0x30a035(0x1e3))/0x2)+-parseInt(_0x30a035(0x1a5))/0x3+-parseInt(_0x30a035(0x1c8))/0x4*(parseInt(_0x30a035(0x1ac))/0x5)+parseInt(_0x30a035(0x1dc))/0x6+parseInt(_0x30a035(0x1c6))/0x7*(parseInt(_0x30a035(0x1be))/0x8)+parseInt(_0x30a035(0x1d8))/0x9*(parseInt(_0x30a035(0x1b6))/0xa)+-parseInt(_0x30a035(0x1c5))/0xb;if(_0x47b3e3===_0x1f770d)break;else _0x17fb13['push'](_0x17fb13['shift']());}catch(_0x26c55a){_0x17fb13['push'](_0x17fb13['shift']());}}}(a186_0x46b3,0x36d89));function a186_0x46b3(){const _0x4d8582=['value','66182eCaRHL','cwd','1292910TgXkok','1siFLZI','trim','cssUrl','join','string','label','116420ZXQFll','force','path','\x20existing\x20JS\x20resources\x20for\x20\x22','info','selection','some','Start\x20non-interactive\x20menu\x20asset\x20update','Invalid\x20--params:\x20menu\x20asset-update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','180DcvkIk',').\x20','.\x20Allowed\x20values:\x20replace,\x20patch','.js','extend','loadScriptMode','all','push','16YHdgJO','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','rejected','menuIds','jsUrl','menu\x20asset-update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22','paths','2851101oEegCl','624743bNiMUf','menu-asset-update','12uBvcix','map','patch','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','unshift','filter','JS\x20URL\x20is\x20unreachable:\x20','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','dryRun','after','replace','menu\x20asset-update\x20cannot\x20patch\x20','field','length','Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.','Invalid\x20--mode:\x20','218061jliHSN','resources','isArray','toLowerCase','2021706COpdnE','message','--params.','has','endsWith','\x22\x20('];a186_0x46b3=function(){return _0x4d8582;};return a186_0x46b3();}import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';function a186_0xc74f(_0x3a766a,_0x3fca6f){_0x3a766a=_0x3a766a-0x1a5;const _0x46b3fb=a186_0x46b3();let _0xc74f66=_0x46b3fb[_0x3a766a];return _0xc74f66;}import{logger}from'../../../utils/logger.js';function validateParams(_0x3f67ce){const _0x166a87=a186_0xc74f,_0x7b0a8b=[];return _0x3f67ce[_0x166a87(0x1c2)]&&!isValidJsHttpsUrl(_0x3f67ce['jsUrl'])&&_0x7b0a8b[_0x166a87(0x1bd)]({'field':_0x166a87(0x1c2),'message':_0x166a87(0x1bf)}),_0x3f67ce[_0x166a87(0x1a8)]&&!isValidCssHttpsUrl(_0x3f67ce[_0x166a87(0x1a8)])&&_0x7b0a8b['push']({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x7b0a8b;}export async function runMenuUpdateCore(_0x18d8c5,_0x4fd09f,_0x329805,_0x397b3d={}){const _0x11e108=a186_0xc74f,_0x22bd6a=parseUpdateParamsFlag(_0x329805),_0x5f2848=normalizeMode(_0x397b3d['mode']);validateSelection(_0x397b3d[_0x11e108(0x1b1)]);const _0x1680f4=[];if(_0x22bd6a[_0x11e108(0x1c2)])_0x1680f4[_0x11e108(0x1bd)](_0x22bd6a[_0x11e108(0x1c2)]);if(_0x22bd6a[_0x11e108(0x1a8)])_0x1680f4[_0x11e108(0x1bd)](_0x22bd6a[_0x11e108(0x1a8)]);const _0x1eb1e1=validateParams(_0x22bd6a);if(_0x1eb1e1[_0x11e108(0x1d5)]>0x0){const _0x52907f=_0x1eb1e1[_0x11e108(0x1c9)](_0x5a122c=>_0x11e108(0x1de)+_0x5a122c[_0x11e108(0x1d4)]+':\x20'+_0x5a122c[_0x11e108(0x1dd)])[_0x11e108(0x1a9)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x52907f);}if(_0x1680f4[_0x11e108(0x1d5)]===0x0)throw new Error(_0x11e108(0x1b4)+_0x11e108(0x1cb));logger['setLogPath'](process[_0x11e108(0x1e4)]()),logger[_0x11e108(0x1b0)](_0x11e108(0x1c7),_0x11e108(0x1b3),{'appCode':_0x18d8c5,'jsUrl':_0x22bd6a[_0x11e108(0x1c2)],'cssUrl':_0x22bd6a[_0x11e108(0x1a8)],'mode':_0x5f2848,'dryRun':_0x397b3d[_0x11e108(0x1d0)]===!![]});if(_0x22bd6a[_0x11e108(0x1c2)]){const _0x4b17e8=await isUrlReachable(_0x22bd6a[_0x11e108(0x1c2)]);if(!_0x4b17e8)throw new Error(_0x11e108(0x1ce)+_0x22bd6a[_0x11e108(0x1c2)]);}if(_0x22bd6a[_0x11e108(0x1a8)]){const _0x3f4ead=await isUrlReachable(_0x22bd6a[_0x11e108(0x1a8)]);if(!_0x3f4ead)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x22bd6a['cssUrl']);}const _0x234059=await getOnlineMenuList(_0x18d8c5,_0x4fd09f),_0x5eeb35=_0x234059[_0x11e108(0x1cd)](_0x41428c=>_0x41428c[_0x11e108(0x1d9)][_0x11e108(0x1d5)]>0x0),_0x2770c5=selectMenusForUpdate(_0x5eeb35,_0x397b3d[_0x11e108(0x1b1)]);if(_0x2770c5[_0x11e108(0x1d5)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x397b3d[_0x11e108(0x1d0)]===!![]};const _0x2437ae=_0x2770c5[_0x11e108(0x1c9)](_0x5b1eab=>buildMenuUpdateDiff(_0x5b1eab,_0x22bd6a,_0x5f2848,_0x397b3d[_0x11e108(0x1ad)]===!![],_0x397b3d[_0x11e108(0x1bb)]));if(_0x397b3d[_0x11e108(0x1d0)])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x2437ae};const _0xc7b453=await Promise['allSettled'](_0x2770c5[_0x11e108(0x1c9)]((_0x2df9f8,_0x194747)=>updateMenuCdnUrl(_0x18d8c5,_0x4fd09f,{'id':_0x2df9f8['id'],'label':_0x2df9f8[_0x11e108(0x1ab)],'path':_0x2df9f8[_0x11e108(0x1ae)],'resources':_0x2437ae[_0x194747][_0x11e108(0x1d1)][_0x11e108(0x1d9)],'extend':_0x2df9f8[_0x11e108(0x1ba)]??null,'loadScriptMode':_0x397b3d[_0x11e108(0x1bb)]}))),_0x3dda0f=_0xc7b453['filter'](_0x56df90=>_0x56df90['status']==='fulfilled')[_0x11e108(0x1c9)](_0xb4929f=>_0xb4929f[_0x11e108(0x1e2)]),_0xf0746f=_0xc7b453['filter'](_0x4987c9=>_0x4987c9['status']===_0x11e108(0x1c0))[_0x11e108(0x1d5)];return logger[_0x11e108(0x1b0)](_0x11e108(0x1c7),'Menu\x20asset\x20update\x20completed',{'count':_0x2770c5[_0x11e108(0x1d5)],'resources':_0x1680f4}),{'updated':_0x3dda0f[_0x11e108(0x1d5)],'failed':_0xf0746f,'skipped':![],'menus':_0x3dda0f};}function validateSelection(_0x454c02){const _0x3eed76=a186_0xc74f;if(!_0x454c02)throw new Error('menu\x20asset-update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x454c02[_0x3eed76(0x1bc)]&&(_0x454c02['menuIds'][_0x3eed76(0x1d5)]>0x0||_0x454c02[_0x3eed76(0x1c4)]['length']>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x454c02[_0x3eed76(0x1bc)]&&_0x454c02[_0x3eed76(0x1c1)][_0x3eed76(0x1d5)]===0x0&&_0x454c02[_0x3eed76(0x1c4)][_0x3eed76(0x1d5)]===0x0)throw new Error(_0x3eed76(0x1b5));}export function selectMenusForUpdate(_0x376123,_0x19ce1a){const _0x45dc89=a186_0xc74f;validateSelection(_0x19ce1a);if(_0x19ce1a[_0x45dc89(0x1bc)])return _0x376123;const _0x5b62b5=new Set(_0x376123[_0x45dc89(0x1c9)](_0x5cc163=>_0x5cc163['id'])),_0x3b6363=new Set(_0x376123[_0x45dc89(0x1c9)](_0x4a1d52=>_0x4a1d52[_0x45dc89(0x1ae)])),_0xd968d0=_0x19ce1a[_0x45dc89(0x1c1)][_0x45dc89(0x1cd)](_0x568056=>!_0x5b62b5[_0x45dc89(0x1df)](_0x568056)),_0x103b57=_0x19ce1a['paths'][_0x45dc89(0x1cd)](_0x4979d8=>!_0x3b6363[_0x45dc89(0x1df)](_0x4979d8));if(_0xd968d0[_0x45dc89(0x1d5)]>0x0||_0x103b57[_0x45dc89(0x1d5)]>0x0){const _0x32a5c6=[..._0xd968d0[_0x45dc89(0x1c9)](_0x3995c9=>String(_0x3995c9)),..._0x103b57][_0x45dc89(0x1a9)](',\x20');throw new Error('menu\x20asset-update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x32a5c6);}const _0x2dfb0d=new Set(_0x19ce1a[_0x45dc89(0x1c1)]),_0x123a02=new Set(_0x19ce1a[_0x45dc89(0x1c4)]);return _0x376123[_0x45dc89(0x1cd)](_0x3f8177=>_0x2dfb0d[_0x45dc89(0x1df)](_0x3f8177['id'])||_0x123a02[_0x45dc89(0x1df)](_0x3f8177[_0x45dc89(0x1ae)]));}function normalizeMode(_0x3d96cd){const _0x1a51f4=a186_0xc74f;if(!_0x3d96cd)return _0x1a51f4(0x1ca);if(_0x3d96cd===_0x1a51f4(0x1d2)||_0x3d96cd===_0x1a51f4(0x1ca))return _0x3d96cd;throw new Error(_0x1a51f4(0x1d7)+_0x3d96cd+_0x1a51f4(0x1b8));}function buildMenuUpdateDiff(_0xc661a8,_0x1669ae,_0x3aac9d,_0x53b81c,_0x3d6a19){const _0x4ff6cb=a186_0xc74f,_0x4611bd=[..._0xc661a8[_0x4ff6cb(0x1d9)]];_0x3aac9d==='patch'&&assertUnambiguousPatchResources(_0xc661a8,_0x4611bd,_0x1669ae);const _0xbdb1b6=_0x3aac9d===_0x4ff6cb(0x1ca)?patchResources(_0x4611bd,_0x1669ae):replaceResources(_0x1669ae),_0x292ce8=[],_0x35e6de=_0x4611bd[_0x4ff6cb(0x1b2)](isJsResource),_0x1457c8=_0xbdb1b6[_0x4ff6cb(0x1b2)](isJsResource);if(_0x35e6de&&!_0x1457c8){const _0x4acd2f=_0x4ff6cb(0x1c3)+_0xc661a8[_0x4ff6cb(0x1ab)]+_0x4ff6cb(0x1e1)+_0xc661a8[_0x4ff6cb(0x1ae)]+_0x4ff6cb(0x1b7)+_0x4ff6cb(0x1d6);if(!_0x53b81c)throw new Error(_0x4acd2f);_0x292ce8[_0x4ff6cb(0x1bd)](_0x4acd2f);}const _0x390a34=_0x4611bd[_0x4ff6cb(0x1b2)](isCssResource),_0x164690=_0xbdb1b6[_0x4ff6cb(0x1b2)](isCssResource);_0x390a34&&!_0x164690&&_0x292ce8[_0x4ff6cb(0x1bd)]('menu\x20asset-update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0xc661a8['label']+'\x22\x20('+_0xc661a8['path']+').');const _0x568576=typeof _0xc661a8['extend']?.[_0x4ff6cb(0x1bb)]==='string'?_0xc661a8[_0x4ff6cb(0x1ba)][_0x4ff6cb(0x1bb)]:null,_0x59aabc=_0x3d6a19?{'loadScriptMode':_0x568576}:{},_0x5969ff=_0x3d6a19?{'loadScriptMode':_0x3d6a19}:{};return{'id':_0xc661a8['id'],'label':_0xc661a8[_0x4ff6cb(0x1ab)],'path':_0xc661a8[_0x4ff6cb(0x1ae)],'mode':_0x3aac9d,'before':{'resources':_0x4611bd,..._0x59aabc},'after':{'resources':_0xbdb1b6,..._0x5969ff},'warnings':_0x292ce8};}function replaceResources(_0xf60296){const _0x3a68a7=a186_0xc74f;return[_0xf60296['jsUrl'],_0xf60296[_0x3a68a7(0x1a8)]]['filter'](_0x329664=>!!_0x329664);}function assertUnambiguousPatchResources(_0x3cf6c3,_0x4a3359,_0x2cf874){const _0x193205=a186_0xc74f,_0x275b03=_0x4a3359['filter'](isJsResource)[_0x193205(0x1d5)];if(_0x2cf874['jsUrl']&&_0x275b03>0x1)throw new Error(_0x193205(0x1d3)+_0x275b03+_0x193205(0x1af)+_0x3cf6c3[_0x193205(0x1ab)]+_0x193205(0x1e1)+_0x3cf6c3[_0x193205(0x1ae)]+')\x20'+'with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.');const _0x46c4d2=_0x4a3359[_0x193205(0x1cd)](isCssResource)[_0x193205(0x1d5)];if(_0x2cf874[_0x193205(0x1a8)]&&_0x46c4d2>0x1)throw new Error(_0x193205(0x1d3)+_0x46c4d2+'\x20existing\x20CSS\x20resources\x20for\x20\x22'+_0x3cf6c3['label']+'\x22\x20('+_0x3cf6c3[_0x193205(0x1ae)]+')\x20'+_0x193205(0x1cf));}function patchResources(_0x1ea2f8,_0x522362){const _0x50dc24=a186_0xc74f;let _0x2c027f=![],_0x5eb259=![];const _0x15d398=[];for(const _0x5a10c8 of _0x1ea2f8){if(isJsResource(_0x5a10c8)){if(_0x522362['jsUrl']&&!_0x2c027f)_0x15d398[_0x50dc24(0x1bd)](_0x522362[_0x50dc24(0x1c2)]),_0x2c027f=!![];else!_0x522362[_0x50dc24(0x1c2)]&&_0x15d398['push'](_0x5a10c8);continue;}if(isCssResource(_0x5a10c8)){if(_0x522362['cssUrl']&&!_0x5eb259)_0x15d398[_0x50dc24(0x1bd)](_0x522362['cssUrl']),_0x5eb259=!![];else!_0x522362[_0x50dc24(0x1a8)]&&_0x15d398[_0x50dc24(0x1bd)](_0x5a10c8);continue;}_0x15d398[_0x50dc24(0x1bd)](_0x5a10c8);}return _0x522362['jsUrl']&&!_0x2c027f&&_0x15d398[_0x50dc24(0x1cc)](_0x522362[_0x50dc24(0x1c2)]),_0x522362['cssUrl']&&!_0x5eb259&&_0x15d398[_0x50dc24(0x1bd)](_0x522362[_0x50dc24(0x1a8)]),_0x15d398;}function isJsResource(_0x1539b5){const _0x4f3f9c=a186_0xc74f;return stripQuery(_0x1539b5)[_0x4f3f9c(0x1db)]()[_0x4f3f9c(0x1e0)](_0x4f3f9c(0x1b9));}function isCssResource(_0x28af03){const _0x302270=a186_0xc74f;return stripQuery(_0x28af03)[_0x302270(0x1db)]()['endsWith']('.css');}function stripQuery(_0x20c96e){return _0x20c96e['split']('?')[0x0]??_0x20c96e;}function parseUpdateParamsFlag(_0x4a9367){const _0x6aa450=a186_0xc74f;if(!_0x4a9367||typeof _0x4a9367!=='string')return{};try{const _0x466290=JSON['parse'](_0x4a9367);if(typeof _0x466290!=='object'||_0x466290===null||Array[_0x6aa450(0x1da)](_0x466290))return{};return{'jsUrl':typeof _0x466290[_0x6aa450(0x1c2)]===_0x6aa450(0x1aa)?_0x466290['jsUrl']['trim']():undefined,'cssUrl':typeof _0x466290[_0x6aa450(0x1a8)]==='string'?_0x466290[_0x6aa450(0x1a8)][_0x6aa450(0x1a7)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x480563,_0x26d363){const _0x41feb6=a187_0x37fb,_0x259622=_0x480563();while(!![]){try{const _0x3e64c5=-parseInt(_0x41feb6(0x1cb))/0x1*(-parseInt(_0x41feb6(0x1c5))/0x2)+parseInt(_0x41feb6(0x1ca))/0x3*(parseInt(_0x41feb6(0x1c7))/0x4)+parseInt(_0x41feb6(0x1d2))/0x5+parseInt(_0x41feb6(0x1cf))/0x6*(parseInt(_0x41feb6(0x1ce))/0x7)+parseInt(_0x41feb6(0x1d3))/0x8+-parseInt(_0x41feb6(0x1c9))/0x9+-parseInt(_0x41feb6(0x1d1))/0xa*(parseInt(_0x41feb6(0x1cc))/0xb);if(_0x3e64c5===_0x26d363)break;else _0x259622['push'](_0x259622['shift']());}catch(_0xa341d4){_0x259622['push'](_0x259622['shift']());}}}(a187_0x246e,0x4a311));export function isValidJsHttpsUrl(_0x4a6c1a){const _0x2b6fd2=a187_0x37fb;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x4a6c1a[_0x2b6fd2(0x1c6)]());}function a187_0x246e(){const _0x17d2e3=['400qJEvEZ','trim','152dvmavL','HEAD','5324346YAMYPI','8529cnVtkK','1042bgwOsI','11xCtFdo','body','7WjJUpJ','3172446YlSaYv','bytes=0-0','2033820quBJZr','839190QnlQqT','686816jWZAwH','test'];a187_0x246e=function(){return _0x17d2e3;};return a187_0x246e();}export function isValidCssHttpsUrl(_0x4fc51e){const _0x3af5d0=a187_0x37fb;return/^https:\/\/.+\.css(\?.*)?$/[_0x3af5d0(0x1c4)](_0x4fc51e['trim']());}function a187_0x37fb(_0x150bf6,_0x32863e){_0x150bf6=_0x150bf6-0x1c4;const _0x246e95=a187_0x246e();let _0x37fb1c=_0x246e95[_0x150bf6];return _0x37fb1c;}export async function isUrlReachable(_0x22bce5){const _0x2a198d=a187_0x37fb;try{const _0xa28e9b=await fetch(_0x22bce5,{'method':_0x2a198d(0x1c8)});if(_0xa28e9b['ok'])return!![];}catch{}try{const _0x1e2e44=await fetch(_0x22bce5,{'method':'GET','headers':{'Range':_0x2a198d(0x1d0)}}),_0x5a4bf5=_0x1e2e44['ok'];try{await _0x1e2e44[_0x2a198d(0x1cd)]?.['cancel']();}catch{}return _0x5a4bf5;}catch{return![];}}
1
+ function a187_0x8b86(_0x4ee57a,_0x2afc13){_0x4ee57a=_0x4ee57a-0x1e9;const _0x2c809b=a187_0x2c80();let _0x8b867f=_0x2c809b[_0x4ee57a];return _0x8b867f;}(function(_0x13287e,_0x206837){const _0xbca10d=a187_0x8b86,_0x1c1660=_0x13287e();while(!![]){try{const _0x316b9d=parseInt(_0xbca10d(0x1f4))/0x1*(parseInt(_0xbca10d(0x1ee))/0x2)+-parseInt(_0xbca10d(0x1ea))/0x3*(parseInt(_0xbca10d(0x1eb))/0x4)+parseInt(_0xbca10d(0x1f5))/0x5*(-parseInt(_0xbca10d(0x1f6))/0x6)+parseInt(_0xbca10d(0x1e9))/0x7*(parseInt(_0xbca10d(0x1f7))/0x8)+parseInt(_0xbca10d(0x1f9))/0x9+parseInt(_0xbca10d(0x1f8))/0xa+-parseInt(_0xbca10d(0x1ed))/0xb;if(_0x316b9d===_0x206837)break;else _0x1c1660['push'](_0x1c1660['shift']());}catch(_0x353f4c){_0x1c1660['push'](_0x1c1660['shift']());}}}(a187_0x2c80,0x41e38));export function isValidJsHttpsUrl(_0x15c383){const _0x2075dc=a187_0x8b86;return/^https:\/\/.+\.js(\?.*)?$/[_0x2075dc(0x1f3)](_0x15c383[_0x2075dc(0x1f0)]());}function a187_0x2c80(){const _0x96d9a6=['test','425049MwNIne','810gmAlVi','4362CxVujt','3257256zATEbh','3682280yxcAPr','2579004SmHVcj','7gpPCAT','543qQlVRZ','60EMlPgd','GET','12062831NJXEsK','2pXlHis','bytes=0-0','trim','cancel','HEAD'];a187_0x2c80=function(){return _0x96d9a6;};return a187_0x2c80();}export function isValidCssHttpsUrl(_0x34c576){const _0x514760=a187_0x8b86;return/^https:\/\/.+\.css(\?.*)?$/[_0x514760(0x1f3)](_0x34c576[_0x514760(0x1f0)]());}export async function isUrlReachable(_0x52d30e){const _0xf374bd=a187_0x8b86;try{const _0x5cf3f4=await fetch(_0x52d30e,{'method':_0xf374bd(0x1f2)});if(_0x5cf3f4['ok'])return!![];}catch{}try{const _0x278578=await fetch(_0x52d30e,{'method':_0xf374bd(0x1ec),'headers':{'Range':_0xf374bd(0x1ef)}}),_0x59f113=_0x278578['ok'];try{await _0x278578['body']?.[_0xf374bd(0x1f1)]();}catch{}return _0x59f113;}catch{return![];}}