@univer-cli/univer-collaboration-runtime 1.0.0-beta.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +12 -12
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- function _0x1727(_0xeea3ae,_0x221350){_0xeea3ae=_0xeea3ae-0x92;const _0x287be8=_0x287b();let _0x1727b7=_0x287be8[_0xeea3ae];return _0x1727b7;}const _0x1482ee=_0x1727;(function(_0x149574,_0x65540e){const _0x33e347=_0x1727,_0x198056=_0x149574();while(!![]){try{const _0xd65d2f=parseInt(_0x33e347(0x16a))/0x1+parseInt(_0x33e347(0xa8))/0x2+-parseInt(_0x33e347(0x97))/0x3+parseInt(_0x33e347(0xaa))/0x4*(parseInt(_0x33e347(0x1cc))/0x5)+parseInt(_0x33e347(0xce))/0x6*(parseInt(_0x33e347(0xf2))/0x7)+parseInt(_0x33e347(0xbd))/0x8*(parseInt(_0x33e347(0x178))/0x9)+-parseInt(_0x33e347(0x108))/0xa;if(_0xd65d2f===_0x65540e)break;else _0x198056['push'](_0x198056['shift']());}catch(_0x5b0540){_0x198056['push'](_0x198056['shift']());}}}(_0x287b,0xe726d));import{CommandType as _0x222396,DependentOn as _0x5484e2,ICommandService as _0x38e832,IUniverInstanceService as _0x43b472,Inject as _0x3d53db,Injector as _0x2d7cf3,Plugin as _0x5a4b2b,UniverInstanceType as _0x2706d9,registerDependencies as _0x4fdc5e,sequenceExecute as _0x4d1c43,toDisposable as _0x4471f1}from'@univerjs/core';import{CompressMutationService as _0x883255,ISnapshotServerService as _0x56efa7,ITransformService as _0x140dc4,RevertRevisionMutation as _0x5442a0,RevisionService as _0x18e322,SnapshotService as _0x50e6cf,UniverCollaborationPlugin as _0x21f34a,isTransformMutationsSuccess as _0x318500,parseChangesetToProtocol as _0x49c5bb,parseMutationToProtocol as _0x2ffc6e,parseProtocolChangeset as _0x574ea1,transformSnapshotToBaseData as _0x3e51e0,transformSnapshotToBoardData as _0x170d99,transformSnapshotToDocumentData as _0xbc816c,transformSnapshotToSlideData as _0xa6a84a,transformSnapshotToWorkbookData as _0x5f373c}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x6823bc}from'@univerjs/engine-formula';import{CmdRspCode as _0x39ab32,CombCmd as _0x66851,isError as _0x279d4e}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x54581c}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x5b9d55,RichTextEditingMutation as _0x35966f}from'@univerjs/docs';import{IRenderManagerService as _0x1a7a50}from'@univerjs/engine-render';import{FUniver as _0x5a39f3}from'@univerjs/core/facade';import'@univerjs-pro/bases/facade';import'@univerjs-pro/boards/facade';import'@univerjs-pro/slides/facade';import'@univerjs/docs/facade';import'@univerjs/sheets/facade';import _0x274a5e from'@oxc-project/runtime/helpers/decorateParam';import _0x4679aa from'@oxc-project/runtime/helpers/decorate';var j=class extends Error{[_0x1482ee(0x1a4)];[_0x1482ee(0x15a)];constructor(_0x210fcb,_0x2adf56,_0x2280a9={}){const _0x304a9c=_0x1482ee;super(_0x2adf56,_0x2280a9),this[_0x304a9c(0x1d4)]=_0x304a9c(0x177),this[_0x304a9c(0x1a4)]=_0x210fcb,this[_0x304a9c(0x15a)]=_0x2280a9[_0x304a9c(0x15a)]??!0x1;}},se=class{[_0x1482ee(0x1b9)];[_0x1482ee(0x1a0)];['_pending']=[];[_0x1482ee(0x1f9)]=[];[_0x1482ee(0x1e1)]=0x0;constructor(_0x1ca94c,_0x38767c,_0x4b8c58){const _0x57a6fa=_0x1482ee;this[_0x57a6fa(0x1b9)]=_0x1ca94c,this['_unitId']=_0x38767c,this[_0x57a6fa(0x1f9)][_0x57a6fa(0xdc)](_0x1ca94c[_0x57a6fa(0x9c)]['onMutationExecutedForCollab']((_0x54a681,_0x1b5373)=>{const _0x4abeb3=_0x57a6fa;this[_0x4abeb3(0x18a)](_0x54a681,_0x1b5373,_0x4b8c58);})),_0x4b8c58===_0x2706d9[_0x57a6fa(0x18d)]&&(_0x1ca94c['injector'][_0x57a6fa(0x169)](_0x1a7a50),this[_0x57a6fa(0x1c9)]());}get[_0x1482ee(0x10a)](){const _0x4a6153=_0x1482ee;return this[_0x4a6153(0x164)];}[_0x1482ee(0xfe)](_0x4facac){const _0x15655b=_0x1482ee;return this[_0x15655b(0x164)][_0x15655b(0x109)](_0x4facac);}[_0x1482ee(0x190)](_0x2cc7f9){const _0x5bc0d3=_0x1482ee;this[_0x5bc0d3(0x164)][_0x5bc0d3(0xd4)](0x0,this[_0x5bc0d3(0x164)][_0x5bc0d3(0x1a3)],..._0x2cc7f9);}[_0x1482ee(0xe2)](){const _0x5993ef=_0x1482ee;return this['_pending'][_0x5993ef(0xd4)](0x0);}['prependPending'](_0x4983eb){const _0x2cf4a9=_0x1482ee;this[_0x2cf4a9(0x164)]['unshift'](..._0x4983eb);}async[_0x1482ee(0x111)](_0x30fe9c){const _0x22f812=_0x1482ee;this['_suppressionDepth']+=0x1;try{return await _0x30fe9c();}finally{--this[_0x22f812(0x1e1)];}}[_0x1482ee(0xed)](){const _0x219d07=_0x1482ee;for(let _0x4083c5 of this['_disposables'][_0x219d07(0xd4)](0x0))_0x4083c5[_0x219d07(0xed)]();}[_0x1482ee(0x18a)](_0x180e85,_0x58938a,_0x2eff92){const _0xc20312=_0x1482ee;if(this[_0xc20312(0x1e1)]>0x0||_0x180e85[_0xc20312(0xac)]!==_0x222396[_0xc20312(0xb3)]||_0x58938a?.[_0xc20312(0xf1)]||_0x58938a?.[_0xc20312(0x116)]||_0x58938a?.['onlyLocal'])return;let _0x4dfa0d=_0x180e85['params'];if(_0x4dfa0d?.[_0xc20312(0x15d)]!==void 0x0&&_0x4dfa0d[_0xc20312(0x15d)]!==this[_0xc20312(0x1a0)]){if(_0x4dfa0d[_0xc20312(0xbe)]===_0x54581c['id'])return;throw new j(_0xc20312(0x202),_0xc20312(0xf3)+this[_0xc20312(0x1a0)]+_0xc20312(0x1e7)+_0x180e85['id']+_0xc20312(0x11f)+String(_0x4dfa0d[_0xc20312(0x15d)]));}if(_0x4dfa0d?.[_0xc20312(0x15d)]===void 0x0||_0x2eff92===_0x2706d9['UNIVER_DOC']&&_0x180e85['id']===_0x35966f['id'])return;if(_0x180e85['id']===_0x5442a0['id'])throw new j(_0xc20312(0x202),_0xc20312(0xd1));let _0x33058e=_0x180e85,_0x389c58=this[_0xc20312(0x1b9)][_0xc20312(0x11e)][_0xc20312(0x1f3)][_0xc20312(0x126)]()[_0xc20312(0xde)],_0x4f845a=(this['_kernel'][_0xc20312(0x11e)]['interceptor'][_0xc20312(0x130)](_0x389c58)([_0x33058e],this[_0xc20312(0x1b9)][_0xc20312(0xa3)])??[_0x33058e])[0x0];_0x4f845a&&this[_0xc20312(0x164)][_0xc20312(0xdc)](_0x2ffc6e(_0x4f845a));}['_subscribeToDocumentState'](){const _0x5e3cb6=_0x1482ee;let _0x4d0895=this[_0x5e3cb6(0x1b9)][_0x5e3cb6(0x16e)][_0x5e3cb6(0x169)](_0x5b9d55)[_0x5e3cb6(0x113)][_0x5e3cb6(0xcf)](_0x138cf0=>{const _0x14ca56=_0x5e3cb6;if(this['_suppressionDepth']>0x0||_0x138cf0?.[_0x14ca56(0x15d)]!==this[_0x14ca56(0x1a0)])return;let _0x3a1df1={'id':_0x138cf0[_0x14ca56(0x1dd)],'params':{'actions':_0x138cf0[_0x14ca56(0x1a2)][_0x14ca56(0x207)],'textRanges':null,'unitId':_0x138cf0[_0x14ca56(0x15d)]},'type':_0x222396[_0x14ca56(0xb3)]};this[_0x14ca56(0x164)]['push'](_0x2ffc6e(_0x3a1df1));});this[_0x5e3cb6(0x1f9)][_0x5e3cb6(0xdc)](_0x4471f1(()=>_0x4d0895[_0x5e3cb6(0x1d5)]()));}},ce=new Set(['formula.mutation.set-trigger-formula-calculation-start','formula.mutation.set-trigger-formula-calculation-stop',_0x1482ee(0x1d1),_0x1482ee(0x1b3),'formula.mutation.set-array-formula-data',_0x1482ee(0x206),_0x1482ee(0x154)]),le=new Set(['createBase',_0x1482ee(0x9f),_0x1482ee(0x204),'createDocument','createPresentation','createUniverSheet',_0x1482ee(0xf7)]);function ue(_0x7486c9,_0x58aa59,_0x3b8010){let _0x2287bc=_0x5a39f3['newAPI'](_0x7486c9);return{async 'execute'(_0x593844,_0x1ed74a){const _0x35a736=_0x1727;if(_0x593844['length']>_0x3b8010)throw new j(_0x35a736(0x202),_0x35a736(0xd5)+_0x3b8010+_0x35a736(0x10c));let _0x461c12=_0x1ed74a===_0x35a736(0x17e)?M(_0x2287bc):void 0x0,_0xd77f08=de(_0x2287bc,_0x58aa59);try{return await Function(_0x35a736(0x19f),_0x35a736(0xf8)+_0x593844+_0x35a736(0xe8))(_0xd77f08);}finally{_0x461c12?.[_0x35a736(0xed)]();}}};}function de(_0x5c5bd1,_0xeb888d){return new Proxy(_0x5c5bd1,{'get'(_0x412fca,_0x15b1d1,_0x4ac5db){return le['has'](_0x15b1d1)?()=>{const _0x441472=_0x1727;throw new j(_0x441472(0x202),_0x441472(0x173)+_0xeb888d+_0x441472(0x94)+String(_0x15b1d1));}:Reflect['get'](_0x412fca,_0x15b1d1,_0x4ac5db);}});}function M(_0x163121){const _0x511839=_0x1482ee;return _0x163121[_0x511839(0x1fb)](_0x163121[_0x511839(0xff)][_0x511839(0x1af)],_0x240ef3=>{const _0x5db7d9=_0x511839;let _0x781501=_0x240ef3;if(N(_0x781501))throw _0x781501[_0x5db7d9(0x1d9)]=!0x0,new j(_0x5db7d9(0x202),_0x5db7d9(0x149)+_0x781501['id']);});}function N(_0x30bd77){const _0x118ec5=_0x1482ee;return _0x30bd77['type']===_0x222396[_0x118ec5(0xb0)]||_0x30bd77['type']===_0x222396[_0x118ec5(0xb3)]&&!ce['has'](_0x30bd77['id']);}function P(_0x2a426e){const _0xe51fa4=_0x1482ee;if(_0x2a426e===void 0x0)return null;if(_0x2a426e===null||typeof _0x2a426e==_0xe51fa4(0x1bb)||typeof _0x2a426e==_0xe51fa4(0x132))return _0x2a426e;if(typeof _0x2a426e==_0xe51fa4(0x18c)){if(Number[_0xe51fa4(0x200)](_0x2a426e))return _0x2a426e;throw I();}if(Array[_0xe51fa4(0x187)](_0x2a426e))return _0x2a426e[_0xe51fa4(0x168)](P);if(F(_0x2a426e))return Object['fromEntries'](Object[_0xe51fa4(0x144)](_0x2a426e)[_0xe51fa4(0x168)](([_0x5aeee4,_0x383236])=>[_0x5aeee4,P(_0x383236)]));throw I();}function F(_0x29f1bf){const _0x2c847e=_0x1482ee;if(typeof _0x29f1bf!=_0x2c847e(0xb7)||!_0x29f1bf)return!0x1;let _0xe1e381=Object[_0x2c847e(0x1fc)](_0x29f1bf);return _0xe1e381===Object['prototype']||_0xe1e381===null;}function I(){const _0x4bfbfc=_0x1482ee;return new j(_0x4bfbfc(0x202),_0x4bfbfc(0xec));}var L=class{[_0x1482ee(0x1f6)]=Promise[_0x1482ee(0x1d0)]();[_0x1482ee(0x17b)](_0x370b51){const _0x1ae2f3=_0x1482ee;let _0x41c99c=this[_0x1ae2f3(0x1f6)]['then'](_0x370b51,_0x370b51);return this[_0x1ae2f3(0x1f6)]=_0x41c99c[_0x1ae2f3(0xd3)](()=>void 0x0,()=>void 0x0),_0x41c99c;}};function R(_0x13a636,_0x3e7fc5,_0x451f93,_0xc8f18a){const _0x287a9f=_0x1482ee;if(!Array['isArray'](_0x13a636))throw new j(_0x287a9f(0xd6),_0x287a9f(0x1d7));let _0x13874a=[..._0x13a636][_0x287a9f(0x1e8)]((_0x1a0425,_0x363559)=>_0x1a0425[_0x287a9f(0xea)]-_0x363559[_0x287a9f(0xea)]),_0x58b2f8=_0xc8f18a;for(let _0x423ab8 of _0x13874a){if(!_0x423ab8||typeof _0x423ab8!=_0x287a9f(0xb7)||!Array[_0x287a9f(0x187)](_0x423ab8[_0x287a9f(0xb6)])||_0x423ab8[_0x287a9f(0xb6)]['some'](_0x371582=>!_0x371582||typeof _0x371582!=_0x287a9f(0xb7)||!('id'in _0x371582)||typeof _0x371582['id']!=_0x287a9f(0x132)||!(_0x287a9f(0x205)in _0x371582)||typeof _0x371582[_0x287a9f(0x205)]!=_0x287a9f(0x132))||!Number[_0x287a9f(0x1f2)](_0x423ab8['baseRev'])||!Number[_0x287a9f(0x1f2)](_0x423ab8[_0x287a9f(0xea)])||_0x423ab8[_0x287a9f(0xc2)]!==_0x3e7fc5||_0x423ab8[_0x287a9f(0xac)]!==_0x451f93||_0x423ab8['baseRev']!==_0x58b2f8||_0x423ab8[_0x287a9f(0xea)]!==_0x58b2f8+0x1)throw new j(_0x287a9f(0xd6),_0x287a9f(0xd7));_0x58b2f8=_0x423ab8[_0x287a9f(0xea)];}return _0x13874a;}function z(_0x50c2d9){const _0x7c954a=_0x1482ee;return{'baseRevision':_0x50c2d9[_0x7c954a(0x1f4)],'mutationCount':_0x50c2d9['mutations'][_0x7c954a(0x1a3)],'revision':_0x50c2d9[_0x7c954a(0xea)],..._0x50c2d9[_0x7c954a(0x162)]===void 0x0?{}:{'sid':_0x50c2d9[_0x7c954a(0x162)]},..._0x50c2d9[_0x7c954a(0x179)]===void 0x0?{}:{'reqId':_0x50c2d9[_0x7c954a(0x179)]}};}function B(_0x49dca6,_0x131908,_0x39be18,_0x24cc64,_0x1e5246,_0x117861='initial'){const _0x490ca7=_0x1482ee;if(_0x1e5246[_0x490ca7(0x12e)](_0x5f0b3f=>_0x5f0b3f[_0x490ca7(0xb6)][_0x490ca7(0x12e)](_0x4ee66f=>_0x4ee66f['id']===_0x5442a0['id'])))throw new j(_0x490ca7(0xd6),'Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place');let _0x4eaab0=_0x24cc64;for(let _0x20bf5f of _0x1e5246){let _0x416a83=_0x4eaab0+0x1;if(_0x20bf5f[_0x490ca7(0xc2)]!==_0x131908||_0x20bf5f[_0x490ca7(0xac)]!==_0x39be18||_0x20bf5f[_0x490ca7(0x1f4)]!==_0x4eaab0||_0x20bf5f[_0x490ca7(0xea)]!==_0x416a83)throw new j(_0x490ca7(0xd6),_0x490ca7(0x10e));let _0x389a11=_0x574ea1(_0x20bf5f),_0x281929=_0x49dca6[_0x490ca7(0x11e)][_0x490ca7(0x1f3)]['getInterceptPoints']()[_0x490ca7(0x1d3)],_0x51ec12=_0x49dca6[_0x490ca7(0x11e)][_0x490ca7(0x1f3)]['fetchThroughInterceptors'](_0x281929)(_0x389a11[_0x490ca7(0xb6)],null)??_0x389a11[_0x490ca7(0xb6)],_0x38dbdc=_0x4d1c43(_0x51ec12,_0x49dca6['commandService'],_0x117861===_0x490ca7(0x16b)?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x38dbdc[_0x490ca7(0x12a)])throw new j(_0x490ca7(0xd0),'Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20'+_0x38dbdc[_0x490ca7(0x1b4)]+':\x20'+String(_0x38dbdc[_0x490ca7(0x186)]));let _0x2500e1=_0x49dca6['revisionService'][_0x490ca7(0x146)](_0x131908);if(_0x2500e1!==_0x416a83)throw new j(_0x490ca7(0xd6),_0x490ca7(0x1fd));_0x4eaab0=_0x2500e1;}return _0x4eaab0;}function V(_0x49d73e,_0x14fd62,_0x460185){const _0x7a663d=_0x1482ee;let _0x4b1b83=_0x5a39f3['newAPI'](_0x49d73e);switch(_0x460185){case _0x2706d9[_0x7a663d(0x13c)]:return H(_0x4b1b83['getWorkbook'](_0x14fd62)?.['save'](),_0x14fd62);case _0x2706d9[_0x7a663d(0x18d)]:return H(_0x4b1b83[_0x7a663d(0x11a)](_0x14fd62)?.[_0x7a663d(0x161)](),_0x14fd62);case _0x2706d9[_0x7a663d(0x197)]:return H(_0x4b1b83['getPresentation'](_0x14fd62)?.[_0x7a663d(0x161)](),_0x14fd62);case _0x2706d9[_0x7a663d(0x1b0)]:return H(_0x4b1b83[_0x7a663d(0xc3)](_0x14fd62)?.[_0x7a663d(0x161)](),_0x14fd62);case _0x2706d9[_0x7a663d(0x9e)]:return H(_0x4b1b83[_0x7a663d(0xd8)](_0x14fd62)?.[_0x7a663d(0x161)](),_0x14fd62);default:throw new j(_0x7a663d(0x202),_0x7a663d(0x93)+_0x460185);}}function H(_0x8d78e,_0xc47a94){const _0x358aa2=_0x1482ee;if(_0x8d78e===void 0x0)throw new j(_0x358aa2(0xd0),'Unit\x20'+_0xc47a94+_0x358aa2(0x1e4));return structuredClone(_0x8d78e);}var fe=class{[_0x1482ee(0x15d)];[_0x1482ee(0xee)];[_0x1482ee(0x131)];[_0x1482ee(0x151)];['_univer'];[_0x1482ee(0x1b9)];[_0x1482ee(0xb1)];['_acceptingOperations']=!0x0;['_closed']=!0x1;[_0x1482ee(0xc9)];[_0x1482ee(0x1db)];[_0x1482ee(0xbb)]=new L();[_0x1482ee(0x192)]=[];[_0x1482ee(0x14d)];[_0x1482ee(0x12b)]=null;[_0x1482ee(0x115)]=null;[_0x1482ee(0x10d)]=crypto['randomUUID']();['_nextReqId']=0x1;constructor(_0x5a4805,_0x31c275,_0x6eb256,_0x2145f4,_0x56374e,_0x164c1f,_0x176eab){const _0x2d2840=_0x1482ee;this['unitId']=_0x5a4805,this[_0x2d2840(0xee)]=_0x31c275,this['_baseRevision']=_0x6eb256,this[_0x2d2840(0x151)]=_0x2145f4,this[_0x2d2840(0x120)]=_0x56374e,this['_kernel']=_0x164c1f,this[_0x2d2840(0x14d)]=_0x6eb256,this[_0x2d2840(0xc9)]=new se(_0x164c1f,_0x5a4805,_0x31c275),this[_0x2d2840(0x1db)]=ue(_0x56374e,_0x5a4805,_0x176eab);}['getState'](){const _0x379b0f=_0x1482ee;return{'awaitingChangeset':this[_0x379b0f(0x115)]===null?null:U(this[_0x379b0f(0x115)]),'baseRevision':this[_0x379b0f(0x131)],'bufferedChangesetCount':this['_bufferedChangesets'][_0x379b0f(0x1a3)],'conflict':this[_0x379b0f(0x12b)],'connection':this['_closed']?_0x379b0f(0xdd):this[_0x379b0f(0x151)]['getConnectionState'](),'knownHeadRevision':this[_0x379b0f(0x14d)],'pendingMutationCount':this[_0x379b0f(0xc9)][_0x379b0f(0x10a)]['length']};}[_0x1482ee(0x1a9)](){const _0x2b8278=_0x1482ee;return structuredClone(this[_0x2b8278(0xc9)]['pending']);}['fetch'](){const _0x14b3e5=_0x1482ee;return this[_0x14b3e5(0x137)]()||this[_0x14b3e5(0xbb)][_0x14b3e5(0x17b)](async()=>(this[_0x14b3e5(0xdf)](_0x14b3e5(0x1df)),await this[_0x14b3e5(0x1aa)]()));}['pull'](){const _0x18c3b2=_0x1482ee;return this['_rejectIfNotAccepting']()||this[_0x18c3b2(0xbb)][_0x18c3b2(0x17b)](async()=>{const _0xdecfba=_0x18c3b2;if(this[_0xdecfba(0xdf)]('pull'),await this['_fetchChangesets'](),this[_0xdecfba(0x192)][_0xdecfba(0x1a3)]===0x0)return{'state':this[_0xdecfba(0x1f5)](),'status':_0xdecfba(0x119)};let _0x4d6a53=[...this[_0xdecfba(0x192)]];if(_0x4d6a53[_0xdecfba(0x12e)](_0x143bc4=>_0x143bc4['mutations']['some'](_0x7ce9c6=>_0x7ce9c6['id']===_0x5442a0['id'])))throw new j(_0xdecfba(0xd6),_0xdecfba(0xeb));let _0x12623b=this['_baseRevision'],_0x378317=this[_0xdecfba(0x115)]?W(this[_0xdecfba(0x115)][_0xdecfba(0xb6)],this[_0xdecfba(0x15d)],this['unitType'],this[_0xdecfba(0x131)]):null,_0x1d1232=_0x574ea1({'baseRev':this[_0xdecfba(0x131)],'memberID':'','mutations':[...this['_capture'][_0xdecfba(0x10a)]],'revision':0x0,'type':this[_0xdecfba(0xee)],'unitID':this['unitId'],'userID':''})['mutations'],_0x5274f2=[];for(let _0x138de8 of _0x4d6a53){let _0x304e57=_0x574ea1(_0x138de8);if(this[_0xdecfba(0x115)]!==null&&_0x138de8['sid']===this[_0xdecfba(0x115)][_0xdecfba(0x162)]&&_0x138de8['reqId']===this[_0xdecfba(0x115)][_0xdecfba(0x179)]){let _0x20c30c=(_0x378317??[])['map'](_0x2ffc6e);G(_0x138de8[_0xdecfba(0xb6)],_0x20c30c)||await this['_closeAfterFatalError'](new j('COLLABORATION_PROTOCOL_ERROR',_0xdecfba(0x148))),_0x5274f2['push']({'changeset':_0x138de8,'kind':_0xdecfba(0x1a8)}),_0x378317=null;continue;}let _0x404fcd=_0x304e57['mutations'];if(_0x378317!==null){let _0x17bd97=this['_kernel'][_0xdecfba(0x17f)][_0xdecfba(0x133)](_0x404fcd,_0x378317,!0x1);if(!_0x318500(_0x17bd97))return this['_conflict']={'message':_0x17bd97[_0xdecfba(0x186)][_0xdecfba(0xb9)],'operation':_0xdecfba(0x17c),'reason':_0xdecfba(0x176)},{'conflict':this[_0xdecfba(0x12b)],'state':this[_0xdecfba(0x1f5)](),'status':'conflict'};_0x404fcd=_0x17bd97[_0xdecfba(0x1c4)],_0x378317=_0x17bd97['m2Prime'];}let _0x1593a1=this['_kernel'][_0xdecfba(0x17f)][_0xdecfba(0x133)](_0x404fcd,_0x1d1232,!0x1);if(!_0x318500(_0x1593a1))return this['_conflict']={'message':_0x1593a1[_0xdecfba(0x186)][_0xdecfba(0xb9)],'operation':_0xdecfba(0x17c),'reason':_0xdecfba(0x176)},{'conflict':this[_0xdecfba(0x12b)],'state':this['getState'](),'status':_0xdecfba(0x1c6)};_0x5274f2['push']({'changeset':_0x49c5bb({..._0x304e57,'mutations':_0x1593a1[_0xdecfba(0x1c4)]}),'kind':_0xdecfba(0x1d8)}),_0x1d1232=_0x1593a1[_0xdecfba(0xfa)];}let _0x5c1984=_0x12623b;for(let _0x4102aa of _0x5274f2){if(_0x4102aa[_0xdecfba(0x156)]==='awaiting-ack'){let _0x24b2b8=this[_0xdecfba(0x1b9)][_0xdecfba(0x166)][_0xdecfba(0x146)](this[_0xdecfba(0x15d)]);_0x24b2b8!==_0x4102aa[_0xdecfba(0xc0)][_0xdecfba(0xea)]&&await this[_0xdecfba(0x184)](new j(_0xdecfba(0xd6),'Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision')),_0x5c1984=_0x24b2b8;continue;}_0x5c1984=await this[_0xdecfba(0x18e)](_0x5c1984,[_0x4102aa[_0xdecfba(0xc0)]]);}return this[_0xdecfba(0xc9)][_0xdecfba(0x190)](_0x1d1232[_0xdecfba(0x168)](_0x2ffc6e)),this[_0xdecfba(0x115)]!==null&&(this[_0xdecfba(0x115)]=_0x378317===null?null:{...this['_awaiting'],'baseRev':_0x5c1984,'mutations':_0x378317[_0xdecfba(0x168)](_0x2ffc6e)}),this[_0xdecfba(0x131)]=_0x5c1984,this['_bufferedChangesets']['splice'](0x0),{'appliedChangesets':_0x4d6a53['map'](z),'fromRevision':_0x12623b,'state':this[_0xdecfba(0x1f5)](),'status':'pulled','toRevision':_0x5c1984,'transformedPendingMutationCount':_0x1d1232[_0xdecfba(0x1a3)]};});}[_0x1482ee(0x122)](){const _0x374af3=_0x1482ee;return this['_rejectIfNotAccepting']()||this[_0x374af3(0xbb)][_0x374af3(0x17b)](async()=>{const _0x1fe0cd=_0x374af3;this['_assertMutableState'](_0x1fe0cd(0x122));let _0x5beee4=[],_0x5a1c55=[];if(this[_0x1fe0cd(0x115)]===null){if(this[_0x1fe0cd(0xc9)][_0x1fe0cd(0x10a)][_0x1fe0cd(0x1a3)]===0x0)return{'state':this[_0x1fe0cd(0x1f5)](),'status':'nothing-to-commit'};if(await this[_0x1fe0cd(0x1aa)](),this['_bufferedChangesets'][_0x1fe0cd(0x1a3)]>0x0)return{'baseRevision':this[_0x1fe0cd(0x131)],'confirmedChangesets':_0x5beee4,'knownHeadRevision':this['_knownHeadRevision'],'state':this['getState'](),'status':_0x1fe0cd(0x117)};this[_0x1fe0cd(0xe3)]();}for(;this[_0x1fe0cd(0x115)]!==null;){let _0x2fd873=this[_0x1fe0cd(0x115)],_0x436490;try{_0x436490=await this[_0x1fe0cd(0x151)][_0x1fe0cd(0x1e3)](_0x2fd873);}catch{return{'changeset':U(_0x2fd873),'confirmedChangesets':_0x5beee4,'state':this[_0x1fe0cd(0x1f5)](),'status':'unknown'};}if(_0x436490[_0x1fe0cd(0x1e6)]==='retry'||_0x436490[_0x1fe0cd(0x1e6)]===_0x1fe0cd(0x182))return{'changeset':U(_0x2fd873),'confirmedChangesets':_0x5beee4,'state':this[_0x1fe0cd(0x1f5)](),'status':_0x436490[_0x1fe0cd(0x1e6)]};if(_0x436490['status']===_0x1fe0cd(0x99))return _0x436490['reason']==='invalid-revision'?(this['_capture'][_0x1fe0cd(0xf4)](_0x2fd873[_0x1fe0cd(0xb6)]),this[_0x1fe0cd(0x115)]=null,await this[_0x1fe0cd(0x1aa)](),{'baseRevision':this[_0x1fe0cd(0x131)],'confirmedChangesets':_0x5beee4,'knownHeadRevision':this['_knownHeadRevision'],'state':this[_0x1fe0cd(0x1f5)](),'status':_0x1fe0cd(0x117)}):(this[_0x1fe0cd(0x12b)]={'message':_0x436490['message'],'operation':_0x1fe0cd(0x122),'reason':_0x436490[_0x1fe0cd(0xba)]===_0x1fe0cd(0xe7)?_0x1fe0cd(0x19c):_0x1fe0cd(0x1c7)},{'conflict':this[_0x1fe0cd(0x12b)],'confirmedChangesets':_0x5beee4,'state':this[_0x1fe0cd(0x1f5)](),'status':_0x1fe0cd(0x1c6)});let _0x216079=_0x436490[_0x1fe0cd(0xb2)];try{this[_0x1fe0cd(0x14f)](_0x2fd873,_0x436490[_0x1fe0cd(0x1e5)],_0x216079);}catch(_0x43178e){await this[_0x1fe0cd(0x184)](_0x43178e);}let _0x5a6b24=_0x2fd873[_0x1fe0cd(0xb6)];if(_0x436490[_0x1fe0cd(0x1e5)][_0x1fe0cd(0x1a3)]>0x0){let _0x4f1c5f=await this[_0x1fe0cd(0xa6)](_0x2fd873,_0x436490['precedingChangesets']);if(_0x4f1c5f===null)return{'conflict':this[_0x1fe0cd(0x12b)],'confirmedChangesets':_0x5beee4,'state':this[_0x1fe0cd(0x1f5)](),'status':_0x1fe0cd(0x1c6)};_0x5a6b24=_0x4f1c5f['awaitingMutations'];try{this[_0x1fe0cd(0x19b)](_0x436490[_0x1fe0cd(0x1e5)]);}catch(_0x4b937c){await this[_0x1fe0cd(0x184)](_0x4b937c);}_0x5a1c55[_0x1fe0cd(0xdc)](..._0x436490['precedingChangesets'][_0x1fe0cd(0x168)](z));}G(_0x216079[_0x1fe0cd(0xb6)],_0x5a6b24)||await this[_0x1fe0cd(0x184)](new j(_0x1fe0cd(0xd6),_0x1fe0cd(0xfc)));let _0x3c9e65=this[_0x1fe0cd(0x1b9)][_0x1fe0cd(0x166)][_0x1fe0cd(0x146)](this[_0x1fe0cd(0x15d)]);if(_0x3c9e65!==_0x216079[_0x1fe0cd(0xea)]&&await this[_0x1fe0cd(0x184)](new j('COLLABORATION_PROTOCOL_ERROR',_0x1fe0cd(0xa1))),this[_0x1fe0cd(0x131)]=_0x3c9e65,this[_0x1fe0cd(0x14d)]=Math[_0x1fe0cd(0x1ec)](this[_0x1fe0cd(0x14d)],_0x3c9e65),this[_0x1fe0cd(0x115)]=null,_0x5beee4['push'](z(_0x216079)),this[_0x1fe0cd(0xc9)]['pending'][_0x1fe0cd(0x1a3)]===0x0)break;this[_0x1fe0cd(0xe3)]();}return{'confirmedChangesets':_0x5beee4,'reconciledChangesets':_0x5a1c55,'state':this[_0x1fe0cd(0x1f5)](),'status':_0x1fe0cd(0x189)};});}async['_fetchChangesets'](){const _0xba33d5=_0x1482ee;let _0x5db5db=this['_knownHeadRevision'],_0xcb869=await this[_0xba33d5(0x151)]['fetchChangesets'](_0x5db5db,void 0x0);if(_0x279d4e(_0xcb869[_0xba33d5(0x186)])){let _0x424b5b=_0xcb869[_0xba33d5(0x186)];throw new j(_0xba33d5(0x106),_0x424b5b?.[_0xba33d5(0xb9)]||_0xba33d5(0x1eb),{'retryable':!0x0});}let _0x5872f2=R(_0xcb869[_0xba33d5(0xda)],this[_0xba33d5(0x15d)],this[_0xba33d5(0xee)],_0x5db5db),_0x1f33c9=_0x5872f2['at'](-0x1)?.[_0xba33d5(0xea)]??_0x5db5db;if(_0xcb869[_0xba33d5(0x127)]!==void 0x0&&_0xcb869[_0xba33d5(0x127)]!==_0x1f33c9)throw new j(_0xba33d5(0xd6),_0xba33d5(0xaf));return _0x5872f2['length']===0x0?{'knownHeadRevision':this[_0xba33d5(0x14d)],'state':this['getState'](),'status':_0xba33d5(0x170)}:(this[_0xba33d5(0x192)][_0xba33d5(0xdc)](..._0x5872f2),this['_knownHeadRevision']=_0x1f33c9,{'changesets':_0x5872f2[_0xba33d5(0x168)](z),'fromRevision':_0x5db5db,'state':this[_0xba33d5(0x1f5)](),'status':_0xba33d5(0x18f),'toRevision':_0x1f33c9});}[_0x1482ee(0xe3)](){const _0xf83ad8=_0x1482ee;let _0x72539a=this[_0xf83ad8(0xc9)][_0xf83ad8(0xe2)]();this[_0xf83ad8(0x115)]={'baseRev':this['_baseRevision'],'mutations':_0x72539a,'reqId':this['_nextReqId'],'sid':this[_0xf83ad8(0x10d)]},this['_nextReqId']+=0x1;}[_0x1482ee(0x14f)](_0x3be48b,_0x895a2a,_0x27ba86){const _0x5587d0=_0x1482ee;let _0x2b3588=R(_0x895a2a,this[_0x5587d0(0x15d)],this[_0x5587d0(0xee)],this[_0x5587d0(0x131)])['at'](-0x1)?.[_0x5587d0(0xea)]??this[_0x5587d0(0x131)];if(_0x27ba86[_0x5587d0(0xc2)]!==this[_0x5587d0(0x15d)]||_0x27ba86[_0x5587d0(0xac)]!==this[_0x5587d0(0xee)]||_0x27ba86[_0x5587d0(0x162)]!==_0x3be48b[_0x5587d0(0x162)]||_0x27ba86[_0x5587d0(0x179)]!==_0x3be48b[_0x5587d0(0x179)]||_0x27ba86[_0x5587d0(0x1f4)]!==_0x2b3588||_0x27ba86[_0x5587d0(0xea)]!==_0x2b3588+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0x5587d0(0x12c));}async[_0x1482ee(0xa6)](_0x17a016,_0xf37255){const _0x2bf9f1=_0x1482ee;let _0x9a863e=W(_0x17a016[_0x2bf9f1(0xb6)],this[_0x2bf9f1(0x15d)],this[_0x2bf9f1(0xee)],this[_0x2bf9f1(0x131)]),_0x146096=W(this[_0x2bf9f1(0xc9)]['pending'],this[_0x2bf9f1(0x15d)],this[_0x2bf9f1(0xee)],this[_0x2bf9f1(0x131)]),_0x319f92=[];for(let _0x5df5e8 of _0xf37255){let _0x160232=_0x574ea1(_0x5df5e8),_0x5bf742=this['_kernel'][_0x2bf9f1(0x17f)][_0x2bf9f1(0x133)](_0x160232['mutations'],_0x9a863e,!0x1);if(!_0x318500(_0x5bf742))return this[_0x2bf9f1(0x9d)](_0x2bf9f1(0x122),_0x5bf742['error']),null;_0x9a863e=_0x5bf742[_0x2bf9f1(0xfa)];let _0x24e229=this[_0x2bf9f1(0x1b9)]['transformService'][_0x2bf9f1(0x133)](_0x5bf742[_0x2bf9f1(0x1c4)],_0x146096,!0x1);if(!_0x318500(_0x24e229))return this['_setTransformConflict'](_0x2bf9f1(0x122),_0x24e229[_0x2bf9f1(0x186)]),null;_0x146096=_0x24e229[_0x2bf9f1(0xfa)],_0x319f92[_0x2bf9f1(0xdc)](_0x49c5bb({..._0x160232,'mutations':_0x24e229[_0x2bf9f1(0x1c4)]}));}let _0x2c8f51=await this[_0x2bf9f1(0x18e)](this[_0x2bf9f1(0x131)],_0x319f92);return this[_0x2bf9f1(0xc9)][_0x2bf9f1(0x190)](_0x146096['map'](_0x2ffc6e)),this[_0x2bf9f1(0x131)]=_0x2c8f51,{'awaitingMutations':_0x9a863e[_0x2bf9f1(0x168)](_0x2ffc6e),'revision':_0x2c8f51};}['_setTransformConflict'](_0x557d33,_0x29cdf5){const _0x23ef01=_0x1482ee;this[_0x23ef01(0x12b)]={'message':_0x29cdf5[_0x23ef01(0xb9)],'operation':_0x557d33,'reason':_0x23ef01(0x176)};}async[_0x1482ee(0x18e)](_0x4c2035,_0x3d263b){const _0x42c8e9=_0x1482ee;try{return await this['_capture'][_0x42c8e9(0x111)](async()=>B(this['_kernel'],this[_0x42c8e9(0x15d)],this[_0x42c8e9(0xee)],_0x4c2035,_0x3d263b,_0x42c8e9(0x1d8)));}catch(_0x1b81c0){return await this[_0x42c8e9(0x184)](_0x1b81c0);}}async[_0x1482ee(0x184)](_0x918fdd){const _0x2afcc5=_0x1482ee;this[_0x2afcc5(0x1f8)]=!0x1,this['_closePromise']??=this['_closeOwnedResources']();try{await this[_0x2afcc5(0xb1)];}catch{}throw _0x918fdd;}[_0x1482ee(0x19b)](_0x28221d){const _0xa05013=_0x1482ee;let _0x4335c6=_0x28221d['at'](-0x1)?.[_0xa05013(0xea)];if(_0x4335c6===void 0x0||this[_0xa05013(0x192)][_0xa05013(0x1a3)]===0x0)return;let _0x5023ce=this[_0xa05013(0x192)][_0xa05013(0x1d6)](({revision:_0x543a08})=>_0x543a08>_0x4335c6),_0x3e6231=this['_bufferedChangesets'][_0xa05013(0x109)](0x0,_0x5023ce===-0x1?this['_bufferedChangesets']['length']:_0x5023ce);for(let _0x5071d1 of _0x3e6231){let _0x204a3c=_0x28221d['find'](({revision:_0x240156})=>_0x240156===_0x5071d1[_0xa05013(0xea)]);if(!_0x204a3c||!pe(_0x5071d1,_0x204a3c))throw new j(_0xa05013(0xd6),_0xa05013(0xe6));}this['_bufferedChangesets'][_0xa05013(0xd4)](0x0,_0x3e6231[_0xa05013(0x1a3)]);}[_0x1482ee(0x1c2)](_0x450825){const _0x52a2dc=_0x1482ee;return this[_0x52a2dc(0x137)]()||this[_0x52a2dc(0xbb)][_0x52a2dc(0x17b)](async()=>{const _0x5823f8=_0x52a2dc;_0x450825[_0x5823f8(0x1a7)]===_0x5823f8(0x9b)&&this['_assertMutableState'](_0x5823f8(0x9b));let _0x48d331=this[_0x5823f8(0xc9)][_0x5823f8(0x10a)]['length'],_0x5584ec=P(await this[_0x5823f8(0x1db)][_0x5823f8(0x1c2)](_0x450825[_0x5823f8(0x1a4)],_0x450825[_0x5823f8(0x1a7)]));return _0x450825['mode']===_0x5823f8(0x17e)?{'state':this[_0x5823f8(0x1f5)](),'value':_0x5584ec}:{'mutations':this['_capture'][_0x5823f8(0xfe)](_0x48d331),'state':this[_0x5823f8(0x1f5)](),'value':_0x5584ec};});}[_0x1482ee(0x114)](_0x38fd40){const _0x4452cf=_0x1482ee;return this['_rejectIfNotAccepting']()||this[_0x4452cf(0xbb)]['run'](async()=>{const _0x128ad8=_0x4452cf;if(this[_0x128ad8(0xdf)](_0x128ad8(0x102)),this['_awaiting']!==null)throw new j('COLLABORATION_INVALID_INPUT',_0x128ad8(0x199));let _0x3f251f=me(_0x38fd40),_0x159cc3=[...this[_0x128ad8(0xc9)]['pending']];this[_0x128ad8(0xc9)][_0x128ad8(0x190)](_0x3f251f);let _0x458e76=this['getState']();return{'pendingMutationCount':_0x3f251f[_0x128ad8(0x1a3)],'previousMutationCount':_0x159cc3[_0x128ad8(0x1a3)],'state':_0x458e76};});}['exportUnitData'](){const _0x357c20=_0x1482ee;return this[_0x357c20(0x137)]()||this[_0x357c20(0xbb)][_0x357c20(0x17b)](async()=>V(this[_0x357c20(0x120)],this[_0x357c20(0x15d)],this[_0x357c20(0xee)]));}[_0x1482ee(0x10f)](){const _0x240936=_0x1482ee;return this[_0x240936(0xb1)]?this[_0x240936(0xb1)]:(this[_0x240936(0x1f8)]=!0x1,this[_0x240936(0xb1)]=this[_0x240936(0xbb)][_0x240936(0x17b)](async()=>await this['_closeOwnedResources']()),this[_0x240936(0xb1)]);}async['_closeOwnedResources'](){const _0x9959f2=_0x1482ee;try{this['_capture']['dispose'](),await this['_handle'][_0x9959f2(0x10f)]();}finally{try{this['_univer'][_0x9959f2(0xed)]();}finally{this[_0x9959f2(0x1ba)]=!0x0;}}}[_0x1482ee(0x137)](){const _0x18c9ee=_0x1482ee;return this[_0x18c9ee(0x1f8)]?null:Promise[_0x18c9ee(0x1a1)](new j('COLLABORATION_CLOSED',_0x18c9ee(0x1e2)));}[_0x1482ee(0xdf)](_0x37cf92){const _0x5d5c90=_0x1482ee;if(this[_0x5d5c90(0x12b)]!==null)throw new j(_0x5d5c90(0x202),_0x5d5c90(0x1ea)+_0x37cf92+_0x5d5c90(0xb4));}};function _0x287b(){const _0x33e252=['createWorkbook','data','formula.mutation.set-formula-data','actions','waitForSubmission','_connection','size','Unsupported\x20collaboration\x20Unit\x20type:\x20','\x20cannot\x20call\x20','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','backend','2277399YiccOc','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','rejected','flatMap','write','commandService','_setTransformConflict','UNIVER_BOARD','createBoard','_ensureConnected','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type','instanceService','catch','timeout','_reconcilePrecedingChangesets','addEventListener','2706066AYaOLv','LEAVE','71476RyWPYT','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','type','_joined','snapshotServerService','Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range','COMMAND','_closePromise','acceptedChangeset','MUTATION','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','_handleMessage','mutations','object','JOIN','message','reason','_operations','_stopHeartbeat','24FNBMJW','trigger','rev','changeset','onStarting','unitID','getBase','_lease','application/json','http:','changeset_ack','HELLO','_capture','accepted','delete','ticket','GET','376386zVPIPR','subscribe','COLLABORATION_LOAD_FAILED','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','sheets','then','splice','Code\x20is\x20longer\x20than\x20the\x20','COLLABORATION_PROTOCOL_ERROR','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','getBoard','Snapshot\x20block\x20','changesets','_socket','push','closed','COMPRESS_MUTATION_SEND','_assertMutableState','all','permission_rej','takePending','_createAwaitingFromPending','acquire','bind','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','permission-denied','\x20})();','searchParams','revision','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','dispose','unitType','finally','_release','fromCollab','7kxfDgN','Runtime\x20for\x20','prependPending','set','\x20must\x20be\x20an\x20absolute\x20URL','disposeUnit','return\x20(async\x20()\x20=>\x20{\x20','maxCodeLength','m2Prime','ack','Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset','base64','snapshotFrom','Event','snapshotServerUrl','unit','replace\x20mutations','eventID','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','collabSubmitChangesetUrl','COLLABORATION_UNAVAILABLE','https:','23595120fFygWt','slice','pending','leases','\x20character\x20limit','_sid','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','close','Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON','suppress','Snapshot\x20contains\x20duplicate\x20block\x20ids','docStateChange$','replacePendingMutations','_awaiting','fromChangeset','pull-required','_config','up-to-date','getDocument','json','pathname','_failCommandWaiters','compressMutationService','\x20for\x20Unit\x20','_univer','_memberId','commit','new_changes','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','race','getInterceptPoints','latestRevision','commitTimeoutMs','No\x20active\x20Unit\x20leases','result','_conflict','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset','_requestCommand','some','Changeset\x20submission\x20was\x20rejected','fetchThroughInterceptors','_baseRevision','string','transformMutations','fetchmissing','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','_injector','_rejectIfNotAccepting','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','_target','wss:','getSheetBlock','UNIVER_SHEET','new_changesets','waitForLatestApplied','readyState','has','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','Collaboration\x20WebSocket\x20is\x20not\x20online','OPEN','entries','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','incrementRevOfUnit','send','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20','originalMeta','Failed\x20to\x20open\x20the\x20collaboration\x20backend','Connection\x20timed\x20out','_knownHeadRevision','routeKey','_validateAcceptedChangeset','Collaboration\x20WebSocket\x20closed','_handle','_submissionWaiters','pluginName','sheet.mutation.send-init-pivot-text-local','replace','kind','Changeset\x20submission\x20was\x20denied','httpRequest','open','retryable','clear','block','unitId','takeInboundChangesets','protocol','permissionRejEvent','save','sid','join','_pending','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','revisionService','\x20request\x20is\x20already\x20active\x20for\x20','map','get','1149992LDRIaf','initial','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','timer','injector','permission','unchanged','min','promise','Single-Unit\x20runtime\x20for\x20','HEARTBEAT','_heartbeat','transform-failed','CollaborationRuntimeError','1711494fZOTZM','reqId','infoRsp','run','pull','invalid','read','transformService','memberID','createUnit','unknown','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','_closeAfterFatalError','wsSessionTicketUrl','error','isArray','\x20returned\x20a\x20different\x20block\x20identity','confirmed','_captureCommandMutation','_waitForSubmission','number','UNIVER_DOC','_replayRemoteChangesets','fetched','replacePending','_join','_bufferedChangesets','memberId','from','Collaboration\x20HELLO\x20response\x20is\x20invalid','RECV','UNIVER_SLIDE','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','cmd','_consumeBufferedPrecedingChangesets','permission-rejected','_scheduleReconnect','every','univerAPI','_unitId','reject','redoState','length','code','getUnitData','trim','mode','awaiting-ack','getPendingMutations','_fetchChangesets','stringify','getConnectionState','changeset_should_retry','_state','BeforeCommandExecute','UNIVER_BASE','csAckEvent','Heartbeat\x20failed','formula.mutation.set-calculation-result','index','unitData','invalid-changeset','_startHeartbeat','collabWebSocketUrl','_kernel','_closed','boolean','_connect','fetchChangesets','_commandWaiters','invalid-revision','removeEventListener','unit-data','execute','Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20','m1Prime','\x20uses\x20an\x20unsupported\x20protocol','conflict','changeset-rejected','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','_subscribeToDocumentState','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot','_reconnectTimer','260EaBuQA','Backend\x20returned\x20no\x20Unit\x20snapshot','registerPlugin','_inbound','resolve','formula.mutation.set-trigger-formula-calculation','csRejEvent','COMPRESS_MUTATION_APPLY','name','unsubscribe','findIndex','Backend\x20changesets\x20must\x20be\x20an\x20array','remote','cancel','_handleCollaborationEvent','_executor','collaMsg','commandId','_connectPromise','fetch','values','_suppressionDepth','Collaboration\x20runtime\x20is\x20closing\x20or\x20closed','submitChangeset','\x20is\x20unavailable','precedingChangesets','status','\x20cannot\x20capture\x20mutation\x20','sort','ws:','Cannot\x20','Backend\x20failed\x20to\x20fetch\x20changesets','max','getUnitOnRev','POST','snapshot','add','doc','isSafeInteger','interceptor','baseRev','getState','_tail','offline','_acceptingOperations','_disposables','workbook','addEvent','getPrototypeOf','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','_reconnectAttempts','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','isFinite','retry','COLLABORATION_INVALID_INPUT','online'];_0x287b=function(){return _0x33e252;};return _0x287b();}function U(_0xabffa6){const _0x21a36e=_0x1482ee;return{'baseRevision':_0xabffa6[_0x21a36e(0x1f4)],'mutationCount':_0xabffa6['mutations'][_0x21a36e(0x1a3)],'reqId':_0xabffa6[_0x21a36e(0x179)],'revision':0x0,'sid':_0xabffa6[_0x21a36e(0x162)]};}function W(_0x3f00af,_0x1e9019,_0x2ca3d5,_0x50c9ac){return _0x574ea1({'baseRev':_0x50c9ac,'memberID':'','mutations':[..._0x3f00af],'revision':0x0,'type':_0x2ca3d5,'unitID':_0x1e9019,'userID':''})['mutations'];}function pe(_0x35f266,_0x208613){const _0xb5c5fb=_0x1482ee;return _0x35f266[_0xb5c5fb(0xc2)]===_0x208613[_0xb5c5fb(0xc2)]&&_0x35f266[_0xb5c5fb(0xac)]===_0x208613[_0xb5c5fb(0xac)]&&_0x35f266[_0xb5c5fb(0x1f4)]===_0x208613[_0xb5c5fb(0x1f4)]&&_0x35f266[_0xb5c5fb(0xea)]===_0x208613[_0xb5c5fb(0xea)]&&_0x35f266[_0xb5c5fb(0x162)]===_0x208613[_0xb5c5fb(0x162)]&&_0x35f266['reqId']===_0x208613['reqId']&&JSON['stringify'](_0x35f266[_0xb5c5fb(0xb6)])===JSON['stringify'](_0x208613[_0xb5c5fb(0xb6)]);}function G(_0x1e3001,_0x10ed56){const _0x39e09a=_0x1482ee;return _0x1e3001['length']===_0x10ed56[_0x39e09a(0x1a3)]&&_0x1e3001[_0x39e09a(0x19e)]((_0x56a1b3,_0x165b52)=>_0x56a1b3['id']===_0x10ed56[_0x165b52]?.['id']&&_0x56a1b3[_0x39e09a(0x205)]===_0x10ed56[_0x165b52]?.[_0x39e09a(0x205)]);}function me(_0x17a39a){const _0x1baf79=_0x1482ee;if(!Array[_0x1baf79(0x187)](_0x17a39a))throw new j(_0x1baf79(0x202),'Replacement\x20mutations\x20must\x20be\x20an\x20array');return _0x17a39a['map'](_0x196632=>{const _0x4c3c78=_0x1baf79;if(!_0x196632||typeof _0x196632!=_0x4c3c78(0xb7)||typeof _0x196632['id']!=_0x4c3c78(0x132)||_0x196632['id'][_0x4c3c78(0x1a3)]===0x0||typeof _0x196632[_0x4c3c78(0x205)]!=_0x4c3c78(0x132))throw new j(_0x4c3c78(0x202),'Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields');return{'data':_0x196632[_0x4c3c78(0x205)],'id':_0x196632['id']};});}var K=class extends _0x5a4b2b{[_0x1482ee(0x118)];[_0x1482ee(0x136)];static [_0x1482ee(0x153)]=_0x1482ee(0x165);constructor(_0x393817,_0x30ec4b){const _0x469409=_0x1482ee;super(),this[_0x469409(0x118)]=_0x393817,this[_0x469409(0x136)]=_0x30ec4b;}[_0x1482ee(0xc1)](){const _0xab6ae6=_0x1482ee;this[_0xab6ae6(0x118)]['snapshotServerService']!==void 0x0&&_0x4fdc5e(this[_0xab6ae6(0x136)],[[_0x56efa7,{'useValue':this[_0xab6ae6(0x118)][_0xab6ae6(0xae)]}]]),this[_0xab6ae6(0x118)][_0xab6ae6(0xc1)]({'commandService':this[_0xab6ae6(0x136)][_0xab6ae6(0x169)](_0x38e832),'compressMutationService':this[_0xab6ae6(0x136)][_0xab6ae6(0x169)](_0x883255),'instanceService':this[_0xab6ae6(0x136)][_0xab6ae6(0x169)](_0x43b472),'injector':this[_0xab6ae6(0x136)],'revisionService':this[_0xab6ae6(0x136)][_0xab6ae6(0x169)](_0x18e322),'transformService':this[_0xab6ae6(0x136)][_0xab6ae6(0x169)](_0x140dc4)});}};K=_0x4679aa([_0x5484e2(_0x21f34a),_0x274a5e(0x1,_0x3d53db(_0x2d7cf3))],K);function he(_0x39e9a0,_0x23c96e){const _0x57746b=_0x1482ee;let _0x1481d7;if(_0x39e9a0[_0x57746b(0x1ce)](K,{'onStarting'(_0x5e0d18){_0x1481d7=_0x5e0d18;},..._0x23c96e===void 0x0?{}:{'snapshotServerService':_0x23c96e}}),!_0x1481d7)throw Error(_0x57746b(0x124));return _0x1481d7;}async function ge(_0x316ca3,_0x2d17ff,_0x1abb48){const _0x3f1f13=_0x1482ee;let _0x3ef574=await _0x316ca3['getUnitOnRev'](0x0);if(_0x279d4e(_0x3ef574[_0x3f1f13(0x186)])){let _0x12f66f=_0x3ef574[_0x3f1f13(0x186)];throw new j(_0x3f1f13(0xd0),_0x12f66f?.[_0x3f1f13(0xb9)]||'Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot');}let _0x4f79b7=_0x3ef574[_0x3f1f13(0x1ef)];if(!_0x4f79b7)throw new j(_0x3f1f13(0xd0),_0x3f1f13(0x1cd));_e(_0x4f79b7,_0x2d17ff,_0x1abb48);try{switch(_0x1abb48){case _0x2706d9['UNIVER_SHEET']:return{'changesets':_0x3ef574['changesets'],'unitData':await _0x5f373c(_0x4f79b7,await q(_0x316ca3,_0x4f79b7)),'unitType':_0x1abb48};case _0x2706d9[_0x3f1f13(0x18d)]:return{'changesets':_0x3ef574['changesets'],'unitData':_0xbc816c(_0x4f79b7),'unitType':_0x1abb48};case _0x2706d9[_0x3f1f13(0x197)]:return{'changesets':_0x3ef574['changesets'],'unitData':_0xa6a84a(_0x4f79b7),'unitType':_0x1abb48};case _0x2706d9[_0x3f1f13(0x1b0)]:return{'changesets':_0x3ef574['changesets'],'unitData':await _0x3e51e0(_0x4f79b7,await q(_0x316ca3,_0x4f79b7)),'unitType':_0x1abb48};case _0x2706d9[_0x3f1f13(0x9e)]:return{'changesets':_0x3ef574['changesets'],'unitData':_0x170d99(_0x4f79b7),'unitType':_0x1abb48};default:throw new j(_0x3f1f13(0x202),_0x3f1f13(0x93)+_0x1abb48);}}catch(_0x3e9481){throw _0x3e9481 instanceof j?_0x3e9481:new j(_0x3f1f13(0xd0),_0x3f1f13(0x1ca),{'cause':_0x3e9481});}}function _e(_0x76edec,_0x162026,_0x141a20){const _0x549aa6=_0x1482ee;if(_0x76edec[_0x549aa6(0xc2)]!==_0x162026||_0x76edec['type']!==_0x141a20)throw new j(_0x549aa6(0xd0),_0x549aa6(0x104));if(!Number[_0x549aa6(0x1f2)](_0x76edec[_0x549aa6(0xbf)])||_0x76edec[_0x549aa6(0xbf)]<0x1)throw new j('COLLABORATION_LOAD_FAILED',_0x549aa6(0xab));}async function q(_0x172036,_0xff5c52){const _0x328264=_0x1482ee;let _0x40d8f2=_0xff5c52['workbook'];if(!_0x40d8f2)throw new j(_0x328264(0xd0),_0x328264(0x183));let _0x4d4a23=Object[_0x328264(0x1e0)](_0x40d8f2['blockMeta'])[_0x328264(0x9a)](({blocks:_0x4d3f38})=>_0x4d3f38);if(new Set(_0x4d4a23)[_0x328264(0x92)]!==_0x4d4a23[_0x328264(0x1a3)])throw new j('COLLABORATION_LOAD_FAILED',_0x328264(0x112));return await Promise[_0x328264(0xe0)](_0x4d4a23[_0x328264(0x168)](async _0x48f55c=>{const _0x4e7425=_0x328264;let _0x9e78ba=await _0x172036[_0x4e7425(0x13b)](_0x48f55c);if(_0x279d4e(_0x9e78ba[_0x4e7425(0x186)])||!_0x9e78ba[_0x4e7425(0x15c)])throw new j('COLLABORATION_LOAD_FAILED',_0x9e78ba[_0x4e7425(0x186)]?.[_0x4e7425(0xb9)]||'Snapshot\x20block\x20'+_0x48f55c+_0x4e7425(0x1e4));if(_0x9e78ba[_0x4e7425(0x15c)]['id']!==_0x48f55c)throw new j('COLLABORATION_LOAD_FAILED',_0x4e7425(0xd9)+_0x48f55c+_0x4e7425(0x188));return _0x9e78ba[_0x4e7425(0x15c)];}));}function ve(_0x787321){const _0x8b7ee9=_0x1482ee;let _0x1cd529=_0x787321[_0x8b7ee9(0xf9)]??0xa00000;if(!Number[_0x8b7ee9(0x1f2)](_0x1cd529)||_0x1cd529<=0x0)throw new j(_0x8b7ee9(0x202),_0x8b7ee9(0x98));return{async 'load'(_0x3ea66a,_0x2786cd){const _0x1fd9c4=_0x8b7ee9;be(_0x3ea66a,_0x2786cd);let _0x13297c,_0x51fb11={'unitId':_0x3ea66a,'unitType':_0x2786cd},_0x4892bf={'unitId':_0x3ea66a,'unitType':_0x2786cd,..._0x787321[_0x1fd9c4(0xae)]===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x551877=_0x1fd9c4;if(_0x13297c===void 0x0)throw new j(_0x551877(0xd0),_0x551877(0x138));return _0x13297c;}}},_0x35ef52;try{_0x35ef52=await _0x787321[_0x1fd9c4(0x96)]['open'](_0x51fb11);}catch(_0x848559){throw new j(_0x1fd9c4(0x106),_0x1fd9c4(0x14b),{'cause':_0x848559,'retryable':!0x0});}let _0xc10a94;try{_0xc10a94=await _0x787321['createUniver'](_0x4892bf);let _0x32b462=he(_0xc10a94,_0x787321['snapshotServerService']);_0x787321['snapshotServerService']!==void 0x0&&(_0x13297c=_0x32b462[_0x1fd9c4(0x16e)][_0x1fd9c4(0x169)](_0x50e6cf));let _0x19dd2c=await xe(_0x35ef52,_0x3ea66a,_0x2786cd);Se(_0x19dd2c,_0x51fb11),Ce(_0xc10a94,_0x19dd2c);let _0x52a5aa=B(_0x32b462,_0x3ea66a,_0x2786cd,J(_0x19dd2c[_0x1fd9c4(0x1b5)]),_0x19dd2c[_0x1fd9c4(0xda)]),_0x3d0bf1=await _0x35ef52[_0x1fd9c4(0x1bd)](_0x52a5aa,void 0x0);if(_0x279d4e(_0x3d0bf1[_0x1fd9c4(0x186)])){let _0x20ea9d=_0x3d0bf1[_0x1fd9c4(0x186)];throw new j(_0x1fd9c4(0x106),_0x20ea9d?.[_0x1fd9c4(0xb9)]||_0x1fd9c4(0x135),{'retryable':!0x0});}let _0x38beff=R(_0x3d0bf1[_0x1fd9c4(0xda)],_0x3ea66a,_0x2786cd,_0x52a5aa),_0xf0b75d=_0x38beff['at'](-0x1)?.[_0x1fd9c4(0xea)]??_0x52a5aa;if(_0x3d0bf1[_0x1fd9c4(0x127)]!==void 0x0&&_0x3d0bf1['latestRevision']!==_0xf0b75d)throw new j(_0x1fd9c4(0xd6),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range');return _0x52a5aa=B(_0x32b462,_0x3ea66a,_0x2786cd,_0x52a5aa,_0x38beff),await ye(_0x32b462),new fe(_0x3ea66a,_0x2786cd,_0x52a5aa,_0x35ef52,_0xc10a94,_0x32b462,_0x1cd529);}catch(_0x5177ae){try{await _0x35ef52[_0x1fd9c4(0x10f)]();}catch{}try{_0xc10a94?.[_0x1fd9c4(0xed)]();}catch{}throw _0x5177ae instanceof j?_0x5177ae:new j(_0x1fd9c4(0xd0),_0x1fd9c4(0x198),{'cause':_0x5177ae});}}};}async function ye(_0x89d6c8){const _0x251079=_0x1482ee;_0x89d6c8[_0x251079(0x16e)][_0x251079(0x140)](_0x6823bc)&&await _0x89d6c8[_0x251079(0x16e)][_0x251079(0x169)](_0x6823bc)[_0x251079(0x13e)]();}function be(_0x2ba8a1,_0x599a8b){const _0x39d826=_0x1482ee;if(_0x2ba8a1[_0x39d826(0x1a6)]()[_0x39d826(0x1a3)]===0x0)throw new j(_0x39d826(0x202),'unitId\x20must\x20not\x20be\x20empty');if(_0x599a8b!==_0x2706d9[_0x39d826(0x13c)]&&_0x599a8b!==_0x2706d9[_0x39d826(0x18d)]&&_0x599a8b!==_0x2706d9[_0x39d826(0x197)]&&_0x599a8b!==_0x2706d9[_0x39d826(0x1b0)]&&_0x599a8b!==_0x2706d9[_0x39d826(0x9e)])throw new j(_0x39d826(0x202),'Unsupported\x20collaboration\x20Unit\x20type:\x20'+_0x599a8b);}async function xe(_0x1a7534,_0xbb9f67,_0x3ecf0c){const _0x156959=_0x1482ee;return _0x1a7534['format']===_0x156959(0x1c1)?await _0x1a7534[_0x156959(0x1a5)]():await ge(_0x1a7534,_0xbb9f67,_0x3ecf0c);}function Se(_0x1a3a9e,_0x2de03c){const _0x3a3610=_0x1482ee;if(_0x1a3a9e[_0x3a3610(0xee)]!==_0x2de03c[_0x3a3610(0xee)])throw new j(_0x3a3610(0xd0),_0x3a3610(0xa2));if(_0x1a3a9e[_0x3a3610(0x1b5)]['id']!==_0x2de03c[_0x3a3610(0x15d)])throw new j(_0x3a3610(0xd0),'Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id');J(_0x1a3a9e[_0x3a3610(0x1b5)]);}function J(_0x31ce04){const _0x237bfe=_0x1482ee;let _0x405f07=_0x31ce04['rev'];if(!Number[_0x237bfe(0x1f2)](_0x405f07)||_0x405f07===void 0x0||_0x405f07<0x1)throw new j('COLLABORATION_LOAD_FAILED',_0x237bfe(0x95));return _0x405f07;}function Ce(_0x38f4d3,_0x50392c){const _0x2fac98=_0x1482ee;switch(_0x50392c[_0x2fac98(0xee)]){case _0x2706d9[_0x2fac98(0x13c)]:_0x38f4d3[_0x2fac98(0x181)](_0x50392c[_0x2fac98(0xee)],structuredClone(_0x50392c['unitData']));return;case _0x2706d9[_0x2fac98(0x18d)]:_0x38f4d3['createUnit'](_0x50392c[_0x2fac98(0xee)],structuredClone(_0x50392c[_0x2fac98(0x1b5)]));return;case _0x2706d9['UNIVER_SLIDE']:_0x38f4d3[_0x2fac98(0x181)](_0x50392c[_0x2fac98(0xee)],structuredClone(_0x50392c[_0x2fac98(0x1b5)]));return;case _0x2706d9[_0x2fac98(0x1b0)]:_0x38f4d3[_0x2fac98(0x181)](_0x50392c[_0x2fac98(0xee)],structuredClone(_0x50392c[_0x2fac98(0x1b5)]));return;case _0x2706d9[_0x2fac98(0x9e)]:_0x38f4d3[_0x2fac98(0x181)](_0x50392c[_0x2fac98(0xee)],structuredClone(_0x50392c['unitData']));return;}}var we=class{[_0x1482ee(0x118)];['_target'];[_0x1482ee(0xc4)];['format']=_0x1482ee(0x1ef);constructor(_0x1fdba4,_0x3af239,_0x35cb1d){const _0x54dff0=_0x1482ee;this[_0x54dff0(0x118)]=_0x1fdba4,this[_0x54dff0(0x139)]=_0x3af239,this[_0x54dff0(0xc4)]=_0x35cb1d;}[_0x1482ee(0x1ac)](){const _0x1096eb=_0x1482ee;return this[_0x1096eb(0xc4)]['getConnectionState']();}async[_0x1482ee(0x1ed)](_0xe5ceee=0x0){const _0x1eb1e3=_0x1482ee;let _0x80b296=X(this[_0x1eb1e3(0x118)][_0x1eb1e3(0x100)],this[_0x1eb1e3(0x139)][_0x1eb1e3(0xee)],_0x1eb1e3(0x101),this[_0x1eb1e3(0x139)][_0x1eb1e3(0x15d)],_0x1eb1e3(0xbf),_0xe5ceee),_0x20f5b5=await Y(this[_0x1eb1e3(0x118)],_0x80b296);return Te(_0x20f5b5[_0x1eb1e3(0x1ef)]),_0x20f5b5;}async[_0x1482ee(0x13b)](_0xb89b89){const _0x1bdf3d=_0x1482ee;let _0x28c97b=X(this['_config'][_0x1bdf3d(0x100)],this['_target'][_0x1bdf3d(0xee)],_0x1bdf3d(0x101),this[_0x1bdf3d(0x139)][_0x1bdf3d(0x15d)],_0x1bdf3d(0x15c),_0xb89b89),_0xdb7471=await Y(this[_0x1bdf3d(0x118)],_0x28c97b);return _0xdb7471['block']&&typeof _0xdb7471[_0x1bdf3d(0x15c)]['data']=='string'&&(_0xdb7471[_0x1bdf3d(0x15c)][_0x1bdf3d(0x205)]=Z(_0xdb7471[_0x1bdf3d(0x15c)][_0x1bdf3d(0x205)])),_0xdb7471;}async[_0x1482ee(0x1bd)](_0x28e390,_0x1654fe=0x0){const _0x572d56=_0x1482ee;let _0x366c85=X(this['_config'][_0x572d56(0x100)],this[_0x572d56(0x139)]['unitType'],_0x572d56(0x101),this[_0x572d56(0x139)]['unitId'],_0x572d56(0x134));_0x366c85[_0x572d56(0xe9)][_0x572d56(0xf5)](_0x572d56(0x194),String(_0x28e390)),_0x366c85[_0x572d56(0xe9)][_0x572d56(0xf5)]('to',String(_0x1654fe));let _0x357813=await Y(this[_0x572d56(0x118)],_0x366c85);return this[_0x572d56(0xc4)][_0x572d56(0x15e)](),_0x357813;}async[_0x1482ee(0x1e3)](_0x30f3ab){const _0x1618bd=_0x1482ee;await this['_lease']['ensureOnline']();let _0x1a93fa=this[_0x1618bd(0xc4)][_0x1618bd(0x208)](_0x30f3ab['sid'],_0x30f3ab['reqId']),_0x198828={..._0x30f3ab,'memberID':this[_0x1618bd(0xc4)][_0x1618bd(0x193)],'revision':0x0,'type':this[_0x1618bd(0x139)]['unitType'],'unitID':this[_0x1618bd(0x139)][_0x1618bd(0x15d)],'userID':''},_0x3d7758=X(this[_0x1618bd(0x118)][_0x1618bd(0x105)],this['_target'][_0x1618bd(0xee)],'unit',this[_0x1618bd(0x139)][_0x1618bd(0x15d)],_0x1618bd(0x123)),_0x532527=this[_0x1618bd(0x118)][_0x1618bd(0x158)](_0x3d7758,{'body':JSON[_0x1618bd(0x1ab)]({'changeset':_0x198828,'memberID':this[_0x1618bd(0xc4)][_0x1618bd(0x193)],'type':this['_target']['unitType'],'unitID':this['_target']['unitId']}),'headers':{'content-type':_0x1618bd(0xc5)},'method':_0x1618bd(0x1ee)})[_0x1618bd(0xd3)](async _0x5e29cb=>_0x5e29cb[_0x1618bd(0x1e6)]===0x191||_0x5e29cb[_0x1618bd(0x1e6)]===0x193?_0x1618bd(0x16f):_0x5e29cb[_0x1618bd(0x1e6)]===0x190||_0x5e29cb[_0x1618bd(0x1e6)]===0x199?_0x1618bd(0x17d):_0x5e29cb['ok']?_0x1618bd(0xca):_0x1618bd(0x182))[_0x1618bd(0xa4)](()=>_0x1618bd(0x182)),_0x27985d=Ee(this['_config'][_0x1618bd(0x128)]),_0x152198=_0x532527[_0x1618bd(0xd3)](_0x28c3f5=>_0x28c3f5===_0x1618bd(0x16f)?{'status':'permission-rejected'}:_0x28c3f5===_0x1618bd(0x17d)?{'status':'changeset-rejected'}:new Promise(()=>void 0x0)),_0x3d5c48=await Promise[_0x1618bd(0x125)]([_0x1a93fa[_0x1618bd(0x172)],_0x152198,_0x27985d[_0x1618bd(0x172)]['then'](()=>({'status':_0x1618bd(0xa5)}))])[_0x1618bd(0xef)](()=>{const _0x596da3=_0x1618bd;_0x1a93fa[_0x596da3(0x1d9)](),_0x27985d['cancel']();});if(_0x3d5c48[_0x1618bd(0x1e6)]===_0x1618bd(0xa5)){let _0x3cbdb2=await _0x532527;return _0x3cbdb2==='permission'?{'message':_0x1618bd(0x157),'reason':_0x1618bd(0xe7),'status':_0x1618bd(0x99)}:_0x3cbdb2==='invalid'?{'message':_0x1618bd(0x12f),'reason':_0x1618bd(0x1b6),'status':'rejected'}:{'status':_0x1618bd(0x182)};}if(_0x3d5c48[_0x1618bd(0x1e6)]===_0x1618bd(0xdd))return{'status':'unknown'};if(_0x3d5c48[_0x1618bd(0x1e6)]==='retry')return{'status':_0x1618bd(0x201)};if(_0x3d5c48[_0x1618bd(0x1e6)]==='permission-rejected')return{'message':'Changeset\x20submission\x20was\x20denied','reason':_0x1618bd(0xe7),'status':_0x1618bd(0x99)};if(_0x3d5c48[_0x1618bd(0x1e6)]===_0x1618bd(0x1c7)){let _0x364bca=await this['fetchChangesets'](_0x30f3ab['baseRev'],_0x30f3ab['baseRev']);return{'message':_0x1618bd(0x12f),'reason':_0x364bca['latestRevision']!==void 0x0&&_0x364bca[_0x1618bd(0x127)]<_0x30f3ab[_0x1618bd(0x1f4)]?_0x1618bd(0x1bf):_0x1618bd(0x1b6),'status':'rejected'};}let _0x952b77=_0x3d5c48[_0x1618bd(0xc0)],_0x5b01eb=await this['fetchChangesets'](_0x30f3ab[_0x1618bd(0x1f4)],_0x952b77['revision']-0x1);if(_0x279d4e(_0x5b01eb['error'])){let _0x766fb6=_0x5b01eb['error'];throw new j(_0x1618bd(0x106),_0x766fb6?.[_0x1618bd(0xb9)]||'Failed\x20to\x20fetch\x20preceding\x20changesets',{'retryable':!0x0});}return{'acceptedChangeset':_0x952b77,'precedingChangesets':_0x5b01eb['changesets'],'status':_0x1618bd(0x189)};}async[_0x1482ee(0x10f)](){const _0x15764b=_0x1482ee;await this['_lease'][_0x15764b(0x10f)]();}};async function Y(_0x43c8da,_0xde85bf){const _0x1ee21e=_0x1482ee;let _0x166b79;try{_0x166b79=await _0x43c8da[_0x1ee21e(0x158)](_0xde85bf,{'method':_0x1ee21e(0xcd)});}catch(_0x5cc91a){throw new j(_0x1ee21e(0x106),'Collaboration\x20HTTP\x20request\x20failed',{'cause':_0x5cc91a,'retryable':!0x0});}if(!_0x166b79['ok'])throw new j(_0x1ee21e(0x106),_0x1ee21e(0x1c3)+_0x166b79[_0x1ee21e(0x1e6)],{'retryable':_0x166b79['status']>=0x1f4});try{return await _0x166b79[_0x1ee21e(0x11b)]();}catch(_0x2add52){throw new j(_0x1ee21e(0xd6),_0x1ee21e(0x110),{'cause':_0x2add52});}}function X(_0x218892,..._0x431f14){const _0x150eec=_0x1482ee;let _0x46c07b=new URL(_0x218892);return _0x46c07b[_0x150eec(0x11c)]=_0x46c07b[_0x150eec(0x11c)][_0x150eec(0x155)](/\/$/,'')+'/'+_0x431f14[_0x150eec(0x168)](_0x396719=>encodeURIComponent(String(_0x396719)))[_0x150eec(0x163)]('/'),_0x46c07b;}function Te(_0x5a708e){const _0x2746ed=_0x1482ee;if(!_0x5a708e)return;let _0x599a9c=[_0x5a708e[_0x2746ed(0x1fa)],_0x5a708e[_0x2746ed(0x1f1)],_0x5a708e['slide'],_0x5a708e['board']];for(let _0x1a786a of _0x599a9c)_0x1a786a&&typeof _0x1a786a[_0x2746ed(0x14a)]=='string'&&(_0x1a786a[_0x2746ed(0x14a)]=Z(_0x1a786a[_0x2746ed(0x14a)]));if(_0x5a708e['workbook']){for(let _0x2ca003 of Object[_0x2746ed(0x1e0)](_0x5a708e[_0x2746ed(0x1fa)][_0x2746ed(0xd2)]))typeof _0x2ca003[_0x2746ed(0x14a)]==_0x2746ed(0x132)&&(_0x2ca003[_0x2746ed(0x14a)]=Z(_0x2ca003[_0x2746ed(0x14a)]));}}function Z(_0x3037da){const _0x2416bc=_0x1482ee;return Uint8Array[_0x2416bc(0x194)](Buffer[_0x2416bc(0x194)](_0x3037da,_0x2416bc(0xfd)));}function Ee(_0x39516f){let _0x25fc3b;return{'cancel':()=>{_0x25fc3b!==void 0x0&&clearTimeout(_0x25fc3b);},'promise':new Promise(_0x4000b7=>{_0x25fc3b=setTimeout(_0x4000b7,_0x39516f);})};}var De=class{['_config'];[_0x1482ee(0x1ae)]=_0x1482ee(0x1f7);['_socket'];[_0x1482ee(0x1de)];[_0x1482ee(0x121)]='';['_joined']=new Map();[_0x1482ee(0x1be)]=new Map();['_submissionWaiters']=new Map();[_0x1482ee(0x1cf)]=new Map();[_0x1482ee(0x175)];[_0x1482ee(0x1cb)];[_0x1482ee(0x1fe)]=0x0;constructor(_0x63b627){const _0x2193a8=_0x1482ee;this[_0x2193a8(0x118)]=_0x63b627;}async[_0x1482ee(0xe4)](_0xb2dfdf){const _0x2938c8=_0x1482ee;let _0x4c8b99=this[_0x2938c8(0xad)][_0x2938c8(0x169)](_0xb2dfdf['unitId']);if(_0x4c8b99&&_0x4c8b99['target'][_0x2938c8(0xee)]!==_0xb2dfdf[_0x2938c8(0xee)])throw new j(_0x2938c8(0x202),'The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types');if(await this[_0x2938c8(0xa0)](),_0x4c8b99)_0x4c8b99[_0x2938c8(0x10b)]+=0x1;else{try{await this[_0x2938c8(0x191)](_0xb2dfdf);}catch(_0x1cbf87){throw this[_0x2938c8(0xad)][_0x2938c8(0x92)]===0x0&&(this[_0x2938c8(0x1ae)]=_0x2938c8(0xdd),this[_0x2938c8(0xbc)](),this[_0x2938c8(0xdb)]?.['close'](0x3e8,'Initial\x20Unit\x20JOIN\x20failed'),this[_0x2938c8(0xdb)]=void 0x0,this[_0x2938c8(0x121)]=''),_0x1cbf87;}this[_0x2938c8(0xad)]['set'](_0xb2dfdf['unitId'],{'leases':0x1,'target':_0xb2dfdf});}let _0x29c62c=!0x1,_0x4b50c2=()=>this[_0x2938c8(0x121)],_0x5e1ba1=new Set();return{'close':async()=>{const _0x19e01e=_0x2938c8;if(!_0x29c62c){_0x29c62c=!0x0;for(let _0x5eaa6c of _0x5e1ba1)_0x5eaa6c[_0x19e01e(0x1d9)]();_0x5e1ba1[_0x19e01e(0x15b)](),await this[_0x19e01e(0xf0)](_0xb2dfdf['unitId']);}},'ensureOnline':async()=>await this[_0x2938c8(0xa0)](),'getConnectionState':()=>_0x29c62c?_0x2938c8(0xdd):this[_0x2938c8(0x1ae)],get 'memberId'(){return _0x4b50c2();},'takeInboundChangesets':()=>{const _0x1b34d5=_0x2938c8;let _0x2522bd=this[_0x1b34d5(0x1cf)]['get'](_0xb2dfdf[_0x1b34d5(0x15d)])??[];return this[_0x1b34d5(0x1cf)]['delete'](_0xb2dfdf['unitId']),_0x2522bd;},'waitForSubmission':(_0x43e075,_0x5e2fb8)=>{const _0x2e623f=_0x2938c8;let _0x3a251f=this[_0x2e623f(0x18b)](_0x43e075,_0x5e2fb8);return _0x5e1ba1[_0x2e623f(0x1f0)](_0x3a251f),_0x3a251f[_0x2e623f(0x172)][_0x2e623f(0xd3)](()=>_0x5e1ba1['delete'](_0x3a251f),()=>_0x5e1ba1[_0x2e623f(0xcb)](_0x3a251f)),{'cancel':()=>{const _0x2fb0f3=_0x2e623f;_0x5e1ba1[_0x2fb0f3(0xcb)](_0x3a251f),_0x3a251f[_0x2fb0f3(0x1d9)]();},'promise':_0x3a251f[_0x2e623f(0x172)]};}};}async[_0x1482ee(0xa0)](){const _0x293cfb=_0x1482ee;if(this[_0x293cfb(0x1ae)]!==_0x293cfb(0x203)||this[_0x293cfb(0xdb)]?.[_0x293cfb(0x13f)]!==WebSocket[_0x293cfb(0x143)]){this[_0x293cfb(0x1cb)]!==void 0x0&&clearTimeout(this[_0x293cfb(0x1cb)]),this['_reconnectTimer']=void 0x0,this[_0x293cfb(0x1de)]??=this['_connect']();try{await this[_0x293cfb(0x1de)];}finally{this[_0x293cfb(0x1de)]=void 0x0;}}}async[_0x1482ee(0x1bc)](){const _0xb1283e=_0x1482ee;this[_0xb1283e(0x1ae)]='reconnecting';let _0x492d93=await this[_0xb1283e(0x118)][_0xb1283e(0x158)](this[_0xb1283e(0x118)][_0xb1283e(0x185)],{'headers':{'content-type':'application/json'},'method':'GET'});if(!_0x492d93['ok'])throw this['_state']=_0xb1283e(0x1f7),new j('COLLABORATION_UNAVAILABLE',_0xb1283e(0x141)+_0x492d93[_0xb1283e(0x1e6)],{'retryable':_0x492d93[_0xb1283e(0x1e6)]>=0x1f4});let _0x573e71=await _0x492d93[_0xb1283e(0x11b)]();if(typeof _0x573e71[_0xb1283e(0xcc)]!=_0xb1283e(0x132)||_0x573e71['ticket']['length']===0x0)throw this['_state']=_0xb1283e(0x1f7),new j(_0xb1283e(0xd6),_0xb1283e(0x1ff));let _0x4ff792=new URL(this[_0xb1283e(0x118)]['collabWebSocketUrl']);_0x4ff792[_0xb1283e(0xe9)][_0xb1283e(0xf5)]('sessionTicket',_0x573e71['ticket']);let _0x2ab2d2=new WebSocket(_0x4ff792);this[_0xb1283e(0xdb)]=_0x2ab2d2,_0x2ab2d2['addEventListener'](_0xb1283e(0xb9),_0x43566c=>this[_0xb1283e(0xb5)](_0x43566c)),_0x2ab2d2[_0xb1283e(0xa7)](_0xb1283e(0x10f),()=>{const _0x50141d=_0xb1283e;this['_socket']===_0x2ab2d2&&(this[_0x50141d(0xbc)](),this[_0x50141d(0x11d)](new j(_0x50141d(0x106),_0x50141d(0x150),{'retryable':!0x0})),this[_0x50141d(0x1ae)]=this[_0x50141d(0xad)][_0x50141d(0x92)]===0x0?_0x50141d(0xdd):'reconnecting',this[_0x50141d(0xad)][_0x50141d(0x92)]>0x0&&this[_0x50141d(0x19d)]());}),await Oe(_0x2ab2d2);let _0x251b42=await this[_0xb1283e(0x12d)](_0x66851[_0xb1283e(0xc8)],'',{'cmd':_0x66851[_0xb1283e(0xc8)],'routeKey':''});if(_0x251b42[_0xb1283e(0x1a4)]!==_0x39ab32['OK']||typeof _0x251b42['infoRsp']?.[_0xb1283e(0x180)]!=_0xb1283e(0x132))throw _0x2ab2d2[_0xb1283e(0x10f)](),new j(_0xb1283e(0xd6),_0xb1283e(0x195));this['_memberId']=_0x251b42[_0xb1283e(0x17a)][_0xb1283e(0x180)],this['_state']=_0xb1283e(0x203);for(let {target:_0x8174dd}of this['_joined'][_0xb1283e(0x1e0)]())try{await this[_0xb1283e(0x191)](_0x8174dd);}catch(_0x35e1a9){throw _0x2ab2d2[_0xb1283e(0x10f)](0x3f3,'Failed\x20to\x20rejoin\x20Unit\x20room'),_0x35e1a9;}this[_0xb1283e(0x1fe)]=0x0,this[_0xb1283e(0x1b7)]();}async[_0x1482ee(0x191)](_0x44e235){const _0x27b6ed=_0x1482ee;let _0x43af65=await this['_requestCommand'](_0x66851['JOIN'],_0x44e235['unitId'],{'cmd':_0x66851['JOIN'],'joinReq':{'rooms':[{'args':'','roomID':_0x44e235[_0x27b6ed(0x15d)]}]},'routeKey':_0x44e235[_0x27b6ed(0x15d)]});if(_0x43af65[_0x27b6ed(0x1a4)]!==_0x39ab32['OK'])throw new j(_0x27b6ed(0x106),typeof _0x43af65[_0x27b6ed(0xba)]==_0x27b6ed(0x132)?_0x43af65[_0x27b6ed(0xba)]:'Failed\x20to\x20join\x20Unit\x20room');}[_0x1482ee(0x12d)](_0x60f88f,_0x39ba6e,_0x10de7a){const _0x504a04=_0x1482ee;let _0x5838d5=this[_0x504a04(0xdb)];if(!_0x5838d5||_0x5838d5[_0x504a04(0x13f)]!==WebSocket[_0x504a04(0x143)])return Promise[_0x504a04(0x1a1)](new j('COLLABORATION_UNAVAILABLE',_0x504a04(0x142),{'retryable':!0x0}));let _0x27f353=_0x60f88f+':'+_0x39ba6e;return new Promise((_0x5dee31,_0x59dc84)=>{const _0x2ebfdf=_0x504a04;if(this['_commandWaiters'][_0x2ebfdf(0x140)](_0x27f353)){_0x59dc84(new j(_0x2ebfdf(0xd6),'A\x20'+_0x60f88f+_0x2ebfdf(0x167)+_0x39ba6e));return;}let _0x2a9adc=setTimeout(()=>{const _0x19f6ac=_0x2ebfdf;this[_0x19f6ac(0x1be)][_0x19f6ac(0xcb)](_0x27f353),_0x59dc84(new j(_0x19f6ac(0x106),'Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20'+_0x60f88f,{'retryable':!0x0}));},0x7530);this[_0x2ebfdf(0x1be)][_0x2ebfdf(0xf5)](_0x27f353,{'reject':_0x59dc84,'resolve':_0x5dee31,'timer':_0x2a9adc});try{_0x5838d5['send'](JSON['stringify'](_0x10de7a));}catch(_0x205454){this[_0x2ebfdf(0x1be)][_0x2ebfdf(0xcb)](_0x27f353),clearTimeout(_0x2a9adc),_0x59dc84(new j(_0x2ebfdf(0x106),'Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command',{'cause':_0x205454,'retryable':!0x0}));}});}['_handleMessage'](_0x15e673){const _0xefcc88=_0x1482ee;if(typeof _0x15e673[_0xefcc88(0x205)]!=_0xefcc88(0x132))return;let _0x129bc0;try{_0x129bc0=JSON['parse'](_0x15e673[_0xefcc88(0x205)]);}catch{this[_0xefcc88(0xdb)]?.[_0xefcc88(0x10f)](0x3eb,'Invalid\x20JSON\x20response');return;}let _0x75ed75=typeof _0x129bc0[_0xefcc88(0x14e)]==_0xefcc88(0x132)?_0x129bc0[_0xefcc88(0x14e)]:'';if(_0x129bc0[_0xefcc88(0x19a)]===_0x66851[_0xefcc88(0xc8)]||_0x129bc0[_0xefcc88(0x19a)]===_0x66851[_0xefcc88(0xb8)]||_0x129bc0['cmd']===_0x66851[_0xefcc88(0x174)]){let _0x413371=_0x129bc0['cmd']+':'+_0x75ed75,_0x3c64c5=this[_0xefcc88(0x1be)][_0xefcc88(0x169)](_0x413371);_0x3c64c5&&(this[_0xefcc88(0x1be)][_0xefcc88(0xcb)](_0x413371),clearTimeout(_0x3c64c5[_0xefcc88(0x16d)]),_0x3c64c5['resolve'](_0x129bc0));return;}_0x129bc0[_0xefcc88(0x19a)]!==_0x66851[_0xefcc88(0x196)]||!_0x129bc0['collaMsg']||this[_0xefcc88(0x1da)](_0x75ed75,_0x129bc0[_0xefcc88(0x1dc)]);}[_0x1482ee(0x1da)](_0x179f68,_0x31dfd6){const _0x32af12=_0x1482ee;let _0x5a1ef7=_0x31dfd6[_0x32af12(0x103)],_0x40e6f6=_0x5a1ef7===_0x32af12(0xc7)?_0x32af12(0x1b1):_0x5a1ef7==='changeset_rej'?_0x32af12(0x1d2):_0x5a1ef7===_0x32af12(0x1ad)?'csShouldRetryEvent':_0x5a1ef7===_0x32af12(0xe1)?_0x32af12(0x160):_0x5a1ef7===_0x32af12(0x13d)?'newCsEvent':void 0x0;if(!_0x40e6f6)return;let _0x5883bc=ke(_0x31dfd6[_0x40e6f6]);if(!_0x5883bc||_0x5883bc[_0x32af12(0xc2)]!==_0x179f68)return;if(_0x5a1ef7===_0x32af12(0x13d)){let _0x367a90=this[_0x32af12(0x1cf)][_0x32af12(0x169)](_0x179f68)??[];_0x367a90[_0x32af12(0xdc)](_0x5883bc),this['_inbound'][_0x32af12(0xf5)](_0x179f68,_0x367a90);return;}let _0x56c96c=Q(_0x5883bc['sid'],_0x5883bc['reqId']),_0x30418e=this[_0x32af12(0x152)][_0x32af12(0x169)](_0x56c96c);_0x30418e&&_0x30418e(_0x5a1ef7===_0x32af12(0xc7)?{'changeset':_0x5883bc,'status':_0x32af12(0xfb)}:_0x5a1ef7===_0x32af12(0x1ad)?{'status':_0x32af12(0x201)}:_0x5a1ef7===_0x32af12(0xe1)?{'status':'permission-rejected'}:{'status':'changeset-rejected'});}[_0x1482ee(0x18b)](_0x2f9b02,_0x22eea8){const _0x4d9fb2=_0x1482ee;let _0x1695f4=Q(_0x2f9b02,_0x22eea8);if(this[_0x4d9fb2(0x152)]['has'](_0x1695f4))return{'cancel':()=>void 0x0,'promise':Promise[_0x4d9fb2(0x1a1)](new j(_0x4d9fb2(0x202),'The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight'))};let _0x5aaf22=()=>void 0x0;return{'cancel':()=>_0x5aaf22({'status':_0x4d9fb2(0xdd)}),'promise':new Promise(_0x34f156=>{const _0x54fb55=_0x4d9fb2;_0x5aaf22=_0xf0f825=>{this['_submissionWaiters']['delete'](_0x1695f4)&&_0x34f156(_0xf0f825);},this[_0x54fb55(0x152)]['set'](_0x1695f4,_0x5aaf22);})};}async[_0x1482ee(0xf0)](_0xa0b60b){const _0x3f3c42=_0x1482ee;let _0x525430=this[_0x3f3c42(0xad)][_0x3f3c42(0x169)](_0xa0b60b);_0x525430&&(--_0x525430[_0x3f3c42(0x10b)],!(_0x525430[_0x3f3c42(0x10b)]>0x0)&&(this['_joined'][_0x3f3c42(0xcb)](_0xa0b60b),this['_inbound'][_0x3f3c42(0xcb)](_0xa0b60b),this[_0x3f3c42(0xdb)]?.[_0x3f3c42(0x13f)]===WebSocket[_0x3f3c42(0x143)]&&this[_0x3f3c42(0xdb)][_0x3f3c42(0x147)](JSON['stringify']({'cmd':_0x66851[_0x3f3c42(0xa9)],'leaveReq':{'args':'','roomID':_0xa0b60b},'routeKey':_0xa0b60b})),this[_0x3f3c42(0xad)][_0x3f3c42(0x92)]===0x0&&(this[_0x3f3c42(0x1ae)]=_0x3f3c42(0xdd),this[_0x3f3c42(0x1cb)]!==void 0x0&&clearTimeout(this[_0x3f3c42(0x1cb)]),this[_0x3f3c42(0x1cb)]=void 0x0,this[_0x3f3c42(0xbc)](),this['_socket']?.['close'](0x3e8,_0x3f3c42(0x129)),this[_0x3f3c42(0xdb)]=void 0x0,this[_0x3f3c42(0x121)]='')));}[_0x1482ee(0x19d)](){const _0x31c656=_0x1482ee;if(this[_0x31c656(0x1cb)]!==void 0x0||this[_0x31c656(0x1fe)]>=0x3){this[_0x31c656(0x1fe)]>=0x3&&(this[_0x31c656(0x1ae)]='offline');return;}let _0x3a550e=Math[_0x31c656(0x171)](0x3e8*0x2**this['_reconnectAttempts'],0x4e20);this[_0x31c656(0x1fe)]+=0x1,this['_reconnectTimer']=setTimeout(()=>{const _0x22505a=_0x31c656;this[_0x22505a(0x1cb)]=void 0x0,this[_0x22505a(0x1de)]??=this[_0x22505a(0x1bc)](),this['_connectPromise']['catch'](()=>this[_0x22505a(0x19d)]())[_0x22505a(0xef)](()=>{const _0x4fb4d2=_0x22505a;this[_0x4fb4d2(0x1de)]=void 0x0;});},_0x3a550e);}[_0x1482ee(0x1b7)](){const _0x380082=_0x1482ee;this[_0x380082(0xbc)](),this[_0x380082(0x175)]=setInterval(()=>{const _0x4ca058=_0x380082;this[_0x4ca058(0x1ae)]===_0x4ca058(0x203)&&this[_0x4ca058(0x12d)](_0x66851[_0x4ca058(0x174)],'',{'cmd':_0x66851['HEARTBEAT'],'routeKey':''})[_0x4ca058(0xa4)](()=>this['_socket']?.[_0x4ca058(0x10f)](0x3f3,_0x4ca058(0x1b2)));},0x7530);}[_0x1482ee(0xbc)](){const _0x846731=_0x1482ee;this[_0x846731(0x175)]!==void 0x0&&clearInterval(this['_heartbeat']),this[_0x846731(0x175)]=void 0x0;}['_failCommandWaiters'](_0x2c7116){const _0x1d364b=_0x1482ee;for(let _0x2bb49c of this[_0x1d364b(0x1be)][_0x1d364b(0x1e0)]())clearTimeout(_0x2bb49c[_0x1d364b(0x16d)]),_0x2bb49c[_0x1d364b(0x1a1)](_0x2c7116);this['_commandWaiters'][_0x1d364b(0x15b)]();}};function Oe(_0x859e6b){return new Promise((_0x151ad2,_0x2bd6ab)=>{const _0x11c74b=_0x1727;let _0x101ba6=()=>{const _0x63e6d2=_0x1727;clearTimeout(_0x3ee492),_0x859e6b['removeEventListener'](_0x63e6d2(0x10f),_0x161c46),_0x859e6b[_0x63e6d2(0x1c0)](_0x63e6d2(0x186),_0x2921e3),_0x859e6b['removeEventListener'](_0x63e6d2(0x159),_0x472aa2);},_0x11e69e=_0x42a318=>{const _0x9af8fc=_0x1727;_0x101ba6(),_0x2bd6ab(new j(_0x9af8fc(0x106),_0x42a318,{'retryable':!0x0}));},_0x161c46=()=>_0x11e69e('Collaboration\x20WebSocket\x20closed\x20before\x20opening'),_0x2921e3=()=>_0x11e69e(_0x11c74b(0x145)),_0x472aa2=()=>{_0x101ba6(),_0x151ad2();},_0x3ee492=setTimeout(()=>{const _0x145820=_0x11c74b;_0x11e69e(_0x145820(0x1c8)),_0x859e6b['close'](0x3e8,_0x145820(0x14c));},0x7530);_0x859e6b[_0x11c74b(0xa7)](_0x11c74b(0x10f),_0x161c46,{'once':!0x0}),_0x859e6b[_0x11c74b(0xa7)]('error',_0x2921e3,{'once':!0x0}),_0x859e6b[_0x11c74b(0xa7)]('open',_0x472aa2,{'once':!0x0});});}function ke(_0x3a931c){const _0x5a55c5=_0x1482ee;if(!_0x3a931c||typeof _0x3a931c!='object')return null;let _0x2dd220=_0x3a931c['cs'];return _0x2dd220&&typeof _0x2dd220==_0x5a55c5(0xb7)?_0x2dd220:null;}function Q(_0x58ec9d,_0x2bbc69){return(_0x58ec9d??'')+':'+(_0x2bbc69??0x0);}var Ae=class{[_0x1482ee(0x118)];[_0x1482ee(0x209)];constructor(_0xed206e){const _0x465153=_0x1482ee;this[_0x465153(0x118)]=je(_0xed206e),this[_0x465153(0x209)]=new De(this[_0x465153(0x118)]);}async[_0x1482ee(0x159)](_0x39a929){const _0x30e189=_0x1482ee;let _0x2c5f97=await this['_connection']['acquire'](_0x39a929);return new we(this[_0x30e189(0x118)],_0x39a929,_0x2c5f97);}};function je(_0x4bbccc){const _0x4f7923=_0x1482ee;let _0x244dab=$(_0x4bbccc[_0x4f7923(0x100)],_0x4f7923(0x100),[_0x4f7923(0xc6),'https:']),_0x43578d=$(_0x4bbccc[_0x4f7923(0x105)],_0x4f7923(0x105),[_0x4f7923(0xc6),_0x4f7923(0x107)]),_0x350cb1=$(_0x4bbccc['collabWebSocketUrl'],_0x4f7923(0x1b8),[_0x4f7923(0x1e9),_0x4f7923(0x13a),_0x4f7923(0xc6),'https:']);_0x350cb1[_0x4f7923(0x15f)]===_0x4f7923(0xc6)&&(_0x350cb1['protocol']=_0x4f7923(0x1e9)),_0x350cb1[_0x4f7923(0x15f)]===_0x4f7923(0x107)&&(_0x350cb1['protocol']=_0x4f7923(0x13a));let _0x24ad3c=$(_0x4bbccc['wsSessionTicketUrl'],_0x4f7923(0x185),[_0x4f7923(0xc6),'https:']),_0x2a2dd3=_0x4bbccc[_0x4f7923(0x128)]??0x7530;if(!Number['isSafeInteger'](_0x2a2dd3)||_0x2a2dd3<=0x0)throw new j(_0x4f7923(0x202),_0x4f7923(0x16c));return{'collabSubmitChangesetUrl':_0x43578d,'collabWebSocketUrl':_0x350cb1,'commitTimeoutMs':_0x2a2dd3,'httpRequest':_0x4bbccc['httpRequest']??globalThis[_0x4f7923(0x1df)][_0x4f7923(0xe5)](globalThis),'snapshotServerUrl':_0x244dab,'wsSessionTicketUrl':_0x24ad3c};}function $(_0x4c4b08,_0x593d72,_0x172170){const _0x357fd9=_0x1482ee;let _0x1308fd;try{_0x1308fd=new URL(_0x4c4b08);}catch{throw new j(_0x357fd9(0x202),_0x593d72+_0x357fd9(0xf6));}if(!_0x172170['includes'](_0x1308fd[_0x357fd9(0x15f)]))throw new j(_0x357fd9(0x202),_0x593d72+_0x357fd9(0x1c5));return _0x1308fd;}function Me(_0x47a772){return new Ae(_0x47a772);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
1
+ const _0x5e6b2d=_0x67e3;(function(_0x18d7cb,_0x423073){const _0xb55c68=_0x67e3,_0x4f633f=_0x18d7cb();while(!![]){try{const _0x53c35c=-parseInt(_0xb55c68(0x1af))/0x1*(-parseInt(_0xb55c68(0x1c6))/0x2)+-parseInt(_0xb55c68(0x2e5))/0x3+parseInt(_0xb55c68(0x291))/0x4+parseInt(_0xb55c68(0x2fd))/0x5*(parseInt(_0xb55c68(0x2ea))/0x6)+-parseInt(_0xb55c68(0x315))/0x7*(parseInt(_0xb55c68(0x230))/0x8)+parseInt(_0xb55c68(0x24b))/0x9+-parseInt(_0xb55c68(0x1b6))/0xa;if(_0x53c35c===_0x423073)break;else _0x4f633f['push'](_0x4f633f['shift']());}catch(_0x18e37c){_0x4f633f['push'](_0x4f633f['shift']());}}}(_0x1384,0xd8e4f));import{CommandType as _0x583014,DependentOn as _0x57fa7a,ICommandService as _0x4398d7,IUniverInstanceService as _0x36c186,Inject as _0x191d9f,Injector as _0x857fc3,Plugin as _0x3590eb,UniverInstanceType as _0x35327a,registerDependencies as _0x2bb7ea,sequenceExecute as _0x200257,toDisposable as _0x21f8ea}from'@univerjs/core';import{CompressMutationService as _0x125608,ISnapshotServerService as _0x32e3ff,ITransformService as _0x1a5c37,RevertRevisionMutation as _0x5c912b,RevisionService as _0x2dad72,SnapshotService as _0x16d22b,UniverCollaborationPlugin as _0x59c157,isTransformMutationsSuccess as _0x5569a7,parseChangesetToProtocol as _0x14fe0e,parseMutationToProtocol as _0x46de9d,parseProtocolChangeset as _0x22f50a,transformSnapshotToBaseData as _0x3ded75,transformSnapshotToBoardData as _0x4c8227,transformSnapshotToDocumentData as _0x1dbd3a,transformSnapshotToSlideData as _0x226a08,transformSnapshotToWorkbookData as _0x2c2b13}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x1a0611}from'@univerjs/engine-formula';import{CmdRspCode as _0x21c0c8,CombCmd as _0x53cd9f,isError as _0x3e8af9}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x565be5}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0xe139b,RichTextEditingMutation as _0x21bc91}from'@univerjs/docs';import{IRenderManagerService as _0x1756f2}from'@univerjs/engine-render';import{FUniver as _0x23ff19}from'@univerjs/core/facade';import'@univerjs-pro/bases/facade';import'@univerjs-pro/boards/facade';import'@univerjs-pro/slides/facade';import'@univerjs/docs/facade';import'@univerjs/sheets/facade';import _0x4cf2f2 from'@oxc-project/runtime/helpers/decorateParam';import _0x2174d4 from'@oxc-project/runtime/helpers/decorate';var j=class extends Error{['code'];['retryable'];constructor(_0x5eb151,_0x55f2af,_0x1cb9a2={}){const _0x4b1519=_0x67e3;super(_0x55f2af,_0x1cb9a2),this[_0x4b1519(0x286)]='CollaborationRuntimeError',this[_0x4b1519(0x207)]=_0x5eb151,this['retryable']=_0x1cb9a2[_0x4b1519(0x24c)]??!0x1;}},se=class{[_0x5e6b2d(0x321)];[_0x5e6b2d(0x20a)];[_0x5e6b2d(0x2ae)]=[];[_0x5e6b2d(0x1d6)]=[];['_suppressionDepth']=0x0;constructor(_0x120bb2,_0x4a42a3,_0x28386c){const _0x1bd113=_0x5e6b2d;this[_0x1bd113(0x321)]=_0x120bb2,this['_unitId']=_0x4a42a3,this[_0x1bd113(0x1d6)]['push'](_0x120bb2[_0x1bd113(0x23e)][_0x1bd113(0x233)]((_0x2d7f71,_0x1debdd)=>{const _0x87d56b=_0x1bd113;this[_0x87d56b(0x1de)](_0x2d7f71,_0x1debdd,_0x28386c);})),_0x28386c===_0x35327a[_0x1bd113(0x2de)]&&(_0x120bb2[_0x1bd113(0x269)][_0x1bd113(0x31e)](_0x1756f2),this[_0x1bd113(0x2f1)]());}get[_0x5e6b2d(0x242)](){const _0x582851=_0x5e6b2d;return this[_0x582851(0x2ae)];}[_0x5e6b2d(0x1e3)](_0x341ac1){const _0x559e29=_0x5e6b2d;return this[_0x559e29(0x2ae)]['slice'](_0x341ac1);}[_0x5e6b2d(0x1ee)](_0x3d8bf8){const _0x2fe100=_0x5e6b2d;this[_0x2fe100(0x2ae)][_0x2fe100(0x2b9)](0x0,this[_0x2fe100(0x2ae)][_0x2fe100(0x31c)],..._0x3d8bf8);}['takePending'](){const _0x3e2247=_0x5e6b2d;return this[_0x3e2247(0x2ae)][_0x3e2247(0x2b9)](0x0);}[_0x5e6b2d(0x246)](_0x944f72){const _0x2d6a38=_0x5e6b2d;this['_pending'][_0x2d6a38(0x303)](..._0x944f72);}async['suppress'](_0x40953d){const _0x578073=_0x5e6b2d;this[_0x578073(0x29c)]+=0x1;try{return await _0x40953d();}finally{--this[_0x578073(0x29c)];}}['dispose'](){const _0x103394=_0x5e6b2d;for(let _0x7129c5 of this[_0x103394(0x1d6)]['splice'](0x0))_0x7129c5[_0x103394(0x24a)]();}[_0x5e6b2d(0x1de)](_0xc2401f,_0x2f0de9,_0x33a9d6){const _0x46dbe7=_0x5e6b2d;if(this[_0x46dbe7(0x29c)]>0x0||_0xc2401f[_0x46dbe7(0x1ce)]!==_0x583014[_0x46dbe7(0x2f4)]||_0x2f0de9?.[_0x46dbe7(0x1f2)]||_0x2f0de9?.[_0x46dbe7(0x296)]||_0x2f0de9?.['onlyLocal'])return;let _0xa95c44=_0xc2401f['params'];if(_0xa95c44?.[_0x46dbe7(0x274)]!==void 0x0&&_0xa95c44['unitId']!==this[_0x46dbe7(0x20a)]){if(_0xa95c44[_0x46dbe7(0x1bc)]===_0x565be5['id'])return;throw new j('COLLABORATION_INVALID_INPUT','Runtime\x20for\x20'+this['_unitId']+_0x46dbe7(0x201)+_0xc2401f['id']+_0x46dbe7(0x29f)+String(_0xa95c44['unitId']));}if(_0xa95c44?.['unitId']===void 0x0||_0x33a9d6===_0x35327a[_0x46dbe7(0x2de)]&&_0xc2401f['id']===_0x21bc91['id'])return;if(_0xc2401f['id']===_0x5c912b['id'])throw new j(_0x46dbe7(0x2bf),_0x46dbe7(0x1be));let _0x3649e5=_0xc2401f,_0xbb025a=this[_0x46dbe7(0x321)][_0x46dbe7(0x2f2)][_0x46dbe7(0x2d8)][_0x46dbe7(0x2d9)]()[_0x46dbe7(0x2ee)],_0x35ce6d=(this[_0x46dbe7(0x321)]['compressMutationService'][_0x46dbe7(0x2d8)][_0x46dbe7(0x1ed)](_0xbb025a)([_0x3649e5],this['_kernel'][_0x46dbe7(0x297)])??[_0x3649e5])[0x0];_0x35ce6d&&this['_pending']['push'](_0x46de9d(_0x35ce6d));}[_0x5e6b2d(0x2f1)](){const _0x536276=_0x5e6b2d;let _0x5de587=this[_0x536276(0x321)][_0x536276(0x269)][_0x536276(0x31e)](_0xe139b)[_0x536276(0x20b)][_0x536276(0x2ba)](_0x46c99e=>{const _0x3bea02=_0x536276;if(this[_0x3bea02(0x29c)]>0x0||_0x46c99e?.['unitId']!==this[_0x3bea02(0x20a)])return;let _0x1d09fe={'id':_0x46c99e['commandId'],'params':{'actions':_0x46c99e[_0x3bea02(0x300)]['actions'],'textRanges':null,'unitId':_0x46c99e['unitId']},'type':_0x583014[_0x3bea02(0x2f4)]};this[_0x3bea02(0x2ae)][_0x3bea02(0x1d8)](_0x46de9d(_0x1d09fe));});this[_0x536276(0x1d6)][_0x536276(0x1d8)](_0x21f8ea(()=>_0x5de587[_0x536276(0x237)]()));}},ce=new Set([_0x5e6b2d(0x1e1),_0x5e6b2d(0x200),_0x5e6b2d(0x217),_0x5e6b2d(0x316),_0x5e6b2d(0x1e9),_0x5e6b2d(0x1e0),_0x5e6b2d(0x20e)]),le=new Set([_0x5e6b2d(0x236),_0x5e6b2d(0x306),'createWorkbook',_0x5e6b2d(0x280),'createPresentation','createUniverSheet','disposeUnit']);function ue(_0x325e6d,_0x1d4b63,_0x24487c){const _0x1056d5=_0x5e6b2d;let _0x443915=_0x23ff19[_0x1056d5(0x1cf)](_0x325e6d);return{async 'execute'(_0x5b528e,_0x403684){const _0x4a9eaa=_0x1056d5;if(_0x5b528e[_0x4a9eaa(0x31c)]>_0x24487c)throw new j(_0x4a9eaa(0x2bf),_0x4a9eaa(0x1f5)+_0x24487c+_0x4a9eaa(0x1cc));let _0x1add65=_0x403684===_0x4a9eaa(0x307)?M(_0x443915):void 0x0,_0x42e4d1=de(_0x443915,_0x1d4b63);try{return await Function('univerAPI',_0x4a9eaa(0x253)+_0x5b528e+_0x4a9eaa(0x2eb))(_0x42e4d1);}finally{_0x1add65?.[_0x4a9eaa(0x24a)]();}}};}function de(_0x58a501,_0x360fdf){return new Proxy(_0x58a501,{'get'(_0x21341f,_0x37bd63,_0x4cdd0a){const _0x786e14=_0x67e3;return le[_0x786e14(0x30d)](_0x37bd63)?()=>{const _0x52b291=_0x786e14;throw new j('COLLABORATION_INVALID_INPUT',_0x52b291(0x1fc)+_0x360fdf+'\x20cannot\x20call\x20'+String(_0x37bd63));}:Reflect['get'](_0x21341f,_0x37bd63,_0x4cdd0a);}});}function M(_0x459ada){const _0x4655a5=_0x5e6b2d;return _0x459ada['addEvent'](_0x459ada[_0x4655a5(0x216)]['BeforeCommandExecute'],_0x2e00b5=>{const _0x4b95af=_0x4655a5;let _0x342459=_0x2e00b5;if(N(_0x342459))throw _0x342459[_0x4b95af(0x229)]=!0x0,new j('COLLABORATION_INVALID_INPUT',_0x4b95af(0x2a9)+_0x342459['id']);});}function N(_0x53e69e){const _0x2a4f6b=_0x5e6b2d;return _0x53e69e['type']===_0x583014['COMMAND']||_0x53e69e[_0x2a4f6b(0x1ce)]===_0x583014['MUTATION']&&!ce[_0x2a4f6b(0x30d)](_0x53e69e['id']);}function P(_0x3aedfe){const _0x2ea103=_0x5e6b2d;if(_0x3aedfe===void 0x0)return null;if(_0x3aedfe===null||typeof _0x3aedfe==_0x2ea103(0x276)||typeof _0x3aedfe=='string')return _0x3aedfe;if(typeof _0x3aedfe==_0x2ea103(0x1df)){if(Number['isFinite'](_0x3aedfe))return _0x3aedfe;throw I();}if(Array[_0x2ea103(0x31d)](_0x3aedfe))return _0x3aedfe[_0x2ea103(0x1db)](P);if(F(_0x3aedfe))return Object[_0x2ea103(0x26b)](Object[_0x2ea103(0x261)](_0x3aedfe)[_0x2ea103(0x1db)](([_0x42670d,_0x3d5277])=>[_0x42670d,P(_0x3d5277)]));throw I();}function F(_0x6998e){const _0x59e54b=_0x5e6b2d;if(typeof _0x6998e!='object'||!_0x6998e)return!0x1;let _0xa4e254=Object[_0x59e54b(0x2e9)](_0x6998e);return _0xa4e254===Object['prototype']||_0xa4e254===null;}function I(){const _0xb488ef=_0x5e6b2d;return new j(_0xb488ef(0x2bf),_0xb488ef(0x1c4));}var L=class{[_0x5e6b2d(0x30f)]=Promise[_0x5e6b2d(0x232)]();[_0x5e6b2d(0x223)](_0x209990){const _0x48969c=_0x5e6b2d;let _0xe016a3=this[_0x48969c(0x30f)][_0x48969c(0x1e7)](_0x209990,_0x209990);return this['_tail']=_0xe016a3[_0x48969c(0x1e7)](()=>void 0x0,()=>void 0x0),_0xe016a3;}};function R(_0x273a66,_0x5b7159,_0x2ac1d1,_0x550984){const _0x2a78aa=_0x5e6b2d;if(!Array[_0x2a78aa(0x31d)](_0x273a66))throw new j(_0x2a78aa(0x21d),_0x2a78aa(0x290));let _0x734ef1=[..._0x273a66]['sort']((_0x2737df,_0x480dfc)=>_0x2737df[_0x2a78aa(0x2f6)]-_0x480dfc[_0x2a78aa(0x2f6)]),_0xef61d4=_0x550984;for(let _0x4fa432 of _0x734ef1){if(!_0x4fa432||typeof _0x4fa432!=_0x2a78aa(0x23f)||!Array[_0x2a78aa(0x31d)](_0x4fa432[_0x2a78aa(0x2ab)])||_0x4fa432[_0x2a78aa(0x2ab)][_0x2a78aa(0x1c2)](_0x36e677=>!_0x36e677||typeof _0x36e677!=_0x2a78aa(0x23f)||!('id'in _0x36e677)||typeof _0x36e677['id']!=_0x2a78aa(0x241)||!('data'in _0x36e677)||typeof _0x36e677[_0x2a78aa(0x295)]!=_0x2a78aa(0x241))||!Number[_0x2a78aa(0x1b1)](_0x4fa432[_0x2a78aa(0x324)])||!Number[_0x2a78aa(0x1b1)](_0x4fa432[_0x2a78aa(0x2f6)])||_0x4fa432[_0x2a78aa(0x23b)]!==_0x5b7159||_0x4fa432[_0x2a78aa(0x1ce)]!==_0x2ac1d1||_0x4fa432[_0x2a78aa(0x324)]!==_0xef61d4||_0x4fa432['revision']!==_0xef61d4+0x1)throw new j(_0x2a78aa(0x21d),_0x2a78aa(0x289));_0xef61d4=_0x4fa432[_0x2a78aa(0x2f6)];}return _0x734ef1;}function z(_0x4ee90d){const _0x1951d0=_0x5e6b2d;return{'baseRevision':_0x4ee90d[_0x1951d0(0x324)],'mutationCount':_0x4ee90d[_0x1951d0(0x2ab)][_0x1951d0(0x31c)],'revision':_0x4ee90d[_0x1951d0(0x2f6)],..._0x4ee90d[_0x1951d0(0x287)]===void 0x0?{}:{'sid':_0x4ee90d[_0x1951d0(0x287)]},..._0x4ee90d[_0x1951d0(0x2df)]===void 0x0?{}:{'reqId':_0x4ee90d[_0x1951d0(0x2df)]}};}function B(_0x341338,_0x185351,_0x536c58,_0x308068,_0xf54baa,_0x5c6a6e='initial'){const _0x124d15=_0x5e6b2d;if(_0xf54baa[_0x124d15(0x1c2)](_0xea8157=>_0xea8157[_0x124d15(0x2ab)][_0x124d15(0x1c2)](_0x155f81=>_0x155f81['id']===_0x5c912b['id'])))throw new j(_0x124d15(0x21d),_0x124d15(0x1c7));let _0x20b908=_0x308068;for(let _0x203d96 of _0xf54baa){let _0x18b0c5=_0x20b908+0x1;if(_0x203d96['unitID']!==_0x185351||_0x203d96[_0x124d15(0x1ce)]!==_0x536c58||_0x203d96[_0x124d15(0x324)]!==_0x20b908||_0x203d96['revision']!==_0x18b0c5)throw new j(_0x124d15(0x21d),_0x124d15(0x2c5));let _0x61a760=_0x22f50a(_0x203d96),_0x4ead8e=_0x341338[_0x124d15(0x2f2)]['interceptor'][_0x124d15(0x2d9)]()['COMPRESS_MUTATION_APPLY'],_0x44431f=_0x341338[_0x124d15(0x2f2)][_0x124d15(0x2d8)]['fetchThroughInterceptors'](_0x4ead8e)(_0x61a760[_0x124d15(0x2ab)],null)??_0x61a760[_0x124d15(0x2ab)],_0x31225b=_0x200257(_0x44431f,_0x341338[_0x124d15(0x23e)],_0x5c6a6e===_0x124d15(0x20d)?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x31225b['result'])throw new j('COLLABORATION_LOAD_FAILED',_0x124d15(0x282)+_0x31225b[_0x124d15(0x25a)]+':\x20'+String(_0x31225b['error']));let _0x4063ca=_0x341338[_0x124d15(0x1b8)][_0x124d15(0x2b0)](_0x185351);if(_0x4063ca!==_0x18b0c5)throw new j(_0x124d15(0x21d),'Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision');_0x20b908=_0x4063ca;}return _0x20b908;}function V(_0x283ae2,_0x38c978,_0x145650){const _0x48c54a=_0x5e6b2d;let _0x305eeb=_0x23ff19['newAPI'](_0x283ae2);switch(_0x145650){case _0x35327a[_0x48c54a(0x304)]:return H(_0x305eeb[_0x48c54a(0x1cd)](_0x38c978)?.[_0x48c54a(0x2c2)](),_0x38c978);case _0x35327a['UNIVER_DOC']:return H(_0x305eeb[_0x48c54a(0x288)](_0x38c978)?.['save'](),_0x38c978);case _0x35327a['UNIVER_SLIDE']:return H(_0x305eeb[_0x48c54a(0x2ef)](_0x38c978)?.[_0x48c54a(0x2c2)](),_0x38c978);case _0x35327a[_0x48c54a(0x26e)]:return H(_0x305eeb[_0x48c54a(0x2b7)](_0x38c978)?.[_0x48c54a(0x2c2)](),_0x38c978);case _0x35327a[_0x48c54a(0x2dd)]:return H(_0x305eeb[_0x48c54a(0x218)](_0x38c978)?.[_0x48c54a(0x2c2)](),_0x38c978);default:throw new j(_0x48c54a(0x2bf),'Unsupported\x20collaboration\x20Unit\x20type:\x20'+_0x145650);}}function H(_0x4b3271,_0x46b41a){const _0x4a66e0=_0x5e6b2d;if(_0x4b3271===void 0x0)throw new j(_0x4a66e0(0x302),_0x4a66e0(0x2a8)+_0x46b41a+_0x4a66e0(0x213));return structuredClone(_0x4b3271);}function _0x1384(){const _0x273b85=['read','collabSubmitChangesetUrl','board','transformMutations','fetchmissing','race','has','Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range','_tail','transform-failed','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','Collaboration\x20HTTP\x20request\x20failed','_injector','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','2179646eprfMN','formula.mutation.set-calculation-result','JOIN','unitId\x20must\x20not\x20be\x20empty','unit','sessionTicket','Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20','length','isArray','get','OPEN','pull-required','_kernel','No\x20active\x20Unit\x20leases','newCsEvent','baseRev','max','Failed\x20to\x20rejoin\x20Unit\x20room','HEARTBEAT','_memberId','_replayRemoteChangesets','target','731267kLmIcQ','join','isSafeInteger','The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight','offline','Snapshot\x20contains\x20duplicate\x20block\x20ids','_inbound','17263800gRtwPq','acceptedChangeset','revisionService','_handleMessage','\x20uses\x20an\x20unsupported\x20protocol','_closed','trigger','_setTransformConflict','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','ticket','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','_socket','some','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','_config','2OdSLIu','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','Collaboration\x20runtime\x20is\x20closing\x20or\x20closed','wsSessionTicketUrl','new_changes','commit','\x20character\x20limit','getWorkbook','type','newAPI','_ensureConnected','_connection','RECV','findIndex','Collaboration\x20WebSocket\x20is\x20not\x20online','block','_disposables','UNIVER_SLIDE','push','_handle','values','map','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','unitData','_captureCommandMutation','number','formula.mutation.set-formula-data','formula.mutation.set-trigger-formula-calculation-start','_fetchChangesets','snapshotFrom','parse','getConnectionState','_release','then','_validateAcceptedChangeset','formula.mutation.set-array-formula-data','_failCommandWaiters','Changeset\x20submission\x20was\x20rejected','unchanged','fetchThroughInterceptors','replacePending','getPendingMutations','Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command','Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields','fromCollab','invalid-changeset','Heartbeat\x20failed','Code\x20is\x20longer\x20than\x20the\x20','Collaboration\x20WebSocket\x20closed','Backend\x20returned\x20no\x20Unit\x20snapshot','error','closed','accepted','transformService','Single-Unit\x20runtime\x20for\x20','removeEventListener','commitTimeoutMs','routeKey','formula.mutation.set-trigger-formula-calculation-stop','\x20cannot\x20capture\x20mutation\x20','invalid-revision','finally','submitChangeset','_bufferedChangesets','conflict','code','memberId','from','_unitId','docStateChange$','clear','initial','sheet.mutation.send-init-pivot-text-local','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','maxCodeLength','backend','pulled','\x20is\x20unavailable','json','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','Event','formula.mutation.set-trigger-formula-calculation','getBoard','Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','snapshotServerService','trim','COLLABORATION_PROTOCOL_ERROR','_reconnectTimer','protocol','open','https:','permission_rej','run','_knownHeadRevision','all','timer','replacePendingMutations','_conflict','cancel','onStarting','_scheduleReconnect','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','GET','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','application/json','32VPYFEJ','snapshot','resolve','onMutationExecutedForCollab','changeset_should_retry','HELLO','createBase','unsubscribe','_reconnectAttempts','permission-rejected','blockMeta','unitID','getSheetBlock','createUnit','commandService','object','Replacement\x20mutations\x20must\x20be\x20an\x20array','string','pending','add','mode','latestRevision','prependPending','precedingChangesets','_awaiting','set','dispose','12604761exXqRc','retryable','m2Prime','_join','status','wss:','replace','close','return\x20(async\x20()\x20=>\x20{\x20','reconnecting','fetched','_rejectIfNotAccepting','getState','_nextReqId','stringify','index','Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','changeset_ack','_connectPromise','Cannot\x20','_commandWaiters','entries','_requestCommand','sheets','csRejEvent','addEventListener','awaitingMutations','retry','_heartbeat','injector','changesets','fromEntries','_acceptingOperations','size','UNIVER_BASE','waitForSubmission','httpRequest','reason','getUnitData','unknown','unitId','_submissionWaiters','boolean','_waitForSubmission','kind','write','createUniver','new_changesets','format','pathname','fetch','message','createDocument','_closePromise','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','_lease','changeset_rej','_handleCollaborationEvent','name','sid','getDocument','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','cmd','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20','_operations','fetchChangesets','COLLABORATION_CLOSED','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','Backend\x20changesets\x20must\x20be\x20an\x20array','5845012YfLXZN','_createAwaitingFromPending','awaiting-ack','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','data','fromChangeset','instanceService','getUnitOnRev','Unsupported\x20collaboration\x20Unit\x20type:\x20','COLLABORATION_UNAVAILABLE','LEAVE','_suppressionDepth','permission','csShouldRetryEvent','\x20for\x20Unit\x20','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','includes','memberID','Connection\x20timed\x20out','_closeAfterFatalError','\x20request\x20is\x20already\x20active\x20for\x20','_baseRevision','originalMeta','Unit\x20','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20','m1Prime','mutations','permissionRejEvent','reject','_pending','pull','incrementRevOfUnit','delete','collaMsg','acquire','rev','registerPlugin','_closeOwnedResources','getBase','searchParams','splice','subscribe','remote','Changeset\x20submission\x20was\x20denied','promise','takeInboundChangesets','COLLABORATION_INVALID_INPUT','ws:','readyState','save','_executor','online','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','changeset-rejected','confirmed','_target','Failed\x20to\x20open\x20the\x20collaboration\x20backend','pluginName','_connect','unit-data','_stopHeartbeat','_consumeBufferedPrecedingChangesets','execute','replace\x20mutations','timeout','Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type','_univer','snapshotServerUrl','invalid','_reconcilePrecedingChangesets','suppress','interceptor','getInterceptPoints','Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision','_sid','rejected','UNIVER_BOARD','UNIVER_DOC','reqId','ack','Failed\x20to\x20join\x20Unit\x20room','_joined','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','ensureOnline','562266SWzoiW','\x20returned\x20a\x20different\x20block\x20identity','workbook','csAckEvent','getPrototypeOf','48YWQgVg','\x20})();','permission-denied','leases','COMPRESS_MUTATION_SEND','getPresentation','http:','_subscribeToDocumentState','compressMutationService','_capture','MUTATION','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','revision','collabWebSocketUrl','find','_state','catch','POST','unitType','284165QLyAFs','changeset','eventID','redoState','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','COLLABORATION_LOAD_FAILED','unshift','UNIVER_SHEET','_assertMutableState','createBoard'];_0x1384=function(){return _0x273b85;};return _0x1384();}var fe=class{[_0x5e6b2d(0x274)];['unitType'];[_0x5e6b2d(0x2a6)];[_0x5e6b2d(0x1d9)];['_univer'];['_kernel'];[_0x5e6b2d(0x281)];[_0x5e6b2d(0x26c)]=!0x0;[_0x5e6b2d(0x1bb)]=!0x1;[_0x5e6b2d(0x2f3)];['_executor'];['_operations']=new L();[_0x5e6b2d(0x205)]=[];[_0x5e6b2d(0x224)];[_0x5e6b2d(0x228)]=null;['_awaiting']=null;[_0x5e6b2d(0x2db)]=crypto['randomUUID']();['_nextReqId']=0x1;constructor(_0x41662c,_0x3c266a,_0x1ffd11,_0x366642,_0x3a306e,_0x54bd1a,_0x3a0971){const _0x13561f=_0x5e6b2d;this[_0x13561f(0x274)]=_0x41662c,this[_0x13561f(0x2fc)]=_0x3c266a,this[_0x13561f(0x2a6)]=_0x1ffd11,this[_0x13561f(0x1d9)]=_0x366642,this[_0x13561f(0x2d3)]=_0x3a306e,this[_0x13561f(0x321)]=_0x54bd1a,this[_0x13561f(0x224)]=_0x1ffd11,this[_0x13561f(0x2f3)]=new se(_0x54bd1a,_0x41662c,_0x3c266a),this['_executor']=ue(_0x3a306e,_0x41662c,_0x3a0971);}[_0x5e6b2d(0x257)](){const _0x13caec=_0x5e6b2d;return{'awaitingChangeset':this[_0x13caec(0x248)]===null?null:U(this['_awaiting']),'baseRevision':this[_0x13caec(0x2a6)],'bufferedChangesetCount':this[_0x13caec(0x205)][_0x13caec(0x31c)],'conflict':this[_0x13caec(0x228)],'connection':this['_closed']?_0x13caec(0x1f9):this['_handle'][_0x13caec(0x1e5)](),'knownHeadRevision':this[_0x13caec(0x224)],'pendingMutationCount':this['_capture'][_0x13caec(0x242)]['length']};}[_0x5e6b2d(0x1ef)](){const _0xd2acf5=_0x5e6b2d;return structuredClone(this[_0xd2acf5(0x2f3)]['pending']);}[_0x5e6b2d(0x27e)](){const _0x3972cc=_0x5e6b2d;return this[_0x3972cc(0x256)]()||this[_0x3972cc(0x28c)][_0x3972cc(0x223)](async()=>(this[_0x3972cc(0x305)](_0x3972cc(0x27e)),await this[_0x3972cc(0x1e2)]()));}[_0x5e6b2d(0x2af)](){const _0x38b86a=_0x5e6b2d;return this['_rejectIfNotAccepting']()||this[_0x38b86a(0x28c)][_0x38b86a(0x223)](async()=>{const _0x373537=_0x38b86a;if(this[_0x373537(0x305)](_0x373537(0x2af)),await this[_0x373537(0x1e2)](),this['_bufferedChangesets'][_0x373537(0x31c)]===0x0)return{'state':this[_0x373537(0x257)](),'status':'up-to-date'};let _0x1eb9ec=[...this['_bufferedChangesets']];if(_0x1eb9ec[_0x373537(0x1c2)](_0x51e035=>_0x51e035[_0x373537(0x2ab)][_0x373537(0x1c2)](_0x367da8=>_0x367da8['id']===_0x5c912b['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x373537(0x1c0));let _0x315845=this['_baseRevision'],_0x1352b8=this[_0x373537(0x248)]?W(this[_0x373537(0x248)][_0x373537(0x2ab)],this['unitId'],this['unitType'],this[_0x373537(0x2a6)]):null,_0x3f3581=_0x22f50a({'baseRev':this[_0x373537(0x2a6)],'memberID':'','mutations':[...this[_0x373537(0x2f3)][_0x373537(0x242)]],'revision':0x0,'type':this['unitType'],'unitID':this[_0x373537(0x274)],'userID':''})['mutations'],_0x56138e=[];for(let _0x16e78b of _0x1eb9ec){let _0x5e87ee=_0x22f50a(_0x16e78b);if(this[_0x373537(0x248)]!==null&&_0x16e78b['sid']===this[_0x373537(0x248)][_0x373537(0x287)]&&_0x16e78b[_0x373537(0x2df)]===this[_0x373537(0x248)]['reqId']){let _0x4926ad=(_0x1352b8??[])[_0x373537(0x1db)](_0x46de9d);G(_0x16e78b[_0x373537(0x2ab)],_0x4926ad)||await this[_0x373537(0x2a4)](new j(_0x373537(0x21d),'Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations')),_0x56138e[_0x373537(0x1d8)]({'changeset':_0x16e78b,'kind':_0x373537(0x293)}),_0x1352b8=null;continue;}let _0x72e664=_0x5e87ee[_0x373537(0x2ab)];if(_0x1352b8!==null){let _0x40b000=this[_0x373537(0x321)][_0x373537(0x1fb)]['transformMutations'](_0x72e664,_0x1352b8,!0x1);if(!_0x5569a7(_0x40b000))return this[_0x373537(0x228)]={'message':_0x40b000[_0x373537(0x1f8)][_0x373537(0x27f)],'operation':_0x373537(0x2af),'reason':_0x373537(0x310)},{'conflict':this['_conflict'],'state':this['getState'](),'status':'conflict'};_0x72e664=_0x40b000[_0x373537(0x2aa)],_0x1352b8=_0x40b000[_0x373537(0x24d)];}let _0x4ad8ba=this[_0x373537(0x321)]['transformService'][_0x373537(0x30a)](_0x72e664,_0x3f3581,!0x1);if(!_0x5569a7(_0x4ad8ba))return this['_conflict']={'message':_0x4ad8ba[_0x373537(0x1f8)][_0x373537(0x27f)],'operation':_0x373537(0x2af),'reason':'transform-failed'},{'conflict':this[_0x373537(0x228)],'state':this[_0x373537(0x257)](),'status':'conflict'};_0x56138e[_0x373537(0x1d8)]({'changeset':_0x14fe0e({..._0x5e87ee,'mutations':_0x4ad8ba[_0x373537(0x2aa)]}),'kind':_0x373537(0x2bb)}),_0x3f3581=_0x4ad8ba['m2Prime'];}let _0x29b669=_0x315845;for(let _0xe23950 of _0x56138e){if(_0xe23950[_0x373537(0x278)]===_0x373537(0x293)){let _0x390ec8=this['_kernel']['revisionService']['incrementRevOfUnit'](this[_0x373537(0x274)]);_0x390ec8!==_0xe23950[_0x373537(0x2fe)][_0x373537(0x2f6)]&&await this[_0x373537(0x2a4)](new j(_0x373537(0x21d),_0x373537(0x2da))),_0x29b669=_0x390ec8;continue;}_0x29b669=await this[_0x373537(0x1ad)](_0x29b669,[_0xe23950['changeset']]);}return this[_0x373537(0x2f3)][_0x373537(0x1ee)](_0x3f3581[_0x373537(0x1db)](_0x46de9d)),this['_awaiting']!==null&&(this['_awaiting']=_0x1352b8===null?null:{...this[_0x373537(0x248)],'baseRev':_0x29b669,'mutations':_0x1352b8[_0x373537(0x1db)](_0x46de9d)}),this[_0x373537(0x2a6)]=_0x29b669,this[_0x373537(0x205)]['splice'](0x0),{'appliedChangesets':_0x1eb9ec[_0x373537(0x1db)](z),'fromRevision':_0x315845,'state':this[_0x373537(0x257)](),'status':_0x373537(0x212),'toRevision':_0x29b669,'transformedPendingMutationCount':_0x3f3581[_0x373537(0x31c)]};});}[_0x5e6b2d(0x1cb)](){const _0x1998b7=_0x5e6b2d;return this[_0x1998b7(0x256)]()||this[_0x1998b7(0x28c)][_0x1998b7(0x223)](async()=>{const _0x424610=_0x1998b7;this[_0x424610(0x305)]('commit');let _0x537a9e=[],_0xb0eb5e=[];if(this[_0x424610(0x248)]===null){if(this[_0x424610(0x2f3)][_0x424610(0x242)][_0x424610(0x31c)]===0x0)return{'state':this['getState'](),'status':'nothing-to-commit'};if(await this[_0x424610(0x1e2)](),this[_0x424610(0x205)]['length']>0x0)return{'baseRevision':this[_0x424610(0x2a6)],'confirmedChangesets':_0x537a9e,'knownHeadRevision':this['_knownHeadRevision'],'state':this['getState'](),'status':_0x424610(0x320)};this['_createAwaitingFromPending']();}for(;this[_0x424610(0x248)]!==null;){let _0x251b24=this[_0x424610(0x248)],_0x5d3604;try{_0x5d3604=await this['_handle'][_0x424610(0x204)](_0x251b24);}catch{return{'changeset':U(_0x251b24),'confirmedChangesets':_0x537a9e,'state':this['getState'](),'status':_0x424610(0x273)};}if(_0x5d3604[_0x424610(0x24f)]===_0x424610(0x267)||_0x5d3604['status']===_0x424610(0x273))return{'changeset':U(_0x251b24),'confirmedChangesets':_0x537a9e,'state':this[_0x424610(0x257)](),'status':_0x5d3604[_0x424610(0x24f)]};if(_0x5d3604['status']==='rejected')return _0x5d3604[_0x424610(0x271)]==='invalid-revision'?(this[_0x424610(0x2f3)][_0x424610(0x246)](_0x251b24['mutations']),this[_0x424610(0x248)]=null,await this['_fetchChangesets'](),{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x537a9e,'knownHeadRevision':this[_0x424610(0x224)],'state':this[_0x424610(0x257)](),'status':_0x424610(0x320)}):(this[_0x424610(0x228)]={'message':_0x5d3604[_0x424610(0x27f)],'operation':_0x424610(0x1cb),'reason':_0x5d3604[_0x424610(0x271)]===_0x424610(0x2ec)?_0x424610(0x239):_0x424610(0x2c6)},{'conflict':this[_0x424610(0x228)],'confirmedChangesets':_0x537a9e,'state':this[_0x424610(0x257)](),'status':_0x424610(0x206)});let _0x65068b=_0x5d3604[_0x424610(0x1b7)];try{this['_validateAcceptedChangeset'](_0x251b24,_0x5d3604[_0x424610(0x247)],_0x65068b);}catch(_0x5e0c5b){await this[_0x424610(0x2a4)](_0x5e0c5b);}let _0x2f2a38=_0x251b24['mutations'];if(_0x5d3604[_0x424610(0x247)][_0x424610(0x31c)]>0x0){let _0x158e63=await this[_0x424610(0x2d6)](_0x251b24,_0x5d3604[_0x424610(0x247)]);if(_0x158e63===null)return{'conflict':this[_0x424610(0x228)],'confirmedChangesets':_0x537a9e,'state':this[_0x424610(0x257)](),'status':'conflict'};_0x2f2a38=_0x158e63[_0x424610(0x266)];try{this['_consumeBufferedPrecedingChangesets'](_0x5d3604['precedingChangesets']);}catch(_0xdca64f){await this[_0x424610(0x2a4)](_0xdca64f);}_0xb0eb5e[_0x424610(0x1d8)](..._0x5d3604['precedingChangesets']['map'](z));}G(_0x65068b[_0x424610(0x2ab)],_0x2f2a38)||await this[_0x424610(0x2a4)](new j('COLLABORATION_PROTOCOL_ERROR',_0x424610(0x219)));let _0x1b4bc9=this[_0x424610(0x321)][_0x424610(0x1b8)][_0x424610(0x2b0)](this[_0x424610(0x274)]);if(_0x1b4bc9!==_0x65068b[_0x424610(0x2f6)]&&await this['_closeAfterFatalError'](new j(_0x424610(0x21d),_0x424610(0x2e3))),this[_0x424610(0x2a6)]=_0x1b4bc9,this[_0x424610(0x224)]=Math[_0x424610(0x325)](this[_0x424610(0x224)],_0x1b4bc9),this[_0x424610(0x248)]=null,_0x537a9e['push'](z(_0x65068b)),this[_0x424610(0x2f3)]['pending'][_0x424610(0x31c)]===0x0)break;this['_createAwaitingFromPending']();}return{'confirmedChangesets':_0x537a9e,'reconciledChangesets':_0xb0eb5e,'state':this[_0x424610(0x257)](),'status':_0x424610(0x2c7)};});}async[_0x5e6b2d(0x1e2)](){const _0x156f18=_0x5e6b2d;let _0x3497f0=this[_0x156f18(0x224)],_0x505228=await this[_0x156f18(0x1d9)]['fetchChangesets'](_0x3497f0,void 0x0);if(_0x3e8af9(_0x505228[_0x156f18(0x1f8)])){let _0x4472b0=_0x505228[_0x156f18(0x1f8)];throw new j('COLLABORATION_UNAVAILABLE',_0x4472b0?.['message']||'Backend\x20failed\x20to\x20fetch\x20changesets',{'retryable':!0x0});}let _0x58b86f=R(_0x505228[_0x156f18(0x26a)],this[_0x156f18(0x274)],this[_0x156f18(0x2fc)],_0x3497f0),_0x5019a1=_0x58b86f['at'](-0x1)?.[_0x156f18(0x2f6)]??_0x3497f0;if(_0x505228[_0x156f18(0x245)]!==void 0x0&&_0x505228[_0x156f18(0x245)]!==_0x5019a1)throw new j(_0x156f18(0x21d),_0x156f18(0x25b));return _0x58b86f[_0x156f18(0x31c)]===0x0?{'knownHeadRevision':this['_knownHeadRevision'],'state':this[_0x156f18(0x257)](),'status':_0x156f18(0x1ec)}:(this[_0x156f18(0x205)]['push'](..._0x58b86f),this[_0x156f18(0x224)]=_0x5019a1,{'changesets':_0x58b86f[_0x156f18(0x1db)](z),'fromRevision':_0x3497f0,'state':this[_0x156f18(0x257)](),'status':_0x156f18(0x255),'toRevision':_0x5019a1});}[_0x5e6b2d(0x292)](){const _0x451b46=_0x5e6b2d;let _0x2b30b3=this[_0x451b46(0x2f3)]['takePending']();this[_0x451b46(0x248)]={'baseRev':this['_baseRevision'],'mutations':_0x2b30b3,'reqId':this[_0x451b46(0x258)],'sid':this[_0x451b46(0x2db)]},this[_0x451b46(0x258)]+=0x1;}[_0x5e6b2d(0x1e8)](_0x431565,_0xf684b6,_0x36e34c){const _0x564e8d=_0x5e6b2d;let _0x985d5c=R(_0xf684b6,this[_0x564e8d(0x274)],this[_0x564e8d(0x2fc)],this[_0x564e8d(0x2a6)])['at'](-0x1)?.[_0x564e8d(0x2f6)]??this['_baseRevision'];if(_0x36e34c[_0x564e8d(0x23b)]!==this[_0x564e8d(0x274)]||_0x36e34c[_0x564e8d(0x1ce)]!==this[_0x564e8d(0x2fc)]||_0x36e34c[_0x564e8d(0x287)]!==_0x431565[_0x564e8d(0x287)]||_0x36e34c[_0x564e8d(0x2df)]!==_0x431565['reqId']||_0x36e34c['baseRev']!==_0x985d5c||_0x36e34c[_0x564e8d(0x2f6)]!==_0x985d5c+0x1)throw new j(_0x564e8d(0x21d),_0x564e8d(0x1c3));}async[_0x5e6b2d(0x2d6)](_0x335f43,_0x5c8ad1){const _0x285df7=_0x5e6b2d;let _0x41c336=W(_0x335f43[_0x285df7(0x2ab)],this[_0x285df7(0x274)],this['unitType'],this[_0x285df7(0x2a6)]),_0x5e5909=W(this[_0x285df7(0x2f3)][_0x285df7(0x242)],this[_0x285df7(0x274)],this[_0x285df7(0x2fc)],this['_baseRevision']),_0x2980a7=[];for(let _0x4dd84a of _0x5c8ad1){let _0x3d56fc=_0x22f50a(_0x4dd84a),_0x12115f=this['_kernel']['transformService'][_0x285df7(0x30a)](_0x3d56fc[_0x285df7(0x2ab)],_0x41c336,!0x1);if(!_0x5569a7(_0x12115f))return this[_0x285df7(0x1bd)]('commit',_0x12115f[_0x285df7(0x1f8)]),null;_0x41c336=_0x12115f[_0x285df7(0x24d)];let _0x32350e=this['_kernel'][_0x285df7(0x1fb)][_0x285df7(0x30a)](_0x12115f[_0x285df7(0x2aa)],_0x5e5909,!0x1);if(!_0x5569a7(_0x32350e))return this[_0x285df7(0x1bd)](_0x285df7(0x1cb),_0x32350e[_0x285df7(0x1f8)]),null;_0x5e5909=_0x32350e[_0x285df7(0x24d)],_0x2980a7[_0x285df7(0x1d8)](_0x14fe0e({..._0x3d56fc,'mutations':_0x32350e[_0x285df7(0x2aa)]}));}let _0x2ae501=await this[_0x285df7(0x1ad)](this[_0x285df7(0x2a6)],_0x2980a7);return this[_0x285df7(0x2f3)]['replacePending'](_0x5e5909[_0x285df7(0x1db)](_0x46de9d)),this[_0x285df7(0x2a6)]=_0x2ae501,{'awaitingMutations':_0x41c336[_0x285df7(0x1db)](_0x46de9d),'revision':_0x2ae501};}[_0x5e6b2d(0x1bd)](_0x1a4d12,_0x28ac9a){const _0x257857=_0x5e6b2d;this[_0x257857(0x228)]={'message':_0x28ac9a['message'],'operation':_0x1a4d12,'reason':_0x257857(0x310)};}async[_0x5e6b2d(0x1ad)](_0x5e84e5,_0x5ccfce){const _0x149f16=_0x5e6b2d;try{return await this[_0x149f16(0x2f3)][_0x149f16(0x2d7)](async()=>B(this[_0x149f16(0x321)],this[_0x149f16(0x274)],this[_0x149f16(0x2fc)],_0x5e84e5,_0x5ccfce,'remote'));}catch(_0x17fe4d){return await this[_0x149f16(0x2a4)](_0x17fe4d);}}async[_0x5e6b2d(0x2a4)](_0x25c5f0){const _0x5391ad=_0x5e6b2d;this[_0x5391ad(0x26c)]=!0x1,this[_0x5391ad(0x281)]??=this['_closeOwnedResources']();try{await this[_0x5391ad(0x281)];}catch{}throw _0x25c5f0;}[_0x5e6b2d(0x2ce)](_0xab4df0){const _0x9e3e7b=_0x5e6b2d;let _0x3cb66c=_0xab4df0['at'](-0x1)?.['revision'];if(_0x3cb66c===void 0x0||this['_bufferedChangesets'][_0x9e3e7b(0x31c)]===0x0)return;let _0x1c8fae=this[_0x9e3e7b(0x205)][_0x9e3e7b(0x1d3)](({revision:_0x5c52c4})=>_0x5c52c4>_0x3cb66c),_0x2b9e57=this[_0x9e3e7b(0x205)]['slice'](0x0,_0x1c8fae===-0x1?this[_0x9e3e7b(0x205)][_0x9e3e7b(0x31c)]:_0x1c8fae);for(let _0x2f266e of _0x2b9e57){let _0x1a8f09=_0xab4df0[_0x9e3e7b(0x2f8)](({revision:_0x20c7ca})=>_0x20c7ca===_0x2f266e['revision']);if(!_0x1a8f09||!pe(_0x2f266e,_0x1a8f09))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x9e3e7b(0x28f));}this['_bufferedChangesets'][_0x9e3e7b(0x2b9)](0x0,_0x2b9e57[_0x9e3e7b(0x31c)]);}['execute'](_0x4e8803){const _0x2becdf=_0x5e6b2d;return this['_rejectIfNotAccepting']()||this['_operations'][_0x2becdf(0x223)](async()=>{const _0x1f5460=_0x2becdf;_0x4e8803[_0x1f5460(0x244)]===_0x1f5460(0x279)&&this[_0x1f5460(0x305)]('write');let _0x462235=this['_capture'][_0x1f5460(0x242)]['length'],_0x1e7e34=P(await this[_0x1f5460(0x2c3)][_0x1f5460(0x2cf)](_0x4e8803[_0x1f5460(0x207)],_0x4e8803[_0x1f5460(0x244)]));return _0x4e8803[_0x1f5460(0x244)]===_0x1f5460(0x307)?{'state':this['getState'](),'value':_0x1e7e34}:{'mutations':this['_capture'][_0x1f5460(0x1e3)](_0x462235),'state':this[_0x1f5460(0x257)](),'value':_0x1e7e34};});}[_0x5e6b2d(0x227)](_0x22db6e){const _0x161fee=_0x5e6b2d;return this[_0x161fee(0x256)]()||this['_operations'][_0x161fee(0x223)](async()=>{const _0x5f35ed=_0x161fee;if(this[_0x5f35ed(0x305)](_0x5f35ed(0x2d0)),this['_awaiting']!==null)throw new j(_0x5f35ed(0x2bf),_0x5f35ed(0x301));let _0x42bdf0=me(_0x22db6e),_0x401920=[...this[_0x5f35ed(0x2f3)][_0x5f35ed(0x242)]];this['_capture'][_0x5f35ed(0x1ee)](_0x42bdf0);let _0x1c180b=this[_0x5f35ed(0x257)]();return{'pendingMutationCount':_0x42bdf0[_0x5f35ed(0x31c)],'previousMutationCount':_0x401920['length'],'state':_0x1c180b};});}['exportUnitData'](){const _0x2d79b6=_0x5e6b2d;return this[_0x2d79b6(0x256)]()||this[_0x2d79b6(0x28c)][_0x2d79b6(0x223)](async()=>V(this[_0x2d79b6(0x2d3)],this[_0x2d79b6(0x274)],this[_0x2d79b6(0x2fc)]));}[_0x5e6b2d(0x252)](){const _0x562b14=_0x5e6b2d;return this[_0x562b14(0x281)]?this[_0x562b14(0x281)]:(this['_acceptingOperations']=!0x1,this['_closePromise']=this[_0x562b14(0x28c)][_0x562b14(0x223)](async()=>await this['_closeOwnedResources']()),this[_0x562b14(0x281)]);}async[_0x5e6b2d(0x2b6)](){const _0x194e19=_0x5e6b2d;try{this[_0x194e19(0x2f3)][_0x194e19(0x24a)](),await this['_handle']['close']();}finally{try{this[_0x194e19(0x2d3)]['dispose']();}finally{this[_0x194e19(0x1bb)]=!0x0;}}}[_0x5e6b2d(0x256)](){const _0x31141d=_0x5e6b2d;return this[_0x31141d(0x26c)]?null:Promise['reject'](new j(_0x31141d(0x28e),_0x31141d(0x1c8)));}[_0x5e6b2d(0x305)](_0x4bf413){const _0x2398a8=_0x5e6b2d;if(this[_0x2398a8(0x228)]!==null)throw new j('COLLABORATION_INVALID_INPUT',_0x2398a8(0x25f)+_0x4bf413+_0x2398a8(0x314));}};function U(_0x40b4e8){const _0x1b04d3=_0x5e6b2d;return{'baseRevision':_0x40b4e8[_0x1b04d3(0x324)],'mutationCount':_0x40b4e8[_0x1b04d3(0x2ab)][_0x1b04d3(0x31c)],'reqId':_0x40b4e8[_0x1b04d3(0x2df)],'revision':0x0,'sid':_0x40b4e8[_0x1b04d3(0x287)]};}function W(_0x13c76c,_0x5b2991,_0x26e01c,_0x27a13d){return _0x22f50a({'baseRev':_0x27a13d,'memberID':'','mutations':[..._0x13c76c],'revision':0x0,'type':_0x26e01c,'unitID':_0x5b2991,'userID':''})['mutations'];}function pe(_0x29850a,_0x171cb4){const _0x304f14=_0x5e6b2d;return _0x29850a['unitID']===_0x171cb4['unitID']&&_0x29850a[_0x304f14(0x1ce)]===_0x171cb4['type']&&_0x29850a['baseRev']===_0x171cb4[_0x304f14(0x324)]&&_0x29850a[_0x304f14(0x2f6)]===_0x171cb4[_0x304f14(0x2f6)]&&_0x29850a[_0x304f14(0x287)]===_0x171cb4[_0x304f14(0x287)]&&_0x29850a[_0x304f14(0x2df)]===_0x171cb4[_0x304f14(0x2df)]&&JSON[_0x304f14(0x259)](_0x29850a[_0x304f14(0x2ab)])===JSON[_0x304f14(0x259)](_0x171cb4[_0x304f14(0x2ab)]);}function G(_0x530d76,_0x402c4d){const _0x25a48b=_0x5e6b2d;return _0x530d76[_0x25a48b(0x31c)]===_0x402c4d['length']&&_0x530d76['every']((_0x5e5d0d,_0x2d2a15)=>_0x5e5d0d['id']===_0x402c4d[_0x2d2a15]?.['id']&&_0x5e5d0d['data']===_0x402c4d[_0x2d2a15]?.[_0x25a48b(0x295)]);}function me(_0x5683e3){const _0x3ac151=_0x5e6b2d;if(!Array[_0x3ac151(0x31d)](_0x5683e3))throw new j(_0x3ac151(0x2bf),_0x3ac151(0x240));return _0x5683e3[_0x3ac151(0x1db)](_0x14f5e6=>{const _0x41fe01=_0x3ac151;if(!_0x14f5e6||typeof _0x14f5e6!=_0x41fe01(0x23f)||typeof _0x14f5e6['id']!='string'||_0x14f5e6['id'][_0x41fe01(0x31c)]===0x0||typeof _0x14f5e6['data']!=_0x41fe01(0x241))throw new j(_0x41fe01(0x2bf),_0x41fe01(0x1f1));return{'data':_0x14f5e6[_0x41fe01(0x295)],'id':_0x14f5e6['id']};});}var K=class extends _0x3590eb{['_config'];[_0x5e6b2d(0x313)];static [_0x5e6b2d(0x2ca)]='UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN';constructor(_0x4147ac,_0x4ad59d){const _0xcdb319=_0x5e6b2d;super(),this[_0xcdb319(0x1c5)]=_0x4147ac,this[_0xcdb319(0x313)]=_0x4ad59d;}[_0x5e6b2d(0x22a)](){const _0x5d56d7=_0x5e6b2d;this[_0x5d56d7(0x1c5)]['snapshotServerService']!==void 0x0&&_0x2bb7ea(this[_0x5d56d7(0x313)],[[_0x32e3ff,{'useValue':this[_0x5d56d7(0x1c5)]['snapshotServerService']}]]),this['_config'][_0x5d56d7(0x22a)]({'commandService':this[_0x5d56d7(0x313)]['get'](_0x4398d7),'compressMutationService':this[_0x5d56d7(0x313)]['get'](_0x125608),'instanceService':this[_0x5d56d7(0x313)][_0x5d56d7(0x31e)](_0x36c186),'injector':this[_0x5d56d7(0x313)],'revisionService':this[_0x5d56d7(0x313)][_0x5d56d7(0x31e)](_0x2dad72),'transformService':this[_0x5d56d7(0x313)]['get'](_0x1a5c37)});}};K=_0x2174d4([_0x57fa7a(_0x59c157),_0x4cf2f2(0x1,_0x191d9f(_0x857fc3))],K);function he(_0x3d77e4,_0x5b8587){const _0x7b233f=_0x5e6b2d;let _0x4ccc17;if(_0x3d77e4[_0x7b233f(0x2b5)](K,{'onStarting'(_0xf38616){_0x4ccc17=_0xf38616;},..._0x5b8587===void 0x0?{}:{'snapshotServerService':_0x5b8587}}),!_0x4ccc17)throw Error(_0x7b233f(0x25c));return _0x4ccc17;}async function ge(_0x2265c0,_0x46744c,_0x324b77){const _0x223693=_0x5e6b2d;let _0x25bb9b=await _0x2265c0[_0x223693(0x298)](0x0);if(_0x3e8af9(_0x25bb9b[_0x223693(0x1f8)])){let _0x44e1ac=_0x25bb9b[_0x223693(0x1f8)];throw new j('COLLABORATION_LOAD_FAILED',_0x44e1ac?.[_0x223693(0x27f)]||'Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot');}let _0x5d8cc9=_0x25bb9b['snapshot'];if(!_0x5d8cc9)throw new j(_0x223693(0x302),_0x223693(0x1f7));_e(_0x5d8cc9,_0x46744c,_0x324b77);try{switch(_0x324b77){case _0x35327a[_0x223693(0x304)]:return{'changesets':_0x25bb9b[_0x223693(0x26a)],'unitData':await _0x2c2b13(_0x5d8cc9,await q(_0x2265c0,_0x5d8cc9)),'unitType':_0x324b77};case _0x35327a['UNIVER_DOC']:return{'changesets':_0x25bb9b[_0x223693(0x26a)],'unitData':_0x1dbd3a(_0x5d8cc9),'unitType':_0x324b77};case _0x35327a[_0x223693(0x1d7)]:return{'changesets':_0x25bb9b['changesets'],'unitData':_0x226a08(_0x5d8cc9),'unitType':_0x324b77};case _0x35327a[_0x223693(0x26e)]:return{'changesets':_0x25bb9b[_0x223693(0x26a)],'unitData':await _0x3ded75(_0x5d8cc9,await q(_0x2265c0,_0x5d8cc9)),'unitType':_0x324b77};case _0x35327a[_0x223693(0x2dd)]:return{'changesets':_0x25bb9b[_0x223693(0x26a)],'unitData':_0x4c8227(_0x5d8cc9),'unitType':_0x324b77};default:throw new j(_0x223693(0x2bf),_0x223693(0x299)+_0x324b77);}}catch(_0x4252d6){throw _0x4252d6 instanceof j?_0x4252d6:new j('COLLABORATION_LOAD_FAILED','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot',{'cause':_0x4252d6});}}function _e(_0x5bc7f8,_0x11d7c0,_0x1fc2f3){const _0x11bcc2=_0x5e6b2d;if(_0x5bc7f8[_0x11bcc2(0x23b)]!==_0x11d7c0||_0x5bc7f8[_0x11bcc2(0x1ce)]!==_0x1fc2f3)throw new j(_0x11bcc2(0x302),'Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit');if(!Number['isSafeInteger'](_0x5bc7f8[_0x11bcc2(0x2b4)])||_0x5bc7f8['rev']<0x1)throw new j(_0x11bcc2(0x302),_0x11bcc2(0x1dc));}async function q(_0x34944d,_0x4a0339){const _0x1faefd=_0x5e6b2d;let _0x1ad05c=_0x4a0339[_0x1faefd(0x2e7)];if(!_0x1ad05c)throw new j('COLLABORATION_LOAD_FAILED',_0x1faefd(0x215));let _0x109a8b=Object[_0x1faefd(0x1da)](_0x1ad05c[_0x1faefd(0x23a)])['flatMap'](({blocks:_0x394709})=>_0x394709);if(new Set(_0x109a8b)[_0x1faefd(0x26d)]!==_0x109a8b['length'])throw new j(_0x1faefd(0x302),_0x1faefd(0x1b4));return await Promise[_0x1faefd(0x225)](_0x109a8b[_0x1faefd(0x1db)](async _0x477622=>{const _0x332fa9=_0x1faefd;let _0x460532=await _0x34944d[_0x332fa9(0x23c)](_0x477622);if(_0x3e8af9(_0x460532['error'])||!_0x460532[_0x332fa9(0x1d5)])throw new j(_0x332fa9(0x302),_0x460532[_0x332fa9(0x1f8)]?.[_0x332fa9(0x27f)]||'Snapshot\x20block\x20'+_0x477622+_0x332fa9(0x213));if(_0x460532[_0x332fa9(0x1d5)]['id']!==_0x477622)throw new j(_0x332fa9(0x302),'Snapshot\x20block\x20'+_0x477622+_0x332fa9(0x2e6));return _0x460532[_0x332fa9(0x1d5)];}));}function ve(_0x2b6c2f){const _0x48bdd7=_0x5e6b2d;let _0x42f687=_0x2b6c2f[_0x48bdd7(0x210)]??0xa00000;if(!Number[_0x48bdd7(0x1b1)](_0x42f687)||_0x42f687<=0x0)throw new j(_0x48bdd7(0x2bf),'maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer');return{async 'load'(_0x5a95bf,_0x24e172){const _0x2ae629=_0x48bdd7;be(_0x5a95bf,_0x24e172);let _0x50fada,_0x4ab515={'unitId':_0x5a95bf,'unitType':_0x24e172},_0x1c83a7={'unitId':_0x5a95bf,'unitType':_0x24e172,..._0x2b6c2f[_0x2ae629(0x21b)]===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x3239e4=_0x2ae629;if(_0x50fada===void 0x0)throw new j(_0x3239e4(0x302),'SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned');return _0x50fada;}}},_0x20f013;try{_0x20f013=await _0x2b6c2f[_0x2ae629(0x211)][_0x2ae629(0x220)](_0x4ab515);}catch(_0x1d33e9){throw new j(_0x2ae629(0x29a),_0x2ae629(0x2c9),{'cause':_0x1d33e9,'retryable':!0x0});}let _0xf03f82;try{_0xf03f82=await _0x2b6c2f[_0x2ae629(0x27a)](_0x1c83a7);let _0x3e72e4=he(_0xf03f82,_0x2b6c2f[_0x2ae629(0x21b)]);_0x2b6c2f[_0x2ae629(0x21b)]!==void 0x0&&(_0x50fada=_0x3e72e4['injector'][_0x2ae629(0x31e)](_0x16d22b));let _0x24ef43=await xe(_0x20f013,_0x5a95bf,_0x24e172);Se(_0x24ef43,_0x4ab515),Ce(_0xf03f82,_0x24ef43);let _0x238616=B(_0x3e72e4,_0x5a95bf,_0x24e172,J(_0x24ef43['unitData']),_0x24ef43[_0x2ae629(0x26a)]),_0x3a7306=await _0x20f013['fetchChangesets'](_0x238616,void 0x0);if(_0x3e8af9(_0x3a7306[_0x2ae629(0x1f8)])){let _0x564f0f=_0x3a7306['error'];throw new j(_0x2ae629(0x29a),_0x564f0f?.[_0x2ae629(0x27f)]||_0x2ae629(0x20f),{'retryable':!0x0});}let _0x316755=R(_0x3a7306['changesets'],_0x5a95bf,_0x24e172,_0x238616),_0x4e4b92=_0x316755['at'](-0x1)?.['revision']??_0x238616;if(_0x3a7306[_0x2ae629(0x245)]!==void 0x0&&_0x3a7306['latestRevision']!==_0x4e4b92)throw new j('COLLABORATION_PROTOCOL_ERROR',_0x2ae629(0x30e));return _0x238616=B(_0x3e72e4,_0x5a95bf,_0x24e172,_0x238616,_0x316755),await ye(_0x3e72e4),new fe(_0x5a95bf,_0x24e172,_0x238616,_0x20f013,_0xf03f82,_0x3e72e4,_0x42f687);}catch(_0x43dada){try{await _0x20f013[_0x2ae629(0x252)]();}catch{}try{_0xf03f82?.[_0x2ae629(0x24a)]();}catch{}throw _0x43dada instanceof j?_0x43dada:new j(_0x2ae629(0x302),_0x2ae629(0x2f5),{'cause':_0x43dada});}}};}async function ye(_0x1dbf4f){const _0x43cc65=_0x5e6b2d;_0x1dbf4f['injector']['has'](_0x1a0611)&&await _0x1dbf4f[_0x43cc65(0x269)]['get'](_0x1a0611)['waitForLatestApplied']();}function be(_0x47f85c,_0x21de7d){const _0x2881d6=_0x5e6b2d;if(_0x47f85c[_0x2881d6(0x21c)]()[_0x2881d6(0x31c)]===0x0)throw new j(_0x2881d6(0x2bf),_0x2881d6(0x318));if(_0x21de7d!==_0x35327a[_0x2881d6(0x304)]&&_0x21de7d!==_0x35327a[_0x2881d6(0x2de)]&&_0x21de7d!==_0x35327a[_0x2881d6(0x1d7)]&&_0x21de7d!==_0x35327a[_0x2881d6(0x26e)]&&_0x21de7d!==_0x35327a['UNIVER_BOARD'])throw new j(_0x2881d6(0x2bf),'Unsupported\x20collaboration\x20Unit\x20type:\x20'+_0x21de7d);}async function xe(_0x76bbea,_0x58a8cd,_0x2e2466){const _0x3d79fe=_0x5e6b2d;return _0x76bbea[_0x3d79fe(0x27c)]===_0x3d79fe(0x2cc)?await _0x76bbea[_0x3d79fe(0x272)]():await ge(_0x76bbea,_0x58a8cd,_0x2e2466);}function Se(_0x6778fa,_0x5911a9){const _0x1bfa7b=_0x5e6b2d;if(_0x6778fa[_0x1bfa7b(0x2fc)]!==_0x5911a9[_0x1bfa7b(0x2fc)])throw new j('COLLABORATION_LOAD_FAILED',_0x1bfa7b(0x2d2));if(_0x6778fa[_0x1bfa7b(0x1dd)]['id']!==_0x5911a9[_0x1bfa7b(0x274)])throw new j(_0x1bfa7b(0x302),'Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id');J(_0x6778fa[_0x1bfa7b(0x1dd)]);}function J(_0x3d23b0){const _0x1a16ac=_0x5e6b2d;let _0x534732=_0x3d23b0[_0x1a16ac(0x2b4)];if(!Number['isSafeInteger'](_0x534732)||_0x534732===void 0x0||_0x534732<0x1)throw new j(_0x1a16ac(0x302),_0x1a16ac(0x22c));return _0x534732;}function Ce(_0x34b5b6,_0x99b9c){const _0x3f3ee0=_0x5e6b2d;switch(_0x99b9c[_0x3f3ee0(0x2fc)]){case _0x35327a[_0x3f3ee0(0x304)]:_0x34b5b6['createUnit'](_0x99b9c[_0x3f3ee0(0x2fc)],structuredClone(_0x99b9c['unitData']));return;case _0x35327a['UNIVER_DOC']:_0x34b5b6['createUnit'](_0x99b9c['unitType'],structuredClone(_0x99b9c['unitData']));return;case _0x35327a['UNIVER_SLIDE']:_0x34b5b6['createUnit'](_0x99b9c[_0x3f3ee0(0x2fc)],structuredClone(_0x99b9c[_0x3f3ee0(0x1dd)]));return;case _0x35327a['UNIVER_BASE']:_0x34b5b6[_0x3f3ee0(0x23d)](_0x99b9c[_0x3f3ee0(0x2fc)],structuredClone(_0x99b9c['unitData']));return;case _0x35327a[_0x3f3ee0(0x2dd)]:_0x34b5b6[_0x3f3ee0(0x23d)](_0x99b9c[_0x3f3ee0(0x2fc)],structuredClone(_0x99b9c[_0x3f3ee0(0x1dd)]));return;}}var we=class{['_config'];[_0x5e6b2d(0x2c8)];[_0x5e6b2d(0x283)];[_0x5e6b2d(0x27c)]=_0x5e6b2d(0x231);constructor(_0x2e3d27,_0x5f0166,_0x4755a2){const _0x1fb303=_0x5e6b2d;this[_0x1fb303(0x1c5)]=_0x2e3d27,this[_0x1fb303(0x2c8)]=_0x5f0166,this[_0x1fb303(0x283)]=_0x4755a2;}[_0x5e6b2d(0x1e5)](){const _0x2896b6=_0x5e6b2d;return this[_0x2896b6(0x283)]['getConnectionState']();}async[_0x5e6b2d(0x298)](_0x56b0e6=0x0){const _0x3aff09=_0x5e6b2d;let _0xc0b31e=X(this['_config'][_0x3aff09(0x2d4)],this['_target'][_0x3aff09(0x2fc)],_0x3aff09(0x319),this[_0x3aff09(0x2c8)]['unitId'],_0x3aff09(0x2b4),_0x56b0e6),_0x37a0a2=await Y(this[_0x3aff09(0x1c5)],_0xc0b31e);return Te(_0x37a0a2['snapshot']),_0x37a0a2;}async[_0x5e6b2d(0x23c)](_0x832a46){const _0x17fdcb=_0x5e6b2d;let _0x3bf1e4=X(this['_config'][_0x17fdcb(0x2d4)],this[_0x17fdcb(0x2c8)][_0x17fdcb(0x2fc)],_0x17fdcb(0x319),this[_0x17fdcb(0x2c8)][_0x17fdcb(0x274)],'block',_0x832a46),_0xf84af5=await Y(this[_0x17fdcb(0x1c5)],_0x3bf1e4);return _0xf84af5['block']&&typeof _0xf84af5[_0x17fdcb(0x1d5)][_0x17fdcb(0x295)]==_0x17fdcb(0x241)&&(_0xf84af5['block'][_0x17fdcb(0x295)]=Z(_0xf84af5[_0x17fdcb(0x1d5)][_0x17fdcb(0x295)])),_0xf84af5;}async[_0x5e6b2d(0x28d)](_0x173599,_0x56be63=0x0){const _0x2f463a=_0x5e6b2d;let _0xdfdfed=X(this[_0x2f463a(0x1c5)][_0x2f463a(0x2d4)],this[_0x2f463a(0x2c8)][_0x2f463a(0x2fc)],'unit',this[_0x2f463a(0x2c8)][_0x2f463a(0x274)],_0x2f463a(0x30b));_0xdfdfed['searchParams'][_0x2f463a(0x249)](_0x2f463a(0x209),String(_0x173599)),_0xdfdfed[_0x2f463a(0x2b8)][_0x2f463a(0x249)]('to',String(_0x56be63));let _0x37b0fb=await Y(this[_0x2f463a(0x1c5)],_0xdfdfed);return this['_lease'][_0x2f463a(0x2be)](),_0x37b0fb;}async['submitChangeset'](_0x58a94d){const _0x3db965=_0x5e6b2d;await this['_lease'][_0x3db965(0x2e4)]();let _0x41f5d7=this[_0x3db965(0x283)][_0x3db965(0x26f)](_0x58a94d['sid'],_0x58a94d[_0x3db965(0x2df)]),_0x31b08d={..._0x58a94d,'memberID':this['_lease'][_0x3db965(0x208)],'revision':0x0,'type':this['_target']['unitType'],'unitID':this[_0x3db965(0x2c8)][_0x3db965(0x274)],'userID':''},_0x238e7f=X(this['_config'][_0x3db965(0x308)],this['_target'][_0x3db965(0x2fc)],_0x3db965(0x319),this[_0x3db965(0x2c8)]['unitId'],_0x3db965(0x1ca)),_0x2675a3=this[_0x3db965(0x1c5)][_0x3db965(0x270)](_0x238e7f,{'body':JSON[_0x3db965(0x259)]({'changeset':_0x31b08d,'memberID':this[_0x3db965(0x283)][_0x3db965(0x208)],'type':this[_0x3db965(0x2c8)][_0x3db965(0x2fc)],'unitID':this['_target'][_0x3db965(0x274)]}),'headers':{'content-type':'application/json'},'method':_0x3db965(0x2fb)})[_0x3db965(0x1e7)](async _0x34a2bd=>_0x34a2bd['status']===0x191||_0x34a2bd[_0x3db965(0x24f)]===0x193?_0x3db965(0x29d):_0x34a2bd[_0x3db965(0x24f)]===0x190||_0x34a2bd[_0x3db965(0x24f)]===0x199?_0x3db965(0x2d5):_0x34a2bd['ok']?_0x3db965(0x1fa):'unknown')[_0x3db965(0x2fa)](()=>'unknown'),_0x7c1ae0=Ee(this[_0x3db965(0x1c5)][_0x3db965(0x1fe)]),_0x3dd285=_0x2675a3[_0x3db965(0x1e7)](_0x153dea=>_0x153dea===_0x3db965(0x29d)?{'status':_0x3db965(0x239)}:_0x153dea===_0x3db965(0x2d5)?{'status':_0x3db965(0x2c6)}:new Promise(()=>void 0x0)),_0x40b4e7=await Promise[_0x3db965(0x30c)]([_0x41f5d7[_0x3db965(0x2bd)],_0x3dd285,_0x7c1ae0[_0x3db965(0x2bd)][_0x3db965(0x1e7)](()=>({'status':_0x3db965(0x2d1)}))])[_0x3db965(0x203)](()=>{const _0xebed92=_0x3db965;_0x41f5d7[_0xebed92(0x229)](),_0x7c1ae0[_0xebed92(0x229)]();});if(_0x40b4e7[_0x3db965(0x24f)]==='timeout'){let _0x979feb=await _0x2675a3;return _0x979feb===_0x3db965(0x29d)?{'message':_0x3db965(0x2bc),'reason':_0x3db965(0x2ec),'status':'rejected'}:_0x979feb==='invalid'?{'message':_0x3db965(0x1eb),'reason':_0x3db965(0x1f3),'status':_0x3db965(0x2dc)}:{'status':_0x3db965(0x273)};}if(_0x40b4e7[_0x3db965(0x24f)]===_0x3db965(0x1f9))return{'status':_0x3db965(0x273)};if(_0x40b4e7['status']===_0x3db965(0x267))return{'status':_0x3db965(0x267)};if(_0x40b4e7[_0x3db965(0x24f)]===_0x3db965(0x239))return{'message':_0x3db965(0x2bc),'reason':_0x3db965(0x2ec),'status':_0x3db965(0x2dc)};if(_0x40b4e7[_0x3db965(0x24f)]===_0x3db965(0x2c6)){let _0x282889=await this[_0x3db965(0x28d)](_0x58a94d[_0x3db965(0x324)],_0x58a94d[_0x3db965(0x324)]);return{'message':_0x3db965(0x1eb),'reason':_0x282889[_0x3db965(0x245)]!==void 0x0&&_0x282889[_0x3db965(0x245)]<_0x58a94d[_0x3db965(0x324)]?_0x3db965(0x202):_0x3db965(0x1f3),'status':_0x3db965(0x2dc)};}let _0x55c10e=_0x40b4e7[_0x3db965(0x2fe)],_0x3c394b=await this[_0x3db965(0x28d)](_0x58a94d[_0x3db965(0x324)],_0x55c10e[_0x3db965(0x2f6)]-0x1);if(_0x3e8af9(_0x3c394b['error'])){let _0x1b2829=_0x3c394b['error'];throw new j('COLLABORATION_UNAVAILABLE',_0x1b2829?.[_0x3db965(0x27f)]||'Failed\x20to\x20fetch\x20preceding\x20changesets',{'retryable':!0x0});}return{'acceptedChangeset':_0x55c10e,'precedingChangesets':_0x3c394b['changesets'],'status':_0x3db965(0x2c7)};}async[_0x5e6b2d(0x252)](){const _0x2e6412=_0x5e6b2d;await this[_0x2e6412(0x283)]['close']();}};async function Y(_0x66ffeb,_0x5b8957){const _0x406c38=_0x5e6b2d;let _0x3be458;try{_0x3be458=await _0x66ffeb['httpRequest'](_0x5b8957,{'method':_0x406c38(0x22d)});}catch(_0x51a003){throw new j('COLLABORATION_UNAVAILABLE',_0x406c38(0x312),{'cause':_0x51a003,'retryable':!0x0});}if(!_0x3be458['ok'])throw new j(_0x406c38(0x29a),_0x406c38(0x31b)+_0x3be458[_0x406c38(0x24f)],{'retryable':_0x3be458['status']>=0x1f4});try{return await _0x3be458[_0x406c38(0x214)]();}catch(_0x1c9015){throw new j('COLLABORATION_PROTOCOL_ERROR','Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON',{'cause':_0x1c9015});}}function X(_0xa1aceb,..._0x1037b8){const _0x787d59=_0x5e6b2d;let _0x987640=new URL(_0xa1aceb);return _0x987640[_0x787d59(0x27d)]=_0x987640['pathname'][_0x787d59(0x251)](/\/$/,'')+'/'+_0x1037b8[_0x787d59(0x1db)](_0x4b2da0=>encodeURIComponent(String(_0x4b2da0)))[_0x787d59(0x1b0)]('/'),_0x987640;}function Te(_0x49b15e){const _0x2b9440=_0x5e6b2d;if(!_0x49b15e)return;let _0x272400=[_0x49b15e[_0x2b9440(0x2e7)],_0x49b15e['doc'],_0x49b15e['slide'],_0x49b15e[_0x2b9440(0x309)]];for(let _0x494b4c of _0x272400)_0x494b4c&&typeof _0x494b4c[_0x2b9440(0x2a7)]==_0x2b9440(0x241)&&(_0x494b4c[_0x2b9440(0x2a7)]=Z(_0x494b4c[_0x2b9440(0x2a7)]));if(_0x49b15e[_0x2b9440(0x2e7)]){for(let _0x5a160e of Object['values'](_0x49b15e[_0x2b9440(0x2e7)][_0x2b9440(0x263)]))typeof _0x5a160e[_0x2b9440(0x2a7)]=='string'&&(_0x5a160e[_0x2b9440(0x2a7)]=Z(_0x5a160e[_0x2b9440(0x2a7)]));}}function _0x67e3(_0x126240,_0x5b0725){_0x126240=_0x126240-0x1ad;const _0x1384d3=_0x1384();let _0x67e357=_0x1384d3[_0x126240];return _0x67e357;}function Z(_0x1c84f2){const _0x37ca71=_0x5e6b2d;return Uint8Array['from'](Buffer[_0x37ca71(0x209)](_0x1c84f2,'base64'));}function Ee(_0x38dc0b){let _0x300cc5;return{'cancel':()=>{_0x300cc5!==void 0x0&&clearTimeout(_0x300cc5);},'promise':new Promise(_0x4c5fe4=>{_0x300cc5=setTimeout(_0x4c5fe4,_0x38dc0b);})};}var De=class{['_config'];[_0x5e6b2d(0x2f9)]=_0x5e6b2d(0x1b3);['_socket'];[_0x5e6b2d(0x25e)];['_memberId']='';[_0x5e6b2d(0x2e2)]=new Map();['_commandWaiters']=new Map();[_0x5e6b2d(0x275)]=new Map();[_0x5e6b2d(0x1b5)]=new Map();[_0x5e6b2d(0x268)];['_reconnectTimer'];[_0x5e6b2d(0x238)]=0x0;constructor(_0x593e3c){const _0x91d3db=_0x5e6b2d;this[_0x91d3db(0x1c5)]=_0x593e3c;}async[_0x5e6b2d(0x2b3)](_0x17bdfa){const _0x58d504=_0x5e6b2d;let _0x1ef7ff=this['_joined'][_0x58d504(0x31e)](_0x17bdfa['unitId']);if(_0x1ef7ff&&_0x1ef7ff[_0x58d504(0x1ae)][_0x58d504(0x2fc)]!==_0x17bdfa[_0x58d504(0x2fc)])throw new j(_0x58d504(0x2bf),_0x58d504(0x294));if(await this[_0x58d504(0x1d0)](),_0x1ef7ff)_0x1ef7ff[_0x58d504(0x2ed)]+=0x1;else{try{await this[_0x58d504(0x24e)](_0x17bdfa);}catch(_0x136b3f){throw this[_0x58d504(0x2e2)][_0x58d504(0x26d)]===0x0&&(this['_state']='closed',this[_0x58d504(0x2cd)](),this[_0x58d504(0x1c1)]?.[_0x58d504(0x252)](0x3e8,'Initial\x20Unit\x20JOIN\x20failed'),this[_0x58d504(0x1c1)]=void 0x0,this[_0x58d504(0x328)]=''),_0x136b3f;}this['_joined'][_0x58d504(0x249)](_0x17bdfa['unitId'],{'leases':0x1,'target':_0x17bdfa});}let _0x4e8ae5=!0x1,_0x1ec984=()=>this['_memberId'],_0x62a432=new Set();return{'close':async()=>{const _0x4718e0=_0x58d504;if(!_0x4e8ae5){_0x4e8ae5=!0x0;for(let _0x6d49 of _0x62a432)_0x6d49[_0x4718e0(0x229)]();_0x62a432[_0x4718e0(0x20c)](),await this['_release'](_0x17bdfa[_0x4718e0(0x274)]);}},'ensureOnline':async()=>await this[_0x58d504(0x1d0)](),'getConnectionState':()=>_0x4e8ae5?_0x58d504(0x1f9):this['_state'],get 'memberId'(){return _0x1ec984();},'takeInboundChangesets':()=>{const _0x484e63=_0x58d504;let _0x5f5fae=this[_0x484e63(0x1b5)][_0x484e63(0x31e)](_0x17bdfa['unitId'])??[];return this['_inbound']['delete'](_0x17bdfa['unitId']),_0x5f5fae;},'waitForSubmission':(_0x40ad49,_0x12d0ab)=>{const _0x1e5e63=_0x58d504;let _0x346fa0=this['_waitForSubmission'](_0x40ad49,_0x12d0ab);return _0x62a432[_0x1e5e63(0x243)](_0x346fa0),_0x346fa0['promise'][_0x1e5e63(0x1e7)](()=>_0x62a432[_0x1e5e63(0x2b1)](_0x346fa0),()=>_0x62a432['delete'](_0x346fa0)),{'cancel':()=>{const _0xadbbcb=_0x1e5e63;_0x62a432[_0xadbbcb(0x2b1)](_0x346fa0),_0x346fa0['cancel']();},'promise':_0x346fa0[_0x1e5e63(0x2bd)]};}};}async[_0x5e6b2d(0x1d0)](){const _0x56e080=_0x5e6b2d;if(this[_0x56e080(0x2f9)]!==_0x56e080(0x2c4)||this['_socket']?.['readyState']!==WebSocket[_0x56e080(0x31f)]){this[_0x56e080(0x21e)]!==void 0x0&&clearTimeout(this['_reconnectTimer']),this[_0x56e080(0x21e)]=void 0x0,this[_0x56e080(0x25e)]??=this[_0x56e080(0x2cb)]();try{await this['_connectPromise'];}finally{this[_0x56e080(0x25e)]=void 0x0;}}}async['_connect'](){const _0x5702ed=_0x5e6b2d;this['_state']=_0x5702ed(0x254);let _0x310865=await this[_0x5702ed(0x1c5)][_0x5702ed(0x270)](this[_0x5702ed(0x1c5)]['wsSessionTicketUrl'],{'headers':{'content-type':_0x5702ed(0x22f)},'method':_0x5702ed(0x22d)});if(!_0x310865['ok'])throw this[_0x5702ed(0x2f9)]=_0x5702ed(0x1b3),new j(_0x5702ed(0x29a),_0x5702ed(0x311)+_0x310865[_0x5702ed(0x24f)],{'retryable':_0x310865[_0x5702ed(0x24f)]>=0x1f4});let _0x24b83e=await _0x310865[_0x5702ed(0x214)]();if(typeof _0x24b83e['ticket']!=_0x5702ed(0x241)||_0x24b83e[_0x5702ed(0x1bf)][_0x5702ed(0x31c)]===0x0)throw this['_state']=_0x5702ed(0x1b3),new j(_0x5702ed(0x21d),_0x5702ed(0x2a0));let _0x5dad11=new URL(this['_config']['collabWebSocketUrl']);_0x5dad11[_0x5702ed(0x2b8)]['set'](_0x5702ed(0x31a),_0x24b83e[_0x5702ed(0x1bf)]);let _0x1ad289=new WebSocket(_0x5dad11);this[_0x5702ed(0x1c1)]=_0x1ad289,_0x1ad289[_0x5702ed(0x265)](_0x5702ed(0x27f),_0x286b2d=>this['_handleMessage'](_0x286b2d)),_0x1ad289[_0x5702ed(0x265)]('close',()=>{const _0x398a43=_0x5702ed;this[_0x398a43(0x1c1)]===_0x1ad289&&(this[_0x398a43(0x2cd)](),this[_0x398a43(0x1ea)](new j('COLLABORATION_UNAVAILABLE',_0x398a43(0x1f6),{'retryable':!0x0})),this[_0x398a43(0x2f9)]=this['_joined'][_0x398a43(0x26d)]===0x0?'closed':_0x398a43(0x254),this[_0x398a43(0x2e2)][_0x398a43(0x26d)]>0x0&&this[_0x398a43(0x22b)]());}),await Oe(_0x1ad289);let _0x2d22fa=await this[_0x5702ed(0x262)](_0x53cd9f['HELLO'],'',{'cmd':_0x53cd9f['HELLO'],'routeKey':''});if(_0x2d22fa[_0x5702ed(0x207)]!==_0x21c0c8['OK']||typeof _0x2d22fa['infoRsp']?.[_0x5702ed(0x2a2)]!=_0x5702ed(0x241))throw _0x1ad289['close'](),new j(_0x5702ed(0x21d),'Collaboration\x20HELLO\x20response\x20is\x20invalid');this[_0x5702ed(0x328)]=_0x2d22fa['infoRsp'][_0x5702ed(0x2a2)],this[_0x5702ed(0x2f9)]=_0x5702ed(0x2c4);for(let {target:_0x9e0986}of this['_joined'][_0x5702ed(0x1da)]())try{await this[_0x5702ed(0x24e)](_0x9e0986);}catch(_0x34a21d){throw _0x1ad289[_0x5702ed(0x252)](0x3f3,_0x5702ed(0x326)),_0x34a21d;}this[_0x5702ed(0x238)]=0x0,this['_startHeartbeat']();}async[_0x5e6b2d(0x24e)](_0x2dbc27){const _0x1772d6=_0x5e6b2d;let _0x5e5338=await this[_0x1772d6(0x262)](_0x53cd9f['JOIN'],_0x2dbc27[_0x1772d6(0x274)],{'cmd':_0x53cd9f[_0x1772d6(0x317)],'joinReq':{'rooms':[{'args':'','roomID':_0x2dbc27[_0x1772d6(0x274)]}]},'routeKey':_0x2dbc27[_0x1772d6(0x274)]});if(_0x5e5338[_0x1772d6(0x207)]!==_0x21c0c8['OK'])throw new j(_0x1772d6(0x29a),typeof _0x5e5338['reason']==_0x1772d6(0x241)?_0x5e5338[_0x1772d6(0x271)]:_0x1772d6(0x2e1));}[_0x5e6b2d(0x262)](_0x3076f4,_0x595332,_0x56c230){const _0x9877c7=_0x5e6b2d;let _0x47dbdf=this[_0x9877c7(0x1c1)];if(!_0x47dbdf||_0x47dbdf[_0x9877c7(0x2c1)]!==WebSocket[_0x9877c7(0x31f)])return Promise[_0x9877c7(0x2ad)](new j('COLLABORATION_UNAVAILABLE',_0x9877c7(0x1d4),{'retryable':!0x0}));let _0x182939=_0x3076f4+':'+_0x595332;return new Promise((_0x54c274,_0x2b8887)=>{const _0x596f98=_0x9877c7;if(this[_0x596f98(0x260)][_0x596f98(0x30d)](_0x182939)){_0x2b8887(new j('COLLABORATION_PROTOCOL_ERROR','A\x20'+_0x3076f4+_0x596f98(0x2a5)+_0x595332));return;}let _0x161b58=setTimeout(()=>{const _0x544cf2=_0x596f98;this[_0x544cf2(0x260)][_0x544cf2(0x2b1)](_0x182939),_0x2b8887(new j(_0x544cf2(0x29a),_0x544cf2(0x28b)+_0x3076f4,{'retryable':!0x0}));},0x7530);this[_0x596f98(0x260)]['set'](_0x182939,{'reject':_0x2b8887,'resolve':_0x54c274,'timer':_0x161b58});try{_0x47dbdf['send'](JSON[_0x596f98(0x259)](_0x56c230));}catch(_0x2ee49f){this[_0x596f98(0x260)][_0x596f98(0x2b1)](_0x182939),clearTimeout(_0x161b58),_0x2b8887(new j(_0x596f98(0x29a),_0x596f98(0x1f0),{'cause':_0x2ee49f,'retryable':!0x0}));}});}[_0x5e6b2d(0x1b9)](_0x2bbefe){const _0x4cddf9=_0x5e6b2d;if(typeof _0x2bbefe[_0x4cddf9(0x295)]!='string')return;let _0x5ec1b9;try{_0x5ec1b9=JSON[_0x4cddf9(0x1e4)](_0x2bbefe[_0x4cddf9(0x295)]);}catch{this[_0x4cddf9(0x1c1)]?.[_0x4cddf9(0x252)](0x3eb,'Invalid\x20JSON\x20response');return;}let _0x3b9631=typeof _0x5ec1b9[_0x4cddf9(0x1ff)]==_0x4cddf9(0x241)?_0x5ec1b9[_0x4cddf9(0x1ff)]:'';if(_0x5ec1b9['cmd']===_0x53cd9f[_0x4cddf9(0x235)]||_0x5ec1b9[_0x4cddf9(0x28a)]===_0x53cd9f[_0x4cddf9(0x317)]||_0x5ec1b9[_0x4cddf9(0x28a)]===_0x53cd9f[_0x4cddf9(0x327)]){let _0x1ab09a=_0x5ec1b9[_0x4cddf9(0x28a)]+':'+_0x3b9631,_0x2f7448=this['_commandWaiters'][_0x4cddf9(0x31e)](_0x1ab09a);_0x2f7448&&(this[_0x4cddf9(0x260)][_0x4cddf9(0x2b1)](_0x1ab09a),clearTimeout(_0x2f7448[_0x4cddf9(0x226)]),_0x2f7448['resolve'](_0x5ec1b9));return;}_0x5ec1b9['cmd']!==_0x53cd9f[_0x4cddf9(0x1d2)]||!_0x5ec1b9[_0x4cddf9(0x2b2)]||this[_0x4cddf9(0x285)](_0x3b9631,_0x5ec1b9[_0x4cddf9(0x2b2)]);}['_handleCollaborationEvent'](_0x3b3380,_0x571228){const _0x556576=_0x5e6b2d;let _0x4203dc=_0x571228[_0x556576(0x2ff)],_0x277474=_0x4203dc===_0x556576(0x25d)?_0x556576(0x2e8):_0x4203dc===_0x556576(0x284)?_0x556576(0x264):_0x4203dc===_0x556576(0x234)?_0x556576(0x29e):_0x4203dc===_0x556576(0x222)?_0x556576(0x2ac):_0x4203dc===_0x556576(0x27b)?_0x556576(0x323):void 0x0;if(!_0x277474)return;let _0x1f84b4=ke(_0x571228[_0x277474]);if(!_0x1f84b4||_0x1f84b4[_0x556576(0x23b)]!==_0x3b3380)return;if(_0x4203dc===_0x556576(0x27b)){let _0x5c0419=this[_0x556576(0x1b5)][_0x556576(0x31e)](_0x3b3380)??[];_0x5c0419[_0x556576(0x1d8)](_0x1f84b4),this[_0x556576(0x1b5)][_0x556576(0x249)](_0x3b3380,_0x5c0419);return;}let _0x3bf8ef=Q(_0x1f84b4['sid'],_0x1f84b4[_0x556576(0x2df)]),_0x355feb=this[_0x556576(0x275)]['get'](_0x3bf8ef);_0x355feb&&_0x355feb(_0x4203dc===_0x556576(0x25d)?{'changeset':_0x1f84b4,'status':_0x556576(0x2e0)}:_0x4203dc===_0x556576(0x234)?{'status':'retry'}:_0x4203dc==='permission_rej'?{'status':_0x556576(0x239)}:{'status':_0x556576(0x2c6)});}[_0x5e6b2d(0x277)](_0xa3019c,_0x5bb06b){const _0x2fb354=_0x5e6b2d;let _0x1f4899=Q(_0xa3019c,_0x5bb06b);if(this[_0x2fb354(0x275)][_0x2fb354(0x30d)](_0x1f4899))return{'cancel':()=>void 0x0,'promise':Promise[_0x2fb354(0x2ad)](new j(_0x2fb354(0x2bf),_0x2fb354(0x1b2)))};let _0x1dcc75=()=>void 0x0;return{'cancel':()=>_0x1dcc75({'status':_0x2fb354(0x1f9)}),'promise':new Promise(_0x178cc7=>{const _0xb4f109=_0x2fb354;_0x1dcc75=_0x540780=>{const _0x5af6b3=_0x67e3;this[_0x5af6b3(0x275)][_0x5af6b3(0x2b1)](_0x1f4899)&&_0x178cc7(_0x540780);},this[_0xb4f109(0x275)][_0xb4f109(0x249)](_0x1f4899,_0x1dcc75);})};}async[_0x5e6b2d(0x1e6)](_0x4672fa){const _0x2bce36=_0x5e6b2d;let _0x11a21a=this[_0x2bce36(0x2e2)][_0x2bce36(0x31e)](_0x4672fa);_0x11a21a&&(--_0x11a21a['leases'],!(_0x11a21a[_0x2bce36(0x2ed)]>0x0)&&(this['_joined'][_0x2bce36(0x2b1)](_0x4672fa),this[_0x2bce36(0x1b5)]['delete'](_0x4672fa),this[_0x2bce36(0x1c1)]?.[_0x2bce36(0x2c1)]===WebSocket[_0x2bce36(0x31f)]&&this[_0x2bce36(0x1c1)]['send'](JSON[_0x2bce36(0x259)]({'cmd':_0x53cd9f[_0x2bce36(0x29b)],'leaveReq':{'args':'','roomID':_0x4672fa},'routeKey':_0x4672fa})),this['_joined'][_0x2bce36(0x26d)]===0x0&&(this[_0x2bce36(0x2f9)]=_0x2bce36(0x1f9),this[_0x2bce36(0x21e)]!==void 0x0&&clearTimeout(this[_0x2bce36(0x21e)]),this[_0x2bce36(0x21e)]=void 0x0,this['_stopHeartbeat'](),this[_0x2bce36(0x1c1)]?.[_0x2bce36(0x252)](0x3e8,_0x2bce36(0x322)),this[_0x2bce36(0x1c1)]=void 0x0,this[_0x2bce36(0x328)]='')));}[_0x5e6b2d(0x22b)](){const _0x41ed03=_0x5e6b2d;if(this[_0x41ed03(0x21e)]!==void 0x0||this['_reconnectAttempts']>=0x3){this['_reconnectAttempts']>=0x3&&(this[_0x41ed03(0x2f9)]=_0x41ed03(0x1b3));return;}let _0x1573df=Math['min'](0x3e8*0x2**this[_0x41ed03(0x238)],0x4e20);this[_0x41ed03(0x238)]+=0x1,this['_reconnectTimer']=setTimeout(()=>{const _0x5d734d=_0x41ed03;this[_0x5d734d(0x21e)]=void 0x0,this[_0x5d734d(0x25e)]??=this[_0x5d734d(0x2cb)](),this[_0x5d734d(0x25e)][_0x5d734d(0x2fa)](()=>this['_scheduleReconnect']())[_0x5d734d(0x203)](()=>{const _0x1d31d3=_0x5d734d;this[_0x1d31d3(0x25e)]=void 0x0;});},_0x1573df);}['_startHeartbeat'](){const _0x4be435=_0x5e6b2d;this['_stopHeartbeat'](),this[_0x4be435(0x268)]=setInterval(()=>{const _0xd9f780=_0x4be435;this[_0xd9f780(0x2f9)]===_0xd9f780(0x2c4)&&this[_0xd9f780(0x262)](_0x53cd9f[_0xd9f780(0x327)],'',{'cmd':_0x53cd9f['HEARTBEAT'],'routeKey':''})['catch'](()=>this[_0xd9f780(0x1c1)]?.[_0xd9f780(0x252)](0x3f3,_0xd9f780(0x1f4)));},0x7530);}[_0x5e6b2d(0x2cd)](){const _0x3e014b=_0x5e6b2d;this[_0x3e014b(0x268)]!==void 0x0&&clearInterval(this[_0x3e014b(0x268)]),this['_heartbeat']=void 0x0;}['_failCommandWaiters'](_0x263616){const _0x8bca22=_0x5e6b2d;for(let _0x58ab22 of this['_commandWaiters']['values']())clearTimeout(_0x58ab22[_0x8bca22(0x226)]),_0x58ab22['reject'](_0x263616);this[_0x8bca22(0x260)][_0x8bca22(0x20c)]();}};function Oe(_0x3c7982){return new Promise((_0x5b6e82,_0x5b84fb)=>{const _0x410072=_0x67e3;let _0x30adc0=()=>{const _0x125860=_0x67e3;clearTimeout(_0x2e8a63),_0x3c7982['removeEventListener']('close',_0x110a5b),_0x3c7982[_0x125860(0x1fd)](_0x125860(0x1f8),_0x559a24),_0x3c7982[_0x125860(0x1fd)](_0x125860(0x220),_0x2ec262);},_0x49229f=_0x5a940a=>{_0x30adc0(),_0x5b84fb(new j('COLLABORATION_UNAVAILABLE',_0x5a940a,{'retryable':!0x0}));},_0x110a5b=()=>_0x49229f('Collaboration\x20WebSocket\x20closed\x20before\x20opening'),_0x559a24=()=>_0x49229f(_0x410072(0x21a)),_0x2ec262=()=>{_0x30adc0(),_0x5b6e82();},_0x2e8a63=setTimeout(()=>{const _0x5daefa=_0x410072;_0x49229f(_0x5daefa(0x22e)),_0x3c7982[_0x5daefa(0x252)](0x3e8,_0x5daefa(0x2a3));},0x7530);_0x3c7982[_0x410072(0x265)]('close',_0x110a5b,{'once':!0x0}),_0x3c7982[_0x410072(0x265)](_0x410072(0x1f8),_0x559a24,{'once':!0x0}),_0x3c7982['addEventListener']('open',_0x2ec262,{'once':!0x0});});}function ke(_0xcd3372){const _0x42ebbe=_0x5e6b2d;if(!_0xcd3372||typeof _0xcd3372!=_0x42ebbe(0x23f))return null;let _0x2a5a36=_0xcd3372['cs'];return _0x2a5a36&&typeof _0x2a5a36==_0x42ebbe(0x23f)?_0x2a5a36:null;}function Q(_0x57d2c7,_0x118998){return(_0x57d2c7??'')+':'+(_0x118998??0x0);}var Ae=class{[_0x5e6b2d(0x1c5)];['_connection'];constructor(_0x49f00b){const _0x35e099=_0x5e6b2d;this[_0x35e099(0x1c5)]=je(_0x49f00b),this[_0x35e099(0x1d1)]=new De(this[_0x35e099(0x1c5)]);}async[_0x5e6b2d(0x220)](_0x19abd3){const _0x4e65a6=_0x5e6b2d;let _0x267390=await this[_0x4e65a6(0x1d1)][_0x4e65a6(0x2b3)](_0x19abd3);return new we(this['_config'],_0x19abd3,_0x267390);}};function je(_0x267911){const _0x2df132=_0x5e6b2d;let _0x44bf35=$(_0x267911[_0x2df132(0x2d4)],'snapshotServerUrl',[_0x2df132(0x2f0),'https:']),_0x407079=$(_0x267911['collabSubmitChangesetUrl'],_0x2df132(0x308),['http:','https:']),_0x27d5cf=$(_0x267911[_0x2df132(0x2f7)],_0x2df132(0x2f7),[_0x2df132(0x2c0),'wss:',_0x2df132(0x2f0),_0x2df132(0x221)]);_0x27d5cf[_0x2df132(0x21f)]==='http:'&&(_0x27d5cf[_0x2df132(0x21f)]=_0x2df132(0x2c0)),_0x27d5cf['protocol']==='https:'&&(_0x27d5cf[_0x2df132(0x21f)]=_0x2df132(0x250));let _0x28bbcf=$(_0x267911[_0x2df132(0x1c9)],_0x2df132(0x1c9),[_0x2df132(0x2f0),_0x2df132(0x221)]),_0x5f4aac=_0x267911[_0x2df132(0x1fe)]??0x7530;if(!Number['isSafeInteger'](_0x5f4aac)||_0x5f4aac<=0x0)throw new j(_0x2df132(0x2bf),'commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer');return{'collabSubmitChangesetUrl':_0x407079,'collabWebSocketUrl':_0x27d5cf,'commitTimeoutMs':_0x5f4aac,'httpRequest':_0x267911[_0x2df132(0x270)]??globalThis[_0x2df132(0x27e)]['bind'](globalThis),'snapshotServerUrl':_0x44bf35,'wsSessionTicketUrl':_0x28bbcf};}function $(_0x585c39,_0x3eef5f,_0x1d55cd){const _0x4da14f=_0x5e6b2d;let _0x189c1f;try{_0x189c1f=new URL(_0x585c39);}catch{throw new j(_0x4da14f(0x2bf),_0x3eef5f+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0x1d55cd[_0x4da14f(0x2a1)](_0x189c1f[_0x4da14f(0x21f)]))throw new j(_0x4da14f(0x2bf),_0x3eef5f+_0x4da14f(0x1ba));return _0x189c1f;}function Me(_0x3b8e3f){return new Ae(_0x3b8e3f);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/univer-collaboration-runtime",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.2",
4
+ "version": "1.0.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -19,16 +19,16 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@oxc-project/runtime": "0.142.0",
22
- "@univerjs-pro/bases": "1.0.0-beta.2",
23
- "@univerjs-pro/boards": "1.0.0-beta.2",
24
- "@univerjs-pro/collaboration": "1.0.0-beta.2",
25
- "@univerjs-pro/engine-formula": "1.0.0-beta.2",
26
- "@univerjs-pro/slides": "1.0.0-beta.2",
27
- "@univerjs/core": "1.0.0-beta.2",
28
- "@univerjs/docs": "1.0.0-beta.2",
29
- "@univerjs/engine-formula": "1.0.0-beta.2",
30
- "@univerjs/engine-render": "1.0.0-beta.2",
31
- "@univerjs/protocol": "1.0.0-beta.2",
32
- "@univerjs/sheets": "1.0.0-beta.2"
22
+ "@univerjs-pro/bases": "1.0.0",
23
+ "@univerjs-pro/boards": "1.0.0",
24
+ "@univerjs-pro/collaboration": "1.0.0",
25
+ "@univerjs-pro/engine-formula": "1.0.0",
26
+ "@univerjs-pro/slides": "1.0.0",
27
+ "@univerjs/core": "1.0.0",
28
+ "@univerjs/docs": "1.0.0",
29
+ "@univerjs/engine-formula": "1.0.0",
30
+ "@univerjs/engine-render": "1.0.0",
31
+ "@univerjs/protocol": "1.0.0",
32
+ "@univerjs/sheets": "1.0.0"
33
33
  }
34
34
  }