@univer-cli/univer-collaboration-runtime 1.0.0-rc.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +12 -12
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- const _0x3d1750=_0x2899;(function(_0x50d3a1,_0x4a5209){const _0x1b17d9=_0x2899,_0x236288=_0x50d3a1();while(!![]){try{const _0xf2edee=-parseInt(_0x1b17d9(0x23f))/0x1*(parseInt(_0x1b17d9(0x166))/0x2)+parseInt(_0x1b17d9(0x240))/0x3*(-parseInt(_0x1b17d9(0x159))/0x4)+-parseInt(_0x1b17d9(0x15c))/0x5+-parseInt(_0x1b17d9(0x205))/0x6+-parseInt(_0x1b17d9(0x18a))/0x7+-parseInt(_0x1b17d9(0x237))/0x8*(-parseInt(_0x1b17d9(0x110))/0x9)+parseInt(_0x1b17d9(0x162))/0xa;if(_0xf2edee===_0x4a5209)break;else _0x236288['push'](_0x236288['shift']());}catch(_0x18c537){_0x236288['push'](_0x236288['shift']());}}}(_0x3d14,0x51d81));import{CommandType as _0x3428b1,DependentOn as _0x5418a4,ICommandService as _0x8f1c98,IUniverInstanceService as _0x399d02,Inject as _0x132537,Injector as _0x3f90a4,Plugin as _0x1d55c6,UniverInstanceType as _0x550821,registerDependencies as _0x5dfa11,sequenceExecute as _0xf7bb5f,toDisposable as _0x59fe24}from'@univerjs/core';import{CompressMutationService as _0x7d731a,ISnapshotServerService as _0x1915ff,ITransformService as _0x3b833a,RevertRevisionMutation as _0x3038df,RevisionService as _0x404d94,SnapshotService as _0x9d3c59,UniverCollaborationPlugin as _0x20bf45,isTransformMutationsSuccess as _0x5941e5,parseChangesetToProtocol as _0x1cd93e,parseMutationToProtocol as _0x2dcdf0,parseProtocolChangeset as _0x1575f4,transformSnapshotToBaseData as _0x2d6862,transformSnapshotToBoardData as _0x206dca,transformSnapshotToDocumentData as _0x13acb9,transformSnapshotToSlideData as _0xb2ce4a,transformSnapshotToWorkbookData as _0x13e39f}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x1ae1f2}from'@univerjs/engine-formula';import{CmdRspCode as _0x22ffe8,CombCmd as _0x526731,isError as _0x24cb5b}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x9eac81}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x297c2e,RichTextEditingMutation as _0x58b414}from'@univerjs/docs';import{IRenderManagerService as _0x11b6c3}from'@univerjs/engine-render';import{FUniver as _0x25264f}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 _0x9b6041 from'@oxc-project/runtime/helpers/decorateParam';import _0x53d4b2 from'@oxc-project/runtime/helpers/decorate';var j=class extends Error{[_0x3d1750(0x1b5)];[_0x3d1750(0x21e)];constructor(_0x2f1d31,_0x2b68fd,_0x38d5c5={}){const _0x36d269=_0x3d1750;super(_0x2b68fd,_0x38d5c5),this['name']='CollaborationRuntimeError',this[_0x36d269(0x1b5)]=_0x2f1d31,this[_0x36d269(0x21e)]=_0x38d5c5[_0x36d269(0x21e)]??!0x1;}},se=class{[_0x3d1750(0x227)];[_0x3d1750(0x256)];[_0x3d1750(0x1e2)]=[];['_disposables']=[];[_0x3d1750(0x14c)]=0x0;constructor(_0x489a03,_0xed8360,_0x3cee19){const _0x89e1f6=_0x3d1750;this[_0x89e1f6(0x227)]=_0x489a03,this[_0x89e1f6(0x256)]=_0xed8360,this[_0x89e1f6(0x10e)][_0x89e1f6(0x12b)](_0x489a03[_0x89e1f6(0x11d)]['onMutationExecutedForCollab']((_0x470813,_0x4ac3d1)=>{const _0x35d2f2=_0x89e1f6;this[_0x35d2f2(0x222)](_0x470813,_0x4ac3d1,_0x3cee19);})),_0x3cee19===_0x550821[_0x89e1f6(0x1c4)]&&(_0x489a03[_0x89e1f6(0x1c7)][_0x89e1f6(0x257)](_0x11b6c3),this['_subscribeToDocumentState']());}get['pending'](){const _0x2244d6=_0x3d1750;return this[_0x2244d6(0x1e2)];}[_0x3d1750(0x1c5)](_0x44cc96){const _0x106c9b=_0x3d1750;return this[_0x106c9b(0x1e2)]['slice'](_0x44cc96);}[_0x3d1750(0x1e8)](_0x35a810){const _0x2057ee=_0x3d1750;this[_0x2057ee(0x1e2)]['splice'](0x0,this[_0x2057ee(0x1e2)][_0x2057ee(0x171)],..._0x35a810);}[_0x3d1750(0xfe)](){const _0x9e122=_0x3d1750;return this[_0x9e122(0x1e2)][_0x9e122(0x24b)](0x0);}[_0x3d1750(0xe1)](_0x797e36){const _0x1975eb=_0x3d1750;this[_0x1975eb(0x1e2)][_0x1975eb(0x239)](..._0x797e36);}async['suppress'](_0x171c4e){const _0x2eb80d=_0x3d1750;this[_0x2eb80d(0x14c)]+=0x1;try{return await _0x171c4e();}finally{--this[_0x2eb80d(0x14c)];}}[_0x3d1750(0x1c1)](){for(let _0x2f3f99 of this['_disposables']['splice'](0x0))_0x2f3f99['dispose']();}['_captureCommandMutation'](_0x5106ca,_0x4693e4,_0x4cec3d){const _0xe800dd=_0x3d1750;if(this[_0xe800dd(0x14c)]>0x0||_0x5106ca[_0xe800dd(0x178)]!==_0x3428b1[_0xe800dd(0x217)]||_0x4693e4?.[_0xe800dd(0xf6)]||_0x4693e4?.[_0xe800dd(0xea)]||_0x4693e4?.[_0xe800dd(0x148)])return;let _0x5eecf9=_0x5106ca[_0xe800dd(0x1fa)];if(_0x5eecf9?.['unitId']!==void 0x0&&_0x5eecf9['unitId']!==this[_0xe800dd(0x256)]){if(_0x5eecf9[_0xe800dd(0x111)]===_0x9eac81['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0xe800dd(0x192)+this[_0xe800dd(0x256)]+_0xe800dd(0x244)+_0x5106ca['id']+_0xe800dd(0x1ee)+String(_0x5eecf9[_0xe800dd(0xeb)]));}if(_0x5eecf9?.[_0xe800dd(0xeb)]===void 0x0||_0x4cec3d===_0x550821[_0xe800dd(0x1c4)]&&_0x5106ca['id']===_0x58b414['id'])return;if(_0x5106ca['id']===_0x3038df['id'])throw new j(_0xe800dd(0x1b1),_0xe800dd(0x1c6));let _0x4d197e=_0x5106ca,_0x245833=this[_0xe800dd(0x227)][_0xe800dd(0x1ca)][_0xe800dd(0x21c)][_0xe800dd(0x254)]()[_0xe800dd(0x1c3)],_0x4a7105=(this['_kernel']['compressMutationService'][_0xe800dd(0x21c)]['fetchThroughInterceptors'](_0x245833)([_0x4d197e],this[_0xe800dd(0x227)][_0xe800dd(0x248)])??[_0x4d197e])[0x0];_0x4a7105&&this[_0xe800dd(0x1e2)][_0xe800dd(0x12b)](_0x2dcdf0(_0x4a7105));}[_0x3d1750(0x1cd)](){const _0x1b16e4=_0x3d1750;let _0x24708f=this[_0x1b16e4(0x227)][_0x1b16e4(0x1c7)][_0x1b16e4(0x257)](_0x297c2e)['docStateChange$'][_0x1b16e4(0x229)](_0x1f7f03=>{const _0x38117d=_0x1b16e4;if(this[_0x38117d(0x14c)]>0x0||_0x1f7f03?.[_0x38117d(0xeb)]!==this['_unitId'])return;let _0x406acc={'id':_0x1f7f03['commandId'],'params':{'actions':_0x1f7f03[_0x38117d(0x1ba)]['actions'],'textRanges':null,'unitId':_0x1f7f03[_0x38117d(0xeb)]},'type':_0x3428b1[_0x38117d(0x217)]};this[_0x38117d(0x1e2)][_0x38117d(0x12b)](_0x2dcdf0(_0x406acc));});this['_disposables'][_0x1b16e4(0x12b)](_0x59fe24(()=>_0x24708f[_0x1b16e4(0x1a9)]()));}},ce=new Set(['formula.mutation.set-trigger-formula-calculation-start',_0x3d1750(0x1a0),_0x3d1750(0x1f5),'formula.mutation.set-calculation-result','formula.mutation.set-array-formula-data',_0x3d1750(0x1a5),_0x3d1750(0x214)]),le=new Set(['createBase',_0x3d1750(0xfb),'createWorkbook',_0x3d1750(0x1f7),_0x3d1750(0x1b3),'createUniverSheet',_0x3d1750(0x145)]);function ue(_0x6d93a9,_0x2947eb,_0x240874){const _0x4d5b1e=_0x3d1750;let _0x4fa8f1=_0x25264f[_0x4d5b1e(0x17e)](_0x6d93a9);return{async 'execute'(_0x56efb7,_0x240642){const _0x39f147=_0x4d5b1e;if(_0x56efb7[_0x39f147(0x171)]>_0x240874)throw new j(_0x39f147(0x1b1),_0x39f147(0x11e)+_0x240874+_0x39f147(0x134));let _0x501925=_0x240642===_0x39f147(0x16e)?M(_0x4fa8f1):void 0x0,_0x5d96b7=de(_0x4fa8f1,_0x2947eb);try{return await Function(_0x39f147(0x1b4),_0x39f147(0x1af)+_0x56efb7+_0x39f147(0x1d1))(_0x5d96b7);}finally{_0x501925?.['dispose']();}}};}function _0x2899(_0x1f5451,_0x1de416){_0x1f5451=_0x1f5451-0xde;const _0x3d141f=_0x3d14();let _0x289944=_0x3d141f[_0x1f5451];return _0x289944;}function de(_0x562f2a,_0x4af196){return new Proxy(_0x562f2a,{'get'(_0xab1151,_0x218a7f,_0x207d55){const _0x4324c5=_0x2899;return le['has'](_0x218a7f)?()=>{const _0x6859dd=_0x2899;throw new j(_0x6859dd(0x1b1),_0x6859dd(0x103)+_0x4af196+'\x20cannot\x20call\x20'+String(_0x218a7f));}:Reflect[_0x4324c5(0x257)](_0xab1151,_0x218a7f,_0x207d55);}});}function M(_0x43d8e4){const _0x15bf45=_0x3d1750;return _0x43d8e4['addEvent'](_0x43d8e4[_0x15bf45(0x242)]['BeforeCommandExecute'],_0x4a136f=>{const _0x2c16fc=_0x15bf45;let _0x14ce9e=_0x4a136f;if(N(_0x14ce9e))throw _0x14ce9e[_0x2c16fc(0x117)]=!0x0,new j(_0x2c16fc(0x1b1),_0x2c16fc(0x24a)+_0x14ce9e['id']);});}function N(_0x39a958){const _0x4825f0=_0x3d1750;return _0x39a958[_0x4825f0(0x178)]===_0x3428b1[_0x4825f0(0x149)]||_0x39a958[_0x4825f0(0x178)]===_0x3428b1[_0x4825f0(0x217)]&&!ce[_0x4825f0(0x224)](_0x39a958['id']);}function P(_0x23ebf7){const _0x1b8dd3=_0x3d1750;if(_0x23ebf7===void 0x0)return null;if(_0x23ebf7===null||typeof _0x23ebf7==_0x1b8dd3(0x1a4)||typeof _0x23ebf7==_0x1b8dd3(0x1eb))return _0x23ebf7;if(typeof _0x23ebf7==_0x1b8dd3(0x1ab)){if(Number[_0x1b8dd3(0x1d2)](_0x23ebf7))return _0x23ebf7;throw I();}if(Array[_0x1b8dd3(0x142)](_0x23ebf7))return _0x23ebf7['map'](P);if(F(_0x23ebf7))return Object[_0x1b8dd3(0xe4)](Object[_0x1b8dd3(0x157)](_0x23ebf7)[_0x1b8dd3(0x215)](([_0xf8ef53,_0x590204])=>[_0xf8ef53,P(_0x590204)]));throw I();}function F(_0x37300f){const _0x4f1eff=_0x3d1750;if(typeof _0x37300f!=_0x4f1eff(0x1c2)||!_0x37300f)return!0x1;let _0x2566a6=Object['getPrototypeOf'](_0x37300f);return _0x2566a6===Object['prototype']||_0x2566a6===null;}function I(){const _0xfb1006=_0x3d1750;return new j('COLLABORATION_INVALID_INPUT',_0xfb1006(0x1f6));}var L=class{[_0x3d1750(0x12a)]=Promise['resolve']();[_0x3d1750(0xf3)](_0x37882d){const _0x18fdd9=_0x3d1750;let _0x3aaf74=this[_0x18fdd9(0x12a)][_0x18fdd9(0x1e1)](_0x37882d,_0x37882d);return this[_0x18fdd9(0x12a)]=_0x3aaf74[_0x18fdd9(0x1e1)](()=>void 0x0,()=>void 0x0),_0x3aaf74;}};function R(_0x3948ae,_0x2f5331,_0x4a45fc,_0x23c571){const _0xa7fc05=_0x3d1750;if(!Array[_0xa7fc05(0x142)](_0x3948ae))throw new j(_0xa7fc05(0x23c),'Backend\x20changesets\x20must\x20be\x20an\x20array');let _0x1449d9=[..._0x3948ae]['sort']((_0x5b029c,_0x222f67)=>_0x5b029c[_0xa7fc05(0x1e9)]-_0x222f67[_0xa7fc05(0x1e9)]),_0x3b7fec=_0x23c571;for(let _0x42be85 of _0x1449d9){if(!_0x42be85||typeof _0x42be85!='object'||!Array[_0xa7fc05(0x142)](_0x42be85[_0xa7fc05(0x13a)])||_0x42be85[_0xa7fc05(0x13a)][_0xa7fc05(0x124)](_0x5261=>!_0x5261||typeof _0x5261!=_0xa7fc05(0x1c2)||!('id'in _0x5261)||typeof _0x5261['id']!=_0xa7fc05(0x1eb)||!('data'in _0x5261)||typeof _0x5261[_0xa7fc05(0x1be)]!=_0xa7fc05(0x1eb))||!Number[_0xa7fc05(0x1df)](_0x42be85['baseRev'])||!Number[_0xa7fc05(0x1df)](_0x42be85[_0xa7fc05(0x1e9)])||_0x42be85[_0xa7fc05(0x120)]!==_0x2f5331||_0x42be85['type']!==_0x4a45fc||_0x42be85[_0xa7fc05(0x246)]!==_0x3b7fec||_0x42be85['revision']!==_0x3b7fec+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0xa7fc05(0x114));_0x3b7fec=_0x42be85[_0xa7fc05(0x1e9)];}return _0x1449d9;}function z(_0x576fe8){const _0xbdfd9f=_0x3d1750;return{'baseRevision':_0x576fe8[_0xbdfd9f(0x246)],'mutationCount':_0x576fe8['mutations'][_0xbdfd9f(0x171)],'revision':_0x576fe8['revision'],..._0x576fe8[_0xbdfd9f(0x133)]===void 0x0?{}:{'sid':_0x576fe8[_0xbdfd9f(0x133)]},..._0x576fe8['reqId']===void 0x0?{}:{'reqId':_0x576fe8['reqId']}};}function B(_0x58837a,_0x5c75e3,_0x1ced97,_0x19ff1a,_0x56b8a5,_0x2a6c18=_0x3d1750(0x14f)){const _0x29fdd0=_0x3d1750;if(_0x56b8a5['some'](_0x5a3e53=>_0x5a3e53[_0x29fdd0(0x13a)][_0x29fdd0(0x124)](_0xe14974=>_0xe14974['id']===_0x3038df['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x29fdd0(0x139));let _0x191e2b=_0x19ff1a;for(let _0x4d0cc1 of _0x56b8a5){let _0x23cb51=_0x191e2b+0x1;if(_0x4d0cc1[_0x29fdd0(0x120)]!==_0x5c75e3||_0x4d0cc1[_0x29fdd0(0x178)]!==_0x1ced97||_0x4d0cc1['baseRev']!==_0x191e2b||_0x4d0cc1[_0x29fdd0(0x1e9)]!==_0x23cb51)throw new j(_0x29fdd0(0x23c),_0x29fdd0(0x18c));let _0x3f3483=_0x1575f4(_0x4d0cc1),_0x12714a=_0x58837a[_0x29fdd0(0x1ca)]['interceptor']['getInterceptPoints']()[_0x29fdd0(0x16a)],_0x38de1e=_0x58837a[_0x29fdd0(0x1ca)][_0x29fdd0(0x21c)]['fetchThroughInterceptors'](_0x12714a)(_0x3f3483[_0x29fdd0(0x13a)],null)??_0x3f3483[_0x29fdd0(0x13a)],_0x497fd1=_0xf7bb5f(_0x38de1e,_0x58837a[_0x29fdd0(0x11d)],_0x2a6c18===_0x29fdd0(0x14f)?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x497fd1[_0x29fdd0(0x23b)])throw new j(_0x29fdd0(0x20d),_0x29fdd0(0x1e7)+_0x497fd1[_0x29fdd0(0x24f)]+':\x20'+String(_0x497fd1[_0x29fdd0(0x19d)]));let _0x44e81b=_0x58837a[_0x29fdd0(0x108)]['incrementRevOfUnit'](_0x5c75e3);if(_0x44e81b!==_0x23cb51)throw new j(_0x29fdd0(0x23c),_0x29fdd0(0x13e));_0x191e2b=_0x44e81b;}return _0x191e2b;}function V(_0x2a2511,_0x30bb37,_0xad496e){const _0x1d8d32=_0x3d1750;let _0x3be994=_0x25264f[_0x1d8d32(0x17e)](_0x2a2511);switch(_0xad496e){case _0x550821['UNIVER_SHEET']:return H(_0x3be994[_0x1d8d32(0x100)](_0x30bb37)?.[_0x1d8d32(0x123)](),_0x30bb37);case _0x550821[_0x1d8d32(0x1c4)]:return H(_0x3be994[_0x1d8d32(0x1a3)](_0x30bb37)?.['save'](),_0x30bb37);case _0x550821[_0x1d8d32(0xed)]:return H(_0x3be994[_0x1d8d32(0x1d7)](_0x30bb37)?.[_0x1d8d32(0x123)](),_0x30bb37);case _0x550821[_0x1d8d32(0x183)]:return H(_0x3be994[_0x1d8d32(0x13b)](_0x30bb37)?.['save'](),_0x30bb37);case _0x550821[_0x1d8d32(0x164)]:return H(_0x3be994['getBoard'](_0x30bb37)?.[_0x1d8d32(0x123)](),_0x30bb37);default:throw new j(_0x1d8d32(0x1b1),'Unsupported\x20collaboration\x20Unit\x20type:\x20'+_0xad496e);}}function H(_0xb19c15,_0x47fe51){const _0x1e6113=_0x3d1750;if(_0xb19c15===void 0x0)throw new j(_0x1e6113(0x20d),'Unit\x20'+_0x47fe51+'\x20is\x20unavailable');return structuredClone(_0xb19c15);}function _0x3d14(){const _0x171c83=['Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','_baseRevision','csRejEvent','_config','clear','type','status','blockMeta','delete','max','format','newAPI','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','LEAVE','UNIVER_BASE','unitId\x20must\x20not\x20be\x20empty','_join','_heartbeat','reqId','mode','getConnectionState','4140899LixjGm','Backend\x20failed\x20to\x20fetch\x20changesets','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','pathname','replacePendingMutations','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','pending','Collaboration\x20WebSocket\x20closed','Runtime\x20for\x20','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','eventID','_univer','every','routeKey','addEventListener','unitType','getState','_lease','permission_rej','error','latestRevision','promise','formula.mutation.set-trigger-formula-calculation-stop','JOIN','stringify','getDocument','boolean','formula.mutation.set-formula-data','_validateAcceptedChangeset','size','_connection','unsubscribe','removeEventListener','number','changesets','reconnecting','\x20is\x20unavailable','return\x20(async\x20()\x20=>\x20{\x20','collabWebSocketUrl','COLLABORATION_INVALID_INPUT','collabSubmitChangesetUrl','createPresentation','univerAPI','code','awaiting-ack','changeset_should_retry','invalid','_waitForSubmission','redoState','reason','execute','getPendingMutations','data','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','closed','dispose','object','COMPRESS_MUTATION_SEND','UNIVER_DOC','snapshotFrom','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','injector','transform-failed','_capture','compressMutationService','COLLABORATION_UNAVAILABLE','OPEN','_subscribeToDocumentState','remote','_assertMutableState','write','\x20})();','isFinite','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot','commitTimeoutMs','online','confirmed','getPresentation','fetchmissing','protocol','UNIVER_SHEET','Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type','HEARTBEAT','cmd','from','isSafeInteger','_conflict','then','_pending','set','_release','Backend\x20returned\x20no\x20Unit\x20snapshot','Failed\x20to\x20fetch\x20preceding\x20changesets','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','replacePending','revision','_failCommandWaiters','string','registerPlugin','changeset_ack','\x20for\x20Unit\x20','_rejectIfNotAccepting','findIndex','Failed\x20to\x20open\x20the\x20collaboration\x20backend','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','Collaboration\x20HTTP\x20request\x20failed','_submissionWaiters','formula.mutation.set-trigger-formula-calculation','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','createDocument','_closePromise','acquire','params','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','Unsupported\x20collaboration\x20Unit\x20type:\x20','_connect','join','_handle','rev','_requestCommand','fetch','Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command','_executor','17580lrVGti','_memberId','changeset_rej','unit','awaitingMutations','submitChangeset','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','changeset-rejected','COLLABORATION_LOAD_FAILED','pulled','finally','_connectPromise','_reconnectAttempts','_nextReqId','readyState','sheet.mutation.send-init-pivot-text-local','map','http:','MUTATION','csAckEvent','transformMutations','changeset','all','interceptor','snapshotServerUrl','retryable','m2Prime','Snapshot\x20block\x20','Changeset\x20submission\x20was\x20rejected','_captureCommandMutation','close','has','_injector','pull-required','_kernel','transformService','subscribe','Collaboration\x20WebSocket\x20closed\x20before\x20opening','getUnitOnRev','retry','unknown','message','csShouldRetryEvent','rejected','_replayRemoteChangesets','replace','permissionRejEvent','suppress','board','application/json','16BtcJuN','_setTransformConflict','unshift','The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight','result','COLLABORATION_PROTOCOL_ERROR','_startHeartbeat','nothing-to-commit','647366ofxJRv','32784hqOFZy','HELLO','Event','onStarting','\x20cannot\x20capture\x20mutation\x20','trim','baseRev','open','instanceService','_closeAfterFatalError','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20','splice','offline','commit','wsSessionTicketUrl','index','Failed\x20to\x20join\x20Unit\x20room','_scheduleReconnect','conflict','_consumeBufferedPrecedingChangesets','getInterceptPoints','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','_unitId','get','min','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','prependPending','_knownHeadRevision','_closed','fromEntries','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','getSheetBlock','ticket','_fetchChangesets','RECV','fromChangeset','unitId','leases','UNIVER_SLIDE','workbook','\x20must\x20be\x20an\x20absolute\x20URL','ws:','values','_state','run','snapshotServerService','Invalid\x20JSON\x20response','fromCollab','ack','target','timer','randomUUID','createBoard','collaMsg','resolve','takePending','originalMeta','getWorkbook','Snapshot\x20contains\x20duplicate\x20block\x20ids','sessionTicket','Single-Unit\x20runtime\x20for\x20','_handleMessage','_socket','exportUnitData','GET','revisionService','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20','COLLABORATION_CLOSED','Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id','_ensureConnected','_disposables','_acceptingOperations','738909FKMTBj','trigger','createUniver','_inbound','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','pull','\x20request\x20is\x20already\x20active\x20for\x20','cancel','Collaboration\x20HELLO\x20response\x20is\x20invalid','Collaboration\x20WebSocket\x20is\x20not\x20online','_stopHeartbeat','find','acceptedChangeset','commandService','Code\x20is\x20longer\x20than\x20the\x20','_closeOwnedResources','unitID','invalid-revision','block','save','some','reject','unchanged','json','doc','_reconcilePrecedingChangesets','_tail','push','base64','takeInboundChangesets','snapshot','Changeset\x20submission\x20was\x20denied','m1Prime','up-to-date','_reconnectTimer','sid','\x20character\x20limit','_handleCollaborationEvent','fetchChangesets','_sid','precedingChangesets','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','mutations','getBase','_bufferedChangesets','add','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','Replacement\x20mutations\x20must\x20be\x20an\x20array','Collaboration\x20runtime\x20is\x20closing\x20or\x20closed','unit-data','isArray','catch','_awaiting','disposeUnit','searchParams','_operations','onlyLocal','COMMAND','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','_suppressionDepth','unitData','_target','initial','permission-denied','_createAwaitingFromPending','invalid-changeset','incrementRevOfUnit','Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields','createUnit','new_changes','entries','_commandWaiters','92gZFGsV','memberID','new_changesets','3230510JjTHVd','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON','_joined','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','permission-rejected','23103300gDVwhp','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','UNIVER_BOARD','slide','2pkqlHO','kind','permission','flatMap','COMPRESS_MUTATION_APPLY','infoRsp','\x20returned\x20a\x20different\x20block\x20identity','https:','read','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20','httpRequest','length','Cannot\x20'];_0x3d14=function(){return _0x171c83;};return _0x3d14();}var fe=class{[_0x3d1750(0xeb)];[_0x3d1750(0x199)];[_0x3d1750(0x174)];[_0x3d1750(0x1ff)];['_univer'];[_0x3d1750(0x227)];['_closePromise'];['_acceptingOperations']=!0x0;['_closed']=!0x1;[_0x3d1750(0x1c9)];[_0x3d1750(0x204)];[_0x3d1750(0x147)]=new L();[_0x3d1750(0x13c)]=[];['_knownHeadRevision'];[_0x3d1750(0x1e0)]=null;[_0x3d1750(0x144)]=null;[_0x3d1750(0x137)]=crypto[_0x3d1750(0xfa)]();['_nextReqId']=0x1;constructor(_0x344001,_0x4b6f04,_0x3c9c31,_0x57feb5,_0x2e8e79,_0x150668,_0x54c895){const _0x5d70b0=_0x3d1750;this['unitId']=_0x344001,this[_0x5d70b0(0x199)]=_0x4b6f04,this[_0x5d70b0(0x174)]=_0x3c9c31,this[_0x5d70b0(0x1ff)]=_0x57feb5,this[_0x5d70b0(0x195)]=_0x2e8e79,this[_0x5d70b0(0x227)]=_0x150668,this[_0x5d70b0(0xe2)]=_0x3c9c31,this[_0x5d70b0(0x1c9)]=new se(_0x150668,_0x344001,_0x4b6f04),this[_0x5d70b0(0x204)]=ue(_0x2e8e79,_0x344001,_0x54c895);}['getState'](){const _0x6b917c=_0x3d1750;return{'awaitingChangeset':this[_0x6b917c(0x144)]===null?null:U(this[_0x6b917c(0x144)]),'baseRevision':this[_0x6b917c(0x174)],'bufferedChangesetCount':this[_0x6b917c(0x13c)][_0x6b917c(0x171)],'conflict':this[_0x6b917c(0x1e0)],'connection':this[_0x6b917c(0xe3)]?_0x6b917c(0x1c0):this[_0x6b917c(0x1ff)]['getConnectionState'](),'knownHeadRevision':this[_0x6b917c(0xe2)],'pendingMutationCount':this['_capture'][_0x6b917c(0x190)][_0x6b917c(0x171)]};}[_0x3d1750(0x1bd)](){const _0x19d763=_0x3d1750;return structuredClone(this[_0x19d763(0x1c9)][_0x19d763(0x190)]);}[_0x3d1750(0x202)](){const _0x4868e0=_0x3d1750;return this[_0x4868e0(0x1ef)]()||this[_0x4868e0(0x147)][_0x4868e0(0xf3)](async()=>(this['_assertMutableState'](_0x4868e0(0x202)),await this[_0x4868e0(0xe8)]()));}[_0x3d1750(0x115)](){const _0x33cb02=_0x3d1750;return this['_rejectIfNotAccepting']()||this[_0x33cb02(0x147)][_0x33cb02(0xf3)](async()=>{const _0x59c504=_0x33cb02;if(this[_0x59c504(0x1cf)]('pull'),await this[_0x59c504(0xe8)](),this[_0x59c504(0x13c)][_0x59c504(0x171)]===0x0)return{'state':this[_0x59c504(0x19a)](),'status':_0x59c504(0x131)};let _0x548ef9=[...this[_0x59c504(0x13c)]];if(_0x548ef9[_0x59c504(0x124)](_0x259668=>_0x259668[_0x59c504(0x13a)][_0x59c504(0x124)](_0xd2a17a=>_0xd2a17a['id']===_0x3038df['id'])))throw new j(_0x59c504(0x23c),_0x59c504(0x255));let _0x4c3f24=this[_0x59c504(0x174)],_0x152918=this[_0x59c504(0x144)]?W(this[_0x59c504(0x144)][_0x59c504(0x13a)],this[_0x59c504(0xeb)],this['unitType'],this[_0x59c504(0x174)]):null,_0x58e7b1=_0x1575f4({'baseRev':this[_0x59c504(0x174)],'memberID':'','mutations':[...this['_capture'][_0x59c504(0x190)]],'revision':0x0,'type':this[_0x59c504(0x199)],'unitID':this[_0x59c504(0xeb)],'userID':''})[_0x59c504(0x13a)],_0x4f04a9=[];for(let _0xf80260 of _0x548ef9){let _0x946ffc=_0x1575f4(_0xf80260);if(this['_awaiting']!==null&&_0xf80260[_0x59c504(0x133)]===this[_0x59c504(0x144)]['sid']&&_0xf80260['reqId']===this[_0x59c504(0x144)]['reqId']){let _0x459a82=(_0x152918??[])[_0x59c504(0x215)](_0x2dcdf0);G(_0xf80260[_0x59c504(0x13a)],_0x459a82)||await this[_0x59c504(0x249)](new j('COLLABORATION_PROTOCOL_ERROR',_0x59c504(0x1bf))),_0x4f04a9[_0x59c504(0x12b)]({'changeset':_0xf80260,'kind':_0x59c504(0x1b6)}),_0x152918=null;continue;}let _0x412d5d=_0x946ffc[_0x59c504(0x13a)];if(_0x152918!==null){let _0x27dc72=this[_0x59c504(0x227)]['transformService'][_0x59c504(0x219)](_0x412d5d,_0x152918,!0x1);if(!_0x5941e5(_0x27dc72))return this[_0x59c504(0x1e0)]={'message':_0x27dc72['error'][_0x59c504(0x22e)],'operation':_0x59c504(0x115),'reason':_0x59c504(0x1c8)},{'conflict':this[_0x59c504(0x1e0)],'state':this['getState'](),'status':_0x59c504(0x252)};_0x412d5d=_0x27dc72['m1Prime'],_0x152918=_0x27dc72[_0x59c504(0x21f)];}let _0x115775=this['_kernel'][_0x59c504(0x228)][_0x59c504(0x219)](_0x412d5d,_0x58e7b1,!0x1);if(!_0x5941e5(_0x115775))return this[_0x59c504(0x1e0)]={'message':_0x115775['error'][_0x59c504(0x22e)],'operation':_0x59c504(0x115),'reason':_0x59c504(0x1c8)},{'conflict':this[_0x59c504(0x1e0)],'state':this[_0x59c504(0x19a)](),'status':_0x59c504(0x252)};_0x4f04a9['push']({'changeset':_0x1cd93e({..._0x946ffc,'mutations':_0x115775[_0x59c504(0x130)]}),'kind':_0x59c504(0x1ce)}),_0x58e7b1=_0x115775[_0x59c504(0x21f)];}let _0x33e47f=_0x4c3f24;for(let _0x381c56 of _0x4f04a9){if(_0x381c56[_0x59c504(0x167)]===_0x59c504(0x1b6)){let _0x322ade=this[_0x59c504(0x227)]['revisionService'][_0x59c504(0x153)](this['unitId']);_0x322ade!==_0x381c56[_0x59c504(0x21a)][_0x59c504(0x1e9)]&&await this['_closeAfterFatalError'](new j(_0x59c504(0x23c),'Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision')),_0x33e47f=_0x322ade;continue;}_0x33e47f=await this[_0x59c504(0x231)](_0x33e47f,[_0x381c56['changeset']]);}return this[_0x59c504(0x1c9)][_0x59c504(0x1e8)](_0x58e7b1[_0x59c504(0x215)](_0x2dcdf0)),this[_0x59c504(0x144)]!==null&&(this[_0x59c504(0x144)]=_0x152918===null?null:{...this[_0x59c504(0x144)],'baseRev':_0x33e47f,'mutations':_0x152918[_0x59c504(0x215)](_0x2dcdf0)}),this[_0x59c504(0x174)]=_0x33e47f,this[_0x59c504(0x13c)][_0x59c504(0x24b)](0x0),{'appliedChangesets':_0x548ef9[_0x59c504(0x215)](z),'fromRevision':_0x4c3f24,'state':this[_0x59c504(0x19a)](),'status':_0x59c504(0x20e),'toRevision':_0x33e47f,'transformedPendingMutationCount':_0x58e7b1['length']};});}[_0x3d1750(0x24d)](){return this['_rejectIfNotAccepting']()||this['_operations']['run'](async()=>{const _0x397b2e=_0x2899;this[_0x397b2e(0x1cf)]('commit');let _0x3ee71b=[],_0x45098a=[];if(this[_0x397b2e(0x144)]===null){if(this[_0x397b2e(0x1c9)][_0x397b2e(0x190)]['length']===0x0)return{'state':this[_0x397b2e(0x19a)](),'status':_0x397b2e(0x23e)};if(await this['_fetchChangesets'](),this[_0x397b2e(0x13c)][_0x397b2e(0x171)]>0x0)return{'baseRevision':this[_0x397b2e(0x174)],'confirmedChangesets':_0x3ee71b,'knownHeadRevision':this[_0x397b2e(0xe2)],'state':this[_0x397b2e(0x19a)](),'status':'pull-required'};this['_createAwaitingFromPending']();}for(;this[_0x397b2e(0x144)]!==null;){let _0xe22399=this[_0x397b2e(0x144)],_0x4de00b;try{_0x4de00b=await this['_handle'][_0x397b2e(0x20a)](_0xe22399);}catch{return{'changeset':U(_0xe22399),'confirmedChangesets':_0x3ee71b,'state':this['getState'](),'status':_0x397b2e(0x22d)};}if(_0x4de00b['status']==='retry'||_0x4de00b['status']==='unknown')return{'changeset':U(_0xe22399),'confirmedChangesets':_0x3ee71b,'state':this[_0x397b2e(0x19a)](),'status':_0x4de00b[_0x397b2e(0x179)]};if(_0x4de00b[_0x397b2e(0x179)]===_0x397b2e(0x230))return _0x4de00b[_0x397b2e(0x1bb)]===_0x397b2e(0x121)?(this[_0x397b2e(0x1c9)][_0x397b2e(0xe1)](_0xe22399['mutations']),this[_0x397b2e(0x144)]=null,await this[_0x397b2e(0xe8)](),{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x3ee71b,'knownHeadRevision':this[_0x397b2e(0xe2)],'state':this[_0x397b2e(0x19a)](),'status':_0x397b2e(0x226)}):(this[_0x397b2e(0x1e0)]={'message':_0x4de00b[_0x397b2e(0x22e)],'operation':'commit','reason':_0x4de00b[_0x397b2e(0x1bb)]===_0x397b2e(0x150)?_0x397b2e(0x161):_0x397b2e(0x20c)},{'conflict':this[_0x397b2e(0x1e0)],'confirmedChangesets':_0x3ee71b,'state':this[_0x397b2e(0x19a)](),'status':_0x397b2e(0x252)});let _0x402845=_0x4de00b[_0x397b2e(0x11c)];try{this[_0x397b2e(0x1a6)](_0xe22399,_0x4de00b[_0x397b2e(0x138)],_0x402845);}catch(_0x245a7a){await this['_closeAfterFatalError'](_0x245a7a);}let _0x52ec4f=_0xe22399[_0x397b2e(0x13a)];if(_0x4de00b[_0x397b2e(0x138)][_0x397b2e(0x171)]>0x0){let _0x1e7910=await this[_0x397b2e(0x129)](_0xe22399,_0x4de00b[_0x397b2e(0x138)]);if(_0x1e7910===null)return{'conflict':this[_0x397b2e(0x1e0)],'confirmedChangesets':_0x3ee71b,'state':this[_0x397b2e(0x19a)](),'status':_0x397b2e(0x252)};_0x52ec4f=_0x1e7910[_0x397b2e(0x209)];try{this[_0x397b2e(0x253)](_0x4de00b[_0x397b2e(0x138)]);}catch(_0x1263ab){await this['_closeAfterFatalError'](_0x1263ab);}_0x45098a[_0x397b2e(0x12b)](..._0x4de00b[_0x397b2e(0x138)]['map'](z));}G(_0x402845['mutations'],_0x52ec4f)||await this[_0x397b2e(0x249)](new j(_0x397b2e(0x23c),'Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset'));let _0x4383cb=this[_0x397b2e(0x227)][_0x397b2e(0x108)][_0x397b2e(0x153)](this['unitId']);if(_0x4383cb!==_0x402845[_0x397b2e(0x1e9)]&&await this['_closeAfterFatalError'](new j(_0x397b2e(0x23c),_0x397b2e(0x160))),this['_baseRevision']=_0x4383cb,this[_0x397b2e(0xe2)]=Math[_0x397b2e(0x17c)](this[_0x397b2e(0xe2)],_0x4383cb),this['_awaiting']=null,_0x3ee71b[_0x397b2e(0x12b)](z(_0x402845)),this[_0x397b2e(0x1c9)]['pending'][_0x397b2e(0x171)]===0x0)break;this[_0x397b2e(0x151)]();}return{'confirmedChangesets':_0x3ee71b,'reconciledChangesets':_0x45098a,'state':this[_0x397b2e(0x19a)](),'status':_0x397b2e(0x1d6)};});}async[_0x3d1750(0xe8)](){const _0x41bc23=_0x3d1750;let _0x147966=this[_0x41bc23(0xe2)],_0x51a882=await this['_handle']['fetchChangesets'](_0x147966,void 0x0);if(_0x24cb5b(_0x51a882[_0x41bc23(0x19d)])){let _0x28b3a6=_0x51a882['error'];throw new j(_0x41bc23(0x1cb),_0x28b3a6?.[_0x41bc23(0x22e)]||_0x41bc23(0x18b),{'retryable':!0x0});}let _0x189bf9=R(_0x51a882[_0x41bc23(0x1ac)],this['unitId'],this[_0x41bc23(0x199)],_0x147966),_0x52a873=_0x189bf9['at'](-0x1)?.[_0x41bc23(0x1e9)]??_0x147966;if(_0x51a882[_0x41bc23(0x19e)]!==void 0x0&&_0x51a882[_0x41bc23(0x19e)]!==_0x52a873)throw new j(_0x41bc23(0x23c),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range');return _0x189bf9[_0x41bc23(0x171)]===0x0?{'knownHeadRevision':this[_0x41bc23(0xe2)],'state':this[_0x41bc23(0x19a)](),'status':_0x41bc23(0x126)}:(this[_0x41bc23(0x13c)][_0x41bc23(0x12b)](..._0x189bf9),this[_0x41bc23(0xe2)]=_0x52a873,{'changesets':_0x189bf9[_0x41bc23(0x215)](z),'fromRevision':_0x147966,'state':this['getState'](),'status':'fetched','toRevision':_0x52a873});}[_0x3d1750(0x151)](){const _0x3d234e=_0x3d1750;let _0x274127=this['_capture'][_0x3d234e(0xfe)]();this[_0x3d234e(0x144)]={'baseRev':this[_0x3d234e(0x174)],'mutations':_0x274127,'reqId':this[_0x3d234e(0x212)],'sid':this[_0x3d234e(0x137)]},this[_0x3d234e(0x212)]+=0x1;}['_validateAcceptedChangeset'](_0x10328c,_0xec51a9,_0xd915e0){const _0x2cbae8=_0x3d1750;let _0xc8029f=R(_0xec51a9,this[_0x2cbae8(0xeb)],this[_0x2cbae8(0x199)],this[_0x2cbae8(0x174)])['at'](-0x1)?.[_0x2cbae8(0x1e9)]??this['_baseRevision'];if(_0xd915e0[_0x2cbae8(0x120)]!==this[_0x2cbae8(0xeb)]||_0xd915e0[_0x2cbae8(0x178)]!==this['unitType']||_0xd915e0[_0x2cbae8(0x133)]!==_0x10328c[_0x2cbae8(0x133)]||_0xd915e0[_0x2cbae8(0x187)]!==_0x10328c[_0x2cbae8(0x187)]||_0xd915e0[_0x2cbae8(0x246)]!==_0xc8029f||_0xd915e0[_0x2cbae8(0x1e9)]!==_0xc8029f+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset');}async[_0x3d1750(0x129)](_0x550f44,_0x39202b){const _0x454eb0=_0x3d1750;let _0x4709c5=W(_0x550f44['mutations'],this[_0x454eb0(0xeb)],this['unitType'],this[_0x454eb0(0x174)]),_0x4b0d88=W(this['_capture'][_0x454eb0(0x190)],this['unitId'],this[_0x454eb0(0x199)],this['_baseRevision']),_0x42f5ca=[];for(let _0x1b2958 of _0x39202b){let _0x89ea27=_0x1575f4(_0x1b2958),_0x4c1fbf=this[_0x454eb0(0x227)][_0x454eb0(0x228)][_0x454eb0(0x219)](_0x89ea27[_0x454eb0(0x13a)],_0x4709c5,!0x1);if(!_0x5941e5(_0x4c1fbf))return this[_0x454eb0(0x238)]('commit',_0x4c1fbf[_0x454eb0(0x19d)]),null;_0x4709c5=_0x4c1fbf['m2Prime'];let _0x27ecad=this[_0x454eb0(0x227)][_0x454eb0(0x228)][_0x454eb0(0x219)](_0x4c1fbf[_0x454eb0(0x130)],_0x4b0d88,!0x1);if(!_0x5941e5(_0x27ecad))return this['_setTransformConflict'](_0x454eb0(0x24d),_0x27ecad[_0x454eb0(0x19d)]),null;_0x4b0d88=_0x27ecad[_0x454eb0(0x21f)],_0x42f5ca[_0x454eb0(0x12b)](_0x1cd93e({..._0x89ea27,'mutations':_0x27ecad[_0x454eb0(0x130)]}));}let _0x1a9fd1=await this[_0x454eb0(0x231)](this[_0x454eb0(0x174)],_0x42f5ca);return this['_capture'][_0x454eb0(0x1e8)](_0x4b0d88[_0x454eb0(0x215)](_0x2dcdf0)),this[_0x454eb0(0x174)]=_0x1a9fd1,{'awaitingMutations':_0x4709c5[_0x454eb0(0x215)](_0x2dcdf0),'revision':_0x1a9fd1};}['_setTransformConflict'](_0x1d55f7,_0x267112){const _0x295daa=_0x3d1750;this['_conflict']={'message':_0x267112[_0x295daa(0x22e)],'operation':_0x1d55f7,'reason':_0x295daa(0x1c8)};}async[_0x3d1750(0x231)](_0x4a47d4,_0x587b9f){const _0x40dc3b=_0x3d1750;try{return await this[_0x40dc3b(0x1c9)][_0x40dc3b(0x234)](async()=>B(this[_0x40dc3b(0x227)],this[_0x40dc3b(0xeb)],this['unitType'],_0x4a47d4,_0x587b9f,_0x40dc3b(0x1ce)));}catch(_0x3adcae){return await this[_0x40dc3b(0x249)](_0x3adcae);}}async[_0x3d1750(0x249)](_0x50c228){const _0xbfd3e4=_0x3d1750;this[_0xbfd3e4(0x10f)]=!0x1,this[_0xbfd3e4(0x1f8)]??=this['_closeOwnedResources']();try{await this['_closePromise'];}catch{}throw _0x50c228;}[_0x3d1750(0x253)](_0x22a4db){const _0x11b842=_0x3d1750;let _0x4c4070=_0x22a4db['at'](-0x1)?.[_0x11b842(0x1e9)];if(_0x4c4070===void 0x0||this[_0x11b842(0x13c)][_0x11b842(0x171)]===0x0)return;let _0x102c1e=this[_0x11b842(0x13c)][_0x11b842(0x1f0)](({revision:_0x1e196d})=>_0x1e196d>_0x4c4070),_0x16b399=this[_0x11b842(0x13c)]['slice'](0x0,_0x102c1e===-0x1?this['_bufferedChangesets'][_0x11b842(0x171)]:_0x102c1e);for(let _0x50fb8e of _0x16b399){let _0x133f96=_0x22a4db[_0x11b842(0x11b)](({revision:_0x43bf39})=>_0x43bf39===_0x50fb8e['revision']);if(!_0x133f96||!pe(_0x50fb8e,_0x133f96))throw new j(_0x11b842(0x23c),_0x11b842(0x14b));}this[_0x11b842(0x13c)]['splice'](0x0,_0x16b399[_0x11b842(0x171)]);}[_0x3d1750(0x1bc)](_0x35fe0d){const _0x383328=_0x3d1750;return this[_0x383328(0x1ef)]()||this[_0x383328(0x147)][_0x383328(0xf3)](async()=>{const _0xf5ef40=_0x383328;_0x35fe0d[_0xf5ef40(0x188)]===_0xf5ef40(0x1d0)&&this[_0xf5ef40(0x1cf)](_0xf5ef40(0x1d0));let _0x5177fe=this[_0xf5ef40(0x1c9)][_0xf5ef40(0x190)]['length'],_0x2fa982=P(await this['_executor'][_0xf5ef40(0x1bc)](_0x35fe0d[_0xf5ef40(0x1b5)],_0x35fe0d[_0xf5ef40(0x188)]));return _0x35fe0d['mode']===_0xf5ef40(0x16e)?{'state':this['getState'](),'value':_0x2fa982}:{'mutations':this[_0xf5ef40(0x1c9)]['snapshotFrom'](_0x5177fe),'state':this[_0xf5ef40(0x19a)](),'value':_0x2fa982};});}[_0x3d1750(0x18e)](_0xbe8b5){const _0x49e06b=_0x3d1750;return this[_0x49e06b(0x1ef)]()||this[_0x49e06b(0x147)][_0x49e06b(0xf3)](async()=>{const _0x164278=_0x49e06b;if(this['_assertMutableState']('replace\x20mutations'),this[_0x164278(0x144)]!==null)throw new j(_0x164278(0x1b1),_0x164278(0xe0));let _0x2a7bae=me(_0xbe8b5),_0x2a3340=[...this[_0x164278(0x1c9)][_0x164278(0x190)]];this['_capture'][_0x164278(0x1e8)](_0x2a7bae);let _0x2d93ae=this['getState']();return{'pendingMutationCount':_0x2a7bae[_0x164278(0x171)],'previousMutationCount':_0x2a3340['length'],'state':_0x2d93ae};});}[_0x3d1750(0x106)](){const _0x5d8a34=_0x3d1750;return this[_0x5d8a34(0x1ef)]()||this['_operations'][_0x5d8a34(0xf3)](async()=>V(this[_0x5d8a34(0x195)],this['unitId'],this[_0x5d8a34(0x199)]));}[_0x3d1750(0x223)](){const _0x2e58a3=_0x3d1750;return this['_closePromise']?this[_0x2e58a3(0x1f8)]:(this[_0x2e58a3(0x10f)]=!0x1,this[_0x2e58a3(0x1f8)]=this[_0x2e58a3(0x147)][_0x2e58a3(0xf3)](async()=>await this[_0x2e58a3(0x11f)]()),this[_0x2e58a3(0x1f8)]);}async[_0x3d1750(0x11f)](){const _0x582e21=_0x3d1750;try{this['_capture'][_0x582e21(0x1c1)](),await this['_handle'][_0x582e21(0x223)]();}finally{try{this[_0x582e21(0x195)][_0x582e21(0x1c1)]();}finally{this[_0x582e21(0xe3)]=!0x0;}}}[_0x3d1750(0x1ef)](){const _0x44226c=_0x3d1750;return this[_0x44226c(0x10f)]?null:Promise['reject'](new j(_0x44226c(0x10b),_0x44226c(0x140)));}[_0x3d1750(0x1cf)](_0x1355cc){const _0x10553d=_0x3d1750;if(this['_conflict']!==null)throw new j(_0x10553d(0x1b1),_0x10553d(0x172)+_0x1355cc+_0x10553d(0x193));}};function U(_0x26f765){const _0x1110b6=_0x3d1750;return{'baseRevision':_0x26f765[_0x1110b6(0x246)],'mutationCount':_0x26f765[_0x1110b6(0x13a)][_0x1110b6(0x171)],'reqId':_0x26f765['reqId'],'revision':0x0,'sid':_0x26f765['sid']};}function W(_0x2024d8,_0x57a548,_0xd8af35,_0x5bd823){const _0x4ba468=_0x3d1750;return _0x1575f4({'baseRev':_0x5bd823,'memberID':'','mutations':[..._0x2024d8],'revision':0x0,'type':_0xd8af35,'unitID':_0x57a548,'userID':''})[_0x4ba468(0x13a)];}function pe(_0x921d77,_0x199127){const _0x2f84e1=_0x3d1750;return _0x921d77[_0x2f84e1(0x120)]===_0x199127[_0x2f84e1(0x120)]&&_0x921d77[_0x2f84e1(0x178)]===_0x199127[_0x2f84e1(0x178)]&&_0x921d77['baseRev']===_0x199127[_0x2f84e1(0x246)]&&_0x921d77[_0x2f84e1(0x1e9)]===_0x199127['revision']&&_0x921d77[_0x2f84e1(0x133)]===_0x199127[_0x2f84e1(0x133)]&&_0x921d77[_0x2f84e1(0x187)]===_0x199127[_0x2f84e1(0x187)]&&JSON[_0x2f84e1(0x1a2)](_0x921d77[_0x2f84e1(0x13a)])===JSON[_0x2f84e1(0x1a2)](_0x199127[_0x2f84e1(0x13a)]);}function G(_0x4ccad5,_0x427ef9){const _0x4c9661=_0x3d1750;return _0x4ccad5[_0x4c9661(0x171)]===_0x427ef9[_0x4c9661(0x171)]&&_0x4ccad5[_0x4c9661(0x196)]((_0x5de5c1,_0x628f04)=>_0x5de5c1['id']===_0x427ef9[_0x628f04]?.['id']&&_0x5de5c1[_0x4c9661(0x1be)]===_0x427ef9[_0x628f04]?.['data']);}function me(_0x27e7a2){const _0x390c01=_0x3d1750;if(!Array['isArray'](_0x27e7a2))throw new j(_0x390c01(0x1b1),_0x390c01(0x13f));return _0x27e7a2[_0x390c01(0x215)](_0x48744e=>{const _0x4d51cb=_0x390c01;if(!_0x48744e||typeof _0x48744e!=_0x4d51cb(0x1c2)||typeof _0x48744e['id']!=_0x4d51cb(0x1eb)||_0x48744e['id']['length']===0x0||typeof _0x48744e[_0x4d51cb(0x1be)]!=_0x4d51cb(0x1eb))throw new j(_0x4d51cb(0x1b1),_0x4d51cb(0x154));return{'data':_0x48744e[_0x4d51cb(0x1be)],'id':_0x48744e['id']};});}var K=class extends _0x1d55c6{[_0x3d1750(0x176)];[_0x3d1750(0x225)];static ['pluginName']=_0x3d1750(0x181);constructor(_0x14ddc0,_0x2cd058){super(),this['_config']=_0x14ddc0,this['_injector']=_0x2cd058;}[_0x3d1750(0x243)](){const _0x1c7968=_0x3d1750;this[_0x1c7968(0x176)][_0x1c7968(0xf4)]!==void 0x0&&_0x5dfa11(this[_0x1c7968(0x225)],[[_0x1915ff,{'useValue':this[_0x1c7968(0x176)][_0x1c7968(0xf4)]}]]),this['_config'][_0x1c7968(0x243)]({'commandService':this['_injector'][_0x1c7968(0x257)](_0x8f1c98),'compressMutationService':this[_0x1c7968(0x225)][_0x1c7968(0x257)](_0x7d731a),'instanceService':this[_0x1c7968(0x225)]['get'](_0x399d02),'injector':this[_0x1c7968(0x225)],'revisionService':this[_0x1c7968(0x225)][_0x1c7968(0x257)](_0x404d94),'transformService':this['_injector'][_0x1c7968(0x257)](_0x3b833a)});}};K=_0x53d4b2([_0x5418a4(_0x20bf45),_0x9b6041(0x1,_0x132537(_0x3f90a4))],K);function he(_0x59ec33,_0x377ef6){const _0x52fc67=_0x3d1750;let _0x4d4900;if(_0x59ec33[_0x52fc67(0x1ec)](K,{'onStarting'(_0x537b49){_0x4d4900=_0x537b49;},..._0x377ef6===void 0x0?{}:{'snapshotServerService':_0x377ef6}}),!_0x4d4900)throw Error(_0x52fc67(0x163));return _0x4d4900;}async function ge(_0x21ae53,_0x235c7c,_0x422a6c){const _0x483309=_0x3d1750;let _0x1fc4b3=await _0x21ae53[_0x483309(0x22b)](0x0);if(_0x24cb5b(_0x1fc4b3[_0x483309(0x19d)])){let _0x43b452=_0x1fc4b3[_0x483309(0x19d)];throw new j('COLLABORATION_LOAD_FAILED',_0x43b452?.[_0x483309(0x22e)]||_0x483309(0x20b));}let _0x5e90ab=_0x1fc4b3[_0x483309(0x12e)];if(!_0x5e90ab)throw new j(_0x483309(0x20d),_0x483309(0x1e5));_e(_0x5e90ab,_0x235c7c,_0x422a6c);try{switch(_0x422a6c){case _0x550821[_0x483309(0x1da)]:return{'changesets':_0x1fc4b3[_0x483309(0x1ac)],'unitData':await _0x13e39f(_0x5e90ab,await q(_0x21ae53,_0x5e90ab)),'unitType':_0x422a6c};case _0x550821['UNIVER_DOC']:return{'changesets':_0x1fc4b3[_0x483309(0x1ac)],'unitData':_0x13acb9(_0x5e90ab),'unitType':_0x422a6c};case _0x550821[_0x483309(0xed)]:return{'changesets':_0x1fc4b3['changesets'],'unitData':_0xb2ce4a(_0x5e90ab),'unitType':_0x422a6c};case _0x550821[_0x483309(0x183)]:return{'changesets':_0x1fc4b3[_0x483309(0x1ac)],'unitData':await _0x2d6862(_0x5e90ab,await q(_0x21ae53,_0x5e90ab)),'unitType':_0x422a6c};case _0x550821['UNIVER_BOARD']:return{'changesets':_0x1fc4b3[_0x483309(0x1ac)],'unitData':_0x206dca(_0x5e90ab),'unitType':_0x422a6c};default:throw new j(_0x483309(0x1b1),_0x483309(0x1fc)+_0x422a6c);}}catch(_0x544783){throw _0x544783 instanceof j?_0x544783:new j(_0x483309(0x20d),_0x483309(0x1d3),{'cause':_0x544783});}}function _e(_0xc25e54,_0x3d887a,_0x177267){const _0x5734a6=_0x3d1750;if(_0xc25e54[_0x5734a6(0x120)]!==_0x3d887a||_0xc25e54[_0x5734a6(0x178)]!==_0x177267)throw new j(_0x5734a6(0x20d),_0x5734a6(0x15d));if(!Number[_0x5734a6(0x1df)](_0xc25e54['rev'])||_0xc25e54[_0x5734a6(0x200)]<0x1)throw new j(_0x5734a6(0x20d),_0x5734a6(0x173));}async function q(_0xd2e86e,_0x3a3188){const _0x4db149=_0x3d1750;let _0x18127f=_0x3a3188[_0x4db149(0xee)];if(!_0x18127f)throw new j('COLLABORATION_LOAD_FAILED',_0x4db149(0x1f2));let _0x143572=Object[_0x4db149(0xf1)](_0x18127f[_0x4db149(0x17a)])[_0x4db149(0x169)](({blocks:_0x3575db})=>_0x3575db);if(new Set(_0x143572)[_0x4db149(0x1a7)]!==_0x143572[_0x4db149(0x171)])throw new j('COLLABORATION_LOAD_FAILED',_0x4db149(0x101));return await Promise[_0x4db149(0x21b)](_0x143572['map'](async _0x445fc1=>{const _0x3c343c=_0x4db149;let _0x5529e9=await _0xd2e86e[_0x3c343c(0xe6)](_0x445fc1);if(_0x24cb5b(_0x5529e9['error'])||!_0x5529e9[_0x3c343c(0x122)])throw new j('COLLABORATION_LOAD_FAILED',_0x5529e9['error']?.[_0x3c343c(0x22e)]||_0x3c343c(0x220)+_0x445fc1+_0x3c343c(0x1ae));if(_0x5529e9[_0x3c343c(0x122)]['id']!==_0x445fc1)throw new j(_0x3c343c(0x20d),'Snapshot\x20block\x20'+_0x445fc1+_0x3c343c(0x16c));return _0x5529e9[_0x3c343c(0x122)];}));}function ve(_0x4983d6){const _0x2723e7=_0x3d1750;let _0xe6983d=_0x4983d6['maxCodeLength']??0xa00000;if(!Number['isSafeInteger'](_0xe6983d)||_0xe6983d<=0x0)throw new j(_0x2723e7(0x1b1),_0x2723e7(0x17f));return{async 'load'(_0x2c33a8,_0x1c61ad){const _0x39babf=_0x2723e7;be(_0x2c33a8,_0x1c61ad);let _0x6f10bb,_0x6e06e1={'unitId':_0x2c33a8,'unitType':_0x1c61ad},_0x283dba={'unitId':_0x2c33a8,'unitType':_0x1c61ad,..._0x4983d6['snapshotServerService']===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x2331d6=_0x2899;if(_0x6f10bb===void 0x0)throw new j('COLLABORATION_LOAD_FAILED',_0x2331d6(0x180));return _0x6f10bb;}}},_0x4d5ec6;try{_0x4d5ec6=await _0x4983d6['backend'][_0x39babf(0x247)](_0x6e06e1);}catch(_0xa6c320){throw new j(_0x39babf(0x1cb),_0x39babf(0x1f1),{'cause':_0xa6c320,'retryable':!0x0});}let _0x24e6d5;try{_0x24e6d5=await _0x4983d6[_0x39babf(0x112)](_0x283dba);let _0x531077=he(_0x24e6d5,_0x4983d6[_0x39babf(0xf4)]);_0x4983d6[_0x39babf(0xf4)]!==void 0x0&&(_0x6f10bb=_0x531077[_0x39babf(0x1c7)][_0x39babf(0x257)](_0x9d3c59));let _0xb2850f=await xe(_0x4d5ec6,_0x2c33a8,_0x1c61ad);Se(_0xb2850f,_0x6e06e1),Ce(_0x24e6d5,_0xb2850f);let _0x3c724c=B(_0x531077,_0x2c33a8,_0x1c61ad,J(_0xb2850f[_0x39babf(0x14d)]),_0xb2850f['changesets']),_0x4b0f07=await _0x4d5ec6['fetchChangesets'](_0x3c724c,void 0x0);if(_0x24cb5b(_0x4b0f07['error'])){let _0x11c9ed=_0x4b0f07[_0x39babf(0x19d)];throw new j('COLLABORATION_UNAVAILABLE',_0x11c9ed?.[_0x39babf(0x22e)]||_0x39babf(0x14a),{'retryable':!0x0});}let _0x53662d=R(_0x4b0f07[_0x39babf(0x1ac)],_0x2c33a8,_0x1c61ad,_0x3c724c),_0x2f9ee9=_0x53662d['at'](-0x1)?.[_0x39babf(0x1e9)]??_0x3c724c;if(_0x4b0f07[_0x39babf(0x19e)]!==void 0x0&&_0x4b0f07['latestRevision']!==_0x2f9ee9)throw new j(_0x39babf(0x23c),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range');return _0x3c724c=B(_0x531077,_0x2c33a8,_0x1c61ad,_0x3c724c,_0x53662d),await ye(_0x531077),new fe(_0x2c33a8,_0x1c61ad,_0x3c724c,_0x4d5ec6,_0x24e6d5,_0x531077,_0xe6983d);}catch(_0x3ccfbf){try{await _0x4d5ec6['close']();}catch{}try{_0x24e6d5?.[_0x39babf(0x1c1)]();}catch{}throw _0x3ccfbf instanceof j?_0x3ccfbf:new j(_0x39babf(0x20d),'Failed\x20to\x20create\x20the\x20collaboration\x20runtime',{'cause':_0x3ccfbf});}}};}async function ye(_0x4e87f7){const _0xf722a7=_0x3d1750;_0x4e87f7[_0xf722a7(0x1c7)][_0xf722a7(0x224)](_0x1ae1f2)&&await _0x4e87f7[_0xf722a7(0x1c7)][_0xf722a7(0x257)](_0x1ae1f2)['waitForLatestApplied']();}function be(_0x387b41,_0x2c0a13){const _0x3ef1aa=_0x3d1750;if(_0x387b41[_0x3ef1aa(0x245)]()['length']===0x0)throw new j(_0x3ef1aa(0x1b1),_0x3ef1aa(0x184));if(_0x2c0a13!==_0x550821[_0x3ef1aa(0x1da)]&&_0x2c0a13!==_0x550821[_0x3ef1aa(0x1c4)]&&_0x2c0a13!==_0x550821[_0x3ef1aa(0xed)]&&_0x2c0a13!==_0x550821[_0x3ef1aa(0x183)]&&_0x2c0a13!==_0x550821[_0x3ef1aa(0x164)])throw new j('COLLABORATION_INVALID_INPUT','Unsupported\x20collaboration\x20Unit\x20type:\x20'+_0x2c0a13);}async function xe(_0x898e66,_0x3dfe05,_0x1b5ec1){const _0x110cd1=_0x3d1750;return _0x898e66[_0x110cd1(0x17d)]===_0x110cd1(0x141)?await _0x898e66['getUnitData']():await ge(_0x898e66,_0x3dfe05,_0x1b5ec1);}function Se(_0x31782f,_0x4094ae){const _0x896393=_0x3d1750;if(_0x31782f['unitType']!==_0x4094ae['unitType'])throw new j(_0x896393(0x20d),_0x896393(0x1db));if(_0x31782f['unitData']['id']!==_0x4094ae['unitId'])throw new j(_0x896393(0x20d),_0x896393(0x10c));J(_0x31782f[_0x896393(0x14d)]);}function J(_0x26287b){const _0x15a4e0=_0x3d1750;let _0x5ef129=_0x26287b[_0x15a4e0(0x200)];if(!Number[_0x15a4e0(0x1df)](_0x5ef129)||_0x5ef129===void 0x0||_0x5ef129<0x1)throw new j('COLLABORATION_LOAD_FAILED','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer');return _0x5ef129;}function Ce(_0x5aa46c,_0x4f9c6a){const _0x3558f6=_0x3d1750;switch(_0x4f9c6a[_0x3558f6(0x199)]){case _0x550821[_0x3558f6(0x1da)]:_0x5aa46c['createUnit'](_0x4f9c6a[_0x3558f6(0x199)],structuredClone(_0x4f9c6a[_0x3558f6(0x14d)]));return;case _0x550821[_0x3558f6(0x1c4)]:_0x5aa46c[_0x3558f6(0x155)](_0x4f9c6a[_0x3558f6(0x199)],structuredClone(_0x4f9c6a[_0x3558f6(0x14d)]));return;case _0x550821[_0x3558f6(0xed)]:_0x5aa46c[_0x3558f6(0x155)](_0x4f9c6a[_0x3558f6(0x199)],structuredClone(_0x4f9c6a[_0x3558f6(0x14d)]));return;case _0x550821['UNIVER_BASE']:_0x5aa46c['createUnit'](_0x4f9c6a[_0x3558f6(0x199)],structuredClone(_0x4f9c6a['unitData']));return;case _0x550821[_0x3558f6(0x164)]:_0x5aa46c[_0x3558f6(0x155)](_0x4f9c6a['unitType'],structuredClone(_0x4f9c6a['unitData']));return;}}var we=class{[_0x3d1750(0x176)];[_0x3d1750(0x14e)];[_0x3d1750(0x19b)];['format']=_0x3d1750(0x12e);constructor(_0x4363a6,_0x39cd9a,_0x4fcbb7){const _0x63da67=_0x3d1750;this['_config']=_0x4363a6,this[_0x63da67(0x14e)]=_0x39cd9a,this[_0x63da67(0x19b)]=_0x4fcbb7;}[_0x3d1750(0x189)](){const _0x5626a6=_0x3d1750;return this[_0x5626a6(0x19b)]['getConnectionState']();}async[_0x3d1750(0x22b)](_0x4dbc42=0x0){const _0x459d00=_0x3d1750;let _0x5e3b1c=X(this[_0x459d00(0x176)][_0x459d00(0x21d)],this[_0x459d00(0x14e)][_0x459d00(0x199)],'unit',this[_0x459d00(0x14e)][_0x459d00(0xeb)],_0x459d00(0x200),_0x4dbc42),_0x57d0f3=await Y(this['_config'],_0x5e3b1c);return Te(_0x57d0f3['snapshot']),_0x57d0f3;}async['getSheetBlock'](_0x31409c){const _0x44b459=_0x3d1750;let _0x206e8a=X(this[_0x44b459(0x176)][_0x44b459(0x21d)],this[_0x44b459(0x14e)][_0x44b459(0x199)],_0x44b459(0x208),this[_0x44b459(0x14e)][_0x44b459(0xeb)],_0x44b459(0x122),_0x31409c),_0x1db795=await Y(this[_0x44b459(0x176)],_0x206e8a);return _0x1db795['block']&&typeof _0x1db795['block'][_0x44b459(0x1be)]=='string'&&(_0x1db795[_0x44b459(0x122)][_0x44b459(0x1be)]=Z(_0x1db795[_0x44b459(0x122)]['data'])),_0x1db795;}async[_0x3d1750(0x136)](_0x187492,_0x3144d9=0x0){const _0xf81607=_0x3d1750;let _0x32dde3=X(this['_config'][_0xf81607(0x21d)],this[_0xf81607(0x14e)][_0xf81607(0x199)],_0xf81607(0x208),this[_0xf81607(0x14e)][_0xf81607(0xeb)],_0xf81607(0x1d8));_0x32dde3[_0xf81607(0x146)][_0xf81607(0x1e3)]('from',String(_0x187492)),_0x32dde3[_0xf81607(0x146)][_0xf81607(0x1e3)]('to',String(_0x3144d9));let _0x1061e5=await Y(this[_0xf81607(0x176)],_0x32dde3);return this[_0xf81607(0x19b)][_0xf81607(0x12d)](),_0x1061e5;}async[_0x3d1750(0x20a)](_0x4b96c){const _0x5c93c1=_0x3d1750;await this[_0x5c93c1(0x19b)]['ensureOnline']();let _0x5981bd=this[_0x5c93c1(0x19b)]['waitForSubmission'](_0x4b96c[_0x5c93c1(0x133)],_0x4b96c['reqId']),_0x3dc18c={..._0x4b96c,'memberID':this['_lease']['memberId'],'revision':0x0,'type':this['_target'][_0x5c93c1(0x199)],'unitID':this['_target'][_0x5c93c1(0xeb)],'userID':''},_0x532413=X(this['_config']['collabSubmitChangesetUrl'],this[_0x5c93c1(0x14e)][_0x5c93c1(0x199)],'unit',this[_0x5c93c1(0x14e)][_0x5c93c1(0xeb)],_0x5c93c1(0x156)),_0x12a788=this[_0x5c93c1(0x176)]['httpRequest'](_0x532413,{'body':JSON[_0x5c93c1(0x1a2)]({'changeset':_0x3dc18c,'memberID':this[_0x5c93c1(0x19b)]['memberId'],'type':this['_target'][_0x5c93c1(0x199)],'unitID':this[_0x5c93c1(0x14e)][_0x5c93c1(0xeb)]}),'headers':{'content-type':'application/json'},'method':'POST'})['then'](async _0x58a73f=>_0x58a73f[_0x5c93c1(0x179)]===0x191||_0x58a73f['status']===0x193?'permission':_0x58a73f['status']===0x190||_0x58a73f[_0x5c93c1(0x179)]===0x199?_0x5c93c1(0x1b8):_0x58a73f['ok']?'accepted':_0x5c93c1(0x22d))[_0x5c93c1(0x143)](()=>_0x5c93c1(0x22d)),_0x123757=Ee(this[_0x5c93c1(0x176)][_0x5c93c1(0x1d4)]),_0x142567=_0x12a788[_0x5c93c1(0x1e1)](_0x255ad9=>_0x255ad9===_0x5c93c1(0x168)?{'status':_0x5c93c1(0x161)}:_0x255ad9==='invalid'?{'status':_0x5c93c1(0x20c)}:new Promise(()=>void 0x0)),_0x524355=await Promise['race']([_0x5981bd[_0x5c93c1(0x19f)],_0x142567,_0x123757[_0x5c93c1(0x19f)][_0x5c93c1(0x1e1)](()=>({'status':'timeout'}))])['finally'](()=>{const _0x37c1e1=_0x5c93c1;_0x5981bd[_0x37c1e1(0x117)](),_0x123757[_0x37c1e1(0x117)]();});if(_0x524355[_0x5c93c1(0x179)]==='timeout'){let _0x355e22=await _0x12a788;return _0x355e22===_0x5c93c1(0x168)?{'message':_0x5c93c1(0x12f),'reason':_0x5c93c1(0x150),'status':_0x5c93c1(0x230)}:_0x355e22===_0x5c93c1(0x1b8)?{'message':_0x5c93c1(0x221),'reason':'invalid-changeset','status':_0x5c93c1(0x230)}:{'status':'unknown'};}if(_0x524355['status']===_0x5c93c1(0x1c0))return{'status':_0x5c93c1(0x22d)};if(_0x524355['status']===_0x5c93c1(0x22c))return{'status':_0x5c93c1(0x22c)};if(_0x524355[_0x5c93c1(0x179)]==='permission-rejected')return{'message':_0x5c93c1(0x12f),'reason':'permission-denied','status':_0x5c93c1(0x230)};if(_0x524355['status']==='changeset-rejected'){let _0x49a714=await this[_0x5c93c1(0x136)](_0x4b96c[_0x5c93c1(0x246)],_0x4b96c[_0x5c93c1(0x246)]);return{'message':_0x5c93c1(0x221),'reason':_0x49a714['latestRevision']!==void 0x0&&_0x49a714[_0x5c93c1(0x19e)]<_0x4b96c[_0x5c93c1(0x246)]?_0x5c93c1(0x121):_0x5c93c1(0x152),'status':_0x5c93c1(0x230)};}let _0x3c0a40=_0x524355[_0x5c93c1(0x21a)],_0x1cecb0=await this[_0x5c93c1(0x136)](_0x4b96c[_0x5c93c1(0x246)],_0x3c0a40[_0x5c93c1(0x1e9)]-0x1);if(_0x24cb5b(_0x1cecb0[_0x5c93c1(0x19d)])){let _0x4a36aa=_0x1cecb0[_0x5c93c1(0x19d)];throw new j(_0x5c93c1(0x1cb),_0x4a36aa?.['message']||_0x5c93c1(0x1e6),{'retryable':!0x0});}return{'acceptedChangeset':_0x3c0a40,'precedingChangesets':_0x1cecb0[_0x5c93c1(0x1ac)],'status':'confirmed'};}async[_0x3d1750(0x223)](){const _0x286285=_0x3d1750;await this[_0x286285(0x19b)][_0x286285(0x223)]();}};async function Y(_0x2faf56,_0x1b4af5){const _0x26f7fd=_0x3d1750;let _0x150e28;try{_0x150e28=await _0x2faf56[_0x26f7fd(0x170)](_0x1b4af5,{'method':_0x26f7fd(0x107)});}catch(_0xb83415){throw new j(_0x26f7fd(0x1cb),_0x26f7fd(0x1f3),{'cause':_0xb83415,'retryable':!0x0});}if(!_0x150e28['ok'])throw new j(_0x26f7fd(0x1cb),_0x26f7fd(0x10a)+_0x150e28[_0x26f7fd(0x179)],{'retryable':_0x150e28['status']>=0x1f4});try{return await _0x150e28[_0x26f7fd(0x127)]();}catch(_0x5ea43f){throw new j(_0x26f7fd(0x23c),_0x26f7fd(0x15e),{'cause':_0x5ea43f});}}function X(_0x5ad5b1,..._0x4aeb82){const _0x1ac3f5=_0x3d1750;let _0x225129=new URL(_0x5ad5b1);return _0x225129[_0x1ac3f5(0x18d)]=_0x225129[_0x1ac3f5(0x18d)][_0x1ac3f5(0x232)](/\/$/,'')+'/'+_0x4aeb82[_0x1ac3f5(0x215)](_0x3492f0=>encodeURIComponent(String(_0x3492f0)))[_0x1ac3f5(0x1fe)]('/'),_0x225129;}function Te(_0xfa0bf3){const _0x31624a=_0x3d1750;if(!_0xfa0bf3)return;let _0x1525f5=[_0xfa0bf3[_0x31624a(0xee)],_0xfa0bf3[_0x31624a(0x128)],_0xfa0bf3[_0x31624a(0x165)],_0xfa0bf3[_0x31624a(0x235)]];for(let _0x2a5b4d of _0x1525f5)_0x2a5b4d&&typeof _0x2a5b4d[_0x31624a(0xff)]==_0x31624a(0x1eb)&&(_0x2a5b4d[_0x31624a(0xff)]=Z(_0x2a5b4d[_0x31624a(0xff)]));if(_0xfa0bf3[_0x31624a(0xee)]){for(let _0x517680 of Object[_0x31624a(0xf1)](_0xfa0bf3[_0x31624a(0xee)]['sheets']))typeof _0x517680[_0x31624a(0xff)]=='string'&&(_0x517680[_0x31624a(0xff)]=Z(_0x517680[_0x31624a(0xff)]));}}function Z(_0x5544e5){const _0x1b3d42=_0x3d1750;return Uint8Array[_0x1b3d42(0x1de)](Buffer['from'](_0x5544e5,_0x1b3d42(0x12c)));}function Ee(_0x59176e){let _0x1c57c5;return{'cancel':()=>{_0x1c57c5!==void 0x0&&clearTimeout(_0x1c57c5);},'promise':new Promise(_0x494d22=>{_0x1c57c5=setTimeout(_0x494d22,_0x59176e);})};}var De=class{[_0x3d1750(0x176)];['_state']=_0x3d1750(0x24c);[_0x3d1750(0x105)];[_0x3d1750(0x210)];['_memberId']='';['_joined']=new Map();[_0x3d1750(0x158)]=new Map();[_0x3d1750(0x1f4)]=new Map();[_0x3d1750(0x113)]=new Map();[_0x3d1750(0x186)];[_0x3d1750(0x132)];[_0x3d1750(0x211)]=0x0;constructor(_0x23cf34){this['_config']=_0x23cf34;}async[_0x3d1750(0x1f9)](_0x40b8b8){const _0x1ef8f2=_0x3d1750;let _0x3f5936=this[_0x1ef8f2(0x15f)][_0x1ef8f2(0x257)](_0x40b8b8['unitId']);if(_0x3f5936&&_0x3f5936[_0x1ef8f2(0xf8)][_0x1ef8f2(0x199)]!==_0x40b8b8[_0x1ef8f2(0x199)])throw new j(_0x1ef8f2(0x1b1),_0x1ef8f2(0x109));if(await this[_0x1ef8f2(0x10d)](),_0x3f5936)_0x3f5936[_0x1ef8f2(0xec)]+=0x1;else{try{await this[_0x1ef8f2(0x185)](_0x40b8b8);}catch(_0x351c5a){throw this[_0x1ef8f2(0x15f)][_0x1ef8f2(0x1a7)]===0x0&&(this[_0x1ef8f2(0xf2)]=_0x1ef8f2(0x1c0),this['_stopHeartbeat'](),this['_socket']?.[_0x1ef8f2(0x223)](0x3e8,'Initial\x20Unit\x20JOIN\x20failed'),this[_0x1ef8f2(0x105)]=void 0x0,this['_memberId']=''),_0x351c5a;}this['_joined'][_0x1ef8f2(0x1e3)](_0x40b8b8[_0x1ef8f2(0xeb)],{'leases':0x1,'target':_0x40b8b8});}let _0x70642c=!0x1,_0xb2a0f0=()=>this['_memberId'],_0x199d47=new Set();return{'close':async()=>{const _0x27532b=_0x1ef8f2;if(!_0x70642c){_0x70642c=!0x0;for(let _0x52dfd8 of _0x199d47)_0x52dfd8['cancel']();_0x199d47[_0x27532b(0x177)](),await this[_0x27532b(0x1e4)](_0x40b8b8['unitId']);}},'ensureOnline':async()=>await this[_0x1ef8f2(0x10d)](),'getConnectionState':()=>_0x70642c?_0x1ef8f2(0x1c0):this[_0x1ef8f2(0xf2)],get 'memberId'(){return _0xb2a0f0();},'takeInboundChangesets':()=>{const _0x4fcb1e=_0x1ef8f2;let _0xabd4de=this['_inbound']['get'](_0x40b8b8[_0x4fcb1e(0xeb)])??[];return this[_0x4fcb1e(0x113)][_0x4fcb1e(0x17b)](_0x40b8b8[_0x4fcb1e(0xeb)]),_0xabd4de;},'waitForSubmission':(_0x2d22da,_0x2d2322)=>{const _0x228d3b=_0x1ef8f2;let _0x51d9d2=this['_waitForSubmission'](_0x2d22da,_0x2d2322);return _0x199d47[_0x228d3b(0x13d)](_0x51d9d2),_0x51d9d2[_0x228d3b(0x19f)]['then'](()=>_0x199d47[_0x228d3b(0x17b)](_0x51d9d2),()=>_0x199d47[_0x228d3b(0x17b)](_0x51d9d2)),{'cancel':()=>{const _0x5e136d=_0x228d3b;_0x199d47[_0x5e136d(0x17b)](_0x51d9d2),_0x51d9d2['cancel']();},'promise':_0x51d9d2[_0x228d3b(0x19f)]};}};}async['_ensureConnected'](){const _0x135723=_0x3d1750;if(this[_0x135723(0xf2)]!==_0x135723(0x1d5)||this[_0x135723(0x105)]?.[_0x135723(0x213)]!==WebSocket[_0x135723(0x1cc)]){this[_0x135723(0x132)]!==void 0x0&&clearTimeout(this[_0x135723(0x132)]),this[_0x135723(0x132)]=void 0x0,this[_0x135723(0x210)]??=this['_connect']();try{await this[_0x135723(0x210)];}finally{this[_0x135723(0x210)]=void 0x0;}}}async[_0x3d1750(0x1fd)](){const _0x1af1a2=_0x3d1750;this[_0x1af1a2(0xf2)]=_0x1af1a2(0x1ad);let _0x10dc86=await this[_0x1af1a2(0x176)][_0x1af1a2(0x170)](this[_0x1af1a2(0x176)][_0x1af1a2(0x24e)],{'headers':{'content-type':_0x1af1a2(0x236)},'method':_0x1af1a2(0x107)});if(!_0x10dc86['ok'])throw this[_0x1af1a2(0xf2)]=_0x1af1a2(0x24c),new j(_0x1af1a2(0x1cb),_0x1af1a2(0x18f)+_0x10dc86[_0x1af1a2(0x179)],{'retryable':_0x10dc86[_0x1af1a2(0x179)]>=0x1f4});let _0x11a2c2=await _0x10dc86[_0x1af1a2(0x127)]();if(typeof _0x11a2c2[_0x1af1a2(0xe7)]!=_0x1af1a2(0x1eb)||_0x11a2c2[_0x1af1a2(0xe7)]['length']===0x0)throw this[_0x1af1a2(0xf2)]=_0x1af1a2(0x24c),new j(_0x1af1a2(0x23c),'Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket');let _0x20b859=new URL(this[_0x1af1a2(0x176)][_0x1af1a2(0x1b0)]);_0x20b859[_0x1af1a2(0x146)][_0x1af1a2(0x1e3)](_0x1af1a2(0x102),_0x11a2c2['ticket']);let _0x433e50=new WebSocket(_0x20b859);this[_0x1af1a2(0x105)]=_0x433e50,_0x433e50['addEventListener'](_0x1af1a2(0x22e),_0x25ef71=>this[_0x1af1a2(0x104)](_0x25ef71)),_0x433e50[_0x1af1a2(0x198)](_0x1af1a2(0x223),()=>{const _0x345204=_0x1af1a2;this['_socket']===_0x433e50&&(this[_0x345204(0x11a)](),this[_0x345204(0x1ea)](new j(_0x345204(0x1cb),_0x345204(0x191),{'retryable':!0x0})),this['_state']=this[_0x345204(0x15f)][_0x345204(0x1a7)]===0x0?_0x345204(0x1c0):_0x345204(0x1ad),this['_joined'][_0x345204(0x1a7)]>0x0&&this['_scheduleReconnect']());}),await Oe(_0x433e50);let _0x1ee966=await this[_0x1af1a2(0x201)](_0x526731[_0x1af1a2(0x241)],'',{'cmd':_0x526731[_0x1af1a2(0x241)],'routeKey':''});if(_0x1ee966[_0x1af1a2(0x1b5)]!==_0x22ffe8['OK']||typeof _0x1ee966[_0x1af1a2(0x16b)]?.[_0x1af1a2(0x15a)]!='string')throw _0x433e50['close'](),new j(_0x1af1a2(0x23c),_0x1af1a2(0x118));this['_memberId']=_0x1ee966[_0x1af1a2(0x16b)][_0x1af1a2(0x15a)],this['_state']='online';for(let {target:_0x5b3da5}of this[_0x1af1a2(0x15f)]['values']())try{await this[_0x1af1a2(0x185)](_0x5b3da5);}catch(_0x83faff){throw _0x433e50[_0x1af1a2(0x223)](0x3f3,'Failed\x20to\x20rejoin\x20Unit\x20room'),_0x83faff;}this['_reconnectAttempts']=0x0,this[_0x1af1a2(0x23d)]();}async[_0x3d1750(0x185)](_0x2425c1){const _0x47dcdc=_0x3d1750;let _0x11375f=await this[_0x47dcdc(0x201)](_0x526731[_0x47dcdc(0x1a1)],_0x2425c1['unitId'],{'cmd':_0x526731[_0x47dcdc(0x1a1)],'joinReq':{'rooms':[{'args':'','roomID':_0x2425c1['unitId']}]},'routeKey':_0x2425c1['unitId']});if(_0x11375f['code']!==_0x22ffe8['OK'])throw new j('COLLABORATION_UNAVAILABLE',typeof _0x11375f[_0x47dcdc(0x1bb)]=='string'?_0x11375f[_0x47dcdc(0x1bb)]:_0x47dcdc(0x250));}[_0x3d1750(0x201)](_0x1fd60a,_0x230271,_0x3cf1f5){const _0x1566a9=_0x3d1750;let _0x902671=this[_0x1566a9(0x105)];if(!_0x902671||_0x902671['readyState']!==WebSocket[_0x1566a9(0x1cc)])return Promise[_0x1566a9(0x125)](new j(_0x1566a9(0x1cb),_0x1566a9(0x119),{'retryable':!0x0}));let _0x18ec87=_0x1fd60a+':'+_0x230271;return new Promise((_0x4372be,_0xf323a1)=>{const _0x88c3f2=_0x1566a9;if(this[_0x88c3f2(0x158)][_0x88c3f2(0x224)](_0x18ec87)){_0xf323a1(new j(_0x88c3f2(0x23c),'A\x20'+_0x1fd60a+_0x88c3f2(0x116)+_0x230271));return;}let _0xd34de=setTimeout(()=>{const _0x5ee97a=_0x88c3f2;this[_0x5ee97a(0x158)][_0x5ee97a(0x17b)](_0x18ec87),_0xf323a1(new j(_0x5ee97a(0x1cb),_0x5ee97a(0x16f)+_0x1fd60a,{'retryable':!0x0}));},0x7530);this['_commandWaiters']['set'](_0x18ec87,{'reject':_0xf323a1,'resolve':_0x4372be,'timer':_0xd34de});try{_0x902671['send'](JSON[_0x88c3f2(0x1a2)](_0x3cf1f5));}catch(_0x44213b){this['_commandWaiters'][_0x88c3f2(0x17b)](_0x18ec87),clearTimeout(_0xd34de),_0xf323a1(new j('COLLABORATION_UNAVAILABLE',_0x88c3f2(0x203),{'cause':_0x44213b,'retryable':!0x0}));}});}[_0x3d1750(0x104)](_0x11ec62){const _0x1a50a2=_0x3d1750;if(typeof _0x11ec62[_0x1a50a2(0x1be)]!=_0x1a50a2(0x1eb))return;let _0x4e9e6c;try{_0x4e9e6c=JSON['parse'](_0x11ec62[_0x1a50a2(0x1be)]);}catch{this['_socket']?.[_0x1a50a2(0x223)](0x3eb,_0x1a50a2(0xf5));return;}let _0x38f498=typeof _0x4e9e6c['routeKey']==_0x1a50a2(0x1eb)?_0x4e9e6c[_0x1a50a2(0x197)]:'';if(_0x4e9e6c[_0x1a50a2(0x1dd)]===_0x526731[_0x1a50a2(0x241)]||_0x4e9e6c[_0x1a50a2(0x1dd)]===_0x526731[_0x1a50a2(0x1a1)]||_0x4e9e6c[_0x1a50a2(0x1dd)]===_0x526731[_0x1a50a2(0x1dc)]){let _0x28d2d1=_0x4e9e6c['cmd']+':'+_0x38f498,_0x20c426=this[_0x1a50a2(0x158)][_0x1a50a2(0x257)](_0x28d2d1);_0x20c426&&(this[_0x1a50a2(0x158)][_0x1a50a2(0x17b)](_0x28d2d1),clearTimeout(_0x20c426[_0x1a50a2(0xf9)]),_0x20c426[_0x1a50a2(0xfd)](_0x4e9e6c));return;}_0x4e9e6c['cmd']!==_0x526731[_0x1a50a2(0xe9)]||!_0x4e9e6c[_0x1a50a2(0xfc)]||this[_0x1a50a2(0x135)](_0x38f498,_0x4e9e6c[_0x1a50a2(0xfc)]);}[_0x3d1750(0x135)](_0x4ca2f9,_0x49c2f7){const _0xaaf1dc=_0x3d1750;let _0x4b7304=_0x49c2f7[_0xaaf1dc(0x194)],_0x22961b=_0x4b7304===_0xaaf1dc(0x1ed)?_0xaaf1dc(0x218):_0x4b7304===_0xaaf1dc(0x207)?_0xaaf1dc(0x175):_0x4b7304==='changeset_should_retry'?_0xaaf1dc(0x22f):_0x4b7304===_0xaaf1dc(0x19c)?_0xaaf1dc(0x233):_0x4b7304===_0xaaf1dc(0x15b)?'newCsEvent':void 0x0;if(!_0x22961b)return;let _0x16d5ed=ke(_0x49c2f7[_0x22961b]);if(!_0x16d5ed||_0x16d5ed['unitID']!==_0x4ca2f9)return;if(_0x4b7304==='new_changesets'){let _0x4198c1=this['_inbound']['get'](_0x4ca2f9)??[];_0x4198c1['push'](_0x16d5ed),this['_inbound']['set'](_0x4ca2f9,_0x4198c1);return;}let _0xabe406=Q(_0x16d5ed[_0xaaf1dc(0x133)],_0x16d5ed[_0xaaf1dc(0x187)]),_0x10f9d7=this[_0xaaf1dc(0x1f4)]['get'](_0xabe406);_0x10f9d7&&_0x10f9d7(_0x4b7304===_0xaaf1dc(0x1ed)?{'changeset':_0x16d5ed,'status':_0xaaf1dc(0xf7)}:_0x4b7304===_0xaaf1dc(0x1b7)?{'status':_0xaaf1dc(0x22c)}:_0x4b7304===_0xaaf1dc(0x19c)?{'status':_0xaaf1dc(0x161)}:{'status':_0xaaf1dc(0x20c)});}[_0x3d1750(0x1b9)](_0x458c58,_0x3445a5){const _0x35397a=_0x3d1750;let _0x51e43a=Q(_0x458c58,_0x3445a5);if(this[_0x35397a(0x1f4)][_0x35397a(0x224)](_0x51e43a))return{'cancel':()=>void 0x0,'promise':Promise[_0x35397a(0x125)](new j(_0x35397a(0x1b1),_0x35397a(0x23a)))};let _0x49eb3d=()=>void 0x0;return{'cancel':()=>_0x49eb3d({'status':_0x35397a(0x1c0)}),'promise':new Promise(_0x5de182=>{const _0xffbff5=_0x35397a;_0x49eb3d=_0x4b2a61=>{const _0x5b4716=_0x2899;this[_0x5b4716(0x1f4)][_0x5b4716(0x17b)](_0x51e43a)&&_0x5de182(_0x4b2a61);},this['_submissionWaiters'][_0xffbff5(0x1e3)](_0x51e43a,_0x49eb3d);})};}async[_0x3d1750(0x1e4)](_0x407dea){const _0x49645c=_0x3d1750;let _0x466be0=this[_0x49645c(0x15f)]['get'](_0x407dea);_0x466be0&&(--_0x466be0[_0x49645c(0xec)],!(_0x466be0[_0x49645c(0xec)]>0x0)&&(this[_0x49645c(0x15f)][_0x49645c(0x17b)](_0x407dea),this['_inbound'][_0x49645c(0x17b)](_0x407dea),this[_0x49645c(0x105)]?.[_0x49645c(0x213)]===WebSocket[_0x49645c(0x1cc)]&&this[_0x49645c(0x105)]['send'](JSON[_0x49645c(0x1a2)]({'cmd':_0x526731[_0x49645c(0x182)],'leaveReq':{'args':'','roomID':_0x407dea},'routeKey':_0x407dea})),this[_0x49645c(0x15f)][_0x49645c(0x1a7)]===0x0&&(this['_state']=_0x49645c(0x1c0),this[_0x49645c(0x132)]!==void 0x0&&clearTimeout(this['_reconnectTimer']),this[_0x49645c(0x132)]=void 0x0,this['_stopHeartbeat'](),this[_0x49645c(0x105)]?.[_0x49645c(0x223)](0x3e8,'No\x20active\x20Unit\x20leases'),this[_0x49645c(0x105)]=void 0x0,this[_0x49645c(0x206)]='')));}[_0x3d1750(0x251)](){const _0x4d8996=_0x3d1750;if(this[_0x4d8996(0x132)]!==void 0x0||this[_0x4d8996(0x211)]>=0x3){this[_0x4d8996(0x211)]>=0x3&&(this['_state']=_0x4d8996(0x24c));return;}let _0x588104=Math[_0x4d8996(0xde)](0x3e8*0x2**this['_reconnectAttempts'],0x4e20);this[_0x4d8996(0x211)]+=0x1,this[_0x4d8996(0x132)]=setTimeout(()=>{const _0x5180d1=_0x4d8996;this[_0x5180d1(0x132)]=void 0x0,this[_0x5180d1(0x210)]??=this[_0x5180d1(0x1fd)](),this[_0x5180d1(0x210)][_0x5180d1(0x143)](()=>this[_0x5180d1(0x251)]())[_0x5180d1(0x20f)](()=>{const _0x3b1ddb=_0x5180d1;this[_0x3b1ddb(0x210)]=void 0x0;});},_0x588104);}[_0x3d1750(0x23d)](){const _0x34b66d=_0x3d1750;this['_stopHeartbeat'](),this[_0x34b66d(0x186)]=setInterval(()=>{const _0x3c13e3=_0x34b66d;this[_0x3c13e3(0xf2)]==='online'&&this['_requestCommand'](_0x526731[_0x3c13e3(0x1dc)],'',{'cmd':_0x526731['HEARTBEAT'],'routeKey':''})[_0x3c13e3(0x143)](()=>this[_0x3c13e3(0x105)]?.[_0x3c13e3(0x223)](0x3f3,'Heartbeat\x20failed'));},0x7530);}[_0x3d1750(0x11a)](){const _0x16a876=_0x3d1750;this['_heartbeat']!==void 0x0&&clearInterval(this[_0x16a876(0x186)]),this[_0x16a876(0x186)]=void 0x0;}[_0x3d1750(0x1ea)](_0x449d6a){const _0x2b3184=_0x3d1750;for(let _0x29d80f of this['_commandWaiters']['values']())clearTimeout(_0x29d80f['timer']),_0x29d80f[_0x2b3184(0x125)](_0x449d6a);this['_commandWaiters'][_0x2b3184(0x177)]();}};function Oe(_0x1a86dc){return new Promise((_0x5d9c15,_0x1ad94d)=>{const _0x4a7b2a=_0x2899;let _0x2df5aa=()=>{const _0x50ea85=_0x2899;clearTimeout(_0x312b49),_0x1a86dc[_0x50ea85(0x1aa)](_0x50ea85(0x223),_0x2b217a),_0x1a86dc[_0x50ea85(0x1aa)]('error',_0x2a80b9),_0x1a86dc['removeEventListener']('open',_0x4a0e60);},_0x5aa00c=_0x25db97=>{const _0x219cce=_0x2899;_0x2df5aa(),_0x1ad94d(new j(_0x219cce(0x1cb),_0x25db97,{'retryable':!0x0}));},_0x2b217a=()=>_0x5aa00c(_0x4a7b2a(0x22a)),_0x2a80b9=()=>_0x5aa00c(_0x4a7b2a(0x1fb)),_0x4a0e60=()=>{_0x2df5aa(),_0x5d9c15();},_0x312b49=setTimeout(()=>{const _0x409e2b=_0x4a7b2a;_0x5aa00c(_0x409e2b(0xe5)),_0x1a86dc[_0x409e2b(0x223)](0x3e8,'Connection\x20timed\x20out');},0x7530);_0x1a86dc[_0x4a7b2a(0x198)](_0x4a7b2a(0x223),_0x2b217a,{'once':!0x0}),_0x1a86dc['addEventListener'](_0x4a7b2a(0x19d),_0x2a80b9,{'once':!0x0}),_0x1a86dc[_0x4a7b2a(0x198)]('open',_0x4a0e60,{'once':!0x0});});}function ke(_0x405c51){const _0x5ad2a9=_0x3d1750;if(!_0x405c51||typeof _0x405c51!='object')return null;let _0x265802=_0x405c51['cs'];return _0x265802&&typeof _0x265802==_0x5ad2a9(0x1c2)?_0x265802:null;}function Q(_0x52877f,_0x5606a4){return(_0x52877f??'')+':'+(_0x5606a4??0x0);}var Ae=class{[_0x3d1750(0x176)];['_connection'];constructor(_0x5d2164){const _0x5004cd=_0x3d1750;this[_0x5004cd(0x176)]=je(_0x5d2164),this[_0x5004cd(0x1a8)]=new De(this[_0x5004cd(0x176)]);}async[_0x3d1750(0x247)](_0x313c0c){const _0x1e8b0c=_0x3d1750;let _0x32b571=await this[_0x1e8b0c(0x1a8)][_0x1e8b0c(0x1f9)](_0x313c0c);return new we(this[_0x1e8b0c(0x176)],_0x313c0c,_0x32b571);}};function je(_0x5c65d8){const _0x2a81e5=_0x3d1750;let _0x345d54=$(_0x5c65d8[_0x2a81e5(0x21d)],_0x2a81e5(0x21d),[_0x2a81e5(0x216),_0x2a81e5(0x16d)]),_0x1240a3=$(_0x5c65d8[_0x2a81e5(0x1b2)],_0x2a81e5(0x1b2),['http:',_0x2a81e5(0x16d)]),_0x6be3b5=$(_0x5c65d8[_0x2a81e5(0x1b0)],_0x2a81e5(0x1b0),[_0x2a81e5(0xf0),'wss:',_0x2a81e5(0x216),'https:']);_0x6be3b5['protocol']===_0x2a81e5(0x216)&&(_0x6be3b5[_0x2a81e5(0x1d9)]=_0x2a81e5(0xf0)),_0x6be3b5[_0x2a81e5(0x1d9)]===_0x2a81e5(0x16d)&&(_0x6be3b5[_0x2a81e5(0x1d9)]='wss:');let _0x2723ba=$(_0x5c65d8[_0x2a81e5(0x24e)],_0x2a81e5(0x24e),['http:',_0x2a81e5(0x16d)]),_0x1eb9e9=_0x5c65d8[_0x2a81e5(0x1d4)]??0x7530;if(!Number[_0x2a81e5(0x1df)](_0x1eb9e9)||_0x1eb9e9<=0x0)throw new j(_0x2a81e5(0x1b1),_0x2a81e5(0xdf));return{'collabSubmitChangesetUrl':_0x1240a3,'collabWebSocketUrl':_0x6be3b5,'commitTimeoutMs':_0x1eb9e9,'httpRequest':_0x5c65d8['httpRequest']??globalThis['fetch']['bind'](globalThis),'snapshotServerUrl':_0x345d54,'wsSessionTicketUrl':_0x2723ba};}function $(_0x571931,_0x15df1c,_0x334d0f){const _0x43a268=_0x3d1750;let _0x221dfa;try{_0x221dfa=new URL(_0x571931);}catch{throw new j(_0x43a268(0x1b1),_0x15df1c+_0x43a268(0xef));}if(!_0x334d0f['includes'](_0x221dfa[_0x43a268(0x1d9)]))throw new j(_0x43a268(0x1b1),_0x15df1c+'\x20uses\x20an\x20unsupported\x20protocol');return _0x221dfa;}function Me(_0x34ba02){return new Ae(_0x34ba02);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
1
+ const _0x11d030=_0x583c;(function(_0x373015,_0x2bde9d){const _0x97d168=_0x583c,_0x29ca8a=_0x373015();while(!![]){try{const _0x2950d9=parseInt(_0x97d168(0x2a8))/0x1*(-parseInt(_0x97d168(0x2b6))/0x2)+-parseInt(_0x97d168(0x1b5))/0x3*(-parseInt(_0x97d168(0x15f))/0x4)+parseInt(_0x97d168(0x167))/0x5+parseInt(_0x97d168(0x205))/0x6*(parseInt(_0x97d168(0x21c))/0x7)+parseInt(_0x97d168(0x23c))/0x8+parseInt(_0x97d168(0x145))/0x9+-parseInt(_0x97d168(0x22a))/0xa*(parseInt(_0x97d168(0x182))/0xb);if(_0x2950d9===_0x2bde9d)break;else _0x29ca8a['push'](_0x29ca8a['shift']());}catch(_0x20910b){_0x29ca8a['push'](_0x29ca8a['shift']());}}}(_0x5cc0,0xd0b4f));import{CommandType as _0x8f800b,DependentOn as _0x402b0b,ICommandService as _0x16b588,IUniverInstanceService as _0x5896bb,Inject as _0x2dcc67,Injector as _0x3a4ce6,Plugin as _0xfef6ce,UniverInstanceType as _0x20b30d,registerDependencies as _0x56afce,sequenceExecute as _0xd0978b,toDisposable as _0x586343}from'@univerjs/core';import{CompressMutationService as _0x79e251,ISnapshotServerService as _0x4dc918,ITransformService as _0x4fd054,RevertRevisionMutation as _0x4e6ffd,RevisionService as _0x3614fb,SnapshotService as _0x561fda,UniverCollaborationPlugin as _0x382b63,isTransformMutationsSuccess as _0x4dd855,parseChangesetToProtocol as _0x437dd3,parseMutationToProtocol as _0x451c27,parseProtocolChangeset as _0x2b9af6,transformSnapshotToBaseData as _0xf344e5,transformSnapshotToBoardData as _0x48a275,transformSnapshotToDocumentData as _0x9a37bd,transformSnapshotToSlideData as _0x3b04ef,transformSnapshotToWorkbookData as _0x3c8e29}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x25ed85}from'@univerjs/engine-formula';import{CmdRspCode as _0xe6f23a,CombCmd as _0x3042f5,isError as _0x400ff3}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x5e9279}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x3d47df,RichTextEditingMutation as _0x2431f0}from'@univerjs/docs';import{IRenderManagerService as _0x36e564}from'@univerjs/engine-render';import{FUniver as _0x306570}from'@univerjs/core/facade';import'@univerjs-pro/bases/facade';import'@univerjs-pro/boards/facade';import'@univerjs-pro/slides/facade';import'@univerjs/docs/facade';import'@univerjs/sheets/facade';import _0xc64a00 from'@oxc-project/runtime/helpers/decorateParam';import _0x16ecd6 from'@oxc-project/runtime/helpers/decorate';var j=class extends Error{[_0x11d030(0x1e2)];[_0x11d030(0x22b)];constructor(_0x324f77,_0x44e432,_0x45fd03={}){const _0x4f2364=_0x11d030;super(_0x44e432,_0x45fd03),this[_0x4f2364(0x18d)]=_0x4f2364(0x1c3),this['code']=_0x324f77,this[_0x4f2364(0x22b)]=_0x45fd03[_0x4f2364(0x22b)]??!0x1;}},se=class{[_0x11d030(0x2be)];[_0x11d030(0x1a9)];[_0x11d030(0x202)]=[];[_0x11d030(0x15a)]=[];[_0x11d030(0x261)]=0x0;constructor(_0x398099,_0x56ae9e,_0x17f8b3){const _0x42d633=_0x11d030;this[_0x42d633(0x2be)]=_0x398099,this[_0x42d633(0x1a9)]=_0x56ae9e,this[_0x42d633(0x15a)][_0x42d633(0x209)](_0x398099['commandService'][_0x42d633(0x248)]((_0x4c3e3f,_0x2bb91d)=>{this['_captureCommandMutation'](_0x4c3e3f,_0x2bb91d,_0x17f8b3);})),_0x17f8b3===_0x20b30d[_0x42d633(0x2b2)]&&(_0x398099[_0x42d633(0x1c4)]['get'](_0x36e564),this['_subscribeToDocumentState']());}get[_0x11d030(0x19d)](){const _0x43b054=_0x11d030;return this[_0x43b054(0x202)];}[_0x11d030(0x24b)](_0x5ac384){const _0x31a0b3=_0x11d030;return this[_0x31a0b3(0x202)][_0x31a0b3(0x2ac)](_0x5ac384);}[_0x11d030(0x28d)](_0x35624c){const _0x25b085=_0x11d030;this['_pending'][_0x25b085(0x193)](0x0,this[_0x25b085(0x202)][_0x25b085(0x27b)],..._0x35624c);}[_0x11d030(0x2a0)](){const _0x3ed168=_0x11d030;return this[_0x3ed168(0x202)][_0x3ed168(0x193)](0x0);}[_0x11d030(0x244)](_0x533094){const _0x3b90f0=_0x11d030;this['_pending'][_0x3b90f0(0x284)](..._0x533094);}async['suppress'](_0x52a06a){const _0x43aeec=_0x11d030;this[_0x43aeec(0x261)]+=0x1;try{return await _0x52a06a();}finally{--this[_0x43aeec(0x261)];}}[_0x11d030(0x28c)](){const _0x15f0bb=_0x11d030;for(let _0x5a5434 of this[_0x15f0bb(0x15a)][_0x15f0bb(0x193)](0x0))_0x5a5434['dispose']();}[_0x11d030(0x1fe)](_0x1b6371,_0x365b17,_0x3fab5f){const _0x3910e6=_0x11d030;if(this[_0x3910e6(0x261)]>0x0||_0x1b6371[_0x3910e6(0x201)]!==_0x8f800b['MUTATION']||_0x365b17?.['fromCollab']||_0x365b17?.[_0x3910e6(0x26b)]||_0x365b17?.[_0x3910e6(0x1eb)])return;let _0x36128d=_0x1b6371[_0x3910e6(0x1f6)];if(_0x36128d?.['unitId']!==void 0x0&&_0x36128d[_0x3910e6(0x227)]!==this[_0x3910e6(0x1a9)]){if(_0x36128d[_0x3910e6(0x174)]===_0x5e9279['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0x3910e6(0x1ec)+this['_unitId']+_0x3910e6(0x23d)+_0x1b6371['id']+_0x3910e6(0x1cb)+String(_0x36128d['unitId']));}if(_0x36128d?.[_0x3910e6(0x227)]===void 0x0||_0x3fab5f===_0x20b30d[_0x3910e6(0x2b2)]&&_0x1b6371['id']===_0x2431f0['id'])return;if(_0x1b6371['id']===_0x4e6ffd['id'])throw new j(_0x3910e6(0x216),_0x3910e6(0x275));let _0x1d707b=_0x1b6371,_0x3b96ca=this[_0x3910e6(0x2be)]['compressMutationService'][_0x3910e6(0x1b9)]['getInterceptPoints']()[_0x3910e6(0x25b)],_0x2edc13=(this['_kernel'][_0x3910e6(0x161)][_0x3910e6(0x1b9)][_0x3910e6(0x207)](_0x3b96ca)([_0x1d707b],this[_0x3910e6(0x2be)]['instanceService'])??[_0x1d707b])[0x0];_0x2edc13&&this[_0x3910e6(0x202)][_0x3910e6(0x209)](_0x451c27(_0x2edc13));}[_0x11d030(0x263)](){const _0x55640a=_0x11d030;let _0x469f77=this[_0x55640a(0x2be)][_0x55640a(0x1c4)]['get'](_0x3d47df)[_0x55640a(0x1a8)][_0x55640a(0x155)](_0x3d2b1a=>{const _0x487e2f=_0x55640a;if(this[_0x487e2f(0x261)]>0x0||_0x3d2b1a?.[_0x487e2f(0x227)]!==this[_0x487e2f(0x1a9)])return;let _0x467e0d={'id':_0x3d2b1a[_0x487e2f(0x23e)],'params':{'actions':_0x3d2b1a['redoState'][_0x487e2f(0x208)],'textRanges':null,'unitId':_0x3d2b1a[_0x487e2f(0x227)]},'type':_0x8f800b[_0x487e2f(0x1aa)]};this[_0x487e2f(0x202)][_0x487e2f(0x209)](_0x451c27(_0x467e0d));});this['_disposables'][_0x55640a(0x209)](_0x586343(()=>_0x469f77[_0x55640a(0x184)]()));}},ce=new Set(['formula.mutation.set-trigger-formula-calculation-start',_0x11d030(0x2a9),_0x11d030(0x1ae),_0x11d030(0x20e),_0x11d030(0x1b0),_0x11d030(0x170),_0x11d030(0x220)]),le=new Set([_0x11d030(0x1a7),_0x11d030(0x2b7),_0x11d030(0x2a4),_0x11d030(0x232),_0x11d030(0x236),_0x11d030(0x26a),'disposeUnit']);function ue(_0x185bbb,_0x11902c,_0x8c427f){const _0x1f94cd=_0x11d030;let _0x3e9e3d=_0x306570[_0x1f94cd(0x1f8)](_0x185bbb);return{async 'execute'(_0x545869,_0x4914ff){const _0x204e0e=_0x1f94cd;if(_0x545869['length']>_0x8c427f)throw new j('COLLABORATION_INVALID_INPUT',_0x204e0e(0x183)+_0x8c427f+_0x204e0e(0x2bb));let _0x556ad9=_0x4914ff===_0x204e0e(0x1db)?M(_0x3e9e3d):void 0x0,_0x1fb7f5=de(_0x3e9e3d,_0x11902c);try{return await Function(_0x204e0e(0x1bb),'return\x20(async\x20()\x20=>\x20{\x20'+_0x545869+_0x204e0e(0x1d5))(_0x1fb7f5);}finally{_0x556ad9?.[_0x204e0e(0x28c)]();}}};}function de(_0x23df8a,_0x5ed174){return new Proxy(_0x23df8a,{'get'(_0xf97b9a,_0x4fd001,_0x323b92){const _0x31fdc7=_0x583c;return le['has'](_0x4fd001)?()=>{const _0x11bd01=_0x583c;throw new j(_0x11bd01(0x216),_0x11bd01(0x241)+_0x5ed174+_0x11bd01(0x144)+String(_0x4fd001));}:Reflect[_0x31fdc7(0x165)](_0xf97b9a,_0x4fd001,_0x323b92);}});}function M(_0x34e775){const _0x55db97=_0x11d030;return _0x34e775[_0x55db97(0x297)](_0x34e775[_0x55db97(0x26e)][_0x55db97(0x2b4)],_0x324ea7=>{const _0x2ce62a=_0x55db97;let _0x8c3c29=_0x324ea7;if(N(_0x8c3c29))throw _0x8c3c29[_0x2ce62a(0x292)]=!0x0,new j(_0x2ce62a(0x216),_0x2ce62a(0x185)+_0x8c3c29['id']);});}function N(_0x56d70e){const _0x15ca2e=_0x11d030;return _0x56d70e['type']===_0x8f800b[_0x15ca2e(0x29b)]||_0x56d70e[_0x15ca2e(0x201)]===_0x8f800b[_0x15ca2e(0x1aa)]&&!ce[_0x15ca2e(0x257)](_0x56d70e['id']);}function P(_0x9d139d){const _0x18c0f5=_0x11d030;if(_0x9d139d===void 0x0)return null;if(_0x9d139d===null||typeof _0x9d139d==_0x18c0f5(0x199)||typeof _0x9d139d=='string')return _0x9d139d;if(typeof _0x9d139d==_0x18c0f5(0x14f)){if(Number[_0x18c0f5(0x226)](_0x9d139d))return _0x9d139d;throw I();}if(Array['isArray'](_0x9d139d))return _0x9d139d[_0x18c0f5(0x258)](P);if(F(_0x9d139d))return Object['fromEntries'](Object[_0x18c0f5(0x187)](_0x9d139d)[_0x18c0f5(0x258)](([_0x2b10c1,_0x17240b])=>[_0x2b10c1,P(_0x17240b)]));throw I();}function F(_0x24b3fa){const _0xe44fb6=_0x11d030;if(typeof _0x24b3fa!=_0xe44fb6(0x224)||!_0x24b3fa)return!0x1;let _0x103a50=Object[_0xe44fb6(0x1fc)](_0x24b3fa);return _0x103a50===Object[_0xe44fb6(0x1b8)]||_0x103a50===null;}function I(){const _0x6aba45=_0x11d030;return new j('COLLABORATION_INVALID_INPUT',_0x6aba45(0x1e1));}var L=class{[_0x11d030(0x23b)]=Promise[_0x11d030(0x22c)]();[_0x11d030(0x17c)](_0x1434e7){const _0x16f9ab=_0x11d030;let _0x57b575=this['_tail'][_0x16f9ab(0x198)](_0x1434e7,_0x1434e7);return this[_0x16f9ab(0x23b)]=_0x57b575['then'](()=>void 0x0,()=>void 0x0),_0x57b575;}};function R(_0x26f95b,_0xac565d,_0x22e774,_0x37ee6e){const _0x215f8a=_0x11d030;if(!Array[_0x215f8a(0x135)](_0x26f95b))throw new j(_0x215f8a(0x20c),_0x215f8a(0x278));let _0x5035c0=[..._0x26f95b][_0x215f8a(0x2b8)]((_0x154213,_0x50829f)=>_0x154213[_0x215f8a(0x1b6)]-_0x50829f[_0x215f8a(0x1b6)]),_0x4d5331=_0x37ee6e;for(let _0x275557 of _0x5035c0){if(!_0x275557||typeof _0x275557!=_0x215f8a(0x224)||!Array[_0x215f8a(0x135)](_0x275557[_0x215f8a(0x1bc)])||_0x275557[_0x215f8a(0x1bc)][_0x215f8a(0x1cf)](_0x4d5830=>!_0x4d5830||typeof _0x4d5830!=_0x215f8a(0x224)||!('id'in _0x4d5830)||typeof _0x4d5830['id']!='string'||!(_0x215f8a(0x1a2)in _0x4d5830)||typeof _0x4d5830['data']!=_0x215f8a(0x27f))||!Number['isSafeInteger'](_0x275557[_0x215f8a(0x22d)])||!Number[_0x215f8a(0x140)](_0x275557[_0x215f8a(0x1b6)])||_0x275557[_0x215f8a(0x231)]!==_0xac565d||_0x275557[_0x215f8a(0x201)]!==_0x22e774||_0x275557[_0x215f8a(0x22d)]!==_0x4d5331||_0x275557[_0x215f8a(0x1b6)]!==_0x4d5331+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0x215f8a(0x150));_0x4d5331=_0x275557[_0x215f8a(0x1b6)];}return _0x5035c0;}function z(_0x4f1c73){const _0x59bc0d=_0x11d030;return{'baseRevision':_0x4f1c73[_0x59bc0d(0x22d)],'mutationCount':_0x4f1c73[_0x59bc0d(0x1bc)][_0x59bc0d(0x27b)],'revision':_0x4f1c73[_0x59bc0d(0x1b6)],..._0x4f1c73[_0x59bc0d(0x1fd)]===void 0x0?{}:{'sid':_0x4f1c73['sid']},..._0x4f1c73[_0x59bc0d(0x200)]===void 0x0?{}:{'reqId':_0x4f1c73[_0x59bc0d(0x200)]}};}function B(_0x180a9a,_0x5495b8,_0xa19ac8,_0x158a93,_0x58348b,_0x5abc08=_0x11d030(0x27d)){const _0x1c21b6=_0x11d030;if(_0x58348b[_0x1c21b6(0x1cf)](_0x2f4ab4=>_0x2f4ab4[_0x1c21b6(0x1bc)][_0x1c21b6(0x1cf)](_0x2015e6=>_0x2015e6['id']===_0x4e6ffd['id'])))throw new j(_0x1c21b6(0x20c),_0x1c21b6(0x1e5));let _0x156531=_0x158a93;for(let _0x4bacfe of _0x58348b){let _0x3efcb1=_0x156531+0x1;if(_0x4bacfe[_0x1c21b6(0x231)]!==_0x5495b8||_0x4bacfe['type']!==_0xa19ac8||_0x4bacfe[_0x1c21b6(0x22d)]!==_0x156531||_0x4bacfe[_0x1c21b6(0x1b6)]!==_0x3efcb1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0x1c21b6(0x13b));let _0x2256d6=_0x2b9af6(_0x4bacfe),_0x41a6a5=_0x180a9a[_0x1c21b6(0x161)][_0x1c21b6(0x1b9)][_0x1c21b6(0x24a)]()[_0x1c21b6(0x1ea)],_0x15fa6a=_0x180a9a[_0x1c21b6(0x161)][_0x1c21b6(0x1b9)][_0x1c21b6(0x207)](_0x41a6a5)(_0x2256d6[_0x1c21b6(0x1bc)],null)??_0x2256d6[_0x1c21b6(0x1bc)],_0x4a6ed1=_0xd0978b(_0x15fa6a,_0x180a9a[_0x1c21b6(0x286)],_0x5abc08==='initial'?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x4a6ed1[_0x1c21b6(0x240)])throw new j(_0x1c21b6(0x168),_0x1c21b6(0x1ef)+_0x4a6ed1[_0x1c21b6(0x2a6)]+':\x20'+String(_0x4a6ed1[_0x1c21b6(0x218)]));let _0x55ca0d=_0x180a9a[_0x1c21b6(0x23a)][_0x1c21b6(0x1d8)](_0x5495b8);if(_0x55ca0d!==_0x3efcb1)throw new j(_0x1c21b6(0x20c),_0x1c21b6(0x152));_0x156531=_0x55ca0d;}return _0x156531;}function V(_0x1ed3d0,_0xe3fd51,_0x541809){const _0x5ea22f=_0x11d030;let _0x50c236=_0x306570[_0x5ea22f(0x1f8)](_0x1ed3d0);switch(_0x541809){case _0x20b30d['UNIVER_SHEET']:return H(_0x50c236[_0x5ea22f(0x190)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x2b2)]:return H(_0x50c236['getDocument'](_0xe3fd51)?.['save'](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x1dc)]:return H(_0x50c236[_0x5ea22f(0x153)](_0xe3fd51)?.['save'](),_0xe3fd51);case _0x20b30d['UNIVER_BASE']:return H(_0x50c236[_0x5ea22f(0x264)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);case _0x20b30d[_0x5ea22f(0x29a)]:return H(_0x50c236[_0x5ea22f(0x17f)](_0xe3fd51)?.[_0x5ea22f(0x246)](),_0xe3fd51);default:throw new j(_0x5ea22f(0x216),_0x5ea22f(0x195)+_0x541809);}}function H(_0x2a9e08,_0x5eab3b){const _0xbadb06=_0x11d030;if(_0x2a9e08===void 0x0)throw new j('COLLABORATION_LOAD_FAILED','Unit\x20'+_0x5eab3b+_0xbadb06(0x27a));return structuredClone(_0x2a9e08);}var fe=class{[_0x11d030(0x227)];['unitType'];[_0x11d030(0x273)];[_0x11d030(0x270)];[_0x11d030(0x262)];[_0x11d030(0x2be)];[_0x11d030(0x206)];[_0x11d030(0x254)]=!0x0;[_0x11d030(0x139)]=!0x1;[_0x11d030(0x293)];[_0x11d030(0x21e)];[_0x11d030(0x287)]=new L();[_0x11d030(0x21b)]=[];[_0x11d030(0x1a3)];[_0x11d030(0x210)]=null;['_awaiting']=null;['_sid']=crypto[_0x11d030(0x238)]();[_0x11d030(0x2ae)]=0x1;constructor(_0x427db6,_0x543062,_0x373e60,_0x215380,_0x3e7b22,_0x2b7c52,_0x1a3c0b){const _0x473bbc=_0x11d030;this[_0x473bbc(0x227)]=_0x427db6,this[_0x473bbc(0x296)]=_0x543062,this[_0x473bbc(0x273)]=_0x373e60,this[_0x473bbc(0x270)]=_0x215380,this[_0x473bbc(0x262)]=_0x3e7b22,this[_0x473bbc(0x2be)]=_0x2b7c52,this[_0x473bbc(0x1a3)]=_0x373e60,this[_0x473bbc(0x293)]=new se(_0x2b7c52,_0x427db6,_0x543062),this['_executor']=ue(_0x3e7b22,_0x427db6,_0x1a3c0b);}['getState'](){const _0x4c5c4f=_0x11d030;return{'awaitingChangeset':this[_0x4c5c4f(0x1d9)]===null?null:U(this[_0x4c5c4f(0x1d9)]),'baseRevision':this[_0x4c5c4f(0x273)],'bufferedChangesetCount':this[_0x4c5c4f(0x21b)][_0x4c5c4f(0x27b)],'conflict':this[_0x4c5c4f(0x210)],'connection':this[_0x4c5c4f(0x139)]?'closed':this[_0x4c5c4f(0x270)]['getConnectionState'](),'knownHeadRevision':this[_0x4c5c4f(0x1a3)],'pendingMutationCount':this[_0x4c5c4f(0x293)]['pending'][_0x4c5c4f(0x27b)]};}[_0x11d030(0x22f)](){const _0x3b62c6=_0x11d030;return structuredClone(this[_0x3b62c6(0x293)][_0x3b62c6(0x19d)]);}[_0x11d030(0x247)](){const _0xe6dc5c=_0x11d030;return this[_0xe6dc5c(0x171)]()||this[_0xe6dc5c(0x287)]['run'](async()=>(this[_0xe6dc5c(0x26c)](_0xe6dc5c(0x247)),await this[_0xe6dc5c(0x1d1)]()));}[_0x11d030(0x159)](){const _0x179a6e=_0x11d030;return this[_0x179a6e(0x171)]()||this['_operations'][_0x179a6e(0x17c)](async()=>{const _0x188f72=_0x179a6e;if(this[_0x188f72(0x26c)](_0x188f72(0x159)),await this[_0x188f72(0x1d1)](),this['_bufferedChangesets'][_0x188f72(0x27b)]===0x0)return{'state':this['getState'](),'status':_0x188f72(0x1d4)};let _0x5cd4af=[...this['_bufferedChangesets']];if(_0x5cd4af[_0x188f72(0x1cf)](_0x20f947=>_0x20f947['mutations'][_0x188f72(0x1cf)](_0xa322b9=>_0xa322b9['id']===_0x4e6ffd['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x188f72(0x19a));let _0x2ea5a2=this[_0x188f72(0x273)],_0x3c5e0d=this[_0x188f72(0x1d9)]?W(this[_0x188f72(0x1d9)][_0x188f72(0x1bc)],this[_0x188f72(0x227)],this[_0x188f72(0x296)],this[_0x188f72(0x273)]):null,_0x583c7c=_0x2b9af6({'baseRev':this[_0x188f72(0x273)],'memberID':'','mutations':[...this[_0x188f72(0x293)]['pending']],'revision':0x0,'type':this[_0x188f72(0x296)],'unitID':this[_0x188f72(0x227)],'userID':''})[_0x188f72(0x1bc)],_0x4d851e=[];for(let _0x229564 of _0x5cd4af){let _0x38f4e3=_0x2b9af6(_0x229564);if(this[_0x188f72(0x1d9)]!==null&&_0x229564[_0x188f72(0x1fd)]===this[_0x188f72(0x1d9)]['sid']&&_0x229564[_0x188f72(0x200)]===this[_0x188f72(0x1d9)][_0x188f72(0x200)]){let _0x162066=(_0x3c5e0d??[])['map'](_0x451c27);G(_0x229564['mutations'],_0x162066)||await this['_closeAfterFatalError'](new j(_0x188f72(0x20c),_0x188f72(0x245))),_0x4d851e[_0x188f72(0x209)]({'changeset':_0x229564,'kind':_0x188f72(0x14b)}),_0x3c5e0d=null;continue;}let _0x331a7b=_0x38f4e3[_0x188f72(0x1bc)];if(_0x3c5e0d!==null){let _0x59b560=this[_0x188f72(0x2be)][_0x188f72(0x147)]['transformMutations'](_0x331a7b,_0x3c5e0d,!0x1);if(!_0x4dd855(_0x59b560))return this[_0x188f72(0x210)]={'message':_0x59b560['error'][_0x188f72(0x1c5)],'operation':'pull','reason':'transform-failed'},{'conflict':this['_conflict'],'state':this[_0x188f72(0x1f7)](),'status':'conflict'};_0x331a7b=_0x59b560[_0x188f72(0x1df)],_0x3c5e0d=_0x59b560[_0x188f72(0x290)];}let _0x223186=this['_kernel']['transformService'][_0x188f72(0x242)](_0x331a7b,_0x583c7c,!0x1);if(!_0x4dd855(_0x223186))return this[_0x188f72(0x210)]={'message':_0x223186[_0x188f72(0x218)][_0x188f72(0x1c5)],'operation':_0x188f72(0x159),'reason':_0x188f72(0x136)},{'conflict':this[_0x188f72(0x210)],'state':this[_0x188f72(0x1f7)](),'status':_0x188f72(0x1ce)};_0x4d851e[_0x188f72(0x209)]({'changeset':_0x437dd3({..._0x38f4e3,'mutations':_0x223186[_0x188f72(0x1df)]}),'kind':'remote'}),_0x583c7c=_0x223186[_0x188f72(0x290)];}let _0x1aecfa=_0x2ea5a2;for(let _0x567921 of _0x4d851e){if(_0x567921[_0x188f72(0x196)]==='awaiting-ack'){let _0x524fb1=this[_0x188f72(0x2be)]['revisionService'][_0x188f72(0x1d8)](this[_0x188f72(0x227)]);_0x524fb1!==_0x567921[_0x188f72(0x219)][_0x188f72(0x1b6)]&&await this[_0x188f72(0x1da)](new j(_0x188f72(0x20c),_0x188f72(0x1e8))),_0x1aecfa=_0x524fb1;continue;}_0x1aecfa=await this[_0x188f72(0x19b)](_0x1aecfa,[_0x567921[_0x188f72(0x219)]]);}return this['_capture'][_0x188f72(0x28d)](_0x583c7c[_0x188f72(0x258)](_0x451c27)),this[_0x188f72(0x1d9)]!==null&&(this[_0x188f72(0x1d9)]=_0x3c5e0d===null?null:{...this[_0x188f72(0x1d9)],'baseRev':_0x1aecfa,'mutations':_0x3c5e0d['map'](_0x451c27)}),this[_0x188f72(0x273)]=_0x1aecfa,this['_bufferedChangesets'][_0x188f72(0x193)](0x0),{'appliedChangesets':_0x5cd4af[_0x188f72(0x258)](z),'fromRevision':_0x2ea5a2,'state':this[_0x188f72(0x1f7)](),'status':_0x188f72(0x164),'toRevision':_0x1aecfa,'transformedPendingMutationCount':_0x583c7c['length']};});}[_0x11d030(0x1e3)](){const _0x3413d8=_0x11d030;return this[_0x3413d8(0x171)]()||this[_0x3413d8(0x287)]['run'](async()=>{const _0x10f789=_0x3413d8;this[_0x10f789(0x26c)](_0x10f789(0x1e3));let _0x40e103=[],_0x1ba918=[];if(this[_0x10f789(0x1d9)]===null){if(this[_0x10f789(0x293)][_0x10f789(0x19d)]['length']===0x0)return{'state':this[_0x10f789(0x1f7)](),'status':'nothing-to-commit'};if(await this['_fetchChangesets'](),this[_0x10f789(0x21b)][_0x10f789(0x27b)]>0x0)return{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x40e103,'knownHeadRevision':this[_0x10f789(0x1a3)],'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1c8)};this[_0x10f789(0x137)]();}for(;this[_0x10f789(0x1d9)]!==null;){let _0x56929e=this[_0x10f789(0x1d9)],_0x500b04;try{_0x500b04=await this['_handle'][_0x10f789(0x2aa)](_0x56929e);}catch{return{'changeset':U(_0x56929e),'confirmedChangesets':_0x40e103,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1a6)};}if(_0x500b04['status']===_0x10f789(0x276)||_0x500b04[_0x10f789(0x13a)]===_0x10f789(0x1a6))return{'changeset':U(_0x56929e),'confirmedChangesets':_0x40e103,'state':this['getState'](),'status':_0x500b04['status']};if(_0x500b04[_0x10f789(0x13a)]===_0x10f789(0x2a1))return _0x500b04[_0x10f789(0x265)]===_0x10f789(0x154)?(this[_0x10f789(0x293)]['prependPending'](_0x56929e[_0x10f789(0x1bc)]),this['_awaiting']=null,await this[_0x10f789(0x1d1)](),{'baseRevision':this['_baseRevision'],'confirmedChangesets':_0x40e103,'knownHeadRevision':this[_0x10f789(0x1a3)],'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1c8)}):(this[_0x10f789(0x210)]={'message':_0x500b04[_0x10f789(0x1c5)],'operation':_0x10f789(0x1e3),'reason':_0x500b04[_0x10f789(0x265)]===_0x10f789(0x23f)?_0x10f789(0x18a):'changeset-rejected'},{'conflict':this[_0x10f789(0x210)],'confirmedChangesets':_0x40e103,'state':this['getState'](),'status':'conflict'});let _0x448a28=_0x500b04[_0x10f789(0x2ab)];try{this[_0x10f789(0x212)](_0x56929e,_0x500b04[_0x10f789(0x1e4)],_0x448a28);}catch(_0x52f375){await this['_closeAfterFatalError'](_0x52f375);}let _0x5ed26a=_0x56929e[_0x10f789(0x1bc)];if(_0x500b04[_0x10f789(0x1e4)][_0x10f789(0x27b)]>0x0){let _0x239f6e=await this[_0x10f789(0x13f)](_0x56929e,_0x500b04[_0x10f789(0x1e4)]);if(_0x239f6e===null)return{'conflict':this[_0x10f789(0x210)],'confirmedChangesets':_0x40e103,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1ce)};_0x5ed26a=_0x239f6e[_0x10f789(0x181)];try{this[_0x10f789(0x2a3)](_0x500b04[_0x10f789(0x1e4)]);}catch(_0x54bb19){await this[_0x10f789(0x1da)](_0x54bb19);}_0x1ba918[_0x10f789(0x209)](..._0x500b04[_0x10f789(0x1e4)][_0x10f789(0x258)](z));}G(_0x448a28[_0x10f789(0x1bc)],_0x5ed26a)||await this[_0x10f789(0x1da)](new j(_0x10f789(0x20c),'Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset'));let _0x445ae6=this[_0x10f789(0x2be)]['revisionService'][_0x10f789(0x1d8)](this[_0x10f789(0x227)]);if(_0x445ae6!==_0x448a28[_0x10f789(0x1b6)]&&await this[_0x10f789(0x1da)](new j('COLLABORATION_PROTOCOL_ERROR','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision')),this[_0x10f789(0x273)]=_0x445ae6,this['_knownHeadRevision']=Math[_0x10f789(0x21a)](this['_knownHeadRevision'],_0x445ae6),this[_0x10f789(0x1d9)]=null,_0x40e103[_0x10f789(0x209)](z(_0x448a28)),this[_0x10f789(0x293)][_0x10f789(0x19d)][_0x10f789(0x27b)]===0x0)break;this[_0x10f789(0x137)]();}return{'confirmedChangesets':_0x40e103,'reconciledChangesets':_0x1ba918,'state':this[_0x10f789(0x1f7)](),'status':_0x10f789(0x1ff)};});}async[_0x11d030(0x1d1)](){const _0x2d7f64=_0x11d030;let _0x51e540=this[_0x2d7f64(0x1a3)],_0x56975e=await this[_0x2d7f64(0x270)][_0x2d7f64(0x1e9)](_0x51e540,void 0x0);if(_0x400ff3(_0x56975e['error'])){let _0x46f56c=_0x56975e[_0x2d7f64(0x218)];throw new j(_0x2d7f64(0x2b1),_0x46f56c?.[_0x2d7f64(0x1c5)]||_0x2d7f64(0x22e),{'retryable':!0x0});}let _0x51e34a=R(_0x56975e[_0x2d7f64(0x157)],this[_0x2d7f64(0x227)],this[_0x2d7f64(0x296)],_0x51e540),_0x5cd392=_0x51e34a['at'](-0x1)?.[_0x2d7f64(0x1b6)]??_0x51e540;if(_0x56975e[_0x2d7f64(0x21f)]!==void 0x0&&_0x56975e[_0x2d7f64(0x21f)]!==_0x5cd392)throw new j(_0x2d7f64(0x20c),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range');return _0x51e34a[_0x2d7f64(0x27b)]===0x0?{'knownHeadRevision':this[_0x2d7f64(0x1a3)],'state':this[_0x2d7f64(0x1f7)](),'status':'unchanged'}:(this[_0x2d7f64(0x21b)][_0x2d7f64(0x209)](..._0x51e34a),this[_0x2d7f64(0x1a3)]=_0x5cd392,{'changesets':_0x51e34a['map'](z),'fromRevision':_0x51e540,'state':this['getState'](),'status':_0x2d7f64(0x259),'toRevision':_0x5cd392});}['_createAwaitingFromPending'](){const _0x366f13=_0x11d030;let _0x5ce555=this[_0x366f13(0x293)][_0x366f13(0x2a0)]();this['_awaiting']={'baseRev':this['_baseRevision'],'mutations':_0x5ce555,'reqId':this[_0x366f13(0x2ae)],'sid':this[_0x366f13(0x285)]},this[_0x366f13(0x2ae)]+=0x1;}[_0x11d030(0x212)](_0x1673e0,_0x3cafb6,_0x7e21b2){const _0xc0ba80=_0x11d030;let _0x591efc=R(_0x3cafb6,this[_0xc0ba80(0x227)],this[_0xc0ba80(0x296)],this[_0xc0ba80(0x273)])['at'](-0x1)?.[_0xc0ba80(0x1b6)]??this[_0xc0ba80(0x273)];if(_0x7e21b2[_0xc0ba80(0x231)]!==this[_0xc0ba80(0x227)]||_0x7e21b2[_0xc0ba80(0x201)]!==this[_0xc0ba80(0x296)]||_0x7e21b2[_0xc0ba80(0x1fd)]!==_0x1673e0[_0xc0ba80(0x1fd)]||_0x7e21b2[_0xc0ba80(0x200)]!==_0x1673e0['reqId']||_0x7e21b2[_0xc0ba80(0x22d)]!==_0x591efc||_0x7e21b2[_0xc0ba80(0x1b6)]!==_0x591efc+0x1)throw new j('COLLABORATION_PROTOCOL_ERROR',_0xc0ba80(0x251));}async[_0x11d030(0x13f)](_0xce8cf1,_0xbcb0e8){const _0x129b34=_0x11d030;let _0x3b3948=W(_0xce8cf1[_0x129b34(0x1bc)],this[_0x129b34(0x227)],this[_0x129b34(0x296)],this['_baseRevision']),_0x8aebaf=W(this[_0x129b34(0x293)][_0x129b34(0x19d)],this[_0x129b34(0x227)],this[_0x129b34(0x296)],this[_0x129b34(0x273)]),_0x6c6396=[];for(let _0x261f9b of _0xbcb0e8){let _0x59ea19=_0x2b9af6(_0x261f9b),_0x189a1f=this[_0x129b34(0x2be)]['transformService'][_0x129b34(0x242)](_0x59ea19[_0x129b34(0x1bc)],_0x3b3948,!0x1);if(!_0x4dd855(_0x189a1f))return this[_0x129b34(0x237)](_0x129b34(0x1e3),_0x189a1f[_0x129b34(0x218)]),null;_0x3b3948=_0x189a1f['m2Prime'];let _0x37eada=this[_0x129b34(0x2be)]['transformService']['transformMutations'](_0x189a1f['m1Prime'],_0x8aebaf,!0x1);if(!_0x4dd855(_0x37eada))return this['_setTransformConflict']('commit',_0x37eada[_0x129b34(0x218)]),null;_0x8aebaf=_0x37eada[_0x129b34(0x290)],_0x6c6396['push'](_0x437dd3({..._0x59ea19,'mutations':_0x37eada['m1Prime']}));}let _0x29c867=await this[_0x129b34(0x19b)](this[_0x129b34(0x273)],_0x6c6396);return this[_0x129b34(0x293)][_0x129b34(0x28d)](_0x8aebaf[_0x129b34(0x258)](_0x451c27)),this[_0x129b34(0x273)]=_0x29c867,{'awaitingMutations':_0x3b3948['map'](_0x451c27),'revision':_0x29c867};}[_0x11d030(0x237)](_0x4b3157,_0x12645e){const _0x1c40fe=_0x11d030;this[_0x1c40fe(0x210)]={'message':_0x12645e[_0x1c40fe(0x1c5)],'operation':_0x4b3157,'reason':'transform-failed'};}async[_0x11d030(0x19b)](_0x3ebe1f,_0x31c5af){const _0x28c22a=_0x11d030;try{return await this['_capture'][_0x28c22a(0x1de)](async()=>B(this[_0x28c22a(0x2be)],this[_0x28c22a(0x227)],this[_0x28c22a(0x296)],_0x3ebe1f,_0x31c5af,_0x28c22a(0x27c)));}catch(_0x3f2b80){return await this[_0x28c22a(0x1da)](_0x3f2b80);}}async[_0x11d030(0x1da)](_0x37d1c4){const _0x4afbe0=_0x11d030;this[_0x4afbe0(0x254)]=!0x1,this['_closePromise']??=this[_0x4afbe0(0x233)]();try{await this[_0x4afbe0(0x206)];}catch{}throw _0x37d1c4;}[_0x11d030(0x2a3)](_0xff8c3b){const _0x1dc56c=_0x11d030;let _0x1cd581=_0xff8c3b['at'](-0x1)?.['revision'];if(_0x1cd581===void 0x0||this[_0x1dc56c(0x21b)][_0x1dc56c(0x27b)]===0x0)return;let _0xc620e9=this[_0x1dc56c(0x21b)]['findIndex'](({revision:_0x449c7c})=>_0x449c7c>_0x1cd581),_0x177470=this[_0x1dc56c(0x21b)][_0x1dc56c(0x2ac)](0x0,_0xc620e9===-0x1?this['_bufferedChangesets'][_0x1dc56c(0x27b)]:_0xc620e9);for(let _0xc13910 of _0x177470){let _0x3bfaa1=_0xff8c3b[_0x1dc56c(0x20f)](({revision:_0x432f31})=>_0x432f31===_0xc13910[_0x1dc56c(0x1b6)]);if(!_0x3bfaa1||!pe(_0xc13910,_0x3bfaa1))throw new j(_0x1dc56c(0x20c),_0x1dc56c(0x13e));}this['_bufferedChangesets']['splice'](0x0,_0x177470['length']);}['execute'](_0xfa09a9){const _0x2d6274=_0x11d030;return this[_0x2d6274(0x171)]()||this['_operations'][_0x2d6274(0x17c)](async()=>{const _0x4b6678=_0x2d6274;_0xfa09a9[_0x4b6678(0x253)]===_0x4b6678(0x16d)&&this[_0x4b6678(0x26c)](_0x4b6678(0x16d));let _0x465def=this[_0x4b6678(0x293)]['pending'][_0x4b6678(0x27b)],_0x4e8ec7=P(await this[_0x4b6678(0x21e)][_0x4b6678(0x162)](_0xfa09a9[_0x4b6678(0x1e2)],_0xfa09a9[_0x4b6678(0x253)]));return _0xfa09a9['mode']===_0x4b6678(0x1db)?{'state':this[_0x4b6678(0x1f7)](),'value':_0x4e8ec7}:{'mutations':this['_capture']['snapshotFrom'](_0x465def),'state':this[_0x4b6678(0x1f7)](),'value':_0x4e8ec7};});}[_0x11d030(0x2a2)](_0x187042){const _0x37eb1b=_0x11d030;return this[_0x37eb1b(0x171)]()||this[_0x37eb1b(0x287)][_0x37eb1b(0x17c)](async()=>{const _0x5602fc=_0x37eb1b;if(this['_assertMutableState'](_0x5602fc(0x2b0)),this[_0x5602fc(0x1d9)]!==null)throw new j(_0x5602fc(0x216),_0x5602fc(0x2af));let _0x1af2b8=me(_0x187042),_0x113202=[...this[_0x5602fc(0x293)]['pending']];this[_0x5602fc(0x293)][_0x5602fc(0x28d)](_0x1af2b8);let _0x33d270=this[_0x5602fc(0x1f7)]();return{'pendingMutationCount':_0x1af2b8['length'],'previousMutationCount':_0x113202[_0x5602fc(0x27b)],'state':_0x33d270};});}[_0x11d030(0x186)](){const _0xafe301=_0x11d030;return this['_rejectIfNotAccepting']()||this[_0xafe301(0x287)]['run'](async()=>V(this[_0xafe301(0x262)],this[_0xafe301(0x227)],this[_0xafe301(0x296)]));}[_0x11d030(0x192)](){const _0x220f84=_0x11d030;return this[_0x220f84(0x206)]?this[_0x220f84(0x206)]:(this['_acceptingOperations']=!0x1,this[_0x220f84(0x206)]=this[_0x220f84(0x287)][_0x220f84(0x17c)](async()=>await this['_closeOwnedResources']()),this['_closePromise']);}async[_0x11d030(0x233)](){const _0x2d4b4f=_0x11d030;try{this[_0x2d4b4f(0x293)][_0x2d4b4f(0x28c)](),await this[_0x2d4b4f(0x270)][_0x2d4b4f(0x192)]();}finally{try{this['_univer'][_0x2d4b4f(0x28c)]();}finally{this[_0x2d4b4f(0x139)]=!0x0;}}}['_rejectIfNotAccepting'](){const _0x4936b5=_0x11d030;return this[_0x4936b5(0x254)]?null:Promise[_0x4936b5(0x18c)](new j(_0x4936b5(0x1bd),_0x4936b5(0x14d)));}[_0x11d030(0x26c)](_0x451ac8){const _0x559fda=_0x11d030;if(this[_0x559fda(0x210)]!==null)throw new j(_0x559fda(0x216),_0x559fda(0x1f9)+_0x451ac8+_0x559fda(0x1d0));}};function U(_0x432e77){const _0xd44b17=_0x11d030;return{'baseRevision':_0x432e77[_0xd44b17(0x22d)],'mutationCount':_0x432e77[_0xd44b17(0x1bc)][_0xd44b17(0x27b)],'reqId':_0x432e77[_0xd44b17(0x200)],'revision':0x0,'sid':_0x432e77[_0xd44b17(0x1fd)]};}function W(_0x443f84,_0x2d33e3,_0x1e89ec,_0x3f9226){return _0x2b9af6({'baseRev':_0x3f9226,'memberID':'','mutations':[..._0x443f84],'revision':0x0,'type':_0x1e89ec,'unitID':_0x2d33e3,'userID':''})['mutations'];}function pe(_0x7bce1c,_0x13283f){const _0x29a6d5=_0x11d030;return _0x7bce1c[_0x29a6d5(0x231)]===_0x13283f[_0x29a6d5(0x231)]&&_0x7bce1c[_0x29a6d5(0x201)]===_0x13283f[_0x29a6d5(0x201)]&&_0x7bce1c['baseRev']===_0x13283f[_0x29a6d5(0x22d)]&&_0x7bce1c[_0x29a6d5(0x1b6)]===_0x13283f[_0x29a6d5(0x1b6)]&&_0x7bce1c['sid']===_0x13283f['sid']&&_0x7bce1c[_0x29a6d5(0x200)]===_0x13283f[_0x29a6d5(0x200)]&&JSON[_0x29a6d5(0x1be)](_0x7bce1c[_0x29a6d5(0x1bc)])===JSON[_0x29a6d5(0x1be)](_0x13283f[_0x29a6d5(0x1bc)]);}function G(_0x4d8982,_0x48da8e){const _0x3fb73d=_0x11d030;return _0x4d8982[_0x3fb73d(0x27b)]===_0x48da8e[_0x3fb73d(0x27b)]&&_0x4d8982[_0x3fb73d(0x295)]((_0x49d243,_0x1f99f8)=>_0x49d243['id']===_0x48da8e[_0x1f99f8]?.['id']&&_0x49d243[_0x3fb73d(0x1a2)]===_0x48da8e[_0x1f99f8]?.[_0x3fb73d(0x1a2)]);}function me(_0x31dffd){const _0xc48f20=_0x11d030;if(!Array['isArray'](_0x31dffd))throw new j(_0xc48f20(0x216),_0xc48f20(0x28f));return _0x31dffd[_0xc48f20(0x258)](_0x49ff93=>{const _0x2bc2cc=_0xc48f20;if(!_0x49ff93||typeof _0x49ff93!='object'||typeof _0x49ff93['id']!=_0x2bc2cc(0x27f)||_0x49ff93['id'][_0x2bc2cc(0x27b)]===0x0||typeof _0x49ff93[_0x2bc2cc(0x1a2)]!=_0x2bc2cc(0x27f))throw new j(_0x2bc2cc(0x216),'Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields');return{'data':_0x49ff93[_0x2bc2cc(0x1a2)],'id':_0x49ff93['id']};});}var K=class extends _0xfef6ce{[_0x11d030(0x15d)];[_0x11d030(0x1d3)];static [_0x11d030(0x277)]=_0x11d030(0x29c);constructor(_0x1bf960,_0x12fdec){const _0x2315df=_0x11d030;super(),this[_0x2315df(0x15d)]=_0x1bf960,this[_0x2315df(0x1d3)]=_0x12fdec;}[_0x11d030(0x249)](){const _0x37fd23=_0x11d030;this[_0x37fd23(0x15d)][_0x37fd23(0x282)]!==void 0x0&&_0x56afce(this['_injector'],[[_0x4dc918,{'useValue':this[_0x37fd23(0x15d)][_0x37fd23(0x282)]}]]),this[_0x37fd23(0x15d)][_0x37fd23(0x249)]({'commandService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x16b588),'compressMutationService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x79e251),'instanceService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x5896bb),'injector':this[_0x37fd23(0x1d3)],'revisionService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x3614fb),'transformService':this[_0x37fd23(0x1d3)][_0x37fd23(0x165)](_0x4fd054)});}};K=_0x16ecd6([_0x402b0b(_0x382b63),_0xc64a00(0x1,_0x2dcc67(_0x3a4ce6))],K);function he(_0x3567a7,_0x350d86){const _0x237efe=_0x11d030;let _0x1a04c1;if(_0x3567a7[_0x237efe(0x156)](K,{'onStarting'(_0x20ce2b){_0x1a04c1=_0x20ce2b;},..._0x350d86===void 0x0?{}:{'snapshotServerService':_0x350d86}}),!_0x1a04c1)throw Error(_0x237efe(0x221));return _0x1a04c1;}async function ge(_0x1cfd73,_0x19ec96,_0x658b69){const _0x251d20=_0x11d030;let _0x1c7a93=await _0x1cfd73['getUnitOnRev'](0x0);if(_0x400ff3(_0x1c7a93[_0x251d20(0x218)])){let _0x238bc8=_0x1c7a93[_0x251d20(0x218)];throw new j(_0x251d20(0x168),_0x238bc8?.[_0x251d20(0x1c5)]||_0x251d20(0x18f));}let _0x40e200=_0x1c7a93[_0x251d20(0x225)];if(!_0x40e200)throw new j('COLLABORATION_LOAD_FAILED',_0x251d20(0x1b1));_e(_0x40e200,_0x19ec96,_0x658b69);try{switch(_0x658b69){case _0x20b30d[_0x251d20(0x272)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':await _0x3c8e29(_0x40e200,await q(_0x1cfd73,_0x40e200)),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x2b2)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':_0x9a37bd(_0x40e200),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x1dc)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':_0x3b04ef(_0x40e200),'unitType':_0x658b69};case _0x20b30d[_0x251d20(0x15e)]:return{'changesets':_0x1c7a93[_0x251d20(0x157)],'unitData':await _0xf344e5(_0x40e200,await q(_0x1cfd73,_0x40e200)),'unitType':_0x658b69};case _0x20b30d['UNIVER_BOARD']:return{'changesets':_0x1c7a93['changesets'],'unitData':_0x48a275(_0x40e200),'unitType':_0x658b69};default:throw new j(_0x251d20(0x216),_0x251d20(0x195)+_0x658b69);}}catch(_0x176f43){throw _0x176f43 instanceof j?_0x176f43:new j(_0x251d20(0x168),'Failed\x20to\x20transform\x20the\x20Unit\x20snapshot',{'cause':_0x176f43});}}function _0x5cc0(){const _0xedb916=['getSheetBlock','_memberId','_lease','3PDkQxt','revision','includes','prototype','interceptor','readyState','univerAPI','mutations','COLLABORATION_CLOSED','stringify','changeset_ack','board','Collaboration\x20WebSocket\x20closed\x20before\x20opening','set','CollaborationRuntimeError','injector','message','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','leases','pull-required','_join','online','\x20for\x20Unit\x20','send','ack','conflict','some','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','_fetchChangesets','createUniver','_injector','up-to-date','\x20})();','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','collabWebSocketUrl','incrementRevOfUnit','_awaiting','_closeAfterFatalError','read','UNIVER_SLIDE','promise','suppress','m1Prime','Invalid\x20JSON\x20response','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','code','commit','precedingChangesets','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','accepted','_target','Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision','fetchChangesets','COMPRESS_MUTATION_APPLY','onlyLocal','Runtime\x20for\x20','open','cmd','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','Snapshot\x20contains\x20duplicate\x20block\x20ids','_connectPromise','backend','getUnitData','_handleMessage','params','getState','newAPI','Cannot\x20','originalMeta','format','getPrototypeOf','sid','_captureCommandMutation','confirmed','reqId','type','_pending','base64','unit','6HuLmkO','_closePromise','fetchThroughInterceptors','actions','push','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','_release','COLLABORATION_PROTOCOL_ERROR','permission','formula.mutation.set-calculation-result','find','_conflict','_socket','_validateAcceptedChangeset','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20','Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON','reconnecting','COLLABORATION_INVALID_INPUT','block','error','changeset','max','_bufferedChangesets','8472821BjsHcO','closed','_executor','latestRevision','sheet.mutation.send-init-pivot-text-local','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','memberID','_connection','object','snapshot','isFinite','unitId','_reconnectAttempts','new_changes','9770gjkKRR','retryable','resolve','baseRev','Backend\x20failed\x20to\x20fetch\x20changesets','getPendingMutations','httpRequest','unitID','createDocument','_closeOwnedResources','HEARTBEAT','csShouldRetryEvent','createPresentation','_setTransformConflict','randomUUID','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','revisionService','_tail','12244672MFpGnn','\x20cannot\x20capture\x20mutation\x20','commandId','permission-denied','result','Single-Unit\x20runtime\x20for\x20','transformMutations','timeout','prependPending','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','save','fetch','onMutationExecutedForCollab','onStarting','getInterceptPoints','snapshotFrom','Failed\x20to\x20rejoin\x20Unit\x20room','snapshotServerUrl','add','fetchmissing','timer','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset','csAckEvent','mode','_acceptingOperations','Initial\x20Unit\x20JOIN\x20failed','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','has','map','fetched','collabSubmitChangesetUrl','COMPRESS_MUTATION_SEND','Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command','delete','Failed\x20to\x20open\x20the\x20collaboration\x20backend','pathname','infoRsp','_suppressionDepth','_univer','_subscribeToDocumentState','getBase','reason','unitId\x20must\x20not\x20be\x20empty','searchParams','replace','_handleCollaborationEvent','createUniverSheet','fromChangeset','_assertMutableState','takeInboundChangesets','Event','size','_handle','Failed\x20to\x20fetch\x20preceding\x20changesets','UNIVER_SHEET','_baseRevision','permissionRejEvent','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','retry','pluginName','Backend\x20changesets\x20must\x20be\x20an\x20array','json','\x20is\x20unavailable','length','remote','initial','invalid','string','\x20returned\x20a\x20different\x20block\x20identity','new_changesets','snapshotServerService','Collaboration\x20WebSocket\x20is\x20not\x20online','unshift','_sid','commandService','_operations','Connection\x20timed\x20out','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','_joined','_submissionWaiters','dispose','replacePending','clear','Replacement\x20mutations\x20must\x20be\x20an\x20array','m2Prime','memberId','cancel','_capture','permission_rej','every','unitType','addEvent','getUnitOnRev','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','UNIVER_BOARD','COMMAND','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','collaMsg','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','Collaboration\x20HELLO\x20response\x20is\x20invalid','takePending','rejected','replacePendingMutations','_consumeBufferedPrecedingChangesets','createWorkbook','sheets','index','GET','44184flBWQd','formula.mutation.set-trigger-formula-calculation-stop','submitChangeset','acceptedChangeset','slice','_heartbeat','_nextReqId','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','replace\x20mutations','COLLABORATION_UNAVAILABLE','UNIVER_DOC','workbook','BeforeCommandExecute','changeset_rej','22GpKmaY','createBoard','sort','_commandWaiters','No\x20active\x20Unit\x20leases','\x20character\x20limit','OPEN','acquire','_kernel','isArray','transform-failed','_createAwaitingFromPending','ws:','_closed','status','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','LEAVE','_startHeartbeat','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','_reconcilePrecedingChangesets','isSafeInteger','commitTimeoutMs','changeset-rejected','removeEventListener','\x20cannot\x20call\x20','2931498nEgNhE','invalid-changeset','transformService','_waitForSubmission','http:','waitForSubmission','awaiting-ack','_inbound','Collaboration\x20runtime\x20is\x20closing\x20or\x20closed','protocol','number','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','wsSessionTicketUrl','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','getPresentation','invalid-revision','subscribe','registerPlugin','changesets','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','pull','_disposables','routeKey','https:','_config','UNIVER_BASE','6504196rRFVym','Changeset\x20submission\x20was\x20rejected','compressMutationService','execute','Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range','pulled','get','min','2844150fKbbFC','COLLABORATION_LOAD_FAILED','_requestCommand','_ensureConnected','values','catch','write','eventID','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','formula.mutation.set-formula-data','_rejectIfNotAccepting','The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','trigger','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','wss:','waitForLatestApplied','ticket','application/json','JOIN','sessionTicket','run','RECV','getConnectionState','getBoard','addEventListener','awaitingMutations','44143oaHfxv','Code\x20is\x20longer\x20than\x20the\x20','unsubscribe','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20','exportUnitData','entries','_reconnectTimer','_failCommandWaiters','permission-rejected','_state','reject','name','createUnit','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','getWorkbook','target','close','splice','parse','Unsupported\x20collaboration\x20Unit\x20type:\x20','kind','_stopHeartbeat','then','boolean','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','_replayRemoteChangesets','Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id','pending','Snapshot\x20block\x20','changeset_should_retry','_scheduleReconnect','from','data','_knownHeadRevision','unitData','_connect','unknown','createBase','docStateChange$','_unitId','MUTATION','ensureOnline','offline','finally','formula.mutation.set-trigger-formula-calculation','rev','formula.mutation.set-array-formula-data','Backend\x20returned\x20no\x20Unit\x20snapshot'];_0x5cc0=function(){return _0xedb916;};return _0x5cc0();}function _e(_0x1ad606,_0x38c341,_0x5ca2a0){const _0x2937c4=_0x11d030;if(_0x1ad606[_0x2937c4(0x231)]!==_0x38c341||_0x1ad606['type']!==_0x5ca2a0)throw new j(_0x2937c4(0x168),_0x2937c4(0x158));if(!Number['isSafeInteger'](_0x1ad606['rev'])||_0x1ad606[_0x2937c4(0x1af)]<0x1)throw new j(_0x2937c4(0x168),_0x2937c4(0x1d6));}async function q(_0x2d10f5,_0x53b680){const _0x28ea5e=_0x11d030;let _0x465feb=_0x53b680[_0x28ea5e(0x2b3)];if(!_0x465feb)throw new j(_0x28ea5e(0x168),'Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata');let _0x4d1a28=Object['values'](_0x465feb['blockMeta'])['flatMap'](({blocks:_0x25be3f})=>_0x25be3f);if(new Set(_0x4d1a28)['size']!==_0x4d1a28[_0x28ea5e(0x27b)])throw new j('COLLABORATION_LOAD_FAILED',_0x28ea5e(0x1f1));return await Promise['all'](_0x4d1a28[_0x28ea5e(0x258)](async _0x1ab199=>{const _0x200c2f=_0x28ea5e;let _0x1b4a9f=await _0x2d10f5[_0x200c2f(0x1b2)](_0x1ab199);if(_0x400ff3(_0x1b4a9f['error'])||!_0x1b4a9f[_0x200c2f(0x217)])throw new j(_0x200c2f(0x168),_0x1b4a9f[_0x200c2f(0x218)]?.['message']||_0x200c2f(0x19e)+_0x1ab199+_0x200c2f(0x27a));if(_0x1b4a9f[_0x200c2f(0x217)]['id']!==_0x1ab199)throw new j(_0x200c2f(0x168),_0x200c2f(0x19e)+_0x1ab199+_0x200c2f(0x280));return _0x1b4a9f[_0x200c2f(0x217)];}));}function ve(_0x49429d){const _0x44f544=_0x11d030;let _0x33902b=_0x49429d['maxCodeLength']??0xa00000;if(!Number[_0x44f544(0x140)](_0x33902b)||_0x33902b<=0x0)throw new j(_0x44f544(0x216),_0x44f544(0x256));return{async 'load'(_0x103616,_0x507bd2){const _0x284ec1=_0x44f544;be(_0x103616,_0x507bd2);let _0x2dd458,_0x3afd41={'unitId':_0x103616,'unitType':_0x507bd2},_0x36b5ed={'unitId':_0x103616,'unitType':_0x507bd2,..._0x49429d[_0x284ec1(0x282)]===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x3e959d=_0x284ec1;if(_0x2dd458===void 0x0)throw new j(_0x3e959d(0x168),_0x3e959d(0x173));return _0x2dd458;}}},_0x14b129;try{_0x14b129=await _0x49429d[_0x284ec1(0x1f3)][_0x284ec1(0x1ed)](_0x3afd41);}catch(_0x53d24c){throw new j(_0x284ec1(0x2b1),_0x284ec1(0x25e),{'cause':_0x53d24c,'retryable':!0x0});}let _0x1d66f2;try{_0x1d66f2=await _0x49429d[_0x284ec1(0x1d2)](_0x36b5ed);let _0x1287ec=he(_0x1d66f2,_0x49429d['snapshotServerService']);_0x49429d[_0x284ec1(0x282)]!==void 0x0&&(_0x2dd458=_0x1287ec[_0x284ec1(0x1c4)][_0x284ec1(0x165)](_0x561fda));let _0x4fc58b=await xe(_0x14b129,_0x103616,_0x507bd2);Se(_0x4fc58b,_0x3afd41),Ce(_0x1d66f2,_0x4fc58b);let _0x277bd0=B(_0x1287ec,_0x103616,_0x507bd2,J(_0x4fc58b[_0x284ec1(0x1a4)]),_0x4fc58b[_0x284ec1(0x157)]),_0xb17aa9=await _0x14b129['fetchChangesets'](_0x277bd0,void 0x0);if(_0x400ff3(_0xb17aa9[_0x284ec1(0x218)])){let _0x3e77b2=_0xb17aa9[_0x284ec1(0x218)];throw new j('COLLABORATION_UNAVAILABLE',_0x3e77b2?.[_0x284ec1(0x1c5)]||_0x284ec1(0x299),{'retryable':!0x0});}let _0x407e34=R(_0xb17aa9[_0x284ec1(0x157)],_0x103616,_0x507bd2,_0x277bd0),_0x288a09=_0x407e34['at'](-0x1)?.[_0x284ec1(0x1b6)]??_0x277bd0;if(_0xb17aa9['latestRevision']!==void 0x0&&_0xb17aa9[_0x284ec1(0x21f)]!==_0x288a09)throw new j(_0x284ec1(0x20c),_0x284ec1(0x163));return _0x277bd0=B(_0x1287ec,_0x103616,_0x507bd2,_0x277bd0,_0x407e34),await ye(_0x1287ec),new fe(_0x103616,_0x507bd2,_0x277bd0,_0x14b129,_0x1d66f2,_0x1287ec,_0x33902b);}catch(_0x5e328f){try{await _0x14b129[_0x284ec1(0x192)]();}catch{}try{_0x1d66f2?.['dispose']();}catch{}throw _0x5e328f instanceof j?_0x5e328f:new j(_0x284ec1(0x168),_0x284ec1(0x289),{'cause':_0x5e328f});}}};}async function ye(_0x5c0c06){const _0x514eea=_0x11d030;_0x5c0c06['injector'][_0x514eea(0x257)](_0x25ed85)&&await _0x5c0c06['injector'][_0x514eea(0x165)](_0x25ed85)[_0x514eea(0x177)]();}function be(_0x24da45,_0x1e4ddf){const _0x409a34=_0x11d030;if(_0x24da45['trim']()['length']===0x0)throw new j(_0x409a34(0x216),_0x409a34(0x266));if(_0x1e4ddf!==_0x20b30d[_0x409a34(0x272)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x2b2)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x1dc)]&&_0x1e4ddf!==_0x20b30d[_0x409a34(0x15e)]&&_0x1e4ddf!==_0x20b30d['UNIVER_BOARD'])throw new j('COLLABORATION_INVALID_INPUT',_0x409a34(0x195)+_0x1e4ddf);}async function xe(_0x4ac2a7,_0x478084,_0x8537f6){const _0x126216=_0x11d030;return _0x4ac2a7[_0x126216(0x1fb)]==='unit-data'?await _0x4ac2a7[_0x126216(0x1f4)]():await ge(_0x4ac2a7,_0x478084,_0x8537f6);}function Se(_0x24478a,_0x55bfef){const _0x385c71=_0x11d030;if(_0x24478a[_0x385c71(0x296)]!==_0x55bfef[_0x385c71(0x296)])throw new j(_0x385c71(0x168),'Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type');if(_0x24478a[_0x385c71(0x1a4)]['id']!==_0x55bfef[_0x385c71(0x227)])throw new j(_0x385c71(0x168),_0x385c71(0x19c));J(_0x24478a[_0x385c71(0x1a4)]);}function J(_0x3ec188){const _0x96c00e=_0x11d030;let _0x8c12e3=_0x3ec188[_0x96c00e(0x1af)];if(!Number[_0x96c00e(0x140)](_0x8c12e3)||_0x8c12e3===void 0x0||_0x8c12e3<0x1)throw new j(_0x96c00e(0x168),_0x96c00e(0x20a));return _0x8c12e3;}function _0x583c(_0x4f5cbe,_0x379694){_0x4f5cbe=_0x4f5cbe-0x135;const _0x5cc0ec=_0x5cc0();let _0x583c90=_0x5cc0ec[_0x4f5cbe];return _0x583c90;}function Ce(_0x2cb80e,_0x2f8e14){const _0xd992b5=_0x11d030;switch(_0x2f8e14['unitType']){case _0x20b30d[_0xd992b5(0x272)]:_0x2cb80e['createUnit'](_0x2f8e14[_0xd992b5(0x296)],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d[_0xd992b5(0x2b2)]:_0x2cb80e['createUnit'](_0x2f8e14['unitType'],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d['UNIVER_SLIDE']:_0x2cb80e[_0xd992b5(0x18e)](_0x2f8e14[_0xd992b5(0x296)],structuredClone(_0x2f8e14[_0xd992b5(0x1a4)]));return;case _0x20b30d[_0xd992b5(0x15e)]:_0x2cb80e[_0xd992b5(0x18e)](_0x2f8e14['unitType'],structuredClone(_0x2f8e14['unitData']));return;case _0x20b30d[_0xd992b5(0x29a)]:_0x2cb80e['createUnit'](_0x2f8e14['unitType'],structuredClone(_0x2f8e14['unitData']));return;}}var we=class{[_0x11d030(0x15d)];[_0x11d030(0x1e7)];[_0x11d030(0x1b4)];['format']='snapshot';constructor(_0x522324,_0x11d144,_0x45f4c4){const _0x1faccf=_0x11d030;this[_0x1faccf(0x15d)]=_0x522324,this['_target']=_0x11d144,this[_0x1faccf(0x1b4)]=_0x45f4c4;}[_0x11d030(0x17e)](){const _0xb29223=_0x11d030;return this[_0xb29223(0x1b4)]['getConnectionState']();}async[_0x11d030(0x298)](_0x119973=0x0){const _0x1112f8=_0x11d030;let _0x8b392e=X(this['_config'][_0x1112f8(0x24d)],this[_0x1112f8(0x1e7)][_0x1112f8(0x296)],_0x1112f8(0x204),this[_0x1112f8(0x1e7)][_0x1112f8(0x227)],_0x1112f8(0x1af),_0x119973),_0x38df78=await Y(this['_config'],_0x8b392e);return Te(_0x38df78[_0x1112f8(0x225)]),_0x38df78;}async[_0x11d030(0x1b2)](_0x121ac6){const _0x40ec63=_0x11d030;let _0x3b08e6=X(this[_0x40ec63(0x15d)][_0x40ec63(0x24d)],this[_0x40ec63(0x1e7)][_0x40ec63(0x296)],_0x40ec63(0x204),this[_0x40ec63(0x1e7)]['unitId'],'block',_0x121ac6),_0x16b4c4=await Y(this[_0x40ec63(0x15d)],_0x3b08e6);return _0x16b4c4[_0x40ec63(0x217)]&&typeof _0x16b4c4[_0x40ec63(0x217)][_0x40ec63(0x1a2)]==_0x40ec63(0x27f)&&(_0x16b4c4['block'][_0x40ec63(0x1a2)]=Z(_0x16b4c4[_0x40ec63(0x217)][_0x40ec63(0x1a2)])),_0x16b4c4;}async[_0x11d030(0x1e9)](_0x1d5f2e,_0x56e463=0x0){const _0x59a1a7=_0x11d030;let _0x58eb4d=X(this[_0x59a1a7(0x15d)]['snapshotServerUrl'],this['_target'][_0x59a1a7(0x296)],_0x59a1a7(0x204),this[_0x59a1a7(0x1e7)]['unitId'],_0x59a1a7(0x24f));_0x58eb4d['searchParams'][_0x59a1a7(0x1c2)](_0x59a1a7(0x1a1),String(_0x1d5f2e)),_0x58eb4d[_0x59a1a7(0x267)][_0x59a1a7(0x1c2)]('to',String(_0x56e463));let _0x4aa514=await Y(this[_0x59a1a7(0x15d)],_0x58eb4d);return this[_0x59a1a7(0x1b4)][_0x59a1a7(0x26d)](),_0x4aa514;}async['submitChangeset'](_0x30f8dd){const _0x2ebace=_0x11d030;await this[_0x2ebace(0x1b4)][_0x2ebace(0x1ab)]();let _0x31611a=this[_0x2ebace(0x1b4)][_0x2ebace(0x14a)](_0x30f8dd[_0x2ebace(0x1fd)],_0x30f8dd['reqId']),_0x237262={..._0x30f8dd,'memberID':this[_0x2ebace(0x1b4)]['memberId'],'revision':0x0,'type':this[_0x2ebace(0x1e7)][_0x2ebace(0x296)],'unitID':this[_0x2ebace(0x1e7)][_0x2ebace(0x227)],'userID':''},_0x1350c6=X(this[_0x2ebace(0x15d)][_0x2ebace(0x25a)],this['_target'][_0x2ebace(0x296)],_0x2ebace(0x204),this[_0x2ebace(0x1e7)][_0x2ebace(0x227)],_0x2ebace(0x229)),_0x8c6176=this[_0x2ebace(0x15d)][_0x2ebace(0x230)](_0x1350c6,{'body':JSON[_0x2ebace(0x1be)]({'changeset':_0x237262,'memberID':this[_0x2ebace(0x1b4)][_0x2ebace(0x291)],'type':this[_0x2ebace(0x1e7)][_0x2ebace(0x296)],'unitID':this[_0x2ebace(0x1e7)]['unitId']}),'headers':{'content-type':'application/json'},'method':'POST'})[_0x2ebace(0x198)](async _0xd02093=>_0xd02093['status']===0x191||_0xd02093['status']===0x193?_0x2ebace(0x20d):_0xd02093[_0x2ebace(0x13a)]===0x190||_0xd02093[_0x2ebace(0x13a)]===0x199?'invalid':_0xd02093['ok']?_0x2ebace(0x1e6):_0x2ebace(0x1a6))[_0x2ebace(0x16c)](()=>_0x2ebace(0x1a6)),_0x2ea119=Ee(this[_0x2ebace(0x15d)]['commitTimeoutMs']),_0x35fc03=_0x8c6176['then'](_0x318777=>_0x318777===_0x2ebace(0x20d)?{'status':_0x2ebace(0x18a)}:_0x318777===_0x2ebace(0x27e)?{'status':_0x2ebace(0x142)}:new Promise(()=>void 0x0)),_0x3bce5c=await Promise['race']([_0x31611a[_0x2ebace(0x1dd)],_0x35fc03,_0x2ea119[_0x2ebace(0x1dd)][_0x2ebace(0x198)](()=>({'status':_0x2ebace(0x243)}))])[_0x2ebace(0x1ad)](()=>{const _0x55b0c9=_0x2ebace;_0x31611a[_0x55b0c9(0x292)](),_0x2ea119[_0x55b0c9(0x292)]();});if(_0x3bce5c['status']===_0x2ebace(0x243)){let _0x5bc4a0=await _0x8c6176;return _0x5bc4a0===_0x2ebace(0x20d)?{'message':'Changeset\x20submission\x20was\x20denied','reason':'permission-denied','status':_0x2ebace(0x2a1)}:_0x5bc4a0===_0x2ebace(0x27e)?{'message':'Changeset\x20submission\x20was\x20rejected','reason':'invalid-changeset','status':'rejected'}:{'status':'unknown'};}if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x21d))return{'status':_0x2ebace(0x1a6)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x276))return{'status':_0x2ebace(0x276)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x18a))return{'message':'Changeset\x20submission\x20was\x20denied','reason':_0x2ebace(0x23f),'status':_0x2ebace(0x2a1)};if(_0x3bce5c[_0x2ebace(0x13a)]===_0x2ebace(0x142)){let _0x1f6f23=await this[_0x2ebace(0x1e9)](_0x30f8dd[_0x2ebace(0x22d)],_0x30f8dd[_0x2ebace(0x22d)]);return{'message':_0x2ebace(0x160),'reason':_0x1f6f23['latestRevision']!==void 0x0&&_0x1f6f23['latestRevision']<_0x30f8dd[_0x2ebace(0x22d)]?_0x2ebace(0x154):_0x2ebace(0x146),'status':_0x2ebace(0x2a1)};}let _0x193712=_0x3bce5c[_0x2ebace(0x219)],_0x48705b=await this[_0x2ebace(0x1e9)](_0x30f8dd['baseRev'],_0x193712[_0x2ebace(0x1b6)]-0x1);if(_0x400ff3(_0x48705b['error'])){let _0x2ac8e2=_0x48705b['error'];throw new j(_0x2ebace(0x2b1),_0x2ac8e2?.[_0x2ebace(0x1c5)]||_0x2ebace(0x271),{'retryable':!0x0});}return{'acceptedChangeset':_0x193712,'precedingChangesets':_0x48705b['changesets'],'status':_0x2ebace(0x1ff)};}async[_0x11d030(0x192)](){const _0x4075ae=_0x11d030;await this[_0x4075ae(0x1b4)]['close']();}};async function Y(_0x4d22e4,_0x4eeaf9){const _0x11a685=_0x11d030;let _0x2dcdf4;try{_0x2dcdf4=await _0x4d22e4[_0x11a685(0x230)](_0x4eeaf9,{'method':_0x11a685(0x2a7)});}catch(_0x93ba4){throw new j(_0x11a685(0x2b1),'Collaboration\x20HTTP\x20request\x20failed',{'cause':_0x93ba4,'retryable':!0x0});}if(!_0x2dcdf4['ok'])throw new j(_0x11a685(0x2b1),'Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20'+_0x2dcdf4[_0x11a685(0x13a)],{'retryable':_0x2dcdf4[_0x11a685(0x13a)]>=0x1f4});try{return await _0x2dcdf4[_0x11a685(0x279)]();}catch(_0x5032df){throw new j(_0x11a685(0x20c),_0x11a685(0x214),{'cause':_0x5032df});}}function X(_0x3a9947,..._0x2712f8){const _0x4fe6d9=_0x11d030;let _0x331855=new URL(_0x3a9947);return _0x331855[_0x4fe6d9(0x25f)]=_0x331855[_0x4fe6d9(0x25f)][_0x4fe6d9(0x268)](/\/$/,'')+'/'+_0x2712f8['map'](_0x4ebbc4=>encodeURIComponent(String(_0x4ebbc4)))['join']('/'),_0x331855;}function Te(_0x441305){const _0x4a4854=_0x11d030;if(!_0x441305)return;let _0x38cc29=[_0x441305['workbook'],_0x441305['doc'],_0x441305['slide'],_0x441305[_0x4a4854(0x1c0)]];for(let _0xf753d9 of _0x38cc29)_0xf753d9&&typeof _0xf753d9[_0x4a4854(0x1fa)]==_0x4a4854(0x27f)&&(_0xf753d9[_0x4a4854(0x1fa)]=Z(_0xf753d9[_0x4a4854(0x1fa)]));if(_0x441305[_0x4a4854(0x2b3)]){for(let _0x30044d of Object[_0x4a4854(0x16b)](_0x441305['workbook'][_0x4a4854(0x2a5)]))typeof _0x30044d[_0x4a4854(0x1fa)]=='string'&&(_0x30044d['originalMeta']=Z(_0x30044d['originalMeta']));}}function Z(_0x4728f2){const _0x3ac138=_0x11d030;return Uint8Array[_0x3ac138(0x1a1)](Buffer[_0x3ac138(0x1a1)](_0x4728f2,_0x3ac138(0x203)));}function Ee(_0x5b7057){let _0xa284ad;return{'cancel':()=>{_0xa284ad!==void 0x0&&clearTimeout(_0xa284ad);},'promise':new Promise(_0x23db81=>{_0xa284ad=setTimeout(_0x23db81,_0x5b7057);})};}var De=class{[_0x11d030(0x15d)];[_0x11d030(0x18b)]=_0x11d030(0x1ac);[_0x11d030(0x211)];['_connectPromise'];['_memberId']='';[_0x11d030(0x28a)]=new Map();[_0x11d030(0x2b9)]=new Map();[_0x11d030(0x28b)]=new Map();['_inbound']=new Map();[_0x11d030(0x2ad)];[_0x11d030(0x188)];[_0x11d030(0x228)]=0x0;constructor(_0x1b2e7c){const _0x16a525=_0x11d030;this[_0x16a525(0x15d)]=_0x1b2e7c;}async[_0x11d030(0x2bd)](_0xbe5ed9){const _0x4d05c7=_0x11d030;let _0x3e79ed=this['_joined'][_0x4d05c7(0x165)](_0xbe5ed9[_0x4d05c7(0x227)]);if(_0x3e79ed&&_0x3e79ed[_0x4d05c7(0x191)]['unitType']!==_0xbe5ed9[_0x4d05c7(0x296)])throw new j(_0x4d05c7(0x216),_0x4d05c7(0x29e));if(await this[_0x4d05c7(0x16a)](),_0x3e79ed)_0x3e79ed['leases']+=0x1;else{try{await this[_0x4d05c7(0x1c9)](_0xbe5ed9);}catch(_0x39b506){throw this[_0x4d05c7(0x28a)]['size']===0x0&&(this[_0x4d05c7(0x18b)]=_0x4d05c7(0x21d),this[_0x4d05c7(0x197)](),this['_socket']?.[_0x4d05c7(0x192)](0x3e8,_0x4d05c7(0x255)),this[_0x4d05c7(0x211)]=void 0x0,this['_memberId']=''),_0x39b506;}this[_0x4d05c7(0x28a)][_0x4d05c7(0x1c2)](_0xbe5ed9['unitId'],{'leases':0x1,'target':_0xbe5ed9});}let _0x43a189=!0x1,_0x2e0dfd=()=>this[_0x4d05c7(0x1b3)],_0x4f2d14=new Set();return{'close':async()=>{const _0x5a0c06=_0x4d05c7;if(!_0x43a189){_0x43a189=!0x0;for(let _0x4cfba1 of _0x4f2d14)_0x4cfba1[_0x5a0c06(0x292)]();_0x4f2d14[_0x5a0c06(0x28e)](),await this[_0x5a0c06(0x20b)](_0xbe5ed9['unitId']);}},'ensureOnline':async()=>await this[_0x4d05c7(0x16a)](),'getConnectionState':()=>_0x43a189?'closed':this[_0x4d05c7(0x18b)],get 'memberId'(){return _0x2e0dfd();},'takeInboundChangesets':()=>{const _0x156972=_0x4d05c7;let _0x64696c=this['_inbound']['get'](_0xbe5ed9['unitId'])??[];return this[_0x156972(0x14c)][_0x156972(0x25d)](_0xbe5ed9[_0x156972(0x227)]),_0x64696c;},'waitForSubmission':(_0x3367b2,_0x4c1073)=>{const _0x4dabfe=_0x4d05c7;let _0x2e6349=this[_0x4dabfe(0x148)](_0x3367b2,_0x4c1073);return _0x4f2d14[_0x4dabfe(0x24e)](_0x2e6349),_0x2e6349['promise']['then'](()=>_0x4f2d14[_0x4dabfe(0x25d)](_0x2e6349),()=>_0x4f2d14[_0x4dabfe(0x25d)](_0x2e6349)),{'cancel':()=>{const _0x4b1ba0=_0x4dabfe;_0x4f2d14[_0x4b1ba0(0x25d)](_0x2e6349),_0x2e6349[_0x4b1ba0(0x292)]();},'promise':_0x2e6349[_0x4dabfe(0x1dd)]};}};}async[_0x11d030(0x16a)](){const _0x5aa5a1=_0x11d030;if(this[_0x5aa5a1(0x18b)]!==_0x5aa5a1(0x1ca)||this['_socket']?.['readyState']!==WebSocket[_0x5aa5a1(0x2bc)]){this[_0x5aa5a1(0x188)]!==void 0x0&&clearTimeout(this[_0x5aa5a1(0x188)]),this[_0x5aa5a1(0x188)]=void 0x0,this[_0x5aa5a1(0x1f2)]??=this[_0x5aa5a1(0x1a5)]();try{await this[_0x5aa5a1(0x1f2)];}finally{this['_connectPromise']=void 0x0;}}}async[_0x11d030(0x1a5)](){const _0x1f4baf=_0x11d030;this[_0x1f4baf(0x18b)]=_0x1f4baf(0x215);let _0x2e062a=await this[_0x1f4baf(0x15d)][_0x1f4baf(0x230)](this[_0x1f4baf(0x15d)][_0x1f4baf(0x151)],{'headers':{'content-type':_0x1f4baf(0x179)},'method':_0x1f4baf(0x2a7)});if(!_0x2e062a['ok'])throw this[_0x1f4baf(0x18b)]=_0x1f4baf(0x1ac),new j('COLLABORATION_UNAVAILABLE',_0x1f4baf(0x175)+_0x2e062a[_0x1f4baf(0x13a)],{'retryable':_0x2e062a[_0x1f4baf(0x13a)]>=0x1f4});let _0x2d54b0=await _0x2e062a['json']();if(typeof _0x2d54b0[_0x1f4baf(0x178)]!=_0x1f4baf(0x27f)||_0x2d54b0[_0x1f4baf(0x178)][_0x1f4baf(0x27b)]===0x0)throw this[_0x1f4baf(0x18b)]=_0x1f4baf(0x1ac),new j(_0x1f4baf(0x20c),_0x1f4baf(0x1f0));let _0x44df67=new URL(this['_config'][_0x1f4baf(0x1d7)]);_0x44df67[_0x1f4baf(0x267)][_0x1f4baf(0x1c2)](_0x1f4baf(0x17b),_0x2d54b0[_0x1f4baf(0x178)]);let _0xaf5166=new WebSocket(_0x44df67);this['_socket']=_0xaf5166,_0xaf5166[_0x1f4baf(0x180)](_0x1f4baf(0x1c5),_0x4c0a06=>this[_0x1f4baf(0x1f5)](_0x4c0a06)),_0xaf5166['addEventListener']('close',()=>{const _0x16d60e=_0x1f4baf;this['_socket']===_0xaf5166&&(this[_0x16d60e(0x197)](),this[_0x16d60e(0x189)](new j(_0x16d60e(0x2b1),'Collaboration\x20WebSocket\x20closed',{'retryable':!0x0})),this[_0x16d60e(0x18b)]=this[_0x16d60e(0x28a)][_0x16d60e(0x26f)]===0x0?'closed':_0x16d60e(0x215),this[_0x16d60e(0x28a)]['size']>0x0&&this[_0x16d60e(0x1a0)]());}),await Oe(_0xaf5166);let _0x55ec43=await this[_0x1f4baf(0x169)](_0x3042f5['HELLO'],'',{'cmd':_0x3042f5['HELLO'],'routeKey':''});if(_0x55ec43[_0x1f4baf(0x1e2)]!==_0xe6f23a['OK']||typeof _0x55ec43[_0x1f4baf(0x260)]?.[_0x1f4baf(0x222)]!=_0x1f4baf(0x27f))throw _0xaf5166[_0x1f4baf(0x192)](),new j('COLLABORATION_PROTOCOL_ERROR',_0x1f4baf(0x29f));this[_0x1f4baf(0x1b3)]=_0x55ec43[_0x1f4baf(0x260)][_0x1f4baf(0x222)],this[_0x1f4baf(0x18b)]='online';for(let {target:_0x193dd0}of this[_0x1f4baf(0x28a)][_0x1f4baf(0x16b)]())try{await this[_0x1f4baf(0x1c9)](_0x193dd0);}catch(_0x2c4bef){throw _0xaf5166['close'](0x3f3,_0x1f4baf(0x24c)),_0x2c4bef;}this[_0x1f4baf(0x228)]=0x0,this[_0x1f4baf(0x13d)]();}async['_join'](_0x422db7){const _0x24c9a8=_0x11d030;let _0x4d587c=await this[_0x24c9a8(0x169)](_0x3042f5[_0x24c9a8(0x17a)],_0x422db7[_0x24c9a8(0x227)],{'cmd':_0x3042f5[_0x24c9a8(0x17a)],'joinReq':{'rooms':[{'args':'','roomID':_0x422db7[_0x24c9a8(0x227)]}]},'routeKey':_0x422db7[_0x24c9a8(0x227)]});if(_0x4d587c[_0x24c9a8(0x1e2)]!==_0xe6f23a['OK'])throw new j(_0x24c9a8(0x2b1),typeof _0x4d587c[_0x24c9a8(0x265)]==_0x24c9a8(0x27f)?_0x4d587c[_0x24c9a8(0x265)]:'Failed\x20to\x20join\x20Unit\x20room');}[_0x11d030(0x169)](_0xd366,_0x31818a,_0x2ad56c){const _0x14affa=_0x11d030;let _0x37c455=this['_socket'];if(!_0x37c455||_0x37c455[_0x14affa(0x1ba)]!==WebSocket['OPEN'])return Promise[_0x14affa(0x18c)](new j(_0x14affa(0x2b1),_0x14affa(0x283),{'retryable':!0x0}));let _0x5f5c4f=_0xd366+':'+_0x31818a;return new Promise((_0x48fc4d,_0x3a5688)=>{const _0x4c87e6=_0x14affa;if(this[_0x4c87e6(0x2b9)][_0x4c87e6(0x257)](_0x5f5c4f)){_0x3a5688(new j('COLLABORATION_PROTOCOL_ERROR','A\x20'+_0xd366+'\x20request\x20is\x20already\x20active\x20for\x20'+_0x31818a));return;}let _0x476ebe=setTimeout(()=>{const _0x333b86=_0x4c87e6;this[_0x333b86(0x2b9)][_0x333b86(0x25d)](_0x5f5c4f),_0x3a5688(new j(_0x333b86(0x2b1),_0x333b86(0x213)+_0xd366,{'retryable':!0x0}));},0x7530);this['_commandWaiters'][_0x4c87e6(0x1c2)](_0x5f5c4f,{'reject':_0x3a5688,'resolve':_0x48fc4d,'timer':_0x476ebe});try{_0x37c455[_0x4c87e6(0x1cc)](JSON['stringify'](_0x2ad56c));}catch(_0x386718){this[_0x4c87e6(0x2b9)][_0x4c87e6(0x25d)](_0x5f5c4f),clearTimeout(_0x476ebe),_0x3a5688(new j(_0x4c87e6(0x2b1),_0x4c87e6(0x25c),{'cause':_0x386718,'retryable':!0x0}));}});}[_0x11d030(0x1f5)](_0xb4dc8b){const _0x15a8d9=_0x11d030;if(typeof _0xb4dc8b[_0x15a8d9(0x1a2)]!=_0x15a8d9(0x27f))return;let _0x197488;try{_0x197488=JSON[_0x15a8d9(0x194)](_0xb4dc8b[_0x15a8d9(0x1a2)]);}catch{this[_0x15a8d9(0x211)]?.[_0x15a8d9(0x192)](0x3eb,_0x15a8d9(0x1e0));return;}let _0x281c6f=typeof _0x197488['routeKey']==_0x15a8d9(0x27f)?_0x197488[_0x15a8d9(0x15b)]:'';if(_0x197488['cmd']===_0x3042f5['HELLO']||_0x197488[_0x15a8d9(0x1ee)]===_0x3042f5[_0x15a8d9(0x17a)]||_0x197488['cmd']===_0x3042f5[_0x15a8d9(0x234)]){let _0x5cbf74=_0x197488[_0x15a8d9(0x1ee)]+':'+_0x281c6f,_0xe1b74c=this['_commandWaiters'][_0x15a8d9(0x165)](_0x5cbf74);_0xe1b74c&&(this[_0x15a8d9(0x2b9)][_0x15a8d9(0x25d)](_0x5cbf74),clearTimeout(_0xe1b74c[_0x15a8d9(0x250)]),_0xe1b74c['resolve'](_0x197488));return;}_0x197488[_0x15a8d9(0x1ee)]!==_0x3042f5[_0x15a8d9(0x17d)]||!_0x197488[_0x15a8d9(0x29d)]||this[_0x15a8d9(0x269)](_0x281c6f,_0x197488['collaMsg']);}[_0x11d030(0x269)](_0x4d8f7d,_0x4e3ab2){const _0x1e73a6=_0x11d030;let _0x514a62=_0x4e3ab2[_0x1e73a6(0x16e)],_0x5f341f=_0x514a62===_0x1e73a6(0x1bf)?_0x1e73a6(0x252):_0x514a62===_0x1e73a6(0x2b5)?'csRejEvent':_0x514a62===_0x1e73a6(0x19f)?_0x1e73a6(0x235):_0x514a62===_0x1e73a6(0x294)?_0x1e73a6(0x274):_0x514a62===_0x1e73a6(0x281)?'newCsEvent':void 0x0;if(!_0x5f341f)return;let _0x4f7c97=ke(_0x4e3ab2[_0x5f341f]);if(!_0x4f7c97||_0x4f7c97[_0x1e73a6(0x231)]!==_0x4d8f7d)return;if(_0x514a62==='new_changesets'){let _0x1f47f3=this[_0x1e73a6(0x14c)][_0x1e73a6(0x165)](_0x4d8f7d)??[];_0x1f47f3[_0x1e73a6(0x209)](_0x4f7c97),this['_inbound'][_0x1e73a6(0x1c2)](_0x4d8f7d,_0x1f47f3);return;}let _0x444c1d=Q(_0x4f7c97['sid'],_0x4f7c97['reqId']),_0x36d3c3=this['_submissionWaiters'][_0x1e73a6(0x165)](_0x444c1d);_0x36d3c3&&_0x36d3c3(_0x514a62==='changeset_ack'?{'changeset':_0x4f7c97,'status':_0x1e73a6(0x1cd)}:_0x514a62===_0x1e73a6(0x19f)?{'status':_0x1e73a6(0x276)}:_0x514a62===_0x1e73a6(0x294)?{'status':_0x1e73a6(0x18a)}:{'status':_0x1e73a6(0x142)});}[_0x11d030(0x148)](_0x3e12af,_0x1a7910){const _0xa1172b=_0x11d030;let _0xb27b13=Q(_0x3e12af,_0x1a7910);if(this[_0xa1172b(0x28b)]['has'](_0xb27b13))return{'cancel':()=>void 0x0,'promise':Promise['reject'](new j(_0xa1172b(0x216),_0xa1172b(0x172)))};let _0x3ca474=()=>void 0x0;return{'cancel':()=>_0x3ca474({'status':_0xa1172b(0x21d)}),'promise':new Promise(_0x4560ce=>{const _0x217aa3=_0xa1172b;_0x3ca474=_0x56699f=>{const _0x3a58d6=_0x583c;this['_submissionWaiters'][_0x3a58d6(0x25d)](_0xb27b13)&&_0x4560ce(_0x56699f);},this['_submissionWaiters'][_0x217aa3(0x1c2)](_0xb27b13,_0x3ca474);})};}async[_0x11d030(0x20b)](_0x442d43){const _0x5827ff=_0x11d030;let _0x1485b2=this['_joined'][_0x5827ff(0x165)](_0x442d43);_0x1485b2&&(--_0x1485b2['leases'],!(_0x1485b2[_0x5827ff(0x1c7)]>0x0)&&(this[_0x5827ff(0x28a)][_0x5827ff(0x25d)](_0x442d43),this[_0x5827ff(0x14c)][_0x5827ff(0x25d)](_0x442d43),this[_0x5827ff(0x211)]?.[_0x5827ff(0x1ba)]===WebSocket[_0x5827ff(0x2bc)]&&this[_0x5827ff(0x211)][_0x5827ff(0x1cc)](JSON[_0x5827ff(0x1be)]({'cmd':_0x3042f5[_0x5827ff(0x13c)],'leaveReq':{'args':'','roomID':_0x442d43},'routeKey':_0x442d43})),this[_0x5827ff(0x28a)][_0x5827ff(0x26f)]===0x0&&(this[_0x5827ff(0x18b)]=_0x5827ff(0x21d),this[_0x5827ff(0x188)]!==void 0x0&&clearTimeout(this['_reconnectTimer']),this[_0x5827ff(0x188)]=void 0x0,this[_0x5827ff(0x197)](),this[_0x5827ff(0x211)]?.[_0x5827ff(0x192)](0x3e8,_0x5827ff(0x2ba)),this['_socket']=void 0x0,this[_0x5827ff(0x1b3)]='')));}[_0x11d030(0x1a0)](){const _0x444be0=_0x11d030;if(this[_0x444be0(0x188)]!==void 0x0||this['_reconnectAttempts']>=0x3){this['_reconnectAttempts']>=0x3&&(this[_0x444be0(0x18b)]=_0x444be0(0x1ac));return;}let _0x4d5fa6=Math[_0x444be0(0x166)](0x3e8*0x2**this['_reconnectAttempts'],0x4e20);this[_0x444be0(0x228)]+=0x1,this[_0x444be0(0x188)]=setTimeout(()=>{const _0xe80de2=_0x444be0;this[_0xe80de2(0x188)]=void 0x0,this['_connectPromise']??=this[_0xe80de2(0x1a5)](),this['_connectPromise']['catch'](()=>this[_0xe80de2(0x1a0)]())['finally'](()=>{const _0x46b9ac=_0xe80de2;this[_0x46b9ac(0x1f2)]=void 0x0;});},_0x4d5fa6);}[_0x11d030(0x13d)](){const _0x3dd817=_0x11d030;this['_stopHeartbeat'](),this[_0x3dd817(0x2ad)]=setInterval(()=>{const _0xdccdcd=_0x3dd817;this[_0xdccdcd(0x18b)]===_0xdccdcd(0x1ca)&&this[_0xdccdcd(0x169)](_0x3042f5[_0xdccdcd(0x234)],'',{'cmd':_0x3042f5[_0xdccdcd(0x234)],'routeKey':''})[_0xdccdcd(0x16c)](()=>this['_socket']?.[_0xdccdcd(0x192)](0x3f3,'Heartbeat\x20failed'));},0x7530);}[_0x11d030(0x197)](){const _0x51bda3=_0x11d030;this['_heartbeat']!==void 0x0&&clearInterval(this[_0x51bda3(0x2ad)]),this[_0x51bda3(0x2ad)]=void 0x0;}[_0x11d030(0x189)](_0x2a1297){const _0x5206f9=_0x11d030;for(let _0x3ce18c of this[_0x5206f9(0x2b9)][_0x5206f9(0x16b)]())clearTimeout(_0x3ce18c['timer']),_0x3ce18c[_0x5206f9(0x18c)](_0x2a1297);this[_0x5206f9(0x2b9)][_0x5206f9(0x28e)]();}};function Oe(_0x3ed9f1){return new Promise((_0x33c73e,_0x215ed2)=>{const _0x43430e=_0x583c;let _0x5c5fb0=()=>{const _0x2111d0=_0x583c;clearTimeout(_0x33ce30),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x192),_0x546e8e),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x218),_0x4f8edc),_0x3ed9f1[_0x2111d0(0x143)](_0x2111d0(0x1ed),_0x4b8958);},_0x49dc6b=_0xf6b19f=>{const _0x2d67ed=_0x583c;_0x5c5fb0(),_0x215ed2(new j(_0x2d67ed(0x2b1),_0xf6b19f,{'retryable':!0x0}));},_0x546e8e=()=>_0x49dc6b(_0x43430e(0x1c1)),_0x4f8edc=()=>_0x49dc6b(_0x43430e(0x16f)),_0x4b8958=()=>{_0x5c5fb0(),_0x33c73e();},_0x33ce30=setTimeout(()=>{const _0x36402c=_0x43430e;_0x49dc6b(_0x36402c(0x239)),_0x3ed9f1[_0x36402c(0x192)](0x3e8,_0x36402c(0x288));},0x7530);_0x3ed9f1['addEventListener'](_0x43430e(0x192),_0x546e8e,{'once':!0x0}),_0x3ed9f1['addEventListener']('error',_0x4f8edc,{'once':!0x0}),_0x3ed9f1[_0x43430e(0x180)](_0x43430e(0x1ed),_0x4b8958,{'once':!0x0});});}function ke(_0x4def3f){const _0x84ce44=_0x11d030;if(!_0x4def3f||typeof _0x4def3f!='object')return null;let _0x7b6eda=_0x4def3f['cs'];return _0x7b6eda&&typeof _0x7b6eda==_0x84ce44(0x224)?_0x7b6eda:null;}function Q(_0x2a3dfb,_0x1e68d7){return(_0x2a3dfb??'')+':'+(_0x1e68d7??0x0);}var Ae=class{[_0x11d030(0x15d)];[_0x11d030(0x223)];constructor(_0x5cad60){const _0x9815af=_0x11d030;this['_config']=je(_0x5cad60),this['_connection']=new De(this[_0x9815af(0x15d)]);}async[_0x11d030(0x1ed)](_0x467fca){const _0x3cfb65=_0x11d030;let _0x4f23a3=await this[_0x3cfb65(0x223)]['acquire'](_0x467fca);return new we(this[_0x3cfb65(0x15d)],_0x467fca,_0x4f23a3);}};function je(_0x320394){const _0x49609e=_0x11d030;let _0xa8c545=$(_0x320394[_0x49609e(0x24d)],_0x49609e(0x24d),[_0x49609e(0x149),_0x49609e(0x15c)]),_0x185264=$(_0x320394[_0x49609e(0x25a)],_0x49609e(0x25a),[_0x49609e(0x149),_0x49609e(0x15c)]),_0x3411f1=$(_0x320394['collabWebSocketUrl'],_0x49609e(0x1d7),[_0x49609e(0x138),_0x49609e(0x176),_0x49609e(0x149),_0x49609e(0x15c)]);_0x3411f1[_0x49609e(0x14e)]===_0x49609e(0x149)&&(_0x3411f1[_0x49609e(0x14e)]=_0x49609e(0x138)),_0x3411f1[_0x49609e(0x14e)]===_0x49609e(0x15c)&&(_0x3411f1[_0x49609e(0x14e)]='wss:');let _0x4638d7=$(_0x320394[_0x49609e(0x151)],'wsSessionTicketUrl',['http:',_0x49609e(0x15c)]),_0x5ad7c3=_0x320394[_0x49609e(0x141)]??0x7530;if(!Number[_0x49609e(0x140)](_0x5ad7c3)||_0x5ad7c3<=0x0)throw new j(_0x49609e(0x216),_0x49609e(0x1c6));return{'collabSubmitChangesetUrl':_0x185264,'collabWebSocketUrl':_0x3411f1,'commitTimeoutMs':_0x5ad7c3,'httpRequest':_0x320394[_0x49609e(0x230)]??globalThis[_0x49609e(0x247)]['bind'](globalThis),'snapshotServerUrl':_0xa8c545,'wsSessionTicketUrl':_0x4638d7};}function $(_0x223151,_0x4984f4,_0x4bc192){const _0x2ebbaf=_0x11d030;let _0x29d9e1;try{_0x29d9e1=new URL(_0x223151);}catch{throw new j(_0x2ebbaf(0x216),_0x4984f4+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0x4bc192[_0x2ebbaf(0x1b7)](_0x29d9e1[_0x2ebbaf(0x14e)]))throw new j(_0x2ebbaf(0x216),_0x4984f4+'\x20uses\x20an\x20unsupported\x20protocol');return _0x29d9e1;}function Me(_0x304827){return new Ae(_0x304827);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/univer-collaboration-runtime",
3
3
  "type": "module",
4
- "version": "1.0.0-rc.0",
4
+ "version": "1.0.1",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -19,16 +19,16 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@oxc-project/runtime": "0.142.0",
22
- "@univerjs-pro/bases": "1.0.0-rc.0",
23
- "@univerjs-pro/boards": "1.0.0-rc.0",
24
- "@univerjs-pro/collaboration": "1.0.0-rc.0",
25
- "@univerjs-pro/engine-formula": "1.0.0-rc.0",
26
- "@univerjs-pro/slides": "1.0.0-rc.0",
27
- "@univerjs/core": "1.0.0-rc.0",
28
- "@univerjs/docs": "1.0.0-rc.0",
29
- "@univerjs/engine-formula": "1.0.0-rc.0",
30
- "@univerjs/engine-render": "1.0.0-rc.0",
31
- "@univerjs/protocol": "1.0.0-rc.0",
32
- "@univerjs/sheets": "1.0.0-rc.0"
22
+ "@univerjs-pro/bases": "1.0.1",
23
+ "@univerjs-pro/boards": "1.0.1",
24
+ "@univerjs-pro/collaboration": "1.0.1",
25
+ "@univerjs-pro/engine-formula": "1.0.1",
26
+ "@univerjs-pro/slides": "1.0.1",
27
+ "@univerjs/core": "1.0.1",
28
+ "@univerjs/docs": "1.0.1",
29
+ "@univerjs/engine-formula": "1.0.1",
30
+ "@univerjs/engine-render": "1.0.1",
31
+ "@univerjs/protocol": "1.0.1",
32
+ "@univerjs/sheets": "1.0.1"
33
33
  }
34
34
  }