@lovrabet/rabetbase-cli 2.0.2-beta.1 → 2.0.2-beta.10

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 (155) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -0
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -0
  14. package/lib/commands/api/index.js +1 -0
  15. package/lib/commands/api/list.js +1 -0
  16. package/lib/commands/api/pull.js +1 -0
  17. package/lib/commands/app.js +1 -1
  18. package/lib/commands/auth.js +1 -1
  19. package/lib/commands/bff/delete.js +1 -1
  20. package/lib/commands/bff/detail.js +1 -1
  21. package/lib/commands/bff/index.js +1 -1
  22. package/lib/commands/bff/list.js +1 -1
  23. package/lib/commands/bff/new.js +1 -1
  24. package/lib/commands/bff/pull.js +1 -1
  25. package/lib/commands/bff/push.js +1 -1
  26. package/lib/commands/bff/status.js +1 -1
  27. package/lib/commands/build.js +1 -1
  28. package/lib/commands/cli-update.js +1 -0
  29. package/lib/commands/codegen/index.js +1 -1
  30. package/lib/commands/codegen/sdk.js +1 -1
  31. package/lib/commands/codegen/sql.js +1 -1
  32. package/lib/commands/common/flags.js +1 -0
  33. package/lib/commands/config.js +1 -1
  34. package/lib/commands/create.js +1 -1
  35. package/lib/commands/dataset/detail.js +1 -1
  36. package/lib/commands/dataset/index.js +1 -1
  37. package/lib/commands/dataset/links.js +1 -1
  38. package/lib/commands/dataset/list.js +1 -1
  39. package/lib/commands/dataset/operations.js +1 -1
  40. package/lib/commands/doctor.js +1 -0
  41. package/lib/commands/init.js +1 -1
  42. package/lib/commands/logout.js +1 -1
  43. package/lib/commands/logs.js +1 -1
  44. package/lib/commands/menu/index.js +1 -0
  45. package/lib/commands/menu/shared/compare-table.js +1 -0
  46. package/lib/commands/menu/shared/index.js +1 -0
  47. package/lib/commands/menu/shared/inquirer.js +1 -0
  48. package/lib/commands/menu/shared/local-pages.js +1 -0
  49. package/lib/commands/menu/shared/logic.js +1 -0
  50. package/lib/commands/menu/shared/service.js +1 -0
  51. package/lib/commands/menu/shared/sync-core.js +1 -0
  52. package/lib/commands/menu/shared/update-core.js +1 -0
  53. package/lib/commands/menu/shared/valid-url.js +1 -0
  54. package/lib/commands/menu/sync.js +1 -0
  55. package/lib/commands/menu/update.js +1 -0
  56. package/lib/commands/preview.js +1 -1
  57. package/lib/commands/project-upgrade.js +1 -0
  58. package/lib/commands/registry.js +1 -1
  59. package/lib/commands/run.js +1 -1
  60. package/lib/commands/skill.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/sql/list.js +1 -1
  65. package/lib/commands/sql/save.js +1 -1
  66. package/lib/commands/sql/validate.js +1 -1
  67. package/lib/commands/start.js +1 -1
  68. package/lib/config/config-help.js +1 -1
  69. package/lib/config/main.js +1 -1
  70. package/lib/constant/cli.js +1 -1
  71. package/lib/constant/domain.js +1 -1
  72. package/lib/constant/env.js +1 -1
  73. package/lib/context.js +1 -1
  74. package/lib/core/alias-resolver.js +1 -1
  75. package/lib/core/api-client.js +1 -1
  76. package/lib/core/bff/config.js +1 -1
  77. package/lib/core/bff/file-system.js +1 -1
  78. package/lib/core/bff/hash.js +1 -1
  79. package/lib/core/bff/lock.js +1 -1
  80. package/lib/core/bff/utils.js +1 -1
  81. package/lib/core/db-resolver.js +1 -1
  82. package/lib/core/sql-validator.js +1 -1
  83. package/lib/create-app/enhanced-guided-create.js +1 -1
  84. package/lib/create-app/format-elapsed.js +1 -1
  85. package/lib/create-app/main.js +1 -1
  86. package/lib/create-app/non-interactive.js +1 -1
  87. package/lib/create-app/task-finished.js +1 -1
  88. package/lib/create-app/task-loading.js +1 -1
  89. package/lib/create-app/task-running.js +1 -1
  90. package/lib/create-app/task-time.js +1 -1
  91. package/lib/create-app/use-copy-project-template.js +1 -1
  92. package/lib/create-app/use-format-code.js +1 -1
  93. package/lib/create-app/use-install-dependencies.js +1 -1
  94. package/lib/errors.js +1 -1
  95. package/lib/framework/flags.js +1 -1
  96. package/lib/framework/help.js +1 -1
  97. package/lib/framework/index.js +1 -1
  98. package/lib/framework/output.js +1 -1
  99. package/lib/framework/response.js +1 -1
  100. package/lib/framework/runner.js +1 -1
  101. package/lib/generated/build-info.js +1 -1
  102. package/lib/help.js +1 -1
  103. package/lib/init/main.js +1 -1
  104. package/lib/skills/main.js +1 -1
  105. package/lib/skills/npx-skills-add.js +1 -1
  106. package/lib/telemetry/cli-help-trace.js +1 -0
  107. package/lib/telemetry/ensure-cli-otel-config.js +1 -0
  108. package/lib/telemetry/register-otel-exit-shutdown.js +1 -0
  109. package/lib/telemetry/send-cli-trace-log.js +1 -0
  110. package/lib/utils/ai_config.js +1 -1
  111. package/lib/utils/cdn-config.js +1 -1
  112. package/lib/utils/check-sdk-version.js +1 -1
  113. package/lib/utils/cli-version-check.js +1 -1
  114. package/lib/utils/config.js +1 -1
  115. package/lib/utils/copy-directory.js +1 -1
  116. package/lib/utils/file-utils.js +1 -1
  117. package/lib/utils/guides-cdn.js +1 -1
  118. package/lib/utils/http-client.js +1 -1
  119. package/lib/utils/logger.js +1 -1
  120. package/lib/utils/platform.js +1 -0
  121. package/lib/utils/rules-cdn.js +1 -1
  122. package/lib/utils/sleep.js +1 -1
  123. package/lib/utils/template-replacer.js +1 -1
  124. package/package.json +7 -4
  125. package/templates/generate-api/api.ts.tpl +4 -4
  126. package/templates/generate-api/client.ts.tpl +2 -2
  127. package/lib/ai-setup/config.js +0 -1
  128. package/lib/api/api-doc-ui.js +0 -1
  129. package/lib/api/api-pull-ui.js +0 -1
  130. package/lib/api/main.js +0 -1
  131. package/lib/api/pull-silent.js +0 -1
  132. package/lib/app-menu/app-menu-sync-ui.js +0 -1
  133. package/lib/app-menu/create-menu.js +0 -1
  134. package/lib/app-menu/get-local-pages.js +0 -1
  135. package/lib/app-menu/get-online-menu-list.js +0 -1
  136. package/lib/app-menu/types.js +0 -1
  137. package/lib/app-menu/use-get-online-menu-list.js +0 -1
  138. package/lib/app-menu/utils.js +0 -1
  139. package/lib/app-menu/valid-url.js +0 -1
  140. package/lib/app-menu-update-cdn/current-content.js +0 -1
  141. package/lib/app-menu-update-cdn/input-cdn-asset.js +0 -1
  142. package/lib/app-menu-update-cdn/main.js +0 -1
  143. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +0 -1
  144. package/lib/commands/api.js +0 -1
  145. package/lib/commands/mcp.js +0 -1
  146. package/lib/commands/menu.js +0 -1
  147. package/lib/mcp/McpInstallUI.js +0 -1
  148. package/lib/mcp/claude.js +0 -1
  149. package/lib/mcp/cursor.js +0 -1
  150. package/lib/mcp/main.js +0 -1
  151. package/lib/mcp/mcp-install-non-interactive.js +0 -1
  152. package/lib/mcp/mcp-installer.js +0 -1
  153. package/lib/ui/IDESelector.js +0 -1
  154. package/lib/ui/useIDESelection.js +0 -1
  155. /package/lib/{app-menu-update-cdn → commands/menu/shared}/types.js +0 -0
@@ -1 +0,0 @@
1
- (function(_0x180ebb,_0x3b31ce){const _0x340723=a17_0x247e,_0x406de7=_0x180ebb();while(!![]){try{const _0x553d4d=parseInt(_0x340723(0x195))/0x1+parseInt(_0x340723(0x190))/0x2*(-parseInt(_0x340723(0x18d))/0x3)+parseInt(_0x340723(0x189))/0x4*(-parseInt(_0x340723(0x193))/0x5)+-parseInt(_0x340723(0x18c))/0x6+parseInt(_0x340723(0x18e))/0x7+-parseInt(_0x340723(0x18f))/0x8+parseInt(_0x340723(0x18a))/0x9*(parseInt(_0x340723(0x191))/0xa);if(_0x553d4d===_0x3b31ce)break;else _0x406de7['push'](_0x406de7['shift']());}catch(_0x198a95){_0x406de7['push'](_0x406de7['shift']());}}}(a17_0x82f3,0x54bb9));function a17_0x247e(_0x342d41,_0x5703bf){_0x342d41=_0x342d41-0x189;const _0x82f308=a17_0x82f3();let _0x247ed1=_0x82f308[_0x342d41];return _0x247ed1;}import{jsx as a17_0x54804d,jsxs as a17_0x160932}from'react/jsx-runtime';function a17_0x82f3(){const _0x524d9b=['479676sdsxtY','257214kqzxqM','2371187jJLwwK','1333032OrvuYw','6tnGIhS','20abedko','green','5cwRlwy','cyan','183844eECFsb','578212hWvctf','2127699esEEfL','JS\x20URL:\x20'];a17_0x82f3=function(){return _0x524d9b;};return a17_0x82f3();}import{Text,Box}from'ink';export function InputCdnAsset(_0x4804e8){const _0x5b08e4=a17_0x247e,{jsCdnUrl:_0xbb24ca,cssCdnUrl:_0x16874f}=_0x4804e8;return a17_0x160932(Box,{'flexDirection':'column','marginTop':0x1,'children':[a17_0x54804d(Text,{'color':_0x5b08e4(0x194),'children':'*\x20Entered\x20asset\x20URLs'}),a17_0x160932(Box,{'children':[a17_0x160932(Text,{'children':['\x20\x20',_0x5b08e4(0x18b)]}),a17_0x54804d(Text,{'color':_0x5b08e4(0x192),'children':_0xbb24ca})]}),a17_0x160932(Box,{'children':[a17_0x160932(Text,{'children':['\x20\x20','CSS\x20URL:\x20']}),a17_0x54804d(Text,{'color':'green','children':_0x16874f})]})]});}
@@ -1 +0,0 @@
1
- (function(_0x465bc4,_0xa27090){const _0x318478=a18_0x29ee,_0x3ca415=_0x465bc4();while(!![]){try{const _0x306775=parseInt(_0x318478(0xea))/0x1*(parseInt(_0x318478(0x100))/0x2)+parseInt(_0x318478(0x116))/0x3*(parseInt(_0x318478(0xf4))/0x4)+-parseInt(_0x318478(0x10e))/0x5*(parseInt(_0x318478(0xfb))/0x6)+parseInt(_0x318478(0xe9))/0x7+parseInt(_0x318478(0x101))/0x8+parseInt(_0x318478(0x115))/0x9+parseInt(_0x318478(0xfd))/0xa*(-parseInt(_0x318478(0xed))/0xb);if(_0x306775===_0xa27090)break;else _0x3ca415['push'](_0x3ca415['shift']());}catch(_0x5826c4){_0x3ca415['push'](_0x3ca415['shift']());}}}(a18_0xc3d3,0x26cbd));import{jsx as a18_0x5b3efd,jsxs as a18_0x57250a,Fragment as a18_0x854b00}from'react/jsx-runtime';import{Text,Box,useInput,useApp,render}from'ink';import{useEffect,useState}from'react';function a18_0x29ee(_0x34a0cd,_0x311244){_0x34a0cd=_0x34a0cd-0xe7;const _0xc3d32f=a18_0xc3d3();let _0x29ee1c=_0xc3d32f[_0x34a0cd];return _0x29ee1c;}function a18_0xc3d3(){const _0x18fad4=['return','cyan','gray','label','input-css','red','trim','value','backspace','90OkOHVe','green','map','Continue\x20update','slice','cancel','Please\x20enter\x20a\x20valid\x20CSS\x20https\x20URL','2542590ystYoM','135juZwDJ','column','updated','1864422rbsher','887nPmOqt','need-confirm','dots','11hnlDAI','CSS\x20URL:\x20','\x20Assets\x20are\x20syncing...','all','\x20←\x20','input-js','Enter\x20project\x20CSS\x20asset\x20URL\x20(https://...)','1736NITBtw','JS\x20URL:\x20','Please\x20enter\x20a\x20valid\x20JS\x20https\x20URL','yellow','length','resources','upArrow','91830cpTtRZ','delete','3044200mpdNca','creating','\x20command\x20to\x20re-login','382qVqFPo','8128uWDdbJ','flat','√\x20Updated\x20successfully','Cancel\x20update'];a18_0xc3d3=function(){return _0x18fad4;};return a18_0xc3d3();}import a18_0x1c7254 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.meta.main&&render(a18_0x5b3efd(AppMenuUpdateCdn,{}));export function AppMenuUpdateCdn(){const _0x5c13cb=a18_0x29ee,{exit:_0x424886}=useApp(),{loading:_0x55c193,menuList:_0x1f6a66,error:_0x2147af}=useGetOnlineMenuList(),[_0x369b35,_0x556635]=useState('ok'),[_0x3689f0,_0x486996]=useState('input-js'),[_0x2ec9ea,_0x3d5077]=useState(''),[_0x30f7a6,_0x1f61b5]=useState(''),[_0x596e8f,_0x15d600]=useState(''),[_0x331dc2,_0x11d546]=useState(''),_0xede7fb=Array['from'](new Set(_0x1f6a66[_0x5c13cb(0x110)](_0x42b153=>_0x42b153[_0x5c13cb(0xf9)])[_0x5c13cb(0x102)]()));useEffect(()=>{const _0x4c9f69=_0x5c13cb;_0x3689f0===_0x4c9f69(0xe8)&&setTimeout(_0x424886,0x32);},[_0x3689f0]),useInput(async(_0x1377c7,_0x41046e)=>{const _0x198974=_0x5c13cb;if(_0x3689f0===_0x198974(0xf2)){if(_0x41046e['return']){const _0x56056b=_0x596e8f[_0x198974(0x10b)]();if(_0x56056b==='')return;if(!isValidJsHttpsUrl(_0x56056b)){_0x11d546(_0x198974(0xf6));return;}if(!await isUrlReachable(_0x56056b)){_0x11d546('JS\x20URL\x20is\x20unreachable');return;}_0x3d5077(_0x56056b),_0x15d600(''),_0x11d546(''),_0x486996(_0x198974(0x109));return;}if(_0x41046e[_0x198974(0x10d)]||_0x41046e[_0x198974(0xfc)]){_0x15d600(_0x3dfb9b=>_0x3dfb9b[_0x198974(0x112)](0x0,-0x1)),_0x11d546('');return;}_0x15d600(_0x268279=>_0x268279+_0x1377c7);return;}if(_0x3689f0==='input-css'){if(_0x41046e[_0x198974(0x105)]){const _0x563301=_0x596e8f[_0x198974(0x10b)]();if(_0x563301==='')return;if(!isValidCssHttpsUrl(_0x563301)){_0x11d546(_0x198974(0x114));return;}if(!await isUrlReachable(_0x563301)){_0x11d546('CSS\x20URL\x20is\x20unreachable');return;}_0x1f61b5(_0x563301),_0x15d600(''),_0x11d546(''),_0x486996(_0x198974(0xeb));return;}if(_0x41046e[_0x198974(0x10d)]||_0x41046e['delete']){_0x15d600(_0x133a4b=>_0x133a4b[_0x198974(0x112)](0x0,-0x1)),_0x11d546('');return;}_0x15d600(_0x21240e=>_0x21240e+_0x1377c7);return;}if(_0x3689f0===_0x198974(0xeb)){(_0x41046e[_0x198974(0xfa)]||_0x41046e['downArrow']||_0x41046e['leftArrow']||_0x41046e['rightArrow'])&&_0x556635(_0x11a79a=>_0x11a79a==='ok'?'cancel':'ok');if(_0x41046e[_0x198974(0x105)]){_0x486996(_0x198974(0xfe));if(_0x369b35==='ok')await Promise[_0x198974(0xf0)](_0x1f6a66[_0x198974(0x110)](_0x539db4=>{const _0x417f81=_0x198974,_0x45c4e4={'id':_0x539db4['id'],'label':_0x539db4['label'],'path':_0x539db4['path'],'resources':[_0x2ec9ea,_0x30f7a6]};if(_0x539db4[_0x417f81(0xf9)]['length']===0x0)return Promise['resolve']();return updateMenuCdnUrl(_0x45c4e4);})),await new Promise(_0x480a56=>setTimeout(_0x480a56,0x3e8)),_0x486996(_0x198974(0xe8));else _0x369b35===_0x198974(0x113)&&_0x424886();}}});if(_0x55c193)return a18_0x57250a(Box,{'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(Text,{}),a18_0x5b3efd(a18_0x1c7254,{'type':_0x5c13cb(0xec)}),a18_0x5b3efd(Text,{'children':'\x20Fetching\x20online\x20menu\x20asset\x20links...'})]});if(_0x2147af)return a18_0x57250a(Box,{'flexDirection':_0x5c13cb(0xe7),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x57250a(Text,{'color':_0x5c13cb(0x10a),'children':['✗\x20',_0x2147af]}),a18_0x57250a(Box,{'marginTop':0x1,'children':[a18_0x5b3efd(Text,{'color':_0x5c13cb(0x107),'children':'Hint:\x20use\x20'}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x106),'children':'rabetbase\x20auth'}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x107),'children':_0x5c13cb(0xff)})]})]});if(_0xede7fb[_0x5c13cb(0xf8)]===0x0)return a18_0x5b3efd(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a18_0x5b3efd(Text,{'color':_0x5c13cb(0xf7),'children':'!\x20No\x20menu\x20asset\x20links\x20found'})});if(_0x3689f0==='need-confirm')return a18_0x57250a(Box,{'flexDirection':_0x5c13cb(0xe7),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(CurrentMenuCdnContent,{'menuList':_0x1f6a66}),a18_0x5b3efd(InputCdnAsset,{'jsCdnUrl':_0x2ec9ea,'cssCdnUrl':_0x30f7a6}),a18_0x5b3efd(Box,{'marginTop':0x1,'flexDirection':_0x5c13cb(0xe7),'children':[{'label':_0x5c13cb(0x111),'value':'ok'},{'label':_0x5c13cb(0x104),'value':_0x5c13cb(0x113)}][_0x5c13cb(0x110)](_0x52a21e=>a18_0x57250a(Text,{'color':_0x369b35===_0x52a21e[_0x5c13cb(0x10c)]?_0x5c13cb(0xf7):undefined,'children':[_0x369b35===_0x52a21e[_0x5c13cb(0x10c)]?'>\x20':'\x20\x20',_0x52a21e[_0x5c13cb(0x108)]]},_0x52a21e[_0x5c13cb(0x10c)]))})]});if(_0x3689f0==='creating')return a18_0x57250a(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(CurrentMenuCdnContent,{'menuList':_0x1f6a66}),a18_0x5b3efd(InputCdnAsset,{'jsCdnUrl':_0x2ec9ea,'cssCdnUrl':_0x30f7a6}),a18_0x57250a(Box,{'marginTop':0x1,'children':[a18_0x5b3efd(a18_0x1c7254,{'type':_0x5c13cb(0xec)}),a18_0x5b3efd(Text,{'children':_0x5c13cb(0xef)})]})]});if(_0x3689f0===_0x5c13cb(0xe8))return a18_0x57250a(Box,{'flexDirection':_0x5c13cb(0xe7),'marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(CurrentMenuCdnContent,{'menuList':_0x1f6a66}),a18_0x5b3efd(InputCdnAsset,{'jsCdnUrl':_0x2ec9ea,'cssCdnUrl':_0x30f7a6}),a18_0x5b3efd(Box,{'marginTop':0x1,'children':a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x5c13cb(0x103)})})]});return a18_0x57250a(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a18_0x5b3efd(CurrentMenuCdnContent,{'menuList':_0x1f6a66}),a18_0x57250a(Box,{'marginTop':0x1,'flexDirection':'column','children':[a18_0x5b3efd(Text,{'color':_0x5c13cb(0x106),'children':'*\x20Enter\x20new\x20asset\x20URLs'}),_0x2ec9ea?a18_0x57250a(Box,{'children':[a18_0x57250a(Text,{'color':_0x5c13cb(0x107),'children':['\x20\x20',_0x5c13cb(0xf5)]}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x2ec9ea})]}):_0x3689f0===_0x5c13cb(0xf2)&&a18_0x57250a(a18_0x854b00,{'children':[a18_0x57250a(Box,{'children':[a18_0x57250a(Text,{'children':['\x20\x20','JS\x20URL:\x20']}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x596e8f}),_0x331dc2&&a18_0x57250a(Text,{'color':'red','children':[_0x5c13cb(0xf1),_0x331dc2]})]}),!_0x331dc2&&a18_0x5b3efd(Box,{'children':a18_0x57250a(Text,{'color':_0x5c13cb(0x107),'children':['\x20\x20','Enter\x20project\x20JS\x20asset\x20URL\x20(https://...)']})})]}),_0x30f7a6?a18_0x57250a(Box,{'children':[a18_0x57250a(Text,{'children':['\x20\x20',_0x5c13cb(0xee)]}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x30f7a6})]}):_0x3689f0===_0x5c13cb(0x109)&&a18_0x57250a(a18_0x854b00,{'children':[a18_0x57250a(Box,{'children':[a18_0x57250a(Text,{'children':['\x20\x20',_0x5c13cb(0xee)]}),a18_0x5b3efd(Text,{'color':_0x5c13cb(0x10f),'children':_0x596e8f}),_0x331dc2&&a18_0x57250a(Text,{'color':'red','children':[_0x5c13cb(0xf1),_0x331dc2]})]}),!_0x331dc2&&a18_0x5b3efd(Box,{'children':a18_0x57250a(Text,{'color':_0x5c13cb(0x107),'children':['\x20\x20',_0x5c13cb(0xf3)]})})]})]})]});}
@@ -1 +0,0 @@
1
- const a20_0x27fb49=a20_0x5e41;function a20_0x3d72(){const _0x367e19=['application/json','5071416bLuvPT','error','info','\x20\x20\x202.\x20Set\x20default:\x20rabetbase\x20config\x20set\x20app\x20<app-code>','import','227559iFkuDS','No\x20AppCode\x20provided\x20and\x20no\x20default\x20configured','https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.css','json','\x20\x20\x201.\x20Specify\x20directly:\x20rabetbase\x20api\x20pull\x20<app-code>','5025921aItFAz','stringify','success','label','10524vrfKwQ','Menu\x20assets\x20synced:\x20','POST','errorCode','/smartapi/menu/update','resources','sdk-demo','update-menu-cdn-url','path','Failed\x20to\x20update\x20menu\x20assets:\x20','21080064vFxYkT','1195abFQjD','SdkDemo1','367896ifGdPV','log','!\x20Please\x20use\x20one\x20of\x20the\x20following:','data','status','Error','5970992aJulRp'];a20_0x3d72=function(){return _0x367e19;};return a20_0x3d72();}(function(_0x5a980f,_0x59332b){const _0x1a3bde=a20_0x5e41,_0x2ec9a9=_0x5a980f();while(!![]){try{const _0xfd09ea=-parseInt(_0x1a3bde(0x1c4))/0x1+-parseInt(_0x1a3bde(0x1b7))/0x2+-parseInt(_0x1a3bde(0x1c9))/0x3+parseInt(_0x1a3bde(0x1bd))/0x4+parseInt(_0x1a3bde(0x1b5))/0x5*(-parseInt(_0x1a3bde(0x1cd))/0x6)+-parseInt(_0x1a3bde(0x1bf))/0x7+parseInt(_0x1a3bde(0x1b4))/0x8;if(_0xfd09ea===_0x59332b)break;else _0x2ec9a9['push'](_0x2ec9a9['shift']());}catch(_0x902d15){_0x2ec9a9['push'](_0x2ec9a9['shift']());}}}(a20_0x3d72,0xdb0e0));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain}from'../constant/domain.js';import{readConfig}from'../utils/config.js';function a20_0x5e41(_0x16c9b6,_0x52cb62){_0x16c9b6=_0x16c9b6-0x1b3;const _0x3d72ef=a20_0x3d72();let _0x5e41dd=_0x3d72ef[_0x16c9b6];return _0x5e41dd;}import{logger}from'../utils/logger.js';const config=readConfig(),logLabel=a20_0x27fb49(0x1d4);import.meta.main&&updateMenuCdnUrl({'id':0xf41e,'label':a20_0x27fb49(0x1b6),'path':a20_0x27fb49(0x1d3),'resources':['https://g.yuntooai.com/dist/yt-test-app/1.0.1/assets/main.js',a20_0x27fb49(0x1c6)]});export async function updateMenuCdnUrl(_0x41e499){const _0x870aba=a20_0x27fb49,_0x21be19=config?.['appcode'];if(!_0x21be19){const _0x340691=_0x870aba(0x1c5);logger['error'](logLabel,_0x340691),console['error']('×\x20'+_0x340691),console[_0x870aba(0x1b8)](_0x870aba(0x1b9)),console[_0x870aba(0x1b8)](_0x870aba(0x1c8)),console[_0x870aba(0x1b8)](_0x870aba(0x1c2));return;}logger['info'](logLabel,'Updating\x20menu\x20asset\x20links:\x20'+_0x41e499['label']+'\x20('+_0x41e499[_0x870aba(0x1d5)]+')');const _0x184113={'id':_0x41e499['id'],'appCode':_0x21be19,'extend':{'loadScriptMode':_0x870aba(0x1c3),'resources':_0x41e499['resources']?JSON[_0x870aba(0x1ca)](_0x41e499[_0x870aba(0x1d2)]):undefined}},_0x454d6d=await fetch(getApiDomain()+_0x870aba(0x1d1),{'method':_0x870aba(0x1cf),'body':JSON[_0x870aba(0x1ca)](_0x184113),'headers':{'Content-Type':_0x870aba(0x1be),'Cookie':getCookie()}});if(!_0x454d6d['ok']){if(_0x454d6d['status']===0x191){const _0x308d8a='Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again';logger['error'](logLabel,_0x308d8a,{'status':_0x454d6d[_0x870aba(0x1bb)],'menu':_0x41e499[_0x870aba(0x1cc)]});throw new Error(_0x308d8a);}const _0x46d216=_0x870aba(0x1b3)+_0x454d6d[_0x870aba(0x1bb)];logger[_0x870aba(0x1c0)](logLabel,_0x46d216,{'menu':_0x41e499[_0x870aba(0x1cc)]});throw new Error(_0x46d216);}const _0x4fb496=await _0x454d6d[_0x870aba(0x1c7)]();if(!_0x4fb496[_0x870aba(0x1cb)]){const _0x1cf9a9=_0x870aba(0x1b3)+(_0x4fb496['errorMsg']||_0x870aba(0x1bc));logger[_0x870aba(0x1c0)](logLabel,_0x1cf9a9,{'errorCode':_0x4fb496[_0x870aba(0x1d0)],'errorMsg':_0x4fb496['errorMsg'],'menu':_0x41e499[_0x870aba(0x1cc)]});throw new Error(_0x1cf9a9);}logger[_0x870aba(0x1c1)](logLabel,_0x870aba(0x1ce)+_0x41e499[_0x870aba(0x1cc)],_0x4fb496[_0x870aba(0x1ba)]);}
@@ -1 +0,0 @@
1
- const a29_0x2159e9=a29_0x54da;function a29_0x54da(_0x2a5765,_0x485a63){_0x2a5765=_0x2a5765-0x1b2;const _0xcd02e1=a29_0xcd02();let _0x54dadf=_0xcd02e1[_0x2a5765];return _0x54dadf;}(function(_0x2007bb,_0x31c611){const _0x5499ea=a29_0x54da,_0x12cf20=_0x2007bb();while(!![]){try{const _0x481f47=-parseInt(_0x5499ea(0x1c4))/0x1*(-parseInt(_0x5499ea(0x1d6))/0x2)+-parseInt(_0x5499ea(0x1e6))/0x3+-parseInt(_0x5499ea(0x1e7))/0x4*(-parseInt(_0x5499ea(0x1d4))/0x5)+-parseInt(_0x5499ea(0x1c2))/0x6*(parseInt(_0x5499ea(0x1e1))/0x7)+parseInt(_0x5499ea(0x1e5))/0x8+parseInt(_0x5499ea(0x1e3))/0x9+-parseInt(_0x5499ea(0x1d7))/0xa;if(_0x481f47===_0x31c611)break;else _0x12cf20['push'](_0x12cf20['shift']());}catch(_0x32df56){_0x12cf20['push'](_0x12cf20['shift']());}}}(a29_0xcd02,0x8722a));import{jsx as a29_0x16ec08}from'react/jsx-runtime';function a29_0xcd02(){const _0x42ab63=['trim','7xNMswp','filter','9285948VgOKBw','Use:\x20rabetbase\x20api\x20pull\x20--appcode\x20','6602000wazboB','2039175qddEtv','410452VNpIuP','Set\x20appcode:\x20`rabetbase\x20config\x20set\x20appcode\x20<code>`\x20or\x20pass\x20--appcode.','datasetcode','split','output','slice','repeat','api\x20(missing\x20subcommand:\x20list,\x20pull\x20or\x20doc)','\x1b[0m','\x1b[90m*\x20Using\x20configured\x20AppCode:\x20','parse','max','name','must\x20be\x20a\x20JSON\x20object','join','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','Positional\x20arguments\x20are\x20no\x20longer\x20supported\x20for\x20`api\x20pull`.','doc','Pull\x20API\x20config\x20and\x20generate\x20documentation','api\x20','246642mAMgej','log','1097csqOQZ','unknownCommand','configMissing','string','\x0a\x20\x20rabetbase\x20api\x20—\x20API\x20Operations\x0a\x0a\x20\x20USAGE\x0a\x20\x20\x20\x20rabetbase\x20api\x20list\x20[options]\x0a\x20\x20\x20\x20rabetbase\x20api\x20pull\x20[options]\x0a\x20\x20\x20\x20rabetbase\x20api\x20doc\x20\x20[options]\x0a\x0a\x20\x20OPTIONS\x0a\x20\x20\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20Specify\x20app\x20code\x0a\x20\x20\x20\x20--output\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20Output\x20directory\x20(pull:\x20./src/api/,\x20doc:\x20./docs)\x0a\x20\x20\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Environment\x20(daily\x20/\x20production)\x0a\x20\x20\x20\x20--datasetcode\x20<codes>\x20Dataset\x20codes\x20for\x20doc\x20(comma-separated,\x20doc\x20only)\x0a\x20\x20\x20\x20--params\x20<json>\x20\x20\x20\x20\x20\x20\x20Extra\x20params\x20JSON\x20(doc\x20only)\x0a\x0a\x20\x20EXAMPLES\x0a\x20\x20\x20\x20rabetbase\x20api\x20list\x0a\x20\x20\x20\x20rabetbase\x20api\x20list\x20--appcode\x20myapp\x0a\x20\x20\x20\x20rabetbase\x20api\x20pull\x0a\x20\x20\x20\x20rabetbase\x20api\x20pull\x20--appcode\x20myapp\x20--output\x20./api\x0a\x20\x20\x20\x20rabetbase\x20api\x20doc\x20--datasetcode\x20ds_001,ds_002\x0a','No\x20models\x20found.','message','validation','help','appcode','\x20model(s)\x0a','min','Positional\x20arguments\x20are\x20no\x20longer\x20supported\x20for\x20`api\x20doc`.','env','key','params','45OXMZzJ','Key','20uBnrIE','15171630UnJuDq','padStart','Name','\x0a\x20\x20App:\x20','Invalid\x20--params:\x20','api','DatasetCode','length','Use:\x20rabetbase\x20api\x20doc\x20--appcode\x20'];a29_0xcd02=function(){return _0x42ab63;};return a29_0xcd02();}import{render}from'ink';import{ApiPullUI}from'../api/api-pull-ui.js';import{ApiDocUI}from'../api/api-doc-ui.js';import{fetchModelList}from'../api/fetch-model-list.js';import{getConfigAppCode}from'../utils/config.js';import{CliErrors}from'../errors.js';const API_HELP=a29_0x2159e9(0x1c8);export const apiCommand={'name':a29_0x2159e9(0x1dc),'description':a29_0x2159e9(0x1c0),async 'run'(_0x6d7bfc,_0x5099e1,_0x505b2c){const _0x4562f5=a29_0x2159e9,_0x30d7ec=_0x5099e1[0x0];if(_0x505b2c[_0x4562f5(0x1cc)]||!_0x30d7ec&&!_0x505b2c[_0x4562f5(0x1cc)]){console[_0x4562f5(0x1c3)](API_HELP);if(!_0x30d7ec&&!_0x505b2c[_0x4562f5(0x1cc)])throw CliErrors[_0x4562f5(0x1c5)](_0x4562f5(0x1b5));return;}if(_0x30d7ec==='list'){const _0x633c8f=getConfigAppCode(),_0x21e4ab=_0x505b2c['appcode']??_0x633c8f;if(!_0x21e4ab)throw CliErrors[_0x4562f5(0x1c6)](_0x4562f5(0x1e8));const {configArray:_0x15631d,count:_0x584021}=await fetchModelList(_0x21e4ab);if(_0x584021===0x0){console[_0x4562f5(0x1c3)](_0x4562f5(0x1c9));return;}const _0x33cb4f=Math[_0x4562f5(0x1cf)](0x28,Math[_0x4562f5(0x1b9)](0x4,..._0x15631d['map'](_0xa041e9=>_0xa041e9[_0x4562f5(0x1ba)][_0x4562f5(0x1de)]))),_0xee799f=Math[_0x4562f5(0x1cf)](0x24,Math[_0x4562f5(0x1b9)](0x3,..._0x15631d['map'](_0xa7cae7=>_0xa7cae7[_0x4562f5(0x1d2)][_0x4562f5(0x1de)]))),_0x3a8193=Math['min'](0x28,Math['max'](0x4,..._0x15631d['map'](_0x12447d=>_0x12447d['datasetCode']['length']))),_0x10d544=(_0x3afb7f,_0x17792f)=>_0x3afb7f[_0x4562f5(0x1b3)](0x0,_0x17792f)['padEnd'](_0x17792f),_0x36b217=(_0xfe821c,_0x4dd9e6,_0x3293fc,_0x3bf613)=>'\x20\x20'+String(_0xfe821c)[_0x4562f5(0x1d8)](0x6)+'\x20\x20'+_0x10d544(_0x4dd9e6,_0x33cb4f)+'\x20\x20'+_0x10d544(_0x3293fc,_0xee799f)+'\x20\x20'+_0x10d544(_0x3bf613,_0x3a8193);console[_0x4562f5(0x1c3)](_0x4562f5(0x1da)+_0x21e4ab+'\x20\x20|\x20\x20'+_0x584021+_0x4562f5(0x1ce)),console[_0x4562f5(0x1c3)](_0x36b217('ID',_0x4562f5(0x1d9),_0x4562f5(0x1d5),_0x4562f5(0x1dd))),console[_0x4562f5(0x1c3)]('\x20\x20'+'─'['repeat'](0x6)+'\x20\x20'+'─'[_0x4562f5(0x1b4)](_0x33cb4f)+'\x20\x20'+'─'[_0x4562f5(0x1b4)](_0xee799f)+'\x20\x20'+'─'[_0x4562f5(0x1b4)](_0x3a8193));for(const _0x37b3f8 of _0x15631d){console[_0x4562f5(0x1c3)](_0x36b217(_0x37b3f8['id'],_0x37b3f8[_0x4562f5(0x1ba)],_0x37b3f8[_0x4562f5(0x1d2)],_0x37b3f8['datasetCode']));}console[_0x4562f5(0x1c3)]();return;}if(_0x30d7ec==='pull'){if(_0x5099e1[0x1])throw CliErrors[_0x4562f5(0x1cb)](_0x4562f5(0x1be),_0x4562f5(0x1e4)+_0x5099e1[0x1]);const _0x392f4d=getConfigAppCode();let _0x2d3172=_0x505b2c['appcode'];const _0x5d7047=typeof _0x505b2c[_0x4562f5(0x1d1)]===_0x4562f5(0x1c7)?_0x505b2c['env']:undefined,_0x47672b=_0x505b2c[_0x4562f5(0x1b2)];if(!_0x2d3172&&!_0x392f4d)throw CliErrors[_0x4562f5(0x1c6)](_0x4562f5(0x1e8));_0x2d3172&&_0x392f4d&&_0x2d3172===_0x392f4d&&(console[_0x4562f5(0x1c3)]('\x1b[90m*\x20Using\x20configured\x20AppCode:\x20'+_0x2d3172+_0x4562f5(0x1b6)),_0x2d3172=undefined),render(a29_0x16ec08(ApiPullUI,{'appCode':_0x2d3172,'env':_0x5d7047,'output':_0x47672b}));}else{if(_0x30d7ec===_0x4562f5(0x1bf)){if(_0x5099e1[0x1])throw CliErrors['validation'](_0x4562f5(0x1d0),_0x4562f5(0x1df)+_0x5099e1[0x1]);const _0x5ac544=getConfigAppCode();let _0x431e60=_0x505b2c[_0x4562f5(0x1cd)];const _0x879ea2=typeof _0x505b2c[_0x4562f5(0x1d1)]==='string'?_0x505b2c[_0x4562f5(0x1d1)]:undefined,_0x135cd2=_0x505b2c[_0x4562f5(0x1b2)],_0x2ea43b=_0x505b2c[_0x4562f5(0x1d3)],_0x229eeb=_0x505b2c[_0x4562f5(0x1e9)];if(!_0x431e60&&!_0x5ac544)throw CliErrors[_0x4562f5(0x1c6)](_0x4562f5(0x1e8));_0x431e60&&_0x5ac544&&_0x431e60===_0x5ac544&&(console[_0x4562f5(0x1c3)](_0x4562f5(0x1b7)+_0x431e60+_0x4562f5(0x1b6)),_0x431e60=undefined);let _0x9d7614;if(_0x2ea43b)try{_0x9d7614=JSON[_0x4562f5(0x1b8)](_0x2ea43b);if(typeof _0x9d7614!=='object'||_0x9d7614===null||Array['isArray'](_0x9d7614))throw new Error(_0x4562f5(0x1bb));}catch(_0x1000a8){throw CliErrors[_0x4562f5(0x1cb)](_0x4562f5(0x1db)+(_0x1000a8 instanceof Error?_0x1000a8[_0x4562f5(0x1ca)]:String(_0x1000a8)),_0x4562f5(0x1bd));}let _0x57976d;if(_0x229eeb){const _0xf63c21=_0x229eeb[_0x4562f5(0x1ea)](',')['map'](_0x3b611a=>_0x3b611a[_0x4562f5(0x1e0)]())[_0x4562f5(0x1e2)](_0x204fba=>_0x204fba[_0x4562f5(0x1de)]>0x0);if(_0xf63c21[_0x4562f5(0x1de)]===0x0)throw CliErrors[_0x4562f5(0x1cb)]('--datasetcode\x20cannot\x20be\x20empty.');console[_0x4562f5(0x1c3)]('\x1b[90m*\x20Generating\x20docs\x20for:\x20'+_0xf63c21[_0x4562f5(0x1bc)](',\x20')+'\x1b[0m'),_0x57976d=_0xf63c21;}render(a29_0x16ec08(ApiDocUI,{'appCode':_0x431e60,'env':_0x879ea2,'output':_0x135cd2,'extraParams':_0x9d7614,'datasetCodes':_0x57976d}));}else{console[_0x4562f5(0x1c3)](API_HELP);throw CliErrors[_0x4562f5(0x1c5)](_0x4562f5(0x1c1)+_0x30d7ec);}}}};
@@ -1 +0,0 @@
1
- const a54_0x2e4dfc=a54_0x3f67;(function(_0x1fa7f3,_0x79631){const _0x2df97f=a54_0x3f67,_0x1f7bbd=_0x1fa7f3();while(!![]){try{const _0xad29aa=parseInt(_0x2df97f(0x1f3))/0x1*(parseInt(_0x2df97f(0x1ea))/0x2)+-parseInt(_0x2df97f(0x1e6))/0x3+parseInt(_0x2df97f(0x1e7))/0x4*(-parseInt(_0x2df97f(0x1fa))/0x5)+-parseInt(_0x2df97f(0x1fb))/0x6+parseInt(_0x2df97f(0x1fd))/0x7*(parseInt(_0x2df97f(0x1ed))/0x8)+-parseInt(_0x2df97f(0x1e9))/0x9+-parseInt(_0x2df97f(0x1f4))/0xa*(-parseInt(_0x2df97f(0x1f8))/0xb);if(_0xad29aa===_0x79631)break;else _0x1f7bbd['push'](_0x1f7bbd['shift']());}catch(_0x556af8){_0x1f7bbd['push'](_0x1f7bbd['shift']());}}}(a54_0x43fc,0xdb751));import{jsx as a54_0xea8d4a}from'react/jsx-runtime';import{render}from'ink';import{McpInstallUI}from'../mcp/McpInstallUI.js';function a54_0x43fc(){const _0x1cc73f=['../mcp/mcp-install-non-interactive.js','cursor','enableBffSave','1OzLRSo','300mBlEYH','mcpClaude','logger','info','873917lrlZul','length','166550IzBjfV','4859046VXaVwW','push','439376BSuCsL','mcp-install','mcpOther','1324113qWQDxU','24mBrTun','other','15233949YqkunI','556648WMxBKP','mcp','nonInteractive','176bRaJIa','install','claude'];a54_0x43fc=function(){return _0x1cc73f;};return a54_0x43fc();}function a54_0x3f67(_0x3f99d8,_0x9fe93a){_0x3f99d8=_0x3f99d8-0x1e5;const _0x43fcf2=a54_0x43fc();let _0x3f670a=_0x43fcf2[_0x3f99d8];return _0x3f670a;}import{mcpCommand as a54_0x521d1e}from'../mcp/main.js';export const mcpCommand={'name':a54_0x2e4dfc(0x1eb),'description':'Configure\x20MCP\x20(Model\x20Context\x20Protocol)',async 'run'(_0x31b782,_0x2c3c3c,_0x306ba6){const _0x1a91fb=a54_0x2e4dfc,_0x4aa17e=_0x2c3c3c[0x0];if(_0x4aa17e===_0x1a91fb(0x1ee)){const _0x3d47ef=[];if(_0x306ba6['mcpCursor']||_0x306ba6[_0x1a91fb(0x1f1)])_0x3d47ef[_0x1a91fb(0x1fc)](_0x1a91fb(0x1f1));if(_0x306ba6[_0x1a91fb(0x1f5)]||_0x306ba6[_0x1a91fb(0x1ef)])_0x3d47ef[_0x1a91fb(0x1fc)]('claude');if(_0x306ba6[_0x1a91fb(0x1e5)])_0x3d47ef[_0x1a91fb(0x1fc)](_0x1a91fb(0x1e8));_0x31b782[_0x1a91fb(0x1f6)][_0x1a91fb(0x1f7)](_0x1a91fb(0x1fe),'执行配置\x20MCP\x20命令',{'preselected':_0x3d47ef});if(_0x31b782[_0x1a91fb(0x1ec)]&&_0x3d47ef[_0x1a91fb(0x1f9)]>0x0){const {installMcpNonInteractive:_0x1f5dda}=await import(_0x1a91fb(0x1f0));await _0x1f5dda(_0x3d47ef,_0x306ba6[_0x1a91fb(0x1f2)]);}else render(a54_0xea8d4a(McpInstallUI,{'preselectedIDEs':_0x3d47ef,'enableBffSave':_0x306ba6[_0x1a91fb(0x1f2)]}));}else await a54_0x521d1e(_0x4aa17e,[],_0x306ba6);}};
@@ -1 +0,0 @@
1
- const a55_0x223cad=a55_0x5c85;(function(_0x27c9c4,_0x37a245){const _0x3e5a54=a55_0x5c85,_0x80694=_0x27c9c4();while(!![]){try{const _0x46b845=parseInt(_0x3e5a54(0x1a9))/0x1+parseInt(_0x3e5a54(0x1ab))/0x2+-parseInt(_0x3e5a54(0x1a3))/0x3*(parseInt(_0x3e5a54(0x1af))/0x4)+-parseInt(_0x3e5a54(0x1a5))/0x5*(-parseInt(_0x3e5a54(0x1aa))/0x6)+parseInt(_0x3e5a54(0x1a8))/0x7+-parseInt(_0x3e5a54(0x1ae))/0x8*(-parseInt(_0x3e5a54(0x19e))/0x9)+-parseInt(_0x3e5a54(0x1a0))/0xa*(parseInt(_0x3e5a54(0x19b))/0xb);if(_0x46b845===_0x37a245)break;else _0x80694['push'](_0x80694['shift']());}catch(_0x1c0c79){_0x80694['push'](_0x80694['shift']());}}}(a55_0x5cb7,0x22897));function a55_0x5c85(_0x4a2825,_0x2eeb84){_0x4a2825=_0x4a2825-0x19b;const _0x5cb724=a55_0x5cb7();let _0x5c8561=_0x5cb724[_0x4a2825];return _0x5c8561;}function a55_0x5cb7(){const _0x8687e8=['70101xVjvUI','menu-update-cdn','750azcZfV','menu-sync','cwd','6RLYZbh','info','121885mfYLxf','update','menu','941024WIapkT','136047CZpggk','12OpyqoN','487062dPrugW','setLogPath','执行更新菜单\x20CDN\x20资源命令','144DYJqOi','58456KffcmB','78067zqsrpF','Sync\x20menu\x20and\x20update\x20CDN\x20resources','logger'];a55_0x5cb7=function(){return _0x8687e8;};return a55_0x5cb7();}import{jsx as a55_0x236db7}from'react/jsx-runtime';import{render}from'ink';import{AppMenuSyncUI}from'../app-menu/app-menu-sync-ui.js';import{AppMenuUpdateCdn}from'../app-menu-update-cdn/main.js';export const menuCommand={'name':a55_0x223cad(0x1a7),'description':a55_0x223cad(0x19c),async 'run'(_0x3f114a,_0x2150db,_0x2f897b){const _0x55d8c4=a55_0x223cad,_0x2101e8=_0x2150db[0x0];_0x2101e8===_0x55d8c4(0x1a6)?(_0x3f114a[_0x55d8c4(0x19d)][_0x55d8c4(0x1ac)](process[_0x55d8c4(0x1a2)]()),_0x3f114a[_0x55d8c4(0x19d)][_0x55d8c4(0x1a4)](_0x55d8c4(0x19f),_0x55d8c4(0x1ad)),render(a55_0x236db7(AppMenuUpdateCdn,{}))):(_0x3f114a[_0x55d8c4(0x19d)][_0x55d8c4(0x1ac)](process['cwd']()),_0x3f114a['logger'][_0x55d8c4(0x1a4)](_0x55d8c4(0x1a1),'同步菜单命令'),render(a55_0x236db7(AppMenuSyncUI,{})));}};
@@ -1 +0,0 @@
1
- (function(_0x340ded,_0x39e78a){const _0x5b357a=a105_0x3492,_0x4ff5a2=_0x340ded();while(!![]){try{const _0x768f5a=-parseInt(_0x5b357a(0x164))/0x1*(-parseInt(_0x5b357a(0x14e))/0x2)+parseInt(_0x5b357a(0x15a))/0x3+parseInt(_0x5b357a(0x15c))/0x4*(parseInt(_0x5b357a(0x149))/0x5)+parseInt(_0x5b357a(0x143))/0x6+parseInt(_0x5b357a(0x165))/0x7+parseInt(_0x5b357a(0x15d))/0x8+-parseInt(_0x5b357a(0x14f))/0x9;if(_0x768f5a===_0x39e78a)break;else _0x4ff5a2['push'](_0x4ff5a2['shift']());}catch(_0xecd1d1){_0x4ff5a2['push'](_0x4ff5a2['shift']());}}}(a105_0x4136,0x5e445));import{jsx as a105_0x597211,jsxs as a105_0x1eee05,Fragment as a105_0x2ffb00}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';function a105_0x4136(){const _0x196d3f=['⚠️\x20Some\x20configurations\x20require\x20manual\x20steps','success','Configuring\x20MCP\x20server...','Configure\x20Lovrabet\x20MCP\x20Server','cyan','2168055ZFdESd','message','234788vrurBe','1492848OGEUXj','error','selectedIndexes','gray','status','return','Other\x20IDE\x20configuration\x20guide','419459hWGZeu','770042SDOVfV','other','needsManualAction','✗\x20Configuration\x20failed','name','manual','column','find','size','getSelectedIDEs','every','32892nRGBfR','setErrorMsg','yellow','configuring','green','Other\x20IDE','40DPmUUi','some','red','map','ide','2nwHnao','13749273Qbgpgw','from','done','Press\x20any\x20key\x20to\x20exit...','selecting','length'];a105_0x4136=function(){return _0x196d3f;};return a105_0x4136();}function a105_0x3492(_0x3066d3,_0x367871){_0x3066d3=_0x3066d3-0x13e;const _0x413621=a105_0x4136();let _0x349263=_0x413621[_0x3066d3];return _0x349263;}import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{installMcp}from'./mcp-installer.js';export function McpInstallUI({preselectedIDEs:preselectedIDEs=[],enableBffSave:_0x47a82a}){const _0x2f75c8=a105_0x3492,{exit:_0x2b3d2a}=useApp(),[_0x52090c,_0x4cb4b9]=useState('selecting'),[_0xa6f66,_0x115d21]=useState([]),[_0x52c976,_0x46cb8a]=useState([]),_0x96ebac=useMemo(()=>[...Array[_0x2f75c8(0x150)](MCP_IDES)[_0x2f75c8(0x14c)](_0x10862c=>({'key':_0x10862c,'name':IDE_CONFIGS[_0x10862c][_0x2f75c8(0x169)],'description':IDE_CONFIGS[_0x10862c]['description']})),{'key':_0x2f75c8(0x166),'name':_0x2f75c8(0x148),'description':_0x2f75c8(0x163)}],[]),_0x270fbe=useIDESelection({'ideList':_0x96ebac,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0xabe2bc=_0x2f75c8;preselectedIDEs[_0xabe2bc(0x154)]>0x0&&_0x270fbe[_0xabe2bc(0x15f)][_0xabe2bc(0x140)]>0x0&&_0x4d7b34();},[]),useInput((_0x3e5ecc,_0x304630)=>{const _0x4b0e66=_0x2f75c8;if(_0x52090c===_0x4b0e66(0x153)){if(_0x3e5ecc==='q'||_0x3e5ecc==='Q'){_0x2b3d2a();return;}if(_0x304630[_0x4b0e66(0x162)]){if(_0x270fbe[_0x4b0e66(0x15f)]['size']===0x0){_0x270fbe[_0x4b0e66(0x144)]('Please\x20select\x20at\x20least\x20one\x20IDE');return;}_0x4d7b34();return;}_0x270fbe['handleKeyDown'](_0x3e5ecc,_0x304630);}_0x52090c===_0x4b0e66(0x151)&&_0x2b3d2a();});async function _0x4d7b34(){const _0x21fcec=_0x2f75c8,_0x50b9e8=_0x270fbe[_0x21fcec(0x141)]();_0x115d21([{'label':'Selected\x20IDEs','value':''+_0x270fbe[_0x21fcec(0x15f)][_0x21fcec(0x140)]}]),_0x4cb4b9(_0x21fcec(0x146));const _0x1e5744=await installMcp(_0x50b9e8,_0x47a82a),_0x4f65e3=_0x1e5744[_0x21fcec(0x14c)](_0x4da6a6=>({'ide':_0x96ebac[_0x21fcec(0x13f)](_0x578452=>_0x578452['key']===_0x4da6a6[_0x21fcec(0x14d)])?.['name']||_0x4da6a6['ide'],'status':_0x4da6a6[_0x21fcec(0x167)]?_0x21fcec(0x16a):_0x4da6a6[_0x21fcec(0x156)]?_0x21fcec(0x156):_0x21fcec(0x15e),'message':_0x4da6a6[_0x21fcec(0x15b)]}));_0x46cb8a(_0x4f65e3),_0x4cb4b9(_0x21fcec(0x151)),setTimeout(()=>{_0x2b3d2a();},0x1388);}return a105_0x1eee05(Box,{'flexDirection':_0x2f75c8(0x13e),'marginTop':0x1,'children':[_0x52090c===_0x2f75c8(0x153)&&a105_0x597211(IDESelector,{'ideList':_0x96ebac,'title':_0x2f75c8(0x158),'selection':_0x270fbe}),_0x52090c===_0x2f75c8(0x146)&&a105_0x1eee05(a105_0x2ffb00,{'children':[_0xa6f66['map']((_0x117b51,_0x120cc6)=>a105_0x1eee05(Box,{'children':[a105_0x1eee05(Text,{'color':_0x2f75c8(0x147),'children':['√\x20',_0x117b51['label'],':\x20']}),a105_0x597211(Text,{'color':_0x2f75c8(0x159),'children':_0x117b51['value']})]},_0x120cc6)),a105_0x597211(Box,{'marginTop':0x1,'children':a105_0x597211(Text,{'children':_0x2f75c8(0x157)})})]}),_0x52090c==='done'&&a105_0x597211(DoneStep,{'configResults':_0x52c976})]});}function DoneStep({configResults:_0x18d606}){const _0x5f21b1=a105_0x3492,_0x47afc1=_0x18d606[_0x5f21b1(0x142)](_0xaba8cd=>_0xaba8cd[_0x5f21b1(0x161)]===_0x5f21b1(0x156)),_0x534242=_0x18d606[_0x5f21b1(0x14a)](_0x1bd4e8=>_0x1bd4e8[_0x5f21b1(0x161)]==='manual'),_0x129708=_0x18d606[_0x5f21b1(0x14a)](_0x41de2d=>_0x41de2d[_0x5f21b1(0x161)]===_0x5f21b1(0x15e));return a105_0x1eee05(Box,{'flexDirection':_0x5f21b1(0x13e),'children':[a105_0x597211(Box,{'marginTop':0x1,'marginBottom':0x1,'children':_0x47afc1?a105_0x597211(Text,{'color':_0x5f21b1(0x147),'bold':!![],'children':'✓\x20MCP\x20configuration\x20completed!'}):_0x534242?a105_0x597211(Text,{'color':_0x5f21b1(0x145),'bold':!![],'children':_0x5f21b1(0x155)}):_0x129708?a105_0x597211(Text,{'color':_0x5f21b1(0x14b),'bold':!![],'children':_0x5f21b1(0x168)}):a105_0x597211(Text,{'color':_0x5f21b1(0x145),'bold':!![],'children':'⚠️\x20Configuration\x20requires\x20manual\x20steps'})}),_0x18d606[_0x5f21b1(0x14c)]((_0x2c21f1,_0x3eb22a)=>{const _0x3fa30d=_0x5f21b1,_0x3ee556=_0x2c21f1['status']===_0x3fa30d(0x156),_0x5fa8f9=_0x2c21f1[_0x3fa30d(0x161)]===_0x3fa30d(0x16a);return a105_0x1eee05(Box,{'flexDirection':'column','marginBottom':0x1,'children':[a105_0x597211(Box,{'children':a105_0x1eee05(Text,{'bold':!![],'color':_0x3ee556?_0x3fa30d(0x147):_0x5fa8f9?_0x3fa30d(0x145):'red','children':[_0x3ee556?'✓\x20':_0x5fa8f9?'⚠️\x20':'✗\x20',_0x2c21f1[_0x3fa30d(0x14d)],':']})}),a105_0x597211(Box,{'paddingLeft':0x3,'flexDirection':_0x3fa30d(0x13e),'children':a105_0x597211(Text,{'color':'white','children':_0x2c21f1['message']})})]},_0x3eb22a);}),a105_0x597211(Box,{'marginTop':0x1,'children':a105_0x597211(Text,{'color':_0x5f21b1(0x160),'children':_0x5f21b1(0x152)})})]});}
package/lib/mcp/claude.js DELETED
@@ -1 +0,0 @@
1
- (function(_0x4586f7,_0xa8c79d){const _0x1b27ec=a106_0x4104,_0xd0f14c=_0x4586f7();while(!![]){try{const _0x1511e1=parseInt(_0x1b27ec(0x107))/0x1+-parseInt(_0x1b27ec(0x10e))/0x2*(parseInt(_0x1b27ec(0x10f))/0x3)+-parseInt(_0x1b27ec(0x111))/0x4+parseInt(_0x1b27ec(0x10d))/0x5+parseInt(_0x1b27ec(0x112))/0x6+parseInt(_0x1b27ec(0x113))/0x7+parseInt(_0x1b27ec(0x10c))/0x8*(parseInt(_0x1b27ec(0x108))/0x9);if(_0x1511e1===_0xa8c79d)break;else _0xd0f14c['push'](_0xd0f14c['shift']());}catch(_0x59a62e){_0xd0f14c['push'](_0xd0f14c['shift']());}}}(a106_0x3181,0x25684));import{configureClaudeMcp as a106_0x57244c}from'./mcp-installer.js';function a106_0x3181(){const _0x55658d=['exit','message','14790fNQGQL','9tMomxZ','\x0a📋\x20','\x0aError:\x20Configuration\x20failed\x20-\x20','cwd','605944ycwPNO','1373905kwQIiJ','2JtLIQx','843393MPMZeN','error','555960WnexIH','280542miynbS','1128890LEfbAz'];a106_0x3181=function(){return _0x55658d;};return a106_0x3181();}function a106_0x4104(_0x5c3eac,_0x524cab){_0x5c3eac=_0x5c3eac-0x105;const _0x3181e1=a106_0x3181();let _0x4104c9=_0x3181e1[_0x5c3eac];return _0x4104c9;}export async function configureClaudeMcp(){const _0x162601=a106_0x4104,_0x418074=process[_0x162601(0x10b)](),_0x4e84ef=a106_0x57244c(_0x418074);_0x4e84ef['success']?(console['log'](_0x162601(0x109)+_0x4e84ef[_0x162601(0x106)]+'\x0a'),process[_0x162601(0x105)](0x0)):(console[_0x162601(0x110)](_0x162601(0x10a)+_0x4e84ef[_0x162601(0x106)]+'\x0a'),process[_0x162601(0x105)](0x1));}
package/lib/mcp/cursor.js DELETED
@@ -1 +0,0 @@
1
- (function(_0x964331,_0x596c17){const _0xf4c5af=a107_0x5a19,_0x8ea506=_0x964331();while(!![]){try{const _0x3cbf9f=-parseInt(_0xf4c5af(0x135))/0x1+parseInt(_0xf4c5af(0x137))/0x2*(parseInt(_0xf4c5af(0x13e))/0x3)+parseInt(_0xf4c5af(0x131))/0x4+-parseInt(_0xf4c5af(0x13f))/0x5+-parseInt(_0xf4c5af(0x13c))/0x6*(parseInt(_0xf4c5af(0x134))/0x7)+parseInt(_0xf4c5af(0x133))/0x8+parseInt(_0xf4c5af(0x12c))/0x9*(-parseInt(_0xf4c5af(0x13b))/0xa);if(_0x3cbf9f===_0x596c17)break;else _0x8ea506['push'](_0x8ea506['shift']());}catch(_0x2411e4){_0x8ea506['push'](_0x8ea506['shift']());}}}(a107_0x280a,0x79043));import{configureCursorMcp as a107_0xac08ce}from'./mcp-installer.js';export async function configureCursorMcp(){const _0x1ef553=a107_0x5a19,_0xfeb086=process[_0x1ef553(0x130)](),_0x1a9920=await a107_0xac08ce(_0xfeb086);_0x1a9920[_0x1ef553(0x12e)]?(console[_0x1ef553(0x138)](_0x1ef553(0x132)),console[_0x1ef553(0x138)](_0x1ef553(0x13a)),console['log']('\x20\x20'+_0x1a9920['message']+'\x0a'),console[_0x1ef553(0x138)](_0x1ef553(0x139)),console[_0x1ef553(0x138)](_0x1ef553(0x13d)),process[_0x1ef553(0x136)](0x0)):(console[_0x1ef553(0x12f)](_0x1ef553(0x12d)+_0x1a9920['message']+'\x0a'),process[_0x1ef553(0x136)](0x1));}function a107_0x5a19(_0x236d81,_0x313db9){_0x236d81=_0x236d81-0x12c;const _0x280a33=a107_0x280a();let _0x5a19f4=_0x280a33[_0x236d81];return _0x5a19f4;}function a107_0x280a(){const _0x5a395b=['log','You\x20can\x20now\x20use\x20Lovrabet\x20dataset\x20MCP\x20tools\x20in\x20Cursor.','Configuration:','20YuwgWn','86898WYJLAG','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','3qXEHiI','414410zRvyaT','5239602uuDwKU','\x0aError:\x20Configuration\x20failed\x20-\x20','success','error','cwd','3882660uovPqw','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a','5287640kMrydk','133FheMfS','562563wdxpIb','exit','1898082udkqLN'];a107_0x280a=function(){return _0x5a395b;};return a107_0x280a();}
package/lib/mcp/main.js DELETED
@@ -1 +0,0 @@
1
- (function(_0x2a82f0,_0x17e1aa){const _0x4eb535=a108_0x4b44,_0x397f75=_0x2a82f0();while(!![]){try{const _0x158fbb=parseInt(_0x4eb535(0x120))/0x1*(-parseInt(_0x4eb535(0x12a))/0x2)+-parseInt(_0x4eb535(0x12f))/0x3*(parseInt(_0x4eb535(0x132))/0x4)+-parseInt(_0x4eb535(0x13b))/0x5*(parseInt(_0x4eb535(0x126))/0x6)+-parseInt(_0x4eb535(0x131))/0x7+parseInt(_0x4eb535(0x13a))/0x8*(parseInt(_0x4eb535(0x12c))/0x9)+-parseInt(_0x4eb535(0x130))/0xa*(parseInt(_0x4eb535(0x13f))/0xb)+parseInt(_0x4eb535(0x135))/0xc*(parseInt(_0x4eb535(0x123))/0xd);if(_0x158fbb===_0x17e1aa)break;else _0x397f75['push'](_0x397f75['shift']());}catch(_0x112fee){_0x397f75['push'](_0x397f75['shift']());}}}(a108_0x5928,0xeead1));function a108_0x4b44(_0xab441a,_0x34d738){_0xab441a=_0xab441a-0x11e;const _0x5928b0=a108_0x5928();let _0x4b4493=_0x5928b0[_0xab441a];return _0x4b4493;}import{installMcp}from'./mcp-installer.js';function a108_0x5928(){const _0x155a45=['446640pPDxfi','5570Dgpfwb','toLowerCase','\x20\x20rabetbase\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','mcpClaude','1037069OfMVgp','log','from','\x0aLovrabet\x20MCP\x20-\x20MCP\x20Server\x20Configuration\x20Tool\x0a\x0a\x20\x20rabetbase\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20help\x0a\x20\x20rabetbase\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Interactive\x20MCP\x20configuration\x0a\x20\x20rabetbase\x20mcp\x20install\x20--cursor\x20\x20\x20\x20Configure\x20Cursor\x20MCP\x20directly\x0a\x20\x20rabetbase\x20mcp\x20install\x20--claude\x20\x20\x20\x20Configure\x20Claude\x20Code\x20MCP\x20directly\x0a\x0aConfiguration\x20methods:\x0a\x20\x20\x20Interactive\x20selection\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Show\x20IDE\x20list\x20for\x20selection\x0a\x20\x20\x20\x20→\x20Enter\x20number\x20to\x20select\x20IDE\x0a\x20\x20Direct\x20IDE\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Use\x20--ide\x20flags\x0a\x20\x20\x20\x20$\x20rabetbase\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Configure\x20Cursor\x0a\x20\x20\x20\x20$\x20rabetbase\x20mcp\x20install\x20--claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Configure\x20Claude\x20Code\x0a\x0aSupported\x20IDEs:\x0a','\x0a\x0aExamples:\x0a\x20\x20$\x20rabetbase\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20Interactive\x20IDE\x20selection\x0a\x0a\x20\x20$\x20rabetbase\x20mcp\x20install\x20--cursor\x0a\x20\x20\x20\x20→\x20Configure\x20Cursor\x20MCP\x20(writes\x20.cursor/mcp.json)\x0a\x0aConfiguration\x20guide:\x0a\x20\x20https://open.lovrabet.com/en/docs/mcp/config-guide\x0a','exit','ide','5984awoiKv','name','help','39KEmEFt','cursor','error','6816ufDKbq','split','claude','success','274kjseRD','--help','108JaMInF','mcpCursor','message','18WlFWiU','120lCPnDY','8663984Tddezc','493364ozSeSZ','Error:\x20Unsupported\x20command:\x20','join','22008300oRutFV','needsManualAction','has','map','setLogPath'];a108_0x5928=function(){return _0x155a45;};return a108_0x5928();}import{logger}from'../utils/logger.js';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x201850,_0x53343c,_0x1a3285){const _0x12b901=a108_0x4b44;logger[_0x12b901(0x139)](process['cwd']());if(_0x1a3285?.[_0x12b901(0x122)]||_0x201850===_0x12b901(0x12b)){showHelp();return;}_0x201850!=='install'&&(console[_0x12b901(0x125)](_0x12b901(0x133)+(_0x201850||'-')),console[_0x12b901(0x140)]('\x0aAvailable\x20commands:'),console[_0x12b901(0x140)]('\x20\x20rabetbase\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20MCP\x20configuration'),console[_0x12b901(0x140)](_0x12b901(0x13d)),logger[_0x12b901(0x125)]('mcp',_0x12b901(0x133)+(_0x201850||'-')),process[_0x12b901(0x11e)](0x1));let _0x5a1760;if(_0x1a3285?.[_0x12b901(0x12d)])_0x5a1760=_0x12b901(0x124);else{if(_0x1a3285?.[_0x12b901(0x13e)])_0x5a1760=_0x12b901(0x128);else{if(_0x53343c?.[0x0]){const _0x4f6e4c=_0x53343c[0x0][_0x12b901(0x13c)]();MCP_IDES[_0x12b901(0x137)](_0x4f6e4c)&&(_0x5a1760=_0x4f6e4c);}}}const _0x28703a=_0x5a1760?[_0x5a1760]:[],_0x5f1c4c=await installMcp(_0x28703a,_0x1a3285?.['enableBffSave']);for(const _0x4e8ee4 of _0x5f1c4c){const _0x232cc3=IDE_CONFIGS[_0x4e8ee4['ide']]?.[_0x12b901(0x121)]||_0x4e8ee4[_0x12b901(0x11f)],_0x29e7ac=_0x4e8ee4[_0x12b901(0x136)]?'⚠️':_0x4e8ee4[_0x12b901(0x129)]?'✓':'✗',_0x4dbfe8=_0x4e8ee4[_0x12b901(0x129)]?console[_0x12b901(0x140)]:console[_0x12b901(0x125)];_0x4dbfe8(_0x29e7ac+'\x20'+_0x232cc3+':');const _0x3a9415=_0x4e8ee4[_0x12b901(0x12e)][_0x12b901(0x127)]('\x0a');for(const _0x32e5f8 of _0x3a9415){_0x4dbfe8('\x20\x20'+_0x32e5f8);}console[_0x12b901(0x140)]('');}}function showHelp(){const _0x986b5f=a108_0x4b44;console[_0x986b5f(0x140)](_0x986b5f(0x142)+Array[_0x986b5f(0x141)](MCP_IDES)[_0x986b5f(0x138)]((_0x312e68,_0x246d02)=>'\x20\x20'+(_0x246d02+0x1)+'.\x20'+IDE_CONFIGS[_0x312e68][_0x986b5f(0x121)]+'\x20-\x20'+IDE_CONFIGS[_0x312e68]['description'])[_0x986b5f(0x134)]('\x0a')+_0x986b5f(0x143));}
@@ -1 +0,0 @@
1
- function a109_0x129d(){const _0x4e1978=['log','cursor','463578GCrXOB','\x20succeeded)','932566sJmSSO','Claude\x20Code','message','cwd','6vSxKHy','error','5241388fGQUVD','Cursor','Start\x20configuring\x20MCP','info','⚠️\x20\x20Note:\x20Some\x20configurations\x20require\x20manual\x20commands,\x20please\x20follow\x20the\x20instructions\x20above','length','ide','mcp-install-non-interactive','\x0a✓\x20MCP\x20configuration\x20completed\x20(','some','9844794qIJGyW','1799235CVUXOQ','setLogPath','success','claude','11892608xXjtLi','1026851ssfwbp','needsManualAction','56wjcVEC'];a109_0x129d=function(){return _0x4e1978;};return a109_0x129d();}const a109_0xbc3819=a109_0xb74b;(function(_0x1f4363,_0x31eb49){const _0x38c17b=a109_0xb74b,_0x7cafb5=_0x1f4363();while(!![]){try{const _0x255182=-parseInt(_0x38c17b(0x1e2))/0x1+parseInt(_0x38c17b(0x1e9))/0x2*(-parseInt(_0x38c17b(0x1ed))/0x3)+parseInt(_0x38c17b(0x1ef))/0x4+-parseInt(_0x38c17b(0x1dd))/0x5+parseInt(_0x38c17b(0x1e7))/0x6*(-parseInt(_0x38c17b(0x1e4))/0x7)+parseInt(_0x38c17b(0x1e1))/0x8+parseInt(_0x38c17b(0x1dc))/0x9;if(_0x255182===_0x31eb49)break;else _0x7cafb5['push'](_0x7cafb5['shift']());}catch(_0x5d398f){_0x7cafb5['push'](_0x7cafb5['shift']());}}}(a109_0x129d,0xe8c4d));import{installMcp}from'./mcp-installer.js';import{logger}from'../utils/logger.js';function a109_0xb74b(_0x453c57,_0x41f2e0){_0x453c57=_0x453c57-0x1d4;const _0x129d58=a109_0x129d();let _0xb74b9=_0x129d58[_0x453c57];return _0xb74b9;}export async function installMcpNonInteractive(_0x29c47c,_0x322a66,_0x1ac6c7=process[a109_0xbc3819(0x1ec)]()){const _0xb7d470=a109_0xbc3819;logger[_0xb7d470(0x1de)](_0x1ac6c7),logger[_0xb7d470(0x1d5)](_0xb7d470(0x1d9),_0xb7d470(0x1d4),{'ides':_0x29c47c,'enableBffSave':_0x322a66});const _0x3ae31d=await installMcp(_0x29c47c,_0x322a66,_0x1ac6c7);for(const _0x10b4bf of _0x3ae31d){const _0x12d93c=_0x10b4bf[_0xb7d470(0x1d8)]===_0xb7d470(0x1e6)?_0xb7d470(0x1f0):_0x10b4bf[_0xb7d470(0x1d8)]===_0xb7d470(0x1e0)?_0xb7d470(0x1ea):'Other\x20IDE',_0x343285=_0x10b4bf['needsManualAction']?'⚠️':_0x10b4bf[_0xb7d470(0x1df)]?'✓':'✗',_0x31b3cd=_0x10b4bf[_0xb7d470(0x1df)]?console[_0xb7d470(0x1e5)]:console[_0xb7d470(0x1ee)];_0x31b3cd(_0x343285+'\x20'+_0x12d93c+':');const _0x36c767=_0x10b4bf[_0xb7d470(0x1eb)]['split']('\x0a');for(const _0x2a249b of _0x36c767){_0x31b3cd('\x20\x20'+_0x2a249b);}console[_0xb7d470(0x1e5)]('');}const _0x154e04=_0x3ae31d['filter'](_0x85bf9b=>_0x85bf9b[_0xb7d470(0x1df)])[_0xb7d470(0x1d7)];console['log'](_0xb7d470(0x1da)+_0x154e04+'/'+_0x3ae31d[_0xb7d470(0x1d7)]+_0xb7d470(0x1e8)),_0x3ae31d[_0xb7d470(0x1db)](_0x205775=>_0x205775[_0xb7d470(0x1e3)])?(console['log'](''),console[_0xb7d470(0x1e5)](_0xb7d470(0x1d6))):console['log']('');}
@@ -1 +0,0 @@
1
- const a110_0x95ea9=a110_0x476e;(function(_0x23a042,_0x2621d6){const _0x1b46e1=a110_0x476e,_0x50e98a=_0x23a042();while(!![]){try{const _0x445c6f=parseInt(_0x1b46e1(0x1c7))/0x1+parseInt(_0x1b46e1(0x1f4))/0x2*(-parseInt(_0x1b46e1(0x1de))/0x3)+-parseInt(_0x1b46e1(0x1cc))/0x4*(parseInt(_0x1b46e1(0x1f2))/0x5)+-parseInt(_0x1b46e1(0x1d6))/0x6+parseInt(_0x1b46e1(0x1cb))/0x7+-parseInt(_0x1b46e1(0x1f6))/0x8+parseInt(_0x1b46e1(0x1f3))/0x9;if(_0x445c6f===_0x2621d6)break;else _0x50e98a['push'](_0x50e98a['shift']());}catch(_0x5825fd){_0x50e98a['push'](_0x50e98a['shift']());}}}(a110_0x2a1c,0xa3239));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{normalizeEnv}from'../constant/env.js';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a110_0x476e(_0x378db4,_0x39a54f){_0x378db4=_0x378db4-0x1b8;const _0x2a1c9c=a110_0x2a1c();let _0x476ea7=_0x2a1c9c[_0x378db4];return _0x476ea7;}import{getRulesContent}from'../utils/rules-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME='lovrabet-dataset';export const MCP_COMMAND=a110_0x95ea9(0x1f1);export const MCP_ARGS=[a110_0x95ea9(0x1b9)];export function getAppConfig(){const _0x258320=a110_0x95ea9,_0x56dafe=readConfig(),_0x535bc1=_0x56dafe[_0x258320(0x1c1)]||_0x56dafe[_0x258320(0x1e6)],_0x4a8374=normalizeEnv(_0x56dafe[_0x258320(0x1bb)]||_0x258320(0x1dd));if(!_0x535bc1)throw new Error(_0x258320(0x1ec));return{'appcode':String(_0x535bc1),'env':_0x4a8374};}export function buildMcpEnv(_0x1df215,_0x2b9c42){const _0x138533=a110_0x95ea9,_0x574d38={'RABETBASE_APP_CODE':_0x1df215};return _0x2b9c42!==_0x138533(0x1dd)&&(_0x574d38['RABETBASE_ENV']=_0x2b9c42),_0x574d38;}export function buildMcpArgs(_0x4c4ad5){const _0x5f4252=a110_0x95ea9,_0x13a028=['@lovrabet/dataset-mcp-server@latest'];return _0x4c4ad5&&_0x13a028[_0x5f4252(0x1ed)](_0x5f4252(0x1c3)),_0x13a028;}export function buildMcpServerConfig(_0x56da6f,_0x3a0fa9,_0x5606c1){return{'command':MCP_COMMAND,'args':buildMcpArgs(_0x5606c1),'env':buildMcpEnv(_0x56da6f,_0x3a0fa9)};}export function buildClaudeMcpCommand(_0x21ffb7,_0x1de61c,_0x21f35f){const _0x29a581=a110_0x95ea9,_0x3b691e=buildMcpArgs(_0x21f35f),_0x4548f3=_0x29a581(0x1bc)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x3b691e['join']('\x20')+_0x29a581(0x1f0)+_0x21ffb7,_0x547350=_0x1de61c!=='production'?_0x29a581(0x1d2)+_0x1de61c:'';return''+_0x4548f3+_0x547350;}export async function copyCursorRules(_0x1a3a50){const _0x3ac122=a110_0x95ea9,_0x1828cb=join(_0x1a3a50,_0x3ac122(0x1ea)),_0x112e57=join(_0x1828cb,'rules'),_0x3d5c5b=join(_0x112e57,_0x3ac122(0x1da));if(existsSync(_0x3d5c5b))return logger[_0x3ac122(0x1db)](_0x3ac122(0x1d4),_0x3ac122(0x1cf),{'path':_0x3d5c5b}),![];try{ensureDir(_0x112e57);const _0xd1edf5=await getRulesContent();return writeFileSync(_0x3d5c5b,_0xd1edf5,_0x3ac122(0x1d1)),logger[_0x3ac122(0x1db)](_0x3ac122(0x1d4),_0x3ac122(0x1c4),{'to':_0x3d5c5b}),!![];}catch(_0x52885e){return logger[_0x3ac122(0x1ba)](_0x3ac122(0x1d4),'Failed\x20to\x20copy\x20Cursor\x20Rules\x20file',{'error':_0x52885e instanceof Error?_0x52885e[_0x3ac122(0x1ce)]:String(_0x52885e)}),![];}}export async function copyAgentsMd(_0x5e9fe3){const _0x2829d6=a110_0x95ea9,_0x4caccf=join(_0x5e9fe3,'agents.md');if(existsSync(_0x4caccf))return logger[_0x2829d6(0x1db)](_0x2829d6(0x1d4),_0x2829d6(0x1c2),{'path':_0x4caccf}),![];try{const _0x525cb3=await getRulesContent();return writeFileSync(_0x4caccf,_0x525cb3,_0x2829d6(0x1d1)),logger[_0x2829d6(0x1db)](_0x2829d6(0x1d4),_0x2829d6(0x1e0),{'to':_0x4caccf}),!![];}catch(_0x31c6a3){return logger[_0x2829d6(0x1ba)](_0x2829d6(0x1d4),_0x2829d6(0x1bf),{'error':_0x31c6a3 instanceof Error?_0x31c6a3['message']:String(_0x31c6a3)}),![];}}function a110_0x2a1c(){const _0x690bb1=['utf-8','\x20-e\x20RABETBASE_ENV=','--------------------------------','mcp-install','\x22RABETBASE_ENV\x22:\x20\x22','6118764OGzvez','AppCode:\x20','mcp.json','Other\x20IDE\x20configuration\x20guide\x20displayed','lovrabet_rules.mdc','info','mcpServers','production','7845ZMRUzH','claude','Create\x20agents.md\x20file','Environment:\x20','Restart\x20Claude\x20Code\x20to\x20take\x20effect','\x20\x20\x20\x20}','Create\x20new\x20mcp.json\x20config','needsManualAction','app','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','Configuration:\x20appcode=','\x0aError:\x20Configuration\x20failed\x20-\x20','.cursor','\x22RABETBASE_APP_CODE\x22:\x20\x22','No\x20appcode\x20found.\x20Run\x20\x27rabetbase\x20init\x27\x20to\x20initialize\x20project\x20config','push','stringify','Update\x20existing\x20mcp.json\x20config','\x20-e\x20RABETBASE_APP_CODE=','npx','35hXKTGs','2632257jCXDlC','488hswKof','mcp-cursor','2305472eYclJG','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20','success','join','Unknown\x20IDE:\x20','Written\x20.cursor/mcp.json','@lovrabet/dataset-mcp-server@latest','error','env','claude\x20mcp\x20add\x20','parse','Configuration\x20command\x20generated','Failed\x20to\x20copy\x20agents.md\x20file','cwd','appcode','agents.md\x20already\x20exists,\x20skipping','--enable-bff-save','Create\x20Cursor\x20Rules\x20file','Detailed\x20guide:\x20https://open.lovrabet.com/en/docs/mcp/config-guide','\x20\x20\x20\x20\x20\x20}','1318259aYmcLU','\x20\x20}','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:','9261854yGquGn','182628kGOUbf','utf8','message','Cursor\x20Rules\x20file\x20already\x20exists,\x20skipping','mcp-claude'];a110_0x2a1c=function(){return _0x690bb1;};return a110_0x2a1c();}export async function configureCursorMcp(_0x275c6b,_0x197291){const _0x2bcab2=a110_0x95ea9;try{const {appcode:_0x43ac8f,env:_0x305634}=getAppConfig(),_0xad543e=join(_0x275c6b,_0x2bcab2(0x1ea)),_0x3e9a3c=join(_0xad543e,_0x2bcab2(0x1d8));ensureDir(_0xad543e);const _0x3f66a5=buildMcpServerConfig(_0x43ac8f,_0x305634,_0x197291);let _0x55030e;if(existsSync(_0x3e9a3c)){const _0x3aa0ee=readFileSync(_0x3e9a3c,_0x2bcab2(0x1cd));_0x55030e=JSON[_0x2bcab2(0x1bd)](_0x3aa0ee),!_0x55030e['mcpServers']&&(_0x55030e[_0x2bcab2(0x1dc)]={}),logger['info'](_0x2bcab2(0x1f5),_0x2bcab2(0x1ef),{'path':_0x3e9a3c,'appcode':_0x43ac8f,'env':_0x305634});}else _0x55030e={'mcpServers':{}},logger[_0x2bcab2(0x1db)]('mcp-cursor',_0x2bcab2(0x1e4),{'path':_0x3e9a3c,'appcode':_0x43ac8f,'env':_0x305634});_0x55030e[_0x2bcab2(0x1dc)][MCP_SERVER_NAME]=_0x3f66a5,writeFileSync(_0x3e9a3c,JSON[_0x2bcab2(0x1ee)](_0x55030e,null,0x2),{'encoding':_0x2bcab2(0x1cd)});const _0x1c712f=await copyCursorRules(_0x275c6b),_0x19daa4=[_0x2bcab2(0x1b8),_0x2bcab2(0x1d7)+_0x43ac8f];return _0x305634!==_0x2bcab2(0x1dd)&&_0x19daa4[_0x2bcab2(0x1ed)](_0x2bcab2(0x1e1)+_0x305634),_0x19daa4[_0x2bcab2(0x1ed)](_0x2bcab2(0x1c9)),_0x1c712f&&_0x19daa4[_0x2bcab2(0x1ed)](_0x2bcab2(0x1c4)),logger[_0x2bcab2(0x1db)]('mcp-cursor','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a',{'appcode':_0x43ac8f,'env':_0x305634,'configPath':_0x3e9a3c}),{'success':!![],'message':_0x19daa4[_0x2bcab2(0x1f9)]('\x0a')};}catch(_0x311db4){return logger['error'](_0x2bcab2(0x1f5),_0x2bcab2(0x1e9)+(_0x311db4 instanceof Error?_0x311db4['message']:String(_0x311db4))+'\x0a',{'error':_0x311db4 instanceof Error?_0x311db4[_0x2bcab2(0x1ce)]:String(_0x311db4)}),{'success':![],'message':_0x311db4 instanceof Error?_0x311db4['message']:String(_0x311db4)};}}export function configureClaudeMcp(_0x488c2a,_0x1787c1){const _0x15b4ae=a110_0x95ea9;try{const {appcode:_0x23767c,env:_0xcbbd29}=getAppConfig();copyAgentsMd(_0x488c2a);const _0x1d2004=buildMcpArgs(_0x1787c1),_0x23a0c0=_0x15b4ae(0x1bc)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x1d2004[_0x15b4ae(0x1f9)]('\x20')+_0x15b4ae(0x1f0)+_0x23767c,_0xbbfd97=_0xcbbd29!==_0x15b4ae(0x1dd)?_0x15b4ae(0x1d2)+_0xcbbd29:'',_0x25be1f=''+_0x23a0c0+_0xbbfd97,_0x190500=[_0x15b4ae(0x1ca),_0x15b4ae(0x1d3),''+_0x25be1f,_0x15b4ae(0x1d3),'Configuration:',_0x15b4ae(0x1d7)+_0x23767c];return _0xcbbd29!==_0x15b4ae(0x1dd)&&_0x190500[_0x15b4ae(0x1ed)](_0x15b4ae(0x1e1)+_0xcbbd29),_0x190500['push'](_0x15b4ae(0x1e2)),logger[_0x15b4ae(0x1db)](_0x15b4ae(0x1d0),_0x15b4ae(0x1be),{'appcode':_0x23767c,'env':_0xcbbd29,'command':_0x25be1f}),{'success':!![],'message':_0x190500[_0x15b4ae(0x1f9)]('\x0a'),'needsManualAction':!![]};}catch(_0x2671e6){return logger[_0x15b4ae(0x1ba)](_0x15b4ae(0x1d0),_0x15b4ae(0x1e9)+(_0x2671e6 instanceof Error?_0x2671e6[_0x15b4ae(0x1ce)]:String(_0x2671e6))+'\x0a',{'error':_0x2671e6 instanceof Error?_0x2671e6[_0x15b4ae(0x1ce)]:String(_0x2671e6)}),{'success':![],'message':_0x2671e6 instanceof Error?_0x2671e6['message']:String(_0x2671e6)};}}export function showOtherMcpGuide(_0x431b90,_0x2c5f44){const _0x334b40=a110_0x95ea9;try{const {appcode:_0x2f5510,env:_0x3e6699}=getAppConfig(),_0x56ea8a=buildMcpServerConfig(_0x2f5510,_0x3e6699,_0x2c5f44),_0x126582=buildMcpArgs(_0x2c5f44),_0xa84436=[_0x334b40(0x1eb)+_0x2f5510+'\x22'];_0x3e6699!=='production'&&_0xa84436[_0x334b40(0x1ed)](_0x334b40(0x1d5)+_0x3e6699+'\x22');const _0x3c37dd=_0x3e6699!==_0x334b40(0x1dd)?',\x20env='+_0x3e6699:'',_0x57bb79=[_0x334b40(0x1e8)+_0x2f5510+_0x3c37dd,'{','\x20\x20\x22mcpServers\x22:\x20{','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{',_0x334b40(0x1e7),_0x334b40(0x1f7)+JSON[_0x334b40(0x1ee)](_0x126582)+',','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{',..._0xa84436['map'](_0xbc4260=>'\x20\x20\x20\x20\x20\x20\x20\x20'+_0xbc4260+','),_0x334b40(0x1c6),_0x334b40(0x1e3),_0x334b40(0x1c8),'}',_0x334b40(0x1c5)];return logger['info'](_0x334b40(0x1d4),_0x334b40(0x1d9),{'appcode':_0x2f5510,'env':_0x3e6699}),{'success':!![],'message':_0x57bb79[_0x334b40(0x1f9)]('\x0a'),'needsManualAction':!![]};}catch(_0x3085bd){return{'success':![],'message':_0x3085bd instanceof Error?_0x3085bd[_0x334b40(0x1ce)]:String(_0x3085bd)};}}function ensureDir(_0x355092){!existsSync(_0x355092)&&mkdirSync(_0x355092,{'recursive':!![]});}export async function installMcp(_0xfc8981,_0x4c16c3,_0x50558e=process[a110_0x95ea9(0x1c0)]()){const _0x1a9114=a110_0x95ea9,_0x11f600=[];for(const _0x1cce70 of _0xfc8981){try{let _0x338341;switch(_0x1cce70){case'cursor':_0x338341=await configureCursorMcp(_0x50558e,_0x4c16c3);break;case _0x1a9114(0x1df):_0x338341=configureClaudeMcp(_0x50558e,_0x4c16c3);break;case'other':_0x338341=showOtherMcpGuide(_0x50558e,_0x4c16c3);break;default:_0x338341={'success':![],'message':_0x1a9114(0x1fa)+_0x1cce70};}_0x11f600[_0x1a9114(0x1ed)]({'ide':_0x1cce70,'success':_0x338341[_0x1a9114(0x1f8)],'message':_0x338341[_0x1a9114(0x1ce)],'needsManualAction':_0x338341[_0x1a9114(0x1e5)]});}catch(_0x45ee92){_0x11f600[_0x1a9114(0x1ed)]({'ide':_0x1cce70,'success':![],'message':_0x45ee92 instanceof Error?_0x45ee92[_0x1a9114(0x1ce)]:String(_0x45ee92)});}}return _0x11f600;}
@@ -1 +0,0 @@
1
- (function(_0x51f2fc,_0x2a7aa2){const _0x549f20=a114_0x3892,_0x40f44d=_0x51f2fc();while(!![]){try{const _0xd527f9=-parseInt(_0x549f20(0x172))/0x1*(-parseInt(_0x549f20(0x16b))/0x2)+parseInt(_0x549f20(0x16c))/0x3+parseInt(_0x549f20(0x170))/0x4*(-parseInt(_0x549f20(0x16f))/0x5)+parseInt(_0x549f20(0x15b))/0x6*(-parseInt(_0x549f20(0x16e))/0x7)+-parseInt(_0x549f20(0x160))/0x8*(parseInt(_0x549f20(0x162))/0x9)+-parseInt(_0x549f20(0x167))/0xa+-parseInt(_0x549f20(0x16d))/0xb*(-parseInt(_0x549f20(0x169))/0xc);if(_0xd527f9===_0x2a7aa2)break;else _0x40f44d['push'](_0x40f44d['shift']());}catch(_0x279659){_0x40f44d['push'](_0x40f44d['shift']());}}}(a114_0xe1db,0x318cc));import{jsxs as a114_0x485a6e,jsx as a114_0x3cf895}from'react/jsx-runtime';import{Text,Box}from'ink';export function IDESelector({ideList:_0xbcd5c7,title:_0x5a5f48,selection:_0x2c07f0}){const _0x19e3d2=a114_0x3892,{selectedIndexes:_0x5595a0,highlightIndex:_0x54572e,errorMsg:_0x17e9a6}=_0x2c07f0;return a114_0x485a6e(Box,{'flexDirection':_0x19e3d2(0x15d),'marginTop':0x1,'children':[a114_0x3cf895(Box,{'children':a114_0x485a6e(Text,{'color':_0x19e3d2(0x173),'children':['*\x20',_0x5a5f48]})}),_0x17e9a6&&a114_0x3cf895(Box,{'marginTop':0x1,'children':a114_0x485a6e(Text,{'color':_0x19e3d2(0x15f),'children':['✗\x20',_0x17e9a6]})}),a114_0x485a6e(Box,{'marginTop':0x1,'flexDirection':_0x19e3d2(0x15d),'children':[a114_0x3cf895(Text,{'bold':!![],'children':_0x19e3d2(0x166)}),_0xbcd5c7['map']((_0x417768,_0x7a7dd6)=>{const _0x2cbf7c=_0x19e3d2,_0x4937d2=_0x54572e===_0x7a7dd6,_0x2a62d3=_0x5595a0[_0x2cbf7c(0x16a)](_0x7a7dd6);return a114_0x3cf895(Box,{'children':a114_0x485a6e(Text,{'backgroundColor':_0x4937d2?_0x2cbf7c(0x15c):undefined,'color':_0x4937d2?_0x2cbf7c(0x171):undefined,'children':['\x20\x20',_0x2a62d3?_0x2cbf7c(0x15e):_0x2cbf7c(0x168),'\x20',_0x417768['name'],'\x20',a114_0x485a6e(Text,{'color':_0x4937d2?_0x2cbf7c(0x171):_0x2cbf7c(0x165),'dimColor':!_0x4937d2,'children':['-\x20',_0x417768[_0x2cbf7c(0x164)]]})]})},_0x417768[_0x2cbf7c(0x161)]);}),a114_0x3cf895(Box,{'marginTop':0x1,'children':a114_0x3cf895(Text,{'color':_0x19e3d2(0x165),'children':_0x19e3d2(0x163)})})]})]});}export{useIDESelection}from'./useIDESelection.js';function a114_0x3892(_0x438f5f,_0x3cc8a9){_0x438f5f=_0x438f5f-0x15b;const _0xe1dbc5=a114_0xe1db();let _0x38922a=_0xe1dbc5[_0x438f5f];return _0x38922a;}function a114_0xe1db(){const _0x133b17=['cyan','6rPUiyp','blue','column','[✓]','red','952TvaPGb','key','9621QztCqq','\x20↑/↓:\x20Move\x20\x20Space:\x20Toggle\x20\x20a:\x20All\x20\x20i/r:\x20Invert\x20\x20q:\x20Quit\x20\x20Enter:\x20Confirm','description','gray','*\x20Select\x20IDEs\x20to\x20configure:','1442550rjwOBY','[\x20]','36CzYXJZ','has','5660EnHZUW','615954uiVmSm','2447907OHlrRy','1242647Rvxxwd','10SIBMMo','453292akJlMy','white','2JiYyhq'];a114_0xe1db=function(){return _0x133b17;};return a114_0xe1db();}
@@ -1 +0,0 @@
1
- function a115_0x339b(_0x4a0824,_0x6f8521){_0x4a0824=_0x4a0824-0xd6;const _0x3845ac=a115_0x3845();let _0x339b42=_0x3845ac[_0x4a0824];return _0x339b42;}(function(_0x557853,_0x52a453){const _0x70efe9=a115_0x339b,_0x3826ce=_0x557853();while(!![]){try{const _0x409376=-parseInt(_0x70efe9(0xe6))/0x1+parseInt(_0x70efe9(0xdb))/0x2+parseInt(_0x70efe9(0xd7))/0x3*(-parseInt(_0x70efe9(0xe5))/0x4)+parseInt(_0x70efe9(0xe9))/0x5*(parseInt(_0x70efe9(0xd8))/0x6)+parseInt(_0x70efe9(0xe1))/0x7*(parseInt(_0x70efe9(0xda))/0x8)+parseInt(_0x70efe9(0xdf))/0x9*(parseInt(_0x70efe9(0xdd))/0xa)+-parseInt(_0x70efe9(0xeb))/0xb*(parseInt(_0x70efe9(0xea))/0xc);if(_0x409376===_0x52a453)break;else _0x3826ce['push'](_0x3826ce['shift']());}catch(_0x48828d){_0x3826ce['push'](_0x3826ce['shift']());}}}(a115_0x3845,0x23255));import{useState,useCallback}from'react';export function useIDESelection({ideList:_0x4ffbde,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0x7537a2=a115_0x339b,[_0x193fc0,_0xf69840]=useState(new Set(preselectedIDEs['map'](_0x48f815=>_0x4ffbde['findIndex'](_0x2a693b=>_0x2a693b['key']===_0x48f815))[_0x7537a2(0xe7)](_0x985d6b=>_0x985d6b>=0x0))),[_0x4fd8d5,_0x4d219f]=useState(0x0),[_0x19da89,_0x39b8c8]=useState(''),_0x6f89e3=useCallback(()=>{const _0x1426d1=_0x7537a2;_0x4d219f(_0x2be264=>_0x2be264>0x0?_0x2be264-0x1:_0x4ffbde[_0x1426d1(0xe3)]-0x1);},[_0x4ffbde[_0x7537a2(0xe3)]]),_0x438e5b=useCallback(()=>{const _0x559637=_0x7537a2;_0x4d219f(_0x3b8d0c=>_0x3b8d0c<_0x4ffbde[_0x559637(0xe3)]-0x1?_0x3b8d0c+0x1:0x0);},[_0x4ffbde[_0x7537a2(0xe3)]]),_0x5ed646=useCallback(()=>{if(!multiSelect){_0xf69840(new Set([_0x4fd8d5]));return;}_0xf69840(_0x168448=>{const _0x595a9b=a115_0x339b,_0x8015db=new Set(_0x168448);return _0x8015db[_0x595a9b(0xe0)](_0x4fd8d5)?_0x8015db[_0x595a9b(0xd9)](_0x4fd8d5):_0x8015db[_0x595a9b(0xe2)](_0x4fd8d5),_0x8015db;});},[_0x4fd8d5,multiSelect]),_0x476f1f=useCallback(()=>{const _0x5531d5=_0x7537a2;_0xf69840(new Set(_0x4ffbde[_0x5531d5(0xde)]((_0x427e7e,_0x1f7ad2)=>_0x1f7ad2)));},[_0x4ffbde]),_0x217b9d=useCallback(()=>{_0xf69840(_0x48d44b=>{const _0x406927=a115_0x339b,_0x213ac4=new Set();for(let _0x47125e=0x0;_0x47125e<_0x4ffbde[_0x406927(0xe3)];_0x47125e++){!_0x48d44b[_0x406927(0xe0)](_0x47125e)&&_0x213ac4[_0x406927(0xe2)](_0x47125e);}return _0x213ac4;});},[_0x4ffbde]),_0x1a4590=useCallback(()=>{const _0x4aa206=_0x7537a2;return Array[_0x4aa206(0xe8)](_0x193fc0)['map'](_0x326c63=>_0x4ffbde[_0x326c63]?.[_0x4aa206(0xe4)])['filter'](_0x4b694a=>_0x4b694a!==undefined);},[_0x193fc0,_0x4ffbde]),_0x186d5b=useCallback(()=>{const _0x3a8acb=_0x7537a2;return _0x193fc0['size']===_0x4ffbde[_0x3a8acb(0xe3)];},[_0x193fc0,_0x4ffbde]),_0xd51217=useCallback((_0x263de6,_0x5e3a67)=>{const _0x4c6c11=_0x7537a2;if(_0x5e3a67[_0x4c6c11(0xdc)])return _0x6f89e3(),!![];if(_0x5e3a67[_0x4c6c11(0xd6)])return _0x438e5b(),!![];if(_0x263de6==='\x20')return _0x5ed646(),!![];if(_0x263de6==='a'||_0x263de6==='A')return _0x476f1f(),!![];if(_0x263de6==='i'||_0x263de6==='I'||_0x263de6==='r'||_0x263de6==='R')return _0x217b9d(),!![];return![];},[_0x6f89e3,_0x438e5b,_0x5ed646,_0x476f1f,_0x217b9d]);return{'selectedIndexes':_0x193fc0,'highlightIndex':_0x4fd8d5,'errorMsg':_0x19da89,'setErrorMsg':_0x39b8c8,'handleKeyDown':_0xd51217,'getSelectedIDEs':_0x1a4590,'isAllSelected':_0x186d5b,'toggleSelection':_0x5ed646,'selectAll':_0x476f1f,'invertSelection':_0x217b9d,'moveHighlightUp':_0x6f89e3,'moveHighlightDown':_0x438e5b};}function a115_0x3845(){const _0x359976=['map','9ohTkNx','has','70hbqQdd','add','length','key','9416UzGYiI','5665ATGCNg','filter','from','3470RaDVAG','4633404ZlGmRF','11PuWlvW','downArrow','66UzipYz','786VoLPjT','delete','218464fkpMcR','278360XxnILu','upArrow','843530mRzuno'];a115_0x3845=function(){return _0x359976;};return a115_0x3845();}