@ckeditor/ckeditor5-real-time-collaboration 36.0.1 → 37.0.0-rc.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 (48) hide show
  1. package/build/real-time-collaboration.js +1 -1
  2. package/package.json +22 -5
  3. package/src/augmentation.d.ts +57 -0
  4. package/src/augmentation.js +23 -0
  5. package/src/common-translations.d.ts +5 -0
  6. package/src/common-translations.js +1 -1
  7. package/src/config.d.ts +33 -0
  8. package/src/config.js +23 -0
  9. package/src/index.d.ts +9 -0
  10. package/src/index.js +1 -1
  11. package/src/presencelist/presencelistui.d.ts +38 -0
  12. package/src/presencelist/presencelistui.js +1 -1
  13. package/src/presencelist/view/presencecounterview.d.ts +7 -0
  14. package/src/presencelist/view/presencecounterview.js +1 -1
  15. package/src/presencelist/view/presencedropdownlistitemview.d.ts +7 -0
  16. package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
  17. package/src/presencelist/view/presencedropdownlistview.d.ts +6 -0
  18. package/src/presencelist/view/presencedropdownlistview.js +1 -1
  19. package/src/presencelist/view/presenceinlinelistitemview.d.ts +14 -0
  20. package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
  21. package/src/presencelist/view/presenceinlinelistview.d.ts +7 -0
  22. package/src/presencelist/view/presenceinlinelistview.js +1 -1
  23. package/src/presencelist/view/presencelistview.d.ts +11 -0
  24. package/src/presencelist/view/presencelistview.js +1 -1
  25. package/src/presencelist.d.ts +22 -0
  26. package/src/presencelist.js +1 -1
  27. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.d.ts +42 -0
  28. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
  29. package/src/realtimecollaborativecomments.d.ts +29 -0
  30. package/src/realtimecollaborativecomments.js +1 -1
  31. package/src/realtimecollaborativeediting/realtimecollaborationclient.d.ts +119 -0
  32. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
  33. package/src/realtimecollaborativeediting/sessions.d.ts +114 -0
  34. package/src/realtimecollaborativeediting/sessions.js +1 -1
  35. package/src/realtimecollaborativeediting/usermarkers.d.ts +31 -0
  36. package/src/realtimecollaborativeediting/usermarkers.js +1 -1
  37. package/src/realtimecollaborativeediting/websocketgateway.d.ts +51 -0
  38. package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
  39. package/src/realtimecollaborativeediting.d.ts +21 -0
  40. package/src/realtimecollaborativeediting.js +1 -1
  41. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.d.ts +38 -0
  42. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
  43. package/src/realtimecollaborativerevisionhistory.d.ts +23 -0
  44. package/src/realtimecollaborativerevisionhistory.js +1 -1
  45. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.d.ts +34 -0
  46. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
  47. package/src/realtimecollaborativetrackchanges.d.ts +21 -0
  48. package/src/realtimecollaborativetrackchanges.js +1 -1
@@ -0,0 +1,31 @@
1
+ import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
2
+ import '../../theme/usermarkers.css';
3
+ /**
4
+ * This plugin:
5
+ *
6
+ * 1. Creates marker operations with current user selection on demand.
7
+ * 2. Renders clients selection markers.
8
+ *
9
+ * This plugin does not create markers automatically, instead it provides an API for it {@link #createUserMarkerOperations}.
10
+ * {@link RealTimeCollaborationClient} uses this API to create user selection operations in the most optimal moment
11
+ * (as the last operation in the operations package) - this is to reach the best compression result.
12
+ */
13
+ export default class UserMarkers extends Plugin {
14
+ /**
15
+ * @inheritDoc
16
+ */
17
+ static get requires(): PluginDependencies;
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get pluginName(): 'UserMarkers';
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ init(): void;
26
+ afterInit(): void;
27
+ /**
28
+ * Creates marker operations with current user selection.
29
+ */
30
+ createUserMarkerOperations(): void;
31
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x3e9a=['delete','getAttribute','getStart','createUIElement','getUserBySessionId','markerName','mySessionId','getCustomProperty','markers','type','enqueueChange','parent','model','editingDowncast','$graveyard','applyOperation','document','getNearestSelectionRange','for','orderNumber','toDomElement','change:range','editor','createRange','getContainedElement','clear','user:range:','root','user:position','selection','deletionPosition','batch','addMarker','startsWith','view','getFirstRange','removeMarker','oldRange','init','reconvertMarker','isLimit','conversion','name','has','$text','user:','userPositionMarker','isSimilar','isObject','undo','updateMarker','marker','setCustomProperty','split','toRange','start','newRange','checkChild','editing','&#8203;<span\x20class=\x22ck-user__marker-line\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span>','user:range','size','isInline','rootName','tableCell','requires','getSelectionClass','nodeAfter','get','getMarkerClass','end','detach','afterInit','user:position:','data-session-id','getRange','ck-user__marker\x20','plugins','schema','getPositions','color','markerToHighlight','update:user:range'];(function(_0x27bfbe,_0x3e9a0b){const _0x2f831f=function(_0x104f14){while(--_0x104f14){_0x27bfbe['push'](_0x27bfbe['shift']());}};_0x2f831f(++_0x3e9a0b);}(_0x3e9a,0x10b));const _0x2f83=function(_0x27bfbe,_0x3e9a0b){_0x27bfbe=_0x27bfbe-0x0;let _0x2f831f=_0x3e9a[_0x27bfbe];return _0x2f831f;};import{Plugin as _0x3c6c32}from'ckeditor5/src/core';import _0x391dc6 from'./sessions';import{LiveRange as _0x36a33d}from'ckeditor5/src/engine';import'../../theme/usermarkers.css';export default class U extends _0x3c6c32{static get[_0x2f83('0x2f')](){return[_0x391dc6];}static get['pluginName'](){return'UserMarkers';}[_0x2f83('0x14')](){const _0x278941=this['editor'],_0x3a803e=_0x278941[_0x2f83('0x3b')][_0x2f83('0x32')](_0x391dc6);_0x278941['conversion'][_0x2f83('0x0')](_0x2f83('0x4e'))['markerToElement']({'model':_0x2f83('0xa'),'view':(_0x405a62,{writer:_0x5de15c})=>function(_0x17933a,_0x1ffe06,_0x4db041,_0x5966aa){const _0x2be231=_0x17933a[_0x2f83('0x46')][_0x2f83('0x23')](':')[0x2],_0x508d05=_0x4db041[_0x2f83('0x45')](_0x2be231);if(!_0x508d05||_0x2be231===_0x4db041[_0x2f83('0x47')])return;if(!_0x5966aa[_0x2f83('0x4d')][_0x2f83('0x3c')][_0x2f83('0x27')](_0x17933a['markerRange'][_0x2f83('0x25')],_0x2f83('0x1a')))return;const _0x394770={'class':_0x2f83('0x3a')+_0x508d05[_0x2f83('0x3e')][_0x2f83('0x33')](),'data-name':_0x508d05[_0x2f83('0x18')],'data-session-id':_0x2be231},_0x24145d=_0x5966aa[_0x2f83('0x4d')]['markers']['get'](_0x17933a['markerName']),_0x24bc5b=_0x24145d[_0x2f83('0x43')](),_0xc2287c=_0x24bc5b[_0x2f83('0x31')],_0x439ab3=_0x5966aa[_0x2f83('0x4d')][_0x2f83('0x3c')];if(_0xc2287c&&_0x439ab3[_0x2f83('0x1e')](_0xc2287c)&&_0x439ab3[_0x2f83('0x2c')](_0xc2287c)&&!_0x5966aa[_0x2f83('0x4d')][_0x2f83('0x49')]['get'](_0x2f83('0x8')+_0x2be231)[_0x2f83('0x39')]()['isCollapsed'])return;const _0x1d35bb=_0x24bc5b[_0x2f83('0x4c')];_0x5966aa[_0x2f83('0x4d')][_0x2f83('0x3c')][_0x2f83('0x16')](_0x1d35bb)&&!_0x5966aa[_0x2f83('0x4d')]['hasContent'](_0x1d35bb)&&(_0x394770['contenteditable']=!0x1);const _0x29014e=function(_0x2f573a,_0xec215e){const _0x135824=_0x2f573a[_0x2f83('0x44')]('span',_0xec215e);return _0x2f573a[_0x2f83('0x22')](_0x2f83('0x1c'),!0x0,_0x135824),_0x135824['render']=function(_0x31deec){const _0x5bc1e3=this[_0x2f83('0x2')](_0x31deec);return _0x5bc1e3['innerHTML']=_0x2f83('0x29'),_0x5bc1e3;},_0x135824[_0x2f83('0x1d')]=function(_0x1c9507){return this['getCustomProperty'](_0x2f83('0x1c'))&&_0x1c9507[_0x2f83('0x48')](_0x2f83('0x1c'))&&this['getAttribute'](_0x2f83('0x38'))==_0x1c9507[_0x2f83('0x42')](_0x2f83('0x38'));},_0x135824;}(_0x1ffe06,_0x394770);return _0x29014e['priority']=0x3e8+_0x508d05[_0x2f83('0x1')],_0x29014e;}(_0x405a62,_0x5de15c,_0x3a803e,_0x278941)}),_0x278941[_0x2f83('0x17')][_0x2f83('0x0')](_0x2f83('0x4e'))[_0x2f83('0x3f')]({'model':_0x2f83('0x2a'),'view':_0x51dfcf=>function(_0x5040ed,_0x1548f4){const _0x3b5a14=_0x5040ed[_0x2f83('0x46')][_0x2f83('0x23')](':')[0x2];if(_0x3b5a14===_0x1548f4[_0x2f83('0x47')])return;const _0x30fa89=_0x1548f4['getUserBySessionId'](_0x3b5a14);if(!_0x30fa89)return{'id':_0x3b5a14};return{'id':_0x3b5a14,'classes':['ck-user__selection',_0x30fa89[_0x2f83('0x3e')][_0x2f83('0x30')]()],'attributes':{'data-session-id':_0x3b5a14},'priority':0x7d0+_0x30fa89[_0x2f83('0x1')]};}(_0x51dfcf,_0x3a803e)}),function(_0x25c585){const _0xe91d5f=_0x25c585[_0x2f83('0x4d')],_0x3ece8e=new Map(),_0x42181e=_0x25c585[_0x2f83('0x3b')][_0x2f83('0x32')](_0x391dc6);_0xe91d5f[_0x2f83('0x49')]['on'](_0x2f83('0x40'),(_0x40fe63,_0x197698,_0x4a79b7,_0x32699c)=>{if(!_0x32699c&&_0x3ece8e['get'](_0x197698[_0x2f83('0x18')]))return _0x3ece8e[_0x2f83('0x32')](_0x197698[_0x2f83('0x18')])[_0x2f83('0x35')](),void _0x3ece8e[_0x2f83('0x41')](_0x197698[_0x2f83('0x18')]);const _0x263350=_0x197698[_0x2f83('0x18')]['split'](':')[0x2];if(_0x263350===_0x42181e[_0x2f83('0x47')])return;const _0x552fb4=_0x2f83('0x37')+_0x263350;_0xe91d5f[_0x2f83('0x49')][_0x2f83('0x19')](_0x552fb4)&&_0x25c585['editing'][_0x2f83('0x15')](_0x552fb4),_0x197698['on'](_0x2f83('0x3'),(_0x20d4b7,_0x269b10,_0x24886b)=>{if(_0x2f83('0x4f')!=_0x269b10[_0x2f83('0x9')][_0x2f83('0x2d')]&&_0x2f83('0x4f')==_0x197698[_0x2f83('0x39')]()[_0x2f83('0x9')][_0x2f83('0x2d')]&&!_0x3ece8e[_0x2f83('0x19')](_0x197698['name'])){const _0x1b214e=_0xe91d5f['schema']['getNearestSelectionRange'](_0x24886b[_0x2f83('0xc')]);if(_0x1b214e){const _0x173d5c=_0x36a33d['fromRange'](_0x1b214e);_0x3ece8e['set'](_0x197698[_0x2f83('0x18')],_0x173d5c),_0x173d5c['on'](_0x2f83('0x3'),(_0x398059,_0x56db8e,_0x42eda1)=>{if(_0x2f83('0x4f')==_0x173d5c['root'][_0x2f83('0x2d')]){const _0x1246f2=_0xe91d5f['schema'][_0x2f83('0x52')](_0x42eda1[_0x2f83('0xc')]);_0x1246f2?(_0x173d5c[_0x2f83('0x25')]=_0x1246f2[_0x2f83('0x25')],_0x173d5c[_0x2f83('0x34')]=_0x1246f2['end']):(_0x3ece8e[_0x2f83('0x41')](_0x197698['name']),_0x173d5c[_0x2f83('0x35')]());}});}}});}),_0xe91d5f[_0x2f83('0x51')]['on']('change',()=>{_0x3ece8e[_0x2f83('0x2b')]>0x0&&_0xe91d5f[_0x2f83('0x4b')]({'isUndoable':!0x1},_0x63b7c7=>{for(const [_0x20eaf1,_0x1a0722]of _0x3ece8e)_0x2f83('0x4f')==_0xe91d5f[_0x2f83('0x49')][_0x2f83('0x32')](_0x20eaf1)[_0x2f83('0x39')]()[_0x2f83('0x9')][_0x2f83('0x2d')]&&(q(_0x20eaf1[_0x2f83('0x23')](':')[0x2],_0x1a0722[_0x2f83('0x24')](),_0xe91d5f,_0x63b7c7),_0x1a0722[_0x2f83('0x35')]());_0x3ece8e[_0x2f83('0x7')]();});});}(_0x278941);}[_0x2f83('0x36')](){const _0x1de7bf=this[_0x2f83('0x4')],_0x54b459=_0x1de7bf['commands'][_0x2f83('0x32')](_0x2f83('0x1f'));_0x54b459&&_0x1de7bf[_0x2f83('0x4d')]['on'](_0x2f83('0x50'),(_0x2d3ce9,_0x57e0af)=>{const _0x13ec54=_0x57e0af[0x0];if(_0x2f83('0x21')!=_0x13ec54[_0x2f83('0x4a')]||!_0x13ec54[_0x2f83('0x18')][_0x2f83('0xf')](_0x2f83('0x1b')))return;const _0x335144=_0x13ec54[_0x2f83('0xd')];_0x54b459['_createdBatches'][_0x2f83('0x19')](_0x335144)&&(_0x13ec54[_0x2f83('0x26')]=_0x13ec54['oldRange']?_0x1de7bf[_0x2f83('0x4d')][_0x2f83('0x5')](_0x13ec54['oldRange'][_0x2f83('0x25')],_0x13ec54[_0x2f83('0x13')]['end']):null);},{'priority':'highest'});}['createUserMarkerOperations'](){const _0x38daf6=this[_0x2f83('0x4')],_0x24880f=_0x38daf6[_0x2f83('0x4d')][_0x2f83('0x51')],_0x306f48=_0x38daf6['plugins'][_0x2f83('0x32')](_0x391dc6);_0x38daf6[_0x2f83('0x4d')][_0x2f83('0x4b')]({'isUndoable':!0x1},_0x58f03c=>{const _0x376fe8=_0x2f83('0x8')+_0x306f48['mySessionId'],_0x14a9dd=_0x2f83('0x37')+_0x306f48[_0x2f83('0x47')],_0x1bdc8f=_0x38daf6['model'][_0x2f83('0x49')][_0x2f83('0x19')](_0x376fe8);_0x38daf6[_0x2f83('0x28')][_0x2f83('0x10')]['hasDomSelection']?q(_0x306f48[_0x2f83('0x47')],_0x24880f[_0x2f83('0xb')][_0x2f83('0x11')](),_0x38daf6['model'],_0x58f03c):_0x1bdc8f&&(_0x58f03c[_0x2f83('0x12')](_0x376fe8),_0x58f03c['removeMarker'](_0x14a9dd));});}}function q(_0x14972a,_0x2f236a,_0x2083d0,_0x25cd75){const _0x4373b1=_0x2f83('0x8')+_0x14972a,_0x3bb2c6='user:position:'+_0x14972a,_0x12602b=_0x2f236a[_0x2f83('0x6')]();let _0x59594a=_0x2f236a[_0x2f83('0x25')];_0x12602b&&_0x12602b['is']('element',_0x2f83('0x2e'))&&(_0x59594a=function(_0x1f792d,_0x5afe08){for(const _0x522492 of _0x1f792d[_0x2f83('0x3d')]())if(_0x5afe08[_0x2f83('0x3c')][_0x2f83('0x27')](_0x522492,_0x2f83('0x1a')))return _0x522492;}(_0x2f236a,_0x2083d0),_0x2f236a=_0x25cd75[_0x2f83('0x5')](_0x59594a)),_0x59594a=_0x25cd75['createRange'](_0x59594a),_0x2083d0[_0x2f83('0x49')][_0x2f83('0x19')](_0x4373b1)?(_0x25cd75[_0x2f83('0x20')](_0x4373b1,{'range':_0x2f236a}),_0x25cd75[_0x2f83('0x20')](_0x3bb2c6,{'range':_0x59594a})):(_0x25cd75[_0x2f83('0xe')](_0x4373b1,{'range':_0x2f236a,'usingOperation':!0x0}),_0x25cd75[_0x2f83('0xe')](_0x3bb2c6,{'range':_0x59594a,'usingOperation':!0x0}));}
23
+ const _0x2e0a=['get','$graveyard','mySessionId','root','view','updateMarker','markers','isLimit','getRange','editor','nodeAfter','innerHTML','deletionPosition','user:','userPositionMarker','getStart','editing','toRange','isSimilar','removeMarker','toDomElement','render','pluginName','enqueueChange','detach','getContainedElement','applyOperation','start','change','afterInit','for','oldRange','createRange','name','isCollapsed','user:position:','highest','user:range:','getMarkerClass','split','_createdBatches','$text','setCustomProperty','batch','model','plugins','tableCell','ck-user__marker\x20','ck-user__selection','document','getNearestSelectionRange','hasContent','createUIElement','marker','isInline','getUserBySessionId','orderNumber','startsWith','rootName','user:position','markerRange','end','change:range','getSelectionClass','newRange','parent','user:range','getAttribute','markerName','conversion','schema','data-session-id','element','init','checkChild','color','clear','addMarker','has','getCustomProperty','delete','getFirstRange'];(function(_0x548a60,_0x2e0af4){const _0x434f8e=function(_0x140279){while(--_0x140279){_0x548a60['push'](_0x548a60['shift']());}};_0x434f8e(++_0x2e0af4);}(_0x2e0a,0x1c7));const _0x434f=function(_0x548a60,_0x2e0af4){_0x548a60=_0x548a60-0x0;let _0x434f8e=_0x2e0a[_0x548a60];return _0x434f8e;};import{Plugin as _0x4c8482}from'ckeditor5/src/core';import _0x4d5d93 from'./sessions';import{LiveRange as _0x5520e0}from'ckeditor5/src/engine';import'../../theme/usermarkers.css';export default class P extends _0x4c8482{static get['requires'](){return[_0x4d5d93];}static get[_0x434f('0x3b')](){return'UserMarkers';}[_0x434f('0x1c')](){const _0x40cc65=this[_0x434f('0x2e')],_0x2c17b4=_0x40cc65['plugins'][_0x434f('0x25')](_0x4d5d93);_0x40cc65[_0x434f('0x18')][_0x434f('0x43')]('editingDowncast')['markerToElement']({'model':_0x434f('0xe'),'view':(_0x497ac1,{writer:_0x3c7b14})=>function(_0x455c3d,_0x274829,_0x81433,_0x141dc0){const _0x3a2f92=_0x455c3d['markerName'][_0x434f('0x4c')](':')[0x2],_0x43331f=_0x81433['getUserBySessionId'](_0x3a2f92);if(!_0x43331f||_0x3a2f92===_0x81433[_0x434f('0x27')])return;if(!_0x141dc0[_0x434f('0x51')][_0x434f('0x19')][_0x434f('0x1d')](_0x455c3d[_0x434f('0xf')][_0x434f('0x40')],_0x434f('0x4e')))return;const _0x867154={'class':_0x434f('0x2')+_0x43331f[_0x434f('0x1e')][_0x434f('0x4b')](),'data-name':_0x43331f[_0x434f('0x46')],'data-session-id':_0x3a2f92},_0x1f5ed3=_0x141dc0[_0x434f('0x51')][_0x434f('0x2b')][_0x434f('0x25')](_0x455c3d[_0x434f('0x17')]),_0x581b88=_0x1f5ed3[_0x434f('0x34')](),_0xba8dad=_0x581b88[_0x434f('0x2f')],_0xdc7967=_0x141dc0[_0x434f('0x51')]['schema'];if(_0xba8dad&&_0xdc7967['isObject'](_0xba8dad)&&_0xdc7967[_0x434f('0x9')](_0xba8dad)&&!_0x141dc0[_0x434f('0x51')][_0x434f('0x2b')]['get'](_0x434f('0x4a')+_0x3a2f92)['getRange']()[_0x434f('0x47')])return;const _0x7b08ed=_0x581b88[_0x434f('0x14')];return _0x141dc0[_0x434f('0x51')]['schema'][_0x434f('0x2c')](_0x7b08ed)&&!_0x141dc0[_0x434f('0x51')][_0x434f('0x6')](_0x7b08ed)&&(_0x867154['contenteditable']=!0x1),function(_0x3b2f68,_0x49b8cc){const _0x3126ff=_0x3b2f68[_0x434f('0x7')]('span',_0x49b8cc);return _0x3b2f68[_0x434f('0x4f')](_0x434f('0x33'),!0x0,_0x3126ff),_0x3126ff[_0x434f('0x3a')]=function(_0x7e99ff){const _0x3b444f=this[_0x434f('0x39')](_0x7e99ff);return _0x3b444f[_0x434f('0x30')]='&#8203;<span\x20class=\x22ck-user__marker-line\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span>',_0x3b444f;},_0x3126ff[_0x434f('0x37')]=function(_0x3f6019){return!(!this[_0x434f('0x22')]('userPositionMarker')||!_0x3f6019['getCustomProperty'](_0x434f('0x33'))||this['getAttribute'](_0x434f('0x1a'))!=_0x3f6019[_0x434f('0x16')](_0x434f('0x1a')));},_0x3126ff;}(_0x274829,_0x867154);}(_0x497ac1,_0x3c7b14,_0x2c17b4,_0x40cc65)}),_0x40cc65[_0x434f('0x18')][_0x434f('0x43')]('editingDowncast')['markerToHighlight']({'model':_0x434f('0x15'),'view':_0x2d7b75=>function(_0x565db0,_0x4109fb){const _0x1fb190=_0x565db0[_0x434f('0x17')][_0x434f('0x4c')](':')[0x2];if(_0x1fb190===_0x4109fb[_0x434f('0x27')])return null;const _0x4fd25b=_0x4109fb[_0x434f('0xa')](_0x1fb190);if(!_0x4fd25b)return{'id':_0x1fb190,'classes':[]};return{'id':_0x1fb190,'classes':[_0x434f('0x3'),_0x4fd25b[_0x434f('0x1e')][_0x434f('0x12')]()],'attributes':{'data-session-id':_0x1fb190},'priority':0x7d0+_0x4fd25b[_0x434f('0xb')]};}(_0x2d7b75,_0x2c17b4)}),function(_0x33f518){const _0x24eb74=_0x33f518['model'],_0x35cf7f=new Map(),_0x1770d8=_0x33f518['plugins'][_0x434f('0x25')](_0x4d5d93);_0x24eb74[_0x434f('0x2b')]['on']('update:user:range',(_0x504361,_0x129260,_0x5bfb16,_0x157e50)=>{if(!_0x157e50&&_0x35cf7f[_0x434f('0x25')](_0x129260['name']))return _0x35cf7f['get'](_0x129260[_0x434f('0x46')])[_0x434f('0x3d')](),void _0x35cf7f[_0x434f('0x23')](_0x129260['name']);const _0x529a1e=_0x129260[_0x434f('0x46')][_0x434f('0x4c')](':')[0x2];if(_0x529a1e===_0x1770d8[_0x434f('0x27')])return;const _0x20f6a4=_0x434f('0x48')+_0x529a1e;_0x24eb74['markers'][_0x434f('0x21')](_0x20f6a4)&&_0x33f518[_0x434f('0x35')]['reconvertMarker'](_0x20f6a4),_0x129260['on'](_0x434f('0x11'),(_0x188f98,_0x20100b,_0x114939)=>{if('$graveyard'!=_0x20100b[_0x434f('0x28')][_0x434f('0xd')]&&'$graveyard'==_0x129260[_0x434f('0x2d')]()[_0x434f('0x28')][_0x434f('0xd')]&&!_0x35cf7f[_0x434f('0x21')](_0x129260['name'])){const _0x3de433=_0x24eb74[_0x434f('0x19')][_0x434f('0x5')](_0x114939[_0x434f('0x31')]);if(_0x3de433){const _0x5544a4=_0x5520e0['fromRange'](_0x3de433);_0x35cf7f['set'](_0x129260[_0x434f('0x46')],_0x5544a4),_0x5544a4['on']('change:range',(_0x2c148e,_0x43ca6d,_0x1638b3)=>{if(_0x434f('0x26')==_0x5544a4[_0x434f('0x28')][_0x434f('0xd')]){const _0x5f4fc9=_0x24eb74[_0x434f('0x19')][_0x434f('0x5')](_0x1638b3[_0x434f('0x31')]);_0x5f4fc9?(_0x5544a4['start']=_0x5f4fc9[_0x434f('0x40')],_0x5544a4[_0x434f('0x10')]=_0x5f4fc9[_0x434f('0x10')]):(_0x35cf7f[_0x434f('0x23')](_0x129260['name']),_0x5544a4['detach']());}});}}});}),_0x24eb74['document']['on'](_0x434f('0x41'),()=>{_0x35cf7f['size']>0x0&&_0x24eb74[_0x434f('0x3c')]({'isUndoable':!0x1},_0x467918=>{for(const [_0xc83530,_0x177f32]of _0x35cf7f)_0x434f('0x26')==_0x24eb74[_0x434f('0x2b')]['get'](_0xc83530)[_0x434f('0x2d')]()[_0x434f('0x28')]['rootName']&&(G(_0xc83530['split'](':')[0x2],_0x177f32[_0x434f('0x36')](),_0x24eb74,_0x467918),_0x177f32[_0x434f('0x3d')]());_0x35cf7f[_0x434f('0x1f')]();});});}(_0x40cc65);}[_0x434f('0x42')](){const _0x50778d=this[_0x434f('0x2e')],_0x26634c=_0x50778d['commands'][_0x434f('0x25')]('undo');_0x26634c&&_0x50778d[_0x434f('0x51')]['on'](_0x434f('0x3f'),(_0x319130,_0x5f308d)=>{const _0x570b8e=_0x5f308d[0x0];if(_0x434f('0x8')!=_0x570b8e['type']||!_0x570b8e['name'][_0x434f('0xc')](_0x434f('0x32')))return;const _0x3882c9=_0x570b8e[_0x434f('0x50')];_0x26634c[_0x434f('0x4d')][_0x434f('0x21')](_0x3882c9)&&(_0x570b8e[_0x434f('0x13')]=_0x570b8e['oldRange']?_0x50778d[_0x434f('0x51')]['createRange'](_0x570b8e[_0x434f('0x44')][_0x434f('0x40')],_0x570b8e[_0x434f('0x44')]['end']):null);},{'priority':_0x434f('0x49')});}['createUserMarkerOperations'](){const _0x3d733a=this[_0x434f('0x2e')],_0x2d244e=_0x3d733a[_0x434f('0x51')][_0x434f('0x4')],_0x959632=_0x3d733a[_0x434f('0x0')][_0x434f('0x25')](_0x4d5d93);_0x3d733a[_0x434f('0x51')][_0x434f('0x3c')]({'isUndoable':!0x1},_0x57f09a=>{const _0x46d7f7=_0x434f('0x4a')+_0x959632['mySessionId'],_0x5719f0=_0x434f('0x48')+_0x959632['mySessionId'],_0x524cc5=_0x3d733a['model']['markers'][_0x434f('0x21')](_0x46d7f7);_0x3d733a[_0x434f('0x35')][_0x434f('0x29')]['hasDomSelection']?G(_0x959632[_0x434f('0x27')],_0x2d244e['selection'][_0x434f('0x24')](),_0x3d733a['model'],_0x57f09a):_0x524cc5&&(_0x57f09a[_0x434f('0x38')](_0x46d7f7),_0x57f09a[_0x434f('0x38')](_0x5719f0));});}}function G(_0x1610c3,_0xd70b7e,_0x3e4d74,_0x1cfaf1){const _0x516bed=_0x434f('0x4a')+_0x1610c3,_0x24bc00='user:position:'+_0x1610c3,_0xf5f20=_0xd70b7e[_0x434f('0x3e')]();let _0x26bf5d=_0xd70b7e[_0x434f('0x40')];_0xf5f20&&_0xf5f20['is'](_0x434f('0x1b'),_0x434f('0x1'))&&(_0x26bf5d=function(_0x5de3ad,_0x12fc36){for(const _0x47ded4 of _0x5de3ad['getPositions']())if(_0x12fc36[_0x434f('0x19')][_0x434f('0x1d')](_0x47ded4,_0x434f('0x4e')))return _0x47ded4;}(_0xd70b7e,_0x3e4d74),_0xd70b7e=_0x1cfaf1[_0x434f('0x45')](_0x26bf5d));const _0x189b15=_0x1cfaf1['createRange'](_0x26bf5d);_0x3e4d74['markers'][_0x434f('0x21')](_0x516bed)?(_0x1cfaf1[_0x434f('0x2a')](_0x516bed,{'range':_0xd70b7e}),_0x1cfaf1[_0x434f('0x2a')](_0x24bc00,{'range':_0x189b15})):(_0x1cfaf1[_0x434f('0x20')](_0x516bed,{'range':_0xd70b7e,'usingOperation':!0x0}),_0x1cfaf1[_0x434f('0x20')](_0x24bc00,{'range':_0x189b15,'usingOperation':!0x0}));}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * @module real-time-collaboration/realtimecollaborativeediting/websocketgateway
3
+ * @publicApi
4
+ */
5
+ import { ContextPlugin, type Plugin, type ContextPluginDependencies, type Editor, type Context } from 'ckeditor5/src/core';
6
+ import { type Emitter, type Observable } from 'ckeditor5/src/utils';
7
+ import WebSocketGatewayProvider, { WEB_SOCKET_GATEWAY_STATES } from '@ckeditor/ckeditor-cloud-services-collaboration/src/websocketgateway/websocketgateway';
8
+ export default class WebSocketGateway extends ContextPlugin {
9
+ static WebSocketGateway: typeof WebSocketGatewayProvider;
10
+ static initialReconnectionInterval: number;
11
+ connection: WebSocketGatewayProvider & Emitter & Observable;
12
+ /**
13
+ * The connection state.
14
+ *
15
+ * The `connected` state is set when both, the browser and the WebSocket, are connected.
16
+ */
17
+ state: WEB_SOCKET_GATEWAY_STATES;
18
+ static get requires(): ContextPluginDependencies;
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): 'WebSocketGateway';
23
+ constructor(context: Editor | Context);
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ init(): Promise<unknown>;
28
+ /**
29
+ * Registers a plugin that will be reconnected when the connection is back.
30
+ * The plugin needs to implement the `reconnect()` method.
31
+ */
32
+ addToReconnectionStack(plugin: ReconnectPlugin | ReconnectContextPlugin): void;
33
+ /**
34
+ * Removes the plugin from the reconnection stack.
35
+ */
36
+ removeFromReconnectionStack(plugin: ReconnectPlugin | ReconnectContextPlugin): void;
37
+ /**
38
+ * Checks if the plugin is present in the reconnection stack.
39
+ */
40
+ isInReconnectionStack(plugin: ReconnectPlugin | ReconnectContextPlugin): boolean;
41
+ /**
42
+ * @inheritDoc
43
+ */
44
+ destroy(): void;
45
+ }
46
+ interface Reconnect {
47
+ reconnect: () => void | Promise<void>;
48
+ }
49
+ export type ReconnectPlugin = Plugin & Reconnect;
50
+ export type ReconnectContextPlugin = ContextPlugin & Reconnect;
51
+ export {};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x51ca=['_isBrowserOffline','pluginName','function','reconnect','cloudServices.requestTimeout','add','change:me','stopListening','error','connection','then','disconnect','listenTo','showWarning','all','The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.','cloudservices-init','state','code','connecting','cloudservices-reconnection-error','disconnected','token','websocketgateway-invalid-plugin-interface','_reconnectionStack','set','from','get','cloudServices.connectionTimeout','WebSocketGateway','CloudServices','webSocketUrl','initialReconnectionInterval','_domEmitter','offline','context','init','addToReconnectionStack','_reconnect','delete','websocketgateway-missing-websocket-url','_shouldPluginsReconnect','constructor','removeFromReconnectionStack','create','limitExceeded','real-time-collaboration','connected','define','requires','isInReconnectionStack','websocketgateway-plugin-already-registered','catch','connect','destroy','config'];(function(_0x5166fa,_0x51ca49){const _0xea0383=function(_0x88a0ff){while(--_0x88a0ff){_0x5166fa['push'](_0x5166fa['shift']());}};_0xea0383(++_0x51ca49);}(_0x51ca,0x1ba));const _0xea03=function(_0x5166fa,_0x51ca49){_0x5166fa=_0x5166fa-0x0;let _0xea0383=_0x51ca[_0x5166fa];return _0xea0383;};import{ContextPlugin as _0x4282d2}from'ckeditor5/src/core';import{DomEmitterMixin as _0x332837,CKEditorError as _0x52eccf}from'ckeditor5/src/utils';import _0x208506 from'@ckeditor/ckeditor-cloud-services-collaboration/src/websocketgateway/websocketgateway';import{Notification as _0x183ce5}from'ckeditor5/src/ui';export default class c extends _0x4282d2{static get[_0xea03('0x37')](){return[_0xea03('0x24'),_0x183ce5];}static get[_0xea03('0x7')](){return'WebSocketGateway';}[_0xea03('0x2a')](){const _0xa3e538=this['context'],_0x35280c=_0xa3e538['plugins'][_0xea03('0x21')](_0xea03('0x24')),_0x636d38=_0xa3e538['plugins'][_0xea03('0x21')](_0x183ce5);if(!_0x35280c[_0xea03('0x1c')])throw new _0x52eccf('websocketgateway-missing-token',this);if(!_0x35280c[_0xea03('0x25')])throw new _0x52eccf(_0xea03('0x2e'),this);return this[_0xea03('0x1f')](_0xea03('0x17'),'connecting'),this[_0xea03('0x1f')](_0xea03('0x6'),!0x1),this['_reconnectionStack']=new Set(),this[_0xea03('0x2f')]=!0x1,this[_0xea03('0x27')]=Object[_0xea03('0x32')](_0x332837),this[_0xea03('0x27')][_0xea03('0x12')](window,_0xea03('0x28'),()=>this[_0xea03('0x6')]=!0x0),this[_0xea03('0x27')]['listenTo'](window,'online',()=>this[_0xea03('0x6')]=!0x1),this['context'][_0xea03('0x5')][_0xea03('0x36')](_0xea03('0x22'),0xa),this[_0xea03('0x29')][_0xea03('0x5')][_0xea03('0x36')](_0xea03('0xa'),0x14),c[_0xea03('0x23')][_0xea03('0x3')](_0x35280c[_0xea03('0x1c')],_0x35280c[_0xea03('0x25')],{'disconnectOnUnload':!0x1,'timeout':0x3e8*this[_0xea03('0x29')][_0xea03('0x5')][_0xea03('0x21')]('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context'][_0xea03('0x5')][_0xea03('0x21')](_0xea03('0xa'))})[_0xea03('0x10')](_0x26c183=>{if(this[_0xea03('0xf')]=_0x26c183,this['bind'](_0xea03('0x17'))['to'](_0x26c183,_0xea03('0x17'),this,_0xea03('0x6'),(_0x36488f,_0x356161)=>(_0xea03('0x35')!==_0x36488f&&(this[_0xea03('0x2f')]=!0x0),_0x356161||_0xea03('0x35')!==_0x36488f?_0xea03('0x1b'):_0xea03('0x1b')==this[_0xea03('0x17')]&&this[_0xea03('0x2f')]?(this['_shouldPluginsReconnect']=!0x1,this[_0xea03('0x2c')](),_0xea03('0x19')):'connected')),this[_0xea03('0xf')]['on'](_0xea03('0xe'),(_0x102b68,_0x4f9be5)=>{if(_0xea03('0x33')!==_0x4f9be5[_0xea03('0x18')])throw console['error'](_0x4f9be5),new _0x52eccf(_0xea03('0x16'),null,{'originalError':_0x4f9be5});_0x636d38[_0xea03('0x13')](_0xea03('0x15'),{'title':'Connected\x20users\x20limit\x20exceeded','namespace':_0xea03('0x34')});}),!_0x26c183['me'])return new Promise(_0x4015a1=>_0x26c183['on'](_0xea03('0xc'),_0x4015a1));})['catch'](_0x2b7ae3=>{throw console[_0xea03('0xe')](_0x2b7ae3),new _0x52eccf('cloudservices-init',null,{'originalError':_0x2b7ae3});});}[_0xea03('0x2b')](_0x5c2a91){if(_0xea03('0x8')!=typeof _0x5c2a91[_0xea03('0x9')])throw new _0x52eccf(_0xea03('0x1d'),this);if(this[_0xea03('0x0')](_0x5c2a91))throw new _0x52eccf(_0xea03('0x1'),this,{'name':_0x5c2a91[_0xea03('0x30')]['pluginName']});this['_reconnectionStack'][_0xea03('0xb')](_0x5c2a91);}[_0xea03('0x31')](_0x2d9bbb){this[_0xea03('0x1e')][_0xea03('0x2d')](_0x2d9bbb);}[_0xea03('0x0')](_0x7c122){return this[_0xea03('0x1e')]['has'](_0x7c122);}['_reconnect'](){return this['connection'][_0xea03('0x9')]()[_0xea03('0x10')](()=>Promise[_0xea03('0x14')](Array[_0xea03('0x20')](this[_0xea03('0x1e')],_0x18ca67=>_0x18ca67[_0xea03('0x9')]())))[_0xea03('0x10')](()=>this[_0xea03('0x17')]=_0xea03('0x35'))[_0xea03('0x2')](_0x547966=>{throw console[_0xea03('0xe')](_0x547966),new _0x52eccf(_0xea03('0x1a'),this[_0xea03('0x29')]);});}[_0xea03('0x4')](){this['connection']&&this[_0xea03('0xf')][_0xea03('0x11')](),this[_0xea03('0x17')]=_0xea03('0x1b'),this[_0xea03('0x27')][_0xea03('0xd')](),super[_0xea03('0x4')]();}}c[_0xea03('0x23')]=_0x208506,c[_0xea03('0x26')]=0x3e8;
23
+ const _0x1650=['error','all','cloudServices.connectionTimeout','webSocketUrl','_shouldPluginsReconnect','token','cloudservices-init','pluginName','bind','connected','online','offline','cloudServices.requestTimeout','_isBrowserOffline','DISCONNECTED','listenTo','cloudservices-reconnection-error','removeFromReconnectionStack','from','websocketgateway-missing-token','connection','stopListening','get','set','catch','has','then','destroy','delete','_reconnectionStack','_reconnect','websocketgateway-plugin-already-registered','context','function','CONNECTING','config','disconnect','addToReconnectionStack','requires','CONNECTED','limitExceeded','init','showWarning','reconnect','create','_domEmitter','CloudServices','code','plugins','real-time-collaboration','add','isInReconnectionStack','websocketgateway-missing-websocket-url','The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.','websocketgateway-invalid-plugin-interface','state','WebSocketGateway'];(function(_0x335e13,_0x1650a9){const _0x3ec349=function(_0x4422aa){while(--_0x4422aa){_0x335e13['push'](_0x335e13['shift']());}};_0x3ec349(++_0x1650a9);}(_0x1650,0x13b));const _0x3ec3=function(_0x335e13,_0x1650a9){_0x335e13=_0x335e13-0x0;let _0x3ec349=_0x1650[_0x335e13];return _0x3ec349;};import{ContextPlugin as _0xa2efb8}from'ckeditor5/src/core';import{DomEmitterMixin as _0x37d6b7,CKEditorError as _0x446bfe}from'ckeditor5/src/utils';import _0x10e600,{WEB_SOCKET_GATEWAY_STATES as _0x4f30de}from'@ckeditor/ckeditor-cloud-services-collaboration/src/websocketgateway/websocketgateway';import{Notification as _0x38307d}from'ckeditor5/src/ui';export default class c extends _0xa2efb8{static get[_0x3ec3('0x8')](){return[_0x3ec3('0x10'),_0x38307d];}static get['pluginName'](){return _0x3ec3('0x1a');}constructor(_0x291b91){super(_0x291b91),this[_0x3ec3('0x32')](_0x3ec3('0x19'),_0x4f30de[_0x3ec3('0x9')]),this[_0x3ec3('0x32')](_0x3ec3('0x28'),!0x1),this[_0x3ec3('0x38')]=new Set(),this[_0x3ec3('0x1f')]=!0x1,this[_0x3ec3('0xf')]=Object[_0x3ec3('0xe')](_0x37d6b7);}[_0x3ec3('0xb')](){const _0x14b883=this[_0x3ec3('0x2')],_0x4a74b1=_0x14b883[_0x3ec3('0x12')][_0x3ec3('0x31')](_0x3ec3('0x10')),_0x5f328a=_0x14b883[_0x3ec3('0x12')][_0x3ec3('0x31')](_0x38307d);if(!_0x4a74b1[_0x3ec3('0x20')])throw new _0x446bfe(_0x3ec3('0x2e'),this);if(!_0x4a74b1['webSocketUrl'])throw new _0x446bfe(_0x3ec3('0x16'),this);return this[_0x3ec3('0xf')][_0x3ec3('0x2a')](window,_0x3ec3('0x26'),()=>this[_0x3ec3('0x28')]=!0x0),this['_domEmitter'][_0x3ec3('0x2a')](window,_0x3ec3('0x25'),()=>this['_isBrowserOffline']=!0x1),this[_0x3ec3('0x2')]['config']['define'](_0x3ec3('0x1d'),0xa),this[_0x3ec3('0x2')][_0x3ec3('0x5')]['define'](_0x3ec3('0x27'),0x14),c['WebSocketGateway']['connect'](_0x4a74b1[_0x3ec3('0x20')],_0x4a74b1[_0x3ec3('0x1e')],{'timeout':0x3e8*this[_0x3ec3('0x2')][_0x3ec3('0x5')][_0x3ec3('0x31')](_0x3ec3('0x1d')),'requestTimeout':0x3e8*this[_0x3ec3('0x2')]['config']['get'](_0x3ec3('0x27'))})['then'](_0x11dee3=>{if(this['connection']=_0x11dee3,this[_0x3ec3('0x23')](_0x3ec3('0x19'))['to'](_0x11dee3,'state',this,_0x3ec3('0x28'),(_0x39db33,_0x4bf94c)=>(_0x3ec3('0x24')!==_0x39db33&&(this[_0x3ec3('0x1f')]=!0x0),_0x4bf94c||_0x39db33!==_0x4f30de['CONNECTED']?_0x4f30de[_0x3ec3('0x29')]:this[_0x3ec3('0x19')]==_0x4f30de['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this[_0x3ec3('0x1f')]=!0x1,this[_0x3ec3('0x0')](),_0x4f30de[_0x3ec3('0x4')]):_0x4f30de[_0x3ec3('0x9')])),this[_0x3ec3('0x2f')]['on'](_0x3ec3('0x1b'),(_0x5e67d4,_0x352f67)=>{if(_0x3ec3('0xa')!==_0x352f67[_0x3ec3('0x11')])throw console[_0x3ec3('0x1b')](_0x352f67),new _0x446bfe(_0x3ec3('0x21'),null,{'originalError':_0x352f67});_0x5f328a[_0x3ec3('0xc')](_0x3ec3('0x17'),{'title':'Connected\x20users\x20limit\x20exceeded','namespace':_0x3ec3('0x13')});}),!_0x11dee3['me'])return new Promise(_0x1b68b2=>_0x11dee3['on']('change:me',_0x1b68b2));})[_0x3ec3('0x33')](_0x401478=>{throw console[_0x3ec3('0x1b')](_0x401478),new _0x446bfe('cloudservices-init',null,{'originalError':_0x401478});});}[_0x3ec3('0x7')](_0x5f2c96){if(_0x3ec3('0x3')!=typeof _0x5f2c96[_0x3ec3('0xd')])throw new _0x446bfe(_0x3ec3('0x18'),this);if(this[_0x3ec3('0x15')](_0x5f2c96))throw new _0x446bfe(_0x3ec3('0x1'),this,{'name':_0x5f2c96['constructor'][_0x3ec3('0x22')]});this[_0x3ec3('0x38')][_0x3ec3('0x14')](_0x5f2c96);}[_0x3ec3('0x2c')](_0x115b17){this[_0x3ec3('0x38')][_0x3ec3('0x37')](_0x115b17);}['isInReconnectionStack'](_0x44f459){return this[_0x3ec3('0x38')][_0x3ec3('0x34')](_0x44f459);}['_reconnect'](){return this[_0x3ec3('0x2f')]['reconnect']()[_0x3ec3('0x35')](()=>Promise[_0x3ec3('0x1c')](Array[_0x3ec3('0x2d')](this[_0x3ec3('0x38')],_0x3f3216=>_0x3f3216[_0x3ec3('0xd')]())))[_0x3ec3('0x35')](()=>this[_0x3ec3('0x19')]=_0x4f30de['CONNECTED'])['catch'](_0xd04cef=>{throw console['error'](_0xd04cef),new _0x446bfe(_0x3ec3('0x2b'),this[_0x3ec3('0x2')]);});}[_0x3ec3('0x36')](){this['connection']&&this[_0x3ec3('0x2f')][_0x3ec3('0x6')](),this['state']=_0x4f30de[_0x3ec3('0x29')],this[_0x3ec3('0xf')][_0x3ec3('0x30')](),super[_0x3ec3('0x36')]();}}c[_0x3ec3('0x1a')]=_0x10e600,c['initialReconnectionInterval']=0x3e8;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @module real-time-collaboration/realtimecollaborativeediting
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
6
+ /**
7
+ * Enables the real-time collaborative editing feature.
8
+ *
9
+ * Check the {@glink features/collaboration/real-time-collaboration/real-time-collaboration-integration Real-time collaboration} guide
10
+ * to see how to launch the editor in the real-time collaboration mode.
11
+ */
12
+ export default class RealTimeCollaborativeEditing extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get requires(): PluginDependencies;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get pluginName(): 'RealTimeCollaborativeEditing';
21
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x1e94=['pluginName','requires','RealTimeCollaborativeEditing'];(function(_0x5b4699,_0x1e9494){var _0x5dcff9=function(_0x2ba8e2){while(--_0x2ba8e2){_0x5b4699['push'](_0x5b4699['shift']());}};_0x5dcff9(++_0x1e9494);}(_0x1e94,0x1e3));var _0x5dcf=function(_0x5b4699,_0x1e9494){_0x5b4699=_0x5b4699-0x0;var _0x5dcff9=_0x1e94[_0x5b4699];return _0x5dcff9;};import{Plugin as _0x213a85}from'ckeditor5/src/core';import _0x10630d from'./realtimecollaborativeediting/realtimecollaborationclient';export default class n extends _0x213a85{static get[_0x5dcf('0x1')](){return[_0x10630d];}static get[_0x5dcf('0x0')](){return _0x5dcf('0x2');}}
23
+ var _0x4c05=['pluginName','requires','RealTimeCollaborativeEditing'];(function(_0x4c3fbb,_0x4c0534){var _0x398560=function(_0x445e25){while(--_0x445e25){_0x4c3fbb['push'](_0x4c3fbb['shift']());}};_0x398560(++_0x4c0534);}(_0x4c05,0x1a4));var _0x3985=function(_0x4c3fbb,_0x4c0534){_0x4c3fbb=_0x4c3fbb-0x0;var _0x398560=_0x4c05[_0x4c3fbb];return _0x398560;};import{Plugin as _0x15b250}from'ckeditor5/src/core';import _0x3e5b13 from'./realtimecollaborativeediting/realtimecollaborationclient';export default class n extends _0x15b250{static get[_0x3985('0x1')](){return[_0x3e5b13];}static get[_0x3985('0x0')](){return _0x3985('0x2');}}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @module real-time-collaboration/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type PluginDependencies, type Editor } from 'ckeditor5/src/core';
6
+ import { type ReconnectPlugin } from '../realtimecollaborativeediting/websocketgateway';
7
+ import RevisionHistoryService from '@ckeditor/ckeditor-cloud-services-collaboration/src/revision-history/revisionhistoryservice';
8
+ /**
9
+ * The Cloud Services revision history adapter plugin.
10
+ */
11
+ export default class CloudServicesRevisionHistoryAdapter extends Plugin implements ReconnectPlugin {
12
+ static RevisionHistoryService: typeof RevisionHistoryService;
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get requires(): PluginDependencies;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ constructor(editor: Editor);
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ init(): Promise<void>;
25
+ /**
26
+ * A method that will be executed when the `WebSocketGateway` will reconnect.
27
+ */
28
+ reconnect(): Promise<void>;
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ destroy(): void;
33
+ /**
34
+ * Waits for the service to be ready before calling the service API.
35
+ */
36
+ private _waitForServiceReady;
37
+ private _fetchMissingUsers;
38
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x5bca=['affectsData','size','_lastRequestId','_revisionDataBuilder','data','remove','getUser','_waitForServiceReady','connected','_revisionTracker','_domEmitter','once','isEnabled','addRevisionData','plugins','repository','fromVersion','authorsIds','400','cloudServices.bundleVersion','Users','_revisions','setSource','RevisionHistoryService','then','cloud-services-internal-error:\x20Not\x20connected.','collaboration.channelId','requires','_handleReconnectionError','_preventResendingRevisionData','buildRevisionData','init','map','baseVersion','cloud-services-internal-error:\x20Request\x20timeout.','code','diffData','getRevisions','_bufferUpdate','_isPendingUpdate','_update','setRevisionData','reverse','length','serverHistory','_getLatestVersion','revisionsUpdated','_startingVersion','_fixRevision','reInit','editor','stopListening','getRevision','change:_isPendingUpdate','_getLatestVersionFromServerOperations','connect','get','catch','_bufferedUpdates','reconnect','change:_isConnected','keys','marker','_revisionHistoryService','isEmptyCurrent','_oldOffset','off','addToReconnectionStack','_offset','message','_isConnected','destroy','listenTo','updateRevisions','creatorId','currentRevision','max','_handleRevisionsUpdate','connection','RevisionTracker','type','wrongRequestId','cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.','toVersion','config','_createCurrentRevision'];(function(_0x410d43,_0x5bcaf7){const _0x1e7f2f=function(_0xf26124){while(--_0xf26124){_0x410d43['push'](_0x410d43['shift']());}};_0x1e7f2f(++_0x5bcaf7);}(_0x5bca,0x175));const _0x1e7f=function(_0x410d43,_0x5bcaf7){_0x410d43=_0x410d43-0x0;let _0x1e7f2f=_0x5bca[_0x410d43];return _0x1e7f2f;};import{Plugin as _0x56a4eb}from'ckeditor5/src/core';import{version as _0x84df53}from'ckeditor5/src/utils';import{Users as _0x22c699}from'ckeditor5-collaboration/src/collaboration-core';import _0x2c1bfa from'../realtimecollaborativeediting/realtimecollaborationclient';import _0x15dafd from'../realtimecollaborativeediting/websocketgateway';import _0x58089d from'../realtimecollaborativeediting/sessions';import _0x56c5f8 from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import _0x613f68 from'@ckeditor/ckeditor-cloud-services-collaboration/src/revision-history/revisionhistoryservice';import _0x5732f0 from'@ckeditor/ckeditor-cloud-services-collaboration/src/editor/editorservice';export default class v extends _0x56a4eb{static get[_0x1e7f('0x54')](){return[_0x15dafd,_0x2c1bfa,_0x1e7f('0x32'),_0x58089d,_0x22c699];}async[_0x1e7f('0x2')](){this[_0x1e7f('0x3b')]=null,this[_0x1e7f('0x42')]=this[_0x1e7f('0x15')][_0x1e7f('0x47')][_0x1e7f('0x1b')](_0x1e7f('0x32'));const _0x365b97=this['editor']['plugins'][_0x1e7f('0x1b')](_0x2c1bfa),_0x12e9a9=_0x365b97[_0x1e7f('0xf')],_0x37d206=this[_0x1e7f('0x15')][_0x1e7f('0x47')]['get'](_0x15dafd),_0x5d0572=this[_0x1e7f('0x15')][_0x1e7f('0x37')][_0x1e7f('0x1b')](_0x1e7f('0x53'));this[_0x1e7f('0x22')]=new v[(_0x1e7f('0x50'))](_0x5d0572),this[_0x1e7f('0x42')][_0x1e7f('0x4f')]({'history':_0x12e9a9,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x365b97['sessionId']});const _0x1d6b2c=this[_0x1e7f('0x15')][_0x1e7f('0x37')]['get'](_0x1e7f('0x4c'))||_0x84df53,_0x2678c7=await _0x5732f0['isBundleUploaded'](_0x37d206[_0x1e7f('0x31')],_0x1d6b2c);this[_0x1e7f('0x42')]['adapter']={'getRevision':async({revisionId:_0x20ed31})=>(await this[_0x1e7f('0x40')](),await this[_0x1e7f('0x22')]['getRevision'](_0x20ed31)),'updateRevisions':async _0x3ed8d9=>{await this['_waitForServiceReady']();const _0x4c8942=this['_revisionTracker'][_0x1e7f('0x2e')];if(!_0x2678c7||0x1!==_0x3ed8d9[_0x1e7f('0xe')]||_0x3ed8d9[0x0]['id']!==_0x4c8942['id']){for(const _0x2f9551 of _0x3ed8d9)_0x2f9551['id']===_0x4c8942['id']&&(_0x2f9551[_0x1e7f('0x23')]=_0x2f9551['fromVersion']===_0x2f9551[_0x1e7f('0x36')]);return this[_0x1e7f('0x22')][_0x1e7f('0x2c')](_0x3ed8d9,this['_lastRequestId'])[_0x1e7f('0x51')](_0x4f4ff4=>{this[_0x1e7f('0x3b')]=_0x4f4ff4;})[_0x1e7f('0x1c')](_0x4cffe6=>{if(!(Q(_0x4cffe6)||_0x1e7f('0x4b')===_0x4cffe6[_0x1e7f('0x6')]&&void 0x0!==_0x4cffe6[_0x1e7f('0x3d')][_0x1e7f('0x34')]))throw _0x4cffe6;for(const _0x474f3d of _0x3ed8d9){!this[_0x1e7f('0x42')][_0x1e7f('0x48')][_0x1e7f('0x17')](_0x474f3d['id'])||this[_0x1e7f('0x42')]['_bufferUpdate'](_0x474f3d['id'],_0x474f3d,!0x1);}if(Q(_0x4cffe6))throw _0x4cffe6;});}}},this[_0x1e7f('0x2b')](this[_0x1e7f('0x22')],_0x1e7f('0x11'),(_0x13d2b4,{revisionsData:_0x4c9ebb,requestId:_0x401987})=>{Math[_0x1e7f('0x2f')](..._0x4c9ebb['map'](_0x6744db=>_0x6744db[_0x1e7f('0x36')]))>this['_getLatestVersionFromServerOperations']()-0x1?this[_0x1e7f('0x10')]()[_0x1e7f('0x51')](()=>{this[_0x1e7f('0x30')](_0x4c9ebb,_0x401987);}):this['_handleRevisionsUpdate'](_0x4c9ebb,_0x401987);});const {revisions:_0x5d2637,requestId:_0x1e0f6d}=await this[_0x1e7f('0x22')][_0x1e7f('0x1a')](_0x37d206['connection']);_0x37d206[_0x1e7f('0x26')](this),this['_lastRequestId']=_0x1e0f6d,await this['_fetchMissingUsers'](_0x5d2637);for(const _0x50f5e6 of _0x5d2637)this[_0x1e7f('0x42')][_0x1e7f('0x46')](_0x50f5e6);this['listenTo'](_0x365b97,_0x1e7f('0x1f'),(_0x3d6841,_0xbf90e8,_0x2b5725)=>{_0x2b5725&&(this[_0x1e7f('0x24')]=_0x365b97[_0x1e7f('0x27')],_0x3d6841[_0x1e7f('0x25')]());}),this[_0x1e7f('0x42')]['bind'](_0x1e7f('0x45'))['to'](_0x37d206,'state',_0x4c3db9=>_0x1e7f('0x41')===_0x4c3db9);}async[_0x1e7f('0x1e')](){const _0xf7d13c=this[_0x1e7f('0x15')][_0x1e7f('0x47')][_0x1e7f('0x1b')](_0x15dafd),_0x28693e=this[_0x1e7f('0x15')][_0x1e7f('0x47')][_0x1e7f('0x1b')](_0x2c1bfa),_0x44898a=async()=>{const _0x1f82d5=this[_0x1e7f('0x42')]['currentRevision'],_0x59677c=_0x1f82d5['id'],_0x4dbeb8=_0x59677c!==_0x28693e['sessionId'];if(_0x4dbeb8){const _0x137f59=_0x28693e['_offset']-this['_oldOffset'],_0x2e30e5=this[_0x1e7f('0x19')]();this[_0x1e7f('0x42')][_0x1e7f('0x3c')][_0x1e7f('0x14')]();if(_0x1f82d5[_0x1e7f('0x36')]+_0x137f59!==_0x2e30e5){const _0x44f7a1=_0x1f82d5[_0x1e7f('0x49')]+_0x137f59,_0x50c721=this['editor'][_0x1e7f('0x47')][_0x1e7f('0x1b')](_0x1e7f('0x4d')),_0x298d9c=this[_0x1e7f('0x42')]['buildRevisionData']({'currentRevision':_0x1f82d5,'from':_0x44f7a1,'to':_0x2e30e5});_0x298d9c['id']=_0x1f82d5['id'];const _0x546d32=_0x298d9c[_0x1e7f('0x4a')][_0x1e7f('0x3')](_0x4e41fd=>_0x50c721[_0x1e7f('0x3f')](_0x4e41fd));_0x1f82d5[_0x1e7f('0xb')]({..._0x298d9c,'authors':_0x546d32},!0x0),this['_revisionTracker'][_0x1e7f('0x9')](_0x1f82d5['id'],_0x298d9c,!0x0);}this['_revisionTracker'][_0x1e7f('0x12')]=_0x2e30e5,(_0x1f82d5[_0x1e7f('0x36')]===_0x1f82d5[_0x1e7f('0x49')]&&!this[_0x1e7f('0x42')][_0x1e7f('0x1d')]['has'](_0x59677c)&&this[_0x1e7f('0x42')][_0x1e7f('0x48')][_0x1e7f('0x4e')][_0x1e7f('0x3e')](_0x59677c),this[_0x1e7f('0x42')][_0x1e7f('0x38')](_0x2e30e5));}const {revisions:_0x404d38,requestId:_0x56f529}=await this['_revisionHistoryService'][_0x1e7f('0x1e')](_0xf7d13c['connection'],this[_0x1e7f('0x3b')]);_0x4dbeb8&&_0x404d38[_0x1e7f('0xe')]>0x0?_0x28693e[_0x1e7f('0x55')]():(await this['_fetchMissingUsers'](_0x404d38),this[_0x1e7f('0x30')](_0x404d38,_0x56f529),this[_0x1e7f('0x42')]['sendBufferedUpdates']());};return _0x28693e[_0x1e7f('0x29')]?_0x44898a():new Promise((_0x5bdbbd,_0x341269)=>{_0x28693e[_0x1e7f('0x44')](_0x1e7f('0x1f'),()=>{_0x44898a()[_0x1e7f('0x51')](_0x5bdbbd)[_0x1e7f('0x1c')](_0x341269);});});}['destroy'](){this[_0x1e7f('0x43')]&&this[_0x1e7f('0x43')][_0x1e7f('0x16')](),super[_0x1e7f('0x2a')]();}async[_0x1e7f('0x40')](){this[_0x1e7f('0x22')]['isConnected']||await new Promise(_0x5f426d=>{this[_0x1e7f('0x2b')](this[_0x1e7f('0x22')],_0x1e7f('0x41'),_0x17ae5c=>{_0x17ae5c['off'](),_0x5f426d();});});}[_0x1e7f('0x19')](){const _0x41f5a4=this['editor'][_0x1e7f('0x47')][_0x1e7f('0x1b')](_0x2c1bfa)['serverHistory'];for(const _0x3fc7a2 of _0x41f5a4['getOperations']()[_0x1e7f('0xd')]())if(_0x1e7f('0x21')!==_0x3fc7a2[_0x1e7f('0x33')]||_0x3fc7a2[_0x1e7f('0x39')])return _0x3fc7a2[_0x1e7f('0x4')]+0x1;}['_getLatestVersion'](){const _0x49c419=this[_0x1e7f('0x15')][_0x1e7f('0x47')][_0x1e7f('0x1b')](_0x2c1bfa);return new Promise(_0x10c286=>{_0x49c419[_0x1e7f('0xa')]?_0x49c419[_0x1e7f('0x44')](_0x1e7f('0x18'),()=>{_0x10c286(this[_0x1e7f('0x19')]());}):_0x10c286(this['_getLatestVersionFromServerOperations']());});}[_0x1e7f('0x30')](_0x4fe9ec,_0x48dcf7){const _0x2b40e1=this[_0x1e7f('0x42')][_0x1e7f('0x48')];this['_lastRequestId']=_0x48dcf7;for(const _0x1134fd of _0x4fe9ec){const _0x1b4540=_0x2b40e1[_0x1e7f('0x17')](_0x1134fd['id']);if(_0x1b4540){if((_0x1134fd[_0x1e7f('0x49')]||_0x1134fd[_0x1e7f('0x36')])&&(_0x1134fd['diffData']=null),_0x1b4540===this[_0x1e7f('0x42')][_0x1e7f('0x2e')]){const _0x5d3d83=Math['max'](_0x1b4540['toVersion'],_0x1134fd[_0x1e7f('0x36')]),_0x5f5ad8=Math['max'](_0x1b4540['fromVersion'],_0x1134fd[_0x1e7f('0x49')]);let _0x2f07fd;_0x1b4540['toVersion']===_0x1134fd[_0x1e7f('0x36')]&&_0x1b4540[_0x1e7f('0x49')]===_0x1134fd[_0x1e7f('0x49')]?(_0x2f07fd=!0x0,this[_0x1e7f('0x0')](_0x1134fd)):_0x1134fd[_0x1e7f('0x36')]===_0x5d3d83&&_0x1134fd[_0x1e7f('0x49')]===_0x5f5ad8?_0x2f07fd=!0x1:(_0x1b4540['toVersion']===_0x5d3d83&&_0x1b4540[_0x1e7f('0x49')]===_0x5f5ad8||this[_0x1e7f('0x13')]({'revision':_0x1b4540,'from':_0x5f5ad8,'to':_0x5d3d83}),_0x2f07fd=!0x0),_0x2f07fd&&(delete _0x1134fd[_0x1e7f('0x49')],delete _0x1134fd[_0x1e7f('0x36')],delete _0x1134fd[_0x1e7f('0x7')],delete _0x1134fd['createdAt'],delete _0x1134fd[_0x1e7f('0x4a')]);}this[_0x1e7f('0x42')][_0x1e7f('0xc')](_0x1134fd),this[_0x1e7f('0x0')](_0x1134fd);}else this[_0x1e7f('0x42')][_0x1e7f('0x46')](_0x1134fd);}const _0x1588c6=_0x2b40e1[_0x1e7f('0x8')]();_0x1588c6[_0x1e7f('0xd')]();for(let _0x49379f=0x0;_0x49379f<_0x1588c6[_0x1e7f('0xe')]-0x1;_0x49379f++){const _0x4d94c7=_0x1588c6[_0x49379f],_0x2e1ab0=_0x1588c6[_0x49379f+0x1];if(_0x4d94c7['fromVersion']<_0x2e1ab0[_0x1e7f('0x36')]){const _0x3a4ffb=_0x2e1ab0[_0x1e7f('0x36')],_0x2bd4fc=Math[_0x1e7f('0x2f')](_0x3a4ffb,_0x4d94c7[_0x1e7f('0x36')]);this['_fixRevision']({'revision':_0x4d94c7,'from':_0x3a4ffb,'to':_0x2bd4fc});}}}['_fixRevision']({revision:_0x48cbfc,from:_0x2f8cb8,to:_0x12b8fc}={}){const _0x3d7612=this[_0x1e7f('0x15')][_0x1e7f('0x47')]['get'](_0x1e7f('0x4d')),_0x5ba25d=this[_0x1e7f('0x42')][_0x1e7f('0x1')]({'revision':_0x48cbfc,'from':_0x2f8cb8,'to':_0x12b8fc});_0x5ba25d['authors']=_0x5ba25d[_0x1e7f('0x4a')][_0x1e7f('0x3')](_0xb9e5cf=>_0x3d7612[_0x1e7f('0x3f')](_0xb9e5cf)),_0x48cbfc[_0x1e7f('0xb')](_0x5ba25d);}[_0x1e7f('0x0')](_0x127fa2){const _0x4da659={};_0x4da659['id']=_0x127fa2['id'];for(const _0xa115 of Object[_0x1e7f('0x20')](_0x127fa2))'id'!==_0xa115&&(_0x4da659[_0xa115]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x4da659['id'],_0x4da659,!0x0);}async['_fetchMissingUsers'](_0x3c6bac){const _0x50eaa4=this[_0x1e7f('0x15')]['plugins'][_0x1e7f('0x1b')](_0x22c699),{connection:_0x13de3f}=this[_0x1e7f('0x15')][_0x1e7f('0x47')][_0x1e7f('0x1b')](_0x15dafd),_0x444186=new Set();for(const _0x4c9a68 of _0x3c6bac){for(const _0x49ea45 of _0x4c9a68[_0x1e7f('0x4a')])_0x47fc95(_0x49ea45);_0x4c9a68[_0x1e7f('0x2d')]&&_0x47fc95(_0x4c9a68[_0x1e7f('0x2d')]);}if(0x0===_0x444186[_0x1e7f('0x3a')])return;const _0x4f520e=await _0x56c5f8['getMany'](_0x13de3f,Array['from'](_0x444186));for(const _0x4e63a9 of _0x4f520e)_0x50eaa4[_0x1e7f('0x3f')](_0x4e63a9['id'])||_0x50eaa4['addUser'](_0x4e63a9);function _0x47fc95(_0x506fb0){_0x50eaa4[_0x1e7f('0x3f')](_0x506fb0)||_0x444186['add'](_0x506fb0);}}}function Q(_0x5ed04b){return _0x5ed04b[_0x1e7f('0x28')]['startsWith'](_0x1e7f('0x35'))||_0x5ed04b[_0x1e7f('0x28')]['startsWith'](_0x1e7f('0x52'))||_0x5ed04b[_0x1e7f('0x28')]['startsWith'](_0x1e7f('0x5'));}v[_0x1e7f('0x50')]=_0x613f68;
23
+ const _0x3ad9=['_lastRequestId','editor','sessionId','getRevision','_revisionHistoryService','sendBufferedUpdates','isEmptyCurrent','isConnected','toVersion','revisionsUpdated','isBundleUploaded','cloudServices.bundleVersion','_fetchMissingUsers','keys','getRevisions','400','destroy','config','_handleRevisionsUpdate','cloud-services-internal-error:\x20Request\x20timeout.','plugins','map','setRevisionData','change:_isPendingUpdate','requires','buildRevisionData','adapter','_revisions','_preventResendingRevisionData','off','startsWith','change:_isConnected','baseVersion','_revisionTracker','_update','getUser','reconnect','fromVersion','catch','reverse','cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.','diffData','_fixRevision','message','get','_startingVersion','_bufferUpdate','listenTo','state','authors','setSource','RevisionTracker','serverHistory','_offset','length','size','repository','creatorId','bind','marker','_getLatestVersionFromServerOperations','code','_oldOffset','connection','init','RevisionHistoryService','once','createdAt','cloud-services-internal-error:\x20Not\x20connected.','affectsData','_waitForServiceReady','remove','addUser','data','type','isEnabled','addRevisionData','collaboration.channelId','currentRevision','authorsIds','_handleReconnectionError','max','then'];(function(_0x5bd477,_0x3ad964){const _0x1e2bd8=function(_0x2e5ad5){while(--_0x2e5ad5){_0x5bd477['push'](_0x5bd477['shift']());}};_0x1e2bd8(++_0x3ad964);}(_0x3ad9,0x1e6));const _0x1e2b=function(_0x5bd477,_0x3ad964){_0x5bd477=_0x5bd477-0x0;let _0x1e2bd8=_0x3ad9[_0x5bd477];return _0x1e2bd8;};import{Plugin as _0x128552}from'ckeditor5/src/core';import{version as _0x134d20}from'ckeditor5/src/utils';import{Users as _0x292587}from'ckeditor5-collaboration/src/collaboration-core';import _0x36f851 from'../realtimecollaborativeediting/realtimecollaborationclient';import _0x3625f4 from'../realtimecollaborativeediting/websocketgateway';import _0x4599c5 from'../realtimecollaborativeediting/sessions';import _0x1aa608 from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import _0x3f9f90 from'@ckeditor/ckeditor-cloud-services-collaboration/src/revision-history/revisionhistoryservice';import _0x4617f5 from'@ckeditor/ckeditor-cloud-services-collaboration/src/editor/editorservice';import{WEB_SOCKET_GATEWAY_STATES as _0x1e020a}from'@ckeditor/ckeditor-cloud-services-collaboration/src/websocketgateway/websocketgateway';export default class v extends _0x128552{static get[_0x1e2b('0x24')](){return[_0x3625f4,_0x36f851,_0x1e2b('0x3f'),_0x4599c5,_0x292587];}constructor(_0x16bf30){super(_0x16bf30);const _0x569bb9=this[_0x1e2b('0xd')][_0x1e2b('0x1d')]['get'](_0x1e2b('0x6'));this[_0x1e2b('0xc')]=null,this['_revisionTracker']=this[_0x1e2b('0xd')][_0x1e2b('0x20')][_0x1e2b('0x38')](_0x1e2b('0x3f')),this[_0x1e2b('0x10')]=new v[(_0x1e2b('0x4d'))](_0x569bb9);}async[_0x1e2b('0x4c')](){const _0x1bacc4=this[_0x1e2b('0xd')]['plugins'][_0x1e2b('0x38')](_0x36f851),_0x129eee=_0x1bacc4['serverHistory'],_0x515994=this[_0x1e2b('0xd')][_0x1e2b('0x20')][_0x1e2b('0x38')](_0x3625f4);this[_0x1e2b('0x2d')][_0x1e2b('0x3e')]({'history':_0x129eee,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x1bacc4['sessionId']});const _0x1143dd=this[_0x1e2b('0xd')]['config']['get'](_0x1e2b('0x17'))||_0x134d20,_0x31b947=await _0x4617f5[_0x1e2b('0x16')](_0x515994[_0x1e2b('0x4b')],_0x1143dd);this[_0x1e2b('0x2d')][_0x1e2b('0x26')]={'getRevision':async({revisionId:_0x100ace})=>(await this[_0x1e2b('0x52')](),await this[_0x1e2b('0x10')][_0x1e2b('0xf')](_0x100ace)),'updateRevisions':async _0x2abdc5=>{await this[_0x1e2b('0x52')]();const _0x53ad6d=this['_revisionTracker'][_0x1e2b('0x7')];if(_0x31b947&&0x1===_0x2abdc5[_0x1e2b('0x42')]&&_0x2abdc5[0x0]['id']===_0x53ad6d['id'])return _0x2abdc5;for(const _0x1c76a4 of _0x2abdc5)_0x1c76a4['id']===_0x53ad6d['id']&&(_0x1c76a4[_0x1e2b('0x12')]=_0x1c76a4[_0x1e2b('0x31')]===_0x1c76a4['toVersion']);return this[_0x1e2b('0x10')]['updateRevisions'](_0x2abdc5,this['_lastRequestId'])[_0x1e2b('0xb')](_0x202841=>(this[_0x1e2b('0xc')]=_0x202841,_0x2abdc5))['catch'](_0x45b8af=>{if(ot(_0x45b8af)||_0x1e2b('0x1b')===_0x45b8af[_0x1e2b('0x49')]&&void 0x0!==_0x45b8af[_0x1e2b('0x2')]['wrongRequestId']){for(const _0x578807 of _0x2abdc5){!this['_revisionTracker'][_0x1e2b('0x44')][_0x1e2b('0xf')](_0x578807['id'])||this[_0x1e2b('0x2d')][_0x1e2b('0x3a')](_0x578807['id'],_0x578807,!0x1);}if(ot(_0x45b8af))throw _0x45b8af;return _0x2abdc5;}throw _0x45b8af;});}},this[_0x1e2b('0x3b')](this[_0x1e2b('0x10')],_0x1e2b('0x15'),(_0xc40528,{revisionsData:_0x5dc31f,requestId:_0x1abef6})=>{Math[_0x1e2b('0xa')](..._0x5dc31f[_0x1e2b('0x21')](_0x397b94=>_0x397b94[_0x1e2b('0x14')]))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()[_0x1e2b('0xb')](()=>{this['_handleRevisionsUpdate'](_0x5dc31f,_0x1abef6);}):this[_0x1e2b('0x1e')](_0x5dc31f,_0x1abef6);});const {revisions:_0x4c7fb0,requestId:_0x5f5947}=await this[_0x1e2b('0x10')]['connect'](_0x515994[_0x1e2b('0x4b')]);_0x515994['addToReconnectionStack'](this),this['_lastRequestId']=_0x5f5947,await this[_0x1e2b('0x18')](_0x4c7fb0);for(const _0x3863a8 of _0x4c7fb0)this[_0x1e2b('0x2d')]['addRevisionData'](_0x3863a8);this[_0x1e2b('0x3b')](_0x1bacc4,_0x1e2b('0x2b'),(_0x4e2c8f,_0xd3cf10,_0x4c7d1b)=>{_0x4c7d1b&&(this[_0x1e2b('0x4a')]=_0x1bacc4[_0x1e2b('0x41')],_0x4e2c8f['off']());}),this[_0x1e2b('0x2d')][_0x1e2b('0x46')](_0x1e2b('0x4'))['to'](_0x515994,_0x1e2b('0x3c'),_0x505b4d=>_0x505b4d===_0x1e020a['CONNECTED']);}async[_0x1e2b('0x30')](){const _0x4e87a0=this[_0x1e2b('0xd')]['plugins'][_0x1e2b('0x38')](_0x3625f4),_0x37f400=this[_0x1e2b('0xd')]['plugins']['get'](_0x36f851),_0x30ef70=async()=>{const _0x9f8caf=this[_0x1e2b('0x2d')][_0x1e2b('0x7')],_0x113aeb=_0x9f8caf['id'],_0x30f4b8=_0x113aeb!==_0x37f400[_0x1e2b('0xe')];if(_0x30f4b8){const _0x3742ea=_0x37f400['_offset']-this[_0x1e2b('0x4a')],_0x3e8ce9=this[_0x1e2b('0x48')]();this[_0x1e2b('0x2d')]['_revisionDataBuilder']['reInit']();if(_0x9f8caf[_0x1e2b('0x14')]+_0x3742ea!==_0x3e8ce9){const _0x2a1c4d=_0x9f8caf[_0x1e2b('0x31')]+_0x3742ea,_0x27a313=this[_0x1e2b('0xd')][_0x1e2b('0x20')]['get'](_0x292587),_0x27eadb=this[_0x1e2b('0x2d')][_0x1e2b('0x25')]({'revision':_0x9f8caf,'from':_0x2a1c4d,'to':_0x3e8ce9});_0x27eadb['id']=_0x9f8caf['id'];const _0x1f2edd=_0x27eadb[_0x1e2b('0x8')]['map'](_0x31be79=>_0x27a313[_0x1e2b('0x2f')](_0x31be79));_0x9f8caf[_0x1e2b('0x2e')]({..._0x27eadb,'authors':_0x1f2edd},!0x0),this[_0x1e2b('0x2d')]['_bufferUpdate'](_0x9f8caf['id'],_0x27eadb,!0x0);}this[_0x1e2b('0x2d')][_0x1e2b('0x39')]=_0x3e8ce9,(_0x9f8caf[_0x1e2b('0x14')]===_0x9f8caf[_0x1e2b('0x31')]&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x113aeb)&&this[_0x1e2b('0x2d')][_0x1e2b('0x44')][_0x1e2b('0x27')][_0x1e2b('0x0')](_0x113aeb),this[_0x1e2b('0x2d')]['_createCurrentRevision'](_0x3e8ce9));}const {revisions:_0x63cd2e,requestId:_0x50534b}=await this[_0x1e2b('0x10')][_0x1e2b('0x30')](_0x4e87a0[_0x1e2b('0x4b')],this[_0x1e2b('0xc')]);_0x30f4b8&&_0x63cd2e['length']>0x0?_0x37f400[_0x1e2b('0x9')]():(await this[_0x1e2b('0x18')](_0x63cd2e),this[_0x1e2b('0x1e')](_0x63cd2e,_0x50534b),this['_revisionTracker'][_0x1e2b('0x11')]());};return _0x37f400['_isConnected']?_0x30ef70():new Promise((_0x3de57c,_0x2ae7b1)=>{_0x37f400[_0x1e2b('0x4e')]('change:_isConnected',()=>{_0x30ef70()[_0x1e2b('0xb')](_0x3de57c)[_0x1e2b('0x32')](_0x2ae7b1);});});}[_0x1e2b('0x1c')](){super[_0x1e2b('0x1c')]();}async['_waitForServiceReady'](){this[_0x1e2b('0x10')][_0x1e2b('0x13')]||await new Promise(_0x37bf6f=>{this[_0x1e2b('0x3b')](this[_0x1e2b('0x10')],'connected',_0xd7e099=>{_0xd7e099[_0x1e2b('0x29')](),_0x37bf6f();});});}[_0x1e2b('0x48')](){const _0x4e8ffb=this[_0x1e2b('0xd')][_0x1e2b('0x20')][_0x1e2b('0x38')](_0x36f851)[_0x1e2b('0x40')]['getOperations']()[_0x1e2b('0x33')]();for(const _0x6e612b of _0x4e8ffb)if(_0x1e2b('0x47')!==_0x6e612b[_0x1e2b('0x3')]||_0x6e612b[_0x1e2b('0x51')])return _0x6e612b[_0x1e2b('0x2c')]+0x1;}['_getLatestVersion'](){const _0x21755f=this[_0x1e2b('0xd')][_0x1e2b('0x20')][_0x1e2b('0x38')](_0x36f851);return new Promise(_0x2a4969=>{_0x21755f['_isPendingUpdate']?_0x21755f[_0x1e2b('0x4e')](_0x1e2b('0x23'),()=>{_0x2a4969(this['_getLatestVersionFromServerOperations']());}):_0x2a4969(this[_0x1e2b('0x48')]());});}[_0x1e2b('0x1e')](_0x171615,_0x2297f8){const _0x101cb9=this['_revisionTracker'][_0x1e2b('0x44')];this[_0x1e2b('0xc')]=_0x2297f8;for(const _0x2b69a2 of _0x171615){const _0x4a9a84=_0x101cb9[_0x1e2b('0xf')](_0x2b69a2['id']);if(_0x4a9a84){if((_0x2b69a2['fromVersion']||_0x2b69a2[_0x1e2b('0x14')])&&(_0x2b69a2[_0x1e2b('0x35')]=null),_0x4a9a84===this[_0x1e2b('0x2d')]['currentRevision']){const _0xd061da=Math['max'](_0x4a9a84[_0x1e2b('0x14')],_0x2b69a2[_0x1e2b('0x14')]),_0x3b64a8=Math[_0x1e2b('0xa')](_0x4a9a84['fromVersion'],_0x2b69a2[_0x1e2b('0x31')]);let _0x18526a;_0x4a9a84['toVersion']===_0x2b69a2[_0x1e2b('0x14')]&&_0x4a9a84[_0x1e2b('0x31')]===_0x2b69a2[_0x1e2b('0x31')]?(_0x18526a=!0x0,this['_preventResendingRevisionData'](_0x2b69a2)):_0x2b69a2[_0x1e2b('0x14')]===_0xd061da&&_0x2b69a2[_0x1e2b('0x31')]===_0x3b64a8?_0x18526a=!0x1:(_0x4a9a84[_0x1e2b('0x14')]===_0xd061da&&_0x4a9a84['fromVersion']===_0x3b64a8||this[_0x1e2b('0x36')]({'revision':_0x4a9a84,'from':_0x3b64a8,'to':_0xd061da}),_0x18526a=!0x0),_0x18526a&&(delete _0x2b69a2['fromVersion'],delete _0x2b69a2[_0x1e2b('0x14')],delete _0x2b69a2[_0x1e2b('0x35')],delete _0x2b69a2[_0x1e2b('0x4f')],delete _0x2b69a2[_0x1e2b('0x8')]);}this[_0x1e2b('0x2d')][_0x1e2b('0x22')](_0x2b69a2),this[_0x1e2b('0x28')](_0x2b69a2);}else this[_0x1e2b('0x2d')][_0x1e2b('0x5')](_0x2b69a2);}const _0x1c7a46=_0x101cb9[_0x1e2b('0x1a')]();_0x1c7a46[_0x1e2b('0x33')]();for(let _0x5af896=0x0;_0x5af896<_0x1c7a46[_0x1e2b('0x42')]-0x1;_0x5af896++){const _0x35fc86=_0x1c7a46[_0x5af896],_0x312fb1=_0x1c7a46[_0x5af896+0x1];if(_0x35fc86[_0x1e2b('0x31')]<_0x312fb1[_0x1e2b('0x14')]){const _0x1704d0=_0x312fb1[_0x1e2b('0x14')],_0x3819f9=Math[_0x1e2b('0xa')](_0x1704d0,_0x35fc86[_0x1e2b('0x14')]);this['_fixRevision']({'revision':_0x35fc86,'from':_0x1704d0,'to':_0x3819f9});}}}[_0x1e2b('0x36')]({revision:_0x198ca3,from:_0x583d3a,to:_0x192fee}={}){const _0x2b14d4=this[_0x1e2b('0xd')][_0x1e2b('0x20')]['get'](_0x292587),_0x4175a8=this[_0x1e2b('0x2d')][_0x1e2b('0x25')]({'revision':_0x198ca3,'from':_0x583d3a,'to':_0x192fee});_0x4175a8[_0x1e2b('0x3d')]=_0x4175a8[_0x1e2b('0x8')][_0x1e2b('0x21')](_0x863eae=>_0x2b14d4[_0x1e2b('0x2f')](_0x863eae)),_0x198ca3[_0x1e2b('0x2e')](_0x4175a8);}[_0x1e2b('0x28')](_0x3e71b9){const _0x1a6ba8={};_0x1a6ba8['id']=_0x3e71b9['id'];for(const _0xc9ecbc of Object[_0x1e2b('0x19')](_0x3e71b9))'id'!==_0xc9ecbc&&(_0x1a6ba8[_0xc9ecbc]=void 0x0);this['_revisionTracker'][_0x1e2b('0x3a')](_0x1a6ba8['id'],_0x1a6ba8,!0x0);}async[_0x1e2b('0x18')](_0x4b55ee){const _0x3dc6a6=this['editor'][_0x1e2b('0x20')][_0x1e2b('0x38')](_0x292587),{connection:_0x1fa9f3}=this['editor']['plugins'][_0x1e2b('0x38')](_0x3625f4),_0x1a1ff1=new Set();for(const _0x3f344e of _0x4b55ee){for(const _0x211244 of _0x3f344e['authorsIds'])_0x405f24(_0x211244);_0x3f344e[_0x1e2b('0x45')]&&_0x405f24(_0x3f344e[_0x1e2b('0x45')]);}if(0x0===_0x1a1ff1[_0x1e2b('0x43')])return;const _0x4000b7=await _0x1aa608['getMany'](_0x1fa9f3,Array['from'](_0x1a1ff1));for(const _0x158d83 of _0x4000b7)_0x3dc6a6['getUser'](_0x158d83['id'])||_0x3dc6a6[_0x1e2b('0x1')](_0x158d83);function _0x405f24(_0x1efa70){_0x3dc6a6[_0x1e2b('0x2f')](_0x1efa70)||_0x1a1ff1['add'](_0x1efa70);}}}function ot(_0x2aa1e4){return _0x2aa1e4['message']['startsWith'](_0x1e2b('0x34'))||_0x2aa1e4[_0x1e2b('0x37')][_0x1e2b('0x2a')](_0x1e2b('0x50'))||_0x2aa1e4['message'][_0x1e2b('0x2a')](_0x1e2b('0x1f'));}v['RevisionHistoryService']=_0x3f9f90;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @module real-time-collaboration/realtimecollaborativerevisionhistory
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
6
+ /**
7
+ * Enables the real-time collaborative revision history feature.
8
+ *
9
+ * Requires adding `RevisionHistory` to the list of editor plugins.
10
+ *
11
+ * Check the {@glink features/collaboration/real-time-collaboration/real-time-collaboration-integration Real-time collaboration guide}
12
+ * to see how to launch the editor in the real-time collaboration mode.
13
+ */
14
+ export default class RealTimeCollaborativeRevisionHistory extends Plugin {
15
+ /**
16
+ * @inheritDoc
17
+ */
18
+ static get requires(): PluginDependencies;
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get pluginName(): 'RealTimeCollaborativeRevisionHistory';
23
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x578f=['RevisionHistory','requires'];(function(_0x1a1d32,_0x578fcb){var _0x1f549d=function(_0x2306f4){while(--_0x2306f4){_0x1a1d32['push'](_0x1a1d32['shift']());}};_0x1f549d(++_0x578fcb);}(_0x578f,0xd1));var _0x1f54=function(_0x1a1d32,_0x578fcb){_0x1a1d32=_0x1a1d32-0x0;var _0x1f549d=_0x578f[_0x1a1d32];return _0x1f549d;};import{Plugin as _0xe87828}from'ckeditor5/src/core';import _0x421c7d from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';import _0x236ec0 from'./realtimecollaborativeediting';export default class d extends _0xe87828{static get[_0x1f54('0x0')](){return[_0x1f54('0x1'),_0x421c7d,_0x236ec0];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}
23
+ var _0x45ca=['requires','pluginName'];(function(_0x32084e,_0x45ca5d){var _0x481ae9=function(_0x17ca95){while(--_0x17ca95){_0x32084e['push'](_0x32084e['shift']());}};_0x481ae9(++_0x45ca5d);}(_0x45ca,0x136));var _0x481a=function(_0x32084e,_0x45ca5d){_0x32084e=_0x32084e-0x0;var _0x481ae9=_0x45ca[_0x32084e];return _0x481ae9;};import{Plugin as _0x592ad0}from'ckeditor5/src/core';import _0x7b037c from'./realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter';import _0x3d9bd0 from'./realtimecollaborativeediting';export default class d extends _0x592ad0{static get[_0x481a('0x0')](){return['RevisionHistory',_0x7b037c,_0x3d9bd0];}static get[_0x481a('0x1')](){return'RealTimeCollaborativeRevisionHistory';}}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @module real-time-collaboration/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type PluginDependencies, type Editor } from 'ckeditor5/src/core';
6
+ import TrackChangesService from '@ckeditor/ckeditor-cloud-services-collaboration/src/track-changes/trackchangesservice';
7
+ import { type ReconnectPlugin } from '../realtimecollaborativeediting/websocketgateway';
8
+ /**
9
+ * The Cloud Services Track Changes Adapter plugin.
10
+ */
11
+ export default class CloudServicesTrackChangesAdapter extends Plugin implements ReconnectPlugin {
12
+ static TrackChangesService: typeof TrackChangesService;
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get requires(): PluginDependencies;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ constructor(editor: Editor);
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ init(): Promise<void>;
25
+ /**
26
+ * A method that will be executed when the `WebSocketGateway` will reconnect.
27
+ */
28
+ reconnect(): Promise<void>;
29
+ /**
30
+ * Waits for the service to be ready before calling the service API.
31
+ */
32
+ private _waitForServiceReady;
33
+ private _fetchMissingUsersForThreads;
34
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- const _0x2569=['_bufferedRequests','open','editor','attributes','cloud-services-internal-error:\x20Not\x20connected.','catch','find','size','TrackChangesService','off','getUser','reconnect','listenTo','hasSuggestion','data','set','_saved','collaboration.channelId','init','cloud-services-internal-error:\x20Request\x20timeout.','connect','originalSuggestionId','_trackChangesService','values','type','addUser','adapter','add','connected','requires','TrackChangesEditing','getMany','_waitForServiceReady','_fetchMissingUsersForThreads','plugins','get','from','message','config','addToReconnectionStack','addSuggestionData'];(function(_0x25bc90,_0x2569a4){const _0x2a9153=function(_0xfa5389){while(--_0xfa5389){_0x25bc90['push'](_0x25bc90['shift']());}};_0x2a9153(++_0x2569a4);}(_0x2569,0x102));const _0x2a91=function(_0x25bc90,_0x2569a4){_0x25bc90=_0x25bc90-0x0;let _0x2a9153=_0x2569[_0x25bc90];return _0x2a9153;};import{Plugin as _0x5d964f}from'ckeditor5/src/core';import _0x4a10b5 from'@ckeditor/ckeditor-cloud-services-collaboration/src/track-changes/trackchangesservice';import _0x131c93 from'../realtimecollaborativeediting/websocketgateway';import _0x14c54a from'../realtimecollaborativecomments/cloudservicescommentsadapter';import _0xc459fb from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import{Users as _0x3f7d1e}from'ckeditor5-collaboration/src/collaboration-core';export default class g extends _0x5d964f{static get[_0x2a91('0x11')](){return[_0x14c54a,'TrackChangesEditing',_0x131c93];}constructor(_0x31bc36){super(_0x31bc36),this['_bufferedRequests']=new Map();}[_0x2a91('0x6')](){const _0x3e10f0=this['editor'][_0x2a91('0x16')][_0x2a91('0x17')](_0x131c93),_0x3ea5b3=this[_0x2a91('0x1f')][_0x2a91('0x16')]['get'](_0x2a91('0x12')),_0x43fd07=this[_0x2a91('0x1f')][_0x2a91('0x1a')][_0x2a91('0x17')](_0x2a91('0x5'));return this[_0x2a91('0xa')]=new g[(_0x2a91('0x25'))](_0x43fd07),_0x3ea5b3[_0x2a91('0xe')]={'getSuggestion':async _0xae664b=>{await this[_0x2a91('0x14')]();const _0x315b60=await this[_0x2a91('0xa')][_0x2a91('0x17')](_0xae664b)[_0x2a91('0x22')](tt);return await this['_fetchMissingUsersForThreads']([_0x315b60]),_0x315b60;},'addSuggestion':async({id:_0x155a79,type:_0x5b98f0,data:_0x42af87,originalSuggestionId:_0x2d98d4,attributes:_0x11d876})=>{await this['_waitForServiceReady']();const _0x3be579={'id':_0x155a79,'type':_0x5b98f0,'data':_0x42af87,'originalSuggestionId':_0x2d98d4,'attributes':_0x11d876},_0x3aeefb=await this['_trackChangesService'][_0x2a91('0xf')](_0x155a79,_0x5b98f0,_0x42af87,_0x2d98d4,_0x11d876)[_0x2a91('0x22')](_0x5e6e4b=>{if(Q(_0x5e6e4b))return new Promise(_0x20ac38=>{this[_0x2a91('0x1d')][_0x2a91('0x3')](_0x155a79,{'resolve':_0x20ac38,'suggestionData':_0x3be579});});throw _0x5e6e4b;});return this['_bufferedRequests']['delete'](_0x155a79),_0x3aeefb;},'updateSuggestion':async(_0x584bfe,_0x41f026)=>{if(await this[_0x2a91('0x14')](),_0x2a91('0x1e')!==_0x41f026['state'])return this[_0x2a91('0xa')]['update'](_0x584bfe,_0x41f026)[_0x2a91('0x22')](tt);}},this[_0x2a91('0x0')](this['_trackChangesService'],'suggestionUpdated',(_0x3412cb,_0x15d71a)=>{_0x3ea5b3[_0x2a91('0x1')](_0x15d71a['id'])&&(_0x3ea5b3['getSuggestion'](_0x15d71a['id'])[_0x2a91('0x20')]=_0x15d71a[_0x2a91('0x20')]);}),this[_0x2a91('0xa')][_0x2a91('0x8')](_0x3e10f0['connection'])['then'](_0x276770=>(_0x3e10f0[_0x2a91('0x1b')](this),this[_0x2a91('0x15')](_0x276770)['then'](()=>{for(const _0xa4ed9b of _0x276770){_0x3ea5b3[_0x2a91('0x1c')](_0xa4ed9b)[_0x2a91('0x4')]=!0x0;}})));}async[_0x2a91('0x28')](){const _0x57a3be=this[_0x2a91('0x1f')]['plugins'][_0x2a91('0x17')]('TrackChangesEditing'),{connection:_0x49e337}=this['editor'][_0x2a91('0x16')]['get'](_0x131c93),_0x154476=await this['_trackChangesService'][_0x2a91('0x8')](_0x49e337);await this[_0x2a91('0x15')](_0x154476);for(const {suggestionData:_0x1f8d23,resolve:_0x3b9b51}of this['_bufferedRequests'][_0x2a91('0xb')]()){let _0x4f8932=_0x154476[_0x2a91('0x23')](_0x2f987c=>_0x2f987c['id']===_0x1f8d23['id']);_0x4f8932||(_0x4f8932=await this[_0x2a91('0xa')]['add'](_0x1f8d23['id'],_0x1f8d23[_0x2a91('0xc')],_0x1f8d23[_0x2a91('0x2')],_0x1f8d23[_0x2a91('0x9')])),_0x3b9b51(_0x4f8932);}for(const _0xd2319 of _0x154476)_0x57a3be['hasSuggestion'](_0xd2319['id'])||_0x57a3be[_0x2a91('0x1c')](_0xd2319);}async[_0x2a91('0x14')](){this[_0x2a91('0xa')]['isConnected']||await new Promise(_0x3e6a6f=>{this[_0x2a91('0x0')](this[_0x2a91('0xa')],_0x2a91('0x10'),_0x2fe019=>{_0x2fe019[_0x2a91('0x26')](),_0x3e6a6f();});});}async['_fetchMissingUsersForThreads'](_0x239680){const _0x39e72c=this[_0x2a91('0x1f')][_0x2a91('0x16')]['get'](_0x3f7d1e),{connection:_0x1b157c}=this[_0x2a91('0x1f')][_0x2a91('0x16')]['get'](_0x131c93),_0x12f482=new Set();for(const {authorId:_0x5f2896}of _0x239680)_0x39e72c['getUser'](_0x5f2896)||_0x12f482[_0x2a91('0xf')](_0x5f2896);if(0x0===_0x12f482[_0x2a91('0x24')])return;const _0x5ae610=await _0xc459fb[_0x2a91('0x13')](_0x1b157c,Array[_0x2a91('0x18')](_0x12f482));for(const _0x4006cd of _0x5ae610)_0x39e72c[_0x2a91('0x27')](_0x4006cd['id'])||_0x39e72c[_0x2a91('0xd')](_0x4006cd);}}function tt(_0x4752ca){if(Q(_0x4752ca))return new Promise(()=>{});throw _0x4752ca;}function Q(_0xed2d4a){return _0xed2d4a[_0x2a91('0x19')]['startsWith'](_0x2a91('0x21'))||_0xed2d4a['message']['startsWith'](_0x2a91('0x7'));}g[_0x2a91('0x25')]=_0x4a10b5;
23
+ const _0x2dfb=['collaboration.channelId','plugins','requires','off','addSuggestionData','TrackChangesService','update','TrackChangesEditing','catch','size','add','hasSuggestion','init','type','listenTo','adapter','startsWith','config','from','find','editor','_waitForServiceReady','cloud-services-internal-error:\x20Not\x20connected.','connect','delete','values','attributes','addUser','connected','set','_fetchMissingUsersForThreads','_bufferedRequests','suggestionUpdated','getMany','message','_trackChangesService','getSuggestion','get','addToReconnectionStack','isConnected','reconnect','cloud-services-internal-error:\x20Request\x20timeout.'];(function(_0x4454b9,_0x2dfbe2){const _0xb58c3f=function(_0x543a94){while(--_0x543a94){_0x4454b9['push'](_0x4454b9['shift']());}};_0xb58c3f(++_0x2dfbe2);}(_0x2dfb,0x75));const _0xb58c=function(_0x4454b9,_0x2dfbe2){_0x4454b9=_0x4454b9-0x0;let _0xb58c3f=_0x2dfb[_0x4454b9];return _0xb58c3f;};import{Plugin as _0x5d341c}from'ckeditor5/src/core';import _0x5ef3bb from'@ckeditor/ckeditor-cloud-services-collaboration/src/track-changes/trackchangesservice';import _0x1f15d7 from'../realtimecollaborativeediting/websocketgateway';import _0x382ae5 from'../realtimecollaborativecomments/cloudservicescommentsadapter';import _0xfb4c93 from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import{Users as _0x491abf}from'ckeditor5-collaboration/src/collaboration-core';export default class g extends _0x5d341c{static get[_0xb58c('0xb')](){return[_0x382ae5,_0xb58c('0x10'),_0x1f15d7];}constructor(_0x1a34e7){super(_0x1a34e7);const _0x394b57=this[_0xb58c('0x1d')][_0xb58c('0x1a')][_0xb58c('0x4')](_0xb58c('0x9'));this[_0xb58c('0x28')]=new Map(),this['_trackChangesService']=new g[(_0xb58c('0xe'))](_0x394b57);}[_0xb58c('0x15')](){const _0x1bacc9=this[_0xb58c('0x1d')][_0xb58c('0xa')][_0xb58c('0x4')](_0x1f15d7),_0x4fa710=this[_0xb58c('0x1d')][_0xb58c('0xa')]['get'](_0xb58c('0x10'));return _0x4fa710[_0xb58c('0x18')]={'getSuggestion':async _0x426cd3=>{await this['_waitForServiceReady']();const _0x53cf76=await this[_0xb58c('0x2')][_0xb58c('0x4')](_0x426cd3)[_0xb58c('0x11')](tt);return await this[_0xb58c('0x27')]([_0x53cf76]),_0x53cf76;},'addSuggestion':async({id:_0x512e84,type:_0x1ec36e,data:_0x585718,originalSuggestionId:_0x130fd3,attributes:_0x2b8001})=>{await this[_0xb58c('0x1e')]();const _0x11cba6={'id':_0x512e84,'type':_0x1ec36e,'data':_0x585718,'originalSuggestionId':_0x130fd3,'attributes':_0x2b8001},_0x22e846=await this[_0xb58c('0x2')][_0xb58c('0x13')](_0x512e84,_0x1ec36e,_0x585718,_0x130fd3,_0x2b8001)[_0xb58c('0x11')](_0x5760d1=>{if(ot(_0x5760d1))return new Promise(_0x29f65b=>{this[_0xb58c('0x28')][_0xb58c('0x26')](_0x512e84,{'resolve':_0x29f65b,'suggestionData':_0x11cba6});});throw _0x5760d1;});return this[_0xb58c('0x28')][_0xb58c('0x21')](_0x512e84),_0x22e846;},'updateSuggestion':async(_0x1990a5,_0x42db6a)=>{if(await this[_0xb58c('0x1e')](),'open'!==_0x42db6a['state'])return this['_trackChangesService'][_0xb58c('0xf')](_0x1990a5,_0x42db6a)[_0xb58c('0x11')](tt);}},this[_0xb58c('0x17')](this[_0xb58c('0x2')],_0xb58c('0x29'),(_0x34bdb1,_0x4ad485)=>{_0x4fa710[_0xb58c('0x14')](_0x4ad485['id'])&&(_0x4fa710[_0xb58c('0x3')](_0x4ad485['id'])['attributes']=_0x4ad485[_0xb58c('0x23')]);}),this[_0xb58c('0x2')]['connect'](_0x1bacc9['connection'])['then'](_0x4ffae3=>(_0x1bacc9[_0xb58c('0x5')](this),this[_0xb58c('0x27')](_0x4ffae3)['then'](()=>{for(const _0xe2a0f8 of _0x4ffae3){_0x4fa710[_0xb58c('0xd')](_0xe2a0f8)['_saved']=!0x0;}})));}async[_0xb58c('0x7')](){const _0x4b714b=this[_0xb58c('0x1d')]['plugins'][_0xb58c('0x4')](_0xb58c('0x10')),{connection:_0x2502b8}=this[_0xb58c('0x1d')][_0xb58c('0xa')][_0xb58c('0x4')](_0x1f15d7),_0x497840=await this[_0xb58c('0x2')][_0xb58c('0x20')](_0x2502b8);await this[_0xb58c('0x27')](_0x497840);for(const {suggestionData:_0x4fde33,resolve:_0x15cb4f}of this[_0xb58c('0x28')][_0xb58c('0x22')]()){let _0x2b2fa0=_0x497840[_0xb58c('0x1c')](_0x412dcd=>_0x412dcd['id']===_0x4fde33['id']);_0x2b2fa0||(_0x2b2fa0=await this[_0xb58c('0x2')][_0xb58c('0x13')](_0x4fde33['id'],_0x4fde33[_0xb58c('0x16')],_0x4fde33['data'],_0x4fde33['originalSuggestionId'])),_0x15cb4f(_0x2b2fa0);}for(const _0x5da0cc of _0x497840)_0x4b714b[_0xb58c('0x14')](_0x5da0cc['id'])||_0x4b714b[_0xb58c('0xd')](_0x5da0cc);}async[_0xb58c('0x1e')](){this[_0xb58c('0x2')][_0xb58c('0x6')]||await new Promise(_0x11e7ea=>{this[_0xb58c('0x17')](this[_0xb58c('0x2')],_0xb58c('0x25'),_0x2b9a6a=>{_0x2b9a6a[_0xb58c('0xc')](),_0x11e7ea();});});}async[_0xb58c('0x27')](_0xb39322){const _0x10f089=this[_0xb58c('0x1d')][_0xb58c('0xa')][_0xb58c('0x4')](_0x491abf),{connection:_0x4da1e8}=this[_0xb58c('0x1d')][_0xb58c('0xa')][_0xb58c('0x4')](_0x1f15d7),_0x2b4a5b=new Set();for(const {authorId:_0xa9b537}of _0xb39322)_0x10f089['getUser'](_0xa9b537)||_0x2b4a5b[_0xb58c('0x13')](_0xa9b537);if(0x0===_0x2b4a5b[_0xb58c('0x12')])return;const _0x16ed52=await _0xfb4c93[_0xb58c('0x0')](_0x4da1e8,Array[_0xb58c('0x1b')](_0x2b4a5b));for(const _0xdccff of _0x16ed52)_0x10f089['getUser'](_0xdccff['id'])||_0x10f089[_0xb58c('0x24')](_0xdccff);}}function tt(_0x35ae85){if(ot(_0x35ae85))return new Promise(()=>{});throw _0x35ae85;}function ot(_0x73a103){return _0x73a103[_0xb58c('0x1')][_0xb58c('0x19')](_0xb58c('0x1f'))||_0x73a103['message'][_0xb58c('0x19')](_0xb58c('0x8'));}g[_0xb58c('0xe')]=_0x5ef3bb;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @module real-time-collaboration/realtimecollaborativetrackchanges
3
+ * @publicApi
4
+ */
5
+ import { Plugin, type PluginDependencies } from 'ckeditor5/src/core';
6
+ /**
7
+ * Enables the real-time collaborative track changes feature.
8
+ *
9
+ * Check the {@glink features/collaboration/real-time-collaboration/real-time-collaboration-integration Real-time collaboration}
10
+ * guide to see how to launch the editor in the real-time collaboration mode.
11
+ */
12
+ export default class RealTimeCollaborativeTrackChanges extends Plugin {
13
+ /**
14
+ * @inheritDoc
15
+ */
16
+ static get requires(): PluginDependencies;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get pluginName(): 'RealTimeCollaborativeTrackChanges';
21
+ }
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- var _0x2315=['requires','RealTimeCollaborativeTrackChanges','pluginName','TrackChanges'];(function(_0xf4c71b,_0x23152f){var _0x1f117f=function(_0xeaff9e){while(--_0xeaff9e){_0xf4c71b['push'](_0xf4c71b['shift']());}};_0x1f117f(++_0x23152f);}(_0x2315,0xa4));var _0x1f11=function(_0xf4c71b,_0x23152f){_0xf4c71b=_0xf4c71b-0x0;var _0x1f117f=_0x2315[_0xf4c71b];return _0x1f117f;};import{Plugin as _0x2b24f3}from'ckeditor5/src/core';import _0x77c2d8 from'./realtimecollaborativetrackchanges/cloudservicestrackchangesadapter';import _0x17358f from'./realtimecollaborativecomments';export default class p extends _0x2b24f3{static get[_0x1f11('0x0')](){return[_0x17358f,_0x77c2d8,_0x1f11('0x3')];}static get[_0x1f11('0x2')](){return _0x1f11('0x1');}}
23
+ var _0xcd40=['TrackChanges','pluginName','requires'];(function(_0x50b8d1,_0xcd40a2){var _0x50a1e5=function(_0x259abe){while(--_0x259abe){_0x50b8d1['push'](_0x50b8d1['shift']());}};_0x50a1e5(++_0xcd40a2);}(_0xcd40,0x1b7));var _0x50a1=function(_0x50b8d1,_0xcd40a2){_0x50b8d1=_0x50b8d1-0x0;var _0x50a1e5=_0xcd40[_0x50b8d1];return _0x50a1e5;};import{Plugin as _0x67b4ab}from'ckeditor5/src/core';import _0x54f5ba from'./realtimecollaborativetrackchanges/cloudservicestrackchangesadapter';import _0x1e558c from'./realtimecollaborativecomments';export default class p extends _0x67b4ab{static get[_0x50a1('0x1')](){return[_0x1e558c,_0x54f5ba,_0x50a1('0x2')];}static get[_0x50a1('0x0')](){return'RealTimeCollaborativeTrackChanges';}}