@lovrabet/rabetbase-cli 2.3.11 → 2.3.12-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x127edf,_0x191f35){const _0x3d3af0=a110_0x193e,_0x31b879=_0x127edf();while(!![]){try{const _0x4a7938=-parseInt(_0x3d3af0(0x12c))/0x1+-parseInt(_0x3d3af0(0xf4))/0x2*(parseInt(_0x3d3af0(0xf6))/0x3)+-parseInt(_0x3d3af0(0xd9))/0x4+parseInt(_0x3d3af0(0xfc))/0x5*(-parseInt(_0x3d3af0(0x122))/0x6)+-parseInt(_0x3d3af0(0x100))/0x7+-parseInt(_0x3d3af0(0xe9))/0x8+parseInt(_0x3d3af0(0x106))/0x9;if(_0x4a7938===_0x191f35)break;else _0x31b879['push'](_0x31b879['shift']());}catch(_0x2c5b7b){_0x31b879['push'](_0x31b879['shift']());}}}(a110_0x2c14,0x7f9e7));import{createHash}from'node:crypto';function a110_0x193e(_0x445bd5,_0x55c12c){_0x445bd5=_0x445bd5-0xd5;const _0x2c146e=a110_0x2c14();let _0x193e64=_0x2c146e[_0x445bd5];return _0x193e64;}import{mkdir,readFile,stat,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND='menu\x20delete',PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;function a110_0x2c14(){const _0x404229=['size','POST','recursive','\x20bytes.','55xpaMhl','Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.','isArray','label','2222402awTrGi','Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.','updateTime','resources','batch-delete-menu','Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.','23503032OSsYZv','trim','parse','Menu\x20delete\x20plan\x20targets\x20app\x20','menu_plan_expired','version','type','Menu\x20delete\x20plan\x20creation\x20time\x20','modelType','string','length','Failed\x20to\x20write\x20menu\x20delete\x20plan\x20','isFinite','update','isInteger','snapshotHash','menu_plan_write_failed','number','deleteOrder','delete','object','datasetCode','warnings','getTime','code','map','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','/smartapi/menu/batchDelete','497244gMEEvJ','Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20','extendHash','menu_plan_app_mismatch','Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20','updateUserId','test','parentId','isSafeInteger','command','26586uPdWAo','menu_state_drift','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','digest','path','sha256','EEXIST','boolean','\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.','sort','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.','appCode','expiresAt','stringify',',\x20current\x20app\x20is\x20','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','menu_plan_invalid','visible','Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.','depth','utf8','updateUserName','1342816EncgTC','resourcesValid','menu_plan_file_exists','hash','createdAt','pageType','target','pages','selector','cascade','datasetId','extend','byId','targetFingerprints','targetFingerprint','toISOString','1195248RORWiz','childrenCount','pageId','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.','Cannot\x20read\x20menu\x20delete\x20plan\x20','before','childrenIds','Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.','Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.','get','every','50ioWrwK','targets','41751FkWZyj','Planned\x20menu\x20'];a110_0x2c14=function(){return _0x404229;};return a110_0x2c14();}export function createMenuDeletePlanFile(_0x400709,_0x40fb02,_0x7c121c=new Date()){const _0x4e9ac6=a110_0x193e;if(!_0x40fb02[_0x4e9ac6(0xee)]||!isMenuFact(_0x40fb02[_0x4e9ac6(0xee)]))throw menuError(_0x4e9ac6(0x13c),_0x4e9ac6(0x101));const _0x3c3b6c=_0x40fb02[_0x4e9ac6(0xf5)]?.[_0x4e9ac6(0x110)]?_0x40fb02[_0x4e9ac6(0xf5)]:[_0x40fb02[_0x4e9ac6(0xee)]],_0x223c84=_0x40fb02[_0x4e9ac6(0x118)]?.[_0x4e9ac6(0x110)]?_0x40fb02['deleteOrder']:_0x3c3b6c['map'](_0x3032bf=>_0x3032bf['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0x400709,'createdAt':_0x7c121c[_0x4e9ac6(0xe8)](),'expiresAt':new Date(_0x7c121c[_0x4e9ac6(0x11d)]()+PLAN_TTL_MS)[_0x4e9ac6(0xe8)](),'snapshotHash':_0x40fb02['snapshotHash'],'recursive':_0x40fb02[_0x4e9ac6(0xe1)][_0x4e9ac6(0xfa)]===!![],'target':_0x40fb02[_0x4e9ac6(0xee)],'targetFingerprint':fingerprint(_0x40fb02['before']),'targets':_0x3c3b6c,'targetFingerprints':_0x3c3b6c['map'](fingerprint),'deleteOrder':_0x223c84,'cascade':_0x40fb02[_0x4e9ac6(0xe2)]??{'pages':_0x40fb02['before'][_0x4e9ac6(0xeb)]==null?[]:[_0x40fb02[_0x4e9ac6(0xee)][_0x4e9ac6(0xeb)]],'pageSchemaAffected':_0x40fb02[_0x4e9ac6(0xee)][_0x4e9ac6(0xeb)]!=null},'warnings':[..._0x40fb02[_0x4e9ac6(0x11c)]]};}export async function writeMenuDeletePlan(_0x142123,_0x4750fb){const _0x50a39b=a110_0x193e,_0x26af05=resolvePlanPath(_0x142123,'plan-out');await mkdir(dirname(_0x26af05),{'recursive':!![]});try{await writeFile(_0x26af05,JSON[_0x50a39b(0x139)](_0x4750fb,null,0x2)+'\x0a',{'encoding':_0x50a39b(0xd7),'flag':'wx'});}catch(_0x1aaf21){if(_0x1aaf21[_0x50a39b(0x11e)]===_0x50a39b(0x132))throw menuError(_0x50a39b(0xdb),_0x50a39b(0x123)+_0x26af05,_0x50a39b(0xd5));throw menuError(_0x50a39b(0x116),_0x50a39b(0x111)+_0x26af05+':\x20'+errorMessage(_0x1aaf21));}return _0x26af05;}export async function readMenuDeletePlan(_0x26fd60){const _0x6d726c=a110_0x193e,_0x14de85=resolvePlanPath(_0x26fd60,'plan');let _0x1e275b;try{_0x1e275b=(await stat(_0x14de85))[_0x6d726c(0xf8)];}catch(_0x9d7ddd){throw menuError(_0x6d726c(0x13c),_0x6d726c(0xed)+_0x14de85+':\x20'+errorMessage(_0x9d7ddd));}if(_0x1e275b>MAX_PLAN_BYTES)throw menuError(_0x6d726c(0x13c),_0x6d726c(0x120)+_0x1e275b+_0x6d726c(0xfb));let _0xaacb60;try{_0xaacb60=JSON[_0x6d726c(0x108)](await readFile(_0x14de85,_0x6d726c(0xd7)));}catch(_0xa1bf1d){throw menuError(_0x6d726c(0x13c),'Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20'+errorMessage(_0xa1bf1d));}if(!isMenuDeletePlanFile(_0xaacb60))throw menuError(_0x6d726c(0x13c),_0x6d726c(0x126)+PLAN_VERSION+'\x20of\x20the\x20'+PLAN_COMMAND+'\x20contract.');if(!sameFingerprint(_0xaacb60['targetFingerprint'],fingerprint(_0xaacb60[_0x6d726c(0xdf)])))throw menuError(_0x6d726c(0x13c),_0x6d726c(0xf0),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.');if(!_0xaacb60[_0x6d726c(0xf5)][_0x6d726c(0xf3)]((_0x2d5d9f,_0x3e7814)=>sameFingerprint(_0xaacb60['targetFingerprints'][_0x3e7814],fingerprint(_0x2d5d9f)))||!sameFingerprint(_0xaacb60[_0x6d726c(0xe7)],fingerprint(_0xaacb60[_0x6d726c(0xf5)][_0xaacb60[_0x6d726c(0xf5)][_0x6d726c(0x110)]-0x1])))throw menuError(_0x6d726c(0x13c),'Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.',_0x6d726c(0x13b));return{'path':_0x14de85,'plan':_0xaacb60};}export function mutationPlanFromDeleteFile(_0xa22028,_0x3b466c){const _0x3ec62c=a110_0x193e;return mutationResult({'operation':_0x3ec62c(0x119),'selector':{'id':_0xa22028[_0x3ec62c(0xdf)]['id'],'recursive':_0xa22028[_0x3ec62c(0xfa)]},'before':_0xa22028[_0x3ec62c(0xdf)],'after':null,'dryRun':![],'backend':[{'method':_0x3ec62c(0xf9),'path':_0x3ec62c(0x121)}],'plannedActions':[{'stage':_0x3ec62c(0x104),'method':_0x3ec62c(0xf9),'path':_0x3ec62c(0x121),'body':{'idList':_0xa22028[_0x3ec62c(0x118)]}}],'targets':_0xa22028[_0x3ec62c(0xf5)],'deleteOrder':_0xa22028[_0x3ec62c(0x118)],'snapshotHash':_0xa22028[_0x3ec62c(0x115)],'cascade':_0xa22028[_0x3ec62c(0xe2)],'planFile':{'path':_0x3b466c,'createdAt':_0xa22028[_0x3ec62c(0xdd)],'expiresAt':_0xa22028[_0x3ec62c(0x138)]},'warnings':_0xa22028['warnings']});}export function assertMenuDeletePlanCurrent(_0x3eeef6,_0x1f8623,_0x43e366,_0x51e985=new Date()){const _0x67a581=a110_0x193e;assertMenuDeletePlanExecutable(_0x3eeef6,_0x1f8623,_0x51e985);if(_0x43e366[_0x67a581(0xdc)]!==_0x3eeef6[_0x67a581(0x115)])throw menuError(_0x67a581(0x12d),_0x67a581(0xfd),_0x67a581(0x136));return _0x3eeef6['targets'][_0x67a581(0x11f)]((_0x25cc5f,_0x4c8064)=>{const _0x3776f4=_0x67a581,_0x33c95c=_0x43e366[_0x3776f4(0xe5)][_0x3776f4(0xf2)](_0x25cc5f['id']);if(!_0x33c95c)throw menuError(_0x3776f4(0x12d),_0x3776f4(0xf7)+_0x25cc5f['id']+_0x3776f4(0x12e));if(!sameFingerprint(_0x3eeef6['targetFingerprints'][_0x4c8064],fingerprint(_0x33c95c)))throw menuError(_0x3776f4(0x12d),_0x3776f4(0xf7)+_0x25cc5f['id']+_0x3776f4(0x134),_0x3776f4(0x105));return _0x33c95c;});}export function assertMenuDeletePlanExecutable(_0x3fc07b,_0x15f472,_0x566453=new Date()){const _0x972eee=a110_0x193e;if(_0x3fc07b[_0x972eee(0x137)]!==_0x15f472)throw menuError(_0x972eee(0x125),_0x972eee(0x109)+JSON[_0x972eee(0x139)](_0x3fc07b[_0x972eee(0x137)])+_0x972eee(0x13a)+JSON['stringify'](_0x15f472)+'.');const _0x56ffa5=Date[_0x972eee(0x108)](_0x3fc07b['createdAt']),_0x3cb0e3=Date[_0x972eee(0x108)](_0x3fc07b['expiresAt']);if(!Number[_0x972eee(0x112)](_0x56ffa5)||!Number['isFinite'](_0x3cb0e3)||_0x3cb0e3-_0x56ffa5!==PLAN_TTL_MS)throw menuError(_0x972eee(0x13c),_0x972eee(0xf1));if(_0x56ffa5>_0x566453[_0x972eee(0x11d)]())throw menuError('menu_plan_invalid',_0x972eee(0x10d)+_0x3fc07b[_0x972eee(0xdd)]+'\x20is\x20in\x20the\x20future.',_0x972eee(0xec));if(_0x566453[_0x972eee(0x11d)]()>_0x3cb0e3)throw menuError(_0x972eee(0x10a),'Menu\x20delete\x20plan\x20expired\x20at\x20'+_0x3fc07b[_0x972eee(0x138)]+'.','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.');}function fingerprint(_0x4742cb){const _0x13d90b=a110_0x193e;return{'id':_0x4742cb['id'],'parentId':_0x4742cb['parentId'],'depth':_0x4742cb[_0x13d90b(0xd6)],'label':_0x4742cb[_0x13d90b(0xff)],'path':_0x4742cb[_0x13d90b(0x130)],'type':_0x4742cb[_0x13d90b(0x10c)],'visible':_0x4742cb[_0x13d90b(0x13d)],'sort':_0x4742cb['sort'],'pageId':_0x4742cb[_0x13d90b(0xeb)],'pageType':_0x4742cb[_0x13d90b(0xde)],'modelType':_0x4742cb[_0x13d90b(0x10e)],'datasetId':_0x4742cb[_0x13d90b(0xe3)],'datasetCode':_0x4742cb[_0x13d90b(0x11b)],'childrenIds':[..._0x4742cb['childrenIds']],'childrenCount':_0x4742cb['childrenCount'],'resourcesValid':_0x4742cb[_0x13d90b(0xda)],'resourcesHash':hashValue(_0x4742cb['resources']),'extendHash':hashValue(_0x4742cb[_0x13d90b(0xe4)]??null),'updateTime':_0x4742cb[_0x13d90b(0x102)]};}function hashValue(_0x2b1948){const _0x2f98df=a110_0x193e;return createHash(_0x2f98df(0x131))[_0x2f98df(0x113)](JSON['stringify'](_0x2b1948))[_0x2f98df(0x12f)]('hex');}function sameFingerprint(_0x524a6b,_0x3b6a34){const _0x5821a6=a110_0x193e;return JSON[_0x5821a6(0x139)](_0x524a6b)===JSON['stringify'](_0x3b6a34);}function resolvePlanPath(_0x173e65,_0x116856){const _0x209839=a110_0x193e,_0x3b83f1=_0x173e65[_0x209839(0x107)]();if(!_0x3b83f1)throw menuError(_0x209839(0x13c),'--'+_0x116856+'\x20requires\x20a\x20non-empty\x20file\x20path.');return resolve(_0x3b83f1);}function isMenuDeletePlanFile(_0x33913e){const _0x581ea3=a110_0x193e;if(!isRecord(_0x33913e))return![];return _0x33913e[_0x581ea3(0x10b)]===PLAN_VERSION&&_0x33913e[_0x581ea3(0x12b)]===PLAN_COMMAND&&typeof _0x33913e['appCode']===_0x581ea3(0x10f)&&_0x33913e[_0x581ea3(0x137)][_0x581ea3(0x110)]>0x0&&typeof _0x33913e[_0x581ea3(0xdd)]===_0x581ea3(0x10f)&&typeof _0x33913e[_0x581ea3(0x138)]===_0x581ea3(0x10f)&&typeof _0x33913e[_0x581ea3(0x115)]===_0x581ea3(0x10f)&&/^sha256:[a-f0-9]{64}$/[_0x581ea3(0x128)](_0x33913e[_0x581ea3(0x115)])&&typeof _0x33913e[_0x581ea3(0xfa)]===_0x581ea3(0x133)&&isMenuFact(_0x33913e['target'])&&isTargetFingerprint(_0x33913e['targetFingerprint'])&&Array[_0x581ea3(0xfe)](_0x33913e[_0x581ea3(0xf5)])&&_0x33913e['targets'][_0x581ea3(0x110)]>0x0&&_0x33913e[_0x581ea3(0xf5)][_0x581ea3(0xf3)](isMenuFact)&&Array['isArray'](_0x33913e[_0x581ea3(0xe6)])&&_0x33913e[_0x581ea3(0xe6)]['length']===_0x33913e[_0x581ea3(0xf5)][_0x581ea3(0x110)]&&_0x33913e[_0x581ea3(0xe6)]['every'](isTargetFingerprint)&&Array[_0x581ea3(0xfe)](_0x33913e['deleteOrder'])&&_0x33913e[_0x581ea3(0x118)][_0x581ea3(0x110)]===_0x33913e['targets'][_0x581ea3(0x110)]&&_0x33913e[_0x581ea3(0x118)][_0x581ea3(0xf3)](isPositiveInteger)&&new Set(_0x33913e['deleteOrder'])['size']===_0x33913e[_0x581ea3(0x118)][_0x581ea3(0x110)]&&_0x33913e['targets']['every']((_0x575643,_0x56c3e5)=>_0x575643['id']===_0x33913e[_0x581ea3(0x118)][_0x56c3e5])&&_0x33913e['targets'][_0x33913e[_0x581ea3(0xf5)][_0x581ea3(0x110)]-0x1]?.['id']===_0x33913e[_0x581ea3(0xdf)]['id']&&isRecord(_0x33913e[_0x581ea3(0xe2)])&&Array[_0x581ea3(0xfe)](_0x33913e[_0x581ea3(0xe2)]['pages'])&&_0x33913e['cascade'][_0x581ea3(0xe0)][_0x581ea3(0xf3)](isPositiveInteger)&&typeof _0x33913e[_0x581ea3(0xe2)]['pageSchemaAffected']===_0x581ea3(0x133)&&Array['isArray'](_0x33913e['warnings'])&&_0x33913e['warnings'][_0x581ea3(0xf3)](_0x14f9c0=>typeof _0x14f9c0===_0x581ea3(0x10f));}function isMenuFact(_0x5f1c1a){const _0xe996ca=a110_0x193e;if(!isRecord(_0x5f1c1a))return![];return isPositiveInteger(_0x5f1c1a['id'])&&(_0x5f1c1a[_0xe996ca(0x129)]===null||isPositiveInteger(_0x5f1c1a[_0xe996ca(0x129)]))&&Number[_0xe996ca(0x114)](_0x5f1c1a[_0xe996ca(0xd6)])&&_0x5f1c1a['depth']>=0x0&&typeof _0x5f1c1a[_0xe996ca(0xff)]===_0xe996ca(0x10f)&&typeof _0x5f1c1a[_0xe996ca(0x130)]==='string'&&typeof _0x5f1c1a[_0xe996ca(0x10c)]==='string'&&(_0x5f1c1a[_0xe996ca(0x13d)]===null||typeof _0x5f1c1a[_0xe996ca(0x13d)]===_0xe996ca(0x133))&&(_0x5f1c1a[_0xe996ca(0x135)]===null||Number[_0xe996ca(0x114)](_0x5f1c1a[_0xe996ca(0x135)]))&&Array[_0xe996ca(0xfe)](_0x5f1c1a[_0xe996ca(0x103)])&&_0x5f1c1a[_0xe996ca(0x103)][_0xe996ca(0xf3)](_0x497ac5=>typeof _0x497ac5===_0xe996ca(0x10f))&&typeof _0x5f1c1a['resourcesValid']===_0xe996ca(0x133)&&Array[_0xe996ca(0xfe)](_0x5f1c1a[_0xe996ca(0xef)])&&_0x5f1c1a[_0xe996ca(0xef)][_0xe996ca(0xf3)](isPositiveInteger)&&Number[_0xe996ca(0x114)](_0x5f1c1a[_0xe996ca(0xea)])&&_0x5f1c1a['childrenCount']>=0x0&&(_0x5f1c1a['pageId']===null||isPositiveInteger(_0x5f1c1a['pageId']))&&typeof _0x5f1c1a['pageType']==='string'&&typeof _0x5f1c1a[_0xe996ca(0x10e)]===_0xe996ca(0x10f)&&(_0x5f1c1a['datasetId']===null||isPositiveInteger(_0x5f1c1a[_0xe996ca(0xe3)]))&&typeof _0x5f1c1a[_0xe996ca(0x11b)]==='string'&&(_0x5f1c1a[_0xe996ca(0x127)]===null||typeof _0x5f1c1a[_0xe996ca(0x127)]===_0xe996ca(0x10f))&&(_0x5f1c1a[_0xe996ca(0xd8)]===null||typeof _0x5f1c1a[_0xe996ca(0xd8)]==='string')&&(_0x5f1c1a[_0xe996ca(0x102)]===null||typeof _0x5f1c1a[_0xe996ca(0x102)]===_0xe996ca(0x10f)||typeof _0x5f1c1a[_0xe996ca(0x102)]===_0xe996ca(0x117))&&(_0x5f1c1a[_0xe996ca(0xe4)]===undefined||_0x5f1c1a[_0xe996ca(0xe4)]===null||isRecord(_0x5f1c1a[_0xe996ca(0xe4)]));}function isTargetFingerprint(_0x249a87){const _0x3efbbf=a110_0x193e;if(!isRecord(_0x249a87))return![];return isPositiveInteger(_0x249a87['id'])&&(_0x249a87[_0x3efbbf(0x129)]===null||isPositiveInteger(_0x249a87['parentId']))&&Number[_0x3efbbf(0x114)](_0x249a87[_0x3efbbf(0xd6)])&&_0x249a87[_0x3efbbf(0xd6)]>=0x0&&typeof _0x249a87[_0x3efbbf(0xff)]===_0x3efbbf(0x10f)&&typeof _0x249a87[_0x3efbbf(0x130)]===_0x3efbbf(0x10f)&&typeof _0x249a87['type']===_0x3efbbf(0x10f)&&(_0x249a87[_0x3efbbf(0x13d)]===null||typeof _0x249a87[_0x3efbbf(0x13d)]===_0x3efbbf(0x133))&&(_0x249a87[_0x3efbbf(0x135)]===null||Number[_0x3efbbf(0x114)](_0x249a87[_0x3efbbf(0x135)]))&&(_0x249a87['pageId']===null||isPositiveInteger(_0x249a87[_0x3efbbf(0xeb)]))&&typeof _0x249a87[_0x3efbbf(0xde)]===_0x3efbbf(0x10f)&&typeof _0x249a87[_0x3efbbf(0x10e)]===_0x3efbbf(0x10f)&&(_0x249a87[_0x3efbbf(0xe3)]===null||isPositiveInteger(_0x249a87[_0x3efbbf(0xe3)]))&&typeof _0x249a87[_0x3efbbf(0x11b)]===_0x3efbbf(0x10f)&&Array[_0x3efbbf(0xfe)](_0x249a87[_0x3efbbf(0xef)])&&_0x249a87[_0x3efbbf(0xef)][_0x3efbbf(0xf3)](isPositiveInteger)&&Number['isInteger'](_0x249a87[_0x3efbbf(0xea)])&&_0x249a87[_0x3efbbf(0xea)]>=0x0&&typeof _0x249a87[_0x3efbbf(0xda)]===_0x3efbbf(0x133)&&typeof _0x249a87['resourcesHash']===_0x3efbbf(0x10f)&&/^[a-f0-9]{64}$/[_0x3efbbf(0x128)](_0x249a87['resourcesHash'])&&typeof _0x249a87[_0x3efbbf(0x124)]===_0x3efbbf(0x10f)&&/^[a-f0-9]{64}$/[_0x3efbbf(0x128)](_0x249a87[_0x3efbbf(0x124)])&&(_0x249a87['updateTime']===null||typeof _0x249a87[_0x3efbbf(0x102)]===_0x3efbbf(0x10f)||typeof _0x249a87[_0x3efbbf(0x102)]==='number');}function isRecord(_0x1affba){const _0x15bff1=a110_0x193e;return typeof _0x1affba===_0x15bff1(0x11a)&&_0x1affba!==null&&!Array[_0x15bff1(0xfe)](_0x1affba);}function isPositiveInteger(_0x2bbf47){const _0x51cdc7=a110_0x193e;return Number[_0x51cdc7(0x12a)](_0x2bbf47)&&Number(_0x2bbf47)>0x0;}function errorMessage(_0x46ae07){return _0x46ae07 instanceof Error?_0x46ae07['message']:String(_0x46ae07);}
1
+ const a110_0xf440c=a110_0x1eb1;(function(_0x100cf9,_0x31b0e8){const _0x3ea771=a110_0x1eb1,_0x390131=_0x100cf9();while(!![]){try{const _0x2d41ba=parseInt(_0x3ea771(0x156))/0x1+-parseInt(_0x3ea771(0x13f))/0x2+parseInt(_0x3ea771(0x15b))/0x3+-parseInt(_0x3ea771(0x16c))/0x4*(-parseInt(_0x3ea771(0x131))/0x5)+parseInt(_0x3ea771(0x172))/0x6*(parseInt(_0x3ea771(0x14c))/0x7)+-parseInt(_0x3ea771(0x147))/0x8*(parseInt(_0x3ea771(0x169))/0x9)+parseInt(_0x3ea771(0x159))/0xa*(-parseInt(_0x3ea771(0x16e))/0xb);if(_0x2d41ba===_0x31b0e8)break;else _0x390131['push'](_0x390131['shift']());}catch(_0x1ecd5e){_0x390131['push'](_0x390131['shift']());}}}(a110_0x4627,0x82f37));import{createHash}from'node:crypto';import{mkdir,readFile,stat,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{menuError,mutationResult}from'../../../commands/menu/shared/mutations.js';const PLAN_VERSION=0x2,PLAN_COMMAND=a110_0xf440c(0x149),PLAN_TTL_MS=0x1e*0x3c*0x3e8,MAX_PLAN_BYTES=0x400*0x400;export function createMenuDeletePlanFile(_0x48073a,_0x14b9a0,_0x3fc1bd=new Date()){const _0x2a9dbc=a110_0xf440c;if(!_0x14b9a0[_0x2a9dbc(0x11d)]||!isMenuFact(_0x14b9a0['before']))throw menuError(_0x2a9dbc(0x112),_0x2a9dbc(0x13d));const _0x2c3f5d=_0x14b9a0[_0x2a9dbc(0x111)]?.[_0x2a9dbc(0x15a)]?_0x14b9a0['targets']:[_0x14b9a0[_0x2a9dbc(0x11d)]],_0x5b02c1=_0x14b9a0['deleteOrder']?.[_0x2a9dbc(0x15a)]?_0x14b9a0[_0x2a9dbc(0x130)]:_0x2c3f5d['map'](_0x3d5407=>_0x3d5407['id']);return{'version':PLAN_VERSION,'command':PLAN_COMMAND,'appCode':_0x48073a,'createdAt':_0x3fc1bd[_0x2a9dbc(0x163)](),'expiresAt':new Date(_0x3fc1bd[_0x2a9dbc(0x146)]()+PLAN_TTL_MS)[_0x2a9dbc(0x163)](),'snapshotHash':_0x14b9a0[_0x2a9dbc(0x13b)],'recursive':_0x14b9a0[_0x2a9dbc(0x11a)]['recursive']===!![],'target':_0x14b9a0[_0x2a9dbc(0x11d)],'targetFingerprint':fingerprint(_0x14b9a0[_0x2a9dbc(0x11d)]),'targets':_0x2c3f5d,'targetFingerprints':_0x2c3f5d[_0x2a9dbc(0x13c)](fingerprint),'deleteOrder':_0x5b02c1,'cascade':_0x14b9a0[_0x2a9dbc(0x15c)]??{'pages':_0x14b9a0[_0x2a9dbc(0x11d)]['pageId']==null?[]:[_0x14b9a0[_0x2a9dbc(0x11d)][_0x2a9dbc(0x141)]],'pageSchemaAffected':_0x14b9a0['before'][_0x2a9dbc(0x141)]!=null},'warnings':[..._0x14b9a0['warnings']]};}function a110_0x1eb1(_0x489dd6,_0x456b35){_0x489dd6=_0x489dd6-0x108;const _0x46276c=a110_0x4627();let _0x1eb180=_0x46276c[_0x489dd6];return _0x1eb180;}export async function writeMenuDeletePlan(_0x30dfc2,_0x25f82e){const _0x22c7fe=a110_0xf440c,_0x564aa3=resolvePlanPath(_0x30dfc2,_0x22c7fe(0x136));await mkdir(dirname(_0x564aa3),{'recursive':!![]});try{await writeFile(_0x564aa3,JSON['stringify'](_0x25f82e,null,0x2)+'\x0a',{'encoding':_0x22c7fe(0x123),'flag':'wx'});}catch(_0x3d2a39){if(_0x3d2a39[_0x22c7fe(0x13a)]==='EEXIST')throw menuError(_0x22c7fe(0x16a),_0x22c7fe(0x10e)+_0x564aa3,'Choose\x20a\x20new\x20--plan-out\x20path\x20so\x20the\x20reviewed\x20plan\x20remains\x20immutable.');throw menuError('menu_plan_write_failed',_0x22c7fe(0x140)+_0x564aa3+':\x20'+errorMessage(_0x3d2a39));}return _0x564aa3;}export async function readMenuDeletePlan(_0x4af83a){const _0x24c8b9=a110_0xf440c,_0x39479a=resolvePlanPath(_0x4af83a,_0x24c8b9(0x10b));let _0x366050;try{_0x366050=(await stat(_0x39479a))['size'];}catch(_0x2f3524){throw menuError(_0x24c8b9(0x112),_0x24c8b9(0x167)+_0x39479a+':\x20'+errorMessage(_0x2f3524));}if(_0x366050>MAX_PLAN_BYTES)throw menuError(_0x24c8b9(0x112),_0x24c8b9(0x137)+_0x366050+_0x24c8b9(0x14a));let _0x8ba687;try{_0x8ba687=JSON[_0x24c8b9(0x170)](await readFile(_0x39479a,_0x24c8b9(0x123)));}catch(_0xdadf43){throw menuError(_0x24c8b9(0x112),'Menu\x20delete\x20plan\x20is\x20not\x20valid\x20JSON:\x20'+errorMessage(_0xdadf43));}if(!isMenuDeletePlanFile(_0x8ba687))throw menuError('menu_plan_invalid',_0x24c8b9(0x122)+PLAN_VERSION+_0x24c8b9(0x143)+PLAN_COMMAND+_0x24c8b9(0x150));if(!sameFingerprint(_0x8ba687[_0x24c8b9(0x110)],fingerprint(_0x8ba687[_0x24c8b9(0x151)])))throw menuError(_0x24c8b9(0x112),_0x24c8b9(0x127),_0x24c8b9(0x15d));if(!_0x8ba687[_0x24c8b9(0x111)][_0x24c8b9(0x148)]((_0x2913e5,_0x54567e)=>sameFingerprint(_0x8ba687['targetFingerprints'][_0x54567e],fingerprint(_0x2913e5)))||!sameFingerprint(_0x8ba687[_0x24c8b9(0x110)],fingerprint(_0x8ba687[_0x24c8b9(0x111)][_0x8ba687['targets'][_0x24c8b9(0x15a)]-0x1])))throw menuError('menu_plan_invalid',_0x24c8b9(0x117),'Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.');return{'path':_0x39479a,'plan':_0x8ba687};}export function mutationPlanFromDeleteFile(_0x4cda8f,_0x2cbf26){const _0x68dca9=a110_0xf440c;return mutationResult({'operation':'delete','selector':{'id':_0x4cda8f[_0x68dca9(0x151)]['id'],'recursive':_0x4cda8f[_0x68dca9(0x138)]},'before':_0x4cda8f[_0x68dca9(0x151)],'after':null,'dryRun':![],'backend':[{'method':_0x68dca9(0x145),'path':'/smartapi/menu/batchDelete'}],'plannedActions':[{'stage':_0x68dca9(0x12d),'method':_0x68dca9(0x145),'path':_0x68dca9(0x128),'body':{'idList':_0x4cda8f[_0x68dca9(0x130)]}}],'targets':_0x4cda8f[_0x68dca9(0x111)],'deleteOrder':_0x4cda8f['deleteOrder'],'snapshotHash':_0x4cda8f[_0x68dca9(0x13b)],'cascade':_0x4cda8f[_0x68dca9(0x15c)],'planFile':{'path':_0x2cbf26,'createdAt':_0x4cda8f[_0x68dca9(0x12f)],'expiresAt':_0x4cda8f['expiresAt']},'warnings':_0x4cda8f[_0x68dca9(0x120)]});}export function assertMenuDeletePlanCurrent(_0x26a1d9,_0x36ea25,_0x35b88c,_0x49ce97=new Date()){const _0x251488=a110_0xf440c;assertMenuDeletePlanExecutable(_0x26a1d9,_0x36ea25,_0x49ce97);if(_0x35b88c[_0x251488(0x125)]!==_0x26a1d9[_0x251488(0x13b)])throw menuError(_0x251488(0x161),_0x251488(0x13e),_0x251488(0x164));return _0x26a1d9['targets']['map']((_0xbe99d8,_0xc9d3)=>{const _0x1f4622=_0x251488,_0x456e02=_0x35b88c[_0x1f4622(0x135)][_0x1f4622(0x165)](_0xbe99d8['id']);if(!_0x456e02)throw menuError(_0x1f4622(0x161),'Planned\x20menu\x20'+_0xbe99d8['id']+_0x1f4622(0x14f));if(!sameFingerprint(_0x26a1d9[_0x1f4622(0x11f)][_0xc9d3],fingerprint(_0x456e02)))throw menuError('menu_state_drift',_0x1f4622(0x118)+_0xbe99d8['id']+_0x1f4622(0x14b),'Generate\x20a\x20new\x20plan\x20and\x20review\x20parent,\x20path,\x20page,\x20children,\x20resources,\x20and\x20update\x20time.');return _0x456e02;});}export function assertMenuDeletePlanExecutable(_0x16150d,_0x5f100c,_0x1bf9c3=new Date()){const _0x178819=a110_0xf440c;if(_0x16150d[_0x178819(0x12b)]!==_0x5f100c)throw menuError('menu_plan_app_mismatch',_0x178819(0x11c)+JSON['stringify'](_0x16150d[_0x178819(0x12b)])+_0x178819(0x171)+JSON[_0x178819(0x115)](_0x5f100c)+'.');const _0x20660c=Date[_0x178819(0x170)](_0x16150d[_0x178819(0x12f)]),_0x504383=Date[_0x178819(0x170)](_0x16150d[_0x178819(0x119)]);if(!Number[_0x178819(0x133)](_0x20660c)||!Number[_0x178819(0x133)](_0x504383)||_0x504383-_0x20660c!==PLAN_TTL_MS)throw menuError(_0x178819(0x112),_0x178819(0x10c));if(_0x20660c>_0x1bf9c3[_0x178819(0x146)]())throw menuError('menu_plan_invalid','Menu\x20delete\x20plan\x20creation\x20time\x20'+_0x16150d['createdAt']+_0x178819(0x116),_0x178819(0x14e));if(_0x1bf9c3[_0x178819(0x146)]()>_0x504383)throw menuError('menu_plan_expired',_0x178819(0x10d)+_0x16150d[_0x178819(0x119)]+'.','Generate\x20and\x20review\x20a\x20new\x20plan\x20before\x20deleting.');}function fingerprint(_0x3ed520){const _0x13b834=a110_0xf440c;return{'id':_0x3ed520['id'],'parentId':_0x3ed520['parentId'],'depth':_0x3ed520[_0x13b834(0x114)],'label':_0x3ed520[_0x13b834(0x160)],'path':_0x3ed520[_0x13b834(0x12e)],'type':_0x3ed520[_0x13b834(0x129)],'visible':_0x3ed520[_0x13b834(0x153)],'sort':_0x3ed520[_0x13b834(0x108)],'pageId':_0x3ed520[_0x13b834(0x141)],'pageType':_0x3ed520['pageType'],'modelType':_0x3ed520[_0x13b834(0x155)],'datasetId':_0x3ed520[_0x13b834(0x124)],'datasetCode':_0x3ed520[_0x13b834(0x10f)],'childrenIds':[..._0x3ed520[_0x13b834(0x12a)]],'childrenCount':_0x3ed520[_0x13b834(0x10a)],'resourcesValid':_0x3ed520['resourcesValid'],'resourcesHash':hashValue(_0x3ed520[_0x13b834(0x109)]),'extendHash':hashValue(_0x3ed520[_0x13b834(0x134)]??null),'updateTime':_0x3ed520[_0x13b834(0x173)]};}function hashValue(_0x1b21ab){const _0x142710=a110_0xf440c;return createHash(_0x142710(0x139))['update'](JSON['stringify'](_0x1b21ab))['digest'](_0x142710(0x16b));}function sameFingerprint(_0x5b73cc,_0xe1559b){const _0x10b5ea=a110_0xf440c;return JSON[_0x10b5ea(0x115)](_0x5b73cc)===JSON[_0x10b5ea(0x115)](_0xe1559b);}function resolvePlanPath(_0x37d28f,_0x1b74cb){const _0x5d207f=a110_0xf440c,_0x106049=_0x37d28f[_0x5d207f(0x15e)]();if(!_0x106049)throw menuError(_0x5d207f(0x112),'--'+_0x1b74cb+_0x5d207f(0x16f));return resolve(_0x106049);}function isMenuDeletePlanFile(_0xeccae1){const _0xc024a0=a110_0xf440c;if(!isRecord(_0xeccae1))return![];return _0xeccae1[_0xc024a0(0x16d)]===PLAN_VERSION&&_0xeccae1['command']===PLAN_COMMAND&&typeof _0xeccae1[_0xc024a0(0x12b)]===_0xc024a0(0x144)&&_0xeccae1['appCode'][_0xc024a0(0x15a)]>0x0&&typeof _0xeccae1['createdAt']==='string'&&typeof _0xeccae1['expiresAt']===_0xc024a0(0x144)&&typeof _0xeccae1[_0xc024a0(0x13b)]===_0xc024a0(0x144)&&/^sha256:[a-f0-9]{64}$/[_0xc024a0(0x157)](_0xeccae1['snapshotHash'])&&typeof _0xeccae1[_0xc024a0(0x138)]==='boolean'&&isMenuFact(_0xeccae1[_0xc024a0(0x151)])&&isTargetFingerprint(_0xeccae1[_0xc024a0(0x110)])&&Array[_0xc024a0(0x142)](_0xeccae1[_0xc024a0(0x111)])&&_0xeccae1[_0xc024a0(0x111)][_0xc024a0(0x15a)]>0x0&&_0xeccae1['targets']['every'](isMenuFact)&&Array[_0xc024a0(0x142)](_0xeccae1[_0xc024a0(0x11f)])&&_0xeccae1['targetFingerprints'][_0xc024a0(0x15a)]===_0xeccae1['targets']['length']&&_0xeccae1[_0xc024a0(0x11f)][_0xc024a0(0x148)](isTargetFingerprint)&&Array[_0xc024a0(0x142)](_0xeccae1[_0xc024a0(0x130)])&&_0xeccae1['deleteOrder']['length']===_0xeccae1[_0xc024a0(0x111)][_0xc024a0(0x15a)]&&_0xeccae1[_0xc024a0(0x130)]['every'](isPositiveInteger)&&new Set(_0xeccae1[_0xc024a0(0x130)])['size']===_0xeccae1['deleteOrder'][_0xc024a0(0x15a)]&&_0xeccae1[_0xc024a0(0x111)][_0xc024a0(0x148)]((_0x42afaa,_0x2394db)=>_0x42afaa['id']===_0xeccae1[_0xc024a0(0x130)][_0x2394db])&&_0xeccae1[_0xc024a0(0x111)][_0xeccae1[_0xc024a0(0x111)][_0xc024a0(0x15a)]-0x1]?.['id']===_0xeccae1[_0xc024a0(0x151)]['id']&&isRecord(_0xeccae1[_0xc024a0(0x15c)])&&Array[_0xc024a0(0x142)](_0xeccae1[_0xc024a0(0x15c)][_0xc024a0(0x121)])&&_0xeccae1['cascade'][_0xc024a0(0x121)][_0xc024a0(0x148)](isPositiveInteger)&&typeof _0xeccae1[_0xc024a0(0x15c)][_0xc024a0(0x11b)]===_0xc024a0(0x154)&&Array[_0xc024a0(0x142)](_0xeccae1[_0xc024a0(0x120)])&&_0xeccae1[_0xc024a0(0x120)][_0xc024a0(0x148)](_0x2aae24=>typeof _0x2aae24==='string');}function isMenuFact(_0x44a1dd){const _0x2314b5=a110_0xf440c;if(!isRecord(_0x44a1dd))return![];return isPositiveInteger(_0x44a1dd['id'])&&(_0x44a1dd[_0x2314b5(0x15f)]===null||isPositiveInteger(_0x44a1dd[_0x2314b5(0x15f)]))&&Number[_0x2314b5(0x113)](_0x44a1dd['depth'])&&_0x44a1dd[_0x2314b5(0x114)]>=0x0&&typeof _0x44a1dd[_0x2314b5(0x160)]===_0x2314b5(0x144)&&typeof _0x44a1dd[_0x2314b5(0x12e)]===_0x2314b5(0x144)&&typeof _0x44a1dd[_0x2314b5(0x129)]==='string'&&(_0x44a1dd['visible']===null||typeof _0x44a1dd[_0x2314b5(0x153)]===_0x2314b5(0x154))&&(_0x44a1dd[_0x2314b5(0x108)]===null||Number[_0x2314b5(0x113)](_0x44a1dd[_0x2314b5(0x108)]))&&Array[_0x2314b5(0x142)](_0x44a1dd['resources'])&&_0x44a1dd[_0x2314b5(0x109)]['every'](_0x4688a9=>typeof _0x4688a9===_0x2314b5(0x144))&&typeof _0x44a1dd[_0x2314b5(0x152)]===_0x2314b5(0x154)&&Array[_0x2314b5(0x142)](_0x44a1dd['childrenIds'])&&_0x44a1dd[_0x2314b5(0x12a)][_0x2314b5(0x148)](isPositiveInteger)&&Number['isInteger'](_0x44a1dd[_0x2314b5(0x10a)])&&_0x44a1dd['childrenCount']>=0x0&&(_0x44a1dd[_0x2314b5(0x141)]===null||isPositiveInteger(_0x44a1dd[_0x2314b5(0x141)]))&&typeof _0x44a1dd[_0x2314b5(0x12c)]===_0x2314b5(0x144)&&typeof _0x44a1dd[_0x2314b5(0x155)]===_0x2314b5(0x144)&&(_0x44a1dd['datasetId']===null||isPositiveInteger(_0x44a1dd[_0x2314b5(0x124)]))&&typeof _0x44a1dd[_0x2314b5(0x10f)]===_0x2314b5(0x144)&&(_0x44a1dd[_0x2314b5(0x166)]===null||typeof _0x44a1dd[_0x2314b5(0x166)]===_0x2314b5(0x144))&&(_0x44a1dd[_0x2314b5(0x158)]===null||typeof _0x44a1dd[_0x2314b5(0x158)]===_0x2314b5(0x144))&&(_0x44a1dd['updateTime']===null||typeof _0x44a1dd[_0x2314b5(0x173)]===_0x2314b5(0x144)||typeof _0x44a1dd[_0x2314b5(0x173)]==='number')&&(_0x44a1dd[_0x2314b5(0x134)]===undefined||_0x44a1dd[_0x2314b5(0x134)]===null||isRecord(_0x44a1dd[_0x2314b5(0x134)]));}function a110_0x4627(){const _0x420b72=['childrenCount','plan','Menu\x20delete\x20plan\x20has\x20invalid\x20timestamps.','Menu\x20delete\x20plan\x20expired\x20at\x20','Refusing\x20to\x20overwrite\x20existing\x20menu\x20delete\x20plan:\x20','datasetCode','targetFingerprint','targets','menu_plan_invalid','isInteger','depth','stringify','\x20is\x20in\x20the\x20future.','Menu\x20delete\x20plan\x20target\x20list\x20does\x20not\x20match\x20its\x20immutable\x20fingerprints.','Planned\x20menu\x20','expiresAt','selector','pageSchemaAffected','Menu\x20delete\x20plan\x20targets\x20app\x20','before','object','targetFingerprints','warnings','pages','Menu\x20delete\x20plan\x20does\x20not\x20match\x20version\x20','utf8','datasetId','hash','resourcesHash','Menu\x20delete\x20plan\x20target\x20facts\x20do\x20not\x20match\x20its\x20immutable\x20fingerprint.','/smartapi/menu/batchDelete','type','childrenIds','appCode','pageType','batch-delete-menu','path','createdAt','deleteOrder','18290JMogqv','message','isFinite','extend','byId','plan-out','Menu\x20delete\x20plan\x20is\x20too\x20large:\x20','recursive','sha256','code','snapshotHash','map','Cannot\x20create\x20a\x20menu\x20delete\x20plan\x20without\x20an\x20exact\x20target\x20snapshot.','Online\x20menu\x20state\x20changed\x20after\x20the\x20delete\x20plan\x20was\x20reviewed.','1258118oiauui','Failed\x20to\x20write\x20menu\x20delete\x20plan\x20','pageId','isArray','\x20of\x20the\x20','string','POST','getTime','21368SLkuPU','every','menu\x20delete','\x20bytes.','\x20no\x20longer\x20matches\x20the\x20reviewed\x20target\x20facts.','259eWgfxk','isSafeInteger','Generate\x20a\x20new\x20plan\x20on\x20a\x20machine\x20with\x20a\x20correct\x20system\x20clock.','\x20is\x20no\x20longer\x20present\x20in\x20the\x20online\x20menu\x20tree.','\x20contract.','target','resourcesValid','visible','boolean','modelType','950108cMpwhq','test','updateUserName','816650TzKdsk','length','829002ARAkAQ','cascade','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out;\x20do\x20not\x20edit\x20target\x20fields\x20manually.','trim','parentId','label','menu_state_drift','number','toISOString','Generate\x20a\x20new\x20plan\x20with\x20--dry-run\x20--plan-out\x20and\x20review\x20the\x20latest\x20cascade.','get','updateUserId','Cannot\x20read\x20menu\x20delete\x20plan\x20','extendHash','2250iefJhE','menu_plan_file_exists','hex','12VGjtrl','version','11AeIUhl','\x20requires\x20a\x20non-empty\x20file\x20path.','parse',',\x20current\x20app\x20is\x20','109854BuTwmA','updateTime','sort','resources'];a110_0x4627=function(){return _0x420b72;};return a110_0x4627();}function isTargetFingerprint(_0x294562){const _0x107145=a110_0xf440c;if(!isRecord(_0x294562))return![];return isPositiveInteger(_0x294562['id'])&&(_0x294562[_0x107145(0x15f)]===null||isPositiveInteger(_0x294562[_0x107145(0x15f)]))&&Number['isInteger'](_0x294562[_0x107145(0x114)])&&_0x294562[_0x107145(0x114)]>=0x0&&typeof _0x294562[_0x107145(0x160)]===_0x107145(0x144)&&typeof _0x294562[_0x107145(0x12e)]===_0x107145(0x144)&&typeof _0x294562[_0x107145(0x129)]===_0x107145(0x144)&&(_0x294562[_0x107145(0x153)]===null||typeof _0x294562['visible']==='boolean')&&(_0x294562['sort']===null||Number[_0x107145(0x113)](_0x294562[_0x107145(0x108)]))&&(_0x294562[_0x107145(0x141)]===null||isPositiveInteger(_0x294562[_0x107145(0x141)]))&&typeof _0x294562[_0x107145(0x12c)]==='string'&&typeof _0x294562[_0x107145(0x155)]==='string'&&(_0x294562['datasetId']===null||isPositiveInteger(_0x294562[_0x107145(0x124)]))&&typeof _0x294562[_0x107145(0x10f)]===_0x107145(0x144)&&Array[_0x107145(0x142)](_0x294562[_0x107145(0x12a)])&&_0x294562[_0x107145(0x12a)][_0x107145(0x148)](isPositiveInteger)&&Number[_0x107145(0x113)](_0x294562[_0x107145(0x10a)])&&_0x294562[_0x107145(0x10a)]>=0x0&&typeof _0x294562[_0x107145(0x152)]===_0x107145(0x154)&&typeof _0x294562[_0x107145(0x126)]===_0x107145(0x144)&&/^[a-f0-9]{64}$/[_0x107145(0x157)](_0x294562['resourcesHash'])&&typeof _0x294562[_0x107145(0x168)]===_0x107145(0x144)&&/^[a-f0-9]{64}$/[_0x107145(0x157)](_0x294562[_0x107145(0x168)])&&(_0x294562[_0x107145(0x173)]===null||typeof _0x294562['updateTime']===_0x107145(0x144)||typeof _0x294562['updateTime']===_0x107145(0x162));}function isRecord(_0x20d86c){const _0x701d19=a110_0xf440c;return typeof _0x20d86c===_0x701d19(0x11e)&&_0x20d86c!==null&&!Array[_0x701d19(0x142)](_0x20d86c);}function isPositiveInteger(_0x1840fb){const _0x5555d9=a110_0xf440c;return Number[_0x5555d9(0x14d)](_0x1840fb)&&Number(_0x1840fb)>0x0;}function errorMessage(_0x40f1f0){const _0x51d5a2=a110_0xf440c;return _0x40f1f0 instanceof Error?_0x40f1f0[_0x51d5a2(0x132)]:String(_0x40f1f0);}
@@ -1 +1 @@
1
- (function(_0x3c0246,_0x55cea8){const _0x2a00c5=a111_0x50ef,_0x4bdbfb=_0x3c0246();while(!![]){try{const _0x436458=-parseInt(_0x2a00c5(0x16b))/0x1*(-parseInt(_0x2a00c5(0x15c))/0x2)+parseInt(_0x2a00c5(0x160))/0x3*(parseInt(_0x2a00c5(0x154))/0x4)+-parseInt(_0x2a00c5(0x178))/0x5+parseInt(_0x2a00c5(0x151))/0x6*(-parseInt(_0x2a00c5(0x15d))/0x7)+-parseInt(_0x2a00c5(0x159))/0x8*(-parseInt(_0x2a00c5(0x165))/0x9)+parseInt(_0x2a00c5(0x17a))/0xa+parseInt(_0x2a00c5(0x176))/0xb;if(_0x436458===_0x55cea8)break;else _0x4bdbfb['push'](_0x4bdbfb['shift']());}catch(_0x1c9a0d){_0x4bdbfb['push'](_0x4bdbfb['shift']());}}}(a111_0x2d1b,0x5c34d));import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';export async function fetchMenuSnapshot(_0x52f29e,_0x476525,_0x777bd0={}){const _0x1f78d9=a111_0x50ef,_0x5c9dd1=await getMenuTree(_0x52f29e,_0x476525);return buildMenuSnapshot(Array[_0x1f78d9(0x161)](_0x5c9dd1)?_0x5c9dd1:[],_0x777bd0);}function a111_0x50ef(_0x56a3a6,_0x2a1a21){_0x56a3a6=_0x56a3a6-0x14b;const _0x2d1b59=a111_0x2d1b();let _0x50ef70=_0x2d1b59[_0x56a3a6];return _0x50ef70;}export function buildMenuSnapshot(_0x2f5621,_0x157ca0={}){const _0x82fd53=a111_0x50ef,_0x33f61f=flattenMenuItems(_0x2f5621,{'verbose':_0x157ca0[_0x82fd53(0x172)]===!![],'parentId':null,'depth':0x0}),_0x247525=new Map(_0x33f61f[_0x82fd53(0x169)](_0x58962c=>[_0x58962c['id'],_0x58962c])),_0x1d5baa=createHash('sha256')['update'](JSON['stringify'](_0x33f61f[_0x82fd53(0x169)](toHashInput)))[_0x82fd53(0x16a)]('hex');return{'total':_0x33f61f[_0x82fd53(0x14f)],'hash':'sha256:'+_0x1d5baa,'menus':_0x33f61f,'byId':_0x247525};}function a111_0x2d1b(){const _0x3d4329=['sort','6xamPtf','boolean','updateTime','18192GGEkzm','updateUserName','datasetCode','valid','values','161040UsOfdw','children','pageId','114pQkOgI','4803176FPjEvw','number','menus','21pmykyH','isArray','type','modelType','visible','9EOeduu','parse','datasetId','resourcesValid','map','digest','631CfUXpj','resources','item','updateUserId','isFinite','extend','index','verbose','push','path','url','11165022QJqVey','POSITIVE_INFINITY','1152890UGIjrm','depth','1914880GsKBGG','pageType','filter','label','string','length'];a111_0x2d1b=function(){return _0x3d4329;};return a111_0x2d1b();}export function toProcessedMenuItem(_0x29c3e6){const _0x5681bd=a111_0x50ef;return{'id':_0x29c3e6['id'],'path':_0x29c3e6[_0x5681bd(0x174)],'label':_0x29c3e6['label'],'resources':[..._0x29c3e6['resources']],'extend':_0x29c3e6[_0x5681bd(0x170)]??null};}export function toMenuListItem(_0x116385){const {modelType:_0x323d79,datasetId:_0x2948fe,datasetCode:_0x44d8d6,resourcesValid:_0x2a2c51,..._0x5a2081}=_0x116385;return _0x5a2081;}export function getChildren(_0x596dce,_0x379a14){const _0x35d9ba=a111_0x50ef;return _0x596dce[_0x35d9ba(0x15f)][_0x35d9ba(0x14c)](_0x21b3c2=>_0x21b3c2['parentId']===_0x379a14);}function flattenMenuItems(_0x4690dc,_0x2d9105){const _0x19e419=a111_0x50ef,_0x26b04e=sortMenuItems(_0x4690dc),_0x5c43b9=[];for(const _0x2bf247 of _0x26b04e){const _0x4195ec=sortMenuItems(Array[_0x19e419(0x161)](_0x2bf247['children'])?_0x2bf247[_0x19e419(0x15a)]:[]);_0x5c43b9[_0x19e419(0x173)](toMenuFact(_0x2bf247,_0x4195ec,_0x2d9105)),_0x4195ec[_0x19e419(0x14f)]>0x0&&_0x5c43b9[_0x19e419(0x173)](...flattenMenuItems(_0x4195ec,{'verbose':_0x2d9105[_0x19e419(0x172)],'parentId':_0x2bf247['id'],'depth':_0x2d9105[_0x19e419(0x179)]+0x1}));}return _0x5c43b9;}function sortMenuItems(_0x1d4235){const _0x39e2bc=a111_0x50ef;return _0x1d4235[_0x39e2bc(0x169)]((_0x48af8d,_0x25ddbe)=>({'item':_0x48af8d,'index':_0x25ddbe}))['sort']((_0x529952,_0x1c4d66)=>{const _0x404ff6=_0x39e2bc,_0x5e7ded=normalizeSort(_0x529952[_0x404ff6(0x16d)][_0x404ff6(0x150)]),_0x5351ec=normalizeSort(_0x1c4d66[_0x404ff6(0x16d)][_0x404ff6(0x150)]);if(_0x5e7ded!==_0x5351ec)return _0x5e7ded-_0x5351ec;return _0x529952[_0x404ff6(0x171)]-_0x1c4d66['index'];})[_0x39e2bc(0x169)](({item:_0x1f5781})=>_0x1f5781);}function toMenuFact(_0x26a407,_0x46757d,_0x40cce6){const _0x23562d=a111_0x50ef,_0x428d1e=normalizeResourceValue(_0x26a407['extend']?.[_0x23562d(0x16c)]),_0x4ddf9d={'id':_0x26a407['id'],'parentId':_0x40cce6['parentId'],'depth':_0x40cce6[_0x23562d(0x179)],'label':normalizeString(_0x26a407['label']),'path':normalizeString(_0x26a407[_0x23562d(0x174)]),'url':normalizeString(_0x26a407[_0x23562d(0x175)]),'type':normalizeString(_0x26a407[_0x23562d(0x162)]),'visible':typeof _0x26a407[_0x23562d(0x164)]===_0x23562d(0x152)?_0x26a407['visible']:null,'sort':typeof _0x26a407['sort']==='number'&&Number[_0x23562d(0x16f)](_0x26a407['sort'])?_0x26a407['sort']:null,'resources':_0x428d1e[_0x23562d(0x158)],'resourcesValid':_0x428d1e[_0x23562d(0x157)],'childrenIds':_0x46757d['map'](_0x37e268=>_0x37e268['id']),'childrenCount':_0x46757d['length'],'pageId':normalizeNullableNumber(_0x26a407['pageId']),'pageType':normalizeString(_0x26a407[_0x23562d(0x14b)]),'modelType':normalizeString(_0x26a407['modelType']),'datasetId':normalizeNullableNumber(_0x26a407[_0x23562d(0x167)]),'datasetCode':normalizeString(_0x26a407[_0x23562d(0x156)]),'updateUserId':normalizeNullableString(_0x26a407[_0x23562d(0x16e)]),'updateUserName':normalizeNullableString(_0x26a407['updateUserName']),'updateTime':normalizeNullableTimestamp(_0x26a407[_0x23562d(0x153)])};return _0x40cce6[_0x23562d(0x172)]&&(_0x4ddf9d[_0x23562d(0x170)]=_0x26a407[_0x23562d(0x170)]??null),_0x4ddf9d;}function toHashInput(_0x2a972e){const _0x2e0e51=a111_0x50ef;return{'id':_0x2a972e['id'],'parentId':_0x2a972e['parentId'],'label':_0x2a972e[_0x2e0e51(0x14d)],'path':_0x2a972e[_0x2e0e51(0x174)],'url':_0x2a972e[_0x2e0e51(0x175)],'type':_0x2a972e[_0x2e0e51(0x162)],'visible':_0x2a972e[_0x2e0e51(0x164)],'sort':_0x2a972e[_0x2e0e51(0x150)],'resources':_0x2a972e['resources'],'resourcesValid':_0x2a972e[_0x2e0e51(0x168)],'childrenIds':_0x2a972e['childrenIds'],'pageId':_0x2a972e[_0x2e0e51(0x15b)],'pageType':_0x2a972e[_0x2e0e51(0x14b)],'modelType':_0x2a972e[_0x2e0e51(0x163)],'datasetId':_0x2a972e[_0x2e0e51(0x167)],'datasetCode':_0x2a972e['datasetCode'],'updateUserId':_0x2a972e[_0x2e0e51(0x16e)],'updateUserName':_0x2a972e[_0x2e0e51(0x155)],'updateTime':_0x2a972e[_0x2e0e51(0x153)]};}function normalizeSort(_0x4b33e3){const _0x7043b2=a111_0x50ef;return typeof _0x4b33e3===_0x7043b2(0x15e)&&Number['isFinite'](_0x4b33e3)?_0x4b33e3:Number[_0x7043b2(0x177)];}function normalizeString(_0x2bdc22){return typeof _0x2bdc22==='string'?_0x2bdc22:'';}function normalizeNullableNumber(_0x59f142){return typeof _0x59f142==='number'&&Number['isFinite'](_0x59f142)?_0x59f142:null;}function normalizeNullableString(_0x584d3a){const _0x18a78f=a111_0x50ef;return typeof _0x584d3a===_0x18a78f(0x14e)&&_0x584d3a[_0x18a78f(0x14f)]>0x0?_0x584d3a:null;}function normalizeNullableTimestamp(_0x3dddfb){const _0x57c028=a111_0x50ef;if(typeof _0x3dddfb===_0x57c028(0x14e))return _0x3dddfb['length']>0x0?_0x3dddfb:null;return typeof _0x3dddfb===_0x57c028(0x15e)&&Number['isFinite'](_0x3dddfb)?_0x3dddfb:null;}export function normalizeResources(_0x4da6dd){return normalizeResourceValue(_0x4da6dd)['values'];}function normalizeResourceValue(_0x2ed0c6){const _0x5c78ee=a111_0x50ef;if(_0x2ed0c6==null)return{'values':[],'valid':!![]};if(Array[_0x5c78ee(0x161)](_0x2ed0c6))return{'values':_0x2ed0c6['map'](String),'valid':!![]};if(typeof _0x2ed0c6!==_0x5c78ee(0x14e))return{'values':[],'valid':![]};try{const _0x24ff4c=JSON[_0x5c78ee(0x166)](_0x2ed0c6);return Array[_0x5c78ee(0x161)](_0x24ff4c)?{'values':_0x24ff4c['map'](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
1
+ (function(_0x4442e8,_0x17d12f){const _0x309eb8=a111_0x467e,_0x1e5248=_0x4442e8();while(!![]){try{const _0x9375e3=-parseInt(_0x309eb8(0x1e7))/0x1+parseInt(_0x309eb8(0x1e3))/0x2+-parseInt(_0x309eb8(0x1d1))/0x3+parseInt(_0x309eb8(0x1f0))/0x4+-parseInt(_0x309eb8(0x1d2))/0x5+-parseInt(_0x309eb8(0x1d7))/0x6*(parseInt(_0x309eb8(0x1db))/0x7)+parseInt(_0x309eb8(0x1de))/0x8;if(_0x9375e3===_0x17d12f)break;else _0x1e5248['push'](_0x1e5248['shift']());}catch(_0x220eaf){_0x1e5248['push'](_0x1e5248['shift']());}}}(a111_0x52ba,0x5feaf));import{createHash}from'node:crypto';import{getMenuTree}from'../../../core/api-client.js';function a111_0x467e(_0x59f57b,_0xe98bfe){_0x59f57b=_0x59f57b-0x1ca;const _0x52ba03=a111_0x52ba();let _0x467ed5=_0x52ba03[_0x59f57b];return _0x467ed5;}export async function fetchMenuSnapshot(_0x3f072d,_0x87d097,_0x1150fb={}){const _0x208e90=await getMenuTree(_0x3f072d,_0x87d097);return buildMenuSnapshot(Array['isArray'](_0x208e90)?_0x208e90:[],_0x1150fb);}export function buildMenuSnapshot(_0x1d1d11,_0x1aac7f={}){const _0x7c1295=a111_0x467e,_0x39e00f=flattenMenuItems(_0x1d1d11,{'verbose':_0x1aac7f[_0x7c1295(0x1cf)]===!![],'parentId':null,'depth':0x0}),_0x3f771a=new Map(_0x39e00f[_0x7c1295(0x1e1)](_0x335a02=>[_0x335a02['id'],_0x335a02])),_0x11c433=createHash(_0x7c1295(0x1ec))[_0x7c1295(0x1d0)](JSON[_0x7c1295(0x1cc)](_0x39e00f[_0x7c1295(0x1e1)](toHashInput)))[_0x7c1295(0x1cb)](_0x7c1295(0x1e0));return{'total':_0x39e00f[_0x7c1295(0x1fb)],'hash':_0x7c1295(0x1d5)+_0x11c433,'menus':_0x39e00f,'byId':_0x3f771a};}export function toProcessedMenuItem(_0x1d92fd){const _0x4f33b4=a111_0x467e;return{'id':_0x1d92fd['id'],'path':_0x1d92fd[_0x4f33b4(0x1d9)],'label':_0x1d92fd[_0x4f33b4(0x1d8)],'resources':[..._0x1d92fd[_0x4f33b4(0x1e4)]],'extend':_0x1d92fd[_0x4f33b4(0x1f5)]??null};}export function toMenuListItem(_0x416f3f){const {modelType:_0x66411e,datasetId:_0x1228b8,datasetCode:_0x5e1fb5,resourcesValid:_0x6d8d5d,..._0x1294e8}=_0x416f3f;return _0x1294e8;}export function getChildren(_0x3d6581,_0x569a3c){const _0x82c079=a111_0x467e;return _0x3d6581[_0x82c079(0x1dc)][_0x82c079(0x1ee)](_0x28a9e0=>_0x28a9e0[_0x82c079(0x1ce)]===_0x569a3c);}function flattenMenuItems(_0x45ac67,_0x2d2e8c){const _0x113543=a111_0x467e,_0x515403=sortMenuItems(_0x45ac67),_0x4e9478=[];for(const _0x3dba6b of _0x515403){const _0x4bfb50=sortMenuItems(Array[_0x113543(0x1f6)](_0x3dba6b[_0x113543(0x1f2)])?_0x3dba6b[_0x113543(0x1f2)]:[]);_0x4e9478[_0x113543(0x1dd)](toMenuFact(_0x3dba6b,_0x4bfb50,_0x2d2e8c)),_0x4bfb50[_0x113543(0x1fb)]>0x0&&_0x4e9478['push'](...flattenMenuItems(_0x4bfb50,{'verbose':_0x2d2e8c['verbose'],'parentId':_0x3dba6b['id'],'depth':_0x2d2e8c[_0x113543(0x1f8)]+0x1}));}return _0x4e9478;}function sortMenuItems(_0x218eaa){const _0x1ef831=a111_0x467e;return _0x218eaa[_0x1ef831(0x1e1)]((_0x5af9c0,_0x539536)=>({'item':_0x5af9c0,'index':_0x539536}))[_0x1ef831(0x1f7)]((_0x5ca0b4,_0x480015)=>{const _0x11eb85=_0x1ef831,_0x5685d4=normalizeSort(_0x5ca0b4[_0x11eb85(0x1eb)]['sort']),_0x24fb07=normalizeSort(_0x480015[_0x11eb85(0x1eb)][_0x11eb85(0x1f7)]);if(_0x5685d4!==_0x24fb07)return _0x5685d4-_0x24fb07;return _0x5ca0b4[_0x11eb85(0x1e2)]-_0x480015[_0x11eb85(0x1e2)];})[_0x1ef831(0x1e1)](({item:_0xfc672c})=>_0xfc672c);}function a111_0x52ba(){const _0x5a2e94=['stringify','childrenIds','parentId','verbose','update','2051211uccBHH','1999855DVERDG','pageType','modelType','sha256:','updateTime','66dGRlqC','label','path','valid','246211CnLFTJ','menus','push','15874528DlbvJh','POSITIVE_INFINITY','hex','map','index','225748PkPxaD','resources','isFinite','datasetId','640051nxLIoz','visible','url','resourcesValid','item','sha256','boolean','filter','datasetCode','1625404RQMoKp','type','children','updateUserName','number','extend','isArray','sort','depth','string','values','length','parse','digest'];a111_0x52ba=function(){return _0x5a2e94;};return a111_0x52ba();}function toMenuFact(_0x24c392,_0x2a83e9,_0x47df54){const _0x6288cd=a111_0x467e,_0x3f96df=normalizeResourceValue(_0x24c392[_0x6288cd(0x1f5)]?.[_0x6288cd(0x1e4)]),_0x271330={'id':_0x24c392['id'],'parentId':_0x47df54[_0x6288cd(0x1ce)],'depth':_0x47df54[_0x6288cd(0x1f8)],'label':normalizeString(_0x24c392[_0x6288cd(0x1d8)]),'path':normalizeString(_0x24c392['path']),'url':normalizeString(_0x24c392[_0x6288cd(0x1e9)]),'type':normalizeString(_0x24c392[_0x6288cd(0x1f1)]),'visible':typeof _0x24c392[_0x6288cd(0x1e8)]===_0x6288cd(0x1ed)?_0x24c392['visible']:null,'sort':typeof _0x24c392[_0x6288cd(0x1f7)]===_0x6288cd(0x1f4)&&Number[_0x6288cd(0x1e5)](_0x24c392[_0x6288cd(0x1f7)])?_0x24c392['sort']:null,'resources':_0x3f96df[_0x6288cd(0x1fa)],'resourcesValid':_0x3f96df[_0x6288cd(0x1da)],'childrenIds':_0x2a83e9[_0x6288cd(0x1e1)](_0x20e3a5=>_0x20e3a5['id']),'childrenCount':_0x2a83e9[_0x6288cd(0x1fb)],'pageId':normalizeNullableNumber(_0x24c392['pageId']),'pageType':normalizeString(_0x24c392[_0x6288cd(0x1d3)]),'modelType':normalizeString(_0x24c392[_0x6288cd(0x1d4)]),'datasetId':normalizeNullableNumber(_0x24c392[_0x6288cd(0x1e6)]),'datasetCode':normalizeString(_0x24c392[_0x6288cd(0x1ef)]),'updateUserId':normalizeNullableString(_0x24c392['updateUserId']),'updateUserName':normalizeNullableString(_0x24c392['updateUserName']),'updateTime':normalizeNullableTimestamp(_0x24c392['updateTime'])};return _0x47df54['verbose']&&(_0x271330['extend']=_0x24c392[_0x6288cd(0x1f5)]??null),_0x271330;}function toHashInput(_0x56e1b6){const _0x463ea5=a111_0x467e;return{'id':_0x56e1b6['id'],'parentId':_0x56e1b6[_0x463ea5(0x1ce)],'label':_0x56e1b6[_0x463ea5(0x1d8)],'path':_0x56e1b6[_0x463ea5(0x1d9)],'url':_0x56e1b6[_0x463ea5(0x1e9)],'type':_0x56e1b6[_0x463ea5(0x1f1)],'visible':_0x56e1b6['visible'],'sort':_0x56e1b6['sort'],'resources':_0x56e1b6[_0x463ea5(0x1e4)],'resourcesValid':_0x56e1b6[_0x463ea5(0x1ea)],'childrenIds':_0x56e1b6[_0x463ea5(0x1cd)],'pageId':_0x56e1b6['pageId'],'pageType':_0x56e1b6[_0x463ea5(0x1d3)],'modelType':_0x56e1b6['modelType'],'datasetId':_0x56e1b6[_0x463ea5(0x1e6)],'datasetCode':_0x56e1b6[_0x463ea5(0x1ef)],'updateUserId':_0x56e1b6['updateUserId'],'updateUserName':_0x56e1b6[_0x463ea5(0x1f3)],'updateTime':_0x56e1b6[_0x463ea5(0x1d6)]};}function normalizeSort(_0x54653a){const _0x308ac5=a111_0x467e;return typeof _0x54653a===_0x308ac5(0x1f4)&&Number['isFinite'](_0x54653a)?_0x54653a:Number[_0x308ac5(0x1df)];}function normalizeString(_0x3cd953){const _0x838d6c=a111_0x467e;return typeof _0x3cd953===_0x838d6c(0x1f9)?_0x3cd953:'';}function normalizeNullableNumber(_0x4b74be){const _0x3f18f4=a111_0x467e;return typeof _0x4b74be==='number'&&Number[_0x3f18f4(0x1e5)](_0x4b74be)?_0x4b74be:null;}function normalizeNullableString(_0x578907){const _0x3ebc1d=a111_0x467e;return typeof _0x578907===_0x3ebc1d(0x1f9)&&_0x578907[_0x3ebc1d(0x1fb)]>0x0?_0x578907:null;}function normalizeNullableTimestamp(_0x43fd78){const _0xbbd42e=a111_0x467e;if(typeof _0x43fd78===_0xbbd42e(0x1f9))return _0x43fd78['length']>0x0?_0x43fd78:null;return typeof _0x43fd78===_0xbbd42e(0x1f4)&&Number[_0xbbd42e(0x1e5)](_0x43fd78)?_0x43fd78:null;}export function normalizeResources(_0x533b22){const _0xb8230e=a111_0x467e;return normalizeResourceValue(_0x533b22)[_0xb8230e(0x1fa)];}function normalizeResourceValue(_0x222c48){const _0x1fb6af=a111_0x467e;if(_0x222c48==null)return{'values':[],'valid':!![]};if(Array[_0x1fb6af(0x1f6)](_0x222c48))return{'values':_0x222c48[_0x1fb6af(0x1e1)](String),'valid':!![]};if(typeof _0x222c48!==_0x1fb6af(0x1f9))return{'values':[],'valid':![]};try{const _0x36b5ab=JSON[_0x1fb6af(0x1ca)](_0x222c48);return Array['isArray'](_0x36b5ab)?{'values':_0x36b5ab[_0x1fb6af(0x1e1)](String),'valid':!![]}:{'values':[],'valid':![]};}catch{return{'values':[],'valid':![]};}}
@@ -1 +1 @@
1
- (function(_0x3b0454,_0x5b56cf){var _0x950066=a112_0x1867,_0x4dc8c7=_0x3b0454();while(!![]){try{var _0x23ed72=-parseInt(_0x950066(0x158))/0x1*(-parseInt(_0x950066(0x15c))/0x2)+parseInt(_0x950066(0x159))/0x3+-parseInt(_0x950066(0x154))/0x4*(-parseInt(_0x950066(0x157))/0x5)+parseInt(_0x950066(0x15b))/0x6+parseInt(_0x950066(0x15a))/0x7+-parseInt(_0x950066(0x156))/0x8+-parseInt(_0x950066(0x155))/0x9;if(_0x23ed72===_0x5b56cf)break;else _0x4dc8c7['push'](_0x4dc8c7['shift']());}catch(_0x1eec5e){_0x4dc8c7['push'](_0x4dc8c7['shift']());}}}(a112_0x11cc,0x69b4b));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';function a112_0x11cc(){var _0xadf2ba=['3298688BUvMYP','40mpMfyO','16XLvhQk','356064WgBoFL','3266795ybtLQe','1353240BhgjMR','28856ptSMYE','396028wWbDaI','8896590khNKJQ'];a112_0x11cc=function(){return _0xadf2ba;};return a112_0x11cc();}function a112_0x1867(_0x4a79ec,_0x289a8a){_0x4a79ec=_0x4a79ec-0x154;var _0x11cc16=a112_0x11cc();var _0x186720=_0x11cc16[_0x4a79ec];return _0x186720;}export*from'../../../commands/menu/shared/valid-url.js';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';
1
+ function a112_0x4b1b(_0x573452,_0x4335e0){_0x573452=_0x573452-0x186;var _0x32d0a2=a112_0x32d0();var _0x4b1b46=_0x32d0a2[_0x573452];return _0x4b1b46;}(function(_0x47f8dc,_0x2a2c1d){var _0x4819ed=a112_0x4b1b,_0x885605=_0x47f8dc();while(!![]){try{var _0x3ce70a=parseInt(_0x4819ed(0x18e))/0x1+parseInt(_0x4819ed(0x186))/0x2+-parseInt(_0x4819ed(0x18d))/0x3+parseInt(_0x4819ed(0x18b))/0x4*(parseInt(_0x4819ed(0x18a))/0x5)+-parseInt(_0x4819ed(0x189))/0x6+parseInt(_0x4819ed(0x18c))/0x7*(parseInt(_0x4819ed(0x187))/0x8)+-parseInt(_0x4819ed(0x188))/0x9;if(_0x3ce70a===_0x2a2c1d)break;else _0x885605['push'](_0x885605['shift']());}catch(_0x5ef1f5){_0x885605['push'](_0x885605['shift']());}}}(a112_0x32d0,0xb50ea));export*from'../../../commands/menu/shared/types.js';function a112_0x32d0(){var _0x3650cb=['2580018TYmYwg','99565wWpZjo','244vRSRRO','77NCWgnY','3877194HmPScT','674708bEdLkg','128790WlwVTL','629888hIaTti','3202929XVLicR'];a112_0x32d0=function(){return _0x3650cb;};return a112_0x32d0();}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';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
@@ -1 +1 @@
1
- (function(_0x109cb9,_0xde13c9){const _0xa029e4=a113_0x3952,_0x42e7d1=_0x109cb9();while(!![]){try{const _0x9ebe09=parseInt(_0xa029e4(0xb5))/0x1*(-parseInt(_0xa029e4(0xbb))/0x2)+-parseInt(_0xa029e4(0x9c))/0x3*(-parseInt(_0xa029e4(0xa8))/0x4)+-parseInt(_0xa029e4(0xad))/0x5*(parseInt(_0xa029e4(0xc2))/0x6)+parseInt(_0xa029e4(0xb8))/0x7*(-parseInt(_0xa029e4(0xb0))/0x8)+parseInt(_0xa029e4(0xbd))/0x9+-parseInt(_0xa029e4(0xb6))/0xa*(parseInt(_0xa029e4(0xc3))/0xb)+parseInt(_0xa029e4(0xb3))/0xc*(parseInt(_0xa029e4(0xb1))/0xd);if(_0x9ebe09===_0xde13c9)break;else _0x42e7d1['push'](_0x42e7d1['shift']());}catch(_0x1fedec){_0x42e7d1['push'](_0x42e7d1['shift']());}}}(a113_0x5507,0x9bae2));import a113_0x19fd15 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a113_0x5072fb from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function a113_0x3952(_0x4eaf8c,_0x5c836e){_0x4eaf8c=_0x4eaf8c-0x95;const _0x5507ff=a113_0x5507();let _0x395251=_0x5507ff[_0x4eaf8c];return _0x395251;}function onCancel(_0x122be4){return _0x122be4['catch'](_0x101973=>{const _0x3c80e7=a113_0x3952;if(_0x101973?.[_0x3c80e7(0x9b)]===_0x3c80e7(0x97))throw CliErrors[_0x3c80e7(0xaf)](_0x3c80e7(0xab));throw _0x101973;});}export function startSpinner(_0x48ad27){const _0x44fbac=a113_0x3952;return a113_0x5072fb({'text':_0x48ad27,'color':_0x44fbac(0x98)})[_0x44fbac(0xa3)]();}export function stopSpinner(_0x332bca,_0xbc3d32,_0x5cc700){const _0x42699e=a113_0x3952;_0x5cc700?_0x332bca[_0x42699e(0xb2)](_0xbc3d32):_0x332bca[_0x42699e(0xa9)](_0xbc3d32);}export async function askConfirm(_0x455e06){return onCancel(confirm({'message':_0x455e06,'theme':{'prefix':''}}));}export async function askJsUrl(_0x12c67b){const _0x2ac429=a113_0x3952;while(!![]){const _0x31cad3=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x12c67b,'theme':{'prefix':''}}));if(_0x31cad3[_0x2ac429(0x96)]()==='')throw CliErrors[_0x2ac429(0xaf)](_0x2ac429(0xab));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x2ac429(0x99)](_0x31cad3[_0x2ac429(0x96)]())){console[_0x2ac429(0xae)](a113_0x19fd15['red'](_0x2ac429(0xbc)));continue;}const _0x167220=startSpinner(_0x2ac429(0xa7));try{const _0x2ea10b=await isUrlReachable(_0x31cad3[_0x2ac429(0x96)]());stopSpinner(_0x167220,_0x2ac429(0xa5),_0x2ea10b);if(!_0x2ea10b){console[_0x2ac429(0xae)](a113_0x19fd15[_0x2ac429(0x9e)](_0x2ac429(0x9a)));continue;}return _0x31cad3[_0x2ac429(0x96)]();}catch(_0x85031e){stopSpinner(_0x167220,'JS\x20URL\x20check\x20failed',![]);throw _0x85031e;}}}export async function askCssUrl(_0x4cf7e2){const _0x11b2fa=a113_0x3952;while(!![]){const _0x37244f=await onCancel(input({'message':_0x11b2fa(0xac),'default':_0x4cf7e2,'theme':{'prefix':''}}));if(_0x37244f['trim']()==='')throw CliErrors[_0x11b2fa(0xaf)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/['test'](_0x37244f[_0x11b2fa(0x96)]())){console['error'](a113_0x19fd15[_0x11b2fa(0x9e)](_0x11b2fa(0xc0)));continue;}const _0x3f1fa4=startSpinner(_0x11b2fa(0xb7));try{const _0x57fa3d=await isUrlReachable(_0x37244f[_0x11b2fa(0x96)]());stopSpinner(_0x3f1fa4,'CSS\x20URL\x20checked',_0x57fa3d);if(!_0x57fa3d){console[_0x11b2fa(0xae)](a113_0x19fd15[_0x11b2fa(0x9e)]('\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable'));continue;}return _0x37244f[_0x11b2fa(0x96)]();}catch(_0x5efc5f){stopSpinner(_0x3f1fa4,_0x11b2fa(0xb9),![]);throw _0x5efc5f;}}}function a113_0x5507(){const _0x54a418=['includes','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','green','6SBkffv','11eFlGOo','[new]','trim','ExitPromptError','cyan','test','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','name','27kVbDkT','has','red','path','stdin','length','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','start','filter','JS\x20URL\x20checked','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','\x20\x20Checking\x20JS\x20URL\x20reachability...','30396zYiIuk','fail','map','Cancelled.','\x20\x20CSS\x20URL:','2643080eCCDwY','error','cancelled','40EVlAMW','130741SNOpFz','succeed','2388CeIYnp','isTTY','5suBVwF','9920910xXMfQA','\x20\x20Checking\x20CSS\x20URL\x20reachability...','198443zuUqBj','CSS\x20URL\x20check\x20failed','gray','306564yCzCPf','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','8971146hGZoOZ','No\x20menus\x20selected.'];a113_0x5507=function(){return _0x54a418;};return a113_0x5507();}export async function selectPages(_0x3a42c0,_0x1eeda6){const _0x36c623=a113_0x3952,_0x2759e9=_0x3a42c0[_0x36c623(0xaa)](_0x21bfe5=>{const _0x770caa=_0x36c623,_0xf0b7dd=_0x1eeda6[_0x770caa(0x9d)](_0x21bfe5[_0x770caa(0x9f)]);return{'name':_0x21bfe5['label']+'\x20\x20'+a113_0x19fd15[_0x770caa(0xba)](_0x21bfe5[_0x770caa(0x9f)])+'\x20\x20'+(_0xf0b7dd?a113_0x19fd15[_0x770caa(0xba)]('[already\x20on\x20platform]'):a113_0x19fd15[_0x770caa(0xc1)](_0x770caa(0x95))),'value':_0x21bfe5['path'],'checked':!_0xf0b7dd,'disabled':_0xf0b7dd};});if(_0x2759e9['length']===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x456ec2=await onCancel(checkbox({'message':'\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','choices':_0x2759e9,'loop':![],'theme':{'prefix':''}}));if(_0x456ec2[_0x36c623(0xa1)]===0x0)throw new Error(_0x36c623(0xbe));return _0x3a42c0[_0x36c623(0xa4)](_0xec1ef2=>_0x456ec2[_0x36c623(0xbf)](_0xec1ef2[_0x36c623(0x9f)]));}export function isInteractive(){const _0x559642=a113_0x3952;return process[_0x559642(0xa0)][_0x559642(0xb4)]===!![];}export function requireInteractive(){const _0x180e98=a113_0x3952;if(!isInteractive())throw new Error(_0x180e98(0xa6)+_0x180e98(0xa2));}
1
+ (function(_0x29b40a,_0x5b824f){const _0x5644d1=a113_0x17ff,_0x2569e0=_0x29b40a();while(!![]){try{const _0x3864ee=parseInt(_0x5644d1(0xca))/0x1+-parseInt(_0x5644d1(0xb1))/0x2+-parseInt(_0x5644d1(0xc0))/0x3*(parseInt(_0x5644d1(0xcb))/0x4)+parseInt(_0x5644d1(0xd7))/0x5+parseInt(_0x5644d1(0xb3))/0x6*(parseInt(_0x5644d1(0xce))/0x7)+-parseInt(_0x5644d1(0xd6))/0x8*(parseInt(_0x5644d1(0xd2))/0x9)+parseInt(_0x5644d1(0xc6))/0xa;if(_0x3864ee===_0x5b824f)break;else _0x2569e0['push'](_0x2569e0['shift']());}catch(_0x314be0){_0x2569e0['push'](_0x2569e0['shift']());}}}(a113_0x232d,0xb3aa8));function a113_0x17ff(_0x1ee621,_0x4555e9){_0x1ee621=_0x1ee621-0xb0;const _0x232d76=a113_0x232d();let _0x17ff33=_0x232d76[_0x1ee621];return _0x17ff33;}import a113_0x35c3f4 from'chalk';function a113_0x232d(){const _0x38b8c9=['CSS\x20URL\x20check\x20failed','succeed','includes','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','cyan','red','193281SEGHiK','[new]','test','Cancelled.','\x20\x20JS\x20URL:','gray','6812050pabQpr','JS\x20URL\x20check\x20failed','\x20\x20Checking\x20CSS\x20URL\x20reachability...','cancelled','1200170hdbEuI','44qtuQxf','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','has','20335wfoMPw','path','stdin','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','27207tAJRVH','fail','ExitPromptError','green','3184BBGmiW','5253025NVBNOI','\x20\x20CSS\x20URL:','CSS\x20URL\x20checked','[already\x20on\x20platform]','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','error','start','1062284XXVdHZ','label','510xLBKth','catch','length','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','\x20\x20Checking\x20JS\x20URL\x20reachability...','trim','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'];a113_0x232d=function(){return _0x38b8c9;};return a113_0x232d();}import{checkbox,input,confirm}from'@inquirer/prompts';import a113_0x4cadf1 from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x312e61){const _0x47e36f=a113_0x17ff;return _0x312e61[_0x47e36f(0xb4)](_0x1b1615=>{const _0x48571e=_0x47e36f;if(_0x1b1615?.['name']===_0x48571e(0xd4))throw CliErrors[_0x48571e(0xc9)](_0x48571e(0xc3));throw _0x1b1615;});}export function startSpinner(_0x590c0f){const _0x183e0e=a113_0x17ff;return a113_0x4cadf1({'text':_0x590c0f,'color':_0x183e0e(0xbe)})[_0x183e0e(0xb0)]();}export function stopSpinner(_0xdc8f8b,_0x12901f,_0x4eada3){const _0x23f53c=a113_0x17ff;_0x4eada3?_0xdc8f8b[_0x23f53c(0xbb)](_0x12901f):_0xdc8f8b[_0x23f53c(0xd3)](_0x12901f);}export async function askConfirm(_0x4a05c3){return onCancel(confirm({'message':_0x4a05c3,'theme':{'prefix':''}}));}export async function askJsUrl(_0x10e1d1){const _0x20e2ce=a113_0x17ff;while(!![]){const _0x241514=await onCancel(input({'message':_0x20e2ce(0xc4),'default':_0x10e1d1,'theme':{'prefix':''}}));if(_0x241514['trim']()==='')throw CliErrors['cancelled'](_0x20e2ce(0xc3));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x20e2ce(0xc2)](_0x241514[_0x20e2ce(0xb8)]())){console[_0x20e2ce(0xdc)](a113_0x35c3f4['red'](_0x20e2ce(0xcc)));continue;}const _0x57889f=startSpinner(_0x20e2ce(0xb7));try{const _0x59e355=await isUrlReachable(_0x241514[_0x20e2ce(0xb8)]());stopSpinner(_0x57889f,'JS\x20URL\x20checked',_0x59e355);if(!_0x59e355){console[_0x20e2ce(0xdc)](a113_0x35c3f4['red'](_0x20e2ce(0xb9)));continue;}return _0x241514[_0x20e2ce(0xb8)]();}catch(_0x3c472f){stopSpinner(_0x57889f,_0x20e2ce(0xc7),![]);throw _0x3c472f;}}}export async function askCssUrl(_0x38ff76){const _0x4022a2=a113_0x17ff;while(!![]){const _0x2d8311=await onCancel(input({'message':_0x4022a2(0xd8),'default':_0x38ff76,'theme':{'prefix':''}}));if(_0x2d8311[_0x4022a2(0xb8)]()==='')throw CliErrors[_0x4022a2(0xc9)](_0x4022a2(0xc3));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x4022a2(0xc2)](_0x2d8311[_0x4022a2(0xb8)]())){console[_0x4022a2(0xdc)](a113_0x35c3f4[_0x4022a2(0xbf)](_0x4022a2(0xdb)));continue;}const _0x19eb4a=startSpinner(_0x4022a2(0xc8));try{const _0x3014d8=await isUrlReachable(_0x2d8311['trim']());stopSpinner(_0x19eb4a,_0x4022a2(0xd9),_0x3014d8);if(!_0x3014d8){console['error'](a113_0x35c3f4[_0x4022a2(0xbf)](_0x4022a2(0xb6)));continue;}return _0x2d8311[_0x4022a2(0xb8)]();}catch(_0x35493e){stopSpinner(_0x19eb4a,_0x4022a2(0xba),![]);throw _0x35493e;}}}export async function selectPages(_0x4d76a6,_0x4b3a84){const _0xbcb9a3=a113_0x17ff,_0xca1bba=_0x4d76a6['map'](_0x1da56f=>{const _0xf0d6e3=a113_0x17ff,_0x36c872=_0x4b3a84[_0xf0d6e3(0xcd)](_0x1da56f[_0xf0d6e3(0xcf)]);return{'name':_0x1da56f[_0xf0d6e3(0xb2)]+'\x20\x20'+a113_0x35c3f4[_0xf0d6e3(0xc5)](_0x1da56f[_0xf0d6e3(0xcf)])+'\x20\x20'+(_0x36c872?a113_0x35c3f4[_0xf0d6e3(0xc5)](_0xf0d6e3(0xda)):a113_0x35c3f4[_0xf0d6e3(0xd5)](_0xf0d6e3(0xc1))),'value':_0x1da56f['path'],'checked':!_0x36c872,'disabled':_0x36c872};});if(_0xca1bba[_0xbcb9a3(0xb5)]===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x316acf=await onCancel(checkbox({'message':_0xbcb9a3(0xbd),'choices':_0xca1bba,'loop':![],'theme':{'prefix':''}}));if(_0x316acf[_0xbcb9a3(0xb5)]===0x0)throw new Error('No\x20menus\x20selected.');return _0x4d76a6['filter'](_0x105b99=>_0x316acf[_0xbcb9a3(0xbc)](_0x105b99[_0xbcb9a3(0xcf)]));}export function isInteractive(){const _0x5c6fe6=a113_0x17ff;return process[_0x5c6fe6(0xd0)]['isTTY']===!![];}export function requireInteractive(){const _0x15316e=a113_0x17ff;if(!isInteractive())throw new Error(_0x15316e(0xd1)+'Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.');}
@@ -1 +1 @@
1
- const a114_0x26eaca=a114_0x490a;function a114_0x490a(_0x259cbd,_0x15933a){_0x259cbd=_0x259cbd-0xdb;const _0x4fdc86=a114_0x4fdc();let _0x490af5=_0x4fdc86[_0x259cbd];return _0x490af5;}(function(_0x1b956c,_0x183eda){const _0x477136=a114_0x490a,_0x89c68b=_0x1b956c();while(!![]){try{const _0x380030=-parseInt(_0x477136(0xec))/0x1+-parseInt(_0x477136(0xe6))/0x2*(-parseInt(_0x477136(0xe2))/0x3)+parseInt(_0x477136(0xf4))/0x4*(-parseInt(_0x477136(0xf5))/0x5)+parseInt(_0x477136(0xe1))/0x6*(-parseInt(_0x477136(0xe3))/0x7)+-parseInt(_0x477136(0xea))/0x8+parseInt(_0x477136(0xee))/0x9+parseInt(_0x477136(0xf0))/0xa;if(_0x380030===_0x183eda)break;else _0x89c68b['push'](_0x89c68b['shift']());}catch(_0xcc34ef){_0x89c68b['push'](_0x89c68b['shift']());}}}(a114_0x4fdc,0xe8555));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a114_0x26eaca(0xf1)](),'src/pages');export function extractTitleFromComment(_0x54d444){const _0x5337aa=a114_0x26eaca;try{const _0x2a1aca=readFileSync(_0x54d444,_0x5337aa(0xf3)),_0x144ce8=_0x2a1aca['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x144ce8&&_0x144ce8[0x1]){const _0x50697d=_0x144ce8[0x1],_0x500801=_0x50697d[_0x5337aa(0xdd)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x500801&&_0x500801[0x1])return _0x500801[0x1][_0x5337aa(0xe8)]();}let _0x95bd86=null;const _0x430753=_0x2a1aca['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x430753&&_0x430753[0x1]&&(_0x95bd86=_0x430753[0x1]);if(!_0x95bd86){const _0x340f14=_0x2a1aca['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x340f14&&_0x340f14[0x1]&&(_0x95bd86=_0x340f14[0x1]);}if(_0x95bd86){const _0x56ae6f=new RegExp('\x5cb'+_0x95bd86+_0x5337aa(0xe4)),_0x3ec5ec=_0x2a1aca['match'](_0x56ae6f);if(_0x3ec5ec&&_0x3ec5ec[0x1])return _0x3ec5ec[0x1];return _0x95bd86;}return null;}catch(_0x507f8b){return null;}}function a114_0x4fdc(){const _0x5c44a2=['3VlIuqL','861EezCwv','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','join','3101054qHvLDx','path','trim','.tsx','334768FxAcXk','split','1372171aAQjZw','endsWith','9146079QddWAP','concat','20635970JanjMg','cwd','forEach','utf-8','32408vOpbUr','1030LSQQNL','replaceAll','push','match','index.tsx','slice','filter','29058QivBoe'];a114_0x4fdc=function(){return _0x5c44a2;};return a114_0x4fdc();}export function getLocalPages(_0x12c06f=pagesDir,_0x236908=pagesDir){const _0x1872cf=a114_0x26eaca;let _0x33197f=[];const _0x5941fc=readdirSync(_0x12c06f);return _0x5941fc[_0x1872cf(0xf2)](_0x4ae745=>{const _0x259dae=_0x1872cf,_0x2a7f1f=join(_0x12c06f,_0x4ae745),_0x5efd7d=statSync(_0x2a7f1f);if(_0x5efd7d&&_0x5efd7d['isDirectory']())_0x33197f=_0x33197f[_0x259dae(0xef)](getLocalPages(_0x2a7f1f,_0x236908));else{if(_0x4ae745[_0x259dae(0xed)](_0x259dae(0xe9))){let _0x1f4649=relative(_0x236908,_0x2a7f1f);_0x1f4649[_0x259dae(0xed)](_0x259dae(0xde))?_0x1f4649=_0x1f4649['replace'](/index\.tsx$/,''):_0x1f4649=_0x1f4649['replace'](/\.tsx$/,'');_0x1f4649[_0x259dae(0xed)](sep)&&(_0x1f4649=_0x1f4649[_0x259dae(0xdf)](0x0,-0x1));const _0x10000f=_0x1f4649[_0x259dae(0xeb)](sep)[_0x259dae(0xe5)]('/'),_0x336c0e=extractTitleFromComment(_0x2a7f1f),_0x547a12=_0x336c0e||_0x10000f;_0x33197f[_0x259dae(0xdc)]({'path':_0x10000f[_0x259dae(0xdb)]('$',':'),'label':_0x547a12});}}}),_0x33197f[_0x1872cf(0xe0)](_0x38cb5f=>_0x38cb5f[_0x1872cf(0xe7)]!=='');}
1
+ function a114_0x1e77(_0x181f16,_0x3667a5){_0x181f16=_0x181f16-0x125;const _0x123ee4=a114_0x123e();let _0x1e7720=_0x123ee4[_0x181f16];return _0x1e7720;}const a114_0x4e0a89=a114_0x1e77;(function(_0x2dd306,_0x2eb6c5){const _0x554360=a114_0x1e77,_0x4dc5ac=_0x2dd306();while(!![]){try{const _0x7d7e8e=parseInt(_0x554360(0x128))/0x1*(-parseInt(_0x554360(0x135))/0x2)+-parseInt(_0x554360(0x127))/0x3+-parseInt(_0x554360(0x13b))/0x4*(-parseInt(_0x554360(0x12d))/0x5)+parseInt(_0x554360(0x12f))/0x6+parseInt(_0x554360(0x130))/0x7+parseInt(_0x554360(0x131))/0x8*(parseInt(_0x554360(0x138))/0x9)+parseInt(_0x554360(0x139))/0xa*(parseInt(_0x554360(0x132))/0xb);if(_0x7d7e8e===_0x2eb6c5)break;else _0x4dc5ac['push'](_0x4dc5ac['shift']());}catch(_0x35db38){_0x4dc5ac['push'](_0x4dc5ac['shift']());}}}(a114_0x123e,0x90c6c));function a114_0x123e(){const _0x582517=['src/pages','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','match','forEach','endsWith','split','2901852TAlWiP','44GhUzRX','isDirectory','trim','path','push','1187440SCcJOT','cwd','3575274xYsoJL','1040746YBkhjD','136Rnhavh','11OovQCV','join','replace','45426Ogehnl','filter','concat','574767yMuvQh','4919440hBzVPb','index.tsx','4YoHcCu','utf-8'];a114_0x123e=function(){return _0x582517;};return a114_0x123e();}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a114_0x4e0a89(0x12e)](),a114_0x4e0a89(0x13d));export function extractTitleFromComment(_0x1ea2a3){const _0x24c4ad=a114_0x4e0a89;try{const _0x244ff4=readFileSync(_0x1ea2a3,_0x24c4ad(0x13c)),_0x4b552f=_0x244ff4[_0x24c4ad(0x13f)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x4b552f&&_0x4b552f[0x1]){const _0x273490=_0x4b552f[0x1],_0x29acf2=_0x273490[_0x24c4ad(0x13f)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x29acf2&&_0x29acf2[0x1])return _0x29acf2[0x1][_0x24c4ad(0x12a)]();}let _0x3cd07b=null;const _0x75c235=_0x244ff4[_0x24c4ad(0x13f)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x75c235&&_0x75c235[0x1]&&(_0x3cd07b=_0x75c235[0x1]);if(!_0x3cd07b){const _0x3e1406=_0x244ff4['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x3e1406&&_0x3e1406[0x1]&&(_0x3cd07b=_0x3e1406[0x1]);}if(_0x3cd07b){const _0x122dff=new RegExp('\x5cb'+_0x3cd07b+_0x24c4ad(0x13e)),_0x40c43d=_0x244ff4[_0x24c4ad(0x13f)](_0x122dff);if(_0x40c43d&&_0x40c43d[0x1])return _0x40c43d[0x1];return _0x3cd07b;}return null;}catch(_0x24910a){return null;}}export function getLocalPages(_0x175ebd=pagesDir,_0x1733c9=pagesDir){const _0x4c94f4=a114_0x4e0a89;let _0x51bbaa=[];const _0x2f1c32=readdirSync(_0x175ebd);return _0x2f1c32[_0x4c94f4(0x140)](_0x4f3ab=>{const _0x3ddbee=_0x4c94f4,_0x3adc28=join(_0x175ebd,_0x4f3ab),_0x449faf=statSync(_0x3adc28);if(_0x449faf&&_0x449faf[_0x3ddbee(0x129)]())_0x51bbaa=_0x51bbaa[_0x3ddbee(0x137)](getLocalPages(_0x3adc28,_0x1733c9));else{if(_0x4f3ab[_0x3ddbee(0x125)]('.tsx')){let _0x554c16=relative(_0x1733c9,_0x3adc28);_0x554c16[_0x3ddbee(0x125)](_0x3ddbee(0x13a))?_0x554c16=_0x554c16[_0x3ddbee(0x134)](/index\.tsx$/,''):_0x554c16=_0x554c16[_0x3ddbee(0x134)](/\.tsx$/,'');_0x554c16['endsWith'](sep)&&(_0x554c16=_0x554c16['slice'](0x0,-0x1));const _0x10e655=_0x554c16[_0x3ddbee(0x126)](sep)[_0x3ddbee(0x133)]('/'),_0x34e753=extractTitleFromComment(_0x3adc28),_0x56dafa=_0x34e753||_0x10e655;_0x51bbaa[_0x3ddbee(0x12c)]({'path':_0x10e655['replaceAll']('$',':'),'label':_0x56dafa});}}}),_0x51bbaa[_0x4c94f4(0x136)](_0x3f916c=>_0x3f916c[_0x4c94f4(0x12b)]!=='');}
@@ -1 +1 @@
1
- (function(_0x4dc6d1,_0x151cc9){const _0x3d05e4=a115_0x5288,_0x58aa66=_0x4dc6d1();while(!![]){try{const _0x201ad8=parseInt(_0x3d05e4(0x1f8))/0x1+parseInt(_0x3d05e4(0x200))/0x2+parseInt(_0x3d05e4(0x1ef))/0x3*(-parseInt(_0x3d05e4(0x1fd))/0x4)+-parseInt(_0x3d05e4(0x1fa))/0x5*(-parseInt(_0x3d05e4(0x1fb))/0x6)+parseInt(_0x3d05e4(0x1f4))/0x7*(-parseInt(_0x3d05e4(0x203))/0x8)+parseInt(_0x3d05e4(0x1f1))/0x9*(parseInt(_0x3d05e4(0x1f2))/0xa)+-parseInt(_0x3d05e4(0x201))/0xb*(parseInt(_0x3d05e4(0x1fe))/0xc);if(_0x201ad8===_0x151cc9)break;else _0x58aa66['push'](_0x58aa66['shift']());}catch(_0x2cb476){_0x58aa66['push'](_0x58aa66['shift']());}}}(a115_0x117b,0xe9dfa));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a115_0x5288(_0x4fd3f2,_0x28eab9){_0x4fd3f2=_0x4fd3f2-0x1ef;const _0x117b36=a115_0x117b();let _0x5288c9=_0x117b36[_0x4fd3f2];return _0x5288c9;}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';export function validateJsUrl(_0x2f8fae){const _0x229d93=a115_0x5288,_0x4063e0=[];return!isValidJsHttpsUrl(_0x2f8fae)&&_0x4063e0[_0x229d93(0x1f7)](_0x229d93(0x1f0)),{'ok':_0x4063e0[_0x229d93(0x1f6)]===0x0,'errors':_0x4063e0};}export function validateCssUrl(_0x1f71b0){const _0x521fe1=a115_0x5288,_0x3452d7=[];return!isValidCssHttpsUrl(_0x1f71b0)&&_0x3452d7[_0x521fe1(0x1f7)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x3452d7[_0x521fe1(0x1f6)]===0x0,'errors':_0x3452d7};}export async function validateJsUrlReachable(_0x17e5c0){const _0x4097b7=a115_0x5288,_0x18b259=validateJsUrl(_0x17e5c0);if(!_0x18b259['ok'])return _0x18b259;const _0x57d1f3=await isUrlReachable(_0x17e5c0);if(!_0x57d1f3)_0x18b259[_0x4097b7(0x1f9)][_0x4097b7(0x1f7)](_0x4097b7(0x202));return{'ok':_0x18b259['errors'][_0x4097b7(0x1f6)]===0x0,'errors':_0x18b259[_0x4097b7(0x1f9)]};}export async function validateCssUrlReachable(_0x2a7bf1){const _0x1d358a=a115_0x5288,_0xd8e863=validateCssUrl(_0x2a7bf1);if(!_0xd8e863['ok'])return _0xd8e863;const _0x288117=await isUrlReachable(_0x2a7bf1);if(!_0x288117)_0xd8e863[_0x1d358a(0x1f9)][_0x1d358a(0x1f7)](_0x1d358a(0x1f5));return{'ok':_0xd8e863['errors'][_0x1d358a(0x1f6)]===0x0,'errors':_0xd8e863['errors']};}export function buildCompareRows(_0x514e6c,_0x39f6a1){const _0x46d78a=a115_0x5288;return _0x514e6c[_0x46d78a(0x1ff)](_0x5891af=>({'label':_0x5891af[_0x46d78a(0x1f3)],'path':_0x5891af[_0x46d78a(0x1fc)],'local':!![],'online':_0x39f6a1[_0x46d78a(0x204)](_0x5891af['path'])}));}export async function doCreateMenus(_0x44f41f,_0x2841d1,_0x2d360d,_0x50bb41){const _0xf26922=a115_0x5288,_0x1afff8=await createMenus(_0x44f41f,_0x2841d1,_0x2d360d,_0x50bb41);return{'created':_0x1afff8[_0xf26922(0x1f6)],'failed':0x0,'labels':_0x2d360d['map'](_0x472d9e=>_0x472d9e[_0xf26922(0x1f3)]),'menus':_0x1afff8};}export function filterMenusWithResources(_0x554f8d){return _0x554f8d['filter'](_0x511b32=>_0x511b32['resources']['length']>0x0);}export async function fetchMenuData(_0x4c1288,_0x38f851){const _0x2fa9ec=a115_0x5288,_0x3300cb=getLocalPages(),_0x2ab8c5=await getOnlineMenuList(_0x4c1288,_0x38f851),_0x281a6b=new Set(_0x2ab8c5[_0x2fa9ec(0x1ff)](_0x2f062d=>_0x2f062d[_0x2fa9ec(0x1fc)]));return{'localPages':_0x3300cb,'onlineMenuList':_0x2ab8c5,'onlinePaths':_0x281a6b};}function a115_0x117b(){const _0x38a382=['push','1002930mGATaY','errors','80JZFXUs','437592alHguy','path','4bqUjah','468aBMncI','map','3477192QBfiYA','162052fbyfqE','JS\x20URL\x20is\x20unreachable','40xgbHaH','has','2335311BMYHKk','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','419517fFnPMl','60QsGKeZ','label','2628059RhJmmG','CSS\x20URL\x20is\x20unreachable','length'];a115_0x117b=function(){return _0x38a382;};return a115_0x117b();}export async function fetchOnlineMenuList(_0x48b0b4,_0x7e20eb){return getOnlineMenuList(_0x48b0b4,_0x7e20eb);}
1
+ (function(_0x3adbe6,_0x27d7c4){const _0x135e2c=a115_0x45e4,_0x2f42b5=_0x3adbe6();while(!![]){try{const _0x22be84=parseInt(_0x135e2c(0x8e))/0x1+-parseInt(_0x135e2c(0x91))/0x2*(parseInt(_0x135e2c(0x85))/0x3)+parseInt(_0x135e2c(0x93))/0x4+-parseInt(_0x135e2c(0x8a))/0x5*(-parseInt(_0x135e2c(0x87))/0x6)+-parseInt(_0x135e2c(0x86))/0x7*(-parseInt(_0x135e2c(0x89))/0x8)+parseInt(_0x135e2c(0x90))/0x9*(parseInt(_0x135e2c(0x82))/0xa)+-parseInt(_0x135e2c(0x97))/0xb;if(_0x22be84===_0x27d7c4)break;else _0x2f42b5['push'](_0x2f42b5['shift']());}catch(_0x313a53){_0x2f42b5['push'](_0x2f42b5['shift']());}}}(a115_0x2e0f,0xf3699));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(_0x1e009e){const _0x38b286=a115_0x45e4,_0x1bfa9f=[];return!isValidJsHttpsUrl(_0x1e009e)&&_0x1bfa9f[_0x38b286(0x8d)](_0x38b286(0x8c)),{'ok':_0x1bfa9f[_0x38b286(0x96)]===0x0,'errors':_0x1bfa9f};}export function validateCssUrl(_0x41de3a){const _0x10c9cd=a115_0x45e4,_0x4f8350=[];return!isValidCssHttpsUrl(_0x41de3a)&&_0x4f8350[_0x10c9cd(0x8d)](_0x10c9cd(0x83)),{'ok':_0x4f8350[_0x10c9cd(0x96)]===0x0,'errors':_0x4f8350};}function a115_0x45e4(_0x57247e,_0xfa19e){_0x57247e=_0x57247e-0x82;const _0x2e0f16=a115_0x2e0f();let _0x45e462=_0x2e0f16[_0x57247e];return _0x45e462;}export async function validateJsUrlReachable(_0x362d63){const _0x458f32=a115_0x45e4,_0x3edc3f=validateJsUrl(_0x362d63);if(!_0x3edc3f['ok'])return _0x3edc3f;const _0x5a42b4=await isUrlReachable(_0x362d63);if(!_0x5a42b4)_0x3edc3f[_0x458f32(0x94)]['push'](_0x458f32(0x95));return{'ok':_0x3edc3f[_0x458f32(0x94)][_0x458f32(0x96)]===0x0,'errors':_0x3edc3f[_0x458f32(0x94)]};}export async function validateCssUrlReachable(_0x4bbb4a){const _0x215a5c=a115_0x45e4,_0x119ac5=validateCssUrl(_0x4bbb4a);if(!_0x119ac5['ok'])return _0x119ac5;const _0x264e4a=await isUrlReachable(_0x4bbb4a);if(!_0x264e4a)_0x119ac5[_0x215a5c(0x94)][_0x215a5c(0x8d)]('CSS\x20URL\x20is\x20unreachable');return{'ok':_0x119ac5[_0x215a5c(0x94)][_0x215a5c(0x96)]===0x0,'errors':_0x119ac5[_0x215a5c(0x94)]};}export function buildCompareRows(_0x1c2479,_0x3460fa){const _0x284981=a115_0x45e4;return _0x1c2479[_0x284981(0x92)](_0x41724f=>({'label':_0x41724f[_0x284981(0x88)],'path':_0x41724f[_0x284981(0x8f)],'local':!![],'online':_0x3460fa['has'](_0x41724f[_0x284981(0x8f)])}));}export async function doCreateMenus(_0x2deceb,_0x4ebc9c,_0x464b5e,_0x270e4c){const _0x448121=a115_0x45e4,_0x50b44f=await createMenus(_0x2deceb,_0x4ebc9c,_0x464b5e,_0x270e4c);return{'created':_0x50b44f['length'],'failed':0x0,'labels':_0x464b5e[_0x448121(0x92)](_0x56e5ef=>_0x56e5ef['label']),'menus':_0x50b44f};}export function filterMenusWithResources(_0x1c9d56){const _0x41f61c=a115_0x45e4;return _0x1c9d56[_0x41f61c(0x84)](_0x48c9fb=>_0x48c9fb[_0x41f61c(0x8b)][_0x41f61c(0x96)]>0x0);}export async function fetchMenuData(_0xe9e97f,_0x524b4f){const _0x378451=a115_0x45e4,_0x414e17=getLocalPages(),_0x3580c3=await getOnlineMenuList(_0xe9e97f,_0x524b4f),_0x30bd68=new Set(_0x3580c3[_0x378451(0x92)](_0x4c66b9=>_0x4c66b9['path']));return{'localPages':_0x414e17,'onlineMenuList':_0x3580c3,'onlinePaths':_0x30bd68};}export async function fetchOnlineMenuList(_0x28ea6c,_0xe321a){return getOnlineMenuList(_0x28ea6c,_0xe321a);}function a115_0x2e0f(){const _0x20dccb=['label','13808trdRZD','65625pJDzEf','resources','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','push','341678GsMxiT','path','298953AdDaMS','4012fuLaiu','map','4633508rszsht','errors','JS\x20URL\x20is\x20unreachable','length','20105525EfpMJC','190nuXrDE','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','filter','1650SkyqWu','6223qUGpCL','120iklNLu'];a115_0x2e0f=function(){return _0x20dccb;};return a115_0x2e0f();}
@@ -1 +1 @@
1
- const a116_0x201b3c=a116_0x4dc6;(function(_0x2d2741,_0x51c0df){const _0x4e375d=a116_0x4dc6,_0x2c7d74=_0x2d2741();while(!![]){try{const _0x3f7bca=parseInt(_0x4e375d(0x83))/0x1+-parseInt(_0x4e375d(0xaf))/0x2+parseInt(_0x4e375d(0xa7))/0x3*(-parseInt(_0x4e375d(0xae))/0x4)+parseInt(_0x4e375d(0xc5))/0x5*(-parseInt(_0x4e375d(0xd1))/0x6)+-parseInt(_0x4e375d(0x77))/0x7+parseInt(_0x4e375d(0xd4))/0x8+parseInt(_0x4e375d(0x89))/0x9*(parseInt(_0x4e375d(0xba))/0xa);if(_0x3f7bca===_0x51c0df)break;else _0x2c7d74['push'](_0x2c7d74['shift']());}catch(_0x3b62e5){_0x2c7d74['push'](_0x2c7d74['shift']());}}}(a116_0x1825,0x70cb5));function a116_0x1825(){const _0x32a46f=['hint','after','folder','deleteOrder','parentId','expect-parent-id','645pGketI','Permission\x20denied\x20while\x20attempting\x20to\x20','required','prototype','api_error','Cannot\x20append\x20a\x20','recheck\x20online\x20menu\x20facts\x20before\x20','menu_verification_failed','byId','failed','plannedActions','menu_parent_not_folder','4926cTlgnO','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','num','1727512rwCjFX','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','expected-children-count','type','expect-path','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','toLowerCase','planFile','filter','string','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','\x20is\x20type\x20\x22','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','succeeded','Menu\x20','hasOwnProperty','\x20menu\x20','childrenCount','isSafeInteger','3189844YXApnm','menu_sort_overflow','menu_state_drift','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','targets','yes','verification','\x20path\x20changed:\x20expected\x20','message','\x20parent\x20changed:\x20expected\x20','cascade','menu_not_found','290246mKMvSu','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','get','code','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','stage','9Zekslt','warnings','Online\x20menu\x20state\x20changed\x20before\x20','number','data','dryRun','read\x20online\x20menu\x20facts\x20before\x20','Exact\x20online\x20menu\x20id','unknown','validation','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','call','root','menu_mutation_failed','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','appCode','path','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','snapshotHash','trim','flagMissing','sort','test','length','bool','--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.','map','Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches','before','\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20','21KivtnV','rawFlags','cookie','menu_permission_denied','pre-write-recheck','menu_sort_invalid','hash','391544Eeezts','861938GwDeIF',',\x20current\x20','Failed\x20to\x20','dry-run','parent-id','operation','str','The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.','backend','selector',',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','16335920OBfORA','stringify','Sibling\x20sort\x20value\x20(non-negative\x20integer)','error','\x22,\x20not\x20folder.'];a116_0x1825=function(){return _0x32a46f;};return a116_0x1825();}import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a116_0x201b3c(0x8c),'required':!![],'description':a116_0x201b3c(0x90)};export const MENU_SORT_FLAG={'name':a116_0x201b3c(0x9e),'type':a116_0x201b3c(0x8c),'description':a116_0x201b3c(0xbc)};export const MENU_PARENT_ID_FLAG={'name':a116_0x201b3c(0xb3),'type':a116_0x201b3c(0x6d),'description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':a116_0x201b3c(0xc4),'type':a116_0x201b3c(0x6d),'description':'Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level'};function a116_0x4dc6(_0x5a92fa,_0x5a1fa1){_0x5a92fa=_0x5a92fa-0x6d;const _0x182513=a116_0x1825();let _0x4dc6c1=_0x182513[_0x5a92fa];return _0x4dc6c1;}export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':'expect-path','type':a116_0x201b3c(0x6d),'description':a116_0x201b3c(0xa4)},{'name':a116_0x201b3c(0xd6),'type':a116_0x201b3c(0x8c),'description':a116_0x201b3c(0x93)}];export function validateExactId(_0x489dd8){const _0x5e56a5=a116_0x201b3c,_0x170c34=_0x489dd8[_0x5e56a5(0xd3)]('id');if(!Number[_0x5e56a5(0x76)](_0x170c34)||_0x170c34<=0x0)throw CliErrors['validation']('--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.');return _0x170c34;}export function validateSort(_0x110722,_0xa5f5a5=a116_0x201b3c(0x9e)){const _0x4585be=a116_0x201b3c;if(!hasFlag(_0x110722,_0xa5f5a5))return undefined;const _0x3ad2fc=_0x110722[_0x4585be(0xd3)](_0xa5f5a5);if(!Number[_0x4585be(0x76)](_0x3ad2fc)||_0x3ad2fc<0x0||_0x3ad2fc>MAX_MENU_SORT)throw menuError(_0x4585be(0xac),'--'+_0xa5f5a5+_0x4585be(0xa6)+MAX_MENU_SORT+'.','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.');return _0x3ad2fc;}export function nextSiblingSort(_0x35c0ad,_0x263c58,_0x255d07){const _0x4fab77=a116_0x201b3c,_0x52f19c=getChildren(_0x35c0ad,_0x263c58)[_0x4fab77(0xa3)](_0xf79388=>_0xf79388[_0x4fab77(0x9e)])[_0x4fab77(0xdc)](_0xe9c017=>typeof _0xe9c017===_0x4fab77(0x8c));if(_0x52f19c[_0x4fab77(0xa0)]===0x0)return 0x0;const _0x42421b=Math['max'](..._0x52f19c);if(_0x42421b>=MAX_MENU_SORT)throw menuError(_0x4fab77(0x78),_0x4fab77(0xca)+_0x255d07+'\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20'+_0x42421b+'.','Reorder\x20sibling\x20menus\x20below\x20'+MAX_MENU_SORT+_0x4fab77(0xb9));return _0x42421b+0x1;}export function requireExplicitYes(_0x50dc11){const _0x8a080f=a116_0x201b3c;if(_0x50dc11[_0x8a080f(0xa1)](_0x8a080f(0xb2)))return;if(!_0x50dc11[_0x8a080f(0xa1)](_0x8a080f(0x7c)))throw menuError('menu_confirmation_required',_0x8a080f(0x97),_0x8a080f(0xd9));}export async function fetchMutationSnapshot(_0x5f4587,_0x44c05d,_0x127529){const _0x20c58e=a116_0x201b3c;try{return await fetchMenuSnapshot(_0x5f4587[_0x20c58e(0x98)],_0x5f4587[_0x20c58e(0xa9)]);}catch(_0x2ae1ce){throw mapMenuApiError(_0x2ae1ce,_0x20c58e(0x8f)+_0x44c05d,_0x127529);}}export async function recheckMutationSnapshot(_0x566873,_0x424430,_0x3c7ad4,_0x54bee7){const _0x3b2d69=a116_0x201b3c;let _0x26eb40;try{_0x26eb40=await fetchMenuSnapshot(_0x566873[_0x3b2d69(0x98)],_0x566873['cookie']);}catch(_0x12eec1){const _0x14b5bc=mapMenuApiError(_0x12eec1,_0x3b2d69(0xcb)+_0x3c7ad4,_0x54bee7);throw menuFailure(_0x14b5bc,_0x424430,{'stage':'pre-write-recheck','failed':_0x54bee7==null?{}:{'id':_0x54bee7}});}if(_0x26eb40['hash']!==_0x424430['snapshotHash']){const _0x51461d=menuError(_0x3b2d69(0x79),_0x3b2d69(0x8b)+_0x3c7ad4+';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.',_0x3b2d69(0x6e));throw menuFailure(_0x51461d,_0x424430,{'stage':_0x3b2d69(0xab),'failed':{..._0x54bee7==null?{}:{'id':_0x54bee7},'expectedSnapshotHash':_0x424430[_0x3b2d69(0x9b)],'currentSnapshotHash':_0x26eb40[_0x3b2d69(0xad)]}});}return _0x26eb40;}export function parseParentId(_0x1184f6,_0x373a00,_0x50c733={}){const _0x244e88=a116_0x201b3c;if(!hasFlag(_0x1184f6,_0x373a00)){if(_0x50c733[_0x244e88(0xc7)])throw CliErrors[_0x244e88(0x9d)](_0x373a00);return undefined;}const _0x25d24d=_0x1184f6['str'](_0x373a00)[_0x244e88(0x9c)]();if(_0x25d24d[_0x244e88(0xda)]()===_0x244e88(0x95))return null;if(!/^\d+$/[_0x244e88(0x9f)](_0x25d24d))throw CliErrors[_0x244e88(0x92)]('--'+_0x373a00+_0x244e88(0x9a));const _0x41e56e=Number(_0x25d24d);if(!Number[_0x244e88(0x76)](_0x41e56e)||_0x41e56e<=0x0)throw CliErrors[_0x244e88(0x92)]('--'+_0x373a00+_0x244e88(0x9a));return _0x41e56e;}export function requireMenu(_0x59aa5f,_0x59ceb3){const _0x7b3cd7=a116_0x201b3c,_0x284b40=_0x59aa5f[_0x7b3cd7(0xcd)][_0x7b3cd7(0x85)](_0x59ceb3);if(!_0x284b40)throw menuError(_0x7b3cd7(0x82),'Online\x20menu\x20not\x20found:\x20'+_0x59ceb3,_0x7b3cd7(0x84));return _0x284b40;}export function requireFolder(_0x4ec8bb,_0x452000){const _0x27c604=a116_0x201b3c,_0xb093c4=requireMenu(_0x4ec8bb,_0x452000);if(_0xb093c4[_0x27c604(0xd7)]!==_0x27c604(0xc1))throw menuError(_0x27c604(0xd0),_0x27c604(0x72)+_0x452000+_0x27c604(0x6f)+(_0xb093c4['type']||_0x27c604(0x91))+_0x27c604(0xbe),_0x27c604(0x87));return _0xb093c4;}export function assertExpectedState(_0x4c1c8d,_0x4f5ff6){const _0x434a96=a116_0x201b3c;if(hasFlag(_0x4c1c8d,_0x434a96(0xc4))){const _0x20979=parseParentId(_0x4c1c8d,_0x434a96(0xc4),{'required':!![]});if(_0x4f5ff6[_0x434a96(0xc3)]!==_0x20979)throw stateDrift(_0x434a96(0x72)+_0x4f5ff6['id']+_0x434a96(0x80)+formatParent(_0x20979)+_0x434a96(0xb0)+formatParent(_0x4f5ff6[_0x434a96(0xc3)])+'.');}if(hasFlag(_0x4c1c8d,_0x434a96(0xd8))){const _0x2dfc37=_0x4c1c8d[_0x434a96(0xb5)](_0x434a96(0xd8));if(_0x4f5ff6[_0x434a96(0x99)]!==_0x2dfc37)throw stateDrift(_0x434a96(0x72)+_0x4f5ff6['id']+_0x434a96(0x7e)+JSON['stringify'](_0x2dfc37)+_0x434a96(0xb0)+JSON[_0x434a96(0xbb)](_0x4f5ff6[_0x434a96(0x99)])+'.');}if(hasFlag(_0x4c1c8d,'expected-children-count')){const _0x4007a1=_0x4c1c8d[_0x434a96(0xd3)]('expected-children-count');if(!Number['isSafeInteger'](_0x4007a1)||_0x4007a1<0x0)throw CliErrors['validation'](_0x434a96(0xa2));if(_0x4f5ff6[_0x434a96(0x75)]!==_0x4007a1)throw stateDrift(_0x434a96(0x72)+_0x4f5ff6['id']+'\x20child\x20count\x20changed:\x20expected\x20'+_0x4007a1+_0x434a96(0xb0)+_0x4f5ff6[_0x434a96(0x75)]+'.');}}export function assertVerified(_0x2b4053,_0x1ea603,_0x2941ec=a116_0x201b3c(0x7a)){const _0xc11186=a116_0x201b3c;if(!_0x2b4053)throw menuError(_0xc11186(0xcc),_0x1ea603,_0x2941ec);}export function mutationResult(_0xd3bfbc){const _0xa02296=a116_0x201b3c;return{'operation':_0xd3bfbc[_0xa02296(0xb4)],'selector':_0xd3bfbc[_0xa02296(0xb8)],'before':_0xd3bfbc[_0xa02296(0xa5)],'after':_0xd3bfbc[_0xa02296(0xc0)],'dryRun':_0xd3bfbc[_0xa02296(0x8e)],'backend':_0xd3bfbc[_0xa02296(0xb7)],..._0xd3bfbc[_0xa02296(0xcf)]?{'plannedActions':_0xd3bfbc['plannedActions']}:{},..._0xd3bfbc[_0xa02296(0x7b)]?{'targets':_0xd3bfbc[_0xa02296(0x7b)]}:{},..._0xd3bfbc[_0xa02296(0xc2)]?{'deleteOrder':_0xd3bfbc[_0xa02296(0xc2)]}:{},'snapshotHash':_0xd3bfbc[_0xa02296(0x9b)],..._0xd3bfbc[_0xa02296(0x81)]?{'cascade':_0xd3bfbc[_0xa02296(0x81)]}:{},..._0xd3bfbc[_0xa02296(0xdb)]?{'planFile':_0xd3bfbc[_0xa02296(0xdb)]}:{},'succeeded':_0xd3bfbc[_0xa02296(0x71)]??[],'failed':_0xd3bfbc['failed']??[],'warnings':_0xd3bfbc[_0xa02296(0x8a)]??[],'verification':_0xd3bfbc[_0xa02296(0x7d)],'error':_0xd3bfbc[_0xa02296(0xbd)]};}export function menuDryRunResult(_0x106a59,_0x225bd7){return{..._0x106a59,..._0x225bd7};}export function menuFailure(_0x49a11b,_0x40baa2,_0x5c8cc3){const _0x315e66=a116_0x201b3c,_0x5aa94e=mutationResult({..._0x40baa2,'after':_0x5c8cc3['after']===undefined?_0x40baa2[_0x315e66(0xc0)]:_0x5c8cc3[_0x315e66(0xc0)],'backend':_0x5c8cc3['backend']??_0x40baa2[_0x315e66(0xb7)],'dryRun':![],'succeeded':_0x5c8cc3[_0x315e66(0x71)]??[],'failed':[{..._0x5c8cc3[_0x315e66(0xce)]??{},'stage':_0x5c8cc3[_0x315e66(0x88)],'code':_0x49a11b[_0x315e66(0x86)],'message':_0x49a11b['message']}],'warnings':[..._0x40baa2[_0x315e66(0x8a)],..._0x5c8cc3['warnings']??[]],'verification':_0x5c8cc3[_0x315e66(0x7d)],'error':{'code':_0x49a11b[_0x315e66(0x86)],'message':_0x49a11b[_0x315e66(0x7f)],..._0x49a11b['hint']?{'hint':_0x49a11b[_0x315e66(0xbf)]}:{}}});return Object['defineProperty'](_0x49a11b,_0x315e66(0x8d),{'value':_0x5aa94e,'enumerable':!![],'configurable':!![]}),_0x49a11b;}export function asVerificationError(_0x4425a6,_0x5b5995){const _0x8191bf=a116_0x201b3c;if(_0x4425a6 instanceof CliError&&_0x4425a6[_0x8191bf(0x86)]===_0x8191bf(0xcc))return _0x4425a6;const _0x27f5b6=_0x4425a6 instanceof Error?_0x4425a6[_0x8191bf(0x7f)]:String(_0x4425a6);return menuError(_0x8191bf(0xcc),''+_0x5b5995+(_0x27f5b6?':\x20'+_0x27f5b6:''),_0x8191bf(0xb6));}export function describeMenuErrorCause(_0xca91a1,_0x808b55,_0x4e4e59){const _0x27dfbe=a116_0x201b3c,_0x39f875=mapMenuApiError(_0xca91a1,_0x808b55,_0x4e4e59);return{'causeCode':_0x39f875[_0x27dfbe(0x86)],'causeMessage':_0x39f875['message']};}export function hasFlag(_0x20c258,_0x145d68){const _0x464627=a116_0x201b3c;return Object[_0x464627(0xc8)][_0x464627(0x73)][_0x464627(0x94)](_0x20c258[_0x464627(0xa8)],_0x145d68)&&_0x20c258[_0x464627(0xa8)][_0x145d68]!==undefined;}export function toApiParentId(_0x36ef75){return _0x36ef75??0x0;}export function formatParent(_0x179c9b){const _0x3fb14f=a116_0x201b3c;return _0x179c9b==null?_0x3fb14f(0x95):String(_0x179c9b);}export function menuError(_0x421963,_0x21fd38,_0x125a5e){return new CliError(_0x421963,0x1,_0x21fd38,_0x125a5e);}export function mapMenuApiError(_0x25806b,_0x57bb3c,_0x328e0f){const _0x373846=a116_0x201b3c;if(_0x25806b instanceof CliError&&_0x25806b['code']!==_0x373846(0xc9))return _0x25806b;const _0x3ac959=_0x25806b instanceof Error?_0x25806b[_0x373846(0x7f)]:String(_0x25806b);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x373846(0x9f)](_0x3ac959))return menuError(_0x373846(0xaa),_0x373846(0xc6)+_0x57bb3c+(_0x328e0f?_0x373846(0x74)+_0x328e0f:'')+'.',_0x373846(0xd2));return menuError(_0x373846(0x96),_0x373846(0xb1)+_0x57bb3c+(_0x328e0f?_0x373846(0x74)+_0x328e0f:'')+':\x20'+_0x3ac959,_0x373846(0xd5));}function stateDrift(_0x203e6e){const _0x47102d=a116_0x201b3c;return menuError(_0x47102d(0x79),_0x203e6e,_0x47102d(0x70));}
1
+ const a116_0x33ea24=a116_0x2d4b;function a116_0x2d4b(_0x518a2b,_0x533ca8){_0x518a2b=_0x518a2b-0x13f;const _0x3019d8=a116_0x3019();let _0x2d4bd0=_0x3019d8[_0x518a2b];return _0x2d4bd0;}(function(_0xd33f6d,_0x3c4741){const _0x48343c=a116_0x2d4b,_0x21fc45=_0xd33f6d();while(!![]){try{const _0xbc3a6=-parseInt(_0x48343c(0x184))/0x1+parseInt(_0x48343c(0x168))/0x2+-parseInt(_0x48343c(0x16a))/0x3+-parseInt(_0x48343c(0x167))/0x4+-parseInt(_0x48343c(0x19e))/0x5+parseInt(_0x48343c(0x15a))/0x6+parseInt(_0x48343c(0x164))/0x7*(parseInt(_0x48343c(0x193))/0x8);if(_0xbc3a6===_0x3c4741)break;else _0x21fc45['push'](_0x21fc45['shift']());}catch(_0x223c51){_0x21fc45['push'](_0x21fc45['shift']());}}}(a116_0x3019,0x68835));import{CliError,CliErrors}from'../../../errors.js';import{fetchMenuSnapshot,getChildren}from'../../../commands/menu/shared/facts.js';export const MAX_MENU_SORT=0x7fffffff;export const MENU_ID_FLAG={'name':'id','type':a116_0x33ea24(0x140),'required':!![],'description':'Exact\x20online\x20menu\x20id'};export const MENU_SORT_FLAG={'name':'sort','type':a116_0x33ea24(0x140),'description':'Sibling\x20sort\x20value\x20(non-negative\x20integer)'};export const MENU_PARENT_ID_FLAG={'name':'parent-id','type':'string','description':'Parent\x20folder\x20id;\x20use\x20root\x20for\x20a\x20root-level\x20node'};export const MENU_EXPECT_PARENT_ID_FLAG={'name':'expect-parent-id','type':a116_0x33ea24(0x177),'description':'Abort\x20unless\x20the\x20current\x20parent\x20id\x20matches;\x20use\x20root\x20for\x20root\x20level'};export const MENU_EXPECT_FLAGS=[MENU_EXPECT_PARENT_ID_FLAG,{'name':a116_0x33ea24(0x1a6),'type':'string','description':'Abort\x20unless\x20the\x20current\x20menu\x20path\x20exactly\x20matches'},{'name':'expected-children-count','type':a116_0x33ea24(0x140),'description':a116_0x33ea24(0x17c)}];export function validateExactId(_0x5aca82){const _0x3e726f=a116_0x33ea24,_0x5ce2c6=_0x5aca82[_0x3e726f(0x17b)]('id');if(!Number['isSafeInteger'](_0x5ce2c6)||_0x5ce2c6<=0x0)throw CliErrors[_0x3e726f(0x192)](_0x3e726f(0x1a1));return _0x5ce2c6;}export function validateSort(_0x28ebc0,_0x371473=a116_0x33ea24(0x18e)){const _0x51fe01=a116_0x33ea24;if(!hasFlag(_0x28ebc0,_0x371473))return undefined;const _0xe92323=_0x28ebc0[_0x51fe01(0x17b)](_0x371473);if(!Number[_0x51fe01(0x154)](_0xe92323)||_0xe92323<0x0||_0xe92323>MAX_MENU_SORT)throw menuError(_0x51fe01(0x180),'--'+_0x371473+'\x20must\x20be\x20an\x20integer\x20between\x200\x20and\x20'+MAX_MENU_SORT+'.',_0x51fe01(0x15e));return _0xe92323;}export function nextSiblingSort(_0x4c06ce,_0x12edd5,_0x151669){const _0x8c528f=a116_0x33ea24,_0x4e9064=getChildren(_0x4c06ce,_0x12edd5)[_0x8c528f(0x1a0)](_0x453776=>_0x453776['sort'])[_0x8c528f(0x160)](_0x21bd97=>typeof _0x21bd97===_0x8c528f(0x140));if(_0x4e9064[_0x8c528f(0x18a)]===0x0)return 0x0;const _0x1c24b8=Math['max'](..._0x4e9064);if(_0x1c24b8>=MAX_MENU_SORT)throw menuError(_0x8c528f(0x14c),_0x8c528f(0x18b)+_0x151669+_0x8c528f(0x16c)+_0x1c24b8+'.',_0x8c528f(0x144)+MAX_MENU_SORT+_0x8c528f(0x155));return _0x1c24b8+0x1;}export function requireExplicitYes(_0x1708e6){const _0x61daaf=a116_0x33ea24;if(_0x1708e6[_0x61daaf(0x17d)](_0x61daaf(0x1a4)))return;if(!_0x1708e6[_0x61daaf(0x17d)](_0x61daaf(0x186)))throw menuError(_0x61daaf(0x14e),_0x61daaf(0x146),_0x61daaf(0x141));}export async function fetchMutationSnapshot(_0xcb20a7,_0x23d623,_0x18bb4c){const _0xb3792c=a116_0x33ea24;try{return await fetchMenuSnapshot(_0xcb20a7['appCode'],_0xcb20a7[_0xb3792c(0x163)]);}catch(_0x3f0dc0){throw mapMenuApiError(_0x3f0dc0,_0xb3792c(0x17e)+_0x23d623,_0x18bb4c);}}export async function recheckMutationSnapshot(_0x3137ab,_0x5e9318,_0x187e8d,_0x1a5e55){const _0x3f2190=a116_0x33ea24;let _0x3c295a;try{_0x3c295a=await fetchMenuSnapshot(_0x3137ab[_0x3f2190(0x13f)],_0x3137ab[_0x3f2190(0x163)]);}catch(_0x49840a){const _0x3e958=mapMenuApiError(_0x49840a,_0x3f2190(0x16d)+_0x187e8d,_0x1a5e55);throw menuFailure(_0x3e958,_0x5e9318,{'stage':_0x3f2190(0x159),'failed':_0x1a5e55==null?{}:{'id':_0x1a5e55}});}if(_0x3c295a['hash']!==_0x5e9318[_0x3f2190(0x19b)]){const _0x5dc052=menuError(_0x3f2190(0x15c),_0x3f2190(0x169)+_0x187e8d+_0x3f2190(0x14d),_0x3f2190(0x14a));throw menuFailure(_0x5dc052,_0x5e9318,{'stage':_0x3f2190(0x159),'failed':{..._0x1a5e55==null?{}:{'id':_0x1a5e55},'expectedSnapshotHash':_0x5e9318[_0x3f2190(0x19b)],'currentSnapshotHash':_0x3c295a[_0x3f2190(0x1a5)]}});}return _0x3c295a;}export function parseParentId(_0x22bd9a,_0x597b99,_0x2dd690={}){const _0xe28fe1=a116_0x33ea24;if(!hasFlag(_0x22bd9a,_0x597b99)){if(_0x2dd690[_0xe28fe1(0x175)])throw CliErrors[_0xe28fe1(0x170)](_0x597b99);return undefined;}const _0x18c17a=_0x22bd9a['str'](_0x597b99)['trim']();if(_0x18c17a[_0xe28fe1(0x191)]()===_0xe28fe1(0x1a2))return null;if(!/^\d+$/[_0xe28fe1(0x143)](_0x18c17a))throw CliErrors[_0xe28fe1(0x192)]('--'+_0x597b99+_0xe28fe1(0x194));const _0x1bc1e8=Number(_0x18c17a);if(!Number['isSafeInteger'](_0x1bc1e8)||_0x1bc1e8<=0x0)throw CliErrors[_0xe28fe1(0x192)]('--'+_0x597b99+_0xe28fe1(0x194));return _0x1bc1e8;}export function requireMenu(_0x1ed6fe,_0x202264){const _0x53ad62=a116_0x33ea24,_0x141cd9=_0x1ed6fe[_0x53ad62(0x181)][_0x53ad62(0x158)](_0x202264);if(!_0x141cd9)throw menuError('menu_not_found','Online\x20menu\x20not\x20found:\x20'+_0x202264,_0x53ad62(0x182));return _0x141cd9;}export function requireFolder(_0x18a7b8,_0x3cad5d){const _0x19b14f=a116_0x33ea24,_0x403eb1=requireMenu(_0x18a7b8,_0x3cad5d);if(_0x403eb1['type']!=='folder')throw menuError(_0x19b14f(0x179),'Menu\x20'+_0x3cad5d+_0x19b14f(0x16e)+(_0x403eb1[_0x19b14f(0x16f)]||'unknown')+_0x19b14f(0x17f),_0x19b14f(0x147));return _0x403eb1;}export function assertExpectedState(_0x447677,_0x78020d){const _0x5344e7=a116_0x33ea24;if(hasFlag(_0x447677,'expect-parent-id')){const _0x58ada2=parseParentId(_0x447677,_0x5344e7(0x189),{'required':!![]});if(_0x78020d[_0x5344e7(0x19f)]!==_0x58ada2)throw stateDrift(_0x5344e7(0x185)+_0x78020d['id']+'\x20parent\x20changed:\x20expected\x20'+formatParent(_0x58ada2)+_0x5344e7(0x174)+formatParent(_0x78020d[_0x5344e7(0x19f)])+'.');}if(hasFlag(_0x447677,'expect-path')){const _0x492212=_0x447677[_0x5344e7(0x142)](_0x5344e7(0x1a6));if(_0x78020d['path']!==_0x492212)throw stateDrift(_0x5344e7(0x185)+_0x78020d['id']+_0x5344e7(0x161)+JSON['stringify'](_0x492212)+',\x20current\x20'+JSON[_0x5344e7(0x145)](_0x78020d[_0x5344e7(0x18c)])+'.');}if(hasFlag(_0x447677,_0x5344e7(0x157))){const _0x2a576f=_0x447677['num'](_0x5344e7(0x157));if(!Number[_0x5344e7(0x154)](_0x2a576f)||_0x2a576f<0x0)throw CliErrors['validation']('--expected-children-count\x20must\x20be\x20a\x20non-negative\x20integer.');if(_0x78020d[_0x5344e7(0x1a3)]!==_0x2a576f)throw stateDrift('Menu\x20'+_0x78020d['id']+_0x5344e7(0x172)+_0x2a576f+',\x20current\x20'+_0x78020d[_0x5344e7(0x1a3)]+'.');}}export function assertVerified(_0xda211b,_0x32a221,_0x2ea015=a116_0x33ea24(0x152)){if(!_0xda211b)throw menuError('menu_verification_failed',_0x32a221,_0x2ea015);}export function mutationResult(_0x5989c0){const _0xab9d04=a116_0x33ea24;return{'operation':_0x5989c0[_0xab9d04(0x195)],'selector':_0x5989c0[_0xab9d04(0x16b)],'before':_0x5989c0[_0xab9d04(0x150)],'after':_0x5989c0[_0xab9d04(0x166)],'dryRun':_0x5989c0[_0xab9d04(0x149)],'backend':_0x5989c0[_0xab9d04(0x153)],..._0x5989c0['plannedActions']?{'plannedActions':_0x5989c0[_0xab9d04(0x18d)]}:{},..._0x5989c0[_0xab9d04(0x188)]?{'targets':_0x5989c0['targets']}:{},..._0x5989c0[_0xab9d04(0x197)]?{'deleteOrder':_0x5989c0[_0xab9d04(0x197)]}:{},'snapshotHash':_0x5989c0[_0xab9d04(0x19b)],..._0x5989c0[_0xab9d04(0x183)]?{'cascade':_0x5989c0['cascade']}:{},..._0x5989c0[_0xab9d04(0x151)]?{'planFile':_0x5989c0[_0xab9d04(0x151)]}:{},'succeeded':_0x5989c0[_0xab9d04(0x14f)]??[],'failed':_0x5989c0[_0xab9d04(0x148)]??[],'warnings':_0x5989c0[_0xab9d04(0x190)]??[],'verification':_0x5989c0[_0xab9d04(0x15b)],'error':_0x5989c0[_0xab9d04(0x199)]};}export function menuDryRunResult(_0x13c49a,_0x167b75){return{..._0x13c49a,..._0x167b75};}export function menuFailure(_0x2a8fad,_0x59504d,_0x354f8b){const _0x404f80=a116_0x33ea24,_0xe12baa=mutationResult({..._0x59504d,'after':_0x354f8b[_0x404f80(0x166)]===undefined?_0x59504d[_0x404f80(0x166)]:_0x354f8b['after'],'backend':_0x354f8b[_0x404f80(0x153)]??_0x59504d[_0x404f80(0x153)],'dryRun':![],'succeeded':_0x354f8b['succeeded']??[],'failed':[{..._0x354f8b[_0x404f80(0x148)]??{},'stage':_0x354f8b[_0x404f80(0x173)],'code':_0x2a8fad[_0x404f80(0x14b)],'message':_0x2a8fad['message']}],'warnings':[..._0x59504d[_0x404f80(0x190)],..._0x354f8b[_0x404f80(0x190)]??[]],'verification':_0x354f8b[_0x404f80(0x15b)],'error':{'code':_0x2a8fad[_0x404f80(0x14b)],'message':_0x2a8fad[_0x404f80(0x19c)],..._0x2a8fad['hint']?{'hint':_0x2a8fad[_0x404f80(0x178)]}:{}}});return Object[_0x404f80(0x18f)](_0x2a8fad,'data',{'value':_0xe12baa,'enumerable':!![],'configurable':!![]}),_0x2a8fad;}export function asVerificationError(_0x6e6d34,_0x351b87){const _0x5d187d=a116_0x33ea24;if(_0x6e6d34 instanceof CliError&&_0x6e6d34[_0x5d187d(0x14b)]==='menu_verification_failed')return _0x6e6d34;const _0x27fca7=_0x6e6d34 instanceof Error?_0x6e6d34[_0x5d187d(0x19c)]:String(_0x6e6d34);return menuError(_0x5d187d(0x19d),''+_0x351b87+(_0x27fca7?':\x20'+_0x27fca7:''),'The\x20write\x20may\x20already\x20have\x20taken\x20effect.\x20Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20inspect\x20the\x20returned\x20id\x20before\x20retrying.');}export function describeMenuErrorCause(_0x2caad5,_0x47154e,_0x19ad5b){const _0x3639d4=a116_0x33ea24,_0x1e30e4=mapMenuApiError(_0x2caad5,_0x47154e,_0x19ad5b);return{'causeCode':_0x1e30e4[_0x3639d4(0x14b)],'causeMessage':_0x1e30e4['message']};}export function hasFlag(_0x597ce3,_0xe909b8){const _0x1eeb57=a116_0x33ea24;return Object[_0x1eeb57(0x171)][_0x1eeb57(0x156)]['call'](_0x597ce3[_0x1eeb57(0x17a)],_0xe909b8)&&_0x597ce3[_0x1eeb57(0x17a)][_0xe909b8]!==undefined;}function a116_0x3019(){const _0x4514db=[',\x20or\x20pass\x20an\x20explicit\x20--sort\x20value.','hasOwnProperty','expected-children-count','get','pre-write-recheck','4993284sIwzKL','verification','menu_state_drift','menu_mutation_failed','Choose\x20a\x20sort\x20value\x20within\x20the\x20Java\x20Integer\x20range\x20used\x20by\x20the\x20menu\x20service.','Failed\x20to\x20','filter','\x20path\x20changed:\x20expected\x20','\x20menu\x20','cookie','3809302QJooRc','Permission\x20denied\x20while\x20attempting\x20to\x20','after','623556PkSyTg','1299236xkyquy','Online\x20menu\x20state\x20changed\x20before\x20','1635894XZGwUm','selector','\x20because\x20the\x20current\x20maximum\x20sibling\x20sort\x20is\x20','recheck\x20online\x20menu\x20facts\x20before\x20','\x20is\x20type\x20\x22','type','flagMissing','prototype','\x20child\x20count\x20changed:\x20expected\x20','stage',',\x20current\x20','required','Re-run\x20menu\x20list\x20to\x20inspect\x20the\x20latest\x20online\x20state\x20before\x20retrying.','string','hint','menu_parent_not_folder','rawFlags','num','Abort\x20unless\x20the\x20current\x20direct\x20child\x20count\x20matches','bool','read\x20online\x20menu\x20facts\x20before\x20','\x22,\x20not\x20folder.','menu_sort_invalid','byId','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20and\x20use\x20an\x20exact\x20id\x20from\x20the\x20current\x20app.','cascade','57459fmebWr','Menu\x20','yes','Re-run\x20the\x20command\x20with\x20--dry-run\x20and\x20update\x20the\x20expect\x20flags\x20before\x20retrying.','targets','expect-parent-id','length','Cannot\x20append\x20a\x20','path','plannedActions','sort','defineProperty','warnings','toLowerCase','validation','8mXISGB','\x20must\x20be\x20a\x20positive\x20menu\x20id\x20or\x20root.','operation','Confirm\x20that\x20the\x20current\x20account\x20can\x20manage\x20menus\x20for\x20this\x20app.','deleteOrder','api_error','error','menu_permission_denied','snapshotHash','message','menu_verification_failed','4196435qiProI','parentId','map','--id\x20must\x20be\x20a\x20positive\x20integer\x20menu\x20id.','root','childrenCount','dry-run','hash','expect-path','appCode','number','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20first,\x20then\x20add\x20--yes\x20after\x20reviewing\x20the\x20plan.','str','test','Reorder\x20sibling\x20menus\x20below\x20','stringify','This\x20menu\x20mutation\x20requires\x20explicit\x20--yes.','Choose\x20a\x20menu\x20whose\x20type\x20is\x20folder,\x20or\x20use\x20root.','failed','dryRun','Run\x20the\x20same\x20command\x20with\x20--dry-run\x20again\x20and\x20review\x20the\x20latest\x20snapshot\x20before\x20retrying.','code','menu_sort_overflow',';\x20the\x20planned\x20snapshot\x20is\x20no\x20longer\x20current.','menu_confirmation_required','succeeded','before','planFile','Run\x20`rabetbase\x20menu\x20list\x20--format\x20json`\x20to\x20inspect\x20the\x20latest\x20online\x20menu\x20state.','backend','isSafeInteger'];a116_0x3019=function(){return _0x4514db;};return a116_0x3019();}export function toApiParentId(_0x8d80de){return _0x8d80de??0x0;}export function formatParent(_0x1bd2f2){const _0x2576d7=a116_0x33ea24;return _0x1bd2f2==null?_0x2576d7(0x1a2):String(_0x1bd2f2);}export function menuError(_0x472749,_0x2b54e1,_0xd2b47e){return new CliError(_0x472749,0x1,_0x2b54e1,_0xd2b47e);}export function mapMenuApiError(_0x599e76,_0x176136,_0x13169e){const _0x30ee52=a116_0x33ea24;if(_0x599e76 instanceof CliError&&_0x599e76['code']!==_0x30ee52(0x198))return _0x599e76;const _0x54edb9=_0x599e76 instanceof Error?_0x599e76['message']:String(_0x599e76);if(/HTTP 403|forbidden|permission|无权限|权限不足|没有权限/i[_0x30ee52(0x143)](_0x54edb9))return menuError(_0x30ee52(0x19a),_0x30ee52(0x165)+_0x176136+(_0x13169e?_0x30ee52(0x162)+_0x13169e:'')+'.',_0x30ee52(0x196));return menuError(_0x30ee52(0x15d),_0x30ee52(0x15f)+_0x176136+(_0x13169e?'\x20menu\x20'+_0x13169e:'')+':\x20'+_0x54edb9,_0x30ee52(0x176));}function stateDrift(_0x23254b){const _0x20343b=a116_0x33ea24;return menuError(_0x20343b(0x15c),_0x23254b,_0x20343b(0x187));}
@@ -1 +1 @@
1
- (function(_0x4fb90f,_0xf66054){const _0x455600=a117_0x533f,_0x4ff548=_0x4fb90f();while(!![]){try{const _0x4235ff=parseInt(_0x455600(0x1c2))/0x1*(-parseInt(_0x455600(0x1da))/0x2)+parseInt(_0x455600(0x1dd))/0x3+-parseInt(_0x455600(0x1d4))/0x4+-parseInt(_0x455600(0x1e7))/0x5*(-parseInt(_0x455600(0x1cd))/0x6)+-parseInt(_0x455600(0x1c6))/0x7+parseInt(_0x455600(0x1c5))/0x8*(parseInt(_0x455600(0x1e0))/0x9)+parseInt(_0x455600(0x1ce))/0xa*(-parseInt(_0x455600(0x1d3))/0xb);if(_0x4235ff===_0xf66054)break;else _0x4ff548['push'](_0x4ff548['shift']());}catch(_0x327013){_0x4ff548['push'](_0x4ff548['shift']());}}}(a117_0x33dc,0x71fa9));function a117_0x33dc(){const _0x465c19=['\x20online\x20menus\x20successfully','create-menus','304435tmDIhC','label','Update\x20menu\x20','extend','get-online-menu-list','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','90757TdyqbX','Creating\x20menu:\x20','Delete\x20','72712iAmeay','5023739SdZVoi','map','create-menu','menus','Menu\x20assets\x20synced:\x20','path','Start\x20batch\x20menu\x20creation,\x20total\x20','78BCNIEc','525830vbKOMs','Batch\x20menu\x20creation\x20completed,\x20total\x20','resources','all','stringify','44HTmQil','3176332xxbNkY','info','loadScriptMode','\x20menu','import','length','2lqWJgP','total','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','1846893gaPPPP','update-menu-cdn-url','Fetched\x20','864lgAoHX','Create\x20menu\x20\x22','Menu\x20created\x20successfully:\x20','procode','\x20menu\x20group(s)'];a117_0x33dc=function(){return _0x465c19;};return a117_0x33dc();}import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a117_0x370494,updateMenuRecord}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x508de2,_0x4bd792){const _0x3533a0=a117_0x533f,_0x3957f0=getEnv();logger[_0x3533a0(0x1d5)](_0x3533a0(0x1c0),isProduction(_0x3957f0)?_0x3533a0(0x1dc)+_0x508de2+')':_0x3533a0(0x1c1)+_0x508de2+')');const _0x24f3a8=await fetchMenuSnapshot(_0x508de2,_0x4bd792,{'verbose':!![]});return logger[_0x3533a0(0x1d5)]('get-online-menu-list',_0x3533a0(0x1df)+_0x24f3a8[_0x3533a0(0x1db)]+_0x3533a0(0x1e5)),_0x24f3a8[_0x3533a0(0x1c9)][_0x3533a0(0x1c7)](toProcessedMenuItem);}export async function createMenu(_0x57673c,_0x52cb49,_0x5f48c1){const _0x3fc9de=a117_0x533f;logger['info']('create-menu',_0x3fc9de(0x1c3)+_0x5f48c1[_0x3fc9de(0x1e8)]+'\x20('+_0x5f48c1['path']+')');const _0x2b8193={'appCode':_0x57673c,'type':_0x3fc9de(0x1e3),'sort':0x0,'extend':{'loadScriptMode':_0x3fc9de(0x1d8),'resources':_0x5f48c1['resources']?JSON[_0x3fc9de(0x1d2)](_0x5f48c1[_0x3fc9de(0x1d0)]):undefined},..._0x5f48c1},_0x19a197=await createMenuRecord(_0x2b8193,_0x52cb49,_0x3fc9de(0x1e1)+_0x5f48c1[_0x3fc9de(0x1e8)]+'\x22');return logger['info'](_0x3fc9de(0x1c8),_0x3fc9de(0x1e2)+_0x5f48c1[_0x3fc9de(0x1e8)]),_0x19a197;}async function createSingleMenu(_0x430f1f,_0x4ce1c2,_0x4b8a9c,_0x48aa9d){const _0x129dae=a117_0x533f,_0x31692f={'appCode':_0x430f1f,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x129dae(0x1d8),'resources':_0x48aa9d?JSON[_0x129dae(0x1d2)](_0x48aa9d):undefined},'label':_0x4b8a9c[_0x129dae(0x1e8)],'path':_0x4b8a9c[_0x129dae(0x1cb)]},_0x1e041d=await createMenuRecord(_0x31692f,_0x4ce1c2,_0x129dae(0x1e1)+_0x4b8a9c['label']+'\x22');return logger['info']('create-menu',_0x129dae(0x1e2)+_0x4b8a9c[_0x129dae(0x1e8)]),_0x1e041d;}export async function createMenus(_0x49d2cf,_0x3f6fa4,_0x27fe68,_0x201d90){const _0x141e07=a117_0x533f;logger[_0x141e07(0x1d5)](_0x141e07(0x1e6),_0x141e07(0x1cc)+_0x27fe68[_0x141e07(0x1d9)]);const _0x1f045d=await Promise[_0x141e07(0x1d1)](_0x27fe68[_0x141e07(0x1c7)](_0x3f0145=>createSingleMenu(_0x49d2cf,_0x3f6fa4,_0x3f0145,_0x201d90)));return logger[_0x141e07(0x1d5)](_0x141e07(0x1e6),_0x141e07(0x1cf)+_0x27fe68[_0x141e07(0x1d9)]),_0x1f045d;}export async function updateMenuCdnUrl(_0x35fccf,_0x3eca96,_0x29d5c7){const _0x4bce57=a117_0x533f;logger[_0x4bce57(0x1d5)](_0x4bce57(0x1de),'Updating\x20menu\x20asset\x20links:\x20'+_0x29d5c7[_0x4bce57(0x1e8)]+'\x20('+_0x29d5c7[_0x4bce57(0x1cb)]+')');const _0x540e89={'id':_0x29d5c7['id'],'appCode':_0x35fccf,'extend':{..._0x29d5c7[_0x4bce57(0x1ea)]??{},..._0x29d5c7[_0x4bce57(0x1d6)]?{'loadScriptMode':_0x29d5c7[_0x4bce57(0x1d6)]}:{},'resources':_0x29d5c7[_0x4bce57(0x1d0)]?JSON[_0x4bce57(0x1d2)](_0x29d5c7[_0x4bce57(0x1d0)]):undefined}},_0x308c60=await updateMenuRecord(_0x540e89,_0x3eca96,'Update\x20menu\x20assets\x20\x22'+_0x29d5c7[_0x4bce57(0x1e8)]+'\x22');return logger['info'](_0x4bce57(0x1de),_0x4bce57(0x1ca)+_0x29d5c7[_0x4bce57(0x1e8)],undefined),_0x308c60;}function a117_0x533f(_0x2676f0,_0x295b75){_0x2676f0=_0x2676f0-0x1c0;const _0x33dc45=a117_0x33dc();let _0x533f26=_0x33dc45[_0x2676f0];return _0x533f26;}export async function createMenuEntity(_0x20ed8e,_0x3b313a,_0xe8682a){const _0x730f32=a117_0x533f;return createMenuRecord({'appCode':_0x20ed8e,..._0xe8682a},_0x3b313a,_0x730f32(0x1e1)+_0xe8682a[_0x730f32(0x1e8)]+'\x22');}export async function updateMenuEntity(_0x33c2bf,_0x353ba8,_0x2fc40e){const _0x5b91ee=a117_0x533f;return updateMenuRecord({'appCode':_0x33c2bf,..._0x2fc40e},_0x353ba8,_0x5b91ee(0x1e9)+_0x2fc40e['id']);}export async function batchDeleteMenuEntities(_0x95010c,_0x52f766){const _0x3f665b=a117_0x533f;return batchDeleteMenuRecords(_0x52f766,_0x95010c,_0x3f665b(0x1c4)+_0x52f766['length']+_0x3f665b(0x1d7)+(_0x52f766[_0x3f665b(0x1d9)]===0x1?'':'s'));}export async function startMenuRegroup(_0x56be49,_0x5d0874){const _0x4b3365=a117_0x533f;return a117_0x370494(_0x5d0874,_0x56be49,'Regroup\x20'+_0x5d0874['menuGroups'][_0x4b3365(0x1d9)]+_0x4b3365(0x1e4));}
1
+ (function(_0x16e4f7,_0x446066){const _0x56bbf0=a117_0x1556,_0x566276=_0x16e4f7();while(!![]){try{const _0x4781dd=-parseInt(_0x56bbf0(0x164))/0x1*(-parseInt(_0x56bbf0(0x174))/0x2)+-parseInt(_0x56bbf0(0x15a))/0x3+parseInt(_0x56bbf0(0x176))/0x4+parseInt(_0x56bbf0(0x16e))/0x5*(-parseInt(_0x56bbf0(0x178))/0x6)+parseInt(_0x56bbf0(0x16d))/0x7*(-parseInt(_0x56bbf0(0x17d))/0x8)+-parseInt(_0x56bbf0(0x16b))/0x9+parseInt(_0x56bbf0(0x17f))/0xa;if(_0x4781dd===_0x446066)break;else _0x566276['push'](_0x566276['shift']());}catch(_0x1ee1b7){_0x566276['push'](_0x566276['shift']());}}}(a117_0x2689,0x9ccc6));import{getEnv,isProduction}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{fetchMenuSnapshot,toProcessedMenuItem}from'../../../commands/menu/shared/facts.js';import{batchDeleteMenuRecords,createMenuRecord,startMenuRegroup as a117_0x38aba0,updateMenuRecord}from'../../../core/api-client.js';function a117_0x2689(){const _0x82fbc7=['loadScriptMode','Updating\x20menu\x20asset\x20links:\x20','1197576rKWYpr','info','7BtaaBS','56615lCljdk','Update\x20menu\x20assets\x20\x22','resources','\x20menu\x20group(s)','procode','\x20menu','2LVYrlG','create-menu','1859908mwSPLu','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','402xZXMJU','Creating\x20menu:\x20','Menu\x20assets\x20synced:\x20','all','\x20online\x20menus\x20successfully','7590616MndvLs','menus','25813190eMBncL','Menu\x20created\x20successfully:\x20','create-menus','2222832iSybUT','get-online-menu-list','stringify','total','extend','map','menuGroups','update-menu-cdn-url','length','import','177426uTJhLt','Start\x20batch\x20menu\x20creation,\x20total\x20','path','label','Fetched\x20'];a117_0x2689=function(){return _0x82fbc7;};return a117_0x2689();}export async function getOnlineMenuList(_0x4554e2,_0x2cbf66){const _0x567ffc=a117_0x1556,_0x41f944=getEnv();logger[_0x567ffc(0x16c)](_0x567ffc(0x15b),isProduction(_0x41f944)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x4554e2+')':_0x567ffc(0x177)+_0x4554e2+')');const _0x45833c=await fetchMenuSnapshot(_0x4554e2,_0x2cbf66,{'verbose':!![]});return logger[_0x567ffc(0x16c)](_0x567ffc(0x15b),_0x567ffc(0x168)+_0x45833c[_0x567ffc(0x15d)]+_0x567ffc(0x17c)),_0x45833c[_0x567ffc(0x17e)][_0x567ffc(0x15f)](toProcessedMenuItem);}function a117_0x1556(_0x55e94b,_0x2e151d){_0x55e94b=_0x55e94b-0x158;const _0x2689ca=a117_0x2689();let _0x1556d5=_0x2689ca[_0x55e94b];return _0x1556d5;}export async function createMenu(_0x45d3e2,_0x142383,_0x5039a2){const _0x5e1648=a117_0x1556;logger[_0x5e1648(0x16c)]('create-menu',_0x5e1648(0x179)+_0x5039a2[_0x5e1648(0x167)]+'\x20('+_0x5039a2['path']+')');const _0x479aad={'appCode':_0x45d3e2,'type':_0x5e1648(0x172),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x5039a2['resources']?JSON[_0x5e1648(0x15c)](_0x5039a2[_0x5e1648(0x170)]):undefined},..._0x5039a2},_0xb2939c=await createMenuRecord(_0x479aad,_0x142383,'Create\x20menu\x20\x22'+_0x5039a2[_0x5e1648(0x167)]+'\x22');return logger['info'](_0x5e1648(0x175),_0x5e1648(0x158)+_0x5039a2[_0x5e1648(0x167)]),_0xb2939c;}async function createSingleMenu(_0x1d8704,_0x3b7c03,_0x158164,_0x14ece3){const _0x4adf4c=a117_0x1556,_0x37d608={'appCode':_0x1d8704,'type':_0x4adf4c(0x172),'sort':0x0,'extend':{'loadScriptMode':_0x4adf4c(0x163),'resources':_0x14ece3?JSON[_0x4adf4c(0x15c)](_0x14ece3):undefined},'label':_0x158164[_0x4adf4c(0x167)],'path':_0x158164['path']},_0x374342=await createMenuRecord(_0x37d608,_0x3b7c03,'Create\x20menu\x20\x22'+_0x158164[_0x4adf4c(0x167)]+'\x22');return logger[_0x4adf4c(0x16c)](_0x4adf4c(0x175),'Menu\x20created\x20successfully:\x20'+_0x158164['label']),_0x374342;}export async function createMenus(_0x498d47,_0x27ad95,_0x3114bc,_0x4e5849){const _0x3a0079=a117_0x1556;logger[_0x3a0079(0x16c)](_0x3a0079(0x159),_0x3a0079(0x165)+_0x3114bc[_0x3a0079(0x162)]);const _0x1668f3=await Promise[_0x3a0079(0x17b)](_0x3114bc[_0x3a0079(0x15f)](_0x4ecfd8=>createSingleMenu(_0x498d47,_0x27ad95,_0x4ecfd8,_0x4e5849)));return logger[_0x3a0079(0x16c)](_0x3a0079(0x159),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x3114bc[_0x3a0079(0x162)]),_0x1668f3;}export async function updateMenuCdnUrl(_0x1c2f44,_0x4b4592,_0x3c5b94){const _0x354446=a117_0x1556;logger['info']('update-menu-cdn-url',_0x354446(0x16a)+_0x3c5b94['label']+'\x20('+_0x3c5b94[_0x354446(0x166)]+')');const _0x50e899={'id':_0x3c5b94['id'],'appCode':_0x1c2f44,'extend':{..._0x3c5b94[_0x354446(0x15e)]??{},..._0x3c5b94[_0x354446(0x169)]?{'loadScriptMode':_0x3c5b94['loadScriptMode']}:{},'resources':_0x3c5b94['resources']?JSON['stringify'](_0x3c5b94[_0x354446(0x170)]):undefined}},_0x262a6b=await updateMenuRecord(_0x50e899,_0x4b4592,_0x354446(0x16f)+_0x3c5b94[_0x354446(0x167)]+'\x22');return logger[_0x354446(0x16c)](_0x354446(0x161),_0x354446(0x17a)+_0x3c5b94[_0x354446(0x167)],undefined),_0x262a6b;}export async function createMenuEntity(_0x53a99c,_0x6f5a70,_0x5639da){return createMenuRecord({'appCode':_0x53a99c,..._0x5639da},_0x6f5a70,'Create\x20menu\x20\x22'+_0x5639da['label']+'\x22');}export async function updateMenuEntity(_0x55b5f9,_0x13fc59,_0x44a0b5){return updateMenuRecord({'appCode':_0x55b5f9,..._0x44a0b5},_0x13fc59,'Update\x20menu\x20'+_0x44a0b5['id']);}export async function batchDeleteMenuEntities(_0x8bcda3,_0x4aff47){const _0x3d01f6=a117_0x1556;return batchDeleteMenuRecords(_0x4aff47,_0x8bcda3,'Delete\x20'+_0x4aff47[_0x3d01f6(0x162)]+_0x3d01f6(0x173)+(_0x4aff47[_0x3d01f6(0x162)]===0x1?'':'s'));}export async function startMenuRegroup(_0x6d1d1c,_0x157d58){const _0x2182a8=a117_0x1556;return a117_0x38aba0(_0x157d58,_0x6d1d1c,'Regroup\x20'+_0x157d58[_0x2182a8(0x160)][_0x2182a8(0x162)]+_0x2182a8(0x171));}
@@ -1 +1 @@
1
- const a118_0x2eae=a118_0x53f9;(function(_0x192203,_0x273900){const _0x50a171=a118_0x53f9,_0x4c21be=_0x192203();while(!![]){try{const _0x2330fc=-parseInt(_0x50a171(0x141))/0x1*(parseInt(_0x50a171(0x150))/0x2)+-parseInt(_0x50a171(0x140))/0x3+parseInt(_0x50a171(0x148))/0x4+-parseInt(_0x50a171(0x14a))/0x5+-parseInt(_0x50a171(0x161))/0x6+-parseInt(_0x50a171(0x142))/0x7+parseInt(_0x50a171(0x14f))/0x8;if(_0x2330fc===_0x273900)break;else _0x4c21be['push'](_0x4c21be['shift']());}catch(_0x4f9bc5){_0x4c21be['push'](_0x4c21be['shift']());}}}(a118_0x2207,0xb0a42));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a118_0x53f9(_0x67748e,_0x3b2405){_0x67748e=_0x67748e-0x13a;const _0x2207e4=a118_0x2207();let _0x53f9f6=_0x2207e4[_0x67748e];return _0x53f9f6;}const MENU_SYNC_PARAM_KEYS=new Set([a118_0x2eae(0x13a),a118_0x2eae(0x15e)]);function validateParams(_0x41a5d2){const _0x289906=a118_0x2eae,_0x478bd7=[];return _0x41a5d2[_0x289906(0x13a)]&&!isValidJsHttpsUrl(_0x41a5d2[_0x289906(0x13a)])&&_0x478bd7[_0x289906(0x145)]({'field':_0x289906(0x13a),'message':_0x289906(0x13b)}),_0x41a5d2[_0x289906(0x15e)]&&!isValidCssHttpsUrl(_0x41a5d2['cssUrl'])&&_0x478bd7[_0x289906(0x145)]({'field':'cssUrl','message':_0x289906(0x155)}),_0x478bd7;}export async function runMenuSyncCore(_0x4f68d0,_0x2ee7d6,_0x44f378=[],_0x239281,_0x5dc5ac={}){const _0xb6abb=a118_0x2eae,_0x24c0f5=parseMenuSyncParams(_0x239281),_0x102b63=[...new Set(_0x44f378['map'](_0x373e11=>_0x373e11[_0xb6abb(0x15f)]())['filter'](Boolean))],_0xd20bdb=_0x24c0f5[_0xb6abb(0x13a)],_0xa9ed11=_0x24c0f5[_0xb6abb(0x15e)],_0x40814b=[];if(_0xd20bdb)_0x40814b[_0xb6abb(0x145)](_0xd20bdb);if(_0xa9ed11)_0x40814b['push'](_0xa9ed11);const _0x50cc1c=validateParams(_0x24c0f5);if(_0x50cc1c[_0xb6abb(0x162)]>0x0){const _0x4f5419=_0x50cc1c['map'](_0x37d8e9=>'--params.'+_0x37d8e9['field']+':\x20'+_0x37d8e9[_0xb6abb(0x15b)])[_0xb6abb(0x156)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x4f5419);}logger[_0xb6abb(0x143)](process[_0xb6abb(0x15d)]()),logger[_0xb6abb(0x147)](_0xb6abb(0x14b),_0xb6abb(0x14c),{'appCode':_0x4f68d0,'selectedCount':_0x102b63['length'],'jsUrl':_0xd20bdb,'cssUrl':_0xa9ed11});if(_0xd20bdb){const _0x13f04c=await isUrlReachable(_0xd20bdb);if(!_0x13f04c)throw new Error(_0xb6abb(0x154)+_0xd20bdb);}if(_0xa9ed11){const _0x47bb7c=await isUrlReachable(_0xa9ed11);if(!_0x47bb7c)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0xa9ed11);}const _0x569621=getLocalPages();if(_0x569621[_0xb6abb(0x162)]===0x0){if(_0x102b63[_0xb6abb(0x162)]>0x0)throw new Error(_0xb6abb(0x146)+_0x102b63['join'](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x5dc5ac['dryRun']===!![],'targetPages':[],'plannedMenus':[]};}const _0x2c81ee=await getOnlineMenuList(_0x4f68d0,_0x2ee7d6),_0x19d781=new Set(_0x2c81ee[_0xb6abb(0x144)](_0x266fa3=>_0x266fa3[_0xb6abb(0x157)]));let _0x2e2677;if(_0x102b63[_0xb6abb(0x162)]>0x0){const _0x512bfc=new Map(_0x569621[_0xb6abb(0x144)](_0x3029d6=>[_0x3029d6[_0xb6abb(0x157)],_0x3029d6])),_0x1604a7=_0x102b63['filter'](_0x18e75e=>!_0x512bfc[_0xb6abb(0x13e)](_0x18e75e));if(_0x1604a7[_0xb6abb(0x162)]>0x0){const _0x873364=_0x569621['map'](_0x18e988=>_0x18e988['path'])[_0xb6abb(0x156)](',\x20');throw new Error(_0xb6abb(0x146)+_0x1604a7[_0xb6abb(0x156)](',\x20')+_0xb6abb(0x149)+_0x873364);}const _0x5e5942=_0x102b63[_0xb6abb(0x14d)](_0x1908bb=>_0x19d781[_0xb6abb(0x13e)](_0x1908bb));if(_0x5e5942[_0xb6abb(0x162)]>0x0)throw new Error('Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20'+_0x5e5942['join'](',\x20'));_0x2e2677=_0x102b63[_0xb6abb(0x144)](_0x11efa6=>_0x512bfc['get'](_0x11efa6));}else _0x2e2677=_0x569621[_0xb6abb(0x14d)](_0x5aef5f=>!_0x19d781[_0xb6abb(0x13e)](_0x5aef5f[_0xb6abb(0x157)]));if(_0x2e2677[_0xb6abb(0x162)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x5dc5ac['dryRun']===!![],'targetPages':[],'plannedMenus':[]};const _0x494864=_0x2e2677[_0xb6abb(0x144)](_0x399e57=>({'type':_0xb6abb(0x151),'path':_0x399e57[_0xb6abb(0x157)],'label':_0x399e57[_0xb6abb(0x160)],'loadScriptMode':_0xb6abb(0x158),'resources':[..._0x40814b]}));if(_0x5dc5ac['dryRun'])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x2e2677,'plannedMenus':_0x494864};const _0xd87f4=await createMenus(_0x4f68d0,_0x2ee7d6,_0x2e2677,_0x40814b[_0xb6abb(0x162)]>0x0?_0x40814b:undefined);return logger[_0xb6abb(0x147)](_0xb6abb(0x14b),_0xb6abb(0x13f),{'count':_0x2e2677[_0xb6abb(0x162)],'resources':_0x40814b}),{'created':_0xd87f4[_0xb6abb(0x162)],'skipped':![],'dryRun':![],'targetPages':_0x2e2677,'plannedMenus':_0x494864,'menus':_0xd87f4};}function a118_0x2207(){const _0x4fb295=['jsUrl','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','string','has','Menu\x20sync\x20completed','1667436zGIkAt','8117aEqRev','1211091zYBNna','setLogPath','map','push','No\x20local\x20pages\x20matched\x20paths:\x20','info','4545276jpBrRN','\x0a\x20\x20Available\x20local\x20paths:\x20','1624240nIxTfa','menu-sync','Start\x20non-interactive\x20menu\x20sync','filter','Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.','23700952FZxkFw','300ZTcpPN','procode','object','Invalid\x20--params.','JS\x20URL\x20is\x20unreachable:\x20','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','join','path','import','Invalid\x20--params\x20fields:\x20','Invalid\x20--params\x20JSON.','message','parse','cwd','cssUrl','trim','label','6625158BRRiTT','length'];a118_0x2207=function(){return _0x4fb295;};return a118_0x2207();}export function parseMenuSyncParams(_0x2baf31){const _0x26fa13=a118_0x2eae;if(!_0x2baf31||typeof _0x2baf31!=='string')return{};let _0x3dbe9c;try{_0x3dbe9c=JSON[_0x26fa13(0x15c)](_0x2baf31);}catch{throw new Error(_0x26fa13(0x15a));}if(typeof _0x3dbe9c!==_0x26fa13(0x152)||_0x3dbe9c===null||Array['isArray'](_0x3dbe9c))throw new Error(_0x26fa13(0x14e));const _0x406240=_0x3dbe9c;if(Object['hasOwn'](_0x406240,'pages'))throw new Error(_0x26fa13(0x13c));const _0x1750b9=Object['keys'](_0x406240)[_0x26fa13(0x14d)](_0x2ea994=>!MENU_SYNC_PARAM_KEYS['has'](_0x2ea994));if(_0x1750b9[_0x26fa13(0x162)]>0x0)throw new Error(_0x26fa13(0x159)+_0x1750b9['join'](',\x20')+'.');for(const _0xc9b869 of MENU_SYNC_PARAM_KEYS){const _0x16efb9=_0x406240[_0xc9b869];if(_0x16efb9!==undefined&&(typeof _0x16efb9!==_0x26fa13(0x13d)||_0x16efb9[_0x26fa13(0x15f)]()===''))throw new Error(_0x26fa13(0x153)+_0xc9b869+':\x20expected\x20a\x20non-empty\x20string.');}return{'jsUrl':typeof _0x406240[_0x26fa13(0x13a)]==='string'?_0x406240[_0x26fa13(0x13a)][_0x26fa13(0x15f)]():undefined,'cssUrl':typeof _0x406240['cssUrl']==='string'?_0x406240[_0x26fa13(0x15e)]['trim']():undefined};}
1
+ const a118_0x203f02=a118_0x2df2;(function(_0x15267e,_0xeffd2a){const _0x57200a=a118_0x2df2,_0x4005bb=_0x15267e();while(!![]){try{const _0x2ec06f=parseInt(_0x57200a(0x17a))/0x1+parseInt(_0x57200a(0x187))/0x2+parseInt(_0x57200a(0x164))/0x3+-parseInt(_0x57200a(0x185))/0x4*(-parseInt(_0x57200a(0x15f))/0x5)+parseInt(_0x57200a(0x18c))/0x6*(parseInt(_0x57200a(0x17b))/0x7)+-parseInt(_0x57200a(0x181))/0x8+-parseInt(_0x57200a(0x167))/0x9;if(_0x2ec06f===_0xeffd2a)break;else _0x4005bb['push'](_0x4005bb['shift']());}catch(_0x2f694a){_0x4005bb['push'](_0x4005bb['shift']());}}}(a118_0x2ec9,0x307f3));import{getLocalPages}from'../../../commands/menu/shared/local-pages.js';function a118_0x2ec9(){const _0x16d651=['Invalid\x20--params\x20fields:\x20','2954240pjxhlY','label','length','path','16IqNCNP','isArray','746262pTcWUH','Invalid\x20--params:\x20','has','info','push','18QWlHLj','--params.pages\x20is\x20no\x20longer\x20supported.\x20Use\x20--paths\x20with\x20exact\x20local\x20page\x20paths.','204015rFEcIS','--params.','get','import','Invalid\x20--params.','646107mVrhPC','join','field','5931117sZBomK','No\x20local\x20pages\x20matched\x20paths:\x20','hasOwn','JS\x20URL\x20is\x20unreachable:\x20','jsUrl','trim','dryRun','filter','Local\x20page\x20paths\x20are\x20already\x20on\x20the\x20platform:\x20','cwd','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','string','menu-sync','cssUrl','parse','Invalid\x20--params\x20JSON.','object','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','pages','265773mIGqsf','488719jXzFPp','map','Menu\x20sync\x20completed','procode',':\x20expected\x20a\x20non-empty\x20string.'];a118_0x2ec9=function(){return _0x16d651;};return a118_0x2ec9();}import{getOnlineMenuList,createMenus}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function a118_0x2df2(_0x4bc007,_0x24fdc1){_0x4bc007=_0x4bc007-0x15f;const _0x2ec957=a118_0x2ec9();let _0x2df28e=_0x2ec957[_0x4bc007];return _0x2df28e;}const MENU_SYNC_PARAM_KEYS=new Set([a118_0x203f02(0x16b),a118_0x203f02(0x174)]);function validateParams(_0x26227f){const _0x1e57a2=a118_0x203f02,_0x25f071=[];return _0x26227f['jsUrl']&&!isValidJsHttpsUrl(_0x26227f[_0x1e57a2(0x16b)])&&_0x25f071[_0x1e57a2(0x18b)]({'field':_0x1e57a2(0x16b),'message':_0x1e57a2(0x178)}),_0x26227f[_0x1e57a2(0x174)]&&!isValidCssHttpsUrl(_0x26227f[_0x1e57a2(0x174)])&&_0x25f071[_0x1e57a2(0x18b)]({'field':_0x1e57a2(0x174),'message':_0x1e57a2(0x171)}),_0x25f071;}export async function runMenuSyncCore(_0xed5897,_0x598f97,_0x32f6f5=[],_0x4947e4,_0x21684b={}){const _0x26e37c=a118_0x203f02,_0x30c0c=parseMenuSyncParams(_0x4947e4),_0x542c90=[...new Set(_0x32f6f5[_0x26e37c(0x17c)](_0x4b6952=>_0x4b6952[_0x26e37c(0x16c)]())[_0x26e37c(0x16e)](Boolean))],_0x1098b0=_0x30c0c[_0x26e37c(0x16b)],_0x23ba01=_0x30c0c['cssUrl'],_0x48d6e6=[];if(_0x1098b0)_0x48d6e6[_0x26e37c(0x18b)](_0x1098b0);if(_0x23ba01)_0x48d6e6[_0x26e37c(0x18b)](_0x23ba01);const _0x4d1b9a=validateParams(_0x30c0c);if(_0x4d1b9a[_0x26e37c(0x183)]>0x0){const _0x55b9f6=_0x4d1b9a[_0x26e37c(0x17c)](_0x1f1ce2=>_0x26e37c(0x160)+_0x1f1ce2[_0x26e37c(0x166)]+':\x20'+_0x1f1ce2['message'])[_0x26e37c(0x165)](';\x20');throw new Error(_0x26e37c(0x188)+_0x55b9f6);}logger['setLogPath'](process[_0x26e37c(0x170)]()),logger[_0x26e37c(0x18a)](_0x26e37c(0x173),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0xed5897,'selectedCount':_0x542c90['length'],'jsUrl':_0x1098b0,'cssUrl':_0x23ba01});if(_0x1098b0){const _0x32bc25=await isUrlReachable(_0x1098b0);if(!_0x32bc25)throw new Error(_0x26e37c(0x16a)+_0x1098b0);}if(_0x23ba01){const _0x1cbbbf=await isUrlReachable(_0x23ba01);if(!_0x1cbbbf)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x23ba01);}const _0x19e069=getLocalPages();if(_0x19e069[_0x26e37c(0x183)]===0x0){if(_0x542c90[_0x26e37c(0x183)]>0x0)throw new Error(_0x26e37c(0x168)+_0x542c90[_0x26e37c(0x165)](',\x20'));return{'created':0x0,'skipped':!![],'dryRun':_0x21684b[_0x26e37c(0x16d)]===!![],'targetPages':[],'plannedMenus':[]};}const _0x22f41a=await getOnlineMenuList(_0xed5897,_0x598f97),_0x307ff9=new Set(_0x22f41a[_0x26e37c(0x17c)](_0x1dd515=>_0x1dd515[_0x26e37c(0x184)]));let _0x1f0446;if(_0x542c90[_0x26e37c(0x183)]>0x0){const _0x31f522=new Map(_0x19e069['map'](_0x54b2b0=>[_0x54b2b0[_0x26e37c(0x184)],_0x54b2b0])),_0x174284=_0x542c90[_0x26e37c(0x16e)](_0x3a3a57=>!_0x31f522[_0x26e37c(0x189)](_0x3a3a57));if(_0x174284[_0x26e37c(0x183)]>0x0){const _0x39bd8b=_0x19e069[_0x26e37c(0x17c)](_0x47f08c=>_0x47f08c[_0x26e37c(0x184)])[_0x26e37c(0x165)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20paths:\x20'+_0x174284[_0x26e37c(0x165)](',\x20')+'\x0a\x20\x20Available\x20local\x20paths:\x20'+_0x39bd8b);}const _0x574642=_0x542c90['filter'](_0x4efe01=>_0x307ff9['has'](_0x4efe01));if(_0x574642[_0x26e37c(0x183)]>0x0)throw new Error(_0x26e37c(0x16f)+_0x574642[_0x26e37c(0x165)](',\x20'));_0x1f0446=_0x542c90['map'](_0x35b6c5=>_0x31f522[_0x26e37c(0x161)](_0x35b6c5));}else _0x1f0446=_0x19e069['filter'](_0x82c792=>!_0x307ff9['has'](_0x82c792[_0x26e37c(0x184)]));if(_0x1f0446[_0x26e37c(0x183)]===0x0)return{'created':0x0,'skipped':!![],'dryRun':_0x21684b[_0x26e37c(0x16d)]===!![],'targetPages':[],'plannedMenus':[]};const _0x1258c7=_0x1f0446['map'](_0x52ec20=>({'type':_0x26e37c(0x17e),'path':_0x52ec20[_0x26e37c(0x184)],'label':_0x52ec20[_0x26e37c(0x182)],'loadScriptMode':_0x26e37c(0x162),'resources':[..._0x48d6e6]}));if(_0x21684b[_0x26e37c(0x16d)])return{'created':0x0,'skipped':![],'dryRun':!![],'targetPages':_0x1f0446,'plannedMenus':_0x1258c7};const _0x1fd10e=await createMenus(_0xed5897,_0x598f97,_0x1f0446,_0x48d6e6[_0x26e37c(0x183)]>0x0?_0x48d6e6:undefined);return logger['info'](_0x26e37c(0x173),_0x26e37c(0x17d),{'count':_0x1f0446['length'],'resources':_0x48d6e6}),{'created':_0x1fd10e['length'],'skipped':![],'dryRun':![],'targetPages':_0x1f0446,'plannedMenus':_0x1258c7,'menus':_0x1fd10e};}export function parseMenuSyncParams(_0x1a41c3){const _0x14b1c6=a118_0x203f02;if(!_0x1a41c3||typeof _0x1a41c3!=='string')return{};let _0x35f872;try{_0x35f872=JSON[_0x14b1c6(0x175)](_0x1a41c3);}catch{throw new Error(_0x14b1c6(0x176));}if(typeof _0x35f872!==_0x14b1c6(0x177)||_0x35f872===null||Array[_0x14b1c6(0x186)](_0x35f872))throw new Error('Invalid\x20--params:\x20expected\x20a\x20JSON\x20object.');const _0x157603=_0x35f872;if(Object[_0x14b1c6(0x169)](_0x157603,_0x14b1c6(0x179)))throw new Error(_0x14b1c6(0x18d));const _0x4db43e=Object['keys'](_0x157603)[_0x14b1c6(0x16e)](_0x1c57c4=>!MENU_SYNC_PARAM_KEYS[_0x14b1c6(0x189)](_0x1c57c4));if(_0x4db43e['length']>0x0)throw new Error(_0x14b1c6(0x180)+_0x4db43e['join'](',\x20')+'.');for(const _0xa0cf76 of MENU_SYNC_PARAM_KEYS){const _0x413243=_0x157603[_0xa0cf76];if(_0x413243!==undefined&&(typeof _0x413243!==_0x14b1c6(0x172)||_0x413243[_0x14b1c6(0x16c)]()===''))throw new Error(_0x14b1c6(0x163)+_0xa0cf76+_0x14b1c6(0x17f));}return{'jsUrl':typeof _0x157603[_0x14b1c6(0x16b)]===_0x14b1c6(0x172)?_0x157603[_0x14b1c6(0x16b)]['trim']():undefined,'cssUrl':typeof _0x157603[_0x14b1c6(0x174)]===_0x14b1c6(0x172)?_0x157603[_0x14b1c6(0x174)][_0x14b1c6(0x16c)]():undefined};}
@@ -1 +1 @@
1
- (function(_0x5abed8,_0x413fb6){const _0x47a5e5=a120_0x5345,_0x4d56bf=_0x5abed8();while(!![]){try{const _0x6cf8fd=parseInt(_0x47a5e5(0x1e3))/0x1*(parseInt(_0x47a5e5(0x1c5))/0x2)+parseInt(_0x47a5e5(0x1c3))/0x3*(parseInt(_0x47a5e5(0x1f9))/0x4)+parseInt(_0x47a5e5(0x1d9))/0x5+-parseInt(_0x47a5e5(0x1fa))/0x6+parseInt(_0x47a5e5(0x1ce))/0x7*(parseInt(_0x47a5e5(0x1ea))/0x8)+-parseInt(_0x47a5e5(0x1f6))/0x9*(-parseInt(_0x47a5e5(0x1e7))/0xa)+parseInt(_0x47a5e5(0x1c0))/0xb*(-parseInt(_0x47a5e5(0x1ec))/0xc);if(_0x6cf8fd===_0x413fb6)break;else _0x4d56bf['push'](_0x4d56bf['shift']());}catch(_0x2b5089){_0x4d56bf['push'](_0x4d56bf['shift']());}}}(a120_0x5874,0x2dceb));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x10cd05){const _0x40ebc9=a120_0x5345,_0x1792a1=[];return _0x10cd05['jsUrl']&&!isValidJsHttpsUrl(_0x10cd05['jsUrl'])&&_0x1792a1[_0x40ebc9(0x1c1)]({'field':_0x40ebc9(0x1fc),'message':_0x40ebc9(0x1d7)}),_0x10cd05[_0x40ebc9(0x1e8)]&&!isValidCssHttpsUrl(_0x10cd05['cssUrl'])&&_0x1792a1[_0x40ebc9(0x1c1)]({'field':'cssUrl','message':_0x40ebc9(0x1fd)}),_0x1792a1;}export async function runMenuUpdateCore(_0x57fe02,_0x2afa49,_0x11121f,_0x1330b5={}){const _0x310b79=a120_0x5345,_0x2ffc39=parseUpdateParamsFlag(_0x11121f),_0x3609a7=normalizeMode(_0x1330b5[_0x310b79(0x1f1)]);validateSelection(_0x1330b5[_0x310b79(0x1c4)]);const _0x15e0e0=[];if(_0x2ffc39[_0x310b79(0x1fc)])_0x15e0e0['push'](_0x2ffc39['jsUrl']);if(_0x2ffc39['cssUrl'])_0x15e0e0[_0x310b79(0x1c1)](_0x2ffc39[_0x310b79(0x1e8)]);const _0x4ed667=validateParams(_0x2ffc39);if(_0x4ed667[_0x310b79(0x1fe)]>0x0){const _0x63ecc7=_0x4ed667[_0x310b79(0x1bf)](_0x30ad0c=>_0x310b79(0x1fb)+_0x30ad0c[_0x310b79(0x1f3)]+':\x20'+_0x30ad0c['message'])[_0x310b79(0x1c6)](';\x20');throw new Error(_0x310b79(0x1c8)+_0x63ecc7);}if(_0x15e0e0['length']===0x0)throw new Error(_0x310b79(0x1e6)+_0x310b79(0x1e0));logger[_0x310b79(0x1ed)](process['cwd']()),logger[_0x310b79(0x1bd)](_0x310b79(0x1dd),_0x310b79(0x1d4),{'appCode':_0x57fe02,'jsUrl':_0x2ffc39[_0x310b79(0x1fc)],'cssUrl':_0x2ffc39[_0x310b79(0x1e8)],'mode':_0x3609a7,'dryRun':_0x1330b5['dryRun']===!![]});if(_0x2ffc39[_0x310b79(0x1fc)]){const _0x58c2c3=await isUrlReachable(_0x2ffc39[_0x310b79(0x1fc)]);if(!_0x58c2c3)throw new Error(_0x310b79(0x1cb)+_0x2ffc39['jsUrl']);}if(_0x2ffc39[_0x310b79(0x1e8)]){const _0x3023f6=await isUrlReachable(_0x2ffc39[_0x310b79(0x1e8)]);if(!_0x3023f6)throw new Error(_0x310b79(0x1e1)+_0x2ffc39[_0x310b79(0x1e8)]);}const _0xb485ff=await getOnlineMenuList(_0x57fe02,_0x2afa49),_0x2c04f1=_0xb485ff[_0x310b79(0x1de)](_0x3a780d=>_0x3a780d[_0x310b79(0x1e4)]['length']>0x0),_0x1409a3=selectMenusForUpdate(_0x2c04f1,_0x1330b5[_0x310b79(0x1c4)]);if(_0x1409a3[_0x310b79(0x1fe)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x1330b5[_0x310b79(0x1c2)]===!![]};const _0x43075d=_0x1409a3['map'](_0x36df24=>buildMenuUpdateDiff(_0x36df24,_0x2ffc39,_0x3609a7,_0x1330b5['force']===!![],_0x1330b5[_0x310b79(0x1da)]));if(_0x1330b5['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x43075d};const _0x218a87=await Promise[_0x310b79(0x1e9)](_0x1409a3['map']((_0x4f7958,_0xca7c55)=>updateMenuCdnUrl(_0x57fe02,_0x2afa49,{'id':_0x4f7958['id'],'label':_0x4f7958[_0x310b79(0x1d2)],'path':_0x4f7958['path'],'resources':_0x43075d[_0xca7c55][_0x310b79(0x1f2)][_0x310b79(0x1e4)],'extend':_0x4f7958[_0x310b79(0x1be)]??null,'loadScriptMode':_0x1330b5['loadScriptMode']}))),_0x4bc78c=_0x218a87[_0x310b79(0x1de)](_0x491c88=>_0x491c88[_0x310b79(0x1bc)]===_0x310b79(0x1f0))[_0x310b79(0x1bf)](_0x1868b7=>_0x1868b7['value']),_0x39a7bb=_0x218a87[_0x310b79(0x1de)](_0x5e0aea=>_0x5e0aea[_0x310b79(0x1bc)]==='rejected')['length'];return logger['info'](_0x310b79(0x1dd),_0x310b79(0x1df),{'count':_0x1409a3['length'],'resources':_0x15e0e0}),{'updated':_0x4bc78c[_0x310b79(0x1fe)],'failed':_0x39a7bb,'skipped':![],'menus':_0x4bc78c};}function validateSelection(_0x5b34e1){const _0x560543=a120_0x5345;if(!_0x5b34e1)throw new Error('menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');if(_0x5b34e1[_0x560543(0x1d8)]&&(_0x5b34e1['menuIds'][_0x560543(0x1fe)]>0x0||_0x5b34e1[_0x560543(0x1ee)][_0x560543(0x1fe)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x5b34e1[_0x560543(0x1d8)]&&_0x5b34e1[_0x560543(0x1f7)]['length']===0x0&&_0x5b34e1[_0x560543(0x1ee)]['length']===0x0)throw new Error(_0x560543(0x1d3));}export function selectMenusForUpdate(_0x4a7410,_0x2d981e){const _0x412abb=a120_0x5345;validateSelection(_0x2d981e);if(_0x2d981e[_0x412abb(0x1d8)])return _0x4a7410;const _0x1bc777=new Set(_0x4a7410[_0x412abb(0x1bf)](_0x454792=>_0x454792['id'])),_0x161c71=new Set(_0x4a7410[_0x412abb(0x1bf)](_0x506b96=>_0x506b96['path'])),_0x5b2e8d=_0x2d981e[_0x412abb(0x1f7)][_0x412abb(0x1de)](_0x18cb60=>!_0x1bc777[_0x412abb(0x1dc)](_0x18cb60)),_0x1402ad=_0x2d981e['paths'][_0x412abb(0x1de)](_0x46c08f=>!_0x161c71[_0x412abb(0x1dc)](_0x46c08f));if(_0x5b2e8d[_0x412abb(0x1fe)]>0x0||_0x1402ad['length']>0x0){const _0x33b610=[..._0x5b2e8d[_0x412abb(0x1bf)](_0x1e4ba5=>String(_0x1e4ba5)),..._0x1402ad][_0x412abb(0x1c6)](',\x20');throw new Error(_0x412abb(0x1e5)+_0x33b610);}const _0x3d51d2=new Set(_0x2d981e[_0x412abb(0x1f7)]),_0x209eec=new Set(_0x2d981e[_0x412abb(0x1ee)]);return _0x4a7410[_0x412abb(0x1de)](_0x4fde1b=>_0x3d51d2[_0x412abb(0x1dc)](_0x4fde1b['id'])||_0x209eec[_0x412abb(0x1dc)](_0x4fde1b[_0x412abb(0x1ef)]));}function normalizeMode(_0x1733bd){const _0x5e48ed=a120_0x5345;if(!_0x1733bd)return'patch';if(_0x1733bd==='replace'||_0x1733bd==='patch')return _0x1733bd;throw new Error(_0x5e48ed(0x1c7)+_0x1733bd+_0x5e48ed(0x1e2));}function a120_0x5874(){const _0x30c2da=['Menu\x20update\x20completed','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','CSS\x20URL\x20is\x20unreachable:\x20','.\x20Allowed\x20values:\x20replace,\x20patch','477tSTmET','resources','menu\x20update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','290JljOjP','cssUrl','allSettled','96OOJehg','isArray','156EcLRWw','setLogPath','paths','path','fulfilled','mode','after','field','with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','28449WdTFhS','menuIds','toLowerCase','64748ckSCCR','2165310jxXEWJ','--params.','jsUrl','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','length','some','endsWith','.css','menu\x20update\x20cannot\x20patch\x20','status','info','extend','map','400004OFJNhK','push','dryRun','39tFGjbw','selection','236SdlGKl','join','Invalid\x20--mode:\x20','Invalid\x20--params:\x20','string','trim','JS\x20URL\x20is\x20unreachable:\x20','\x20existing\x20CSS\x20resources\x20for\x20\x22','\x22\x20(','203175aElJph','parse','unshift','.js','label','menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','Start\x20non-interactive\x20menu\x20update','patch','object','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','all','1572790hDxHNJ','loadScriptMode','\x20existing\x20JS\x20resources\x20for\x20\x22','has','menu-update','filter'];a120_0x5874=function(){return _0x30c2da;};return a120_0x5874();}function buildMenuUpdateDiff(_0x444c77,_0x38d7d6,_0x22decb,_0x46702d,_0x366940){const _0x4a311f=a120_0x5345,_0xea77d5=[..._0x444c77['resources']];_0x22decb===_0x4a311f(0x1d5)&&assertUnambiguousPatchResources(_0x444c77,_0xea77d5,_0x38d7d6);const _0x5a7ff0=_0x22decb===_0x4a311f(0x1d5)?patchResources(_0xea77d5,_0x38d7d6):replaceResources(_0x38d7d6),_0x55d405=[],_0x690f33=_0xea77d5[_0x4a311f(0x1ff)](isJsResource),_0x4ef8e7=_0x5a7ff0[_0x4a311f(0x1ff)](isJsResource);if(_0x690f33&&!_0x4ef8e7){const _0x3633ce='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x444c77[_0x4a311f(0x1d2)]+_0x4a311f(0x1cd)+_0x444c77['path']+').\x20'+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x46702d)throw new Error(_0x3633ce);_0x55d405[_0x4a311f(0x1c1)](_0x3633ce);}const _0x2c0cff=_0xea77d5['some'](isCssResource),_0x1ef93c=_0x5a7ff0[_0x4a311f(0x1ff)](isCssResource);_0x2c0cff&&!_0x1ef93c&&_0x55d405[_0x4a311f(0x1c1)]('menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22'+_0x444c77[_0x4a311f(0x1d2)]+_0x4a311f(0x1cd)+_0x444c77[_0x4a311f(0x1ef)]+').');const _0x590008=typeof _0x444c77[_0x4a311f(0x1be)]?.[_0x4a311f(0x1da)]===_0x4a311f(0x1c9)?_0x444c77['extend']['loadScriptMode']:null,_0x3d62ca=_0x366940?{'loadScriptMode':_0x590008}:{},_0x4bf561=_0x366940?{'loadScriptMode':_0x366940}:{};return{'id':_0x444c77['id'],'label':_0x444c77[_0x4a311f(0x1d2)],'path':_0x444c77['path'],'mode':_0x22decb,'before':{'resources':_0xea77d5,..._0x3d62ca},'after':{'resources':_0x5a7ff0,..._0x4bf561},'warnings':_0x55d405};}function replaceResources(_0x29da6f){const _0x113be9=a120_0x5345;return[_0x29da6f[_0x113be9(0x1fc)],_0x29da6f[_0x113be9(0x1e8)]][_0x113be9(0x1de)](_0xe1775b=>!!_0xe1775b);}function assertUnambiguousPatchResources(_0x2c6c47,_0x270b02,_0x2313eb){const _0x1a2aa1=a120_0x5345,_0x13f547=_0x270b02[_0x1a2aa1(0x1de)](isJsResource)['length'];if(_0x2313eb[_0x1a2aa1(0x1fc)]&&_0x13f547>0x1)throw new Error(_0x1a2aa1(0x1bb)+_0x13f547+_0x1a2aa1(0x1db)+_0x2c6c47[_0x1a2aa1(0x1d2)]+_0x1a2aa1(0x1cd)+_0x2c6c47[_0x1a2aa1(0x1ef)]+')\x20'+_0x1a2aa1(0x1f5));const _0x282456=_0x270b02[_0x1a2aa1(0x1de)](isCssResource)['length'];if(_0x2313eb[_0x1a2aa1(0x1e8)]&&_0x282456>0x1)throw new Error(_0x1a2aa1(0x1bb)+_0x282456+_0x1a2aa1(0x1cc)+_0x2c6c47['label']+'\x22\x20('+_0x2c6c47[_0x1a2aa1(0x1ef)]+')\x20'+_0x1a2aa1(0x1f4));}function patchResources(_0x4114fc,_0x53cc47){const _0x5157b6=a120_0x5345;let _0x7cbc16=![],_0x2c0568=![];const _0x289060=[];for(const _0x2308f6 of _0x4114fc){if(isJsResource(_0x2308f6)){if(_0x53cc47[_0x5157b6(0x1fc)]&&!_0x7cbc16)_0x289060[_0x5157b6(0x1c1)](_0x53cc47[_0x5157b6(0x1fc)]),_0x7cbc16=!![];else!_0x53cc47[_0x5157b6(0x1fc)]&&_0x289060['push'](_0x2308f6);continue;}if(isCssResource(_0x2308f6)){if(_0x53cc47['cssUrl']&&!_0x2c0568)_0x289060[_0x5157b6(0x1c1)](_0x53cc47[_0x5157b6(0x1e8)]),_0x2c0568=!![];else!_0x53cc47['cssUrl']&&_0x289060[_0x5157b6(0x1c1)](_0x2308f6);continue;}_0x289060[_0x5157b6(0x1c1)](_0x2308f6);}return _0x53cc47['jsUrl']&&!_0x7cbc16&&_0x289060[_0x5157b6(0x1d0)](_0x53cc47[_0x5157b6(0x1fc)]),_0x53cc47[_0x5157b6(0x1e8)]&&!_0x2c0568&&_0x289060[_0x5157b6(0x1c1)](_0x53cc47[_0x5157b6(0x1e8)]),_0x289060;}function a120_0x5345(_0x590230,_0x3f7df1){_0x590230=_0x590230-0x1ba;const _0x58746a=a120_0x5874();let _0x534559=_0x58746a[_0x590230];return _0x534559;}function isJsResource(_0x5b8830){const _0x584b33=a120_0x5345;return stripQuery(_0x5b8830)[_0x584b33(0x1f8)]()[_0x584b33(0x200)](_0x584b33(0x1d1));}function isCssResource(_0x487b20){const _0x1b4a99=a120_0x5345;return stripQuery(_0x487b20)[_0x1b4a99(0x1f8)]()[_0x1b4a99(0x200)](_0x1b4a99(0x1ba));}function stripQuery(_0x461dd2){return _0x461dd2['split']('?')[0x0]??_0x461dd2;}function parseUpdateParamsFlag(_0x2d35d3){const _0x5b83bb=a120_0x5345;if(!_0x2d35d3||typeof _0x2d35d3!==_0x5b83bb(0x1c9))return{};try{const _0x504033=JSON[_0x5b83bb(0x1cf)](_0x2d35d3);if(typeof _0x504033!==_0x5b83bb(0x1d6)||_0x504033===null||Array[_0x5b83bb(0x1eb)](_0x504033))return{};return{'jsUrl':typeof _0x504033['jsUrl']===_0x5b83bb(0x1c9)?_0x504033[_0x5b83bb(0x1fc)][_0x5b83bb(0x1ca)]():undefined,'cssUrl':typeof _0x504033[_0x5b83bb(0x1e8)]===_0x5b83bb(0x1c9)?_0x504033['cssUrl'][_0x5b83bb(0x1ca)]():undefined};}catch{return{};}}
1
+ (function(_0x357da0,_0x3557d7){const _0x3455b1=a120_0x4de1,_0x14eb09=_0x357da0();while(!![]){try{const _0x58c0be=-parseInt(_0x3455b1(0x132))/0x1+-parseInt(_0x3455b1(0x108))/0x2*(-parseInt(_0x3455b1(0x114))/0x3)+parseInt(_0x3455b1(0x11e))/0x4+parseInt(_0x3455b1(0x112))/0x5+-parseInt(_0x3455b1(0x12d))/0x6*(-parseInt(_0x3455b1(0x113))/0x7)+-parseInt(_0x3455b1(0xf7))/0x8+-parseInt(_0x3455b1(0x117))/0x9;if(_0x58c0be===_0x3557d7)break;else _0x14eb09['push'](_0x14eb09['shift']());}catch(_0x347ad0){_0x14eb09['push'](_0x14eb09['shift']());}}}(a120_0x2ee3,0xbfa81));import{updateMenuCdnUrl,getOnlineMenuList}from'../../../commands/menu/shared/service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../../../commands/menu/shared/valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x142146){const _0x4ad356=a120_0x4de1,_0x3b62c5=[];return _0x142146['jsUrl']&&!isValidJsHttpsUrl(_0x142146[_0x4ad356(0x12e)])&&_0x3b62c5[_0x4ad356(0x123)]({'field':_0x4ad356(0x12e),'message':_0x4ad356(0x104)}),_0x142146[_0x4ad356(0x10e)]&&!isValidCssHttpsUrl(_0x142146[_0x4ad356(0x10e)])&&_0x3b62c5[_0x4ad356(0x123)]({'field':_0x4ad356(0x10e),'message':_0x4ad356(0xf3)}),_0x3b62c5;}function a120_0x2ee3(){const _0x4a7a88=['with\x20a\x20single\x20cssUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','endsWith','\x20existing\x20JS\x20resources\x20for\x20\x22','push','paths','isArray','with\x20a\x20single\x20jsUrl.\x20Review\x20a\x20dry-run\x20and\x20use\x20--mode\x20replace\x20only\x20when\x20intentionally\x20rewriting\x20the\x20complete\x20resource\x20set.','mode','status','string','selection','menu-update','extend','258RkumaO','jsUrl','toLowerCase','\x20existing\x20CSS\x20resources\x20for\x20\x22','message','216277yDnaIx','value','object','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','Invalid\x20--params:\x20menu\x20update\x20requires\x20at\x20least\x20one\x20explicit\x20JS/CSS\x20URL.\x20','loadScriptMode',').\x20','4122776thGNip','replace','menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.','JS\x20URL\x20is\x20unreachable:\x20','trim','map','menu\x20update\x20will\x20remove\x20existing\x20CSS\x20resource\x20for\x20\x22','.js','allSettled','info','patch','all','menu\x20update\x20cannot\x20patch\x20','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Pass\x20--params\x20\x27{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}\x27\x20to\x20update\x20assets.','unshift','label','332030HYNDDO','join','fulfilled','length','.\x20Allowed\x20values:\x20replace,\x20patch','some','cssUrl','menuIds','Invalid\x20--mode:\x20','resources','1390085ppaGIX','4991LgccFx','21UFzoHn','filter','parse','6562251ubNVwH','cwd','path','--params.','setLogPath','Start\x20non-interactive\x20menu\x20update','dryRun','3100028ClWwxX','\x22\x20('];a120_0x2ee3=function(){return _0x4a7a88;};return a120_0x2ee3();}export async function runMenuUpdateCore(_0x3f7371,_0x596717,_0x42b71b,_0x226931={}){const _0xfb0ef7=a120_0x4de1,_0x31c31d=parseUpdateParamsFlag(_0x42b71b),_0x3333fc=normalizeMode(_0x226931[_0xfb0ef7(0x127)]);validateSelection(_0x226931[_0xfb0ef7(0x12a)]);const _0x5dd467=[];if(_0x31c31d[_0xfb0ef7(0x12e)])_0x5dd467[_0xfb0ef7(0x123)](_0x31c31d[_0xfb0ef7(0x12e)]);if(_0x31c31d['cssUrl'])_0x5dd467[_0xfb0ef7(0x123)](_0x31c31d[_0xfb0ef7(0x10e)]);const _0x2104a7=validateParams(_0x31c31d);if(_0x2104a7[_0xfb0ef7(0x10b)]>0x0){const _0x4b0020=_0x2104a7[_0xfb0ef7(0xfc)](_0x5521ee=>_0xfb0ef7(0x11a)+_0x5521ee['field']+':\x20'+_0x5521ee[_0xfb0ef7(0x131)])[_0xfb0ef7(0x109)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x4b0020);}if(_0x5dd467[_0xfb0ef7(0x10b)]===0x0)throw new Error(_0xfb0ef7(0xf4)+_0xfb0ef7(0x105));logger[_0xfb0ef7(0x11b)](process[_0xfb0ef7(0x118)]()),logger[_0xfb0ef7(0x100)](_0xfb0ef7(0x12b),_0xfb0ef7(0x11c),{'appCode':_0x3f7371,'jsUrl':_0x31c31d['jsUrl'],'cssUrl':_0x31c31d['cssUrl'],'mode':_0x3333fc,'dryRun':_0x226931[_0xfb0ef7(0x11d)]===!![]});if(_0x31c31d[_0xfb0ef7(0x12e)]){const _0x41359b=await isUrlReachable(_0x31c31d[_0xfb0ef7(0x12e)]);if(!_0x41359b)throw new Error(_0xfb0ef7(0xfa)+_0x31c31d[_0xfb0ef7(0x12e)]);}if(_0x31c31d[_0xfb0ef7(0x10e)]){const _0x350f44=await isUrlReachable(_0x31c31d[_0xfb0ef7(0x10e)]);if(!_0x350f44)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x31c31d[_0xfb0ef7(0x10e)]);}const _0x1add2d=await getOnlineMenuList(_0x3f7371,_0x596717),_0x4754b6=_0x1add2d[_0xfb0ef7(0x115)](_0x39c1bd=>_0x39c1bd[_0xfb0ef7(0x111)]['length']>0x0),_0x4a143a=selectMenusForUpdate(_0x4754b6,_0x226931['selection']);if(_0x4a143a[_0xfb0ef7(0x10b)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![],'dryRun':_0x226931['dryRun']===!![]};const _0x3eb5a8=_0x4a143a[_0xfb0ef7(0xfc)](_0x2456c1=>buildMenuUpdateDiff(_0x2456c1,_0x31c31d,_0x3333fc,_0x226931['force']===!![],_0x226931['loadScriptMode']));if(_0x226931['dryRun'])return{'updated':0x0,'failed':0x0,'skipped':![],'dryRun':!![],'diffs':_0x3eb5a8};const _0x32aa51=await Promise[_0xfb0ef7(0xff)](_0x4a143a[_0xfb0ef7(0xfc)]((_0x2d607e,_0x2a6880)=>updateMenuCdnUrl(_0x3f7371,_0x596717,{'id':_0x2d607e['id'],'label':_0x2d607e[_0xfb0ef7(0x107)],'path':_0x2d607e['path'],'resources':_0x3eb5a8[_0x2a6880]['after'][_0xfb0ef7(0x111)],'extend':_0x2d607e[_0xfb0ef7(0x12c)]??null,'loadScriptMode':_0x226931[_0xfb0ef7(0xf5)]}))),_0xca127f=_0x32aa51[_0xfb0ef7(0x115)](_0x59c077=>_0x59c077[_0xfb0ef7(0x128)]===_0xfb0ef7(0x10a))[_0xfb0ef7(0xfc)](_0x31192d=>_0x31192d[_0xfb0ef7(0xf1)]),_0x2acf27=_0x32aa51['filter'](_0xb1bdc3=>_0xb1bdc3[_0xfb0ef7(0x128)]==='rejected')[_0xfb0ef7(0x10b)];return logger[_0xfb0ef7(0x100)]('menu-update','Menu\x20update\x20completed',{'count':_0x4a143a[_0xfb0ef7(0x10b)],'resources':_0x5dd467}),{'updated':_0xca127f[_0xfb0ef7(0x10b)],'failed':_0x2acf27,'skipped':![],'menus':_0xca127f};}function validateSelection(_0x9f7b52){const _0x2262fe=a120_0x4de1;if(!_0x9f7b52)throw new Error(_0x2262fe(0xf9));if(_0x9f7b52[_0x2262fe(0x102)]&&(_0x9f7b52[_0x2262fe(0x10f)][_0x2262fe(0x10b)]>0x0||_0x9f7b52['paths'][_0x2262fe(0x10b)]>0x0))throw new Error('--all\x20cannot\x20be\x20combined\x20with\x20--menu-ids\x20or\x20--paths.');if(!_0x9f7b52['all']&&_0x9f7b52[_0x2262fe(0x10f)][_0x2262fe(0x10b)]===0x0&&_0x9f7b52[_0x2262fe(0x124)]['length']===0x0)throw new Error('menu\x20update\x20requires\x20an\x20explicit\x20target:\x20pass\x20--all,\x20--menu-ids,\x20or\x20--paths.');}export function selectMenusForUpdate(_0x178340,_0x4cb89b){const _0x1101b8=a120_0x4de1;validateSelection(_0x4cb89b);if(_0x4cb89b[_0x1101b8(0x102)])return _0x178340;const _0x74c525=new Set(_0x178340[_0x1101b8(0xfc)](_0x4898bb=>_0x4898bb['id'])),_0x354e45=new Set(_0x178340['map'](_0x109e35=>_0x109e35[_0x1101b8(0x119)])),_0xe27032=_0x4cb89b[_0x1101b8(0x10f)][_0x1101b8(0x115)](_0x2ed021=>!_0x74c525['has'](_0x2ed021)),_0x26703e=_0x4cb89b[_0x1101b8(0x124)][_0x1101b8(0x115)](_0x67f6e=>!_0x354e45['has'](_0x67f6e));if(_0xe27032['length']>0x0||_0x26703e[_0x1101b8(0x10b)]>0x0){const _0x480d32=[..._0xe27032[_0x1101b8(0xfc)](_0x3639df=>String(_0x3639df)),..._0x26703e][_0x1101b8(0x109)](',\x20');throw new Error('menu\x20update\x20selectors\x20did\x20not\x20match\x20resource-bearing\x20menus:\x20'+_0x480d32);}const _0x3cab98=new Set(_0x4cb89b[_0x1101b8(0x10f)]),_0x45714e=new Set(_0x4cb89b[_0x1101b8(0x124)]);return _0x178340['filter'](_0x51eafc=>_0x3cab98['has'](_0x51eafc['id'])||_0x45714e['has'](_0x51eafc['path']));}function normalizeMode(_0x28c564){const _0x4b7f63=a120_0x4de1;if(!_0x28c564)return _0x4b7f63(0x101);if(_0x28c564===_0x4b7f63(0xf8)||_0x28c564===_0x4b7f63(0x101))return _0x28c564;throw new Error(_0x4b7f63(0x110)+_0x28c564+_0x4b7f63(0x10c));}function buildMenuUpdateDiff(_0x58f665,_0x3a9f5e,_0x16d95e,_0x40c28f,_0x4689b9){const _0x3b81fd=a120_0x4de1,_0x245118=[..._0x58f665[_0x3b81fd(0x111)]];_0x16d95e==='patch'&&assertUnambiguousPatchResources(_0x58f665,_0x245118,_0x3a9f5e);const _0x1cde75=_0x16d95e===_0x3b81fd(0x101)?patchResources(_0x245118,_0x3a9f5e):replaceResources(_0x3a9f5e),_0xbdb309=[],_0x13e5dd=_0x245118[_0x3b81fd(0x10d)](isJsResource),_0x5549a4=_0x1cde75[_0x3b81fd(0x10d)](isJsResource);if(_0x13e5dd&&!_0x5549a4){const _0x27f24f='menu\x20update\x20would\x20remove\x20existing\x20JS\x20resource\x20for\x20\x22'+_0x58f665[_0x3b81fd(0x107)]+'\x22\x20('+_0x58f665[_0x3b81fd(0x119)]+_0x3b81fd(0xf6)+'Use\x20--mode\x20patch\x20to\x20preserve\x20it,\x20pass\x20jsUrl,\x20or\x20add\x20--force\x20for\x20an\x20intentional\x20removal.';if(!_0x40c28f)throw new Error(_0x27f24f);_0xbdb309[_0x3b81fd(0x123)](_0x27f24f);}const _0x40340b=_0x245118[_0x3b81fd(0x10d)](isCssResource),_0x15ac83=_0x1cde75[_0x3b81fd(0x10d)](isCssResource);_0x40340b&&!_0x15ac83&&_0xbdb309[_0x3b81fd(0x123)](_0x3b81fd(0xfd)+_0x58f665['label']+_0x3b81fd(0x11f)+_0x58f665['path']+').');const _0x146abd=typeof _0x58f665[_0x3b81fd(0x12c)]?.[_0x3b81fd(0xf5)]==='string'?_0x58f665[_0x3b81fd(0x12c)][_0x3b81fd(0xf5)]:null,_0x2c764a=_0x4689b9?{'loadScriptMode':_0x146abd}:{},_0x54f451=_0x4689b9?{'loadScriptMode':_0x4689b9}:{};return{'id':_0x58f665['id'],'label':_0x58f665['label'],'path':_0x58f665['path'],'mode':_0x16d95e,'before':{'resources':_0x245118,..._0x2c764a},'after':{'resources':_0x1cde75,..._0x54f451},'warnings':_0xbdb309};}function replaceResources(_0x4a5886){const _0x4d6ef7=a120_0x4de1;return[_0x4a5886[_0x4d6ef7(0x12e)],_0x4a5886['cssUrl']][_0x4d6ef7(0x115)](_0x23415e=>!!_0x23415e);}function assertUnambiguousPatchResources(_0x2712a0,_0x390967,_0x55bfaa){const _0x46f614=a120_0x4de1,_0x2de01d=_0x390967[_0x46f614(0x115)](isJsResource)['length'];if(_0x55bfaa[_0x46f614(0x12e)]&&_0x2de01d>0x1)throw new Error(_0x46f614(0x103)+_0x2de01d+_0x46f614(0x122)+_0x2712a0['label']+_0x46f614(0x11f)+_0x2712a0[_0x46f614(0x119)]+')\x20'+_0x46f614(0x126));const _0x3fae49=_0x390967[_0x46f614(0x115)](isCssResource)[_0x46f614(0x10b)];if(_0x55bfaa[_0x46f614(0x10e)]&&_0x3fae49>0x1)throw new Error(_0x46f614(0x103)+_0x3fae49+_0x46f614(0x130)+_0x2712a0[_0x46f614(0x107)]+_0x46f614(0x11f)+_0x2712a0[_0x46f614(0x119)]+')\x20'+_0x46f614(0x120));}function patchResources(_0x393b7e,_0x39097c){const _0x350275=a120_0x4de1;let _0x8058cf=![],_0x419767=![];const _0x58902e=[];for(const _0x2f8d68 of _0x393b7e){if(isJsResource(_0x2f8d68)){if(_0x39097c['jsUrl']&&!_0x8058cf)_0x58902e[_0x350275(0x123)](_0x39097c['jsUrl']),_0x8058cf=!![];else!_0x39097c[_0x350275(0x12e)]&&_0x58902e[_0x350275(0x123)](_0x2f8d68);continue;}if(isCssResource(_0x2f8d68)){if(_0x39097c['cssUrl']&&!_0x419767)_0x58902e[_0x350275(0x123)](_0x39097c[_0x350275(0x10e)]),_0x419767=!![];else!_0x39097c[_0x350275(0x10e)]&&_0x58902e[_0x350275(0x123)](_0x2f8d68);continue;}_0x58902e['push'](_0x2f8d68);}return _0x39097c[_0x350275(0x12e)]&&!_0x8058cf&&_0x58902e[_0x350275(0x106)](_0x39097c[_0x350275(0x12e)]),_0x39097c[_0x350275(0x10e)]&&!_0x419767&&_0x58902e[_0x350275(0x123)](_0x39097c[_0x350275(0x10e)]),_0x58902e;}function isJsResource(_0x467503){const _0x470da1=a120_0x4de1;return stripQuery(_0x467503)[_0x470da1(0x12f)]()[_0x470da1(0x121)](_0x470da1(0xfe));}function a120_0x4de1(_0x41c98d,_0x52dddd){_0x41c98d=_0x41c98d-0xf1;const _0x2ee3a1=a120_0x2ee3();let _0x4de1d1=_0x2ee3a1[_0x41c98d];return _0x4de1d1;}function isCssResource(_0x45d549){const _0x2d2f96=a120_0x4de1;return stripQuery(_0x45d549)[_0x2d2f96(0x12f)]()[_0x2d2f96(0x121)]('.css');}function stripQuery(_0x1847d1){return _0x1847d1['split']('?')[0x0]??_0x1847d1;}function parseUpdateParamsFlag(_0x3b2f0b){const _0x3ddcea=a120_0x4de1;if(!_0x3b2f0b||typeof _0x3b2f0b!==_0x3ddcea(0x129))return{};try{const _0xb7f730=JSON[_0x3ddcea(0x116)](_0x3b2f0b);if(typeof _0xb7f730!==_0x3ddcea(0xf2)||_0xb7f730===null||Array[_0x3ddcea(0x125)](_0xb7f730))return{};return{'jsUrl':typeof _0xb7f730[_0x3ddcea(0x12e)]===_0x3ddcea(0x129)?_0xb7f730['jsUrl'][_0x3ddcea(0xfb)]():undefined,'cssUrl':typeof _0xb7f730[_0x3ddcea(0x10e)]===_0x3ddcea(0x129)?_0xb7f730[_0x3ddcea(0x10e)][_0x3ddcea(0xfb)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a121_0x3d51(_0x315405,_0x1b0e5a){_0x315405=_0x315405-0x143;const _0x2ec773=a121_0x2ec7();let _0x3d516f=_0x2ec773[_0x315405];return _0x3d516f;}(function(_0x523e9b,_0x289ea3){const _0x3cc758=a121_0x3d51,_0x1b23f9=_0x523e9b();while(!![]){try{const _0x437cab=-parseInt(_0x3cc758(0x14d))/0x1*(parseInt(_0x3cc758(0x14b))/0x2)+parseInt(_0x3cc758(0x144))/0x3+parseInt(_0x3cc758(0x146))/0x4*(-parseInt(_0x3cc758(0x148))/0x5)+-parseInt(_0x3cc758(0x145))/0x6*(-parseInt(_0x3cc758(0x14e))/0x7)+parseInt(_0x3cc758(0x147))/0x8+-parseInt(_0x3cc758(0x14a))/0x9+-parseInt(_0x3cc758(0x14f))/0xa*(-parseInt(_0x3cc758(0x143))/0xb);if(_0x437cab===_0x289ea3)break;else _0x1b23f9['push'](_0x1b23f9['shift']());}catch(_0x14b3e6){_0x1b23f9['push'](_0x1b23f9['shift']());}}}(a121_0x2ec7,0xb7a7f));function a121_0x2ec7(){const _0x412445=['99409OosqFr','189XFPbUm','10160UqcmnD','trim','19536FhJOnL','2332608OvgCEu','214422AmhJUG','12wejOxv','7586320zkkEYj','1950385nmrlOu','HEAD','13312404hvRICP','22srRhBA','test'];a121_0x2ec7=function(){return _0x412445;};return a121_0x2ec7();}export function isValidJsHttpsUrl(_0xc03167){const _0x5401f5=a121_0x3d51;return/^https:\/\/.+\.js(\?.*)?$/[_0x5401f5(0x14c)](_0xc03167[_0x5401f5(0x150)]());}export function isValidCssHttpsUrl(_0x39cd63){const _0x54b90d=a121_0x3d51;return/^https:\/\/.+\.css(\?.*)?$/[_0x54b90d(0x14c)](_0x39cd63[_0x54b90d(0x150)]());}export async function isUrlReachable(_0x370fab){const _0x339160=a121_0x3d51;try{const _0x98e7dc=await fetch(_0x370fab,{'method':_0x339160(0x149)});return _0x98e7dc['ok'];}catch{return![];}}
1
+ (function(_0x4e1d42,_0x1333ee){const _0x30ffe3=a121_0x4a26,_0x8ee2dc=_0x4e1d42();while(!![]){try{const _0x3339dc=parseInt(_0x30ffe3(0x72))/0x1*(-parseInt(_0x30ffe3(0x76))/0x2)+-parseInt(_0x30ffe3(0x79))/0x3*(-parseInt(_0x30ffe3(0x6e))/0x4)+-parseInt(_0x30ffe3(0x71))/0x5+-parseInt(_0x30ffe3(0x73))/0x6*(-parseInt(_0x30ffe3(0x70))/0x7)+-parseInt(_0x30ffe3(0x75))/0x8+parseInt(_0x30ffe3(0x6f))/0x9+parseInt(_0x30ffe3(0x77))/0xa;if(_0x3339dc===_0x1333ee)break;else _0x8ee2dc['push'](_0x8ee2dc['shift']());}catch(_0x810411){_0x8ee2dc['push'](_0x8ee2dc['shift']());}}}(a121_0x4fd4,0x987ac));export function isValidJsHttpsUrl(_0x34192e){const _0x490bbf=a121_0x4a26;return/^https:\/\/.+\.js(\?.*)?$/[_0x490bbf(0x74)](_0x34192e[_0x490bbf(0x6d)]());}function a121_0x4a26(_0x1b03f4,_0x13fbd3){_0x1b03f4=_0x1b03f4-0x6d;const _0x4fd404=a121_0x4fd4();let _0x4a26f5=_0x4fd404[_0x1b03f4];return _0x4a26f5;}export function isValidCssHttpsUrl(_0x112e3a){const _0x177965=a121_0x4a26;return/^https:\/\/.+\.css(\?.*)?$/[_0x177965(0x74)](_0x112e3a[_0x177965(0x6d)]());}function a121_0x4fd4(){const _0x36eb5a=['4714555bdRvtT','1238QXrjca','181782suWvFd','test','6680816FsJeUq','492dKzVDS','3651490oATnGx','HEAD','267OyspYJ','trim','51828OaCFTM','8517771AudHNK','56vmgDJk'];a121_0x4fd4=function(){return _0x36eb5a;};return a121_0x4fd4();}export async function isUrlReachable(_0x569247){const _0x3464c6=a121_0x4a26;try{const _0x17a9a9=await fetch(_0x569247,{'method':_0x3464c6(0x78)});return _0x17a9a9['ok'];}catch{return![];}}