@univerjs-pro/collaboration-client 1.0.0-beta.0 → 1.0.0-beta.2

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 (87) hide show
  1. package/lib/cjs/facade.js +1 -1
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/facade.js +1 -1
  23. package/lib/es/index.js +1 -1
  24. package/lib/es/locale/ar-SA.js +1 -1
  25. package/lib/es/locale/ca-ES.js +1 -1
  26. package/lib/es/locale/de-DE.js +1 -1
  27. package/lib/es/locale/en-US.js +1 -1
  28. package/lib/es/locale/es-ES.js +1 -1
  29. package/lib/es/locale/fa-IR.js +1 -1
  30. package/lib/es/locale/fr-FR.js +1 -1
  31. package/lib/es/locale/id-ID.js +1 -1
  32. package/lib/es/locale/it-IT.js +1 -1
  33. package/lib/es/locale/ja-JP.js +1 -1
  34. package/lib/es/locale/ko-KR.js +1 -1
  35. package/lib/es/locale/pl-PL.js +1 -1
  36. package/lib/es/locale/pt-BR.js +1 -1
  37. package/lib/es/locale/ru-RU.js +1 -1
  38. package/lib/es/locale/sk-SK.js +1 -1
  39. package/lib/es/locale/vi-VN.js +1 -1
  40. package/lib/es/locale/zh-CN.js +1 -1
  41. package/lib/es/locale/zh-HK.js +1 -1
  42. package/lib/es/locale/zh-TW.js +1 -1
  43. package/lib/facade.js +1 -1
  44. package/lib/index.js +1 -1
  45. package/lib/locale/ar-SA.js +1 -1
  46. package/lib/locale/ca-ES.js +1 -1
  47. package/lib/locale/de-DE.js +1 -1
  48. package/lib/locale/en-US.js +1 -1
  49. package/lib/locale/es-ES.js +1 -1
  50. package/lib/locale/fa-IR.js +1 -1
  51. package/lib/locale/fr-FR.js +1 -1
  52. package/lib/locale/id-ID.js +1 -1
  53. package/lib/locale/it-IT.js +1 -1
  54. package/lib/locale/ja-JP.js +1 -1
  55. package/lib/locale/ko-KR.js +1 -1
  56. package/lib/locale/pl-PL.js +1 -1
  57. package/lib/locale/pt-BR.js +1 -1
  58. package/lib/locale/ru-RU.js +1 -1
  59. package/lib/locale/sk-SK.js +1 -1
  60. package/lib/locale/vi-VN.js +1 -1
  61. package/lib/locale/zh-CN.js +1 -1
  62. package/lib/locale/zh-HK.js +1 -1
  63. package/lib/locale/zh-TW.js +1 -1
  64. package/lib/types/facade/f-collaboration.d.ts +14 -0
  65. package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +2 -2
  66. package/lib/umd/facade.js +1 -1
  67. package/lib/umd/index.js +1 -1
  68. package/lib/umd/locale/ar-SA.js +1 -1
  69. package/lib/umd/locale/ca-ES.js +1 -1
  70. package/lib/umd/locale/de-DE.js +1 -1
  71. package/lib/umd/locale/en-US.js +1 -1
  72. package/lib/umd/locale/es-ES.js +1 -1
  73. package/lib/umd/locale/fa-IR.js +1 -1
  74. package/lib/umd/locale/fr-FR.js +1 -1
  75. package/lib/umd/locale/id-ID.js +1 -1
  76. package/lib/umd/locale/it-IT.js +1 -1
  77. package/lib/umd/locale/ja-JP.js +1 -1
  78. package/lib/umd/locale/ko-KR.js +1 -1
  79. package/lib/umd/locale/pl-PL.js +1 -1
  80. package/lib/umd/locale/pt-BR.js +1 -1
  81. package/lib/umd/locale/ru-RU.js +1 -1
  82. package/lib/umd/locale/sk-SK.js +1 -1
  83. package/lib/umd/locale/vi-VN.js +1 -1
  84. package/lib/umd/locale/zh-CN.js +1 -1
  85. package/lib/umd/locale/zh-HK.js +1 -1
  86. package/lib/umd/locale/zh-TW.js +1 -1
  87. package/package.json +16 -16
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- const _0x2e02fc=_0x1bad;(function(_0x176cab,_0x429b90){const _0x1bb2d0=_0x1bad,_0x2f7370=_0x176cab();while(!![]){try{const _0x5e1f29=parseInt(_0x1bb2d0(0xe9))/0x1*(parseInt(_0x1bb2d0(0x1b9))/0x2)+parseInt(_0x1bb2d0(0x1e1))/0x3+parseInt(_0x1bb2d0(0x10a))/0x4+-parseInt(_0x1bb2d0(0x247))/0x5+-parseInt(_0x1bb2d0(0x24f))/0x6*(-parseInt(_0x1bb2d0(0x184))/0x7)+-parseInt(_0x1bb2d0(0x10b))/0x8+-parseInt(_0x1bb2d0(0x25f))/0x9;if(_0x5e1f29===_0x429b90)break;else _0x2f7370['push'](_0x2f7370['shift']());}catch(_0x57962f){_0x2f7370['push'](_0x2f7370['shift']());}}}(_0x2699,0xb1811));import{CollaborationEvent as _0x150d16,CompressMutationService as _0xe47be4,EmptyMutationInfo as _0x220092,ISnapshotServerService as _0xa027ef,ITransformService as _0x40dc20,RevisionService as _0x4b0edd,SnapshotService as _0x4240b0,UniverCollaborationPlugin as _0x2a63ac,b64DecodeUnicode as _0x561a6b,isTransformChangesetsSuccess as _0x113617,isTransformMutationsWithChangesetFailure as _0x3892b2,isTransformMutationsWithChangesetSuccess as _0x2eee33,mapDocumentTypeToUniverInstanceType as _0x2c0a6c,parseChangesetToProtocol as _0xe3775b,parseProtocolChangeset as _0x93473e,textEncoder as _0x4363eb,uuidv4 as _0x500aaf}from'@univerjs-pro/collaboration';function _0x2699(){const _0x10921d=['[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','AWAITING','9220NwhWSM','emitEvent','MSG_FOR_ERROR','loadOfflineData','onSyncEditingCollabCursor','_scheduleCompleteTimestamp','_getSendChangesetTimeout','UNIVER_BASE','LIVESHARE_FETCH_OPERATIONS','saveChangeset','liveShareNewHost','add','open$','/new_changes','forEach','_registerDependencies','synced','size','_state','/unit/','_socketChannels','onload','getCurrentSelections','_collaborationPaused','_updateLocalCache','resend','downloadEndpointUrl','sendHeartbeatTimer','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','responseType','GLOBAL_ROOMS_CNT_EXCEEDS','requireSession','asObservable','_httpService','LIVESHARE_TERMINATE','_telemetryInfo','_getSignURL','charCodeAt','encrypt','UNIVER_SLIDE','2701968JECSZs','readyForCollab','onStateChange','HEARTBEAT','patch','members$','pending','conflict','status$','toLocal','_clearLocalCache','objectActions','getTypeOfUnitAdded$','_stopTelemetryCollaborationNewChangeset','NEW_CHANGESETS','constructor','saveSheetBlock','_hasSessionsForEndpoint','_tryReconnect','localeService','_showConflictNotification','_resendTimer','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','FETCH_MISS','_getAPIPrefix','localCacheService','_transformStack','send','\x0aCurrent:\x20','1.0.0-beta.0','origin','workbook','_config','getCurrentUser','_disableEditing','getUnitType','result','_clearHeartbeatTimer','_cfgEnableObjInherit','_onJoinRoomEvent','textRanges','liveShareOperation','_getLoginPath','univer-pro.collaboration-client-adapter-service','_transformAndApplyRemoteChangeset','transformUndoRedo','encodeURIComponent','_permissionService','LIVESHARE_OPERATION','ERROR_EXCEED_SIZE','_resendTimeout','_queuedRemoteChangesets','parse','[UniverCollaborationClientPlugin]','name','signUrlServerUrl','loadSheet','[PendingState]:\x20received\x20acknowledgement.','x-univer-host','session','transformMutationsWithChangeset','HEARTBEAT_TIMEOUT','create','confirm','error$','subscribe','getCollabEntity$','/object/','_transformUndoredo','_clearScheduledTask','defineProperty','setShowComponents','_type','code','socket\x20open.','apply','_userManagerService','PENDING','_entities','UNIVER_PDF','decorate','onMissingChangesets','function','revision','_sendHeartbeat','timeoutTimer','close$','[CollaborationUndoRedoService]','onStarting','_toggleOffline','_createInitialState','_collaborationUIEventService','src','getUploadOptions','_docStateChangeManagerService','compose','get','findIndex','SUBMIT_CHANGESET_TIMEOUT','_handler','objectID','objects','6157400VTToNU','_handleRemoteChangesets','_isEchoedAwaitingChangeset','/object','_onLocalMutation','members','_sessionChannels','_configService','6QZRYIm','action','baseRev','COMPRESS_MUTATION_APPLY','fetch_missing','pluginName','resolveUnit','CLOSE_ROOM','_onCombEvent','post','dispose','duration','find','accept','_resendWithTimeout','onTransformSelections','123363TkFyTv','SYNCED','reject','[CollaborationState]:\x20apply\x20error!','_upload','getCurrentRevOfUnit','sessionStatus','UNIVER_SHEET','allowed','_unlockTransition','UPDATE_PERMISSION_OBJ','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','_initMergeInterceptor','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_acknowledgeAwaitingIfReady','some','_init','getLatestCsReqIdBySid','_initUnitPermissionChange','OFFLINE','reqId','_incrementRevisionNumber','getTime','href','saveAttachment','_socket','getValue','{fileID}','tables','onLocalMutation','loadBoard','UPDATE_CURSOR','title','upload','avatar','updateMember','uniscriptRunEvent','hasOwnProperty','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','_sheetTransformSelectionsService','unitLoaded$','getCfgEnableObjInherit','_onOffline','_members$','FAIL','_getSocketChannel','close','_decreaseWaiting','requestParams','toRemote','?url=','fetchMiss','c1Prime','url','_fetchMissChangesets','save\x20fail\x20reason\x20is\x20','unitType','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','unitId','COMPRESS_MUTATION_SEND','joinRsp','_sessionStatus$','_onRemoteChangeset','_updateState','state$','offline','_clearUndo','removeMember','CHANGESET_SHOULD_RETRY','getUnitStatus$','waitForRoom$','RECV','message$','_status$','getUnitId','LOCAL_CACHE_INTERVAL','HELLO','_createHandler','incrementRevOfUnit','onlyLocal','encode','text-x','_substituteRedoStack','session.room-cnt-exceeds','collaborators','userID','not_collab','IDLE','setConfig','push','/universer-api/user/session-ticket','every','JOIN_ROOM_NOT_EXISTS','_redoStacks','_tryEnsureSocket','_getUndoStack','/-/object/-/batch_allowed','_listenToNetworkCondition','_startCollaboration','onRemoteChangeset','values','indexOf','FileId','_onRemoteACK','min','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','has','[OfflineState]:\x20received\x20acknowledgement.','_maxTotalRetryTimeout','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','error','_getCurrentRevision','PERMISSION_REJ','_transformRemoteChangesetByIMECache','createCollaborator','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','endpoint','_state$','unit-cache-','cmd','ERROR_IMAGE','Error\x20on\x20receiving\x20event','&to=','[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.','stopTime','_instanceService','file','filter','getRoom','OTHER_CLIENT_EDITING','[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!','transformSelections','SHOULD_CLOSE_CONN','getFocusedUnit','_acknowledgeAwaiting','SOCKET_FAILED_RETRY','telemetry\x20info\x20is\x20not\x20initialized','selections','set','_changesetSessionId','_univerInstanceService','loadSlide','saveImage','/-/object/list','unitID','capture','_initDependencies','uploadFileServerUrl','_lockTransition','online$','csAckEvent','_getConfig','getResourcesRequest','collaboration-client.local-cache-service','&assign=','enableSingleActiveInstanceLock','ws://127.0.0.1:8000/universer-api/comb/connect','toggleOffline','_isPermissionRej','onSendChangeset','replace','_transformRemoteChangesetByStateCache','_telemetryService','univer-pro.collaboration-client-socket-service','clear','endsWith','_socketService','LIVESHARE_NEW_HOST','/universer-api/file/{fileID}/sign-url','_createSocket','_waitCount','batchAllowed','Univer','_initCloseConn','_joinRoom','onRemoteRetry','prototype','_onConflict','JOIN_ROOM_FULL','UNIVER_DOC','addHandlerCallback','_event$','permissionRejEvent','executeCommand','headers','/allowed','_rescheduleHeartbeat','[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.','_scheduleCollaborationTimeoutTimer','_createInitialStateImpl','session.room-permission-denied','[OfflineState]:\x20received\x20changeset.','pipe','univer-pro.collaboration-client.single-active-unit-service','_replaceFileID','changesets','/rev/','mutations','_updateStatus','withCredentials','_shouldReportTelemetry','session.join-failed','addImageSourceCache','sid','INGEST','[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','append','/universer-api/snapshot/','event$','splice','createInstance','_onConnectionOpen','fetchMissingChangesets','/role','listCollaborators','_imageSourceCache','retryConnectingTimer','_startTelemetryCollaborationNewChangeset','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','_onFetchMissResult','onTransformState','ONLINE','_transformIMECache','_pendingMutations','UNIVER_BOARD','_exhaustRemoteChangesetQueue','call','updatePermissionObjEvent','interceptor','&source=','onCommentUpdate','_entityInit$','_change$','toggleOnline','SUCCUSS','onRemoteRej','_HTTPService','/collaborator','_removeRoom','startTime','UnitEmbedded','getSnapshotAPIPath','maxSize','data','USERS_LEAVE','awaitingChangeset','rev','reconnect','_emitMembers','fromCollab','_acknowledgedAwaitingRevision','type','changeset','_clearTimeoutTimer','_commandService','_transformStateCache','loginUrlKey','delete','_changesetReqId','_snapshotServerService','joinEvent','[CollaborationSession]','range','_memberService','_localeService','_eventService','_waitForHeartbeatResponse','sessionStatus$','_roomCreated$','stringify','complete','string','method','[SyncedState]:\x20received\x20rejection.','isPermissionRej','missingChangesets','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','getImage','infoRsp','RETRY_CONNECTING_MAX_COUNT','BASE64','_compressMutationService','[OfflineState]:\x20received\x20rejection.','disposeWithMe','onRemoteAck','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','_throwTelemetryCollaborationNewChangeset','/universer-api/stream/file/upload','_revisionService','objectType','getInterceptPoints','iterator','unit','startsWith','object','PERSON','\x0aAfter:\x20','LEAVE','People','_clearCollaborationTimeoutTimer','collaMsg','ERROR_IMAGE_TYPE','updateOfflineData','getConfig','unsubscribe','newCsEvent','_socketMessageSubscription','endpointKey','onMissedChangesetFetched','onTransformRemoteChangesetByStateCache','193fVfjOC','reduce','saveSnapshot','catch','onTransformIME','CHANGESET_ACK','refreshPermission','_networkConditionService','onMutationExecutedForCollab','state','memberID','_transformService','collaboration-client.config','getWorkbookSelections','editingUnit','getCollabEntity','_getRedoStack','collaboration_new_changeset','_undoRedoService','_unitLoaded$','disableLocalCache','_onMessage','getSheetId','[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.','CHANGESET_REJ','_syncEditingCollabCursor','_identity','_snapshotService','_roomMembers','_substituteUndoStack','retryCount','_onConnectionFailed','_initRequestHeader','2651884vOsnkv','7051384qYhQyW','_sendingTimer','snapshotServerUrl','version','[CollaborationSessionService]','[CollaborationEntity]','_onRecvEvent','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','_collaborationSessionService','_collaborationTimeoutTimer','toPrimitive','authzUrl','subUnitId','_executeRemoteChangeset','_sessions','collabSubmitChangesetUrl','appendMutation','socketService','_onRemoteRejected','?size=','[SyncedState]:\x20received\x20acknowledgement.','socket$','readAsDataURL','_localCacheService','hostname','JOIN','_getDownloadEndpointURL','socketReady','_replayCachedMutations','getDeserializedSheetBlock','change$','getAllMembers','AWAITING_WITH_PENDING','CONFLICT','m2Prime','sheets','_createSession','JOIN_ROOM_FAILED','put','originalMeta','blockRanges','submit\x20changeset\x20error!','_members','onTransformRemoteChangesetByIMECache','_awaitingChangeset','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','sendChangesetTimeout','_commentUpdate$','SNAPSHOT_URL_KEY','_onRemoteRetry','roles','init','_checkMissing','_commentService','deepClone','UNISCRIPT_RUN','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','_transitionLocked','[PendingState]:\x20unhandled\x20univer\x20type:\x20','[PendingState]:\x20received\x20rejection.','_unitInfo$','_clearRetryConnectingTimer','/universer-api/comb','_remoteChangesetQueue','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','roomInfos','length','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','retryConnectingInterval','_submitChangeset','/block/','isArray','_injector','awaiting','createSocket','fetchThroughInterceptors','_doCreateSocket','csRejEvent','_logService','closeSession','c2Prime','unitInfo$','getTypeOfUnitDisposed$','setCfgEnableObjInherit','fetching\x20missing\x20changesets\x20from\x20','next','eventID','PERMISSION_DENIED','_getAPIPrefixPath','update','_schedule','now','NO_OTHER_CLIENTS_EDITING','\x20in\x20_schedule.','params','copyFileMeta','candidateSocket','__Key__','registerHTTPInterceptor','MUTATION','target','[DataLoaderService]','UUID','JOINING','_transformSelections','actions','connection\x20error','SUBMIT_CHANGESET','/universer-api/authz','override','_resolveSessionIdentity','PSEUDO_FETCH_MISSING_RESULT','list','unknown','setWaitCount','_getUploadFileURL','putCollaborators','slice','debug','backupOfflineData','HEARTBEAT_INTERVAL','2802170dplRZo','_singleActiveUnitService','getSheetBlock','includes','leaveEvent','subject','awaiting_with_pending','body','USERS_ENTER','UNIVER_COLLABORATION_CLIENT_PLUGIN','collabWebSocketUrl','location','SOCKET_FAILED','commentUpdate$','getImageSourceCache','_getCtorByUniverInstanceType','[FetchMissState]','_onUserJoin','_applyRemoteChangeset','updatePermissionPoint','[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!','transformChangesets','getMember','_adapter','resolve','from','symbol','routeKey','enableOfflineEditing','socketMessageSubscription','[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.','_pendingSessions','LIVESHARE_REQUEST_HOST','then','localUnitId','COMMENT_UPDATE','map','dispose$','entries','socket\x20close','_onUserLeave','toString','docStateChange$','floor','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','loadUnitOfRevision','FETCH_MISSING','_sender','_handlerCallback','sort','status'];_0x2699=function(){return _0x10921d;};return _0x2699();}import{CommandType as _0x459936,DependentOn as _0x448075,Disposable as _0x5af3d8,DisposableCollection as _0x38ef99,IAuthzIoService as _0x15b06a,ICommandService as _0xdb365f,IConfigService as _0x39e8ee,IContextService as _0x52f7ed,IImageIoService as _0x3360d2,ILogService as _0x3efc4d,IMentionIOService as _0x174385,IPermissionService as _0x5a8b72,IUndoRedoService as _0x3ec71c,IUniverInstanceService as _0x4a3eaa,ImageSourceType as _0x14dae6,ImageUploadStatusType as _0x9e94a,Inject as _0x17057e,Injector as _0x346ad7,JSONX as _0x1a46f0,LocalUndoRedoService as _0x2600d3,LocaleService as _0xc4a55f,MentionType as _0x117e44,Optional as _0x48242e,Plugin as _0xd08f3f,Quantity as _0x39c84c,Rectangle as _0x1155df,RxDisposable as _0x57b019,Tools as _0x26ff2b,UniverInstanceType as _0x51bdab,UserManagerService as _0x5dc14f,Workbook as _0x3f5b28,createIdentifier as _0x3a76ad,generateRandomId as _0x1f7675,isInternalEditorID as _0xfbb9de,merge as _0x3cc59d,mergeOverrideWithDependencies as _0x4eac85,registerDependencies as _0x29b435,resolveWithBasePath as _0x52c301,sequenceExecute as _0x31dabd,toDisposable as _0x28ef5c,touchDependencies as _0xa3b29f}from'@univerjs/core';import{DocStateChangeManagerService as _0x16ea30,RichTextEditingMutation as _0x520df5}from'@univerjs/docs';import{InsertSheetMutation as _0x5d986e,SetSelectionsOperation as _0xacf3a9,SheetPermissionInitController as _0x541c12,SheetsSelectionsService as _0x5ca689,WorkbookEditablePermission as _0x424e79}from'@univerjs/sheets';import{BehaviorSubject as _0xdf7e62,ReplaySubject as _0x308a5d,Subject as _0x4301b4,concatMap as _0x36b238,firstValueFrom as _0x1f8387,map as _0x374338,merge as _0x123d67,of as _0x2031cc,shareReplay as _0x5a2c81,take as _0x2d16fe,takeUntil as _0x1a7089}from'rxjs';import{CmdRspCode as _0x2b2822,CombCmd as _0x6e704b,ErrorCode as _0x9d8468,FileSource as _0x254240}from'@univerjs/protocol';import{ITelemetryService as _0x2b2645}from'@univerjs/telemetry';import{delay as _0xb401f1,filter as _0x2cbad7,map as _0x12aa0e,take as _0x411165,takeUntil as _0x1c3f84}from'rxjs/operators';import{AddSlidePageMutation as _0xa104c5,EnsureSlideMasterPageMutation as _0x3a316a,MoveSlidePageMutation as _0x458bda,RemoveSlidePageMutation as _0x5bb114}from'@univerjs-pro/slides';import{HTTPRequest as _0x34760a,HTTPService as _0x340ce5,ISocketService as _0x12b950,MergeInterceptorFactory as _0x3bb06f,ThresholdInterceptorFactory as _0x16d444,UniverNetworkPlugin as _0x113f06}from'@univerjs/network';import{UniverLicensePlugin as _0x2b8da7,getGlobalObject as _0x12bc02}from'@univerjs-pro/license';import{cbc as _0x52616c}from'@noble/ciphers/aes.js';import{concatBytes as _0x33086b,randomBytes as _0x1fc815,utf8ToBytes as _0x47a29a}from'@noble/ciphers/utils.js';import{DRAWING_IMAGE_ALLOW_IMAGE_LIST as _0xf74efc,getDrawingImageAllowSize as _0x236ef3}from'@univerjs/drawing';const R='collaboration-client.config',ft={},pt=_0x2e02fc(0x2fb),mt=_0x2e02fc(0x2b9),ht='HEARTBEAT_INTERVAL',gt=_0x2e02fc(0x21e),_t=_0x2e02fc(0xca),vt=_0x2e02fc(0x2aa),yt=0x3e8,bt=_0x2e02fc(0x112),xt='/universer-api/uniscript';function St(_0x50ebac){const _0x2bed7f=_0x2e02fc;return JSON[_0x2bed7f(0xc0)](_0x50ebac)[_0x2bed7f(0x14d)];}function Ct(_0x2e2a15){'@babel/helpers - typeof';const _0x4e3b31=_0x2e02fc;return Ct=typeof Symbol==_0x4e3b31(0x233)&&typeof Symbol[_0x4e3b31(0xd6)]==_0x4e3b31(0x19e)?function(_0x3972cb){return typeof _0x3972cb;}:function(_0x29da95){const _0x37a720=_0x4e3b31;return _0x29da95&&typeof Symbol==_0x37a720(0x233)&&_0x29da95[_0x37a720(0x1f0)]===Symbol&&_0x29da95!==Symbol[_0x37a720(0x30f)]?'symbol':typeof _0x29da95;},Ct(_0x2e2a15);}function wt(_0x3f85c8,_0x4bf8c0){const _0x49b8ff=_0x2e02fc;if(Ct(_0x3f85c8)!=_0x49b8ff(0xd9)||!_0x3f85c8)return _0x3f85c8;var _0x2615f6=_0x3f85c8[Symbol[_0x49b8ff(0x115)]];if(_0x2615f6!==void 0x0){var _0x28b9bf=_0x2615f6['call'](_0x3f85c8,_0x4bf8c0||'default');if(Ct(_0x28b9bf)!=_0x49b8ff(0xd9))return _0x28b9bf;throw TypeError(_0x49b8ff(0x26c));}return(_0x4bf8c0==='string'?String:Number)(_0x3f85c8);}function Tt(_0x234ff3){const _0x2d3a51=_0x2e02fc;var _0x2673ae=wt(_0x234ff3,_0x2d3a51(0xc2));return Ct(_0x2673ae)=='symbol'?_0x2673ae:_0x2673ae+'';}function z(_0x355053,_0x5afa4a,_0x3d56c1){const _0x34192c=_0x2e02fc;return(_0x5afa4a=Tt(_0x5afa4a))in _0x355053?Object[_0x34192c(0x227)](_0x355053,_0x5afa4a,{'value':_0x3d56c1,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x355053[_0x5afa4a]=_0x3d56c1,_0x355053;}let Et=function(_0x62b7c2){const _0x243520=_0x2e02fc;return _0x62b7c2['OTHER_CLIENT_EDITING']=_0x243520(0x2e0),_0x62b7c2[_0x243520(0x162)]='PERMISSION_DENIED',_0x62b7c2['CONFLICT']='CONFLICT',_0x62b7c2[_0x243520(0x256)]=_0x243520(0x256),_0x62b7c2['JOIN_ROOM_FAILED']=_0x243520(0x130),_0x62b7c2[_0x243520(0x2e6)]='SOCKET_FAILED_RETRY',_0x62b7c2['SOCKET_FAILED']=_0x243520(0x190),_0x62b7c2[_0x243520(0x243)]=_0x243520(0x243),_0x62b7c2;}({});var B=class{constructor(){const _0x17dc7e=_0x2e02fc;z(this,'_event$',new _0x4301b4()),z(this,_0x17dc7e(0x83),this['_event$'][_0x17dc7e(0x1d9)]());}['emitEvent'](_0x3eb4e1){const _0x11afd1=_0x2e02fc;this[_0x11afd1(0x314)][_0x11afd1(0x160)](_0x3eb4e1);}},Dt=class{constructor(){const _0x473f8d=_0x2e02fc;z(this,_0x473f8d(0x13a),new _0x4301b4()),z(this,_0x473f8d(0x191),this[_0x473f8d(0x13a)][_0x473f8d(0x1d9)]());}[_0x2e02fc(0x99)](_0x12ed87){const _0x630ead=_0x2e02fc;this[_0x630ead(0x13a)][_0x630ead(0x160)](_0x12ed87);}};function V(_0x49e5f8,_0x4b0901){return function(_0x5f8f06,_0x354cde){_0x4b0901(_0x5f8f06,_0x354cde,_0x49e5f8);};}function H(_0x1ededa,_0xe2901f,_0x42aaea,_0x356eb0){const _0x19ed33=_0x2e02fc;var _0x131c11=arguments[_0x19ed33(0x14d)],_0x1f7ee5=_0x131c11<0x3?_0xe2901f:_0x356eb0===null?_0x356eb0=Object['getOwnPropertyDescriptor'](_0xe2901f,_0x42aaea):_0x356eb0,_0x43ac86;if(typeof Reflect==_0x19ed33(0xd9)&&typeof Reflect[_0x19ed33(0x231)]=='function')_0x1f7ee5=Reflect['decorate'](_0x1ededa,_0xe2901f,_0x42aaea,_0x356eb0);else{for(var _0x4aea2a=_0x1ededa[_0x19ed33(0x14d)]-0x1;_0x4aea2a>=0x0;_0x4aea2a--)(_0x43ac86=_0x1ededa[_0x4aea2a])&&(_0x1f7ee5=(_0x131c11<0x3?_0x43ac86(_0x1f7ee5):_0x131c11>0x3?_0x43ac86(_0xe2901f,_0x42aaea,_0x1f7ee5):_0x43ac86(_0xe2901f,_0x42aaea))||_0x1f7ee5);}return _0x131c11>0x3&&_0x1f7ee5&&Object[_0x19ed33(0x227)](_0xe2901f,_0x42aaea,_0x1f7ee5),_0x1f7ee5;}let Ot=class extends _0x5af3d8{constructor(_0x3309b7){const _0x52ce3a=_0x2e02fc;super(),this[_0x52ce3a(0x2eb)]=_0x3309b7,z(this,_0x52ce3a(0x105),new Map()),z(this,_0x52ce3a(0xbf),new _0x4301b4()),this['disposeWithMe'](_0x123d67(this[_0x52ce3a(0x2eb)][_0x52ce3a(0x15d)](_0x51bdab[_0x52ce3a(0x266)])[_0x52ce3a(0x31f)](_0x12aa0e(_0x3bc861=>_0x3bc861['getUnitId']())),this[_0x52ce3a(0x2eb)]['getTypeOfUnitDisposed$'](_0x51bdab[_0x52ce3a(0x312)])[_0x52ce3a(0x31f)](_0x12aa0e(_0x3177f0=>_0x3177f0['getUnitId']())),this[_0x52ce3a(0x2eb)][_0x52ce3a(0x15d)](_0x51bdab[_0x52ce3a(0x93)])[_0x52ce3a(0x31f)](_0x12aa0e(_0x303046=>_0x303046['getUnitId']())),this[_0x52ce3a(0x2eb)][_0x52ce3a(0x15d)](_0x51bdab[_0x52ce3a(0x1c0)])[_0x52ce3a(0x31f)](_0x12aa0e(_0x4656ec=>_0x4656ec[_0x52ce3a(0x2a9)]())))[_0x52ce3a(0x222)](_0x38e503=>this[_0x52ce3a(0xa1)](_0x38e503)));}[_0x2e02fc(0x2a5)](_0x5f3e8c){const _0x3e9530=_0x2e02fc;return this[_0x3e9530(0x105)]['has'](_0x5f3e8c)?_0x2031cc(this[_0x3e9530(0x105)][_0x3e9530(0x241)](_0x5f3e8c)):this['_roomCreated$'][_0x3e9530(0x31f)](_0x12aa0e(_0x26b99b=>{const _0x13b648=_0x3e9530;if(_0x26b99b===_0x5f3e8c)return this['_roomMembers'][_0x13b648(0x241)](_0x26b99b);}));}[_0x2e02fc(0x282)](_0x5ac5cb,_0x14259a){const _0x3ad34e=_0x2e02fc;let _0x3c0fa3=this[_0x3ad34e(0x105)][_0x3ad34e(0x241)](_0x5ac5cb);_0x3c0fa3||(_0x3c0fa3=new kt(),this['_roomMembers'][_0x3ad34e(0x2e9)](_0x5ac5cb,_0x3c0fa3),this[_0x3ad34e(0xbf)][_0x3ad34e(0x160)](_0x5ac5cb)),_0x3c0fa3[_0x3ad34e(0x282)](_0x14259a);}[_0x2e02fc(0x2a2)](_0x581469,_0x1312a5){const _0x243892=_0x2e02fc;let _0x1cd654=this['_roomMembers'][_0x243892(0x241)](_0x581469);_0x1cd654&&_0x1cd654[_0x243892(0x2a2)](_0x1312a5);}[_0x2e02fc(0x2df)](_0x415364){const _0x11a1d4=_0x2e02fc;return this['_roomMembers'][_0x11a1d4(0x241)](_0x415364);}[_0x2e02fc(0x19a)](_0x52a871,_0x2164a9){const _0x53eaea=_0x2e02fc;let _0x348b78=this[_0x53eaea(0x105)]['get'](_0x52a871);if(_0x348b78)return _0x348b78[_0x53eaea(0x19a)](_0x2164a9);}['_removeRoom'](_0x20add5){const _0x40e2a9=_0x2e02fc;let _0x408476=this[_0x40e2a9(0x105)][_0x40e2a9(0x241)](_0x20add5);_0x408476&&(_0x408476[_0x40e2a9(0x259)](),this['_roomMembers']['delete'](_0x20add5));}[_0x2e02fc(0x259)](){const _0x219cdb=_0x2e02fc;this[_0x219cdb(0x105)][_0x219cdb(0x1c7)](_0x309371=>_0x309371['dispose']()),this[_0x219cdb(0x105)][_0x219cdb(0x303)](),this[_0x219cdb(0xbf)][_0x219cdb(0xc1)]();}};Ot=H([V(0x0,_0x4a3eaa)],Ot);var kt=class extends _0x5af3d8{constructor(..._0x4d8721){const _0x22ee25=_0x2e02fc;super(..._0x4d8721),z(this,_0x22ee25(0x135),new Map()),z(this,_0x22ee25(0x28a),new _0xdf7e62(this['_members'])),z(this,_0x22ee25(0x1e6),this[_0x22ee25(0x28a)]['asObservable']());}[_0x2e02fc(0x259)](){const _0x3af947=_0x2e02fc;this['_members'][_0x3af947(0x303)](),this[_0x3af947(0x28a)][_0x3af947(0xc1)]();}['updateMember'](_0x290e28){const _0x1a17d1=_0x2e02fc;this[_0x1a17d1(0x135)][_0x1a17d1(0x2e9)](_0x290e28[_0x1a17d1(0xf3)],_0x290e28),this[_0x1a17d1(0xab)]();}['removeMember'](_0x15b98c){const _0x34b691=_0x2e02fc;this['_members'][_0x34b691(0xb4)](_0x15b98c),this[_0x34b691(0xab)]();}['getMember'](_0x4da2ce){const _0x3a769e=_0x2e02fc;return this[_0x3a769e(0x135)][_0x3a769e(0x241)](_0x4da2ce);}[_0x2e02fc(0x12a)](){const _0x2caf64=_0x2e02fc;return Array[_0x2caf64(0x19d)](this['_members'][_0x2caf64(0x2c3)]());}['_emitMembers'](){const _0x1bec65=_0x2e02fc;this[_0x1bec65(0x28a)][_0x1bec65(0x160)](this[_0x1bec65(0x135)]);}};function At(_0x26b5c6,_0x5f07c0){const _0x3a96b4=_0x2e02fc;if(Mt(_0x26b5c6))return _0x5f07c0;if(_0x5f07c0['eventID']===_0x150d16[_0x3a96b4(0x176)]){let _0x336afb=Lt(_0x26b5c6),_0x2a12e2=_0x5f07c0;return{..._0x2a12e2,'data':{..._0x2a12e2[_0x3a96b4(0xa6)],'unitID':_0x26b5c6[_0x3a96b4(0x16f)][_0x3a96b4(0x299)],'unitType':_0x26b5c6['target'][_0x3a96b4(0x297)]??_0x2a12e2['data']['unitType'],'changeset':_0x336afb[_0x3a96b4(0x290)](_0x2a12e2[_0x3a96b4(0xa6)][_0x3a96b4(0xaf)],Rt(_0x26b5c6))}};}if(_0x5f07c0[_0x3a96b4(0x161)]===_0x150d16[_0x3a96b4(0x1b2)]){let _0x20cc93=_0x5f07c0;return{..._0x20cc93,'data':{..._0x20cc93['data'],'unitID':_0x26b5c6[_0x3a96b4(0x16f)][_0x3a96b4(0x299)],'unitType':_0x26b5c6[_0x3a96b4(0x16f)][_0x3a96b4(0x297)]??_0x20cc93['data']['unitType']}};}return _0x5f07c0;}function jt(_0x323b23,_0x71616a){const _0xce8e41=_0x2e02fc;if(Mt(_0x323b23))return[_0x71616a];switch(_0x71616a[_0xce8e41(0x161)]){case _0x150d16[_0xce8e41(0x1ef)]:return[Nt(_0x323b23,_0x71616a)];case _0x150d16[_0xce8e41(0x17a)]:return[Ft(_0x323b23,_0x71616a)];case _0x150d16[_0xce8e41(0x2a3)]:return[Pt(_0x323b23,_0x71616a)];default:return[_0x71616a];}}function Mt(_0x1d011d){const _0x18bd7c=_0x2e02fc;return _0x1d011d[_0x18bd7c(0x16f)][_0x18bd7c(0x2d3)]==null&&_0x1d011d[_0x18bd7c(0x16f)][_0x18bd7c(0x299)]===_0x1d011d[_0x18bd7c(0x1a6)]&&!_0x1d011d['changeset'];}function Nt(_0x4edeb7,_0x317cb3){const _0x373acd=_0x2e02fc;return{..._0x317cb3,'data':_0xe3775b(It(_0x4edeb7,_0x93473e(_0x317cb3[_0x373acd(0xa6)])))};}function Pt(_0x1fdb5a,_0x591350){const _0xd0cad6=_0x2e02fc;return{..._0x591350,'data':It(_0x1fdb5a,_0x591350[_0xd0cad6(0xa6)])};}function Ft(_0x473f5a,_0x399e1b){const _0xa6ad28=_0x2e02fc;let _0x39a621=_0x399e1b[_0xa6ad28(0xa6)];return{..._0x399e1b,'data':{..._0x39a621,'changesets':_0x39a621[_0xa6ad28(0x322)][_0xa6ad28(0x1a8)](_0x4e5b9e=>_0xe3775b(It(_0x473f5a,_0x93473e(_0x4e5b9e))))}};}function It(_0x178bd2,_0x791029){const _0x3a1bf0=_0x2e02fc;return Lt(_0x178bd2)[_0x3a1bf0(0x1ea)](_0x791029,Rt(_0x178bd2));}function Lt(_0x46443d){const _0x684353=_0x2e02fc;if(!_0x46443d[_0x684353(0xaf)])throw Error(_0x684353(0x285));return _0x46443d[_0x684353(0xaf)];}function Rt(_0x2f8c22){const _0x200526=_0x2e02fc;return{'localUnitId':_0x2f8c22[_0x200526(0x1a6)],'unitType':_0x2f8c22[_0x200526(0x297)],'target':_0x2f8c22[_0x200526(0x16f)]};}let zt=function(_0x1b2816){const _0x499592=_0x2e02fc;return _0x1b2816[_0x1b2816[_0x499592(0x2b6)]=0x0]=_0x499592(0x2b6),_0x1b2816[_0x1b2816[_0x499592(0x172)]=0x1]='JOINING',_0x1b2816[_0x1b2816[_0x499592(0x272)]=0x2]=_0x499592(0x272),_0x1b2816[_0x1b2816[_0x499592(0x90)]=0x3]='ONLINE',_0x1b2816;}({});const Bt={[_0x2b2822[_0x2e02fc(0x28b)]]:_0x2e02fc(0x328),[_0x2b2822[_0x2e02fc(0x311)]]:'session.room-full',[_0x2b2822[_0x2e02fc(0x2bb)]]:'session.room-not-exists',[_0x2b2822['JOIN_ROOM_PERMISSION_DENIED']]:_0x2e02fc(0x31d),[_0x2b2822[_0x2e02fc(0x1d7)]]:_0x2e02fc(0x2b2)};let Vt=class extends _0x57b019{get['sessionStatus'](){const _0x2f2d5b=_0x2e02fc;return this[_0x2f2d5b(0x29c)][_0x2f2d5b(0x279)]();}constructor(_0x1e9b10,_0x399704,_0x589d21,_0x11d6e4,_0x25688b,_0x56cc3d,_0x3eb06c,_0xeb1bd7){const _0x2904cc=_0x2e02fc;super(),this[_0x2904cc(0x103)]=_0x1e9b10,this[_0x2904cc(0x159)]=_0x589d21,this[_0x2904cc(0x24e)]=_0x11d6e4,this['_memberService']=_0x25688b,this[_0x2904cc(0x140)]=_0x56cc3d,this[_0x2904cc(0x23c)]=_0x3eb06c,this['_telemetryService']=_0xeb1bd7,z(this,'_sessionStatus$',new _0xdf7e62(0x0)),z(this,_0x2904cc(0xbe),this['_sessionStatus$'][_0x2904cc(0x1d9)]()),z(this,_0x2904cc(0x314),new _0x4301b4()),z(this,_0x2904cc(0x83),this[_0x2904cc(0x314)][_0x2904cc(0x1d9)]()),z(this,'_socket',void 0x0),z(this,_0x2904cc(0xe5),void 0x0),z(this,'_collaborationTimeoutTimer',void 0x0),z(this,_0x2904cc(0x327),!0x1),z(this,_0x2904cc(0x1dc),null),this[_0x2904cc(0x327)]=!!this[_0x2904cc(0x301)],_0x399704['pipe'](_0x1a7089(this[_0x2904cc(0x1a9)]))[_0x2904cc(0x222)](_0x2bc18c=>{const _0x461ffd=_0x2904cc;if(_0x2bc18c!==void 0x0){if(this[_0x461ffd(0x278)]=_0x2bc18c,_0x2bc18c)this[_0x461ffd(0x30d)](_0x2bc18c),this[_0x461ffd(0xe5)]=_0x2bc18c[_0x461ffd(0x2a7)][_0x461ffd(0x222)](_0x96aef6=>{const _0x55b5cf=_0x461ffd;_0x96aef6['routeKey']===this[_0x55b5cf(0x103)]['target'][_0x55b5cf(0x299)]&&this[_0x55b5cf(0x257)](_0x96aef6);});else{var _0x3dcc08;this[_0x461ffd(0xd1)](),this[_0x461ffd(0x29c)][_0x461ffd(0x160)](0x2),(_0x3dcc08=this[_0x461ffd(0xe5)])==null||_0x3dcc08[_0x461ffd(0xe3)](),this[_0x461ffd(0xe5)]=null;}}});}['getMemberID'](){const _0x579175=_0x2e02fc;var _0x27c048;return((_0x27c048=this[_0x579175(0x278)])==null?void 0x0:_0x27c048[_0x579175(0xf3)])??null;}[_0x2e02fc(0x259)](){const _0x286779=_0x2e02fc;super['dispose'](),this[_0x286779(0x28d)](),this['dispose$'][_0x286779(0x160)](),this['dispose$'][_0x286779(0xc1)]();}['close'](){const _0x2221d3=_0x2e02fc;var _0x4024e7;this[_0x2221d3(0xd1)](),(_0x4024e7=this[_0x2221d3(0x278)])==null||_0x4024e7[_0x2221d3(0x1fc)]({'cmd':_0x6e704b[_0x2221d3(0xdc)],'data':{'roomID':this[_0x2221d3(0x103)][_0x2221d3(0x16f)][_0x2221d3(0x299)]}}),this[_0x2221d3(0x314)]['complete'](),this['_sessionStatus$'][_0x2221d3(0xc1)]();}['_onCombEvent'](_0x1334e8){const _0x103eb5=_0x2e02fc;_0x1334e8[_0x103eb5(0x2d6)]===_0x6e704b['JOIN']?this['_onJoinRoomEvent'](_0x1334e8):_0x1334e8[_0x103eb5(0x2d6)]===_0x6e704b[_0x103eb5(0x2a6)]&&this[_0x103eb5(0x111)](_0x1334e8);}[_0x2e02fc(0x30d)](_0x4e7045){const _0x20ae5b=_0x2e02fc;this[_0x20ae5b(0x29c)][_0x20ae5b(0x160)](0x1),_0x4e7045[_0x20ae5b(0x1fc)]({'cmd':_0x6e704b[_0x20ae5b(0x124)],'routeKey':this[_0x20ae5b(0x103)][_0x20ae5b(0x16f)][_0x20ae5b(0x299)],'routeType':'','data':{'rooms':[{'roomID':this[_0x20ae5b(0x103)]['target']['unitId']}]}});}[_0x2e02fc(0x208)](_0x33f199){const _0x1126de=_0x2e02fc;var _0x5c381e;if(_0x33f199['code']in Bt){this[_0x1126de(0x23c)]['emitEvent']({'id':'JOIN_ROOM_FAILED','data':Bt[_0x33f199[_0x1126de(0x22a)]]}),this[_0x1126de(0x29c)][_0x1126de(0x160)](0x2);return;}this['_sessionStatus$'][_0x1126de(0x160)](0x3);let _0x5d2fa0=(_0x5c381e=_0x33f199[_0x1126de(0xa6)][_0x1126de(0x14c)][this[_0x1126de(0x103)][_0x1126de(0x16f)][_0x1126de(0x299)]])==null?void 0x0:_0x5c381e[_0x1126de(0x24c)];_0x5d2fa0&&_0x5d2fa0[_0x1126de(0x1c7)](_0x50e2aa=>this[_0x1126de(0xba)][_0x1126de(0x282)](this[_0x1126de(0x103)][_0x1126de(0x1a6)],_0x50e2aa));}[_0x2e02fc(0x111)](_0x5312e9){const _0x2adfd7=_0x2e02fc;try{let _0x50bad9=jt(this[_0x2adfd7(0x103)],_0x5312e9[_0x2adfd7(0xa6)]);for(let _0x3f5839 of _0x50bad9)switch(_0x3f5839[_0x2adfd7(0x161)]){case _0x150d16['USERS_ENTER']:this[_0x2adfd7(0x195)](_0x3f5839),this[_0x2adfd7(0x314)][_0x2adfd7(0x160)](_0x3f5839);break;case _0x150d16[_0x2adfd7(0xa7)]:this['_onUserLeave'](_0x3f5839),this[_0x2adfd7(0x314)][_0x2adfd7(0x160)](_0x3f5839);break;case _0x150d16[_0x2adfd7(0xee)]:case _0x150d16[_0x2adfd7(0x2a3)]:this[_0x2adfd7(0x1ee)](),this[_0x2adfd7(0xde)](),this['_event$'][_0x2adfd7(0x160)](_0x3f5839);break;case _0x150d16[_0x2adfd7(0x1bb)]:this[_0x2adfd7(0x159)][_0x2adfd7(0x2cd)](_0x2adfd7(0x296)+JSON[_0x2adfd7(0xc0)](_0x3f5839)),this[_0x2adfd7(0x314)][_0x2adfd7(0x160)](_0x3f5839);break;case _0x150d16[_0x2adfd7(0x1a7)]:this[_0x2adfd7(0x140)][_0x2adfd7(0x99)](_0x3f5839[_0x2adfd7(0xa6)]),this[_0x2adfd7(0x314)][_0x2adfd7(0x160)](_0x3f5839);break;default:this['_event$'][_0x2adfd7(0x160)](_0x3f5839);}}catch(_0x2c5d6b){this[_0x2adfd7(0x159)][_0x2adfd7(0x2cd)](_0x2c5d6b,_0x5312e9);}}[_0x2e02fc(0x195)](_0x58ff25){const _0x53252d=_0x2e02fc;this[_0x53252d(0xba)][_0x53252d(0x282)](this['_identity'][_0x53252d(0x1a6)],_0x58ff25['data']);}[_0x2e02fc(0x1ac)](_0x256968){const _0xfd5619=_0x2e02fc;this[_0xfd5619(0xba)]['removeMember'](this['_identity'][_0xfd5619(0x1a6)],_0x256968[_0xfd5619(0xa6)]['memberID']);}async[_0x2e02fc(0x1fc)](_0x13b498,_0x1601c7){const _0x5bdc90=_0x2e02fc;if(this[_0x5bdc90(0x265)]!==0x3||!this[_0x5bdc90(0x278)])throw Error(_0x5bdc90(0x2e1));try{let _0x2725bd=At(this[_0x5bdc90(0x103)],_0x13b498);_0x2725bd['eventID']===_0x150d16[_0x5bdc90(0x176)]&&(this[_0x5bdc90(0x31b)](),this['_startTelemetryCollaborationNewChangeset'](_0x2725bd)),this[_0x5bdc90(0x278)][_0x5bdc90(0x1fc)]({'cmd':_0x6e704b[_0x5bdc90(0x7f)],'routeKey':this[_0x5bdc90(0x103)][_0x5bdc90(0x16f)][_0x5bdc90(0x299)],'routeType':'','data':_0x2725bd});}catch(_0x38a29f){this[_0x5bdc90(0x159)][_0x5bdc90(0x2cd)](_0x38a29f);}}['_scheduleCollaborationTimeoutTimer'](){const _0x7a924a=_0x2e02fc;this[_0x7a924a(0x114)]=setTimeout(()=>{const _0x5055c8=_0x7a924a;this[_0x5055c8(0x114)]=null,this[_0x5055c8(0x23c)][_0x5055c8(0x1ba)]({'id':_0x5055c8(0x243)});},this['_configService'][_0x7a924a(0xe2)](_0x7a924a(0x21e))??0x4e20);}[_0x2e02fc(0xde)](){const _0x53d0e5=_0x2e02fc;this['_collaborationTimeoutTimer']&&=(clearTimeout(this[_0x53d0e5(0x114)]),null);}[_0x2e02fc(0x8c)](_0x3df41f){const _0x1a9722=_0x2e02fc;if(!this[_0x1a9722(0x327)])return;let {data:_0x2a6094}=_0x3df41f,{unitID:_0x4406f8,changeset:_0x174a38}=_0x2a6094,{mutations:_0x4f99fd,type:_0x2e47b9}=_0x174a38;this[_0x1a9722(0x1dc)]={'unitId':_0x4406f8,'type':_0x2e47b9,'startTime':performance[_0x1a9722(0x166)](),'stopTime':0x0,'duration':0x0,'size':St(_0x4f99fd)};}['_stopTelemetryCollaborationNewChangeset'](){const _0xc0012c=_0x2e02fc;if(this[_0xc0012c(0x327)]){if(!this['_telemetryInfo']){this[_0xc0012c(0x159)][_0xc0012c(0x2cd)](_0xc0012c(0xb8),_0xc0012c(0x2e7));return;}this[_0xc0012c(0x1dc)][_0xc0012c(0x2db)]=performance[_0xc0012c(0x166)](),this[_0xc0012c(0x1dc)][_0xc0012c(0x25a)]=this[_0xc0012c(0x1dc)][_0xc0012c(0x2db)]-this[_0xc0012c(0x1dc)][_0xc0012c(0xa2)],this[_0xc0012c(0x301)][_0xc0012c(0x2f0)](_0xc0012c(0xfa),this[_0xc0012c(0x1dc)]),this[_0xc0012c(0x1dc)]=null;}}[_0x2e02fc(0xd1)](){const _0x460d8f=_0x2e02fc;this[_0x460d8f(0x1dc)]=null;}};Vt=H([V(0x2,_0x3efc4d),V(0x3,_0x39e8ee),V(0x4,_0x17057e(Ot)),V(0x5,_0x17057e(Dt)),V(0x6,_0x17057e(B)),V(0x7,_0x48242e(_0x2b2645))],Vt);const U=_0x3a76ad(_0x2e02fc(0x2f8));function Ht(_0x3b2cb3){const _0x1b3a9f=_0x2e02fc;return _0x1b3a9f(0x2d5)+_0x3b2cb3;}function Ut(_0x5784a7){const _0x5a795e=_0x2e02fc;let {unitID:_0x10c9a2,mutations:_0xe8a80c}=_0x5784a7;return{'unitId':_0x10c9a2,'subUnitId':_0xe8a80c[_0x5a795e(0x14d)]>0x0?_0xe8a80c[0x0][_0x5a795e(0x169)][_0x5a795e(0x117)]:null};}let Wt=class{constructor(_0x23fda1,_0x37c992,_0x2a8026){const _0x29dac9=_0x2e02fc;this[_0x29dac9(0x153)]=_0x23fda1,this[_0x29dac9(0xf4)]=_0x37c992,this[_0x29dac9(0x2dc)]=_0x2a8026;}[_0x2e02fc(0x2e2)](_0x57c622){const _0x50e478=_0x2e02fc;var _0x38863b,_0x2efbd5;let _0x334ba9=this[_0x50e478(0x153)]['get'](_0x5ca689),{unitId:_0x14b51e,subUnitId:_0x2cdc23}=Ut(_0x57c622),_0x3a6f8f=_0x334ba9==null?void 0x0:_0x334ba9[_0x50e478(0xf6)](_0x14b51e)[_0x50e478(0x1cf)](),_0x68402c=(_0x38863b=this[_0x50e478(0x2dc)]['getUnit'](_0x14b51e))==null||(_0x38863b=_0x38863b['getActiveSheet']())==null?void 0x0:_0x38863b[_0x50e478(0xff)]();if(_0x3a6f8f[_0x50e478(0x14d)]===0x0||!_0x14b51e||!_0x2cdc23)return;let _0x3fe282=[{'id':_0xacf3a9['id'],'params':{'unitId':_0x14b51e,'subUnitId':_0x68402c,'selections':_0x26ff2b[_0x50e478(0x141)](_0x3a6f8f)}}],_0x4f7baf=this['_transformService'][_0x50e478(0x21d)](_0x57c622,_0x3fe282);if(!_0x2eee33(_0x4f7baf))throw _0x4f7baf[_0x50e478(0x2cd)];let _0x4553b5=(_0x2efbd5=_0x4f7baf[_0x50e478(0x12d)][0x0])==null||(_0x2efbd5=_0x2efbd5[_0x50e478(0x169)])==null?void 0x0:_0x2efbd5[_0x50e478(0x2e8)];if(Array[_0x50e478(0x152)](_0x4553b5)&&_0x4553b5['length']){if(_0x4553b5[_0x50e478(0x14d)]===_0x3fe282[0x0][_0x50e478(0x169)][_0x50e478(0x2e8)]['length']&&_0x4553b5[_0x50e478(0x2ba)]((_0x5e3b39,_0x567b31)=>_0x1155df['equals'](_0x5e3b39[_0x50e478(0xb9)],_0x3fe282[0x0][_0x50e478(0x169)]['selections'][_0x567b31][_0x50e478(0xb9)])))return;this[_0x50e478(0x153)][_0x50e478(0x241)](_0xdb365f)['executeCommand'](_0xacf3a9['id'],{'unitId':_0x14b51e,'subUnitId':_0x68402c,'selections':_0x4553b5});}}};Wt=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x40dc20),V(0x2,_0x4a3eaa)],Wt);const W=_0x3a76ad(_0x2e02fc(0x320));let Gt=function(_0x428a1f){const _0x46c99c=_0x2e02fc;return _0x428a1f[_0x428a1f[_0x46c99c(0x167)]=0x0]=_0x46c99c(0x167),_0x428a1f[_0x428a1f['OTHER_CLIENTS_EDITING']=0x1]='OTHER_CLIENTS_EDITING',_0x428a1f;}({});function Kt(_0xa58ee2){const _0x255aa8=_0x2e02fc;var _0x402f4e;return!!((_0x402f4e=_0xa58ee2[_0x255aa8(0x169)])!=null&&_0x402f4e['__splitChunk__']);}const qt=new Set([_0x5d986e['id']]),Jt=new Set([_0xa104c5['id'],_0x3a316a['id'],_0x458bda['id'],_0x5bb114['id']]);function Yt(_0x252ddb,_0x2833de=qt){const _0x3d4b74=_0x2e02fc;let _0x1fa24d=[];for(let _0x433697 of _0x252ddb){if(_0x2833de['has'](_0x433697['id'])){if(_0x1fa24d[_0x3d4b74(0x14d)]>0x0)break;_0x1fa24d[_0x3d4b74(0x2b8)](_0x433697);break;}if(Kt(_0x433697)){if(_0x1fa24d['length']>0x0)break;_0x1fa24d[_0x3d4b74(0x2b8)](_0x433697);break;}_0x1fa24d['push'](_0x433697);}return _0x1fa24d;}function Xt(_0x1a0d1e,_0x4bab8c,_0x5a2a40,_0x4d0df2,_0x5cd361){const _0x2ee092=_0x2e02fc;let _0x2eb6d1=Yt(_0x1a0d1e),_0x5587a0=_0x5cd361[_0x2ee092(0x202)](),_0x4cffa1=(_0x5587a0==null?void 0x0:_0x5587a0[_0x2ee092(0x2b4)])??_0x2ee092(0x17c),_0x28c4fc=(_0x5587a0==null?void 0x0:_0x5587a0[_0x2ee092(0xf3)])??_0x2ee092(0x17c);return{'changeset':{'unitID':_0x4bab8c,'type':_0x2c0a6c(_0x5a2a40[_0x2ee092(0x204)](_0x4bab8c)),'baseRev':_0x4d0df2[_0x2ee092(0x264)](_0x4bab8c),'revision':0x0,'userID':_0x4cffa1,'memberID':_0x28c4fc,'mutations':_0x2eb6d1},'pendingMutations':_0x1a0d1e[_0x2ee092(0x180)](_0x2eb6d1['length'])};}const Zt=Xt;function Qt(_0x65707c,_0x1a9bf1,_0x6f5d01,_0x3aae2c,_0x1b1c2d){const _0xc3f1d8=_0x2e02fc;let _0xdd2e32=Yt(_0x65707c,Jt),_0x2a9447=_0x1b1c2d[_0xc3f1d8(0x202)](),_0x455471=(_0x2a9447==null?void 0x0:_0x2a9447[_0xc3f1d8(0x2b4)])??_0xc3f1d8(0x17c),_0x1435a9=(_0x2a9447==null?void 0x0:_0x2a9447['memberID'])??_0xc3f1d8(0x17c);return{'changeset':{'unitID':_0x1a9bf1,'type':_0x2c0a6c(_0x6f5d01[_0xc3f1d8(0x204)](_0x1a9bf1)),'baseRev':_0x3aae2c[_0xc3f1d8(0x264)](_0x1a9bf1),'revision':0x0,'userID':_0x455471,'memberID':_0x1435a9,'mutations':_0xdd2e32},'pendingMutations':_0x65707c['slice'](_0xdd2e32[_0xc3f1d8(0x14d)])};}function $t(_0x1a2005,_0x103cef,_0x5aca79,_0x330f88,_0xe64b44){const _0x361acd=_0x2e02fc;let _0x1b6fdb=_0x1a2005[_0x361acd(0xea)]((_0x20130b,_0x1615f9)=>{const _0x3a9796=_0x361acd;let _0x28a31f=_0x20130b[_0x20130b[_0x3a9796(0x14d)]-0x1],{id:_0xa66476}=_0x28a31f??{},{id:_0x424523,type:_0x217960}=_0x1615f9,_0x1b25a5=_0x1615f9[_0x3a9796(0x169)];if(_0xa66476&&_0xa66476!==_0x424523)throw Error(_0x3a9796(0x14e)+_0xa66476+'\x20-\x20'+_0x424523+'.');if(!_0x28a31f)return[{'id':_0x424523,'type':_0x217960,'params':{'unitId':_0x1b25a5[_0x3a9796(0x299)],'textRanges':_0x1b25a5['textRanges'],'actions':_0x1b25a5[_0x3a9796(0x174)]}}];let _0x301413=_0x28a31f['params'];return en(_0x301413,_0x1b25a5)?[..._0x20130b[_0x3a9796(0x180)](0x0,-0x1),{..._0x28a31f,'id':_0x424523,'type':_0x217960,'params':{'unitId':_0x1b25a5[_0x3a9796(0x299)],'textRanges':_0x1b25a5[_0x3a9796(0x209)],'actions':_0x1a46f0[_0x3a9796(0x240)](_0x301413[_0x3a9796(0x174)],_0x1b25a5[_0x3a9796(0x174)])}}]:[..._0x20130b,{'id':_0x424523,'type':_0x217960,'params':{'unitId':_0x1b25a5[_0x3a9796(0x299)],'textRanges':_0x1b25a5[_0x3a9796(0x209)],'actions':_0x1b25a5['actions']}}];},[]),_0x55c4cc=_0xe64b44[_0x361acd(0x202)](),_0x580e6b=(_0x55c4cc==null?void 0x0:_0x55c4cc[_0x361acd(0x2b4)])??_0x361acd(0x17c),_0x459989=(_0x55c4cc==null?void 0x0:_0x55c4cc[_0x361acd(0xf3)])??_0x361acd(0x17c);return{'changeset':{'unitID':_0x103cef,'type':_0x2c0a6c(_0x5aca79[_0x361acd(0x204)](_0x103cef)),'baseRev':_0x330f88[_0x361acd(0x264)](_0x103cef),'revision':0x0,'userID':_0x580e6b,'memberID':_0x459989,'mutations':_0x1b6fdb},'pendingMutations':_0x1a2005[_0x361acd(0x180)](_0x1a2005[_0x361acd(0x14d)])};}function en(_0x1c6532,_0x3108dd){const _0x215bd5=_0x2e02fc;return!tn(_0x1c6532)&&!tn(_0x3108dd)&&nn(_0x1c6532[_0x215bd5(0x174)],_0x3108dd['actions']);}function tn(_0x2c402d){return _0x2c402d['isCompositionEnd']!==void 0x0;}function nn(_0xdae12a,_0x3cfdab){return rn(_0xdae12a)&&rn(_0x3cfdab)&&!on(_0xdae12a)&&!on(_0x3cfdab)&&!an(_0xdae12a)&&!an(_0x3cfdab);}function rn(_0x5f4c91){const _0x463572=_0x2e02fc;return sn(_0x5f4c91)[_0x463572(0x26e)](_0x38e964=>cn(_0x38e964)&&_0x38e964['et']===_0x463572(0x2b0));}function an(_0x58aa25){const _0x28418d=_0x2e02fc;return sn(_0x58aa25)['some'](_0x155962=>Array[_0x28418d(0x152)](_0x155962)||typeof _0x155962==_0x28418d(0xc2)||typeof _0x155962=='number');}function on(_0x15c805){const _0x1fa5ac=_0x2e02fc;return sn(_0x15c805)[_0x1fa5ac(0x26e)](_0x4f8b7b=>!cn(_0x4f8b7b)||_0x4f8b7b['et']!==_0x1fa5ac(0x2b0)||!Array[_0x1fa5ac(0x152)](_0x4f8b7b['e'])?!0x1:_0x4f8b7b['e'][_0x1fa5ac(0x26e)](_0x2acaca=>!cn(_0x2acaca)||!cn(_0x2acaca[_0x1fa5ac(0x18b)])?!0x1:Object['prototype'][_0x1fa5ac(0x284)][_0x1fa5ac(0x95)](_0x2acaca[_0x1fa5ac(0x18b)],_0x1fa5ac(0x27b))||Object[_0x1fa5ac(0x30f)][_0x1fa5ac(0x284)][_0x1fa5ac(0x95)](_0x2acaca['body'],'columnGroups')||Object['prototype'][_0x1fa5ac(0x284)][_0x1fa5ac(0x95)](_0x2acaca[_0x1fa5ac(0x18b)],_0x1fa5ac(0x133))));}function sn(_0x61ab64){const _0x517f63=_0x2e02fc;if(!Array[_0x517f63(0x152)](_0x61ab64))return[];let _0x3e70ae=_0x61ab64[_0x517f63(0x187)](_0x517f63(0x18b))?_0x61ab64:_0x61ab64[_0x517f63(0x25b)](_0x5d7f6f=>Array[_0x517f63(0x152)](_0x5d7f6f)&&_0x5d7f6f[_0x517f63(0x187)](_0x517f63(0x18b)));if(!Array[_0x517f63(0x152)](_0x3e70ae))return[];let _0x5a6eae=_0x3e70ae[_0x517f63(0x2c4)](_0x517f63(0x18b));return _0x5a6eae===-0x1?[]:_0x3e70ae['slice'](_0x5a6eae+0x1);}function cn(_0x50323c){const _0x4d97f9=_0x2e02fc;return typeof _0x50323c==_0x4d97f9(0xd9)&&!!_0x50323c&&!Array['isArray'](_0x50323c);}function ln(_0x15382d,_0x1a80f5){let _0x3ef684=new _0x308a5d(0x1);return setTimeout(()=>_0x3ef684['next'](_0x1a80f5),_0x15382d),_0x3ef684['asObservable']()['pipe'](_0x2d16fe(0x1));}var un,dn,fn;let pn=function(_0xe255bf){const _0x473e1d=_0x2e02fc;return _0xe255bf['NOT_COLLAB']=_0x473e1d(0x2b5),_0xe255bf[_0x473e1d(0x260)]=_0x473e1d(0x1c9),_0xe255bf[_0x473e1d(0x22e)]='pending',_0xe255bf[_0x473e1d(0x1b8)]='awaiting',_0xe255bf[_0x473e1d(0x12b)]=_0x473e1d(0x18a),_0xe255bf[_0x473e1d(0x1f8)]=_0x473e1d(0x253),_0xe255bf[_0x473e1d(0x12c)]='conflict',_0xe255bf[_0x473e1d(0x272)]='offline',_0xe255bf;}({});const mn=0x4e20,hn=0x2bf20;var G=class{constructor(_0x2e6fcb,_0x18f110,_0x16c384,_0x1e5da9,_0x2c0a6f,_0x4ec6c5,_0x1b28f9,_0x31de93,_0x334148){const _0x5951cc=_0x2e02fc;this[_0x5951cc(0x2ef)]=_0x2e6fcb,this['type']=_0x18f110,this[_0x5951cc(0x244)]=_0x2c0a6f,this[_0x5951cc(0xb1)]=_0x4ec6c5,this[_0x5951cc(0xfb)]=_0x1b28f9,this[_0x5951cc(0xd3)]=_0x31de93,this[_0x5951cc(0x122)]=_0x334148,z(this,'_awaitingChangeset',null),z(this,_0x5951cc(0x92),[]),this[_0x5951cc(0x137)]=_0x16c384,this[_0x5951cc(0x92)]=_0x1e5da9;}['_checkMissing'](_0x2c86c6){const _0x3aca40=_0x2e02fc;let _0x2bce7e=this[_0x3aca40(0xd3)][_0x3aca40(0x264)](this['unitID']);return _0x2c86c6['revision']>_0x2bce7e+0x1?(this[_0x3aca40(0x244)]['onMissingChangesets']({'from':_0x2bce7e,'to':_0x2c86c6[_0x3aca40(0x234)]-0x1}),!0x0):!0x1;}[_0x2e02fc(0x225)](_0x297292){const _0x395d29=_0x2e02fc;this['_undoRedoService'][_0x395d29(0x20e)](this['unitID'],_0x297292);}['_transformSelections'](_0x4a173b){const _0xc582b3=_0x2e02fc;var _0x9d8a4c,_0x52ca78;(_0x9d8a4c=(_0x52ca78=this[_0xc582b3(0x244)])[_0xc582b3(0x25e)])==null||_0x9d8a4c[_0xc582b3(0x95)](_0x52ca78,_0x4a173b);}[_0x2e02fc(0x91)](_0x57f9c4){const _0x45027c=_0x2e02fc;var _0x8c6777,_0x1d2558;return(_0x8c6777=(_0x1d2558=this[_0x45027c(0x244)])[_0x45027c(0xed)])==null?void 0x0:_0x8c6777[_0x45027c(0x95)](_0x1d2558,_0x57f9c4);}['_transformStateCache'](_0x54fd21){const _0x7bc892=_0x2e02fc;var _0x25c948,_0x432c12;return(_0x25c948=(_0x432c12=this[_0x7bc892(0x244)])[_0x7bc892(0x8f)])==null?void 0x0:_0x25c948[_0x7bc892(0x95)](_0x432c12,_0x54fd21);}[_0x2e02fc(0x2d0)](_0x59e369){const _0x58ac5f=_0x2e02fc;var _0x386b6a,_0x2b7ec4;return((_0x386b6a=(_0x2b7ec4=this[_0x58ac5f(0x244)])[_0x58ac5f(0x136)])==null?void 0x0:_0x386b6a['call'](_0x2b7ec4,_0x59e369))??_0x59e369;}[_0x2e02fc(0x300)](_0x5561a7){const _0x4b679b=_0x2e02fc;var _0x1d686a,_0x14ead4;return((_0x1d686a=(_0x14ead4=this[_0x4b679b(0x244)])[_0x4b679b(0xe8)])==null?void 0x0:_0x1d686a[_0x4b679b(0x95)](_0x14ead4,_0x5561a7))??_0x5561a7;}['_syncEditingCollabCursor'](_0x4f58c5){const _0x408309=_0x2e02fc;if(this[_0x408309(0xae)]===_0x51bdab['UNIVER_DOC']){let {unitID:_0x4604c1,mutations:_0x4849a5,memberID:_0x37cbcc}=_0x4f58c5,_0xf0cd87=_0x4849a5[_0x408309(0x14d)]>0x0?_0x4849a5[0x0][_0x408309(0x169)][_0x408309(0x209)]:[];if(Array[_0x408309(0x152)](_0xf0cd87)&&_0xf0cd87[_0x408309(0x14d)]>0x0){var _0x1d36ff,_0x50cab5;(_0x1d36ff=(_0x50cab5=this[_0x408309(0x244)])['onSyncEditingCollabCursor'])==null||_0x1d36ff[_0x408309(0x95)](_0x50cab5,{'unitID':_0x4604c1,'memberID':_0x37cbcc,'textRanges':_0xf0cd87});}}}['_updateLocalCache'](){const _0x234cb3=_0x2e02fc;var _0x2ae6da;(_0x2ae6da=this['_localCacheService'])==null||_0x2ae6da[_0x234cb3(0xe1)](this[_0x234cb3(0x2ef)],this[_0x234cb3(0xae)],this[_0x234cb3(0x137)],this[_0x234cb3(0x92)]);}[_0x2e02fc(0x2ce)](){const _0x5151d0=_0x2e02fc;return this[_0x5151d0(0xd3)][_0x5151d0(0x264)](this['unitID']);}[_0x2e02fc(0x274)](){const _0x2cad12=_0x2e02fc;this[_0x2cad12(0xd3)][_0x2cad12(0x2ad)](this[_0x2cad12(0x2ef)]);}[_0x2e02fc(0x118)](_0x42e0a3){const _0x1846f9=_0x2e02fc;let _0x2f6883=this[_0x1846f9(0x2d0)](_0x42e0a3);_0x2f6883=this[_0x1846f9(0x300)](_0x2f6883);let _0x50b34b=_0x31dabd(_0x2f6883['mutations'],this[_0x1846f9(0xb1)],{'fromCollab':!0x0});if(!_0x50b34b['result'])throw _0x50b34b[_0x1846f9(0x2cd)]instanceof Error?_0x50b34b['error']:Error(_0x50b34b[_0x1846f9(0x2cd)]??_0x1846f9(0x262));this['_transformIMECache'](_0x2f6883),this[_0x1846f9(0xb2)](_0x2f6883),this['_transformUndoredo'](_0x42e0a3),this[_0x1846f9(0x173)](_0x2f6883),this[_0x1846f9(0x102)](_0x2f6883),this[_0x1846f9(0x274)]();}};let K=class extends G{constructor(_0x2317ca,_0x1dc3c8,_0x3bc61d,_0x23858a,_0x456a3b,_0x9b2b2d,_0x591051,_0x350d88,_0x2b14e4,_0x1cedf7){const _0x33d9ca=_0x2e02fc;super(_0x2317ca,_0x1dc3c8,null,[],_0x3bc61d,_0x591051,_0x9b2b2d,_0x23858a,_0x1cedf7),this[_0x33d9ca(0x153)]=_0x456a3b,this[_0x33d9ca(0x159)]=_0x350d88,this[_0x33d9ca(0xf4)]=_0x2b14e4,this[_0x33d9ca(0x1fa)]=_0x1cedf7,z(this,_0x33d9ca(0x1b6),'synced');}[_0x2e02fc(0x11b)](_0x1bcbd2){const _0x2b9c78=_0x2e02fc;let _0x14eb63=this[_0x2b9c78(0x153)]['createInstance'](q,this[_0x2b9c78(0x2ef)],this['type'],[_0x1bcbd2],this[_0x2b9c78(0x244)]);return _0x14eb63[_0x2b9c78(0x165)](),_0x14eb63['_updateLocalCache'](),_0x14eb63;}[_0x2e02fc(0x2c2)](_0x5ce403){const _0x584bd4=_0x2e02fc;if(this[_0x584bd4(0x13f)](_0x5ce403))return this['_injector'][_0x584bd4(0x85)](Q,this['unitID'],this['type'],null,[],null,[_0x5ce403],this[_0x584bd4(0x244)]);try{let _0x1c01dc=this['_transformService'][_0x584bd4(0x21d)](_0x5ce403,[_0x220092]);if(_0x2eee33(_0x1c01dc)){let {c1Prime:_0x4afde1}=_0x1c01dc;return this[_0x584bd4(0x118)](_0x4afde1),this;}throw _0x1c01dc['error'];}catch(_0x29ea19){return this[_0x584bd4(0x159)]['error'](_0x29ea19),this[_0x584bd4(0x310)](!0x1);}}[_0x2e02fc(0x310)](_0x460fef){const _0x1414d3=_0x2e02fc;return this[_0x1414d3(0x153)][_0x1414d3(0x85)](X,this[_0x1414d3(0x2ef)],this[_0x1414d3(0xae)],null,[],this[_0x1414d3(0x244)],_0x460fef);}[_0x2e02fc(0xcf)](_0x2e2ec4){const _0x893606=_0x2e02fc;if(_0x2e2ec4[_0x893606(0x234)]<=this[_0x893606(0x2ce)]())return this;throw Error(_0x893606(0x11f));}[_0x2e02fc(0x9e)](){const _0x29751d=_0x2e02fc;throw Error(_0x29751d(0xc4));}['onRemoteRetry'](){return this;}[_0x2e02fc(0x2fc)](){const _0x28dc56=_0x2e02fc;return this['_injector'][_0x28dc56(0x85)](Z,this[_0x28dc56(0x2ef)],this[_0x28dc56(0xae)],null,[],this[_0x28dc56(0x244)]);}[_0x2e02fc(0x9c)](){return this;}[_0x2e02fc(0x1d2)](){const _0x3cb789=_0x2e02fc;throw Error(_0x3cb789(0x2c8));}[_0x2e02fc(0x292)](){const _0x12f2b0=_0x2e02fc;let _0x1c241d=this[_0x12f2b0(0xd3)][_0x12f2b0(0x264)](this[_0x12f2b0(0x2ef)]);return this[_0x12f2b0(0x244)]['onMissingChangesets']({'from':_0x1c241d,'to':0x0}),this['_injector'][_0x12f2b0(0x85)](Q,this['unitID'],this[_0x12f2b0(0xae)],null,[],null,[],this[_0x12f2b0(0x244)]);}};K=H([V(0x3,_0x17057e(_0x4b0edd)),V(0x4,_0x17057e(_0x346ad7)),V(0x5,_0x3ec71c),V(0x6,_0xdb365f),V(0x7,_0x3efc4d),V(0x8,_0x40dc20),V(0x9,_0x48242e(U))],K);let q=un=class extends G{constructor(_0x3dc318,_0x56bf23,_0xb009e2,_0x32139c,_0x8fd3f6,_0x312b1f,_0x11d9fd,_0x560e02,_0x5bb14f,_0x482974,_0x5a1e79,_0x4875b8,_0x617cb0,_0x348272){const _0x484c80=_0x2e02fc;super(_0x3dc318,_0x56bf23,null,_0xb009e2,_0x32139c,_0x5bb14f,_0x617cb0,_0x312b1f,_0x348272),this[_0x484c80(0x153)]=_0x8fd3f6,this[_0x484c80(0x22d)]=_0x11d9fd,this[_0x484c80(0x159)]=_0x560e02,this[_0x484c80(0x24e)]=_0x482974,this['_transformService']=_0x5a1e79,this[_0x484c80(0x2eb)]=_0x4875b8,z(this,_0x484c80(0x1b6),_0x484c80(0x1e7)),z(this,_0x484c80(0x1be),null),z(this,_0x484c80(0x10c),null);}[_0x2e02fc(0x11b)](_0x1e8328){const _0x599580=_0x2e02fc;return this[_0x599580(0x92)][_0x599580(0x2b8)](_0x1e8328),this['_updateLocalCache'](),this;}[_0x2e02fc(0x2c2)](_0x469727){const _0x548312=_0x2e02fc;if(this[_0x548312(0x13f)](_0x469727))return this[_0x548312(0x226)](),this[_0x548312(0x153)][_0x548312(0x85)](Q,this[_0x548312(0x2ef)],this[_0x548312(0xae)],null,this[_0x548312(0x92)],null,[_0x469727],this[_0x548312(0x244)]);try{let _0x48e9ae=this['_transformService'][_0x548312(0x21d)](_0x469727,this[_0x548312(0x92)]);if(_0x2eee33(_0x48e9ae)){let {c1Prime:_0x26d7f9,m2Prime:_0x125f33}=_0x48e9ae;this[_0x548312(0x118)](_0x26d7f9);let _0x7fd76d=this[_0x548312(0x153)][_0x548312(0x85)](un,this[_0x548312(0x2ef)],this[_0x548312(0xae)],_0x125f33,this['_handler']);this[_0x548312(0x226)]();let _0x13f038=new Date()['getTime'](),_0x445507=this[_0x548312(0x1be)]?Math['max'](this['_scheduleCompleteTimestamp']-_0x13f038,0x0):this[_0x548312(0x1bf)]();return _0x7fd76d[_0x548312(0x165)](_0x445507),_0x7fd76d;}throw _0x48e9ae[_0x548312(0x2cd)];}catch(_0x1af109){return this[_0x548312(0x159)][_0x548312(0x2cd)](_0x1af109),this[_0x548312(0x310)](!0x1);}}['onRemoteAck'](_0x301117){const _0x9bc12f=_0x2e02fc;if(_0x301117[_0x9bc12f(0x234)]<=this[_0x9bc12f(0x2ce)]())return this;throw Error(_0x9bc12f(0x21a));}[_0x2e02fc(0x9e)](){const _0x139ce6=_0x2e02fc;throw Error(_0x139ce6(0x146));}[_0x2e02fc(0x30e)](){return this;}[_0x2e02fc(0x2fc)](){const _0xd79e74=_0x2e02fc;return this['_clearScheduledTask'](),this[_0xd79e74(0x153)][_0xd79e74(0x85)](Z,this[_0xd79e74(0x2ef)],this[_0xd79e74(0xae)],null,this[_0xd79e74(0x92)],this['_handler']);}['toggleOnline'](){return this;}[_0x2e02fc(0x165)](_0x78fbe7){const _0x1c947b=_0x2e02fc;let _0x33a1e4=_0x78fbe7??this['_getSendChangesetTimeout']();this['_scheduleCompleteTimestamp']=new Date()[_0x1c947b(0x275)]()+_0x33a1e4,this[_0x1c947b(0x10c)]=setTimeout(()=>{const _0x2b7d29=_0x1c947b;this[_0x2b7d29(0x226)]();let _0x31ed11=null;switch(this[_0x2b7d29(0xae)]){case _0x51bdab[_0x2b7d29(0x266)]:_0x31ed11=Xt(this[_0x2b7d29(0x92)],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this[_0x2b7d29(0x22d)]);break;case _0x51bdab[_0x2b7d29(0x312)]:_0x31ed11=this[_0x2b7d29(0x92)]['every'](_0x298024=>_0x298024['id']===_0x520df5['id'])?$t(this[_0x2b7d29(0x92)],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this['_revisionService'],this[_0x2b7d29(0x22d)]):Xt(this[_0x2b7d29(0x92)],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this['_revisionService'],this[_0x2b7d29(0x22d)]);break;case _0x51bdab[_0x2b7d29(0x1e0)]:_0x31ed11=Qt(this[_0x2b7d29(0x92)],this['unitID'],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this['_userManagerService']);break;case _0x51bdab[_0x2b7d29(0x230)]:_0x31ed11=Zt(this['_pendingMutations'],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this[_0x2b7d29(0x22d)]);break;case _0x51bdab['UNIVER_BOARD']:_0x31ed11=Xt(this[_0x2b7d29(0x92)],this['unitID'],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this[_0x2b7d29(0x22d)]);break;case _0x51bdab[_0x2b7d29(0x1c0)]:_0x31ed11=Xt(this[_0x2b7d29(0x92)],this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0x2eb)],this[_0x2b7d29(0xd3)],this['_userManagerService']);break;default:throw Error(_0x2b7d29(0x145)+this[_0x2b7d29(0xae)]+_0x2b7d29(0x168));}let {changeset:_0x1b317e,pendingMutations:_0x2b4507}=_0x31ed11;this[_0x2b7d29(0x244)]['onSendChangeset'](_0x1b317e);let _0x390cfd=_0x2b4507[_0x2b7d29(0x14d)]?this[_0x2b7d29(0x153)][_0x2b7d29(0x85)](Y,this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0xae)],_0x1b317e,_0x2b4507,this[_0x2b7d29(0x244)],void 0x0):this[_0x2b7d29(0x153)][_0x2b7d29(0x85)](J,this[_0x2b7d29(0x2ef)],this[_0x2b7d29(0xae)],_0x1b317e,this['_handler']);_0x390cfd[_0x2b7d29(0x1d1)](),this[_0x2b7d29(0x244)][_0x2b7d29(0x1e3)](this,_0x390cfd);},_0x33a1e4);}['_getSendChangesetTimeout'](){const _0xac531f=_0x2e02fc;let _0x5efa20=this['_configService'][_0xac531f(0xe2)](R);return(_0x5efa20==null?void 0x0:_0x5efa20[_0xac531f(0x139)])??0x7d0;}[_0x2e02fc(0x1d2)](){const _0x4fe12b=_0x2e02fc;throw Error(_0x4fe12b(0x8d));}['_clearScheduledTask'](){const _0x450f69=_0x2e02fc;this[_0x450f69(0x10c)]!=null&&(clearTimeout(this[_0x450f69(0x10c)]),this[_0x450f69(0x10c)]=null);}['_onConflict'](_0x11c0b4){const _0x801205=_0x2e02fc;return this[_0x801205(0x226)](),this['_injector'][_0x801205(0x85)](X,this[_0x801205(0x2ef)],this['type'],null,this[_0x801205(0x92)],this[_0x801205(0x244)],_0x11c0b4);}};q=un=H([V(0x4,_0x17057e(_0x346ad7)),V(0x5,_0x17057e(_0x4b0edd)),V(0x6,_0x17057e(_0x5dc14f)),V(0x7,_0x3efc4d),V(0x8,_0xdb365f),V(0x9,_0x39e8ee),V(0xa,_0x40dc20),V(0xb,_0x4a3eaa),V(0xc,_0x3ec71c),V(0xd,_0x48242e(U))],q);let J=dn=class extends G{constructor(_0x4fe976,_0x530dec,_0x2f5ca9,_0x205b48,_0x525dea,_0x2642ed,_0x5621b7,_0x4de4e6,_0x456435,_0x38ae9f,_0x29eb0d){const _0x4e8199=_0x2e02fc;super(_0x4fe976,_0x530dec,_0x2f5ca9,[],_0x205b48,_0x5621b7,_0x38ae9f,_0x2642ed,_0x29eb0d),this[_0x4e8199(0x153)]=_0x525dea,this['_logService']=_0x4de4e6,this[_0x4e8199(0xf4)]=_0x456435,z(this,_0x4e8199(0x1b6),_0x4e8199(0x154)),z(this,'_resendTimeout',0x0),z(this,_0x4e8199(0x2cb),0x0),z(this,_0x4e8199(0x1f6),void 0x0),z(this,_0x4e8199(0x1b3),void 0x0);}['appendMutation'](_0x495208){const _0x3dcabc=_0x2e02fc;this[_0x3dcabc(0x226)]();let _0xbc10a9=this[_0x3dcabc(0x153)]['createInstance'](Y,this[_0x3dcabc(0x2ef)],this[_0x3dcabc(0xae)],this['_awaitingChangeset'],[_0x495208],this[_0x3dcabc(0x244)],this[_0x3dcabc(0x1f6)]);return _0xbc10a9[_0x3dcabc(0x1d1)](),_0xbc10a9;}[_0x2e02fc(0x2c2)](_0xe1e252){const _0x470d9f=_0x2e02fc;if(this[_0x470d9f(0x13f)](_0xe1e252))return this[_0x470d9f(0x226)](),this[_0x470d9f(0x153)][_0x470d9f(0x85)](Q,this[_0x470d9f(0x2ef)],this['type'],this[_0x470d9f(0x137)],[],null,[_0xe1e252],this[_0x470d9f(0x244)]);try{let _0x33bb96=this['_transformService'][_0x470d9f(0x199)]([_0xe1e252],[this[_0x470d9f(0x137)]],!0x1);if(_0x113617(_0x33bb96)){let {c1Prime:_0x3b2fce,c2Prime:_0x4833b8}=_0x33bb96;this[_0x470d9f(0x118)](_0x3b2fce[0x0]),_0x4833b8[0x0][_0x470d9f(0x251)]=this['_getCurrentRevision'](),this[_0x470d9f(0x226)]();let _0x21803c=this['_injector'][_0x470d9f(0x85)](dn,this[_0x470d9f(0x2ef)],this[_0x470d9f(0xae)],_0x4833b8[0x0],this['_handler']);return _0x21803c[_0x470d9f(0x1d1)](),_0x21803c;}throw _0x33bb96[_0x470d9f(0x2cd)];}catch(_0x364e71){return this[_0x470d9f(0x159)][_0x470d9f(0x2cd)](_0x364e71),this[_0x470d9f(0x310)](!0x1);}}['onRemoteAck'](_0x44ec26){const _0x37a21c=_0x2e02fc;this[_0x37a21c(0x226)]();let _0x4d7554=this[_0x37a21c(0xd3)][_0x37a21c(0x264)](this[_0x37a21c(0x2ef)]);if(_0x44ec26[_0x37a21c(0x234)]<=_0x4d7554)return this;if(this['_checkMissing'](_0x44ec26))return this[_0x37a21c(0x153)][_0x37a21c(0x85)](Q,this[_0x37a21c(0x2ef)],this[_0x37a21c(0xae)],this[_0x37a21c(0x137)],[],_0x44ec26[_0x37a21c(0x234)],[],this[_0x37a21c(0x244)]);this[_0x37a21c(0x274)]();let _0x392d68=this['_injector'][_0x37a21c(0x85)](K,this['unitID'],this[_0x37a21c(0xae)],this[_0x37a21c(0x244)]);return _0x392d68['_updateLocalCache'](),_0x392d68;}[_0x2e02fc(0x9e)](_0x2ee9a9){const _0x5d3d5f=_0x2e02fc;return this[_0x5d3d5f(0x310)](!!(_0x2ee9a9!=null&&_0x2ee9a9[_0x5d3d5f(0xc5)]));}['onRemoteRetry'](_0x19c9c5){const _0x5b75a2=_0x2e02fc;return this[_0x5b75a2(0x2cb)]>hn?this['toggleOffline']():(this[_0x5b75a2(0x1f6)]=ln(this['_resendTimeout'],{'timeout':this[_0x5b75a2(0x213)],'reqId':_0x19c9c5[_0x5b75a2(0x273)]}),this[_0x5b75a2(0x1b3)]=this[_0x5b75a2(0x1f6)]['subscribe'](({reqId:_0x21509d,timeout:_0xc06a1a})=>{const _0x59e580=_0x5b75a2;this[_0x59e580(0x25d)](_0x21509d,_0xc06a1a);}),this);}[_0x2e02fc(0x2fc)](){const _0x27d813=_0x2e02fc;return this['_clearScheduledTask'](),this['_injector'][_0x27d813(0x85)](Z,this[_0x27d813(0x2ef)],this['type'],this[_0x27d813(0x137)],[],this[_0x27d813(0x244)]);}[_0x2e02fc(0x9c)](){return this;}['resend'](){const _0x18a285=_0x2e02fc;this[_0x18a285(0x244)][_0x18a285(0x2fe)](this[_0x18a285(0x137)]);}[_0x2e02fc(0x310)](_0x5a4dba){const _0x2eb865=_0x2e02fc;return this[_0x2eb865(0x226)](),this['_injector'][_0x2eb865(0x85)](X,this[_0x2eb865(0x2ef)],this[_0x2eb865(0xae)],this['_awaitingChangeset'],[],this['_handler'],_0x5a4dba);}['_resendWithTimeout'](_0x13dbba,_0x545be6){const _0x27add7=_0x2e02fc;var _0x429c9e;_0x13dbba===((_0x429c9e=this[_0x27add7(0x137)])==null?void 0x0:_0x429c9e[_0x27add7(0x273)])&&(this['resend'](),this[_0x27add7(0x213)]=_0x545be6===0x0?0x3e8:Math[_0x27add7(0x2c7)](_0x545be6*0x2,mn),this[_0x27add7(0x2cb)]+=this[_0x27add7(0x213)]);}['_clearScheduledTask'](){const _0x3729a3=_0x2e02fc;var _0x117447;(_0x117447=this['_sender'])==null||_0x117447[_0x3729a3(0xe3)](),this[_0x3729a3(0x213)]=0x0,this[_0x3729a3(0x2cb)]=0x0;}};J=dn=H([V(0x4,_0x17057e(_0x346ad7)),V(0x5,_0x17057e(_0x4b0edd)),V(0x6,_0xdb365f),V(0x7,_0x3efc4d),V(0x8,_0x40dc20),V(0x9,_0x3ec71c),V(0xa,_0x48242e(U))],J);let Y=fn=class extends G{constructor(_0x54919b,_0x1abbde,_0x465e0e,_0x1dc15d,_0x51d616,_0x17bc9e,_0x583a01,_0x4501aa,_0x3ea68d,_0x3ca180,_0x42e46b,_0x2d2597,_0x3a476c){const _0x1e1f34=_0x2e02fc;super(_0x54919b,_0x1abbde,_0x465e0e,_0x1dc15d,_0x51d616,_0x3ea68d,_0x2d2597,_0x4501aa,_0x3a476c),this[_0x1e1f34(0x153)]=_0x583a01,this['_logService']=_0x3ca180,this[_0x1e1f34(0xf4)]=_0x42e46b,this['localCacheService']=_0x3a476c,z(this,_0x1e1f34(0x1b6),'awaiting_with_pending'),z(this,'_resendTimeout',0x0),z(this,_0x1e1f34(0x2cb),0x0),z(this,_0x1e1f34(0x1f6),void 0x0),z(this,_0x1e1f34(0x1b3),void 0x0),_0x17bc9e&&(this[_0x1e1f34(0x1f6)]=_0x17bc9e,this[_0x1e1f34(0x1b3)]=this[_0x1e1f34(0x1f6)][_0x1e1f34(0x222)](({reqId:_0x2fefbe,timeout:_0x5a181c})=>{const _0x31c74b=_0x1e1f34;this[_0x31c74b(0x25d)](_0x2fefbe,_0x5a181c);}));}[_0x2e02fc(0x11b)](_0x2cbee2){const _0x5d3e06=_0x2e02fc;return this[_0x5d3e06(0x92)][_0x5d3e06(0x2b8)](_0x2cbee2),this;}[_0x2e02fc(0x2c2)](_0x4a9616){const _0x4a7c7c=_0x2e02fc;if(this[_0x4a7c7c(0x13f)](_0x4a9616))return this[_0x4a7c7c(0x226)](),this[_0x4a7c7c(0x153)][_0x4a7c7c(0x85)](Q,this['unitID'],this[_0x4a7c7c(0xae)],this[_0x4a7c7c(0x137)],this[_0x4a7c7c(0x92)],null,[_0x4a9616],this[_0x4a7c7c(0x244)]);try{let _0x452063=this[_0x4a7c7c(0xf4)][_0x4a7c7c(0x199)]([_0x4a9616],[this[_0x4a7c7c(0x137)]],!0x1);if(_0x113617(_0x452063)){let {c1Prime:_0x5e119b,c2Prime:_0x7945a8}=_0x452063,_0x37f16e=this[_0x4a7c7c(0xf4)][_0x4a7c7c(0x21d)](_0x5e119b[0x0],this[_0x4a7c7c(0x92)]);if(_0x2eee33(_0x37f16e)){let {c1Prime:_0x78682c,m2Prime:_0x27187b}=_0x37f16e;return this['_executeRemoteChangeset'](_0x78682c),_0x7945a8[0x0][_0x4a7c7c(0x251)]=this[_0x4a7c7c(0x2ce)](),this[_0x4a7c7c(0x226)](),this[_0x4a7c7c(0x153)][_0x4a7c7c(0x85)](fn,this[_0x4a7c7c(0x2ef)],this[_0x4a7c7c(0xae)],_0x7945a8[0x0],_0x27187b,this[_0x4a7c7c(0x244)],void 0x0);}throw _0x37f16e[_0x4a7c7c(0x2cd)];}throw _0x452063[_0x4a7c7c(0x2cd)];}catch(_0x15862a){return this[_0x4a7c7c(0x159)][_0x4a7c7c(0x2cd)](_0x15862a),this['_onConflict'](!0x1);}}[_0x2e02fc(0xcf)](_0x1fa24b){const _0x224118=_0x2e02fc;this[_0x224118(0x226)]();let _0x4597b9=this['_getCurrentRevision']();if(_0x1fa24b[_0x224118(0x234)]<=_0x4597b9)return this;if(this[_0x224118(0x13f)](_0x1fa24b))return this[_0x224118(0x153)][_0x224118(0x85)](Q,this['unitID'],this[_0x224118(0xae)],this[_0x224118(0x137)],this[_0x224118(0x92)],_0x1fa24b[_0x224118(0x234)],[],this[_0x224118(0x244)]);this[_0x224118(0x274)]();let _0x2fb2cc=this[_0x224118(0x153)][_0x224118(0x85)](q,this[_0x224118(0x2ef)],this[_0x224118(0xae)],this[_0x224118(0x92)],this['_handler']);return _0x2fb2cc[_0x224118(0x165)](),_0x2fb2cc['_updateLocalCache'](),_0x2fb2cc;}[_0x2e02fc(0x9e)](_0x2d3f88){const _0x737025=_0x2e02fc;return this['_onConflict'](!!(_0x2d3f88!=null&&_0x2d3f88[_0x737025(0xc5)]));}[_0x2e02fc(0x30e)](_0x4ff967){const _0x16c09e=_0x2e02fc;return this[_0x16c09e(0x2cb)]>hn?this[_0x16c09e(0x2fc)]():(this[_0x16c09e(0x1f6)]=ln(this[_0x16c09e(0x213)],{'timeout':this[_0x16c09e(0x213)],'reqId':_0x4ff967[_0x16c09e(0x273)]}),this[_0x16c09e(0x1b3)]=this[_0x16c09e(0x1f6)][_0x16c09e(0x222)](({reqId:_0x5f0d58,timeout:_0x54542c})=>{this['_resendWithTimeout'](_0x5f0d58,_0x54542c);}),this);}[_0x2e02fc(0x2fc)](){const _0x350ae8=_0x2e02fc;return this['_clearScheduledTask'](),this[_0x350ae8(0x153)][_0x350ae8(0x85)](Z,this[_0x350ae8(0x2ef)],this['type'],this[_0x350ae8(0x137)],this[_0x350ae8(0x92)],this[_0x350ae8(0x244)]);}[_0x2e02fc(0x9c)](){return this;}[_0x2e02fc(0x1d2)](){const _0x3f1a3d=_0x2e02fc;this[_0x3f1a3d(0x244)]['onSendChangeset'](this['_awaitingChangeset']);}['_onConflict'](_0x280520){const _0x5bbe9d=_0x2e02fc;return this[_0x5bbe9d(0x226)](),this[_0x5bbe9d(0x153)][_0x5bbe9d(0x85)](X,this[_0x5bbe9d(0x2ef)],this[_0x5bbe9d(0xae)],null,this[_0x5bbe9d(0x92)],this[_0x5bbe9d(0x244)],_0x280520);}[_0x2e02fc(0x25d)](_0x1515ee,_0xdac641){const _0x41894b=_0x2e02fc;var _0xe3af67;_0x1515ee===((_0xe3af67=this[_0x41894b(0x137)])==null?void 0x0:_0xe3af67[_0x41894b(0x273)])&&(this['resend'](),this['_resendTimeout']=_0xdac641===0x0?0x3e8:Math[_0x41894b(0x2c7)](_0xdac641*0x2,mn),this[_0x41894b(0x2cb)]+=this[_0x41894b(0x213)]);}[_0x2e02fc(0x226)](){const _0x472c31=_0x2e02fc;var _0x13545c;(_0x13545c=this[_0x472c31(0x1b3)])==null||_0x13545c['unsubscribe'](),this['_resendTimeout']=0x0,this[_0x472c31(0x2cb)]=0x0;}};Y=fn=H([V(0x6,_0x17057e(_0x346ad7)),V(0x7,_0x17057e(_0x4b0edd)),V(0x8,_0xdb365f),V(0x9,_0x3efc4d),V(0xa,_0x40dc20),V(0xb,_0x3ec71c),V(0xc,_0x48242e(U))],Y);let X=class extends G{constructor(_0x5df87a,_0x2b5b34,_0x53a046,_0xe7fc1f,_0x456602,_0x89366a=!0x1,_0x3a52ae,_0x39e56b,_0x5ba952,_0x53641e,_0x1db49d,_0x54606c,_0x308a6c){const _0x4d49c4=_0x2e02fc;super(_0x5df87a,_0x2b5b34,_0x53a046,_0xe7fc1f,_0x456602,_0x39e56b,_0x5ba952,_0x53641e,_0x308a6c),this['_isPermissionRej']=_0x89366a,this[_0x4d49c4(0x210)]=_0x3a52ae,this['_localeService']=_0x1db49d,this[_0x4d49c4(0x23c)]=_0x54606c,this[_0x4d49c4(0x1fa)]=_0x308a6c,z(this,_0x4d49c4(0x1b6),_0x4d49c4(0x1e8)),this[_0x4d49c4(0x1f5)](),this[_0x4d49c4(0x1eb)](),this[_0x4d49c4(0x203)]();}[_0x2e02fc(0x11b)](){return this;}[_0x2e02fc(0x2c2)](){return this;}[_0x2e02fc(0xcf)](){return this;}['onRemoteRej'](){return this;}[_0x2e02fc(0x30e)](){return this;}['toggleOffline'](){return this;}[_0x2e02fc(0x9c)](){return this;}[_0x2e02fc(0x1d2)](){const _0x32bac3=_0x2e02fc;throw Error(_0x32bac3(0x14b));}[_0x2e02fc(0x1eb)](){const _0x1da8e3=_0x2e02fc;var _0x38781e,_0x161c96,_0x213605;(_0x38781e=this[_0x1da8e3(0x122)])==null||(_0x161c96=_0x38781e[_0x1da8e3(0x182)])==null||(_0x161c96=_0x161c96['call'](_0x38781e,this['unitID'],_0x1da8e3(0x1e8)))==null||_0x161c96[_0x1da8e3(0xec)](()=>void 0x0),(_0x213605=this[_0x1da8e3(0x122)])==null||_0x213605['updateOfflineData'](this['unitID'],this[_0x1da8e3(0xae)],null,[]);}['_showConflictNotification'](){const _0x5d923b=_0x2e02fc;this[_0x5d923b(0x2fd)]?this[_0x5d923b(0x23c)]['emitEvent']({'id':'PERMISSION_DENIED'}):this[_0x5d923b(0x23c)][_0x5d923b(0x1ba)]({'id':'CONFLICT'});}[_0x2e02fc(0x203)](){const _0x27896c=_0x2e02fc;this['_permissionService'][_0x27896c(0x197)](new _0x424e79(this[_0x27896c(0x2ef)])['id'],!0x1);}};X=H([V(0x6,_0x17057e(_0x5a8b72)),V(0x7,_0xdb365f),V(0x8,_0x3ec71c),V(0x9,_0x17057e(_0x4b0edd)),V(0xa,_0x17057e(_0xc4a55f)),V(0xb,_0x17057e(B)),V(0xc,_0x48242e(U))],X);let Z=class extends G{constructor(_0x4635e6,_0x3b3e50,_0x30c2ee,_0x243d53,_0x101bbd,_0x1ab612,_0x56d372,_0x388365,_0x43475c,_0x1e8a6d){const _0x2787c1=_0x2e02fc;super(_0x4635e6,_0x3b3e50,_0x30c2ee,_0x243d53,_0x101bbd,_0x388365,_0x43475c,_0x56d372,_0x1e8a6d),this[_0x2787c1(0x153)]=_0x1ab612,z(this,'status','offline');}[_0x2e02fc(0x11b)](_0x39f893){const _0x4e9a9c=_0x2e02fc;return this[_0x4e9a9c(0x92)][_0x4e9a9c(0x2b8)](_0x39f893),this[_0x4e9a9c(0x1d1)](),this;}[_0x2e02fc(0x2c2)](_0x4636f2){const _0x1e536e=_0x2e02fc;throw Error(_0x1e536e(0x31e));}['onRemoteAck'](){const _0xbe2021=_0x2e02fc;throw Error(_0xbe2021(0x2ca));}[_0x2e02fc(0x9e)](){const _0x1aa964=_0x2e02fc;throw Error(_0x1aa964(0xcd));}[_0x2e02fc(0x30e)](){return this;}[_0x2e02fc(0x2fc)](){return this;}[_0x2e02fc(0x9c)](){const _0x369887=_0x2e02fc;let {_injector:_0x21a8d3,_pendingMutations:_0x2c0836,_awaitingChangeset:_0x282c35,unitID:_0x5472ae,_handler:_0xc67087,type:_0x3d0e05}=this,_0x5c28cb=gn(_0x21a8d3,_0x5472ae,_0x3d0e05,_0x282c35,_0x2c0836,_0xc67087);return _0x5c28cb instanceof q?_0x5c28cb[_0x369887(0x165)]():(_0x5c28cb instanceof Y||_0x5c28cb instanceof J)&&_0x5c28cb[_0x369887(0x1d2)](),_0x5c28cb;}[_0x2e02fc(0x1d2)](){const _0x2151c6=_0x2e02fc;throw Error(_0x2151c6(0x80));}};Z=H([V(0x5,_0x17057e(_0x346ad7)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0xdb365f),V(0x8,_0x3ec71c),V(0x9,_0x48242e(U))],Z);let Q=class extends G{constructor(_0x2fd9a4,_0x1f3217,_0x4bd287,_0x25bba5,_0x17dc84,_0xf4c03,_0x1d7b01,_0x1ccac8,_0x2d9c3c,_0x48fd71,_0x1f7af8,_0xa798,_0x48b9fa,_0x385fe3){const _0x9d9769=_0x2e02fc;super(_0x2fd9a4,_0x1f3217,_0x4bd287,_0x25bba5,_0x1d7b01,_0x1f7af8,_0xa798,_0x2d9c3c,_0x385fe3),this[_0x9d9769(0xad)]=_0x17dc84,this['_queuedRemoteChangesets']=_0xf4c03,this[_0x9d9769(0x153)]=_0x1ccac8,this[_0x9d9769(0x159)]=_0x48fd71,this[_0x9d9769(0xf4)]=_0x48b9fa,this['localCacheService']=_0x385fe3,z(this,_0x9d9769(0x1b6),_0x9d9769(0x253));}[_0x2e02fc(0xe7)](_0x445500){const _0x115075=_0x2e02fc;try{if(this[_0x115075(0x248)](_0x445500)[_0x115075(0xc6)])throw Error(_0x115075(0x100));if(this[_0x115075(0x248)]([...this['_queuedRemoteChangesets']][_0x115075(0x1b5)]((_0x3f06e0,_0x5b493e)=>_0x3f06e0[_0x115075(0x234)]-_0x5b493e['revision']))[_0x115075(0xc6)])return this[_0x115075(0x214)]=[],this[_0x115075(0x1d1)](),this[_0x115075(0x244)][_0x115075(0x232)]({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0x10831b=this[_0x115075(0x137)],_0x34c682=this[_0x115075(0x92)],_0x55ab25;if(_0x10831b&&_0x34c682[_0x115075(0x14d)]!==0x0)_0x55ab25=this[_0x115075(0x153)]['createInstance'](Y,this['unitID'],this[_0x115075(0xae)],_0x10831b,_0x34c682,this[_0x115075(0x244)],void 0x0);else{if(_0x10831b&&_0x34c682['length']===0x0)_0x10831b['baseRev']=this['_getCurrentRevision'](),_0x55ab25=this['_injector'][_0x115075(0x85)](J,this[_0x115075(0x2ef)],this[_0x115075(0xae)],_0x10831b,this[_0x115075(0x244)]);else{if(_0x34c682[_0x115075(0x14d)]!==0x0){let _0x300023=this[_0x115075(0x153)][_0x115075(0x85)](q,this[_0x115075(0x2ef)],this[_0x115075(0xae)],_0x34c682,this[_0x115075(0x244)]);_0x300023[_0x115075(0x165)](),_0x55ab25=_0x300023;}else _0x55ab25=this[_0x115075(0x153)][_0x115075(0x85)](K,this[_0x115075(0x2ef)],this['type'],this[_0x115075(0x244)]);}}return _0x55ab25[_0x115075(0x1d1)](),_0x55ab25;}catch(_0x306347){return this['_logService']['error'](_0x115075(0x194),'failed\x20to\x20apply\x20missed\x20changesets!',_0x306347),this['_injector'][_0x115075(0x85)](X,this[_0x115075(0x2ef)],this[_0x115075(0xae)],this[_0x115075(0x137)],this[_0x115075(0x92)],this[_0x115075(0x244)],!0x1);}}[_0x2e02fc(0x248)](_0x1f375f){const _0x579f11=_0x2e02fc;this[_0x579f11(0x26d)]();for(let _0x12b658=0x0;_0x12b658<_0x1f375f[_0x579f11(0x14d)];_0x12b658++){let _0x3e80c0=_0x1f375f[_0x12b658],_0x1f24c4=this[_0x579f11(0x2ce)]();if(!(_0x3e80c0['revision']<=_0x1f24c4)){if(_0x3e80c0[_0x579f11(0x234)]>_0x1f24c4+0x1)return{'missingChangesets':!0x0};if(this[_0x579f11(0x249)](_0x3e80c0)){this['_acknowledgeAwaiting']();continue;}this[_0x579f11(0x20d)](_0x3e80c0),this[_0x579f11(0x26d)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x283409){const _0x49591c=_0x2e02fc;let _0x111064=_0x283409,_0x15581c=this[_0x49591c(0x137)];if(_0x15581c){let _0x4ff099=this[_0x49591c(0xf4)][_0x49591c(0x199)]([_0x283409],[_0x15581c],!0x1);if(!_0x113617(_0x4ff099))throw _0x4ff099['error'];_0x111064=_0x4ff099['c1Prime'][0x0],_0x15581c=_0x4ff099[_0x49591c(0x15b)][0x0];}let _0x44cd00=this[_0x49591c(0x92)];if(_0x44cd00[_0x49591c(0x14d)]){let _0x314bcf=this[_0x49591c(0xf4)][_0x49591c(0x21d)](_0x111064,_0x44cd00);if(!_0x2eee33(_0x314bcf))throw _0x314bcf[_0x49591c(0x2cd)];_0x111064=_0x314bcf[_0x49591c(0x293)],_0x44cd00=_0x314bcf[_0x49591c(0x12d)];}this['_executeRemoteChangeset'](_0x111064),_0x15581c&&(_0x15581c[_0x49591c(0x251)]=this['_getCurrentRevision']()),this[_0x49591c(0x137)]=_0x15581c,this[_0x49591c(0x92)]=_0x44cd00;}[_0x2e02fc(0x26d)](){const _0x3e8648=_0x2e02fc;if(!this[_0x3e8648(0x137)]||this[_0x3e8648(0xad)]==null)return;let _0x4df8a1=this[_0x3e8648(0x2ce)]();if(this[_0x3e8648(0xad)]<=_0x4df8a1)throw Error('[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20'+this['_acknowledgedAwaitingRevision']+'.');this[_0x3e8648(0xad)]===_0x4df8a1+0x1&&this['_acknowledgeAwaiting']();}[_0x2e02fc(0x2e5)](){const _0x3d3a00=_0x2e02fc;this[_0x3d3a00(0x274)](),this['_awaitingChangeset']=null,this[_0x3d3a00(0xad)]=null;}[_0x2e02fc(0x249)](_0x498af3){const _0x549f8c=_0x2e02fc;let _0x5b723d=this['_awaitingChangeset'];return!_0x5b723d||!_0x5b723d[_0x549f8c(0x7e)]||_0x5b723d['reqId']===null||_0x5b723d[_0x549f8c(0x273)]===void 0x0?!0x1:_0x498af3['unitID']===_0x5b723d[_0x549f8c(0x2ef)]&&_0x498af3[_0x549f8c(0x7e)]===_0x5b723d[_0x549f8c(0x7e)]&&_0x498af3['reqId']===_0x5b723d[_0x549f8c(0x273)];}[_0x2e02fc(0x1d2)](){const _0x2a3b4a=_0x2e02fc;throw Error(_0x2a3b4a(0x1a2));}[_0x2e02fc(0x11b)](_0x25346f){const _0x39ecd=_0x2e02fc;return this[_0x39ecd(0x92)][_0x39ecd(0x2b8)](_0x25346f),this;}[_0x2e02fc(0x2c2)](_0x423859){const _0x53bb1e=_0x2e02fc;return this[_0x53bb1e(0x214)][_0x53bb1e(0x2b8)](_0x423859),this;}[_0x2e02fc(0xcf)](_0x2a0515){const _0x5cfe3a=_0x2e02fc;if(this[_0x5cfe3a(0x137)]){let _0x783d59=this[_0x5cfe3a(0x2ce)]();return _0x2a0515[_0x5cfe3a(0x234)]<=_0x783d59||(_0x783d59+0x1===_0x2a0515[_0x5cfe3a(0x234)]?(this['_incrementRevisionNumber'](),this[_0x5cfe3a(0x137)]=null,this[_0x5cfe3a(0xad)]=null):this['_acknowledgedAwaitingRevision']=_0x2a0515[_0x5cfe3a(0x234)]),this;}if(_0x2a0515[_0x5cfe3a(0x234)]<=this[_0x5cfe3a(0x2ce)]())return this;throw Error(_0x5cfe3a(0x198));}[_0x2e02fc(0x9e)](_0xfa277d){const _0x470d78=_0x2e02fc;return this[_0x470d78(0x310)](!!(_0xfa277d!=null&&_0xfa277d['isPermissionRej']));}[_0x2e02fc(0x30e)](){return this;}['toggleOffline'](){const _0x1edc68=_0x2e02fc;return this[_0x1edc68(0x153)]['createInstance'](Z,this[_0x1edc68(0x2ef)],this[_0x1edc68(0xae)],this[_0x1edc68(0x137)],this[_0x1edc68(0x92)],this[_0x1edc68(0x244)]);}[_0x2e02fc(0x9c)](){return this;}[_0x2e02fc(0x310)](_0x1d7e51){const _0x255e10=_0x2e02fc;return this['_injector'][_0x255e10(0x85)](X,this[_0x255e10(0x2ef)],this['type'],this[_0x255e10(0x137)],this[_0x255e10(0x92)],this['_handler'],_0x1d7e51);}};Q=H([V(0x7,_0x17057e(_0x346ad7)),V(0x8,_0x17057e(_0x4b0edd)),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x3ec71c),V(0xc,_0x40dc20),V(0xd,_0x48242e(U))],Q);function gn(_0x2fef4b,_0x467ef3,_0x3c45f8,_0x5f264b,_0xef6585,_0x3cf472){const _0x21373c=_0x2e02fc;return _0x5f264b&&_0xef6585[_0x21373c(0x14d)]?_0x2fef4b[_0x21373c(0x85)](Y,_0x467ef3,_0x3c45f8,_0x5f264b,_0xef6585,_0x3cf472,void 0x0):_0x5f264b?_0x2fef4b[_0x21373c(0x85)](J,_0x467ef3,_0x3c45f8,_0x5f264b,_0x3cf472):_0xef6585[_0x21373c(0x14d)]?_0x2fef4b[_0x21373c(0x85)](q,_0x467ef3,_0x3c45f8,_0xef6585,_0x3cf472):_0x2fef4b[_0x21373c(0x85)](K,_0x467ef3,_0x3c45f8,_0x3cf472);}let $=class extends _0x57b019{get['state'](){return this['_state'];}constructor(_0x4aef9f,_0x4bebac,_0x4d0787,_0x463b18,_0x599cfb,_0x37f6f3,_0x4ca69f,_0x27e135,_0x12f234,_0x4074bd,_0x5accff,_0x11ecc8,_0x1d2776,_0x114234){const _0x74ea34=_0x2e02fc;super(),this['unitID']=_0x4aef9f,this[_0x74ea34(0x21c)]=_0x4bebac,this['_type']=_0x4d0787,this[_0x74ea34(0x153)]=_0x463b18,this[_0x74ea34(0xcc)]=_0x599cfb,this[_0x74ea34(0xbb)]=_0x37f6f3,this[_0x74ea34(0xd3)]=_0x4ca69f,this['_eventService']=_0x27e135,this['_univerInstanceService']=_0x12f234,this[_0x74ea34(0x159)]=_0x4074bd,this['_commandService']=_0x5accff,this['_permissionService']=_0x11ecc8,this[_0x74ea34(0x185)]=_0x1d2776,this[_0x74ea34(0x122)]=_0x114234,z(this,_0x74ea34(0x2d4),new _0xdf7e62(null)),z(this,'state$',this['_state$']['asObservable']()),z(this,_0x74ea34(0x1cb),void 0x0),z(this,'_collaborationPaused',!0x1),z(this,'_changesetSessionId',''),z(this,_0x74ea34(0xb5),0x0),z(this,_0x74ea34(0x1e9),this[_0x74ea34(0x29f)][_0x74ea34(0x31f)](_0x374338(_0x3943c9=>_0x3943c9?_0x3943c9[_0x74ea34(0x1b6)]:_0x74ea34(0x2a0)),_0x5a2c81({'bufferSize':0x1,'refCount':!0x0}))),z(this,_0x74ea34(0x144),!0x1),z(this,'_remoteChangesetQueue',[]);}async['init'](){const _0x36ca8f=_0x2e02fc;if(this[_0x36ca8f(0xf2)])throw Error(_0x36ca8f(0xd0));await this[_0x36ca8f(0x26f)]();}['pauseCollaboration'](){const _0xa2431=_0x2e02fc;return this[_0xa2431(0x1d0)]=!0x0,_0x28ef5c(()=>{const _0x5d8a3f=_0xa2431;this[_0x5d8a3f(0x1d0)]=!0x1,this['_exhaustRemoteChangesetQueue']();});}[_0x2e02fc(0x27c)](_0x37bbdc){const _0x588960=_0x2e02fc;this[_0x588960(0x24b)](_0x37bbdc);}[_0x2e02fc(0x29e)](_0x512a9d){const _0x5d1ba8=_0x2e02fc;this['_state']=_0x512a9d,this[_0x5d1ba8(0x2d4)][_0x5d1ba8(0x160)](_0x512a9d);}async['_init'](){const _0x439176=_0x2e02fc;if(this[_0x439176(0x29e)](await this[_0x439176(0x23b)]()),this[_0x439176(0x185)]){var _0x1cebcf;(_0x1cebcf=this[_0x439176(0x185)])==null||_0x1cebcf[_0x439176(0xf7)](this[_0x439176(0x2ef)]),this[_0x439176(0xce)](this[_0x439176(0x185)][_0x439176(0x2a4)](this[_0x439176(0x2ef)])[_0x439176(0x222)](_0x5add91=>{const _0x12bda2=_0x439176;this[_0x12bda2(0x159)][_0x12bda2(0x181)]('[CollaborationEntity]','editing\x20status\x20changed\x20to',_0x5add91),_0x5add91===0x1?(this[_0x12bda2(0xbc)][_0x12bda2(0x1ba)]({'id':'OTHER_CLIENT_EDITING'}),this[_0x12bda2(0x210)][_0x12bda2(0x197)](new _0x424e79(this[_0x12bda2(0x2ef)])['id'],!0x1),this['_permissionService'][_0x12bda2(0x228)](!0x1)):(this['_permissionService']['updatePermissionPoint'](new _0x424e79(this['unitID'])['id'],!0x0),this[_0x12bda2(0x210)][_0x12bda2(0x228)](!0x0));}));}let _0x1a2669=!0x1;return this[_0x439176(0xce)](this[_0x439176(0x21c)][_0x439176(0xbe)][_0x439176(0x222)](_0x13085=>{const _0x4a199f=_0x439176;_0x13085===0x3?this['_toggleOnline'](_0x1a2669):_0x13085===0x2&&(_0x1a2669=!0x0,this[_0x4a199f(0x23a)]());})),this['disposeWithMe'](this['session'][_0x439176(0x83)]['subscribe'](_0x4b907c=>{const _0x2ca5a2=_0x439176;try{switch(_0x4b907c[_0x2ca5a2(0x161)]){case _0x150d16['NEW_CHANGESETS']:this[_0x2ca5a2(0x29d)](_0x93473e(_0x4b907c[_0x2ca5a2(0xa6)]));break;case _0x150d16[_0x2ca5a2(0xee)]:this[_0x2ca5a2(0x2c6)](_0x4b907c[_0x2ca5a2(0xa6)]);break;case _0x150d16[_0x2ca5a2(0x101)]:this[_0x2ca5a2(0x11d)]();break;case _0x150d16[_0x2ca5a2(0x2a3)]:this['_onRemoteRetry'](_0x4b907c[_0x2ca5a2(0xa6)]);break;case _0x150d16[_0x2ca5a2(0x17a)]:this['_onFetchMissResult'](_0x4b907c[_0x2ca5a2(0xa6)][_0x2ca5a2(0x322)]['map'](_0x12731f=>_0x93473e(_0x12731f)));break;case _0x150d16[_0x2ca5a2(0x2cf)]:this[_0x2ca5a2(0x11d)]({'isPermissionRej':!0x0});break;case _0x150d16[_0x2ca5a2(0x142)]:break;}}catch(_0x525057){throw console['error'](_0x2ca5a2(0x2d8),_0x525057),_0x525057;}})),this[_0x439176(0x1cb)];}[_0x2e02fc(0x268)](){this['_transitionLocked']=!0x1;}[_0x2e02fc(0x2f3)](){const _0x96354f=_0x2e02fc;if(this[_0x96354f(0x144)])throw Error(_0x96354f(0x2da));this['_transitionLocked']=!0x0;}[_0x2e02fc(0x24b)](_0x2d946b){const _0x43a745=_0x2e02fc;this['_lockTransition'](),this[_0x43a745(0x29e)](this[_0x43a745(0x1cb)][_0x43a745(0x11b)](_0x2d946b)),this[_0x43a745(0x268)]();}[_0x2e02fc(0x29d)](_0x2e15cf){const _0x308c9b=_0x2e02fc;if(!(_0x2e15cf[_0x308c9b(0x234)]<=this['_revisionService'][_0x308c9b(0x264)](this['unitID']))){if(this[_0x308c9b(0x1d0)]){this['_remoteChangesetQueue'][_0x308c9b(0x2b8)](_0x2e15cf);return;}this[_0x308c9b(0x196)](_0x2e15cf);}}[_0x2e02fc(0x94)](){const _0x1329c0=_0x2e02fc;this[_0x1329c0(0x14a)][_0x1329c0(0x1c7)](_0x2f431e=>this[_0x1329c0(0x196)](_0x2f431e)),this['_remoteChangesetQueue']=[];}['_applyRemoteChangeset'](_0x5604bd){const _0x2f68b1=_0x2e02fc;let _0x3167b5=this[_0x2f68b1(0xcc)][_0x2f68b1(0x97)][_0x2f68b1(0x156)](this[_0x2f68b1(0xcc)]['interceptor'][_0x2f68b1(0xd5)]()[_0x2f68b1(0x252)])(_0x5604bd[_0x2f68b1(0x324)],null)||_0x5604bd['mutations'],_0x7863ca={..._0x5604bd,'mutations':_0x3167b5};this[_0x2f68b1(0x2f3)](),this[_0x2f68b1(0x29e)](this[_0x2f68b1(0x1cb)]['onRemoteChangeset'](_0x7863ca)),this[_0x2f68b1(0x268)]();}[_0x2e02fc(0x2c6)](_0x7fa88c){const _0x299349=_0x2e02fc;this['_lockTransition'](),this['_updateState'](this[_0x299349(0x1cb)][_0x299349(0xcf)](_0x7fa88c)),this[_0x299349(0x268)]();}[_0x2e02fc(0x11d)](_0x5b98b7){const _0x2a9f32=_0x2e02fc;this[_0x2a9f32(0x2f3)](),this[_0x2a9f32(0x29e)](this[_0x2a9f32(0x1cb)][_0x2a9f32(0x9e)](_0x5b98b7)),this[_0x2a9f32(0x268)]();}[_0x2e02fc(0x13c)](_0xcc6285){const _0x919fbd=_0x2e02fc;this['_lockTransition'](),this[_0x919fbd(0x29e)](this[_0x919fbd(0x1cb)]['onRemoteRetry'](_0xcc6285)),this[_0x919fbd(0x268)]();}[_0x2e02fc(0x8e)](_0x3825ec){const _0x8327c9=_0x2e02fc;if(!(this[_0x8327c9(0x1cb)]instanceof Q))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0x83c130=_0x3825ec[_0x8327c9(0x1a8)](_0x22fdf1=>{const _0x270eed=_0x8327c9;let _0x4767e0=this[_0x270eed(0xcc)][_0x270eed(0x97)][_0x270eed(0x156)](this[_0x270eed(0xcc)][_0x270eed(0x97)][_0x270eed(0xd5)]()[_0x270eed(0x252)])(_0x22fdf1[_0x270eed(0x324)],null)||_0x22fdf1['mutations'];return{..._0x22fdf1,'mutations':_0x4767e0};});this[_0x8327c9(0x2f3)](),this[_0x8327c9(0x29e)](this[_0x8327c9(0x1cb)][_0x8327c9(0xe7)](_0x83c130)),this['_unlockTransition']();}[_0x2e02fc(0x23a)](){const _0x58b581=_0x2e02fc;this['_lockTransition'](),this['_updateState'](this['_state'][_0x58b581(0x2fc)]()),this[_0x58b581(0x268)]();}['_toggleOnline'](_0x228093=!0x1){const _0x328c4b=_0x2e02fc;this[_0x328c4b(0x2f3)](),this[_0x328c4b(0x29e)](this[_0x328c4b(0x1cb)][_0x328c4b(0x9c)]()),this[_0x328c4b(0x268)]();let _0x4b9d44=this[_0x328c4b(0x1cb)];_0x228093&&_0x4b9d44 instanceof K&&(this['_lockTransition'](),this[_0x328c4b(0x29e)](_0x4b9d44['fetchMiss']()),this[_0x328c4b(0x268)]());}async['_createInitialState'](){return new Promise(_0x653e8b=>{const _0x44e3d4=_0x1bad;this[_0x44e3d4(0x21c)][_0x44e3d4(0xbe)][_0x44e3d4(0x31f)](_0x2d16fe(0x1))['subscribe'](async _0x2d77f3=>{const _0x52fa8f=_0x44e3d4;_0x653e8b(await this[_0x52fa8f(0x31c)](_0x2d77f3===0x3));});});}[_0x2e02fc(0x2ac)](){const _0x42e0d6=_0x2e02fc;let _0x5aea14=this[_0x42e0d6(0x2ef)];return{'onStateChange':(_0x32991e,_0x52fb6b)=>{const _0x250937=_0x42e0d6;if(_0x32991e!==this['_state'])throw Error(_0x250937(0x143)+_0x32991e[_0x250937(0x1b6)]+_0x250937(0xdb)+_0x52fb6b[_0x250937(0x1b6)]+_0x250937(0x1fd)+this[_0x250937(0x1cb)][_0x250937(0x1b6)]);this[_0x250937(0x29e)](_0x52fb6b);},'onSendChangeset':_0x2a02a9=>{const _0x5a0be6=_0x42e0d6;_0x2a02a9[_0x5a0be6(0x7e)]||(_0x2a02a9[_0x5a0be6(0x7e)]=this[_0x5a0be6(0x2ea)],_0x2a02a9['reqId']=++this[_0x5a0be6(0xb5)]);let _0x2ade2b={'eventID':_0x150d16[_0x5a0be6(0x176)],'data':{'unitID':_0x2a02a9[_0x5a0be6(0x2ef)],'unitType':this[_0x5a0be6(0x229)],'changeset':_0x2a02a9,'memberID':this['session']['getMemberID']()}};this['session'][_0x5a0be6(0x1fc)](_0x2ade2b,this[_0x5a0be6(0x2ef)]);},'onMissingChangesets':({from:_0x40bf8e,to:_0x48d2cf})=>{const _0x4db9e4=_0x42e0d6;this[_0x4db9e4(0x159)][_0x4db9e4(0x181)](_0x4db9e4(0x110),_0x4db9e4(0x15f)+_0x40bf8e+'\x20to\x20'+_0x48d2cf);let _0x5031f9={'eventID':_0x150d16[_0x4db9e4(0x1b2)],'data':{'unitID':_0x5aea14,'unitType':this['_type'],'from':_0x40bf8e,'to':_0x48d2cf}};this[_0x4db9e4(0x21c)][_0x4db9e4(0x1fc)](_0x5031f9,this[_0x4db9e4(0x2ef)]);}};}async['_createInitialStateImpl'](_0x58dbc){const _0x499c83=_0x2e02fc;var _0x366d1f;let _0x1ce486=await((_0x366d1f=this[_0x499c83(0x122)])==null?void 0x0:_0x366d1f[_0x499c83(0x1bc)](this[_0x499c83(0x2ef)])),_0x83f1af=(_0x1ce486==null?void 0x0:_0x1ce486[_0x499c83(0x324)])??[],_0x2628b8=(_0x1ce486==null?void 0x0:_0x1ce486[_0x499c83(0xa8)])??null,_0x433f8e=!!(_0x2628b8!=null&&_0x2628b8[_0x499c83(0x7e)])&&!!(_0x2628b8!=null&&_0x2628b8[_0x499c83(0x273)]);this['_changesetSessionId']=_0x433f8e?_0x2628b8[_0x499c83(0x7e)]:_0x500aaf(),this[_0x499c83(0xb5)]=_0x433f8e?_0x2628b8['reqId']:0x0;let _0x4a1f7c=this[_0x499c83(0x2ef)];try{this[_0x499c83(0x127)](_0x2628b8,_0x83f1af);}catch(_0x3f3cfc){this[_0x499c83(0x159)][_0x499c83(0x2cd)](_0x3f3cfc);}let _0x36b2ff=this[_0x499c83(0x2ac)]();if(_0x58dbc){let _0x199227=gn(this['_injector'],_0x4a1f7c,this[_0x499c83(0x229)],_0x2628b8,_0x83f1af,_0x36b2ff);return _0x199227 instanceof q?_0x199227[_0x499c83(0x165)]():(_0x199227 instanceof Y||_0x199227 instanceof J)&&_0x199227[_0x499c83(0x1d2)](),_0x199227;}return this['_injector'][_0x499c83(0x85)](Z,_0x4a1f7c,this[_0x499c83(0x229)],_0x2628b8,_0x83f1af,_0x36b2ff);}['_replayCachedMutations'](_0x28285c,_0x4bf646){const _0x47644f=_0x2e02fc;var _0xaab4e2,_0x347d72;let _0x1b86fa=this[_0x47644f(0xcc)][_0x47644f(0x97)]['fetchThroughInterceptors'](this[_0x47644f(0xcc)][_0x47644f(0x97)][_0x47644f(0xd5)]()[_0x47644f(0x252)]);(_0xaab4e2=_0x1b86fa((_0x28285c==null?void 0x0:_0x28285c[_0x47644f(0x324)])||[],null))==null||_0xaab4e2['forEach'](_0x3bf6e5=>this[_0x47644f(0xb1)][_0x47644f(0x316)](_0x3bf6e5['id'],_0x3bf6e5['params'])),(_0x347d72=_0x1b86fa(_0x4bf646||[],null))==null||_0x347d72['forEach'](_0x2f0e01=>this[_0x47644f(0xb1)][_0x47644f(0x316)](_0x2f0e01['id'],_0x2f0e01[_0x47644f(0x169)]));}};$=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],$);let _n=class extends ${constructor(_0x2059fe,_0xde2538,_0x4967ad,_0x19c215,_0xdd509b,_0x12ba2b,_0x2cc137,_0x41b9fe,_0x445ede,_0x220753,_0x3392e2,_0x3b5d2a,_0x48a248,_0x1a9149,_0x57b290){const _0x5de2a6=_0x2e02fc;super(_0x2059fe,_0x4967ad,_0xde2538,_0x19c215,_0xdd509b,_0x12ba2b,_0x2cc137,_0x41b9fe,_0x445ede,_0x220753,_0x3392e2,_0x3b5d2a,_0x1a9149,_0x57b290),this[_0x5de2a6(0x2ef)]=_0x2059fe,this[_0x5de2a6(0xae)]=_0xde2538,this[_0x5de2a6(0x23f)]=_0x48a248,z(this,_0x5de2a6(0x1b4),null);}[_0x2e02fc(0x313)](_0x49ef03){const _0xa0087=_0x2e02fc;this[_0xa0087(0x1b4)]=_0x49ef03;}[_0x2e02fc(0x259)](){const _0x2275dc=_0x2e02fc;this['_handlerCallback']=null,super[_0x2275dc(0x259)]();}[_0x2e02fc(0x2ac)](){const _0x2a6b6b=_0x2e02fc;let _0x4b2a03=super[_0x2a6b6b(0x2ac)]();return _0x4b2a03[_0x2a6b6b(0xed)]=_0x49750e=>{const _0x4f018b=_0x2a6b6b;var _0x30cc56,_0x38afe8;return(_0x30cc56=this[_0x4f018b(0x1b4)])==null||(_0x38afe8=_0x30cc56[_0x4f018b(0xed)])==null?void 0x0:_0x38afe8['call'](_0x30cc56,_0x49750e);},_0x4b2a03[_0x2a6b6b(0x8f)]=_0xf15fce=>{const _0x5ba690=_0x2a6b6b;var _0x8e765,_0x27ae67;return(_0x8e765=this[_0x5ba690(0x1b4)])==null||(_0x27ae67=_0x8e765[_0x5ba690(0x8f)])==null?void 0x0:_0x27ae67[_0x5ba690(0x95)](_0x8e765,_0xf15fce);},_0x4b2a03['onTransformSelections']=_0xa9bb7d=>{const _0x4124c5=_0x2a6b6b;var _0x256739,_0x5d58c8;return(_0x256739=this[_0x4124c5(0x1b4)])==null||(_0x5d58c8=_0x256739[_0x4124c5(0x25e)])==null?void 0x0:_0x5d58c8[_0x4124c5(0x95)](_0x256739,_0xa9bb7d);},_0x4b2a03[_0x2a6b6b(0x1bd)]=_0x3ce916=>{const _0x5473d9=_0x2a6b6b;var _0x4ec5cb,_0x280134;return(_0x4ec5cb=this[_0x5473d9(0x1b4)])==null||(_0x280134=_0x4ec5cb['onSyncEditingCollabCursor'])==null?void 0x0:_0x280134[_0x5473d9(0x95)](_0x4ec5cb,_0x3ce916);},_0x4b2a03[_0x2a6b6b(0x136)]=_0x19764c=>{const _0x1b323d=_0x2a6b6b;var _0x3da8a8,_0x525e0d;return((_0x3da8a8=this[_0x1b323d(0x1b4)])==null||(_0x525e0d=_0x3da8a8['onTransformRemoteChangesetByIMECache'])==null?void 0x0:_0x525e0d[_0x1b323d(0x95)](_0x3da8a8,_0x19764c))??_0x19764c;},_0x4b2a03[_0x2a6b6b(0xe8)]=_0x281b1d=>{const _0x1841f9=_0x2a6b6b;var _0x5d0914,_0x40cc0e;return((_0x5d0914=this['_handlerCallback'])==null||(_0x40cc0e=_0x5d0914[_0x1841f9(0xe8)])==null?void 0x0:_0x40cc0e[_0x1841f9(0x95)](_0x5d0914,_0x281b1d))??_0x281b1d;},_0x4b2a03;}async[_0x2e02fc(0x26f)](){const _0x4d2807=_0x2e02fc;let _0x265b42=await super['_init']();return this[_0x4d2807(0xce)](this['_docStateChangeManagerService'][_0x4d2807(0x1ae)][_0x4d2807(0x222)](_0x2222f5=>{const _0x1b272e=_0x4d2807;if(_0x2222f5==null||_0x2222f5[_0x1b272e(0x299)]!==this['unitID'])return;let {commandId:_0x183410,redoState:_0x27b824,unitId:_0x51ce94}=_0x2222f5,_0x360ff7={'id':_0x183410,'type':_0x459936[_0x1b272e(0x16e)],'params':{'unitId':_0x51ce94,'actions':_0x27b824[_0x1b272e(0x174)],'textRanges':null}};this[_0x1b272e(0x24b)](_0x360ff7);})),this[_0x4d2807(0xce)](this[_0x4d2807(0xb1)]['onMutationExecutedForCollab']((_0x597404,_0x472bb7)=>{const _0x5a1ede=_0x4d2807;if(_0x597404[_0x5a1ede(0xae)]!==_0x459936[_0x5a1ede(0x16e)]||_0x472bb7!=null&&_0x472bb7[_0x5a1ede(0xac)]||_0x472bb7!=null&&_0x472bb7[_0x5a1ede(0x2ae)]||_0x597404['id']===_0x520df5['id'])return;let _0x3a2402=_0x597404[_0x5a1ede(0x169)];if((_0x3a2402==null?void 0x0:_0x3a2402['unitId'])!==this[_0x5a1ede(0x2ef)])return;let _0xa3ce32=_0x597404,_0x1fba28=this['_compressMutationService'][_0x5a1ede(0x97)][_0x5a1ede(0x156)](this['_compressMutationService'][_0x5a1ede(0x97)][_0x5a1ede(0xd5)]()['COMPRESS_MUTATION_SEND'])([_0xa3ce32],this[_0x5a1ede(0x2eb)])||[_0xa3ce32];this[_0x5a1ede(0x24b)](_0x1fba28[0x0]);})),_0x265b42;}};_n=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x17057e(_0x16ea30)),V(0xd,_0x48242e(W)),V(0xe,_0x48242e(U))],_n);let vn=class extends ${constructor(_0xeaece3,_0x357232,_0x56a4f4,_0x4b3ff6,_0x5dbde0,_0x1526aa,_0x406045,_0x67f016,_0xa43e83,_0x1d30c1,_0x267f61,_0x526e51,_0xc02536,_0x167288){const _0x125529=_0x2e02fc;super(_0xeaece3,_0x56a4f4,_0x357232,_0x4b3ff6,_0x5dbde0,_0x1526aa,_0x406045,_0x67f016,_0xa43e83,_0x1d30c1,_0x267f61,_0x526e51,_0xc02536,_0x167288),this['unitID']=_0xeaece3,this[_0x125529(0xae)]=_0x357232;}async[_0x2e02fc(0x26f)](){const _0x2cc2e4=_0x2e02fc;let _0x62d4ca=await super[_0x2cc2e4(0x26f)]();return this[_0x2cc2e4(0xce)](this['_commandService'][_0x2cc2e4(0xf1)]((_0x5c2a21,_0x3e4417)=>{const _0x49a6d7=_0x2cc2e4;if(_0x5c2a21[_0x49a6d7(0xae)]!==_0x459936[_0x49a6d7(0x16e)]||_0x3e4417!=null&&_0x3e4417['fromCollab']||_0x3e4417!=null&&_0x3e4417['onlyLocal'])return;let _0x569dd0=_0x5c2a21[_0x49a6d7(0x169)];if((_0x569dd0==null?void 0x0:_0x569dd0[_0x49a6d7(0x299)])!==this['unitID'])return;let _0x2db589=_0x5c2a21,_0x557a1c=this[_0x49a6d7(0xcc)][_0x49a6d7(0x97)][_0x49a6d7(0x156)](this['_compressMutationService'][_0x49a6d7(0x97)]['getInterceptPoints']()[_0x49a6d7(0x29a)])([_0x2db589],this[_0x49a6d7(0x2eb)])||[_0x2db589];this[_0x49a6d7(0x24b)](_0x557a1c[0x0]);})),_0x62d4ca;}};vn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],vn);let yn=class extends ${constructor(_0x4b143f,_0x2cf288,_0x559764,_0x463eb9,_0x5bbcdf,_0x4f67ab,_0x5a5b13,_0x1d9c7f,_0x587530,_0x4a7105,_0x1e4dd5,_0x4bcfb3,_0x170c15,_0x54f053,_0x3f0b16){const _0x1eef31=_0x2e02fc;super(_0x4b143f,_0x559764,_0x2cf288,_0x463eb9,_0x5bbcdf,_0x4f67ab,_0x5a5b13,_0x587530,_0x4a7105,_0x1e4dd5,_0x4bcfb3,_0x170c15,_0x54f053,_0x3f0b16),this[_0x1eef31(0x2ef)]=_0x4b143f,this[_0x1eef31(0xae)]=_0x2cf288,this[_0x1eef31(0x286)]=_0x1d9c7f;}[_0x2e02fc(0x2ac)](){const _0x17aca4=_0x2e02fc;let _0x1a991f=super[_0x17aca4(0x2ac)]();return _0x1a991f[_0x17aca4(0x25e)]=_0xefebb1=>this['_sheetTransformSelectionsService'][_0x17aca4(0x2e2)](_0xefebb1),_0x1a991f;}async[_0x2e02fc(0x26f)](){const _0x432dcf=_0x2e02fc;let _0x3845da=await super[_0x432dcf(0x26f)]();return this[_0x432dcf(0xce)](this[_0x432dcf(0xb1)][_0x432dcf(0xf1)]((_0x374bfa,_0xc058a9)=>{const _0x582c3=_0x432dcf;if(_0x374bfa[_0x582c3(0xae)]!==_0x459936[_0x582c3(0x16e)]||_0xc058a9!=null&&_0xc058a9[_0x582c3(0xac)]||_0xc058a9!=null&&_0xc058a9[_0x582c3(0x2ae)])return;let _0x2d4d22=_0x374bfa[_0x582c3(0x169)];if((_0x2d4d22==null?void 0x0:_0x2d4d22[_0x582c3(0x299)])!==this['unitID'])return;let _0x5548d3=_0x374bfa,_0x28d495=this['_compressMutationService'][_0x582c3(0x97)][_0x582c3(0x156)](this[_0x582c3(0xcc)][_0x582c3(0x97)][_0x582c3(0xd5)]()[_0x582c3(0x29a)])([_0x5548d3],this[_0x582c3(0x2eb)])||[_0x5548d3];this[_0x582c3(0x24b)](_0x28d495[0x0]);})),_0x3845da;}};yn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(Wt)),V(0x8,_0x17057e(B)),V(0x9,_0x4a3eaa),V(0xa,_0x3efc4d),V(0xb,_0xdb365f),V(0xc,_0x5a8b72),V(0xd,_0x48242e(W)),V(0xe,_0x48242e(U))],yn);let bn=class extends ${constructor(_0x8cf8cd,_0x1cd76f,_0x1c945e,_0x463b11,_0x227f85,_0x29df2e,_0x4b09bc,_0xda9122,_0x42b9d5,_0x30a16e,_0x27ca6e,_0x47c4ae,_0x1118a4,_0x59a1ed){const _0x48da61=_0x2e02fc;super(_0x8cf8cd,_0x1c945e,_0x1cd76f,_0x463b11,_0x227f85,_0x29df2e,_0x4b09bc,_0xda9122,_0x42b9d5,_0x30a16e,_0x27ca6e,_0x47c4ae,_0x1118a4,_0x59a1ed),this[_0x48da61(0x2ef)]=_0x8cf8cd,this[_0x48da61(0xae)]=_0x1cd76f;}async[_0x2e02fc(0x26f)](){const _0x2b0974=_0x2e02fc;let _0x563390=await super[_0x2b0974(0x26f)]();return this[_0x2b0974(0xce)](this[_0x2b0974(0xb1)]['onMutationExecutedForCollab']((_0x33bd61,_0x32ce38)=>{const _0x3adbbd=_0x2b0974;if(_0x33bd61[_0x3adbbd(0xae)]!==_0x459936[_0x3adbbd(0x16e)]||_0x32ce38!=null&&_0x32ce38[_0x3adbbd(0xac)]||_0x32ce38!=null&&_0x32ce38[_0x3adbbd(0x2ae)])return;let _0x5339b0=_0x33bd61[_0x3adbbd(0x169)];if((_0x5339b0==null?void 0x0:_0x5339b0['unitId'])!==this[_0x3adbbd(0x2ef)])return;let _0x1231f3=_0x33bd61,_0x201ecb=this[_0x3adbbd(0xcc)][_0x3adbbd(0x97)][_0x3adbbd(0x156)](this['_compressMutationService'][_0x3adbbd(0x97)]['getInterceptPoints']()['COMPRESS_MUTATION_SEND'])([_0x1231f3],this[_0x3adbbd(0x2eb)])||[_0x1231f3];this[_0x3adbbd(0x24b)](_0x201ecb[0x0]);})),_0x563390;}};bn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],bn);let xn=class extends ${constructor(_0xd41dd8,_0x867902,_0x973275,_0x38ebe0,_0x576101,_0x2d37a0,_0xdd0e40,_0x234328,_0x5bb8a1,_0x224714,_0x23974c,_0xeb6ec,_0x20d61d,_0xcca02e){const _0x4ff03c=_0x2e02fc;super(_0xd41dd8,_0x973275,_0x867902,_0x38ebe0,_0x576101,_0x2d37a0,_0xdd0e40,_0x234328,_0x5bb8a1,_0x224714,_0x23974c,_0xeb6ec,_0x20d61d,_0xcca02e),this['unitID']=_0xd41dd8,this[_0x4ff03c(0xae)]=_0x867902;}async[_0x2e02fc(0x26f)](){const _0x3ea5ff=_0x2e02fc;let _0x40c1ce=await super[_0x3ea5ff(0x26f)]();return this[_0x3ea5ff(0xce)](this['_commandService'][_0x3ea5ff(0xf1)]((_0x24f370,_0x2230b4)=>{const _0x5df5aa=_0x3ea5ff;if(_0x24f370['type']!==_0x459936[_0x5df5aa(0x16e)]||_0x2230b4!=null&&_0x2230b4[_0x5df5aa(0xac)]||_0x2230b4!=null&&_0x2230b4[_0x5df5aa(0x2ae)])return;let _0x1cc5ab=_0x24f370['params'];if((_0x1cc5ab==null?void 0x0:_0x1cc5ab[_0x5df5aa(0x299)])!==this[_0x5df5aa(0x2ef)])return;let _0x5f2b31=_0x24f370,_0x4d01f7=this[_0x5df5aa(0xcc)][_0x5df5aa(0x97)][_0x5df5aa(0x156)](this['_compressMutationService']['interceptor'][_0x5df5aa(0xd5)]()[_0x5df5aa(0x29a)])([_0x5f2b31],this[_0x5df5aa(0x2eb)])||[_0x5f2b31];this[_0x5df5aa(0x24b)](_0x4d01f7[0x0]);})),_0x40c1ce;}};xn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],xn);let Sn=class extends ${constructor(_0x54ae4b,_0x39ffb1,_0x7a1e9a,_0x129933,_0x28315c,_0x2f6e1b,_0x16255c,_0x50c55a,_0x4dbcd5,_0x5d03aa,_0x15c6a9,_0x28015f,_0x59000a,_0x494ceb){super(_0x54ae4b,_0x7a1e9a,_0x39ffb1,_0x129933,_0x28315c,_0x2f6e1b,_0x16255c,_0x50c55a,_0x4dbcd5,_0x5d03aa,_0x15c6a9,_0x28015f,_0x59000a,_0x494ceb),this['unitID']=_0x54ae4b,this['type']=_0x39ffb1;}async['_init'](){const _0x444425=_0x2e02fc;let _0x3dd418=await super[_0x444425(0x26f)]();return this[_0x444425(0xce)](this[_0x444425(0xb1)]['onMutationExecutedForCollab']((_0x54c764,_0x3f02c1)=>{const _0x61af2d=_0x444425;if(_0x54c764[_0x61af2d(0xae)]!==_0x459936['MUTATION']||_0x3f02c1!=null&&_0x3f02c1[_0x61af2d(0xac)]||_0x3f02c1!=null&&_0x3f02c1['onlyLocal'])return;let _0x5a9d0a=_0x54c764[_0x61af2d(0x169)];if((_0x5a9d0a==null?void 0x0:_0x5a9d0a[_0x61af2d(0x299)])!==this[_0x61af2d(0x2ef)])return;let _0xf6e0ec=_0x54c764,_0x40e89a=this['_compressMutationService'][_0x61af2d(0x97)][_0x61af2d(0x156)](this[_0x61af2d(0xcc)][_0x61af2d(0x97)]['getInterceptPoints']()[_0x61af2d(0x29a)])([_0xf6e0ec],this[_0x61af2d(0x2eb)])||[_0xf6e0ec];this[_0x61af2d(0x24b)](_0x40e89a[0x0]);})),_0x3dd418;}};Sn=H([V(0x3,_0x17057e(_0x346ad7)),V(0x4,_0x17057e(_0xe47be4)),V(0x5,_0x17057e(_0xc4a55f)),V(0x6,_0x17057e(_0x4b0edd)),V(0x7,_0x17057e(B)),V(0x8,_0x4a3eaa),V(0x9,_0x3efc4d),V(0xa,_0xdb365f),V(0xb,_0x5a8b72),V(0xc,_0x48242e(W)),V(0xd,_0x48242e(U))],Sn);const Cn=_0x3a76ad('univer-pro.collaboration-client.network-condition.service');function wn(_0xcb7a80){const _0xd06f75=_0x2e02fc;let _0x1fb08d=_0xcb7a80[_0xd06f75(0xa6)],_0x4582a3=JSON[_0xd06f75(0x215)](_0x1fb08d);switch(_0x4582a3['cmd']){case _0x6e704b['HEARTBEAT']:case _0x6e704b[_0xd06f75(0x2ab)]:{let _0x41a3d2=_0x4582a3[_0xd06f75(0xc9)];return{..._0x4582a3,'data':_0x41a3d2,'cmd':_0x4582a3[_0xd06f75(0x2d6)]};}case _0x6e704b[_0xd06f75(0x124)]:{let _0x4ec571=_0x4582a3[_0xd06f75(0x29b)];return{..._0x4582a3,'data':_0x4ec571,'cmd':_0x4582a3[_0xd06f75(0x2d6)]};}case _0x6e704b[_0xd06f75(0x2a6)]:{let _0x58b13b=_0x4582a3[_0xd06f75(0xdf)];switch(_0x58b13b['eventID']){case _0x150d16[_0xd06f75(0x2cf)]:var _0x254ac8;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x254ac8=_0x58b13b[_0xd06f75(0x315)])==null?void 0x0:_0x254ac8['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0xee)]:var _0x2a92ca;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x2a92ca=_0x58b13b[_0xd06f75(0x2f5)])==null?void 0x0:_0x2a92ca['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16['NEW_CHANGESETS']:var _0x18c037;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x18c037=_0x58b13b[_0xd06f75(0xe4)])==null?void 0x0:_0x18c037['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x101)]:var _0x28946b;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x28946b=_0x58b13b[_0xd06f75(0x158)])==null?void 0x0:_0x28946b['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x2a3)]:var _0x3cd35a;return{..._0x4582a3,'data':{..._0x58b13b,'data':(_0x3cd35a=_0x58b13b['csShouldRetryEvent'])==null?void 0x0:_0x3cd35a['cs']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16['UPDATE_CURSOR']:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b['updateCursorEvent']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16['USERS_ENTER']:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0xb7)]},'cmd':_0x4582a3['cmd']};case _0x150d16[_0xd06f75(0xa7)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x188)]},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x306)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x1c3)]},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x1c1)]:case _0x150d16['LIVESHARE_OPERATION']:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x20a)]},'cmd':_0x4582a3['cmd']};case _0x150d16[_0xd06f75(0x1db)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x1c3)]},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x1bb)]:return{..._0x4582a3,'data':_0x58b13b,'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x1a7)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b['commentUpdateEvent']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16['UPDATE_PERMISSION_OBJ']:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x96)]},'cmd':_0x4582a3['cmd']};case _0x150d16[_0xd06f75(0x2e3)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b['shouldCloseConn']},'cmd':_0x4582a3[_0xd06f75(0x2d6)]};case _0x150d16[_0xd06f75(0x142)]:return{..._0x4582a3,'data':{..._0x58b13b,'data':_0x58b13b[_0xd06f75(0x283)]},'cmd':_0x4582a3['cmd']};default:return _0x4582a3;}}default:return _0x4582a3;}}function Tn(_0x4f1263){const _0x6f25b4=_0x2e02fc;switch(_0x4f1263[_0x6f25b4(0x2d6)]){case _0x6e704b[_0x6f25b4(0x1e4)]:case _0x6e704b[_0x6f25b4(0x2ab)]:return JSON[_0x6f25b4(0xc0)]({'cmd':_0x4f1263['cmd'],'routeKey':_0x4f1263[_0x6f25b4(0x19f)]});case _0x6e704b[_0x6f25b4(0x7f)]:{let _0x3de590;switch(_0x4f1263[_0x6f25b4(0xa6)][_0x6f25b4(0x161)]){case _0x150d16['UPDATE_CURSOR']:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0x27e)],'updateCursorEvent':_0x4f1263[_0x6f25b4(0xa6)][_0x6f25b4(0xa6)]};break;case _0x150d16[_0x6f25b4(0xa7)]:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0xa7)],'leaveEvent':_0x4f1263[_0x6f25b4(0xa6)][_0x6f25b4(0xa6)]};break;case _0x150d16[_0x6f25b4(0x18c)]:_0x3de590={'eventID':_0x150d16['USERS_ENTER'],'joinEvent':_0x4f1263['data'][_0x6f25b4(0xa6)]};break;case _0x150d16['LIVESHARE_NEW_HOST']:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0x306)],'liveShareNewHost':_0x4f1263[_0x6f25b4(0xa6)]['data']};break;case _0x150d16[_0x6f25b4(0x211)]:_0x3de590={'eventID':_0x150d16['LIVESHARE_OPERATION'],'liveShareOperation':_0x4f1263[_0x6f25b4(0xa6)]['data']};break;case _0x150d16[_0x6f25b4(0x1db)]:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0x1db)],'liveShareTerminate':_0x4f1263[_0x6f25b4(0xa6)]['data']};break;case _0x150d16[_0x6f25b4(0x1a4)]:_0x3de590={'eventID':_0x150d16['LIVESHARE_REQUEST_HOST'],'liveShareRequestHost':_0x4f1263['data'][_0x6f25b4(0xa6)]};break;case _0x150d16['LIVESHARE_FETCH_OPERATIONS']:_0x3de590={'eventID':_0x150d16[_0x6f25b4(0x1c1)]};break;default:_0x3de590={'eventID':_0x4f1263[_0x6f25b4(0xa6)][_0x6f25b4(0x161)]};}return JSON[_0x6f25b4(0xc0)]({'cmd':_0x4f1263['cmd'],'routeKey':_0x4f1263[_0x6f25b4(0x19f)],'collaMsg':_0x3de590});}case _0x6e704b['JOIN']:return JSON[_0x6f25b4(0xc0)]({'cmd':_0x4f1263[_0x6f25b4(0x2d6)],'routeKey':_0x4f1263['routeKey'],'joinReq':_0x4f1263['data']});case _0x6e704b['LEAVE']:return JSON[_0x6f25b4(0xc0)]({'cmd':_0x4f1263[_0x6f25b4(0x2d6)],'routeKey':_0x4f1263['routeKey'],'leaveReq':_0x4f1263[_0x6f25b4(0xa6)]});default:throw Error(_0x6f25b4(0x1b7));}}const En=_0x3a76ad(_0x2e02fc(0x302));function Dn(_0x50e906,_0x1be9f3,_0x3ccc4d){const _0x2f276a=_0x2e02fc;return _0x50e906+'/'+_0x1be9f3+_0x2f276a(0x1cc)+_0x3ccc4d+_0x2f276a(0x1c6);}let On=class extends _0x5af3d8{constructor(_0x1114ef,_0x52f996,_0x5536fa,_0x2cfc87,_0x57a5d6){const _0x4501b8=_0x2e02fc;super(),this[_0x4501b8(0x153)]=_0x1114ef,this[_0x4501b8(0x1da)]=_0x52f996,this[_0x4501b8(0x24e)]=_0x5536fa,this['_logService']=_0x2cfc87,this[_0x4501b8(0xb6)]=_0x57a5d6;}[_0x2e02fc(0x157)](_0xf73db4){const _0x186d3a=_0x2e02fc;let _0x304b1b=this[_0x186d3a(0x153)][_0x186d3a(0x241)](_0x12b950);if(!_0x304b1b)throw Error(_0x186d3a(0x1d5));let _0x15fa3a=_0x304b1b[_0x186d3a(0x155)](_0xf73db4);if(!_0x15fa3a)throw Error(_0x186d3a(0x1b0));let _0x5d1c24=new _0x38ef99(),_0x4fdcdc=new _0x4301b4();_0x5d1c24['add'](_0x15fa3a[_0x186d3a(0x237)]['subscribe'](_0x1831d4=>_0x4fdcdc[_0x186d3a(0x160)](_0x1831d4))),_0x5d1c24[_0x186d3a(0x1c4)](_0x28ef5c(()=>_0x4fdcdc[_0x186d3a(0xc1)]()));let _0x34f979=new _0x4301b4();_0x5d1c24[_0x186d3a(0x1c4)](_0x15fa3a[_0x186d3a(0x221)]['subscribe'](_0x5df31b=>_0x34f979[_0x186d3a(0x160)](_0x5df31b))),_0x5d1c24[_0x186d3a(0x1c4)](_0x28ef5c(()=>_0x34f979[_0x186d3a(0xc1)]()));let _0x423955=new _0x4301b4();_0x5d1c24['add'](_0x15fa3a[_0x186d3a(0x2a7)][_0x186d3a(0x222)](_0x55b98f=>{const _0x3a07f7=_0x186d3a;let _0x220bfa=wn(_0x55b98f);_0x423955[_0x3a07f7(0x160)](_0x220bfa);})),_0x5d1c24['add'](_0x28ef5c(()=>_0x423955[_0x186d3a(0xc1)]()));let _0x28a72b,_0x141eaf=()=>{const _0x3f5b80=_0x186d3a;_0x34f979[_0x3f5b80(0x160)](new Event('connection\x20error')),_0x4fdcdc['next'](new Event(_0x3f5b80(0x175))),_0x28a72b[_0x3f5b80(0x28d)]();};return _0x28a72b={'memberID':'','close$':_0x4fdcdc[_0x186d3a(0x1d9)](),'error$':_0x34f979[_0x186d3a(0x1d9)](),'open$':_0x15fa3a[_0x186d3a(0x1c5)],'message$':_0x423955['asObservable'](),'send':_0x55017d=>{const _0xb83e6=_0x186d3a;if(_0x55017d[_0xb83e6(0x2d6)]===_0x6e704b['INGEST']){if(_0x55017d[_0xb83e6(0xa6)][_0xb83e6(0x161)]===_0x150d16[_0xb83e6(0x176)]){this[_0xb83e6(0x150)](_0x28a72b,_0x55017d['data'])['catch'](_0x459270=>{const _0x138e7c=_0xb83e6;this[_0x138e7c(0x159)][_0x138e7c(0x2cd)](_0x459270),_0x141eaf();});return;}if(_0x55017d[_0xb83e6(0xa6)][_0xb83e6(0x161)]===_0x150d16[_0xb83e6(0x1b2)]){let _0x56bafb=_0x55017d[_0xb83e6(0xa6)];this['_fetchMissChangesets'](_0x56bafb)[_0xb83e6(0x1a5)](_0x32db5b=>{const _0x5bedf7=_0xb83e6;_0x423955['next']({'cmd':_0x6e704b[_0x5bedf7(0x2a6)],'code':_0x2b2822['OK'],'routeKey':_0x56bafb[_0x5bedf7(0xa6)][_0x5bedf7(0x2ef)],'routeType':'','data':{'eventID':_0x150d16['PSEUDO_FETCH_MISSING_RESULT'],'data':{'changesets':_0x32db5b}}});})['catch'](_0x58790b=>{const _0x4e601c=_0xb83e6;this[_0x4e601c(0x159)][_0x4e601c(0x2cd)](_0x58790b),_0x141eaf();});return;}}_0x15fa3a['send'](Tn(_0x55017d));},'close':()=>{const _0x3d038a=_0x186d3a;_0x15fa3a[_0x3d038a(0x28d)](),_0x5d1c24['dispose']();}},_0x28a72b;}async[_0x2e02fc(0x150)](_0x2acbe1,_0x1c3918){const _0x16701a=_0x2e02fc;let {unitType:_0x4a3ae7,unitID:_0x186351,changeset:_0x2f1b73}=_0x1c3918[_0x16701a(0xa6)],_0x448e92={'unitID':_0x186351,'memberID':_0x2acbe1['memberID'],'type':_0x4a3ae7,'changeset':_0xe3775b(_0x2f1b73)},_0x4391c5=this[_0x16701a(0x24e)][_0x16701a(0xe2)](R),_0x10c044=Dn((_0x4391c5==null?void 0x0:_0x4391c5[_0x16701a(0x11a)])??_0x16701a(0x149),_0x4a3ae7,_0x186351);try{await this[_0x16701a(0x1da)][_0x16701a(0x258)](_0x10c044,{'body':_0x448e92});}catch(_0xf2fbaa){throw this[_0x16701a(0x159)][_0x16701a(0x2cd)]('[CollaborationSession]',_0x16701a(0x134)),_0xf2fbaa;}}async[_0x2e02fc(0x295)](_0x14374d){const _0x10e876=_0x2e02fc;let {unitID:_0x5021a3,from:_0x281a5e,to:_0x499599,unitType:_0x1402ea}=_0x14374d['data'];return(await this['_snapshotServerService'][_0x10e876(0x87)]({'metadata':void 0x0},{'unitID':_0x5021a3,'type':_0x1402ea,'from':_0x281a5e,'to':_0x499599}))[_0x10e876(0x322)][_0x10e876(0x1a8)](_0x213211=>((_0x213211[_0x10e876(0x324)]===null||_0x213211[_0x10e876(0x324)]===void 0x0)&&(_0x213211[_0x10e876(0x324)]=[]),_0x213211));}};On=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x17057e(_0x340ce5)),V(0x2,_0x39e8ee),V(0x3,_0x3efc4d),V(0x4,_0xa027ef)],On);const kn=_0x3a76ad(_0x2e02fc(0x20c));function An(_0x28c876={}){const _0x57f4ba=_0x2e02fc;return _0x28c876[_0x57f4ba(0x255)]?{'resolveUnit':_0x28c876['resolveUnit']}:{'resolveUnit':_0xf2f787=>({'target':{'unitId':_0xf2f787[_0x57f4ba(0x299)],'unitType':_0xf2f787['unitType']}})};}function jn(_0x73ffc0,_0x593b78,_0x277a4d){const _0x542be8=_0x2e02fc;let _0x49a91a=_0x277a4d['target'][_0x542be8(0x2d3)];if(_0x49a91a!=null&&_0x49a91a['trim']()==='')throw Error('COLLABORATION_ENDPOINT_INVALID');if(!_0x277a4d['target'][_0x542be8(0x299)])throw Error('COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED');return{'localUnitId':_0x73ffc0,'unitType':_0x593b78,'target':{'endpoint':_0x49a91a,'unitId':_0x277a4d[_0x542be8(0x16f)][_0x542be8(0x299)],'unitType':_0x277a4d[_0x542be8(0x16f)][_0x542be8(0x297)]??_0x593b78},'changeset':_0x277a4d[_0x542be8(0xaf)]};}let Mn=class extends _0x5af3d8{constructor(_0x5a4cd3,_0x5b624c,_0x482b21,_0x1440a2,_0x21b253,_0x25f54d,_0x52c25c){const _0x52bf10=_0x2e02fc;super(),this[_0x52bf10(0x153)]=_0x5a4cd3,this['_logService']=_0x5b624c,this[_0x52bf10(0x24e)]=_0x482b21,this['_socketService']=_0x1440a2,this[_0x52bf10(0x23c)]=_0x21b253,this[_0x52bf10(0x19b)]=_0x25f54d,this[_0x52bf10(0xf0)]=_0x52c25c,z(this,_0x52bf10(0x119),new Map()),z(this,_0x52bf10(0x1a3),new Map()),z(this,'_sessionChannels',new Map()),z(this,_0x52bf10(0x1cd),new Map()),z(this,'socket$',this[_0x52bf10(0x28c)](void 0x0)['socket$'][_0x52bf10(0x1d9)]()),z(this,_0x52bf10(0x2a8),new _0xdf7e62(0x0)),z(this,'status$',this[_0x52bf10(0x2a8)]['asObservable']()),this[_0x52bf10(0x2c0)]();}['_listenToNetworkCondition'](){const _0x53d971=_0x2e02fc;this[_0x53d971(0xf0)]&&this[_0x53d971(0xce)](this[_0x53d971(0xf0)][_0x53d971(0x2f4)][_0x53d971(0x222)](_0x523523=>{const _0x7a20b3=_0x53d971;_0x523523&&this['reconnect'](),_0x523523||this[_0x7a20b3(0x1cd)][_0x7a20b3(0x1c7)](_0x12634e=>this[_0x7a20b3(0x289)](_0x12634e));}));}['dispose'](){const _0x237bc5=_0x2e02fc;super['dispose'](),this[_0x237bc5(0x1cd)][_0x237bc5(0x1c7)](_0x373477=>{const _0xc35822=_0x237bc5;var _0x401ab3,_0x44712a;(_0x401ab3=_0x373477['socketMessageSubscription'])==null||_0x401ab3['unsubscribe'](),_0x373477[_0xc35822(0x1a1)]=null,this['_clearRetryConnectingTimer'](_0x373477),this[_0xc35822(0xb0)](_0x373477),this[_0xc35822(0x206)](_0x373477),(_0x44712a=_0x373477[_0xc35822(0x120)]['getValue']())==null||_0x44712a['close'](),_0x373477[_0xc35822(0x120)][_0xc35822(0xc1)]();}),this[_0x237bc5(0x1cd)]['clear'](),this['_sessions'][_0x237bc5(0x1c7)](_0x57ec55=>_0x57ec55[_0x237bc5(0x259)]()),this[_0x237bc5(0x119)][_0x237bc5(0x303)](),this[_0x237bc5(0x24d)][_0x237bc5(0x303)](),this[_0x237bc5(0x2a8)][_0x237bc5(0xc1)]();}async[_0x2e02fc(0x1d8)](_0x1ded2a,_0x3c3b29){const _0x458af9=_0x2e02fc;if(this[_0x458af9(0x119)][_0x458af9(0x2c9)](_0x1ded2a))return this['_sessions'][_0x458af9(0x241)](_0x1ded2a);let _0x6817d8=this['_pendingSessions'][_0x458af9(0x241)](_0x1ded2a);if(_0x6817d8)return _0x6817d8;let _0x26603d=this[_0x458af9(0x12f)](_0x1ded2a,_0x3c3b29);this[_0x458af9(0x1a3)][_0x458af9(0x2e9)](_0x1ded2a,_0x26603d);try{return await _0x26603d;}finally{this[_0x458af9(0x1a3)][_0x458af9(0xb4)](_0x1ded2a);}}async[_0x2e02fc(0x12f)](_0x1f7699,_0x6b399a){const _0x4ccc9b=_0x2e02fc;let _0x5dd8a3=await this[_0x4ccc9b(0x179)](_0x1f7699,_0x6b399a),_0x500856=this[_0x4ccc9b(0x28c)](_0x5dd8a3['target'][_0x4ccc9b(0x2d3)]);this[_0x4ccc9b(0x2bd)](_0x500856);let _0x3bcdec=this[_0x4ccc9b(0x153)]['createInstance'](Vt,_0x5dd8a3,_0x500856[_0x4ccc9b(0x120)][_0x4ccc9b(0x1d9)]());return this[_0x4ccc9b(0x119)][_0x4ccc9b(0x2e9)](_0x1f7699,_0x3bcdec),this[_0x4ccc9b(0x24d)]['set'](_0x1f7699,_0x500856[_0x4ccc9b(0xe6)]),_0x3bcdec;}[_0x2e02fc(0x15a)](_0x12b398){const _0x49f1e1=_0x2e02fc;let _0x41198f=this['_sessions'][_0x49f1e1(0x241)](_0x12b398),_0x131f8b=this[_0x49f1e1(0x24d)][_0x49f1e1(0x241)](_0x12b398);if(_0x41198f&&(this[_0x49f1e1(0x119)][_0x49f1e1(0xb4)](_0x12b398),this[_0x49f1e1(0x24d)][_0x49f1e1(0xb4)](_0x12b398),_0x41198f['close']()),_0x131f8b&&!this[_0x49f1e1(0x1f2)](_0x131f8b)){var _0x1f6f6d;let _0x22e1cb=this[_0x49f1e1(0x1cd)][_0x49f1e1(0x241)](_0x131f8b);_0x22e1cb==null||(_0x1f6f6d=_0x22e1cb[_0x49f1e1(0x120)]['getValue']())==null||_0x1f6f6d['close']();}}[_0x2e02fc(0xaa)](){const _0x530f21=_0x2e02fc;(this['_socketChannels'][_0x530f21(0x1ca)]?[...this[_0x530f21(0x1cd)][_0x530f21(0x2c3)]()]:[this[_0x530f21(0x28c)](void 0x0)])[_0x530f21(0x1c7)](_0x3273fc=>{const _0x5ae858=_0x530f21;_0x3273fc['retryCount']=0x0,this[_0x5ae858(0x148)](_0x3273fc),this[_0x5ae858(0x1f3)](_0x3273fc);});}[_0x2e02fc(0x148)](_0x5d2108){const _0x1943a5=_0x2e02fc;_0x5d2108['retryConnectingTimer']!=null&&(clearTimeout(_0x5d2108[_0x1943a5(0x8b)]),_0x5d2108[_0x1943a5(0x8b)]=null);}async['_createSocket'](_0x283c8a){const _0x10656b=_0x2e02fc;let _0x23b10f=this[_0x10656b(0x24e)][_0x10656b(0xe2)](R),_0x2fbbf7=_0x283c8a['endpoint']??(_0x23b10f==null?void 0x0:_0x23b10f[_0x10656b(0x18e)])??_0x10656b(0x2fb),_0x5aa10=await this[_0x10656b(0x305)][_0x10656b(0x155)](_0x2fbbf7);return _0x283c8a[_0x10656b(0x16b)]=_0x5aa10,_0x5aa10;}async['_tryEnsureSocket'](_0x3699d4){const _0x3b4738=_0x2e02fc;try{let _0x4e2312=_0x3699d4[_0x3b4738(0x120)][_0x3b4738(0x279)]()??_0x3699d4['candidateSocket']??await this[_0x3b4738(0x308)](_0x3699d4);if(_0x4e2312){var _0x3555a9;let _0x3a477a=_0x4e2312[_0x3b4738(0x1fc)];_0x4e2312[_0x3b4738(0x1fc)]=_0x28757d=>(_0x28757d[_0x3b4738(0x2d6)]!==_0x6e704b[_0x3b4738(0xdc)]&&this['_rescheduleHeartbeat'](_0x3699d4),_0x3a477a[_0x3b4738(0x22c)](_0x4e2312,[_0x28757d])),(_0x3555a9=_0x3699d4[_0x3b4738(0x1a1)])==null||_0x3555a9['unsubscribe'](),_0x3699d4[_0x3b4738(0x1a1)]=null,_0x3699d4[_0x3b4738(0x1a1)]=_0x4e2312[_0x3b4738(0x2a7)]['subscribe'](_0x178a13=>this[_0x3b4738(0xfe)](_0x3699d4,_0x4e2312,_0x178a13)),_0x4e2312[_0x3b4738(0x221)][_0x3b4738(0x31f)](_0x411165(0x1))[_0x3b4738(0x222)](_0x340b32=>this[_0x3b4738(0x159)][_0x3b4738(0x2cd)]('[CollaborationSessionService]:\x20socket\x20error',_0x340b32)),_0x4e2312[_0x3b4738(0x1c5)][_0x3b4738(0x31f)](_0x411165(0x1))['subscribe'](()=>{const _0x29e0a8=_0x3b4738;this[_0x29e0a8(0x86)](_0x3699d4,_0x4e2312);}),_0x4e2312[_0x3b4738(0x237)][_0x3b4738(0x31f)](_0x411165(0x1))['subscribe'](_0x4881e5=>{const _0x41dbce=_0x3b4738;this['_logService'][_0x41dbce(0x181)](_0x41dbce(0x10f),_0x41dbce(0x1ab),_0x4881e5),this['_onConnectionFailed'](_0x3699d4);});}}catch(_0x4c8e92){this[_0x3b4738(0x159)]['error'](_0x4c8e92),this[_0x3b4738(0x108)](_0x3699d4);}}[_0x2e02fc(0x86)](_0x1a6c13,_0x1f648c){const _0x5cd645=_0x2e02fc;this[_0x5cd645(0x159)][_0x5cd645(0x181)](_0x5cd645(0x10f),_0x5cd645(0x22b)),_0x1f648c[_0x5cd645(0x1fc)]({'cmd':_0x6e704b[_0x5cd645(0x2ab)]}),this['_rescheduleHeartbeat'](_0x1a6c13);}[_0x2e02fc(0x289)](_0x31cf43){const _0x1641e1=_0x2e02fc;_0x31cf43[_0x1641e1(0x126)]=!0x1,_0x31cf43['candidateSocket']=null,this['_status$'][_0x1641e1(0x160)](0x2),_0x31cf43[_0x1641e1(0x120)]['next'](null),this[_0x1641e1(0xb0)](_0x31cf43),this['_clearHeartbeatTimer'](_0x31cf43);}['_onConnectionFailed'](_0x2e4bf2){const _0x217d3e=_0x2e02fc;this['_onOffline'](_0x2e4bf2),this[_0x217d3e(0x1f2)](_0x2e4bf2['endpointKey'])&&(_0x2e4bf2[_0x217d3e(0x107)]<(this[_0x217d3e(0x24e)][_0x217d3e(0xe2)](_0x217d3e(0xca))??0x3)?(this['_collaborationUIEventService'][_0x217d3e(0x1ba)]({'id':_0x217d3e(0x2e6)}),this['_tryReconnect'](_0x2e4bf2)):this[_0x217d3e(0x23c)][_0x217d3e(0x1ba)]({'id':'SOCKET_FAILED'}));}[_0x2e02fc(0x1f3)](_0x530c6c){const _0x23bb49=_0x2e02fc;let _0x54db1f=_0x530c6c[_0x23bb49(0x107)],_0x4c4e4d=this[_0x23bb49(0x24e)]['getConfig'](R),_0x3560e8=_0x54db1f===0x0?0x0:((_0x4c4e4d==null?void 0x0:_0x4c4e4d[_0x23bb49(0x14f)])??0x4e20)*0x2**_0x54db1f;_0x530c6c[_0x23bb49(0x8b)]=setTimeout(()=>{const _0x29df06=_0x23bb49;clearTimeout(_0x530c6c[_0x29df06(0x8b)]),_0x530c6c['retryConnectingTimer']=null,this['_tryEnsureSocket'](_0x530c6c);},_0x3560e8),_0x530c6c[_0x23bb49(0x107)]+=0x1;}async['_resolveSessionIdentity'](_0x30a277,_0x1cbdd1){const _0x317165=_0x2e02fc;return jn(_0x30a277,_0x1cbdd1,await this[_0x317165(0x19b)][_0x317165(0x255)]({'unitId':_0x30a277,'unitType':_0x1cbdd1}));}['_onMessage'](_0x2770d2,_0x101134,_0x45f666){const _0x5d3695=_0x2e02fc;let {cmd:_0x3181b1}=_0x45f666;_0x3181b1===_0x6e704b[_0x5d3695(0x2ab)]&&!_0x2770d2[_0x5d3695(0x126)]&&(_0x101134[_0x5d3695(0xf3)]=_0x45f666['data']['memberID'],_0x2770d2[_0x5d3695(0x120)][_0x5d3695(0x160)](_0x101134),this[_0x5d3695(0x2a8)][_0x5d3695(0x160)](0x3),_0x2770d2[_0x5d3695(0x126)]=!0x0,_0x2770d2[_0x5d3695(0x16b)]=null),_0x3181b1===_0x6e704b[_0x5d3695(0x1e4)]&&this[_0x5d3695(0xb0)](_0x2770d2),this[_0x5d3695(0x319)](_0x2770d2);}[_0x2e02fc(0x1f2)](_0x59976e){const _0x1baca0=_0x2e02fc;return[...this[_0x1baca0(0x24d)]['values']()]['some'](_0x195ab4=>_0x195ab4===_0x59976e);}['_getSocketChannel'](_0x40016e){const _0x35e3a4=_0x2e02fc;let _0x343126=_0x40016e??'',_0x3a17b9=this[_0x35e3a4(0x1cd)]['get'](_0x343126);if(_0x3a17b9)return _0x3a17b9;let _0x5b542f={'endpointKey':_0x343126,'endpoint':_0x40016e,'socket$':new _0xdf7e62(void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x35e3a4(0x1cd)]['set'](_0x343126,_0x5b542f),_0x5b542f;}[_0x2e02fc(0x319)](_0x308c82){const _0x27a6d7=_0x2e02fc;this[_0x27a6d7(0x206)](_0x308c82),_0x308c82[_0x27a6d7(0x1d4)]=setTimeout(()=>this[_0x27a6d7(0x235)](_0x308c82),this[_0x27a6d7(0x24e)]['getConfig'](_0x27a6d7(0x183))??0x7530);}[_0x2e02fc(0x235)](_0x222c59){const _0x4ec3ae=_0x2e02fc;_0x222c59['socket$'][_0x4ec3ae(0x279)]()[_0x4ec3ae(0x1fc)]({'cmd':_0x6e704b[_0x4ec3ae(0x1e4)]}),this[_0x4ec3ae(0xbd)](_0x222c59);}[_0x2e02fc(0xbd)](_0x169b7e){const _0x208925=_0x2e02fc;_0x169b7e[_0x208925(0x236)]=setTimeout(()=>this['_onConnectionFailed'](_0x169b7e),this[_0x208925(0x24e)][_0x208925(0xe2)](_0x208925(0x21e))??0x4e20);}[_0x2e02fc(0x206)](_0x2916e4){const _0x4de5f4=_0x2e02fc;_0x2916e4[_0x4de5f4(0x1d4)]!=null&&(clearTimeout(_0x2916e4[_0x4de5f4(0x1d4)]),_0x2916e4['sendHeartbeatTimer']=null);}[_0x2e02fc(0xb0)](_0x5ca22f){const _0x47d3d5=_0x2e02fc;_0x5ca22f[_0x47d3d5(0x236)]!=null&&(clearTimeout(_0x5ca22f[_0x47d3d5(0x236)]),_0x5ca22f[_0x47d3d5(0x236)]=null);}};Mn=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x3efc4d),V(0x2,_0x39e8ee),V(0x3,En),V(0x4,_0x17057e(B)),V(0x5,kn),V(0x6,_0x48242e(Cn))],Mn);let Nn=class extends _0x57b019{constructor(_0x1283ab,_0x839ad3,_0x49c683,_0x570760){const _0x4d4755=_0x2e02fc;var _0x2b41ef;super(),this[_0x4d4755(0x153)]=_0x1283ab,this['_collabSessionService']=_0x839ad3,this[_0x4d4755(0x24e)]=_0x49c683,this[_0x4d4755(0x2eb)]=_0x570760,z(this,_0x4d4755(0x22f),new Map()),z(this,'_entityInit$',new _0x4301b4()),z(this,'entityInit$',this['_entityInit$'][_0x4d4755(0x1d9)]()),((_0x2b41ef=this[_0x4d4755(0x24e)][_0x4d4755(0xe2)](_0x4d4755(0xf5)))==null?void 0x0:_0x2b41ef['enableCollaboration'])!==!0x1&&this[_0x4d4755(0x26f)]();}[_0x2e02fc(0x259)](){const _0x40fc6e=_0x2e02fc;super[_0x40fc6e(0x259)](),this[_0x40fc6e(0x22f)][_0x40fc6e(0x1c7)](_0x4540a4=>_0x4540a4[_0x40fc6e(0x259)]()),this[_0x40fc6e(0x22f)][_0x40fc6e(0x303)]();}[_0x2e02fc(0xf8)](_0x8c72ca){const _0x3d36b9=_0x2e02fc;return this[_0x3d36b9(0x22f)]['get'](_0x8c72ca)??null;}[_0x2e02fc(0x223)](_0x3247fa){const _0x3a502b=_0x2e02fc;let _0x2ddd81=this[_0x3a502b(0xf8)](_0x3247fa);return _0x2ddd81?_0x2031cc(_0x2ddd81):this['_entityInit$'][_0x3a502b(0x31f)](_0x2cbad7(_0x37947d=>_0x37947d['unitID']===_0x3247fa));}[_0x2e02fc(0x1e2)](_0x27df24){const _0x2d71ab=_0x2e02fc;return _0x1f8387(this['getCollabEntity$'](_0x27df24)[_0x2d71ab(0x31f)](_0x12aa0e(()=>void 0x0)));}[_0x2e02fc(0x26f)](){const _0x3c980c=_0x2e02fc;this[_0x3c980c(0x2eb)][_0x3c980c(0x1ed)](_0x51bdab[_0x3c980c(0x266)])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0x2b2cff=>{const _0x2535de=_0x3c980c;let _0x488464=_0x2b2cff['unit']['getUnitId'](),_0x2eb419=await this[_0x2535de(0x2c1)](_0x488464,_0x51bdab['UNIVER_SHEET']);this[_0x2535de(0x22f)][_0x2535de(0x2e9)](_0x488464,_0x2eb419);}),this[_0x3c980c(0x2eb)][_0x3c980c(0x1ed)](_0x51bdab[_0x3c980c(0x312)])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x31f)](_0x2cbad7(_0x15208e=>!_0x15208e['unit']['getUnitId']()[_0x3c980c(0xd8)]('__')))[_0x3c980c(0x222)](async _0x423585=>{const _0x345a7c=_0x3c980c;let _0x34922e=_0x423585[_0x345a7c(0xd7)][_0x345a7c(0x2a9)](),_0x3ca4e2=await this[_0x345a7c(0x2c1)](_0x34922e,_0x51bdab[_0x345a7c(0x312)]);this['_entities'][_0x345a7c(0x2e9)](_0x34922e,_0x3ca4e2);}),this[_0x3c980c(0x2eb)][_0x3c980c(0x1ed)](_0x51bdab[_0x3c980c(0x1e0)])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0x23ab97=>{const _0x2fd746=_0x3c980c;let _0x5a6d02=_0x23ab97['unit'][_0x2fd746(0x2a9)](),_0x5720da=await this[_0x2fd746(0x2c1)](_0x5a6d02,_0x51bdab[_0x2fd746(0x1e0)]);this['_entities']['set'](_0x5a6d02,_0x5720da);}),this['_univerInstanceService']['getTypeOfUnitAdded$'](_0x51bdab['UNIVER_BOARD'])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0x31ac7d=>{const _0x1c575d=_0x3c980c;let _0x24ab39=_0x31ac7d['unit'][_0x1c575d(0x2a9)](),_0x1fc150=await this['_startCollaboration'](_0x24ab39,_0x51bdab[_0x1c575d(0x93)]);this['_entities']['set'](_0x24ab39,_0x1fc150);}),this['_univerInstanceService'][_0x3c980c(0x1ed)](_0x51bdab[_0x3c980c(0x1c0)])[_0x3c980c(0x31f)](_0x1a7089(this[_0x3c980c(0x1a9)]),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0x40aeeb=>{const _0x192910=_0x3c980c;let _0x513763=_0x40aeeb[_0x192910(0xd7)][_0x192910(0x2a9)](),_0x51ec43=await this['_startCollaboration'](_0x513763,_0x51bdab[_0x192910(0x1c0)]);this[_0x192910(0x22f)][_0x192910(0x2e9)](_0x513763,_0x51ec43);}),this[_0x3c980c(0x2eb)]['getTypeOfUnitAdded$'](_0x51bdab['UNIVER_PDF'])[_0x3c980c(0x31f)](_0x1a7089(this['dispose$']),_0xb401f1(0x10))[_0x3c980c(0x222)](async _0xb67d54=>{const _0x1fcfc6=_0x3c980c;let _0x311a82=_0xb67d54['unit'][_0x1fcfc6(0x2a9)](),_0x1b1500=await this[_0x1fcfc6(0x2c1)](_0x311a82,_0x51bdab[_0x1fcfc6(0x230)]);this['_entities'][_0x1fcfc6(0x2e9)](_0x311a82,_0x1b1500);}),_0x123d67(this[_0x3c980c(0x2eb)]['getTypeOfUnitDisposed$'](_0x51bdab[_0x3c980c(0x266)]),this[_0x3c980c(0x2eb)][_0x3c980c(0x15d)](_0x51bdab[_0x3c980c(0x312)]),this['_univerInstanceService'][_0x3c980c(0x15d)](_0x51bdab['UNIVER_SLIDE']),this['_univerInstanceService'][_0x3c980c(0x15d)](_0x51bdab[_0x3c980c(0x93)]),this[_0x3c980c(0x2eb)][_0x3c980c(0x15d)](_0x51bdab[_0x3c980c(0x1c0)]),this['_univerInstanceService'][_0x3c980c(0x15d)](_0x51bdab[_0x3c980c(0x230)]))[_0x3c980c(0x31f)](_0x1a7089(this['dispose$']))[_0x3c980c(0x222)](_0x4f4351=>{const _0x1daaeb=_0x3c980c;let _0x3d4338=_0x4f4351[_0x1daaeb(0x2a9)](),_0x2f0ec9=this[_0x1daaeb(0x22f)][_0x1daaeb(0x241)](_0x3d4338);_0x2f0ec9&&(_0x2f0ec9[_0x1daaeb(0x259)](),this[_0x1daaeb(0x22f)][_0x1daaeb(0xb4)](_0x3d4338));});}async[_0x2e02fc(0x2c1)](_0x55f3b9,_0x29ac21){const _0x177096=_0x2e02fc;let _0x106af2=await this['_collabSessionService'][_0x177096(0x1d8)](_0x55f3b9),_0x2568a2=this['_injector'][_0x177096(0x85)](this[_0x177096(0x193)](_0x29ac21),_0x55f3b9,_0x29ac21,_0x106af2);return await _0x2568a2[_0x177096(0x13e)](),this[_0x177096(0x9a)][_0x177096(0x160)](_0x2568a2),_0x2568a2;}[_0x2e02fc(0x193)](_0x30f0eb){const _0x386f01=_0x2e02fc;switch(_0x30f0eb){case _0x51bdab[_0x386f01(0x312)]:return _n;case _0x51bdab['UNIVER_SHEET']:return yn;case _0x51bdab[_0x386f01(0x1e0)]:return bn;case _0x51bdab['UNIVER_BOARD']:return xn;case _0x51bdab[_0x386f01(0x1c0)]:return vn;case _0x51bdab[_0x386f01(0x230)]:return Sn;default:throw Error(_0x386f01(0x138)+_0x30f0eb);}}};Nn=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x17057e(Mn)),V(0x2,_0x39e8ee),V(0x3,_0x4a3eaa)],Nn);var Pn='@univerjs-pro/collaboration-client',Fn=_0x2e02fc(0x1fe);let In=class extends _0x5af3d8{constructor(_0x56fbaa,_0x212e05){const _0x296575=_0x2e02fc;super(),this[_0x296575(0x2eb)]=_0x56fbaa,this[_0x296575(0x24e)]=_0x212e05,this[_0x296575(0x26f)]();}[_0x2e02fc(0x26f)](){const _0x4d95da=_0x2e02fc;this['disposeWithMe'](this['_univerInstanceService']['focused$'][_0x4d95da(0x222)](()=>{const _0x4517f1=_0x4d95da;let _0x5f12e9=this[_0x4517f1(0x2eb)][_0x4517f1(0x2e4)](),_0xf84f3=this[_0x4517f1(0x24e)][_0x4517f1(0xe2)]('DEFAULT_FILE_NAME')??_0x4517f1(0x30b);_0x5f12e9 instanceof _0x3f5b28&&(_0xf84f3=_0x5f12e9['name']),document[_0x4517f1(0x27f)]=_0xf84f3;}));}};In=H([V(0x0,_0x4a3eaa),V(0x1,_0x39e8ee)],In);const Ln=_0x3a76ad('base-ui.attachment-io.service');function _0x1bad(_0x4ef9e0,_0x43eba8){_0x4ef9e0=_0x4ef9e0-0x7d;const _0x269999=_0x2699();let _0x1badbb=_0x269999[_0x4ef9e0];return _0x1badbb;}let Rn=class{constructor(_0x10a131,_0x39a331,_0x1858f1){const _0x3984e7=_0x2e02fc;this[_0x3984e7(0x1da)]=_0x10a131,this['_configService']=_0x39a331,this[_0x3984e7(0x2eb)]=_0x1858f1;}[_0x2e02fc(0x23e)](){return this['_getConfig']()['attachment']??{};}async[_0x2e02fc(0x277)](_0x4394bb){const _0x255e6d=_0x2e02fc;let _0x3fc07d=this[_0x255e6d(0x23e)]();if(zn(_0x4394bb,_0x3fc07d),_0x3fc07d[_0x255e6d(0x280)])return _0x3fc07d[_0x255e6d(0x280)](_0x4394bb);let _0x963f6a=await this[_0x255e6d(0x263)](_0x4394bb);return{'id':_0x963f6a,'name':_0x4394bb[_0x255e6d(0x217)],'mimeType':_0x4394bb[_0x255e6d(0xae)],'size':_0x4394bb[_0x255e6d(0x1ca)],'sourceType':_0x14dae6[_0x255e6d(0x171)],'source':_0x963f6a};}async['getAttachmentUrl'](_0x525644,_0xc9a7bb){const _0x5b77d5=_0x2e02fc;if(_0xc9a7bb!==_0x14dae6[_0x5b77d5(0x171)])return _0x525644;let _0x1e4782=(await this[_0x5b77d5(0x1da)][_0x5b77d5(0x241)](this[_0x5b77d5(0x1dd)]()[_0x5b77d5(0x2ff)](_0x5b77d5(0x27a),_0x525644)))[_0x5b77d5(0x18b)];if(_0x1e4782['error']&&_0x1e4782[_0x5b77d5(0x2cd)][_0x5b77d5(0x22a)]!==_0x9d8468['OK'])throw _0x1e4782[_0x5b77d5(0x2cd)];if(!_0x1e4782['url'])throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.');return _0x52c301(_0x1e4782[_0x5b77d5(0x294)],this[_0x5b77d5(0x125)]());}async[_0x2e02fc(0x263)](_0x4f3d66){const _0x1c40f9=_0x2e02fc;let _0x107300=this[_0x1c40f9(0x2eb)][_0x1c40f9(0x2e4)](),_0x4ce393=_0x107300==null?void 0x0:_0x107300['getUnitId']();if(!_0x4ce393)throw Error('[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.');let _0x1f16e9=new FormData();_0x1f16e9[_0x1c40f9(0x81)](_0x1c40f9(0x2dd),_0x4f3d66);let _0x5c046d=this['_getUploadFileURL']()+_0x1c40f9(0x11e)+_0x4f3d66['size'][_0x1c40f9(0x1ad)]()+_0x1c40f9(0x98)+_0x254240[_0x1c40f9(0xa3)]+_0x1c40f9(0x2f9)+encodeURIComponent(_0x4ce393),_0x19ca4d=(await this['_httpService'][_0x1c40f9(0x258)](_0x5c046d,{'body':_0x1f16e9}))[_0x1c40f9(0x18b)][_0x1c40f9(0x2c5)];if(typeof _0x19ca4d!=_0x1c40f9(0xc2)||!_0x19ca4d)throw Error('[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.');return _0x19ca4d;}[_0x2e02fc(0x17e)](){const _0x58b1e5=_0x2e02fc;return this[_0x58b1e5(0x2f6)]()['uploadFileServerUrl']??_0x58b1e5(0xd2);}[_0x2e02fc(0x1dd)](){const _0x124151=_0x2e02fc;return this[_0x124151(0x2f6)]()[_0x124151(0x218)]??_0x124151(0x307);}[_0x2e02fc(0x125)](){const _0x30183a=_0x2e02fc;let _0x1dd7a5=this[_0x30183a(0x2f6)]();return _0x1dd7a5[_0x30183a(0x1d3)]?_0x1dd7a5[_0x30183a(0x1d3)]:typeof location<'u'?location[_0x30183a(0x1ff)]:_0x1dd7a5[_0x30183a(0x2f2)]??'';}[_0x2e02fc(0x2f6)](){const _0x4bda2f=_0x2e02fc;return this[_0x4bda2f(0x24e)][_0x4bda2f(0xe2)](_0x4bda2f(0xf5))??{};}};Rn=H([V(0x0,_0x17057e(_0x340ce5)),V(0x1,_0x17057e(_0x39e8ee)),V(0x2,_0x17057e(_0x4a3eaa))],Rn);function zn(_0x175336,_0x21e763){const _0x524df8=_0x2e02fc;var _0x5702c7;if(_0x21e763[_0x524df8(0xa5)]!=null&&_0x175336[_0x524df8(0x1ca)]>_0x21e763[_0x524df8(0xa5)])throw Error(_0x524df8(0x298));if((_0x5702c7=_0x21e763[_0x524df8(0x25c)])!=null&&_0x5702c7[_0x524df8(0x14d)]&&!_0x21e763[_0x524df8(0x25c)]['some'](_0xb5acfb=>_0x175336[_0x524df8(0xae)]===_0xb5acfb||_0x175336[_0x524df8(0x217)]['endsWith'](_0xb5acfb)||_0xb5acfb[_0x524df8(0x304)]('/*')&&_0x175336[_0x524df8(0xae)][_0x524df8(0xd8)](_0xb5acfb[_0x524df8(0x180)](0x0,-0x1))))throw Error(_0x524df8(0xc7));}let Bn=class{constructor(_0x43bdc6,_0x38e86a,_0x397c94){const _0x1b2454=_0x2e02fc;this[_0x1b2454(0x24e)]=_0x43bdc6,this[_0x1b2454(0x1da)]=_0x38e86a,this['localeService']=_0x397c94,this[_0x1b2454(0x13e)]();}[_0x2e02fc(0x13e)](){const _0x305e42=_0x2e02fc;this[_0x305e42(0x1da)][_0x305e42(0x16d)]({'priority':0x1,'interceptor':(_0x28acfb,_0x54efd6)=>_0x54efd6(_0x28acfb)['pipe'](_0x36b238(async _0x328d35=>{const _0x2ea2ac=_0x305e42;let _0x3743b5=_0x328d35;if(_0x3743b5['status']===0x191){if(typeof window>'u')throw Error(_0x2ea2ac(0x31a));if(window[_0x2ea2ac(0x220)](this[_0x2ea2ac(0x1f4)]['t']('collaboration-client.auth.needGotoLoginAlert'))){let _0x4668b7=window[_0x2ea2ac(0x20f)](window['location'][_0x2ea2ac(0x276)]);window[_0x2ea2ac(0x18f)]['href']=this[_0x2ea2ac(0x20b)]()+_0x2ea2ac(0x291)+_0x4668b7;}}return _0x3743b5;}))});}[_0x2e02fc(0x20b)](){const _0x5f3a90=_0x2e02fc;let _0x549a0d=this[_0x5f3a90(0x24e)][_0x5f3a90(0xe2)](R);return(_0x549a0d==null?void 0x0:_0x549a0d[_0x5f3a90(0xb3)])??'/universer-api/oidc/authpage';}};Bn=H([V(0x0,_0x39e8ee),V(0x1,_0x17057e(_0x340ce5)),V(0x2,_0x17057e(_0xc4a55f))],Bn);let Vn=class extends _0x5af3d8{constructor(_0x33224d,_0x4962a3){const _0xe30275=_0x2e02fc;super(),this['_HTTPService']=_0x33224d,this[_0xe30275(0x24e)]=_0x4962a3,z(this,_0xe30275(0x207),!0x1),this[_0xe30275(0x26b)]();}[_0x2e02fc(0x26b)](){const _0x204b37=_0x2e02fc;let _0x223e63=this;this['disposeWithMe'](this[_0x204b37(0x9f)][_0x204b37(0x16d)]({'priority':0x3e7,'interceptor':_0x3bb06f({'isMatch'(_0x2d46be){const _0x465a5f=_0x204b37;var _0x47c7eb;if(_0x2d46be[_0x465a5f(0xc3)]==='POST'&&(_0x47c7eb=_0x2d46be[_0x465a5f(0x28f)])!=null&&_0x47c7eb[_0x465a5f(0x18b)]){let {objectID:_0x37f638,objectType:_0x558f97}=_0x2d46be['requestParams']['body']||{};if(!_0x37f638||_0x558f97===void 0x0)return!0x1;let _0x324a0d=_0x223e63[_0x465a5f(0x163)]()+'/'+_0x558f97+_0x465a5f(0x224)+_0x37f638+_0x465a5f(0x318);if(_0x2d46be['url']===_0x324a0d)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x288f88){var _0x241950;return(_0x241950=_0x288f88['requestParams'])==null?void 0x0:_0x241950['body'];},'mergeParamsToRequest'(_0x36b798,_0x238173){const _0x5918ca=_0x204b37;let _0x1306be=_0x223e63[_0x5918ca(0x163)]()+_0x5918ca(0x2bf),_0x438176=_0x36b798[_0x5918ca(0xea)]((_0x30b0e2,_0x14c812)=>{const _0x520619=_0x5918ca;let {unitID:_0x4218a1,objectID:_0x3984a8,objectType:_0x49d9a8,actions:_0x2afaa4}=_0x14c812;return _0x30b0e2[_0x4218a1]||(_0x30b0e2[_0x4218a1]={}),_0x30b0e2[_0x4218a1][_0x3984a8]||(_0x30b0e2[_0x4218a1][_0x3984a8]={'objectID':_0x3984a8,'objectType':_0x49d9a8,'actions':[]}),_0x30b0e2[_0x4218a1][_0x3984a8]['actions'][_0x520619(0x2b8)](..._0x2afaa4),_0x30b0e2;},{}),_0x8feea7=[];for(let _0x264588 in _0x438176)for(let _0x47d362 in _0x438176[_0x264588]){let {actions:_0xde3990,objectType:_0x23640f}=_0x438176[_0x264588][_0x47d362],_0x35c026=[...new Set(_0xde3990)];_0x8feea7['push']({'unitID':_0x264588,'objectID':_0x47d362,'objectType':_0x23640f,'actions':_0x35c026});}return new _0x34760a('POST',_0x1306be,{'headers':_0x238173[_0x5918ca(0x317)],'withCredentials':_0x238173[_0x5918ca(0x326)],'responseType':_0x238173[_0x5918ca(0x1d6)],'body':{'requests':_0x8feea7}});}},{'distributeResult'(_0x44653b,_0xd6fa){const _0x4d963d=_0x204b37;let {objectActions:_0x1c571e}=_0x44653b;return _0xd6fa[_0x4d963d(0x1a8)](_0x5428ee=>{const _0x48e9c1=_0x4d963d;let {unitID:_0x54a139,objectID:_0x14d760,actions:_0x19fc3b}=_0x5428ee,_0x16efe0=_0x1c571e[_0x48e9c1(0x25b)](_0x26e04b=>_0x26e04b[_0x48e9c1(0x2ef)]===_0x54a139&&_0x26e04b['objectID']===_0x14d760);return{'config':_0x5428ee,'result':{'actions':_0x19fc3b['map'](_0x35ad42=>_0x16efe0==null?void 0x0:_0x16efe0[_0x48e9c1(0x174)]['find'](_0x296af2=>_0x296af2[_0x48e9c1(0x250)]===_0x35ad42))[_0x48e9c1(0x2de)](_0x4e34f4=>!!_0x4e34f4),'error':_0x44653b[_0x48e9c1(0x2cd)]}};});}})}));}[_0x2e02fc(0x163)](){const _0x2ba059=_0x2e02fc;let _0x5bb59c=this[_0x2ba059(0x24e)]['getConfig'](R);return(_0x5bb59c==null?void 0x0:_0x5bb59c['authzUrl'])??_0x2ba059(0x177);}async[_0x2e02fc(0x21f)](_0x2d742f){const _0x49986e=_0x2e02fc;let _0x2bf981=this['_getAPIPrefixPath']()+'/'+_0x2d742f[_0x49986e(0xd4)]+_0x49986e(0x24a);return(await this[_0x49986e(0x9f)][_0x49986e(0x258)](_0x2bf981,{'body':_0x2d742f}))[_0x49986e(0x18b)][_0x49986e(0x245)]||'';}async[_0x2e02fc(0x17b)](_0xf3fe3e){const _0x56cf81=_0x2e02fc;let _0x21895b=this[_0x56cf81(0x163)]()+_0x56cf81(0x2ee);return(await this[_0x56cf81(0x9f)][_0x56cf81(0x258)](_0x21895b,{'body':_0xf3fe3e}))[_0x56cf81(0x18b)][_0x56cf81(0x246)];}async[_0x2e02fc(0x164)](_0x254695){const _0x2169ff=_0x2e02fc;var _0x148abf;let _0x2ab5f7=this[_0x2169ff(0x163)]()+'/'+_0x254695[_0x2169ff(0xd4)]+_0x2169ff(0x224)+_0x254695[_0x2169ff(0x245)],_0xaa0726=await this[_0x2169ff(0x9f)][_0x2169ff(0x131)](_0x2ab5f7,{'body':_0x254695});if((_0xaa0726==null||(_0x148abf=_0xaa0726[_0x2169ff(0x18b)])==null||(_0x148abf=_0x148abf[_0x2169ff(0x2cd)])==null?void 0x0:_0x148abf[_0x2169ff(0x22a)])!==0x1)throw Error('Failed\x20to\x20update\x20permission\x20point');}async[_0x2e02fc(0x267)](_0x16c9d2){const _0x321b0a=_0x2e02fc;let _0x45d0b9=this[_0x321b0a(0x163)]()+'/'+_0x16c9d2[_0x321b0a(0xd4)]+_0x321b0a(0x224)+_0x16c9d2[_0x321b0a(0x245)]+_0x321b0a(0x318);return(await this['_HTTPService'][_0x321b0a(0x258)](_0x45d0b9,{'body':_0x16c9d2}))['body'][_0x321b0a(0x174)];}async[_0x2e02fc(0x30a)](_0x20a603){const _0x125d32=_0x2e02fc;let _0x57e97c=this[_0x125d32(0x163)]()+'/-/object/-/batch_allowed';return(await this[_0x125d32(0x9f)]['post'](_0x57e97c,{'body':{'requests':_0x20a603}}))['body'][_0x125d32(0x1ec)];}async['listRoles'](_0x296e0d){const _0x1227cc=_0x2e02fc;let _0x1fc9bc=this['_getAPIPrefixPath']()+'/'+_0x296e0d[_0x1227cc(0xd4)]+_0x1227cc(0x88),_0x83e3d0=await this[_0x1227cc(0x9f)][_0x1227cc(0x258)](_0x1fc9bc,{'body':_0x296e0d});return{'roles':_0x83e3d0[_0x1227cc(0x18b)][_0x1227cc(0x13d)],'actions':_0x83e3d0['body'][_0x1227cc(0x174)]};}async['deleteCollaborator'](_0x320a31){const _0x29cddf=_0x2e02fc;let _0x1f6ec8=this[_0x29cddf(0x163)]()+'/collaborator';await this[_0x29cddf(0x9f)][_0x29cddf(0xb4)](_0x1f6ec8,{'params':{'collaboratorID':_0x320a31['collaboratorID'],'objectID':_0x320a31['objectID'],'unitID':_0x320a31[_0x29cddf(0x2ef)]}});}async['updateCollaborator'](_0x558d6d){const _0x24a877=_0x2e02fc;let _0x5e874c=this[_0x24a877(0x163)]()+_0x24a877(0xa0);await this[_0x24a877(0x9f)][_0x24a877(0x1e5)](_0x5e874c,{'body':_0x558d6d});}async[_0x2e02fc(0x2d1)](_0xd81cb4){const _0x1e62f6=_0x2e02fc;let _0x59af0f=this[_0x1e62f6(0x163)]()+'/collaborator';await this[_0x1e62f6(0x9f)][_0x1e62f6(0x258)](_0x59af0f,{'body':_0xd81cb4});}async[_0x2e02fc(0x89)](_0x5167ce){const _0x5219e6=_0x2e02fc;let _0xe00890=this[_0x5219e6(0x163)]()+_0x5219e6(0xa0),_0x212b86=await this[_0x5219e6(0x9f)][_0x5219e6(0x241)](_0xe00890,{'params':{'objectID':_0x5167ce[_0x5219e6(0x245)],'unitID':_0x5167ce[_0x5219e6(0x2ef)]}});return this[_0x5219e6(0x15e)](_0x212b86[_0x5219e6(0x18b)]['cfgEnableObjInherit']??!0x1),_0x212b86['body'][_0x5219e6(0x2b3)];}async[_0x2e02fc(0x17f)](_0x4cc78){const _0xfc4d5b=_0x2e02fc;let _0x1752a4=this[_0xfc4d5b(0x163)]()+'/collaborator';await this[_0xfc4d5b(0x9f)][_0xfc4d5b(0x131)](_0x1752a4,{'body':_0x4cc78});}[_0x2e02fc(0x15e)](_0x3031d8){const _0x4f13cc=_0x2e02fc;this[_0x4f13cc(0x207)]=_0x3031d8;}[_0x2e02fc(0x288)](){const _0x5a9e85=_0x2e02fc;return this[_0x5a9e85(0x207)];}};Vn=H([V(0x0,_0x17057e(_0x340ce5)),V(0x1,_0x17057e(_0x39e8ee))],Vn);function Hn(_0x85bc70){const _0x4d685a=_0x2e02fc;let _0x5085b1=atob(_0x85bc70),_0xffe51b=new Uint8Array(_0x5085b1['length']);for(let _0x1a8be5=0x0;_0x1a8be5<_0x5085b1[_0x4d685a(0x14d)];_0x1a8be5++)_0xffe51b[_0x1a8be5]=_0x5085b1[_0x4d685a(0x1de)](_0x1a8be5);return _0xffe51b;}function Un(_0x4fad10){const _0x15c545=_0x2e02fc;let _0xa9ca39='';for(let _0x13b60a=0x0;_0x13b60a<_0x4fad10[_0x15c545(0x14d)];_0x13b60a++)_0xa9ca39+=String['fromCharCode'](_0x4fad10[_0x13b60a]);return btoa(_0xa9ca39);}function Wn(_0x47a40a,_0x235b0e){const _0x3d2fac=_0x2e02fc;let _0x55cbf0=Hn(_0x235b0e),_0x595ff3=_0x1fc815(0x10);return Un(_0x33086b(_0x595ff3,_0x52616c(_0x55cbf0,_0x595ff3)[_0x3d2fac(0x1df)](_0x47a29a(_0x47a40a))));}function Gn(){const _0x1d6211=_0x2e02fc;let _0xf2240d=_0x12bc02()[_0x1d6211(0x16c)];if(typeof window<'u'&&window[_0x1d6211(0x18f)]!==void 0x0&&_0xf2240d){let _0x294a2b={'time':Math[_0x1d6211(0x1af)](Date['now']()/0x3e8),'domain':location[_0x1d6211(0x123)]};return Wn(JSON[_0x1d6211(0xc0)](_0x294a2b),_0xf2240d);}}let Kn=class{constructor(_0x4678b2){const _0x459b34=_0x2e02fc;this[_0x459b34(0x1da)]=_0x4678b2,this['_initRequestHeader']();}[_0x2e02fc(0x109)](){const _0x5c644f=_0x2e02fc;this[_0x5c644f(0x1da)][_0x5c644f(0x16d)]({'interceptor':(_0x1b9df1,_0x2cc725)=>{const _0x1dad9f=_0x5c644f;let _0x464b64=Gn();return _0x464b64&&_0x1b9df1['headers'][_0x1dad9f(0x2e9)](_0x1dad9f(0x21b),_0x464b64),_0x2cc725(_0x1b9df1);}});}};Kn=H([V(0x0,_0x17057e(_0x340ce5))],Kn);let qn=class extends _0x57b019{constructor(_0x3e2d0a,_0x35ce17,_0x66d862){const _0x37f767=_0x2e02fc;super(),this[_0x37f767(0x159)]=_0x3e2d0a,this['_snapshotService']=_0x35ce17,this['_localCacheService']=_0x66d862,z(this,_0x37f767(0x147),new _0xdf7e62(null)),z(this,_0x37f767(0xfc),new _0x4301b4()),z(this,_0x37f767(0x15c),this[_0x37f767(0x147)]['asObservable']()),z(this,_0x37f767(0x287),this[_0x37f767(0xfc)][_0x37f767(0x1d9)]());}[_0x2e02fc(0x259)](){const _0x83eea5=_0x2e02fc;super[_0x83eea5(0x259)](),this[_0x83eea5(0xfc)][_0x83eea5(0xc1)](),this['_unitInfo$']['complete']();}async[_0x2e02fc(0x1b1)](_0x281955,_0xf66288,_0x949ab8,_0x1a882f){const _0x274f40=_0x2e02fc;this[_0x274f40(0x147)]['next']({'unitId':_0x281955,'type':_0xf66288,'subUnitId':_0x1a882f});let _0x2804d5=null;switch(_0xf66288){case _0x51bdab[_0x274f40(0x266)]:_0x2804d5=await this[_0x274f40(0x104)][_0x274f40(0x219)](_0x281955,_0x949ab8,void 0x0,{'initialSubUnitId':_0x1a882f});break;case _0x51bdab['UNIVER_DOC']:_0x2804d5=await this[_0x274f40(0x104)]['loadDoc'](_0x281955,_0x949ab8);break;case _0x51bdab[_0x274f40(0x1e0)]:_0x2804d5=await this[_0x274f40(0x104)][_0x274f40(0x2ec)](_0x281955,_0x949ab8);break;case _0x51bdab[_0x274f40(0x93)]:_0x2804d5=await this[_0x274f40(0x104)][_0x274f40(0x27d)](_0x281955,_0x949ab8);break;case _0x51bdab['UNIVER_BASE']:_0x2804d5=await this[_0x274f40(0x104)]['loadBase'](_0x281955,_0x949ab8);break;case _0x51bdab[_0x274f40(0x230)]:_0x2804d5=await this[_0x274f40(0x104)]['loadPdf'](_0x281955,_0x949ab8);break;default:this[_0x274f40(0x159)][_0x274f40(0x2cd)](_0x274f40(0x170),_0x274f40(0x1f7));break;}return _0x2804d5&&this[_0x274f40(0xfc)]['next'](_0x2804d5),_0x2804d5;}async['loadUnit'](_0x492a4a,_0x198acd,_0x230fb9){const _0x43edc3=_0x2e02fc;var _0x2a3428;this[_0x43edc3(0x147)][_0x43edc3(0x160)]({'unitId':_0x492a4a,'type':_0x198acd,'subUnitId':_0x230fb9});let _0x7ffd60=0x0,_0x65016a=await((_0x2a3428=this['_localCacheService'])==null?void 0x0:_0x2a3428['loadOfflineData'](_0x492a4a));return _0x65016a&&(_0x65016a['awaitingChangeset']||_0x65016a[_0x43edc3(0x324)]['length']!==0x0)&&(_0x7ffd60=_0x65016a[_0x43edc3(0xa9)]),_0x7ffd60===0x0&&this['_logService']['debug'](_0x43edc3(0x170),_0x43edc3(0x26a)),this[_0x43edc3(0x1b1)](_0x492a4a,_0x198acd,_0x7ffd60,_0x230fb9);}};qn=H([V(0x0,_0x3efc4d),V(0x1,_0x17057e(_0x4240b0)),V(0x2,_0x48242e(U))],qn);let Jn=class{constructor(_0x3b71b7,_0x5e2b46,_0x16ae7b){const _0x59756c=_0x2e02fc;this[_0x59756c(0x1da)]=_0x3b71b7,this['_configService']=_0x5e2b46,this[_0x59756c(0x2eb)]=_0x16ae7b,z(this,_0x59756c(0x309),0x0),z(this,_0x59756c(0x9b),new _0x4301b4()),z(this,_0x59756c(0x129),this['_change$']),z(this,'_imageSourceCache',new Map());}[_0x2e02fc(0x17d)](_0x1093cf){const _0x270a9a=_0x2e02fc;this[_0x270a9a(0x309)]=_0x1093cf,this[_0x270a9a(0x9b)][_0x270a9a(0x160)](_0x1093cf);}[_0x2e02fc(0x192)](_0x3a1134,_0x2860af){const _0x30488a=_0x2e02fc;if(_0x2860af===_0x14dae6[_0x30488a(0xcb)]){let _0x185bfd=new Image();return _0x185bfd[_0x30488a(0x23d)]=_0x3a1134,_0x185bfd;}return this[_0x30488a(0x8a)][_0x30488a(0x241)](_0x3a1134);}[_0x2e02fc(0x7d)](_0x40f15c,_0x53cc2d,_0x5adca1){const _0x15a6fe=_0x2e02fc;_0x53cc2d!==_0x14dae6[_0x15a6fe(0xcb)]&&_0x5adca1!=null&&this[_0x15a6fe(0x8a)]['set'](_0x40f15c,_0x5adca1);}async[_0x2e02fc(0xc8)](_0x16b225){const _0x385f81=_0x2e02fc;try{let _0x15a012=this[_0x385f81(0x321)](this[_0x385f81(0x1dd)](),''+_0x16b225),_0x3b9425=(await this['_httpService']['get'](_0x15a012))[_0x385f81(0x18b)];if(_0x3b9425[_0x385f81(0x2cd)]&&_0x3b9425[_0x385f81(0x2cd)][_0x385f81(0x22a)]===_0x9d8468['OK']){let _0x5bf705=_0x52c301(_0x3b9425[_0x385f81(0x294)],this[_0x385f81(0x125)]());return Promise[_0x385f81(0x19c)](_0x5bf705);}return Promise[_0x385f81(0x261)](_0x3b9425['error']);}catch(_0x2e53c3){return Promise[_0x385f81(0x261)](_0x2e53c3);}}async[_0x2e02fc(0x2ed)](_0x134a2d){const _0x3d6567=_0x2e02fc;let _0x276523='';if(!_0xf74efc[_0x3d6567(0x187)](_0x134a2d['type']))return this[_0x3d6567(0x28e)](),Promise[_0x3d6567(0x261)](Error(_0x9e94a[_0x3d6567(0xe0)]));if(_0x134a2d[_0x3d6567(0x1ca)]>_0x236ef3())return this['_decreaseWaiting'](),Promise[_0x3d6567(0x261)](Error(_0x9e94a[_0x3d6567(0x212)]));try{let _0x3d5aff=new FormData();_0x3d5aff[_0x3d6567(0x81)]('file',_0x134a2d);let _0x14d702=this['_univerInstanceService'][_0x3d6567(0x2e4)](),_0x12fb51=_0x14d702==null?void 0x0:_0x14d702[_0x3d6567(0x2a9)]();if(!_0x12fb51)throw Error('unitId\x20is\x20not\x20found');let _0x30c5cc=this['_getUploadFileURL']()+_0x3d6567(0x11e)+_0x134a2d[_0x3d6567(0x1ca)]['toString']()+_0x3d6567(0x98)+_0x254240[_0x3d6567(0xa3)]+'&assign='+encodeURIComponent(_0x12fb51),_0x1a00ab={'body':_0x3d5aff},_0x135c57=(await this['_httpService'][_0x3d6567(0x258)](_0x30c5cc,_0x1a00ab))[_0x3d6567(0x18b)];if(typeof _0x135c57[_0x3d6567(0x2c5)]!=_0x3d6567(0xc2))return this[_0x3d6567(0x28e)](),Promise['reject'](Error(_0x9e94a[_0x3d6567(0x2d7)]));_0x276523=_0x135c57[_0x3d6567(0x2c5)];}catch{return this[_0x3d6567(0x28e)](),Promise[_0x3d6567(0x261)](Error(_0x9e94a[_0x3d6567(0x2d7)]));}return new Promise((_0x2da0dc,_0x30d1fb)=>{const _0x188de1=_0x3d6567;let _0x3c7c9a=new FileReader();_0x3c7c9a[_0x188de1(0x121)](_0x134a2d),_0x3c7c9a[_0x188de1(0x1ce)]=_0x286dc6=>{const _0x4c32c7=_0x188de1;var _0x12ee60;let _0x5f1daf=(_0x12ee60=_0x286dc6[_0x4c32c7(0x16f)])==null?void 0x0:_0x12ee60[_0x4c32c7(0x205)];if(_0x5f1daf==null){this[_0x4c32c7(0x28e)](),_0x30d1fb(Error(_0x9e94a['ERROR_IMAGE']));return;}_0x2da0dc({'imageId':_0x1f7675(0x6),'imageSourceType':_0x14dae6['UUID'],'source':_0x276523,'base64Cache':_0x5f1daf,'status':_0x9e94a[_0x4c32c7(0x9d)]}),this[_0x4c32c7(0x28e)]();};});}[_0x2e02fc(0x17e)](){const _0x6335f6=_0x2e02fc;let _0x53334e=this[_0x6335f6(0x24e)][_0x6335f6(0xe2)](R);return(_0x53334e==null?void 0x0:_0x53334e[_0x6335f6(0x2f2)])??_0x6335f6(0xd2);}['_getSignURL'](){const _0x237d78=_0x2e02fc;let _0x4c6181=this[_0x237d78(0x24e)][_0x237d78(0xe2)](R);return(_0x4c6181==null?void 0x0:_0x4c6181['signUrlServerUrl'])??_0x237d78(0x307);}['_getDownloadEndpointURL'](){const _0x4e9701=_0x2e02fc;let _0x5157aa=this[_0x4e9701(0x24e)][_0x4e9701(0xe2)](R);return(_0x5157aa==null?void 0x0:_0x5157aa[_0x4e9701(0x1d3)])??location[_0x4e9701(0x1ff)];}[_0x2e02fc(0x321)](_0x2e4b25,_0x190fb0){const _0x42c378=_0x2e02fc;return _0x2e4b25['replace'](_0x42c378(0x27a),_0x190fb0);}[_0x2e02fc(0x28e)](){const _0x4c16fa=_0x2e02fc;--this['_waitCount'],this[_0x4c16fa(0x9b)][_0x4c16fa(0x160)](this['_waitCount']);}};Jn=H([V(0x0,_0x17057e(_0x340ce5)),V(0x1,_0x39e8ee),V(0x2,_0x17057e(_0x4a3eaa))],Jn);let Yn=class{constructor(_0x15cea3,_0x1e27ce){const _0x564758=_0x2e02fc;this[_0x564758(0x24e)]=_0x15cea3,this[_0x564758(0x9f)]=_0x1e27ce;}[_0x2e02fc(0x163)](){const _0x29b980=_0x2e02fc;let _0x3d6e57=this[_0x29b980(0x24e)]['getConfig'](R);return(_0x3d6e57==null?void 0x0:_0x3d6e57[_0x29b980(0x116)])??_0x29b980(0x177);}async['list'](_0x3bffe8){const _0x2e7f17=_0x2e02fc;let _0x358f1f=this[_0x2e7f17(0x163)]()+_0x2e7f17(0xa0);return{'list':[{'title':_0x2e7f17(0xdd),'mentions':(await this[_0x2e7f17(0x9f)][_0x2e7f17(0x241)](_0x358f1f,{'params':{'objectID':_0x3bffe8[_0x2e7f17(0x299)],'unitID':_0x3bffe8[_0x2e7f17(0x299)]}}))['body'][_0x2e7f17(0x2b3)][_0x2e7f17(0x1a8)](_0xc8d2c8=>({'objectId':_0xc8d2c8['id'],'name':_0xc8d2c8[_0x2e7f17(0x189)][_0x2e7f17(0x217)],'metadata':{'icon':_0xc8d2c8[_0x2e7f17(0x189)][_0x2e7f17(0x281)]},'label':_0xc8d2c8[_0x2e7f17(0x189)]['name'],'objectType':_0x117e44['PERSON']})),'metadata':{},'type':_0x117e44[_0x2e7f17(0xda)]}]};}};Yn=H([V(0x0,_0x17057e(_0x39e8ee)),V(0x1,_0x17057e(_0x340ce5))],Yn);let Xn=class extends _0x57b019{constructor(_0x1a5825,_0x58110e,_0x138a22,_0x3eda1e,_0x54855d){const _0x410e0b=_0x2e02fc;super(),this[_0x410e0b(0x153)]=_0x1a5825,this[_0x410e0b(0x2eb)]=_0x58110e,this[_0x410e0b(0x210)]=_0x138a22,this['_collaborationSessionService']=_0x3eda1e,this[_0x410e0b(0x23c)]=_0x54855d,this[_0x410e0b(0x271)](),this['_initCloseConn']();}[_0x2e02fc(0x30c)](){const _0x578d9a=_0x2e02fc;let _0x13f69e=async _0x295499=>{const _0x349e9b=_0x1bad;(await this[_0x349e9b(0x113)]['requireSession'](_0x295499))[_0x349e9b(0x83)][_0x349e9b(0x31f)](_0x2cbad7(_0x2f9633=>_0x2f9633[_0x349e9b(0x161)]===_0x150d16[_0x349e9b(0x2e3)]),_0x1c3f84(this['dispose$']))[_0x349e9b(0x222)](_0x25ba5e=>{const _0x1d1a66=_0x349e9b;let {reason:_0x1ecf2f}=_0x25ba5e['data'];this[_0x1d1a66(0x23c)][_0x1d1a66(0x1ba)]({'id':'CLOSE_ROOM','data':_0x1ecf2f}),this[_0x1d1a66(0x210)][_0x1d1a66(0x197)](new _0x424e79(_0x295499)['id'],!0x1),this[_0x1d1a66(0x113)][_0x1d1a66(0x15a)](_0x295499);});};_0x123d67(this[_0x578d9a(0x2eb)][_0x578d9a(0x1ed)](_0x51bdab[_0x578d9a(0x266)]),this[_0x578d9a(0x2eb)][_0x578d9a(0x1ed)](_0x51bdab[_0x578d9a(0x312)]),this['_univerInstanceService'][_0x578d9a(0x1ed)](_0x51bdab[_0x578d9a(0x93)]),this[_0x578d9a(0x2eb)][_0x578d9a(0x1ed)](_0x51bdab[_0x578d9a(0x1c0)]))[_0x578d9a(0x31f)](_0x12aa0e(_0xc5ed7b=>_0xc5ed7b[_0x578d9a(0xd7)][_0x578d9a(0x2a9)]()),_0x2cbad7(_0x1ebbe0=>!_0xfbb9de(_0x1ebbe0)),_0x1c3f84(this[_0x578d9a(0x1a9)]))[_0x578d9a(0x222)](_0x57b622=>{_0x13f69e(_0x57b622);});}[_0x2e02fc(0x271)](){const _0x53bbfa=_0x2e02fc;let _0x18f7db=async _0x45ab0e=>{const _0x3a5819=_0x1bad;let _0x101083=await this[_0x3a5819(0x113)][_0x3a5819(0x1d8)](_0x45ab0e),_0x76c93c=this[_0x3a5819(0x153)]['get'](_0x541c12);_0x101083['event$'][_0x3a5819(0x31f)](_0x2cbad7(_0xea2aec=>_0xea2aec[_0x3a5819(0x161)]===_0x150d16[_0x3a5819(0x269)]),_0x1c3f84(this[_0x3a5819(0x1a9)]))[_0x3a5819(0x222)](_0x1fc3e1=>{const _0x4f3f17=_0x3a5819;let {objectId:_0x21801e}=_0x1fc3e1[_0x4f3f17(0xa6)];_0x21801e===_0x45ab0e?_0x76c93c['initWorkbookPermissionChange'](_0x45ab0e):_0x76c93c[_0x4f3f17(0xef)](_0x45ab0e,_0x21801e);});};_0x123d67(this[_0x53bbfa(0x2eb)]['getTypeOfUnitAdded$'](_0x51bdab[_0x53bbfa(0x266)]))['pipe'](_0x12aa0e(_0x378449=>_0x378449[_0x53bbfa(0xd7)][_0x53bbfa(0x2a9)]()),_0x2cbad7(_0x485644=>!_0xfbb9de(_0x485644)),_0x1c3f84(this[_0x53bbfa(0x1a9)]))[_0x53bbfa(0x222)](_0x322c1b=>{_0x18f7db(_0x322c1b);});}};Xn=H([V(0x0,_0x17057e(_0x346ad7)),V(0x1,_0x4a3eaa),V(0x2,_0x5a8b72),V(0x3,_0x17057e(Mn)),V(0x4,_0x17057e(B))],Xn);let Zn=class{constructor(_0x2e3115,_0x1b50ef){this['_configService']=_0x2e3115,this['_httpService']=_0x1b50ef;}async['getUnitOnRev'](_0x34020d,_0x47d439){const _0x5f52c1=_0x2e02fc;var _0x4887fa;let {unitID:_0x43f650,type:_0x3fe65c,revision:_0x1e53db=0x0}=_0x47d439,_0x977860=this['getSnapshotAPIPath']()+'/'+_0x3fe65c+_0x5f52c1(0x1cc)+_0x43f650+_0x5f52c1(0x323)+_0x1e53db,_0x24c1f1=(await this[_0x5f52c1(0x1da)][_0x5f52c1(0x241)](_0x977860))[_0x5f52c1(0x18b)],_0xbf779b=(_0x4887fa=_0x24c1f1['snapshot'])==null?void 0x0:_0x4887fa[_0x5f52c1(0x200)];if(_0xbf779b){let _0x3d4cb2=_0xbf779b==null?void 0x0:_0xbf779b[_0x5f52c1(0x132)];_0xbf779b[_0x5f52c1(0x132)]=_0x4363eb[_0x5f52c1(0x2af)](_0x561a6b(_0x3d4cb2)),Object[_0x5f52c1(0x1aa)](_0xbf779b[_0x5f52c1(0x12e)])[_0x5f52c1(0x1c7)](([,_0x6a74d1])=>{const _0x28136e=_0x5f52c1;let _0x3395e9=_0x6a74d1[_0x28136e(0x132)];_0x6a74d1['originalMeta']=_0x4363eb[_0x28136e(0x2af)](_0x561a6b(_0x3395e9));});}return _0x24c1f1;}async[_0x2e02fc(0x186)](_0x153175,_0x5b158c){const _0x3ad97d=_0x2e02fc;let {unitID:_0xd5316f,type:_0xae7c83,blockID:_0x403d1a}=_0x5b158c,_0x30de1b=this[_0x3ad97d(0x1f9)]()+'/'+_0xae7c83+'/unit/'+_0xd5316f+'/block/'+_0x403d1a;return(await this['_httpService']['get'](_0x30de1b))['body'];}async[_0x2e02fc(0x128)](_0x564db8,_0x10e185){const _0x284c4f=_0x2e02fc;let {unitID:_0x1bee6c,type:_0x3966f4,blockID:_0x3a0024}=_0x10e185,_0x329240=this[_0x284c4f(0x1f9)]()+_0x284c4f(0x151)+_0x3966f4+_0x284c4f(0x1cc)+_0x1bee6c+_0x284c4f(0x151)+_0x3a0024;return(await this['_httpService']['get'](_0x329240))[_0x284c4f(0x18b)];}async[_0x2e02fc(0x87)](_0x33c700,_0xf2009f){const _0x50e26b=_0x2e02fc;let {unitID:_0x185819,type:_0x280a77,from:_0x352718,to:_0x5b6521}=_0xf2009f,_0x1b2a20=this[_0x50e26b(0x1f9)]()+'/'+_0x280a77+_0x50e26b(0x1cc)+_0x185819+'/fetchmissing?from='+_0x352718+_0x50e26b(0x2d9)+_0x5b6521;return(await this[_0x50e26b(0x1da)]['get'](_0x1b2a20))[_0x50e26b(0x18b)];}[_0x2e02fc(0xa4)](){const _0x4570c6=_0x2e02fc;return this[_0x4570c6(0x24e)][_0x4570c6(0xe2)](_0x4570c6(0x13b))??this[_0x4570c6(0x1f9)]();}[_0x2e02fc(0x1f9)](){const _0x30a93a=_0x2e02fc;let _0x11b2bf=this[_0x30a93a(0x24e)][_0x30a93a(0xe2)](R);return(_0x11b2bf==null?void 0x0:_0x11b2bf[_0x30a93a(0x10d)])??'/universer-api/snapshot';}async[_0x2e02fc(0x2f7)](_0x5535f6,_0x3632c7){const _0x2a2609=_0x2e02fc;let _0x559f92=_0x2a2609(0x82)+_0x3632c7['type']+_0x2a2609(0x1cc)+_0x3632c7['unitID']+'/resources';return(await this[_0x2a2609(0x1da)][_0x2a2609(0x241)](_0x559f92,{'params':{'resourceId':JSON[_0x2a2609(0xc0)](_0x3632c7['resourceIDs'])}}))[_0x2a2609(0x18b)];}[_0x2e02fc(0xeb)](){const _0xbf1260=_0x2e02fc;throw Error(_0xbf1260(0x2cc));}['updateSnapshot'](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x2e02fc(0x1f1)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x2e02fc(0x1c2)](){const _0x16641e=_0x2e02fc;throw Error(_0x16641e(0x2cc));}[_0x2e02fc(0x16a)](){const _0x26deab=_0x2e02fc;throw Error(_0x26deab(0x2cc));}[_0x2e02fc(0x270)](){const _0x23b9d0=_0x2e02fc;throw Error(_0x23b9d0(0x2cc));}};Zn=H([V(0x0,_0x39e8ee),V(0x1,_0x17057e(_0x340ce5))],Zn);let Qn=class extends _0x2600d3{constructor(_0x4f8e3f,_0x54574b,_0x9339a9,_0x1c1e82,_0x578f18){super(_0x4f8e3f,_0x54574b,_0x9339a9),this['_transformService']=_0x1c1e82,this['_logService']=_0x578f18;}[_0x2e02fc(0x20e)](_0x2d2a3c,_0x43b9cb){const _0xfb4b78=_0x2e02fc;let _0x2ab6c6=this[_0xfb4b78(0x2be)](_0x2d2a3c);if(_0x2ab6c6)try{let _0x3ebe4c=this[_0xfb4b78(0x1fb)](_0x2ab6c6,_0x43b9cb);this[_0xfb4b78(0x106)](_0x2d2a3c,_0x3ebe4c);}catch(_0x20004a){this[_0xfb4b78(0x159)][_0xfb4b78(0x2cd)](_0xfb4b78(0x238),_0x20004a),this['_clearUndo'](_0x2d2a3c);}let _0x1d016d=this['_getRedoStack'](_0x2d2a3c);if(_0x1d016d)try{let _0x1f230d=this[_0xfb4b78(0x1fb)](_0x1d016d,_0x43b9cb);this['_substituteRedoStack'](_0x2d2a3c,_0x1f230d);}catch(_0x288007){this[_0xfb4b78(0x159)][_0xfb4b78(0x2cd)](_0x288007),this['_clearRedo'](_0x2d2a3c);}}[_0x2e02fc(0x2a1)](_0x2517ce){const _0x4929e1=_0x2e02fc;let _0xe64150=this['_getUndoStack'](_0x2517ce);_0xe64150&&(_0xe64150[_0x4929e1(0x14d)]=0x0,this[_0x4929e1(0x325)]());}['_clearRedo'](_0x23ab12){const _0x560641=_0x2e02fc;let _0x767f52=this[_0x560641(0xf9)](_0x23ab12);_0x767f52&&(_0x767f52[_0x560641(0x14d)]=0x0,this['_updateStatus']());}[_0x2e02fc(0x106)](_0x1cd3e0,_0x3cf57f){const _0x7096e=_0x2e02fc;this['_undoStacks'][_0x7096e(0x2e9)](_0x1cd3e0,_0x3cf57f),this['_updateStatus']();}[_0x2e02fc(0x2b1)](_0x2cd636,_0x2db5ac){const _0x1a6e00=_0x2e02fc;this[_0x1a6e00(0x2bc)][_0x1a6e00(0x2e9)](_0x2cd636,_0x2db5ac),this[_0x1a6e00(0x325)]();}['_transformStack'](_0x36d973,_0x34c6fb){const _0x4fc729=_0x2e02fc;let _0xa70f68=[],_0x4a53c6=_0x34c6fb,_0x2c75ef=_0x34c6fb;for(let _0x18c43d=_0x36d973[_0x4fc729(0x14d)]-0x1;_0x18c43d>=0x0;_0x18c43d--){let {unitID:_0x8e8c26,undoMutations:_0x94e61f,redoMutations:_0x1b88a5}=_0x36d973[_0x18c43d],_0x5d5fb4=this[_0x4fc729(0xf4)]['transformMutationsWithChangeset'](_0x4a53c6,_0x94e61f),_0x2eb3ca=this['_transformService'][_0x4fc729(0x21d)](_0x2c75ef,_0x1b88a5);if(_0x3892b2(_0x5d5fb4)||_0x3892b2(_0x2eb3ca)){this[_0x4fc729(0x159)][_0x4fc729(0x2cd)](_0x4fc729(0x238),'transformStack\x20failed!',_0x5d5fb4,_0x2eb3ca);break;}_0x4a53c6=_0x5d5fb4['c1Prime'],_0x2c75ef=_0x2eb3ca[_0x4fc729(0x293)],_0xa70f68['push']({'unitID':_0x8e8c26,'undoMutations':_0x5d5fb4[_0x4fc729(0x12d)],'redoMutations':_0x2eb3ca[_0x4fc729(0x12d)]});}return _0xa70f68['reverse']();}};Qn=H([V(0x0,_0x4a3eaa),V(0x1,_0xdb365f),V(0x2,_0x52f7ed),V(0x3,_0x40dc20),V(0x4,_0x3efc4d)],Qn);let $n=class extends _0xd08f3f{constructor(_0x5bfaac=ft,_0x3e0ce5,_0x3aabc2,_0x565bb5){const _0x4a00c7=_0x2e02fc;super(),this[_0x4a00c7(0x201)]=_0x5bfaac,this[_0x4a00c7(0x159)]=_0x3e0ce5,this[_0x4a00c7(0x153)]=_0x3aabc2,this['_configService']=_0x565bb5;let {..._0xf48eb3}=_0x3cc59d({},ft,this[_0x4a00c7(0x201)]);if(!_0xf48eb3[_0x4a00c7(0x11c)])throw Error('[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!');this[_0x4a00c7(0x201)]=_0xf48eb3,this[_0x4a00c7(0x24e)][_0x4a00c7(0x2b7)](R,_0xf48eb3);}[_0x2e02fc(0x239)](){const _0x5bc33f=_0x2e02fc;this[_0x5bc33f(0x1c8)](),this[_0x5bc33f(0x2f1)]();}[_0x2e02fc(0x1c8)](){const _0x402079=_0x2e02fc;var _0x4394c8,_0x1c4721;this[_0x402079(0x153)][_0x402079(0x2c9)](_0x3ec71c)&&this[_0x402079(0x159)][_0x402079(0x2cd)](_0x402079(0x216),_0x402079(0x2d2));let _0x5c8f7c=_0x4eac85([[_0x3ec71c,{'useClass':Qn}],[kn,{'useValue':An()}],[Mn],[Ot],[Wt],[Bn],[Kn],[Dt],[Xn],[B],[qn],[En,{'useClass':this[_0x402079(0x201)]['socketService']}],[_0xa027ef,{'useClass':Zn}],[_0x15b06a,{'useClass':Vn}],[_0x3360d2,{'useClass':Jn}],[Ln,{'useClass':Rn}],[_0x174385,{'useClass':Yn}],[Nn],[In]],(_0x4394c8=this[_0x402079(0x201)])==null?void 0x0:_0x4394c8[_0x402079(0x178)]);if(!((_0x1c4721=this['_config'])!=null&&_0x1c4721[_0x402079(0x2fa)])){let _0xc6c9f4=_0x5c8f7c[_0x402079(0x242)](([_0x548783])=>_0x548783===W);_0xc6c9f4!==-0x1&&_0x5c8f7c[_0x402079(0x84)](_0xc6c9f4,0x1);}_0x29b435(this['_injector'],_0x5c8f7c);}[_0x2e02fc(0x2f1)](){const _0x229469=_0x2e02fc;var _0x13fcb3,_0x1d6943;if(this[_0x229469(0x153)]['get'](_0x340ce5)[_0x229469(0x16d)]({'priority':0x14,'interceptor':_0x16d444({'maxParallel':0x6})}),!((_0x13fcb3=this[_0x229469(0x201)])!=null&&_0x13fcb3[_0x229469(0x1a0)])){var _0x20a542;(_0x20a542=this[_0x229469(0x153)]['get'](U,_0x39c84c['OPTIONAL']))==null||_0x20a542[_0x229469(0xfd)]();}(_0x1d6943=this[_0x229469(0x201)])!=null&&_0x1d6943['enableAuthServer']&&_0xa3b29f(this['_injector'],[[Bn]]),_0xa3b29f(this[_0x229469(0x153)],[[Kn],[Nn],[Xn]]);}};z($n,_0x2e02fc(0x254),_0x2e02fc(0x18d)),z($n,'packageName',Pn),z($n,_0x2e02fc(0x10e),Fn),$n=H([_0x448075(_0x2b8da7,_0x113f06,_0x2a63ac),V(0x1,_0x3efc4d),V(0x2,_0x17057e(_0x346ad7)),V(0x3,_0x39e8ee)],$n);export{Vn as AuthzIoHttpService,J as AwaitingState,Y as AwaitingWithPendingState,vn as BaseCollaborationEntity,xn as BoardCollaborationEntity,R as COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,Rn as CollaborationAttachmentIoService,Nn as CollaborationController,$ as CollaborationEntity,Jn as CollaborationImageIoService,Vt as CollaborationSession,Mn as CollaborationSessionService,On as CollaborationSocketService,pn as CollaborationStatus,Et as CollaborationUIEventId,B as CollaborationUIEventService,Qn as CollaborativeUndoRedoService,Dt as CommentService,X as ConflictState,pt as DEFAULT_COLLAB_WEB_SOCKET_URL,xt as DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,mt as DEFAULT_WS_SESSION_TICKET_URL,qn as DataLoaderService,_n as DocCollaborationEntity,Q as FetchingMissState,ht as HEARTBEAT_INTERVAL_KEY,gt as HEARTBEAT_TIMEOUT_KEY,Ln as IAttachmentIoService,kn as ICollaborationClientAdapterService,En as ICollaborationSocketService,U as ILocalCacheService,Cn as INetworkConditionService,W as ISingleActiveUnitService,yt as LOCAL_CACHE_INTERVAL,vt as LOCAL_CACHE_INTERVAL_KEY,Ot as MemberService,Yn as MentionIoHttpService,Z as OfflineState,Sn as PdfCollaborationEntity,q as PendingState,bt as REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,_t as RETRY_CONNECTING_MAX_COUNT_KEY,zt as SessionStatus,yn as SheetCollaborationEntity,Wt as SheetTransformSelectionsService,bn as SlideCollaborationEntity,Zn as SnapshotServerOverHTTPService,K as SyncedState,Gt as UnitStatus,$n as UniverCollaborationClientPlugin,An as createUniverCollaborationAdapter,wn as deserializeToCombResponse,Ht as getLocalCacheKey,Tn as serializeCombRequest};
1
+ const _0x849776=_0x45be;(function(_0x23da52,_0x1d791a){const _0x296cf2=_0x45be,_0x264b0d=_0x23da52();while(!![]){try{const _0x281757=-parseInt(_0x296cf2(0x385))/0x1+-parseInt(_0x296cf2(0x11c))/0x2*(-parseInt(_0x296cf2(0x2c3))/0x3)+-parseInt(_0x296cf2(0x27c))/0x4*(-parseInt(_0x296cf2(0x14b))/0x5)+-parseInt(_0x296cf2(0x339))/0x6*(parseInt(_0x296cf2(0x15f))/0x7)+-parseInt(_0x296cf2(0x1ab))/0x8+parseInt(_0x296cf2(0x362))/0x9+-parseInt(_0x296cf2(0x17f))/0xa*(parseInt(_0x296cf2(0x2e1))/0xb);if(_0x281757===_0x1d791a)break;else _0x264b0d['push'](_0x264b0d['shift']());}catch(_0x5b015f){_0x264b0d['push'](_0x264b0d['shift']());}}}(_0x4ffd,0x61afb));import{CollaborationEvent as _0x389ee8,CompressMutationService as _0x27ea2d,EmptyMutationInfo as _0x905a7a,ISnapshotServerService as _0x382477,ITransformService as _0x4ac591,RevisionService as _0x12caa0,SnapshotService as _0x4ae9c6,UniverCollaborationPlugin as _0x268be8,b64DecodeUnicode as _0x2d3e4d,isTransformChangesetsSuccess as _0x63d5c9,isTransformMutationsWithChangesetFailure as _0x41f763,isTransformMutationsWithChangesetSuccess as _0x412a1a,mapDocumentTypeToUniverInstanceType as _0x146dcc,parseChangesetToProtocol as _0x133adf,parseProtocolChangeset as _0x373627,textEncoder as _0x4a8895,uuidv4 as _0x72e049}from'@univerjs-pro/collaboration';function _0x4ffd(){const _0x344fc9=['[OfflineState]:\x20invalid\x20calling\x20to\x20`resend`.','toPrimitive','rev','candidateSocket','push','getSnapshotAPIPath','message$','_onRemoteChangeset','_onUserJoin','from','_transformSelections','_onFetchMissResult','getTypeOfUnitAdded$','BASE64','[CollaborationAttachmentIoService]:\x20attachment\x20type\x20is\x20not\x20accepted.','_remoteChangesetQueue','_undoStacks','?size=','socket\x20open.','LIVESHARE_FETCH_OPERATIONS','_getLoginPath','updateCollaborator','_clearRetryConnectingTimer','_sendingTimer','_substituteRedoStack','indexOf','getCurrentRevOfUnit','_transformRemoteChangesetByIMECache','onRemoteRetry','getResourcesRequest','JOINING','constructor','origin','allowed','SUCCUSS','dispose$','roomInfos','[CollaborationAttachmentIoService]:\x20failed\x20to\x20resolve\x20attachment\x20URL.','_transformAndApplyRemoteChangeset','unit','pipe','localCacheService','_disableEditing','[SyncedState]:\x20received\x20rejection.','UNISCRIPT_RUN','_socketChannels','retryConnectingInterval','default','_collaborationPaused','_collabSessionService','deleteCollaborator','People','closeSession','RECV','_upload','_snapshotService','failed\x20to\x20apply\x20missed\x20changesets!','_socketService','dispose','getCollabEntity','ERROR_IMAGE_TYPE','_HTTPService','_sessions','stopTime','_transformService','updatePermissionPoint','memberID','_clearUndo','entries','fetch_missing','originalMeta','@univerjs-pro/collaboration-client','getWorkbookSelections','onSendChangeset','/resources','resolveUnit','_startCollaboration','_updateLocalCache','_changesetReqId','RETRY_CONNECTING_MAX_COUNT','transformMutationsWithChangeset','startTime','UPDATE_PERMISSION_OBJ','_startTelemetryCollaborationNewChangeset','_collaborationUIEventService','HEARTBEAT','status','collaboration-client.local-cache-service','_replayCachedMutations','_onCombEvent','refreshPermission','m2Prime','[CollaborationSession]','_adapter','loadUnitOfRevision','4PGeqGg','enableAuthServer','_resendWithTimeout','result','_removeRoom','forEach','[CollaborationSocketService]:\x20failed\x20to\x20create\x20socket!','_unitLoaded$','_state','session.room-full','_commentService','loadDoc','localeService','_executeRemoteChangeset','status$','_getSendChangesetTimeout','hostname','params','This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!','LIVESHARE_REQUEST_HOST','timeoutTimer','toLocal','_clearTimeoutTimer','\x20to\x20','readyForCollab','socketReady','size','subscribe','length','_applyRemoteChangeset','reverse','AWAITING_WITH_PENDING','_resendTimer','_joinRoom','startsWith','add','sheets','getCfgEnableObjInherit','&source=','_clearRedo','session','PENDING','getSheetBlock','getImageSourceCache','_localCacheService','submit\x20changeset\x20error!','location','min','[PendingState]:\x20received\x20rejection.','connection\x20error','unknown','onlyLocal','_awaitingChangeset','cmd','setShowComponents','_roomMembers','function','maxSize','state$','loginUrlKey','_onRemoteRetry','baseRev','/universer-api/uniscript','getUnit','\x0aCurrent:\x20','[DataLoaderService]','_scheduleCollaborationTimeoutTimer','error','shouldCloseConn','/universer-api/user/session-ticket','_docStateChangeManagerService','3sflagJ','send','splice','appendMutation','_initUnitPermissionChange','decorate','_handleRemoteChangesets','UNIVER_COLLABORATION_CLIENT_PLUGIN','csShouldRetryEvent','_schedule','emitEvent','_createSocket','toggleOnline','[OfflineState]:\x20received\x20changeset.','[CollaborationSessionService]','/universer-api/snapshot/','UNIVER_BOARD','Univer','unitId\x20is\x20not\x20found','newCsEvent','[CollaborationUndoRedoService]','debug','/universer-api/file/{fileID}/sign-url','permissionRejEvent','listCollaborators','[CollaborationSessionService]:\x20socket\x20error','&to=','loadUnit','accept','unit-cache-','121eEiMjr','onload','updateMember','CHANGESET_SHOULD_RETRY','saveAttachment','REMOTE_UNISCRIPT_EXECUTION_ENDPOINT','open$','_socketMessageSubscription','you\x20should\x20override\x20\x22IUndoRedoService\x22\x20provided\x20in\x20\x22core\x22\x20package!','_state$','sendHeartbeatTimer','fetching\x20the\x20latest\x20document\x20from\x20the\x20server.','_maxTotalRetryTimeout','_transformStateCache','_sheetTransformSelectionsService','getAttachmentUrl','/-/object/-/batch_allowed','awaitingChangeset','actions','init','getUnitOnRev','PERMISSION_DENIED','IDLE','listRoles','now','saveSheetBlock','_initRequestHeader','subject','_handlerCallback','find','_acknowledgeAwaiting','collaMsg','onCommentUpdate','/object/','_instanceService','onTransformSelections','{fileID}','collaboration-client.auth.needGotoLoginAlert','getLatestCsReqIdBySid','registerHTTPInterceptor','data','/-/object/list','_queuedRemoteChangesets','HELLO','routeKey','uploadFileServerUrl','onRemoteAck','type','_onRemoteRejected','SNAPSHOT_URL_KEY','updatePermissionObjEvent','transformUndoRedo','/new_changes','fetchMiss','SUBMIT_CHANGESET_TIMEOUT','toRemote','LIVESHARE_TERMINATE','_onOffline','[PendingState]:\x20received\x20acknowledgement.','transformStack\x20failed!','_transformUndoredo','clear','POST','_sessionChannels','_getAPIPrefix','objectActions','[CollaborationEntity]:\x20invalid\x20state\x20transition!\x20State\x20transferred\x20from\x20is\x20not\x20the\x20current\x20state.\x0aBefore:\x20','loadSlide','_members$','slice','_transitionLocked','_commentUpdate$','getTime','[ConflictState]:\x20invalid\x20calling\x20to\x20`resend`.','/block/','delete','_init','range','/universer-api/snapshot','_eventService','unitId','socketMessageSubscription','apply','_tryReconnect','charCodeAt','LEAVE','UUID','collabWebSocketUrl','1236CUDiYM','awaiting_with_pending','MSG_FOR_ERROR','_transformIMECache','unsubscribe','list','__splitChunk__','[CollaborationState]:\x20apply\x20error!','csRejEvent','_getUndoStack','loadSheet','[CollaborationAttachmentIoService]:\x20attachment\x20exceeds\x20max\x20size.','endsWith','MUTATION','getUnitId','_getSocketChannel','PSEUDO_FETCH_MISSING_RESULT','fetchThroughInterceptors','encrypt','_updateState','updateSnapshot','_isEchoedAwaitingChangeset','createSocket','requestParams','getUnitStatus$','onMutationExecutedForCollab','[CollaborationEntity]:\x20initial\x20state\x20has\x20been\x20created\x20before.\x20You\x20should\x20not\x20call\x20\x22init\x22\x20twice.','_identity','_emitMembers','_unlockTransition','CHANGESET_REJ','state','onSyncEditingCollabCursor','editing\x20status\x20changed\x20to','href','saveChangeset','_updateStatus','_entityInit$','_transformRemoteChangesetByStateCache','unitID','_onConnectionOpen','6225399QOaNBD','name','getFocusedUnit','mutations','_getUploadFileURL','_univerInstanceService','_roomCreated$','close','findIndex','error$','interceptor','patch','userID','executeCommand','downloadEndpointUrl','__Key__','sessionStatus$','ws://127.0.0.1:8000/universer-api/comb/connect','initWorkbookPermissionChange','backupOfflineData','NEW_CHANGESETS','_event$','SOCKET_FAILED','_handler','append','updateOfflineData','enableSingleActiveInstanceLock','onTransformState','loadBase','getMemberID','x-univer-host','collaboratorID','[CollaborationAttachmentIoService]:\x20unitId\x20is\x20not\x20found.','Error\x20on\x20receiving\x20event','getTypeOfUnitDisposed$','191612WvFtGh','_submitChangeset','post','getUnitType','_pendingSessions','USERS_LEAVE','close$','awaiting','number','/unit/','createCollaborator','CLOSE_ROOM','then','UNIVER_SLIDE','pauseCollaboration','onTransformRemoteChangesetByIMECache','resend','pending','hasOwnProperty','localUnitId','unitLoaded$','_acknowledgedAwaitingRevision','&assign=','stringify','CONFLICT','UNIVER_DOC','SOCKET_FAILED_RETRY','_commandService','cfgEnableObjInherit','next','INGEST','_getCurrentRevision','getDeserializedSheetBlock','CHANGESET_ACK','tables','compose','_createSession','symbol','_changesetSessionId','[UniverCollaborationClientPlugin]:\x20you\x20must\x20provide\x20a\x20socketService\x20implementation\x20in\x20config!','base-ui.attachment-io.service','every','getActiveSheet','unitType','_unitInfo$','_syncEditingCollabCursor','createInstance','responseType','_initDependencies','FETCH_MISSING','_replaceFileID','_clearLocalCache','setWaitCount','onTransformIME','set','fromCollab','transformSelections','_getDownloadEndpointURL','offline','_compressMutationService','674872CRlGYk','url','_waitForHeartbeatResponse','missingChangesets','FileId','changeset','onTransformRemoteChangesetByStateCache','_configService','\x20-\x20','_onConflict','_injector','_socket','\x20in\x20_schedule.','transformChangesets','removeMember','[CollaborationSocketService]:\x20failed\x20to\x20get\x20web\x20socket\x20factory!','defineProperty','_resolveSessionIdentity','_logService','LIVESHARE_OPERATION','COLLABORATION_SESSION_TARGET_UNIT_ID_REQUIRED','getConfig','SHOULD_CLOSE_CONN','onRemoteRej','body','incrementRevOfUnit','_getConfig','/universer-api/comb','onStarting','retryCount','_substituteUndoStack','getSheetId','selections','COMMENT_UPDATE','UNIVER_BASE','onRemoteChangeset','values','getCollabEntity$','asObservable','PERMISSION_REJ','members$','JOIN','univer-pro.collaboration-client-adapter-service','updateCursorEvent','_registerDependencies','c2Prime','headers','2379525RCxPva','\x0aAfter:\x20','UNIVER_PDF','_collaborationSessionService','/collaborator','call','_collaborationTimeoutTimer','synced','resourceIDs','online$','has','/allowed','JOIN_ROOM_FAILED','disposeWithMe','endpointKey','confirm','_transformStack','_isPermissionRej','map','socket$','1351GMzErK','_stopTelemetryCollaborationNewChangeset','_onLocalMutation','_waitCount','getMember','LIVESHARE_NEW_HOST','_telemetryInfo','disableLocalCache','_shouldReportTelemetry','_snapshotServerService','conflict','_telemetryService','1.0.0-beta.2','_permissionService','isArray','_createHandler','objectID','/role','prototype','loadOfflineData','string','Unknown\x20type.\x20Will\x20not\x20load\x20files\x20from\x20remote\x20address.','HEARTBEAT_INTERVAL','COMPRESS_MUTATION_SEND','addHandlerCallback','not_collab','event$','_status$','_clearScheduledTask','fetching\x20missing\x20changesets\x20from\x20','[FetchMissState]','reconnect','423740ROHSJA','getCurrentUser','_change$','reqId','_clearCollaborationTimeoutTimer','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','_config','members','FETCH_MISS','COMPRESS_MUTATION_APPLY','_showConflictNotification','_decreaseWaiting','collabSubmitChangesetUrl','sessionStatus','packageName','JOIN_ROOM_FULL','_doCreateSocket','_revisionService','[CollaborationEntity]','session.room-permission-denied','OFFLINE','complete','AWAITING','_hasSessionsForEndpoint','override','withCredentials','SUBMIT_CHANGESET','eventID','getInterceptPoints','OTHER_CLIENT_EDITING','collaborators','UnitEmbedded','action','onMissedChangesetFetched','c1Prime','ERROR_EXCEED_SIZE','_acknowledgeAwaitingIfReady','requireSession','_redoStacks','sid','_resendTimeout','_members','onMissingChangesets','_exhaustRemoteChangesetQueue','3259560pXpICS','_onJoinRoomEvent','_toggleOffline','fetchMissingChangesets','toggleOffline','_memberService','file','_createInitialStateImpl','endpoint','NOT_COLLAB','socket\x20close','object','entityInit$','telemetry\x20info\x20is\x20not\x20initialized','Cannot\x20assemble\x20a\x20changeset\x20from\x20multiple\x20mutations\x20of\x20different\x20types:\x20','LOCAL_CACHE_INTERVAL','encode','enableOfflineEditing','ERROR_IMAGE','unitInfo$','univer-pro.collaboration-client.network-condition.service','joinEvent','_createInitialState','_getCtorByUniverInstanceType','/object','_localeService','_fetchMissChangesets','collaboration-client.config','csAckEvent','_networkConditionService','capture','_singleActiveUnitService','_imageSourceCache','loadBoard','objectType','_getAPIPrefixPath','getValue','session.room-not-exists','_onRecvEvent','editingUnit','_pendingMutations','includes','USERS_ENTER','[serializeCombRequest]:\x20should\x20not\x20fall\x20into\x20default\x20branch!','onLocalMutation','ONLINE','JOIN_ROOM_NOT_EXISTS','roles','getOwnPropertyDescriptor','revision','_entities','[SyncedState]:\x20invalid\x20calling\x20to\x20`resend`.','univer-pro.collaboration-client-socket-service','_rescheduleHeartbeat','UNIVER_SHEET','code','authzUrl','replace','_getRedoStack','some','readAsDataURL','_initCloseConn','_httpService','reduce','isPermissionRej','_userManagerService','retryConnectingTimer','univer-pro.collaboration-client.single-active-unit-service','_incrementRevisionNumber','_sessionStatus$','_getSignURL','sort','upload','_sendHeartbeat','reject','batchAllowed','COLLABORATION_CHANGESET_TRANSLATION_REQUIRED','_scheduleCompleteTimestamp','_sender','_clearHeartbeatTimer','waitForRoom$','catch','target','_lockTransition','uniscriptRunEvent','blockRanges','deepClone','[CollaborationController]:\x20invalid\x20univer\x20type:\x20','get','COLLABORATION_ENDPOINT_INVALID','_undoRedoService','pluginName','SYNCED','textRanges','NO_OTHER_CLIENTS_EDITING','commentUpdate$','_listenToNetworkCondition','setConfig','/universer-api/stream/file/upload','_toggleOnline','_checkMissing','[PendingState]:\x20invalid\x20calling\x20to\x20`resend`.','filter','changesets','_onConnectionFailed','signUrlServerUrl','isCompositionEnd','parse','_type','_tryEnsureSocket','socketService','toString','OTHER_CLIENTS_EDITING','[CollaborationAttachmentIoService]:\x20failed\x20to\x20upload\x20attachment.'];_0x4ffd=function(){return _0x344fc9;};return _0x4ffd();}import{CommandType as _0x3d8a6e,DependentOn as _0x2b9643,Disposable as _0x513609,DisposableCollection as _0x2341b1,IAuthzIoService as _0x3e5c98,ICommandService as _0x39bf2b,IConfigService as _0x6f8878,IContextService as _0x476244,IImageIoService as _0x4ac6c3,ILogService as _0x3dc3ee,IMentionIOService as _0x4d90d5,IPermissionService as _0x2cf373,IUndoRedoService as _0x1348cc,IUniverInstanceService as _0x273a3b,ImageSourceType as _0x3a8937,ImageUploadStatusType as _0x321486,Inject as _0x409c93,Injector as _0x28d4d4,JSONX as _0x30efff,LocalUndoRedoService as _0x41de87,LocaleService as _0x36c9a1,MentionType as _0x5221fb,Optional as _0x232f40,Plugin as _0x4fa488,Quantity as _0x5674e5,Rectangle as _0x20582a,RxDisposable as _0x2ed6e1,Tools as _0x43f716,UniverInstanceType as _0x35f6ba,UserManagerService as _0x18e67b,Workbook as _0x146383,createIdentifier as _0x59b7ef,generateRandomId as _0x2269ed,isInternalEditorID as _0xd6485b,merge as _0x1bd68b,mergeOverrideWithDependencies as _0x21ee89,registerDependencies as _0x116877,resolveWithBasePath as _0x28734f,sequenceExecute as _0x525b70,toDisposable as _0x577479,touchDependencies as _0x3ac88d}from'@univerjs/core';import{DocStateChangeManagerService as _0x1ee581,RichTextEditingMutation as _0x51d6fe}from'@univerjs/docs';import{InsertSheetMutation as _0x21797a,SetSelectionsOperation as _0x2667e0,SheetPermissionInitController as _0x4856a0,SheetsSelectionsService as _0x47e021,WorkbookEditablePermission as _0x302f4b}from'@univerjs/sheets';function _0x45be(_0x1eed73,_0x59380a){_0x1eed73=_0x1eed73-0x111;const _0x4ffd55=_0x4ffd();let _0x45be61=_0x4ffd55[_0x1eed73];return _0x45be61;}import{BehaviorSubject as _0x2fdef4,ReplaySubject as _0x8764fa,Subject as _0x3bb8b8,concatMap as _0x42e4c2,firstValueFrom as _0x7cdf29,map as _0xe7ad12,merge as _0x2b1216,of as _0x3bb851,shareReplay as _0x3b397c,take as _0x3ef186,takeUntil as _0x6f4bf7}from'rxjs';import{CmdRspCode as _0x102325,CombCmd as _0x50ebb8,ErrorCode as _0x5c50d5,FileSource as _0x3e0751}from'@univerjs/protocol';import{ITelemetryService as _0x366457}from'@univerjs/telemetry';import{delay as _0x29361c,filter as _0x530fac,map as _0x290e14,take as _0x2244a2,takeUntil as _0x3a4e23}from'rxjs/operators';import{AddSlidePageMutation as _0x5bd3af,EnsureSlideMasterPageMutation as _0x23b723,MoveSlidePageMutation as _0x349e00,RemoveSlidePageMutation as _0xd8440b}from'@univerjs-pro/slides';import{HTTPRequest as _0x4cce1a,HTTPService as _0x286bba,ISocketService as _0x17a395,MergeInterceptorFactory as _0xbba41,ThresholdInterceptorFactory as _0x323fb8,UniverNetworkPlugin as _0x592ffd}from'@univerjs/network';import{UniverLicensePlugin as _0xa32b50,getGlobalObject as _0xcfed1e}from'@univerjs-pro/license';import{cbc as _0x6d05ef}from'@noble/ciphers/aes.js';import{concatBytes as _0xd51092,randomBytes as _0x43bce8,utf8ToBytes as _0x3b15c2}from'@noble/ciphers/utils.js';import{DRAWING_IMAGE_ALLOW_IMAGE_LIST as _0x5aad19,getDrawingImageAllowSize as _0x27e29a}from'@univerjs/drawing';const R=_0x849776(0x1c6),ft={},pt=_0x849776(0x373),mt=_0x849776(0x2c1),ht='HEARTBEAT_INTERVAL',gt='HEARTBEAT_TIMEOUT',_t=_0x849776(0x26c),vt=_0x849776(0x1ba),yt=0x3e8,bt=_0x849776(0x2e6),xt=_0x849776(0x2ba);function St(_0x41dfd7){const _0x679eab=_0x849776;return JSON[_0x679eab(0x39c)](_0x41dfd7)[_0x679eab(0x298)];}function Ct(_0x13a550){'@babel/helpers - typeof';const _0x3ad802=_0x849776;return Ct=typeof Symbol==_0x3ad802(0x2b4)&&typeof Symbol['iterator']=='symbol'?function(_0x2302d4){return typeof _0x2302d4;}:function(_0x2be316){const _0xa7fbb5=_0x3ad802;return _0x2be316&&typeof Symbol==_0xa7fbb5(0x2b4)&&_0x2be316[_0xa7fbb5(0x23c)]===Symbol&&_0x2be316!==Symbol[_0xa7fbb5(0x171)]?_0xa7fbb5(0x3aa):typeof _0x2be316;},Ct(_0x13a550);}function wt(_0x2182e6,_0x280271){const _0x1548bf=_0x849776;if(Ct(_0x2182e6)!=_0x1548bf(0x1b6)||!_0x2182e6)return _0x2182e6;var _0x3d5fdd=_0x2182e6[Symbol[_0x1548bf(0x21e)]];if(_0x3d5fdd!==void 0x0){var _0x22fa2c=_0x3d5fdd[_0x1548bf(0x150)](_0x2182e6,_0x280271||_0x1548bf(0x24c));if(Ct(_0x22fa2c)!=_0x1548bf(0x1b6))return _0x22fa2c;throw TypeError(_0x1548bf(0x184));}return(_0x280271===_0x1548bf(0x173)?String:Number)(_0x2182e6);}function Tt(_0x5b3372){const _0x39bea6=_0x849776;var _0x57bfe8=wt(_0x5b3372,_0x39bea6(0x173));return Ct(_0x57bfe8)==_0x39bea6(0x3aa)?_0x57bfe8:_0x57bfe8+'';}function z(_0x5f4757,_0x5ccd26,_0x1e9c7f){return(_0x5ccd26=Tt(_0x5ccd26))in _0x5f4757?Object['defineProperty'](_0x5f4757,_0x5ccd26,{'value':_0x1e9c7f,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5f4757[_0x5ccd26]=_0x1e9c7f,_0x5f4757;}let Et=function(_0x39501){const _0xbce9a5=_0x849776;return _0x39501['OTHER_CLIENT_EDITING']='OTHER_CLIENT_EDITING',_0x39501[_0xbce9a5(0x2f6)]='PERMISSION_DENIED',_0x39501[_0xbce9a5(0x39d)]='CONFLICT',_0x39501['CLOSE_ROOM']=_0xbce9a5(0x390),_0x39501[_0xbce9a5(0x157)]='JOIN_ROOM_FAILED',_0x39501[_0xbce9a5(0x39f)]=_0xbce9a5(0x39f),_0x39501[_0xbce9a5(0x378)]='SOCKET_FAILED',_0x39501[_0xbce9a5(0x317)]=_0xbce9a5(0x317),_0x39501;}({});var B=class{constructor(){const _0x5e8c36=_0x849776;z(this,_0x5e8c36(0x377),new _0x3bb8b8()),z(this,'event$',this[_0x5e8c36(0x377)]['asObservable']());}[_0x849776(0x2cd)](_0x2faf18){const _0x42858c=_0x849776;this[_0x42858c(0x377)][_0x42858c(0x3a2)](_0x2faf18);}},Dt=class{constructor(){const _0x1c83b7=_0x849776;z(this,_0x1c83b7(0x328),new _0x3bb8b8()),z(this,_0x1c83b7(0x20a),this[_0x1c83b7(0x328)][_0x1c83b7(0x142)]());}['onCommentUpdate'](_0x13873c){const _0x1e2fc5=_0x849776;this[_0x1e2fc5(0x328)][_0x1e2fc5(0x3a2)](_0x13873c);}};function V(_0x2daf1f,_0xffce78){return function(_0x4eb8e9,_0x412613){_0xffce78(_0x4eb8e9,_0x412613,_0x2daf1f);};}function H(_0x144faa,_0x34d002,_0x236597,_0x3ea413){const _0x23fb9b=_0x849776;var _0x144212=arguments['length'],_0x27742a=_0x144212<0x3?_0x34d002:_0x3ea413===null?_0x3ea413=Object[_0x23fb9b(0x1db)](_0x34d002,_0x236597):_0x3ea413,_0x4c1a5b;if(typeof Reflect==_0x23fb9b(0x1b6)&&typeof Reflect[_0x23fb9b(0x2c8)]==_0x23fb9b(0x2b4))_0x27742a=Reflect['decorate'](_0x144faa,_0x34d002,_0x236597,_0x3ea413);else{for(var _0x314403=_0x144faa['length']-0x1;_0x314403>=0x0;_0x314403--)(_0x4c1a5b=_0x144faa[_0x314403])&&(_0x27742a=(_0x144212<0x3?_0x4c1a5b(_0x27742a):_0x144212>0x3?_0x4c1a5b(_0x34d002,_0x236597,_0x27742a):_0x4c1a5b(_0x34d002,_0x236597))||_0x27742a);}return _0x144212>0x3&&_0x27742a&&Object[_0x23fb9b(0x12c)](_0x34d002,_0x236597,_0x27742a),_0x27742a;}let Ot=class extends _0x513609{constructor(_0x4bcb7b){const _0x4769f1=_0x849776;super(),this[_0x4769f1(0x367)]=_0x4bcb7b,z(this,_0x4769f1(0x2b3),new Map()),z(this,_0x4769f1(0x368),new _0x3bb8b8()),this[_0x4769f1(0x158)](_0x2b1216(this[_0x4769f1(0x367)]['getTypeOfUnitDisposed$'](_0x35f6ba['UNIVER_SHEET'])[_0x4769f1(0x245)](_0x290e14(_0x1188d2=>_0x1188d2['getUnitId']())),this[_0x4769f1(0x367)][_0x4769f1(0x384)](_0x35f6ba[_0x4769f1(0x39e)])[_0x4769f1(0x245)](_0x290e14(_0x4e0d03=>_0x4e0d03[_0x4769f1(0x347)]())),this[_0x4769f1(0x367)][_0x4769f1(0x384)](_0x35f6ba[_0x4769f1(0x2d3)])[_0x4769f1(0x245)](_0x290e14(_0x10a3d6=>_0x10a3d6['getUnitId']())),this[_0x4769f1(0x367)][_0x4769f1(0x384)](_0x35f6ba['UNIVER_BASE'])['pipe'](_0x290e14(_0x203599=>_0x203599[_0x4769f1(0x347)]())))[_0x4769f1(0x297)](_0x3805c0=>this[_0x4769f1(0x280)](_0x3805c0)));}[_0x849776(0x1fb)](_0x25a87c){const _0x35298c=_0x849776;return this[_0x35298c(0x2b3)][_0x35298c(0x155)](_0x25a87c)?_0x3bb851(this[_0x35298c(0x2b3)]['get'](_0x25a87c)):this[_0x35298c(0x368)][_0x35298c(0x245)](_0x290e14(_0x37dedd=>{const _0x1c46fe=_0x35298c;if(_0x37dedd===_0x25a87c)return this[_0x1c46fe(0x2b3)][_0x1c46fe(0x203)](_0x37dedd);}));}[_0x849776(0x2e3)](_0xc8e76d,_0x58bc26){const _0x36faa3=_0x849776;let _0xcb7c40=this['_roomMembers'][_0x36faa3(0x203)](_0xc8e76d);_0xcb7c40||(_0xcb7c40=new kt(),this[_0x36faa3(0x2b3)][_0x36faa3(0x116)](_0xc8e76d,_0xcb7c40),this['_roomCreated$'][_0x36faa3(0x3a2)](_0xc8e76d)),_0xcb7c40[_0x36faa3(0x2e3)](_0x58bc26);}['removeMember'](_0x4e2a7a,_0x3a985c){const _0x270304=_0x849776;let _0x3ddf10=this[_0x270304(0x2b3)][_0x270304(0x203)](_0x4e2a7a);_0x3ddf10&&_0x3ddf10[_0x270304(0x12a)](_0x3a985c);}['getRoom'](_0x3eb3de){const _0x4c615d=_0x849776;return this[_0x4c615d(0x2b3)]['get'](_0x3eb3de);}[_0x849776(0x163)](_0x3658ba,_0x169546){const _0x27b774=_0x849776;let _0x17c174=this['_roomMembers']['get'](_0x3658ba);if(_0x17c174)return _0x17c174[_0x27b774(0x163)](_0x169546);}['_removeRoom'](_0x5d0bd2){const _0x13c68c=_0x849776;let _0x3d68ff=this['_roomMembers']['get'](_0x5d0bd2);_0x3d68ff&&(_0x3d68ff['dispose'](),this[_0x13c68c(0x2b3)][_0x13c68c(0x32c)](_0x5d0bd2));}['dispose'](){const _0x251f74=_0x849776;this[_0x251f74(0x2b3)][_0x251f74(0x281)](_0x2331ae=>_0x2331ae[_0x251f74(0x257)]()),this[_0x251f74(0x2b3)]['clear'](),this[_0x251f74(0x368)]['complete']();}};Ot=H([V(0x0,_0x273a3b)],Ot);var kt=class extends _0x513609{constructor(..._0x1a8744){const _0x3d7362=_0x849776;super(..._0x1a8744),z(this,_0x3d7362(0x1a8),new Map()),z(this,'_members$',new _0x2fdef4(this[_0x3d7362(0x1a8)])),z(this,_0x3d7362(0x144),this[_0x3d7362(0x325)][_0x3d7362(0x142)]());}[_0x849776(0x257)](){const _0x23ddf1=_0x849776;this['_members']['clear'](),this[_0x23ddf1(0x325)]['complete']();}[_0x849776(0x2e3)](_0x2c1890){const _0x2bd959=_0x849776;this[_0x2bd959(0x1a8)][_0x2bd959(0x116)](_0x2c1890[_0x2bd959(0x25f)],_0x2c1890),this['_emitMembers']();}['removeMember'](_0x345006){const _0x4777d5=_0x849776;this[_0x4777d5(0x1a8)][_0x4777d5(0x32c)](_0x345006),this['_emitMembers']();}[_0x849776(0x163)](_0x316204){const _0x2cdfa0=_0x849776;return this['_members'][_0x2cdfa0(0x203)](_0x316204);}['getAllMembers'](){const _0x518880=_0x849776;return Array[_0x518880(0x226)](this['_members'][_0x518880(0x140)]());}[_0x849776(0x355)](){const _0x31c45f=_0x849776;this[_0x31c45f(0x325)]['next'](this['_members']);}};function At(_0x3baf0b,_0x5d5229){const _0x7ea27a=_0x849776;if(Mt(_0x3baf0b))return _0x5d5229;if(_0x5d5229[_0x7ea27a(0x19a)]===_0x389ee8[_0x7ea27a(0x199)]){let _0x592daf=Lt(_0x3baf0b),_0x35920a=_0x5d5229;return{..._0x35920a,'data':{..._0x35920a[_0x7ea27a(0x309)],'unitID':_0x3baf0b[_0x7ea27a(0x1fd)][_0x7ea27a(0x331)],'unitType':_0x3baf0b[_0x7ea27a(0x1fd)]['unitType']??_0x35920a['data'][_0x7ea27a(0x3b0)],'changeset':_0x592daf[_0x7ea27a(0x318)](_0x35920a[_0x7ea27a(0x309)][_0x7ea27a(0x121)],Rt(_0x3baf0b))}};}if(_0x5d5229[_0x7ea27a(0x19a)]===_0x389ee8[_0x7ea27a(0x111)]){let _0x1f9336=_0x5d5229;return{..._0x1f9336,'data':{..._0x1f9336['data'],'unitID':_0x3baf0b[_0x7ea27a(0x1fd)][_0x7ea27a(0x331)],'unitType':_0x3baf0b[_0x7ea27a(0x1fd)][_0x7ea27a(0x3b0)]??_0x1f9336[_0x7ea27a(0x309)][_0x7ea27a(0x3b0)]}};}return _0x5d5229;}function jt(_0x52d41b,_0x374b27){const _0x4c0d6d=_0x849776;if(Mt(_0x52d41b))return[_0x374b27];switch(_0x374b27[_0x4c0d6d(0x19a)]){case _0x389ee8[_0x4c0d6d(0x376)]:return[Nt(_0x52d41b,_0x374b27)];case _0x389ee8['PSEUDO_FETCH_MISSING_RESULT']:return[Ft(_0x52d41b,_0x374b27)];case _0x389ee8[_0x4c0d6d(0x2e4)]:return[Pt(_0x52d41b,_0x374b27)];default:return[_0x374b27];}}function Mt(_0x94ad52){const _0x1eff15=_0x849776;return _0x94ad52[_0x1eff15(0x1fd)][_0x1eff15(0x1b3)]==null&&_0x94ad52[_0x1eff15(0x1fd)][_0x1eff15(0x331)]===_0x94ad52['localUnitId']&&!_0x94ad52['changeset'];}function Nt(_0x44550a,_0x21d052){const _0x49a65d=_0x849776;return{..._0x21d052,'data':_0x133adf(It(_0x44550a,_0x373627(_0x21d052[_0x49a65d(0x309)])))};}function Pt(_0x3096c2,_0x1877ea){const _0x5caa78=_0x849776;return{..._0x1877ea,'data':It(_0x3096c2,_0x1877ea[_0x5caa78(0x309)])};}function Ft(_0x2ae533,_0xbaadaf){const _0x1b9d50=_0x849776;let _0x12b610=_0xbaadaf[_0x1b9d50(0x309)];return{..._0xbaadaf,'data':{..._0x12b610,'changesets':_0x12b610[_0x1b9d50(0x212)][_0x1b9d50(0x15d)](_0x15715e=>_0x133adf(It(_0x2ae533,_0x373627(_0x15715e))))}};}function It(_0x3742c6,_0x98c9f6){const _0x1eee99=_0x849776;return Lt(_0x3742c6)[_0x1eee99(0x291)](_0x98c9f6,Rt(_0x3742c6));}function Lt(_0x221185){const _0x8b40c7=_0x849776;if(!_0x221185['changeset'])throw Error(_0x8b40c7(0x1f7));return _0x221185[_0x8b40c7(0x121)];}function Rt(_0x50aa37){const _0x3ae624=_0x849776;return{'localUnitId':_0x50aa37[_0x3ae624(0x398)],'unitType':_0x50aa37['unitType'],'target':_0x50aa37[_0x3ae624(0x1fd)]};}let zt=function(_0x5ac996){const _0x5221b3=_0x849776;return _0x5ac996[_0x5ac996[_0x5221b3(0x2f7)]=0x0]=_0x5221b3(0x2f7),_0x5ac996[_0x5ac996['JOINING']=0x1]=_0x5221b3(0x23b),_0x5ac996[_0x5ac996[_0x5221b3(0x193)]=0x2]=_0x5221b3(0x193),_0x5ac996[_0x5ac996['ONLINE']=0x3]=_0x5221b3(0x1d8),_0x5ac996;}({});const Bt={[_0x102325['FAIL']]:'session.join-failed',[_0x102325[_0x849776(0x18e)]]:_0x849776(0x285),[_0x102325[_0x849776(0x1d9)]]:_0x849776(0x1d0),[_0x102325['JOIN_ROOM_PERMISSION_DENIED']]:_0x849776(0x192),[_0x102325['GLOBAL_ROOMS_CNT_EXCEEDS']]:'session.room-cnt-exceeds'};let Vt=class extends _0x2ed6e1{get[_0x849776(0x18c)](){const _0x40fe9b=_0x849776;return this[_0x40fe9b(0x1f0)][_0x40fe9b(0x1cf)]();}constructor(_0x2ada1d,_0x1d779d,_0x1653c2,_0x3ff78f,_0x1bee47,_0x13ae17,_0xde087a,_0x4c8aba){const _0x55acaf=_0x849776;super(),this[_0x55acaf(0x354)]=_0x2ada1d,this[_0x55acaf(0x12e)]=_0x1653c2,this[_0x55acaf(0x123)]=_0x3ff78f,this[_0x55acaf(0x1b0)]=_0x1bee47,this[_0x55acaf(0x286)]=_0x13ae17,this['_collaborationUIEventService']=_0xde087a,this['_telemetryService']=_0x4c8aba,z(this,_0x55acaf(0x1f0),new _0x2fdef4(0x0)),z(this,_0x55acaf(0x372),this[_0x55acaf(0x1f0)][_0x55acaf(0x142)]()),z(this,_0x55acaf(0x377),new _0x3bb8b8()),z(this,_0x55acaf(0x179),this['_event$'][_0x55acaf(0x142)]()),z(this,'_socket',void 0x0),z(this,_0x55acaf(0x2e8),void 0x0),z(this,_0x55acaf(0x151),void 0x0),z(this,_0x55acaf(0x167),!0x1),z(this,_0x55acaf(0x165),null),this[_0x55acaf(0x167)]=!!this[_0x55acaf(0x16a)],_0x1d779d[_0x55acaf(0x245)](_0x6f4bf7(this[_0x55acaf(0x240)]))[_0x55acaf(0x297)](_0x2f5fcc=>{const _0x3ec821=_0x55acaf;if(_0x2f5fcc!==void 0x0){if(this[_0x3ec821(0x127)]=_0x2f5fcc,_0x2f5fcc)this[_0x3ec821(0x29d)](_0x2f5fcc),this[_0x3ec821(0x2e8)]=_0x2f5fcc[_0x3ec821(0x223)][_0x3ec821(0x297)](_0x542ab1=>{const _0xbc26c8=_0x3ec821;_0x542ab1[_0xbc26c8(0x30d)]===this[_0xbc26c8(0x354)][_0xbc26c8(0x1fd)]['unitId']&&this['_onCombEvent'](_0x542ab1);});else{var _0x4937ff;this['_throwTelemetryCollaborationNewChangeset'](),this['_sessionStatus$'][_0x3ec821(0x3a2)](0x2),(_0x4937ff=this[_0x3ec821(0x2e8)])==null||_0x4937ff[_0x3ec821(0x33d)](),this[_0x3ec821(0x2e8)]=null;}}});}[_0x849776(0x37f)](){const _0x3bd2eb=_0x849776;var _0x485fe1;return((_0x485fe1=this[_0x3bd2eb(0x127)])==null?void 0x0:_0x485fe1[_0x3bd2eb(0x25f)])??null;}[_0x849776(0x257)](){const _0x1b0689=_0x849776;super[_0x1b0689(0x257)](),this[_0x1b0689(0x369)](),this['dispose$'][_0x1b0689(0x3a2)](),this['dispose$']['complete']();}['close'](){const _0xd7b61f=_0x849776;var _0x2e53bd;this['_throwTelemetryCollaborationNewChangeset'](),(_0x2e53bd=this['_socket'])==null||_0x2e53bd[_0xd7b61f(0x2c4)]({'cmd':_0x50ebb8[_0xd7b61f(0x336)],'data':{'roomID':this[_0xd7b61f(0x354)][_0xd7b61f(0x1fd)]['unitId']}}),this[_0xd7b61f(0x377)]['complete'](),this['_sessionStatus$'][_0xd7b61f(0x194)]();}[_0x849776(0x276)](_0x250558){const _0x12939f=_0x849776;_0x250558['cmd']===_0x50ebb8[_0x12939f(0x145)]?this[_0x12939f(0x1ac)](_0x250558):_0x250558[_0x12939f(0x2b1)]===_0x50ebb8[_0x12939f(0x252)]&&this[_0x12939f(0x1d1)](_0x250558);}[_0x849776(0x29d)](_0x36b3e6){const _0x236f61=_0x849776;this[_0x236f61(0x1f0)][_0x236f61(0x3a2)](0x1),_0x36b3e6[_0x236f61(0x2c4)]({'cmd':_0x50ebb8[_0x236f61(0x145)],'routeKey':this[_0x236f61(0x354)]['target']['unitId'],'routeType':'','data':{'rooms':[{'roomID':this[_0x236f61(0x354)]['target']['unitId']}]}});}[_0x849776(0x1ac)](_0x2b1796){const _0x36f62a=_0x849776;var _0x1ec923;if(_0x2b1796[_0x36f62a(0x1e2)]in Bt){this[_0x36f62a(0x271)][_0x36f62a(0x2cd)]({'id':'JOIN_ROOM_FAILED','data':Bt[_0x2b1796[_0x36f62a(0x1e2)]]}),this[_0x36f62a(0x1f0)][_0x36f62a(0x3a2)](0x2);return;}this[_0x36f62a(0x1f0)][_0x36f62a(0x3a2)](0x3);let _0x5c43ef=(_0x1ec923=_0x2b1796[_0x36f62a(0x309)][_0x36f62a(0x241)][this['_identity'][_0x36f62a(0x1fd)][_0x36f62a(0x331)]])==null?void 0x0:_0x1ec923[_0x36f62a(0x186)];_0x5c43ef&&_0x5c43ef[_0x36f62a(0x281)](_0x423293=>this[_0x36f62a(0x1b0)][_0x36f62a(0x2e3)](this[_0x36f62a(0x354)]['localUnitId'],_0x423293));}[_0x849776(0x1d1)](_0x1492b2){const _0x249a09=_0x849776;try{let _0x1fcced=jt(this[_0x249a09(0x354)],_0x1492b2['data']);for(let _0x341054 of _0x1fcced)switch(_0x341054['eventID']){case _0x389ee8[_0x249a09(0x1d5)]:this[_0x249a09(0x225)](_0x341054),this[_0x249a09(0x377)][_0x249a09(0x3a2)](_0x341054);break;case _0x389ee8[_0x249a09(0x38a)]:this['_onUserLeave'](_0x341054),this[_0x249a09(0x377)][_0x249a09(0x3a2)](_0x341054);break;case _0x389ee8[_0x249a09(0x3a6)]:case _0x389ee8[_0x249a09(0x2e4)]:this[_0x249a09(0x160)](),this[_0x249a09(0x183)](),this[_0x249a09(0x377)][_0x249a09(0x3a2)](_0x341054);break;case _0x389ee8[_0x249a09(0x33b)]:this[_0x249a09(0x12e)]['error']('save\x20fail\x20reason\x20is\x20'+JSON['stringify'](_0x341054)),this['_event$'][_0x249a09(0x3a2)](_0x341054);break;case _0x389ee8[_0x249a09(0x13d)]:this[_0x249a09(0x286)][_0x249a09(0x301)](_0x341054[_0x249a09(0x309)]),this[_0x249a09(0x377)]['next'](_0x341054);break;default:this[_0x249a09(0x377)][_0x249a09(0x3a2)](_0x341054);}}catch(_0x551db1){this[_0x249a09(0x12e)][_0x249a09(0x2bf)](_0x551db1,_0x1492b2);}}[_0x849776(0x225)](_0x2b1c29){const _0x3f4217=_0x849776;this['_memberService'][_0x3f4217(0x2e3)](this[_0x3f4217(0x354)][_0x3f4217(0x398)],_0x2b1c29[_0x3f4217(0x309)]);}['_onUserLeave'](_0x1a5484){const _0x301e66=_0x849776;this[_0x301e66(0x1b0)][_0x301e66(0x12a)](this[_0x301e66(0x354)][_0x301e66(0x398)],_0x1a5484['data']['memberID']);}async[_0x849776(0x2c4)](_0x587a49,_0x330bc9){const _0x5746b4=_0x849776;if(this['sessionStatus']!==0x3||!this[_0x5746b4(0x127)])throw Error('[CollaborationSession]:\x20should\x20not\x20send\x20message\x20when\x20the\x20session\x20is\x20offline!');try{let _0xd9582f=At(this[_0x5746b4(0x354)],_0x587a49);_0xd9582f[_0x5746b4(0x19a)]===_0x389ee8[_0x5746b4(0x199)]&&(this[_0x5746b4(0x2be)](),this[_0x5746b4(0x270)](_0xd9582f)),this[_0x5746b4(0x127)][_0x5746b4(0x2c4)]({'cmd':_0x50ebb8[_0x5746b4(0x3a3)],'routeKey':this['_identity'][_0x5746b4(0x1fd)]['unitId'],'routeType':'','data':_0xd9582f});}catch(_0x5a7880){this[_0x5746b4(0x12e)][_0x5746b4(0x2bf)](_0x5a7880);}}['_scheduleCollaborationTimeoutTimer'](){const _0x582e3c=_0x849776;this[_0x582e3c(0x151)]=setTimeout(()=>{const _0x537978=_0x582e3c;this['_collaborationTimeoutTimer']=null,this[_0x537978(0x271)][_0x537978(0x2cd)]({'id':_0x537978(0x317)});},this['_configService'][_0x582e3c(0x131)]('HEARTBEAT_TIMEOUT')??0x4e20);}[_0x849776(0x183)](){const _0x2189a6=_0x849776;this['_collaborationTimeoutTimer']&&=(clearTimeout(this[_0x2189a6(0x151)]),null);}[_0x849776(0x270)](_0x33e250){const _0x326f4b=_0x849776;if(!this[_0x326f4b(0x167)])return;let {data:_0x46b4b8}=_0x33e250,{unitID:_0x5dc32d,changeset:_0x2e9c6e}=_0x46b4b8,{mutations:_0xfd4eec,type:_0x28fad7}=_0x2e9c6e;this[_0x326f4b(0x165)]={'unitId':_0x5dc32d,'type':_0x28fad7,'startTime':performance['now'](),'stopTime':0x0,'duration':0x0,'size':St(_0xfd4eec)};}[_0x849776(0x160)](){const _0xa85b94=_0x849776;if(this[_0xa85b94(0x167)]){if(!this['_telemetryInfo']){this[_0xa85b94(0x12e)][_0xa85b94(0x2bf)]('[CollaborationSession]',_0xa85b94(0x1b8));return;}this[_0xa85b94(0x165)][_0xa85b94(0x25c)]=performance[_0xa85b94(0x2f9)](),this[_0xa85b94(0x165)]['duration']=this[_0xa85b94(0x165)][_0xa85b94(0x25c)]-this['_telemetryInfo'][_0xa85b94(0x26e)],this[_0xa85b94(0x16a)][_0xa85b94(0x1c9)]('collaboration_new_changeset',this[_0xa85b94(0x165)]),this[_0xa85b94(0x165)]=null;}}['_throwTelemetryCollaborationNewChangeset'](){const _0x2f9323=_0x849776;this[_0x2f9323(0x165)]=null;}};Vt=H([V(0x2,_0x3dc3ee),V(0x3,_0x6f8878),V(0x4,_0x409c93(Ot)),V(0x5,_0x409c93(Dt)),V(0x6,_0x409c93(B)),V(0x7,_0x232f40(_0x366457))],Vt);const U=_0x59b7ef(_0x849776(0x274));function Ht(_0x365353){const _0x15c286=_0x849776;return _0x15c286(0x2e0)+_0x365353;}function Ut(_0x277b93){const _0x2adad7=_0x849776;let {unitID:_0x4e2872,mutations:_0x1d3551}=_0x277b93;return{'unitId':_0x4e2872,'subUnitId':_0x1d3551[_0x2adad7(0x298)]>0x0?_0x1d3551[0x0][_0x2adad7(0x28d)]['subUnitId']:null};}let Wt=class{constructor(_0x378ae8,_0x477355,_0x341a52){const _0x3f5d35=_0x849776;this[_0x3f5d35(0x126)]=_0x378ae8,this[_0x3f5d35(0x25d)]=_0x477355,this[_0x3f5d35(0x303)]=_0x341a52;}[_0x849776(0x118)](_0x3740e8){const _0x42193d=_0x849776;var _0x456b4d,_0x4b75b0;let _0x20f4ef=this[_0x42193d(0x126)][_0x42193d(0x203)](_0x47e021),{unitId:_0x105530,subUnitId:_0x2680ad}=Ut(_0x3740e8),_0x37af5e=_0x20f4ef==null?void 0x0:_0x20f4ef[_0x42193d(0x265)](_0x105530)['getCurrentSelections'](),_0x3d27a8=(_0x456b4d=this[_0x42193d(0x303)][_0x42193d(0x2bb)](_0x105530))==null||(_0x456b4d=_0x456b4d[_0x42193d(0x3af)]())==null?void 0x0:_0x456b4d[_0x42193d(0x13b)]();if(_0x37af5e[_0x42193d(0x298)]===0x0||!_0x105530||!_0x2680ad)return;let _0x39d552=[{'id':_0x2667e0['id'],'params':{'unitId':_0x105530,'subUnitId':_0x3d27a8,'selections':_0x43f716[_0x42193d(0x201)](_0x37af5e)}}],_0x5136d2=this[_0x42193d(0x25d)][_0x42193d(0x26d)](_0x3740e8,_0x39d552);if(!_0x412a1a(_0x5136d2))throw _0x5136d2[_0x42193d(0x2bf)];let _0x2b565f=(_0x4b75b0=_0x5136d2[_0x42193d(0x278)][0x0])==null||(_0x4b75b0=_0x4b75b0[_0x42193d(0x28d)])==null?void 0x0:_0x4b75b0[_0x42193d(0x13c)];if(Array[_0x42193d(0x16d)](_0x2b565f)&&_0x2b565f[_0x42193d(0x298)]){if(_0x2b565f[_0x42193d(0x298)]===_0x39d552[0x0][_0x42193d(0x28d)][_0x42193d(0x13c)]['length']&&_0x2b565f['every']((_0x42437e,_0x33f51f)=>_0x20582a['equals'](_0x42437e[_0x42193d(0x32e)],_0x39d552[0x0][_0x42193d(0x28d)][_0x42193d(0x13c)][_0x33f51f]['range'])))return;this[_0x42193d(0x126)][_0x42193d(0x203)](_0x39bf2b)[_0x42193d(0x36f)](_0x2667e0['id'],{'unitId':_0x105530,'subUnitId':_0x3d27a8,'selections':_0x2b565f});}}};Wt=H([V(0x0,_0x409c93(_0x28d4d4)),V(0x1,_0x4ac591),V(0x2,_0x273a3b)],Wt);const W=_0x59b7ef(_0x849776(0x1ee));let Gt=function(_0x2159e5){const _0xbe9a0a=_0x849776;return _0x2159e5[_0x2159e5[_0xbe9a0a(0x209)]=0x0]='NO_OTHER_CLIENTS_EDITING',_0x2159e5[_0x2159e5[_0xbe9a0a(0x21b)]=0x1]='OTHER_CLIENTS_EDITING',_0x2159e5;}({});function Kt(_0x5ed144){const _0x435cc4=_0x849776;var _0x42cd7f;return!!((_0x42cd7f=_0x5ed144[_0x435cc4(0x28d)])!=null&&_0x42cd7f[_0x435cc4(0x33f)]);}const qt=new Set([_0x21797a['id']]),Jt=new Set([_0x5bd3af['id'],_0x23b723['id'],_0x349e00['id'],_0xd8440b['id']]);function Yt(_0x54eb6c,_0x405623=qt){const _0x2df454=_0x849776;let _0x2ac728=[];for(let _0x9bf450 of _0x54eb6c){if(_0x405623[_0x2df454(0x155)](_0x9bf450['id'])){if(_0x2ac728[_0x2df454(0x298)]>0x0)break;_0x2ac728['push'](_0x9bf450);break;}if(Kt(_0x9bf450)){if(_0x2ac728[_0x2df454(0x298)]>0x0)break;_0x2ac728['push'](_0x9bf450);break;}_0x2ac728[_0x2df454(0x221)](_0x9bf450);}return _0x2ac728;}function Xt(_0x50c5a8,_0x275a0c,_0x3d9c5f,_0x1bb1ef,_0x2ef216){const _0x5320ff=_0x849776;let _0x3be8ed=Yt(_0x50c5a8),_0xa7f2b2=_0x2ef216[_0x5320ff(0x180)](),_0x406fd3=(_0xa7f2b2==null?void 0x0:_0xa7f2b2[_0x5320ff(0x36e)])??'unknown',_0x3d2402=(_0xa7f2b2==null?void 0x0:_0xa7f2b2[_0x5320ff(0x25f)])??'unknown';return{'changeset':{'unitID':_0x275a0c,'type':_0x146dcc(_0x3d9c5f['getUnitType'](_0x275a0c)),'baseRev':_0x1bb1ef[_0x5320ff(0x237)](_0x275a0c),'revision':0x0,'userID':_0x406fd3,'memberID':_0x3d2402,'mutations':_0x3be8ed},'pendingMutations':_0x50c5a8['slice'](_0x3be8ed[_0x5320ff(0x298)])};}const Zt=Xt;function Qt(_0xcd97b8,_0x49dd65,_0x82b835,_0x486f6b,_0x1e67f6){const _0x528d5e=_0x849776;let _0x1dde72=Yt(_0xcd97b8,Jt),_0x4ee609=_0x1e67f6[_0x528d5e(0x180)](),_0x3c3cde=(_0x4ee609==null?void 0x0:_0x4ee609[_0x528d5e(0x36e)])??_0x528d5e(0x2ae),_0x3a7284=(_0x4ee609==null?void 0x0:_0x4ee609[_0x528d5e(0x25f)])??_0x528d5e(0x2ae);return{'changeset':{'unitID':_0x49dd65,'type':_0x146dcc(_0x82b835['getUnitType'](_0x49dd65)),'baseRev':_0x486f6b[_0x528d5e(0x237)](_0x49dd65),'revision':0x0,'userID':_0x3c3cde,'memberID':_0x3a7284,'mutations':_0x1dde72},'pendingMutations':_0xcd97b8[_0x528d5e(0x326)](_0x1dde72[_0x528d5e(0x298)])};}function $t(_0x24e7bf,_0x1e03e1,_0x13cf77,_0xbec954,_0x52a944){const _0x65a85d=_0x849776;let _0x203f73=_0x24e7bf[_0x65a85d(0x1ea)]((_0x1e3880,_0x39484d)=>{const _0x433947=_0x65a85d;let _0x2f8347=_0x1e3880[_0x1e3880[_0x433947(0x298)]-0x1],{id:_0x2beb5f}=_0x2f8347??{},{id:_0x5a7802,type:_0xa96d9a}=_0x39484d,_0x19c7f3=_0x39484d['params'];if(_0x2beb5f&&_0x2beb5f!==_0x5a7802)throw Error(_0x433947(0x1b9)+_0x2beb5f+_0x433947(0x124)+_0x5a7802+'.');if(!_0x2f8347)return[{'id':_0x5a7802,'type':_0xa96d9a,'params':{'unitId':_0x19c7f3[_0x433947(0x331)],'textRanges':_0x19c7f3[_0x433947(0x208)],'actions':_0x19c7f3['actions']}}];let _0x17d6eb=_0x2f8347[_0x433947(0x28d)];return en(_0x17d6eb,_0x19c7f3)?[..._0x1e3880[_0x433947(0x326)](0x0,-0x1),{..._0x2f8347,'id':_0x5a7802,'type':_0xa96d9a,'params':{'unitId':_0x19c7f3[_0x433947(0x331)],'textRanges':_0x19c7f3['textRanges'],'actions':_0x30efff[_0x433947(0x3a8)](_0x17d6eb[_0x433947(0x2f3)],_0x19c7f3[_0x433947(0x2f3)])}}]:[..._0x1e3880,{'id':_0x5a7802,'type':_0xa96d9a,'params':{'unitId':_0x19c7f3['unitId'],'textRanges':_0x19c7f3[_0x433947(0x208)],'actions':_0x19c7f3[_0x433947(0x2f3)]}}];},[]),_0xa874f7=_0x52a944['getCurrentUser'](),_0x23753e=(_0xa874f7==null?void 0x0:_0xa874f7[_0x65a85d(0x36e)])??_0x65a85d(0x2ae),_0x257807=(_0xa874f7==null?void 0x0:_0xa874f7[_0x65a85d(0x25f)])??'unknown';return{'changeset':{'unitID':_0x1e03e1,'type':_0x146dcc(_0x13cf77[_0x65a85d(0x388)](_0x1e03e1)),'baseRev':_0xbec954[_0x65a85d(0x237)](_0x1e03e1),'revision':0x0,'userID':_0x23753e,'memberID':_0x257807,'mutations':_0x203f73},'pendingMutations':_0x24e7bf['slice'](_0x24e7bf['length'])};}function en(_0x28c193,_0x51c0e7){const _0x1110c1=_0x849776;return!tn(_0x28c193)&&!tn(_0x51c0e7)&&nn(_0x28c193[_0x1110c1(0x2f3)],_0x51c0e7['actions']);}function tn(_0x2a4dcd){const _0x332753=_0x849776;return _0x2a4dcd[_0x332753(0x215)]!==void 0x0;}function nn(_0x4d41c1,_0x34fdcd){return rn(_0x4d41c1)&&rn(_0x34fdcd)&&!on(_0x4d41c1)&&!on(_0x34fdcd)&&!an(_0x4d41c1)&&!an(_0x34fdcd);}function rn(_0x265294){const _0x2ce539=_0x849776;return sn(_0x265294)[_0x2ce539(0x1e6)](_0x55c549=>cn(_0x55c549)&&_0x55c549['et']==='text-x');}function an(_0x99bc1){const _0x4c2ab1=_0x849776;return sn(_0x99bc1)['some'](_0xa1695a=>Array[_0x4c2ab1(0x16d)](_0xa1695a)||typeof _0xa1695a=='string'||typeof _0xa1695a==_0x4c2ab1(0x38d));}function on(_0x2e456c){const _0x308a63=_0x849776;return sn(_0x2e456c)[_0x308a63(0x1e6)](_0x35886d=>!cn(_0x35886d)||_0x35886d['et']!=='text-x'||!Array[_0x308a63(0x16d)](_0x35886d['e'])?!0x1:_0x35886d['e'][_0x308a63(0x1e6)](_0x34e17c=>!cn(_0x34e17c)||!cn(_0x34e17c[_0x308a63(0x134)])?!0x1:Object['prototype'][_0x308a63(0x397)][_0x308a63(0x150)](_0x34e17c[_0x308a63(0x134)],_0x308a63(0x3a7))||Object[_0x308a63(0x171)][_0x308a63(0x397)][_0x308a63(0x150)](_0x34e17c[_0x308a63(0x134)],'columnGroups')||Object[_0x308a63(0x171)]['hasOwnProperty'][_0x308a63(0x150)](_0x34e17c[_0x308a63(0x134)],_0x308a63(0x200))));}function sn(_0x5c14b4){const _0x3557ee=_0x849776;if(!Array[_0x3557ee(0x16d)](_0x5c14b4))return[];let _0x3850e6=_0x5c14b4[_0x3557ee(0x1d4)](_0x3557ee(0x134))?_0x5c14b4:_0x5c14b4['find'](_0x56a070=>Array[_0x3557ee(0x16d)](_0x56a070)&&_0x56a070[_0x3557ee(0x1d4)](_0x3557ee(0x134)));if(!Array[_0x3557ee(0x16d)](_0x3850e6))return[];let _0x86e697=_0x3850e6[_0x3557ee(0x236)](_0x3557ee(0x134));return _0x86e697===-0x1?[]:_0x3850e6[_0x3557ee(0x326)](_0x86e697+0x1);}function cn(_0x56b1dc){const _0x51519a=_0x849776;return typeof _0x56b1dc==_0x51519a(0x1b6)&&!!_0x56b1dc&&!Array[_0x51519a(0x16d)](_0x56b1dc);}function ln(_0x2862f3,_0x2f83e5){const _0x49d750=_0x849776;let _0x30439c=new _0x8764fa(0x1);return setTimeout(()=>_0x30439c[_0x49d750(0x3a2)](_0x2f83e5),_0x2862f3),_0x30439c[_0x49d750(0x142)]()[_0x49d750(0x245)](_0x3ef186(0x1));}var un,dn,fn;let pn=function(_0x39e3e6){const _0x2fe5ee=_0x849776;return _0x39e3e6[_0x2fe5ee(0x1b4)]=_0x2fe5ee(0x178),_0x39e3e6[_0x2fe5ee(0x207)]=_0x2fe5ee(0x152),_0x39e3e6[_0x2fe5ee(0x2a5)]=_0x2fe5ee(0x396),_0x39e3e6[_0x2fe5ee(0x195)]=_0x2fe5ee(0x38c),_0x39e3e6[_0x2fe5ee(0x29b)]=_0x2fe5ee(0x33a),_0x39e3e6[_0x2fe5ee(0x187)]=_0x2fe5ee(0x262),_0x39e3e6[_0x2fe5ee(0x39d)]=_0x2fe5ee(0x169),_0x39e3e6[_0x2fe5ee(0x193)]=_0x2fe5ee(0x11a),_0x39e3e6;}({});const mn=0x4e20,hn=0x2bf20;var G=class{constructor(_0xbcb1f3,_0xdaf1db,_0x3b8baf,_0x2f6f71,_0x46412f,_0x4f9fff,_0x151e67,_0x123873,_0x24e499){const _0x2dad6b=_0x849776;this['unitID']=_0xbcb1f3,this[_0x2dad6b(0x310)]=_0xdaf1db,this[_0x2dad6b(0x379)]=_0x46412f,this[_0x2dad6b(0x3a0)]=_0x4f9fff,this[_0x2dad6b(0x205)]=_0x151e67,this['_revisionService']=_0x123873,this[_0x2dad6b(0x2a8)]=_0x24e499,z(this,_0x2dad6b(0x2b0),null),z(this,_0x2dad6b(0x1d3),[]),this['_awaitingChangeset']=_0x3b8baf,this[_0x2dad6b(0x1d3)]=_0x2f6f71;}['_checkMissing'](_0x24ed98){const _0x13098f=_0x849776;let _0xa32c89=this['_revisionService']['getCurrentRevOfUnit'](this[_0x13098f(0x360)]);return _0x24ed98[_0x13098f(0x1dc)]>_0xa32c89+0x1?(this[_0x13098f(0x379)][_0x13098f(0x1a9)]({'from':_0xa32c89,'to':_0x24ed98['revision']-0x1}),!0x0):!0x1;}['_transformUndoredo'](_0x293f9b){const _0x5bb86f=_0x849776;this[_0x5bb86f(0x205)][_0x5bb86f(0x314)](this[_0x5bb86f(0x360)],_0x293f9b);}[_0x849776(0x227)](_0x59bde2){const _0x1fa00a=_0x849776;var _0x555c7a,_0x2f608a;(_0x555c7a=(_0x2f608a=this['_handler'])[_0x1fa00a(0x304)])==null||_0x555c7a[_0x1fa00a(0x150)](_0x2f608a,_0x59bde2);}[_0x849776(0x33c)](_0x7b4299){const _0x7eacd8=_0x849776;var _0x103a00,_0x2d40d1;return(_0x103a00=(_0x2d40d1=this['_handler'])[_0x7eacd8(0x115)])==null?void 0x0:_0x103a00[_0x7eacd8(0x150)](_0x2d40d1,_0x7b4299);}['_transformStateCache'](_0x4fc1ad){const _0x321c03=_0x849776;var _0x318f89,_0x3db267;return(_0x318f89=(_0x3db267=this[_0x321c03(0x379)])[_0x321c03(0x37d)])==null?void 0x0:_0x318f89['call'](_0x3db267,_0x4fc1ad);}[_0x849776(0x238)](_0x8542e8){const _0x334e44=_0x849776;var _0x24ed1,_0x36a5c8;return((_0x24ed1=(_0x36a5c8=this['_handler'])[_0x334e44(0x394)])==null?void 0x0:_0x24ed1[_0x334e44(0x150)](_0x36a5c8,_0x8542e8))??_0x8542e8;}[_0x849776(0x35f)](_0x1aaa8c){const _0xec85ec=_0x849776;var _0x5ea0e5,_0x725f4;return((_0x5ea0e5=(_0x725f4=this[_0xec85ec(0x379)])[_0xec85ec(0x122)])==null?void 0x0:_0x5ea0e5['call'](_0x725f4,_0x1aaa8c))??_0x1aaa8c;}[_0x849776(0x3b2)](_0x3e233b){const _0x74dfb4=_0x849776;if(this[_0x74dfb4(0x310)]===_0x35f6ba[_0x74dfb4(0x39e)]){let {unitID:_0x2521c6,mutations:_0x52a36f,memberID:_0x525e74}=_0x3e233b,_0x4fba70=_0x52a36f[_0x74dfb4(0x298)]>0x0?_0x52a36f[0x0][_0x74dfb4(0x28d)]['textRanges']:[];if(Array[_0x74dfb4(0x16d)](_0x4fba70)&&_0x4fba70['length']>0x0){var _0x5f3145,_0x3c53c6;(_0x5f3145=(_0x3c53c6=this[_0x74dfb4(0x379)])['onSyncEditingCollabCursor'])==null||_0x5f3145['call'](_0x3c53c6,{'unitID':_0x2521c6,'memberID':_0x525e74,'textRanges':_0x4fba70});}}}[_0x849776(0x26a)](){const _0x5024e7=_0x849776;var _0x2aacba;(_0x2aacba=this[_0x5024e7(0x2a8)])==null||_0x2aacba[_0x5024e7(0x37b)](this[_0x5024e7(0x360)],this[_0x5024e7(0x310)],this[_0x5024e7(0x2b0)],this[_0x5024e7(0x1d3)]);}['_getCurrentRevision'](){const _0x32901d=_0x849776;return this[_0x32901d(0x190)][_0x32901d(0x237)](this[_0x32901d(0x360)]);}[_0x849776(0x1ef)](){const _0x20547c=_0x849776;this[_0x20547c(0x190)][_0x20547c(0x135)](this['unitID']);}['_executeRemoteChangeset'](_0xc4f7b4){const _0x544694=_0x849776;let _0x4e25ae=this[_0x544694(0x238)](_0xc4f7b4);_0x4e25ae=this[_0x544694(0x35f)](_0x4e25ae);let _0x30981a=_0x525b70(_0x4e25ae[_0x544694(0x365)],this[_0x544694(0x3a0)],{'fromCollab':!0x0});if(!_0x30981a['result'])throw _0x30981a[_0x544694(0x2bf)]instanceof Error?_0x30981a[_0x544694(0x2bf)]:Error(_0x30981a['error']??_0x544694(0x340));this[_0x544694(0x33c)](_0x4e25ae),this[_0x544694(0x2ee)](_0x4e25ae),this[_0x544694(0x31d)](_0xc4f7b4),this[_0x544694(0x227)](_0x4e25ae),this[_0x544694(0x3b2)](_0x4e25ae),this[_0x544694(0x1ef)]();}};let K=class extends G{constructor(_0x33adef,_0x40a1f4,_0x5a1cf7,_0x2da4e0,_0x174f3e,_0xa242,_0x311ff8,_0x433561,_0x5f4a44,_0x1d0e2d){const _0x6038ce=_0x849776;super(_0x33adef,_0x40a1f4,null,[],_0x5a1cf7,_0x311ff8,_0xa242,_0x2da4e0,_0x1d0e2d),this['_injector']=_0x174f3e,this[_0x6038ce(0x12e)]=_0x433561,this[_0x6038ce(0x25d)]=_0x5f4a44,this[_0x6038ce(0x246)]=_0x1d0e2d,z(this,_0x6038ce(0x273),_0x6038ce(0x152));}[_0x849776(0x2c6)](_0x5067b5){const _0x1557fe=_0x849776;let _0x2f12d0=this[_0x1557fe(0x126)][_0x1557fe(0x3b3)](q,this['unitID'],this['type'],[_0x5067b5],this[_0x1557fe(0x379)]);return _0x2f12d0[_0x1557fe(0x2cc)](),_0x2f12d0[_0x1557fe(0x26a)](),_0x2f12d0;}['onRemoteChangeset'](_0x55d242){const _0x1a1250=_0x849776;if(this['_checkMissing'](_0x55d242))return this[_0x1a1250(0x126)][_0x1a1250(0x3b3)](Q,this[_0x1a1250(0x360)],this[_0x1a1250(0x310)],null,[],null,[_0x55d242],this[_0x1a1250(0x379)]);try{let _0xe5d035=this[_0x1a1250(0x25d)][_0x1a1250(0x26d)](_0x55d242,[_0x905a7a]);if(_0x412a1a(_0xe5d035)){let {c1Prime:_0x243b15}=_0xe5d035;return this[_0x1a1250(0x289)](_0x243b15),this;}throw _0xe5d035[_0x1a1250(0x2bf)];}catch(_0x22e6dc){return this[_0x1a1250(0x12e)][_0x1a1250(0x2bf)](_0x22e6dc),this[_0x1a1250(0x125)](!0x1);}}[_0x849776(0x125)](_0x4b20e1){const _0x6804c=_0x849776;return this['_injector'][_0x6804c(0x3b3)](X,this[_0x6804c(0x360)],this[_0x6804c(0x310)],null,[],this[_0x6804c(0x379)],_0x4b20e1);}[_0x849776(0x30f)](_0xa0b421){const _0x13ec40=_0x849776;if(_0xa0b421[_0x13ec40(0x1dc)]<=this[_0x13ec40(0x3a4)]())return this;throw Error('[SyncedState]:\x20received\x20acknowledgement.');}[_0x849776(0x133)](){const _0x14d47=_0x849776;throw Error(_0x14d47(0x248));}[_0x849776(0x239)](){return this;}[_0x849776(0x1af)](){const _0x3a67cc=_0x849776;return this[_0x3a67cc(0x126)][_0x3a67cc(0x3b3)](Z,this['unitID'],this[_0x3a67cc(0x310)],null,[],this[_0x3a67cc(0x379)]);}[_0x849776(0x2cf)](){return this;}['resend'](){const _0xde9fb6=_0x849776;throw Error(_0xde9fb6(0x1de));}[_0x849776(0x316)](){const _0x429056=_0x849776;let _0x5eefd1=this[_0x429056(0x190)][_0x429056(0x237)](this[_0x429056(0x360)]);return this[_0x429056(0x379)][_0x429056(0x1a9)]({'from':_0x5eefd1,'to':0x0}),this[_0x429056(0x126)][_0x429056(0x3b3)](Q,this['unitID'],this[_0x429056(0x310)],null,[],null,[],this[_0x429056(0x379)]);}};K=H([V(0x3,_0x409c93(_0x12caa0)),V(0x4,_0x409c93(_0x28d4d4)),V(0x5,_0x1348cc),V(0x6,_0x39bf2b),V(0x7,_0x3dc3ee),V(0x8,_0x4ac591),V(0x9,_0x232f40(U))],K);let q=un=class extends G{constructor(_0x25100b,_0x58a856,_0x534030,_0x534857,_0x188845,_0x155f55,_0x1f69c8,_0x330642,_0x1b9db7,_0x9244c,_0x2feaa1,_0x3741ee,_0x5594ec,_0x19e262){const _0x254200=_0x849776;super(_0x25100b,_0x58a856,null,_0x534030,_0x534857,_0x1b9db7,_0x5594ec,_0x155f55,_0x19e262),this[_0x254200(0x126)]=_0x188845,this[_0x254200(0x1ec)]=_0x1f69c8,this[_0x254200(0x12e)]=_0x330642,this['_configService']=_0x9244c,this[_0x254200(0x25d)]=_0x2feaa1,this[_0x254200(0x367)]=_0x3741ee,z(this,'status',_0x254200(0x396)),z(this,_0x254200(0x1f8),null),z(this,'_sendingTimer',null);}[_0x849776(0x2c6)](_0x3c4603){const _0x4f1147=_0x849776;return this[_0x4f1147(0x1d3)][_0x4f1147(0x221)](_0x3c4603),this[_0x4f1147(0x26a)](),this;}[_0x849776(0x13f)](_0x2faa09){const _0x194ec7=_0x849776;if(this[_0x194ec7(0x20f)](_0x2faa09))return this[_0x194ec7(0x17b)](),this[_0x194ec7(0x126)][_0x194ec7(0x3b3)](Q,this[_0x194ec7(0x360)],this[_0x194ec7(0x310)],null,this[_0x194ec7(0x1d3)],null,[_0x2faa09],this['_handler']);try{let _0x29eb97=this[_0x194ec7(0x25d)]['transformMutationsWithChangeset'](_0x2faa09,this[_0x194ec7(0x1d3)]);if(_0x412a1a(_0x29eb97)){let {c1Prime:_0x577348,m2Prime:_0x273ba3}=_0x29eb97;this[_0x194ec7(0x289)](_0x577348);let _0x188fd9=this['_injector'][_0x194ec7(0x3b3)](un,this['unitID'],this['type'],_0x273ba3,this[_0x194ec7(0x379)]);this[_0x194ec7(0x17b)]();let _0x2175f8=new Date()[_0x194ec7(0x329)](),_0x50b6eb=this[_0x194ec7(0x1f8)]?Math['max'](this['_scheduleCompleteTimestamp']-_0x2175f8,0x0):this[_0x194ec7(0x28b)]();return _0x188fd9[_0x194ec7(0x2cc)](_0x50b6eb),_0x188fd9;}throw _0x29eb97[_0x194ec7(0x2bf)];}catch(_0x366871){return this[_0x194ec7(0x12e)]['error'](_0x366871),this[_0x194ec7(0x125)](!0x1);}}[_0x849776(0x30f)](_0xca52dc){const _0xfd4faa=_0x849776;if(_0xca52dc[_0xfd4faa(0x1dc)]<=this['_getCurrentRevision']())return this;throw Error(_0xfd4faa(0x31b));}[_0x849776(0x133)](){const _0x12e386=_0x849776;throw Error(_0x12e386(0x2ac));}[_0x849776(0x239)](){return this;}[_0x849776(0x1af)](){const _0x473fd6=_0x849776;return this[_0x473fd6(0x17b)](),this[_0x473fd6(0x126)]['createInstance'](Z,this[_0x473fd6(0x360)],this['type'],null,this[_0x473fd6(0x1d3)],this['_handler']);}[_0x849776(0x2cf)](){return this;}[_0x849776(0x2cc)](_0xf177b2){const _0xedccae=_0x849776;let _0x5811d1=_0xf177b2??this[_0xedccae(0x28b)]();this[_0xedccae(0x1f8)]=new Date()['getTime']()+_0x5811d1,this['_sendingTimer']=setTimeout(()=>{const _0x58af6c=_0xedccae;this[_0x58af6c(0x17b)]();let _0x53e8c0=null;switch(this['type']){case _0x35f6ba['UNIVER_SHEET']:_0x53e8c0=Xt(this[_0x58af6c(0x1d3)],this[_0x58af6c(0x360)],this['_univerInstanceService'],this[_0x58af6c(0x190)],this[_0x58af6c(0x1ec)]);break;case _0x35f6ba[_0x58af6c(0x39e)]:_0x53e8c0=this[_0x58af6c(0x1d3)][_0x58af6c(0x3ae)](_0x44862b=>_0x44862b['id']===_0x51d6fe['id'])?$t(this[_0x58af6c(0x1d3)],this['unitID'],this[_0x58af6c(0x367)],this[_0x58af6c(0x190)],this[_0x58af6c(0x1ec)]):Xt(this[_0x58af6c(0x1d3)],this[_0x58af6c(0x360)],this[_0x58af6c(0x367)],this[_0x58af6c(0x190)],this[_0x58af6c(0x1ec)]);break;case _0x35f6ba['UNIVER_SLIDE']:_0x53e8c0=Qt(this[_0x58af6c(0x1d3)],this['unitID'],this['_univerInstanceService'],this['_revisionService'],this[_0x58af6c(0x1ec)]);break;case _0x35f6ba[_0x58af6c(0x14d)]:_0x53e8c0=Zt(this[_0x58af6c(0x1d3)],this[_0x58af6c(0x360)],this[_0x58af6c(0x367)],this[_0x58af6c(0x190)],this['_userManagerService']);break;case _0x35f6ba[_0x58af6c(0x2d3)]:_0x53e8c0=Xt(this[_0x58af6c(0x1d3)],this[_0x58af6c(0x360)],this[_0x58af6c(0x367)],this['_revisionService'],this[_0x58af6c(0x1ec)]);break;case _0x35f6ba[_0x58af6c(0x13e)]:_0x53e8c0=Xt(this[_0x58af6c(0x1d3)],this['unitID'],this[_0x58af6c(0x367)],this[_0x58af6c(0x190)],this[_0x58af6c(0x1ec)]);break;default:throw Error('[PendingState]:\x20unhandled\x20univer\x20type:\x20'+this[_0x58af6c(0x310)]+_0x58af6c(0x128));}let {changeset:_0x5917f3,pendingMutations:_0x5677bc}=_0x53e8c0;this[_0x58af6c(0x379)][_0x58af6c(0x266)](_0x5917f3);let _0xf71fd=_0x5677bc['length']?this[_0x58af6c(0x126)][_0x58af6c(0x3b3)](Y,this['unitID'],this[_0x58af6c(0x310)],_0x5917f3,_0x5677bc,this[_0x58af6c(0x379)],void 0x0):this[_0x58af6c(0x126)]['createInstance'](J,this['unitID'],this[_0x58af6c(0x310)],_0x5917f3,this['_handler']);_0xf71fd['_updateLocalCache'](),this[_0x58af6c(0x379)]['onStateChange'](this,_0xf71fd);},_0x5811d1);}[_0x849776(0x28b)](){const _0xb7e525=_0x849776;let _0x4f619e=this['_configService'][_0xb7e525(0x131)](R);return(_0x4f619e==null?void 0x0:_0x4f619e['sendChangesetTimeout'])??0x7d0;}[_0x849776(0x395)](){const _0x3371ce=_0x849776;throw Error(_0x3371ce(0x210));}[_0x849776(0x17b)](){const _0xfe9f5d=_0x849776;this[_0xfe9f5d(0x234)]!=null&&(clearTimeout(this[_0xfe9f5d(0x234)]),this[_0xfe9f5d(0x234)]=null);}[_0x849776(0x125)](_0x4bde90){const _0x4a894f=_0x849776;return this[_0x4a894f(0x17b)](),this[_0x4a894f(0x126)][_0x4a894f(0x3b3)](X,this[_0x4a894f(0x360)],this['type'],null,this[_0x4a894f(0x1d3)],this['_handler'],_0x4bde90);}};q=un=H([V(0x4,_0x409c93(_0x28d4d4)),V(0x5,_0x409c93(_0x12caa0)),V(0x6,_0x409c93(_0x18e67b)),V(0x7,_0x3dc3ee),V(0x8,_0x39bf2b),V(0x9,_0x6f8878),V(0xa,_0x4ac591),V(0xb,_0x273a3b),V(0xc,_0x1348cc),V(0xd,_0x232f40(U))],q);let J=dn=class extends G{constructor(_0xd01f27,_0x481584,_0x48acdb,_0x53bbdc,_0x112b10,_0x18320c,_0x208d42,_0x302578,_0x1cda5e,_0x285112,_0x4147d4){const _0x589e9c=_0x849776;super(_0xd01f27,_0x481584,_0x48acdb,[],_0x53bbdc,_0x208d42,_0x285112,_0x18320c,_0x4147d4),this['_injector']=_0x112b10,this['_logService']=_0x302578,this[_0x589e9c(0x25d)]=_0x1cda5e,z(this,_0x589e9c(0x273),'awaiting'),z(this,'_resendTimeout',0x0),z(this,_0x589e9c(0x2ed),0x0),z(this,_0x589e9c(0x29c),void 0x0),z(this,_0x589e9c(0x1f9),void 0x0);}[_0x849776(0x2c6)](_0x17beb6){const _0x31696c=_0x849776;this[_0x31696c(0x17b)]();let _0x835613=this[_0x31696c(0x126)][_0x31696c(0x3b3)](Y,this[_0x31696c(0x360)],this[_0x31696c(0x310)],this[_0x31696c(0x2b0)],[_0x17beb6],this[_0x31696c(0x379)],this[_0x31696c(0x29c)]);return _0x835613[_0x31696c(0x26a)](),_0x835613;}[_0x849776(0x13f)](_0x3efecf){const _0x5f008=_0x849776;if(this[_0x5f008(0x20f)](_0x3efecf))return this[_0x5f008(0x17b)](),this[_0x5f008(0x126)][_0x5f008(0x3b3)](Q,this[_0x5f008(0x360)],this['type'],this[_0x5f008(0x2b0)],[],null,[_0x3efecf],this[_0x5f008(0x379)]);try{let _0x4197a7=this[_0x5f008(0x25d)]['transformChangesets']([_0x3efecf],[this[_0x5f008(0x2b0)]],!0x1);if(_0x63d5c9(_0x4197a7)){let {c1Prime:_0x17d2e2,c2Prime:_0x1bebfd}=_0x4197a7;this[_0x5f008(0x289)](_0x17d2e2[0x0]),_0x1bebfd[0x0][_0x5f008(0x2b9)]=this['_getCurrentRevision'](),this[_0x5f008(0x17b)]();let _0x521fc2=this[_0x5f008(0x126)][_0x5f008(0x3b3)](dn,this[_0x5f008(0x360)],this[_0x5f008(0x310)],_0x1bebfd[0x0],this[_0x5f008(0x379)]);return _0x521fc2['_updateLocalCache'](),_0x521fc2;}throw _0x4197a7[_0x5f008(0x2bf)];}catch(_0x84c5ae){return this[_0x5f008(0x12e)][_0x5f008(0x2bf)](_0x84c5ae),this[_0x5f008(0x125)](!0x1);}}[_0x849776(0x30f)](_0x320d41){const _0x57a727=_0x849776;this[_0x57a727(0x17b)]();let _0x3919d5=this[_0x57a727(0x190)]['getCurrentRevOfUnit'](this[_0x57a727(0x360)]);if(_0x320d41[_0x57a727(0x1dc)]<=_0x3919d5)return this;if(this[_0x57a727(0x20f)](_0x320d41))return this[_0x57a727(0x126)][_0x57a727(0x3b3)](Q,this[_0x57a727(0x360)],this[_0x57a727(0x310)],this[_0x57a727(0x2b0)],[],_0x320d41[_0x57a727(0x1dc)],[],this[_0x57a727(0x379)]);this[_0x57a727(0x1ef)]();let _0x144aaa=this[_0x57a727(0x126)]['createInstance'](K,this[_0x57a727(0x360)],this[_0x57a727(0x310)],this[_0x57a727(0x379)]);return _0x144aaa[_0x57a727(0x26a)](),_0x144aaa;}[_0x849776(0x133)](_0x15261b){const _0x143b40=_0x849776;return this[_0x143b40(0x125)](!!(_0x15261b!=null&&_0x15261b['isPermissionRej']));}[_0x849776(0x239)](_0x5b05f2){const _0x16fc2d=_0x849776;return this[_0x16fc2d(0x2ed)]>hn?this[_0x16fc2d(0x1af)]():(this['_resendTimer']=ln(this[_0x16fc2d(0x1a7)],{'timeout':this[_0x16fc2d(0x1a7)],'reqId':_0x5b05f2[_0x16fc2d(0x182)]}),this[_0x16fc2d(0x1f9)]=this['_resendTimer'][_0x16fc2d(0x297)](({reqId:_0xb31478,timeout:_0x57a03c})=>{const _0x4170de=_0x16fc2d;this[_0x4170de(0x27e)](_0xb31478,_0x57a03c);}),this);}['toggleOffline'](){const _0x1f9e0c=_0x849776;return this['_clearScheduledTask'](),this[_0x1f9e0c(0x126)]['createInstance'](Z,this[_0x1f9e0c(0x360)],this[_0x1f9e0c(0x310)],this[_0x1f9e0c(0x2b0)],[],this[_0x1f9e0c(0x379)]);}[_0x849776(0x2cf)](){return this;}['resend'](){const _0x5149cf=_0x849776;this[_0x5149cf(0x379)]['onSendChangeset'](this[_0x5149cf(0x2b0)]);}['_onConflict'](_0x3a5425){const _0x510131=_0x849776;return this[_0x510131(0x17b)](),this[_0x510131(0x126)][_0x510131(0x3b3)](X,this[_0x510131(0x360)],this[_0x510131(0x310)],this['_awaitingChangeset'],[],this[_0x510131(0x379)],_0x3a5425);}['_resendWithTimeout'](_0x2da59a,_0xa53dee){const _0x304852=_0x849776;var _0x4f5180;_0x2da59a===((_0x4f5180=this[_0x304852(0x2b0)])==null?void 0x0:_0x4f5180[_0x304852(0x182)])&&(this['resend'](),this['_resendTimeout']=_0xa53dee===0x0?0x3e8:Math[_0x304852(0x2ab)](_0xa53dee*0x2,mn),this[_0x304852(0x2ed)]+=this['_resendTimeout']);}[_0x849776(0x17b)](){const _0x1feefa=_0x849776;var _0xc6ee17;(_0xc6ee17=this[_0x1feefa(0x1f9)])==null||_0xc6ee17[_0x1feefa(0x33d)](),this[_0x1feefa(0x1a7)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};J=dn=H([V(0x4,_0x409c93(_0x28d4d4)),V(0x5,_0x409c93(_0x12caa0)),V(0x6,_0x39bf2b),V(0x7,_0x3dc3ee),V(0x8,_0x4ac591),V(0x9,_0x1348cc),V(0xa,_0x232f40(U))],J);let Y=fn=class extends G{constructor(_0xfec796,_0x51060e,_0x58aba6,_0xeb8d82,_0x272e9a,_0x432e52,_0x25072c,_0x2c8482,_0x509b21,_0x17a127,_0x228c81,_0x1540fb,_0x3cf2c4){const _0x47d0ac=_0x849776;super(_0xfec796,_0x51060e,_0x58aba6,_0xeb8d82,_0x272e9a,_0x509b21,_0x1540fb,_0x2c8482,_0x3cf2c4),this[_0x47d0ac(0x126)]=_0x25072c,this['_logService']=_0x17a127,this[_0x47d0ac(0x25d)]=_0x228c81,this['localCacheService']=_0x3cf2c4,z(this,_0x47d0ac(0x273),'awaiting_with_pending'),z(this,_0x47d0ac(0x1a7),0x0),z(this,'_maxTotalRetryTimeout',0x0),z(this,_0x47d0ac(0x29c),void 0x0),z(this,_0x47d0ac(0x1f9),void 0x0),_0x432e52&&(this[_0x47d0ac(0x29c)]=_0x432e52,this[_0x47d0ac(0x1f9)]=this[_0x47d0ac(0x29c)][_0x47d0ac(0x297)](({reqId:_0x30caf1,timeout:_0x4a13b1})=>{const _0x143e01=_0x47d0ac;this[_0x143e01(0x27e)](_0x30caf1,_0x4a13b1);}));}[_0x849776(0x2c6)](_0x418efd){const _0x380a18=_0x849776;return this[_0x380a18(0x1d3)][_0x380a18(0x221)](_0x418efd),this;}[_0x849776(0x13f)](_0x42ba81){const _0x2d9eb2=_0x849776;if(this[_0x2d9eb2(0x20f)](_0x42ba81))return this[_0x2d9eb2(0x17b)](),this['_injector']['createInstance'](Q,this[_0x2d9eb2(0x360)],this[_0x2d9eb2(0x310)],this[_0x2d9eb2(0x2b0)],this['_pendingMutations'],null,[_0x42ba81],this[_0x2d9eb2(0x379)]);try{let _0x22d4ef=this[_0x2d9eb2(0x25d)][_0x2d9eb2(0x129)]([_0x42ba81],[this[_0x2d9eb2(0x2b0)]],!0x1);if(_0x63d5c9(_0x22d4ef)){let {c1Prime:_0x3f4e95,c2Prime:_0x249ec9}=_0x22d4ef,_0xeae07d=this[_0x2d9eb2(0x25d)][_0x2d9eb2(0x26d)](_0x3f4e95[0x0],this[_0x2d9eb2(0x1d3)]);if(_0x412a1a(_0xeae07d)){let {c1Prime:_0x446e27,m2Prime:_0x21219f}=_0xeae07d;return this['_executeRemoteChangeset'](_0x446e27),_0x249ec9[0x0][_0x2d9eb2(0x2b9)]=this['_getCurrentRevision'](),this[_0x2d9eb2(0x17b)](),this['_injector'][_0x2d9eb2(0x3b3)](fn,this[_0x2d9eb2(0x360)],this[_0x2d9eb2(0x310)],_0x249ec9[0x0],_0x21219f,this[_0x2d9eb2(0x379)],void 0x0);}throw _0xeae07d['error'];}throw _0x22d4ef['error'];}catch(_0x343e49){return this['_logService'][_0x2d9eb2(0x2bf)](_0x343e49),this[_0x2d9eb2(0x125)](!0x1);}}[_0x849776(0x30f)](_0x3dfb32){const _0x3c531b=_0x849776;this['_clearScheduledTask']();let _0x2ccb10=this[_0x3c531b(0x3a4)]();if(_0x3dfb32['revision']<=_0x2ccb10)return this;if(this[_0x3c531b(0x20f)](_0x3dfb32))return this[_0x3c531b(0x126)]['createInstance'](Q,this['unitID'],this[_0x3c531b(0x310)],this[_0x3c531b(0x2b0)],this[_0x3c531b(0x1d3)],_0x3dfb32['revision'],[],this[_0x3c531b(0x379)]);this[_0x3c531b(0x1ef)]();let _0x25d070=this[_0x3c531b(0x126)][_0x3c531b(0x3b3)](q,this[_0x3c531b(0x360)],this['type'],this[_0x3c531b(0x1d3)],this[_0x3c531b(0x379)]);return _0x25d070['_schedule'](),_0x25d070[_0x3c531b(0x26a)](),_0x25d070;}[_0x849776(0x133)](_0x22dcf){const _0x3c2fb=_0x849776;return this[_0x3c2fb(0x125)](!!(_0x22dcf!=null&&_0x22dcf[_0x3c2fb(0x1eb)]));}[_0x849776(0x239)](_0x5e5fc3){const _0x3b37c1=_0x849776;return this[_0x3b37c1(0x2ed)]>hn?this[_0x3b37c1(0x1af)]():(this[_0x3b37c1(0x29c)]=ln(this['_resendTimeout'],{'timeout':this[_0x3b37c1(0x1a7)],'reqId':_0x5e5fc3[_0x3b37c1(0x182)]}),this[_0x3b37c1(0x1f9)]=this['_resendTimer'][_0x3b37c1(0x297)](({reqId:_0x80f299,timeout:_0x1c2a53})=>{const _0xd2f942=_0x3b37c1;this[_0xd2f942(0x27e)](_0x80f299,_0x1c2a53);}),this);}[_0x849776(0x1af)](){const _0x9b3487=_0x849776;return this[_0x9b3487(0x17b)](),this[_0x9b3487(0x126)]['createInstance'](Z,this[_0x9b3487(0x360)],this[_0x9b3487(0x310)],this[_0x9b3487(0x2b0)],this[_0x9b3487(0x1d3)],this[_0x9b3487(0x379)]);}['toggleOnline'](){return this;}[_0x849776(0x395)](){const _0x319beb=_0x849776;this['_handler']['onSendChangeset'](this[_0x319beb(0x2b0)]);}['_onConflict'](_0x2d3e71){const _0x4173a2=_0x849776;return this[_0x4173a2(0x17b)](),this['_injector'][_0x4173a2(0x3b3)](X,this[_0x4173a2(0x360)],this[_0x4173a2(0x310)],null,this['_pendingMutations'],this[_0x4173a2(0x379)],_0x2d3e71);}[_0x849776(0x27e)](_0x2d3583,_0x598852){const _0x7a893b=_0x849776;var _0x1e93d2;_0x2d3583===((_0x1e93d2=this['_awaitingChangeset'])==null?void 0x0:_0x1e93d2[_0x7a893b(0x182)])&&(this[_0x7a893b(0x395)](),this[_0x7a893b(0x1a7)]=_0x598852===0x0?0x3e8:Math[_0x7a893b(0x2ab)](_0x598852*0x2,mn),this[_0x7a893b(0x2ed)]+=this[_0x7a893b(0x1a7)]);}[_0x849776(0x17b)](){const _0xef21a0=_0x849776;var _0x4e2852;(_0x4e2852=this[_0xef21a0(0x1f9)])==null||_0x4e2852[_0xef21a0(0x33d)](),this[_0xef21a0(0x1a7)]=0x0,this['_maxTotalRetryTimeout']=0x0;}};Y=fn=H([V(0x6,_0x409c93(_0x28d4d4)),V(0x7,_0x409c93(_0x12caa0)),V(0x8,_0x39bf2b),V(0x9,_0x3dc3ee),V(0xa,_0x4ac591),V(0xb,_0x1348cc),V(0xc,_0x232f40(U))],Y);let X=class extends G{constructor(_0x2e60f1,_0x4efc18,_0x54b3be,_0x373c83,_0x5477f9,_0x20fbfb=!0x1,_0xe628a,_0x52d30c,_0x8c10d9,_0x11eb32,_0x1bbdec,_0x556eda,_0x112e92){const _0x3e464c=_0x849776;super(_0x2e60f1,_0x4efc18,_0x54b3be,_0x373c83,_0x5477f9,_0x52d30c,_0x8c10d9,_0x11eb32,_0x112e92),this[_0x3e464c(0x15c)]=_0x20fbfb,this[_0x3e464c(0x16c)]=_0xe628a,this[_0x3e464c(0x1c4)]=_0x1bbdec,this[_0x3e464c(0x271)]=_0x556eda,this[_0x3e464c(0x246)]=_0x112e92,z(this,_0x3e464c(0x273),_0x3e464c(0x169)),this[_0x3e464c(0x189)](),this[_0x3e464c(0x113)](),this[_0x3e464c(0x247)]();}[_0x849776(0x2c6)](){return this;}[_0x849776(0x13f)](){return this;}[_0x849776(0x30f)](){return this;}[_0x849776(0x133)](){return this;}[_0x849776(0x239)](){return this;}['toggleOffline'](){return this;}[_0x849776(0x2cf)](){return this;}[_0x849776(0x395)](){const _0x564631=_0x849776;throw Error(_0x564631(0x32a));}[_0x849776(0x113)](){const _0x720e8f=_0x849776;var _0x48da9a,_0x6d92cf,_0x28a0dc;(_0x48da9a=this[_0x720e8f(0x2a8)])==null||(_0x6d92cf=_0x48da9a[_0x720e8f(0x375)])==null||(_0x6d92cf=_0x6d92cf[_0x720e8f(0x150)](_0x48da9a,this[_0x720e8f(0x360)],'conflict'))==null||_0x6d92cf[_0x720e8f(0x1fc)](()=>void 0x0),(_0x28a0dc=this[_0x720e8f(0x2a8)])==null||_0x28a0dc['updateOfflineData'](this[_0x720e8f(0x360)],this['type'],null,[]);}[_0x849776(0x189)](){const _0x26c783=_0x849776;this['_isPermissionRej']?this[_0x26c783(0x271)][_0x26c783(0x2cd)]({'id':_0x26c783(0x2f6)}):this[_0x26c783(0x271)][_0x26c783(0x2cd)]({'id':_0x26c783(0x39d)});}[_0x849776(0x247)](){const _0xda5df6=_0x849776;this[_0xda5df6(0x16c)][_0xda5df6(0x25e)](new _0x302f4b(this['unitID'])['id'],!0x1);}};X=H([V(0x6,_0x409c93(_0x2cf373)),V(0x7,_0x39bf2b),V(0x8,_0x1348cc),V(0x9,_0x409c93(_0x12caa0)),V(0xa,_0x409c93(_0x36c9a1)),V(0xb,_0x409c93(B)),V(0xc,_0x232f40(U))],X);let Z=class extends G{constructor(_0x4acffd,_0x8fb80f,_0x42dd6c,_0x1c7fec,_0x3edaa0,_0x4950cf,_0x42807e,_0x52a76d,_0x4a39ae,_0x5e6d26){const _0x2b2694=_0x849776;super(_0x4acffd,_0x8fb80f,_0x42dd6c,_0x1c7fec,_0x3edaa0,_0x52a76d,_0x4a39ae,_0x42807e,_0x5e6d26),this[_0x2b2694(0x126)]=_0x4950cf,z(this,_0x2b2694(0x273),'offline');}[_0x849776(0x2c6)](_0x2e26d3){const _0x174430=_0x849776;return this[_0x174430(0x1d3)][_0x174430(0x221)](_0x2e26d3),this[_0x174430(0x26a)](),this;}[_0x849776(0x13f)](_0x3b6d68){const _0x1849a4=_0x849776;throw Error(_0x1849a4(0x2d0));}[_0x849776(0x30f)](){throw Error('[OfflineState]:\x20received\x20acknowledgement.');}['onRemoteRej'](){throw Error('[OfflineState]:\x20received\x20rejection.');}['onRemoteRetry'](){return this;}['toggleOffline'](){return this;}['toggleOnline'](){const _0x510bb4=_0x849776;let {_injector:_0x3c60ea,_pendingMutations:_0x1dd1ed,_awaitingChangeset:_0x4b165f,unitID:_0x4fbde5,_handler:_0x43ed7d,type:_0x5d38e5}=this,_0x433261=gn(_0x3c60ea,_0x4fbde5,_0x5d38e5,_0x4b165f,_0x1dd1ed,_0x43ed7d);return _0x433261 instanceof q?_0x433261[_0x510bb4(0x2cc)]():(_0x433261 instanceof Y||_0x433261 instanceof J)&&_0x433261['resend'](),_0x433261;}[_0x849776(0x395)](){const _0x3bbfd7=_0x849776;throw Error(_0x3bbfd7(0x21d));}};Z=H([V(0x5,_0x409c93(_0x28d4d4)),V(0x6,_0x409c93(_0x12caa0)),V(0x7,_0x39bf2b),V(0x8,_0x1348cc),V(0x9,_0x232f40(U))],Z);let Q=class extends G{constructor(_0x5e790f,_0x436cf9,_0x6b8d7d,_0xc75585,_0x3618ee,_0x4812de,_0x3a65bb,_0x4f1e5d,_0x1c568d,_0x29a68c,_0x4311a0,_0x3522d4,_0x2dba6f,_0x2aa5ef){const _0x499d67=_0x849776;super(_0x5e790f,_0x436cf9,_0x6b8d7d,_0xc75585,_0x3a65bb,_0x4311a0,_0x3522d4,_0x1c568d,_0x2aa5ef),this[_0x499d67(0x39a)]=_0x3618ee,this[_0x499d67(0x30b)]=_0x4812de,this['_injector']=_0x4f1e5d,this[_0x499d67(0x12e)]=_0x29a68c,this[_0x499d67(0x25d)]=_0x2dba6f,this[_0x499d67(0x246)]=_0x2aa5ef,z(this,_0x499d67(0x273),_0x499d67(0x262));}[_0x849776(0x1a0)](_0x57359c){const _0x163982=_0x849776;try{if(this[_0x163982(0x2c9)](_0x57359c)[_0x163982(0x11f)])throw Error('[FetchMissState]:\x20missing\x20changesets\x20response\x20still\x20has\x20revision\x20gaps.');if(this['_handleRemoteChangesets']([...this[_0x163982(0x30b)]][_0x163982(0x1f2)]((_0x37d8db,_0x20988a)=>_0x37d8db['revision']-_0x20988a[_0x163982(0x1dc)]))[_0x163982(0x11f)])return this['_queuedRemoteChangesets']=[],this[_0x163982(0x26a)](),this[_0x163982(0x379)][_0x163982(0x1a9)]({'from':this['_getCurrentRevision'](),'to':0x0}),this;let _0x21a9bb=this[_0x163982(0x2b0)],_0x267a0d=this[_0x163982(0x1d3)],_0x768acc;if(_0x21a9bb&&_0x267a0d['length']!==0x0)_0x768acc=this['_injector'][_0x163982(0x3b3)](Y,this[_0x163982(0x360)],this[_0x163982(0x310)],_0x21a9bb,_0x267a0d,this[_0x163982(0x379)],void 0x0);else{if(_0x21a9bb&&_0x267a0d[_0x163982(0x298)]===0x0)_0x21a9bb['baseRev']=this['_getCurrentRevision'](),_0x768acc=this[_0x163982(0x126)][_0x163982(0x3b3)](J,this['unitID'],this[_0x163982(0x310)],_0x21a9bb,this[_0x163982(0x379)]);else{if(_0x267a0d[_0x163982(0x298)]!==0x0){let _0x7d692c=this[_0x163982(0x126)]['createInstance'](q,this[_0x163982(0x360)],this['type'],_0x267a0d,this['_handler']);_0x7d692c[_0x163982(0x2cc)](),_0x768acc=_0x7d692c;}else _0x768acc=this[_0x163982(0x126)][_0x163982(0x3b3)](K,this['unitID'],this[_0x163982(0x310)],this[_0x163982(0x379)]);}}return _0x768acc[_0x163982(0x26a)](),_0x768acc;}catch(_0x67c4e4){return this[_0x163982(0x12e)][_0x163982(0x2bf)](_0x163982(0x17d),_0x163982(0x255),_0x67c4e4),this['_injector'][_0x163982(0x3b3)](X,this[_0x163982(0x360)],this[_0x163982(0x310)],this[_0x163982(0x2b0)],this[_0x163982(0x1d3)],this[_0x163982(0x379)],!0x1);}}[_0x849776(0x2c9)](_0x5bbefb){const _0x36a03e=_0x849776;this[_0x36a03e(0x1a3)]();for(let _0x13d827=0x0;_0x13d827<_0x5bbefb[_0x36a03e(0x298)];_0x13d827++){let _0x11856f=_0x5bbefb[_0x13d827],_0x430b82=this[_0x36a03e(0x3a4)]();if(!(_0x11856f['revision']<=_0x430b82)){if(_0x11856f[_0x36a03e(0x1dc)]>_0x430b82+0x1)return{'missingChangesets':!0x0};if(this[_0x36a03e(0x34e)](_0x11856f)){this[_0x36a03e(0x2ff)]();continue;}this[_0x36a03e(0x243)](_0x11856f),this[_0x36a03e(0x1a3)]();}}return{'missingChangesets':!0x1};}['_transformAndApplyRemoteChangeset'](_0x4b0ff6){const _0x37ac35=_0x849776;let _0x29ad7b=_0x4b0ff6,_0x3f596c=this[_0x37ac35(0x2b0)];if(_0x3f596c){let _0x398a2a=this[_0x37ac35(0x25d)]['transformChangesets']([_0x4b0ff6],[_0x3f596c],!0x1);if(!_0x63d5c9(_0x398a2a))throw _0x398a2a[_0x37ac35(0x2bf)];_0x29ad7b=_0x398a2a[_0x37ac35(0x1a1)][0x0],_0x3f596c=_0x398a2a[_0x37ac35(0x149)][0x0];}let _0xc28968=this[_0x37ac35(0x1d3)];if(_0xc28968[_0x37ac35(0x298)]){let _0x177b76=this[_0x37ac35(0x25d)][_0x37ac35(0x26d)](_0x29ad7b,_0xc28968);if(!_0x412a1a(_0x177b76))throw _0x177b76[_0x37ac35(0x2bf)];_0x29ad7b=_0x177b76[_0x37ac35(0x1a1)],_0xc28968=_0x177b76[_0x37ac35(0x278)];}this[_0x37ac35(0x289)](_0x29ad7b),_0x3f596c&&(_0x3f596c['baseRev']=this[_0x37ac35(0x3a4)]()),this[_0x37ac35(0x2b0)]=_0x3f596c,this[_0x37ac35(0x1d3)]=_0xc28968;}['_acknowledgeAwaitingIfReady'](){const _0x1fa153=_0x849776;if(!this[_0x1fa153(0x2b0)]||this['_acknowledgedAwaitingRevision']==null)return;let _0x3b8d93=this['_getCurrentRevision']();if(this[_0x1fa153(0x39a)]<=_0x3b8d93)throw Error('[FetchingMissState]:\x20received\x20stale\x20ack\x20revision:\x20'+this[_0x1fa153(0x39a)]+'.');this[_0x1fa153(0x39a)]===_0x3b8d93+0x1&&this[_0x1fa153(0x2ff)]();}['_acknowledgeAwaiting'](){const _0x5bfec9=_0x849776;this[_0x5bfec9(0x1ef)](),this[_0x5bfec9(0x2b0)]=null,this[_0x5bfec9(0x39a)]=null;}[_0x849776(0x34e)](_0x27e801){const _0xa38169=_0x849776;let _0x373b69=this['_awaitingChangeset'];return!_0x373b69||!_0x373b69[_0xa38169(0x1a6)]||_0x373b69[_0xa38169(0x182)]===null||_0x373b69[_0xa38169(0x182)]===void 0x0?!0x1:_0x27e801[_0xa38169(0x360)]===_0x373b69['unitID']&&_0x27e801['sid']===_0x373b69['sid']&&_0x27e801[_0xa38169(0x182)]===_0x373b69[_0xa38169(0x182)];}[_0x849776(0x395)](){throw Error('[FetchingMissState]:\x20invalid\x20calling\x20to\x20`resend`.');}[_0x849776(0x2c6)](_0x760eb9){const _0x1ba579=_0x849776;return this[_0x1ba579(0x1d3)]['push'](_0x760eb9),this;}[_0x849776(0x13f)](_0x479a07){const _0x21b385=_0x849776;return this['_queuedRemoteChangesets'][_0x21b385(0x221)](_0x479a07),this;}[_0x849776(0x30f)](_0x2f5b7f){const _0x18f3ae=_0x849776;if(this['_awaitingChangeset']){let _0x367e00=this[_0x18f3ae(0x3a4)]();return _0x2f5b7f['revision']<=_0x367e00||(_0x367e00+0x1===_0x2f5b7f['revision']?(this['_incrementRevisionNumber'](),this[_0x18f3ae(0x2b0)]=null,this['_acknowledgedAwaitingRevision']=null):this['_acknowledgedAwaitingRevision']=_0x2f5b7f['revision']),this;}if(_0x2f5b7f[_0x18f3ae(0x1dc)]<=this[_0x18f3ae(0x3a4)]())return this;throw Error('[FetchingMissState]:\x20not\x20expected\x20to\x20receive\x20ack\x20when\x20`this._awaitingChangeset`\x20is\x20null!');}['onRemoteRej'](_0xb62912){const _0x4ac8fc=_0x849776;return this[_0x4ac8fc(0x125)](!!(_0xb62912!=null&&_0xb62912[_0x4ac8fc(0x1eb)]));}[_0x849776(0x239)](){return this;}[_0x849776(0x1af)](){const _0x455a5f=_0x849776;return this[_0x455a5f(0x126)][_0x455a5f(0x3b3)](Z,this['unitID'],this['type'],this[_0x455a5f(0x2b0)],this[_0x455a5f(0x1d3)],this[_0x455a5f(0x379)]);}[_0x849776(0x2cf)](){return this;}[_0x849776(0x125)](_0x3050cf){const _0x430325=_0x849776;return this['_injector'][_0x430325(0x3b3)](X,this[_0x430325(0x360)],this[_0x430325(0x310)],this[_0x430325(0x2b0)],this['_pendingMutations'],this[_0x430325(0x379)],_0x3050cf);}};Q=H([V(0x7,_0x409c93(_0x28d4d4)),V(0x8,_0x409c93(_0x12caa0)),V(0x9,_0x3dc3ee),V(0xa,_0x39bf2b),V(0xb,_0x1348cc),V(0xc,_0x4ac591),V(0xd,_0x232f40(U))],Q);function gn(_0x38ee6a,_0x2a388a,_0x555d17,_0x1e04c2,_0x22a600,_0x4370e7){const _0x1a556f=_0x849776;return _0x1e04c2&&_0x22a600[_0x1a556f(0x298)]?_0x38ee6a[_0x1a556f(0x3b3)](Y,_0x2a388a,_0x555d17,_0x1e04c2,_0x22a600,_0x4370e7,void 0x0):_0x1e04c2?_0x38ee6a[_0x1a556f(0x3b3)](J,_0x2a388a,_0x555d17,_0x1e04c2,_0x4370e7):_0x22a600[_0x1a556f(0x298)]?_0x38ee6a[_0x1a556f(0x3b3)](q,_0x2a388a,_0x555d17,_0x22a600,_0x4370e7):_0x38ee6a[_0x1a556f(0x3b3)](K,_0x2a388a,_0x555d17,_0x4370e7);}let $=class extends _0x2ed6e1{get[_0x849776(0x358)](){const _0x1e66a2=_0x849776;return this[_0x1e66a2(0x284)];}constructor(_0xa10130,_0x1c31cd,_0x336d60,_0x2fdcc6,_0x1c006d,_0x392ec9,_0x4b044a,_0x12ad71,_0x187fa1,_0xc03497,_0x3cddd3,_0x56dfb9,_0x1b0315,_0xd06e20){const _0x1db4fd=_0x849776;super(),this[_0x1db4fd(0x360)]=_0xa10130,this[_0x1db4fd(0x2a4)]=_0x1c31cd,this['_type']=_0x336d60,this['_injector']=_0x2fdcc6,this['_compressMutationService']=_0x1c006d,this[_0x1db4fd(0x1c4)]=_0x392ec9,this['_revisionService']=_0x4b044a,this['_eventService']=_0x12ad71,this['_univerInstanceService']=_0x187fa1,this[_0x1db4fd(0x12e)]=_0xc03497,this[_0x1db4fd(0x3a0)]=_0x3cddd3,this['_permissionService']=_0x56dfb9,this[_0x1db4fd(0x1ca)]=_0x1b0315,this[_0x1db4fd(0x2a8)]=_0xd06e20,z(this,'_state$',new _0x2fdef4(null)),z(this,_0x1db4fd(0x2b6),this[_0x1db4fd(0x2ea)][_0x1db4fd(0x142)]()),z(this,_0x1db4fd(0x284),void 0x0),z(this,'_collaborationPaused',!0x1),z(this,_0x1db4fd(0x3ab),''),z(this,_0x1db4fd(0x26b),0x0),z(this,_0x1db4fd(0x28a),this[_0x1db4fd(0x2b6)][_0x1db4fd(0x245)](_0xe7ad12(_0x12402b=>_0x12402b?_0x12402b[_0x1db4fd(0x273)]:_0x1db4fd(0x11a)),_0x3b397c({'bufferSize':0x1,'refCount':!0x0}))),z(this,_0x1db4fd(0x327),!0x1),z(this,_0x1db4fd(0x22c),[]);}async[_0x849776(0x2f4)](){const _0x8b9505=_0x849776;if(this[_0x8b9505(0x358)])throw Error(_0x8b9505(0x353));await this[_0x8b9505(0x32d)]();}[_0x849776(0x393)](){const _0x5db962=_0x849776;return this[_0x5db962(0x24d)]=!0x0,_0x577479(()=>{const _0x3d4ec6=_0x5db962;this['_collaborationPaused']=!0x1,this[_0x3d4ec6(0x1aa)]();});}[_0x849776(0x1d7)](_0x9bd122){const _0x248232=_0x849776;this[_0x248232(0x161)](_0x9bd122);}[_0x849776(0x34c)](_0x21b8a1){const _0x3f2a27=_0x849776;this['_state']=_0x21b8a1,this['_state$'][_0x3f2a27(0x3a2)](_0x21b8a1);}async[_0x849776(0x32d)](){const _0x53abd5=_0x849776;if(this[_0x53abd5(0x34c)](await this[_0x53abd5(0x1c1)]()),this[_0x53abd5(0x1ca)]){var _0x15b145;(_0x15b145=this[_0x53abd5(0x1ca)])==null||_0x15b145[_0x53abd5(0x1d2)](this[_0x53abd5(0x360)]),this[_0x53abd5(0x158)](this[_0x53abd5(0x1ca)][_0x53abd5(0x351)](this[_0x53abd5(0x360)])[_0x53abd5(0x297)](_0x5aa8a5=>{const _0x581c0e=_0x53abd5;this[_0x581c0e(0x12e)]['debug'](_0x581c0e(0x191),_0x581c0e(0x35a),_0x5aa8a5),_0x5aa8a5===0x1?(this[_0x581c0e(0x330)][_0x581c0e(0x2cd)]({'id':_0x581c0e(0x19c)}),this['_permissionService'][_0x581c0e(0x25e)](new _0x302f4b(this[_0x581c0e(0x360)])['id'],!0x1),this[_0x581c0e(0x16c)][_0x581c0e(0x2b2)](!0x1)):(this[_0x581c0e(0x16c)]['updatePermissionPoint'](new _0x302f4b(this[_0x581c0e(0x360)])['id'],!0x0),this[_0x581c0e(0x16c)][_0x581c0e(0x2b2)](!0x0));}));}let _0x2d508f=!0x1;return this[_0x53abd5(0x158)](this[_0x53abd5(0x2a4)]['sessionStatus$'][_0x53abd5(0x297)](_0x432e5b=>{const _0x2f8f6e=_0x53abd5;_0x432e5b===0x3?this[_0x2f8f6e(0x20e)](_0x2d508f):_0x432e5b===0x2&&(_0x2d508f=!0x0,this[_0x2f8f6e(0x1ad)]());})),this[_0x53abd5(0x158)](this['session'][_0x53abd5(0x179)][_0x53abd5(0x297)](_0x5d74a8=>{const _0x247ff1=_0x53abd5;try{switch(_0x5d74a8[_0x247ff1(0x19a)]){case _0x389ee8[_0x247ff1(0x376)]:this[_0x247ff1(0x224)](_0x373627(_0x5d74a8['data']));break;case _0x389ee8[_0x247ff1(0x3a6)]:this['_onRemoteACK'](_0x5d74a8['data']);break;case _0x389ee8['CHANGESET_REJ']:this[_0x247ff1(0x311)]();break;case _0x389ee8['CHANGESET_SHOULD_RETRY']:this[_0x247ff1(0x2b8)](_0x5d74a8[_0x247ff1(0x309)]);break;case _0x389ee8[_0x247ff1(0x349)]:this[_0x247ff1(0x228)](_0x5d74a8[_0x247ff1(0x309)][_0x247ff1(0x212)][_0x247ff1(0x15d)](_0x3dffe9=>_0x373627(_0x3dffe9)));break;case _0x389ee8[_0x247ff1(0x143)]:this[_0x247ff1(0x311)]({'isPermissionRej':!0x0});break;case _0x389ee8[_0x247ff1(0x249)]:break;}}catch(_0x3c1790){throw console[_0x247ff1(0x2bf)](_0x247ff1(0x383),_0x3c1790),_0x3c1790;}})),this[_0x53abd5(0x284)];}[_0x849776(0x356)](){const _0x3eaa8e=_0x849776;this[_0x3eaa8e(0x327)]=!0x1;}['_lockTransition'](){const _0x381d96=_0x849776;if(this[_0x381d96(0x327)])throw Error('[CollaborationEntity]:\x20cannot\x20lock\x20transition\x20twice!\x20This\x20is\x20an\x20implementation\x20error,\x20meaning\x20you\x20transit\x20the\x20collaboration\x20state\x20again\x20in\x20the\x20process\x20of\x20a\x20previous\x20transition.\x20This\x20should\x20never\x20happen.');this[_0x381d96(0x327)]=!0x0;}[_0x849776(0x161)](_0x24a56a){const _0x4759e4=_0x849776;this[_0x4759e4(0x1fe)](),this[_0x4759e4(0x34c)](this[_0x4759e4(0x284)][_0x4759e4(0x2c6)](_0x24a56a)),this[_0x4759e4(0x356)]();}[_0x849776(0x224)](_0x235699){const _0x4a8be6=_0x849776;if(!(_0x235699[_0x4a8be6(0x1dc)]<=this[_0x4a8be6(0x190)][_0x4a8be6(0x237)](this['unitID']))){if(this[_0x4a8be6(0x24d)]){this[_0x4a8be6(0x22c)]['push'](_0x235699);return;}this['_applyRemoteChangeset'](_0x235699);}}['_exhaustRemoteChangesetQueue'](){const _0x50f838=_0x849776;this[_0x50f838(0x22c)][_0x50f838(0x281)](_0x1347e6=>this[_0x50f838(0x299)](_0x1347e6)),this['_remoteChangesetQueue']=[];}[_0x849776(0x299)](_0x2f6367){const _0x106924=_0x849776;let _0x4a5935=this[_0x106924(0x11b)]['interceptor'][_0x106924(0x34a)](this[_0x106924(0x11b)][_0x106924(0x36c)]['getInterceptPoints']()[_0x106924(0x188)])(_0x2f6367[_0x106924(0x365)],null)||_0x2f6367[_0x106924(0x365)],_0xcf735c={..._0x2f6367,'mutations':_0x4a5935};this[_0x106924(0x1fe)](),this[_0x106924(0x34c)](this[_0x106924(0x284)][_0x106924(0x13f)](_0xcf735c)),this[_0x106924(0x356)]();}['_onRemoteACK'](_0x234c3a){const _0x36c4f8=_0x849776;this[_0x36c4f8(0x1fe)](),this[_0x36c4f8(0x34c)](this[_0x36c4f8(0x284)][_0x36c4f8(0x30f)](_0x234c3a)),this[_0x36c4f8(0x356)]();}[_0x849776(0x311)](_0x5d9084){const _0x2565b7=_0x849776;this[_0x2565b7(0x1fe)](),this[_0x2565b7(0x34c)](this[_0x2565b7(0x284)][_0x2565b7(0x133)](_0x5d9084)),this[_0x2565b7(0x356)]();}['_onRemoteRetry'](_0x32102c){const _0x35c9f4=_0x849776;this[_0x35c9f4(0x1fe)](),this[_0x35c9f4(0x34c)](this[_0x35c9f4(0x284)][_0x35c9f4(0x239)](_0x32102c)),this['_unlockTransition']();}[_0x849776(0x228)](_0x21de08){const _0x4d77b2=_0x849776;if(!(this[_0x4d77b2(0x284)]instanceof Q))throw TypeError('[CollaborationEntity]:\x20cannot\x20apply\x20missing\x20results\x20on\x20other\x20states!');let _0x2d0c72=_0x21de08[_0x4d77b2(0x15d)](_0x2c6dd8=>{const _0x47172c=_0x4d77b2;let _0x2374bb=this[_0x47172c(0x11b)]['interceptor']['fetchThroughInterceptors'](this[_0x47172c(0x11b)][_0x47172c(0x36c)][_0x47172c(0x19b)]()[_0x47172c(0x188)])(_0x2c6dd8[_0x47172c(0x365)],null)||_0x2c6dd8[_0x47172c(0x365)];return{..._0x2c6dd8,'mutations':_0x2374bb};});this['_lockTransition'](),this['_updateState'](this[_0x4d77b2(0x284)]['onMissedChangesetFetched'](_0x2d0c72)),this[_0x4d77b2(0x356)]();}['_toggleOffline'](){const _0x2dc024=_0x849776;this[_0x2dc024(0x1fe)](),this['_updateState'](this[_0x2dc024(0x284)][_0x2dc024(0x1af)]()),this['_unlockTransition']();}[_0x849776(0x20e)](_0x2fc584=!0x1){const _0x19922a=_0x849776;this[_0x19922a(0x1fe)](),this[_0x19922a(0x34c)](this[_0x19922a(0x284)]['toggleOnline']()),this[_0x19922a(0x356)]();let _0x152764=this[_0x19922a(0x284)];_0x2fc584&&_0x152764 instanceof K&&(this[_0x19922a(0x1fe)](),this[_0x19922a(0x34c)](_0x152764['fetchMiss']()),this['_unlockTransition']());}async[_0x849776(0x1c1)](){return new Promise(_0x1f128c=>{const _0xefc74b=_0x45be;this[_0xefc74b(0x2a4)]['sessionStatus$'][_0xefc74b(0x245)](_0x3ef186(0x1))['subscribe'](async _0x40c2d2=>{_0x1f128c(await this['_createInitialStateImpl'](_0x40c2d2===0x3));});});}[_0x849776(0x16e)](){const _0x1c1746=_0x849776;let _0x430b54=this[_0x1c1746(0x360)];return{'onStateChange':(_0x2443cb,_0x47a183)=>{const _0x515eef=_0x1c1746;if(_0x2443cb!==this[_0x515eef(0x284)])throw Error(_0x515eef(0x323)+_0x2443cb['status']+_0x515eef(0x14c)+_0x47a183[_0x515eef(0x273)]+_0x515eef(0x2bc)+this['_state'][_0x515eef(0x273)]);this[_0x515eef(0x34c)](_0x47a183);},'onSendChangeset':_0x27345c=>{const _0x144c3c=_0x1c1746;_0x27345c[_0x144c3c(0x1a6)]||(_0x27345c[_0x144c3c(0x1a6)]=this[_0x144c3c(0x3ab)],_0x27345c[_0x144c3c(0x182)]=++this[_0x144c3c(0x26b)]);let _0x532765={'eventID':_0x389ee8['SUBMIT_CHANGESET'],'data':{'unitID':_0x27345c[_0x144c3c(0x360)],'unitType':this[_0x144c3c(0x217)],'changeset':_0x27345c,'memberID':this[_0x144c3c(0x2a4)][_0x144c3c(0x37f)]()}};this[_0x144c3c(0x2a4)][_0x144c3c(0x2c4)](_0x532765,this['unitID']);},'onMissingChangesets':({from:_0x888e9f,to:_0xc10253})=>{const _0x50013b=_0x1c1746;this[_0x50013b(0x12e)][_0x50013b(0x2d8)]('[CollaborationEntity]',_0x50013b(0x17c)+_0x888e9f+_0x50013b(0x293)+_0xc10253);let _0x4fa6f2={'eventID':_0x389ee8[_0x50013b(0x111)],'data':{'unitID':_0x430b54,'unitType':this['_type'],'from':_0x888e9f,'to':_0xc10253}};this[_0x50013b(0x2a4)][_0x50013b(0x2c4)](_0x4fa6f2,this[_0x50013b(0x360)]);}};}async[_0x849776(0x1b2)](_0x5db20a){const _0x271dc8=_0x849776;var _0x1c3ae0;let _0x5944b1=await((_0x1c3ae0=this[_0x271dc8(0x2a8)])==null?void 0x0:_0x1c3ae0['loadOfflineData'](this[_0x271dc8(0x360)])),_0x14c84a=(_0x5944b1==null?void 0x0:_0x5944b1[_0x271dc8(0x365)])??[],_0x179ceb=(_0x5944b1==null?void 0x0:_0x5944b1[_0x271dc8(0x2f2)])??null,_0x31e042=!!(_0x179ceb!=null&&_0x179ceb[_0x271dc8(0x1a6)])&&!!(_0x179ceb!=null&&_0x179ceb[_0x271dc8(0x182)]);this['_changesetSessionId']=_0x31e042?_0x179ceb[_0x271dc8(0x1a6)]:_0x72e049(),this[_0x271dc8(0x26b)]=_0x31e042?_0x179ceb[_0x271dc8(0x182)]:0x0;let _0xa82495=this[_0x271dc8(0x360)];try{this[_0x271dc8(0x275)](_0x179ceb,_0x14c84a);}catch(_0x22513b){this[_0x271dc8(0x12e)][_0x271dc8(0x2bf)](_0x22513b);}let _0x1ba6f8=this[_0x271dc8(0x16e)]();if(_0x5db20a){let _0x5a38ac=gn(this[_0x271dc8(0x126)],_0xa82495,this[_0x271dc8(0x217)],_0x179ceb,_0x14c84a,_0x1ba6f8);return _0x5a38ac instanceof q?_0x5a38ac[_0x271dc8(0x2cc)]():(_0x5a38ac instanceof Y||_0x5a38ac instanceof J)&&_0x5a38ac[_0x271dc8(0x395)](),_0x5a38ac;}return this[_0x271dc8(0x126)][_0x271dc8(0x3b3)](Z,_0xa82495,this[_0x271dc8(0x217)],_0x179ceb,_0x14c84a,_0x1ba6f8);}[_0x849776(0x275)](_0x18a55c,_0x9b7f75){const _0x5a406c=_0x849776;var _0x4f2522,_0x1cb550;let _0x43e3f1=this[_0x5a406c(0x11b)][_0x5a406c(0x36c)][_0x5a406c(0x34a)](this[_0x5a406c(0x11b)][_0x5a406c(0x36c)][_0x5a406c(0x19b)]()[_0x5a406c(0x188)]);(_0x4f2522=_0x43e3f1((_0x18a55c==null?void 0x0:_0x18a55c[_0x5a406c(0x365)])||[],null))==null||_0x4f2522['forEach'](_0x1b6499=>this['_commandService'][_0x5a406c(0x36f)](_0x1b6499['id'],_0x1b6499[_0x5a406c(0x28d)])),(_0x1cb550=_0x43e3f1(_0x9b7f75||[],null))==null||_0x1cb550['forEach'](_0x4b3e8f=>this['_commandService']['executeCommand'](_0x4b3e8f['id'],_0x4b3e8f[_0x5a406c(0x28d)]));}};$=H([V(0x3,_0x409c93(_0x28d4d4)),V(0x4,_0x409c93(_0x27ea2d)),V(0x5,_0x409c93(_0x36c9a1)),V(0x6,_0x409c93(_0x12caa0)),V(0x7,_0x409c93(B)),V(0x8,_0x273a3b),V(0x9,_0x3dc3ee),V(0xa,_0x39bf2b),V(0xb,_0x2cf373),V(0xc,_0x232f40(W)),V(0xd,_0x232f40(U))],$);let _n=class extends ${constructor(_0x5f14eb,_0x55b09f,_0x3d70e9,_0x11a1af,_0x2e2643,_0x35e1e0,_0x59b2b7,_0x30c0e4,_0x18c790,_0x306d6f,_0x46d270,_0x59f143,_0x2ac09e,_0x4f53a1,_0x3aee7f){const _0x38dfa8=_0x849776;super(_0x5f14eb,_0x3d70e9,_0x55b09f,_0x11a1af,_0x2e2643,_0x35e1e0,_0x59b2b7,_0x30c0e4,_0x18c790,_0x306d6f,_0x46d270,_0x59f143,_0x4f53a1,_0x3aee7f),this['unitID']=_0x5f14eb,this[_0x38dfa8(0x310)]=_0x55b09f,this['_docStateChangeManagerService']=_0x2ac09e,z(this,_0x38dfa8(0x2fd),null);}[_0x849776(0x177)](_0x6e335d){const _0x204952=_0x849776;this[_0x204952(0x2fd)]=_0x6e335d;}[_0x849776(0x257)](){const _0x47dbc6=_0x849776;this[_0x47dbc6(0x2fd)]=null,super[_0x47dbc6(0x257)]();}['_createHandler'](){const _0x392662=_0x849776;let _0x474967=super[_0x392662(0x16e)]();return _0x474967[_0x392662(0x115)]=_0x3830b2=>{const _0x3376d8=_0x392662;var _0x2cde12,_0x1eec60;return(_0x2cde12=this[_0x3376d8(0x2fd)])==null||(_0x1eec60=_0x2cde12['onTransformIME'])==null?void 0x0:_0x1eec60['call'](_0x2cde12,_0x3830b2);},_0x474967[_0x392662(0x37d)]=_0x59d606=>{const _0x4c804f=_0x392662;var _0x516b99,_0x325b8f;return(_0x516b99=this[_0x4c804f(0x2fd)])==null||(_0x325b8f=_0x516b99[_0x4c804f(0x37d)])==null?void 0x0:_0x325b8f['call'](_0x516b99,_0x59d606);},_0x474967[_0x392662(0x304)]=_0x9fdf8f=>{const _0x14c160=_0x392662;var _0x42d0ce,_0xb277b;return(_0x42d0ce=this[_0x14c160(0x2fd)])==null||(_0xb277b=_0x42d0ce[_0x14c160(0x304)])==null?void 0x0:_0xb277b[_0x14c160(0x150)](_0x42d0ce,_0x9fdf8f);},_0x474967[_0x392662(0x359)]=_0x1db5f9=>{const _0x4c3de5=_0x392662;var _0x75e0c8,_0x48eaca;return(_0x75e0c8=this[_0x4c3de5(0x2fd)])==null||(_0x48eaca=_0x75e0c8[_0x4c3de5(0x359)])==null?void 0x0:_0x48eaca[_0x4c3de5(0x150)](_0x75e0c8,_0x1db5f9);},_0x474967[_0x392662(0x394)]=_0x563258=>{const _0x37afc3=_0x392662;var _0x240e18,_0x5a39b5;return((_0x240e18=this[_0x37afc3(0x2fd)])==null||(_0x5a39b5=_0x240e18[_0x37afc3(0x394)])==null?void 0x0:_0x5a39b5[_0x37afc3(0x150)](_0x240e18,_0x563258))??_0x563258;},_0x474967[_0x392662(0x122)]=_0x39d27d=>{const _0x5e0408=_0x392662;var _0x8fc3ba,_0x1fdc32;return((_0x8fc3ba=this[_0x5e0408(0x2fd)])==null||(_0x1fdc32=_0x8fc3ba[_0x5e0408(0x122)])==null?void 0x0:_0x1fdc32[_0x5e0408(0x150)](_0x8fc3ba,_0x39d27d))??_0x39d27d;},_0x474967;}async['_init'](){const _0xa0c212=_0x849776;let _0x1bf67d=await super['_init']();return this[_0xa0c212(0x158)](this[_0xa0c212(0x2c2)]['docStateChange$'][_0xa0c212(0x297)](_0x9f20ba=>{const _0x39b707=_0xa0c212;if(_0x9f20ba==null||_0x9f20ba['unitId']!==this[_0x39b707(0x360)])return;let {commandId:_0x24e7c2,redoState:_0x1aba50,unitId:_0x412941}=_0x9f20ba,_0x2f2ac0={'id':_0x24e7c2,'type':_0x3d8a6e[_0x39b707(0x346)],'params':{'unitId':_0x412941,'actions':_0x1aba50['actions'],'textRanges':null}};this[_0x39b707(0x161)](_0x2f2ac0);})),this[_0xa0c212(0x158)](this['_commandService'][_0xa0c212(0x352)]((_0x3957c8,_0x2c678f)=>{const _0x28bb6c=_0xa0c212;if(_0x3957c8[_0x28bb6c(0x310)]!==_0x3d8a6e[_0x28bb6c(0x346)]||_0x2c678f!=null&&_0x2c678f['fromCollab']||_0x2c678f!=null&&_0x2c678f[_0x28bb6c(0x2af)]||_0x3957c8['id']===_0x51d6fe['id'])return;let _0x549d61=_0x3957c8['params'];if((_0x549d61==null?void 0x0:_0x549d61['unitId'])!==this['unitID'])return;let _0x15cce2=_0x3957c8,_0x328918=this['_compressMutationService'][_0x28bb6c(0x36c)][_0x28bb6c(0x34a)](this['_compressMutationService'][_0x28bb6c(0x36c)][_0x28bb6c(0x19b)]()['COMPRESS_MUTATION_SEND'])([_0x15cce2],this[_0x28bb6c(0x367)])||[_0x15cce2];this[_0x28bb6c(0x161)](_0x328918[0x0]);})),_0x1bf67d;}};_n=H([V(0x3,_0x409c93(_0x28d4d4)),V(0x4,_0x409c93(_0x27ea2d)),V(0x5,_0x409c93(_0x36c9a1)),V(0x6,_0x409c93(_0x12caa0)),V(0x7,_0x409c93(B)),V(0x8,_0x273a3b),V(0x9,_0x3dc3ee),V(0xa,_0x39bf2b),V(0xb,_0x2cf373),V(0xc,_0x409c93(_0x1ee581)),V(0xd,_0x232f40(W)),V(0xe,_0x232f40(U))],_n);let vn=class extends ${constructor(_0x31dd47,_0x21d6b9,_0x55fe49,_0x226d36,_0x1af864,_0x427feb,_0x31745b,_0x2beaef,_0x2db70e,_0x2932d2,_0x546d0a,_0x517e84,_0x4adf15,_0x51dd0f){const _0xcda103=_0x849776;super(_0x31dd47,_0x55fe49,_0x21d6b9,_0x226d36,_0x1af864,_0x427feb,_0x31745b,_0x2beaef,_0x2db70e,_0x2932d2,_0x546d0a,_0x517e84,_0x4adf15,_0x51dd0f),this['unitID']=_0x31dd47,this[_0xcda103(0x310)]=_0x21d6b9;}async[_0x849776(0x32d)](){const _0x2ad509=_0x849776;let _0x42f155=await super['_init']();return this[_0x2ad509(0x158)](this[_0x2ad509(0x3a0)][_0x2ad509(0x352)]((_0x57a849,_0x587201)=>{const _0x20da86=_0x2ad509;if(_0x57a849['type']!==_0x3d8a6e['MUTATION']||_0x587201!=null&&_0x587201['fromCollab']||_0x587201!=null&&_0x587201[_0x20da86(0x2af)])return;let _0x1bb5e6=_0x57a849[_0x20da86(0x28d)];if((_0x1bb5e6==null?void 0x0:_0x1bb5e6[_0x20da86(0x331)])!==this[_0x20da86(0x360)])return;let _0x16ff53=_0x57a849,_0x1f764a=this[_0x20da86(0x11b)][_0x20da86(0x36c)]['fetchThroughInterceptors'](this[_0x20da86(0x11b)][_0x20da86(0x36c)][_0x20da86(0x19b)]()[_0x20da86(0x176)])([_0x16ff53],this[_0x20da86(0x367)])||[_0x16ff53];this[_0x20da86(0x161)](_0x1f764a[0x0]);})),_0x42f155;}};vn=H([V(0x3,_0x409c93(_0x28d4d4)),V(0x4,_0x409c93(_0x27ea2d)),V(0x5,_0x409c93(_0x36c9a1)),V(0x6,_0x409c93(_0x12caa0)),V(0x7,_0x409c93(B)),V(0x8,_0x273a3b),V(0x9,_0x3dc3ee),V(0xa,_0x39bf2b),V(0xb,_0x2cf373),V(0xc,_0x232f40(W)),V(0xd,_0x232f40(U))],vn);let yn=class extends ${constructor(_0x4f54b7,_0x2a0b69,_0x1b2b83,_0xbc7774,_0x5362c4,_0x5924bb,_0x424ab3,_0x279f9b,_0x54f3b9,_0x1a9ae8,_0x14de68,_0xa38fbc,_0xb7a0b3,_0x4f51e1,_0x3900ca){const _0x107a99=_0x849776;super(_0x4f54b7,_0x1b2b83,_0x2a0b69,_0xbc7774,_0x5362c4,_0x5924bb,_0x424ab3,_0x54f3b9,_0x1a9ae8,_0x14de68,_0xa38fbc,_0xb7a0b3,_0x4f51e1,_0x3900ca),this[_0x107a99(0x360)]=_0x4f54b7,this['type']=_0x2a0b69,this[_0x107a99(0x2ef)]=_0x279f9b;}[_0x849776(0x16e)](){const _0x1ddb57=_0x849776;let _0x2001fd=super[_0x1ddb57(0x16e)]();return _0x2001fd['onTransformSelections']=_0x4ae1a2=>this[_0x1ddb57(0x2ef)][_0x1ddb57(0x118)](_0x4ae1a2),_0x2001fd;}async[_0x849776(0x32d)](){const _0x11008c=_0x849776;let _0x5b8a83=await super[_0x11008c(0x32d)]();return this['disposeWithMe'](this[_0x11008c(0x3a0)][_0x11008c(0x352)]((_0x1afea1,_0x5e687f)=>{const _0x38ed1b=_0x11008c;if(_0x1afea1['type']!==_0x3d8a6e['MUTATION']||_0x5e687f!=null&&_0x5e687f[_0x38ed1b(0x117)]||_0x5e687f!=null&&_0x5e687f['onlyLocal'])return;let _0x1efd00=_0x1afea1['params'];if((_0x1efd00==null?void 0x0:_0x1efd00[_0x38ed1b(0x331)])!==this[_0x38ed1b(0x360)])return;let _0x188269=_0x1afea1,_0x294b40=this[_0x38ed1b(0x11b)][_0x38ed1b(0x36c)][_0x38ed1b(0x34a)](this[_0x38ed1b(0x11b)][_0x38ed1b(0x36c)][_0x38ed1b(0x19b)]()['COMPRESS_MUTATION_SEND'])([_0x188269],this[_0x38ed1b(0x367)])||[_0x188269];this[_0x38ed1b(0x161)](_0x294b40[0x0]);})),_0x5b8a83;}};yn=H([V(0x3,_0x409c93(_0x28d4d4)),V(0x4,_0x409c93(_0x27ea2d)),V(0x5,_0x409c93(_0x36c9a1)),V(0x6,_0x409c93(_0x12caa0)),V(0x7,_0x409c93(Wt)),V(0x8,_0x409c93(B)),V(0x9,_0x273a3b),V(0xa,_0x3dc3ee),V(0xb,_0x39bf2b),V(0xc,_0x2cf373),V(0xd,_0x232f40(W)),V(0xe,_0x232f40(U))],yn);let bn=class extends ${constructor(_0x1fbd3a,_0xf3028,_0x1c5219,_0x3a8e44,_0x45a912,_0x231200,_0x15d16d,_0x15cc14,_0x4bbcc7,_0x3a7b33,_0x170058,_0x4d1680,_0xad6986,_0x175284){const _0x26850f=_0x849776;super(_0x1fbd3a,_0x1c5219,_0xf3028,_0x3a8e44,_0x45a912,_0x231200,_0x15d16d,_0x15cc14,_0x4bbcc7,_0x3a7b33,_0x170058,_0x4d1680,_0xad6986,_0x175284),this[_0x26850f(0x360)]=_0x1fbd3a,this['type']=_0xf3028;}async['_init'](){const _0x400cd9=_0x849776;let _0x5b3ecc=await super['_init']();return this[_0x400cd9(0x158)](this[_0x400cd9(0x3a0)][_0x400cd9(0x352)]((_0x18d650,_0x3b7bd6)=>{const _0x5dc2e9=_0x400cd9;if(_0x18d650[_0x5dc2e9(0x310)]!==_0x3d8a6e[_0x5dc2e9(0x346)]||_0x3b7bd6!=null&&_0x3b7bd6[_0x5dc2e9(0x117)]||_0x3b7bd6!=null&&_0x3b7bd6[_0x5dc2e9(0x2af)])return;let _0x5498d6=_0x18d650[_0x5dc2e9(0x28d)];if((_0x5498d6==null?void 0x0:_0x5498d6[_0x5dc2e9(0x331)])!==this[_0x5dc2e9(0x360)])return;let _0x5f05f0=_0x18d650,_0x47f165=this[_0x5dc2e9(0x11b)][_0x5dc2e9(0x36c)][_0x5dc2e9(0x34a)](this[_0x5dc2e9(0x11b)][_0x5dc2e9(0x36c)][_0x5dc2e9(0x19b)]()[_0x5dc2e9(0x176)])([_0x5f05f0],this[_0x5dc2e9(0x367)])||[_0x5f05f0];this[_0x5dc2e9(0x161)](_0x47f165[0x0]);})),_0x5b3ecc;}};bn=H([V(0x3,_0x409c93(_0x28d4d4)),V(0x4,_0x409c93(_0x27ea2d)),V(0x5,_0x409c93(_0x36c9a1)),V(0x6,_0x409c93(_0x12caa0)),V(0x7,_0x409c93(B)),V(0x8,_0x273a3b),V(0x9,_0x3dc3ee),V(0xa,_0x39bf2b),V(0xb,_0x2cf373),V(0xc,_0x232f40(W)),V(0xd,_0x232f40(U))],bn);let xn=class extends ${constructor(_0x408d33,_0x2b397d,_0x78f11,_0x26e3e1,_0x2e1c81,_0x38f127,_0x6039c,_0x1bc4ac,_0x443db8,_0x9e3bde,_0x53c238,_0x21bcbd,_0x47f851,_0x8efbbd){const _0x2f1125=_0x849776;super(_0x408d33,_0x78f11,_0x2b397d,_0x26e3e1,_0x2e1c81,_0x38f127,_0x6039c,_0x1bc4ac,_0x443db8,_0x9e3bde,_0x53c238,_0x21bcbd,_0x47f851,_0x8efbbd),this[_0x2f1125(0x360)]=_0x408d33,this[_0x2f1125(0x310)]=_0x2b397d;}async['_init'](){const _0x1ec615=_0x849776;let _0x55554b=await super['_init']();return this[_0x1ec615(0x158)](this[_0x1ec615(0x3a0)]['onMutationExecutedForCollab']((_0x104696,_0x3a4926)=>{const _0x2a1d70=_0x1ec615;if(_0x104696['type']!==_0x3d8a6e[_0x2a1d70(0x346)]||_0x3a4926!=null&&_0x3a4926[_0x2a1d70(0x117)]||_0x3a4926!=null&&_0x3a4926[_0x2a1d70(0x2af)])return;let _0x22f7b6=_0x104696[_0x2a1d70(0x28d)];if((_0x22f7b6==null?void 0x0:_0x22f7b6[_0x2a1d70(0x331)])!==this[_0x2a1d70(0x360)])return;let _0x30ae78=_0x104696,_0x44a9ea=this[_0x2a1d70(0x11b)][_0x2a1d70(0x36c)]['fetchThroughInterceptors'](this[_0x2a1d70(0x11b)][_0x2a1d70(0x36c)]['getInterceptPoints']()[_0x2a1d70(0x176)])([_0x30ae78],this[_0x2a1d70(0x367)])||[_0x30ae78];this['_onLocalMutation'](_0x44a9ea[0x0]);})),_0x55554b;}};xn=H([V(0x3,_0x409c93(_0x28d4d4)),V(0x4,_0x409c93(_0x27ea2d)),V(0x5,_0x409c93(_0x36c9a1)),V(0x6,_0x409c93(_0x12caa0)),V(0x7,_0x409c93(B)),V(0x8,_0x273a3b),V(0x9,_0x3dc3ee),V(0xa,_0x39bf2b),V(0xb,_0x2cf373),V(0xc,_0x232f40(W)),V(0xd,_0x232f40(U))],xn);let Sn=class extends ${constructor(_0x20d348,_0x5764eb,_0x5dd39a,_0x18403f,_0xa93601,_0x5c01dd,_0x4568ec,_0x12ae8b,_0x1fab61,_0x2b13d0,_0x17173c,_0x159935,_0x4788f5,_0xef9711){const _0x2ab3dc=_0x849776;super(_0x20d348,_0x5dd39a,_0x5764eb,_0x18403f,_0xa93601,_0x5c01dd,_0x4568ec,_0x12ae8b,_0x1fab61,_0x2b13d0,_0x17173c,_0x159935,_0x4788f5,_0xef9711),this[_0x2ab3dc(0x360)]=_0x20d348,this[_0x2ab3dc(0x310)]=_0x5764eb;}async[_0x849776(0x32d)](){const _0x462138=_0x849776;let _0xb87ee9=await super[_0x462138(0x32d)]();return this[_0x462138(0x158)](this[_0x462138(0x3a0)][_0x462138(0x352)]((_0x621b50,_0x452c22)=>{const _0x43ffb9=_0x462138;if(_0x621b50[_0x43ffb9(0x310)]!==_0x3d8a6e[_0x43ffb9(0x346)]||_0x452c22!=null&&_0x452c22[_0x43ffb9(0x117)]||_0x452c22!=null&&_0x452c22['onlyLocal'])return;let _0x1763a7=_0x621b50[_0x43ffb9(0x28d)];if((_0x1763a7==null?void 0x0:_0x1763a7[_0x43ffb9(0x331)])!==this[_0x43ffb9(0x360)])return;let _0x4f8d19=_0x621b50,_0x1f5662=this[_0x43ffb9(0x11b)][_0x43ffb9(0x36c)]['fetchThroughInterceptors'](this[_0x43ffb9(0x11b)][_0x43ffb9(0x36c)][_0x43ffb9(0x19b)]()[_0x43ffb9(0x176)])([_0x4f8d19],this[_0x43ffb9(0x367)])||[_0x4f8d19];this['_onLocalMutation'](_0x1f5662[0x0]);})),_0xb87ee9;}};Sn=H([V(0x3,_0x409c93(_0x28d4d4)),V(0x4,_0x409c93(_0x27ea2d)),V(0x5,_0x409c93(_0x36c9a1)),V(0x6,_0x409c93(_0x12caa0)),V(0x7,_0x409c93(B)),V(0x8,_0x273a3b),V(0x9,_0x3dc3ee),V(0xa,_0x39bf2b),V(0xb,_0x2cf373),V(0xc,_0x232f40(W)),V(0xd,_0x232f40(U))],Sn);const Cn=_0x59b7ef(_0x849776(0x1bf));function wn(_0x496f76){const _0x365148=_0x849776;let _0x348f3d=_0x496f76[_0x365148(0x309)],_0x48f8ac=JSON[_0x365148(0x216)](_0x348f3d);switch(_0x48f8ac['cmd']){case _0x50ebb8[_0x365148(0x272)]:case _0x50ebb8['HELLO']:{let _0x4fb29c=_0x48f8ac['infoRsp'];return{..._0x48f8ac,'data':_0x4fb29c,'cmd':_0x48f8ac[_0x365148(0x2b1)]};}case _0x50ebb8[_0x365148(0x145)]:{let _0x463160=_0x48f8ac['joinRsp'];return{..._0x48f8ac,'data':_0x463160,'cmd':_0x48f8ac['cmd']};}case _0x50ebb8['RECV']:{let _0x315fc4=_0x48f8ac[_0x365148(0x300)];switch(_0x315fc4[_0x365148(0x19a)]){case _0x389ee8[_0x365148(0x143)]:var _0x3b7d8a;return{..._0x48f8ac,'data':{..._0x315fc4,'data':(_0x3b7d8a=_0x315fc4[_0x365148(0x2da)])==null?void 0x0:_0x3b7d8a['cs']},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x3a6)]:var _0x2169bc;return{..._0x48f8ac,'data':{..._0x315fc4,'data':(_0x2169bc=_0x315fc4[_0x365148(0x1c7)])==null?void 0x0:_0x2169bc['cs']},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x376)]:var _0x41dc23;return{..._0x48f8ac,'data':{..._0x315fc4,'data':(_0x41dc23=_0x315fc4[_0x365148(0x2d6)])==null?void 0x0:_0x41dc23['cs']},'cmd':_0x48f8ac['cmd']};case _0x389ee8[_0x365148(0x357)]:var _0x392ac6;return{..._0x48f8ac,'data':{..._0x315fc4,'data':(_0x392ac6=_0x315fc4[_0x365148(0x341)])==null?void 0x0:_0x392ac6['cs']},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x2e4)]:var _0x34500e;return{..._0x48f8ac,'data':{..._0x315fc4,'data':(_0x34500e=_0x315fc4[_0x365148(0x2cb)])==null?void 0x0:_0x34500e['cs']},'cmd':_0x48f8ac['cmd']};case _0x389ee8['UPDATE_CURSOR']:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4[_0x365148(0x147)]},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x1d5)]:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4[_0x365148(0x1c0)]},'cmd':_0x48f8ac['cmd']};case _0x389ee8['USERS_LEAVE']:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4['leaveEvent']},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x164)]:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4['liveShareNewHost']},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x230)]:case _0x389ee8[_0x365148(0x12f)]:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4['liveShareOperation']},'cmd':_0x48f8ac['cmd']};case _0x389ee8[_0x365148(0x319)]:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4['liveShareNewHost']},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x33b)]:return{..._0x48f8ac,'data':_0x315fc4,'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x13d)]:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4['commentUpdateEvent']},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8['UPDATE_PERMISSION_OBJ']:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4[_0x365148(0x313)]},'cmd':_0x48f8ac['cmd']};case _0x389ee8[_0x365148(0x132)]:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4[_0x365148(0x2c0)]},'cmd':_0x48f8ac[_0x365148(0x2b1)]};case _0x389ee8[_0x365148(0x249)]:return{..._0x48f8ac,'data':{..._0x315fc4,'data':_0x315fc4[_0x365148(0x1ff)]},'cmd':_0x48f8ac[_0x365148(0x2b1)]};default:return _0x48f8ac;}}default:return _0x48f8ac;}}function Tn(_0x1b86e5){const _0x31c9f6=_0x849776;switch(_0x1b86e5[_0x31c9f6(0x2b1)]){case _0x50ebb8[_0x31c9f6(0x272)]:case _0x50ebb8['HELLO']:return JSON[_0x31c9f6(0x39c)]({'cmd':_0x1b86e5['cmd'],'routeKey':_0x1b86e5[_0x31c9f6(0x30d)]});case _0x50ebb8[_0x31c9f6(0x3a3)]:{let _0x50b809;switch(_0x1b86e5[_0x31c9f6(0x309)][_0x31c9f6(0x19a)]){case _0x389ee8['UPDATE_CURSOR']:_0x50b809={'eventID':_0x389ee8['UPDATE_CURSOR'],'updateCursorEvent':_0x1b86e5['data'][_0x31c9f6(0x309)]};break;case _0x389ee8[_0x31c9f6(0x38a)]:_0x50b809={'eventID':_0x389ee8[_0x31c9f6(0x38a)],'leaveEvent':_0x1b86e5[_0x31c9f6(0x309)][_0x31c9f6(0x309)]};break;case _0x389ee8['USERS_ENTER']:_0x50b809={'eventID':_0x389ee8[_0x31c9f6(0x1d5)],'joinEvent':_0x1b86e5[_0x31c9f6(0x309)]['data']};break;case _0x389ee8[_0x31c9f6(0x164)]:_0x50b809={'eventID':_0x389ee8[_0x31c9f6(0x164)],'liveShareNewHost':_0x1b86e5[_0x31c9f6(0x309)][_0x31c9f6(0x309)]};break;case _0x389ee8[_0x31c9f6(0x12f)]:_0x50b809={'eventID':_0x389ee8['LIVESHARE_OPERATION'],'liveShareOperation':_0x1b86e5[_0x31c9f6(0x309)]['data']};break;case _0x389ee8[_0x31c9f6(0x319)]:_0x50b809={'eventID':_0x389ee8[_0x31c9f6(0x319)],'liveShareTerminate':_0x1b86e5[_0x31c9f6(0x309)]['data']};break;case _0x389ee8[_0x31c9f6(0x28f)]:_0x50b809={'eventID':_0x389ee8[_0x31c9f6(0x28f)],'liveShareRequestHost':_0x1b86e5['data']['data']};break;case _0x389ee8[_0x31c9f6(0x230)]:_0x50b809={'eventID':_0x389ee8[_0x31c9f6(0x230)]};break;default:_0x50b809={'eventID':_0x1b86e5[_0x31c9f6(0x309)][_0x31c9f6(0x19a)]};}return JSON[_0x31c9f6(0x39c)]({'cmd':_0x1b86e5['cmd'],'routeKey':_0x1b86e5[_0x31c9f6(0x30d)],'collaMsg':_0x50b809});}case _0x50ebb8[_0x31c9f6(0x145)]:return JSON[_0x31c9f6(0x39c)]({'cmd':_0x1b86e5['cmd'],'routeKey':_0x1b86e5[_0x31c9f6(0x30d)],'joinReq':_0x1b86e5[_0x31c9f6(0x309)]});case _0x50ebb8[_0x31c9f6(0x336)]:return JSON[_0x31c9f6(0x39c)]({'cmd':_0x1b86e5[_0x31c9f6(0x2b1)],'routeKey':_0x1b86e5[_0x31c9f6(0x30d)],'leaveReq':_0x1b86e5['data']});default:throw Error(_0x31c9f6(0x1d6));}}const En=_0x59b7ef(_0x849776(0x1df));function Dn(_0x3666cf,_0x1d1963,_0xe23b){const _0x1a489d=_0x849776;return _0x3666cf+'/'+_0x1d1963+'/unit/'+_0xe23b+_0x1a489d(0x315);}let On=class extends _0x513609{constructor(_0x586f70,_0x42e833,_0x482e6d,_0xdab493,_0x145374){const _0x177b8e=_0x849776;super(),this[_0x177b8e(0x126)]=_0x586f70,this[_0x177b8e(0x1e9)]=_0x42e833,this[_0x177b8e(0x123)]=_0x482e6d,this[_0x177b8e(0x12e)]=_0xdab493,this[_0x177b8e(0x168)]=_0x145374;}[_0x849776(0x18f)](_0x1631de){const _0x555a1a=_0x849776;let _0xceb75b=this[_0x555a1a(0x126)][_0x555a1a(0x203)](_0x17a395);if(!_0xceb75b)throw Error(_0x555a1a(0x12b));let _0xb59118=_0xceb75b[_0x555a1a(0x34f)](_0x1631de);if(!_0xb59118)throw Error(_0x555a1a(0x282));let _0x3b04ff=new _0x2341b1(),_0xabd846=new _0x3bb8b8();_0x3b04ff[_0x555a1a(0x29f)](_0xb59118[_0x555a1a(0x38b)][_0x555a1a(0x297)](_0x551445=>_0xabd846[_0x555a1a(0x3a2)](_0x551445))),_0x3b04ff[_0x555a1a(0x29f)](_0x577479(()=>_0xabd846[_0x555a1a(0x194)]()));let _0x200686=new _0x3bb8b8();_0x3b04ff[_0x555a1a(0x29f)](_0xb59118[_0x555a1a(0x36b)][_0x555a1a(0x297)](_0x5f533c=>_0x200686[_0x555a1a(0x3a2)](_0x5f533c))),_0x3b04ff['add'](_0x577479(()=>_0x200686[_0x555a1a(0x194)]()));let _0x165842=new _0x3bb8b8();_0x3b04ff['add'](_0xb59118['message$'][_0x555a1a(0x297)](_0x309ae0=>{let _0x1e30fc=wn(_0x309ae0);_0x165842['next'](_0x1e30fc);})),_0x3b04ff['add'](_0x577479(()=>_0x165842['complete']()));let _0x2292ae,_0x16c48f=()=>{const _0x13c0b6=_0x555a1a;_0x200686[_0x13c0b6(0x3a2)](new Event(_0x13c0b6(0x2ad))),_0xabd846[_0x13c0b6(0x3a2)](new Event(_0x13c0b6(0x2ad))),_0x2292ae[_0x13c0b6(0x369)]();};return _0x2292ae={'memberID':'','close$':_0xabd846[_0x555a1a(0x142)](),'error$':_0x200686[_0x555a1a(0x142)](),'open$':_0xb59118[_0x555a1a(0x2e7)],'message$':_0x165842['asObservable'](),'send':_0x11b9c6=>{const _0x525a45=_0x555a1a;if(_0x11b9c6[_0x525a45(0x2b1)]===_0x50ebb8[_0x525a45(0x3a3)]){if(_0x11b9c6[_0x525a45(0x309)]['eventID']===_0x389ee8['SUBMIT_CHANGESET']){this[_0x525a45(0x386)](_0x2292ae,_0x11b9c6[_0x525a45(0x309)])[_0x525a45(0x1fc)](_0x3d3ac7=>{const _0x5e4402=_0x525a45;this[_0x5e4402(0x12e)]['error'](_0x3d3ac7),_0x16c48f();});return;}if(_0x11b9c6[_0x525a45(0x309)][_0x525a45(0x19a)]===_0x389ee8['FETCH_MISSING']){let _0x3856f2=_0x11b9c6['data'];this[_0x525a45(0x1c5)](_0x3856f2)[_0x525a45(0x391)](_0x8aa57d=>{const _0x4fa454=_0x525a45;_0x165842[_0x4fa454(0x3a2)]({'cmd':_0x50ebb8[_0x4fa454(0x252)],'code':_0x102325['OK'],'routeKey':_0x3856f2['data'][_0x4fa454(0x360)],'routeType':'','data':{'eventID':_0x389ee8[_0x4fa454(0x349)],'data':{'changesets':_0x8aa57d}}});})[_0x525a45(0x1fc)](_0x4a946f=>{const _0x4d9ec6=_0x525a45;this['_logService'][_0x4d9ec6(0x2bf)](_0x4a946f),_0x16c48f();});return;}}_0xb59118['send'](Tn(_0x11b9c6));},'close':()=>{const _0x53d93c=_0x555a1a;_0xb59118[_0x53d93c(0x369)](),_0x3b04ff['dispose']();}},_0x2292ae;}async[_0x849776(0x386)](_0x54063d,_0x21740e){const _0x340665=_0x849776;let {unitType:_0x269fde,unitID:_0x304265,changeset:_0x5d8c41}=_0x21740e[_0x340665(0x309)],_0x458381={'unitID':_0x304265,'memberID':_0x54063d[_0x340665(0x25f)],'type':_0x269fde,'changeset':_0x133adf(_0x5d8c41)},_0x45a0d1=this[_0x340665(0x123)][_0x340665(0x131)](R),_0x3ee988=Dn((_0x45a0d1==null?void 0x0:_0x45a0d1[_0x340665(0x18b)])??_0x340665(0x137),_0x269fde,_0x304265);try{await this['_httpService'][_0x340665(0x387)](_0x3ee988,{'body':_0x458381});}catch(_0x3aee25){throw this[_0x340665(0x12e)][_0x340665(0x2bf)](_0x340665(0x279),_0x340665(0x2a9)),_0x3aee25;}}async[_0x849776(0x1c5)](_0x2fe43c){const _0x586c9f=_0x849776;let {unitID:_0xefe64d,from:_0x46843e,to:_0x23ced7,unitType:_0x2bc505}=_0x2fe43c[_0x586c9f(0x309)];return(await this[_0x586c9f(0x168)]['fetchMissingChangesets']({'metadata':void 0x0},{'unitID':_0xefe64d,'type':_0x2bc505,'from':_0x46843e,'to':_0x23ced7}))[_0x586c9f(0x212)][_0x586c9f(0x15d)](_0x49a811=>((_0x49a811[_0x586c9f(0x365)]===null||_0x49a811[_0x586c9f(0x365)]===void 0x0)&&(_0x49a811[_0x586c9f(0x365)]=[]),_0x49a811));}};On=H([V(0x0,_0x409c93(_0x28d4d4)),V(0x1,_0x409c93(_0x286bba)),V(0x2,_0x6f8878),V(0x3,_0x3dc3ee),V(0x4,_0x382477)],On);const kn=_0x59b7ef(_0x849776(0x146));function An(_0x30564f={}){const _0x334e2e=_0x849776;return _0x30564f['resolveUnit']?{'resolveUnit':_0x30564f[_0x334e2e(0x268)]}:{'resolveUnit':_0x3c57ca=>({'target':{'unitId':_0x3c57ca[_0x334e2e(0x331)],'unitType':_0x3c57ca[_0x334e2e(0x3b0)]}})};}function jn(_0x7d8ffa,_0x54528a,_0x2dc6f6){const _0xa70b7f=_0x849776;let _0x456224=_0x2dc6f6[_0xa70b7f(0x1fd)]['endpoint'];if(_0x456224!=null&&_0x456224['trim']()==='')throw Error(_0xa70b7f(0x204));if(!_0x2dc6f6['target']['unitId'])throw Error(_0xa70b7f(0x130));return{'localUnitId':_0x7d8ffa,'unitType':_0x54528a,'target':{'endpoint':_0x456224,'unitId':_0x2dc6f6[_0xa70b7f(0x1fd)][_0xa70b7f(0x331)],'unitType':_0x2dc6f6[_0xa70b7f(0x1fd)][_0xa70b7f(0x3b0)]??_0x54528a},'changeset':_0x2dc6f6[_0xa70b7f(0x121)]};}let Mn=class extends _0x513609{constructor(_0x23a446,_0x425919,_0x5d6082,_0xabcfa9,_0xebf5ea,_0x41b97a,_0x13c17a){const _0x9dbf51=_0x849776;super(),this[_0x9dbf51(0x126)]=_0x23a446,this[_0x9dbf51(0x12e)]=_0x425919,this['_configService']=_0x5d6082,this[_0x9dbf51(0x256)]=_0xabcfa9,this['_collaborationUIEventService']=_0xebf5ea,this[_0x9dbf51(0x27a)]=_0x41b97a,this[_0x9dbf51(0x1c8)]=_0x13c17a,z(this,_0x9dbf51(0x25b),new Map()),z(this,_0x9dbf51(0x389),new Map()),z(this,_0x9dbf51(0x320),new Map()),z(this,_0x9dbf51(0x24a),new Map()),z(this,_0x9dbf51(0x15e),this['_getSocketChannel'](void 0x0)['socket$']['asObservable']()),z(this,_0x9dbf51(0x17a),new _0x2fdef4(0x0)),z(this,_0x9dbf51(0x28a),this[_0x9dbf51(0x17a)]['asObservable']()),this[_0x9dbf51(0x20b)]();}[_0x849776(0x20b)](){const _0x3dd2b7=_0x849776;this['_networkConditionService']&&this['disposeWithMe'](this['_networkConditionService'][_0x3dd2b7(0x154)][_0x3dd2b7(0x297)](_0x44a11d=>{const _0x4456cd=_0x3dd2b7;_0x44a11d&&this['reconnect'](),_0x44a11d||this['_socketChannels']['forEach'](_0x402b45=>this[_0x4456cd(0x31a)](_0x402b45));}));}[_0x849776(0x257)](){const _0x2600e5=_0x849776;super['dispose'](),this[_0x2600e5(0x24a)]['forEach'](_0x18781e=>{const _0x49f839=_0x2600e5;var _0x6d8b01,_0x297e03;(_0x6d8b01=_0x18781e['socketMessageSubscription'])==null||_0x6d8b01[_0x49f839(0x33d)](),_0x18781e[_0x49f839(0x332)]=null,this[_0x49f839(0x233)](_0x18781e),this[_0x49f839(0x292)](_0x18781e),this[_0x49f839(0x1fa)](_0x18781e),(_0x297e03=_0x18781e[_0x49f839(0x15e)][_0x49f839(0x1cf)]())==null||_0x297e03[_0x49f839(0x369)](),_0x18781e[_0x49f839(0x15e)]['complete']();}),this[_0x2600e5(0x24a)]['clear'](),this['_sessions'][_0x2600e5(0x281)](_0x4d41f1=>_0x4d41f1[_0x2600e5(0x257)]()),this[_0x2600e5(0x25b)][_0x2600e5(0x31e)](),this[_0x2600e5(0x320)][_0x2600e5(0x31e)](),this[_0x2600e5(0x17a)]['complete']();}async[_0x849776(0x1a4)](_0x1b2440,_0x3a193e){const _0x4faf63=_0x849776;if(this[_0x4faf63(0x25b)][_0x4faf63(0x155)](_0x1b2440))return this[_0x4faf63(0x25b)][_0x4faf63(0x203)](_0x1b2440);let _0x2113b3=this['_pendingSessions']['get'](_0x1b2440);if(_0x2113b3)return _0x2113b3;let _0x52b14e=this[_0x4faf63(0x3a9)](_0x1b2440,_0x3a193e);this[_0x4faf63(0x389)]['set'](_0x1b2440,_0x52b14e);try{return await _0x52b14e;}finally{this[_0x4faf63(0x389)][_0x4faf63(0x32c)](_0x1b2440);}}async[_0x849776(0x3a9)](_0x5aef1e,_0x104ad5){const _0x46cfd4=_0x849776;let _0x40c5c4=await this[_0x46cfd4(0x12d)](_0x5aef1e,_0x104ad5),_0x3b99f7=this[_0x46cfd4(0x348)](_0x40c5c4[_0x46cfd4(0x1fd)]['endpoint']);this[_0x46cfd4(0x218)](_0x3b99f7);let _0x2995a0=this[_0x46cfd4(0x126)][_0x46cfd4(0x3b3)](Vt,_0x40c5c4,_0x3b99f7[_0x46cfd4(0x15e)]['asObservable']());return this[_0x46cfd4(0x25b)][_0x46cfd4(0x116)](_0x5aef1e,_0x2995a0),this[_0x46cfd4(0x320)]['set'](_0x5aef1e,_0x3b99f7[_0x46cfd4(0x159)]),_0x2995a0;}[_0x849776(0x251)](_0x22358a){const _0x510ad7=_0x849776;let _0x291c81=this[_0x510ad7(0x25b)]['get'](_0x22358a),_0x1819e4=this['_sessionChannels']['get'](_0x22358a);if(_0x291c81&&(this[_0x510ad7(0x25b)][_0x510ad7(0x32c)](_0x22358a),this[_0x510ad7(0x320)][_0x510ad7(0x32c)](_0x22358a),_0x291c81[_0x510ad7(0x369)]()),_0x1819e4&&!this[_0x510ad7(0x196)](_0x1819e4)){var _0x473d89;let _0x1b6e70=this[_0x510ad7(0x24a)][_0x510ad7(0x203)](_0x1819e4);_0x1b6e70==null||(_0x473d89=_0x1b6e70[_0x510ad7(0x15e)][_0x510ad7(0x1cf)]())==null||_0x473d89[_0x510ad7(0x369)]();}}[_0x849776(0x17e)](){const _0x167079=_0x849776;(this[_0x167079(0x24a)][_0x167079(0x296)]?[...this[_0x167079(0x24a)]['values']()]:[this[_0x167079(0x348)](void 0x0)])[_0x167079(0x281)](_0x409b95=>{const _0x25090b=_0x167079;_0x409b95[_0x25090b(0x139)]=0x0,this[_0x25090b(0x233)](_0x409b95),this[_0x25090b(0x334)](_0x409b95);});}[_0x849776(0x233)](_0x63459c){const _0x454973=_0x849776;_0x63459c[_0x454973(0x1ed)]!=null&&(clearTimeout(_0x63459c[_0x454973(0x1ed)]),_0x63459c[_0x454973(0x1ed)]=null);}async[_0x849776(0x2ce)](_0x8d7261){const _0x3cf7fe=_0x849776;let _0x4be537=this[_0x3cf7fe(0x123)][_0x3cf7fe(0x131)](R),_0x50b21b=_0x8d7261[_0x3cf7fe(0x1b3)]??(_0x4be537==null?void 0x0:_0x4be537[_0x3cf7fe(0x338)])??_0x3cf7fe(0x373),_0xc36cef=await this[_0x3cf7fe(0x256)][_0x3cf7fe(0x34f)](_0x50b21b);return _0x8d7261[_0x3cf7fe(0x220)]=_0xc36cef,_0xc36cef;}async[_0x849776(0x218)](_0x142221){const _0x2bfec6=_0x849776;try{let _0x228773=_0x142221[_0x2bfec6(0x15e)]['getValue']()??_0x142221[_0x2bfec6(0x220)]??await this[_0x2bfec6(0x2ce)](_0x142221);if(_0x228773){var _0x3fa5db;let _0x474894=_0x228773[_0x2bfec6(0x2c4)];_0x228773[_0x2bfec6(0x2c4)]=_0x781454=>(_0x781454['cmd']!==_0x50ebb8[_0x2bfec6(0x336)]&&this[_0x2bfec6(0x1e0)](_0x142221),_0x474894[_0x2bfec6(0x333)](_0x228773,[_0x781454])),(_0x3fa5db=_0x142221['socketMessageSubscription'])==null||_0x3fa5db['unsubscribe'](),_0x142221[_0x2bfec6(0x332)]=null,_0x142221[_0x2bfec6(0x332)]=_0x228773['message$'][_0x2bfec6(0x297)](_0x40f9fe=>this['_onMessage'](_0x142221,_0x228773,_0x40f9fe)),_0x228773[_0x2bfec6(0x36b)][_0x2bfec6(0x245)](_0x2244a2(0x1))['subscribe'](_0x2570a7=>this[_0x2bfec6(0x12e)][_0x2bfec6(0x2bf)](_0x2bfec6(0x2dc),_0x2570a7)),_0x228773[_0x2bfec6(0x2e7)][_0x2bfec6(0x245)](_0x2244a2(0x1))[_0x2bfec6(0x297)](()=>{const _0x3f97ad=_0x2bfec6;this[_0x3f97ad(0x361)](_0x142221,_0x228773);}),_0x228773[_0x2bfec6(0x38b)]['pipe'](_0x2244a2(0x1))['subscribe'](_0x35703c=>{const _0x155a06=_0x2bfec6;this['_logService'][_0x155a06(0x2d8)](_0x155a06(0x2d1),_0x155a06(0x1b5),_0x35703c),this['_onConnectionFailed'](_0x142221);});}}catch(_0x170051){this['_logService'][_0x2bfec6(0x2bf)](_0x170051),this['_onConnectionFailed'](_0x142221);}}[_0x849776(0x361)](_0x42e065,_0x2310c4){const _0x3cfe13=_0x849776;this[_0x3cfe13(0x12e)][_0x3cfe13(0x2d8)](_0x3cfe13(0x2d1),_0x3cfe13(0x22f)),_0x2310c4[_0x3cfe13(0x2c4)]({'cmd':_0x50ebb8[_0x3cfe13(0x30c)]}),this['_rescheduleHeartbeat'](_0x42e065);}[_0x849776(0x31a)](_0xe16a24){const _0xe7d3a9=_0x849776;_0xe16a24[_0xe7d3a9(0x295)]=!0x1,_0xe16a24[_0xe7d3a9(0x220)]=null,this[_0xe7d3a9(0x17a)][_0xe7d3a9(0x3a2)](0x2),_0xe16a24[_0xe7d3a9(0x15e)][_0xe7d3a9(0x3a2)](null),this['_clearTimeoutTimer'](_0xe16a24),this[_0xe7d3a9(0x1fa)](_0xe16a24);}['_onConnectionFailed'](_0xd208f2){const _0x451d2b=_0x849776;this[_0x451d2b(0x31a)](_0xd208f2),this[_0x451d2b(0x196)](_0xd208f2['endpointKey'])&&(_0xd208f2['retryCount']<(this[_0x451d2b(0x123)][_0x451d2b(0x131)](_0x451d2b(0x26c))??0x3)?(this[_0x451d2b(0x271)][_0x451d2b(0x2cd)]({'id':_0x451d2b(0x39f)}),this[_0x451d2b(0x334)](_0xd208f2)):this['_collaborationUIEventService'][_0x451d2b(0x2cd)]({'id':_0x451d2b(0x378)}));}[_0x849776(0x334)](_0x1c4bd4){const _0x51375e=_0x849776;let _0x2c517e=_0x1c4bd4[_0x51375e(0x139)],_0x16e060=this[_0x51375e(0x123)][_0x51375e(0x131)](R),_0x2daf90=_0x2c517e===0x0?0x0:((_0x16e060==null?void 0x0:_0x16e060[_0x51375e(0x24b)])??0x4e20)*0x2**_0x2c517e;_0x1c4bd4['retryConnectingTimer']=setTimeout(()=>{const _0x39958c=_0x51375e;clearTimeout(_0x1c4bd4[_0x39958c(0x1ed)]),_0x1c4bd4[_0x39958c(0x1ed)]=null,this[_0x39958c(0x218)](_0x1c4bd4);},_0x2daf90),_0x1c4bd4[_0x51375e(0x139)]+=0x1;}async[_0x849776(0x12d)](_0x5e8d5c,_0x52621f){const _0x274d1d=_0x849776;return jn(_0x5e8d5c,_0x52621f,await this[_0x274d1d(0x27a)][_0x274d1d(0x268)]({'unitId':_0x5e8d5c,'unitType':_0x52621f}));}['_onMessage'](_0x333e6a,_0x1741a6,_0x57dd53){const _0x5e4ab3=_0x849776;let {cmd:_0x3b35c7}=_0x57dd53;_0x3b35c7===_0x50ebb8[_0x5e4ab3(0x30c)]&&!_0x333e6a['socketReady']&&(_0x1741a6[_0x5e4ab3(0x25f)]=_0x57dd53[_0x5e4ab3(0x309)][_0x5e4ab3(0x25f)],_0x333e6a[_0x5e4ab3(0x15e)][_0x5e4ab3(0x3a2)](_0x1741a6),this[_0x5e4ab3(0x17a)][_0x5e4ab3(0x3a2)](0x3),_0x333e6a[_0x5e4ab3(0x295)]=!0x0,_0x333e6a['candidateSocket']=null),_0x3b35c7===_0x50ebb8[_0x5e4ab3(0x272)]&&this['_clearTimeoutTimer'](_0x333e6a),this[_0x5e4ab3(0x1e0)](_0x333e6a);}['_hasSessionsForEndpoint'](_0x4213b7){const _0x45c941=_0x849776;return[...this[_0x45c941(0x320)][_0x45c941(0x140)]()][_0x45c941(0x1e6)](_0x354f4b=>_0x354f4b===_0x4213b7);}['_getSocketChannel'](_0x482f1f){const _0x132315=_0x849776;let _0x5970e4=_0x482f1f??'',_0x59a8c7=this['_socketChannels'][_0x132315(0x203)](_0x5970e4);if(_0x59a8c7)return _0x59a8c7;let _0x2fa1c8={'endpointKey':_0x5970e4,'endpoint':_0x482f1f,'socket$':new _0x2fdef4(void 0x0),'candidateSocket':null,'socketReady':!0x1,'socketMessageSubscription':null,'retryConnectingTimer':null,'retryCount':0x0,'sendHeartbeatTimer':null,'timeoutTimer':null};return this[_0x132315(0x24a)][_0x132315(0x116)](_0x5970e4,_0x2fa1c8),_0x2fa1c8;}[_0x849776(0x1e0)](_0x3b6d42){const _0x1064b8=_0x849776;this[_0x1064b8(0x1fa)](_0x3b6d42),_0x3b6d42[_0x1064b8(0x2eb)]=setTimeout(()=>this[_0x1064b8(0x1f4)](_0x3b6d42),this['_configService'][_0x1064b8(0x131)](_0x1064b8(0x175))??0x7530);}[_0x849776(0x1f4)](_0x46c913){const _0x2a00d3=_0x849776;_0x46c913['socket$'][_0x2a00d3(0x1cf)]()[_0x2a00d3(0x2c4)]({'cmd':_0x50ebb8[_0x2a00d3(0x272)]}),this[_0x2a00d3(0x11e)](_0x46c913);}[_0x849776(0x11e)](_0x29c08d){const _0x40d8c1=_0x849776;_0x29c08d[_0x40d8c1(0x290)]=setTimeout(()=>this[_0x40d8c1(0x213)](_0x29c08d),this[_0x40d8c1(0x123)][_0x40d8c1(0x131)]('HEARTBEAT_TIMEOUT')??0x4e20);}[_0x849776(0x1fa)](_0x41c702){const _0xce7c04=_0x849776;_0x41c702['sendHeartbeatTimer']!=null&&(clearTimeout(_0x41c702['sendHeartbeatTimer']),_0x41c702[_0xce7c04(0x2eb)]=null);}[_0x849776(0x292)](_0x232b04){const _0x4772c1=_0x849776;_0x232b04['timeoutTimer']!=null&&(clearTimeout(_0x232b04['timeoutTimer']),_0x232b04[_0x4772c1(0x290)]=null);}};Mn=H([V(0x0,_0x409c93(_0x28d4d4)),V(0x1,_0x3dc3ee),V(0x2,_0x6f8878),V(0x3,En),V(0x4,_0x409c93(B)),V(0x5,kn),V(0x6,_0x232f40(Cn))],Mn);let Nn=class extends _0x2ed6e1{constructor(_0xf3613d,_0x2bb3b8,_0x3158ff,_0x5e4111){const _0xf4b0e4=_0x849776;var _0x4929a5;super(),this[_0xf4b0e4(0x126)]=_0xf3613d,this[_0xf4b0e4(0x24e)]=_0x2bb3b8,this[_0xf4b0e4(0x123)]=_0x3158ff,this[_0xf4b0e4(0x367)]=_0x5e4111,z(this,_0xf4b0e4(0x1dd),new Map()),z(this,'_entityInit$',new _0x3bb8b8()),z(this,_0xf4b0e4(0x1b7),this['_entityInit$'][_0xf4b0e4(0x142)]()),((_0x4929a5=this[_0xf4b0e4(0x123)][_0xf4b0e4(0x131)](_0xf4b0e4(0x1c6)))==null?void 0x0:_0x4929a5['enableCollaboration'])!==!0x1&&this['_init']();}[_0x849776(0x257)](){const _0x28dd99=_0x849776;super[_0x28dd99(0x257)](),this[_0x28dd99(0x1dd)]['forEach'](_0x7935c4=>_0x7935c4[_0x28dd99(0x257)]()),this[_0x28dd99(0x1dd)][_0x28dd99(0x31e)]();}[_0x849776(0x258)](_0x2ea680){const _0x28a404=_0x849776;return this[_0x28a404(0x1dd)][_0x28a404(0x203)](_0x2ea680)??null;}[_0x849776(0x141)](_0x19f319){const _0x5c46a2=_0x849776;let _0x262803=this[_0x5c46a2(0x258)](_0x19f319);return _0x262803?_0x3bb851(_0x262803):this['_entityInit$'][_0x5c46a2(0x245)](_0x530fac(_0x31b83e=>_0x31b83e[_0x5c46a2(0x360)]===_0x19f319));}[_0x849776(0x294)](_0x1b569a){const _0x14d538=_0x849776;return _0x7cdf29(this[_0x14d538(0x141)](_0x1b569a)[_0x14d538(0x245)](_0x290e14(()=>void 0x0)));}[_0x849776(0x32d)](){const _0x377760=_0x849776;this['_univerInstanceService'][_0x377760(0x229)](_0x35f6ba[_0x377760(0x1e1)])[_0x377760(0x245)](_0x6f4bf7(this[_0x377760(0x240)]),_0x29361c(0x10))[_0x377760(0x297)](async _0x22d756=>{const _0x42e00a=_0x377760;let _0x394eaf=_0x22d756[_0x42e00a(0x244)][_0x42e00a(0x347)](),_0x3f29e8=await this[_0x42e00a(0x269)](_0x394eaf,_0x35f6ba[_0x42e00a(0x1e1)]);this[_0x42e00a(0x1dd)][_0x42e00a(0x116)](_0x394eaf,_0x3f29e8);}),this[_0x377760(0x367)][_0x377760(0x229)](_0x35f6ba[_0x377760(0x39e)])[_0x377760(0x245)](_0x6f4bf7(this[_0x377760(0x240)]),_0x29361c(0x10))[_0x377760(0x245)](_0x530fac(_0x46e178=>!_0x46e178[_0x377760(0x244)][_0x377760(0x347)]()[_0x377760(0x29e)]('__')))[_0x377760(0x297)](async _0x52163b=>{const _0x20aef1=_0x377760;let _0x21f39b=_0x52163b['unit'][_0x20aef1(0x347)](),_0x428c24=await this[_0x20aef1(0x269)](_0x21f39b,_0x35f6ba[_0x20aef1(0x39e)]);this[_0x20aef1(0x1dd)][_0x20aef1(0x116)](_0x21f39b,_0x428c24);}),this[_0x377760(0x367)]['getTypeOfUnitAdded$'](_0x35f6ba[_0x377760(0x392)])[_0x377760(0x245)](_0x6f4bf7(this[_0x377760(0x240)]),_0x29361c(0x10))[_0x377760(0x297)](async _0x24cb37=>{const _0x51eace=_0x377760;let _0x40311b=_0x24cb37[_0x51eace(0x244)][_0x51eace(0x347)](),_0x52f209=await this['_startCollaboration'](_0x40311b,_0x35f6ba[_0x51eace(0x392)]);this[_0x51eace(0x1dd)][_0x51eace(0x116)](_0x40311b,_0x52f209);}),this[_0x377760(0x367)][_0x377760(0x229)](_0x35f6ba['UNIVER_BOARD'])[_0x377760(0x245)](_0x6f4bf7(this[_0x377760(0x240)]),_0x29361c(0x10))['subscribe'](async _0xa82c9f=>{const _0x31c012=_0x377760;let _0x220956=_0xa82c9f[_0x31c012(0x244)][_0x31c012(0x347)](),_0x513613=await this[_0x31c012(0x269)](_0x220956,_0x35f6ba['UNIVER_BOARD']);this[_0x31c012(0x1dd)][_0x31c012(0x116)](_0x220956,_0x513613);}),this[_0x377760(0x367)][_0x377760(0x229)](_0x35f6ba[_0x377760(0x13e)])['pipe'](_0x6f4bf7(this[_0x377760(0x240)]),_0x29361c(0x10))['subscribe'](async _0x580408=>{const _0xf57e6d=_0x377760;let _0x147c98=_0x580408[_0xf57e6d(0x244)][_0xf57e6d(0x347)](),_0x28c99d=await this[_0xf57e6d(0x269)](_0x147c98,_0x35f6ba[_0xf57e6d(0x13e)]);this[_0xf57e6d(0x1dd)]['set'](_0x147c98,_0x28c99d);}),this[_0x377760(0x367)]['getTypeOfUnitAdded$'](_0x35f6ba[_0x377760(0x14d)])[_0x377760(0x245)](_0x6f4bf7(this[_0x377760(0x240)]),_0x29361c(0x10))[_0x377760(0x297)](async _0x10952a=>{const _0x45b4f9=_0x377760;let _0x2762bf=_0x10952a[_0x45b4f9(0x244)][_0x45b4f9(0x347)](),_0x186e38=await this[_0x45b4f9(0x269)](_0x2762bf,_0x35f6ba[_0x45b4f9(0x14d)]);this[_0x45b4f9(0x1dd)][_0x45b4f9(0x116)](_0x2762bf,_0x186e38);}),_0x2b1216(this[_0x377760(0x367)]['getTypeOfUnitDisposed$'](_0x35f6ba[_0x377760(0x1e1)]),this[_0x377760(0x367)][_0x377760(0x384)](_0x35f6ba[_0x377760(0x39e)]),this[_0x377760(0x367)][_0x377760(0x384)](_0x35f6ba[_0x377760(0x392)]),this['_univerInstanceService'][_0x377760(0x384)](_0x35f6ba['UNIVER_BOARD']),this[_0x377760(0x367)][_0x377760(0x384)](_0x35f6ba[_0x377760(0x13e)]),this[_0x377760(0x367)][_0x377760(0x384)](_0x35f6ba[_0x377760(0x14d)]))['pipe'](_0x6f4bf7(this['dispose$']))[_0x377760(0x297)](_0x537c71=>{const _0x4466b3=_0x377760;let _0x292002=_0x537c71[_0x4466b3(0x347)](),_0x30f57f=this[_0x4466b3(0x1dd)][_0x4466b3(0x203)](_0x292002);_0x30f57f&&(_0x30f57f[_0x4466b3(0x257)](),this[_0x4466b3(0x1dd)][_0x4466b3(0x32c)](_0x292002));});}async['_startCollaboration'](_0x53aa33,_0x173b5c){const _0x1f0d07=_0x849776;let _0x10cb1a=await this['_collabSessionService'][_0x1f0d07(0x1a4)](_0x53aa33),_0x17121d=this[_0x1f0d07(0x126)]['createInstance'](this['_getCtorByUniverInstanceType'](_0x173b5c),_0x53aa33,_0x173b5c,_0x10cb1a);return await _0x17121d[_0x1f0d07(0x2f4)](),this[_0x1f0d07(0x35e)][_0x1f0d07(0x3a2)](_0x17121d),_0x17121d;}[_0x849776(0x1c2)](_0x56a69d){const _0x4cfdd5=_0x849776;switch(_0x56a69d){case _0x35f6ba['UNIVER_DOC']:return _n;case _0x35f6ba['UNIVER_SHEET']:return yn;case _0x35f6ba[_0x4cfdd5(0x392)]:return bn;case _0x35f6ba[_0x4cfdd5(0x2d3)]:return xn;case _0x35f6ba[_0x4cfdd5(0x13e)]:return vn;case _0x35f6ba['UNIVER_PDF']:return Sn;default:throw Error(_0x4cfdd5(0x202)+_0x56a69d);}}};Nn=H([V(0x0,_0x409c93(_0x28d4d4)),V(0x1,_0x409c93(Mn)),V(0x2,_0x6f8878),V(0x3,_0x273a3b)],Nn);var Pn=_0x849776(0x264),Fn=_0x849776(0x16b);let In=class extends _0x513609{constructor(_0x5690c7,_0x96d418){const _0x2ca029=_0x849776;super(),this['_univerInstanceService']=_0x5690c7,this[_0x2ca029(0x123)]=_0x96d418,this[_0x2ca029(0x32d)]();}['_init'](){const _0x557a0a=_0x849776;this[_0x557a0a(0x158)](this['_univerInstanceService']['focused$'][_0x557a0a(0x297)](()=>{const _0x16dfcd=_0x557a0a;let _0x2d8072=this['_univerInstanceService'][_0x16dfcd(0x364)](),_0x4cd954=this[_0x16dfcd(0x123)][_0x16dfcd(0x131)]('DEFAULT_FILE_NAME')??_0x16dfcd(0x2d4);_0x2d8072 instanceof _0x146383&&(_0x4cd954=_0x2d8072[_0x16dfcd(0x363)]),document['title']=_0x4cd954;}));}};In=H([V(0x0,_0x273a3b),V(0x1,_0x6f8878)],In);const Ln=_0x59b7ef(_0x849776(0x3ad));let Rn=class{constructor(_0x1991f3,_0x2c327a,_0x3e5142){const _0x193e0f=_0x849776;this['_httpService']=_0x1991f3,this['_configService']=_0x2c327a,this[_0x193e0f(0x367)]=_0x3e5142;}['getUploadOptions'](){return this['_getConfig']()['attachment']??{};}async[_0x849776(0x2e5)](_0x597a8a){const _0x237a05=_0x849776;let _0x28ade6=this['getUploadOptions']();if(zn(_0x597a8a,_0x28ade6),_0x28ade6[_0x237a05(0x1f3)])return _0x28ade6[_0x237a05(0x1f3)](_0x597a8a);let _0x3a2083=await this['_upload'](_0x597a8a);return{'id':_0x3a2083,'name':_0x597a8a[_0x237a05(0x363)],'mimeType':_0x597a8a[_0x237a05(0x310)],'size':_0x597a8a[_0x237a05(0x296)],'sourceType':_0x3a8937['UUID'],'source':_0x3a2083};}async[_0x849776(0x2f0)](_0x1d9f25,_0x237c11){const _0x38f8ed=_0x849776;if(_0x237c11!==_0x3a8937[_0x38f8ed(0x337)])return _0x1d9f25;let _0x1a2d5a=(await this[_0x38f8ed(0x1e9)]['get'](this['_getSignURL']()[_0x38f8ed(0x1e4)](_0x38f8ed(0x305),_0x1d9f25)))[_0x38f8ed(0x134)];if(_0x1a2d5a['error']&&_0x1a2d5a['error'][_0x38f8ed(0x1e2)]!==_0x5c50d5['OK'])throw _0x1a2d5a[_0x38f8ed(0x2bf)];if(!_0x1a2d5a[_0x38f8ed(0x11d)])throw Error(_0x38f8ed(0x242));return _0x28734f(_0x1a2d5a['url'],this[_0x38f8ed(0x119)]());}async[_0x849776(0x253)](_0xc92975){const _0x4c9b4b=_0x849776;let _0x5a7474=this[_0x4c9b4b(0x367)][_0x4c9b4b(0x364)](),_0x41c62e=_0x5a7474==null?void 0x0:_0x5a7474[_0x4c9b4b(0x347)]();if(!_0x41c62e)throw Error(_0x4c9b4b(0x382));let _0x32d13f=new FormData();_0x32d13f[_0x4c9b4b(0x37a)](_0x4c9b4b(0x1b1),_0xc92975);let _0x5506cb=this[_0x4c9b4b(0x366)]()+_0x4c9b4b(0x22e)+_0xc92975[_0x4c9b4b(0x296)][_0x4c9b4b(0x21a)]()+'&source='+_0x3e0751[_0x4c9b4b(0x19e)]+_0x4c9b4b(0x39b)+encodeURIComponent(_0x41c62e),_0x2270f1=(await this[_0x4c9b4b(0x1e9)][_0x4c9b4b(0x387)](_0x5506cb,{'body':_0x32d13f}))[_0x4c9b4b(0x134)][_0x4c9b4b(0x120)];if(typeof _0x2270f1!=_0x4c9b4b(0x173)||!_0x2270f1)throw Error(_0x4c9b4b(0x21c));return _0x2270f1;}[_0x849776(0x366)](){const _0x37d62b=_0x849776;return this[_0x37d62b(0x136)]()[_0x37d62b(0x30e)]??_0x37d62b(0x20d);}['_getSignURL'](){const _0x572dac=_0x849776;return this[_0x572dac(0x136)]()['signUrlServerUrl']??'/universer-api/file/{fileID}/sign-url';}[_0x849776(0x119)](){const _0x4697a6=_0x849776;let _0x17bf5a=this[_0x4697a6(0x136)]();return _0x17bf5a[_0x4697a6(0x370)]?_0x17bf5a['downloadEndpointUrl']:typeof location<'u'?location['origin']:_0x17bf5a[_0x4697a6(0x30e)]??'';}[_0x849776(0x136)](){const _0x486b7d=_0x849776;return this[_0x486b7d(0x123)][_0x486b7d(0x131)]('collaboration-client.config')??{};}};Rn=H([V(0x0,_0x409c93(_0x286bba)),V(0x1,_0x409c93(_0x6f8878)),V(0x2,_0x409c93(_0x273a3b))],Rn);function zn(_0x451cc2,_0x58b413){const _0xcc138=_0x849776;var _0x7cd6e5;if(_0x58b413[_0xcc138(0x2b5)]!=null&&_0x451cc2[_0xcc138(0x296)]>_0x58b413[_0xcc138(0x2b5)])throw Error(_0xcc138(0x344));if((_0x7cd6e5=_0x58b413[_0xcc138(0x2df)])!=null&&_0x7cd6e5[_0xcc138(0x298)]&&!_0x58b413[_0xcc138(0x2df)][_0xcc138(0x1e6)](_0xa612aa=>_0x451cc2[_0xcc138(0x310)]===_0xa612aa||_0x451cc2['name'][_0xcc138(0x345)](_0xa612aa)||_0xa612aa[_0xcc138(0x345)]('/*')&&_0x451cc2[_0xcc138(0x310)][_0xcc138(0x29e)](_0xa612aa['slice'](0x0,-0x1))))throw Error(_0xcc138(0x22b));}let Bn=class{constructor(_0x11d2fb,_0x55eea2,_0x27b6cd){const _0x45d3c0=_0x849776;this['_configService']=_0x11d2fb,this[_0x45d3c0(0x1e9)]=_0x55eea2,this['localeService']=_0x27b6cd,this['init']();}['init'](){const _0x2de3d2=_0x849776;this[_0x2de3d2(0x1e9)][_0x2de3d2(0x308)]({'priority':0x1,'interceptor':(_0x52e32f,_0x5777f4)=>_0x5777f4(_0x52e32f)[_0x2de3d2(0x245)](_0x42e4c2(async _0x150722=>{const _0x5a0b05=_0x2de3d2;let _0x2117ee=_0x150722;if(_0x2117ee[_0x5a0b05(0x273)]===0x191){if(typeof window>'u')throw Error('[AuthServerService]:\x20you\x20should\x20provide\x20authentication\x20info\x20on\x20Node.js.');if(window[_0x5a0b05(0x15a)](this[_0x5a0b05(0x288)]['t'](_0x5a0b05(0x306)))){let _0x236938=window['encodeURIComponent'](window[_0x5a0b05(0x2aa)][_0x5a0b05(0x35b)]);window[_0x5a0b05(0x2aa)][_0x5a0b05(0x35b)]=this[_0x5a0b05(0x231)]()+'?url='+_0x236938;}}return _0x2117ee;}))});}['_getLoginPath'](){const _0x4d9b7a=_0x849776;let _0x4e8284=this['_configService'][_0x4d9b7a(0x131)](R);return(_0x4e8284==null?void 0x0:_0x4e8284[_0x4d9b7a(0x2b7)])??'/universer-api/oidc/authpage';}};Bn=H([V(0x0,_0x6f8878),V(0x1,_0x409c93(_0x286bba)),V(0x2,_0x409c93(_0x36c9a1))],Bn);let Vn=class extends _0x513609{constructor(_0x5950ba,_0x371bf4){const _0x5127e2=_0x849776;super(),this[_0x5127e2(0x25a)]=_0x5950ba,this[_0x5127e2(0x123)]=_0x371bf4,z(this,'_cfgEnableObjInherit',!0x1),this['_initMergeInterceptor']();}['_initMergeInterceptor'](){const _0x1c8095=_0x849776;let _0x11cc72=this;this[_0x1c8095(0x158)](this[_0x1c8095(0x25a)]['registerHTTPInterceptor']({'priority':0x3e7,'interceptor':_0xbba41({'isMatch'(_0x5e1de6){const _0x11b697=_0x1c8095;var _0x1e831a;if(_0x5e1de6['method']==='POST'&&(_0x1e831a=_0x5e1de6[_0x11b697(0x350)])!=null&&_0x1e831a[_0x11b697(0x134)]){let {objectID:_0x5e79c0,objectType:_0x400896}=_0x5e1de6[_0x11b697(0x350)][_0x11b697(0x134)]||{};if(!_0x5e79c0||_0x400896===void 0x0)return!0x1;let _0x4a3e88=_0x11cc72[_0x11b697(0x1ce)]()+'/'+_0x400896+_0x11b697(0x302)+_0x5e79c0+_0x11b697(0x156);if(_0x5e1de6[_0x11b697(0x11d)]===_0x4a3e88)return!0x0;}return!0x1;},'getParamsFromRequest'(_0x6ac034){const _0x2a1913=_0x1c8095;var _0x401342;return(_0x401342=_0x6ac034[_0x2a1913(0x350)])==null?void 0x0:_0x401342[_0x2a1913(0x134)];},'mergeParamsToRequest'(_0x24b325,_0x1c8def){const _0x2c7a61=_0x1c8095;let _0xde84ef=_0x11cc72[_0x2c7a61(0x1ce)]()+_0x2c7a61(0x2f1),_0x514df9=_0x24b325[_0x2c7a61(0x1ea)]((_0x24739d,_0x912ee0)=>{const _0x3706fc=_0x2c7a61;let {unitID:_0x849384,objectID:_0x562ef0,objectType:_0x543975,actions:_0x2ab74a}=_0x912ee0;return _0x24739d[_0x849384]||(_0x24739d[_0x849384]={}),_0x24739d[_0x849384][_0x562ef0]||(_0x24739d[_0x849384][_0x562ef0]={'objectID':_0x562ef0,'objectType':_0x543975,'actions':[]}),_0x24739d[_0x849384][_0x562ef0]['actions'][_0x3706fc(0x221)](..._0x2ab74a),_0x24739d;},{}),_0x34220f=[];for(let _0x58f37b in _0x514df9)for(let _0x49dc9c in _0x514df9[_0x58f37b]){let {actions:_0x3dd723,objectType:_0x5ca43b}=_0x514df9[_0x58f37b][_0x49dc9c],_0x45e140=[...new Set(_0x3dd723)];_0x34220f[_0x2c7a61(0x221)]({'unitID':_0x58f37b,'objectID':_0x49dc9c,'objectType':_0x5ca43b,'actions':_0x45e140});}return new _0x4cce1a(_0x2c7a61(0x31f),_0xde84ef,{'headers':_0x1c8def[_0x2c7a61(0x14a)],'withCredentials':_0x1c8def[_0x2c7a61(0x198)],'responseType':_0x1c8def[_0x2c7a61(0x3b4)],'body':{'requests':_0x34220f}});}},{'distributeResult'(_0x51ee93,_0x563c86){let {objectActions:_0x277cf7}=_0x51ee93;return _0x563c86['map'](_0x571512=>{const _0x594d8f=_0x45be;let {unitID:_0x576ed0,objectID:_0x153e27,actions:_0x211dc7}=_0x571512,_0x3b3621=_0x277cf7['find'](_0x2dbea2=>_0x2dbea2[_0x594d8f(0x360)]===_0x576ed0&&_0x2dbea2[_0x594d8f(0x16f)]===_0x153e27);return{'config':_0x571512,'result':{'actions':_0x211dc7[_0x594d8f(0x15d)](_0x10d7e4=>_0x3b3621==null?void 0x0:_0x3b3621['actions'][_0x594d8f(0x2fe)](_0x1c8038=>_0x1c8038[_0x594d8f(0x19f)]===_0x10d7e4))[_0x594d8f(0x211)](_0x18c726=>!!_0x18c726),'error':_0x51ee93['error']}};});}})}));}[_0x849776(0x1ce)](){const _0xf3a8d6=_0x849776;let _0x3b39b8=this['_configService']['getConfig'](R);return(_0x3b39b8==null?void 0x0:_0x3b39b8[_0xf3a8d6(0x1e3)])??'/universer-api/authz';}async['create'](_0x38bd8f){const _0x25fbf8=_0x849776;let _0x5c2749=this['_getAPIPrefixPath']()+'/'+_0x38bd8f[_0x25fbf8(0x1cd)]+_0x25fbf8(0x1c3);return(await this[_0x25fbf8(0x25a)][_0x25fbf8(0x387)](_0x5c2749,{'body':_0x38bd8f}))['body'][_0x25fbf8(0x16f)]||'';}async[_0x849776(0x33e)](_0x25d1ed){const _0x5e3c2d=_0x849776;let _0x20c0aa=this['_getAPIPrefixPath']()+_0x5e3c2d(0x30a);return(await this[_0x5e3c2d(0x25a)][_0x5e3c2d(0x387)](_0x20c0aa,{'body':_0x25d1ed}))[_0x5e3c2d(0x134)]['objects'];}async['update'](_0x2d6781){const _0x1dec57=_0x849776;var _0x55e732;let _0xef715c=this[_0x1dec57(0x1ce)]()+'/'+_0x2d6781[_0x1dec57(0x1cd)]+_0x1dec57(0x302)+_0x2d6781[_0x1dec57(0x16f)],_0x58eb15=await this[_0x1dec57(0x25a)]['put'](_0xef715c,{'body':_0x2d6781});if((_0x58eb15==null||(_0x55e732=_0x58eb15['body'])==null||(_0x55e732=_0x55e732[_0x1dec57(0x2bf)])==null?void 0x0:_0x55e732[_0x1dec57(0x1e2)])!==0x1)throw Error('Failed\x20to\x20update\x20permission\x20point');}async[_0x849776(0x23e)](_0x2354b6){const _0x36c8a4=_0x849776;let _0x8dd9b=this[_0x36c8a4(0x1ce)]()+'/'+_0x2354b6[_0x36c8a4(0x1cd)]+_0x36c8a4(0x302)+_0x2354b6[_0x36c8a4(0x16f)]+_0x36c8a4(0x156);return(await this[_0x36c8a4(0x25a)][_0x36c8a4(0x387)](_0x8dd9b,{'body':_0x2354b6}))['body'][_0x36c8a4(0x2f3)];}async[_0x849776(0x1f6)](_0x22e2c4){const _0x580606=_0x849776;let _0x16d8ca=this['_getAPIPrefixPath']()+_0x580606(0x2f1);return(await this[_0x580606(0x25a)][_0x580606(0x387)](_0x16d8ca,{'body':{'requests':_0x22e2c4}}))[_0x580606(0x134)][_0x580606(0x322)];}async[_0x849776(0x2f8)](_0x330023){const _0xfe206d=_0x849776;let _0x59ef63=this[_0xfe206d(0x1ce)]()+'/'+_0x330023[_0xfe206d(0x1cd)]+_0xfe206d(0x170),_0x21ff24=await this[_0xfe206d(0x25a)][_0xfe206d(0x387)](_0x59ef63,{'body':_0x330023});return{'roles':_0x21ff24[_0xfe206d(0x134)][_0xfe206d(0x1da)],'actions':_0x21ff24['body'][_0xfe206d(0x2f3)]};}async[_0x849776(0x24f)](_0x69e5a2){const _0x3408b9=_0x849776;let _0xec0252=this[_0x3408b9(0x1ce)]()+_0x3408b9(0x14f);await this[_0x3408b9(0x25a)][_0x3408b9(0x32c)](_0xec0252,{'params':{'collaboratorID':_0x69e5a2[_0x3408b9(0x381)],'objectID':_0x69e5a2[_0x3408b9(0x16f)],'unitID':_0x69e5a2['unitID']}});}async[_0x849776(0x232)](_0x1048ce){const _0x2b0a2=_0x849776;let _0x299ddc=this[_0x2b0a2(0x1ce)]()+'/collaborator';await this[_0x2b0a2(0x25a)][_0x2b0a2(0x36d)](_0x299ddc,{'body':_0x1048ce});}async[_0x849776(0x38f)](_0x2dcb7a){const _0x16373d=_0x849776;let _0x24728a=this[_0x16373d(0x1ce)]()+'/collaborator';await this['_HTTPService'][_0x16373d(0x387)](_0x24728a,{'body':_0x2dcb7a});}async[_0x849776(0x2db)](_0x433b1c){const _0x575f36=_0x849776;let _0x445a61=this['_getAPIPrefixPath']()+'/collaborator',_0x5bad0a=await this[_0x575f36(0x25a)][_0x575f36(0x203)](_0x445a61,{'params':{'objectID':_0x433b1c[_0x575f36(0x16f)],'unitID':_0x433b1c[_0x575f36(0x360)]}});return this['setCfgEnableObjInherit'](_0x5bad0a[_0x575f36(0x134)][_0x575f36(0x3a1)]??!0x1),_0x5bad0a[_0x575f36(0x134)]['collaborators'];}async['putCollaborators'](_0x1fc929){const _0x3e6aab=_0x849776;let _0x2bf8cb=this[_0x3e6aab(0x1ce)]()+'/collaborator';await this['_HTTPService']['put'](_0x2bf8cb,{'body':_0x1fc929});}['setCfgEnableObjInherit'](_0x1a2d24){this['_cfgEnableObjInherit']=_0x1a2d24;}[_0x849776(0x2a1)](){return this['_cfgEnableObjInherit'];}};Vn=H([V(0x0,_0x409c93(_0x286bba)),V(0x1,_0x409c93(_0x6f8878))],Vn);function Hn(_0xb2bb0c){const _0x2a63bf=_0x849776;let _0x334cad=atob(_0xb2bb0c),_0x16f2da=new Uint8Array(_0x334cad['length']);for(let _0x1e0295=0x0;_0x1e0295<_0x334cad[_0x2a63bf(0x298)];_0x1e0295++)_0x16f2da[_0x1e0295]=_0x334cad[_0x2a63bf(0x335)](_0x1e0295);return _0x16f2da;}function Un(_0x4148ea){const _0x432887=_0x849776;let _0x2dd477='';for(let _0x52a4b9=0x0;_0x52a4b9<_0x4148ea[_0x432887(0x298)];_0x52a4b9++)_0x2dd477+=String['fromCharCode'](_0x4148ea[_0x52a4b9]);return btoa(_0x2dd477);}function Wn(_0x4f3d08,_0x1d570a){const _0x55e1f0=_0x849776;let _0x22e5f3=Hn(_0x1d570a),_0x30d586=_0x43bce8(0x10);return Un(_0xd51092(_0x30d586,_0x6d05ef(_0x22e5f3,_0x30d586)[_0x55e1f0(0x34b)](_0x3b15c2(_0x4f3d08))));}function Gn(){const _0x216a88=_0x849776;let _0x2b0501=_0xcfed1e()[_0x216a88(0x371)];if(typeof window<'u'&&window[_0x216a88(0x2aa)]!==void 0x0&&_0x2b0501){let _0x5925b9={'time':Math['floor'](Date[_0x216a88(0x2f9)]()/0x3e8),'domain':location[_0x216a88(0x28c)]};return Wn(JSON['stringify'](_0x5925b9),_0x2b0501);}}let Kn=class{constructor(_0x36516a){const _0xc28987=_0x849776;this['_httpService']=_0x36516a,this[_0xc28987(0x2fb)]();}[_0x849776(0x2fb)](){const _0x2e5f8f=_0x849776;this['_httpService'][_0x2e5f8f(0x308)]({'interceptor':(_0x21d4b0,_0x294b82)=>{const _0x4584e3=_0x2e5f8f;let _0x2f9eee=Gn();return _0x2f9eee&&_0x21d4b0[_0x4584e3(0x14a)][_0x4584e3(0x116)](_0x4584e3(0x380),_0x2f9eee),_0x294b82(_0x21d4b0);}});}};Kn=H([V(0x0,_0x409c93(_0x286bba))],Kn);let qn=class extends _0x2ed6e1{constructor(_0x48660d,_0x1e4b1c,_0x39f28b){const _0xcffd41=_0x849776;super(),this[_0xcffd41(0x12e)]=_0x48660d,this[_0xcffd41(0x254)]=_0x1e4b1c,this['_localCacheService']=_0x39f28b,z(this,'_unitInfo$',new _0x2fdef4(null)),z(this,_0xcffd41(0x283),new _0x3bb8b8()),z(this,_0xcffd41(0x1be),this[_0xcffd41(0x3b1)][_0xcffd41(0x142)]()),z(this,_0xcffd41(0x399),this[_0xcffd41(0x283)][_0xcffd41(0x142)]());}[_0x849776(0x257)](){const _0x4cca70=_0x849776;super[_0x4cca70(0x257)](),this[_0x4cca70(0x283)][_0x4cca70(0x194)](),this[_0x4cca70(0x3b1)][_0x4cca70(0x194)]();}async[_0x849776(0x27b)](_0x1fd405,_0xe60d84,_0x5aa7ef,_0x2cd26e){const _0x34123f=_0x849776;this[_0x34123f(0x3b1)][_0x34123f(0x3a2)]({'unitId':_0x1fd405,'type':_0xe60d84,'subUnitId':_0x2cd26e});let _0x27fca1=null;switch(_0xe60d84){case _0x35f6ba[_0x34123f(0x1e1)]:_0x27fca1=await this['_snapshotService'][_0x34123f(0x343)](_0x1fd405,_0x5aa7ef,void 0x0,{'initialSubUnitId':_0x2cd26e});break;case _0x35f6ba[_0x34123f(0x39e)]:_0x27fca1=await this[_0x34123f(0x254)][_0x34123f(0x287)](_0x1fd405,_0x5aa7ef);break;case _0x35f6ba['UNIVER_SLIDE']:_0x27fca1=await this['_snapshotService'][_0x34123f(0x324)](_0x1fd405,_0x5aa7ef);break;case _0x35f6ba[_0x34123f(0x2d3)]:_0x27fca1=await this[_0x34123f(0x254)][_0x34123f(0x1cc)](_0x1fd405,_0x5aa7ef);break;case _0x35f6ba[_0x34123f(0x13e)]:_0x27fca1=await this[_0x34123f(0x254)][_0x34123f(0x37e)](_0x1fd405,_0x5aa7ef);break;case _0x35f6ba[_0x34123f(0x14d)]:_0x27fca1=await this['_snapshotService']['loadPdf'](_0x1fd405,_0x5aa7ef);break;default:this[_0x34123f(0x12e)]['error'](_0x34123f(0x2bd),_0x34123f(0x174));break;}return _0x27fca1&&this['_unitLoaded$']['next'](_0x27fca1),_0x27fca1;}async[_0x849776(0x2de)](_0x218507,_0x505d39,_0x697f56){const _0x416191=_0x849776;var _0xfc0398;this[_0x416191(0x3b1)][_0x416191(0x3a2)]({'unitId':_0x218507,'type':_0x505d39,'subUnitId':_0x697f56});let _0x3f71fc=0x0,_0x3bb797=await((_0xfc0398=this[_0x416191(0x2a8)])==null?void 0x0:_0xfc0398[_0x416191(0x172)](_0x218507));return _0x3bb797&&(_0x3bb797[_0x416191(0x2f2)]||_0x3bb797['mutations'][_0x416191(0x298)]!==0x0)&&(_0x3f71fc=_0x3bb797[_0x416191(0x21f)]),_0x3f71fc===0x0&&this[_0x416191(0x12e)][_0x416191(0x2d8)](_0x416191(0x2bd),_0x416191(0x2ec)),this['loadUnitOfRevision'](_0x218507,_0x505d39,_0x3f71fc,_0x697f56);}};qn=H([V(0x0,_0x3dc3ee),V(0x1,_0x409c93(_0x4ae9c6)),V(0x2,_0x232f40(U))],qn);let Jn=class{constructor(_0x2e9676,_0x3ea79a,_0x1e244b){const _0x271445=_0x849776;this[_0x271445(0x1e9)]=_0x2e9676,this[_0x271445(0x123)]=_0x3ea79a,this['_univerInstanceService']=_0x1e244b,z(this,_0x271445(0x162),0x0),z(this,_0x271445(0x181),new _0x3bb8b8()),z(this,'change$',this[_0x271445(0x181)]),z(this,_0x271445(0x1cb),new Map());}[_0x849776(0x114)](_0xe7989c){const _0x322751=_0x849776;this['_waitCount']=_0xe7989c,this[_0x322751(0x181)][_0x322751(0x3a2)](_0xe7989c);}[_0x849776(0x2a7)](_0x2ad3cf,_0x219ba3){const _0x4a32a5=_0x849776;if(_0x219ba3===_0x3a8937[_0x4a32a5(0x22a)]){let _0x4da476=new Image();return _0x4da476['src']=_0x2ad3cf,_0x4da476;}return this[_0x4a32a5(0x1cb)][_0x4a32a5(0x203)](_0x2ad3cf);}['addImageSourceCache'](_0xd2f09c,_0x2bcf76,_0x5716c9){const _0xc4aeda=_0x849776;_0x2bcf76!==_0x3a8937[_0xc4aeda(0x22a)]&&_0x5716c9!=null&&this[_0xc4aeda(0x1cb)]['set'](_0xd2f09c,_0x5716c9);}async['getImage'](_0x2617c1){const _0xa31e3d=_0x849776;try{let _0x3f4ebd=this['_replaceFileID'](this[_0xa31e3d(0x1f1)](),''+_0x2617c1),_0x2111ac=(await this[_0xa31e3d(0x1e9)][_0xa31e3d(0x203)](_0x3f4ebd))[_0xa31e3d(0x134)];if(_0x2111ac[_0xa31e3d(0x2bf)]&&_0x2111ac[_0xa31e3d(0x2bf)][_0xa31e3d(0x1e2)]===_0x5c50d5['OK']){let _0xd70ac4=_0x28734f(_0x2111ac[_0xa31e3d(0x11d)],this[_0xa31e3d(0x119)]());return Promise['resolve'](_0xd70ac4);}return Promise[_0xa31e3d(0x1f5)](_0x2111ac['error']);}catch(_0x8b48d5){return Promise[_0xa31e3d(0x1f5)](_0x8b48d5);}}async['saveImage'](_0x4610aa){const _0x41f21b=_0x849776;let _0x29bb50='';if(!_0x5aad19[_0x41f21b(0x1d4)](_0x4610aa['type']))return this[_0x41f21b(0x18a)](),Promise['reject'](Error(_0x321486[_0x41f21b(0x259)]));if(_0x4610aa[_0x41f21b(0x296)]>_0x27e29a())return this[_0x41f21b(0x18a)](),Promise[_0x41f21b(0x1f5)](Error(_0x321486[_0x41f21b(0x1a2)]));try{let _0xb9de94=new FormData();_0xb9de94[_0x41f21b(0x37a)]('file',_0x4610aa);let _0x5060a5=this[_0x41f21b(0x367)]['getFocusedUnit'](),_0x3260c4=_0x5060a5==null?void 0x0:_0x5060a5[_0x41f21b(0x347)]();if(!_0x3260c4)throw Error(_0x41f21b(0x2d5));let _0x28283d=this[_0x41f21b(0x366)]()+'?size='+_0x4610aa[_0x41f21b(0x296)]['toString']()+_0x41f21b(0x2a2)+_0x3e0751[_0x41f21b(0x19e)]+_0x41f21b(0x39b)+encodeURIComponent(_0x3260c4),_0xd37758={'body':_0xb9de94},_0x57dd7d=(await this[_0x41f21b(0x1e9)][_0x41f21b(0x387)](_0x28283d,_0xd37758))[_0x41f21b(0x134)];if(typeof _0x57dd7d[_0x41f21b(0x120)]!=_0x41f21b(0x173))return this[_0x41f21b(0x18a)](),Promise[_0x41f21b(0x1f5)](Error(_0x321486[_0x41f21b(0x1bd)]));_0x29bb50=_0x57dd7d['FileId'];}catch{return this[_0x41f21b(0x18a)](),Promise['reject'](Error(_0x321486[_0x41f21b(0x1bd)]));}return new Promise((_0x28b3f4,_0x3e2971)=>{const _0x23b8ab=_0x41f21b;let _0x4da714=new FileReader();_0x4da714[_0x23b8ab(0x1e7)](_0x4610aa),_0x4da714[_0x23b8ab(0x2e2)]=_0x255843=>{const _0xe8c46e=_0x23b8ab;var _0x239b59;let _0x4fe54b=(_0x239b59=_0x255843[_0xe8c46e(0x1fd)])==null?void 0x0:_0x239b59[_0xe8c46e(0x27f)];if(_0x4fe54b==null){this[_0xe8c46e(0x18a)](),_0x3e2971(Error(_0x321486[_0xe8c46e(0x1bd)]));return;}_0x28b3f4({'imageId':_0x2269ed(0x6),'imageSourceType':_0x3a8937[_0xe8c46e(0x337)],'source':_0x29bb50,'base64Cache':_0x4fe54b,'status':_0x321486[_0xe8c46e(0x23f)]}),this['_decreaseWaiting']();};});}[_0x849776(0x366)](){const _0x3a1590=_0x849776;let _0x7b9431=this[_0x3a1590(0x123)][_0x3a1590(0x131)](R);return(_0x7b9431==null?void 0x0:_0x7b9431['uploadFileServerUrl'])??_0x3a1590(0x20d);}[_0x849776(0x1f1)](){const _0x5a375d=_0x849776;let _0x189aa1=this['_configService']['getConfig'](R);return(_0x189aa1==null?void 0x0:_0x189aa1[_0x5a375d(0x214)])??_0x5a375d(0x2d9);}['_getDownloadEndpointURL'](){const _0x19455e=_0x849776;let _0x14412b=this[_0x19455e(0x123)][_0x19455e(0x131)](R);return(_0x14412b==null?void 0x0:_0x14412b[_0x19455e(0x370)])??location[_0x19455e(0x23d)];}[_0x849776(0x112)](_0x9cf5d4,_0xb3d43d){const _0xd7a6e4=_0x849776;return _0x9cf5d4['replace'](_0xd7a6e4(0x305),_0xb3d43d);}[_0x849776(0x18a)](){const _0x3e6741=_0x849776;--this['_waitCount'],this[_0x3e6741(0x181)][_0x3e6741(0x3a2)](this[_0x3e6741(0x162)]);}};Jn=H([V(0x0,_0x409c93(_0x286bba)),V(0x1,_0x6f8878),V(0x2,_0x409c93(_0x273a3b))],Jn);let Yn=class{constructor(_0x5a270c,_0xb6cdd3){const _0x10a547=_0x849776;this[_0x10a547(0x123)]=_0x5a270c,this[_0x10a547(0x25a)]=_0xb6cdd3;}[_0x849776(0x1ce)](){const _0x3d2efe=_0x849776;let _0x1cb0d4=this['_configService'][_0x3d2efe(0x131)](R);return(_0x1cb0d4==null?void 0x0:_0x1cb0d4['authzUrl'])??'/universer-api/authz';}async[_0x849776(0x33e)](_0x34bd10){const _0x1ce067=_0x849776;let _0xfc3fbc=this[_0x1ce067(0x1ce)]()+'/collaborator';return{'list':[{'title':_0x1ce067(0x250),'mentions':(await this[_0x1ce067(0x25a)][_0x1ce067(0x203)](_0xfc3fbc,{'params':{'objectID':_0x34bd10['unitId'],'unitID':_0x34bd10[_0x1ce067(0x331)]}}))[_0x1ce067(0x134)][_0x1ce067(0x19d)][_0x1ce067(0x15d)](_0x2da709=>({'objectId':_0x2da709['id'],'name':_0x2da709[_0x1ce067(0x2fc)][_0x1ce067(0x363)],'metadata':{'icon':_0x2da709[_0x1ce067(0x2fc)]['avatar']},'label':_0x2da709[_0x1ce067(0x2fc)][_0x1ce067(0x363)],'objectType':_0x5221fb['PERSON']})),'metadata':{},'type':_0x5221fb['PERSON']}]};}};Yn=H([V(0x0,_0x409c93(_0x6f8878)),V(0x1,_0x409c93(_0x286bba))],Yn);let Xn=class extends _0x2ed6e1{constructor(_0x3d5461,_0x1b3ce6,_0xc1baff,_0xa1684a,_0x5c8712){const _0x462715=_0x849776;super(),this[_0x462715(0x126)]=_0x3d5461,this[_0x462715(0x367)]=_0x1b3ce6,this[_0x462715(0x16c)]=_0xc1baff,this['_collaborationSessionService']=_0xa1684a,this[_0x462715(0x271)]=_0x5c8712,this[_0x462715(0x2c7)](),this[_0x462715(0x1e8)]();}[_0x849776(0x1e8)](){const _0x58327c=_0x849776;let _0x435bb2=async _0x104bcf=>{const _0x213330=_0x45be;(await this[_0x213330(0x14e)]['requireSession'](_0x104bcf))[_0x213330(0x179)][_0x213330(0x245)](_0x530fac(_0xcae91d=>_0xcae91d['eventID']===_0x389ee8[_0x213330(0x132)]),_0x3a4e23(this['dispose$']))[_0x213330(0x297)](_0x1e0f6f=>{const _0xe33369=_0x213330;let {reason:_0x459935}=_0x1e0f6f[_0xe33369(0x309)];this[_0xe33369(0x271)][_0xe33369(0x2cd)]({'id':'CLOSE_ROOM','data':_0x459935}),this['_permissionService'][_0xe33369(0x25e)](new _0x302f4b(_0x104bcf)['id'],!0x1),this[_0xe33369(0x14e)][_0xe33369(0x251)](_0x104bcf);});};_0x2b1216(this[_0x58327c(0x367)][_0x58327c(0x229)](_0x35f6ba[_0x58327c(0x1e1)]),this[_0x58327c(0x367)]['getTypeOfUnitAdded$'](_0x35f6ba[_0x58327c(0x39e)]),this[_0x58327c(0x367)][_0x58327c(0x229)](_0x35f6ba['UNIVER_BOARD']),this[_0x58327c(0x367)][_0x58327c(0x229)](_0x35f6ba[_0x58327c(0x13e)]))['pipe'](_0x290e14(_0x4cffff=>_0x4cffff['unit'][_0x58327c(0x347)]()),_0x530fac(_0x195ce0=>!_0xd6485b(_0x195ce0)),_0x3a4e23(this['dispose$']))['subscribe'](_0x274cf5=>{_0x435bb2(_0x274cf5);});}[_0x849776(0x2c7)](){const _0x3fd4cd=_0x849776;let _0x286e93=async _0x5bfbb0=>{const _0x10a533=_0x45be;let _0x560d13=await this[_0x10a533(0x14e)][_0x10a533(0x1a4)](_0x5bfbb0),_0x398001=this[_0x10a533(0x126)]['get'](_0x4856a0);_0x560d13[_0x10a533(0x179)]['pipe'](_0x530fac(_0xe4f339=>_0xe4f339[_0x10a533(0x19a)]===_0x389ee8[_0x10a533(0x26f)]),_0x3a4e23(this[_0x10a533(0x240)]))['subscribe'](_0x4b2dec=>{const _0x4658b2=_0x10a533;let {objectId:_0x4d442e}=_0x4b2dec['data'];_0x4d442e===_0x5bfbb0?_0x398001[_0x4658b2(0x374)](_0x5bfbb0):_0x398001[_0x4658b2(0x277)](_0x5bfbb0,_0x4d442e);});};_0x2b1216(this['_univerInstanceService'][_0x3fd4cd(0x229)](_0x35f6ba[_0x3fd4cd(0x1e1)]))['pipe'](_0x290e14(_0x444b9e=>_0x444b9e['unit'][_0x3fd4cd(0x347)]()),_0x530fac(_0x4d202f=>!_0xd6485b(_0x4d202f)),_0x3a4e23(this[_0x3fd4cd(0x240)]))[_0x3fd4cd(0x297)](_0x59d6de=>{_0x286e93(_0x59d6de);});}};Xn=H([V(0x0,_0x409c93(_0x28d4d4)),V(0x1,_0x273a3b),V(0x2,_0x2cf373),V(0x3,_0x409c93(Mn)),V(0x4,_0x409c93(B))],Xn);let Zn=class{constructor(_0x2554d3,_0x38953a){const _0x2e6698=_0x849776;this[_0x2e6698(0x123)]=_0x2554d3,this['_httpService']=_0x38953a;}async[_0x849776(0x2f5)](_0x71243f,_0x289c51){const _0x2f0101=_0x849776;var _0x238512;let {unitID:_0x3d60d2,type:_0x54d067,revision:_0xfc22bc=0x0}=_0x289c51,_0x20e033=this[_0x2f0101(0x222)]()+'/'+_0x54d067+'/unit/'+_0x3d60d2+'/rev/'+_0xfc22bc,_0x14712e=(await this['_httpService'][_0x2f0101(0x203)](_0x20e033))[_0x2f0101(0x134)],_0x186643=(_0x238512=_0x14712e['snapshot'])==null?void 0x0:_0x238512['workbook'];if(_0x186643){let _0x4f1d7b=_0x186643==null?void 0x0:_0x186643['originalMeta'];_0x186643[_0x2f0101(0x263)]=_0x4a8895[_0x2f0101(0x1bb)](_0x2d3e4d(_0x4f1d7b)),Object[_0x2f0101(0x261)](_0x186643[_0x2f0101(0x2a0)])[_0x2f0101(0x281)](([,_0x1d24fe])=>{const _0x3e0233=_0x2f0101;let _0x4a62e0=_0x1d24fe[_0x3e0233(0x263)];_0x1d24fe[_0x3e0233(0x263)]=_0x4a8895[_0x3e0233(0x1bb)](_0x2d3e4d(_0x4a62e0));});}return _0x14712e;}async[_0x849776(0x2a6)](_0x4ae60d,_0x362702){const _0x3a93b4=_0x849776;let {unitID:_0x3f2c96,type:_0x1c917a,blockID:_0xd3d626}=_0x362702,_0x4326d5=this['_getAPIPrefix']()+'/'+_0x1c917a+_0x3a93b4(0x38e)+_0x3f2c96+_0x3a93b4(0x32b)+_0xd3d626;return(await this[_0x3a93b4(0x1e9)]['get'](_0x4326d5))[_0x3a93b4(0x134)];}async[_0x849776(0x3a5)](_0x1d5346,_0xba91f5){const _0x6a7bd2=_0x849776;let {unitID:_0x1726eb,type:_0x16007a,blockID:_0x16de80}=_0xba91f5,_0x3dc51c=this[_0x6a7bd2(0x321)]()+_0x6a7bd2(0x32b)+_0x16007a+_0x6a7bd2(0x38e)+_0x1726eb+_0x6a7bd2(0x32b)+_0x16de80;return(await this[_0x6a7bd2(0x1e9)]['get'](_0x3dc51c))[_0x6a7bd2(0x134)];}async[_0x849776(0x1ae)](_0x1f119a,_0x1e649d){const _0x39e229=_0x849776;let {unitID:_0x4fe81b,type:_0x174211,from:_0x1b0d08,to:_0x51c824}=_0x1e649d,_0x560108=this[_0x39e229(0x321)]()+'/'+_0x174211+_0x39e229(0x38e)+_0x4fe81b+'/fetchmissing?from='+_0x1b0d08+_0x39e229(0x2dd)+_0x51c824;return(await this[_0x39e229(0x1e9)][_0x39e229(0x203)](_0x560108))['body'];}['getSnapshotAPIPath'](){const _0x10542c=_0x849776;return this[_0x10542c(0x123)][_0x10542c(0x131)](_0x10542c(0x312))??this[_0x10542c(0x321)]();}[_0x849776(0x321)](){const _0x2e5b6b=_0x849776;let _0x4b167c=this[_0x2e5b6b(0x123)]['getConfig'](R);return(_0x4b167c==null?void 0x0:_0x4b167c['snapshotServerUrl'])??_0x2e5b6b(0x32f);}async[_0x849776(0x23a)](_0x5d374d,_0xffa86d){const _0x316d54=_0x849776;let _0x322e70=_0x316d54(0x2d2)+_0xffa86d[_0x316d54(0x310)]+_0x316d54(0x38e)+_0xffa86d['unitID']+_0x316d54(0x267);return(await this['_httpService'][_0x316d54(0x203)](_0x322e70,{'params':{'resourceId':JSON[_0x316d54(0x39c)](_0xffa86d[_0x316d54(0x153)])}}))['body'];}['saveSnapshot'](){const _0x3ecc86=_0x849776;throw Error(_0x3ecc86(0x28e));}[_0x849776(0x34d)](){const _0x2f0980=_0x849776;throw Error(_0x2f0980(0x28e));}[_0x849776(0x2fa)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}[_0x849776(0x35c)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}['copyFileMeta'](){const _0x45c718=_0x849776;throw Error(_0x45c718(0x28e));}[_0x849776(0x307)](){throw Error('This\x20method\x20should\x20not\x20be\x20called\x20on\x20the\x20client\x20side!');}};Zn=H([V(0x0,_0x6f8878),V(0x1,_0x409c93(_0x286bba))],Zn);let Qn=class extends _0x41de87{constructor(_0x1701af,_0x3e0858,_0x4854b1,_0x5ac6b7,_0x4cd37e,_0x5f203e){const _0x5a2a2a=_0x849776;super(_0x1701af,_0x3e0858,_0x4854b1,_0x5ac6b7),this[_0x5a2a2a(0x25d)]=_0x4cd37e,this['_logService']=_0x5f203e;}[_0x849776(0x314)](_0x498d28,_0x43bf41){const _0x397bb2=_0x849776;let _0x219dd7=this[_0x397bb2(0x342)](_0x498d28);if(_0x219dd7)try{let _0x5e18a4=this['_transformStack'](_0x219dd7,_0x43bf41);this[_0x397bb2(0x13a)](_0x498d28,_0x5e18a4);}catch(_0x56f379){this[_0x397bb2(0x12e)][_0x397bb2(0x2bf)](_0x397bb2(0x2d7),_0x56f379),this[_0x397bb2(0x260)](_0x498d28);}let _0x5b5b63=this[_0x397bb2(0x1e5)](_0x498d28);if(_0x5b5b63)try{let _0x33819b=this[_0x397bb2(0x15b)](_0x5b5b63,_0x43bf41);this[_0x397bb2(0x235)](_0x498d28,_0x33819b);}catch(_0x4c7699){this[_0x397bb2(0x12e)][_0x397bb2(0x2bf)](_0x4c7699),this[_0x397bb2(0x2a3)](_0x498d28);}}[_0x849776(0x260)](_0x1d4cff){const _0x2f31a4=_0x849776;let _0x228531=this['_getUndoStack'](_0x1d4cff);_0x228531&&(_0x228531[_0x2f31a4(0x298)]=0x0,this[_0x2f31a4(0x35d)]());}[_0x849776(0x2a3)](_0x8ee41c){const _0x51243b=_0x849776;let _0x23bb5c=this['_getRedoStack'](_0x8ee41c);_0x23bb5c&&(_0x23bb5c[_0x51243b(0x298)]=0x0,this[_0x51243b(0x35d)]());}['_substituteUndoStack'](_0x49ef06,_0x506da4){const _0x236721=_0x849776;this[_0x236721(0x22d)][_0x236721(0x116)](_0x49ef06,_0x506da4),this['_updateStatus']();}[_0x849776(0x235)](_0x5d3bec,_0x1e1955){const _0x1eca5d=_0x849776;this[_0x1eca5d(0x1a5)][_0x1eca5d(0x116)](_0x5d3bec,_0x1e1955),this['_updateStatus']();}['_transformStack'](_0x5d6eed,_0xde1702){const _0x4429e5=_0x849776;let _0x542f85=[],_0x4a4ea7=_0xde1702,_0x87a82a=_0xde1702;for(let _0x164fa4=_0x5d6eed[_0x4429e5(0x298)]-0x1;_0x164fa4>=0x0;_0x164fa4--){let {unitID:_0x11ee07,undoMutations:_0x2993ca,redoMutations:_0x4e06fb}=_0x5d6eed[_0x164fa4],_0x3d955c=this[_0x4429e5(0x25d)][_0x4429e5(0x26d)](_0x4a4ea7,_0x2993ca),_0x49ba74=this['_transformService'][_0x4429e5(0x26d)](_0x87a82a,_0x4e06fb);if(_0x41f763(_0x3d955c)||_0x41f763(_0x49ba74)){this[_0x4429e5(0x12e)]['error'](_0x4429e5(0x2d7),_0x4429e5(0x31c),_0x3d955c,_0x49ba74);break;}_0x4a4ea7=_0x3d955c[_0x4429e5(0x1a1)],_0x87a82a=_0x49ba74[_0x4429e5(0x1a1)],_0x542f85[_0x4429e5(0x221)]({'unitID':_0x11ee07,'undoMutations':_0x3d955c[_0x4429e5(0x278)],'redoMutations':_0x49ba74[_0x4429e5(0x278)]});}return _0x542f85[_0x4429e5(0x29a)]();}};Qn=H([V(0x0,_0x273a3b),V(0x1,_0x39bf2b),V(0x2,_0x476244),V(0x3,_0x6f8878),V(0x4,_0x4ac591),V(0x5,_0x3dc3ee)],Qn);let $n=class extends _0x4fa488{constructor(_0x5c4927=ft,_0x2470d9,_0x28b140,_0x428d1c){const _0x57f049=_0x849776;super(),this[_0x57f049(0x185)]=_0x5c4927,this[_0x57f049(0x12e)]=_0x2470d9,this[_0x57f049(0x126)]=_0x28b140,this[_0x57f049(0x123)]=_0x428d1c;let {..._0xc8a805}=_0x1bd68b({},ft,this[_0x57f049(0x185)]);if(!_0xc8a805['socketService'])throw Error(_0x57f049(0x3ac));this[_0x57f049(0x185)]=_0xc8a805,this['_configService'][_0x57f049(0x20c)](R,_0xc8a805);}[_0x849776(0x138)](){const _0x3fecd4=_0x849776;this[_0x3fecd4(0x148)](),this[_0x3fecd4(0x3b5)]();}[_0x849776(0x148)](){const _0x36fac5=_0x849776;var _0x472461,_0x77f06f;this['_injector'][_0x36fac5(0x155)](_0x1348cc)&&this[_0x36fac5(0x12e)][_0x36fac5(0x2bf)]('[UniverCollaborationClientPlugin]',_0x36fac5(0x2e9));let _0x53917c=_0x21ee89([[_0x1348cc,{'useClass':Qn}],[kn,{'useValue':An()}],[Mn],[Ot],[Wt],[Bn],[Kn],[Dt],[Xn],[B],[qn],[En,{'useClass':this[_0x36fac5(0x185)][_0x36fac5(0x219)]}],[_0x382477,{'useClass':Zn}],[_0x3e5c98,{'useClass':Vn}],[_0x4ac6c3,{'useClass':Jn}],[Ln,{'useClass':Rn}],[_0x4d90d5,{'useClass':Yn}],[Nn],[In]],(_0x472461=this[_0x36fac5(0x185)])==null?void 0x0:_0x472461[_0x36fac5(0x197)]);if(!((_0x77f06f=this[_0x36fac5(0x185)])!=null&&_0x77f06f[_0x36fac5(0x37c)])){let _0x521187=_0x53917c[_0x36fac5(0x36a)](([_0x219b3b])=>_0x219b3b===W);_0x521187!==-0x1&&_0x53917c[_0x36fac5(0x2c5)](_0x521187,0x1);}_0x116877(this['_injector'],_0x53917c);}[_0x849776(0x3b5)](){const _0x3469ee=_0x849776;var _0x9aafe8,_0x3dcf6b;if(this[_0x3469ee(0x126)]['get'](_0x286bba)[_0x3469ee(0x308)]({'priority':0x14,'interceptor':_0x323fb8({'maxParallel':0x6})}),!((_0x9aafe8=this['_config'])!=null&&_0x9aafe8[_0x3469ee(0x1bc)])){var _0x465e6f;(_0x465e6f=this[_0x3469ee(0x126)][_0x3469ee(0x203)](U,_0x5674e5['OPTIONAL']))==null||_0x465e6f[_0x3469ee(0x166)]();}(_0x3dcf6b=this['_config'])!=null&&_0x3dcf6b[_0x3469ee(0x27d)]&&_0x3ac88d(this['_injector'],[[Bn]]),_0x3ac88d(this[_0x3469ee(0x126)],[[Kn],[Nn],[Xn]]);}};z($n,_0x849776(0x206),_0x849776(0x2ca)),z($n,_0x849776(0x18d),Pn),z($n,'version',Fn),$n=H([_0x2b9643(_0xa32b50,_0x592ffd,_0x268be8),V(0x1,_0x3dc3ee),V(0x2,_0x409c93(_0x28d4d4)),V(0x3,_0x6f8878)],$n);export{Vn as AuthzIoHttpService,J as AwaitingState,Y as AwaitingWithPendingState,vn as BaseCollaborationEntity,xn as BoardCollaborationEntity,R as COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,Rn as CollaborationAttachmentIoService,Nn as CollaborationController,$ as CollaborationEntity,Jn as CollaborationImageIoService,Vt as CollaborationSession,Mn as CollaborationSessionService,On as CollaborationSocketService,pn as CollaborationStatus,Et as CollaborationUIEventId,B as CollaborationUIEventService,Qn as CollaborativeUndoRedoService,Dt as CommentService,X as ConflictState,pt as DEFAULT_COLLAB_WEB_SOCKET_URL,xt as DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT,mt as DEFAULT_WS_SESSION_TICKET_URL,qn as DataLoaderService,_n as DocCollaborationEntity,Q as FetchingMissState,ht as HEARTBEAT_INTERVAL_KEY,gt as HEARTBEAT_TIMEOUT_KEY,Ln as IAttachmentIoService,kn as ICollaborationClientAdapterService,En as ICollaborationSocketService,U as ILocalCacheService,Cn as INetworkConditionService,W as ISingleActiveUnitService,yt as LOCAL_CACHE_INTERVAL,vt as LOCAL_CACHE_INTERVAL_KEY,Ot as MemberService,Yn as MentionIoHttpService,Z as OfflineState,Sn as PdfCollaborationEntity,q as PendingState,bt as REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY,_t as RETRY_CONNECTING_MAX_COUNT_KEY,zt as SessionStatus,yn as SheetCollaborationEntity,Wt as SheetTransformSelectionsService,bn as SlideCollaborationEntity,Zn as SnapshotServerOverHTTPService,K as SyncedState,Gt as UnitStatus,$n as UniverCollaborationClientPlugin,An as createUniverCollaborationAdapter,wn as deserializeToCombResponse,Ht as getLocalCacheKey,Tn as serializeCombRequest};