@lovrabet/cli 1.3.2-beta.0 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/lib/add-page/input-page-router.js +1 -1
  2. package/lib/add-page/main.js +1 -1
  3. package/lib/add-page/select-page-template.js +1 -1
  4. package/lib/ai-setup/AISetupUI.js +1 -1
  5. package/lib/ai-setup/config.js +1 -1
  6. package/lib/api/api-doc-ui.js +1 -1
  7. package/lib/api/api-doc.js +1 -1
  8. package/lib/api/api-pull-ui.js +1 -1
  9. package/lib/api/fetch-model-list.js +1 -1
  10. package/lib/api/generate-api-file.js +1 -1
  11. package/lib/api/main.js +1 -1
  12. package/lib/api/pull-silent.js +1 -1
  13. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  14. package/lib/app-menu/create-menu.js +1 -1
  15. package/lib/app-menu/get-local-pages.js +1 -1
  16. package/lib/app-menu/get-online-menu-list.js +1 -1
  17. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  18. package/lib/app-menu/utils.js +1 -1
  19. package/lib/app-menu/valid-url.js +1 -1
  20. package/lib/app-menu-update-cdn/current-content.js +1 -1
  21. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  22. package/lib/app-menu-update-cdn/main.js +1 -1
  23. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  24. package/lib/auth/auth-server-ui.js +1 -1
  25. package/lib/auth/auth-server.js +1 -1
  26. package/lib/auth/constant.js +1 -1
  27. package/lib/auth/get-cookie.js +1 -1
  28. package/lib/auth/is-session-valid.js +1 -1
  29. package/lib/auth/logout.js +1 -1
  30. package/lib/cli-flags.js +1 -1
  31. package/lib/cli.js +1 -1
  32. package/lib/cmd/build-watch.js +1 -1
  33. package/lib/cmd/build.js +1 -1
  34. package/lib/cmd/logs.js +1 -1
  35. package/lib/cmd/preview.js +1 -1
  36. package/lib/cmd/start.js +1 -1
  37. package/lib/config/config-help.js +1 -1
  38. package/lib/config/main.js +1 -1
  39. package/lib/constant/domain.js +1 -1
  40. package/lib/constant/env.js +1 -1
  41. package/lib/create-app/enhanced-guided-create.js +1 -1
  42. package/lib/create-app/format-elapsed.js +1 -1
  43. package/lib/create-app/main.js +1 -1
  44. package/lib/create-app/non-interactive.js +1 -1
  45. package/lib/create-app/task-finished.js +1 -1
  46. package/lib/create-app/task-loading.js +1 -1
  47. package/lib/create-app/task-running.js +1 -1
  48. package/lib/create-app/task-time.js +1 -1
  49. package/lib/create-app/use-copy-project-template.js +1 -1
  50. package/lib/create-app/use-format-code.js +1 -1
  51. package/lib/create-app/use-install-dependencies.js +1 -1
  52. package/lib/help.js +1 -1
  53. package/lib/init/main.js +1 -1
  54. package/lib/mcp/McpInstallUI.js +1 -1
  55. package/lib/mcp/claude.js +1 -1
  56. package/lib/mcp/cursor.js +1 -1
  57. package/lib/mcp/main.js +1 -1
  58. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  59. package/lib/mcp/mcp-installer.js +1 -1
  60. package/lib/skills/SkillInstallUI.js +1 -1
  61. package/lib/skills/main.js +1 -1
  62. package/lib/skills/skill-install-non-interactive.js +1 -1
  63. package/lib/skills/skill-installer.js +1 -1
  64. package/lib/ui/IDESelector.js +1 -1
  65. package/lib/ui/useIDESelection.js +1 -1
  66. package/lib/utils/ai_config.js +1 -1
  67. package/lib/utils/cdn-config.js +1 -1
  68. package/lib/utils/check-sdk-version.js +1 -1
  69. package/lib/utils/cli-version-check.js +1 -1
  70. package/lib/utils/config.js +1 -1
  71. package/lib/utils/copy-directory.js +1 -1
  72. package/lib/utils/file-utils.js +1 -1
  73. package/lib/utils/guides-cdn.js +1 -1
  74. package/lib/utils/http-client.js +1 -1
  75. package/lib/utils/logger.js +1 -1
  76. package/lib/utils/router-updater.js +1 -1
  77. package/lib/utils/rules-cdn.js +1 -1
  78. package/lib/utils/sleep.js +1 -1
  79. package/lib/utils/template-replacer.js +1 -1
  80. package/package.json +1 -1
package/lib/api/main.js CHANGED
@@ -1 +1 @@
1
- (function(_0x57eade,_0x1f7ab9){const _0x1285c0=a10_0x4887,_0x2dde0c=_0x57eade();while(!![]){try{const _0x5d3b05=-parseInt(_0x1285c0(0x1eb))/0x1*(-parseInt(_0x1285c0(0x1e3))/0x2)+parseInt(_0x1285c0(0x1db))/0x3*(parseInt(_0x1285c0(0x1de))/0x4)+-parseInt(_0x1285c0(0x1c6))/0x5*(-parseInt(_0x1285c0(0x1b6))/0x6)+-parseInt(_0x1285c0(0x1dd))/0x7*(parseInt(_0x1285c0(0x1d1))/0x8)+parseInt(_0x1285c0(0x1d6))/0x9*(parseInt(_0x1285c0(0x1cc))/0xa)+parseInt(_0x1285c0(0x1c2))/0xb*(parseInt(_0x1285c0(0x1dc))/0xc)+-parseInt(_0x1285c0(0x1b8))/0xd;if(_0x5d3b05===_0x1f7ab9)break;else _0x2dde0c['push'](_0x2dde0c['shift']());}catch(_0x41959f){_0x2dde0c['push'](_0x2dde0c['shift']());}}}(a10_0x10b7,0x401f7));import{jsx as a10_0x8960da}from'react/jsx-runtime';import{render}from'ink';import{ApiPullUI}from'./api-pull-ui.js';function a10_0x10b7(){const _0x280f51=['\x20\x20lovrabet\x20api\x20pull\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','flags','155jGHDdO','\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode','exit','\x1b[0m','split','\x20\x20lovrabet\x20api\x20doc\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录(默认:\x20./docs)','190AarZqP','params','map','filter','object','136djByhr','length','\x20\x20错误:\x20','×\x20--datasetcode\x20参数不能为空','\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>','185670RPPWWV','appcode','doc','请使用\x20--appcode\x20参数,例如:','help','3DWKnSd','132sDUrDl','211274PCcpcK','29720TkLrJS','\x20\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件','pull','env','×\x20--params\x20参数必须是一个有效的\x20JSON\x20对象','3606azixEv','parse','isArray','Unknown\x20api\x20command:\x20','×\x20未配置\x20AppCode','\x1b[90m*\x20仅生成指定数据集的文档:\x20','\x20\x20lovrabet\x20api\x20doc\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','\x0alovrabet\x20api\x20-\x20API\x20相关操作\x0a\x0a用法:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20[options]\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20[options]\x0a\x0a选项:\x0a\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20指定应用代码\x0a\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20指定输出目录(pull:\x20./src/api/,doc:\x20./docs)\x0a\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定环境(如:daily、online)\x0a\x20\x20--datasetcode\x20<codes>\x20指定要生成文档的数据集代码(多个用逗号分隔,仅\x20doc\x20命令)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示此帮助信息\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--output\x20./api\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境拉取\x20API\x0a\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成所有数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--output\x20./docs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境生成文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20只生成指定数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x20\x20\x20\x20\x20\x20//\x20生成多个数据集的文档\x0a','139kcEFeV','\x1b[90m\x20\x20(注:\x20--appcode\x20参数与配置一致,将使用默认配置)\x1b[0m','30156UEAQBk','join','1304836JYtOpI','log','output','\x1b[90m*\x20使用配置的应用AppCode:\x20','error','\x20\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20doc\x20--appcode\x20<app-code>','string','!\x20请使用以下方式之一:','\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20','70290isUPwj','input'];a10_0x10b7=function(){return _0x280f51;};return a10_0x10b7();}function a10_0x4887(_0x702fbe,_0x312790){_0x702fbe=_0x702fbe-0x1b5;const _0x10b79d=a10_0x10b7();let _0x48876d=_0x10b79d[_0x702fbe];return _0x48876d;}import{ApiDocUI}from'./api-doc-ui.js';import{getConfigAppCode}from'../utils/config.js';export async function apiCli(_0x1bc1c3){const _0x49fe77=a10_0x4887,_0xcea57b=_0x1bc1c3[_0x49fe77(0x1c3)][0x1];if(_0x1bc1c3[_0x49fe77(0x1c5)][_0x49fe77(0x1da)]){console[_0x49fe77(0x1b9)](_0x49fe77(0x1ea));return;}if(_0xcea57b===_0x49fe77(0x1e0)){_0x1bc1c3[_0x49fe77(0x1c3)][0x2]&&(console[_0x49fe77(0x1bc)]('❌\x20错误:不再支持位置参数方式'),console['log'](_0x49fe77(0x1d9)),console[_0x49fe77(0x1b9)](_0x49fe77(0x1c1)+_0x1bc1c3[_0x49fe77(0x1c3)][0x2]),process[_0x49fe77(0x1c8)](0x1));const _0x44f911=getConfigAppCode();let _0x1d0974=_0x1bc1c3[_0x49fe77(0x1c5)][_0x49fe77(0x1d7)];const _0x37ce4c=typeof _0x1bc1c3[_0x49fe77(0x1c5)][_0x49fe77(0x1e1)]===_0x49fe77(0x1bf)?_0x1bc1c3[_0x49fe77(0x1c5)][_0x49fe77(0x1e1)]:undefined,_0x2efbf6=_0x1bc1c3[_0x49fe77(0x1c5)][_0x49fe77(0x1ba)];!_0x1d0974&&!_0x44f911&&(console['error'](_0x49fe77(0x1e7)),console[_0x49fe77(0x1b9)](_0x49fe77(0x1c0)),console[_0x49fe77(0x1b9)]('\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>'),console[_0x49fe77(0x1b9)]('\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20pull\x20--appcode\x20<app-code>'),process['exit'](0x1)),_0x1d0974&&_0x44f911&&_0x1d0974===_0x44f911&&(console[_0x49fe77(0x1b9)]('\x1b[90m*\x20使用配置的应用AppCode:\x20'+_0x1d0974+_0x49fe77(0x1c9)),console[_0x49fe77(0x1b9)](_0x49fe77(0x1b5)),_0x1d0974=undefined),render(a10_0x8960da(ApiPullUI,{'appCode':_0x1d0974,'env':_0x37ce4c,'output':_0x2efbf6}));}else{if(_0xcea57b===_0x49fe77(0x1d8)){_0x1bc1c3[_0x49fe77(0x1c3)][0x2]&&(console[_0x49fe77(0x1bc)]('❌\x20错误:不再支持位置参数方式'),console[_0x49fe77(0x1b9)](_0x49fe77(0x1d9)),console[_0x49fe77(0x1b9)]('\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20'+_0x1bc1c3['input'][0x2]),process[_0x49fe77(0x1c8)](0x1));const _0x308349=getConfigAppCode();let _0x5a0a84=_0x1bc1c3[_0x49fe77(0x1c5)][_0x49fe77(0x1d7)];const _0x3db1ca=typeof _0x1bc1c3[_0x49fe77(0x1c5)]['env']==='string'?_0x1bc1c3[_0x49fe77(0x1c5)][_0x49fe77(0x1e1)]:undefined,_0x5592cc=_0x1bc1c3['flags']['output'],_0x3a9c42=_0x1bc1c3[_0x49fe77(0x1c5)][_0x49fe77(0x1cd)],_0x2aa9b7=_0x1bc1c3[_0x49fe77(0x1c5)]['datasetcode'];!_0x5a0a84&&!_0x308349&&(console['error'](_0x49fe77(0x1e7)),console['log']('!\x20请使用以下方式之一:'),console[_0x49fe77(0x1b9)](_0x49fe77(0x1d5)),console[_0x49fe77(0x1b9)](_0x49fe77(0x1be)),process[_0x49fe77(0x1c8)](0x1));_0x5a0a84&&_0x308349&&_0x5a0a84===_0x308349&&(console[_0x49fe77(0x1b9)](_0x49fe77(0x1bb)+_0x5a0a84+_0x49fe77(0x1c9)),_0x5a0a84=undefined);let _0x4dd5e7;if(_0x3a9c42)try{_0x4dd5e7=JSON[_0x49fe77(0x1e4)](_0x3a9c42),(typeof _0x4dd5e7!==_0x49fe77(0x1d0)||_0x4dd5e7===null||Array[_0x49fe77(0x1e5)](_0x4dd5e7))&&(console[_0x49fe77(0x1bc)](_0x49fe77(0x1e2)),process[_0x49fe77(0x1c8)](0x1));}catch(_0x5b20ab){console['error']('×\x20--params\x20参数不是有效的\x20JSON\x20格式'),console['error'](_0x49fe77(0x1d3)+(_0x5b20ab instanceof Error?_0x5b20ab['message']:String(_0x5b20ab))),process['exit'](0x1);}let _0x4c5efb;_0x2aa9b7&&(_0x4c5efb=_0x2aa9b7[_0x49fe77(0x1ca)](',')[_0x49fe77(0x1ce)](_0x3b4492=>_0x3b4492['trim']())[_0x49fe77(0x1cf)](_0x16fa69=>_0x16fa69[_0x49fe77(0x1d2)]>0x0),_0x4c5efb[_0x49fe77(0x1d2)]===0x0&&(console['error'](_0x49fe77(0x1d4)),process['exit'](0x1)),console[_0x49fe77(0x1b9)](_0x49fe77(0x1e8)+_0x4c5efb[_0x49fe77(0x1b7)](',\x20')+_0x49fe77(0x1c9))),render(a10_0x8960da(ApiDocUI,{'appCode':_0x5a0a84,'env':_0x3db1ca,'output':_0x5592cc,'extraParams':_0x4dd5e7,'datasetCodes':_0x4c5efb}));}else console[_0x49fe77(0x1bc)](_0x49fe77(0x1e6)+_0xcea57b),console['log']('Available\x20commands:'),console[_0x49fe77(0x1b9)](_0x49fe77(0x1df)),console['log']('\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode'),console[_0x49fe77(0x1b9)]('\x20\x20lovrabet\x20api\x20pull\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录(默认:\x20./src/api/)'),console[_0x49fe77(0x1b9)](_0x49fe77(0x1c4)),console[_0x49fe77(0x1b9)](''),console[_0x49fe77(0x1b9)](_0x49fe77(0x1bd)),console[_0x49fe77(0x1b9)](_0x49fe77(0x1c7)),console[_0x49fe77(0x1b9)](_0x49fe77(0x1cb)),console[_0x49fe77(0x1b9)](_0x49fe77(0x1e9)),process[_0x49fe77(0x1c8)](0x1);}}
1
+ (function(_0x1d85d0,_0x381781){const _0xfd7a46=a10_0x33f5,_0x5c9857=_0x1d85d0();while(!![]){try{const _0x413463=-parseInt(_0xfd7a46(0x130))/0x1+-parseInt(_0xfd7a46(0x15c))/0x2*(-parseInt(_0xfd7a46(0x13c))/0x3)+-parseInt(_0xfd7a46(0x13a))/0x4+parseInt(_0xfd7a46(0x151))/0x5+-parseInt(_0xfd7a46(0x14e))/0x6+parseInt(_0xfd7a46(0x156))/0x7*(parseInt(_0xfd7a46(0x132))/0x8)+parseInt(_0xfd7a46(0x133))/0x9;if(_0x413463===_0x381781)break;else _0x5c9857['push'](_0x5c9857['shift']());}catch(_0x2297fa){_0x5c9857['push'](_0x5c9857['shift']());}}}(a10_0x4774,0x420e1));function a10_0x4774(){const _0x38afcf=['\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20','\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode','160965fzYlcx','\x20\x20错误:\x20','48248TIBxfM','5537916GXrxbS','\x1b[90m\x20\x20(注:\x20--appcode\x20参数与配置一致,将使用默认配置)\x1b[0m','Unknown\x20api\x20command:\x20','isArray','\x20\x20lovrabet\x20api\x20doc\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录(默认:\x20./docs)','exit','\x20\x20lovrabet\x20api\x20pull\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录(默认:\x20./src/api/)','2139688rlqRvl','❌\x20错误:不再支持位置参数方式','389265JhhVPp','pull','×\x20--datasetcode\x20参数不能为空','join','split','×\x20--params\x20参数必须是一个有效的\x20JSON\x20对象','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20pull\x20--appcode\x20<app-code>','请使用\x20--appcode\x20参数,例如:','\x20\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成\x20API\x20文档','length','\x20\x20lovrabet\x20api\x20doc\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','log','\x1b[90m*\x20使用配置的应用AppCode:\x20','!\x20请使用以下方式之一:','×\x20--params\x20参数不是有效的\x20JSON\x20格式','flags','datasetcode','input','2361222RitFXo','\x20\x20lovrabet\x20api\x20pull\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境(如:\x20daily,\x20online)','Available\x20commands:','329540MTwZXy','string','trim','\x20\x20\x201.\x20配置默认值:\x20lovrabet\x20config\x20set\x20appcode\x20<app-code>','\x20\x20lovrabet\x20api\x20pull\x20--appcode\x20','336ZwEJOx','env','object','appcode','\x1b[0m','help','6uPUzeh','×\x20未配置\x20AppCode','error','parse','\x20\x20\x202.\x20使用参数:\x20lovrabet\x20api\x20doc\x20--appcode\x20<app-code>','filter'];a10_0x4774=function(){return _0x38afcf;};return a10_0x4774();}import{jsx as a10_0x4e46d5}from'react/jsx-runtime';import{render}from'ink';import{ApiPullUI}from'./api-pull-ui.js';import{ApiDocUI}from'./api-doc-ui.js';import{getConfigAppCode}from'../utils/config.js';function a10_0x33f5(_0x2f480e,_0x868fc){_0x2f480e=_0x2f480e-0x12d;const _0x47744c=a10_0x4774();let _0x33f56c=_0x47744c[_0x2f480e];return _0x33f56c;}export async function apiCli(_0x260d41){const _0x174a7f=a10_0x33f5,_0x140622=_0x260d41[_0x174a7f(0x14d)][0x1];if(_0x260d41[_0x174a7f(0x14b)][_0x174a7f(0x15b)]){console[_0x174a7f(0x147)]('\x0alovrabet\x20api\x20-\x20API\x20相关操作\x0a\x0a用法:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20[options]\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20[options]\x0a\x0a选项:\x0a\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20指定应用代码\x0a\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20指定输出目录(pull:\x20./src/api/,doc:\x20./docs)\x0a\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20指定环境(如:daily、online)\x0a\x20\x20--datasetcode\x20<codes>\x20指定要生成文档的数据集代码(多个用逗号分隔,仅\x20doc\x20命令)\x0a\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20显示此帮助信息\x0a\x0a示例:\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--output\x20./api\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20pull\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境拉取\x20API\x0a\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20生成所有数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--appcode\x20myapp\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--output\x20./docs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定文档输出目录\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--env\x20daily\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20指定环境生成文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20只生成指定数据集的文档\x0a\x20\x20$\x20lovrabet\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x20\x20\x20\x20\x20\x20//\x20生成多个数据集的文档\x0a');return;}if(_0x140622===_0x174a7f(0x13d)){_0x260d41[_0x174a7f(0x14d)][0x2]&&(console[_0x174a7f(0x15e)](_0x174a7f(0x13b)),console['log'](_0x174a7f(0x143)),console[_0x174a7f(0x147)](_0x174a7f(0x155)+_0x260d41[_0x174a7f(0x14d)][0x2]),process[_0x174a7f(0x138)](0x1));const _0x2d1c1d=getConfigAppCode();let _0x9cdf90=_0x260d41[_0x174a7f(0x14b)][_0x174a7f(0x159)];const _0x4193d1=typeof _0x260d41['flags'][_0x174a7f(0x157)]===_0x174a7f(0x152)?_0x260d41['flags'][_0x174a7f(0x157)]:undefined,_0x14894e=_0x260d41[_0x174a7f(0x14b)]['output'];!_0x9cdf90&&!_0x2d1c1d&&(console[_0x174a7f(0x15e)](_0x174a7f(0x15d)),console[_0x174a7f(0x147)](_0x174a7f(0x149)),console['log'](_0x174a7f(0x154)),console[_0x174a7f(0x147)](_0x174a7f(0x142)),process[_0x174a7f(0x138)](0x1)),_0x9cdf90&&_0x2d1c1d&&_0x9cdf90===_0x2d1c1d&&(console['log'](_0x174a7f(0x148)+_0x9cdf90+_0x174a7f(0x15a)),console[_0x174a7f(0x147)](_0x174a7f(0x134)),_0x9cdf90=undefined),render(a10_0x4e46d5(ApiPullUI,{'appCode':_0x9cdf90,'env':_0x4193d1,'output':_0x14894e}));}else{if(_0x140622==='doc'){_0x260d41[_0x174a7f(0x14d)][0x2]&&(console['error']('❌\x20错误:不再支持位置参数方式'),console[_0x174a7f(0x147)]('请使用\x20--appcode\x20参数,例如:'),console[_0x174a7f(0x147)](_0x174a7f(0x12e)+_0x260d41[_0x174a7f(0x14d)][0x2]),process[_0x174a7f(0x138)](0x1));const _0x4c5143=getConfigAppCode();let _0x19d73e=_0x260d41['flags'][_0x174a7f(0x159)];const _0x18b711=typeof _0x260d41[_0x174a7f(0x14b)][_0x174a7f(0x157)]===_0x174a7f(0x152)?_0x260d41[_0x174a7f(0x14b)][_0x174a7f(0x157)]:undefined,_0x265c47=_0x260d41['flags']['output'],_0x56913d=_0x260d41[_0x174a7f(0x14b)]['params'],_0x489338=_0x260d41[_0x174a7f(0x14b)][_0x174a7f(0x14c)];!_0x19d73e&&!_0x4c5143&&(console['error'](_0x174a7f(0x15d)),console['log'](_0x174a7f(0x149)),console['log'](_0x174a7f(0x154)),console[_0x174a7f(0x147)](_0x174a7f(0x160)),process[_0x174a7f(0x138)](0x1));_0x19d73e&&_0x4c5143&&_0x19d73e===_0x4c5143&&(console[_0x174a7f(0x147)]('\x1b[90m*\x20使用配置的应用AppCode:\x20'+_0x19d73e+'\x1b[0m'),_0x19d73e=undefined);let _0x5c8253;if(_0x56913d)try{_0x5c8253=JSON[_0x174a7f(0x15f)](_0x56913d),(typeof _0x5c8253!==_0x174a7f(0x158)||_0x5c8253===null||Array[_0x174a7f(0x136)](_0x5c8253))&&(console[_0x174a7f(0x15e)](_0x174a7f(0x141)),process['exit'](0x1));}catch(_0x185acf){console[_0x174a7f(0x15e)](_0x174a7f(0x14a)),console[_0x174a7f(0x15e)](_0x174a7f(0x131)+(_0x185acf instanceof Error?_0x185acf['message']:String(_0x185acf))),process[_0x174a7f(0x138)](0x1);}let _0x1b0939;_0x489338&&(_0x1b0939=_0x489338[_0x174a7f(0x140)](',')['map'](_0x3543a9=>_0x3543a9[_0x174a7f(0x153)]())[_0x174a7f(0x12d)](_0x369d15=>_0x369d15['length']>0x0),_0x1b0939[_0x174a7f(0x145)]===0x0&&(console['error'](_0x174a7f(0x13e)),process[_0x174a7f(0x138)](0x1)),console[_0x174a7f(0x147)]('\x1b[90m*\x20仅生成指定数据集的文档:\x20'+_0x1b0939[_0x174a7f(0x13f)](',\x20')+_0x174a7f(0x15a))),render(a10_0x4e46d5(ApiDocUI,{'appCode':_0x19d73e,'env':_0x18b711,'output':_0x265c47,'extraParams':_0x5c8253,'datasetCodes':_0x1b0939}));}else console['error'](_0x174a7f(0x135)+_0x140622),console['log'](_0x174a7f(0x150)),console[_0x174a7f(0x147)]('\x20\x20lovrabet\x20api\x20pull\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//\x20拉取并生成\x20API\x20配置文件'),console[_0x174a7f(0x147)](_0x174a7f(0x12f)),console[_0x174a7f(0x147)](_0x174a7f(0x139)),console['log'](_0x174a7f(0x14f)),console[_0x174a7f(0x147)](''),console[_0x174a7f(0x147)](_0x174a7f(0x144)),console[_0x174a7f(0x147)]('\x20\x20lovrabet\x20api\x20doc\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20//\x20使用指定的\x20appcode'),console['log'](_0x174a7f(0x137)),console[_0x174a7f(0x147)](_0x174a7f(0x146)),process[_0x174a7f(0x138)](0x1);}}
@@ -1 +1 @@
1
- (function(_0x4e97a5,_0x5f21b9){const _0x23895a=a11_0x5c49,_0x312572=_0x4e97a5();while(!![]){try{const _0x1b876c=parseInt(_0x23895a(0xfd))/0x1+-parseInt(_0x23895a(0xf3))/0x2+-parseInt(_0x23895a(0xe8))/0x3*(parseInt(_0x23895a(0xec))/0x4)+-parseInt(_0x23895a(0xe0))/0x5+-parseInt(_0x23895a(0xf1))/0x6*(-parseInt(_0x23895a(0xdc))/0x7)+parseInt(_0x23895a(0xde))/0x8*(-parseInt(_0x23895a(0xe3))/0x9)+parseInt(_0x23895a(0xf7))/0xa;if(_0x1b876c===_0x5f21b9)break;else _0x312572['push'](_0x312572['shift']());}catch(_0x351928){_0x312572['push'](_0x312572['shift']());}}}(a11_0x3daa,0x50e4b));import{readConfig}from'../utils/config.js';import{initEnv}from'../constant/env.js';function a11_0x5c49(_0x30acb6,_0x4e15c4){_0x30acb6=_0x30acb6-0xdc;const _0x3daa8f=a11_0x3daa();let _0x5c49d2=_0x3daa8f[_0x30acb6];return _0x5c49d2;}import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';function a11_0x3daa(){const _0x1bacc3=['*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','online','4WzdiGQ','message','API\x20配置拉取成功:\x20','\x20个数据集,生成\x20','env','18rJSObY','\x20个数据集...','1316814wDZnPQ','test','log','error','23068500FOqyXc','√\x20成功拉取\x20','length','\x20\x20\x20•\x20','-api','chdir','460789bWomKq','179032RsMqEn','API\x20配置拉取异常:\x20','8rndjUa','string','3012120PCeWeU','trim','*\x20正在处理\x20','5654862AmbPCg','modelCount','*\x20开始生成\x20API\x20配置文件:','api','create-api-pull','1871637VSlGBR','cwd'];a11_0x3daa=function(){return _0x1bacc3;};return a11_0x3daa();}export async function pullApiSilent(_0xb42dd8,_0x57c57a,_0x9fb716,_0x5107b0){const _0x59fdd9=a11_0x5c49;let _0x5c31c8;try{const _0x5ac851=_0x57c57a?.[_0x59fdd9(0xe1)]()||'';if(_0x5ac851){const _0xe336e5=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0xe336e5[_0x59fdd9(0xf4)](_0x5ac851))return console[_0x59fdd9(0xf6)]('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),![];}_0x9fb716&&(_0x5c31c8=process[_0x59fdd9(0xe9)](),process[_0x59fdd9(0xfc)](_0x9fb716));const _0x5ba326=readConfig(),_0x2dc36e=typeof _0x5ba326[_0x59fdd9(0xf0)]===_0x59fdd9(0xdf)?_0x5ba326[_0x59fdd9(0xf0)]:undefined,_0x40894d=_0x5107b0||_0x2dc36e||_0x59fdd9(0xeb);initEnv(_0x40894d),console[_0x59fdd9(0xf5)](_0x59fdd9(0xea)+_0x40894d+')');const {configArray:_0x368f1f}=await fetchModelList(_0xb42dd8),_0x5e22d2=_0x5ac851?_0x5ac851+_0x59fdd9(0xfb):_0x59fdd9(0xe6),_0x1b0928=_0x5ac851?_0x5ac851+'-client':'client';console[_0x59fdd9(0xf5)](_0x59fdd9(0xe5)),console[_0x59fdd9(0xf5)](_0x59fdd9(0xfa)+_0x5e22d2+'.ts\x20-\x20模型配置文件'),console[_0x59fdd9(0xf5)](_0x59fdd9(0xfa)+_0x1b0928+'.ts\x20-\x20客户端实例文件'),console['log'](_0x59fdd9(0xe2)+_0x368f1f['length']+_0x59fdd9(0xf2));const _0x118ae5=await generateApiFile(_0x368f1f,_0x5ac851,_0xb42dd8,!![],_0x40894d);return console[_0x59fdd9(0xf5)](_0x59fdd9(0xf8)+_0x368f1f[_0x59fdd9(0xf9)]+_0x59fdd9(0xef)+_0x118ae5[_0x59fdd9(0xe4)]+'\x20个模型'),_0x9fb716&&logger['info'](_0x59fdd9(0xe7),_0x59fdd9(0xee)+_0xb42dd8,{'projectPath':_0x9fb716,'appCode':_0xb42dd8,'datasetCount':_0x368f1f['length'],'filePrefix':_0x5ac851}),!![];}catch(_0x5d38e0){const _0x5b6080=_0x5d38e0 instanceof Error?_0x5d38e0[_0x59fdd9(0xed)]:String(_0x5d38e0);return console[_0x59fdd9(0xf6)]('×\x20API\x20配置拉取异常:',_0x5b6080),_0x9fb716&&logger[_0x59fdd9(0xf6)](_0x59fdd9(0xe7),_0x59fdd9(0xdd)+_0x5b6080,{'appCode':_0xb42dd8,'projectPath':_0x9fb716}),![];}finally{_0x5c31c8&&process['chdir'](_0x5c31c8);}}
1
+ (function(_0x38d903,_0x345790){const _0x185477=a11_0xf9ff,_0x470b4a=_0x38d903();while(!![]){try{const _0x4f24a1=-parseInt(_0x185477(0x191))/0x1+-parseInt(_0x185477(0x19f))/0x2+-parseInt(_0x185477(0x192))/0x3+-parseInt(_0x185477(0x187))/0x4+-parseInt(_0x185477(0x1a5))/0x5*(-parseInt(_0x185477(0x19b))/0x6)+-parseInt(_0x185477(0x186))/0x7*(parseInt(_0x185477(0x198))/0x8)+parseInt(_0x185477(0x18e))/0x9*(parseInt(_0x185477(0x18a))/0xa);if(_0x4f24a1===_0x345790)break;else _0x470b4a['push'](_0x470b4a['shift']());}catch(_0x51e307){_0x470b4a['push'](_0x470b4a['shift']());}}}(a11_0x5eb8,0x755c6));function a11_0xf9ff(_0x2bea12,_0x187392){_0x2bea12=_0x2bea12-0x185;const _0x5eb847=a11_0x5eb8();let _0xf9ffa8=_0x5eb847[_0x2bea12];return _0xf9ffa8;}import{readConfig}from'../utils/config.js';function a11_0x5eb8(){const _0x463d0f=['*\x20开始生成\x20API\x20配置文件:','error','online','3132hvIcxs','trim','chdir','280150XFyqwv','663cJjOhi','message','API\x20配置拉取成功:\x20','\x20\x20\x20•\x20','client','-api','3391784ZnKOGm','api','length','131112MIRdKx','modelCount','*\x20正在处理\x20','string','615024sRhJBV','env','\x20个数据集,生成\x20','info','log','.ts\x20-\x20模型配置文件','20FoPeWU','.ts\x20-\x20客户端实例文件','API\x20配置拉取异常:\x20','*\x20正在从服务器拉取\x20API\x20配置...\x20(环境:\x20','×\x20API\x20配置拉取异常:','create-api-pull','14xstKeZ','105620LOFyeH','√\x20成功拉取\x20','\x20个模型','53320FWAhoX'];a11_0x5eb8=function(){return _0x463d0f;};return a11_0x5eb8();}import{initEnv}from'../constant/env.js';import{generateApiFile}from'./generate-api-file.js';import{logger}from'../utils/logger.js';import{fetchModelList}from'./fetch-model-list.js';export async function pullApiSilent(_0x544e09,_0x12e19e,_0x16bb6b,_0x1f78f3){const _0x125959=a11_0xf9ff;let _0x8eedc7;try{const _0x4dbf52=_0x12e19e?.[_0x125959(0x18f)]()||'';if(_0x4dbf52){const _0x49c371=/^[a-zA-Z][a-zA-Z0-9_-]*$/;if(!_0x49c371['test'](_0x4dbf52))return console['error']('×\x20文件前缀格式不正确。只能包含字母、数字、连字符和下划线,且必须以字母开头。'),![];}_0x16bb6b&&(_0x8eedc7=process['cwd'](),process[_0x125959(0x190)](_0x16bb6b));const _0x5800f4=readConfig(),_0x606e38=typeof _0x5800f4[_0x125959(0x1a0)]===_0x125959(0x19e)?_0x5800f4[_0x125959(0x1a0)]:undefined,_0x3a11bc=_0x1f78f3||_0x606e38||_0x125959(0x18d);initEnv(_0x3a11bc),console[_0x125959(0x1a3)](_0x125959(0x1a8)+_0x3a11bc+')');const {configArray:_0x26c276}=await fetchModelList(_0x544e09),_0x47e91f=_0x4dbf52?_0x4dbf52+_0x125959(0x197):_0x125959(0x199),_0x232b33=_0x4dbf52?_0x4dbf52+'-client':_0x125959(0x196);console[_0x125959(0x1a3)](_0x125959(0x18b)),console[_0x125959(0x1a3)](_0x125959(0x195)+_0x47e91f+_0x125959(0x1a4)),console[_0x125959(0x1a3)](_0x125959(0x195)+_0x232b33+_0x125959(0x1a6)),console[_0x125959(0x1a3)](_0x125959(0x19d)+_0x26c276[_0x125959(0x19a)]+'\x20个数据集...');const _0x26f176=await generateApiFile(_0x26c276,_0x4dbf52,_0x544e09,!![],_0x3a11bc);return console['log'](_0x125959(0x188)+_0x26c276[_0x125959(0x19a)]+_0x125959(0x1a1)+_0x26f176[_0x125959(0x19c)]+_0x125959(0x189)),_0x16bb6b&&logger[_0x125959(0x1a2)](_0x125959(0x185),_0x125959(0x194)+_0x544e09,{'projectPath':_0x16bb6b,'appCode':_0x544e09,'datasetCount':_0x26c276[_0x125959(0x19a)],'filePrefix':_0x4dbf52}),!![];}catch(_0x1f6f70){const _0x2a8990=_0x1f6f70 instanceof Error?_0x1f6f70[_0x125959(0x193)]:String(_0x1f6f70);return console['error'](_0x125959(0x1a9),_0x2a8990),_0x16bb6b&&logger[_0x125959(0x18c)](_0x125959(0x185),_0x125959(0x1a7)+_0x2a8990,{'appCode':_0x544e09,'projectPath':_0x16bb6b}),![];}finally{_0x8eedc7&&process['chdir'](_0x8eedc7);}}
@@ -1 +1 @@
1
- (function(_0x5d8ebd,_0x14c31b){const _0x497ad1=a12_0x2e53,_0x34ee38=_0x5d8ebd();while(!![]){try{const _0x59035f=-parseInt(_0x497ad1(0x103))/0x1*(-parseInt(_0x497ad1(0xf0))/0x2)+parseInt(_0x497ad1(0xea))/0x3+parseInt(_0x497ad1(0xe3))/0x4*(parseInt(_0x497ad1(0xff))/0x5)+-parseInt(_0x497ad1(0xd7))/0x6+-parseInt(_0x497ad1(0xfc))/0x7*(-parseInt(_0x497ad1(0xca))/0x8)+-parseInt(_0x497ad1(0xfb))/0x9+-parseInt(_0x497ad1(0xdf))/0xa;if(_0x59035f===_0x14c31b)break;else _0x34ee38['push'](_0x34ee38['shift']());}catch(_0x208a4f){_0x34ee38['push'](_0x34ee38['shift']());}}}(a12_0x52fb,0xc84c5));import{jsx as a12_0x3f3357,jsxs as a12_0x5c7ba1,Fragment as a12_0x2be73b}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';function a12_0x52fb(){const _0x59d0ba=['*\x20CSS\x20链接:\x20','请输入有效的\x20JS\x20https\x20链接','trim','creating','13248342MlNinT','35WeYueI','delete','blue','5gDxvnJ','column','yellow','!\x20未找到本地页面,请先创建页面','5lsEsfa','add','backspace','max','JS\x20链接','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认','done','has','upArrow','downArrow','\x20命令重新登录','CSS\x20链接无法访问','input-css','length','join','red','642888AHdJcw','size','请至少选择一个菜单','[\x20]','\x20输入项目的\x20JS\x20资源链接(https://...)','\x20正在获取线上菜单列表...','green','请输入有效的\x20CSS\x20https\x20链接','slice','*\x20同步菜单到\x20Lovrabet\x20平台','value','return','菜单名称','3369822erKBDp','cyan','then','map','JS\x20链接无法访问','√\x20菜单创建完成','local','\x20←\x20','7874570JogqEO','includes','catch','online','1872308GhYUZh','lovrabet\x20auth','filter','fill','path','selecting','*\x20正在创建菜单...','3790968oxxTVl','label','input-js','repeat','test','*\x20JS\x20链接:\x20','603206vsVYVt','\x20输入项目的\x20CSS\x20资源链接(https://...)','创建菜单失败','message','gray','white','已选择菜单'];a12_0x52fb=function(){return _0x59d0ba;};return a12_0x52fb();}import{useEffect,useState}from'react';import a12_0x202c94 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x3f3357(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x121af4=a12_0x2e53,{exit:_0x112782}=useApp(),{loading:_0x2189c3,menuList:_0x163127,error:_0x3d0946}=useGetOnlineMenuList(),_0x4af717=getLocalPages(),_0x152e51=_0x163127[_0x121af4(0xda)](_0x172f59=>_0x172f59['path']),_0x510526=[_0x121af4(0xd6),..._0x4af717[_0x121af4(0xda)](_0x5b9c8b=>_0x5b9c8b[_0x121af4(0xeb)])],_0x5c65af=getStringWidth(getMaxWidth(_0x510526,0x4)),_0x5a3f33=getStringWidth(getMaxWidth([_0x121af4(0xd6)])),[_0x355caf,_0x4b1af1]=useState(_0x121af4(0xe8)),[_0x500329,_0x54c107]=useState(new Set()),[_0x5c7bdd,_0x43bb41]=useState(0x0),[_0x125cb0,_0x5b86ec]=useState(''),[_0x515aff,_0x5ebc77]=useState(''),[_0x22e5f4,_0x49922b]=useState(''),[_0x3256d9,_0x27bde4]=useState(''),[_0x3af769,_0x2decc3]=useState([]),_0x11d011=_0x4af717[_0x121af4(0xda)](_0x379df4=>({'label':_0x379df4[_0x121af4(0xeb)],'path':_0x379df4[_0x121af4(0xe7)],'local':!![],'online':_0x152e51[_0x121af4(0xe0)](_0x379df4[_0x121af4(0xe7)])})),_0x424e52=_0x4af717[_0x121af4(0xe5)](_0x13775c=>{const _0xa64549=_0x121af4;return!_0x152e51[_0xa64549(0xe0)](_0x13775c['path']);});useEffect(()=>{const _0x1928ff=_0x121af4;if(!_0x2189c3&&_0x4af717[_0x1928ff(0xc7)]>0x0&&_0x500329[_0x1928ff(0xcb)]===0x0){const _0x2a1c06=new Set(_0x4af717[_0x1928ff(0xda)]((_0x1c8073,_0x7093b8)=>({'page':_0x1c8073,'index':_0x7093b8}))[_0x1928ff(0xe5)](({page:_0x4d263e})=>!_0x152e51['includes'](_0x4d263e[_0x1928ff(0xe7)]))[_0x1928ff(0xda)](({index:_0x3d1869})=>_0x3d1869));_0x54c107(_0x2a1c06);}},[_0x2189c3,_0x4af717[_0x121af4(0xc7)],_0x152e51['length']]),useInput(async(_0x57a76c,_0x3844fc)=>{const _0x3e09e6=_0x121af4;if(_0x355caf===_0x3e09e6(0xe8)){if(_0x3844fc[_0x3e09e6(0xc2)]){_0x43bb41(_0x148e2b=>_0x148e2b>0x0?_0x148e2b-0x1:_0x4af717[_0x3e09e6(0xc7)]-0x1);return;}if(_0x3844fc[_0x3e09e6(0xc3)]){_0x43bb41(_0x3c5b2d=>_0x3c5b2d<_0x4af717[_0x3e09e6(0xc7)]-0x1?_0x3c5b2d+0x1:0x0);return;}if(_0x57a76c==='\x20'){_0x54c107(_0x1f2e40=>{const _0x4ab496=_0x3e09e6,_0x4da98c=new Set(_0x1f2e40);return _0x4da98c[_0x4ab496(0xc1)](_0x5c7bdd)?_0x4da98c['delete'](_0x5c7bdd):_0x4da98c[_0x4ab496(0xbb)](_0x5c7bdd),_0x4da98c;});return;}if(_0x57a76c==='a'||_0x57a76c==='A'){const _0x17b561=new Set(_0x4af717['map']((_0x5591c8,_0x201c5f)=>_0x201c5f));_0x54c107(_0x17b561);return;}if(_0x57a76c==='i'||_0x57a76c==='I'||_0x57a76c==='r'||_0x57a76c==='R'){_0x54c107(_0x141da5=>{const _0x40a888=_0x3e09e6,_0x26d0e2=new Set();for(let _0x1f69c7=0x0;_0x1f69c7<_0x4af717[_0x40a888(0xc7)];_0x1f69c7++){!_0x141da5[_0x40a888(0xc1)](_0x1f69c7)&&_0x26d0e2[_0x40a888(0xbb)](_0x1f69c7);}return _0x26d0e2;});return;}if(_0x57a76c==='q'||_0x57a76c==='Q'){_0x112782();return;}if(_0x3844fc[_0x3e09e6(0xd5)]){if(_0x500329[_0x3e09e6(0xcb)]===0x0){_0x27bde4(_0x3e09e6(0xcc));return;}const _0x11e79c=_0x4af717[_0x3e09e6(0xe5)]((_0x58d09d,_0x2f1ae3)=>_0x500329[_0x3e09e6(0xc1)](_0x2f1ae3)),_0x4dd736=_0x11e79c[_0x3e09e6(0xda)](_0x364659=>_0x364659[_0x3e09e6(0xeb)])[_0x3e09e6(0xc8)](',\x20');_0x2decc3([{'label':_0x3e09e6(0xf6),'value':_0x500329[_0x3e09e6(0xcb)]+'\x20个'}]),_0x27bde4(''),_0x4b1af1(_0x3e09e6(0xec));return;}return;}if(_0x355caf===_0x3e09e6(0xec)){if(_0x3844fc[_0x3e09e6(0xd5)]){const _0x430094=_0x22e5f4[_0x3e09e6(0xf9)]();if(_0x430094==='')return;if(!isValidJsHttpsUrl(_0x430094)){_0x27bde4(_0x3e09e6(0xf8));return;}if(!await isUrlReachable(_0x430094)){_0x27bde4(_0x3e09e6(0xdb));return;}_0x5b86ec(_0x430094),_0x2decc3(_0x42ac5a=>[..._0x42ac5a,{'label':_0x3e09e6(0xbe),'value':_0x430094}]),_0x49922b(''),_0x27bde4(''),_0x4b1af1('input-css');return;}if(_0x3844fc[_0x3e09e6(0xbc)]||_0x3844fc['delete']){_0x49922b(_0x5efa2a=>_0x5efa2a[_0x3e09e6(0xd2)](0x0,-0x1)),_0x27bde4('');return;}_0x49922b(_0x469ad3=>_0x469ad3+_0x57a76c);return;}if(_0x355caf===_0x3e09e6(0xc6)){if(_0x3844fc[_0x3e09e6(0xd5)]){const _0x19988c=_0x22e5f4[_0x3e09e6(0xf9)]();if(_0x19988c==='')return;if(!isValidCssHttpsUrl(_0x19988c)){_0x27bde4(_0x3e09e6(0xd1));return;}if(!await isUrlReachable(_0x19988c)){_0x27bde4(_0x3e09e6(0xc5));return;}_0x5ebc77(_0x19988c),_0x2decc3(_0x55cbcb=>[..._0x55cbcb,{'label':'CSS\x20链接','value':_0x19988c}]),_0x49922b(''),_0x27bde4(''),_0x4b1af1(_0x3e09e6(0xfa));const _0x9dc61=_0x4af717[_0x3e09e6(0xe5)]((_0x171515,_0x361a72)=>_0x500329[_0x3e09e6(0xc1)](_0x361a72));createMenus(_0x9dc61,[_0x125cb0,_0x19988c])[_0x3e09e6(0xd9)](()=>{const _0x26f07e=_0x3e09e6;_0x4b1af1(_0x26f07e(0xc0)),setTimeout(()=>{_0x112782();},0x3e8);})[_0x3e09e6(0xe1)](_0x4f62e6=>{const _0x3540a7=_0x3e09e6;_0x27bde4(_0x4f62e6[_0x3540a7(0xf3)]||_0x3540a7(0xf2)),_0x4b1af1(_0x3540a7(0xe8));});return;}if(_0x3844fc[_0x3e09e6(0xbc)]||_0x3844fc[_0x3e09e6(0xfd)]){_0x49922b(_0x5edc22=>_0x5edc22[_0x3e09e6(0xd2)](0x0,-0x1)),_0x27bde4('');return;}_0x49922b(_0x7e905c=>_0x7e905c+_0x57a76c);return;}});if(_0x2189c3)return a12_0x5c7ba1(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x3f3357(Text,{'children':'\x20\x20'}),a12_0x3f3357(a12_0x202c94,{'type':'dots'}),a12_0x3f3357(Text,{'children':_0x121af4(0xcf)})]});if(_0x3d0946)return a12_0x5c7ba1(Box,{'flexDirection':_0x121af4(0x100),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['✗\x20',_0x3d0946]}),a12_0x5c7ba1(Box,{'marginTop':0x1,'children':[a12_0x3f3357(Text,{'color':'gray','children':'提示:使用\x20'}),a12_0x3f3357(Text,{'color':_0x121af4(0xd8),'children':_0x121af4(0xe4)}),a12_0x3f3357(Text,{'color':_0x121af4(0xf4),'children':_0x121af4(0xc4)})]})]});if(_0x4af717[_0x121af4(0xc7)]===0x0)return a12_0x3f3357(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x3f3357(Text,{'color':_0x121af4(0x101),'children':_0x121af4(0x102)})});return a12_0x5c7ba1(Box,{'flexDirection':_0x121af4(0x100),'marginTop':0x1,'marginBottom':0x1,'children':[_0x355caf===_0x121af4(0xe8)&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'bold':!![],'children':['\x20\x20',_0x121af4(0xd6),getRemainingSpaces(_0x5c65af,_0x121af4(0xd6))]}),a12_0x5c7ba1(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x5a3f33,_0x121af4(0xd6))]}),a12_0x5c7ba1(Text,{'bold':!![],'children':['Lovrabet平台',getRemainingSpaces(_0x5a3f33,_0x121af4(0xd6))]})]}),_0x11d011[_0x121af4(0xda)](_0x1371a7=>a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'children':['\x20\x20',_0x1371a7[_0x121af4(0xeb)],getRemainingSpaces(_0x5c65af,_0x1371a7[_0x121af4(0xeb)])]}),a12_0x5c7ba1(Text,{'color':_0x121af4(0xd0),'children':[_0x1371a7[_0x121af4(0xdd)]?'✓':'✗',getRemainingSpaces(_0x5a3f33,'✓')]}),a12_0x5c7ba1(Text,{'color':_0x1371a7['online']?'green':_0x121af4(0xc9),'children':[_0x1371a7[_0x121af4(0xe2)]?'✓':'✗',getRemainingSpaces(_0x5a3f33,'✓')]})]},_0x1371a7[_0x121af4(0xe7)]))]}),_0x355caf===_0x121af4(0xe8)&&_0x3af769['length']===0x0&&a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x3f3357(Text,{'color':'cyan','children':_0x121af4(0xd3)})}),_0x3af769[_0x121af4(0xda)]((_0x3dc4f5,_0x5dce1)=>a12_0x5c7ba1(Box,{'children':[a12_0x5c7ba1(Text,{'color':'green','children':['√\x20',_0x3dc4f5[_0x121af4(0xeb)],':\x20']}),a12_0x3f3357(Text,{'color':_0x121af4(0xd8),'children':_0x3dc4f5[_0x121af4(0xd4)]})]},_0x5dce1)),_0x3256d9&&_0x355caf===_0x121af4(0xe8)&&a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['✗\x20',_0x3256d9]})}),_0x355caf==='selecting'&&a12_0x3f3357(a12_0x2be73b,{'children':a12_0x5c7ba1(Box,{'marginTop':_0x3af769[_0x121af4(0xc7)]>0x0||_0x3256d9?0x1:0x0,'flexDirection':_0x121af4(0x100),'children':[a12_0x3f3357(Text,{'bold':!![],'children':'*\x20请选择要同步的菜单:'}),_0x4af717[_0x121af4(0xda)]((_0x4cf289,_0x526766)=>{const _0xb45f92=_0x121af4,_0x1593cd=_0x5c7bdd===_0x526766,_0x1d4e8f=_0x500329['has'](_0x526766),_0x55c3c3=_0x152e51[_0xb45f92(0xe0)](_0x4cf289[_0xb45f92(0xe7)]),_0x580564=_0x55c3c3?'更新':'新建';return a12_0x3f3357(Box,{'children':a12_0x5c7ba1(Text,{'backgroundColor':_0x1593cd?_0xb45f92(0xfe):undefined,'color':_0x1593cd?_0xb45f92(0xf5):undefined,'children':['\x20\x20',_0x1d4e8f?'[✓]':_0xb45f92(0xcd),'\x20',_0x4cf289['label']]})},_0x4cf289[_0xb45f92(0xe7)]);}),a12_0x3f3357(Box,{'marginTop':0x1,'children':a12_0x5c7ba1(Text,{'color':_0x121af4(0xf4),'children':['\x20',_0x121af4(0xbf)]})})]})}),_0x355caf===_0x121af4(0xec)&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x3f3357(Text,{'children':_0x121af4(0xef)}),a12_0x3f3357(Text,{'color':_0x121af4(0xd0),'children':_0x22e5f4}),_0x3256d9&&a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':['\x20←\x20',_0x3256d9]})]}),!_0x3256d9&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':_0x121af4(0xf4),'children':_0x121af4(0xce)})})]}),_0x355caf==='input-css'&&a12_0x5c7ba1(a12_0x2be73b,{'children':[a12_0x5c7ba1(Box,{'children':[a12_0x3f3357(Text,{'children':_0x121af4(0xf7)}),a12_0x3f3357(Text,{'color':_0x121af4(0xd0),'children':_0x22e5f4}),_0x3256d9&&a12_0x5c7ba1(Text,{'color':_0x121af4(0xc9),'children':[_0x121af4(0xde),_0x3256d9]})]}),!_0x3256d9&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':'gray','children':_0x121af4(0xf1)})})]}),_0x355caf===_0x121af4(0xfa)&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'children':_0x121af4(0xe9)})}),_0x355caf===_0x121af4(0xc0)&&a12_0x3f3357(Box,{'children':a12_0x3f3357(Text,{'color':'green','children':_0x121af4(0xdc)})})]});}function getStringWidth(_0x3e5d52){const _0x2908ea=a12_0x2e53;let _0x3ad012=0x0;for(const _0x4de7f7 of _0x3e5d52){/[\u4e00-\u9fa5]/[_0x2908ea(0xee)](_0x4de7f7)?_0x3ad012+=0x2:_0x3ad012+=0x1;}return _0x3ad012;}function getRemainingSpaces(_0x5753b2,_0x38925d){const _0x458bab=a12_0x2e53,_0x39ac66=getStringWidth(_0x38925d);return Array(Math[_0x458bab(0xbd)](0x0,_0x5753b2-_0x39ac66))[_0x458bab(0xe6)]('\x20')['join']('');}function a12_0x2e53(_0x21f5b9,_0x47634b){_0x21f5b9=_0x21f5b9-0xbb;const _0x52fb9c=a12_0x52fb();let _0x2e5374=_0x52fb9c[_0x21f5b9];return _0x2e5374;}function getMaxWidth(_0x306b3f,_0xa3d691=0x2){const _0x2c5257=a12_0x2e53;let _0x517d43='',_0x34d138=0x0;for(const _0x5b7fc0 of _0x306b3f){const _0x1a4299=getStringWidth(_0x5b7fc0);_0x1a4299>_0x34d138&&(_0x34d138=_0x1a4299,_0x517d43=_0x5b7fc0);}return _0x517d43+'\x20'[_0x2c5257(0xed)](_0xa3d691);}
1
+ (function(_0x1f427f,_0x40d0f8){const _0x566a31=a12_0x20ca,_0x14e6f7=_0x1f427f();while(!![]){try{const _0x36368d=parseInt(_0x566a31(0x20c))/0x1*(-parseInt(_0x566a31(0x21b))/0x2)+-parseInt(_0x566a31(0x215))/0x3+parseInt(_0x566a31(0x22e))/0x4*(parseInt(_0x566a31(0x222))/0x5)+-parseInt(_0x566a31(0x1f9))/0x6*(parseInt(_0x566a31(0x1ea))/0x7)+parseInt(_0x566a31(0x1f0))/0x8*(-parseInt(_0x566a31(0x229))/0x9)+-parseInt(_0x566a31(0x221))/0xa*(-parseInt(_0x566a31(0x1f6))/0xb)+parseInt(_0x566a31(0x213))/0xc*(parseInt(_0x566a31(0x210))/0xd);if(_0x36368d===_0x40d0f8)break;else _0x14e6f7['push'](_0x14e6f7['shift']());}catch(_0x21d362){_0x14e6f7['push'](_0x14e6f7['shift']());}}}(a12_0x3df1,0x78326));import{jsx as a12_0x5bcc98,jsxs as a12_0x1fcba6,Fragment as a12_0x1be7d4}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a12_0x389237 from'ink-spinner';import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';function a12_0x20ca(_0x2bd162,_0x2c4518){_0x2bd162=_0x2bd162-0x1ea;const _0x3df192=a12_0x3df1();let _0x20ca17=_0x3df192[_0x2bd162];return _0x20ca17;}import{getLocalPages}from'./get-local-pages.js';function a12_0x3df1(){const _0x53f836=['backspace','10777gcxLSt','*\x20同步菜单到\x20Lovrabet\x20平台','√\x20菜单创建完成','29604HvIHrF','CSS\x20链接无法访问','348897gYlwnU','label','green','max','\x20输入项目的\x20JS\x20资源链接(https://...)','\x20命令重新登录','1794442bUKPbD','请输入有效的\x20CSS\x20https\x20链接','local','filter','upArrow','slice','10GkMFTw','45jRBJpR','*\x20JS\x20链接:\x20','includes','*\x20请选择要同步的菜单:','请输入有效的\x20JS\x20https\x20链接','\x20正在获取线上菜单列表...','path','9fOitQa','online','创建菜单失败','cyan','菜单名称','259352kKyTJK','message','JS\x20链接无法访问','8729WcDntm','dots','join','done','\x20←\x20','selecting','7122832qkNbjh','test','length','add','已选择菜单','提示:使用\x20','7785283KdRGbr','gray','map','4524wUghEl','white','delete','red','lovrabet\x20auth','creating','input-css','fill','has','trim','input-js','CSS\x20链接','repeat','Lovrabet平台','JS\x20链接','size','return','请至少选择一个菜单','*\x20正在创建菜单...','1LotyHK','[\x20]','column'];a12_0x3df1=function(){return _0x53f836;};return a12_0x3df1();}import{createMenus}from'./create-menu.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import.meta.main&&render(a12_0x5bcc98(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x1984ef=a12_0x20ca,{exit:_0x3fe2d6}=useApp(),{loading:_0x395867,menuList:_0x30024b,error:_0xcef265}=useGetOnlineMenuList(),_0x4da114=getLocalPages(),_0x49bb67=_0x30024b[_0x1984ef(0x1f8)](_0x3fd622=>_0x3fd622['path']),_0x19ac7b=[_0x1984ef(0x22d),..._0x4da114['map'](_0x5d7a92=>_0x5d7a92['label'])],_0x3ddf8e=getStringWidth(getMaxWidth(_0x19ac7b,0x4)),_0x28e0cd=getStringWidth(getMaxWidth([_0x1984ef(0x22d)])),[_0x4dfbe4,_0x34a925]=useState(_0x1984ef(0x1ef)),[_0x506728,_0x24bd2e]=useState(new Set()),[_0x4076a5,_0x1b8c22]=useState(0x0),[_0x1efe3b,_0x485896]=useState(''),[_0x3a0684,_0x5c141f]=useState(''),[_0x2aec27,_0x2f5920]=useState(''),[_0xc5434a,_0x272cd9]=useState(''),[_0x1c39b9,_0x325dc8]=useState([]),_0x270af9=_0x4da114[_0x1984ef(0x1f8)](_0x5b2e9e=>({'label':_0x5b2e9e[_0x1984ef(0x216)],'path':_0x5b2e9e[_0x1984ef(0x228)],'local':!![],'online':_0x49bb67[_0x1984ef(0x224)](_0x5b2e9e[_0x1984ef(0x228)])})),_0x274904=_0x4da114[_0x1984ef(0x21e)](_0x330c53=>{return!_0x49bb67['includes'](_0x330c53['path']);});useEffect(()=>{const _0x3006b2=_0x1984ef;if(!_0x395867&&_0x4da114[_0x3006b2(0x1f2)]>0x0&&_0x506728[_0x3006b2(0x208)]===0x0){const _0x554a11=new Set(_0x4da114[_0x3006b2(0x1f8)]((_0x243b11,_0x1ea128)=>({'page':_0x243b11,'index':_0x1ea128}))[_0x3006b2(0x21e)](({page:_0x534d8c})=>!_0x49bb67[_0x3006b2(0x224)](_0x534d8c[_0x3006b2(0x228)]))[_0x3006b2(0x1f8)](({index:_0x44166a})=>_0x44166a));_0x24bd2e(_0x554a11);}},[_0x395867,_0x4da114[_0x1984ef(0x1f2)],_0x49bb67[_0x1984ef(0x1f2)]]),useInput(async(_0x3b599a,_0x287372)=>{const _0x5b073f=_0x1984ef;if(_0x4dfbe4===_0x5b073f(0x1ef)){if(_0x287372[_0x5b073f(0x21f)]){_0x1b8c22(_0x15b4ae=>_0x15b4ae>0x0?_0x15b4ae-0x1:_0x4da114[_0x5b073f(0x1f2)]-0x1);return;}if(_0x287372['downArrow']){_0x1b8c22(_0x1b4d0f=>_0x1b4d0f<_0x4da114[_0x5b073f(0x1f2)]-0x1?_0x1b4d0f+0x1:0x0);return;}if(_0x3b599a==='\x20'){_0x24bd2e(_0x1fd455=>{const _0x82ebfa=_0x5b073f,_0x869253=new Set(_0x1fd455);return _0x869253['has'](_0x4076a5)?_0x869253[_0x82ebfa(0x1fb)](_0x4076a5):_0x869253[_0x82ebfa(0x1f3)](_0x4076a5),_0x869253;});return;}if(_0x3b599a==='a'||_0x3b599a==='A'){const _0x1083df=new Set(_0x4da114[_0x5b073f(0x1f8)]((_0x5073bc,_0x31df14)=>_0x31df14));_0x24bd2e(_0x1083df);return;}if(_0x3b599a==='i'||_0x3b599a==='I'||_0x3b599a==='r'||_0x3b599a==='R'){_0x24bd2e(_0x3fe767=>{const _0x24daeb=_0x5b073f,_0x3e3dbc=new Set();for(let _0x2f1e9e=0x0;_0x2f1e9e<_0x4da114[_0x24daeb(0x1f2)];_0x2f1e9e++){!_0x3fe767[_0x24daeb(0x201)](_0x2f1e9e)&&_0x3e3dbc[_0x24daeb(0x1f3)](_0x2f1e9e);}return _0x3e3dbc;});return;}if(_0x3b599a==='q'||_0x3b599a==='Q'){_0x3fe2d6();return;}if(_0x287372[_0x5b073f(0x209)]){if(_0x506728[_0x5b073f(0x208)]===0x0){_0x272cd9(_0x5b073f(0x20a));return;}const _0x149f23=_0x4da114['filter']((_0x7aa396,_0x2cb57b)=>_0x506728['has'](_0x2cb57b)),_0x472f42=_0x149f23[_0x5b073f(0x1f8)](_0x4ad397=>_0x4ad397[_0x5b073f(0x216)])[_0x5b073f(0x1ec)](',\x20');_0x325dc8([{'label':_0x5b073f(0x1f4),'value':_0x506728[_0x5b073f(0x208)]+'\x20个'}]),_0x272cd9(''),_0x34a925(_0x5b073f(0x203));return;}return;}if(_0x4dfbe4===_0x5b073f(0x203)){if(_0x287372[_0x5b073f(0x209)]){const _0x8b484d=_0x2aec27[_0x5b073f(0x202)]();if(_0x8b484d==='')return;if(!isValidJsHttpsUrl(_0x8b484d)){_0x272cd9(_0x5b073f(0x226));return;}if(!await isUrlReachable(_0x8b484d)){_0x272cd9(_0x5b073f(0x230));return;}_0x485896(_0x8b484d),_0x325dc8(_0x5363d5=>[..._0x5363d5,{'label':_0x5b073f(0x207),'value':_0x8b484d}]),_0x2f5920(''),_0x272cd9(''),_0x34a925(_0x5b073f(0x1ff));return;}if(_0x287372[_0x5b073f(0x20f)]||_0x287372[_0x5b073f(0x1fb)]){_0x2f5920(_0x454eb8=>_0x454eb8[_0x5b073f(0x220)](0x0,-0x1)),_0x272cd9('');return;}_0x2f5920(_0x4c554c=>_0x4c554c+_0x3b599a);return;}if(_0x4dfbe4==='input-css'){if(_0x287372[_0x5b073f(0x209)]){const _0x563ae2=_0x2aec27[_0x5b073f(0x202)]();if(_0x563ae2==='')return;if(!isValidCssHttpsUrl(_0x563ae2)){_0x272cd9(_0x5b073f(0x21c));return;}if(!await isUrlReachable(_0x563ae2)){_0x272cd9(_0x5b073f(0x214));return;}_0x5c141f(_0x563ae2),_0x325dc8(_0x4ca6d0=>[..._0x4ca6d0,{'label':_0x5b073f(0x204),'value':_0x563ae2}]),_0x2f5920(''),_0x272cd9(''),_0x34a925(_0x5b073f(0x1fe));const _0x6c3403=_0x4da114['filter']((_0x1a474b,_0x556e20)=>_0x506728[_0x5b073f(0x201)](_0x556e20));createMenus(_0x6c3403,[_0x1efe3b,_0x563ae2])['then'](()=>{const _0xdf61c8=_0x5b073f;_0x34a925(_0xdf61c8(0x1ed)),setTimeout(()=>{_0x3fe2d6();},0x3e8);})['catch'](_0x18e001=>{const _0x4f0594=_0x5b073f;_0x272cd9(_0x18e001[_0x4f0594(0x22f)]||_0x4f0594(0x22b)),_0x34a925('selecting');});return;}if(_0x287372[_0x5b073f(0x20f)]||_0x287372['delete']){_0x2f5920(_0x5c60c4=>_0x5c60c4[_0x5b073f(0x220)](0x0,-0x1)),_0x272cd9('');return;}_0x2f5920(_0x38b8f2=>_0x38b8f2+_0x3b599a);return;}});if(_0x395867)return a12_0x1fcba6(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x5bcc98(Text,{'children':'\x20\x20'}),a12_0x5bcc98(a12_0x389237,{'type':_0x1984ef(0x1eb)}),a12_0x5bcc98(Text,{'children':_0x1984ef(0x227)})]});if(_0xcef265)return a12_0x1fcba6(Box,{'flexDirection':_0x1984ef(0x20e),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x1fcba6(Text,{'color':_0x1984ef(0x1fc),'children':['✗\x20',_0xcef265]}),a12_0x1fcba6(Box,{'marginTop':0x1,'children':[a12_0x5bcc98(Text,{'color':_0x1984ef(0x1f7),'children':_0x1984ef(0x1f5)}),a12_0x5bcc98(Text,{'color':_0x1984ef(0x22c),'children':_0x1984ef(0x1fd)}),a12_0x5bcc98(Text,{'color':_0x1984ef(0x1f7),'children':_0x1984ef(0x21a)})]})]});if(_0x4da114[_0x1984ef(0x1f2)]===0x0)return a12_0x5bcc98(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x5bcc98(Text,{'color':'yellow','children':'!\x20未找到本地页面,请先创建页面'})});return a12_0x1fcba6(Box,{'flexDirection':_0x1984ef(0x20e),'marginTop':0x1,'marginBottom':0x1,'children':[_0x4dfbe4===_0x1984ef(0x1ef)&&a12_0x1fcba6(a12_0x1be7d4,{'children':[a12_0x1fcba6(Box,{'children':[a12_0x1fcba6(Text,{'bold':!![],'children':['\x20\x20','菜单名称',getRemainingSpaces(_0x3ddf8e,_0x1984ef(0x22d))]}),a12_0x1fcba6(Text,{'bold':!![],'children':['本地',getRemainingSpaces(_0x28e0cd,_0x1984ef(0x22d))]}),a12_0x1fcba6(Text,{'bold':!![],'children':[_0x1984ef(0x206),getRemainingSpaces(_0x28e0cd,_0x1984ef(0x22d))]})]}),_0x270af9[_0x1984ef(0x1f8)](_0x248f4c=>a12_0x1fcba6(Box,{'children':[a12_0x1fcba6(Text,{'children':['\x20\x20',_0x248f4c[_0x1984ef(0x216)],getRemainingSpaces(_0x3ddf8e,_0x248f4c[_0x1984ef(0x216)])]}),a12_0x1fcba6(Text,{'color':_0x1984ef(0x217),'children':[_0x248f4c[_0x1984ef(0x21d)]?'✓':'✗',getRemainingSpaces(_0x28e0cd,'✓')]}),a12_0x1fcba6(Text,{'color':_0x248f4c[_0x1984ef(0x22a)]?'green':_0x1984ef(0x1fc),'children':[_0x248f4c[_0x1984ef(0x22a)]?'✓':'✗',getRemainingSpaces(_0x28e0cd,'✓')]})]},_0x248f4c['path']))]}),_0x4dfbe4===_0x1984ef(0x1ef)&&_0x1c39b9[_0x1984ef(0x1f2)]===0x0&&a12_0x5bcc98(Box,{'marginTop':0x1,'children':a12_0x5bcc98(Text,{'color':_0x1984ef(0x22c),'children':_0x1984ef(0x211)})}),_0x1c39b9['map']((_0xa91a8f,_0x4304df)=>a12_0x1fcba6(Box,{'children':[a12_0x1fcba6(Text,{'color':'green','children':['√\x20',_0xa91a8f[_0x1984ef(0x216)],':\x20']}),a12_0x5bcc98(Text,{'color':_0x1984ef(0x22c),'children':_0xa91a8f['value']})]},_0x4304df)),_0xc5434a&&_0x4dfbe4==='selecting'&&a12_0x5bcc98(Box,{'marginTop':0x1,'children':a12_0x1fcba6(Text,{'color':_0x1984ef(0x1fc),'children':['✗\x20',_0xc5434a]})}),_0x4dfbe4===_0x1984ef(0x1ef)&&a12_0x5bcc98(a12_0x1be7d4,{'children':a12_0x1fcba6(Box,{'marginTop':_0x1c39b9[_0x1984ef(0x1f2)]>0x0||_0xc5434a?0x1:0x0,'flexDirection':_0x1984ef(0x20e),'children':[a12_0x5bcc98(Text,{'bold':!![],'children':_0x1984ef(0x225)}),_0x4da114[_0x1984ef(0x1f8)]((_0x2e175e,_0x197a0e)=>{const _0x1005b8=_0x1984ef,_0x31210a=_0x4076a5===_0x197a0e,_0x414173=_0x506728[_0x1005b8(0x201)](_0x197a0e),_0x1a6fcc=_0x49bb67[_0x1005b8(0x224)](_0x2e175e[_0x1005b8(0x228)]),_0x48e19f=_0x1a6fcc?'更新':'新建';return a12_0x5bcc98(Box,{'children':a12_0x1fcba6(Text,{'backgroundColor':_0x31210a?'blue':undefined,'color':_0x31210a?_0x1005b8(0x1fa):undefined,'children':['\x20\x20',_0x414173?'[✓]':_0x1005b8(0x20d),'\x20',_0x2e175e[_0x1005b8(0x216)]]})},_0x2e175e[_0x1005b8(0x228)]);}),a12_0x5bcc98(Box,{'marginTop':0x1,'children':a12_0x1fcba6(Text,{'color':_0x1984ef(0x1f7),'children':['\x20','↑/↓:\x20移动光标\x20空格:\x20切换选中\x20a:\x20全选\x20i/r:\x20反选\x20Enter:\x20确认']})})]})}),_0x4dfbe4===_0x1984ef(0x203)&&a12_0x1fcba6(a12_0x1be7d4,{'children':[a12_0x1fcba6(Box,{'children':[a12_0x5bcc98(Text,{'children':_0x1984ef(0x223)}),a12_0x5bcc98(Text,{'color':'green','children':_0x2aec27}),_0xc5434a&&a12_0x1fcba6(Text,{'color':_0x1984ef(0x1fc),'children':[_0x1984ef(0x1ee),_0xc5434a]})]}),!_0xc5434a&&a12_0x5bcc98(Box,{'children':a12_0x5bcc98(Text,{'color':_0x1984ef(0x1f7),'children':_0x1984ef(0x219)})})]}),_0x4dfbe4===_0x1984ef(0x1ff)&&a12_0x1fcba6(a12_0x1be7d4,{'children':[a12_0x1fcba6(Box,{'children':[a12_0x5bcc98(Text,{'children':'*\x20CSS\x20链接:\x20'}),a12_0x5bcc98(Text,{'color':_0x1984ef(0x217),'children':_0x2aec27}),_0xc5434a&&a12_0x1fcba6(Text,{'color':_0x1984ef(0x1fc),'children':[_0x1984ef(0x1ee),_0xc5434a]})]}),!_0xc5434a&&a12_0x5bcc98(Box,{'children':a12_0x5bcc98(Text,{'color':'gray','children':'\x20输入项目的\x20CSS\x20资源链接(https://...)'})})]}),_0x4dfbe4===_0x1984ef(0x1fe)&&a12_0x5bcc98(Box,{'children':a12_0x5bcc98(Text,{'children':_0x1984ef(0x20b)})}),_0x4dfbe4==='done'&&a12_0x5bcc98(Box,{'children':a12_0x5bcc98(Text,{'color':_0x1984ef(0x217),'children':_0x1984ef(0x212)})})]});}function getStringWidth(_0x595af7){const _0x3a1ad5=a12_0x20ca;let _0x26db4d=0x0;for(const _0x5876aa of _0x595af7){/[\u4e00-\u9fa5]/[_0x3a1ad5(0x1f1)](_0x5876aa)?_0x26db4d+=0x2:_0x26db4d+=0x1;}return _0x26db4d;}function getRemainingSpaces(_0x508235,_0x28c8c2){const _0x2c3e20=a12_0x20ca,_0x5e47ec=getStringWidth(_0x28c8c2);return Array(Math[_0x2c3e20(0x218)](0x0,_0x508235-_0x5e47ec))[_0x2c3e20(0x200)]('\x20')[_0x2c3e20(0x1ec)]('');}function getMaxWidth(_0x50d1d2,_0x1c8357=0x2){const _0x296f79=a12_0x20ca;let _0xea14d='',_0x10e25d=0x0;for(const _0x4b64c1 of _0x50d1d2){const _0x479587=getStringWidth(_0x4b64c1);_0x479587>_0x10e25d&&(_0x10e25d=_0x479587,_0xea14d=_0x4b64c1);}return _0xea14d+'\x20'[_0x296f79(0x205)](_0x1c8357);}
@@ -1 +1 @@
1
- (function(_0x177558,_0x3d7afa){const _0x4048e5=a13_0x43dc,_0x75004=_0x177558();while(!![]){try{const _0x96b116=-parseInt(_0x4048e5(0x100))/0x1+parseInt(_0x4048e5(0xf3))/0x2*(-parseInt(_0x4048e5(0xfe))/0x3)+-parseInt(_0x4048e5(0xfd))/0x4*(-parseInt(_0x4048e5(0xd9))/0x5)+parseInt(_0x4048e5(0xe7))/0x6*(-parseInt(_0x4048e5(0x103))/0x7)+parseInt(_0x4048e5(0xdc))/0x8+-parseInt(_0x4048e5(0xfc))/0x9+parseInt(_0x4048e5(0xf7))/0xa;if(_0x96b116===_0x3d7afa)break;else _0x75004['push'](_0x75004['shift']());}catch(_0xec9d7e){_0x75004['push'](_0x75004['shift']());}}}(a13_0x40c7,0xb4883));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0x40c7(){const _0x980afb=['success','正在创建菜单:\x20','json','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','!\x20请使用以下方式之一:','errorCode','/smartapi/menu/create','POST','0011','6wwPGMY','stringify','创建菜单成功:','import','all','info','errorMsg','error','label','创建菜单失败:\x20','includes','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','498sczAly','resources','create-menus','application/json','16401220MuOqBM','登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录','procode','status','data','6276924GLyHBO','108hfhZog','11379HZPorK','appcode','765500zFUhbe','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','create-menu','1705669wmxiwe','log','path','127665lrHorE','批量创建菜单完成,共\x20','菜单创建成功:\x20','8488048vPexjE','未提供应用AppCode,且配置中也没有默认值'];a13_0x40c7=function(){return _0x980afb;};return a13_0x40c7();}function a13_0x43dc(_0xbc9bf0,_0x4c03f9){_0xbc9bf0=_0xbc9bf0-0xd8;const _0x40c739=a13_0x40c7();let _0x43dce4=_0x40c739[_0xbc9bf0];return _0x43dce4;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();export async function createMenu(_0x272848){const _0x318436=a13_0x43dc,_0x319a72=config?.[_0x318436(0xff)];if(!_0x319a72){const _0x59609c=_0x318436(0xdd);logger[_0x318436(0xee)](_0x318436(0x102),_0x59609c),console[_0x318436(0xee)]('×\x20'+_0x59609c),console['log']('!\x20请使用以下方式之一:'),console[_0x318436(0x104)](_0x318436(0x101)),console[_0x318436(0x104)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger[_0x318436(0xec)](_0x318436(0x102),_0x318436(0xdf)+_0x272848[_0x318436(0xef)]+'\x20('+_0x272848[_0x318436(0xd8)]+')');const _0x4b03c7={'appCode':_0x319a72,'type':_0x318436(0xf9),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x272848[_0x318436(0xf4)]?JSON['stringify'](_0x272848[_0x318436(0xf4)]):undefined},..._0x272848},_0x2e53f7=await fetch(getApiDomain()+_0x318436(0xe4),{'method':'POST','body':JSON[_0x318436(0xe8)](_0x4b03c7),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x2e53f7['ok']){if(_0x2e53f7['status']===0x191){const _0x740b69='登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录';logger[_0x318436(0xee)]('create-menu',_0x740b69,{'status':_0x2e53f7[_0x318436(0xfa)],'menu':_0x272848[_0x318436(0xef)]});throw new Error(_0x740b69);}const _0x120cae='创建菜单失败,HTTP状态码:\x20'+_0x2e53f7[_0x318436(0xfa)];logger[_0x318436(0xee)](_0x318436(0x102),_0x120cae,{'menu':_0x272848['label']});throw new Error(_0x120cae);}const _0x269dbf=await _0x2e53f7[_0x318436(0xe0)]();if(!_0x269dbf['success']){const _0x257863='创建菜单失败:\x20'+(_0x269dbf[_0x318436(0xed)]||'未知错误');logger[_0x318436(0xee)](_0x318436(0x102),_0x257863,{'errorCode':_0x269dbf['errorCode'],'errorMsg':_0x269dbf[_0x318436(0xed)],'menu':_0x272848[_0x318436(0xef)]});throw new Error(_0x257863);}logger[_0x318436(0xec)](_0x318436(0x102),_0x318436(0xdb)+_0x272848['label'],_0x269dbf[_0x318436(0xfb)]),console[_0x318436(0x104)](_0x318436(0xe9),_0x269dbf['data']);}async function _createMenu(_0x395089,_0x2878fc){const _0x41de0b=a13_0x43dc,_0x5b7148=config?.[_0x41de0b(0xff)];if(!_0x5b7148){const _0x59c380=_0x41de0b(0xdd);logger['error']('create-menu',_0x59c380),console[_0x41de0b(0xee)]('×\x20'+_0x59c380),console[_0x41de0b(0x104)](_0x41de0b(0xe2)),console[_0x41de0b(0x104)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console[_0x41de0b(0x104)](_0x41de0b(0xf2));return;}const _0x37d948={'appCode':_0x5b7148,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x41de0b(0xea),'resources':_0x2878fc?JSON[_0x41de0b(0xe8)](_0x2878fc):undefined},'label':_0x395089['label'],'path':_0x395089[_0x41de0b(0xd8)]},_0x10029c=await fetch(getApiDomain()+_0x41de0b(0xe4),{'method':_0x41de0b(0xe5),'body':JSON[_0x41de0b(0xe8)](_0x37d948),'headers':{'Content-Type':_0x41de0b(0xf6),'Cookie':getCookie()}});if(!_0x10029c['ok']){if(_0x10029c['status']===0x191){const _0x2be655=_0x41de0b(0xe1);logger[_0x41de0b(0xee)](_0x41de0b(0x102),_0x2be655,{'status':_0x10029c['status'],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x2be655);}const _0x9dbb34='创建菜单失败,HTTP状态码:\x20'+_0x10029c[_0x41de0b(0xfa)];logger['error'](_0x41de0b(0x102),_0x9dbb34,{'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x9dbb34);}const _0x1fc932=await _0x10029c[_0x41de0b(0xe0)]();if(!_0x1fc932[_0x41de0b(0xde)]){if(_0x1fc932[_0x41de0b(0xe3)]===_0x41de0b(0xe6)||_0x1fc932['errorMsg']?.[_0x41de0b(0xf1)]('登录')){const _0x807dba=_0x41de0b(0xf8);logger['error'](_0x41de0b(0x102),_0x807dba,{'errorCode':_0x1fc932['errorCode'],'errorMsg':_0x1fc932['errorMsg'],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x807dba);}const _0x297fce=_0x41de0b(0xf0)+(_0x1fc932[_0x41de0b(0xed)]||'未知错误');logger[_0x41de0b(0xee)](_0x41de0b(0x102),_0x297fce,{'errorCode':_0x1fc932['errorCode'],'errorMsg':_0x1fc932[_0x41de0b(0xed)],'menu':_0x395089[_0x41de0b(0xef)]});throw new Error(_0x297fce);}logger[_0x41de0b(0xec)](_0x41de0b(0x102),_0x41de0b(0xdb)+_0x395089[_0x41de0b(0xef)]);}export async function createMenus(_0x4326d6,_0x521205){const _0x1fbc9c=a13_0x43dc;logger[_0x1fbc9c(0xec)](_0x1fbc9c(0xf5),'开始批量创建菜单,共\x20'+_0x4326d6['length']+'\x20个'),await Promise[_0x1fbc9c(0xeb)](_0x4326d6['map'](async _0xef7d0c=>{await _createMenu(_0xef7d0c,_0x521205);})),logger[_0x1fbc9c(0xec)]('create-menus',_0x1fbc9c(0xda)+_0x4326d6['length']+'\x20个');}
1
+ (function(_0x1313d0,_0x229e71){const _0x94c50=a13_0x2a23,_0x385627=_0x1313d0();while(!![]){try{const _0x372554=-parseInt(_0x94c50(0xf9))/0x1*(parseInt(_0x94c50(0xe8))/0x2)+-parseInt(_0x94c50(0x107))/0x3*(parseInt(_0x94c50(0xeb))/0x4)+parseInt(_0x94c50(0xee))/0x5*(-parseInt(_0x94c50(0x105))/0x6)+-parseInt(_0x94c50(0xfd))/0x7*(parseInt(_0x94c50(0xe9))/0x8)+-parseInt(_0x94c50(0x103))/0x9*(parseInt(_0x94c50(0x101))/0xa)+-parseInt(_0x94c50(0xf7))/0xb+parseInt(_0x94c50(0xff))/0xc;if(_0x372554===_0x229e71)break;else _0x385627['push'](_0x385627['shift']());}catch(_0xa44495){_0x385627['push'](_0x385627['shift']());}}}(a13_0xabb5,0xf372e));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0xabb5(){const _0x2e5266=['import','success','status','POST','errorMsg','0011','正在创建菜单:\x20','1595578fWyLod','128euMFAA','map','8ATvmps','label','log','47520tgKebx','appcode','info','!\x20请使用以下方式之一:','application/json','菜单创建成功:\x20','errorCode','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','error','18005218TNWlMq','开始批量创建菜单,共\x20','2XUHNIu','未提供应用AppCode,且配置中也没有默认值','includes','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','547575TryVVZ','/smartapi/menu/create','95694828uXDlCc','create-menu','10zWKDST','path','1878543YNryNt','创建菜单失败,HTTP状态码:\x20','888aXrPNw','procode','1317102ORADjv','length','创建菜单成功:','未知错误','resources','json','stringify','data','create-menus','创建菜单失败:\x20'];a13_0xabb5=function(){return _0x2e5266;};return a13_0xabb5();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig();function a13_0x2a23(_0x51e5a3,_0x26d9d3){_0x51e5a3=_0x51e5a3-0xe7;const _0xabb53d=a13_0xabb5();let _0x2a2396=_0xabb53d[_0x51e5a3];return _0x2a2396;}export async function createMenu(_0x128def){const _0x3ade28=a13_0x2a23,_0x511c82=config?.[_0x3ade28(0xef)];if(!_0x511c82){const _0x1ff749=_0x3ade28(0xfa);logger['error'](_0x3ade28(0x100),_0x1ff749),console[_0x3ade28(0xf6)]('×\x20'+_0x1ff749),console[_0x3ade28(0xed)]('!\x20请使用以下方式之一:'),console[_0x3ade28(0xed)]('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}logger['info']('create-menu',_0x3ade28(0xe7)+_0x128def[_0x3ade28(0xec)]+'\x20('+_0x128def[_0x3ade28(0x102)]+')');const _0x1af9d6={'appCode':_0x511c82,'type':_0x3ade28(0x106),'sort':0x0,'extend':{'loadScriptMode':_0x3ade28(0x111),'resources':_0x128def[_0x3ade28(0x10b)]?JSON['stringify'](_0x128def[_0x3ade28(0x10b)]):undefined},..._0x128def},_0x2e473d=await fetch(getApiDomain()+_0x3ade28(0xfe),{'method':_0x3ade28(0x114),'body':JSON[_0x3ade28(0x10d)](_0x1af9d6),'headers':{'Content-Type':_0x3ade28(0xf2),'Cookie':getCookie()}});if(!_0x2e473d['ok']){if(_0x2e473d['status']===0x191){const _0x457545=_0x3ade28(0xfc);logger[_0x3ade28(0xf6)]('create-menu',_0x457545,{'status':_0x2e473d[_0x3ade28(0x113)],'menu':_0x128def['label']});throw new Error(_0x457545);}const _0x1b00d2='创建菜单失败,HTTP状态码:\x20'+_0x2e473d[_0x3ade28(0x113)];logger[_0x3ade28(0xf6)](_0x3ade28(0x100),_0x1b00d2,{'menu':_0x128def[_0x3ade28(0xec)]});throw new Error(_0x1b00d2);}const _0x5a908f=await _0x2e473d[_0x3ade28(0x10c)]();if(!_0x5a908f['success']){const _0x21f570=_0x3ade28(0x110)+(_0x5a908f['errorMsg']||_0x3ade28(0x10a));logger[_0x3ade28(0xf6)](_0x3ade28(0x100),_0x21f570,{'errorCode':_0x5a908f[_0x3ade28(0xf4)],'errorMsg':_0x5a908f[_0x3ade28(0x115)],'menu':_0x128def[_0x3ade28(0xec)]});throw new Error(_0x21f570);}logger[_0x3ade28(0xf0)](_0x3ade28(0x100),_0x3ade28(0xf3)+_0x128def[_0x3ade28(0xec)],_0x5a908f[_0x3ade28(0x10e)]),console[_0x3ade28(0xed)](_0x3ade28(0x109),_0x5a908f[_0x3ade28(0x10e)]);}async function _createMenu(_0x3468c1,_0x31bc87){const _0x5828cb=a13_0x2a23,_0x1901df=config?.['appcode'];if(!_0x1901df){const _0x5e1225=_0x5828cb(0xfa);logger[_0x5828cb(0xf6)]('create-menu',_0x5e1225),console[_0x5828cb(0xf6)]('×\x20'+_0x5e1225),console['log'](_0x5828cb(0xf1)),console[_0x5828cb(0xed)](_0x5828cb(0xf5)),console[_0x5828cb(0xed)]('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>');return;}const _0x502488={'appCode':_0x1901df,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x5828cb(0x111),'resources':_0x31bc87?JSON['stringify'](_0x31bc87):undefined},'label':_0x3468c1[_0x5828cb(0xec)],'path':_0x3468c1[_0x5828cb(0x102)]},_0x19d3d8=await fetch(getApiDomain()+_0x5828cb(0xfe),{'method':'POST','body':JSON[_0x5828cb(0x10d)](_0x502488),'headers':{'Content-Type':_0x5828cb(0xf2),'Cookie':getCookie()}});if(!_0x19d3d8['ok']){if(_0x19d3d8[_0x5828cb(0x113)]===0x191){const _0x6704b9=_0x5828cb(0xfc);logger['error'](_0x5828cb(0x100),_0x6704b9,{'status':_0x19d3d8[_0x5828cb(0x113)],'menu':_0x3468c1[_0x5828cb(0xec)]});throw new Error(_0x6704b9);}const _0x328f42=_0x5828cb(0x104)+_0x19d3d8['status'];logger[_0x5828cb(0xf6)](_0x5828cb(0x100),_0x328f42,{'menu':_0x3468c1['label']});throw new Error(_0x328f42);}const _0x24e3ad=await _0x19d3d8[_0x5828cb(0x10c)]();if(!_0x24e3ad[_0x5828cb(0x112)]){if(_0x24e3ad[_0x5828cb(0xf4)]===_0x5828cb(0x116)||_0x24e3ad['errorMsg']?.[_0x5828cb(0xfb)]('登录')){const _0x4dff80='登录态校验失败,请使用\x20lovrabet\x20auth\x20重新登录';logger['error'](_0x5828cb(0x100),_0x4dff80,{'errorCode':_0x24e3ad[_0x5828cb(0xf4)],'errorMsg':_0x24e3ad[_0x5828cb(0x115)],'menu':_0x3468c1[_0x5828cb(0xec)]});throw new Error(_0x4dff80);}const _0x244163='创建菜单失败:\x20'+(_0x24e3ad[_0x5828cb(0x115)]||_0x5828cb(0x10a));logger[_0x5828cb(0xf6)]('create-menu',_0x244163,{'errorCode':_0x24e3ad['errorCode'],'errorMsg':_0x24e3ad['errorMsg'],'menu':_0x3468c1[_0x5828cb(0xec)]});throw new Error(_0x244163);}logger['info'](_0x5828cb(0x100),_0x5828cb(0xf3)+_0x3468c1[_0x5828cb(0xec)]);}export async function createMenus(_0x1bb93e,_0x12b0f8){const _0x44a64b=a13_0x2a23;logger[_0x44a64b(0xf0)](_0x44a64b(0x10f),_0x44a64b(0xf8)+_0x1bb93e[_0x44a64b(0x108)]+'\x20个'),await Promise['all'](_0x1bb93e[_0x44a64b(0xea)](async _0x23fb5a=>{await _createMenu(_0x23fb5a,_0x12b0f8);})),logger[_0x44a64b(0xf0)](_0x44a64b(0x10f),'批量创建菜单完成,共\x20'+_0x1bb93e[_0x44a64b(0x108)]+'\x20个');}
@@ -1 +1 @@
1
- const a14_0xab3c3f=a14_0x1c94;(function(_0x2a9439,_0x5f3bd4){const _0x39890f=a14_0x1c94,_0x4ca98f=_0x2a9439();while(!![]){try{const _0x2ee7e5=-parseInt(_0x39890f(0x189))/0x1+parseInt(_0x39890f(0x184))/0x2*(parseInt(_0x39890f(0x183))/0x3)+parseInt(_0x39890f(0x18b))/0x4*(-parseInt(_0x39890f(0x187))/0x5)+-parseInt(_0x39890f(0x17f))/0x6*(parseInt(_0x39890f(0x18f))/0x7)+-parseInt(_0x39890f(0x18a))/0x8+parseInt(_0x39890f(0x18d))/0x9*(-parseInt(_0x39890f(0x185))/0xa)+parseInt(_0x39890f(0x17e))/0xb*(parseInt(_0x39890f(0x188))/0xc);if(_0x2ee7e5===_0x5f3bd4)break;else _0x4ca98f['push'](_0x4ca98f['shift']());}catch(_0x360620){_0x4ca98f['push'](_0x4ca98f['shift']());}}}(a14_0x4bd0,0x2e2f1));function a14_0x4bd0(){const _0x350e2e=['src/pages','18410smeEZX','push','concat','.tsx','replaceAll','match','slice','filter','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','endsWith','utf-8','9970147BPKhNy','834mvhHyl','replace','path','trim','443943tJCxxk','4AlnhmX','70SfmUNL','index.tsx','90085xZYLVf','12PdvODQ','106395CwrkdW','2743640CmBuOw','16XidzhT','cwd','162234ACjFMV'];a14_0x4bd0=function(){return _0x350e2e;};return a14_0x4bd0();}function a14_0x1c94(_0x48da89,_0x550e7f){_0x48da89=_0x48da89-0x17a;const _0x4bd0f8=a14_0x4bd0();let _0x1c9460=_0x4bd0f8[_0x48da89];return _0x1c9460;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0xab3c3f(0x18c)](),a14_0xab3c3f(0x18e));export function extractTitleFromComment(_0x4db62a){const _0x817243=a14_0xab3c3f;try{const _0x942dae=readFileSync(_0x4db62a,_0x817243(0x17d)),_0x27b435=_0x942dae[_0x817243(0x194)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x27b435&&_0x27b435[0x1]){const _0x321b9c=_0x27b435[0x1],_0x4bd4c8=_0x321b9c['match'](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4bd4c8&&_0x4bd4c8[0x1])return _0x4bd4c8[0x1][_0x817243(0x182)]();}let _0x5266d=null;const _0x24a701=_0x942dae['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x24a701&&_0x24a701[0x1]&&(_0x5266d=_0x24a701[0x1]);if(!_0x5266d){const _0x4bac50=_0x942dae[_0x817243(0x194)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4bac50&&_0x4bac50[0x1]&&(_0x5266d=_0x4bac50[0x1]);}if(_0x5266d){const _0x34d6c1=new RegExp('\x5cb'+_0x5266d+_0x817243(0x17b)),_0x4bcdbc=_0x942dae[_0x817243(0x194)](_0x34d6c1);if(_0x4bcdbc&&_0x4bcdbc[0x1])return _0x4bcdbc[0x1];return _0x5266d;}return null;}catch(_0x24df80){return null;}}export function getLocalPages(_0x2ae4bb=pagesDir,_0x20102c=pagesDir){const _0x245923=a14_0xab3c3f;let _0x568e5a=[];const _0x5c1d99=readdirSync(_0x2ae4bb);return _0x5c1d99['forEach'](_0x31adcc=>{const _0xc5d0e5=a14_0x1c94,_0x2e8472=join(_0x2ae4bb,_0x31adcc),_0x51c775=statSync(_0x2e8472);if(_0x51c775&&_0x51c775['isDirectory']())_0x568e5a=_0x568e5a[_0xc5d0e5(0x191)](getLocalPages(_0x2e8472,_0x20102c));else{if(_0x31adcc[_0xc5d0e5(0x17c)](_0xc5d0e5(0x192))){let _0x372231=relative(_0x20102c,_0x2e8472);_0x372231[_0xc5d0e5(0x17c)](_0xc5d0e5(0x186))?_0x372231=_0x372231[_0xc5d0e5(0x180)](/index\.tsx$/,''):_0x372231=_0x372231[_0xc5d0e5(0x180)](/\.tsx$/,'');_0x372231[_0xc5d0e5(0x17c)]('/')&&(_0x372231=_0x372231[_0xc5d0e5(0x195)](0x0,-0x1));const _0x4c9cbe=extractTitleFromComment(_0x2e8472),_0x42d893=_0x4c9cbe||_0x372231;_0x568e5a[_0xc5d0e5(0x190)]({'path':_0x372231[_0xc5d0e5(0x193)]('$',':'),'label':_0x42d893});}}}),_0x568e5a[_0x245923(0x17a)](_0x28e948=>_0x28e948[_0x245923(0x181)]!=='');}
1
+ const a14_0x556edc=a14_0x9dc9;(function(_0x51f2cb,_0xcedc52){const _0x48cc26=a14_0x9dc9,_0x186ba1=_0x51f2cb();while(!![]){try{const _0x8f6556=parseInt(_0x48cc26(0x1ad))/0x1+-parseInt(_0x48cc26(0x19d))/0x2*(parseInt(_0x48cc26(0x1ab))/0x3)+-parseInt(_0x48cc26(0x198))/0x4+parseInt(_0x48cc26(0x1a0))/0x5*(parseInt(_0x48cc26(0x1a3))/0x6)+parseInt(_0x48cc26(0x1a8))/0x7*(-parseInt(_0x48cc26(0x1a5))/0x8)+parseInt(_0x48cc26(0x19c))/0x9*(-parseInt(_0x48cc26(0x1aa))/0xa)+parseInt(_0x48cc26(0x19a))/0xb;if(_0x8f6556===_0xcedc52)break;else _0x186ba1['push'](_0x186ba1['shift']());}catch(_0x1a800e){_0x186ba1['push'](_0x186ba1['shift']());}}}(a14_0x5e6f,0x1f8d5));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0x556edc(0x1a9)](),a14_0x556edc(0x1a4));function a14_0x5e6f(){const _0x4e3f0f=['7dGFXMU','cwd','908130rqyCAq','9096lJHocm','match','125613HVBQuD','forEach','endsWith','index.tsx','utf-8','.tsx','42260CmFcwL','concat','2093355Nprayb','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','9ErGqqy','124uIQiel','filter','slice','10kgEVMC','trim','push','516030gKusfr','src/pages','554632SODsXB','replace','isDirectory'];a14_0x5e6f=function(){return _0x4e3f0f;};return a14_0x5e6f();}export function extractTitleFromComment(_0x162a68){const _0x42b61f=a14_0x556edc;try{const _0x1f755f=readFileSync(_0x162a68,_0x42b61f(0x196)),_0xb56fe7=_0x1f755f['match'](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0xb56fe7&&_0xb56fe7[0x1]){const _0x397422=_0xb56fe7[0x1],_0x3d9ca0=_0x397422[_0x42b61f(0x1ac)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x3d9ca0&&_0x3d9ca0[0x1])return _0x3d9ca0[0x1][_0x42b61f(0x1a1)]();}let _0x56994b=null;const _0x1b85d7=_0x1f755f[_0x42b61f(0x1ac)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x1b85d7&&_0x1b85d7[0x1]&&(_0x56994b=_0x1b85d7[0x1]);if(!_0x56994b){const _0x38343c=_0x1f755f[_0x42b61f(0x1ac)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x38343c&&_0x38343c[0x1]&&(_0x56994b=_0x38343c[0x1]);}if(_0x56994b){const _0x231797=new RegExp('\x5cb'+_0x56994b+_0x42b61f(0x19b)),_0x3f7e71=_0x1f755f[_0x42b61f(0x1ac)](_0x231797);if(_0x3f7e71&&_0x3f7e71[0x1])return _0x3f7e71[0x1];return _0x56994b;}return null;}catch(_0x2ebcfb){return null;}}function a14_0x9dc9(_0x3f64bd,_0x595368){_0x3f64bd=_0x3f64bd-0x195;const _0x5e6fb1=a14_0x5e6f();let _0x9dc9ae=_0x5e6fb1[_0x3f64bd];return _0x9dc9ae;}export function getLocalPages(_0x37fcae=pagesDir,_0x208351=pagesDir){const _0x3ea307=a14_0x556edc;let _0x3765a0=[];const _0x52a68f=readdirSync(_0x37fcae);return _0x52a68f[_0x3ea307(0x1ae)](_0xf70468=>{const _0x42a979=_0x3ea307,_0x3167dc=join(_0x37fcae,_0xf70468),_0x445fc9=statSync(_0x3167dc);if(_0x445fc9&&_0x445fc9[_0x42a979(0x1a7)]())_0x3765a0=_0x3765a0[_0x42a979(0x199)](getLocalPages(_0x3167dc,_0x208351));else{if(_0xf70468[_0x42a979(0x1af)](_0x42a979(0x197))){let _0x533533=relative(_0x208351,_0x3167dc);_0x533533['endsWith'](_0x42a979(0x195))?_0x533533=_0x533533[_0x42a979(0x1a6)](/index\.tsx$/,''):_0x533533=_0x533533[_0x42a979(0x1a6)](/\.tsx$/,'');_0x533533['endsWith']('/')&&(_0x533533=_0x533533[_0x42a979(0x19f)](0x0,-0x1));const _0xa6fe66=extractTitleFromComment(_0x3167dc),_0x462914=_0xa6fe66||_0x533533;_0x3765a0[_0x42a979(0x1a2)]({'path':_0x533533['replaceAll']('$',':'),'label':_0x462914});}}}),_0x3765a0[_0x3ea307(0x19e)](_0x29ef0f=>_0x29ef0f['path']!=='');}
@@ -1 +1 @@
1
- function a15_0x2053(_0x48cf95,_0x10b491){_0x48cf95=_0x48cf95-0xba;const _0x35821d=a15_0x3582();let _0x205346=_0x35821d[_0x48cf95];return _0x205346;}(function(_0xbbe39,_0x115424){const _0x58fb90=a15_0x2053,_0x25389a=_0xbbe39();while(!![]){try{const _0x6dddbe=-parseInt(_0x58fb90(0xc0))/0x1+parseInt(_0x58fb90(0xbf))/0x2*(-parseInt(_0x58fb90(0xd8))/0x3)+parseInt(_0x58fb90(0xc4))/0x4*(-parseInt(_0x58fb90(0xd3))/0x5)+-parseInt(_0x58fb90(0xcf))/0x6+parseInt(_0x58fb90(0xc5))/0x7*(parseInt(_0x58fb90(0xbd))/0x8)+parseInt(_0x58fb90(0xba))/0x9+parseInt(_0x58fb90(0xbb))/0xa;if(_0x6dddbe===_0x115424)break;else _0x25389a['push'](_0x25389a['shift']());}catch(_0x28ab28){_0x25389a['push'](_0x25389a['shift']());}}}(a15_0x3582,0xed485));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';const config=readConfig();function a15_0x3582(){const _0x144290=['errorMsg','path','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','服务端返回空菜单列表','/smartapi/menu/find?appCode=','appcode','data','10801305YGjicW','28113850zBwyyy','未提供应用AppCode,且配置中也没有默认值','8gLZOko','application/json','369580pzEiMw','579951uUfPSs','status','children','未知错误','6632ldSHPM','12749163wLZqsv','!\x20请使用以下方式之一:','get-online-menu-list','获取菜单列表失败:\x20','resources','online','push','extend','label','GET','7246902YsFnsx','flat','error','json','3695DOiLfD','\x20个线上菜单','log','isArray','info','30dyaFGl','正在获取线上菜单列表...\x20(appCode:\x20','获取菜单列表失败,HTTP状态码:\x20'];a15_0x3582=function(){return _0x144290;};return a15_0x3582();}export async function getOnlineMenuList(){const _0x1577c4=a15_0x2053,_0x2f5512=config?.[_0x1577c4(0xe0)];if(!_0x2f5512){const _0x31ba9c=_0x1577c4(0xbc);return logger[_0x1577c4(0xd1)]('get-online-menu-list',_0x31ba9c),console[_0x1577c4(0xd1)]('×\x20'+_0x31ba9c),console[_0x1577c4(0xd5)](_0x1577c4(0xc6)),console['log']('\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>'),console['log']('\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>'),[];}const _0x1ad1b7=getEnv();logger['info'](_0x1577c4(0xc7),_0x1ad1b7===_0x1577c4(0xca)?_0x1577c4(0xd9)+_0x2f5512+')':'正在获取日常菜单列表...\x20(appCode:\x20'+_0x2f5512+')');const _0x2b5974=await fetch(getApiDomain()+_0x1577c4(0xdf)+_0x2f5512,{'method':_0x1577c4(0xce),'headers':{'Content-Type':_0x1577c4(0xbe),'Cookie':getCookie()}});if(!_0x2b5974['ok']){if(_0x2b5974[_0x1577c4(0xc1)]===0x191){const _0x59f070=_0x1577c4(0xdd);logger[_0x1577c4(0xd1)](_0x1577c4(0xc7),_0x59f070,{'status':_0x2b5974[_0x1577c4(0xc1)]});throw new Error(_0x59f070);}const _0x3fbe1f=_0x1577c4(0xda)+_0x2b5974[_0x1577c4(0xc1)];logger[_0x1577c4(0xd1)](_0x1577c4(0xc7),_0x3fbe1f);throw new Error(_0x3fbe1f);}const _0x46ea47=await _0x2b5974[_0x1577c4(0xd2)]();if(!_0x46ea47['success']){const _0x554541=_0x1577c4(0xc8)+(_0x46ea47[_0x1577c4(0xdb)]||_0x1577c4(0xc3));logger['error']('get-online-menu-list',_0x554541,{'errorCode':_0x46ea47['errorCode'],'errorMsg':_0x46ea47[_0x1577c4(0xdb)]});throw new Error(_0x554541);}if(!_0x46ea47[_0x1577c4(0xe1)])return logger['info'](_0x1577c4(0xc7),_0x1577c4(0xde)),[];return logger[_0x1577c4(0xd7)](_0x1577c4(0xc7),'成功获取\x20'+_0x46ea47[_0x1577c4(0xe1)]['length']+_0x1577c4(0xd4)),_0x46ea47[_0x1577c4(0xe1)]['map'](formatMenuList)[_0x1577c4(0xd0)]();}function formatMenuList(_0x385ab2){const _0x4f714a=a15_0x2053;let _0x12cd80=[];try{if(_0x385ab2[_0x4f714a(0xcc)]?.[_0x4f714a(0xc9)]){const _0x15fb30=JSON['parse'](_0x385ab2['extend'][_0x4f714a(0xc9)]);Array[_0x4f714a(0xd6)](_0x15fb30)&&(_0x12cd80=_0x15fb30);}}catch(_0x30cd4c){}const _0x29d4a3=[{'id':_0x385ab2['id'],'path':_0x385ab2[_0x4f714a(0xdc)],'label':_0x385ab2[_0x4f714a(0xcd)],'resources':_0x12cd80}];if(_0x385ab2[_0x4f714a(0xc2)]&&_0x385ab2[_0x4f714a(0xc2)]['length']>0x0)for(const _0x246709 of _0x385ab2[_0x4f714a(0xc2)]){_0x29d4a3[_0x4f714a(0xcb)](...formatMenuList(_0x246709));}return _0x29d4a3;}
1
+ (function(_0x551440,_0x3517e8){const _0x4eb923=a15_0x5c17,_0x6fc5bc=_0x551440();while(!![]){try{const _0x54288f=-parseInt(_0x4eb923(0x1bb))/0x1+-parseInt(_0x4eb923(0x1a0))/0x2*(-parseInt(_0x4eb923(0x1a9))/0x3)+parseInt(_0x4eb923(0x1bf))/0x4+-parseInt(_0x4eb923(0x1b3))/0x5*(parseInt(_0x4eb923(0x1a7))/0x6)+parseInt(_0x4eb923(0x1b1))/0x7*(-parseInt(_0x4eb923(0x1c9))/0x8)+-parseInt(_0x4eb923(0x1ab))/0x9*(-parseInt(_0x4eb923(0x1be))/0xa)+-parseInt(_0x4eb923(0x1c5))/0xb*(parseInt(_0x4eb923(0x1c2))/0xc);if(_0x54288f===_0x3517e8)break;else _0x6fc5bc['push'](_0x6fc5bc['shift']());}catch(_0x390976){_0x6fc5bc['push'](_0x6fc5bc['shift']());}}}(a15_0x537f,0xbfe62));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a15_0x5c17(_0x1d4768,_0x3effe4){_0x1d4768=_0x1d4768-0x1a0;const _0x537f51=a15_0x537f();let _0x5c17fd=_0x537f51[_0x1d4768];return _0x5c17fd;}function a15_0x537f(){const _0x1f0296=['online','13735206XQHLIt','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','成功获取\x20','GET','map','status','2451785DNvkPj','获取菜单列表失败:\x20','860865UcNUgi','\x20个线上菜单','resources','!\x20请使用以下方式之一:','length','get-online-menu-list','isArray','success','25979ONsEJX','children','application/json','10DDPtyn','5413252seSBPQ','parse','errorMsg','37097076OLQnHk','error','json','11EIlPNX','未知错误','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','appcode','8RgvAwl','extend','data','2yvhFci','log','正在获取线上菜单列表...\x20(appCode:\x20','push','服务端返回空菜单列表','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','label','6BctCoM','info','4639203IKsKqy'];a15_0x537f=function(){return _0x1f0296;};return a15_0x537f();}import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';const config=readConfig();export async function getOnlineMenuList(){const _0x2daaaf=a15_0x5c17,_0x18c085=config?.[_0x2daaaf(0x1c8)];if(!_0x18c085){const _0x5b1ee4='未提供应用AppCode,且配置中也没有默认值';return logger[_0x2daaaf(0x1c3)](_0x2daaaf(0x1b8),_0x5b1ee4),console['error']('×\x20'+_0x5b1ee4),console[_0x2daaaf(0x1a1)](_0x2daaaf(0x1b6)),console['log'](_0x2daaaf(0x1ac)),console['log'](_0x2daaaf(0x1a5)),[];}const _0x43cee1=getEnv();logger[_0x2daaaf(0x1a8)]('get-online-menu-list',_0x43cee1===_0x2daaaf(0x1aa)?_0x2daaaf(0x1a2)+_0x18c085+')':'正在获取日常菜单列表...\x20(appCode:\x20'+_0x18c085+')');const _0x107143=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x18c085,{'method':_0x2daaaf(0x1ae),'headers':{'Content-Type':_0x2daaaf(0x1bd),'Cookie':getCookie()}});if(!_0x107143['ok']){if(_0x107143['status']===0x191){const _0x18f09b=_0x2daaaf(0x1c7);logger[_0x2daaaf(0x1c3)](_0x2daaaf(0x1b8),_0x18f09b,{'status':_0x107143[_0x2daaaf(0x1b0)]});throw new Error(_0x18f09b);}const _0x2ea798='获取菜单列表失败,HTTP状态码:\x20'+_0x107143[_0x2daaaf(0x1b0)];logger['error'](_0x2daaaf(0x1b8),_0x2ea798);throw new Error(_0x2ea798);}const _0x1676e9=await _0x107143[_0x2daaaf(0x1c4)]();if(!_0x1676e9[_0x2daaaf(0x1ba)]){const _0xcc9c03=_0x2daaaf(0x1b2)+(_0x1676e9[_0x2daaaf(0x1c1)]||_0x2daaaf(0x1c6));logger['error']('get-online-menu-list',_0xcc9c03,{'errorCode':_0x1676e9['errorCode'],'errorMsg':_0x1676e9[_0x2daaaf(0x1c1)]});throw new Error(_0xcc9c03);}if(!_0x1676e9[_0x2daaaf(0x1cb)])return logger[_0x2daaaf(0x1a8)](_0x2daaaf(0x1b8),_0x2daaaf(0x1a4)),[];return logger[_0x2daaaf(0x1a8)](_0x2daaaf(0x1b8),_0x2daaaf(0x1ad)+_0x1676e9[_0x2daaaf(0x1cb)]['length']+_0x2daaaf(0x1b4)),_0x1676e9[_0x2daaaf(0x1cb)][_0x2daaaf(0x1af)](formatMenuList)['flat']();}function formatMenuList(_0x7e014b){const _0x2e82f3=a15_0x5c17;let _0x24521b=[];try{if(_0x7e014b[_0x2e82f3(0x1ca)]?.[_0x2e82f3(0x1b5)]){const _0x19851a=JSON[_0x2e82f3(0x1c0)](_0x7e014b['extend'][_0x2e82f3(0x1b5)]);Array[_0x2e82f3(0x1b9)](_0x19851a)&&(_0x24521b=_0x19851a);}}catch(_0x2cb002){}const _0x122e33=[{'id':_0x7e014b['id'],'path':_0x7e014b['path'],'label':_0x7e014b[_0x2e82f3(0x1a6)],'resources':_0x24521b}];if(_0x7e014b[_0x2e82f3(0x1bc)]&&_0x7e014b['children'][_0x2e82f3(0x1b7)]>0x0)for(const _0x29b261 of _0x7e014b[_0x2e82f3(0x1bc)]){_0x122e33[_0x2e82f3(0x1a3)](...formatMenuList(_0x29b261));}return _0x122e33;}
@@ -1 +1 @@
1
- (function(_0x377ed7,_0x3ac5db){const _0x1b18ed=a17_0x1058,_0x5e4311=_0x377ed7();while(!![]){try{const _0x21451c=-parseInt(_0x1b18ed(0x103))/0x1*(parseInt(_0x1b18ed(0xfe))/0x2)+parseInt(_0x1b18ed(0x105))/0x3+-parseInt(_0x1b18ed(0x10a))/0x4*(-parseInt(_0x1b18ed(0x101))/0x5)+parseInt(_0x1b18ed(0x109))/0x6*(parseInt(_0x1b18ed(0xff))/0x7)+parseInt(_0x1b18ed(0x106))/0x8*(parseInt(_0x1b18ed(0x102))/0x9)+parseInt(_0x1b18ed(0x108))/0xa+-parseInt(_0x1b18ed(0x100))/0xb*(parseInt(_0x1b18ed(0x107))/0xc);if(_0x21451c===_0x3ac5db)break;else _0x5e4311['push'](_0x5e4311['shift']());}catch(_0x4eaeb6){_0x5e4311['push'](_0x5e4311['shift']());}}}(a17_0x3e45,0x96648));function a17_0x1058(_0x23c0d5,_0x83dd88){_0x23c0d5=_0x23c0d5-0xfb;const _0x3e45ad=a17_0x3e45();let _0x10588a=_0x3e45ad[_0x23c0d5];return _0x10588a;}function a17_0x3e45(){const _0x3f97c2=['3023400zzCodO','6488ZLmMoA','12mLPPMe','4664620scdCie','1464546UQuxVe','563912rvrKbi','finally','获取菜单列表失败','message','then','538jBePuU','7HSledo','18836884WcBYls','20HWbPit','7686ecXSZu','2403QcpMsZ','catch'];a17_0x3e45=function(){return _0x3f97c2;};return a17_0x3e45();}import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';export function useGetOnlineMenuList(){const [_0x38dabe,_0x44dd01]=useState([]),[_0x279312,_0x26b471]=useState(!![]),[_0x385517,_0x10378d]=useState('');return useEffect(()=>{const _0x162704=a17_0x1058;_0x26b471(!![]),_0x10378d(''),getOnlineMenuList()[_0x162704(0xfd)](_0x44dd01)[_0x162704(0x104)](_0x3d8d98=>{const _0x31d074=_0x162704;_0x10378d(_0x3d8d98[_0x31d074(0xfc)]||_0x31d074(0xfb));})[_0x162704(0x10b)](()=>_0x26b471(![]));},[]),{'menuList':_0x38dabe,'loading':_0x279312,'error':_0x385517};}
1
+ (function(_0x259016,_0x3da913){const _0xdac444=a17_0xa2a0,_0x51526f=_0x259016();while(!![]){try{const _0x2a149b=parseInt(_0xdac444(0x1e0))/0x1+parseInt(_0xdac444(0x1e2))/0x2+-parseInt(_0xdac444(0x1e8))/0x3*(parseInt(_0xdac444(0x1e9))/0x4)+parseInt(_0xdac444(0x1e1))/0x5+parseInt(_0xdac444(0x1e3))/0x6+-parseInt(_0xdac444(0x1e6))/0x7*(parseInt(_0xdac444(0x1e7))/0x8)+-parseInt(_0xdac444(0x1df))/0x9*(-parseInt(_0xdac444(0x1e4))/0xa);if(_0x2a149b===_0x3da913)break;else _0x51526f['push'](_0x51526f['shift']());}catch(_0x106b4f){_0x51526f['push'](_0x51526f['shift']());}}}(a17_0x44fc,0x55674));import{useEffect,useState}from'react';function a17_0x44fc(){const _0xcdc1da=['693JBfpWu','12112EOGtGc','finally','catch','8676FzpzfB','166640CrsTGp','3312980oTukDi','1047342eKKsyI','1009866tLDyXy','1670ofzgyT','then','4430482cUTECo','8kUthlW'];a17_0x44fc=function(){return _0xcdc1da;};return a17_0x44fc();}import{getOnlineMenuList}from'./get-online-menu-list.js';function a17_0xa2a0(_0xa0df0,_0x36407a){_0xa0df0=_0xa0df0-0x1de;const _0x44fcd2=a17_0x44fc();let _0xa2a008=_0x44fcd2[_0xa0df0];return _0xa2a008;}export function useGetOnlineMenuList(){const [_0x1de40f,_0x7242f1]=useState([]),[_0x55cbbf,_0x5abac2]=useState(!![]),[_0x136993,_0x5cbc5f]=useState('');return useEffect(()=>{const _0x44f651=a17_0xa2a0;_0x5abac2(!![]),_0x5cbc5f(''),getOnlineMenuList()[_0x44f651(0x1e5)](_0x7242f1)[_0x44f651(0x1de)](_0x5045f4=>{_0x5cbc5f(_0x5045f4['message']||'获取菜单列表失败');})[_0x44f651(0x1ea)](()=>_0x5abac2(![]));},[]),{'menuList':_0x1de40f,'loading':_0x55cbbf,'error':_0x136993};}
@@ -1 +1 @@
1
- (function(_0x591d6c,_0x5a0468){const _0x1c6456=a18_0x59ae,_0x4ef2cc=_0x591d6c();while(!![]){try{const _0x1155f5=-parseInt(_0x1c6456(0x14d))/0x1+-parseInt(_0x1c6456(0x156))/0x2+-parseInt(_0x1c6456(0x154))/0x3+parseInt(_0x1c6456(0x153))/0x4*(parseInt(_0x1c6456(0x155))/0x5)+-parseInt(_0x1c6456(0x152))/0x6+parseInt(_0x1c6456(0x14f))/0x7+parseInt(_0x1c6456(0x159))/0x8*(parseInt(_0x1c6456(0x151))/0x9);if(_0x1155f5===_0x5a0468)break;else _0x4ef2cc['push'](_0x4ef2cc['shift']());}catch(_0x523372){_0x4ef2cc['push'](_0x4ef2cc['shift']());}}}(a18_0x3e16,0x61b60));function a18_0x59ae(_0x51de84,_0x3e7b2e){_0x51de84=_0x51de84-0x14d;const _0x3e16ba=a18_0x3e16();let _0x59ae46=_0x3e16ba[_0x51de84];return _0x59ae46;}export function getRemainingSpaces(_0x25f1c8,_0x55863d){const _0x12a35a=a18_0x59ae,_0x1e77c2=getStringWidth(_0x55863d);return Array(Math[_0x12a35a(0x157)](0x0,_0x25f1c8-_0x1e77c2))[_0x12a35a(0x158)]('\x20')[_0x12a35a(0x150)]('');}export function getMaxWidth(_0x54633f,_0x583b32=0x2){let _0xf4b48a='',_0x1d3381=0x0;for(const _0xe1011a of _0x54633f){const _0x4caf64=getStringWidth(_0xe1011a);_0x4caf64>_0x1d3381&&(_0x1d3381=_0x4caf64,_0xf4b48a=_0xe1011a);}return _0xf4b48a+'\x20'['repeat'](_0x583b32);}function a18_0x3e16(){const _0x57f582=['590742piBqbe','max','fill','785336ZzNnMN','561497IYnHYM','test','2923046gNXHAf','join','153oLBZIo','4283904zguBiX','4tmQCxE','1520160WrjgID','1956895PuMkJj'];a18_0x3e16=function(){return _0x57f582;};return a18_0x3e16();}export function getStringWidth(_0x14f923){const _0x34a320=a18_0x59ae;let _0x318853=0x0;for(const _0x428d15 of _0x14f923){/[\u4e00-\u9fa5]/[_0x34a320(0x14e)](_0x428d15)?_0x318853+=0x2:_0x318853+=0x1;}return _0x318853;}
1
+ (function(_0x1e9c75,_0x519b45){const _0x1cbdc9=a18_0x1b78,_0x5906a5=_0x1e9c75();while(!![]){try{const _0x5e76ad=parseInt(_0x1cbdc9(0x1d0))/0x1*(-parseInt(_0x1cbdc9(0x1cb))/0x2)+-parseInt(_0x1cbdc9(0x1d3))/0x3+-parseInt(_0x1cbdc9(0x1d1))/0x4*(parseInt(_0x1cbdc9(0x1d2))/0x5)+parseInt(_0x1cbdc9(0x1c6))/0x6*(-parseInt(_0x1cbdc9(0x1c8))/0x7)+parseInt(_0x1cbdc9(0x1c7))/0x8*(-parseInt(_0x1cbdc9(0x1d4))/0x9)+parseInt(_0x1cbdc9(0x1c9))/0xa+parseInt(_0x1cbdc9(0x1cd))/0xb;if(_0x5e76ad===_0x519b45)break;else _0x5906a5['push'](_0x5906a5['shift']());}catch(_0x1823a1){_0x5906a5['push'](_0x5906a5['shift']());}}}(a18_0x51c6,0xa1bf4));export function getRemainingSpaces(_0x379b7f,_0x37fb6f){const _0x228ca8=a18_0x1b78,_0x13cf14=getStringWidth(_0x37fb6f);return Array(Math[_0x228ca8(0x1cc)](0x0,_0x379b7f-_0x13cf14))[_0x228ca8(0x1ca)]('\x20')['join']('');}function a18_0x1b78(_0x337cc0,_0x4b6dc3){_0x337cc0=_0x337cc0-0x1c6;const _0x51c6d1=a18_0x51c6();let _0x1b7896=_0x51c6d1[_0x337cc0];return _0x1b7896;}function a18_0x51c6(){const _0x3ad1d6=['fill','125462ozKUOm','max','41564765HlDlel','test','repeat','13LwpZRX','4wNUDzW','4891255zdPRuH','2669379AtVpaw','2529JZFRQL','14436WRGwMu','25448CvwhSM','1869DEKHHl','11037110tevqRv'];a18_0x51c6=function(){return _0x3ad1d6;};return a18_0x51c6();}export function getMaxWidth(_0x286e81,_0x19025f=0x2){const _0x2b6605=a18_0x1b78;let _0x337fc9='',_0x51cec9=0x0;for(const _0x3b6b56 of _0x286e81){const _0x43250c=getStringWidth(_0x3b6b56);_0x43250c>_0x51cec9&&(_0x51cec9=_0x43250c,_0x337fc9=_0x3b6b56);}return _0x337fc9+'\x20'[_0x2b6605(0x1cf)](_0x19025f);}export function getStringWidth(_0xe6193d){const _0x2aab63=a18_0x1b78;let _0x51ed2a=0x0;for(const _0x434850 of _0xe6193d){/[\u4e00-\u9fa5]/[_0x2aab63(0x1ce)](_0x434850)?_0x51ed2a+=0x2:_0x51ed2a+=0x1;}return _0x51ed2a;}
@@ -1 +1 @@
1
- function a19_0x7f6d(_0x3817fa,_0x42a036){_0x3817fa=_0x3817fa-0x84;const _0x27e91e=a19_0x27e9();let _0x7f6dd0=_0x27e91e[_0x3817fa];return _0x7f6dd0;}(function(_0x4bbcd0,_0x19d682){const _0x4ea295=a19_0x7f6d,_0x411192=_0x4bbcd0();while(!![]){try{const _0x5097d4=-parseInt(_0x4ea295(0x8b))/0x1+parseInt(_0x4ea295(0x85))/0x2+parseInt(_0x4ea295(0x8a))/0x3+-parseInt(_0x4ea295(0x88))/0x4*(parseInt(_0x4ea295(0x89))/0x5)+parseInt(_0x4ea295(0x8c))/0x6+-parseInt(_0x4ea295(0x84))/0x7+parseInt(_0x4ea295(0x87))/0x8;if(_0x5097d4===_0x19d682)break;else _0x411192['push'](_0x411192['shift']());}catch(_0x47acf5){_0x411192['push'](_0x411192['shift']());}}}(a19_0x27e9,0x83d25));function a19_0x27e9(){const _0x4f5dd2=['5021682clAwyd','6009388FHmqUN','753166wUCEPY','test','9073224teHcOY','34404ilouyK','235sRZIQi','1506561wwxfNw','1047198thfpmt'];a19_0x27e9=function(){return _0x4f5dd2;};return a19_0x27e9();}export function isValidJsHttpsUrl(_0x3d6f40){const _0x4d6b08=a19_0x7f6d;return/^https:\/\/.+\.js(\?.*)?$/[_0x4d6b08(0x86)](_0x3d6f40['trim']());}export function isValidCssHttpsUrl(_0x3f4ca3){const _0x902f88=a19_0x7f6d;return/^https:\/\/.+\.css(\?.*)?$/[_0x902f88(0x86)](_0x3f4ca3['trim']());}export async function isUrlReachable(_0x29d310){try{const _0xfa81b1=await fetch(_0x29d310,{'method':'HEAD'});return _0xfa81b1['ok'];}catch{return![];}}
1
+ (function(_0x2a1ef7,_0x2712cb){const _0x11662c=a19_0x8500,_0x2cbff8=_0x2a1ef7();while(!![]){try{const _0x2382ec=parseInt(_0x11662c(0xc8))/0x1+parseInt(_0x11662c(0xc9))/0x2*(-parseInt(_0x11662c(0xcf))/0x3)+-parseInt(_0x11662c(0xc5))/0x4*(-parseInt(_0x11662c(0xce))/0x5)+-parseInt(_0x11662c(0xc6))/0x6+-parseInt(_0x11662c(0xd3))/0x7*(parseInt(_0x11662c(0xc7))/0x8)+parseInt(_0x11662c(0xcc))/0x9*(parseInt(_0x11662c(0xcb))/0xa)+parseInt(_0x11662c(0xca))/0xb*(parseInt(_0x11662c(0xd2))/0xc);if(_0x2382ec===_0x2712cb)break;else _0x2cbff8['push'](_0x2cbff8['shift']());}catch(_0x28f22a){_0x2cbff8['push'](_0x2cbff8['shift']());}}}(a19_0xe7eb,0xe2ee5));export function isValidJsHttpsUrl(_0x181761){return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x181761['trim']());}export function isValidCssHttpsUrl(_0x31435b){const _0x560232=a19_0x8500;return/^https:\/\/.+\.css(\?.*)?$/[_0x560232(0xcd)](_0x31435b[_0x560232(0xd1)]());}export async function isUrlReachable(_0x2c25b1){const _0x3a4ef6=a19_0x8500;try{const _0x1f079a=await fetch(_0x2c25b1,{'method':_0x3a4ef6(0xd0)});return _0x1f079a['ok'];}catch{return![];}}function a19_0x8500(_0x46c4b0,_0x47a534){_0x46c4b0=_0x46c4b0-0xc5;const _0xe7eb6d=a19_0xe7eb();let _0x850017=_0xe7eb6d[_0x46c4b0];return _0x850017;}function a19_0xe7eb(){const _0x37568c=['938905hmzIwQ','6ARviod','11NfgORi','7230hNBCUg','8910sXiHxd','test','210695gquZkr','290991rDvESt','HEAD','trim','6064044qEzLbB','742pidZUD','44fpcfgF','1558350aJVLUT','86288hxedTZ'];a19_0xe7eb=function(){return _0x37568c;};return a19_0xe7eb();}
@@ -1 +1 @@
1
- (function(_0x21b400,_0x1c39f6){const _0x539d38=a20_0xa381,_0x5c599a=_0x21b400();while(!![]){try{const _0x45e5a3=parseInt(_0x539d38(0x1c3))/0x1*(parseInt(_0x539d38(0x1d5))/0x2)+parseInt(_0x539d38(0x1d0))/0x3+parseInt(_0x539d38(0x1d1))/0x4+-parseInt(_0x539d38(0x1c5))/0x5+parseInt(_0x539d38(0x1d6))/0x6*(-parseInt(_0x539d38(0x1d2))/0x7)+-parseInt(_0x539d38(0x1cb))/0x8*(-parseInt(_0x539d38(0x1d4))/0x9)+-parseInt(_0x539d38(0x1c7))/0xa;if(_0x45e5a3===_0x1c39f6)break;else _0x5c599a['push'](_0x5c599a['shift']());}catch(_0x2adf43){_0x5c599a['push'](_0x5c599a['shift']());}}}(a20_0x29e7,0x4d0d9));import{jsx as a20_0x3fac8b,jsxs as a20_0x41fdc8}from'react/jsx-runtime';function a20_0xa381(_0x2ab1b2,_0x4eba53){_0x2ab1b2=_0x2ab1b2-0x1c2;const _0x29e79d=a20_0x29e7();let _0xa38140=_0x29e79d[_0x2ab1b2];return _0xa38140;}function a20_0x29e7(){const _0x3f1d3b=['*\x20待更新的菜单&资源链接','149NcjrIE','join','383425bjVOwL','待更新的菜单列表:','8901630MYdOuq','length','resources','label','48bSDwwR','flat','filter','from','map','959940AQkEbr','2287520XIcuWw','752647tFPpDE','cyan','300006HrGLbA','6888qfzkRn','18NVylSe'];a20_0x29e7=function(){return _0x3f1d3b;};return a20_0x29e7();}import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x58c542){const _0x32b29c=a20_0xa381,{menuList:_0x45ab13}=_0x58c542,_0x385b5c=_0x45ab13[_0x32b29c(0x1cd)](_0x331d52=>_0x331d52[_0x32b29c(0x1c9)][_0x32b29c(0x1c8)]),_0x4f4d01=Array[_0x32b29c(0x1ce)](new Set(_0x45ab13[_0x32b29c(0x1cf)](_0x30aaab=>_0x30aaab[_0x32b29c(0x1c9)])[_0x32b29c(0x1cc)]()));return a20_0x41fdc8(Box,{'flexDirection':'column','children':[a20_0x3fac8b(Text,{'color':_0x32b29c(0x1d3),'children':_0x32b29c(0x1c2)}),a20_0x41fdc8(Box,{'marginTop':0x1,'flexDirection':'column','children':[a20_0x41fdc8(Text,{'bold':!![],'children':['\x20\x20',_0x32b29c(0x1c6)]}),a20_0x41fdc8(Text,{'children':['\x20\x20',_0x385b5c[_0x32b29c(0x1cf)](_0x563da5=>_0x563da5[_0x32b29c(0x1ca)])[_0x32b29c(0x1c4)](',\x20')]})]}),a20_0x3fac8b(Box,{'marginTop':0x1,'children':a20_0x41fdc8(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x4f4d01['map'](_0x230849=>a20_0x3fac8b(Box,{'children':a20_0x41fdc8(Text,{'children':['\x20\x20',_0x230849]})},_0x230849))]});}
1
+ function a20_0x3807(_0x231f1d,_0x454b98){_0x231f1d=_0x231f1d-0x1e9;const _0x43c317=a20_0x43c3();let _0x3807f9=_0x43c317[_0x231f1d];return _0x3807f9;}(function(_0x1a9e22,_0xdd474d){const _0x22aac5=a20_0x3807,_0x2eba38=_0x1a9e22();while(!![]){try{const _0x5013ed=parseInt(_0x22aac5(0x1f7))/0x1+-parseInt(_0x22aac5(0x1f9))/0x2+-parseInt(_0x22aac5(0x1f1))/0x3*(-parseInt(_0x22aac5(0x1ea))/0x4)+-parseInt(_0x22aac5(0x1e9))/0x5+-parseInt(_0x22aac5(0x1ef))/0x6+-parseInt(_0x22aac5(0x1fa))/0x7+-parseInt(_0x22aac5(0x1f3))/0x8*(-parseInt(_0x22aac5(0x1f6))/0x9);if(_0x5013ed===_0xdd474d)break;else _0x2eba38['push'](_0x2eba38['shift']());}catch(_0x168fe9){_0x2eba38['push'](_0x2eba38['shift']());}}}(a20_0x43c3,0xe3cab));function a20_0x43c3(){const _0x1b2655=['1219166yddtks','10563518HBHIWc','3702595JIitWL','4376FxRKJu','cyan','join','label','待更新的菜单列表:','909072HjNQze','from','1032RoajIQ','length','8dyNZWx','map','column','27343809JkDpFb','529186koIFpz','*\x20待更新的菜单&资源链接'];a20_0x43c3=function(){return _0x1b2655;};return a20_0x43c3();}import{jsx as a20_0x31fd4e,jsxs as a20_0x1aa64e}from'react/jsx-runtime';import{Text,Box}from'ink';export function CurrentMenuCdnContent(_0x11c244){const _0x46f24a=a20_0x3807,{menuList:_0x1f9f31}=_0x11c244,_0x1513cf=_0x1f9f31['filter'](_0x57f210=>_0x57f210['resources'][_0x46f24a(0x1f2)]),_0x562fac=Array[_0x46f24a(0x1f0)](new Set(_0x1f9f31[_0x46f24a(0x1f4)](_0x1d2edd=>_0x1d2edd['resources'])['flat']()));return a20_0x1aa64e(Box,{'flexDirection':_0x46f24a(0x1f5),'children':[a20_0x31fd4e(Text,{'color':_0x46f24a(0x1eb),'children':_0x46f24a(0x1f8)}),a20_0x1aa64e(Box,{'marginTop':0x1,'flexDirection':'column','children':[a20_0x1aa64e(Text,{'bold':!![],'children':['\x20\x20',_0x46f24a(0x1ee)]}),a20_0x1aa64e(Text,{'children':['\x20\x20',_0x1513cf[_0x46f24a(0x1f4)](_0x3df341=>_0x3df341[_0x46f24a(0x1ed)])[_0x46f24a(0x1ec)](',\x20')]})]}),a20_0x31fd4e(Box,{'marginTop':0x1,'children':a20_0x1aa64e(Text,{'bold':!![],'children':['\x20\x20','待更新的资源链接:']})}),_0x562fac[_0x46f24a(0x1f4)](_0x2804c7=>a20_0x31fd4e(Box,{'children':a20_0x1aa64e(Text,{'children':['\x20\x20',_0x2804c7]})},_0x2804c7))]});}
@@ -1 +1 @@
1
- function a21_0x2de7(_0x59b129,_0x2d5812){_0x59b129=_0x59b129-0x1dc;const _0x1c694e=a21_0x1c69();let _0x2de785=_0x1c694e[_0x59b129];return _0x2de785;}(function(_0x4c45f8,_0x137023){const _0x131643=a21_0x2de7,_0x39dcb8=_0x4c45f8();while(!![]){try{const _0x2dc8f2=parseInt(_0x131643(0x1e4))/0x1*(parseInt(_0x131643(0x1de))/0x2)+-parseInt(_0x131643(0x1e0))/0x3+parseInt(_0x131643(0x1e5))/0x4+-parseInt(_0x131643(0x1e8))/0x5*(parseInt(_0x131643(0x1dc))/0x6)+-parseInt(_0x131643(0x1e1))/0x7+-parseInt(_0x131643(0x1e2))/0x8+-parseInt(_0x131643(0x1e3))/0x9*(-parseInt(_0x131643(0x1df))/0xa);if(_0x2dc8f2===_0x137023)break;else _0x39dcb8['push'](_0x39dcb8['shift']());}catch(_0x34b76d){_0x39dcb8['push'](_0x39dcb8['shift']());}}}(a21_0x1c69,0x524f2));import{jsx as a21_0x49aa4a,jsxs as a21_0x14820d}from'react/jsx-runtime';import{Text,Box}from'ink';function a21_0x1c69(){const _0x72569a=['1617312HJudUZ','45zBuvZs','3614yzoVBA','1862884mOttEk','column','cyan','5TYSLRz','green','CSS\x20链接:\x20','3825582asudqd','JS\x20链接:\x20','300GnDcJd','1793950jdROur','609108uCGDLS','3674027uUqqhC'];a21_0x1c69=function(){return _0x72569a;};return a21_0x1c69();}export function InputCdnAsset(_0x44250e){const _0x26d3ac=a21_0x2de7,{jsCdnUrl:_0x14cc75,cssCdnUrl:_0x3bae98}=_0x44250e;return a21_0x14820d(Box,{'flexDirection':_0x26d3ac(0x1e6),'marginTop':0x1,'children':[a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e7),'children':'*\x20已输入的资源资源'}),a21_0x14820d(Box,{'children':[a21_0x14820d(Text,{'children':['\x20\x20',_0x26d3ac(0x1dd)]}),a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e9),'children':_0x14cc75})]}),a21_0x14820d(Box,{'children':[a21_0x14820d(Text,{'children':['\x20\x20',_0x26d3ac(0x1ea)]}),a21_0x49aa4a(Text,{'color':_0x26d3ac(0x1e9),'children':_0x3bae98})]})]});}
1
+ (function(_0x8dd296,_0x5087f3){const _0x3e8e85=a21_0x9823,_0x3621a0=_0x8dd296();while(!![]){try{const _0x661b0e=parseInt(_0x3e8e85(0x1ad))/0x1+-parseInt(_0x3e8e85(0x1ab))/0x2+-parseInt(_0x3e8e85(0x1b2))/0x3*(-parseInt(_0x3e8e85(0x1b6))/0x4)+parseInt(_0x3e8e85(0x1b5))/0x5*(parseInt(_0x3e8e85(0x1b3))/0x6)+-parseInt(_0x3e8e85(0x1b1))/0x7*(-parseInt(_0x3e8e85(0x1b4))/0x8)+parseInt(_0x3e8e85(0x1b0))/0x9*(-parseInt(_0x3e8e85(0x1a7))/0xa)+-parseInt(_0x3e8e85(0x1ae))/0xb*(parseInt(_0x3e8e85(0x1a8))/0xc);if(_0x661b0e===_0x5087f3)break;else _0x3621a0['push'](_0x3621a0['shift']());}catch(_0x1c1b3a){_0x3621a0['push'](_0x3621a0['shift']());}}}(a21_0x5cc6,0x9fe28));import{jsx as a21_0x30d471,jsxs as a21_0x508c0c}from'react/jsx-runtime';function a21_0x5cc6(){const _0x335bcd=['8459361TYiVVE','7ajBmCq','30VsPakx','5998308wTfQtL','6753952HAhfAV','5ZJpvkP','104588iVSEHe','10RkJCMT','20652zKfGqg','green','CSS\x20链接:\x20','447178atuMLx','JS\x20链接:\x20','619941FSuMmK','5797GZYJBg','column'];a21_0x5cc6=function(){return _0x335bcd;};return a21_0x5cc6();}function a21_0x9823(_0xba828,_0x1c0885){_0xba828=_0xba828-0x1a7;const _0x5cc68e=a21_0x5cc6();let _0x982321=_0x5cc68e[_0xba828];return _0x982321;}import{Text,Box}from'ink';export function InputCdnAsset(_0x147a99){const _0x6303d4=a21_0x9823,{jsCdnUrl:_0x55d6a0,cssCdnUrl:_0x9884ac}=_0x147a99;return a21_0x508c0c(Box,{'flexDirection':_0x6303d4(0x1af),'marginTop':0x1,'children':[a21_0x30d471(Text,{'color':'cyan','children':'*\x20已输入的资源资源'}),a21_0x508c0c(Box,{'children':[a21_0x508c0c(Text,{'children':['\x20\x20',_0x6303d4(0x1ac)]}),a21_0x30d471(Text,{'color':_0x6303d4(0x1a9),'children':_0x55d6a0})]}),a21_0x508c0c(Box,{'children':[a21_0x508c0c(Text,{'children':['\x20\x20',_0x6303d4(0x1aa)]}),a21_0x30d471(Text,{'color':_0x6303d4(0x1a9),'children':_0x9884ac})]})]});}
@@ -1 +1 @@
1
- (function(_0x2d0e74,_0x4c5049){const _0x3c5845=a22_0x1f41,_0x127a20=_0x2d0e74();while(!![]){try{const _0x36b254=-parseInt(_0x3c5845(0x149))/0x1*(parseInt(_0x3c5845(0x13b))/0x2)+-parseInt(_0x3c5845(0x13c))/0x3*(-parseInt(_0x3c5845(0x138))/0x4)+parseInt(_0x3c5845(0x163))/0x5+parseInt(_0x3c5845(0x167))/0x6*(-parseInt(_0x3c5845(0x152))/0x7)+-parseInt(_0x3c5845(0x15a))/0x8+-parseInt(_0x3c5845(0x15b))/0x9+parseInt(_0x3c5845(0x156))/0xa;if(_0x36b254===_0x4c5049)break;else _0x127a20['push'](_0x127a20['shift']());}catch(_0x5db95c){_0x127a20['push'](_0x127a20['shift']());}}}(a22_0x5018,0x428b4));import{jsx as a22_0x49f9c0,jsxs as a22_0x46d283,Fragment as a22_0x16cba2}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a22_0x570944 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';function a22_0x5018(){const _0x276fbe=['3662190lEkpMw','继续更新','\x20命令重新登录','!\x20未找到菜单资源链接','creating','input-js','cyan','slice','322370MYQypi','√\x20更新成功','JS\x20链接:\x20','dots','884244FUYOxh','label','downArrow','gray','column','value','map','need-confirm','\x20←\x20','yellow','4CYRVwF','取消更新','\x20正在获取线上菜单资源链接...','58762EJomkN','507543KhqFaj','cancel','delete','green','JS\x20链接无法访问','upArrow','resources','*\x20请输入新的资源链接','backspace','rightArrow','all','from','input-css','17xzhimg','resolve','输入项目的\x20CSS\x20资源链接(https://...)','length','updated','\x20资源正在同步中...','CSS\x20链接:\x20','提示:使用\x20','请输入有效的\x20JS\x20https\x20链接','14ZIObQz','CSS\x20链接无法访问','return','trim','15241270GMilFg','flat','lovrabet\x20auth','red','2272664lJCtiO'];a22_0x5018=function(){return _0x276fbe;};return a22_0x5018();}import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';function a22_0x1f41(_0x4f787c,_0x47812d){_0x4f787c=_0x4f787c-0x132;const _0x5018a9=a22_0x5018();let _0x1f41f5=_0x5018a9[_0x4f787c];return _0x1f41f5;}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x49f9c0(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x4b536e=a22_0x1f41,{exit:_0x118566}=useApp(),{loading:_0x41fae8,menuList:_0x3736af,error:_0x2fde84}=useGetOnlineMenuList(),[_0x576cd8,_0x367566]=useState('ok'),[_0x1b956d,_0x3a6927]=useState(_0x4b536e(0x160)),[_0x10f037,_0x32ea50]=useState(''),[_0xfe9e2f,_0x9c7c49]=useState(''),[_0x1cf5d2,_0x44bbf4]=useState(''),[_0x3ea01a,_0x1bf915]=useState(''),_0x4a469d=Array[_0x4b536e(0x147)](new Set(_0x3736af[_0x4b536e(0x134)](_0x592034=>_0x592034[_0x4b536e(0x142)])[_0x4b536e(0x157)]()));useEffect(()=>{const _0xa2d4de=_0x4b536e;_0x1b956d===_0xa2d4de(0x14d)&&setTimeout(_0x118566,0x32);},[_0x1b956d]),useInput(async(_0x1970fd,_0x5aa8e7)=>{const _0x1b715a=_0x4b536e;if(_0x1b956d==='input-js'){if(_0x5aa8e7[_0x1b715a(0x154)]){const _0x5650e2=_0x1cf5d2[_0x1b715a(0x155)]();if(_0x5650e2==='')return;if(!isValidJsHttpsUrl(_0x5650e2)){_0x1bf915(_0x1b715a(0x151));return;}if(!await isUrlReachable(_0x5650e2)){_0x1bf915(_0x1b715a(0x140));return;}_0x32ea50(_0x5650e2),_0x44bbf4(''),_0x1bf915(''),_0x3a6927(_0x1b715a(0x148));return;}if(_0x5aa8e7[_0x1b715a(0x144)]||_0x5aa8e7[_0x1b715a(0x13e)]){_0x44bbf4(_0x41f34a=>_0x41f34a[_0x1b715a(0x162)](0x0,-0x1)),_0x1bf915('');return;}_0x44bbf4(_0x17cee8=>_0x17cee8+_0x1970fd);return;}if(_0x1b956d===_0x1b715a(0x148)){if(_0x5aa8e7[_0x1b715a(0x154)]){const _0xcf32f6=_0x1cf5d2[_0x1b715a(0x155)]();if(_0xcf32f6==='')return;if(!isValidCssHttpsUrl(_0xcf32f6)){_0x1bf915('请输入有效的\x20CSS\x20https\x20链接');return;}if(!await isUrlReachable(_0xcf32f6)){_0x1bf915(_0x1b715a(0x153));return;}_0x9c7c49(_0xcf32f6),_0x44bbf4(''),_0x1bf915(''),_0x3a6927(_0x1b715a(0x135));return;}if(_0x5aa8e7[_0x1b715a(0x144)]||_0x5aa8e7['delete']){_0x44bbf4(_0x2b2056=>_0x2b2056[_0x1b715a(0x162)](0x0,-0x1)),_0x1bf915('');return;}_0x44bbf4(_0x1fd53c=>_0x1fd53c+_0x1970fd);return;}if(_0x1b956d===_0x1b715a(0x135)){(_0x5aa8e7[_0x1b715a(0x141)]||_0x5aa8e7[_0x1b715a(0x169)]||_0x5aa8e7['leftArrow']||_0x5aa8e7[_0x1b715a(0x145)])&&_0x367566(_0x1ebb32=>_0x1ebb32==='ok'?_0x1b715a(0x13d):'ok');if(_0x5aa8e7['return']){_0x3a6927(_0x1b715a(0x15f));if(_0x576cd8==='ok')await Promise[_0x1b715a(0x146)](_0x3736af[_0x1b715a(0x134)](_0x53c8bc=>{const _0xeea32c=_0x1b715a,_0x4a1cef={'id':_0x53c8bc['id'],'label':_0x53c8bc[_0xeea32c(0x168)],'path':_0x53c8bc['path'],'resources':[_0x10f037,_0xfe9e2f]};if(_0x53c8bc[_0xeea32c(0x142)][_0xeea32c(0x14c)]===0x0)return Promise[_0xeea32c(0x14a)]();return updateMenuCdnUrl(_0x4a1cef);})),await new Promise(_0x13f8e9=>setTimeout(_0x13f8e9,0x3e8)),_0x3a6927(_0x1b715a(0x14d));else _0x576cd8===_0x1b715a(0x13d)&&_0x118566();}}});if(_0x41fae8)return a22_0x46d283(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(Text,{}),a22_0x49f9c0(a22_0x570944,{'type':'dots'}),a22_0x49f9c0(Text,{'children':_0x4b536e(0x13a)})]});if(_0x2fde84)return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x46d283(Text,{'color':'red','children':['✗\x20',_0x2fde84]}),a22_0x46d283(Box,{'marginTop':0x1,'children':[a22_0x49f9c0(Text,{'color':'gray','children':_0x4b536e(0x150)}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x161),'children':_0x4b536e(0x158)}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x16a),'children':_0x4b536e(0x15d)})]})]});if(_0x4a469d[_0x4b536e(0x14c)]===0x0)return a22_0x49f9c0(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x49f9c0(Text,{'color':_0x4b536e(0x137),'children':_0x4b536e(0x15e)})});if(_0x1b956d===_0x4b536e(0x135))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x49f9c0(Box,{'marginTop':0x1,'flexDirection':_0x4b536e(0x132),'children':[{'label':_0x4b536e(0x15c),'value':'ok'},{'label':_0x4b536e(0x139),'value':_0x4b536e(0x13d)}][_0x4b536e(0x134)](_0x50d5ca=>a22_0x46d283(Text,{'color':_0x576cd8===_0x50d5ca[_0x4b536e(0x133)]?_0x4b536e(0x137):undefined,'children':[_0x576cd8===_0x50d5ca['value']?'>\x20':'\x20\x20',_0x50d5ca[_0x4b536e(0x168)]]},_0x50d5ca['value']))})]});if(_0x1b956d===_0x4b536e(0x15f))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x46d283(Box,{'marginTop':0x1,'children':[a22_0x49f9c0(a22_0x570944,{'type':_0x4b536e(0x166)}),a22_0x49f9c0(Text,{'children':_0x4b536e(0x14e)})]})]});if(_0x1b956d===_0x4b536e(0x14d))return a22_0x46d283(Box,{'flexDirection':_0x4b536e(0x132),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x49f9c0(InputCdnAsset,{'jsCdnUrl':_0x10f037,'cssCdnUrl':_0xfe9e2f}),a22_0x49f9c0(Box,{'marginTop':0x1,'children':a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x4b536e(0x164)})})]});return a22_0x46d283(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x49f9c0(CurrentMenuCdnContent,{'menuList':_0x3736af}),a22_0x46d283(Box,{'marginTop':0x1,'flexDirection':_0x4b536e(0x132),'children':[a22_0x49f9c0(Text,{'color':_0x4b536e(0x161),'children':_0x4b536e(0x143)}),_0x10f037?a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'color':_0x4b536e(0x16a),'children':['\x20\x20','JS\x20链接:\x20']}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x10f037})]}):_0x1b956d==='input-js'&&a22_0x46d283(a22_0x16cba2,{'children':[a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x165)]}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0x1cf5d2}),_0x3ea01a&&a22_0x46d283(Text,{'color':'red','children':[_0x4b536e(0x136),_0x3ea01a]})]}),!_0x3ea01a&&a22_0x49f9c0(Box,{'children':a22_0x46d283(Text,{'color':_0x4b536e(0x16a),'children':['\x20\x20','输入项目的\x20JS\x20资源链接(https://...)']})})]}),_0xfe9e2f?a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x14f)]}),a22_0x49f9c0(Text,{'color':_0x4b536e(0x13f),'children':_0xfe9e2f})]}):_0x1b956d==='input-css'&&a22_0x46d283(a22_0x16cba2,{'children':[a22_0x46d283(Box,{'children':[a22_0x46d283(Text,{'children':['\x20\x20',_0x4b536e(0x14f)]}),a22_0x49f9c0(Text,{'color':'green','children':_0x1cf5d2}),_0x3ea01a&&a22_0x46d283(Text,{'color':_0x4b536e(0x159),'children':[_0x4b536e(0x136),_0x3ea01a]})]}),!_0x3ea01a&&a22_0x49f9c0(Box,{'children':a22_0x46d283(Text,{'color':'gray','children':['\x20\x20',_0x4b536e(0x14b)]})})]})]})]});}
1
+ (function(_0x26f9a7,_0x3598ad){const _0x1b20fd=a22_0x51ea,_0x38234a=_0x26f9a7();while(!![]){try{const _0x4a998a=-parseInt(_0x1b20fd(0x169))/0x1*(-parseInt(_0x1b20fd(0x15d))/0x2)+parseInt(_0x1b20fd(0x187))/0x3+-parseInt(_0x1b20fd(0x15c))/0x4*(-parseInt(_0x1b20fd(0x17d))/0x5)+parseInt(_0x1b20fd(0x162))/0x6+parseInt(_0x1b20fd(0x15a))/0x7+-parseInt(_0x1b20fd(0x177))/0x8*(-parseInt(_0x1b20fd(0x163))/0x9)+-parseInt(_0x1b20fd(0x173))/0xa;if(_0x4a998a===_0x3598ad)break;else _0x38234a['push'](_0x38234a['shift']());}catch(_0x1fe502){_0x38234a['push'](_0x38234a['shift']());}}}(a22_0x42c1,0xdaa42));import{jsx as a22_0x260b12,jsxs as a22_0x19594f,Fragment as a22_0x1e0544}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a22_0x1c7e62 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';function a22_0x42c1(){const _0x22fefe=['red','CSS\x20链接无法访问','return','1NaGNOQ','请输入有效的\x20CSS\x20https\x20链接','resolve','delete','提示:使用\x20','取消更新','green','updated','downArrow','leftArrow','40737490bRLqiW','yellow','JS\x20链接:\x20','继续更新','37888obczTV','!\x20未找到菜单资源链接','flat','rightArrow','upArrow','input-js','1236865icEoUS','all','JS\x20链接无法访问','cyan','\x20正在获取线上菜单资源链接...','dots','lovrabet\x20auth','\x20←\x20','map','input-css','4734687LyMirR','label','resources','need-confirm','*\x20请输入新的资源链接','value','cancel','slice','creating','gray','path','10613701UVAByX','backspace','20NxKDiD','774466CSnPkb','length','CSS\x20链接:\x20','\x20资源正在同步中...','from','1475982rzdzps','9uNqcsx','column','\x20命令重新登录'];a22_0x42c1=function(){return _0x22fefe;};return a22_0x42c1();}function a22_0x51ea(_0x410d14,_0x159887){_0x410d14=_0x410d14-0x15a;const _0x42c114=a22_0x42c1();let _0x51ea54=_0x42c114[_0x410d14];return _0x51ea54;}import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import.meta.main&&render(a22_0x260b12(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x46a7d7=a22_0x51ea,{exit:_0x344683}=useApp(),{loading:_0x4a0712,menuList:_0x4dd184,error:_0x33adc1}=useGetOnlineMenuList(),[_0x22cbd8,_0x28ba73]=useState('ok'),[_0xb754ee,_0x23b489]=useState(_0x46a7d7(0x17c)),[_0x21712b,_0x5a92cb]=useState(''),[_0x588a40,_0x448313]=useState(''),[_0x454913,_0x4ff387]=useState(''),[_0x571761,_0x5a74bc]=useState(''),_0x4aaf00=Array[_0x46a7d7(0x161)](new Set(_0x4dd184['map'](_0xd00118=>_0xd00118[_0x46a7d7(0x189)])[_0x46a7d7(0x179)]()));useEffect(()=>{_0xb754ee==='updated'&&setTimeout(_0x344683,0x32);},[_0xb754ee]),useInput(async(_0x39c6af,_0xa97e19)=>{const _0x45c3b9=_0x46a7d7;if(_0xb754ee==='input-js'){if(_0xa97e19[_0x45c3b9(0x168)]){const _0x674bec=_0x454913['trim']();if(_0x674bec==='')return;if(!isValidJsHttpsUrl(_0x674bec)){_0x5a74bc('请输入有效的\x20JS\x20https\x20链接');return;}if(!await isUrlReachable(_0x674bec)){_0x5a74bc(_0x45c3b9(0x17f));return;}_0x5a92cb(_0x674bec),_0x4ff387(''),_0x5a74bc(''),_0x23b489('input-css');return;}if(_0xa97e19['backspace']||_0xa97e19[_0x45c3b9(0x16c)]){_0x4ff387(_0x35d443=>_0x35d443['slice'](0x0,-0x1)),_0x5a74bc('');return;}_0x4ff387(_0x2ffb57=>_0x2ffb57+_0x39c6af);return;}if(_0xb754ee==='input-css'){if(_0xa97e19['return']){const _0x4b07ea=_0x454913['trim']();if(_0x4b07ea==='')return;if(!isValidCssHttpsUrl(_0x4b07ea)){_0x5a74bc(_0x45c3b9(0x16a));return;}if(!await isUrlReachable(_0x4b07ea)){_0x5a74bc(_0x45c3b9(0x167));return;}_0x448313(_0x4b07ea),_0x4ff387(''),_0x5a74bc(''),_0x23b489(_0x45c3b9(0x18a));return;}if(_0xa97e19[_0x45c3b9(0x15b)]||_0xa97e19['delete']){_0x4ff387(_0x57ede7=>_0x57ede7[_0x45c3b9(0x18e)](0x0,-0x1)),_0x5a74bc('');return;}_0x4ff387(_0x37b1a5=>_0x37b1a5+_0x39c6af);return;}if(_0xb754ee===_0x45c3b9(0x18a)){(_0xa97e19[_0x45c3b9(0x17b)]||_0xa97e19[_0x45c3b9(0x171)]||_0xa97e19[_0x45c3b9(0x172)]||_0xa97e19[_0x45c3b9(0x17a)])&&_0x28ba73(_0x35e892=>_0x35e892==='ok'?_0x45c3b9(0x18d):'ok');if(_0xa97e19['return']){_0x23b489(_0x45c3b9(0x18f));if(_0x22cbd8==='ok')await Promise[_0x45c3b9(0x17e)](_0x4dd184[_0x45c3b9(0x185)](_0x1291c9=>{const _0x394135=_0x45c3b9,_0x15b7a4={'id':_0x1291c9['id'],'label':_0x1291c9[_0x394135(0x188)],'path':_0x1291c9[_0x394135(0x191)],'resources':[_0x21712b,_0x588a40]};if(_0x1291c9[_0x394135(0x189)][_0x394135(0x15e)]===0x0)return Promise[_0x394135(0x16b)]();return updateMenuCdnUrl(_0x15b7a4);})),await new Promise(_0x1bb9ea=>setTimeout(_0x1bb9ea,0x3e8)),_0x23b489(_0x45c3b9(0x170));else _0x22cbd8===_0x45c3b9(0x18d)&&_0x344683();}}});if(_0x4a0712)return a22_0x19594f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(Text,{}),a22_0x260b12(a22_0x1c7e62,{'type':_0x46a7d7(0x182)}),a22_0x260b12(Text,{'children':_0x46a7d7(0x181)})]});if(_0x33adc1)return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x19594f(Text,{'color':_0x46a7d7(0x166),'children':['✗\x20',_0x33adc1]}),a22_0x19594f(Box,{'marginTop':0x1,'children':[a22_0x260b12(Text,{'color':_0x46a7d7(0x190),'children':_0x46a7d7(0x16d)}),a22_0x260b12(Text,{'color':'cyan','children':_0x46a7d7(0x183)}),a22_0x260b12(Text,{'color':_0x46a7d7(0x190),'children':_0x46a7d7(0x165)})]})]});if(_0x4aaf00[_0x46a7d7(0x15e)]===0x0)return a22_0x260b12(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x260b12(Text,{'color':_0x46a7d7(0x174),'children':_0x46a7d7(0x178)})});if(_0xb754ee===_0x46a7d7(0x18a))return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(CurrentMenuCdnContent,{'menuList':_0x4dd184}),a22_0x260b12(InputCdnAsset,{'jsCdnUrl':_0x21712b,'cssCdnUrl':_0x588a40}),a22_0x260b12(Box,{'marginTop':0x1,'flexDirection':_0x46a7d7(0x164),'children':[{'label':_0x46a7d7(0x176),'value':'ok'},{'label':_0x46a7d7(0x16e),'value':_0x46a7d7(0x18d)}][_0x46a7d7(0x185)](_0x3aae0b=>a22_0x19594f(Text,{'color':_0x22cbd8===_0x3aae0b[_0x46a7d7(0x18c)]?_0x46a7d7(0x174):undefined,'children':[_0x22cbd8===_0x3aae0b[_0x46a7d7(0x18c)]?'>\x20':'\x20\x20',_0x3aae0b[_0x46a7d7(0x188)]]},_0x3aae0b[_0x46a7d7(0x18c)]))})]});if(_0xb754ee===_0x46a7d7(0x18f))return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(CurrentMenuCdnContent,{'menuList':_0x4dd184}),a22_0x260b12(InputCdnAsset,{'jsCdnUrl':_0x21712b,'cssCdnUrl':_0x588a40}),a22_0x19594f(Box,{'marginTop':0x1,'children':[a22_0x260b12(a22_0x1c7e62,{'type':_0x46a7d7(0x182)}),a22_0x260b12(Text,{'children':_0x46a7d7(0x160)})]})]});if(_0xb754ee==='updated')return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(CurrentMenuCdnContent,{'menuList':_0x4dd184}),a22_0x260b12(InputCdnAsset,{'jsCdnUrl':_0x21712b,'cssCdnUrl':_0x588a40}),a22_0x260b12(Box,{'marginTop':0x1,'children':a22_0x260b12(Text,{'color':_0x46a7d7(0x16f),'children':'√\x20更新成功'})})]});return a22_0x19594f(Box,{'flexDirection':_0x46a7d7(0x164),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x260b12(CurrentMenuCdnContent,{'menuList':_0x4dd184}),a22_0x19594f(Box,{'marginTop':0x1,'flexDirection':_0x46a7d7(0x164),'children':[a22_0x260b12(Text,{'color':_0x46a7d7(0x180),'children':_0x46a7d7(0x18b)}),_0x21712b?a22_0x19594f(Box,{'children':[a22_0x19594f(Text,{'color':'gray','children':['\x20\x20',_0x46a7d7(0x175)]}),a22_0x260b12(Text,{'color':_0x46a7d7(0x16f),'children':_0x21712b})]}):_0xb754ee===_0x46a7d7(0x17c)&&a22_0x19594f(a22_0x1e0544,{'children':[a22_0x19594f(Box,{'children':[a22_0x19594f(Text,{'children':['\x20\x20',_0x46a7d7(0x175)]}),a22_0x260b12(Text,{'color':_0x46a7d7(0x16f),'children':_0x454913}),_0x571761&&a22_0x19594f(Text,{'color':_0x46a7d7(0x166),'children':['\x20←\x20',_0x571761]})]}),!_0x571761&&a22_0x260b12(Box,{'children':a22_0x19594f(Text,{'color':'gray','children':['\x20\x20','输入项目的\x20JS\x20资源链接(https://...)']})})]}),_0x588a40?a22_0x19594f(Box,{'children':[a22_0x19594f(Text,{'children':['\x20\x20',_0x46a7d7(0x15f)]}),a22_0x260b12(Text,{'color':_0x46a7d7(0x16f),'children':_0x588a40})]}):_0xb754ee===_0x46a7d7(0x186)&&a22_0x19594f(a22_0x1e0544,{'children':[a22_0x19594f(Box,{'children':[a22_0x19594f(Text,{'children':['\x20\x20',_0x46a7d7(0x15f)]}),a22_0x260b12(Text,{'color':'green','children':_0x454913}),_0x571761&&a22_0x19594f(Text,{'color':_0x46a7d7(0x166),'children':[_0x46a7d7(0x184),_0x571761]})]}),!_0x571761&&a22_0x260b12(Box,{'children':a22_0x19594f(Text,{'color':_0x46a7d7(0x190),'children':['\x20\x20','输入项目的\x20CSS\x20资源链接(https://...)']})})]})]})]});}
@@ -1 +1 @@
1
- const a24_0x36b3ac=a24_0x55d2;(function(_0x18ea0a,_0x47b894){const _0x12a183=a24_0x55d2,_0x590d65=_0x18ea0a();while(!![]){try{const _0x1524fc=-parseInt(_0x12a183(0x110))/0x1*(parseInt(_0x12a183(0x121))/0x2)+parseInt(_0x12a183(0x109))/0x3+-parseInt(_0x12a183(0x120))/0x4*(parseInt(_0x12a183(0x11b))/0x5)+-parseInt(_0x12a183(0x123))/0x6+parseInt(_0x12a183(0x11a))/0x7*(-parseInt(_0x12a183(0x107))/0x8)+-parseInt(_0x12a183(0x102))/0x9*(parseInt(_0x12a183(0x117))/0xa)+-parseInt(_0x12a183(0x105))/0xb*(-parseInt(_0x12a183(0x11d))/0xc);if(_0x1524fc===_0x47b894)break;else _0x590d65['push'](_0x590d65['shift']());}catch(_0x466a99){_0x590d65['push'](_0x590d65['shift']());}}}(a24_0x2fc0,0xb67c8));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a24_0x36b3ac(0x100);function a24_0x55d2(_0x4b3a1d,_0x2ec24){_0x4b3a1d=_0x4b3a1d-0x100;const _0x2fc008=a24_0x2fc0();let _0x55d2b7=_0x2fc008[_0x4b3a1d];return _0x55d2b7;}function a24_0x2fc0(){const _0x5e57fd=['10573330suRRGG','resources','errorCode','153475aaXroB','5NMtpHn','SdkDemo1','24gihPYH','未提供应用AppCode,且配置中也没有默认值','log','4624172VbaGbh','174730ZbmfJA','未知错误','8891838vbAPJi','error','appcode','update-menu-cdn-url','errorMsg','9iUtdLU','POST','stringify','36843609VJLUSV','import','536OijVVy','label','2094465nKlNvJ','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','/smartapi/menu/update','sdk-demo','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','创建菜单失败,HTTP状态码:\x20','17EnwUhy','status','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','data','正在更新菜单资源链接:\x20','菜单资源同步成功:\x20','info'];a24_0x2fc0=function(){return _0x5e57fd;};return a24_0x2fc0();}import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a24_0x36b3ac(0x11c),'path':a24_0x36b3ac(0x10d),'resources':[a24_0x36b3ac(0x10e),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0x32a3c7){const _0x588e26=a24_0x36b3ac,_0xe05be4=config?.[_0x588e26(0x125)];if(!_0xe05be4){const _0x33db46=_0x588e26(0x11e);logger[_0x588e26(0x124)](logLabel,_0x33db46),console[_0x588e26(0x124)]('×\x20'+_0x33db46),console[_0x588e26(0x11f)]('!\x20请使用以下方式之一:'),console[_0x588e26(0x11f)](_0x588e26(0x112)),console[_0x588e26(0x11f)](_0x588e26(0x10b));return;}logger[_0x588e26(0x116)](logLabel,_0x588e26(0x114)+_0x32a3c7['label']+'\x20('+_0x32a3c7['path']+')');const _0x226ffd={'id':_0x32a3c7['id'],'appCode':_0xe05be4,'extend':{'loadScriptMode':_0x588e26(0x106),'resources':_0x32a3c7[_0x588e26(0x118)]?JSON[_0x588e26(0x104)](_0x32a3c7[_0x588e26(0x118)]):undefined}},_0x4aa890=await fetch(getApiDomain()+_0x588e26(0x10c),{'method':_0x588e26(0x103),'body':JSON[_0x588e26(0x104)](_0x226ffd),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x4aa890['ok']){if(_0x4aa890['status']===0x191){const _0x212b9e=_0x588e26(0x10a);logger[_0x588e26(0x124)](logLabel,_0x212b9e,{'status':_0x4aa890[_0x588e26(0x111)],'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x212b9e);}const _0x82d89b=_0x588e26(0x10f)+_0x4aa890[_0x588e26(0x111)];logger['error'](logLabel,_0x82d89b,{'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x82d89b);}const _0x1ffcdc=await _0x4aa890['json']();if(!_0x1ffcdc['success']){const _0x5dcc67='更新菜单资源失败:\x20'+(_0x1ffcdc[_0x588e26(0x101)]||_0x588e26(0x122));logger[_0x588e26(0x124)](logLabel,_0x5dcc67,{'errorCode':_0x1ffcdc[_0x588e26(0x119)],'errorMsg':_0x1ffcdc['errorMsg'],'menu':_0x32a3c7[_0x588e26(0x108)]});throw new Error(_0x5dcc67);}logger[_0x588e26(0x116)](logLabel,_0x588e26(0x115)+_0x32a3c7[_0x588e26(0x108)],_0x1ffcdc[_0x588e26(0x113)]);}
1
+ function a24_0x59a3(_0x42849f,_0x44a0c3){_0x42849f=_0x42849f-0x15a;const _0x38712e=a24_0x3871();let _0x59a3cf=_0x38712e[_0x42849f];return _0x59a3cf;}const a24_0x39904c=a24_0x59a3;(function(_0x339595,_0x3ebc58){const _0x1c4a2e=a24_0x59a3,_0x5a1d90=_0x339595();while(!![]){try{const _0x390cb2=parseInt(_0x1c4a2e(0x15f))/0x1*(parseInt(_0x1c4a2e(0x179))/0x2)+parseInt(_0x1c4a2e(0x167))/0x3*(-parseInt(_0x1c4a2e(0x16a))/0x4)+parseInt(_0x1c4a2e(0x17d))/0x5*(parseInt(_0x1c4a2e(0x163))/0x6)+parseInt(_0x1c4a2e(0x180))/0x7+parseInt(_0x1c4a2e(0x178))/0x8*(-parseInt(_0x1c4a2e(0x15a))/0x9)+-parseInt(_0x1c4a2e(0x15d))/0xa+parseInt(_0x1c4a2e(0x17c))/0xb*(parseInt(_0x1c4a2e(0x169))/0xc);if(_0x390cb2===_0x3ebc58)break;else _0x5a1d90['push'](_0x5a1d90['shift']());}catch(_0xbe1164){_0x5a1d90['push'](_0x5a1d90['shift']());}}}(a24_0x3871,0x2f9fe));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a24_0x3871(){const _0x54d7bc=['status','142140fsQoiy','4bNUmam','更新菜单资源失败:\x20','path','json','正在更新菜单资源链接:\x20','!\x20请使用以下方式之一:','创建菜单失败,HTTP状态码:\x20','stringify','data','登录鉴权失败,登录已过期,请使用\x20lovrabet\x20auth\x20重新登录','\x20\x20\x202.\x20配置默认值:\x20lovrabet\x20config\x20set\x20app\x20<app-code>','\x20\x20\x201.\x20直接指定:\x20lovrabet\x20api\x20pull\x20<app-code>','resources','error','24GwaLWD','28154YUXRMd','errorMsg','log','220HrlYEw','76490OYVbAk','import','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','1592766zVBwvh','/smartapi/menu/update','label','942237oSEiwV','未知错误','errorCode','191940AmMbuh','application/json','17ibxxVx','菜单资源同步成功:\x20','success','info','6VxMhCV','appcode','SdkDemo1','POST','572106JEoNaB'];a24_0x3871=function(){return _0x54d7bc;};return a24_0x3871();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';const config=readConfig(),logLabel='update-menu-cdn-url';import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a24_0x39904c(0x165),'path':'sdk-demo','resources':[a24_0x39904c(0x17f),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0xc30e70){const _0x494668=a24_0x39904c,_0x4a0e26=config?.[_0x494668(0x164)];if(!_0x4a0e26){const _0x17427c='未提供应用AppCode,且配置中也没有默认值';logger[_0x494668(0x177)](logLabel,_0x17427c),console[_0x494668(0x177)]('×\x20'+_0x17427c),console['log'](_0x494668(0x16f)),console[_0x494668(0x17b)](_0x494668(0x175)),console[_0x494668(0x17b)](_0x494668(0x174));return;}logger[_0x494668(0x162)](logLabel,_0x494668(0x16e)+_0xc30e70['label']+'\x20('+_0xc30e70[_0x494668(0x16c)]+')');const _0x5a191d={'id':_0xc30e70['id'],'appCode':_0x4a0e26,'extend':{'loadScriptMode':_0x494668(0x17e),'resources':_0xc30e70[_0x494668(0x176)]?JSON[_0x494668(0x171)](_0xc30e70['resources']):undefined}},_0x3cac85=await fetch(getApiDomain()+_0x494668(0x181),{'method':_0x494668(0x166),'body':JSON[_0x494668(0x171)](_0x5a191d),'headers':{'Content-Type':_0x494668(0x15e),'Cookie':getCookie()}});if(!_0x3cac85['ok']){if(_0x3cac85[_0x494668(0x168)]===0x191){const _0x24974c=_0x494668(0x173);logger['error'](logLabel,_0x24974c,{'status':_0x3cac85['status'],'menu':_0xc30e70[_0x494668(0x182)]});throw new Error(_0x24974c);}const _0x1bb506=_0x494668(0x170)+_0x3cac85['status'];logger[_0x494668(0x177)](logLabel,_0x1bb506,{'menu':_0xc30e70[_0x494668(0x182)]});throw new Error(_0x1bb506);}const _0x10954a=await _0x3cac85[_0x494668(0x16d)]();if(!_0x10954a[_0x494668(0x161)]){const _0x8e0389=_0x494668(0x16b)+(_0x10954a['errorMsg']||_0x494668(0x15b));logger[_0x494668(0x177)](logLabel,_0x8e0389,{'errorCode':_0x10954a[_0x494668(0x15c)],'errorMsg':_0x10954a[_0x494668(0x17a)],'menu':_0xc30e70[_0x494668(0x182)]});throw new Error(_0x8e0389);}logger[_0x494668(0x162)](logLabel,_0x494668(0x160)+_0xc30e70[_0x494668(0x182)],_0x10954a[_0x494668(0x172)]);}
@@ -1 +1 @@
1
- (function(_0x3b46a4,_0x4a0750){const _0x1325b9=a25_0x30cf,_0x1fb39b=_0x3b46a4();while(!![]){try{const _0x29d8c4=parseInt(_0x1325b9(0x175))/0x1+parseInt(_0x1325b9(0x16e))/0x2*(-parseInt(_0x1325b9(0x17c))/0x3)+-parseInt(_0x1325b9(0x179))/0x4+-parseInt(_0x1325b9(0x170))/0x5+-parseInt(_0x1325b9(0x17b))/0x6+-parseInt(_0x1325b9(0x16f))/0x7+parseInt(_0x1325b9(0x176))/0x8*(parseInt(_0x1325b9(0x17a))/0x9);if(_0x29d8c4===_0x4a0750)break;else _0x1fb39b['push'](_0x1fb39b['shift']());}catch(_0x15509a){_0x1fb39b['push'](_0x1fb39b['shift']());}}}(a25_0x1924,0xcd129));import{jsx as a25_0x49c123,jsxs as a25_0x96cc59}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';function a25_0x1924(){const _0x34a2bd=['5694704kPFoSZ','9aMKklp','753354XiaAWM','3189GPkTWG','column','then','724dkVFbU','1156001XBiZDF','6426955fmAuqR','请前往浏览器完成登录。','finally','log','正在登录...\x20','1151429olFusx','24584984pcXKnP','按\x20“q”\x20退出。','gray'];a25_0x1924=function(){return _0x34a2bd;};return a25_0x1924();}import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a25_0x30cf(_0x3e964b,_0x508c4a){_0x3e964b=_0x3e964b-0x16d;const _0x19241a=a25_0x1924();let _0x30cfac=_0x19241a[_0x3e964b];return _0x30cfac;}import a25_0xc65bdd from'ink-spinner';export function AuthServer(){const _0x33dd83=a25_0x30cf,{exit:_0x3d1cb9}=useApp(),[_0x22dc1c,_0xf58765]=useState(![]),[_0x428155,_0x3215d7]=useState(!![]),[_0x35a993,_0x13c987]=useState(![]),[_0x20bb3c,_0x5d457a]=useState(![]);useEffect(()=>{const _0x2cd5df=a25_0x30cf;getIsSessionValid()[_0x2cd5df(0x16d)](_0xf58765)[_0x2cd5df(0x172)](()=>_0x3215d7(![]));},[]),useEffect(()=>{const _0x3dd46c=a25_0x30cf;!_0x428155&&_0x22dc1c&&(console[_0x3dd46c(0x173)]('√\x20当前为有效会话,无需重新登录。'),_0x3d1cb9());},[_0x428155,_0x22dc1c,_0x3d1cb9]),useEffect(()=>{const _0x445351=a25_0x30cf;_0x20bb3c&&(console[_0x445351(0x173)]('*\x20登录成功!'),_0x3d1cb9());},[_0x20bb3c,_0x3d1cb9]),useInput((_0x756f75,_0x351f4b)=>{_0x351f4b['return']&&(_0x13c987(!![]),authServer({'silent':!![]})['then'](_0x4c3d48=>{_0x5d457a(_0x4c3d48);})),_0x756f75==='q'&&_0x3d1cb9();});if(_0x428155)return null;if(_0x22dc1c||_0x20bb3c)return null;return a25_0x49c123(Box,{'flexDirection':_0x33dd83(0x17d),'marginTop':0x1,'marginBottom':0x1,'children':_0x35a993?a25_0x96cc59(Box,{'children':[a25_0x49c123(Box,{'width':'1'}),a25_0x96cc59(Text,{'color':'green','children':[a25_0x49c123(a25_0xc65bdd,{'type':'dots'}),'\x20\x20']}),a25_0x49c123(Text,{'children':_0x33dd83(0x174)}),a25_0x49c123(Text,{'color':_0x33dd83(0x178),'children':_0x33dd83(0x171)})]}):a25_0x96cc59(Box,{'children':[a25_0x49c123(Box,{'width':'1'}),a25_0x49c123(Text,{'children':'*\x20按回车开始登录。'}),a25_0x49c123(Text,{'color':_0x33dd83(0x178),'children':_0x33dd83(0x177)})]})});}
1
+ (function(_0x473f5c,_0xea03db){const _0x4dd26a=a25_0x525e,_0x67646f=_0x473f5c();while(!![]){try{const _0x32ece3=-parseInt(_0x4dd26a(0x83))/0x1+-parseInt(_0x4dd26a(0x88))/0x2+parseInt(_0x4dd26a(0x82))/0x3+-parseInt(_0x4dd26a(0x85))/0x4+parseInt(_0x4dd26a(0x7d))/0x5+-parseInt(_0x4dd26a(0x80))/0x6*(-parseInt(_0x4dd26a(0x87))/0x7)+parseInt(_0x4dd26a(0x89))/0x8*(parseInt(_0x4dd26a(0x7e))/0x9);if(_0x32ece3===_0xea03db)break;else _0x67646f['push'](_0x67646f['shift']());}catch(_0x2b1d6d){_0x67646f['push'](_0x67646f['shift']());}}}(a25_0x3387,0xd2117));import{jsx as a25_0x3cd392,jsxs as a25_0x3dc937}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';function a25_0x3387(){const _0x196d7e=['1131084FkVzxu','1194581JSnaIF','column','3316124CASVKt','dots','1596721EhfQhb','2294210feRkjy','172504gCwSaJ','按\x20“q”\x20退出。','then','gray','log','请前往浏览器完成登录。','4822300ZuZWQl','837qyPzKI','finally','18GAJjuu','正在登录...\x20'];a25_0x3387=function(){return _0x196d7e;};return a25_0x3387();}import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a25_0x3f5d87 from'ink-spinner';function a25_0x525e(_0x4c90e5,_0x391877){_0x4c90e5=_0x4c90e5-0x7d;const _0x338708=a25_0x3387();let _0x525eb5=_0x338708[_0x4c90e5];return _0x525eb5;}export function AuthServer(){const _0x45a981=a25_0x525e,{exit:_0x47b910}=useApp(),[_0x246031,_0x15b36b]=useState(![]),[_0x28129d,_0x39d922]=useState(!![]),[_0x508d1e,_0x14843e]=useState(![]),[_0x18135f,_0x2dff0a]=useState(![]);useEffect(()=>{const _0x471f5c=a25_0x525e;getIsSessionValid()[_0x471f5c(0x8b)](_0x15b36b)[_0x471f5c(0x7f)](()=>_0x39d922(![]));},[]),useEffect(()=>{!_0x28129d&&_0x246031&&(console['log']('√\x20当前为有效会话,无需重新登录。'),_0x47b910());},[_0x28129d,_0x246031,_0x47b910]),useEffect(()=>{const _0x1fd8fc=a25_0x525e;_0x18135f&&(console[_0x1fd8fc(0x8d)]('*\x20登录成功!'),_0x47b910());},[_0x18135f,_0x47b910]),useInput((_0x4a4305,_0x59f244)=>{const _0xa20496=a25_0x525e;_0x59f244['return']&&(_0x14843e(!![]),authServer({'silent':!![]})[_0xa20496(0x8b)](_0x1d371f=>{_0x2dff0a(_0x1d371f);})),_0x4a4305==='q'&&_0x47b910();});if(_0x28129d)return null;if(_0x246031||_0x18135f)return null;return a25_0x3cd392(Box,{'flexDirection':_0x45a981(0x84),'marginTop':0x1,'marginBottom':0x1,'children':_0x508d1e?a25_0x3dc937(Box,{'children':[a25_0x3cd392(Box,{'width':'1'}),a25_0x3dc937(Text,{'color':'green','children':[a25_0x3cd392(a25_0x3f5d87,{'type':_0x45a981(0x86)}),'\x20\x20']}),a25_0x3cd392(Text,{'children':_0x45a981(0x81)}),a25_0x3cd392(Text,{'color':'gray','children':_0x45a981(0x8e)})]}):a25_0x3dc937(Box,{'children':[a25_0x3cd392(Box,{'width':'1'}),a25_0x3cd392(Text,{'children':'*\x20按回车开始登录。'}),a25_0x3cd392(Text,{'color':_0x45a981(0x8c),'children':_0x45a981(0x8a)})]})});}