@ckeditor/ckeditor5-real-time-collaboration 37.0.0-rc.0 → 37.0.1
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.
- package/build/real-time-collaboration.js +1 -1
- package/package.json +6 -6
- package/src/common-translations.js +1 -1
- package/src/presencelist/presencelistui.js +1 -1
- package/src/presencelist/view/presencecounterview.js +1 -1
- package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
- package/src/presencelist/view/presencedropdownlistview.js +1 -1
- package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
- package/src/presencelist/view/presenceinlinelistview.js +1 -1
- package/src/presencelist/view/presencelistview.js +1 -1
- package/src/presencelist.js +1 -1
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
- package/src/realtimecollaborativecomments.js +1 -1
- package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
- package/src/realtimecollaborativeediting/sessions.js +1 -1
- package/src/realtimecollaborativeediting/usermarkers.js +1 -1
- package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
- package/src/realtimecollaborativeediting.js +1 -1
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
- package/src/realtimecollaborativetrackchanges.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-real-time-collaboration",
|
|
3
|
-
"version": "37.0.
|
|
3
|
+
"version": "37.0.1",
|
|
4
4
|
"description": "A set of CKEditor 5 features enabling real-time collaboration within the editor using CKEditor Cloud Services.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"CHANGELOG.md"
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@ckeditor/ckeditor5-cloud-services": "^37.0.
|
|
45
|
-
"@ckeditor/ckeditor-cloud-services-collaboration": "^
|
|
46
|
-
"@ckeditor/ckeditor5-operations-compressor": "^37.0.
|
|
47
|
-
"ckeditor5": "^37.0.
|
|
48
|
-
"ckeditor5-collaboration": "^
|
|
44
|
+
"@ckeditor/ckeditor5-cloud-services": "^37.0.1",
|
|
45
|
+
"@ckeditor/ckeditor-cloud-services-collaboration": "^44.0.0",
|
|
46
|
+
"@ckeditor/ckeditor5-operations-compressor": "^37.0.1",
|
|
47
|
+
"ckeditor5": "^37.0.1",
|
|
48
|
+
"ckeditor5-collaboration": "^37.0.1",
|
|
49
49
|
"lodash-es": "^4.17.11"
|
|
50
50
|
},
|
|
51
51
|
"types": "src/index.d.ts",
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export function getTranslation(
|
|
23
|
+
export function getTranslation(_0x2c3d06,_0x30ebf3,_0x445dfc){const t=_0x2c3d06['t'];switch(_0x30ebf3){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x445dfc);default:return'';}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x11a4=['execute','isHidden','remove','lastConnectedUsers','requires','presenceDropdownView','attachToDom','plugins','isRendered','counterView','number','locale','from','add','init','inlineListView','onClick','presencelist-collapseat-invalid-format','content','ck\x20ck-presence-list__balloon','bind','allConnectedUsers','presenceList','presenceList.container','define','listenTo','appendChild','isCollapsed','view','length','render','set','presenceList.collapseAt','showDropdown','bodyCollection','bindTo','config','context','class','element','destroy','balloonPanelView','hideDropdown','items','_handleUserAdd','get','using','isVisible','hasTooltip','reverse','usersCount','_allConnectedUsers','detachFromDom','_handleUserRemove'];(function(_0x5094fc,_0x11a460){const _0x4a4fd0=function(_0x18afa0){while(--_0x18afa0){_0x5094fc['push'](_0x5094fc['shift']());}};_0x4a4fd0(++_0x11a460);}(_0x11a4,0x1b6));const _0x4a4f=function(_0x5094fc,_0x11a460){_0x5094fc=_0x5094fc-0x0;let _0x4a4fd0=_0x11a4[_0x5094fc];return _0x4a4fd0;};import{ContextPlugin as _0x561c1b}from'ckeditor5/src/core';import{CKEditorError as _0xc70b04,Collection as _0x26bf39}from'ckeditor5/src/utils';import{clickOutsideHandler as _0x356afb,BodyCollection as _0x16f774,BalloonPanelView as _0x11324a}from'ckeditor5/src/ui';import{isElement as _0x25b03c}from'lodash-es';import _0x311cb2 from'../realtimecollaborativeediting/sessions';import _0x4e4080 from'./view/presencelistview';import _0x391d67 from'./view/presencedropdownlistview';import _0x513a87 from'./view/presencedropdownlistitemview';import _0x866a1 from'./view/presenceinlinelistitemview';export default class i extends _0x561c1b{constructor(_0x3234b6){super(_0x3234b6),this['context']['config'][_0x4a4f('0x12')](_0x4a4f('0x10'),{'collapseAt':0x6});const _0xd188cc=_0x3234b6[_0x4a4f('0x1e')][_0x4a4f('0x27')](_0x4a4f('0x1a'));if(_0x4a4f('0x4')!=typeof _0xd188cc)throw new _0xc70b04(_0x4a4f('0xb'),this);if(_0xd188cc<0x1)throw new _0xc70b04(_0x4a4f('0xb'),this);this[_0x4a4f('0x2d')]=this[_0x4a4f('0x1f')][_0x4a4f('0x1')][_0x4a4f('0x27')](_0x311cb2)[_0x4a4f('0xf')],this[_0x4a4f('0x19')](_0x4a4f('0x2c'),0x0),this[_0x4a4f('0x33')]=new _0x26bf39(),this[_0x4a4f('0x23')]=new _0x11324a(),this[_0x4a4f('0x23')][_0x4a4f('0x20')]=_0x4a4f('0xd'),this[_0x4a4f('0x16')]=this['_createView'](),this[_0x4a4f('0x35')]=void 0x0;}static get[_0x4a4f('0x34')](){return[_0x311cb2];}[_0x4a4f('0x8')](){for(const _0x3f965c of this[_0x4a4f('0x2d')])this['_handleUserAdd'](_0x3f965c);this[_0x4a4f('0x13')](this[_0x4a4f('0x2d')],'add',(_0x1d71f8,_0x53f412)=>{this['_handleUserAdd'](_0x53f412);}),this[_0x4a4f('0x13')](this['_allConnectedUsers'],_0x4a4f('0x32'),(_0x1fb30c,_0x33e735)=>{this['_handleUserRemove'](_0x33e735);});}['_createView'](){const _0x563b82=this[_0x4a4f('0x1f')],_0x53f713=new _0x4e4080(this[_0x4a4f('0x1f')][_0x4a4f('0x5')]),_0x4748f9=this['balloonPanelView'];if(!_0x25b03c(_0x563b82[_0x4a4f('0x1e')]['get'](_0x4a4f('0x11'))))throw new _0xc70b04('presencelist-missing-container',this);return _0x53f713[_0x4a4f('0x3')][_0x4a4f('0xe')]('usersCount')['to'](this),_0x53f713[_0x4a4f('0xe')]('isCollapsed')['to'](this,_0x4a4f('0x2c'),_0x2bac87=>{const _0x4c1011=_0x2bac87>=_0x563b82[_0x4a4f('0x1e')][_0x4a4f('0x27')](_0x4a4f('0x1a'));return _0x53f713[_0x4a4f('0x3')][_0x4a4f('0x31')]=!(0x1==_0x2bac87||_0x4c1011),_0x4c1011||this[_0x4a4f('0x24')](),_0x4c1011;}),_0x53f713[_0x4a4f('0x9')][_0x4a4f('0x25')]['bindTo'](this[_0x4a4f('0x33')])[_0x4a4f('0x28')](_0x311117=>{const _0x18c500=_0x563b82[_0x4a4f('0x1e')][_0x4a4f('0x27')](_0x4a4f('0x10')),_0x52d0a6=new _0x866a1(_0x563b82['locale'],_0x311117,!!_0x18c500[_0x4a4f('0xa')]);return _0x52d0a6[_0x4a4f('0xe')](_0x4a4f('0x2a'))['to'](_0x53f713,'isCollapsed',_0x23145b=>!_0x23145b),_0x18c500[_0x4a4f('0xa')]&&this[_0x4a4f('0x13')](_0x52d0a6,_0x4a4f('0x30'),()=>{this[_0x4a4f('0x16')][_0x4a4f('0x15')]||_0x18c500[_0x4a4f('0xa')](_0x311117,_0x52d0a6[_0x4a4f('0x21')]);}),_0x52d0a6;}),this[_0x4a4f('0x13')](_0x53f713[_0x4a4f('0x9')],_0x4a4f('0x30'),()=>{this[_0x4a4f('0x35')]?this[_0x4a4f('0x24')]():this[_0x4a4f('0x16')]['isCollapsed']&&this[_0x4a4f('0x1b')]();}),_0x53f713[_0x4a4f('0x18')](),_0x4748f9[_0x4a4f('0x18')](),_0x356afb({'emitter':_0x53f713,'activator':()=>_0x4748f9[_0x4a4f('0x29')],'contextElements':[_0x4748f9['element'],_0x53f713[_0x4a4f('0x9')][_0x4a4f('0x21')]],'callback':()=>this[_0x4a4f('0x24')]()}),_0x563b82[_0x4a4f('0x1e')]['get'](_0x4a4f('0x11'))[_0x4a4f('0x14')](_0x53f713['element']),this[_0x4a4f('0x1c')]=new _0x16f774(this[_0x4a4f('0x1f')]['locale']),this[_0x4a4f('0x1c')][_0x4a4f('0x0')](),this[_0x4a4f('0x1c')][_0x4a4f('0x7')](_0x4748f9),_0x53f713;}[_0x4a4f('0x26')](_0x11a6a0){this['usersCount']++,0x5==this[_0x4a4f('0x33')][_0x4a4f('0x17')]&&this[_0x4a4f('0x33')]['remove'](0x0),this['lastConnectedUsers'][_0x4a4f('0x7')](_0x11a6a0);}[_0x4a4f('0x2f')](_0x165dfd){if(this[_0x4a4f('0x2c')]--,this[_0x4a4f('0x33')][_0x4a4f('0x27')](_0x165dfd['id'])&&(this[_0x4a4f('0x33')][_0x4a4f('0x32')](_0x165dfd['id']),this[_0x4a4f('0x33')][_0x4a4f('0x17')]<this['usersCount']))for(const _0x259b9f of Array[_0x4a4f('0x6')](this[_0x4a4f('0x2d')])[_0x4a4f('0x2b')]())if(!this[_0x4a4f('0x33')][_0x4a4f('0x27')](_0x259b9f['id']))return void this[_0x4a4f('0x33')]['add'](_0x259b9f,0x0);}[_0x4a4f('0x1b')](){if(this[_0x4a4f('0x35')])return;this[_0x4a4f('0x35')]=new _0x391d67(this[_0x4a4f('0x1f')][_0x4a4f('0x5')]);const _0x1a2b4a=this['context'][_0x4a4f('0x1e')][_0x4a4f('0x27')](_0x4a4f('0x10'));this[_0x4a4f('0x35')][_0x4a4f('0x25')][_0x4a4f('0x1d')](this[_0x4a4f('0x2d')])[_0x4a4f('0x28')](_0x23debf=>{const _0xa5be1=new _0x513a87(this[_0x4a4f('0x1f')]['locale'],_0x23debf,!!_0x1a2b4a[_0x4a4f('0xa')]);return _0x1a2b4a[_0x4a4f('0xa')]&&this[_0x4a4f('0x13')](_0xa5be1,_0x4a4f('0x30'),()=>{_0x1a2b4a[_0x4a4f('0xa')](_0x23debf,_0xa5be1[_0x4a4f('0x21')]);}),_0xa5be1;}),this[_0x4a4f('0x23')][_0x4a4f('0xc')][_0x4a4f('0x7')](this['presenceDropdownView']),this[_0x4a4f('0x23')]['pin']({'target':this['view']['inlineListView'][_0x4a4f('0x21')]});}[_0x4a4f('0x24')](){this[_0x4a4f('0x35')]&&(this[_0x4a4f('0x23')]['unpin'](),this[_0x4a4f('0x23')][_0x4a4f('0xc')][_0x4a4f('0x32')](this[_0x4a4f('0x35')]),this[_0x4a4f('0x35')][_0x4a4f('0x22')](),this[_0x4a4f('0x35')]=void 0x0);}['destroy'](){super[_0x4a4f('0x22')](),this['view']&&this[_0x4a4f('0x16')][_0x4a4f('0x2')]&&this[_0x4a4f('0x16')][_0x4a4f('0x22')](),this['bodyCollection']&&this[_0x4a4f('0x1c')][_0x4a4f('0x2e')]();}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2a50=['CONNECTED_USERS','set','div','usersCount','setTemplate','ck-presence-list__counter--hidden','isHidden','bindTemplate'];(function(_0x189ee0,_0x2a500c){const _0x1abb4c=function(_0x1747f7){while(--_0x1747f7){_0x189ee0['push'](_0x189ee0['shift']());}};_0x1abb4c(++_0x2a500c);}(_0x2a50,0xcb));const _0x1abb=function(_0x189ee0,_0x2a500c){_0x189ee0=_0x189ee0-0x0;let _0x1abb4c=_0x2a50[_0x189ee0];return _0x1abb4c;};import{View as _0xeabbc8}from'ckeditor5/src/ui';import{getTranslation as _0xc36672}from'../../common-translations';export default class it extends _0xeabbc8{constructor(_0x322c11){super(_0x322c11);const _0x3aca34=this[_0x1abb('0x4')];this[_0x1abb('0x6')](_0x1abb('0x0'),0x0),this[_0x1abb('0x6')]('isHidden',!0x0),this[_0x1abb('0x1')]({'tag':_0x1abb('0x7'),'attributes':{'class':['ck','ck-presence-list__counter',_0x3aca34['if'](_0x1abb('0x3'),_0x1abb('0x2'))]},'children':[{'text':_0x3aca34['to'](_0x1abb('0x0'),_0x5bccc3=>_0xc36672(_0x322c11,_0x1abb('0x5'),_0x5bccc3))}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x8854=['ck-presence-list__marker','ck-user__full-name','true','div','color','bindTemplate','tag','button','span','fire','setTemplate','ck-presence-list__dropdown-list-item','execute','userView'];(function(_0x1a6222,_0x885403){const _0x3914b8=function(_0x128583){while(--_0x128583){_0x1a6222['push'](_0x1a6222['shift']());}};_0x3914b8(++_0x885403);}(_0x8854,0xd2));const _0x3914=function(_0x1a6222,_0x885403){_0x1a6222=_0x1a6222-0x0;let _0x3914b8=_0x8854[_0x1a6222];return _0x3914b8;};import{View as _0x38ca09}from'ckeditor5/src/ui';import{UserView as _0x568071}from'ckeditor5-collaboration/src/collaboration-core';export default class C extends _0x38ca09{constructor(_0x2f0f73,_0x24635b,_0x1f4118){super(_0x2f0f73);const _0x488f59=this[_0x3914('0x5')];this[_0x3914('0xd')]=new _0x568071(_0x2f0f73,_0x24635b);const _0xbeefc8={'tag':_0x3914('0x3'),'attributes':{'class':['ck',_0x3914('0xb')]},'children':[this[_0x3914('0xd')],{'tag':_0x3914('0x8'),'attributes':{'class':['ck',_0x3914('0x1')]},'children':[{'text':_0x24635b['name']}]},{'tag':_0x3914('0x8'),'attributes':{'class':['ck',_0x3914('0x0'),_0x24635b[_0x3914('0x4')]['getBackgroundColorClass']()],'aria-hidden':_0x3914('0x2')}}]};_0x1f4118&&(_0xbeefc8[_0x3914('0x6')]=_0x3914('0x7'),_0xbeefc8['on']={'click':_0x488f59['to'](()=>this[_0x3914('0x9')](_0x3914('0xc')))}),this[_0x3914('0xa')](_0xbeefc8);}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x5983=['ck-presence-list__dropdown-list','ck-presence-list__dropdown-list-wrapper','div','items','createCollection','setTemplate'];(function(_0x52206b,_0x59836f){var _0x4a15af=function(_0xdaa355){while(--_0xdaa355){_0x52206b['push'](_0x52206b['shift']());}};_0x4a15af(++_0x59836f);}(_0x5983,0x1bd));var _0x4a15=function(_0x52206b,_0x59836f){_0x52206b=_0x52206b-0x0;var _0x4a15af=_0x5983[_0x52206b];return _0x4a15af;};import{View as _0xea5bac}from'ckeditor5/src/ui';export default class A extends _0xea5bac{constructor(_0x59ee75){super(_0x59ee75),this[_0x4a15('0x2')]=this[_0x4a15('0x3')](),this[_0x4a15('0x4')]({'tag':_0x4a15('0x1'),'attributes':{'class':['ck',_0x4a15('0x5')]},'children':[{'tag':'div','attributes':{'class':['ck',_0x4a15('0x0')]},'children':this[_0x4a15('0x2')]}]});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4446=['ck-presence-list__marker','getBackgroundColorClass','name','button','ck-presence-list__list-item','ck-presence-list__list-item__tooltip','setTemplate','div','span','set','bindTemplate','true','userView','markerView','execute'];(function(_0x5c5506,_0x4446a9){const _0x4e62c9=function(_0x3eff5f){while(--_0x3eff5f){_0x5c5506['push'](_0x5c5506['shift']());}};_0x4e62c9(++_0x4446a9);}(_0x4446,0x1e8));const _0x4e62=function(_0x5c5506,_0x4446a9){_0x5c5506=_0x5c5506-0x0;let _0x4e62c9=_0x4446[_0x5c5506];return _0x4e62c9;};import{View as _0x1fd583}from'ckeditor5/src/ui';import{UserView as _0xe7bd1d}from'ckeditor5-collaboration/src/collaboration-core';export default class _ extends _0x1fd583{constructor(_0x32fac6,_0x56f3d9,_0x35d618){super(_0x32fac6);const _0x55071d=this[_0x4e62('0x2')];this[_0x4e62('0x1')]('hasTooltip',!0x0),this[_0x4e62('0x1')]('tooltipPosition',''),this[_0x4e62('0x4')]=new _0xe7bd1d(_0x32fac6,_0x56f3d9),this[_0x4e62('0x5')]=new at(_0x32fac6,_0x56f3d9);const _0x336e35={'tag':_0x4e62('0xe'),'attributes':{'class':['ck',_0x4e62('0xb')],'data-cke-tooltip-text':this[_0x4e62('0x4')][_0x4e62('0x9')],'data-cke-tooltip-position':_0x55071d['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x55071d['to']('hasTooltip',_0x2768f9=>!_0x2768f9),'data-cke-tooltip-class':_0x4e62('0xc')},'children':[this[_0x4e62('0x4')],this[_0x4e62('0x5')]]};_0x35d618&&(_0x336e35['tag']=_0x4e62('0xa'),_0x336e35['on']={'click':_0x55071d['to'](()=>this['fire'](_0x4e62('0x6')))}),this[_0x4e62('0xd')](_0x336e35);}}class at extends _0x1fd583{constructor(_0x4dbf09,_0x5beb4b){super(_0x4dbf09),this[_0x4e62('0xd')]({'tag':_0x4e62('0x0'),'attributes':{'class':['ck',_0x4e62('0x7'),_0x5beb4b['color'][_0x4e62('0x8')]()],'aria-hidden':_0x4e62('0x3')}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x24b0=['div','bindTemplate','items','setTemplate'];(function(_0x4fac3c,_0x24b08f){const _0x493fd7=function(_0x35ad58){while(--_0x35ad58){_0x4fac3c['push'](_0x4fac3c['shift']());}};_0x493fd7(++_0x24b08f);}(_0x24b0,0x1b3));const _0x493f=function(_0x4fac3c,_0x24b08f){_0x4fac3c=_0x4fac3c-0x0;let _0x493fd7=_0x24b0[_0x4fac3c];return _0x493fd7;};import{View as _0x2e8466}from'ckeditor5/src/ui';export default class rt extends _0x2e8466{constructor(_0xdb99ae){super(_0xdb99ae),this[_0x493f('0x3')]=this['createCollection']();const _0x3d83f=this[_0x493f('0x2')];this[_0x493f('0x0')]({'tag':_0x493f('0x1'),'attributes':{'class':['ck','ck-presence-list__list']},'children':this[_0x493f('0x3')],'on':{'click':_0x3d83f['to'](()=>this['fire']('execute'))}});}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4075=['div','ck-rounded-corners','change','first','listenTo','bindTemplate','isCollapsed','setTemplate','inlineListView','locale','tooltipPosition','items','set','ck-reset','ck-presence-list','ck-presence-list--collapsed'];(function(_0x2c58b6,_0x407560){const _0x592f5e=function(_0x5e298e){while(--_0x5e298e){_0x2c58b6['push'](_0x2c58b6['shift']());}};_0x592f5e(++_0x407560);}(_0x4075,0x11e));const _0x592f=function(_0x2c58b6,_0x407560){_0x2c58b6=_0x2c58b6-0x0;let _0x592f5e=_0x4075[_0x2c58b6];return _0x592f5e;};import{View as _0x3e0e9b}from'ckeditor5/src/ui';import _0x8b98a9 from'./presencecounterview';import _0x5e2e9a from'./presenceinlinelistview';import'../../../theme/presencelist.css';export default class x extends _0x3e0e9b{constructor(_0x391891){super(_0x391891);const _0x3058ad=this[_0x592f('0x7')];this[_0x592f('0xe')](_0x592f('0x8'),!0x0),this['counterView']=new _0x8b98a9(this[_0x592f('0xb')]),this[_0x592f('0xa')]=new _0x5e2e9a(_0x391891),this[_0x592f('0x6')](this[_0x592f('0xa')]['items'],_0x592f('0x4'),()=>{for(const _0x2b3d55 of this[_0x592f('0xa')][_0x592f('0xd')])_0x2b3d55[_0x592f('0xc')]='s';this[_0x592f('0xa')][_0x592f('0xd')][_0x592f('0x5')]&&(this[_0x592f('0xa')][_0x592f('0xd')][_0x592f('0x5')]['tooltipPosition']='se');}),this[_0x592f('0x9')]({'tag':_0x592f('0x2'),'attributes':{'class':['ck',_0x592f('0x0'),_0x592f('0xf'),_0x592f('0x3'),_0x3058ad['if'](_0x592f('0x8'),_0x592f('0x1'))]},'children':[this['counterView'],this[_0x592f('0xa')]]});}}
|
package/src/presencelist.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
var
|
|
23
|
+
var _0x395e=['requires','PresenceList','pluginName'];(function(_0x176f64,_0x395e8f){var _0x291f0=function(_0x5f3153){while(--_0x5f3153){_0x176f64['push'](_0x176f64['shift']());}};_0x291f0(++_0x395e8f);}(_0x395e,0xc6));var _0x291f=function(_0x176f64,_0x395e8f){_0x176f64=_0x176f64-0x0;var _0x291f0=_0x395e[_0x176f64];return _0x291f0;};import{ContextPlugin as _0x5980e8}from'ckeditor5/src/core';import _0x23c7f3 from'./realtimecollaborativeediting/sessions';import _0x2785b4 from'./presencelist/presencelistui';export default class s extends _0x5980e8{static get[_0x291f('0x0')](){return[_0x23c7f3,_0x2785b4];}static get[_0x291f('0x2')](){return _0x291f('0x1');}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x37b4=['disconnect','remove','destroy','404','_connectService','addCommentThread','attributes','getCommentThread','cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.','from','requires','resolvedBy','updateCommentThread','userId','CommentsRepository','add','commentUpdated','setPermissions','updateComment','context','_terminateService','removeCommentThread','createdAt','reconnect','_getService','unregister','off','cloud-services-internal-error:\x20Not\x20connected.','reopenCommentThread','commentId','getUser','config','_fetchMissingUsersForThreads','code','catch','getComment','addToReconnectionStack','getConnectedSessions','collaboration.channelId','commentRemoved','commentThreadRemoved','commentThreadId','size','init','resolve','has','update','keys','_setUpService','get','resolvedAt','addUser','listenTo','_services','cloud-services-internal-error:\x20Request\x20timeout.','addComment','Permissions','adapter','set','getMany','content','removeComment','commentThreadAdded','commentThreadResolved','startsWith','connect','CommentsService','comments','delete','map','sessionAdd:','message','reopen','authorId','assign','cloudservicescommentsadapter-disconnect-not-exist','plugins','register'];(function(_0x540b28,_0x37b4a8){const _0x4e843b=function(_0x3679b0){while(--_0x3679b0){_0x540b28['push'](_0x540b28['shift']());}};_0x4e843b(++_0x37b4a8);}(_0x37b4,0x1c5));const _0x4e84=function(_0x540b28,_0x37b4a8){_0x540b28=_0x540b28-0x0;let _0x4e843b=_0x37b4[_0x540b28];return _0x4e843b;};import{Context as _0x2932d3,ContextPlugin as _0x5bf0d9}from'ckeditor5/src/core';import{CKEditorError as _0x2256d6}from'ckeditor5/src/utils';import{Users as _0x530880}from'ckeditor5-collaboration/src/collaboration-core';import _0x5103fc from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import _0x3777a0 from'@ckeditor/ckeditor-cloud-services-collaboration/src/comments-v2/commentsservice';import _0x20a5f0 from'../realtimecollaborativeediting/websocketgateway';import _0x36ffa0 from'../realtimecollaborativeediting/sessions';export default class a extends _0x5bf0d9{static get[_0x4e84('0x19')](){return[_0x20a5f0,'CommentsRepository',_0x36ffa0,_0x530880];}constructor(_0xa0d8c2){super(_0xa0d8c2),this[_0x4e84('0x44')]=new Map();}async[_0x4e84('0x3a')](){const _0x42f7e8=this['context'],_0x961640=_0x42f7e8['plugins'][_0x4e84('0x40')](_0x4e84('0x1d'));if(_0x42f7e8['plugins'][_0x4e84('0x40')](_0x20a5f0)[_0x4e84('0x33')](this),_0x961640[_0x4e84('0x48')]={'addCommentThread':async({channelId:_0x19c694,threadId:_0xb62d99,comments:_0x20e107,resolvedAt:_0x5cf404,resolvedBy:_0x5c4e07,context:_0x1563db,attributes:_0x1b2604})=>{const _0x23616e=await this[_0x4e84('0x27')](_0x19c694)[_0x4e84('0x14')]({'commentThreadId':_0xb62d99,'comments':_0x20e107[_0x4e84('0x6')](_0xd1e044=>function(_0x18fd1a,_0x399bf0,_0x1559b8){return{'commentThreadId':_0x1559b8,'commentId':_0x18fd1a[_0x4e84('0x2c')],'userId':_0x18fd1a[_0x4e84('0xa')],'content':_0x18fd1a['content'],'documentId':_0x399bf0,'createdAt':_0x18fd1a[_0x4e84('0x25')],'attributes':_0x18fd1a[_0x4e84('0x15')]||{}};}(_0xd1e044,_0x19c694,_0xb62d99)),'resolvedAt':_0x5cf404,'resolvedBy':_0x5c4e07,'context':_0x1563db,'attributes':_0x1b2604})[_0x4e84('0x31')](tt);return{'threadId':_0x23616e[_0x4e84('0x38')],'comments':_0x23616e[_0x4e84('0x4')]};},'getCommentThread':async({channelId:_0x11f26d,threadId:_0x1a02eb})=>{const _0x1f21a3=await this[_0x4e84('0x27')](_0x11f26d)['getCommentThread'](_0x1a02eb)['catch'](tt);return await this['_fetchMissingUsersForThreads']([_0x1f21a3]),{'threadId':_0x1f21a3[_0x4e84('0x38')],'comments':_0x1f21a3['comments'][_0x4e84('0x6')](et),'context':_0x1f21a3[_0x4e84('0x22')],'resolvedAt':_0x1f21a3[_0x4e84('0x41')],'resolvedBy':_0x1f21a3[_0x4e84('0x1a')],'attributes':_0x1f21a3[_0x4e84('0x15')]||{}};},'updateCommentThread':async({channelId:_0x2d3559,threadId:_0x2a6d3d,context:_0x567607,attributes:_0x5d0dcf})=>this[_0x4e84('0x27')](_0x2d3559)[_0x4e84('0x1b')]({'commentThreadId':_0x2a6d3d,'context':_0x567607,'attributes':_0x5d0dcf})['catch'](Z)[_0x4e84('0x31')](tt),'resolveCommentThread':async({channelId:_0x2767f3,threadId:_0x39c7b2})=>{const _0x2fc04a=await this[_0x4e84('0x27')](_0x2767f3)['resolveCommentThread'](_0x39c7b2)[_0x4e84('0x31')](Z)['catch'](tt);return{'threadId':_0x2fc04a[_0x4e84('0x38')],'resolvedAt':_0x2fc04a[_0x4e84('0x41')],'resolvedBy':_0x2fc04a[_0x4e84('0x1a')]};},'reopenCommentThread':async({channelId:_0x19ac71,threadId:_0x5ed243})=>this[_0x4e84('0x27')](_0x19ac71)[_0x4e84('0x2b')](_0x5ed243)[_0x4e84('0x31')](Z)[_0x4e84('0x31')](tt),'removeCommentThread':({channelId:_0x216f4c,threadId:_0xfbf5ca})=>this[_0x4e84('0x27')](_0x216f4c)[_0x4e84('0x24')](_0xfbf5ca)['catch'](Z)[_0x4e84('0x31')](tt),'addComment':({channelId:_0x447a86,threadId:_0x293d48,commentId:_0x1ac1cb,content:_0x679645,attributes:_0x4e724f})=>this[_0x4e84('0x27')](_0x447a86)[_0x4e84('0x46')](_0x293d48,_0x1ac1cb,_0x679645,_0x4e724f)[_0x4e84('0x31')](tt),'updateComment':({channelId:_0x14e966,threadId:_0xeea27e,commentId:_0x3368a6,content:_0x4976e8,attributes:_0x50daf0})=>this[_0x4e84('0x27')](_0x14e966)[_0x4e84('0x21')](_0xeea27e,_0x3368a6,_0x4976e8,_0x50daf0)[_0x4e84('0x31')](Z)[_0x4e84('0x31')](tt),'removeComment':({channelId:_0x3e63e8,threadId:_0x127bab,commentId:_0x33ca7a})=>this[_0x4e84('0x27')](_0x3e63e8)[_0x4e84('0x4c')](_0x127bab,_0x33ca7a)[_0x4e84('0x31')](Z)[_0x4e84('0x31')](tt)},_0x42f7e8 instanceof _0x2932d3){const _0x365871=_0x42f7e8[_0x4e84('0x2e')]['get'](_0x4e84('0x35')),_0x593695=_0x42f7e8[_0x4e84('0xd')][_0x4e84('0x40')](_0x36ffa0);await this[_0x4e84('0x3f')](_0x365871);const _0xe43dd0=await this['_services'][_0x4e84('0x40')](_0x365871)[_0x4e84('0x34')]();this[_0x4e84('0x43')](_0x593695,_0x4e84('0x7')+_0x365871,(_0x41c89e,{session:_0x990385})=>{_0x990385['id']===_0x593695['mySessionId']&&(_0x41c89e[_0x4e84('0x29')](),this['context'][_0x4e84('0xd')][_0x4e84('0x40')](_0x4e84('0x47'))[_0x4e84('0x20')](_0x990385['permissions'],_0x365871));}),_0x593695['register'](_0x365871,_0xe43dd0);}}async[_0x4e84('0x3f')](_0x2ccec2){if(this[_0x4e84('0x44')][_0x4e84('0x3c')](_0x2ccec2))throw new _0x2256d6('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x2ccec2});const _0x4f5f41=this[_0x4e84('0x22')][_0x4e84('0xd')]['get'](_0x4e84('0x1d')),_0x497009=new a[(_0x4e84('0x3'))](_0x2ccec2);this[_0x4e84('0x44')][_0x4e84('0x49')](_0x2ccec2,_0x497009),this[_0x4e84('0x43')](_0x497009,_0x4e84('0x4d'),(_0x34d345,_0x309561)=>{const {commentThreadId:_0x105607,documentId:_0x3c967e,context:_0x5a0f9b,attributes:_0x9875e,resolvedAt:_0x3cc5cb,resolvedBy:_0x1d1e0a,comments:_0x5951ed}=_0x309561;_0x4f5f41[_0x4e84('0x16')](_0x105607)||_0x4f5f41['addCommentThread']({'threadId':_0x105607,'channelId':_0x3c967e,'comments':_0x5951ed?_0x5951ed[_0x4e84('0x6')](et):[],'context':_0x5a0f9b,'attributes':_0x9875e,'resolvedAt':_0x3cc5cb,'resolvedBy':_0x1d1e0a,'isFromAdapter':!0x0});}),this[_0x4e84('0x43')](_0x497009,'commentThreadUpdated',(_0x2fe9d0,{commentThreadId:_0x2a379e,documentId:_0x511d09,context:_0x286c72,attributes:_0x4955ce})=>{_0x4f5f41[_0x4e84('0x16')](_0x2a379e)&&_0x4f5f41[_0x4e84('0x1b')]({'threadId':_0x2a379e,'channelId':_0x511d09,'context':_0x286c72,'attributes':_0x4955ce,'isFromAdapter':!0x0});}),this['listenTo'](_0x497009,_0x4e84('0x0'),(_0x14c40c,{commentThreadId:_0x176a39,resolvedBy:_0x3f24b2,resolvedAt:_0x163441})=>{const _0x154145=_0x4f5f41[_0x4e84('0x16')](_0x176a39);_0x154145&&_0x154145[_0x4e84('0x3b')]({'resolvedBy':_0x3f24b2,'resolvedAt':_0x163441,'isFromAdapter':!0x0});}),this[_0x4e84('0x43')](_0x497009,'commentThreadReopened',(_0x4e37d8,{commentThreadId:_0x303afb})=>{const _0x304846=_0x4f5f41[_0x4e84('0x16')](_0x303afb);_0x304846&&_0x304846[_0x4e84('0x9')]({'isFromAdapter':!0x0});}),this[_0x4e84('0x43')](_0x497009,_0x4e84('0x37'),(_0x505048,{commentThreadId:_0x41b7c3})=>{const _0x260c7a=_0x4f5f41[_0x4e84('0x16')](_0x41b7c3);_0x260c7a&&_0x260c7a[_0x4e84('0x10')]({'isFromAdapter':!0x0});}),this[_0x4e84('0x43')](_0x497009,'commentAdded',(_0x4952f0,_0x10b109)=>{const _0x400bab=_0x10b109[_0x4e84('0x38')],_0x53a138=_0x4f5f41[_0x4e84('0x16')](_0x400bab);_0x53a138&&_0x53a138[_0x4e84('0x46')]({...et(_0x10b109),'isFromAdapter':!0x0});}),this[_0x4e84('0x43')](_0x497009,_0x4e84('0x1f'),(_0x311313,{commentThreadId:_0xdbe754,commentId:_0x382aba,content:_0x2f8986,attributes:_0x4ae509})=>{const _0x5881a0=_0x4f5f41[_0x4e84('0x16')](_0xdbe754);if(_0x5881a0){const _0x25d7bd=_0x5881a0[_0x4e84('0x32')](_0x382aba);_0x25d7bd&&_0x25d7bd[_0x4e84('0x3d')]({'content':_0x2f8986,'attributes':_0x4ae509,'isFromAdapter':!0x0});}}),this[_0x4e84('0x43')](_0x497009,_0x4e84('0x36'),(_0x219d71,{commentThreadId:_0x2fce92,commentId:_0x533f4e})=>{const _0x12e7b5=_0x4f5f41[_0x4e84('0x16')](_0x2fce92);if(_0x12e7b5){const _0x462891=_0x12e7b5[_0x4e84('0x32')](_0x533f4e);_0x462891&&_0x462891['remove']({'isFromAdapter':!0x0});}}),await this[_0x4e84('0x13')](_0x2ccec2);}[_0x4e84('0x11')](){if(this['context']instanceof _0x2932d3){const _0x585d12=this['context'][_0x4e84('0x2e')][_0x4e84('0x40')]('collaboration.channelId');this[_0x4e84('0x23')](_0x585d12);}}[_0x4e84('0x23')](_0x843c3b){if(!this[_0x4e84('0x44')][_0x4e84('0x3c')](_0x843c3b))throw new _0x2256d6(_0x4e84('0xc'),null,{'channelId':_0x843c3b});this['_getService'](_0x843c3b)[_0x4e84('0xf')](),this[_0x4e84('0x44')][_0x4e84('0x5')](_0x843c3b);}async[_0x4e84('0x26')](){for(const _0x5ee656 of this[_0x4e84('0x44')][_0x4e84('0x3e')]())await this[_0x4e84('0x13')](_0x5ee656);if(this['context']instanceof _0x2932d3){const _0x277fb6=this['context'][_0x4e84('0x2e')][_0x4e84('0x40')](_0x4e84('0x35')),_0xb391f4=this['context'][_0x4e84('0xd')]['get'](_0x36ffa0);_0xb391f4[_0x4e84('0x28')](_0x277fb6);const _0x3e53f6=await this[_0x4e84('0x44')][_0x4e84('0x40')](_0x277fb6)[_0x4e84('0x34')]();_0xb391f4[_0x4e84('0xe')](_0x277fb6,_0x3e53f6);}}async['_connectService'](_0x2f74b4){const {connection:_0x412fa6}=this[_0x4e84('0x22')][_0x4e84('0xd')][_0x4e84('0x40')](_0x20a5f0),_0x333b10=this['context']['plugins'][_0x4e84('0x40')](_0x4e84('0x1d')),_0x168d70=this[_0x4e84('0x44')][_0x4e84('0x40')](_0x2f74b4),_0x38bb1b=await _0x168d70[_0x4e84('0x2')](_0x412fa6);await this[_0x4e84('0x2f')](_0x38bb1b);const _0x52862d=new Set(Array[_0x4e84('0x18')](_0x333b10['getCommentThreads']({'channelId':_0x2f74b4}),_0x4bfc9e=>_0x4bfc9e['id']));for(const _0x56f7ea of _0x38bb1b)_0x52862d[_0x4e84('0x5')](_0x56f7ea[_0x4e84('0x38')]);for(const _0x4197e0 of _0x52862d)_0x333b10[_0x4e84('0x16')](_0x4197e0)[_0x4e84('0x10')]({'isFromAdapter':!0x0});for(const _0x2f6b8e of _0x38bb1b){let _0x55e949=_0x333b10[_0x4e84('0x16')](_0x2f6b8e[_0x4e84('0x38')]);const {commentThreadId:_0x5b8fc5,context:_0x56256a,attributes:_0x53bcea,resolvedBy:_0x50fa7f,resolvedAt:_0x50f9ab}=_0x2f6b8e;_0x55e949||(_0x55e949=_0x333b10[_0x4e84('0x14')]({'channelId':_0x2f74b4,'threadId':_0x5b8fc5,'context':_0x56256a,'attributes':_0x53bcea,'resolvedBy':_0x50fa7f,'resolvedAt':_0x50f9ab,'isFromAdapter':!0x0}));const _0x1d9385=new Set(Array[_0x4e84('0x18')](_0x55e949[_0x4e84('0x4')],_0x56a098=>_0x56a098['id']));for(const _0x9dd599 of _0x2f6b8e[_0x4e84('0x4')])_0x1d9385[_0x4e84('0x5')](_0x9dd599[_0x4e84('0x2c')]);for(const _0x54bd25 of _0x1d9385)_0x55e949['getComment'](_0x54bd25)[_0x4e84('0x10')]({'isFromAdapter':!0x0});for(const _0x27130b of _0x2f6b8e[_0x4e84('0x4')]){const _0x236817=_0x55e949[_0x4e84('0x32')](_0x27130b['commentId']);_0x236817?_0x236817['content']!==_0x27130b[_0x4e84('0x4b')]&&_0x236817[_0x4e84('0x3d')]({'content':_0x27130b[_0x4e84('0x4b')],'isFromAdapter':!0x0}):_0x55e949['addComment'](Object[_0x4e84('0xb')](et(_0x27130b),{'isFromAdapter':!0x0}));}}}[_0x4e84('0x27')](_0x5aa841){if(!this[_0x4e84('0x44')]['has'](_0x5aa841))throw new _0x2256d6('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x5aa841});return this[_0x4e84('0x44')]['get'](_0x5aa841);}async[_0x4e84('0x2f')](_0x367f09){const _0x12479a=this['context'][_0x4e84('0xd')][_0x4e84('0x40')](_0x530880),{connection:_0x35ba89}=this[_0x4e84('0x22')]['plugins'][_0x4e84('0x40')](_0x20a5f0),_0x171690=new Set();for(const {resolvedBy:_0x6b679d,comments:_0x18978d}of _0x367f09){_0x6b679d&&!_0x12479a[_0x4e84('0x2d')](_0x6b679d)&&_0x171690[_0x4e84('0x1e')](_0x6b679d);for(const {userId:_0x2cceb9}of _0x18978d)_0x12479a[_0x4e84('0x2d')](_0x2cceb9)||_0x171690[_0x4e84('0x1e')](_0x2cceb9);}if(0x0===_0x171690[_0x4e84('0x39')])return;const _0x5203dd=await _0x5103fc[_0x4e84('0x4a')](_0x35ba89,Array[_0x4e84('0x18')](_0x171690));for(const _0x1c24e1 of _0x5203dd)_0x12479a[_0x4e84('0x2d')](_0x1c24e1['id'])||_0x12479a[_0x4e84('0x42')](_0x1c24e1);}}async function Z(_0x55fe61){if(_0x4e84('0x12')!==_0x55fe61[_0x4e84('0x30')])throw _0x55fe61;}function tt(_0x1a0b65){if((_0x1a9e7e=_0x1a0b65)[_0x4e84('0x8')][_0x4e84('0x1')](_0x4e84('0x17'))||_0x1a9e7e[_0x4e84('0x8')][_0x4e84('0x1')](_0x4e84('0x2a'))||_0x1a9e7e['message']['startsWith'](_0x4e84('0x45')))return new Promise(()=>{});var _0x1a9e7e;throw _0x1a0b65;}function et(_0x38e3f2){return{'threadId':_0x38e3f2[_0x4e84('0x38')],'commentId':_0x38e3f2[_0x4e84('0x2c')],'content':_0x38e3f2['content'],'createdAt':_0x38e3f2[_0x4e84('0x25')],'authorId':_0x38e3f2[_0x4e84('0x1c')],'attributes':_0x38e3f2[_0x4e84('0x15')]||{}};}a[_0x4e84('0x3')]=_0x3777a0;
|
|
23
|
+
const _0x2dc3=['assign','commentAdded','addUser','requires','cloudservicescommentsadapter-connect-already-connected','_services','permissions','createdAt','getComment','startsWith','cloudservicescommentsadapter-service-not-exist','404','adapter','commentId','get','CommentsRepository','cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.','off','addComment','sessionAdd:','_terminateService','commentThreadId','listenTo','attributes','addCommentThread','_setUpService','authorId','commentThreadAdded','removeComment','_connectService','register','cloud-services-internal-error:\x20Not\x20connected.','getCommentThread','content','_getService','CommentsService','catch','commentThreadUpdated','remove','updateCommentThread','has','size','delete','cloud-services-internal-error:\x20Request\x20timeout.','updateComment','cloudservicescommentsadapter-disconnect-not-exist','message','context','config','_fetchMissingUsersForThreads','getUser','update','commentRemoved','comments','plugins','addToReconnectionStack','map','getConnectedSessions','commentThreadRemoved','resolvedBy','resolveCommentThread','mySessionId','collaboration.channelId','add','reconnect','set','from','connect'];(function(_0x4f4400,_0x2dc319){const _0x7fd9ab=function(_0x3bc0e3){while(--_0x3bc0e3){_0x4f4400['push'](_0x4f4400['shift']());}};_0x7fd9ab(++_0x2dc319);}(_0x2dc3,0x1b1));const _0x7fd9=function(_0x4f4400,_0x2dc319){_0x4f4400=_0x4f4400-0x0;let _0x7fd9ab=_0x2dc3[_0x4f4400];return _0x7fd9ab;};import{Context as _0x490605,ContextPlugin as _0x47f2ee}from'ckeditor5/src/core';import{CKEditorError as _0x27f280}from'ckeditor5/src/utils';import{Users as _0x8b74d5}from'ckeditor5-collaboration/src/collaboration-core';import _0xa30d01 from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';import _0x19b8ae from'@ckeditor/ckeditor-cloud-services-collaboration/src/comments-v2/commentsservice';import _0x20da79 from'../realtimecollaborativeediting/websocketgateway';import _0x2fa378 from'../realtimecollaborativeediting/sessions';export default class a extends _0x47f2ee{static get[_0x7fd9('0x2e')](){return[_0x20da79,_0x7fd9('0x3a'),_0x2fa378,_0x8b74d5];}constructor(_0x178c27){super(_0x178c27),this[_0x7fd9('0x30')]=new Map();}async['init'](){const _0x451037=this[_0x7fd9('0x16')],_0x53b196=_0x451037[_0x7fd9('0x1d')][_0x7fd9('0x39')](_0x7fd9('0x3a'));if(_0x451037[_0x7fd9('0x1d')]['get'](_0x20da79)[_0x7fd9('0x1e')](this),_0x53b196[_0x7fd9('0x37')]={'addCommentThread':async({channelId:_0x36111d,threadId:_0x2fb2d9,comments:_0x22af71,resolvedAt:_0x4b27c1,resolvedBy:_0x398c8e,context:_0x522e69,attributes:_0x56123c})=>{const _0x29442b=await this[_0x7fd9('0x9')](_0x36111d)[_0x7fd9('0x43')]({'commentThreadId':_0x2fb2d9,'comments':_0x22af71['map'](_0x4597ad=>function(_0x5103c8,_0x130b78,_0x3e4c93){return{'commentThreadId':_0x3e4c93,'commentId':_0x5103c8['commentId'],'userId':_0x5103c8[_0x7fd9('0x1')],'content':_0x5103c8[_0x7fd9('0x8')],'documentId':_0x130b78,'createdAt':_0x5103c8[_0x7fd9('0x32')],'attributes':_0x5103c8[_0x7fd9('0x42')]||{}};}(_0x4597ad,_0x36111d,_0x2fb2d9)),'resolvedAt':_0x4b27c1,'resolvedBy':_0x398c8e,'context':_0x522e69,'attributes':_0x56123c})[_0x7fd9('0xb')](E);return{'threadId':_0x29442b['commentThreadId'],'comments':_0x29442b[_0x7fd9('0x1c')]};},'getCommentThread':async({channelId:_0x27bc64,threadId:_0x4bca3d})=>{const _0x52ea07=await this[_0x7fd9('0x9')](_0x27bc64)['getCommentThread'](_0x4bca3d)[_0x7fd9('0xb')](E);return await this[_0x7fd9('0x18')]([_0x52ea07]),{'threadId':_0x52ea07[_0x7fd9('0x40')],'comments':_0x52ea07['comments'][_0x7fd9('0x1f')](nt),'context':_0x52ea07[_0x7fd9('0x16')],'resolvedAt':_0x52ea07['resolvedAt'],'resolvedBy':_0x52ea07[_0x7fd9('0x22')],'attributes':_0x52ea07[_0x7fd9('0x42')]||{}};},'updateCommentThread':async({channelId:_0x4f5cd7,threadId:_0x2fc618,context:_0x52e99c,attributes:_0x3ca31d})=>this[_0x7fd9('0x9')](_0x4f5cd7)[_0x7fd9('0xe')]({'commentThreadId':_0x2fc618,'context':_0x52e99c,'attributes':_0x3ca31d})['catch'](ot)[_0x7fd9('0xb')](E),'resolveCommentThread':async({channelId:_0x314c06,threadId:_0x4edc94})=>{const _0x5ec472=await this[_0x7fd9('0x9')](_0x314c06)[_0x7fd9('0x23')](_0x4edc94)[_0x7fd9('0xb')](ot)[_0x7fd9('0xb')](E);return{'threadId':_0x5ec472['commentThreadId'],'resolvedAt':_0x5ec472['resolvedAt'],'resolvedBy':_0x5ec472[_0x7fd9('0x22')]};},'reopenCommentThread':async({channelId:_0xdd58ab,threadId:_0x1d259c})=>this['_getService'](_0xdd58ab)['reopenCommentThread'](_0x1d259c)['catch'](ot)['catch'](E),'removeCommentThread':({channelId:_0xcacd2d,threadId:_0xd5a910})=>this[_0x7fd9('0x9')](_0xcacd2d)['removeCommentThread'](_0xd5a910)[_0x7fd9('0xb')](ot)[_0x7fd9('0xb')](E),'addComment':({channelId:_0x4962fe,threadId:_0x44ceae,commentId:_0xd91575,content:_0x142110,attributes:_0x33c7ef})=>this['_getService'](_0x4962fe)[_0x7fd9('0x3d')](_0x44ceae,_0xd91575,_0x142110,_0x33c7ef)[_0x7fd9('0xb')](E),'updateComment':({channelId:_0x3e6852,threadId:_0x963451,commentId:_0x18f9a1,content:_0x21c46c,attributes:_0x3f7cb7})=>this['_getService'](_0x3e6852)[_0x7fd9('0x13')](_0x963451,_0x18f9a1,_0x21c46c,_0x3f7cb7)['catch'](ot)['catch'](E),'removeComment':({channelId:_0x396fd5,threadId:_0x55e7e8,commentId:_0xc6f960})=>this[_0x7fd9('0x9')](_0x396fd5)[_0x7fd9('0x3')](_0x55e7e8,_0xc6f960)[_0x7fd9('0xb')](ot)[_0x7fd9('0xb')](E)},_0x451037 instanceof _0x490605){const _0x54b514=_0x451037[_0x7fd9('0x17')]['get'](_0x7fd9('0x25')),_0x3c02ee=_0x451037[_0x7fd9('0x1d')][_0x7fd9('0x39')](_0x2fa378);await this[_0x7fd9('0x0')](_0x54b514);const _0x38e496=await this[_0x7fd9('0x30')]['get'](_0x54b514)[_0x7fd9('0x20')]();this[_0x7fd9('0x41')](_0x3c02ee,_0x7fd9('0x3e')+_0x54b514,(_0x2f7e5f,{session:_0x181e9f})=>{_0x181e9f['id']===_0x3c02ee[_0x7fd9('0x24')]&&(_0x2f7e5f[_0x7fd9('0x3c')](),this['context'][_0x7fd9('0x1d')][_0x7fd9('0x39')]('Permissions')['setPermissions'](_0x181e9f[_0x7fd9('0x31')],_0x54b514));}),_0x3c02ee[_0x7fd9('0x5')](_0x54b514,_0x38e496);}}async[_0x7fd9('0x0')](_0x2e040f){if(this[_0x7fd9('0x30')][_0x7fd9('0xf')](_0x2e040f))throw new _0x27f280(_0x7fd9('0x2f'),null,{'channelId':_0x2e040f});const _0x12a5e7=this[_0x7fd9('0x16')]['plugins']['get'](_0x7fd9('0x3a')),_0x47983b=new a[(_0x7fd9('0xa'))](_0x2e040f);this[_0x7fd9('0x30')][_0x7fd9('0x28')](_0x2e040f,_0x47983b),this[_0x7fd9('0x41')](_0x47983b,_0x7fd9('0x2'),(_0x581b3b,_0xf39e03)=>{const {commentThreadId:_0x373616,documentId:_0x42dafd,context:_0x290797,attributes:_0x2b26e6,resolvedAt:_0x3fffa3,resolvedBy:_0x543428,comments:_0x18d345}=_0xf39e03;_0x12a5e7[_0x7fd9('0x7')](_0x373616)||_0x12a5e7[_0x7fd9('0x43')]({'threadId':_0x373616,'channelId':_0x42dafd,'comments':_0x18d345?_0x18d345[_0x7fd9('0x1f')](nt):[],'context':_0x290797,'attributes':_0x2b26e6,'resolvedAt':_0x3fffa3,'resolvedBy':_0x543428,'isFromAdapter':!0x0});}),this[_0x7fd9('0x41')](_0x47983b,_0x7fd9('0xc'),(_0x2ba62f,{commentThreadId:_0x464eae,documentId:_0x43c5ab,context:_0x58d6ad,attributes:_0x447375})=>{_0x12a5e7[_0x7fd9('0x7')](_0x464eae)&&_0x12a5e7[_0x7fd9('0xe')]({'threadId':_0x464eae,'channelId':_0x43c5ab,'context':_0x58d6ad,'attributes':_0x447375,'isFromAdapter':!0x0});}),this[_0x7fd9('0x41')](_0x47983b,'commentThreadResolved',(_0x553413,{commentThreadId:_0x59f0ab,resolvedBy:_0x50f2ef,resolvedAt:_0x3ac2a4})=>{const _0x2afd96=_0x12a5e7[_0x7fd9('0x7')](_0x59f0ab);_0x2afd96&&_0x2afd96['resolve']({'resolvedBy':_0x50f2ef,'resolvedAt':_0x3ac2a4,'isFromAdapter':!0x0});}),this['listenTo'](_0x47983b,'commentThreadReopened',(_0x2785db,{commentThreadId:_0x223543})=>{const _0xe5f8b2=_0x12a5e7[_0x7fd9('0x7')](_0x223543);_0xe5f8b2&&_0xe5f8b2['reopen']({'isFromAdapter':!0x0});}),this[_0x7fd9('0x41')](_0x47983b,_0x7fd9('0x21'),(_0x5766c5,{commentThreadId:_0x191c91})=>{const _0x1d0d82=_0x12a5e7[_0x7fd9('0x7')](_0x191c91);_0x1d0d82&&_0x1d0d82[_0x7fd9('0xd')]({'isFromAdapter':!0x0});}),this[_0x7fd9('0x41')](_0x47983b,_0x7fd9('0x2c'),(_0x2cd990,_0x459f40)=>{const _0x5ccce4=_0x459f40['commentThreadId'],_0x30c5a2=_0x12a5e7['getCommentThread'](_0x5ccce4);_0x30c5a2&&_0x30c5a2['addComment']({...nt(_0x459f40),'isFromAdapter':!0x0});}),this[_0x7fd9('0x41')](_0x47983b,'commentUpdated',(_0x499e35,{commentThreadId:_0x4bd6d3,commentId:_0x327615,content:_0x4f5850,attributes:_0x3c6ce6})=>{const _0x2aa523=_0x12a5e7[_0x7fd9('0x7')](_0x4bd6d3);if(_0x2aa523){const _0x489464=_0x2aa523['getComment'](_0x327615);_0x489464&&_0x489464['update']({'content':_0x4f5850,'attributes':_0x3c6ce6,'isFromAdapter':!0x0});}}),this['listenTo'](_0x47983b,_0x7fd9('0x1b'),(_0x379fd1,{commentThreadId:_0x6f5298,commentId:_0x2c4072})=>{const _0x2f9a58=_0x12a5e7[_0x7fd9('0x7')](_0x6f5298);if(_0x2f9a58){const _0x412b3f=_0x2f9a58['getComment'](_0x2c4072);_0x412b3f&&_0x412b3f[_0x7fd9('0xd')]({'isFromAdapter':!0x0});}}),await this[_0x7fd9('0x4')](_0x2e040f);}['destroy'](){if(this['context']instanceof _0x490605){const _0x47620a=this[_0x7fd9('0x16')][_0x7fd9('0x17')][_0x7fd9('0x39')](_0x7fd9('0x25'));this[_0x7fd9('0x3f')](_0x47620a);}}[_0x7fd9('0x3f')](_0xf70a5){if(!this['_services']['has'](_0xf70a5))throw new _0x27f280(_0x7fd9('0x14'),null,{'channelId':_0xf70a5});this['_getService'](_0xf70a5)['disconnect'](),this['_services']['delete'](_0xf70a5);}async[_0x7fd9('0x27')](){for(const _0x4bee7d of this[_0x7fd9('0x30')]['keys']())await this['_connectService'](_0x4bee7d);if(this[_0x7fd9('0x16')]instanceof _0x490605){const _0x113c67=this['context'][_0x7fd9('0x17')][_0x7fd9('0x39')](_0x7fd9('0x25')),_0x45e9fd=this[_0x7fd9('0x16')]['plugins'][_0x7fd9('0x39')](_0x2fa378);_0x45e9fd['unregister'](_0x113c67);const _0x1a281d=await this[_0x7fd9('0x30')][_0x7fd9('0x39')](_0x113c67)[_0x7fd9('0x20')]();_0x45e9fd[_0x7fd9('0x5')](_0x113c67,_0x1a281d);}}async[_0x7fd9('0x4')](_0x4f55b6){const {connection:_0x341ee3}=this[_0x7fd9('0x16')][_0x7fd9('0x1d')][_0x7fd9('0x39')](_0x20da79),_0x2f14fb=this['context'][_0x7fd9('0x1d')][_0x7fd9('0x39')]('CommentsRepository'),_0x5e33dc=this['_services'][_0x7fd9('0x39')](_0x4f55b6),_0x32a5de=await _0x5e33dc[_0x7fd9('0x2a')](_0x341ee3);await this[_0x7fd9('0x18')](_0x32a5de);const _0x319c4b=new Set(Array[_0x7fd9('0x29')](_0x2f14fb['getCommentThreads']({'channelId':_0x4f55b6}),_0x17da4d=>_0x17da4d['id']));for(const _0x540199 of _0x32a5de)_0x319c4b[_0x7fd9('0x11')](_0x540199[_0x7fd9('0x40')]);for(const _0x37511e of _0x319c4b)_0x2f14fb[_0x7fd9('0x7')](_0x37511e)[_0x7fd9('0xd')]({'isFromAdapter':!0x0});for(const _0x94f1a4 of _0x32a5de){let _0x3c1d1a=_0x2f14fb[_0x7fd9('0x7')](_0x94f1a4[_0x7fd9('0x40')]);const {commentThreadId:_0x354f52,context:_0x322e7c,attributes:_0x55c9c4,resolvedBy:_0x384f57,resolvedAt:_0x131192}=_0x94f1a4;_0x3c1d1a||(_0x3c1d1a=_0x2f14fb[_0x7fd9('0x43')]({'channelId':_0x4f55b6,'threadId':_0x354f52,'context':_0x322e7c,'attributes':_0x55c9c4,'resolvedBy':_0x384f57,'resolvedAt':_0x131192,'isFromAdapter':!0x0}));const _0x46f912=new Set(Array[_0x7fd9('0x29')](_0x3c1d1a[_0x7fd9('0x1c')],_0x2b8d18=>_0x2b8d18['id']));for(const _0xd7927f of _0x94f1a4['comments'])_0x46f912[_0x7fd9('0x11')](_0xd7927f['commentId']);for(const _0x37983e of _0x46f912)_0x3c1d1a[_0x7fd9('0x33')](_0x37983e)[_0x7fd9('0xd')]({'isFromAdapter':!0x0});for(const _0x7cf8e0 of _0x94f1a4[_0x7fd9('0x1c')]){const _0x3448b5=_0x3c1d1a[_0x7fd9('0x33')](_0x7cf8e0[_0x7fd9('0x38')]);_0x3448b5?_0x3448b5[_0x7fd9('0x8')]!==_0x7cf8e0['content']&&_0x3448b5[_0x7fd9('0x1a')]({'content':_0x7cf8e0['content'],'isFromAdapter':!0x0}):_0x3c1d1a[_0x7fd9('0x3d')](Object[_0x7fd9('0x2b')](nt(_0x7cf8e0),{'isFromAdapter':!0x0}));}}}[_0x7fd9('0x9')](_0x2495a2){if(!this[_0x7fd9('0x30')][_0x7fd9('0xf')](_0x2495a2))throw new _0x27f280(_0x7fd9('0x35'),null,{'channelId':_0x2495a2});return this['_services']['get'](_0x2495a2);}async['_fetchMissingUsersForThreads'](_0xd25aa7){const _0x58d066=this['context'][_0x7fd9('0x1d')]['get'](_0x8b74d5),{connection:_0x335917}=this[_0x7fd9('0x16')]['plugins']['get'](_0x20da79),_0x22acfa=new Set();for(const {resolvedBy:_0xc16a95,comments:_0x10d84f}of _0xd25aa7){_0xc16a95&&!_0x58d066[_0x7fd9('0x19')](_0xc16a95)&&_0x22acfa[_0x7fd9('0x26')](_0xc16a95);for(const {userId:_0x50c0c0}of _0x10d84f)_0x58d066['getUser'](_0x50c0c0)||_0x22acfa[_0x7fd9('0x26')](_0x50c0c0);}if(0x0===_0x22acfa[_0x7fd9('0x10')])return;const _0x43a3df=await _0xa30d01['getMany'](_0x335917,Array[_0x7fd9('0x29')](_0x22acfa));for(const _0x5a085a of _0x43a3df)_0x58d066[_0x7fd9('0x19')](_0x5a085a['id'])||_0x58d066[_0x7fd9('0x2d')](_0x5a085a);}}async function ot(_0x160e31){if(_0x7fd9('0x36')!==_0x160e31['code'])throw _0x160e31;}function E(_0x4e1d4f){if((_0x31f01a=_0x4e1d4f)[_0x7fd9('0x15')][_0x7fd9('0x34')](_0x7fd9('0x3b'))||_0x31f01a[_0x7fd9('0x15')][_0x7fd9('0x34')](_0x7fd9('0x6'))||_0x31f01a[_0x7fd9('0x15')][_0x7fd9('0x34')](_0x7fd9('0x12')))return new Promise(()=>{});var _0x31f01a;throw _0x4e1d4f;}function nt(_0x4e5c38){return{'threadId':_0x4e5c38[_0x7fd9('0x40')],'commentId':_0x4e5c38[_0x7fd9('0x38')],'content':_0x4e5c38['content'],'createdAt':_0x4e5c38[_0x7fd9('0x32')],'authorId':_0x4e5c38['userId'],'attributes':_0x4e5c38['attributes']||{}};}a[_0x7fd9('0xa')]=_0x19b8ae;
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x14cb=['collaboration.channelId','get','isThreadsLoadingPaused','connected','destroy','switchReadOnly','_terminateService','ready','change:state','pluginName','plugins','RealTimeCollaborativeComments','editor','once','config','init'];(function(_0x520222,_0x14cbbe){const _0x3bc129=function(_0x3f78eb){while(--_0x3f78eb){_0x520222['push'](_0x520222['shift']());}};_0x3bc129(++_0x14cbbe);}(_0x14cb,0x79));const _0x3bc1=function(_0x520222,_0x14cbbe){_0x520222=_0x520222-0x0;let _0x3bc129=_0x14cb[_0x520222];return _0x3bc129;};import{Plugin as _0x5b05fa}from'ckeditor5/src/core';import _0x390819 from'./realtimecollaborativecomments/cloudservicescommentsadapter';import _0x27e17b from'./realtimecollaborativeediting';import _0x5a5679 from'./realtimecollaborativeediting/websocketgateway';export default class m extends _0x5b05fa{static get['requires'](){return['Comments',_0x390819,_0x27e17b,_0x5a5679];}static get[_0x3bc1('0x0')](){return _0x3bc1('0x2');}[_0x3bc1('0x6')](){const _0x150d5a=this[_0x3bc1('0x3')][_0x3bc1('0x1')][_0x3bc1('0x8')](_0x5a5679),_0x353508=this[_0x3bc1('0x3')][_0x3bc1('0x1')][_0x3bc1('0x8')]('CommentsEditing'),_0x35afd4=this[_0x3bc1('0x3')]['plugins'][_0x3bc1('0x8')](_0x390819);return this[_0x3bc1('0x3')]['data'][_0x3bc1('0x4')](_0x3bc1('0xe'),()=>{this['listenTo'](_0x150d5a,_0x3bc1('0xf'),(_0x28be9a,_0xfa1b78,_0x742b79)=>{_0x353508[_0x3bc1('0x9')]=_0x3bc1('0xa')!==_0x742b79;});}),this['listenTo'](_0x150d5a,'change:state',(_0x7e3123,_0x4d3119,_0x44b9bc)=>{this[_0x3bc1('0x3')][_0x3bc1('0x1')]['get']('CommentsRepository')[_0x3bc1('0xc')](_0x3bc1('0xa')!==_0x44b9bc);}),_0x35afd4['_setUpService'](this[_0x3bc1('0x3')][_0x3bc1('0x5')][_0x3bc1('0x8')](_0x3bc1('0x7')));}[_0x3bc1('0xb')](){this[_0x3bc1('0x3')][_0x3bc1('0x1')]['get'](_0x390819)[_0x3bc1('0xd')](this[_0x3bc1('0x3')]['config'][_0x3bc1('0x8')](_0x3bc1('0x7'))),super[_0x3bc1('0xb')]();}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x5269=['_sendBufferedOperationsDelayId','data','bufferOperation','realtimecollaborationclient-sendbufferedoperations','_isPendingUpdate','addOperation','Synchronization\x20issue','collaboration','set','_pendingAction','listenTo','document','clone','editor','config','realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration','_isAttached','_offset','length','rootsAttributes','register','collaboration-missing-channelid','_isConnected','_knownOperations','setIdForTheLastOperation','_ignoredOperations','operationsReceived','_isDisconnection','type','size','_initSessionsHandling','sessionAdd:','sendOperations','message','_connectAfterSessionHasBeenFlushed','lastDocumentSession','metadata','position','PENDING_ACTION_SENDING_DATA','_hasSelectionChanged','lastOperationAcceptedAt','baseVersion','catch','_clearPendingAction','_isInit','unregister','plugins','model','wereChangesApplied','serverHistory','getIdOfTheLastOperation','createRange','createPositionFromPath','_channelId','code','_handleReconnectionError','getConnectedSessions','cloud-services-internal-error:\x20Request\x20timeout.','destroy','_disconnectService','_lastServerVersion','permissions','then','_authorId','_sendBufferedOperationsDelayed','_operationToId','marker','_handleInitialConnectionData','__className','_saveOperationInBuffer','requires','getRoot','lastSyncVersion','disableReadOnlyMode','RealTimeCollaborationClient','string','rootName','bind','_connectService','change:hasDomSelection','_baseBufferDelay','rtc-destroyed','The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','_compressOperations','includes','connected','_setPendingAction','disconnect','define','rtc-offline','_sendBufferedOperations','The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','roots','connect','removeFromReconnectionStack','_currentBufferDelay','reconnection:\x20flushed\x20session','isAdd','decompress','initData','return','Notification','_operationIdentifier','real-time-collaboration','isEnabled','_applyOperationsSet','push','high','CollaborativeEditingService','init','realtimecollaborationclient-handleserverresponse','locale','_shouldSendSelectionUpdate','404','createUserMarkerOperations','getMany','getUser','createdAt','_compressor','collaboration.channelId','directChange','_handleExternalOperations','_shouldSendUpdate','toJSON','get','filter','has','sessionId','isReadOnly','ready','reconnect','enqueueChange','_refreshUserSelectionMarkers','_document','_bufferedOperations','end','realtimecollaborationclient-init-connection-failed','error','forEach','round','enableReadOnlyMode','lastOperationId','editing','map','_disconnectionOperations','addUser','currentDocumentSession','entries','getDocumentDetails','slice','fire','differ','_handleSendingSelectionMarkers','realtimecollaborationclient-init-session-connection-error','state','start','disconnected','_handleReconnectionResponse','getOperationAuthor','_fetchMissingUsers','mySessionId','history','_crash','userId','from','_handleServerResponse','wasUndone','sessionCreatedAt','cloudServices.bundleVersion','realtimecollaborationclient-init-non-existent-root','connection','fromJSON','realtimecollaborationclient-init-document-already-initialized','$root','_decompressOperations','parse','applyOperation','offset','finally','stop','markers','add','cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.','_handleReceivedOperations','startsWith','version','channelSessions','realtimecollaborationclient-initservice-incorrect-server-operation','_getOperationsFromInitData','_service','view','pluginName','_hasSynchronizationProblem','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','off','_isEditingAllowed','CommentsOnly','apply','_lastSyncedOperationId','cs:removeUser','_updateServerHistory','suppressErrorInCollaboration','multi-root-editor-root-attributes-no-root','addToReconnectionStack','batch'];(function(_0x4236fe,_0x526998){const _0x26ae61=function(_0x56b520){while(--_0x56b520){_0x4236fe['push'](_0x4236fe['shift']());}};_0x26ae61(++_0x526998);}(_0x5269,0x17a));const _0x26ae=function(_0x4236fe,_0x526998){_0x4236fe=_0x4236fe-0x0;let _0x26ae61=_0x5269[_0x4236fe];return _0x26ae61;};import{Plugin as _0x439ed6,PendingActions as _0x3e37cc}from'ckeditor5/src/core';import{CKEditorError as _0x4d77ef,version as _0x491a80,uid as _0x1fbea5}from'ckeditor5/src/utils';import{Notification as _0x14f6d4}from'ckeditor5/src/ui';import{transformSets as _0x4d4c02,InsertOperation as _0x2560e6,MarkerOperation as _0x30850e,RootAttributeOperation as _0x301496,RootOperation as _0x4dfaf5,OperationFactory as _0x42b1b0,History as _0x3bcfd4}from'ckeditor5/src/engine';import _0x12b3fb from'./websocketgateway';import _0x466843 from'./sessions';import _0x10b6c8 from'./usermarkers';import{getTranslation as _0x2c78c5}from'../common-translations';import _0x48346f from'@ckeditor/ckeditor5-operations-compressor/src/compressor';import{Users as _0x21abf3}from'ckeditor5-collaboration/src/collaboration-core';import _0x4ac2c5 from'@ckeditor/ckeditor-cloud-services-collaboration/src/collaborativeeditingservice/collaborativeeditingservice';import _0x2484c6 from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';let j=0x1;export default class l extends _0x439ed6{static get[_0x26ae('0x66')](){return[_0x12b3fb,_0x466843,_0x10b6c8,_0x3e37cc,_0x21abf3,_0x14f6d4];}static get[_0x26ae('0x12')](){return _0x26ae('0x6a');}get['cloudDocumentVersion'](){return this[_0x26ae('0x5c')]+this['_offset'];}get[_0x26ae('0x5c')](){return this[_0x26ae('0x51')]['version']-this[_0x26ae('0x31')];}get[_0x26ae('0x68')](){const _0x5e5fdc=this[_0x26ae('0x51')]['getOperations']();for(let _0x3e7406=_0x5e5fdc[_0x26ae('0x32')]-0x1;_0x3e7406>=0x0;_0x3e7406--){const _0xa1fbf4=_0x5e5fdc[_0x3e7406];if(!this[_0x26ae('0xb0')]['has'](_0xa1fbf4))return _0xa1fbf4[_0x26ae('0x49')]+0x1-this[_0x26ae('0x31')];}return 0x0;}constructor(_0x41c72c){if(super(_0x41c72c),this[_0x26ae('0x31')]=0x0,this[_0x26ae('0x9f')]=null,this[_0x26ae('0x51')]=new _0x3bcfd4(),this[_0x26ae('0x2d')][_0x26ae('0x2e')][_0x26ae('0x78')](_0x26ae('0x27'),{}),this[_0x26ae('0x55')]=this[_0x26ae('0x2d')][_0x26ae('0x2e')][_0x26ae('0x9c')](_0x26ae('0x97')),!this['_channelId'])throw new _0x4d77ef(_0x26ae('0x35'),this);const _0x77245e=_0x41c72c[_0x26ae('0x2e')][_0x26ae('0x9c')](_0x26ae('0xc8'))||_0x491a80;this['_service']=new l[(_0x26ae('0x8c'))](_0x77245e,this['_channelId']),this[_0x26ae('0xa5')]=this[_0x26ae('0x2d')][_0x26ae('0x4f')][_0x26ae('0x2b')],this[_0x26ae('0x96')]=new _0x48346f(),this[_0x26ae('0xa6')]=[],this[_0x26ae('0x37')]=new WeakSet(),this[_0x26ae('0x28')](_0x26ae('0x24'),!0x1),this[_0x26ae('0x28')](_0x26ae('0x13'),!0x1),this[_0x26ae('0x29')]=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this[_0x26ae('0x70')]=0x12c,this[_0x26ae('0x7f')]=this['_baseBufferDelay'],this[_0x26ae('0x19')]=null,this[_0x26ae('0xb0')]=new WeakSet(),this[_0x26ae('0x86')]=new q(this[_0x26ae('0xb0')]);}[_0x26ae('0x8d')](){const _0x207247=this[_0x26ae('0x2d')],_0x3066a2=_0x207247[_0x26ae('0x4e')]['get'](_0x21abf3),_0x320829=_0x207247[_0x26ae('0x4e')][_0x26ae('0x9c')](_0x12b3fb);this['listenTo'](_0x3066a2,_0x26ae('0xbe'),(_0x2aa77e,_0xe42f60)=>{const _0x14f3b2=_0xe42f60[0x0];_0x14f3b2['_authorId']&&(_0x2aa77e[_0x26ae('0x84')]=_0x3066a2[_0x26ae('0x94')](_0x14f3b2[_0x26ae('0x5f')]),_0x2aa77e[_0x26ae('0x6')]()),null===_0x14f3b2['_authorId']&&(_0x2aa77e['return']=null,_0x2aa77e[_0x26ae('0x6')]());},{'priority':_0x26ae('0x8b')}),this[_0x26ae('0x2a')](_0x207247[_0x26ae('0x4f')][_0x26ae('0x2b')]['selection'],'change:range',(_0x8973ae,_0x516211)=>{_0x516211[_0x26ae('0x98')]&&this['_refreshUserSelectionMarkers']();}),this[_0x26ae('0x2a')](_0x207247[_0x26ae('0xae')][_0x26ae('0x11')],_0x26ae('0x6f'),()=>{this[_0x26ae('0xa4')]();}),this['_initThrowingOnDataSet'](),_0x207247['model']['on'](_0x26ae('0x3'),(_0xd88081,_0x18e175)=>{const _0x731a69=_0x18e175[0x0];_0x731a69['isDocumentOperation']&&(this[_0x26ae('0x65')](_0x731a69),this['_shouldSendUpdate']()&&this[_0x26ae('0x60')]());}),this['_setUpDataInit'](),this[_0x26ae('0x6d')](_0x26ae('0x16'))['to'](_0x320829,_0x26ae('0xba'),this,'_hasSynchronizationProblem',(_0x102faa,_0x49b65)=>_0x26ae('0x75')===_0x102faa&&!_0x49b65),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x207247[_0x26ae('0x69')]('rtc-offline'):_0x207247[_0x26ae('0xac')](_0x26ae('0x79'));}),this[_0x26ae('0x16')]?_0x207247[_0x26ae('0x69')]('rtc-offline'):_0x207247[_0x26ae('0xac')](_0x26ae('0x79')),this[_0x26ae('0x28')](_0x26ae('0x36'),!0x1);}async[_0x26ae('0xa2')](){const _0x264e69=this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x466843),_0x478b4c=this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x12b3fb);try{this[_0x26ae('0x24')]=!0x0,_0x264e69['unregister'](this['_channelId']);const _0x456238=await this[_0x26ae('0x10')][_0x26ae('0xa2')](_0x478b4c[_0x26ae('0xca')],this[_0x26ae('0x68')]);await this['_handleReconnectionResponse'](_0x456238)&&(this[_0x26ae('0x24')]=!0x1,this['_clearPendingAction']());const _0x3e9dac=await this[_0x26ae('0x10')][_0x26ae('0x58')]();_0x264e69[_0x26ae('0x34')](this[_0x26ae('0x55')],_0x3e9dac),this['_handleSendingSelectionMarkers'](),this[_0x26ae('0x36')]=!0x0;}catch(_0xb140fa){if(function(_0x38e7f5){return _0x26ae('0x91')===_0x38e7f5[_0x26ae('0x56')];}(_0xb140fa)&&this['sessionId'])await this[_0x26ae('0x42')]();else{if(function(_0x12eb10){return'409'===_0x12eb10[_0x26ae('0x56')];}(_0xb140fa)){const _0x4be642=_0x2c78c5(this[_0x26ae('0x2d')]['locale'],_0x26ae('0x14'));this[_0x26ae('0x57')](_0x4be642);}else{if(!(_0xb140fa instanceof F))throw _0xb140fa;this[_0x26ae('0x57')]();}}}}[_0x26ae('0x5a')](){const _0x4c944a=this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x12b3fb),_0x5cf1f5=this['editor'][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x466843);this[_0x26ae('0x2d')][_0x26ae('0xac')](_0x26ae('0x71')),_0x5cf1f5['channelSessions'][_0x26ae('0x9e')](this[_0x26ae('0x55')])&&_0x5cf1f5[_0x26ae('0x4d')](this[_0x26ae('0x55')]),_0x4c944a[_0x26ae('0x7e')](this),this[_0x26ae('0x5b')](),super[_0x26ae('0x5a')]();}async[_0x26ae('0xbd')](_0x394cfc){if(this['sessionId']!==_0x394cfc[_0x26ae('0x9f')]&&this['_lastSyncedOperationId']!==_0x394cfc[_0x26ae('0xad')])throw new F();return this[_0x26ae('0x9f')]=_0x394cfc[_0x26ae('0x9f')],this[_0x26ae('0xc5')]([],{..._0x394cfc,'wereChangesApplied':!0x1,'data':_0x394cfc[_0x26ae('0x21')]},_0x26ae('0xa2'));}async[_0x26ae('0x6e')](_0x36a533,_0x58baf2=!0x1){const {connection:_0x2180ea}=this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x12b3fb);l[_0x26ae('0x8c')][_0x26ae('0x58')](_0x2180ea,this[_0x26ae('0x55')])[_0x26ae('0x5e')](_0x506776=>this[_0x26ae('0x3e')](_0x506776))['catch'](_0x4ee6f1=>{this[_0x26ae('0xc2')](_0x26ae('0xb9'),_0x4ee6f1);}),this[_0x26ae('0x2a')](this[_0x26ae('0x10')],_0x26ae('0x3a'),this[_0x26ae('0xa')][_0x26ae('0x6d')](this)),this[_0x26ae('0x2a')](this['_service'],'error',(_0x209367,_0x2eda7b)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x2eda7b);}),this[_0x26ae('0x2a')](this['_service'],_0x26ae('0xbc'),()=>{this[_0x26ae('0x36')]=!0x1;});const _0x2de92c=this[_0x26ae('0x86')][_0x26ae('0x52')](_0x36a533),_0xf852e7=await this[_0x26ae('0x10')][_0x26ae('0x7d')](_0x2180ea,this[_0x26ae('0x73')](_0x36a533),_0x2de92c);if(this[_0x26ae('0x9f')]=_0xf852e7[_0x26ae('0x9f')],_0xf852e7[_0x26ae('0x50')]&&(this[_0x26ae('0x24')]=!0x1,this[_0x26ae('0x4b')]()),_0x58baf2){if(!_0xf852e7[_0x26ae('0x50')])return void this['_handleReconnectionError']();this[_0x26ae('0x51')]['reset'](),this[_0x26ae('0x31')]=_0xf852e7[_0x26ae('0x4')],this[_0x26ae('0x51')][_0x26ae('0xc')]=this[_0x26ae('0x31')],await this['_handleServerResponse'](_0x36a533,_0xf852e7,_0x26ae('0x80'));}else await this[_0x26ae('0x63')](_0xf852e7,_0x36a533);this[_0x26ae('0xb8')](),this[_0x26ae('0x36')]=!0x0;}[_0x26ae('0xb8')](){const _0x195647=this[_0x26ae('0x2d')]['plugins'][_0x26ae('0x9c')](_0x466843),_0x1aac1b=this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x10b6c8),_0x1a400f=_0x195647[_0x26ae('0xd')][_0x26ae('0x9c')](this[_0x26ae('0x55')]);_0x1a400f&&_0x1a400f['length']>0x1?_0x1aac1b['createUserMarkerOperations']():this[_0x26ae('0x2a')](_0x195647,_0x26ae('0x3f')+this[_0x26ae('0x55')],()=>{0x2===_0x195647['channelSessions'][_0x26ae('0x9c')](this[_0x26ae('0x55')])[_0x26ae('0x32')]&&_0x1aac1b['createUserMarkerOperations']();});}async[_0x26ae('0xa')](_0x43da0a,_0x195c48,_0x300b2f,_0x12bd74){if(!this[_0x26ae('0x24')]&&this[_0x26ae('0xa5')][_0x26ae('0xc')]==_0x195c48){const _0x2e2e3c=this[_0x26ae('0x1')](_0x300b2f,_0x12bd74);await this[_0x26ae('0xbf')](_0x2e2e3c),this[_0x26ae('0x99')](_0x2e2e3c,_0x195c48,_0x300b2f[_0x26ae('0xad')])||this['_crash'](_0x26ae('0xe'));}}async[_0x26ae('0x42')](){this[_0x26ae('0x5b')]();const {locale:_0x448eb5}=this[_0x26ae('0x2d')];let _0x561bc7;try{_0x561bc7=await this[_0x26ae('0x10')][_0x26ae('0xb4')]();}catch(_0x3b46bc){const _0xe4ff88=_0x2c78c5(_0x448eb5,'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');return void this[_0x26ae('0x57')](_0xe4ff88);}const _0x3c9bf7=_0x561bc7[_0x26ae('0xb2')]||_0x561bc7[_0x26ae('0x43')];if(this[_0x26ae('0x19')]===_0x3c9bf7['lastOperationId'])await this['_connectService'](this[_0x26ae('0x2d')]['model']['document']['history']['getOperations'](),!0x0);else{const _0x4b7335=_0x2c78c5(_0x448eb5,_0x26ae('0x72'));this[_0x26ae('0x57')](_0x4b7335);}}[_0x26ae('0x5b')](){this['_service'][_0x26ae('0x77')](),this[_0x26ae('0xa6')]=[],clearTimeout(this[_0x26ae('0x20')]),this['stopListening'](this['_service']);}[_0x26ae('0x3e')](_0x19d62c){const _0x3779c1=this['editor'][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x466843);this[_0x26ae('0x2a')](_0x3779c1,_0x26ae('0x3f')+this[_0x26ae('0x55')],(_0x26da74,{session:_0x10104c})=>{if(_0x10104c['id']===_0x3779c1[_0x26ae('0xc0')]){_0x26da74[_0x26ae('0x15')]();const _0x27956a=this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9e')](_0x26ae('0x17'))&&this['editor'][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x26ae('0x17'));let _0x4f84cf=_0x10104c[_0x26ae('0x5d')];_0x27956a&&_0x27956a[_0x26ae('0x88')]&&(_0x4f84cf=_0x4f84cf[_0x26ae('0x9d')](_0x3d9796=>'document:write'!==_0x3d9796)),this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')]('Permissions')['setPermissions'](_0x4f84cf,this[_0x26ae('0x55')]);}}),_0x3779c1[_0x26ae('0x34')](this[_0x26ae('0x55')],_0x19d62c);}['_initThrowingOnDataSet'](){const _0x31b0d9=this[_0x26ae('0x2d')]['data'][_0x26ae('0x28')];this[_0x26ae('0x2d')][_0x26ae('0x21')][_0x26ae('0x28')]=(..._0x434af6)=>{if(!_0x434af6[_0x434af6[_0x26ae('0x32')]-0x1][_0x26ae('0x1c')])throw new _0x4d77ef(_0x26ae('0x2f'),this);_0x31b0d9[_0x26ae('0x18')](this[_0x26ae('0x2d')][_0x26ae('0x21')],_0x434af6);};}['_setUpDataInit'](){this[_0x26ae('0x2d')][_0x26ae('0x21')]['on'](_0x26ae('0x8d'),(_0x2bafff,[_0x56c2f4])=>{if(this[_0x26ae('0xa5')][_0x26ae('0xc')])throw new _0x4d77ef(_0x26ae('0xcc'),this);_0x2bafff[_0x26ae('0x6')](),this['_setPendingAction']();const _0x5a36fb=this[_0x26ae('0x2d')][_0x26ae('0x2e')]['get'](_0x26ae('0x33')),_0x503485=this['_getOperationsFromInitData'](_0x56c2f4,_0x5a36fb);_0x2bafff[_0x26ae('0x84')]=this[_0x26ae('0x6e')](_0x503485)[_0x26ae('0x5e')](()=>{this['editor'][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x12b3fb)[_0x26ae('0x1e')](this),this['editor'][_0x26ae('0x21')][_0x26ae('0xb6')](_0x26ae('0xa1'));})[_0x26ae('0x4a')](_0x5db884=>this[_0x26ae('0xc2')](_0x26ae('0xa8'),_0x5db884))[_0x26ae('0x5')](()=>this[_0x26ae('0x4b')]());},{'priority':_0x26ae('0x8b')});}async[_0x26ae('0xbf')](_0xc3baab){const _0x4c0d8d=this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x21abf3),{connection:_0x473e1f}=this['editor'][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x12b3fb),_0x24a7e2=new Set();for(const _0x209853 of _0xc3baab){const _0x1a19d8=_0x209853[_0x26ae('0x5f')];_0x1a19d8&&!_0x4c0d8d['getUser'](_0x1a19d8)&&_0x24a7e2[_0x26ae('0x8')](_0x1a19d8);}if(0x0===_0x24a7e2[_0x26ae('0x3d')])return;const _0x355eb4=await _0x2484c6[_0x26ae('0x93')](_0x473e1f,Array[_0x26ae('0xc4')](_0x24a7e2));for(const _0x3632b5 of _0x355eb4)_0x4c0d8d[_0x26ae('0x94')](_0x3632b5['id'])||_0x4c0d8d[_0x26ae('0xb1')](_0x3632b5);}[_0x26ae('0xf')](_0x5f4474,_0x4ccce9={}){const _0x39839b=this[_0x26ae('0x2d')][_0x26ae('0x4f')],_0x21edef=[];let _0x3c766b=0x0;const _0x414da6=_0x26ae('0x6b')==typeof _0x5f4474?{'main':_0x5f4474}:_0x5f4474;for(const _0x2352a5 of Object['keys'](_0x414da6)){if(!this[_0x26ae('0xa5')][_0x26ae('0x7c')][_0x26ae('0x9e')](_0x2352a5))throw new _0x4d77ef(_0x26ae('0xc9'),this);const _0x189d56=this[_0x26ae('0x2d')]['data'][_0x26ae('0x2')](_0x414da6[_0x2352a5]),_0x325049=this[_0x26ae('0xa5')][_0x26ae('0x67')](_0x2352a5),_0x4de86d=new _0x2560e6(_0x39839b['createPositionAt'](_0x325049,0x0),_0x189d56,_0x3c766b++);_0x21edef[_0x26ae('0x8a')](_0x4de86d);for(const [_0x2600e8,_0x40be8b]of _0x189d56[_0x26ae('0x7')]){const _0x5b926a=_0x39839b[_0x26ae('0x53')](_0x39839b[_0x26ae('0x54')](_0x325049,_0x40be8b[_0x26ae('0xbb')]['path']['slice']()),_0x39839b[_0x26ae('0x54')](_0x325049,_0x40be8b[_0x26ae('0xa7')]['path'][_0x26ae('0xb5')]())),_0x44779e=new _0x30850e(_0x2600e8,null,_0x5b926a,_0x39839b[_0x26ae('0x7')],!0x0,_0x3c766b++);_0x21edef[_0x26ae('0x8a')](_0x44779e);}}if(_0x4ccce9)for(const [_0x2280fa,_0x222d7d]of Object['entries'](_0x4ccce9)){const _0x444692=_0x39839b[_0x26ae('0x2b')]['getRoot'](_0x2280fa);if(!_0x444692)throw new _0x4d77ef(_0x26ae('0x1d'),null);for(const [_0x3c202f,_0x5a96ec]of Object[_0x26ae('0xb3')](_0x222d7d))if(null!==_0x5a96ec){const _0x51e7e2=new _0x301496(_0x444692,_0x3c202f,null,_0x5a96ec,_0x3c766b++);_0x21edef[_0x26ae('0x8a')](_0x51e7e2);}}return _0x21edef;}async[_0x26ae('0x63')](_0x57c939,_0x5e88ae){let _0x2c3b55;this[_0x26ae('0x31')]=_0x57c939['offset'];const _0x46d936=_0x57c939[_0x26ae('0x50')]&&!_0x57c939['initData'],_0x3d357b=_0x46d936?0x0:_0x57c939[_0x26ae('0x21')][_0x26ae('0x49')];if(_0x46d936)_0x2c3b55=_0x5e88ae,_0x2c3b55[_0x26ae('0xaa')](_0xe98c3b=>{_0xe98c3b['createdAt']=_0x57c939[_0x26ae('0xc7')],_0xe98c3b[_0x26ae('0x4c')]=!0x0,_0xe98c3b['_authorId']=null;}),this[_0x26ae('0x89')](_0x2c3b55,_0x46d936);else{if(_0x57c939['initData']){const _0x2184e8=this['_getOperationsFromInitData'](_0x57c939[_0x26ae('0x83')]);this[_0x26ae('0xa5')][_0x26ae('0xc1')]['version']=-_0x2184e8[_0x26ae('0x32')],_0x2184e8[_0x26ae('0xaa')](_0x2f43c=>{_0x2f43c['baseVersion']-=_0x2184e8[_0x26ae('0x32')],_0x2f43c[_0x26ae('0x95')]=_0x57c939[_0x26ae('0xc7')],_0x2f43c[_0x26ae('0x4c')]=!0x0,_0x2f43c[_0x26ae('0x5f')]=null;}),this['_applyOperationsSet'](_0x2184e8,!0x0),this[_0x26ae('0x51')][_0x26ae('0xc')]=-_0x2184e8[_0x26ae('0x32')]+this[_0x26ae('0x31')],this[_0x26ae('0x1b')](_0x2184e8);}this[_0x26ae('0xa5')][_0x26ae('0xc1')][_0x26ae('0xc')]=_0x3d357b,_0x2c3b55=this[_0x26ae('0x1')](_0x57c939['data'],_0x57c939[_0x26ae('0x44')]),await this[_0x26ae('0xbf')](_0x2c3b55),this[_0x26ae('0x89')](_0x2c3b55,_0x46d936);}_0x57c939[_0x26ae('0xad')]&&(this[_0x26ae('0x86')]['setIdForTheLastOperation'](_0x2c3b55,_0x57c939['lastOperationId']),this[_0x26ae('0x19')]=_0x57c939[_0x26ae('0xad')]),this[_0x26ae('0x51')][_0x26ae('0xc')]=_0x3d357b+this[_0x26ae('0x31')],this[_0x26ae('0x1b')](_0x2c3b55);}[_0x26ae('0xc2')](_0x58d5b4,_0x29086f){throw this[_0x26ae('0x24')]=!0x0,_0x29086f&&console[_0x26ae('0xa9')](_0x29086f),new _0x4d77ef(_0x58d5b4,this[_0x26ae('0x2d')]);}[_0x26ae('0x65')](_0x36a2fe){this['_knownOperations']['has'](_0x36a2fe)||(this[_0x26ae('0x37')][_0x26ae('0x8')](_0x36a2fe),this[_0x26ae('0xa6')][_0x26ae('0x8a')](_0x36a2fe),this[_0x26ae('0x29')]||_0x26ae('0x62')==_0x36a2fe[_0x26ae('0x3c')]&&!_0x36a2fe['affectsData']||this[_0x26ae('0x76')]());}[_0x26ae('0x60')](_0x5778ce=!0x1){!_0x5778ce&&this[_0x26ae('0x24')]||(this[_0x26ae('0x24')]=!0x0,clearTimeout(this[_0x26ae('0x20')]),this[_0x26ae('0x20')]=setTimeout(()=>{this[_0x26ae('0x7a')]()[_0x26ae('0x5e')](_0x43ae68=>{_0x43ae68&&(this[_0x26ae('0x4b')](),this[_0x26ae('0x24')]=!0x1);})[_0x26ae('0x4a')](_0x44cfd1=>{if(this[_0x26ae('0x4b')](),this[_0x26ae('0x24')]=!0x1,!function(_0x576784){return _0x576784['message'][_0x26ae('0xb')]('cloud-services-internal-error:\x20Not\x20connected.')||_0x576784[_0x26ae('0x41')][_0x26ae('0xb')](_0x26ae('0x9'))||_0x576784[_0x26ae('0x41')][_0x26ae('0xb')](_0x26ae('0x59'));}(_0x44cfd1))throw _0x44cfd1;});},this['_currentBufferDelay']));}async[_0x26ae('0x7a')](){const _0x5de48e=this[_0x26ae('0x2d')][_0x26ae('0x4e')]['get'](_0x10b6c8);if(this['_shouldSendSelectionUpdate']()&&(_0x5de48e[_0x26ae('0x92')](),this['_hasSelectionChanged']=!0x1),!this[_0x26ae('0x9a')]())return!0x0;const _0x58210c=[...this[_0x26ae('0xa6')]];for(const _0x1ee1fe of _0x58210c)_0x1ee1fe['wasUndone']=this[_0x26ae('0xa5')][_0x26ae('0xc1')]['isUndoneOperation'](_0x1ee1fe);const _0x4b8850=this[_0x26ae('0x86')]['getIdOfTheLastOperation'](_0x58210c),_0x1a5b44=j++,_0x2c18c3=this[_0x26ae('0x73')](_0x58210c),_0x5be3b9=await this[_0x26ae('0x10')][_0x26ae('0x40')](_0x2c18c3,_0x2c18c3[_0x26ae('0x49')],_0x4b8850);try{return await this[_0x26ae('0xc5')](_0x58210c,_0x5be3b9,_0x1a5b44);}catch(_0x49cdfc){return this[_0x26ae('0xc2')](_0x26ae('0x23'),_0x49cdfc);}}async[_0x26ae('0xc5')](_0x462bca,_0x407dee,_0x539c3d){if('error'in _0x407dee)throw _0x407dee[_0x26ae('0xa9')];let _0x31d571=!0x1;if(_0x407dee[_0x26ae('0x50')]){_0x407dee[_0x26ae('0xad')]&&(this[_0x26ae('0x19')]=_0x407dee[_0x26ae('0xad')]),this[_0x26ae('0xa6')]=this[_0x26ae('0xa6')]['filter'](_0xce0097=>!_0x462bca[_0x26ae('0x74')](_0xce0097));for(const _0x4d42b6 of _0x462bca)_0x4d42b6[_0x26ae('0x95')]=_0x26ae('0x48')in _0x407dee&&_0x407dee[_0x26ae('0x48')]||void 0x0;this[_0x26ae('0x1b')](_0x462bca),_0x31d571=!0x0,this[_0x26ae('0x7f')]=this[_0x26ae('0x70')];}else{const _0x53b8a2=this[_0x26ae('0x1')](_0x407dee[_0x26ae('0x21')],_0x407dee['metadata'])['filter'](_0x53f16c=>_0x53f16c[_0x26ae('0x49')]>=this[_0x26ae('0x5c')]);await this[_0x26ae('0xbf')](_0x53b8a2),_0x31d571=this['_handleExternalOperations'](_0x53b8a2,_0x407dee[_0x26ae('0xc')],_0x407dee[_0x26ae('0xad')]),this[_0x26ae('0x7f')]=Math[_0x26ae('0xab')](this[_0x26ae('0x7f')]/0x2);}return _0x31d571?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this[_0x26ae('0xc2')](_0x26ae('0x8e'));}[_0x26ae('0x99')](_0x5bde9b,_0x5999c3,_0x60c576){try{const _0x124ca9={'document':this[_0x26ae('0xa5')],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x3f5866,operationsB:_0x2c18b6,originalOperations:_0x4ea3b2}=_0x4d4c02(_0x5bde9b,this[_0x26ae('0xa6')],_0x124ca9);H(_0x3f5866,this['_document']['version']),H(_0x2c18b6,_0x5999c3);for(const _0x4fa330 of _0x3f5866){const _0x57d69f=_0x4ea3b2[_0x26ae('0x9c')](_0x4fa330);_0x4fa330[_0x26ae('0x5f')]=_0x57d69f?_0x57d69f[_0x26ae('0x5f')]:null;}_0x60c576&&(this[_0x26ae('0x86')][_0x26ae('0x38')](_0x5bde9b,_0x60c576),this['_lastSyncedOperationId']=_0x60c576),this[_0x26ae('0xa6')]=[..._0x2c18b6],this[_0x26ae('0x89')](_0x3f5866),this[_0x26ae('0x1b')](_0x5bde9b);}catch(_0x4d1a03){return console[_0x26ae('0xa9')](_0x4d1a03),!0x1;}return!0x0;}['_applyOperationsSet'](_0x3e5e48,_0x41b3a1=!0x1){this[_0x26ae('0x2d')][_0x26ae('0x4f')][_0x26ae('0xa3')]({'isUndoable':!0x1,'isLocal':!0x1},_0x23518b=>{for(const _0x52f408 of _0x3e5e48)this['_knownOperations'][_0x26ae('0x8')](_0x52f408),_0x23518b[_0x26ae('0x1f')][_0x26ae('0x25')](_0x52f408),this[_0x26ae('0x2d')][_0x26ae('0x4f')][_0x26ae('0x3')](_0x52f408);});}['_updateServerHistory'](_0x2c99ad){_0x2c99ad['forEach'](_0x1ff9be=>{const _0x2d1b52=_0x1ff9be[_0x26ae('0x2c')]();_0x2d1b52[_0x26ae('0x5f')]=_0x1ff9be[_0x26ae('0x5f')],_0x2d1b52['_isInit']=!!_0x1ff9be[_0x26ae('0x4c')],_0x2d1b52[_0x26ae('0x95')]=_0x1ff9be[_0x26ae('0x95')],_0x2d1b52[_0x26ae('0x49')]+=this[_0x26ae('0x31')],_0x1ff9be[_0x26ae('0x3b')]&&this[_0x26ae('0xb0')][_0x26ae('0x8')](_0x2d1b52),this['serverHistory'][_0x26ae('0x25')](_0x2d1b52);});}[_0x26ae('0x57')](_0x197b6b){const _0x4fc273=this[_0x26ae('0x2d')]['plugins'][_0x26ae('0x9c')](_0x26ae('0x85')),_0xf9fda6=this['editor'][_0x26ae('0x8f')];_0x197b6b||(_0x197b6b=_0x2c78c5(_0xf9fda6,_0x26ae('0x7b'))),_0x4fc273['showWarning'](_0x197b6b,{'title':_0x2c78c5(_0xf9fda6,_0x26ae('0x26')),'namespace':_0x26ae('0x87')}),this[_0x26ae('0x13')]=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this[_0x26ae('0xa6')]=[],this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x12b3fb)[_0x26ae('0x5a')]();}[_0x26ae('0x76')](){this[_0x26ae('0x29')]||(this['_pendingAction']=this[_0x26ae('0x2d')]['plugins']['get'](_0x3e37cc)['add'](_0x2c78c5(this[_0x26ae('0x2d')][_0x26ae('0x8f')],_0x26ae('0x46'))));}[_0x26ae('0x4b')](){this['_pendingAction']&&(this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x3e37cc)['remove'](this[_0x26ae('0x29')]),this[_0x26ae('0x29')]=null);}['_compressOperations'](_0x305f9b){const _0x383aeb=_0x305f9b[_0x26ae('0xaf')](_0x5369ad=>_0x5369ad[_0x26ae('0x9b')]());return this[_0x26ae('0x96')]['compress'](_0x383aeb);}['_decompressOperations'](_0x4c4584,_0x453d4f){return this[_0x26ae('0x96')][_0x26ae('0x82')](_0x4c4584)[_0x26ae('0xaf')]((_0x2cd79c,_0x216f28)=>{const _0x203acc=_0x26ae('0x8d')==_0x453d4f[_0x216f28]['type'];if(_0x203acc&&'InsertOperation'==_0x2cd79c[_0x26ae('0x64')]){const _0x31c7d6=_0x2cd79c[_0x26ae('0x45')]['root'];if(!this[_0x26ae('0xa5')][_0x26ae('0x67')](_0x31c7d6)){const _0x57fc94=new _0x4dfaf5(_0x31c7d6,_0x26ae('0x0'),!0x0,this['_document'],null);this[_0x26ae('0xa5')][_0x26ae('0x67')](_0x31c7d6)[_0x26ae('0x30')]=!0x0,this[_0x26ae('0xa5')][_0x26ae('0xb7')][_0x26ae('0x22')](_0x57fc94);}}else{if('RootOperation'==_0x2cd79c[_0x26ae('0x64')]&&_0x2cd79c[_0x26ae('0x81')]){const _0x487444=this[_0x26ae('0xa5')]['getRoot'](_0x2cd79c[_0x26ae('0x6c')]);_0x487444&&_0x487444['isAttached']()&&(_0x487444[_0x26ae('0x30')]=!0x1);}}const _0x50eefd=_0x42b1b0[_0x26ae('0xcb')](_0x2cd79c,this[_0x26ae('0xa5')]);return _0x50eefd[_0x26ae('0xc6')]=_0x2cd79c[_0x26ae('0xc6')],_0x50eefd[_0x26ae('0x4c')]=_0x203acc,_0x50eefd[_0x26ae('0x5f')]=_0x203acc?null:_0x453d4f[_0x216f28][_0x26ae('0xc3')],_0x50eefd['_isDisconnection']=_0x26ae('0x1a')===_0x453d4f[_0x216f28][_0x26ae('0x3c')],_0x50eefd[_0x26ae('0x95')]=_0x453d4f[_0x216f28][_0x26ae('0x95')],_0x50eefd;});}[_0x26ae('0xa4')](){this[_0x26ae('0x47')]=!0x0,this['_shouldSendSelectionUpdate']()?this[_0x26ae('0x60')]():this[_0x26ae('0x47')]=!0x1;}[_0x26ae('0x90')](){const _0x58355f=this[_0x26ae('0x2d')][_0x26ae('0x4e')][_0x26ae('0x9c')](_0x466843)[_0x26ae('0xd')][_0x26ae('0x9c')](this['_channelId']);return Boolean(!this[_0x26ae('0x2d')][_0x26ae('0xa0')]&&_0x58355f&&_0x58355f[_0x26ae('0x32')]>0x1&&this[_0x26ae('0x47')]);}[_0x26ae('0x9a')](){return this[_0x26ae('0xa6')][_0x26ae('0x32')]>0x0||this[_0x26ae('0x90')]();}}l[_0x26ae('0x8c')]=_0x4ac2c5;class F extends Error{}function H(_0x38014b,_0x9c1a39){for(const _0x3fda72 of _0x38014b)_0x3fda72[_0x26ae('0x49')]=_0x9c1a39++;}class q{constructor(_0x444414){this[_0x26ae('0x39')]=_0x444414,this['_operationToId']=new WeakMap();}[_0x26ae('0x52')](_0x56d111){let _0x2691f7=_0x56d111[_0x26ae('0x32')];for(;_0x2691f7--;){const _0x58d1f7=_0x56d111[_0x2691f7];if(!this[_0x26ae('0x39')]['has'](_0x58d1f7)){if(!this[_0x26ae('0x61')][_0x26ae('0x9e')](_0x58d1f7)){const _0x164b2e=_0x1fbea5()[_0x26ae('0xb5')](0x1,0x12);this[_0x26ae('0x61')][_0x26ae('0x28')](_0x58d1f7,_0x164b2e);}return this[_0x26ae('0x61')][_0x26ae('0x9c')](_0x58d1f7);}}}[_0x26ae('0x38')](_0x1c648a,_0x3355ea){if(!_0x3355ea)return;let _0x563a7e=_0x1c648a['length'];for(;_0x563a7e--;){const _0x2b8f02=_0x1c648a[_0x563a7e];this['_ignoredOperations']['has'](_0x2b8f02)||this[_0x26ae('0x61')][_0x26ae('0x28')](_0x2b8f02,_0x3355ea);}}}
|
|
23
|
+
const _0x59e8=['_hasSelectionChanged','_operationIdentifier','change:range','_isDisconnection','_knownOperations','_operationToId','affectsData','_hasSynchronizationProblem','CollaborativeEditingService','lastOperationId','finally','currentDocumentSession','_isPendingUpdate','_crash','fire','pluginName','lastDocumentSession','_authorId','_handleSendingSelectionMarkers','getOperationAuthor','getUser','_connectService','collaboration.channelId','reconnect','_getOperationsFromInitData','_isEditingAllowed','parse','cloudDocumentVersion','_lastSyncedOperationId','wereChangesApplied','_setPendingAction','config','Permissions','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','_pendingAction','model','disableReadOnlyMode','_sendBufferedOperationsDelayed','getRoot','_setUpDataInit','realtimecollaborationclient-handleserverresponse','serverHistory','realtimecollaborationclient-sendbufferedoperations','createRange','directChange','409','size','getConnectedSessions','destroy','sendOperations','stopListening','realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration','_fetchMissingUsers','document','isReadOnly','_sendBufferedOperations','get','createdAt','channelSessions','_document','lastSyncVersion','lastOperationAcceptedAt','setIdForTheLastOperation','connected','getDocumentDetails','realtimecollaborationclient-initservice-incorrect-server-operation','_ignoredOperations','from','register','showWarning','keys','The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','rootName','_service','push','marker','real-time-collaboration','return','collaboration-missing-channelid','data','start','mySessionId','_compressOperations','getMany','state','roots','cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.','add','forEach','_initSessionsHandling','fromJSON','_applyOperationsSet','_shouldSendSelectionUpdate','addUser','_baseBufferDelay','createPositionFromPath','permissions','_bufferedOperations','filter','cloud-services-internal-error:\x20Request\x20timeout.','reset','_handleInitialConnectionData','addOperation','sessionAdd:','bind','connection','off','set','getIdOfTheLastOperation','then','catch','position','_handleReceivedOperations','unregister','_disconnectService','_channelId','rtc-offline','decompress','init','realtimecollaborationclient-init-non-existent-root','markers','_currentBufferDelay','baseVersion','remove','cloud-services-internal-error:\x20Not\x20connected.','version','high','_updateServerHistory','realtimecollaborationclient-init-document-already-initialized','bufferOperation','view','RealTimeCollaborationClient','_isAttached','_saveOperationInBuffer','Synchronization\x20issue','addToReconnectionStack','initData','_handleServerResponse','requires','_decompressOperations','end','_handleReconnectionError','has','The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','cloudServices.bundleVersion','slice','includes','type','getOperations','sessionCreatedAt','RootOperation','error','toJSON','suppressErrorInCollaboration','__className','startsWith','editor','wasUndone','listenTo','enableReadOnlyMode','_lastServerVersion','metadata','_refreshUserSelectionMarkers','_sendBufferedOperationsDelayId','_clearPendingAction','apply','stop','plugins','change:hasDomSelection','enqueueChange','realtimecollaborationclient-init-connection-failed','map','setPermissions','locale','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.','_isConnected','disconnected','reconnection:\x20flushed\x20session','_offset','createUserMarkerOperations','cs:removeUser','length','history','$root','_compressor','_initThrowingOnDataSet','sessionId','rtc-destroyed','selection','multi-root-editor-root-attributes-no-root','applyOperation','_handleExternalOperations','_shouldSendUpdate','collaboration','isDocumentOperation','_isInit','offset','_connectAfterSessionHasBeenFlushed','editing','removeFromReconnectionStack','isEnabled','entries','_disconnectionOperations','document:write','CommentsOnly','isUndoneOperation'];(function(_0x25e196,_0x59e88c){const _0x360a3d=function(_0x1a33d4){while(--_0x1a33d4){_0x25e196['push'](_0x25e196['shift']());}};_0x360a3d(++_0x59e88c);}(_0x59e8,0x103));const _0x360a=function(_0x25e196,_0x59e88c){_0x25e196=_0x25e196-0x0;let _0x360a3d=_0x59e8[_0x25e196];return _0x360a3d;};import{Plugin as _0x202ea6,PendingActions as _0x1f5d65}from'ckeditor5/src/core';import{CKEditorError as _0x549676,version as _0x2af252,uid as _0x1fc7fd}from'ckeditor5/src/utils';import{Notification as _0x3384bd}from'ckeditor5/src/ui';import{transformSets as _0xa87ae7,InsertOperation as _0x58c34e,MarkerOperation as _0x2fd660,RootAttributeOperation as _0x15b6c8,RootOperation as _0x176dff,OperationFactory as _0xf10a10,History as _0x9d21ca}from'ckeditor5/src/engine';import _0x141363 from'./websocketgateway';import _0x44d56f from'./sessions';import _0x3a57aa from'./usermarkers';import{getTranslation as _0x5bf011}from'../common-translations';import _0x1ff60c from'@ckeditor/ckeditor5-operations-compressor/src/compressor';import{Users as _0x51ebf1}from'ckeditor5-collaboration/src/collaboration-core';import _0x2e98d2 from'@ckeditor/ckeditor-cloud-services-collaboration/src/collaborativeeditingservice/collaborativeeditingservice';import _0x307a3a from'@ckeditor/ckeditor-cloud-services-collaboration/src/users/user';let J=0x1;export default class l extends _0x202ea6{static get[_0x360a('0x55')](){return[_0x141363,_0x44d56f,_0x3a57aa,_0x1f5d65,_0x51ebf1,_0x3384bd];}static get[_0x360a('0xa8')](){return _0x360a('0x4e');}get[_0x360a('0xb4')](){return this[_0x360a('0x6b')]+this['_offset'];}get[_0x360a('0x6b')](){return this[_0x360a('0xc2')][_0x360a('0x48')]-this[_0x360a('0x7d')];}get[_0x360a('0x7')](){const _0x3ef3ee=this[_0x360a('0xc2')]['getOperations']();for(let _0x1e77c0=_0x3ef3ee['length']-0x1;_0x1e77c0>=0x0;_0x1e77c0--){const _0x3a0f4d=_0x3ef3ee[_0x1e77c0];if(!this[_0x360a('0x95')][_0x360a('0x59')](_0x3a0f4d))return _0x3a0f4d[_0x360a('0x45')]+0x1-this[_0x360a('0x7d')];}return 0x0;}constructor(_0x1aa699){if(super(_0x1aa699),this[_0x360a('0x7d')]=0x0,this[_0x360a('0x85')]=null,this['serverHistory']=new _0x9d21ca(),this[_0x360a('0x67')]['config']['define'](_0x360a('0x8c'),{}),this[_0x360a('0x3e')]=this[_0x360a('0x67')][_0x360a('0xb8')][_0x360a('0x3')](_0x360a('0xaf')),!this[_0x360a('0x3e')])throw new _0x549676(_0x360a('0x19'),this);const _0xdf8c50=_0x1aa699[_0x360a('0xb8')][_0x360a('0x3')](_0x360a('0x5b'))||_0x2af252;this[_0x360a('0x14')]=new l[(_0x360a('0xa1'))](_0xdf8c50,this[_0x360a('0x3e')]),this[_0x360a('0x6')]=this['editor'][_0x360a('0xbc')][_0x360a('0x0')],this['_compressor']=new _0x1ff60c(),this['_bufferedOperations']=[],this[_0x360a('0x9d')]=new WeakSet(),this[_0x360a('0x36')](_0x360a('0xa5'),!0x1),this['set'](_0x360a('0xa0'),!0x1),this[_0x360a('0xbb')]=null,this[_0x360a('0x99')]=!0x1,this['_sendBufferedOperationsDelayId']=null,this[_0x360a('0x29')]=0x12c,this['_currentBufferDelay']=this[_0x360a('0x29')],this['_lastSyncedOperationId']=null,this[_0x360a('0x95')]=new WeakSet(),this[_0x360a('0x9a')]=new X(this[_0x360a('0x95')]);}['init'](){const _0x430aec=this['editor'],_0xb25fea=_0x430aec[_0x360a('0x72')][_0x360a('0x3')](_0x51ebf1),_0x1b9daf=_0x430aec[_0x360a('0x72')][_0x360a('0x3')](_0x141363);this[_0x360a('0x69')](_0xb25fea,_0x360a('0xac'),(_0x52a7bd,_0x3b5f5c)=>{const _0x312e23=_0x3b5f5c[0x0];_0x312e23[_0x360a('0xaa')]&&(_0x52a7bd[_0x360a('0x18')]=_0xb25fea['getUser'](_0x312e23[_0x360a('0xaa')]),_0x52a7bd[_0x360a('0x71')]()),null===_0x312e23['_authorId']&&(_0x52a7bd[_0x360a('0x18')]=null,_0x52a7bd[_0x360a('0x71')]());},{'priority':_0x360a('0x49')}),this[_0x360a('0x69')](_0x430aec[_0x360a('0xbc')][_0x360a('0x0')][_0x360a('0x87')],_0x360a('0x9b'),(_0x4b3b67,_0x3ea066)=>{_0x3ea066[_0x360a('0xc5')]&&this[_0x360a('0x6d')]();}),this['listenTo'](_0x430aec[_0x360a('0x91')][_0x360a('0x4d')],_0x360a('0x73'),()=>{this[_0x360a('0x6d')]();}),this[_0x360a('0x84')](),_0x430aec[_0x360a('0xbc')]['on'](_0x360a('0x89'),(_0x50ca78,_0x4799de)=>{const _0x5889f0=_0x4799de[0x0];_0x5889f0[_0x360a('0x8d')]&&(this[_0x360a('0x50')](_0x5889f0),this[_0x360a('0x8b')]()&&this['_sendBufferedOperationsDelayed']());}),this[_0x360a('0xc0')](),this[_0x360a('0x33')](_0x360a('0xb2'))['to'](_0x1b9daf,_0x360a('0x1f'),this,'_hasSynchronizationProblem',(_0x542ae1,_0x1499c5)=>_0x360a('0xa')===_0x542ae1&&!_0x1499c5),this['on']('change:_isEditingAllowed',()=>{this[_0x360a('0xb2')]?_0x430aec[_0x360a('0xbd')]('rtc-offline'):_0x430aec[_0x360a('0x6a')](_0x360a('0x3f'));}),this[_0x360a('0xb2')]?_0x430aec[_0x360a('0xbd')](_0x360a('0x3f')):_0x430aec[_0x360a('0x6a')](_0x360a('0x3f')),this[_0x360a('0x36')](_0x360a('0x7a'),!0x1);}async['reconnect'](){const _0x1d73f2=this[_0x360a('0x67')][_0x360a('0x72')][_0x360a('0x3')](_0x44d56f),_0x4b9836=this['editor']['plugins'][_0x360a('0x3')](_0x141363);try{this[_0x360a('0xa5')]=!0x0,_0x1d73f2['unregister'](this[_0x360a('0x3e')]);const _0x158994=await this[_0x360a('0x14')][_0x360a('0xb0')](_0x4b9836[_0x360a('0x34')],this[_0x360a('0x7')]);await this['_handleReconnectionResponse'](_0x158994)&&(this[_0x360a('0xa5')]=!0x1,this[_0x360a('0x6f')]());const _0x147aec=await this[_0x360a('0x14')][_0x360a('0xc8')]();_0x1d73f2[_0x360a('0xf')](this[_0x360a('0x3e')],_0x147aec),this[_0x360a('0xab')](),this['_isConnected']=!0x0;}catch(_0x7ad099){if(function(_0x46dfe9){return'404'===_0x46dfe9['code'];}(_0x7ad099)&&this[_0x360a('0x85')])await this[_0x360a('0x90')]();else{if(function(_0x3b0e37){return _0x360a('0xc6')===_0x3b0e37['code'];}(_0x7ad099)){const _0x57eece=_0x5bf011(this[_0x360a('0x67')][_0x360a('0x78')],_0x360a('0xba'));this['_handleReconnectionError'](_0x57eece);}else{if(!(_0x7ad099 instanceof K))throw _0x7ad099;this[_0x360a('0x58')]();}}}}['destroy'](){const _0x81e2e0=this[_0x360a('0x67')]['plugins'][_0x360a('0x3')](_0x141363),_0x27825c=this[_0x360a('0x67')][_0x360a('0x72')]['get'](_0x44d56f);this[_0x360a('0x67')][_0x360a('0x6a')](_0x360a('0x86')),_0x27825c['channelSessions'][_0x360a('0x59')](this['_channelId'])&&_0x27825c[_0x360a('0x3c')](this['_channelId']),_0x81e2e0[_0x360a('0x92')](this),this[_0x360a('0x3d')](),super['destroy']();}async['_handleReconnectionResponse'](_0x233fda){if(this[_0x360a('0x85')]!==_0x233fda[_0x360a('0x85')]&&this[_0x360a('0xb5')]!==_0x233fda[_0x360a('0xa2')])throw new K();return this[_0x360a('0x85')]=_0x233fda['sessionId'],this[_0x360a('0x54')]([],{..._0x233fda,'wereChangesApplied':!0x1,'data':_0x233fda['data']},_0x360a('0xb0'));}async[_0x360a('0xae')](_0x1e0669,_0x5e3c38=!0x1){const {connection:_0x56ff72}=this['editor']['plugins']['get'](_0x141363);l['CollaborativeEditingService'][_0x360a('0xc8')](_0x56ff72,this['_channelId'])[_0x360a('0x38')](_0x2e9aa1=>this[_0x360a('0x24')](_0x2e9aa1))['catch'](_0x271d65=>{this[_0x360a('0xa6')]('realtimecollaborationclient-init-session-connection-error',_0x271d65);}),this[_0x360a('0x69')](this['_service'],'operationsReceived',this[_0x360a('0x3b')][_0x360a('0x33')](this)),this[_0x360a('0x69')](this['_service'],_0x360a('0x62'),(_0x5dd506,_0x27d32c)=>{this[_0x360a('0xa6')]('realtimecollaborationclient-initservice-internal-error',_0x27d32c);}),this[_0x360a('0x69')](this[_0x360a('0x14')],_0x360a('0x7b'),()=>{this[_0x360a('0x7a')]=!0x1;});const _0x358fe8=this[_0x360a('0x9a')][_0x360a('0x37')](_0x1e0669),_0x2dcf51=await this['_service']['connect'](_0x56ff72,this[_0x360a('0x1d')](_0x1e0669),_0x358fe8);if(this[_0x360a('0x85')]=_0x2dcf51[_0x360a('0x85')],_0x2dcf51['wereChangesApplied']&&(this[_0x360a('0xa5')]=!0x1,this['_clearPendingAction']()),_0x5e3c38){if(!_0x2dcf51[_0x360a('0xb6')])return void this[_0x360a('0x58')]();this['serverHistory'][_0x360a('0x2f')](),this[_0x360a('0x7d')]=_0x2dcf51['offset'],this[_0x360a('0xc2')]['version']=this[_0x360a('0x7d')],await this['_handleServerResponse'](_0x1e0669,_0x2dcf51,_0x360a('0x7c'));}else await this['_handleInitialConnectionData'](_0x2dcf51,_0x1e0669);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}[_0x360a('0xab')](){const _0x428df4=this[_0x360a('0x67')]['plugins'][_0x360a('0x3')](_0x44d56f),_0xd5814b=this[_0x360a('0x67')][_0x360a('0x72')][_0x360a('0x3')](_0x3a57aa),_0x2672a8=_0x428df4[_0x360a('0x5')][_0x360a('0x3')](this[_0x360a('0x3e')]);_0x2672a8&&_0x2672a8[_0x360a('0x80')]>0x1?_0xd5814b[_0x360a('0x7e')]():this['listenTo'](_0x428df4,_0x360a('0x32')+this[_0x360a('0x3e')],()=>{0x2===_0x428df4[_0x360a('0x5')][_0x360a('0x3')](this[_0x360a('0x3e')])['length']&&_0xd5814b[_0x360a('0x7e')]();});}async['_handleReceivedOperations'](_0xdb5776,_0x25062d,_0x1c45c3,_0x5c4e11){if(!this[_0x360a('0xa5')]&&this[_0x360a('0x6')][_0x360a('0x48')]==_0x25062d){const _0x1f0d08=this[_0x360a('0x56')](_0x1c45c3,_0x5c4e11);await this[_0x360a('0xcd')](_0x1f0d08),this[_0x360a('0x8a')](_0x1f0d08,_0x25062d,_0x1c45c3[_0x360a('0xa2')])||this['_crash'](_0x360a('0xc'));}}async[_0x360a('0x90')](){this[_0x360a('0x3d')]();const {locale:_0xd1dae0}=this[_0x360a('0x67')];let _0x2464cd;try{_0x2464cd=await this[_0x360a('0x14')][_0x360a('0xb')]();}catch(_0x4cca31){const _0x4759c0=_0x5bf011(_0xd1dae0,_0x360a('0x79'));return void this[_0x360a('0x58')](_0x4759c0);}const _0xac08ac=_0x2464cd[_0x360a('0xa4')]||_0x2464cd[_0x360a('0xa9')];if(this[_0x360a('0xb5')]===_0xac08ac['lastOperationId'])await this[_0x360a('0xae')](this[_0x360a('0x67')][_0x360a('0xbc')][_0x360a('0x0')][_0x360a('0x81')][_0x360a('0x5f')](),!0x0);else{const _0x54777b=_0x5bf011(_0xd1dae0,_0x360a('0x12'));this['_handleReconnectionError'](_0x54777b);}}[_0x360a('0x3d')](){this[_0x360a('0x14')]['disconnect'](),this[_0x360a('0x2c')]=[],clearTimeout(this[_0x360a('0x6e')]),this[_0x360a('0xcb')](this[_0x360a('0x14')]);}[_0x360a('0x24')](_0x7e8c60){const _0x5291c4=this['editor'][_0x360a('0x72')][_0x360a('0x3')](_0x44d56f);this[_0x360a('0x69')](_0x5291c4,'sessionAdd:'+this['_channelId'],(_0x58ddd0,{session:_0x2da9eb})=>{if(_0x2da9eb['id']===_0x5291c4[_0x360a('0x1c')]){_0x58ddd0[_0x360a('0x35')]();const _0x1825d1=this['editor']['plugins']['has'](_0x360a('0x97'))&&this[_0x360a('0x67')][_0x360a('0x72')][_0x360a('0x3')]('CommentsOnly');let _0x10fa57=_0x2da9eb[_0x360a('0x2b')];_0x1825d1&&_0x1825d1[_0x360a('0x93')]&&(_0x10fa57=_0x10fa57[_0x360a('0x2d')](_0x372f36=>_0x360a('0x96')!==_0x372f36)),this['editor'][_0x360a('0x72')][_0x360a('0x3')](_0x360a('0xb9'))[_0x360a('0x77')](_0x10fa57,this['_channelId']);}}),_0x5291c4[_0x360a('0xf')](this[_0x360a('0x3e')],_0x7e8c60);}[_0x360a('0x84')](){const _0x37815b=this[_0x360a('0x67')][_0x360a('0x1a')][_0x360a('0x36')];this['editor'][_0x360a('0x1a')][_0x360a('0x36')]=(..._0xb75cdd)=>{if(!_0xb75cdd[_0xb75cdd[_0x360a('0x80')]-0x1][_0x360a('0x64')])throw new _0x549676(_0x360a('0xcc'),this);_0x37815b[_0x360a('0x70')](this[_0x360a('0x67')][_0x360a('0x1a')],_0xb75cdd);};}[_0x360a('0xc0')](){this[_0x360a('0x67')][_0x360a('0x1a')]['on'](_0x360a('0x41'),(_0x10244b,[_0x1357e6])=>{if(this[_0x360a('0x6')][_0x360a('0x48')])throw new _0x549676(_0x360a('0x4b'),this);_0x10244b[_0x360a('0x71')](),this[_0x360a('0xb7')]();const _0x3b43c1=this[_0x360a('0x67')]['config'][_0x360a('0x3')]('rootsAttributes'),_0x3d1b86=this[_0x360a('0xb1')](_0x1357e6,_0x3b43c1);_0x10244b[_0x360a('0x18')]=this[_0x360a('0xae')](_0x3d1b86)[_0x360a('0x38')](()=>{this[_0x360a('0x67')][_0x360a('0x72')]['get'](_0x141363)[_0x360a('0x52')](this),this[_0x360a('0x67')][_0x360a('0x1a')][_0x360a('0xa7')]('ready');})['catch'](_0x2a9abb=>this[_0x360a('0xa6')](_0x360a('0x75'),_0x2a9abb))[_0x360a('0xa3')](()=>this[_0x360a('0x6f')]());},{'priority':'high'});}async[_0x360a('0xcd')](_0x487ad0){const _0x555530=this[_0x360a('0x67')]['plugins'][_0x360a('0x3')](_0x51ebf1),{connection:_0x4f56f6}=this['editor']['plugins']['get'](_0x141363),_0x2926ed=new Set();for(const _0x119c4d of _0x487ad0){const _0x1b6c03=_0x119c4d[_0x360a('0xaa')];_0x1b6c03&&!_0x555530[_0x360a('0xad')](_0x1b6c03)&&_0x2926ed[_0x360a('0x22')](_0x1b6c03);}if(0x0===_0x2926ed[_0x360a('0xc7')])return;const _0x2897b3=await _0x307a3a[_0x360a('0x1e')](_0x4f56f6,Array[_0x360a('0xe')](_0x2926ed));for(const _0x141c97 of _0x2897b3)_0x555530[_0x360a('0xad')](_0x141c97['id'])||_0x555530[_0x360a('0x28')](_0x141c97);}['_getOperationsFromInitData'](_0x258ead,_0x5e2411={}){const _0xe42998=this['editor'][_0x360a('0xbc')],_0x90d4c1=[];let _0x2f5d1b=0x0;const _0x29cc34='string'==typeof _0x258ead?{'main':_0x258ead}:_0x258ead;for(const _0x419d35 of Object[_0x360a('0x11')](_0x29cc34)){if(!this[_0x360a('0x6')][_0x360a('0x20')]['has'](_0x419d35))throw new _0x549676(_0x360a('0x42'),this);const _0x5004fb=this[_0x360a('0x67')][_0x360a('0x1a')][_0x360a('0xb3')](_0x29cc34[_0x419d35]),_0x4c3fc1=this[_0x360a('0x6')][_0x360a('0xbf')](_0x419d35),_0x16c309=new _0x58c34e(_0xe42998['createPositionAt'](_0x4c3fc1,0x0),_0x5004fb,_0x2f5d1b++);_0x90d4c1[_0x360a('0x15')](_0x16c309);for(const [_0x3674b0,_0x4256b0]of _0x5004fb[_0x360a('0x43')]){const _0x58fb77=_0xe42998[_0x360a('0xc4')](_0xe42998[_0x360a('0x2a')](_0x4c3fc1,_0x4256b0[_0x360a('0x1b')]['path']['slice']()),_0xe42998[_0x360a('0x2a')](_0x4c3fc1,_0x4256b0[_0x360a('0x57')]['path'][_0x360a('0x5c')]())),_0x263d98=new _0x2fd660(_0x3674b0,null,_0x58fb77,_0xe42998[_0x360a('0x43')],!0x0,_0x2f5d1b++);_0x90d4c1[_0x360a('0x15')](_0x263d98);}}if(_0x5e2411)for(const [_0x1dd9f3,_0x44301c]of Object[_0x360a('0x94')](_0x5e2411)){const _0x1a79a1=_0xe42998[_0x360a('0x0')][_0x360a('0xbf')](_0x1dd9f3);if(!_0x1a79a1)throw new _0x549676(_0x360a('0x88'),null);for(const [_0x33c934,_0x2bc9fc]of Object[_0x360a('0x94')](_0x44301c))if(null!==_0x2bc9fc){const _0x1f6081=new _0x15b6c8(_0x1a79a1,_0x33c934,null,_0x2bc9fc,_0x2f5d1b++);_0x90d4c1[_0x360a('0x15')](_0x1f6081);}}return _0x90d4c1;}async[_0x360a('0x30')](_0x4640d6,_0x270e70){let _0x512303;this[_0x360a('0x7d')]=_0x4640d6[_0x360a('0x8f')];const _0x13c8e9=_0x4640d6['wereChangesApplied']&&!_0x4640d6['initData'],_0x2ac6f1=_0x13c8e9?0x0:_0x4640d6[_0x360a('0x1a')][_0x360a('0x45')];if(_0x13c8e9)_0x512303=_0x270e70,_0x512303[_0x360a('0x23')](_0x125fc3=>{_0x125fc3[_0x360a('0x4')]=_0x4640d6['sessionCreatedAt'],_0x125fc3[_0x360a('0x8e')]=!0x0,_0x125fc3[_0x360a('0xaa')]=null;}),this['_applyOperationsSet'](_0x512303,_0x13c8e9);else{if(_0x4640d6[_0x360a('0x53')]){const _0x1e2f00=this['_getOperationsFromInitData'](_0x4640d6[_0x360a('0x53')]);this[_0x360a('0x6')][_0x360a('0x81')][_0x360a('0x48')]=-_0x1e2f00[_0x360a('0x80')],_0x1e2f00['forEach'](_0x45b442=>{_0x45b442['baseVersion']-=_0x1e2f00[_0x360a('0x80')],_0x45b442[_0x360a('0x4')]=_0x4640d6[_0x360a('0x60')],_0x45b442[_0x360a('0x8e')]=!0x0,_0x45b442[_0x360a('0xaa')]=null;}),this[_0x360a('0x26')](_0x1e2f00,!0x0),this[_0x360a('0xc2')][_0x360a('0x48')]=-_0x1e2f00['length']+this[_0x360a('0x7d')],this[_0x360a('0x4a')](_0x1e2f00);}this[_0x360a('0x6')][_0x360a('0x81')]['version']=_0x2ac6f1,_0x512303=this[_0x360a('0x56')](_0x4640d6['data'],_0x4640d6['metadata']),await this[_0x360a('0xcd')](_0x512303),this[_0x360a('0x26')](_0x512303,_0x13c8e9);}_0x4640d6[_0x360a('0xa2')]&&(this[_0x360a('0x9a')][_0x360a('0x9')](_0x512303,_0x4640d6[_0x360a('0xa2')]),this[_0x360a('0xb5')]=_0x4640d6[_0x360a('0xa2')]),this[_0x360a('0xc2')][_0x360a('0x48')]=_0x2ac6f1+this['_offset'],this[_0x360a('0x4a')](_0x512303);}[_0x360a('0xa6')](_0x3e9ff4,_0x530410){throw this[_0x360a('0xa5')]=!0x0,_0x530410&&console['error'](_0x530410),new _0x549676(_0x3e9ff4,this[_0x360a('0x67')]);}['_saveOperationInBuffer'](_0x4ecc82){this[_0x360a('0x9d')][_0x360a('0x59')](_0x4ecc82)||(this[_0x360a('0x9d')][_0x360a('0x22')](_0x4ecc82),this[_0x360a('0x2c')][_0x360a('0x15')](_0x4ecc82),this[_0x360a('0xbb')]||_0x360a('0x16')==_0x4ecc82[_0x360a('0x5e')]&&!_0x4ecc82[_0x360a('0x9f')]||this[_0x360a('0xb7')]());}[_0x360a('0xbe')](_0x57495b=!0x1){!_0x57495b&&this[_0x360a('0xa5')]||(this[_0x360a('0xa5')]=!0x0,clearTimeout(this[_0x360a('0x6e')]),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this[_0x360a('0x2')]()[_0x360a('0x38')](_0x2780f7=>{_0x2780f7&&(this['_clearPendingAction'](),this[_0x360a('0xa5')]=!0x1);})[_0x360a('0x39')](_0x3c6227=>{if(this['_clearPendingAction'](),this[_0x360a('0xa5')]=!0x1,!function(_0x29119d){return _0x29119d['message'][_0x360a('0x66')](_0x360a('0x47'))||_0x29119d['message'][_0x360a('0x66')](_0x360a('0x21'))||_0x29119d['message'][_0x360a('0x66')](_0x360a('0x2e'));}(_0x3c6227))throw _0x3c6227;});},this['_currentBufferDelay']));}async[_0x360a('0x2')](){const _0x5a327c=this['editor']['plugins'][_0x360a('0x3')](_0x3a57aa);if(this[_0x360a('0x27')]()&&(_0x5a327c[_0x360a('0x7e')](),this[_0x360a('0x99')]=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x4248df=[...this['_bufferedOperations']];for(const _0xa197df of _0x4248df)_0xa197df[_0x360a('0x68')]=this[_0x360a('0x6')][_0x360a('0x81')][_0x360a('0x98')](_0xa197df);const _0x38a2ce=this[_0x360a('0x9a')][_0x360a('0x37')](_0x4248df),_0x71b503=J++,_0x27ff92=this[_0x360a('0x1d')](_0x4248df),_0x5abb79=await this['_service'][_0x360a('0xca')](_0x27ff92,_0x27ff92['baseVersion'],_0x38a2ce);try{return await this['_handleServerResponse'](_0x4248df,_0x5abb79,_0x71b503);}catch(_0x11c73f){return this[_0x360a('0xa6')](_0x360a('0xc3'),_0x11c73f);}}async[_0x360a('0x54')](_0x1a1f35,_0x3d7357,_0x233e23){if(_0x360a('0x62')in _0x3d7357)throw _0x3d7357[_0x360a('0x62')];let _0x15f4be=!0x1;if(_0x3d7357[_0x360a('0xb6')]){_0x3d7357[_0x360a('0xa2')]&&(this[_0x360a('0xb5')]=_0x3d7357[_0x360a('0xa2')]),this[_0x360a('0x2c')]=this[_0x360a('0x2c')][_0x360a('0x2d')](_0x40e05f=>!_0x1a1f35[_0x360a('0x5d')](_0x40e05f));for(const _0x2d4980 of _0x1a1f35)_0x2d4980[_0x360a('0x4')]=_0x360a('0x8')in _0x3d7357&&_0x3d7357[_0x360a('0x8')]||void 0x0;this[_0x360a('0x4a')](_0x1a1f35),_0x15f4be=!0x0,this[_0x360a('0x44')]=this['_baseBufferDelay'];}else{const _0x592b8f=this[_0x360a('0x56')](_0x3d7357['data'],_0x3d7357[_0x360a('0x6c')])[_0x360a('0x2d')](_0x11e6bc=>_0x11e6bc[_0x360a('0x45')]>=this[_0x360a('0x6b')]);await this['_fetchMissingUsers'](_0x592b8f),_0x15f4be=this[_0x360a('0x8a')](_0x592b8f,_0x3d7357[_0x360a('0x48')],_0x3d7357[_0x360a('0xa2')]),this[_0x360a('0x44')]=Math['round'](this['_currentBufferDelay']/0x2);}return _0x15f4be?!this['_shouldSendUpdate']()||(this[_0x360a('0xbe')](!0x0),!0x1):this['_crash'](_0x360a('0xc1'));}[_0x360a('0x8a')](_0x332566,_0x373ec9,_0x220d36){try{const _0x598c23={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x43c08a,operationsB:_0x228e05,originalOperations:_0x346f70}=_0xa87ae7(_0x332566,this[_0x360a('0x2c')],_0x598c23);Q(_0x43c08a,this['_document']['version']),Q(_0x228e05,_0x373ec9);for(const _0x5a6c94 of _0x43c08a){const _0xb51c17=_0x346f70[_0x360a('0x3')](_0x5a6c94);_0x5a6c94['_authorId']=_0xb51c17?_0xb51c17[_0x360a('0xaa')]:null;}_0x220d36&&(this[_0x360a('0x9a')]['setIdForTheLastOperation'](_0x332566,_0x220d36),this[_0x360a('0xb5')]=_0x220d36),this[_0x360a('0x2c')]=[..._0x228e05],this[_0x360a('0x26')](_0x43c08a),this[_0x360a('0x4a')](_0x332566);}catch(_0x473cd2){return console[_0x360a('0x62')](_0x473cd2),!0x1;}return!0x0;}['_applyOperationsSet'](_0x3db856,_0x3742ca=!0x1){this['editor']['model'][_0x360a('0x74')]({'isUndoable':!0x1,'isLocal':!0x1},_0x586fc1=>{for(const _0x574cf6 of _0x3db856)this[_0x360a('0x9d')][_0x360a('0x22')](_0x574cf6),_0x586fc1['batch'][_0x360a('0x31')](_0x574cf6),this[_0x360a('0x67')][_0x360a('0xbc')][_0x360a('0x89')](_0x574cf6);});}[_0x360a('0x4a')](_0x5e3a9a){_0x5e3a9a[_0x360a('0x23')](_0x3350f4=>{const _0x9bb27=_0x3350f4['clone']();_0x9bb27['_authorId']=_0x3350f4[_0x360a('0xaa')],_0x9bb27[_0x360a('0x8e')]=!!_0x3350f4[_0x360a('0x8e')],_0x9bb27[_0x360a('0x4')]=_0x3350f4[_0x360a('0x4')],_0x9bb27['baseVersion']+=this[_0x360a('0x7d')],_0x3350f4[_0x360a('0x9c')]&&this['_disconnectionOperations'][_0x360a('0x22')](_0x9bb27),this['serverHistory'][_0x360a('0x31')](_0x9bb27);});}[_0x360a('0x58')](_0x4f80cc){const _0x33a501=this[_0x360a('0x67')]['plugins'][_0x360a('0x3')]('Notification'),_0x13c46e=this['editor']['locale'];_0x4f80cc||(_0x4f80cc=_0x5bf011(_0x13c46e,_0x360a('0x5a'))),_0x33a501[_0x360a('0x10')](_0x4f80cc,{'title':_0x5bf011(_0x13c46e,_0x360a('0x51')),'namespace':_0x360a('0x17')}),this[_0x360a('0xa0')]=!0x0,clearTimeout(this[_0x360a('0x6e')]),this[_0x360a('0x2c')]=[],this['editor']['plugins'][_0x360a('0x3')](_0x141363)[_0x360a('0xc9')]();}[_0x360a('0xb7')](){this[_0x360a('0xbb')]||(this[_0x360a('0xbb')]=this[_0x360a('0x67')][_0x360a('0x72')][_0x360a('0x3')](_0x1f5d65)[_0x360a('0x22')](_0x5bf011(this[_0x360a('0x67')][_0x360a('0x78')],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this[_0x360a('0xbb')]&&(this['editor'][_0x360a('0x72')]['get'](_0x1f5d65)[_0x360a('0x46')](this[_0x360a('0xbb')]),this[_0x360a('0xbb')]=null);}[_0x360a('0x1d')](_0x2458e8){const _0x5b201f=_0x2458e8['map'](_0x139b0d=>_0x139b0d[_0x360a('0x63')]());return this[_0x360a('0x83')]['compress'](_0x5b201f);}[_0x360a('0x56')](_0x14c86f,_0x2e10af){return this['_compressor'][_0x360a('0x40')](_0x14c86f)[_0x360a('0x76')]((_0x535895,_0x3de19d)=>{const _0x317269=_0x360a('0x41')==_0x2e10af[_0x3de19d]['type'];if(_0x317269&&'InsertOperation'==_0x535895[_0x360a('0x65')]){const _0x53bc0b=_0x535895[_0x360a('0x3a')]['root'];if(!this[_0x360a('0x6')][_0x360a('0xbf')](_0x53bc0b)){const _0x3675b0=new _0x176dff(_0x53bc0b,_0x360a('0x82'),!0x0,this[_0x360a('0x6')],null);this[_0x360a('0x6')][_0x360a('0xbf')](_0x53bc0b)['_isAttached']=!0x0,this[_0x360a('0x6')]['differ'][_0x360a('0x4c')](_0x3675b0);}}else{if(_0x360a('0x61')==_0x535895[_0x360a('0x65')]&&_0x535895['isAdd']){const _0x2a194c=this[_0x360a('0x6')][_0x360a('0xbf')](_0x535895[_0x360a('0x13')]);_0x2a194c&&_0x2a194c['isAttached']()&&(_0x2a194c[_0x360a('0x4f')]=!0x1);}}const _0x4b79c5=_0xf10a10[_0x360a('0x25')](_0x535895,this[_0x360a('0x6')]);return _0x4b79c5['wasUndone']=_0x535895[_0x360a('0x68')],_0x4b79c5[_0x360a('0x8e')]=_0x317269,_0x4b79c5['_authorId']=_0x317269?null:_0x2e10af[_0x3de19d]['userId'],_0x4b79c5[_0x360a('0x9c')]=_0x360a('0x7f')===_0x2e10af[_0x3de19d][_0x360a('0x5e')],_0x4b79c5[_0x360a('0x4')]=_0x2e10af[_0x3de19d]['createdAt'],_0x4b79c5;});}[_0x360a('0x6d')](){this['_hasSelectionChanged']=!0x0,this[_0x360a('0x27')]()?this[_0x360a('0xbe')]():this[_0x360a('0x99')]=!0x1;}[_0x360a('0x27')](){const _0x3c0ee7=this[_0x360a('0x67')]['plugins'][_0x360a('0x3')](_0x44d56f)['channelSessions'][_0x360a('0x3')](this[_0x360a('0x3e')]);return Boolean(!this[_0x360a('0x67')][_0x360a('0x1')]&&_0x3c0ee7&&_0x3c0ee7['length']>0x1&&this['_hasSelectionChanged']);}[_0x360a('0x8b')](){return this['_bufferedOperations'][_0x360a('0x80')]>0x0||this[_0x360a('0x27')]();}}l['CollaborativeEditingService']=_0x2e98d2;class K extends Error{}function Q(_0x33dda2,_0x205d75){for(const _0x4d7633 of _0x33dda2)_0x4d7633['baseVersion']=_0x205d75++;}class X{constructor(_0x3a631c){this[_0x360a('0xd')]=_0x3a631c,this[_0x360a('0x9e')]=new WeakMap();}[_0x360a('0x37')](_0x4bcc30){let _0x144007=_0x4bcc30[_0x360a('0x80')];for(;_0x144007--;){const _0x290a18=_0x4bcc30[_0x144007];if(!this[_0x360a('0xd')][_0x360a('0x59')](_0x290a18)){if(!this[_0x360a('0x9e')][_0x360a('0x59')](_0x290a18)){const _0x5b0ec9=_0x1fc7fd()[_0x360a('0x5c')](0x1,0x12);this['_operationToId'][_0x360a('0x36')](_0x290a18,_0x5b0ec9);}return this[_0x360a('0x9e')][_0x360a('0x3')](_0x290a18);}}}[_0x360a('0x9')](_0x2d9e8f,_0x2e66f9){if(!_0x2e66f9)return;let _0x1dae7d=_0x2d9e8f[_0x360a('0x80')];for(;_0x1dae7d--;){const _0x3b3290=_0x2d9e8f[_0x1dae7d];this[_0x360a('0xd')]['has'](_0x3b3290)||this['_operationToId'][_0x360a('0x36')](_0x3b3290,_0x2e66f9);}}}
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1ea9=['remove','allConnectedUsers','register','clear','_users','values','_registeredSessions','addUser','set','_handleSessionAdd','connected','getUserSessions','get','state','listenTo','fire','connection','stopListening','delete','sessionAdd:','size','channelConnectedUsers','defineMe','user','Sessions','orderNumber','getUserRole','_handleSessionRemove','_uniqueUsersCount','sessions-register-already-registered','role','plugins','getUserBySessionId','unregister','forEach','requires','add','mySessionId','sessions-unregister-not-exist','channelSessions','context','change:state','has'];(function(_0x41bdf7,_0x1ea9f5){const _0x4d87d2=function(_0x2203cf){while(--_0x2203cf){_0x41bdf7['push'](_0x41bdf7['shift']());}};_0x4d87d2(++_0x1ea9f5);}(_0x1ea9,0x178));const _0x4d87=function(_0x41bdf7,_0x1ea9f5){_0x41bdf7=_0x41bdf7-0x0;let _0x4d87d2=_0x1ea9[_0x41bdf7];return _0x4d87d2;};import{ContextPlugin as _0x195f12}from'ckeditor5/src/core';import{Collection as _0x49db87,CKEditorError as _0x4bf6cd}from'ckeditor5/src/utils';import _0x4f92aa from'./websocketgateway';import{Users as _0x363756}from'ckeditor5-collaboration/src/collaboration-core';export default class r extends _0x195f12{static get['pluginName'](){return _0x4d87('0x23');}static get[_0x4d87('0x3')](){return[_0x4f92aa,_0x363756];}constructor(_0x45e6b1){super(_0x45e6b1),this[_0x4d87('0x7')]=new Map(),this[_0x4d87('0x20')]=new Map(),this[_0x4d87('0xc')]=new _0x49db87(),this[_0x4d87('0x11')]=new Map(),this[_0x4d87('0x27')]=0x0,this[_0x4d87('0xf')]=this['context'][_0x4d87('0x2a')][_0x4d87('0x17')](_0x363756);}['init'](){const _0x5baefe=this['context'][_0x4d87('0x2a')][_0x4d87('0x17')](_0x4f92aa);this[_0x4d87('0x19')](_0x5baefe,_0x4d87('0x9'),(_0x22c314,_0x179c8e,_0x229932)=>{if(_0x4d87('0x15')!==_0x229932)this[_0x4d87('0x7')][_0x4d87('0x2')](_0x8188dd=>_0x8188dd['clear']()),this[_0x4d87('0x20')][_0x4d87('0x2')](_0x91feaf=>_0x91feaf[_0x4d87('0xe')]()),this[_0x4d87('0xc')]['clear']();else for(const [_0xb663e3,_0x31cd39]of this[_0x4d87('0x11')])for(const _0x197ca7 of _0x31cd39)this[_0x4d87('0x14')](_0xb663e3,_0x197ca7);}),this['_createUser'](_0x5baefe[_0x4d87('0x1b')]['me'],!0x0);}[_0x4d87('0xd')](_0x5d3950,_0x3ed163){if(this[_0x4d87('0x11')][_0x4d87('0xa')](_0x5d3950))throw new _0x4bf6cd(_0x4d87('0x28'),null,{'channelId':_0x5d3950});this[_0x4d87('0x11')][_0x4d87('0x13')](_0x5d3950,_0x3ed163),this[_0x4d87('0x7')][_0x4d87('0x13')](_0x5d3950,new _0x49db87()),this[_0x4d87('0x20')][_0x4d87('0x13')](_0x5d3950,new _0x49db87()),this[_0x4d87('0x19')](_0x3ed163,_0x4d87('0x4'),(_0x49b4dc,_0x34763c)=>this['_handleSessionAdd'](_0x5d3950,_0x34763c)),this['listenTo'](_0x3ed163,_0x4d87('0xb'),(_0x55f635,_0x6fdf58)=>this[_0x4d87('0x26')](_0x5d3950,_0x6fdf58));for(const _0x182b1c of _0x3ed163)this[_0x4d87('0x14')](_0x5d3950,_0x182b1c);}[_0x4d87('0x1')](_0x5f1261){if(!this[_0x4d87('0x11')][_0x4d87('0xa')](_0x5f1261))throw new _0x4bf6cd(_0x4d87('0x6'),null,{'channelId':_0x5f1261});const _0x291ce8=this[_0x4d87('0x11')]['get'](_0x5f1261);this[_0x4d87('0x1c')](_0x291ce8);for(const _0x413148 of _0x291ce8)'connected'===this[_0x4d87('0x8')][_0x4d87('0x2a')][_0x4d87('0x17')](_0x4f92aa)[_0x4d87('0x18')]&&this[_0x4d87('0x26')](_0x5f1261,_0x413148);this['_registeredSessions']['delete'](_0x5f1261),this[_0x4d87('0x7')]['delete'](_0x5f1261),this[_0x4d87('0x20')][_0x4d87('0x1d')](_0x5f1261);}get[_0x4d87('0x5')](){return this[_0x4d87('0x8')]['plugins'][_0x4d87('0x17')](_0x4f92aa)[_0x4d87('0x1b')]['sessionId'];}[_0x4d87('0x0')](_0x242b50){for(const _0x3be100 of this[_0x4d87('0x7')]['values']())for(const _0x469170 of _0x3be100)if(_0x469170['id']===_0x242b50)return _0x469170['user'];}[_0x4d87('0x16')](_0x9c4239,_0x53ddc1){const _0x3900bf=_0x53ddc1?[this[_0x4d87('0x7')][_0x4d87('0x17')](_0x53ddc1)]:this[_0x4d87('0x7')][_0x4d87('0x10')](),_0x452170=new Set();for(const _0xd10ce4 of _0x3900bf)for(const _0x7ffbc5 of _0xd10ce4)_0x7ffbc5[_0x4d87('0x22')]['id']===_0x9c4239['id']&&_0x452170[_0x4d87('0x4')](_0x7ffbc5['id']);return _0x452170;}[_0x4d87('0x25')](_0x2bcd20){for(const _0x2ac90f of this['channelSessions']['values']())for(const _0x2f5b67 of _0x2ac90f)if(_0x2f5b67[_0x4d87('0x22')]===_0x2bcd20)return _0x2f5b67[_0x4d87('0x29')];}[_0x4d87('0x14')](_0x55b7bb,_0x1324cd){if(_0x4d87('0x15')!==this[_0x4d87('0x8')][_0x4d87('0x2a')]['get'](_0x4f92aa)[_0x4d87('0x18')])return;const _0x987d57=_0x1324cd[_0x4d87('0x22')],_0x20f233=this['_users']['getUser'](_0x987d57['id'])||this['_createUser'](_0x987d57),_0x7d7e70=Object['assign']({},_0x1324cd,{'user':_0x20f233});this['channelSessions']['get'](_0x55b7bb)[_0x4d87('0x4')](_0x7d7e70);const _0x5ea87d=this[_0x4d87('0x20')][_0x4d87('0x17')](_0x55b7bb);_0x5ea87d[_0x4d87('0xa')](_0x20f233['id'])||_0x5ea87d[_0x4d87('0x4')](_0x20f233),this[_0x4d87('0xc')]['has'](_0x20f233['id'])||this[_0x4d87('0xc')]['add'](_0x20f233),this[_0x4d87('0x1a')](_0x4d87('0x1e')+_0x55b7bb,{'channelId':_0x55b7bb,'session':_0x7d7e70});}[_0x4d87('0x26')](_0x163228,_0x45f99f){if(_0x4d87('0x15')!==this[_0x4d87('0x8')][_0x4d87('0x2a')]['get'](_0x4f92aa)['state'])return;const _0xcbea73=this[_0x4d87('0x20')][_0x4d87('0x17')](_0x163228),_0x257f3c=_0x45f99f[_0x4d87('0x22')];_0x257f3c['id']&&(this[_0x4d87('0x7')][_0x4d87('0x17')](_0x163228)[_0x4d87('0xb')](_0x45f99f['id']),_0xcbea73[_0x4d87('0xa')](_0x257f3c['id'])&&!this[_0x4d87('0x16')](_0x257f3c,_0x163228)[_0x4d87('0x1f')]&&_0xcbea73[_0x4d87('0xb')](_0x257f3c['id']),this[_0x4d87('0xc')][_0x4d87('0x17')](_0x257f3c['id'])&&!this['getUserSessions'](_0x257f3c)[_0x4d87('0x1f')]&&this[_0x4d87('0xc')]['remove'](_0x257f3c['id']));}['_createUser'](_0x24dd73,_0x46ed82){const _0x6c0b65=this[_0x4d87('0xf')][_0x4d87('0x12')](_0x24dd73);return _0x46ed82&&this[_0x4d87('0xf')][_0x4d87('0x21')](_0x24dd73['id']),_0x6c0b65[_0x4d87('0x24')]=this[_0x4d87('0x27')]++,_0x6c0b65;}}
|