@univerjs-pro/collaboration-client 1.0.0-alpha.2 → 1.0.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +8 -2
  2. package/lib/cjs/facade.js +1 -1
  3. package/lib/cjs/index.js +1 -1
  4. package/lib/cjs/locale/ar-SA.js +1 -1
  5. package/lib/cjs/locale/ca-ES.js +1 -1
  6. package/lib/cjs/locale/de-DE.js +1 -1
  7. package/lib/cjs/locale/en-US.js +1 -1
  8. package/lib/cjs/locale/es-ES.js +1 -1
  9. package/lib/cjs/locale/fa-IR.js +1 -1
  10. package/lib/cjs/locale/fr-FR.js +1 -1
  11. package/lib/cjs/locale/id-ID.js +1 -1
  12. package/lib/cjs/locale/it-IT.js +1 -1
  13. package/lib/cjs/locale/ja-JP.js +1 -1
  14. package/lib/cjs/locale/ko-KR.js +1 -1
  15. package/lib/cjs/locale/pl-PL.js +1 -1
  16. package/lib/cjs/locale/pt-BR.js +1 -1
  17. package/lib/cjs/locale/ru-RU.js +1 -1
  18. package/lib/cjs/locale/sk-SK.js +1 -1
  19. package/lib/cjs/locale/vi-VN.js +1 -1
  20. package/lib/cjs/locale/zh-CN.js +1 -1
  21. package/lib/cjs/locale/zh-HK.js +1 -1
  22. package/lib/cjs/locale/zh-TW.js +1 -1
  23. package/lib/es/facade.js +1 -1
  24. package/lib/es/index.js +1 -1
  25. package/lib/es/locale/ar-SA.js +1 -1
  26. package/lib/es/locale/ca-ES.js +1 -1
  27. package/lib/es/locale/de-DE.js +1 -1
  28. package/lib/es/locale/en-US.js +1 -1
  29. package/lib/es/locale/es-ES.js +1 -1
  30. package/lib/es/locale/fa-IR.js +1 -1
  31. package/lib/es/locale/fr-FR.js +1 -1
  32. package/lib/es/locale/id-ID.js +1 -1
  33. package/lib/es/locale/it-IT.js +1 -1
  34. package/lib/es/locale/ja-JP.js +1 -1
  35. package/lib/es/locale/ko-KR.js +1 -1
  36. package/lib/es/locale/pl-PL.js +1 -1
  37. package/lib/es/locale/pt-BR.js +1 -1
  38. package/lib/es/locale/ru-RU.js +1 -1
  39. package/lib/es/locale/sk-SK.js +1 -1
  40. package/lib/es/locale/vi-VN.js +1 -1
  41. package/lib/es/locale/zh-CN.js +1 -1
  42. package/lib/es/locale/zh-HK.js +1 -1
  43. package/lib/es/locale/zh-TW.js +1 -1
  44. package/lib/facade.js +1 -1
  45. package/lib/index.js +1 -1
  46. package/lib/locale/ar-SA.js +1 -1
  47. package/lib/locale/ca-ES.js +1 -1
  48. package/lib/locale/de-DE.js +1 -1
  49. package/lib/locale/en-US.js +1 -1
  50. package/lib/locale/es-ES.js +1 -1
  51. package/lib/locale/fa-IR.js +1 -1
  52. package/lib/locale/fr-FR.js +1 -1
  53. package/lib/locale/id-ID.js +1 -1
  54. package/lib/locale/it-IT.js +1 -1
  55. package/lib/locale/ja-JP.js +1 -1
  56. package/lib/locale/ko-KR.js +1 -1
  57. package/lib/locale/pl-PL.js +1 -1
  58. package/lib/locale/pt-BR.js +1 -1
  59. package/lib/locale/ru-RU.js +1 -1
  60. package/lib/locale/sk-SK.js +1 -1
  61. package/lib/locale/vi-VN.js +1 -1
  62. package/lib/locale/zh-CN.js +1 -1
  63. package/lib/locale/zh-HK.js +1 -1
  64. package/lib/locale/zh-TW.js +1 -1
  65. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +8 -2
  66. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +0 -2
  67. package/lib/types/facade/f-collaboration.d.ts +40 -0
  68. package/lib/types/index.d.ts +6 -3
  69. package/lib/types/services/attachment-remote/attachment-io.service.d.ts +1 -4
  70. package/lib/types/services/collaboration-session/collaboration-changeset-translator.d.ts +4 -0
  71. package/lib/types/services/collaboration-session/collaboration-client-adapter.d.ts +39 -0
  72. package/lib/types/services/collaboration-session/collaboration-session.d.ts +5 -4
  73. package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +14 -14
  74. package/lib/types/services/data-loader/data-loader.service.d.ts +1 -1
  75. package/lib/types/services/image-remote/image-io.service.d.ts +2 -4
  76. package/lib/umd/facade.js +1 -1
  77. package/lib/umd/index.js +1 -1
  78. package/lib/umd/locale/ar-SA.js +1 -1
  79. package/lib/umd/locale/ca-ES.js +1 -1
  80. package/lib/umd/locale/de-DE.js +1 -1
  81. package/lib/umd/locale/en-US.js +1 -1
  82. package/lib/umd/locale/es-ES.js +1 -1
  83. package/lib/umd/locale/fa-IR.js +1 -1
  84. package/lib/umd/locale/fr-FR.js +1 -1
  85. package/lib/umd/locale/id-ID.js +1 -1
  86. package/lib/umd/locale/it-IT.js +1 -1
  87. package/lib/umd/locale/ja-JP.js +1 -1
  88. package/lib/umd/locale/ko-KR.js +1 -1
  89. package/lib/umd/locale/pl-PL.js +1 -1
  90. package/lib/umd/locale/pt-BR.js +1 -1
  91. package/lib/umd/locale/ru-RU.js +1 -1
  92. package/lib/umd/locale/sk-SK.js +1 -1
  93. package/lib/umd/locale/vi-VN.js +1 -1
  94. package/lib/umd/locale/zh-CN.js +1 -1
  95. package/lib/umd/locale/zh-HK.js +1 -1
  96. package/lib/umd/locale/zh-TW.js +1 -1
  97. package/package.json +15 -16
package/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # @univerjs-pro/collaboration-client
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@univerjs-pro/collaboration-client?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client)
4
+ [![license](https://img.shields.io/npm/l/@univerjs-pro/collaboration-client?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client)
4
5
  [![downloads](https://img.shields.io/npm/dm/@univerjs-pro/collaboration-client?style=flat-square)](https://npmjs.com/package/@univerjs-pro/collaboration-client)
5
6
 
6
- `@univerjs-pro/collaboration-client` provides client-side collaboration plugin for Univer Pro.
7
+ `@univerjs-pro/collaboration-client` is part of Univer Pro. Client-side collaboration plugin for Univer Pro.
7
8
 
8
9
  ## Package Overview
9
10
 
@@ -32,8 +33,13 @@ univer.registerPlugin(UniverCollaborationClientPlugin);
32
33
  // Merge EnUS into your Univer locale map when this package contributes UI text.
33
34
  ```
34
35
 
36
+ ## Integration Notes
37
+
38
+ - Keep this package on the same version as the other `@univerjs/*` and `@univerjs-pro/*` packages in your application.
39
+ - Import locale files only for the languages your application enables.
40
+ - Use the facade entry when integrating through Univer Facade APIs.
41
+
35
42
  ## Resources
36
43
 
37
44
  - [Documentation](https://docs.univer.ai/guides/pro)
38
45
  - [NPM package](https://npmjs.com/package/@univerjs-pro/collaboration-client)
39
-
package/lib/cjs/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x225f28=_0x352d;(function(_0x268505,_0x16695a){const _0x2db265=_0x352d,_0x395578=_0x268505();while(!![]){try{const _0x220911=parseInt(_0x2db265(0x1af))/0x1*(parseInt(_0x2db265(0x1b9))/0x2)+-parseInt(_0x2db265(0x1bf))/0x3*(parseInt(_0x2db265(0x19f))/0x4)+parseInt(_0x2db265(0x1dd))/0x5+parseInt(_0x2db265(0x1b5))/0x6+-parseInt(_0x2db265(0x1d6))/0x7*(parseInt(_0x2db265(0x1a9))/0x8)+parseInt(_0x2db265(0x1c7))/0x9+-parseInt(_0x2db265(0x1d8))/0xa;if(_0x220911===_0x16695a)break;else _0x395578['push'](_0x395578['shift']());}catch(_0xaad526){_0x395578['push'](_0x395578['shift']());}}}(_0x2e50,0x6ac7e),Object['defineProperty'](exports,Symbol[_0x225f28(0x1c1)],{'value':_0x225f28(0x1d7)}));let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core/facade'),n=require('@univerjs/core'),r=require('@univerjs-pro/collaboration'),i=require('rxjs');var a=class extends t['FEnum']{get['CollaborationStatus'](){const _0x1a91fd=_0x225f28;return e[_0x1a91fd(0x1a5)];}};function _0x352d(_0x527f46,_0x19c795){_0x527f46=_0x527f46-0x19b;const _0x2e5064=_0x2e50();let _0x352d88=_0x2e5064[_0x527f46];return _0x352d88;}t['FEnum'][_0x225f28(0x1c5)](a);var o=class extends t[_0x225f28(0x1d5)]{get[_0x225f28(0x1cf)](){return'CollaborationStatusChanged';}};t[_0x225f28(0x1d5)][_0x225f28(0x1c5)](o);function s(_0x170952,_0x437ee6){return function(_0x34b33d,_0x33dbd5){_0x437ee6(_0x34b33d,_0x33dbd5,_0x170952);};}function c(_0x439a78,_0x4da654,_0x57e2d1,_0x48fb07){const _0x4734ba=_0x225f28;var _0x8231da=arguments['length'],_0x26f680=_0x8231da<0x3?_0x4da654:_0x48fb07===null?_0x48fb07=Object[_0x4734ba(0x1b4)](_0x4da654,_0x57e2d1):_0x48fb07,_0x2848b8;if(typeof Reflect=='object'&&typeof Reflect['decorate']==_0x4734ba(0x1a7))_0x26f680=Reflect[_0x4734ba(0x1b2)](_0x439a78,_0x4da654,_0x57e2d1,_0x48fb07);else{for(var _0x42ec80=_0x439a78[_0x4734ba(0x1d1)]-0x1;_0x42ec80>=0x0;_0x42ec80--)(_0x2848b8=_0x439a78[_0x42ec80])&&(_0x26f680=(_0x8231da<0x3?_0x2848b8(_0x26f680):_0x8231da>0x3?_0x2848b8(_0x4da654,_0x57e2d1,_0x26f680):_0x2848b8(_0x4da654,_0x57e2d1))||_0x26f680);}return _0x8231da>0x3&&_0x26f680&&Object[_0x4734ba(0x1b0)](_0x4da654,_0x57e2d1,_0x26f680),_0x26f680;}let l=class extends t[_0x225f28(0x1a0)]{constructor(_0xafdec5,_0x139c22,_0x2ab067,_0x3ea69a,_0x426840){const _0x215199=_0x225f28;super(),this[_0x215199(0x1d9)]=_0xafdec5,this[_0x215199(0x1ac)]=_0x139c22,this[_0x215199(0x1b3)]=_0x2ab067,this[_0x215199(0x1a8)]=_0x3ea69a,this[_0x215199(0x1cd)]=_0x426840;}async['loadSheetAsync'](_0x209c7d,_0x19b30f){const _0x38aea7=_0x225f28;return await this[_0x38aea7(0x1a8)][_0x38aea7(0x1ad)](_0x209c7d,0x0,_0x19b30f)?(await this['_collaborationController'][_0x38aea7(0x19e)](_0x209c7d),this[_0x38aea7(0x1d9)][_0x38aea7(0x1c6)](_0x209c7d)):null;}async['loadDocAsync'](_0x28e1de,_0x2f9153){const _0x364ca1=_0x225f28;return await this[_0x364ca1(0x1a8)][_0x364ca1(0x1a4)](_0x28e1de,0x0,_0x2f9153)?(await this[_0x364ca1(0x1cd)][_0x364ca1(0x19e)](_0x28e1de),this[_0x364ca1(0x1d9)][_0x364ca1(0x1b6)](_0x28e1de)):null;}async[_0x225f28(0x1ab)](_0x231434,_0x30613e){const _0x56986f=_0x225f28;return await this['_snapshotService'][_0x56986f(0x1b1)](_0x231434,0x0,_0x30613e)?(await this[_0x56986f(0x1cd)][_0x56986f(0x19e)](_0x231434),this[_0x56986f(0x1d9)]['getBase'](_0x231434)):null;}async[_0x225f28(0x1d4)](_0x2f1939,_0x365bc6){const _0x358a73=_0x225f28;return await this[_0x358a73(0x1a8)][_0x358a73(0x1cc)](_0x2f1939,0x0,_0x365bc6)?(await this['_collaborationController'][_0x358a73(0x19e)](_0x2f1939),this[_0x358a73(0x1d9)][_0x358a73(0x1da)](_0x2f1939)):null;}[_0x225f28(0x1c9)](_0x1c7e6e,_0x5aa6ba){const _0x10f042=_0x225f28;return(0x0,n[_0x10f042(0x19d)])(this[_0x10f042(0x1ac)][_0x10f042(0x1a1)](e[_0x10f042(0x1c8)])[_0x10f042(0x1bb)](_0x1c7e6e)['pipe']((0x0,i[_0x10f042(0x1c4)])(_0x14b035=>_0x14b035[_0x10f042(0x1ae)]))[_0x10f042(0x1c3)](_0x1e0cd5=>_0x5aa6ba(Array[_0x10f042(0x1a3)](_0x1e0cd5['values']()))));}[_0x225f28(0x1db)](_0x224219){const _0x26a33d=_0x225f28;var _0xab9145;let _0x4cb467;if(_0x224219)_0x4cb467=_0x224219;else{let _0x1261e8=this[_0x26a33d(0x1b3)]['getFocusedUnit']();_0x4cb467=_0x1261e8==null?void 0x0:_0x1261e8['getUnitId']();}if(!_0x4cb467)return e[_0x26a33d(0x1a5)][_0x26a33d(0x1dc)];let _0x3f541c=this['_collaborationController'][_0x26a33d(0x19c)](_0x4cb467);return(_0xab9145=_0x3f541c==null?void 0x0:_0x3f541c[_0x26a33d(0x1c2)][_0x26a33d(0x1d2)])==null?e[_0x26a33d(0x1a5)][_0x26a33d(0x1dc)]:_0xab9145;}};function _0x2e50(){const _0x9ef573=['508653VAWwgb','MemberService','subscribeCollaborators','_initialize','registerEventHandler','loadSlide','_collaborationController','DisposableCollection','CollaborationStatusChanged','loadUnitOfRevision','length','status','Inject','loadSlideAsync','FEventName','23317sxLYSI','Module','3177030SIifhq','_handler','getPresentation','getCollaborationStatus','NOT_COLLAB','2712840CJtDSx','loadUnit','add','getCollabEntity','toDisposable','readyForCollab','8NhJDFP','FBase','get','fireEvent','from','loadDoc','CollaborationStatus','Event','function','_snapshotService','344iFMzgC','CollaborationController','loadBaseAsync','_injector','loadSheet','members$','22133WXUmrk','defineProperty','loadBase','decorate','_univerInstanceService','getOwnPropertyDescriptor','1022496IZwkLq','getDocument','SnapshotService','loadServerUnit','14BtSIyA','Injector','waitForRoom$','FCollaboration','getBase','FUniver','39183hvuCZk','DataLoaderService','toStringTag','state','subscribe','switchMap','extend','getWorkbook'];_0x2e50=function(){return _0x9ef573;};return _0x2e50();}l=c([s(0x1,(0x0,n[_0x225f28(0x1d3)])(n[_0x225f28(0x1ba)])),s(0x2,n['IUniverInstanceService']),s(0x3,(0x0,n[_0x225f28(0x1d3)])(r[_0x225f28(0x1b7)])),s(0x4,(0x0,n[_0x225f28(0x1d3)])(e[_0x225f28(0x1aa)]))],l);var u=class extends t['FUniver']{[_0x225f28(0x1ca)](_0x453dca){const _0x488c86=_0x225f28;let _0x2ed9d9=_0x453dca[_0x488c86(0x1a1)](e[_0x488c86(0x1aa)]);this['disposeWithMe'](this[_0x488c86(0x1cb)](this[_0x488c86(0x1a6)][_0x488c86(0x1cf)],()=>{const _0x2717c9=_0x488c86;let _0x140d5f=new n[(_0x2717c9(0x1ce))](),_0x202eaa=_0x2ed9d9['entityInit$'][_0x2717c9(0x1c3)](_0x1fa515=>{const _0x197768=_0x2717c9;let _0x5c0cd9=_0x1fa515['status$']['subscribe'](_0x4a07c4=>{const _0x3db917=_0x352d;let _0x2894a3={'unitId':_0x1fa515['unitID'],'status':_0x4a07c4};this[_0x3db917(0x1a2)](this[_0x3db917(0x1a6)][_0x3db917(0x1cf)],_0x2894a3);});_0x140d5f[_0x197768(0x19b)]((0x0,n[_0x197768(0x19d)])(_0x5c0cd9));});return _0x140d5f[_0x2717c9(0x19b)]((0x0,n[_0x2717c9(0x19d)])(_0x202eaa)),_0x140d5f;}));}['getCollaboration'](){const _0x16b70f=_0x225f28;return this['_injector']['createInstance'](l,{'getWorkbook':_0x38c983=>this[_0x16b70f(0x1c6)](_0x38c983),'getDocument':_0x53724b=>this[_0x16b70f(0x1b6)](_0x53724b),'getPresentation':_0x1be431=>this[_0x16b70f(0x1da)](_0x1be431),'getBase':_0x28a9b6=>this[_0x16b70f(0x1bd)](_0x28a9b6)});}[_0x225f28(0x1b8)](_0x4b677b,_0x5e4cc2,_0x33c9a6){const _0xf13905=_0x225f28;return this[_0xf13905(0x1ac)][_0xf13905(0x1a1)](e['DataLoaderService'])[_0xf13905(0x1de)](_0x4b677b,_0x5e4cc2,_0x33c9a6);}['loadServerUnitOfRevision'](_0x4155ea,_0x41f4b2,_0x1d8cd2){const _0x2de469=_0x225f28;return this['_injector'][_0x2de469(0x1a1)](e[_0x2de469(0x1c0)])[_0x2de469(0x1d0)](_0x4155ea,_0x41f4b2,_0x1d8cd2);}};t[_0x225f28(0x1be)][_0x225f28(0x1c5)](u),Object['defineProperty'](exports,_0x225f28(0x1bc),{'enumerable':!0x0,'get':function(){return l;}});
1
+ const _0x142f87=_0x4c78;(function(_0x671eb4,_0xbbe298){const _0x176828=_0x4c78,_0x3373e1=_0x671eb4();while(!![]){try{const _0x114b1a=parseInt(_0x176828(0xde))/0x1*(parseInt(_0x176828(0x114))/0x2)+-parseInt(_0x176828(0xf9))/0x3+-parseInt(_0x176828(0xe3))/0x4+-parseInt(_0x176828(0x10a))/0x5*(parseInt(_0x176828(0x104))/0x6)+parseInt(_0x176828(0xe2))/0x7*(-parseInt(_0x176828(0x10c))/0x8)+-parseInt(_0x176828(0x117))/0x9*(parseInt(_0x176828(0x100))/0xa)+parseInt(_0x176828(0xf5))/0xb;if(_0x114b1a===_0xbbe298)break;else _0x3373e1['push'](_0x3373e1['shift']());}catch(_0x4b83e4){_0x3373e1['push'](_0x3373e1['shift']());}}}(_0x7159,0x89595),Object[_0x142f87(0xf4)](exports,Symbol[_0x142f87(0xdd)],{'value':_0x142f87(0x109)}));function _0x7159(){const _0x50cf36=['loadSlide','loadServerUnit','disposeWithMe','30NLwEAW','decorate','reject','FEventName','726pGJDhW','getDocument','loadSlideAsync','Inject','getCollabEntity','Module','39825gutXuH','_collaborationController','8040mtWDLL','subscribeCollaborators','status$','_injector','\x22\x20while\x20collaboration\x20status\x20is\x20','loadDoc','values','get','200848acgFSo','loadBase','CollaborationStatus','3225744OJkMMf','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','registerEventHandler','[FCollaboration]:\x20Unit\x20\x22','\x22\x20is\x20not\x20in\x20collaboration\x20mode.','loadServerUnitOfRevision','getBoard','getBase','_snapshotService','DataLoaderService','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','getWorkbook','loadBoard','timeout','subscribe','FEnum','unsubscribe','MemberService','\x22\x20after\x20','entityInit$','NOT_COLLAB','fireEvent','readyForCollab','status','unitID','resolve','CollaborationStatusChanged','extend','getCollaboration','DisposableCollection','toStringTag','2IodaXK','getPresentation','object','getFocusedUnit','7434cZwvYN','4230264lmcsSU','SnapshotService','SYNCED','getUnitId','length','state','switchMap','loadBoardAsync','_univerInstanceService','add','FUniver','getCollaborationStatus','loadSheet','FBase','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','CollaborationController','toDisposable','defineProperty','53666569jwVtTp','function','_resolveUnitId','Event','1059471wkTCMA','loadUnitOfRevision','_handler','CONFLICT'];_0x7159=function(){return _0x50cf36;};return _0x7159();}let e=require('@univerjs-pro/collaboration-client'),t=require('@univerjs/core/facade'),n=require('@univerjs/core'),r=require('@univerjs-pro/collaboration'),i=require('rxjs');var a=class extends t[_0x142f87(0x126)]{get[_0x142f87(0x116)](){const _0x934a3b=_0x142f87;return e[_0x934a3b(0x116)];}};t[_0x142f87(0x126)][_0x142f87(0xda)](a);var o=class extends t[_0x142f87(0x103)]{get[_0x142f87(0xd9)](){const _0x432ecf=_0x142f87;return _0x432ecf(0xd9);}};t['FEventName'][_0x142f87(0xda)](o);function s(_0x5e05ef,_0x322f76){return function(_0x785d92,_0x16819d){_0x322f76(_0x785d92,_0x16819d,_0x5e05ef);};}function c(_0x357941,_0x3cc4b6,_0x1eb063,_0xffb3ca){const _0x4474c0=_0x142f87;var _0x2c636c=arguments[_0x4474c0(0xe7)],_0x4c848e=_0x2c636c<0x3?_0x3cc4b6:_0xffb3ca===null?_0xffb3ca=Object['getOwnPropertyDescriptor'](_0x3cc4b6,_0x1eb063):_0xffb3ca,_0x4a8141;if(typeof Reflect==_0x4474c0(0xe0)&&typeof Reflect[_0x4474c0(0x101)]==_0x4474c0(0xf6))_0x4c848e=Reflect['decorate'](_0x357941,_0x3cc4b6,_0x1eb063,_0xffb3ca);else{for(var _0x376634=_0x357941['length']-0x1;_0x376634>=0x0;_0x376634--)(_0x4a8141=_0x357941[_0x376634])&&(_0x4c848e=(_0x2c636c<0x3?_0x4a8141(_0x4c848e):_0x2c636c>0x3?_0x4a8141(_0x3cc4b6,_0x1eb063,_0x4c848e):_0x4a8141(_0x3cc4b6,_0x1eb063))||_0x4c848e);}return _0x2c636c>0x3&&_0x4c848e&&Object[_0x4474c0(0xf4)](_0x3cc4b6,_0x1eb063,_0x4c848e),_0x4c848e;}let l=class extends t[_0x142f87(0xf0)]{constructor(_0x12f04b,_0x2a1d15,_0x9dfe2f,_0x4ca829,_0x289859){const _0x3cf0fc=_0x142f87;super(),this[_0x3cf0fc(0xfb)]=_0x12f04b,this['_injector']=_0x2a1d15,this[_0x3cf0fc(0xeb)]=_0x9dfe2f,this['_snapshotService']=_0x4ca829,this[_0x3cf0fc(0x10b)]=_0x289859;}async['loadSheetAsync'](_0xb749f2,_0x26848a){const _0x1cd0d3=_0x142f87;return await this['_snapshotService'][_0x1cd0d3(0xef)](_0xb749f2,0x0,_0x26848a)?(await this['_collaborationController'][_0x1cd0d3(0x12d)](_0xb749f2),this[_0x1cd0d3(0xfb)][_0x1cd0d3(0x122)](_0xb749f2)):null;}async['loadDocAsync'](_0x2aac94,_0x1a8244){const _0x1b87bf=_0x142f87;return await this[_0x1b87bf(0x11f)][_0x1b87bf(0x111)](_0x2aac94,0x0,_0x1a8244)?(await this['_collaborationController'][_0x1b87bf(0x12d)](_0x2aac94),this[_0x1b87bf(0xfb)]['getDocument'](_0x2aac94)):null;}async['loadBaseAsync'](_0x343a17,_0x247c4b){const _0x4955f4=_0x142f87;return await this[_0x4955f4(0x11f)][_0x4955f4(0x115)](_0x343a17,0x0,_0x247c4b)?(await this[_0x4955f4(0x10b)][_0x4955f4(0x12d)](_0x343a17),this[_0x4955f4(0xfb)][_0x4955f4(0x11e)](_0x343a17)):null;}async[_0x142f87(0x106)](_0x504038,_0x392856){const _0x532e80=_0x142f87;return await this[_0x532e80(0x11f)][_0x532e80(0xfd)](_0x504038,0x0,_0x392856)?(await this[_0x532e80(0x10b)][_0x532e80(0x12d)](_0x504038),this['_handler'][_0x532e80(0xdf)](_0x504038)):null;}async[_0x142f87(0xea)](_0x38f9cc,_0xf1a28b){const _0x3044ba=_0x142f87;return await this[_0x3044ba(0x11f)][_0x3044ba(0x123)](_0x38f9cc,0x0,_0xf1a28b)?(await this[_0x3044ba(0x10b)][_0x3044ba(0x12d)](_0x38f9cc),this['_handler'][_0x3044ba(0x11d)](_0x38f9cc)):null;}[_0x142f87(0x10d)](_0x1a6cbc,_0x33ea00){const _0xe39cb0=_0x142f87;return(0x0,n[_0xe39cb0(0xf3)])(this['_injector'][_0xe39cb0(0x113)](e[_0xe39cb0(0x128)])['waitForRoom$'](_0x1a6cbc)['pipe']((0x0,i[_0xe39cb0(0xe9)])(_0x3c4728=>_0x3c4728['members$']))[_0xe39cb0(0x125)](_0x4c9b74=>_0x33ea00(Array['from'](_0x4c9b74[_0xe39cb0(0x112)]()))));}[_0x142f87(0xee)](_0x377872){const _0xd4b28a=_0x142f87;var _0x2b7a89;let _0x121066=this[_0xd4b28a(0xf7)](_0x377872);if(!_0x121066)return e[_0xd4b28a(0x116)][_0xd4b28a(0x12b)];let _0x39a7e7=this[_0xd4b28a(0x10b)]['getCollabEntity'](_0x121066);return(_0x2b7a89=_0x39a7e7==null?void 0x0:_0x39a7e7[_0xd4b28a(0xe8)][_0xd4b28a(0x12e)])==null?e['CollaborationStatus'][_0xd4b28a(0x12b)]:_0x2b7a89;}['flush'](_0x1ea37b,_0xe8b7d0={}){const _0x54a9a2=_0x142f87;var _0x376169;let _0x343902=this[_0x54a9a2(0xf7)](_0x1ea37b);if(!_0x343902)return Promise['reject'](Error(_0x54a9a2(0x118)));let _0x2ae768=this[_0x54a9a2(0x10b)][_0x54a9a2(0x108)](_0x343902);if(!_0x2ae768)return Promise['reject'](Error(_0x54a9a2(0x11a)+_0x343902+_0x54a9a2(0x11b)));let _0x32bbd9=_0x2ae768['state']['status'];if(_0x32bbd9===e['CollaborationStatus'][_0x54a9a2(0xe5)])return Promise[_0x54a9a2(0xd8)]();let _0x11e3b6=u(_0x343902,_0x32bbd9);if(_0x11e3b6)return Promise[_0x54a9a2(0x102)](_0x11e3b6);let _0x1f2f58=(_0x376169=_0xe8b7d0[_0x54a9a2(0x124)])==null?0x7530:_0x376169;return new Promise((_0x1ac1cf,_0x8ffb9c)=>{const _0x26849e=_0x54a9a2;let _0x10a8b9=!0x1,_0x95c639=null,_0x1fcf31=setTimeout(()=>{const _0x480525=_0x4c78;_0x10a8b9=!0x0,_0x95c639==null||_0x95c639['unsubscribe'](),_0x8ffb9c(Error(_0x480525(0x121)+_0x343902+_0x480525(0x129)+_0x1f2f58+'ms.'));},_0x1f2f58),_0x4ef0c4=()=>{const _0x280fcc=_0x4c78;_0x10a8b9=!0x0,clearTimeout(_0x1fcf31),_0x95c639==null||_0x95c639[_0x280fcc(0x127)]();};_0x95c639=_0x2ae768[_0x26849e(0x10e)]['subscribe'](_0x41f268=>{const _0x50c449=_0x26849e;if(_0x10a8b9)return;if(_0x41f268===e[_0x50c449(0x116)]['SYNCED']){_0x4ef0c4(),_0x1ac1cf();return;}let _0xb7b49a=u(_0x343902,_0x41f268);_0xb7b49a&&(_0x4ef0c4(),_0x8ffb9c(_0xb7b49a));});});}[_0x142f87(0xf7)](_0x135914){const _0x1d7f4a=_0x142f87;var _0x3daf04;return _0x135914||((_0x3daf04=this[_0x1d7f4a(0xeb)][_0x1d7f4a(0xe1)]())==null?void 0x0:_0x3daf04[_0x1d7f4a(0xe6)]());}};function _0x4c78(_0x4f4878,_0x5a12e4){_0x4f4878=_0x4f4878-0xd8;const _0x7159ad=_0x7159();let _0x4c7828=_0x7159ad[_0x4f4878];return _0x4c7828;}l=c([s(0x1,(0x0,n[_0x142f87(0x107)])(n['Injector'])),s(0x2,n['IUniverInstanceService']),s(0x3,(0x0,n[_0x142f87(0x107)])(r[_0x142f87(0xe4)])),s(0x4,(0x0,n[_0x142f87(0x107)])(e[_0x142f87(0xf2)]))],l);function u(_0x59d34c,_0x146826){const _0x1e513f=_0x142f87;return _0x146826===e[_0x1e513f(0x116)][_0x1e513f(0xfc)]||_0x146826===e[_0x1e513f(0x116)][_0x1e513f(0x12b)]?Error(_0x1e513f(0xf1)+_0x59d34c+_0x1e513f(0x110)+_0x146826+'.'):null;}var d=class extends t[_0x142f87(0xed)]{['_initialize'](_0x147488){const _0x5828af=_0x142f87;let _0x562e65=_0x147488[_0x5828af(0x113)](e['CollaborationController']);this[_0x5828af(0xff)](this[_0x5828af(0x119)](this[_0x5828af(0xf8)][_0x5828af(0xd9)],()=>{const _0x4f641f=_0x5828af;let _0x2d9163=new n[(_0x4f641f(0xdc))](),_0x507f90=_0x562e65[_0x4f641f(0x12a)][_0x4f641f(0x125)](_0x3f8428=>{const _0x16ccbc=_0x4f641f;let _0x4f4601=_0x3f8428[_0x16ccbc(0x10e)][_0x16ccbc(0x125)](_0x16f61b=>{const _0x49f4fb=_0x16ccbc;let _0x227796={'unitId':_0x3f8428[_0x49f4fb(0x12f)],'status':_0x16f61b};this[_0x49f4fb(0x12c)](this[_0x49f4fb(0xf8)][_0x49f4fb(0xd9)],_0x227796);});_0x2d9163['add']((0x0,n[_0x16ccbc(0xf3)])(_0x4f4601));});return _0x2d9163[_0x4f641f(0xec)]((0x0,n[_0x4f641f(0xf3)])(_0x507f90)),_0x2d9163;}));}[_0x142f87(0xdb)](){const _0x5361da=_0x142f87;return this[_0x5361da(0x10f)]['createInstance'](l,{'getWorkbook':_0x4bb363=>this['getWorkbook'](_0x4bb363),'getDocument':_0xcb4679=>this[_0x5361da(0x105)](_0xcb4679),'getPresentation':_0x3bc4e1=>this[_0x5361da(0xdf)](_0x3bc4e1),'getBase':_0xc529ec=>this[_0x5361da(0x11e)](_0xc529ec),'getBoard':_0x410c1b=>this[_0x5361da(0x11d)](_0x410c1b)});}[_0x142f87(0xfe)](_0x70c0b9,_0x4fec0b,_0x9cee2e){const _0x4916e5=_0x142f87;return this[_0x4916e5(0x10f)][_0x4916e5(0x113)](e[_0x4916e5(0x120)])['loadUnit'](_0x70c0b9,_0x4fec0b,_0x9cee2e);}[_0x142f87(0x11c)](_0x2b1fa3,_0x8c5d5c,_0x387425){const _0x37da8b=_0x142f87;return this['_injector']['get'](e['DataLoaderService'])[_0x37da8b(0xfa)](_0x2b1fa3,_0x8c5d5c,_0x387425);}};t['FUniver'][_0x142f87(0xda)](d),Object['defineProperty'](exports,'FCollaboration',{'enumerable':!0x0,'get':function(){return l;}});