@univerjs-pro/mcp-ui 0.21.0 → 0.22.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.
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +11 -11
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x370a48=_0x8260;(function(_0x50ae81,_0x54327f){const _0x2fa4ed=_0x8260,_0x36c5ec=_0x50ae81();while(!![]){try{const _0x49faa8=-parseInt(_0x2fa4ed(0x20f))/0x1+-parseInt(_0x2fa4ed(0x241))/0x2*(-parseInt(_0x2fa4ed(0x251))/0x3)+-parseInt(_0x2fa4ed(0x27c))/0x4*(parseInt(_0x2fa4ed(0x307))/0x5)+-parseInt(_0x2fa4ed(0x302))/0x6*(parseInt(_0x2fa4ed(0x2cc))/0x7)+-parseInt(_0x2fa4ed(0x30b))/0x8+-parseInt(_0x2fa4ed(0x278))/0x9*(-parseInt(_0x2fa4ed(0x31f))/0xa)+parseInt(_0x2fa4ed(0x2bf))/0xb;if(_0x49faa8===_0x54327f)break;else _0x36c5ec['push'](_0x36c5ec['shift']());}catch(_0xd7e001){_0x36c5ec['push'](_0x36c5ec['shift']());}}}(_0x2d59,0x85dfd),Object['defineProperty'](exports,Symbol[_0x370a48(0x209)],{'value':_0x370a48(0x2a3)}));let _univerjs_core=require('@univerjs/core'),_univerjs_pro_mcp=require('@univerjs-pro/mcp'),_univerjs_design=require('@univerjs/design'),_univerjs_ui=require('@univerjs/ui'),rxjs=require('rxjs'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_network=require('@univerjs/network');function MCPConfigPanel(_0x207af3){const _0x46f832=_0x370a48;var _0x449e41,_0x2a6567;const {mcpCoreConfig:_0x1713d2,onSave:_0x5a93e5,loading:loading=![],config:_0x3facc8,connectionStatus$:_0x54d540,connectionError$:_0x642dab,currentApiKey$:_0x51a886,currentSessionId$:_0x5c3aa4}=_0x207af3,_0x4a0362=(0x0,_univerjs_ui[_0x46f832(0x255)])(_univerjs_core[_0x46f832(0x28c)]),_0x49964d=(0x0,_univerjs_ui[_0x46f832(0x282)])(_0x54d540,_univerjs_pro_mcp['MCPConnectionStatus'][_0x46f832(0x308)]),_0x1ac951=(0x0,_univerjs_ui[_0x46f832(0x282)])(_0x642dab,_univerjs_pro_mcp[_0x46f832(0x300)][_0x46f832(0x208)]),_0x1d4004=(0x0,_univerjs_ui[_0x46f832(0x282)])(_0x5c3aa4,''),[_0x20c3f7,_0x50bc33]=(0x0,react[_0x46f832(0x22c)])((0x0,_univerjs_ui['useObservable'])(_0x51a886,'')||''),_0x55f64b=!![],_0x323ee0=_0x3facc8[_0x46f832(0x344)]&&_0x1713d2[_0x46f832(0x211)]&&(_0x1713d2[_0x46f832(0x211)][_0x46f832(0x292)](_0x46f832(0x26c))||_0x1713d2[_0x46f832(0x211)][_0x46f832(0x292)](_0x46f832(0x249))),_0x5ef8f2=(_0x449e41=_0x1713d2['mcpServerUrl'])===null||_0x449e41===void 0x0?void 0x0:_0x449e41['includes']('univer.plus'),_0x2fe8b8=(_0x2a6567=_0x1713d2[_0x46f832(0x211)])===null||_0x2a6567===void 0x0?void 0x0:_0x2a6567['includes']('univer.ai'),_0x15e03b=_0x5ef8f2?_0x46f832(0x319):'https://console.univer.ai',_0x49ade8=_0x3facc8[_0x46f832(0x344)]&&(_0x5ef8f2||_0x2fe8b8),[_0x273614,_0x2f35be]=(0x0,react[_0x46f832(0x22c)])(!_0x20c3f7['trim']()),_0x56f908=(_0x2cf82f,_0x1ae5bb)=>{const _0x3bd652=_0x46f832;if(_0x1ae5bb===_univerjs_pro_mcp['MCPConnectionError'][_0x3bd652(0x23c)])return _0x3bd652(0x210);switch(_0x2cf82f){case _univerjs_pro_mcp[_0x3bd652(0x276)][_0x3bd652(0x2af)]:return'univer-text-green-600\x20univer-bg-green-50\x20univer-border-green-200';case _univerjs_pro_mcp[_0x3bd652(0x276)][_0x3bd652(0x23b)]:case _univerjs_pro_mcp[_0x3bd652(0x276)][_0x3bd652(0x336)]:return _0x3bd652(0x2b4);case _univerjs_pro_mcp[_0x3bd652(0x276)][_0x3bd652(0x2ad)]:return _0x3bd652(0x210);default:return _0x3bd652(0x2dd);}},_0x2985c8=(_0x458aed,_0x255b0a)=>{const _0x4fc756=_0x46f832;if(_0x255b0a===_univerjs_pro_mcp['MCPConnectionError']['UNAUTHORIZED'])return _0x4fc756(0x262);switch(_0x458aed){case _univerjs_pro_mcp[_0x4fc756(0x276)][_0x4fc756(0x2af)]:return _0x4fc756(0x29f);case _univerjs_pro_mcp['MCPConnectionStatus'][_0x4fc756(0x23b)]:case _univerjs_pro_mcp[_0x4fc756(0x276)]['RETRYING']:return _0x4fc756(0x271);case _univerjs_pro_mcp[_0x4fc756(0x276)][_0x4fc756(0x2ad)]:return _0x4fc756(0x262);default:return _0x4fc756(0x21f);}},_0x248e9=_0x3cffaf=>{const _0x4c0e2d=_0x46f832;switch(_0x3cffaf){case _univerjs_pro_mcp[_0x4c0e2d(0x276)][_0x4c0e2d(0x2af)]:return _0x4a0362['t']('mcpConfig.connectionStatus.connected');case _univerjs_pro_mcp[_0x4c0e2d(0x276)][_0x4c0e2d(0x23b)]:return _0x4a0362['t'](_0x4c0e2d(0x2ef));case _univerjs_pro_mcp[_0x4c0e2d(0x276)]['FAILED']:return _0x4a0362['t'](_0x4c0e2d(0x264));case _univerjs_pro_mcp['MCPConnectionStatus'][_0x4c0e2d(0x336)]:return _0x4a0362['t'](_0x4c0e2d(0x216));default:return _0x4a0362['t']('mcpConfig.connectionStatus.disconnected');}},_0x4cd1f6=_0xe5c498=>{const _0x4deb6b=_0x46f832;switch(_0xe5c498){case _univerjs_pro_mcp[_0x4deb6b(0x300)][_0x4deb6b(0x23c)]:return _0x4a0362['t']('mcpConfig.connectionError.unauthorized');case _univerjs_pro_mcp[_0x4deb6b(0x300)][_0x4deb6b(0x346)]:return _0x4a0362['t']('mcpConfig.connectionError.sessionOccupied');case _univerjs_pro_mcp['MCPConnectionError'][_0x4deb6b(0x31e)]:return _0x4a0362['t']('mcpConfig.connectionError.networkError');case _univerjs_pro_mcp[_0x4deb6b(0x300)][_0x4deb6b(0x27b)]:return _0x4a0362['t']('mcpConfig.connectionError.maxRetriesExceeded');default:return'';}},_0x439faf=(0x0,react[_0x46f832(0x2cd)])(()=>{const _0x434a8b=_0x46f832;_0x5a93e5({..._0x1713d2,'apiKey':_0x20c3f7[_0x434a8b(0x222)](),'enableAuth':_0x55f64b});},[_0x1713d2,_0x20c3f7,_0x55f64b,_0x5a93e5]),_0x1832f5=_0x20c3f7['trim']()[_0x46f832(0x32b)]>0x0;return(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':'univer-flex\x20univer-max-h-[80vh]\x20univer-min-h-[320px]\x20univer-flex-col','children':[(0x0,react_jsx_runtime['jsx'])('div',{'className':_0x46f832(0x334),'children':(0x0,react_jsx_runtime['jsxs'])('div',{'className':_0x46f832(0x289),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x311),'children':(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'className':'univer-text-white','children':'⚙'})}),(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'children':(0x0,react_jsx_runtime[_0x46f832(0x33e)])('p',{'className':_0x46f832(0x316),'children':_0x4a0362['t'](_0x46f832(0x288))})})]})}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x243),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':(0x0,_univerjs_design[_0x46f832(0x2bc)])(_0x46f832(0x1fe),_0x56f908(_0x49964d,_0x1ac951)),'children':(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x2a6),'children':[(0x0,react_jsx_runtime['jsx'])('div',{'className':(0x0,_univerjs_design[_0x46f832(0x2bc)])(_0x46f832(0x2a7),_0x2985c8(_0x49964d,_0x1ac951))}),(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'className':_0x46f832(0x296),'children':_0x248e9(_0x49964d)})]})}),_0x1ac951!==_univerjs_pro_mcp[_0x46f832(0x300)][_0x46f832(0x208)]&&(_0x49964d===_univerjs_pro_mcp[_0x46f832(0x276)]['FAILED']||_0x1ac951===_univerjs_pro_mcp[_0x46f832(0x300)][_0x46f832(0x23c)])&&(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x234),'children':(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x228),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'className':'univer-shrink-0\x20univer-text-red-500','children':'⚠️'}),(0x0,react_jsx_runtime['jsx'])('p',{'className':_0x46f832(0x26b),'children':_0x4cd1f6(_0x1ac951)})]})})]}),(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x2f5),'children':(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x2a5),'children':[(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x220),'children':[(0x0,react_jsx_runtime['jsxs'])(_0x46f832(0x21c),{'className':'univer-flex\x20univer-items-center\x20univer-gap-2\x20univer-text-sm\x20univer-font-medium\x20univer-text-gray-700','children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'children':'🔑'}),'\x20',_0x4a0362['t'](_0x46f832(0x242)),(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'className':_0x46f832(0x291),'children':'*'}),_0x323ee0&&(0x0,react_jsx_runtime['jsx'])('a',{'className':_0x46f832(0x229),'title':_0x4a0362['t'](_0x46f832(0x225)),'role':_0x46f832(0x2d9),'onClick':()=>_0x2f35be(!![]),'children':(0x0,react_jsx_runtime['jsx'])(_univerjs_icons['HelpIcon'],{})})]}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x46f832(0x2e1)],{'type':_0x46f832(0x31c),'placeholder':_0x4a0362['t'](_0x46f832(0x2b3)),'value':_0x20c3f7,'disabled':loading,'autoComplete':_0x46f832(0x21e),'onChange':_0x50bc33}),(0x0,react_jsx_runtime['jsx'])('p',{'className':_0x46f832(0x223),'children':_0x4a0362['t'](_0x46f832(0x25e))})]}),_0x323ee0&&_0x273614&&(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':'univer-relative\x20univer-rounded-lg\x20univer-border\x20univer-border-blue-200\x20univer-bg-gradient-to-r\x20univer-from-blue-50\x20univer-to-indigo-50\x20univer-p-4','children':[(0x0,react_jsx_runtime['jsx'])('a',{'className':_0x46f832(0x2ac),'role':_0x46f832(0x2d9),'onClick':()=>_0x2f35be(![]),'children':(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_univerjs_icons[_0x46f832(0x348)],{'className':_0x46f832(0x24d)})}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x256),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x244),'children':(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'className':_0x46f832(0x325),'children':'🚀'})}),(0x0,react_jsx_runtime[_0x46f832(0x212)])('div',{'className':_0x46f832(0x261),'children':[(0x0,react_jsx_runtime['jsx'])('h4',{'className':'univer-mb-2\x20univer-text-sm\x20univer-font-semibold\x20univer-text-gray-800','children':_0x4a0362['t'](_0x46f832(0x225))}),(0x0,react_jsx_runtime[_0x46f832(0x33e)])('p',{'className':_0x46f832(0x34b),'children':_0x4a0362['t']('mcpConfig.apiApplyInfo.description')}),(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x290),'children':_0x49ade8&&(0x0,react_jsx_runtime[_0x46f832(0x212)])('a',{'className':'univer-inline-flex\x20univer-items-center\x20univer-gap-1\x20univer-rounded-md\x20univer-border\x20univer-border-purple-300\x20univer-bg-white\x20univer-px-3\x20univer-py-1.5\x20univer-text-xs\x20univer-font-medium\x20univer-text-purple-600\x20univer-shadow-sm\x20univer-transition-all\x20univer-duration-200\x20hover:univer-border-purple-400\x20hover:univer-bg-purple-50\x20hover:univer-shadow-md','href':_0x15e03b,'target':_0x46f832(0x32a),'rel':'noopener\x20noreferrer','children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])('span',{'children':'🤖'}),_0x4a0362['t'](_0x46f832(0x293)),(0x0,react_jsx_runtime['jsx'])(_0x46f832(0x29b),{'className':_0x46f832(0x32c),'children':'↗'})]})}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':'univer-mt-2\x20univer-text-xs\x20univer-text-gray-500','children':['✨','\x20',_0x4a0362['t'](_0x46f832(0x22b))]})]})]})]}),_0x3facc8[_0x46f832(0x344)]&&(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x1fd),'children':[(0x0,react_jsx_runtime[_0x46f832(0x212)])('h4',{'className':_0x46f832(0x310),'children':[(0x0,react_jsx_runtime['jsx'])(_0x46f832(0x29b),{'children':'🔗'}),'\x20',_0x4a0362['t'](_0x46f832(0x24a))]}),(0x0,react_jsx_runtime['jsxs'])(_0x46f832(0x23d),{'className':_0x46f832(0x317),'children':[(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':'univer-space-y-3','children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])('p',{'className':_0x46f832(0x2c5),'children':_0x4a0362['t'](_0x46f832(0x2c1))}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x220),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x30f),'children':_0x4a0362['t'](_0x46f832(0x1f2))}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x20b),'children':[(0x0,react_jsx_runtime['jsxs'])('div',{'className':_0x46f832(0x2a6),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'className':'univer-flex\x20univer-size-4\x20univer-items-center\x20univer-justify-center\x20univer-rounded-full\x20univer-bg-blue-100\x20univer-text-xs\x20univer-font-medium\x20univer-text-blue-600','children':'1'}),_0x4a0362['t'](_0x46f832(0x2eb))]}),(0x0,react_jsx_runtime['jsxs'])('div',{'className':'univer-flex\x20univer-items-center\x20univer-gap-2','children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])('span',{'className':_0x46f832(0x324),'children':'2'}),_0x4a0362['t'](_0x46f832(0x2fc))]}),(0x0,react_jsx_runtime['jsxs'])(_0x46f832(0x23d),{'className':_0x46f832(0x2a6),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'className':'univer-flex\x20univer-size-4\x20univer-items-center\x20univer-justify-center\x20univer-rounded-full\x20univer-bg-blue-100\x20univer-text-xs\x20univer-font-medium\x20univer-text-blue-600','children':'3'}),_0x4a0362['t'](_0x46f832(0x32d))]})]})]})]}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':'univer-space-y-2','children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])('div',{'className':_0x46f832(0x30f),'children':'MCP\x20Configuration'}),(0x0,react_jsx_runtime[_0x46f832(0x33e)])('div',{'className':_0x46f832(0x23e),'children':(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x207),{'className':_0x46f832(0x2f3),'children':JSON[_0x46f832(0x2ce)]({'mcpServers':{'univer':{'url':'https://mcp.univer.ai/mcp/?univer_session_id='+(_0x1d4004||_0x46f832(0x342)),'type':_0x46f832(0x341),'headers':{'Authorization':_0x46f832(0x215)+(_0x20c3f7||_0x46f832(0x2ba))}}}},null,0x2)})})]}),(0x0,react_jsx_runtime['jsxs'])(_0x46f832(0x23d),{'className':_0x46f832(0x2d0),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x30f),'children':_0x4a0362['t'](_0x46f832(0x345))}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x220),'children':[(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x2ec),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x245)}),(0x0,react_jsx_runtime[_0x46f832(0x212)])('div',{'className':'univer-min-w-0\x20univer-flex-1','children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':_0x46f832(0x1ed),'children':_0x46f832(0x2e2)}),(0x0,react_jsx_runtime['jsx'])(_0x46f832(0x23d),{'className':_0x46f832(0x223),'children':_0x4a0362['t'](_0x46f832(0x33f))})]})]}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x2ec),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x23d),{'className':'univer-mt-1.5\x20univer-size-2\x20univer-shrink-0\x20univer-rounded-full\x20univer-bg-blue-500'}),(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x23d),{'className':_0x46f832(0x265),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])('div',{'className':_0x46f832(0x1ed),'children':_0x46f832(0x295)}),(0x0,react_jsx_runtime['jsx'])(_0x46f832(0x23d),{'className':_0x46f832(0x223),'children':_0x4a0362['t']('mcpConfig.authorizationDescription')})]})]})]})]})]})]}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x46f832(0x298)],{'onClick':_0x439faf,'disabled':!_0x1832f5||loading,'className':'univer-w-full\x20!univer-border-green-600\x20!univer-bg-green-600\x20!univer-text-white\x20hover:!univer-border-green-700\x20hover:!univer-bg-green-700\x20disabled:!univer-border-gray-300\x20disabled:!univer-bg-gray-300\x20disabled:!univer-text-gray-500','children':loading?(0x0,react_jsx_runtime['jsxs'])(_0x46f832(0x29b),{'className':'univer-flex\x20univer-items-center\x20univer-gap-2','children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'children':'⟲'}),_0x4a0362['t']('mcpConfig.saving')]}):(0x0,react_jsx_runtime[_0x46f832(0x212)])(_0x46f832(0x29b),{'className':_0x46f832(0x2a6),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_univerjs_icons[_0x46f832(0x2c2)],{}),_0x4a0362['t'](_0x46f832(0x343))]})}),(0x0,react_jsx_runtime['jsx'])('div',{'className':_0x46f832(0x2b6),'children':(0x0,react_jsx_runtime['jsxs'])(_0x46f832(0x23d),{'className':_0x46f832(0x22d),'children':[(0x0,react_jsx_runtime[_0x46f832(0x33e)])(_0x46f832(0x29b),{'className':'univer-shrink-0\x20univer-text-blue-500','children':'💡'}),(0x0,react_jsx_runtime[_0x46f832(0x212)])('div',{'className':'univer-space-y-1\x20univer-text-xs\x20univer-text-blue-700','children':[(0x0,react_jsx_runtime['jsx'])('div',{'className':_0x46f832(0x1f1),'children':_0x46f832(0x283)}),(0x0,react_jsx_runtime['jsxs'])(_0x46f832(0x23d),{'children':['•',_0x4a0362['t'](_0x46f832(0x2e9))]}),(0x0,react_jsx_runtime['jsxs'])('div',{'children':['•',_0x4a0362['t'](_0x46f832(0x309))]})]})]})})]})})]});}const MCP_UI_PLUGIN_CONFIG_KEY=_0x370a48(0x263),configSymbol=Symbol(MCP_UI_PLUGIN_CONFIG_KEY),defaultPluginConfig={'showDeveloperTools':![],'showStatus':!![]};function _typeof(_0x17baf2){'@babel/helpers - typeof';const _0x5c330a=_0x370a48;return _typeof=_0x5c330a(0x304)==typeof Symbol&&'symbol'==typeof Symbol['iterator']?function(_0x1f2bbc){return typeof _0x1f2bbc;}:function(_0x515b79){const _0x2163dc=_0x5c330a;return _0x515b79&&_0x2163dc(0x304)==typeof Symbol&&_0x515b79[_0x2163dc(0x2d3)]===Symbol&&_0x515b79!==Symbol['prototype']?'symbol':typeof _0x515b79;},_typeof(_0x17baf2);}function toPrimitive(_0x29daaf,_0x277441){const _0x26081a=_0x370a48;if('object'!=_typeof(_0x29daaf)||!_0x29daaf)return _0x29daaf;var _0x47108e=_0x29daaf[Symbol[_0x26081a(0x27f)]];if(void 0x0!==_0x47108e){var _0x5aa63a=_0x47108e['call'](_0x29daaf,_0x277441||_0x26081a(0x201));if(_0x26081a(0x2cb)!=_typeof(_0x5aa63a))return _0x5aa63a;throw new TypeError(_0x26081a(0x31b));}return(_0x26081a(0x2a8)===_0x277441?String:Number)(_0x29daaf);}function toPropertyKey(_0x3489f9){const _0x33b617=_0x370a48;var _0x221a01=toPrimitive(_0x3489f9,_0x33b617(0x2a8));return _0x33b617(0x301)==_typeof(_0x221a01)?_0x221a01:_0x221a01+'';}function _0x8260(_0x594d59,_0x31cb4e){_0x594d59=_0x594d59-0x1ec;const _0x2d59b0=_0x2d59();let _0x8260e0=_0x2d59b0[_0x594d59];return _0x8260e0;}function _defineProperty(_0x3a4035,_0x18604b,_0x5aad3b){return(_0x18604b=toPropertyKey(_0x18604b))in _0x3a4035?Object['defineProperty'](_0x3a4035,_0x18604b,{'value':_0x5aad3b,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3a4035[_0x18604b]=_0x5aad3b,_0x3a4035;}function __decorateParam(_0x16cc39,_0x468631){return function(_0x34ca30,_0x5680e2){_0x468631(_0x34ca30,_0x5680e2,_0x16cc39);};}function __decorate(_0x2476ac,_0x3a2595,_0x2afb47,_0x518f50){const _0x2ab298=_0x370a48;var _0x579a35=arguments[_0x2ab298(0x32b)],_0x47c99e=_0x579a35<0x3?_0x3a2595:_0x518f50===null?_0x518f50=Object[_0x2ab298(0x328)](_0x3a2595,_0x2afb47):_0x518f50,_0x39441e;if(typeof Reflect==='object'&&typeof Reflect[_0x2ab298(0x2a2)]===_0x2ab298(0x304))_0x47c99e=Reflect[_0x2ab298(0x2a2)](_0x2476ac,_0x3a2595,_0x2afb47,_0x518f50);else{for(var _0x8cd1da=_0x2476ac[_0x2ab298(0x32b)]-0x1;_0x8cd1da>=0x0;_0x8cd1da--)if(_0x39441e=_0x2476ac[_0x8cd1da])_0x47c99e=(_0x579a35<0x3?_0x39441e(_0x47c99e):_0x579a35>0x3?_0x39441e(_0x3a2595,_0x2afb47,_0x47c99e):_0x39441e(_0x3a2595,_0x2afb47))||_0x47c99e;}return _0x579a35>0x3&&_0x47c99e&&Object[_0x2ab298(0x238)](_0x3a2595,_0x2afb47,_0x47c99e),_0x47c99e;}const MCP_API_KEY_STORAGE_KEY=_0x370a48(0x268),MCP_CONFIG_DIALOG_ID=_0x370a48(0x280);let MCPConfigUIController=class MCPConfigUIController extends _univerjs_core['Disposable']{constructor(_0x34c558,_0x276e45,_0x23eeb3,_0x4fe8bc,_0x4e1bc1,_0x24d2a2,_0x5ae92b,_0x4a842b,_0x17901b,_0x4012da){const _0x265bd7=_0x370a48;super(),this['_injector']=_0x34c558,this['_uiPartsService']=_0x276e45,this[_0x265bd7(0x266)]=_0x23eeb3,this[_0x265bd7(0x30d)]=_0x4fe8bc,this[_0x265bd7(0x27e)]=_0x4e1bc1,this[_0x265bd7(0x2d2)]=_0x24d2a2,this['_componentManager']=_0x5ae92b,this[_0x265bd7(0x24e)]=_0x4a842b,this[_0x265bd7(0x2fa)]=_0x17901b,this[_0x265bd7(0x312)]=_0x4012da,_defineProperty(this,_0x265bd7(0x284),new rxjs[(_0x265bd7(0x2c3))](![])),_defineProperty(this,'_mcpCoreConfig$',new rxjs[(_0x265bd7(0x2c3))]({})),_defineProperty(this,_0x265bd7(0x29c),new rxjs['BehaviorSubject']({})),_defineProperty(this,_0x265bd7(0x200),new rxjs['BehaviorSubject']('')),_defineProperty(this,_0x265bd7(0x318),async _0x2982c3=>{const _0x2cad80=_0x265bd7;this[_0x2cad80(0x284)][_0x2cad80(0x2f6)](!![]);try{var _0x186ec0,_0xeb0cfe;const _0x3cfed7=await this[_0x2cad80(0x2de)](_0x2982c3);if(!_0x3cfed7[_0x2cad80(0x321)]){this[_0x2cad80(0x2d2)][_0x2cad80(0x257)]({'type':_univerjs_design[_0x2cad80(0x1fa)][_0x2cad80(0x2db)],'content':_0x3cfed7[_0x2cad80(0x1f4)]||this[_0x2cad80(0x24e)]['t']('mcpConfig.validation.invalidConfig')});return;}if(_0x2982c3[_0x2cad80(0x204)])await this[_0x2cad80(0x30d)]['setItem'](MCP_API_KEY_STORAGE_KEY,_0x2982c3[_0x2cad80(0x204)][_0x2cad80(0x222)]());else await this[_0x2cad80(0x30d)]['removeItem'](MCP_API_KEY_STORAGE_KEY);this[_0x2cad80(0x200)][_0x2cad80(0x2f6)](((_0x186ec0=_0x2982c3[_0x2cad80(0x204)])===null||_0x186ec0===void 0x0?void 0x0:_0x186ec0[_0x2cad80(0x222)]())||''),this['_mcpConnectionController'][_0x2cad80(0x2cf)]({'Authorization':_0x2cad80(0x215)+((_0xeb0cfe=_0x2982c3[_0x2cad80(0x204)])===null||_0xeb0cfe===void 0x0?void 0x0:_0xeb0cfe['trim']())}),this[_0x2cad80(0x2d2)][_0x2cad80(0x257)]({'type':_univerjs_design[_0x2cad80(0x1fa)][_0x2cad80(0x2ed)],'content':this[_0x2cad80(0x24e)]['t']('mcpConfig.configSaved')}),setTimeout(()=>{const _0x36e55f=_0x2cad80;this[_0x36e55f(0x27e)][_0x36e55f(0x287)](MCP_CONFIG_DIALOG_ID);},0x320);}catch(_0x192d3c){this['_logService'][_0x2cad80(0x331)](_0x2cad80(0x2ea),_0x192d3c),this[_0x2cad80(0x2d2)][_0x2cad80(0x257)]({'type':_univerjs_design[_0x2cad80(0x1fa)][_0x2cad80(0x2db)],'content':this[_0x2cad80(0x24e)]['t'](_0x2cad80(0x2fe))});}finally{this[_0x2cad80(0x284)][_0x2cad80(0x2f6)](![]);}}),this[_0x265bd7(0x279)](),this[_0x265bd7(0x273)](),this['_registerComponent']();}[_0x370a48(0x2a0)](){const _0x368367=_0x370a48,_0x20102b=this[_0x368367(0x266)][_0x368367(0x34c)](MCP_UI_PLUGIN_CONFIG_KEY);if(_0x20102b===null||_0x20102b===void 0x0?void 0x0:_0x20102b['showDeveloperTools'])this['_dialogService'][_0x368367(0x2a9)]({'id':MCP_CONFIG_DIALOG_ID,'title':{'title':this[_0x368367(0x24e)]['t'](_0x368367(0x335))},'children':{'label':_0x368367(0x2d1)},'width':0x244,'draggable':!![],'destroyOnClose':!![],'onClose':()=>{const _0x203ef6=_0x368367;this[_0x203ef6(0x27e)]['close'](MCP_CONFIG_DIALOG_ID);}});}[_0x370a48(0x349)](){const _0x595bfa=_0x370a48;return this[_0x595bfa(0x21b)][_0x595bfa(0x299)];}['_registerComponent'](){const _0x4d13f9=_0x370a48;this[_0x4d13f9(0x269)](this['_componentManager'][_0x4d13f9(0x30e)](_0x4d13f9(0x2d1),this[_0x4d13f9(0x2a4)]()));}['_createConfigPanelComponent'](){const _0x150b40=_0x370a48;return(0x0,_univerjs_ui[_0x150b40(0x2d5)])(()=>{const _0x2f2674=_0x150b40;var _0x562689,_0x3a01dd,_0x58d808;return(0x0,react_jsx_runtime[_0x2f2674(0x33e)])(MCPConfigPanel,{'config':this[_0x2f2674(0x29c)]['value'],'mcpCoreConfig':this[_0x2f2674(0x21b)][_0x2f2674(0x299)],'currentApiKey$':this[_0x2f2674(0x200)],'onSave':this[_0x2f2674(0x318)],'loading':this['_loading$'][_0x2f2674(0x299)],'connectionStatus$':(_0x562689=this[_0x2f2674(0x312)])===null||_0x562689===void 0x0?void 0x0:_0x562689[_0x2f2674(0x227)],'connectionError$':(_0x3a01dd=this['_mcpConnectionController'])===null||_0x3a01dd===void 0x0?void 0x0:_0x3a01dd[_0x2f2674(0x2ca)],'currentSessionId$':(_0x58d808=this[_0x2f2674(0x312)])===null||_0x58d808===void 0x0?void 0x0:_0x58d808[_0x2f2674(0x272)]});},this['_injector']);}[_0x370a48(0x279)](){const _0x1af531=_0x370a48;this[_0x1af531(0x269)](this['_configService'][_0x1af531(0x20a)](_univerjs_pro_mcp[_0x1af531(0x2f1)])[_0x1af531(0x235)](_0x5c8c0f=>{const _0x5b5600=_0x1af531;this[_0x5b5600(0x21b)][_0x5b5600(0x2f6)](_0x5c8c0f||{});}));const _0x318b46=this[_0x1af531(0x266)][_0x1af531(0x34c)](_univerjs_pro_mcp['MCP_PLUGIN_CONFIG_KEY']);this[_0x1af531(0x21b)][_0x1af531(0x2f6)](_0x318b46||{}),this[_0x1af531(0x269)](this[_0x1af531(0x266)][_0x1af531(0x20a)](MCP_UI_PLUGIN_CONFIG_KEY)[_0x1af531(0x235)](_0x23e7f2=>{const _0x730c19=_0x1af531;this[_0x730c19(0x29c)][_0x730c19(0x2f6)](_0x23e7f2||{});}));const _0x16fad6=this[_0x1af531(0x266)][_0x1af531(0x34c)](MCP_UI_PLUGIN_CONFIG_KEY);this['_config$'][_0x1af531(0x2f6)](_0x16fad6||{});}async['_loadStoredApiKey'](){const _0x4096dd=_0x370a48,_0x13f11b=this[_0x4096dd(0x266)][_0x4096dd(0x34c)](MCP_UI_PLUGIN_CONFIG_KEY);if(!(_0x13f11b===null||_0x13f11b===void 0x0?void 0x0:_0x13f11b[_0x4096dd(0x344)]))return;const _0x4dee95=await this['_localStorageService'][_0x4096dd(0x24b)](MCP_API_KEY_STORAGE_KEY);_0x4dee95&&(this['_mcpConnectionController']['__setCustomHeaders']({'Authorization':'Bearer\x20'+_0x4dee95}),this[_0x4096dd(0x200)][_0x4096dd(0x2f6)](_0x4dee95));}async[_0x370a48(0x2de)](_0x179cca){const _0x148970=_0x370a48;if(!_0x179cca['apiKey']||_0x179cca[_0x148970(0x204)][_0x148970(0x222)]()[_0x148970(0x32b)]===0x0)return{'isValid':![],'errorMessage':this[_0x148970(0x24e)]['t'](_0x148970(0x347))};if(_0x179cca[_0x148970(0x204)]['trim']()[_0x148970(0x32b)]<0xa)return{'isValid':![],'errorMessage':this['_localeService']['t'](_0x148970(0x2b2))};try{const _0x187ec9=await this[_0x148970(0x2da)][_0x148970(0x1f9)](_univerjs_pro_mcp[_0x148970(0x2dc)])['validateApiKey'](_0x179cca[_0x148970(0x204)][_0x148970(0x222)]());if(!_0x187ec9[_0x148970(0x321)])return{'isValid':![],'errorMessage':_0x187ec9[_0x148970(0x331)]||this['_localeService']['t'](_0x148970(0x22e))};return{'isValid':!![]};}catch(_0x2f9b77){return console[_0x148970(0x320)](_0x148970(0x275),_0x2f9b77),{'isValid':!![]};}}};MCPConfigUIController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x370a48(0x2c4)])(_univerjs_core[_0x370a48(0x1f3)])),__decorateParam(0x1,_univerjs_ui['IUIPartsService']),__decorateParam(0x2,_univerjs_core[_0x370a48(0x202)]),__decorateParam(0x3,_univerjs_core[_0x370a48(0x2b5)]),__decorateParam(0x4,_univerjs_ui[_0x370a48(0x315)]),__decorateParam(0x5,_univerjs_ui[_0x370a48(0x203)]),__decorateParam(0x6,(0x0,_univerjs_core['Inject'])(_univerjs_ui[_0x370a48(0x2b8)])),__decorateParam(0x7,(0x0,_univerjs_core['Inject'])(_univerjs_core['LocaleService'])),__decorateParam(0x8,_univerjs_core[_0x370a48(0x27d)]),__decorateParam(0x9,(0x0,_univerjs_core[_0x370a48(0x2c4)])(_univerjs_pro_mcp[_0x370a48(0x2dc)]))],MCPConfigUIController);const OpenMCPConfigPanelCommand={'id':_0x370a48(0x327),'type':_univerjs_core[_0x370a48(0x270)][_0x370a48(0x219)],'handler':async(_0x438b31,_0x1085a8)=>{const _0x13d003=_0x370a48;return _0x438b31[_0x13d003(0x1f9)](MCPConfigUIController)['showConfigPanel'](),!![];}};function mapStatusToI18NKey(_0x4b3b65,_0x1c7a66){const _0x45cf2e=_0x370a48;switch(_0x4b3b65){case _univerjs_pro_mcp['MCPConnectionStatus'][_0x45cf2e(0x308)]:return _0x45cf2e(0x2b0);case _univerjs_pro_mcp[_0x45cf2e(0x276)]['CONNECTING']:return _0x45cf2e(0x24c);case _univerjs_pro_mcp[_0x45cf2e(0x276)][_0x45cf2e(0x2af)]:return _0x45cf2e(0x28d);case _univerjs_pro_mcp[_0x45cf2e(0x276)]['FAILED']:switch(_0x1c7a66){case _univerjs_pro_mcp[_0x45cf2e(0x300)][_0x45cf2e(0x23c)]:return'mcpStatus.unauthorized';case _univerjs_pro_mcp[_0x45cf2e(0x300)][_0x45cf2e(0x346)]:return _0x45cf2e(0x21d);case _univerjs_pro_mcp[_0x45cf2e(0x300)][_0x45cf2e(0x31e)]:return _0x45cf2e(0x29a);case _univerjs_pro_mcp['MCPConnectionError']['MAX_RETRIES_EXCEEDED']:return'mcpStatus.maxRetriesExceeded';default:return _0x45cf2e(0x2e6);}case _univerjs_pro_mcp[_0x45cf2e(0x276)][_0x45cf2e(0x336)]:return _0x45cf2e(0x26a);default:return _0x45cf2e(0x1fc);}}function getTooltipText(_0x1c0ed4,_0x3e4b80,_0xc5916d,_0x2d7656=!![]){const _0x506b6d=_0x370a48,_0x56b858=mapStatusToI18NKey(_0x1c0ed4,_0x3e4b80),_0x471a1a=_0xc5916d['t'](_0x56b858);if(!_0x2d7656)return _0x471a1a;if(_0x1c0ed4===_univerjs_pro_mcp[_0x506b6d(0x276)][_0x506b6d(0x308)]&&_0x3e4b80===_univerjs_pro_mcp[_0x506b6d(0x300)][_0x506b6d(0x23c)])return _0x471a1a+'\x20-\x20'+_0xc5916d['t']('mcpStatus.clickToConfigure');else{if(_0x1c0ed4===_univerjs_pro_mcp[_0x506b6d(0x276)][_0x506b6d(0x2af)])return''+_0x471a1a;else{if(_0x1c0ed4===_univerjs_pro_mcp[_0x506b6d(0x276)][_0x506b6d(0x308)]||_0x1c0ed4===_univerjs_pro_mcp[_0x506b6d(0x276)][_0x506b6d(0x2ad)])return _0x471a1a+_0x506b6d(0x329)+_0xc5916d['t'](_0x506b6d(0x297));}}return _0x471a1a;}function getStatusColor(_0x107196){const _0x4ef18e=_0x370a48;switch(_0x107196){case _univerjs_pro_mcp[_0x4ef18e(0x276)][_0x4ef18e(0x2af)]:return'univer-text-green-500';case _univerjs_pro_mcp[_0x4ef18e(0x276)]['CONNECTING']:case _univerjs_pro_mcp[_0x4ef18e(0x276)][_0x4ef18e(0x336)]:return _0x4ef18e(0x2e0);case _univerjs_pro_mcp[_0x4ef18e(0x276)][_0x4ef18e(0x2ad)]:case _univerjs_pro_mcp[_0x4ef18e(0x276)][_0x4ef18e(0x308)]:return _0x4ef18e(0x291);default:return'univer-text-gray-500';}}function MCPStatusDisplay(_0x185fbf){const _0x843b7b=_0x370a48,{status$:_0x37992f,error$:_0x202d2e,onConfigure:_0x30f592,showClickable:showClickable=!![]}=_0x185fbf,_0x576350=(0x0,_univerjs_ui['useObservable'])(_0x37992f,_univerjs_pro_mcp['MCPConnectionStatus'][_0x843b7b(0x308)]),_0x51d787=(0x0,_univerjs_ui[_0x843b7b(0x282)])(_0x202d2e,_univerjs_pro_mcp[_0x843b7b(0x300)][_0x843b7b(0x208)]),_0x162702=(0x0,_univerjs_ui['useDependency'])(_univerjs_core[_0x843b7b(0x28c)]),_0x506379=_0x576350===_univerjs_pro_mcp['MCPConnectionStatus']['CONNECTED'];_0x576350===_univerjs_pro_mcp[_0x843b7b(0x276)][_0x843b7b(0x23b)]||_univerjs_pro_mcp[_0x843b7b(0x276)][_0x843b7b(0x336)];const _0x3eee1a=_0x162702['t'](mapStatusToI18NKey(_0x576350,_0x51d787)),_0xcda869=getTooltipText(_0x576350,_0x51d787,_0x162702,showClickable),_0x5f26f5=getStatusColor(_0x576350),_0x2fcb30=_0x506379?(0x0,react_jsx_runtime[_0x843b7b(0x33e)])(_univerjs_icons['OnLineIcon'],{}):(0x0,react_jsx_runtime[_0x843b7b(0x33e)])(_univerjs_icons[_0x843b7b(0x26f)],{}),_0x5793c7=(0x0,react[_0x843b7b(0x2cd)])(()=>{if(showClickable&&_0x30f592)_0x30f592();},[showClickable,_0x30f592]);function _0x328b9f(){const _0x2e5ef1=_0x843b7b;return(0x0,react_jsx_runtime[_0x2e5ef1(0x212)])(_0x2e5ef1(0x23d),{'className':(0x0,_univerjs_design[_0x2e5ef1(0x2bc)])(_0x2e5ef1(0x2be),showClickable&&_0x30f592&&_0x2e5ef1(0x2f0)),'role':_0x2e5ef1(0x2d9),'onClick':showClickable&&_0x30f592?_0x5793c7:void 0x0,'children':[(0x0,react_jsx_runtime[_0x2e5ef1(0x33e)])(_0x2e5ef1(0x23d),{'className':(0x0,_univerjs_design['clsx'])(_0x2e5ef1(0x2c8),_0x5f26f5),'children':_0x2fcb30}),(0x0,react_jsx_runtime[_0x2e5ef1(0x33e)])(_0x2e5ef1(0x23d),{'className':_0x2e5ef1(0x31a),'children':_0x3eee1a})]});}return(0x0,react_jsx_runtime[_0x843b7b(0x33e)])(_univerjs_design['Tooltip'],{'title':_0xcda869,'placement':_0x843b7b(0x2df),'children':_0x328b9f()});}let MCPConnectionUIController=class MCPConnectionUIController extends _univerjs_core[_0x370a48(0x23a)]{constructor(_0x2b3520,_0x209b93,_0x3c1c37,_0x151412){const _0x10c241=_0x370a48;super(),this['_injector']=_0x2b3520,this[_0x10c241(0x246)]=_0x209b93,this[_0x10c241(0x33d)]=_0x3c1c37,this['_configService']=_0x151412,this[_0x10c241(0x2fd)](),this[_0x10c241(0x2f2)]();}['_initAutoConnect'](){const _0x48403d=_0x370a48,_0x3d7090=this[_0x48403d(0x266)]['getConfig'](MCP_UI_PLUGIN_CONFIG_KEY);if(_0x3d7090===null||_0x3d7090===void 0x0?void 0x0:_0x3d7090['showDeveloperTools'])this[_0x48403d(0x246)][_0x48403d(0x230)]=![];}[_0x370a48(0x2f2)](){const _0x335b84=_0x370a48,_0x34c3ba=this[_0x335b84(0x266)]['getConfig'](MCP_UI_PLUGIN_CONFIG_KEY);if((_0x34c3ba===null||_0x34c3ba===void 0x0?void 0x0:_0x34c3ba['showStatus'])!==![])this[_0x335b84(0x269)](this[_0x335b84(0x33d)][_0x335b84(0x2c9)](_univerjs_ui[_0x335b84(0x2b9)]['HEADER_MENU'],()=>{const _0x1aafe1=_0x335b84;var _0x108fce;return(0x0,_univerjs_ui['connectInjector'])(passProps({'status$':this[_0x1aafe1(0x246)][_0x1aafe1(0x227)],'error$':this['_connectionController'][_0x1aafe1(0x2ca)],'onConfigure':()=>this[_0x1aafe1(0x30a)](),'showClickable':(_0x108fce=_0x34c3ba===null||_0x34c3ba===void 0x0?void 0x0:_0x34c3ba[_0x1aafe1(0x344)])!==null&&_0x108fce!==void 0x0?_0x108fce:![]}),this[_0x1aafe1(0x2da)]);}));}[_0x370a48(0x30a)](){const _0x1c4b13=_0x370a48;this[_0x1c4b13(0x2da)][_0x1c4b13(0x1f9)](MCPConfigUIController)[_0x1c4b13(0x2a0)]();}};MCPConnectionUIController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x370a48(0x2c4)])(_univerjs_core['Injector'])),__decorateParam(0x1,(0x0,_univerjs_core[_0x370a48(0x2c4)])(_univerjs_pro_mcp[_0x370a48(0x2dc)])),__decorateParam(0x2,_univerjs_ui['IUIPartsService']),__decorateParam(0x3,_univerjs_core[_0x370a48(0x202)])],MCPConnectionUIController);function _0x2d59(){const _0x596032=['Enable\x20Authentication','defineProperty','Session-id\x20is\x20currently\x20occupied,\x20please\x20try\x20again\x20later','Disposable','CONNECTING','UNAUTHORIZED','div','univer-max-w-full\x20univer-rounded\x20univer-border\x20univer-bg-white\x20univer-p-3','权限验证失败,请检查您的\x20API\x20密钥','什么是\x20API\x20密钥?','724orBOEN','mcpConfig.apiKey','univer-border-b\x20univer-border-gray-100\x20univer-px-6\x20univer-py-3','univer-flex\x20univer-size-10\x20univer-shrink-0\x20univer-items-center\x20univer-justify-center\x20univer-rounded-full\x20univer-bg-blue-100','univer-mt-1.5\x20univer-size-2\x20univer-shrink-0\x20univer-rounded-full\x20univer-bg-blue-500','_connectionController','保存配置','MCP\x20客户端配置','univer.ai','mcpConfig.connectionInfo','getItem','mcpStatus.connecting','univer-size-4','_localeService','Network\x20connection\x20error.\x20Please\x20check\x20your\x20internet\x20connection','Authorization\x20failed,\x20please\x20check\x20your\x20API\x20key','8823ccaCWj','Add\x20the\x20following\x20configuration\x20to\x20your\x20MCP\x20client\x20settings:','MCP:\x20未授权','MCP\x20Client\x20Configuration','useDependency','univer-flex\x20univer-items-start\x20univer-gap-3\x20univer-pr-8','show','MCP\x20Retrying...','onStarting','配置\x20MCP\x20使用\x20AI\x20操作电子表格','带有\x20Bearer\x20前缀的\x20API\x20密钥。','Click\x20to\x20connect\x20MCP','连接中...','mcpConfig.apiKeyHint','UniverMCPUIPlugin','MCP\x20重连中...','univer-flex-1','univer-bg-red-500','mcp-ui.config','mcpConfig.connectionStatus.failed','univer-min-w-0\x20univer-flex-1','_configService','has','mcp.apiKey','disposeWithMe','mcpStatus.retrying','univer-m-0\x20univer-text-sm\x20univer-font-medium\x20univer-text-red-800','univer.plus','UniverMCPPlugin','Enter\x20your\x20API\x20key','OffLineIcon','CommandType','univer-bg-blue-500','sessionId$','_loadStoredApiKey','MCP:\x20Session\x20ID\x20Occupied','[MCPConfigUI]\x20Could\x20not\x20validate\x20API\x20key\x20with\x20core\x20plugin:','MCPConnectionStatus','Univer\x20AI\x20控制台','9KWDJAt','_initConfigSync','_menuManagerService','MAX_RETRIES_EXCEEDED','45740Bqjdxj','ILogService','_dialogService','toPrimitive','mcp-config-dialog','OTHERS','useObservable','Configuration\x20Notes:','_loading$','重连中...','API\x20密钥','close','mcpConfig.description','univer-flex\x20univer-items-center\x20univer-gap-3','会话ID','version','LocaleService','mcpStatus.connected','几秒钟内获取您的\x20API\x20密钥','Restart\x20your\x20MCP\x20client\x20to\x20apply\x20the\x20configuration','univer-flex\x20univer-flex-wrap\x20univer-gap-2','univer-text-red-500','includes','mcpConfig.apiApplyInfo.univerAiLabel','MCPConnectionUIController','Authorization:','univer-text-sm\x20univer-font-medium','mcpStatus.clickToConnect','Button','value','mcpStatus.networkError','span','_config$','Save\x20Configuration','_commandService','univer-bg-green-500','showConfigPanel','MCP\x20Connection\x20Failed','decorate','Module','_createConfigPanelComponent','univer-space-y-5','univer-flex\x20univer-items-center\x20univer-gap-2','univer-size-2\x20univer-rounded-full','string','open','Invalid\x20API\x20key,\x20please\x20check\x20if\x20the\x20key\x20is\x20correct','MCP:\x20超出最大重试次数','univer-absolute\x20univer-right-3\x20univer-top-3\x20univer-flex\x20univer-size-6\x20univer-items-center\x20univer-justify-center\x20univer-text-gray-500\x20univer-transition-all\x20univer-duration-200\x20hover:univer-scale-110\x20hover:univer-text-gray-700','FAILED','会话\x20ID\x20已被占用,请稍后再试','CONNECTED','mcpStatus.disconnected','0.21.0','mcpConfig.validation.apiKeyTooShort','mcpConfig.apiKeyPlaceholder','univer-text-blue-600\x20univer-bg-blue-50\x20univer-border-blue-200','ILocalStorageService','univer-rounded-lg\x20univer-border\x20univer-border-blue-200\x20univer-bg-blue-50\x20univer-p-3','MCP_UI_PLUGIN','ComponentManager','BuiltInUIPart','<API_KEY>','add','clsx','pluginName','univer-flex\x20univer-items-center','8412844VJwZRO','您的\x20API\x20密钥安全存储在本地存储中','mcpConfig.configInstructions','CheckMarkIcon','BehaviorSubject','Inject','univer-text-xs\x20univer-text-gray-600','OpenMCPConfigPanelCommand','Session\x20ID','univer-mr-2\x20univer-flex\x20univer-text-xl','registerComponent','connectionError$','object','329BlwatE','useCallback','stringify','__setCustomHeaders','univer-space-y-3','MCPConfigPanel','_messageService','constructor','重启您的\x20MCP\x20客户端以使配置生效','connectInjector','MCP\x20Connected','点击配置\x20MCP','MenuIcon','button','_injector','Error','MCPConnectionController','univer-text-gray-600\x20univer-bg-gray-50\x20univer-border-gray-200','_validateConfig','bottom','univer-text-yellow-500','Input','univer_session_id:','merge','MCP\x20连接失败','MCP\x20Unknown\x20Status','mcpStatus.failed','Copy\x20the\x20JSON\x20configuration\x20below','ISocketService','mcpConfig.note1','[MCPConfigUI]\x20Failed\x20to\x20save\x20configuration:','mcpConfig.configStep1','univer-flex\x20univer-items-start\x20univer-gap-3','Success','MenuItemType','mcpConfig.connectionStatus.connecting','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20univer-cursor-pointer\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hover:univer-opacity-80\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','MCP_PLUGIN_CONFIG_KEY','_initStatusComponent','univer-overflow-hidden\x20univer-whitespace-pre-wrap\x20univer-break-all\x20univer-text-xs\x20univer-text-gray-800','Add\x20the\x20configuration\x20to\x20your\x20MCP\x20client\x20settings\x20file','univer-flex-1\x20univer-overflow-auto\x20univer-px-6\x20univer-py-5','next','配置更改将立即生效','Configuration\x20changes\x20will\x20take\x20effect\x20immediately','packageName','_logService','MCP\x20Disconnected','mcpConfig.configStep2','_initAutoConnect','mcpConfig.configError','配置参数:','MCPConnectionError','symbol','56766elkNgU','已连接','function','IMenuManagerService','Configure\x20MCP\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets','125XWnzCM','DISCONNECTED','mcpConfig.note2','_handleConfigure','5616032iQcSRb','网络连接错误,请检查您的网络连接','_localStorageService','register','univer-text-xs\x20univer-font-medium\x20univer-text-gray-700','univer-mb-3\x20univer-flex\x20univer-items-center\x20univer-gap-2\x20univer-text-sm\x20univer-font-semibold\x20univer-text-gray-800','univer-flex\x20univer-size-8\x20univer-items-center\x20univer-justify-center\x20univer-rounded-lg\x20univer-bg-blue-500','_mcpConnectionController','唯一会话标识符。如果您打开了多个\x20Univer\x20实例,每个实例必须使用不同的\x20session_id\x20以避免连接冲突。','Plugin','IDialogService','univer-text-sm\x20univer-text-gray-500','univer-space-y-4','_handleConfigSave','https://console.univer.plus','univer-text-sm\x20univer-leading-8\x20univer-text-gray-600\x20dark:!univer-text-gray-200','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','text','MCP:\x20会话\x20ID\x20已被占用','NETWORK_ERROR','10371170tVpobY','warn','isValid','您的\x20API\x20密钥将在此浏览器中本地存储','MCPStatusDisplay','univer-flex\x20univer-size-4\x20univer-items-center\x20univer-justify-center\x20univer-rounded-full\x20univer-bg-blue-100\x20univer-text-xs\x20univer-font-medium\x20univer-text-blue-600','univer-text-blue-600','registerCommand','mcp-ui.command.openConfigPanel','getOwnPropertyDescriptor','\x20-\x20','_blank','length','univer-text-gray-400','mcpConfig.configStep3','启用身份验证','复制以下\x20JSON\x20配置','forEach','error','_initializeMenus','Configuration\x20Parameters:','univer-border-b\x20univer-border-gray-100\x20univer-px-6\x20univer-py-4','mcpConfig.title','RETRYING','What\x20is\x20API\x20Key?','Maximum\x20retry\x20attempts\x20exceeded.\x20Please\x20try\x20again\x20later','Univer\x20AI\x20Console','MCP\x20Configuration','点击连接\x20MCP','API\x20密钥无效,请检查密钥是否正确','_uiPartsService','jsx','mcpConfig.sessionIdDescription','启用身份验证以获得安全连接','http','<SESSION_ID>','mcpConfig.save','showDeveloperTools','mcpConfig.configParameters','SESSION_ID_OCCUPIED','mcpConfig.validation.apiKeyRequired','CloseIcon','getCurrentConfig','MCPUIMenuController','univer-mb-3\x20univer-text-xs\x20univer-text-gray-600','getConfig','_config','univer-text-xs\x20univer-font-medium\x20univer-text-gray-600','请输入您的\x20API\x20密钥','_initializeCommands','将以下配置添加到您的\x20MCP\x20客户端设置中:','univer-font-medium','mcpConfig.configStepTitle','Injector','errorMessage','保存中...','DependentOn','Click\x20to\x20configure\x20MCP','Connected','get','MessageType','API\x20密钥不能为空','mcpStatus.unknown','univer-rounded-lg\x20univer-border\x20univer-border-gray-200\x20univer-bg-gray-50\x20univer-p-4','univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-rounded-lg\x20univer-border\x20univer-px-3\x20univer-py-2','Configuration\x20Steps:','_apiKey$','default','IConfigService','IMessageService','apiKey','MCP:\x20Max\x20Retries\x20Exceeded','MCP\x20已断开','pre','NONE','toStringTag','subscribeConfigValue$','univer-space-y-1\x20univer-text-xs\x20univer-text-gray-600','配置无效','API\x20key\x20is\x20required','API\x20Key\x20connects\x20you\x20to\x20Univer\x20MCP\x20Server\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets.\x20Get\x20your\x20API\x20key\x20from\x20our\x20console\x20to\x20get\x20started.','885668NPlvcH','univer-text-red-600\x20univer-bg-red-50\x20univer-border-red-200','mcpServerUrl','jsxs','API\x20key\x20with\x20Bearer\x20prefix.','MCP:\x20网络错误','Bearer\x20','mcpConfig.connectionStatus.retrying','MCP\x20配置','API\x20密钥长度至少需要\x2010\x20位','COMMAND','@univerjs-pro/mcp-ui','_mcpCoreConfig$','label','mcpStatus.sessionOccupied','off','univer-bg-gray-500','univer-space-y-2','enUS','trim','univer-text-xs\x20univer-text-gray-500','Your\x20API\x20key\x20will\x20be\x20stored\x20locally\x20in\x20this\x20browser','mcpConfig.apiApplyInfo.title','Max\x20Retries','connectionStatus$','univer-flex\x20univer-items-start\x20univer-gap-2','univer-ml-1\x20univer-flex\x20univer-size-4\x20univer-items-center\x20univer-justify-center\x20univer-text-blue-600\x20univer-transition-all\x20univer-duration-200\x20hover:univer-scale-110\x20hover:univer-text-blue-800','Retrying...','mcpConfig.apiApplyInfo.getStarted','useState','univer-flex\x20univer-gap-3','mcpConfig.validation.invalidApiKey','Your\x20API\x20key\x20is\x20stored\x20securely\x20in\x20local\x20storage','enableAutoConnect','超出最大重试次数,请稍后再试','MCP:\x20Unauthorized','Unique\x20session\x20identifier.\x20If\x20you\x20have\x20multiple\x20Univer\x20instances\x20open,\x20each\x20instance\x20must\x20use\x20a\x20different\x20session_id\x20to\x20avoid\x20connection\x20conflicts.','univer-mt-2\x20univer-rounded-md\x20univer-border\x20univer-border-red-200\x20univer-bg-red-50\x20univer-px-3\x20univer-py-2','subscribe','Invalid\x20configuration'];_0x2d59=function(){return _0x596032;};return _0x2d59();}function passProps(_0x1cdb01){const {status$:_0x99a0ff,error$:_0x308af7,onConfigure:_0x27631e,showClickable:_0x96e842}=_0x1cdb01;return function _0xf4deee(){const _0x305f86=_0x8260;return(0x0,react_jsx_runtime[_0x305f86(0x33e)])(MCPStatusDisplay,{'status$':_0x99a0ff,'error$':_0x308af7,'onConfigure':_0x27631e,'showClickable':_0x96e842});};}function MCPConfigMenuItemFactory(_0x56296c){const _0x525394=_0x370a48;return{'id':OpenMCPConfigPanelCommand['id'],'type':_univerjs_ui[_0x525394(0x2ee)]['BUTTON'],'icon':_0x525394(0x2d8),'title':_0x525394(0x335),'tooltip':_0x525394(0x335)};}const menuSchema={[_univerjs_ui['RibbonStartGroup'][_0x370a48(0x281)]]:{[OpenMCPConfigPanelCommand['id']]:{'order':0xa,'menuItemFactory':MCPConfigMenuItemFactory}}};let MCPUIMenuController=class MCPUIMenuController extends _univerjs_core[_0x370a48(0x23a)]{constructor(_0xeceeb5,_0x2853eb){const _0xc9fff8=_0x370a48;super(),this[_0xc9fff8(0x29e)]=_0xeceeb5,this[_0xc9fff8(0x27a)]=_0x2853eb,this[_0xc9fff8(0x1ef)](),this[_0xc9fff8(0x332)]();}[_0x370a48(0x1ef)](){const _0x105298=_0x370a48;[OpenMCPConfigPanelCommand][_0x105298(0x330)](_0x5d2dd6=>{const _0x2f1263=_0x105298;this[_0x2f1263(0x269)](this[_0x2f1263(0x29e)][_0x2f1263(0x326)](_0x5d2dd6));});}[_0x370a48(0x332)](){const _0x432167=_0x370a48;this[_0x432167(0x27a)]['mergeMenu'](menuSchema);}};MCPUIMenuController=__decorate([__decorateParam(0x0,_univerjs_core['ICommandService']),__decorateParam(0x1,_univerjs_ui[_0x370a48(0x305)])],MCPUIMenuController);const locale={'mcpStatus':{'disconnected':_0x370a48(0x2fb),'connecting':'MCP\x20Connecting...','connected':_0x370a48(0x2d6),'failed':_0x370a48(0x2a1),'retrying':_0x370a48(0x258),'unknown':_0x370a48(0x2e5),'unauthorized':_0x370a48(0x232),'sessionOccupied':_0x370a48(0x274),'networkError':'MCP:\x20Network\x20Error','maxRetriesExceeded':_0x370a48(0x205),'clickToConnect':_0x370a48(0x25c),'clickToConfigure':_0x370a48(0x1f7)},'mcpConfig':{'title':_0x370a48(0x33a),'description':_0x370a48(0x306),'apiKey':'API\x20Key','apiKeyPlaceholder':_0x370a48(0x26e),'apiKeyHint':_0x370a48(0x224),'enableAuth':_0x370a48(0x237),'enableAuthHint':'Enable\x20authentication\x20for\x20secure\x20connections','connectionInfo':'MCP\x20Client\x20Configuration','mcpClientConfig':_0x370a48(0x254),'configInstructions':_0x370a48(0x252),'configStepTitle':_0x370a48(0x1ff),'configStep1':_0x370a48(0x2e7),'configStep2':_0x370a48(0x2f4),'configStep3':_0x370a48(0x28f),'sessionId':_0x370a48(0x2c7),'sessionIdDescription':_0x370a48(0x233),'authorizationDescription':_0x370a48(0x213),'configParameters':_0x370a48(0x333),'maxRetries':_0x370a48(0x226),'save':_0x370a48(0x29d),'saving':'Saving...','note1':_0x370a48(0x2f8),'note2':_0x370a48(0x22f),'configSaved':'Configuration\x20saved\x20successfully','configError':'Failed\x20to\x20save\x20configuration','apiApplyInfo':{'title':_0x370a48(0x337),'description':_0x370a48(0x20e),'univerAiLabel':_0x370a48(0x339),'getStarted':'Get\x20your\x20API\x20key\x20in\x20seconds'},'validation':{'apiKeyRequired':_0x370a48(0x20d),'apiKeyTooShort':'API\x20key\x20must\x20be\x20at\x20least\x2010\x20characters\x20long','invalidConfig':_0x370a48(0x236),'invalidApiKey':_0x370a48(0x2aa)},'connectionStatus':{'disconnected':'Disconnected','connecting':'Connecting...','connected':_0x370a48(0x1f8),'failed':'Connection\x20Failed','retrying':_0x370a48(0x22a)},'connectionError':{'unauthorized':_0x370a48(0x250),'sessionOccupied':_0x370a48(0x239),'networkError':_0x370a48(0x24f),'maxRetriesExceeded':_0x370a48(0x338)}}},locale$1={'mcpStatus':{'disconnected':_0x370a48(0x206),'connecting':'MCP\x20连接中...','connected':'MCP\x20已连接','failed':_0x370a48(0x2e4),'retrying':_0x370a48(0x260),'unknown':'MCP\x20状态未知','unauthorized':_0x370a48(0x253),'sessionOccupied':_0x370a48(0x31d),'networkError':_0x370a48(0x214),'maxRetriesExceeded':_0x370a48(0x2ab),'clickToConnect':_0x370a48(0x33b),'clickToConfigure':_0x370a48(0x2d7)},'mcpConfig':{'title':_0x370a48(0x217),'description':_0x370a48(0x25a),'apiKey':_0x370a48(0x286),'apiKeyPlaceholder':_0x370a48(0x1ee),'apiKeyHint':_0x370a48(0x322),'enableAuth':_0x370a48(0x32e),'enableAuthHint':_0x370a48(0x340),'connectionInfo':'MCP\x20客户端配置','mcpClientConfig':_0x370a48(0x248),'configInstructions':_0x370a48(0x1f0),'configStepTitle':'配置步骤:','configStep1':_0x370a48(0x32f),'configStep2':'将配置添加到您的\x20MCP\x20客户端设置文件中','configStep3':_0x370a48(0x2d4),'sessionId':_0x370a48(0x28a),'sessionIdDescription':_0x370a48(0x313),'authorizationDescription':_0x370a48(0x25b),'configParameters':_0x370a48(0x2ff),'maxRetries':'最大重试次数','save':_0x370a48(0x247),'saving':_0x370a48(0x1f5),'note1':_0x370a48(0x2f7),'note2':_0x370a48(0x2c0),'configSaved':'配置保存成功','configError':'配置保存失败','apiApplyInfo':{'title':_0x370a48(0x240),'description':'API\x20密钥用于连接\x20Univer\x20MCP\x20服务器,让您可以使用\x20AI\x20来操作电子表格。请前往控制台获取您的专属密钥。','univerAiLabel':_0x370a48(0x277),'getStarted':_0x370a48(0x28e)},'validation':{'apiKeyRequired':_0x370a48(0x1fb),'apiKeyTooShort':_0x370a48(0x218),'invalidConfig':_0x370a48(0x20c),'invalidApiKey':_0x370a48(0x33c)},'connectionStatus':{'disconnected':'未连接','connecting':_0x370a48(0x25d),'connected':_0x370a48(0x303),'failed':'连接失败','retrying':_0x370a48(0x285)},'connectionError':{'unauthorized':_0x370a48(0x23f),'sessionOccupied':_0x370a48(0x2ae),'networkError':_0x370a48(0x30c),'maxRetriesExceeded':_0x370a48(0x231)}}};var name=_0x370a48(0x21a),version=_0x370a48(0x2b1);let UniverMCPUIPlugin=class UniverMCPUIPlugin extends _univerjs_core[_0x370a48(0x314)]{constructor(_0x4bdc66=defaultPluginConfig,_0xdccb18,_0x4e9798,_0x2ce9ea,_0x5ce173,_0xf2862e){const _0x2dcfc5=_0x370a48;super(),this['_config']=_0x4bdc66,this['_injector']=_0xdccb18,this[_0x2dcfc5(0x266)]=_0x4e9798,this[_0x2dcfc5(0x33d)]=_0x2ce9ea,this[_0x2dcfc5(0x30d)]=_0x5ce173,this[_0x2dcfc5(0x24e)]=_0xf2862e;const {..._0x4e889f}=(0x0,_univerjs_core[_0x2dcfc5(0x2e3)])({},defaultPluginConfig,this[_0x2dcfc5(0x1ec)]);this[_0x2dcfc5(0x266)]['setConfig'](MCP_UI_PLUGIN_CONFIG_KEY,_0x4e889f);}async[_0x370a48(0x259)](){const _0x219164=_0x370a48,_0x419bd4=[[MCPConnectionUIController],[MCPConfigUIController],[MCPUIMenuController]];if(!this['_injector'][_0x219164(0x267)](_univerjs_network['ISocketService']))_0x419bd4['push']([_univerjs_network[_0x219164(0x2e8)],{'useClass':_univerjs_network['WebSocketService']}]);_0x419bd4[_0x219164(0x330)](_0x1fc9d8=>this[_0x219164(0x2da)][_0x219164(0x2bb)](_0x1fc9d8)),this[_0x219164(0x2da)][_0x219164(0x1f9)](MCPConnectionUIController),this[_0x219164(0x2da)][_0x219164(0x1f9)](MCPConfigUIController),this['_injector'][_0x219164(0x1f9)](MCPUIMenuController);}};_defineProperty(UniverMCPUIPlugin,_0x370a48(0x2bd),_0x370a48(0x2b7)),_defineProperty(UniverMCPUIPlugin,_0x370a48(0x2f9),name),_defineProperty(UniverMCPUIPlugin,_0x370a48(0x28b),version),UniverMCPUIPlugin=__decorate([(0x0,_univerjs_core[_0x370a48(0x1f6)])(_univerjs_pro_mcp[_0x370a48(0x26d)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x370a48(0x2c4)])(_univerjs_core[_0x370a48(0x1f3)])),__decorateParam(0x2,_univerjs_core[_0x370a48(0x202)]),__decorateParam(0x3,_univerjs_ui['IUIPartsService']),__decorateParam(0x4,_univerjs_core[_0x370a48(0x2b5)]),__decorateParam(0x5,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x370a48(0x28c)]))],UniverMCPUIPlugin),exports['MCPConfigPanel']=MCPConfigPanel,Object[_0x370a48(0x238)](exports,'MCPConfigUIController',{'enumerable':!![],'get':function(){return MCPConfigUIController;}}),Object['defineProperty'](exports,_0x370a48(0x294),{'enumerable':!![],'get':function(){return MCPConnectionUIController;}}),exports[_0x370a48(0x323)]=MCPStatusDisplay,Object[_0x370a48(0x238)](exports,_0x370a48(0x34a),{'enumerable':!![],'get':function(){return MCPUIMenuController;}}),exports[_0x370a48(0x2c6)]=OpenMCPConfigPanelCommand,Object['defineProperty'](exports,_0x370a48(0x25f),{'enumerable':!![],'get':function(){return UniverMCPUIPlugin;}}),exports[_0x370a48(0x221)]=locale,exports['zhCN']=locale$1;
|
|
1
|
+
const _0x586328=_0x53f3;(function(_0x48d1f3,_0x4bf2b1){const _0x3530f5=_0x53f3,_0xd8338d=_0x48d1f3();while(!![]){try{const _0x34e526=-parseInt(_0x3530f5(0x1e3))/0x1*(parseInt(_0x3530f5(0x193))/0x2)+-parseInt(_0x3530f5(0x13b))/0x3+parseInt(_0x3530f5(0x1a6))/0x4+parseInt(_0x3530f5(0x123))/0x5*(-parseInt(_0x3530f5(0x1a9))/0x6)+-parseInt(_0x3530f5(0x12b))/0x7+-parseInt(_0x3530f5(0x1b6))/0x8+parseInt(_0x3530f5(0x1a7))/0x9;if(_0x34e526===_0x4bf2b1)break;else _0xd8338d['push'](_0xd8338d['shift']());}catch(_0x27c751){_0xd8338d['push'](_0xd8338d['shift']());}}}(_0x3712,0x6efbc),Object['defineProperty'](exports,Symbol[_0x586328(0x250)],{'value':_0x586328(0x1a0)}));let _univerjs_core=require('@univerjs/core'),_univerjs_pro_mcp=require('@univerjs-pro/mcp'),_univerjs_design=require('@univerjs/design'),_univerjs_ui=require('@univerjs/ui'),rxjs=require('rxjs'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_network=require('@univerjs/network');function MCPConfigPanel(_0x3be4f5){const _0xebe275=_0x586328;var _0x2eacb5,_0x18a341;const {mcpCoreConfig:_0x16f4d4,onSave:_0x21be84,loading:loading=![],config:_0x4e903c,connectionStatus$:_0x5e4fc6,connectionError$:_0xe9682e,currentApiKey$:_0x31d225,currentSessionId$:_0x4024d8}=_0x3be4f5,_0x291a14=(0x0,_univerjs_ui['useDependency'])(_univerjs_core[_0xebe275(0x171)]),_0x101084=(0x0,_univerjs_ui[_0xebe275(0x172)])(_0x5e4fc6,_univerjs_pro_mcp[_0xebe275(0x13c)][_0xebe275(0x1c9)]),_0x339fd0=(0x0,_univerjs_ui['useObservable'])(_0xe9682e,_univerjs_pro_mcp['MCPConnectionError'][_0xebe275(0x1de)]),_0x836206=(0x0,_univerjs_ui[_0xebe275(0x172)])(_0x4024d8,''),[_0x4eed9b,_0xfcc5aa]=(0x0,react['useState'])((0x0,_univerjs_ui[_0xebe275(0x172)])(_0x31d225,'')||''),_0x1e7a14=!![],_0x394ab2=_0x4e903c[_0xebe275(0x17e)]&&_0x16f4d4['mcpServerUrl']&&(_0x16f4d4['mcpServerUrl'][_0xebe275(0x200)](_0xebe275(0x10d))||_0x16f4d4[_0xebe275(0x216)][_0xebe275(0x200)](_0xebe275(0x140))),_0x29ec46=(_0x2eacb5=_0x16f4d4[_0xebe275(0x216)])===null||_0x2eacb5===void 0x0?void 0x0:_0x2eacb5[_0xebe275(0x200)](_0xebe275(0x10d)),_0x59a08a=(_0x18a341=_0x16f4d4[_0xebe275(0x216)])===null||_0x18a341===void 0x0?void 0x0:_0x18a341[_0xebe275(0x200)]('univer.ai'),_0x3db9a8=_0x29ec46?_0xebe275(0x1ae):_0xebe275(0x201),_0x471545=_0x4e903c[_0xebe275(0x17e)]&&(_0x29ec46||_0x59a08a),[_0x4c24ae,_0x2fdc05]=(0x0,react[_0xebe275(0x244)])(!_0x4eed9b[_0xebe275(0x106)]()),_0x3ea9ba=(_0x333b84,_0x1390c3)=>{const _0xc88963=_0xebe275;if(_0x1390c3===_univerjs_pro_mcp[_0xc88963(0x1a8)][_0xc88963(0x134)])return'univer-text-red-600\x20univer-bg-red-50\x20univer-border-red-200';switch(_0x333b84){case _univerjs_pro_mcp[_0xc88963(0x13c)][_0xc88963(0x24c)]:return _0xc88963(0x23d);case _univerjs_pro_mcp['MCPConnectionStatus']['CONNECTING']:case _univerjs_pro_mcp['MCPConnectionStatus'][_0xc88963(0x109)]:return _0xc88963(0x128);case _univerjs_pro_mcp['MCPConnectionStatus'][_0xc88963(0x15a)]:return'univer-text-red-600\x20univer-bg-red-50\x20univer-border-red-200';default:return _0xc88963(0x243);}},_0x342d20=(_0x5c7dc4,_0x2de70e)=>{const _0x5ea33e=_0xebe275;if(_0x2de70e===_univerjs_pro_mcp[_0x5ea33e(0x1a8)][_0x5ea33e(0x134)])return'univer-bg-red-500';switch(_0x5c7dc4){case _univerjs_pro_mcp['MCPConnectionStatus'][_0x5ea33e(0x24c)]:return _0x5ea33e(0x1e7);case _univerjs_pro_mcp[_0x5ea33e(0x13c)]['CONNECTING']:case _univerjs_pro_mcp[_0x5ea33e(0x13c)]['RETRYING']:return _0x5ea33e(0x154);case _univerjs_pro_mcp['MCPConnectionStatus'][_0x5ea33e(0x15a)]:return'univer-bg-red-500';default:return _0x5ea33e(0x1f5);}},_0x3cf75d=_0x5ab272=>{const _0x2993d7=_0xebe275;switch(_0x5ab272){case _univerjs_pro_mcp[_0x2993d7(0x13c)]['CONNECTED']:return _0x291a14['t'](_0x2993d7(0x118));case _univerjs_pro_mcp[_0x2993d7(0x13c)][_0x2993d7(0x19f)]:return _0x291a14['t'](_0x2993d7(0x114));case _univerjs_pro_mcp[_0x2993d7(0x13c)][_0x2993d7(0x15a)]:return _0x291a14['t'](_0x2993d7(0x1ac));case _univerjs_pro_mcp[_0x2993d7(0x13c)][_0x2993d7(0x109)]:return _0x291a14['t'](_0x2993d7(0x12d));default:return _0x291a14['t'](_0x2993d7(0x213));}},_0x5a0e94=_0x26beb3=>{const _0x53bda7=_0xebe275;switch(_0x26beb3){case _univerjs_pro_mcp[_0x53bda7(0x1a8)][_0x53bda7(0x134)]:return _0x291a14['t']('mcpConfig.connectionError.unauthorized');case _univerjs_pro_mcp[_0x53bda7(0x1a8)][_0x53bda7(0x1d3)]:return _0x291a14['t'](_0x53bda7(0x16a));case _univerjs_pro_mcp[_0x53bda7(0x1a8)][_0x53bda7(0x120)]:return _0x291a14['t'](_0x53bda7(0x11d));case _univerjs_pro_mcp['MCPConnectionError'][_0x53bda7(0x1be)]:return _0x291a14['t']('mcpConfig.connectionError.maxRetriesExceeded');default:return'';}},_0x398d04=(0x0,react['useCallback'])(()=>{const _0x4e8794=_0xebe275;_0x21be84({..._0x16f4d4,'apiKey':_0x4eed9b[_0x4e8794(0x106)](),'enableAuth':_0x1e7a14});},[_0x16f4d4,_0x4eed9b,_0x1e7a14,_0x21be84]),_0x480f14=_0x4eed9b[_0xebe275(0x106)]()[_0xebe275(0x11b)]>0x0;return(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x10e),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('div',{'className':_0xebe275(0x224),'children':(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x1db),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':'univer-flex\x20univer-size-8\x20univer-items-center\x20univer-justify-center\x20univer-rounded-lg\x20univer-bg-blue-500','children':(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'className':'univer-text-white','children':'⚙'})}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'children':(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('p',{'className':_0xebe275(0x19b),'children':_0x291a14['t']('mcpConfig.description')})})]})}),(0x0,react_jsx_runtime[_0xebe275(0x231)])('div',{'className':'univer-border-b\x20univer-border-gray-100\x20univer-px-6\x20univer-py-3','children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':(0x0,_univerjs_design[_0xebe275(0x23c)])('univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-rounded-lg\x20univer-border\x20univer-px-3\x20univer-py-2',_0x3ea9ba(_0x101084,_0x339fd0)),'children':(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x20e),'children':[(0x0,react_jsx_runtime['jsx'])('div',{'className':(0x0,_univerjs_design['clsx'])(_0xebe275(0x18f),_0x342d20(_0x101084,_0x339fd0))}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'className':_0xebe275(0x223),'children':_0x3cf75d(_0x101084)})]})}),_0x339fd0!==_univerjs_pro_mcp['MCPConnectionError'][_0xebe275(0x1de)]&&(_0x101084===_univerjs_pro_mcp[_0xebe275(0x13c)][_0xebe275(0x15a)]||_0x339fd0===_univerjs_pro_mcp['MCPConnectionError'][_0xebe275(0x134)])&&(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('div',{'className':_0xebe275(0x122),'children':(0x0,react_jsx_runtime['jsxs'])('div',{'className':'univer-flex\x20univer-items-start\x20univer-gap-2','children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'className':_0xebe275(0x10b),'children':'⚠️'}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('p',{'className':_0xebe275(0x162),'children':_0x5a0e94(_0x339fd0)})]})})]}),(0x0,react_jsx_runtime['jsx'])(_0xebe275(0x1d4),{'className':_0xebe275(0x19c),'children':(0x0,react_jsx_runtime[_0xebe275(0x231)])('div',{'className':_0xebe275(0x242),'children':[(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x1cd),'children':[(0x0,react_jsx_runtime['jsxs'])('label',{'className':_0xebe275(0x148),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'children':'🔑'}),'\x20',_0x291a14['t'](_0xebe275(0x181)),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('span',{'className':_0xebe275(0x1af),'children':'*'}),_0x394ab2&&(0x0,react_jsx_runtime['jsx'])('a',{'className':_0xebe275(0x1d6),'title':_0x291a14['t'](_0xebe275(0x14f)),'role':'button','onClick':()=>_0x2fdc05(!![]),'children':(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_univerjs_icons[_0xebe275(0x18c)],{})})]}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_univerjs_design[_0xebe275(0x1da)],{'type':_0xebe275(0x161),'placeholder':_0x291a14['t']('mcpConfig.apiKeyPlaceholder'),'value':_0x4eed9b,'disabled':loading,'autoComplete':'off','onChange':_0xfcc5aa}),(0x0,react_jsx_runtime['jsx'])('p',{'className':_0xebe275(0x227),'children':_0x291a14['t']('mcpConfig.apiKeyHint')})]}),_0x394ab2&&_0x4c24ae&&(0x0,react_jsx_runtime['jsxs'])(_0xebe275(0x1d4),{'className':'univer-relative\x20univer-rounded-lg\x20univer-border\x20univer-border-blue-200\x20univer-bg-gradient-to-r\x20univer-from-blue-50\x20univer-to-indigo-50\x20univer-p-4','children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('a',{'className':_0xebe275(0x1c3),'role':_0xebe275(0x247),'onClick':()=>_0x2fdc05(![]),'children':(0x0,react_jsx_runtime['jsx'])(_univerjs_icons[_0xebe275(0x129)],{'className':_0xebe275(0x16d)})}),(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x1c8),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':_0xebe275(0x1e6),'children':(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('span',{'className':'univer-text-blue-600','children':'🚀'})}),(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':'univer-flex-1','children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('h4',{'className':'univer-mb-2\x20univer-text-sm\x20univer-font-semibold\x20univer-text-gray-800','children':_0x291a14['t'](_0xebe275(0x14f))}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('p',{'className':'univer-mb-3\x20univer-text-xs\x20univer-text-gray-600','children':_0x291a14['t']('mcpConfig.apiApplyInfo.description')}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':_0xebe275(0x1e8),'children':_0x471545&&(0x0,react_jsx_runtime['jsxs'])('a',{'className':_0xebe275(0x1f6),'href':_0x3db9a8,'target':_0xebe275(0x13e),'rel':_0xebe275(0x1d9),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'children':'🤖'}),_0x291a14['t'](_0xebe275(0x176)),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'className':_0xebe275(0x256),'children':'↗'})]})}),(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x150),'children':['✨','\x20',_0x291a14['t'](_0xebe275(0x105))]})]})]})]}),_0x4e903c[_0xebe275(0x17e)]&&(0x0,react_jsx_runtime['jsxs'])('div',{'className':_0xebe275(0x1e1),'children':[(0x0,react_jsx_runtime['jsxs'])('h4',{'className':'univer-mb-3\x20univer-flex\x20univer-items-center\x20univer-gap-2\x20univer-text-sm\x20univer-font-semibold\x20univer-text-gray-800','children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'children':'🔗'}),'\x20',_0x291a14['t'](_0xebe275(0x238))]}),(0x0,react_jsx_runtime['jsxs'])('div',{'className':'univer-space-y-4','children':[(0x0,react_jsx_runtime['jsxs'])('div',{'className':_0xebe275(0x16b),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('p',{'className':_0xebe275(0x16f),'children':_0x291a14['t'](_0xebe275(0x15e))}),(0x0,react_jsx_runtime[_0xebe275(0x231)])('div',{'className':_0xebe275(0x1cd),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':_0xebe275(0x132),'children':_0x291a14['t']('mcpConfig.configStepTitle')}),(0x0,react_jsx_runtime[_0xebe275(0x231)])('div',{'className':_0xebe275(0x1aa),'children':[(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x20e),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'className':_0xebe275(0x1c7),'children':'1'}),_0x291a14['t']('mcpConfig.configStep1')]}),(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x20e),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'className':_0xebe275(0x1c7),'children':'2'}),_0x291a14['t'](_0xebe275(0x1df))]}),(0x0,react_jsx_runtime['jsxs'])('div',{'className':_0xebe275(0x20e),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'className':'univer-flex\x20univer-size-4\x20univer-items-center\x20univer-justify-center\x20univer-rounded-full\x20univer-bg-blue-100\x20univer-text-xs\x20univer-font-medium\x20univer-text-blue-600','children':'3'}),_0x291a14['t']('mcpConfig.configStep3')]})]})]})]}),(0x0,react_jsx_runtime[_0xebe275(0x231)])('div',{'className':'univer-space-y-2','children':[(0x0,react_jsx_runtime['jsx'])(_0xebe275(0x1d4),{'className':'univer-text-xs\x20univer-font-medium\x20univer-text-gray-700','children':'MCP\x20Configuration'}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':_0xebe275(0x207),'children':(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('pre',{'className':_0xebe275(0x255),'children':JSON[_0xebe275(0x190)]({'mcpServers':{'univer':{'url':'https://mcp.univer.ai/mcp/?univer_session_id='+(_0x836206||_0xebe275(0x175)),'type':_0xebe275(0x1ea),'headers':{'Authorization':'Bearer\x20'+(_0x4eed9b||_0xebe275(0x212))}}}},null,0x2)})})]}),(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x16b),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':_0xebe275(0x132),'children':_0x291a14['t'](_0xebe275(0x14a))}),(0x0,react_jsx_runtime['jsxs'])(_0xebe275(0x1d4),{'className':_0xebe275(0x1cd),'children':[(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x1ed),'children':[(0x0,react_jsx_runtime['jsx'])('div',{'className':'univer-mt-1.5\x20univer-size-2\x20univer-shrink-0\x20univer-rounded-full\x20univer-bg-blue-500'}),(0x0,react_jsx_runtime[_0xebe275(0x231)])('div',{'className':_0xebe275(0x110),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':'univer-text-xs\x20univer-font-medium\x20univer-text-gray-600','children':'univer_session_id:'}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':'univer-text-xs\x20univer-text-gray-500','children':_0x291a14['t'](_0xebe275(0x1dc))})]})]}),(0x0,react_jsx_runtime['jsxs'])(_0xebe275(0x1d4),{'className':_0xebe275(0x1ed),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':_0xebe275(0x169)}),(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':_0xebe275(0x110),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('div',{'className':_0xebe275(0x11e),'children':_0xebe275(0x21b)}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x1d4),{'className':_0xebe275(0x227),'children':_0x291a14['t'](_0xebe275(0x251))})]})]})]})]})]})]}),(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_univerjs_design[_0xebe275(0x1e0)],{'onClick':_0x398d04,'disabled':!_0x480f14||loading,'className':'univer-w-full\x20!univer-border-green-600\x20!univer-bg-green-600\x20!univer-text-white\x20hover:!univer-border-green-700\x20hover:!univer-bg-green-700\x20disabled:!univer-border-gray-300\x20disabled:!univer-bg-gray-300\x20disabled:!univer-text-gray-500','children':loading?(0x0,react_jsx_runtime['jsxs'])(_0xebe275(0x119),{'className':_0xebe275(0x20e),'children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'children':'⟲'}),_0x291a14['t'](_0xebe275(0x222))]}):(0x0,react_jsx_runtime['jsxs'])(_0xebe275(0x119),{'className':'univer-flex\x20univer-items-center\x20univer-gap-2','children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_univerjs_icons[_0xebe275(0x116)],{}),_0x291a14['t'](_0xebe275(0x1f0))]})}),(0x0,react_jsx_runtime['jsx'])(_0xebe275(0x1d4),{'className':'univer-rounded-lg\x20univer-border\x20univer-border-blue-200\x20univer-bg-blue-50\x20univer-p-3','children':(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'className':'univer-flex\x20univer-gap-3','children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])(_0xebe275(0x119),{'className':_0xebe275(0x220),'children':'💡'}),(0x0,react_jsx_runtime[_0xebe275(0x231)])('div',{'className':'univer-space-y-1\x20univer-text-xs\x20univer-text-blue-700','children':[(0x0,react_jsx_runtime[_0xebe275(0x1ff)])('div',{'className':_0xebe275(0x1b8),'children':'Configuration\x20Notes:'}),(0x0,react_jsx_runtime[_0xebe275(0x231)])(_0xebe275(0x1d4),{'children':['•',_0x291a14['t']('mcpConfig.note1')]}),(0x0,react_jsx_runtime[_0xebe275(0x231)])('div',{'children':['•',_0x291a14['t'](_0xebe275(0x235))]})]})]})})]})})]});}const MCP_UI_PLUGIN_CONFIG_KEY=_0x586328(0x215),configSymbol=Symbol(MCP_UI_PLUGIN_CONFIG_KEY),defaultPluginConfig={'showDeveloperTools':![],'showStatus':!![]};function _typeof(_0x2b1724){'@babel/helpers - typeof';const _0xc07396=_0x586328;return _typeof=_0xc07396(0x186)==typeof Symbol&&_0xc07396(0x22d)==typeof Symbol['iterator']?function(_0x41f450){return typeof _0x41f450;}:function(_0x338ac6){const _0x4605d5=_0xc07396;return _0x338ac6&&_0x4605d5(0x186)==typeof Symbol&&_0x338ac6[_0x4605d5(0x209)]===Symbol&&_0x338ac6!==Symbol[_0x4605d5(0x135)]?_0x4605d5(0x22d):typeof _0x338ac6;},_typeof(_0x2b1724);}function toPrimitive(_0x32883c,_0x59a274){const _0x2b3725=_0x586328;if(_0x2b3725(0x125)!=_typeof(_0x32883c)||!_0x32883c)return _0x32883c;var _0x523abf=_0x32883c[Symbol[_0x2b3725(0x204)]];if(void 0x0!==_0x523abf){var _0x36ddfa=_0x523abf[_0x2b3725(0x1c0)](_0x32883c,_0x59a274||'default');if(_0x2b3725(0x125)!=_typeof(_0x36ddfa))return _0x36ddfa;throw new TypeError(_0x2b3725(0x143));}return(_0x2b3725(0x11c)===_0x59a274?String:Number)(_0x32883c);}function _0x3712(){const _0x55aa31=['MCPStatusDisplay','\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20univer-cursor-pointer\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20hover:univer-opacity-80\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Inject','mcpConfig.note2','onStarting','点击连接\x20MCP','mcpConfig.connectionInfo','setItem','packageName','_loading$','clsx','univer-text-green-600\x20univer-bg-green-50\x20univer-border-green-200','IUIPartsService','Max\x20Retries','MCPUIMenuController','showStatus','univer-space-y-5','univer-text-gray-600\x20univer-bg-gray-50\x20univer-border-gray-200','useState','next','mcpStatus.networkError','button','Success','value','复制以下\x20JSON\x20配置','_localStorageService','CONNECTED','showConfigPanel','connectionError$','唯一会话标识符。如果您打开了多个\x20Univer\x20实例,每个实例必须使用不同的\x20session_id\x20以避免连接冲突。','toStringTag','mcpConfig.authorizationDescription','univer-text-gray-500','Injector','MCPConnectionUIController','univer-overflow-hidden\x20univer-whitespace-pre-wrap\x20univer-break-all\x20univer-text-xs\x20univer-text-gray-800','univer-text-gray-400','[MCPConfigUI]\x20Could\x20not\x20validate\x20API\x20key\x20with\x20core\x20plugin:','_messageService','mcpConfig.apiApplyInfo.getStarted','trim','mergeMenu','MCP\x20Connection\x20Failed','RETRYING','MenuIcon','univer-shrink-0\x20univer-text-red-500','_initStatusComponent','univer.plus','univer-flex\x20univer-max-h-[80vh]\x20univer-min-h-[320px]\x20univer-flex-col','_loadStoredApiKey','univer-min-w-0\x20univer-flex-1','Your\x20API\x20key\x20will\x20be\x20stored\x20locally\x20in\x20this\x20browser','mcpStatus.maxRetriesExceeded','removeItem','mcpConfig.connectionStatus.connecting','_registerComponent','CheckMarkIcon','IMenuManagerService','mcpConfig.connectionStatus.connected','span','_config$','length','string','mcpConfig.connectionError.networkError','univer-text-xs\x20univer-font-medium\x20univer-text-gray-600','mcp-config-dialog','NETWORK_ERROR','mcpStatus.failed','univer-mt-2\x20univer-rounded-md\x20univer-border\x20univer-border-red-200\x20univer-bg-red-50\x20univer-px-3\x20univer-py-2','15QnOPIg','Configuration\x20Parameters:','object','MCP\x20Disconnected','mcpStatus.disconnected','univer-text-blue-600\x20univer-bg-blue-50\x20univer-border-blue-200','CloseIcon','forEach','4139842qINsYJ','0.22.1','mcpConfig.connectionStatus.retrying','mcpStatus.unauthorized','API\x20key\x20is\x20required','_uiPartsService','MCP\x20Configuration','univer-text-xs\x20univer-font-medium\x20univer-text-gray-700','保存中...','UNAUTHORIZED','prototype','_injector','MCP\x20已断开','Restart\x20your\x20MCP\x20client\x20to\x20apply\x20the\x20configuration','MCP:\x20会话\x20ID\x20已被占用','配置保存失败','1780164LtTbsV','MCPConnectionStatus','zhCN','_blank','Configure\x20MCP\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets','univer.ai','MCP:\x20未授权','OffLineIcon','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','sessionId$','_apiKey$','Connecting...','配置更改将立即生效','univer-flex\x20univer-items-center\x20univer-gap-2\x20univer-text-sm\x20univer-font-medium\x20univer-text-gray-700','_connectionController','mcpConfig.configParameters','Click\x20to\x20configure\x20MCP','defineProperty','API\x20密钥不能为空','MCP:\x20Network\x20Error','mcpConfig.apiApplyInfo.title','univer-mt-2\x20univer-text-xs\x20univer-text-gray-500','Session-id\x20is\x20currently\x20occupied,\x20please\x20try\x20again\x20later','disposeWithMe','Authorization\x20failed,\x20please\x20check\x20your\x20API\x20key','univer-bg-blue-500','Connected','MCPConnectionController','Invalid\x20API\x20key,\x20please\x20check\x20if\x20the\x20key\x20is\x20correct','WebSocketService','BehaviorSubject','FAILED','Add\x20the\x20following\x20configuration\x20to\x20your\x20MCP\x20client\x20settings:','close','register','mcpConfig.configInstructions','会话\x20ID\x20已被占用,请稍后再试','Bearer\x20','text','univer-m-0\x20univer-text-sm\x20univer-font-medium\x20univer-text-red-800','Your\x20API\x20key\x20is\x20stored\x20securely\x20in\x20local\x20storage','CommandType','OTHERS','mcpStatus.sessionOccupied','Tooltip','_commandService','univer-mt-1.5\x20univer-size-2\x20univer-shrink-0\x20univer-rounded-full\x20univer-bg-blue-500','mcpConfig.connectionError.sessionOccupied','univer-space-y-3','__setCustomHeaders','univer-size-4','mcpStatus.clickToConfigure','univer-text-xs\x20univer-text-gray-600','registerComponent','LocaleService','useObservable','DependentOn','OnLineIcon','<SESSION_ID>','mcpConfig.apiApplyInfo.univerAiLabel','MCP\x20客户端配置','Plugin','ISocketService','[MCPConfigUI]\x20Failed\x20to\x20save\x20configuration:','MCP\x20已连接','HEADER_MENU','API\x20密钥无效,请检查密钥是否正确','showDeveloperTools','_mcpCoreConfig$','超出最大重试次数,请稍后再试','mcpConfig.apiKey','Enable\x20authentication\x20for\x20secure\x20connections','connectionStatus$','error','_initializeCommands','function','getConfig','ICommandService','Get\x20your\x20API\x20key\x20in\x20seconds','subscribeConfigValue$','将配置添加到您的\x20MCP\x20客户端设置文件中','HelpIcon','apiKey','未连接','univer-size-2\x20univer-rounded-full','stringify','Copy\x20the\x20JSON\x20configuration\x20below','启用身份验证','209404StLHtm','Error','mcpConfig.title','您的\x20API\x20密钥将在此浏览器中本地存储','MCP\x20连接中...','Maximum\x20retry\x20attempts\x20exceeded.\x20Please\x20try\x20again\x20later','MessageType','Disposable','univer-text-sm\x20univer-text-gray-500','univer-flex-1\x20univer-overflow-auto\x20univer-px-6\x20univer-py-5','连接中...','decorate','CONNECTING','Module','_logService','连接失败','_initAutoConnect','connectInjector','权限验证失败,请检查您的\x20API\x20密钥','1244960oRQPTQ','16628301WDHVQY','MCPConnectionError','68790HGHWCL','univer-space-y-1\x20univer-text-xs\x20univer-text-gray-600','配置步骤:','mcpConfig.connectionStatus.failed','mcpConfig.validation.invalidConfig','https://console.univer.plus','univer-text-red-500','您的\x20API\x20密钥安全存储在本地存储中','MCP\x20配置','pluginName','ILocalStorageService','univer-mr-2\x20univer-flex\x20univer-text-xl','_createConfigPanelComponent','1367568Hwwtor','_localeService','univer-font-medium','Retrying...','配置保存成功','_initConfigSync','已连接','mcpStatus.connecting','MAX_RETRIES_EXCEEDED','univer-text-sm\x20univer-leading-8\x20univer-text-gray-600\x20dark:!univer-text-gray-200','call','univer-text-yellow-500','univer-flex\x20univer-items-center','univer-absolute\x20univer-right-3\x20univer-top-3\x20univer-flex\x20univer-size-6\x20univer-items-center\x20univer-justify-center\x20univer-text-gray-500\x20univer-transition-all\x20univer-duration-200\x20hover:univer-scale-110\x20hover:univer-text-gray-700','MCPConfigPanel','Save\x20Configuration','validateApiKey','univer-flex\x20univer-size-4\x20univer-items-center\x20univer-justify-center\x20univer-rounded-full\x20univer-bg-blue-100\x20univer-text-xs\x20univer-font-medium\x20univer-text-blue-600','univer-flex\x20univer-items-start\x20univer-gap-3\x20univer-pr-8','DISCONNECTED','UniverMCPPlugin','mcp-ui.command.openConfigPanel','Session\x20ID','univer-space-y-2','MCP_PLUGIN_CONFIG_KEY','MCP\x20Retrying...','get','API\x20Key\x20connects\x20you\x20to\x20Univer\x20MCP\x20Server\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets.\x20Get\x20your\x20API\x20key\x20from\x20our\x20console\x20to\x20get\x20started.','warn','SESSION_ID_OCCUPIED','div','OpenMCPConfigPanelCommand','univer-ml-1\x20univer-flex\x20univer-size-4\x20univer-items-center\x20univer-justify-center\x20univer-text-blue-600\x20univer-transition-all\x20univer-duration-200\x20hover:univer-scale-110\x20hover:univer-text-blue-800','mcp.apiKey','has','noopener\x20noreferrer','Input','univer-flex\x20univer-items-center\x20univer-gap-3','mcpConfig.sessionIdDescription','_initializeMenus','NONE','mcpConfig.configStep2','Button','univer-rounded-lg\x20univer-border\x20univer-border-gray-200\x20univer-bg-gray-50\x20univer-p-4','启用身份验证以获得安全连接','3GpUCAC','_dialogService','请输入您的\x20API\x20密钥','univer-flex\x20univer-size-10\x20univer-shrink-0\x20univer-items-center\x20univer-justify-center\x20univer-rounded-full\x20univer-bg-blue-100','univer-bg-green-500','univer-flex\x20univer-flex-wrap\x20univer-gap-2','MCP:\x20Unauthorized','http','_config','mcpConfig.validation.apiKeyTooShort','univer-flex\x20univer-items-start\x20univer-gap-3','Failed\x20to\x20save\x20configuration','IConfigService','mcpConfig.save','Enable\x20Authentication','\x20-\x20','API\x20key\x20with\x20Bearer\x20prefix.','useCallback','univer-bg-gray-500','univer-inline-flex\x20univer-items-center\x20univer-gap-1\x20univer-rounded-md\x20univer-border\x20univer-border-purple-300\x20univer-bg-white\x20univer-px-3\x20univer-py-1.5\x20univer-text-xs\x20univer-font-medium\x20univer-text-purple-600\x20univer-shadow-sm\x20univer-transition-all\x20univer-duration-200\x20hover:univer-border-purple-400\x20hover:univer-bg-purple-50\x20hover:univer-shadow-md','配置参数:','几秒钟内获取您的\x20API\x20密钥','What\x20is\x20API\x20Key?','API\x20密钥','subscribe','配置\x20MCP\x20使用\x20AI\x20操作电子表格','mcpConfig.configSaved','_mcpConnectionController','jsx','includes','https://console.univer.ai','配置无效','enUS','toPrimitive','UniverMCPUIPlugin','_handleConfigSave','univer-max-w-full\x20univer-rounded\x20univer-border\x20univer-bg-white\x20univer-p-3','将以下配置添加到您的\x20MCP\x20客户端设置中:','constructor','MCP:\x20超出最大重试次数','API\x20密钥长度至少需要\x2010\x20位','mcpConfig.validation.invalidApiKey','IMessageService','univer-flex\x20univer-items-center\x20univer-gap-2','enableAutoConnect','最大重试次数','_componentManager','<API_KEY>','mcpConfig.connectionStatus.disconnected','MenuItemType','mcp-ui.config','mcpServerUrl','BuiltInUIPart','Univer\x20AI\x20控制台','open','Configuration\x20saved\x20successfully','Authorization:','MCP\x20连接失败','isValid','getCurrentConfig','Univer\x20AI\x20Console','univer-shrink-0\x20univer-text-blue-500','show','mcpConfig.saving','univer-text-sm\x20univer-font-medium','univer-border-b\x20univer-border-gray-100\x20univer-px-6\x20univer-py-4','Saving...','网络连接错误,请检查您的网络连接','univer-text-xs\x20univer-text-gray-500','add','_configService','COMMAND','Network\x20connection\x20error.\x20Please\x20check\x20your\x20internet\x20connection','RibbonStartGroup','symbol','MCPConfigUIController','univer-text-green-500','MCP:\x20Max\x20Retries\x20Exceeded','jsxs'];_0x3712=function(){return _0x55aa31;};return _0x3712();}function toPropertyKey(_0xac055d){const _0x1d99a1=_0x586328;var _0xca9024=toPrimitive(_0xac055d,'string');return _0x1d99a1(0x22d)==_typeof(_0xca9024)?_0xca9024:_0xca9024+'';}function _defineProperty(_0x3ec876,_0x2d1df7,_0x3c0b66){return(_0x2d1df7=toPropertyKey(_0x2d1df7))in _0x3ec876?Object['defineProperty'](_0x3ec876,_0x2d1df7,{'value':_0x3c0b66,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3ec876[_0x2d1df7]=_0x3c0b66,_0x3ec876;}function __decorateParam(_0x1774b5,_0x21e86c){return function(_0x1ac8ae,_0x4b3fbe){_0x21e86c(_0x1ac8ae,_0x4b3fbe,_0x1774b5);};}function __decorate(_0x4260b8,_0x4b2eeb,_0x2cc558,_0x3dc369){const _0x573d36=_0x586328;var _0x179249=arguments['length'],_0x311fdd=_0x179249<0x3?_0x4b2eeb:_0x3dc369===null?_0x3dc369=Object['getOwnPropertyDescriptor'](_0x4b2eeb,_0x2cc558):_0x3dc369,_0x5a9f9c;if(typeof Reflect==='object'&&typeof Reflect[_0x573d36(0x19e)]===_0x573d36(0x186))_0x311fdd=Reflect[_0x573d36(0x19e)](_0x4260b8,_0x4b2eeb,_0x2cc558,_0x3dc369);else{for(var _0x3eeda1=_0x4260b8[_0x573d36(0x11b)]-0x1;_0x3eeda1>=0x0;_0x3eeda1--)if(_0x5a9f9c=_0x4260b8[_0x3eeda1])_0x311fdd=(_0x179249<0x3?_0x5a9f9c(_0x311fdd):_0x179249>0x3?_0x5a9f9c(_0x4b2eeb,_0x2cc558,_0x311fdd):_0x5a9f9c(_0x4b2eeb,_0x2cc558))||_0x311fdd;}return _0x179249>0x3&&_0x311fdd&&Object[_0x573d36(0x14c)](_0x4b2eeb,_0x2cc558,_0x311fdd),_0x311fdd;}const MCP_API_KEY_STORAGE_KEY=_0x586328(0x1d7),MCP_CONFIG_DIALOG_ID=_0x586328(0x11f);let MCPConfigUIController=class MCPConfigUIController extends _univerjs_core[_0x586328(0x19a)]{constructor(_0x5794f5,_0x3481b9,_0x19beda,_0x24423c,_0x3fe813,_0x121f9b,_0x19c63f,_0x1e0ce2,_0x518b6e,_0xa19d40){const _0x2c5173=_0x586328;super(),this[_0x2c5173(0x136)]=_0x5794f5,this[_0x2c5173(0x130)]=_0x3481b9,this[_0x2c5173(0x229)]=_0x19beda,this[_0x2c5173(0x24b)]=_0x24423c,this[_0x2c5173(0x1e4)]=_0x3fe813,this[_0x2c5173(0x104)]=_0x121f9b,this[_0x2c5173(0x211)]=_0x19c63f,this['_localeService']=_0x1e0ce2,this[_0x2c5173(0x1a1)]=_0x518b6e,this[_0x2c5173(0x1fe)]=_0xa19d40,_defineProperty(this,_0x2c5173(0x23b),new rxjs[(_0x2c5173(0x159))](![])),_defineProperty(this,_0x2c5173(0x17f),new rxjs['BehaviorSubject']({})),_defineProperty(this,_0x2c5173(0x11a),new rxjs[(_0x2c5173(0x159))]({})),_defineProperty(this,'_apiKey$',new rxjs[(_0x2c5173(0x159))]('')),_defineProperty(this,_0x2c5173(0x206),async _0x49be29=>{const _0x497f56=_0x2c5173;this[_0x497f56(0x23b)]['next'](!![]);try{var _0x1d2198,_0x408f01;const _0x10189c=await this['_validateConfig'](_0x49be29);if(!_0x10189c[_0x497f56(0x21d)]){this[_0x497f56(0x104)]['show']({'type':_univerjs_design['MessageType'][_0x497f56(0x194)],'content':_0x10189c['errorMessage']||this[_0x497f56(0x1b7)]['t'](_0x497f56(0x1ad))});return;}if(_0x49be29[_0x497f56(0x18d)])await this['_localStorageService'][_0x497f56(0x239)](MCP_API_KEY_STORAGE_KEY,_0x49be29[_0x497f56(0x18d)][_0x497f56(0x106)]());else await this[_0x497f56(0x24b)][_0x497f56(0x113)](MCP_API_KEY_STORAGE_KEY);this[_0x497f56(0x145)][_0x497f56(0x245)](((_0x1d2198=_0x49be29['apiKey'])===null||_0x1d2198===void 0x0?void 0x0:_0x1d2198[_0x497f56(0x106)]())||''),this[_0x497f56(0x1fe)][_0x497f56(0x16c)]({'Authorization':_0x497f56(0x160)+((_0x408f01=_0x49be29[_0x497f56(0x18d)])===null||_0x408f01===void 0x0?void 0x0:_0x408f01['trim']())}),this[_0x497f56(0x104)][_0x497f56(0x221)]({'type':_univerjs_design[_0x497f56(0x199)][_0x497f56(0x248)],'content':this[_0x497f56(0x1b7)]['t'](_0x497f56(0x1fd))}),setTimeout(()=>{const _0x184785=_0x497f56;this[_0x184785(0x1e4)][_0x184785(0x15c)](MCP_CONFIG_DIALOG_ID);},0x320);}catch(_0x4f020c){this[_0x497f56(0x1a1)][_0x497f56(0x184)](_0x497f56(0x17a),_0x4f020c),this[_0x497f56(0x104)]['show']({'type':_univerjs_design[_0x497f56(0x199)][_0x497f56(0x194)],'content':this[_0x497f56(0x1b7)]['t']('mcpConfig.configError')});}finally{this[_0x497f56(0x23b)][_0x497f56(0x245)](![]);}}),this['_initConfigSync'](),this['_loadStoredApiKey'](),this[_0x2c5173(0x115)]();}[_0x586328(0x24d)](){const _0x182475=_0x586328,_0x5082c8=this[_0x182475(0x229)][_0x182475(0x187)](MCP_UI_PLUGIN_CONFIG_KEY);if(_0x5082c8===null||_0x5082c8===void 0x0?void 0x0:_0x5082c8[_0x182475(0x17e)])this[_0x182475(0x1e4)][_0x182475(0x219)]({'id':MCP_CONFIG_DIALOG_ID,'title':{'title':this[_0x182475(0x1b7)]['t'](_0x182475(0x195))},'children':{'label':_0x182475(0x1c4)},'width':0x244,'draggable':!![],'destroyOnClose':!![],'onClose':()=>{const _0x45cc9d=_0x182475;this[_0x45cc9d(0x1e4)][_0x45cc9d(0x15c)](MCP_CONFIG_DIALOG_ID);}});}[_0x586328(0x21e)](){const _0x1202e0=_0x586328;return this['_mcpCoreConfig$'][_0x1202e0(0x249)];}[_0x586328(0x115)](){const _0x3b6f42=_0x586328;this[_0x3b6f42(0x152)](this['_componentManager'][_0x3b6f42(0x15d)](_0x3b6f42(0x1c4),this[_0x3b6f42(0x1b5)]()));}[_0x586328(0x1b5)](){const _0xaca03e=_0x586328;return(0x0,_univerjs_ui[_0xaca03e(0x1a4)])(()=>{const _0x1466fe=_0xaca03e;var _0x42278f,_0x8bbe46,_0x18f894;return(0x0,react_jsx_runtime['jsx'])(MCPConfigPanel,{'config':this['_config$'][_0x1466fe(0x249)],'mcpCoreConfig':this[_0x1466fe(0x17f)][_0x1466fe(0x249)],'currentApiKey$':this[_0x1466fe(0x145)],'onSave':this[_0x1466fe(0x206)],'loading':this[_0x1466fe(0x23b)][_0x1466fe(0x249)],'connectionStatus$':(_0x42278f=this[_0x1466fe(0x1fe)])===null||_0x42278f===void 0x0?void 0x0:_0x42278f['connectionStatus$'],'connectionError$':(_0x8bbe46=this[_0x1466fe(0x1fe)])===null||_0x8bbe46===void 0x0?void 0x0:_0x8bbe46[_0x1466fe(0x24e)],'currentSessionId$':(_0x18f894=this[_0x1466fe(0x1fe)])===null||_0x18f894===void 0x0?void 0x0:_0x18f894[_0x1466fe(0x144)]});},this['_injector']);}[_0x586328(0x1bb)](){const _0x164bf4=_0x586328;this[_0x164bf4(0x152)](this[_0x164bf4(0x229)][_0x164bf4(0x18a)](_univerjs_pro_mcp[_0x164bf4(0x1ce)])['subscribe'](_0x2ebeee=>{this['_mcpCoreConfig$']['next'](_0x2ebeee||{});}));const _0x471431=this[_0x164bf4(0x229)][_0x164bf4(0x187)](_univerjs_pro_mcp['MCP_PLUGIN_CONFIG_KEY']);this[_0x164bf4(0x17f)][_0x164bf4(0x245)](_0x471431||{}),this[_0x164bf4(0x152)](this[_0x164bf4(0x229)][_0x164bf4(0x18a)](MCP_UI_PLUGIN_CONFIG_KEY)[_0x164bf4(0x1fb)](_0x4a2e90=>{const _0x50bc8d=_0x164bf4;this[_0x50bc8d(0x11a)][_0x50bc8d(0x245)](_0x4a2e90||{});}));const _0x5e93b3=this[_0x164bf4(0x229)][_0x164bf4(0x187)](MCP_UI_PLUGIN_CONFIG_KEY);this['_config$'][_0x164bf4(0x245)](_0x5e93b3||{});}async[_0x586328(0x10f)](){const _0x1edfd1=_0x586328,_0x56d381=this[_0x1edfd1(0x229)][_0x1edfd1(0x187)](MCP_UI_PLUGIN_CONFIG_KEY);if(!(_0x56d381===null||_0x56d381===void 0x0?void 0x0:_0x56d381[_0x1edfd1(0x17e)]))return;const _0x4182e5=await this[_0x1edfd1(0x24b)]['getItem'](MCP_API_KEY_STORAGE_KEY);_0x4182e5&&(this[_0x1edfd1(0x1fe)]['__setCustomHeaders']({'Authorization':_0x1edfd1(0x160)+_0x4182e5}),this[_0x1edfd1(0x145)]['next'](_0x4182e5));}async['_validateConfig'](_0x574df6){const _0x7d538e=_0x586328;if(!_0x574df6[_0x7d538e(0x18d)]||_0x574df6[_0x7d538e(0x18d)][_0x7d538e(0x106)]()[_0x7d538e(0x11b)]===0x0)return{'isValid':![],'errorMessage':this[_0x7d538e(0x1b7)]['t']('mcpConfig.validation.apiKeyRequired')};if(_0x574df6['apiKey'][_0x7d538e(0x106)]()[_0x7d538e(0x11b)]<0xa)return{'isValid':![],'errorMessage':this['_localeService']['t'](_0x7d538e(0x1ec))};try{const _0x4e831b=await this[_0x7d538e(0x136)][_0x7d538e(0x1d0)](_univerjs_pro_mcp['MCPConnectionController'])[_0x7d538e(0x1c6)](_0x574df6[_0x7d538e(0x18d)][_0x7d538e(0x106)]());if(!_0x4e831b[_0x7d538e(0x21d)])return{'isValid':![],'errorMessage':_0x4e831b['error']||this[_0x7d538e(0x1b7)]['t'](_0x7d538e(0x20c))};return{'isValid':!![]};}catch(_0x1f294d){return console[_0x7d538e(0x1d2)](_0x7d538e(0x257),_0x1f294d),{'isValid':!![]};}}};MCPConfigUIController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x586328(0x234)])(_univerjs_core[_0x586328(0x253)])),__decorateParam(0x1,_univerjs_ui[_0x586328(0x23e)]),__decorateParam(0x2,_univerjs_core[_0x586328(0x1ef)]),__decorateParam(0x3,_univerjs_core[_0x586328(0x1b3)]),__decorateParam(0x4,_univerjs_ui['IDialogService']),__decorateParam(0x5,_univerjs_ui[_0x586328(0x20d)]),__decorateParam(0x6,(0x0,_univerjs_core[_0x586328(0x234)])(_univerjs_ui['ComponentManager'])),__decorateParam(0x7,(0x0,_univerjs_core[_0x586328(0x234)])(_univerjs_core['LocaleService'])),__decorateParam(0x8,_univerjs_core['ILogService']),__decorateParam(0x9,(0x0,_univerjs_core[_0x586328(0x234)])(_univerjs_pro_mcp[_0x586328(0x156)]))],MCPConfigUIController);const OpenMCPConfigPanelCommand={'id':_0x586328(0x1cb),'type':_univerjs_core[_0x586328(0x164)][_0x586328(0x22a)],'handler':async(_0x51cd69,_0x75496b)=>{const _0x500c96=_0x586328;return _0x51cd69[_0x500c96(0x1d0)](MCPConfigUIController)[_0x500c96(0x24d)](),!![];}};function mapStatusToI18NKey(_0x2d05aa,_0x5b0c52){const _0x1dd31b=_0x586328;switch(_0x2d05aa){case _univerjs_pro_mcp[_0x1dd31b(0x13c)][_0x1dd31b(0x1c9)]:return _0x1dd31b(0x127);case _univerjs_pro_mcp[_0x1dd31b(0x13c)][_0x1dd31b(0x19f)]:return _0x1dd31b(0x1bd);case _univerjs_pro_mcp[_0x1dd31b(0x13c)][_0x1dd31b(0x24c)]:return'mcpStatus.connected';case _univerjs_pro_mcp[_0x1dd31b(0x13c)]['FAILED']:switch(_0x5b0c52){case _univerjs_pro_mcp['MCPConnectionError']['UNAUTHORIZED']:return _0x1dd31b(0x12e);case _univerjs_pro_mcp[_0x1dd31b(0x1a8)][_0x1dd31b(0x1d3)]:return _0x1dd31b(0x166);case _univerjs_pro_mcp[_0x1dd31b(0x1a8)]['NETWORK_ERROR']:return _0x1dd31b(0x246);case _univerjs_pro_mcp[_0x1dd31b(0x1a8)]['MAX_RETRIES_EXCEEDED']:return _0x1dd31b(0x112);default:return _0x1dd31b(0x121);}case _univerjs_pro_mcp[_0x1dd31b(0x13c)][_0x1dd31b(0x109)]:return'mcpStatus.retrying';default:return'mcpStatus.unknown';}}function getTooltipText(_0x4430fb,_0x4f28db,_0x45d439,_0x54facb=!![]){const _0x1cd5e3=_0x586328,_0x34627b=mapStatusToI18NKey(_0x4430fb,_0x4f28db),_0xd6b00c=_0x45d439['t'](_0x34627b);if(!_0x54facb)return _0xd6b00c;if(_0x4430fb===_univerjs_pro_mcp[_0x1cd5e3(0x13c)][_0x1cd5e3(0x1c9)]&&_0x4f28db===_univerjs_pro_mcp[_0x1cd5e3(0x1a8)][_0x1cd5e3(0x134)])return _0xd6b00c+'\x20-\x20'+_0x45d439['t'](_0x1cd5e3(0x16e));else{if(_0x4430fb===_univerjs_pro_mcp[_0x1cd5e3(0x13c)]['CONNECTED'])return''+_0xd6b00c;else{if(_0x4430fb===_univerjs_pro_mcp[_0x1cd5e3(0x13c)]['DISCONNECTED']||_0x4430fb===_univerjs_pro_mcp[_0x1cd5e3(0x13c)][_0x1cd5e3(0x15a)])return _0xd6b00c+_0x1cd5e3(0x1f2)+_0x45d439['t']('mcpStatus.clickToConnect');}}return _0xd6b00c;}function getStatusColor(_0x82852){const _0x2ecb60=_0x586328;switch(_0x82852){case _univerjs_pro_mcp[_0x2ecb60(0x13c)][_0x2ecb60(0x24c)]:return _0x2ecb60(0x22f);case _univerjs_pro_mcp[_0x2ecb60(0x13c)][_0x2ecb60(0x19f)]:case _univerjs_pro_mcp[_0x2ecb60(0x13c)]['RETRYING']:return _0x2ecb60(0x1c1);case _univerjs_pro_mcp['MCPConnectionStatus'][_0x2ecb60(0x15a)]:case _univerjs_pro_mcp['MCPConnectionStatus'][_0x2ecb60(0x1c9)]:return _0x2ecb60(0x1af);default:return _0x2ecb60(0x252);}}function MCPStatusDisplay(_0x40faec){const _0x551bb0=_0x586328,{status$:_0x3a7aca,error$:_0x491865,onConfigure:_0x548f21,showClickable:showClickable=!![]}=_0x40faec,_0x1cfcad=(0x0,_univerjs_ui[_0x551bb0(0x172)])(_0x3a7aca,_univerjs_pro_mcp[_0x551bb0(0x13c)][_0x551bb0(0x1c9)]),_0x2674b2=(0x0,_univerjs_ui[_0x551bb0(0x172)])(_0x491865,_univerjs_pro_mcp[_0x551bb0(0x1a8)]['NONE']),_0x33e1cd=(0x0,_univerjs_ui['useDependency'])(_univerjs_core[_0x551bb0(0x171)]),_0x203d77=_0x1cfcad===_univerjs_pro_mcp[_0x551bb0(0x13c)][_0x551bb0(0x24c)];_0x1cfcad===_univerjs_pro_mcp[_0x551bb0(0x13c)][_0x551bb0(0x19f)]||_univerjs_pro_mcp['MCPConnectionStatus'][_0x551bb0(0x109)];const _0x4bdbad=_0x33e1cd['t'](mapStatusToI18NKey(_0x1cfcad,_0x2674b2)),_0x13ceaa=getTooltipText(_0x1cfcad,_0x2674b2,_0x33e1cd,showClickable),_0x40fa10=getStatusColor(_0x1cfcad),_0x4522ac=_0x203d77?(0x0,react_jsx_runtime[_0x551bb0(0x1ff)])(_univerjs_icons[_0x551bb0(0x174)],{}):(0x0,react_jsx_runtime['jsx'])(_univerjs_icons[_0x551bb0(0x142)],{}),_0x2b2e3a=(0x0,react[_0x551bb0(0x1f4)])(()=>{if(showClickable&&_0x548f21)_0x548f21();},[showClickable,_0x548f21]);function _0x1c898f(){const _0x1c40dc=_0x551bb0;return(0x0,react_jsx_runtime[_0x1c40dc(0x231)])('div',{'className':(0x0,_univerjs_design['clsx'])(_0x1c40dc(0x1c2),showClickable&&_0x548f21&&_0x1c40dc(0x233)),'role':'button','onClick':showClickable&&_0x548f21?_0x2b2e3a:void 0x0,'children':[(0x0,react_jsx_runtime[_0x1c40dc(0x1ff)])('div',{'className':(0x0,_univerjs_design[_0x1c40dc(0x23c)])(_0x1c40dc(0x1b4),_0x40fa10),'children':_0x4522ac}),(0x0,react_jsx_runtime[_0x1c40dc(0x1ff)])('div',{'className':_0x1c40dc(0x1bf),'children':_0x4bdbad})]});}return(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x551bb0(0x167)],{'title':_0x13ceaa,'placement':'bottom','children':_0x1c898f()});}let MCPConnectionUIController=class MCPConnectionUIController extends _univerjs_core[_0x586328(0x19a)]{constructor(_0x335760,_0x379404,_0x427153,_0x4027a1){const _0x5a52aa=_0x586328;super(),this['_injector']=_0x335760,this[_0x5a52aa(0x149)]=_0x379404,this['_uiPartsService']=_0x427153,this['_configService']=_0x4027a1,this[_0x5a52aa(0x1a3)](),this[_0x5a52aa(0x10c)]();}[_0x586328(0x1a3)](){const _0x31dac1=_0x586328,_0x1d4bbc=this[_0x31dac1(0x229)][_0x31dac1(0x187)](MCP_UI_PLUGIN_CONFIG_KEY);if(_0x1d4bbc===null||_0x1d4bbc===void 0x0?void 0x0:_0x1d4bbc[_0x31dac1(0x17e)])this[_0x31dac1(0x149)][_0x31dac1(0x20f)]=![];}['_initStatusComponent'](){const _0xb42e73=_0x586328,_0x1ce90c=this[_0xb42e73(0x229)]['getConfig'](MCP_UI_PLUGIN_CONFIG_KEY);if((_0x1ce90c===null||_0x1ce90c===void 0x0?void 0x0:_0x1ce90c[_0xb42e73(0x241)])!==![])this[_0xb42e73(0x152)](this[_0xb42e73(0x130)][_0xb42e73(0x170)](_univerjs_ui[_0xb42e73(0x217)][_0xb42e73(0x17c)],()=>{const _0x10c8d5=_0xb42e73;var _0x4049f7;return(0x0,_univerjs_ui['connectInjector'])(passProps({'status$':this[_0x10c8d5(0x149)][_0x10c8d5(0x183)],'error$':this[_0x10c8d5(0x149)]['connectionError$'],'onConfigure':()=>this['_handleConfigure'](),'showClickable':(_0x4049f7=_0x1ce90c===null||_0x1ce90c===void 0x0?void 0x0:_0x1ce90c['showDeveloperTools'])!==null&&_0x4049f7!==void 0x0?_0x4049f7:![]}),this[_0x10c8d5(0x136)]);}));}['_handleConfigure'](){const _0x1b4e0c=_0x586328;this['_injector'][_0x1b4e0c(0x1d0)](MCPConfigUIController)[_0x1b4e0c(0x24d)]();}};MCPConnectionUIController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x586328(0x253)])),__decorateParam(0x1,(0x0,_univerjs_core[_0x586328(0x234)])(_univerjs_pro_mcp[_0x586328(0x156)])),__decorateParam(0x2,_univerjs_ui[_0x586328(0x23e)]),__decorateParam(0x3,_univerjs_core[_0x586328(0x1ef)])],MCPConnectionUIController);function _0x53f3(_0x1892cf,_0x2b0d38){_0x1892cf=_0x1892cf-0x104;const _0x37121b=_0x3712();let _0x53f3a2=_0x37121b[_0x1892cf];return _0x53f3a2;}function passProps(_0x1648c2){const {status$:_0x50aa1e,error$:_0x55fc2d,onConfigure:_0x550f2d,showClickable:_0x25ac2c}=_0x1648c2;return function _0x4a757b(){return(0x0,react_jsx_runtime['jsx'])(MCPStatusDisplay,{'status$':_0x50aa1e,'error$':_0x55fc2d,'onConfigure':_0x550f2d,'showClickable':_0x25ac2c});};}function MCPConfigMenuItemFactory(_0x4e103c){const _0x1efee2=_0x586328;return{'id':OpenMCPConfigPanelCommand['id'],'type':_univerjs_ui[_0x1efee2(0x214)]['BUTTON'],'icon':_0x1efee2(0x10a),'title':'mcpConfig.title','tooltip':_0x1efee2(0x195)};}const menuSchema={[_univerjs_ui[_0x586328(0x22c)][_0x586328(0x165)]]:{[OpenMCPConfigPanelCommand['id']]:{'order':0xa,'menuItemFactory':MCPConfigMenuItemFactory}}};let MCPUIMenuController=class MCPUIMenuController extends _univerjs_core[_0x586328(0x19a)]{constructor(_0x27bfde,_0x25b0c3){const _0x285a96=_0x586328;super(),this['_commandService']=_0x27bfde,this['_menuManagerService']=_0x25b0c3,this[_0x285a96(0x185)](),this[_0x285a96(0x1dd)]();}[_0x586328(0x185)](){[OpenMCPConfigPanelCommand]['forEach'](_0x43b6e0=>{const _0x507ff4=_0x53f3;this[_0x507ff4(0x152)](this[_0x507ff4(0x168)]['registerCommand'](_0x43b6e0));});}[_0x586328(0x1dd)](){const _0x24c81a=_0x586328;this['_menuManagerService'][_0x24c81a(0x107)](menuSchema);}};MCPUIMenuController=__decorate([__decorateParam(0x0,_univerjs_core[_0x586328(0x188)]),__decorateParam(0x1,_univerjs_ui[_0x586328(0x117)])],MCPUIMenuController);const locale={'mcpStatus':{'disconnected':_0x586328(0x126),'connecting':'MCP\x20Connecting...','connected':'MCP\x20Connected','failed':_0x586328(0x108),'retrying':_0x586328(0x1cf),'unknown':'MCP\x20Unknown\x20Status','unauthorized':_0x586328(0x1e9),'sessionOccupied':'MCP:\x20Session\x20ID\x20Occupied','networkError':_0x586328(0x14e),'maxRetriesExceeded':_0x586328(0x230),'clickToConnect':'Click\x20to\x20connect\x20MCP','clickToConfigure':_0x586328(0x14b)},'mcpConfig':{'title':_0x586328(0x131),'description':_0x586328(0x13f),'apiKey':'API\x20Key','apiKeyPlaceholder':'Enter\x20your\x20API\x20key','apiKeyHint':_0x586328(0x111),'enableAuth':_0x586328(0x1f1),'enableAuthHint':_0x586328(0x182),'connectionInfo':'MCP\x20Client\x20Configuration','mcpClientConfig':'MCP\x20Client\x20Configuration','configInstructions':_0x586328(0x15b),'configStepTitle':'Configuration\x20Steps:','configStep1':_0x586328(0x191),'configStep2':'Add\x20the\x20configuration\x20to\x20your\x20MCP\x20client\x20settings\x20file','configStep3':_0x586328(0x138),'sessionId':_0x586328(0x1cc),'sessionIdDescription':'Unique\x20session\x20identifier.\x20If\x20you\x20have\x20multiple\x20Univer\x20instances\x20open,\x20each\x20instance\x20must\x20use\x20a\x20different\x20session_id\x20to\x20avoid\x20connection\x20conflicts.','authorizationDescription':_0x586328(0x1f3),'configParameters':_0x586328(0x124),'maxRetries':_0x586328(0x23f),'save':_0x586328(0x1c5),'saving':_0x586328(0x225),'note1':'Configuration\x20changes\x20will\x20take\x20effect\x20immediately','note2':_0x586328(0x163),'configSaved':_0x586328(0x21a),'configError':_0x586328(0x1ee),'apiApplyInfo':{'title':_0x586328(0x1f9),'description':_0x586328(0x1d1),'univerAiLabel':_0x586328(0x21f),'getStarted':_0x586328(0x189)},'validation':{'apiKeyRequired':_0x586328(0x12f),'apiKeyTooShort':'API\x20key\x20must\x20be\x20at\x20least\x2010\x20characters\x20long','invalidConfig':'Invalid\x20configuration','invalidApiKey':_0x586328(0x157)},'connectionStatus':{'disconnected':'Disconnected','connecting':_0x586328(0x146),'connected':_0x586328(0x155),'failed':'Connection\x20Failed','retrying':_0x586328(0x1b9)},'connectionError':{'unauthorized':_0x586328(0x153),'sessionOccupied':_0x586328(0x151),'networkError':_0x586328(0x22b),'maxRetriesExceeded':_0x586328(0x198)}}},locale$1={'mcpStatus':{'disconnected':_0x586328(0x137),'connecting':_0x586328(0x197),'connected':_0x586328(0x17b),'failed':_0x586328(0x21c),'retrying':'MCP\x20重连中...','unknown':'MCP\x20状态未知','unauthorized':_0x586328(0x141),'sessionOccupied':_0x586328(0x139),'networkError':'MCP:\x20网络错误','maxRetriesExceeded':_0x586328(0x20a),'clickToConnect':_0x586328(0x237),'clickToConfigure':'点击配置\x20MCP'},'mcpConfig':{'title':_0x586328(0x1b1),'description':_0x586328(0x1fc),'apiKey':_0x586328(0x1fa),'apiKeyPlaceholder':_0x586328(0x1e5),'apiKeyHint':_0x586328(0x196),'enableAuth':_0x586328(0x192),'enableAuthHint':_0x586328(0x1e2),'connectionInfo':_0x586328(0x177),'mcpClientConfig':_0x586328(0x177),'configInstructions':_0x586328(0x208),'configStepTitle':_0x586328(0x1ab),'configStep1':_0x586328(0x24a),'configStep2':_0x586328(0x18b),'configStep3':'重启您的\x20MCP\x20客户端以使配置生效','sessionId':'会话ID','sessionIdDescription':_0x586328(0x24f),'authorizationDescription':'带有\x20Bearer\x20前缀的\x20API\x20密钥。','configParameters':_0x586328(0x1f7),'maxRetries':_0x586328(0x210),'save':'保存配置','saving':_0x586328(0x133),'note1':_0x586328(0x147),'note2':_0x586328(0x1b0),'configSaved':_0x586328(0x1ba),'configError':_0x586328(0x13a),'apiApplyInfo':{'title':'什么是\x20API\x20密钥?','description':'API\x20密钥用于连接\x20Univer\x20MCP\x20服务器,让您可以使用\x20AI\x20来操作电子表格。请前往控制台获取您的专属密钥。','univerAiLabel':_0x586328(0x218),'getStarted':_0x586328(0x1f8)},'validation':{'apiKeyRequired':_0x586328(0x14d),'apiKeyTooShort':_0x586328(0x20b),'invalidConfig':_0x586328(0x202),'invalidApiKey':_0x586328(0x17d)},'connectionStatus':{'disconnected':_0x586328(0x18e),'connecting':_0x586328(0x19d),'connected':_0x586328(0x1bc),'failed':_0x586328(0x1a2),'retrying':'重连中...'},'connectionError':{'unauthorized':_0x586328(0x1a5),'sessionOccupied':_0x586328(0x15f),'networkError':_0x586328(0x226),'maxRetriesExceeded':_0x586328(0x180)}}};var name='@univerjs-pro/mcp-ui',version=_0x586328(0x12c);let UniverMCPUIPlugin=class UniverMCPUIPlugin extends _univerjs_core[_0x586328(0x178)]{constructor(_0x3e06c0=defaultPluginConfig,_0x33458d,_0x5fad18,_0x5a066e,_0x502d12,_0x321c04){const _0x4940bc=_0x586328;super(),this[_0x4940bc(0x1eb)]=_0x3e06c0,this['_injector']=_0x33458d,this[_0x4940bc(0x229)]=_0x5fad18,this[_0x4940bc(0x130)]=_0x5a066e,this[_0x4940bc(0x24b)]=_0x502d12,this[_0x4940bc(0x1b7)]=_0x321c04;const {..._0x1c1931}=(0x0,_univerjs_core['merge'])({},defaultPluginConfig,this['_config']);this[_0x4940bc(0x229)]['setConfig'](MCP_UI_PLUGIN_CONFIG_KEY,_0x1c1931);}async[_0x586328(0x236)](){const _0x4f5eea=_0x586328,_0x4685c1=[[MCPConnectionUIController],[MCPConfigUIController],[MCPUIMenuController]];if(!this[_0x4f5eea(0x136)][_0x4f5eea(0x1d8)](_univerjs_network[_0x4f5eea(0x179)]))_0x4685c1['push']([_univerjs_network[_0x4f5eea(0x179)],{'useClass':_univerjs_network[_0x4f5eea(0x158)]}]);_0x4685c1[_0x4f5eea(0x12a)](_0x41d257=>this[_0x4f5eea(0x136)][_0x4f5eea(0x228)](_0x41d257)),this[_0x4f5eea(0x136)]['get'](MCPConnectionUIController),this[_0x4f5eea(0x136)]['get'](MCPConfigUIController),this[_0x4f5eea(0x136)]['get'](MCPUIMenuController);}};_defineProperty(UniverMCPUIPlugin,_0x586328(0x1b2),'MCP_UI_PLUGIN'),_defineProperty(UniverMCPUIPlugin,_0x586328(0x23a),name),_defineProperty(UniverMCPUIPlugin,'version',version),UniverMCPUIPlugin=__decorate([(0x0,_univerjs_core[_0x586328(0x173)])(_univerjs_pro_mcp[_0x586328(0x1ca)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x586328(0x234)])(_univerjs_core[_0x586328(0x253)])),__decorateParam(0x2,_univerjs_core['IConfigService']),__decorateParam(0x3,_univerjs_ui[_0x586328(0x23e)]),__decorateParam(0x4,_univerjs_core['ILocalStorageService']),__decorateParam(0x5,(0x0,_univerjs_core[_0x586328(0x234)])(_univerjs_core['LocaleService']))],UniverMCPUIPlugin),exports['MCPConfigPanel']=MCPConfigPanel,Object[_0x586328(0x14c)](exports,_0x586328(0x22e),{'enumerable':!![],'get':function(){return MCPConfigUIController;}}),Object[_0x586328(0x14c)](exports,_0x586328(0x254),{'enumerable':!![],'get':function(){return MCPConnectionUIController;}}),exports[_0x586328(0x232)]=MCPStatusDisplay,Object[_0x586328(0x14c)](exports,_0x586328(0x240),{'enumerable':!![],'get':function(){return MCPUIMenuController;}}),exports[_0x586328(0x1d5)]=OpenMCPConfigPanelCommand,Object[_0x586328(0x14c)](exports,_0x586328(0x205),{'enumerable':!![],'get':function(){return UniverMCPUIPlugin;}}),exports[_0x586328(0x203)]=locale,exports[_0x586328(0x13d)]=locale$1;
|
package/lib/cjs/locale/ca-ES.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const _0x2be950=_0x5c87;function _0x5c87(_0x435414,_0x53f9d4){_0x435414=_0x435414-0x82;const _0x53f9d3=_0x53f9();let _0x5c87d8=_0x53f9d3[_0x435414];return _0x5c87d8;}(function(_0x5c6043,_0x55ca1a){const _0x190108=_0x5c87,_0xccff08=_0x5c6043();while(!![]){try{const _0x125b88=-parseInt(_0x190108(0xa7))/0x1+parseInt(_0x190108(0x8c))/0x2*(-parseInt(_0x190108(0xac))/0x3)+-parseInt(_0x190108(0x85))/0x4+parseInt(_0x190108(0x93))/0x5+-parseInt(_0x190108(0xab))/0x6*(parseInt(_0x190108(0xb0))/0x7)+-parseInt(_0x190108(0x98))/0x8*(parseInt(_0x190108(0xaa))/0x9)+parseInt(_0x190108(0x84))/0xa;if(_0x125b88===_0x55ca1a)break;else _0xccff08['push'](_0xccff08['shift']());}catch(_0x3d538b){_0xccff08['push'](_0xccff08['shift']());}}}(_0x53f9,0x6303e));function _0x53f9(){const _0x39eb5c=['522IUcsHb','2844DkgyfF','3WwEclU','Your\x20API\x20key\x20will\x20be\x20stored\x20locally\x20in\x20this\x20browser','Enable\x20Authentication','Click\x20to\x20connect\x20MCP','7721VUyALr','Session\x20ID','Maximum\x20retry\x20attempts\x20exceeded.\x20Please\x20try\x20again\x20later','Session-id\x20is\x20currently\x20occupied,\x20please\x20try\x20again\x20later','MCP\x20Client\x20Configuration','Configure\x20MCP\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets','exports','API\x20key\x20is\x20required','MCP:\x20Network\x20Error','MCP\x20Connected','Enter\x20your\x20API\x20key','26584960xFatTi','3184372bQfzIT','Click\x20to\x20configure\x20MCP','Network\x20connection\x20error.\x20Please\x20check\x20your\x20internet\x20connection','Connecting...','Unique\x20session\x20identifier.\x20If\x20you\x20have\x20multiple\x20Univer\x20instances\x20open,\x20each\x20instance\x20must\x20use\x20a\x20different\x20session_id\x20to\x20avoid\x20connection\x20conflicts.','MCP\x20Retrying...','Connected','1241746DwtOKn','Univer\x20AI\x20Console','Add\x20the\x20following\x20configuration\x20to\x20your\x20MCP\x20client\x20settings:','Configuration\x20Parameters:','Configuration\x20Steps:','MCP\x20Disconnected','Disconnected','1103015vhmjPH','Your\x20API\x20key\x20is\x20stored\x20securely\x20in\x20local\x20storage','MCP\x20Unknown\x20Status','Retrying...','API\x20key\x20with\x20Bearer\x20prefix.','52208VAqrFx','MCP\x20Configuration','Save\x20Configuration','Failed\x20to\x20save\x20configuration','Configuration\x20changes\x20will\x20take\x20effect\x20immediately','API\x20key\x20must\x20be\x20at\x20least\x2010\x20characters\x20long','Copy\x20the\x20JSON\x20configuration\x20below','Configuration\x20saved\x20successfully','Add\x20the\x20configuration\x20to\x20your\x20MCP\x20client\x20settings\x20file','Invalid\x20configuration','API\x20Key\x20connects\x20you\x20to\x20Univer\x20MCP\x20Server\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets.\x20Get\x20your\x20API\x20key\x20from\x20our\x20console\x20to\x20get\x20started.','Get\x20your\x20API\x20key\x20in\x20seconds','What\x20is\x20API\x20Key?','Saving...','Max\x20Retries','155237yFMfVf','Invalid\x20API\x20key,\x20please\x20check\x20if\x20the\x20key\x20is\x20correct','MCP:\x20Unauthorized'];_0x53f9=function(){return _0x39eb5c;};return _0x53f9();}const locale$1={'mcpStatus':{'disconnected':_0x2be950(0x91),'connecting':'MCP\x20Connecting...','connected':_0x2be950(0x82),'failed':'MCP\x20Connection\x20Failed','retrying':_0x2be950(0x8a),'unknown':_0x2be950(0x95),'unauthorized':_0x2be950(0xa9),'sessionOccupied':'MCP:\x20Session\x20ID\x20Occupied','networkError':_0x2be950(0xb8),'maxRetriesExceeded':'MCP:\x20Max\x20Retries\x20Exceeded','clickToConnect':_0x2be950(0xaf),'clickToConfigure':_0x2be950(0x86)},'mcpConfig':{'title':_0x2be950(0x99),'description':_0x2be950(0xb5),'apiKey':'API\x20Key','apiKeyPlaceholder':_0x2be950(0x83),'apiKeyHint':_0x2be950(0xad),'enableAuth':_0x2be950(0xae),'enableAuthHint':'Enable\x20authentication\x20for\x20secure\x20connections','connectionInfo':_0x2be950(0xb4),'mcpClientConfig':_0x2be950(0xb4),'configInstructions':_0x2be950(0x8e),'configStepTitle':_0x2be950(0x90),'configStep1':_0x2be950(0x9e),'configStep2':_0x2be950(0xa0),'configStep3':'Restart\x20your\x20MCP\x20client\x20to\x20apply\x20the\x20configuration','sessionId':_0x2be950(0xb1),'sessionIdDescription':_0x2be950(0x89),'authorizationDescription':_0x2be950(0x97),'configParameters':_0x2be950(0x8f),'maxRetries':_0x2be950(0xa6),'save':_0x2be950(0x9a),'saving':_0x2be950(0xa5),'note1':_0x2be950(0x9c),'note2':_0x2be950(0x94),'configSaved':_0x2be950(0x9f),'configError':_0x2be950(0x9b),'apiApplyInfo':{'title':_0x2be950(0xa4),'description':_0x2be950(0xa2),'univerAiLabel':_0x2be950(0x8d),'getStarted':_0x2be950(0xa3)},'validation':{'apiKeyRequired':_0x2be950(0xb7),'apiKeyTooShort':_0x2be950(0x9d),'invalidConfig':_0x2be950(0xa1),'invalidApiKey':_0x2be950(0xa8)},'connectionStatus':{'disconnected':_0x2be950(0x92),'connecting':_0x2be950(0x88),'connected':_0x2be950(0x8b),'failed':'Connection\x20Failed','retrying':_0x2be950(0x96)},'connectionError':{'unauthorized':'Authorization\x20failed,\x20please\x20check\x20your\x20API\x20key','sessionOccupied':_0x2be950(0xb3),'networkError':_0x2be950(0x87),'maxRetriesExceeded':_0x2be950(0xb2)}}},locale=locale$1;module[_0x2be950(0xb6)]=locale;
|
package/lib/cjs/locale/en-US.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x50e1e0=_0x4ba8;(function(_0x2b45b6,_0x3d7e80){const _0x301bb8=_0x4ba8,_0x18c4ed=_0x2b45b6();while(!![]){try{const _0x2c2b56=parseInt(_0x301bb8(0x19c))/0x1*(-parseInt(_0x301bb8(0x192))/0x2)+-parseInt(_0x301bb8(0x18e))/0x3+-parseInt(_0x301bb8(0x1b2))/0x4*(parseInt(_0x301bb8(0x1aa))/0x5)+parseInt(_0x301bb8(0x197))/0x6*(-parseInt(_0x301bb8(0x193))/0x7)+-parseInt(_0x301bb8(0x198))/0x8+-parseInt(_0x301bb8(0x1a1))/0x9*(-parseInt(_0x301bb8(0x196))/0xa)+parseInt(_0x301bb8(0x18a))/0xb*(parseInt(_0x301bb8(0x199))/0xc);if(_0x2c2b56===_0x3d7e80)break;else _0x18c4ed['push'](_0x18c4ed['shift']());}catch(_0x24377f){_0x18c4ed['push'](_0x18c4ed['shift']());}}}(_0x5080,0xbfe77));function _0x5080(){const _0x2d82c1=['1OnWpWB','Enable\x20authentication\x20for\x20secure\x20connections','Configure\x20MCP\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets','Your\x20API\x20key\x20will\x20be\x20stored\x20locally\x20in\x20this\x20browser','Session\x20ID','9aHzEzg','Configuration\x20changes\x20will\x20take\x20effect\x20immediately','MCP\x20Configuration','Configuration\x20Steps:','Max\x20Retries','MCP:\x20Network\x20Error','Save\x20Configuration','MCP\x20Disconnected','Saving...','4438055xjXWkD','Invalid\x20configuration','Click\x20to\x20connect\x20MCP','Invalid\x20API\x20key,\x20please\x20check\x20if\x20the\x20key\x20is\x20correct','MCP:\x20Session\x20ID\x20Occupied','MCP\x20Client\x20Configuration','API\x20key\x20must\x20be\x20at\x20least\x2010\x20characters\x20long','API\x20Key\x20connects\x20you\x20to\x20Univer\x20MCP\x20Server\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets.\x20Get\x20your\x20API\x20key\x20from\x20our\x20console\x20to\x20get\x20started.','4fkzvMj','Configuration\x20saved\x20successfully','Your\x20API\x20key\x20is\x20stored\x20securely\x20in\x20local\x20storage','Enter\x20your\x20API\x20key','MCP:\x20Unauthorized','API\x20key\x20with\x20Bearer\x20prefix.','Connected','Click\x20to\x20configure\x20MCP','429gEazcm','Retrying...','Connection\x20Failed','Network\x20connection\x20error.\x20Please\x20check\x20your\x20internet\x20connection','4178277isXudV','Connecting...','MCP:\x20Max\x20Retries\x20Exceeded','Failed\x20to\x20save\x20configuration','3129638XKiyZN','7090804YOekiH','exports','MCP\x20Connection\x20Failed','10018010nMLYSo','6nWODXN','9832720ttLqOC','1806612TWhrkd','Unique\x20session\x20identifier.\x20If\x20you\x20have\x20multiple\x20Univer\x20instances\x20open,\x20each\x20instance\x20must\x20use\x20a\x20different\x20session_id\x20to\x20avoid\x20connection\x20conflicts.','Copy\x20the\x20JSON\x20configuration\x20below'];_0x5080=function(){return _0x2d82c1;};return _0x5080();}const locale={'mcpStatus':{'disconnected':_0x50e1e0(0x1a8),'connecting':'MCP\x20Connecting...','connected':'MCP\x20Connected','failed':_0x50e1e0(0x195),'retrying':'MCP\x20Retrying...','unknown':'MCP\x20Unknown\x20Status','unauthorized':_0x50e1e0(0x1b6),'sessionOccupied':_0x50e1e0(0x1ae),'networkError':_0x50e1e0(0x1a6),'maxRetriesExceeded':_0x50e1e0(0x190),'clickToConnect':_0x50e1e0(0x1ac),'clickToConfigure':_0x50e1e0(0x189)},'mcpConfig':{'title':_0x50e1e0(0x1a3),'description':_0x50e1e0(0x19e),'apiKey':'API\x20Key','apiKeyPlaceholder':_0x50e1e0(0x1b5),'apiKeyHint':_0x50e1e0(0x19f),'enableAuth':'Enable\x20Authentication','enableAuthHint':_0x50e1e0(0x19d),'connectionInfo':_0x50e1e0(0x1af),'mcpClientConfig':_0x50e1e0(0x1af),'configInstructions':'Add\x20the\x20following\x20configuration\x20to\x20your\x20MCP\x20client\x20settings:','configStepTitle':_0x50e1e0(0x1a4),'configStep1':_0x50e1e0(0x19b),'configStep2':'Add\x20the\x20configuration\x20to\x20your\x20MCP\x20client\x20settings\x20file','configStep3':'Restart\x20your\x20MCP\x20client\x20to\x20apply\x20the\x20configuration','sessionId':_0x50e1e0(0x1a0),'sessionIdDescription':_0x50e1e0(0x19a),'authorizationDescription':_0x50e1e0(0x1b7),'configParameters':'Configuration\x20Parameters:','maxRetries':_0x50e1e0(0x1a5),'save':_0x50e1e0(0x1a7),'saving':_0x50e1e0(0x1a9),'note1':_0x50e1e0(0x1a2),'note2':_0x50e1e0(0x1b4),'configSaved':_0x50e1e0(0x1b3),'configError':_0x50e1e0(0x191),'apiApplyInfo':{'title':'What\x20is\x20API\x20Key?','description':_0x50e1e0(0x1b1),'univerAiLabel':'Univer\x20AI\x20Console','getStarted':'Get\x20your\x20API\x20key\x20in\x20seconds'},'validation':{'apiKeyRequired':'API\x20key\x20is\x20required','apiKeyTooShort':_0x50e1e0(0x1b0),'invalidConfig':_0x50e1e0(0x1ab),'invalidApiKey':_0x50e1e0(0x1ad)},'connectionStatus':{'disconnected':'Disconnected','connecting':_0x50e1e0(0x18f),'connected':_0x50e1e0(0x188),'failed':_0x50e1e0(0x18c),'retrying':_0x50e1e0(0x18b)},'connectionError':{'unauthorized':'Authorization\x20failed,\x20please\x20check\x20your\x20API\x20key','sessionOccupied':'Session-id\x20is\x20currently\x20occupied,\x20please\x20try\x20again\x20later','networkError':_0x50e1e0(0x18d),'maxRetriesExceeded':'Maximum\x20retry\x20attempts\x20exceeded.\x20Please\x20try\x20again\x20later'}}};function _0x4ba8(_0x4d3e5b,_0x25bbb2){_0x4d3e5b=_0x4d3e5b-0x188;const _0x5080cd=_0x5080();let _0x4ba8f8=_0x5080cd[_0x4d3e5b];return _0x4ba8f8;}module[_0x50e1e0(0x194)]=locale;
|
package/lib/cjs/locale/es-ES.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x34d5(_0x3de19f,_0x42cab2){_0x3de19f=_0x3de19f-0x88;const _0x1e5e53=_0x1e5e();let _0x34d521=_0x1e5e53[_0x3de19f];return _0x34d521;}const _0x3b2a26=_0x34d5;(function(_0x5382fd,_0x3d6a59){const _0x3bad21=_0x34d5,_0x3df5f5=_0x5382fd();while(!![]){try{const _0x87a3a3=-parseInt(_0x3bad21(0xa3))/0x1*(parseInt(_0x3bad21(0x97))/0x2)+-parseInt(_0x3bad21(0xbc))/0x3*(-parseInt(_0x3bad21(0xa6))/0x4)+-parseInt(_0x3bad21(0xb9))/0x5+-parseInt(_0x3bad21(0xae))/0x6*(parseInt(_0x3bad21(0x93))/0x7)+parseInt(_0x3bad21(0x8c))/0x8*(parseInt(_0x3bad21(0x98))/0x9)+-parseInt(_0x3bad21(0xa1))/0xa+parseInt(_0x3bad21(0x90))/0xb;if(_0x87a3a3===_0x3d6a59)break;else _0x3df5f5['push'](_0x3df5f5['shift']());}catch(_0x441bf7){_0x3df5f5['push'](_0x3df5f5['shift']());}}}(_0x1e5e,0x9f094));const locale$1={'mcpStatus':{'disconnected':_0x3b2a26(0x8f),'connecting':_0x3b2a26(0xa4),'connected':_0x3b2a26(0xb5),'failed':_0x3b2a26(0xb6),'retrying':_0x3b2a26(0xbf),'unknown':'MCP\x20Unknown\x20Status','unauthorized':_0x3b2a26(0x9c),'sessionOccupied':_0x3b2a26(0x8e),'networkError':_0x3b2a26(0x92),'maxRetriesExceeded':_0x3b2a26(0x91),'clickToConnect':_0x3b2a26(0x89),'clickToConfigure':_0x3b2a26(0xaa)},'mcpConfig':{'title':_0x3b2a26(0x96),'description':'Configure\x20MCP\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets','apiKey':'API\x20Key','apiKeyPlaceholder':_0x3b2a26(0xa2),'apiKeyHint':_0x3b2a26(0x94),'enableAuth':'Enable\x20Authentication','enableAuthHint':_0x3b2a26(0xb1),'connectionInfo':_0x3b2a26(0x9e),'mcpClientConfig':_0x3b2a26(0x9e),'configInstructions':'Add\x20the\x20following\x20configuration\x20to\x20your\x20MCP\x20client\x20settings:','configStepTitle':_0x3b2a26(0x8d),'configStep1':_0x3b2a26(0xa5),'configStep2':_0x3b2a26(0x9f),'configStep3':_0x3b2a26(0x9b),'sessionId':_0x3b2a26(0xa8),'sessionIdDescription':'Unique\x20session\x20identifier.\x20If\x20you\x20have\x20multiple\x20Univer\x20instances\x20open,\x20each\x20instance\x20must\x20use\x20a\x20different\x20session_id\x20to\x20avoid\x20connection\x20conflicts.','authorizationDescription':_0x3b2a26(0xb0),'configParameters':'Configuration\x20Parameters:','maxRetries':_0x3b2a26(0xaf),'save':_0x3b2a26(0xad),'saving':_0x3b2a26(0xac),'note1':_0x3b2a26(0x9a),'note2':_0x3b2a26(0xba),'configSaved':_0x3b2a26(0xb2),'configError':_0x3b2a26(0xa0),'apiApplyInfo':{'title':_0x3b2a26(0x99),'description':_0x3b2a26(0x88),'univerAiLabel':_0x3b2a26(0x9d),'getStarted':_0x3b2a26(0xb4)},'validation':{'apiKeyRequired':'API\x20key\x20is\x20required','apiKeyTooShort':_0x3b2a26(0xab),'invalidConfig':_0x3b2a26(0x8a),'invalidApiKey':_0x3b2a26(0x95)},'connectionStatus':{'disconnected':_0x3b2a26(0xa7),'connecting':_0x3b2a26(0xb3),'connected':_0x3b2a26(0xbb),'failed':_0x3b2a26(0xbe),'retrying':_0x3b2a26(0xb8)},'connectionError':{'unauthorized':_0x3b2a26(0xa9),'sessionOccupied':_0x3b2a26(0xb7),'networkError':'Network\x20connection\x20error.\x20Please\x20check\x20your\x20internet\x20connection','maxRetriesExceeded':_0x3b2a26(0x8b)}}},locale=locale$1;module[_0x3b2a26(0xbd)]=locale;function _0x1e5e(){const _0x3cd9c9=['MCP\x20Connecting...','Copy\x20the\x20JSON\x20configuration\x20below','50056WTkZXo','Disconnected','Session\x20ID','Authorization\x20failed,\x20please\x20check\x20your\x20API\x20key','Click\x20to\x20configure\x20MCP','API\x20key\x20must\x20be\x20at\x20least\x2010\x20characters\x20long','Saving...','Save\x20Configuration','156shGOAm','Max\x20Retries','API\x20key\x20with\x20Bearer\x20prefix.','Enable\x20authentication\x20for\x20secure\x20connections','Configuration\x20saved\x20successfully','Connecting...','Get\x20your\x20API\x20key\x20in\x20seconds','MCP\x20Connected','MCP\x20Connection\x20Failed','Session-id\x20is\x20currently\x20occupied,\x20please\x20try\x20again\x20later','Retrying...','3882360jpjjiQ','Your\x20API\x20key\x20is\x20stored\x20securely\x20in\x20local\x20storage','Connected','3lwpytA','exports','Connection\x20Failed','MCP\x20Retrying...','API\x20Key\x20connects\x20you\x20to\x20Univer\x20MCP\x20Server\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets.\x20Get\x20your\x20API\x20key\x20from\x20our\x20console\x20to\x20get\x20started.','Click\x20to\x20connect\x20MCP','Invalid\x20configuration','Maximum\x20retry\x20attempts\x20exceeded.\x20Please\x20try\x20again\x20later','8PEzkIg','Configuration\x20Steps:','MCP:\x20Session\x20ID\x20Occupied','MCP\x20Disconnected','32537747kWECvz','MCP:\x20Max\x20Retries\x20Exceeded','MCP:\x20Network\x20Error','100408JYwRCJ','Your\x20API\x20key\x20will\x20be\x20stored\x20locally\x20in\x20this\x20browser','Invalid\x20API\x20key,\x20please\x20check\x20if\x20the\x20key\x20is\x20correct','MCP\x20Configuration','27026TNgbuC','2191167oGVcKj','What\x20is\x20API\x20Key?','Configuration\x20changes\x20will\x20take\x20effect\x20immediately','Restart\x20your\x20MCP\x20client\x20to\x20apply\x20the\x20configuration','MCP:\x20Unauthorized','Univer\x20AI\x20Console','MCP\x20Client\x20Configuration','Add\x20the\x20configuration\x20to\x20your\x20MCP\x20client\x20settings\x20file','Failed\x20to\x20save\x20configuration','7780150ZRZaMm','Enter\x20your\x20API\x20key','47HvXlNB'];_0x1e5e=function(){return _0x3cd9c9;};return _0x1e5e();}
|
package/lib/cjs/locale/fa-IR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x5d5e(){const _0x3a3713=['MCP\x20Disconnected','Your\x20API\x20key\x20is\x20stored\x20securely\x20in\x20local\x20storage','217QJRqrt','Enable\x20authentication\x20for\x20secure\x20connections','8woUAro','Univer\x20AI\x20Console','Get\x20your\x20API\x20key\x20in\x20seconds','MCP:\x20Network\x20Error','12630fQXVvK','Invalid\x20configuration','MCP:\x20Unauthorized','API\x20key\x20must\x20be\x20at\x20least\x2010\x20characters\x20long','105288Zjyvsk','429KMZcld','Maximum\x20retry\x20attempts\x20exceeded.\x20Please\x20try\x20again\x20later','2410344CbiQAv','Configuration\x20changes\x20will\x20take\x20effect\x20immediately','Failed\x20to\x20save\x20configuration','Click\x20to\x20configure\x20MCP','Max\x20Retries','Click\x20to\x20connect\x20MCP','API\x20Key\x20connects\x20you\x20to\x20Univer\x20MCP\x20Server\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets.\x20Get\x20your\x20API\x20key\x20from\x20our\x20console\x20to\x20get\x20started.','API\x20key\x20is\x20required','308031yPThZz','Session\x20ID','API\x20key\x20with\x20Bearer\x20prefix.','221181nYqXMF','MCP\x20Connection\x20Failed','Restart\x20your\x20MCP\x20client\x20to\x20apply\x20the\x20configuration','Configuration\x20Parameters:','Add\x20the\x20following\x20configuration\x20to\x20your\x20MCP\x20client\x20settings:','Invalid\x20API\x20key,\x20please\x20check\x20if\x20the\x20key\x20is\x20correct','exports','Authorization\x20failed,\x20please\x20check\x20your\x20API\x20key','Copy\x20the\x20JSON\x20configuration\x20below','162244gqEKhT','MCP\x20Connecting...','Configure\x20MCP\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets','20ZXUkuv','MCP\x20Configuration','What\x20is\x20API\x20Key?','2200944dIQluZ','MCP\x20Client\x20Configuration','MCP\x20Connected','Connection\x20Failed','Retrying...','Configuration\x20Steps:','Enter\x20your\x20API\x20key','API\x20Key'];_0x5d5e=function(){return _0x3a3713;};return _0x5d5e();}const _0x3fc39a=_0x4f4c;function _0x4f4c(_0x52cd15,_0x189e31){_0x52cd15=_0x52cd15-0x1cb;const _0x5d5e8e=_0x5d5e();let _0x4f4cce=_0x5d5e8e[_0x52cd15];return _0x4f4cce;}(function(_0x18294e,_0x2c0542){const _0x295186=_0x4f4c,_0x26b3e0=_0x18294e();while(!![]){try{const _0x23928d=parseInt(_0x295186(0x1da))/0x1+parseInt(_0x295186(0x1f5))/0x2*(parseInt(_0x295186(0x1d7))/0x3)+parseInt(_0x295186(0x1e3))/0x4*(parseInt(_0x295186(0x1e6))/0x5)+-parseInt(_0x295186(0x1e9))/0x6+parseInt(_0x295186(0x1f3))/0x7*(-parseInt(_0x295186(0x1cc))/0x8)+parseInt(_0x295186(0x1cf))/0x9+parseInt(_0x295186(0x1f9))/0xa*(-parseInt(_0x295186(0x1cd))/0xb);if(_0x23928d===_0x2c0542)break;else _0x26b3e0['push'](_0x26b3e0['shift']());}catch(_0x200ea7){_0x26b3e0['push'](_0x26b3e0['shift']());}}}(_0x5d5e,0x3a135));const locale$1={'mcpStatus':{'disconnected':_0x3fc39a(0x1f1),'connecting':_0x3fc39a(0x1e4),'connected':_0x3fc39a(0x1eb),'failed':_0x3fc39a(0x1db),'retrying':'MCP\x20Retrying...','unknown':'MCP\x20Unknown\x20Status','unauthorized':_0x3fc39a(0x1fb),'sessionOccupied':'MCP:\x20Session\x20ID\x20Occupied','networkError':_0x3fc39a(0x1f8),'maxRetriesExceeded':'MCP:\x20Max\x20Retries\x20Exceeded','clickToConnect':_0x3fc39a(0x1d4),'clickToConfigure':_0x3fc39a(0x1d2)},'mcpConfig':{'title':_0x3fc39a(0x1e7),'description':_0x3fc39a(0x1e5),'apiKey':_0x3fc39a(0x1f0),'apiKeyPlaceholder':_0x3fc39a(0x1ef),'apiKeyHint':'Your\x20API\x20key\x20will\x20be\x20stored\x20locally\x20in\x20this\x20browser','enableAuth':'Enable\x20Authentication','enableAuthHint':_0x3fc39a(0x1f4),'connectionInfo':_0x3fc39a(0x1ea),'mcpClientConfig':_0x3fc39a(0x1ea),'configInstructions':_0x3fc39a(0x1de),'configStepTitle':_0x3fc39a(0x1ee),'configStep1':_0x3fc39a(0x1e2),'configStep2':'Add\x20the\x20configuration\x20to\x20your\x20MCP\x20client\x20settings\x20file','configStep3':_0x3fc39a(0x1dc),'sessionId':_0x3fc39a(0x1d8),'sessionIdDescription':'Unique\x20session\x20identifier.\x20If\x20you\x20have\x20multiple\x20Univer\x20instances\x20open,\x20each\x20instance\x20must\x20use\x20a\x20different\x20session_id\x20to\x20avoid\x20connection\x20conflicts.','authorizationDescription':_0x3fc39a(0x1d9),'configParameters':_0x3fc39a(0x1dd),'maxRetries':_0x3fc39a(0x1d3),'save':'Save\x20Configuration','saving':'Saving...','note1':_0x3fc39a(0x1d0),'note2':_0x3fc39a(0x1f2),'configSaved':'Configuration\x20saved\x20successfully','configError':_0x3fc39a(0x1d1),'apiApplyInfo':{'title':_0x3fc39a(0x1e8),'description':_0x3fc39a(0x1d5),'univerAiLabel':_0x3fc39a(0x1f6),'getStarted':_0x3fc39a(0x1f7)},'validation':{'apiKeyRequired':_0x3fc39a(0x1d6),'apiKeyTooShort':_0x3fc39a(0x1cb),'invalidConfig':_0x3fc39a(0x1fa),'invalidApiKey':_0x3fc39a(0x1df)},'connectionStatus':{'disconnected':'Disconnected','connecting':'Connecting...','connected':'Connected','failed':_0x3fc39a(0x1ec),'retrying':_0x3fc39a(0x1ed)},'connectionError':{'unauthorized':_0x3fc39a(0x1e1),'sessionOccupied':'Session-id\x20is\x20currently\x20occupied,\x20please\x20try\x20again\x20later','networkError':'Network\x20connection\x20error.\x20Please\x20check\x20your\x20internet\x20connection','maxRetriesExceeded':_0x3fc39a(0x1ce)}}},locale=locale$1;module[_0x3fc39a(0x1e0)]=locale;
|
package/lib/cjs/locale/fr-FR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x328dad=_0x432a;(function(_0x4b1137,_0x1f3db3){const _0x1ef906=_0x432a,_0x49758d=_0x4b1137();while(!![]){try{const _0x4ae010=-parseInt(_0x1ef906(0x8c))/0x1+parseInt(_0x1ef906(0x8e))/0x2+parseInt(_0x1ef906(0xa3))/0x3*(-parseInt(_0x1ef906(0xa9))/0x4)+-parseInt(_0x1ef906(0x94))/0x5*(parseInt(_0x1ef906(0x96))/0x6)+-parseInt(_0x1ef906(0xa1))/0x7+parseInt(_0x1ef906(0x82))/0x8+parseInt(_0x1ef906(0x85))/0x9;if(_0x4ae010===_0x1f3db3)break;else _0x49758d['push'](_0x49758d['shift']());}catch(_0x3d548a){_0x49758d['push'](_0x49758d['shift']());}}}(_0x5295,0xd18be));function _0x5295(){const _0xda3081=['MCP\x20Client\x20Configuration','Configure\x20MCP\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets','What\x20is\x20API\x20Key?','Session-id\x20is\x20currently\x20occupied,\x20please\x20try\x20again\x20later','Click\x20to\x20connect\x20MCP','Failed\x20to\x20save\x20configuration','Retrying...','Get\x20your\x20API\x20key\x20in\x20seconds','Configuration\x20Parameters:','API\x20key\x20with\x20Bearer\x20prefix.','11820064csjufx','MCP\x20Disconnected','MCP\x20Configuration','11539665oBEcnM','MCP\x20Unknown\x20Status','Authorization\x20failed,\x20please\x20check\x20your\x20API\x20key','Unique\x20session\x20identifier.\x20If\x20you\x20have\x20multiple\x20Univer\x20instances\x20open,\x20each\x20instance\x20must\x20use\x20a\x20different\x20session_id\x20to\x20avoid\x20connection\x20conflicts.','API\x20Key\x20connects\x20you\x20to\x20Univer\x20MCP\x20Server\x20to\x20use\x20AI\x20for\x20operating\x20spreadsheets.\x20Get\x20your\x20API\x20key\x20from\x20our\x20console\x20to\x20get\x20started.','Invalid\x20configuration','MCP\x20Connection\x20Failed','1472945SATPqp','MCP:\x20Session\x20ID\x20Occupied','2508966AgTymM','Connection\x20Failed','Your\x20API\x20key\x20will\x20be\x20stored\x20locally\x20in\x20this\x20browser','Your\x20API\x20key\x20is\x20stored\x20securely\x20in\x20local\x20storage','Configuration\x20Steps:','MCP:\x20Network\x20Error','5YAupvT','API\x20Key','4409352TYLPgq','API\x20key\x20is\x20required','Enable\x20Authentication','Univer\x20AI\x20Console','API\x20key\x20must\x20be\x20at\x20least\x2010\x20characters\x20long','Network\x20connection\x20error.\x20Please\x20check\x20your\x20internet\x20connection','Click\x20to\x20configure\x20MCP','Disconnected','Save\x20Configuration','Connecting...','MCP\x20Connected','126112hXQjDO','Enable\x20authentication\x20for\x20secure\x20connections','381VCdxcD','Max\x20Retries','MCP:\x20Max\x20Retries\x20Exceeded','Add\x20the\x20configuration\x20to\x20your\x20MCP\x20client\x20settings\x20file','MCP\x20Connecting...','Invalid\x20API\x20key,\x20please\x20check\x20if\x20the\x20key\x20is\x20correct','29292DrfpZg'];_0x5295=function(){return _0xda3081;};return _0x5295();}function _0x432a(_0xca9250,_0x33bec2){_0xca9250=_0xca9250-0x7b;const _0x529576=_0x5295();let _0x432a6f=_0x529576[_0xca9250];return _0x432a6f;}const locale$1={'mcpStatus':{'disconnected':_0x328dad(0x83),'connecting':_0x328dad(0xa7),'connected':_0x328dad(0xa0),'failed':_0x328dad(0x8b),'retrying':'MCP\x20Retrying...','unknown':_0x328dad(0x86),'unauthorized':'MCP:\x20Unauthorized','sessionOccupied':_0x328dad(0x8d),'networkError':_0x328dad(0x93),'maxRetriesExceeded':_0x328dad(0xa5),'clickToConnect':_0x328dad(0x7c),'clickToConfigure':_0x328dad(0x9c)},'mcpConfig':{'title':_0x328dad(0x84),'description':_0x328dad(0xab),'apiKey':_0x328dad(0x95),'apiKeyPlaceholder':'Enter\x20your\x20API\x20key','apiKeyHint':_0x328dad(0x90),'enableAuth':_0x328dad(0x98),'enableAuthHint':_0x328dad(0xa2),'connectionInfo':_0x328dad(0xaa),'mcpClientConfig':_0x328dad(0xaa),'configInstructions':'Add\x20the\x20following\x20configuration\x20to\x20your\x20MCP\x20client\x20settings:','configStepTitle':_0x328dad(0x92),'configStep1':'Copy\x20the\x20JSON\x20configuration\x20below','configStep2':_0x328dad(0xa6),'configStep3':'Restart\x20your\x20MCP\x20client\x20to\x20apply\x20the\x20configuration','sessionId':'Session\x20ID','sessionIdDescription':_0x328dad(0x88),'authorizationDescription':_0x328dad(0x81),'configParameters':_0x328dad(0x80),'maxRetries':_0x328dad(0xa4),'save':_0x328dad(0x9e),'saving':'Saving...','note1':'Configuration\x20changes\x20will\x20take\x20effect\x20immediately','note2':_0x328dad(0x91),'configSaved':'Configuration\x20saved\x20successfully','configError':_0x328dad(0x7d),'apiApplyInfo':{'title':_0x328dad(0xac),'description':_0x328dad(0x89),'univerAiLabel':_0x328dad(0x99),'getStarted':_0x328dad(0x7f)},'validation':{'apiKeyRequired':_0x328dad(0x97),'apiKeyTooShort':_0x328dad(0x9a),'invalidConfig':_0x328dad(0x8a),'invalidApiKey':_0x328dad(0xa8)},'connectionStatus':{'disconnected':_0x328dad(0x9d),'connecting':_0x328dad(0x9f),'connected':'Connected','failed':_0x328dad(0x8f),'retrying':_0x328dad(0x7e)},'connectionError':{'unauthorized':_0x328dad(0x87),'sessionOccupied':_0x328dad(0x7b),'networkError':_0x328dad(0x9b),'maxRetriesExceeded':'Maximum\x20retry\x20attempts\x20exceeded.\x20Please\x20try\x20again\x20later'}}},locale=locale$1;module['exports']=locale;
|
package/lib/cjs/locale/ja-JP.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x6db9(){const _0x568346=['接続中...','MCP\x20接続中...','MCPクライアントの設定に次の設定を追加してください:','保存中...','MCP:\x20セッションIDが使用中','APIキーとは?','セッションIDが現在使用中です。後でもう一度お試しください','数秒でAPIキーを取得','認証に失敗しました。APIキーを確認してください','設定の変更は直ちに有効になります','接続済み','MCPクライアントを再起動して設定を適用','セキュアな接続のために認証を有効にする','392986xUyztF','20QckCju','1530419rAbwvb','MCPクライアント設定','MCP\x20接続済み','2yVcrLQ','MCP:\x20認証されていません','無効な設定','一意のセッション識別子。複数のUniverインスタンスを開いている場合、接続の競合を避けるため、各インスタンスは異なるsession_idを使用する必要があります。','APIキーは必須です','設定が正常に保存されました','170840DOtefm','再試行中...','ネットワーク接続エラー。インターネット接続を確認してください','認証を有効にする','327604HwpCsv','MCPを設定してAIでスプレッドシートを操作','設定の保存に失敗しました','MCP:\x20最大再試行回数を超過','未接続','MCP\x20未接続','99dxwxvb','接続失敗','24wvbvfF','MCP設定','設定パラメータ:','exports','4704780UWRdYP','最大再試行回数を超過しました。後でもう一度お試しください','クリックしてMCPに接続','APIキーを入力してください','APIキーを使用してUniver\x20MCPサーバーに接続し、AIでスプレッドシートを操作できます。コンソールからAPIキーを取得して開始してください。','454097UCJpIa','506607qfiGKd'];_0x6db9=function(){return _0x568346;};return _0x6db9();}const _0x3ea1b1=_0xcd4e;function _0xcd4e(_0x2cd8fe,_0x15540b){_0x2cd8fe=_0x2cd8fe-0x77;const _0x6db951=_0x6db9();let _0xcd4ef9=_0x6db951[_0x2cd8fe];return _0xcd4ef9;}(function(_0x263ae5,_0x314220){const _0x47f3e6=_0xcd4e,_0x143cf5=_0x263ae5();while(!![]){try{const _0x5a1480=parseInt(_0x47f3e6(0x8a))/0x1+-parseInt(_0x47f3e6(0x8f))/0x2*(-parseInt(_0x47f3e6(0x7c))/0x3)+-parseInt(_0x47f3e6(0x99))/0x4*(-parseInt(_0x47f3e6(0x8b))/0x5)+-parseInt(_0x47f3e6(0xa1))/0x6*(parseInt(_0x47f3e6(0x7b))/0x7)+-parseInt(_0x47f3e6(0x95))/0x8*(-parseInt(_0x47f3e6(0x9f))/0x9)+-parseInt(_0x47f3e6(0xa5))/0xa+-parseInt(_0x47f3e6(0x8c))/0xb;if(_0x5a1480===_0x314220)break;else _0x143cf5['push'](_0x143cf5['shift']());}catch(_0xa73248){_0x143cf5['push'](_0x143cf5['shift']());}}}(_0x6db9,0x3e529));const locale={'mcpStatus':{'disconnected':_0x3ea1b1(0x9e),'connecting':_0x3ea1b1(0x7e),'connected':_0x3ea1b1(0x8e),'failed':'MCP\x20接続失敗','retrying':'MCP\x20再試行中...','unknown':'MCP\x20不明な状態','unauthorized':_0x3ea1b1(0x90),'sessionOccupied':_0x3ea1b1(0x81),'networkError':'MCP:\x20ネットワークエラー','maxRetriesExceeded':_0x3ea1b1(0x9c),'clickToConnect':_0x3ea1b1(0x78),'clickToConfigure':'クリックしてMCPを設定'},'mcpConfig':{'title':_0x3ea1b1(0xa2),'description':_0x3ea1b1(0x9a),'apiKey':'APIキー','apiKeyPlaceholder':_0x3ea1b1(0x79),'apiKeyHint':'APIキーはこのブラウザのローカルに保存されます','enableAuth':_0x3ea1b1(0x98),'enableAuthHint':_0x3ea1b1(0x89),'connectionInfo':_0x3ea1b1(0x8d),'mcpClientConfig':_0x3ea1b1(0x8d),'configInstructions':_0x3ea1b1(0x7f),'configStepTitle':'設定手順:','configStep1':'以下のJSON設定をコピー','configStep2':'MCPクライアントの設定ファイルに設定を追加','configStep3':_0x3ea1b1(0x88),'sessionId':'セッションID','sessionIdDescription':_0x3ea1b1(0x92),'authorizationDescription':'Bearerプレフィックス付きのAPIキー。','configParameters':_0x3ea1b1(0xa3),'maxRetries':'最大再試行回数','save':'設定を保存','saving':_0x3ea1b1(0x80),'note1':_0x3ea1b1(0x86),'note2':'APIキーはローカルストレージに安全に保存されます','configSaved':_0x3ea1b1(0x94),'configError':_0x3ea1b1(0x9b),'apiApplyInfo':{'title':_0x3ea1b1(0x82),'description':_0x3ea1b1(0x7a),'univerAiLabel':'Univer\x20AIコンソール','getStarted':_0x3ea1b1(0x84)},'validation':{'apiKeyRequired':_0x3ea1b1(0x93),'apiKeyTooShort':'APIキーは10文字以上である必要があります','invalidConfig':_0x3ea1b1(0x91),'invalidApiKey':'無効なAPIキーです。キーが正しいか確認してください'},'connectionStatus':{'disconnected':_0x3ea1b1(0x9d),'connecting':_0x3ea1b1(0x7d),'connected':_0x3ea1b1(0x87),'failed':_0x3ea1b1(0xa0),'retrying':_0x3ea1b1(0x96)},'connectionError':{'unauthorized':_0x3ea1b1(0x85),'sessionOccupied':_0x3ea1b1(0x83),'networkError':_0x3ea1b1(0x97),'maxRetriesExceeded':_0x3ea1b1(0x77)}}};module[_0x3ea1b1(0xa4)]=locale;
|