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

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 (92) 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/controllers/collaboration/collaboration-entity.d.ts +6 -0
  65. package/lib/types/controllers/collaboration/collaboration-state.d.ts +3 -4
  66. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +8 -5
  67. package/lib/types/index.d.ts +2 -3
  68. package/lib/types/services/attachment-remote/attachment-io.service.d.ts +9 -4
  69. package/lib/types/services/attachment-remote/types.d.ts +2 -19
  70. package/lib/types/services/member/member.service.d.ts +2 -15
  71. package/lib/umd/facade.js +1 -1
  72. package/lib/umd/index.js +1 -1
  73. package/lib/umd/locale/ar-SA.js +1 -1
  74. package/lib/umd/locale/ca-ES.js +1 -1
  75. package/lib/umd/locale/de-DE.js +1 -1
  76. package/lib/umd/locale/en-US.js +1 -1
  77. package/lib/umd/locale/es-ES.js +1 -1
  78. package/lib/umd/locale/fa-IR.js +1 -1
  79. package/lib/umd/locale/fr-FR.js +1 -1
  80. package/lib/umd/locale/id-ID.js +1 -1
  81. package/lib/umd/locale/it-IT.js +1 -1
  82. package/lib/umd/locale/ja-JP.js +1 -1
  83. package/lib/umd/locale/ko-KR.js +1 -1
  84. package/lib/umd/locale/pl-PL.js +1 -1
  85. package/lib/umd/locale/pt-BR.js +1 -1
  86. package/lib/umd/locale/ru-RU.js +1 -1
  87. package/lib/umd/locale/sk-SK.js +1 -1
  88. package/lib/umd/locale/vi-VN.js +1 -1
  89. package/lib/umd/locale/zh-CN.js +1 -1
  90. package/lib/umd/locale/zh-HK.js +1 -1
  91. package/lib/umd/locale/zh-TW.js +1 -1
  92. package/package.json +15 -14
@@ -1 +1 @@
1
- const _0x5237e1=_0x49e3;(function(_0x1d12d8,_0xbdd493){const _0x1665d2=_0x49e3,_0x419d26=_0x1d12d8();while(!![]){try{const _0x174391=-parseInt(_0x1665d2(0x1e1))/0x1*(parseInt(_0x1665d2(0x1eb))/0x2)+-parseInt(_0x1665d2(0x1e5))/0x3*(parseInt(_0x1665d2(0x1ee))/0x4)+parseInt(_0x1665d2(0x1dd))/0x5*(-parseInt(_0x1665d2(0x1e8))/0x6)+parseInt(_0x1665d2(0x1df))/0x7*(-parseInt(_0x1665d2(0x1e2))/0x8)+-parseInt(_0x1665d2(0x1de))/0x9*(-parseInt(_0x1665d2(0x1e3))/0xa)+-parseInt(_0x1665d2(0x1da))/0xb+-parseInt(_0x1665d2(0x1d8))/0xc*(-parseInt(_0x1665d2(0x1ec))/0xd);if(_0x174391===_0xbdd493)break;else _0x419d26['push'](_0x419d26['shift']());}catch(_0x3593b7){_0x419d26['push'](_0x419d26['shift']());}}}(_0x3b30,0xa8c3e));function _0x3b30(){const _0x24ceba=['您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','5094072LixbKU','此文件協作人數已達上限,您的編輯將暫存於本機。','1170048aTROYY','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','加入協作失敗,您的編輯將暫存於本機。','3440kpioia','9SPsicX','3413032ZettuB','您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。','291UwPrzN','8LNsYnL','1546130nYHIIO','正在擷取伺服器資料...','2358AUeJYV','編輯衝突','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','8544bVJvFn','協作衝突','認證錯誤','7994Cwqrzk','104LTWQmM','同步中...','624HKFFYc','加入協作失敗,請稍後重試,您的編輯將暫存於本機。','伺服器未回應協作請求,您的編輯將儲存在本機。','由於協作房間已關閉,編輯權限已被收回。','連線失敗,請檢查您的網路。','連線失敗,將在稍後重試連線。','本機檔案'];_0x3b30=function(){return _0x24ceba;};return _0x3b30();}const e={'collaboration-client':{'collabClient':{'tooltip':{'reconnect':'點擊重新連線'}},'collabStatus':{'fetchMiss':_0x5237e1(0x1e4),'conflict':_0x5237e1(0x1e6),'notCollab':_0x5237e1(0x1d6),'synced':'已同步','syncing':_0x5237e1(0x1ed),'offline':'已離線,編輯將儲存在本機'},'session':{'connection-failed':_0x5237e1(0x1d4),'will-retry':_0x5237e1(0x1d5),'room-full':_0x5237e1(0x1d9),'join-failed':_0x5237e1(0x1ef),'room-not-exists':_0x5237e1(0x1dc),'room-permission-denied':'沒有協作權限,您的編輯將暫存於本機。','room-cnt-exceeds':'協作文件數量超過限制,您的編輯將暫存於本機。','collaboration-timeout':_0x5237e1(0x1f0)},'conflict':{'title':_0x5237e1(0x1e9),'content':_0x5237e1(0x1db)},'permission':{'title':_0x5237e1(0x1ea),'content':_0x5237e1(0x1e0)},'collaboration':{'single-unit':{'warning':_0x5237e1(0x1e7)},'closeRoom':_0x5237e1(0x1d3)},'auth':{'needGotoLoginAlert':_0x5237e1(0x1d7)}}};function _0x49e3(_0x12b466,_0x596042){_0x12b466=_0x12b466-0x1d3;const _0x3b30e7=_0x3b30();let _0x49e327=_0x3b30e7[_0x12b466];return _0x49e327;}export{e as default};
1
+ function _0x3177(_0x18b2fa,_0x235508){_0x18b2fa=_0x18b2fa-0xde;const _0x129d03=_0x129d();let _0x31779c=_0x129d03[_0x18b2fa];return _0x31779c;}function _0x129d(){const _0x273da8=['加入協作失敗,請稍後重試,您的編輯將暫存於本機。','1730448fXXCUU','3519108aZewsz','由於協作房間已關閉,編輯權限已被收回。','您的本機文件與伺服器文件存在衝突。請將您的本機編輯儲存至其他地方,因為重新整理頁面後將會遺失。','連線失敗,將在稍後重試連線。','編輯衝突','4fVKBMH','協作衝突','伺服器未回應協作請求,您的編輯將儲存在本機。','本機檔案','沒有協作權限,您的編輯將暫存於本機。','點擊重新連線','35522990YufqBi','協作文件數量超過限制,您的編輯將暫存於本機。','18JvGBEO','446019hGOIxV','702861EUrDXR','連線失敗,請檢查您的網路。','認證錯誤','已離線,編輯將儲存在本機','您在另一個分頁開啟了同一個檔案。為避免資料遺失,此分頁將無法進行編輯。','您的登入已過期,點擊「確定」重新登入,點擊「取消」儲存您的本機編輯。','5384296LSAtcM','正在擷取伺服器資料...','9HlNvNO','此文件協作人數已達上限,您的編輯將暫存於本機。','已同步','6491440hkXrzJ'];_0x129d=function(){return _0x273da8;};return _0x129d();}const _0x5d04d2=_0x3177;(function(_0x3eeeb2,_0x38a16b){const _0x3ee92d=_0x3177,_0x2545d8=_0x3eeeb2();while(!![]){try{const _0x19b52d=-parseInt(_0x3ee92d(0xe6))/0x1+parseInt(_0x3ee92d(0xec))/0x2*(parseInt(_0x3ee92d(0xf6))/0x3)+-parseInt(_0x3ee92d(0xe7))/0x4+-parseInt(_0x3ee92d(0xe4))/0x5+-parseInt(_0x3ee92d(0xf4))/0x6*(-parseInt(_0x3ee92d(0xf5))/0x7)+parseInt(_0x3ee92d(0xdf))/0x8+parseInt(_0x3ee92d(0xe1))/0x9*(parseInt(_0x3ee92d(0xf2))/0xa);if(_0x19b52d===_0x38a16b)break;else _0x2545d8['push'](_0x2545d8['shift']());}catch(_0x174d72){_0x2545d8['push'](_0x2545d8['shift']());}}}(_0x129d,0xee6a4));const e={'collaboration-client':{'collabClient':{'tooltip':{'reconnect':_0x5d04d2(0xf1)}},'collabStatus':{'fetchMiss':_0x5d04d2(0xe0),'conflict':_0x5d04d2(0xeb),'notCollab':_0x5d04d2(0xef),'synced':_0x5d04d2(0xe3),'syncing':'同步中...','offline':_0x5d04d2(0xf9)},'session':{'connection-failed':_0x5d04d2(0xf7),'will-retry':_0x5d04d2(0xea),'room-full':_0x5d04d2(0xe2),'join-failed':_0x5d04d2(0xe5),'room-not-exists':'加入協作失敗,您的編輯將暫存於本機。','room-permission-denied':_0x5d04d2(0xf0),'room-cnt-exceeds':_0x5d04d2(0xf3),'collaboration-timeout':_0x5d04d2(0xee)},'conflict':{'title':_0x5d04d2(0xed),'content':_0x5d04d2(0xe9)},'permission':{'title':_0x5d04d2(0xf8),'content':'您的操作與伺服器權限存在衝突。請將您的本機編輯儲存至其他地方,重新整理頁面後將會被捨棄。'},'collaboration':{'single-unit':{'warning':_0x5d04d2(0xfa)},'closeRoom':_0x5d04d2(0xe8)},'auth':{'needGotoLoginAlert':_0x5d04d2(0xde)}}};export{e as default};
@@ -114,3 +114,9 @@ export declare class BoardCollaborationEntity extends CollaborationEntity {
114
114
  constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
115
115
  protected _init(): Promise<CollaborationState>;
116
116
  }
117
+ export declare class PdfCollaborationEntity extends CollaborationEntity {
118
+ readonly unitID: string;
119
+ readonly type: UniverInstanceType;
120
+ constructor(unitID: string, type: UniverInstanceType, session: CollaborationSession, injector: Injector, compressMutationService: CompressMutationService, localeService: LocaleService, revisionService: RevisionService, eventService: CollaborationUIEventService, univerInstanceService: IUniverInstanceService, logService: ILogService, commandService: ICommandService, permissionService: IPermissionService, singleActiveUnitService?: ISingleActiveUnitService, localCacheService?: ILocalCacheService);
121
+ protected _init(): Promise<CollaborationState>;
122
+ }
@@ -3,10 +3,9 @@ import type { IMutationInfo, Nullable } from '@univerjs/core';
3
3
  import type { Observable } from 'rxjs';
4
4
  import type { ICollaborativeUndoRedoService } from '../../services/undoredo/collaborative-undoredo.service';
5
5
  import { ITransformService, RevisionService } from '@univerjs-pro/collaboration';
6
- import { ICommandService, IConfigService, ILogService, Injector, IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType } from '@univerjs/core';
6
+ import { ICommandService, IConfigService, ILogService, Injector, IPermissionService, IUniverInstanceService, LocaleService, UniverInstanceType, UserManagerService } from '@univerjs/core';
7
7
  import { CollaborationUIEventService } from '../../services/collaboration-ui-event/collaboration-ui-event';
8
8
  import { ILocalCacheService } from '../../services/local-cache/local-cache.service';
9
- import { MemberService } from '../../services/member/member.service';
10
9
  /** Provide both states when and after changing, so the parent could examine if state transition is correct. */
11
10
  export type StateChangeHandler = (before: CollaborationState, after: CollaborationState) => void;
12
11
  /** A network interface to send changeset and */
@@ -140,7 +139,7 @@ export declare class SyncedState extends CollaborationState {
140
139
  */
141
140
  export declare class PendingState extends CollaborationState {
142
141
  private readonly _injector;
143
- private readonly _memberService;
142
+ private readonly _userManagerService;
144
143
  private readonly _logService;
145
144
  private readonly _configService;
146
145
  private readonly _transformService;
@@ -148,7 +147,7 @@ export declare class PendingState extends CollaborationState {
148
147
  readonly status = CollaborationStatus.PENDING;
149
148
  private _scheduleCompleteTimestamp;
150
149
  private _sendingTimer;
151
- constructor(unitID: string, type: UniverInstanceType, pendingMutations: IMutationInfo[], handler: ICollaborationStateHandler, _injector: Injector, _revisionService: RevisionService, _memberService: MemberService, _logService: ILogService, commandService: ICommandService, _configService: IConfigService, _transformService: ITransformService, _univerInstanceService: IUniverInstanceService, _undoRedoService: ICollaborativeUndoRedoService, _localCacheService?: ILocalCacheService);
150
+ constructor(unitID: string, type: UniverInstanceType, pendingMutations: IMutationInfo[], handler: ICollaborationStateHandler, _injector: Injector, _revisionService: RevisionService, _userManagerService: UserManagerService, _logService: ILogService, commandService: ICommandService, _configService: IConfigService, _transformService: ITransformService, _univerInstanceService: IUniverInstanceService, _undoRedoService: ICollaborativeUndoRedoService, _localCacheService?: ILocalCacheService);
152
151
  appendMutation(mutation: IMutationInfo): CollaborationState;
153
152
  onRemoteChangeset(changeset: IChangeset): CollaborationState;
154
153
  onRemoteAck(changeset: IAcknowledgedChangeset): CollaborationState;
@@ -1,7 +1,6 @@
1
1
  import type { IChangeset, RevisionService } from '@univerjs-pro/collaboration';
2
- import type { IMutationInfo, IUniverInstanceService } from '@univerjs/core';
2
+ import type { IMutationInfo, IUniverInstanceService, UserManagerService } from '@univerjs/core';
3
3
  import type { Observable } from 'rxjs';
4
- import type { MemberService } from '../../../services/member/member.service';
5
4
  export interface IAssembledChangeset {
6
5
  changeset: IChangeset;
7
6
  pendingMutations: IMutationInfo[];
@@ -17,7 +16,11 @@ export declare function isSplitChunkMutation(mutation: IMutationInfo): boolean;
17
16
  export declare const SINGLE_CHANGESET_MUTATIONS: Set<string>;
18
17
  export declare const SLIDE_SINGLE_CHANGESET_MUTATIONS: Set<string>;
19
18
  export declare function takeMutationsForChangeset(pendingMutations: IMutationInfo[], singleChangesetMutations?: Set<string>): IMutationInfo[];
20
- export declare function assembleMutationChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
21
- export declare function assembleSlideChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
22
- export declare function assembleDocChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, memberService: MemberService): IAssembledChangeset;
19
+ export declare function assembleMutationChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, userManagerService: UserManagerService): IAssembledChangeset;
20
+ export declare const assembleSheetChangeset: typeof assembleMutationChangeset;
21
+ export declare const assembleBoardChangeset: typeof assembleMutationChangeset;
22
+ export declare const assemblePdfChangeset: typeof assembleMutationChangeset;
23
+ export declare function assembleBaseChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, userManagerService: UserManagerService): IAssembledChangeset;
24
+ export declare function assembleSlideChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, userManagerService: UserManagerService): IAssembledChangeset;
25
+ export declare function assembleDocChangeset(pendingMutations: IMutationInfo[], unitID: string, univerInstanceService: IUniverInstanceService, revisionService: RevisionService, userManagerService: UserManagerService): IAssembledChangeset;
23
26
  export declare function createTimerObservable$<T>(ms: number, options: T): Observable<T>;
@@ -2,14 +2,13 @@ export { DEFAULT_WS_SESSION_TICKET_URL, HEARTBEAT_INTERVAL_KEY, HEARTBEAT_TIMEOU
2
2
  export { DEFAULT_COLLAB_WEB_SOCKET_URL, DEFAULT_REMOTE_UNISCRIPT_EXECUTION_ENDPOINT, REMOTE_UNISCRIPT_EXECUTION_ENDPOINT_KEY, } from './config/config';
3
3
  export type { IUniverCollaborationClientConfig } from './config/config';
4
4
  export { COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY } from './config/config';
5
- export { BaseCollaborationEntity, BoardCollaborationEntity, CollaborationEntity, DocCollaborationEntity, SheetCollaborationEntity, SlideCollaborationEntity, } from './controllers/collaboration/collaboration-entity';
5
+ export { BaseCollaborationEntity, BoardCollaborationEntity, CollaborationEntity, DocCollaborationEntity, PdfCollaborationEntity, SheetCollaborationEntity, SlideCollaborationEntity, } from './controllers/collaboration/collaboration-entity';
6
6
  export type { IDocCollaborationEntityCallback } from './controllers/collaboration/collaboration-entity';
7
7
  export { AwaitingState, AwaitingWithPendingState, CollaborationStatus, ConflictState, FetchingMissState, OfflineState, PendingState, SyncedState, } from './controllers/collaboration/collaboration-state';
8
8
  export { CollaborationController } from './controllers/collaboration/collaboration.controller';
9
9
  export { UniverCollaborationClientPlugin } from './plugin';
10
10
  export { CollaborationAttachmentIoService, IAttachmentIoService, } from './services/attachment-remote/attachment-io.service';
11
- export { AttachmentSourceType } from './services/attachment-remote/types';
12
- export type { AttachmentValue, IAttachmentUploadOptions, IAttachmentValue, } from './services/attachment-remote/types';
11
+ export type { IAttachmentUploadOptions, } from './services/attachment-remote/types';
13
12
  export { AuthzIoHttpService } from './services/auth-server/authz-io-http.service';
14
13
  export { createUniverCollaborationAdapter, ICollaborationClientAdapterService, } from './services/collaboration-session/collaboration-client-adapter';
15
14
  export type { ICollaborationAdapterResolveContext, ICollaborationAdapterTransformContext, ICollaborationChangesetAdapter, ICollaborationClientAdapter, ICollaborationSessionIdentity, ICollaborationTarget, ICollaborationUnitResolution, ICreateUniverCollaborationAdapterOptions, } from './services/collaboration-session/collaboration-client-adapter';
@@ -1,9 +1,11 @@
1
- import type { IAttachmentUploadOptions, IAttachmentValue } from './types';
2
- import { IConfigService, IUniverInstanceService } from '@univerjs/core';
1
+ import type { IBaseAttachment } from '@univerjs/core';
2
+ import type { IAttachmentUploadOptions } from './types';
3
+ import { IConfigService, ImageSourceType, IUniverInstanceService } from '@univerjs/core';
3
4
  import { HTTPService } from '@univerjs/network';
4
5
  export interface IAttachmentIoService {
5
6
  getUploadOptions(): IAttachmentUploadOptions;
6
- saveAttachment(file: File): Promise<IAttachmentValue>;
7
+ saveAttachment(file: File): Promise<IBaseAttachment>;
8
+ getAttachmentUrl(source: string, sourceType: ImageSourceType): Promise<string>;
7
9
  }
8
10
  export declare const IAttachmentIoService: import("@wendellhu/redi").IdentifierDecorator<IAttachmentIoService>;
9
11
  export declare class CollaborationAttachmentIoService implements IAttachmentIoService {
@@ -12,8 +14,11 @@ export declare class CollaborationAttachmentIoService implements IAttachmentIoSe
12
14
  private readonly _univerInstanceService;
13
15
  constructor(_httpService: HTTPService, _configService: IConfigService, _univerInstanceService: IUniverInstanceService);
14
16
  getUploadOptions(): IAttachmentUploadOptions;
15
- saveAttachment(file: File): Promise<IAttachmentValue>;
17
+ saveAttachment(file: File): Promise<IBaseAttachment>;
18
+ getAttachmentUrl(source: string, sourceType: ImageSourceType): Promise<string>;
16
19
  private _upload;
17
20
  private _getUploadFileURL;
21
+ private _getSignURL;
22
+ private _getDownloadEndpointURL;
18
23
  private _getConfig;
19
24
  }
@@ -1,23 +1,6 @@
1
- export declare enum AttachmentSourceType {
2
- URL = "URL",
3
- UUID = "UUID",
4
- BASE64 = "BASE64"
5
- }
6
- export interface IAttachmentValue {
7
- id: string;
8
- name: string;
9
- mimeType?: string;
10
- size?: number;
11
- width?: number;
12
- height?: number;
13
- sourceType?: AttachmentSourceType;
14
- source?: string;
15
- base64?: string;
16
- thumbnail?: string;
17
- }
18
- export type AttachmentValue = IAttachmentValue;
1
+ import type { IBaseAttachment } from '@univerjs/core';
19
2
  export interface IAttachmentUploadOptions {
20
3
  accept?: string[];
21
4
  maxSize?: number;
22
- upload?: (file: File) => Promise<IAttachmentValue>;
5
+ upload?: (file: File) => Promise<IBaseAttachment>;
23
6
  }
@@ -1,28 +1,15 @@
1
- import type { Nullable } from '@univerjs/core';
2
1
  import type { IMember } from '@univerjs/protocol';
3
2
  import type { Observable } from 'rxjs';
4
- import { Disposable, IUniverInstanceService, UserManagerService } from '@univerjs/core';
5
- export interface IUser extends IMember {
6
- userID: string;
7
- }
3
+ import { Disposable, IUniverInstanceService } from '@univerjs/core';
8
4
  /**
9
5
  * This services manages members is each rooms.
10
6
  */
11
7
  export declare class MemberService extends Disposable {
12
8
  private readonly _univerInstanceService;
13
- private _userManagerService;
14
9
  private _roomMembers;
15
10
  private readonly _roomCreated$;
16
- constructor(_univerInstanceService: IUniverInstanceService, _userManagerService: UserManagerService);
11
+ constructor(_univerInstanceService: IUniverInstanceService);
17
12
  waitForRoom$(unitId: string): Observable<RoomMember>;
18
- /**
19
- * @deprecated please use userManagerService
20
- */
21
- setCurrentUser(user: IUser): void;
22
- /**
23
- * @deprecated please use userManagerService
24
- */
25
- getCurrentUser(): Nullable<IUser>;
26
13
  /**
27
14
  * Update a member in a room(unit).
28
15
  * @param roomID i.e. unitID.
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x5ce8(_0x3c0202,_0x2aacdf){_0x3c0202=_0x3c0202-0x13a;const _0x9406c1=_0x9406();let _0x5ce815=_0x9406c1[_0x3c0202];return _0x5ce815;}(function(_0x50c998,_0x387dc9){const _0x29d750=_0x5ce8,_0x1871f7=_0x50c998();while(!![]){try{const _0x338d61=parseInt(_0x29d750(0x166))/0x1*(-parseInt(_0x29d750(0x16b))/0x2)+parseInt(_0x29d750(0x148))/0x3+parseInt(_0x29d750(0x180))/0x4+parseInt(_0x29d750(0x162))/0x5+-parseInt(_0x29d750(0x13a))/0x6*(parseInt(_0x29d750(0x13b))/0x7)+parseInt(_0x29d750(0x196))/0x8*(-parseInt(_0x29d750(0x15d))/0x9)+parseInt(_0x29d750(0x151))/0xa;if(_0x338d61===_0x387dc9)break;else _0x1871f7['push'](_0x1871f7['shift']());}catch(_0x42c1c5){_0x1871f7['push'](_0x1871f7['shift']());}}}(_0x9406,0xf122d),function(_0x324eb4,_0x399342){const _0x2a4996=_0x5ce8;typeof exports==_0x2a4996(0x193)&&typeof module<'u'?_0x399342(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('@univerjs-pro/collaboration'),require('rxjs')):typeof define==_0x2a4996(0x18d)&&define['amd']?define([_0x2a4996(0x157),_0x2a4996(0x182),'@univerjs/core/facade',_0x2a4996(0x15a),'@univerjs-pro/collaboration',_0x2a4996(0x169)],_0x399342):(_0x324eb4=typeof globalThis<'u'?globalThis:_0x324eb4||self,_0x399342(_0x324eb4[_0x2a4996(0x153)]={},_0x324eb4[_0x2a4996(0x186)],_0x324eb4[_0x2a4996(0x192)],_0x324eb4[_0x2a4996(0x155)],_0x324eb4['UniverProCollaboration'],_0x324eb4[_0x2a4996(0x169)]));}(this,function(_0x2ad3e0,_0x274cb9,_0x214643,_0x40ace1,_0x854810,_0x4446bf){const _0x290f33=_0x5ce8;Object['defineProperty'](_0x2ad3e0,Symbol[_0x290f33(0x16a)],{'value':_0x290f33(0x171)});var _0x1236db=class extends _0x214643[_0x290f33(0x140)]{get[_0x290f33(0x18e)](){const _0x1d663d=_0x290f33;return _0x274cb9[_0x1d663d(0x18e)];}};_0x214643[_0x290f33(0x140)][_0x290f33(0x181)](_0x1236db);var _0x344813=class extends _0x214643[_0x290f33(0x170)]{get[_0x290f33(0x163)](){const _0x517f31=_0x290f33;return _0x517f31(0x163);}};_0x214643[_0x290f33(0x170)][_0x290f33(0x181)](_0x344813);function _0x400bb1(_0x22e9e6,_0x4272aa){return function(_0x3ecd27,_0x2938b8){_0x4272aa(_0x3ecd27,_0x2938b8,_0x22e9e6);};}function _0x412e62(_0x28a883,_0x4f53cb,_0x287aa1,_0x492a8a){const _0x44cf70=_0x290f33;var _0x1518f4=arguments[_0x44cf70(0x15f)],_0x4857d1=_0x1518f4<0x3?_0x4f53cb:_0x492a8a===null?_0x492a8a=Object[_0x44cf70(0x17e)](_0x4f53cb,_0x287aa1):_0x492a8a,_0x5d6d2a;if(typeof Reflect==_0x44cf70(0x193)&&typeof Reflect[_0x44cf70(0x17a)]==_0x44cf70(0x18d))_0x4857d1=Reflect[_0x44cf70(0x17a)](_0x28a883,_0x4f53cb,_0x287aa1,_0x492a8a);else{for(var _0x523ef9=_0x28a883['length']-0x1;_0x523ef9>=0x0;_0x523ef9--)(_0x5d6d2a=_0x28a883[_0x523ef9])&&(_0x4857d1=(_0x1518f4<0x3?_0x5d6d2a(_0x4857d1):_0x1518f4>0x3?_0x5d6d2a(_0x4f53cb,_0x287aa1,_0x4857d1):_0x5d6d2a(_0x4f53cb,_0x287aa1))||_0x4857d1);}return _0x1518f4>0x3&&_0x4857d1&&Object[_0x44cf70(0x141)](_0x4f53cb,_0x287aa1,_0x4857d1),_0x4857d1;}let _0x13d212=class extends _0x214643['FBase']{constructor(_0x334640,_0x51ed3c,_0x4136d1,_0xd3fe3a,_0x37d03c){const _0x25b7f3=_0x290f33;super(),this[_0x25b7f3(0x198)]=_0x334640,this['_injector']=_0x51ed3c,this[_0x25b7f3(0x172)]=_0x4136d1,this[_0x25b7f3(0x13d)]=_0xd3fe3a,this[_0x25b7f3(0x15e)]=_0x37d03c;}async[_0x290f33(0x179)](_0x1ef8eb,_0x9665e3){const _0x49a6fe=_0x290f33;return await this[_0x49a6fe(0x13d)][_0x49a6fe(0x187)](_0x1ef8eb,0x0,_0x9665e3)?(await this['_collaborationController'][_0x49a6fe(0x154)](_0x1ef8eb),this[_0x49a6fe(0x198)]['getWorkbook'](_0x1ef8eb)):null;}async['loadDocAsync'](_0x11069c,_0x47dcba){const _0xc189cf=_0x290f33;return await this[_0xc189cf(0x13d)][_0xc189cf(0x168)](_0x11069c,0x0,_0x47dcba)?(await this[_0xc189cf(0x15e)]['readyForCollab'](_0x11069c),this[_0xc189cf(0x198)]['getDocument'](_0x11069c)):null;}async['loadBaseAsync'](_0x52849c,_0x243a1a){const _0x5a5dea=_0x290f33;return await this['_snapshotService'][_0x5a5dea(0x14f)](_0x52849c,0x0,_0x243a1a)?(await this['_collaborationController'][_0x5a5dea(0x154)](_0x52849c),this[_0x5a5dea(0x198)][_0x5a5dea(0x190)](_0x52849c)):null;}async[_0x290f33(0x146)](_0x1c5659,_0x115da4){const _0x3a0272=_0x290f33;return await this[_0x3a0272(0x13d)][_0x3a0272(0x17c)](_0x1c5659,0x0,_0x115da4)?(await this[_0x3a0272(0x15e)][_0x3a0272(0x154)](_0x1c5659),this['_handler']['getPresentation'](_0x1c5659)):null;}async[_0x290f33(0x156)](_0x2e8506,_0x1179b6){const _0x27eff4=_0x290f33;return await this['_snapshotService']['loadBoard'](_0x2e8506,0x0,_0x1179b6)?(await this[_0x27eff4(0x15e)][_0x27eff4(0x154)](_0x2e8506),this[_0x27eff4(0x198)][_0x27eff4(0x194)](_0x2e8506)):null;}[_0x290f33(0x15b)](_0x58725f,_0x35d17f){const _0x3d0a6a=_0x290f33;return(0x0,_0x40ace1[_0x3d0a6a(0x147)])(this[_0x3d0a6a(0x158)][_0x3d0a6a(0x160)](_0x274cb9['MemberService'])[_0x3d0a6a(0x152)](_0x58725f)[_0x3d0a6a(0x145)]((0x0,_0x4446bf['switchMap'])(_0x43a3b1=>_0x43a3b1[_0x3d0a6a(0x175)]))['subscribe'](_0x529da2=>_0x35d17f(Array['from'](_0x529da2['values']()))));}[_0x290f33(0x142)](_0xd664ca){const _0x57eb8e=_0x290f33;var _0x1644ba;let _0x4a23c6=this[_0x57eb8e(0x176)](_0xd664ca);if(!_0x4a23c6)return _0x274cb9['CollaborationStatus'][_0x57eb8e(0x188)];let _0x30c8b0=this[_0x57eb8e(0x15e)][_0x57eb8e(0x16c)](_0x4a23c6);return(_0x1644ba=_0x30c8b0==null?void 0x0:_0x30c8b0[_0x57eb8e(0x189)][_0x57eb8e(0x13f)])==null?_0x274cb9[_0x57eb8e(0x18e)]['NOT_COLLAB']:_0x1644ba;}[_0x290f33(0x16e)](_0x1e0091,_0x42b693={}){const _0x1ca344=_0x290f33;var _0x14b064;let _0x328e60=this[_0x1ca344(0x176)](_0x1e0091);if(!_0x328e60)return Promise[_0x1ca344(0x14d)](Error(_0x1ca344(0x185)));let _0x4a2deb=this[_0x1ca344(0x15e)][_0x1ca344(0x16c)](_0x328e60);if(!_0x4a2deb)return Promise['reject'](Error('[FCollaboration]:\x20Unit\x20\x22'+_0x328e60+'\x22\x20is\x20not\x20in\x20collaboration\x20mode.'));let _0x1e6446=_0x4a2deb[_0x1ca344(0x189)][_0x1ca344(0x13f)];if(_0x1e6446===_0x274cb9[_0x1ca344(0x18e)][_0x1ca344(0x15c)])return Promise[_0x1ca344(0x197)]();let _0x3b3872=_0x3d7ee6(_0x328e60,_0x1e6446);if(_0x3b3872)return Promise[_0x1ca344(0x14d)](_0x3b3872);let _0x3aaadb=(_0x14b064=_0x42b693[_0x1ca344(0x161)])==null?0x7530:_0x14b064;return new Promise((_0xb830fa,_0x35fd49)=>{let _0x192106=!0x1,_0x1b0e9b=null,_0x33242d=setTimeout(()=>{const _0x587758=_0x5ce8;_0x192106=!0x0,_0x1b0e9b==null||_0x1b0e9b[_0x587758(0x195)](),_0x35fd49(Error('[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22'+_0x328e60+_0x587758(0x177)+_0x3aaadb+_0x587758(0x16d)));},_0x3aaadb),_0x46dd3d=()=>{_0x192106=!0x0,clearTimeout(_0x33242d),_0x1b0e9b==null||_0x1b0e9b['unsubscribe']();};_0x1b0e9b=_0x4a2deb['status$']['subscribe'](_0x2a1912=>{const _0x5a56f4=_0x5ce8;if(_0x192106)return;if(_0x2a1912===_0x274cb9[_0x5a56f4(0x18e)]['SYNCED']){_0x46dd3d(),_0xb830fa();return;}let _0x44f258=_0x3d7ee6(_0x328e60,_0x2a1912);_0x44f258&&(_0x46dd3d(),_0x35fd49(_0x44f258));});});}[_0x290f33(0x176)](_0x47cc17){const _0x56b6a4=_0x290f33;var _0x430252;return _0x47cc17||((_0x430252=this[_0x56b6a4(0x172)][_0x56b6a4(0x17b)]())==null?void 0x0:_0x430252[_0x56b6a4(0x167)]());}};_0x13d212=_0x412e62([_0x400bb1(0x1,(0x0,_0x40ace1[_0x290f33(0x14c)])(_0x40ace1[_0x290f33(0x159)])),_0x400bb1(0x2,_0x40ace1[_0x290f33(0x150)]),_0x400bb1(0x3,(0x0,_0x40ace1[_0x290f33(0x14c)])(_0x854810[_0x290f33(0x174)])),_0x400bb1(0x4,(0x0,_0x40ace1[_0x290f33(0x14c)])(_0x274cb9[_0x290f33(0x144)]))],_0x13d212);function _0x3d7ee6(_0x4af481,_0xb4094c){const _0x4e7f5d=_0x290f33;return _0xb4094c===_0x274cb9[_0x4e7f5d(0x18e)][_0x4e7f5d(0x184)]||_0xb4094c===_0x274cb9[_0x4e7f5d(0x18e)][_0x4e7f5d(0x188)]?Error(_0x4e7f5d(0x14e)+_0x4af481+_0x4e7f5d(0x143)+_0xb4094c+'.'):null;}var _0x14683d=class extends _0x214643[_0x290f33(0x13e)]{[_0x290f33(0x18c)](_0x59c4b6){const _0x42baa0=_0x290f33;let _0x195c56=_0x59c4b6[_0x42baa0(0x160)](_0x274cb9[_0x42baa0(0x144)]);this[_0x42baa0(0x16f)](this[_0x42baa0(0x178)](this[_0x42baa0(0x199)][_0x42baa0(0x163)],()=>{const _0x5d67ad=_0x42baa0;let _0x273adb=new _0x40ace1[(_0x5d67ad(0x14b))](),_0xd3f7a8=_0x195c56[_0x5d67ad(0x18b)][_0x5d67ad(0x18a)](_0x4f8d64=>{const _0x248d83=_0x5d67ad;let _0x4d73d3=_0x4f8d64[_0x248d83(0x164)][_0x248d83(0x18a)](_0x433c06=>{const _0x384dfb=_0x248d83;let _0x1635da={'unitId':_0x4f8d64[_0x384dfb(0x173)],'status':_0x433c06};this[_0x384dfb(0x149)](this['Event']['CollaborationStatusChanged'],_0x1635da);});_0x273adb['add']((0x0,_0x40ace1['toDisposable'])(_0x4d73d3));});return _0x273adb['add']((0x0,_0x40ace1[_0x5d67ad(0x147)])(_0xd3f7a8)),_0x273adb;}));}[_0x290f33(0x18f)](){const _0x498edf=_0x290f33;return this[_0x498edf(0x158)][_0x498edf(0x183)](_0x13d212,{'getWorkbook':_0x5d3ce3=>this['getWorkbook'](_0x5d3ce3),'getDocument':_0xce64a9=>this[_0x498edf(0x17d)](_0xce64a9),'getPresentation':_0x57a031=>this['getPresentation'](_0x57a031),'getBase':_0xbc8740=>this[_0x498edf(0x190)](_0xbc8740),'getBoard':_0x4a32b0=>this['getBoard'](_0x4a32b0)});}[_0x290f33(0x13c)](_0x592622,_0x58c245,_0x8aeb07){const _0x4b856d=_0x290f33;return this[_0x4b856d(0x158)]['get'](_0x274cb9[_0x4b856d(0x165)])['loadUnit'](_0x592622,_0x58c245,_0x8aeb07);}[_0x290f33(0x17f)](_0x25198e,_0x47b054,_0x40e3f4){const _0x3a97e7=_0x290f33;return this[_0x3a97e7(0x158)]['get'](_0x274cb9[_0x3a97e7(0x165)])[_0x3a97e7(0x191)](_0x25198e,_0x47b054,_0x40e3f4);}};_0x214643[_0x290f33(0x13e)][_0x290f33(0x181)](_0x14683d),Object[_0x290f33(0x141)](_0x2ad3e0,_0x290f33(0x14a),{'enumerable':!0x0,'get':function(){return _0x13d212;}});}));function _0x9406(){const _0x75c2ae=['loadSlide','getDocument','getOwnPropertyDescriptor','loadServerUnitOfRevision','4104044RepPHk','extend','@univerjs-pro/collaboration-client','createInstance','CONFLICT','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','UniverProCollaborationClient','loadSheet','NOT_COLLAB','state','subscribe','entityInit$','_initialize','function','CollaborationStatus','getCollaboration','getBase','loadUnitOfRevision','UniverCoreFacade','object','getBoard','unsubscribe','4478672iGGqpV','resolve','_handler','Event','42ywmgqi','1759611fkcWPJ','loadServerUnit','_snapshotService','FUniver','status','FEnum','defineProperty','getCollaborationStatus','\x22\x20while\x20collaboration\x20status\x20is\x20','CollaborationController','pipe','loadSlideAsync','toDisposable','3796809zczrdy','fireEvent','FCollaboration','DisposableCollection','Inject','reject','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','loadBase','IUniverInstanceService','6307640aqOetc','waitForRoom$','UniverProCollaborationClientFacade','readyForCollab','UniverCore','loadBoardAsync','exports','_injector','Injector','@univerjs/core','subscribeCollaborators','SYNCED','9wjsjnA','_collaborationController','length','get','timeout','9583740NMUYsP','CollaborationStatusChanged','status$','DataLoaderService','1qMWARm','getUnitId','loadDoc','rxjs','toStringTag','3063976sZcfjl','getCollabEntity','ms.','flush','disposeWithMe','FEventName','Module','_univerInstanceService','unitID','SnapshotService','members$','_resolveUnitId','\x22\x20after\x20','registerEventHandler','loadSheetAsync','decorate','getFocusedUnit'];_0x9406=function(){return _0x75c2ae;};return _0x9406();}
1
+ function _0x51f1(_0x428df8,_0x4a71c3){_0x428df8=_0x428df8-0x110;const _0xb3f346=_0xb3f3();let _0x51f1d4=_0xb3f346[_0x428df8];return _0x51f1d4;}(function(_0x261889,_0x5271bb){const _0x1ef0ea=_0x51f1,_0x10f931=_0x261889();while(!![]){try{const _0x13a1a5=parseInt(_0x1ef0ea(0x154))/0x1*(-parseInt(_0x1ef0ea(0x122))/0x2)+parseInt(_0x1ef0ea(0x168))/0x3+parseInt(_0x1ef0ea(0x15c))/0x4*(-parseInt(_0x1ef0ea(0x138))/0x5)+parseInt(_0x1ef0ea(0x115))/0x6+parseInt(_0x1ef0ea(0x130))/0x7+-parseInt(_0x1ef0ea(0x159))/0x8+parseInt(_0x1ef0ea(0x136))/0x9;if(_0x13a1a5===_0x5271bb)break;else _0x10f931['push'](_0x10f931['shift']());}catch(_0x38cc1e){_0x10f931['push'](_0x10f931['shift']());}}}(_0xb3f3,0x2e26a),function(_0x5d8111,_0x24b5ae){const _0x5d1113=_0x51f1;typeof exports=='object'&&typeof module<'u'?_0x24b5ae(exports,require('@univerjs-pro/collaboration-client'),require('@univerjs/core/facade'),require('@univerjs/core'),require('@univerjs-pro/collaboration'),require('rxjs')):typeof define==_0x5d1113(0x169)&&define[_0x5d1113(0x132)]?define([_0x5d1113(0x140),_0x5d1113(0x13c),_0x5d1113(0x139),_0x5d1113(0x14b),_0x5d1113(0x16e),'rxjs'],_0x24b5ae):(_0x5d8111=typeof globalThis<'u'?globalThis:_0x5d8111||self,_0x24b5ae(_0x5d8111[_0x5d1113(0x14c)]={},_0x5d8111['UniverProCollaborationClient'],_0x5d8111['UniverCoreFacade'],_0x5d8111[_0x5d1113(0x150)],_0x5d8111['UniverProCollaboration'],_0x5d8111[_0x5d1113(0x13b)]));}(this,function(_0x522e94,_0xdda150,_0x4f7f51,_0x423b42,_0x5934e5,_0x29f433){const _0x3bf646=_0x51f1;Object[_0x3bf646(0x160)](_0x522e94,Symbol['toStringTag'],{'value':_0x3bf646(0x163)});var _0x487f2f=class extends _0x4f7f51[_0x3bf646(0x110)]{get[_0x3bf646(0x16f)](){const _0xb979c8=_0x3bf646;return _0xdda150[_0xb979c8(0x16f)];}};_0x4f7f51[_0x3bf646(0x110)][_0x3bf646(0x117)](_0x487f2f);var _0x51b9fb=class extends _0x4f7f51[_0x3bf646(0x162)]{get['CollaborationStatusChanged'](){const _0xf4d7e0=_0x3bf646;return _0xf4d7e0(0x112);}};_0x4f7f51[_0x3bf646(0x162)][_0x3bf646(0x117)](_0x51b9fb);function _0x47a05f(_0x5a13d9,_0x55d0bc){return function(_0x2efdbd,_0x1ab8af){_0x55d0bc(_0x2efdbd,_0x1ab8af,_0x5a13d9);};}function _0x3a9dd8(_0x3c8730,_0x1d7ffb,_0x40a554,_0x5c6e85){const _0x691bfa=_0x3bf646;var _0x1bc063=arguments[_0x691bfa(0x113)],_0x56a92f=_0x1bc063<0x3?_0x1d7ffb:_0x5c6e85===null?_0x5c6e85=Object['getOwnPropertyDescriptor'](_0x1d7ffb,_0x40a554):_0x5c6e85,_0x173f34;if(typeof Reflect==_0x691bfa(0x16d)&&typeof Reflect['decorate']=='function')_0x56a92f=Reflect['decorate'](_0x3c8730,_0x1d7ffb,_0x40a554,_0x5c6e85);else{for(var _0x13de7e=_0x3c8730[_0x691bfa(0x113)]-0x1;_0x13de7e>=0x0;_0x13de7e--)(_0x173f34=_0x3c8730[_0x13de7e])&&(_0x56a92f=(_0x1bc063<0x3?_0x173f34(_0x56a92f):_0x1bc063>0x3?_0x173f34(_0x1d7ffb,_0x40a554,_0x56a92f):_0x173f34(_0x1d7ffb,_0x40a554))||_0x56a92f);}return _0x1bc063>0x3&&_0x56a92f&&Object[_0x691bfa(0x160)](_0x1d7ffb,_0x40a554,_0x56a92f),_0x56a92f;}let _0x5ca87b=class extends _0x4f7f51[_0x3bf646(0x15a)]{constructor(_0x1e018c,_0x55d7b9,_0x23ebf1,_0x29d35a,_0x29d176){const _0x44e959=_0x3bf646;super(),this[_0x44e959(0x12d)]=_0x1e018c,this[_0x44e959(0x111)]=_0x55d7b9,this[_0x44e959(0x118)]=_0x23ebf1,this[_0x44e959(0x158)]=_0x29d35a,this['_collaborationController']=_0x29d176;}async[_0x3bf646(0x14d)](_0x53c2a3,_0x4b7f75){const _0x3266c4=_0x3bf646;return await this[_0x3266c4(0x158)][_0x3266c4(0x13d)](_0x53c2a3,0x0,_0x4b7f75)?(await this[_0x3266c4(0x129)][_0x3266c4(0x147)](_0x53c2a3),this[_0x3266c4(0x12d)][_0x3266c4(0x116)](_0x53c2a3)):null;}async[_0x3bf646(0x15f)](_0x2f275e,_0x2ff08a){const _0x2cc2b2=_0x3bf646;return await this[_0x2cc2b2(0x158)]['loadDoc'](_0x2f275e,0x0,_0x2ff08a)?(await this[_0x2cc2b2(0x129)][_0x2cc2b2(0x147)](_0x2f275e),this['_handler'][_0x2cc2b2(0x151)](_0x2f275e)):null;}async[_0x3bf646(0x121)](_0x112861,_0x39aec5){const _0x533769=_0x3bf646;return await this[_0x533769(0x158)][_0x533769(0x114)](_0x112861,0x0,_0x39aec5)?(await this[_0x533769(0x129)][_0x533769(0x147)](_0x112861),this['_handler'][_0x533769(0x12f)](_0x112861)):null;}async[_0x3bf646(0x13a)](_0x1ef4d3,_0xfc36b0){const _0x442b91=_0x3bf646;return await this[_0x442b91(0x158)][_0x442b91(0x16c)](_0x1ef4d3,0x0,_0xfc36b0)?(await this[_0x442b91(0x129)]['readyForCollab'](_0x1ef4d3),this['_handler'][_0x442b91(0x11e)](_0x1ef4d3)):null;}async[_0x3bf646(0x167)](_0x246c1e,_0x16a889){const _0xe1230a=_0x3bf646;return await this[_0xe1230a(0x158)][_0xe1230a(0x164)](_0x246c1e,0x0,_0x16a889)?(await this[_0xe1230a(0x129)][_0xe1230a(0x147)](_0x246c1e),this[_0xe1230a(0x12d)][_0xe1230a(0x170)](_0x246c1e)):null;}[_0x3bf646(0x146)](_0x38af7f,_0x20a319){const _0x2194c9=_0x3bf646;return(0x0,_0x423b42['toDisposable'])(this[_0x2194c9(0x111)][_0x2194c9(0x142)](_0xdda150[_0x2194c9(0x161)])[_0x2194c9(0x11c)](_0x38af7f)[_0x2194c9(0x14f)]((0x0,_0x29f433[_0x2194c9(0x137)])(_0x272dbf=>_0x272dbf['members$']))['subscribe'](_0x674f26=>_0x20a319(Array[_0x2194c9(0x128)](_0x674f26['values']()))));}[_0x3bf646(0x12a)](_0x2733a5){const _0x21435f=_0x3bf646;let _0xdbf358=this['_resolveUnitId'](_0x2733a5);if(!_0xdbf358)return _0xdda150[_0x21435f(0x16f)][_0x21435f(0x133)];let _0x2a10e5=this['_collaborationController'][_0x21435f(0x12e)](_0xdbf358);return(_0x2a10e5==null?void 0x0:_0x2a10e5['state'][_0x21435f(0x156)])??_0xdda150[_0x21435f(0x16f)][_0x21435f(0x133)];}['flush'](_0xe8f36b,_0x21b4c6={}){const _0x5c9914=_0x3bf646;let _0x12ebd6=this[_0x5c9914(0x15b)](_0xe8f36b);if(!_0x12ebd6)return Promise['reject'](Error('[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.'));let _0x37ebc2=this['_collaborationController'][_0x5c9914(0x12e)](_0x12ebd6);if(!_0x37ebc2)return Promise[_0x5c9914(0x16a)](Error('[FCollaboration]:\x20Unit\x20\x22'+_0x12ebd6+_0x5c9914(0x127)));let _0x825376=_0x37ebc2['state']['status'];if(_0x825376===_0xdda150[_0x5c9914(0x16f)][_0x5c9914(0x171)])return Promise[_0x5c9914(0x11a)]();let _0x45ddbd=_0x3695d0(_0x12ebd6,_0x825376);if(_0x45ddbd)return Promise[_0x5c9914(0x16a)](_0x45ddbd);let _0x42473e=_0x21b4c6[_0x5c9914(0x14a)]??0x7530;return new Promise((_0x56128a,_0x21eb95)=>{const _0x2d2450=_0x5c9914;let _0x22fbc1=!0x1,_0x24827c=null,_0x5d291f=setTimeout(()=>{const _0x3994cf=_0x51f1;_0x22fbc1=!0x0,_0x24827c==null||_0x24827c[_0x3994cf(0x152)](),_0x21eb95(Error(_0x3994cf(0x125)+_0x12ebd6+_0x3994cf(0x123)+_0x42473e+_0x3994cf(0x15e)));},_0x42473e),_0x57603f=()=>{const _0x4f4a94=_0x51f1;_0x22fbc1=!0x0,clearTimeout(_0x5d291f),_0x24827c==null||_0x24827c[_0x4f4a94(0x152)]();};_0x24827c=_0x37ebc2[_0x2d2450(0x131)][_0x2d2450(0x149)](_0x35fc08=>{const _0x3b6e0e=_0x2d2450;if(_0x22fbc1)return;if(_0x35fc08===_0xdda150[_0x3b6e0e(0x16f)]['SYNCED']){_0x57603f(),_0x56128a();return;}let _0x12b13b=_0x3695d0(_0x12ebd6,_0x35fc08);_0x12b13b&&(_0x57603f(),_0x21eb95(_0x12b13b));});});}['_resolveUnitId'](_0x2066a){const _0x58ba82=_0x3bf646;var _0x1e34f6;return _0x2066a||((_0x1e34f6=this[_0x58ba82(0x118)][_0x58ba82(0x120)]())==null?void 0x0:_0x1e34f6[_0x58ba82(0x157)]());}};_0x5ca87b=_0x3a9dd8([_0x47a05f(0x1,(0x0,_0x423b42['Inject'])(_0x423b42[_0x3bf646(0x13e)])),_0x47a05f(0x2,_0x423b42[_0x3bf646(0x16b)]),_0x47a05f(0x3,(0x0,_0x423b42[_0x3bf646(0x153)])(_0x5934e5['SnapshotService'])),_0x47a05f(0x4,(0x0,_0x423b42[_0x3bf646(0x153)])(_0xdda150[_0x3bf646(0x11f)]))],_0x5ca87b);function _0x3695d0(_0x4e5311,_0x14b208){const _0x56d2a5=_0x3bf646;return _0x14b208===_0xdda150[_0x56d2a5(0x16f)]['CONFLICT']||_0x14b208===_0xdda150[_0x56d2a5(0x16f)][_0x56d2a5(0x133)]?Error(_0x56d2a5(0x166)+_0x4e5311+_0x56d2a5(0x144)+_0x14b208+'.'):null;}var _0x338055=class extends _0x4f7f51[_0x3bf646(0x141)]{[_0x3bf646(0x135)](_0x4c00da){const _0x2ea161=_0x3bf646;let _0x530ad6=_0x4c00da[_0x2ea161(0x142)](_0xdda150[_0x2ea161(0x11f)]);this[_0x2ea161(0x155)](this[_0x2ea161(0x124)](this[_0x2ea161(0x13f)]['CollaborationStatusChanged'],()=>{const _0x483831=_0x2ea161;let _0x15d3bb=new _0x423b42[(_0x483831(0x126))](),_0x48e4e6=_0x530ad6[_0x483831(0x119)]['subscribe'](_0x49084e=>{const _0x3436a8=_0x483831;let _0x46c182=_0x49084e[_0x3436a8(0x131)][_0x3436a8(0x149)](_0x2212d2=>{const _0x51c901=_0x3436a8;let _0x1db387={'unitId':_0x49084e[_0x51c901(0x12b)],'status':_0x2212d2};this['fireEvent'](this['Event'][_0x51c901(0x112)],_0x1db387);});_0x15d3bb[_0x3436a8(0x165)]((0x0,_0x423b42[_0x3436a8(0x148)])(_0x46c182));});return _0x15d3bb[_0x483831(0x165)]((0x0,_0x423b42[_0x483831(0x148)])(_0x48e4e6)),_0x15d3bb;}));}[_0x3bf646(0x134)](){const _0x514543=_0x3bf646;return this['_injector'][_0x514543(0x11b)](_0x5ca87b,{'getWorkbook':_0x18b5f1=>this['getWorkbook'](_0x18b5f1),'getDocument':_0x4f4d57=>this[_0x514543(0x151)](_0x4f4d57),'getPresentation':_0x479c73=>this[_0x514543(0x11e)](_0x479c73),'getBase':_0x17920d=>this['getBase'](_0x17920d),'getBoard':_0x39db1f=>this[_0x514543(0x170)](_0x39db1f)});}[_0x3bf646(0x145)](_0x85367f,_0x46cd68,_0x5dc1ac){const _0x10ffd5=_0x3bf646;return this[_0x10ffd5(0x111)][_0x10ffd5(0x142)](_0xdda150[_0x10ffd5(0x11d)])[_0x10ffd5(0x14e)](_0x85367f,_0x46cd68,_0x5dc1ac);}[_0x3bf646(0x15d)](_0x19ed24,_0x1add6e,_0x2fc247){const _0x2c352d=_0x3bf646;return this['_injector'][_0x2c352d(0x142)](_0xdda150[_0x2c352d(0x11d)])[_0x2c352d(0x143)](_0x19ed24,_0x1add6e,_0x2fc247);}};_0x4f7f51[_0x3bf646(0x141)][_0x3bf646(0x117)](_0x338055),Object[_0x3bf646(0x160)](_0x522e94,_0x3bf646(0x12c),{'enumerable':!0x0,'get':function(){return _0x5ca87b;}});}));function _0xb3f3(){const _0x1e61cf=['UniverProCollaborationClientFacade','loadSheetAsync','loadUnit','pipe','UniverCore','getDocument','unsubscribe','Inject','1kRIvCe','disposeWithMe','status','getUnitId','_snapshotService','1902016gKRVun','FBase','_resolveUnitId','16THPyCl','loadServerUnitOfRevision','ms.','loadDocAsync','defineProperty','MemberService','FEventName','Module','loadBoard','add','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','loadBoardAsync','569901pVfZBD','function','reject','IUniverInstanceService','loadSlide','object','@univerjs-pro/collaboration','CollaborationStatus','getBoard','SYNCED','FEnum','_injector','CollaborationStatusChanged','length','loadBase','2208408PKXKTF','getWorkbook','extend','_univerInstanceService','entityInit$','resolve','createInstance','waitForRoom$','DataLoaderService','getPresentation','CollaborationController','getFocusedUnit','loadBaseAsync','709942mSrJod','\x22\x20after\x20','registerEventHandler','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','DisposableCollection','\x22\x20is\x20not\x20in\x20collaboration\x20mode.','from','_collaborationController','getCollaborationStatus','unitID','FCollaboration','_handler','getCollabEntity','getBase','1329923oMkKGv','status$','amd','NOT_COLLAB','getCollaboration','_initialize','3034341HmOGNx','switchMap','379270ZShTBr','@univerjs/core/facade','loadSlideAsync','rxjs','@univerjs-pro/collaboration-client','loadSheet','Injector','Event','exports','FUniver','get','loadUnitOfRevision','\x22\x20while\x20collaboration\x20status\x20is\x20','loadServerUnit','subscribeCollaborators','readyForCollab','toDisposable','subscribe','timeout','@univerjs/core'];_0xb3f3=function(){return _0x1e61cf;};return _0xb3f3();}