@univer-cli/univer-collaboration-runtime 1.0.1 → 1.0.3
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 _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};
|
|
1
|
+
const _0x1c125c=_0x205e;(function(_0xd0a31e,_0x385939){const _0x1af7aa=_0x205e,_0x432097=_0xd0a31e();while(!![]){try{const _0x44baf2=parseInt(_0x1af7aa(0x27d))/0x1*(-parseInt(_0x1af7aa(0x2d1))/0x2)+-parseInt(_0x1af7aa(0x307))/0x3+-parseInt(_0x1af7aa(0x206))/0x4+-parseInt(_0x1af7aa(0x359))/0x5*(-parseInt(_0x1af7aa(0x304))/0x6)+parseInt(_0x1af7aa(0x2be))/0x7*(-parseInt(_0x1af7aa(0x1f9))/0x8)+-parseInt(_0x1af7aa(0x23a))/0x9+parseInt(_0x1af7aa(0x285))/0xa*(parseInt(_0x1af7aa(0x312))/0xb);if(_0x44baf2===_0x385939)break;else _0x432097['push'](_0x432097['shift']());}catch(_0x321984){_0x432097['push'](_0x432097['shift']());}}}(_0x3bd6,0xeb682));import{CommandType as _0x29521d,DependentOn as _0x4fbdae,ICommandService as _0x1a2933,IUniverInstanceService as _0x5d7beb,Inject as _0x55309b,Injector as _0x2314e0,Plugin as _0xfcc3bd,UniverInstanceType as _0x13c60c,registerDependencies as _0x3f6423,sequenceExecute as _0x4123c5,toDisposable as _0xa88a70}from'@univerjs/core';import{CompressMutationService as _0x430ed9,ISnapshotServerService as _0x5264f8,ITransformService as _0xdf6557,RevertRevisionMutation as _0x38238c,RevisionService as _0x486697,SnapshotService as _0x3a88f9,UniverCollaborationPlugin as _0x55aba4,isTransformMutationsSuccess as _0x1409d9,parseChangesetToProtocol as _0xeaf139,parseMutationToProtocol as _0x5e4dde,parseProtocolChangeset as _0x533c3a,transformSnapshotToBaseData as _0x3838dc,transformSnapshotToBoardData as _0x93bace,transformSnapshotToDocumentData as _0xd2df7d,transformSnapshotToSlideData as _0x72938,transformSnapshotToWorkbookData as _0x3ad34b}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x1b53cc}from'@univerjs/engine-formula';import{CmdRspCode as _0x434455,CombCmd as _0x21f97d,isError as _0x368375}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x382ebb}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x182541,RichTextEditingMutation as _0x8456f6}from'@univerjs/docs';import{IRenderManagerService as _0x31684c}from'@univerjs/engine-render';import{FUniver as _0x1880d0}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 _0x277511 from'@oxc-project/runtime/helpers/decorateParam';import _0x316c9f from'@oxc-project/runtime/helpers/decorate';function _0x3bd6(){const _0x3b91e2=['eventID','flatMap','Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range','No\x20active\x20Unit\x20leases','csRejEvent','Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command','confirmed','cancel','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','COMPRESS_MUTATION_SEND','Event','error','reject','open','transform-failed','1531818dBexZI','_replayRemoteChangesets','_handle','compressMutationService','cmd','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','run','onMutationExecutedForCollab','getState','getSheetBlock','_executor','rev','_univer','application/json','sort','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','_connectPromise','_socket','remote','createBoard','disposeUnit','_baseRevision','_awaiting','Heartbeat\x20failed','_disposables','transformMutations','unitData','collabWebSocketUrl','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','injector','getUnitOnRev','new_changes','_reconnectAttempts','join','result','MUTATION','doc','ack','_knownHeadRevision','dispose','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot','getPendingMutations','replacePending','submitChangeset','Failed\x20to\x20rejoin\x20Unit\x20room','_stopHeartbeat','_lease','_waitForSubmission','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','fetch','_fetchChangesets','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','m2Prime','_closed','Backend\x20failed\x20to\x20fetch\x20changesets','fromChangeset','_reconcilePrecedingChangesets','size','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','interceptor','getInterceptPoints','_closeAfterFatalError','_validateAcceptedChangeset','\x20for\x20Unit\x20','commandService','stringify','1qBlqAq','message','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','changeset-rejected','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','httpRequest','_rejectIfNotAccepting','pathname','1105270sxLuex','catch','conflict','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type','_config','collabSubmitChangesetUrl','retryable','routeKey','find','takePending','_assertMutableState','Cannot\x20','timeout','format','formula.mutation.set-formula-data','_tail','infoRsp','entries','waitForLatestApplied','Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range','reqId','Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset','COLLABORATION_LOAD_FAILED','number','Changeset\x20submission\x20was\x20rejected','resolve','read','Backend\x20returned\x20no\x20Unit\x20snapshot','workbook','pending','invalid','maxCodeLength','closed','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','wsSessionTicketUrl','addEventListener','latestRevision','from','Changeset\x20submission\x20was\x20denied','Snapshot\x20block\x20','target','\x20character\x20limit','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','_commandWaiters','commit','removeEventListener','isArray','csAckEvent','getDocument','splice','write','length','unitId','pull','_startHeartbeat','2247FZLeRO','waitForSubmission','kind','newAPI','leases','\x20is\x20unavailable','sheet.mutation.send-init-pivot-text-local','_ensureConnected','protocol','changeset','\x20uses\x20an\x20unsupported\x20protocol','COLLABORATION_UNAVAILABLE','_state','unitId\x20must\x20not\x20be\x20empty','Backend\x20changesets\x20must\x20be\x20an\x20array','rejected','unitType','transformService','acquire','1832288ZVulYr','reason','createUnit','object','_connect','LEAVE','registerPlugin','changesets','_reconnectTimer','getConnectionState','Failed\x20to\x20fetch\x20preceding\x20changesets','unshift','COLLABORATION_INVALID_INPUT','permissionRejEvent','then','_requestCommand','parse','map','_joined','formula.mutation.set-trigger-formula-calculation-stop','sessionTicket','incrementRevOfUnit','memberId','json','unsubscribe','fetchmissing','mode','searchParams','slide','Failed\x20to\x20join\x20Unit\x20room','_memberId','mutations','Snapshot\x20contains\x20duplicate\x20block\x20ids','BeforeCommandExecute','UNIVER_SHEET','Runtime\x20for\x20','_release','some','prependPending','UNIVER_DOC','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','execute','revisionService','close','COLLABORATION_CLOSED','unknown','_createAwaitingFromPending','newCsEvent','snapshotServerUrl','data','_nextReqId','42PyCbGY','unit','has','4783389CEpTrm','fetchChangesets','save','\x20})();','max','_handleMessage','new_changesets','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','Replacement\x20mutations\x20must\x20be\x20an\x20array','commandId','_conflict','616mzWUNj','delete','_injector','getUnitData','online','getWorkbook','initial','_sid','wss:','index','string','values','get','RECV','_target','UNIVER_BOARD','all','_closePromise','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','block','replace\x20mutations','subscribe','formula.mutation.set-calculation-result','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','retry','permission-rejected','add','collaMsg','Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','csShouldRetryEvent','_unitId','readyState','_kernel','board','awaiting-ack','ticket','HELLO','_handleCollaborationEvent','commitTimeoutMs','HEARTBEAT','suppress','changeset_should_retry','UNIVER_SLIDE','pluginName','trigger','return\x20(async\x20()\x20=>\x20{\x20','_capture','onlyLocal','_submissionWaiters','fetched','_scheduleReconnect','slice','blockMeta','Unsupported\x20collaboration\x20Unit\x20type:\x20','OPEN','addEvent','permission','promise','takeInboundChangesets','revision','\x20cannot\x20capture\x20mutation\x20','instanceService','status','m1Prime','ws:','Collaboration\x20HTTP\x20request\x20failed','offline','prototype','createUniverSheet','_captureCommandMutation','349115SYQfwV','pull-required','UNIVER_BASE','\x20cannot\x20call\x20','sid','_pending','Failed\x20to\x20open\x20the\x20collaboration\x20backend','COMPRESS_MUTATION_APPLY','_inbound','Invalid\x20JSON\x20response','_subscribeToDocumentState','snapshotServerService','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','https:','_bufferedChangesets','name','_operations','min','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','send','Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','sheets','baseRev','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','push','pulled','clear','invalid-changeset','code','_acceptingOperations','createWorkbook','createUniver','44928wrYWUw','Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id','reconnecting','fetchThroughInterceptors','COLLABORATION_PROTOCOL_ERROR','JOIN','changeset_ack','randomUUID','isFinite','POST','_consumeBufferedPrecedingChangesets','type','isSafeInteger','4922008IrNnBR','permission_rej','CollaborationRuntimeError','snapshotFrom','Collaboration\x20runtime\x20is\x20closing\x20or\x20closed','nothing-to-commit','createBase','finally','Unit\x20','getBoard','_closeOwnedResources','snapshot','precedingChangesets','createPresentation','univerAPI','replacePendingMutations','http:','Collaboration\x20HELLO\x20response\x20is\x20invalid','GET','changeset_rej','unitID','_setTransformConflict','originalMeta','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','memberID','set','_suppressionDepth','Collaboration\x20WebSocket\x20closed','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset','_join','trim','_heartbeat','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','unit-data','Collaboration\x20WebSocket\x20is\x20not\x20online','permission-denied','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20'];_0x3bd6=function(){return _0x3b91e2;};return _0x3bd6();}var j=class extends Error{[_0x1c125c(0x1f5)];[_0x1c125c(0x28d)];constructor(_0x156c80,_0x270db1,_0x30e036={}){const _0x1437ee=_0x1c125c;super(_0x270db1,_0x30e036),this[_0x1437ee(0x368)]=_0x1437ee(0x208),this[_0x1437ee(0x1f5)]=_0x156c80,this[_0x1437ee(0x28d)]=_0x30e036[_0x1437ee(0x28d)]??!0x1;}},se=class{[_0x1c125c(0x333)];[_0x1c125c(0x331)];['_pending']=[];[_0x1c125c(0x252)]=[];[_0x1c125c(0x220)]=0x0;constructor(_0x13faef,_0x2b2b28,_0x5ad9b0){const _0x55d375=_0x1c125c;this['_kernel']=_0x13faef,this['_unitId']=_0x2b2b28,this[_0x55d375(0x252)][_0x55d375(0x1f1)](_0x13faef[_0x55d375(0x27b)][_0x55d375(0x241)]((_0x40563c,_0x3dde02)=>{const _0x1b8b40=_0x55d375;this[_0x1b8b40(0x358)](_0x40563c,_0x3dde02,_0x5ad9b0);})),_0x5ad9b0===_0x13c60c[_0x55d375(0x2f8)]&&(_0x13faef[_0x55d375(0x257)][_0x55d375(0x31e)](_0x31684c),this[_0x55d375(0x363)]());}get[_0x1c125c(0x2a4)](){const _0x2a8841=_0x1c125c;return this[_0x2a8841(0x35e)];}['snapshotFrom'](_0x1dead0){const _0x5b4d3d=_0x1c125c;return this[_0x5b4d3d(0x35e)][_0x5b4d3d(0x346)](_0x1dead0);}['replacePending'](_0x507974){const _0x236927=_0x1c125c;this[_0x236927(0x35e)][_0x236927(0x2b8)](0x0,this[_0x236927(0x35e)]['length'],..._0x507974);}[_0x1c125c(0x290)](){const _0x4f39a7=_0x1c125c;return this[_0x4f39a7(0x35e)][_0x4f39a7(0x2b8)](0x0);}[_0x1c125c(0x2f7)](_0x3013bc){const _0x333e47=_0x1c125c;this[_0x333e47(0x35e)][_0x333e47(0x2dc)](..._0x3013bc);}async['suppress'](_0x162191){const _0x5d763c=_0x1c125c;this[_0x5d763c(0x220)]+=0x1;try{return await _0x162191();}finally{--this[_0x5d763c(0x220)];}}[_0x1c125c(0x261)](){const _0x548d7a=_0x1c125c;for(let _0x627cf8 of this[_0x548d7a(0x252)][_0x548d7a(0x2b8)](0x0))_0x627cf8['dispose']();}['_captureCommandMutation'](_0x3c2a45,_0x189286,_0x22eb03){const _0x105cab=_0x1c125c;if(this[_0x105cab(0x220)]>0x0||_0x3c2a45[_0x105cab(0x204)]!==_0x29521d[_0x105cab(0x25d)]||_0x189286?.['fromCollab']||_0x189286?.[_0x105cab(0x272)]||_0x189286?.[_0x105cab(0x342)])return;let _0x2d72ba=_0x3c2a45['params'];if(_0x2d72ba?.[_0x105cab(0x2bb)]!==void 0x0&&_0x2d72ba[_0x105cab(0x2bb)]!==this[_0x105cab(0x331)]){if(_0x2d72ba[_0x105cab(0x33f)]===_0x382ebb['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0x105cab(0x2f4)+this[_0x105cab(0x331)]+_0x105cab(0x34f)+_0x3c2a45['id']+_0x105cab(0x27a)+String(_0x2d72ba['unitId']));}if(_0x2d72ba?.[_0x105cab(0x2bb)]===void 0x0||_0x22eb03===_0x13c60c['UNIVER_DOC']&&_0x3c2a45['id']===_0x8456f6['id'])return;if(_0x3c2a45['id']===_0x38238c['id'])throw new j(_0x105cab(0x2dd),_0x105cab(0x329));let _0x22c573=_0x3c2a45,_0x1a86c0=this['_kernel']['compressMutationService'][_0x105cab(0x276)][_0x105cab(0x277)]()[_0x105cab(0x234)],_0x387044=(this['_kernel'][_0x105cab(0x23d)][_0x105cab(0x276)]['fetchThroughInterceptors'](_0x1a86c0)([_0x22c573],this['_kernel'][_0x105cab(0x350)])??[_0x22c573])[0x0];_0x387044&&this[_0x105cab(0x35e)][_0x105cab(0x1f1)](_0x5e4dde(_0x387044));}[_0x1c125c(0x363)](){const _0x36e938=_0x1c125c;let _0x11a2ee=this[_0x36e938(0x333)][_0x36e938(0x257)][_0x36e938(0x31e)](_0x182541)['docStateChange$'][_0x36e938(0x327)](_0x2bfd04=>{const _0x21e24e=_0x36e938;if(this[_0x21e24e(0x220)]>0x0||_0x2bfd04?.[_0x21e24e(0x2bb)]!==this[_0x21e24e(0x331)])return;let _0x355096={'id':_0x2bfd04[_0x21e24e(0x310)],'params':{'actions':_0x2bfd04['redoState']['actions'],'textRanges':null,'unitId':_0x2bfd04[_0x21e24e(0x2bb)]},'type':_0x29521d[_0x21e24e(0x25d)]};this[_0x21e24e(0x35e)]['push'](_0x5e4dde(_0x355096));});this['_disposables']['push'](_0xa88a70(()=>_0x11a2ee[_0x36e938(0x2e9)]()));}},ce=new Set(['formula.mutation.set-trigger-formula-calculation-start',_0x1c125c(0x2e4),'formula.mutation.set-trigger-formula-calculation',_0x1c125c(0x328),'formula.mutation.set-array-formula-data',_0x1c125c(0x295),_0x1c125c(0x2c4)]),le=new Set([_0x1c125c(0x20c),_0x1c125c(0x24d),_0x1c125c(0x1f7),'createDocument',_0x1c125c(0x213),_0x1c125c(0x357),_0x1c125c(0x24e)]);function ue(_0x3f55f7,_0x4cde30,_0x2710e7){let _0x4ff3fa=_0x1880d0['newAPI'](_0x3f55f7);return{async 'execute'(_0x2073c2,_0x5a6230){const _0x1e2b5f=_0x205e;if(_0x2073c2[_0x1e2b5f(0x2ba)]>_0x2710e7)throw new j(_0x1e2b5f(0x2dd),'Code\x20is\x20longer\x20than\x20the\x20'+_0x2710e7+_0x1e2b5f(0x2b0));let _0x722391=_0x5a6230===_0x1e2b5f(0x2a1)?M(_0x4ff3fa):void 0x0,_0x58c3b1=de(_0x4ff3fa,_0x4cde30);try{return await Function(_0x1e2b5f(0x214),_0x1e2b5f(0x340)+_0x2073c2+_0x1e2b5f(0x30a))(_0x58c3b1);}finally{_0x722391?.[_0x1e2b5f(0x261)]();}}};}function de(_0x4e442f,_0x4f3233){return new Proxy(_0x4e442f,{'get'(_0x3d403b,_0x128458,_0x4d1e80){const _0x15a430=_0x205e;return le[_0x15a430(0x306)](_0x128458)?()=>{const _0x454311=_0x15a430;throw new j(_0x454311(0x2dd),'Single-Unit\x20runtime\x20for\x20'+_0x4f3233+_0x454311(0x35c)+String(_0x128458));}:Reflect[_0x15a430(0x31e)](_0x3d403b,_0x128458,_0x4d1e80);}});}function M(_0x516b47){const _0x1cd953=_0x1c125c;return _0x516b47[_0x1cd953(0x34a)](_0x516b47[_0x1cd953(0x235)][_0x1cd953(0x2f2)],_0x80b592=>{const _0x4cb7bd=_0x1cd953;let _0x34528f=_0x80b592;if(N(_0x34528f))throw _0x34528f[_0x4cb7bd(0x232)]=!0x0,new j(_0x4cb7bd(0x2dd),'Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20'+_0x34528f['id']);});}function N(_0x4f9c23){const _0x57f955=_0x1c125c;return _0x4f9c23[_0x57f955(0x204)]===_0x29521d['COMMAND']||_0x4f9c23[_0x57f955(0x204)]===_0x29521d[_0x57f955(0x25d)]&&!ce['has'](_0x4f9c23['id']);}function P(_0xdb256d){const _0x211f38=_0x1c125c;if(_0xdb256d===void 0x0)return null;if(_0xdb256d===null||typeof _0xdb256d=='boolean'||typeof _0xdb256d=='string')return _0xdb256d;if(typeof _0xdb256d==_0x211f38(0x29e)){if(Number[_0x211f38(0x201)](_0xdb256d))return _0xdb256d;throw I();}if(Array['isArray'](_0xdb256d))return _0xdb256d['map'](P);if(F(_0xdb256d))return Object['fromEntries'](Object[_0x211f38(0x298)](_0xdb256d)[_0x211f38(0x2e2)](([_0x288166,_0x4b0a42])=>[_0x288166,P(_0x4b0a42)]));throw I();}function F(_0x113fb3){const _0x38e77a=_0x1c125c;if(typeof _0x113fb3!='object'||!_0x113fb3)return!0x1;let _0x54efef=Object['getPrototypeOf'](_0x113fb3);return _0x54efef===Object[_0x38e77a(0x356)]||_0x54efef===null;}function I(){const _0x766ac1=_0x1c125c;return new j(_0x766ac1(0x2dd),_0x766ac1(0x288));}var L=class{[_0x1c125c(0x296)]=Promise[_0x1c125c(0x2a0)]();[_0x1c125c(0x240)](_0x4c2941){const _0x7b5359=_0x1c125c;let _0x1ea28c=this[_0x7b5359(0x296)]['then'](_0x4c2941,_0x4c2941);return this[_0x7b5359(0x296)]=_0x1ea28c[_0x7b5359(0x2df)](()=>void 0x0,()=>void 0x0),_0x1ea28c;}};function R(_0x237eed,_0x4c16d0,_0xf37d2,_0x17e67c){const _0x405abd=_0x1c125c;if(!Array[_0x405abd(0x2b5)](_0x237eed))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x405abd(0x2cc));let _0x383e47=[..._0x237eed][_0x405abd(0x248)]((_0x493158,_0x3056c6)=>_0x493158['revision']-_0x3056c6[_0x405abd(0x34e)]),_0x197768=_0x17e67c;for(let _0x59458f of _0x383e47){if(!_0x59458f||typeof _0x59458f!=_0x405abd(0x2d4)||!Array[_0x405abd(0x2b5)](_0x59458f['mutations'])||_0x59458f[_0x405abd(0x2f0)][_0x405abd(0x2f6)](_0x3b58b4=>!_0x3b58b4||typeof _0x3b58b4!=_0x405abd(0x2d4)||!('id'in _0x3b58b4)||typeof _0x3b58b4['id']!=_0x405abd(0x31c)||!(_0x405abd(0x302)in _0x3b58b4)||typeof _0x3b58b4[_0x405abd(0x302)]!=_0x405abd(0x31c))||!Number[_0x405abd(0x205)](_0x59458f[_0x405abd(0x1ef)])||!Number['isSafeInteger'](_0x59458f[_0x405abd(0x34e)])||_0x59458f[_0x405abd(0x21a)]!==_0x4c16d0||_0x59458f[_0x405abd(0x204)]!==_0xf37d2||_0x59458f[_0x405abd(0x1ef)]!==_0x197768||_0x59458f['revision']!==_0x197768+0x1)throw new j(_0x405abd(0x1fd),_0x405abd(0x365));_0x197768=_0x59458f[_0x405abd(0x34e)];}return _0x383e47;}function z(_0x3c3745){const _0x4ea137=_0x1c125c;return{'baseRevision':_0x3c3745['baseRev'],'mutationCount':_0x3c3745[_0x4ea137(0x2f0)][_0x4ea137(0x2ba)],'revision':_0x3c3745[_0x4ea137(0x34e)],..._0x3c3745[_0x4ea137(0x35d)]===void 0x0?{}:{'sid':_0x3c3745[_0x4ea137(0x35d)]},..._0x3c3745[_0x4ea137(0x29b)]===void 0x0?{}:{'reqId':_0x3c3745[_0x4ea137(0x29b)]}};}function B(_0x29eaf1,_0x29aded,_0x316f48,_0x2194bf,_0x316f3a,_0x3e82be=_0x1c125c(0x318)){const _0x18d9e4=_0x1c125c;if(_0x316f3a['some'](_0x2bd0cb=>_0x2bd0cb['mutations'][_0x18d9e4(0x2f6)](_0x4d1512=>_0x4d1512['id']===_0x38238c['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place');let _0x27ffbb=_0x2194bf;for(let _0x4d4707 of _0x316f3a){let _0x174f80=_0x27ffbb+0x1;if(_0x4d4707[_0x18d9e4(0x21a)]!==_0x29aded||_0x4d4707['type']!==_0x316f48||_0x4d4707['baseRev']!==_0x27ffbb||_0x4d4707[_0x18d9e4(0x34e)]!==_0x174f80)throw new j(_0x18d9e4(0x1fd),_0x18d9e4(0x281));let _0x4617ad=_0x533c3a(_0x4d4707),_0x424e5a=_0x29eaf1[_0x18d9e4(0x23d)][_0x18d9e4(0x276)][_0x18d9e4(0x277)]()[_0x18d9e4(0x360)],_0x3cb4f8=_0x29eaf1[_0x18d9e4(0x23d)][_0x18d9e4(0x276)][_0x18d9e4(0x1fc)](_0x424e5a)(_0x4617ad['mutations'],null)??_0x4617ad[_0x18d9e4(0x2f0)],_0x567b89=_0x4123c5(_0x3cb4f8,_0x29eaf1[_0x18d9e4(0x27b)],_0x3e82be===_0x18d9e4(0x318)?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x567b89[_0x18d9e4(0x25c)])throw new j('COLLABORATION_LOAD_FAILED',_0x18d9e4(0x26b)+_0x567b89[_0x18d9e4(0x31b)]+':\x20'+String(_0x567b89[_0x18d9e4(0x236)]));let _0x191a09=_0x29eaf1[_0x18d9e4(0x2fb)][_0x18d9e4(0x2e6)](_0x29aded);if(_0x191a09!==_0x174f80)throw new j(_0x18d9e4(0x1fd),_0x18d9e4(0x21d));_0x27ffbb=_0x191a09;}return _0x27ffbb;}function V(_0x112930,_0x3aa907,_0x236325){const _0x14f405=_0x1c125c;let _0x4d61c4=_0x1880d0[_0x14f405(0x2c1)](_0x112930);switch(_0x236325){case _0x13c60c[_0x14f405(0x2f3)]:return H(_0x4d61c4[_0x14f405(0x317)](_0x3aa907)?.[_0x14f405(0x309)](),_0x3aa907);case _0x13c60c[_0x14f405(0x2f8)]:return H(_0x4d61c4[_0x14f405(0x2b7)](_0x3aa907)?.[_0x14f405(0x309)](),_0x3aa907);case _0x13c60c[_0x14f405(0x33d)]:return H(_0x4d61c4['getPresentation'](_0x3aa907)?.[_0x14f405(0x309)](),_0x3aa907);case _0x13c60c[_0x14f405(0x35b)]:return H(_0x4d61c4['getBase'](_0x3aa907)?.[_0x14f405(0x309)](),_0x3aa907);case _0x13c60c['UNIVER_BOARD']:return H(_0x4d61c4[_0x14f405(0x20f)](_0x3aa907)?.['save'](),_0x3aa907);default:throw new j(_0x14f405(0x2dd),_0x14f405(0x348)+_0x236325);}}function H(_0x422ec4,_0xdbe208){const _0x55d2df=_0x1c125c;if(_0x422ec4===void 0x0)throw new j('COLLABORATION_LOAD_FAILED',_0x55d2df(0x20e)+_0xdbe208+_0x55d2df(0x2c3));return structuredClone(_0x422ec4);}var fe=class{['unitId'];[_0x1c125c(0x2ce)];[_0x1c125c(0x24f)];[_0x1c125c(0x23c)];[_0x1c125c(0x246)];[_0x1c125c(0x333)];['_closePromise'];[_0x1c125c(0x1f6)]=!0x0;[_0x1c125c(0x270)]=!0x1;['_capture'];[_0x1c125c(0x244)];[_0x1c125c(0x369)]=new L();['_bufferedChangesets']=[];[_0x1c125c(0x260)];[_0x1c125c(0x311)]=null;[_0x1c125c(0x250)]=null;[_0x1c125c(0x319)]=crypto[_0x1c125c(0x200)]();[_0x1c125c(0x303)]=0x1;constructor(_0x8cef46,_0x487fbe,_0x20bac5,_0x35e5b3,_0x3d1eca,_0x15c9c6,_0x51def7){const _0x1c4101=_0x1c125c;this['unitId']=_0x8cef46,this['unitType']=_0x487fbe,this[_0x1c4101(0x24f)]=_0x20bac5,this[_0x1c4101(0x23c)]=_0x35e5b3,this['_univer']=_0x3d1eca,this['_kernel']=_0x15c9c6,this[_0x1c4101(0x260)]=_0x20bac5,this[_0x1c4101(0x341)]=new se(_0x15c9c6,_0x8cef46,_0x487fbe),this['_executor']=ue(_0x3d1eca,_0x8cef46,_0x51def7);}[_0x1c125c(0x242)](){const _0xbabb2e=_0x1c125c;return{'awaitingChangeset':this[_0xbabb2e(0x250)]===null?null:U(this['_awaiting']),'baseRevision':this[_0xbabb2e(0x24f)],'bufferedChangesetCount':this[_0xbabb2e(0x367)][_0xbabb2e(0x2ba)],'conflict':this[_0xbabb2e(0x311)],'connection':this[_0xbabb2e(0x270)]?_0xbabb2e(0x2a7):this[_0xbabb2e(0x23c)][_0xbabb2e(0x2da)](),'knownHeadRevision':this['_knownHeadRevision'],'pendingMutationCount':this[_0xbabb2e(0x341)]['pending'][_0xbabb2e(0x2ba)]};}[_0x1c125c(0x263)](){const _0x3eb4a8=_0x1c125c;return structuredClone(this[_0x3eb4a8(0x341)][_0x3eb4a8(0x2a4)]);}[_0x1c125c(0x26c)](){const _0x4bca8f=_0x1c125c;return this[_0x4bca8f(0x283)]()||this['_operations'][_0x4bca8f(0x240)](async()=>(this['_assertMutableState'](_0x4bca8f(0x26c)),await this[_0x4bca8f(0x26d)]()));}[_0x1c125c(0x2bc)](){const _0x1942c7=_0x1c125c;return this[_0x1942c7(0x283)]()||this[_0x1942c7(0x369)]['run'](async()=>{const _0x4904dd=_0x1942c7;if(this[_0x4904dd(0x291)](_0x4904dd(0x2bc)),await this[_0x4904dd(0x26d)](),this[_0x4904dd(0x367)][_0x4904dd(0x2ba)]===0x0)return{'state':this[_0x4904dd(0x242)](),'status':'up-to-date'};let _0x9cd0bd=[...this[_0x4904dd(0x367)]];if(_0x9cd0bd[_0x4904dd(0x2f6)](_0x5550b1=>_0x5550b1[_0x4904dd(0x2f0)][_0x4904dd(0x2f6)](_0x574dd7=>_0x574dd7['id']===_0x38238c['id'])))throw new j(_0x4904dd(0x1fd),_0x4904dd(0x26a));let _0xbdb35a=this[_0x4904dd(0x24f)],_0x1db210=this[_0x4904dd(0x250)]?W(this['_awaiting'][_0x4904dd(0x2f0)],this['unitId'],this[_0x4904dd(0x2ce)],this[_0x4904dd(0x24f)]):null,_0x3e5ebd=_0x533c3a({'baseRev':this[_0x4904dd(0x24f)],'memberID':'','mutations':[...this['_capture']['pending']],'revision':0x0,'type':this[_0x4904dd(0x2ce)],'unitID':this['unitId'],'userID':''})[_0x4904dd(0x2f0)],_0x2758cd=[];for(let _0xbcdfc9 of _0x9cd0bd){let _0x1dc3aa=_0x533c3a(_0xbcdfc9);if(this[_0x4904dd(0x250)]!==null&&_0xbcdfc9[_0x4904dd(0x35d)]===this[_0x4904dd(0x250)][_0x4904dd(0x35d)]&&_0xbcdfc9[_0x4904dd(0x29b)]===this['_awaiting'][_0x4904dd(0x29b)]){let _0x4ccbe8=(_0x1db210??[])['map'](_0x5e4dde);G(_0xbcdfc9['mutations'],_0x4ccbe8)||await this['_closeAfterFatalError'](new j(_0x4904dd(0x1fd),_0x4904dd(0x36b))),_0x2758cd[_0x4904dd(0x1f1)]({'changeset':_0xbcdfc9,'kind':_0x4904dd(0x335)}),_0x1db210=null;continue;}let _0x4e65f8=_0x1dc3aa[_0x4904dd(0x2f0)];if(_0x1db210!==null){let _0x216537=this[_0x4904dd(0x333)][_0x4904dd(0x2cf)][_0x4904dd(0x253)](_0x4e65f8,_0x1db210,!0x1);if(!_0x1409d9(_0x216537))return this[_0x4904dd(0x311)]={'message':_0x216537['error'][_0x4904dd(0x27e)],'operation':_0x4904dd(0x2bc),'reason':_0x4904dd(0x239)},{'conflict':this[_0x4904dd(0x311)],'state':this[_0x4904dd(0x242)](),'status':'conflict'};_0x4e65f8=_0x216537[_0x4904dd(0x352)],_0x1db210=_0x216537[_0x4904dd(0x26f)];}let _0x3dd7a9=this[_0x4904dd(0x333)]['transformService'][_0x4904dd(0x253)](_0x4e65f8,_0x3e5ebd,!0x1);if(!_0x1409d9(_0x3dd7a9))return this[_0x4904dd(0x311)]={'message':_0x3dd7a9[_0x4904dd(0x236)][_0x4904dd(0x27e)],'operation':_0x4904dd(0x2bc),'reason':'transform-failed'},{'conflict':this['_conflict'],'state':this['getState'](),'status':_0x4904dd(0x287)};_0x2758cd['push']({'changeset':_0xeaf139({..._0x1dc3aa,'mutations':_0x3dd7a9[_0x4904dd(0x352)]}),'kind':_0x4904dd(0x24c)}),_0x3e5ebd=_0x3dd7a9[_0x4904dd(0x26f)];}let _0x2e4ef7=_0xbdb35a;for(let _0x4cc22b of _0x2758cd){if(_0x4cc22b[_0x4904dd(0x2c0)]===_0x4904dd(0x335)){let _0x4ac9fd=this[_0x4904dd(0x333)][_0x4904dd(0x2fb)][_0x4904dd(0x2e6)](this[_0x4904dd(0x2bb)]);_0x4ac9fd!==_0x4cc22b[_0x4904dd(0x2c7)][_0x4904dd(0x34e)]&&await this[_0x4904dd(0x278)](new j(_0x4904dd(0x1fd),'Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision')),_0x2e4ef7=_0x4ac9fd;continue;}_0x2e4ef7=await this['_replayRemoteChangesets'](_0x2e4ef7,[_0x4cc22b['changeset']]);}return this[_0x4904dd(0x341)][_0x4904dd(0x264)](_0x3e5ebd[_0x4904dd(0x2e2)](_0x5e4dde)),this[_0x4904dd(0x250)]!==null&&(this[_0x4904dd(0x250)]=_0x1db210===null?null:{...this[_0x4904dd(0x250)],'baseRev':_0x2e4ef7,'mutations':_0x1db210[_0x4904dd(0x2e2)](_0x5e4dde)}),this[_0x4904dd(0x24f)]=_0x2e4ef7,this[_0x4904dd(0x367)][_0x4904dd(0x2b8)](0x0),{'appliedChangesets':_0x9cd0bd[_0x4904dd(0x2e2)](z),'fromRevision':_0xbdb35a,'state':this[_0x4904dd(0x242)](),'status':_0x4904dd(0x1f2),'toRevision':_0x2e4ef7,'transformedPendingMutationCount':_0x3e5ebd[_0x4904dd(0x2ba)]};});}[_0x1c125c(0x2b3)](){const _0x5498ec=_0x1c125c;return this[_0x5498ec(0x283)]()||this[_0x5498ec(0x369)][_0x5498ec(0x240)](async()=>{const _0x2c3b30=_0x5498ec;this[_0x2c3b30(0x291)]('commit');let _0x3f67fb=[],_0x13800e=[];if(this[_0x2c3b30(0x250)]===null){if(this[_0x2c3b30(0x341)][_0x2c3b30(0x2a4)][_0x2c3b30(0x2ba)]===0x0)return{'state':this[_0x2c3b30(0x242)](),'status':_0x2c3b30(0x20b)};if(await this['_fetchChangesets'](),this[_0x2c3b30(0x367)][_0x2c3b30(0x2ba)]>0x0)return{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x3f67fb,'knownHeadRevision':this[_0x2c3b30(0x260)],'state':this[_0x2c3b30(0x242)](),'status':_0x2c3b30(0x35a)};this[_0x2c3b30(0x2ff)]();}for(;this[_0x2c3b30(0x250)]!==null;){let _0x40e4be=this[_0x2c3b30(0x250)],_0x25eddb;try{_0x25eddb=await this[_0x2c3b30(0x23c)][_0x2c3b30(0x265)](_0x40e4be);}catch{return{'changeset':U(_0x40e4be),'confirmedChangesets':_0x3f67fb,'state':this['getState'](),'status':_0x2c3b30(0x2fe)};}if(_0x25eddb['status']===_0x2c3b30(0x32a)||_0x25eddb[_0x2c3b30(0x351)]===_0x2c3b30(0x2fe))return{'changeset':U(_0x40e4be),'confirmedChangesets':_0x3f67fb,'state':this[_0x2c3b30(0x242)](),'status':_0x25eddb[_0x2c3b30(0x351)]};if(_0x25eddb[_0x2c3b30(0x351)]==='rejected')return _0x25eddb[_0x2c3b30(0x2d2)]==='invalid-revision'?(this[_0x2c3b30(0x341)][_0x2c3b30(0x2f7)](_0x40e4be[_0x2c3b30(0x2f0)]),this['_awaiting']=null,await this[_0x2c3b30(0x26d)](),{'baseRevision':this[_0x2c3b30(0x24f)],'confirmedChangesets':_0x3f67fb,'knownHeadRevision':this[_0x2c3b30(0x260)],'state':this[_0x2c3b30(0x242)](),'status':'pull-required'}):(this[_0x2c3b30(0x311)]={'message':_0x25eddb[_0x2c3b30(0x27e)],'operation':'commit','reason':_0x25eddb[_0x2c3b30(0x2d2)]===_0x2c3b30(0x229)?_0x2c3b30(0x32b):'changeset-rejected'},{'conflict':this[_0x2c3b30(0x311)],'confirmedChangesets':_0x3f67fb,'state':this[_0x2c3b30(0x242)](),'status':'conflict'});let _0x2011a2=_0x25eddb['acceptedChangeset'];try{this[_0x2c3b30(0x279)](_0x40e4be,_0x25eddb['precedingChangesets'],_0x2011a2);}catch(_0x1eef98){await this[_0x2c3b30(0x278)](_0x1eef98);}let _0x598a48=_0x40e4be[_0x2c3b30(0x2f0)];if(_0x25eddb[_0x2c3b30(0x212)][_0x2c3b30(0x2ba)]>0x0){let _0xd5bbdf=await this[_0x2c3b30(0x273)](_0x40e4be,_0x25eddb['precedingChangesets']);if(_0xd5bbdf===null)return{'conflict':this[_0x2c3b30(0x311)],'confirmedChangesets':_0x3f67fb,'state':this[_0x2c3b30(0x242)](),'status':'conflict'};_0x598a48=_0xd5bbdf['awaitingMutations'];try{this[_0x2c3b30(0x203)](_0x25eddb['precedingChangesets']);}catch(_0x11f848){await this[_0x2c3b30(0x278)](_0x11f848);}_0x13800e[_0x2c3b30(0x1f1)](..._0x25eddb[_0x2c3b30(0x212)][_0x2c3b30(0x2e2)](z));}G(_0x2011a2[_0x2c3b30(0x2f0)],_0x598a48)||await this['_closeAfterFatalError'](new j(_0x2c3b30(0x1fd),_0x2c3b30(0x29c)));let _0x4ab51e=this[_0x2c3b30(0x333)][_0x2c3b30(0x2fb)][_0x2c3b30(0x2e6)](this[_0x2c3b30(0x2bb)]);if(_0x4ab51e!==_0x2011a2[_0x2c3b30(0x34e)]&&await this[_0x2c3b30(0x278)](new j(_0x2c3b30(0x1fd),_0x2c3b30(0x27f))),this[_0x2c3b30(0x24f)]=_0x4ab51e,this['_knownHeadRevision']=Math[_0x2c3b30(0x30b)](this[_0x2c3b30(0x260)],_0x4ab51e),this[_0x2c3b30(0x250)]=null,_0x3f67fb[_0x2c3b30(0x1f1)](z(_0x2011a2)),this[_0x2c3b30(0x341)][_0x2c3b30(0x2a4)]['length']===0x0)break;this['_createAwaitingFromPending']();}return{'confirmedChangesets':_0x3f67fb,'reconciledChangesets':_0x13800e,'state':this[_0x2c3b30(0x242)](),'status':_0x2c3b30(0x231)};});}async[_0x1c125c(0x26d)](){const _0x11aee8=_0x1c125c;let _0x111017=this[_0x11aee8(0x260)],_0x289cef=await this[_0x11aee8(0x23c)][_0x11aee8(0x308)](_0x111017,void 0x0);if(_0x368375(_0x289cef[_0x11aee8(0x236)])){let _0x5d3097=_0x289cef['error'];throw new j('COLLABORATION_UNAVAILABLE',_0x5d3097?.[_0x11aee8(0x27e)]||_0x11aee8(0x271),{'retryable':!0x0});}let _0x220644=R(_0x289cef[_0x11aee8(0x2d8)],this[_0x11aee8(0x2bb)],this['unitType'],_0x111017),_0xf36a26=_0x220644['at'](-0x1)?.[_0x11aee8(0x34e)]??_0x111017;if(_0x289cef[_0x11aee8(0x2ab)]!==void 0x0&&_0x289cef['latestRevision']!==_0xf36a26)throw new j(_0x11aee8(0x1fd),_0x11aee8(0x29a));return _0x220644[_0x11aee8(0x2ba)]===0x0?{'knownHeadRevision':this[_0x11aee8(0x260)],'state':this[_0x11aee8(0x242)](),'status':'unchanged'}:(this[_0x11aee8(0x367)][_0x11aee8(0x1f1)](..._0x220644),this[_0x11aee8(0x260)]=_0xf36a26,{'changesets':_0x220644[_0x11aee8(0x2e2)](z),'fromRevision':_0x111017,'state':this['getState'](),'status':_0x11aee8(0x344),'toRevision':_0xf36a26});}[_0x1c125c(0x2ff)](){const _0x47a405=_0x1c125c;let _0x2f1fba=this['_capture'][_0x47a405(0x290)]();this[_0x47a405(0x250)]={'baseRev':this[_0x47a405(0x24f)],'mutations':_0x2f1fba,'reqId':this[_0x47a405(0x303)],'sid':this[_0x47a405(0x319)]},this['_nextReqId']+=0x1;}[_0x1c125c(0x279)](_0x5e5048,_0x521c30,_0x591bdd){const _0x278bed=_0x1c125c;let _0x31dff4=R(_0x521c30,this['unitId'],this['unitType'],this[_0x278bed(0x24f)])['at'](-0x1)?.[_0x278bed(0x34e)]??this['_baseRevision'];if(_0x591bdd[_0x278bed(0x21a)]!==this[_0x278bed(0x2bb)]||_0x591bdd[_0x278bed(0x204)]!==this[_0x278bed(0x2ce)]||_0x591bdd[_0x278bed(0x35d)]!==_0x5e5048[_0x278bed(0x35d)]||_0x591bdd[_0x278bed(0x29b)]!==_0x5e5048['reqId']||_0x591bdd[_0x278bed(0x1ef)]!==_0x31dff4||_0x591bdd['revision']!==_0x31dff4+0x1)throw new j(_0x278bed(0x1fd),_0x278bed(0x222));}async[_0x1c125c(0x273)](_0x5573b7,_0x4126ca){const _0x3b9f2e=_0x1c125c;let _0x4dc497=W(_0x5573b7[_0x3b9f2e(0x2f0)],this[_0x3b9f2e(0x2bb)],this[_0x3b9f2e(0x2ce)],this[_0x3b9f2e(0x24f)]),_0x56995d=W(this[_0x3b9f2e(0x341)][_0x3b9f2e(0x2a4)],this[_0x3b9f2e(0x2bb)],this[_0x3b9f2e(0x2ce)],this['_baseRevision']),_0x186fc5=[];for(let _0x12b657 of _0x4126ca){let _0x200e35=_0x533c3a(_0x12b657),_0x19bc47=this[_0x3b9f2e(0x333)][_0x3b9f2e(0x2cf)][_0x3b9f2e(0x253)](_0x200e35[_0x3b9f2e(0x2f0)],_0x4dc497,!0x1);if(!_0x1409d9(_0x19bc47))return this['_setTransformConflict'](_0x3b9f2e(0x2b3),_0x19bc47[_0x3b9f2e(0x236)]),null;_0x4dc497=_0x19bc47['m2Prime'];let _0x407436=this[_0x3b9f2e(0x333)][_0x3b9f2e(0x2cf)][_0x3b9f2e(0x253)](_0x19bc47[_0x3b9f2e(0x352)],_0x56995d,!0x1);if(!_0x1409d9(_0x407436))return this[_0x3b9f2e(0x21b)]('commit',_0x407436[_0x3b9f2e(0x236)]),null;_0x56995d=_0x407436[_0x3b9f2e(0x26f)],_0x186fc5['push'](_0xeaf139({..._0x200e35,'mutations':_0x407436[_0x3b9f2e(0x352)]}));}let _0x3b5dcb=await this[_0x3b9f2e(0x23b)](this['_baseRevision'],_0x186fc5);return this[_0x3b9f2e(0x341)][_0x3b9f2e(0x264)](_0x56995d[_0x3b9f2e(0x2e2)](_0x5e4dde)),this[_0x3b9f2e(0x24f)]=_0x3b5dcb,{'awaitingMutations':_0x4dc497[_0x3b9f2e(0x2e2)](_0x5e4dde),'revision':_0x3b5dcb};}['_setTransformConflict'](_0x3d1f85,_0x4b7b82){const _0x12939e=_0x1c125c;this[_0x12939e(0x311)]={'message':_0x4b7b82[_0x12939e(0x27e)],'operation':_0x3d1f85,'reason':_0x12939e(0x239)};}async[_0x1c125c(0x23b)](_0x281814,_0x4f0337){const _0x4b8947=_0x1c125c;try{return await this[_0x4b8947(0x341)][_0x4b8947(0x33b)](async()=>B(this[_0x4b8947(0x333)],this['unitId'],this[_0x4b8947(0x2ce)],_0x281814,_0x4f0337,_0x4b8947(0x24c)));}catch(_0x2b9fe8){return await this['_closeAfterFatalError'](_0x2b9fe8);}}async[_0x1c125c(0x278)](_0x2ac446){const _0x770db4=_0x1c125c;this[_0x770db4(0x1f6)]=!0x1,this[_0x770db4(0x323)]??=this[_0x770db4(0x210)]();try{await this[_0x770db4(0x323)];}catch{}throw _0x2ac446;}[_0x1c125c(0x203)](_0x37e69a){const _0x4dacb7=_0x1c125c;let _0x1b02de=_0x37e69a['at'](-0x1)?.['revision'];if(_0x1b02de===void 0x0||this[_0x4dacb7(0x367)]['length']===0x0)return;let _0x492711=this[_0x4dacb7(0x367)]['findIndex'](({revision:_0x53621b})=>_0x53621b>_0x1b02de),_0x307470=this[_0x4dacb7(0x367)][_0x4dacb7(0x346)](0x0,_0x492711===-0x1?this[_0x4dacb7(0x367)][_0x4dacb7(0x2ba)]:_0x492711);for(let _0x2db18b of _0x307470){let _0x5c2ac9=_0x37e69a[_0x4dacb7(0x28f)](({revision:_0x7205a6})=>_0x7205a6===_0x2db18b[_0x4dacb7(0x34e)]);if(!_0x5c2ac9||!pe(_0x2db18b,_0x5c2ac9))throw new j('COLLABORATION_PROTOCOL_ERROR','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset');}this[_0x4dacb7(0x367)][_0x4dacb7(0x2b8)](0x0,_0x307470[_0x4dacb7(0x2ba)]);}['execute'](_0x235516){const _0x5d91cf=_0x1c125c;return this[_0x5d91cf(0x283)]()||this[_0x5d91cf(0x369)][_0x5d91cf(0x240)](async()=>{const _0x119b7f=_0x5d91cf;_0x235516[_0x119b7f(0x2eb)]===_0x119b7f(0x2b9)&&this[_0x119b7f(0x291)](_0x119b7f(0x2b9));let _0xd4b288=this['_capture'][_0x119b7f(0x2a4)][_0x119b7f(0x2ba)],_0x18e3c0=P(await this['_executor'][_0x119b7f(0x2fa)](_0x235516['code'],_0x235516[_0x119b7f(0x2eb)]));return _0x235516[_0x119b7f(0x2eb)]===_0x119b7f(0x2a1)?{'state':this[_0x119b7f(0x242)](),'value':_0x18e3c0}:{'mutations':this[_0x119b7f(0x341)][_0x119b7f(0x209)](_0xd4b288),'state':this[_0x119b7f(0x242)](),'value':_0x18e3c0};});}[_0x1c125c(0x215)](_0x294c60){const _0x4ec849=_0x1c125c;return this['_rejectIfNotAccepting']()||this[_0x4ec849(0x369)][_0x4ec849(0x240)](async()=>{const _0x51cdc2=_0x4ec849;if(this['_assertMutableState'](_0x51cdc2(0x326)),this[_0x51cdc2(0x250)]!==null)throw new j(_0x51cdc2(0x2dd),'Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation');let _0x3a489e=me(_0x294c60),_0xb0945e=[...this[_0x51cdc2(0x341)][_0x51cdc2(0x2a4)]];this[_0x51cdc2(0x341)][_0x51cdc2(0x264)](_0x3a489e);let _0x26e275=this[_0x51cdc2(0x242)]();return{'pendingMutationCount':_0x3a489e['length'],'previousMutationCount':_0xb0945e[_0x51cdc2(0x2ba)],'state':_0x26e275};});}['exportUnitData'](){const _0x14391b=_0x1c125c;return this[_0x14391b(0x283)]()||this[_0x14391b(0x369)][_0x14391b(0x240)](async()=>V(this[_0x14391b(0x246)],this[_0x14391b(0x2bb)],this['unitType']));}[_0x1c125c(0x2fc)](){const _0x1b74d8=_0x1c125c;return this[_0x1b74d8(0x323)]?this[_0x1b74d8(0x323)]:(this[_0x1b74d8(0x1f6)]=!0x1,this[_0x1b74d8(0x323)]=this['_operations'][_0x1b74d8(0x240)](async()=>await this[_0x1b74d8(0x210)]()),this[_0x1b74d8(0x323)]);}async[_0x1c125c(0x210)](){const _0x46f04a=_0x1c125c;try{this[_0x46f04a(0x341)][_0x46f04a(0x261)](),await this[_0x46f04a(0x23c)][_0x46f04a(0x2fc)]();}finally{try{this[_0x46f04a(0x246)]['dispose']();}finally{this[_0x46f04a(0x270)]=!0x0;}}}[_0x1c125c(0x283)](){const _0x4c524a=_0x1c125c;return this[_0x4c524a(0x1f6)]?null:Promise[_0x4c524a(0x237)](new j(_0x4c524a(0x2fd),_0x4c524a(0x20a)));}[_0x1c125c(0x291)](_0x330a7f){const _0x4d60ed=_0x1c125c;if(this[_0x4d60ed(0x311)]!==null)throw new j(_0x4d60ed(0x2dd),_0x4d60ed(0x292)+_0x330a7f+_0x4d60ed(0x1f0));}};function U(_0x4a390e){const _0x1b4d79=_0x1c125c;return{'baseRevision':_0x4a390e[_0x1b4d79(0x1ef)],'mutationCount':_0x4a390e['mutations']['length'],'reqId':_0x4a390e['reqId'],'revision':0x0,'sid':_0x4a390e[_0x1b4d79(0x35d)]};}function _0x205e(_0x8e356c,_0x415eb5){_0x8e356c=_0x8e356c-0x1ee;const _0x3bd627=_0x3bd6();let _0x205e77=_0x3bd627[_0x8e356c];return _0x205e77;}function W(_0x3eefd5,_0x3b8eb0,_0x5e423e,_0x10c77c){return _0x533c3a({'baseRev':_0x10c77c,'memberID':'','mutations':[..._0x3eefd5],'revision':0x0,'type':_0x5e423e,'unitID':_0x3b8eb0,'userID':''})['mutations'];}function pe(_0x3053fb,_0x219213){const _0x28fa16=_0x1c125c;return _0x3053fb['unitID']===_0x219213[_0x28fa16(0x21a)]&&_0x3053fb[_0x28fa16(0x204)]===_0x219213['type']&&_0x3053fb[_0x28fa16(0x1ef)]===_0x219213[_0x28fa16(0x1ef)]&&_0x3053fb[_0x28fa16(0x34e)]===_0x219213['revision']&&_0x3053fb[_0x28fa16(0x35d)]===_0x219213['sid']&&_0x3053fb['reqId']===_0x219213[_0x28fa16(0x29b)]&&JSON[_0x28fa16(0x27c)](_0x3053fb['mutations'])===JSON[_0x28fa16(0x27c)](_0x219213[_0x28fa16(0x2f0)]);}function G(_0x1cf528,_0x431ce5){const _0x306b79=_0x1c125c;return _0x1cf528[_0x306b79(0x2ba)]===_0x431ce5[_0x306b79(0x2ba)]&&_0x1cf528['every']((_0x104d09,_0x4d8f5a)=>_0x104d09['id']===_0x431ce5[_0x4d8f5a]?.['id']&&_0x104d09[_0x306b79(0x302)]===_0x431ce5[_0x4d8f5a]?.[_0x306b79(0x302)]);}function me(_0x1fad32){const _0x58dc86=_0x1c125c;if(!Array[_0x58dc86(0x2b5)](_0x1fad32))throw new j('COLLABORATION_INVALID_INPUT',_0x58dc86(0x30f));return _0x1fad32[_0x58dc86(0x2e2)](_0x1d5c8b=>{const _0x11427c=_0x58dc86;if(!_0x1d5c8b||typeof _0x1d5c8b!=_0x11427c(0x2d4)||typeof _0x1d5c8b['id']!='string'||_0x1d5c8b['id'][_0x11427c(0x2ba)]===0x0||typeof _0x1d5c8b[_0x11427c(0x302)]!=_0x11427c(0x31c))throw new j('COLLABORATION_INVALID_INPUT',_0x11427c(0x32e));return{'data':_0x1d5c8b[_0x11427c(0x302)],'id':_0x1d5c8b['id']};});}var K=class extends _0xfcc3bd{[_0x1c125c(0x28b)];[_0x1c125c(0x314)];static [_0x1c125c(0x33e)]=_0x1c125c(0x256);constructor(_0x3cd7e6,_0x22c3e0){const _0x352d0c=_0x1c125c;super(),this[_0x352d0c(0x28b)]=_0x3cd7e6,this[_0x352d0c(0x314)]=_0x22c3e0;}['onStarting'](){const _0x59de1c=_0x1c125c;this[_0x59de1c(0x28b)]['snapshotServerService']!==void 0x0&&_0x3f6423(this[_0x59de1c(0x314)],[[_0x5264f8,{'useValue':this[_0x59de1c(0x28b)][_0x59de1c(0x364)]}]]),this['_config']['onStarting']({'commandService':this['_injector'][_0x59de1c(0x31e)](_0x1a2933),'compressMutationService':this[_0x59de1c(0x314)][_0x59de1c(0x31e)](_0x430ed9),'instanceService':this['_injector']['get'](_0x5d7beb),'injector':this[_0x59de1c(0x314)],'revisionService':this[_0x59de1c(0x314)][_0x59de1c(0x31e)](_0x486697),'transformService':this[_0x59de1c(0x314)][_0x59de1c(0x31e)](_0xdf6557)});}};K=_0x316c9f([_0x4fbdae(_0x55aba4),_0x277511(0x1,_0x55309b(_0x2314e0))],K);function he(_0x35e8b1,_0x50b887){const _0x4d4e28=_0x1c125c;let _0x4a4acf;if(_0x35e8b1[_0x4d4e28(0x2d7)](K,{'onStarting'(_0x1d0e18){_0x4a4acf=_0x1d0e18;},..._0x50b887===void 0x0?{}:{'snapshotServerService':_0x50b887}}),!_0x4a4acf)throw Error(_0x4d4e28(0x2f9));return _0x4a4acf;}async function ge(_0x3b1255,_0x160d5e,_0x54e5b2){const _0x10d323=_0x1c125c;let _0x5b4988=await _0x3b1255[_0x10d323(0x258)](0x0);if(_0x368375(_0x5b4988[_0x10d323(0x236)])){let _0xa2859f=_0x5b4988[_0x10d323(0x236)];throw new j(_0x10d323(0x29d),_0xa2859f?.['message']||_0x10d323(0x30e));}let _0x44d880=_0x5b4988['snapshot'];if(!_0x44d880)throw new j(_0x10d323(0x29d),_0x10d323(0x2a2));_e(_0x44d880,_0x160d5e,_0x54e5b2);try{switch(_0x54e5b2){case _0x13c60c[_0x10d323(0x2f3)]:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':await _0x3ad34b(_0x44d880,await q(_0x3b1255,_0x44d880)),'unitType':_0x54e5b2};case _0x13c60c['UNIVER_DOC']:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':_0xd2df7d(_0x44d880),'unitType':_0x54e5b2};case _0x13c60c[_0x10d323(0x33d)]:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':_0x72938(_0x44d880),'unitType':_0x54e5b2};case _0x13c60c['UNIVER_BASE']:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':await _0x3838dc(_0x44d880,await q(_0x3b1255,_0x44d880)),'unitType':_0x54e5b2};case _0x13c60c[_0x10d323(0x321)]:return{'changesets':_0x5b4988[_0x10d323(0x2d8)],'unitData':_0x93bace(_0x44d880),'unitType':_0x54e5b2};default:throw new j(_0x10d323(0x2dd),_0x10d323(0x348)+_0x54e5b2);}}catch(_0x58abde){throw _0x58abde instanceof j?_0x58abde:new j(_0x10d323(0x29d),_0x10d323(0x262),{'cause':_0x58abde});}}function _e(_0x557296,_0x5ca2e5,_0xb6bec8){const _0x5e4e4e=_0x1c125c;if(_0x557296[_0x5e4e4e(0x21a)]!==_0x5ca2e5||_0x557296[_0x5e4e4e(0x204)]!==_0xb6bec8)throw new j(_0x5e4e4e(0x29d),_0x5e4e4e(0x36e));if(!Number[_0x5e4e4e(0x205)](_0x557296[_0x5e4e4e(0x245)])||_0x557296[_0x5e4e4e(0x245)]<0x1)throw new j(_0x5e4e4e(0x29d),_0x5e4e4e(0x26e));}async function q(_0x15e987,_0x472bad){const _0x5a12ab=_0x1c125c;let _0x4df9d6=_0x472bad[_0x5a12ab(0x2a3)];if(!_0x4df9d6)throw new j(_0x5a12ab(0x29d),_0x5a12ab(0x2a8));let _0x36c762=Object[_0x5a12ab(0x31d)](_0x4df9d6[_0x5a12ab(0x347)])[_0x5a12ab(0x22c)](({blocks:_0x3802a7})=>_0x3802a7);if(new Set(_0x36c762)['size']!==_0x36c762[_0x5a12ab(0x2ba)])throw new j(_0x5a12ab(0x29d),_0x5a12ab(0x2f1));return await Promise[_0x5a12ab(0x322)](_0x36c762[_0x5a12ab(0x2e2)](async _0x209d9c=>{const _0x5428cc=_0x5a12ab;let _0x3ce35c=await _0x15e987[_0x5428cc(0x243)](_0x209d9c);if(_0x368375(_0x3ce35c[_0x5428cc(0x236)])||!_0x3ce35c[_0x5428cc(0x325)])throw new j(_0x5428cc(0x29d),_0x3ce35c['error']?.[_0x5428cc(0x27e)]||_0x5428cc(0x2ae)+_0x209d9c+_0x5428cc(0x2c3));if(_0x3ce35c['block']['id']!==_0x209d9c)throw new j('COLLABORATION_LOAD_FAILED',_0x5428cc(0x2ae)+_0x209d9c+'\x20returned\x20a\x20different\x20block\x20identity');return _0x3ce35c[_0x5428cc(0x325)];}));}function ve(_0x1eb420){const _0x11ed99=_0x1c125c;let _0x42b174=_0x1eb420[_0x11ed99(0x2a6)]??0xa00000;if(!Number[_0x11ed99(0x205)](_0x42b174)||_0x42b174<=0x0)throw new j(_0x11ed99(0x2dd),_0x11ed99(0x249));return{async 'load'(_0x2d5457,_0x1b6122){const _0x236398=_0x11ed99;be(_0x2d5457,_0x1b6122);let _0x4478fd,_0x105ca1={'unitId':_0x2d5457,'unitType':_0x1b6122},_0x5205f5={'unitId':_0x2d5457,'unitType':_0x1b6122,..._0x1eb420['snapshotServerService']===void 0x0?{}:{'resolveSnapshotService':()=>{const _0xa8417a=_0x205e;if(_0x4478fd===void 0x0)throw new j(_0xa8417a(0x29d),_0xa8417a(0x289));return _0x4478fd;}}},_0x47f4c9;try{_0x47f4c9=await _0x1eb420['backend'][_0x236398(0x238)](_0x105ca1);}catch(_0x3c3ef3){throw new j(_0x236398(0x2c9),_0x236398(0x35f),{'cause':_0x3c3ef3,'retryable':!0x0});}let _0x2c2876;try{_0x2c2876=await _0x1eb420[_0x236398(0x1f8)](_0x5205f5);let _0x2fc080=he(_0x2c2876,_0x1eb420[_0x236398(0x364)]);_0x1eb420[_0x236398(0x364)]!==void 0x0&&(_0x4478fd=_0x2fc080[_0x236398(0x257)]['get'](_0x3a88f9));let _0x386eda=await xe(_0x47f4c9,_0x2d5457,_0x1b6122);Se(_0x386eda,_0x105ca1),Ce(_0x2c2876,_0x386eda);let _0x4fc88d=B(_0x2fc080,_0x2d5457,_0x1b6122,J(_0x386eda[_0x236398(0x254)]),_0x386eda['changesets']),_0x190111=await _0x47f4c9['fetchChangesets'](_0x4fc88d,void 0x0);if(_0x368375(_0x190111[_0x236398(0x236)])){let _0x570060=_0x190111['error'];throw new j(_0x236398(0x2c9),_0x570060?.[_0x236398(0x27e)]||_0x236398(0x2b1),{'retryable':!0x0});}let _0x4127cc=R(_0x190111[_0x236398(0x2d8)],_0x2d5457,_0x1b6122,_0x4fc88d),_0x1be2b9=_0x4127cc['at'](-0x1)?.[_0x236398(0x34e)]??_0x4fc88d;if(_0x190111[_0x236398(0x2ab)]!==void 0x0&&_0x190111[_0x236398(0x2ab)]!==_0x1be2b9)throw new j(_0x236398(0x1fd),_0x236398(0x22d));return _0x4fc88d=B(_0x2fc080,_0x2d5457,_0x1b6122,_0x4fc88d,_0x4127cc),await ye(_0x2fc080),new fe(_0x2d5457,_0x1b6122,_0x4fc88d,_0x47f4c9,_0x2c2876,_0x2fc080,_0x42b174);}catch(_0x4b51fe){try{await _0x47f4c9[_0x236398(0x2fc)]();}catch{}try{_0x2c2876?.[_0x236398(0x261)]();}catch{}throw _0x4b51fe instanceof j?_0x4b51fe:new j(_0x236398(0x29d),'Failed\x20to\x20create\x20the\x20collaboration\x20runtime',{'cause':_0x4b51fe});}}};}async function ye(_0xcca90f){const _0x16a34a=_0x1c125c;_0xcca90f[_0x16a34a(0x257)][_0x16a34a(0x306)](_0x1b53cc)&&await _0xcca90f[_0x16a34a(0x257)][_0x16a34a(0x31e)](_0x1b53cc)[_0x16a34a(0x299)]();}function be(_0x50073f,_0x43aa9f){const _0xec45ab=_0x1c125c;if(_0x50073f[_0xec45ab(0x224)]()[_0xec45ab(0x2ba)]===0x0)throw new j('COLLABORATION_INVALID_INPUT',_0xec45ab(0x2cb));if(_0x43aa9f!==_0x13c60c[_0xec45ab(0x2f3)]&&_0x43aa9f!==_0x13c60c[_0xec45ab(0x2f8)]&&_0x43aa9f!==_0x13c60c['UNIVER_SLIDE']&&_0x43aa9f!==_0x13c60c[_0xec45ab(0x35b)]&&_0x43aa9f!==_0x13c60c[_0xec45ab(0x321)])throw new j('COLLABORATION_INVALID_INPUT',_0xec45ab(0x348)+_0x43aa9f);}async function xe(_0x2f070d,_0x13d26d,_0x8498d1){const _0x2e546d=_0x1c125c;return _0x2f070d[_0x2e546d(0x294)]===_0x2e546d(0x227)?await _0x2f070d[_0x2e546d(0x315)]():await ge(_0x2f070d,_0x13d26d,_0x8498d1);}function Se(_0x26d906,_0x5c699d){const _0x41a519=_0x1c125c;if(_0x26d906[_0x41a519(0x2ce)]!==_0x5c699d['unitType'])throw new j(_0x41a519(0x29d),_0x41a519(0x28a));if(_0x26d906[_0x41a519(0x254)]['id']!==_0x5c699d['unitId'])throw new j('COLLABORATION_LOAD_FAILED',_0x41a519(0x1fa));J(_0x26d906['unitData']);}function J(_0x1d24bd){const _0x53230a=_0x1c125c;let _0x31d7e1=_0x1d24bd[_0x53230a(0x245)];if(!Number[_0x53230a(0x205)](_0x31d7e1)||_0x31d7e1===void 0x0||_0x31d7e1<0x1)throw new j('COLLABORATION_LOAD_FAILED',_0x53230a(0x233));return _0x31d7e1;}function Ce(_0x27ec6c,_0x47460b){const _0xfe5a70=_0x1c125c;switch(_0x47460b[_0xfe5a70(0x2ce)]){case _0x13c60c['UNIVER_SHEET']:_0x27ec6c[_0xfe5a70(0x2d3)](_0x47460b[_0xfe5a70(0x2ce)],structuredClone(_0x47460b[_0xfe5a70(0x254)]));return;case _0x13c60c[_0xfe5a70(0x2f8)]:_0x27ec6c[_0xfe5a70(0x2d3)](_0x47460b[_0xfe5a70(0x2ce)],structuredClone(_0x47460b[_0xfe5a70(0x254)]));return;case _0x13c60c[_0xfe5a70(0x33d)]:_0x27ec6c[_0xfe5a70(0x2d3)](_0x47460b[_0xfe5a70(0x2ce)],structuredClone(_0x47460b['unitData']));return;case _0x13c60c[_0xfe5a70(0x35b)]:_0x27ec6c['createUnit'](_0x47460b['unitType'],structuredClone(_0x47460b[_0xfe5a70(0x254)]));return;case _0x13c60c['UNIVER_BOARD']:_0x27ec6c[_0xfe5a70(0x2d3)](_0x47460b[_0xfe5a70(0x2ce)],structuredClone(_0x47460b[_0xfe5a70(0x254)]));return;}}var we=class{[_0x1c125c(0x28b)];[_0x1c125c(0x320)];[_0x1c125c(0x268)];['format']=_0x1c125c(0x211);constructor(_0x462923,_0x5d46f4,_0x710b37){const _0x442ba5=_0x1c125c;this[_0x442ba5(0x28b)]=_0x462923,this[_0x442ba5(0x320)]=_0x5d46f4,this[_0x442ba5(0x268)]=_0x710b37;}[_0x1c125c(0x2da)](){const _0xe458ab=_0x1c125c;return this[_0xe458ab(0x268)][_0xe458ab(0x2da)]();}async[_0x1c125c(0x258)](_0x42c6e0=0x0){const _0x5f0a35=_0x1c125c;let _0x4bdd21=X(this['_config'][_0x5f0a35(0x301)],this['_target'][_0x5f0a35(0x2ce)],_0x5f0a35(0x305),this[_0x5f0a35(0x320)][_0x5f0a35(0x2bb)],_0x5f0a35(0x245),_0x42c6e0),_0x50bbf8=await Y(this[_0x5f0a35(0x28b)],_0x4bdd21);return Te(_0x50bbf8[_0x5f0a35(0x211)]),_0x50bbf8;}async['getSheetBlock'](_0x72459f){const _0x405da8=_0x1c125c;let _0x766c40=X(this[_0x405da8(0x28b)][_0x405da8(0x301)],this[_0x405da8(0x320)][_0x405da8(0x2ce)],_0x405da8(0x305),this[_0x405da8(0x320)][_0x405da8(0x2bb)],_0x405da8(0x325),_0x72459f),_0x1d92ac=await Y(this[_0x405da8(0x28b)],_0x766c40);return _0x1d92ac[_0x405da8(0x325)]&&typeof _0x1d92ac[_0x405da8(0x325)][_0x405da8(0x302)]=='string'&&(_0x1d92ac[_0x405da8(0x325)][_0x405da8(0x302)]=Z(_0x1d92ac[_0x405da8(0x325)][_0x405da8(0x302)])),_0x1d92ac;}async['fetchChangesets'](_0x2d2e17,_0x3cb34b=0x0){const _0x3998a2=_0x1c125c;let _0x1884ee=X(this['_config'][_0x3998a2(0x301)],this[_0x3998a2(0x320)][_0x3998a2(0x2ce)],_0x3998a2(0x305),this[_0x3998a2(0x320)][_0x3998a2(0x2bb)],_0x3998a2(0x2ea));_0x1884ee[_0x3998a2(0x2ec)][_0x3998a2(0x21f)](_0x3998a2(0x2ac),String(_0x2d2e17)),_0x1884ee[_0x3998a2(0x2ec)]['set']('to',String(_0x3cb34b));let _0x1bd8a6=await Y(this['_config'],_0x1884ee);return this[_0x3998a2(0x268)][_0x3998a2(0x34d)](),_0x1bd8a6;}async[_0x1c125c(0x265)](_0xcf3d5e){const _0x101bbc=_0x1c125c;await this[_0x101bbc(0x268)]['ensureOnline']();let _0x4d1ba4=this[_0x101bbc(0x268)][_0x101bbc(0x2bf)](_0xcf3d5e[_0x101bbc(0x35d)],_0xcf3d5e[_0x101bbc(0x29b)]),_0x5d9ddc={..._0xcf3d5e,'memberID':this[_0x101bbc(0x268)][_0x101bbc(0x2e7)],'revision':0x0,'type':this[_0x101bbc(0x320)][_0x101bbc(0x2ce)],'unitID':this[_0x101bbc(0x320)][_0x101bbc(0x2bb)],'userID':''},_0xb9d70b=X(this[_0x101bbc(0x28b)][_0x101bbc(0x28c)],this[_0x101bbc(0x320)][_0x101bbc(0x2ce)],_0x101bbc(0x305),this['_target'][_0x101bbc(0x2bb)],_0x101bbc(0x259)),_0x92b2af=this[_0x101bbc(0x28b)][_0x101bbc(0x282)](_0xb9d70b,{'body':JSON[_0x101bbc(0x27c)]({'changeset':_0x5d9ddc,'memberID':this[_0x101bbc(0x268)][_0x101bbc(0x2e7)],'type':this[_0x101bbc(0x320)]['unitType'],'unitID':this[_0x101bbc(0x320)]['unitId']}),'headers':{'content-type':_0x101bbc(0x247)},'method':_0x101bbc(0x202)})[_0x101bbc(0x2df)](async _0x2cb285=>_0x2cb285[_0x101bbc(0x351)]===0x191||_0x2cb285['status']===0x193?_0x101bbc(0x34b):_0x2cb285[_0x101bbc(0x351)]===0x190||_0x2cb285[_0x101bbc(0x351)]===0x199?_0x101bbc(0x2a5):_0x2cb285['ok']?'accepted':'unknown')[_0x101bbc(0x286)](()=>_0x101bbc(0x2fe)),_0x181fc1=Ee(this[_0x101bbc(0x28b)]['commitTimeoutMs']),_0x590baa=_0x92b2af[_0x101bbc(0x2df)](_0x255b77=>_0x255b77==='permission'?{'status':'permission-rejected'}:_0x255b77===_0x101bbc(0x2a5)?{'status':'changeset-rejected'}:new Promise(()=>void 0x0)),_0x1f0f33=await Promise['race']([_0x4d1ba4['promise'],_0x590baa,_0x181fc1[_0x101bbc(0x34c)]['then'](()=>({'status':_0x101bbc(0x293)}))])['finally'](()=>{const _0xdf6a29=_0x101bbc;_0x4d1ba4[_0xdf6a29(0x232)](),_0x181fc1[_0xdf6a29(0x232)]();});if(_0x1f0f33[_0x101bbc(0x351)]===_0x101bbc(0x293)){let _0x5f30f0=await _0x92b2af;return _0x5f30f0===_0x101bbc(0x34b)?{'message':_0x101bbc(0x2ad),'reason':_0x101bbc(0x229),'status':_0x101bbc(0x2cd)}:_0x5f30f0===_0x101bbc(0x2a5)?{'message':_0x101bbc(0x29f),'reason':_0x101bbc(0x1f4),'status':_0x101bbc(0x2cd)}:{'status':'unknown'};}if(_0x1f0f33[_0x101bbc(0x351)]===_0x101bbc(0x2a7))return{'status':_0x101bbc(0x2fe)};if(_0x1f0f33[_0x101bbc(0x351)]===_0x101bbc(0x32a))return{'status':_0x101bbc(0x32a)};if(_0x1f0f33[_0x101bbc(0x351)]==='permission-rejected')return{'message':_0x101bbc(0x2ad),'reason':_0x101bbc(0x229),'status':_0x101bbc(0x2cd)};if(_0x1f0f33[_0x101bbc(0x351)]===_0x101bbc(0x280)){let _0x331be9=await this[_0x101bbc(0x308)](_0xcf3d5e[_0x101bbc(0x1ef)],_0xcf3d5e[_0x101bbc(0x1ef)]);return{'message':_0x101bbc(0x29f),'reason':_0x331be9['latestRevision']!==void 0x0&&_0x331be9[_0x101bbc(0x2ab)]<_0xcf3d5e[_0x101bbc(0x1ef)]?'invalid-revision':_0x101bbc(0x1f4),'status':_0x101bbc(0x2cd)};}let _0x1d5898=_0x1f0f33[_0x101bbc(0x2c7)],_0x4fe65a=await this[_0x101bbc(0x308)](_0xcf3d5e[_0x101bbc(0x1ef)],_0x1d5898[_0x101bbc(0x34e)]-0x1);if(_0x368375(_0x4fe65a[_0x101bbc(0x236)])){let _0x41237f=_0x4fe65a[_0x101bbc(0x236)];throw new j(_0x101bbc(0x2c9),_0x41237f?.[_0x101bbc(0x27e)]||_0x101bbc(0x2db),{'retryable':!0x0});}return{'acceptedChangeset':_0x1d5898,'precedingChangesets':_0x4fe65a[_0x101bbc(0x2d8)],'status':'confirmed'};}async[_0x1c125c(0x2fc)](){const _0x508a19=_0x1c125c;await this[_0x508a19(0x268)]['close']();}};async function Y(_0x2a910b,_0x5e0980){const _0x339a24=_0x1c125c;let _0x1f44d6;try{_0x1f44d6=await _0x2a910b[_0x339a24(0x282)](_0x5e0980,{'method':_0x339a24(0x218)});}catch(_0x153906){throw new j(_0x339a24(0x2c9),_0x339a24(0x354),{'cause':_0x153906,'retryable':!0x0});}if(!_0x1f44d6['ok'])throw new j(_0x339a24(0x2c9),'Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20'+_0x1f44d6[_0x339a24(0x351)],{'retryable':_0x1f44d6[_0x339a24(0x351)]>=0x1f4});try{return await _0x1f44d6[_0x339a24(0x2e8)]();}catch(_0x2140c3){throw new j(_0x339a24(0x1fd),_0x339a24(0x36d),{'cause':_0x2140c3});}}function X(_0x5abf05,..._0xbf6f9b){const _0x4a2b04=_0x1c125c;let _0x578650=new URL(_0x5abf05);return _0x578650['pathname']=_0x578650[_0x4a2b04(0x284)]['replace'](/\/$/,'')+'/'+_0xbf6f9b[_0x4a2b04(0x2e2)](_0x83555=>encodeURIComponent(String(_0x83555)))[_0x4a2b04(0x25b)]('/'),_0x578650;}function Te(_0xb2ee6c){const _0x405585=_0x1c125c;if(!_0xb2ee6c)return;let _0x1c76a8=[_0xb2ee6c[_0x405585(0x2a3)],_0xb2ee6c[_0x405585(0x25e)],_0xb2ee6c[_0x405585(0x2ed)],_0xb2ee6c[_0x405585(0x334)]];for(let _0x5d2ee6 of _0x1c76a8)_0x5d2ee6&&typeof _0x5d2ee6['originalMeta']==_0x405585(0x31c)&&(_0x5d2ee6[_0x405585(0x21c)]=Z(_0x5d2ee6[_0x405585(0x21c)]));if(_0xb2ee6c[_0x405585(0x2a3)]){for(let _0x4c2a48 of Object[_0x405585(0x31d)](_0xb2ee6c[_0x405585(0x2a3)][_0x405585(0x1ee)]))typeof _0x4c2a48['originalMeta']==_0x405585(0x31c)&&(_0x4c2a48['originalMeta']=Z(_0x4c2a48[_0x405585(0x21c)]));}}function Z(_0x221ee4){const _0x21bc3a=_0x1c125c;return Uint8Array[_0x21bc3a(0x2ac)](Buffer[_0x21bc3a(0x2ac)](_0x221ee4,'base64'));}function Ee(_0x6f29c3){let _0x4e8bf1;return{'cancel':()=>{_0x4e8bf1!==void 0x0&&clearTimeout(_0x4e8bf1);},'promise':new Promise(_0x348001=>{_0x4e8bf1=setTimeout(_0x348001,_0x6f29c3);})};}var De=class{[_0x1c125c(0x28b)];[_0x1c125c(0x2ca)]='offline';[_0x1c125c(0x24b)];['_connectPromise'];[_0x1c125c(0x2ef)]='';[_0x1c125c(0x2e3)]=new Map();[_0x1c125c(0x2b2)]=new Map();['_submissionWaiters']=new Map();[_0x1c125c(0x361)]=new Map();[_0x1c125c(0x225)];['_reconnectTimer'];[_0x1c125c(0x25a)]=0x0;constructor(_0x27850c){this['_config']=_0x27850c;}async[_0x1c125c(0x2d0)](_0x42e5c0){const _0x302ef1=_0x1c125c;let _0x2a147b=this[_0x302ef1(0x2e3)]['get'](_0x42e5c0[_0x302ef1(0x2bb)]);if(_0x2a147b&&_0x2a147b[_0x302ef1(0x2af)][_0x302ef1(0x2ce)]!==_0x42e5c0[_0x302ef1(0x2ce)])throw new j(_0x302ef1(0x2dd),_0x302ef1(0x275));if(await this[_0x302ef1(0x2c5)](),_0x2a147b)_0x2a147b['leases']+=0x1;else{try{await this['_join'](_0x42e5c0);}catch(_0x18455a){throw this[_0x302ef1(0x2e3)]['size']===0x0&&(this['_state']=_0x302ef1(0x2a7),this['_stopHeartbeat'](),this[_0x302ef1(0x24b)]?.['close'](0x3e8,'Initial\x20Unit\x20JOIN\x20failed'),this[_0x302ef1(0x24b)]=void 0x0,this[_0x302ef1(0x2ef)]=''),_0x18455a;}this[_0x302ef1(0x2e3)][_0x302ef1(0x21f)](_0x42e5c0['unitId'],{'leases':0x1,'target':_0x42e5c0});}let _0x29563a=!0x1,_0x1f0a7f=()=>this[_0x302ef1(0x2ef)],_0x2985cf=new Set();return{'close':async()=>{const _0x21361b=_0x302ef1;if(!_0x29563a){_0x29563a=!0x0;for(let _0x3f22ff of _0x2985cf)_0x3f22ff[_0x21361b(0x232)]();_0x2985cf[_0x21361b(0x1f3)](),await this[_0x21361b(0x2f5)](_0x42e5c0[_0x21361b(0x2bb)]);}},'ensureOnline':async()=>await this['_ensureConnected'](),'getConnectionState':()=>_0x29563a?_0x302ef1(0x2a7):this[_0x302ef1(0x2ca)],get 'memberId'(){return _0x1f0a7f();},'takeInboundChangesets':()=>{const _0x936094=_0x302ef1;let _0x57ea35=this[_0x936094(0x361)][_0x936094(0x31e)](_0x42e5c0['unitId'])??[];return this[_0x936094(0x361)]['delete'](_0x42e5c0['unitId']),_0x57ea35;},'waitForSubmission':(_0x4a45be,_0x235d72)=>{const _0x22da84=_0x302ef1;let _0x2d209b=this[_0x22da84(0x269)](_0x4a45be,_0x235d72);return _0x2985cf[_0x22da84(0x32c)](_0x2d209b),_0x2d209b[_0x22da84(0x34c)][_0x22da84(0x2df)](()=>_0x2985cf['delete'](_0x2d209b),()=>_0x2985cf[_0x22da84(0x313)](_0x2d209b)),{'cancel':()=>{_0x2985cf['delete'](_0x2d209b),_0x2d209b['cancel']();},'promise':_0x2d209b[_0x22da84(0x34c)]};}};}async[_0x1c125c(0x2c5)](){const _0xf4256=_0x1c125c;if(this[_0xf4256(0x2ca)]!==_0xf4256(0x316)||this[_0xf4256(0x24b)]?.[_0xf4256(0x332)]!==WebSocket[_0xf4256(0x349)]){this[_0xf4256(0x2d9)]!==void 0x0&&clearTimeout(this['_reconnectTimer']),this[_0xf4256(0x2d9)]=void 0x0,this[_0xf4256(0x24a)]??=this[_0xf4256(0x2d5)]();try{await this[_0xf4256(0x24a)];}finally{this[_0xf4256(0x24a)]=void 0x0;}}}async[_0x1c125c(0x2d5)](){const _0x139232=_0x1c125c;this[_0x139232(0x2ca)]='reconnecting';let _0x4b693f=await this[_0x139232(0x28b)][_0x139232(0x282)](this[_0x139232(0x28b)][_0x139232(0x2a9)],{'headers':{'content-type':_0x139232(0x247)},'method':_0x139232(0x218)});if(!_0x4b693f['ok'])throw this[_0x139232(0x2ca)]=_0x139232(0x355),new j(_0x139232(0x2c9),_0x139232(0x23f)+_0x4b693f[_0x139232(0x351)],{'retryable':_0x4b693f[_0x139232(0x351)]>=0x1f4});let _0x13f10d=await _0x4b693f['json']();if(typeof _0x13f10d[_0x139232(0x336)]!=_0x139232(0x31c)||_0x13f10d[_0x139232(0x336)][_0x139232(0x2ba)]===0x0)throw this[_0x139232(0x2ca)]=_0x139232(0x355),new j(_0x139232(0x1fd),'Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket');let _0x7a543=new URL(this[_0x139232(0x28b)][_0x139232(0x255)]);_0x7a543[_0x139232(0x2ec)][_0x139232(0x21f)](_0x139232(0x2e5),_0x13f10d[_0x139232(0x336)]);let _0xf570a0=new WebSocket(_0x7a543);this['_socket']=_0xf570a0,_0xf570a0[_0x139232(0x2aa)]('message',_0x46264b=>this[_0x139232(0x30c)](_0x46264b)),_0xf570a0[_0x139232(0x2aa)](_0x139232(0x2fc),()=>{const _0x1e0a2a=_0x139232;this[_0x1e0a2a(0x24b)]===_0xf570a0&&(this[_0x1e0a2a(0x267)](),this['_failCommandWaiters'](new j(_0x1e0a2a(0x2c9),_0x1e0a2a(0x221),{'retryable':!0x0})),this[_0x1e0a2a(0x2ca)]=this['_joined'][_0x1e0a2a(0x274)]===0x0?'closed':_0x1e0a2a(0x1fb),this[_0x1e0a2a(0x2e3)][_0x1e0a2a(0x274)]>0x0&&this[_0x1e0a2a(0x345)]());}),await Oe(_0xf570a0);let _0x570b47=await this['_requestCommand'](_0x21f97d['HELLO'],'',{'cmd':_0x21f97d[_0x139232(0x337)],'routeKey':''});if(_0x570b47[_0x139232(0x1f5)]!==_0x434455['OK']||typeof _0x570b47[_0x139232(0x297)]?.[_0x139232(0x21e)]!=_0x139232(0x31c))throw _0xf570a0[_0x139232(0x2fc)](),new j(_0x139232(0x1fd),_0x139232(0x217));this[_0x139232(0x2ef)]=_0x570b47[_0x139232(0x297)][_0x139232(0x21e)],this[_0x139232(0x2ca)]='online';for(let {target:_0x2ae989}of this[_0x139232(0x2e3)]['values']())try{await this['_join'](_0x2ae989);}catch(_0xed686){throw _0xf570a0[_0x139232(0x2fc)](0x3f3,_0x139232(0x266)),_0xed686;}this[_0x139232(0x25a)]=0x0,this[_0x139232(0x2bd)]();}async[_0x1c125c(0x223)](_0x283fcc){const _0x3b5fb4=_0x1c125c;let _0x845d22=await this['_requestCommand'](_0x21f97d['JOIN'],_0x283fcc['unitId'],{'cmd':_0x21f97d[_0x3b5fb4(0x1fe)],'joinReq':{'rooms':[{'args':'','roomID':_0x283fcc[_0x3b5fb4(0x2bb)]}]},'routeKey':_0x283fcc['unitId']});if(_0x845d22[_0x3b5fb4(0x1f5)]!==_0x434455['OK'])throw new j('COLLABORATION_UNAVAILABLE',typeof _0x845d22['reason']==_0x3b5fb4(0x31c)?_0x845d22[_0x3b5fb4(0x2d2)]:_0x3b5fb4(0x2ee));}['_requestCommand'](_0x4e9235,_0x443134,_0x269d2c){const _0x18c612=_0x1c125c;let _0x25aaff=this[_0x18c612(0x24b)];if(!_0x25aaff||_0x25aaff['readyState']!==WebSocket[_0x18c612(0x349)])return Promise[_0x18c612(0x237)](new j('COLLABORATION_UNAVAILABLE',_0x18c612(0x228),{'retryable':!0x0}));let _0x3c8ecb=_0x4e9235+':'+_0x443134;return new Promise((_0x4d5ba4,_0xc0197e)=>{const _0x41c9e0=_0x18c612;if(this['_commandWaiters'][_0x41c9e0(0x306)](_0x3c8ecb)){_0xc0197e(new j(_0x41c9e0(0x1fd),'A\x20'+_0x4e9235+'\x20request\x20is\x20already\x20active\x20for\x20'+_0x443134));return;}let _0x2cc4ad=setTimeout(()=>{const _0x1bed5e=_0x41c9e0;this[_0x1bed5e(0x2b2)][_0x1bed5e(0x313)](_0x3c8ecb),_0xc0197e(new j(_0x1bed5e(0x2c9),_0x1bed5e(0x22a)+_0x4e9235,{'retryable':!0x0}));},0x7530);this[_0x41c9e0(0x2b2)][_0x41c9e0(0x21f)](_0x3c8ecb,{'reject':_0xc0197e,'resolve':_0x4d5ba4,'timer':_0x2cc4ad});try{_0x25aaff['send'](JSON[_0x41c9e0(0x27c)](_0x269d2c));}catch(_0x3bcef6){this[_0x41c9e0(0x2b2)][_0x41c9e0(0x313)](_0x3c8ecb),clearTimeout(_0x2cc4ad),_0xc0197e(new j(_0x41c9e0(0x2c9),_0x41c9e0(0x230),{'cause':_0x3bcef6,'retryable':!0x0}));}});}[_0x1c125c(0x30c)](_0x506cbd){const _0x5b53cc=_0x1c125c;if(typeof _0x506cbd[_0x5b53cc(0x302)]!='string')return;let _0x4e6ca6;try{_0x4e6ca6=JSON[_0x5b53cc(0x2e1)](_0x506cbd[_0x5b53cc(0x302)]);}catch{this[_0x5b53cc(0x24b)]?.[_0x5b53cc(0x2fc)](0x3eb,_0x5b53cc(0x362));return;}let _0x536907=typeof _0x4e6ca6[_0x5b53cc(0x28e)]==_0x5b53cc(0x31c)?_0x4e6ca6[_0x5b53cc(0x28e)]:'';if(_0x4e6ca6[_0x5b53cc(0x23e)]===_0x21f97d[_0x5b53cc(0x337)]||_0x4e6ca6[_0x5b53cc(0x23e)]===_0x21f97d[_0x5b53cc(0x1fe)]||_0x4e6ca6[_0x5b53cc(0x23e)]===_0x21f97d[_0x5b53cc(0x33a)]){let _0x453890=_0x4e6ca6[_0x5b53cc(0x23e)]+':'+_0x536907,_0x7df65b=this[_0x5b53cc(0x2b2)][_0x5b53cc(0x31e)](_0x453890);_0x7df65b&&(this[_0x5b53cc(0x2b2)]['delete'](_0x453890),clearTimeout(_0x7df65b['timer']),_0x7df65b[_0x5b53cc(0x2a0)](_0x4e6ca6));return;}_0x4e6ca6['cmd']!==_0x21f97d[_0x5b53cc(0x31f)]||!_0x4e6ca6['collaMsg']||this['_handleCollaborationEvent'](_0x536907,_0x4e6ca6[_0x5b53cc(0x32d)]);}[_0x1c125c(0x338)](_0x21587e,_0x206e86){const _0x30f050=_0x1c125c;let _0x56679a=_0x206e86[_0x30f050(0x22b)],_0x2bd38a=_0x56679a==='changeset_ack'?_0x30f050(0x2b6):_0x56679a===_0x30f050(0x219)?_0x30f050(0x22f):_0x56679a===_0x30f050(0x33c)?_0x30f050(0x330):_0x56679a===_0x30f050(0x207)?_0x30f050(0x2de):_0x56679a===_0x30f050(0x30d)?_0x30f050(0x300):void 0x0;if(!_0x2bd38a)return;let _0x5d1cbf=ke(_0x206e86[_0x2bd38a]);if(!_0x5d1cbf||_0x5d1cbf[_0x30f050(0x21a)]!==_0x21587e)return;if(_0x56679a===_0x30f050(0x30d)){let _0x34744b=this[_0x30f050(0x361)][_0x30f050(0x31e)](_0x21587e)??[];_0x34744b[_0x30f050(0x1f1)](_0x5d1cbf),this[_0x30f050(0x361)][_0x30f050(0x21f)](_0x21587e,_0x34744b);return;}let _0xea876=Q(_0x5d1cbf[_0x30f050(0x35d)],_0x5d1cbf[_0x30f050(0x29b)]),_0x23ab31=this[_0x30f050(0x343)]['get'](_0xea876);_0x23ab31&&_0x23ab31(_0x56679a===_0x30f050(0x1ff)?{'changeset':_0x5d1cbf,'status':_0x30f050(0x25f)}:_0x56679a===_0x30f050(0x33c)?{'status':'retry'}:_0x56679a===_0x30f050(0x207)?{'status':_0x30f050(0x32b)}:{'status':_0x30f050(0x280)});}['_waitForSubmission'](_0x424d03,_0x30779c){const _0x4c79c7=_0x1c125c;let _0x5566ff=Q(_0x424d03,_0x30779c);if(this[_0x4c79c7(0x343)][_0x4c79c7(0x306)](_0x5566ff))return{'cancel':()=>void 0x0,'promise':Promise[_0x4c79c7(0x237)](new j(_0x4c79c7(0x2dd),'The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight'))};let _0x56c23a=()=>void 0x0;return{'cancel':()=>_0x56c23a({'status':_0x4c79c7(0x2a7)}),'promise':new Promise(_0x45a8c2=>{const _0xac75d4=_0x4c79c7;_0x56c23a=_0xd72b89=>{const _0x4b3900=_0x205e;this[_0x4b3900(0x343)][_0x4b3900(0x313)](_0x5566ff)&&_0x45a8c2(_0xd72b89);},this[_0xac75d4(0x343)][_0xac75d4(0x21f)](_0x5566ff,_0x56c23a);})};}async['_release'](_0x47e180){const _0x1a31e8=_0x1c125c;let _0x267f0c=this['_joined'][_0x1a31e8(0x31e)](_0x47e180);_0x267f0c&&(--_0x267f0c[_0x1a31e8(0x2c2)],!(_0x267f0c[_0x1a31e8(0x2c2)]>0x0)&&(this[_0x1a31e8(0x2e3)][_0x1a31e8(0x313)](_0x47e180),this[_0x1a31e8(0x361)]['delete'](_0x47e180),this['_socket']?.[_0x1a31e8(0x332)]===WebSocket[_0x1a31e8(0x349)]&&this[_0x1a31e8(0x24b)][_0x1a31e8(0x36c)](JSON['stringify']({'cmd':_0x21f97d[_0x1a31e8(0x2d6)],'leaveReq':{'args':'','roomID':_0x47e180},'routeKey':_0x47e180})),this[_0x1a31e8(0x2e3)][_0x1a31e8(0x274)]===0x0&&(this[_0x1a31e8(0x2ca)]=_0x1a31e8(0x2a7),this[_0x1a31e8(0x2d9)]!==void 0x0&&clearTimeout(this[_0x1a31e8(0x2d9)]),this['_reconnectTimer']=void 0x0,this[_0x1a31e8(0x267)](),this[_0x1a31e8(0x24b)]?.[_0x1a31e8(0x2fc)](0x3e8,_0x1a31e8(0x22e)),this[_0x1a31e8(0x24b)]=void 0x0,this[_0x1a31e8(0x2ef)]='')));}['_scheduleReconnect'](){const _0x71d9b0=_0x1c125c;if(this[_0x71d9b0(0x2d9)]!==void 0x0||this[_0x71d9b0(0x25a)]>=0x3){this[_0x71d9b0(0x25a)]>=0x3&&(this[_0x71d9b0(0x2ca)]='offline');return;}let _0x18ac2d=Math[_0x71d9b0(0x36a)](0x3e8*0x2**this[_0x71d9b0(0x25a)],0x4e20);this[_0x71d9b0(0x25a)]+=0x1,this[_0x71d9b0(0x2d9)]=setTimeout(()=>{const _0x310596=_0x71d9b0;this['_reconnectTimer']=void 0x0,this[_0x310596(0x24a)]??=this[_0x310596(0x2d5)](),this['_connectPromise']['catch'](()=>this[_0x310596(0x345)]())[_0x310596(0x20d)](()=>{this['_connectPromise']=void 0x0;});},_0x18ac2d);}[_0x1c125c(0x2bd)](){const _0x56242c=_0x1c125c;this[_0x56242c(0x267)](),this[_0x56242c(0x225)]=setInterval(()=>{const _0x158eeb=_0x56242c;this[_0x158eeb(0x2ca)]==='online'&&this[_0x158eeb(0x2e0)](_0x21f97d[_0x158eeb(0x33a)],'',{'cmd':_0x21f97d[_0x158eeb(0x33a)],'routeKey':''})['catch'](()=>this['_socket']?.[_0x158eeb(0x2fc)](0x3f3,_0x158eeb(0x251)));},0x7530);}['_stopHeartbeat'](){const _0x56e796=_0x1c125c;this[_0x56e796(0x225)]!==void 0x0&&clearInterval(this['_heartbeat']),this['_heartbeat']=void 0x0;}['_failCommandWaiters'](_0xfebe40){const _0x2c9f23=_0x1c125c;for(let _0x599935 of this[_0x2c9f23(0x2b2)][_0x2c9f23(0x31d)]())clearTimeout(_0x599935['timer']),_0x599935[_0x2c9f23(0x237)](_0xfebe40);this['_commandWaiters']['clear']();}};function Oe(_0x2b24ca){return new Promise((_0x354d32,_0xc8eab6)=>{const _0x503030=_0x205e;let _0x4f2ce6=()=>{const _0x3d5973=_0x205e;clearTimeout(_0x591018),_0x2b24ca[_0x3d5973(0x2b4)](_0x3d5973(0x2fc),_0x48aa56),_0x2b24ca[_0x3d5973(0x2b4)](_0x3d5973(0x236),_0x502cf8),_0x2b24ca['removeEventListener']('open',_0x30ccdd);},_0x27e0aa=_0x1c220d=>{_0x4f2ce6(),_0xc8eab6(new j('COLLABORATION_UNAVAILABLE',_0x1c220d,{'retryable':!0x0}));},_0x48aa56=()=>_0x27e0aa('Collaboration\x20WebSocket\x20closed\x20before\x20opening'),_0x502cf8=()=>_0x27e0aa(_0x503030(0x226)),_0x30ccdd=()=>{_0x4f2ce6(),_0x354d32();},_0x591018=setTimeout(()=>{const _0x153331=_0x503030;_0x27e0aa(_0x153331(0x32f)),_0x2b24ca[_0x153331(0x2fc)](0x3e8,'Connection\x20timed\x20out');},0x7530);_0x2b24ca[_0x503030(0x2aa)](_0x503030(0x2fc),_0x48aa56,{'once':!0x0}),_0x2b24ca[_0x503030(0x2aa)](_0x503030(0x236),_0x502cf8,{'once':!0x0}),_0x2b24ca[_0x503030(0x2aa)](_0x503030(0x238),_0x30ccdd,{'once':!0x0});});}function ke(_0x324ebd){const _0x5c68c8=_0x1c125c;if(!_0x324ebd||typeof _0x324ebd!=_0x5c68c8(0x2d4))return null;let _0x1e5266=_0x324ebd['cs'];return _0x1e5266&&typeof _0x1e5266==_0x5c68c8(0x2d4)?_0x1e5266:null;}function Q(_0x2bc875,_0x582b9b){return(_0x2bc875??'')+':'+(_0x582b9b??0x0);}var Ae=class{[_0x1c125c(0x28b)];['_connection'];constructor(_0x573e3f){const _0x20af1a=_0x1c125c;this[_0x20af1a(0x28b)]=je(_0x573e3f),this['_connection']=new De(this[_0x20af1a(0x28b)]);}async[_0x1c125c(0x238)](_0x592a21){const _0x49c4ce=_0x1c125c;let _0x5f1a52=await this['_connection'][_0x49c4ce(0x2d0)](_0x592a21);return new we(this[_0x49c4ce(0x28b)],_0x592a21,_0x5f1a52);}};function je(_0x540124){const _0xad6e2d=_0x1c125c;let _0xf7f56=$(_0x540124[_0xad6e2d(0x301)],'snapshotServerUrl',[_0xad6e2d(0x216),'https:']),_0x3f19d5=$(_0x540124[_0xad6e2d(0x28c)],'collabSubmitChangesetUrl',['http:','https:']),_0x1a1421=$(_0x540124[_0xad6e2d(0x255)],_0xad6e2d(0x255),['ws:','wss:',_0xad6e2d(0x216),_0xad6e2d(0x366)]);_0x1a1421[_0xad6e2d(0x2c6)]===_0xad6e2d(0x216)&&(_0x1a1421[_0xad6e2d(0x2c6)]=_0xad6e2d(0x353)),_0x1a1421[_0xad6e2d(0x2c6)]===_0xad6e2d(0x366)&&(_0x1a1421['protocol']=_0xad6e2d(0x31a));let _0x6140d7=$(_0x540124[_0xad6e2d(0x2a9)],'wsSessionTicketUrl',['http:',_0xad6e2d(0x366)]),_0x4759a0=_0x540124[_0xad6e2d(0x339)]??0x7530;if(!Number[_0xad6e2d(0x205)](_0x4759a0)||_0x4759a0<=0x0)throw new j(_0xad6e2d(0x2dd),_0xad6e2d(0x324));return{'collabSubmitChangesetUrl':_0x3f19d5,'collabWebSocketUrl':_0x1a1421,'commitTimeoutMs':_0x4759a0,'httpRequest':_0x540124[_0xad6e2d(0x282)]??globalThis[_0xad6e2d(0x26c)]['bind'](globalThis),'snapshotServerUrl':_0xf7f56,'wsSessionTicketUrl':_0x6140d7};}function $(_0x167278,_0x3876d9,_0xaac17){const _0x4d0545=_0x1c125c;let _0x38d7fd;try{_0x38d7fd=new URL(_0x167278);}catch{throw new j(_0x4d0545(0x2dd),_0x3876d9+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0xaac17['includes'](_0x38d7fd[_0x4d0545(0x2c6)]))throw new j(_0x4d0545(0x2dd),_0x3876d9+_0x4d0545(0x2c8));return _0x38d7fd;}function Me(_0x4205e7){return new Ae(_0x4205e7);}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.3",
|
|
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.3",
|
|
23
|
+
"@univerjs-pro/boards": "1.0.3",
|
|
24
|
+
"@univerjs-pro/collaboration": "1.0.3",
|
|
25
|
+
"@univerjs-pro/engine-formula": "1.0.3",
|
|
26
|
+
"@univerjs-pro/slides": "1.0.3",
|
|
27
|
+
"@univerjs/core": "1.0.3",
|
|
28
|
+
"@univerjs/docs": "1.0.3",
|
|
29
|
+
"@univerjs/engine-formula": "1.0.3",
|
|
30
|
+
"@univerjs/engine-render": "1.0.3",
|
|
31
|
+
"@univerjs/protocol": "1.0.3",
|
|
32
|
+
"@univerjs/sheets": "1.0.3"
|
|
33
33
|
}
|
|
34
34
|
}
|