univer-cli 0.1.6 → 0.1.7
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/chunks/build-id-Coc3wh1M.js +1 -1
- package/chunks/headless-univer-BWfA31gd.js +1 -1
- package/chunks/runtime-eval-kernels-dRCWgwtH.js +1 -1
- package/chunks/runtime-manifest-DvhuIQzx.js +1 -1
- package/chunks/trace-DPfd8LdJ.js +1 -1
- package/internal/cli.js +1 -1
- package/internal/daemon.js +1 -1
- package/internal/univer-runner.js +1 -1
- package/package.json +1 -1
- package/view/browser/assets/formula-dependency-graph-panel.js +1 -1
- package/view/browser/assets/viewer.js +1 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x36f735=_0x7a27;(function(_0x610350,_0x3f3f37){const _0x42083e=_0x7a27,_0x12b6ac=_0x610350();while(!![]){try{const _0x3c025d=-parseInt(_0x42083e(0x258))/0x1+-parseInt(_0x42083e(0x269))/0x2*(parseInt(_0x42083e(0x243))/0x3)+parseInt(_0x42083e(0x17c))/0x4+-parseInt(_0x42083e(0x1cb))/0x5+parseInt(_0x42083e(0x26f))/0x6+parseInt(_0x42083e(0x1fe))/0x7*(-parseInt(_0x42083e(0x1aa))/0x8)+parseInt(_0x42083e(0x17f))/0x9;if(_0x3c025d===_0x3f3f37)break;else _0x12b6ac['push'](_0x12b6ac['shift']());}catch(_0x26b30a){_0x12b6ac['push'](_0x12b6ac['shift']());}}}(_0x46df,0x473b2));import{o as _0x2abc69}from'./rolldown-runtime-D8j-JhcR.js';import{gn as _0x1a248a}from'./vendor-DjomC5bd.js';import{a as _0x4967d3,i as _0x1cadbd,n as _0x4406ad,o as _0x51aa2e,r as _0x567489}from'./trace-DPfd8LdJ.js';import{fork as _0x27ccbb,spawn as _0x458070}from'node:child_process';import{constants as _0x3a0aff,existsSync as _0x41250e,mkdirSync as _0x5f0833,readFileSync as _0x2d3933}from'node:fs';import{access as _0x1d1297,appendFile as _0x834a5f,mkdir as _0x301038,readFile as _0x5e0888,readdir as _0x2798e8,realpath as _0x2c7941,rename as _0x2e1ee9,rm as _0x11db62,stat as _0x31ea19,writeFile as _0x243964}from'node:fs/promises';import{basename as _0x4d9d2d,dirname as _0x25ebef,extname as _0x31d09c,join as _0x3c212b,resolve as _0x3734f1}from'node:path';import{fileURLToPath as _0x42c9c0,pathToFileURL as _0x55238d}from'node:url';import{createRequire as _0x282ff7}from'node:module';import{hostname as _0x40fa30}from'node:os';import{createHash as _0x5e504b,randomUUID as _0x2e23fe}from'node:crypto';import _0x440f7a from'node:net';import _0x3a21e3 from'node:process';import{EventEmitter as _0x2aff22}from'node:events';const x={'Health':'daemon.health','Shutdown':_0x36f735(0x17e),'SessionCreateWorkbook':_0x36f735(0x303),'SessionEvalJs':_0x36f735(0x312),'SessionExportWorkbookFile':_0x36f735(0x1e8),'SessionExportWorkbookData':_0x36f735(0x22f),'SessionDispose':_0x36f735(0x1f2),'SessionGetWorkbook':'session.getWorkbook','SessionLoadWorkbook':_0x36f735(0x1d3),'SessionLoadWorkbookDataReplayPack':'session.loadWorkbookDataReplayPack'};var ge=class{[_0x36f735(0x2ec)](_0x5a28b2){}[_0x36f735(0x27d)](_0x4a5cb5){}['warn'](_0x417d79){}['error'](_0x38a210){}[_0x36f735(0x1dc)](_0x360cf5){}async[_0x36f735(0x2d5)](){}};function _e(_0x10a8f8,_0x478eaf=new Date()){const _0x2344da=_0x36f735;let _0x56e494=_0x4406ad['active']();return{'time':_0x478eaf[_0x2344da(0x1a0)](),'level':_0x10a8f8[_0x2344da(0x2bf)]??_0x2344da(0x27d),'event_name':_0x10a8f8[_0x2344da(0x1b5)],'component':_0x10a8f8['component'],'process_role':_0x10a8f8[_0x2344da(0x21b)],'pid':process['pid'],..._0x10a8f8['message']===void 0x0?{}:{'message':_0x10a8f8[_0x2344da(0x246)]},..._0x56e494===void 0x0?{}:{'trace_id':_0x56e494[_0x2344da(0x262)],'span_id':_0x56e494[_0x2344da(0x300)],'trace_flags':_0x56e494[_0x2344da(0x1e1)],..._0x56e494[_0x2344da(0x2ad)]===void 0x0?{}:{'parent_span_id':_0x56e494[_0x2344da(0x2ad)]}},..._0x10a8f8[_0x2344da(0x302)]===void 0x0?{}:{'error':ve(_0x10a8f8[_0x2344da(0x302)])},..._0x10a8f8[_0x2344da(0x280)]??{}};}function ve(_0x3afc2d){const _0x32cffc=_0x36f735;return _0x3afc2d instanceof Error?{'message':_0x3afc2d[_0x32cffc(0x246)],'name':_0x3afc2d[_0x32cffc(0x244)],...be(_0x3afc2d),..._0x3afc2d['stack']===void 0x0?{}:{'stack':_0x3afc2d['stack']},...ye(_0x3afc2d)}:{'message':typeof _0x3afc2d=='string'?_0x3afc2d:JSON[_0x32cffc(0x1e3)](_0x3afc2d)};}function ye(_0x1147dc){const _0x4411d3=_0x36f735;let _0x4b2d42=_0x1147dc;return typeof _0x4b2d42[_0x4411d3(0x186)]=='string'?{'code':_0x4b2d42[_0x4411d3(0x186)]}:{};}function be(_0x231e73){const _0x30c6f5=_0x36f735;let _0x4172ab=_0x231e73;return _0x4172ab[_0x30c6f5(0x25e)]===null||typeof _0x4172ab[_0x30c6f5(0x25e)]!=_0x30c6f5(0x19f)||Array[_0x30c6f5(0x1fc)](_0x4172ab[_0x30c6f5(0x25e)])?{}:{'details':_0x4172ab[_0x30c6f5(0x25e)]};}var xe=_0x2abc69(_0x1a248a(),0x1)[_0x36f735(0x1a3)],Se=0xa*0x400*0x400,Ce=0x5,we=0x3e8,Te=class{[_0x36f735(0x1df)];[_0x36f735(0x1f4)];[_0x36f735(0x215)];[_0x36f735(0x180)];[_0x36f735(0x17b)];[_0x36f735(0x22b)];[_0x36f735(0x2ee)];[_0x36f735(0x220)]=!0x1;['nextRotationCheckAt']=0x0;[_0x36f735(0x232)];[_0x36f735(0x19b)]=!0x1;constructor(_0x1edd74){const _0x28efa8=_0x36f735;this[_0x28efa8(0x215)]=_0x1edd74[_0x28efa8(0x215)]===!0x0,this[_0x28efa8(0x180)]=_0x1edd74[_0x28efa8(0x180)],this['maxArchiveFiles']=_0x1edd74[_0x28efa8(0x17b)]??Ce,this['maxBytes']=_0x1edd74[_0x28efa8(0x22b)]??Se,this[_0x28efa8(0x2ee)]=_0x1edd74[_0x28efa8(0x2ee)]??we,this['destination']=new xe({'dest':_0x1edd74[_0x28efa8(0x180)],'mkdir':!0x0,'sync':!0x1}),this[_0x28efa8(0x1f4)]=new Promise(_0x1fa8d2=>{const _0x4723d6=_0x28efa8;this[_0x4723d6(0x1df)][_0x4723d6(0x30d)](_0x4723d6(0x1f4),()=>{_0x1fa8d2();}),this[_0x4723d6(0x1df)]['once'](_0x4723d6(0x302),()=>{_0x1fa8d2();});});}[_0x36f735(0x2ec)](_0x341eeb){const _0x1fa380=_0x36f735;this[_0x1fa380(0x1dc)]({..._0x341eeb,'level':_0x1fa380(0x2ec)});}[_0x36f735(0x27d)](_0x314b49){const _0x264a00=_0x36f735;this['event']({..._0x314b49,'level':_0x264a00(0x27d)});}[_0x36f735(0x2d9)](_0x2b4690){const _0xa4c401=_0x36f735;this[_0xa4c401(0x1dc)]({..._0x2b4690,'level':_0xa4c401(0x2d9)});}['error'](_0xfd5b69){const _0x1a5358=_0x36f735;this['event']({..._0xfd5b69,'level':_0x1a5358(0x302)});}[_0x36f735(0x1dc)](_0x163d4a){const _0xd5cded=_0x36f735;if(!(this[_0xd5cded(0x220)]||this[_0xd5cded(0x19b)]))try{this[_0xd5cded(0x19b)]=!this[_0xd5cded(0x1df)][_0xd5cded(0x2d2)](JSON['stringify'](_e(_0x163d4a))+'\x0a'),this[_0xd5cded(0x19b)]&&this[_0xd5cded(0x1df)][_0xd5cded(0x30d)](_0xd5cded(0x2fd),()=>{const _0x195e75=_0xd5cded;this[_0x195e75(0x19b)]=!0x1;}),this['scheduleRotationIfNeeded']();}catch{}}async[_0x36f735(0x2d5)](){const _0x110185=_0x36f735;this[_0x110185(0x220)]||(await this[_0x110185(0x1f4)],await new Promise(_0x40b94f=>{const _0x4640bd=_0x110185;this[_0x4640bd(0x1df)][_0x4640bd(0x2d5)](()=>{_0x40b94f();});}),await this[_0x110185(0x232)],this[_0x110185(0x215)]&&(this[_0x110185(0x220)]=!0x0,this['destination'][_0x110185(0x2a3)]()));}[_0x36f735(0x177)](){const _0x4a9570=_0x36f735;let _0x268fa5=Date[_0x4a9570(0x2bd)]();this[_0x4a9570(0x232)]!==void 0x0||_0x268fa5<this[_0x4a9570(0x28c)]||(this[_0x4a9570(0x28c)]=_0x268fa5+this[_0x4a9570(0x2ee)],this[_0x4a9570(0x232)]=this[_0x4a9570(0x27b)]()['catch'](()=>{})[_0x4a9570(0x2cf)](()=>{this['rotationInFlight']=void 0x0;}));}async[_0x36f735(0x27b)](){const _0x5f29ce=_0x36f735;await this[_0x5f29ce(0x1f4)],await je({'logPath':this[_0x5f29ce(0x180)],'maxArchiveFiles':this[_0x5f29ce(0x17b)],'maxBytes':this[_0x5f29ce(0x22b)],'flush':async()=>{await new Promise(_0x3db9bc=>{const _0x344928=_0x7a27;this[_0x344928(0x1df)][_0x344928(0x2d5)](()=>{_0x3db9bc();});});}})&&!this[_0x5f29ce(0x220)]&&this[_0x5f29ce(0x1df)][_0x5f29ce(0x1b0)](this['logPath']);}};function Ee(_0x5a0e80){return new Te(_0x5a0e80);}function De(_0x48766f){let {env:_0x157a60,role:_0x55f70f,..._0x386575}=_0x48766f,_0x209ab0=S(_0x157a60);return Ee({..._0x386575,'logPath':ke(_0x209ab0,_0x55f70f)});}function Oe(_0x80b987=process.env){const _0x128bbb=_0x36f735;let _0x4954ff=_0x80b987[_0x128bbb(0x1fb)]?.[_0x128bbb(0x26a)]();if(_0x4954ff)return _0x3734f1(_0x4954ff);let _0x22154e=_0x80b987[_0x128bbb(0x22d)]?.[_0x128bbb(0x26a)]()||_0x80b987[_0x128bbb(0x20c)]?.[_0x128bbb(0x26a)]();if(!_0x22154e)throw Error(_0x128bbb(0x2b4));return _0x3734f1(_0x22154e,_0x128bbb(0x2f9));}function S(_0x2939b5=process.env){const _0x24448a=_0x36f735;let _0x576945=Oe(_0x2939b5),_0x1150ef=_0x3c212b(_0x576945,_0x24448a(0x314));return{'homeDir':_0x576945,'logsDir':_0x1150ef,'cliLogPath':_0x3c212b(_0x1150ef,_0x24448a(0x2cb)),'daemonLogPath':_0x3c212b(_0x1150ef,_0x24448a(0x28a)),'runtimeLogPath':_0x3c212b(_0x1150ef,_0x24448a(0x1c7)),'viewHostLogPath':_0x3c212b(_0x1150ef,_0x24448a(0x2fa))};}function ke(_0x3aff98,_0x48e13e){const _0x169a77=_0x36f735;switch(_0x48e13e){case _0x169a77(0x179):return _0x3aff98[_0x169a77(0x27c)];case'daemon':return _0x3aff98['daemonLogPath'];case'runtime':return _0x3aff98[_0x169a77(0x17d)];case _0x169a77(0x1ab):return _0x3aff98[_0x169a77(0x271)];}}async function Ae(_0x128a30,_0x41afa1){const _0x45eb22=_0x36f735;await _0x301038(_0x25ebef(_0x128a30),{'recursive':!0x0,'mode':0x1c0}),await _0x834a5f(_0x128a30,_0x41afa1+'\x0a',_0x45eb22(0x291));try{await je({'logPath':_0x128a30,'maxArchiveFiles':Ce,'maxBytes':Se});}catch{}}async function je(_0x5b676a){const _0x210fd2=_0x36f735;if(_0x5b676a[_0x210fd2(0x22b)]<=0x0)return!0x1;await _0x5b676a[_0x210fd2(0x2d5)]?.();let _0x174d21;try{_0x174d21=await _0x31ea19(_0x5b676a[_0x210fd2(0x180)]);}catch{return!0x1;}if(!_0x174d21[_0x210fd2(0x2a1)]()||_0x174d21[_0x210fd2(0x20a)]<_0x5b676a[_0x210fd2(0x22b)])return!0x1;let _0x451399=_0x3c212b(_0x25ebef(_0x5b676a[_0x210fd2(0x180)]),'archive');await _0x301038(_0x451399,{'recursive':!0x0,'mode':0x1c0});let _0x3a3779=_0x3c212b(_0x451399,_0x4d9d2d(_0x5b676a[_0x210fd2(0x180)])+'.'+Ne(new Date())+'.'+process['pid']);try{await _0x2e1ee9(_0x5b676a['logPath'],_0x3a3779);}catch{return!0x1;}return await Me({'archiveDir':_0x451399,'maxArchiveFiles':_0x5b676a['maxArchiveFiles'],'prefix':_0x4d9d2d(_0x5b676a[_0x210fd2(0x180)])+'.'}),!0x0;}async function Me(_0x2692dd){const _0x33fcb7=_0x36f735;if(_0x2692dd[_0x33fcb7(0x17b)]<0x0)return;let _0x3848d0;try{_0x3848d0=await _0x2798e8(_0x2692dd['archiveDir']);}catch{return;}let _0x4889bf=_0x3848d0['filter'](_0x358455=>_0x358455[_0x33fcb7(0x273)](_0x2692dd['prefix']))[_0x33fcb7(0x307)]()[_0x33fcb7(0x2c1)]();await Promise[_0x33fcb7(0x26e)](_0x4889bf[_0x33fcb7(0x1ac)](_0x2692dd['maxArchiveFiles'])[_0x33fcb7(0x176)](async _0x371475=>await _0x11db62(_0x3c212b(_0x2692dd['archiveDir'],_0x371475),{'force':!0x0})));}function Ne(_0x2157ba){const _0x1ded70=_0x36f735;return _0x2157ba['toISOString']()[_0x1ded70(0x18c)](/[^0-9A-Za-z]/gu,'');}var Pe=0x46,Fe=_0x36f735(0x2da);function Ie(_0x17e01d=process.env){const _0x50d486=_0x36f735;let _0x11f8e4=_0x17e01d[_0x50d486(0x1fb)]?.[_0x50d486(0x26a)]();if(_0x11f8e4)return _0x3734f1(_0x11f8e4);let _0x10c317=_0x17e01d[_0x50d486(0x22d)]?.['trim']()||_0x17e01d[_0x50d486(0x20c)]?.[_0x50d486(0x26a)]();if(!_0x10c317)throw Error(_0x50d486(0x2b4));return _0x3734f1(_0x10c317,_0x50d486(0x2f9));}function C(_0x3fc292=process.env){const _0x30965e=_0x36f735;let _0x3dfe3b=Ie(_0x3fc292),_0x40656d=_0x3c212b(_0x3dfe3b,'daemon'),_0x2927ec=_0x3c212b(_0x3dfe3b,'sessions'),_0x419f2e=S(_0x3fc292),_0x3f6bfb=Le(_0x3dfe3b);return{'homeDir':_0x3dfe3b,'daemonDir':_0x40656d,'logsDir':_0x419f2e[_0x30965e(0x1c4)],'daemonLogPath':_0x419f2e[_0x30965e(0x21e)],'sessionRoot':_0x2927ec,'socketPath':_0x3f6bfb,'pidPath':_0x3c212b(_0x40656d,_0x30965e(0x1f6)),'metaPath':_0x3c212b(_0x40656d,_0x30965e(0x1b6)),'lockPath':_0x3c212b(_0x40656d,'daemon.lock')};}function Le(_0x227d8c,_0x70b560=process[_0x36f735(0x310)]){const _0x169a1e=_0x36f735;let _0x4f9b3f=_0x3c212b(_0x227d8c,'daemon',_0x169a1e(0x207));return _0x70b560==='win32'?Fe+_0x169a1e(0x2cc)+ze(_0x4f9b3f):_0x4f9b3f[_0x169a1e(0x294)]<=Pe?_0x4f9b3f:_0x3c212b(_0x169a1e(0x1dd),_0x169a1e(0x21d)+ze(_0x4f9b3f)+_0x169a1e(0x214));}function w(_0x1fec6a){const _0x592799=_0x36f735;return _0x1fec6a[_0x592799(0x273)](Fe);}function Re(_0x40a42f,_0x57cf45=process.env){const _0x2185ad=_0x36f735;let _0x3cf74f=_0x3c212b(C(_0x57cf45)[_0x2185ad(0x1e9)],_0x40a42f);return{'sessionDir':_0x3cf74f,'tracePath':S(_0x57cf45)['runtimeLogPath'],'stderrPath':_0x3c212b(_0x3cf74f,_0x2185ad(0x27e))};}function ze(_0x6e9e2b){const _0xc4b52f=_0x36f735;return _0x5e504b(_0xc4b52f(0x193))[_0xc4b52f(0x197)](_0x6e9e2b)['digest']('hex')[_0xc4b52f(0x1ac)](0x0,0x10);}var Be=0x3a98,Ve=0x7530;async function T(_0x4799a0={}){const _0x35d3f4=_0x36f735;return await D({'jsonrpc':'2.0','id':k(),'method':x[_0x35d3f4(0x18a)]},{..._0x4799a0,'autoStart':!0x1});}async function E(_0x542422={}){const _0x205009=_0x36f735;let _0x41ed7b=_0x542422[_0x205009(0x282)]??_0x3a21e3[_0x205009(0x282)],{readDaemonBuildId:_0x3e3928}=await import(_0x205009(0x1d9)),_0x4c66df=_0x3e3928(_0x41ed7b);try{let _0x23172d=await T({..._0x542422,'autoStart':!0x1});return lt(_0x4c66df,_0x23172d['buildId']),_0x23172d;}catch(_0x4d2b42){if(_0x542422[_0x205009(0x29c)]===!0x1)throw _0x4d2b42;}let _0x52e1af=await it(_0x41ed7b,_0x4c66df,_0x542422[_0x205009(0x2f3)]),_0x19a7aa=_0x542422['startTimeoutMs']??Be,_0x13ee50=Date[_0x205009(0x2bd)]()+_0x19a7aa,_0x1386ee;for(;Date['now']()<_0x13ee50;)try{let _0x4168fa=await T({..._0x542422,'autoStart':!0x1});return lt(_0x4c66df,_0x4168fa[_0x205009(0x22c)]),_0x4168fa;}catch(_0x15870a){_0x1386ee=_0x15870a,await ft(0x64);}throw Error([_0x205009(0x254)+_0x19a7aa+'ms',_0x205009(0x1bb)+_0x52e1af[_0x205009(0x296)]+'\x20'+_0x52e1af['args']['join']('\x20'),_0x205009(0x23d)+dt(_0x1386ee)][_0x205009(0x1be)](';\x20'));}async function He(_0x134c52={}){const _0x22a35e=_0x36f735;let _0x5b7709=C(_0x134c52['env']??_0x3a21e3[_0x22a35e(0x282)]);try{return $e(await T({..._0x134c52,'autoStart':!0x1}),_0x5b7709);}catch(_0x50f92f){return rt(_0x5b7709)?tt(_0x5b7709,_0x50f92f):et(_0x5b7709);}}async function Ue(_0x36762d={}){return await E(_0x36762d);}async function We(_0x160618={}){const _0x17d3ee=_0x36f735;let _0x4b840d=C(_0x160618[_0x17d3ee(0x282)]??_0x3a21e3[_0x17d3ee(0x282)]);try{await D({'jsonrpc':_0x17d3ee(0x283),'id':k(),'method':x[_0x17d3ee(0x31b)]},{..._0x160618,'autoStart':!0x1});}catch{await ot(_0x4b840d[_0x17d3ee(0x1ee)]),await _0x11db62(_0x4b840d[_0x17d3ee(0x29b)],{'force':!0x0})[_0x17d3ee(0x250)](()=>void 0x0),await _0x11db62(_0x4b840d[_0x17d3ee(0x17a)],{'force':!0x0})[_0x17d3ee(0x250)](()=>void 0x0),await _0x11db62(_0x4b840d[_0x17d3ee(0x203)],{'recursive':!0x0,'force':!0x0})[_0x17d3ee(0x250)](()=>void 0x0);return;}let _0x4038bc=Date[_0x17d3ee(0x2bd)]()+(_0x160618[_0x17d3ee(0x1c9)]??Be);for(;Date[_0x17d3ee(0x2bd)]()<_0x4038bc;){if(!at(_0x4b840d[_0x17d3ee(0x1ee)])&&!_0x41250e(_0x4b840d[_0x17d3ee(0x29b)])&&!_0x41250e(_0x4b840d[_0x17d3ee(0x17a)]))return;await ft(0x64);}throw Error(_0x17d3ee(0x1d6));}async function Ge(_0x1caaac,_0x1b15c5,_0x415d5b={}){const _0x58fa7e=_0x36f735;return await E(_0x415d5b),await D({'jsonrpc':'2.0','id':k(),'method':x[_0x58fa7e(0x2a7)],'params':{'workbookPath':_0x1caaac,'workbookData':_0x1b15c5,'cwd':_0x415d5b[_0x58fa7e(0x1ef)]}},_0x415d5b);}async function Ke(_0x5a3358,_0xeb74e4,_0x2d46b6={}){const _0xdfbb4f=_0x36f735;return await E(_0x2d46b6),await D({'jsonrpc':_0xdfbb4f(0x283),'id':k(),'method':x[_0xdfbb4f(0x276)],'params':{'workbookPath':_0x5a3358,'cwd':_0x2d46b6['cwd'],'baseWorkbookData':_0xeb74e4[_0xdfbb4f(0x1c1)],'mutations':_0xeb74e4[_0xdfbb4f(0x2bb)]}},_0x2d46b6);}async function qe(_0x305c0d,_0x15428d={}){const _0xac57f7=_0x36f735;return await E(_0x15428d),await D({'jsonrpc':_0xac57f7(0x283),'id':k(),'method':x['SessionGetWorkbook'],'params':{'workbookPath':_0x305c0d,'cwd':_0x15428d[_0xac57f7(0x1ef)]}},_0x15428d);}async function Je(_0x1c53eb,_0x468ce4={}){const _0x19fc22=_0x36f735;return await E(_0x468ce4),await D({'jsonrpc':_0x19fc22(0x283),'id':k(),'method':x['SessionCreateWorkbook'],'params':{'workbookPath':_0x1c53eb,'cwd':_0x468ce4[_0x19fc22(0x1ef)],'id':_0x468ce4['id'],'name':_0x468ce4[_0x19fc22(0x244)]}},_0x468ce4);}async function Ye(_0x41ae44,_0x4a25c5,_0x41ec57={}){const _0x486a94=_0x36f735;return await E(_0x41ec57),await D({'jsonrpc':_0x486a94(0x283),'id':k(),'method':x[_0x486a94(0x20f)],'params':{'workbookPath':_0x41ae44,'code':_0x4a25c5,'cwd':_0x41ec57['cwd'],'mutates':_0x41ec57[_0x486a94(0x1cf)]}},_0x41ec57);}async function Xe(_0x300987,_0x10576b={}){const _0x35b8f4=_0x36f735;return await E(_0x10576b),await D({'jsonrpc':'2.0','id':k(),'method':x['SessionExportWorkbookData'],'params':{'workbookPath':_0x300987,'cwd':_0x10576b[_0x35b8f4(0x1ef)]}},_0x10576b);}async function Ze(_0x5a907e,_0x276ab7,_0x3ec6af={}){const _0x2430e2=_0x36f735;return await E(_0x3ec6af),await D({'jsonrpc':_0x2430e2(0x283),'id':k(),'method':x['SessionExportWorkbookFile'],'params':{'workbookPath':_0x5a907e,'cwd':_0x3ec6af['cwd'],'format':_0x276ab7[_0x2430e2(0x2c2)],'outputPath':_0x276ab7[_0x2430e2(0x1a2)]}},_0x3ec6af);}async function Qe(_0x3ed8be,_0x382220={}){return await E(_0x382220),await D({'jsonrpc':'2.0','id':k(),'method':x['SessionDispose'],'params':{'workbookPath':_0x3ed8be,'cwd':_0x382220['cwd']}},_0x382220);}async function D(_0x5e264a,_0x3d01c6){const _0x563d70=_0x36f735;return await _0x4406ad[_0x563d70(0x27f)]({'name':_0x51aa2e[_0x563d70(0x1c3)],'kind':'client'},async()=>{const _0x29fc27=_0x563d70;let _0x1a65fe=C(_0x3d01c6[_0x29fc27(0x282)]??_0x3a21e3['env']);w(_0x1a65fe[_0x29fc27(0x1ee)])||await _0x1d1297(_0x1a65fe[_0x29fc27(0x1ee)],_0x3a0aff[_0x29fc27(0x2e0)]);let _0x44f3fb=await ct(_0x1a65fe['socketPath'],{..._0x5e264a,'meta':_0x4406ad[_0x29fc27(0x1e2)](_0x5e264a[_0x29fc27(0x2b6)])},_0x3d01c6[_0x29fc27(0x2c6)]??Ve);if(_0x44f3fb[_0x29fc27(0x302)])throw Error(_0x44f3fb['error']['message']);return _0x44f3fb[_0x29fc27(0x287)];});}function $e(_0x2e5fe9,_0x2f6298){const _0x4f5152=_0x36f735;return{'ok':!0x0,'daemon':{'state':_0x4f5152(0x27a),'pid':_0x2e5fe9[_0x4f5152(0x317)],'runtimeRoot':_0x2e5fe9['runtimeRoot'],'socketPath':_0x2e5fe9[_0x4f5152(0x1ee)],'startedAt':_0x2e5fe9['startedAt'],'sessionCount':_0x2e5fe9[_0x4f5152(0x1e6)],'buildId':_0x2e5fe9[_0x4f5152(0x22c)]},'paths':O(_0x2f6298),'next':[{'command':'univer\x20daemon\x20stop','reason':_0x4f5152(0x275)}],'diagnostics':[]};}function et(_0x19a1d2){const _0x419276=_0x36f735;return{'ok':!0x0,'daemon':nt('stopped',_0x19a1d2),'paths':O(_0x19a1d2),'next':[{'command':_0x419276(0x1d2),'reason':_0x419276(0x247)}],'diagnostics':[]};}function tt(_0x112233,_0x5d191b){const _0x39ef0f=_0x36f735;return{'ok':!0x0,'daemon':nt(_0x39ef0f(0x1cd),_0x112233),'paths':O(_0x112233),'next':[{'command':'univer\x20daemon\x20stop','reason':_0x39ef0f(0x2a4)},{'command':_0x39ef0f(0x1d2),'reason':_0x39ef0f(0x202)}],'diagnostics':[{'message':_0x5d191b instanceof Error?_0x5d191b[_0x39ef0f(0x246)]:String(_0x5d191b)}]};}function nt(_0x59d71a,_0x1eb08f){const _0x59668b=_0x36f735;return{'state':_0x59d71a,'pid':null,'runtimeRoot':_0x1eb08f['homeDir'],'socketPath':_0x1eb08f[_0x59668b(0x1ee)],'startedAt':null,'sessionCount':0x0,'buildId':null};}function O(_0x406cd3){const _0x1b9b9c=_0x36f735;return{'metaPath':_0x406cd3[_0x1b9b9c(0x17a)],'lockPath':_0x406cd3['lockPath']};}function rt(_0x4e59dd){const _0x41870c=_0x36f735;return at(_0x4e59dd[_0x41870c(0x1ee)])||_0x41250e(_0x4e59dd[_0x41870c(0x29b)])||_0x41250e(_0x4e59dd[_0x41870c(0x17a)]);}async function it(_0x227e45,_0x5453e0,_0x4b4d7b){const _0x4cf1c3=_0x36f735;let _0x223102=st(_0x4b4d7b);return _0x5f0833(C(_0x227e45)['daemonDir'],{'recursive':!0x0,'mode':0x1c0}),_0x458070(_0x223102[_0x4cf1c3(0x296)],_0x223102[_0x4cf1c3(0x2e3)],{..._0x223102[_0x4cf1c3(0x1ef)]===void 0x0?{}:{'cwd':_0x223102[_0x4cf1c3(0x1ef)]},'detached':!0x0,'stdio':['ignore',_0x4cf1c3(0x190),'ignore'],'env':ut(_0x227e45,_0x5453e0)})[_0x4cf1c3(0x29f)](),_0x223102;}function at(_0x2de24a){return w(_0x2de24a)?!0x1:_0x41250e(_0x2de24a);}async function ot(_0x478abf){const _0x4ad3d0=_0x36f735;w(_0x478abf)||await _0x11db62(_0x478abf,{'force':!0x0})[_0x4ad3d0(0x250)](()=>void 0x0);}function st(_0x4f54ce){const _0xf94a4c=_0x36f735;if(_0x4f54ce===void 0x0)throw Error(_0xf94a4c(0x315));return{'command':_0x4f54ce[_0xf94a4c(0x296)]??_0x3a21e3[_0xf94a4c(0x290)],..._0x4f54ce[_0xf94a4c(0x1ef)]===void 0x0?{}:{'cwd':_0x4f54ce[_0xf94a4c(0x1ef)]},'args':[..._0x4f54ce[_0xf94a4c(0x288)]??[],_0x4f54ce[_0xf94a4c(0x2f7)],..._0x4f54ce[_0xf94a4c(0x2e3)]??[_0xf94a4c(0x194)]][_0xf94a4c(0x176)](String)};}async function ct(_0x6c6056,_0x3e7bb0,_0x3a4b05){return await new Promise((_0x49ed65,_0x5297dd)=>{const _0x2a3cb4=_0x7a27;let _0x23780f=_0x440f7a[_0x2a3cb4(0x1f5)](_0x6c6056),_0x52c422='',_0xc79a47=setTimeout(()=>{const _0x40d769=_0x2a3cb4;_0x23780f[_0x40d769(0x1d8)](),_0x5297dd(Error('Daemon\x20RPC\x20timeout\x20for\x20'+_0x3e7bb0[_0x40d769(0x238)]));},_0x3a4b05);_0x23780f['on']('connect',()=>{const _0xed5fe7=_0x2a3cb4;_0x23780f[_0xed5fe7(0x2d2)](JSON['stringify'](_0x3e7bb0)+'\x0a');}),_0x23780f['on'](_0x2a3cb4(0x25d),_0x10b54b=>{const _0x18abb5=_0x2a3cb4;_0x52c422+=_0x10b54b[_0x18abb5(0x29a)](_0x18abb5(0x291));let _0x49a913=_0x52c422[_0x18abb5(0x191)]('\x0a');_0x49a913<0x0||(clearTimeout(_0xc79a47),_0x23780f[_0x18abb5(0x2a3)](),_0x49ed65(JSON['parse'](_0x52c422['slice'](0x0,_0x49a913)[_0x18abb5(0x26a)]())));}),_0x23780f['on'](_0x2a3cb4(0x302),_0x120226=>{clearTimeout(_0xc79a47),_0x5297dd(_0x120226);});});}function lt(_0x5dd72a,_0x1d335f){const _0x33f4ed=_0x36f735;if(_0x5dd72a!==_0x1d335f)throw Error(_0x33f4ed(0x1e0)+_0x5dd72a+_0x33f4ed(0x257)+_0x1d335f+_0x33f4ed(0x174));}function ut(_0x5c2493,_0x2bd7eb){const _0x522db3=_0x36f735;let _0x27f4fd={..._0x5c2493,'UNIVER_DAEMON_BUILD_ID_OVERRIDE':_0x2bd7eb};return delete _0x27f4fd[_0x522db3(0x1c0)],delete _0x27f4fd[_0x522db3(0x18f)],delete _0x27f4fd['VITEST_POOL_ID'],delete _0x27f4fd[_0x522db3(0x1cc)],_0x27f4fd;}function dt(_0xeff66){return _0xeff66 instanceof Error?_0xeff66['message']:String(_0xeff66);}function k(){const _0x1cbdd7=_0x36f735;return _0x1cbdd7(0x306)+Date[_0x1cbdd7(0x2bd)]()[_0x1cbdd7(0x29a)](0x24)+'-'+Math['random']()[_0x1cbdd7(0x29a)](0x10)[_0x1cbdd7(0x1ac)](0x2,0x8);}async function ft(_0x247ea8){await new Promise(_0x83fbc5=>{setTimeout(_0x83fbc5,_0x247ea8);});}var pt=0x1388,mt=0xea60,ht=class extends _0x2aff22{[_0x36f735(0x1da)];[_0x36f735(0x2dd)];[_0x36f735(0x31a)]=new Map();[_0x36f735(0x2c6)];['stderr']='';[_0x36f735(0x2c0)]=_0x36f735(0x298);constructor(_0x5decb6,_0x2117a8){const _0x54e591=_0x36f735;super(),this[_0x54e591(0x2f2)]=_0x5decb6,this[_0x54e591(0x2dd)]=_0x2117a8[_0x54e591(0x2dd)]??pt,this[_0x54e591(0x2c6)]=_0x2117a8[_0x54e591(0x2c6)]??mt,this[_0x54e591(0x1da)]=_0x27ccbb(_0x2117a8[_0x54e591(0x30f)],[],{'cwd':_0x2117a8[_0x54e591(0x1ef)],'env':{...process.env,..._0x2117a8[_0x54e591(0x282)],'UNIVER_SESSION_ID':_0x5decb6},'execArgv':_0x2117a8[_0x54e591(0x288)],'stdio':[_0x54e591(0x190),_0x54e591(0x190),_0x54e591(0x281),_0x54e591(0x2d4)]}),this[_0x54e591(0x1da)][_0x54e591(0x2b2)]?.['on'](_0x54e591(0x25d),_0x52ea53=>{const _0x529e3f=_0x54e591;this[_0x529e3f(0x2b2)]+=_0x52ea53[_0x529e3f(0x29a)](),_0x2117a8['onStderrChunk']?.(_0x52ea53);}),this[_0x54e591(0x1da)]['on']('message',_0x16f6ae=>{const _0x3b1507=_0x54e591;if(_0x16f6ae[_0x3b1507(0x19e)]==='ready'&&(this[_0x3b1507(0x2c0)]=_0x3b1507(0x1f4),this['emit']('ready')),_0x16f6ae[_0x3b1507(0x19e)]===_0x3b1507(0x1d7)&&_0x16f6ae['id']!==void 0x0&&_0x16f6ae[_0x3b1507(0x25d)]){let _0x50362e=this[_0x3b1507(0x31a)][_0x3b1507(0x266)](_0x16f6ae['id']);if(!_0x50362e)return;clearTimeout(_0x50362e[_0x3b1507(0x1a6)]),this[_0x3b1507(0x31a)][_0x3b1507(0x208)](_0x16f6ae['id']),_0x50362e[_0x3b1507(0x2c3)](_0x16f6ae[_0x3b1507(0x25d)]);}}),this[_0x54e591(0x1da)]['on'](_0x54e591(0x1fd),(_0x5e096b,_0x49c94d)=>{const _0x3207f3=_0x54e591;this['status']='exited',this['rejectPendingRequests'](Error(_0x3207f3(0x1f7)+(_0x5e096b??'null')+',\x20signal='+(_0x49c94d??_0x3207f3(0x301))+')'+this['formatStderr']())),this[_0x3207f3(0x20d)](_0x3207f3(0x1fd),_0x5e096b,_0x49c94d);}),this[_0x54e591(0x1da)]['on'](_0x54e591(0x302),_0x2e39c5=>{const _0x2ee1a1=_0x54e591;this[_0x2ee1a1(0x20d)](_0x2ee1a1(0x302),_0x2e39c5);});}[_0x36f735(0x1d8)](){const _0x138fd1=_0x36f735;this['status']===_0x138fd1(0x1a7)||this[_0x138fd1(0x2c0)]===_0x138fd1(0x2f1)||(this[_0x138fd1(0x2c0)]=_0x138fd1(0x1a7),this[_0x138fd1(0x1da)]['kill'](_0x138fd1(0x1ca)),setTimeout(()=>{const _0x221afb=_0x138fd1;this['child'][_0x221afb(0x30c)]===null&&this[_0x221afb(0x1da)]['kill'](_0x221afb(0x173));},this[_0x138fd1(0x2dd)])[_0x138fd1(0x29f)]());}[_0x36f735(0x26b)](){const _0x2c1a2e=_0x36f735;return this[_0x2c1a2e(0x1da)]['exitCode']===null&&this[_0x2c1a2e(0x1da)][_0x2c1a2e(0x2b8)]===null;}async[_0x36f735(0x23c)](_0x2f9653,_0x1acd00){const _0x37b997=_0x36f735;if(this[_0x37b997(0x2c0)]!==_0x37b997(0x1f4))throw Error(_0x37b997(0x251));let _0x2899ea=_0x1acd00?.['timeoutMs']??this[_0x37b997(0x2c6)];return new Promise((_0x20ab31,_0x35d2a0)=>{const _0x5e523b=_0x37b997;let _0x485768=setTimeout(()=>{const _0x590731=_0x7a27;this['pendingRequests'][_0x590731(0x208)](_0x2f9653['id']),_0x35d2a0(Error(_0x590731(0x245)));},_0x2899ea);this[_0x5e523b(0x31a)]['set'](_0x2f9653['id'],{'resolve':_0x20ab31,'reject':_0x35d2a0,'timeout':_0x485768}),this[_0x5e523b(0x1da)][_0x5e523b(0x22e)]({'type':'rpc-request','id':_0x2f9653['id'],'data':{..._0x2f9653,'meta':_0x4406ad[_0x5e523b(0x1e2)](_0x2f9653[_0x5e523b(0x2b6)])}});});}async['waitForReady'](_0x19e5e7=0x7530){const _0x40fe71=_0x36f735;if(this[_0x40fe71(0x2c0)]!=='ready'){if(!this[_0x40fe71(0x26b)]())throw Error(_0x40fe71(0x1f3)+this[_0x40fe71(0x1ed)]());return await new Promise((_0x17d549,_0xe43a3e)=>{const _0x20b02f=_0x40fe71;let _0x1b192b=()=>{const _0x397cde=_0x7a27;clearTimeout(_0x1c64f3),this[_0x397cde(0x209)]('ready',_0x5d3af4),this[_0x397cde(0x209)]('exit',_0x2da222),this[_0x397cde(0x209)](_0x397cde(0x302),_0x506e4e);},_0x5d3af4=()=>{_0x1b192b(),_0x17d549();},_0x2da222=()=>{const _0x32327a=_0x7a27;_0x1b192b(),_0xe43a3e(Error(_0x32327a(0x1f3)+this[_0x32327a(0x1ed)]()));},_0x506e4e=_0x34c025=>{const _0x4ae79a=_0x7a27;_0x1b192b(),_0xe43a3e(Error(_0x4ae79a(0x2ca)+_0x34c025['message']));},_0x1c64f3=setTimeout(()=>{const _0x38d878=_0x7a27;_0x1b192b(),_0xe43a3e(Error(_0x38d878(0x1d4)));},_0x19e5e7);this['once'](_0x20b02f(0x1f4),_0x5d3af4),this['once']('exit',_0x2da222),this[_0x20b02f(0x30d)](_0x20b02f(0x302),_0x506e4e);});}}['formatStderr'](){const _0x25bd50=_0x36f735;let _0x1b352d=this[_0x25bd50(0x2b2)]['trim']();return _0x1b352d[_0x25bd50(0x294)]===0x0?'':'\x0a'+_0x1b352d;}[_0x36f735(0x198)](_0x329bfa){const _0x1256d6=_0x36f735;for(let _0x11e89b of this[_0x1256d6(0x31a)][_0x1256d6(0x228)]())clearTimeout(_0x11e89b['timeout']),_0x11e89b[_0x1256d6(0x226)](_0x329bfa);this[_0x1256d6(0x31a)][_0x1256d6(0x211)]();}};let A=function(_0x5eef71){const _0x2e3e04=_0x36f735;return _0x5eef71[_0x2e3e04(0x259)]=_0x2e3e04(0x213),_0x5eef71[_0x2e3e04(0x222)]='evaljs',_0x5eef71[_0x2e3e04(0x1fa)]=_0x2e3e04(0x1b9),_0x5eef71[_0x2e3e04(0x2a0)]=_0x2e3e04(0x274),_0x5eef71['LoadWorkbook']=_0x2e3e04(0x183),_0x5eef71[_0x2e3e04(0x210)]='loadWorkbookDataReplayPack',_0x5eef71;}({});var gt=0x384*0x3e8,_t=class{[_0x36f735(0x282)];[_0x36f735(0x2c4)];[_0x36f735(0x2ac)];[_0x36f735(0x200)]=new Map();[_0x36f735(0x237)];constructor(_0x7e785b){const _0x2a067d=_0x36f735;this['env']=_0x7e785b[_0x2a067d(0x282)]??process.env,this[_0x2a067d(0x2c4)]=_0x7e785b[_0x2a067d(0x2c4)]??new ge(),this[_0x2a067d(0x2ac)]=_0x7e785b[_0x2a067d(0x2ac)],this[_0x2a067d(0x237)]=_0x7e785b[_0x2a067d(0x237)]??vt(this[_0x2a067d(0x282)],gt);}[_0x36f735(0x185)](){const _0x34b500=_0x36f735;return this[_0x34b500(0x200)][_0x34b500(0x20a)];}[_0x36f735(0x201)](){const _0x4ffe9a=_0x36f735;return this[_0x4ffe9a(0x237)];}async[_0x36f735(0x23b)](_0x3fe81c){const _0x2f073b=_0x36f735;let _0x514d58=await this[_0x2f073b(0x175)](_0x3fe81c['identity']['absolutePath']),_0x5253ab=this[_0x2f073b(0x200)]['get'](_0x514d58);return _0x5253ab?this['toRuntimeSessionInfo'](_0x5253ab,_0x3fe81c['identity']):null;}async[_0x36f735(0x213)](_0x295354){const _0x10b34f=_0x36f735;let _0x34b25e=await this[_0x10b34f(0x2fc)](_0x295354[_0x10b34f(0x1a5)][_0x10b34f(0x221)]),_0x5c4d51=await _0x34b25e[_0x10b34f(0x28b)][_0x10b34f(0x23c)]({'jsonrpc':'2.0','id':N(_0x34b25e[_0x10b34f(0x2f2)]),'method':A[_0x10b34f(0x259)],'params':{'id':_0x295354[_0x10b34f(0x1f1)],'name':_0x295354[_0x10b34f(0x1f0)]}});if(_0x5c4d51[_0x10b34f(0x302)])throw Error(_0x5c4d51[_0x10b34f(0x302)]['message']);return await this[_0x10b34f(0x2f4)](_0x34b25e,_0x10b34f(0x216)),{'session':this[_0x10b34f(0x1c6)](_0x34b25e,_0x295354[_0x10b34f(0x1a5)]),'workbookData':_0x5c4d51[_0x10b34f(0x287)][_0x10b34f(0x242)]};}async[_0x36f735(0x219)](_0xb4858f){const _0x566ee6=_0x36f735;let _0x39f490=await this[_0x566ee6(0x2fc)](_0xb4858f['identity'][_0x566ee6(0x221)]),_0x4b8915=await _0x39f490['runner'][_0x566ee6(0x23c)]({'jsonrpc':_0x566ee6(0x283),'id':N(_0x39f490[_0x566ee6(0x2f2)]),'method':A[_0x566ee6(0x205)],'params':{'workbookData':_0xb4858f[_0x566ee6(0x242)]}});if(_0x4b8915[_0x566ee6(0x302)])throw Error(_0x4b8915[_0x566ee6(0x302)]['message']);return await this[_0x566ee6(0x2f4)](_0x39f490,_0x566ee6(0x2c9)),{'session':this[_0x566ee6(0x1c6)](_0x39f490,_0xb4858f[_0x566ee6(0x1a5)]),'workbookData':_0x4b8915[_0x566ee6(0x287)][_0x566ee6(0x242)]};}async[_0x36f735(0x2e6)](_0x5407ac){const _0x340d47=_0x36f735;let _0x1c826f=await this[_0x340d47(0x2fc)](_0x5407ac['identity']['absolutePath']),_0x26a71f={'baseWorkbookData':_0x5407ac[_0x340d47(0x1ff)][_0x340d47(0x1c1)],'mutations':_0x5407ac[_0x340d47(0x1ff)][_0x340d47(0x2bb)]},_0x3cf132=await _0x1c826f[_0x340d47(0x28b)][_0x340d47(0x23c)]({'jsonrpc':_0x340d47(0x283),'id':N(_0x1c826f['sessionId']),'method':A['LoadWorkbookDataReplayPack'],'params':_0x26a71f});if(_0x3cf132[_0x340d47(0x302)])throw Error(_0x3cf132[_0x340d47(0x302)]['message']);return await this[_0x340d47(0x2f4)](_0x1c826f,_0x340d47(0x23a)),{'session':this[_0x340d47(0x1c6)](_0x1c826f,_0x5407ac['identity']),'workbookData':_0x3cf132[_0x340d47(0x287)][_0x340d47(0x242)]};}async['ensureWorkbookDataReplayPackLoaded'](_0x92c209){const _0x1ded05=_0x36f735;let _0x312c5f=await this[_0x1ded05(0x2ae)](_0x92c209[_0x1ded05(0x1a5)][_0x1ded05(0x221)]);if(!_0x312c5f[_0x1ded05(0x261)])return await this['touchSession'](_0x312c5f['session'],'ensure-workbook-replay-pack-loaded'),{'loaded':!0x1,'session':this[_0x1ded05(0x1c6)](_0x312c5f['session'],_0x92c209[_0x1ded05(0x1a5)])};let _0x52f828=await _0x92c209['loadReplayPack']();return await this['loadReplayPackIntoSession'](_0x312c5f['session'],_0x52f828),await this[_0x1ded05(0x2f4)](_0x312c5f[_0x1ded05(0x285)],_0x1ded05(0x23a)),{'loaded':!0x0,'session':this[_0x1ded05(0x1c6)](_0x312c5f[_0x1ded05(0x285)],_0x92c209['identity'])};}async[_0x36f735(0x24c)](_0x54aa24){const _0x100bab=_0x36f735;let _0x2b2529=await this[_0x100bab(0x2fc)](_0x54aa24[_0x100bab(0x1a5)][_0x100bab(0x221)]),_0x2de25a=await _0x2b2529['runner'][_0x100bab(0x23c)]({'jsonrpc':_0x100bab(0x283),'id':N(_0x2b2529[_0x100bab(0x2f2)]),'method':A[_0x100bab(0x222)],'params':{'code':_0x54aa24['code'],'mutates':_0x54aa24['mutates']}});if(_0x2de25a[_0x100bab(0x302)])throw Error(_0x2de25a[_0x100bab(0x302)][_0x100bab(0x246)]);await this[_0x100bab(0x2f4)](_0x2b2529,_0x100bab(0x204));let _0x5c1418=_0x2de25a[_0x100bab(0x287)][_0x100bab(0x2bb)];return{..._0x5c1418===void 0x0?{}:{'mutations':_0x5c1418},'session':this[_0x100bab(0x1c6)](_0x2b2529,_0x54aa24['identity']),'value':_0x2de25a['result'][_0x100bab(0x293)]};}async[_0x36f735(0x274)](_0x77baeb){const _0xc82517=_0x36f735;let _0x5a61d2=await this[_0xc82517(0x2fc)](_0x77baeb[_0xc82517(0x1a5)][_0xc82517(0x221)]),_0x2a56b2=await _0x5a61d2[_0xc82517(0x28b)]['sendRpc']({'jsonrpc':_0xc82517(0x283),'id':N(_0x5a61d2[_0xc82517(0x2f2)]),'method':A[_0xc82517(0x2a0)]});if(_0x2a56b2[_0xc82517(0x302)])throw Error(_0x2a56b2[_0xc82517(0x302)][_0xc82517(0x246)]);return await this[_0xc82517(0x2f4)](_0x5a61d2,_0xc82517(0x18b)),{'session':this['toRuntimeSessionInfo'](_0x5a61d2,_0x77baeb['identity']),'workbookData':_0x2a56b2[_0xc82517(0x287)][_0xc82517(0x242)]};}async[_0x36f735(0x1b9)](_0x5564f7){const _0x2c95e6=_0x36f735;let _0x2aefff=await this['ensureSession'](_0x5564f7[_0x2c95e6(0x1a5)]['absolutePath']),_0x3691f1=await _0x2aefff[_0x2c95e6(0x28b)][_0x2c95e6(0x23c)]({'jsonrpc':_0x2c95e6(0x283),'id':N(_0x2aefff['sessionId']),'method':A[_0x2c95e6(0x1fa)],'params':{'format':_0x5564f7[_0x2c95e6(0x2c2)],'outputPath':_0x5564f7['outputPath']}});if(_0x3691f1[_0x2c95e6(0x302)])throw Error(_0x3691f1['error']['message']);await this['touchSession'](_0x2aefff,_0x2c95e6(0x1d5));let _0x56788a=_0x3691f1['result'];return{'format':_0x56788a[_0x2c95e6(0x2c2)],'outputPath':_0x56788a[_0x2c95e6(0x1a2)],'session':this[_0x2c95e6(0x1c6)](_0x2aefff,_0x5564f7[_0x2c95e6(0x1a5)]),'sizeBytes':_0x56788a[_0x2c95e6(0x20e)]};}async[_0x36f735(0x225)](_0x29084d){const _0x11e711=_0x36f735;let _0x2fb7e6=await this[_0x11e711(0x175)](_0x29084d[_0x11e711(0x1a5)][_0x11e711(0x221)]),_0x40b1b0=this[_0x11e711(0x200)][_0x11e711(0x266)](_0x2fb7e6);_0x40b1b0&&await this[_0x11e711(0x172)](_0x40b1b0,_0x11e711(0x20b));}async[_0x36f735(0x25a)](_0x5a4424=Date[_0x36f735(0x2bd)]()){const _0x3c3bc5=_0x36f735;let _0x4ef637=Array['from'](this[_0x3c3bc5(0x200)][_0x3c3bc5(0x228)]());for(let _0x18b8e9 of _0x4ef637)_0x5a4424-Date[_0x3c3bc5(0x1b4)](_0x18b8e9[_0x3c3bc5(0x252)])<this[_0x3c3bc5(0x237)]||await this[_0x3c3bc5(0x172)](_0x18b8e9,_0x3c3bc5(0x2bc));}async['destroyAll'](_0x3adfcf='shutdown'){const _0x28a476=_0x36f735;let _0x38a62e=Array[_0x28a476(0x2dc)](this['sessions'][_0x28a476(0x228)]());for(let _0x554a8a of _0x38a62e)await this['destroySession'](_0x554a8a,_0x3adfcf);}async['resolveWorkbookIdentity'](_0x1d43db){try{return await _0x2c7941(_0x1d43db);}catch{return _0x1d43db;}}async[_0x36f735(0x2fc)](_0x213e17){const _0x2de759=_0x36f735;return(await this[_0x2de759(0x2ae)](_0x213e17))[_0x2de759(0x285)];}async[_0x36f735(0x2ae)](_0x1dfda2){const _0x51ed1c=_0x36f735;let _0x3376d1=await this[_0x51ed1c(0x175)](_0x1dfda2),_0x52a2a6=this[_0x51ed1c(0x200)][_0x51ed1c(0x266)](_0x3376d1);if(_0x52a2a6)return{'created':!0x1,'session':_0x52a2a6};let _0x36c60a=yt(),_0x350086=Re(_0x36c60a,this[_0x51ed1c(0x282)]);await _0x301038(_0x350086[_0x51ed1c(0x1af)],{'recursive':!0x0,'mode':0x1c0});let _0x39d4db=this['resolveExecutionPlaneOptions'](bt(this[_0x51ed1c(0x2ac)])),_0x32fd2f=new ht(_0x36c60a,{'cwd':xt(_0x39d4db['modulePath']),'env':Object[_0x51ed1c(0x1bc)](Object[_0x51ed1c(0x1c8)](this[_0x51ed1c(0x282)])['filter'](_0xe6e259=>_0xe6e259[0x1]!==void 0x0)),'execArgv':_0x39d4db[_0x51ed1c(0x288)],'executionPlanePath':_0x39d4db[_0x51ed1c(0x2f7)],'onStderrChunk':_0x5f01d1=>{const _0xce2069=_0x51ed1c;Ae(_0x350086[_0xce2069(0x181)],_0x5f01d1[_0xce2069(0x29a)]()['trimEnd']());}});await _0x32fd2f[_0x51ed1c(0x178)]();let _0x33434f={'sessionId':_0x36c60a,'workbookIdentity':_0x3376d1,'createdAt':new Date()[_0x51ed1c(0x1a0)](),'lastAccessedAt':new Date()[_0x51ed1c(0x1a0)](),'runner':_0x32fd2f,'paths':_0x350086};return _0x32fd2f['on'](_0x51ed1c(0x1fd),()=>{const _0x1f08a8=_0x51ed1c;this['logger']['warn']({'event_name':_0x1cadbd['RuntimeRunnerExit'],'component':_0x567489[_0x1f08a8(0x318)],'process_role':_0x4967d3[_0x1f08a8(0x2c5)],'fields':{...j(this[_0x1f08a8(0x282)],_0x36c60a),'session_id':_0x36c60a,'workbook_identity':_0x3376d1}}),this[_0x1f08a8(0x2c4)]['flush'](),this[_0x1f08a8(0x172)](_0x33434f,_0x1f08a8(0x2d7));}),this[_0x51ed1c(0x200)][_0x51ed1c(0x25b)](_0x3376d1,_0x33434f),this[_0x51ed1c(0x2c4)][_0x51ed1c(0x27d)]({'event_name':_0x1cadbd[_0x51ed1c(0x188)],'component':_0x567489[_0x51ed1c(0x2ab)],'process_role':_0x4967d3[_0x51ed1c(0x2c5)],'fields':{...j(this[_0x51ed1c(0x282)],_0x36c60a),'created_at':_0x33434f[_0x51ed1c(0x223)],'session_id':_0x36c60a,'workbook_identity':_0x3376d1}}),await this['logger'][_0x51ed1c(0x2d5)](),{'created':!0x0,'session':_0x33434f};}async[_0x36f735(0x304)](_0x212970,_0x22c172){const _0x41c080=_0x36f735;let _0x33fc66={'baseWorkbookData':_0x22c172[_0x41c080(0x1c1)],'mutations':_0x22c172[_0x41c080(0x2bb)]},_0x21bc7e=await _0x212970[_0x41c080(0x28b)][_0x41c080(0x23c)]({'jsonrpc':'2.0','id':N(_0x212970[_0x41c080(0x2f2)]),'method':A[_0x41c080(0x210)],'params':_0x33fc66});if(_0x21bc7e['error'])throw Error(_0x21bc7e['error'][_0x41c080(0x246)]);return _0x21bc7e[_0x41c080(0x287)][_0x41c080(0x242)];}async['touchSession'](_0x4d5bbc,_0x2e93ed){const _0x29f9b9=_0x36f735;_0x4d5bbc[_0x29f9b9(0x252)]=new Date()[_0x29f9b9(0x1a0)](),this[_0x29f9b9(0x2c4)][_0x29f9b9(0x27d)]({'event_name':_0x1cadbd[_0x29f9b9(0x188)],'component':_0x567489[_0x29f9b9(0x2ab)],'process_role':_0x4967d3['Runtime'],'fields':{...j(this[_0x29f9b9(0x282)],_0x4d5bbc[_0x29f9b9(0x2f2)]),'event':_0x2e93ed,'session_id':_0x4d5bbc['sessionId'],'timestamp':_0x4d5bbc[_0x29f9b9(0x252)],'workbook_identity':_0x4d5bbc['workbookIdentity']}}),await this[_0x29f9b9(0x2c4)]['flush']();}async[_0x36f735(0x172)](_0x35b5df,_0x203fa8){const _0xc77b97=_0x36f735;this[_0xc77b97(0x200)][_0xc77b97(0x266)](_0x35b5df[_0xc77b97(0x196)])===_0x35b5df&&(this[_0xc77b97(0x200)][_0xc77b97(0x208)](_0x35b5df['workbookIdentity']),_0x35b5df[_0xc77b97(0x28b)][_0xc77b97(0x1d8)](),this['logger'][_0xc77b97(0x27d)]({'event_name':_0x1cadbd[_0xc77b97(0x23e)],'component':_0x567489[_0xc77b97(0x2ab)],'process_role':_0x4967d3['Runtime'],'fields':{...j(this['env'],_0x35b5df[_0xc77b97(0x2f2)]),'reason':_0x203fa8,'session_id':_0x35b5df[_0xc77b97(0x2f2)],'timestamp':new Date()['toISOString'](),'workbook_identity':_0x35b5df['workbookIdentity']}}),await this[_0xc77b97(0x2c4)][_0xc77b97(0x2d5)]());}[_0x36f735(0x1c6)](_0x1ecbca,_0x174fc5){const _0x2ff286=_0x36f735;return{'sessionId':_0x1ecbca[_0x2ff286(0x2f2)],'packageIdentity':_0x174fc5,'createdAt':_0x1ecbca[_0x2ff286(0x223)],'lastAccessedAt':_0x1ecbca['lastAccessedAt']};}};function vt(_0x456776,_0x341974){const _0x282eb5=_0x36f735;let _0xf1d650=_0x456776[_0x282eb5(0x224)]?.['trim']();if(!_0xf1d650)return _0x341974;let _0x98750d=Number(_0xf1d650);return!Number['isFinite'](_0x98750d)||_0x98750d<0x0?_0x341974:_0x98750d;}function j(_0x38089c,_0x1fc4fa){const _0x3ab467=_0x36f735;return{'deployment.environment.name':_0x3ab467(0x297),'distribution.channel':M(_0x38089c,'UNIVER_DISTRIBUTION_CHANNEL')??'unknown','service.instance.id':_0x1fc4fa,'service.name':'univer-runtime',...M(_0x38089c,_0x3ab467(0x2e5))===void 0x0?{}:{'build.id':M(_0x38089c,_0x3ab467(0x2e5))},...M(_0x38089c,_0x3ab467(0x264))===void 0x0?{}:{'service.version':M(_0x38089c,_0x3ab467(0x264))}};}function M(_0x56af87,_0x253a6f){const _0x35e684=_0x36f735;let _0x2e3e7f=_0x56af87[_0x253a6f]?.[_0x35e684(0x26a)]();return _0x2e3e7f===void 0x0||_0x2e3e7f[_0x35e684(0x294)]===0x0?void 0x0:_0x2e3e7f;}function N(_0x5be87e){const _0x1baa38=_0x36f735;return _0x5be87e+'-'+Date[_0x1baa38(0x2bd)]()['toString'](0x24)+'-'+Math['random']()[_0x1baa38(0x29a)](0x10)[_0x1baa38(0x1ac)](0x2,0x8);}function yt(){const _0x1ba37e=_0x36f735;return _0x1ba37e(0x231)+Date[_0x1ba37e(0x2bd)]()[_0x1ba37e(0x29a)](0x24)+'-'+Math[_0x1ba37e(0x2d3)]()[_0x1ba37e(0x29a)](0x10)[_0x1ba37e(0x1ac)](0x2,0x8);}function bt(_0x1de482){const _0x374790=_0x36f735;return _0x42c9c0(import.meta.url)[_0x374790(0x1c5)](_0x374790(0x2fe))?_0x374790(0x1a4):_0x374790(0x206);}function xt(_0x2f36c0){return _0x25ebef(_0x25ebef(_0x2f36c0));}var St=class{[_0x36f735(0x2b1)];[_0x36f735(0x1d1)];constructor(_0x22726d={}){const _0x5a20a6=_0x36f735;this['client']=_0x22726d['client']??{'sessionCreateWorkbook':Je,'sessionDisposeWorkbook':Qe,'sessionEvalJs':Ye,'sessionExportWorkbookData':Xe,'sessionExportWorkbookFile':Ze,'sessionGetWorkbook':qe,'sessionLoadWorkbookDataReplayPack':Ke,'sessionLoadWorkbook':Ge},this[_0x5a20a6(0x1d1)]=_0x22726d[_0x5a20a6(0x1db)]??{};}async[_0x36f735(0x213)](_0x5ac65d){const _0x577ee6=_0x36f735;let _0x8db21b=await this[_0x577ee6(0x2b1)]['sessionCreateWorkbook'](_0x5ac65d[_0x577ee6(0x1a5)][_0x577ee6(0x221)],{...this[_0x577ee6(0x1d1)],..._0x5ac65d['cwd']===void 0x0?{}:{'cwd':_0x5ac65d[_0x577ee6(0x1ef)]},..._0x5ac65d[_0x577ee6(0x1f1)]===void 0x0?{}:{'id':_0x5ac65d[_0x577ee6(0x1f1)]},..._0x5ac65d[_0x577ee6(0x1f0)]===void 0x0?{}:{'name':_0x5ac65d[_0x577ee6(0x1f0)]}});return{'session':P(_0x8db21b[_0x577ee6(0x285)],_0x5ac65d[_0x577ee6(0x1a5)]),'workbookData':_0x8db21b[_0x577ee6(0x242)]};}async[_0x36f735(0x23b)](_0x7d36b4){const _0x2257fa=_0x36f735;let _0x55dedd=await this[_0x2257fa(0x2b1)][_0x2257fa(0x1bd)](_0x7d36b4[_0x2257fa(0x1a5)][_0x2257fa(0x221)],{...this[_0x2257fa(0x1d1)],..._0x7d36b4[_0x2257fa(0x1ef)]===void 0x0?{}:{'cwd':_0x7d36b4[_0x2257fa(0x1ef)]}});return!_0x55dedd[_0x2257fa(0x256)]||_0x55dedd['session']===null?null:P(_0x55dedd[_0x2257fa(0x285)],_0x7d36b4[_0x2257fa(0x1a5)]);}async[_0x36f735(0x219)](_0x4354b9){const _0x2050f2=_0x36f735;let _0x2e3556=await this['client']['sessionLoadWorkbook'](_0x4354b9[_0x2050f2(0x1a5)][_0x2050f2(0x221)],_0x4354b9[_0x2050f2(0x242)],{...this[_0x2050f2(0x1d1)],..._0x4354b9[_0x2050f2(0x1ef)]===void 0x0?{}:{'cwd':_0x4354b9['cwd']}});return{'session':P(_0x2e3556[_0x2050f2(0x285)],_0x4354b9[_0x2050f2(0x1a5)]),'workbookData':_0x2e3556[_0x2050f2(0x242)]};}async[_0x36f735(0x2e6)](_0x5eebe9){const _0x338547=_0x36f735;let _0x14b6a8=await this[_0x338547(0x2b1)]['sessionLoadWorkbookDataReplayPack'](_0x5eebe9[_0x338547(0x1a5)][_0x338547(0x221)],{'baseWorkbookData':_0x5eebe9['replayPack'][_0x338547(0x1c1)],'mutations':_0x5eebe9[_0x338547(0x1ff)][_0x338547(0x2bb)]},{...this[_0x338547(0x1d1)],..._0x5eebe9[_0x338547(0x1ef)]===void 0x0?{}:{'cwd':_0x5eebe9[_0x338547(0x1ef)]}});return{'session':P(_0x14b6a8[_0x338547(0x285)],_0x5eebe9['identity']),'workbookData':_0x14b6a8[_0x338547(0x242)]};}async[_0x36f735(0x2d6)](_0x3821d1){const _0x120ce1=_0x36f735;let _0x341df0=await this['getSession'](_0x3821d1);if(_0x341df0!==null)return{'loaded':!0x1,'session':_0x341df0};let _0x2506fa=await _0x3821d1['loadReplayPack']();return{'loaded':!0x0,'session':(await this['loadWorkbookDataReplayPack']({..._0x3821d1[_0x120ce1(0x1ef)]===void 0x0?{}:{'cwd':_0x3821d1[_0x120ce1(0x1ef)]},'identity':_0x3821d1['identity'],'replayPack':_0x2506fa}))[_0x120ce1(0x285)]};}async[_0x36f735(0x24c)](_0x1660a7){const _0x370d58=_0x36f735;let _0x144a9b=await this['client'][_0x370d58(0x233)](_0x1660a7[_0x370d58(0x1a5)][_0x370d58(0x221)],_0x1660a7[_0x370d58(0x186)],{...this[_0x370d58(0x1d1)],..._0x1660a7[_0x370d58(0x1ef)]===void 0x0?{}:{'cwd':_0x1660a7[_0x370d58(0x1ef)]},..._0x1660a7[_0x370d58(0x1cf)]===void 0x0?{}:{'mutates':_0x1660a7[_0x370d58(0x1cf)]}});return{..._0x144a9b[_0x370d58(0x2bb)]===void 0x0?{}:{'mutations':_0x144a9b['mutations']},'session':P(_0x144a9b[_0x370d58(0x285)],_0x1660a7['identity']),'value':_0x144a9b[_0x370d58(0x293)]};}async[_0x36f735(0x274)](_0x16bcfa){const _0x5cdf8f=_0x36f735;let _0x570761=await this[_0x5cdf8f(0x2b1)][_0x5cdf8f(0x29d)](_0x16bcfa[_0x5cdf8f(0x1a5)][_0x5cdf8f(0x221)],{...this[_0x5cdf8f(0x1d1)],..._0x16bcfa[_0x5cdf8f(0x1ef)]===void 0x0?{}:{'cwd':_0x16bcfa[_0x5cdf8f(0x1ef)]}});return{'session':P(_0x570761[_0x5cdf8f(0x285)],_0x16bcfa[_0x5cdf8f(0x1a5)]),'workbookData':_0x570761['workbookData']};}async[_0x36f735(0x1b9)](_0x434e83){const _0x3880c1=_0x36f735;let _0x293edc=await this[_0x3880c1(0x2b1)]['sessionExportWorkbookFile'](_0x434e83[_0x3880c1(0x1a5)]['absolutePath'],{'format':_0x434e83['format'],'outputPath':_0x434e83[_0x3880c1(0x1a2)]},{...this[_0x3880c1(0x1d1)],..._0x434e83[_0x3880c1(0x1ef)]===void 0x0?{}:{'cwd':_0x434e83[_0x3880c1(0x1ef)]}});return{'format':_0x293edc[_0x3880c1(0x2c2)],'outputPath':_0x293edc[_0x3880c1(0x1a2)],'session':P(_0x293edc[_0x3880c1(0x285)],_0x434e83[_0x3880c1(0x1a5)]),'sizeBytes':_0x293edc[_0x3880c1(0x20e)]};}async[_0x36f735(0x225)](_0x58ee08){const _0x2ae9ea=_0x36f735;await this[_0x2ae9ea(0x2b1)][_0x2ae9ea(0x2e9)](_0x58ee08[_0x2ae9ea(0x1a5)][_0x2ae9ea(0x221)],{...this[_0x2ae9ea(0x1d1)],..._0x58ee08[_0x2ae9ea(0x1ef)]===void 0x0?{}:{'cwd':_0x58ee08['cwd']}});}};function P(_0x30a830,_0x333542){const _0x3e8b34=_0x36f735;return{'createdAt':_0x30a830['createdAt'],'lastAccessedAt':_0x30a830[_0x3e8b34(0x252)],'packageIdentity':_0x333542,'sessionId':_0x30a830['sessionId']};}var F=class extends Error{[_0x36f735(0x186)];constructor(_0x1c3521,_0x2e0ed6,_0x48dd4a){const _0x56c320=_0x36f735;super(_0x2e0ed6,_0x48dd4a),this['name']=_0x56c320(0x2c8),this[_0x56c320(0x186)]=_0x1c3521;}},Ct=class extends F{constructor(_0x44267a){const _0x3e6075=_0x36f735;super(_0x3e6075(0x1ae),_0x3e6075(0x2ce)+_0x44267a),this[_0x3e6075(0x244)]='InvalidWorkbookPackagePathError';}},wt=class extends F{constructor(_0x3e8e68){const _0x44975b=_0x36f735;super(_0x44975b(0x19c),'Missing\x20workbook\x20package\x20file:\x20'+_0x3e8e68),this[_0x44975b(0x244)]=_0x44975b(0x24e);}},I=class extends F{constructor(_0x1740ae,_0x4b9f2b,_0x2df532){const _0x404167=_0x36f735;super(_0x404167(0x2a5),'Invalid\x20workbook\x20package\x20file\x20'+_0x1740ae+':\x20'+_0x4b9f2b,_0x2df532),this[_0x404167(0x244)]=_0x404167(0x2a6);}},Tt=class extends F{constructor(_0x3308a0,_0x1298dc,_0x21246d){const _0x5a02be=_0x36f735;super(_0x5a02be(0x2a2),_0x5a02be(0x1a9)+_0x3308a0+':\x20'+_0x1298dc,_0x21246d),this[_0x5a02be(0x244)]=_0x5a02be(0x289);}},Et=class extends F{constructor(_0x65700b){const _0x36113f=_0x36f735;super(_0x36113f(0x316),'Workbook\x20package\x20already\x20exists:\x20'+_0x65700b),this[_0x36113f(0x244)]=_0x36113f(0x189);}},Dt=class extends F{constructor(_0x587f44,_0x342d9b){const _0x3693ab=_0x36f735;super(_0x3693ab(0x1eb),_0x342d9b===null?_0x3693ab(0x24b)+_0x587f44:_0x3693ab(0x24b)+_0x587f44+_0x3693ab(0x2d1)+_0x342d9b[_0x3693ab(0x286)]+'\x20(pid\x20'+_0x342d9b[_0x3693ab(0x317)]+'\x20on\x20'+_0x342d9b['hostname']+')'),this[_0x3693ab(0x28f)]=_0x342d9b,this[_0x3693ab(0x244)]=_0x3693ab(0x277);}};function Ot(_0x211768={}){const _0x4a5515=_0x36f735;return{'unitID':_0x211768[_0x4a5515(0x2df)]??null,'initRev':_0x211768[_0x4a5515(0x2db)]??null,'syncedRev':_0x211768[_0x4a5515(0x30a)]??null};}function kt(_0x3d8c65,_0x33ae7b){const _0x4171bb=_0x36f735;if(!At(_0x3d8c65))throw new I(_0x33ae7b,_0x4171bb(0x23f));let _0x2c4149=_0x3d8c65[_0x4171bb(0x2df)],_0x426fb0=_0x3d8c65[_0x4171bb(0x2db)],_0x27e754=_0x3d8c65['syncedRev'];if(_0x2c4149!==null&&typeof _0x2c4149!=_0x4171bb(0x2f5))throw new I(_0x33ae7b,_0x4171bb(0x263));if(_0x426fb0!==null&&!jt(_0x426fb0))throw new I(_0x33ae7b,_0x4171bb(0x270));if(_0x27e754!==null&&!jt(_0x27e754))throw new I(_0x33ae7b,'syncedRev\x20must\x20be\x20a\x20non-negative\x20integer\x20or\x20null');return{'unitID':_0x2c4149,'initRev':_0x426fb0,'syncedRev':_0x27e754};}function At(_0x44823a){const _0x4a36d7=_0x36f735;return typeof _0x44823a=='object'&&!!_0x44823a&&!Array[_0x4a36d7(0x1fc)](_0x44823a);}function jt(_0x5221ea){const _0x53054c=_0x36f735;return typeof _0x5221ea=='number'&&Number[_0x53054c(0x2cd)](_0x5221ea)&&_0x5221ea>=0x0;}function L(_0x1dbbf0,_0x560129){const _0x19c72d=_0x36f735;if(!Mt(_0x1dbbf0))throw new I(_0x560129,_0x19c72d(0x2ef));if(typeof _0x1dbbf0['id']!=_0x19c72d(0x2f5)||_0x1dbbf0['id'][_0x19c72d(0x294)]===0x0)throw new I(_0x560129,_0x19c72d(0x1ba));if(!Mt(_0x1dbbf0['params']))throw new I(_0x560129,_0x19c72d(0x182));return _0x1dbbf0;}function Mt(_0x50b761){const _0x1a7b30=_0x36f735;return typeof _0x50b761==_0x1a7b30(0x19f)&&!!_0x50b761&&!Array[_0x1a7b30(0x1fc)](_0x50b761);}function Nt(_0x100c9c,_0x4d4416){const _0x5cc454=_0x36f735;let _0x3beabc=Ft(_0x100c9c,_0x4d4416,_0x5cc454(0x2fb)),_0x177d0a=Lt(_0x3beabc[_0x5cc454(0x1de)],_0x4d4416,_0x5cc454(0x2fb)),_0x5a9e76=Rt(_0x3beabc[_0x5cc454(0x26d)],_0x4d4416,_0x5cc454(0x2fb)),_0x1dafa7=_0x3beabc[_0x5cc454(0x246)],_0x1dde07=_0x3beabc[_0x5cc454(0x2bb)];if(typeof _0x1dafa7!=_0x5cc454(0x2f5))throw new I(_0x4d4416,_0x5cc454(0x1a1));if(!Array['isArray'](_0x1dde07))throw new I(_0x4d4416,_0x5cc454(0x22a));return{'sid':_0x177d0a,'reqId':_0x5a9e76,'message':_0x1dafa7,'mutations':_0x1dde07['map']((_0x54d474,_0x41f206)=>L(_0x54d474,_0x4d4416+'.mutations['+_0x41f206+']'))};}function Pt(_0x10b3fb,_0x3fd6fb){const _0x775a1b=_0x36f735;let _0x5a09bb=Ft(_0x10b3fb,_0x3fd6fb,'synced\x20changeset'),_0x5c126f=Lt(_0x5a09bb['sid'],_0x3fd6fb,_0x775a1b(0x299)),_0x1a3029=Rt(_0x5a09bb[_0x775a1b(0x26d)],_0x3fd6fb,_0x775a1b(0x299)),_0x55834c=_0x5a09bb[_0x775a1b(0x2f8)],_0x59bf29=_0x5a09bb[_0x775a1b(0x1ec)],_0xe3c3c9=_0x5a09bb['mutations'],_0x1bc967=_0x5a09bb[_0x775a1b(0x246)];if(!It(_0x55834c))throw new I(_0x3fd6fb,_0x775a1b(0x21f));if(!It(_0x59bf29))throw new I(_0x3fd6fb,_0x775a1b(0x2ff));if(!Array[_0x775a1b(0x1fc)](_0xe3c3c9))throw new I(_0x3fd6fb,'synced\x20changeset.mutations\x20must\x20be\x20an\x20array');if(_0x1bc967!==void 0x0&&typeof _0x1bc967!=_0x775a1b(0x2f5))throw new I(_0x3fd6fb,_0x775a1b(0x192));return{'sid':_0x5c126f,'reqId':_0x1a3029,'baseRev':_0x55834c,'revision':_0x59bf29,'mutations':_0xe3c3c9[_0x775a1b(0x176)]((_0x3aa0df,_0x511e8e)=>L(_0x3aa0df,_0x3fd6fb+_0x775a1b(0x199)+_0x511e8e+']')),..._0x1bc967===void 0x0?{}:{'message':_0x1bc967}};}function Ft(_0xeb5ac7,_0x5605f4,_0x5de19e){const _0x385bc6=_0x36f735;if(typeof _0xeb5ac7!=_0x385bc6(0x19f)||!_0xeb5ac7||Array[_0x385bc6(0x1fc)](_0xeb5ac7))throw new I(_0x5605f4,_0x5de19e+_0x385bc6(0x2b9));return _0xeb5ac7;}function It(_0x31b194){const _0x3687f5=_0x36f735;return typeof _0x31b194==_0x3687f5(0x230)&&Number[_0x3687f5(0x2cd)](_0x31b194)&&_0x31b194>=0x0;}function Lt(_0x327e34,_0x507cd0,_0x5b48b1){const _0x2671a=_0x36f735;if(typeof _0x327e34!='string'||_0x327e34[_0x2671a(0x294)]===0x0)throw new I(_0x507cd0,_0x5b48b1+_0x2671a(0x1d0));return _0x327e34;}function Rt(_0x13f620,_0x264c27,_0x2c256a){const _0x40a1b1=_0x36f735;if(typeof _0x13f620!='number'||!Number[_0x40a1b1(0x2cd)](_0x13f620)||_0x13f620<0x1)throw new I(_0x264c27,_0x2c256a+_0x40a1b1(0x239));return _0x13f620;}const zt=[_0x36f735(0x2f9),_0x36f735(0x2eb)];var Bt=class e{constructor(_0x4af6c5){const _0x234917=_0x36f735;this[_0x234917(0x293)]=_0x4af6c5;}static[_0x36f735(0x1b4)](_0x8730fa){const _0x13eb21=_0x36f735;let _0xb1b536=_0x8730fa[_0x13eb21(0x26a)]();if(_0xb1b536[_0x13eb21(0x294)]===0x0||!Vt(_0x31d09c(_0xb1b536)))throw new Ct(_0x8730fa);return new e(_0xb1b536);}get[_0x36f735(0x19d)](){return _0x31d09c(this['value']);}};function Vt(_0x270c34){const _0xff97c8=_0x36f735;return zt[_0xff97c8(0x2e2)](_0x270c34);}var Ht=class e{[_0x36f735(0x221)];constructor(_0x57297d){const _0x56ec29=_0x36f735;this[_0x56ec29(0x221)]=_0x57297d[_0x56ec29(0x221)];}static['fromAbsolutePath'](_0x3d2c29){const _0x4eec05=_0x36f735;let _0x102908=_0x3734f1(_0x3d2c29),_0x5820d1=Bt['parse'](_0x102908);if(_0x102908!==_0x3d2c29||!Vt(_0x5820d1[_0x4eec05(0x19d)]))throw new Ct(_0x3d2c29);return new e({'absolutePath':_0x102908});}},R=_0x36f735(0x21a),z=_0x36f735(0x171),B='local-mutations.jsonl',V=_0x36f735(0x308),H=_0x36f735(0x30b),Ut=class{constructor(_0x57a23f={}){const _0x213ce3=_0x36f735;this[_0x213ce3(0x1d1)]=_0x57a23f;}async[_0x36f735(0x1bf)](_0x5844b1){const _0x2f83aa=_0x36f735;let _0x354d55=Bt[_0x2f83aa(0x1b4)](_0x5844b1[_0x2f83aa(0x2b3)]);return Ht[_0x2f83aa(0x1e4)](_0x3734f1(_0x5844b1[_0x2f83aa(0x1ef)]??process[_0x2f83aa(0x1ef)](),_0x354d55[_0x2f83aa(0x293)]));}async[_0x36f735(0x260)](_0x4115a6){const _0x1071ff=_0x36f735;return await U(_0x4115a6[_0x1071ff(0x1a5)],_0x1071ff(0x260),this[_0x1071ff(0x1d1)],async()=>{const _0x562b57=_0x1071ff;let _0x1ceb05=Ot(_0x4115a6['manifest']),_0x20df9b=new G(_0x4115a6[_0x562b57(0x1a5)],this['options'],{'lockWrites':!0x1});return await Wt(_0x4115a6['identity']),await _0x301038(_0x4115a6['identity']['absolutePath'],{'recursive':!0x0}),await Promise['all']([_0x20df9b['setManifest'](_0x1ceb05),_0x20df9b[_0x562b57(0x2de)](_0x4115a6[_0x562b57(0x2be)]),_0x20df9b[_0x562b57(0x28d)]([]),_0x20df9b[_0x562b57(0x217)]([]),_0x20df9b['replaceSyncedChangesets'](_0x4115a6[_0x562b57(0x2e4)]??[])]),new G(_0x4115a6[_0x562b57(0x1a5)],this['options']);});}async['open'](_0x5eb811){const _0x267313=_0x36f735;return new G(_0x5eb811,this[_0x267313(0x1d1)]);}async[_0x36f735(0x1ad)](_0x2f569,_0x414189){const _0xab7178=_0x36f735;return await U(_0x2f569,_0xab7178(0x1ad),this['options'],async()=>{const _0x1ba97b=_0xab7178;let _0x543be6=new Zt(new G(_0x2f569,this[_0x1ba97b(0x1d1)],{'lockWrites':!0x1}));try{let _0xca7582=await _0x414189(_0x543be6);return await tn(_0x2f569,_0x543be6[_0x1ba97b(0x26c)](),this[_0x1ba97b(0x1d1)]),_0xca7582;}catch(_0x1db59d){throw new Tt(_0x2f569['absolutePath'],_0x1db59d instanceof Error?_0x1db59d[_0x1ba97b(0x246)]:String(_0x1db59d),_0x1db59d instanceof Error?{'cause':_0x1db59d}:void 0x0);}});}};async function Wt(_0x1ddb29){const _0x16a700=_0x36f735;try{if(!(await _0x31ea19(_0x1ddb29[_0x16a700(0x221)]))['isDirectory']()||(await _0x2798e8(_0x1ddb29[_0x16a700(0x221)]))[_0x16a700(0x294)]>0x0)throw new Et(_0x1ddb29[_0x16a700(0x221)]);}catch(_0x271a1e){if(Q(_0x271a1e)&&_0x271a1e[_0x16a700(0x186)]===_0x16a700(0x1ea))return;throw _0x271a1e;}}async function U(_0x5797bc,_0x5bfea7,_0x3adfbd,_0x17326d){await Gt(_0x5797bc,_0x5bfea7,_0x3adfbd);try{return await _0x17326d();}finally{await Yt(_0x5797bc);}}async function Gt(_0x184dca,_0x373103,_0x2745ae){const _0x3e0886=_0x36f735;let _0x5f2865=_0x2745ae[_0x3e0886(0x227)]??0x1388,_0x567a87=_0x2745ae[_0x3e0886(0x2af)]??0x32,_0x4eacc8=Date['now'](),_0x3d6e4b=null;for(await _0x301038(_0x25ebef(W(_0x184dca)),{'recursive':!0x0});;){try{await _0x243964(W(_0x184dca),Y({'pid':process['pid'],'hostname':_0x40fa30(),'createdAt':new Date()[_0x3e0886(0x1a0)](),'operation':_0x373103}),{'encoding':'utf8','flag':'wx'});return;}catch(_0x41d9a6){if(!Q(_0x41d9a6)||_0x41d9a6[_0x3e0886(0x186)]!==_0x3e0886(0x2b7))throw _0x41d9a6;}let _0x52080c=await Kt(_0x184dca,_0x2745ae);if(_0x3d6e4b=_0x52080c[_0x3e0886(0x28f)],!_0x52080c[_0x3e0886(0x1e7)]){if(Date[_0x3e0886(0x2bd)]()-_0x4eacc8>=_0x5f2865)throw new Dt(_0x184dca['absolutePath'],_0x3d6e4b);await Xt(Math[_0x3e0886(0x25f)](_0x567a87,Math[_0x3e0886(0x2f0)](_0x5f2865-(Date['now']()-_0x4eacc8),0x0)));}}}async function Kt(_0x1f96f5,_0x15e62a){const _0x533753=_0x36f735;let _0x11607f=await qt(_0x1f96f5);return _0x11607f===null||_0x11607f['hostname']!==_0x40fa30()||Jt(_0x11607f[_0x533753(0x317)],_0x15e62a)?{'holder':_0x11607f,'removed':!0x1}:(await Yt(_0x1f96f5),{'holder':_0x11607f,'removed':!0x0});}async function qt(_0x2fa9a6){const _0x5cc897=_0x36f735;try{let _0x427413=JSON[_0x5cc897(0x1b4)](await _0x5e0888(W(_0x2fa9a6),_0x5cc897(0x291)));if(!on(_0x427413))return null;let _0x24bff0=_0x427413['pid'],_0x5e3f12=_0x427413[_0x5cc897(0x292)],_0x37d536=_0x427413[_0x5cc897(0x223)],_0x7c0fa3=_0x427413[_0x5cc897(0x286)];return typeof _0x24bff0!=_0x5cc897(0x230)||!Number[_0x5cc897(0x2cd)](_0x24bff0)||typeof _0x5e3f12!='string'||typeof _0x37d536!=_0x5cc897(0x2f5)||typeof _0x7c0fa3!=_0x5cc897(0x2f5)?null:{'pid':_0x24bff0,'hostname':_0x5e3f12,'createdAt':_0x37d536,'operation':_0x7c0fa3};}catch{return null;}}function Jt(_0x59e424,_0x2da2ba){const _0x394e1a=_0x36f735;if(_0x2da2ba[_0x394e1a(0x2e8)]!==void 0x0)return _0x2da2ba[_0x394e1a(0x2e8)](_0x59e424);try{return process[_0x394e1a(0x2e1)](_0x59e424,0x0),!0x0;}catch{return!0x1;}}async function Yt(_0x26c466){const _0x552ed2=_0x36f735;await _0x11db62(W(_0x26c466),{'force':!0x0})[_0x552ed2(0x250)](()=>void 0x0);}function W(_0x68b1c4){const _0x466e04=_0x36f735;return _0x68b1c4[_0x466e04(0x221)]+'.lock';}async function Xt(_0x2c4113){_0x2c4113<=0x0||await new Promise(_0x258b2e=>{setTimeout(_0x258b2e,_0x2c4113);});}var G=class{constructor(_0x47cb7b,_0x5d9580,_0x12d18a={'lockWrites':!0x0}){const _0x15fecb=_0x36f735;this['identity']=_0x47cb7b,this[_0x15fecb(0x1d1)]=_0x5d9580,this[_0x15fecb(0x1b1)]=_0x12d18a;}async[_0x36f735(0x278)](){const _0x175320=_0x36f735;return await Qt(this[_0x175320(0x1a5)],R,(_0x24afb5,_0x5c5118)=>kt(_0x24afb5,_0x5c5118));}async[_0x36f735(0x1c2)](_0x4b20f8){const _0x43fff8=_0x36f735;await this[_0x43fff8(0x2d2)](_0x43fff8(0x1a8),()=>J(this[_0x43fff8(0x1a5)],R,Y(_0x4b20f8)));}async[_0x36f735(0x30e)](){const _0x3e3317=_0x36f735;return await Qt(this[_0x3e3317(0x1a5)],z,en);}async[_0x36f735(0x2de)](_0x3ee823){const _0x409f25=_0x36f735;await this[_0x409f25(0x2d2)](_0x409f25(0x1ce),()=>J(this[_0x409f25(0x1a5)],z,Y(_0x3ee823)));}async['getLocalMutations'](){const _0xbd8003=_0x36f735;return await K(this[_0xbd8003(0x1a5)],B,L);}async[_0x36f735(0x2d0)](_0x1de07b){const _0x3b1b71=_0x36f735;_0x1de07b[_0x3b1b71(0x294)]!==0x0&&await this[_0x3b1b71(0x2d2)](_0x3b1b71(0x253),()=>rn(this[_0x3b1b71(0x1a5)],B,X(_0x1de07b)));}async['replaceLocalMutations'](_0x4ecce5){const _0x3e8d6b=_0x36f735;await this[_0x3e8d6b(0x2d2)](_0x3e8d6b(0x2aa),()=>J(this[_0x3e8d6b(0x1a5)],B,X(_0x4ecce5)));}async['getLocalChangesets'](){const _0x139c1d=_0x36f735;return await K(this[_0x139c1d(0x1a5)],V,Nt);}async[_0x36f735(0x305)](_0x5d8495){const _0x348335=_0x36f735;await this['write'](_0x348335(0x2ed),()=>rn(this[_0x348335(0x1a5)],V,X([_0x5d8495])));}async[_0x36f735(0x217)](_0x47105e){const _0x12b65e=_0x36f735;await this[_0x12b65e(0x2d2)](_0x12b65e(0x295),()=>J(this[_0x12b65e(0x1a5)],V,X(_0x47105e)));}async[_0x36f735(0x1f9)](){const _0x3b297d=_0x36f735;return await K(this[_0x3b297d(0x1a5)],H,Pt);}async[_0x36f735(0x212)](_0x222c8a){const _0x54c890=_0x36f735;_0x222c8a[_0x54c890(0x294)]!==0x0&&await this[_0x54c890(0x2d2)](_0x54c890(0x195),()=>rn(this[_0x54c890(0x1a5)],H,X(_0x222c8a)));}async[_0x36f735(0x187)](_0x4faba1){const _0x3daf91=_0x36f735;await this['write']('replace-synced-changesets',()=>J(this[_0x3daf91(0x1a5)],H,X(_0x4faba1)));}async[_0x36f735(0x2d2)](_0x2d8cc5,_0x22c69e){const _0xae07fc=_0x36f735;if(!this['writeOptions'][_0xae07fc(0x236)]){await _0x22c69e();return;}await U(this[_0xae07fc(0x1a5)],_0x2d8cc5,this[_0xae07fc(0x1d1)],_0x22c69e);}},Zt=class{[_0x36f735(0x1a5)];[_0x36f735(0x272)]=new Set();[_0x36f735(0x2be)];[_0x36f735(0x2e7)];[_0x36f735(0x279)];[_0x36f735(0x2ba)];[_0x36f735(0x2e4)];constructor(_0x2f3716){const _0x2f8739=_0x36f735;this['basePackage']=_0x2f3716,this['identity']=_0x2f3716[_0x2f8739(0x1a5)];}async['getManifest'](){const _0x1e4692=_0x36f735;return this[_0x1e4692(0x2ba)]??=await this[_0x1e4692(0x284)][_0x1e4692(0x278)](),this[_0x1e4692(0x2ba)];}async[_0x36f735(0x1c2)](_0x4bc96d){const _0x207c1e=_0x36f735;this[_0x207c1e(0x2ba)]=_0x4bc96d,this['touchedFiles'][_0x207c1e(0x18e)](_0x207c1e(0x2ba));}async[_0x36f735(0x30e)](){const _0x3c92cf=_0x36f735;return this['initWorkbookData']??=await this['basePackage'][_0x3c92cf(0x30e)](),this[_0x3c92cf(0x2be)];}async[_0x36f735(0x2de)](_0x166a33){const _0x55a65e=_0x36f735;this[_0x55a65e(0x2be)]=_0x166a33,this[_0x55a65e(0x272)][_0x55a65e(0x18e)]('initWorkbookData');}async[_0x36f735(0x25c)](){const _0x438f7e=_0x36f735;return this[_0x438f7e(0x279)]??=await this[_0x438f7e(0x284)][_0x438f7e(0x25c)](),this[_0x438f7e(0x279)];}async[_0x36f735(0x2d0)](_0x430188){const _0x14722d=_0x36f735;_0x430188['length']!==0x0&&(this[_0x14722d(0x279)]=[...await this[_0x14722d(0x25c)](),..._0x430188],this[_0x14722d(0x272)][_0x14722d(0x18e)](_0x14722d(0x279)));}async['replaceLocalMutations'](_0x109aeb){const _0x3bd46f=_0x36f735;this[_0x3bd46f(0x279)]=[..._0x109aeb],this[_0x3bd46f(0x272)]['add'](_0x3bd46f(0x279));}async[_0x36f735(0x268)](){const _0xf53c9=_0x36f735;return this['localChangesets']??=await this[_0xf53c9(0x284)]['getLocalChangesets'](),this['localChangesets'];}async[_0x36f735(0x305)](_0x1cc261){const _0x16c778=_0x36f735;this[_0x16c778(0x2e7)]=[...await this['getLocalChangesets'](),_0x1cc261],this['touchedFiles'][_0x16c778(0x18e)](_0x16c778(0x2e7));}async['replaceLocalChangesets'](_0x2eb7bf){const _0x3decc9=_0x36f735;this[_0x3decc9(0x2e7)]=[..._0x2eb7bf],this['touchedFiles'][_0x3decc9(0x18e)]('localChangesets');}async[_0x36f735(0x1f9)](){const _0x33ae6e=_0x36f735;return this[_0x33ae6e(0x2e4)]??=await this[_0x33ae6e(0x284)][_0x33ae6e(0x1f9)](),this['syncedChangesets'];}async[_0x36f735(0x212)](_0x1f07d7){const _0x11d2d8=_0x36f735;_0x1f07d7[_0x11d2d8(0x294)]!==0x0&&(this[_0x11d2d8(0x2e4)]=[...await this[_0x11d2d8(0x1f9)](),..._0x1f07d7],this[_0x11d2d8(0x272)]['add'](_0x11d2d8(0x2e4)));}async[_0x36f735(0x187)](_0x1a5e8a){const _0x417f0a=_0x36f735;this[_0x417f0a(0x2e4)]=[..._0x1a5e8a],this[_0x417f0a(0x272)][_0x417f0a(0x18e)](_0x417f0a(0x2e4));}['takeWrites'](){const _0x147357=_0x36f735;let _0xd1eac0=new Map();for(let _0x3b8e91 of this[_0x147357(0x272)])_0xd1eac0[_0x147357(0x25b)](an(_0x3b8e91),this['serializeTouchedFile'](_0x3b8e91));return _0xd1eac0;}[_0x36f735(0x229)](_0xfa228){const _0x48996f=_0x36f735;switch(_0xfa228){case _0x48996f(0x2ba):return Y(Z(this[_0x48996f(0x2ba)],_0xfa228));case _0x48996f(0x2be):return Y(Z(this[_0x48996f(0x2be)],_0xfa228));case _0x48996f(0x279):return X(Z(this[_0x48996f(0x279)],_0xfa228));case _0x48996f(0x2e7):return X(Z(this[_0x48996f(0x2e7)],_0xfa228));case _0x48996f(0x2e4):return X(Z(this['syncedChangesets'],_0xfa228));}}};async function Qt(_0x2da71d,_0x51d1fa,_0x4d669d){const _0x5cda85=_0x36f735;let _0x1d05c1=_0x3c212b(_0x2da71d['absolutePath'],_0x51d1fa),_0x3753c1=await q(_0x1d05c1),_0x3f2316;try{_0x3f2316=JSON[_0x5cda85(0x1b4)](_0x3753c1);}catch(_0x34b2ad){throw new I(_0x1d05c1,_0x34b2ad instanceof Error?_0x34b2ad['message']:String(_0x34b2ad),_0x34b2ad instanceof Error?{'cause':_0x34b2ad}:void 0x0);}return _0x4d669d(_0x3f2316,_0x1d05c1);}async function K(_0x300cbb,_0x3f144e,_0x58c23b){const _0x382a2a=_0x36f735;return(await $t(_0x300cbb,_0x3f144e))[_0x382a2a(0x176)](({value:_0x1c0ed5,label:_0x564d28})=>_0x58c23b(_0x1c0ed5,_0x564d28));}async function $t(_0x862dae,_0x33aefe){const _0x507c92=_0x36f735;let _0xeae8f8=_0x3c212b(_0x862dae['absolutePath'],_0x33aefe),_0x1cfa0b=(await q(_0xeae8f8))[_0x507c92(0x26a)]();return _0x1cfa0b[_0x507c92(0x294)]===0x0?[]:_0x1cfa0b[_0x507c92(0x24f)](/\r?\n/u)['map']((_0xa316cf,_0x55392b)=>{const _0x40e221=_0x507c92;let _0x37e127;try{_0x37e127=JSON[_0x40e221(0x1b4)](_0xa316cf);}catch(_0x18a2d8){throw new I(_0xeae8f8,_0x40e221(0x1e5)+(_0x55392b+0x1)+':\x20'+(_0x18a2d8 instanceof Error?_0x18a2d8[_0x40e221(0x246)]:String(_0x18a2d8)),_0x18a2d8 instanceof Error?{'cause':_0x18a2d8}:void 0x0);}return{'value':_0x37e127,'label':_0xeae8f8+':'+(_0x55392b+0x1)};});}async function q(_0x1573bb){const _0x451b48=_0x36f735;try{if(!(await _0x31ea19(_0x1573bb))[_0x451b48(0x2a1)]())throw new wt(_0x1573bb);return await _0x5e0888(_0x1573bb,_0x451b48(0x291));}catch(_0x4125f8){throw Q(_0x4125f8)&&_0x4125f8[_0x451b48(0x186)]===_0x451b48(0x1ea)?new wt(_0x1573bb):_0x4125f8;}}function en(_0x5bbb46,_0x3d887e){const _0x16a0b9=_0x36f735;if(typeof _0x5bbb46!=_0x16a0b9(0x19f)||!_0x5bbb46||Array['isArray'](_0x5bbb46))throw new I(_0x3d887e,_0x16a0b9(0x29e));return _0x5bbb46;}function _0x7a27(_0x5d5a8,_0x21ccb7){_0x5d5a8=_0x5d5a8-0x171;const _0x46df0a=_0x46df();let _0x7a2740=_0x46df0a[_0x5d5a8];return _0x7a2740;}async function tn(_0x2bd2fb,_0x2a8bbe,_0x5b7bc9){const _0x3fc7a0=_0x36f735;if(_0x2a8bbe[_0x3fc7a0(0x20a)]===0x0)return;let _0x1eaa50=_0x2bd2fb[_0x3fc7a0(0x221)]+_0x3fc7a0(0x24a)+process[_0x3fc7a0(0x317)]+'-'+_0x2e23fe(),_0x100c30=await Promise['all']([..._0x2a8bbe['keys']()][_0x3fc7a0(0x176)](async _0x36397f=>({'relativePath':_0x36397f,'originalContent':await q(_0x3c212b(_0x2bd2fb['absolutePath'],_0x36397f))})));await _0x301038(_0x1eaa50,{'recursive':!0x0}),await nn(_0x1eaa50,{'state':_0x3fc7a0(0x255),'files':_0x100c30});try{for(let [_0x1ad009,_0x1e93ce]of _0x2a8bbe)await _0x5b7bc9[_0x3fc7a0(0x1b7)]?.(_0x1ad009),await J(_0x2bd2fb,_0x1ad009,_0x1e93ce);await nn(_0x1eaa50,{'state':_0x3fc7a0(0x1b2),'files':_0x100c30});}catch(_0x526504){try{for(let _0x52fbf7 of _0x100c30)await J(_0x2bd2fb,_0x52fbf7[_0x3fc7a0(0x1b3)],_0x52fbf7['originalContent']);await nn(_0x1eaa50,{'state':_0x3fc7a0(0x18d),'files':_0x100c30});}catch(_0x4777dd){throw Error((_0x526504 instanceof Error?_0x526504['message']:String(_0x526504))+_0x3fc7a0(0x2b5)+(_0x4777dd instanceof Error?_0x4777dd[_0x3fc7a0(0x246)]:String(_0x4777dd)),_0x526504 instanceof Error?{'cause':_0x526504}:void 0x0);}throw _0x526504;}finally{await _0x11db62(_0x1eaa50,{'recursive':!0x0,'force':!0x0})[_0x3fc7a0(0x250)](()=>void 0x0);}}async function nn(_0x5de32f,_0x8e599c){const _0x27f51e=_0x36f735;await _0x243964(_0x3c212b(_0x5de32f,_0x27f51e(0x184)),Y(_0x8e599c),_0x27f51e(0x291));}async function rn(_0x4e25b4,_0x1c7703,_0x3578f7){await _0x301038(_0x4e25b4['absolutePath'],{'recursive':!0x0}),await _0x834a5f(_0x3c212b(_0x4e25b4['absolutePath'],_0x1c7703),_0x3578f7,'utf8');}async function J(_0x174d3b,_0x92ae79,_0x25cd9f){const _0x3dee5c=_0x36f735;let _0x51e3f5=_0x3c212b(_0x174d3b[_0x3dee5c(0x221)],_0x92ae79),_0x202622=_0x51e3f5+'.tmp-'+process[_0x3dee5c(0x317)]+'-'+_0x2e23fe();try{await _0x301038(_0x25ebef(_0x51e3f5),{'recursive':!0x0}),await _0x243964(_0x202622,_0x25cd9f,_0x3dee5c(0x291)),await _0x2e1ee9(_0x202622,_0x51e3f5);}finally{await _0x11db62(_0x202622,{'force':!0x0})[_0x3dee5c(0x250)](()=>void 0x0);}}function an(_0x294aeb){const _0x3dc8cc=_0x36f735;switch(_0x294aeb){case _0x3dc8cc(0x2ba):return R;case _0x3dc8cc(0x2be):return z;case _0x3dc8cc(0x279):return B;case'localChangesets':return V;case _0x3dc8cc(0x2e4):return H;}}function Y(_0x114bd6){const _0x2617d4=_0x36f735;return JSON[_0x2617d4(0x1e3)](_0x114bd6)+'\x0a';}function X(_0x3a9cdf){const _0x8d2cbb=_0x36f735;return _0x3a9cdf['length']===0x0?'':_0x3a9cdf[_0x8d2cbb(0x176)](_0x288fa8=>JSON['stringify'](_0x288fa8))[_0x8d2cbb(0x1be)]('\x0a')+'\x0a';}function Z(_0x327954,_0x105275){const _0x360e6e=_0x36f735;if(_0x327954===void 0x0)throw Error(_0x360e6e(0x265)+_0x105275);return _0x327954;}function Q(_0x4d8ef5){const _0x1b23ac=_0x36f735;return _0x4d8ef5 instanceof Error&&_0x1b23ac(0x186)in _0x4d8ef5;}function on(_0x56fbe9){const _0x58582d=_0x36f735;return typeof _0x56fbe9==_0x58582d(0x19f)&&!!_0x56fbe9&&!Array['isArray'](_0x56fbe9);}var sn=_0x282ff7(import.meta.url),$=_n(_0x25ebef(_0x42c9c0(import.meta.url)));function cn(_0x4193d7=process.env){const _0x713d10=_0x36f735;let _0xbb1aba=un(_0x4193d7);return _0xbb1aba===_0x713d10(0x206)?dn():_0xbb1aba===_0x713d10(0x313)?fn():mn();}function ln(_0x53f54e=process.env){const _0x4cac78=_0x36f735;return{'daemonEntry':cn(_0x53f54e)[_0x4cac78(0x2f3)]};}function un(_0x21c77b=process.env){const _0x53aacd=_0x36f735;let _0x1bd6c3=_0x21c77b[_0x53aacd(0x2a9)]?.['trim']();return _0x1bd6c3==='source'||_0x1bd6c3===_0x53aacd(0x313)||_0x1bd6c3===_0x53aacd(0x240)?_0x1bd6c3:_0x42c9c0(import.meta.url)[_0x53aacd(0x1c5)](_0x53aacd(0x1f8))?_0x53aacd(0x206):gn($)?_0x53aacd(0x313):_0x53aacd(0x240);}function dn(){const _0x43e7c0=_0x36f735;let _0x2907ad=_0x3734f1($,_0x43e7c0(0x2ea)),_0x7bb89c=sn['resolve'](_0x43e7c0(0x319));return{'mode':_0x43e7c0(0x206),'packageRoot':$,'cliEntry':{'execArgv':[_0x43e7c0(0x1b8),_0x7bb89c],'modulePath':_0x3c212b($,'src',_0x43e7c0(0x311))},'daemonEntry':{'execArgv':[_0x43e7c0(0x1b8),_0x7bb89c],'modulePath':_0x3c212b($,_0x43e7c0(0x2b0),_0x43e7c0(0x241),_0x43e7c0(0x249))},'runtimeExecutionPlaneEntry':{'execArgv':[_0x43e7c0(0x1b8),_0x7bb89c],'modulePath':_0x3c212b(_0x2907ad,_0x43e7c0(0x28e),'univer-runtime','src',_0x43e7c0(0x19a),_0x43e7c0(0x249))},'runHelpTopicsRoot':_0x3c212b($,'src',_0x43e7c0(0x309),_0x43e7c0(0x267)),'viewAssetsRoot':hn(_0x2907ad)};}function fn(){const _0x224413=_0x36f735;let _0x3a50d7=pn($),_0x57cf87=_0x3c212b(_0x3a50d7,_0x224413(0x24d),_0x224413(0x218));return{'mode':'workspace-dist','packageRoot':$,'cliEntry':{'execArgv':[],'modulePath':_0x3c212b(_0x3a50d7,'internal','cli.js')},'daemonEntry':{'execArgv':[],'modulePath':_0x3c212b(_0x3a50d7,_0x224413(0x24d),_0x224413(0x21c))},'runtimeExecutionPlaneEntry':{'execArgv':[],'modulePath':_0x57cf87},'runHelpTopicsRoot':_0x3c212b(_0x3a50d7,_0x224413(0x309),_0x224413(0x267)),'viewAssetsRoot':_0x3c212b(_0x3a50d7,'view',_0x224413(0x248))};}function pn(_0x268305){const _0x1a0777=_0x36f735;return gn(_0x268305)?_0x3c212b(_0x268305,_0x1a0777(0x1a4)):_0x268305;}function _0x46df(){const _0x44b894=['nextRotationCheckAt','replaceLocalMutations','packages','holder','execPath','utf8','hostname','value','length','replace-local-changesets','command','local','starting','synced\x20changeset','toString','pidPath','autoStart','sessionExportWorkbookData','workbook\x20data\x20must\x20be\x20an\x20object','unref','ExportWorkbookData','isFile','ERR_WORKBOOK_PACKAGE_TRANSACTION_FAILED','end','clear\x20stale\x20daemon\x20runtime\x20files','ERR_WORKBOOK_PACKAGE_FILE_INVALID','WorkbookPackageFileInvalidError','SessionLoadWorkbook','cli.js','UNIVER_CLI_RUNTIME_MODE','replace-local-mutations','RuntimeSession','resolveExecutionPlaneOptions','parentSpanId','ensureSessionState','lockRetryIntervalMs','src','client','stderr','workbookPath','Cannot\x20resolve\x20home\x20directory\x20for\x20UNIVER_HOME\x20fallback',';\x20rollback\x20failed:\x20','meta','EEXIST','signalCode','\x20must\x20be\x20an\x20object','manifest','mutations','idle-unload','now','initWorkbookData','level','status','reverse','format','resolve','logger','Runtime','rpcTimeoutMs','univer','WorkbookPackageError','load-workbook','Runner\x20startup\x20error:\x20','cli.jsonl','univer-daemon-','isInteger','Invalid\x20workbook\x20package\x20path:\x20','finally','appendLocalMutations','\x20is\x20being\x20modified\x20by\x20operation\x20','write','random','ipc','flush','ensureWorkbookDataReplayPackLoaded','runner-exit','bin','warn','\x5c\x5c.\x5cpipe\x5c','initRev','from','destroyGraceMs','setInitWorkbookData','unitID','F_OK','kill','includes','args','syncedChangesets','UNIVER_CLI_BUILD_ID','loadWorkbookDataReplayPack','localChangesets','isProcessAlive','sessionDisposeWorkbook','../..','.unv','debug','append-local-changeset','rotationCheckIntervalMs','mutation\x20must\x20be\x20an\x20object','max','exited','sessionId','daemonEntry','touchSession','string','view','modulePath','baseRev','.univer','view-host.jsonl','local\x20changeset','ensureSession','drain','.js','synced\x20changeset.revision\x20must\x20be\x20a\x20non-negative\x20integer','spanId','null','error','session.createWorkbook','loadReplayPackIntoSession','appendLocalChangeset','daemon-','sort','local-changesets.jsonl','run-help','syncedRev','synced-changesets.jsonl','exitCode','once','getInitWorkbookData','executionPlanePath','platform','index.ts','session.evalJs','workspace-dist','logs','Daemon\x20process\x20entry\x20is\x20not\x20configured.\x20Pass\x20DaemonClientOptions.daemonEntry\x20from\x20the\x20CLI\x20runtime\x20manifest.','ERR_WORKBOOK_PACKAGE_ALREADY_EXISTS','pid','RuntimeRunner','tsx','pendingRequests','Shutdown','init-workbook-data.json','destroySession','SIGKILL','.\x20Run\x20`univer\x20daemon\x20stop`\x20and\x20retry.','resolveWorkbookIdentity','map','scheduleRotationIfNeeded','waitForReady','cli','metaPath','maxArchiveFiles','2272536UMMfFc','runtimeLogPath','daemon.shutdown','5439276pKSwqZ','logPath','stderrPath','mutation.params\x20must\x20be\x20an\x20object','loadWorkbook','journal.json','getSessionCount','code','replaceSyncedChangesets','RuntimeSessionCreated','WorkbookPackageAlreadyExistsError','Health','export-workbook','replace','rolled_back','add','VITEST','ignore','indexOf','synced\x20changeset.message\x20must\x20be\x20a\x20string\x20when\x20present','sha1','serve','append-synced-changesets','workbookIdentity','update','rejectPendingRequests','.mutations[','execution-plane','saturated','ERR_WORKBOOK_PACKAGE_FILE_MISSING','extension','type','object','toISOString','local\x20changeset.message\x20must\x20be\x20a\x20string','outputPath','default','dist','identity','timeout','destroying','set-manifest','Workbook\x20package\x20transaction\x20failed\x20for\x20','80cMnWZE','view-host','slice','transaction','ERR_INVALID_WORKBOOK_PACKAGE_PATH','sessionDir','reopen','writeOptions','committed','relativePath','parse','event_name','daemon.meta.json','beforeCommitFile','--import','exportWorkbookFile','mutation.id\x20must\x20be\x20a\x20non-empty\x20string','entry:\x20','fromEntries','sessionGetWorkbook','join','resolveIdentity','NODE_OPTIONS','baseWorkbookData','setManifest','DaemonRpcClient','logsDir','endsWith','toRuntimeSessionInfo','runtime.jsonl','entries','startTimeoutMs','SIGTERM','456815MPbgPU','VITEST_WORKER_ID','unreachable','set-init-workbook-data','mutates','.sid\x20must\x20be\x20a\x20non-empty\x20string','options','univer\x20daemon\x20start','session.loadWorkbook','Runner\x20startup\x20timeout','export-workbook-file','Daemon\x20did\x20not\x20stop\x20before\x20timeout','rpc-response','destroy','./build-id-BAjJE5TZ.js','child','daemonOptions','event','/tmp','sid','destination','Daemon\x20build\x20mismatch.\x20Expected\x20','traceFlags','injectMeta','stringify','fromAbsolutePath','invalid\x20JSONL\x20at\x20line\x20','sessionCount','removed','session.exportWorkbookFile','sessionRoot','ENOENT','ERR_WORKBOOK_PACKAGE_LOCK_TIMEOUT','revision','formatStderr','socketPath','cwd','workbookName','workbookId','session.dispose','Runner\x20exited\x20before\x20ready','ready','createConnection','daemon.pid','Runner\x20process\x20exited\x20(code=','.ts','getSyncedChangesets','ExportWorkbookFile','UNIVER_HOME','isArray','exit','67508dGCOpg','replayPack','sessions','getSessionIdleTtlMs','start\x20a\x20fresh\x20daemon','lockPath','eval-js','LoadWorkbook','source','daemon.sock','delete','off','size','explicit-dispose','USERPROFILE','emit','sizeBytes','SessionEvalJs','LoadWorkbookDataReplayPack','clear','appendSyncedChangesets','createWorkbook','.sock','closeAfterFlush','create-workbook','replaceLocalChangesets','univer-runner.js','loadWorkbookData','manifest.json','process_role','daemon.js','univer-','daemonLogPath','synced\x20changeset.baseRev\x20must\x20be\x20a\x20non-negative\x20integer','closed','absolutePath','EvalJs','createdAt','UNIVER_DAEMON_SESSION_IDLE_TTL_MS','dispose','reject','lockTimeoutMs','values','serializeTouchedFile','local\x20changeset.mutations\x20must\x20be\x20an\x20array','maxBytes','buildId','HOME','send','session.exportWorkbookData','number','session-','rotationInFlight','sessionEvalJs','apps','package.json','lockWrites','sessionIdleTtlMs','method','.reqId\x20must\x20be\x20a\x20positive\x20integer','load-workbook-replay-pack','getSession','sendRpc','last\x20health\x20error:\x20','RuntimeSessionDisposed','manifest\x20must\x20be\x20an\x20object','packaged','daemon','workbookData','30ekGQdM','name','RPC\x20timeout','message','daemon\x20is\x20stopped','browser','main.ts','.tx-','Workbook\x20package\x20is\x20busy:\x20','evalJs','internal','WorkbookPackageFileMissingError','split','catch','Runner\x20not\x20ready','lastAccessedAt','append-local-mutations','Timed\x20out\x20waiting\x20for\x20daemon\x20startup\x20after\x20','committing','exists',',\x20got\x20','569245CGrybn','CreateWorkbook','unloadIdleSessions','set','getLocalMutations','data','logFields','min','initialize','created','traceId','unitID\x20must\x20be\x20a\x20string\x20or\x20null','UNIVER_CLI_VERSION','Missing\x20transaction\x20value\x20for\x20','get','topics','getLocalChangesets','30928mHDMWH','trim','isAlive','takeWrites','reqId','allSettled','185712YkyByF','initRev\x20must\x20be\x20a\x20non-negative\x20integer\x20or\x20null','viewHostLogPath','touchedFiles','startsWith','exportWorkbookData','daemon\x20is\x20running','SessionLoadWorkbookDataReplayPack','WorkbookPackageLockTimeoutError','getManifest','localMutations','running','rotateIfNeeded','cliLogPath','info','stderr.log','withSpan','fields','pipe','env','2.0','basePackage','session','operation','result','execArgv','WorkbookPackageTransactionError','daemon.jsonl','runner'];_0x46df=function(){return _0x44b894;};return _0x46df();}function mn(){const _0x8e63c9=_0x36f735;return{'mode':_0x8e63c9(0x240),'packageRoot':$,'cliEntry':{'execArgv':[],'modulePath':_0x3c212b($,_0x8e63c9(0x24d),_0x8e63c9(0x2a8))},'daemonEntry':{'execArgv':[],'modulePath':_0x3c212b($,_0x8e63c9(0x24d),_0x8e63c9(0x21c))},'runtimeExecutionPlaneEntry':{'execArgv':[],'modulePath':_0x3c212b($,_0x8e63c9(0x24d),_0x8e63c9(0x218))},'runHelpTopicsRoot':_0x3c212b($,_0x8e63c9(0x309),'topics'),'viewAssetsRoot':_0x3c212b($,_0x8e63c9(0x2f6),_0x8e63c9(0x248))};}function hn(_0x187e79){const _0x180a49=_0x36f735;let _0x49487f=_0x3c212b(_0x187e79,_0x180a49(0x28e),_0x180a49(0x1ab),'dist',_0x180a49(0x248));return _0x41250e(_0x49487f)?_0x49487f:_0x3c212b(_0x187e79,_0x180a49(0x28e),_0x180a49(0x1ab),_0x180a49(0x2b0),'browser');}function gn(_0x5095d0){const _0x279138=_0x36f735;return _0x4d9d2d(_0x5095d0)==='cli'&&_0x4d9d2d(_0x25ebef(_0x5095d0))===_0x279138(0x234);}function _n(_0x489605){const _0x559105=_0x36f735;let _0x5a1bb1=_0x489605;for(;;){let _0xa08dd=_0x3c212b(_0x5a1bb1,_0x559105(0x235));if(_0x41250e(_0xa08dd)&&JSON[_0x559105(0x1b4)](_0x2d3933(_0xa08dd,_0x559105(0x291)))[_0x559105(0x2d8)]?.[_0x559105(0x2c7)]!==void 0x0)return _0x5a1bb1;let _0x438f9b=_0x25ebef(_0x5a1bb1);if(_0x438f9b===_0x5a1bb1)throw Error('Unable\x20to\x20resolve\x20univer-cli\x20package\x20root\x20from\x20'+_0x489605);_0x5a1bb1=_0x438f9b;}}export{_t as a,We as c,De as d,S as f,St as i,w as l,x as m,cn as n,Ue as o,ge as p,Ut as r,He as s,ln as t,C as u};
|
|
1
|
+
const _0x1539f1=_0x2f58;(function(_0x3006be,_0x1ff85f){const _0x4a0b9c=_0x2f58,_0x2c57b8=_0x3006be();while(!![]){try{const _0x515aa9=parseInt(_0x4a0b9c(0x204))/0x1*(parseInt(_0x4a0b9c(0x330))/0x2)+-parseInt(_0x4a0b9c(0x202))/0x3*(-parseInt(_0x4a0b9c(0x308))/0x4)+-parseInt(_0x4a0b9c(0x26d))/0x5+parseInt(_0x4a0b9c(0x333))/0x6+parseInt(_0x4a0b9c(0x1eb))/0x7+parseInt(_0x4a0b9c(0x1e1))/0x8*(parseInt(_0x4a0b9c(0x206))/0x9)+-parseInt(_0x4a0b9c(0x2e1))/0xa;if(_0x515aa9===_0x1ff85f)break;else _0x2c57b8['push'](_0x2c57b8['shift']());}catch(_0x12d555){_0x2c57b8['push'](_0x2c57b8['shift']());}}}(_0x431d,0x19821));import{o as _0x4c7333}from'./rolldown-runtime-D8j-JhcR.js';import{gn as _0x2a36d4}from'./vendor-DjomC5bd.js';import{a as _0x4721b0,i as _0x378abb,n as _0x55add6,o as _0x443850,r as _0x188ced}from'./trace-DPfd8LdJ.js';import{fork as _0x50e56d,spawn as _0x463fd1}from'node:child_process';import{constants as _0xe4a7ec,existsSync as _0x390ebd,mkdirSync as _0x460694,readFileSync as _0xeead2d}from'node:fs';import{access as _0x50b703,appendFile as _0x459368,mkdir as _0xf0d57,readFile as _0x5b8678,readdir as _0x2ff29b,realpath as _0x26650d,rename as _0x4a0359,rm as _0x2dcc20,stat as _0x1e846a,writeFile as _0x6c3ba4}from'node:fs/promises';import{basename as _0x40b1df,dirname as _0x73c0a7,extname as _0x204563,join as _0x5a76fb,resolve as _0x48276b}from'node:path';import{fileURLToPath as _0x2b74e2,pathToFileURL as _0x52835a}from'node:url';import{createRequire as _0x4710ea}from'node:module';import{hostname as _0x258e12}from'node:os';import{createHash as _0xdf0e83,randomUUID as _0x3bdc2d}from'node:crypto';import _0x41aef4 from'node:net';import _0xb4250b from'node:process';import{EventEmitter as _0x2495c1}from'node:events';const x={'Health':_0x1539f1(0x305),'Shutdown':_0x1539f1(0x28e),'SessionCreateWorkbook':'session.createWorkbook','SessionEvalJs':_0x1539f1(0x1b1),'SessionExportWorkbookFile':_0x1539f1(0x2bf),'SessionExportWorkbookData':_0x1539f1(0x2ab),'SessionDispose':_0x1539f1(0x24f),'SessionGetWorkbook':_0x1539f1(0x222),'SessionLoadWorkbook':_0x1539f1(0x217),'SessionLoadWorkbookDataReplayPack':_0x1539f1(0x1be)};var ge=class{['debug'](_0x161bb2){}[_0x1539f1(0x272)](_0x532a45){}[_0x1539f1(0x20c)](_0x887aa7){}[_0x1539f1(0x2cf)](_0x80a086){}[_0x1539f1(0x2e0)](_0x53542d){}async['flush'](){}};function _e(_0x4ef391,_0x884bb9=new Date()){const _0x1599da=_0x1539f1;let _0x36b922=_0x55add6[_0x1599da(0x1d3)]();return{'time':_0x884bb9[_0x1599da(0x1b4)](),'level':_0x4ef391['level']??_0x1599da(0x272),'event_name':_0x4ef391[_0x1599da(0x24c)],'component':_0x4ef391[_0x1599da(0x311)],'process_role':_0x4ef391[_0x1599da(0x242)],'pid':process['pid'],..._0x4ef391[_0x1599da(0x327)]===void 0x0?{}:{'message':_0x4ef391[_0x1599da(0x327)]},..._0x36b922===void 0x0?{}:{'trace_id':_0x36b922[_0x1599da(0x2d9)],'span_id':_0x36b922[_0x1599da(0x1ab)],'trace_flags':_0x36b922[_0x1599da(0x33d)],..._0x36b922[_0x1599da(0x2f7)]===void 0x0?{}:{'parent_span_id':_0x36b922[_0x1599da(0x2f7)]}},..._0x4ef391[_0x1599da(0x2cf)]===void 0x0?{}:{'error':ve(_0x4ef391[_0x1599da(0x2cf)])},..._0x4ef391[_0x1599da(0x337)]??{}};}function ve(_0x170920){const _0x12fef8=_0x1539f1;return _0x170920 instanceof Error?{'message':_0x170920[_0x12fef8(0x327)],'name':_0x170920[_0x12fef8(0x285)],...be(_0x170920),..._0x170920[_0x12fef8(0x294)]===void 0x0?{}:{'stack':_0x170920[_0x12fef8(0x294)]},...ye(_0x170920)}:{'message':typeof _0x170920=='string'?_0x170920:JSON[_0x12fef8(0x2c2)](_0x170920)};}function ye(_0x15cc39){const _0xdf95fd=_0x1539f1;let _0x58b7ed=_0x15cc39;return typeof _0x58b7ed[_0xdf95fd(0x21f)]=='string'?{'code':_0x58b7ed['code']}:{};}function be(_0x6b2343){const _0x360fac=_0x1539f1;let _0x394328=_0x6b2343;return _0x394328[_0x360fac(0x30a)]===null||typeof _0x394328['logFields']!=_0x360fac(0x33e)||Array['isArray'](_0x394328[_0x360fac(0x30a)])?{}:{'details':_0x394328[_0x360fac(0x30a)]};}var xe=_0x4c7333(_0x2a36d4(),0x1)[_0x1539f1(0x2fa)],Se=0xa*0x400*0x400,Ce=0x5,we=0x3e8,Te=class{[_0x1539f1(0x1f4)];[_0x1539f1(0x1e4)];[_0x1539f1(0x1cd)];[_0x1539f1(0x30c)];[_0x1539f1(0x1ae)];[_0x1539f1(0x208)];['rotationCheckIntervalMs'];[_0x1539f1(0x2b7)]=!0x1;['nextRotationCheckAt']=0x0;['rotationInFlight'];[_0x1539f1(0x29b)]=!0x1;constructor(_0x4ac5bc){const _0x2fff35=_0x1539f1;this['closeAfterFlush']=_0x4ac5bc[_0x2fff35(0x1cd)]===!0x0,this[_0x2fff35(0x30c)]=_0x4ac5bc['logPath'],this[_0x2fff35(0x1ae)]=_0x4ac5bc[_0x2fff35(0x1ae)]??Ce,this['maxBytes']=_0x4ac5bc[_0x2fff35(0x208)]??Se,this[_0x2fff35(0x27e)]=_0x4ac5bc[_0x2fff35(0x27e)]??we,this[_0x2fff35(0x1f4)]=new xe({'dest':_0x4ac5bc['logPath'],'mkdir':!0x0,'sync':!0x1}),this[_0x2fff35(0x1e4)]=new Promise(_0x4761b9=>{const _0x1b4c22=_0x2fff35;this[_0x1b4c22(0x1f4)][_0x1b4c22(0x260)](_0x1b4c22(0x1e4),()=>{_0x4761b9();}),this['destination'][_0x1b4c22(0x260)]('error',()=>{_0x4761b9();});});}['debug'](_0xe438cf){const _0x96c44a=_0x1539f1;this[_0x96c44a(0x2e0)]({..._0xe438cf,'level':'debug'});}[_0x1539f1(0x272)](_0x1c9839){const _0x52a0be=_0x1539f1;this[_0x52a0be(0x2e0)]({..._0x1c9839,'level':'info'});}[_0x1539f1(0x20c)](_0x3ece65){const _0x4fb768=_0x1539f1;this['event']({..._0x3ece65,'level':_0x4fb768(0x20c)});}[_0x1539f1(0x2cf)](_0x130493){const _0x526241=_0x1539f1;this[_0x526241(0x2e0)]({..._0x130493,'level':_0x526241(0x2cf)});}[_0x1539f1(0x2e0)](_0x4d1370){const _0x3f2a4b=_0x1539f1;if(!(this[_0x3f2a4b(0x2b7)]||this[_0x3f2a4b(0x29b)]))try{this[_0x3f2a4b(0x29b)]=!this['destination'][_0x3f2a4b(0x1d0)](JSON['stringify'](_e(_0x4d1370))+'\x0a'),this['saturated']&&this[_0x3f2a4b(0x1f4)][_0x3f2a4b(0x260)](_0x3f2a4b(0x27b),()=>{const _0x354374=_0x3f2a4b;this[_0x354374(0x29b)]=!0x1;}),this[_0x3f2a4b(0x2d6)]();}catch{}}async[_0x1539f1(0x211)](){const _0xaff928=_0x1539f1;this[_0xaff928(0x2b7)]||(await this[_0xaff928(0x1e4)],await new Promise(_0x5c7d60=>{const _0x4546c3=_0xaff928;this[_0x4546c3(0x1f4)][_0x4546c3(0x211)](()=>{_0x5c7d60();});}),await this[_0xaff928(0x310)],this['closeAfterFlush']&&(this['closed']=!0x0,this['destination'][_0xaff928(0x267)]()));}[_0x1539f1(0x2d6)](){const _0x1509a9=_0x1539f1;let _0x5ed229=Date[_0x1509a9(0x1e5)]();this['rotationInFlight']!==void 0x0||_0x5ed229<this[_0x1509a9(0x35b)]||(this['nextRotationCheckAt']=_0x5ed229+this[_0x1509a9(0x27e)],this[_0x1509a9(0x310)]=this['rotateIfNeeded']()[_0x1509a9(0x26b)](()=>{})['finally'](()=>{const _0x1dad1d=_0x1509a9;this[_0x1dad1d(0x310)]=void 0x0;}));}async['rotateIfNeeded'](){const _0x418754=_0x1539f1;await this['ready'],await je({'logPath':this[_0x418754(0x30c)],'maxArchiveFiles':this[_0x418754(0x1ae)],'maxBytes':this[_0x418754(0x208)],'flush':async()=>{await new Promise(_0x41ccce=>{const _0x100930=_0x2f58;this[_0x100930(0x1f4)][_0x100930(0x211)](()=>{_0x41ccce();});});}})&&!this[_0x418754(0x2b7)]&&this[_0x418754(0x1f4)][_0x418754(0x340)](this['logPath']);}};function Ee(_0xef91ac){return new Te(_0xef91ac);}function De(_0x2da1c7){let {env:_0x4fe5d8,role:_0x1c5054,..._0x4d7a0a}=_0x2da1c7,_0x2c1bba=S(_0x4fe5d8);return Ee({..._0x4d7a0a,'logPath':ke(_0x2c1bba,_0x1c5054)});}function Oe(_0x9f48ec=process.env){const _0x3c9b48=_0x1539f1;let _0x1dba96=_0x9f48ec[_0x3c9b48(0x322)]?.[_0x3c9b48(0x1d2)]();if(_0x1dba96)return _0x48276b(_0x1dba96);let _0x53201d=_0x9f48ec[_0x3c9b48(0x1c7)]?.[_0x3c9b48(0x1d2)]()||_0x9f48ec[_0x3c9b48(0x1d6)]?.[_0x3c9b48(0x1d2)]();if(!_0x53201d)throw Error(_0x3c9b48(0x31b));return _0x48276b(_0x53201d,_0x3c9b48(0x1f7));}function S(_0x5a5c1f=process.env){const _0x5e3b5f=_0x1539f1;let _0x5a43a2=Oe(_0x5a5c1f),_0x252b8a=_0x5a76fb(_0x5a43a2,_0x5e3b5f(0x256));return{'homeDir':_0x5a43a2,'logsDir':_0x252b8a,'cliLogPath':_0x5a76fb(_0x252b8a,_0x5e3b5f(0x324)),'daemonLogPath':_0x5a76fb(_0x252b8a,'daemon.jsonl'),'runtimeLogPath':_0x5a76fb(_0x252b8a,_0x5e3b5f(0x2a9)),'viewHostLogPath':_0x5a76fb(_0x252b8a,_0x5e3b5f(0x282))};}function ke(_0x22d0c4,_0x2bc163){const _0x3f0d96=_0x1539f1;switch(_0x2bc163){case _0x3f0d96(0x314):return _0x22d0c4[_0x3f0d96(0x1e3)];case _0x3f0d96(0x1fe):return _0x22d0c4[_0x3f0d96(0x2e4)];case _0x3f0d96(0x2aa):return _0x22d0c4[_0x3f0d96(0x20b)];case _0x3f0d96(0x26c):return _0x22d0c4['viewHostLogPath'];}}async function Ae(_0x330aa4,_0x469a75){const _0x2912b5=_0x1539f1;await _0xf0d57(_0x73c0a7(_0x330aa4),{'recursive':!0x0,'mode':0x1c0}),await _0x459368(_0x330aa4,_0x469a75+'\x0a',_0x2912b5(0x328));try{await je({'logPath':_0x330aa4,'maxArchiveFiles':Ce,'maxBytes':Se});}catch{}}async function je(_0x4b0971){const _0x5698c7=_0x1539f1;if(_0x4b0971['maxBytes']<=0x0)return!0x1;await _0x4b0971[_0x5698c7(0x211)]?.();let _0x19ed30;try{_0x19ed30=await _0x1e846a(_0x4b0971[_0x5698c7(0x30c)]);}catch{return!0x1;}if(!_0x19ed30['isFile']()||_0x19ed30[_0x5698c7(0x1cc)]<_0x4b0971[_0x5698c7(0x208)])return!0x1;let _0x477deb=_0x5a76fb(_0x73c0a7(_0x4b0971[_0x5698c7(0x30c)]),_0x5698c7(0x224));await _0xf0d57(_0x477deb,{'recursive':!0x0,'mode':0x1c0});let _0x67a6c4=_0x5a76fb(_0x477deb,_0x40b1df(_0x4b0971[_0x5698c7(0x30c)])+'.'+Ne(new Date())+'.'+process[_0x5698c7(0x268)]);try{await _0x4a0359(_0x4b0971[_0x5698c7(0x30c)],_0x67a6c4);}catch{return!0x1;}return await Me({'archiveDir':_0x477deb,'maxArchiveFiles':_0x4b0971[_0x5698c7(0x1ae)],'prefix':_0x40b1df(_0x4b0971[_0x5698c7(0x30c)])+'.'}),!0x0;}async function Me(_0x334ad6){const _0x511878=_0x1539f1;if(_0x334ad6[_0x511878(0x1ae)]<0x0)return;let _0x11a187;try{_0x11a187=await _0x2ff29b(_0x334ad6[_0x511878(0x33b)]);}catch{return;}let _0x3ccb02=_0x11a187[_0x511878(0x200)](_0x370121=>_0x370121[_0x511878(0x252)](_0x334ad6[_0x511878(0x20f)]))[_0x511878(0x355)]()['reverse']();await Promise[_0x511878(0x309)](_0x3ccb02[_0x511878(0x1e6)](_0x334ad6['maxArchiveFiles'])['map'](async _0x1127fd=>await _0x2dcc20(_0x5a76fb(_0x334ad6['archiveDir'],_0x1127fd),{'force':!0x0})));}function Ne(_0x2ac766){const _0x444e7e=_0x1539f1;return _0x2ac766[_0x444e7e(0x1b4)]()['replace'](/[^0-9A-Za-z]/gu,'');}var Pe=0x46,Fe='\x5c\x5c.\x5cpipe\x5c';function Ie(_0x54726f=process.env){const _0x59695b=_0x1539f1;let _0xba401d=_0x54726f[_0x59695b(0x322)]?.[_0x59695b(0x1d2)]();if(_0xba401d)return _0x48276b(_0xba401d);let _0x36e246=_0x54726f[_0x59695b(0x1c7)]?.[_0x59695b(0x1d2)]()||_0x54726f['USERPROFILE']?.[_0x59695b(0x1d2)]();if(!_0x36e246)throw Error(_0x59695b(0x31b));return _0x48276b(_0x36e246,_0x59695b(0x1f7));}function C(_0x29c8da=process.env){const _0x25b80d=_0x1539f1;let _0x50c41e=Ie(_0x29c8da),_0x5afc51=_0x5a76fb(_0x50c41e,'daemon'),_0x166d59=_0x5a76fb(_0x50c41e,_0x25b80d(0x221)),_0x24c9ff=S(_0x29c8da),_0x57b2b3=Le(_0x50c41e);return{'homeDir':_0x50c41e,'daemonDir':_0x5afc51,'logsDir':_0x24c9ff[_0x25b80d(0x307)],'daemonLogPath':_0x24c9ff['daemonLogPath'],'sessionRoot':_0x166d59,'socketPath':_0x57b2b3,'pidPath':_0x5a76fb(_0x5afc51,_0x25b80d(0x1fd)),'metaPath':_0x5a76fb(_0x5afc51,_0x25b80d(0x325)),'lockPath':_0x5a76fb(_0x5afc51,_0x25b80d(0x316))};}function Le(_0x1d2c2a,_0x5c1d5e=process[_0x1539f1(0x306)]){const _0x30da33=_0x1539f1;let _0x42ee9c=_0x5a76fb(_0x1d2c2a,_0x30da33(0x1fe),_0x30da33(0x354));return _0x5c1d5e===_0x30da33(0x20d)?Fe+_0x30da33(0x1df)+ze(_0x42ee9c):_0x42ee9c[_0x30da33(0x1ee)]<=Pe?_0x42ee9c:_0x5a76fb(_0x30da33(0x1e7),_0x30da33(0x28b)+ze(_0x42ee9c)+_0x30da33(0x296));}function w(_0xe1c0ce){const _0x4d331a=_0x1539f1;return _0xe1c0ce[_0x4d331a(0x252)](Fe);}function Re(_0x53c2df,_0x31aef0=process.env){const _0x452972=_0x1539f1;let _0x3acdbd=_0x5a76fb(C(_0x31aef0)[_0x452972(0x229)],_0x53c2df);return{'sessionDir':_0x3acdbd,'tracePath':S(_0x31aef0)[_0x452972(0x20b)],'stderrPath':_0x5a76fb(_0x3acdbd,_0x452972(0x31f))};}function ze(_0x153793){const _0x2aedb9=_0x1539f1;return _0xdf0e83(_0x2aedb9(0x2f3))[_0x2aedb9(0x21d)](_0x153793)[_0x2aedb9(0x1c4)]('hex')['slice'](0x0,0x10);}var Be=0x3a98,Ve=0x7530;async function T(_0xcefb2c={}){const _0x26538c=_0x1539f1;return await D({'jsonrpc':_0x26538c(0x343),'id':k(),'method':x[_0x26538c(0x34d)]},{..._0xcefb2c,'autoStart':!0x1});}async function E(_0x1208e5={}){const _0x416c32=_0x1539f1;let _0x2b449b=_0x1208e5[_0x416c32(0x2a0)]??_0xb4250b[_0x416c32(0x2a0)],{readDaemonBuildId:_0x8f6191}=await import(_0x416c32(0x2f6)),_0x4e725d=_0x8f6191(_0x2b449b);try{let _0x5aceca=await T({..._0x1208e5,'autoStart':!0x1});return lt(_0x4e725d,_0x5aceca[_0x416c32(0x26a)]),_0x5aceca;}catch(_0x543643){if(_0x1208e5[_0x416c32(0x346)]===!0x1)throw _0x543643;}let _0x1159bf=await it(_0x2b449b,_0x4e725d,_0x1208e5[_0x416c32(0x303)]),_0x131f42=_0x1208e5[_0x416c32(0x2ca)]??Be,_0x4318c6=Date['now']()+_0x131f42,_0x47f138;for(;Date[_0x416c32(0x1e5)]()<_0x4318c6;)try{let _0x5e8218=await T({..._0x1208e5,'autoStart':!0x1});return lt(_0x4e725d,_0x5e8218[_0x416c32(0x26a)]),_0x5e8218;}catch(_0x2cd10d){_0x47f138=_0x2cd10d,await ft(0x64);}throw Error(['Timed\x20out\x20waiting\x20for\x20daemon\x20startup\x20after\x20'+_0x131f42+'ms',_0x416c32(0x23b)+_0x1159bf[_0x416c32(0x2c3)]+'\x20'+_0x1159bf['args'][_0x416c32(0x1c5)]('\x20'),'last\x20health\x20error:\x20'+dt(_0x47f138)]['join'](';\x20'));}async function He(_0x41fb84={}){const _0x379977=_0x1539f1;let _0x45f9cc=C(_0x41fb84[_0x379977(0x2a0)]??_0xb4250b[_0x379977(0x2a0)]);try{return $e(await T({..._0x41fb84,'autoStart':!0x1}),_0x45f9cc);}catch(_0x44179a){return rt(_0x45f9cc)?tt(_0x45f9cc,_0x44179a):et(_0x45f9cc);}}async function Ue(_0x41498b={}){return await E(_0x41498b);}async function We(_0x4cfc8f={}){const _0x43d01a=_0x1539f1;let _0x206687=C(_0x4cfc8f['env']??_0xb4250b[_0x43d01a(0x2a0)]);try{await D({'jsonrpc':'2.0','id':k(),'method':x[_0x43d01a(0x22a)]},{..._0x4cfc8f,'autoStart':!0x1});}catch{await ot(_0x206687[_0x43d01a(0x351)]),await _0x2dcc20(_0x206687['pidPath'],{'force':!0x0})[_0x43d01a(0x26b)](()=>void 0x0),await _0x2dcc20(_0x206687[_0x43d01a(0x231)],{'force':!0x0})[_0x43d01a(0x26b)](()=>void 0x0),await _0x2dcc20(_0x206687[_0x43d01a(0x32a)],{'recursive':!0x0,'force':!0x0})[_0x43d01a(0x26b)](()=>void 0x0);return;}let _0x9d6165=Date['now']()+(_0x4cfc8f[_0x43d01a(0x2ca)]??Be);for(;Date[_0x43d01a(0x1e5)]()<_0x9d6165;){if(!at(_0x206687[_0x43d01a(0x351)])&&!_0x390ebd(_0x206687[_0x43d01a(0x1d9)])&&!_0x390ebd(_0x206687[_0x43d01a(0x231)]))return;await ft(0x64);}throw Error('Daemon\x20did\x20not\x20stop\x20before\x20timeout');}async function Ge(_0x1444fa,_0x579e89,_0x59b60a={}){const _0x37a30a=_0x1539f1;return await E(_0x59b60a),await D({'jsonrpc':_0x37a30a(0x343),'id':k(),'method':x[_0x37a30a(0x291)],'params':{'workbookPath':_0x1444fa,'workbookData':_0x579e89,'cwd':_0x59b60a[_0x37a30a(0x1d4)]}},_0x59b60a);}async function Ke(_0x260cd5,_0xc827bf,_0x21d0f8={}){const _0xf152fe=_0x1539f1;return await E(_0x21d0f8),await D({'jsonrpc':_0xf152fe(0x343),'id':k(),'method':x[_0xf152fe(0x2bc)],'params':{'workbookPath':_0x260cd5,'cwd':_0x21d0f8['cwd'],'baseWorkbookData':_0xc827bf['baseWorkbookData'],'mutations':_0xc827bf[_0xf152fe(0x1c8)]}},_0x21d0f8);}async function qe(_0x414072,_0x204e70={}){const _0x989dc5=_0x1539f1;return await E(_0x204e70),await D({'jsonrpc':_0x989dc5(0x343),'id':k(),'method':x['SessionGetWorkbook'],'params':{'workbookPath':_0x414072,'cwd':_0x204e70[_0x989dc5(0x1d4)]}},_0x204e70);}async function Je(_0x4f83de,_0x425ede={}){const _0x2cc4dc=_0x1539f1;return await E(_0x425ede),await D({'jsonrpc':_0x2cc4dc(0x343),'id':k(),'method':x[_0x2cc4dc(0x24e)],'params':{'workbookPath':_0x4f83de,'cwd':_0x425ede[_0x2cc4dc(0x1d4)],'id':_0x425ede['id'],'name':_0x425ede[_0x2cc4dc(0x285)]}},_0x425ede);}async function Ye(_0x25b666,_0x19780a,_0x420f73={}){const _0x23bd08=_0x1539f1;return await E(_0x420f73),await D({'jsonrpc':_0x23bd08(0x343),'id':k(),'method':x[_0x23bd08(0x251)],'params':{'workbookPath':_0x25b666,'code':_0x19780a,'cwd':_0x420f73[_0x23bd08(0x1d4)],'mutates':_0x420f73[_0x23bd08(0x25f)]}},_0x420f73);}async function Xe(_0xf8e987,_0xa40439={}){const _0x181f83=_0x1539f1;return await E(_0xa40439),await D({'jsonrpc':_0x181f83(0x343),'id':k(),'method':x[_0x181f83(0x210)],'params':{'workbookPath':_0xf8e987,'cwd':_0xa40439['cwd']}},_0xa40439);}async function Ze(_0x230123,_0x447c59,_0x9db88e={}){const _0x3bd97f=_0x1539f1;return await E(_0x9db88e),await D({'jsonrpc':_0x3bd97f(0x343),'id':k(),'method':x[_0x3bd97f(0x1d5)],'params':{'workbookPath':_0x230123,'cwd':_0x9db88e['cwd'],'format':_0x447c59[_0x3bd97f(0x21a)],'outputPath':_0x447c59[_0x3bd97f(0x2b4)]}},_0x9db88e);}async function Qe(_0x5a61db,_0x2adddb={}){const _0x1405bc=_0x1539f1;return await E(_0x2adddb),await D({'jsonrpc':_0x1405bc(0x343),'id':k(),'method':x[_0x1405bc(0x2d4)],'params':{'workbookPath':_0x5a61db,'cwd':_0x2adddb['cwd']}},_0x2adddb);}async function D(_0x384dd8,_0x30b854){const _0x54ccc0=_0x1539f1;return await _0x55add6[_0x54ccc0(0x2e2)]({'name':_0x443850[_0x54ccc0(0x23c)],'kind':_0x54ccc0(0x326)},async()=>{const _0x18d089=_0x54ccc0;let _0x3348f1=C(_0x30b854[_0x18d089(0x2a0)]??_0xb4250b[_0x18d089(0x2a0)]);w(_0x3348f1[_0x18d089(0x351)])||await _0x50b703(_0x3348f1[_0x18d089(0x351)],_0xe4a7ec[_0x18d089(0x25c)]);let _0x33d715=await ct(_0x3348f1['socketPath'],{..._0x384dd8,'meta':_0x55add6[_0x18d089(0x2e6)](_0x384dd8[_0x18d089(0x27a)])},_0x30b854[_0x18d089(0x30f)]??Ve);if(_0x33d715[_0x18d089(0x2cf)])throw Error(_0x33d715[_0x18d089(0x2cf)][_0x18d089(0x327)]);return _0x33d715[_0x18d089(0x2eb)];});}function $e(_0x493b8f,_0x14115e){const _0x5a6849=_0x1539f1;return{'ok':!0x0,'daemon':{'state':_0x5a6849(0x1f5),'pid':_0x493b8f[_0x5a6849(0x268)],'runtimeRoot':_0x493b8f[_0x5a6849(0x26f)],'socketPath':_0x493b8f[_0x5a6849(0x351)],'startedAt':_0x493b8f[_0x5a6849(0x342)],'sessionCount':_0x493b8f[_0x5a6849(0x2da)],'buildId':_0x493b8f['buildId']},'paths':O(_0x14115e),'next':[{'command':_0x5a6849(0x258),'reason':_0x5a6849(0x234)}],'diagnostics':[]};}function et(_0x430288){const _0xbc3d34=_0x1539f1;return{'ok':!0x0,'daemon':nt('stopped',_0x430288),'paths':O(_0x430288),'next':[{'command':_0xbc3d34(0x28f),'reason':_0xbc3d34(0x1e2)}],'diagnostics':[]};}function tt(_0x3b4bea,_0x1d7b6b){const _0x10c427=_0x1539f1;return{'ok':!0x0,'daemon':nt('unreachable',_0x3b4bea),'paths':O(_0x3b4bea),'next':[{'command':'univer\x20daemon\x20stop','reason':_0x10c427(0x28c)},{'command':_0x10c427(0x28f),'reason':_0x10c427(0x332)}],'diagnostics':[{'message':_0x1d7b6b instanceof Error?_0x1d7b6b[_0x10c427(0x327)]:String(_0x1d7b6b)}]};}function nt(_0x4507e3,_0x166f88){const _0x5eb0d3=_0x1539f1;return{'state':_0x4507e3,'pid':null,'runtimeRoot':_0x166f88[_0x5eb0d3(0x30b)],'socketPath':_0x166f88['socketPath'],'startedAt':null,'sessionCount':0x0,'buildId':null};}function O(_0x575d91){const _0x141c7f=_0x1539f1;return{'metaPath':_0x575d91['metaPath'],'lockPath':_0x575d91[_0x141c7f(0x32a)]};}function rt(_0x2d5328){const _0x1083ef=_0x1539f1;return at(_0x2d5328[_0x1083ef(0x351)])||_0x390ebd(_0x2d5328[_0x1083ef(0x1d9)])||_0x390ebd(_0x2d5328[_0x1083ef(0x231)]);}async function it(_0x4e27e3,_0x425242,_0x5c879c){const _0x5e0863=_0x1539f1;let _0x145b7d=st(_0x5c879c);return _0x460694(C(_0x4e27e3)[_0x5e0863(0x259)],{'recursive':!0x0,'mode':0x1c0}),_0x463fd1(_0x145b7d['command'],_0x145b7d[_0x5e0863(0x32b)],{..._0x145b7d[_0x5e0863(0x1d4)]===void 0x0?{}:{'cwd':_0x145b7d[_0x5e0863(0x1d4)]},'detached':!0x0,'stdio':[_0x5e0863(0x31e),_0x5e0863(0x31e),_0x5e0863(0x31e)],'env':ut(_0x4e27e3,_0x425242)})[_0x5e0863(0x1f3)](),_0x145b7d;}function at(_0x2e964f){return w(_0x2e964f)?!0x1:_0x390ebd(_0x2e964f);}async function ot(_0x1b24c6){w(_0x1b24c6)||await _0x2dcc20(_0x1b24c6,{'force':!0x0})['catch'](()=>void 0x0);}function st(_0x271a69){const _0x2a82cd=_0x1539f1;if(_0x271a69===void 0x0)throw Error(_0x2a82cd(0x21e));return{'command':_0x271a69[_0x2a82cd(0x2c3)]??_0xb4250b[_0x2a82cd(0x220)],..._0x271a69[_0x2a82cd(0x1d4)]===void 0x0?{}:{'cwd':_0x271a69['cwd']},'args':[..._0x271a69[_0x2a82cd(0x287)]??[],_0x271a69[_0x2a82cd(0x2dd)],..._0x271a69['args']??['serve']][_0x2a82cd(0x2db)](String)};}async function ct(_0x124e14,_0x2ea512,_0x1ba923){return await new Promise((_0x263402,_0x50284c)=>{const _0x124cf8=_0x2f58;let _0x350dab=_0x41aef4[_0x124cf8(0x302)](_0x124e14),_0x31b3fb='',_0x21939a=setTimeout(()=>{const _0x4a1ff3=_0x124cf8;_0x350dab['destroy'](),_0x50284c(Error(_0x4a1ff3(0x2a4)+_0x2ea512[_0x4a1ff3(0x331)]));},_0x1ba923);_0x350dab['on'](_0x124cf8(0x2d7),()=>{const _0x566e6b=_0x124cf8;_0x350dab[_0x566e6b(0x1d0)](JSON[_0x566e6b(0x2c2)](_0x2ea512)+'\x0a');}),_0x350dab['on']('data',_0x1685d1=>{const _0x58b2c6=_0x124cf8;_0x31b3fb+=_0x1685d1[_0x58b2c6(0x313)](_0x58b2c6(0x328));let _0x4e0e26=_0x31b3fb[_0x58b2c6(0x289)]('\x0a');_0x4e0e26<0x0||(clearTimeout(_0x21939a),_0x350dab['end'](),_0x263402(JSON[_0x58b2c6(0x299)](_0x31b3fb[_0x58b2c6(0x1e6)](0x0,_0x4e0e26)[_0x58b2c6(0x1d2)]())));}),_0x350dab['on'](_0x124cf8(0x2cf),_0x184d08=>{clearTimeout(_0x21939a),_0x50284c(_0x184d08);});});}function lt(_0x27056d,_0x2feb8f){const _0x42ec4a=_0x1539f1;if(_0x27056d!==_0x2feb8f)throw Error(_0x42ec4a(0x2bb)+_0x27056d+_0x42ec4a(0x2b9)+_0x2feb8f+_0x42ec4a(0x28a));}function ut(_0x4e736b,_0x20fb46){const _0x4f3977=_0x1539f1;let _0x57da21={..._0x4e736b,'UNIVER_DAEMON_BUILD_ID_OVERRIDE':_0x20fb46};return delete _0x57da21[_0x4f3977(0x335)],delete _0x57da21[_0x4f3977(0x1bc)],delete _0x57da21[_0x4f3977(0x341)],delete _0x57da21[_0x4f3977(0x24d)],_0x57da21;}function dt(_0x317469){const _0xb0292d=_0x1539f1;return _0x317469 instanceof Error?_0x317469[_0xb0292d(0x327)]:String(_0x317469);}function k(){const _0x245208=_0x1539f1;return'daemon-'+Date[_0x245208(0x1e5)]()['toString'](0x24)+'-'+Math['random']()[_0x245208(0x313)](0x10)['slice'](0x2,0x8);}async function ft(_0x333b03){await new Promise(_0x4079b9=>{setTimeout(_0x4079b9,_0x333b03);});}var pt=0x1388,mt=0xea60,ht=class extends _0x2495c1{[_0x1539f1(0x277)];[_0x1539f1(0x25e)];[_0x1539f1(0x298)]=new Map();[_0x1539f1(0x30f)];[_0x1539f1(0x1bf)]='';[_0x1539f1(0x2ac)]=_0x1539f1(0x2d3);constructor(_0x269691,_0x5d244e){const _0x16be1e=_0x1539f1;super(),this[_0x16be1e(0x207)]=_0x269691,this[_0x16be1e(0x25e)]=_0x5d244e['destroyGraceMs']??pt,this[_0x16be1e(0x30f)]=_0x5d244e[_0x16be1e(0x30f)]??mt,this['child']=_0x50e56d(_0x5d244e['executionPlanePath'],[],{'cwd':_0x5d244e[_0x16be1e(0x1d4)],'env':{...process.env,..._0x5d244e['env'],'UNIVER_SESSION_ID':_0x269691},'execArgv':_0x5d244e['execArgv'],'stdio':[_0x16be1e(0x31e),_0x16be1e(0x31e),_0x16be1e(0x2b6),_0x16be1e(0x22d)]}),this['child'][_0x16be1e(0x1bf)]?.['on']('data',_0x3e3737=>{const _0x319165=_0x16be1e;this['stderr']+=_0x3e3737[_0x319165(0x313)](),_0x5d244e[_0x319165(0x250)]?.(_0x3e3737);}),this[_0x16be1e(0x277)]['on'](_0x16be1e(0x327),_0x262c87=>{const _0x612ebd=_0x16be1e;if(_0x262c87['type']===_0x612ebd(0x1e4)&&(this['status']='ready',this['emit'](_0x612ebd(0x1e4))),_0x262c87[_0x612ebd(0x334)]===_0x612ebd(0x1c3)&&_0x262c87['id']!==void 0x0&&_0x262c87[_0x612ebd(0x22f)]){let _0x4e14cf=this[_0x612ebd(0x298)][_0x612ebd(0x240)](_0x262c87['id']);if(!_0x4e14cf)return;clearTimeout(_0x4e14cf[_0x612ebd(0x1e0)]),this[_0x612ebd(0x298)][_0x612ebd(0x22e)](_0x262c87['id']),_0x4e14cf[_0x612ebd(0x357)](_0x262c87['data']);}}),this[_0x16be1e(0x277)]['on'](_0x16be1e(0x23f),(_0x1c5e2c,_0x3b6b79)=>{const _0x3a3c3f=_0x16be1e;this['status']=_0x3a3c3f(0x35d),this[_0x3a3c3f(0x1de)](Error(_0x3a3c3f(0x1f0)+(_0x1c5e2c??_0x3a3c3f(0x1ac))+',\x20signal='+(_0x3b6b79??_0x3a3c3f(0x1ac))+')'+this['formatStderr']())),this[_0x3a3c3f(0x2a2)]('exit',_0x1c5e2c,_0x3b6b79);}),this['child']['on'](_0x16be1e(0x2cf),_0x406e8b=>{const _0x7a292a=_0x16be1e;this[_0x7a292a(0x2a2)]('error',_0x406e8b);});}['destroy'](){const _0x427eff=_0x1539f1;this[_0x427eff(0x2ac)]===_0x427eff(0x1db)||this['status']===_0x427eff(0x35d)||(this[_0x427eff(0x2ac)]='destroying',this[_0x427eff(0x277)][_0x427eff(0x241)](_0x427eff(0x2b8)),setTimeout(()=>{const _0x1361c9=_0x427eff;this[_0x1361c9(0x277)][_0x1361c9(0x21b)]===null&&this[_0x1361c9(0x277)]['kill'](_0x1361c9(0x1dc));},this[_0x427eff(0x25e)])[_0x427eff(0x1f3)]());}[_0x1539f1(0x1b6)](){const _0x535d51=_0x1539f1;return this['child']['exitCode']===null&&this[_0x535d51(0x277)][_0x535d51(0x2d5)]===null;}async[_0x1539f1(0x228)](_0xcd1f4,_0x4f9a5e){const _0x2d86da=_0x1539f1;if(this[_0x2d86da(0x2ac)]!==_0x2d86da(0x1e4))throw Error(_0x2d86da(0x226));let _0x1b09ab=_0x4f9a5e?.[_0x2d86da(0x263)]??this[_0x2d86da(0x30f)];return new Promise((_0xa84cd,_0x4480fb)=>{const _0x53091e=_0x2d86da;let _0x3b42ff=setTimeout(()=>{const _0x41952d=_0x2f58;this[_0x41952d(0x298)][_0x41952d(0x22e)](_0xcd1f4['id']),_0x4480fb(Error(_0x41952d(0x1f9)));},_0x1b09ab);this['pendingRequests']['set'](_0xcd1f4['id'],{'resolve':_0xa84cd,'reject':_0x4480fb,'timeout':_0x3b42ff}),this[_0x53091e(0x277)][_0x53091e(0x356)]({'type':'rpc-request','id':_0xcd1f4['id'],'data':{..._0xcd1f4,'meta':_0x55add6['injectMeta'](_0xcd1f4[_0x53091e(0x27a)])}});});}async['waitForReady'](_0x4aee10=0x7530){const _0x34f7a4=_0x1539f1;if(this[_0x34f7a4(0x2ac)]!==_0x34f7a4(0x1e4)){if(!this[_0x34f7a4(0x1b6)]())throw Error(_0x34f7a4(0x1b0)+this[_0x34f7a4(0x24a)]());return await new Promise((_0xc29e9f,_0x5e294d)=>{const _0x46e74c=_0x34f7a4;let _0x1479fe=()=>{const _0x2d3c41=_0x2f58;clearTimeout(_0xf1e617),this[_0x2d3c41(0x1f1)]('ready',_0x25ea7f),this[_0x2d3c41(0x1f1)](_0x2d3c41(0x23f),_0x31ab79),this[_0x2d3c41(0x1f1)](_0x2d3c41(0x2cf),_0x3fd0e6);},_0x25ea7f=()=>{_0x1479fe(),_0xc29e9f();},_0x31ab79=()=>{const _0x476038=_0x2f58;_0x1479fe(),_0x5e294d(Error(_0x476038(0x1b0)+this[_0x476038(0x24a)]()));},_0x3fd0e6=_0x5b9b7e=>{const _0x10f495=_0x2f58;_0x1479fe(),_0x5e294d(Error(_0x10f495(0x245)+_0x5b9b7e['message']));},_0xf1e617=setTimeout(()=>{const _0x227181=_0x2f58;_0x1479fe(),_0x5e294d(Error(_0x227181(0x2ad)));},_0x4aee10);this[_0x46e74c(0x260)]('ready',_0x25ea7f),this[_0x46e74c(0x260)](_0x46e74c(0x23f),_0x31ab79),this[_0x46e74c(0x260)](_0x46e74c(0x2cf),_0x3fd0e6);});}}['formatStderr'](){const _0x6ecb4f=_0x1539f1;let _0x3217bd=this[_0x6ecb4f(0x1bf)][_0x6ecb4f(0x1d2)]();return _0x3217bd[_0x6ecb4f(0x1ee)]===0x0?'':'\x0a'+_0x3217bd;}[_0x1539f1(0x1de)](_0x55db63){const _0x4c21cb=_0x1539f1;for(let _0x187217 of this[_0x4c21cb(0x298)]['values']())clearTimeout(_0x187217[_0x4c21cb(0x1e0)]),_0x187217['reject'](_0x55db63);this[_0x4c21cb(0x298)][_0x4c21cb(0x30e)]();}};let A=function(_0x4369ce){const _0x2e4e1b=_0x1539f1;return _0x4369ce['CreateWorkbook']=_0x2e4e1b(0x273),_0x4369ce[_0x2e4e1b(0x1c0)]=_0x2e4e1b(0x253),_0x4369ce['ExportWorkbookFile']=_0x2e4e1b(0x31d),_0x4369ce[_0x2e4e1b(0x300)]=_0x2e4e1b(0x203),_0x4369ce[_0x2e4e1b(0x1d7)]=_0x2e4e1b(0x32c),_0x4369ce[_0x2e4e1b(0x2ce)]=_0x2e4e1b(0x2ee),_0x4369ce;}({});var gt=0x384*0x3e8,_t=class{[_0x1539f1(0x2a0)];[_0x1539f1(0x218)];[_0x1539f1(0x279)];[_0x1539f1(0x221)]=new Map();[_0x1539f1(0x248)];constructor(_0x4fb6b2){const _0x125149=_0x1539f1;this[_0x125149(0x2a0)]=_0x4fb6b2[_0x125149(0x2a0)]??process.env,this[_0x125149(0x218)]=_0x4fb6b2[_0x125149(0x218)]??new ge(),this[_0x125149(0x279)]=_0x4fb6b2[_0x125149(0x279)],this[_0x125149(0x248)]=_0x4fb6b2[_0x125149(0x248)]??vt(this[_0x125149(0x2a0)],gt);}[_0x1539f1(0x1ed)](){const _0xaf13e0=_0x1539f1;return this[_0xaf13e0(0x221)]['size'];}[_0x1539f1(0x2af)](){const _0x411169=_0x1539f1;return this[_0x411169(0x248)];}async[_0x1539f1(0x2a1)](_0x50f78b){const _0x4525e1=_0x1539f1;let _0x47c4f1=await this['resolveWorkbookIdentity'](_0x50f78b[_0x4525e1(0x274)][_0x4525e1(0x2fe)]),_0x5334e9=this['sessions'][_0x4525e1(0x240)](_0x47c4f1);return _0x5334e9?this['toRuntimeSessionInfo'](_0x5334e9,_0x50f78b[_0x4525e1(0x274)]):null;}async[_0x1539f1(0x273)](_0x24cc82){const _0xe4aa39=_0x1539f1;let _0x4bf87e=await this[_0xe4aa39(0x2bd)](_0x24cc82['identity'][_0xe4aa39(0x2fe)]),_0x3be559=await _0x4bf87e[_0xe4aa39(0x345)][_0xe4aa39(0x228)]({'jsonrpc':_0xe4aa39(0x343),'id':N(_0x4bf87e[_0xe4aa39(0x207)]),'method':A['CreateWorkbook'],'params':{'id':_0x24cc82[_0xe4aa39(0x1bb)],'name':_0x24cc82[_0xe4aa39(0x317)]}});if(_0x3be559[_0xe4aa39(0x2cf)])throw Error(_0x3be559['error'][_0xe4aa39(0x327)]);return await this[_0xe4aa39(0x2dc)](_0x4bf87e,_0xe4aa39(0x1fa)),{'session':this[_0xe4aa39(0x31a)](_0x4bf87e,_0x24cc82[_0xe4aa39(0x274)]),'workbookData':_0x3be559[_0xe4aa39(0x2eb)]['workbookData']};}async['loadWorkbookData'](_0x518793){const _0x7f3751=_0x1539f1;let _0x28b19a=await this[_0x7f3751(0x2bd)](_0x518793[_0x7f3751(0x274)][_0x7f3751(0x2fe)]),_0x105d56=await _0x28b19a[_0x7f3751(0x345)]['sendRpc']({'jsonrpc':_0x7f3751(0x343),'id':N(_0x28b19a[_0x7f3751(0x207)]),'method':A['LoadWorkbook'],'params':{'workbookData':_0x518793['workbookData']}});if(_0x105d56['error'])throw Error(_0x105d56[_0x7f3751(0x2cf)]['message']);return await this[_0x7f3751(0x2dc)](_0x28b19a,_0x7f3751(0x264)),{'session':this[_0x7f3751(0x31a)](_0x28b19a,_0x518793[_0x7f3751(0x274)]),'workbookData':_0x105d56[_0x7f3751(0x2eb)][_0x7f3751(0x35c)]};}async[_0x1539f1(0x2ee)](_0x2f67e0){const _0x13d5bd=_0x1539f1;let _0x36668a=await this['ensureSession'](_0x2f67e0['identity'][_0x13d5bd(0x2fe)]),_0x1c3bd5={'baseWorkbookData':_0x2f67e0['replayPack']['baseWorkbookData'],'mutations':_0x2f67e0[_0x13d5bd(0x1b9)][_0x13d5bd(0x1c8)]},_0x22996d=await _0x36668a[_0x13d5bd(0x345)][_0x13d5bd(0x228)]({'jsonrpc':'2.0','id':N(_0x36668a['sessionId']),'method':A[_0x13d5bd(0x2ce)],'params':_0x1c3bd5});if(_0x22996d[_0x13d5bd(0x2cf)])throw Error(_0x22996d[_0x13d5bd(0x2cf)][_0x13d5bd(0x327)]);return await this['touchSession'](_0x36668a,_0x13d5bd(0x2f5)),{'session':this['toRuntimeSessionInfo'](_0x36668a,_0x2f67e0[_0x13d5bd(0x274)]),'workbookData':_0x22996d[_0x13d5bd(0x2eb)][_0x13d5bd(0x35c)]};}async['ensureWorkbookDataReplayPackLoaded'](_0x402e08){const _0x1af89f=_0x1539f1;let _0x353435=await this[_0x1af89f(0x1dd)](_0x402e08[_0x1af89f(0x274)]['absolutePath']);if(!_0x353435[_0x1af89f(0x23a)])return await this[_0x1af89f(0x2dc)](_0x353435[_0x1af89f(0x1ce)],_0x1af89f(0x29f)),{'loaded':!0x1,'session':this[_0x1af89f(0x31a)](_0x353435[_0x1af89f(0x1ce)],_0x402e08[_0x1af89f(0x274)])};let _0x451088=await _0x402e08[_0x1af89f(0x2f1)]();return await this['loadReplayPackIntoSession'](_0x353435[_0x1af89f(0x1ce)],_0x451088),await this[_0x1af89f(0x2dc)](_0x353435[_0x1af89f(0x1ce)],_0x1af89f(0x2f5)),{'loaded':!0x0,'session':this[_0x1af89f(0x31a)](_0x353435[_0x1af89f(0x1ce)],_0x402e08['identity'])};}async[_0x1539f1(0x2b2)](_0x1b0250){const _0x2e3d57=_0x1539f1;let _0x3bf89d=await this['ensureSession'](_0x1b0250[_0x2e3d57(0x274)][_0x2e3d57(0x2fe)]),_0x29c3f8=await _0x3bf89d[_0x2e3d57(0x345)]['sendRpc']({'jsonrpc':_0x2e3d57(0x343),'id':N(_0x3bf89d[_0x2e3d57(0x207)]),'method':A['EvalJs'],'params':{'code':_0x1b0250['code'],'mutates':_0x1b0250[_0x2e3d57(0x25f)]}});if(_0x29c3f8[_0x2e3d57(0x2cf)])throw Error(_0x29c3f8[_0x2e3d57(0x2cf)]['message']);await this[_0x2e3d57(0x2dc)](_0x3bf89d,_0x2e3d57(0x25d));let _0x1ecda9=_0x29c3f8[_0x2e3d57(0x2eb)][_0x2e3d57(0x1c8)];return{..._0x1ecda9===void 0x0?{}:{'mutations':_0x1ecda9},'session':this[_0x2e3d57(0x31a)](_0x3bf89d,_0x1b0250[_0x2e3d57(0x274)]),'value':_0x29c3f8[_0x2e3d57(0x2eb)][_0x2e3d57(0x2f2)]};}async[_0x1539f1(0x203)](_0xe31c3b){const _0x50122e=_0x1539f1;let _0x1ffc9b=await this['ensureSession'](_0xe31c3b[_0x50122e(0x274)][_0x50122e(0x2fe)]),_0x1e760a=await _0x1ffc9b[_0x50122e(0x345)][_0x50122e(0x228)]({'jsonrpc':_0x50122e(0x343),'id':N(_0x1ffc9b[_0x50122e(0x207)]),'method':A[_0x50122e(0x300)]});if(_0x1e760a['error'])throw Error(_0x1e760a[_0x50122e(0x2cf)][_0x50122e(0x327)]);return await this[_0x50122e(0x2dc)](_0x1ffc9b,_0x50122e(0x312)),{'session':this[_0x50122e(0x31a)](_0x1ffc9b,_0xe31c3b[_0x50122e(0x274)]),'workbookData':_0x1e760a[_0x50122e(0x2eb)]['workbookData']};}async[_0x1539f1(0x31d)](_0x171af3){const _0x4e1f4c=_0x1539f1;let _0x1f9e11=await this[_0x4e1f4c(0x2bd)](_0x171af3['identity'][_0x4e1f4c(0x2fe)]),_0x34d8d8=await _0x1f9e11[_0x4e1f4c(0x345)]['sendRpc']({'jsonrpc':_0x4e1f4c(0x343),'id':N(_0x1f9e11[_0x4e1f4c(0x207)]),'method':A[_0x4e1f4c(0x255)],'params':{'format':_0x171af3[_0x4e1f4c(0x21a)],'outputPath':_0x171af3[_0x4e1f4c(0x2b4)]}});if(_0x34d8d8[_0x4e1f4c(0x2cf)])throw Error(_0x34d8d8[_0x4e1f4c(0x2cf)][_0x4e1f4c(0x327)]);await this['touchSession'](_0x1f9e11,_0x4e1f4c(0x339));let _0x14a23b=_0x34d8d8[_0x4e1f4c(0x2eb)];return{'format':_0x14a23b[_0x4e1f4c(0x21a)],'outputPath':_0x14a23b[_0x4e1f4c(0x2b4)],'session':this[_0x4e1f4c(0x31a)](_0x1f9e11,_0x171af3[_0x4e1f4c(0x274)]),'sizeBytes':_0x14a23b[_0x4e1f4c(0x283)]};}async[_0x1539f1(0x347)](_0x4246e3){const _0x4455c3=_0x1539f1;let _0x117407=await this['resolveWorkbookIdentity'](_0x4246e3[_0x4455c3(0x274)][_0x4455c3(0x2fe)]),_0x4e48c6=this[_0x4455c3(0x221)][_0x4455c3(0x240)](_0x117407);_0x4e48c6&&await this['destroySession'](_0x4e48c6,_0x4455c3(0x2c1));}async[_0x1539f1(0x2ff)](_0x25a405=Date[_0x1539f1(0x1e5)]()){const _0x19cc5f=_0x1539f1;let _0x538490=Array[_0x19cc5f(0x1cf)](this[_0x19cc5f(0x221)]['values']());for(let _0x3db7a9 of _0x538490)_0x25a405-Date[_0x19cc5f(0x299)](_0x3db7a9[_0x19cc5f(0x1b8)])<this[_0x19cc5f(0x248)]||await this[_0x19cc5f(0x22c)](_0x3db7a9,_0x19cc5f(0x28d));}async[_0x1539f1(0x350)](_0xc0614d='shutdown'){const _0x3b4c55=_0x1539f1;let _0x16bbb3=Array[_0x3b4c55(0x1cf)](this[_0x3b4c55(0x221)][_0x3b4c55(0x262)]());for(let _0x3fdd0c of _0x16bbb3)await this['destroySession'](_0x3fdd0c,_0xc0614d);}async[_0x1539f1(0x26e)](_0x3c3d75){try{return await _0x26650d(_0x3c3d75);}catch{return _0x3c3d75;}}async['ensureSession'](_0x39f9af){const _0x16d453=_0x1539f1;return(await this[_0x16d453(0x1dd)](_0x39f9af))[_0x16d453(0x1ce)];}async['ensureSessionState'](_0x441970){const _0xa7e472=_0x1539f1;let _0x586005=await this[_0xa7e472(0x26e)](_0x441970),_0x1da799=this['sessions']['get'](_0x586005);if(_0x1da799)return{'created':!0x1,'session':_0x1da799};let _0x3af714=yt(),_0x2f4a98=Re(_0x3af714,this[_0xa7e472(0x2a0)]);await _0xf0d57(_0x2f4a98['sessionDir'],{'recursive':!0x0,'mode':0x1c0});let _0x1312ac=this[_0xa7e472(0x279)](bt(this[_0xa7e472(0x279)])),_0x458c1a=new ht(_0x3af714,{'cwd':xt(_0x1312ac['modulePath']),'env':Object[_0xa7e472(0x280)](Object['entries'](this['env'])[_0xa7e472(0x200)](_0x5af072=>_0x5af072[0x1]!==void 0x0)),'execArgv':_0x1312ac['execArgv'],'executionPlanePath':_0x1312ac[_0xa7e472(0x2dd)],'onStderrChunk':_0xc191ed=>{const _0x1bf2e0=_0xa7e472;Ae(_0x2f4a98[_0x1bf2e0(0x2cc)],_0xc191ed[_0x1bf2e0(0x313)]()[_0x1bf2e0(0x1ea)]());}});await _0x458c1a[_0xa7e472(0x236)]();let _0x550911={'sessionId':_0x3af714,'workbookIdentity':_0x586005,'createdAt':new Date()[_0xa7e472(0x1b4)](),'lastAccessedAt':new Date()[_0xa7e472(0x1b4)](),'runner':_0x458c1a,'paths':_0x2f4a98};return _0x458c1a['on'](_0xa7e472(0x23f),()=>{const _0x41e53d=_0xa7e472;this['logger'][_0x41e53d(0x20c)]({'event_name':_0x378abb[_0x41e53d(0x1c2)],'component':_0x188ced[_0x41e53d(0x290)],'process_role':_0x4721b0[_0x41e53d(0x348)],'fields':{...j(this[_0x41e53d(0x2a0)],_0x3af714),'session_id':_0x3af714,'workbook_identity':_0x586005}}),this['logger'][_0x41e53d(0x211)](),this[_0x41e53d(0x22c)](_0x550911,_0x41e53d(0x2f8));}),this[_0xa7e472(0x221)]['set'](_0x586005,_0x550911),this[_0xa7e472(0x218)][_0xa7e472(0x272)]({'event_name':_0x378abb[_0xa7e472(0x278)],'component':_0x188ced[_0xa7e472(0x320)],'process_role':_0x4721b0['Runtime'],'fields':{...j(this['env'],_0x3af714),'created_at':_0x550911[_0xa7e472(0x284)],'session_id':_0x3af714,'workbook_identity':_0x586005}}),await this[_0xa7e472(0x218)]['flush'](),{'created':!0x0,'session':_0x550911};}async['loadReplayPackIntoSession'](_0x4f5d29,_0x3dee0b){const _0x5c4d28=_0x1539f1;let _0x471170={'baseWorkbookData':_0x3dee0b[_0x5c4d28(0x2a7)],'mutations':_0x3dee0b[_0x5c4d28(0x1c8)]},_0x3ac8af=await _0x4f5d29[_0x5c4d28(0x345)][_0x5c4d28(0x228)]({'jsonrpc':_0x5c4d28(0x343),'id':N(_0x4f5d29[_0x5c4d28(0x207)]),'method':A['LoadWorkbookDataReplayPack'],'params':_0x471170});if(_0x3ac8af[_0x5c4d28(0x2cf)])throw Error(_0x3ac8af[_0x5c4d28(0x2cf)]['message']);return _0x3ac8af[_0x5c4d28(0x2eb)]['workbookData'];}async[_0x1539f1(0x2dc)](_0x19f84b,_0x4a72bb){const _0x570a66=_0x1539f1;_0x19f84b[_0x570a66(0x1b8)]=new Date()[_0x570a66(0x1b4)](),this['logger']['info']({'event_name':_0x378abb[_0x570a66(0x278)],'component':_0x188ced[_0x570a66(0x320)],'process_role':_0x4721b0[_0x570a66(0x348)],'fields':{...j(this['env'],_0x19f84b[_0x570a66(0x207)]),'event':_0x4a72bb,'session_id':_0x19f84b[_0x570a66(0x207)],'timestamp':_0x19f84b[_0x570a66(0x1b8)],'workbook_identity':_0x19f84b[_0x570a66(0x266)]}}),await this['logger'][_0x570a66(0x211)]();}async[_0x1539f1(0x22c)](_0x4018ba,_0x33fc94){const _0x246566=_0x1539f1;this['sessions'][_0x246566(0x240)](_0x4018ba[_0x246566(0x266)])===_0x4018ba&&(this[_0x246566(0x221)]['delete'](_0x4018ba['workbookIdentity']),_0x4018ba[_0x246566(0x345)][_0x246566(0x238)](),this['logger'][_0x246566(0x272)]({'event_name':_0x378abb[_0x246566(0x301)],'component':_0x188ced[_0x246566(0x320)],'process_role':_0x4721b0[_0x246566(0x348)],'fields':{...j(this[_0x246566(0x2a0)],_0x4018ba['sessionId']),'reason':_0x33fc94,'session_id':_0x4018ba[_0x246566(0x207)],'timestamp':new Date()[_0x246566(0x1b4)](),'workbook_identity':_0x4018ba['workbookIdentity']}}),await this[_0x246566(0x218)]['flush']());}[_0x1539f1(0x31a)](_0x19cae4,_0xd8deb6){const _0x1b6d1e=_0x1539f1;return{'sessionId':_0x19cae4[_0x1b6d1e(0x207)],'packageIdentity':_0xd8deb6,'createdAt':_0x19cae4['createdAt'],'lastAccessedAt':_0x19cae4['lastAccessedAt']};}};function vt(_0x636282,_0xb6e676){const _0x2252da=_0x1539f1;let _0x23b0db=_0x636282[_0x2252da(0x227)]?.[_0x2252da(0x1d2)]();if(!_0x23b0db)return _0xb6e676;let _0x557b2f=Number(_0x23b0db);return!Number[_0x2252da(0x2cd)](_0x557b2f)||_0x557b2f<0x0?_0xb6e676:_0x557b2f;}function j(_0x2789b9,_0x5cc6a3){const _0x4b9948=_0x1539f1;return{'deployment.environment.name':_0x4b9948(0x2e8),'distribution.channel':M(_0x2789b9,'UNIVER_DISTRIBUTION_CHANNEL')??_0x4b9948(0x1bd),'service.instance.id':_0x5cc6a3,'service.name':_0x4b9948(0x34e),...M(_0x2789b9,_0x4b9948(0x1f2))===void 0x0?{}:{'build.id':M(_0x2789b9,'UNIVER_CLI_BUILD_ID')},...M(_0x2789b9,_0x4b9948(0x32d))===void 0x0?{}:{'service.version':M(_0x2789b9,_0x4b9948(0x32d))}};}function M(_0x21cb6a,_0x12fbbc){const _0x314ccd=_0x1539f1;let _0x5be8c6=_0x21cb6a[_0x12fbbc]?.['trim']();return _0x5be8c6===void 0x0||_0x5be8c6[_0x314ccd(0x1ee)]===0x0?void 0x0:_0x5be8c6;}function N(_0x5948d3){const _0xd95b34=_0x1539f1;return _0x5948d3+'-'+Date['now']()['toString'](0x24)+'-'+Math[_0xd95b34(0x20e)]()[_0xd95b34(0x313)](0x10)['slice'](0x2,0x8);}function yt(){const _0x553990=_0x1539f1;return _0x553990(0x2a3)+Date[_0x553990(0x1e5)]()['toString'](0x24)+'-'+Math[_0x553990(0x20e)]()[_0x553990(0x313)](0x10)[_0x553990(0x1e6)](0x2,0x8);}function bt(_0x3928c8){const _0x35c94f=_0x1539f1;return _0x2b74e2(import.meta.url)[_0x35c94f(0x25b)](_0x35c94f(0x1d1))?_0x35c94f(0x216):_0x35c94f(0x30d);}function xt(_0x26f52e){return _0x73c0a7(_0x73c0a7(_0x26f52e));}function _0x2f58(_0x591d12,_0x10a569){_0x591d12=_0x591d12-0x1ab;const _0x431d2e=_0x431d();let _0x2f58af=_0x431d2e[_0x591d12];return _0x2f58af;}var St=class{[_0x1539f1(0x326)];['options'];constructor(_0x1e82fd={}){const _0x5716ef=_0x1539f1;this[_0x5716ef(0x326)]=_0x1e82fd[_0x5716ef(0x326)]??{'sessionCreateWorkbook':Je,'sessionDisposeWorkbook':Qe,'sessionEvalJs':Ye,'sessionExportWorkbookData':Xe,'sessionExportWorkbookFile':Ze,'sessionGetWorkbook':qe,'sessionLoadWorkbookDataReplayPack':Ke,'sessionLoadWorkbook':Ge},this[_0x5716ef(0x22b)]=_0x1e82fd[_0x5716ef(0x358)]??{};}async[_0x1539f1(0x273)](_0x591f1e){const _0x5648f0=_0x1539f1;let _0x3d9918=await this[_0x5648f0(0x326)]['sessionCreateWorkbook'](_0x591f1e[_0x5648f0(0x274)]['absolutePath'],{...this[_0x5648f0(0x22b)],..._0x591f1e[_0x5648f0(0x1d4)]===void 0x0?{}:{'cwd':_0x591f1e['cwd']},..._0x591f1e[_0x5648f0(0x1bb)]===void 0x0?{}:{'id':_0x591f1e[_0x5648f0(0x1bb)]},..._0x591f1e['workbookName']===void 0x0?{}:{'name':_0x591f1e[_0x5648f0(0x317)]}});return{'session':P(_0x3d9918[_0x5648f0(0x1ce)],_0x591f1e[_0x5648f0(0x274)]),'workbookData':_0x3d9918[_0x5648f0(0x35c)]};}async[_0x1539f1(0x2a1)](_0x4cb9dd){const _0x22eeaa=_0x1539f1;let _0x2dc207=await this[_0x22eeaa(0x326)]['sessionGetWorkbook'](_0x4cb9dd[_0x22eeaa(0x274)][_0x22eeaa(0x2fe)],{...this[_0x22eeaa(0x22b)],..._0x4cb9dd[_0x22eeaa(0x1d4)]===void 0x0?{}:{'cwd':_0x4cb9dd['cwd']}});return!_0x2dc207[_0x22eeaa(0x329)]||_0x2dc207['session']===null?null:P(_0x2dc207['session'],_0x4cb9dd[_0x22eeaa(0x274)]);}async[_0x1539f1(0x2c0)](_0x4f55b2){const _0x3bd899=_0x1539f1;let _0x2f5db8=await this[_0x3bd899(0x326)][_0x3bd899(0x338)](_0x4f55b2[_0x3bd899(0x274)][_0x3bd899(0x2fe)],_0x4f55b2[_0x3bd899(0x35c)],{...this['options'],..._0x4f55b2['cwd']===void 0x0?{}:{'cwd':_0x4f55b2[_0x3bd899(0x1d4)]}});return{'session':P(_0x2f5db8[_0x3bd899(0x1ce)],_0x4f55b2[_0x3bd899(0x274)]),'workbookData':_0x2f5db8['workbookData']};}async[_0x1539f1(0x2ee)](_0x1a783d){const _0x6f411d=_0x1539f1;let _0x1fc4ab=await this[_0x6f411d(0x326)][_0x6f411d(0x212)](_0x1a783d[_0x6f411d(0x274)][_0x6f411d(0x2fe)],{'baseWorkbookData':_0x1a783d[_0x6f411d(0x1b9)][_0x6f411d(0x2a7)],'mutations':_0x1a783d[_0x6f411d(0x1b9)]['mutations']},{...this[_0x6f411d(0x22b)],..._0x1a783d[_0x6f411d(0x1d4)]===void 0x0?{}:{'cwd':_0x1a783d[_0x6f411d(0x1d4)]}});return{'session':P(_0x1fc4ab['session'],_0x1a783d['identity']),'workbookData':_0x1fc4ab[_0x6f411d(0x35c)]};}async[_0x1539f1(0x1c1)](_0x20b258){const _0x407710=_0x1539f1;let _0x113f6a=await this['getSession'](_0x20b258);if(_0x113f6a!==null)return{'loaded':!0x1,'session':_0x113f6a};let _0x5d8371=await _0x20b258[_0x407710(0x2f1)]();return{'loaded':!0x0,'session':(await this[_0x407710(0x2ee)]({..._0x20b258[_0x407710(0x1d4)]===void 0x0?{}:{'cwd':_0x20b258[_0x407710(0x1d4)]},'identity':_0x20b258[_0x407710(0x274)],'replayPack':_0x5d8371}))[_0x407710(0x1ce)]};}async['evalJs'](_0x3e9b00){const _0x4575e3=_0x1539f1;let _0x59aed3=await this['client'][_0x4575e3(0x29e)](_0x3e9b00['identity'][_0x4575e3(0x2fe)],_0x3e9b00[_0x4575e3(0x21f)],{...this[_0x4575e3(0x22b)],..._0x3e9b00['cwd']===void 0x0?{}:{'cwd':_0x3e9b00[_0x4575e3(0x1d4)]},..._0x3e9b00['mutates']===void 0x0?{}:{'mutates':_0x3e9b00['mutates']}});return{..._0x59aed3[_0x4575e3(0x1c8)]===void 0x0?{}:{'mutations':_0x59aed3[_0x4575e3(0x1c8)]},'session':P(_0x59aed3[_0x4575e3(0x1ce)],_0x3e9b00[_0x4575e3(0x274)]),'value':_0x59aed3[_0x4575e3(0x2f2)]};}async['exportWorkbookData'](_0x28f9c5){const _0x118f0c=_0x1539f1;let _0x3e54de=await this[_0x118f0c(0x326)][_0x118f0c(0x1ba)](_0x28f9c5[_0x118f0c(0x274)]['absolutePath'],{...this[_0x118f0c(0x22b)],..._0x28f9c5[_0x118f0c(0x1d4)]===void 0x0?{}:{'cwd':_0x28f9c5['cwd']}});return{'session':P(_0x3e54de[_0x118f0c(0x1ce)],_0x28f9c5[_0x118f0c(0x274)]),'workbookData':_0x3e54de[_0x118f0c(0x35c)]};}async[_0x1539f1(0x31d)](_0x1a8397){const _0x26670d=_0x1539f1;let _0x3175ac=await this[_0x26670d(0x326)][_0x26670d(0x249)](_0x1a8397[_0x26670d(0x274)]['absolutePath'],{'format':_0x1a8397[_0x26670d(0x21a)],'outputPath':_0x1a8397[_0x26670d(0x2b4)]},{...this['options'],..._0x1a8397[_0x26670d(0x1d4)]===void 0x0?{}:{'cwd':_0x1a8397[_0x26670d(0x1d4)]}});return{'format':_0x3175ac[_0x26670d(0x21a)],'outputPath':_0x3175ac[_0x26670d(0x2b4)],'session':P(_0x3175ac['session'],_0x1a8397[_0x26670d(0x274)]),'sizeBytes':_0x3175ac['sizeBytes']};}async[_0x1539f1(0x347)](_0x490ec8){const _0x35bc52=_0x1539f1;await this[_0x35bc52(0x326)][_0x35bc52(0x295)](_0x490ec8['identity'][_0x35bc52(0x2fe)],{...this[_0x35bc52(0x22b)],..._0x490ec8[_0x35bc52(0x1d4)]===void 0x0?{}:{'cwd':_0x490ec8[_0x35bc52(0x1d4)]}});}};function P(_0x3bebcb,_0x1eb0b7){const _0x4cc327=_0x1539f1;return{'createdAt':_0x3bebcb[_0x4cc327(0x284)],'lastAccessedAt':_0x3bebcb[_0x4cc327(0x1b8)],'packageIdentity':_0x1eb0b7,'sessionId':_0x3bebcb[_0x4cc327(0x207)]};}var F=class extends Error{[_0x1539f1(0x21f)];constructor(_0x49f7fd,_0x46d49a,_0x4d3114){const _0x4f25a3=_0x1539f1;super(_0x46d49a,_0x4d3114),this[_0x4f25a3(0x285)]=_0x4f25a3(0x2a6),this[_0x4f25a3(0x21f)]=_0x49f7fd;}},Ct=class extends F{constructor(_0x367474){const _0x323e3d=_0x1539f1;super('ERR_INVALID_WORKBOOK_PACKAGE_PATH',_0x323e3d(0x34f)+_0x367474),this[_0x323e3d(0x285)]=_0x323e3d(0x205);}},wt=class extends F{constructor(_0x467a70){const _0x2fc515=_0x1539f1;super(_0x2fc515(0x1b5),_0x2fc515(0x271)+_0x467a70),this['name']='WorkbookPackageFileMissingError';}},I=class extends F{constructor(_0x5ebdee,_0x2cd308,_0x266f53){const _0x4319b4=_0x1539f1;super(_0x4319b4(0x27f),'Invalid\x20workbook\x20package\x20file\x20'+_0x5ebdee+':\x20'+_0x2cd308,_0x266f53),this[_0x4319b4(0x285)]='WorkbookPackageFileInvalidError';}},Tt=class extends F{constructor(_0x83d36c,_0xd2a8e6,_0x25142e){const _0x122f95=_0x1539f1;super(_0x122f95(0x261),_0x122f95(0x1f6)+_0x83d36c+':\x20'+_0xd2a8e6,_0x25142e),this[_0x122f95(0x285)]=_0x122f95(0x201);}},Et=class extends F{constructor(_0x11eb68){const _0x2cbf8c=_0x1539f1;super(_0x2cbf8c(0x1af),_0x2cbf8c(0x33c)+_0x11eb68),this[_0x2cbf8c(0x285)]='WorkbookPackageAlreadyExistsError';}},Dt=class extends F{constructor(_0x2b9c74,_0x3f8eb7){const _0x33bec8=_0x1539f1;super(_0x33bec8(0x34a),_0x3f8eb7===null?_0x33bec8(0x20a)+_0x2b9c74:'Workbook\x20package\x20is\x20busy:\x20'+_0x2b9c74+'\x20is\x20being\x20modified\x20by\x20operation\x20'+_0x3f8eb7[_0x33bec8(0x235)]+'\x20(pid\x20'+_0x3f8eb7[_0x33bec8(0x268)]+_0x33bec8(0x2a5)+_0x3f8eb7['hostname']+')'),this[_0x33bec8(0x230)]=_0x3f8eb7,this[_0x33bec8(0x285)]=_0x33bec8(0x1ef);}};function Ot(_0x5371e1={}){const _0xa2b5c1=_0x1539f1;return{'unitID':_0x5371e1['unitID']??null,'initRev':_0x5371e1[_0xa2b5c1(0x286)]??null,'syncedRev':_0x5371e1[_0xa2b5c1(0x2e5)]??null};}function kt(_0x4811ae,_0x3e419c){const _0x53e2f9=_0x1539f1;if(!At(_0x4811ae))throw new I(_0x3e419c,_0x53e2f9(0x1ad));let _0x4c4e95=_0x4811ae[_0x53e2f9(0x2df)],_0x1a0b12=_0x4811ae[_0x53e2f9(0x286)],_0x1684e2=_0x4811ae[_0x53e2f9(0x2e5)];if(_0x4c4e95!==null&&typeof _0x4c4e95!=_0x53e2f9(0x1ff))throw new I(_0x3e419c,_0x53e2f9(0x209));if(_0x1a0b12!==null&&!jt(_0x1a0b12))throw new I(_0x3e419c,_0x53e2f9(0x1d8));if(_0x1684e2!==null&&!jt(_0x1684e2))throw new I(_0x3e419c,_0x53e2f9(0x319));return{'unitID':_0x4c4e95,'initRev':_0x1a0b12,'syncedRev':_0x1684e2};}function At(_0x3c0ba0){const _0x1dccaf=_0x1539f1;return typeof _0x3c0ba0==_0x1dccaf(0x33e)&&!!_0x3c0ba0&&!Array[_0x1dccaf(0x237)](_0x3c0ba0);}function jt(_0x1f6449){const _0x6a287d=_0x1539f1;return typeof _0x1f6449==_0x6a287d(0x2c5)&&Number[_0x6a287d(0x29a)](_0x1f6449)&&_0x1f6449>=0x0;}function L(_0x1d9a88,_0x40bb74){const _0x32020f=_0x1539f1;if(!Mt(_0x1d9a88))throw new I(_0x40bb74,_0x32020f(0x1b7));if(typeof _0x1d9a88['id']!=_0x32020f(0x1ff)||_0x1d9a88['id'][_0x32020f(0x1ee)]===0x0)throw new I(_0x40bb74,_0x32020f(0x21c));if(!Mt(_0x1d9a88[_0x32020f(0x2ed)]))throw new I(_0x40bb74,_0x32020f(0x214));return _0x1d9a88;}function Mt(_0x27fd7e){const _0x162b36=_0x1539f1;return typeof _0x27fd7e==_0x162b36(0x33e)&&!!_0x27fd7e&&!Array[_0x162b36(0x237)](_0x27fd7e);}function Nt(_0x4422e4,_0x1870e4){const _0x5c9c19=_0x1539f1;let _0x52ac89=Ft(_0x4422e4,_0x1870e4,_0x5c9c19(0x2c8)),_0x254929=Lt(_0x52ac89['sid'],_0x1870e4,_0x5c9c19(0x2c8)),_0x574e6f=Rt(_0x52ac89[_0x5c9c19(0x2d2)],_0x1870e4,_0x5c9c19(0x2c8)),_0x1b523d=_0x52ac89['message'],_0x3d740c=_0x52ac89[_0x5c9c19(0x1c8)];if(typeof _0x1b523d!=_0x5c9c19(0x1ff))throw new I(_0x1870e4,_0x5c9c19(0x293));if(!Array[_0x5c9c19(0x237)](_0x3d740c))throw new I(_0x1870e4,_0x5c9c19(0x246));return{'sid':_0x254929,'reqId':_0x574e6f,'message':_0x1b523d,'mutations':_0x3d740c[_0x5c9c19(0x2db)]((_0x34a0b0,_0x5d12e7)=>L(_0x34a0b0,_0x1870e4+'.mutations['+_0x5d12e7+']'))};}function Pt(_0x2d6173,_0xc68739){const _0xda889f=_0x1539f1;let _0xc8b28=Ft(_0x2d6173,_0xc68739,'synced\x20changeset'),_0x57b60f=Lt(_0xc8b28[_0xda889f(0x2b5)],_0xc68739,_0xda889f(0x219)),_0x3feed2=Rt(_0xc8b28['reqId'],_0xc68739,'synced\x20changeset'),_0x39631e=_0xc8b28[_0xda889f(0x1cb)],_0x3eea93=_0xc8b28['revision'],_0x4470aa=_0xc8b28[_0xda889f(0x1c8)],_0x1ebdb4=_0xc8b28[_0xda889f(0x327)];if(!It(_0x39631e))throw new I(_0xc68739,'synced\x20changeset.baseRev\x20must\x20be\x20a\x20non-negative\x20integer');if(!It(_0x3eea93))throw new I(_0xc68739,'synced\x20changeset.revision\x20must\x20be\x20a\x20non-negative\x20integer');if(!Array[_0xda889f(0x237)](_0x4470aa))throw new I(_0xc68739,_0xda889f(0x1da));if(_0x1ebdb4!==void 0x0&&typeof _0x1ebdb4!=_0xda889f(0x1ff))throw new I(_0xc68739,_0xda889f(0x1c9));return{'sid':_0x57b60f,'reqId':_0x3feed2,'baseRev':_0x39631e,'revision':_0x3eea93,'mutations':_0x4470aa[_0xda889f(0x2db)]((_0x2ab888,_0x3375d8)=>L(_0x2ab888,_0xc68739+_0xda889f(0x353)+_0x3375d8+']')),..._0x1ebdb4===void 0x0?{}:{'message':_0x1ebdb4}};}function Ft(_0x2dad73,_0x32a1c7,_0x38d647){const _0x323862=_0x1539f1;if(typeof _0x2dad73!=_0x323862(0x33e)||!_0x2dad73||Array[_0x323862(0x237)](_0x2dad73))throw new I(_0x32a1c7,_0x38d647+_0x323862(0x2d0));return _0x2dad73;}function It(_0x2cfe36){const _0x1c4ec6=_0x1539f1;return typeof _0x2cfe36==_0x1c4ec6(0x2c5)&&Number[_0x1c4ec6(0x29a)](_0x2cfe36)&&_0x2cfe36>=0x0;}function Lt(_0x161788,_0x1bd3c0,_0x18603b){const _0x5e2bcc=_0x1539f1;if(typeof _0x161788!=_0x5e2bcc(0x1ff)||_0x161788[_0x5e2bcc(0x1ee)]===0x0)throw new I(_0x1bd3c0,_0x18603b+_0x5e2bcc(0x29c));return _0x161788;}function Rt(_0x5586dd,_0x52e68b,_0x3ee36b){const _0xe8f38c=_0x1539f1;if(typeof _0x5586dd!=_0xe8f38c(0x2c5)||!Number['isInteger'](_0x5586dd)||_0x5586dd<0x1)throw new I(_0x52e68b,_0x3ee36b+'.reqId\x20must\x20be\x20a\x20positive\x20integer');return _0x5586dd;}const zt=[_0x1539f1(0x1f7),_0x1539f1(0x2be)];var Bt=class e{constructor(_0x387a79){const _0x36bdb5=_0x1539f1;this[_0x36bdb5(0x2f2)]=_0x387a79;}static[_0x1539f1(0x299)](_0x41d5b2){const _0x300ed9=_0x1539f1;let _0xdce164=_0x41d5b2[_0x300ed9(0x1d2)]();if(_0xdce164[_0x300ed9(0x1ee)]===0x0||!Vt(_0x204563(_0xdce164)))throw new Ct(_0x41d5b2);return new e(_0xdce164);}get[_0x1539f1(0x2c6)](){const _0x4879de=_0x1539f1;return _0x204563(this[_0x4879de(0x2f2)]);}};function Vt(_0x3f8a72){const _0x56b0a3=_0x1539f1;return zt[_0x56b0a3(0x23d)](_0x3f8a72);}var Ht=class e{['absolutePath'];constructor(_0xf9287){const _0x41e16e=_0x1539f1;this[_0x41e16e(0x2fe)]=_0xf9287[_0x41e16e(0x2fe)];}static[_0x1539f1(0x232)](_0x560c0d){const _0x407d89=_0x1539f1;let _0x525eb1=_0x48276b(_0x560c0d),_0x227ac8=Bt[_0x407d89(0x299)](_0x525eb1);if(_0x525eb1!==_0x560c0d||!Vt(_0x227ac8[_0x407d89(0x2c6)]))throw new Ct(_0x560c0d);return new e({'absolutePath':_0x525eb1});}},R=_0x1539f1(0x2cb),z=_0x1539f1(0x29d),B='local-mutations.jsonl',V=_0x1539f1(0x2ef),H=_0x1539f1(0x1ec),Ut=class{constructor(_0x4141c5={}){this['options']=_0x4141c5;}async[_0x1539f1(0x247)](_0x10773e){const _0x2a604e=_0x1539f1;let _0x237f58=Bt[_0x2a604e(0x299)](_0x10773e['workbookPath']);return Ht[_0x2a604e(0x232)](_0x48276b(_0x10773e[_0x2a604e(0x1d4)]??process[_0x2a604e(0x1d4)](),_0x237f58[_0x2a604e(0x2f2)]));}async['initialize'](_0x1211f8){const _0x45fd4b=_0x1539f1;return await U(_0x1211f8[_0x45fd4b(0x274)],_0x45fd4b(0x35a),this[_0x45fd4b(0x22b)],async()=>{const _0x4ff280=_0x45fd4b;let _0x3b983b=Ot(_0x1211f8['manifest']),_0xe57a9c=new G(_0x1211f8['identity'],this[_0x4ff280(0x22b)],{'lockWrites':!0x1});return await Wt(_0x1211f8[_0x4ff280(0x274)]),await _0xf0d57(_0x1211f8['identity'][_0x4ff280(0x2fe)],{'recursive':!0x0}),await Promise[_0x4ff280(0x2d1)]([_0xe57a9c[_0x4ff280(0x344)](_0x3b983b),_0xe57a9c[_0x4ff280(0x2b1)](_0x1211f8[_0x4ff280(0x270)]),_0xe57a9c[_0x4ff280(0x1fb)]([]),_0xe57a9c['replaceLocalChangesets']([]),_0xe57a9c[_0x4ff280(0x2a8)](_0x1211f8[_0x4ff280(0x359)]??[])]),new G(_0x1211f8['identity'],this[_0x4ff280(0x22b)]);});}async[_0x1539f1(0x321)](_0x1b8423){const _0x221789=_0x1539f1;return new G(_0x1b8423,this[_0x221789(0x22b)]);}async[_0x1539f1(0x276)](_0x4e5d97,_0x61e44){const _0x420a14=_0x1539f1;return await U(_0x4e5d97,_0x420a14(0x276),this[_0x420a14(0x22b)],async()=>{const _0x5113b2=_0x420a14;let _0x367712=new Zt(new G(_0x4e5d97,this[_0x5113b2(0x22b)],{'lockWrites':!0x1}));try{let _0x2f740c=await _0x61e44(_0x367712);return await tn(_0x4e5d97,_0x367712[_0x5113b2(0x1b2)](),this['options']),_0x2f740c;}catch(_0x169e08){throw new Tt(_0x4e5d97['absolutePath'],_0x169e08 instanceof Error?_0x169e08[_0x5113b2(0x327)]:String(_0x169e08),_0x169e08 instanceof Error?{'cause':_0x169e08}:void 0x0);}});}};async function Wt(_0x430d30){const _0x57f031=_0x1539f1;try{if(!(await _0x1e846a(_0x430d30[_0x57f031(0x2fe)]))[_0x57f031(0x2fd)]()||(await _0x2ff29b(_0x430d30['absolutePath']))[_0x57f031(0x1ee)]>0x0)throw new Et(_0x430d30[_0x57f031(0x2fe)]);}catch(_0x3c022c){if(Q(_0x3c022c)&&_0x3c022c['code']==='ENOENT')return;throw _0x3c022c;}}async function U(_0x3d7294,_0x785395,_0x18362a,_0x4b4842){await Gt(_0x3d7294,_0x785395,_0x18362a);try{return await _0x4b4842();}finally{await Yt(_0x3d7294);}}async function Gt(_0x5441eb,_0x7655af,_0x1ad840){const _0x3e186b=_0x1539f1;let _0x59f962=_0x1ad840[_0x3e186b(0x24b)]??0x1388,_0x3f0c58=_0x1ad840[_0x3e186b(0x2e9)]??0x32,_0x49424f=Date[_0x3e186b(0x1e5)](),_0x14c0d8=null;for(await _0xf0d57(_0x73c0a7(W(_0x5441eb)),{'recursive':!0x0});;){try{await _0x6c3ba4(W(_0x5441eb),Y({'pid':process[_0x3e186b(0x268)],'hostname':_0x258e12(),'createdAt':new Date()[_0x3e186b(0x1b4)](),'operation':_0x7655af}),{'encoding':_0x3e186b(0x328),'flag':'wx'});return;}catch(_0x46f81b){if(!Q(_0x46f81b)||_0x46f81b[_0x3e186b(0x21f)]!=='EEXIST')throw _0x46f81b;}let _0x1a4b5f=await Kt(_0x5441eb,_0x1ad840);if(_0x14c0d8=_0x1a4b5f[_0x3e186b(0x230)],!_0x1a4b5f[_0x3e186b(0x1c6)]){if(Date[_0x3e186b(0x1e5)]()-_0x49424f>=_0x59f962)throw new Dt(_0x5441eb[_0x3e186b(0x2fe)],_0x14c0d8);await Xt(Math['min'](_0x3f0c58,Math['max'](_0x59f962-(Date[_0x3e186b(0x1e5)]()-_0x49424f),0x0)));}}}async function Kt(_0x451dcd,_0x547d15){const _0x27d26f=_0x1539f1;let _0x4f365b=await qt(_0x451dcd);return _0x4f365b===null||_0x4f365b['hostname']!==_0x258e12()||Jt(_0x4f365b[_0x27d26f(0x268)],_0x547d15)?{'holder':_0x4f365b,'removed':!0x1}:(await Yt(_0x451dcd),{'holder':_0x4f365b,'removed':!0x0});}async function qt(_0x2361f9){const _0x39512e=_0x1539f1;try{let _0x50bf3c=JSON['parse'](await _0x5b8678(W(_0x2361f9),_0x39512e(0x328)));if(!on(_0x50bf3c))return null;let _0x2264db=_0x50bf3c[_0x39512e(0x268)],_0x3847f0=_0x50bf3c[_0x39512e(0x27d)],_0x1abc87=_0x50bf3c['createdAt'],_0x46cdbd=_0x50bf3c['operation'];return typeof _0x2264db!='number'||!Number['isInteger'](_0x2264db)||typeof _0x3847f0!='string'||typeof _0x1abc87!=_0x39512e(0x1ff)||typeof _0x46cdbd!=_0x39512e(0x1ff)?null:{'pid':_0x2264db,'hostname':_0x3847f0,'createdAt':_0x1abc87,'operation':_0x46cdbd};}catch{return null;}}function Jt(_0x47d3bf,_0x2c1b21){const _0x5c81fe=_0x1539f1;if(_0x2c1b21[_0x5c81fe(0x2c4)]!==void 0x0)return _0x2c1b21['isProcessAlive'](_0x47d3bf);try{return process[_0x5c81fe(0x241)](_0x47d3bf,0x0),!0x0;}catch{return!0x1;}}async function Yt(_0x164335){const _0x120500=_0x1539f1;await _0x2dcc20(W(_0x164335),{'force':!0x0})[_0x120500(0x26b)](()=>void 0x0);}function W(_0x3950e7){const _0x3338b2=_0x1539f1;return _0x3950e7[_0x3338b2(0x2fe)]+_0x3338b2(0x213);}async function Xt(_0xacd683){_0xacd683<=0x0||await new Promise(_0xafc3fe=>{setTimeout(_0xafc3fe,_0xacd683);});}var G=class{constructor(_0x5f2f87,_0x47b884,_0x1b8fb5={'lockWrites':!0x0}){const _0x1b9a40=_0x1539f1;this['identity']=_0x5f2f87,this[_0x1b9a40(0x22b)]=_0x47b884,this[_0x1b9a40(0x2ea)]=_0x1b8fb5;}async[_0x1539f1(0x233)](){const _0x5058e7=_0x1539f1;return await Qt(this[_0x5058e7(0x274)],R,(_0x590ceb,_0x33131c)=>kt(_0x590ceb,_0x33131c));}async[_0x1539f1(0x344)](_0x2308d5){const _0x53c785=_0x1539f1;await this['write']('set-manifest',()=>J(this[_0x53c785(0x274)],R,Y(_0x2308d5)));}async[_0x1539f1(0x292)](){const _0x2e5d18=_0x1539f1;return await Qt(this[_0x2e5d18(0x274)],z,en);}async['setInitWorkbookData'](_0x74e9c7){const _0x2bd0d2=_0x1539f1;await this[_0x2bd0d2(0x1d0)]('set-init-workbook-data',()=>J(this[_0x2bd0d2(0x274)],z,Y(_0x74e9c7)));}async[_0x1539f1(0x27c)](){const _0x7c4e0b=_0x1539f1;return await K(this[_0x7c4e0b(0x274)],B,L);}async[_0x1539f1(0x2e7)](_0x5168eb){const _0x522a2b=_0x1539f1;_0x5168eb[_0x522a2b(0x1ee)]!==0x0&&await this['write']('append-local-mutations',()=>rn(this['identity'],B,X(_0x5168eb)));}async[_0x1539f1(0x1fb)](_0x3a54c2){const _0x5dc70c=_0x1539f1;await this[_0x5dc70c(0x1d0)]('replace-local-mutations',()=>J(this['identity'],B,X(_0x3a54c2)));}async[_0x1539f1(0x2b3)](){const _0x4b767b=_0x1539f1;return await K(this[_0x4b767b(0x274)],V,Nt);}async[_0x1539f1(0x288)](_0x2c6879){const _0x383131=_0x1539f1;await this[_0x383131(0x1d0)](_0x383131(0x32e),()=>rn(this[_0x383131(0x274)],V,X([_0x2c6879])));}async['replaceLocalChangesets'](_0x55d994){const _0x3be3e4=_0x1539f1;await this[_0x3be3e4(0x1d0)](_0x3be3e4(0x23e),()=>J(this[_0x3be3e4(0x274)],V,X(_0x55d994)));}async[_0x1539f1(0x2ec)](){const _0x242e7d=_0x1539f1;return await K(this[_0x242e7d(0x274)],H,Pt);}async[_0x1539f1(0x2fb)](_0x3519c8){const _0x1c9863=_0x1539f1;_0x3519c8[_0x1c9863(0x1ee)]!==0x0&&await this[_0x1c9863(0x1d0)]('append-synced-changesets',()=>rn(this[_0x1c9863(0x274)],H,X(_0x3519c8)));}async['replaceSyncedChangesets'](_0x3e1d26){const _0x2dcd43=_0x1539f1;await this[_0x2dcd43(0x1d0)](_0x2dcd43(0x25a),()=>J(this[_0x2dcd43(0x274)],H,X(_0x3e1d26)));}async[_0x1539f1(0x1d0)](_0x2ec47c,_0x420f95){const _0x305eef=_0x1539f1;if(!this[_0x305eef(0x2ea)]['lockWrites']){await _0x420f95();return;}await U(this['identity'],_0x2ec47c,this[_0x305eef(0x22b)],_0x420f95);}},Zt=class{[_0x1539f1(0x274)];[_0x1539f1(0x33a)]=new Set();[_0x1539f1(0x270)];[_0x1539f1(0x275)];['localMutations'];[_0x1539f1(0x1e9)];[_0x1539f1(0x359)];constructor(_0x144c10){const _0x36abe7=_0x1539f1;this['basePackage']=_0x144c10,this[_0x36abe7(0x274)]=_0x144c10['identity'];}async['getManifest'](){const _0x4ce8f6=_0x1539f1;return this[_0x4ce8f6(0x1e9)]??=await this[_0x4ce8f6(0x254)][_0x4ce8f6(0x233)](),this[_0x4ce8f6(0x1e9)];}async[_0x1539f1(0x344)](_0x48f92){const _0x2b405c=_0x1539f1;this[_0x2b405c(0x1e9)]=_0x48f92,this[_0x2b405c(0x33a)][_0x2b405c(0x352)](_0x2b405c(0x1e9));}async[_0x1539f1(0x292)](){const _0x5bed40=_0x1539f1;return this[_0x5bed40(0x270)]??=await this[_0x5bed40(0x254)]['getInitWorkbookData'](),this[_0x5bed40(0x270)];}async['setInitWorkbookData'](_0x3af12e){const _0x3faaa6=_0x1539f1;this[_0x3faaa6(0x270)]=_0x3af12e,this[_0x3faaa6(0x33a)][_0x3faaa6(0x352)](_0x3faaa6(0x270));}async['getLocalMutations'](){const _0xe2b2b0=_0x1539f1;return this[_0xe2b2b0(0x323)]??=await this[_0xe2b2b0(0x254)][_0xe2b2b0(0x27c)](),this[_0xe2b2b0(0x323)];}async[_0x1539f1(0x2e7)](_0x568228){const _0x5432f0=_0x1539f1;_0x568228[_0x5432f0(0x1ee)]!==0x0&&(this[_0x5432f0(0x323)]=[...await this[_0x5432f0(0x27c)](),..._0x568228],this[_0x5432f0(0x33a)]['add']('localMutations'));}async[_0x1539f1(0x1fb)](_0x38da18){const _0x2bba06=_0x1539f1;this[_0x2bba06(0x323)]=[..._0x38da18],this[_0x2bba06(0x33a)][_0x2bba06(0x352)](_0x2bba06(0x323));}async['getLocalChangesets'](){const _0x1d131e=_0x1539f1;return this['localChangesets']??=await this[_0x1d131e(0x254)][_0x1d131e(0x2b3)](),this[_0x1d131e(0x275)];}async[_0x1539f1(0x288)](_0x396061){const _0x3db2cf=_0x1539f1;this[_0x3db2cf(0x275)]=[...await this[_0x3db2cf(0x2b3)](),_0x396061],this[_0x3db2cf(0x33a)][_0x3db2cf(0x352)](_0x3db2cf(0x275));}async[_0x1539f1(0x2b0)](_0x2b0d58){const _0x19bd77=_0x1539f1;this[_0x19bd77(0x275)]=[..._0x2b0d58],this['touchedFiles'][_0x19bd77(0x352)](_0x19bd77(0x275));}async[_0x1539f1(0x2ec)](){const _0x4a387e=_0x1539f1;return this['syncedChangesets']??=await this[_0x4a387e(0x254)][_0x4a387e(0x2ec)](),this[_0x4a387e(0x359)];}async['appendSyncedChangesets'](_0x4af787){const _0x398cb5=_0x1539f1;_0x4af787[_0x398cb5(0x1ee)]!==0x0&&(this[_0x398cb5(0x359)]=[...await this['getSyncedChangesets'](),..._0x4af787],this[_0x398cb5(0x33a)][_0x398cb5(0x352)](_0x398cb5(0x359)));}async['replaceSyncedChangesets'](_0x32db93){const _0x2607c9=_0x1539f1;this['syncedChangesets']=[..._0x32db93],this[_0x2607c9(0x33a)][_0x2607c9(0x352)](_0x2607c9(0x359));}[_0x1539f1(0x1b2)](){const _0xee92f0=_0x1539f1;let _0x24cce0=new Map();for(let _0x1934e8 of this[_0xee92f0(0x33a)])_0x24cce0[_0xee92f0(0x336)](an(_0x1934e8),this[_0xee92f0(0x269)](_0x1934e8));return _0x24cce0;}['serializeTouchedFile'](_0x3a86e6){const _0x2a3f8d=_0x1539f1;switch(_0x3a86e6){case'manifest':return Y(Z(this[_0x2a3f8d(0x1e9)],_0x3a86e6));case _0x2a3f8d(0x270):return Y(Z(this[_0x2a3f8d(0x270)],_0x3a86e6));case _0x2a3f8d(0x323):return X(Z(this[_0x2a3f8d(0x323)],_0x3a86e6));case'localChangesets':return X(Z(this[_0x2a3f8d(0x275)],_0x3a86e6));case _0x2a3f8d(0x359):return X(Z(this[_0x2a3f8d(0x359)],_0x3a86e6));}}};async function Qt(_0x11f54a,_0x393ec0,_0x5acc6f){const _0x1bf1c1=_0x1539f1;let _0x12023f=_0x5a76fb(_0x11f54a[_0x1bf1c1(0x2fe)],_0x393ec0),_0x354247=await q(_0x12023f),_0x38dcb6;try{_0x38dcb6=JSON[_0x1bf1c1(0x299)](_0x354247);}catch(_0x5ca063){throw new I(_0x12023f,_0x5ca063 instanceof Error?_0x5ca063[_0x1bf1c1(0x327)]:String(_0x5ca063),_0x5ca063 instanceof Error?{'cause':_0x5ca063}:void 0x0);}return _0x5acc6f(_0x38dcb6,_0x12023f);}async function K(_0x445324,_0x4436b9,_0x36d854){const _0x3f4167=_0x1539f1;return(await $t(_0x445324,_0x4436b9))[_0x3f4167(0x2db)](({value:_0x44d406,label:_0x39f839})=>_0x36d854(_0x44d406,_0x39f839));}async function $t(_0x3b54f0,_0x558aaa){const _0x690f99=_0x1539f1;let _0x4fb76f=_0x5a76fb(_0x3b54f0[_0x690f99(0x2fe)],_0x558aaa),_0x4c1b63=(await q(_0x4fb76f))[_0x690f99(0x1d2)]();return _0x4c1b63['length']===0x0?[]:_0x4c1b63[_0x690f99(0x215)](/\r?\n/u)[_0x690f99(0x2db)]((_0x595f9a,_0x3af8e0)=>{const _0x532e5e=_0x690f99;let _0x406b95;try{_0x406b95=JSON[_0x532e5e(0x299)](_0x595f9a);}catch(_0x5727d8){throw new I(_0x4fb76f,'invalid\x20JSONL\x20at\x20line\x20'+(_0x3af8e0+0x1)+':\x20'+(_0x5727d8 instanceof Error?_0x5727d8[_0x532e5e(0x327)]:String(_0x5727d8)),_0x5727d8 instanceof Error?{'cause':_0x5727d8}:void 0x0);}return{'value':_0x406b95,'label':_0x4fb76f+':'+(_0x3af8e0+0x1)};});}async function q(_0x285365){const _0x111d85=_0x1539f1;try{if(!(await _0x1e846a(_0x285365))[_0x111d85(0x2c7)]())throw new wt(_0x285365);return await _0x5b8678(_0x285365,_0x111d85(0x328));}catch(_0x40065c){throw Q(_0x40065c)&&_0x40065c[_0x111d85(0x21f)]===_0x111d85(0x304)?new wt(_0x285365):_0x40065c;}}function en(_0x1db0eb,_0x16d6f3){const _0x404d27=_0x1539f1;if(typeof _0x1db0eb!=_0x404d27(0x33e)||!_0x1db0eb||Array[_0x404d27(0x237)](_0x1db0eb))throw new I(_0x16d6f3,_0x404d27(0x2f4));return _0x1db0eb;}async function tn(_0x36518b,_0x370304,_0x1fad89){const _0x29fb08=_0x1539f1;if(_0x370304[_0x29fb08(0x1cc)]===0x0)return;let _0x509009=_0x36518b[_0x29fb08(0x2fe)]+_0x29fb08(0x257)+process[_0x29fb08(0x268)]+'-'+_0x3bdc2d(),_0x2a2272=await Promise[_0x29fb08(0x2d1)]([..._0x370304[_0x29fb08(0x33f)]()][_0x29fb08(0x2db)](async _0x3ea857=>({'relativePath':_0x3ea857,'originalContent':await q(_0x5a76fb(_0x36518b[_0x29fb08(0x2fe)],_0x3ea857))})));await _0xf0d57(_0x509009,{'recursive':!0x0}),await nn(_0x509009,{'state':_0x29fb08(0x349),'files':_0x2a2272});try{for(let [_0x2e0fe4,_0x259f77]of _0x370304)await _0x1fad89[_0x29fb08(0x243)]?.(_0x2e0fe4),await J(_0x36518b,_0x2e0fe4,_0x259f77);await nn(_0x509009,{'state':_0x29fb08(0x2f0),'files':_0x2a2272});}catch(_0x25fc1a){try{for(let _0x8685fc of _0x2a2272)await J(_0x36518b,_0x8685fc[_0x29fb08(0x2d8)],_0x8685fc[_0x29fb08(0x2e3)]);await nn(_0x509009,{'state':_0x29fb08(0x315),'files':_0x2a2272});}catch(_0x5f1bbb){throw Error((_0x25fc1a instanceof Error?_0x25fc1a[_0x29fb08(0x327)]:String(_0x25fc1a))+_0x29fb08(0x2ba)+(_0x5f1bbb instanceof Error?_0x5f1bbb['message']:String(_0x5f1bbb)),_0x25fc1a instanceof Error?{'cause':_0x25fc1a}:void 0x0);}throw _0x25fc1a;}finally{await _0x2dcc20(_0x509009,{'recursive':!0x0,'force':!0x0})[_0x29fb08(0x26b)](()=>void 0x0);}}async function nn(_0x5408d9,_0x53269a){const _0x31a450=_0x1539f1;await _0x6c3ba4(_0x5a76fb(_0x5408d9,_0x31a450(0x2c9)),Y(_0x53269a),_0x31a450(0x328));}async function rn(_0x3e266b,_0x58769b,_0x5297d3){const _0x5d6018=_0x1539f1;await _0xf0d57(_0x3e266b[_0x5d6018(0x2fe)],{'recursive':!0x0}),await _0x459368(_0x5a76fb(_0x3e266b[_0x5d6018(0x2fe)],_0x58769b),_0x5297d3,_0x5d6018(0x328));}async function J(_0x293580,_0x377a3e,_0x3c1ef5){const _0x402759=_0x1539f1;let _0x1ab40d=_0x5a76fb(_0x293580[_0x402759(0x2fe)],_0x377a3e),_0x218a09=_0x1ab40d+'.tmp-'+process['pid']+'-'+_0x3bdc2d();try{await _0xf0d57(_0x73c0a7(_0x1ab40d),{'recursive':!0x0}),await _0x6c3ba4(_0x218a09,_0x3c1ef5,_0x402759(0x328)),await _0x4a0359(_0x218a09,_0x1ab40d);}finally{await _0x2dcc20(_0x218a09,{'force':!0x0})[_0x402759(0x26b)](()=>void 0x0);}}function an(_0x1e70a6){const _0x166e2a=_0x1539f1;switch(_0x1e70a6){case _0x166e2a(0x1e9):return R;case _0x166e2a(0x270):return z;case _0x166e2a(0x323):return B;case _0x166e2a(0x275):return V;case _0x166e2a(0x359):return H;}}function Y(_0x1137b4){const _0x1a3b1f=_0x1539f1;return JSON[_0x1a3b1f(0x2c2)](_0x1137b4)+'\x0a';}function _0x431d(){const _0x5c1998=['onStderrChunk','SessionEvalJs','startsWith','evaljs','basePackage','ExportWorkbookFile','logs','.tx-','univer\x20daemon\x20stop','daemonDir','replace-synced-changesets','endsWith','F_OK','eval-js','destroyGraceMs','mutates','once','ERR_WORKBOOK_PACKAGE_TRANSACTION_FAILED','values','timeoutMs','load-workbook','cli.js','workbookIdentity','end','pid','serializeTouchedFile','buildId','catch','view-host','16945pblnYh','resolveWorkbookIdentity','runtimeRoot','initWorkbookData','Missing\x20workbook\x20package\x20file:\x20','info','createWorkbook','identity','localChangesets','transaction','child','RuntimeSessionCreated','resolveExecutionPlaneOptions','meta','drain','getLocalMutations','hostname','rotationCheckIntervalMs','ERR_WORKBOOK_PACKAGE_FILE_INVALID','fromEntries','univer','view-host.jsonl','sizeBytes','createdAt','name','initRev','execArgv','appendLocalChangeset','indexOf','.\x20Run\x20`univer\x20daemon\x20stop`\x20and\x20retry.','univer-','clear\x20stale\x20daemon\x20runtime\x20files','idle-unload','daemon.shutdown','univer\x20daemon\x20start','RuntimeRunner','SessionLoadWorkbook','getInitWorkbookData','local\x20changeset.message\x20must\x20be\x20a\x20string','stack','sessionDisposeWorkbook','.sock','main.ts','pendingRequests','parse','isInteger','saturated','.sid\x20must\x20be\x20a\x20non-empty\x20string','init-workbook-data.json','sessionEvalJs','ensure-workbook-replay-pack-loaded','env','getSession','emit','session-','Daemon\x20RPC\x20timeout\x20for\x20','\x20on\x20','WorkbookPackageError','baseWorkbookData','replaceSyncedChangesets','runtime.jsonl','runtime','session.exportWorkbookData','status','Runner\x20startup\x20timeout','.ts','getSessionIdleTtlMs','replaceLocalChangesets','setInitWorkbookData','evalJs','getLocalChangesets','outputPath','sid','pipe','closed','SIGTERM',',\x20got\x20',';\x20rollback\x20failed:\x20','Daemon\x20build\x20mismatch.\x20Expected\x20','SessionLoadWorkbookDataReplayPack','ensureSession','.unv','session.exportWorkbookFile','loadWorkbookData','explicit-dispose','stringify','command','isProcessAlive','number','extension','isFile','local\x20changeset','journal.json','startTimeoutMs','manifest.json','stderrPath','isFinite','LoadWorkbookDataReplayPack','error','\x20must\x20be\x20an\x20object','all','reqId','starting','SessionDispose','signalCode','scheduleRotationIfNeeded','connect','relativePath','traceId','sessionCount','map','touchSession','modulePath','internal','unitID','event','6215510YCtRPW','withSpan','originalContent','daemonLogPath','syncedRev','injectMeta','appendLocalMutations','local','lockRetryIntervalMs','writeOptions','result','getSyncedChangesets','params','loadWorkbookDataReplayPack','local-changesets.jsonl','committed','loadReplayPack','value','sha1','workbook\x20data\x20must\x20be\x20an\x20object','load-workbook-replay-pack','./build-id-BAjJE5TZ.js','parentSpanId','runner-exit','src','default','appendSyncedChangesets','univer-runner.js','isDirectory','absolutePath','unloadIdleSessions','ExportWorkbookData','RuntimeSessionDisposed','createConnection','daemonEntry','ENOENT','daemon.health','platform','logsDir','4TpuDpg','allSettled','logFields','homeDir','logPath','source','clear','rpcTimeoutMs','rotationInFlight','component','export-workbook','toString','cli','rolled_back','daemon.lock','workbookName','run-help','syncedRev\x20must\x20be\x20a\x20non-negative\x20integer\x20or\x20null','toRuntimeSessionInfo','Cannot\x20resolve\x20home\x20directory\x20for\x20UNIVER_HOME\x20fallback','index.ts','exportWorkbookFile','ignore','stderr.log','RuntimeSession','open','UNIVER_HOME','localMutations','cli.jsonl','daemon.meta.json','client','message','utf8','exists','lockPath','args','loadWorkbook','UNIVER_CLI_VERSION','append-local-changeset','Unable\x20to\x20resolve\x20univer-cli\x20package\x20root\x20from\x20','9026IOnkEP','method','start\x20a\x20fresh\x20daemon','747546lyEfzO','type','NODE_OPTIONS','set','fields','sessionLoadWorkbook','export-workbook-file','touchedFiles','archiveDir','Workbook\x20package\x20already\x20exists:\x20','traceFlags','object','keys','reopen','VITEST_POOL_ID','startedAt','2.0','setManifest','runner','autoStart','dispose','Runtime','committing','ERR_WORKBOOK_PACKAGE_LOCK_TIMEOUT','view','browser','Health','univer-runtime','Invalid\x20workbook\x20package\x20path:\x20','destroyAll','socketPath','add','.mutations[','daemon.sock','sort','send','resolve','daemonOptions','syncedChangesets','initialize','nextRotationCheckAt','workbookData','exited','spanId','null','manifest\x20must\x20be\x20an\x20object','maxArchiveFiles','ERR_WORKBOOK_PACKAGE_ALREADY_EXISTS','Runner\x20exited\x20before\x20ready','session.evalJs','takeWrites','packages','toISOString','ERR_WORKBOOK_PACKAGE_FILE_MISSING','isAlive','mutation\x20must\x20be\x20an\x20object','lastAccessedAt','replayPack','sessionExportWorkbookData','workbookId','VITEST','unknown','session.loadWorkbookDataReplayPack','stderr','EvalJs','ensureWorkbookDataReplayPackLoaded','RuntimeRunnerExit','rpc-response','digest','join','removed','HOME','mutations','synced\x20changeset.message\x20must\x20be\x20a\x20string\x20when\x20present','daemon.js','baseRev','size','closeAfterFlush','session','from','write','.js','trim','active','cwd','SessionExportWorkbookFile','USERPROFILE','LoadWorkbook','initRev\x20must\x20be\x20a\x20non-negative\x20integer\x20or\x20null','pidPath','synced\x20changeset.mutations\x20must\x20be\x20an\x20array','destroying','SIGKILL','ensureSessionState','rejectPendingRequests','univer-daemon-','timeout','8ropImJ','daemon\x20is\x20stopped','cliLogPath','ready','now','slice','/tmp','../..','manifest','trimEnd','645757fsIFMy','synced-changesets.jsonl','getSessionCount','length','WorkbookPackageLockTimeoutError','Runner\x20process\x20exited\x20(code=','off','UNIVER_CLI_BUILD_ID','unref','destination','running','Workbook\x20package\x20transaction\x20failed\x20for\x20','.univer','apps','RPC\x20timeout','create-workbook','replaceLocalMutations','bin','daemon.pid','daemon','string','filter','WorkbookPackageTransactionError','455691UHbhzC','exportWorkbookData','43aEWPPZ','InvalidWorkbookPackagePathError','1499607OfAsqT','sessionId','maxBytes','unitID\x20must\x20be\x20a\x20string\x20or\x20null','Workbook\x20package\x20is\x20busy:\x20','runtimeLogPath','warn','win32','random','prefix','SessionExportWorkbookData','flush','sessionLoadWorkbookDataReplayPack','.lock','mutation.params\x20must\x20be\x20an\x20object','split','dist','session.loadWorkbook','logger','synced\x20changeset','format','exitCode','mutation.id\x20must\x20be\x20a\x20non-empty\x20string','update','Daemon\x20process\x20entry\x20is\x20not\x20configured.\x20Pass\x20DaemonClientOptions.daemonEntry\x20from\x20the\x20CLI\x20runtime\x20manifest.','code','execPath','sessions','session.getWorkbook','packaged','archive','workspace-dist','Runner\x20not\x20ready','UNIVER_DAEMON_SESSION_IDLE_TTL_MS','sendRpc','sessionRoot','Shutdown','options','destroySession','ipc','delete','data','holder','metaPath','fromAbsolutePath','getManifest','daemon\x20is\x20running','operation','waitForReady','isArray','destroy','--import','created','entry:\x20','DaemonRpcClient','includes','replace-local-changesets','exit','get','kill','process_role','beforeCommitFile','topics','Runner\x20startup\x20error:\x20','local\x20changeset.mutations\x20must\x20be\x20an\x20array','resolveIdentity','sessionIdleTtlMs','sessionExportWorkbookFile','formatStderr','lockTimeoutMs','event_name','VITEST_WORKER_ID','SessionCreateWorkbook','session.dispose'];_0x431d=function(){return _0x5c1998;};return _0x431d();}function X(_0x386c17){const _0x40187b=_0x1539f1;return _0x386c17[_0x40187b(0x1ee)]===0x0?'':_0x386c17[_0x40187b(0x2db)](_0x8a4820=>JSON[_0x40187b(0x2c2)](_0x8a4820))[_0x40187b(0x1c5)]('\x0a')+'\x0a';}function Z(_0x5818ec,_0x37147d){if(_0x5818ec===void 0x0)throw Error('Missing\x20transaction\x20value\x20for\x20'+_0x37147d);return _0x5818ec;}function Q(_0x5768ed){const _0x417c3d=_0x1539f1;return _0x5768ed instanceof Error&&_0x417c3d(0x21f)in _0x5768ed;}function on(_0x15163d){const _0x15dfd0=_0x1539f1;return typeof _0x15163d==_0x15dfd0(0x33e)&&!!_0x15163d&&!Array['isArray'](_0x15163d);}var sn=_0x4710ea(import.meta.url),$=_n(_0x73c0a7(_0x2b74e2(import.meta.url)));function cn(_0x45d377=process.env){let _0xc8cd98=un(_0x45d377);return _0xc8cd98==='source'?dn():_0xc8cd98==='workspace-dist'?fn():mn();}function ln(_0x503a15=process.env){const _0x6a91eb=_0x1539f1;return{'daemonEntry':cn(_0x503a15)[_0x6a91eb(0x303)]};}function un(_0x459287=process.env){const _0x3582d4=_0x1539f1;let _0x18eab5=_0x459287['UNIVER_CLI_RUNTIME_MODE']?.['trim']();return _0x18eab5===_0x3582d4(0x30d)||_0x18eab5===_0x3582d4(0x225)||_0x18eab5===_0x3582d4(0x223)?_0x18eab5:_0x2b74e2(import.meta.url)['endsWith'](_0x3582d4(0x2ae))?_0x3582d4(0x30d):gn($)?_0x3582d4(0x225):_0x3582d4(0x223);}function dn(){const _0x35541c=_0x1539f1;let _0x4c1203=_0x48276b($,_0x35541c(0x1e8)),_0x30fea4=sn['resolve']('tsx');return{'mode':_0x35541c(0x30d),'packageRoot':$,'cliEntry':{'execArgv':[_0x35541c(0x239),_0x30fea4],'modulePath':_0x5a76fb($,_0x35541c(0x2f9),_0x35541c(0x31c))},'daemonEntry':{'execArgv':[_0x35541c(0x239),_0x30fea4],'modulePath':_0x5a76fb($,_0x35541c(0x2f9),_0x35541c(0x1fe),_0x35541c(0x297))},'runtimeExecutionPlaneEntry':{'execArgv':[_0x35541c(0x239),_0x30fea4],'modulePath':_0x5a76fb(_0x4c1203,_0x35541c(0x1b3),_0x35541c(0x34e),_0x35541c(0x2f9),'execution-plane',_0x35541c(0x297))},'runHelpTopicsRoot':_0x5a76fb($,_0x35541c(0x2f9),'run-help','topics'),'viewAssetsRoot':hn(_0x4c1203)};}function fn(){const _0x1ec46d=_0x1539f1;let _0xefddfe=pn($),_0x313652=_0x5a76fb(_0xefddfe,_0x1ec46d(0x2de),'univer-runner.js');return{'mode':_0x1ec46d(0x225),'packageRoot':$,'cliEntry':{'execArgv':[],'modulePath':_0x5a76fb(_0xefddfe,_0x1ec46d(0x2de),'cli.js')},'daemonEntry':{'execArgv':[],'modulePath':_0x5a76fb(_0xefddfe,_0x1ec46d(0x2de),_0x1ec46d(0x1ca))},'runtimeExecutionPlaneEntry':{'execArgv':[],'modulePath':_0x313652},'runHelpTopicsRoot':_0x5a76fb(_0xefddfe,_0x1ec46d(0x318),_0x1ec46d(0x244)),'viewAssetsRoot':_0x5a76fb(_0xefddfe,_0x1ec46d(0x34b),_0x1ec46d(0x34c))};}function pn(_0x9c8088){const _0x44fd4e=_0x1539f1;return gn(_0x9c8088)?_0x5a76fb(_0x9c8088,_0x44fd4e(0x216)):_0x9c8088;}function mn(){const _0x573624=_0x1539f1;return{'mode':'packaged','packageRoot':$,'cliEntry':{'execArgv':[],'modulePath':_0x5a76fb($,_0x573624(0x2de),_0x573624(0x265))},'daemonEntry':{'execArgv':[],'modulePath':_0x5a76fb($,_0x573624(0x2de),_0x573624(0x1ca))},'runtimeExecutionPlaneEntry':{'execArgv':[],'modulePath':_0x5a76fb($,_0x573624(0x2de),_0x573624(0x2fc))},'runHelpTopicsRoot':_0x5a76fb($,_0x573624(0x318),_0x573624(0x244)),'viewAssetsRoot':_0x5a76fb($,_0x573624(0x34b),_0x573624(0x34c))};}function hn(_0x287b31){const _0x3f1086=_0x1539f1;let _0x5833b3=_0x5a76fb(_0x287b31,_0x3f1086(0x1b3),_0x3f1086(0x26c),_0x3f1086(0x216),_0x3f1086(0x34c));return _0x390ebd(_0x5833b3)?_0x5833b3:_0x5a76fb(_0x287b31,'packages',_0x3f1086(0x26c),_0x3f1086(0x2f9),_0x3f1086(0x34c));}function gn(_0x1a409c){const _0x5d57c6=_0x1539f1;return _0x40b1df(_0x1a409c)==='cli'&&_0x40b1df(_0x73c0a7(_0x1a409c))===_0x5d57c6(0x1f8);}function _n(_0x3e9b27){const _0x1a952b=_0x1539f1;let _0x8280be=_0x3e9b27;for(;;){let _0x278700=_0x5a76fb(_0x8280be,'package.json');if(_0x390ebd(_0x278700)&&JSON[_0x1a952b(0x299)](_0xeead2d(_0x278700,'utf8'))[_0x1a952b(0x1fc)]?.[_0x1a952b(0x281)]!==void 0x0)return _0x8280be;let _0x2c36a2=_0x73c0a7(_0x8280be);if(_0x2c36a2===_0x8280be)throw Error(_0x1a952b(0x32f)+_0x3e9b27);_0x8280be=_0x2c36a2;}}export{_t as a,We as c,De as d,S as f,St as i,w as l,x as m,cn as n,Ue as o,ge as p,Ut as r,He as s,ln as t,C as u};
|
package/chunks/trace-DPfd8LdJ.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x52735d=_0x1041;(function(_0x2645a0,_0x50f5a5){const _0xc45b7e=_0x1041,_0x335a26=_0x2645a0();while(!![]){try{const _0x41e977=parseInt(_0xc45b7e(0x1e3))/0x1+-parseInt(_0xc45b7e(0x20b))/0x2*(-parseInt(_0xc45b7e(0x207))/0x3)+parseInt(_0xc45b7e(0x1f9))/0x4*(parseInt(_0xc45b7e(0x205))/0x5)+parseInt(_0xc45b7e(0x20f))/0x6*(parseInt(_0xc45b7e(0x1e5))/0x7)+-parseInt(_0xc45b7e(0x1e4))/0x8+-parseInt(_0xc45b7e(0x1f7))/0x9+-parseInt(_0xc45b7e(0x1de))/0xa;if(_0x41e977===_0x50f5a5)break;else _0x335a26['push'](_0x335a26['shift']());}catch(_0x2e3b45){_0x335a26['push'](_0x335a26['shift']());}}}(_0x19a4,0x7f366));import{randomBytes as _0x151f3c}from'node:crypto';import{AsyncLocalStorage as _0x1b8c86}from'node:async_hooks';function _0x1041(_0x5f311b,_0x823733){_0x5f311b=_0x5f311b-0x1da;const _0x19a409=_0x19a4();let _0x1041fd=_0x19a409[_0x5f311b];return _0x1041fd;}const n={'Cli':_0x52735d(0x1df),'Daemon':_0x52735d(0x1ea),'Runtime':_0x52735d(0x1e8),'ViewHost':'view-host'},r={'Cli':_0x52735d(0x1df),'Daemon':'daemon','RuntimeSession':_0x52735d(0x1f3),'RuntimeRunner':_0x52735d(0x208),'ViewHost':_0x52735d(0x204),'Cloud':'cloud','Doctor':_0x52735d(0x20a),'Observability':_0x52735d(0x213)},i={'CliCommandStart':'cli.command.start','CliCommandFinish':_0x52735d(0x1ff),'CliCommandError':'cli.command.error','CliCommandCancel':_0x52735d(0x214),'DaemonStart':_0x52735d(0x1dc),'DaemonStop':_0x52735d(0x211),'DaemonRpcStart':'daemon.rpc.start','DaemonRpcFinish':'daemon.rpc.finish','DaemonRpcError':_0x52735d(0x209),'RuntimeSessionCreated':_0x52735d(0x202),'RuntimeSessionDisposed':'runtime.session.disposed','RuntimeRunnerExit':_0x52735d(0x1f5),'RuntimeRpcError':_0x52735d(0x201),'ViewHostStart':_0x52735d(0x1ef),'ViewHostRequestError':_0x52735d(0x203),'ViewHostUncaughtException':'view-host.uncaught-exception','ViewHostUnhandledRejection':_0x52735d(0x20d),'ViewHostBrowserError':_0x52735d(0x1ec),'ViewHostBrowserUnhandledRejection':_0x52735d(0x1db),'ViewHostBrowserResourceError':_0x52735d(0x1f0),'ViewHostBrowserFetchError':'view-host.browser.fetch-error','CloudHttpStart':'cloud.http.start','CloudHttpFinish':'cloud.http.finish','CloudHttpError':_0x52735d(0x20c),'TraceContextMissing':_0x52735d(0x1f2),'TraceContextInvalid':_0x52735d(0x206),'DoctorCollectStart':_0x52735d(0x1fe),'DoctorCollectFinish':_0x52735d(0x1f1)},a={'CliCommand':_0x52735d(0x1fc),'DaemonRpcClient':_0x52735d(0x215),'DaemonRpcServer':_0x52735d(0x1eb),'DaemonRpcOrphan':_0x52735d(0x217),'RuntimeRpcClient':_0x52735d(0x1f4),'RuntimeEval':_0x52735d(0x212),'ViewHostHttpRequest':_0x52735d(0x1ee),'CloudHttpRequest':_0x52735d(0x1e1),'DoctorCollect':_0x52735d(0x216)};var o='00',s='01',c=/^[0-9a-f]{32}$/,l=/^[0-9a-f]{16}$/,u=/^[0-9a-f]{2}$/,d='00000000000000000000000000000000',f=_0x52735d(0x1e7);function p(){return b(0x10,d);}function m(){return b(0x8,f);}function h(){return{'traceId':p(),'spanId':m(),'traceFlags':s};}function g(_0x2fb12b){const _0x6a5888=_0x52735d;return{'traceId':_0x2fb12b[_0x6a5888(0x1e0)],'parentSpanId':_0x2fb12b['spanId'],'spanId':m(),'traceFlags':_0x2fb12b[_0x6a5888(0x210)]};}function _0x19a4(){const _0x3a1cf3=['daemon','daemon.rpc.server','view-host.browser.error','split','view-host.http.request','view-host.start','view-host.browser.resource-error','doctor.collect.finish','trace.context.missing','runtime-session','runtime.rpc.client','runtime.runner.exit','injectHeaders','6150879aDCbxV','storage','34996IdYCHE','withRootSpan','active','cli.command','toString','doctor.collect.start','cli.command.finish','withSpan','runtime.rpc.error','runtime.session.created','view-host.request.error','view-host','445uftbuq','trace.context.invalid','1707RxWxDw','runtime-runner','daemon.rpc.error','doctor','3554kyFwvz','cloud.http.error','view-host.unhandled-rejection','spanId','6SkDOvu','traceFlags','daemon.stop','runtime.eval','observability','cli.command.cancel','daemon.rpc.client','doctor.collect','daemon.rpc.orphan','withContext','view-host.browser.unhandled-rejection','daemon.start','injectMeta','12377190IwBsYZ','cli','traceId','cloud.http.request','getStore','369957TEeIJf','3488288speacV','5029619SJdQHi','test','0000000000000000','runtime','run'];_0x19a4=function(){return _0x3a1cf3;};return _0x19a4();}function _(_0xbd470e){const _0xe886b7=_0x52735d;if(_0xbd470e===void 0x0)return;let _0x262062=_0xbd470e['trim']()[_0xe886b7(0x1ed)]('-');if(_0x262062['length']!==0x4)return;let [_0x11aeab,_0x353ce8,_0x9dff30,_0x48d672]=_0x262062;if(!(_0x11aeab!==o||!c[_0xe886b7(0x1e6)](_0x353ce8)||_0x353ce8===d||!l['test'](_0x9dff30)||_0x9dff30===f||!u[_0xe886b7(0x1e6)](_0x48d672)))return{'traceId':_0x353ce8,'spanId':_0x9dff30,'traceFlags':_0x48d672};}function v(_0x206a10){const _0x49af53=_0x52735d;return o+'-'+_0x206a10['traceId']+'-'+_0x206a10[_0x49af53(0x20e)]+'-'+_0x206a10[_0x49af53(0x210)];}const y=new class{[_0x52735d(0x1f8)]=new _0x1b8c86();['active'](){const _0x3a75d4=_0x52735d;return this[_0x3a75d4(0x1f8)][_0x3a75d4(0x1e2)]();}[_0x52735d(0x1da)](_0x417056,_0x3197c0){const _0x1ea3c4=_0x52735d;return this[_0x1ea3c4(0x1f8)][_0x1ea3c4(0x1e9)](_0x417056,_0x3197c0);}[_0x52735d(0x1fa)](_0x457ea6,_0x5167b6){return this['withContext'](h(),_0x5167b6);}[_0x52735d(0x200)](_0x3e228a,_0x2af44d){let _0x484f9a=this['active']();return this['withContext'](_0x484f9a===void 0x0?h():g(_0x484f9a),_0x2af44d);}[_0x52735d(0x1dd)](_0x310999){const _0x43c5a7=_0x52735d;let _0x3a0af9=this[_0x43c5a7(0x1fb)]()??h();return{..._0x310999??{},'traceparent':v(_0x3a0af9)};}[_0x52735d(0x1f6)](_0x1a3014){const _0xbde477=_0x52735d;let _0x2c836f=this[_0xbde477(0x1fb)]()??h();return{..._0x1a3014??{},'traceparent':v(_0x2c836f)};}}();function b(_0x530ea5,_0x4e9ff0){const _0x4d27ff=_0x52735d;let _0x30bf57='';do _0x30bf57=_0x151f3c(_0x530ea5)[_0x4d27ff(0x1fd)]('hex');while(_0x30bf57===_0x4e9ff0);return _0x30bf57;}export{n as a,i,y as n,a as o,r,_ as t};
|