univer-cli 0.1.21 → 0.1.23

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.
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x5edbb3=_0x522f;(function(_0x225bc7,_0x329a7a){const _0x5db977=_0x522f,_0x40b772=_0x225bc7();while(!![]){try{const _0x3b36d4=-parseInt(_0x5db977(0x1bc))/0x1+-parseInt(_0x5db977(0x1b7))/0x2*(parseInt(_0x5db977(0x1b5))/0x3)+parseInt(_0x5db977(0x1de))/0x4*(-parseInt(_0x5db977(0x182))/0x5)+parseInt(_0x5db977(0x1df))/0x6*(parseInt(_0x5db977(0x1af))/0x7)+parseInt(_0x5db977(0x183))/0x8+-parseInt(_0x5db977(0x1aa))/0x9*(-parseInt(_0x5db977(0x1d0))/0xa)+parseInt(_0x5db977(0x1a0))/0xb;if(_0x3b36d4===_0x329a7a)break;else _0x40b772['push'](_0x40b772['shift']());}catch(_0x1fc4fb){_0x40b772['push'](_0x40b772['shift']());}}}(_0x54ab,0x92562));import'../chunks/vendor-CgwrUUL6.js';import{a as _0x22a53c,i as _0x2ec8e7,n,o as _0x2c5559,r as _0x29d028,t as _0x170228}from'../chunks/trace-DPfd8LdJ.js';import{a as _0xaa1e88,d as _0x51a5d6,l as _0x54f159,m as _0x36661e,n as _0x35abd5,u as _0x441eff}from'../chunks/node-BLWTwYLW.js';import{t as _0x3ecf78}from'../chunks/build-id-Coc3wh1M.js';import{n as _0x36cb4a}from'../chunks/runtime-manifest-D6bFR_JZ.js';import{existsSync as _0x2e3d21}from'node:fs';import{chmod as _0x3a835a,mkdir as _0x4d8552,readFile as _0x452bdf,rm as _0x274234,writeFile as _0x38d2a3}from'node:fs/promises';import _0x55126e from'node:net';import _0x22fb08 from'node:process';var S=0x2bf20,C=new _0x35abd5();async function w(_0x40d97a={}){const _0xb140a3=_0x522f;let _0x5cf37c=_0x40d97a['env']??_0x22fb08['env'],_0x17911a=_0x441eff(_0x5cf37c),_0x24c904=_0x36cb4a(_0x5cf37c),_0x20eed6=_0x40d97a['sessionHost']??D(new _0xaa1e88({'env':_0x5cf37c,'logger':_0x51a5d6({'env':_0x5cf37c,'role':_0x22a53c[_0xb140a3(0x18c)]}),'resolveExecutionPlaneOptions':()=>({'execArgv':[..._0x24c904[_0xb140a3(0x1b6)][_0xb140a3(0x181)]],'modulePath':_0x24c904[_0xb140a3(0x1b6)]['modulePath']}),'rpcTimeoutMs':S})),_0x32d1dd=_0x3ecf78(_0x5cf37c),_0x5c7f14=new Date()[_0xb140a3(0x19d)]();if(await _0x4d8552(_0x17911a['daemonDir'],{'recursive':!0x0,'mode':0x1c0}),await _0x4d8552(_0x17911a[_0xb140a3(0x17e)],{'recursive':!0x0,'mode':0x1c0}),!await N(_0x17911a[_0xb140a3(0x172)],_0x17911a[_0xb140a3(0x16a)])){if(await P(_0x17911a[_0xb140a3(0x17a)]))return;throw Error(_0xb140a3(0x176)+_0x17911a['lockPath']);}await M(_0x17911a);let _0x59badc=_0x51a5d6({'env':_0x5cf37c,'role':_0x22a53c[_0xb140a3(0x177)]}),_0x1cade9=A({'buildId':_0x32d1dd,'env':_0x5cf37c,'pid':_0x22fb08[_0xb140a3(0x1c7)]}),_0x58575a=!0x1,_0x42a967={},_0x6417dc=async _0x49c408=>B(null,-0x7f5b,Error('Daemon\x20handler\x20not\x20ready:\x20'+_0x49c408)),_0x2d7c4f=_0x55126e[_0xb140a3(0x17c)](_0x3373d2=>{const _0x5e41b7=_0xb140a3;let _0x5bcd92='';_0x3373d2['on'](_0x5e41b7(0x1d4),_0x305da4=>{const _0x24771e=_0x5e41b7;_0x5bcd92+=_0x305da4[_0x24771e(0x18a)](_0x24771e(0x191)),_0x4f2acf();}),_0x3373d2['on'](_0x5e41b7(0x1cb),()=>void 0x0);let _0x4f2acf=async()=>{const _0x4df4dd=_0x5e41b7;for(;;){let _0x5cb888=_0x5bcd92[_0x4df4dd(0x19b)]('\x0a');if(_0x5cb888<0x0)return;let _0x16f4d3=_0x5bcd92[_0x4df4dd(0x1ae)](0x0,_0x5cb888)[_0x4df4dd(0x1b9)]();if(_0x5bcd92=_0x5bcd92[_0x4df4dd(0x1ae)](_0x5cb888+0x1),!_0x16f4d3)continue;let _0x2368e9=await _0x6417dc(_0x16f4d3);_0x3373d2[_0x4df4dd(0x1a1)](JSON[_0x4df4dd(0x1ad)](_0x2368e9)+'\x0a');}};});_0x6417dc=T({'buildId':_0x32d1dd,'logRequestEvent':async _0x1081a1=>{const _0x5631b2=_0xb140a3;_0x59badc['event']({'level':_0x1081a1[_0x5631b2(0x163)]===_0x2ec8e7['DaemonRpcError']?'error':'info','event_name':_0x1081a1[_0x5631b2(0x163)],'component':_0x29d028['Daemon'],'process_role':_0x22a53c[_0x5631b2(0x177)],..._0x1081a1[_0x5631b2(0x1cb)]===void 0x0?{}:{'error':_0x1081a1[_0x5631b2(0x1cb)]},'fields':{..._0x1cade9,..._0x1081a1[_0x5631b2(0x199)]===void 0x0?{}:{'duration_ms':_0x1081a1['durationMs']},'method':_0x1081a1['method'],'timestamp':_0x1081a1[_0x5631b2(0x1a2)]}});},'logRequestError':async _0x4ecf61=>{const _0x3b39c7=_0xb140a3;_0x59badc['error']({'event_name':_0x2ec8e7[_0x3b39c7(0x1b0)],'component':_0x29d028[_0x3b39c7(0x177)],'process_role':_0x22a53c[_0x3b39c7(0x177)],'error':_0x4ecf61[_0x3b39c7(0x1cb)],'fields':{..._0x1cade9,'method':_0x4ecf61[_0x3b39c7(0x18b)],'timestamp':_0x4ecf61[_0x3b39c7(0x1a2)]}});},'onShutdownRequest':()=>{const _0x23c198=_0xb140a3;_0x492888(_0x23c198(0x164))[_0x23c198(0x189)](()=>{const _0x6b4db0=_0x23c198;_0x22fb08[_0x6b4db0(0x1c9)](0x0);});},'pid':_0x22fb08[_0xb140a3(0x1c7)],'runtimeRoot':_0x17911a[_0xb140a3(0x19f)],'sessionHost':_0x20eed6,'socketPath':_0x17911a[_0xb140a3(0x17a)],'startedAt':_0x5c7f14}),await new Promise((_0xf5761d,_0x21f880)=>{const _0x38949f=_0xb140a3;_0x2d7c4f[_0x38949f(0x1a5)](_0x38949f(0x1cb),_0x21f880),_0x2d7c4f[_0x38949f(0x1ab)](_0x17911a[_0x38949f(0x17a)],_0xf5761d);}),_0x54f159(_0x17911a['socketPath'])||await _0x3a835a(_0x17911a[_0xb140a3(0x17a)],0x180);let _0x108d1b={'pid':_0x22fb08[_0xb140a3(0x1c7)],'startedAt':_0x5c7f14,'socketPath':_0x17911a[_0xb140a3(0x17a)],'runtimeRoot':_0x17911a[_0xb140a3(0x19f)],'buildId':_0x32d1dd};await _0x38d2a3(_0x17911a['pidPath'],String(_0x22fb08[_0xb140a3(0x1c7)]),_0xb140a3(0x191)),await _0x38d2a3(_0x17911a[_0xb140a3(0x197)],JSON[_0xb140a3(0x1ad)](_0x108d1b,null,0x2),_0xb140a3(0x191)),_0x59badc[_0xb140a3(0x1cc)]({'event_name':_0x2ec8e7[_0xb140a3(0x1b3)],'component':_0x29d028[_0xb140a3(0x177)],'process_role':_0x22a53c['Daemon'],'fields':{..._0x1cade9,'pid':_0x22fb08[_0xb140a3(0x1c7)],'runtime_root':_0x17911a[_0xb140a3(0x19f)],'socket_path':_0x17911a[_0xb140a3(0x17a)],'started_at':_0x5c7f14}}),await _0x59badc[_0xb140a3(0x1a9)]();let _0x54f873=setInterval(()=>{const _0x47210b=_0xb140a3;_0x20eed6[_0x47210b(0x1c2)]();},Math[_0xb140a3(0x1cf)](0x3e8,Math[_0xb140a3(0x1da)](_0x20eed6['getSessionIdleTtlMs'](),0xea60)));_0x54f873[_0xb140a3(0x1c1)](),_0x42a967[_0xb140a3(0x1b2)]=_0x54f873;async function _0x492888(_0xf8b4cb){const _0x15f1ba=_0xb140a3;_0x58575a||(_0x58575a=!0x0,_0x42a967[_0x15f1ba(0x1b2)]!==void 0x0&&clearInterval(_0x42a967[_0x15f1ba(0x1b2)]),_0x59badc['info']({'event_name':_0x2ec8e7['DaemonStop'],'component':_0x29d028[_0x15f1ba(0x177)],'process_role':_0x22a53c[_0x15f1ba(0x177)],'fields':{..._0x1cade9,'pid':_0x22fb08[_0x15f1ba(0x1c7)],'reason':_0xf8b4cb,'timestamp':new Date()[_0x15f1ba(0x19d)]()}}),await _0x59badc[_0x15f1ba(0x1a9)](),await _0x20eed6[_0x15f1ba(0x16d)](_0xf8b4cb),await new Promise(_0x24adcc=>{_0x2d7c4f['close'](()=>_0x24adcc());}),await I(_0x17911a[_0x15f1ba(0x17a)]),await _0x274234(_0x17911a[_0x15f1ba(0x16a)],{'force':!0x0})[_0x15f1ba(0x1dd)](()=>void 0x0),await _0x274234(_0x17911a[_0x15f1ba(0x197)],{'force':!0x0})[_0x15f1ba(0x1dd)](()=>void 0x0),await _0x274234(_0x17911a['lockPath'],{'recursive':!0x0,'force':!0x0})['catch'](()=>void 0x0));}_0x22fb08['on'](_0xb140a3(0x19a),()=>{const _0x3ec6f6=_0xb140a3;_0x492888('sigint')[_0x3ec6f6(0x189)](()=>{_0x22fb08['exit'](0x0);});}),_0x22fb08['on'](_0xb140a3(0x16f),()=>{const _0x1863cd=_0xb140a3;_0x492888(_0x1863cd(0x1c0))[_0x1863cd(0x189)](()=>{const _0x334699=_0x1863cd;_0x22fb08[_0x334699(0x1c9)](0x0);});});}function T(_0x4b1240){return async _0x36f6ce=>{const _0x18d29f=_0x522f;let _0x28ceaf;try{_0x28ceaf=JSON[_0x18d29f(0x1ac)](_0x36f6ce);}catch(_0x337dfb){return B(null,-0x7fbc,_0x337dfb);}let _0x597079=_0x170228(_0x28ceaf[_0x18d29f(0x1be)]?.[_0x18d29f(0x18d)]),_0x425a9f=async()=>await n['withSpan']({'name':_0x2c5559[_0x18d29f(0x1d5)],'kind':_0x18d29f(0x1bd)},async()=>{const _0x245ae1=_0x18d29f;let _0x592325=Date[_0x245ae1(0x188)]();await _0x4b1240['logRequestEvent']?.({'eventName':_0x2ec8e7[_0x245ae1(0x170)],'method':_0x28ceaf[_0x245ae1(0x18b)],'timestamp':new Date()[_0x245ae1(0x19d)]()});try{let _0x20a3c0=await E(_0x28ceaf,_0x4b1240);return await _0x4b1240['logRequestEvent']?.({'durationMs':Date[_0x245ae1(0x188)]()-_0x592325,'eventName':_0x2ec8e7['DaemonRpcFinish'],'method':_0x28ceaf[_0x245ae1(0x18b)],'timestamp':new Date()['toISOString']()}),_0x20a3c0;}catch(_0x39df28){return await _0x4b1240[_0x245ae1(0x180)]?.({'durationMs':Date[_0x245ae1(0x188)]()-_0x592325,'eventName':_0x2ec8e7[_0x245ae1(0x1b0)],'method':_0x28ceaf[_0x245ae1(0x18b)],'error':_0x39df28,'timestamp':new Date()['toISOString']()}),_0x4b1240[_0x245ae1(0x180)]===void 0x0&&await _0x4b1240[_0x245ae1(0x179)]?.({'method':_0x28ceaf['method'],'error':_0x39df28 instanceof Error?_0x39df28['message']:String(_0x39df28),'timestamp':new Date()['toISOString']()}),B(_0x28ceaf['id'],-0x7f5b,_0x39df28);}});return _0x597079===void 0x0?await _0x425a9f():await n[_0x18d29f(0x195)](_0x597079,_0x425a9f);};}async function E(_0x74c48c,_0xd8a677){const _0x21a885=_0x522f;switch(_0x74c48c[_0x21a885(0x18b)]){case _0x36661e['Health']:return{'jsonrpc':_0x21a885(0x1c5),'id':_0x74c48c['id'],'result':{'ok':!0x0,'pid':_0xd8a677[_0x21a885(0x1c7)],'startedAt':_0xd8a677['startedAt'],'socketPath':_0xd8a677[_0x21a885(0x17a)],'runtimeRoot':_0xd8a677[_0x21a885(0x1d3)],'buildId':_0xd8a677['buildId'],'sessionCount':_0xd8a677[_0x21a885(0x187)][_0x21a885(0x1db)]()}};case _0x36661e[_0x21a885(0x165)]:return _0xd8a677['onShutdownRequest']?.(),{'jsonrpc':'2.0','id':_0x74c48c['id'],'result':{'stopping':!0x0}};case _0x36661e[_0x21a885(0x1d2)]:{let _0x3d6743=await _0xd8a677[_0x21a885(0x187)][_0x21a885(0x184)](_0x74c48c['params']);return z(_0x74c48c['id'],_0x3d6743);}case _0x36661e['SessionLoadWorkbookDataReplayPack']:{let _0x59355f=await _0xd8a677[_0x21a885(0x187)][_0x21a885(0x16b)](_0x74c48c['params']);return z(_0x74c48c['id'],_0x59355f);}case _0x36661e[_0x21a885(0x1d7)]:{let _0x1860fb=await _0xd8a677['sessionHost']['createWorkbook'](_0x74c48c[_0x21a885(0x17b)]);return z(_0x74c48c['id'],_0x1860fb);}case _0x36661e[_0x21a885(0x1d1)]:{let _0x56a2da=await _0xd8a677['sessionHost'][_0x21a885(0x1d8)](_0x74c48c[_0x21a885(0x17b)]);return z(_0x74c48c['id'],_0x56a2da);}case _0x36661e[_0x21a885(0x169)]:{let _0x4140ac=await _0xd8a677[_0x21a885(0x187)]['exportWorkbookFile'](_0x74c48c[_0x21a885(0x17b)]);return z(_0x74c48c['id'],_0x4140ac);}case _0x36661e[_0x21a885(0x1c3)]:{let _0x10816a=_0x74c48c[_0x21a885(0x17b)],_0x2a7d06=await _0xd8a677['sessionHost']['exportWorkbookData'](_0x10816a);return z(_0x74c48c['id'],_0x2a7d06);}case _0x36661e[_0x21a885(0x1a8)]:{let _0x2d468a=await _0xd8a677['sessionHost'][_0x21a885(0x1c6)](_0x74c48c[_0x21a885(0x17b)]);return z(_0x74c48c['id'],_0x2d468a);}case _0x36661e[_0x21a885(0x186)]:{let _0x2363e0=await _0xd8a677[_0x21a885(0x187)][_0x21a885(0x1d9)](_0x74c48c['params']);return z(_0x74c48c['id'],_0x2363e0);}default:return B(_0x74c48c['id'],-0x7f59,Error(_0x21a885(0x193)+_0x74c48c[_0x21a885(0x18b)]));}}function D(_0x39ce72){return{async 'createWorkbook'(_0x5d9fc7){const _0x113684=_0x522f;let _0xf1a710=await O(_0x5d9fc7),_0x5cf5e6=await _0x39ce72[_0x113684(0x166)]({..._0x5d9fc7[_0x113684(0x196)]===void 0x0?{}:{'cwd':_0x5d9fc7[_0x113684(0x196)]},'identity':_0xf1a710,..._0x5d9fc7['id']===void 0x0?{}:{'workbookId':_0x5d9fc7['id']},..._0x5d9fc7[_0x113684(0x1c4)]===void 0x0?{}:{'workbookName':_0x5d9fc7[_0x113684(0x1c4)]}});return{'success':!0x0,'workbookData':_0x5cf5e6[_0x113684(0x1bb)],'session':k(_0x5cf5e6[_0x113684(0x17d)])};},async 'dispose'(_0x3f3e67){const _0x32d187=_0x522f;let _0xcec2d6=await O(_0x3f3e67);return await _0x39ce72[_0x32d187(0x1c6)]({..._0x3f3e67[_0x32d187(0x196)]===void 0x0?{}:{'cwd':_0x3f3e67[_0x32d187(0x196)]},'identity':_0xcec2d6}),{'disposed':!0x0,'workbookIdentity':_0xcec2d6['absolutePath']};},async 'destroyAll'(_0x332655){const _0x5e870c=_0x522f;await _0x39ce72[_0x5e870c(0x16d)]?.(_0x332655);},async 'evalJs'(_0x3e8d90){const _0x5f0229=_0x522f;let _0x10c062=await O(_0x3e8d90),_0x2955d3=await _0x39ce72['evalJs']({'code':_0x3e8d90['code'],..._0x3e8d90[_0x5f0229(0x196)]===void 0x0?{}:{'cwd':_0x3e8d90[_0x5f0229(0x196)]},'identity':_0x10c062,..._0x3e8d90[_0x5f0229(0x1dc)]===void 0x0?{}:{'maxCodeLength':_0x3e8d90[_0x5f0229(0x1dc)]},..._0x3e8d90[_0x5f0229(0x1ca)]===void 0x0?{}:{'mutates':_0x3e8d90['mutates']}});return{..._0x2955d3[_0x5f0229(0x17f)]===void 0x0?{}:{'mutations':_0x2955d3['mutations']},'success':!0x0,'value':_0x2955d3[_0x5f0229(0x1ba)],'session':k(_0x2955d3['session'])};},async 'exportWorkbookData'(_0x242cc5){const _0x55d741=_0x522f;let _0x53a55e=await O(_0x242cc5),_0x2c4c31=await _0x39ce72[_0x55d741(0x1bf)]({..._0x242cc5[_0x55d741(0x196)]===void 0x0?{}:{'cwd':_0x242cc5[_0x55d741(0x196)]},'identity':_0x53a55e});return{'success':!0x0,'workbookData':_0x2c4c31[_0x55d741(0x1bb)],'session':k(_0x2c4c31[_0x55d741(0x17d)])};},async 'exportWorkbookFile'(_0x220a63){const _0x91bccb=_0x522f;let _0x1f457a=await O(_0x220a63),_0x1fc5b6=await _0x39ce72[_0x91bccb(0x192)]({..._0x220a63[_0x91bccb(0x196)]===void 0x0?{}:{'cwd':_0x220a63['cwd']},'format':_0x220a63[_0x91bccb(0x198)],'identity':_0x1f457a,'outputPath':_0x220a63['outputPath']});return{'success':!0x0,'format':_0x1fc5b6[_0x91bccb(0x198)],'outputPath':_0x1fc5b6[_0x91bccb(0x178)],'sizeBytes':_0x1fc5b6[_0x91bccb(0x171)],'session':k(_0x1fc5b6[_0x91bccb(0x17d)])};},async 'getWorkbookSession'(_0x7c43fa){const _0x1af6aa=_0x522f;let _0x33f64e=await O(_0x7c43fa),_0x8027db=await _0x39ce72[_0x1af6aa(0x1a6)]({..._0x7c43fa[_0x1af6aa(0x196)]===void 0x0?{}:{'cwd':_0x7c43fa[_0x1af6aa(0x196)]},'identity':_0x33f64e});return{'exists':_0x8027db!==null,'session':_0x8027db===null?null:k(_0x8027db)};},'getSessionCount'(){const _0x3b22b8=_0x522f;return _0x39ce72[_0x3b22b8(0x1db)]?.()??0x0;},'getSessionIdleTtlMs'(){const _0x3d7b3d=_0x522f;return _0x39ce72[_0x3d7b3d(0x19e)]?.()??0xea60;},async 'loadWorkbook'(_0x12b808){const _0x282e5b=_0x522f;let _0x33e9b0=await O(_0x12b808),_0x87e1e2=await _0x39ce72['loadWorkbookData']({..._0x12b808['cwd']===void 0x0?{}:{'cwd':_0x12b808[_0x282e5b(0x196)]},'identity':_0x33e9b0,'workbookData':_0x12b808[_0x282e5b(0x1bb)]});return{'success':!0x0,'workbookData':_0x87e1e2['workbookData'],'session':k(_0x87e1e2['session'])};},async 'loadWorkbookDataReplayPack'(_0x32b905){const _0x4e0fed=_0x522f;let _0x390013=await O(_0x32b905);return{'success':!0x0,'session':k((await _0x39ce72['loadWorkbookDataReplayPack']({..._0x32b905['cwd']===void 0x0?{}:{'cwd':_0x32b905[_0x4e0fed(0x196)]},'identity':_0x390013,'replayPack':{'baseWorkbookData':_0x32b905[_0x4e0fed(0x168)],'mutations':_0x32b905[_0x4e0fed(0x17f)]}}))['session'])};},async 'unloadIdleSessions'(){const _0x1adc26=_0x522f;await _0x39ce72[_0x1adc26(0x1c2)]?.();}};}async function O(_0x2b24eb){const _0x187cbe=_0x522f;return await C[_0x187cbe(0x19c)](_0x2b24eb);}function _0x54ab(){const _0x51e4f9=['execArgv','20505bYmpqN','1375688UcCcON','loadWorkbook','univer-daemon','SessionGetWorkbook','sessionHost','now','finally','toString','method','Runtime','traceparent','length','end','connect','utf8','exportWorkbookFile','Method\x20not\x20found:\x20','isFinite','withContext','cwd','metaPath','format','durationMs','SIGINT','indexOf','resolveIdentity','toISOString','getSessionIdleTtlMs','homeDir','16429105LmpYps','write','timestamp','createConnection','local','once','getSession','message','SessionDispose','flush','36GIPndc','listen','parse','stringify','slice','77WqDIwG','DaemonRpcError','argv','current','DaemonStart','kill','491157hiigpT','runtimeExecutionPlaneEntry','4gZFBzf','UNIVER_CLI_VERSION','trim','value','workbookData','734175eEmpBd','server','meta','exportWorkbookData','sigterm','unref','unloadIdleSessions','SessionExportWorkbookData','name','2.0','dispose','pid','absolutePath','exit','mutates','error','info','buildId','sessionId','max','2235430xzAHYN','SessionEvalJs','SessionLoadWorkbook','runtimeRoot','data','DaemonRpcServer','code','SessionCreateWorkbook','evalJs','getWorkbookSession','min','getSessionCount','maxCodeLength','catch','1072sTvAkX','109302WTIPFy','eventName','rpc-shutdown','Shutdown','createWorkbook','env','baseWorkbookData','SessionExportWorkbookFile','pidPath','loadWorkbookDataReplayPack','serve','destroyAll','unknown','SIGTERM','DaemonRpcStart','sizeBytes','lockPath','lastAccessedAt','packageIdentity','UNIVER_CLI_BUILD_ID','Another\x20daemon\x20startup\x20owns\x20','Daemon','outputPath','logRequestError','socketPath','params','createServer','session','sessionRoot','mutations','logRequestEvent'];_0x54ab=function(){return _0x51e4f9;};return _0x54ab();}function k(_0x57e954){const _0x355cfd=_0x522f;return{'createdAt':_0x57e954['createdAt']??'','lastAccessedAt':_0x57e954[_0x355cfd(0x173)]??'','sessionId':_0x57e954[_0x355cfd(0x1ce)],'workbookIdentity':_0x57e954[_0x355cfd(0x174)][_0x355cfd(0x1c8)]};}function A(_0x2d0001){const _0x1475d7=_0x522f;return{'build.id':j(_0x2d0001[_0x1475d7(0x167)],_0x1475d7(0x175))??_0x2d0001[_0x1475d7(0x1cd)],'deployment.environment.name':_0x1475d7(0x1a4),'distribution.channel':j(_0x2d0001[_0x1475d7(0x167)],'UNIVER_DISTRIBUTION_CHANNEL')??_0x1475d7(0x16e),'service.instance.id':String(_0x2d0001[_0x1475d7(0x1c7)]),'service.name':_0x1475d7(0x185),...j(_0x2d0001[_0x1475d7(0x167)],'UNIVER_CLI_VERSION')===void 0x0?{}:{'service.version':j(_0x2d0001[_0x1475d7(0x167)],_0x1475d7(0x1b8))}};}function j(_0x331a80,_0x43c06f){const _0x849740=_0x522f;let _0xc73df0=_0x331a80[_0x43c06f]?.['trim']();return _0xc73df0===void 0x0||_0xc73df0[_0x849740(0x18e)]===0x0?void 0x0:_0xc73df0;}async function M(_0x315a37){const _0x4e8462=_0x522f;F(_0x315a37['socketPath'])&&!await P(_0x315a37[_0x4e8462(0x17a)])&&await I(_0x315a37[_0x4e8462(0x17a)]);let _0x226f23=await L(_0x315a37[_0x4e8462(0x16a)]);_0x226f23!==null&&!R(_0x226f23)&&(await _0x274234(_0x315a37['pidPath'],{'force':!0x0})[_0x4e8462(0x1dd)](()=>void 0x0),await _0x274234(_0x315a37[_0x4e8462(0x197)],{'force':!0x0})[_0x4e8462(0x1dd)](()=>void 0x0),await _0x274234(_0x315a37[_0x4e8462(0x172)],{'recursive':!0x0,'force':!0x0})[_0x4e8462(0x1dd)](()=>void 0x0));}async function N(_0xa95f86,_0x2a81ef){const _0x21fa79=_0x522f;try{return await _0x4d8552(_0xa95f86,{'recursive':!0x1,'mode':0x1c0}),!0x0;}catch(_0x383ce3){if(_0x383ce3[_0x21fa79(0x1d6)]!=='EEXIST')throw _0x383ce3;let _0x567271=await L(_0x2a81ef);return _0x567271!==null&&R(_0x567271)?!0x1:(await _0x274234(_0xa95f86,{'recursive':!0x0,'force':!0x0}),await _0x4d8552(_0xa95f86,{'recursive':!0x1,'mode':0x1c0}),!0x0);}}async function P(_0x86a774){return await new Promise(_0x1cb5ec=>{const _0x2cf76a=_0x522f;let _0xf126b2=_0x55126e[_0x2cf76a(0x1a3)](_0x86a774);_0xf126b2[_0x2cf76a(0x1a5)](_0x2cf76a(0x190),()=>{const _0x2a5e8d=_0x2cf76a;_0xf126b2[_0x2a5e8d(0x18f)](),_0x1cb5ec(!0x0);}),_0xf126b2[_0x2cf76a(0x1a5)]('error',()=>{_0x1cb5ec(!0x1);});});}function _0x522f(_0x11b549,_0x4fe5bb){_0x11b549=_0x11b549-0x163;const _0x54ab02=_0x54ab();let _0x522f9d=_0x54ab02[_0x11b549];return _0x522f9d;}function F(_0x4584a2){return _0x54f159(_0x4584a2)?!0x1:_0x2e3d21(_0x4584a2);}async function I(_0x5d67df){const _0x40e2a9=_0x522f;_0x54f159(_0x5d67df)||await _0x274234(_0x5d67df,{'force':!0x0})[_0x40e2a9(0x1dd)](()=>void 0x0);}async function L(_0x1dd023){const _0x9e5bef=_0x522f;try{let _0x2ff79e=await _0x452bdf(_0x1dd023,_0x9e5bef(0x191)),_0x4e42a8=Number(_0x2ff79e[_0x9e5bef(0x1b9)]());return Number[_0x9e5bef(0x194)](_0x4e42a8)?_0x4e42a8:null;}catch{return null;}}function R(_0x583e07){const _0x42fde7=_0x522f;try{return _0x22fb08[_0x42fde7(0x1b4)](_0x583e07,0x0),!0x0;}catch{return!0x1;}}function z(_0x1b6030,_0x1f3e53){return{'jsonrpc':'2.0','id':_0x1b6030,'result':_0x1f3e53};}function B(_0x5ce546,_0x54b8e8,_0x34c894){const _0xa1f957=_0x522f;return{'jsonrpc':_0xa1f957(0x1c5),'id':_0x5ce546,'error':{'code':_0x54b8e8,'message':_0x34c894 instanceof Error?_0x34c894[_0xa1f957(0x1a7)]:String(_0x34c894)}};}var V=process[_0x5edbb3(0x1b1)][0x2]??_0x5edbb3(0x16c);V!==_0x5edbb3(0x16c)&&(console[_0x5edbb3(0x1cb)]('Unknown\x20daemon\x20subcommand:\x20'+V),process[_0x5edbb3(0x1c9)](0x1)),w()['catch'](_0x384454=>{const _0xe9195c=_0x5edbb3;console[_0xe9195c(0x1cb)](_0x384454 instanceof Error?_0x384454[_0xe9195c(0x1a7)]:String(_0x384454)),process[_0xe9195c(0x1c9)](0x1);});
2
+ const _0x34e16e=_0x26a2;(function(_0x354fca,_0x4aebf0){const _0x38b082=_0x26a2,_0x5e8167=_0x354fca();while(!![]){try{const _0x372954=-parseInt(_0x38b082(0x154))/0x1+-parseInt(_0x38b082(0x162))/0x2+parseInt(_0x38b082(0x16e))/0x3*(parseInt(_0x38b082(0x16d))/0x4)+parseInt(_0x38b082(0x145))/0x5*(-parseInt(_0x38b082(0x167))/0x6)+-parseInt(_0x38b082(0x11a))/0x7+parseInt(_0x38b082(0x146))/0x8+parseInt(_0x38b082(0xf3))/0x9;if(_0x372954===_0x4aebf0)break;else _0x5e8167['push'](_0x5e8167['shift']());}catch(_0x3d2a0e){_0x5e8167['push'](_0x5e8167['shift']());}}}(_0x2ed0,0x4e27a));import'../chunks/vendor-CgwrUUL6.js';import{a as _0x14841a,i as _0x2e4137,n,o as _0x1992fc,r as _0x162b4d,t as _0x55fdc4}from'../chunks/trace-DPfd8LdJ.js';import{a as _0x386f94,d as _0x4cbc22,l as _0x1b48fa,m as _0x1f7e4c,n as _0x4fb273,u as _0x458e09}from'../chunks/node-BLWTwYLW.js';import{t as _0x461280}from'../chunks/build-id-Coc3wh1M.js';import{n as _0x2162b3}from'../chunks/runtime-manifest-D6bFR_JZ.js';import{existsSync as _0x23ebfc}from'node:fs';import{chmod as _0xf05445,mkdir as _0x52846a,readFile as _0x394518,rm as _0x45485d,writeFile as _0x29c871}from'node:fs/promises';import _0x54c65c from'node:net';import _0x56bb65 from'node:process';var S=0x2bf20,C=new _0x4fb273();async function w(_0x1c2c3b={}){const _0x147151=_0x26a2;let _0x26c211=_0x1c2c3b[_0x147151(0x123)]??_0x56bb65[_0x147151(0x123)],_0x215185=_0x458e09(_0x26c211),_0x326dd2=_0x2162b3(_0x26c211),_0x2c0531=_0x1c2c3b[_0x147151(0x139)]??D(new _0x386f94({'env':_0x26c211,'logger':_0x4cbc22({'env':_0x26c211,'role':_0x14841a[_0x147151(0x12d)]}),'resolveExecutionPlaneOptions':()=>({'execArgv':[..._0x326dd2[_0x147151(0x119)][_0x147151(0x10f)]],'modulePath':_0x326dd2[_0x147151(0x119)][_0x147151(0x141)]}),'rpcTimeoutMs':S})),_0x11ab9b=_0x461280(_0x26c211),_0x5445c6=new Date()[_0x147151(0x142)]();if(await _0x52846a(_0x215185[_0x147151(0x16f)],{'recursive':!0x0,'mode':0x1c0}),await _0x52846a(_0x215185[_0x147151(0x150)],{'recursive':!0x0,'mode':0x1c0}),!await N(_0x215185[_0x147151(0x115)],_0x215185[_0x147151(0x14c)])){if(await P(_0x215185['socketPath']))return;throw Error(_0x147151(0x105)+_0x215185['lockPath']);}await M(_0x215185);let _0x35093c=_0x4cbc22({'env':_0x26c211,'role':_0x14841a[_0x147151(0x122)]}),_0x4ffbfb=A({'buildId':_0x11ab9b,'env':_0x26c211,'pid':_0x56bb65[_0x147151(0xfa)]}),_0x537af8=!0x1,_0x382c11={},_0x551967=async _0x5693f2=>B(null,-0x7f5b,Error(_0x147151(0x120)+_0x5693f2)),_0x52b3a2=_0x54c65c[_0x147151(0xff)](_0x461f20=>{const _0x547e4c=_0x147151;let _0x1e284f='';_0x461f20['on'](_0x547e4c(0x121),_0x67ee02=>{const _0x1959d4=_0x547e4c;_0x1e284f+=_0x67ee02[_0x1959d4(0x147)](_0x1959d4(0x124)),_0x2bd65b();}),_0x461f20['on'](_0x547e4c(0x165),()=>void 0x0);let _0x2bd65b=async()=>{const _0x446bfb=_0x547e4c;for(;;){let _0x42492c=_0x1e284f[_0x446bfb(0x108)]('\x0a');if(_0x42492c<0x0)return;let _0x51a991=_0x1e284f[_0x446bfb(0xf5)](0x0,_0x42492c)[_0x446bfb(0x157)]();if(_0x1e284f=_0x1e284f[_0x446bfb(0xf5)](_0x42492c+0x1),!_0x51a991)continue;let _0x5532a4=await _0x551967(_0x51a991);_0x461f20[_0x446bfb(0x158)](JSON['stringify'](_0x5532a4)+'\x0a');}};});_0x551967=T({'buildId':_0x11ab9b,'logRequestEvent':async _0x2cc94d=>{const _0x37a079=_0x147151;_0x35093c['event']({'level':_0x2cc94d[_0x37a079(0x132)]===_0x2e4137[_0x37a079(0x14a)]?_0x37a079(0x165):_0x37a079(0x11d),'event_name':_0x2cc94d['eventName'],'component':_0x162b4d[_0x37a079(0x122)],'process_role':_0x14841a[_0x37a079(0x122)],..._0x2cc94d['error']===void 0x0?{}:{'error':_0x2cc94d[_0x37a079(0x165)]},'fields':{..._0x4ffbfb,..._0x2cc94d['durationMs']===void 0x0?{}:{'duration_ms':_0x2cc94d[_0x37a079(0x133)]},'method':_0x2cc94d[_0x37a079(0x15e)],'timestamp':_0x2cc94d[_0x37a079(0x16a)]}});},'logRequestError':async _0x4aa9ed=>{const _0x1106c2=_0x147151;_0x35093c[_0x1106c2(0x165)]({'event_name':_0x2e4137[_0x1106c2(0x14a)],'component':_0x162b4d[_0x1106c2(0x122)],'process_role':_0x14841a['Daemon'],'error':_0x4aa9ed['error'],'fields':{..._0x4ffbfb,'method':_0x4aa9ed[_0x1106c2(0x15e)],'timestamp':_0x4aa9ed[_0x1106c2(0x16a)]}});},'onShutdownRequest':()=>{const _0x4904ee=_0x147151;_0x229a21(_0x4904ee(0x135))['finally'](()=>{const _0x4f0ad5=_0x4904ee;_0x56bb65[_0x4f0ad5(0x129)](0x0);});},'pid':_0x56bb65[_0x147151(0xfa)],'runtimeRoot':_0x215185[_0x147151(0x11b)],'sessionHost':_0x2c0531,'socketPath':_0x215185[_0x147151(0x10b)],'startedAt':_0x5445c6}),await new Promise((_0x56f743,_0x557f73)=>{const _0x26166f=_0x147151;_0x52b3a2[_0x26166f(0xfc)](_0x26166f(0x165),_0x557f73),_0x52b3a2[_0x26166f(0x155)](_0x215185[_0x26166f(0x10b)],_0x56f743);}),_0x1b48fa(_0x215185[_0x147151(0x10b)])||await _0xf05445(_0x215185[_0x147151(0x10b)],0x180);let _0x2eaf8b={'pid':_0x56bb65['pid'],'startedAt':_0x5445c6,'socketPath':_0x215185[_0x147151(0x10b)],'runtimeRoot':_0x215185[_0x147151(0x11b)],'buildId':_0x11ab9b};await _0x29c871(_0x215185['pidPath'],String(_0x56bb65['pid']),_0x147151(0x124)),await _0x29c871(_0x215185[_0x147151(0x102)],JSON[_0x147151(0x15b)](_0x2eaf8b,null,0x2),'utf8'),_0x35093c['info']({'event_name':_0x2e4137[_0x147151(0x160)],'component':_0x162b4d[_0x147151(0x122)],'process_role':_0x14841a['Daemon'],'fields':{..._0x4ffbfb,'pid':_0x56bb65[_0x147151(0xfa)],'runtime_root':_0x215185[_0x147151(0x11b)],'socket_path':_0x215185['socketPath'],'started_at':_0x5445c6}}),await _0x35093c['flush']();let _0x17d420=setInterval(()=>{const _0x3052f6=_0x147151;_0x2c0531[_0x3052f6(0x169)]();},Math['max'](0x3e8,Math[_0x147151(0x170)](_0x2c0531[_0x147151(0x107)](),0xea60)));_0x17d420[_0x147151(0x130)](),_0x382c11[_0x147151(0x12f)]=_0x17d420;async function _0x229a21(_0x31bb6a){const _0x44c497=_0x147151;_0x537af8||(_0x537af8=!0x0,_0x382c11['current']!==void 0x0&&clearInterval(_0x382c11[_0x44c497(0x12f)]),_0x35093c[_0x44c497(0x11d)]({'event_name':_0x2e4137[_0x44c497(0x15c)],'component':_0x162b4d['Daemon'],'process_role':_0x14841a['Daemon'],'fields':{..._0x4ffbfb,'pid':_0x56bb65[_0x44c497(0xfa)],'reason':_0x31bb6a,'timestamp':new Date()[_0x44c497(0x142)]()}}),await _0x35093c[_0x44c497(0x14e)](),await _0x2c0531[_0x44c497(0x11c)](_0x31bb6a),await new Promise(_0x1f292c=>{const _0x9bc294=_0x44c497;_0x52b3a2[_0x9bc294(0x12b)](()=>_0x1f292c());}),await I(_0x215185[_0x44c497(0x10b)]),await _0x45485d(_0x215185[_0x44c497(0x14c)],{'force':!0x0})[_0x44c497(0x13e)](()=>void 0x0),await _0x45485d(_0x215185[_0x44c497(0x102)],{'force':!0x0})[_0x44c497(0x13e)](()=>void 0x0),await _0x45485d(_0x215185[_0x44c497(0x115)],{'recursive':!0x0,'force':!0x0})[_0x44c497(0x13e)](()=>void 0x0));}_0x56bb65['on'](_0x147151(0x149),()=>{const _0x5564d7=_0x147151;_0x229a21(_0x5564d7(0x134))['finally'](()=>{const _0x2ee4e4=_0x5564d7;_0x56bb65[_0x2ee4e4(0x129)](0x0);});}),_0x56bb65['on'](_0x147151(0x114),()=>{_0x229a21('sigterm')['finally'](()=>{const _0x54e573=_0x26a2;_0x56bb65[_0x54e573(0x129)](0x0);});});}function _0x26a2(_0x4c9ae6,_0x5cffb1){_0x4c9ae6=_0x4c9ae6-0xf3;const _0x2ed077=_0x2ed0();let _0x26a2b7=_0x2ed077[_0x4c9ae6];return _0x26a2b7;}function T(_0x38478d){return async _0x557b94=>{const _0x1c3ea8=_0x26a2;let _0x5deadb;try{_0x5deadb=JSON[_0x1c3ea8(0x140)](_0x557b94);}catch(_0x2b45d4){return B(null,-0x7fbc,_0x2b45d4);}let _0x1f1bb2=_0x55fdc4(_0x5deadb['meta']?.[_0x1c3ea8(0x12c)]),_0x254300=async()=>await n['withSpan']({'name':_0x1992fc[_0x1c3ea8(0x12a)],'kind':'server'},async()=>{const _0x1cc4cb=_0x1c3ea8;let _0x1a06eb=Date[_0x1cc4cb(0x104)]();await _0x38478d[_0x1cc4cb(0x12e)]?.({'eventName':_0x2e4137[_0x1cc4cb(0x112)],'method':_0x5deadb[_0x1cc4cb(0x15e)],'timestamp':new Date()[_0x1cc4cb(0x142)]()});try{let _0x215f75=await E(_0x5deadb,_0x38478d);return await _0x38478d[_0x1cc4cb(0x12e)]?.({'durationMs':Date['now']()-_0x1a06eb,'eventName':_0x2e4137[_0x1cc4cb(0x13d)],'method':_0x5deadb[_0x1cc4cb(0x15e)],'timestamp':new Date()[_0x1cc4cb(0x142)]()}),_0x215f75;}catch(_0xaf4343){return await _0x38478d[_0x1cc4cb(0x12e)]?.({'durationMs':Date[_0x1cc4cb(0x104)]()-_0x1a06eb,'eventName':_0x2e4137[_0x1cc4cb(0x14a)],'method':_0x5deadb[_0x1cc4cb(0x15e)],'error':_0xaf4343,'timestamp':new Date()[_0x1cc4cb(0x142)]()}),_0x38478d[_0x1cc4cb(0x12e)]===void 0x0&&await _0x38478d[_0x1cc4cb(0x166)]?.({'method':_0x5deadb[_0x1cc4cb(0x15e)],'error':_0xaf4343 instanceof Error?_0xaf4343[_0x1cc4cb(0x159)]:String(_0xaf4343),'timestamp':new Date()[_0x1cc4cb(0x142)]()}),B(_0x5deadb['id'],-0x7f5b,_0xaf4343);}});return _0x1f1bb2===void 0x0?await _0x254300():await n[_0x1c3ea8(0x13c)](_0x1f1bb2,_0x254300);};}async function E(_0x4b1cc4,_0x1f64c1){const _0x49a5e0=_0x26a2;switch(_0x4b1cc4[_0x49a5e0(0x15e)]){case _0x1f7e4c[_0x49a5e0(0x13b)]:return{'jsonrpc':_0x49a5e0(0x16c),'id':_0x4b1cc4['id'],'result':{'ok':!0x0,'pid':_0x1f64c1['pid'],'startedAt':_0x1f64c1[_0x49a5e0(0x131)],'socketPath':_0x1f64c1[_0x49a5e0(0x10b)],'runtimeRoot':_0x1f64c1[_0x49a5e0(0x126)],'buildId':_0x1f64c1[_0x49a5e0(0x143)],'sessionCount':_0x1f64c1[_0x49a5e0(0x139)][_0x49a5e0(0x103)]()}};case _0x1f7e4c[_0x49a5e0(0x16b)]:return _0x1f64c1['onShutdownRequest']?.(),{'jsonrpc':_0x49a5e0(0x16c),'id':_0x4b1cc4['id'],'result':{'stopping':!0x0}};case _0x1f7e4c[_0x49a5e0(0x117)]:{let _0x2e2b4e=await _0x1f64c1['sessionHost'][_0x49a5e0(0x14f)](_0x4b1cc4[_0x49a5e0(0x13a)]);return z(_0x4b1cc4['id'],_0x2e2b4e);}case _0x1f7e4c[_0x49a5e0(0x156)]:{let _0x2cf64b=await _0x1f64c1[_0x49a5e0(0x139)][_0x49a5e0(0x15d)](_0x4b1cc4['params']);return z(_0x4b1cc4['id'],_0x2cf64b);}case _0x1f7e4c[_0x49a5e0(0x138)]:{let _0x40eb7a=await _0x1f64c1[_0x49a5e0(0x139)][_0x49a5e0(0x111)](_0x4b1cc4[_0x49a5e0(0x13a)]);return z(_0x4b1cc4['id'],_0x40eb7a);}case _0x1f7e4c[_0x49a5e0(0xf9)]:{let _0x3f8d9e=await _0x1f64c1[_0x49a5e0(0x139)][_0x49a5e0(0x15f)](_0x4b1cc4[_0x49a5e0(0x13a)]);return z(_0x4b1cc4['id'],_0x3f8d9e);}case _0x1f7e4c['SessionExportWorkbookFile']:{let _0x587370=await _0x1f64c1[_0x49a5e0(0x139)][_0x49a5e0(0x168)](_0x4b1cc4['params']);return z(_0x4b1cc4['id'],_0x587370);}case _0x1f7e4c[_0x49a5e0(0x152)]:{let _0x421f11=_0x4b1cc4['params'],_0x34d761=await _0x1f64c1[_0x49a5e0(0x139)]['exportWorkbookData'](_0x421f11);return z(_0x4b1cc4['id'],_0x34d761);}case _0x1f7e4c[_0x49a5e0(0x171)]:{let _0x9aee5b=await _0x1f64c1['sessionHost']['dispose'](_0x4b1cc4[_0x49a5e0(0x13a)]);return z(_0x4b1cc4['id'],_0x9aee5b);}case _0x1f7e4c[_0x49a5e0(0x161)]:{let _0x222065=await _0x1f64c1[_0x49a5e0(0x139)]['getWorkbookSession'](_0x4b1cc4[_0x49a5e0(0x13a)]);return z(_0x4b1cc4['id'],_0x222065);}default:return B(_0x4b1cc4['id'],-0x7f59,Error(_0x49a5e0(0xf6)+_0x4b1cc4[_0x49a5e0(0x15e)]));}}function D(_0x69e18e){return{async 'createWorkbook'(_0x304374){const _0x4cd6ab=_0x26a2;let _0x5919bd=await O(_0x304374),_0x1440b7=await _0x69e18e['createWorkbook']({..._0x304374['cwd']===void 0x0?{}:{'cwd':_0x304374[_0x4cd6ab(0xf8)]},'identity':_0x5919bd,..._0x304374['id']===void 0x0?{}:{'workbookId':_0x304374['id']},..._0x304374[_0x4cd6ab(0x101)]===void 0x0?{}:{'workbookName':_0x304374[_0x4cd6ab(0x101)]}});return{'success':!0x0,'workbookData':_0x1440b7[_0x4cd6ab(0xf7)],'session':k(_0x1440b7[_0x4cd6ab(0x10e)])};},async 'dispose'(_0x58415e){const _0x51bba5=_0x26a2;let _0x2c2989=await O(_0x58415e);return await _0x69e18e[_0x51bba5(0x15a)]({..._0x58415e[_0x51bba5(0xf8)]===void 0x0?{}:{'cwd':_0x58415e[_0x51bba5(0xf8)]},'identity':_0x2c2989}),{'disposed':!0x0,'workbookIdentity':_0x2c2989[_0x51bba5(0x109)]};},async 'destroyAll'(_0x4c032c){const _0x4f2f3b=_0x26a2;await _0x69e18e[_0x4f2f3b(0x11c)]?.(_0x4c032c);},async 'evalJs'(_0x49ba90){const _0x20b0e5=_0x26a2;let _0x46bb6e=await O(_0x49ba90),_0x5018de=await _0x69e18e[_0x20b0e5(0x15f)]({'code':_0x49ba90[_0x20b0e5(0xfb)],..._0x49ba90['cwd']===void 0x0?{}:{'cwd':_0x49ba90[_0x20b0e5(0xf8)]},'identity':_0x46bb6e,..._0x49ba90[_0x20b0e5(0x10a)]===void 0x0?{}:{'maxCodeLength':_0x49ba90[_0x20b0e5(0x10a)]},..._0x49ba90['mutates']===void 0x0?{}:{'mutates':_0x49ba90[_0x20b0e5(0x118)]}});return{..._0x5018de[_0x20b0e5(0x127)]===void 0x0?{}:{'mutations':_0x5018de[_0x20b0e5(0x127)]},'success':!0x0,'value':_0x5018de[_0x20b0e5(0x164)],'session':k(_0x5018de[_0x20b0e5(0x10e)])};},async 'exportWorkbookData'(_0x1e73f2){const _0x55fd6e=_0x26a2;let _0x54792d=await O(_0x1e73f2),_0x8ca8c4=await _0x69e18e[_0x55fd6e(0x110)]({..._0x1e73f2[_0x55fd6e(0xf8)]===void 0x0?{}:{'cwd':_0x1e73f2[_0x55fd6e(0xf8)]},'identity':_0x54792d});return{'success':!0x0,'workbookData':_0x8ca8c4['workbookData'],'session':k(_0x8ca8c4[_0x55fd6e(0x10e)])};},async 'exportWorkbookFile'(_0x29574d){const _0x2c9982=_0x26a2;let _0x3d83aa=await O(_0x29574d),_0x3ede6c=await _0x69e18e[_0x2c9982(0x168)]({..._0x29574d[_0x2c9982(0xf8)]===void 0x0?{}:{'cwd':_0x29574d[_0x2c9982(0xf8)]},'format':_0x29574d[_0x2c9982(0x144)],'identity':_0x3d83aa,'outputPath':_0x29574d[_0x2c9982(0x10c)]});return{'success':!0x0,'format':_0x3ede6c[_0x2c9982(0x144)],'outputPath':_0x3ede6c[_0x2c9982(0x10c)],'sizeBytes':_0x3ede6c[_0x2c9982(0x13f)],'session':k(_0x3ede6c[_0x2c9982(0x10e)])};},async 'getWorkbookSession'(_0x38454a){const _0x550832=_0x26a2;let _0x273f64=await O(_0x38454a),_0x73e345=await _0x69e18e[_0x550832(0x136)]({..._0x38454a[_0x550832(0xf8)]===void 0x0?{}:{'cwd':_0x38454a[_0x550832(0xf8)]},'identity':_0x273f64});return{'exists':_0x73e345!==null,'session':_0x73e345===null?null:k(_0x73e345)};},'getSessionCount'(){const _0x3347e4=_0x26a2;return _0x69e18e[_0x3347e4(0x103)]?.()??0x0;},'getSessionIdleTtlMs'(){const _0x25b5c2=_0x26a2;return _0x69e18e[_0x25b5c2(0x107)]?.()??0xea60;},async 'loadWorkbook'(_0x426722){const _0x4f295d=_0x26a2;let _0x562daa=await O(_0x426722),_0x41af06=await _0x69e18e[_0x4f295d(0xfe)]({..._0x426722[_0x4f295d(0xf8)]===void 0x0?{}:{'cwd':_0x426722[_0x4f295d(0xf8)]},'identity':_0x562daa,'workbookData':_0x426722[_0x4f295d(0xf7)]});return{'success':!0x0,'workbookData':_0x41af06[_0x4f295d(0xf7)],'session':k(_0x41af06[_0x4f295d(0x10e)])};},async 'loadWorkbookDataReplayPack'(_0xf03eaf){const _0x5a64f9=_0x26a2;let _0x293870=await O(_0xf03eaf);return{'success':!0x0,'session':k((await _0x69e18e[_0x5a64f9(0x15d)]({..._0xf03eaf[_0x5a64f9(0xf8)]===void 0x0?{}:{'cwd':_0xf03eaf[_0x5a64f9(0xf8)]},'identity':_0x293870,'replayPack':{'baseWorkbookData':_0xf03eaf['baseWorkbookData'],'mutations':_0xf03eaf[_0x5a64f9(0x127)]}}))['session'])};},async 'unloadIdleSessions'(){const _0x399201=_0x26a2;await _0x69e18e[_0x399201(0x169)]?.();}};}async function O(_0x2d9ff7){const _0x36607d=_0x26a2;return await C[_0x36607d(0x148)](_0x2d9ff7);}function k(_0x2fa862){const _0x3888b2=_0x26a2;return{'createdAt':_0x2fa862[_0x3888b2(0x125)]??'','lastAccessedAt':_0x2fa862[_0x3888b2(0x128)]??'','sessionId':_0x2fa862[_0x3888b2(0x100)],'workbookIdentity':_0x2fa862['packageIdentity'][_0x3888b2(0x109)]};}function A(_0x47197d){const _0x2d27d0=_0x26a2;return{'build.id':j(_0x47197d['env'],_0x2d27d0(0x11e))??_0x47197d[_0x2d27d0(0x143)],'deployment.environment.name':_0x2d27d0(0x11f),'distribution.channel':j(_0x47197d[_0x2d27d0(0x123)],'UNIVER_DISTRIBUTION_CHANNEL')??_0x2d27d0(0x153),'service.instance.id':String(_0x47197d[_0x2d27d0(0xfa)]),'service.name':_0x2d27d0(0x14b),...j(_0x47197d[_0x2d27d0(0x123)],'UNIVER_CLI_VERSION')===void 0x0?{}:{'service.version':j(_0x47197d[_0x2d27d0(0x123)],_0x2d27d0(0x10d))}};}function j(_0x4fc6af,_0x21cc45){const _0x4c53a1=_0x26a2;let _0x5036ef=_0x4fc6af[_0x21cc45]?.['trim']();return _0x5036ef===void 0x0||_0x5036ef[_0x4c53a1(0x106)]===0x0?void 0x0:_0x5036ef;}async function M(_0x3f1e16){const _0x1ecb18=_0x26a2;F(_0x3f1e16['socketPath'])&&!await P(_0x3f1e16[_0x1ecb18(0x10b)])&&await I(_0x3f1e16[_0x1ecb18(0x10b)]);let _0xcb33e=await L(_0x3f1e16[_0x1ecb18(0x14c)]);_0xcb33e!==null&&!R(_0xcb33e)&&(await _0x45485d(_0x3f1e16[_0x1ecb18(0x14c)],{'force':!0x0})[_0x1ecb18(0x13e)](()=>void 0x0),await _0x45485d(_0x3f1e16[_0x1ecb18(0x102)],{'force':!0x0})['catch'](()=>void 0x0),await _0x45485d(_0x3f1e16[_0x1ecb18(0x115)],{'recursive':!0x0,'force':!0x0})[_0x1ecb18(0x13e)](()=>void 0x0));}async function N(_0x34ab9c,_0x4a73d5){const _0xd80ff6=_0x26a2;try{return await _0x52846a(_0x34ab9c,{'recursive':!0x1,'mode':0x1c0}),!0x0;}catch(_0x601bfa){if(_0x601bfa[_0xd80ff6(0xfb)]!==_0xd80ff6(0x14d))throw _0x601bfa;let _0x41ed18=await L(_0x4a73d5);return _0x41ed18!==null&&R(_0x41ed18)?!0x1:(await _0x45485d(_0x34ab9c,{'recursive':!0x0,'force':!0x0}),await _0x52846a(_0x34ab9c,{'recursive':!0x1,'mode':0x1c0}),!0x0);}}async function P(_0x19cc66){return await new Promise(_0x4ef729=>{const _0x3e9fe2=_0x26a2;let _0x1f1227=_0x54c65c[_0x3e9fe2(0x113)](_0x19cc66);_0x1f1227[_0x3e9fe2(0xfc)](_0x3e9fe2(0x163),()=>{const _0x3052f9=_0x3e9fe2;_0x1f1227[_0x3052f9(0xf4)](),_0x4ef729(!0x0);}),_0x1f1227[_0x3e9fe2(0xfc)]('error',()=>{_0x4ef729(!0x1);});});}function F(_0x1c67b3){return _0x1b48fa(_0x1c67b3)?!0x1:_0x23ebfc(_0x1c67b3);}async function I(_0x3d73c4){const _0x249f2c=_0x26a2;_0x1b48fa(_0x3d73c4)||await _0x45485d(_0x3d73c4,{'force':!0x0})[_0x249f2c(0x13e)](()=>void 0x0);}async function L(_0x1da5bd){const _0x2f8c86=_0x26a2;try{let _0x2a3b45=await _0x394518(_0x1da5bd,_0x2f8c86(0x124)),_0x19a952=Number(_0x2a3b45[_0x2f8c86(0x157)]());return Number['isFinite'](_0x19a952)?_0x19a952:null;}catch{return null;}}function R(_0x52e6af){const _0x3ce1cd=_0x26a2;try{return _0x56bb65[_0x3ce1cd(0x116)](_0x52e6af,0x0),!0x0;}catch{return!0x1;}}function _0x2ed0(){const _0x592bf1=['sigint','rpc-shutdown','getSession','serve','SessionCreateWorkbook','sessionHost','params','Health','withContext','DaemonRpcFinish','catch','sizeBytes','parse','modulePath','toISOString','buildId','format','1401840FeKyGR','4414400hgEpsx','toString','resolveIdentity','SIGINT','DaemonRpcError','univer-daemon','pidPath','EEXIST','flush','loadWorkbook','sessionRoot','Unknown\x20daemon\x20subcommand:\x20','SessionExportWorkbookData','unknown','498126eoRrdC','listen','SessionLoadWorkbookDataReplayPack','trim','write','message','dispose','stringify','DaemonStop','loadWorkbookDataReplayPack','method','evalJs','DaemonStart','SessionGetWorkbook','645968uMpzWJ','connect','value','error','logRequestError','6qUyatP','exportWorkbookFile','unloadIdleSessions','timestamp','Shutdown','2.0','1145884YEgSHv','3BVZvko','daemonDir','min','SessionDispose','5489739vmkwEz','end','slice','Method\x20not\x20found:\x20','workbookData','cwd','SessionEvalJs','pid','code','once','argv','loadWorkbookData','createServer','sessionId','name','metaPath','getSessionCount','now','Another\x20daemon\x20startup\x20owns\x20','length','getSessionIdleTtlMs','indexOf','absolutePath','maxCodeLength','socketPath','outputPath','UNIVER_CLI_VERSION','session','execArgv','exportWorkbookData','createWorkbook','DaemonRpcStart','createConnection','SIGTERM','lockPath','kill','SessionLoadWorkbook','mutates','runtimeExecutionPlaneEntry','186494bezLeK','homeDir','destroyAll','info','UNIVER_CLI_BUILD_ID','local','Daemon\x20handler\x20not\x20ready:\x20','data','Daemon','env','utf8','createdAt','runtimeRoot','mutations','lastAccessedAt','exit','DaemonRpcServer','close','traceparent','Runtime','logRequestEvent','current','unref','startedAt','eventName','durationMs'];_0x2ed0=function(){return _0x592bf1;};return _0x2ed0();}function z(_0x192128,_0x3a44f8){const _0xc2f987=_0x26a2;return{'jsonrpc':_0xc2f987(0x16c),'id':_0x192128,'result':_0x3a44f8};}function B(_0x3fe89c,_0x2b252f,_0x588ded){const _0xa07a0f=_0x26a2;return{'jsonrpc':'2.0','id':_0x3fe89c,'error':{'code':_0x2b252f,'message':_0x588ded instanceof Error?_0x588ded[_0xa07a0f(0x159)]:String(_0x588ded)}};}var V=process[_0x34e16e(0xfd)][0x2]??_0x34e16e(0x137);V!==_0x34e16e(0x137)&&(console['error'](_0x34e16e(0x151)+V),process[_0x34e16e(0x129)](0x1)),w()[_0x34e16e(0x13e)](_0x1337a1=>{const _0xdc0d25=_0x34e16e;console['error'](_0x1337a1 instanceof Error?_0x1337a1[_0xdc0d25(0x159)]:String(_0x1337a1)),process['exit'](0x1);});
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x1170d3=_0x3b33;(function(_0x593f45,_0xa77b0f){const _0x291cfe=_0x3b33,_0x5114c6=_0x593f45();while(!![]){try{const _0x27e5be=-parseInt(_0x291cfe(0x1e8))/0x1+parseInt(_0x291cfe(0x22c))/0x2*(-parseInt(_0x291cfe(0x1eb))/0x3)+-parseInt(_0x291cfe(0x20d))/0x4*(parseInt(_0x291cfe(0x1fe))/0x5)+-parseInt(_0x291cfe(0x1f4))/0x6*(parseInt(_0x291cfe(0x22b))/0x7)+-parseInt(_0x291cfe(0x223))/0x8+-parseInt(_0x291cfe(0x1fb))/0x9+parseInt(_0x291cfe(0x201))/0xa*(parseInt(_0x291cfe(0x1d8))/0xb);if(_0x27e5be===_0xa77b0f)break;else _0x5114c6['push'](_0x5114c6['shift']());}catch(_0x346ed9){_0x5114c6['push'](_0x5114c6['shift']());}}}(_0x18be,0x2bd0b));import{t as _0x5aea5a}from'../chunks/build-info-CZl5rcXC.js';import{n as _0x96ed90}from'../chunks/runtime-manifest-D6bFR_JZ.js';import{spawn as _0x3f4531}from'node:child_process';import{readFileSync as _0x160e8b}from'node:fs';import{mkdir as _0x180635,readFile as _0x26b29c,rename as _0x55d6a5,writeFile as _0x26d99d}from'node:fs/promises';import{dirname as _0x2a1d69,join as _0x37f3e6,resolve as _0x2c353a}from'node:path';import{fileURLToPath as _0x24f9ae}from'node:url';import{homedir as _0x2b3ec9,platform as _0xeb08db}from'node:os';import{randomUUID as _0xa711a2}from'node:crypto';async function h(_0x2997c7){const _0x42301a=_0x3b33;let _0x393eca=_0x2997c7['env']??process.env,_0x12b558=_0x2997c7[_0x42301a(0x221)]??_0x96ed90(_0x393eca);if(_0x12b558['mode']!=='packaged')return{'reason':_0x42301a(0x218),'status':'skipped'};let _0x423787=_0x2997c7[_0x42301a(0x214)]??_0x5aea5a;if(N(_0x423787))return{'reason':_0x42301a(0x1f9),'status':_0x42301a(0x21e)};let _0x26ef7a=_0x2997c7[_0x42301a(0x232)]??await O(_0x12b558[_0x42301a(0x1fc)]);if(_0x26ef7a[_0x42301a(0x208)][_0x42301a(0x1f3)]===0x0)return{'reason':_0x42301a(0x233),'status':_0x42301a(0x21e)};let _0x379c06=_0x2997c7['now']??new Date(),_0x1392db=_0x2997c7['statePath']??v({'env':_0x393eca}),_0x19194f=await b({'path':_0x1392db,..._0x2997c7['randomId']===void 0x0?{}:{'randomId':_0x2997c7['randomId']},..._0x2997c7['stateIo']===void 0x0?{}:{'stateIo':_0x2997c7['stateIo']}});if(_0x19194f[_0x42301a(0x1f6)]===void 0x0)return{'reason':_0x42301a(0x228),'status':'skipped'};if(_0x2997c7[_0x42301a(0x1d7)]==='cli_first_opened'&&_0x19194f['state'][_0x42301a(0x20a)][_0x42301a(0x1de)]!==void 0x0)return{'reason':_0x42301a(0x222),'status':_0x42301a(0x21e)};let _0x2c44b2=w({'buildInfo':_0x423787,'eventName':_0x2997c7[_0x42301a(0x1d7)],'now':_0x379c06,'state':_0x19194f['state']});await C({'path':_0x1392db,'state':_0x2c44b2,..._0x2997c7[_0x42301a(0x22d)]===void 0x0?{}:{'stateIo':_0x2997c7[_0x42301a(0x22d)]}});let _0x2842db=T({'buildInfo':_0x423787,'env':_0x393eca,'eventName':_0x2997c7[_0x42301a(0x1d7)],'eventSource':_0x2997c7[_0x42301a(0x215)],'manifest':_0x12b558,'state':_0x2c44b2});try{return await(_0x2997c7[_0x42301a(0x1e1)]??new A())[_0x42301a(0x21d)]({'capture':_0x2842db,'config':_0x26ef7a}),{'status':_0x42301a(0x1f7)};}catch{return{'reason':_0x42301a(0x225),'status':_0x42301a(0x21e)};}}async function g(_0x297cc5={}){const _0x3e53bf=_0x3b33;return await h({..._0x297cc5,'eventName':_0x3e53bf(0x1e5),'eventSource':_0x3e53bf(0x227)});}async function _(_0x2997fe={}){const _0x53a263=_0x3b33;return await h({..._0x2997fe,'eventName':_0x53a263(0x1de),'eventSource':'cli-startup'});}function v(_0x39035b={}){const _0x21d1e6=_0x3b33;let _0x5963e3=(_0x39035b[_0x21d1e6(0x207)]??process.env)[_0x21d1e6(0x202)]?.['trim']();return _0x2c353a(_0x5963e3&&_0x5963e3[_0x21d1e6(0x1f3)]>0x0?_0x5963e3:_0x37f3e6(_0x39035b['homeDir']??_0x2b3ec9(),_0x21d1e6(0x211)),_0x21d1e6(0x231),'state.json');}function y(_0x4dcc05={}){return{'anonymousInstallId':_0x4dcc05['randomId']?.()??_0xa711a2(),'events':{},'version':0x1};}async function b(_0x2cb837){const _0x50ee03=_0x3b33;let _0x2c4561=_0x2cb837[_0x50ee03(0x22d)]?.[_0x50ee03(0x1da)]??_0x26b29c;try{return{'state':x(await _0x2c4561(_0x2cb837[_0x50ee03(0x20c)],'utf8'))};}catch{return{'state':y({..._0x2cb837[_0x50ee03(0x1e3)]===void 0x0?{}:{'randomId':_0x2cb837[_0x50ee03(0x1e3)]}})};}}function x(_0x9bf244){const _0x1f8669=_0x3b33;let _0xff531e=JSON[_0x1f8669(0x1e9)](_0x9bf244);if(!R(_0xff531e)||_0xff531e[_0x1f8669(0x1df)]!==0x1)throw Error('Invalid\x20product\x20telemetry\x20state\x20version.');if(typeof _0xff531e[_0x1f8669(0x22e)]!=_0x1f8669(0x210)||_0xff531e[_0x1f8669(0x22e)]['length']===0x0)throw Error(_0x1f8669(0x212));let _0x58c3d9=R(_0xff531e['events'])?_0xff531e['events']:{};return{'anonymousInstallId':_0xff531e[_0x1f8669(0x22e)],'events':{...P(_0x58c3d9['cli_installed'],_0x1f8669(0x1e5)),...P(_0x58c3d9[_0x1f8669(0x1de)],_0x1f8669(0x1de))},'version':0x1};}function S(_0xfdd38a){const _0x4caf21=_0x3b33;return JSON[_0x4caf21(0x1e0)](_0xfdd38a,null,0x2)+'\x0a';}async function C(_0x2bd3ea){const _0x5aa642=_0x3b33;let _0x52b32d=_0x2bd3ea['stateIo']?.[_0x5aa642(0x1ff)]??_0x26d99d,_0x2f15bf=_0x2bd3ea[_0x5aa642(0x22d)]?.[_0x5aa642(0x1ea)]??_0x55d6a5,_0x4d0558=_0x2bd3ea[_0x5aa642(0x20c)]+'.'+process[_0x5aa642(0x22a)]+'.'+Date[_0x5aa642(0x1e7)]()+'.tmp';try{await _0x180635(_0x2a1d69(_0x2bd3ea['path']),{'mode':0x1c0,'recursive':!0x0}),await _0x52b32d(_0x4d0558,S(_0x2bd3ea[_0x5aa642(0x1f6)]),{'encoding':_0x5aa642(0x21b),'mode':0x180}),await _0x2f15bf(_0x4d0558,_0x2bd3ea[_0x5aa642(0x20c)]);}catch{}}function _0x3b33(_0xe91c0,_0x5b5b47){_0xe91c0=_0xe91c0-0x1d5;const _0x18be84=_0x18be();let _0x3b3388=_0x18be84[_0xe91c0];return _0x3b3388;}function w(_0x1c29a7){const _0x3c9699=_0x3b33;return{..._0x1c29a7[_0x3c9699(0x1f6)],'events':{..._0x1c29a7['state'][_0x3c9699(0x20a)],[_0x1c29a7[_0x3c9699(0x1d7)]]:{'attemptedAt':_0x1c29a7[_0x3c9699(0x1e7)]['toISOString'](),'buildCommit':_0x1c29a7[_0x3c9699(0x214)][_0x3c9699(0x1dd)],'cliVersion':_0x1c29a7[_0x3c9699(0x214)][_0x3c9699(0x1df)]}}};}function _0x18be(){const _0x115629=['properties','readFile','public-npm','UNIVER_MANAGED_BY_BUN','commitHash','cli_first_opened','version','stringify','transport','unknown','randomId','POST','cli_installed','cliVersion','now','72490WnoukY','parse','rename','21BLobnW','trim','isSafeInteger','unref','object','product-telemetry.json','number','ignore','length','42moXGaC','first-open','state','captured','timeoutMs','development-build','split','3216204QHcFSr','packageRoot','versions','10gOmurN','writeFile','pnpm','13957570zoyUqs','UNIVER_HOME','yarn','name','buildCommit','attemptedAt','env','endpoint','UNIVER_MANAGED_BY_NPM','events','timeout','path','239288dLwDdx','distinctId','event','string','.univer','Invalid\x20product\x20telemetry\x20anonymous\x20install\x20id.','internal','buildInfo','eventSource','test','status','not-packaged','postinstall-worker','arch','utf8','package.json','capture','skipped','node','npm','manifest','already-attempted','2671264EusoIK','univer-cli','capture-failed','0.0.0','postinstall','state-unavailable','internal-github','pid','158431CBKCVo','49846WGDbOY','stateIo','anonymousInstallId','execPath','bun','telemetry','config','missing-endpoint','@dream-num/univer-cli','npm_config_user_agent','eventName','11cgKuxE'];_0x18be=function(){return _0x115629;};return _0x18be();}function T(_0x3cb8c8){const _0x580413=_0x3b33;return{'distinctId':_0x3cb8c8[_0x580413(0x1f6)][_0x580413(0x22e)],'event':_0x3cb8c8[_0x580413(0x1d7)],'properties':E(_0x3cb8c8)};}function E(_0xef0a46){const _0x41beb8=_0x3b33;return{'arch':process[_0x41beb8(0x21a)],'build_commit':_0xef0a46[_0x41beb8(0x214)][_0x41beb8(0x1dd)],'cli_version':_0xef0a46[_0x41beb8(0x214)][_0x41beb8(0x1df)],'distribution_channel':M(_0xef0a46[_0x41beb8(0x221)]),'event_source':_0xef0a46[_0x41beb8(0x215)],'install_manager':D(_0xef0a46['env']??process.env),'node_major_version':F(process[_0x41beb8(0x1fd)][_0x41beb8(0x21f)]),'package_name':j(_0xef0a46[_0x41beb8(0x221)]),'platform':_0xeb08db(),'telemetry_state_version':0x1};}function D(_0x4362ec=process.env){const _0x398963=_0x3b33;let _0x17060d=process[_0x398963(0x1fd)];if(typeof _0x17060d['bun']==_0x398963(0x210)&&_0x17060d[_0x398963(0x230)][_0x398963(0x1f3)]>0x0)return'bun';let _0xc52e7=_0x4362ec[_0x398963(0x1d6)]??'';if(/\bbun\//u['test'](_0xc52e7))return _0x398963(0x230);if(/\bpnpm\//u[_0x398963(0x216)](_0xc52e7))return _0x398963(0x200);if(/\byarn\//u[_0x398963(0x216)](_0xc52e7))return _0x398963(0x203);if(/\bnpm\//u['test'](_0xc52e7))return _0x398963(0x220);let _0x4f93ea=_0x4362ec['npm_execpath']??'';return/(^|[/\\])bun(?:\.exe)?$/u[_0x398963(0x216)](_0x4f93ea)?_0x398963(0x230):/(^|[/\\])pnpm(?:\.cmd|\.ps1|\.exe)?$/u['test'](_0x4f93ea)?'pnpm':/(^|[/\\])yarn(?:\.cmd|\.ps1|\.exe)?$/u['test'](_0x4f93ea)?_0x398963(0x203):/(^|[/\\])npm(?:\.cmd|\.ps1|\.exe)?$/u['test'](_0x4f93ea)?_0x398963(0x220):_0x4362ec[_0x398963(0x1dc)]==='1'?'bun':_0x4362ec[_0x398963(0x209)]==='1'?_0x398963(0x220):_0x398963(0x1e2);}async function O(_0x4d8269){const _0x3bacb1=_0x3b33;try{let _0x6c616b=await _0x26b29c(_0x37f3e6(_0x4d8269,_0x3bacb1(0x213),_0x3bacb1(0x1f0)),_0x3bacb1(0x21b));return k(JSON[_0x3bacb1(0x1e9)](_0x6c616b));}catch{return k({});}}function k(_0x6a4fd9){const _0x9429d6=_0x3b33;let _0x3b0436=R(_0x6a4fd9)?_0x6a4fd9:{};return{'endpoint':I(_0x3b0436['endpoint'],'https://univer.ai/api/telemetry/cli'),'timeoutMs':L(_0x3b0436[_0x9429d6(0x1f8)],0x1388)};}var A=class{async[_0x1170d3(0x21d)](_0x2d0c62){const _0x5eb010=_0x1170d3;let _0x55ce39=await fetch(_0x2d0c62[_0x5eb010(0x232)][_0x5eb010(0x208)],{'body':JSON[_0x5eb010(0x1e0)]({'distinctId':_0x2d0c62['capture'][_0x5eb010(0x20e)],'event':_0x2d0c62[_0x5eb010(0x21d)][_0x5eb010(0x20f)],'properties':_0x2d0c62[_0x5eb010(0x21d)][_0x5eb010(0x1d9)]}),'headers':{'content-type':'application/json'},'method':_0x5eb010(0x1e4),'signal':AbortSignal[_0x5eb010(0x20b)](_0x2d0c62[_0x5eb010(0x232)][_0x5eb010(0x1f8)])});if(!_0x55ce39['ok'])throw Error('CLI\x20telemetry\x20proxy\x20failed\x20with\x20status\x20'+_0x55ce39[_0x5eb010(0x217)]);}};function j(_0x4d36e7){const _0x300361=_0x1170d3;try{let _0x4d8b68=JSON['parse'](_0x160e8b(_0x37f3e6(_0x4d36e7['packageRoot'],_0x300361(0x21c)),'utf8'));return typeof _0x4d8b68[_0x300361(0x204)]=='string'&&_0x4d8b68[_0x300361(0x204)][_0x300361(0x1ec)]()[_0x300361(0x1f3)]>0x0?_0x4d8b68[_0x300361(0x204)]:'univer-cli';}catch{return _0x300361(0x224);}}function M(_0x536789){const _0x805c2e=_0x1170d3;let _0x24756f=j(_0x536789);return _0x24756f===_0x805c2e(0x1d5)?_0x805c2e(0x229):_0x24756f===_0x805c2e(0x224)?_0x805c2e(0x1db):_0x536789['mode'];}function N(_0x1d7c9a){const _0x5f343a=_0x1170d3;return _0x1d7c9a['version']===_0x5f343a(0x226);}function P(_0x29b4f8,_0x48b549){const _0x770931=_0x1170d3;return!R(_0x29b4f8)||typeof _0x29b4f8[_0x770931(0x206)]!='string'||typeof _0x29b4f8[_0x770931(0x205)]!=_0x770931(0x210)||typeof _0x29b4f8[_0x770931(0x1e6)]!='string'?{}:{[_0x48b549]:{'attemptedAt':_0x29b4f8[_0x770931(0x206)],'buildCommit':_0x29b4f8[_0x770931(0x205)],'cliVersion':_0x29b4f8[_0x770931(0x1e6)]}};}function F(_0x3d33c6){const _0x2fe888=_0x1170d3;let _0x571154=Number(_0x3d33c6[_0x2fe888(0x1fa)]('.')[0x0]);return Number[_0x2fe888(0x1ed)](_0x571154)&&_0x571154>0x0?_0x571154:void 0x0;}function I(_0x1b022e,_0x43f84c){const _0x556a7e=_0x1170d3;return typeof _0x1b022e==_0x556a7e(0x210)&&_0x1b022e[_0x556a7e(0x1ec)]()[_0x556a7e(0x1f3)]>0x0?_0x1b022e[_0x556a7e(0x1ec)]():_0x43f84c;}function L(_0x45c43e,_0xdf7722){const _0x208e73=_0x1170d3;return typeof _0x45c43e==_0x208e73(0x1f1)&&Number[_0x208e73(0x1ed)](_0x45c43e)&&_0x45c43e>0x0?_0x45c43e:_0xdf7722;}function R(_0x260eed){const _0xe048f8=_0x1170d3;return typeof _0x260eed==_0xe048f8(0x1ef)&&!!_0x260eed;}var z=process['argv'][0x2];try{z===_0x1170d3(0x1f5)?await _():z==='postinstall'?B(_0x1170d3(0x219)):z===_0x1170d3(0x219)&&await g();}catch{}function B(_0xdc6d9a){const _0x582cab=_0x1170d3;_0x3f4531(process[_0x582cab(0x22f)],[_0x24f9ae(import.meta.url),_0xdc6d9a],{'detached':!0x0,'env':process.env,'stdio':_0x582cab(0x1f2),'windowsHide':!0x0})[_0x582cab(0x1ee)]();}
2
+ const _0x5e5f2e=_0x5f43;(function(_0x4689a4,_0x415ae5){const _0x50cd2f=_0x5f43,_0x35fcc4=_0x4689a4();while(!![]){try{const _0x5b0115=-parseInt(_0x50cd2f(0x161))/0x1+parseInt(_0x50cd2f(0x181))/0x2*(-parseInt(_0x50cd2f(0x19f))/0x3)+parseInt(_0x50cd2f(0x185))/0x4+-parseInt(_0x50cd2f(0x15a))/0x5*(-parseInt(_0x50cd2f(0x17e))/0x6)+-parseInt(_0x50cd2f(0x145))/0x7+parseInt(_0x50cd2f(0x165))/0x8*(parseInt(_0x50cd2f(0x166))/0x9)+-parseInt(_0x50cd2f(0x163))/0xa;if(_0x5b0115===_0x415ae5)break;else _0x35fcc4['push'](_0x35fcc4['shift']());}catch(_0x569757){_0x35fcc4['push'](_0x35fcc4['shift']());}}}(_0x26cc,0xcdfd4));import{t as _0xaee66c}from'../chunks/build-info-59KMzaXH.js';import{n as _0xfbf059}from'../chunks/runtime-manifest-D6bFR_JZ.js';import{spawn as _0x459dc2}from'node:child_process';import{readFileSync as _0x112dfc}from'node:fs';import{mkdir as _0x2bb0c6,readFile as _0x2b0bb6,rename as _0x2180a9,writeFile as _0x427a75}from'node:fs/promises';import{dirname as _0x194d2c,join as _0x1dba67,resolve as _0x2a7ecc}from'node:path';import{fileURLToPath as _0x17b18c}from'node:url';import{homedir as _0x36d943,platform as _0x16ee5a}from'node:os';import{randomUUID as _0x469056}from'node:crypto';async function h(_0x236c35){const _0x4541ef=_0x5f43;let _0x18a3f0=_0x236c35[_0x4541ef(0x192)]??process.env,_0x3533fd=_0x236c35[_0x4541ef(0x16b)]??_0xfbf059(_0x18a3f0);if(_0x3533fd[_0x4541ef(0x177)]!==_0x4541ef(0x176))return{'reason':'not-packaged','status':_0x4541ef(0x16a)};let _0x2af8dd=_0x236c35[_0x4541ef(0x162)]??_0xaee66c;if(N(_0x2af8dd))return{'reason':_0x4541ef(0x170),'status':_0x4541ef(0x16a)};let _0x4944fa=_0x236c35[_0x4541ef(0x184)]??await O(_0x3533fd[_0x4541ef(0x19b)]);if(_0x4944fa[_0x4541ef(0x148)]['length']===0x0)return{'reason':'missing-endpoint','status':_0x4541ef(0x16a)};let _0x161994=_0x236c35[_0x4541ef(0x154)]??new Date(),_0x2bfd9f=_0x236c35[_0x4541ef(0x15e)]??v({'env':_0x18a3f0}),_0x5d18ba=await b({'path':_0x2bfd9f,..._0x236c35['randomId']===void 0x0?{}:{'randomId':_0x236c35['randomId']},..._0x236c35[_0x4541ef(0x169)]===void 0x0?{}:{'stateIo':_0x236c35[_0x4541ef(0x169)]}});if(_0x5d18ba[_0x4541ef(0x191)]===void 0x0)return{'reason':_0x4541ef(0x186),'status':_0x4541ef(0x16a)};if(_0x236c35[_0x4541ef(0x164)]==='cli_first_opened'&&_0x5d18ba[_0x4541ef(0x191)][_0x4541ef(0x14c)]['cli_first_opened']!==void 0x0)return{'reason':'already-attempted','status':_0x4541ef(0x16a)};let _0x7bef01=w({'buildInfo':_0x2af8dd,'eventName':_0x236c35[_0x4541ef(0x164)],'now':_0x161994,'state':_0x5d18ba['state']});await C({'path':_0x2bfd9f,'state':_0x7bef01,..._0x236c35[_0x4541ef(0x169)]===void 0x0?{}:{'stateIo':_0x236c35[_0x4541ef(0x169)]}});let _0x1a3854=T({'buildInfo':_0x2af8dd,'env':_0x18a3f0,'eventName':_0x236c35[_0x4541ef(0x164)],'eventSource':_0x236c35['eventSource'],'manifest':_0x3533fd,'state':_0x7bef01});try{return await(_0x236c35[_0x4541ef(0x18c)]??new A())['capture']({'capture':_0x1a3854,'config':_0x4944fa}),{'status':_0x4541ef(0x199)};}catch{return{'reason':'capture-failed','status':'skipped'};}}async function g(_0x83b61a={}){const _0x441156=_0x5f43;return await h({..._0x83b61a,'eventName':_0x441156(0x188),'eventSource':_0x441156(0x157)});}async function _(_0x2f8b96={}){const _0x2cb76d=_0x5f43;return await h({..._0x2f8b96,'eventName':_0x2cb76d(0x158),'eventSource':'cli-startup'});}function v(_0x2a8e0f={}){const _0xf9c5f9=_0x5f43;let _0x444675=(_0x2a8e0f[_0xf9c5f9(0x192)]??process.env)[_0xf9c5f9(0x19c)]?.['trim']();return _0x2a7ecc(_0x444675&&_0x444675[_0xf9c5f9(0x149)]>0x0?_0x444675:_0x1dba67(_0x2a8e0f[_0xf9c5f9(0x194)]??_0x36d943(),_0xf9c5f9(0x156)),_0xf9c5f9(0x17c),_0xf9c5f9(0x18f));}function y(_0x29b82a={}){const _0x23b543=_0x5f43;return{'anonymousInstallId':_0x29b82a[_0x23b543(0x19a)]?.()??_0x469056(),'events':{},'version':0x1};}async function b(_0x6d2309){const _0x33024a=_0x5f43;let _0x5aef0d=_0x6d2309[_0x33024a(0x169)]?.[_0x33024a(0x14a)]??_0x2b0bb6;try{return{'state':x(await _0x5aef0d(_0x6d2309[_0x33024a(0x175)],_0x33024a(0x182)))};}catch{return{'state':y({..._0x6d2309[_0x33024a(0x19a)]===void 0x0?{}:{'randomId':_0x6d2309[_0x33024a(0x19a)]}})};}}function x(_0x2f20a0){const _0xde4a3=_0x5f43;let _0x2bb758=JSON[_0xde4a3(0x183)](_0x2f20a0);if(!R(_0x2bb758)||_0x2bb758['version']!==0x1)throw Error(_0xde4a3(0x17f));if(typeof _0x2bb758[_0xde4a3(0x153)]!=_0xde4a3(0x14f)||_0x2bb758[_0xde4a3(0x153)]['length']===0x0)throw Error(_0xde4a3(0x179));let _0x29832a=R(_0x2bb758[_0xde4a3(0x14c)])?_0x2bb758[_0xde4a3(0x14c)]:{};return{'anonymousInstallId':_0x2bb758[_0xde4a3(0x153)],'events':{...P(_0x29832a[_0xde4a3(0x188)],_0xde4a3(0x188)),...P(_0x29832a[_0xde4a3(0x158)],_0xde4a3(0x158))},'version':0x1};}function S(_0x5b4233){const _0x5a58eb=_0x5f43;return JSON[_0x5a58eb(0x190)](_0x5b4233,null,0x2)+'\x0a';}async function C(_0x13c4ad){const _0xb44703=_0x5f43;let _0x973b6f=_0x13c4ad['stateIo']?.[_0xb44703(0x193)]??_0x427a75,_0x5c8326=_0x13c4ad[_0xb44703(0x169)]?.[_0xb44703(0x150)]??_0x2180a9,_0x1ce7c1=_0x13c4ad[_0xb44703(0x175)]+'.'+process['pid']+'.'+Date[_0xb44703(0x154)]()+_0xb44703(0x16c);try{await _0x2bb0c6(_0x194d2c(_0x13c4ad[_0xb44703(0x175)]),{'mode':0x1c0,'recursive':!0x0}),await _0x973b6f(_0x1ce7c1,S(_0x13c4ad['state']),{'encoding':_0xb44703(0x182),'mode':0x180}),await _0x5c8326(_0x1ce7c1,_0x13c4ad['path']);}catch{}}function _0x26cc(){const _0x1bd92a=['Invalid\x20product\x20telemetry\x20anonymous\x20install\x20id.','timeoutMs','POST','telemetry','argv','6IwunPe','Invalid\x20product\x20telemetry\x20state\x20version.','name','12YIeUdq','utf8','parse','config','1220896ZbduNn','state-unavailable','isSafeInteger','cli_installed','package.json','yarn','test','transport','properties','number','state.json','stringify','state','env','writeFile','homeDir','ignore','https://univer.ai/api/telemetry/cli','timeout','buildCommit','captured','randomId','packageRoot','UNIVER_HOME','versions','internal','200877ZXFCpf','@dream-num/univer-cli','npm','CLI\x20telemetry\x20proxy\x20failed\x20with\x20status\x20','version','355376gJilUP','UNIVER_MANAGED_BY_NPM','0.0.0','endpoint','length','readFile','commitHash','events','postinstall-worker','object','string','rename','cliVersion','split','anonymousInstallId','now','unknown','.univer','postinstall','cli_first_opened','arch','6867970JygaEk','status','event','eventSource','statePath','UNIVER_MANAGED_BY_BUN','public-npm','715601AescIz','buildInfo','1198010ErpTBP','eventName','1704lsTqqC','19134vuZZCi','univer-cli','attemptedAt','stateIo','skipped','manifest','.tmp','npm_execpath','trim','bun','development-build','application/json','node','npm_config_user_agent','unref','path','packaged','mode','capture'];_0x26cc=function(){return _0x1bd92a;};return _0x26cc();}function w(_0x44db59){const _0x184039=_0x5f43;return{..._0x44db59[_0x184039(0x191)],'events':{..._0x44db59[_0x184039(0x191)][_0x184039(0x14c)],[_0x44db59['eventName']]:{'attemptedAt':_0x44db59['now']['toISOString'](),'buildCommit':_0x44db59[_0x184039(0x162)][_0x184039(0x14b)],'cliVersion':_0x44db59['buildInfo'][_0x184039(0x1a3)]}}};}function T(_0x3170f6){const _0x5bee40=_0x5f43;return{'distinctId':_0x3170f6['state'][_0x5bee40(0x153)],'event':_0x3170f6[_0x5bee40(0x164)],'properties':E(_0x3170f6)};}function E(_0x34f47b){const _0x4dbddb=_0x5f43;return{'arch':process[_0x4dbddb(0x159)],'build_commit':_0x34f47b[_0x4dbddb(0x162)]['commitHash'],'cli_version':_0x34f47b['buildInfo'][_0x4dbddb(0x1a3)],'distribution_channel':M(_0x34f47b[_0x4dbddb(0x16b)]),'event_source':_0x34f47b[_0x4dbddb(0x15d)],'install_manager':D(_0x34f47b['env']??process.env),'node_major_version':F(process[_0x4dbddb(0x19d)][_0x4dbddb(0x172)]),'package_name':j(_0x34f47b['manifest']),'platform':_0x16ee5a(),'telemetry_state_version':0x1};}function D(_0x3df57a=process.env){const _0x3b8b01=_0x5f43;let _0x3b3961=process[_0x3b8b01(0x19d)];if(typeof _0x3b3961[_0x3b8b01(0x16f)]==_0x3b8b01(0x14f)&&_0x3b3961[_0x3b8b01(0x16f)][_0x3b8b01(0x149)]>0x0)return _0x3b8b01(0x16f);let _0x1e3b68=_0x3df57a[_0x3b8b01(0x173)]??'';if(/\bbun\//u['test'](_0x1e3b68))return _0x3b8b01(0x16f);if(/\bpnpm\//u[_0x3b8b01(0x18b)](_0x1e3b68))return'pnpm';if(/\byarn\//u['test'](_0x1e3b68))return'yarn';if(/\bnpm\//u['test'](_0x1e3b68))return _0x3b8b01(0x1a1);let _0xdf7fe7=_0x3df57a[_0x3b8b01(0x16d)]??'';return/(^|[/\\])bun(?:\.exe)?$/u['test'](_0xdf7fe7)?_0x3b8b01(0x16f):/(^|[/\\])pnpm(?:\.cmd|\.ps1|\.exe)?$/u[_0x3b8b01(0x18b)](_0xdf7fe7)?'pnpm':/(^|[/\\])yarn(?:\.cmd|\.ps1|\.exe)?$/u[_0x3b8b01(0x18b)](_0xdf7fe7)?_0x3b8b01(0x18a):/(^|[/\\])npm(?:\.cmd|\.ps1|\.exe)?$/u[_0x3b8b01(0x18b)](_0xdf7fe7)?'npm':_0x3df57a[_0x3b8b01(0x15f)]==='1'?_0x3b8b01(0x16f):_0x3df57a[_0x3b8b01(0x146)]==='1'?'npm':_0x3b8b01(0x155);}async function O(_0x5b805a){const _0x2be7dc=_0x5f43;try{let _0x5101e8=await _0x2b0bb6(_0x1dba67(_0x5b805a,_0x2be7dc(0x19e),'product-telemetry.json'),_0x2be7dc(0x182));return k(JSON[_0x2be7dc(0x183)](_0x5101e8));}catch{return k({});}}function k(_0x4b862e){const _0x3125d=_0x5f43;let _0x25fc5a=R(_0x4b862e)?_0x4b862e:{};return{'endpoint':I(_0x25fc5a[_0x3125d(0x148)],_0x3125d(0x196)),'timeoutMs':L(_0x25fc5a[_0x3125d(0x17a)],0x1388)};}var A=class{async[_0x5e5f2e(0x178)](_0x4a039f){const _0x38b27d=_0x5e5f2e;let _0x4f0eea=await fetch(_0x4a039f[_0x38b27d(0x184)]['endpoint'],{'body':JSON[_0x38b27d(0x190)]({'distinctId':_0x4a039f[_0x38b27d(0x178)]['distinctId'],'event':_0x4a039f[_0x38b27d(0x178)][_0x38b27d(0x15c)],'properties':_0x4a039f[_0x38b27d(0x178)][_0x38b27d(0x18d)]}),'headers':{'content-type':_0x38b27d(0x171)},'method':_0x38b27d(0x17b),'signal':AbortSignal[_0x38b27d(0x197)](_0x4a039f[_0x38b27d(0x184)]['timeoutMs'])});if(!_0x4f0eea['ok'])throw Error(_0x38b27d(0x1a2)+_0x4f0eea[_0x38b27d(0x15b)]);}};function j(_0x49f5b5){const _0x4d40a7=_0x5e5f2e;try{let _0x44f4b6=JSON[_0x4d40a7(0x183)](_0x112dfc(_0x1dba67(_0x49f5b5[_0x4d40a7(0x19b)],_0x4d40a7(0x189)),'utf8'));return typeof _0x44f4b6[_0x4d40a7(0x180)]==_0x4d40a7(0x14f)&&_0x44f4b6[_0x4d40a7(0x180)][_0x4d40a7(0x16e)]()['length']>0x0?_0x44f4b6[_0x4d40a7(0x180)]:_0x4d40a7(0x167);}catch{return'univer-cli';}}function M(_0x2bd5c7){const _0x1fcaed=_0x5e5f2e;let _0x3a0c40=j(_0x2bd5c7);return _0x3a0c40===_0x1fcaed(0x1a0)?'internal-github':_0x3a0c40==='univer-cli'?_0x1fcaed(0x160):_0x2bd5c7[_0x1fcaed(0x177)];}function N(_0x3e9327){const _0x5bef5c=_0x5e5f2e;return _0x3e9327[_0x5bef5c(0x1a3)]===_0x5bef5c(0x147);}function P(_0x17a95c,_0x3c98b0){const _0xc4b335=_0x5e5f2e;return!R(_0x17a95c)||typeof _0x17a95c[_0xc4b335(0x168)]!=_0xc4b335(0x14f)||typeof _0x17a95c[_0xc4b335(0x198)]!=_0xc4b335(0x14f)||typeof _0x17a95c[_0xc4b335(0x151)]!=_0xc4b335(0x14f)?{}:{[_0x3c98b0]:{'attemptedAt':_0x17a95c[_0xc4b335(0x168)],'buildCommit':_0x17a95c[_0xc4b335(0x198)],'cliVersion':_0x17a95c['cliVersion']}};}function _0x5f43(_0x25f93c,_0x30fdf4){_0x25f93c=_0x25f93c-0x145;const _0x26cc8f=_0x26cc();let _0x5f430c=_0x26cc8f[_0x25f93c];return _0x5f430c;}function F(_0x14daef){const _0x487787=_0x5e5f2e;let _0x3750ce=Number(_0x14daef[_0x487787(0x152)]('.')[0x0]);return Number[_0x487787(0x187)](_0x3750ce)&&_0x3750ce>0x0?_0x3750ce:void 0x0;}function I(_0x52ffa0,_0x1bb2f6){const _0x229bc1=_0x5e5f2e;return typeof _0x52ffa0==_0x229bc1(0x14f)&&_0x52ffa0[_0x229bc1(0x16e)]()['length']>0x0?_0x52ffa0['trim']():_0x1bb2f6;}function L(_0x4c3a09,_0x35b29c){const _0x359c20=_0x5e5f2e;return typeof _0x4c3a09==_0x359c20(0x18e)&&Number[_0x359c20(0x187)](_0x4c3a09)&&_0x4c3a09>0x0?_0x4c3a09:_0x35b29c;}function R(_0x464ba5){const _0x1f09d4=_0x5e5f2e;return typeof _0x464ba5==_0x1f09d4(0x14e)&&!!_0x464ba5;}var z=process[_0x5e5f2e(0x17d)][0x2];try{z==='first-open'?await _():z===_0x5e5f2e(0x157)?B(_0x5e5f2e(0x14d)):z===_0x5e5f2e(0x14d)&&await g();}catch{}function B(_0x409449){const _0x5e6170=_0x5e5f2e;_0x459dc2(process['execPath'],[_0x17b18c(import.meta.url),_0x409449],{'detached':!0x0,'env':process.env,'stdio':_0x5e6170(0x195),'windowsHide':!0x0})[_0x5e6170(0x174)]();}
@@ -1 +1 @@
1
- const _0x4b7f1c=_0x128e;(function(_0x35d801,_0x475707){const _0x5c8293=_0x128e,_0x314ec0=_0x35d801();while(!![]){try{const _0x2902e7=-parseInt(_0x5c8293(0x174))/0x1*(parseInt(_0x5c8293(0x199))/0x2)+-parseInt(_0x5c8293(0x197))/0x3+parseInt(_0x5c8293(0x16d))/0x4*(parseInt(_0x5c8293(0x172))/0x5)+parseInt(_0x5c8293(0x18b))/0x6+parseInt(_0x5c8293(0x177))/0x7+-parseInt(_0x5c8293(0x18e))/0x8*(parseInt(_0x5c8293(0x18c))/0x9)+-parseInt(_0x5c8293(0x185))/0xa;if(_0x2902e7===_0x475707)break;else _0x314ec0['push'](_0x314ec0['shift']());}catch(_0x3aadb6){_0x314ec0['push'](_0x314ec0['shift']());}}}(_0x1ddb,0xe01aa));import'../chunks/vendor-CgwrUUL6.js';import{t as _0x4754e9}from'../chunks/headless-univer-B0Rozw6u.js';function _0x128e(_0x21fa9a,_0x1a6194){_0x21fa9a=_0x21fa9a-0x16c;const _0x1ddb7e=_0x1ddb();let _0x128e86=_0x1ddb7e[_0x21fa9a];return _0x128e86;}import{n as _0x5d4d02,o as _0x59a1fe,t as _0xf83652}from'../chunks/trace-DPfd8LdJ.js';let i=function(_0x24e629){const _0x23aa16=_0x128e;return _0x24e629[_0x23aa16(0x198)]=_0x23aa16(0x195),_0x24e629['EvalJs']='evaljs',_0x24e629[_0x23aa16(0x16c)]=_0x23aa16(0x16f),_0x24e629['ExportWorkbookData']=_0x23aa16(0x17b),_0x24e629[_0x23aa16(0x176)]=_0x23aa16(0x16e),_0x24e629[_0x23aa16(0x19b)]=_0x23aa16(0x17d),_0x24e629;}({});var a=class{[_0x4b7f1c(0x178)]=Promise[_0x4b7f1c(0x17c)]();async['enqueue'](_0x5189e9){const _0x475b7d=_0x4b7f1c;let _0x5a6a76=this[_0x475b7d(0x178)],_0x516036;this['tail']=new Promise(_0x225265=>{_0x516036=_0x225265;}),await _0x5a6a76;try{return await _0x5189e9();}finally{_0x516036?.();}}},o=_0x4754e9(),s=new a();process['send']?.({'type':_0x4b7f1c(0x17e)}),process['on'](_0x4b7f1c(0x191),async _0x1a0509=>{const _0x527649=_0x4b7f1c;if(_0x1a0509?.[_0x527649(0x188)]!=='rpc-request')return;let _0x479cb4=await c(_0x1a0509[_0x527649(0x18f)]);process['send']?.({'type':_0x527649(0x182),'id':_0x1a0509['id'],'data':_0x479cb4});}),process['on']('disconnect',()=>{const _0x538400=_0x4b7f1c;o[_0x538400(0x18d)](),process['exit'](0x0);}),process['on'](_0x4b7f1c(0x170),()=>{const _0x1457ac=_0x4b7f1c;o[_0x1457ac(0x18d)](),process[_0x1457ac(0x196)](0x0);});async function c(_0x1bbc2a){const _0x42b42a=_0x4b7f1c;let _0x38a9cb=_0xf83652(_0x1bbc2a[_0x42b42a(0x193)]?.[_0x42b42a(0x190)]),_0x33e41c=async()=>await _0x5d4d02[_0x42b42a(0x17a)]({'name':_0x59a1fe[_0x42b42a(0x183)],'kind':'server'},async()=>await l(_0x1bbc2a));return _0x38a9cb===void 0x0?await _0x33e41c():await _0x5d4d02[_0x42b42a(0x181)](_0x38a9cb,_0x33e41c);}async function l(_0x4145fc){const _0x52bd2f=_0x4b7f1c;try{switch(_0x4145fc['method']){case i['CreateWorkbook']:{let _0x36501f=o[_0x52bd2f(0x195)](_0x4145fc[_0x52bd2f(0x184)]??{});return{'jsonrpc':_0x52bd2f(0x192),'id':_0x4145fc['id'],'result':{'success':!0x0,'workbookData':_0x36501f}};}case i[_0x52bd2f(0x176)]:{let _0x26997e=o[_0x52bd2f(0x17f)](_0x4145fc[_0x52bd2f(0x184)][_0x52bd2f(0x186)]);return{'jsonrpc':_0x52bd2f(0x192),'id':_0x4145fc['id'],'result':{'success':!0x0,'workbookData':_0x26997e}};}case i[_0x52bd2f(0x19b)]:return await o[_0x52bd2f(0x17d)](_0x4145fc['params']),{'jsonrpc':'2.0','id':_0x4145fc['id'],'result':{'success':!0x0}};case i[_0x52bd2f(0x173)]:return{'jsonrpc':_0x52bd2f(0x192),'id':_0x4145fc['id'],'result':{'success':!0x0,'workbookData':o[_0x52bd2f(0x17b)]()}};case i['ExportWorkbookFile']:{let _0x369ebf=_0x4145fc[_0x52bd2f(0x184)],_0xd0ebea=await o[_0x52bd2f(0x16f)](_0x369ebf[_0x52bd2f(0x175)],_0x369ebf['format']);return{'jsonrpc':_0x52bd2f(0x192),'id':_0x4145fc['id'],'result':{'success':!0x0,..._0xd0ebea}};}case i['EvalJs']:{let _0x3e1f52=_0x4145fc['params']??{},_0x5d66a2=async()=>{const _0x34adc3=_0x52bd2f;let _0xee3570=_0x3e1f52[_0x34adc3(0x180)]?await o[_0x34adc3(0x187)](_0x3e1f52['code'],_0x3e1f52['maxCodeLength']):{'value':await o[_0x34adc3(0x189)](_0x3e1f52[_0x34adc3(0x19a)],_0x3e1f52['maxCodeLength']),'mutations':void 0x0};return{'success':!0x0,..._0xee3570['mutations']===void 0x0?{}:{'mutations':_0xee3570[_0x34adc3(0x179)]},'value':_0xee3570[_0x34adc3(0x18a)]};},_0x3192e0=_0x3e1f52[_0x52bd2f(0x180)]?await s['enqueue'](_0x5d66a2):await _0x5d66a2();return{'jsonrpc':_0x52bd2f(0x192),'id':_0x4145fc['id'],'result':_0x3192e0};}default:throw Error(_0x52bd2f(0x171)+String(_0x4145fc[_0x52bd2f(0x194)]));}}catch(_0x5a595e){return{'jsonrpc':_0x52bd2f(0x192),'id':_0x4145fc['id'],'error':{'code':-0x7f5b,'message':_0x5a595e instanceof Error?_0x5a595e['message']:String(_0x5a595e)}};}}function _0x1ddb(){const _0x33dc78=['evalJsWithMutationCapture','type','evalJs','value','2467752xPMibg','2196918bpeZOP','dispose','8ocFAgC','data','traceparent','message','2.0','meta','method','createWorkbook','exit','1495356sYoduT','CreateWorkbook','1671822GHezHU','code','LoadWorkbookDataReplayPack','ExportWorkbookFile','2119244dwdUuA','loadWorkbook','exportWorkbookFile','SIGTERM','Method\x20not\x20implemented:\x20','15gkgUWl','ExportWorkbookData','1UPyWtL','outputPath','LoadWorkbook','8405859uFjXzS','tail','mutations','withSpan','exportWorkbookData','resolve','loadWorkbookDataReplayPack','ready','loadWorkbookData','mutates','withContext','rpc-response','RuntimeRpcClient','params','7051670pGMxQQ','workbookData'];_0x1ddb=function(){return _0x33dc78;};return _0x1ddb();}
1
+ function _0xf363(){const _0x48c661=['method','5716449bGPlQA','SIGTERM','data','5996YbkSBA','loadWorkbook','24qYDUxx','type','meta','tail','LoadWorkbookDataReplayPack','233045KqwysK','evalJs','disconnect','2.0','exit','130LzKRiI','evaljs','exportWorkbookFile','value','withSpan','204NoWqPO','outputPath','message','8INjEsp','10MDkuZe','Method\x20not\x20implemented:\x20','1262085QxgXCY','resolve','params','21523GgrHoQ','rpc-request','CreateWorkbook','send','3687McBKvR','7246337pVIvPE','mutates','LoadWorkbook','code','RuntimeRpcClient','dispose','ExportWorkbookFile','loadWorkbookDataReplayPack','EvalJs','3313188bmBpCr','enqueue','evalJsWithMutationCapture','createWorkbook','ExportWorkbookData','maxCodeLength','traceparent','exportWorkbookData'];_0xf363=function(){return _0x48c661;};return _0xf363();}const _0x5a7b5c=_0x1369;(function(_0x208494,_0x165567){const _0x41040e=_0x1369,_0x5e0a83=_0x208494();while(!![]){try{const _0x35736a=-parseInt(_0x41040e(0x197))/0x1*(parseInt(_0x41040e(0x1b3))/0x2)+parseInt(_0x41040e(0x19b))/0x3*(parseInt(_0x41040e(0x1b1))/0x4)+parseInt(_0x41040e(0x1b8))/0x5*(-parseInt(_0x41040e(0x18e))/0x6)+-parseInt(_0x41040e(0x19c))/0x7*(parseInt(_0x41040e(0x191))/0x8)+parseInt(_0x41040e(0x1ae))/0x9*(-parseInt(_0x41040e(0x192))/0xa)+-parseInt(_0x41040e(0x194))/0xb+-parseInt(_0x41040e(0x1a5))/0xc*(-parseInt(_0x41040e(0x1bd))/0xd);if(_0x35736a===_0x165567)break;else _0x5e0a83['push'](_0x5e0a83['shift']());}catch(_0x1caef1){_0x5e0a83['push'](_0x5e0a83['shift']());}}}(_0xf363,0xee158));import'../chunks/vendor-CgwrUUL6.js';function _0x1369(_0x426c0c,_0x3ff984){_0x426c0c=_0x426c0c-0x18c;const _0xf363cf=_0xf363();let _0x1369ac=_0xf363cf[_0x426c0c];return _0x1369ac;}import{t as _0x1ee3cd}from'../chunks/headless-univer-B0Rozw6u.js';import{n as _0x2b0f70,o as _0x402f0e,t as _0x24d259}from'../chunks/trace-DPfd8LdJ.js';let i=function(_0x53d728){const _0x4f4ab4=_0x1369;return _0x53d728[_0x4f4ab4(0x199)]=_0x4f4ab4(0x1a8),_0x53d728[_0x4f4ab4(0x1a4)]=_0x4f4ab4(0x1be),_0x53d728[_0x4f4ab4(0x1a2)]='exportWorkbookFile',_0x53d728['ExportWorkbookData']=_0x4f4ab4(0x1ac),_0x53d728[_0x4f4ab4(0x19e)]=_0x4f4ab4(0x1b2),_0x53d728['LoadWorkbookDataReplayPack']=_0x4f4ab4(0x1a3),_0x53d728;}({});var a=class{['tail']=Promise[_0x5a7b5c(0x195)]();async[_0x5a7b5c(0x1a6)](_0x1b1f45){const _0x19589f=_0x5a7b5c;let _0x1804a4=this['tail'],_0x27ee6f;this[_0x19589f(0x1b6)]=new Promise(_0x23f279=>{_0x27ee6f=_0x23f279;}),await _0x1804a4;try{return await _0x1b1f45();}finally{_0x27ee6f?.();}}},o=_0x1ee3cd(),s=new a();process[_0x5a7b5c(0x19a)]?.({'type':'ready'}),process['on'](_0x5a7b5c(0x190),async _0x56db01=>{const _0x42cc4d=_0x5a7b5c;if(_0x56db01?.[_0x42cc4d(0x1b4)]!==_0x42cc4d(0x198))return;let _0x4c5a9b=await c(_0x56db01[_0x42cc4d(0x1b0)]);process[_0x42cc4d(0x19a)]?.({'type':'rpc-response','id':_0x56db01['id'],'data':_0x4c5a9b});}),process['on'](_0x5a7b5c(0x1ba),()=>{const _0x5ed5a1=_0x5a7b5c;o[_0x5ed5a1(0x1a1)](),process[_0x5ed5a1(0x1bc)](0x0);}),process['on'](_0x5a7b5c(0x1af),()=>{const _0x7278ac=_0x5a7b5c;o[_0x7278ac(0x1a1)](),process[_0x7278ac(0x1bc)](0x0);});async function c(_0x3f574d){const _0x3c4300=_0x5a7b5c;let _0x49e11d=_0x24d259(_0x3f574d[_0x3c4300(0x1b5)]?.[_0x3c4300(0x1ab)]),_0x121bba=async()=>await _0x2b0f70[_0x3c4300(0x18d)]({'name':_0x402f0e[_0x3c4300(0x1a0)],'kind':'server'},async()=>await l(_0x3f574d));return _0x49e11d===void 0x0?await _0x121bba():await _0x2b0f70['withContext'](_0x49e11d,_0x121bba);}async function l(_0x31707f){const _0x5af16b=_0x5a7b5c;try{switch(_0x31707f['method']){case i[_0x5af16b(0x199)]:{let _0x1b32a7=o[_0x5af16b(0x1a8)](_0x31707f[_0x5af16b(0x196)]??{});return{'jsonrpc':_0x5af16b(0x1bb),'id':_0x31707f['id'],'result':{'success':!0x0,'workbookData':_0x1b32a7}};}case i[_0x5af16b(0x19e)]:{let _0x4befb5=o['loadWorkbookData'](_0x31707f[_0x5af16b(0x196)]['workbookData']);return{'jsonrpc':_0x5af16b(0x1bb),'id':_0x31707f['id'],'result':{'success':!0x0,'workbookData':_0x4befb5}};}case i[_0x5af16b(0x1b7)]:return await o[_0x5af16b(0x1a3)](_0x31707f[_0x5af16b(0x196)]),{'jsonrpc':'2.0','id':_0x31707f['id'],'result':{'success':!0x0}};case i[_0x5af16b(0x1a9)]:return{'jsonrpc':'2.0','id':_0x31707f['id'],'result':{'success':!0x0,'workbookData':o['exportWorkbookData']()}};case i[_0x5af16b(0x1a2)]:{let _0x4ea18b=_0x31707f['params'],_0x12f563=await o[_0x5af16b(0x1bf)](_0x4ea18b[_0x5af16b(0x18f)],_0x4ea18b['format']);return{'jsonrpc':'2.0','id':_0x31707f['id'],'result':{'success':!0x0,..._0x12f563}};}case i['EvalJs']:{let _0xd44c40=_0x31707f[_0x5af16b(0x196)]??{},_0x88ba92=async()=>{const _0x192657=_0x5af16b;let _0x358f1f=_0xd44c40[_0x192657(0x19d)]?await o[_0x192657(0x1a7)](_0xd44c40['code'],_0xd44c40[_0x192657(0x1aa)]):{'value':await o[_0x192657(0x1b9)](_0xd44c40[_0x192657(0x19f)],_0xd44c40[_0x192657(0x1aa)]),'mutations':void 0x0};return{'success':!0x0,..._0x358f1f['mutations']===void 0x0?{}:{'mutations':_0x358f1f['mutations']},'value':_0x358f1f[_0x192657(0x18c)]};},_0x1b1a92=_0xd44c40[_0x5af16b(0x19d)]?await s[_0x5af16b(0x1a6)](_0x88ba92):await _0x88ba92();return{'jsonrpc':_0x5af16b(0x1bb),'id':_0x31707f['id'],'result':_0x1b1a92};}default:throw Error(_0x5af16b(0x193)+String(_0x31707f[_0x5af16b(0x1ad)]));}}catch(_0x532aba){return{'jsonrpc':_0x5af16b(0x1bb),'id':_0x31707f['id'],'error':{'code':-0x7f5b,'message':_0x532aba instanceof Error?_0x532aba[_0x5af16b(0x190)]:String(_0x532aba)}};}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "univer-cli",
3
- "version": "0.1.21",
3
+ "version": "0.1.23",
4
4
  "description": "Command-line tools for local Univer workbook automation.",
5
5
  "repository": {
6
6
  "type": "git",