@lovrabet/cli 1.3.3 → 1.3.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/lib/ai-setup/AISetupUI.js +1 -1
  2. package/lib/ai-setup/config.js +1 -1
  3. package/lib/api/api-doc-ui.js +1 -1
  4. package/lib/api/api-doc.js +1 -1
  5. package/lib/api/api-pull-ui.js +1 -1
  6. package/lib/api/fetch-model-list.js +1 -1
  7. package/lib/api/generate-api-file.js +1 -1
  8. package/lib/api/main.js +1 -1
  9. package/lib/api/pull-silent.js +1 -1
  10. package/lib/app-menu/app-menu-sync-ui.js +1 -1
  11. package/lib/app-menu/create-menu.js +1 -1
  12. package/lib/app-menu/get-local-pages.js +1 -1
  13. package/lib/app-menu/get-online-menu-list.js +1 -1
  14. package/lib/app-menu/use-get-online-menu-list.js +1 -1
  15. package/lib/app-menu/utils.js +1 -1
  16. package/lib/app-menu/valid-url.js +1 -1
  17. package/lib/app-menu-update-cdn/current-content.js +1 -1
  18. package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
  19. package/lib/app-menu-update-cdn/main.js +1 -1
  20. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
  21. package/lib/auth/auth-server-ui.js +1 -1
  22. package/lib/auth/auth-server.js +1 -1
  23. package/lib/auth/constant.js +1 -1
  24. package/lib/auth/get-cookie.js +1 -1
  25. package/lib/auth/is-session-valid.js +1 -1
  26. package/lib/auth/logout.js +1 -1
  27. package/lib/cli-flags.js +1 -1
  28. package/lib/cli.js +1 -1
  29. package/lib/cmd/build-watch.js +1 -1
  30. package/lib/cmd/build.js +1 -1
  31. package/lib/cmd/logs.js +1 -1
  32. package/lib/cmd/preview.js +1 -1
  33. package/lib/cmd/start-execa.js +1 -0
  34. package/lib/cmd/start.js +1 -1
  35. package/lib/config/config-help.js +1 -1
  36. package/lib/config/main.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/create-app/enhanced-guided-create.js +1 -1
  40. package/lib/create-app/format-elapsed.js +1 -1
  41. package/lib/create-app/main.js +1 -1
  42. package/lib/create-app/non-interactive.js +1 -1
  43. package/lib/create-app/task-finished.js +1 -1
  44. package/lib/create-app/task-loading.js +1 -1
  45. package/lib/create-app/task-running.js +1 -1
  46. package/lib/create-app/task-time.js +1 -1
  47. package/lib/create-app/use-copy-project-template.js +1 -1
  48. package/lib/create-app/use-format-code.js +1 -1
  49. package/lib/create-app/use-install-dependencies.js +1 -1
  50. package/lib/help.js +1 -1
  51. package/lib/i18n/I18nProvider.js +1 -1
  52. package/lib/i18n/hooks.js +1 -1
  53. package/lib/i18n/index.js +1 -1
  54. package/lib/i18n/locales/en-US.js +1 -1
  55. package/lib/i18n/locales/zh-CN.js +1 -1
  56. package/lib/init/main.js +1 -1
  57. package/lib/mcp/McpInstallUI.js +1 -1
  58. package/lib/mcp/claude.js +1 -1
  59. package/lib/mcp/cursor.js +1 -1
  60. package/lib/mcp/main.js +1 -1
  61. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  62. package/lib/mcp/mcp-installer.js +1 -1
  63. package/lib/skills/SkillInstallUI.js +1 -1
  64. package/lib/skills/main.js +1 -1
  65. package/lib/skills/skill-install-non-interactive.js +1 -1
  66. package/lib/skills/skill-installer.js +1 -1
  67. package/lib/ui/IDESelector.js +1 -1
  68. package/lib/ui/useIDESelection.js +1 -1
  69. package/lib/utils/ai_config.js +1 -1
  70. package/lib/utils/cdn-config.js +1 -1
  71. package/lib/utils/check-sdk-version.js +1 -1
  72. package/lib/utils/cli-version-check.js +1 -1
  73. package/lib/utils/config.js +1 -1
  74. package/lib/utils/copy-directory.js +1 -1
  75. package/lib/utils/file-utils.js +1 -1
  76. package/lib/utils/guides-cdn.js +1 -1
  77. package/lib/utils/http-client.js +1 -1
  78. package/lib/utils/logger.js +1 -1
  79. package/lib/utils/rules-cdn.js +1 -1
  80. package/lib/utils/sleep.js +1 -1
  81. package/lib/utils/template-replacer.js +1 -1
  82. package/package.json +4 -1
  83. package/templates/README.md +10 -55
  84. package/lib/add-page/input-page-router.js +0 -1
  85. package/lib/add-page/main.js +0 -1
  86. package/lib/add-page/select-page-template.js +0 -1
  87. package/lib/utils/router-updater.js +0 -1
  88. package/templates/pages/blank/index.tsx.tpl +0 -13
  89. package/templates/pages/sdk-fetch/index.tsx.tpl +0 -80
@@ -1 +1 @@
1
- (function(_0x3069e8,_0x3259de){const _0xe84b0b=a12_0x16a6,_0x34232d=_0x3069e8();while(!![]){try{const _0x2eafdb=parseInt(_0xe84b0b(0x210))/0x1+-parseInt(_0xe84b0b(0x205))/0x2*(-parseInt(_0xe84b0b(0x1f6))/0x3)+-parseInt(_0xe84b0b(0x1ff))/0x4*(parseInt(_0xe84b0b(0x21c))/0x5)+-parseInt(_0xe84b0b(0x226))/0x6*(parseInt(_0xe84b0b(0x22e))/0x7)+parseInt(_0xe84b0b(0x1f2))/0x8*(-parseInt(_0xe84b0b(0x1fb))/0x9)+-parseInt(_0xe84b0b(0x20e))/0xa*(parseInt(_0xe84b0b(0x202))/0xb)+-parseInt(_0xe84b0b(0x227))/0xc*(-parseInt(_0xe84b0b(0x207))/0xd);if(_0x2eafdb===_0x3259de)break;else _0x34232d['push'](_0x34232d['shift']());}catch(_0x192478){_0x34232d['push'](_0x34232d['shift']());}}}(a12_0x3601,0x2ae08));import{jsx as a12_0x2ee017,jsxs as a12_0xa0536c,Fragment as a12_0x30a25e}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a12_0x16a6(_0x10422f,_0x267b4c){_0x10422f=_0x10422f-0x1e9;const _0x360186=a12_0x3601();let _0x16a628=_0x360186[_0x10422f];return _0x16a628;}import a12_0x2355e1 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{useI18n}from'../i18n/hooks.js';function a12_0x3601(){const _0x8f613=['local','65DznwEP','input-js','online','max','appMenu.sync.step.completed','appMenu.sync.input.cssUrl.placeholder','appMenu.sync.hotkeys','length','join','dots','6oUvZRe','42288trOMMm','appMenu.sync.loading.fetchingMenuList','then','map','red','trim','filter','431753JtsycQ','appMenu.sync.error.authHint.prefix','appMenu.sync.step.jsUrl','selecting','\x20←\x20','appMenu.sync.step.selectedMenusCount','backspace','add','downArrow','has','column','blue','4336mzvfkR','value','path','creating','86763dHMrtv','return','appMenu.sync.error.createMenuFailed','input-css','appMenu.sync.step.selectMenus','3123KVmfLT','appMenu.sync.operation.create','message','appMenu.sync.input.jsUrl.label','12160obrECu','includes','slice','11CVnjhM','fill','appMenu.sync.input.cssUrl.label','2OZtXHo','delete','1898bbmbDg','size','appMenu.sync.step.cssUrl','label','done','gray','lovrabet\x20auth','895540BpKsyT','appMenu.sync.error.authHint.suffix','11026HvOjsB','[✓]','white','appMenu.sync.table.lovrabetPlatform','test','yellow','cyan','appMenu.sync.error.invalidCssUrl','appMenu.sync.table.menuName','green','appMenu.sync.error.noMenuSelected'];a12_0x3601=function(){return _0x8f613;};return a12_0x3601();}import.meta.main&&render(a12_0x2ee017(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0xcdeb8c=a12_0x16a6,{exit:_0x48c4a7}=useApp(),{t:_0x1781f3}=useI18n(),{loading:_0x312e38,menuList:_0x2ee5eb,error:_0x7d1aa4}=useGetOnlineMenuList(),_0x22df30=getLocalPages(),_0x4c1920=_0x2ee5eb[_0xcdeb8c(0x22a)](_0x28bf76=>_0x28bf76[_0xcdeb8c(0x1f4)]),_0x41bb51=_0x1781f3(_0xcdeb8c(0x218)),_0x1fafd3=[_0x41bb51,..._0x22df30[_0xcdeb8c(0x22a)](_0x5dec69=>_0x5dec69[_0xcdeb8c(0x20a)])],_0xf699c6=getStringWidth(getMaxWidth(_0x1fafd3,0x4)),_0x5df4c0=getStringWidth(getMaxWidth([_0x41bb51])),[_0x4822b0,_0x375eeb]=useState(_0xcdeb8c(0x1e9)),[_0x175668,_0x416c4e]=useState(new Set()),[_0x12bf0f,_0x46d237]=useState(0x0),[_0x43f0ee,_0x4444ff]=useState(''),[_0x43bc92,_0x4c349c]=useState(''),[_0x56bf16,_0x510667]=useState(''),[_0x16e360,_0x1f0c9b]=useState(''),[_0x47afdb,_0x1ccaa1]=useState([]),_0x233dd0=_0x22df30[_0xcdeb8c(0x22a)](_0x15e3c1=>({'label':_0x15e3c1[_0xcdeb8c(0x20a)],'path':_0x15e3c1[_0xcdeb8c(0x1f4)],'local':!![],'online':_0x4c1920[_0xcdeb8c(0x200)](_0x15e3c1[_0xcdeb8c(0x1f4)])})),_0x5861c7=_0x22df30[_0xcdeb8c(0x22d)](_0x27a0f1=>{const _0x1b93aa=_0xcdeb8c;return!_0x4c1920[_0x1b93aa(0x200)](_0x27a0f1['path']);});useEffect(()=>{const _0x42af3a=_0xcdeb8c;if(!_0x312e38&&_0x22df30['length']>0x0&&_0x175668[_0x42af3a(0x208)]===0x0){const _0x1913e9=new Set(_0x22df30[_0x42af3a(0x22a)]((_0x4774ad,_0x2cb4f8)=>({'page':_0x4774ad,'index':_0x2cb4f8}))[_0x42af3a(0x22d)](({page:_0x5670db})=>!_0x4c1920[_0x42af3a(0x200)](_0x5670db[_0x42af3a(0x1f4)]))['map'](({index:_0x383b1b})=>_0x383b1b));_0x416c4e(_0x1913e9);}},[_0x312e38,_0x22df30['length'],_0x4c1920['length']]),useInput(async(_0x108bbd,_0x4c3825)=>{const _0x178d1b=_0xcdeb8c;if(_0x4822b0==='selecting'){if(_0x4c3825['upArrow']){_0x46d237(_0x4ba04f=>_0x4ba04f>0x0?_0x4ba04f-0x1:_0x22df30[_0x178d1b(0x223)]-0x1);return;}if(_0x4c3825[_0x178d1b(0x1ee)]){_0x46d237(_0xb724f2=>_0xb724f2<_0x22df30[_0x178d1b(0x223)]-0x1?_0xb724f2+0x1:0x0);return;}if(_0x108bbd==='\x20'){_0x416c4e(_0x29f7db=>{const _0x5310b6=_0x178d1b,_0x52ac75=new Set(_0x29f7db);return _0x52ac75[_0x5310b6(0x1ef)](_0x12bf0f)?_0x52ac75[_0x5310b6(0x206)](_0x12bf0f):_0x52ac75[_0x5310b6(0x1ed)](_0x12bf0f),_0x52ac75;});return;}if(_0x108bbd==='a'||_0x108bbd==='A'){const _0x297f67=new Set(_0x22df30[_0x178d1b(0x22a)]((_0x22f26c,_0x2dad78)=>_0x2dad78));_0x416c4e(_0x297f67);return;}if(_0x108bbd==='i'||_0x108bbd==='I'||_0x108bbd==='r'||_0x108bbd==='R'){_0x416c4e(_0x126a2d=>{const _0x2acb84=_0x178d1b,_0x338361=new Set();for(let _0x59ebcb=0x0;_0x59ebcb<_0x22df30[_0x2acb84(0x223)];_0x59ebcb++){!_0x126a2d[_0x2acb84(0x1ef)](_0x59ebcb)&&_0x338361[_0x2acb84(0x1ed)](_0x59ebcb);}return _0x338361;});return;}if(_0x108bbd==='q'||_0x108bbd==='Q'){_0x48c4a7();return;}if(_0x4c3825['return']){if(_0x175668[_0x178d1b(0x208)]===0x0){_0x1f0c9b(_0x1781f3(_0x178d1b(0x21a)));return;}const _0xf4f56a=_0x22df30[_0x178d1b(0x22d)]((_0x7b9cc6,_0x5d8b59)=>_0x175668[_0x178d1b(0x1ef)](_0x5d8b59)),_0x2aa9a7=_0xf4f56a['map'](_0x45bb9e=>_0x45bb9e[_0x178d1b(0x20a)])[_0x178d1b(0x224)](',\x20');_0x1ccaa1([{'label':_0x1781f3('appMenu.sync.step.selectedMenus'),'value':_0x1781f3(_0x178d1b(0x1eb),{'count':_0x175668['size']})}]),_0x1f0c9b(''),_0x375eeb(_0x178d1b(0x21d));return;}return;}if(_0x4822b0===_0x178d1b(0x21d)){if(_0x4c3825[_0x178d1b(0x1f7)]){const _0x1e11ce=_0x56bf16[_0x178d1b(0x22c)]();if(_0x1e11ce==='')return;if(!isValidJsHttpsUrl(_0x1e11ce)){_0x1f0c9b(_0x1781f3('appMenu.sync.error.invalidJsUrl'));return;}if(!await isUrlReachable(_0x1e11ce)){_0x1f0c9b(_0x1781f3('appMenu.sync.error.jsUrlUnreachable'));return;}_0x4444ff(_0x1e11ce),_0x1ccaa1(_0x5ccc37=>[..._0x5ccc37,{'label':_0x1781f3(_0x178d1b(0x230)),'value':_0x1e11ce}]),_0x510667(''),_0x1f0c9b(''),_0x375eeb(_0x178d1b(0x1f9));return;}if(_0x4c3825['backspace']||_0x4c3825[_0x178d1b(0x206)]){_0x510667(_0x203856=>_0x203856[_0x178d1b(0x201)](0x0,-0x1)),_0x1f0c9b('');return;}_0x510667(_0xbe8592=>_0xbe8592+_0x108bbd);return;}if(_0x4822b0===_0x178d1b(0x1f9)){if(_0x4c3825[_0x178d1b(0x1f7)]){const _0x307188=_0x56bf16['trim']();if(_0x307188==='')return;if(!isValidCssHttpsUrl(_0x307188)){_0x1f0c9b(_0x1781f3(_0x178d1b(0x217)));return;}if(!await isUrlReachable(_0x307188)){_0x1f0c9b(_0x1781f3('appMenu.sync.error.cssUrlUnreachable'));return;}_0x4c349c(_0x307188),_0x1ccaa1(_0x4815cd=>[..._0x4815cd,{'label':_0x1781f3(_0x178d1b(0x209)),'value':_0x307188}]),_0x510667(''),_0x1f0c9b(''),_0x375eeb(_0x178d1b(0x1f5));const _0x5eff2a=_0x22df30[_0x178d1b(0x22d)]((_0x2b5138,_0x2ffae4)=>_0x175668[_0x178d1b(0x1ef)](_0x2ffae4));createMenus(_0x5eff2a,[_0x43f0ee,_0x307188])[_0x178d1b(0x229)](()=>{const _0x316dc4=_0x178d1b;_0x375eeb(_0x316dc4(0x20b)),setTimeout(()=>{_0x48c4a7();},0x3e8);})['catch'](_0x11d692=>{const _0x3a3ef9=_0x178d1b;_0x1f0c9b(_0x11d692[_0x3a3ef9(0x1fd)]||_0x1781f3(_0x3a3ef9(0x1f8))),_0x375eeb('selecting');});return;}if(_0x4c3825[_0x178d1b(0x1ec)]||_0x4c3825[_0x178d1b(0x206)]){_0x510667(_0x261c88=>_0x261c88[_0x178d1b(0x201)](0x0,-0x1)),_0x1f0c9b('');return;}_0x510667(_0x14b15b=>_0x14b15b+_0x108bbd);return;}});if(_0x312e38)return a12_0xa0536c(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a12_0x2ee017(Text,{'children':'\x20\x20'}),a12_0x2ee017(a12_0x2355e1,{'type':_0xcdeb8c(0x225)}),a12_0x2ee017(Text,{'children':_0x1781f3(_0xcdeb8c(0x228))})]});if(_0x7d1aa4)return a12_0xa0536c(Box,{'flexDirection':_0xcdeb8c(0x1f0),'marginTop':0x1,'marginBottom':0x1,'children':[a12_0xa0536c(Text,{'color':_0xcdeb8c(0x22b),'children':['✗\x20',_0x7d1aa4]}),a12_0xa0536c(Box,{'marginTop':0x1,'children':[a12_0x2ee017(Text,{'color':_0xcdeb8c(0x20c),'children':_0x1781f3(_0xcdeb8c(0x22f))}),a12_0x2ee017(Text,{'color':_0xcdeb8c(0x216),'children':_0xcdeb8c(0x20d)}),a12_0x2ee017(Text,{'color':_0xcdeb8c(0x20c),'children':_0x1781f3(_0xcdeb8c(0x20f))})]})]});if(_0x22df30['length']===0x0)return a12_0x2ee017(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a12_0x2ee017(Text,{'color':_0xcdeb8c(0x215),'children':_0x1781f3('appMenu.sync.error.noLocalPages')})});return a12_0xa0536c(Box,{'flexDirection':_0xcdeb8c(0x1f0),'marginTop':0x1,'marginBottom':0x1,'children':[_0x4822b0===_0xcdeb8c(0x1e9)&&a12_0xa0536c(a12_0x30a25e,{'children':[a12_0xa0536c(Box,{'children':[a12_0xa0536c(Text,{'bold':!![],'children':['\x20\x20',_0x41bb51,getRemainingSpaces(_0xf699c6,_0x41bb51)]}),a12_0xa0536c(Text,{'bold':!![],'children':[_0x1781f3('appMenu.sync.table.local'),getRemainingSpaces(_0x5df4c0,_0x41bb51)]}),a12_0xa0536c(Text,{'bold':!![],'children':[_0x1781f3(_0xcdeb8c(0x213)),getRemainingSpaces(_0x5df4c0,_0x41bb51)]})]}),_0x233dd0[_0xcdeb8c(0x22a)](_0x279e44=>a12_0xa0536c(Box,{'children':[a12_0xa0536c(Text,{'children':['\x20\x20',_0x279e44['label'],getRemainingSpaces(_0xf699c6,_0x279e44[_0xcdeb8c(0x20a)])]}),a12_0xa0536c(Text,{'color':_0xcdeb8c(0x219),'children':[_0x279e44[_0xcdeb8c(0x21b)]?'✓':'✗',getRemainingSpaces(_0x5df4c0,'✓')]}),a12_0xa0536c(Text,{'color':_0x279e44['online']?_0xcdeb8c(0x219):_0xcdeb8c(0x22b),'children':[_0x279e44[_0xcdeb8c(0x21e)]?'✓':'✗',getRemainingSpaces(_0x5df4c0,'✓')]})]},_0x279e44[_0xcdeb8c(0x1f4)]))]}),_0x4822b0===_0xcdeb8c(0x1e9)&&_0x47afdb[_0xcdeb8c(0x223)]===0x0&&a12_0x2ee017(Box,{'marginTop':0x1,'children':a12_0x2ee017(Text,{'color':_0xcdeb8c(0x216),'children':_0x1781f3('appMenu.sync.title')})}),_0x47afdb[_0xcdeb8c(0x22a)]((_0x515a1c,_0x2d8309)=>a12_0xa0536c(Box,{'children':[a12_0xa0536c(Text,{'color':_0xcdeb8c(0x219),'children':['√\x20',_0x515a1c[_0xcdeb8c(0x20a)],':\x20']}),a12_0x2ee017(Text,{'color':_0xcdeb8c(0x216),'children':_0x515a1c[_0xcdeb8c(0x1f3)]})]},_0x2d8309)),_0x16e360&&_0x4822b0===_0xcdeb8c(0x1e9)&&a12_0x2ee017(Box,{'marginTop':0x1,'children':a12_0xa0536c(Text,{'color':_0xcdeb8c(0x22b),'children':['✗\x20',_0x16e360]})}),_0x4822b0==='selecting'&&a12_0x2ee017(a12_0x30a25e,{'children':a12_0xa0536c(Box,{'marginTop':_0x47afdb[_0xcdeb8c(0x223)]>0x0||_0x16e360?0x1:0x0,'flexDirection':_0xcdeb8c(0x1f0),'children':[a12_0x2ee017(Text,{'bold':!![],'children':_0x1781f3(_0xcdeb8c(0x1fa))}),_0x22df30[_0xcdeb8c(0x22a)]((_0x499cf3,_0x391ea1)=>{const _0x40d36a=_0xcdeb8c,_0x4aac51=_0x12bf0f===_0x391ea1,_0x4953de=_0x175668['has'](_0x391ea1),_0x31436d=_0x4c1920[_0x40d36a(0x200)](_0x499cf3[_0x40d36a(0x1f4)]),_0x4574b5=_0x31436d?_0x1781f3('appMenu.sync.operation.update'):_0x1781f3(_0x40d36a(0x1fc));return a12_0x2ee017(Box,{'children':a12_0xa0536c(Text,{'backgroundColor':_0x4aac51?_0x40d36a(0x1f1):undefined,'color':_0x4aac51?_0x40d36a(0x212):undefined,'children':['\x20\x20',_0x4953de?_0x40d36a(0x211):'[\x20]','\x20',_0x499cf3['label']]})},_0x499cf3[_0x40d36a(0x1f4)]);}),a12_0x2ee017(Box,{'marginTop':0x1,'children':a12_0xa0536c(Text,{'color':_0xcdeb8c(0x20c),'children':['\x20',_0x1781f3(_0xcdeb8c(0x222))]})})]})}),_0x4822b0===_0xcdeb8c(0x21d)&&a12_0xa0536c(a12_0x30a25e,{'children':[a12_0xa0536c(Box,{'children':[a12_0x2ee017(Text,{'children':_0x1781f3(_0xcdeb8c(0x1fe))}),a12_0x2ee017(Text,{'color':_0xcdeb8c(0x219),'children':_0x56bf16}),_0x16e360&&a12_0xa0536c(Text,{'color':_0xcdeb8c(0x22b),'children':[_0xcdeb8c(0x1ea),_0x16e360]})]}),!_0x16e360&&a12_0x2ee017(Box,{'children':a12_0x2ee017(Text,{'color':_0xcdeb8c(0x20c),'children':_0x1781f3('appMenu.sync.input.jsUrl.placeholder')})})]}),_0x4822b0===_0xcdeb8c(0x1f9)&&a12_0xa0536c(a12_0x30a25e,{'children':[a12_0xa0536c(Box,{'children':[a12_0x2ee017(Text,{'children':_0x1781f3(_0xcdeb8c(0x204))}),a12_0x2ee017(Text,{'color':'green','children':_0x56bf16}),_0x16e360&&a12_0xa0536c(Text,{'color':'red','children':[_0xcdeb8c(0x1ea),_0x16e360]})]}),!_0x16e360&&a12_0x2ee017(Box,{'children':a12_0x2ee017(Text,{'color':'gray','children':_0x1781f3(_0xcdeb8c(0x221))})})]}),_0x4822b0===_0xcdeb8c(0x1f5)&&a12_0x2ee017(Box,{'children':a12_0x2ee017(Text,{'children':_0x1781f3('appMenu.sync.step.creating')})}),_0x4822b0==='done'&&a12_0x2ee017(Box,{'children':a12_0x2ee017(Text,{'color':_0xcdeb8c(0x219),'children':_0x1781f3(_0xcdeb8c(0x220))})})]});}function getStringWidth(_0x6f9df7){const _0x46832d=a12_0x16a6;let _0x3603fe=0x0;for(const _0x34d253 of _0x6f9df7){/[\u4e00-\u9fa5]/[_0x46832d(0x214)](_0x34d253)?_0x3603fe+=0x2:_0x3603fe+=0x1;}return _0x3603fe;}function getRemainingSpaces(_0x39a69f,_0x242d58){const _0x14bab2=a12_0x16a6,_0x34c957=getStringWidth(_0x242d58);return Array(Math[_0x14bab2(0x21f)](0x0,_0x39a69f-_0x34c957))[_0x14bab2(0x203)]('\x20')[_0x14bab2(0x224)]('');}function getMaxWidth(_0x3d564d,_0x12aa8e=0x2){let _0x1520e8='',_0x1f46ce=0x0;for(const _0x32b061 of _0x3d564d){const _0x3809a6=getStringWidth(_0x32b061);_0x3809a6>_0x1f46ce&&(_0x1f46ce=_0x3809a6,_0x1520e8=_0x32b061);}return _0x1520e8+'\x20'['repeat'](_0x12aa8e);}
1
+ (function(_0xa61167,_0x16cf36){const _0x3745f1=a9_0x5f21,_0x2c6922=_0xa61167();while(!![]){try{const _0x5296bb=parseInt(_0x3745f1(0xed))/0x1*(-parseInt(_0x3745f1(0xb3))/0x2)+-parseInt(_0x3745f1(0xe5))/0x3*(-parseInt(_0x3745f1(0xe0))/0x4)+-parseInt(_0x3745f1(0xbf))/0x5+parseInt(_0x3745f1(0xc5))/0x6+-parseInt(_0x3745f1(0xe3))/0x7*(-parseInt(_0x3745f1(0xda))/0x8)+-parseInt(_0x3745f1(0xa9))/0x9*(-parseInt(_0x3745f1(0xdf))/0xa)+-parseInt(_0x3745f1(0xd4))/0xb;if(_0x5296bb===_0x16cf36)break;else _0x2c6922['push'](_0x2c6922['shift']());}catch(_0x58f4da){_0x2c6922['push'](_0x2c6922['shift']());}}}(a9_0x1bb6,0xe38a9));import{jsx as a9_0x405f8f,jsxs as a9_0x51dc1e,Fragment as a9_0x3ef7df}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a9_0x4c999c from'ink-spinner';function a9_0x1bb6(){const _0x105ff6=['input-js','has','add','dots','selecting','22254mPNEYA','green','[✓]','return','length','includes','[\x20]','gray','appMenu.sync.step.completed','appMenu.sync.title','value','column','1860010XmTDob','max','white','test','red','online','833670lKIKzq','label','appMenu.sync.error.authHint.suffix','appMenu.sync.error.authHint.prefix','map','input-css','filter','upArrow','appMenu.sync.input.cssUrl.label','appMenu.sync.error.cssUrlUnreachable','appMenu.sync.hotkeys','appMenu.sync.error.createMenuFailed','appMenu.sync.table.lovrabetPlatform','size','\x20←\x20','14158562pekJai','yellow','appMenu.sync.step.jsUrl','path','done','join','1754664tfTJdq','local','appMenu.sync.step.creating','appMenu.sync.input.jsUrl.label','appMenu.sync.input.cssUrl.placeholder','3150lCgLHx','1919164rJWJSR','appMenu.sync.operation.create','appMenu.sync.operation.update','49htkSCR','trim','6LgdXDR','lovrabet\x20auth','appMenu.sync.error.noMenuSelected','appMenu.sync.error.noLocalPages','appMenu.sync.table.local','appMenu.sync.error.invalidCssUrl','repeat','appMenu.sync.table.menuName','45rDCXRh','fill','cyan','delete','catch','appMenu.sync.error.jsUrlUnreachable','creating','appMenu.sync.step.cssUrl','13086sxQcYT','backspace','slice','appMenu.sync.step.selectedMenusCount','appMenu.sync.loading.fetchingMenuList'];a9_0x1bb6=function(){return _0x105ff6;};return a9_0x1bb6();}import{useGetOnlineMenuList}from'./use-get-online-menu-list.js';import{getLocalPages}from'./get-local-pages.js';import{createMenus}from'./create-menu.js';function a9_0x5f21(_0x51fbbe,_0x47e036){_0x51fbbe=_0x51fbbe-0xa3;const _0x1bb66e=a9_0x1bb6();let _0x5f21f1=_0x1bb66e[_0x51fbbe];return _0x5f21f1;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{useI18n}from'../i18n/hooks.js';import.meta.main&&render(a9_0x405f8f(AppMenuSyncUI,{}));export function AppMenuSyncUI(){const _0x454b92=a9_0x5f21,{exit:_0x34f4b5}=useApp(),{t:_0x584786}=useI18n(),{loading:_0x507ffc,menuList:_0x2553b7,error:_0x504413}=useGetOnlineMenuList(),_0x5c9202=getLocalPages(),_0x5e9365=_0x2553b7[_0x454b92(0xc9)](_0x2b9d46=>_0x2b9d46[_0x454b92(0xd7)]),_0x42cc91=_0x584786(_0x454b92(0xec)),_0x57dd11=[_0x42cc91,..._0x5c9202['map'](_0xb06cb9=>_0xb06cb9[_0x454b92(0xc6)])],_0x1f57a7=getStringWidth(getMaxWidth(_0x57dd11,0x4)),_0x5a4f83=getStringWidth(getMaxWidth([_0x42cc91])),[_0x174d1e,_0x5877ab]=useState(_0x454b92(0xb2)),[_0x3564c2,_0x33a8f2]=useState(new Set()),[_0x2dee92,_0x1585da]=useState(0x0),[_0x8b6319,_0xc0fbc3]=useState(''),[_0x28d57d,_0x19ef2b]=useState(''),[_0x11d708,_0x5b6b86]=useState(''),[_0x187af2,_0x366488]=useState(''),[_0xdcfe21,_0x10a70a]=useState([]),_0x3f4eac=_0x5c9202[_0x454b92(0xc9)](_0x497814=>({'label':_0x497814[_0x454b92(0xc6)],'path':_0x497814[_0x454b92(0xd7)],'local':!![],'online':_0x5e9365[_0x454b92(0xb8)](_0x497814[_0x454b92(0xd7)])})),_0x2360e8=_0x5c9202[_0x454b92(0xcb)](_0x1573df=>{const _0x10d7fe=_0x454b92;return!_0x5e9365[_0x10d7fe(0xb8)](_0x1573df[_0x10d7fe(0xd7)]);});useEffect(()=>{const _0x97ec02=_0x454b92;if(!_0x507ffc&&_0x5c9202[_0x97ec02(0xb7)]>0x0&&_0x3564c2['size']===0x0){const _0x195788=new Set(_0x5c9202[_0x97ec02(0xc9)]((_0x20e295,_0xa2a039)=>({'page':_0x20e295,'index':_0xa2a039}))[_0x97ec02(0xcb)](({page:_0x2e20b0})=>!_0x5e9365[_0x97ec02(0xb8)](_0x2e20b0[_0x97ec02(0xd7)]))[_0x97ec02(0xc9)](({index:_0x4dc9aa})=>_0x4dc9aa));_0x33a8f2(_0x195788);}},[_0x507ffc,_0x5c9202[_0x454b92(0xb7)],_0x5e9365[_0x454b92(0xb7)]]),useInput(async(_0x3dce4e,_0x501a4a)=>{const _0x359c3a=_0x454b92;if(_0x174d1e===_0x359c3a(0xb2)){if(_0x501a4a[_0x359c3a(0xcc)]){_0x1585da(_0x2e964c=>_0x2e964c>0x0?_0x2e964c-0x1:_0x5c9202[_0x359c3a(0xb7)]-0x1);return;}if(_0x501a4a['downArrow']){_0x1585da(_0x5c2dd4=>_0x5c2dd4<_0x5c9202[_0x359c3a(0xb7)]-0x1?_0x5c2dd4+0x1:0x0);return;}if(_0x3dce4e==='\x20'){_0x33a8f2(_0x20270e=>{const _0x272cfa=_0x359c3a,_0x2beff4=new Set(_0x20270e);return _0x2beff4['has'](_0x2dee92)?_0x2beff4[_0x272cfa(0xa4)](_0x2dee92):_0x2beff4[_0x272cfa(0xb0)](_0x2dee92),_0x2beff4;});return;}if(_0x3dce4e==='a'||_0x3dce4e==='A'){const _0x31de37=new Set(_0x5c9202[_0x359c3a(0xc9)]((_0x1ac3dc,_0x17456a)=>_0x17456a));_0x33a8f2(_0x31de37);return;}if(_0x3dce4e==='i'||_0x3dce4e==='I'||_0x3dce4e==='r'||_0x3dce4e==='R'){_0x33a8f2(_0x25f942=>{const _0x3552ec=_0x359c3a,_0x16e9f8=new Set();for(let _0x5f3b9e=0x0;_0x5f3b9e<_0x5c9202[_0x3552ec(0xb7)];_0x5f3b9e++){!_0x25f942['has'](_0x5f3b9e)&&_0x16e9f8[_0x3552ec(0xb0)](_0x5f3b9e);}return _0x16e9f8;});return;}if(_0x3dce4e==='q'||_0x3dce4e==='Q'){_0x34f4b5();return;}if(_0x501a4a[_0x359c3a(0xb6)]){if(_0x3564c2[_0x359c3a(0xd2)]===0x0){_0x366488(_0x584786(_0x359c3a(0xe7)));return;}const _0x5be3b4=_0x5c9202[_0x359c3a(0xcb)]((_0x1ca15f,_0x38b53a)=>_0x3564c2[_0x359c3a(0xaf)](_0x38b53a)),_0x411315=_0x5be3b4[_0x359c3a(0xc9)](_0x569968=>_0x569968['label'])['join'](',\x20');_0x10a70a([{'label':_0x584786('appMenu.sync.step.selectedMenus'),'value':_0x584786(_0x359c3a(0xac),{'count':_0x3564c2[_0x359c3a(0xd2)]})}]),_0x366488(''),_0x5877ab(_0x359c3a(0xae));return;}return;}if(_0x174d1e===_0x359c3a(0xae)){if(_0x501a4a[_0x359c3a(0xb6)]){const _0x1b73ec=_0x11d708[_0x359c3a(0xe4)]();if(_0x1b73ec==='')return;if(!isValidJsHttpsUrl(_0x1b73ec)){_0x366488(_0x584786('appMenu.sync.error.invalidJsUrl'));return;}if(!await isUrlReachable(_0x1b73ec)){_0x366488(_0x584786(_0x359c3a(0xa6)));return;}_0xc0fbc3(_0x1b73ec),_0x10a70a(_0x6a442a=>[..._0x6a442a,{'label':_0x584786(_0x359c3a(0xd6)),'value':_0x1b73ec}]),_0x5b6b86(''),_0x366488(''),_0x5877ab(_0x359c3a(0xca));return;}if(_0x501a4a[_0x359c3a(0xaa)]||_0x501a4a['delete']){_0x5b6b86(_0x4f1b0b=>_0x4f1b0b[_0x359c3a(0xab)](0x0,-0x1)),_0x366488('');return;}_0x5b6b86(_0x472e64=>_0x472e64+_0x3dce4e);return;}if(_0x174d1e===_0x359c3a(0xca)){if(_0x501a4a[_0x359c3a(0xb6)]){const _0x1a47ea=_0x11d708['trim']();if(_0x1a47ea==='')return;if(!isValidCssHttpsUrl(_0x1a47ea)){_0x366488(_0x584786(_0x359c3a(0xea)));return;}if(!await isUrlReachable(_0x1a47ea)){_0x366488(_0x584786(_0x359c3a(0xce)));return;}_0x19ef2b(_0x1a47ea),_0x10a70a(_0x276d24=>[..._0x276d24,{'label':_0x584786(_0x359c3a(0xa8)),'value':_0x1a47ea}]),_0x5b6b86(''),_0x366488(''),_0x5877ab('creating');const _0x3166f2=_0x5c9202[_0x359c3a(0xcb)]((_0x58e9b4,_0x155943)=>_0x3564c2['has'](_0x155943));createMenus(_0x3166f2,[_0x8b6319,_0x1a47ea])['then'](()=>{_0x5877ab('done'),setTimeout(()=>{_0x34f4b5();},0x3e8);})[_0x359c3a(0xa5)](_0x3d639b=>{const _0x59040c=_0x359c3a;_0x366488(_0x3d639b['message']||_0x584786(_0x59040c(0xd0))),_0x5877ab(_0x59040c(0xb2));});return;}if(_0x501a4a['backspace']||_0x501a4a[_0x359c3a(0xa4)]){_0x5b6b86(_0xfa4094=>_0xfa4094['slice'](0x0,-0x1)),_0x366488('');return;}_0x5b6b86(_0x127a5f=>_0x127a5f+_0x3dce4e);return;}});if(_0x507ffc)return a9_0x51dc1e(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a9_0x405f8f(Text,{'children':'\x20\x20'}),a9_0x405f8f(a9_0x4c999c,{'type':_0x454b92(0xb1)}),a9_0x405f8f(Text,{'children':_0x584786(_0x454b92(0xad))})]});if(_0x504413)return a9_0x51dc1e(Box,{'flexDirection':_0x454b92(0xbe),'marginTop':0x1,'marginBottom':0x1,'children':[a9_0x51dc1e(Text,{'color':_0x454b92(0xc3),'children':['✗\x20',_0x504413]}),a9_0x51dc1e(Box,{'marginTop':0x1,'children':[a9_0x405f8f(Text,{'color':'gray','children':_0x584786(_0x454b92(0xc8))}),a9_0x405f8f(Text,{'color':_0x454b92(0xa3),'children':_0x454b92(0xe6)}),a9_0x405f8f(Text,{'color':'gray','children':_0x584786(_0x454b92(0xc7))})]})]});if(_0x5c9202[_0x454b92(0xb7)]===0x0)return a9_0x405f8f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a9_0x405f8f(Text,{'color':_0x454b92(0xd5),'children':_0x584786(_0x454b92(0xe8))})});return a9_0x51dc1e(Box,{'flexDirection':_0x454b92(0xbe),'marginTop':0x1,'marginBottom':0x1,'children':[_0x174d1e===_0x454b92(0xb2)&&a9_0x51dc1e(a9_0x3ef7df,{'children':[a9_0x51dc1e(Box,{'children':[a9_0x51dc1e(Text,{'bold':!![],'children':['\x20\x20',_0x42cc91,getRemainingSpaces(_0x1f57a7,_0x42cc91)]}),a9_0x51dc1e(Text,{'bold':!![],'children':[_0x584786(_0x454b92(0xe9)),getRemainingSpaces(_0x5a4f83,_0x42cc91)]}),a9_0x51dc1e(Text,{'bold':!![],'children':[_0x584786(_0x454b92(0xd1)),getRemainingSpaces(_0x5a4f83,_0x42cc91)]})]}),_0x3f4eac[_0x454b92(0xc9)](_0xc91742=>a9_0x51dc1e(Box,{'children':[a9_0x51dc1e(Text,{'children':['\x20\x20',_0xc91742['label'],getRemainingSpaces(_0x1f57a7,_0xc91742[_0x454b92(0xc6)])]}),a9_0x51dc1e(Text,{'color':_0x454b92(0xb4),'children':[_0xc91742[_0x454b92(0xdb)]?'✓':'✗',getRemainingSpaces(_0x5a4f83,'✓')]}),a9_0x51dc1e(Text,{'color':_0xc91742[_0x454b92(0xc4)]?'green':_0x454b92(0xc3),'children':[_0xc91742[_0x454b92(0xc4)]?'✓':'✗',getRemainingSpaces(_0x5a4f83,'✓')]})]},_0xc91742[_0x454b92(0xd7)]))]}),_0x174d1e==='selecting'&&_0xdcfe21[_0x454b92(0xb7)]===0x0&&a9_0x405f8f(Box,{'marginTop':0x1,'children':a9_0x405f8f(Text,{'color':_0x454b92(0xa3),'children':_0x584786(_0x454b92(0xbc))})}),_0xdcfe21[_0x454b92(0xc9)]((_0x294e78,_0x236433)=>a9_0x51dc1e(Box,{'children':[a9_0x51dc1e(Text,{'color':_0x454b92(0xb4),'children':['√\x20',_0x294e78[_0x454b92(0xc6)],':\x20']}),a9_0x405f8f(Text,{'color':'cyan','children':_0x294e78[_0x454b92(0xbd)]})]},_0x236433)),_0x187af2&&_0x174d1e===_0x454b92(0xb2)&&a9_0x405f8f(Box,{'marginTop':0x1,'children':a9_0x51dc1e(Text,{'color':_0x454b92(0xc3),'children':['✗\x20',_0x187af2]})}),_0x174d1e===_0x454b92(0xb2)&&a9_0x405f8f(a9_0x3ef7df,{'children':a9_0x51dc1e(Box,{'marginTop':_0xdcfe21[_0x454b92(0xb7)]>0x0||_0x187af2?0x1:0x0,'flexDirection':_0x454b92(0xbe),'children':[a9_0x405f8f(Text,{'bold':!![],'children':_0x584786('appMenu.sync.step.selectMenus')}),_0x5c9202['map']((_0x142937,_0x271a14)=>{const _0x3e4f7d=_0x454b92,_0xc7b259=_0x2dee92===_0x271a14,_0x386e3f=_0x3564c2[_0x3e4f7d(0xaf)](_0x271a14),_0x3b7b83=_0x5e9365[_0x3e4f7d(0xb8)](_0x142937[_0x3e4f7d(0xd7)]),_0x442495=_0x3b7b83?_0x584786(_0x3e4f7d(0xe2)):_0x584786(_0x3e4f7d(0xe1));return a9_0x405f8f(Box,{'children':a9_0x51dc1e(Text,{'backgroundColor':_0xc7b259?'blue':undefined,'color':_0xc7b259?_0x3e4f7d(0xc1):undefined,'children':['\x20\x20',_0x386e3f?_0x3e4f7d(0xb5):_0x3e4f7d(0xb9),'\x20',_0x142937['label']]})},_0x142937[_0x3e4f7d(0xd7)]);}),a9_0x405f8f(Box,{'marginTop':0x1,'children':a9_0x51dc1e(Text,{'color':'gray','children':['\x20',_0x584786(_0x454b92(0xcf))]})})]})}),_0x174d1e==='input-js'&&a9_0x51dc1e(a9_0x3ef7df,{'children':[a9_0x51dc1e(Box,{'children':[a9_0x405f8f(Text,{'children':_0x584786(_0x454b92(0xdd))}),a9_0x405f8f(Text,{'color':_0x454b92(0xb4),'children':_0x11d708}),_0x187af2&&a9_0x51dc1e(Text,{'color':_0x454b92(0xc3),'children':[_0x454b92(0xd3),_0x187af2]})]}),!_0x187af2&&a9_0x405f8f(Box,{'children':a9_0x405f8f(Text,{'color':'gray','children':_0x584786('appMenu.sync.input.jsUrl.placeholder')})})]}),_0x174d1e===_0x454b92(0xca)&&a9_0x51dc1e(a9_0x3ef7df,{'children':[a9_0x51dc1e(Box,{'children':[a9_0x405f8f(Text,{'children':_0x584786(_0x454b92(0xcd))}),a9_0x405f8f(Text,{'color':'green','children':_0x11d708}),_0x187af2&&a9_0x51dc1e(Text,{'color':'red','children':[_0x454b92(0xd3),_0x187af2]})]}),!_0x187af2&&a9_0x405f8f(Box,{'children':a9_0x405f8f(Text,{'color':_0x454b92(0xba),'children':_0x584786(_0x454b92(0xde))})})]}),_0x174d1e===_0x454b92(0xa7)&&a9_0x405f8f(Box,{'children':a9_0x405f8f(Text,{'children':_0x584786(_0x454b92(0xdc))})}),_0x174d1e===_0x454b92(0xd8)&&a9_0x405f8f(Box,{'children':a9_0x405f8f(Text,{'color':_0x454b92(0xb4),'children':_0x584786(_0x454b92(0xbb))})})]});}function getStringWidth(_0x2b8cbf){const _0x48b257=a9_0x5f21;let _0x90e1ee=0x0;for(const _0x213d26 of _0x2b8cbf){/[\u4e00-\u9fa5]/[_0x48b257(0xc2)](_0x213d26)?_0x90e1ee+=0x2:_0x90e1ee+=0x1;}return _0x90e1ee;}function getRemainingSpaces(_0x307556,_0x40a6bc){const _0x3db6f1=a9_0x5f21,_0x616b64=getStringWidth(_0x40a6bc);return Array(Math[_0x3db6f1(0xc0)](0x0,_0x307556-_0x616b64))[_0x3db6f1(0xee)]('\x20')[_0x3db6f1(0xd9)]('');}function getMaxWidth(_0x6d507e,_0x567cdd=0x2){const _0x3050b4=a9_0x5f21;let _0x4b1a0c='',_0x5065cd=0x0;for(const _0x407a43 of _0x6d507e){const _0x461d33=getStringWidth(_0x407a43);_0x461d33>_0x5065cd&&(_0x5065cd=_0x461d33,_0x4b1a0c=_0x407a43);}return _0x4b1a0c+'\x20'[_0x3050b4(0xeb)](_0x567cdd);}
@@ -1 +1 @@
1
- const a13_0x3d1116=a13_0x56e4;(function(_0x13d23c,_0x478b41){const _0x22836b=a13_0x56e4,_0x528227=_0x13d23c();while(!![]){try{const _0x49074b=-parseInt(_0x22836b(0xf4))/0x1*(parseInt(_0x22836b(0xf3))/0x2)+parseInt(_0x22836b(0x113))/0x3+-parseInt(_0x22836b(0x116))/0x4*(parseInt(_0x22836b(0x108))/0x5)+parseInt(_0x22836b(0xf2))/0x6+-parseInt(_0x22836b(0xec))/0x7+-parseInt(_0x22836b(0xef))/0x8+-parseInt(_0x22836b(0xfe))/0x9*(-parseInt(_0x22836b(0x105))/0xa);if(_0x49074b===_0x478b41)break;else _0x528227['push'](_0x528227['shift']());}catch(_0x49cb9d){_0x528227['push'](_0x528227['shift']());}}}(a13_0x301f,0xe620d));function a13_0x301f(){const _0x2d97ee=['procode','appMenu.success.created','8984016cgXkZb','appMenu.error.missingAppCode','appMenu.error.appCodeHint.title','10739016cRqCIC','1992390ZhKuud','1yRFcrF','create-menus','data','error','appMenu.error.createHttpStatus','stringify','appMenu.error.authExpired','appMenu.error.createFailed','length','errorCode','22761ezPvNA','success','import','errorMsg','appMenu.error.appCodeHint.option2','/smartapi/menu/create','bind','2810shcMLY','create-menu','path','30toMIih','POST','status','appMenu.creating.single','appMenu.creating.batch.start','label','0011','map','appcode','resources','all','4230621AFFtBk','json','common.error','146652nIvtaf','appMenu.error.authValidationFailed','log','includes','info','appMenu.creating.batch.completed','4402384RxFOJx'];a13_0x301f=function(){return _0x2d97ee;};return a13_0x301f();}import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';function a13_0x56e4(_0xa2a98a,_0x573b08){_0xa2a98a=_0xa2a98a-0xea;const _0x301ff1=a13_0x301f();let _0x56e4be=_0x301ff1[_0xa2a98a];return _0x56e4be;}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import a13_0x37e02 from'../i18n/index.js';const config=readConfig(),t=a13_0x37e02['t'][a13_0x3d1116(0x104)](a13_0x37e02);export async function createMenu(_0x34ab39){const _0x1b6397=a13_0x3d1116,_0xe57ea1=config?.[_0x1b6397(0x110)];if(!_0xe57ea1){const _0x4b5b06=t(_0x1b6397(0xf0));logger[_0x1b6397(0xf7)](_0x1b6397(0x106),_0x4b5b06),console[_0x1b6397(0xf7)]('×\x20'+_0x4b5b06),console[_0x1b6397(0x118)](t(_0x1b6397(0xf1))),console[_0x1b6397(0x118)](t('appMenu.error.appCodeHint.option1')),console[_0x1b6397(0x118)](t(_0x1b6397(0x102)));return;}logger[_0x1b6397(0xea)](_0x1b6397(0x106),t(_0x1b6397(0x10b),{'label':_0x34ab39[_0x1b6397(0x10d)],'path':_0x34ab39[_0x1b6397(0x107)]}));const _0x1e5cae={'appCode':_0xe57ea1,'type':_0x1b6397(0xed),'sort':0x0,'extend':{'loadScriptMode':_0x1b6397(0x100),'resources':_0x34ab39[_0x1b6397(0x111)]?JSON['stringify'](_0x34ab39[_0x1b6397(0x111)]):undefined},..._0x34ab39},_0x2fd6db=await fetch(getApiDomain()+_0x1b6397(0x103),{'method':_0x1b6397(0x109),'body':JSON[_0x1b6397(0xf9)](_0x1e5cae),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x2fd6db['ok']){if(_0x2fd6db[_0x1b6397(0x10a)]===0x191){const _0x35098a=t('appMenu.error.authExpired');logger[_0x1b6397(0xf7)](_0x1b6397(0x106),_0x35098a,{'status':_0x2fd6db[_0x1b6397(0x10a)],'menu':_0x34ab39['label']});throw new Error(_0x35098a);}const _0x37037b=t(_0x1b6397(0xf8),{'status':_0x2fd6db['status']});logger[_0x1b6397(0xf7)]('create-menu',_0x37037b,{'menu':_0x34ab39[_0x1b6397(0x10d)]});throw new Error(_0x37037b);}const _0x3800f5=await _0x2fd6db[_0x1b6397(0x114)]();if(!_0x3800f5[_0x1b6397(0xff)]){const _0x3c382f=t('appMenu.error.createFailed',{'error':_0x3800f5['errorMsg']||t(_0x1b6397(0x115))});logger[_0x1b6397(0xf7)](_0x1b6397(0x106),_0x3c382f,{'errorCode':_0x3800f5['errorCode'],'errorMsg':_0x3800f5[_0x1b6397(0x101)],'menu':_0x34ab39['label']});throw new Error(_0x3c382f);}logger[_0x1b6397(0xea)](_0x1b6397(0x106),''+t(_0x1b6397(0xee))+_0x34ab39[_0x1b6397(0x10d)],_0x3800f5[_0x1b6397(0xf6)]),console[_0x1b6397(0x118)](t(_0x1b6397(0xee)),_0x3800f5[_0x1b6397(0xf6)]);}async function _createMenu(_0x82093a,_0x61c851){const _0x4922e5=a13_0x3d1116,_0x1ed559=config?.[_0x4922e5(0x110)];if(!_0x1ed559){const _0x22b6d0=t('appMenu.error.missingAppCode');logger[_0x4922e5(0xf7)](_0x4922e5(0x106),_0x22b6d0),console['error']('×\x20'+_0x22b6d0),console[_0x4922e5(0x118)](t(_0x4922e5(0xf1))),console['log'](t('appMenu.error.appCodeHint.option1')),console['log'](t('appMenu.error.appCodeHint.option2'));return;}const _0x50c827={'appCode':_0x1ed559,'type':_0x4922e5(0xed),'sort':0x0,'extend':{'loadScriptMode':_0x4922e5(0x100),'resources':_0x61c851?JSON[_0x4922e5(0xf9)](_0x61c851):undefined},'label':_0x82093a[_0x4922e5(0x10d)],'path':_0x82093a['path']},_0x19574e=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x4922e5(0x109),'body':JSON[_0x4922e5(0xf9)](_0x50c827),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x19574e['ok']){if(_0x19574e[_0x4922e5(0x10a)]===0x191){const _0x2fd636=t(_0x4922e5(0xfa));logger[_0x4922e5(0xf7)](_0x4922e5(0x106),_0x2fd636,{'status':_0x19574e['status'],'menu':_0x82093a[_0x4922e5(0x10d)]});throw new Error(_0x2fd636);}const _0x29203d=t('appMenu.error.createHttpStatus',{'status':_0x19574e[_0x4922e5(0x10a)]});logger[_0x4922e5(0xf7)](_0x4922e5(0x106),_0x29203d,{'menu':_0x82093a[_0x4922e5(0x10d)]});throw new Error(_0x29203d);}const _0x25bea0=await _0x19574e[_0x4922e5(0x114)]();if(!_0x25bea0['success']){if(_0x25bea0[_0x4922e5(0xfd)]===_0x4922e5(0x10e)||_0x25bea0[_0x4922e5(0x101)]?.[_0x4922e5(0x119)]('登录')){const _0x4e6a65=t(_0x4922e5(0x117));logger['error']('create-menu',_0x4e6a65,{'errorCode':_0x25bea0[_0x4922e5(0xfd)],'errorMsg':_0x25bea0[_0x4922e5(0x101)],'menu':_0x82093a[_0x4922e5(0x10d)]});throw new Error(_0x4e6a65);}const _0x8aa800=t(_0x4922e5(0xfb),{'error':_0x25bea0[_0x4922e5(0x101)]||t('common.error')});logger['error'](_0x4922e5(0x106),_0x8aa800,{'errorCode':_0x25bea0[_0x4922e5(0xfd)],'errorMsg':_0x25bea0[_0x4922e5(0x101)],'menu':_0x82093a[_0x4922e5(0x10d)]});throw new Error(_0x8aa800);}logger[_0x4922e5(0xea)]('create-menu',''+t(_0x4922e5(0xee))+_0x82093a[_0x4922e5(0x10d)]);}export async function createMenus(_0x4e337f,_0x567cc1){const _0x4497b6=a13_0x3d1116;logger[_0x4497b6(0xea)](_0x4497b6(0xf5),t(_0x4497b6(0x10c),{'count':_0x4e337f[_0x4497b6(0xfc)]})),await Promise[_0x4497b6(0x112)](_0x4e337f[_0x4497b6(0x10f)](async _0x353483=>{await _createMenu(_0x353483,_0x567cc1);})),logger[_0x4497b6(0xea)](_0x4497b6(0xf5),t(_0x4497b6(0xeb),{'count':_0x4e337f[_0x4497b6(0xfc)]}));}
1
+ const a10_0x530793=a10_0x93e2;(function(_0x3af6f0,_0x597f4c){const _0x345b33=a10_0x93e2,_0x6b6c4e=_0x3af6f0();while(!![]){try{const _0x364842=parseInt(_0x345b33(0x1d9))/0x1+parseInt(_0x345b33(0x1f6))/0x2*(-parseInt(_0x345b33(0x1de))/0x3)+-parseInt(_0x345b33(0x204))/0x4+parseInt(_0x345b33(0x1fc))/0x5*(-parseInt(_0x345b33(0x1e7))/0x6)+parseInt(_0x345b33(0x1df))/0x7+-parseInt(_0x345b33(0x1fe))/0x8*(parseInt(_0x345b33(0x1ef))/0x9)+-parseInt(_0x345b33(0x1db))/0xa*(-parseInt(_0x345b33(0x1fd))/0xb);if(_0x364842===_0x597f4c)break;else _0x6b6c4e['push'](_0x6b6c4e['shift']());}catch(_0x4f2f82){_0x6b6c4e['push'](_0x6b6c4e['shift']());}}}(a10_0x2d6f,0x9de7c));import{getCookie}from'../auth/get-cookie.js';function a10_0x93e2(_0x332ddb,_0x2fbbc0){_0x332ddb=_0x332ddb-0x1d8;const _0x2d6f08=a10_0x2d6f();let _0x93e2e=_0x2d6f08[_0x332ddb];return _0x93e2e;}function a10_0x2d6f(){const _0x1f376c=['appMenu.error.appCodeHint.title','POST','all','136YDQPpb','create-menus','errorMsg','log','error','appMenu.error.appCodeHint.option1','1814620UJnpSB','11VsTjde','8BUvKsk','bind','appMenu.error.createHttpStatus','label','status','application/json','2499376iohIya','create-menu','resources','364313yBbgoF','appcode','27673330yXjTbP','appMenu.creating.batch.start','success','56607yUDHuU','2507547HTjelh','path','stringify','common.error','appMenu.success.created','info','errorCode','appMenu.error.missingAppCode','12lnadAI','length','data','/smartapi/menu/create','includes','0011','procode','appMenu.error.appCodeHint.option2','1883727XQsgGn','appMenu.error.authExpired','map','appMenu.creating.batch.completed'];a10_0x2d6f=function(){return _0x1f376c;};return a10_0x2d6f();}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import a10_0x43f984 from'../i18n/index.js';const config=readConfig(),t=a10_0x43f984['t'][a10_0x530793(0x1ff)](a10_0x43f984);export async function createMenu(_0x59179d){const _0x3d2b9e=a10_0x530793,_0x475c18=config?.['appcode'];if(!_0x475c18){const _0x15a413=t(_0x3d2b9e(0x1e6));logger[_0x3d2b9e(0x1fa)](_0x3d2b9e(0x205),_0x15a413),console[_0x3d2b9e(0x1fa)]('×\x20'+_0x15a413),console['log'](t(_0x3d2b9e(0x1f3))),console['log'](t(_0x3d2b9e(0x1fb))),console['log'](t(_0x3d2b9e(0x1ee)));return;}logger[_0x3d2b9e(0x1e4)](_0x3d2b9e(0x205),t('appMenu.creating.single',{'label':_0x59179d['label'],'path':_0x59179d[_0x3d2b9e(0x1e0)]}));const _0xdad9cd={'appCode':_0x475c18,'type':_0x3d2b9e(0x1ed),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x59179d[_0x3d2b9e(0x1d8)]?JSON[_0x3d2b9e(0x1e1)](_0x59179d[_0x3d2b9e(0x1d8)]):undefined},..._0x59179d},_0x1ed8c8=await fetch(getApiDomain()+_0x3d2b9e(0x1ea),{'method':'POST','body':JSON[_0x3d2b9e(0x1e1)](_0xdad9cd),'headers':{'Content-Type':_0x3d2b9e(0x203),'Cookie':getCookie()}});if(!_0x1ed8c8['ok']){if(_0x1ed8c8[_0x3d2b9e(0x202)]===0x191){const _0x234736=t(_0x3d2b9e(0x1f0));logger[_0x3d2b9e(0x1fa)]('create-menu',_0x234736,{'status':_0x1ed8c8[_0x3d2b9e(0x202)],'menu':_0x59179d[_0x3d2b9e(0x201)]});throw new Error(_0x234736);}const _0x2cc031=t(_0x3d2b9e(0x200),{'status':_0x1ed8c8[_0x3d2b9e(0x202)]});logger[_0x3d2b9e(0x1fa)](_0x3d2b9e(0x205),_0x2cc031,{'menu':_0x59179d[_0x3d2b9e(0x201)]});throw new Error(_0x2cc031);}const _0x282b3c=await _0x1ed8c8['json']();if(!_0x282b3c[_0x3d2b9e(0x1dd)]){const _0x1e9340=t('appMenu.error.createFailed',{'error':_0x282b3c['errorMsg']||t(_0x3d2b9e(0x1e2))});logger[_0x3d2b9e(0x1fa)](_0x3d2b9e(0x205),_0x1e9340,{'errorCode':_0x282b3c[_0x3d2b9e(0x1e5)],'errorMsg':_0x282b3c[_0x3d2b9e(0x1f8)],'menu':_0x59179d[_0x3d2b9e(0x201)]});throw new Error(_0x1e9340);}logger[_0x3d2b9e(0x1e4)]('create-menu',''+t(_0x3d2b9e(0x1e3))+_0x59179d[_0x3d2b9e(0x201)],_0x282b3c['data']),console['log'](t(_0x3d2b9e(0x1e3)),_0x282b3c[_0x3d2b9e(0x1e9)]);}async function _createMenu(_0x2f7075,_0x379685){const _0x5c5c6b=a10_0x530793,_0x3719b5=config?.[_0x5c5c6b(0x1da)];if(!_0x3719b5){const _0x122b37=t(_0x5c5c6b(0x1e6));logger[_0x5c5c6b(0x1fa)](_0x5c5c6b(0x205),_0x122b37),console['error']('×\x20'+_0x122b37),console[_0x5c5c6b(0x1f9)](t('appMenu.error.appCodeHint.title')),console[_0x5c5c6b(0x1f9)](t(_0x5c5c6b(0x1fb))),console[_0x5c5c6b(0x1f9)](t('appMenu.error.appCodeHint.option2'));return;}const _0x46a881={'appCode':_0x3719b5,'type':'procode','sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x379685?JSON[_0x5c5c6b(0x1e1)](_0x379685):undefined},'label':_0x2f7075[_0x5c5c6b(0x201)],'path':_0x2f7075['path']},_0x3c1bd2=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x5c5c6b(0x1f4),'body':JSON[_0x5c5c6b(0x1e1)](_0x46a881),'headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0x3c1bd2['ok']){if(_0x3c1bd2['status']===0x191){const _0x1b1a8b=t('appMenu.error.authExpired');logger['error'](_0x5c5c6b(0x205),_0x1b1a8b,{'status':_0x3c1bd2[_0x5c5c6b(0x202)],'menu':_0x2f7075['label']});throw new Error(_0x1b1a8b);}const _0x15de91=t(_0x5c5c6b(0x200),{'status':_0x3c1bd2[_0x5c5c6b(0x202)]});logger[_0x5c5c6b(0x1fa)](_0x5c5c6b(0x205),_0x15de91,{'menu':_0x2f7075[_0x5c5c6b(0x201)]});throw new Error(_0x15de91);}const _0x427f88=await _0x3c1bd2['json']();if(!_0x427f88[_0x5c5c6b(0x1dd)]){if(_0x427f88[_0x5c5c6b(0x1e5)]===_0x5c5c6b(0x1ec)||_0x427f88[_0x5c5c6b(0x1f8)]?.[_0x5c5c6b(0x1eb)]('登录')){const _0x5f1384=t('appMenu.error.authValidationFailed');logger[_0x5c5c6b(0x1fa)](_0x5c5c6b(0x205),_0x5f1384,{'errorCode':_0x427f88['errorCode'],'errorMsg':_0x427f88[_0x5c5c6b(0x1f8)],'menu':_0x2f7075['label']});throw new Error(_0x5f1384);}const _0x484e9b=t('appMenu.error.createFailed',{'error':_0x427f88['errorMsg']||t(_0x5c5c6b(0x1e2))});logger['error'](_0x5c5c6b(0x205),_0x484e9b,{'errorCode':_0x427f88['errorCode'],'errorMsg':_0x427f88[_0x5c5c6b(0x1f8)],'menu':_0x2f7075[_0x5c5c6b(0x201)]});throw new Error(_0x484e9b);}logger['info'](_0x5c5c6b(0x205),''+t(_0x5c5c6b(0x1e3))+_0x2f7075['label']);}export async function createMenus(_0x2eb60e,_0x4b71ca){const _0x1d27f3=a10_0x530793;logger[_0x1d27f3(0x1e4)](_0x1d27f3(0x1f7),t(_0x1d27f3(0x1dc),{'count':_0x2eb60e[_0x1d27f3(0x1e8)]})),await Promise[_0x1d27f3(0x1f5)](_0x2eb60e[_0x1d27f3(0x1f1)](async _0x55cac9=>{await _createMenu(_0x55cac9,_0x4b71ca);})),logger[_0x1d27f3(0x1e4)](_0x1d27f3(0x1f7),t(_0x1d27f3(0x1f2),{'count':_0x2eb60e[_0x1d27f3(0x1e8)]}));}
@@ -1 +1 @@
1
- function a14_0x5af4(_0x94457c,_0x46089e){_0x94457c=_0x94457c-0x155;const _0x348536=a14_0x3485();let _0x5af481=_0x348536[_0x94457c];return _0x5af481;}const a14_0x3c10b0=a14_0x5af4;(function(_0x7ed538,_0x4109a3){const _0x1b6af3=a14_0x5af4,_0xc95323=_0x7ed538();while(!![]){try{const _0x549d46=-parseInt(_0x1b6af3(0x155))/0x1*(parseInt(_0x1b6af3(0x16e))/0x2)+-parseInt(_0x1b6af3(0x16a))/0x3+-parseInt(_0x1b6af3(0x15a))/0x4+parseInt(_0x1b6af3(0x159))/0x5*(-parseInt(_0x1b6af3(0x15b))/0x6)+parseInt(_0x1b6af3(0x166))/0x7*(-parseInt(_0x1b6af3(0x15e))/0x8)+parseInt(_0x1b6af3(0x163))/0x9+parseInt(_0x1b6af3(0x165))/0xa*(parseInt(_0x1b6af3(0x160))/0xb);if(_0x549d46===_0x4109a3)break;else _0xc95323['push'](_0xc95323['shift']());}catch(_0x3298fa){_0xc95323['push'](_0xc95323['shift']());}}}(a14_0x3485,0x45bae));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';const pagesDir=resolve(process[a14_0x3c10b0(0x15c)](),a14_0x3c10b0(0x16d));export function extractTitleFromComment(_0x51b1c0){const _0x8bef33=a14_0x3c10b0;try{const _0x47a05f=readFileSync(_0x51b1c0,_0x8bef33(0x158)),_0x1b6ba2=_0x47a05f[_0x8bef33(0x169)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1b6ba2&&_0x1b6ba2[0x1]){const _0x2c0952=_0x1b6ba2[0x1],_0x142201=_0x2c0952[_0x8bef33(0x169)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x142201&&_0x142201[0x1])return _0x142201[0x1][_0x8bef33(0x162)]();}let _0x44bc19=null;const _0x13d470=_0x47a05f['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x13d470&&_0x13d470[0x1]&&(_0x44bc19=_0x13d470[0x1]);if(!_0x44bc19){const _0x5a7e4f=_0x47a05f[_0x8bef33(0x169)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x5a7e4f&&_0x5a7e4f[0x1]&&(_0x44bc19=_0x5a7e4f[0x1]);}if(_0x44bc19){const _0x5a4dfa=new RegExp('\x5cb'+_0x44bc19+_0x8bef33(0x156)),_0x4a442a=_0x47a05f['match'](_0x5a4dfa);if(_0x4a442a&&_0x4a442a[0x1])return _0x4a442a[0x1];return _0x44bc19;}return null;}catch(_0x3846e9){return null;}}export function getLocalPages(_0xeb0e3d=pagesDir,_0xe35652=pagesDir){const _0x3f4532=a14_0x3c10b0;let _0x4a0b5c=[];const _0x23d385=readdirSync(_0xeb0e3d);return _0x23d385['forEach'](_0x18f3e0=>{const _0x4673b2=a14_0x5af4,_0x5196b7=join(_0xeb0e3d,_0x18f3e0),_0x23c718=statSync(_0x5196b7);if(_0x23c718&&_0x23c718[_0x4673b2(0x167)]())_0x4a0b5c=_0x4a0b5c['concat'](getLocalPages(_0x5196b7,_0xe35652));else{if(_0x18f3e0[_0x4673b2(0x16b)](_0x4673b2(0x16c))){let _0x3fb4b1=relative(_0xe35652,_0x5196b7);_0x3fb4b1['endsWith'](_0x4673b2(0x15f))?_0x3fb4b1=_0x3fb4b1['replace'](/index\.tsx$/,''):_0x3fb4b1=_0x3fb4b1[_0x4673b2(0x161)](/\.tsx$/,'');_0x3fb4b1[_0x4673b2(0x16b)]('/')&&(_0x3fb4b1=_0x3fb4b1['slice'](0x0,-0x1));const _0x594a6a=extractTitleFromComment(_0x5196b7),_0x4608cf=_0x594a6a||_0x3fb4b1;_0x4a0b5c[_0x4673b2(0x168)]({'path':_0x3fb4b1[_0x4673b2(0x164)]('$',':'),'label':_0x4608cf});}}}),_0x4a0b5c[_0x3f4532(0x157)](_0x1ae3d2=>_0x1ae3d2[_0x3f4532(0x15d)]!=='');}function a14_0x3485(){const _0x5c6644=['184752ivQcPq','endsWith','.tsx','src/pages','795028mSDXak','1RzDRre','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','filter','utf-8','5twGzeQ','98792mAzbRt','430818JqTZSj','cwd','path','5928rtSrxq','index.tsx','22ccuVcX','replace','trim','2168226tYxVUT','replaceAll','5191150TIiVsz','4137HTJjON','isDirectory','push','match'];a14_0x3485=function(){return _0x5c6644;};return a14_0x3485();}
1
+ const a11_0x108cf0=a11_0x16ae;(function(_0x4fb00e,_0x351df7){const _0x5530ac=a11_0x16ae,_0x2f2ee8=_0x4fb00e();while(!![]){try{const _0x1b1e45=parseInt(_0x5530ac(0x106))/0x1+-parseInt(_0x5530ac(0xf6))/0x2*(-parseInt(_0x5530ac(0x109))/0x3)+parseInt(_0x5530ac(0xff))/0x4*(-parseInt(_0x5530ac(0x10a))/0x5)+parseInt(_0x5530ac(0x100))/0x6*(parseInt(_0x5530ac(0xf9))/0x7)+-parseInt(_0x5530ac(0x110))/0x8+-parseInt(_0x5530ac(0xf5))/0x9*(parseInt(_0x5530ac(0xfa))/0xa)+parseInt(_0x5530ac(0x107))/0xb*(parseInt(_0x5530ac(0x10c))/0xc);if(_0x1b1e45===_0x351df7)break;else _0x2f2ee8['push'](_0x2f2ee8['shift']());}catch(_0x399484){_0x2f2ee8['push'](_0x2f2ee8['shift']());}}}(a11_0x18d9,0xb6d2f));import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve}from'path';function a11_0x16ae(_0x3186b9,_0x2841c2){_0x3186b9=_0x3186b9-0xf5;const _0x18d97f=a11_0x18d9();let _0x16ae80=_0x18d97f[_0x3186b9];return _0x16ae80;}const pagesDir=resolve(process[a11_0x108cf0(0xfd)](),a11_0x108cf0(0x102));export function extractTitleFromComment(_0x5d050f){const _0x4406b5=a11_0x108cf0;try{const _0x2fa73a=readFileSync(_0x5d050f,_0x4406b5(0x101)),_0x1290d4=_0x2fa73a[_0x4406b5(0x104)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x1290d4&&_0x1290d4[0x1]){const _0x265478=_0x1290d4[0x1],_0x4a8672=_0x265478[_0x4406b5(0x104)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4a8672&&_0x4a8672[0x1])return _0x4a8672[0x1][_0x4406b5(0xfe)]();}let _0x528386=null;const _0x335cb9=_0x2fa73a[_0x4406b5(0x104)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x335cb9&&_0x335cb9[0x1]&&(_0x528386=_0x335cb9[0x1]);if(!_0x528386){const _0x39a1ef=_0x2fa73a['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x39a1ef&&_0x39a1ef[0x1]&&(_0x528386=_0x39a1ef[0x1]);}if(_0x528386){const _0x2bfb96=new RegExp('\x5cb'+_0x528386+_0x4406b5(0x10f)),_0x47488b=_0x2fa73a[_0x4406b5(0x104)](_0x2bfb96);if(_0x47488b&&_0x47488b[0x1])return _0x47488b[0x1];return _0x528386;}return null;}catch(_0x44d375){return null;}}export function getLocalPages(_0x483409=pagesDir,_0x4d568c=pagesDir){const _0x3043e3=a11_0x108cf0;let _0x226b0d=[];const _0x3e81e1=readdirSync(_0x483409);return _0x3e81e1[_0x3043e3(0xfc)](_0x4333c3=>{const _0x1d10c4=_0x3043e3,_0x20be75=join(_0x483409,_0x4333c3),_0x24cabf=statSync(_0x20be75);if(_0x24cabf&&_0x24cabf['isDirectory']())_0x226b0d=_0x226b0d[_0x1d10c4(0x10d)](getLocalPages(_0x20be75,_0x4d568c));else{if(_0x4333c3[_0x1d10c4(0x10b)](_0x1d10c4(0x103))){let _0x19d6d9=relative(_0x4d568c,_0x20be75);_0x19d6d9[_0x1d10c4(0x10b)](_0x1d10c4(0x108))?_0x19d6d9=_0x19d6d9[_0x1d10c4(0xf7)](/index\.tsx$/,''):_0x19d6d9=_0x19d6d9[_0x1d10c4(0xf7)](/\.tsx$/,'');_0x19d6d9[_0x1d10c4(0x10b)]('/')&&(_0x19d6d9=_0x19d6d9['slice'](0x0,-0x1));const _0x3df9a9=extractTitleFromComment(_0x20be75),_0x5376c2=_0x3df9a9||_0x19d6d9;_0x226b0d[_0x1d10c4(0xf8)]({'path':_0x19d6d9[_0x1d10c4(0x10e)]('$',':'),'label':_0x5376c2});}}}),_0x226b0d[_0x3043e3(0x105)](_0x3559c0=>_0x3559c0[_0x3043e3(0xfb)]!=='');}function a11_0x18d9(){const _0x1c572c=['concat','replaceAll','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','9001224DVYTFe','57771LviAAw','26rtBcgG','replace','push','21YpMyxF','1260cnVYCE','path','forEach','cwd','trim','27052rxxBjI','2714358dAUdsd','utf-8','src/pages','.tsx','match','filter','1112033UxHrZq','89749LgOfHw','index.tsx','238626DmNdOI','685vAFTHp','endsWith','156HLfQWx'];a11_0x18d9=function(){return _0x1c572c;};return a11_0x18d9();}
@@ -1 +1 @@
1
- const a15_0x1c4f6b=a15_0x4f2f;(function(_0x4fff65,_0xfbedd8){const _0x4778d9=a15_0x4f2f,_0x531406=_0x4fff65();while(!![]){try{const _0x5d3dd4=parseInt(_0x4778d9(0x15b))/0x1+-parseInt(_0x4778d9(0x165))/0x2*(-parseInt(_0x4778d9(0x169))/0x3)+parseInt(_0x4778d9(0x15c))/0x4*(-parseInt(_0x4778d9(0x14c))/0x5)+-parseInt(_0x4778d9(0x164))/0x6+parseInt(_0x4778d9(0x15a))/0x7+-parseInt(_0x4778d9(0x150))/0x8+-parseInt(_0x4778d9(0x154))/0x9;if(_0x5d3dd4===_0xfbedd8)break;else _0x531406['push'](_0x531406['shift']());}catch(_0x51b728){_0x531406['push'](_0x531406['shift']());}}}(a15_0x41fb,0x5414e));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';function a15_0x41fb(){const _0x11a0b3=['status','length','get-online-menu-list','errorCode','application/json','1142358MYxRoK','485157rIcOqG','1087444LjhosM','data','log','bind','parse','children','json','appMenu.error.missingAppCode','355140zYQcAn','948446ojtlUL','extend','appMenu.error.httpStatus','appMenu.error.authExpired','3bGeYqi','resources','isArray','appMenu.error.appCodeHint.option2','appMenu.success.fetched','error','appcode','appMenu.fetching.online','flat','label','success','5htNuwg','info','/smartapi/menu/find?appCode=','appMenu.error.fetchFailed','3365864mDdfQs','appMenu.info.emptyMenuList','appMenu.error.appCodeHint.option1','common.error','237528JtlOvI'];a15_0x41fb=function(){return _0x11a0b3;};return a15_0x41fb();}import a15_0x476f6a from'../i18n/index.js';const config=readConfig(),t=a15_0x476f6a['t'][a15_0x1c4f6b(0x15f)](a15_0x476f6a);export async function getOnlineMenuList(){const _0xb5fb4f=a15_0x1c4f6b,_0xaccff9=config?.[_0xb5fb4f(0x147)];if(!_0xaccff9){const _0x5ce172=t(_0xb5fb4f(0x163));return logger[_0xb5fb4f(0x146)]('get-online-menu-list',_0x5ce172),console[_0xb5fb4f(0x146)]('×\x20'+_0x5ce172),console[_0xb5fb4f(0x15e)](t('appMenu.error.appCodeHint.title')),console[_0xb5fb4f(0x15e)](t(_0xb5fb4f(0x152))),console[_0xb5fb4f(0x15e)](t(_0xb5fb4f(0x144))),[];}const _0xa31913=getEnv();logger[_0xb5fb4f(0x14d)]('get-online-menu-list',_0xa31913==='online'?t(_0xb5fb4f(0x148),{'appCode':_0xaccff9}):t('appMenu.fetching.daily',{'appCode':_0xaccff9}));const _0x1f2cc5=await fetch(getApiDomain()+_0xb5fb4f(0x14e)+_0xaccff9,{'method':'GET','headers':{'Content-Type':_0xb5fb4f(0x159),'Cookie':getCookie()}});if(!_0x1f2cc5['ok']){if(_0x1f2cc5[_0xb5fb4f(0x155)]===0x191){const _0x1966c5=t(_0xb5fb4f(0x168));logger[_0xb5fb4f(0x146)]('get-online-menu-list',_0x1966c5,{'status':_0x1f2cc5[_0xb5fb4f(0x155)]});throw new Error(_0x1966c5);}const _0x2807ad=t(_0xb5fb4f(0x167),{'status':_0x1f2cc5['status']});logger['error'](_0xb5fb4f(0x157),_0x2807ad);throw new Error(_0x2807ad);}const _0x31418c=await _0x1f2cc5[_0xb5fb4f(0x162)]();if(!_0x31418c[_0xb5fb4f(0x14b)]){const _0x3f0a87=t(_0xb5fb4f(0x14f),{'error':_0x31418c['errorMsg']||t(_0xb5fb4f(0x153))});logger[_0xb5fb4f(0x146)](_0xb5fb4f(0x157),_0x3f0a87,{'errorCode':_0x31418c[_0xb5fb4f(0x158)],'errorMsg':_0x31418c['errorMsg']});throw new Error(_0x3f0a87);}if(!_0x31418c[_0xb5fb4f(0x15d)])return logger[_0xb5fb4f(0x14d)](_0xb5fb4f(0x157),t(_0xb5fb4f(0x151))),[];return logger[_0xb5fb4f(0x14d)]('get-online-menu-list',t(_0xb5fb4f(0x145),{'count':_0x31418c[_0xb5fb4f(0x15d)][_0xb5fb4f(0x156)]})),_0x31418c[_0xb5fb4f(0x15d)]['map'](formatMenuList)[_0xb5fb4f(0x149)]();}function a15_0x4f2f(_0x34d7e9,_0x5de8df){_0x34d7e9=_0x34d7e9-0x143;const _0x41fbb2=a15_0x41fb();let _0x4f2f38=_0x41fbb2[_0x34d7e9];return _0x4f2f38;}function formatMenuList(_0x2743d2){const _0x131e11=a15_0x1c4f6b;let _0x258f8f=[];try{if(_0x2743d2[_0x131e11(0x166)]?.[_0x131e11(0x16a)]){const _0x537fea=JSON[_0x131e11(0x160)](_0x2743d2['extend']['resources']);Array[_0x131e11(0x143)](_0x537fea)&&(_0x258f8f=_0x537fea);}}catch(_0x234e3d){}const _0x438885=[{'id':_0x2743d2['id'],'path':_0x2743d2['path'],'label':_0x2743d2[_0x131e11(0x14a)],'resources':_0x258f8f}];if(_0x2743d2[_0x131e11(0x161)]&&_0x2743d2[_0x131e11(0x161)][_0x131e11(0x156)]>0x0)for(const _0x4b1acc of _0x2743d2[_0x131e11(0x161)]){_0x438885['push'](...formatMenuList(_0x4b1acc));}return _0x438885;}
1
+ function a12_0x5224(){const _0x18e31a=['8jqjHHA','appMenu.error.fetchFailed','children','appcode','387GKXjkn','common.error','31434eQhZbh','appMenu.error.appCodeHint.option2','appMenu.error.authExpired','appMenu.error.appCodeHint.title','errorMsg','18988fTZsxQ','label','data','636549YUdkBs','appMenu.info.emptyMenuList','resources','path','get-online-menu-list','info','262410bFHtwC','appMenu.success.fetched','35fFaiMj','652JTanMs','appMenu.fetching.daily','flat','4063776QLUZdb','length','status','26BDPEoP','77wNJgTZ','success','231993cuvJro','push','extend','log','map','parse','14EFSggG','isArray','appMenu.error.missingAppCode','error'];a12_0x5224=function(){return _0x18e31a;};return a12_0x5224();}(function(_0x4d13f8,_0x4fe4be){const _0x446b66=a12_0x3986,_0x12aa5a=_0x4d13f8();while(!![]){try{const _0x3d7e26=-parseInt(_0x446b66(0x1e6))/0x1*(parseInt(_0x446b66(0x1f9))/0x2)+-parseInt(_0x446b66(0x1f0))/0x3+parseInt(_0x446b66(0x1ed))/0x4*(-parseInt(_0x446b66(0x1f8))/0x5)+parseInt(_0x446b66(0x1e8))/0x6*(parseInt(_0x446b66(0x1de))/0x7)+parseInt(_0x446b66(0x1e2))/0x8*(-parseInt(_0x446b66(0x202))/0x9)+parseInt(_0x446b66(0x1f6))/0xa*(-parseInt(_0x446b66(0x200))/0xb)+-parseInt(_0x446b66(0x1fc))/0xc*(-parseInt(_0x446b66(0x1ff))/0xd);if(_0x3d7e26===_0x4fe4be)break;else _0x12aa5a['push'](_0x12aa5a['shift']());}catch(_0x26c61c){_0x12aa5a['push'](_0x12aa5a['shift']());}}}(a12_0x5224,0x1a0f0));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';function a12_0x3986(_0x534b83,_0x4c7157){_0x534b83=_0x534b83-0x1de;const _0x5224ad=a12_0x5224();let _0x3986f4=_0x5224ad[_0x534b83];return _0x3986f4;}import{getEnv}from'../constant/env.js';import a12_0xf5ee85 from'../i18n/index.js';const config=readConfig(),t=a12_0xf5ee85['t']['bind'](a12_0xf5ee85);export async function getOnlineMenuList(){const _0x569b3c=a12_0x3986,_0x580280=config?.[_0x569b3c(0x1e5)];if(!_0x580280){const _0x273095=t(_0x569b3c(0x1e0));return logger['error'](_0x569b3c(0x1f4),_0x273095),console['error']('×\x20'+_0x273095),console[_0x569b3c(0x205)](t(_0x569b3c(0x1eb))),console[_0x569b3c(0x205)](t('appMenu.error.appCodeHint.option1')),console[_0x569b3c(0x205)](t(_0x569b3c(0x1e9))),[];}const _0x3e3b5c=getEnv();logger[_0x569b3c(0x1f5)](_0x569b3c(0x1f4),_0x3e3b5c==='online'?t('appMenu.fetching.online',{'appCode':_0x580280}):t(_0x569b3c(0x1fa),{'appCode':_0x580280}));const _0xb409dd=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x580280,{'method':'GET','headers':{'Content-Type':'application/json','Cookie':getCookie()}});if(!_0xb409dd['ok']){if(_0xb409dd[_0x569b3c(0x1fe)]===0x191){const _0xd57528=t(_0x569b3c(0x1ea));logger[_0x569b3c(0x1e1)](_0x569b3c(0x1f4),_0xd57528,{'status':_0xb409dd['status']});throw new Error(_0xd57528);}const _0x5d5e36=t('appMenu.error.httpStatus',{'status':_0xb409dd[_0x569b3c(0x1fe)]});logger[_0x569b3c(0x1e1)](_0x569b3c(0x1f4),_0x5d5e36);throw new Error(_0x5d5e36);}const _0x5f30b8=await _0xb409dd['json']();if(!_0x5f30b8[_0x569b3c(0x201)]){const _0x90503e=t(_0x569b3c(0x1e3),{'error':_0x5f30b8[_0x569b3c(0x1ec)]||t(_0x569b3c(0x1e7))});logger[_0x569b3c(0x1e1)](_0x569b3c(0x1f4),_0x90503e,{'errorCode':_0x5f30b8['errorCode'],'errorMsg':_0x5f30b8[_0x569b3c(0x1ec)]});throw new Error(_0x90503e);}if(!_0x5f30b8[_0x569b3c(0x1ef)])return logger[_0x569b3c(0x1f5)](_0x569b3c(0x1f4),t(_0x569b3c(0x1f1))),[];return logger['info']('get-online-menu-list',t(_0x569b3c(0x1f7),{'count':_0x5f30b8[_0x569b3c(0x1ef)][_0x569b3c(0x1fd)]})),_0x5f30b8[_0x569b3c(0x1ef)][_0x569b3c(0x206)](formatMenuList)[_0x569b3c(0x1fb)]();}function formatMenuList(_0xba82f){const _0x6f2763=a12_0x3986;let _0x3d24be=[];try{if(_0xba82f[_0x6f2763(0x204)]?.[_0x6f2763(0x1f2)]){const _0x52563f=JSON[_0x6f2763(0x207)](_0xba82f[_0x6f2763(0x204)]['resources']);Array[_0x6f2763(0x1df)](_0x52563f)&&(_0x3d24be=_0x52563f);}}catch(_0x4eff13){}const _0x1911f0=[{'id':_0xba82f['id'],'path':_0xba82f[_0x6f2763(0x1f3)],'label':_0xba82f[_0x6f2763(0x1ee)],'resources':_0x3d24be}];if(_0xba82f[_0x6f2763(0x1e4)]&&_0xba82f['children'][_0x6f2763(0x1fd)]>0x0)for(const _0xa9cc1f of _0xba82f[_0x6f2763(0x1e4)]){_0x1911f0[_0x6f2763(0x203)](...formatMenuList(_0xa9cc1f));}return _0x1911f0;}
@@ -1 +1 @@
1
- function a17_0x3280(){const _0x36e819=['5178AMdzYN','3147525QiqkHB','775vePorG','7837432oejpRl','8796529kvMDxg','common.error','1985IhaiGc','9iNxaUU','17623020rVcWeG','bind','862iODyTd','finally','catch','appMenu.error.fetchFailed','771288FmzCUB'];a17_0x3280=function(){return _0x36e819;};return a17_0x3280();}function a17_0x44e9(_0x48faa2,_0xc15de){_0x48faa2=_0x48faa2-0x13a;const _0x328039=a17_0x3280();let _0x44e9e5=_0x328039[_0x48faa2];return _0x44e9e5;}const a17_0x2489c7=a17_0x44e9;(function(_0x358e55,_0x11c2ce){const _0xba0c87=a17_0x44e9,_0x59cb5f=_0x358e55();while(!![]){try{const _0x4fc31d=-parseInt(_0xba0c87(0x140))/0x1*(parseInt(_0xba0c87(0x144))/0x2)+-parseInt(_0xba0c87(0x141))/0x3*(-parseInt(_0xba0c87(0x148))/0x4)+-parseInt(_0xba0c87(0x13c))/0x5*(-parseInt(_0xba0c87(0x13a))/0x6)+parseInt(_0xba0c87(0x13e))/0x7+parseInt(_0xba0c87(0x13d))/0x8+parseInt(_0xba0c87(0x13b))/0x9+-parseInt(_0xba0c87(0x142))/0xa;if(_0x4fc31d===_0x11c2ce)break;else _0x59cb5f['push'](_0x59cb5f['shift']());}catch(_0x11f2e2){_0x59cb5f['push'](_0x59cb5f['shift']());}}}(a17_0x3280,0xa61fd));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';import a17_0x2cdeb1 from'../i18n/index.js';const t=a17_0x2cdeb1['t'][a17_0x2489c7(0x143)](a17_0x2cdeb1);export function useGetOnlineMenuList(){const [_0x184639,_0x2cada0]=useState([]),[_0x2ffe3a,_0xf2d284]=useState(!![]),[_0x313fdd,_0x4aab22]=useState('');return useEffect(()=>{const _0x41a31d=a17_0x44e9;_0xf2d284(!![]),_0x4aab22(''),getOnlineMenuList()['then'](_0x2cada0)[_0x41a31d(0x146)](_0x845afd=>{const _0x370ada=_0x41a31d;_0x4aab22(_0x845afd['message']||t(_0x370ada(0x147),{'error':t(_0x370ada(0x13f))}));})[_0x41a31d(0x145)](()=>_0xf2d284(![]));},[]),{'menuList':_0x184639,'loading':_0x2ffe3a,'error':_0x313fdd};}
1
+ const a14_0x543049=a14_0xae43;(function(_0x57ccd7,_0x3dd67c){const _0x97c1ee=a14_0xae43,_0x319b4d=_0x57ccd7();while(!![]){try{const _0x6163b=parseInt(_0x97c1ee(0x17f))/0x1+-parseInt(_0x97c1ee(0x173))/0x2*(-parseInt(_0x97c1ee(0x17e))/0x3)+parseInt(_0x97c1ee(0x179))/0x4+-parseInt(_0x97c1ee(0x174))/0x5+-parseInt(_0x97c1ee(0x180))/0x6+parseInt(_0x97c1ee(0x177))/0x7+-parseInt(_0x97c1ee(0x178))/0x8;if(_0x6163b===_0x3dd67c)break;else _0x319b4d['push'](_0x319b4d['shift']());}catch(_0xf153f1){_0x319b4d['push'](_0x319b4d['shift']());}}}(a14_0x229b,0x547e9));import{useEffect,useState}from'react';import{getOnlineMenuList}from'./get-online-menu-list.js';import a14_0x2217d9 from'../i18n/index.js';const t=a14_0x2217d9['t'][a14_0x543049(0x17b)](a14_0x2217d9);function a14_0x229b(){const _0x26a647=['message','bind','common.error','appMenu.error.fetchFailed','5328titqEI','439811cdgRmJ','327006rXboMT','326MXHLqa','861255OcwsVL','catch','then','3540397zBrNJo','8043216ICjpNt','1372692QpPkSd'];a14_0x229b=function(){return _0x26a647;};return a14_0x229b();}function a14_0xae43(_0x5cf35b,_0x3fc7af){_0x5cf35b=_0x5cf35b-0x173;const _0x229bc5=a14_0x229b();let _0xae437c=_0x229bc5[_0x5cf35b];return _0xae437c;}export function useGetOnlineMenuList(){const [_0x5657f7,_0x4ea4bf]=useState([]),[_0x42072e,_0x120a59]=useState(!![]),[_0x14d5db,_0x3e205f]=useState('');return useEffect(()=>{const _0x27af73=a14_0xae43;_0x120a59(!![]),_0x3e205f(''),getOnlineMenuList()[_0x27af73(0x176)](_0x4ea4bf)[_0x27af73(0x175)](_0x537c5a=>{const _0x39600e=_0x27af73;_0x3e205f(_0x537c5a[_0x39600e(0x17a)]||t(_0x39600e(0x17d),{'error':t(_0x39600e(0x17c))}));})['finally'](()=>_0x120a59(![]));},[]),{'menuList':_0x5657f7,'loading':_0x42072e,'error':_0x14d5db};}
@@ -1 +1 @@
1
- function a18_0x40c4(_0x2bc094,_0x53537b){_0x2bc094=_0x2bc094-0x132;const _0x2e418c=a18_0x2e41();let _0x40c44d=_0x2e418c[_0x2bc094];return _0x40c44d;}(function(_0x3f8fdc,_0x228463){const _0x2fc8c9=a18_0x40c4,_0x25ca93=_0x3f8fdc();while(!![]){try{const _0x4e7275=parseInt(_0x2fc8c9(0x139))/0x1+-parseInt(_0x2fc8c9(0x135))/0x2*(parseInt(_0x2fc8c9(0x13e))/0x3)+-parseInt(_0x2fc8c9(0x13f))/0x4+parseInt(_0x2fc8c9(0x140))/0x5*(parseInt(_0x2fc8c9(0x133))/0x6)+parseInt(_0x2fc8c9(0x138))/0x7*(-parseInt(_0x2fc8c9(0x136))/0x8)+-parseInt(_0x2fc8c9(0x13b))/0x9*(-parseInt(_0x2fc8c9(0x13a))/0xa)+-parseInt(_0x2fc8c9(0x132))/0xb;if(_0x4e7275===_0x228463)break;else _0x25ca93['push'](_0x25ca93['shift']());}catch(_0x43af4d){_0x25ca93['push'](_0x25ca93['shift']());}}}(a18_0x2e41,0xbd3f2));export function getRemainingSpaces(_0x3d5620,_0x32529b){const _0x47c664=a18_0x40c4,_0x573b01=getStringWidth(_0x32529b);return Array(Math[_0x47c664(0x134)](0x0,_0x3d5620-_0x573b01))[_0x47c664(0x137)]('\x20')[_0x47c664(0x13d)]('');}function a18_0x2e41(){const _0x308d12=['repeat','join','3qoQwwm','399968Rheapq','11905NqfZZF','11362780ppBhsu','2358NQedJS','max','2443464aODxnd','8QeUhhU','fill','4785291cdWnBF','1406304lrJjVG','8620pibHWS','15363hSbVRz'];a18_0x2e41=function(){return _0x308d12;};return a18_0x2e41();}export function getMaxWidth(_0x5ada0d,_0x2734a7=0x2){const _0x3abc73=a18_0x40c4;let _0x126c36='',_0x4c02bc=0x0;for(const _0x3ac79e of _0x5ada0d){const _0x22f286=getStringWidth(_0x3ac79e);_0x22f286>_0x4c02bc&&(_0x4c02bc=_0x22f286,_0x126c36=_0x3ac79e);}return _0x126c36+'\x20'[_0x3abc73(0x13c)](_0x2734a7);}export function getStringWidth(_0x347903){let _0x3c53c4=0x0;for(const _0x16f226 of _0x347903){/[\u4e00-\u9fa5]/['test'](_0x16f226)?_0x3c53c4+=0x2:_0x3c53c4+=0x1;}return _0x3c53c4;}
1
+ (function(_0x2695be,_0x3ce181){const _0x214715=a15_0x4015,_0x110e3e=_0x2695be();while(!![]){try{const _0x902889=parseInt(_0x214715(0x14a))/0x1+-parseInt(_0x214715(0x151))/0x2*(-parseInt(_0x214715(0x152))/0x3)+parseInt(_0x214715(0x148))/0x4+-parseInt(_0x214715(0x14b))/0x5*(parseInt(_0x214715(0x149))/0x6)+-parseInt(_0x214715(0x14c))/0x7+parseInt(_0x214715(0x14d))/0x8+-parseInt(_0x214715(0x153))/0x9;if(_0x902889===_0x3ce181)break;else _0x110e3e['push'](_0x110e3e['shift']());}catch(_0x3a170b){_0x110e3e['push'](_0x110e3e['shift']());}}}(a15_0x42da,0x1a262));export function getRemainingSpaces(_0x244d31,_0x28185f){const _0x5127e4=a15_0x4015,_0x5c380f=getStringWidth(_0x28185f);return Array(Math[_0x5127e4(0x150)](0x0,_0x244d31-_0x5c380f))[_0x5127e4(0x14f)]('\x20')[_0x5127e4(0x154)]('');}function a15_0x42da(){const _0x594c7b=['317516shGfLz','3iibZRT','1352304ekakgU','join','660196rZHDSd','67074ntwRcd','79127ZIYSxv','10imyqoH','1464421LRuUFZ','687912tTdvkR','repeat','fill','max'];a15_0x42da=function(){return _0x594c7b;};return a15_0x42da();}function a15_0x4015(_0x3d5cd8,_0x162e99){_0x3d5cd8=_0x3d5cd8-0x148;const _0x42da4b=a15_0x42da();let _0x40159f=_0x42da4b[_0x3d5cd8];return _0x40159f;}export function getMaxWidth(_0x59ffd7,_0x282b92=0x2){const _0x505cd8=a15_0x4015;let _0xe07578='',_0x155dc3=0x0;for(const _0x56aadc of _0x59ffd7){const _0x56f32a=getStringWidth(_0x56aadc);_0x56f32a>_0x155dc3&&(_0x155dc3=_0x56f32a,_0xe07578=_0x56aadc);}return _0xe07578+'\x20'[_0x505cd8(0x14e)](_0x282b92);}export function getStringWidth(_0x5c7544){let _0x5c6b51=0x0;for(const _0x397881 of _0x5c7544){/[\u4e00-\u9fa5]/['test'](_0x397881)?_0x5c6b51+=0x2:_0x5c6b51+=0x1;}return _0x5c6b51;}
@@ -1 +1 @@
1
- (function(_0x1b2634,_0x443f37){const _0x318bd4=a19_0x47af,_0x29001d=_0x1b2634();while(!![]){try{const _0x10fd1c=parseInt(_0x318bd4(0x184))/0x1+parseInt(_0x318bd4(0x18c))/0x2+-parseInt(_0x318bd4(0x185))/0x3*(-parseInt(_0x318bd4(0x18d))/0x4)+-parseInt(_0x318bd4(0x187))/0x5+parseInt(_0x318bd4(0x189))/0x6*(parseInt(_0x318bd4(0x18e))/0x7)+-parseInt(_0x318bd4(0x18b))/0x8+-parseInt(_0x318bd4(0x188))/0x9*(parseInt(_0x318bd4(0x183))/0xa);if(_0x10fd1c===_0x443f37)break;else _0x29001d['push'](_0x29001d['shift']());}catch(_0x32f060){_0x29001d['push'](_0x29001d['shift']());}}}(a19_0x1884,0xe207e));function a19_0x1884(){const _0x30508b=['557625BmVImI','trim','6415480MNXUEk','12165327PsSrrb','49446UNjwNw','HEAD','113608sNsFhR','1122526Lahoer','20qSpTNx','1365vNLoVf','test','20gKRWAr','1828892AlghGz'];a19_0x1884=function(){return _0x30508b;};return a19_0x1884();}function a19_0x47af(_0x2ad8fa,_0x44c887){_0x2ad8fa=_0x2ad8fa-0x183;const _0x1884c1=a19_0x1884();let _0x47af4c=_0x1884c1[_0x2ad8fa];return _0x47af4c;}export function isValidJsHttpsUrl(_0x28d52c){const _0x3e661b=a19_0x47af;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x28d52c[_0x3e661b(0x186)]());}export function isValidCssHttpsUrl(_0x52ed0d){const _0x319b5f=a19_0x47af;return/^https:\/\/.+\.css(\?.*)?$/[_0x319b5f(0x18f)](_0x52ed0d['trim']());}export async function isUrlReachable(_0x468d23){const _0x58d35d=a19_0x47af;try{const _0x50161f=await fetch(_0x468d23,{'method':_0x58d35d(0x18a)});return _0x50161f['ok'];}catch{return![];}}
1
+ (function(_0x105019,_0x3a6054){const _0x2bb7f6=a16_0x9602,_0x26d611=_0x105019();while(!![]){try{const _0x2469c1=parseInt(_0x2bb7f6(0x198))/0x1*(parseInt(_0x2bb7f6(0x18d))/0x2)+-parseInt(_0x2bb7f6(0x192))/0x3*(parseInt(_0x2bb7f6(0x18e))/0x4)+-parseInt(_0x2bb7f6(0x191))/0x5+parseInt(_0x2bb7f6(0x194))/0x6*(parseInt(_0x2bb7f6(0x197))/0x7)+-parseInt(_0x2bb7f6(0x196))/0x8+parseInt(_0x2bb7f6(0x19a))/0x9+parseInt(_0x2bb7f6(0x199))/0xa*(parseInt(_0x2bb7f6(0x18f))/0xb);if(_0x2469c1===_0x3a6054)break;else _0x26d611['push'](_0x26d611['shift']());}catch(_0x312bdf){_0x26d611['push'](_0x26d611['shift']());}}}(a16_0x3b01,0xe7614));function a16_0x3b01(){const _0x1f55ee=['test','156786LiOEQA','HEAD','11163312jkNSda','35rVDhdY','349uiTJtq','256850nsxMOc','10305036AfoOXB','7766MtjwVw','6148VABUqj','803zgUpAx','trim','5149580wlFUFQ','2211iQuRak'];a16_0x3b01=function(){return _0x1f55ee;};return a16_0x3b01();}export function isValidJsHttpsUrl(_0x2ff1ac){const _0x160af8=a16_0x9602;return/^https:\/\/.+\.js(\?.*)?$/[_0x160af8(0x193)](_0x2ff1ac[_0x160af8(0x190)]());}function a16_0x9602(_0x534544,_0x5e6da4){_0x534544=_0x534544-0x18d;const _0x3b0135=a16_0x3b01();let _0x9602d4=_0x3b0135[_0x534544];return _0x9602d4;}export function isValidCssHttpsUrl(_0x1e19f1){const _0x50a64d=a16_0x9602;return/^https:\/\/.+\.css(\?.*)?$/[_0x50a64d(0x193)](_0x1e19f1[_0x50a64d(0x190)]());}export async function isUrlReachable(_0xbdba0e){const _0x2a7219=a16_0x9602;try{const _0x5e0f45=await fetch(_0xbdba0e,{'method':_0x2a7219(0x195)});return _0x5e0f45['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x3a31a9,_0x53f805){const _0x50a7ab=a20_0x4d1e,_0x246c91=_0x3a31a9();while(!![]){try{const _0x498b1d=parseInt(_0x50a7ab(0x194))/0x1+-parseInt(_0x50a7ab(0x190))/0x2*(parseInt(_0x50a7ab(0x18d))/0x3)+parseInt(_0x50a7ab(0x18c))/0x4+-parseInt(_0x50a7ab(0x193))/0x5+parseInt(_0x50a7ab(0x19b))/0x6*(-parseInt(_0x50a7ab(0x19d))/0x7)+parseInt(_0x50a7ab(0x196))/0x8+-parseInt(_0x50a7ab(0x18f))/0x9*(-parseInt(_0x50a7ab(0x192))/0xa);if(_0x498b1d===_0x53f805)break;else _0x246c91['push'](_0x246c91['shift']());}catch(_0x12afd9){_0x246c91['push'](_0x246c91['shift']());}}}(a20_0x41fe,0xd6569));function a20_0x41fe(){const _0xef153c=['10dwFJjU','7142975HJxgxT','1568648jTvgPe','filter','10310848uiHwGh','flat','appMenu.updateCdn.preview.resourceLinks','appMenu.updateCdn.preview.title','appMenu.updateCdn.preview.menuList','6MVwXDi','column','433461cvlIxK','map','join','cyan','label','1440140mDKdAP','3ipdIQQ','resources','7333191xGgOEI','3327782SOJCTg','from'];a20_0x41fe=function(){return _0xef153c;};return a20_0x41fe();}import{jsx as a20_0x39f140,jsxs as a20_0x44b4fd}from'react/jsx-runtime';import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';function a20_0x4d1e(_0x2217c0,_0x1af060){_0x2217c0=_0x2217c0-0x18a;const _0x41fef5=a20_0x41fe();let _0x4d1e3a=_0x41fef5[_0x2217c0];return _0x4d1e3a;}export function CurrentMenuCdnContent(_0x28c7ec){const _0x5d9158=a20_0x4d1e,{t:_0x27315e}=useI18n(),{menuList:_0x2e4390}=_0x28c7ec,_0x3ece03=_0x2e4390[_0x5d9158(0x195)](_0x40ea37=>_0x40ea37[_0x5d9158(0x18e)]['length']),_0x5b99e4=Array[_0x5d9158(0x191)](new Set(_0x2e4390[_0x5d9158(0x19e)](_0x3500ad=>_0x3500ad[_0x5d9158(0x18e)])[_0x5d9158(0x197)]()));return a20_0x44b4fd(Box,{'flexDirection':_0x5d9158(0x19c),'children':[a20_0x39f140(Text,{'color':_0x5d9158(0x18a),'children':_0x27315e(_0x5d9158(0x199))}),a20_0x44b4fd(Box,{'marginTop':0x1,'flexDirection':_0x5d9158(0x19c),'children':[a20_0x44b4fd(Text,{'bold':!![],'children':['\x20\x20',_0x27315e(_0x5d9158(0x19a))]}),a20_0x44b4fd(Text,{'children':['\x20\x20',_0x3ece03[_0x5d9158(0x19e)](_0x4d823b=>_0x4d823b[_0x5d9158(0x18b)])[_0x5d9158(0x19f)](',\x20')]})]}),a20_0x39f140(Box,{'marginTop':0x1,'children':a20_0x44b4fd(Text,{'bold':!![],'children':['\x20\x20',_0x27315e(_0x5d9158(0x198))]})}),_0x5b99e4[_0x5d9158(0x19e)](_0x54229a=>a20_0x39f140(Box,{'children':a20_0x44b4fd(Text,{'children':['\x20\x20',_0x54229a]})},_0x54229a))]});}
1
+ (function(_0x3a0171,_0xc0c825){const _0x14f5db=a17_0x2aa2,_0xe2a3d9=_0x3a0171();while(!![]){try{const _0x137c8e=-parseInt(_0x14f5db(0x178))/0x1+-parseInt(_0x14f5db(0x17f))/0x2+parseInt(_0x14f5db(0x177))/0x3+parseInt(_0x14f5db(0x187))/0x4*(-parseInt(_0x14f5db(0x181))/0x5)+-parseInt(_0x14f5db(0x182))/0x6*(parseInt(_0x14f5db(0x183))/0x7)+parseInt(_0x14f5db(0x184))/0x8+-parseInt(_0x14f5db(0x180))/0x9*(-parseInt(_0x14f5db(0x176))/0xa);if(_0x137c8e===_0xc0c825)break;else _0xe2a3d9['push'](_0xe2a3d9['shift']());}catch(_0x13724c){_0xe2a3d9['push'](_0xe2a3d9['shift']());}}}(a17_0x1b69,0x2c966));import{jsx as a17_0x28fe37,jsxs as a17_0x3ffe70}from'react/jsx-runtime';function a17_0x2aa2(_0x128f46,_0x4b2647){_0x128f46=_0x128f46-0x176;const _0x1b69a9=a17_0x1b69();let _0x2aa2bc=_0x1b69a9[_0x128f46];return _0x2aa2bc;}import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';function a17_0x1b69(){const _0x3fb454=['513714EYSRtX','9ipGmUi','635QuuaKU','1587786gtuZgL','7vDtCGc','1359352aMvHaA','flat','from','4808qBcvLw','appMenu.updateCdn.preview.title','map','5619380uKAzBG','571077CtaYgK','65444jsZaHP','join','resources','appMenu.updateCdn.preview.menuList','label','column','cyan'];a17_0x1b69=function(){return _0x3fb454;};return a17_0x1b69();}export function CurrentMenuCdnContent(_0x4d0ba5){const _0x22347e=a17_0x2aa2,{t:_0xbf32de}=useI18n(),{menuList:_0x27a53a}=_0x4d0ba5,_0x5b0fdb=_0x27a53a['filter'](_0x331144=>_0x331144['resources']['length']),_0x5f1d8b=Array[_0x22347e(0x186)](new Set(_0x27a53a[_0x22347e(0x189)](_0x3542f2=>_0x3542f2[_0x22347e(0x17a)])[_0x22347e(0x185)]()));return a17_0x3ffe70(Box,{'flexDirection':'column','children':[a17_0x28fe37(Text,{'color':_0x22347e(0x17e),'children':_0xbf32de(_0x22347e(0x188))}),a17_0x3ffe70(Box,{'marginTop':0x1,'flexDirection':_0x22347e(0x17d),'children':[a17_0x3ffe70(Text,{'bold':!![],'children':['\x20\x20',_0xbf32de(_0x22347e(0x17b))]}),a17_0x3ffe70(Text,{'children':['\x20\x20',_0x5b0fdb['map'](_0x21740f=>_0x21740f[_0x22347e(0x17c)])[_0x22347e(0x179)](',\x20')]})]}),a17_0x28fe37(Box,{'marginTop':0x1,'children':a17_0x3ffe70(Text,{'bold':!![],'children':['\x20\x20',_0xbf32de('appMenu.updateCdn.preview.resourceLinks')]})}),_0x5f1d8b[_0x22347e(0x189)](_0xc9a9f9=>a17_0x28fe37(Box,{'children':a17_0x3ffe70(Text,{'children':['\x20\x20',_0xc9a9f9]})},_0xc9a9f9))]});}
@@ -1 +1 @@
1
- (function(_0x25fbef,_0xd8234f){const _0x4b3ea5=a21_0x2646,_0x432604=_0x25fbef();while(!![]){try{const _0x333bc5=-parseInt(_0x4b3ea5(0xed))/0x1*(parseInt(_0x4b3ea5(0xe6))/0x2)+-parseInt(_0x4b3ea5(0xec))/0x3+parseInt(_0x4b3ea5(0xe8))/0x4*(parseInt(_0x4b3ea5(0xee))/0x5)+-parseInt(_0x4b3ea5(0xf1))/0x6*(-parseInt(_0x4b3ea5(0xe9))/0x7)+-parseInt(_0x4b3ea5(0xea))/0x8*(parseInt(_0x4b3ea5(0xf2))/0x9)+-parseInt(_0x4b3ea5(0xf6))/0xa+parseInt(_0x4b3ea5(0xf3))/0xb;if(_0x333bc5===_0xd8234f)break;else _0x432604['push'](_0x432604['shift']());}catch(_0x574e66){_0x432604['push'](_0x432604['shift']());}}}(a21_0x4f1f,0xe7e7c));import{jsx as a21_0x12aaf9,jsxs as a21_0x1fc205}from'react/jsx-runtime';import{Text,Box}from'ink';function a21_0x4f1f(){const _0x175e86=['green','48qMqcDW','72iIyEXS','11483978mEtYcS','appMenu.updateCdn.input.jsUrl.label','cyan','10503550CFstsL','2ZmASSz','appMenu.updateCdn.input.title','320iWvygr','705278gsXaAq','496680SlGrnB','column','2407008HslDEq','287015ivwTaf','108515yFUbUC','appMenu.updateCdn.input.cssUrl.label'];a21_0x4f1f=function(){return _0x175e86;};return a21_0x4f1f();}import{useI18n}from'../i18n/hooks.js';function a21_0x2646(_0x24ffb8,_0x5cfc97){_0x24ffb8=_0x24ffb8-0xe6;const _0x4f1ffc=a21_0x4f1f();let _0x2646c2=_0x4f1ffc[_0x24ffb8];return _0x2646c2;}export function InputCdnAsset(_0x4c1950){const _0x43fca1=a21_0x2646,{t:_0x40f938}=useI18n(),{jsCdnUrl:_0xdc2fd2,cssCdnUrl:_0xc7a27}=_0x4c1950;return a21_0x1fc205(Box,{'flexDirection':_0x43fca1(0xeb),'marginTop':0x1,'children':[a21_0x12aaf9(Text,{'color':_0x43fca1(0xf5),'children':_0x40f938(_0x43fca1(0xe7))}),a21_0x1fc205(Box,{'children':[a21_0x1fc205(Text,{'children':['\x20\x20',_0x40f938(_0x43fca1(0xf4))]}),a21_0x12aaf9(Text,{'color':'green','children':_0xdc2fd2})]}),a21_0x1fc205(Box,{'children':[a21_0x1fc205(Text,{'children':['\x20\x20',_0x40f938(_0x43fca1(0xef))]}),a21_0x12aaf9(Text,{'color':_0x43fca1(0xf0),'children':_0xc7a27})]})]});}
1
+ (function(_0x4c6c7b,_0x26f555){const _0x23669c=a18_0x1d6d,_0x4daa11=_0x4c6c7b();while(!![]){try{const _0x7c4730=-parseInt(_0x23669c(0x7b))/0x1*(-parseInt(_0x23669c(0x79))/0x2)+-parseInt(_0x23669c(0x78))/0x3+-parseInt(_0x23669c(0x75))/0x4*(parseInt(_0x23669c(0x71))/0x5)+parseInt(_0x23669c(0x73))/0x6+-parseInt(_0x23669c(0x76))/0x7*(parseInt(_0x23669c(0x72))/0x8)+parseInt(_0x23669c(0x6f))/0x9+parseInt(_0x23669c(0x6e))/0xa;if(_0x7c4730===_0x26f555)break;else _0x4daa11['push'](_0x4daa11['shift']());}catch(_0x49db32){_0x4daa11['push'](_0x4daa11['shift']());}}}(a18_0x33a1,0xd7d2b));import{jsx as a18_0x591a56,jsxs as a18_0x1e776a}from'react/jsx-runtime';function a18_0x1d6d(_0xf54695,_0x48aad9){_0xf54695=_0xf54695-0x6d;const _0x33a162=a18_0x33a1();let _0x1d6d89=_0x33a162[_0xf54695];return _0x1d6d89;}import{Text,Box}from'ink';import{useI18n}from'../i18n/hooks.js';function a18_0x33a1(){const _0x5a562a=['52htuJsI','1654282Toygqt','green','3820119ycdKIb','21782bzPvcg','appMenu.updateCdn.input.cssUrl.label','93YAAbfQ','appMenu.updateCdn.input.title','appMenu.updateCdn.input.jsUrl.label','10413160WqbjCa','13430556jgrHmE','column','405905ACXrff','56SlVViY','7923336bCSJCk','cyan'];a18_0x33a1=function(){return _0x5a562a;};return a18_0x33a1();}export function InputCdnAsset(_0x22d0f5){const _0x431206=a18_0x1d6d,{t:_0x4f61fa}=useI18n(),{jsCdnUrl:_0x27426f,cssCdnUrl:_0xfd83c3}=_0x22d0f5;return a18_0x1e776a(Box,{'flexDirection':_0x431206(0x70),'marginTop':0x1,'children':[a18_0x591a56(Text,{'color':_0x431206(0x74),'children':_0x4f61fa(_0x431206(0x7c))}),a18_0x1e776a(Box,{'children':[a18_0x1e776a(Text,{'children':['\x20\x20',_0x4f61fa(_0x431206(0x6d))]}),a18_0x591a56(Text,{'color':_0x431206(0x77),'children':_0x27426f})]}),a18_0x1e776a(Box,{'children':[a18_0x1e776a(Text,{'children':['\x20\x20',_0x4f61fa(_0x431206(0x7a))]}),a18_0x591a56(Text,{'color':_0x431206(0x77),'children':_0xfd83c3})]})]});}
@@ -1 +1 @@
1
- (function(_0x15aed0,_0x4bf94f){const _0x5e132c=a22_0x4da4,_0x55d08b=_0x15aed0();while(!![]){try{const _0xf09053=-parseInt(_0x5e132c(0x17c))/0x1+-parseInt(_0x5e132c(0x161))/0x2+-parseInt(_0x5e132c(0x164))/0x3*(parseInt(_0x5e132c(0x17f))/0x4)+parseInt(_0x5e132c(0x169))/0x5*(-parseInt(_0x5e132c(0x172))/0x6)+parseInt(_0x5e132c(0x186))/0x7+parseInt(_0x5e132c(0x182))/0x8+parseInt(_0x5e132c(0x18c))/0x9*(parseInt(_0x5e132c(0x194))/0xa);if(_0xf09053===_0x4bf94f)break;else _0x55d08b['push'](_0x55d08b['shift']());}catch(_0x4adb8a){_0x55d08b['push'](_0x55d08b['shift']());}}}(a22_0x5395,0x696c1));import{jsx as a22_0x2ad07b,jsxs as a22_0x33015f,Fragment as a22_0x13cdef}from'react/jsx-runtime';function a22_0x4da4(_0x51a7c7,_0x1e929f){_0x51a7c7=_0x51a7c7-0x160;const _0x5395ab=a22_0x5395();let _0x4da495=_0x5395ab[_0x51a7c7];return _0x4da495;}import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a22_0x5395(){const _0x566817=['resolve','label','58782hxaXVy','updated','appMenu.updateCdn.input.cssUrl.placeholder','path','delete','upArrow','return','resources','yellow','length','176589WivavB','value','appMenu.updateCdn.input.jsUrl.label','4ELDLjJ','appMenu.updateCdn.error.cssUrlUnreachable','all','2083720PEtLeb','slice','map','appMenu.updateCdn.error.jsUrlUnreachable','3134530SutPok','appMenu.updateCdn.error.noCdnLinks','appMenu.updateCdn.error.invalidCssUrl','appMenu.updateCdn.input.jsUrl.placeholder','cyan','dots','18MJPAcc','backspace','creating','need-confirm','\x20←\x20','flat','trim','appMenu.updateCdn.loading.syncing','2229540OAGuUl','appMenu.updateCdn.input.cssUrl.label','cancel','appMenu.updateCdn.error.authHint.prefix','input-js','column','72702EXdPpd','appMenu.updateCdn.error.authHint.suffix','red','1204941JdwdQM','appMenu.updateCdn.error.invalidJsUrl','green','appMenu.updateCdn.action.cancel','leftArrow','55vRAXqD','appMenu.updateCdn.action.continue','lovrabet\x20auth','gray','input-css','appMenu.updateCdn.title','from'];a22_0x5395=function(){return _0x566817;};return a22_0x5395();}import a22_0x57cc38 from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{useI18n}from'../i18n/hooks.js';import.meta.main&&render(a22_0x2ad07b(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x4ce010=a22_0x4da4,{exit:_0xdfb13}=useApp(),{t:_0x3d8e42}=useI18n(),{loading:_0x1ffd6d,menuList:_0x33076a,error:_0x23ac61}=useGetOnlineMenuList(),[_0x2905d4,_0x848265]=useState('ok'),[_0x4b7fe6,_0x1440c9]=useState(_0x4ce010(0x198)),[_0x4e47af,_0x18777e]=useState(''),[_0x1964e3,_0x59123f]=useState(''),[_0x2aa51f,_0x484be2]=useState(''),[_0x186af0,_0x26c8ae]=useState(''),_0x41b19b=Array[_0x4ce010(0x16f)](new Set(_0x33076a['map'](_0x2aa558=>_0x2aa558['resources'])[_0x4ce010(0x191)]()));useEffect(()=>{const _0x1aa191=_0x4ce010;_0x4b7fe6===_0x1aa191(0x173)&&setTimeout(_0xdfb13,0x32);},[_0x4b7fe6]),useInput(async(_0x2dfb14,_0xf0300)=>{const _0x3cd72d=_0x4ce010;if(_0x4b7fe6===_0x3cd72d(0x198)){if(_0xf0300['return']){const _0x1f2b9a=_0x2aa51f[_0x3cd72d(0x192)]();if(_0x1f2b9a==='')return;if(!isValidJsHttpsUrl(_0x1f2b9a)){_0x26c8ae(_0x3d8e42(_0x3cd72d(0x165)));return;}if(!await isUrlReachable(_0x1f2b9a)){_0x26c8ae(_0x3d8e42(_0x3cd72d(0x185)));return;}_0x18777e(_0x1f2b9a),_0x484be2(''),_0x26c8ae(''),_0x1440c9(_0x3cd72d(0x16d));return;}if(_0xf0300[_0x3cd72d(0x18d)]||_0xf0300[_0x3cd72d(0x176)]){_0x484be2(_0x414711=>_0x414711[_0x3cd72d(0x183)](0x0,-0x1)),_0x26c8ae('');return;}_0x484be2(_0x5c025f=>_0x5c025f+_0x2dfb14);return;}if(_0x4b7fe6===_0x3cd72d(0x16d)){if(_0xf0300[_0x3cd72d(0x178)]){const _0x2f12f6=_0x2aa51f[_0x3cd72d(0x192)]();if(_0x2f12f6==='')return;if(!isValidCssHttpsUrl(_0x2f12f6)){_0x26c8ae(_0x3d8e42(_0x3cd72d(0x188)));return;}if(!await isUrlReachable(_0x2f12f6)){_0x26c8ae(_0x3d8e42(_0x3cd72d(0x180)));return;}_0x59123f(_0x2f12f6),_0x484be2(''),_0x26c8ae(''),_0x1440c9(_0x3cd72d(0x18f));return;}if(_0xf0300[_0x3cd72d(0x18d)]||_0xf0300[_0x3cd72d(0x176)]){_0x484be2(_0x2015f9=>_0x2015f9[_0x3cd72d(0x183)](0x0,-0x1)),_0x26c8ae('');return;}_0x484be2(_0x29e5eb=>_0x29e5eb+_0x2dfb14);return;}if(_0x4b7fe6===_0x3cd72d(0x18f)){(_0xf0300[_0x3cd72d(0x177)]||_0xf0300['downArrow']||_0xf0300[_0x3cd72d(0x168)]||_0xf0300['rightArrow'])&&_0x848265(_0xb40ca5=>_0xb40ca5==='ok'?_0x3cd72d(0x196):'ok');if(_0xf0300[_0x3cd72d(0x178)]){_0x1440c9('creating');if(_0x2905d4==='ok')await Promise[_0x3cd72d(0x181)](_0x33076a['map'](_0x68d171=>{const _0x37af6a=_0x3cd72d,_0x307176={'id':_0x68d171['id'],'label':_0x68d171[_0x37af6a(0x171)],'path':_0x68d171[_0x37af6a(0x175)],'resources':[_0x4e47af,_0x1964e3]};if(_0x68d171[_0x37af6a(0x179)][_0x37af6a(0x17b)]===0x0)return Promise[_0x37af6a(0x170)]();return updateMenuCdnUrl(_0x307176);})),await new Promise(_0x4def3b=>setTimeout(_0x4def3b,0x3e8)),_0x1440c9('updated');else _0x2905d4===_0x3cd72d(0x196)&&_0xdfb13();}}});if(_0x1ffd6d)return a22_0x33015f(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2ad07b(Text,{}),a22_0x2ad07b(a22_0x57cc38,{'type':_0x4ce010(0x18b)}),a22_0x2ad07b(Text,{'children':_0x3d8e42('appMenu.updateCdn.loading.fetching')})]});if(_0x23ac61)return a22_0x33015f(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x33015f(Text,{'color':_0x4ce010(0x163),'children':['✗\x20',_0x23ac61]}),a22_0x33015f(Box,{'marginTop':0x1,'children':[a22_0x2ad07b(Text,{'color':_0x4ce010(0x16c),'children':_0x3d8e42(_0x4ce010(0x197))}),a22_0x2ad07b(Text,{'color':_0x4ce010(0x18a),'children':_0x4ce010(0x16b)}),a22_0x2ad07b(Text,{'color':_0x4ce010(0x16c),'children':_0x3d8e42(_0x4ce010(0x162))})]})]});if(_0x41b19b[_0x4ce010(0x17b)]===0x0)return a22_0x2ad07b(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a22_0x2ad07b(Text,{'color':_0x4ce010(0x17a),'children':_0x3d8e42(_0x4ce010(0x187))})});if(_0x4b7fe6===_0x4ce010(0x18f))return a22_0x33015f(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2ad07b(CurrentMenuCdnContent,{'menuList':_0x33076a}),a22_0x2ad07b(InputCdnAsset,{'jsCdnUrl':_0x4e47af,'cssCdnUrl':_0x1964e3}),a22_0x2ad07b(Box,{'marginTop':0x1,'flexDirection':_0x4ce010(0x160),'children':[{'label':_0x3d8e42(_0x4ce010(0x16a)),'value':'ok'},{'label':_0x3d8e42(_0x4ce010(0x167)),'value':_0x4ce010(0x196)}][_0x4ce010(0x184)](_0x41aea8=>a22_0x33015f(Text,{'color':_0x2905d4===_0x41aea8[_0x4ce010(0x17d)]?_0x4ce010(0x17a):undefined,'children':[_0x2905d4===_0x41aea8['value']?'>\x20':'\x20\x20',_0x41aea8['label']]},_0x41aea8[_0x4ce010(0x17d)]))})]});if(_0x4b7fe6===_0x4ce010(0x18e))return a22_0x33015f(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2ad07b(CurrentMenuCdnContent,{'menuList':_0x33076a}),a22_0x2ad07b(InputCdnAsset,{'jsCdnUrl':_0x4e47af,'cssCdnUrl':_0x1964e3}),a22_0x33015f(Box,{'marginTop':0x1,'children':[a22_0x2ad07b(a22_0x57cc38,{'type':_0x4ce010(0x18b)}),a22_0x2ad07b(Text,{'children':_0x3d8e42(_0x4ce010(0x193))})]})]});if(_0x4b7fe6===_0x4ce010(0x173))return a22_0x33015f(Box,{'flexDirection':_0x4ce010(0x160),'marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2ad07b(CurrentMenuCdnContent,{'menuList':_0x33076a}),a22_0x2ad07b(InputCdnAsset,{'jsCdnUrl':_0x4e47af,'cssCdnUrl':_0x1964e3}),a22_0x2ad07b(Box,{'marginTop':0x1,'children':a22_0x2ad07b(Text,{'color':_0x4ce010(0x166),'children':_0x3d8e42('appMenu.updateCdn.success.updated')})})]});return a22_0x33015f(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a22_0x2ad07b(CurrentMenuCdnContent,{'menuList':_0x33076a}),a22_0x33015f(Box,{'marginTop':0x1,'flexDirection':_0x4ce010(0x160),'children':[a22_0x2ad07b(Text,{'color':_0x4ce010(0x18a),'children':_0x3d8e42(_0x4ce010(0x16e))}),_0x4e47af?a22_0x33015f(Box,{'children':[a22_0x33015f(Text,{'color':'gray','children':['\x20\x20',_0x3d8e42('appMenu.updateCdn.input.jsUrl.label')]}),a22_0x2ad07b(Text,{'color':_0x4ce010(0x166),'children':_0x4e47af})]}):_0x4b7fe6===_0x4ce010(0x198)&&a22_0x33015f(a22_0x13cdef,{'children':[a22_0x33015f(Box,{'children':[a22_0x33015f(Text,{'children':['\x20\x20',_0x3d8e42(_0x4ce010(0x17e))]}),a22_0x2ad07b(Text,{'color':_0x4ce010(0x166),'children':_0x2aa51f}),_0x186af0&&a22_0x33015f(Text,{'color':'red','children':[_0x4ce010(0x190),_0x186af0]})]}),!_0x186af0&&a22_0x2ad07b(Box,{'children':a22_0x33015f(Text,{'color':_0x4ce010(0x16c),'children':['\x20\x20',_0x3d8e42(_0x4ce010(0x189))]})})]}),_0x1964e3?a22_0x33015f(Box,{'children':[a22_0x33015f(Text,{'children':['\x20\x20',_0x3d8e42(_0x4ce010(0x195))]}),a22_0x2ad07b(Text,{'color':_0x4ce010(0x166),'children':_0x1964e3})]}):_0x4b7fe6===_0x4ce010(0x16d)&&a22_0x33015f(a22_0x13cdef,{'children':[a22_0x33015f(Box,{'children':[a22_0x33015f(Text,{'children':['\x20\x20',_0x3d8e42(_0x4ce010(0x195))]}),a22_0x2ad07b(Text,{'color':_0x4ce010(0x166),'children':_0x2aa51f}),_0x186af0&&a22_0x33015f(Text,{'color':'red','children':[_0x4ce010(0x190),_0x186af0]})]}),!_0x186af0&&a22_0x2ad07b(Box,{'children':a22_0x33015f(Text,{'color':'gray','children':['\x20\x20',_0x3d8e42(_0x4ce010(0x174))]})})]})]})]});}
1
+ (function(_0x3d0781,_0x3c94fc){const _0x180795=a19_0x394e,_0x508c7d=_0x3d0781();while(!![]){try{const _0x17fa22=parseInt(_0x180795(0xf4))/0x1+parseInt(_0x180795(0x113))/0x2+parseInt(_0x180795(0x111))/0x3*(parseInt(_0x180795(0xf2))/0x4)+parseInt(_0x180795(0xf5))/0x5*(parseInt(_0x180795(0x102))/0x6)+parseInt(_0x180795(0x105))/0x7+-parseInt(_0x180795(0xee))/0x8*(parseInt(_0x180795(0xfe))/0x9)+parseInt(_0x180795(0x104))/0xa*(-parseInt(_0x180795(0xf9))/0xb);if(_0x17fa22===_0x3c94fc)break;else _0x508c7d['push'](_0x508c7d['shift']());}catch(_0x13ac34){_0x508c7d['push'](_0x508c7d['shift']());}}}(a19_0x481e,0xb30d6));import{jsx as a19_0x127a40,jsxs as a19_0x3123a6,Fragment as a19_0x3f2dce}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';import a19_0x5e05bb from'ink-spinner';import{useGetOnlineMenuList}from'../app-menu/use-get-online-menu-list.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'../app-menu/valid-url.js';import{CurrentMenuCdnContent}from'./current-content.js';import{InputCdnAsset}from'./input-cdn-asset.js';function a19_0x394e(_0x4a0613,_0x57abcd){_0x4a0613=_0x4a0613-0xeb;const _0x481e74=a19_0x481e();let _0x394eed=_0x481e74[_0x4a0613];return _0x394eed;}import{updateMenuCdnUrl}from'./update-menu-cdn-url.js';import{useI18n}from'../i18n/hooks.js';function a19_0x481e(){const _0x358f06=['cancel','2039247lHjofU','appMenu.updateCdn.error.authHint.suffix','all','need-confirm','11706PzmlHw','appMenu.updateCdn.action.cancel','7120zvJjgN','4628176ysuaKv','green','length','appMenu.updateCdn.error.cssUrlUnreachable','backspace','appMenu.updateCdn.input.jsUrl.label','appMenu.updateCdn.input.cssUrl.placeholder','yellow','appMenu.updateCdn.error.invalidCssUrl','trim','cyan','updated','398721yeoDAA','label','955668esYkzj','appMenu.updateCdn.input.jsUrl.placeholder','resolve','appMenu.updateCdn.error.invalidJsUrl','map','column','input-js','\x20←\x20','appMenu.updateCdn.title','leftArrow','delete','lovrabet\x20auth','flat','value','from','creating','appMenu.updateCdn.success.updated','return','red','path','input-css','24YrhOaM','gray','appMenu.updateCdn.loading.fetching','rightArrow','8OrWuUS','slice','1092734fVHWQu','655UwPbdC','appMenu.updateCdn.error.authHint.prefix','appMenu.updateCdn.action.continue','appMenu.updateCdn.input.cssUrl.label','20702uOgdog','appMenu.updateCdn.error.noCdnLinks','upArrow','dots'];a19_0x481e=function(){return _0x358f06;};return a19_0x481e();}import.meta.main&&render(a19_0x127a40(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x1bfae3=a19_0x394e,{exit:_0x5373c4}=useApp(),{t:_0x13c343}=useI18n(),{loading:_0x2e5ee5,menuList:_0x77227d,error:_0x10c4f8}=useGetOnlineMenuList(),[_0x33ebe9,_0x1f1e2f]=useState('ok'),[_0x2f1ef2,_0x2e0bed]=useState(_0x1bfae3(0x119)),[_0xcdb8ae,_0x2d06bc]=useState(''),[_0x1ad5cb,_0x5bfc66]=useState(''),[_0x52c21d,_0x244520]=useState(''),[_0xf67b47,_0x33b9de]=useState(''),_0x42b15b=Array[_0x1bfae3(0x121)](new Set(_0x77227d['map'](_0x4ae4f8=>_0x4ae4f8['resources'])[_0x1bfae3(0x11f)]()));useEffect(()=>{const _0xfad190=_0x1bfae3;_0x2f1ef2===_0xfad190(0x110)&&setTimeout(_0x5373c4,0x32);},[_0x2f1ef2]),useInput(async(_0x2326b9,_0x54ea37)=>{const _0x3184e7=_0x1bfae3;if(_0x2f1ef2===_0x3184e7(0x119)){if(_0x54ea37['return']){const _0x1ab506=_0x52c21d['trim']();if(_0x1ab506==='')return;if(!isValidJsHttpsUrl(_0x1ab506)){_0x33b9de(_0x13c343(_0x3184e7(0x116)));return;}if(!await isUrlReachable(_0x1ab506)){_0x33b9de(_0x13c343('appMenu.updateCdn.error.jsUrlUnreachable'));return;}_0x2d06bc(_0x1ab506),_0x244520(''),_0x33b9de(''),_0x2e0bed(_0x3184e7(0xed));return;}if(_0x54ea37[_0x3184e7(0x109)]||_0x54ea37['delete']){_0x244520(_0x31a7a8=>_0x31a7a8[_0x3184e7(0xf3)](0x0,-0x1)),_0x33b9de('');return;}_0x244520(_0x4a28b6=>_0x4a28b6+_0x2326b9);return;}if(_0x2f1ef2===_0x3184e7(0xed)){if(_0x54ea37[_0x3184e7(0x124)]){const _0x4f8cb6=_0x52c21d[_0x3184e7(0x10e)]();if(_0x4f8cb6==='')return;if(!isValidCssHttpsUrl(_0x4f8cb6)){_0x33b9de(_0x13c343(_0x3184e7(0x10d)));return;}if(!await isUrlReachable(_0x4f8cb6)){_0x33b9de(_0x13c343(_0x3184e7(0x108)));return;}_0x5bfc66(_0x4f8cb6),_0x244520(''),_0x33b9de(''),_0x2e0bed(_0x3184e7(0x101));return;}if(_0x54ea37[_0x3184e7(0x109)]||_0x54ea37[_0x3184e7(0x11d)]){_0x244520(_0x55709e=>_0x55709e[_0x3184e7(0xf3)](0x0,-0x1)),_0x33b9de('');return;}_0x244520(_0x3cb4d2=>_0x3cb4d2+_0x2326b9);return;}if(_0x2f1ef2==='need-confirm'){(_0x54ea37[_0x3184e7(0xfb)]||_0x54ea37['downArrow']||_0x54ea37[_0x3184e7(0x11c)]||_0x54ea37[_0x3184e7(0xf1)])&&_0x1f1e2f(_0x41ee5a=>_0x41ee5a==='ok'?_0x3184e7(0xfd):'ok');if(_0x54ea37[_0x3184e7(0x124)]){_0x2e0bed(_0x3184e7(0x122));if(_0x33ebe9==='ok')await Promise[_0x3184e7(0x100)](_0x77227d[_0x3184e7(0x117)](_0x1e1c72=>{const _0x43567a=_0x3184e7,_0x3512fb={'id':_0x1e1c72['id'],'label':_0x1e1c72['label'],'path':_0x1e1c72[_0x43567a(0xec)],'resources':[_0xcdb8ae,_0x1ad5cb]};if(_0x1e1c72['resources'][_0x43567a(0x107)]===0x0)return Promise[_0x43567a(0x115)]();return updateMenuCdnUrl(_0x3512fb);})),await new Promise(_0x4e8108=>setTimeout(_0x4e8108,0x3e8)),_0x2e0bed(_0x3184e7(0x110));else _0x33ebe9==='cancel'&&_0x5373c4();}}});if(_0x2e5ee5)return a19_0x3123a6(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x127a40(Text,{}),a19_0x127a40(a19_0x5e05bb,{'type':'dots'}),a19_0x127a40(Text,{'children':_0x13c343(_0x1bfae3(0xf0))})]});if(_0x10c4f8)return a19_0x3123a6(Box,{'flexDirection':_0x1bfae3(0x118),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x3123a6(Text,{'color':_0x1bfae3(0xeb),'children':['✗\x20',_0x10c4f8]}),a19_0x3123a6(Box,{'marginTop':0x1,'children':[a19_0x127a40(Text,{'color':_0x1bfae3(0xef),'children':_0x13c343(_0x1bfae3(0xf6))}),a19_0x127a40(Text,{'color':_0x1bfae3(0x10f),'children':_0x1bfae3(0x11e)}),a19_0x127a40(Text,{'color':_0x1bfae3(0xef),'children':_0x13c343(_0x1bfae3(0xff))})]})]});if(_0x42b15b[_0x1bfae3(0x107)]===0x0)return a19_0x127a40(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a19_0x127a40(Text,{'color':_0x1bfae3(0x10c),'children':_0x13c343(_0x1bfae3(0xfa))})});if(_0x2f1ef2===_0x1bfae3(0x101))return a19_0x3123a6(Box,{'flexDirection':_0x1bfae3(0x118),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x127a40(CurrentMenuCdnContent,{'menuList':_0x77227d}),a19_0x127a40(InputCdnAsset,{'jsCdnUrl':_0xcdb8ae,'cssCdnUrl':_0x1ad5cb}),a19_0x127a40(Box,{'marginTop':0x1,'flexDirection':_0x1bfae3(0x118),'children':[{'label':_0x13c343(_0x1bfae3(0xf7)),'value':'ok'},{'label':_0x13c343(_0x1bfae3(0x103)),'value':_0x1bfae3(0xfd)}][_0x1bfae3(0x117)](_0x232a4a=>a19_0x3123a6(Text,{'color':_0x33ebe9===_0x232a4a[_0x1bfae3(0x120)]?'yellow':undefined,'children':[_0x33ebe9===_0x232a4a[_0x1bfae3(0x120)]?'>\x20':'\x20\x20',_0x232a4a[_0x1bfae3(0x112)]]},_0x232a4a[_0x1bfae3(0x120)]))})]});if(_0x2f1ef2==='creating')return a19_0x3123a6(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a19_0x127a40(CurrentMenuCdnContent,{'menuList':_0x77227d}),a19_0x127a40(InputCdnAsset,{'jsCdnUrl':_0xcdb8ae,'cssCdnUrl':_0x1ad5cb}),a19_0x3123a6(Box,{'marginTop':0x1,'children':[a19_0x127a40(a19_0x5e05bb,{'type':_0x1bfae3(0xfc)}),a19_0x127a40(Text,{'children':_0x13c343('appMenu.updateCdn.loading.syncing')})]})]});if(_0x2f1ef2===_0x1bfae3(0x110))return a19_0x3123a6(Box,{'flexDirection':_0x1bfae3(0x118),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x127a40(CurrentMenuCdnContent,{'menuList':_0x77227d}),a19_0x127a40(InputCdnAsset,{'jsCdnUrl':_0xcdb8ae,'cssCdnUrl':_0x1ad5cb}),a19_0x127a40(Box,{'marginTop':0x1,'children':a19_0x127a40(Text,{'color':_0x1bfae3(0x106),'children':_0x13c343(_0x1bfae3(0x123))})})]});return a19_0x3123a6(Box,{'flexDirection':_0x1bfae3(0x118),'marginTop':0x1,'marginBottom':0x1,'children':[a19_0x127a40(CurrentMenuCdnContent,{'menuList':_0x77227d}),a19_0x3123a6(Box,{'marginTop':0x1,'flexDirection':_0x1bfae3(0x118),'children':[a19_0x127a40(Text,{'color':_0x1bfae3(0x10f),'children':_0x13c343(_0x1bfae3(0x11b))}),_0xcdb8ae?a19_0x3123a6(Box,{'children':[a19_0x3123a6(Text,{'color':_0x1bfae3(0xef),'children':['\x20\x20',_0x13c343(_0x1bfae3(0x10a))]}),a19_0x127a40(Text,{'color':'green','children':_0xcdb8ae})]}):_0x2f1ef2==='input-js'&&a19_0x3123a6(a19_0x3f2dce,{'children':[a19_0x3123a6(Box,{'children':[a19_0x3123a6(Text,{'children':['\x20\x20',_0x13c343(_0x1bfae3(0x10a))]}),a19_0x127a40(Text,{'color':_0x1bfae3(0x106),'children':_0x52c21d}),_0xf67b47&&a19_0x3123a6(Text,{'color':'red','children':[_0x1bfae3(0x11a),_0xf67b47]})]}),!_0xf67b47&&a19_0x127a40(Box,{'children':a19_0x3123a6(Text,{'color':_0x1bfae3(0xef),'children':['\x20\x20',_0x13c343(_0x1bfae3(0x114))]})})]}),_0x1ad5cb?a19_0x3123a6(Box,{'children':[a19_0x3123a6(Text,{'children':['\x20\x20',_0x13c343(_0x1bfae3(0xf8))]}),a19_0x127a40(Text,{'color':'green','children':_0x1ad5cb})]}):_0x2f1ef2===_0x1bfae3(0xed)&&a19_0x3123a6(a19_0x3f2dce,{'children':[a19_0x3123a6(Box,{'children':[a19_0x3123a6(Text,{'children':['\x20\x20',_0x13c343(_0x1bfae3(0xf8))]}),a19_0x127a40(Text,{'color':_0x1bfae3(0x106),'children':_0x52c21d}),_0xf67b47&&a19_0x3123a6(Text,{'color':_0x1bfae3(0xeb),'children':[_0x1bfae3(0x11a),_0xf67b47]})]}),!_0xf67b47&&a19_0x127a40(Box,{'children':a19_0x3123a6(Text,{'color':_0x1bfae3(0xef),'children':['\x20\x20',_0x13c343(_0x1bfae3(0x10b))]})})]})]})]});}
@@ -1 +1 @@
1
- (function(_0x27a0a5,_0x30273c){const _0x59ca60=a24_0x35f1,_0x327596=_0x27a0a5();while(!![]){try{const _0x3ba6da=-parseInt(_0x59ca60(0x1a5))/0x1+parseInt(_0x59ca60(0x1a0))/0x2+-parseInt(_0x59ca60(0x1a6))/0x3+-parseInt(_0x59ca60(0x199))/0x4+-parseInt(_0x59ca60(0x1b5))/0x5*(parseInt(_0x59ca60(0x1ae))/0x6)+parseInt(_0x59ca60(0x1ac))/0x7*(-parseInt(_0x59ca60(0x1ab))/0x8)+-parseInt(_0x59ca60(0x1a7))/0x9*(-parseInt(_0x59ca60(0x1a4))/0xa);if(_0x3ba6da===_0x30273c)break;else _0x327596['push'](_0x327596['shift']());}catch(_0x583d40){_0x327596['push'](_0x327596['shift']());}}}(a24_0x11b4,0x1c65f));function a24_0x11b4(){const _0x3467e5=['54490Brflpe','status','appMenu.error.appCodeHint.option2','stringify','resources','success','530376VSZbiI','common.error','error','appMenu.error.appCodeHint.option1','appcode','/smartapi/menu/update','import','278084kGzOzV','appMenu.error.appCodeHint.title','appMenu.updateCdn.success.synced','appMenu.updateCdn.updating','20bpzQIn','32120fyjBFV','516396xqrmsc','1828206ixdIrX','info','json','application/json','7928OPgVfT','189AJPtCp','POST','36WOkwwM','appMenu.error.authExpired','appMenu.updateCdn.error.updateFailed','errorMsg','label','log','data'];a24_0x11b4=function(){return _0x3467e5;};return a24_0x11b4();}import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a24_0x35f1(_0x4f9daf,_0x40568b){_0x4f9daf=_0x4f9daf-0x195;const _0x11b42b=a24_0x11b4();let _0x35f1d3=_0x11b42b[_0x4f9daf];return _0x35f1d3;}import{logger}from'../utils/logger.js';import a24_0x4b817d from'../i18n/index.js';const config=readConfig(),logLabel='update-menu-cdn-url',t=a24_0x4b817d['t']['bind'](a24_0x4b817d);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':'SdkDemo1','path':'sdk-demo','resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0x4aff1a){const _0x335f5c=a24_0x35f1,_0x2e0b4a=config?.[_0x335f5c(0x19d)];if(!_0x2e0b4a){const _0x7128c=t('appMenu.error.missingAppCode');logger['error'](logLabel,_0x7128c),console[_0x335f5c(0x19b)]('×\x20'+_0x7128c),console[_0x335f5c(0x1b3)](t(_0x335f5c(0x1a1))),console[_0x335f5c(0x1b3)](t(_0x335f5c(0x19c))),console[_0x335f5c(0x1b3)](t(_0x335f5c(0x195)));return;}logger[_0x335f5c(0x1a8)](logLabel,t(_0x335f5c(0x1a3),{'label':_0x4aff1a['label'],'path':_0x4aff1a['path']}));const _0x3f3e89={'id':_0x4aff1a['id'],'appCode':_0x2e0b4a,'extend':{'loadScriptMode':_0x335f5c(0x19f),'resources':_0x4aff1a[_0x335f5c(0x197)]?JSON['stringify'](_0x4aff1a['resources']):undefined}},_0x2f6401=await fetch(getApiDomain()+_0x335f5c(0x19e),{'method':_0x335f5c(0x1ad),'body':JSON[_0x335f5c(0x196)](_0x3f3e89),'headers':{'Content-Type':_0x335f5c(0x1aa),'Cookie':getCookie()}});if(!_0x2f6401['ok']){if(_0x2f6401[_0x335f5c(0x1b6)]===0x191){const _0x3566e5=t(_0x335f5c(0x1af));logger[_0x335f5c(0x19b)](logLabel,_0x3566e5,{'status':_0x2f6401[_0x335f5c(0x1b6)],'menu':_0x4aff1a[_0x335f5c(0x1b2)]});throw new Error(_0x3566e5);}const _0x297fb2=t('appMenu.updateCdn.error.updateFailed',{'error':_0x2f6401[_0x335f5c(0x1b6)]});logger[_0x335f5c(0x19b)](logLabel,_0x297fb2,{'menu':_0x4aff1a[_0x335f5c(0x1b2)]});throw new Error(_0x297fb2);}const _0x34cf05=await _0x2f6401[_0x335f5c(0x1a9)]();if(!_0x34cf05[_0x335f5c(0x198)]){const _0x2acc30=t(_0x335f5c(0x1b0),{'error':_0x34cf05[_0x335f5c(0x1b1)]||t(_0x335f5c(0x19a))});logger[_0x335f5c(0x19b)](logLabel,_0x2acc30,{'errorCode':_0x34cf05['errorCode'],'errorMsg':_0x34cf05['errorMsg'],'menu':_0x4aff1a[_0x335f5c(0x1b2)]});throw new Error(_0x2acc30);}logger[_0x335f5c(0x1a8)](logLabel,t(_0x335f5c(0x1a2),{'label':_0x4aff1a[_0x335f5c(0x1b2)]}),_0x34cf05[_0x335f5c(0x1b4)]);}
1
+ function a21_0x441b(_0x40c6d6,_0x15117e){_0x40c6d6=_0x40c6d6-0x10c;const _0x96680e=a21_0x9668();let _0x441b4d=_0x96680e[_0x40c6d6];return _0x441b4d;}const a21_0x12c7b2=a21_0x441b;(function(_0x332733,_0x3468e2){const _0x1fd17c=a21_0x441b,_0x99bea6=_0x332733();while(!![]){try{const _0x1da435=-parseInt(_0x1fd17c(0x117))/0x1*(-parseInt(_0x1fd17c(0x118))/0x2)+-parseInt(_0x1fd17c(0x10e))/0x3+-parseInt(_0x1fd17c(0x12f))/0x4*(parseInt(_0x1fd17c(0x128))/0x5)+parseInt(_0x1fd17c(0x10c))/0x6+-parseInt(_0x1fd17c(0x130))/0x7+-parseInt(_0x1fd17c(0x129))/0x8+-parseInt(_0x1fd17c(0x112))/0x9*(parseInt(_0x1fd17c(0x125))/0xa);if(_0x1da435===_0x3468e2)break;else _0x99bea6['push'](_0x99bea6['shift']());}catch(_0x554e83){_0x99bea6['push'](_0x99bea6['shift']());}}}(a21_0x9668,0x4d12b));import{getCookie}from'../auth/get-cookie.js';function a21_0x9668(){const _0x4e1721=['errorMsg','1UGkrNh','1122382seaGkj','SdkDemo1','/smartapi/menu/update','appMenu.updateCdn.error.updateFailed','sdk-demo','success','appMenu.error.appCodeHint.option1','appMenu.error.appCodeHint.option2','appcode','data','stringify','errorCode','appMenu.error.appCodeHint.title','10CfDOSo','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js','common.error','5YGORxg','131888xwBvqh','bind','import','update-menu-cdn-url','appMenu.updateCdn.updating','appMenu.error.missingAppCode','1534956MkKJwG','381451MWczEU','label','path','error','2898408delwzT','POST','319938VbcAbp','application/json','resources','appMenu.updateCdn.success.synced','1504836hGnQlE','status','log','json'];a21_0x9668=function(){return _0x4e1721;};return a21_0x9668();}import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import a21_0xff80a4 from'../i18n/index.js';const config=readConfig(),logLabel=a21_0x12c7b2(0x12c),t=a21_0xff80a4['t'][a21_0x12c7b2(0x12a)](a21_0xff80a4);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a21_0x12c7b2(0x119),'path':a21_0x12c7b2(0x11c),'resources':[a21_0x12c7b2(0x126),'https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css']});export async function updateMenuCdnUrl(_0x16ab85){const _0x21a96a=a21_0x12c7b2,_0x496a8d=config?.[_0x21a96a(0x120)];if(!_0x496a8d){const _0x1a40ae=t(_0x21a96a(0x12e));logger[_0x21a96a(0x133)](logLabel,_0x1a40ae),console[_0x21a96a(0x133)]('×\x20'+_0x1a40ae),console[_0x21a96a(0x114)](t(_0x21a96a(0x124))),console['log'](t(_0x21a96a(0x11e))),console['log'](t(_0x21a96a(0x11f)));return;}logger['info'](logLabel,t(_0x21a96a(0x12d),{'label':_0x16ab85['label'],'path':_0x16ab85[_0x21a96a(0x132)]}));const _0x4f87f0={'id':_0x16ab85['id'],'appCode':_0x496a8d,'extend':{'loadScriptMode':_0x21a96a(0x12b),'resources':_0x16ab85[_0x21a96a(0x110)]?JSON['stringify'](_0x16ab85[_0x21a96a(0x110)]):undefined}},_0x540f28=await fetch(getApiDomain()+_0x21a96a(0x11a),{'method':_0x21a96a(0x10d),'body':JSON[_0x21a96a(0x122)](_0x4f87f0),'headers':{'Content-Type':_0x21a96a(0x10f),'Cookie':getCookie()}});if(!_0x540f28['ok']){if(_0x540f28[_0x21a96a(0x113)]===0x191){const _0x13109a=t('appMenu.error.authExpired');logger['error'](logLabel,_0x13109a,{'status':_0x540f28[_0x21a96a(0x113)],'menu':_0x16ab85[_0x21a96a(0x131)]});throw new Error(_0x13109a);}const _0x50b9c2=t(_0x21a96a(0x11b),{'error':_0x540f28[_0x21a96a(0x113)]});logger[_0x21a96a(0x133)](logLabel,_0x50b9c2,{'menu':_0x16ab85['label']});throw new Error(_0x50b9c2);}const _0x4561cc=await _0x540f28[_0x21a96a(0x115)]();if(!_0x4561cc[_0x21a96a(0x11d)]){const _0xe168bd=t(_0x21a96a(0x11b),{'error':_0x4561cc[_0x21a96a(0x116)]||t(_0x21a96a(0x127))});logger[_0x21a96a(0x133)](logLabel,_0xe168bd,{'errorCode':_0x4561cc[_0x21a96a(0x123)],'errorMsg':_0x4561cc[_0x21a96a(0x116)],'menu':_0x16ab85[_0x21a96a(0x131)]});throw new Error(_0xe168bd);}logger['info'](logLabel,t(_0x21a96a(0x111),{'label':_0x16ab85[_0x21a96a(0x131)]}),_0x4561cc[_0x21a96a(0x121)]);}
@@ -1 +1 @@
1
- (function(_0x3a834b,_0x493934){const _0x502a2d=a25_0x88a4,_0x488a94=_0x3a834b();while(!![]){try{const _0x155129=parseInt(_0x502a2d(0x192))/0x1+parseInt(_0x502a2d(0x19a))/0x2*(-parseInt(_0x502a2d(0x18c))/0x3)+-parseInt(_0x502a2d(0x194))/0x4+-parseInt(_0x502a2d(0x19e))/0x5*(-parseInt(_0x502a2d(0x19b))/0x6)+parseInt(_0x502a2d(0x191))/0x7*(-parseInt(_0x502a2d(0x199))/0x8)+parseInt(_0x502a2d(0x196))/0x9+-parseInt(_0x502a2d(0x195))/0xa;if(_0x155129===_0x493934)break;else _0x488a94['push'](_0x488a94['shift']());}catch(_0x1fa408){_0x488a94['push'](_0x488a94['shift']());}}}(a25_0x4cb5,0xb6229));import{jsx as a25_0x46cf2a,jsxs as a25_0x749f3b}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a25_0x43a0c8 from'ink-spinner';import{useI18n}from'../i18n/hooks.js';function a25_0x4cb5(){const _0x556270=['finally','auth.login.successCli','green','1641fZcSsH','gray','column','auth.login.inProgress','return','329xODqAi','1446399HebQtF','auth.session.valid','1490096eFQHVc','2285460jqkQCI','8857197AVsesJ','auth.login.browserPrompt','dots','178224hXMqpz','426GKihjJ','60zihsPt','auth.login.pressQToExit','log','40070RZUYNf'];a25_0x4cb5=function(){return _0x556270;};return a25_0x4cb5();}function a25_0x88a4(_0x484a81,_0x180f88){_0x484a81=_0x484a81-0x18a;const _0x4cb523=a25_0x4cb5();let _0x88a4b2=_0x4cb523[_0x484a81];return _0x88a4b2;}export function AuthServer(){const _0x154e0d=a25_0x88a4,{exit:_0x4f024f}=useApp(),{t:_0x2e72d2}=useI18n(),[_0x43b216,_0x58f368]=useState(![]),[_0xae43a9,_0x2c3500]=useState(!![]),[_0x1e30e2,_0x16bba7]=useState(![]),[_0xa87c13,_0x35edb0]=useState(![]);useEffect(()=>{const _0x8ec938=a25_0x88a4;getIsSessionValid()['then'](_0x58f368)[_0x8ec938(0x19f)](()=>_0x2c3500(![]));},[]),useEffect(()=>{const _0x1fbfcf=a25_0x88a4;!_0xae43a9&&_0x43b216&&(console[_0x1fbfcf(0x19d)](_0x2e72d2(_0x1fbfcf(0x193))),_0x4f024f());},[_0xae43a9,_0x43b216,_0x4f024f]),useEffect(()=>{const _0x2e5812=a25_0x88a4;_0xa87c13&&(console[_0x2e5812(0x19d)]('*\x20'+_0x2e72d2(_0x2e5812(0x18a))),_0x4f024f());},[_0xa87c13,_0x4f024f]),useInput((_0x54d66c,_0x456cd)=>{const _0x58c6ca=a25_0x88a4;_0x456cd[_0x58c6ca(0x190)]&&(_0x16bba7(!![]),authServer({'silent':!![]})['then'](_0x5c843c=>{_0x35edb0(_0x5c843c);})),_0x54d66c==='q'&&_0x4f024f();});if(_0xae43a9)return null;if(_0x43b216||_0xa87c13)return null;return a25_0x46cf2a(Box,{'flexDirection':_0x154e0d(0x18e),'marginTop':0x1,'marginBottom':0x1,'children':_0x1e30e2?a25_0x749f3b(Box,{'children':[a25_0x46cf2a(Box,{'width':'1'}),a25_0x749f3b(Text,{'color':_0x154e0d(0x18b),'children':[a25_0x46cf2a(a25_0x43a0c8,{'type':_0x154e0d(0x198)}),'\x20\x20']}),a25_0x749f3b(Text,{'children':[_0x2e72d2(_0x154e0d(0x18f)),'\x20']}),a25_0x46cf2a(Text,{'color':_0x154e0d(0x18d),'children':_0x2e72d2(_0x154e0d(0x197))})]}):a25_0x749f3b(Box,{'children':[a25_0x46cf2a(Box,{'width':'1'}),a25_0x46cf2a(Text,{'children':_0x2e72d2('auth.login.pressEnter')}),a25_0x46cf2a(Text,{'color':_0x154e0d(0x18d),'children':_0x2e72d2(_0x154e0d(0x19c))})]})});}
1
+ function a22_0x4628(_0x20b660,_0x50055f){_0x20b660=_0x20b660-0x188;const _0xa827dc=a22_0xa827();let _0x46283c=_0xa827dc[_0x20b660];return _0x46283c;}(function(_0x3b0227,_0x4be96e){const _0x35957b=a22_0x4628,_0xb2ab4f=_0x3b0227();while(!![]){try{const _0x3824c6=parseInt(_0x35957b(0x18d))/0x1*(parseInt(_0x35957b(0x199))/0x2)+parseInt(_0x35957b(0x192))/0x3*(-parseInt(_0x35957b(0x188))/0x4)+-parseInt(_0x35957b(0x18b))/0x5+-parseInt(_0x35957b(0x198))/0x6*(parseInt(_0x35957b(0x194))/0x7)+parseInt(_0x35957b(0x195))/0x8+-parseInt(_0x35957b(0x18c))/0x9*(-parseInt(_0x35957b(0x197))/0xa)+parseInt(_0x35957b(0x193))/0xb;if(_0x3824c6===_0x4be96e)break;else _0xb2ab4f['push'](_0xb2ab4f['shift']());}catch(_0x33f1de){_0xb2ab4f['push'](_0xb2ab4f['shift']());}}}(a22_0xa827,0x96943));import{jsx as a22_0x232338,jsxs as a22_0x3f3537}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a22_0x177b20 from'ink-spinner';function a22_0xa827(){const _0x26505c=['189351szsQsq','31796DPTthD','return','gray','auth.login.successCli','column','3iWuSxn','1733358bJGPYF','14cFRvfN','7607576zjvuGj','then','400JBMxlq','3441228KlkAKG','76LIwRvj','auth.login.pressQToExit','log','1567056FLKEOY','auth.login.pressEnter','auth.login.browserPrompt','5013610ibRYrF'];a22_0xa827=function(){return _0x26505c;};return a22_0xa827();}import{useI18n}from'../i18n/hooks.js';export function AuthServer(){const _0x5245f9=a22_0x4628,{exit:_0x5179c5}=useApp(),{t:_0x24eb7d}=useI18n(),[_0xe56828,_0x352a50]=useState(![]),[_0x29fa93,_0x25bd31]=useState(!![]),[_0x3485b7,_0x81927d]=useState(![]),[_0x12d7ce,_0x3286f4]=useState(![]);useEffect(()=>{const _0x1c5ded=a22_0x4628;getIsSessionValid()[_0x1c5ded(0x196)](_0x352a50)['finally'](()=>_0x25bd31(![]));},[]),useEffect(()=>{const _0x1ce294=a22_0x4628;!_0x29fa93&&_0xe56828&&(console[_0x1ce294(0x19b)](_0x24eb7d('auth.session.valid')),_0x5179c5());},[_0x29fa93,_0xe56828,_0x5179c5]),useEffect(()=>{const _0x409ea0=a22_0x4628;_0x12d7ce&&(console[_0x409ea0(0x19b)]('*\x20'+_0x24eb7d(_0x409ea0(0x190))),_0x5179c5());},[_0x12d7ce,_0x5179c5]),useInput((_0x2afbbc,_0xee515b)=>{const _0xaad766=a22_0x4628;_0xee515b[_0xaad766(0x18e)]&&(_0x81927d(!![]),authServer({'silent':!![]})[_0xaad766(0x196)](_0x3db6fb=>{_0x3286f4(_0x3db6fb);})),_0x2afbbc==='q'&&_0x5179c5();});if(_0x29fa93)return null;if(_0xe56828||_0x12d7ce)return null;return a22_0x232338(Box,{'flexDirection':_0x5245f9(0x191),'marginTop':0x1,'marginBottom':0x1,'children':_0x3485b7?a22_0x3f3537(Box,{'children':[a22_0x232338(Box,{'width':'1'}),a22_0x3f3537(Text,{'color':'green','children':[a22_0x232338(a22_0x177b20,{'type':'dots'}),'\x20\x20']}),a22_0x3f3537(Text,{'children':[_0x24eb7d('auth.login.inProgress'),'\x20']}),a22_0x232338(Text,{'color':_0x5245f9(0x18f),'children':_0x24eb7d(_0x5245f9(0x18a))})]}):a22_0x3f3537(Box,{'children':[a22_0x232338(Box,{'width':'1'}),a22_0x232338(Text,{'children':_0x24eb7d(_0x5245f9(0x189))}),a22_0x232338(Text,{'color':_0x5245f9(0x18f),'children':_0x24eb7d(_0x5245f9(0x19a))})]})});}
@@ -1 +1 @@
1
- const a26_0x4d5ab8=a26_0x5793;(function(_0x31da8b,_0x4f8ce5){const _0x45fadd=a26_0x5793,_0x51131f=_0x31da8b();while(!![]){try{const _0x23569f=parseInt(_0x45fadd(0x109))/0x1+parseInt(_0x45fadd(0xfa))/0x2+-parseInt(_0x45fadd(0xef))/0x3+parseInt(_0x45fadd(0x10a))/0x4+parseInt(_0x45fadd(0xea))/0x5+parseInt(_0x45fadd(0xff))/0x6*(parseInt(_0x45fadd(0xe9))/0x7)+parseInt(_0x45fadd(0xf1))/0x8*(-parseInt(_0x45fadd(0xf8))/0x9);if(_0x23569f===_0x4f8ce5)break;else _0x51131f['push'](_0x51131f['shift']());}catch(_0x25ea3f){_0x51131f['push'](_0x51131f['shift']());}}}(a26_0x48f0,0xabb16));import{writeFileSync}from'node:fs';function a26_0x5793(_0x290087,_0x2ff64d){_0x290087=_0x290087-0xe6;const _0x48f0d9=a26_0x48f0();let _0x579300=_0x48f0d9[_0x290087];return _0x579300;}import a26_0x3abc44 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';import a26_0x5b156b from'../i18n/index.js';const t=a26_0x5b156b['t']['bind'](a26_0x5b156b);export async function authServer(_0x2047d3){const _0x2c58de=a26_0x5793,_0x146fcf=_0x2047d3?.['silent']||![];if(await getIsSessionValid())return!![];const _0x3089c0=await(await fetch(_0x2c58de(0xee)))[_0x2c58de(0xec)]();return new Promise(async(_0x3999e9,_0x5a99f5)=>{const _0x21b9db=_0x2c58de;let _0x5646ee=0x0;const _0xb04e06=a26_0x3abc44[_0x21b9db(0x10e)](_0x3089c0,async(_0x54d917,_0x2aefda)=>{const _0x495068=_0x21b9db,_0x236a3f=getUserDomain(),_0x3099b8=_0x54d917[_0x495068(0xe6)][_0x495068(0xe8)]||'',_0x12c3a9=await fetch(_0x236a3f+'/api/auth/get-session',{'headers':{'cookie':_0x3099b8}})[_0x495068(0xfc)](_0x17f54e=>_0x17f54e['json']()),_0x3171dd=_0x12c3a9&&_0x12c3a9['session']&&_0x12c3a9[_0x495068(0x111)];if(_0x3171dd){writeFileSync(cookieFile,_0x3099b8,'utf-8'),_0x3999e9(!![]);const _0x2c336d=t(_0x495068(0x108)),_0x1ae9ed=t(_0x495068(0xfd),{'seconds':_0x495068(0x102)}),_0x735428=t('auth.login.success.manualClose'),_0x4f869c=_0x495068(0xf7)+_0x2c336d+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x1ae9ed+_0x495068(0xf5)+_0x735428+_0x495068(0x10c);_0x2aefda[_0x495068(0xeb)](0xc8,{'Content-Type':_0x495068(0xf9)}),_0x2aefda[_0x495068(0xf2)](_0x4f869c),_0xb04e06[_0x495068(0x106)]();}else{const _0xf8b21a=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x5646ee);_0x2aefda[_0x495068(0xeb)](0x12e,{'location':_0x236a3f+_0x495068(0xf6)+_0xf8b21a}),_0x2aefda[_0x495068(0xf2)]();return;}});_0xb04e06[_0x21b9db(0x10b)](0x0,_0x21b9db(0x101),()=>{const _0x499bea=_0x21b9db,_0x187e51=_0xb04e06[_0x499bea(0xe7)]();_0x5646ee=typeof _0x187e51===_0x499bea(0xfb)&&_0x187e51?_0x187e51['port']:Number(_0x187e51);const _0x109af=_0x499bea(0x110)+_0x5646ee;!_0x146fcf&&(console[_0x499bea(0x103)](t(_0x499bea(0xed))),console[_0x499bea(0x103)](t(_0x499bea(0xf4)),_0x109af),console[_0x499bea(0x103)](t(_0x499bea(0xf3))),console[_0x499bea(0x103)](''),console[_0x499bea(0x103)](t('auth.server.manualOpenHint')),console[_0x499bea(0x103)]('')),openInBrowser(_0x109af)[_0x499bea(0xfc)](_0x5886f0=>{const _0x1174aa=_0x499bea;!_0x146fcf&&(_0x5886f0?console['log'](t(_0x1174aa(0x107))):(console[_0x1174aa(0x103)](t(_0x1174aa(0x10f))),console['log'](t(_0x1174aa(0x10d)),_0x109af)),console[_0x1174aa(0x103)](''));})[_0x499bea(0x100)](()=>{const _0x261d40=_0x499bea;!_0x146fcf&&(console[_0x261d40(0x103)](t(_0x261d40(0x10f))),console['log'](t(_0x261d40(0x10d)),_0x109af),console['log'](''));});}),_0xb04e06['on'](_0x21b9db(0xfe),_0x3dafa9=>{const _0x3a3a1c=_0x21b9db;!_0x146fcf&&console[_0x3a3a1c(0xfe)](_0x3a3a1c(0x105),_0x3dafa9),_0x5a99f5(_0x3dafa9);});});}function a26_0x48f0(){const _0x36e958=['auth.login.success.title','406743tWwEEk','3695792usEZqf','listen','</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','auth.server.manualCopyUrl','createServer','auth.server.browserOpenFailed','https://dev.lovrabet.com:','user','headers','address','cookie','14nHjkJQ','5143590BlTWCP','writeHead','json','auth.server.starting','https://g.yuntooai.com/cert/lovrabet-dev.json','135603yjuwpC','platform','15578856HOUZZH','end','auth.server.openingBrowser','auth.server.loginUrl','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','/sign-in?redirect=','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','9EyWJBO','text/html;\x20charset=utf-8','493798aDhArg','object','then','auth.login.success.message','error','268512DTQMbh','catch','127.0.0.1','<span\x20id=\x22t\x22>5</span>','log','start\x20\x22\x22\x20\x22','Auth\x20server\x20error:','close','auth.server.browserOpened'];a26_0x48f0=function(){return _0x36e958;};return a26_0x48f0();}function openInBrowser(_0x4356ee){return new Promise(_0x290a34=>{const _0x65877e=a26_0x5793,_0x4458ef=process[_0x65877e(0xf0)];let _0x1e4795;if(_0x4458ef==='win32')_0x1e4795=_0x65877e(0x104)+_0x4356ee+'\x22';else _0x4458ef==='darwin'?_0x1e4795='open\x20\x22'+_0x4356ee+'\x22':_0x1e4795='xdg-open\x20\x22'+_0x4356ee+'\x22';exec(_0x1e4795,_0x2320fe=>{_0x2320fe?_0x290a34(![]):_0x290a34(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a26_0x4d5ab8(0x103)]('isAuth',isAuth);}
1
+ const a23_0x44a2de=a23_0x1a86;(function(_0x273a70,_0x2bb352){const _0xa15777=a23_0x1a86,_0x1a9474=_0x273a70();while(!![]){try{const _0x7940d0=-parseInt(_0xa15777(0x144))/0x1*(parseInt(_0xa15777(0x124))/0x2)+-parseInt(_0xa15777(0x126))/0x3+-parseInt(_0xa15777(0x13e))/0x4*(-parseInt(_0xa15777(0x13b))/0x5)+-parseInt(_0xa15777(0x139))/0x6*(-parseInt(_0xa15777(0x111))/0x7)+-parseInt(_0xa15777(0x125))/0x8*(-parseInt(_0xa15777(0x134))/0x9)+parseInt(_0xa15777(0x131))/0xa*(-parseInt(_0xa15777(0x132))/0xb)+parseInt(_0xa15777(0x135))/0xc*(parseInt(_0xa15777(0x118))/0xd);if(_0x7940d0===_0x2bb352)break;else _0x1a9474['push'](_0x1a9474['shift']());}catch(_0x5a42a1){_0x1a9474['push'](_0x1a9474['shift']());}}}(a23_0x5aac,0xf134b));import{writeFileSync}from'node:fs';import a23_0x466305 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';import a23_0x53fa9f from'../i18n/index.js';const t=a23_0x53fa9f['t']['bind'](a23_0x53fa9f);function a23_0x1a86(_0x394160,_0x4a1e10){_0x394160=_0x394160-0x111;const _0x5aacb2=a23_0x5aac();let _0x1a863f=_0x5aacb2[_0x394160];return _0x1a863f;}export async function authServer(_0x3e403f){const _0x444982=a23_0x1a86,_0x67a06=_0x3e403f?.['silent']||![];if(await getIsSessionValid())return!![];const _0x5dbf7d=await(await fetch(_0x444982(0x11c)))['json']();return new Promise(async(_0x498d88,_0x601699)=>{const _0x583798=_0x444982;let _0x173e0c=0x0;const _0x1e2537=a23_0x466305[_0x583798(0x117)](_0x5dbf7d,async(_0x5f5bfa,_0x42e8b7)=>{const _0x4eb18a=_0x583798,_0x2ca66c=getUserDomain(),_0x4572e4=_0x5f5bfa['headers'][_0x4eb18a(0x137)]||'',_0x41e3de=await fetch(_0x2ca66c+_0x4eb18a(0x11a),{'headers':{'cookie':_0x4572e4}})[_0x4eb18a(0x13f)](_0x53d0dd=>_0x53d0dd[_0x4eb18a(0x13c)]()),_0x13f960=_0x41e3de&&_0x41e3de['session']&&_0x41e3de[_0x4eb18a(0x129)];if(_0x13f960){writeFileSync(cookieFile,_0x4572e4,_0x4eb18a(0x120)),_0x498d88(!![]);const _0x56e3dc=t(_0x4eb18a(0x145)),_0x37e2ec=t(_0x4eb18a(0x11e),{'seconds':_0x4eb18a(0x112)}),_0x3daecd=t(_0x4eb18a(0x116)),_0x32324c=_0x4eb18a(0x133)+_0x56e3dc+_0x4eb18a(0x113)+_0x37e2ec+_0x4eb18a(0x143)+_0x3daecd+_0x4eb18a(0x12f);_0x42e8b7[_0x4eb18a(0x146)](0xc8,{'Content-Type':_0x4eb18a(0x12a)}),_0x42e8b7[_0x4eb18a(0x114)](_0x32324c),_0x1e2537[_0x4eb18a(0x11f)]();}else{const _0x5d3ce9=''+encodeURIComponent('https://dev.lovrabet.com:'+_0x173e0c);_0x42e8b7['writeHead'](0x12e,{'location':_0x2ca66c+_0x4eb18a(0x13a)+_0x5d3ce9}),_0x42e8b7[_0x4eb18a(0x114)]();return;}});_0x1e2537[_0x583798(0x12b)](0x0,_0x583798(0x141),()=>{const _0x152951=_0x583798,_0x190b24=_0x1e2537['address']();_0x173e0c=typeof _0x190b24===_0x152951(0x122)&&_0x190b24?_0x190b24[_0x152951(0x121)]:Number(_0x190b24);const _0x28fa10=_0x152951(0x130)+_0x173e0c;!_0x67a06&&(console[_0x152951(0x11d)](t('auth.server.starting')),console['log'](t('auth.server.loginUrl'),_0x28fa10),console[_0x152951(0x11d)](t(_0x152951(0x140))),console[_0x152951(0x11d)](''),console[_0x152951(0x11d)](t(_0x152951(0x136))),console[_0x152951(0x11d)]('')),openInBrowser(_0x28fa10)[_0x152951(0x13f)](_0x3f2590=>{const _0x5631ab=_0x152951;!_0x67a06&&(_0x3f2590?console[_0x5631ab(0x11d)](t(_0x5631ab(0x12e))):(console[_0x5631ab(0x11d)](t(_0x5631ab(0x11b))),console[_0x5631ab(0x11d)](t('auth.server.manualCopyUrl'),_0x28fa10)),console[_0x5631ab(0x11d)](''));})[_0x152951(0x12d)](()=>{const _0x538818=_0x152951;!_0x67a06&&(console['log'](t(_0x538818(0x11b))),console[_0x538818(0x11d)](t(_0x538818(0x123)),_0x28fa10),console[_0x538818(0x11d)](''));});}),_0x1e2537['on'](_0x583798(0x119),_0x1eb12f=>{const _0x467cd1=_0x583798;!_0x67a06&&console[_0x467cd1(0x119)](_0x467cd1(0x128),_0x1eb12f),_0x601699(_0x1eb12f);});});}function openInBrowser(_0x585389){return new Promise(_0x1f41e5=>{const _0x3b6e81=a23_0x1a86,_0x2ed59b=process['platform'];let _0x414e57;if(_0x2ed59b===_0x3b6e81(0x12c))_0x414e57=_0x3b6e81(0x142)+_0x585389+'\x22';else _0x2ed59b===_0x3b6e81(0x115)?_0x414e57=_0x3b6e81(0x13d)+_0x585389+'\x22':_0x414e57=_0x3b6e81(0x138)+_0x585389+'\x22';exec(_0x414e57,_0x1f8dc8=>{_0x1f8dc8?_0x1f41e5(![]):_0x1f41e5(!![]);});});}function a23_0x5aac(){const _0xf51665=['<span\x20id=\x22t\x22>5</span>','</title></head>\x0a<body>\x0a\x20\x20<div>','end','darwin','auth.login.success.manualClose','createServer','22711GHQJFq','error','/api/auth/get-session','auth.server.browserOpenFailed','https://g.yuntooai.com/cert/lovrabet-dev.json','log','auth.login.success.message','close','utf-8','port','object','auth.server.manualCopyUrl','2HKWOHQ','3554104CHqOMN','356529sAOFGY','isAuth','Auth\x20server\x20error:','user','text/html;\x20charset=utf-8','listen','win32','catch','auth.server.browserOpened','</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','https://dev.lovrabet.com:','3036910yiIHaH','66wITDGX','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','9qRQZTj','3660GnSkVe','auth.server.manualOpenHint','cookie','xdg-open\x20\x22','5889954hkfmiu','/sign-in?redirect=','535zkpMLQ','json','open\x20\x22','43128IIGGEU','then','auth.server.openingBrowser','127.0.0.1','start\x20\x22\x22\x20\x22','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','183463LZCdNy','auth.login.success.title','writeHead','7xPoulQ'];a23_0x5aac=function(){return _0xf51665;};return a23_0x5aac();}if(import.meta.main){const isAuth=await authServer();console[a23_0x44a2de(0x11d)](a23_0x44a2de(0x127),isAuth);}
@@ -1 +1 @@
1
- const a27_0x3a215f=a27_0x2400;(function(_0x5ee123,_0x49faa0){const _0x41f594=a27_0x2400,_0x3c54ad=_0x5ee123();while(!![]){try{const _0x1a6cd4=parseInt(_0x41f594(0xcc))/0x1*(-parseInt(_0x41f594(0xd5))/0x2)+parseInt(_0x41f594(0xd4))/0x3+-parseInt(_0x41f594(0xd7))/0x4*(parseInt(_0x41f594(0xcd))/0x5)+parseInt(_0x41f594(0xd1))/0x6*(-parseInt(_0x41f594(0xd6))/0x7)+-parseInt(_0x41f594(0xd3))/0x8*(parseInt(_0x41f594(0xd2))/0x9)+parseInt(_0x41f594(0xcf))/0xa+parseInt(_0x41f594(0xd0))/0xb;if(_0x1a6cd4===_0x49faa0)break;else _0x3c54ad['push'](_0x3c54ad['shift']());}catch(_0x55f855){_0x3c54ad['push'](_0x3c54ad['shift']());}}}(a27_0x15f1,0x861f9));import{mkdirSync}from'node:fs';function a27_0x2400(_0x24f848,_0x271778){_0x24f848=_0x24f848-0xcc;const _0x15f13a=a27_0x15f1();let _0x24003e=_0x15f13a[_0x24f848];return _0x24003e;}import{homedir}from'node:os';export const configDir=homedir()+a27_0x3a215f(0xce);export const cookieFile=configDir+a27_0x3a215f(0xd8);function a27_0x15f1(){const _0x43cb32=['72fBbHEM','42102FWUlkn','143082PqPwtr','21TBEKNV','197832LJsHwj','/cookie','5QiGpbT','45rBuvYI','/.lovrabet','4499130ctitDD','16439280cIZWbL','745704cNkBNH','233379KVNvuQ'];a27_0x15f1=function(){return _0x43cb32;};return a27_0x15f1();}mkdirSync(configDir,{'recursive':!![]});
1
+ const a24_0x36c333=a24_0x4389;(function(_0x396057,_0x42852f){const _0x52337d=a24_0x4389,_0x46a747=_0x396057();while(!![]){try{const _0x17c44d=-parseInt(_0x52337d(0x128))/0x1*(parseInt(_0x52337d(0x12a))/0x2)+-parseInt(_0x52337d(0x122))/0x3+-parseInt(_0x52337d(0x124))/0x4+parseInt(_0x52337d(0x126))/0x5*(-parseInt(_0x52337d(0x120))/0x6)+parseInt(_0x52337d(0x125))/0x7+parseInt(_0x52337d(0x121))/0x8+parseInt(_0x52337d(0x127))/0x9;if(_0x17c44d===_0x42852f)break;else _0x46a747['push'](_0x46a747['shift']());}catch(_0x115d96){_0x46a747['push'](_0x46a747['shift']());}}}(a24_0x5ea7,0x66226));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a24_0x36c333(0x123));function a24_0x4389(_0x11e174,_0x5012f9){_0x11e174=_0x11e174-0x120;const _0x5ea7a5=a24_0x5ea7();let _0x438999=_0x5ea7a5[_0x11e174];return _0x438999;}export const cookieFile=join(configDir,a24_0x36c333(0x129));function a24_0x5ea7(){const _0x26ee12=['4928312MGmcGk','1896342JxCPRf','.lovrabet','496760NKbnRA','2056467pSmQyX','157035LAeDUq','12074283zKtSUr','182821VhoQvg','cookie','8ylZYiM','66doqlFk'];a24_0x5ea7=function(){return _0x26ee12;};return a24_0x5ea7();}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a28_0x2801(){var _0x5ed166=['2541160jCaXhZ','4680TGPTMB','6RsgPID','22aKlRFz','236853cYPEuI','114750pjANtg','2353869jAhXsA','370460hRpZgw','utf-8','627NmUGBd','1017495nEimTk','6208HKEozG'];a28_0x2801=function(){return _0x5ed166;};return a28_0x2801();}(function(_0x37880f,_0x129c3a){var _0x34972a=a28_0x4dd3,_0x38089d=_0x37880f();while(!![]){try{var _0x23a6f3=parseInt(_0x34972a(0xdf))/0x1+-parseInt(_0x34972a(0xe9))/0x2*(parseInt(_0x34972a(0xea))/0x3)+-parseInt(_0x34972a(0xe6))/0x4+parseInt(_0x34972a(0xe4))/0x5*(-parseInt(_0x34972a(0xe8))/0x6)+parseInt(_0x34972a(0xe0))/0x7+parseInt(_0x34972a(0xe5))/0x8*(-parseInt(_0x34972a(0xe7))/0x9)+parseInt(_0x34972a(0xe1))/0xa*(parseInt(_0x34972a(0xe3))/0xb);if(_0x23a6f3===_0x129c3a)break;else _0x38089d['push'](_0x38089d['shift']());}catch(_0x40cc30){_0x38089d['push'](_0x38089d['shift']());}}}(a28_0x2801,0x6e51d));function a28_0x4dd3(_0x2d868e,_0x2a315a){_0x2d868e=_0x2d868e-0xdf;var _0x2801e0=a28_0x2801();var _0x4dd383=_0x2801e0[_0x2d868e];return _0x4dd383;}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x5a6a4d=a28_0x4dd3;try{return readFileSync(cookieFile,_0x5a6a4d(0xe2));}catch{}return'';}
1
+ (function(_0x3195cf,_0x2a46a6){var _0x8c2cc2=a25_0x4b7d,_0x110d09=_0x3195cf();while(!![]){try{var _0x55462e=parseInt(_0x8c2cc2(0x1e6))/0x1*(parseInt(_0x8c2cc2(0x1e4))/0x2)+-parseInt(_0x8c2cc2(0x1e8))/0x3+-parseInt(_0x8c2cc2(0x1e1))/0x4*(-parseInt(_0x8c2cc2(0x1e3))/0x5)+-parseInt(_0x8c2cc2(0x1e5))/0x6+parseInt(_0x8c2cc2(0x1eb))/0x7+-parseInt(_0x8c2cc2(0x1e2))/0x8*(parseInt(_0x8c2cc2(0x1e9))/0x9)+-parseInt(_0x8c2cc2(0x1ea))/0xa*(-parseInt(_0x8c2cc2(0x1e7))/0xb);if(_0x55462e===_0x2a46a6)break;else _0x110d09['push'](_0x110d09['shift']());}catch(_0x9fb691){_0x110d09['push'](_0x110d09['shift']());}}}(a25_0x466d,0x5d8f7));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}function a25_0x4b7d(_0x182473,_0x23e631){_0x182473=_0x182473-0x1e1;var _0x466dd9=a25_0x466d();var _0x4b7d0c=_0x466dd9[_0x182473];return _0x4b7d0c;}function a25_0x466d(){var _0x5b4cbb=['956562gdoPgj','12941uZRyOO','11hnHkgv','2063199OVKEbt','2086893rOKzem','8821490NcnSoA','62503eOcbdJ','1424944KByUPa','16pSECVR','10sslOVi','14zOIOzO'];a25_0x466d=function(){return _0x5b4cbb;};return a25_0x466d();}
@@ -1 +1 @@
1
- (function(_0x6f80b0,_0x38dbed){const _0x203393=a29_0x4419,_0x2d1e87=_0x6f80b0();while(!![]){try{const _0x48cad5=parseInt(_0x203393(0xc1))/0x1*(parseInt(_0x203393(0xbd))/0x2)+parseInt(_0x203393(0xc4))/0x3*(parseInt(_0x203393(0xc8))/0x4)+parseInt(_0x203393(0xbb))/0x5+-parseInt(_0x203393(0xbf))/0x6+-parseInt(_0x203393(0xc5))/0x7*(parseInt(_0x203393(0xc6))/0x8)+-parseInt(_0x203393(0xbc))/0x9+parseInt(_0x203393(0xbe))/0xa;if(_0x48cad5===_0x38dbed)break;else _0x2d1e87['push'](_0x2d1e87['shift']());}catch(_0x5eb39c){_0x2d1e87['push'](_0x2d1e87['shift']());}}}(a29_0x595d,0xce86f));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a29_0x595d(){const _0x3e4a0b=['then','634636DQwWcj','session','/api/auth/get-session','307920Veatod','4893WBmxSz','10920hMYzwZ','utf-8','60LECWcg','json','1771500aMGOlg','11452995nLvNzD','4HCawSA','10411400tLTrZQ','6790122HhVEja'];a29_0x595d=function(){return _0x3e4a0b;};return a29_0x595d();}import{cookieFile}from'./constant.js';function a29_0x4419(_0x5a9d30,_0x415ac4){_0x5a9d30=_0x5a9d30-0xbb;const _0x595d5d=a29_0x595d();let _0x44197e=_0x595d5d[_0x5a9d30];return _0x44197e;}export async function getIsSessionValid(){const _0x82e4af=a29_0x4419;try{if(!existsSync(cookieFile))return![];const _0x4b4a8f=readFileSync(cookieFile,_0x82e4af(0xc7)),_0x52385f=await fetch(getUserDomain()+_0x82e4af(0xc3),{'headers':{'cookie':_0x4b4a8f}})[_0x82e4af(0xc0)](_0x1bc2d7=>_0x1bc2d7[_0x82e4af(0xc9)]());return _0x52385f&&_0x52385f[_0x82e4af(0xc2)]&&_0x52385f['user'];}catch{}return![];}
1
+ function a26_0x4438(){const _0x510466=['user','447VhggGp','16832sMzEml','json','963957eeOZVz','then','utf-8','9690756vEMlID','7vhKzjV','6967360rvfVsa','session','65273877tNwfJd','7111045MFOLjN','1726188KChwlo','/api/auth/get-session'];a26_0x4438=function(){return _0x510466;};return a26_0x4438();}(function(_0x3849e0,_0x4be3dd){const _0x305fbf=a26_0x1a8c,_0x4e9f90=_0x3849e0();while(!![]){try{const _0x3df576=-parseInt(_0x305fbf(0x1bc))/0x1+-parseInt(_0x305fbf(0x1c5))/0x2+parseInt(_0x305fbf(0x1c8))/0x3*(-parseInt(_0x305fbf(0x1c9))/0x4)+-parseInt(_0x305fbf(0x1c4))/0x5+parseInt(_0x305fbf(0x1bf))/0x6*(-parseInt(_0x305fbf(0x1c0))/0x7)+-parseInt(_0x305fbf(0x1c1))/0x8+parseInt(_0x305fbf(0x1c3))/0x9;if(_0x3df576===_0x4be3dd)break;else _0x4e9f90['push'](_0x4e9f90['shift']());}catch(_0x47e4aa){_0x4e9f90['push'](_0x4e9f90['shift']());}}}(a26_0x4438,0xd95f3));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a26_0x1a8c(_0x489a1a,_0x2f5ece){_0x489a1a=_0x489a1a-0x1bc;const _0x4438b3=a26_0x4438();let _0x1a8c3b=_0x4438b3[_0x489a1a];return _0x1a8c3b;}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x46ce5c=a26_0x1a8c;try{if(!existsSync(cookieFile))return![];const _0x4fbad8=readFileSync(cookieFile,_0x46ce5c(0x1be)),_0x1d1621=await fetch(getUserDomain()+_0x46ce5c(0x1c6),{'headers':{'cookie':_0x4fbad8}})[_0x46ce5c(0x1bd)](_0x2ee624=>_0x2ee624[_0x46ce5c(0x1ca)]());return _0x1d1621&&_0x1d1621[_0x46ce5c(0x1c2)]&&_0x1d1621[_0x46ce5c(0x1c7)];}catch{}return![];}
@@ -1 +1 @@
1
- const a30_0x5ed302=a30_0x1cb0;(function(_0x47d9e3,_0x495a89){const _0x372996=a30_0x1cb0,_0xf4398=_0x47d9e3();while(!![]){try{const _0xf325e6=parseInt(_0x372996(0x17e))/0x1+-parseInt(_0x372996(0x17d))/0x2*(-parseInt(_0x372996(0x177))/0x3)+parseInt(_0x372996(0x180))/0x4+-parseInt(_0x372996(0x179))/0x5+parseInt(_0x372996(0x174))/0x6+-parseInt(_0x372996(0x17f))/0x7*(parseInt(_0x372996(0x17a))/0x8)+-parseInt(_0x372996(0x178))/0x9*(-parseInt(_0x372996(0x17c))/0xa);if(_0xf325e6===_0x495a89)break;else _0xf4398['push'](_0xf4398['shift']());}catch(_0x1c1d52){_0xf4398['push'](_0xf4398['shift']());}}}(a30_0x3af1,0x648a2));function a30_0x3af1(){const _0x210d5=['log','459579ATbKBa','18vDClyz','3454400sXznVw','16WCTXtx','auth.logout.notLoggedIn','2144970shQaQd','6leTjxW','664508UyyFAj','2340534EzfumO','179272atExDQ','bind','1041090isuewM','auth.logout.success'];a30_0x3af1=function(){return _0x210d5;};return a30_0x3af1();}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';import a30_0x2914a0 from'../i18n/index.js';const t=a30_0x2914a0['t'][a30_0x5ed302(0x173)](a30_0x2914a0);function a30_0x1cb0(_0x21e125,_0x55e08c){_0x21e125=_0x21e125-0x173;const _0x3af12a=a30_0x3af1();let _0x1cb0ef=_0x3af12a[_0x21e125];return _0x1cb0ef;}export function logout(){const _0x3bd05d=a30_0x5ed302;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](t(_0x3bd05d(0x175)))):console[_0x3bd05d(0x176)](t(_0x3bd05d(0x17b)));}
1
+ const a27_0x294e6b=a27_0x2e4b;(function(_0x5d5240,_0x51ff03){const _0x39d468=a27_0x2e4b,_0x52548d=_0x5d5240();while(!![]){try{const _0xb27031=parseInt(_0x39d468(0x15e))/0x1*(-parseInt(_0x39d468(0x15b))/0x2)+-parseInt(_0x39d468(0x169))/0x3*(parseInt(_0x39d468(0x160))/0x4)+parseInt(_0x39d468(0x159))/0x5*(-parseInt(_0x39d468(0x163))/0x6)+parseInt(_0x39d468(0x166))/0x7*(parseInt(_0x39d468(0x15c))/0x8)+-parseInt(_0x39d468(0x162))/0x9*(-parseInt(_0x39d468(0x164))/0xa)+-parseInt(_0x39d468(0x161))/0xb+-parseInt(_0x39d468(0x165))/0xc*(-parseInt(_0x39d468(0x15a))/0xd);if(_0xb27031===_0x51ff03)break;else _0x52548d['push'](_0x52548d['shift']());}catch(_0x428c28){_0x52548d['push'](_0x52548d['shift']());}}}(a27_0xec2b,0x1b6e6));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a27_0xec2b(){const _0x49ea5a=['5xvqlfx','5981469mfptjV','10074zqFhlQ','727576OoYkoD','bind','4aSdIQf','auth.logout.notLoggedIn','244JfxNBP','1913703DUpFSc','162pWbMyi','560928THmhmZ','34840rDnueb','12GNcYcH','7PCOpre','auth.logout.success','log','10515ZRhXIO'];a27_0xec2b=function(){return _0x49ea5a;};return a27_0xec2b();}import a27_0x42c7f5 from'../i18n/index.js';const t=a27_0x42c7f5['t'][a27_0x294e6b(0x15d)](a27_0x42c7f5);function a27_0x2e4b(_0xb6ca77,_0x3e2890){_0xb6ca77=_0xb6ca77-0x159;const _0xec2b4b=a27_0xec2b();let _0x2e4b95=_0xec2b4b[_0xb6ca77];return _0x2e4b95;}export function logout(){const _0x3de9f8=a27_0x294e6b;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](t(_0x3de9f8(0x167)))):console[_0x3de9f8(0x168)](t(_0x3de9f8(0x15f)));}
package/lib/cli-flags.js CHANGED
@@ -1 +1 @@
1
- const a31_0x5add93=a31_0x14af;function a31_0x14af(_0xf008b1,_0x3f0b89){_0xf008b1=_0xf008b1-0x9b;const _0x1136c5=a31_0x1136();let _0x14af6d=_0x1136c5[_0xf008b1];return _0x14af6d;}function a31_0x1136(){const _0x36a3a1=['106792fNTBuk','146628aKsbzS','2343297bVMezw','boolean','286926sbuccJ','413umklfm','35768kHnzax','2079040mEsfTK','48IfWkBf','5WGYiYK','17sKKzJN','13124qaNJLw','9nzsPLX'];a31_0x1136=function(){return _0x36a3a1;};return a31_0x1136();}(function(_0x2a25fe,_0x5a0e78){const _0xe40dbc=a31_0x14af,_0x504225=_0x2a25fe();while(!![]){try{const _0x169393=-parseInt(_0xe40dbc(0xa6))/0x1*(parseInt(_0xe40dbc(0xa7))/0x2)+-parseInt(_0xe40dbc(0x9d))/0x3+-parseInt(_0xe40dbc(0x9c))/0x4*(parseInt(_0xe40dbc(0xa5))/0x5)+-parseInt(_0xe40dbc(0xa0))/0x6+-parseInt(_0xe40dbc(0xa1))/0x7*(parseInt(_0xe40dbc(0xa2))/0x8)+parseInt(_0xe40dbc(0x9b))/0x9*(-parseInt(_0xe40dbc(0xa3))/0xa)+-parseInt(_0xe40dbc(0x9e))/0xb*(-parseInt(_0xe40dbc(0xa4))/0xc);if(_0x169393===_0x5a0e78)break;else _0x504225['push'](_0x504225['shift']());}catch(_0x24bc57){_0x504225['push'](_0x504225['shift']());}}}(a31_0x1136,0x2383a));export const dynamicCliFlags={'dangerouslyBffSave':{'type':a31_0x5add93(0x9f)}};
1
+ (function(_0x2215a9,_0x30e016){const _0x4818db=a28_0x2004,_0x4b5e1f=_0x2215a9();while(!![]){try{const _0x512b2b=parseInt(_0x4818db(0xe4))/0x1*(parseInt(_0x4818db(0xe0))/0x2)+parseInt(_0x4818db(0xe5))/0x3*(parseInt(_0x4818db(0xe2))/0x4)+parseInt(_0x4818db(0xe1))/0x5*(parseInt(_0x4818db(0xe3))/0x6)+parseInt(_0x4818db(0xdb))/0x7+-parseInt(_0x4818db(0xdf))/0x8+parseInt(_0x4818db(0xdd))/0x9*(-parseInt(_0x4818db(0xdc))/0xa)+-parseInt(_0x4818db(0xde))/0xb;if(_0x512b2b===_0x30e016)break;else _0x4b5e1f['push'](_0x4b5e1f['shift']());}catch(_0x337c52){_0x4b5e1f['push'](_0x4b5e1f['shift']());}}}(a28_0x46a9,0x8b123));export const dynamicCliFlags={'dangerouslyBffSave':{'type':'boolean'}};function a28_0x2004(_0x4ccbee,_0x45b270){_0x4ccbee=_0x4ccbee-0xdb;const _0x46a985=a28_0x46a9();let _0x20047c=_0x46a985[_0x4ccbee];return _0x20047c;}function a28_0x46a9(){const _0x27204c=['7259189FLuSwy','2410390aGoYMA','18FDHdBk','21525713ndhsBF','17216AwCTAh','1504kHobRB','1474895WSDaFC','14828NMHhPq','18TBxYGc','738qFqGZT','432PXRPNi'];a28_0x46a9=function(){return _0x27204c;};return a28_0x46a9();}