@ckeditor/ckeditor5-real-time-collaboration 43.0.0-alpha.5 → 43.0.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/build/real-time-collaboration.js +1 -1
  2. package/dist/index.js +6 -6
  3. package/dist/translations/ar.js +1 -1
  4. package/dist/translations/ar.umd.js +1 -1
  5. package/dist/translations/bg.js +1 -1
  6. package/dist/translations/bg.umd.js +1 -1
  7. package/dist/translations/bn.js +1 -1
  8. package/dist/translations/bn.umd.js +1 -1
  9. package/dist/translations/ca.js +1 -1
  10. package/dist/translations/ca.umd.js +1 -1
  11. package/dist/translations/cs.js +1 -1
  12. package/dist/translations/cs.umd.js +1 -1
  13. package/dist/translations/da.js +1 -1
  14. package/dist/translations/da.umd.js +1 -1
  15. package/dist/translations/de-ch.js +1 -1
  16. package/dist/translations/de-ch.umd.js +1 -1
  17. package/dist/translations/de.js +1 -1
  18. package/dist/translations/de.umd.js +1 -1
  19. package/dist/translations/el.js +1 -1
  20. package/dist/translations/el.umd.js +1 -1
  21. package/dist/translations/en-au.js +1 -1
  22. package/dist/translations/en-au.umd.js +1 -1
  23. package/dist/translations/en.umd.js +1 -1
  24. package/dist/translations/es.js +1 -1
  25. package/dist/translations/es.umd.js +1 -1
  26. package/dist/translations/et.js +1 -1
  27. package/dist/translations/et.umd.js +1 -1
  28. package/dist/translations/fa.js +1 -1
  29. package/dist/translations/fa.umd.js +1 -1
  30. package/dist/translations/fi.js +1 -1
  31. package/dist/translations/fi.umd.js +1 -1
  32. package/dist/translations/fr.js +1 -1
  33. package/dist/translations/fr.umd.js +1 -1
  34. package/dist/translations/gl.js +1 -1
  35. package/dist/translations/gl.umd.js +1 -1
  36. package/dist/translations/he.js +1 -1
  37. package/dist/translations/he.umd.js +1 -1
  38. package/dist/translations/hi.js +1 -1
  39. package/dist/translations/hi.umd.js +1 -1
  40. package/dist/translations/hr.js +1 -1
  41. package/dist/translations/hr.umd.js +1 -1
  42. package/dist/translations/hu.js +1 -1
  43. package/dist/translations/hu.umd.js +1 -1
  44. package/dist/translations/id.js +1 -1
  45. package/dist/translations/id.umd.js +1 -1
  46. package/dist/translations/it.js +1 -1
  47. package/dist/translations/it.umd.js +1 -1
  48. package/dist/translations/ja.js +1 -1
  49. package/dist/translations/ja.umd.js +1 -1
  50. package/dist/translations/ko.js +1 -1
  51. package/dist/translations/ko.umd.js +1 -1
  52. package/dist/translations/lt.js +1 -1
  53. package/dist/translations/lt.umd.js +1 -1
  54. package/dist/translations/lv.js +1 -1
  55. package/dist/translations/lv.umd.js +1 -1
  56. package/dist/translations/ms.js +1 -1
  57. package/dist/translations/ms.umd.js +1 -1
  58. package/dist/translations/nl.js +1 -1
  59. package/dist/translations/nl.umd.js +1 -1
  60. package/dist/translations/no.js +1 -1
  61. package/dist/translations/no.umd.js +1 -1
  62. package/dist/translations/pl.js +1 -1
  63. package/dist/translations/pl.umd.js +1 -1
  64. package/dist/translations/pt-br.js +1 -1
  65. package/dist/translations/pt-br.umd.js +1 -1
  66. package/dist/translations/pt.js +1 -1
  67. package/dist/translations/pt.umd.js +1 -1
  68. package/dist/translations/ro.js +1 -1
  69. package/dist/translations/ro.umd.js +1 -1
  70. package/dist/translations/ru.js +1 -1
  71. package/dist/translations/ru.umd.js +1 -1
  72. package/dist/translations/sk.js +1 -1
  73. package/dist/translations/sk.umd.js +1 -1
  74. package/dist/translations/sr-latn.js +1 -1
  75. package/dist/translations/sr-latn.umd.js +1 -1
  76. package/dist/translations/sr.js +1 -1
  77. package/dist/translations/sr.umd.js +1 -1
  78. package/dist/translations/sv.js +1 -1
  79. package/dist/translations/sv.umd.js +1 -1
  80. package/dist/translations/th.js +1 -1
  81. package/dist/translations/th.umd.js +1 -1
  82. package/dist/translations/tk.js +1 -1
  83. package/dist/translations/tk.umd.js +1 -1
  84. package/dist/translations/tr.js +1 -1
  85. package/dist/translations/tr.umd.js +1 -1
  86. package/dist/translations/uk.js +1 -1
  87. package/dist/translations/uk.umd.js +1 -1
  88. package/dist/translations/vi.js +1 -1
  89. package/dist/translations/vi.umd.js +1 -1
  90. package/dist/translations/zh-cn.js +1 -1
  91. package/dist/translations/zh-cn.umd.js +1 -1
  92. package/dist/translations/zh.js +1 -1
  93. package/dist/translations/zh.umd.js +1 -1
  94. package/package.json +9 -9
  95. package/src/common-translations.js +1 -1
  96. package/src/index.js +1 -1
  97. package/src/presencelist/presencelistui.js +1 -1
  98. package/src/presencelist/view/presencecounterview.js +1 -1
  99. package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
  100. package/src/presencelist/view/presencedropdownlistview.js +1 -1
  101. package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
  102. package/src/presencelist/view/presenceinlinelistview.js +1 -1
  103. package/src/presencelist/view/presencelistview.js +1 -1
  104. package/src/presencelist.js +1 -1
  105. package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
  106. package/src/realtimecollaborativecomments.js +1 -1
  107. package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
  108. package/src/realtimecollaborativeediting/sessions.js +1 -1
  109. package/src/realtimecollaborativeediting/usermarkers.js +1 -1
  110. package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
  111. package/src/realtimecollaborativeediting.js +1 -1
  112. package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
  113. package/src/realtimecollaborativerevisionhistory.js +1 -1
  114. package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
  115. package/src/realtimecollaborativetrackchanges.js +1 -1
package/dist/index.js CHANGED
@@ -20,9 +20,9 @@
20
20
  *
21
21
  *
22
22
  */
23
- import{ContextPlugin as _0xe1b963,Plugin as _0x2ee2ca,PendingActions as _0x4e2f5c,Context as _0x3d1059}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x4e5452,CKEditorError as _0x3a30e9,Collection as _0x415849,global as _0xf2e2b8,version as nt,uid as _0x3af78b,KeystrokeHandler as _0xb491ba}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x1cd31f,View as _0x3c6681,ListView as _0x2c7744,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x1493c9,clickOutsideHandler as _0x3d22bf,BodyCollection as _0x4b5a01}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x6b3e77,NoOperation as _0xe5e198,InsertOperation as _0x145252,MarkerOperation as _0x3e791e,RootAttributeOperation as _0x1572e8,transformSets as _0x451b64,OperationFactory as _0xfc0496}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x6b4045,CollaborativeEditingService as _0x39423a,User as lt,CommentsService as _0x37f16d,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x2458b1,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x56ca35}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x1a7ac0}from'lodash-es';class c extends _0xe1b963{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
- ((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x1cd31f];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x3e7fcd){super(_0x3e7fcd),this['set']('state',_0x6b4045['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x4e5452);}['init'](){const _0x35e63f=this['context'],_0x46620f=_0x35e63f['plugins']['get']('CloudServices'),_0x11378c=_0x35e63f['plugins']['get'](_0x1cd31f);if(!_0x46620f['token'])throw new _0x3a30e9('websocketgateway-missing-token',this);if(!_0x46620f['webSocketUrl'])throw new _0x3a30e9('websocketgateway-missing-websocket-url',this);return this['_domEmitter']['listenTo'](window,'offline',()=>this['_isBrowserOffline']=!0x0),this['_domEmitter']['listenTo'](window,'online',()=>this['_isBrowserOffline']=!0x1),this['context']['config']['define']('cloudServices.connectionTimeout',0xa),this['context']['config']['define']('cloudServices.requestTimeout',0x14),c['WebSocketGateway']['connect'](_0x46620f['token'],_0x46620f['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x83ed90=>{if(this['connection']=_0x83ed90,this['bind']('state')['to'](_0x83ed90,'state',this,'_isBrowserOffline',(_0x64ea5,_0x367543)=>('connected'!==_0x64ea5&&(this['_shouldPluginsReconnect']=!0x0),_0x367543||_0x64ea5!==_0x6b4045['CONNECTED']?_0x6b4045['DISCONNECTED']:this['state']==_0x6b4045['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x6b4045['CONNECTING']):_0x6b4045['CONNECTED'])),this['connection']['on']('error',(_0x3d1b3b,_0x3e79f0)=>{if('limitExceeded'!==_0x3e79f0['code'])throw console['error'](_0x3e79f0),new _0x3a30e9('cloudservices-init',null,{'originalError':_0x3e79f0});_0x11378c['showWarning']('The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.',{'title':'Connected\x20users\x20limit\x20exceeded','namespace':'real-time-collaboration'});}),!_0x83ed90['me'])return new Promise(_0x3845aa=>_0x83ed90['on']('change:me',_0x3845aa));})['catch'](_0x48489b=>{throw console['error'](_0x48489b),new _0x3a30e9('cloudservices-init',null,{'originalError':_0x48489b});});}['addToReconnectionStack'](_0x36b79b){if('function'!=typeof _0x36b79b['reconnect'])throw new _0x3a30e9('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x36b79b))throw new _0x3a30e9('websocketgateway-plugin-already-registered',this,{'name':_0x36b79b['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x36b79b);}['removeFromReconnectionStack'](_0x515c2a){this['_reconnectionStack']['delete'](_0x515c2a);}['isInReconnectionStack'](_0x1dfbbc){return this['_reconnectionStack']['has'](_0x1dfbbc);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x2901f7=>_0x2901f7['reconnect']())))['then'](()=>this['state']=_0x6b4045['CONNECTED'])['catch'](_0x3303b7=>{throw console['error'](_0x3303b7),new _0x3a30e9('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x6b4045['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0xe1b963{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x2458b1];}constructor(_0x32f7cc){super(_0x32f7cc),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x415849(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x2458b1);}['init'](){const _0x493d62=this['context']['plugins']['get'](c);this['listenTo'](_0x493d62,'change:state',(_0x3222be,_0x1e7f62,_0x3f5aa7)=>{if('connected'!==_0x3f5aa7)this['channelSessions']['forEach'](_0x3c7949=>_0x3c7949['clear']()),this['channelConnectedUsers']['forEach'](_0x3be2ae=>_0x3be2ae['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x13844a,_0x476e59]of this['_registeredSessions'])for(const _0x2aff47 of _0x476e59)this['_handleSessionAdd'](_0x13844a,_0x2aff47);}}),this['_createUser'](_0x493d62['connection']['me'],!0x0);}['register'](_0x5b53fd,_0x386952){if(this['_registeredSessions']['has'](_0x5b53fd))throw new _0x3a30e9('sessions-register-already-registered',null,{'channelId':_0x5b53fd});this['_registeredSessions']['set'](_0x5b53fd,_0x386952),this['channelSessions']['set'](_0x5b53fd,new _0x415849()),this['channelConnectedUsers']['set'](_0x5b53fd,new _0x415849()),this['listenTo'](_0x386952,'add',(_0x155770,_0x4f0586)=>this['_handleSessionAdd'](_0x5b53fd,_0x4f0586)),this['listenTo'](_0x386952,'remove',(_0x23ab32,_0x4c3388)=>this['_handleSessionRemove'](_0x5b53fd,_0x4c3388));for(const _0xbe0d7e of _0x386952)this['_handleSessionAdd'](_0x5b53fd,_0xbe0d7e);}['unregister'](_0x102827){if(!this['_registeredSessions']['has'](_0x102827))throw new _0x3a30e9('sessions-unregister-not-exist',null,{'channelId':_0x102827});const _0x3bc0a0=this['_registeredSessions']['get'](_0x102827);this['stopListening'](_0x3bc0a0);for(const _0x16020a of _0x3bc0a0)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x102827,_0x16020a);this['_registeredSessions']['delete'](_0x102827),this['channelSessions']['delete'](_0x102827),this['channelConnectedUsers']['delete'](_0x102827);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x5a9107){for(const _0x4e1bc6 of this['channelSessions']['values']())for(const _0x5297a8 of _0x4e1bc6)if(_0x5297a8['id']===_0x5a9107)return _0x5297a8['user'];}['getUserSessions'](_0x1ff815,_0x2f07c0){const _0x1cc82d=_0x2f07c0?[this['channelSessions']['get'](_0x2f07c0)]:this['channelSessions']['values'](),_0x5e9b93=new Set();for(const _0x329315 of _0x1cc82d)for(const _0x5b823e of _0x329315)_0x5b823e['user']['id']===_0x1ff815['id']&&_0x5e9b93['add'](_0x5b823e['id']);return _0x5e9b93;}['getUserRole'](_0x27a3bd){for(const _0x43d5c4 of this['channelSessions']['values']())for(const _0x2f758c of _0x43d5c4)if(_0x2f758c['user']===_0x27a3bd)return _0x2f758c['role'];}['_handleSessionAdd'](_0x356c81,_0x240be9){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x588bba=_0x240be9['user'],_0x51e653=this['_users']['getUser'](_0x588bba['id'])||this['_createUser'](_0x588bba),_0x288050=Object['assign']({},_0x240be9,{'user':_0x51e653});this['channelSessions']['get'](_0x356c81)['add'](_0x288050);const _0x1f4ed2=this['channelConnectedUsers']['get'](_0x356c81);_0x1f4ed2['has'](_0x51e653['id'])||_0x1f4ed2['add'](_0x51e653),this['allConnectedUsers']['has'](_0x51e653['id'])||this['allConnectedUsers']['add'](_0x51e653,_0x51e653['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x356c81,{'channelId':_0x356c81,'session':_0x288050});}['_handleSessionRemove'](_0x76be7f,_0x40f6a9){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x4d1342=this['channelConnectedUsers']['get'](_0x76be7f),_0x29f954=_0x40f6a9['user'];_0x29f954['id']&&(this['channelSessions']['get'](_0x76be7f)['remove'](_0x40f6a9['id']),_0x4d1342['has'](_0x29f954['id'])&&!this['getUserSessions'](_0x29f954,_0x76be7f)['size']&&_0x4d1342['remove'](_0x29f954['id']),this['allConnectedUsers']['get'](_0x29f954['id'])&&!this['getUserSessions'](_0x29f954)['size']&&this['allConnectedUsers']['remove'](_0x29f954['id']));}['_createUser'](_0x471414,_0x271df0){const _0x2971ee=this['_users']['addUser'](_0x471414);return _0x271df0&&this['_users']['defineMe'](_0x471414['id']),_0x2971ee['orderNumber']=this['_uniqueUsersCount']++,_0x2971ee;}}class H extends _0x2ee2ca{['_domEmitter']=new(_0x4e5452())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x42945e=this['editor'],_0x59de00=_0x42945e['plugins']['get'](r);_0x42945e['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0xbf6cbf,{writer:_0x28940a})=>function(_0x14ee17,_0x2df4ad,_0x5f53c0,_0x25a06c){const _0x1a2f68=_0x14ee17['markerName']['split'](':')[0x2],_0x3f4076=_0x5f53c0['getUserBySessionId'](_0x1a2f68);if(!_0x3f4076||_0x1a2f68===_0x5f53c0['mySessionId'])return;if(!_0x25a06c['model']['schema']['checkChild'](_0x14ee17['markerRange']['start'],'$text'))return;const _0x146616={'class':'ck-user__marker\x20'+_0x3f4076['color']['getMarkerClass'](),'data-name':_0x3f4076['name'],'data-session-id':_0x1a2f68},_0x2ba0b0=_0x25a06c['model']['markers']['get'](_0x14ee17['markerName']),_0x290eab=_0x2ba0b0['getStart'](),_0xf4300=_0x290eab['nodeAfter'],_0x2ab189=_0x25a06c['model']['schema'];if(_0xf4300&&_0x2ab189['isObject'](_0xf4300)&&_0x2ab189['isInline'](_0xf4300)&&!_0x25a06c['model']['markers']['get']('user:range:'+_0x1a2f68)['getRange']()['isCollapsed'])return;const _0x3b7e85=_0x290eab['parent'];return _0x25a06c['model']['schema']['isLimit'](_0x3b7e85)&&!_0x25a06c['model']['hasContent'](_0x3b7e85)&&(_0x146616['contenteditable']=!0x1),function(_0x406d63,_0xaaf43f,_0x2128c6){const _0x3b5baf=_0x406d63['createUIElement']('span',_0xaaf43f);return _0x406d63['setCustomProperty']('userPositionMarker',!0x0,_0x3b5baf),_0x3b5baf['render']=function(_0x373aa2){const _0x2be304=this['toDomElement'](_0x373aa2);return _0x2be304['innerHTML']='⁠<span\x20class=\x22ck-user__marker-line\x22\x20contenteditable=\x22false\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span><span\x20class=\x22ck-user__marker-tooltip\x22\x20contenteditable=\x22false\x22\x20spellcheck=\x22false\x22>'+_0x2128c6['name']+'</span>⁠',_0x2be304['addEventListener']('mouseenter',()=>{_0x2be304['classList']['add']('ck-user__marker_hovered');}),_0x2be304['addEventListener']('mouseleave',()=>{_0x2be304['classList']['remove']('ck-user__marker_hovered');}),_0x2be304;},_0x3b5baf['isSimilar']=function(_0x564444){return!(!this['getCustomProperty']('userPositionMarker')||!_0x564444['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x564444['getAttribute']('data-session-id'));},_0x3b5baf;}(_0x2df4ad,_0x146616,_0x3f4076);}(_0xbf6cbf,_0x28940a,_0x59de00,_0x42945e)}),_0x42945e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x780599=>function(_0x41d64c,_0x5a9f00){const _0x43c0b4=_0x41d64c['markerName']['split'](':')[0x2];if(_0x43c0b4===_0x5a9f00['mySessionId'])return null;const _0x466ff7=_0x5a9f00['getUserBySessionId'](_0x43c0b4);if(!_0x466ff7)return{'id':_0x43c0b4,'classes':[]};return{'id':_0x43c0b4,'classes':['ck-user__selection',_0x466ff7['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x43c0b4},'priority':0x7d0+_0x466ff7['orderNumber']};}(_0x780599,_0x59de00)}),function(_0x176bb8){const _0x337609=_0x176bb8['model'],_0x2469d8=new Map(),_0x3122ac=_0x176bb8['plugins']['get'](r);_0x337609['markers']['on']('update:user:range',(_0x3c12e3,_0x5ef6a1,_0x428e2b,_0x2d17fb)=>{if(!_0x2d17fb&&_0x2469d8['get'](_0x5ef6a1['name']))return _0x2469d8['get'](_0x5ef6a1['name'])['detach'](),void _0x2469d8['delete'](_0x5ef6a1['name']);const _0x52559c=_0x5ef6a1['name']['split'](':')[0x2];if(_0x52559c===_0x3122ac['mySessionId'])return;const _0xa7389e='user:position:'+_0x52559c;_0x337609['markers']['has'](_0xa7389e)&&_0x176bb8['editing']['reconvertMarker'](_0xa7389e),_0x5ef6a1['on']('change:range',(_0x1b6039,_0x4bd466,_0x4a917e)=>{if('$graveyard'!=_0x4bd466['root']['rootName']&&'$graveyard'==_0x5ef6a1['getRange']()['root']['rootName']&&!_0x2469d8['has'](_0x5ef6a1['name'])){const _0x1ba012=_0x337609['schema']['getNearestSelectionRange'](_0x4a917e['deletionPosition']);if(_0x1ba012){const _0x1e664b=ht['fromRange'](_0x1ba012);_0x2469d8['set'](_0x5ef6a1['name'],_0x1e664b),_0x1e664b['on']('change:range',(_0x2edd94,_0xe72302,_0x302243)=>{if('$graveyard'==_0x1e664b['root']['rootName']){const _0x391992=_0x337609['schema']['getNearestSelectionRange'](_0x302243['deletionPosition']);_0x391992?(_0x1e664b['start']=_0x391992['start'],_0x1e664b['end']=_0x391992['end']):(_0x2469d8['delete'](_0x5ef6a1['name']),_0x1e664b['detach']());}});}}});}),_0x337609['document']['on']('change',()=>{_0x2469d8['size']>0x0&&_0x337609['enqueueChange']({'isUndoable':!0x1},_0x1c5886=>{for(const [_0x26742a,_0x4c01ae]of _0x2469d8)'$graveyard'==_0x337609['markers']['get'](_0x26742a)['getRange']()['root']['rootName']&&(re(_0x26742a['split'](':')[0x2],_0x4c01ae['toRange'](),_0x337609,_0x1c5886),_0x4c01ae['detach']());_0x2469d8['clear']();});});}(_0x42945e),this['_domEmitter']['listenTo'](_0xf2e2b8['document'],'keydown',(_0x1f2135,{key:_0x3d32cf})=>{'Escape'===_0x3d32cf&&function(_0x132516){_0x132516['editing']['view']['change'](_0x58944f=>{for(const _0x7e5170 of _0x132516['model']['markers']){if(!_0x7e5170['name']['startsWith']('user:position'))continue;const _0x5e2b34=_0x132516['editing']['mapper']['markerNameToElements'](_0x7e5170['name']);if(_0x5e2b34){for(const _0x4dbbbb of _0x5e2b34)_0x58944f['removeClass']('ck-user__marker_hovered',_0x4dbbbb);}}});}(_0x42945e);},{'useCapture':!0x0});}['afterInit'](){const _0x30aaf0=this['editor'],_0xc9770f=_0x30aaf0['commands']['get']('undo');_0xc9770f&&_0x30aaf0['model']['on']('applyOperation',(_0x243f93,_0xadda47)=>{const _0x442ab3=_0xadda47[0x0];if('marker'!=_0x442ab3['type']||!_0x442ab3['name']['startsWith']('user:'))return;const _0x2f8841=_0x442ab3['batch'];_0xc9770f['_createdBatches']['has'](_0x2f8841)&&(_0x442ab3['newRange']=_0x442ab3['oldRange']?_0x30aaf0['model']['createRange'](_0x442ab3['oldRange']['start'],_0x442ab3['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x1e6a20=this['editor'],_0x1439ce=_0x1e6a20['model']['document'],_0x189e46=_0x1e6a20['plugins']['get'](r);_0x1e6a20['model']['enqueueChange']({'isUndoable':!0x1},_0x57eb48=>{const _0x3a7e12='user:range:'+_0x189e46['mySessionId'],_0xe8fe53='user:position:'+_0x189e46['mySessionId'],_0x17ddce=_0x1e6a20['model']['markers']['has'](_0x3a7e12);_0x1e6a20['editing']['view']['hasDomSelection']?re(_0x189e46['mySessionId'],_0x1439ce['selection']['getFirstRange'](),_0x1e6a20['model'],_0x57eb48):_0x17ddce&&(_0x57eb48['removeMarker'](_0x3a7e12),_0x57eb48['removeMarker'](_0xe8fe53));});}}function re(_0x11fc9f,_0x4c9a9d,_0xae457d,_0xe649cb){const _0x7f83c6='user:range:'+_0x11fc9f,_0x2f7c64='user:position:'+_0x11fc9f,_0xaaf71c=_0x4c9a9d['getContainedElement']();let _0xc6e5c7=_0x4c9a9d['start'];_0xaaf71c&&_0xaaf71c['is']('element','tableCell')&&(_0xc6e5c7=function(_0x2d63c1,_0x143d5a){for(const _0x2562e9 of _0x2d63c1['getPositions']())if(_0x143d5a['schema']['checkChild'](_0x2562e9,'$text'))return _0x2562e9;}(_0x4c9a9d,_0xae457d),_0x4c9a9d=_0xe649cb['createRange'](_0xc6e5c7));const _0x1e803d=_0xe649cb['createRange'](_0xc6e5c7);_0xae457d['markers']['has'](_0x7f83c6)?(_0xe649cb['updateMarker'](_0x7f83c6,{'range':_0x4c9a9d}),_0xe649cb['updateMarker'](_0x2f7c64,{'range':_0x1e803d})):(_0xe649cb['addMarker'](_0x7f83c6,{'range':_0x4c9a9d,'usingOperation':!0x0}),_0xe649cb['addMarker'](_0x2f7c64,{'range':_0x1e803d,'usingOperation':!0x0}));}function q(_0x1d021c,_0x183566,_0x13b44f){const t=_0x1d021c['t'];switch(_0x183566){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'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');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'},_0x13b44f);default:return'';}}let K=0x1;class l extends _0x2ee2ca{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
- ((()=>_0x39423a)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,H,_0x4e2f5c,_0x2458b1,_0x1cd31f];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x282fa4=this['serverHistory']['getOperations']();for(let _0x5f0cde=_0x282fa4['length']-0x1;_0x5f0cde>=0x0;_0x5f0cde--){const _0x52e0d1=_0x282fa4[_0x5f0cde];if(!this['_disconnectionOperations']['has'](_0x52e0d1))return _0x52e0d1['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x5efad6){if(super(_0x5efad6),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x6b3e77(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x3a30e9('collaboration-missing-channelid',this);const _0x49908d=_0x5efad6['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x49908d,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x56ca35(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new X(this['_disconnectionOperations']);}['init'](){const _0x2a7d49=this['editor'],_0x21f382=_0x2a7d49['plugins']['get'](_0x2458b1),_0xd16985=_0x2a7d49['plugins']['get'](c);this['listenTo'](_0x21f382,'getOperationAuthor',(_0x7be51c,_0x542eb3)=>{const _0x3891bd=_0x542eb3[0x0];_0x3891bd['_authorId']&&(_0x7be51c['return']=_0x21f382['getUser'](_0x3891bd['_authorId']),_0x7be51c['stop']()),null===_0x3891bd['_authorId']&&(_0x7be51c['return']=null,_0x7be51c['stop']());},{'priority':'high'}),this['listenTo'](_0x2a7d49['model']['document']['selection'],'change:range',(_0x3d5695,_0x40adc2)=>{_0x40adc2['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x2a7d49['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x2a7d49['model']['on']('applyOperation',(_0x349615,_0x38c1e4)=>{const _0x2a3b8c=_0x38c1e4[0x0];_0x2a3b8c['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x2a3b8c),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0xd16985,'state',this,'_hasSynchronizationProblem',(_0x573e44,_0x35b81c)=>'connected'===_0x573e44&&!_0x35b81c),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x2a7d49['disableReadOnlyMode']('rtc-offline'):_0x2a7d49['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x2a7d49['disableReadOnlyMode']('rtc-offline'):_0x2a7d49['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x2c148b=this['editor']['plugins']['get'](r),_0x159c4a=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x2c148b['unregister'](this['_channelId']);const _0x1f1e34=await this['_service']['reconnect'](_0x159c4a['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x1f1e34)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0xb73a52=await this['_service']['getConnectedSessions']();_0x2c148b['register'](this['_channelId'],_0xb73a52),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x4e32bb){if(function(_0x6cf26d){return'404'===_0x6cf26d['code'];}(_0x4e32bb)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x2d6c88){return'409'===_0x2d6c88['code'];}(_0x4e32bb)){const _0x263ef6=q(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x263ef6);}else{if(!(_0x4e32bb instanceof J))throw _0x4e32bb;this['_handleReconnectionError']();}}}}['destroy'](){const _0x5b0cb3=this['editor']['plugins']['get'](c),_0x1f2c63=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x1f2c63['channelSessions']['has'](this['_channelId'])&&_0x1f2c63['unregister'](this['_channelId']),_0x5b0cb3['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x2585ac){if(this['sessionId']!==_0x2585ac['sessionId']&&this['_lastSyncedOperationId']!==_0x2585ac['lastOperationId'])throw new J();return this['sessionId']=_0x2585ac['sessionId'],this['_handleServerResponse']([],{..._0x2585ac,'wereChangesApplied':!0x1,'data':_0x2585ac['data']},'reconnect');}async['_connectService'](_0x5e1091,_0x2714e1=!0x1){const {connection:_0x245dc9}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x245dc9,this['_channelId'])['then'](_0x37445e=>this['_initSessionsHandling'](_0x37445e))['catch'](_0x1267ac=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x1267ac);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x4a347f,_0x48499b)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x48499b);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x1fedb0=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x5e1091);this['_isPendingUpdate']=!0x0;const _0x2eadb3=await this['_service']['connect'](_0x245dc9,this['_compressOperations'](_0x5e1091),_0x1fedb0);if(this['sessionId']=_0x2eadb3['sessionId'],_0x2714e1){if(!_0x2eadb3['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x2eadb3['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x5e1091,_0x2eadb3,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x2eadb3,_0x5e1091);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x24163c=this['editor']['plugins']['get'](r),_0x44b3ff=this['editor']['plugins']['get'](H),_0x489503=_0x24163c['channelSessions']['get'](this['_channelId']);_0x489503&&_0x489503['length']>0x1?_0x44b3ff['createUserMarkerOperations']():this['listenTo'](_0x24163c,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x24163c['channelSessions']['get'](this['_channelId'])['length']&&_0x44b3ff['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x4d4aa8,_0x5b5263,_0x4cba10,_0x311569){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x5b5263){const _0xfbad41=this['_decompressOperations'](_0x4cba10,_0x311569);await this['_fetchMissingUsers'](_0xfbad41),this['_handleExternalOperations'](_0xfbad41,_0x5b5263,_0x4cba10['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x2a594b}=this['editor'];let _0x1c7d8f;try{_0x1c7d8f=await this['_service']['getDocumentDetails']();}catch(_0x38cdef){const _0x44749c=q(_0x2a594b,'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['_handleReconnectionError'](_0x44749c);}const _0x43915c=_0x1c7d8f['currentDocumentSession']||_0x1c7d8f['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x43915c['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x3a5605=q(_0x2a594b,'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.');this['_handleReconnectionError'](_0x3a5605);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x595fd7){const _0x3d98b5=this['editor']['plugins']['get'](r);this['listenTo'](_0x3d98b5,'sessionAdd:'+this['_channelId'],(_0x2e3055,{session:_0x5a7a2b})=>{if(_0x5a7a2b['id']===_0x3d98b5['mySessionId']){_0x2e3055['off']();const _0x12af69=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0xfc740d=_0x5a7a2b['permissions'];_0x12af69&&_0x12af69['isEnabled']&&(_0xfc740d=_0xfc740d['filter'](_0x33b1be=>'document:write'!==_0x33b1be)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0xfc740d,this['_channelId']);}}),_0x3d98b5['register'](this['_channelId'],_0x595fd7);}['_initThrowingOnDataSet'](){const _0x24494f=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x31763f)=>{if(!_0x31763f[_0x31763f['length']-0x1]['suppressErrorInCollaboration'])throw new _0x3a30e9('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x24494f['apply'](this['editor']['data'],_0x31763f);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x2c7afc,[_0x398590])=>{if(this['_document']['version'])throw new _0x3a30e9('realtimecollaborationclient-init-document-already-initialized',this);_0x2c7afc['stop'](),this['_setPendingAction']();const _0x4a13a7=this['editor']['config']['get']('rootsAttributes'),_0x457c55=this['_getOperationsFromInitData'](_0x398590,_0x4a13a7);0x0==_0x457c55['length']&&_0x457c55['push'](new _0xe5e198(0x0)),_0x2c7afc['return']=this['_connectService'](_0x457c55)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x12a4e9=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x12a4e9))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x9bc078,[_0xacb5da,_0x5d421f])=>{_0x9bc078['stop']();const _0x433dc0=this['editor']['model']['document']['getRoot'](_0xacb5da);if(!this['_knownRootNames']['has'](_0xacb5da)){const _0x34a0e4=_0x5d421f&&_0x5d421f['data']?_0x5d421f['data']:'',_0x33890d=_0x5d421f&&_0x5d421f['attributes']?_0x5d421f['attributes']:{};await this['_loadRoot'](_0xacb5da,_0x34a0e4,_0x33890d);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x433dc0['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x433dc0);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x25fb78){const _0x2b28a6=this['editor']['plugins']['get'](_0x2458b1),{connection:_0x127ef0}=this['editor']['plugins']['get'](c),_0x517df7=new Set();for(const _0x390631 of _0x25fb78){const _0x39b757=_0x390631['_authorId'];_0x39b757&&!_0x2b28a6['getUser'](_0x39b757)&&_0x517df7['add'](_0x39b757);}if(0x0===_0x517df7['size'])return;const _0x5af2b3=await lt['getMany'](_0x127ef0,Array['from'](_0x517df7));for(const _0x289622 of _0x5af2b3)_0x2b28a6['getUser'](_0x289622['id'])||_0x2b28a6['addUser'](_0x289622);}['_getOperationsFromInitData'](_0x30a200,_0x1175f4={}){const _0x376aeb=this['editor']['model'],_0xf6b948=[];let _0x2fbc7e=0x0;const _0x5da453='string'==typeof _0x30a200?{'main':_0x30a200}:_0x30a200;for(const _0x27ac5e of Object['keys'](_0x5da453)){if(!this['_document']['roots']['has'](_0x27ac5e))throw new _0x3a30e9('realtimecollaborationclient-init-non-existent-root',this);const _0x2caa17=this['editor']['data']['parse'](_0x5da453[_0x27ac5e]),_0x3d661a=this['_document']['getRoot'](_0x27ac5e),_0x5ae64b=new _0x145252(_0x376aeb['createPositionAt'](_0x3d661a,0x0),_0x2caa17,_0x2fbc7e++);_0xf6b948['push'](_0x5ae64b);for(const [_0x4e128f,_0x469a66]of _0x2caa17['markers']){const _0x5a08f1=_0x376aeb['createRange'](_0x376aeb['createPositionFromPath'](_0x3d661a,_0x469a66['start']['path']['slice']()),_0x376aeb['createPositionFromPath'](_0x3d661a,_0x469a66['end']['path']['slice']())),_0x7575bc=new _0x3e791e(_0x4e128f,null,_0x5a08f1,_0x376aeb['markers'],!0x0,_0x2fbc7e++);_0xf6b948['push'](_0x7575bc);}}if(_0x1175f4)for(const [_0x4075f9,_0x3c0135]of Object['entries'](_0x1175f4)){const _0x199d13=_0x376aeb['document']['getRoot'](_0x4075f9);if(!_0x199d13)throw new _0x3a30e9('multi-root-editor-root-attributes-no-root',null);for(const [_0x549414,_0x485bf5]of Object['entries'](_0x3c0135))if(null!==_0x485bf5){const _0x285e6a=new _0x1572e8(_0x199d13,_0x549414,null,_0x485bf5,_0x2fbc7e++);_0xf6b948['push'](_0x285e6a);}}return _0xf6b948;}async['_loadRoot'](_0x51d84f,_0x22c963,_0x13f6f9){this['_getOperationsFromInitData']({[_0x51d84f]:_0x22c963},{[_0x51d84f]:_0x13f6f9})['forEach']((_0x2ae1c3,_0xc375cb)=>{_0x2ae1c3['baseVersion']=this['_document']['version']+_0xc375cb,_0x2ae1c3['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x2ae1c3);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x341207,_0x4a9a47){let _0x43bf15;this['_offset']=_0x341207['offset'];const _0x4912da=_0x341207['wereChangesApplied']&&!_0x341207['initData'],_0x39d6a9=_0x4912da?0x0:_0x341207['data']['baseVersion'];if(_0x4a9a47['forEach'](_0x447262=>{_0x447262['_isInit']=!0x0,_0x447262['createdAt']=_0x341207['sessionCreatedAt'],_0x447262['_authorId']=null;}),_0x4912da)_0x43bf15=_0x4a9a47,this['_applyOperationsSet'](_0x43bf15,_0x4912da);else{if(_0x341207['initData']){const _0x3d8797=this['_getOperationsFromInitData'](_0x341207['initData']);this['_document']['history']['version']=-_0x3d8797['length'],_0x3d8797['forEach'](_0x2c98f1=>{_0x2c98f1['baseVersion']-=_0x3d8797['length'],_0x2c98f1['createdAt']=_0x341207['sessionCreatedAt'],_0x2c98f1['_isInit']=!0x0,_0x2c98f1['_authorId']=null;}),this['_applyOperationsSet'](_0x3d8797,!0x0),this['serverHistory']['version']=-_0x3d8797['length']+this['_offset'],this['_updateServerHistory'](_0x3d8797);}this['_document']['history']['version']=_0x39d6a9,_0x43bf15=this['_decompressOperations'](_0x341207['data'],_0x341207['metadata']),await this['_fetchMissingUsers'](_0x43bf15),this['_applyOperationsSet'](_0x43bf15,_0x4912da);}_0x341207['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x43bf15,_0x341207['lastOperationId']),this['_lastSyncedOperationId']=_0x341207['lastOperationId']),this['serverHistory']['version']=_0x39d6a9+this['_offset'],this['_updateServerHistory'](_0x43bf15),_0x4a9a47['filter'](_0x3ca1a2=>{const _0x220743=this['_getAffectedRoot'](_0x3ca1a2);return _0x220743&&!this['_knownRootNames']['has'](_0x220743);})['forEach']((_0x209e20,_0x181741)=>{_0x209e20['baseVersion']=this['_document']['version']+_0x181741,this['_saveOperationInBuffer'](_0x209e20);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x5515e9,_0x1ea628){throw this['_isPendingUpdate']=!0x0,_0x1ea628&&console['error'](_0x1ea628),new _0x3a30e9(_0x5515e9,this['editor']);}['_saveOperationInBuffer'](_0x3b23e8){this['_knownOperations']['has'](_0x3b23e8)||(this['_knownOperations']['add'](_0x3b23e8),this['_bufferedOperations']['push'](_0x3b23e8),this['_pendingAction']||'marker'==_0x3b23e8['type']&&!_0x3b23e8['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x1c92e0=!0x1){!_0x1c92e0&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x2dc78f=>{_0x2dc78f&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x2b441f=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x23f273){return _0x23f273['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x23f273['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x23f273['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x2b441f))throw _0x2b441f;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x3f919c=>{this['on']('change:_isPendingUpdate',()=>{_0x3f919c();});});}async['_sendBufferedOperations'](){const _0xee5cb6=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0xee5cb6['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x24717d=[...this['_bufferedOperations']];for(const _0x3f5a8a of _0x24717d)_0x3f5a8a['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x3f5a8a);const _0x2ae12a=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x24717d),_0x210b76=K++,_0x5b0fa7=this['_compressOperations'](_0x24717d),_0x1dae46=await this['_service']['sendOperations'](_0x5b0fa7,_0x5b0fa7['baseVersion'],_0x2ae12a);try{return await this['_handleServerResponse'](_0x24717d,_0x1dae46,_0x210b76);}catch(_0x5907ea){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x5907ea);}}async['_handleServerResponse'](_0x5eaf4b,_0x285dcf,_0x48d0ba){if('error'in _0x285dcf)throw _0x285dcf['error'];let _0x73e1c=!0x1;if(_0x285dcf['wereChangesApplied']){_0x285dcf['lastOperationId']&&(this['_lastSyncedOperationId']=_0x285dcf['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x548c47=>!_0x5eaf4b['includes'](_0x548c47));for(const _0x3f2bff of _0x5eaf4b)_0x3f2bff['createdAt']='lastOperationAcceptedAt'in _0x285dcf&&_0x285dcf['lastOperationAcceptedAt']||void 0x0;Q(_0x5eaf4b,_0x285dcf['version']-_0x5eaf4b['length']),this['_updateServerHistory'](_0x5eaf4b);const _0xb918e3=_0x5eaf4b['filter'](_0x4779ea=>{if(!_0x4779ea['_isInit'])return!0x1;const _0x42aab0=this['_getAffectedRoot'](_0x4779ea);return _0x42aab0&&!this['_knownRootNames']['has'](_0x42aab0);});Q(_0xb918e3,this['_document']['version']),this['_applyOperationsSet'](_0xb918e3),_0x73e1c=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x5d4583=this['_decompressOperations'](_0x285dcf['data'],_0x285dcf['metadata'])['filter'](_0x348337=>_0x348337['baseVersion']>=this['_lastServerVersion']);_0x5d4583['forEach'](_0x5e428c=>this['_addKnownRoot'](_0x5e428c)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x71fd9e=>!_0x71fd9e['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x71fd9e))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x5d4583),_0x73e1c=this['_handleExternalOperations'](_0x5d4583,_0x285dcf['version'],_0x285dcf['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x73e1c?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x4bacab,_0x260044,_0x5f2b83){try{const _0x3084b8={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x258e37,operationsB:_0x3cdead,originalOperations:_0x411ccb}=_0x451b64(_0x4bacab,this['_bufferedOperations'],_0x3084b8);Q(_0x258e37,this['_document']['version']),Q(_0x3cdead,_0x260044);for(const _0x3042d4 of _0x258e37){const _0x37baf6=_0x411ccb['get'](_0x3042d4);_0x3042d4['_authorId']=_0x37baf6?_0x37baf6['_authorId']:null;}_0x5f2b83&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x4bacab,_0x5f2b83),this['_lastSyncedOperationId']=_0x5f2b83),this['_bufferedOperations']=[..._0x3cdead],this['_applyOperationsSet'](_0x258e37),this['_updateServerHistory'](_0x4bacab);}catch(_0xc4425a){return console['error'](_0xc4425a),!0x1;}return!0x0;}['_applyOperationsSet'](_0x3a8dc1,_0x380fcf=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x37f7ab=>{for(const _0x37b6b4 of _0x3a8dc1)this['_knownOperations']['add'](_0x37b6b4),this['_addKnownRoot'](_0x37b6b4),_0x37f7ab['batch']['addOperation'](_0x37b6b4),this['editor']['model']['applyOperation'](_0x37b6b4);});}['_addKnownRoot'](_0x41f9d0){const _0x4515ea=this['_getAffectedRoot'](_0x41f9d0);_0x4515ea&&this['_knownRootNames']['add'](_0x4515ea);}['_getAffectedRoot'](_0x15ce7d){let _0x31d241,_0x3ddce4;switch(_0x15ce7d['type']){case'insert':_0x31d241=_0x15ce7d['position']['root'];break;case'marker':if(_0x3ddce4=_0x15ce7d['newRange'],!_0x3ddce4)return null;_0x31d241=_0x3ddce4['root'];break;case'addRootAttribute':_0x31d241=_0x15ce7d['root'];break;case'addRoot':_0x31d241=_0x15ce7d['affectedSelectable'];break;case'move':_0x31d241=_0x15ce7d['targetPosition']['root'];break;default:return null;}return _0x31d241['rootName'];}['_updateServerHistory'](_0x3c2290){_0x3c2290['forEach'](_0x50df48=>{const _0x3b048c=_0x50df48['clone']();_0x3b048c['_authorId']=_0x50df48['_authorId'],_0x3b048c['_isInit']=!!_0x50df48['_isInit'],_0x3b048c['createdAt']=_0x50df48['createdAt'],_0x3b048c['baseVersion']+=this['_offset'],_0x50df48['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x3b048c),this['serverHistory']['addOperation'](_0x3b048c);});}['_handleReconnectionError'](_0x69f136){const _0x26d5f3=this['editor']['plugins']['get']('Notification'),_0x386b87=this['editor']['locale'];_0x69f136||(_0x69f136=q(_0x386b87,'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.')),_0x26d5f3['showWarning'](_0x69f136,{'title':q(_0x386b87,'Synchronization\x20issue'),'namespace':'real-time-collaboration'}),this['_hasSynchronizationProblem']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_bufferedOperations']=[],this['editor']['plugins']['get'](c)['destroy']();}['_setPendingAction'](){this['_pendingAction']||(this['_pendingAction']=this['editor']['plugins']['get'](_0x4e2f5c)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x4e2f5c)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x29b60d){const _0xf824b6=_0x29b60d['map'](_0x2c411f=>_0x2c411f['toJSON']());return this['_compressor']['compress'](_0xf824b6);}['_decompressOperations'](_0x535e84,_0x3500b5){return this['_compressor']['decompress'](_0x535e84)['map']((_0x25186c,_0x4f3a58)=>{const _0x407f6a='init'==_0x3500b5[_0x4f3a58]['type'];if('InsertOperation'==_0x25186c['__className']){const _0x3d8b93=_0x25186c['position']['root'];!this['_document']['getRoot'](_0x3d8b93)&&(this['_document']['createRoot']('$root',_0x3d8b93)['_isAttached']=!0x1);}const _0x2f29a4=_0xfc0496['fromJSON'](_0x25186c,this['_document']);return _0x2f29a4['wasUndone']=_0x25186c['wasUndone'],_0x2f29a4['_isInit']=_0x407f6a,_0x2f29a4['_authorId']=_0x407f6a?null:_0x3500b5[_0x4f3a58]['userId'],_0x2f29a4['_isDisconnection']='cs:removeUser'===_0x3500b5[_0x4f3a58]['type'],_0x2f29a4['createdAt']=_0x3500b5[_0x4f3a58]['createdAt'],_0x2f29a4;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0xbd9fed=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0xbd9fed&&_0xbd9fed['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0xeb55b9,_0x310c1c){for(const _0x24e48d of _0xeb55b9)_0x24e48d['baseVersion']=_0x310c1c++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x482b1f){this['_ignoredOperations']=_0x482b1f,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x3151da){let _0x352ba0=_0x3151da['length'];for(;_0x352ba0--;){const _0xfa7d78=_0x3151da[_0x352ba0];if(!this['_ignoredOperations']['has'](_0xfa7d78)){if(!this['_operationToId']['has'](_0xfa7d78)){const _0x3c735b=_0x3af78b()['slice'](0x1,0x12);this['_operationToId']['set'](_0xfa7d78,_0x3c735b);}return this['_operationToId']['get'](_0xfa7d78);}}}['setIdForTheLastOperation'](_0x2f8a8e,_0x4607cf){if(!_0x4607cf)return;let _0x28e276=_0x2f8a8e['length'];for(;_0x28e276--;){const _0x5527ba=_0x2f8a8e[_0x28e276];this['_ignoredOperations']['has'](_0x5527ba)||this['_operationToId']['set'](_0x5527ba,_0x4607cf);}}}class n extends _0x2ee2ca{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0xe1b963{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
- ((()=>_0x37f16d)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x2458b1];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x15a238){super(_0x15a238),this['_services']=new Map();}async['init'](){const _0x49d494=this['context'],_0xf8d9e5=_0x49d494['plugins']['get']('CommentsRepository');if(_0x49d494['plugins']['get'](c)['addToReconnectionStack'](this),_0xf8d9e5['adapter']={'addCommentThread':async({channelId:_0x4b03cd,threadId:_0x338da2,comments:_0x251ed1,resolvedAt:_0x13aa27,resolvedBy:_0x19eb20,context:_0x5c5ac6,attributes:_0x4a7ea2})=>{const _0x12b5a0=await this['_getService'](_0x4b03cd)['addCommentThread']({'commentThreadId':_0x338da2,'comments':_0x251ed1['map'](_0x3d1923=>function(_0x16c0fa,_0x3ce639,_0x22fa34){return{'commentThreadId':_0x22fa34,'commentId':_0x16c0fa['commentId'],'userId':_0x16c0fa['authorId'],'content':_0x16c0fa['content'],'documentId':_0x3ce639,'createdAt':_0x16c0fa['createdAt'],'attributes':_0x16c0fa['attributes']||{}};}(_0x3d1923,_0x4b03cd,_0x338da2)),'resolvedAt':_0x13aa27,'resolvedBy':_0x19eb20,'context':_0x5c5ac6,'attributes':_0x4a7ea2})['catch'](ut);return{'threadId':_0x12b5a0['commentThreadId'],'comments':_0x12b5a0['comments']};},'getCommentThread':async({channelId:_0x381082,threadId:_0x53e9ee})=>{const _0x511c01=await this['_getService'](_0x381082)['getCommentThread'](_0x53e9ee)['catch'](ut);return _0x511c01['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x511c01]),{'threadId':_0x511c01['commentThreadId'],'comments':_0x511c01['comments']['map'](S),'context':_0x511c01['context'],'resolvedAt':_0x511c01['resolvedAt'],'resolvedBy':_0x511c01['resolvedBy'],'attributes':_0x511c01['attributes']||{}});},'updateCommentThread':async({channelId:_0x5bc018,threadId:_0x20f6b7,context:_0x549d8f,unlinkedAt:_0x3b2548,attributes:_0x4ab58d})=>this['_getService'](_0x5bc018)['updateCommentThread']({'commentThreadId':_0x20f6b7,'context':_0x549d8f,'attributes':_0x4ab58d,'unlinkedAt':_0x3b2548})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x26c5ac,threadId:_0x2d5102})=>{const _0xe7abbf=await this['_getService'](_0x26c5ac)['resolveCommentThread'](_0x2d5102)['catch'](B)['catch'](ut);return{'threadId':_0xe7abbf['commentThreadId'],'resolvedAt':_0xe7abbf['resolvedAt'],'resolvedBy':_0xe7abbf['resolvedBy']};},'reopenCommentThread':async({channelId:_0x247c40,threadId:_0x150ced})=>this['_getService'](_0x247c40)['reopenCommentThread'](_0x150ced)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x405d38,threadId:_0x3d0d79})=>this['_getService'](_0x405d38)['removeCommentThread'](_0x3d0d79)['catch'](B)['catch'](ut),'addComment':({channelId:_0x4c4a2e,threadId:_0x385a1d,commentId:_0x2e3d14,content:_0x1ef738,attributes:_0x2c5464})=>this['_getService'](_0x4c4a2e)['addComment'](_0x385a1d,_0x2e3d14,_0x1ef738,_0x2c5464)['catch'](ut),'updateComment':({channelId:_0x5e113c,threadId:_0x402968,commentId:_0x49fcf6,content:_0xb5cd06,attributes:_0x32470e})=>this['_getService'](_0x5e113c)['updateComment'](_0x402968,_0x49fcf6,_0xb5cd06,_0x32470e)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x5f11a7,threadId:_0x2e2fdd,commentId:_0x5b6e3a})=>this['_getService'](_0x5f11a7)['removeComment'](_0x2e2fdd,_0x5b6e3a)['catch'](B)['catch'](ut)},_0x49d494 instanceof _0x3d1059){const _0x3f6076=_0x49d494['config']['get']('collaboration.channelId'),_0x322fe0=_0x49d494['plugins']['get'](r);await this['_setUpService'](_0x3f6076);const _0x29e677=await this['_services']['get'](_0x3f6076)['getConnectedSessions']();this['listenTo'](_0x322fe0,'sessionAdd:'+_0x3f6076,(_0x20b6f5,{session:_0x4687fd})=>{_0x4687fd['id']===_0x322fe0['mySessionId']&&(_0x20b6f5['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x4687fd['permissions'],_0x3f6076));}),_0x322fe0['register'](_0x3f6076,_0x29e677);}}async['_setUpService'](_0x9a3a3a){if(this['_services']['has'](_0x9a3a3a))throw new _0x3a30e9('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x9a3a3a});const _0x5edb60=this['context']['plugins']['get']('CommentsRepository'),_0x49e153=new a['CommentsService'](_0x9a3a3a);this['_services']['set'](_0x9a3a3a,_0x49e153),this['listenTo'](_0x49e153,'commentThreadAdded',(_0xfebc9b,_0x48a3a5)=>{const {commentThreadId:_0x19272c,documentId:_0x34dcd5,context:_0x24408d,attributes:_0x463345,resolvedAt:_0x9b1029,resolvedBy:_0x34057a,comments:_0x2a678d}=_0x48a3a5;_0x5edb60['getCommentThread'](_0x19272c)||_0x5edb60['addCommentThread']({'threadId':_0x19272c,'channelId':_0x34dcd5,'comments':_0x2a678d?_0x2a678d['map'](S):[],'context':_0x24408d,'attributes':_0x463345,'resolvedAt':_0x9b1029,'resolvedBy':_0x34057a,'isFromAdapter':!0x0});}),this['listenTo'](_0x49e153,'commentThreadUpdated',(_0x3d28e5,{commentThreadId:_0x390b79,documentId:_0x34f698,context:_0x4bc074,unlinkedAt:_0x4c2670,attributes:_0x52eb9f})=>{_0x5edb60['getCommentThread'](_0x390b79)&&_0x5edb60['updateCommentThread']({'threadId':_0x390b79,'channelId':_0x34f698,'context':_0x4bc074,'unlinkedAt':_0x4c2670,'attributes':_0x52eb9f,'isFromAdapter':!0x0});}),this['listenTo'](_0x49e153,'commentThreadResolved',(_0xad9cd2,{commentThreadId:_0x3ad661,resolvedBy:_0x4372ce,resolvedAt:_0x571da5})=>{const _0x27d179=_0x5edb60['getCommentThread'](_0x3ad661);_0x27d179&&_0x27d179['resolve']({'resolvedBy':_0x4372ce,'resolvedAt':_0x571da5,'isFromAdapter':!0x0});}),this['listenTo'](_0x49e153,'commentThreadReopened',(_0x71dd31,{commentThreadId:_0x3fac3c})=>{const _0x6ec8d6=_0x5edb60['getCommentThread'](_0x3fac3c);_0x6ec8d6&&_0x6ec8d6['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x49e153,'commentThreadRemoved',(_0x14fa66,{commentThreadId:_0x59fd06})=>{const _0x706c71=_0x5edb60['getCommentThread'](_0x59fd06);_0x706c71&&_0x706c71['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x49e153,'commentAdded',(_0x4dfa4c,_0x4265af)=>{const _0xd0f36e=_0x4265af['commentThreadId'],_0x55ab51=_0x5edb60['getCommentThread'](_0xd0f36e);_0x55ab51&&_0x55ab51['addComment']({...S(_0x4265af),'isFromAdapter':!0x0});}),this['listenTo'](_0x49e153,'commentUpdated',(_0x580f3a,{commentThreadId:_0x1d5361,commentId:_0x2638ed,content:_0xe52301,attributes:_0x3a721d})=>{const _0x163a02=_0x5edb60['getCommentThread'](_0x1d5361);if(_0x163a02){const _0x4f9c6c=_0x163a02['getComment'](_0x2638ed);_0x4f9c6c&&_0x4f9c6c['update']({'content':_0xe52301,'attributes':_0x3a721d,'isFromAdapter':!0x0});}}),this['listenTo'](_0x49e153,'commentRemoved',(_0x690e1,{commentThreadId:_0x17eeb3,commentId:_0x587642})=>{const _0x3460b7=_0x5edb60['getCommentThread'](_0x17eeb3);if(_0x3460b7){const _0x1dd196=_0x3460b7['getComment'](_0x587642);_0x1dd196&&_0x1dd196['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x9a3a3a);}['destroy'](){if(this['context']instanceof _0x3d1059){const _0x3e315a=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x3e315a);}}['_terminateService'](_0x27aece){if(!this['_services']['has'](_0x27aece))throw new _0x3a30e9('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x27aece});this['_getService'](_0x27aece)['disconnect'](),this['_services']['delete'](_0x27aece);}async['reconnect'](){for(const _0x197a97 of this['_services']['keys']())await this['_connectService'](_0x197a97);if(this['context']instanceof _0x3d1059){const _0x1832d2=this['context']['config']['get']('collaboration.channelId'),_0x5062c5=this['context']['plugins']['get'](r);_0x5062c5['unregister'](_0x1832d2);const _0x30830e=await this['_services']['get'](_0x1832d2)['getConnectedSessions']();_0x5062c5['register'](_0x1832d2,_0x30830e);}}async['_connectService'](_0x342c60){const {connection:_0xf7285f}=this['context']['plugins']['get'](c),_0x29403f=this['context']['plugins']['get']('CommentsRepository'),_0x5e7260=this['_services']['get'](_0x342c60),_0x545484=await _0x5e7260['connect'](_0xf7285f);await this['_fetchMissingUsersForThreads'](_0x545484);const _0x377ee6=new Set(Array['from'](_0x29403f['getCommentThreads']({'channelId':_0x342c60}),_0x570962=>_0x570962['id']));for(const _0x1ef000 of _0x545484)_0x1ef000['deletedAt']||_0x377ee6['delete'](_0x1ef000['commentThreadId']);for(const _0x238b5c of _0x377ee6)_0x29403f['getCommentThread'](_0x238b5c)['remove']({'isFromAdapter':!0x0});for(const _0x1b6b5c of _0x545484){let _0x26939e=_0x29403f['getCommentThread'](_0x1b6b5c['commentThreadId']);const {commentThreadId:_0x3d947a,context:_0x26c1f8,attributes:_0x29ea1a,resolvedBy:_0x433476,resolvedAt:_0x122942,unlinkedAt:_0x1643e4,deletedAt:_0x163205}=_0x1b6b5c;if(_0x163205)continue;_0x26939e||(_0x26939e=_0x29403f['addCommentThread']({'channelId':_0x342c60,'threadId':_0x3d947a,'context':_0x26c1f8,'attributes':_0x29ea1a||{},'resolvedBy':_0x433476,'resolvedAt':_0x122942,'unlinkedAt':_0x1643e4,'isFromAdapter':!0x0}));const _0x5b4c8c=new Set(Array['from'](_0x26939e['comments'],_0x34acec=>_0x34acec['id']));for(const _0x5de845 of _0x1b6b5c['comments'])_0x5b4c8c['delete'](_0x5de845['commentId']);for(const _0x5b17ba of _0x5b4c8c)_0x26939e['getComment'](_0x5b17ba)['remove']({'isFromAdapter':!0x0});for(const _0x6abcc6 of _0x1b6b5c['comments']){const _0x59f794=_0x26939e['getComment'](_0x6abcc6['commentId']);_0x59f794?_0x59f794['content']!==_0x6abcc6['content']&&_0x59f794['update']({'content':_0x6abcc6['content'],'isFromAdapter':!0x0}):_0x26939e['addComment'](Object['assign'](S(_0x6abcc6),{'isFromAdapter':!0x0}));}}}['_getService'](_0x15e490){if(!this['_services']['has'](_0x15e490))throw new _0x3a30e9('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x15e490});return this['_services']['get'](_0x15e490);}async['_fetchMissingUsersForThreads'](_0x3ff729){const _0xf6ee98=this['context']['plugins']['get'](_0x2458b1),{connection:_0x578973}=this['context']['plugins']['get'](c),_0xfb42b3=new Set();for(const {resolvedBy:_0xcc745a,comments:_0x366a29}of _0x3ff729){_0xcc745a&&!_0xf6ee98['getUser'](_0xcc745a)&&_0xfb42b3['add'](_0xcc745a);for(const {userId:_0x3b3061}of _0x366a29)_0xf6ee98['getUser'](_0x3b3061)||_0xfb42b3['add'](_0x3b3061);}if(0x0===_0xfb42b3['size'])return;const _0x273ee2=await lt['getMany'](_0x578973,Array['from'](_0xfb42b3));for(const _0x497ce7 of _0x273ee2)_0xf6ee98['getUser'](_0x497ce7['id'])||_0xf6ee98['addUser'](_0x497ce7);}}async function B(_0x51dce1){if('404'!==_0x51dce1['code'])throw _0x51dce1;}function ut(_0x215d23){if((_0x4fcebd=_0x215d23)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x4fcebd['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x4fcebd['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x4fcebd;throw _0x215d23;}function S(_0x45d16a){return{'threadId':_0x45d16a['commentThreadId'],'commentId':_0x45d16a['commentId'],'content':_0x45d16a['content'],'createdAt':_0x45d16a['createdAt'],'authorId':_0x45d16a['userId'],'attributes':_0x45d16a['attributes']||{}};}class g extends _0x2ee2ca{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
- ((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x2b3e7f){super(_0x2b3e7f);const _0x160aa2=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x160aa2);}['init'](){const _0x24f385=this['editor']['plugins']['get'](c),_0x55eff6=this['editor']['plugins']['get']('TrackChangesEditing');return _0x55eff6['adapter']={'getSuggestion':async _0x1c853f=>{await this['_waitForServiceReady']();const _0x492dcf=await this['_trackChangesService']['get'](_0x1c853f)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x492dcf]),_0x492dcf;},'addSuggestion':async({id:_0x2411a4,type:_0x525165,data:_0x57c49f,originalSuggestionId:_0x148645,attributes:_0xdb69eb})=>{await this['_waitForServiceReady']();const _0x3c2893={'id':_0x2411a4,'type':_0x525165,'data':_0x57c49f,'originalSuggestionId':_0x148645,'attributes':_0xdb69eb},_0x37c0a3=await this['_trackChangesService']['add'](_0x2411a4,_0x525165,_0x57c49f,_0x148645,_0xdb69eb)['catch'](_0x132d18=>{if(ft(_0x132d18))return new Promise(_0x97d64f=>{this['_bufferedRequests']['set'](_0x2411a4,{'resolve':_0x97d64f,'suggestionData':_0x3c2893});});throw _0x132d18;});return this['_bufferedRequests']['delete'](_0x2411a4),_0x37c0a3;},'updateSuggestion':async(_0x50ddcf,_0x33301f)=>{if(await this['_waitForServiceReady'](),'open'!==_0x33301f['state'])return this['_trackChangesService']['update'](_0x50ddcf,_0x33301f)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x2b4e9a,_0x11c668)=>{_0x55eff6['hasSuggestion'](_0x11c668['id'])&&(_0x55eff6['getSuggestion'](_0x11c668['id'])['attributes']=_0x11c668['attributes']);}),this['_trackChangesService']['connect'](_0x24f385['connection'])['then'](_0x2b08ef=>(_0x24f385['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x2b08ef)['then'](()=>{for(const _0x25a4b5 of _0x2b08ef){_0x55eff6['addSuggestionData'](_0x25a4b5)['_saved']=!0x0;}})));}async['reconnect'](){const _0x3af93b=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x620722}=this['editor']['plugins']['get'](c),_0x5668f5=await this['_trackChangesService']['connect'](_0x620722);await this['_fetchMissingUsersForThreads'](_0x5668f5);for(const {suggestionData:_0x10443d,resolve:_0x1a1763}of this['_bufferedRequests']['values']()){let _0xb27e36=_0x5668f5['find'](_0x14a75c=>_0x14a75c['id']===_0x10443d['id']);_0xb27e36||(_0xb27e36=await this['_trackChangesService']['add'](_0x10443d['id'],_0x10443d['type'],_0x10443d['data'],_0x10443d['originalSuggestionId'])),_0x1a1763(_0xb27e36);}for(const _0x451d82 of _0x5668f5)_0x3af93b['hasSuggestion'](_0x451d82['id'])||_0x3af93b['addSuggestionData'](_0x451d82);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x5da489=>{this['listenTo'](this['_trackChangesService'],'connected',_0x1a1f9d=>{_0x1a1f9d['off'](),_0x5da489();});});}async['_fetchMissingUsersForThreads'](_0x151903){const _0x19140b=this['editor']['plugins']['get'](_0x2458b1),{connection:_0x45cfa9}=this['editor']['plugins']['get'](c),_0x2c0de5=new Set();for(const {authorId:_0x32a861}of _0x151903)_0x19140b['getUser'](_0x32a861)||_0x2c0de5['add'](_0x32a861);if(0x0===_0x2c0de5['size'])return;const _0x397f96=await lt['getMany'](_0x45cfa9,Array['from'](_0x2c0de5));for(const _0x505813 of _0x397f96)_0x19140b['getUser'](_0x505813['id'])||_0x19140b['addUser'](_0x505813);}}function R(_0x5e34bd){if(ft(_0x5e34bd))return new Promise(()=>{});throw _0x5e34bd;}function ft(_0x59a623){return _0x59a623['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x59a623['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x2ee2ca{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x1d0ae7=this['editor']['plugins']['get'](c),_0x45b871=this['editor']['plugins']['get']('CommentsEditing'),_0x1c7aba=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x1d0ae7,'change:state',(_0x33f03b,_0x38b146,_0x38918a)=>{_0x45b871['isThreadsLoadingPaused']='connected'!==_0x38918a;});}),this['listenTo'](_0x1d0ae7,'change:state',(_0x13b9fe,_0x4a4358,_0x30fb71)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x30fb71);}),_0x1c7aba['_setUpService'](this['editor']['config']['get']('collaboration.channelId'));}['destroy'](){this['editor']['plugins']['get'](a)['_terminateService'](this['editor']['config']['get']('collaboration.channelId')),super['destroy']();}}class p extends _0x2ee2ca{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x2ee2ca{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
- ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x2458b1];}constructor(_0x4be9fb){super(_0x4be9fb);const _0x317dae=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x317dae);}async['init'](){const _0x383d4d=this['editor']['plugins']['get'](l),_0x39aef3=_0x383d4d['serverHistory'],_0x2c6812=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x39aef3,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x383d4d['sessionId']});const _0x995872=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x59ffae=await tt['isBundleUploaded'](_0x2c6812['connection'],_0x995872);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x6e717f})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x6e717f)),'updateRevisions':async _0x5e9a13=>{await this['_waitForServiceReady']();const _0x17174a=this['_revisionTracker']['currentRevision'];if(_0x59ffae&&0x1===_0x5e9a13['length']&&_0x5e9a13[0x0]['id']===_0x17174a['id'])return _0x5e9a13;for(const _0x20818f of _0x5e9a13)_0x20818f['id']===_0x17174a['id']&&(_0x20818f['isEmptyCurrent']=_0x20818f['fromVersion']===_0x20818f['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x5e9a13,this['_lastRequestId'])['then'](_0x564305=>(this['_lastRequestId']=_0x564305,_0x5e9a13))['catch'](_0x55e3cc=>{if(st(_0x55e3cc)||'400'===_0x55e3cc['code']&&void 0x0!==_0x55e3cc['data']['wrongRequestId']){for(const _0x5512d6 of _0x5e9a13){!this['_revisionTracker']['repository']['getRevision'](_0x5512d6['id'])||this['_revisionTracker']['_bufferUpdate'](_0x5512d6['id'],_0x5512d6,!0x1);}if(st(_0x55e3cc))throw _0x55e3cc;return _0x5e9a13;}throw _0x55e3cc;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x2ebbba,{revisionsData:_0x42a452,requestId:_0x18f08d})=>{Math['max'](..._0x42a452['map'](_0x59ba22=>_0x59ba22['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x42a452,_0x18f08d);}):this['_handleRevisionsUpdate'](_0x42a452,_0x18f08d);});const {revisions:_0x48f74e,requestId:_0x114b0f}=await this['_revisionHistoryService']['connect'](_0x2c6812['connection']);_0x2c6812['addToReconnectionStack'](this),this['_lastRequestId']=_0x114b0f,await this['_fetchMissingUsers'](_0x48f74e);for(const _0x268bc4 of _0x48f74e)this['_revisionTracker']['addRevisionData'](_0x268bc4);this['listenTo'](_0x383d4d,'change:_isConnected',(_0x542913,_0x1627ce,_0x3b3710)=>{_0x3b3710&&(this['_oldOffset']=_0x383d4d['_offset'],_0x542913['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x2c6812,'state',_0x55032c=>_0x55032c===_0x6b4045['CONNECTED']);}async['reconnect'](){const _0x5bb905=this['editor']['plugins']['get'](c),_0x3308f6=this['editor']['plugins']['get'](l),_0x42e97c=async()=>{const _0xd5a1b7=this['_revisionTracker']['currentRevision'],_0x5550b0=_0xd5a1b7['id'],_0x26fdaa=_0x5550b0!==_0x3308f6['sessionId'];if(_0x26fdaa){const _0x4c185c=_0x3308f6['_offset']-this['_oldOffset'],_0x411b27=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0xd5a1b7['toVersion']+_0x4c185c!==_0x411b27){const _0x251b95=_0xd5a1b7['fromVersion']+_0x4c185c,_0x39cc43=this['editor']['plugins']['get'](_0x2458b1),_0x1f64b2=this['_revisionTracker']['buildRevisionData']({'revision':_0xd5a1b7,'from':_0x251b95,'to':_0x411b27});_0x1f64b2['id']=_0xd5a1b7['id'];const _0x444587=_0x1f64b2['authorsIds']['map'](_0x49adb3=>_0x39cc43['getUser'](_0x49adb3));_0xd5a1b7['_update']({..._0x1f64b2,'authors':_0x444587},!0x0),this['_revisionTracker']['_bufferUpdate'](_0xd5a1b7['id'],_0x1f64b2,!0x0);}this['_revisionTracker']['_startingVersion']=_0x411b27,(_0xd5a1b7['toVersion']===_0xd5a1b7['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x5550b0)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x5550b0),this['_revisionTracker']['_createCurrentRevision'](_0x411b27));}const {revisions:_0x229ab1,requestId:_0xfb775c}=await this['_revisionHistoryService']['reconnect'](_0x5bb905['connection'],this['_lastRequestId']);_0x26fdaa&&_0x229ab1['length']>0x0?_0x3308f6['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x229ab1),this['_handleRevisionsUpdate'](_0x229ab1,_0xfb775c),this['_revisionTracker']['sendBufferedUpdates']());};return _0x3308f6['_isConnected']?_0x42e97c():new Promise((_0x586b7b,_0x505861)=>{_0x3308f6['once']('change:_isConnected',()=>{_0x42e97c()['then'](_0x586b7b)['catch'](_0x505861);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x1637ca=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x4a62d1=>{_0x4a62d1['off'](),_0x1637ca();});});}['_getLatestVersionFromServerOperations'](){const _0x596797=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x5bc7d7 of _0x596797)if('marker'!==_0x5bc7d7['type']||_0x5bc7d7['affectsData'])return _0x5bc7d7['baseVersion']+0x1;}['_getLatestVersion'](){const _0x27d4c2=this['editor']['plugins']['get'](l);return new Promise(_0x4c4da5=>{_0x27d4c2['_isPendingUpdate']?_0x27d4c2['once']('change:_isPendingUpdate',()=>{_0x4c4da5(this['_getLatestVersionFromServerOperations']());}):_0x4c4da5(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x11e3cc,_0x426ff2){const _0x294623=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x426ff2;for(const _0x1df436 of _0x11e3cc){const _0x2b6024=_0x294623['getRevision'](_0x1df436['id']);if(_0x2b6024){if((_0x1df436['fromVersion']||_0x1df436['toVersion'])&&(_0x1df436['diffData']=null),_0x2b6024===this['_revisionTracker']['currentRevision']){const _0x1b46b5=Math['max'](_0x2b6024['toVersion'],_0x1df436['toVersion']),_0xe0414e=Math['max'](_0x2b6024['fromVersion'],_0x1df436['fromVersion']);let _0x365aa2;_0x2b6024['toVersion']===_0x1df436['toVersion']&&_0x2b6024['fromVersion']===_0x1df436['fromVersion']?(_0x365aa2=!0x0,this['_preventResendingRevisionData'](_0x1df436)):_0x1df436['toVersion']===_0x1b46b5&&_0x1df436['fromVersion']===_0xe0414e?_0x365aa2=!0x1:(_0x2b6024['toVersion']===_0x1b46b5&&_0x2b6024['fromVersion']===_0xe0414e||this['_fixRevision']({'revision':_0x2b6024,'from':_0xe0414e,'to':_0x1b46b5}),_0x365aa2=!0x0),_0x365aa2&&(delete _0x1df436['fromVersion'],delete _0x1df436['toVersion'],delete _0x1df436['diffData'],delete _0x1df436['createdAt'],delete _0x1df436['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x1df436),this['_preventResendingRevisionData'](_0x1df436);}else this['_revisionTracker']['addRevisionData'](_0x1df436);}const _0x3c55af=_0x294623['getRevisions']();_0x3c55af['reverse']();for(let _0x1bfed9=0x0;_0x1bfed9<_0x3c55af['length']-0x1;_0x1bfed9++){const _0x3a8c78=_0x3c55af[_0x1bfed9],_0x443d62=_0x3c55af[_0x1bfed9+0x1];if(_0x3a8c78['fromVersion']<_0x443d62['toVersion']){const _0xe23b92=_0x443d62['toVersion'],_0xbeb6b7=Math['max'](_0xe23b92,_0x3a8c78['toVersion']);this['_fixRevision']({'revision':_0x3a8c78,'from':_0xe23b92,'to':_0xbeb6b7});}}}['_fixRevision']({revision:_0x207577,from:_0x5b56b5,to:_0x2c428f}={}){const _0x3b1aae=this['editor']['plugins']['get'](_0x2458b1),_0x4f9699=this['_revisionTracker']['buildRevisionData']({'revision':_0x207577,'from':_0x5b56b5,'to':_0x2c428f});_0x4f9699['authors']=_0x4f9699['authorsIds']['map'](_0x49eb0a=>_0x3b1aae['getUser'](_0x49eb0a)),_0x207577['_update'](_0x4f9699);}['_preventResendingRevisionData'](_0xb5aad0){const _0x2fed0e={};_0x2fed0e['id']=_0xb5aad0['id'];for(const _0x14b366 of Object['keys'](_0xb5aad0))'id'!==_0x14b366&&(_0x2fed0e[_0x14b366]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x2fed0e['id'],_0x2fed0e,!0x0);}async['_fetchMissingUsers'](_0x5bde60){const _0x5657eb=this['editor']['plugins']['get'](_0x2458b1),{connection:_0x16ac9c}=this['editor']['plugins']['get'](c),_0xd98186=new Set();for(const _0x36f29c of _0x5bde60){for(const _0x26ceb0 of _0x36f29c['authorsIds'])_0x392b4d(_0x26ceb0);_0x36f29c['creatorId']&&_0x392b4d(_0x36f29c['creatorId']);}if(0x0===_0xd98186['size'])return;const _0x574c6a=await lt['getMany'](_0x16ac9c,Array['from'](_0xd98186));for(const _0x567b29 of _0x574c6a)_0x5657eb['getUser'](_0x567b29['id'])||_0x5657eb['addUser'](_0x567b29);function _0x392b4d(_0xfe6274){_0x5657eb['getUser'](_0xfe6274)||_0xd98186['add'](_0xfe6274);}}}function st(_0x1d16c4){return _0x1d16c4['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x1d16c4['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1d16c4['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x2ee2ca{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x3c6681{constructor(_0x499fbe){super(_0x499fbe);const _0x2ad0d6=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x2ad0d6['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x2ad0d6['to']('usersCount',_0x135ed4=>q(_0x499fbe,'CONNECTED_USERS',_0x135ed4))}]});}}class es extends _0x3c6681{['items'];['keystrokes'];constructor(_0x3dcbf5){super(_0x3dcbf5);const _0x443624=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0xb491ba(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x443624['if']('hasPopup'),'aria-expanded':_0x443624['to']('isExpanded',_0x59b664=>this['hasPopup']&&String(_0x59b664)),'aria-label':_0x443624['to']('hasPopup',_0x2b40d0=>q(_0x3dcbf5,_0x2b40d0?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x443624['to']('hasPopup',_0x3cc390=>!!_0x3cc390&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x443624['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x3d14a3,_0x5db804,_0x3c61d6)=>{this['element']&&(_0x3c61d6?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class L extends _0x3c6681{['counterView'];['inlineListView'];constructor(_0x4750ae){super(_0x4750ae);const _0xd33b52=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x4750ae),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x10ee1d of this['inlineListView']['items'])_0x10ee1d['tooltipPosition']='s';this['inlineListView']['items']['first']&&(this['inlineListView']['items']['first']['tooltipPosition']='se');}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list','ck-reset','ck-rounded-corners',_0xd33b52['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x3c6681{['listWrapperView'];constructor(_0x3c54d8,_0x268a66){super(_0x3c54d8),this['listWrapperView']=new mt(_0x3c54d8,_0x268a66),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x3c54d8,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x2c7744{constructor(_0x56ef58,_0x11bb72){super(_0x56ef58);const _0x3560a7=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x11bb72?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x3560a7['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x3560a7['to']('role'),'aria-label':_0x3560a7['to']('ariaLabel'),'aria-labelledby':_0x3560a7['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0xf2e2b8['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0xbbcbca=this['element'];_0xbbcbca&&(this['_isScrollable']=Math['max'](_0xbbcbca['scrollHeight'],_0xbbcbca['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x2c531c,_0x526857,_0x332494){super(_0x2c531c);const _0x48e11b=this['bindTemplate'];this['userView']=new ct(_0x2c531c,_0x526857);const _0x3faa02={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x526857['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x526857['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x526857['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x332494&&(_0x3faa02['tag']='button',_0x3faa02['on']={'click':_0x48e11b['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x3faa02);}['focus'](){this['element']['focus']();}}class y extends _0x3c6681{['userView'];['markerView'];constructor(_0x3d637a,_0x1d6051,_0x4143db){super(_0x3d637a);const _0x1972c1=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x3d637a,_0x1d6051),this['markerView']=new at(_0x3d637a,_0x1d6051);const _0xe0591c=new ot(_0x3d637a);_0xe0591c['template']['tag']='span',_0xe0591c['text']=_0x1d6051['name'];const _0x300305={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x1972c1['to']('isFocusable',_0x31f347=>!!_0x31f347&&0x0),'aria-labelledby':_0xe0591c['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x1972c1['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x1972c1['to']('hasTooltip',_0x377e18=>!_0x377e18),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0xe0591c]};_0x4143db&&(_0x300305['tag']='button',_0x300305['on']={'click':_0x1972c1['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x300305);}}class at extends _0x3c6681{constructor(_0x547c17,_0x1ad203){super(_0x547c17),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x1ad203['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0xe1b963{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x56fd78){super(_0x56fd78),this['context']['config']['define']('presenceList',A);const _0x349c26=_0x56fd78['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x349c26)throw new _0x3a30e9('presencelist-collapseat-invalid-format',this);if(_0x349c26<0x1)throw new _0x3a30e9('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x415849(),this['balloonPanelView']=new _0x1493c9(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x64cb5e of this['_allConnectedUsers'])this['_handleUserAdd'](_0x64cb5e);this['listenTo'](this['_allConnectedUsers'],'add',(_0x5b44be,_0x488f87)=>{this['_handleUserAdd'](_0x488f87);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x36f649,_0x19eedf)=>{this['_handleUserRemove'](_0x19eedf);});}['_createView'](){const _0x258f02=this['context'],_0x543065=new L(this['context']['locale']),_0x5b8f25=this['balloonPanelView'];if(!_0x1a7ac0(_0x258f02['config']['get']('presenceList.container')))throw new _0x3a30e9('presencelist-missing-container',this);return _0x543065['counterView']['bind']('usersCount')['to'](this),_0x543065['bind']('isCollapsed')['to'](this,'usersCount',_0x130ea0=>{const {collapseAt:_0x1468e0,displayMe:_0xc8486a}=_0x258f02['config']['get']('presenceList'),_0x1e3f52=_0x130ea0>=_0x1468e0;return _0x543065['counterView']['isHidden']=!(0x1==_0x130ea0&&_0xc8486a||_0x1e3f52),_0x1e3f52||this['hideDropdown'](),_0x1e3f52;}),_0x543065['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x3b2479=>{const _0x1cd7cb=_0x258f02['config']['get']('presenceList'),_0xded1da=new y(_0x258f02['locale'],_0x3b2479,!!_0x1cd7cb['onClick']);return _0xded1da['bind']('hasTooltip')['to'](_0x543065,'isCollapsed',_0x5176f2=>!_0x5176f2),_0xded1da['bind']('isFocusable')['to'](_0x543065,'isCollapsed',_0x2cef7a=>!_0x2cef7a),_0x1cd7cb['onClick']&&this['listenTo'](_0xded1da,'execute',()=>{this['view']['isCollapsed']||_0x1cd7cb['onClick'](_0x3b2479,_0xded1da['element']);}),_0xded1da;}),this['listenTo'](_0x543065['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x543065['inlineListView']['keystrokes']['set']('Enter',(_0x98928,_0x24d2a0)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x24d2a0());}),_0x543065['render'](),_0x5b8f25['render'](),_0x3d22bf({'emitter':_0x543065,'activator':()=>_0x5b8f25['isVisible'],'contextElements':[_0x5b8f25['element'],_0x543065['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x258f02['config']['get']('presenceList.container')['appendChild'](_0x543065['element']),this['_bodyCollection']=new _0x4b5a01(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x543065;}['_handleUserAdd'](_0x498c7c){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x498c7c['isMe'])return;const _0x25daa5=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x25daa5&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0xb2cac6=_0x498c7c['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x498c7c,_0xb2cac6);}['_handleUserRemove'](_0x4628b1){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x4628b1['id'])&&(this['currentDisplayedUsers']['remove'](_0x4628b1['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x246375 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x246375['id']))return void this['currentDisplayedUsers']['add'](_0x246375,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x51f46e=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x51f46e['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0xc67bbe}=this['presenceDropdownView'];_0xc67bbe['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x73aadf=>{if(!_0x51f46e['displayMe']&&_0x73aadf['isMe'])return null;const _0x469f10=new k(this['context']['locale'],_0x73aadf,!!_0x51f46e['onClick']);return _0x51f46e['onClick']&&this['listenTo'](_0x469f10,'execute',()=>{_0x51f46e['onClick'](_0x73aadf,_0x469f10['element']);}),_0x469f10;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0xc67bbe['focus'](),_0xc67bbe['checkIfScrollable']();const _0x2e83e=(_0x55a023,_0x1c60dc)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x1c60dc();};_0xc67bbe['keystrokes']['set']('Esc',_0x2e83e),_0xc67bbe['keystrokes']['set']('Shift+Tab',_0x2e83e),_0xc67bbe['keystrokes']['set']('Tab',(_0x19fb8e,_0x24d859)=>{!function(_0x3c18fb){const _0x330bc8=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x2ca7f1=>_0x2ca7f1+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x36efe0=[...document['body']['querySelectorAll'](_0x330bc8)]['filter'](_0x1b82dc=>_0x1b82dc===document['activeElement']||_0x1b82dc['offsetWidth']+_0x1b82dc['offsetHeight']>0x0)['sort']((_0x4266be,_0x3b46ac)=>(_0x4266be['tabIndex']||0x0)-(_0x3b46ac['tabIndex']||0x0)),_0xd9bb88=_0x36efe0['indexOf'](_0x3c18fb),_0x4277fd=_0x36efe0[(_0xd9bb88+0x1)%_0x36efe0['length']];_0x4277fd&&_0x4277fd['focus']();}(this['view']['element']),this['hideDropdown'](),_0x24d859();}),_0xc67bbe['focusTracker']['add'](this['view']['element']),_0xc67bbe['focusTracker']['on']('change:isFocused',(_0x9465dc,_0x3b097e,_0x3771d2)=>{_0x3771d2||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class i extends _0xe1b963{static get['requires'](){return[r,s];}static get['pluginName'](){return'PresenceList';}}export{a as CloudServicesCommentsAdapter,v as CloudServicesRevisionHistoryAdapter,g as CloudServicesTrackChangesAdapter,i as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,d as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
23
+ import{ContextPlugin as _0x29e656,Plugin as _0x395194,PendingActions as _0x2ddcee,Context as _0x234472}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0xcd76df,CKEditorError as _0x495380,Collection as _0x3f5652,global as _0x46b77b,version as nt,uid as _0x857a83,KeystrokeHandler as _0xf2d36a}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x1fed11,View as _0x66de9f,ListView as _0x2f06a8,ListItemView as rt,LabelView as ot,BalloonPanelView as _0x3eaaeb,clickOutsideHandler as _0x2444f0,BodyCollection as _0x338f3f}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x42b3ff,NoOperation as _0x4bb78d,InsertOperation as _0x165818,MarkerOperation as _0x2d761b,RootAttributeOperation as _0x4096c6,transformSets as _0x50f3cb,OperationFactory as _0x3a5f2b}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as dt,WEB_SOCKET_GATEWAY_STATES as _0x4fe0e0,CollaborativeEditingService as _0x1290d5,User as lt,CommentsService as _0x3ed0ed,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x4f21f3,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x127813}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x49d9e1}from'lodash-es';class c extends _0x29e656{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
+ ((()=>dt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x1fed11];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x38660b){super(_0x38660b),this['set']('state',_0x4fe0e0['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0xcd76df);}['init'](){const _0x115f10=this['context'],_0xb5439e=_0x115f10['plugins']['get']('CloudServices'),_0x88cee0=_0x115f10['plugins']['get'](_0x1fed11);if(!_0xb5439e['token'])throw new _0x495380('websocketgateway-missing-token',this);if(!_0xb5439e['webSocketUrl'])throw new _0x495380('websocketgateway-missing-websocket-url',this);return this['_domEmitter']['listenTo'](window,'offline',()=>this['_isBrowserOffline']=!0x0),this['_domEmitter']['listenTo'](window,'online',()=>this['_isBrowserOffline']=!0x1),this['context']['config']['define']('cloudServices.connectionTimeout',0xa),this['context']['config']['define']('cloudServices.requestTimeout',0x14),c['WebSocketGateway']['connect'](_0xb5439e['token'],_0xb5439e['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x7eb33b=>{if(this['connection']=_0x7eb33b,this['bind']('state')['to'](_0x7eb33b,'state',this,'_isBrowserOffline',(_0x28bb9b,_0x42e45e)=>('connected'!==_0x28bb9b&&(this['_shouldPluginsReconnect']=!0x0),_0x42e45e||_0x28bb9b!==_0x4fe0e0['CONNECTED']?_0x4fe0e0['DISCONNECTED']:this['state']==_0x4fe0e0['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x4fe0e0['CONNECTING']):_0x4fe0e0['CONNECTED'])),this['connection']['on']('error',(_0x4fce27,_0x4dad6f)=>{if('limitExceeded'!==_0x4dad6f['code'])throw console['error'](_0x4dad6f),new _0x495380('cloudservices-init',null,{'originalError':_0x4dad6f});_0x88cee0['showWarning']('The\x20limit\x20of\x20maximum\x20concurrent\x20connections\x20that\x20the\x20collaboration\x20server\x20can\x20handle\x20has\x20been\x20reached.\x20Try\x20opening\x20the\x20document\x20again\x20in\x20a\x20few\x20minutes.\x20Please\x20contact\x20your\x20system\x20administrator\x20if\x20the\x20problem\x20persists.',{'title':'Connected\x20users\x20limit\x20exceeded','namespace':'real-time-collaboration'});}),!_0x7eb33b['me'])return new Promise(_0x7f7bfb=>_0x7eb33b['on']('change:me',_0x7f7bfb));})['catch'](_0x112a9f=>{throw console['error'](_0x112a9f),new _0x495380('cloudservices-init',null,{'originalError':_0x112a9f});});}['addToReconnectionStack'](_0x19ac49){if('function'!=typeof _0x19ac49['reconnect'])throw new _0x495380('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x19ac49))throw new _0x495380('websocketgateway-plugin-already-registered',this,{'name':_0x19ac49['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x19ac49);}['removeFromReconnectionStack'](_0x4e401e){this['_reconnectionStack']['delete'](_0x4e401e);}['isInReconnectionStack'](_0x351edf){return this['_reconnectionStack']['has'](_0x351edf);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x46282e=>_0x46282e['reconnect']())))['then'](()=>this['state']=_0x4fe0e0['CONNECTED'])['catch'](_0x4a97c6=>{throw console['error'](_0x4a97c6),new _0x495380('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x4fe0e0['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x29e656{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x4f21f3];}constructor(_0x5db9e0){super(_0x5db9e0),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x3f5652(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x4f21f3);}['init'](){const _0x2880a0=this['context']['plugins']['get'](c);this['listenTo'](_0x2880a0,'change:state',(_0x2b8f04,_0x113b60,_0x3728f6)=>{if('connected'!==_0x3728f6)this['channelSessions']['forEach'](_0x185d93=>_0x185d93['clear']()),this['channelConnectedUsers']['forEach'](_0x9b67c=>_0x9b67c['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x4dd597,_0x609590]of this['_registeredSessions'])for(const _0x156551 of _0x609590)this['_handleSessionAdd'](_0x4dd597,_0x156551);}}),this['_createUser'](_0x2880a0['connection']['me'],!0x0);}['register'](_0x1098c6,_0x1fedd2){if(this['_registeredSessions']['has'](_0x1098c6))throw new _0x495380('sessions-register-already-registered',null,{'channelId':_0x1098c6});this['_registeredSessions']['set'](_0x1098c6,_0x1fedd2),this['channelSessions']['set'](_0x1098c6,new _0x3f5652()),this['channelConnectedUsers']['set'](_0x1098c6,new _0x3f5652()),this['listenTo'](_0x1fedd2,'add',(_0x10057c,_0x2d0072)=>this['_handleSessionAdd'](_0x1098c6,_0x2d0072)),this['listenTo'](_0x1fedd2,'remove',(_0x5b3847,_0x419af8)=>this['_handleSessionRemove'](_0x1098c6,_0x419af8));for(const _0x44e844 of _0x1fedd2)this['_handleSessionAdd'](_0x1098c6,_0x44e844);}['unregister'](_0x2c4194){if(!this['_registeredSessions']['has'](_0x2c4194))throw new _0x495380('sessions-unregister-not-exist',null,{'channelId':_0x2c4194});const _0x498f0a=this['_registeredSessions']['get'](_0x2c4194);this['stopListening'](_0x498f0a);for(const _0x2a40dd of _0x498f0a)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x2c4194,_0x2a40dd);this['_registeredSessions']['delete'](_0x2c4194),this['channelSessions']['delete'](_0x2c4194),this['channelConnectedUsers']['delete'](_0x2c4194);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x2fc74e){for(const _0x11244f of this['channelSessions']['values']())for(const _0x395e2f of _0x11244f)if(_0x395e2f['id']===_0x2fc74e)return _0x395e2f['user'];}['getUserSessions'](_0x3bd27b,_0x4ec190){const _0x3a9f40=_0x4ec190?[this['channelSessions']['get'](_0x4ec190)]:this['channelSessions']['values'](),_0x11fb77=new Set();for(const _0x3ed899 of _0x3a9f40)for(const _0x261f10 of _0x3ed899)_0x261f10['user']['id']===_0x3bd27b['id']&&_0x11fb77['add'](_0x261f10['id']);return _0x11fb77;}['getUserRole'](_0x61b5e0){for(const _0x6a97a0 of this['channelSessions']['values']())for(const _0x222802 of _0x6a97a0)if(_0x222802['user']===_0x61b5e0)return _0x222802['role'];}['_handleSessionAdd'](_0x2a575b,_0x15f2a8){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x2e73f5=_0x15f2a8['user'],_0x24fd4d=this['_users']['getUser'](_0x2e73f5['id'])||this['_createUser'](_0x2e73f5),_0x42f513=Object['assign']({},_0x15f2a8,{'user':_0x24fd4d});this['channelSessions']['get'](_0x2a575b)['add'](_0x42f513);const _0xdd1bff=this['channelConnectedUsers']['get'](_0x2a575b);_0xdd1bff['has'](_0x24fd4d['id'])||_0xdd1bff['add'](_0x24fd4d),this['allConnectedUsers']['has'](_0x24fd4d['id'])||this['allConnectedUsers']['add'](_0x24fd4d,_0x24fd4d['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x2a575b,{'channelId':_0x2a575b,'session':_0x42f513});}['_handleSessionRemove'](_0x1a2d15,_0x1d7b88){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x710cd4=this['channelConnectedUsers']['get'](_0x1a2d15),_0x134232=_0x1d7b88['user'];_0x134232['id']&&(this['channelSessions']['get'](_0x1a2d15)['remove'](_0x1d7b88['id']),_0x710cd4['has'](_0x134232['id'])&&!this['getUserSessions'](_0x134232,_0x1a2d15)['size']&&_0x710cd4['remove'](_0x134232['id']),this['allConnectedUsers']['get'](_0x134232['id'])&&!this['getUserSessions'](_0x134232)['size']&&this['allConnectedUsers']['remove'](_0x134232['id']));}['_createUser'](_0x44a942,_0x44abfc){const _0x40c26c=this['_users']['addUser'](_0x44a942);return _0x44abfc&&this['_users']['defineMe'](_0x44a942['id']),_0x40c26c['orderNumber']=this['_uniqueUsersCount']++,_0x40c26c;}}class H extends _0x395194{['_domEmitter']=new(_0xcd76df())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x52bc69=this['editor'],_0x4846d8=_0x52bc69['plugins']['get'](r);_0x52bc69['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x17e886,{writer:_0x45a0fc})=>function(_0x4cc48b,_0x591ef1,_0x34c7be,_0x3e98dd){const _0x24ec52=_0x4cc48b['markerName']['split'](':')[0x2],_0x577237=_0x34c7be['getUserBySessionId'](_0x24ec52);if(!_0x577237||_0x24ec52===_0x34c7be['mySessionId'])return;if(!_0x3e98dd['model']['schema']['checkChild'](_0x4cc48b['markerRange']['start'],'$text'))return;const _0x47bddc={'class':'ck-user__marker\x20'+_0x577237['color']['getMarkerClass'](),'data-name':_0x577237['name'],'data-session-id':_0x24ec52},_0x5b7d43=_0x3e98dd['model']['markers']['get'](_0x4cc48b['markerName']),_0x4e051e=_0x5b7d43['getStart'](),_0x3d2975=_0x4e051e['nodeAfter'],_0x26256b=_0x3e98dd['model']['schema'];if(_0x3d2975&&_0x26256b['isObject'](_0x3d2975)&&_0x26256b['isInline'](_0x3d2975)&&!_0x3e98dd['model']['markers']['get']('user:range:'+_0x24ec52)['getRange']()['isCollapsed'])return;const _0x54ec91=_0x4e051e['parent'];return _0x3e98dd['model']['schema']['isLimit'](_0x54ec91)&&!_0x3e98dd['model']['hasContent'](_0x54ec91)&&(_0x47bddc['contenteditable']=!0x1),function(_0x136e50,_0x53e3b8,_0x53013a){const _0x2d9859=_0x136e50['createUIElement']('span',_0x53e3b8);return _0x136e50['setCustomProperty']('userPositionMarker',!0x0,_0x2d9859),_0x2d9859['render']=function(_0x4a8187){const _0x1cee1f=this['toDomElement'](_0x4a8187);return _0x1cee1f['innerHTML']='⁠<span\x20class=\x22ck-user__marker-line\x22\x20contenteditable=\x22false\x22><span\x20class=\x22ck-user__marker-dot\x22></span></span><span\x20class=\x22ck-user__marker-tooltip\x22\x20contenteditable=\x22false\x22\x20spellcheck=\x22false\x22>'+_0x53013a['name']+'</span>⁠',_0x1cee1f['addEventListener']('mouseenter',()=>{_0x1cee1f['classList']['add']('ck-user__marker_hovered');}),_0x1cee1f['addEventListener']('mouseleave',()=>{_0x1cee1f['classList']['remove']('ck-user__marker_hovered');}),_0x1cee1f;},_0x2d9859['isSimilar']=function(_0x18ef22){return!(!this['getCustomProperty']('userPositionMarker')||!_0x18ef22['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x18ef22['getAttribute']('data-session-id'));},_0x2d9859;}(_0x591ef1,_0x47bddc,_0x577237);}(_0x17e886,_0x45a0fc,_0x4846d8,_0x52bc69)}),_0x52bc69['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x40a7fe=>function(_0x2bb74e,_0x37705b){const _0x4ed07e=_0x2bb74e['markerName']['split'](':')[0x2];if(_0x4ed07e===_0x37705b['mySessionId'])return null;const _0x50af12=_0x37705b['getUserBySessionId'](_0x4ed07e);if(!_0x50af12)return{'id':_0x4ed07e,'classes':[]};return{'id':_0x4ed07e,'classes':['ck-user__selection',_0x50af12['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x4ed07e},'priority':0x7d0+_0x50af12['orderNumber']};}(_0x40a7fe,_0x4846d8)}),function(_0x5bb180){const _0x426c59=_0x5bb180['model'],_0x10698e=new Map(),_0x70fb99=_0x5bb180['plugins']['get'](r);_0x426c59['markers']['on']('update:user:range',(_0x59e723,_0x9a695d,_0x87c8e,_0x4636b7)=>{if(!_0x4636b7&&_0x10698e['get'](_0x9a695d['name']))return _0x10698e['get'](_0x9a695d['name'])['detach'](),void _0x10698e['delete'](_0x9a695d['name']);const _0x1ba0de=_0x9a695d['name']['split'](':')[0x2];if(_0x1ba0de===_0x70fb99['mySessionId'])return;const _0x40dc39='user:position:'+_0x1ba0de;_0x426c59['markers']['has'](_0x40dc39)&&_0x5bb180['editing']['reconvertMarker'](_0x40dc39),_0x9a695d['on']('change:range',(_0x581d40,_0x1b5cc1,_0x8536ba)=>{if('$graveyard'!=_0x1b5cc1['root']['rootName']&&'$graveyard'==_0x9a695d['getRange']()['root']['rootName']&&!_0x10698e['has'](_0x9a695d['name'])){const _0x32b918=_0x426c59['schema']['getNearestSelectionRange'](_0x8536ba['deletionPosition']);if(_0x32b918){const _0x3e5a7f=ht['fromRange'](_0x32b918);_0x10698e['set'](_0x9a695d['name'],_0x3e5a7f),_0x3e5a7f['on']('change:range',(_0x1edd07,_0x4da520,_0x28b340)=>{if('$graveyard'==_0x3e5a7f['root']['rootName']){const _0x5d236d=_0x426c59['schema']['getNearestSelectionRange'](_0x28b340['deletionPosition']);_0x5d236d?(_0x3e5a7f['start']=_0x5d236d['start'],_0x3e5a7f['end']=_0x5d236d['end']):(_0x10698e['delete'](_0x9a695d['name']),_0x3e5a7f['detach']());}});}}});}),_0x426c59['document']['on']('change',()=>{_0x10698e['size']>0x0&&_0x426c59['enqueueChange']({'isUndoable':!0x1},_0x27c87e=>{for(const [_0x419489,_0x50c764]of _0x10698e)'$graveyard'==_0x426c59['markers']['get'](_0x419489)['getRange']()['root']['rootName']&&(re(_0x419489['split'](':')[0x2],_0x50c764['toRange'](),_0x426c59,_0x27c87e),_0x50c764['detach']());_0x10698e['clear']();});});}(_0x52bc69),this['_domEmitter']['listenTo'](_0x46b77b['document'],'keydown',(_0x1ea7cf,{key:_0x3f2c35})=>{'Escape'===_0x3f2c35&&function(_0x4cb782){_0x4cb782['editing']['view']['change'](_0x4e54a0=>{for(const _0x3a95b9 of _0x4cb782['model']['markers']){if(!_0x3a95b9['name']['startsWith']('user:position'))continue;const _0xb669ff=_0x4cb782['editing']['mapper']['markerNameToElements'](_0x3a95b9['name']);if(_0xb669ff){for(const _0x27b598 of _0xb669ff)_0x4e54a0['removeClass']('ck-user__marker_hovered',_0x27b598);}}});}(_0x52bc69);},{'useCapture':!0x0});}['afterInit'](){const _0x742fb0=this['editor'],_0x575999=_0x742fb0['commands']['get']('undo');_0x575999&&_0x742fb0['model']['on']('applyOperation',(_0x56a8ed,_0x1b672d)=>{const _0x1887f5=_0x1b672d[0x0];if('marker'!=_0x1887f5['type']||!_0x1887f5['name']['startsWith']('user:'))return;const _0x3fd6e6=_0x1887f5['batch'];_0x575999['_createdBatches']['has'](_0x3fd6e6)&&(_0x1887f5['newRange']=_0x1887f5['oldRange']?_0x742fb0['model']['createRange'](_0x1887f5['oldRange']['start'],_0x1887f5['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x44b810=this['editor'],_0x169ded=_0x44b810['model']['document'],_0x44ac8a=_0x44b810['plugins']['get'](r);_0x44b810['model']['enqueueChange']({'isUndoable':!0x1},_0x55e9ea=>{const _0x584f54='user:range:'+_0x44ac8a['mySessionId'],_0x972d72='user:position:'+_0x44ac8a['mySessionId'],_0x527c65=_0x44b810['model']['markers']['has'](_0x584f54);_0x44b810['editing']['view']['hasDomSelection']?re(_0x44ac8a['mySessionId'],_0x169ded['selection']['getFirstRange'](),_0x44b810['model'],_0x55e9ea):_0x527c65&&(_0x55e9ea['removeMarker'](_0x584f54),_0x55e9ea['removeMarker'](_0x972d72));});}}function re(_0x18c8ae,_0x3d5e3d,_0x335993,_0x5c4128){const _0x2b502e='user:range:'+_0x18c8ae,_0x5a0c6e='user:position:'+_0x18c8ae,_0x30524b=_0x3d5e3d['getContainedElement']();let _0x48c8c5=_0x3d5e3d['start'];_0x30524b&&_0x30524b['is']('element','tableCell')&&(_0x48c8c5=function(_0x4cb5af,_0x44c790){for(const _0x326484 of _0x4cb5af['getPositions']())if(_0x44c790['schema']['checkChild'](_0x326484,'$text'))return _0x326484;}(_0x3d5e3d,_0x335993),_0x3d5e3d=_0x5c4128['createRange'](_0x48c8c5));const _0x14c96e=_0x5c4128['createRange'](_0x48c8c5);_0x335993['markers']['has'](_0x2b502e)?(_0x5c4128['updateMarker'](_0x2b502e,{'range':_0x3d5e3d}),_0x5c4128['updateMarker'](_0x5a0c6e,{'range':_0x14c96e})):(_0x5c4128['addMarker'](_0x2b502e,{'range':_0x3d5e3d,'usingOperation':!0x0}),_0x5c4128['addMarker'](_0x5a0c6e,{'range':_0x14c96e,'usingOperation':!0x0}));}function q(_0x2a6d0f,_0x2257b3,_0x2ab46a){const t=_0x2a6d0f['t'];switch(_0x2257b3){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'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');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'},_0x2ab46a);default:return'';}}let K=0x1;class l extends _0x395194{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
+ ((()=>_0x1290d5)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,r,H,_0x2ddcee,_0x4f21f3,_0x1fed11];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x2070b1=this['serverHistory']['getOperations']();for(let _0x4737d6=_0x2070b1['length']-0x1;_0x4737d6>=0x0;_0x4737d6--){const _0xdb9c62=_0x2070b1[_0x4737d6];if(!this['_disconnectionOperations']['has'](_0xdb9c62))return _0xdb9c62['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x222b7e){if(super(_0x222b7e),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x42b3ff(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x495380('collaboration-missing-channelid',this);const _0x2c38bc=_0x222b7e['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x2c38bc,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x127813(),this['_bufferedOperations']=[],this['_knownOperations']=new WeakSet(),this['_knownRootNames']=new Set(),this['set']('_isPendingUpdate',!0x1),this['set']('_hasSynchronizationProblem',!0x1),this['_pendingAction']=null,this['_hasSelectionChanged']=!0x1,this['_sendBufferedOperationsDelayId']=null,this['_baseBufferDelay']=0x12c,this['_currentBufferDelay']=this['_baseBufferDelay'],this['_lastSyncedOperationId']=null,this['_disconnectionOperations']=new WeakSet(),this['_operationIdentifier']=new X(this['_disconnectionOperations']);}['init'](){const _0x5b1aec=this['editor'],_0x1c0c80=_0x5b1aec['plugins']['get'](_0x4f21f3),_0x3ecb6a=_0x5b1aec['plugins']['get'](c);this['listenTo'](_0x1c0c80,'getOperationAuthor',(_0x22de26,_0x291c8c)=>{const _0x2f4242=_0x291c8c[0x0];_0x2f4242['_authorId']&&(_0x22de26['return']=_0x1c0c80['getUser'](_0x2f4242['_authorId']),_0x22de26['stop']()),null===_0x2f4242['_authorId']&&(_0x22de26['return']=null,_0x22de26['stop']());},{'priority':'high'}),this['listenTo'](_0x5b1aec['model']['document']['selection'],'change:range',(_0x713680,_0xc509a4)=>{_0xc509a4['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x5b1aec['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x5b1aec['model']['on']('applyOperation',(_0xc462f3,_0x882788)=>{const _0x4a9e07=_0x882788[0x0];_0x4a9e07['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x4a9e07),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x3ecb6a,'state',this,'_hasSynchronizationProblem',(_0x1ef0a4,_0x58b68f)=>'connected'===_0x1ef0a4&&!_0x58b68f),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x5b1aec['disableReadOnlyMode']('rtc-offline'):_0x5b1aec['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x5b1aec['disableReadOnlyMode']('rtc-offline'):_0x5b1aec['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x17646c=this['editor']['plugins']['get'](r),_0x2154e6=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x17646c['unregister'](this['_channelId']);const _0x228a4a=await this['_service']['reconnect'](_0x2154e6['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x228a4a)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x50e14b=await this['_service']['getConnectedSessions']();_0x17646c['register'](this['_channelId'],_0x50e14b),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x1b851e){if(function(_0x5876a6){return'404'===_0x5876a6['code'];}(_0x1b851e)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x250d65){return'409'===_0x250d65['code'];}(_0x1b851e)){const _0x8f9677=q(this['editor']['locale'],'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');this['_handleReconnectionError'](_0x8f9677);}else{if(!(_0x1b851e instanceof J))throw _0x1b851e;this['_handleReconnectionError']();}}}}['destroy'](){const _0x2f595c=this['editor']['plugins']['get'](c),_0x2e7ced=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x2e7ced['channelSessions']['has'](this['_channelId'])&&_0x2e7ced['unregister'](this['_channelId']),_0x2f595c['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x1396ad){if(this['sessionId']!==_0x1396ad['sessionId']&&this['_lastSyncedOperationId']!==_0x1396ad['lastOperationId'])throw new J();return this['sessionId']=_0x1396ad['sessionId'],this['_handleServerResponse']([],{..._0x1396ad,'wereChangesApplied':!0x1,'data':_0x1396ad['data']},'reconnect');}async['_connectService'](_0x4c84cb,_0x4e6b74=!0x1){const {connection:_0xb6aab5}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0xb6aab5,this['_channelId'])['then'](_0x513a9e=>this['_initSessionsHandling'](_0x513a9e))['catch'](_0x22f884=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x22f884);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x2441cf,_0x40c449)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x40c449);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x19f701=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x4c84cb);this['_isPendingUpdate']=!0x0;const _0x583bb0=await this['_service']['connect'](_0xb6aab5,this['_compressOperations'](_0x4c84cb),_0x19f701);if(this['sessionId']=_0x583bb0['sessionId'],_0x4e6b74){if(!_0x583bb0['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x583bb0['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x4c84cb,_0x583bb0,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x583bb0,_0x4c84cb);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x469229=this['editor']['plugins']['get'](r),_0x1cd7cf=this['editor']['plugins']['get'](H),_0x191101=_0x469229['channelSessions']['get'](this['_channelId']);_0x191101&&_0x191101['length']>0x1?_0x1cd7cf['createUserMarkerOperations']():this['listenTo'](_0x469229,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x469229['channelSessions']['get'](this['_channelId'])['length']&&_0x1cd7cf['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x2372f1,_0x3119a3,_0x16a693,_0x1baa03){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x3119a3){const _0x300d4a=this['_decompressOperations'](_0x16a693,_0x1baa03);await this['_fetchMissingUsers'](_0x300d4a),this['_handleExternalOperations'](_0x300d4a,_0x3119a3,_0x16a693['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x5c1637}=this['editor'];let _0x2c3762;try{_0x2c3762=await this['_service']['getDocumentDetails']();}catch(_0x14be80){const _0x22808e=q(_0x5c1637,'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['_handleReconnectionError'](_0x22808e);}const _0xc99ae7=_0x2c3762['currentDocumentSession']||_0x2c3762['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0xc99ae7['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x5b8db2=q(_0x5c1637,'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.');this['_handleReconnectionError'](_0x5b8db2);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x338276){const _0x49a7ee=this['editor']['plugins']['get'](r);this['listenTo'](_0x49a7ee,'sessionAdd:'+this['_channelId'],(_0x513914,{session:_0x1c352a})=>{if(_0x1c352a['id']===_0x49a7ee['mySessionId']){_0x513914['off']();const _0x29b930=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x4e9e6c=_0x1c352a['permissions'];_0x29b930&&_0x29b930['isEnabled']&&(_0x4e9e6c=_0x4e9e6c['filter'](_0x1940a9=>'document:write'!==_0x1940a9)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x4e9e6c,this['_channelId']);}}),_0x49a7ee['register'](this['_channelId'],_0x338276);}['_initThrowingOnDataSet'](){const _0x23085b=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x43c379)=>{if(!_0x43c379[_0x43c379['length']-0x1]['suppressErrorInCollaboration'])throw new _0x495380('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x23085b['apply'](this['editor']['data'],_0x43c379);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x4931a1,[_0x135b86])=>{if(this['_document']['version'])throw new _0x495380('realtimecollaborationclient-init-document-already-initialized',this);_0x4931a1['stop'](),this['_setPendingAction']();const _0x493cf6=this['editor']['config']['get']('rootsAttributes'),_0x13a33f=this['_getOperationsFromInitData'](_0x135b86,_0x493cf6);0x0==_0x13a33f['length']&&_0x13a33f['push'](new _0x4bb78d(0x0)),_0x4931a1['return']=this['_connectService'](_0x13a33f)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x426353=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x426353))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x6dbb65,[_0xfd9c47,_0x4930b7])=>{_0x6dbb65['stop']();const _0x4ebb66=this['editor']['model']['document']['getRoot'](_0xfd9c47);if(!this['_knownRootNames']['has'](_0xfd9c47)){const _0x95af24=_0x4930b7&&_0x4930b7['data']?_0x4930b7['data']:'',_0x4aa80e=_0x4930b7&&_0x4930b7['attributes']?_0x4930b7['attributes']:{};await this['_loadRoot'](_0xfd9c47,_0x95af24,_0x4aa80e);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x4ebb66['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x4ebb66);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x19d642){const _0x39e838=this['editor']['plugins']['get'](_0x4f21f3),{connection:_0x50743f}=this['editor']['plugins']['get'](c),_0x12ebd9=new Set();for(const _0x1eab19 of _0x19d642){const _0x10b419=_0x1eab19['_authorId'];_0x10b419&&!_0x39e838['getUser'](_0x10b419)&&_0x12ebd9['add'](_0x10b419);}if(0x0===_0x12ebd9['size'])return;const _0x2cacc3=await lt['getMany'](_0x50743f,Array['from'](_0x12ebd9));for(const _0x36f114 of _0x2cacc3)_0x39e838['getUser'](_0x36f114['id'])||_0x39e838['addUser'](_0x36f114);}['_getOperationsFromInitData'](_0xea6ed2,_0x410ea8={}){const _0x7bf0d3=this['editor']['model'],_0x425f4d=[];let _0x2c8fb5=0x0;const _0x750192='string'==typeof _0xea6ed2?{'main':_0xea6ed2}:_0xea6ed2;for(const _0x3ce0fa of Object['keys'](_0x750192)){if(!this['_document']['roots']['has'](_0x3ce0fa))throw new _0x495380('realtimecollaborationclient-init-non-existent-root',this);const _0xe60c0f=this['editor']['data']['parse'](_0x750192[_0x3ce0fa]),_0x51b86e=this['_document']['getRoot'](_0x3ce0fa),_0x43eeb1=new _0x165818(_0x7bf0d3['createPositionAt'](_0x51b86e,0x0),_0xe60c0f,_0x2c8fb5++);_0x425f4d['push'](_0x43eeb1);for(const [_0xae3712,_0x1f5937]of _0xe60c0f['markers']){const _0x3cd855=_0x7bf0d3['createRange'](_0x7bf0d3['createPositionFromPath'](_0x51b86e,_0x1f5937['start']['path']['slice']()),_0x7bf0d3['createPositionFromPath'](_0x51b86e,_0x1f5937['end']['path']['slice']())),_0x5f3778=new _0x2d761b(_0xae3712,null,_0x3cd855,_0x7bf0d3['markers'],!0x0,_0x2c8fb5++);_0x425f4d['push'](_0x5f3778);}}if(_0x410ea8)for(const [_0xb3412c,_0x435d17]of Object['entries'](_0x410ea8)){const _0x3eb709=_0x7bf0d3['document']['getRoot'](_0xb3412c);if(!_0x3eb709)throw new _0x495380('multi-root-editor-root-attributes-no-root',null);for(const [_0x3e1fdb,_0x6e2383]of Object['entries'](_0x435d17))if(null!==_0x6e2383){const _0x33aef6=new _0x4096c6(_0x3eb709,_0x3e1fdb,null,_0x6e2383,_0x2c8fb5++);_0x425f4d['push'](_0x33aef6);}}return _0x425f4d;}async['_loadRoot'](_0x1de52e,_0x364930,_0x4c947a){this['_getOperationsFromInitData']({[_0x1de52e]:_0x364930},{[_0x1de52e]:_0x4c947a})['forEach']((_0x4e3b10,_0x5abc70)=>{_0x4e3b10['baseVersion']=this['_document']['version']+_0x5abc70,_0x4e3b10['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x4e3b10);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x16f292,_0x25cabd){let _0xf24e8c;this['_offset']=_0x16f292['offset'];const _0x13241e=_0x16f292['wereChangesApplied']&&!_0x16f292['initData'],_0x4df750=_0x13241e?0x0:_0x16f292['data']['baseVersion'];if(_0x25cabd['forEach'](_0x48b966=>{_0x48b966['_isInit']=!0x0,_0x48b966['createdAt']=_0x16f292['sessionCreatedAt'],_0x48b966['_authorId']=null;}),_0x13241e)_0xf24e8c=_0x25cabd,this['_applyOperationsSet'](_0xf24e8c,_0x13241e);else{if(_0x16f292['initData']){const _0x3306a7=this['_getOperationsFromInitData'](_0x16f292['initData']);this['_document']['history']['version']=-_0x3306a7['length'],_0x3306a7['forEach'](_0x59f94a=>{_0x59f94a['baseVersion']-=_0x3306a7['length'],_0x59f94a['createdAt']=_0x16f292['sessionCreatedAt'],_0x59f94a['_isInit']=!0x0,_0x59f94a['_authorId']=null;}),this['_applyOperationsSet'](_0x3306a7,!0x0),this['serverHistory']['version']=-_0x3306a7['length']+this['_offset'],this['_updateServerHistory'](_0x3306a7);}this['_document']['history']['version']=_0x4df750,_0xf24e8c=this['_decompressOperations'](_0x16f292['data'],_0x16f292['metadata']),await this['_fetchMissingUsers'](_0xf24e8c),this['_applyOperationsSet'](_0xf24e8c,_0x13241e);}_0x16f292['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0xf24e8c,_0x16f292['lastOperationId']),this['_lastSyncedOperationId']=_0x16f292['lastOperationId']),this['serverHistory']['version']=_0x4df750+this['_offset'],this['_updateServerHistory'](_0xf24e8c),_0x25cabd['filter'](_0x3d3fcd=>{const _0x1f5623=this['_getAffectedRoot'](_0x3d3fcd);return _0x1f5623&&!this['_knownRootNames']['has'](_0x1f5623);})['forEach']((_0xe0781c,_0x1035b5)=>{_0xe0781c['baseVersion']=this['_document']['version']+_0x1035b5,this['_saveOperationInBuffer'](_0xe0781c);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x31ce09,_0x3adc27){throw this['_isPendingUpdate']=!0x0,_0x3adc27&&console['error'](_0x3adc27),new _0x495380(_0x31ce09,this['editor']);}['_saveOperationInBuffer'](_0x488e60){this['_knownOperations']['has'](_0x488e60)||(this['_knownOperations']['add'](_0x488e60),this['_bufferedOperations']['push'](_0x488e60),this['_pendingAction']||'marker'==_0x488e60['type']&&!_0x488e60['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x326b1c=!0x1){!_0x326b1c&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x35f91b=>{_0x35f91b&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x4c623a=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x849608){return _0x849608['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x849608['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x849608['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x4c623a))throw _0x4c623a;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x1c8653=>{this['on']('change:_isPendingUpdate',()=>{_0x1c8653();});});}async['_sendBufferedOperations'](){const _0x58783a=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x58783a['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x3582fe=[...this['_bufferedOperations']];for(const _0x1a1ca9 of _0x3582fe)_0x1a1ca9['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x1a1ca9);const _0x505bb6=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x3582fe),_0x287f25=K++,_0x3e24b=this['_compressOperations'](_0x3582fe),_0x390601=await this['_service']['sendOperations'](_0x3e24b,_0x3e24b['baseVersion'],_0x505bb6);try{return await this['_handleServerResponse'](_0x3582fe,_0x390601,_0x287f25);}catch(_0x51c303){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x51c303);}}async['_handleServerResponse'](_0x567d4b,_0x3bf4c9,_0x3f06b7){if('error'in _0x3bf4c9)throw _0x3bf4c9['error'];let _0xaa7ca2=!0x1;if(_0x3bf4c9['wereChangesApplied']){_0x3bf4c9['lastOperationId']&&(this['_lastSyncedOperationId']=_0x3bf4c9['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x3534c=>!_0x567d4b['includes'](_0x3534c));for(const _0x16c4cb of _0x567d4b)_0x16c4cb['createdAt']='lastOperationAcceptedAt'in _0x3bf4c9&&_0x3bf4c9['lastOperationAcceptedAt']||void 0x0;Q(_0x567d4b,_0x3bf4c9['version']-_0x567d4b['length']),this['_updateServerHistory'](_0x567d4b);const _0x2fee7c=_0x567d4b['filter'](_0x2da1fc=>{if(!_0x2da1fc['_isInit'])return!0x1;const _0x16e927=this['_getAffectedRoot'](_0x2da1fc);return _0x16e927&&!this['_knownRootNames']['has'](_0x16e927);});Q(_0x2fee7c,this['_document']['version']),this['_applyOperationsSet'](_0x2fee7c),_0xaa7ca2=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x28ce72=this['_decompressOperations'](_0x3bf4c9['data'],_0x3bf4c9['metadata'])['filter'](_0x2fdcae=>_0x2fdcae['baseVersion']>=this['_lastServerVersion']);_0x28ce72['forEach'](_0x692048=>this['_addKnownRoot'](_0x692048)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x50e49e=>!_0x50e49e['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x50e49e))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x28ce72),_0xaa7ca2=this['_handleExternalOperations'](_0x28ce72,_0x3bf4c9['version'],_0x3bf4c9['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0xaa7ca2?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0xabfec3,_0x5ccfd7,_0x1b0fdb){try{const _0x3612ac={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x1a41f7,operationsB:_0x3df084,originalOperations:_0x4dfa31}=_0x50f3cb(_0xabfec3,this['_bufferedOperations'],_0x3612ac);Q(_0x1a41f7,this['_document']['version']),Q(_0x3df084,_0x5ccfd7);for(const _0x164e0c of _0x1a41f7){const _0x3f3927=_0x4dfa31['get'](_0x164e0c);_0x164e0c['_authorId']=_0x3f3927?_0x3f3927['_authorId']:null;}_0x1b0fdb&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0xabfec3,_0x1b0fdb),this['_lastSyncedOperationId']=_0x1b0fdb),this['_bufferedOperations']=[..._0x3df084],this['_applyOperationsSet'](_0x1a41f7),this['_updateServerHistory'](_0xabfec3);}catch(_0x3000da){return console['error'](_0x3000da),!0x1;}return!0x0;}['_applyOperationsSet'](_0x55540e,_0x21d039=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x1474ad=>{for(const _0x3e3e5c of _0x55540e)this['_knownOperations']['add'](_0x3e3e5c),this['_addKnownRoot'](_0x3e3e5c),_0x1474ad['batch']['addOperation'](_0x3e3e5c),this['editor']['model']['applyOperation'](_0x3e3e5c);});}['_addKnownRoot'](_0x3859b5){const _0x18c3f9=this['_getAffectedRoot'](_0x3859b5);_0x18c3f9&&this['_knownRootNames']['add'](_0x18c3f9);}['_getAffectedRoot'](_0x3d0e43){let _0x3a8066,_0x55c7dc;switch(_0x3d0e43['type']){case'insert':_0x3a8066=_0x3d0e43['position']['root'];break;case'marker':if(_0x55c7dc=_0x3d0e43['newRange'],!_0x55c7dc)return null;_0x3a8066=_0x55c7dc['root'];break;case'addRootAttribute':_0x3a8066=_0x3d0e43['root'];break;case'addRoot':_0x3a8066=_0x3d0e43['affectedSelectable'];break;case'move':_0x3a8066=_0x3d0e43['targetPosition']['root'];break;default:return null;}return _0x3a8066['rootName'];}['_updateServerHistory'](_0x4370a8){_0x4370a8['forEach'](_0x115935=>{const _0x4a112d=_0x115935['clone']();_0x4a112d['_authorId']=_0x115935['_authorId'],_0x4a112d['_isInit']=!!_0x115935['_isInit'],_0x4a112d['createdAt']=_0x115935['createdAt'],_0x4a112d['baseVersion']+=this['_offset'],_0x115935['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x4a112d),this['serverHistory']['addOperation'](_0x4a112d);});}['_handleReconnectionError'](_0x15d02a){const _0x5a30ce=this['editor']['plugins']['get']('Notification'),_0x3e6465=this['editor']['locale'];_0x15d02a||(_0x15d02a=q(_0x3e6465,'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.')),_0x5a30ce['showWarning'](_0x15d02a,{'title':q(_0x3e6465,'Synchronization\x20issue'),'namespace':'real-time-collaboration'}),this['_hasSynchronizationProblem']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_bufferedOperations']=[],this['editor']['plugins']['get'](c)['destroy']();}['_setPendingAction'](){this['_pendingAction']||(this['_pendingAction']=this['editor']['plugins']['get'](_0x2ddcee)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x2ddcee)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x27b40a){const _0x3a0c4a=_0x27b40a['map'](_0x5c4a39=>_0x5c4a39['toJSON']());return this['_compressor']['compress'](_0x3a0c4a);}['_decompressOperations'](_0x7559d9,_0x209b0f){return this['_compressor']['decompress'](_0x7559d9)['map']((_0x4d5d0c,_0x24658b)=>{const _0x21c412='init'==_0x209b0f[_0x24658b]['type'];if('InsertOperation'==_0x4d5d0c['__className']){const _0x313713=_0x4d5d0c['position']['root'];!this['_document']['getRoot'](_0x313713)&&(this['_document']['createRoot']('$root',_0x313713)['_isAttached']=!0x1);}const _0x4b2166=_0x3a5f2b['fromJSON'](_0x4d5d0c,this['_document']);return _0x4b2166['wasUndone']=_0x4d5d0c['wasUndone'],_0x4b2166['_isInit']=_0x21c412,_0x4b2166['_authorId']=_0x21c412?null:_0x209b0f[_0x24658b]['userId'],_0x4b2166['_isDisconnection']='cs:removeUser'===_0x209b0f[_0x24658b]['type'],_0x4b2166['createdAt']=_0x209b0f[_0x24658b]['createdAt'],_0x4b2166;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x59e74e=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x59e74e&&_0x59e74e['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x3bba12,_0x511e95){for(const _0x3dfcab of _0x3bba12)_0x3dfcab['baseVersion']=_0x511e95++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x179dcf){this['_ignoredOperations']=_0x179dcf,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x2dea1f){let _0x9be696=_0x2dea1f['length'];for(;_0x9be696--;){const _0xd25461=_0x2dea1f[_0x9be696];if(!this['_ignoredOperations']['has'](_0xd25461)){if(!this['_operationToId']['has'](_0xd25461)){const _0x23ca87=_0x857a83()['slice'](0x1,0x12);this['_operationToId']['set'](_0xd25461,_0x23ca87);}return this['_operationToId']['get'](_0xd25461);}}}['setIdForTheLastOperation'](_0x1d73d1,_0x127218){if(!_0x127218)return;let _0x235fb1=_0x1d73d1['length'];for(;_0x235fb1--;){const _0x569d7f=_0x1d73d1[_0x235fb1];this['_ignoredOperations']['has'](_0x569d7f)||this['_operationToId']['set'](_0x569d7f,_0x127218);}}}class n extends _0x395194{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x29e656{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
+ ((()=>_0x3ed0ed)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x4f21f3];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x1f86ce){super(_0x1f86ce),this['_services']=new Map();}async['init'](){const _0x3ae117=this['context'],_0x2d57bd=_0x3ae117['plugins']['get']('CommentsRepository');if(_0x3ae117['plugins']['get'](c)['addToReconnectionStack'](this),_0x2d57bd['adapter']={'addCommentThread':async({channelId:_0x5468ed,threadId:_0x20bcba,comments:_0x5f1339,resolvedAt:_0x34ab8f,resolvedBy:_0x2bfff1,context:_0x150f76,attributes:_0x2efa03})=>{const _0x52a6c7=await this['_getService'](_0x5468ed)['addCommentThread']({'commentThreadId':_0x20bcba,'comments':_0x5f1339['map'](_0x556605=>function(_0x64612a,_0x29b504,_0x3c624e){return{'commentThreadId':_0x3c624e,'commentId':_0x64612a['commentId'],'userId':_0x64612a['authorId'],'content':_0x64612a['content'],'documentId':_0x29b504,'createdAt':_0x64612a['createdAt'],'attributes':_0x64612a['attributes']||{}};}(_0x556605,_0x5468ed,_0x20bcba)),'resolvedAt':_0x34ab8f,'resolvedBy':_0x2bfff1,'context':_0x150f76,'attributes':_0x2efa03})['catch'](ut);return{'threadId':_0x52a6c7['commentThreadId'],'comments':_0x52a6c7['comments']};},'getCommentThread':async({channelId:_0x79803f,threadId:_0xbade52})=>{const _0x5353de=await this['_getService'](_0x79803f)['getCommentThread'](_0xbade52)['catch'](ut);return _0x5353de['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x5353de]),{'threadId':_0x5353de['commentThreadId'],'comments':_0x5353de['comments']['map'](S),'context':_0x5353de['context'],'resolvedAt':_0x5353de['resolvedAt'],'resolvedBy':_0x5353de['resolvedBy'],'attributes':_0x5353de['attributes']||{}});},'updateCommentThread':async({channelId:_0x49370d,threadId:_0x1a6a91,context:_0x2b27a8,unlinkedAt:_0x5a5d77,attributes:_0x4664ba})=>this['_getService'](_0x49370d)['updateCommentThread']({'commentThreadId':_0x1a6a91,'context':_0x2b27a8,'attributes':_0x4664ba,'unlinkedAt':_0x5a5d77})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x43ddf4,threadId:_0x4cca77})=>{const _0x26cc54=await this['_getService'](_0x43ddf4)['resolveCommentThread'](_0x4cca77)['catch'](B)['catch'](ut);return{'threadId':_0x26cc54['commentThreadId'],'resolvedAt':_0x26cc54['resolvedAt'],'resolvedBy':_0x26cc54['resolvedBy']};},'reopenCommentThread':async({channelId:_0x59ff84,threadId:_0x571f7f})=>this['_getService'](_0x59ff84)['reopenCommentThread'](_0x571f7f)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x5463e4,threadId:_0xf47532})=>this['_getService'](_0x5463e4)['removeCommentThread'](_0xf47532)['catch'](B)['catch'](ut),'addComment':({channelId:_0x5a776f,threadId:_0x1f74e8,commentId:_0x479661,content:_0x546ccc,attributes:_0x2e6c9c})=>this['_getService'](_0x5a776f)['addComment'](_0x1f74e8,_0x479661,_0x546ccc,_0x2e6c9c)['catch'](ut),'updateComment':({channelId:_0x3e5c06,threadId:_0x343d4c,commentId:_0x186e48,content:_0x503ef1,attributes:_0x889897})=>this['_getService'](_0x3e5c06)['updateComment'](_0x343d4c,_0x186e48,_0x503ef1,_0x889897)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x1388bc,threadId:_0x5ad75f,commentId:_0x43d2f0})=>this['_getService'](_0x1388bc)['removeComment'](_0x5ad75f,_0x43d2f0)['catch'](B)['catch'](ut)},_0x3ae117 instanceof _0x234472){const _0x299d68=_0x3ae117['config']['get']('collaboration.channelId'),_0x900013=_0x3ae117['plugins']['get'](r);await this['_setUpService'](_0x299d68);const _0xedc334=await this['_services']['get'](_0x299d68)['getConnectedSessions']();this['listenTo'](_0x900013,'sessionAdd:'+_0x299d68,(_0x10d5aa,{session:_0x59a506})=>{_0x59a506['id']===_0x900013['mySessionId']&&(_0x10d5aa['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x59a506['permissions'],_0x299d68));}),_0x900013['register'](_0x299d68,_0xedc334);}}async['_setUpService'](_0x3c102f){if(this['_services']['has'](_0x3c102f))throw new _0x495380('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x3c102f});const _0x16051=this['context']['plugins']['get']('CommentsRepository'),_0x3d56db=new a['CommentsService'](_0x3c102f);this['_services']['set'](_0x3c102f,_0x3d56db),this['listenTo'](_0x3d56db,'commentThreadAdded',(_0x586fe3,_0x585c8b)=>{const {commentThreadId:_0x183b3e,documentId:_0x4e41da,context:_0x1c2559,attributes:_0x2c8341,resolvedAt:_0x19f28b,resolvedBy:_0x5673f1,comments:_0x15287b}=_0x585c8b;_0x16051['getCommentThread'](_0x183b3e)||_0x16051['addCommentThread']({'threadId':_0x183b3e,'channelId':_0x4e41da,'comments':_0x15287b?_0x15287b['map'](S):[],'context':_0x1c2559,'attributes':_0x2c8341,'resolvedAt':_0x19f28b,'resolvedBy':_0x5673f1,'isFromAdapter':!0x0});}),this['listenTo'](_0x3d56db,'commentThreadUpdated',(_0x524aae,{commentThreadId:_0x41c722,documentId:_0x264fbf,context:_0x5a0297,unlinkedAt:_0x271cf6,attributes:_0x3bd797})=>{_0x16051['getCommentThread'](_0x41c722)&&_0x16051['updateCommentThread']({'threadId':_0x41c722,'channelId':_0x264fbf,'context':_0x5a0297,'unlinkedAt':_0x271cf6,'attributes':_0x3bd797,'isFromAdapter':!0x0});}),this['listenTo'](_0x3d56db,'commentThreadResolved',(_0x1e2297,{commentThreadId:_0x2e8859,resolvedBy:_0x184288,resolvedAt:_0x172287})=>{const _0x5f4dfa=_0x16051['getCommentThread'](_0x2e8859);_0x5f4dfa&&_0x5f4dfa['resolve']({'resolvedBy':_0x184288,'resolvedAt':_0x172287,'isFromAdapter':!0x0});}),this['listenTo'](_0x3d56db,'commentThreadReopened',(_0x1bca0c,{commentThreadId:_0x3b8840})=>{const _0x3589e4=_0x16051['getCommentThread'](_0x3b8840);_0x3589e4&&_0x3589e4['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x3d56db,'commentThreadRemoved',(_0x146f7e,{commentThreadId:_0x3dfce7})=>{const _0x201d6d=_0x16051['getCommentThread'](_0x3dfce7);_0x201d6d&&_0x201d6d['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x3d56db,'commentAdded',(_0x2b946b,_0xff4c60)=>{const _0x17fc41=_0xff4c60['commentThreadId'],_0x253578=_0x16051['getCommentThread'](_0x17fc41);_0x253578&&_0x253578['addComment']({...S(_0xff4c60),'isFromAdapter':!0x0});}),this['listenTo'](_0x3d56db,'commentUpdated',(_0x14103b,{commentThreadId:_0x2e0f8d,commentId:_0x30ee5f,content:_0x3c5678,attributes:_0x3b391})=>{const _0x280db6=_0x16051['getCommentThread'](_0x2e0f8d);if(_0x280db6){const _0x139bbf=_0x280db6['getComment'](_0x30ee5f);_0x139bbf&&_0x139bbf['update']({'content':_0x3c5678,'attributes':_0x3b391,'isFromAdapter':!0x0});}}),this['listenTo'](_0x3d56db,'commentRemoved',(_0x17c436,{commentThreadId:_0x397d0d,commentId:_0xa58e3a})=>{const _0x4991ff=_0x16051['getCommentThread'](_0x397d0d);if(_0x4991ff){const _0x39ea48=_0x4991ff['getComment'](_0xa58e3a);_0x39ea48&&_0x39ea48['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x3c102f);}['destroy'](){if(this['context']instanceof _0x234472){const _0x3df8ea=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x3df8ea);}}['_terminateService'](_0x3cb2cc){if(!this['_services']['has'](_0x3cb2cc))throw new _0x495380('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x3cb2cc});this['_getService'](_0x3cb2cc)['disconnect'](),this['_services']['delete'](_0x3cb2cc);}async['reconnect'](){for(const _0x116912 of this['_services']['keys']())await this['_connectService'](_0x116912);if(this['context']instanceof _0x234472){const _0x4bc478=this['context']['config']['get']('collaboration.channelId'),_0x2766ca=this['context']['plugins']['get'](r);_0x2766ca['unregister'](_0x4bc478);const _0x3eaa9a=await this['_services']['get'](_0x4bc478)['getConnectedSessions']();_0x2766ca['register'](_0x4bc478,_0x3eaa9a);}}async['_connectService'](_0x5b0aa4){const {connection:_0x4349a4}=this['context']['plugins']['get'](c),_0x4ede12=this['context']['plugins']['get']('CommentsRepository'),_0x4a411e=this['_services']['get'](_0x5b0aa4),_0x421bfb=await _0x4a411e['connect'](_0x4349a4);await this['_fetchMissingUsersForThreads'](_0x421bfb);const _0x1da1ce=new Set(Array['from'](_0x4ede12['getCommentThreads']({'channelId':_0x5b0aa4}),_0x53e275=>_0x53e275['id']));for(const _0x418b4b of _0x421bfb)_0x418b4b['deletedAt']||_0x1da1ce['delete'](_0x418b4b['commentThreadId']);for(const _0x485f84 of _0x1da1ce)_0x4ede12['getCommentThread'](_0x485f84)['remove']({'isFromAdapter':!0x0});for(const _0x258fa3 of _0x421bfb){let _0x370a68=_0x4ede12['getCommentThread'](_0x258fa3['commentThreadId']);const {commentThreadId:_0x2c09bc,context:_0x2f6590,attributes:_0x52477e,resolvedBy:_0x38c322,resolvedAt:_0x244fef,unlinkedAt:_0x5b7f93,deletedAt:_0x37be66}=_0x258fa3;if(_0x37be66)continue;_0x370a68||(_0x370a68=_0x4ede12['addCommentThread']({'channelId':_0x5b0aa4,'threadId':_0x2c09bc,'context':_0x2f6590,'attributes':_0x52477e||{},'resolvedBy':_0x38c322,'resolvedAt':_0x244fef,'unlinkedAt':_0x5b7f93,'isFromAdapter':!0x0}));const _0x3577a3=new Set(Array['from'](_0x370a68['comments'],_0x2ba04a=>_0x2ba04a['id']));for(const _0x25e290 of _0x258fa3['comments'])_0x3577a3['delete'](_0x25e290['commentId']);for(const _0x1d7193 of _0x3577a3)_0x370a68['getComment'](_0x1d7193)['remove']({'isFromAdapter':!0x0});for(const _0x47a319 of _0x258fa3['comments']){const _0x4a7c56=_0x370a68['getComment'](_0x47a319['commentId']);_0x4a7c56?_0x4a7c56['content']!==_0x47a319['content']&&_0x4a7c56['update']({'content':_0x47a319['content'],'isFromAdapter':!0x0}):_0x370a68['addComment'](Object['assign'](S(_0x47a319),{'isFromAdapter':!0x0}));}}}['_getService'](_0x118255){if(!this['_services']['has'](_0x118255))throw new _0x495380('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x118255});return this['_services']['get'](_0x118255);}async['_fetchMissingUsersForThreads'](_0x96f46e){const _0x229a24=this['context']['plugins']['get'](_0x4f21f3),{connection:_0x4c0744}=this['context']['plugins']['get'](c),_0x4ac240=new Set();for(const {resolvedBy:_0x1c79d9,comments:_0x55ff09}of _0x96f46e){_0x1c79d9&&!_0x229a24['getUser'](_0x1c79d9)&&_0x4ac240['add'](_0x1c79d9);for(const {userId:_0x48e0e5}of _0x55ff09)_0x229a24['getUser'](_0x48e0e5)||_0x4ac240['add'](_0x48e0e5);}if(0x0===_0x4ac240['size'])return;const _0x181eed=await lt['getMany'](_0x4c0744,Array['from'](_0x4ac240));for(const _0x234974 of _0x181eed)_0x229a24['getUser'](_0x234974['id'])||_0x229a24['addUser'](_0x234974);}}async function B(_0x1c87f4){if('404'!==_0x1c87f4['code'])throw _0x1c87f4;}function ut(_0x494c70){if((_0x2d1b8a=_0x494c70)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x2d1b8a['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2d1b8a['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x2d1b8a;throw _0x494c70;}function S(_0x198bdd){return{'threadId':_0x198bdd['commentThreadId'],'commentId':_0x198bdd['commentId'],'content':_0x198bdd['content'],'createdAt':_0x198bdd['createdAt'],'authorId':_0x198bdd['userId'],'attributes':_0x198bdd['attributes']||{}};}class g extends _0x395194{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
+ ((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x179ec9){super(_0x179ec9);const _0xbe13d3=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0xbe13d3);}['init'](){const _0x338528=this['editor']['plugins']['get'](c),_0x5331dc=this['editor']['plugins']['get']('TrackChangesEditing');return _0x5331dc['adapter']={'getSuggestion':async _0x25dd6f=>{await this['_waitForServiceReady']();const _0x4e9b67=await this['_trackChangesService']['get'](_0x25dd6f)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x4e9b67]),_0x4e9b67;},'addSuggestion':async({id:_0x5750ca,type:_0x556c04,data:_0x46416d,originalSuggestionId:_0x4a3291,attributes:_0x6cf6be})=>{await this['_waitForServiceReady']();const _0x4990c9={'id':_0x5750ca,'type':_0x556c04,'data':_0x46416d,'originalSuggestionId':_0x4a3291,'attributes':_0x6cf6be},_0x1a09a1=await this['_trackChangesService']['add'](_0x5750ca,_0x556c04,_0x46416d,_0x4a3291,_0x6cf6be)['catch'](_0x1711b3=>{if(ft(_0x1711b3))return new Promise(_0x3a8f4f=>{this['_bufferedRequests']['set'](_0x5750ca,{'resolve':_0x3a8f4f,'suggestionData':_0x4990c9});});throw _0x1711b3;});return this['_bufferedRequests']['delete'](_0x5750ca),_0x1a09a1;},'updateSuggestion':async(_0x58a4ef,_0x36952a)=>{if(await this['_waitForServiceReady'](),'open'!==_0x36952a['state'])return this['_trackChangesService']['update'](_0x58a4ef,_0x36952a)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x7e2eb8,_0xddd8a1)=>{_0x5331dc['hasSuggestion'](_0xddd8a1['id'])&&(_0x5331dc['getSuggestion'](_0xddd8a1['id'])['attributes']=_0xddd8a1['attributes']);}),this['_trackChangesService']['connect'](_0x338528['connection'])['then'](_0x31f623=>(_0x338528['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x31f623)['then'](()=>{for(const _0x3f5ccd of _0x31f623){_0x5331dc['addSuggestionData'](_0x3f5ccd)['_saved']=!0x0;}})));}async['reconnect'](){const _0x58959a=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x7249ce}=this['editor']['plugins']['get'](c),_0x1b9f60=await this['_trackChangesService']['connect'](_0x7249ce);await this['_fetchMissingUsersForThreads'](_0x1b9f60);for(const {suggestionData:_0x12dc50,resolve:_0x46b134}of this['_bufferedRequests']['values']()){let _0x31205a=_0x1b9f60['find'](_0x501419=>_0x501419['id']===_0x12dc50['id']);_0x31205a||(_0x31205a=await this['_trackChangesService']['add'](_0x12dc50['id'],_0x12dc50['type'],_0x12dc50['data'],_0x12dc50['originalSuggestionId'])),_0x46b134(_0x31205a);}for(const _0x5aa441 of _0x1b9f60)_0x58959a['hasSuggestion'](_0x5aa441['id'])||_0x58959a['addSuggestionData'](_0x5aa441);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x576126=>{this['listenTo'](this['_trackChangesService'],'connected',_0x1c1249=>{_0x1c1249['off'](),_0x576126();});});}async['_fetchMissingUsersForThreads'](_0x281673){const _0x3ec72a=this['editor']['plugins']['get'](_0x4f21f3),{connection:_0x2e4d6b}=this['editor']['plugins']['get'](c),_0x3ec5f0=new Set();for(const {authorId:_0x4421b5}of _0x281673)_0x3ec72a['getUser'](_0x4421b5)||_0x3ec5f0['add'](_0x4421b5);if(0x0===_0x3ec5f0['size'])return;const _0x4dc046=await lt['getMany'](_0x2e4d6b,Array['from'](_0x3ec5f0));for(const _0x3488aa of _0x4dc046)_0x3ec72a['getUser'](_0x3488aa['id'])||_0x3ec72a['addUser'](_0x3488aa);}}function R(_0x200b29){if(ft(_0x200b29))return new Promise(()=>{});throw _0x200b29;}function ft(_0x5b21e7){return _0x5b21e7['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x5b21e7['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x395194{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x90b920=this['editor']['plugins']['get'](c),_0x2b97e2=this['editor']['plugins']['get']('CommentsEditing'),_0x4a9594=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x90b920,'change:state',(_0x36c27,_0x308541,_0x47f60d)=>{_0x2b97e2['isThreadsLoadingPaused']='connected'!==_0x47f60d;});}),this['listenTo'](_0x90b920,'change:state',(_0x5d5464,_0x180c80,_0x288b94)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x288b94);}),_0x4a9594['_setUpService'](this['editor']['config']['get']('collaboration.channelId'));}['destroy'](){this['editor']['plugins']['get'](a)['_terminateService'](this['editor']['config']['get']('collaboration.channelId')),super['destroy']();}}class p extends _0x395194{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x395194{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
+ ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x4f21f3];}constructor(_0x32bba4){super(_0x32bba4);const _0x19af18=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x19af18);}async['init'](){const _0x154c62=this['editor']['plugins']['get'](l),_0x541d62=_0x154c62['serverHistory'],_0x31dd81=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x541d62,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x154c62['sessionId']});const _0x3caa9d=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x545023=await tt['isBundleUploaded'](_0x31dd81['connection'],_0x3caa9d);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x2506fb})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x2506fb)),'updateRevisions':async _0x5e6322=>{await this['_waitForServiceReady']();const _0x359d46=this['_revisionTracker']['currentRevision'];if(_0x545023&&0x1===_0x5e6322['length']&&_0x5e6322[0x0]['id']===_0x359d46['id'])return _0x5e6322;for(const _0x1dc53e of _0x5e6322)_0x1dc53e['id']===_0x359d46['id']&&(_0x1dc53e['isEmptyCurrent']=_0x1dc53e['fromVersion']===_0x1dc53e['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x5e6322,this['_lastRequestId'])['then'](_0x176200=>(this['_lastRequestId']=_0x176200,_0x5e6322))['catch'](_0x5ca2d6=>{if(st(_0x5ca2d6)||'400'===_0x5ca2d6['code']&&void 0x0!==_0x5ca2d6['data']['wrongRequestId']){for(const _0x4515e9 of _0x5e6322){!this['_revisionTracker']['repository']['getRevision'](_0x4515e9['id'])||this['_revisionTracker']['_bufferUpdate'](_0x4515e9['id'],_0x4515e9,!0x1);}if(st(_0x5ca2d6))throw _0x5ca2d6;return _0x5e6322;}throw _0x5ca2d6;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x44a4a9,{revisionsData:_0x179d10,requestId:_0x4d1231})=>{Math['max'](..._0x179d10['map'](_0x20d538=>_0x20d538['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x179d10,_0x4d1231);}):this['_handleRevisionsUpdate'](_0x179d10,_0x4d1231);});const {revisions:_0x39e39d,requestId:_0x16462f}=await this['_revisionHistoryService']['connect'](_0x31dd81['connection']);_0x31dd81['addToReconnectionStack'](this),this['_lastRequestId']=_0x16462f,await this['_fetchMissingUsers'](_0x39e39d);for(const _0x4bafaa of _0x39e39d)this['_revisionTracker']['addRevisionData'](_0x4bafaa);this['listenTo'](_0x154c62,'change:_isConnected',(_0x11490e,_0x31d04a,_0x4ee615)=>{_0x4ee615&&(this['_oldOffset']=_0x154c62['_offset'],_0x11490e['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x31dd81,'state',_0x49ad81=>_0x49ad81===_0x4fe0e0['CONNECTED']);}async['reconnect'](){const _0x36455d=this['editor']['plugins']['get'](c),_0x526bc5=this['editor']['plugins']['get'](l),_0x4563d7=async()=>{const _0x4802a4=this['_revisionTracker']['currentRevision'],_0x35c9f5=_0x4802a4['id'],_0x57304f=_0x35c9f5!==_0x526bc5['sessionId'];if(_0x57304f){const _0x4ad20f=_0x526bc5['_offset']-this['_oldOffset'],_0x6c85c3=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x4802a4['toVersion']+_0x4ad20f!==_0x6c85c3){const _0x2f3bec=_0x4802a4['fromVersion']+_0x4ad20f,_0x25f43b=this['editor']['plugins']['get'](_0x4f21f3),_0x2208d1=this['_revisionTracker']['buildRevisionData']({'revision':_0x4802a4,'from':_0x2f3bec,'to':_0x6c85c3});_0x2208d1['id']=_0x4802a4['id'];const _0x571cae=_0x2208d1['authorsIds']['map'](_0x15558f=>_0x25f43b['getUser'](_0x15558f));_0x4802a4['_update']({..._0x2208d1,'authors':_0x571cae},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x4802a4['id'],_0x2208d1,!0x0);}this['_revisionTracker']['_startingVersion']=_0x6c85c3,(_0x4802a4['toVersion']===_0x4802a4['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x35c9f5)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x35c9f5),this['_revisionTracker']['_createCurrentRevision'](_0x6c85c3));}const {revisions:_0x12626c,requestId:_0x5b3286}=await this['_revisionHistoryService']['reconnect'](_0x36455d['connection'],this['_lastRequestId']);_0x57304f&&_0x12626c['length']>0x0?_0x526bc5['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x12626c),this['_handleRevisionsUpdate'](_0x12626c,_0x5b3286),this['_revisionTracker']['sendBufferedUpdates']());};return _0x526bc5['_isConnected']?_0x4563d7():new Promise((_0x40a382,_0x5c8830)=>{_0x526bc5['once']('change:_isConnected',()=>{_0x4563d7()['then'](_0x40a382)['catch'](_0x5c8830);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x2a21bd=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x2ac051=>{_0x2ac051['off'](),_0x2a21bd();});});}['_getLatestVersionFromServerOperations'](){const _0x1a09cd=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x376924 of _0x1a09cd)if('marker'!==_0x376924['type']||_0x376924['affectsData'])return _0x376924['baseVersion']+0x1;}['_getLatestVersion'](){const _0x10614d=this['editor']['plugins']['get'](l);return new Promise(_0x3ff7a4=>{_0x10614d['_isPendingUpdate']?_0x10614d['once']('change:_isPendingUpdate',()=>{_0x3ff7a4(this['_getLatestVersionFromServerOperations']());}):_0x3ff7a4(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x118477,_0x3b5e80){const _0xa1f1da=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x3b5e80;for(const _0x44d7f4 of _0x118477){const _0xf5b291=_0xa1f1da['getRevision'](_0x44d7f4['id']);if(_0xf5b291){if((_0x44d7f4['fromVersion']||_0x44d7f4['toVersion'])&&(_0x44d7f4['diffData']=null),_0xf5b291===this['_revisionTracker']['currentRevision']){const _0x39bb95=Math['max'](_0xf5b291['toVersion'],_0x44d7f4['toVersion']),_0x1de05b=Math['max'](_0xf5b291['fromVersion'],_0x44d7f4['fromVersion']);let _0x38f6d8;_0xf5b291['toVersion']===_0x44d7f4['toVersion']&&_0xf5b291['fromVersion']===_0x44d7f4['fromVersion']?(_0x38f6d8=!0x0,this['_preventResendingRevisionData'](_0x44d7f4)):_0x44d7f4['toVersion']===_0x39bb95&&_0x44d7f4['fromVersion']===_0x1de05b?_0x38f6d8=!0x1:(_0xf5b291['toVersion']===_0x39bb95&&_0xf5b291['fromVersion']===_0x1de05b||this['_fixRevision']({'revision':_0xf5b291,'from':_0x1de05b,'to':_0x39bb95}),_0x38f6d8=!0x0),_0x38f6d8&&(delete _0x44d7f4['fromVersion'],delete _0x44d7f4['toVersion'],delete _0x44d7f4['diffData'],delete _0x44d7f4['createdAt'],delete _0x44d7f4['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x44d7f4),this['_preventResendingRevisionData'](_0x44d7f4);}else this['_revisionTracker']['addRevisionData'](_0x44d7f4);}const _0x2ae09e=_0xa1f1da['getRevisions']();_0x2ae09e['reverse']();for(let _0x489ad9=0x0;_0x489ad9<_0x2ae09e['length']-0x1;_0x489ad9++){const _0x55356c=_0x2ae09e[_0x489ad9],_0x4ecc1e=_0x2ae09e[_0x489ad9+0x1];if(_0x55356c['fromVersion']<_0x4ecc1e['toVersion']){const _0x27316e=_0x4ecc1e['toVersion'],_0x4896d8=Math['max'](_0x27316e,_0x55356c['toVersion']);this['_fixRevision']({'revision':_0x55356c,'from':_0x27316e,'to':_0x4896d8});}}}['_fixRevision']({revision:_0x229715,from:_0x3b6b74,to:_0x2975cc}={}){const _0x403f2a=this['editor']['plugins']['get'](_0x4f21f3),_0x46e794=this['_revisionTracker']['buildRevisionData']({'revision':_0x229715,'from':_0x3b6b74,'to':_0x2975cc});_0x46e794['authors']=_0x46e794['authorsIds']['map'](_0x5bc0df=>_0x403f2a['getUser'](_0x5bc0df)),_0x229715['_update'](_0x46e794);}['_preventResendingRevisionData'](_0x14d6ce){const _0x1e1ea2={};_0x1e1ea2['id']=_0x14d6ce['id'];for(const _0x1f8e0d of Object['keys'](_0x14d6ce))'id'!==_0x1f8e0d&&(_0x1e1ea2[_0x1f8e0d]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x1e1ea2['id'],_0x1e1ea2,!0x0);}async['_fetchMissingUsers'](_0x267958){const _0xf02756=this['editor']['plugins']['get'](_0x4f21f3),{connection:_0x588e1c}=this['editor']['plugins']['get'](c),_0x3835a5=new Set();for(const _0x52594b of _0x267958){for(const _0x3ccfa9 of _0x52594b['authorsIds'])_0x30e88f(_0x3ccfa9);_0x52594b['creatorId']&&_0x30e88f(_0x52594b['creatorId']);}if(0x0===_0x3835a5['size'])return;const _0x4c453a=await lt['getMany'](_0x588e1c,Array['from'](_0x3835a5));for(const _0x2280ed of _0x4c453a)_0xf02756['getUser'](_0x2280ed['id'])||_0xf02756['addUser'](_0x2280ed);function _0x30e88f(_0x5c7b21){_0xf02756['getUser'](_0x5c7b21)||_0x3835a5['add'](_0x5c7b21);}}}function st(_0x3836e3){return _0x3836e3['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x3836e3['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x3836e3['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x395194{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x66de9f{constructor(_0x502b81){super(_0x502b81);const _0x5c543b=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x5c543b['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x5c543b['to']('usersCount',_0x5b7cbf=>q(_0x502b81,'CONNECTED_USERS',_0x5b7cbf))}]});}}class es extends _0x66de9f{['items'];['keystrokes'];constructor(_0x2ce46d){super(_0x2ce46d);const _0xafd387=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0xf2d36a(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0xafd387['if']('hasPopup'),'aria-expanded':_0xafd387['to']('isExpanded',_0x1963c9=>this['hasPopup']&&String(_0x1963c9)),'aria-label':_0xafd387['to']('hasPopup',_0x27cba9=>q(_0x2ce46d,_0x27cba9?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0xafd387['to']('hasPopup',_0x489d0f=>!!_0x489d0f&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0xafd387['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x2482be,_0x2c3de4,_0x4eef71)=>{this['element']&&(_0x4eef71?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class L extends _0x66de9f{['counterView'];['inlineListView'];constructor(_0x35ec45){super(_0x35ec45);const _0x4be05f=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x35ec45),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x461120 of this['inlineListView']['items'])_0x461120['tooltipPosition']='s';this['inlineListView']['items']['first']&&(this['inlineListView']['items']['first']['tooltipPosition']='se');}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list','ck-reset','ck-rounded-corners',_0x4be05f['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x66de9f{['listWrapperView'];constructor(_0x370b9c,_0x884447){super(_0x370b9c),this['listWrapperView']=new mt(_0x370b9c,_0x884447),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x370b9c,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x2f06a8{constructor(_0x569bf8,_0x410ea3){super(_0x569bf8);const _0x459d18=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x410ea3?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x459d18['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x459d18['to']('role'),'aria-label':_0x459d18['to']('ariaLabel'),'aria-labelledby':_0x459d18['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x46b77b['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x515ed2=this['element'];_0x515ed2&&(this['_isScrollable']=Math['max'](_0x515ed2['scrollHeight'],_0x515ed2['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x10a8b4,_0x1dd3fd,_0x5e3835){super(_0x10a8b4);const _0x222fe0=this['bindTemplate'];this['userView']=new ct(_0x10a8b4,_0x1dd3fd);const _0x1f36b7={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x1dd3fd['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x1dd3fd['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x1dd3fd['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x5e3835&&(_0x1f36b7['tag']='button',_0x1f36b7['on']={'click':_0x222fe0['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1f36b7);}['focus'](){this['element']['focus']();}}class y extends _0x66de9f{['userView'];['markerView'];constructor(_0xc34716,_0xfec046,_0x3c05f6){super(_0xc34716);const _0x2942fa=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0xc34716,_0xfec046),this['markerView']=new at(_0xc34716,_0xfec046);const _0x305b5f=new ot(_0xc34716);_0x305b5f['template']['tag']='span',_0x305b5f['text']=_0xfec046['name'];const _0x18d239={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x2942fa['to']('isFocusable',_0x36a122=>!!_0x36a122&&0x0),'aria-labelledby':_0x305b5f['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x2942fa['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x2942fa['to']('hasTooltip',_0x14cf3b=>!_0x14cf3b),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x305b5f]};_0x3c05f6&&(_0x18d239['tag']='button',_0x18d239['on']={'click':_0x2942fa['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x18d239);}}class at extends _0x66de9f{constructor(_0x2f4361,_0x49b679){super(_0x2f4361),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x49b679['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x29e656{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x4bf23b){super(_0x4bf23b),this['context']['config']['define']('presenceList',A);const _0x452f84=_0x4bf23b['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x452f84)throw new _0x495380('presencelist-collapseat-invalid-format',this);if(_0x452f84<0x1)throw new _0x495380('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x3f5652(),this['balloonPanelView']=new _0x3eaaeb(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x2f3d19 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x2f3d19);this['listenTo'](this['_allConnectedUsers'],'add',(_0x267717,_0x49c2b0)=>{this['_handleUserAdd'](_0x49c2b0);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x53db14,_0x1d6270)=>{this['_handleUserRemove'](_0x1d6270);});}['_createView'](){const _0x321d25=this['context'],_0x356c64=new L(this['context']['locale']),_0x43bc5=this['balloonPanelView'];if(!_0x49d9e1(_0x321d25['config']['get']('presenceList.container')))throw new _0x495380('presencelist-missing-container',this);return _0x356c64['counterView']['bind']('usersCount')['to'](this),_0x356c64['bind']('isCollapsed')['to'](this,'usersCount',_0x4f4dcc=>{const {collapseAt:_0x4242e2,displayMe:_0x175149}=_0x321d25['config']['get']('presenceList'),_0x1a38de=_0x4f4dcc>=_0x4242e2;return _0x356c64['counterView']['isHidden']=!(0x1==_0x4f4dcc&&_0x175149||_0x1a38de),_0x1a38de||this['hideDropdown'](),_0x1a38de;}),_0x356c64['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x1c9da7=>{const _0x2cb5f0=_0x321d25['config']['get']('presenceList'),_0x451962=new y(_0x321d25['locale'],_0x1c9da7,!!_0x2cb5f0['onClick']);return _0x451962['bind']('hasTooltip')['to'](_0x356c64,'isCollapsed',_0xf3cb0a=>!_0xf3cb0a),_0x451962['bind']('isFocusable')['to'](_0x356c64,'isCollapsed',_0x146741=>!_0x146741),_0x2cb5f0['onClick']&&this['listenTo'](_0x451962,'execute',()=>{this['view']['isCollapsed']||_0x2cb5f0['onClick'](_0x1c9da7,_0x451962['element']);}),_0x451962;}),this['listenTo'](_0x356c64['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x356c64['inlineListView']['keystrokes']['set']('Enter',(_0xfec146,_0x5c2cea)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x5c2cea());}),_0x356c64['render'](),_0x43bc5['render'](),_0x2444f0({'emitter':_0x356c64,'activator':()=>_0x43bc5['isVisible'],'contextElements':[_0x43bc5['element'],_0x356c64['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x321d25['config']['get']('presenceList.container')['appendChild'](_0x356c64['element']),this['_bodyCollection']=new _0x338f3f(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x356c64;}['_handleUserAdd'](_0x28f207){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x28f207['isMe'])return;const _0x1cac8a=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x1cac8a&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x4e1630=_0x28f207['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x28f207,_0x4e1630);}['_handleUserRemove'](_0x4e99af){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x4e99af['id'])&&(this['currentDisplayedUsers']['remove'](_0x4e99af['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x5eba46 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x5eba46['id']))return void this['currentDisplayedUsers']['add'](_0x5eba46,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x7ca74c=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x7ca74c['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x4582dd}=this['presenceDropdownView'];_0x4582dd['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x4d5f80=>{if(!_0x7ca74c['displayMe']&&_0x4d5f80['isMe'])return null;const _0x32b052=new k(this['context']['locale'],_0x4d5f80,!!_0x7ca74c['onClick']);return _0x7ca74c['onClick']&&this['listenTo'](_0x32b052,'execute',()=>{_0x7ca74c['onClick'](_0x4d5f80,_0x32b052['element']);}),_0x32b052;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x4582dd['focus'](),_0x4582dd['checkIfScrollable']();const _0x2e2e15=(_0x15e115,_0x7c7de4)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x7c7de4();};_0x4582dd['keystrokes']['set']('Esc',_0x2e2e15),_0x4582dd['keystrokes']['set']('Shift+Tab',_0x2e2e15),_0x4582dd['keystrokes']['set']('Tab',(_0x2e03dc,_0x9293ae)=>{!function(_0x22c400){const _0x17cef5=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x33b86d=>_0x33b86d+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x20ca58=[...document['body']['querySelectorAll'](_0x17cef5)]['filter'](_0x465c38=>_0x465c38===document['activeElement']||_0x465c38['offsetWidth']+_0x465c38['offsetHeight']>0x0)['sort']((_0xf32f79,_0x55c8be)=>(_0xf32f79['tabIndex']||0x0)-(_0x55c8be['tabIndex']||0x0)),_0x3db887=_0x20ca58['indexOf'](_0x22c400),_0x31093c=_0x20ca58[(_0x3db887+0x1)%_0x20ca58['length']];_0x31093c&&_0x31093c['focus']();}(this['view']['element']),this['hideDropdown'](),_0x9293ae();}),_0x4582dd['focusTracker']['add'](this['view']['element']),_0x4582dd['focusTracker']['on']('change:isFocused',(_0x2fcc53,_0x74e4c4,_0x3cb5e4)=>{_0x3cb5e4||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class i extends _0x29e656{static get['requires'](){return[r,s];}static get['pluginName'](){return'PresenceList';}}export{a as CloudServicesCommentsAdapter,v as CloudServicesRevisionHistoryAdapter,g as CloudServicesTrackChangesAdapter,i as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,d as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x3398f7=>0x0==_0x3398f7?0x0:0x1==_0x3398f7?0x1:0x2==_0x3398f7?0x2:_0x3398f7%0x64>=0x3&&_0x3398f7%0x64<=0xa?0x3:_0x3398f7%0x64>=0xb&&_0x3398f7%0x64<=0x63?0x4:0x5}};
23
+ export default{'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x18840a=>0x0==_0x18840a?0x0:0x1==_0x18840a?0x1:0x2==_0x18840a?0x2:_0x18840a%0x64>=0x3&&_0x18840a%0x64<=0xa?0x3:_0x18840a%0x64>=0xb&&_0x18840a%0x64<=0x63?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x219f0b=>{const {ar:{dictionary:_0xd54783,getPluralForm:_0x25f588}}={'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x15f2aa=>0x0==_0x15f2aa?0x0:0x1==_0x15f2aa?0x1:0x2==_0x15f2aa?0x2:_0x15f2aa%0x64>=0x3&&_0x15f2aa%0x64<=0xa?0x3:_0x15f2aa%0x64>=0xb&&_0x15f2aa%0x64<=0x63?0x4:0x5}};_0x219f0b['ar']||={'dictionary':{},'getPluralForm':null},_0x219f0b['ar']['dictionary']=Object['assign'](_0x219f0b['ar']['dictionary'],_0xd54783),_0x219f0b['ar']['getPluralForm']=_0x25f588;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x21f2ba=>{const {ar:{dictionary:_0xd68bcb,getPluralForm:_0x518cac}}={'ar':{'dictionary':{'CONNECTED_USERS':['1\x20مستخدم\x20متصل\x20(أنا)','%0\x20مستخدم\x20متصل','%0\x20مستخدم\x20متصل','%0\x20مستخدمين\x20متصلين','%0\x20مستخدماً\x20متصلاً','%0\x20مستخدمٍ\x20متصلٍ'],'PENDING_ACTION_SENDING_DATA':'إرسال\x20البيانات\x20إلى\x20الخادم','Synchronization\x20issue':'مشكلة\x20في\x20المزامنة','Connected\x20users\x20list\x20dropdown\x20menu':'القائمة\x20المنسدلة\x20لقائمة\x20المستخدمين\x20المتصلين','Connected\x20users\x20list':'قائمة\x20المستخدمين\x20المتصلين','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'قائمة\x20مطوية\x20للمستخدمين\x20المتصلين\x20(اضغط\x20على\x20ENTER\x20لفتحها)','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'لا\x20يمكن\x20إعادة\x20ربط\x20المستند\x20بالخادم\x20مرة\x20أخرى.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'تعذرت\x20عملية\x20قراءة\x20بيانات\x20المستند\x20أثناء\x20عملية\x20إعادة\x20الاتصال.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'الإصدار\x20الأخير\x20المحفوظ\x20من\x20هذا\x20المستند\x20لا\x20يطابق\x20الإصدار\x20المحلي.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.','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.':'يوجد\x20اختلاف\x20بين\x20المستند\x20المحلي\x20والمستند\x20الموجود\x20على\x20الخادم،\x20ودمجهما\x20قد\x20يتسبب\x20في\x20نتائج\x20غير\x20متوقعة.\x20كي\x20لا\x20تفقد\x20المحتوى،\x20احفظ\x20المستند\x20محلياً\x20وأجر\x20عملية\x20إنعاش\x20للمحرر\x20لديك.'},'getPluralForm':_0x1b8ffc=>0x0==_0x1b8ffc?0x0:0x1==_0x1b8ffc?0x1:0x2==_0x1b8ffc?0x2:_0x1b8ffc%0x64>=0x3&&_0x1b8ffc%0x64<=0xa?0x3:_0x1b8ffc%0x64>=0xb&&_0x1b8ffc%0x64<=0x63?0x4:0x5}};_0x21f2ba['ar']||={'dictionary':{},'getPluralForm':null},_0x21f2ba['ar']['dictionary']=Object['assign'](_0x21f2ba['ar']['dictionary'],_0xd68bcb),_0x21f2ba['ar']['getPluralForm']=_0x518cac;})(window['CKEDITOR_TRANSLATIONS']||={});