@univerjs-pro/collaboration-client 1.1.0 → 1.3.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 (100) hide show
  1. package/README.md +2 -0
  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/config/config.d.ts +19 -0
  66. package/lib/types/controllers/collaboration/changeset-submitter.d.ts +132 -0
  67. package/lib/types/controllers/collaboration/collaboration-entity.d.ts +29 -2
  68. package/lib/types/controllers/collaboration/collaboration-state.d.ts +181 -87
  69. package/lib/types/controllers/collaboration/collaboration.controller.d.ts +7 -0
  70. package/lib/types/controllers/collaboration/utils/changeset-utils.d.ts +7 -3
  71. package/lib/types/facade/f-collaboration.d.ts +17 -0
  72. package/lib/types/facade/f-event.d.ts +89 -2
  73. package/lib/types/index.d.ts +5 -3
  74. package/lib/types/services/collaboration-session/collaboration-session.d.ts +4 -8
  75. package/lib/types/services/collaboration-session/collaboration-session.service.d.ts +2 -1
  76. package/lib/types/services/collaboration-ui-event/collaboration-ui-event.d.ts +10 -0
  77. package/lib/types/services/socket/collaboration-socket.service.d.ts +10 -2
  78. package/lib/types/services/undoredo/collaborative-undoredo.service.d.ts +5 -0
  79. package/lib/umd/facade.js +1 -1
  80. package/lib/umd/index.js +1 -1
  81. package/lib/umd/locale/ar-SA.js +1 -1
  82. package/lib/umd/locale/ca-ES.js +1 -1
  83. package/lib/umd/locale/de-DE.js +1 -1
  84. package/lib/umd/locale/en-US.js +1 -1
  85. package/lib/umd/locale/es-ES.js +1 -1
  86. package/lib/umd/locale/fa-IR.js +1 -1
  87. package/lib/umd/locale/fr-FR.js +1 -1
  88. package/lib/umd/locale/id-ID.js +1 -1
  89. package/lib/umd/locale/it-IT.js +1 -1
  90. package/lib/umd/locale/ja-JP.js +1 -1
  91. package/lib/umd/locale/ko-KR.js +1 -1
  92. package/lib/umd/locale/pl-PL.js +1 -1
  93. package/lib/umd/locale/pt-BR.js +1 -1
  94. package/lib/umd/locale/ru-RU.js +1 -1
  95. package/lib/umd/locale/sk-SK.js +1 -1
  96. package/lib/umd/locale/vi-VN.js +1 -1
  97. package/lib/umd/locale/zh-CN.js +1 -1
  98. package/lib/umd/locale/zh-HK.js +1 -1
  99. package/lib/umd/locale/zh-TW.js +1 -1
  100. package/package.json +15 -15
package/lib/facade.js CHANGED
@@ -1 +1 @@
1
- const _0x1dcad0=_0x1b85;(function(_0x5b7ef5,_0x448691){const _0x1f96fb=_0x1b85,_0x5d3a60=_0x5b7ef5();while(!![]){try{const _0x40b1ec=parseInt(_0x1f96fb(0x1f4))/0x1+-parseInt(_0x1f96fb(0x22b))/0x2*(-parseInt(_0x1f96fb(0x207))/0x3)+-parseInt(_0x1f96fb(0x1f7))/0x4*(parseInt(_0x1f96fb(0x1f2))/0x5)+-parseInt(_0x1f96fb(0x234))/0x6+-parseInt(_0x1f96fb(0x1f1))/0x7*(-parseInt(_0x1f96fb(0x208))/0x8)+parseInt(_0x1f96fb(0x238))/0x9*(parseInt(_0x1f96fb(0x236))/0xa)+parseInt(_0x1f96fb(0x23c))/0xb*(-parseInt(_0x1f96fb(0x1f0))/0xc);if(_0x40b1ec===_0x448691)break;else _0x5d3a60['push'](_0x5d3a60['shift']());}catch(_0x406963){_0x5d3a60['push'](_0x5d3a60['shift']());}}}(_0x7981,0x4e108));import{CollaborationController as _0x25f8f1,CollaborationStatus as _0x10ce7d,DataLoaderService as _0x1072cd,MemberService as _0x36f1fd}from'@univerjs-pro/collaboration-client';import{FBase as _0x1bf77b,FEnum as _0x159c74,FEventName as _0x13183f,FUniver as _0x1b630f}from'@univerjs/core/facade';import{DisposableCollection as _0x5e8abf,IUniverInstanceService as _0xac809c,Inject as _0x132184,Injector as _0x2b2ef3,UniverInstanceType as _0x453837,toDisposable as _0x4984cf}from'@univerjs/core';import{switchMap as _0x16ef84}from'rxjs';var h=class extends _0x159c74{get[_0x1dcad0(0x230)](){return _0x10ce7d;}};function _0x7981(){const _0x3650fd=['[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','status','4178724VQRKIq','822724IEPYHA','15cTMvHD','CONFLICT','218682iNewBp','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','_injector','629580RjnORJ','loadDocAsync','loadBoardAsync','SYNCED','getPresentation','getBase','subscribe','readyForCollab','UNIVER_BASE','disposeWithMe','getPdf','resolve','_collaborationController','members$','getFocusedUnit','UNIVER_SLIDE','9vVnKEj','24lhGWyi','object','state','values','timeout','loadServerUnit','loadPdfAsync','waitForRoom$','loadUnitOfRevision','\x22\x20is\x20not\x20in\x20collaboration\x20mode.','[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.','_univerInstanceService','extend','_handler','getCollaborationStatus','getCollabEntity','decorate','getBoard','UNIVER_PDF','Event','loadUnit','getCollaboration','loadSlideAsync','get','add','reject','unsubscribe','status$','UNIVER_SHEET','registerEventHandler','subscribeCollaborators','from','getWorkbook','_dataLoaderService','loadSheetAsync','389122bBfmmL','entityInit$','pipe','length','_resolveUnitId','CollaborationStatus','defineProperty','getDocument','loadBaseAsync','2892018XFuwbc','CollaborationStatusChanged','790SdJWdg','NOT_COLLAB','53226GBKuTQ','loadServerUnitOfRevision','getUnitId','UNIVER_DOC','11wGWIhf','function','\x22\x20while\x20collaboration\x20status\x20is\x20'];_0x7981=function(){return _0x3650fd;};return _0x7981();}_0x159c74[_0x1dcad0(0x214)](h);var g=class extends _0x13183f{get[_0x1dcad0(0x235)](){const _0x47edb5=_0x1dcad0;return _0x47edb5(0x235);}};_0x13183f[_0x1dcad0(0x214)](g);function _(_0x3d0e37,_0xe452ee){return function(_0x23c8e2,_0x12f3a2){_0xe452ee(_0x23c8e2,_0x12f3a2,_0x3d0e37);};}function v(_0x2818aa,_0x4a86cd,_0x9e1bcf,_0x17634b){const _0x81fbb3=_0x1dcad0;var _0x2d86e0=arguments[_0x81fbb3(0x22e)],_0x5aae7a=_0x2d86e0<0x3?_0x4a86cd:_0x17634b===null?_0x17634b=Object['getOwnPropertyDescriptor'](_0x4a86cd,_0x9e1bcf):_0x17634b,_0x125ee6;if(typeof Reflect==_0x81fbb3(0x209)&&typeof Reflect[_0x81fbb3(0x218)]==_0x81fbb3(0x23d))_0x5aae7a=Reflect[_0x81fbb3(0x218)](_0x2818aa,_0x4a86cd,_0x9e1bcf,_0x17634b);else{for(var _0x28630d=_0x2818aa[_0x81fbb3(0x22e)]-0x1;_0x28630d>=0x0;_0x28630d--)(_0x125ee6=_0x2818aa[_0x28630d])&&(_0x5aae7a=(_0x2d86e0<0x3?_0x125ee6(_0x5aae7a):_0x2d86e0>0x3?_0x125ee6(_0x4a86cd,_0x9e1bcf,_0x5aae7a):_0x125ee6(_0x4a86cd,_0x9e1bcf))||_0x5aae7a);}return _0x2d86e0>0x3&&_0x5aae7a&&Object[_0x81fbb3(0x231)](_0x4a86cd,_0x9e1bcf,_0x5aae7a),_0x5aae7a;}function _0x1b85(_0x5ae834,_0x5180c7){_0x5ae834=_0x5ae834-0x1ee;const _0x798190=_0x7981();let _0x1b856e=_0x798190[_0x5ae834];return _0x1b856e;}let y=class extends _0x1bf77b{constructor(_0xf387f,_0x3826ea,_0x431d8c,_0x672ce,_0x5b75ca){const _0x468d70=_0x1dcad0;super(),this[_0x468d70(0x215)]=_0xf387f,this[_0x468d70(0x1f6)]=_0x3826ea,this[_0x468d70(0x213)]=_0x431d8c,this[_0x468d70(0x229)]=_0x672ce,this[_0x468d70(0x203)]=_0x5b75ca;}async[_0x1dcad0(0x22a)](_0x53c7a0,_0x3f5f9e){const _0x41a823=_0x1dcad0;return await this[_0x41a823(0x229)][_0x41a823(0x21c)](_0x53c7a0,_0x453837[_0x41a823(0x224)],void 0x0,_0x3f5f9e)?(await this[_0x41a823(0x203)]['readyForCollab'](_0x53c7a0),this['_handler'][_0x41a823(0x228)](_0x53c7a0)):null;}async[_0x1dcad0(0x1f8)](_0x20c9d5,_0x5f3cce){const _0x2995f2=_0x1dcad0;return await this[_0x2995f2(0x229)][_0x2995f2(0x21c)](_0x20c9d5,_0x453837[_0x2995f2(0x23b)],void 0x0,_0x5f3cce)?(await this[_0x2995f2(0x203)][_0x2995f2(0x1fe)](_0x20c9d5),this['_handler']['getDocument'](_0x20c9d5)):null;}async[_0x1dcad0(0x233)](_0x2aa719,_0xcf18a4){const _0x1f513a=_0x1dcad0;return await this[_0x1f513a(0x229)]['loadUnit'](_0x2aa719,_0x453837[_0x1f513a(0x1ff)],void 0x0,_0xcf18a4)?(await this[_0x1f513a(0x203)][_0x1f513a(0x1fe)](_0x2aa719),this[_0x1f513a(0x215)]['getBase'](_0x2aa719)):null;}async[_0x1dcad0(0x21e)](_0x1bd863,_0x2e3e2c){const _0x3099ff=_0x1dcad0;return await this[_0x3099ff(0x229)][_0x3099ff(0x21c)](_0x1bd863,_0x453837[_0x3099ff(0x206)],void 0x0,_0x2e3e2c)?(await this[_0x3099ff(0x203)][_0x3099ff(0x1fe)](_0x1bd863),this[_0x3099ff(0x215)][_0x3099ff(0x1fb)](_0x1bd863)):null;}async[_0x1dcad0(0x1f9)](_0x575b86,_0x285ed5){const _0x808b73=_0x1dcad0;return await this[_0x808b73(0x229)][_0x808b73(0x21c)](_0x575b86,_0x453837['UNIVER_BOARD'],void 0x0,_0x285ed5)?(await this[_0x808b73(0x203)][_0x808b73(0x1fe)](_0x575b86),this[_0x808b73(0x215)][_0x808b73(0x219)](_0x575b86)):null;}async[_0x1dcad0(0x20e)](_0x4b2d6e,_0x12d2fa){const _0x55b9a3=_0x1dcad0;return await this['_dataLoaderService'][_0x55b9a3(0x21c)](_0x4b2d6e,_0x453837[_0x55b9a3(0x21a)],void 0x0,_0x12d2fa)?(await this[_0x55b9a3(0x203)][_0x55b9a3(0x1fe)](_0x4b2d6e),this[_0x55b9a3(0x215)][_0x55b9a3(0x201)](_0x4b2d6e)):null;}[_0x1dcad0(0x226)](_0xbeaaca,_0x4205ad){const _0x2660e8=_0x1dcad0;let _0x14c00a=this['_injector'][_0x2660e8(0x21f)](_0x36f1fd)[_0x2660e8(0x20f)](_0xbeaaca)[_0x2660e8(0x22d)](_0x16ef84(_0x1671a8=>_0x1671a8[_0x2660e8(0x204)]))[_0x2660e8(0x1fd)](_0x4b6d62=>_0x4205ad(Array[_0x2660e8(0x227)](_0x4b6d62[_0x2660e8(0x20b)]())));return _0x4984cf(_0x14c00a);}[_0x1dcad0(0x216)](_0x54c9e2){const _0x2d174a=_0x1dcad0;let _0x193cf0=this[_0x2d174a(0x22f)](_0x54c9e2);if(!_0x193cf0)return _0x10ce7d[_0x2d174a(0x237)];let _0x2e7e2f=this[_0x2d174a(0x203)][_0x2d174a(0x217)](_0x193cf0);return(_0x2e7e2f==null?void 0x0:_0x2e7e2f[_0x2d174a(0x20a)][_0x2d174a(0x1ef)])??_0x10ce7d[_0x2d174a(0x237)];}['flush'](_0x4cd53e,_0x1d79ea={}){const _0x57042d=_0x1dcad0;let _0x15c859=this[_0x57042d(0x22f)](_0x4cd53e);if(!_0x15c859)return Promise[_0x57042d(0x221)](Error(_0x57042d(0x212)));let _0x1133d0=this[_0x57042d(0x203)][_0x57042d(0x217)](_0x15c859);if(!_0x1133d0)return Promise[_0x57042d(0x221)](Error('[FCollaboration]:\x20Unit\x20\x22'+_0x15c859+_0x57042d(0x211)));let _0x2e00b2=_0x1133d0[_0x57042d(0x20a)][_0x57042d(0x1ef)];if(_0x2e00b2===_0x10ce7d[_0x57042d(0x1fa)])return Promise[_0x57042d(0x202)]();let _0x4806b5=b(_0x15c859,_0x2e00b2);if(_0x4806b5)return Promise[_0x57042d(0x221)](_0x4806b5);let _0x13ffa5=_0x1d79ea[_0x57042d(0x20c)]??0x7530;return new Promise((_0x2a225a,_0xc1769e)=>{const _0x475b58=_0x57042d;let _0x3dc3e2=!0x1,_0x4d1025=null,_0x51304e=setTimeout(()=>{const _0x5663f5=_0x1b85;_0x3dc3e2=!0x0,_0x4d1025==null||_0x4d1025['unsubscribe'](),_0xc1769e(Error(_0x5663f5(0x1f5)+_0x15c859+'\x22\x20after\x20'+_0x13ffa5+'ms.'));},_0x13ffa5),_0x13d332=()=>{const _0x14841=_0x1b85;_0x3dc3e2=!0x0,clearTimeout(_0x51304e),_0x4d1025==null||_0x4d1025[_0x14841(0x222)]();};_0x4d1025=_0x1133d0[_0x475b58(0x223)][_0x475b58(0x1fd)](_0x289175=>{const _0x58a519=_0x475b58;if(_0x3dc3e2)return;if(_0x289175===_0x10ce7d[_0x58a519(0x1fa)]){_0x13d332(),_0x2a225a();return;}let _0x2bce7b=b(_0x15c859,_0x289175);_0x2bce7b&&(_0x13d332(),_0xc1769e(_0x2bce7b));});});}[_0x1dcad0(0x22f)](_0x4686cd){const _0x178d30=_0x1dcad0;var _0x52c8c9;return _0x4686cd||((_0x52c8c9=this[_0x178d30(0x213)][_0x178d30(0x205)]())==null?void 0x0:_0x52c8c9[_0x178d30(0x23a)]());}};y=v([_(0x1,_0x132184(_0x2b2ef3)),_(0x2,_0xac809c),_(0x3,_0x132184(_0x1072cd)),_(0x4,_0x132184(_0x25f8f1))],y);function b(_0x42e009,_0x22ff56){const _0x1ce74f=_0x1dcad0;return _0x22ff56===_0x10ce7d[_0x1ce74f(0x1f3)]||_0x22ff56===_0x10ce7d[_0x1ce74f(0x237)]?Error(_0x1ce74f(0x1ee)+_0x42e009+_0x1ce74f(0x23e)+_0x22ff56+'.'):null;}var x=class extends _0x1b630f{['_initialize'](_0x512a7e){const _0x5779cc=_0x1dcad0;let _0x1aa43c=_0x512a7e[_0x5779cc(0x21f)](_0x25f8f1);this[_0x5779cc(0x200)](this[_0x5779cc(0x225)](this[_0x5779cc(0x21b)][_0x5779cc(0x235)],()=>{const _0x3e676d=_0x5779cc;let _0x2c4d0f=new _0x5e8abf(),_0x461be2=_0x1aa43c[_0x3e676d(0x22c)][_0x3e676d(0x1fd)](_0x222141=>{const _0x1ad205=_0x3e676d;let _0x107cbc=_0x222141[_0x1ad205(0x223)]['subscribe'](_0x35623b=>{const _0x56004e=_0x1ad205;let _0x33f4c6={'unitId':_0x222141['unitID'],'status':_0x35623b};this['fireEvent'](this[_0x56004e(0x21b)][_0x56004e(0x235)],_0x33f4c6);});_0x2c4d0f[_0x1ad205(0x220)](_0x4984cf(_0x107cbc));});return _0x2c4d0f['add'](_0x4984cf(_0x461be2)),_0x2c4d0f;}));}[_0x1dcad0(0x21d)](){const _0x26ceee=_0x1dcad0;return this[_0x26ceee(0x1f6)]['createInstance'](y,{'getWorkbook':_0x318104=>this['getWorkbook'](_0x318104),'getDocument':_0x5c5f2c=>this[_0x26ceee(0x232)](_0x5c5f2c),'getPresentation':_0x416f24=>this[_0x26ceee(0x1fb)](_0x416f24),'getBase':_0x2cd8eb=>this[_0x26ceee(0x1fc)](_0x2cd8eb),'getBoard':_0x52416a=>this['getBoard'](_0x52416a),'getPdf':_0x2b4fa4=>this[_0x26ceee(0x201)](_0x2b4fa4)});}[_0x1dcad0(0x20d)](_0x459eba,_0x549968,_0x30b626){const _0x2ec6ce=_0x1dcad0;return this[_0x2ec6ce(0x1f6)][_0x2ec6ce(0x21f)](_0x1072cd)[_0x2ec6ce(0x21c)](_0x459eba,_0x549968,_0x30b626);}[_0x1dcad0(0x239)](_0x1ac731,_0x1d2007,_0x385d80){const _0x46d0d9=_0x1dcad0;return this[_0x46d0d9(0x1f6)]['get'](_0x1072cd)[_0x46d0d9(0x210)](_0x1ac731,_0x1d2007,_0x385d80);}};_0x1b630f[_0x1dcad0(0x214)](x);export{y as FCollaboration};
1
+ const _0x410d5b=_0x2299;(function(_0x32fe73,_0x5b15dd){const _0xfdb8cd=_0x2299,_0x4bbc3b=_0x32fe73();while(!![]){try{const _0x5607b5=-parseInt(_0xfdb8cd(0x115))/0x1+parseInt(_0xfdb8cd(0x114))/0x2*(parseInt(_0xfdb8cd(0xf4))/0x3)+parseInt(_0xfdb8cd(0xf9))/0x4*(-parseInt(_0xfdb8cd(0xe5))/0x5)+-parseInt(_0xfdb8cd(0xdb))/0x6*(parseInt(_0xfdb8cd(0xc2))/0x7)+parseInt(_0xfdb8cd(0xc3))/0x8*(parseInt(_0xfdb8cd(0xf1))/0x9)+-parseInt(_0xfdb8cd(0xf6))/0xa*(parseInt(_0xfdb8cd(0xd5))/0xb)+parseInt(_0xfdb8cd(0x104))/0xc;if(_0x5607b5===_0x5b15dd)break;else _0x4bbc3b['push'](_0x4bbc3b['shift']());}catch(_0x26b34c){_0x4bbc3b['push'](_0x4bbc3b['shift']());}}}(_0x17c8,0x7a5cc));import{CollaborationController as _0x2a8fff,CollaborationStatus as _0x159c14,DataLoaderService as _0x17a7ef,MemberService as _0x1b6009}from'@univerjs-pro/collaboration-client';import{FBase as _0x533ba9,FEnum as _0xad9e32,FEventName as _0x266d9b,FUniver as _0x358fa9}from'@univerjs/core/facade';import{DisposableCollection as _0x14cdca,IUniverInstanceService as _0x41f9a5,Inject as _0x4eefcc,Injector as _0x4764a1,UniverInstanceType as _0x125bc4,toDisposable as _0x3a4c61}from'@univerjs/core';import{distinctUntilChanged as _0x407595,switchMap as _0x267a4f}from'rxjs';var g=class extends _0xad9e32{get[_0x410d5b(0x111)](){return _0x159c14;}};function _0x17c8(){const _0x5942e3=['_handler','object','get','NOT_COLLAB','loadUnit','extend','decorate','disposeWithMe','CollaborationStatus','forEach','members$','254fzmgqC','930960uicRrB','_initialize','ms.','getCollabEntities','UNIVER_SLIDE','changesetResend$','unitID','7hQHiQi','8aYVQwr','_univerInstanceService','CollaborationChangesetResend','nextDelayMs','loadPdfAsync','getCollaboration','_dataLoaderService','hasWritePending','[FCollaboration]:\x20Cannot\x20flush\x20unit\x20\x22','CollaborationStatusChanged','entityInit$','UNIVER_BASE','from','\x22\x20while\x20collaboration\x20status\x20is\x20','getPresentation','getFocusedUnit','getCollabEntity','unsubscribe','88vmNqLL','UNIVER_SHEET','readyForCollab','loadBoardAsync','elapsedMs','reject','5431134CFuFCX','resolve','getBase','_collaborationController','UNIVER_PDF','_injector','registerEventHandler','values','getBoard','subscribeCollaborators','950TUXhTY','[FCollaboration]:\x20Timed\x20out\x20flushing\x20unit\x20\x22','createInstance','getPdf','localChanges','UNIVER_DOC','state','_resolveUnitId','defineProperty','flush','reason','length','5697504hBfoSf','pipe','subscribe','4575cdCtqo','loadServerUnit','1176590voFuql','CollaborationConflict','message','16084PTEbhy','getDocument','unsyncedMutationCount','timeout','status$','loadUnitOfRevision','Event','loadSheetAsync','fireEvent','revert','status','38590512sSroQy','\x22\x20is\x20not\x20in\x20collaboration\x20mode.','UNIVER_BOARD','SYNCED','add'];_0x17c8=function(){return _0x5942e3;};return _0x17c8();}function _0x2299(_0x591584,_0xbed972){_0x591584=_0x591584-0xc2;const _0x17c8c3=_0x17c8();let _0x229966=_0x17c8c3[_0x591584];return _0x229966;}_0xad9e32[_0x410d5b(0x10e)](g);var _=class extends _0x266d9b{get['CollaborationStatusChanged'](){const _0x2058d5=_0x410d5b;return _0x2058d5(0xcc);}get[_0x410d5b(0xf7)](){return'CollaborationConflict';}get[_0x410d5b(0xc5)](){const _0x11fcbc=_0x410d5b;return _0x11fcbc(0xc5);}};_0x266d9b[_0x410d5b(0x10e)](_);function v(_0x2f7ad3,_0x1a73ee){return function(_0x5dd72a,_0x35a5ae){_0x1a73ee(_0x5dd72a,_0x35a5ae,_0x2f7ad3);};}function y(_0x4488a8,_0x54948a,_0x22081c,_0x49f6b6){const _0x3b3fc1=_0x410d5b;var _0x4a2090=arguments[_0x3b3fc1(0xf0)],_0x4ef684=_0x4a2090<0x3?_0x54948a:_0x49f6b6===null?_0x49f6b6=Object['getOwnPropertyDescriptor'](_0x54948a,_0x22081c):_0x49f6b6,_0x736e4d;if(typeof Reflect==_0x3b3fc1(0x10a)&&typeof Reflect[_0x3b3fc1(0x10f)]=='function')_0x4ef684=Reflect[_0x3b3fc1(0x10f)](_0x4488a8,_0x54948a,_0x22081c,_0x49f6b6);else{for(var _0x575af3=_0x4488a8['length']-0x1;_0x575af3>=0x0;_0x575af3--)(_0x736e4d=_0x4488a8[_0x575af3])&&(_0x4ef684=(_0x4a2090<0x3?_0x736e4d(_0x4ef684):_0x4a2090>0x3?_0x736e4d(_0x54948a,_0x22081c,_0x4ef684):_0x736e4d(_0x54948a,_0x22081c))||_0x4ef684);}return _0x4a2090>0x3&&_0x4ef684&&Object[_0x3b3fc1(0xed)](_0x54948a,_0x22081c,_0x4ef684),_0x4ef684;}let b=class extends _0x533ba9{constructor(_0x2dd415,_0x51d40b,_0x26544f,_0x2a7510,_0x5323d3){const _0x1c2de1=_0x410d5b;super(),this[_0x1c2de1(0x109)]=_0x2dd415,this[_0x1c2de1(0xe0)]=_0x51d40b,this[_0x1c2de1(0xc4)]=_0x26544f,this[_0x1c2de1(0xc9)]=_0x2a7510,this[_0x1c2de1(0xde)]=_0x5323d3;}async[_0x410d5b(0x100)](_0x2bd3e6,_0x3cbf71){const _0x255403=_0x410d5b;return await this[_0x255403(0xc9)][_0x255403(0x10d)](_0x2bd3e6,_0x125bc4[_0x255403(0xd6)],void 0x0,_0x3cbf71)?(await this[_0x255403(0xde)][_0x255403(0xd7)](_0x2bd3e6),this[_0x255403(0x109)]['getWorkbook'](_0x2bd3e6)):null;}async['loadDocAsync'](_0x40d02e,_0xfd6e6d){const _0x1d37b8=_0x410d5b;return await this[_0x1d37b8(0xc9)][_0x1d37b8(0x10d)](_0x40d02e,_0x125bc4[_0x1d37b8(0xea)],void 0x0,_0xfd6e6d)?(await this[_0x1d37b8(0xde)]['readyForCollab'](_0x40d02e),this[_0x1d37b8(0x109)][_0x1d37b8(0xfa)](_0x40d02e)):null;}async['loadBaseAsync'](_0x1546fd,_0x30d226){const _0x863d3f=_0x410d5b;return await this[_0x863d3f(0xc9)][_0x863d3f(0x10d)](_0x1546fd,_0x125bc4[_0x863d3f(0xce)],void 0x0,_0x30d226)?(await this[_0x863d3f(0xde)][_0x863d3f(0xd7)](_0x1546fd),this[_0x863d3f(0x109)][_0x863d3f(0xdd)](_0x1546fd)):null;}async['loadSlideAsync'](_0x2f22fa,_0x2b9061){const _0x2e6c82=_0x410d5b;return await this[_0x2e6c82(0xc9)][_0x2e6c82(0x10d)](_0x2f22fa,_0x125bc4[_0x2e6c82(0x119)],void 0x0,_0x2b9061)?(await this[_0x2e6c82(0xde)][_0x2e6c82(0xd7)](_0x2f22fa),this[_0x2e6c82(0x109)][_0x2e6c82(0xd1)](_0x2f22fa)):null;}async[_0x410d5b(0xd8)](_0x456c1e,_0x14159d){const _0x5460bc=_0x410d5b;return await this[_0x5460bc(0xc9)][_0x5460bc(0x10d)](_0x456c1e,_0x125bc4[_0x5460bc(0x106)],void 0x0,_0x14159d)?(await this[_0x5460bc(0xde)][_0x5460bc(0xd7)](_0x456c1e),this[_0x5460bc(0x109)][_0x5460bc(0xe3)](_0x456c1e)):null;}async[_0x410d5b(0xc7)](_0x3118f2,_0x48c236){const _0xbd66ef=_0x410d5b;return await this[_0xbd66ef(0xc9)][_0xbd66ef(0x10d)](_0x3118f2,_0x125bc4[_0xbd66ef(0xdf)],void 0x0,_0x48c236)?(await this[_0xbd66ef(0xde)][_0xbd66ef(0xd7)](_0x3118f2),this[_0xbd66ef(0x109)][_0xbd66ef(0xe8)](_0x3118f2)):null;}[_0x410d5b(0xe4)](_0x27e996,_0x2caca8){const _0x1ab4ff=_0x410d5b;let _0x51190b=this[_0x1ab4ff(0xe0)][_0x1ab4ff(0x10b)](_0x1b6009)['waitForRoom$'](_0x27e996)[_0x1ab4ff(0xf2)](_0x267a4f(_0x133e74=>_0x133e74[_0x1ab4ff(0x113)]))[_0x1ab4ff(0xf3)](_0x192a7a=>_0x2caca8(Array[_0x1ab4ff(0xcf)](_0x192a7a[_0x1ab4ff(0xe2)]())));return _0x3a4c61(_0x51190b);}['getCollaborationStatus'](_0x497ad3){const _0x136368=_0x410d5b;let _0x138e09=this[_0x136368(0xec)](_0x497ad3);if(!_0x138e09)return _0x159c14[_0x136368(0x10c)];let _0x43ef76=this[_0x136368(0xde)]['getCollabEntity'](_0x138e09);return(_0x43ef76==null?void 0x0:_0x43ef76[_0x136368(0xeb)][_0x136368(0x103)])??_0x159c14[_0x136368(0x10c)];}['hasWritePending'](_0x88ec8a){const _0x1b6740=_0x410d5b;let _0x3dadd7=this[_0x1b6740(0xec)](_0x88ec8a);return _0x3dadd7?this[_0x1b6740(0xde)][_0x1b6740(0xca)](_0x3dadd7):!0x1;}[_0x410d5b(0xee)](_0x3148d4,_0x43b08e={}){const _0x475e66=_0x410d5b;let _0x572d53=this[_0x475e66(0xec)](_0x3148d4);if(!_0x572d53)return Promise[_0x475e66(0xda)](Error('[FCollaboration]:\x20Cannot\x20flush\x20because\x20no\x20unit\x20is\x20focused\x20or\x20specified.'));let _0x35faeb=this[_0x475e66(0xde)][_0x475e66(0xd3)](_0x572d53);if(!_0x35faeb)return Promise['reject'](Error('[FCollaboration]:\x20Unit\x20\x22'+_0x572d53+_0x475e66(0x105)));let _0x413af2=_0x35faeb[_0x475e66(0xeb)][_0x475e66(0x103)];if(_0x413af2===_0x159c14['SYNCED'])return Promise[_0x475e66(0xdc)]();let _0x11374a=x(_0x572d53,_0x413af2);if(_0x11374a)return Promise[_0x475e66(0xda)](_0x11374a);let _0xf15082=_0x43b08e[_0x475e66(0xfc)]??0x7530;return new Promise((_0x261ae9,_0x5c900e)=>{const _0x1b57f3=_0x475e66;let _0x563daa=!0x1,_0x47d226=null,_0x52409c=setTimeout(()=>{const _0x45043a=_0x2299;_0x563daa=!0x0,_0x47d226==null||_0x47d226[_0x45043a(0xd4)](),_0x5c900e(Error(_0x45043a(0xe6)+_0x572d53+'\x22\x20after\x20'+_0xf15082+_0x45043a(0x117)));},_0xf15082),_0x524445=()=>{const _0x15319f=_0x2299;_0x563daa=!0x0,clearTimeout(_0x52409c),_0x47d226==null||_0x47d226[_0x15319f(0xd4)]();};_0x47d226=_0x35faeb['status$'][_0x1b57f3(0xf3)](_0x1ffd54=>{const _0x30d936=_0x1b57f3;if(_0x563daa)return;if(_0x1ffd54===_0x159c14[_0x30d936(0x107)]){_0x524445(),_0x261ae9();return;}let _0x102adf=x(_0x572d53,_0x1ffd54);_0x102adf&&(_0x524445(),_0x5c900e(_0x102adf));});});}[_0x410d5b(0xec)](_0x43a93e){const _0x1fe3d8=_0x410d5b;var _0x33c22e;return _0x43a93e||((_0x33c22e=this[_0x1fe3d8(0xc4)][_0x1fe3d8(0xd2)]())==null?void 0x0:_0x33c22e['getUnitId']());}};b=y([v(0x1,_0x4eefcc(_0x4764a1)),v(0x2,_0x41f9a5),v(0x3,_0x4eefcc(_0x17a7ef)),v(0x4,_0x4eefcc(_0x2a8fff))],b);function x(_0x3bcdd7,_0x10c495){const _0x480e21=_0x410d5b;return _0x10c495===_0x159c14['CONFLICT']||_0x10c495===_0x159c14['NOT_COLLAB']?Error(_0x480e21(0xcb)+_0x3bcdd7+_0x480e21(0xd0)+_0x10c495+'.'):null;}var S=class extends _0x358fa9{[_0x410d5b(0x116)](_0x5aaf35){const _0x3d7b07=_0x410d5b;let _0x3d970a=_0x5aaf35[_0x3d7b07(0x10b)](_0x2a8fff);this[_0x3d7b07(0x110)](this[_0x3d7b07(0xe1)](this[_0x3d7b07(0xff)][_0x3d7b07(0xcc)],()=>{const _0x228c23=_0x3d7b07;let _0x5aa06a=new _0x14cdca(),_0x301f6d=_0xa1ee37=>{const _0x44e000=_0x2299;let _0x2d419d=_0xa1ee37[_0x44e000(0xfd)][_0x44e000(0xf2)](_0x407595())[_0x44e000(0xf3)](_0xca8c21=>{const _0x12dd23=_0x44e000;let _0x1c0e5c={'unitId':_0xa1ee37['unitID'],'status':_0xca8c21};this['fireEvent'](this['Event'][_0x12dd23(0xcc)],_0x1c0e5c);});_0x5aa06a['add'](_0x3a4c61(_0x2d419d));};return _0x3d970a[_0x228c23(0x118)]()['forEach'](_0x301f6d),_0x5aa06a[_0x228c23(0x108)](_0x3a4c61(_0x3d970a[_0x228c23(0xcd)][_0x228c23(0xf3)](_0x301f6d))),_0x5aa06a;})),this[_0x3d7b07(0x110)](this[_0x3d7b07(0xe1)](this[_0x3d7b07(0xff)][_0x3d7b07(0xf7)],()=>{const _0x5b2fc8=_0x3d7b07;let _0x31c8a8=new _0x14cdca(),_0x45595e=_0x519ac6=>{let _0x20afd7=_0x519ac6['conflict$']['subscribe'](_0x534b1e=>{const _0x4afd3d=_0x2299;let _0x43947b={'unitId':_0x534b1e[_0x4afd3d(0x11b)],'reason':_0x534b1e[_0x4afd3d(0xef)],'message':_0x534b1e[_0x4afd3d(0xf8)],'revert':_0x534b1e[_0x4afd3d(0x102)],'localChanges':_0x534b1e[_0x4afd3d(0xe9)],'cacheCleared':_0x534b1e['cacheCleared']};this['fireEvent'](this[_0x4afd3d(0xff)][_0x4afd3d(0xf7)],_0x43947b);});_0x31c8a8['add'](_0x3a4c61(_0x20afd7));};return _0x3d970a[_0x5b2fc8(0x118)]()[_0x5b2fc8(0x112)](_0x45595e),_0x31c8a8[_0x5b2fc8(0x108)](_0x3a4c61(_0x3d970a[_0x5b2fc8(0xcd)][_0x5b2fc8(0xf3)](_0x45595e))),_0x31c8a8;})),this[_0x3d7b07(0x110)](this['registerEventHandler'](this[_0x3d7b07(0xff)][_0x3d7b07(0xc5)],()=>{const _0x4f7982=_0x3d7b07;let _0x5d41ea=new _0x14cdca(),_0x4f9757=_0x3d066a=>{const _0x2a0882=_0x2299;let _0x2d7083=_0x3d066a[_0x2a0882(0x11a)][_0x2a0882(0xf3)](_0x334495=>{const _0x43d166=_0x2a0882;let _0xa8ccbe={'unitId':_0x334495['unitID'],'reqId':_0x334495['reqId'],'reason':_0x334495[_0x43d166(0xef)],'attempt':_0x334495['attempt'],'elapsedMs':_0x334495[_0x43d166(0xd9)],'unsyncedMutationCount':_0x334495[_0x43d166(0xfb)],'nextDelayMs':_0x334495[_0x43d166(0xc6)]};this[_0x43d166(0x101)](this[_0x43d166(0xff)][_0x43d166(0xc5)],_0xa8ccbe);});_0x5d41ea['add'](_0x3a4c61(_0x2d7083));};return _0x3d970a[_0x4f7982(0x118)]()[_0x4f7982(0x112)](_0x4f9757),_0x5d41ea[_0x4f7982(0x108)](_0x3a4c61(_0x3d970a[_0x4f7982(0xcd)][_0x4f7982(0xf3)](_0x4f9757))),_0x5d41ea;}));}[_0x410d5b(0xc8)](){const _0x36907f=_0x410d5b;return this[_0x36907f(0xe0)][_0x36907f(0xe7)](b,{'getWorkbook':_0x53a33a=>this['getWorkbook'](_0x53a33a),'getDocument':_0x48c44d=>this['getDocument'](_0x48c44d),'getPresentation':_0x38ee43=>this[_0x36907f(0xd1)](_0x38ee43),'getBase':_0x4bd2c8=>this[_0x36907f(0xdd)](_0x4bd2c8),'getBoard':_0x578a70=>this[_0x36907f(0xe3)](_0x578a70),'getPdf':_0x2584cf=>this[_0x36907f(0xe8)](_0x2584cf)});}[_0x410d5b(0xf5)](_0x1912d7,_0x56b5ff,_0x213d41){const _0x2e1fb7=_0x410d5b;return this[_0x2e1fb7(0xe0)]['get'](_0x17a7ef)[_0x2e1fb7(0x10d)](_0x1912d7,_0x56b5ff,_0x213d41);}['loadServerUnitOfRevision'](_0x31f456,_0x329965,_0x4bf597){const _0xa6ba48=_0x410d5b;return this[_0xa6ba48(0xe0)]['get'](_0x17a7ef)[_0xa6ba48(0xfe)](_0x31f456,_0x329965,_0x4bf597);}};_0x358fa9['extend'](S);export{b as FCollaboration};