@univer-cli/univer-collaboration-runtime 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1 -1
- package/package.json +12 -12
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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};
|
|
1
|
+
const _0x11d030=_0x583c;(function(_0x373015,_0x2bde9d){const _0x97d168=_0x583c,_0x29ca8a=_0x373015();while(!![]){try{const _0x2950d9=parseInt(_0x97d168(0x2a8))/0x1*(-parseInt(_0x97d168(0x2b6))/0x2)+-parseInt(_0x97d168(0x1b5))/0x3*(-parseInt(_0x97d168(0x15f))/0x4)+parseInt(_0x97d168(0x167))/0x5+parseInt(_0x97d168(0x205))/0x6*(parseInt(_0x97d168(0x21c))/0x7)+parseInt(_0x97d168(0x23c))/0x8+parseInt(_0x97d168(0x145))/0x9+-parseInt(_0x97d168(0x22a))/0xa*(parseInt(_0x97d168(0x182))/0xb);if(_0x2950d9===_0x2bde9d)break;else _0x29ca8a['push'](_0x29ca8a['shift']());}catch(_0x20910b){_0x29ca8a['push'](_0x29ca8a['shift']());}}}(_0x5cc0,0xd0b4f));import{CommandType as _0x8f800b,DependentOn as _0x402b0b,ICommandService as _0x16b588,IUniverInstanceService as _0x5896bb,Inject as _0x2dcc67,Injector as _0x3a4ce6,Plugin as _0xfef6ce,UniverInstanceType as _0x20b30d,registerDependencies as _0x56afce,sequenceExecute as _0xd0978b,toDisposable as _0x586343}from'@univerjs/core';import{CompressMutationService as _0x79e251,ISnapshotServerService as _0x4dc918,ITransformService as _0x4fd054,RevertRevisionMutation as _0x4e6ffd,RevisionService as _0x3614fb,SnapshotService as _0x561fda,UniverCollaborationPlugin as _0x382b63,isTransformMutationsSuccess as _0x4dd855,parseChangesetToProtocol as _0x437dd3,parseMutationToProtocol as _0x451c27,parseProtocolChangeset as _0x2b9af6,transformSnapshotToBaseData as _0xf344e5,transformSnapshotToBoardData as _0x48a275,transformSnapshotToDocumentData as _0x9a37bd,transformSnapshotToSlideData as _0x3b04ef,transformSnapshotToWorkbookData as _0x3c8e29}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x25ed85}from'@univerjs/engine-formula';import{CmdRspCode as _0xe6f23a,CombCmd as _0x3042f5,isError as _0x400ff3}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x5e9279}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x3d47df,RichTextEditingMutation as _0x2431f0}from'@univerjs/docs';import{IRenderManagerService as _0x36e564}from'@univerjs/engine-render';import{FUniver as _0x306570}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 _0xc64a00 from'@oxc-project/runtime/helpers/decorateParam';import _0x16ecd6 from'@oxc-project/runtime/helpers/decorate';var j=class extends Error{[_0x11d030(0x1e2)];[_0x11d030(0x22b)];constructor(_0x324f77,_0x44e432,_0x45fd03={}){const _0x4f2364=_0x11d030;super(_0x44e432,_0x45fd03),this[_0x4f2364(0x18d)]=_0x4f2364(0x1c3),this['code']=_0x324f77,this[_0x4f2364(0x22b)]=_0x45fd03[_0x4f2364(0x22b)]??!0x1;}},se=class{[_0x11d030(0x2be)];[_0x11d030(0x1a9)];[_0x11d030(0x202)]=[];[_0x11d030(0x15a)]=[];[_0x11d030(0x261)]=0x0;constructor(_0x398099,_0x56ae9e,_0x17f8b3){const _0x42d633=_0x11d030;this[_0x42d633(0x2be)]=_0x398099,this[_0x42d633(0x1a9)]=_0x56ae9e,this[_0x42d633(0x15a)][_0x42d633(0x209)](_0x398099['commandService'][_0x42d633(0x248)]((_0x4c3e3f,_0x2bb91d)=>{this['_captureCommandMutation'](_0x4c3e3f,_0x2bb91d,_0x17f8b3);})),_0x17f8b3===_0x20b30d[_0x42d633(0x2b2)]&&(_0x398099[_0x42d633(0x1c4)]['get'](_0x36e564),this['_subscribeToDocumentState']());}get[_0x11d030(0x19d)](){const _0x43b054=_0x11d030;return this[_0x43b054(0x202)];}[_0x11d030(0x24b)](_0x5ac384){const _0x31a0b3=_0x11d030;return this[_0x31a0b3(0x202)][_0x31a0b3(0x2ac)](_0x5ac384);}[_0x11d030(0x28d)](_0x35624c){const _0x25b085=_0x11d030;this['_pending'][_0x25b085(0x193)](0x0,this[_0x25b085(0x202)][_0x25b085(0x27b)],..._0x35624c);}[_0x11d030(0x2a0)](){const _0x3ed168=_0x11d030;return this[_0x3ed168(0x202)][_0x3ed168(0x193)](0x0);}[_0x11d030(0x244)](_0x533094){const _0x3b90f0=_0x11d030;this['_pending'][_0x3b90f0(0x284)](..._0x533094);}async['suppress'](_0x52a06a){const _0x43aeec=_0x11d030;this[_0x43aeec(0x261)]+=0x1;try{return await _0x52a06a();}finally{--this[_0x43aeec(0x261)];}}[_0x11d030(0x28c)](){const _0x15f0bb=_0x11d030;for(let _0x5a5434 of this[_0x15f0bb(0x15a)][_0x15f0bb(0x193)](0x0))_0x5a5434['dispose']();}[_0x11d030(0x1fe)](_0x1b6371,_0x365b17,_0x3fab5f){const _0x3910e6=_0x11d030;if(this[_0x3910e6(0x261)]>0x0||_0x1b6371[_0x3910e6(0x201)]!==_0x8f800b['MUTATION']||_0x365b17?.['fromCollab']||_0x365b17?.[_0x3910e6(0x26b)]||_0x365b17?.[_0x3910e6(0x1eb)])return;let _0x36128d=_0x1b6371[_0x3910e6(0x1f6)];if(_0x36128d?.['unitId']!==void 0x0&&_0x36128d[_0x3910e6(0x227)]!==this[_0x3910e6(0x1a9)]){if(_0x36128d[_0x3910e6(0x174)]===_0x5e9279['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0x3910e6(0x1ec)+this['_unitId']+_0x3910e6(0x23d)+_0x1b6371['id']+_0x3910e6(0x1cb)+String(_0x36128d['unitId']));}if(_0x36128d?.[_0x3910e6(0x227)]===void 0x0||_0x3fab5f===_0x20b30d[_0x3910e6(0x2b2)]&&_0x1b6371['id']===_0x2431f0['id'])return;if(_0x1b6371['id']===_0x4e6ffd['id'])throw new j(_0x3910e6(0x216),_0x3910e6(0x275));let _0x1d707b=_0x1b6371,_0x3b96ca=this[_0x3910e6(0x2be)]['compressMutationService'][_0x3910e6(0x1b9)]['getInterceptPoints']()[_0x3910e6(0x25b)],_0x2edc13=(this['_kernel'][_0x3910e6(0x161)][_0x3910e6(0x1b9)][_0x3910e6(0x207)](_0x3b96ca)([_0x1d707b],this[_0x3910e6(0x2be)]['instanceService'])??[_0x1d707b])[0x0];_0x2edc13&&this[_0x3910e6(0x202)][_0x3910e6(0x209)](_0x451c27(_0x2edc13));}[_0x11d030(0x263)](){const _0x55640a=_0x11d030;let _0x469f77=this[_0x55640a(0x2be)][_0x55640a(0x1c4)]['get'](_0x3d47df)[_0x55640a(0x1a8)][_0x55640a(0x155)](_0x3d2b1a=>{const _0x487e2f=_0x55640a;if(this[_0x487e2f(0x261)]>0x0||_0x3d2b1a?.[_0x487e2f(0x227)]!==this[_0x487e2f(0x1a9)])return;let _0x467e0d={'id':_0x3d2b1a[_0x487e2f(0x23e)],'params':{'actions':_0x3d2b1a['redoState'][_0x487e2f(0x208)],'textRanges':null,'unitId':_0x3d2b1a[_0x487e2f(0x227)]},'type':_0x8f800b[_0x487e2f(0x1aa)]};this[_0x487e2f(0x202)][_0x487e2f(0x209)](_0x451c27(_0x467e0d));});this['_disposables'][_0x55640a(0x209)](_0x586343(()=>_0x469f77[_0x55640a(0x184)]()));}},ce=new Set(['formula.mutation.set-trigger-formula-calculation-start',_0x11d030(0x2a9),_0x11d030(0x1ae),_0x11d030(0x20e),_0x11d030(0x1b0),_0x11d030(0x170),_0x11d030(0x220)]),le=new Set([_0x11d030(0x1a7),_0x11d030(0x2b7),_0x11d030(0x2a4),_0x11d030(0x232),_0x11d030(0x236),_0x11d030(0x26a),'disposeUnit']);function ue(_0x185bbb,_0x11902c,_0x8c427f){const _0x1f94cd=_0x11d030;let _0x3e9e3d=_0x306570[_0x1f94cd(0x1f8)](_0x185bbb);return{async 'execute'(_0x545869,_0x4914ff){const _0x204e0e=_0x1f94cd;if(_0x545869['length']>_0x8c427f)throw new j('COLLABORATION_INVALID_INPUT',_0x204e0e(0x183)+_0x8c427f+_0x204e0e(0x2bb));let _0x556ad9=_0x4914ff===_0x204e0e(0x1db)?M(_0x3e9e3d):void 0x0,_0x1fb7f5=de(_0x3e9e3d,_0x11902c);try{return await Function(_0x204e0e(0x1bb),'return\x20(async\x20()\x20=>\x20{\x20'+_0x545869+_0x204e0e(0x1d5))(_0x1fb7f5);}finally{_0x556ad9?.[_0x204e0e(0x28c)]();}}};}function de(_0x23df8a,_0x5ed174){return new Proxy(_0x23df8a,{'get'(_0xf97b9a,_0x4fd001,_0x323b92){const _0x31fdc7=_0x583c;return le['has'](_0x4fd001)?()=>{const _0x11bd01=_0x583c;throw new j(_0x11bd01(0x216),_0x11bd01(0x241)+_0x5ed174+_0x11bd01(0x144)+String(_0x4fd001));}:Reflect[_0x31fdc7(0x165)](_0xf97b9a,_0x4fd001,_0x323b92);}});}function M(_0x34e775){const _0x55db97=_0x11d030;return _0x34e775[_0x55db97(0x297)](_0x34e775[_0x55db97(0x26e)][_0x55db97(0x2b4)],_0x324ea7=>{const _0x2ce62a=_0x55db97;let _0x8c3c29=_0x324ea7;if(N(_0x8c3c29))throw _0x8c3c29[_0x2ce62a(0x292)]=!0x0,new j(_0x2ce62a(0x216),_0x2ce62a(0x185)+_0x8c3c29['id']);});}function N(_0x56d70e){const _0x15ca2e=_0x11d030;return _0x56d70e['type']===_0x8f800b[_0x15ca2e(0x29b)]||_0x56d70e[_0x15ca2e(0x201)]===_0x8f800b[_0x15ca2e(0x1aa)]&&!ce[_0x15ca2e(0x257)](_0x56d70e['id']);}function P(_0x9d139d){const _0x18c0f5=_0x11d030;if(_0x9d139d===void 0x0)return null;if(_0x9d139d===null||typeof _0x9d139d==_0x18c0f5(0x199)||typeof _0x9d139d=='string')return _0x9d139d;if(typeof _0x9d139d==_0x18c0f5(0x14f)){if(Number[_0x18c0f5(0x226)](_0x9d139d))return _0x9d139d;throw I();}if(Array['isArray'](_0x9d139d))return _0x9d139d[_0x18c0f5(0x258)](P);if(F(_0x9d139d))return Object['fromEntries'](Object[_0x18c0f5(0x187)](_0x9d139d)[_0x18c0f5(0x258)](([_0x2b10c1,_0x17240b])=>[_0x2b10c1,P(_0x17240b)]));throw I();}function F(_0x24b3fa){const _0xe44fb6=_0x11d030;if(typeof _0x24b3fa!=_0xe44fb6(0x224)||!_0x24b3fa)return!0x1;let _0x103a50=Object[_0xe44fb6(0x1fc)](_0x24b3fa);return _0x103a50===Object[_0xe44fb6(0x1b8)]||_0x103a50===null;}function I(){const _0x6aba45=_0x11d030;return new j('COLLABORATION_INVALID_INPUT',_0x6aba45(0x1e1));}var L=class{[_0x11d030(0x23b)]=Promise[_0x11d030(0x22c)]();[_0x11d030(0x17c)](_0x1434e7){const _0x16f9ab=_0x11d030;let _0x57b575=this['_tail'][_0x16f9ab(0x198)](_0x1434e7,_0x1434e7);return this[_0x16f9ab(0x23b)]=_0x57b575['then'](()=>void 0x0,()=>void 0x0),_0x57b575;}};function R(_0x26f95b,_0xac565d,_0x22e774,_0x37ee6e){const _0x215f8a=_0x11d030;if(!Array[_0x215f8a(0x135)](_0x26f95b))throw new j(_0x215f8a(0x20c),_0x215f8a(0x278));let _0x5035c0=[..._0x26f95b][_0x215f8a(0x2b8)]((_0x154213,_0x50829f)=>_0x154213[_0x215f8a(0x1b6)]-_0x50829f[_0x215f8a(0x1b6)]),_0x4d5331=_0x37ee6e;for(let _0x275557 of _0x5035c0){if(!_0x275557||typeof _0x275557!=_0x215f8a(0x224)||!Array[_0x215f8a(0x135)](_0x275557[_0x215f8a(0x1bc)])||_0x275557[_0x215f8a(0x1bc)][_0x215f8a(0x1cf)](_0x4d5830=>!_0x4d5830||typeof _0x4d5830!=_0x215f8a(0x224)||!('id'in _0x4d5830)||typeof _0x4d5830['id']!='string'||!(_0x215f8a(0x1a2)in _0x4d5830)||typeof _0x4d5830['data']!=_0x215f8a(0x27f))||!Number['isSafeInteger'](_0x275557[_0x215f8a(0x22d)])||!Number[_0x215f8a(0x140)](_0x275557[_0x215f8a(0x1b6)])||_0x275557[_0x215f8a(0x231)]!==_0xac565d||_0x275557[_0x215f8a(0x201)]!==_0x22e774||_0x275557[_0x215f8a(0x22d)]!==_0x4d5331||_0x275557[_0x215f8a(0x1b6)]!==_0x4d5331+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0x215f8a(0x150));_0x4d5331=_0x275557[_0x215f8a(0x1b6)];}return _0x5035c0;}function z(_0x4f1c73){const _0x59bc0d=_0x11d030;return{'baseRevision':_0x4f1c73[_0x59bc0d(0x22d)],'mutationCount':_0x4f1c73[_0x59bc0d(0x1bc)][_0x59bc0d(0x27b)],'revision':_0x4f1c73[_0x59bc0d(0x1b6)],..._0x4f1c73[_0x59bc0d(0x1fd)]===void 0x0?{}:{'sid':_0x4f1c73['sid']},..._0x4f1c73[_0x59bc0d(0x200)]===void 0x0?{}:{'reqId':_0x4f1c73[_0x59bc0d(0x200)]}};}function B(_0x180a9a,_0x5495b8,_0xa19ac8,_0x158a93,_0x58348b,_0x5abc08=_0x11d030(0x27d)){const _0x1c21b6=_0x11d030;if(_0x58348b[_0x1c21b6(0x1cf)](_0x2f4ab4=>_0x2f4ab4[_0x1c21b6(0x1bc)][_0x1c21b6(0x1cf)](_0x2015e6=>_0x2015e6['id']===_0x4e6ffd['id'])))throw new j(_0x1c21b6(0x20c),_0x1c21b6(0x1e5));let _0x156531=_0x158a93;for(let _0x4bacfe of _0x58348b){let _0x3efcb1=_0x156531+0x1;if(_0x4bacfe[_0x1c21b6(0x231)]!==_0x5495b8||_0x4bacfe['type']!==_0xa19ac8||_0x4bacfe[_0x1c21b6(0x22d)]!==_0x156531||_0x4bacfe[_0x1c21b6(0x1b6)]!==_0x3efcb1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0x1c21b6(0x13b));let _0x2256d6=_0x2b9af6(_0x4bacfe),_0x41a6a5=_0x180a9a[_0x1c21b6(0x161)][_0x1c21b6(0x1b9)][_0x1c21b6(0x24a)]()[_0x1c21b6(0x1ea)],_0x15fa6a=_0x180a9a[_0x1c21b6(0x161)][_0x1c21b6(0x1b9)][_0x1c21b6(0x207)](_0x41a6a5)(_0x2256d6[_0x1c21b6(0x1bc)],null)??_0x2256d6[_0x1c21b6(0x1bc)],_0x4a6ed1=_0xd0978b(_0x15fa6a,_0x180a9a[_0x1c21b6(0x286)],_0x5abc08==='initial'?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x4a6ed1[_0x1c21b6(0x240)])throw new j(_0x1c21b6(0x168),_0x1c21b6(0x1ef)+_0x4a6ed1[_0x1c21b6(0x2a6)]+':\x20'+String(_0x4a6ed1[_0x1c21b6(0x218)]));let _0x55ca0d=_0x180a9a[_0x1c21b6(0x23a)][_0x1c21b6(0x1d8)](_0x5495b8);if(_0x55ca0d!==_0x3efcb1)throw new j(_0x1c21b6(0x20c),_0x1c21b6(0x152));_0x156531=_0x55ca0d;}return _0x156531;}function V(_0x1ed3d0,_0xe3fd51,_0x541809){const _0x5ea22f=_0x11d030;let _0x50c236=_0x306570[_0x5ea22f(0x1f8)](_0x1ed3d0);switch(_0x541809){case _0x20b30d['UNIVER_SHEET']:return H(_0x50c236[_0x5ea22f(0x190)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x2b2)]:return H(_0x50c236['getDocument'](_0xe3fd51)?.['save'](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x1dc)]:return H(_0x50c236[_0x5ea22f(0x153)](_0xe3fd51)?.['save'](),_0xe3fd51);case _0x20b30d['UNIVER_BASE']:return H(_0x50c236[_0x5ea22f(0x264)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x29a)]:return H(_0x50c236[_0x5ea22f(0x17f)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);default:throw new j(_0x5ea22f(0x216),_0x5ea22f(0x195)+_0x541809);}}function H(_0x2a9e08,_0x5eab3b){const _0xbadb06=_0x11d030;if(_0x2a9e08===void 0x0)throw new j('COLLABORATION_LOAD_FAILED','Unit\x20'+_0x5eab3b+_0xbadb06(0x27a));return structuredClone(_0x2a9e08);}var fe=class{[_0x11d030(0x227)];['unitType'];[_0x11d030(0x273)];[_0x11d030(0x270)];[_0x11d030(0x262)];[_0x11d030(0x2be)];[_0x11d030(0x206)];[_0x11d030(0x254)]=!0x0;[_0x11d030(0x139)]=!0x1;[_0x11d030(0x293)];[_0x11d030(0x21e)];[_0x11d030(0x287)]=new L();[_0x11d030(0x21b)]=[];[_0x11d030(0x1a3)];[_0x11d030(0x210)]=null;['_awaiting']=null;['_sid']=crypto[_0x11d030(0x238)]();[_0x11d030(0x2ae)]=0x1;constructor(_0x427db6,_0x543062,_0x373e60,_0x215380,_0x3e7b22,_0x2b7c52,_0x1a3c0b){const _0x473bbc=_0x11d030;this[_0x473bbc(0x227)]=_0x427db6,this[_0x473bbc(0x296)]=_0x543062,this[_0x473bbc(0x273)]=_0x373e60,this[_0x473bbc(0x270)]=_0x215380,this[_0x473bbc(0x262)]=_0x3e7b22,this[_0x473bbc(0x2be)]=_0x2b7c52,this[_0x473bbc(0x1a3)]=_0x373e60,this[_0x473bbc(0x293)]=new se(_0x2b7c52,_0x427db6,_0x543062),this['_executor']=ue(_0x3e7b22,_0x427db6,_0x1a3c0b);}['getState'](){const _0x4c5c4f=_0x11d030;return{'awaitingChangeset':this[_0x4c5c4f(0x1d9)]===null?null:U(this[_0x4c5c4f(0x1d9)]),'baseRevision':this[_0x4c5c4f(0x273)],'bufferedChangesetCount':this[_0x4c5c4f(0x21b)][_0x4c5c4f(0x27b)],'conflict':this[_0x4c5c4f(0x210)],'connection':this[_0x4c5c4f(0x139)]?'closed':this[_0x4c5c4f(0x270)]['getConnectionState'](),'knownHeadRevision':this[_0x4c5c4f(0x1a3)],'pendingMutationCount':this[_0x4c5c4f(0x293)]['pending'][_0x4c5c4f(0x27b)]};}[_0x11d030(0x22f)](){const _0x3b62c6=_0x11d030;return structuredClone(this[_0x3b62c6(0x293)][_0x3b62c6(0x19d)]);}[_0x11d030(0x247)](){const _0xe6dc5c=_0x11d030;return this[_0xe6dc5c(0x171)]()||this[_0xe6dc5c(0x287)]['run'](async()=>(this[_0xe6dc5c(0x26c)](_0xe6dc5c(0x247)),await this[_0xe6dc5c(0x1d1)]()));}[_0x11d030(0x159)](){const _0x179a6e=_0x11d030;return this[_0x179a6e(0x171)]()||this['_operations'][_0x179a6e(0x17c)](async()=>{const _0x188f72=_0x179a6e;if(this[_0x188f72(0x26c)](_0x188f72(0x159)),await this[_0x188f72(0x1d1)](),this['_bufferedChangesets'][_0x188f72(0x27b)]===0x0)return{'state':this['getState'](),'status':_0x188f72(0x1d4)};let _0x5cd4af=[...this['_bufferedChangesets']];if(_0x5cd4af[_0x188f72(0x1cf)](_0x20f947=>_0x20f947['mutations'][_0x188f72(0x1cf)](_0xa322b9=>_0xa322b9['id']===_0x4e6ffd['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x188f72(0x19a));let _0x2ea5a2=this[_0x188f72(0x273)],_0x3c5e0d=this[_0x188f72(0x1d9)]?W(this[_0x188f72(0x1d9)][_0x188f72(0x1bc)],this[_0x188f72(0x227)],this[_0x188f72(0x296)],this[_0x188f72(0x273)]):null,_0x583c7c=_0x2b9af6({'baseRev':this[_0x188f72(0x273)],'memberID':'','mutations':[...this[_0x188f72(0x293)]['pending']],'revision':0x0,'type':this[_0x188f72(0x296)],'unitID':this[_0x188f72(0x227)],'userID':''})[_0x188f72(0x1bc)],_0x4d851e=[];for(let _0x229564 of _0x5cd4af){let _0x38f4e3=_0x2b9af6(_0x229564);if(this[_0x188f72(0x1d9)]!==null&&_0x229564[_0x188f72(0x1fd)]===this[_0x188f72(0x1d9)]['sid']&&_0x229564[_0x188f72(0x200)]===this[_0x188f72(0x1d9)][_0x188f72(0x200)]){let _0x162066=(_0x3c5e0d??[])['map'](_0x451c27);G(_0x229564['mutations'],_0x162066)||await this['_closeAfterFatalError'](new j(_0x188f72(0x20c),_0x188f72(0x245))),_0x4d851e[_0x188f72(0x209)]({'changeset':_0x229564,'kind':_0x188f72(0x14b)}),_0x3c5e0d=null;continue;}let _0x331a7b=_0x38f4e3[_0x188f72(0x1bc)];if(_0x3c5e0d!==null){let _0x59b560=this[_0x188f72(0x2be)][_0x188f72(0x147)]['transformMutations'](_0x331a7b,_0x3c5e0d,!0x1);if(!_0x4dd855(_0x59b560))return this[_0x188f72(0x210)]={'message':_0x59b560['error'][_0x188f72(0x1c5)],'operation':'pull','reason':'transform-failed'},{'conflict':this['_conflict'],'state':this[_0x188f72(0x1f7)](),'status':'conflict'};_0x331a7b=_0x59b560[_0x188f72(0x1df)],_0x3c5e0d=_0x59b560[_0x188f72(0x290)];}let _0x223186=this['_kernel']['transformService'][_0x188f72(0x242)](_0x331a7b,_0x583c7c,!0x1);if(!_0x4dd855(_0x223186))return this[_0x188f72(0x210)]={'message':_0x223186[_0x188f72(0x218)][_0x188f72(0x1c5)],'operation':_0x188f72(0x159),'reason':_0x188f72(0x136)},{'conflict':this[_0x188f72(0x210)],'state':this[_0x188f72(0x1f7)](),'status':_0x188f72(0x1ce)};_0x4d851e[_0x188f72(0x209)]({'changeset':_0x437dd3({..._0x38f4e3,'mutations':_0x223186[_0x188f72(0x1df)]}),'kind':'remote'}),_0x583c7c=_0x223186[_0x188f72(0x290)];}let _0x1aecfa=_0x2ea5a2;for(let _0x567921 of _0x4d851e){if(_0x567921[_0x188f72(0x196)]==='awaiting-ack'){let _0x524fb1=this[_0x188f72(0x2be)]['revisionService'][_0x188f72(0x1d8)](this[_0x188f72(0x227)]);_0x524fb1!==_0x567921[_0x188f72(0x219)][_0x188f72(0x1b6)]&&await this[_0x188f72(0x1da)](new j(_0x188f72(0x20c),_0x188f72(0x1e8))),_0x1aecfa=_0x524fb1;continue;}_0x1aecfa=await this[_0x188f72(0x19b)](_0x1aecfa,[_0x567921[_0x188f72(0x219)]]);}return this['_capture'][_0x188f72(0x28d)](_0x583c7c[_0x188f72(0x258)](_0x451c27)),this[_0x188f72(0x1d9)]!==null&&(this[_0x188f72(0x1d9)]=_0x3c5e0d===null?null:{...this[_0x188f72(0x1d9)],'baseRev':_0x1aecfa,'mutations':_0x3c5e0d['map'](_0x451c27)}),this[_0x188f72(0x273)]=_0x1aecfa,this['_bufferedChangesets'][_0x188f72(0x193)](0x0),{'appliedChangesets':_0x5cd4af[_0x188f72(0x258)](z),'fromRevision':_0x2ea5a2,'state':this[_0x188f72(0x1f7)](),'status':_0x188f72(0x164),'toRevision':_0x1aecfa,'transformedPendingMutationCount':_0x583c7c['length']};});}[_0x11d030(0x1e3)](){const _0x3413d8=_0x11d030;return this[_0x3413d8(0x171)]()||this[_0x3413d8(0x287)]['run'](async()=>{const _0x10f789=_0x3413d8;this[_0x10f789(0x26c)](_0x10f789(0x1e3));let _0x40e103=[],_0x1ba918=[];if(this[_0x10f789(0x1d9)]===null){if(this[_0x10f789(0x293)][_0x10f789(0x19d)]['length']===0x0)return{'state':this[_0x10f789(0x1f7)](),'status':'nothing-to-commit'};if(await this['_fetchChangesets'](),this[_0x10f789(0x21b)][_0x10f789(0x27b)]>0x0)return{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x40e103,'knownHeadRevision':this[_0x10f789(0x1a3)],'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1c8)};this[_0x10f789(0x137)]();}for(;this[_0x10f789(0x1d9)]!==null;){let _0x56929e=this[_0x10f789(0x1d9)],_0x500b04;try{_0x500b04=await this['_handle'][_0x10f789(0x2aa)](_0x56929e);}catch{return{'changeset':U(_0x56929e),'confirmedChangesets':_0x40e103,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1a6)};}if(_0x500b04['status']===_0x10f789(0x276)||_0x500b04[_0x10f789(0x13a)]===_0x10f789(0x1a6))return{'changeset':U(_0x56929e),'confirmedChangesets':_0x40e103,'state':this['getState'](),'status':_0x500b04['status']};if(_0x500b04[_0x10f789(0x13a)]===_0x10f789(0x2a1))return _0x500b04[_0x10f789(0x265)]===_0x10f789(0x154)?(this[_0x10f789(0x293)]['prependPending'](_0x56929e[_0x10f789(0x1bc)]),this['_awaiting']=null,await this[_0x10f789(0x1d1)](),{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x40e103,'knownHeadRevision':this[_0x10f789(0x1a3)],'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1c8)}):(this[_0x10f789(0x210)]={'message':_0x500b04[_0x10f789(0x1c5)],'operation':_0x10f789(0x1e3),'reason':_0x500b04[_0x10f789(0x265)]===_0x10f789(0x23f)?_0x10f789(0x18a):'changeset-rejected'},{'conflict':this[_0x10f789(0x210)],'confirmedChangesets':_0x40e103,'state':this['getState'](),'status':'conflict'});let _0x448a28=_0x500b04[_0x10f789(0x2ab)];try{this[_0x10f789(0x212)](_0x56929e,_0x500b04[_0x10f789(0x1e4)],_0x448a28);}catch(_0x52f375){await this['_closeAfterFatalError'](_0x52f375);}let _0x5ed26a=_0x56929e[_0x10f789(0x1bc)];if(_0x500b04[_0x10f789(0x1e4)][_0x10f789(0x27b)]>0x0){let _0x239f6e=await this[_0x10f789(0x13f)](_0x56929e,_0x500b04[_0x10f789(0x1e4)]);if(_0x239f6e===null)return{'conflict':this[_0x10f789(0x210)],'confirmedChangesets':_0x40e103,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1ce)};_0x5ed26a=_0x239f6e[_0x10f789(0x181)];try{this[_0x10f789(0x2a3)](_0x500b04[_0x10f789(0x1e4)]);}catch(_0x54bb19){await this[_0x10f789(0x1da)](_0x54bb19);}_0x1ba918[_0x10f789(0x209)](..._0x500b04[_0x10f789(0x1e4)][_0x10f789(0x258)](z));}G(_0x448a28[_0x10f789(0x1bc)],_0x5ed26a)||await this[_0x10f789(0x1da)](new j(_0x10f789(0x20c),'Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset'));let _0x445ae6=this[_0x10f789(0x2be)]['revisionService'][_0x10f789(0x1d8)](this[_0x10f789(0x227)]);if(_0x445ae6!==_0x448a28[_0x10f789(0x1b6)]&&await this[_0x10f789(0x1da)](new j('COLLABORATION_PROTOCOL_ERROR','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision')),this[_0x10f789(0x273)]=_0x445ae6,this['_knownHeadRevision']=Math[_0x10f789(0x21a)](this['_knownHeadRevision'],_0x445ae6),this[_0x10f789(0x1d9)]=null,_0x40e103[_0x10f789(0x209)](z(_0x448a28)),this[_0x10f789(0x293)][_0x10f789(0x19d)][_0x10f789(0x27b)]===0x0)break;this[_0x10f789(0x137)]();}return{'confirmedChangesets':_0x40e103,'reconciledChangesets':_0x1ba918,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1ff)};});}async[_0x11d030(0x1d1)](){const _0x2d7f64=_0x11d030;let _0x51e540=this[_0x2d7f64(0x1a3)],_0x56975e=await this[_0x2d7f64(0x270)][_0x2d7f64(0x1e9)](_0x51e540,void 0x0);if(_0x400ff3(_0x56975e['error'])){let _0x46f56c=_0x56975e[_0x2d7f64(0x218)];throw new j(_0x2d7f64(0x2b1),_0x46f56c?.[_0x2d7f64(0x1c5)]||_0x2d7f64(0x22e),{'retryable':!0x0});}let _0x51e34a=R(_0x56975e[_0x2d7f64(0x157)],this[_0x2d7f64(0x227)],this[_0x2d7f64(0x296)],_0x51e540),_0x5cd392=_0x51e34a['at'](-0x1)?.[_0x2d7f64(0x1b6)]??_0x51e540;if(_0x56975e[_0x2d7f64(0x21f)]!==void 0x0&&_0x56975e[_0x2d7f64(0x21f)]!==_0x5cd392)throw new j(_0x2d7f64(0x20c),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range');return _0x51e34a[_0x2d7f64(0x27b)]===0x0?{'knownHeadRevision':this[_0x2d7f64(0x1a3)],'state':this[_0x2d7f64(0x1f7)](),'status':'unchanged'}:(this[_0x2d7f64(0x21b)][_0x2d7f64(0x209)](..._0x51e34a),this[_0x2d7f64(0x1a3)]=_0x5cd392,{'changesets':_0x51e34a['map'](z),'fromRevision':_0x51e540,'state':this['getState'](),'status':_0x2d7f64(0x259),'toRevision':_0x5cd392});}['_createAwaitingFromPending'](){const _0x366f13=_0x11d030;let _0x5ce555=this[_0x366f13(0x293)][_0x366f13(0x2a0)]();this['_awaiting']={'baseRev':this['_baseRevision'],'mutations':_0x5ce555,'reqId':this[_0x366f13(0x2ae)],'sid':this[_0x366f13(0x285)]},this[_0x366f13(0x2ae)]+=0x1;}[_0x11d030(0x212)](_0x1673e0,_0x3cafb6,_0x7e21b2){const _0xc0ba80=_0x11d030;let _0x591efc=R(_0x3cafb6,this[_0xc0ba80(0x227)],this[_0xc0ba80(0x296)],this[_0xc0ba80(0x273)])['at'](-0x1)?.[_0xc0ba80(0x1b6)]??this[_0xc0ba80(0x273)];if(_0x7e21b2[_0xc0ba80(0x231)]!==this[_0xc0ba80(0x227)]||_0x7e21b2[_0xc0ba80(0x201)]!==this[_0xc0ba80(0x296)]||_0x7e21b2[_0xc0ba80(0x1fd)]!==_0x1673e0[_0xc0ba80(0x1fd)]||_0x7e21b2[_0xc0ba80(0x200)]!==_0x1673e0['reqId']||_0x7e21b2[_0xc0ba80(0x22d)]!==_0x591efc||_0x7e21b2[_0xc0ba80(0x1b6)]!==_0x591efc+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0xc0ba80(0x251));}async[_0x11d030(0x13f)](_0xce8cf1,_0xbcb0e8){const _0x129b34=_0x11d030;let _0x3b3948=W(_0xce8cf1[_0x129b34(0x1bc)],this[_0x129b34(0x227)],this[_0x129b34(0x296)],this['_baseRevision']),_0x8aebaf=W(this[_0x129b34(0x293)][_0x129b34(0x19d)],this[_0x129b34(0x227)],this[_0x129b34(0x296)],this[_0x129b34(0x273)]),_0x6c6396=[];for(let _0x261f9b of _0xbcb0e8){let _0x59ea19=_0x2b9af6(_0x261f9b),_0x189a1f=this[_0x129b34(0x2be)]['transformService'][_0x129b34(0x242)](_0x59ea19[_0x129b34(0x1bc)],_0x3b3948,!0x1);if(!_0x4dd855(_0x189a1f))return this[_0x129b34(0x237)](_0x129b34(0x1e3),_0x189a1f[_0x129b34(0x218)]),null;_0x3b3948=_0x189a1f['m2Prime'];let _0x37eada=this[_0x129b34(0x2be)]['transformService']['transformMutations'](_0x189a1f['m1Prime'],_0x8aebaf,!0x1);if(!_0x4dd855(_0x37eada))return this['_setTransformConflict']('commit',_0x37eada[_0x129b34(0x218)]),null;_0x8aebaf=_0x37eada[_0x129b34(0x290)],_0x6c6396['push'](_0x437dd3({..._0x59ea19,'mutations':_0x37eada['m1Prime']}));}let _0x29c867=await this[_0x129b34(0x19b)](this[_0x129b34(0x273)],_0x6c6396);return this[_0x129b34(0x293)][_0x129b34(0x28d)](_0x8aebaf[_0x129b34(0x258)](_0x451c27)),this[_0x129b34(0x273)]=_0x29c867,{'awaitingMutations':_0x3b3948['map'](_0x451c27),'revision':_0x29c867};}[_0x11d030(0x237)](_0x4b3157,_0x12645e){const _0x1c40fe=_0x11d030;this[_0x1c40fe(0x210)]={'message':_0x12645e[_0x1c40fe(0x1c5)],'operation':_0x4b3157,'reason':'transform-failed'};}async[_0x11d030(0x19b)](_0x3ebe1f,_0x31c5af){const _0x28c22a=_0x11d030;try{return await this['_capture'][_0x28c22a(0x1de)](async()=>B(this[_0x28c22a(0x2be)],this[_0x28c22a(0x227)],this[_0x28c22a(0x296)],_0x3ebe1f,_0x31c5af,_0x28c22a(0x27c)));}catch(_0x3f2b80){return await this[_0x28c22a(0x1da)](_0x3f2b80);}}async[_0x11d030(0x1da)](_0x37d1c4){const _0x4afbe0=_0x11d030;this[_0x4afbe0(0x254)]=!0x1,this['_closePromise']??=this[_0x4afbe0(0x233)]();try{await this[_0x4afbe0(0x206)];}catch{}throw _0x37d1c4;}[_0x11d030(0x2a3)](_0xff8c3b){const _0x1dc56c=_0x11d030;let _0x1cd581=_0xff8c3b['at'](-0x1)?.['revision'];if(_0x1cd581===void 0x0||this[_0x1dc56c(0x21b)][_0x1dc56c(0x27b)]===0x0)return;let _0xc620e9=this[_0x1dc56c(0x21b)]['findIndex'](({revision:_0x449c7c})=>_0x449c7c>_0x1cd581),_0x177470=this[_0x1dc56c(0x21b)][_0x1dc56c(0x2ac)](0x0,_0xc620e9===-0x1?this['_bufferedChangesets'][_0x1dc56c(0x27b)]:_0xc620e9);for(let _0xc13910 of _0x177470){let _0x3bfaa1=_0xff8c3b[_0x1dc56c(0x20f)](({revision:_0x432f31})=>_0x432f31===_0xc13910[_0x1dc56c(0x1b6)]);if(!_0x3bfaa1||!pe(_0xc13910,_0x3bfaa1))throw new j(_0x1dc56c(0x20c),_0x1dc56c(0x13e));}this['_bufferedChangesets']['splice'](0x0,_0x177470['length']);}['execute'](_0xfa09a9){const _0x2d6274=_0x11d030;return this[_0x2d6274(0x171)]()||this['_operations'][_0x2d6274(0x17c)](async()=>{const _0x4b6678=_0x2d6274;_0xfa09a9[_0x4b6678(0x253)]===_0x4b6678(0x16d)&&this[_0x4b6678(0x26c)](_0x4b6678(0x16d));let _0x465def=this[_0x4b6678(0x293)]['pending'][_0x4b6678(0x27b)],_0x4e8ec7=P(await this[_0x4b6678(0x21e)][_0x4b6678(0x162)](_0xfa09a9[_0x4b6678(0x1e2)],_0xfa09a9[_0x4b6678(0x253)]));return _0xfa09a9['mode']===_0x4b6678(0x1db)?{'state':this[_0x4b6678(0x1f7)](),'value':_0x4e8ec7}:{'mutations':this['_capture']['snapshotFrom'](_0x465def),'state':this[_0x4b6678(0x1f7)](),'value':_0x4e8ec7};});}[_0x11d030(0x2a2)](_0x187042){const _0x37eb1b=_0x11d030;return this[_0x37eb1b(0x171)]()||this[_0x37eb1b(0x287)][_0x37eb1b(0x17c)](async()=>{const _0x5602fc=_0x37eb1b;if(this['_assertMutableState'](_0x5602fc(0x2b0)),this[_0x5602fc(0x1d9)]!==null)throw new j(_0x5602fc(0x216),_0x5602fc(0x2af));let _0x1af2b8=me(_0x187042),_0x113202=[...this[_0x5602fc(0x293)]['pending']];this[_0x5602fc(0x293)][_0x5602fc(0x28d)](_0x1af2b8);let _0x33d270=this[_0x5602fc(0x1f7)]();return{'pendingMutationCount':_0x1af2b8['length'],'previousMutationCount':_0x113202[_0x5602fc(0x27b)],'state':_0x33d270};});}[_0x11d030(0x186)](){const _0xafe301=_0x11d030;return this['_rejectIfNotAccepting']()||this[_0xafe301(0x287)]['run'](async()=>V(this[_0xafe301(0x262)],this[_0xafe301(0x227)],this[_0xafe301(0x296)]));}[_0x11d030(0x192)](){const _0x220f84=_0x11d030;return this[_0x220f84(0x206)]?this[_0x220f84(0x206)]:(this['_acceptingOperations']=!0x1,this[_0x220f84(0x206)]=this[_0x220f84(0x287)][_0x220f84(0x17c)](async()=>await this['_closeOwnedResources']()),this['_closePromise']);}async[_0x11d030(0x233)](){const _0x2d4b4f=_0x11d030;try{this[_0x2d4b4f(0x293)][_0x2d4b4f(0x28c)](),await this[_0x2d4b4f(0x270)][_0x2d4b4f(0x192)]();}finally{try{this['_univer'][_0x2d4b4f(0x28c)]();}finally{this[_0x2d4b4f(0x139)]=!0x0;}}}['_rejectIfNotAccepting'](){const _0x4936b5=_0x11d030;return this[_0x4936b5(0x254)]?null:Promise[_0x4936b5(0x18c)](new j(_0x4936b5(0x1bd),_0x4936b5(0x14d)));}[_0x11d030(0x26c)](_0x451ac8){const _0x559fda=_0x11d030;if(this[_0x559fda(0x210)]!==null)throw new j(_0x559fda(0x216),_0x559fda(0x1f9)+_0x451ac8+_0x559fda(0x1d0));}};function U(_0x432e77){const _0xd44b17=_0x11d030;return{'baseRevision':_0x432e77[_0xd44b17(0x22d)],'mutationCount':_0x432e77[_0xd44b17(0x1bc)][_0xd44b17(0x27b)],'reqId':_0x432e77[_0xd44b17(0x200)],'revision':0x0,'sid':_0x432e77[_0xd44b17(0x1fd)]};}function W(_0x443f84,_0x2d33e3,_0x1e89ec,_0x3f9226){return _0x2b9af6({'baseRev':_0x3f9226,'memberID':'','mutations':[..._0x443f84],'revision':0x0,'type':_0x1e89ec,'unitID':_0x2d33e3,'userID':''})['mutations'];}function pe(_0x7bce1c,_0x13283f){const _0x29a6d5=_0x11d030;return _0x7bce1c[_0x29a6d5(0x231)]===_0x13283f[_0x29a6d5(0x231)]&&_0x7bce1c[_0x29a6d5(0x201)]===_0x13283f[_0x29a6d5(0x201)]&&_0x7bce1c['baseRev']===_0x13283f[_0x29a6d5(0x22d)]&&_0x7bce1c[_0x29a6d5(0x1b6)]===_0x13283f[_0x29a6d5(0x1b6)]&&_0x7bce1c['sid']===_0x13283f['sid']&&_0x7bce1c[_0x29a6d5(0x200)]===_0x13283f[_0x29a6d5(0x200)]&&JSON[_0x29a6d5(0x1be)](_0x7bce1c[_0x29a6d5(0x1bc)])===JSON[_0x29a6d5(0x1be)](_0x13283f[_0x29a6d5(0x1bc)]);}function G(_0x4d8982,_0x48da8e){const _0x3fb73d=_0x11d030;return _0x4d8982[_0x3fb73d(0x27b)]===_0x48da8e[_0x3fb73d(0x27b)]&&_0x4d8982[_0x3fb73d(0x295)]((_0x49d243,_0x1f99f8)=>_0x49d243['id']===_0x48da8e[_0x1f99f8]?.['id']&&_0x49d243[_0x3fb73d(0x1a2)]===_0x48da8e[_0x1f99f8]?.[_0x3fb73d(0x1a2)]);}function me(_0x31dffd){const _0xc48f20=_0x11d030;if(!Array['isArray'](_0x31dffd))throw new j(_0xc48f20(0x216),_0xc48f20(0x28f));return _0x31dffd[_0xc48f20(0x258)](_0x49ff93=>{const _0x2bc2cc=_0xc48f20;if(!_0x49ff93||typeof _0x49ff93!='object'||typeof _0x49ff93['id']!=_0x2bc2cc(0x27f)||_0x49ff93['id'][_0x2bc2cc(0x27b)]===0x0||typeof _0x49ff93[_0x2bc2cc(0x1a2)]!=_0x2bc2cc(0x27f))throw new j(_0x2bc2cc(0x216),'Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields');return{'data':_0x49ff93[_0x2bc2cc(0x1a2)],'id':_0x49ff93['id']};});}var K=class extends _0xfef6ce{[_0x11d030(0x15d)];[_0x11d030(0x1d3)];static [_0x11d030(0x277)]=_0x11d030(0x29c);constructor(_0x1bf960,_0x12fdec){const _0x2315df=_0x11d030;super(),this[_0x2315df(0x15d)]=_0x1bf960,this[_0x2315df(0x1d3)]=_0x12fdec;}[_0x11d030(0x249)](){const _0x37fd23=_0x11d030;this[_0x37fd23(0x15d)][_0x37fd23(0x282)]!==void 0x0&&_0x56afce(this['_injector'],[[_0x4dc918,{'useValue':this[_0x37fd23(0x15d)][_0x37fd23(0x282)]}]]),this[_0x37fd23(0x15d)][_0x37fd23(0x249)]({'commandService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x16b588),'compressMutationService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x79e251),'instanceService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x5896bb),'injector':this[_0x37fd23(0x1d3)],'revisionService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x3614fb),'transformService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x4fd054)});}};K=_0x16ecd6([_0x402b0b(_0x382b63),_0xc64a00(0x1,_0x2dcc67(_0x3a4ce6))],K);function he(_0x3567a7,_0x350d86){const _0x237efe=_0x11d030;let _0x1a04c1;if(_0x3567a7[_0x237efe(0x156)](K,{'onStarting'(_0x20ce2b){_0x1a04c1=_0x20ce2b;},..._0x350d86===void 0x0?{}:{'snapshotServerService':_0x350d86}}),!_0x1a04c1)throw Error(_0x237efe(0x221));return _0x1a04c1;}async function ge(_0x1cfd73,_0x19ec96,_0x658b69){const _0x251d20=_0x11d030;let _0x1c7a93=await _0x1cfd73['getUnitOnRev'](0x0);if(_0x400ff3(_0x1c7a93[_0x251d20(0x218)])){let _0x238bc8=_0x1c7a93[_0x251d20(0x218)];throw new j(_0x251d20(0x168),_0x238bc8?.[_0x251d20(0x1c5)]||_0x251d20(0x18f));}let _0x40e200=_0x1c7a93[_0x251d20(0x225)];if(!_0x40e200)throw new j('COLLABORATION_LOAD_FAILED',_0x251d20(0x1b1));_e(_0x40e200,_0x19ec96,_0x658b69);try{switch(_0x658b69){case _0x20b30d[_0x251d20(0x272)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':await _0x3c8e29(_0x40e200,await q(_0x1cfd73,_0x40e200)),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x2b2)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':_0x9a37bd(_0x40e200),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x1dc)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':_0x3b04ef(_0x40e200),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x15e)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':await _0xf344e5(_0x40e200,await q(_0x1cfd73,_0x40e200)),'unitType':_0x658b69};case _0x20b30d['UNIVER_BOARD']:return{'changesets':_0x1c7a93['changesets'],'unitData':_0x48a275(_0x40e200),'unitType':_0x658b69};default:throw new j(_0x251d20(0x216),_0x251d20(0x195)+_0x658b69);}}catch(_0x176f43){throw _0x176f43 instanceof j?_0x176f43:new j(_0x251d20(0x168),'Failed\x20to\x20transform\x20the\x20Unit\x20snapshot',{'cause':_0x176f43});}}function _0x5cc0(){const _0xedb916=['getSheetBlock','_memberId','_lease','3PDkQxt','revision','includes','prototype','interceptor','readyState','univerAPI','mutations','COLLABORATION_CLOSED','stringify','changeset_ack','board','Collaboration\x20WebSocket\x20closed\x20before\x20opening','set','CollaborationRuntimeError','injector','message','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','leases','pull-required','_join','online','\x20for\x20Unit\x20','send','ack','conflict','some','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','_fetchChangesets','createUniver','_injector','up-to-date','\x20})();','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','collabWebSocketUrl','incrementRevOfUnit','_awaiting','_closeAfterFatalError','read','UNIVER_SLIDE','promise','suppress','m1Prime','Invalid\x20JSON\x20response','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','code','commit','precedingChangesets','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','accepted','_target','Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision','fetchChangesets','COMPRESS_MUTATION_APPLY','onlyLocal','Runtime\x20for\x20','open','cmd','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','Snapshot\x20contains\x20duplicate\x20block\x20ids','_connectPromise','backend','getUnitData','_handleMessage','params','getState','newAPI','Cannot\x20','originalMeta','format','getPrototypeOf','sid','_captureCommandMutation','confirmed','reqId','type','_pending','base64','unit','6HuLmkO','_closePromise','fetchThroughInterceptors','actions','push','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','_release','COLLABORATION_PROTOCOL_ERROR','permission','formula.mutation.set-calculation-result','find','_conflict','_socket','_validateAcceptedChangeset','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20','Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON','reconnecting','COLLABORATION_INVALID_INPUT','block','error','changeset','max','_bufferedChangesets','8472821BjsHcO','closed','_executor','latestRevision','sheet.mutation.send-init-pivot-text-local','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','memberID','_connection','object','snapshot','isFinite','unitId','_reconnectAttempts','new_changes','9770gjkKRR','retryable','resolve','baseRev','Backend\x20failed\x20to\x20fetch\x20changesets','getPendingMutations','httpRequest','unitID','createDocument','_closeOwnedResources','HEARTBEAT','csShouldRetryEvent','createPresentation','_setTransformConflict','randomUUID','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','revisionService','_tail','12244672MFpGnn','\x20cannot\x20capture\x20mutation\x20','commandId','permission-denied','result','Single-Unit\x20runtime\x20for\x20','transformMutations','timeout','prependPending','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','save','fetch','onMutationExecutedForCollab','onStarting','getInterceptPoints','snapshotFrom','Failed\x20to\x20rejoin\x20Unit\x20room','snapshotServerUrl','add','fetchmissing','timer','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset','csAckEvent','mode','_acceptingOperations','Initial\x20Unit\x20JOIN\x20failed','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','has','map','fetched','collabSubmitChangesetUrl','COMPRESS_MUTATION_SEND','Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command','delete','Failed\x20to\x20open\x20the\x20collaboration\x20backend','pathname','infoRsp','_suppressionDepth','_univer','_subscribeToDocumentState','getBase','reason','unitId\x20must\x20not\x20be\x20empty','searchParams','replace','_handleCollaborationEvent','createUniverSheet','fromChangeset','_assertMutableState','takeInboundChangesets','Event','size','_handle','Failed\x20to\x20fetch\x20preceding\x20changesets','UNIVER_SHEET','_baseRevision','permissionRejEvent','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','retry','pluginName','Backend\x20changesets\x20must\x20be\x20an\x20array','json','\x20is\x20unavailable','length','remote','initial','invalid','string','\x20returned\x20a\x20different\x20block\x20identity','new_changesets','snapshotServerService','Collaboration\x20WebSocket\x20is\x20not\x20online','unshift','_sid','commandService','_operations','Connection\x20timed\x20out','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','_joined','_submissionWaiters','dispose','replacePending','clear','Replacement\x20mutations\x20must\x20be\x20an\x20array','m2Prime','memberId','cancel','_capture','permission_rej','every','unitType','addEvent','getUnitOnRev','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','UNIVER_BOARD','COMMAND','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','collaMsg','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','Collaboration\x20HELLO\x20response\x20is\x20invalid','takePending','rejected','replacePendingMutations','_consumeBufferedPrecedingChangesets','createWorkbook','sheets','index','GET','44184flBWQd','formula.mutation.set-trigger-formula-calculation-stop','submitChangeset','acceptedChangeset','slice','_heartbeat','_nextReqId','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','replace\x20mutations','COLLABORATION_UNAVAILABLE','UNIVER_DOC','workbook','BeforeCommandExecute','changeset_rej','22GpKmaY','createBoard','sort','_commandWaiters','No\x20active\x20Unit\x20leases','\x20character\x20limit','OPEN','acquire','_kernel','isArray','transform-failed','_createAwaitingFromPending','ws:','_closed','status','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','LEAVE','_startHeartbeat','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','_reconcilePrecedingChangesets','isSafeInteger','commitTimeoutMs','changeset-rejected','removeEventListener','\x20cannot\x20call\x20','2931498nEgNhE','invalid-changeset','transformService','_waitForSubmission','http:','waitForSubmission','awaiting-ack','_inbound','Collaboration\x20runtime\x20is\x20closing\x20or\x20closed','protocol','number','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','wsSessionTicketUrl','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','getPresentation','invalid-revision','subscribe','registerPlugin','changesets','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','pull','_disposables','routeKey','https:','_config','UNIVER_BASE','6504196rRFVym','Changeset\x20submission\x20was\x20rejected','compressMutationService','execute','Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range','pulled','get','min','2844150fKbbFC','COLLABORATION_LOAD_FAILED','_requestCommand','_ensureConnected','values','catch','write','eventID','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','formula.mutation.set-formula-data','_rejectIfNotAccepting','The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','trigger','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','wss:','waitForLatestApplied','ticket','application/json','JOIN','sessionTicket','run','RECV','getConnectionState','getBoard','addEventListener','awaitingMutations','44143oaHfxv','Code\x20is\x20longer\x20than\x20the\x20','unsubscribe','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20','exportUnitData','entries','_reconnectTimer','_failCommandWaiters','permission-rejected','_state','reject','name','createUnit','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','getWorkbook','target','close','splice','parse','Unsupported\x20collaboration\x20Unit\x20type:\x20','kind','_stopHeartbeat','then','boolean','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','_replayRemoteChangesets','Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id','pending','Snapshot\x20block\x20','changeset_should_retry','_scheduleReconnect','from','data','_knownHeadRevision','unitData','_connect','unknown','createBase','docStateChange$','_unitId','MUTATION','ensureOnline','offline','finally','formula.mutation.set-trigger-formula-calculation','rev','formula.mutation.set-array-formula-data','Backend\x20returned\x20no\x20Unit\x20snapshot'];_0x5cc0=function(){return _0xedb916;};return _0x5cc0();}function _e(_0x1ad606,_0x38c341,_0x5ca2a0){const _0x2937c4=_0x11d030;if(_0x1ad606[_0x2937c4(0x231)]!==_0x38c341||_0x1ad606['type']!==_0x5ca2a0)throw new j(_0x2937c4(0x168),_0x2937c4(0x158));if(!Number['isSafeInteger'](_0x1ad606['rev'])||_0x1ad606[_0x2937c4(0x1af)]<0x1)throw new j(_0x2937c4(0x168),_0x2937c4(0x1d6));}async function q(_0x2d10f5,_0x53b680){const _0x28ea5e=_0x11d030;let _0x465feb=_0x53b680[_0x28ea5e(0x2b3)];if(!_0x465feb)throw new j(_0x28ea5e(0x168),'Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata');let _0x4d1a28=Object['values'](_0x465feb['blockMeta'])['flatMap'](({blocks:_0x25be3f})=>_0x25be3f);if(new Set(_0x4d1a28)['size']!==_0x4d1a28[_0x28ea5e(0x27b)])throw new j('COLLABORATION_LOAD_FAILED',_0x28ea5e(0x1f1));return await Promise['all'](_0x4d1a28[_0x28ea5e(0x258)](async _0x1ab199=>{const _0x200c2f=_0x28ea5e;let _0x1b4a9f=await _0x2d10f5[_0x200c2f(0x1b2)](_0x1ab199);if(_0x400ff3(_0x1b4a9f['error'])||!_0x1b4a9f[_0x200c2f(0x217)])throw new j(_0x200c2f(0x168),_0x1b4a9f[_0x200c2f(0x218)]?.['message']||_0x200c2f(0x19e)+_0x1ab199+_0x200c2f(0x27a));if(_0x1b4a9f[_0x200c2f(0x217)]['id']!==_0x1ab199)throw new j(_0x200c2f(0x168),_0x200c2f(0x19e)+_0x1ab199+_0x200c2f(0x280));return _0x1b4a9f[_0x200c2f(0x217)];}));}function ve(_0x49429d){const _0x44f544=_0x11d030;let _0x33902b=_0x49429d['maxCodeLength']??0xa00000;if(!Number[_0x44f544(0x140)](_0x33902b)||_0x33902b<=0x0)throw new j(_0x44f544(0x216),_0x44f544(0x256));return{async 'load'(_0x103616,_0x507bd2){const _0x284ec1=_0x44f544;be(_0x103616,_0x507bd2);let _0x2dd458,_0x3afd41={'unitId':_0x103616,'unitType':_0x507bd2},_0x36b5ed={'unitId':_0x103616,'unitType':_0x507bd2,..._0x49429d[_0x284ec1(0x282)]===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x3e959d=_0x284ec1;if(_0x2dd458===void 0x0)throw new j(_0x3e959d(0x168),_0x3e959d(0x173));return _0x2dd458;}}},_0x14b129;try{_0x14b129=await _0x49429d[_0x284ec1(0x1f3)][_0x284ec1(0x1ed)](_0x3afd41);}catch(_0x53d24c){throw new j(_0x284ec1(0x2b1),_0x284ec1(0x25e),{'cause':_0x53d24c,'retryable':!0x0});}let _0x1d66f2;try{_0x1d66f2=await _0x49429d[_0x284ec1(0x1d2)](_0x36b5ed);let _0x1287ec=he(_0x1d66f2,_0x49429d['snapshotServerService']);_0x49429d[_0x284ec1(0x282)]!==void 0x0&&(_0x2dd458=_0x1287ec[_0x284ec1(0x1c4)][_0x284ec1(0x165)](_0x561fda));let _0x4fc58b=await xe(_0x14b129,_0x103616,_0x507bd2);Se(_0x4fc58b,_0x3afd41),Ce(_0x1d66f2,_0x4fc58b);let _0x277bd0=B(_0x1287ec,_0x103616,_0x507bd2,J(_0x4fc58b[_0x284ec1(0x1a4)]),_0x4fc58b[_0x284ec1(0x157)]),_0xb17aa9=await _0x14b129['fetchChangesets'](_0x277bd0,void 0x0);if(_0x400ff3(_0xb17aa9[_0x284ec1(0x218)])){let _0x3e77b2=_0xb17aa9[_0x284ec1(0x218)];throw new j('COLLABORATION_UNAVAILABLE',_0x3e77b2?.[_0x284ec1(0x1c5)]||_0x284ec1(0x299),{'retryable':!0x0});}let _0x407e34=R(_0xb17aa9[_0x284ec1(0x157)],_0x103616,_0x507bd2,_0x277bd0),_0x288a09=_0x407e34['at'](-0x1)?.[_0x284ec1(0x1b6)]??_0x277bd0;if(_0xb17aa9['latestRevision']!==void 0x0&&_0xb17aa9[_0x284ec1(0x21f)]!==_0x288a09)throw new j(_0x284ec1(0x20c),_0x284ec1(0x163));return _0x277bd0=B(_0x1287ec,_0x103616,_0x507bd2,_0x277bd0,_0x407e34),await ye(_0x1287ec),new fe(_0x103616,_0x507bd2,_0x277bd0,_0x14b129,_0x1d66f2,_0x1287ec,_0x33902b);}catch(_0x5e328f){try{await _0x14b129[_0x284ec1(0x192)]();}catch{}try{_0x1d66f2?.['dispose']();}catch{}throw _0x5e328f instanceof j?_0x5e328f:new j(_0x284ec1(0x168),_0x284ec1(0x289),{'cause':_0x5e328f});}}};}async function ye(_0x5c0c06){const _0x514eea=_0x11d030;_0x5c0c06['injector'][_0x514eea(0x257)](_0x25ed85)&&await _0x5c0c06['injector'][_0x514eea(0x165)](_0x25ed85)[_0x514eea(0x177)]();}function be(_0x24da45,_0x1e4ddf){const _0x409a34=_0x11d030;if(_0x24da45['trim']()['length']===0x0)throw new j(_0x409a34(0x216),_0x409a34(0x266));if(_0x1e4ddf!==_0x20b30d[_0x409a34(0x272)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x2b2)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x1dc)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x15e)]&&_0x1e4ddf!==_0x20b30d['UNIVER_BOARD'])throw new j('COLLABORATION_INVALID_INPUT',_0x409a34(0x195)+_0x1e4ddf);}async function xe(_0x4ac2a7,_0x478084,_0x8537f6){const _0x126216=_0x11d030;return _0x4ac2a7[_0x126216(0x1fb)]==='unit-data'?await _0x4ac2a7[_0x126216(0x1f4)]():await ge(_0x4ac2a7,_0x478084,_0x8537f6);}function Se(_0x24478a,_0x55bfef){const _0x385c71=_0x11d030;if(_0x24478a[_0x385c71(0x296)]!==_0x55bfef[_0x385c71(0x296)])throw new j(_0x385c71(0x168),'Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type');if(_0x24478a[_0x385c71(0x1a4)]['id']!==_0x55bfef[_0x385c71(0x227)])throw new j(_0x385c71(0x168),_0x385c71(0x19c));J(_0x24478a[_0x385c71(0x1a4)]);}function J(_0x3ec188){const _0x96c00e=_0x11d030;let _0x8c12e3=_0x3ec188[_0x96c00e(0x1af)];if(!Number[_0x96c00e(0x140)](_0x8c12e3)||_0x8c12e3===void 0x0||_0x8c12e3<0x1)throw new j(_0x96c00e(0x168),_0x96c00e(0x20a));return _0x8c12e3;}function _0x583c(_0x4f5cbe,_0x379694){_0x4f5cbe=_0x4f5cbe-0x135;const _0x5cc0ec=_0x5cc0();let _0x583c90=_0x5cc0ec[_0x4f5cbe];return _0x583c90;}function Ce(_0x2cb80e,_0x2f8e14){const _0xd992b5=_0x11d030;switch(_0x2f8e14['unitType']){case _0x20b30d[_0xd992b5(0x272)]:_0x2cb80e['createUnit'](_0x2f8e14[_0xd992b5(0x296)],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d[_0xd992b5(0x2b2)]:_0x2cb80e['createUnit'](_0x2f8e14['unitType'],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d['UNIVER_SLIDE']:_0x2cb80e[_0xd992b5(0x18e)](_0x2f8e14[_0xd992b5(0x296)],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d[_0xd992b5(0x15e)]:_0x2cb80e[_0xd992b5(0x18e)](_0x2f8e14['unitType'],structuredClone(_0x2f8e14['unitData']));return;case _0x20b30d[_0xd992b5(0x29a)]:_0x2cb80e['createUnit'](_0x2f8e14['unitType'],structuredClone(_0x2f8e14['unitData']));return;}}var we=class{[_0x11d030(0x15d)];[_0x11d030(0x1e7)];[_0x11d030(0x1b4)];['format']='snapshot';constructor(_0x522324,_0x11d144,_0x45f4c4){const _0x1faccf=_0x11d030;this[_0x1faccf(0x15d)]=_0x522324,this['_target']=_0x11d144,this[_0x1faccf(0x1b4)]=_0x45f4c4;}[_0x11d030(0x17e)](){const _0xb29223=_0x11d030;return this[_0xb29223(0x1b4)]['getConnectionState']();}async[_0x11d030(0x298)](_0x119973=0x0){const _0x1112f8=_0x11d030;let _0x8b392e=X(this['_config'][_0x1112f8(0x24d)],this[_0x1112f8(0x1e7)][_0x1112f8(0x296)],_0x1112f8(0x204),this[_0x1112f8(0x1e7)][_0x1112f8(0x227)],_0x1112f8(0x1af),_0x119973),_0x38df78=await Y(this['_config'],_0x8b392e);return Te(_0x38df78[_0x1112f8(0x225)]),_0x38df78;}async[_0x11d030(0x1b2)](_0x121ac6){const _0x40ec63=_0x11d030;let _0x3b08e6=X(this[_0x40ec63(0x15d)][_0x40ec63(0x24d)],this[_0x40ec63(0x1e7)][_0x40ec63(0x296)],_0x40ec63(0x204),this[_0x40ec63(0x1e7)]['unitId'],'block',_0x121ac6),_0x16b4c4=await Y(this[_0x40ec63(0x15d)],_0x3b08e6);return _0x16b4c4[_0x40ec63(0x217)]&&typeof _0x16b4c4[_0x40ec63(0x217)][_0x40ec63(0x1a2)]==_0x40ec63(0x27f)&&(_0x16b4c4['block'][_0x40ec63(0x1a2)]=Z(_0x16b4c4[_0x40ec63(0x217)][_0x40ec63(0x1a2)])),_0x16b4c4;}async[_0x11d030(0x1e9)](_0x1d5f2e,_0x56e463=0x0){const _0x59a1a7=_0x11d030;let _0x58eb4d=X(this[_0x59a1a7(0x15d)]['snapshotServerUrl'],this['_target'][_0x59a1a7(0x296)],_0x59a1a7(0x204),this[_0x59a1a7(0x1e7)]['unitId'],_0x59a1a7(0x24f));_0x58eb4d['searchParams'][_0x59a1a7(0x1c2)](_0x59a1a7(0x1a1),String(_0x1d5f2e)),_0x58eb4d[_0x59a1a7(0x267)][_0x59a1a7(0x1c2)]('to',String(_0x56e463));let _0x4aa514=await Y(this[_0x59a1a7(0x15d)],_0x58eb4d);return this[_0x59a1a7(0x1b4)][_0x59a1a7(0x26d)](),_0x4aa514;}async['submitChangeset'](_0x30f8dd){const _0x2ebace=_0x11d030;await this[_0x2ebace(0x1b4)][_0x2ebace(0x1ab)]();let _0x31611a=this[_0x2ebace(0x1b4)][_0x2ebace(0x14a)](_0x30f8dd[_0x2ebace(0x1fd)],_0x30f8dd['reqId']),_0x237262={..._0x30f8dd,'memberID':this[_0x2ebace(0x1b4)]['memberId'],'revision':0x0,'type':this[_0x2ebace(0x1e7)][_0x2ebace(0x296)],'unitID':this[_0x2ebace(0x1e7)][_0x2ebace(0x227)],'userID':''},_0x1350c6=X(this[_0x2ebace(0x15d)][_0x2ebace(0x25a)],this['_target'][_0x2ebace(0x296)],_0x2ebace(0x204),this[_0x2ebace(0x1e7)][_0x2ebace(0x227)],_0x2ebace(0x229)),_0x8c6176=this[_0x2ebace(0x15d)][_0x2ebace(0x230)](_0x1350c6,{'body':JSON[_0x2ebace(0x1be)]({'changeset':_0x237262,'memberID':this[_0x2ebace(0x1b4)][_0x2ebace(0x291)],'type':this[_0x2ebace(0x1e7)][_0x2ebace(0x296)],'unitID':this[_0x2ebace(0x1e7)]['unitId']}),'headers':{'content-type':'application/json'},'method':'POST'})[_0x2ebace(0x198)](async _0xd02093=>_0xd02093['status']===0x191||_0xd02093['status']===0x193?_0x2ebace(0x20d):_0xd02093[_0x2ebace(0x13a)]===0x190||_0xd02093[_0x2ebace(0x13a)]===0x199?'invalid':_0xd02093['ok']?_0x2ebace(0x1e6):_0x2ebace(0x1a6))[_0x2ebace(0x16c)](()=>_0x2ebace(0x1a6)),_0x2ea119=Ee(this[_0x2ebace(0x15d)]['commitTimeoutMs']),_0x35fc03=_0x8c6176['then'](_0x318777=>_0x318777===_0x2ebace(0x20d)?{'status':_0x2ebace(0x18a)}:_0x318777===_0x2ebace(0x27e)?{'status':_0x2ebace(0x142)}:new Promise(()=>void 0x0)),_0x3bce5c=await Promise['race']([_0x31611a[_0x2ebace(0x1dd)],_0x35fc03,_0x2ea119[_0x2ebace(0x1dd)][_0x2ebace(0x198)](()=>({'status':_0x2ebace(0x243)}))])[_0x2ebace(0x1ad)](()=>{const _0x55b0c9=_0x2ebace;_0x31611a[_0x55b0c9(0x292)](),_0x2ea119[_0x55b0c9(0x292)]();});if(_0x3bce5c['status']===_0x2ebace(0x243)){let _0x5bc4a0=await _0x8c6176;return _0x5bc4a0===_0x2ebace(0x20d)?{'message':'Changeset\x20submission\x20was\x20denied','reason':'permission-denied','status':_0x2ebace(0x2a1)}:_0x5bc4a0===_0x2ebace(0x27e)?{'message':'Changeset\x20submission\x20was\x20rejected','reason':'invalid-changeset','status':'rejected'}:{'status':'unknown'};}if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x21d))return{'status':_0x2ebace(0x1a6)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x276))return{'status':_0x2ebace(0x276)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x18a))return{'message':'Changeset\x20submission\x20was\x20denied','reason':_0x2ebace(0x23f),'status':_0x2ebace(0x2a1)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x142)){let _0x1f6f23=await this[_0x2ebace(0x1e9)](_0x30f8dd[_0x2ebace(0x22d)],_0x30f8dd[_0x2ebace(0x22d)]);return{'message':_0x2ebace(0x160),'reason':_0x1f6f23['latestRevision']!==void 0x0&&_0x1f6f23['latestRevision']<_0x30f8dd[_0x2ebace(0x22d)]?_0x2ebace(0x154):_0x2ebace(0x146),'status':_0x2ebace(0x2a1)};}let _0x193712=_0x3bce5c[_0x2ebace(0x219)],_0x48705b=await this[_0x2ebace(0x1e9)](_0x30f8dd['baseRev'],_0x193712[_0x2ebace(0x1b6)]-0x1);if(_0x400ff3(_0x48705b['error'])){let _0x2ac8e2=_0x48705b['error'];throw new j(_0x2ebace(0x2b1),_0x2ac8e2?.[_0x2ebace(0x1c5)]||_0x2ebace(0x271),{'retryable':!0x0});}return{'acceptedChangeset':_0x193712,'precedingChangesets':_0x48705b['changesets'],'status':_0x2ebace(0x1ff)};}async[_0x11d030(0x192)](){const _0x4075ae=_0x11d030;await this[_0x4075ae(0x1b4)]['close']();}};async function Y(_0x4d22e4,_0x4eeaf9){const _0x11a685=_0x11d030;let _0x2dcdf4;try{_0x2dcdf4=await _0x4d22e4[_0x11a685(0x230)](_0x4eeaf9,{'method':_0x11a685(0x2a7)});}catch(_0x93ba4){throw new j(_0x11a685(0x2b1),'Collaboration\x20HTTP\x20request\x20failed',{'cause':_0x93ba4,'retryable':!0x0});}if(!_0x2dcdf4['ok'])throw new j(_0x11a685(0x2b1),'Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20'+_0x2dcdf4[_0x11a685(0x13a)],{'retryable':_0x2dcdf4[_0x11a685(0x13a)]>=0x1f4});try{return await _0x2dcdf4[_0x11a685(0x279)]();}catch(_0x5032df){throw new j(_0x11a685(0x20c),_0x11a685(0x214),{'cause':_0x5032df});}}function X(_0x3a9947,..._0x2712f8){const _0x4fe6d9=_0x11d030;let _0x331855=new URL(_0x3a9947);return _0x331855[_0x4fe6d9(0x25f)]=_0x331855[_0x4fe6d9(0x25f)][_0x4fe6d9(0x268)](/\/$/,'')+'/'+_0x2712f8['map'](_0x4ebbc4=>encodeURIComponent(String(_0x4ebbc4)))['join']('/'),_0x331855;}function Te(_0x441305){const _0x4a4854=_0x11d030;if(!_0x441305)return;let _0x38cc29=[_0x441305['workbook'],_0x441305['doc'],_0x441305['slide'],_0x441305[_0x4a4854(0x1c0)]];for(let _0xf753d9 of _0x38cc29)_0xf753d9&&typeof _0xf753d9[_0x4a4854(0x1fa)]==_0x4a4854(0x27f)&&(_0xf753d9[_0x4a4854(0x1fa)]=Z(_0xf753d9[_0x4a4854(0x1fa)]));if(_0x441305[_0x4a4854(0x2b3)]){for(let _0x30044d of Object[_0x4a4854(0x16b)](_0x441305['workbook'][_0x4a4854(0x2a5)]))typeof _0x30044d[_0x4a4854(0x1fa)]=='string'&&(_0x30044d['originalMeta']=Z(_0x30044d['originalMeta']));}}function Z(_0x4728f2){const _0x3ac138=_0x11d030;return Uint8Array[_0x3ac138(0x1a1)](Buffer[_0x3ac138(0x1a1)](_0x4728f2,_0x3ac138(0x203)));}function Ee(_0x5b7057){let _0xa284ad;return{'cancel':()=>{_0xa284ad!==void 0x0&&clearTimeout(_0xa284ad);},'promise':new Promise(_0x23db81=>{_0xa284ad=setTimeout(_0x23db81,_0x5b7057);})};}var De=class{[_0x11d030(0x15d)];[_0x11d030(0x18b)]=_0x11d030(0x1ac);[_0x11d030(0x211)];['_connectPromise'];['_memberId']='';[_0x11d030(0x28a)]=new Map();[_0x11d030(0x2b9)]=new Map();[_0x11d030(0x28b)]=new Map();['_inbound']=new Map();[_0x11d030(0x2ad)];[_0x11d030(0x188)];[_0x11d030(0x228)]=0x0;constructor(_0x1b2e7c){const _0x16a525=_0x11d030;this[_0x16a525(0x15d)]=_0x1b2e7c;}async[_0x11d030(0x2bd)](_0xbe5ed9){const _0x4d05c7=_0x11d030;let _0x3e79ed=this['_joined'][_0x4d05c7(0x165)](_0xbe5ed9[_0x4d05c7(0x227)]);if(_0x3e79ed&&_0x3e79ed[_0x4d05c7(0x191)]['unitType']!==_0xbe5ed9[_0x4d05c7(0x296)])throw new j(_0x4d05c7(0x216),_0x4d05c7(0x29e));if(await this[_0x4d05c7(0x16a)](),_0x3e79ed)_0x3e79ed['leases']+=0x1;else{try{await this[_0x4d05c7(0x1c9)](_0xbe5ed9);}catch(_0x39b506){throw this[_0x4d05c7(0x28a)]['size']===0x0&&(this[_0x4d05c7(0x18b)]=_0x4d05c7(0x21d),this[_0x4d05c7(0x197)](),this['_socket']?.[_0x4d05c7(0x192)](0x3e8,_0x4d05c7(0x255)),this[_0x4d05c7(0x211)]=void 0x0,this['_memberId']=''),_0x39b506;}this[_0x4d05c7(0x28a)][_0x4d05c7(0x1c2)](_0xbe5ed9['unitId'],{'leases':0x1,'target':_0xbe5ed9});}let _0x43a189=!0x1,_0x2e0dfd=()=>this[_0x4d05c7(0x1b3)],_0x4f2d14=new Set();return{'close':async()=>{const _0x5a0c06=_0x4d05c7;if(!_0x43a189){_0x43a189=!0x0;for(let _0x4cfba1 of _0x4f2d14)_0x4cfba1[_0x5a0c06(0x292)]();_0x4f2d14[_0x5a0c06(0x28e)](),await this[_0x5a0c06(0x20b)](_0xbe5ed9['unitId']);}},'ensureOnline':async()=>await this[_0x4d05c7(0x16a)](),'getConnectionState':()=>_0x43a189?'closed':this[_0x4d05c7(0x18b)],get 'memberId'(){return _0x2e0dfd();},'takeInboundChangesets':()=>{const _0x156972=_0x4d05c7;let _0x64696c=this['_inbound']['get'](_0xbe5ed9['unitId'])??[];return this[_0x156972(0x14c)][_0x156972(0x25d)](_0xbe5ed9[_0x156972(0x227)]),_0x64696c;},'waitForSubmission':(_0x3367b2,_0x4c1073)=>{const _0x4dabfe=_0x4d05c7;let _0x2e6349=this[_0x4dabfe(0x148)](_0x3367b2,_0x4c1073);return _0x4f2d14[_0x4dabfe(0x24e)](_0x2e6349),_0x2e6349['promise']['then'](()=>_0x4f2d14[_0x4dabfe(0x25d)](_0x2e6349),()=>_0x4f2d14[_0x4dabfe(0x25d)](_0x2e6349)),{'cancel':()=>{const _0x4b1ba0=_0x4dabfe;_0x4f2d14[_0x4b1ba0(0x25d)](_0x2e6349),_0x2e6349[_0x4b1ba0(0x292)]();},'promise':_0x2e6349[_0x4dabfe(0x1dd)]};}};}async[_0x11d030(0x16a)](){const _0x5aa5a1=_0x11d030;if(this[_0x5aa5a1(0x18b)]!==_0x5aa5a1(0x1ca)||this['_socket']?.['readyState']!==WebSocket[_0x5aa5a1(0x2bc)]){this[_0x5aa5a1(0x188)]!==void 0x0&&clearTimeout(this[_0x5aa5a1(0x188)]),this[_0x5aa5a1(0x188)]=void 0x0,this[_0x5aa5a1(0x1f2)]??=this[_0x5aa5a1(0x1a5)]();try{await this[_0x5aa5a1(0x1f2)];}finally{this['_connectPromise']=void 0x0;}}}async[_0x11d030(0x1a5)](){const _0x1f4baf=_0x11d030;this[_0x1f4baf(0x18b)]=_0x1f4baf(0x215);let _0x2e062a=await this[_0x1f4baf(0x15d)][_0x1f4baf(0x230)](this[_0x1f4baf(0x15d)][_0x1f4baf(0x151)],{'headers':{'content-type':_0x1f4baf(0x179)},'method':_0x1f4baf(0x2a7)});if(!_0x2e062a['ok'])throw this[_0x1f4baf(0x18b)]=_0x1f4baf(0x1ac),new j('COLLABORATION_UNAVAILABLE',_0x1f4baf(0x175)+_0x2e062a[_0x1f4baf(0x13a)],{'retryable':_0x2e062a[_0x1f4baf(0x13a)]>=0x1f4});let _0x2d54b0=await _0x2e062a['json']();if(typeof _0x2d54b0[_0x1f4baf(0x178)]!=_0x1f4baf(0x27f)||_0x2d54b0[_0x1f4baf(0x178)][_0x1f4baf(0x27b)]===0x0)throw this[_0x1f4baf(0x18b)]=_0x1f4baf(0x1ac),new j(_0x1f4baf(0x20c),_0x1f4baf(0x1f0));let _0x44df67=new URL(this['_config'][_0x1f4baf(0x1d7)]);_0x44df67[_0x1f4baf(0x267)][_0x1f4baf(0x1c2)](_0x1f4baf(0x17b),_0x2d54b0[_0x1f4baf(0x178)]);let _0xaf5166=new WebSocket(_0x44df67);this['_socket']=_0xaf5166,_0xaf5166[_0x1f4baf(0x180)](_0x1f4baf(0x1c5),_0x4c0a06=>this[_0x1f4baf(0x1f5)](_0x4c0a06)),_0xaf5166['addEventListener']('close',()=>{const _0x16d60e=_0x1f4baf;this['_socket']===_0xaf5166&&(this[_0x16d60e(0x197)](),this[_0x16d60e(0x189)](new j(_0x16d60e(0x2b1),'Collaboration\x20WebSocket\x20closed',{'retryable':!0x0})),this[_0x16d60e(0x18b)]=this[_0x16d60e(0x28a)][_0x16d60e(0x26f)]===0x0?'closed':_0x16d60e(0x215),this[_0x16d60e(0x28a)]['size']>0x0&&this[_0x16d60e(0x1a0)]());}),await Oe(_0xaf5166);let _0x55ec43=await this[_0x1f4baf(0x169)](_0x3042f5['HELLO'],'',{'cmd':_0x3042f5['HELLO'],'routeKey':''});if(_0x55ec43[_0x1f4baf(0x1e2)]!==_0xe6f23a['OK']||typeof _0x55ec43[_0x1f4baf(0x260)]?.[_0x1f4baf(0x222)]!=_0x1f4baf(0x27f))throw _0xaf5166[_0x1f4baf(0x192)](),new j('COLLABORATION_PROTOCOL_ERROR',_0x1f4baf(0x29f));this[_0x1f4baf(0x1b3)]=_0x55ec43[_0x1f4baf(0x260)][_0x1f4baf(0x222)],this[_0x1f4baf(0x18b)]='online';for(let {target:_0x193dd0}of this[_0x1f4baf(0x28a)][_0x1f4baf(0x16b)]())try{await this[_0x1f4baf(0x1c9)](_0x193dd0);}catch(_0x2c4bef){throw _0xaf5166['close'](0x3f3,_0x1f4baf(0x24c)),_0x2c4bef;}this[_0x1f4baf(0x228)]=0x0,this[_0x1f4baf(0x13d)]();}async['_join'](_0x422db7){const _0x24c9a8=_0x11d030;let _0x4d587c=await this[_0x24c9a8(0x169)](_0x3042f5[_0x24c9a8(0x17a)],_0x422db7[_0x24c9a8(0x227)],{'cmd':_0x3042f5[_0x24c9a8(0x17a)],'joinReq':{'rooms':[{'args':'','roomID':_0x422db7[_0x24c9a8(0x227)]}]},'routeKey':_0x422db7[_0x24c9a8(0x227)]});if(_0x4d587c[_0x24c9a8(0x1e2)]!==_0xe6f23a['OK'])throw new j(_0x24c9a8(0x2b1),typeof _0x4d587c[_0x24c9a8(0x265)]==_0x24c9a8(0x27f)?_0x4d587c[_0x24c9a8(0x265)]:'Failed\x20to\x20join\x20Unit\x20room');}[_0x11d030(0x169)](_0xd366,_0x31818a,_0x2ad56c){const _0x14affa=_0x11d030;let _0x37c455=this['_socket'];if(!_0x37c455||_0x37c455[_0x14affa(0x1ba)]!==WebSocket['OPEN'])return Promise[_0x14affa(0x18c)](new j(_0x14affa(0x2b1),_0x14affa(0x283),{'retryable':!0x0}));let _0x5f5c4f=_0xd366+':'+_0x31818a;return new Promise((_0x48fc4d,_0x3a5688)=>{const _0x4c87e6=_0x14affa;if(this[_0x4c87e6(0x2b9)][_0x4c87e6(0x257)](_0x5f5c4f)){_0x3a5688(new j('COLLABORATION_PROTOCOL_ERROR','A\x20'+_0xd366+'\x20request\x20is\x20already\x20active\x20for\x20'+_0x31818a));return;}let _0x476ebe=setTimeout(()=>{const _0x333b86=_0x4c87e6;this[_0x333b86(0x2b9)][_0x333b86(0x25d)](_0x5f5c4f),_0x3a5688(new j(_0x333b86(0x2b1),_0x333b86(0x213)+_0xd366,{'retryable':!0x0}));},0x7530);this['_commandWaiters'][_0x4c87e6(0x1c2)](_0x5f5c4f,{'reject':_0x3a5688,'resolve':_0x48fc4d,'timer':_0x476ebe});try{_0x37c455[_0x4c87e6(0x1cc)](JSON['stringify'](_0x2ad56c));}catch(_0x386718){this[_0x4c87e6(0x2b9)][_0x4c87e6(0x25d)](_0x5f5c4f),clearTimeout(_0x476ebe),_0x3a5688(new j(_0x4c87e6(0x2b1),_0x4c87e6(0x25c),{'cause':_0x386718,'retryable':!0x0}));}});}[_0x11d030(0x1f5)](_0xb4dc8b){const _0x15a8d9=_0x11d030;if(typeof _0xb4dc8b[_0x15a8d9(0x1a2)]!=_0x15a8d9(0x27f))return;let _0x197488;try{_0x197488=JSON[_0x15a8d9(0x194)](_0xb4dc8b[_0x15a8d9(0x1a2)]);}catch{this[_0x15a8d9(0x211)]?.[_0x15a8d9(0x192)](0x3eb,_0x15a8d9(0x1e0));return;}let _0x281c6f=typeof _0x197488['routeKey']==_0x15a8d9(0x27f)?_0x197488[_0x15a8d9(0x15b)]:'';if(_0x197488['cmd']===_0x3042f5['HELLO']||_0x197488[_0x15a8d9(0x1ee)]===_0x3042f5[_0x15a8d9(0x17a)]||_0x197488['cmd']===_0x3042f5[_0x15a8d9(0x234)]){let _0x5cbf74=_0x197488[_0x15a8d9(0x1ee)]+':'+_0x281c6f,_0xe1b74c=this['_commandWaiters'][_0x15a8d9(0x165)](_0x5cbf74);_0xe1b74c&&(this[_0x15a8d9(0x2b9)][_0x15a8d9(0x25d)](_0x5cbf74),clearTimeout(_0xe1b74c[_0x15a8d9(0x250)]),_0xe1b74c['resolve'](_0x197488));return;}_0x197488[_0x15a8d9(0x1ee)]!==_0x3042f5[_0x15a8d9(0x17d)]||!_0x197488[_0x15a8d9(0x29d)]||this[_0x15a8d9(0x269)](_0x281c6f,_0x197488['collaMsg']);}[_0x11d030(0x269)](_0x4d8f7d,_0x4e3ab2){const _0x1e73a6=_0x11d030;let _0x514a62=_0x4e3ab2[_0x1e73a6(0x16e)],_0x5f341f=_0x514a62===_0x1e73a6(0x1bf)?_0x1e73a6(0x252):_0x514a62===_0x1e73a6(0x2b5)?'csRejEvent':_0x514a62===_0x1e73a6(0x19f)?_0x1e73a6(0x235):_0x514a62===_0x1e73a6(0x294)?_0x1e73a6(0x274):_0x514a62===_0x1e73a6(0x281)?'newCsEvent':void 0x0;if(!_0x5f341f)return;let _0x4f7c97=ke(_0x4e3ab2[_0x5f341f]);if(!_0x4f7c97||_0x4f7c97[_0x1e73a6(0x231)]!==_0x4d8f7d)return;if(_0x514a62==='new_changesets'){let _0x1f47f3=this[_0x1e73a6(0x14c)][_0x1e73a6(0x165)](_0x4d8f7d)??[];_0x1f47f3[_0x1e73a6(0x209)](_0x4f7c97),this['_inbound'][_0x1e73a6(0x1c2)](_0x4d8f7d,_0x1f47f3);return;}let _0x444c1d=Q(_0x4f7c97['sid'],_0x4f7c97['reqId']),_0x36d3c3=this['_submissionWaiters'][_0x1e73a6(0x165)](_0x444c1d);_0x36d3c3&&_0x36d3c3(_0x514a62==='changeset_ack'?{'changeset':_0x4f7c97,'status':_0x1e73a6(0x1cd)}:_0x514a62===_0x1e73a6(0x19f)?{'status':_0x1e73a6(0x276)}:_0x514a62===_0x1e73a6(0x294)?{'status':_0x1e73a6(0x18a)}:{'status':_0x1e73a6(0x142)});}[_0x11d030(0x148)](_0x3e12af,_0x1a7910){const _0xa1172b=_0x11d030;let _0xb27b13=Q(_0x3e12af,_0x1a7910);if(this[_0xa1172b(0x28b)]['has'](_0xb27b13))return{'cancel':()=>void 0x0,'promise':Promise['reject'](new j(_0xa1172b(0x216),_0xa1172b(0x172)))};let _0x3ca474=()=>void 0x0;return{'cancel':()=>_0x3ca474({'status':_0xa1172b(0x21d)}),'promise':new Promise(_0x4560ce=>{const _0x217aa3=_0xa1172b;_0x3ca474=_0x56699f=>{const _0x3a58d6=_0x583c;this['_submissionWaiters'][_0x3a58d6(0x25d)](_0xb27b13)&&_0x4560ce(_0x56699f);},this['_submissionWaiters'][_0x217aa3(0x1c2)](_0xb27b13,_0x3ca474);})};}async[_0x11d030(0x20b)](_0x442d43){const _0x5827ff=_0x11d030;let _0x1485b2=this['_joined'][_0x5827ff(0x165)](_0x442d43);_0x1485b2&&(--_0x1485b2['leases'],!(_0x1485b2[_0x5827ff(0x1c7)]>0x0)&&(this[_0x5827ff(0x28a)][_0x5827ff(0x25d)](_0x442d43),this[_0x5827ff(0x14c)][_0x5827ff(0x25d)](_0x442d43),this[_0x5827ff(0x211)]?.[_0x5827ff(0x1ba)]===WebSocket[_0x5827ff(0x2bc)]&&this[_0x5827ff(0x211)][_0x5827ff(0x1cc)](JSON[_0x5827ff(0x1be)]({'cmd':_0x3042f5[_0x5827ff(0x13c)],'leaveReq':{'args':'','roomID':_0x442d43},'routeKey':_0x442d43})),this[_0x5827ff(0x28a)][_0x5827ff(0x26f)]===0x0&&(this[_0x5827ff(0x18b)]=_0x5827ff(0x21d),this[_0x5827ff(0x188)]!==void 0x0&&clearTimeout(this['_reconnectTimer']),this[_0x5827ff(0x188)]=void 0x0,this[_0x5827ff(0x197)](),this[_0x5827ff(0x211)]?.[_0x5827ff(0x192)](0x3e8,_0x5827ff(0x2ba)),this['_socket']=void 0x0,this[_0x5827ff(0x1b3)]='')));}[_0x11d030(0x1a0)](){const _0x444be0=_0x11d030;if(this[_0x444be0(0x188)]!==void 0x0||this['_reconnectAttempts']>=0x3){this['_reconnectAttempts']>=0x3&&(this[_0x444be0(0x18b)]=_0x444be0(0x1ac));return;}let _0x4d5fa6=Math[_0x444be0(0x166)](0x3e8*0x2**this['_reconnectAttempts'],0x4e20);this[_0x444be0(0x228)]+=0x1,this[_0x444be0(0x188)]=setTimeout(()=>{const _0xe80de2=_0x444be0;this[_0xe80de2(0x188)]=void 0x0,this['_connectPromise']??=this[_0xe80de2(0x1a5)](),this['_connectPromise']['catch'](()=>this[_0xe80de2(0x1a0)]())['finally'](()=>{const _0x46b9ac=_0xe80de2;this[_0x46b9ac(0x1f2)]=void 0x0;});},_0x4d5fa6);}[_0x11d030(0x13d)](){const _0x3dd817=_0x11d030;this['_stopHeartbeat'](),this[_0x3dd817(0x2ad)]=setInterval(()=>{const _0xdccdcd=_0x3dd817;this[_0xdccdcd(0x18b)]===_0xdccdcd(0x1ca)&&this[_0xdccdcd(0x169)](_0x3042f5[_0xdccdcd(0x234)],'',{'cmd':_0x3042f5[_0xdccdcd(0x234)],'routeKey':''})[_0xdccdcd(0x16c)](()=>this['_socket']?.[_0xdccdcd(0x192)](0x3f3,'Heartbeat\x20failed'));},0x7530);}[_0x11d030(0x197)](){const _0x51bda3=_0x11d030;this['_heartbeat']!==void 0x0&&clearInterval(this[_0x51bda3(0x2ad)]),this[_0x51bda3(0x2ad)]=void 0x0;}[_0x11d030(0x189)](_0x2a1297){const _0x5206f9=_0x11d030;for(let _0x3ce18c of this[_0x5206f9(0x2b9)][_0x5206f9(0x16b)]())clearTimeout(_0x3ce18c['timer']),_0x3ce18c[_0x5206f9(0x18c)](_0x2a1297);this[_0x5206f9(0x2b9)][_0x5206f9(0x28e)]();}};function Oe(_0x3ed9f1){return new Promise((_0x33c73e,_0x215ed2)=>{const _0x43430e=_0x583c;let _0x5c5fb0=()=>{const _0x2111d0=_0x583c;clearTimeout(_0x33ce30),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x192),_0x546e8e),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x218),_0x4f8edc),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x1ed),_0x4b8958);},_0x49dc6b=_0xf6b19f=>{const _0x2d67ed=_0x583c;_0x5c5fb0(),_0x215ed2(new j(_0x2d67ed(0x2b1),_0xf6b19f,{'retryable':!0x0}));},_0x546e8e=()=>_0x49dc6b(_0x43430e(0x1c1)),_0x4f8edc=()=>_0x49dc6b(_0x43430e(0x16f)),_0x4b8958=()=>{_0x5c5fb0(),_0x33c73e();},_0x33ce30=setTimeout(()=>{const _0x36402c=_0x43430e;_0x49dc6b(_0x36402c(0x239)),_0x3ed9f1[_0x36402c(0x192)](0x3e8,_0x36402c(0x288));},0x7530);_0x3ed9f1['addEventListener'](_0x43430e(0x192),_0x546e8e,{'once':!0x0}),_0x3ed9f1['addEventListener']('error',_0x4f8edc,{'once':!0x0}),_0x3ed9f1[_0x43430e(0x180)](_0x43430e(0x1ed),_0x4b8958,{'once':!0x0});});}function ke(_0x4def3f){const _0x84ce44=_0x11d030;if(!_0x4def3f||typeof _0x4def3f!='object')return null;let _0x7b6eda=_0x4def3f['cs'];return _0x7b6eda&&typeof _0x7b6eda==_0x84ce44(0x224)?_0x7b6eda:null;}function Q(_0x2a3dfb,_0x1e68d7){return(_0x2a3dfb??'')+':'+(_0x1e68d7??0x0);}var Ae=class{[_0x11d030(0x15d)];[_0x11d030(0x223)];constructor(_0x5cad60){const _0x9815af=_0x11d030;this['_config']=je(_0x5cad60),this['_connection']=new De(this[_0x9815af(0x15d)]);}async[_0x11d030(0x1ed)](_0x467fca){const _0x3cfb65=_0x11d030;let _0x4f23a3=await this[_0x3cfb65(0x223)]['acquire'](_0x467fca);return new we(this[_0x3cfb65(0x15d)],_0x467fca,_0x4f23a3);}};function je(_0x320394){const _0x49609e=_0x11d030;let _0xa8c545=$(_0x320394[_0x49609e(0x24d)],_0x49609e(0x24d),[_0x49609e(0x149),_0x49609e(0x15c)]),_0x185264=$(_0x320394[_0x49609e(0x25a)],_0x49609e(0x25a),[_0x49609e(0x149),_0x49609e(0x15c)]),_0x3411f1=$(_0x320394['collabWebSocketUrl'],_0x49609e(0x1d7),[_0x49609e(0x138),_0x49609e(0x176),_0x49609e(0x149),_0x49609e(0x15c)]);_0x3411f1[_0x49609e(0x14e)]===_0x49609e(0x149)&&(_0x3411f1[_0x49609e(0x14e)]=_0x49609e(0x138)),_0x3411f1[_0x49609e(0x14e)]===_0x49609e(0x15c)&&(_0x3411f1[_0x49609e(0x14e)]='wss:');let _0x4638d7=$(_0x320394[_0x49609e(0x151)],'wsSessionTicketUrl',['http:',_0x49609e(0x15c)]),_0x5ad7c3=_0x320394[_0x49609e(0x141)]??0x7530;if(!Number[_0x49609e(0x140)](_0x5ad7c3)||_0x5ad7c3<=0x0)throw new j(_0x49609e(0x216),_0x49609e(0x1c6));return{'collabSubmitChangesetUrl':_0x185264,'collabWebSocketUrl':_0x3411f1,'commitTimeoutMs':_0x5ad7c3,'httpRequest':_0x320394[_0x49609e(0x230)]??globalThis[_0x49609e(0x247)]['bind'](globalThis),'snapshotServerUrl':_0xa8c545,'wsSessionTicketUrl':_0x4638d7};}function $(_0x223151,_0x4984f4,_0x4bc192){const _0x2ebbaf=_0x11d030;let _0x29d9e1;try{_0x29d9e1=new URL(_0x223151);}catch{throw new j(_0x2ebbaf(0x216),_0x4984f4+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0x4bc192[_0x2ebbaf(0x1b7)](_0x29d9e1[_0x2ebbaf(0x14e)]))throw new j(_0x2ebbaf(0x216),_0x4984f4+'\x20uses\x20an\x20unsupported\x20protocol');return _0x29d9e1;}function Me(_0x304827){return new Ae(_0x304827);}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.
|
|
4
|
+
"version": "1.0.1",
|
|
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.
|
|
23
|
-
"@univerjs-pro/boards": "1.0.
|
|
24
|
-
"@univerjs-pro/collaboration": "1.0.
|
|
25
|
-
"@univerjs-pro/engine-formula": "1.0.
|
|
26
|
-
"@univerjs-pro/slides": "1.0.
|
|
27
|
-
"@univerjs/core": "1.0.
|
|
28
|
-
"@univerjs/docs": "1.0.
|
|
29
|
-
"@univerjs/engine-formula": "1.0.
|
|
30
|
-
"@univerjs/engine-render": "1.0.
|
|
31
|
-
"@univerjs/protocol": "1.0.
|
|
32
|
-
"@univerjs/sheets": "1.0.
|
|
22
|
+
"@univerjs-pro/bases": "1.0.1",
|
|
23
|
+
"@univerjs-pro/boards": "1.0.1",
|
|
24
|
+
"@univerjs-pro/collaboration": "1.0.1",
|
|
25
|
+
"@univerjs-pro/engine-formula": "1.0.1",
|
|
26
|
+
"@univerjs-pro/slides": "1.0.1",
|
|
27
|
+
"@univerjs/core": "1.0.1",
|
|
28
|
+
"@univerjs/docs": "1.0.1",
|
|
29
|
+
"@univerjs/engine-formula": "1.0.1",
|
|
30
|
+
"@univerjs/engine-render": "1.0.1",
|
|
31
|
+
"@univerjs/protocol": "1.0.1",
|
|
32
|
+
"@univerjs/sheets": "1.0.1"
|
|
33
33
|
}
|
|
34
34
|
}
|