@univer-cli/univer-collaboration-runtime 1.0.2 → 1.0.4

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 _0x28a351=_0x2b76;(function(_0x2ad9db,_0x1f1a92){const _0x2f2ee3=_0x2b76,_0x46b724=_0x2ad9db();while(!![]){try{const _0x28f08c=-parseInt(_0x2f2ee3(0x266))/0x1+parseInt(_0x2f2ee3(0x265))/0x2+parseInt(_0x2f2ee3(0x2c4))/0x3*(-parseInt(_0x2f2ee3(0x237))/0x4)+-parseInt(_0x2f2ee3(0x337))/0x5+parseInt(_0x2f2ee3(0x2cc))/0x6*(-parseInt(_0x2f2ee3(0x345))/0x7)+-parseInt(_0x2f2ee3(0x2e6))/0x8*(parseInt(_0x2f2ee3(0x284))/0x9)+-parseInt(_0x2f2ee3(0x1ff))/0xa*(-parseInt(_0x2f2ee3(0x249))/0xb);if(_0x28f08c===_0x1f1a92)break;else _0x46b724['push'](_0x46b724['shift']());}catch(_0x385133){_0x46b724['push'](_0x46b724['shift']());}}}(_0x2e3a,0x958dd));import{CommandType as _0x56c714,DependentOn as _0x47e19f,ICommandService as _0x24a215,IUniverInstanceService as _0x4f82f9,Inject as _0x407b4d,Injector as _0x419b26,Plugin as _0x45c71a,UniverInstanceType as _0x27cc9f,registerDependencies as _0x9caa23,sequenceExecute as _0x2648cd,toDisposable as _0x1752eb}from'@univerjs/core';function _0x2e3a(){const _0x5e2b40=['1010201qfgxMU','_closeAfterFatalError','formula.mutation.set-trigger-formula-calculation-stop','readyState','permission','save','_scheduleReconnect','splice','protocol','_setTransformConflict','OPEN','closed','Collaboration\x20WebSocket\x20is\x20not\x20online','type','COLLABORATION_INVALID_INPUT','permission-denied','collaMsg','RECV','suppress','latestRevision','m2Prime','UNIVER_SLIDE','_awaiting','mutations','acceptedChangeset','status','Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','has','Collaboration\x20HELLO\x20response\x20is\x20invalid','randomUUID','45BGSuwq','dispose','pathname','UNIVER_BOARD','takeInboundChangesets','_tail','awaiting-ack','up-to-date','\x20cannot\x20capture\x20mutation\x20','cmd','online','_ensureConnected','createPresentation','unknown','univerAPI','COLLABORATION_CLOSED','onMutationExecutedForCollab','Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible','snapshotServerService','Changeset\x20submission\x20was\x20rejected','reject','searchParams','min','_nextReqId','slice','getBoard','memberId','open','application/json','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','_socket','pending','permission_rej','isArray','_capture','index','board','fetchThroughInterceptors','formula.mutation.set-calculation-result','wsSessionTicketUrl','Event','changesets','\x20cannot\x20call\x20','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','_suppressionDepth','findIndex','ticket','promise','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot','subscribe','length','leases','ack','kind','http:','_injector','registerPlugin','POST','createDocument','changeset_should_retry','values','_connect','Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision','_joined','387eNieAN','MUTATION','catch','_waitForSubmission','result','workbook','data','snapshotServerUrl','6hicmZd','_connection','snapshot','_replayRemoteChangesets','createBase','_config','prependPending','\x20returned\x20a\x20different\x20block\x20identity','revisionService','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','permission-rejected','maxCodeLength','pull','read','compressMutationService','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','fetchmissing','entries','formula.mutation.set-formula-data','formula.mutation.set-trigger-formula-calculation-start','return\x20(async\x20()\x20=>\x20{\x20','object','write','some','createBoard','routeKey','1262264frYPwe','unit','backend','incrementRevOfUnit','reconnecting','prototype','sort','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','getDocument','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','target','blockMeta','unsubscribe','COMPRESS_MUTATION_SEND','fetchChangesets','json','rejected','close','unitData','_state','unchanged','commitTimeoutMs','_closeOwnedResources','_reconnectTimer','_baseRevision','_closePromise','ws:','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','_validateAcceptedChangeset','_join','createUnit','_requestCommand','_startHeartbeat','sheet.mutation.send-init-pivot-text-local','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','docStateChange$','Single-Unit\x20runtime\x20for\x20','string','UNIVER_DOC','changeset_rej','_executor','Collaboration\x20WebSocket\x20closed','Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range','Failed\x20to\x20rejoin\x20Unit\x20room','HELLO','UNIVER_BASE','takePending','csAckEvent','offline','find','Failed\x20to\x20join\x20Unit\x20room','_captureCommandMutation','_closed','Unit\x20','Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20','collabSubmitChangesetUrl','newCsEvent','_bufferedChangesets','originalMeta','COMPRESS_MUTATION_APPLY','onlyLocal','LEAVE','interceptor','stringify','clear','_unitId','Unsupported\x20collaboration\x20Unit\x20type:\x20','nothing-to-commit','error','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned','redoState','unit-data','_release','execute','transform-failed','rev','sid','fetch','pull-required','injector','5490055cDXqCK','conflict','COLLABORATION_PROTOCOL_ERROR','_target','Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision','COLLABORATION_LOAD_FAILED','includes','acquire','exportUnitData','_subscribeToDocumentState','getBase','delete','createWorkbook','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','6742582HaQQdo','Runtime\x20for\x20','reqId','onStarting','addEventListener','BeforeCommandExecute','new_changes','isSafeInteger','UNIVER_SHEET','_operations','GET','run','_createAwaitingFromPending','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','eventID','changeset-rejected','_consumeBufferedPrecedingChangesets','isFinite','JOIN','_commandWaiters','confirmed','getState','size','_handleCollaborationEvent','memberID','unitId','m1Prime','COMMAND','snapshotFrom','_lease','transformService','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer','Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20','map','actions','_sid','https:','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','sheets','timer','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','Collaboration\x20WebSocket\x20closed\x20before\x20opening','\x20})();','_handle','_univer','transformMutations','invalid','replace','Backend\x20changesets\x20must\x20be\x20an\x20array','get','Collaboration\x20HTTP\x20request\x20failed','awaitingMutations','10GMvvXK','block','then','unitID','remote','HEARTBEAT','removeEventListener','collabWebSocketUrl','all','resolve','send','boolean','infoRsp','Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range','getPrototypeOf','changeset','_stopHeartbeat','_inbound','commandId','submitChangeset','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','unitType','COLLABORATION_UNAVAILABLE','instanceService','changeset_ack','race','_kernel','Code\x20is\x20longer\x20than\x20the\x20','\x20for\x20Unit\x20','revision','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','disposeUnit','_pending','The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types','timeout','_submissionWaiters','ensureOnline','format','replacePending','_handleMessage','trim','retry','getPresentation','baseRev','_reconcilePrecedingChangesets','push','getConnectionState','Backend\x20returned\x20no\x20Unit\x20snapshot','_disposables','_fetchChangesets','_conflict','\x20character\x20limit','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','_heartbeat','replacePendingMutations','code','23496IsiThq','sessionTicket','message','new_changesets','unshift','csRejEvent','Changeset\x20submission\x20was\x20denied','from','_assertMutableState','getInterceptPoints','httpRequest','parse','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','mode','_knownHeadRevision','Failed\x20to\x20fetch\x20preceding\x20changesets','\x20request\x20is\x20already\x20active\x20for\x20','reason','51723001abtrtH','cancel','retryable','add','_reconnectAttempts','Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot','set','fromEntries','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','\x20is\x20unavailable','addEvent','bind','number','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','Connection\x20timed\x20out','createUniver','commandService','fetched','_rejectIfNotAccepting','_memberId','precedingChangesets','commit','Snapshot\x20block\x20','invalid-revision','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','wss:','No\x20active\x20Unit\x20leases','_connectPromise','1057162blCWKk'];_0x2e3a=function(){return _0x5e2b40;};return _0x2e3a();}import{CompressMutationService as _0x45cd35,ISnapshotServerService as _0x2114fe,ITransformService as _0x309abf,RevertRevisionMutation as _0x4d191d,RevisionService as _0x56a7c3,SnapshotService as _0x3e3e5b,UniverCollaborationPlugin as _0x91edc2,isTransformMutationsSuccess as _0x74ccd6,parseChangesetToProtocol as _0x54e5d7,parseMutationToProtocol as _0x4dcbdd,parseProtocolChangeset as _0xeb2c40,transformSnapshotToBaseData as _0x16c6bc,transformSnapshotToBoardData as _0x641f7a,transformSnapshotToDocumentData as _0x6ffd28,transformSnapshotToSlideData as _0x1ce93e,transformSnapshotToWorkbookData as _0x25d93a}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x3c1c2d}from'@univerjs/engine-formula';import{CmdRspCode as _0x90bf3a,CombCmd as _0x9b7859,isError as _0x1d0608}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x564f99}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x27b5b6,RichTextEditingMutation as _0x21e09d}from'@univerjs/docs';import{IRenderManagerService as _0x12089b}from'@univerjs/engine-render';import{FUniver as _0x264464}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 _0x45e199 from'@oxc-project/runtime/helpers/decorateParam';import _0x5bf473 from'@oxc-project/runtime/helpers/decorate';function _0x2b76(_0x1112d3,_0x30c2cc){_0x1112d3=_0x1112d3-0x1f2;const _0x2e3ab5=_0x2e3a();let _0x2b760f=_0x2e3ab5[_0x1112d3];return _0x2b760f;}var j=class extends Error{[_0x28a351(0x236)];[_0x28a351(0x24b)];constructor(_0x407ec0,_0x2da8be,_0x183878={}){const _0x214b03=_0x28a351;super(_0x2da8be,_0x183878),this['name']='CollaborationRuntimeError',this['code']=_0x407ec0,this[_0x214b03(0x24b)]=_0x183878['retryable']??!0x1;}},se=class{[_0x28a351(0x219)];[_0x28a351(0x328)];[_0x28a351(0x21f)]=[];[_0x28a351(0x22f)]=[];[_0x28a351(0x2b0)]=0x0;constructor(_0x4a8f4b,_0x334e1f,_0x274cb1){const _0x32ddf3=_0x28a351;this['_kernel']=_0x4a8f4b,this[_0x32ddf3(0x328)]=_0x334e1f,this[_0x32ddf3(0x22f)][_0x32ddf3(0x22c)](_0x4a8f4b[_0x32ddf3(0x259)][_0x32ddf3(0x294)]((_0x4f1fd3,_0x767716)=>{const _0x55fae2=_0x32ddf3;this[_0x55fae2(0x31a)](_0x4f1fd3,_0x767716,_0x274cb1);})),_0x274cb1===_0x27cc9f[_0x32ddf3(0x30d)]&&(_0x4a8f4b[_0x32ddf3(0x336)][_0x32ddf3(0x1fc)](_0x12089b),this[_0x32ddf3(0x340)]());}get['pending'](){const _0x52d10c=_0x28a351;return this[_0x52d10c(0x21f)];}[_0x28a351(0x361)](_0x3d53e9){const _0x3d69ca=_0x28a351;return this[_0x3d69ca(0x21f)]['slice'](_0x3d53e9);}[_0x28a351(0x225)](_0x46d258){const _0x4f1af2=_0x28a351;this['_pending']['splice'](0x0,this[_0x4f1af2(0x21f)][_0x4f1af2(0x2b6)],..._0x46d258);}[_0x28a351(0x315)](){const _0x1db120=_0x28a351;return this['_pending'][_0x1db120(0x26d)](0x0);}['prependPending'](_0x362002){const _0x4fac40=_0x28a351;this[_0x4fac40(0x21f)][_0x4fac40(0x23b)](..._0x362002);}async[_0x28a351(0x278)](_0x47b19e){const _0x10f312=_0x28a351;this[_0x10f312(0x2b0)]+=0x1;try{return await _0x47b19e();}finally{--this[_0x10f312(0x2b0)];}}[_0x28a351(0x285)](){const _0x50272f=_0x28a351;for(let _0x17bfb4 of this[_0x50272f(0x22f)]['splice'](0x0))_0x17bfb4[_0x50272f(0x285)]();}['_captureCommandMutation'](_0x368e2b,_0xcc3c51,_0x45e06c){const _0x115f06=_0x28a351;if(this[_0x115f06(0x2b0)]>0x0||_0x368e2b[_0x115f06(0x273)]!==_0x56c714[_0x115f06(0x2c5)]||_0xcc3c51?.['fromCollab']||_0xcc3c51?.['fromChangeset']||_0xcc3c51?.[_0x115f06(0x323)])return;let _0x39df56=_0x368e2b['params'];if(_0x39df56?.[_0x115f06(0x35e)]!==void 0x0&&_0x39df56[_0x115f06(0x35e)]!==this[_0x115f06(0x328)]){if(_0x39df56['trigger']===_0x564f99['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0x115f06(0x346)+this[_0x115f06(0x328)]+_0x115f06(0x28c)+_0x368e2b['id']+_0x115f06(0x21b)+String(_0x39df56['unitId']));}if(_0x39df56?.[_0x115f06(0x35e)]===void 0x0||_0x45e06c===_0x27cc9f[_0x115f06(0x30d)]&&_0x368e2b['id']===_0x21e09d['id'])return;if(_0x368e2b['id']===_0x4d191d['id'])throw new j('COLLABORATION_INVALID_INPUT',_0x115f06(0x36a));let _0x3b9076=_0x368e2b,_0x2fafd8=this[_0x115f06(0x219)][_0x115f06(0x2da)][_0x115f06(0x325)][_0x115f06(0x240)]()[_0x115f06(0x2f3)],_0x1328aa=(this[_0x115f06(0x219)][_0x115f06(0x2da)][_0x115f06(0x325)]['fetchThroughInterceptors'](_0x2fafd8)([_0x3b9076],this[_0x115f06(0x219)][_0x115f06(0x216)])??[_0x3b9076])[0x0];_0x1328aa&&this[_0x115f06(0x21f)]['push'](_0x4dcbdd(_0x1328aa));}[_0x28a351(0x340)](){const _0x105ff3=_0x28a351;let _0x12a6e5=this[_0x105ff3(0x219)][_0x105ff3(0x336)][_0x105ff3(0x1fc)](_0x27b5b6)[_0x105ff3(0x30a)][_0x105ff3(0x2b5)](_0x4d8aa4=>{const _0x2ae199=_0x105ff3;if(this['_suppressionDepth']>0x0||_0x4d8aa4?.[_0x2ae199(0x35e)]!==this[_0x2ae199(0x328)])return;let _0x40644c={'id':_0x4d8aa4[_0x2ae199(0x211)],'params':{'actions':_0x4d8aa4[_0x2ae199(0x32d)][_0x2ae199(0x367)],'textRanges':null,'unitId':_0x4d8aa4[_0x2ae199(0x35e)]},'type':_0x56c714[_0x2ae199(0x2c5)]};this[_0x2ae199(0x21f)]['push'](_0x4dcbdd(_0x40644c));});this[_0x105ff3(0x22f)][_0x105ff3(0x22c)](_0x1752eb(()=>_0x12a6e5[_0x105ff3(0x2f2)]()));}},ce=new Set([_0x28a351(0x2df),_0x28a351(0x268),'formula.mutation.set-trigger-formula-calculation',_0x28a351(0x2aa),'formula.mutation.set-array-formula-data',_0x28a351(0x2de),_0x28a351(0x308)]),le=new Set([_0x28a351(0x2d0),_0x28a351(0x2e4),_0x28a351(0x343),_0x28a351(0x2be),_0x28a351(0x290),'createUniverSheet',_0x28a351(0x21e)]);function ue(_0x1915e7,_0x42067e,_0x43b00e){let _0x4abcf7=_0x264464['newAPI'](_0x1915e7);return{async 'execute'(_0x16077e,_0x3e1105){const _0x4f3531=_0x2b76;if(_0x16077e[_0x4f3531(0x2b6)]>_0x43b00e)throw new j(_0x4f3531(0x274),_0x4f3531(0x21a)+_0x43b00e+_0x4f3531(0x232));let _0xec9be3=_0x3e1105===_0x4f3531(0x2d9)?M(_0x4abcf7):void 0x0,_0x51a4a4=de(_0x4abcf7,_0x42067e);try{return await Function(_0x4f3531(0x292),_0x4f3531(0x2e0)+_0x16077e+_0x4f3531(0x1f5))(_0x51a4a4);}finally{_0xec9be3?.[_0x4f3531(0x285)]();}}};}function de(_0x268c0b,_0x37dd51){return new Proxy(_0x268c0b,{'get'(_0x4438f1,_0xaead89,_0x58aa86){const _0x3d84e8=_0x2b76;return le[_0x3d84e8(0x281)](_0xaead89)?()=>{const _0x5c8314=_0x3d84e8;throw new j('COLLABORATION_INVALID_INPUT',_0x5c8314(0x30b)+_0x37dd51+_0x5c8314(0x2ae)+String(_0xaead89));}:Reflect[_0x3d84e8(0x1fc)](_0x4438f1,_0xaead89,_0x58aa86);}});}function M(_0x1c08a6){const _0x22d95e=_0x28a351;return _0x1c08a6[_0x22d95e(0x253)](_0x1c08a6[_0x22d95e(0x2ac)][_0x22d95e(0x34a)],_0x1b88a0=>{const _0xe6e842=_0x22d95e;let _0x104d91=_0x1b88a0;if(N(_0x104d91))throw _0x104d91[_0xe6e842(0x24a)]=!0x0,new j('COLLABORATION_INVALID_INPUT','Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20'+_0x104d91['id']);});}function N(_0x5452af){const _0x1449dc=_0x28a351;return _0x5452af['type']===_0x56c714[_0x1449dc(0x360)]||_0x5452af['type']===_0x56c714[_0x1449dc(0x2c5)]&&!ce[_0x1449dc(0x281)](_0x5452af['id']);}function P(_0xac4d7c){const _0x1a5a25=_0x28a351;if(_0xac4d7c===void 0x0)return null;if(_0xac4d7c===null||typeof _0xac4d7c==_0x1a5a25(0x20a)||typeof _0xac4d7c==_0x1a5a25(0x30c))return _0xac4d7c;if(typeof _0xac4d7c==_0x1a5a25(0x255)){if(Number[_0x1a5a25(0x356)](_0xac4d7c))return _0xac4d7c;throw I();}if(Array[_0x1a5a25(0x2a5)](_0xac4d7c))return _0xac4d7c[_0x1a5a25(0x366)](P);if(F(_0xac4d7c))return Object[_0x1a5a25(0x250)](Object[_0x1a5a25(0x2dd)](_0xac4d7c)['map'](([_0x57b0cd,_0x43d133])=>[_0x57b0cd,P(_0x43d133)]));throw I();}function F(_0x354545){const _0x18bcb8=_0x28a351;if(typeof _0x354545!=_0x18bcb8(0x2e1)||!_0x354545)return!0x1;let _0x2708b3=Object[_0x18bcb8(0x20d)](_0x354545);return _0x2708b3===Object[_0x18bcb8(0x2eb)]||_0x2708b3===null;}function I(){const _0x5172ee=_0x28a351;return new j(_0x5172ee(0x274),_0x5172ee(0x295));}var L=class{[_0x28a351(0x289)]=Promise[_0x28a351(0x208)]();[_0x28a351(0x350)](_0x2f9385){const _0x346e99=_0x28a351;let _0x113bc6=this['_tail'][_0x346e99(0x201)](_0x2f9385,_0x2f9385);return this[_0x346e99(0x289)]=_0x113bc6[_0x346e99(0x201)](()=>void 0x0,()=>void 0x0),_0x113bc6;}};function R(_0x1cb8e0,_0x4f5031,_0x1b1f15,_0x3610a8){const _0x68132f=_0x28a351;if(!Array[_0x68132f(0x2a5)](_0x1cb8e0))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x68132f(0x1fb));let _0x3f21d5=[..._0x1cb8e0][_0x68132f(0x2ec)]((_0x2ccca9,_0x419e5a)=>_0x2ccca9[_0x68132f(0x21c)]-_0x419e5a[_0x68132f(0x21c)]),_0x4a7bc7=_0x3610a8;for(let _0x5567a5 of _0x3f21d5){if(!_0x5567a5||typeof _0x5567a5!=_0x68132f(0x2e1)||!Array[_0x68132f(0x2a5)](_0x5567a5[_0x68132f(0x27d)])||_0x5567a5[_0x68132f(0x27d)]['some'](_0x5cbbe7=>!_0x5cbbe7||typeof _0x5cbbe7!=_0x68132f(0x2e1)||!('id'in _0x5cbbe7)||typeof _0x5cbbe7['id']!=_0x68132f(0x30c)||!('data'in _0x5cbbe7)||typeof _0x5cbbe7[_0x68132f(0x2ca)]!=_0x68132f(0x30c))||!Number[_0x68132f(0x34c)](_0x5567a5[_0x68132f(0x22a)])||!Number[_0x68132f(0x34c)](_0x5567a5[_0x68132f(0x21c)])||_0x5567a5[_0x68132f(0x202)]!==_0x4f5031||_0x5567a5['type']!==_0x1b1f15||_0x5567a5['baseRev']!==_0x4a7bc7||_0x5567a5['revision']!==_0x4a7bc7+0x1)throw new j(_0x68132f(0x339),_0x68132f(0x311));_0x4a7bc7=_0x5567a5[_0x68132f(0x21c)];}return _0x3f21d5;}function z(_0x4a608a){const _0x4236eb=_0x28a351;return{'baseRevision':_0x4a608a[_0x4236eb(0x22a)],'mutationCount':_0x4a608a[_0x4236eb(0x27d)][_0x4236eb(0x2b6)],'revision':_0x4a608a[_0x4236eb(0x21c)],..._0x4a608a[_0x4236eb(0x333)]===void 0x0?{}:{'sid':_0x4a608a[_0x4236eb(0x333)]},..._0x4a608a[_0x4236eb(0x347)]===void 0x0?{}:{'reqId':_0x4a608a[_0x4236eb(0x347)]}};}function B(_0x395568,_0x336574,_0x20b82c,_0x428633,_0x583445,_0x340c29='initial'){const _0x3b505c=_0x28a351;if(_0x583445[_0x3b505c(0x2e3)](_0x40cb7c=>_0x40cb7c[_0x3b505c(0x27d)]['some'](_0x2a8d81=>_0x2a8d81['id']===_0x4d191d['id'])))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x3b505c(0x2db));let _0xf0b43e=_0x428633;for(let _0x23a24f of _0x583445){let _0xfdbcd0=_0xf0b43e+0x1;if(_0x23a24f['unitID']!==_0x336574||_0x23a24f['type']!==_0x20b82c||_0x23a24f['baseRev']!==_0xf0b43e||_0x23a24f['revision']!==_0xfdbcd0)throw new j(_0x3b505c(0x339),_0x3b505c(0x243));let _0x3dd3e4=_0xeb2c40(_0x23a24f),_0x52a5e5=_0x395568['compressMutationService'][_0x3b505c(0x325)][_0x3b505c(0x240)]()[_0x3b505c(0x322)],_0x4caeef=_0x395568[_0x3b505c(0x2da)][_0x3b505c(0x325)][_0x3b505c(0x2a9)](_0x52a5e5)(_0x3dd3e4['mutations'],null)??_0x3dd3e4['mutations'],_0xfd54f0=_0x2648cd(_0x4caeef,_0x395568[_0x3b505c(0x259)],_0x340c29==='initial'?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0xfd54f0[_0x3b505c(0x2c8)])throw new j(_0x3b505c(0x33c),_0x3b505c(0x21d)+_0xfd54f0[_0x3b505c(0x2a7)]+':\x20'+String(_0xfd54f0['error']));let _0x3e306c=_0x395568[_0x3b505c(0x2d4)]['incrementRevOfUnit'](_0x336574);if(_0x3e306c!==_0xfdbcd0)throw new j(_0x3b505c(0x339),_0x3b505c(0x33b));_0xf0b43e=_0x3e306c;}return _0xf0b43e;}function V(_0x5adeb2,_0x5e6682,_0x4bf1d9){const _0x25595d=_0x28a351;let _0x5a13e0=_0x264464['newAPI'](_0x5adeb2);switch(_0x4bf1d9){case _0x27cc9f[_0x25595d(0x34d)]:return H(_0x5a13e0['getWorkbook'](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x30d)]:return H(_0x5a13e0[_0x25595d(0x2ee)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f['UNIVER_SLIDE']:return H(_0x5a13e0[_0x25595d(0x229)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x314)]:return H(_0x5a13e0[_0x25595d(0x341)](_0x5e6682)?.[_0x25595d(0x26b)](),_0x5e6682);case _0x27cc9f[_0x25595d(0x287)]:return H(_0x5a13e0[_0x25595d(0x29d)](_0x5e6682)?.['save'](),_0x5e6682);default:throw new j(_0x25595d(0x274),_0x25595d(0x329)+_0x4bf1d9);}}function H(_0x2a263f,_0x3722ad){const _0x2bb8c5=_0x28a351;if(_0x2a263f===void 0x0)throw new j(_0x2bb8c5(0x33c),_0x2bb8c5(0x31c)+_0x3722ad+_0x2bb8c5(0x252));return structuredClone(_0x2a263f);}var fe=class{['unitId'];['unitType'];[_0x28a351(0x2fe)];[_0x28a351(0x1f6)];[_0x28a351(0x1f7)];[_0x28a351(0x219)];['_closePromise'];['_acceptingOperations']=!0x0;['_closed']=!0x1;[_0x28a351(0x2a6)];[_0x28a351(0x30f)];['_operations']=new L();[_0x28a351(0x320)]=[];['_knownHeadRevision'];[_0x28a351(0x231)]=null;['_awaiting']=null;[_0x28a351(0x368)]=crypto[_0x28a351(0x283)]();[_0x28a351(0x29b)]=0x1;constructor(_0x3e265a,_0x5d5ace,_0x358dd3,_0x1f263f,_0x3d5bc4,_0x514476,_0x1a5140){const _0x41ac87=_0x28a351;this[_0x41ac87(0x35e)]=_0x3e265a,this[_0x41ac87(0x214)]=_0x5d5ace,this['_baseRevision']=_0x358dd3,this['_handle']=_0x1f263f,this[_0x41ac87(0x1f7)]=_0x3d5bc4,this[_0x41ac87(0x219)]=_0x514476,this[_0x41ac87(0x245)]=_0x358dd3,this[_0x41ac87(0x2a6)]=new se(_0x514476,_0x3e265a,_0x5d5ace),this[_0x41ac87(0x30f)]=ue(_0x3d5bc4,_0x3e265a,_0x1a5140);}[_0x28a351(0x35a)](){const _0x422229=_0x28a351;return{'awaitingChangeset':this[_0x422229(0x27c)]===null?null:U(this[_0x422229(0x27c)]),'baseRevision':this[_0x422229(0x2fe)],'bufferedChangesetCount':this['_bufferedChangesets'][_0x422229(0x2b6)],'conflict':this[_0x422229(0x231)],'connection':this[_0x422229(0x31b)]?_0x422229(0x271):this['_handle'][_0x422229(0x22d)](),'knownHeadRevision':this['_knownHeadRevision'],'pendingMutationCount':this[_0x422229(0x2a6)]['pending'][_0x422229(0x2b6)]};}['getPendingMutations'](){const _0x3cfb81=_0x28a351;return structuredClone(this['_capture'][_0x3cfb81(0x2a3)]);}[_0x28a351(0x334)](){const _0x1175d8=_0x28a351;return this[_0x1175d8(0x25b)]()||this[_0x1175d8(0x34e)][_0x1175d8(0x350)](async()=>(this[_0x1175d8(0x23f)](_0x1175d8(0x334)),await this['_fetchChangesets']()));}['pull'](){const _0x47c47b=_0x28a351;return this[_0x47c47b(0x25b)]()||this[_0x47c47b(0x34e)][_0x47c47b(0x350)](async()=>{const _0x45d567=_0x47c47b;if(this[_0x45d567(0x23f)](_0x45d567(0x2d8)),await this[_0x45d567(0x230)](),this[_0x45d567(0x320)][_0x45d567(0x2b6)]===0x0)return{'state':this[_0x45d567(0x35a)](),'status':_0x45d567(0x28b)};let _0x24bba0=[...this[_0x45d567(0x320)]];if(_0x24bba0['some'](_0x337cd4=>_0x337cd4[_0x45d567(0x27d)][_0x45d567(0x2e3)](_0x941a5c=>_0x941a5c['id']===_0x4d191d['id'])))throw new j(_0x45d567(0x339),_0x45d567(0x2ef));let _0x267a96=this['_baseRevision'],_0x4fbefd=this[_0x45d567(0x27c)]?W(this[_0x45d567(0x27c)]['mutations'],this[_0x45d567(0x35e)],this[_0x45d567(0x214)],this['_baseRevision']):null,_0x51a6e6=_0xeb2c40({'baseRev':this[_0x45d567(0x2fe)],'memberID':'','mutations':[...this['_capture']['pending']],'revision':0x0,'type':this['unitType'],'unitID':this['unitId'],'userID':''})[_0x45d567(0x27d)],_0x1f61ac=[];for(let _0x247bad of _0x24bba0){let _0x2cb592=_0xeb2c40(_0x247bad);if(this[_0x45d567(0x27c)]!==null&&_0x247bad['sid']===this[_0x45d567(0x27c)][_0x45d567(0x333)]&&_0x247bad[_0x45d567(0x347)]===this[_0x45d567(0x27c)][_0x45d567(0x347)]){let _0x1792c3=(_0x4fbefd??[])[_0x45d567(0x366)](_0x4dcbdd);G(_0x247bad[_0x45d567(0x27d)],_0x1792c3)||await this['_closeAfterFatalError'](new j('COLLABORATION_PROTOCOL_ERROR',_0x45d567(0x301))),_0x1f61ac[_0x45d567(0x22c)]({'changeset':_0x247bad,'kind':_0x45d567(0x28a)}),_0x4fbefd=null;continue;}let _0x3bd524=_0x2cb592['mutations'];if(_0x4fbefd!==null){let _0x5397ac=this[_0x45d567(0x219)][_0x45d567(0x363)][_0x45d567(0x1f8)](_0x3bd524,_0x4fbefd,!0x1);if(!_0x74ccd6(_0x5397ac))return this[_0x45d567(0x231)]={'message':_0x5397ac[_0x45d567(0x32b)][_0x45d567(0x239)],'operation':'pull','reason':_0x45d567(0x331)},{'conflict':this['_conflict'],'state':this['getState'](),'status':_0x45d567(0x338)};_0x3bd524=_0x5397ac[_0x45d567(0x35f)],_0x4fbefd=_0x5397ac[_0x45d567(0x27a)];}let _0x2a85d3=this[_0x45d567(0x219)][_0x45d567(0x363)][_0x45d567(0x1f8)](_0x3bd524,_0x51a6e6,!0x1);if(!_0x74ccd6(_0x2a85d3))return this['_conflict']={'message':_0x2a85d3[_0x45d567(0x32b)][_0x45d567(0x239)],'operation':_0x45d567(0x2d8),'reason':_0x45d567(0x331)},{'conflict':this[_0x45d567(0x231)],'state':this[_0x45d567(0x35a)](),'status':'conflict'};_0x1f61ac['push']({'changeset':_0x54e5d7({..._0x2cb592,'mutations':_0x2a85d3['m1Prime']}),'kind':'remote'}),_0x51a6e6=_0x2a85d3['m2Prime'];}let _0x3443cb=_0x267a96;for(let _0x3a28a5 of _0x1f61ac){if(_0x3a28a5[_0x45d567(0x2b9)]==='awaiting-ack'){let _0x511c4f=this[_0x45d567(0x219)][_0x45d567(0x2d4)][_0x45d567(0x2e9)](this[_0x45d567(0x35e)]);_0x511c4f!==_0x3a28a5[_0x45d567(0x20e)][_0x45d567(0x21c)]&&await this[_0x45d567(0x267)](new j('COLLABORATION_PROTOCOL_ERROR',_0x45d567(0x2c2))),_0x3443cb=_0x511c4f;continue;}_0x3443cb=await this['_replayRemoteChangesets'](_0x3443cb,[_0x3a28a5[_0x45d567(0x20e)]]);}return this['_capture'][_0x45d567(0x225)](_0x51a6e6[_0x45d567(0x366)](_0x4dcbdd)),this[_0x45d567(0x27c)]!==null&&(this['_awaiting']=_0x4fbefd===null?null:{...this[_0x45d567(0x27c)],'baseRev':_0x3443cb,'mutations':_0x4fbefd[_0x45d567(0x366)](_0x4dcbdd)}),this[_0x45d567(0x2fe)]=_0x3443cb,this['_bufferedChangesets'][_0x45d567(0x26d)](0x0),{'appliedChangesets':_0x24bba0[_0x45d567(0x366)](z),'fromRevision':_0x267a96,'state':this[_0x45d567(0x35a)](),'status':'pulled','toRevision':_0x3443cb,'transformedPendingMutationCount':_0x51a6e6['length']};});}['commit'](){const _0x2b06f5=_0x28a351;return this[_0x2b06f5(0x25b)]()||this[_0x2b06f5(0x34e)]['run'](async()=>{const _0x42fd70=_0x2b06f5;this[_0x42fd70(0x23f)](_0x42fd70(0x25e));let _0x5d1868=[],_0x1c8e11=[];if(this[_0x42fd70(0x27c)]===null){if(this['_capture']['pending'][_0x42fd70(0x2b6)]===0x0)return{'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x32a)};if(await this[_0x42fd70(0x230)](),this['_bufferedChangesets']['length']>0x0)return{'baseRevision':this[_0x42fd70(0x2fe)],'confirmedChangesets':_0x5d1868,'knownHeadRevision':this[_0x42fd70(0x245)],'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x335)};this[_0x42fd70(0x351)]();}for(;this[_0x42fd70(0x27c)]!==null;){let _0x52b2c9=this[_0x42fd70(0x27c)],_0x167703;try{_0x167703=await this[_0x42fd70(0x1f6)][_0x42fd70(0x212)](_0x52b2c9);}catch{return{'changeset':U(_0x52b2c9),'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':'unknown'};}if(_0x167703[_0x42fd70(0x27f)]===_0x42fd70(0x228)||_0x167703[_0x42fd70(0x27f)]==='unknown')return{'changeset':U(_0x52b2c9),'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x167703[_0x42fd70(0x27f)]};if(_0x167703[_0x42fd70(0x27f)]===_0x42fd70(0x2f6))return _0x167703['reason']===_0x42fd70(0x260)?(this['_capture'][_0x42fd70(0x2d2)](_0x52b2c9['mutations']),this[_0x42fd70(0x27c)]=null,await this['_fetchChangesets'](),{'baseRevision':this[_0x42fd70(0x2fe)],'confirmedChangesets':_0x5d1868,'knownHeadRevision':this[_0x42fd70(0x245)],'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x335)}):(this[_0x42fd70(0x231)]={'message':_0x167703[_0x42fd70(0x239)],'operation':_0x42fd70(0x25e),'reason':_0x167703['reason']===_0x42fd70(0x275)?_0x42fd70(0x2d6):_0x42fd70(0x354)},{'conflict':this[_0x42fd70(0x231)],'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x338)});let _0x40d47f=_0x167703[_0x42fd70(0x27e)];try{this[_0x42fd70(0x303)](_0x52b2c9,_0x167703[_0x42fd70(0x25d)],_0x40d47f);}catch(_0x251dd1){await this[_0x42fd70(0x267)](_0x251dd1);}let _0x2243c4=_0x52b2c9['mutations'];if(_0x167703[_0x42fd70(0x25d)][_0x42fd70(0x2b6)]>0x0){let _0x300fb1=await this[_0x42fd70(0x22b)](_0x52b2c9,_0x167703[_0x42fd70(0x25d)]);if(_0x300fb1===null)return{'conflict':this[_0x42fd70(0x231)],'confirmedChangesets':_0x5d1868,'state':this[_0x42fd70(0x35a)](),'status':_0x42fd70(0x338)};_0x2243c4=_0x300fb1[_0x42fd70(0x1fe)];try{this[_0x42fd70(0x355)](_0x167703['precedingChangesets']);}catch(_0x19872a){await this['_closeAfterFatalError'](_0x19872a);}_0x1c8e11[_0x42fd70(0x22c)](..._0x167703[_0x42fd70(0x25d)][_0x42fd70(0x366)](z));}G(_0x40d47f['mutations'],_0x2243c4)||await this['_closeAfterFatalError'](new j(_0x42fd70(0x339),'Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset'));let _0xb231fa=this[_0x42fd70(0x219)][_0x42fd70(0x2d4)]['incrementRevOfUnit'](this[_0x42fd70(0x35e)]);if(_0xb231fa!==_0x40d47f[_0x42fd70(0x21c)]&&await this['_closeAfterFatalError'](new j(_0x42fd70(0x339),_0x42fd70(0x233))),this[_0x42fd70(0x2fe)]=_0xb231fa,this[_0x42fd70(0x245)]=Math['max'](this[_0x42fd70(0x245)],_0xb231fa),this[_0x42fd70(0x27c)]=null,_0x5d1868[_0x42fd70(0x22c)](z(_0x40d47f)),this[_0x42fd70(0x2a6)][_0x42fd70(0x2a3)][_0x42fd70(0x2b6)]===0x0)break;this['_createAwaitingFromPending']();}return{'confirmedChangesets':_0x5d1868,'reconciledChangesets':_0x1c8e11,'state':this[_0x42fd70(0x35a)](),'status':'confirmed'};});}async['_fetchChangesets'](){const _0x2d2a16=_0x28a351;let _0x511128=this[_0x2d2a16(0x245)],_0x5bf891=await this[_0x2d2a16(0x1f6)][_0x2d2a16(0x2f4)](_0x511128,void 0x0);if(_0x1d0608(_0x5bf891['error'])){let _0x44dc50=_0x5bf891[_0x2d2a16(0x32b)];throw new j(_0x2d2a16(0x215),_0x44dc50?.[_0x2d2a16(0x239)]||'Backend\x20failed\x20to\x20fetch\x20changesets',{'retryable':!0x0});}let _0x2f17ac=R(_0x5bf891[_0x2d2a16(0x2ad)],this[_0x2d2a16(0x35e)],this[_0x2d2a16(0x214)],_0x511128),_0x4a101d=_0x2f17ac['at'](-0x1)?.['revision']??_0x511128;if(_0x5bf891[_0x2d2a16(0x279)]!==void 0x0&&_0x5bf891['latestRevision']!==_0x4a101d)throw new j(_0x2d2a16(0x339),_0x2d2a16(0x20c));return _0x2f17ac[_0x2d2a16(0x2b6)]===0x0?{'knownHeadRevision':this[_0x2d2a16(0x245)],'state':this[_0x2d2a16(0x35a)](),'status':_0x2d2a16(0x2fa)}:(this['_bufferedChangesets'][_0x2d2a16(0x22c)](..._0x2f17ac),this['_knownHeadRevision']=_0x4a101d,{'changesets':_0x2f17ac[_0x2d2a16(0x366)](z),'fromRevision':_0x511128,'state':this[_0x2d2a16(0x35a)](),'status':_0x2d2a16(0x25a),'toRevision':_0x4a101d});}[_0x28a351(0x351)](){const _0x11d735=_0x28a351;let _0x255a8b=this[_0x11d735(0x2a6)][_0x11d735(0x315)]();this[_0x11d735(0x27c)]={'baseRev':this[_0x11d735(0x2fe)],'mutations':_0x255a8b,'reqId':this[_0x11d735(0x29b)],'sid':this['_sid']},this[_0x11d735(0x29b)]+=0x1;}[_0x28a351(0x303)](_0x28bbed,_0x2c16ff,_0x22c075){const _0x16861d=_0x28a351;let _0x15f185=R(_0x2c16ff,this[_0x16861d(0x35e)],this[_0x16861d(0x214)],this[_0x16861d(0x2fe)])['at'](-0x1)?.[_0x16861d(0x21c)]??this['_baseRevision'];if(_0x22c075[_0x16861d(0x202)]!==this[_0x16861d(0x35e)]||_0x22c075[_0x16861d(0x273)]!==this[_0x16861d(0x214)]||_0x22c075[_0x16861d(0x333)]!==_0x28bbed[_0x16861d(0x333)]||_0x22c075[_0x16861d(0x347)]!==_0x28bbed[_0x16861d(0x347)]||_0x22c075[_0x16861d(0x22a)]!==_0x15f185||_0x22c075[_0x16861d(0x21c)]!==_0x15f185+0x1)throw new j(_0x16861d(0x339),'Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset');}async['_reconcilePrecedingChangesets'](_0x1f7a18,_0x2e683e){const _0x462844=_0x28a351;let _0x49bd9a=W(_0x1f7a18[_0x462844(0x27d)],this[_0x462844(0x35e)],this[_0x462844(0x214)],this[_0x462844(0x2fe)]),_0x8b8565=W(this[_0x462844(0x2a6)][_0x462844(0x2a3)],this[_0x462844(0x35e)],this[_0x462844(0x214)],this[_0x462844(0x2fe)]),_0xa56e9e=[];for(let _0x46eda8 of _0x2e683e){let _0x1787d7=_0xeb2c40(_0x46eda8),_0xabebbe=this[_0x462844(0x219)][_0x462844(0x363)][_0x462844(0x1f8)](_0x1787d7[_0x462844(0x27d)],_0x49bd9a,!0x1);if(!_0x74ccd6(_0xabebbe))return this[_0x462844(0x26f)](_0x462844(0x25e),_0xabebbe[_0x462844(0x32b)]),null;_0x49bd9a=_0xabebbe['m2Prime'];let _0x1223f6=this['_kernel'][_0x462844(0x363)][_0x462844(0x1f8)](_0xabebbe[_0x462844(0x35f)],_0x8b8565,!0x1);if(!_0x74ccd6(_0x1223f6))return this['_setTransformConflict'](_0x462844(0x25e),_0x1223f6['error']),null;_0x8b8565=_0x1223f6[_0x462844(0x27a)],_0xa56e9e['push'](_0x54e5d7({..._0x1787d7,'mutations':_0x1223f6[_0x462844(0x35f)]}));}let _0x57149a=await this['_replayRemoteChangesets'](this['_baseRevision'],_0xa56e9e);return this['_capture'][_0x462844(0x225)](_0x8b8565[_0x462844(0x366)](_0x4dcbdd)),this[_0x462844(0x2fe)]=_0x57149a,{'awaitingMutations':_0x49bd9a[_0x462844(0x366)](_0x4dcbdd),'revision':_0x57149a};}[_0x28a351(0x26f)](_0x40f67e,_0x2eb99b){const _0xcf3eda=_0x28a351;this[_0xcf3eda(0x231)]={'message':_0x2eb99b[_0xcf3eda(0x239)],'operation':_0x40f67e,'reason':_0xcf3eda(0x331)};}async[_0x28a351(0x2cf)](_0x143a39,_0x3838c1){const _0xdb1c06=_0x28a351;try{return await this['_capture'][_0xdb1c06(0x278)](async()=>B(this['_kernel'],this[_0xdb1c06(0x35e)],this['unitType'],_0x143a39,_0x3838c1,_0xdb1c06(0x203)));}catch(_0x5ad12b){return await this['_closeAfterFatalError'](_0x5ad12b);}}async[_0x28a351(0x267)](_0x103bab){const _0x48e56f=_0x28a351;this['_acceptingOperations']=!0x1,this[_0x48e56f(0x2ff)]??=this[_0x48e56f(0x2fc)]();try{await this[_0x48e56f(0x2ff)];}catch{}throw _0x103bab;}['_consumeBufferedPrecedingChangesets'](_0x1337fa){const _0x310270=_0x28a351;let _0x412ada=_0x1337fa['at'](-0x1)?.[_0x310270(0x21c)];if(_0x412ada===void 0x0||this['_bufferedChangesets'][_0x310270(0x2b6)]===0x0)return;let _0x2dde5a=this['_bufferedChangesets'][_0x310270(0x2b1)](({revision:_0x2f3144})=>_0x2f3144>_0x412ada),_0x10bd1f=this[_0x310270(0x320)][_0x310270(0x29c)](0x0,_0x2dde5a===-0x1?this[_0x310270(0x320)][_0x310270(0x2b6)]:_0x2dde5a);for(let _0x49bf1e of _0x10bd1f){let _0x4587aa=_0x1337fa[_0x310270(0x318)](({revision:_0x757a0e})=>_0x757a0e===_0x49bf1e['revision']);if(!_0x4587aa||!pe(_0x49bf1e,_0x4587aa))throw new j(_0x310270(0x339),_0x310270(0x2af));}this[_0x310270(0x320)]['splice'](0x0,_0x10bd1f['length']);}[_0x28a351(0x330)](_0x297624){const _0x19e756=_0x28a351;return this[_0x19e756(0x25b)]()||this[_0x19e756(0x34e)][_0x19e756(0x350)](async()=>{const _0x57c968=_0x19e756;_0x297624[_0x57c968(0x244)]===_0x57c968(0x2e2)&&this['_assertMutableState'](_0x57c968(0x2e2));let _0x50cbaf=this[_0x57c968(0x2a6)][_0x57c968(0x2a3)][_0x57c968(0x2b6)],_0x506fc1=P(await this[_0x57c968(0x30f)][_0x57c968(0x330)](_0x297624['code'],_0x297624['mode']));return _0x297624['mode']===_0x57c968(0x2d9)?{'state':this['getState'](),'value':_0x506fc1}:{'mutations':this['_capture'][_0x57c968(0x361)](_0x50cbaf),'state':this[_0x57c968(0x35a)](),'value':_0x506fc1};});}[_0x28a351(0x235)](_0x379ece){const _0x2cf981=_0x28a351;return this['_rejectIfNotAccepting']()||this[_0x2cf981(0x34e)]['run'](async()=>{const _0x98aa00=_0x2cf981;if(this[_0x98aa00(0x23f)]('replace\x20mutations'),this[_0x98aa00(0x27c)]!==null)throw new j(_0x98aa00(0x274),_0x98aa00(0x352));let _0x4b2b1d=me(_0x379ece),_0x58d3b5=[...this['_capture'][_0x98aa00(0x2a3)]];this[_0x98aa00(0x2a6)]['replacePending'](_0x4b2b1d);let _0x1a4250=this['getState']();return{'pendingMutationCount':_0x4b2b1d[_0x98aa00(0x2b6)],'previousMutationCount':_0x58d3b5[_0x98aa00(0x2b6)],'state':_0x1a4250};});}[_0x28a351(0x33f)](){const _0xdf58cb=_0x28a351;return this[_0xdf58cb(0x25b)]()||this[_0xdf58cb(0x34e)][_0xdf58cb(0x350)](async()=>V(this['_univer'],this[_0xdf58cb(0x35e)],this[_0xdf58cb(0x214)]));}[_0x28a351(0x2f7)](){const _0x25bb3c=_0x28a351;return this['_closePromise']?this[_0x25bb3c(0x2ff)]:(this['_acceptingOperations']=!0x1,this[_0x25bb3c(0x2ff)]=this[_0x25bb3c(0x34e)][_0x25bb3c(0x350)](async()=>await this[_0x25bb3c(0x2fc)]()),this[_0x25bb3c(0x2ff)]);}async[_0x28a351(0x2fc)](){const _0x4903ad=_0x28a351;try{this['_capture'][_0x4903ad(0x285)](),await this[_0x4903ad(0x1f6)][_0x4903ad(0x2f7)]();}finally{try{this[_0x4903ad(0x1f7)][_0x4903ad(0x285)]();}finally{this[_0x4903ad(0x31b)]=!0x0;}}}['_rejectIfNotAccepting'](){const _0x42f481=_0x28a351;return this['_acceptingOperations']?null:Promise[_0x42f481(0x298)](new j(_0x42f481(0x293),'Collaboration\x20runtime\x20is\x20closing\x20or\x20closed'));}['_assertMutableState'](_0x27d61d){const _0x39eccb=_0x28a351;if(this[_0x39eccb(0x231)]!==null)throw new j(_0x39eccb(0x274),'Cannot\x20'+_0x27d61d+_0x39eccb(0x1f3));}};function U(_0xbee2d0){const _0x3f0cc6=_0x28a351;return{'baseRevision':_0xbee2d0[_0x3f0cc6(0x22a)],'mutationCount':_0xbee2d0[_0x3f0cc6(0x27d)][_0x3f0cc6(0x2b6)],'reqId':_0xbee2d0[_0x3f0cc6(0x347)],'revision':0x0,'sid':_0xbee2d0[_0x3f0cc6(0x333)]};}function W(_0xbd5e4a,_0x356f1c,_0x1ea63d,_0x224d85){const _0x5cf181=_0x28a351;return _0xeb2c40({'baseRev':_0x224d85,'memberID':'','mutations':[..._0xbd5e4a],'revision':0x0,'type':_0x1ea63d,'unitID':_0x356f1c,'userID':''})[_0x5cf181(0x27d)];}function pe(_0xd65412,_0x545986){const _0x15d709=_0x28a351;return _0xd65412[_0x15d709(0x202)]===_0x545986[_0x15d709(0x202)]&&_0xd65412[_0x15d709(0x273)]===_0x545986[_0x15d709(0x273)]&&_0xd65412['baseRev']===_0x545986['baseRev']&&_0xd65412[_0x15d709(0x21c)]===_0x545986['revision']&&_0xd65412['sid']===_0x545986[_0x15d709(0x333)]&&_0xd65412[_0x15d709(0x347)]===_0x545986[_0x15d709(0x347)]&&JSON['stringify'](_0xd65412[_0x15d709(0x27d)])===JSON[_0x15d709(0x326)](_0x545986[_0x15d709(0x27d)]);}function G(_0x1383ec,_0x48bed1){const _0x38c23a=_0x28a351;return _0x1383ec[_0x38c23a(0x2b6)]===_0x48bed1[_0x38c23a(0x2b6)]&&_0x1383ec['every']((_0x51f9fc,_0x155f3d)=>_0x51f9fc['id']===_0x48bed1[_0x155f3d]?.['id']&&_0x51f9fc[_0x38c23a(0x2ca)]===_0x48bed1[_0x155f3d]?.[_0x38c23a(0x2ca)]);}function me(_0x11aa9f){const _0xb54418=_0x28a351;if(!Array['isArray'](_0x11aa9f))throw new j(_0xb54418(0x274),'Replacement\x20mutations\x20must\x20be\x20an\x20array');return _0x11aa9f[_0xb54418(0x366)](_0x193497=>{const _0x1763b5=_0xb54418;if(!_0x193497||typeof _0x193497!='object'||typeof _0x193497['id']!='string'||_0x193497['id'][_0x1763b5(0x2b6)]===0x0||typeof _0x193497['data']!=_0x1763b5(0x30c))throw new j(_0x1763b5(0x274),'Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields');return{'data':_0x193497[_0x1763b5(0x2ca)],'id':_0x193497['id']};});}var K=class extends _0x45c71a{['_config'];[_0x28a351(0x2bb)];static ['pluginName']=_0x28a351(0x309);constructor(_0x13c6e7,_0x43e55a){const _0x2e6442=_0x28a351;super(),this[_0x2e6442(0x2d1)]=_0x13c6e7,this['_injector']=_0x43e55a;}[_0x28a351(0x348)](){const _0x1e7867=_0x28a351;this['_config'][_0x1e7867(0x296)]!==void 0x0&&_0x9caa23(this[_0x1e7867(0x2bb)],[[_0x2114fe,{'useValue':this[_0x1e7867(0x2d1)]['snapshotServerService']}]]),this[_0x1e7867(0x2d1)][_0x1e7867(0x348)]({'commandService':this[_0x1e7867(0x2bb)]['get'](_0x24a215),'compressMutationService':this['_injector'][_0x1e7867(0x1fc)](_0x45cd35),'instanceService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x4f82f9),'injector':this[_0x1e7867(0x2bb)],'revisionService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x56a7c3),'transformService':this[_0x1e7867(0x2bb)][_0x1e7867(0x1fc)](_0x309abf)});}};K=_0x5bf473([_0x47e19f(_0x91edc2),_0x45e199(0x1,_0x407b4d(_0x419b26))],K);function he(_0xf07488,_0x1ca6da){const _0x1260ac=_0x28a351;let _0x409ce4;if(_0xf07488[_0x1260ac(0x2bc)](K,{'onStarting'(_0xc544d5){_0x409ce4=_0xc544d5;},..._0x1ca6da===void 0x0?{}:{'snapshotServerService':_0x1ca6da}}),!_0x409ce4)throw Error('Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle');return _0x409ce4;}async function ge(_0x1adf9b,_0x2a4472,_0xe24771){const _0x53f509=_0x28a351;let _0x2cabd7=await _0x1adf9b['getUnitOnRev'](0x0);if(_0x1d0608(_0x2cabd7[_0x53f509(0x32b)])){let _0x18f087=_0x2cabd7[_0x53f509(0x32b)];throw new j('COLLABORATION_LOAD_FAILED',_0x18f087?.[_0x53f509(0x239)]||_0x53f509(0x24e));}let _0x42f6b7=_0x2cabd7['snapshot'];if(!_0x42f6b7)throw new j(_0x53f509(0x33c),_0x53f509(0x22e));_e(_0x42f6b7,_0x2a4472,_0xe24771);try{switch(_0xe24771){case _0x27cc9f['UNIVER_SHEET']:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':await _0x25d93a(_0x42f6b7,await q(_0x1adf9b,_0x42f6b7)),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x30d)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x6ffd28(_0x42f6b7),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x27b)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x1ce93e(_0x42f6b7),'unitType':_0xe24771};case _0x27cc9f[_0x53f509(0x314)]:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':await _0x16c6bc(_0x42f6b7,await q(_0x1adf9b,_0x42f6b7)),'unitType':_0xe24771};case _0x27cc9f['UNIVER_BOARD']:return{'changesets':_0x2cabd7[_0x53f509(0x2ad)],'unitData':_0x641f7a(_0x42f6b7),'unitType':_0xe24771};default:throw new j('COLLABORATION_INVALID_INPUT',_0x53f509(0x329)+_0xe24771);}}catch(_0x79c59f){throw _0x79c59f instanceof j?_0x79c59f:new j(_0x53f509(0x33c),_0x53f509(0x2b4),{'cause':_0x79c59f});}}function _e(_0x33bddd,_0x19bb2e,_0x218abb){const _0x509d61=_0x28a351;if(_0x33bddd[_0x509d61(0x202)]!==_0x19bb2e||_0x33bddd[_0x509d61(0x273)]!==_0x218abb)throw new j(_0x509d61(0x33c),_0x509d61(0x302));if(!Number[_0x509d61(0x34c)](_0x33bddd['rev'])||_0x33bddd[_0x509d61(0x332)]<0x1)throw new j(_0x509d61(0x33c),_0x509d61(0x280));}async function q(_0x3e6191,_0x39af6c){const _0x361d84=_0x28a351;let _0x4dee71=_0x39af6c['workbook'];if(!_0x4dee71)throw new j(_0x361d84(0x33c),_0x361d84(0x213));let _0x46c330=Object[_0x361d84(0x2c0)](_0x4dee71[_0x361d84(0x2f1)])['flatMap'](({blocks:_0x222826})=>_0x222826);if(new Set(_0x46c330)['size']!==_0x46c330['length'])throw new j(_0x361d84(0x33c),'Snapshot\x20contains\x20duplicate\x20block\x20ids');return await Promise[_0x361d84(0x207)](_0x46c330[_0x361d84(0x366)](async _0x493db7=>{const _0xf96ed8=_0x361d84;let _0x374b36=await _0x3e6191['getSheetBlock'](_0x493db7);if(_0x1d0608(_0x374b36[_0xf96ed8(0x32b)])||!_0x374b36[_0xf96ed8(0x200)])throw new j('COLLABORATION_LOAD_FAILED',_0x374b36[_0xf96ed8(0x32b)]?.[_0xf96ed8(0x239)]||_0xf96ed8(0x25f)+_0x493db7+'\x20is\x20unavailable');if(_0x374b36[_0xf96ed8(0x200)]['id']!==_0x493db7)throw new j(_0xf96ed8(0x33c),_0xf96ed8(0x25f)+_0x493db7+_0xf96ed8(0x2d3));return _0x374b36['block'];}));}function ve(_0x1a7642){const _0xcab7ad=_0x28a351;let _0x362da0=_0x1a7642[_0xcab7ad(0x2d7)]??0xa00000;if(!Number[_0xcab7ad(0x34c)](_0x362da0)||_0x362da0<=0x0)throw new j(_0xcab7ad(0x274),_0xcab7ad(0x2ed));return{async 'load'(_0xca669f,_0x232a06){const _0x2a3805=_0xcab7ad;be(_0xca669f,_0x232a06);let _0x62a189,_0x532810={'unitId':_0xca669f,'unitType':_0x232a06},_0x120d31={'unitId':_0xca669f,'unitType':_0x232a06,..._0x1a7642['snapshotServerService']===void 0x0?{}:{'resolveSnapshotService':()=>{const _0x12ea2c=_0x2b76;if(_0x62a189===void 0x0)throw new j(_0x12ea2c(0x33c),_0x12ea2c(0x32c));return _0x62a189;}}},_0x57cd07;try{_0x57cd07=await _0x1a7642[_0x2a3805(0x2e8)][_0x2a3805(0x29f)](_0x532810);}catch(_0x263b2a){throw new j(_0x2a3805(0x215),'Failed\x20to\x20open\x20the\x20collaboration\x20backend',{'cause':_0x263b2a,'retryable':!0x0});}let _0x31cc16;try{_0x31cc16=await _0x1a7642[_0x2a3805(0x258)](_0x120d31);let _0x37bcdd=he(_0x31cc16,_0x1a7642[_0x2a3805(0x296)]);_0x1a7642[_0x2a3805(0x296)]!==void 0x0&&(_0x62a189=_0x37bcdd['injector'][_0x2a3805(0x1fc)](_0x3e3e5b));let _0x42de48=await xe(_0x57cd07,_0xca669f,_0x232a06);Se(_0x42de48,_0x532810),Ce(_0x31cc16,_0x42de48);let _0x5913a1=B(_0x37bcdd,_0xca669f,_0x232a06,J(_0x42de48[_0x2a3805(0x2f8)]),_0x42de48[_0x2a3805(0x2ad)]),_0x56f844=await _0x57cd07[_0x2a3805(0x2f4)](_0x5913a1,void 0x0);if(_0x1d0608(_0x56f844[_0x2a3805(0x32b)])){let _0x42be9d=_0x56f844['error'];throw new j(_0x2a3805(0x215),_0x42be9d?.[_0x2a3805(0x239)]||_0x2a3805(0x251),{'retryable':!0x0});}let _0x4fa8d9=R(_0x56f844[_0x2a3805(0x2ad)],_0xca669f,_0x232a06,_0x5913a1),_0x89871a=_0x4fa8d9['at'](-0x1)?.[_0x2a3805(0x21c)]??_0x5913a1;if(_0x56f844['latestRevision']!==void 0x0&&_0x56f844['latestRevision']!==_0x89871a)throw new j(_0x2a3805(0x339),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range');return _0x5913a1=B(_0x37bcdd,_0xca669f,_0x232a06,_0x5913a1,_0x4fa8d9),await ye(_0x37bcdd),new fe(_0xca669f,_0x232a06,_0x5913a1,_0x57cd07,_0x31cc16,_0x37bcdd,_0x362da0);}catch(_0x4b2902){try{await _0x57cd07[_0x2a3805(0x2f7)]();}catch{}try{_0x31cc16?.[_0x2a3805(0x285)]();}catch{}throw _0x4b2902 instanceof j?_0x4b2902:new j(_0x2a3805(0x33c),_0x2a3805(0x261),{'cause':_0x4b2902});}}};}async function ye(_0x5b5282){const _0x1d1b0f=_0x28a351;_0x5b5282['injector'][_0x1d1b0f(0x281)](_0x3c1c2d)&&await _0x5b5282[_0x1d1b0f(0x336)][_0x1d1b0f(0x1fc)](_0x3c1c2d)['waitForLatestApplied']();}function be(_0x294f24,_0x3ae24e){const _0x19cc8d=_0x28a351;if(_0x294f24[_0x19cc8d(0x227)]()[_0x19cc8d(0x2b6)]===0x0)throw new j(_0x19cc8d(0x274),'unitId\x20must\x20not\x20be\x20empty');if(_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x34d)]&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x30d)]&&_0x3ae24e!==_0x27cc9f['UNIVER_SLIDE']&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x314)]&&_0x3ae24e!==_0x27cc9f[_0x19cc8d(0x287)])throw new j(_0x19cc8d(0x274),_0x19cc8d(0x329)+_0x3ae24e);}async function xe(_0x58deee,_0x5a64fa,_0x2147d0){const _0x1563b8=_0x28a351;return _0x58deee[_0x1563b8(0x224)]===_0x1563b8(0x32e)?await _0x58deee['getUnitData']():await ge(_0x58deee,_0x5a64fa,_0x2147d0);}function Se(_0x187856,_0x5f4bcc){const _0x263e0d=_0x28a351;if(_0x187856[_0x263e0d(0x214)]!==_0x5f4bcc[_0x263e0d(0x214)])throw new j(_0x263e0d(0x33c),'Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type');if(_0x187856[_0x263e0d(0x2f8)]['id']!==_0x5f4bcc[_0x263e0d(0x35e)])throw new j(_0x263e0d(0x33c),'Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id');J(_0x187856['unitData']);}function J(_0x39f194){const _0x8c1f12=_0x28a351;let _0x3646be=_0x39f194['rev'];if(!Number[_0x8c1f12(0x34c)](_0x3646be)||_0x3646be===void 0x0||_0x3646be<0x1)throw new j(_0x8c1f12(0x33c),_0x8c1f12(0x256));return _0x3646be;}function Ce(_0x35efa3,_0x2a899d){const _0x3f5ab8=_0x28a351;switch(_0x2a899d['unitType']){case _0x27cc9f[_0x3f5ab8(0x34d)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f[_0x3f5ab8(0x30d)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f['UNIVER_SLIDE']:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;case _0x27cc9f[_0x3f5ab8(0x314)]:_0x35efa3[_0x3f5ab8(0x305)](_0x2a899d['unitType'],structuredClone(_0x2a899d['unitData']));return;case _0x27cc9f[_0x3f5ab8(0x287)]:_0x35efa3['createUnit'](_0x2a899d[_0x3f5ab8(0x214)],structuredClone(_0x2a899d[_0x3f5ab8(0x2f8)]));return;}}var we=class{[_0x28a351(0x2d1)];[_0x28a351(0x33a)];['_lease'];['format']=_0x28a351(0x2ce);constructor(_0x70606f,_0x2674ce,_0x5e7f07){const _0x14e8a9=_0x28a351;this[_0x14e8a9(0x2d1)]=_0x70606f,this['_target']=_0x2674ce,this[_0x14e8a9(0x362)]=_0x5e7f07;}[_0x28a351(0x22d)](){const _0x5c0cbd=_0x28a351;return this['_lease'][_0x5c0cbd(0x22d)]();}async['getUnitOnRev'](_0x523ff5=0x0){const _0x435ac3=_0x28a351;let _0x1ef906=X(this[_0x435ac3(0x2d1)][_0x435ac3(0x2cb)],this[_0x435ac3(0x33a)][_0x435ac3(0x214)],'unit',this[_0x435ac3(0x33a)][_0x435ac3(0x35e)],_0x435ac3(0x332),_0x523ff5),_0x55652d=await Y(this[_0x435ac3(0x2d1)],_0x1ef906);return Te(_0x55652d[_0x435ac3(0x2ce)]),_0x55652d;}async['getSheetBlock'](_0x33300c){const _0x2d84fb=_0x28a351;let _0x464f49=X(this[_0x2d84fb(0x2d1)][_0x2d84fb(0x2cb)],this[_0x2d84fb(0x33a)][_0x2d84fb(0x214)],_0x2d84fb(0x2e7),this[_0x2d84fb(0x33a)]['unitId'],'block',_0x33300c),_0x160346=await Y(this[_0x2d84fb(0x2d1)],_0x464f49);return _0x160346[_0x2d84fb(0x200)]&&typeof _0x160346[_0x2d84fb(0x200)][_0x2d84fb(0x2ca)]==_0x2d84fb(0x30c)&&(_0x160346[_0x2d84fb(0x200)][_0x2d84fb(0x2ca)]=Z(_0x160346[_0x2d84fb(0x200)]['data'])),_0x160346;}async[_0x28a351(0x2f4)](_0x10606c,_0x2cd081=0x0){const _0x253736=_0x28a351;let _0x278290=X(this[_0x253736(0x2d1)]['snapshotServerUrl'],this[_0x253736(0x33a)][_0x253736(0x214)],'unit',this[_0x253736(0x33a)]['unitId'],_0x253736(0x2dc));_0x278290[_0x253736(0x299)][_0x253736(0x24f)](_0x253736(0x23e),String(_0x10606c)),_0x278290[_0x253736(0x299)][_0x253736(0x24f)]('to',String(_0x2cd081));let _0x426e91=await Y(this[_0x253736(0x2d1)],_0x278290);return this[_0x253736(0x362)][_0x253736(0x288)](),_0x426e91;}async[_0x28a351(0x212)](_0x1d74aa){const _0x221179=_0x28a351;await this['_lease'][_0x221179(0x223)]();let _0x1b454a=this[_0x221179(0x362)]['waitForSubmission'](_0x1d74aa[_0x221179(0x333)],_0x1d74aa['reqId']),_0x2b1e8b={..._0x1d74aa,'memberID':this[_0x221179(0x362)][_0x221179(0x29e)],'revision':0x0,'type':this[_0x221179(0x33a)]['unitType'],'unitID':this[_0x221179(0x33a)][_0x221179(0x35e)],'userID':''},_0x27f835=X(this[_0x221179(0x2d1)][_0x221179(0x31e)],this['_target'][_0x221179(0x214)],_0x221179(0x2e7),this[_0x221179(0x33a)]['unitId'],_0x221179(0x34b)),_0x416c75=this[_0x221179(0x2d1)][_0x221179(0x241)](_0x27f835,{'body':JSON[_0x221179(0x326)]({'changeset':_0x2b1e8b,'memberID':this[_0x221179(0x362)][_0x221179(0x29e)],'type':this[_0x221179(0x33a)][_0x221179(0x214)],'unitID':this[_0x221179(0x33a)][_0x221179(0x35e)]}),'headers':{'content-type':_0x221179(0x2a0)},'method':_0x221179(0x2bd)})[_0x221179(0x201)](async _0x543f19=>_0x543f19[_0x221179(0x27f)]===0x191||_0x543f19[_0x221179(0x27f)]===0x193?_0x221179(0x26a):_0x543f19[_0x221179(0x27f)]===0x190||_0x543f19['status']===0x199?_0x221179(0x1f9):_0x543f19['ok']?'accepted':_0x221179(0x291))[_0x221179(0x2c6)](()=>_0x221179(0x291)),_0x21ac53=Ee(this['_config']['commitTimeoutMs']),_0x453708=_0x416c75['then'](_0x23b30d=>_0x23b30d===_0x221179(0x26a)?{'status':_0x221179(0x2d6)}:_0x23b30d===_0x221179(0x1f9)?{'status':_0x221179(0x354)}:new Promise(()=>void 0x0)),_0x376e66=await Promise[_0x221179(0x218)]([_0x1b454a['promise'],_0x453708,_0x21ac53[_0x221179(0x2b3)][_0x221179(0x201)](()=>({'status':'timeout'}))])['finally'](()=>{const _0x2447e9=_0x221179;_0x1b454a[_0x2447e9(0x24a)](),_0x21ac53[_0x2447e9(0x24a)]();});if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x221)){let _0x2e9352=await _0x416c75;return _0x2e9352==='permission'?{'message':'Changeset\x20submission\x20was\x20denied','reason':_0x221179(0x275),'status':_0x221179(0x2f6)}:_0x2e9352===_0x221179(0x1f9)?{'message':_0x221179(0x297),'reason':'invalid-changeset','status':_0x221179(0x2f6)}:{'status':_0x221179(0x291)};}if(_0x376e66['status']==='closed')return{'status':_0x221179(0x291)};if(_0x376e66[_0x221179(0x27f)]==='retry')return{'status':_0x221179(0x228)};if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x2d6))return{'message':_0x221179(0x23d),'reason':'permission-denied','status':_0x221179(0x2f6)};if(_0x376e66[_0x221179(0x27f)]===_0x221179(0x354)){let _0x1c589e=await this[_0x221179(0x2f4)](_0x1d74aa['baseRev'],_0x1d74aa['baseRev']);return{'message':_0x221179(0x297),'reason':_0x1c589e[_0x221179(0x279)]!==void 0x0&&_0x1c589e[_0x221179(0x279)]<_0x1d74aa[_0x221179(0x22a)]?'invalid-revision':'invalid-changeset','status':'rejected'};}let _0x417133=_0x376e66[_0x221179(0x20e)],_0x4a949b=await this[_0x221179(0x2f4)](_0x1d74aa[_0x221179(0x22a)],_0x417133[_0x221179(0x21c)]-0x1);if(_0x1d0608(_0x4a949b[_0x221179(0x32b)])){let _0x28bf7f=_0x4a949b['error'];throw new j(_0x221179(0x215),_0x28bf7f?.[_0x221179(0x239)]||_0x221179(0x246),{'retryable':!0x0});}return{'acceptedChangeset':_0x417133,'precedingChangesets':_0x4a949b[_0x221179(0x2ad)],'status':_0x221179(0x359)};}async[_0x28a351(0x2f7)](){const _0x544007=_0x28a351;await this['_lease'][_0x544007(0x2f7)]();}};async function Y(_0x2628c7,_0x20e4d1){const _0x380303=_0x28a351;let _0x38f634;try{_0x38f634=await _0x2628c7[_0x380303(0x241)](_0x20e4d1,{'method':'GET'});}catch(_0x83a00b){throw new j(_0x380303(0x215),_0x380303(0x1fd),{'cause':_0x83a00b,'retryable':!0x0});}if(!_0x38f634['ok'])throw new j(_0x380303(0x215),_0x380303(0x365)+_0x38f634[_0x380303(0x27f)],{'retryable':_0x38f634[_0x380303(0x27f)]>=0x1f4});try{return await _0x38f634[_0x380303(0x2f5)]();}catch(_0x158a5c){throw new j(_0x380303(0x339),'Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON',{'cause':_0x158a5c});}}function X(_0x13131d,..._0x45fc92){const _0x4ab38c=_0x28a351;let _0x1a15e4=new URL(_0x13131d);return _0x1a15e4[_0x4ab38c(0x286)]=_0x1a15e4[_0x4ab38c(0x286)][_0x4ab38c(0x1fa)](/\/$/,'')+'/'+_0x45fc92[_0x4ab38c(0x366)](_0x691694=>encodeURIComponent(String(_0x691694)))['join']('/'),_0x1a15e4;}function Te(_0xa7ada0){const _0x50f83f=_0x28a351;if(!_0xa7ada0)return;let _0x1203a7=[_0xa7ada0['workbook'],_0xa7ada0['doc'],_0xa7ada0['slide'],_0xa7ada0[_0x50f83f(0x2a8)]];for(let _0x468615 of _0x1203a7)_0x468615&&typeof _0x468615[_0x50f83f(0x321)]==_0x50f83f(0x30c)&&(_0x468615[_0x50f83f(0x321)]=Z(_0x468615[_0x50f83f(0x321)]));if(_0xa7ada0['workbook']){for(let _0x32598a of Object[_0x50f83f(0x2c0)](_0xa7ada0[_0x50f83f(0x2c9)][_0x50f83f(0x36b)]))typeof _0x32598a[_0x50f83f(0x321)]=='string'&&(_0x32598a[_0x50f83f(0x321)]=Z(_0x32598a[_0x50f83f(0x321)]));}}function Z(_0x34ddad){const _0x5da7be=_0x28a351;return Uint8Array[_0x5da7be(0x23e)](Buffer[_0x5da7be(0x23e)](_0x34ddad,'base64'));}function Ee(_0x20da55){let _0x489c6a;return{'cancel':()=>{_0x489c6a!==void 0x0&&clearTimeout(_0x489c6a);},'promise':new Promise(_0x4a3549=>{_0x489c6a=setTimeout(_0x4a3549,_0x20da55);})};}var De=class{[_0x28a351(0x2d1)];[_0x28a351(0x2f9)]='offline';['_socket'];[_0x28a351(0x264)];[_0x28a351(0x25c)]='';[_0x28a351(0x2c3)]=new Map();[_0x28a351(0x358)]=new Map();[_0x28a351(0x222)]=new Map();[_0x28a351(0x210)]=new Map();[_0x28a351(0x234)];['_reconnectTimer'];[_0x28a351(0x24d)]=0x0;constructor(_0x219382){const _0x5b3a28=_0x28a351;this[_0x5b3a28(0x2d1)]=_0x219382;}async[_0x28a351(0x33e)](_0x53bf2c){const _0x22e7d9=_0x28a351;let _0xa280bd=this[_0x22e7d9(0x2c3)][_0x22e7d9(0x1fc)](_0x53bf2c['unitId']);if(_0xa280bd&&_0xa280bd[_0x22e7d9(0x2f0)][_0x22e7d9(0x214)]!==_0x53bf2c[_0x22e7d9(0x214)])throw new j(_0x22e7d9(0x274),_0x22e7d9(0x220));if(await this['_ensureConnected'](),_0xa280bd)_0xa280bd[_0x22e7d9(0x2b7)]+=0x1;else{try{await this[_0x22e7d9(0x304)](_0x53bf2c);}catch(_0x264f09){throw this['_joined'][_0x22e7d9(0x35b)]===0x0&&(this['_state']=_0x22e7d9(0x271),this[_0x22e7d9(0x20f)](),this[_0x22e7d9(0x2a2)]?.[_0x22e7d9(0x2f7)](0x3e8,'Initial\x20Unit\x20JOIN\x20failed'),this[_0x22e7d9(0x2a2)]=void 0x0,this[_0x22e7d9(0x25c)]=''),_0x264f09;}this[_0x22e7d9(0x2c3)][_0x22e7d9(0x24f)](_0x53bf2c[_0x22e7d9(0x35e)],{'leases':0x1,'target':_0x53bf2c});}let _0x12d6ed=!0x1,_0x576d26=()=>this['_memberId'],_0x20b210=new Set();return{'close':async()=>{const _0x26861f=_0x22e7d9;if(!_0x12d6ed){_0x12d6ed=!0x0;for(let _0x463d34 of _0x20b210)_0x463d34[_0x26861f(0x24a)]();_0x20b210[_0x26861f(0x327)](),await this[_0x26861f(0x32f)](_0x53bf2c['unitId']);}},'ensureOnline':async()=>await this[_0x22e7d9(0x28f)](),'getConnectionState':()=>_0x12d6ed?_0x22e7d9(0x271):this[_0x22e7d9(0x2f9)],get 'memberId'(){return _0x576d26();},'takeInboundChangesets':()=>{const _0x57b78c=_0x22e7d9;let _0x182f7f=this[_0x57b78c(0x210)][_0x57b78c(0x1fc)](_0x53bf2c[_0x57b78c(0x35e)])??[];return this[_0x57b78c(0x210)][_0x57b78c(0x342)](_0x53bf2c[_0x57b78c(0x35e)]),_0x182f7f;},'waitForSubmission':(_0x29b89b,_0x283063)=>{const _0x12b2bb=_0x22e7d9;let _0x668040=this[_0x12b2bb(0x2c7)](_0x29b89b,_0x283063);return _0x20b210[_0x12b2bb(0x24c)](_0x668040),_0x668040[_0x12b2bb(0x2b3)][_0x12b2bb(0x201)](()=>_0x20b210['delete'](_0x668040),()=>_0x20b210[_0x12b2bb(0x342)](_0x668040)),{'cancel':()=>{const _0x5912dd=_0x12b2bb;_0x20b210[_0x5912dd(0x342)](_0x668040),_0x668040[_0x5912dd(0x24a)]();},'promise':_0x668040[_0x12b2bb(0x2b3)]};}};}async[_0x28a351(0x28f)](){const _0x57a9db=_0x28a351;if(this[_0x57a9db(0x2f9)]!=='online'||this[_0x57a9db(0x2a2)]?.[_0x57a9db(0x269)]!==WebSocket[_0x57a9db(0x270)]){this[_0x57a9db(0x2fd)]!==void 0x0&&clearTimeout(this[_0x57a9db(0x2fd)]),this[_0x57a9db(0x2fd)]=void 0x0,this[_0x57a9db(0x264)]??=this[_0x57a9db(0x2c1)]();try{await this[_0x57a9db(0x264)];}finally{this[_0x57a9db(0x264)]=void 0x0;}}}async[_0x28a351(0x2c1)](){const _0xd94e01=_0x28a351;this['_state']=_0xd94e01(0x2ea);let _0x12c2e9=await this[_0xd94e01(0x2d1)][_0xd94e01(0x241)](this[_0xd94e01(0x2d1)][_0xd94e01(0x2ab)],{'headers':{'content-type':_0xd94e01(0x2a0)},'method':_0xd94e01(0x34f)});if(!_0x12c2e9['ok'])throw this['_state']=_0xd94e01(0x317),new j(_0xd94e01(0x215),_0xd94e01(0x2a1)+_0x12c2e9[_0xd94e01(0x27f)],{'retryable':_0x12c2e9[_0xd94e01(0x27f)]>=0x1f4});let _0x43d872=await _0x12c2e9[_0xd94e01(0x2f5)]();if(typeof _0x43d872[_0xd94e01(0x2b2)]!='string'||_0x43d872['ticket'][_0xd94e01(0x2b6)]===0x0)throw this[_0xd94e01(0x2f9)]='offline',new j(_0xd94e01(0x339),_0xd94e01(0x344));let _0x4caa4b=new URL(this[_0xd94e01(0x2d1)][_0xd94e01(0x206)]);_0x4caa4b[_0xd94e01(0x299)][_0xd94e01(0x24f)](_0xd94e01(0x238),_0x43d872[_0xd94e01(0x2b2)]);let _0x470c58=new WebSocket(_0x4caa4b);this[_0xd94e01(0x2a2)]=_0x470c58,_0x470c58[_0xd94e01(0x349)](_0xd94e01(0x239),_0x2487cc=>this[_0xd94e01(0x226)](_0x2487cc)),_0x470c58['addEventListener']('close',()=>{const _0x20fd07=_0xd94e01;this[_0x20fd07(0x2a2)]===_0x470c58&&(this[_0x20fd07(0x20f)](),this['_failCommandWaiters'](new j('COLLABORATION_UNAVAILABLE',_0x20fd07(0x310),{'retryable':!0x0})),this[_0x20fd07(0x2f9)]=this[_0x20fd07(0x2c3)][_0x20fd07(0x35b)]===0x0?_0x20fd07(0x271):_0x20fd07(0x2ea),this['_joined'][_0x20fd07(0x35b)]>0x0&&this[_0x20fd07(0x26c)]());}),await Oe(_0x470c58);let _0x372be2=await this[_0xd94e01(0x306)](_0x9b7859[_0xd94e01(0x313)],'',{'cmd':_0x9b7859[_0xd94e01(0x313)],'routeKey':''});if(_0x372be2[_0xd94e01(0x236)]!==_0x90bf3a['OK']||typeof _0x372be2[_0xd94e01(0x20b)]?.[_0xd94e01(0x35d)]!='string')throw _0x470c58[_0xd94e01(0x2f7)](),new j(_0xd94e01(0x339),_0xd94e01(0x282));this['_memberId']=_0x372be2[_0xd94e01(0x20b)][_0xd94e01(0x35d)],this[_0xd94e01(0x2f9)]=_0xd94e01(0x28e);for(let {target:_0x290f1b}of this[_0xd94e01(0x2c3)]['values']())try{await this[_0xd94e01(0x304)](_0x290f1b);}catch(_0x4abd55){throw _0x470c58[_0xd94e01(0x2f7)](0x3f3,_0xd94e01(0x312)),_0x4abd55;}this[_0xd94e01(0x24d)]=0x0,this[_0xd94e01(0x307)]();}async[_0x28a351(0x304)](_0x2616f0){const _0x14f407=_0x28a351;let _0x47aa78=await this[_0x14f407(0x306)](_0x9b7859['JOIN'],_0x2616f0[_0x14f407(0x35e)],{'cmd':_0x9b7859['JOIN'],'joinReq':{'rooms':[{'args':'','roomID':_0x2616f0[_0x14f407(0x35e)]}]},'routeKey':_0x2616f0[_0x14f407(0x35e)]});if(_0x47aa78[_0x14f407(0x236)]!==_0x90bf3a['OK'])throw new j('COLLABORATION_UNAVAILABLE',typeof _0x47aa78[_0x14f407(0x248)]==_0x14f407(0x30c)?_0x47aa78[_0x14f407(0x248)]:_0x14f407(0x319));}[_0x28a351(0x306)](_0x5a1e4e,_0x1acae0,_0x2681ea){const _0x29c247=_0x28a351;let _0x456c00=this[_0x29c247(0x2a2)];if(!_0x456c00||_0x456c00['readyState']!==WebSocket[_0x29c247(0x270)])return Promise['reject'](new j(_0x29c247(0x215),_0x29c247(0x272),{'retryable':!0x0}));let _0x4d2e8d=_0x5a1e4e+':'+_0x1acae0;return new Promise((_0x31c9b1,_0x483d0c)=>{const _0x1860bd=_0x29c247;if(this[_0x1860bd(0x358)][_0x1860bd(0x281)](_0x4d2e8d)){_0x483d0c(new j(_0x1860bd(0x339),'A\x20'+_0x5a1e4e+_0x1860bd(0x247)+_0x1acae0));return;}let _0x33334f=setTimeout(()=>{const _0x53a27f=_0x1860bd;this['_commandWaiters'][_0x53a27f(0x342)](_0x4d2e8d),_0x483d0c(new j(_0x53a27f(0x215),_0x53a27f(0x31d)+_0x5a1e4e,{'retryable':!0x0}));},0x7530);this[_0x1860bd(0x358)][_0x1860bd(0x24f)](_0x4d2e8d,{'reject':_0x483d0c,'resolve':_0x31c9b1,'timer':_0x33334f});try{_0x456c00[_0x1860bd(0x209)](JSON[_0x1860bd(0x326)](_0x2681ea));}catch(_0x4c4e92){this['_commandWaiters'][_0x1860bd(0x342)](_0x4d2e8d),clearTimeout(_0x33334f),_0x483d0c(new j(_0x1860bd(0x215),'Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command',{'cause':_0x4c4e92,'retryable':!0x0}));}});}[_0x28a351(0x226)](_0x3b6017){const _0xd17c37=_0x28a351;if(typeof _0x3b6017['data']!=_0xd17c37(0x30c))return;let _0x56f461;try{_0x56f461=JSON[_0xd17c37(0x242)](_0x3b6017[_0xd17c37(0x2ca)]);}catch{this[_0xd17c37(0x2a2)]?.[_0xd17c37(0x2f7)](0x3eb,'Invalid\x20JSON\x20response');return;}let _0x112735=typeof _0x56f461[_0xd17c37(0x2e5)]==_0xd17c37(0x30c)?_0x56f461[_0xd17c37(0x2e5)]:'';if(_0x56f461['cmd']===_0x9b7859[_0xd17c37(0x313)]||_0x56f461[_0xd17c37(0x28d)]===_0x9b7859[_0xd17c37(0x357)]||_0x56f461[_0xd17c37(0x28d)]===_0x9b7859['HEARTBEAT']){let _0x8ddf80=_0x56f461['cmd']+':'+_0x112735,_0x130d06=this[_0xd17c37(0x358)][_0xd17c37(0x1fc)](_0x8ddf80);_0x130d06&&(this[_0xd17c37(0x358)][_0xd17c37(0x342)](_0x8ddf80),clearTimeout(_0x130d06[_0xd17c37(0x1f2)]),_0x130d06[_0xd17c37(0x208)](_0x56f461));return;}_0x56f461[_0xd17c37(0x28d)]!==_0x9b7859[_0xd17c37(0x277)]||!_0x56f461['collaMsg']||this[_0xd17c37(0x35c)](_0x112735,_0x56f461[_0xd17c37(0x276)]);}[_0x28a351(0x35c)](_0xe5df58,_0x84292d){const _0x1ff846=_0x28a351;let _0x2aaa06=_0x84292d[_0x1ff846(0x353)],_0x31da67=_0x2aaa06===_0x1ff846(0x217)?_0x1ff846(0x316):_0x2aaa06===_0x1ff846(0x30e)?_0x1ff846(0x23c):_0x2aaa06===_0x1ff846(0x2bf)?'csShouldRetryEvent':_0x2aaa06==='permission_rej'?'permissionRejEvent':_0x2aaa06===_0x1ff846(0x23a)?_0x1ff846(0x31f):void 0x0;if(!_0x31da67)return;let _0x3231f9=ke(_0x84292d[_0x31da67]);if(!_0x3231f9||_0x3231f9['unitID']!==_0xe5df58)return;if(_0x2aaa06==='new_changesets'){let _0x50d304=this[_0x1ff846(0x210)]['get'](_0xe5df58)??[];_0x50d304['push'](_0x3231f9),this['_inbound'][_0x1ff846(0x24f)](_0xe5df58,_0x50d304);return;}let _0x5066e1=Q(_0x3231f9[_0x1ff846(0x333)],_0x3231f9[_0x1ff846(0x347)]),_0x20a4bc=this['_submissionWaiters'][_0x1ff846(0x1fc)](_0x5066e1);_0x20a4bc&&_0x20a4bc(_0x2aaa06===_0x1ff846(0x217)?{'changeset':_0x3231f9,'status':_0x1ff846(0x2b8)}:_0x2aaa06==='changeset_should_retry'?{'status':_0x1ff846(0x228)}:_0x2aaa06===_0x1ff846(0x2a4)?{'status':_0x1ff846(0x2d6)}:{'status':_0x1ff846(0x354)});}['_waitForSubmission'](_0x389e73,_0x2a42b1){const _0x5f1393=_0x28a351;let _0xaa9725=Q(_0x389e73,_0x2a42b1);if(this['_submissionWaiters']['has'](_0xaa9725))return{'cancel':()=>void 0x0,'promise':Promise[_0x5f1393(0x298)](new j(_0x5f1393(0x274),'The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight'))};let _0x5d862b=()=>void 0x0;return{'cancel':()=>_0x5d862b({'status':'closed'}),'promise':new Promise(_0x5e1e56=>{const _0x482225=_0x5f1393;_0x5d862b=_0x40b2d4=>{const _0x3d5906=_0x2b76;this[_0x3d5906(0x222)][_0x3d5906(0x342)](_0xaa9725)&&_0x5e1e56(_0x40b2d4);},this[_0x482225(0x222)][_0x482225(0x24f)](_0xaa9725,_0x5d862b);})};}async[_0x28a351(0x32f)](_0x54bade){const _0x50c802=_0x28a351;let _0x35639b=this[_0x50c802(0x2c3)][_0x50c802(0x1fc)](_0x54bade);_0x35639b&&(--_0x35639b['leases'],!(_0x35639b['leases']>0x0)&&(this[_0x50c802(0x2c3)][_0x50c802(0x342)](_0x54bade),this[_0x50c802(0x210)][_0x50c802(0x342)](_0x54bade),this[_0x50c802(0x2a2)]?.[_0x50c802(0x269)]===WebSocket[_0x50c802(0x270)]&&this[_0x50c802(0x2a2)][_0x50c802(0x209)](JSON['stringify']({'cmd':_0x9b7859[_0x50c802(0x324)],'leaveReq':{'args':'','roomID':_0x54bade},'routeKey':_0x54bade})),this[_0x50c802(0x2c3)]['size']===0x0&&(this[_0x50c802(0x2f9)]=_0x50c802(0x271),this[_0x50c802(0x2fd)]!==void 0x0&&clearTimeout(this[_0x50c802(0x2fd)]),this[_0x50c802(0x2fd)]=void 0x0,this['_stopHeartbeat'](),this[_0x50c802(0x2a2)]?.['close'](0x3e8,_0x50c802(0x263)),this['_socket']=void 0x0,this[_0x50c802(0x25c)]='')));}[_0x28a351(0x26c)](){const _0x580da2=_0x28a351;if(this[_0x580da2(0x2fd)]!==void 0x0||this[_0x580da2(0x24d)]>=0x3){this['_reconnectAttempts']>=0x3&&(this[_0x580da2(0x2f9)]=_0x580da2(0x317));return;}let _0x2de381=Math[_0x580da2(0x29a)](0x3e8*0x2**this['_reconnectAttempts'],0x4e20);this[_0x580da2(0x24d)]+=0x1,this[_0x580da2(0x2fd)]=setTimeout(()=>{const _0x5229a9=_0x580da2;this['_reconnectTimer']=void 0x0,this[_0x5229a9(0x264)]??=this[_0x5229a9(0x2c1)](),this['_connectPromise'][_0x5229a9(0x2c6)](()=>this[_0x5229a9(0x26c)]())['finally'](()=>{const _0x1a3206=_0x5229a9;this[_0x1a3206(0x264)]=void 0x0;});},_0x2de381);}[_0x28a351(0x307)](){const _0x21aae6=_0x28a351;this['_stopHeartbeat'](),this[_0x21aae6(0x234)]=setInterval(()=>{const _0x5157ca=_0x21aae6;this['_state']==='online'&&this['_requestCommand'](_0x9b7859['HEARTBEAT'],'',{'cmd':_0x9b7859[_0x5157ca(0x204)],'routeKey':''})[_0x5157ca(0x2c6)](()=>this[_0x5157ca(0x2a2)]?.[_0x5157ca(0x2f7)](0x3f3,'Heartbeat\x20failed'));},0x7530);}[_0x28a351(0x20f)](){const _0x4aedc0=_0x28a351;this['_heartbeat']!==void 0x0&&clearInterval(this[_0x4aedc0(0x234)]),this[_0x4aedc0(0x234)]=void 0x0;}['_failCommandWaiters'](_0x16e359){const _0xf3725b=_0x28a351;for(let _0x531925 of this['_commandWaiters'][_0xf3725b(0x2c0)]())clearTimeout(_0x531925['timer']),_0x531925['reject'](_0x16e359);this[_0xf3725b(0x358)][_0xf3725b(0x327)]();}};function Oe(_0x5116b4){return new Promise((_0xbf8474,_0x20cfc6)=>{const _0xaf17ca=_0x2b76;let _0x23844c=()=>{const _0x2e4825=_0x2b76;clearTimeout(_0x1da7f7),_0x5116b4[_0x2e4825(0x205)]('close',_0x5544eb),_0x5116b4[_0x2e4825(0x205)](_0x2e4825(0x32b),_0x1e7e74),_0x5116b4[_0x2e4825(0x205)](_0x2e4825(0x29f),_0x592937);},_0x2b967c=_0x4220c1=>{_0x23844c(),_0x20cfc6(new j('COLLABORATION_UNAVAILABLE',_0x4220c1,{'retryable':!0x0}));},_0x5544eb=()=>_0x2b967c(_0xaf17ca(0x1f4)),_0x1e7e74=()=>_0x2b967c(_0xaf17ca(0x2d5)),_0x592937=()=>{_0x23844c(),_0xbf8474();},_0x1da7f7=setTimeout(()=>{const _0xe8c6c2=_0xaf17ca;_0x2b967c('Timed\x20out\x20establishing\x20Collaboration\x20WebSocket'),_0x5116b4[_0xe8c6c2(0x2f7)](0x3e8,_0xe8c6c2(0x257));},0x7530);_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x2f7),_0x5544eb,{'once':!0x0}),_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x32b),_0x1e7e74,{'once':!0x0}),_0x5116b4[_0xaf17ca(0x349)](_0xaf17ca(0x29f),_0x592937,{'once':!0x0});});}function ke(_0x252cb9){const _0x15049a=_0x28a351;if(!_0x252cb9||typeof _0x252cb9!=_0x15049a(0x2e1))return null;let _0x3d8764=_0x252cb9['cs'];return _0x3d8764&&typeof _0x3d8764=='object'?_0x3d8764:null;}function Q(_0x2da2eb,_0x168ce9){return(_0x2da2eb??'')+':'+(_0x168ce9??0x0);}var Ae=class{[_0x28a351(0x2d1)];[_0x28a351(0x2cd)];constructor(_0x9e8a97){const _0x15e102=_0x28a351;this['_config']=je(_0x9e8a97),this[_0x15e102(0x2cd)]=new De(this[_0x15e102(0x2d1)]);}async[_0x28a351(0x29f)](_0x2e8750){const _0x2e6ef8=_0x28a351;let _0x4d29e1=await this[_0x2e6ef8(0x2cd)][_0x2e6ef8(0x33e)](_0x2e8750);return new we(this[_0x2e6ef8(0x2d1)],_0x2e8750,_0x4d29e1);}};function je(_0x4827f3){const _0x4d2a9e=_0x28a351;let _0x4c5f87=$(_0x4827f3[_0x4d2a9e(0x2cb)],'snapshotServerUrl',[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x566b83=$(_0x4827f3['collabSubmitChangesetUrl'],_0x4d2a9e(0x31e),[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x14b636=$(_0x4827f3[_0x4d2a9e(0x206)],_0x4d2a9e(0x206),[_0x4d2a9e(0x300),_0x4d2a9e(0x262),_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]);_0x14b636['protocol']===_0x4d2a9e(0x2ba)&&(_0x14b636['protocol']='ws:'),_0x14b636['protocol']===_0x4d2a9e(0x369)&&(_0x14b636['protocol']=_0x4d2a9e(0x262));let _0x2ff778=$(_0x4827f3['wsSessionTicketUrl'],'wsSessionTicketUrl',[_0x4d2a9e(0x2ba),_0x4d2a9e(0x369)]),_0x36f54b=_0x4827f3[_0x4d2a9e(0x2fb)]??0x7530;if(!Number['isSafeInteger'](_0x36f54b)||_0x36f54b<=0x0)throw new j(_0x4d2a9e(0x274),_0x4d2a9e(0x364));return{'collabSubmitChangesetUrl':_0x566b83,'collabWebSocketUrl':_0x14b636,'commitTimeoutMs':_0x36f54b,'httpRequest':_0x4827f3[_0x4d2a9e(0x241)]??globalThis['fetch'][_0x4d2a9e(0x254)](globalThis),'snapshotServerUrl':_0x4c5f87,'wsSessionTicketUrl':_0x2ff778};}function $(_0x4f9062,_0x53fb1b,_0x55bec9){const _0x3a750f=_0x28a351;let _0x25cffa;try{_0x25cffa=new URL(_0x4f9062);}catch{throw new j(_0x3a750f(0x274),_0x53fb1b+'\x20must\x20be\x20an\x20absolute\x20URL');}if(!_0x55bec9[_0x3a750f(0x33d)](_0x25cffa[_0x3a750f(0x26e)]))throw new j(_0x3a750f(0x274),_0x53fb1b+'\x20uses\x20an\x20unsupported\x20protocol');return _0x25cffa;}function Me(_0xca302f){return new Ae(_0xca302f);}export{j as CollaborationRuntimeError,Me as createCollaborationServerAdapter,ve as createUniverCollaborationRuntimeFactory};
1
+ const _0x1e2a68=_0x2570;(function(_0x10bf6a,_0x362119){const _0x20183d=_0x2570,_0x55c00a=_0x10bf6a();while(!![]){try{const _0x445d6e=parseInt(_0x20183d(0x141))/0x1+parseInt(_0x20183d(0x1d6))/0x2+parseInt(_0x20183d(0x161))/0x3*(-parseInt(_0x20183d(0x12e))/0x4)+-parseInt(_0x20183d(0x12c))/0x5*(-parseInt(_0x20183d(0x201))/0x6)+parseInt(_0x20183d(0x19a))/0x7+parseInt(_0x20183d(0x152))/0x8+-parseInt(_0x20183d(0x118))/0x9*(parseInt(_0x20183d(0x159))/0xa);if(_0x445d6e===_0x362119)break;else _0x55c00a['push'](_0x55c00a['shift']());}catch(_0x3eb0ec){_0x55c00a['push'](_0x55c00a['shift']());}}}(_0x50e7,0x76863));import{CommandType as _0x1c9d38,DependentOn as _0x3058b1,ICommandService as _0x5f3a62,IUniverInstanceService as _0x2d1751,Inject as _0x19fa35,Injector as _0x1f6005,Plugin as _0x19ba24,UniverInstanceType as _0x5d1892,registerDependencies as _0x3873df,sequenceExecute as _0x29f070,toDisposable as _0x44608b}from'@univerjs/core';import{CompressMutationService as _0x3e3c0a,ISnapshotServerService as _0x4b1d7f,ITransformService as _0x1c0b45,RevertRevisionMutation as _0x6cdd84,RevisionService as _0x1bba2e,SnapshotService as _0xcf35b9,UniverCollaborationPlugin as _0x5b0ef0,isTransformMutationsSuccess as _0x59e012,parseChangesetToProtocol as _0x113098,parseMutationToProtocol as _0x5ec22b,parseProtocolChangeset as _0x19a1b2,transformSnapshotToBaseData as _0x4a2d99,transformSnapshotToBoardData as _0x48cfeb,transformSnapshotToDocumentData as _0x1ff8fd,transformSnapshotToSlideData as _0x109a9d,transformSnapshotToWorkbookData as _0x1da1f9}from'@univerjs-pro/collaboration';import{FormulaCalculationSessionService as _0x18c71a}from'@univerjs/engine-formula';import{CmdRspCode as _0x46fcc4,CombCmd as _0x43e75b,isError as _0x28dcbf}from'@univerjs/protocol';import{PersistFormulaLastValuesCommand as _0x3fedfe}from'@univerjs-pro/engine-formula';import{DocStateChangeManagerService as _0x314147,RichTextEditingMutation as _0x4c7d63}from'@univerjs/docs';import{IRenderManagerService as _0x7adc20}from'@univerjs/engine-render';import{FUniver as _0x5219f4}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 _0x37dfda from'@oxc-project/runtime/helpers/decorateParam';import _0x36215e from'@oxc-project/runtime/helpers/decorate';var j=class extends Error{['code'];[_0x1e2a68(0xda)];constructor(_0x4a8a2b,_0x529d17,_0x4f8b06={}){const _0x1a2f82=_0x1e2a68;super(_0x529d17,_0x4f8b06),this['name']='CollaborationRuntimeError',this[_0x1a2f82(0x1fb)]=_0x4a8a2b,this[_0x1a2f82(0xda)]=_0x4f8b06[_0x1a2f82(0xda)]??!0x1;}},se=class{[_0x1e2a68(0xfb)];[_0x1e2a68(0x19c)];['_pending']=[];['_disposables']=[];[_0x1e2a68(0xaf)]=0x0;constructor(_0x3c2dd5,_0x1a20ee,_0x1b0b8f){const _0x2f1d16=_0x1e2a68;this['_kernel']=_0x3c2dd5,this[_0x2f1d16(0x19c)]=_0x1a20ee,this[_0x2f1d16(0x113)][_0x2f1d16(0x125)](_0x3c2dd5[_0x2f1d16(0x17d)][_0x2f1d16(0x109)]((_0x3b4b41,_0xa44993)=>{const _0x49e7c6=_0x2f1d16;this[_0x49e7c6(0x1c6)](_0x3b4b41,_0xa44993,_0x1b0b8f);})),_0x1b0b8f===_0x5d1892[_0x2f1d16(0x1cf)]&&(_0x3c2dd5[_0x2f1d16(0x104)][_0x2f1d16(0x1e2)](_0x7adc20),this['_subscribeToDocumentState']());}get[_0x1e2a68(0x91)](){const _0x4b050f=_0x1e2a68;return this[_0x4b050f(0x18d)];}[_0x1e2a68(0x98)](_0x5b5352){const _0x97f81b=_0x1e2a68;return this[_0x97f81b(0x18d)][_0x97f81b(0xce)](_0x5b5352);}['replacePending'](_0x362c76){const _0x270207=_0x1e2a68;this[_0x270207(0x18d)][_0x270207(0x18b)](0x0,this[_0x270207(0x18d)]['length'],..._0x362c76);}['takePending'](){const _0x3d0fe2=_0x1e2a68;return this['_pending'][_0x3d0fe2(0x18b)](0x0);}[_0x1e2a68(0x16b)](_0x196b4e){const _0x5e68bf=_0x1e2a68;this[_0x5e68bf(0x18d)]['unshift'](..._0x196b4e);}async[_0x1e2a68(0x1fa)](_0x48363a){const _0x19b77b=_0x1e2a68;this[_0x19b77b(0xaf)]+=0x1;try{return await _0x48363a();}finally{--this['_suppressionDepth'];}}['dispose'](){const _0x2e7a93=_0x1e2a68;for(let _0x1d3ef8 of this[_0x2e7a93(0x113)][_0x2e7a93(0x18b)](0x0))_0x1d3ef8[_0x2e7a93(0x19d)]();}[_0x1e2a68(0x1c6)](_0x3e9e60,_0x2902b9,_0x7e5173){const _0xb41c3b=_0x1e2a68;if(this['_suppressionDepth']>0x0||_0x3e9e60[_0xb41c3b(0x157)]!==_0x1c9d38[_0xb41c3b(0x120)]||_0x2902b9?.['fromCollab']||_0x2902b9?.['fromChangeset']||_0x2902b9?.[_0xb41c3b(0xbf)])return;let _0x26b688=_0x3e9e60[_0xb41c3b(0x18c)];if(_0x26b688?.['unitId']!==void 0x0&&_0x26b688[_0xb41c3b(0x1a5)]!==this['_unitId']){if(_0x26b688[_0xb41c3b(0x1ac)]===_0x3fedfe['id'])return;throw new j('COLLABORATION_INVALID_INPUT',_0xb41c3b(0x202)+this[_0xb41c3b(0x19c)]+_0xb41c3b(0xe8)+_0x3e9e60['id']+'\x20for\x20Unit\x20'+String(_0x26b688['unitId']));}if(_0x26b688?.[_0xb41c3b(0x1a5)]===void 0x0||_0x7e5173===_0x5d1892[_0xb41c3b(0x1cf)]&&_0x3e9e60['id']===_0x4c7d63['id'])return;if(_0x3e9e60['id']===_0x6cdd84['id'])throw new j('COLLABORATION_INVALID_INPUT',_0xb41c3b(0x92));let _0x6a58ed=_0x3e9e60,_0x1ee968=this[_0xb41c3b(0xfb)][_0xb41c3b(0x105)]['interceptor'][_0xb41c3b(0x126)]()[_0xb41c3b(0xdd)],_0x21a020=(this[_0xb41c3b(0xfb)]['compressMutationService'][_0xb41c3b(0xba)][_0xb41c3b(0x16d)](_0x1ee968)([_0x6a58ed],this['_kernel'][_0xb41c3b(0x1ea)])??[_0x6a58ed])[0x0];_0x21a020&&this[_0xb41c3b(0x18d)][_0xb41c3b(0x125)](_0x5ec22b(_0x21a020));}[_0x1e2a68(0x1fc)](){const _0x4a0a40=_0x1e2a68;let _0x3656ff=this['_kernel'][_0x4a0a40(0x104)][_0x4a0a40(0x1e2)](_0x314147)[_0x4a0a40(0x1f0)][_0x4a0a40(0x1ca)](_0x2901ad=>{const _0x526915=_0x4a0a40;if(this[_0x526915(0xaf)]>0x0||_0x2901ad?.[_0x526915(0x1a5)]!==this['_unitId'])return;let _0x5c52e8={'id':_0x2901ad[_0x526915(0x1de)],'params':{'actions':_0x2901ad['redoState'][_0x526915(0x11c)],'textRanges':null,'unitId':_0x2901ad[_0x526915(0x1a5)]},'type':_0x1c9d38[_0x526915(0x120)]};this[_0x526915(0x18d)][_0x526915(0x125)](_0x5ec22b(_0x5c52e8));});this['_disposables'][_0x4a0a40(0x125)](_0x44608b(()=>_0x3656ff['unsubscribe']()));}},ce=new Set(['formula.mutation.set-trigger-formula-calculation-start',_0x1e2a68(0x9d),'formula.mutation.set-trigger-formula-calculation','formula.mutation.set-calculation-result','formula.mutation.set-array-formula-data',_0x1e2a68(0xbd),_0x1e2a68(0x208)]),le=new Set([_0x1e2a68(0xd7),_0x1e2a68(0x160),_0x1e2a68(0x158),'createDocument',_0x1e2a68(0x173),'createUniverSheet',_0x1e2a68(0x9b)]);function ue(_0x56e804,_0x52ec4b,_0x3f2c6d){const _0x41b0de=_0x1e2a68;let _0x83cdde=_0x5219f4[_0x41b0de(0x187)](_0x56e804);return{async 'execute'(_0x2a1dbf,_0x2fd101){const _0x222795=_0x41b0de;if(_0x2a1dbf[_0x222795(0x196)]>_0x3f2c6d)throw new j(_0x222795(0x1d7),'Code\x20is\x20longer\x20than\x20the\x20'+_0x3f2c6d+_0x222795(0x184));let _0x55092d=_0x2fd101===_0x222795(0x150)?M(_0x83cdde):void 0x0,_0x248ed2=de(_0x83cdde,_0x52ec4b);try{return await Function(_0x222795(0x111),_0x222795(0xa7)+_0x2a1dbf+_0x222795(0x100))(_0x248ed2);}finally{_0x55092d?.[_0x222795(0x19d)]();}}};}function de(_0x374673,_0x5e2601){return new Proxy(_0x374673,{'get'(_0x548b3c,_0x2c2a7e,_0x7596e4){const _0x4eb429=_0x2570;return le[_0x4eb429(0x1e8)](_0x2c2a7e)?()=>{const _0x11a1de=_0x4eb429;throw new j(_0x11a1de(0x1d7),'Single-Unit\x20runtime\x20for\x20'+_0x5e2601+_0x11a1de(0x1c8)+String(_0x2c2a7e));}:Reflect['get'](_0x548b3c,_0x2c2a7e,_0x7596e4);}});}function M(_0x9cb2cd){const _0x4efbd5=_0x1e2a68;return _0x9cb2cd[_0x4efbd5(0x147)](_0x9cb2cd[_0x4efbd5(0xd0)]['BeforeCommandExecute'],_0x194ff0=>{const _0x43c2b3=_0x4efbd5;let _0x32d3de=_0x194ff0;if(N(_0x32d3de))throw _0x32d3de[_0x43c2b3(0x93)]=!0x0,new j(_0x43c2b3(0x1d7),'Read\x20execution\x20cannot\x20run\x20persistable\x20action\x20'+_0x32d3de['id']);});}function N(_0x41fbb5){const _0x5daec9=_0x1e2a68;return _0x41fbb5[_0x5daec9(0x157)]===_0x1c9d38[_0x5daec9(0x122)]||_0x41fbb5['type']===_0x1c9d38['MUTATION']&&!ce[_0x5daec9(0x1e8)](_0x41fbb5['id']);}function P(_0x117b19){const _0x3b6b0a=_0x1e2a68;if(_0x117b19===void 0x0)return null;if(_0x117b19===null||typeof _0x117b19==_0x3b6b0a(0x1f6)||typeof _0x117b19==_0x3b6b0a(0xd2))return _0x117b19;if(typeof _0x117b19==_0x3b6b0a(0x116)){if(Number[_0x3b6b0a(0xf8)](_0x117b19))return _0x117b19;throw I();}if(Array[_0x3b6b0a(0x1c1)](_0x117b19))return _0x117b19['map'](P);if(F(_0x117b19))return Object[_0x3b6b0a(0xa5)](Object[_0x3b6b0a(0x174)](_0x117b19)[_0x3b6b0a(0x203)](([_0x2fd216,_0x1c35aa])=>[_0x2fd216,P(_0x1c35aa)]));throw I();}function F(_0x41ae02){const _0x5b2bd4=_0x1e2a68;if(typeof _0x41ae02!=_0x5b2bd4(0x127)||!_0x41ae02)return!0x1;let _0x30e710=Object[_0x5b2bd4(0x1e6)](_0x41ae02);return _0x30e710===Object['prototype']||_0x30e710===null;}function I(){const _0x534619=_0x1e2a68;return new j(_0x534619(0x1d7),'Collaboration\x20runtime\x20result\x20must\x20be\x20JSON-compatible');}var L=class{['_tail']=Promise[_0x1e2a68(0x107)]();['run'](_0x3d1de0){const _0x112918=_0x1e2a68;let _0x451b21=this[_0x112918(0x110)][_0x112918(0x1c9)](_0x3d1de0,_0x3d1de0);return this[_0x112918(0x110)]=_0x451b21['then'](()=>void 0x0,()=>void 0x0),_0x451b21;}};function R(_0x4b91a5,_0x19dec0,_0x2d9b83,_0x2b105c){const _0x4f1b63=_0x1e2a68;if(!Array[_0x4f1b63(0x1c1)](_0x4b91a5))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x4f1b63(0x9a));let _0xe3209c=[..._0x4b91a5][_0x4f1b63(0x11e)]((_0x13284b,_0x1685c9)=>_0x13284b[_0x4f1b63(0x18f)]-_0x1685c9['revision']),_0x406cb1=_0x2b105c;for(let _0x581e48 of _0xe3209c){if(!_0x581e48||typeof _0x581e48!=_0x4f1b63(0x127)||!Array[_0x4f1b63(0x1c1)](_0x581e48['mutations'])||_0x581e48[_0x4f1b63(0x13e)][_0x4f1b63(0x1bb)](_0x596b7a=>!_0x596b7a||typeof _0x596b7a!=_0x4f1b63(0x127)||!('id'in _0x596b7a)||typeof _0x596b7a['id']!=_0x4f1b63(0xd2)||!(_0x4f1b63(0xb5)in _0x596b7a)||typeof _0x596b7a[_0x4f1b63(0xb5)]!=_0x4f1b63(0xd2))||!Number[_0x4f1b63(0x14e)](_0x581e48[_0x4f1b63(0xa8)])||!Number['isSafeInteger'](_0x581e48[_0x4f1b63(0x18f)])||_0x581e48['unitID']!==_0x19dec0||_0x581e48[_0x4f1b63(0x157)]!==_0x2d9b83||_0x581e48[_0x4f1b63(0xa8)]!==_0x406cb1||_0x581e48['revision']!==_0x406cb1+0x1)throw new j(_0x4f1b63(0xb7),'Backend\x20returned\x20a\x20non-contiguous\x20changeset\x20range');_0x406cb1=_0x581e48[_0x4f1b63(0x18f)];}return _0xe3209c;}function _0x50e7(){const _0x1bccd9=['permission-rejected','Snapshot\x20Unit\x20identity\x20does\x20not\x20match\x20the\x20requested\x20Unit','_rejectIfNotAccepting','join','createUniver','isFinite','_requestCommand','_handle','_kernel','Session\x20ticket\x20response\x20is\x20missing\x20a\x20ticket','Failed\x20to\x20open\x20the\x20collaboration\x20backend','_joined','replacePending','\x20})();','routeKey','Failed\x20to\x20send\x20Collaboration\x20WebSocket\x20command','_connect','injector','compressMutationService','up-to-date','resolve','cmd','onMutationExecutedForCollab','pull','fetch','randomUUID','retry','Initial\x20Unit\x20JOIN\x20failed','_executor','_tail','univerAPI','Heartbeat\x20failed','_disposables','searchParams','takePending','number','Unit\x20','54cjvzNi','_startHeartbeat','_setTransformConflict','Collaboration\x20HTTP\x20request\x20failed','actions','blockMeta','sort','UNIVER_BOARD','MUTATION','_join','COMMAND','changesets','Collaboration\x20HTTP\x20request\x20failed\x20with\x20status\x20','push','getInterceptPoints','object','unitId\x20must\x20not\x20be\x20empty','UNIVER_SHEET','UNIVER_CLI_SDK_MANUAL_COLLABORATION_PLUGIN','min','2690xXnkTO','getPresentation','210612kRmMfc','commitTimeoutMs','Unsupported\x20collaboration\x20Unit\x20type:\x20','_baseRevision','wsSessionTicketUrl','pathname','Replacement\x20mutations\x20must\x20contain\x20non-empty\x20id\x20and\x20string\x20data\x20fields','base64','leases','getConnectionState','kind','http:','offline','COLLABORATION_CLOSED','changeset','Confirmed\x20changeset\x20history\x20is\x20not\x20contiguous','mutations','timer','_scheduleReconnect','462840FojyLp','_memberId','Checkpoint\x20Unit\x20id\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20id','Confirmed\x20mutation\x20replay\x20failed\x20at\x20index\x20','_release','fetched','addEvent','set','error','_heartbeat','Backend\x20failed\x20to\x20close\x20the\x20initial\x20revision\x20gap','_config','ACK\x20revision\x20does\x20not\x20follow\x20the\x20applied\x20confirmed\x20revision','isSafeInteger','close','read','unitType','900448nvfLKy','\x20must\x20be\x20an\x20absolute\x20URL','timeout','createUnit','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20pulled\x20in\x20place','type','createWorkbook','1575680HvmEHd','getUnitData','result','memberId','Failed\x20to\x20create\x20the\x20collaboration\x20runtime','COLLABORATION_UNAVAILABLE','permissionRejEvent','createBoard','3vLaFkp','pluginName','_fetchChangesets','HELLO','_failCommandWaiters','_closeOwnedResources','getSheetBlock','https:','_target','transform-failed','prependPending','catch','fetchThroughInterceptors','_reconcilePrecedingChangesets','snapshot','invalid-revision','sheets','_socket','createPresentation','entries','unchanged','findIndex','protocol','No\x20active\x20Unit\x20leases','_closePromise','every','replace\x20mutations','_conflict','commandService','conflict','_closeAfterFatalError','UNIVER_BASE','Cannot\x20','Backend\x20returned\x20an\x20ACK\x20whose\x20mutations\x20do\x20not\x20match\x20the\x20submitted\x20changeset','The\x20same\x20changeset\x20submission\x20is\x20already\x20in\x20flight','\x20character\x20limit','closed','\x20is\x20unavailable','newAPI','remote','all','Awaiting\x20changeset\x20echo\x20does\x20not\x20follow\x20the\x20current\x20revision','splice','params','_pending','_connection','revision','Connection\x20timed\x20out','_awaiting','execute','revisionService','open','confirmed','length','collabWebSocketUrl','_knownHeadRevision','_nextReqId','5856949XuJEVK','changeset-rejected','_unitId','dispose','backend','wss:','application/json','COLLABORATION_LOAD_FAILED','size','permission','_connectPromise','unitId','Cannot\x20replace\x20mutations\x20after\x20a\x20changeset\x20is\x20awaiting\x20confirmation','online','reason','Checkpoint\x20Unit\x20type\x20does\x20not\x20match\x20the\x20requested\x20Unit\x20type','snapshotServerService','write','trigger','block','collabSubmitChangesetUrl','Changeset\x20submission\x20was\x20rejected','unit','invalid','workbook','acceptedChangeset','getDocument','snapshotServerUrl','Snapshot\x20block\x20','_handleMessage','Timed\x20out\x20establishing\x20Collaboration\x20WebSocket','latestRevision','waitForLatestApplied','some','fetchChangesets','_state','_reconnectAttempts','_waitForSubmission','reconnecting','isArray','rejected','ticket','getWorkbook','initial','_captureCommandMutation','message','\x20cannot\x20call\x20','then','subscribe','Session\x20ticket\x20request\x20failed\x20with\x20HTTP\x20','memberID','awaiting-ack','\x20after\x20the\x20collaboration\x20runtime\x20entered\x20conflict','UNIVER_DOC','getBoard','submitChangeset','unitData','_ensureConnected','infoRsp','m2Prime','79382fMXUrw','COLLABORATION_INVALID_INPUT','acquire','exportUnitData','GET','Backend\x20latest\x20revision\x20does\x20not\x20match\x20the\x20initial\x20continuous\x20changeset\x20range','permission_rej','_commandWaiters','commandId','Failed\x20to\x20establish\x20Collaboration\x20WebSocket','_createAwaitingFromPending','_injector','get','_sid','Backend\x20failed\x20to\x20fetch\x20changesets','sid','getPrototypeOf','registerPlugin','has','run','instanceService','POST','transformMutations','Backend\x20returned\x20an\x20ACK\x20that\x20does\x20not\x20match\x20the\x20submitted\x20changeset','originalMeta','_replayRemoteChangesets','docStateChange$','getUnitOnRev','_stopHeartbeat','Failed\x20to\x20rejoin\x20Unit\x20room','_assertMutableState','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20cannot\x20be\x20replayed\x20in\x20place','boolean','readyState','unknown','unitID','suppress','code','_subscribeToDocumentState','commit','invalid-changeset','reject','permission-denied','354VEPIUR','Runtime\x20for\x20','map','_closed','mode','add','_submissionWaiters','sheet.mutation.send-init-pivot-text-local','new_changesets','values','_operations','pending','Historical\x20restore\x20requires\x20reloading\x20the\x20Unit\x20and\x20is\x20not\x20supported\x20by\x20this\x20runtime','cancel','LEAVE','takeInboundChangesets','Sheet-shaped\x20snapshot\x20is\x20missing\x20workbook\x20metadata','Failed\x20to\x20fetch\x20preceding\x20changesets','snapshotFrom','transformService','Backend\x20changesets\x20must\x20be\x20an\x20array','disposeUnit','JOIN','formula.mutation.set-trigger-formula-calculation-stop','from','parse','getPendingMutations','ws:','finally','max','doc','fromEntries','replace','return\x20(async\x20()\x20=>\x20{\x20','baseRev','OPEN','board','maxCodeLength\x20must\x20be\x20a\x20positive\x20safe\x20integer','send','UNIVER_SLIDE','accepted','_suppressionDepth','index','trim','_handleCollaborationEvent','_inbound','nothing-to-commit','data','httpRequest','COLLABORATION_PROTOCOL_ERROR','find','changeset_should_retry','interceptor','Awaiting\x20changeset\x20echo\x20does\x20not\x20match\x20the\x20transformed\x20local\x20mutations','Checkpoint\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer','formula.mutation.set-formula-data','status','onlyLocal','RECV','promise','Changeset\x20submission\x20was\x20denied','Snapshot\x20contains\x20duplicate\x20block\x20ids','getState','_bufferedChangesets','csRejEvent','_acceptingOperations','_capture','_consumeBufferedPrecedingChangesets','reqId','_univer','Backend\x20returned\x20no\x20Unit\x20snapshot','Replacement\x20mutations\x20must\x20be\x20an\x20array','slice','Collaboration\x20HELLO\x20response\x20is\x20invalid','Event','Manual\x20collaboration\x20plugin\x20did\x20not\x20reach\x20the\x20Starting\x20lifecycle','string','addEventListener','slide','sessionTicket','save','createBase','changeset_ack','eventID','retryable','Buffered\x20changeset\x20does\x20not\x20match\x20the\x20canonical\x20preceding\x20changeset','flatMap','COMPRESS_MUTATION_SEND','includes','Invalid\x20JSON\x20response','csAckEvent','COMPRESS_MUTATION_APPLY','stringify','m1Prime','rev','clear','delete','precedingChangesets','\x20cannot\x20capture\x20mutation\x20','_lease','format','target','incrementRevOfUnit','_reconnectTimer','changeset_rej','unit-data','\x20uses\x20an\x20unsupported\x20protocol','removeEventListener','commitTimeoutMs\x20must\x20be\x20a\x20positive\x20safe\x20integer'];_0x50e7=function(){return _0x1bccd9;};return _0x50e7();}function z(_0x3948b6){const _0x4215f5=_0x1e2a68;return{'baseRevision':_0x3948b6['baseRev'],'mutationCount':_0x3948b6[_0x4215f5(0x13e)][_0x4215f5(0x196)],'revision':_0x3948b6[_0x4215f5(0x18f)],..._0x3948b6[_0x4215f5(0x1e5)]===void 0x0?{}:{'sid':_0x3948b6['sid']},..._0x3948b6[_0x4215f5(0xca)]===void 0x0?{}:{'reqId':_0x3948b6[_0x4215f5(0xca)]}};}function B(_0x47531c,_0x3af901,_0x225e24,_0x5ec1ae,_0x4fe169,_0x43dac1=_0x1e2a68(0x1c5)){const _0x3ff6ee=_0x1e2a68;if(_0x4fe169['some'](_0x57f65b=>_0x57f65b[_0x3ff6ee(0x13e)][_0x3ff6ee(0x1bb)](_0x3c79a9=>_0x3c79a9['id']===_0x6cdd84['id'])))throw new j(_0x3ff6ee(0xb7),_0x3ff6ee(0x1f5));let _0x1e7c89=_0x5ec1ae;for(let _0x4b52c6 of _0x4fe169){let _0x24f6a8=_0x1e7c89+0x1;if(_0x4b52c6[_0x3ff6ee(0x1f9)]!==_0x3af901||_0x4b52c6[_0x3ff6ee(0x157)]!==_0x225e24||_0x4b52c6[_0x3ff6ee(0xa8)]!==_0x1e7c89||_0x4b52c6[_0x3ff6ee(0x18f)]!==_0x24f6a8)throw new j(_0x3ff6ee(0xb7),_0x3ff6ee(0x13d));let _0x5a1466=_0x19a1b2(_0x4b52c6),_0x3274bc=_0x47531c['compressMutationService'][_0x3ff6ee(0xba)][_0x3ff6ee(0x126)]()[_0x3ff6ee(0xe1)],_0x11d6f0=_0x47531c[_0x3ff6ee(0x105)]['interceptor'][_0x3ff6ee(0x16d)](_0x3274bc)(_0x5a1466['mutations'],null)??_0x5a1466[_0x3ff6ee(0x13e)],_0x47c1ae=_0x29f070(_0x11d6f0,_0x47531c[_0x3ff6ee(0x17d)],_0x43dac1===_0x3ff6ee(0x1c5)?{'fromChangeset':!0x0}:{'fromCollab':!0x0});if(!_0x47c1ae[_0x3ff6ee(0x15b)])throw new j('COLLABORATION_LOAD_FAILED',_0x3ff6ee(0x144)+_0x47c1ae[_0x3ff6ee(0xb0)]+':\x20'+String(_0x47c1ae['error']));let _0xcd20cb=_0x47531c[_0x3ff6ee(0x193)][_0x3ff6ee(0xec)](_0x3af901);if(_0xcd20cb!==_0x24f6a8)throw new j(_0x3ff6ee(0xb7),'Univer\x20revision\x20did\x20not\x20advance\x20to\x20the\x20confirmed\x20changeset\x20revision');_0x1e7c89=_0xcd20cb;}return _0x1e7c89;}function V(_0x9258f5,_0xad66ae,_0x1700e2){const _0x3aefb7=_0x1e2a68;let _0x3d2d21=_0x5219f4['newAPI'](_0x9258f5);switch(_0x1700e2){case _0x5d1892[_0x3aefb7(0x129)]:return H(_0x3d2d21[_0x3aefb7(0x1c4)](_0xad66ae)?.[_0x3aefb7(0xd6)](),_0xad66ae);case _0x5d1892['UNIVER_DOC']:return H(_0x3d2d21[_0x3aefb7(0x1b4)](_0xad66ae)?.[_0x3aefb7(0xd6)](),_0xad66ae);case _0x5d1892[_0x3aefb7(0xad)]:return H(_0x3d2d21[_0x3aefb7(0x12d)](_0xad66ae)?.[_0x3aefb7(0xd6)](),_0xad66ae);case _0x5d1892[_0x3aefb7(0x180)]:return H(_0x3d2d21['getBase'](_0xad66ae)?.[_0x3aefb7(0xd6)](),_0xad66ae);case _0x5d1892[_0x3aefb7(0x11f)]:return H(_0x3d2d21[_0x3aefb7(0x1d0)](_0xad66ae)?.[_0x3aefb7(0xd6)](),_0xad66ae);default:throw new j(_0x3aefb7(0x1d7),_0x3aefb7(0x130)+_0x1700e2);}}function H(_0x4bc976,_0x4787b2){const _0x1ae65f=_0x1e2a68;if(_0x4bc976===void 0x0)throw new j(_0x1ae65f(0x1a1),_0x1ae65f(0x117)+_0x4787b2+_0x1ae65f(0x186));return structuredClone(_0x4bc976);}var fe=class{[_0x1e2a68(0x1a5)];[_0x1e2a68(0x151)];[_0x1e2a68(0x131)];[_0x1e2a68(0xfa)];['_univer'];[_0x1e2a68(0xfb)];['_closePromise'];[_0x1e2a68(0xc7)]=!0x0;[_0x1e2a68(0x204)]=!0x1;[_0x1e2a68(0xc8)];[_0x1e2a68(0x10f)];[_0x1e2a68(0x90)]=new L();[_0x1e2a68(0xc5)]=[];[_0x1e2a68(0x198)];[_0x1e2a68(0x17c)]=null;[_0x1e2a68(0x191)]=null;[_0x1e2a68(0x1e3)]=crypto[_0x1e2a68(0x10c)]();[_0x1e2a68(0x199)]=0x1;constructor(_0x53ef12,_0x250e8b,_0x3c8232,_0x4ac193,_0x280ff3,_0xf1ad23,_0x520974){const _0x3358b6=_0x1e2a68;this[_0x3358b6(0x1a5)]=_0x53ef12,this[_0x3358b6(0x151)]=_0x250e8b,this[_0x3358b6(0x131)]=_0x3c8232,this[_0x3358b6(0xfa)]=_0x4ac193,this[_0x3358b6(0xcb)]=_0x280ff3,this[_0x3358b6(0xfb)]=_0xf1ad23,this[_0x3358b6(0x198)]=_0x3c8232,this[_0x3358b6(0xc8)]=new se(_0xf1ad23,_0x53ef12,_0x250e8b),this[_0x3358b6(0x10f)]=ue(_0x280ff3,_0x53ef12,_0x520974);}[_0x1e2a68(0xc4)](){const _0x435210=_0x1e2a68;return{'awaitingChangeset':this['_awaiting']===null?null:U(this['_awaiting']),'baseRevision':this['_baseRevision'],'bufferedChangesetCount':this[_0x435210(0xc5)][_0x435210(0x196)],'conflict':this[_0x435210(0x17c)],'connection':this[_0x435210(0x204)]?_0x435210(0x185):this[_0x435210(0xfa)]['getConnectionState'](),'knownHeadRevision':this[_0x435210(0x198)],'pendingMutationCount':this[_0x435210(0xc8)]['pending'][_0x435210(0x196)]};}[_0x1e2a68(0xa0)](){const _0x169557=_0x1e2a68;return structuredClone(this[_0x169557(0xc8)]['pending']);}[_0x1e2a68(0x10b)](){const _0x10493c=_0x1e2a68;return this[_0x10493c(0xf5)]()||this[_0x10493c(0x90)][_0x10493c(0x1e9)](async()=>(this[_0x10493c(0x1f4)](_0x10493c(0x10b)),await this['_fetchChangesets']()));}[_0x1e2a68(0x10a)](){return this['_rejectIfNotAccepting']()||this['_operations']['run'](async()=>{const _0x52a5ac=_0x2570;if(this['_assertMutableState'](_0x52a5ac(0x10a)),await this['_fetchChangesets'](),this[_0x52a5ac(0xc5)]['length']===0x0)return{'state':this[_0x52a5ac(0xc4)](),'status':_0x52a5ac(0x106)};let _0x429c9f=[...this[_0x52a5ac(0xc5)]];if(_0x429c9f[_0x52a5ac(0x1bb)](_0x5eb274=>_0x5eb274[_0x52a5ac(0x13e)]['some'](_0x5a506f=>_0x5a506f['id']===_0x6cdd84['id'])))throw new j(_0x52a5ac(0xb7),_0x52a5ac(0x156));let _0x47330f=this[_0x52a5ac(0x131)],_0x2769f4=this[_0x52a5ac(0x191)]?W(this[_0x52a5ac(0x191)]['mutations'],this['unitId'],this[_0x52a5ac(0x151)],this[_0x52a5ac(0x131)]):null,_0x40202e=_0x19a1b2({'baseRev':this['_baseRevision'],'memberID':'','mutations':[...this[_0x52a5ac(0xc8)][_0x52a5ac(0x91)]],'revision':0x0,'type':this['unitType'],'unitID':this[_0x52a5ac(0x1a5)],'userID':''})[_0x52a5ac(0x13e)],_0x2814fb=[];for(let _0x39865a of _0x429c9f){let _0x2216cd=_0x19a1b2(_0x39865a);if(this['_awaiting']!==null&&_0x39865a[_0x52a5ac(0x1e5)]===this['_awaiting'][_0x52a5ac(0x1e5)]&&_0x39865a[_0x52a5ac(0xca)]===this[_0x52a5ac(0x191)][_0x52a5ac(0xca)]){let _0x531fe4=(_0x2769f4??[])[_0x52a5ac(0x203)](_0x5ec22b);G(_0x39865a[_0x52a5ac(0x13e)],_0x531fe4)||await this[_0x52a5ac(0x17f)](new j(_0x52a5ac(0xb7),_0x52a5ac(0xbb))),_0x2814fb[_0x52a5ac(0x125)]({'changeset':_0x39865a,'kind':_0x52a5ac(0x1cd)}),_0x2769f4=null;continue;}let _0x2f5909=_0x2216cd[_0x52a5ac(0x13e)];if(_0x2769f4!==null){let _0xc4ed4=this[_0x52a5ac(0xfb)][_0x52a5ac(0x99)][_0x52a5ac(0x1ec)](_0x2f5909,_0x2769f4,!0x1);if(!_0x59e012(_0xc4ed4))return this[_0x52a5ac(0x17c)]={'message':_0xc4ed4['error'][_0x52a5ac(0x1c7)],'operation':_0x52a5ac(0x10a),'reason':_0x52a5ac(0x16a)},{'conflict':this['_conflict'],'state':this[_0x52a5ac(0xc4)](),'status':_0x52a5ac(0x17e)};_0x2f5909=_0xc4ed4[_0x52a5ac(0xe3)],_0x2769f4=_0xc4ed4[_0x52a5ac(0x1d5)];}let _0x3944ba=this['_kernel'][_0x52a5ac(0x99)][_0x52a5ac(0x1ec)](_0x2f5909,_0x40202e,!0x1);if(!_0x59e012(_0x3944ba))return this[_0x52a5ac(0x17c)]={'message':_0x3944ba[_0x52a5ac(0x149)][_0x52a5ac(0x1c7)],'operation':_0x52a5ac(0x10a),'reason':_0x52a5ac(0x16a)},{'conflict':this['_conflict'],'state':this[_0x52a5ac(0xc4)](),'status':_0x52a5ac(0x17e)};_0x2814fb[_0x52a5ac(0x125)]({'changeset':_0x113098({..._0x2216cd,'mutations':_0x3944ba[_0x52a5ac(0xe3)]}),'kind':'remote'}),_0x40202e=_0x3944ba[_0x52a5ac(0x1d5)];}let _0x27e49e=_0x47330f;for(let _0x21b865 of _0x2814fb){if(_0x21b865[_0x52a5ac(0x138)]===_0x52a5ac(0x1cd)){let _0xf8ebe5=this[_0x52a5ac(0xfb)]['revisionService'][_0x52a5ac(0xec)](this[_0x52a5ac(0x1a5)]);_0xf8ebe5!==_0x21b865[_0x52a5ac(0x13c)]['revision']&&await this[_0x52a5ac(0x17f)](new j(_0x52a5ac(0xb7),_0x52a5ac(0x18a))),_0x27e49e=_0xf8ebe5;continue;}_0x27e49e=await this['_replayRemoteChangesets'](_0x27e49e,[_0x21b865[_0x52a5ac(0x13c)]]);}return this[_0x52a5ac(0xc8)][_0x52a5ac(0xff)](_0x40202e['map'](_0x5ec22b)),this[_0x52a5ac(0x191)]!==null&&(this[_0x52a5ac(0x191)]=_0x2769f4===null?null:{...this['_awaiting'],'baseRev':_0x27e49e,'mutations':_0x2769f4[_0x52a5ac(0x203)](_0x5ec22b)}),this[_0x52a5ac(0x131)]=_0x27e49e,this[_0x52a5ac(0xc5)][_0x52a5ac(0x18b)](0x0),{'appliedChangesets':_0x429c9f[_0x52a5ac(0x203)](z),'fromRevision':_0x47330f,'state':this[_0x52a5ac(0xc4)](),'status':'pulled','toRevision':_0x27e49e,'transformedPendingMutationCount':_0x40202e[_0x52a5ac(0x196)]};});}['commit'](){const _0x13b47c=_0x1e2a68;return this[_0x13b47c(0xf5)]()||this[_0x13b47c(0x90)]['run'](async()=>{const _0x285e2e=_0x13b47c;this['_assertMutableState'](_0x285e2e(0x1fd));let _0x46b1fe=[],_0x1daa28=[];if(this[_0x285e2e(0x191)]===null){if(this[_0x285e2e(0xc8)][_0x285e2e(0x91)][_0x285e2e(0x196)]===0x0)return{'state':this['getState'](),'status':_0x285e2e(0xb4)};if(await this[_0x285e2e(0x163)](),this['_bufferedChangesets'][_0x285e2e(0x196)]>0x0)return{'baseRevision':this[_0x285e2e(0x131)],'confirmedChangesets':_0x46b1fe,'knownHeadRevision':this[_0x285e2e(0x198)],'state':this[_0x285e2e(0xc4)](),'status':'pull-required'};this['_createAwaitingFromPending']();}for(;this[_0x285e2e(0x191)]!==null;){let _0x57c955=this['_awaiting'],_0x190c8d;try{_0x190c8d=await this[_0x285e2e(0xfa)][_0x285e2e(0x1d1)](_0x57c955);}catch{return{'changeset':U(_0x57c955),'confirmedChangesets':_0x46b1fe,'state':this[_0x285e2e(0xc4)](),'status':_0x285e2e(0x1f8)};}if(_0x190c8d[_0x285e2e(0xbe)]==='retry'||_0x190c8d[_0x285e2e(0xbe)]==='unknown')return{'changeset':U(_0x57c955),'confirmedChangesets':_0x46b1fe,'state':this['getState'](),'status':_0x190c8d[_0x285e2e(0xbe)]};if(_0x190c8d['status']===_0x285e2e(0x1c2))return _0x190c8d['reason']==='invalid-revision'?(this[_0x285e2e(0xc8)][_0x285e2e(0x16b)](_0x57c955[_0x285e2e(0x13e)]),this['_awaiting']=null,await this[_0x285e2e(0x163)](),{'baseRevision':this[_0x285e2e(0x131)],'confirmedChangesets':_0x46b1fe,'knownHeadRevision':this[_0x285e2e(0x198)],'state':this[_0x285e2e(0xc4)](),'status':'pull-required'}):(this[_0x285e2e(0x17c)]={'message':_0x190c8d['message'],'operation':_0x285e2e(0x1fd),'reason':_0x190c8d[_0x285e2e(0x1a8)]===_0x285e2e(0x200)?'permission-rejected':_0x285e2e(0x19b)},{'conflict':this['_conflict'],'confirmedChangesets':_0x46b1fe,'state':this[_0x285e2e(0xc4)](),'status':'conflict'});let _0x5b58be=_0x190c8d[_0x285e2e(0x1b3)];try{this['_validateAcceptedChangeset'](_0x57c955,_0x190c8d[_0x285e2e(0xe7)],_0x5b58be);}catch(_0x5b95dc){await this['_closeAfterFatalError'](_0x5b95dc);}let _0x1a07d4=_0x57c955['mutations'];if(_0x190c8d['precedingChangesets'][_0x285e2e(0x196)]>0x0){let _0x44ea84=await this['_reconcilePrecedingChangesets'](_0x57c955,_0x190c8d['precedingChangesets']);if(_0x44ea84===null)return{'conflict':this['_conflict'],'confirmedChangesets':_0x46b1fe,'state':this[_0x285e2e(0xc4)](),'status':_0x285e2e(0x17e)};_0x1a07d4=_0x44ea84['awaitingMutations'];try{this['_consumeBufferedPrecedingChangesets'](_0x190c8d['precedingChangesets']);}catch(_0x5ee8b0){await this[_0x285e2e(0x17f)](_0x5ee8b0);}_0x1daa28[_0x285e2e(0x125)](..._0x190c8d[_0x285e2e(0xe7)][_0x285e2e(0x203)](z));}G(_0x5b58be[_0x285e2e(0x13e)],_0x1a07d4)||await this[_0x285e2e(0x17f)](new j(_0x285e2e(0xb7),_0x285e2e(0x182)));let _0x2642ee=this[_0x285e2e(0xfb)][_0x285e2e(0x193)][_0x285e2e(0xec)](this['unitId']);if(_0x2642ee!==_0x5b58be['revision']&&await this['_closeAfterFatalError'](new j(_0x285e2e(0xb7),_0x285e2e(0x14d))),this[_0x285e2e(0x131)]=_0x2642ee,this[_0x285e2e(0x198)]=Math[_0x285e2e(0xa3)](this[_0x285e2e(0x198)],_0x2642ee),this['_awaiting']=null,_0x46b1fe[_0x285e2e(0x125)](z(_0x5b58be)),this[_0x285e2e(0xc8)][_0x285e2e(0x91)][_0x285e2e(0x196)]===0x0)break;this[_0x285e2e(0x1e0)]();}return{'confirmedChangesets':_0x46b1fe,'reconciledChangesets':_0x1daa28,'state':this['getState'](),'status':_0x285e2e(0x195)};});}async[_0x1e2a68(0x163)](){const _0x1bb3f7=_0x1e2a68;let _0x541b41=this[_0x1bb3f7(0x198)],_0x8859de=await this[_0x1bb3f7(0xfa)][_0x1bb3f7(0x1bc)](_0x541b41,void 0x0);if(_0x28dcbf(_0x8859de[_0x1bb3f7(0x149)])){let _0x5b942b=_0x8859de[_0x1bb3f7(0x149)];throw new j(_0x1bb3f7(0x15e),_0x5b942b?.[_0x1bb3f7(0x1c7)]||_0x1bb3f7(0x1e4),{'retryable':!0x0});}let _0x2de486=R(_0x8859de[_0x1bb3f7(0x123)],this['unitId'],this[_0x1bb3f7(0x151)],_0x541b41),_0x2713ec=_0x2de486['at'](-0x1)?.[_0x1bb3f7(0x18f)]??_0x541b41;if(_0x8859de[_0x1bb3f7(0x1b9)]!==void 0x0&&_0x8859de[_0x1bb3f7(0x1b9)]!==_0x2713ec)throw new j(_0x1bb3f7(0xb7),'Backend\x20latest\x20revision\x20does\x20not\x20match\x20its\x20continuous\x20changeset\x20range');return _0x2de486['length']===0x0?{'knownHeadRevision':this['_knownHeadRevision'],'state':this['getState'](),'status':_0x1bb3f7(0x175)}:(this[_0x1bb3f7(0xc5)][_0x1bb3f7(0x125)](..._0x2de486),this[_0x1bb3f7(0x198)]=_0x2713ec,{'changesets':_0x2de486[_0x1bb3f7(0x203)](z),'fromRevision':_0x541b41,'state':this[_0x1bb3f7(0xc4)](),'status':_0x1bb3f7(0x146),'toRevision':_0x2713ec});}[_0x1e2a68(0x1e0)](){const _0x53bd2b=_0x1e2a68;let _0x5eac08=this[_0x53bd2b(0xc8)][_0x53bd2b(0x115)]();this['_awaiting']={'baseRev':this[_0x53bd2b(0x131)],'mutations':_0x5eac08,'reqId':this[_0x53bd2b(0x199)],'sid':this['_sid']},this[_0x53bd2b(0x199)]+=0x1;}['_validateAcceptedChangeset'](_0x948e3d,_0x3c15f9,_0x44db41){const _0x4489f2=_0x1e2a68;let _0x20ade6=R(_0x3c15f9,this['unitId'],this[_0x4489f2(0x151)],this[_0x4489f2(0x131)])['at'](-0x1)?.[_0x4489f2(0x18f)]??this['_baseRevision'];if(_0x44db41['unitID']!==this[_0x4489f2(0x1a5)]||_0x44db41[_0x4489f2(0x157)]!==this[_0x4489f2(0x151)]||_0x44db41[_0x4489f2(0x1e5)]!==_0x948e3d[_0x4489f2(0x1e5)]||_0x44db41[_0x4489f2(0xca)]!==_0x948e3d[_0x4489f2(0xca)]||_0x44db41[_0x4489f2(0xa8)]!==_0x20ade6||_0x44db41[_0x4489f2(0x18f)]!==_0x20ade6+0x1)throw new j(_0x4489f2(0xb7),_0x4489f2(0x1ed));}async[_0x1e2a68(0x16e)](_0x1a1a24,_0x259185){const _0x27ccf2=_0x1e2a68;let _0x2852a4=W(_0x1a1a24[_0x27ccf2(0x13e)],this['unitId'],this['unitType'],this[_0x27ccf2(0x131)]),_0x4b1405=W(this[_0x27ccf2(0xc8)]['pending'],this[_0x27ccf2(0x1a5)],this['unitType'],this[_0x27ccf2(0x131)]),_0x86dffe=[];for(let _0x3c1dec of _0x259185){let _0x1311cf=_0x19a1b2(_0x3c1dec),_0xb04294=this[_0x27ccf2(0xfb)][_0x27ccf2(0x99)]['transformMutations'](_0x1311cf[_0x27ccf2(0x13e)],_0x2852a4,!0x1);if(!_0x59e012(_0xb04294))return this[_0x27ccf2(0x11a)](_0x27ccf2(0x1fd),_0xb04294[_0x27ccf2(0x149)]),null;_0x2852a4=_0xb04294[_0x27ccf2(0x1d5)];let _0x6762a0=this[_0x27ccf2(0xfb)]['transformService'][_0x27ccf2(0x1ec)](_0xb04294[_0x27ccf2(0xe3)],_0x4b1405,!0x1);if(!_0x59e012(_0x6762a0))return this[_0x27ccf2(0x11a)](_0x27ccf2(0x1fd),_0x6762a0[_0x27ccf2(0x149)]),null;_0x4b1405=_0x6762a0['m2Prime'],_0x86dffe[_0x27ccf2(0x125)](_0x113098({..._0x1311cf,'mutations':_0x6762a0['m1Prime']}));}let _0x5d5952=await this[_0x27ccf2(0x1ef)](this['_baseRevision'],_0x86dffe);return this[_0x27ccf2(0xc8)]['replacePending'](_0x4b1405[_0x27ccf2(0x203)](_0x5ec22b)),this[_0x27ccf2(0x131)]=_0x5d5952,{'awaitingMutations':_0x2852a4[_0x27ccf2(0x203)](_0x5ec22b),'revision':_0x5d5952};}[_0x1e2a68(0x11a)](_0x25389f,_0x3e89f6){const _0x128f52=_0x1e2a68;this['_conflict']={'message':_0x3e89f6['message'],'operation':_0x25389f,'reason':_0x128f52(0x16a)};}async[_0x1e2a68(0x1ef)](_0x30e0c8,_0x403d53){const _0x462c42=_0x1e2a68;try{return await this[_0x462c42(0xc8)][_0x462c42(0x1fa)](async()=>B(this['_kernel'],this[_0x462c42(0x1a5)],this['unitType'],_0x30e0c8,_0x403d53,_0x462c42(0x188)));}catch(_0x3d0733){return await this[_0x462c42(0x17f)](_0x3d0733);}}async[_0x1e2a68(0x17f)](_0xda830a){const _0x2738b5=_0x1e2a68;this[_0x2738b5(0xc7)]=!0x1,this[_0x2738b5(0x179)]??=this[_0x2738b5(0x166)]();try{await this['_closePromise'];}catch{}throw _0xda830a;}[_0x1e2a68(0xc9)](_0x280454){const _0x1b4c37=_0x1e2a68;let _0xff0f9d=_0x280454['at'](-0x1)?.[_0x1b4c37(0x18f)];if(_0xff0f9d===void 0x0||this[_0x1b4c37(0xc5)]['length']===0x0)return;let _0x23dd53=this[_0x1b4c37(0xc5)][_0x1b4c37(0x176)](({revision:_0x2c2d66})=>_0x2c2d66>_0xff0f9d),_0x32895e=this[_0x1b4c37(0xc5)][_0x1b4c37(0xce)](0x0,_0x23dd53===-0x1?this[_0x1b4c37(0xc5)][_0x1b4c37(0x196)]:_0x23dd53);for(let _0x4f8cff of _0x32895e){let _0x29584a=_0x280454[_0x1b4c37(0xb8)](({revision:_0x17065c})=>_0x17065c===_0x4f8cff[_0x1b4c37(0x18f)]);if(!_0x29584a||!pe(_0x4f8cff,_0x29584a))throw new j('COLLABORATION_PROTOCOL_ERROR',_0x1b4c37(0xdb));}this[_0x1b4c37(0xc5)][_0x1b4c37(0x18b)](0x0,_0x32895e['length']);}[_0x1e2a68(0x192)](_0x451a82){const _0x3522b9=_0x1e2a68;return this[_0x3522b9(0xf5)]()||this[_0x3522b9(0x90)]['run'](async()=>{const _0x4f9c16=_0x3522b9;_0x451a82[_0x4f9c16(0x205)]==='write'&&this[_0x4f9c16(0x1f4)](_0x4f9c16(0x1ab));let _0xd9d028=this[_0x4f9c16(0xc8)][_0x4f9c16(0x91)][_0x4f9c16(0x196)],_0x39c1b3=P(await this[_0x4f9c16(0x10f)][_0x4f9c16(0x192)](_0x451a82[_0x4f9c16(0x1fb)],_0x451a82['mode']));return _0x451a82['mode']==='read'?{'state':this[_0x4f9c16(0xc4)](),'value':_0x39c1b3}:{'mutations':this[_0x4f9c16(0xc8)]['snapshotFrom'](_0xd9d028),'state':this[_0x4f9c16(0xc4)](),'value':_0x39c1b3};});}['replacePendingMutations'](_0x51c33d){const _0x23bc2a=_0x1e2a68;return this[_0x23bc2a(0xf5)]()||this[_0x23bc2a(0x90)]['run'](async()=>{const _0x1a8854=_0x23bc2a;if(this[_0x1a8854(0x1f4)](_0x1a8854(0x17b)),this['_awaiting']!==null)throw new j('COLLABORATION_INVALID_INPUT',_0x1a8854(0x1a6));let _0x50d7e4=me(_0x51c33d),_0x3d71f4=[...this[_0x1a8854(0xc8)]['pending']];this[_0x1a8854(0xc8)][_0x1a8854(0xff)](_0x50d7e4);let _0x38c370=this['getState']();return{'pendingMutationCount':_0x50d7e4['length'],'previousMutationCount':_0x3d71f4[_0x1a8854(0x196)],'state':_0x38c370};});}[_0x1e2a68(0x1d9)](){const _0xbbbf5e=_0x1e2a68;return this[_0xbbbf5e(0xf5)]()||this[_0xbbbf5e(0x90)][_0xbbbf5e(0x1e9)](async()=>V(this[_0xbbbf5e(0xcb)],this[_0xbbbf5e(0x1a5)],this[_0xbbbf5e(0x151)]));}[_0x1e2a68(0x14f)](){const _0x5cb5b0=_0x1e2a68;return this['_closePromise']?this['_closePromise']:(this[_0x5cb5b0(0xc7)]=!0x1,this[_0x5cb5b0(0x179)]=this[_0x5cb5b0(0x90)]['run'](async()=>await this[_0x5cb5b0(0x166)]()),this[_0x5cb5b0(0x179)]);}async[_0x1e2a68(0x166)](){const _0xa95d1e=_0x1e2a68;try{this[_0xa95d1e(0xc8)][_0xa95d1e(0x19d)](),await this[_0xa95d1e(0xfa)][_0xa95d1e(0x14f)]();}finally{try{this['_univer'][_0xa95d1e(0x19d)]();}finally{this[_0xa95d1e(0x204)]=!0x0;}}}['_rejectIfNotAccepting'](){const _0x2575cc=_0x1e2a68;return this[_0x2575cc(0xc7)]?null:Promise[_0x2575cc(0x1ff)](new j(_0x2575cc(0x13b),'Collaboration\x20runtime\x20is\x20closing\x20or\x20closed'));}[_0x1e2a68(0x1f4)](_0x2b24ec){const _0x10a361=_0x1e2a68;if(this[_0x10a361(0x17c)]!==null)throw new j(_0x10a361(0x1d7),_0x10a361(0x181)+_0x2b24ec+_0x10a361(0x1ce));}};function U(_0x516019){const _0x297bc6=_0x1e2a68;return{'baseRevision':_0x516019[_0x297bc6(0xa8)],'mutationCount':_0x516019[_0x297bc6(0x13e)]['length'],'reqId':_0x516019[_0x297bc6(0xca)],'revision':0x0,'sid':_0x516019[_0x297bc6(0x1e5)]};}function W(_0x3f83ff,_0x19bf8d,_0x399de0,_0x4fe2ed){const _0x3925e5=_0x1e2a68;return _0x19a1b2({'baseRev':_0x4fe2ed,'memberID':'','mutations':[..._0x3f83ff],'revision':0x0,'type':_0x399de0,'unitID':_0x19bf8d,'userID':''})[_0x3925e5(0x13e)];}function _0x2570(_0x3ec001,_0x1870bb){_0x3ec001=_0x3ec001-0x90;const _0x50e7d5=_0x50e7();let _0x2570df=_0x50e7d5[_0x3ec001];return _0x2570df;}function pe(_0x3bc62b,_0x194f48){const _0x287d73=_0x1e2a68;return _0x3bc62b[_0x287d73(0x1f9)]===_0x194f48[_0x287d73(0x1f9)]&&_0x3bc62b[_0x287d73(0x157)]===_0x194f48['type']&&_0x3bc62b['baseRev']===_0x194f48[_0x287d73(0xa8)]&&_0x3bc62b[_0x287d73(0x18f)]===_0x194f48[_0x287d73(0x18f)]&&_0x3bc62b[_0x287d73(0x1e5)]===_0x194f48[_0x287d73(0x1e5)]&&_0x3bc62b['reqId']===_0x194f48[_0x287d73(0xca)]&&JSON['stringify'](_0x3bc62b[_0x287d73(0x13e)])===JSON[_0x287d73(0xe2)](_0x194f48['mutations']);}function G(_0x5706ce,_0x31fa17){const _0x2fea9b=_0x1e2a68;return _0x5706ce['length']===_0x31fa17[_0x2fea9b(0x196)]&&_0x5706ce[_0x2fea9b(0x17a)]((_0x3d7e57,_0x3f9ce5)=>_0x3d7e57['id']===_0x31fa17[_0x3f9ce5]?.['id']&&_0x3d7e57[_0x2fea9b(0xb5)]===_0x31fa17[_0x3f9ce5]?.[_0x2fea9b(0xb5)]);}function me(_0x4c4d60){const _0x56218c=_0x1e2a68;if(!Array[_0x56218c(0x1c1)](_0x4c4d60))throw new j(_0x56218c(0x1d7),_0x56218c(0xcd));return _0x4c4d60[_0x56218c(0x203)](_0x15ba52=>{const _0x3050fe=_0x56218c;if(!_0x15ba52||typeof _0x15ba52!=_0x3050fe(0x127)||typeof _0x15ba52['id']!='string'||_0x15ba52['id'][_0x3050fe(0x196)]===0x0||typeof _0x15ba52[_0x3050fe(0xb5)]!='string')throw new j(_0x3050fe(0x1d7),_0x3050fe(0x134));return{'data':_0x15ba52[_0x3050fe(0xb5)],'id':_0x15ba52['id']};});}var K=class extends _0x19ba24{[_0x1e2a68(0x14c)];[_0x1e2a68(0x1e1)];static [_0x1e2a68(0x162)]=_0x1e2a68(0x12a);constructor(_0x16831e,_0xd6c6c8){const _0x365f6b=_0x1e2a68;super(),this[_0x365f6b(0x14c)]=_0x16831e,this['_injector']=_0xd6c6c8;}['onStarting'](){const _0x87e5a7=_0x1e2a68;this[_0x87e5a7(0x14c)][_0x87e5a7(0x1aa)]!==void 0x0&&_0x3873df(this[_0x87e5a7(0x1e1)],[[_0x4b1d7f,{'useValue':this[_0x87e5a7(0x14c)][_0x87e5a7(0x1aa)]}]]),this[_0x87e5a7(0x14c)]['onStarting']({'commandService':this[_0x87e5a7(0x1e1)]['get'](_0x5f3a62),'compressMutationService':this[_0x87e5a7(0x1e1)][_0x87e5a7(0x1e2)](_0x3e3c0a),'instanceService':this[_0x87e5a7(0x1e1)][_0x87e5a7(0x1e2)](_0x2d1751),'injector':this[_0x87e5a7(0x1e1)],'revisionService':this[_0x87e5a7(0x1e1)][_0x87e5a7(0x1e2)](_0x1bba2e),'transformService':this[_0x87e5a7(0x1e1)][_0x87e5a7(0x1e2)](_0x1c0b45)});}};K=_0x36215e([_0x3058b1(_0x5b0ef0),_0x37dfda(0x1,_0x19fa35(_0x1f6005))],K);function he(_0x5389ae,_0x3c648c){const _0xa98b41=_0x1e2a68;let _0x27c923;if(_0x5389ae[_0xa98b41(0x1e7)](K,{'onStarting'(_0x2a3f04){_0x27c923=_0x2a3f04;},..._0x3c648c===void 0x0?{}:{'snapshotServerService':_0x3c648c}}),!_0x27c923)throw Error(_0xa98b41(0xd1));return _0x27c923;}async function ge(_0x57a919,_0x458a22,_0x1d467f){const _0x2ca909=_0x1e2a68;let _0x290810=await _0x57a919['getUnitOnRev'](0x0);if(_0x28dcbf(_0x290810[_0x2ca909(0x149)])){let _0xd74002=_0x290810['error'];throw new j('COLLABORATION_LOAD_FAILED',_0xd74002?.[_0x2ca909(0x1c7)]||'Backend\x20failed\x20to\x20load\x20the\x20Unit\x20snapshot');}let _0x5c3c61=_0x290810[_0x2ca909(0x16f)];if(!_0x5c3c61)throw new j(_0x2ca909(0x1a1),_0x2ca909(0xcc));_e(_0x5c3c61,_0x458a22,_0x1d467f);try{switch(_0x1d467f){case _0x5d1892[_0x2ca909(0x129)]:return{'changesets':_0x290810['changesets'],'unitData':await _0x1da1f9(_0x5c3c61,await q(_0x57a919,_0x5c3c61)),'unitType':_0x1d467f};case _0x5d1892[_0x2ca909(0x1cf)]:return{'changesets':_0x290810['changesets'],'unitData':_0x1ff8fd(_0x5c3c61),'unitType':_0x1d467f};case _0x5d1892['UNIVER_SLIDE']:return{'changesets':_0x290810[_0x2ca909(0x123)],'unitData':_0x109a9d(_0x5c3c61),'unitType':_0x1d467f};case _0x5d1892[_0x2ca909(0x180)]:return{'changesets':_0x290810['changesets'],'unitData':await _0x4a2d99(_0x5c3c61,await q(_0x57a919,_0x5c3c61)),'unitType':_0x1d467f};case _0x5d1892[_0x2ca909(0x11f)]:return{'changesets':_0x290810[_0x2ca909(0x123)],'unitData':_0x48cfeb(_0x5c3c61),'unitType':_0x1d467f};default:throw new j(_0x2ca909(0x1d7),'Unsupported\x20collaboration\x20Unit\x20type:\x20'+_0x1d467f);}}catch(_0x490acd){throw _0x490acd instanceof j?_0x490acd:new j('COLLABORATION_LOAD_FAILED','Failed\x20to\x20transform\x20the\x20Unit\x20snapshot',{'cause':_0x490acd});}}function _e(_0x3b0dfa,_0x5abddc,_0x3906d8){const _0x4e2306=_0x1e2a68;if(_0x3b0dfa['unitID']!==_0x5abddc||_0x3b0dfa[_0x4e2306(0x157)]!==_0x3906d8)throw new j('COLLABORATION_LOAD_FAILED',_0x4e2306(0xf4));if(!Number[_0x4e2306(0x14e)](_0x3b0dfa['rev'])||_0x3b0dfa['rev']<0x1)throw new j(_0x4e2306(0x1a1),'Snapshot\x20revision\x20must\x20be\x20a\x20positive\x20safe\x20integer');}async function q(_0x1d8409,_0x32f39e){const _0xdbdf19=_0x1e2a68;let _0x12268e=_0x32f39e[_0xdbdf19(0x1b2)];if(!_0x12268e)throw new j(_0xdbdf19(0x1a1),_0xdbdf19(0x96));let _0x2f43bf=Object[_0xdbdf19(0x20a)](_0x12268e[_0xdbdf19(0x11d)])[_0xdbdf19(0xdc)](({blocks:_0x2803c5})=>_0x2803c5);if(new Set(_0x2f43bf)[_0xdbdf19(0x1a2)]!==_0x2f43bf[_0xdbdf19(0x196)])throw new j(_0xdbdf19(0x1a1),_0xdbdf19(0xc3));return await Promise[_0xdbdf19(0x189)](_0x2f43bf['map'](async _0x257959=>{const _0x24c888=_0xdbdf19;let _0x25ba25=await _0x1d8409[_0x24c888(0x167)](_0x257959);if(_0x28dcbf(_0x25ba25['error'])||!_0x25ba25['block'])throw new j(_0x24c888(0x1a1),_0x25ba25[_0x24c888(0x149)]?.[_0x24c888(0x1c7)]||_0x24c888(0x1b6)+_0x257959+'\x20is\x20unavailable');if(_0x25ba25[_0x24c888(0x1ad)]['id']!==_0x257959)throw new j(_0x24c888(0x1a1),_0x24c888(0x1b6)+_0x257959+'\x20returned\x20a\x20different\x20block\x20identity');return _0x25ba25[_0x24c888(0x1ad)];}));}function ve(_0x550c2d){const _0x24db9b=_0x1e2a68;let _0x554495=_0x550c2d['maxCodeLength']??0xa00000;if(!Number[_0x24db9b(0x14e)](_0x554495)||_0x554495<=0x0)throw new j(_0x24db9b(0x1d7),_0x24db9b(0xab));return{async 'load'(_0x18b1a9,_0x41be10){const _0x247401=_0x24db9b;be(_0x18b1a9,_0x41be10);let _0x5c15c1,_0x724dcb={'unitId':_0x18b1a9,'unitType':_0x41be10},_0x4923f6={'unitId':_0x18b1a9,'unitType':_0x41be10,..._0x550c2d[_0x247401(0x1aa)]===void 0x0?{}:{'resolveSnapshotService':()=>{if(_0x5c15c1===void 0x0)throw new j('COLLABORATION_LOAD_FAILED','SnapshotService\x20is\x20not\x20ready\x20until\x20the\x20Univer\x20factory\x20has\x20returned');return _0x5c15c1;}}},_0x116415;try{_0x116415=await _0x550c2d[_0x247401(0x19e)][_0x247401(0x194)](_0x724dcb);}catch(_0x1ac127){throw new j('COLLABORATION_UNAVAILABLE',_0x247401(0xfd),{'cause':_0x1ac127,'retryable':!0x0});}let _0x3c101d;try{_0x3c101d=await _0x550c2d[_0x247401(0xf7)](_0x4923f6);let _0x26097c=he(_0x3c101d,_0x550c2d[_0x247401(0x1aa)]);_0x550c2d[_0x247401(0x1aa)]!==void 0x0&&(_0x5c15c1=_0x26097c[_0x247401(0x104)][_0x247401(0x1e2)](_0xcf35b9));let _0x448a51=await xe(_0x116415,_0x18b1a9,_0x41be10);Se(_0x448a51,_0x724dcb),Ce(_0x3c101d,_0x448a51);let _0x1858d2=B(_0x26097c,_0x18b1a9,_0x41be10,J(_0x448a51[_0x247401(0x1d2)]),_0x448a51[_0x247401(0x123)]),_0x4a7089=await _0x116415['fetchChangesets'](_0x1858d2,void 0x0);if(_0x28dcbf(_0x4a7089[_0x247401(0x149)])){let _0xf5be8c=_0x4a7089[_0x247401(0x149)];throw new j(_0x247401(0x15e),_0xf5be8c?.[_0x247401(0x1c7)]||_0x247401(0x14b),{'retryable':!0x0});}let _0x1d3cde=R(_0x4a7089[_0x247401(0x123)],_0x18b1a9,_0x41be10,_0x1858d2),_0x3b4258=_0x1d3cde['at'](-0x1)?.[_0x247401(0x18f)]??_0x1858d2;if(_0x4a7089[_0x247401(0x1b9)]!==void 0x0&&_0x4a7089[_0x247401(0x1b9)]!==_0x3b4258)throw new j(_0x247401(0xb7),_0x247401(0x1db));return _0x1858d2=B(_0x26097c,_0x18b1a9,_0x41be10,_0x1858d2,_0x1d3cde),await ye(_0x26097c),new fe(_0x18b1a9,_0x41be10,_0x1858d2,_0x116415,_0x3c101d,_0x26097c,_0x554495);}catch(_0x875c61){try{await _0x116415['close']();}catch{}try{_0x3c101d?.['dispose']();}catch{}throw _0x875c61 instanceof j?_0x875c61:new j(_0x247401(0x1a1),_0x247401(0x15d),{'cause':_0x875c61});}}};}async function ye(_0x13f85f){const _0x16da71=_0x1e2a68;_0x13f85f[_0x16da71(0x104)][_0x16da71(0x1e8)](_0x18c71a)&&await _0x13f85f[_0x16da71(0x104)]['get'](_0x18c71a)[_0x16da71(0x1ba)]();}function be(_0x288625,_0x583131){const _0x451fdc=_0x1e2a68;if(_0x288625[_0x451fdc(0xb1)]()[_0x451fdc(0x196)]===0x0)throw new j('COLLABORATION_INVALID_INPUT',_0x451fdc(0x128));if(_0x583131!==_0x5d1892[_0x451fdc(0x129)]&&_0x583131!==_0x5d1892['UNIVER_DOC']&&_0x583131!==_0x5d1892[_0x451fdc(0xad)]&&_0x583131!==_0x5d1892[_0x451fdc(0x180)]&&_0x583131!==_0x5d1892['UNIVER_BOARD'])throw new j(_0x451fdc(0x1d7),_0x451fdc(0x130)+_0x583131);}async function xe(_0x369b3d,_0x3ef707,_0x367017){const _0xf7f0c8=_0x1e2a68;return _0x369b3d[_0xf7f0c8(0xea)]===_0xf7f0c8(0xef)?await _0x369b3d[_0xf7f0c8(0x15a)]():await ge(_0x369b3d,_0x3ef707,_0x367017);}function Se(_0x2021b7,_0x3169e4){const _0x360a40=_0x1e2a68;if(_0x2021b7[_0x360a40(0x151)]!==_0x3169e4[_0x360a40(0x151)])throw new j('COLLABORATION_LOAD_FAILED',_0x360a40(0x1a9));if(_0x2021b7[_0x360a40(0x1d2)]['id']!==_0x3169e4[_0x360a40(0x1a5)])throw new j(_0x360a40(0x1a1),_0x360a40(0x143));J(_0x2021b7['unitData']);}function J(_0x521128){const _0x574603=_0x1e2a68;let _0x505a61=_0x521128['rev'];if(!Number['isSafeInteger'](_0x505a61)||_0x505a61===void 0x0||_0x505a61<0x1)throw new j(_0x574603(0x1a1),_0x574603(0xbc));return _0x505a61;}function Ce(_0xafa108,_0x22ee56){const _0x2f9db6=_0x1e2a68;switch(_0x22ee56[_0x2f9db6(0x151)]){case _0x5d1892[_0x2f9db6(0x129)]:_0xafa108[_0x2f9db6(0x155)](_0x22ee56[_0x2f9db6(0x151)],structuredClone(_0x22ee56[_0x2f9db6(0x1d2)]));return;case _0x5d1892['UNIVER_DOC']:_0xafa108[_0x2f9db6(0x155)](_0x22ee56[_0x2f9db6(0x151)],structuredClone(_0x22ee56['unitData']));return;case _0x5d1892[_0x2f9db6(0xad)]:_0xafa108[_0x2f9db6(0x155)](_0x22ee56[_0x2f9db6(0x151)],structuredClone(_0x22ee56[_0x2f9db6(0x1d2)]));return;case _0x5d1892[_0x2f9db6(0x180)]:_0xafa108[_0x2f9db6(0x155)](_0x22ee56[_0x2f9db6(0x151)],structuredClone(_0x22ee56['unitData']));return;case _0x5d1892[_0x2f9db6(0x11f)]:_0xafa108['createUnit'](_0x22ee56[_0x2f9db6(0x151)],structuredClone(_0x22ee56[_0x2f9db6(0x1d2)]));return;}}var we=class{[_0x1e2a68(0x14c)];[_0x1e2a68(0x169)];[_0x1e2a68(0xe9)];[_0x1e2a68(0xea)]=_0x1e2a68(0x16f);constructor(_0x266d34,_0x3dd16d,_0x151247){const _0x201d96=_0x1e2a68;this['_config']=_0x266d34,this[_0x201d96(0x169)]=_0x3dd16d,this['_lease']=_0x151247;}[_0x1e2a68(0x137)](){const _0x28abb4=_0x1e2a68;return this[_0x28abb4(0xe9)]['getConnectionState']();}async[_0x1e2a68(0x1f1)](_0x267563=0x0){const _0x11d77e=_0x1e2a68;let _0x764c6e=X(this[_0x11d77e(0x14c)][_0x11d77e(0x1b5)],this['_target']['unitType'],_0x11d77e(0x1b0),this[_0x11d77e(0x169)]['unitId'],_0x11d77e(0xe4),_0x267563),_0x9a69f5=await Y(this[_0x11d77e(0x14c)],_0x764c6e);return Te(_0x9a69f5['snapshot']),_0x9a69f5;}async[_0x1e2a68(0x167)](_0xecc693){const _0x3681a3=_0x1e2a68;let _0x4729cc=X(this[_0x3681a3(0x14c)][_0x3681a3(0x1b5)],this[_0x3681a3(0x169)][_0x3681a3(0x151)],'unit',this['_target'][_0x3681a3(0x1a5)],_0x3681a3(0x1ad),_0xecc693),_0x1657de=await Y(this[_0x3681a3(0x14c)],_0x4729cc);return _0x1657de[_0x3681a3(0x1ad)]&&typeof _0x1657de['block'][_0x3681a3(0xb5)]==_0x3681a3(0xd2)&&(_0x1657de[_0x3681a3(0x1ad)]['data']=Z(_0x1657de[_0x3681a3(0x1ad)][_0x3681a3(0xb5)])),_0x1657de;}async[_0x1e2a68(0x1bc)](_0x2cf4bd,_0x3ea70a=0x0){const _0x518955=_0x1e2a68;let _0x33384f=X(this['_config'][_0x518955(0x1b5)],this[_0x518955(0x169)][_0x518955(0x151)],'unit',this[_0x518955(0x169)]['unitId'],'fetchmissing');_0x33384f['searchParams']['set'](_0x518955(0x9e),String(_0x2cf4bd)),_0x33384f[_0x518955(0x114)][_0x518955(0x148)]('to',String(_0x3ea70a));let _0x28bab2=await Y(this[_0x518955(0x14c)],_0x33384f);return this[_0x518955(0xe9)][_0x518955(0x95)](),_0x28bab2;}async[_0x1e2a68(0x1d1)](_0x16694f){const _0xd7f6c8=_0x1e2a68;await this[_0xd7f6c8(0xe9)]['ensureOnline']();let _0x54eaf9=this[_0xd7f6c8(0xe9)]['waitForSubmission'](_0x16694f['sid'],_0x16694f['reqId']),_0x315f71={..._0x16694f,'memberID':this[_0xd7f6c8(0xe9)][_0xd7f6c8(0x15c)],'revision':0x0,'type':this[_0xd7f6c8(0x169)][_0xd7f6c8(0x151)],'unitID':this[_0xd7f6c8(0x169)][_0xd7f6c8(0x1a5)],'userID':''},_0x14d926=X(this['_config'][_0xd7f6c8(0x1ae)],this['_target'][_0xd7f6c8(0x151)],_0xd7f6c8(0x1b0),this[_0xd7f6c8(0x169)][_0xd7f6c8(0x1a5)],'new_changes'),_0xefdb2=this[_0xd7f6c8(0x14c)]['httpRequest'](_0x14d926,{'body':JSON[_0xd7f6c8(0xe2)]({'changeset':_0x315f71,'memberID':this[_0xd7f6c8(0xe9)]['memberId'],'type':this[_0xd7f6c8(0x169)][_0xd7f6c8(0x151)],'unitID':this[_0xd7f6c8(0x169)][_0xd7f6c8(0x1a5)]}),'headers':{'content-type':_0xd7f6c8(0x1a0)},'method':_0xd7f6c8(0x1eb)})['then'](async _0x5bae69=>_0x5bae69[_0xd7f6c8(0xbe)]===0x191||_0x5bae69[_0xd7f6c8(0xbe)]===0x193?_0xd7f6c8(0x1a3):_0x5bae69[_0xd7f6c8(0xbe)]===0x190||_0x5bae69[_0xd7f6c8(0xbe)]===0x199?_0xd7f6c8(0x1b1):_0x5bae69['ok']?_0xd7f6c8(0xae):_0xd7f6c8(0x1f8))[_0xd7f6c8(0x16c)](()=>'unknown'),_0x1e7adb=Ee(this[_0xd7f6c8(0x14c)][_0xd7f6c8(0x12f)]),_0x23648f=_0xefdb2[_0xd7f6c8(0x1c9)](_0x14a15d=>_0x14a15d===_0xd7f6c8(0x1a3)?{'status':_0xd7f6c8(0xf3)}:_0x14a15d==='invalid'?{'status':_0xd7f6c8(0x19b)}:new Promise(()=>void 0x0)),_0x5188a3=await Promise['race']([_0x54eaf9['promise'],_0x23648f,_0x1e7adb['promise'][_0xd7f6c8(0x1c9)](()=>({'status':_0xd7f6c8(0x154)}))])['finally'](()=>{const _0x539531=_0xd7f6c8;_0x54eaf9['cancel'](),_0x1e7adb[_0x539531(0x93)]();});if(_0x5188a3[_0xd7f6c8(0xbe)]==='timeout'){let _0x5028b4=await _0xefdb2;return _0x5028b4===_0xd7f6c8(0x1a3)?{'message':_0xd7f6c8(0xc2),'reason':_0xd7f6c8(0x200),'status':_0xd7f6c8(0x1c2)}:_0x5028b4==='invalid'?{'message':_0xd7f6c8(0x1af),'reason':_0xd7f6c8(0x1fe),'status':'rejected'}:{'status':_0xd7f6c8(0x1f8)};}if(_0x5188a3[_0xd7f6c8(0xbe)]===_0xd7f6c8(0x185))return{'status':'unknown'};if(_0x5188a3[_0xd7f6c8(0xbe)]===_0xd7f6c8(0x10d))return{'status':_0xd7f6c8(0x10d)};if(_0x5188a3[_0xd7f6c8(0xbe)]===_0xd7f6c8(0xf3))return{'message':_0xd7f6c8(0xc2),'reason':_0xd7f6c8(0x200),'status':_0xd7f6c8(0x1c2)};if(_0x5188a3[_0xd7f6c8(0xbe)]===_0xd7f6c8(0x19b)){let _0x5a5727=await this[_0xd7f6c8(0x1bc)](_0x16694f[_0xd7f6c8(0xa8)],_0x16694f[_0xd7f6c8(0xa8)]);return{'message':_0xd7f6c8(0x1af),'reason':_0x5a5727[_0xd7f6c8(0x1b9)]!==void 0x0&&_0x5a5727['latestRevision']<_0x16694f[_0xd7f6c8(0xa8)]?_0xd7f6c8(0x170):'invalid-changeset','status':_0xd7f6c8(0x1c2)};}let _0x4bd96d=_0x5188a3['changeset'],_0x3fa6b3=await this[_0xd7f6c8(0x1bc)](_0x16694f['baseRev'],_0x4bd96d[_0xd7f6c8(0x18f)]-0x1);if(_0x28dcbf(_0x3fa6b3[_0xd7f6c8(0x149)])){let _0x377496=_0x3fa6b3[_0xd7f6c8(0x149)];throw new j(_0xd7f6c8(0x15e),_0x377496?.['message']||_0xd7f6c8(0x97),{'retryable':!0x0});}return{'acceptedChangeset':_0x4bd96d,'precedingChangesets':_0x3fa6b3[_0xd7f6c8(0x123)],'status':_0xd7f6c8(0x195)};}async[_0x1e2a68(0x14f)](){const _0x4cf974=_0x1e2a68;await this[_0x4cf974(0xe9)]['close']();}};async function Y(_0x1e23d0,_0x3c9419){const _0x5dbc44=_0x1e2a68;let _0x176265;try{_0x176265=await _0x1e23d0[_0x5dbc44(0xb6)](_0x3c9419,{'method':_0x5dbc44(0x1da)});}catch(_0x4bae65){throw new j(_0x5dbc44(0x15e),_0x5dbc44(0x11b),{'cause':_0x4bae65,'retryable':!0x0});}if(!_0x176265['ok'])throw new j(_0x5dbc44(0x15e),_0x5dbc44(0x124)+_0x176265[_0x5dbc44(0xbe)],{'retryable':_0x176265[_0x5dbc44(0xbe)]>=0x1f4});try{return await _0x176265['json']();}catch(_0x7ec116){throw new j(_0x5dbc44(0xb7),'Collaboration\x20HTTP\x20response\x20is\x20not\x20valid\x20JSON',{'cause':_0x7ec116});}}function X(_0x469317,..._0x3c80a3){const _0x3eaea7=_0x1e2a68;let _0x2f4c73=new URL(_0x469317);return _0x2f4c73[_0x3eaea7(0x133)]=_0x2f4c73[_0x3eaea7(0x133)][_0x3eaea7(0xa6)](/\/$/,'')+'/'+_0x3c80a3['map'](_0x64ee17=>encodeURIComponent(String(_0x64ee17)))[_0x3eaea7(0xf6)]('/'),_0x2f4c73;}function Te(_0x2a119e){const _0x59b98f=_0x1e2a68;if(!_0x2a119e)return;let _0x144a20=[_0x2a119e[_0x59b98f(0x1b2)],_0x2a119e[_0x59b98f(0xa4)],_0x2a119e[_0x59b98f(0xd4)],_0x2a119e[_0x59b98f(0xaa)]];for(let _0x118efa of _0x144a20)_0x118efa&&typeof _0x118efa['originalMeta']==_0x59b98f(0xd2)&&(_0x118efa[_0x59b98f(0x1ee)]=Z(_0x118efa[_0x59b98f(0x1ee)]));if(_0x2a119e['workbook']){for(let _0x23411f of Object['values'](_0x2a119e['workbook'][_0x59b98f(0x171)]))typeof _0x23411f[_0x59b98f(0x1ee)]==_0x59b98f(0xd2)&&(_0x23411f['originalMeta']=Z(_0x23411f[_0x59b98f(0x1ee)]));}}function Z(_0x35056c){const _0x89250b=_0x1e2a68;return Uint8Array[_0x89250b(0x9e)](Buffer[_0x89250b(0x9e)](_0x35056c,_0x89250b(0x135)));}function Ee(_0x21054a){let _0x4abde3;return{'cancel':()=>{_0x4abde3!==void 0x0&&clearTimeout(_0x4abde3);},'promise':new Promise(_0x454951=>{_0x4abde3=setTimeout(_0x454951,_0x21054a);})};}var De=class{[_0x1e2a68(0x14c)];[_0x1e2a68(0x1bd)]='offline';['_socket'];[_0x1e2a68(0x1a4)];['_memberId']='';[_0x1e2a68(0xfe)]=new Map();[_0x1e2a68(0x1dd)]=new Map();[_0x1e2a68(0x207)]=new Map();[_0x1e2a68(0xb3)]=new Map();[_0x1e2a68(0x14a)];[_0x1e2a68(0xed)];[_0x1e2a68(0x1be)]=0x0;constructor(_0x5d53f5){const _0x3d61e1=_0x1e2a68;this[_0x3d61e1(0x14c)]=_0x5d53f5;}async[_0x1e2a68(0x1d8)](_0x38ed1c){const _0x4f9e28=_0x1e2a68;let _0x5d9e74=this[_0x4f9e28(0xfe)][_0x4f9e28(0x1e2)](_0x38ed1c[_0x4f9e28(0x1a5)]);if(_0x5d9e74&&_0x5d9e74[_0x4f9e28(0xeb)][_0x4f9e28(0x151)]!==_0x38ed1c[_0x4f9e28(0x151)])throw new j(_0x4f9e28(0x1d7),'The\x20same\x20Unit\x20id\x20cannot\x20be\x20joined\x20with\x20two\x20Unit\x20types');if(await this[_0x4f9e28(0x1d3)](),_0x5d9e74)_0x5d9e74[_0x4f9e28(0x136)]+=0x1;else{try{await this[_0x4f9e28(0x121)](_0x38ed1c);}catch(_0x48cec3){throw this['_joined'][_0x4f9e28(0x1a2)]===0x0&&(this[_0x4f9e28(0x1bd)]=_0x4f9e28(0x185),this[_0x4f9e28(0x1f2)](),this[_0x4f9e28(0x172)]?.[_0x4f9e28(0x14f)](0x3e8,_0x4f9e28(0x10e)),this['_socket']=void 0x0,this[_0x4f9e28(0x142)]=''),_0x48cec3;}this['_joined'][_0x4f9e28(0x148)](_0x38ed1c[_0x4f9e28(0x1a5)],{'leases':0x1,'target':_0x38ed1c});}let _0x2bd83c=!0x1,_0xed2344=()=>this[_0x4f9e28(0x142)],_0x5a565c=new Set();return{'close':async()=>{const _0x544228=_0x4f9e28;if(!_0x2bd83c){_0x2bd83c=!0x0;for(let _0x1a6d5b of _0x5a565c)_0x1a6d5b[_0x544228(0x93)]();_0x5a565c[_0x544228(0xe5)](),await this[_0x544228(0x145)](_0x38ed1c['unitId']);}},'ensureOnline':async()=>await this['_ensureConnected'](),'getConnectionState':()=>_0x2bd83c?_0x4f9e28(0x185):this[_0x4f9e28(0x1bd)],get 'memberId'(){return _0xed2344();},'takeInboundChangesets':()=>{const _0x33022c=_0x4f9e28;let _0x26df15=this[_0x33022c(0xb3)]['get'](_0x38ed1c[_0x33022c(0x1a5)])??[];return this[_0x33022c(0xb3)][_0x33022c(0xe6)](_0x38ed1c[_0x33022c(0x1a5)]),_0x26df15;},'waitForSubmission':(_0xf5b010,_0x39e0ee)=>{const _0x2f9fb3=_0x4f9e28;let _0x277371=this['_waitForSubmission'](_0xf5b010,_0x39e0ee);return _0x5a565c[_0x2f9fb3(0x206)](_0x277371),_0x277371['promise']['then'](()=>_0x5a565c[_0x2f9fb3(0xe6)](_0x277371),()=>_0x5a565c[_0x2f9fb3(0xe6)](_0x277371)),{'cancel':()=>{const _0x4c2870=_0x2f9fb3;_0x5a565c[_0x4c2870(0xe6)](_0x277371),_0x277371[_0x4c2870(0x93)]();},'promise':_0x277371[_0x2f9fb3(0xc1)]};}};}async['_ensureConnected'](){const _0x4d5270=_0x1e2a68;if(this[_0x4d5270(0x1bd)]!==_0x4d5270(0x1a7)||this[_0x4d5270(0x172)]?.[_0x4d5270(0x1f7)]!==WebSocket[_0x4d5270(0xa9)]){this['_reconnectTimer']!==void 0x0&&clearTimeout(this['_reconnectTimer']),this[_0x4d5270(0xed)]=void 0x0,this[_0x4d5270(0x1a4)]??=this[_0x4d5270(0x103)]();try{await this[_0x4d5270(0x1a4)];}finally{this[_0x4d5270(0x1a4)]=void 0x0;}}}async[_0x1e2a68(0x103)](){const _0x239f89=_0x1e2a68;this[_0x239f89(0x1bd)]=_0x239f89(0x1c0);let _0x545040=await this['_config'][_0x239f89(0xb6)](this['_config'][_0x239f89(0x132)],{'headers':{'content-type':'application/json'},'method':_0x239f89(0x1da)});if(!_0x545040['ok'])throw this['_state']=_0x239f89(0x13a),new j('COLLABORATION_UNAVAILABLE',_0x239f89(0x1cb)+_0x545040[_0x239f89(0xbe)],{'retryable':_0x545040[_0x239f89(0xbe)]>=0x1f4});let _0x4f41d0=await _0x545040['json']();if(typeof _0x4f41d0['ticket']!=_0x239f89(0xd2)||_0x4f41d0[_0x239f89(0x1c3)][_0x239f89(0x196)]===0x0)throw this[_0x239f89(0x1bd)]='offline',new j(_0x239f89(0xb7),_0x239f89(0xfc));let _0x1d05c5=new URL(this[_0x239f89(0x14c)][_0x239f89(0x197)]);_0x1d05c5[_0x239f89(0x114)][_0x239f89(0x148)](_0x239f89(0xd5),_0x4f41d0[_0x239f89(0x1c3)]);let _0x585914=new WebSocket(_0x1d05c5);this[_0x239f89(0x172)]=_0x585914,_0x585914[_0x239f89(0xd3)](_0x239f89(0x1c7),_0x340752=>this[_0x239f89(0x1b7)](_0x340752)),_0x585914[_0x239f89(0xd3)]('close',()=>{const _0x23e279=_0x239f89;this[_0x23e279(0x172)]===_0x585914&&(this[_0x23e279(0x1f2)](),this[_0x23e279(0x165)](new j(_0x23e279(0x15e),'Collaboration\x20WebSocket\x20closed',{'retryable':!0x0})),this[_0x23e279(0x1bd)]=this['_joined'][_0x23e279(0x1a2)]===0x0?'closed':_0x23e279(0x1c0),this[_0x23e279(0xfe)][_0x23e279(0x1a2)]>0x0&&this[_0x23e279(0x140)]());}),await Oe(_0x585914);let _0x4cbad4=await this[_0x239f89(0xf9)](_0x43e75b['HELLO'],'',{'cmd':_0x43e75b[_0x239f89(0x164)],'routeKey':''});if(_0x4cbad4[_0x239f89(0x1fb)]!==_0x46fcc4['OK']||typeof _0x4cbad4[_0x239f89(0x1d4)]?.[_0x239f89(0x1cc)]!=_0x239f89(0xd2))throw _0x585914['close'](),new j(_0x239f89(0xb7),_0x239f89(0xcf));this[_0x239f89(0x142)]=_0x4cbad4[_0x239f89(0x1d4)][_0x239f89(0x1cc)],this[_0x239f89(0x1bd)]='online';for(let {target:_0x116a88}of this[_0x239f89(0xfe)][_0x239f89(0x20a)]())try{await this['_join'](_0x116a88);}catch(_0x178a52){throw _0x585914['close'](0x3f3,_0x239f89(0x1f3)),_0x178a52;}this[_0x239f89(0x1be)]=0x0,this[_0x239f89(0x119)]();}async[_0x1e2a68(0x121)](_0x5d74c9){const _0x55fa74=_0x1e2a68;let _0xc169a0=await this[_0x55fa74(0xf9)](_0x43e75b[_0x55fa74(0x9c)],_0x5d74c9[_0x55fa74(0x1a5)],{'cmd':_0x43e75b['JOIN'],'joinReq':{'rooms':[{'args':'','roomID':_0x5d74c9[_0x55fa74(0x1a5)]}]},'routeKey':_0x5d74c9['unitId']});if(_0xc169a0[_0x55fa74(0x1fb)]!==_0x46fcc4['OK'])throw new j(_0x55fa74(0x15e),typeof _0xc169a0[_0x55fa74(0x1a8)]==_0x55fa74(0xd2)?_0xc169a0[_0x55fa74(0x1a8)]:'Failed\x20to\x20join\x20Unit\x20room');}['_requestCommand'](_0x76e0d1,_0x56608e,_0x38b282){const _0x2d575a=_0x1e2a68;let _0x52b6de=this[_0x2d575a(0x172)];if(!_0x52b6de||_0x52b6de[_0x2d575a(0x1f7)]!==WebSocket['OPEN'])return Promise[_0x2d575a(0x1ff)](new j(_0x2d575a(0x15e),'Collaboration\x20WebSocket\x20is\x20not\x20online',{'retryable':!0x0}));let _0x349f69=_0x76e0d1+':'+_0x56608e;return new Promise((_0x2c3ad0,_0x47062b)=>{const _0x15dacc=_0x2d575a;if(this['_commandWaiters'][_0x15dacc(0x1e8)](_0x349f69)){_0x47062b(new j(_0x15dacc(0xb7),'A\x20'+_0x76e0d1+'\x20request\x20is\x20already\x20active\x20for\x20'+_0x56608e));return;}let _0x1a009f=setTimeout(()=>{const _0x459a18=_0x15dacc;this[_0x459a18(0x1dd)]['delete'](_0x349f69),_0x47062b(new j(_0x459a18(0x15e),'Timed\x20out\x20waiting\x20for\x20Collaboration\x20command\x20'+_0x76e0d1,{'retryable':!0x0}));},0x7530);this['_commandWaiters'][_0x15dacc(0x148)](_0x349f69,{'reject':_0x47062b,'resolve':_0x2c3ad0,'timer':_0x1a009f});try{_0x52b6de[_0x15dacc(0xac)](JSON[_0x15dacc(0xe2)](_0x38b282));}catch(_0x35596a){this[_0x15dacc(0x1dd)][_0x15dacc(0xe6)](_0x349f69),clearTimeout(_0x1a009f),_0x47062b(new j(_0x15dacc(0x15e),_0x15dacc(0x102),{'cause':_0x35596a,'retryable':!0x0}));}});}[_0x1e2a68(0x1b7)](_0x3e5a94){const _0x2bd1a9=_0x1e2a68;if(typeof _0x3e5a94[_0x2bd1a9(0xb5)]!=_0x2bd1a9(0xd2))return;let _0x4be2cc;try{_0x4be2cc=JSON[_0x2bd1a9(0x9f)](_0x3e5a94[_0x2bd1a9(0xb5)]);}catch{this['_socket']?.[_0x2bd1a9(0x14f)](0x3eb,_0x2bd1a9(0xdf));return;}let _0x1516c3=typeof _0x4be2cc['routeKey']==_0x2bd1a9(0xd2)?_0x4be2cc[_0x2bd1a9(0x101)]:'';if(_0x4be2cc['cmd']===_0x43e75b['HELLO']||_0x4be2cc[_0x2bd1a9(0x108)]===_0x43e75b['JOIN']||_0x4be2cc[_0x2bd1a9(0x108)]===_0x43e75b['HEARTBEAT']){let _0x49b35d=_0x4be2cc[_0x2bd1a9(0x108)]+':'+_0x1516c3,_0x28e545=this[_0x2bd1a9(0x1dd)]['get'](_0x49b35d);_0x28e545&&(this['_commandWaiters']['delete'](_0x49b35d),clearTimeout(_0x28e545['timer']),_0x28e545[_0x2bd1a9(0x107)](_0x4be2cc));return;}_0x4be2cc[_0x2bd1a9(0x108)]!==_0x43e75b[_0x2bd1a9(0xc0)]||!_0x4be2cc['collaMsg']||this[_0x2bd1a9(0xb2)](_0x1516c3,_0x4be2cc['collaMsg']);}[_0x1e2a68(0xb2)](_0xe3fa91,_0x585560){const _0x46b7f9=_0x1e2a68;let _0x2d861e=_0x585560[_0x46b7f9(0xd9)],_0x56f258=_0x2d861e===_0x46b7f9(0xd8)?_0x46b7f9(0xe0):_0x2d861e===_0x46b7f9(0xee)?_0x46b7f9(0xc6):_0x2d861e===_0x46b7f9(0xb9)?'csShouldRetryEvent':_0x2d861e===_0x46b7f9(0x1dc)?_0x46b7f9(0x15f):_0x2d861e===_0x46b7f9(0x209)?'newCsEvent':void 0x0;if(!_0x56f258)return;let _0x5253a0=ke(_0x585560[_0x56f258]);if(!_0x5253a0||_0x5253a0[_0x46b7f9(0x1f9)]!==_0xe3fa91)return;if(_0x2d861e===_0x46b7f9(0x209)){let _0x5572b6=this[_0x46b7f9(0xb3)][_0x46b7f9(0x1e2)](_0xe3fa91)??[];_0x5572b6['push'](_0x5253a0),this['_inbound'][_0x46b7f9(0x148)](_0xe3fa91,_0x5572b6);return;}let _0x1f0a29=Q(_0x5253a0['sid'],_0x5253a0[_0x46b7f9(0xca)]),_0x5279c2=this['_submissionWaiters'][_0x46b7f9(0x1e2)](_0x1f0a29);_0x5279c2&&_0x5279c2(_0x2d861e==='changeset_ack'?{'changeset':_0x5253a0,'status':'ack'}:_0x2d861e===_0x46b7f9(0xb9)?{'status':_0x46b7f9(0x10d)}:_0x2d861e===_0x46b7f9(0x1dc)?{'status':_0x46b7f9(0xf3)}:{'status':_0x46b7f9(0x19b)});}[_0x1e2a68(0x1bf)](_0x245645,_0x3b3f00){const _0x120df0=_0x1e2a68;let _0x588ac7=Q(_0x245645,_0x3b3f00);if(this['_submissionWaiters'][_0x120df0(0x1e8)](_0x588ac7))return{'cancel':()=>void 0x0,'promise':Promise[_0x120df0(0x1ff)](new j(_0x120df0(0x1d7),_0x120df0(0x183)))};let _0x1bea36=()=>void 0x0;return{'cancel':()=>_0x1bea36({'status':_0x120df0(0x185)}),'promise':new Promise(_0xc5635d=>{const _0x16ec9c=_0x120df0;_0x1bea36=_0x11f7d5=>{const _0xccfa26=_0x2570;this['_submissionWaiters'][_0xccfa26(0xe6)](_0x588ac7)&&_0xc5635d(_0x11f7d5);},this['_submissionWaiters'][_0x16ec9c(0x148)](_0x588ac7,_0x1bea36);})};}async['_release'](_0x5cf53b){const _0xcb9d85=_0x1e2a68;let _0x3527d5=this[_0xcb9d85(0xfe)]['get'](_0x5cf53b);_0x3527d5&&(--_0x3527d5[_0xcb9d85(0x136)],!(_0x3527d5['leases']>0x0)&&(this[_0xcb9d85(0xfe)]['delete'](_0x5cf53b),this[_0xcb9d85(0xb3)][_0xcb9d85(0xe6)](_0x5cf53b),this[_0xcb9d85(0x172)]?.[_0xcb9d85(0x1f7)]===WebSocket[_0xcb9d85(0xa9)]&&this[_0xcb9d85(0x172)][_0xcb9d85(0xac)](JSON[_0xcb9d85(0xe2)]({'cmd':_0x43e75b[_0xcb9d85(0x94)],'leaveReq':{'args':'','roomID':_0x5cf53b},'routeKey':_0x5cf53b})),this[_0xcb9d85(0xfe)]['size']===0x0&&(this[_0xcb9d85(0x1bd)]=_0xcb9d85(0x185),this[_0xcb9d85(0xed)]!==void 0x0&&clearTimeout(this[_0xcb9d85(0xed)]),this[_0xcb9d85(0xed)]=void 0x0,this[_0xcb9d85(0x1f2)](),this[_0xcb9d85(0x172)]?.[_0xcb9d85(0x14f)](0x3e8,_0xcb9d85(0x178)),this[_0xcb9d85(0x172)]=void 0x0,this[_0xcb9d85(0x142)]='')));}[_0x1e2a68(0x140)](){const _0x4ef55d=_0x1e2a68;if(this[_0x4ef55d(0xed)]!==void 0x0||this[_0x4ef55d(0x1be)]>=0x3){this[_0x4ef55d(0x1be)]>=0x3&&(this[_0x4ef55d(0x1bd)]=_0x4ef55d(0x13a));return;}let _0x37586d=Math[_0x4ef55d(0x12b)](0x3e8*0x2**this[_0x4ef55d(0x1be)],0x4e20);this[_0x4ef55d(0x1be)]+=0x1,this['_reconnectTimer']=setTimeout(()=>{const _0x3f3c88=_0x4ef55d;this['_reconnectTimer']=void 0x0,this[_0x3f3c88(0x1a4)]??=this[_0x3f3c88(0x103)](),this[_0x3f3c88(0x1a4)][_0x3f3c88(0x16c)](()=>this[_0x3f3c88(0x140)]())[_0x3f3c88(0xa2)](()=>{const _0x5e4fb4=_0x3f3c88;this[_0x5e4fb4(0x1a4)]=void 0x0;});},_0x37586d);}[_0x1e2a68(0x119)](){const _0x4406e3=_0x1e2a68;this[_0x4406e3(0x1f2)](),this['_heartbeat']=setInterval(()=>{const _0x31771a=_0x4406e3;this['_state']==='online'&&this['_requestCommand'](_0x43e75b['HEARTBEAT'],'',{'cmd':_0x43e75b['HEARTBEAT'],'routeKey':''})[_0x31771a(0x16c)](()=>this[_0x31771a(0x172)]?.['close'](0x3f3,_0x31771a(0x112)));},0x7530);}[_0x1e2a68(0x1f2)](){const _0xb8e7b4=_0x1e2a68;this[_0xb8e7b4(0x14a)]!==void 0x0&&clearInterval(this[_0xb8e7b4(0x14a)]),this[_0xb8e7b4(0x14a)]=void 0x0;}[_0x1e2a68(0x165)](_0x46535f){const _0x2c35bf=_0x1e2a68;for(let _0x53b1e4 of this[_0x2c35bf(0x1dd)][_0x2c35bf(0x20a)]())clearTimeout(_0x53b1e4[_0x2c35bf(0x13f)]),_0x53b1e4[_0x2c35bf(0x1ff)](_0x46535f);this[_0x2c35bf(0x1dd)][_0x2c35bf(0xe5)]();}};function Oe(_0x5e73b4){return new Promise((_0x35dfbe,_0x4f179c)=>{const _0x63db92=_0x2570;let _0x45095f=()=>{const _0x177adf=_0x2570;clearTimeout(_0x2d1aaa),_0x5e73b4[_0x177adf(0xf1)](_0x177adf(0x14f),_0x4a29e7),_0x5e73b4[_0x177adf(0xf1)]('error',_0x3f1e0f),_0x5e73b4['removeEventListener'](_0x177adf(0x194),_0x3450b4);},_0x3a5e19=_0x24b476=>{_0x45095f(),_0x4f179c(new j('COLLABORATION_UNAVAILABLE',_0x24b476,{'retryable':!0x0}));},_0x4a29e7=()=>_0x3a5e19('Collaboration\x20WebSocket\x20closed\x20before\x20opening'),_0x3f1e0f=()=>_0x3a5e19(_0x63db92(0x1df)),_0x3450b4=()=>{_0x45095f(),_0x35dfbe();},_0x2d1aaa=setTimeout(()=>{const _0x24dbb4=_0x63db92;_0x3a5e19(_0x24dbb4(0x1b8)),_0x5e73b4[_0x24dbb4(0x14f)](0x3e8,_0x24dbb4(0x190));},0x7530);_0x5e73b4[_0x63db92(0xd3)](_0x63db92(0x14f),_0x4a29e7,{'once':!0x0}),_0x5e73b4[_0x63db92(0xd3)]('error',_0x3f1e0f,{'once':!0x0}),_0x5e73b4['addEventListener']('open',_0x3450b4,{'once':!0x0});});}function ke(_0xca47f0){const _0x43c748=_0x1e2a68;if(!_0xca47f0||typeof _0xca47f0!='object')return null;let _0x5df504=_0xca47f0['cs'];return _0x5df504&&typeof _0x5df504==_0x43c748(0x127)?_0x5df504:null;}function Q(_0x2980a2,_0x43a03c){return(_0x2980a2??'')+':'+(_0x43a03c??0x0);}var Ae=class{[_0x1e2a68(0x14c)];['_connection'];constructor(_0x42a876){const _0x5af9db=_0x1e2a68;this[_0x5af9db(0x14c)]=je(_0x42a876),this[_0x5af9db(0x18e)]=new De(this['_config']);}async[_0x1e2a68(0x194)](_0x22aeb8){const _0x4ca53f=_0x1e2a68;let _0x4a9a36=await this[_0x4ca53f(0x18e)][_0x4ca53f(0x1d8)](_0x22aeb8);return new we(this[_0x4ca53f(0x14c)],_0x22aeb8,_0x4a9a36);}};function je(_0x5a7aec){const _0x430996=_0x1e2a68;let _0x5ecbb8=$(_0x5a7aec[_0x430996(0x1b5)],_0x430996(0x1b5),[_0x430996(0x139),_0x430996(0x168)]),_0x1dd86b=$(_0x5a7aec[_0x430996(0x1ae)],_0x430996(0x1ae),['http:',_0x430996(0x168)]),_0x4967a9=$(_0x5a7aec[_0x430996(0x197)],_0x430996(0x197),[_0x430996(0xa1),_0x430996(0x19f),'http:',_0x430996(0x168)]);_0x4967a9[_0x430996(0x177)]===_0x430996(0x139)&&(_0x4967a9[_0x430996(0x177)]=_0x430996(0xa1)),_0x4967a9['protocol']===_0x430996(0x168)&&(_0x4967a9[_0x430996(0x177)]=_0x430996(0x19f));let _0x8d0598=$(_0x5a7aec[_0x430996(0x132)],_0x430996(0x132),[_0x430996(0x139),'https:']),_0x156047=_0x5a7aec[_0x430996(0x12f)]??0x7530;if(!Number[_0x430996(0x14e)](_0x156047)||_0x156047<=0x0)throw new j('COLLABORATION_INVALID_INPUT',_0x430996(0xf2));return{'collabSubmitChangesetUrl':_0x1dd86b,'collabWebSocketUrl':_0x4967a9,'commitTimeoutMs':_0x156047,'httpRequest':_0x5a7aec[_0x430996(0xb6)]??globalThis[_0x430996(0x10b)]['bind'](globalThis),'snapshotServerUrl':_0x5ecbb8,'wsSessionTicketUrl':_0x8d0598};}function $(_0x45c1a0,_0x517446,_0x2cfa5){const _0x179023=_0x1e2a68;let _0xc0dfaa;try{_0xc0dfaa=new URL(_0x45c1a0);}catch{throw new j(_0x179023(0x1d7),_0x517446+_0x179023(0x153));}if(!_0x2cfa5[_0x179023(0xde)](_0xc0dfaa[_0x179023(0x177)]))throw new j(_0x179023(0x1d7),_0x517446+_0x179023(0xf0));return _0xc0dfaa;}function Me(_0x10cb62){return new Ae(_0x10cb62);}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.2",
4
+ "version": "1.0.4",
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.2",
23
- "@univerjs-pro/boards": "1.0.2",
24
- "@univerjs-pro/collaboration": "1.0.2",
25
- "@univerjs-pro/engine-formula": "1.0.2",
26
- "@univerjs-pro/slides": "1.0.2",
27
- "@univerjs/core": "1.0.2",
28
- "@univerjs/docs": "1.0.2",
29
- "@univerjs/engine-formula": "1.0.2",
30
- "@univerjs/engine-render": "1.0.2",
31
- "@univerjs/protocol": "1.0.2",
32
- "@univerjs/sheets": "1.0.2"
22
+ "@univerjs-pro/bases": "1.0.4",
23
+ "@univerjs-pro/boards": "1.0.4",
24
+ "@univerjs-pro/collaboration": "1.0.4",
25
+ "@univerjs-pro/engine-formula": "1.0.4",
26
+ "@univerjs-pro/slides": "1.0.4",
27
+ "@univerjs/core": "1.0.4",
28
+ "@univerjs/docs": "1.0.4",
29
+ "@univerjs/engine-formula": "1.0.4",
30
+ "@univerjs/engine-render": "1.0.4",
31
+ "@univerjs/protocol": "1.0.4",
32
+ "@univerjs/sheets": "1.0.4"
33
33
  }
34
34
  }