@ckeditor/ckeditor5-real-time-collaboration 42.0.0 → 42.0.1-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +4 -4
  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 _0x51b4aa,Plugin as _0x3f2414,PendingActions as _0x37aea0,Context as _0x4feb74}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x46c19a,CKEditorError as _0x2bc765,Collection as _0x5109e1,global as _0x32b6fd,version as nt,uid as _0x4976cf}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x29a42b,View as _0x3f2a09,BalloonPanelView as _0x389e13,clickOutsideHandler as _0x3bdd20,BodyCollection as _0x587dfd}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x437638,NoOperation as _0x1d7bb6,InsertOperation as _0x55de0c,MarkerOperation as _0x493d42,RootAttributeOperation as _0x32919d,transformSets as _0xaa48ff,OperationFactory as _0x5002ae}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as at,WEB_SOCKET_GATEWAY_STATES as _0x47b369,CollaborativeEditingService as _0x5168a7,User as dt,CommentsService as _0x34e845,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x2441e3,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0xa38b1f}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x189686}from'lodash-es';class c extends _0x51b4aa{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
- ((()=>at)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x29a42b];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x111922){super(_0x111922),this['set']('state',_0x47b369['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x46c19a);}['init'](){const _0xe92d0a=this['context'],_0x32ab09=_0xe92d0a['plugins']['get']('CloudServices'),_0xb74de5=_0xe92d0a['plugins']['get'](_0x29a42b);if(!_0x32ab09['token'])throw new _0x2bc765('websocketgateway-missing-token',this);if(!_0x32ab09['webSocketUrl'])throw new _0x2bc765('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'](_0x32ab09['token'],_0x32ab09['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x171c08=>{if(this['connection']=_0x171c08,this['bind']('state')['to'](_0x171c08,'state',this,'_isBrowserOffline',(_0x3dfbfb,_0x216dd3)=>('connected'!==_0x3dfbfb&&(this['_shouldPluginsReconnect']=!0x0),_0x216dd3||_0x3dfbfb!==_0x47b369['CONNECTED']?_0x47b369['DISCONNECTED']:this['state']==_0x47b369['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x47b369['CONNECTING']):_0x47b369['CONNECTED'])),this['connection']['on']('error',(_0x5a5d96,_0x2572df)=>{if('limitExceeded'!==_0x2572df['code'])throw console['error'](_0x2572df),new _0x2bc765('cloudservices-init',null,{'originalError':_0x2572df});_0xb74de5['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'});}),!_0x171c08['me'])return new Promise(_0x1b7ad5=>_0x171c08['on']('change:me',_0x1b7ad5));})['catch'](_0x122b95=>{throw console['error'](_0x122b95),new _0x2bc765('cloudservices-init',null,{'originalError':_0x122b95});});}['addToReconnectionStack'](_0x523581){if('function'!=typeof _0x523581['reconnect'])throw new _0x2bc765('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x523581))throw new _0x2bc765('websocketgateway-plugin-already-registered',this,{'name':_0x523581['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x523581);}['removeFromReconnectionStack'](_0x4df127){this['_reconnectionStack']['delete'](_0x4df127);}['isInReconnectionStack'](_0x5f36d6){return this['_reconnectionStack']['has'](_0x5f36d6);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x5b255e=>_0x5b255e['reconnect']())))['then'](()=>this['state']=_0x47b369['CONNECTED'])['catch'](_0x5c9e96=>{throw console['error'](_0x5c9e96),new _0x2bc765('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x47b369['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x51b4aa{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x2441e3];}constructor(_0x229c78){super(_0x229c78),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x5109e1(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x2441e3);}['init'](){const _0x23f6ac=this['context']['plugins']['get'](c);this['listenTo'](_0x23f6ac,'change:state',(_0x24a000,_0x5f1867,_0x229d4f)=>{if('connected'!==_0x229d4f)this['channelSessions']['forEach'](_0x29061e=>_0x29061e['clear']()),this['channelConnectedUsers']['forEach'](_0x2dd0aa=>_0x2dd0aa['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x2f45bb,_0x4f9e56]of this['_registeredSessions'])for(const _0x596fb9 of _0x4f9e56)this['_handleSessionAdd'](_0x2f45bb,_0x596fb9);}}),this['_createUser'](_0x23f6ac['connection']['me'],!0x0);}['register'](_0x5623cd,_0x21b51b){if(this['_registeredSessions']['has'](_0x5623cd))throw new _0x2bc765('sessions-register-already-registered',null,{'channelId':_0x5623cd});this['_registeredSessions']['set'](_0x5623cd,_0x21b51b),this['channelSessions']['set'](_0x5623cd,new _0x5109e1()),this['channelConnectedUsers']['set'](_0x5623cd,new _0x5109e1()),this['listenTo'](_0x21b51b,'add',(_0x212569,_0x276a8c)=>this['_handleSessionAdd'](_0x5623cd,_0x276a8c)),this['listenTo'](_0x21b51b,'remove',(_0x374b56,_0x34870a)=>this['_handleSessionRemove'](_0x5623cd,_0x34870a));for(const _0x5a22f2 of _0x21b51b)this['_handleSessionAdd'](_0x5623cd,_0x5a22f2);}['unregister'](_0x3f7c29){if(!this['_registeredSessions']['has'](_0x3f7c29))throw new _0x2bc765('sessions-unregister-not-exist',null,{'channelId':_0x3f7c29});const _0x59fe16=this['_registeredSessions']['get'](_0x3f7c29);this['stopListening'](_0x59fe16);for(const _0x1a9e1c of _0x59fe16)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x3f7c29,_0x1a9e1c);this['_registeredSessions']['delete'](_0x3f7c29),this['channelSessions']['delete'](_0x3f7c29),this['channelConnectedUsers']['delete'](_0x3f7c29);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x41b1bd){for(const _0x20df62 of this['channelSessions']['values']())for(const _0x33e839 of _0x20df62)if(_0x33e839['id']===_0x41b1bd)return _0x33e839['user'];}['getUserSessions'](_0x71b8d6,_0xaf0c45){const _0x226a83=_0xaf0c45?[this['channelSessions']['get'](_0xaf0c45)]:this['channelSessions']['values'](),_0x5e0643=new Set();for(const _0x48caa1 of _0x226a83)for(const _0x76eab1 of _0x48caa1)_0x76eab1['user']['id']===_0x71b8d6['id']&&_0x5e0643['add'](_0x76eab1['id']);return _0x5e0643;}['getUserRole'](_0x2170dc){for(const _0xfdea0f of this['channelSessions']['values']())for(const _0x53c308 of _0xfdea0f)if(_0x53c308['user']===_0x2170dc)return _0x53c308['role'];}['_handleSessionAdd'](_0x134cf,_0x2cf1b3){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x53ffa7=_0x2cf1b3['user'],_0x46a1c5=this['_users']['getUser'](_0x53ffa7['id'])||this['_createUser'](_0x53ffa7),_0x5488fc=Object['assign']({},_0x2cf1b3,{'user':_0x46a1c5});this['channelSessions']['get'](_0x134cf)['add'](_0x5488fc);const _0x3a9e86=this['channelConnectedUsers']['get'](_0x134cf);_0x3a9e86['has'](_0x46a1c5['id'])||_0x3a9e86['add'](_0x46a1c5),this['allConnectedUsers']['has'](_0x46a1c5['id'])||this['allConnectedUsers']['add'](_0x46a1c5,_0x46a1c5['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x134cf,{'channelId':_0x134cf,'session':_0x5488fc});}['_handleSessionRemove'](_0x2ad861,_0xe16140){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x47f12c=this['channelConnectedUsers']['get'](_0x2ad861),_0x5cdb95=_0xe16140['user'];_0x5cdb95['id']&&(this['channelSessions']['get'](_0x2ad861)['remove'](_0xe16140['id']),_0x47f12c['has'](_0x5cdb95['id'])&&!this['getUserSessions'](_0x5cdb95,_0x2ad861)['size']&&_0x47f12c['remove'](_0x5cdb95['id']),this['allConnectedUsers']['get'](_0x5cdb95['id'])&&!this['getUserSessions'](_0x5cdb95)['size']&&this['allConnectedUsers']['remove'](_0x5cdb95['id']));}['_createUser'](_0x4c51d0,_0x26102b){const _0x29321e=this['_users']['addUser'](_0x4c51d0);return _0x26102b&&this['_users']['defineMe'](_0x4c51d0['id']),_0x29321e['orderNumber']=this['_uniqueUsersCount']++,_0x29321e;}}class H extends _0x3f2414{['_domEmitter']=new(_0x46c19a())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0x514436=this['editor'],_0x2665b5=_0x514436['plugins']['get'](r);_0x514436['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0xbf1ab9,{writer:_0x212157})=>function(_0x21fe4c,_0x3e90fb,_0x2e318c,_0x376ed4){const _0x2062d3=_0x21fe4c['markerName']['split'](':')[0x2],_0x2eb580=_0x2e318c['getUserBySessionId'](_0x2062d3);if(!_0x2eb580||_0x2062d3===_0x2e318c['mySessionId'])return;if(!_0x376ed4['model']['schema']['checkChild'](_0x21fe4c['markerRange']['start'],'$text'))return;const _0x2fb4a1={'class':'ck-user__marker\x20'+_0x2eb580['color']['getMarkerClass'](),'data-name':_0x2eb580['name'],'data-session-id':_0x2062d3},_0x2ab4c3=_0x376ed4['model']['markers']['get'](_0x21fe4c['markerName']),_0x3f86e5=_0x2ab4c3['getStart'](),_0x11b8a0=_0x3f86e5['nodeAfter'],_0x49c81c=_0x376ed4['model']['schema'];if(_0x11b8a0&&_0x49c81c['isObject'](_0x11b8a0)&&_0x49c81c['isInline'](_0x11b8a0)&&!_0x376ed4['model']['markers']['get']('user:range:'+_0x2062d3)['getRange']()['isCollapsed'])return;const _0x2bb895=_0x3f86e5['parent'];return _0x376ed4['model']['schema']['isLimit'](_0x2bb895)&&!_0x376ed4['model']['hasContent'](_0x2bb895)&&(_0x2fb4a1['contenteditable']=!0x1),function(_0x190d82,_0x1019db,_0x48515a){const _0x4af48a=_0x190d82['createUIElement']('span',_0x1019db);return _0x190d82['setCustomProperty']('userPositionMarker',!0x0,_0x4af48a),_0x4af48a['render']=function(_0x269ae9){const _0x496d83=this['toDomElement'](_0x269ae9);return _0x496d83['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>'+_0x48515a['name']+'</span>⁠',_0x496d83['addEventListener']('mouseenter',()=>{_0x496d83['classList']['add']('ck-user__marker_hovered');}),_0x496d83['addEventListener']('mouseleave',()=>{_0x496d83['classList']['remove']('ck-user__marker_hovered');}),_0x496d83;},_0x4af48a['isSimilar']=function(_0x5ce1b7){return!(!this['getCustomProperty']('userPositionMarker')||!_0x5ce1b7['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x5ce1b7['getAttribute']('data-session-id'));},_0x4af48a;}(_0x3e90fb,_0x2fb4a1,_0x2eb580);}(_0xbf1ab9,_0x212157,_0x2665b5,_0x514436)}),_0x514436['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x1419b2=>function(_0x1cce59,_0x1a55f1){const _0x1c1349=_0x1cce59['markerName']['split'](':')[0x2];if(_0x1c1349===_0x1a55f1['mySessionId'])return null;const _0x19d6e5=_0x1a55f1['getUserBySessionId'](_0x1c1349);if(!_0x19d6e5)return{'id':_0x1c1349,'classes':[]};return{'id':_0x1c1349,'classes':['ck-user__selection',_0x19d6e5['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x1c1349},'priority':0x7d0+_0x19d6e5['orderNumber']};}(_0x1419b2,_0x2665b5)}),function(_0x2b9030){const _0x38a481=_0x2b9030['model'],_0xdbdf8b=new Map(),_0x261af7=_0x2b9030['plugins']['get'](r);_0x38a481['markers']['on']('update:user:range',(_0x4767d0,_0x48aded,_0x31fc9b,_0x4c79b4)=>{if(!_0x4c79b4&&_0xdbdf8b['get'](_0x48aded['name']))return _0xdbdf8b['get'](_0x48aded['name'])['detach'](),void _0xdbdf8b['delete'](_0x48aded['name']);const _0x45de15=_0x48aded['name']['split'](':')[0x2];if(_0x45de15===_0x261af7['mySessionId'])return;const _0x19048a='user:position:'+_0x45de15;_0x38a481['markers']['has'](_0x19048a)&&_0x2b9030['editing']['reconvertMarker'](_0x19048a),_0x48aded['on']('change:range',(_0x5df5dd,_0x49f1a6,_0x53d22b)=>{if('$graveyard'!=_0x49f1a6['root']['rootName']&&'$graveyard'==_0x48aded['getRange']()['root']['rootName']&&!_0xdbdf8b['has'](_0x48aded['name'])){const _0x456d9c=_0x38a481['schema']['getNearestSelectionRange'](_0x53d22b['deletionPosition']);if(_0x456d9c){const _0xe7bb8e=ht['fromRange'](_0x456d9c);_0xdbdf8b['set'](_0x48aded['name'],_0xe7bb8e),_0xe7bb8e['on']('change:range',(_0x24311d,_0x1bd6c3,_0x44d526)=>{if('$graveyard'==_0xe7bb8e['root']['rootName']){const _0x2f7b25=_0x38a481['schema']['getNearestSelectionRange'](_0x44d526['deletionPosition']);_0x2f7b25?(_0xe7bb8e['start']=_0x2f7b25['start'],_0xe7bb8e['end']=_0x2f7b25['end']):(_0xdbdf8b['delete'](_0x48aded['name']),_0xe7bb8e['detach']());}});}}});}),_0x38a481['document']['on']('change',()=>{_0xdbdf8b['size']>0x0&&_0x38a481['enqueueChange']({'isUndoable':!0x1},_0xe447f5=>{for(const [_0x469dc8,_0x1449b1]of _0xdbdf8b)'$graveyard'==_0x38a481['markers']['get'](_0x469dc8)['getRange']()['root']['rootName']&&(re(_0x469dc8['split'](':')[0x2],_0x1449b1['toRange'](),_0x38a481,_0xe447f5),_0x1449b1['detach']());_0xdbdf8b['clear']();});});}(_0x514436),this['_domEmitter']['listenTo'](_0x32b6fd['document'],'keydown',(_0x4baebb,{key:_0x3a7076})=>{'Escape'===_0x3a7076&&function(_0x3e68a0){_0x3e68a0['editing']['view']['change'](_0x3ffa1f=>{for(const _0x2df97b of _0x3e68a0['model']['markers']){if(!_0x2df97b['name']['startsWith']('user:position'))continue;const _0x470f7d=_0x3e68a0['editing']['mapper']['markerNameToElements'](_0x2df97b['name']);if(_0x470f7d){for(const _0x467b29 of _0x470f7d)_0x3ffa1f['removeClass']('ck-user__marker_hovered',_0x467b29);}}});}(_0x514436);},{'useCapture':!0x0});}['afterInit'](){const _0x9219fe=this['editor'],_0x11a7a6=_0x9219fe['commands']['get']('undo');_0x11a7a6&&_0x9219fe['model']['on']('applyOperation',(_0x5ce18d,_0x39c2b3)=>{const _0xf2057e=_0x39c2b3[0x0];if('marker'!=_0xf2057e['type']||!_0xf2057e['name']['startsWith']('user:'))return;const _0x31608d=_0xf2057e['batch'];_0x11a7a6['_createdBatches']['has'](_0x31608d)&&(_0xf2057e['newRange']=_0xf2057e['oldRange']?_0x9219fe['model']['createRange'](_0xf2057e['oldRange']['start'],_0xf2057e['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x27fee3=this['editor'],_0x42f278=_0x27fee3['model']['document'],_0x331a20=_0x27fee3['plugins']['get'](r);_0x27fee3['model']['enqueueChange']({'isUndoable':!0x1},_0x36c6e4=>{const _0x1b0b71='user:range:'+_0x331a20['mySessionId'],_0x3c2608='user:position:'+_0x331a20['mySessionId'],_0x3f8b46=_0x27fee3['model']['markers']['has'](_0x1b0b71);_0x27fee3['editing']['view']['hasDomSelection']?re(_0x331a20['mySessionId'],_0x42f278['selection']['getFirstRange'](),_0x27fee3['model'],_0x36c6e4):_0x3f8b46&&(_0x36c6e4['removeMarker'](_0x1b0b71),_0x36c6e4['removeMarker'](_0x3c2608));});}}function re(_0x58f2ee,_0x24f1b6,_0x42a0f4,_0x242775){const _0x277773='user:range:'+_0x58f2ee,_0x26b1b0='user:position:'+_0x58f2ee,_0x363c10=_0x24f1b6['getContainedElement']();let _0x35f7f7=_0x24f1b6['start'];_0x363c10&&_0x363c10['is']('element','tableCell')&&(_0x35f7f7=function(_0x1dfb90,_0x2c70a2){for(const _0x28c9f7 of _0x1dfb90['getPositions']())if(_0x2c70a2['schema']['checkChild'](_0x28c9f7,'$text'))return _0x28c9f7;}(_0x24f1b6,_0x42a0f4),_0x24f1b6=_0x242775['createRange'](_0x35f7f7));const _0x22df02=_0x242775['createRange'](_0x35f7f7);_0x42a0f4['markers']['has'](_0x277773)?(_0x242775['updateMarker'](_0x277773,{'range':_0x24f1b6}),_0x242775['updateMarker'](_0x26b1b0,{'range':_0x22df02})):(_0x242775['addMarker'](_0x277773,{'range':_0x24f1b6,'usingOperation':!0x0}),_0x242775['addMarker'](_0x26b1b0,{'range':_0x22df02,'usingOperation':!0x0}));}function q(_0x125c8c,_0x46a8ea,_0x444729){const t=_0x125c8c['t'];switch(_0x46a8ea){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x444729);default:return'';}}let K=0x1;class l extends _0x3f2414{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
- ((()=>_0x5168a7)());['_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,_0x37aea0,_0x2441e3,_0x29a42b];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x4885e3=this['serverHistory']['getOperations']();for(let _0x585381=_0x4885e3['length']-0x1;_0x585381>=0x0;_0x585381--){const _0x5ba3dc=_0x4885e3[_0x585381];if(!this['_disconnectionOperations']['has'](_0x5ba3dc))return _0x5ba3dc['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x48dd18){if(super(_0x48dd18),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x437638(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x2bc765('collaboration-missing-channelid',this);const _0x17c3f2=_0x48dd18['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x17c3f2,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0xa38b1f(),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 _0x358b8a=this['editor'],_0x2efccc=_0x358b8a['plugins']['get'](_0x2441e3),_0x54707f=_0x358b8a['plugins']['get'](c);this['listenTo'](_0x2efccc,'getOperationAuthor',(_0x2ebbc5,_0x3ba275)=>{const _0x2c5092=_0x3ba275[0x0];_0x2c5092['_authorId']&&(_0x2ebbc5['return']=_0x2efccc['getUser'](_0x2c5092['_authorId']),_0x2ebbc5['stop']()),null===_0x2c5092['_authorId']&&(_0x2ebbc5['return']=null,_0x2ebbc5['stop']());},{'priority':'high'}),this['listenTo'](_0x358b8a['model']['document']['selection'],'change:range',(_0x276661,_0x1fe53f)=>{_0x1fe53f['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x358b8a['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x358b8a['model']['on']('applyOperation',(_0x33d90e,_0x261f5d)=>{const _0x215432=_0x261f5d[0x0];_0x215432['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x215432),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x54707f,'state',this,'_hasSynchronizationProblem',(_0x247fb1,_0x176555)=>'connected'===_0x247fb1&&!_0x176555),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x358b8a['disableReadOnlyMode']('rtc-offline'):_0x358b8a['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x358b8a['disableReadOnlyMode']('rtc-offline'):_0x358b8a['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x2143c2=this['editor']['plugins']['get'](r),_0xd5fa4a=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x2143c2['unregister'](this['_channelId']);const _0x263c9d=await this['_service']['reconnect'](_0xd5fa4a['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x263c9d)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x581141=await this['_service']['getConnectedSessions']();_0x2143c2['register'](this['_channelId'],_0x581141),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x5ee828){if(function(_0x436920){return'404'===_0x436920['code'];}(_0x5ee828)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0xb4640a){return'409'===_0xb4640a['code'];}(_0x5ee828)){const _0x22f8d7=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'](_0x22f8d7);}else{if(!(_0x5ee828 instanceof J))throw _0x5ee828;this['_handleReconnectionError']();}}}}['destroy'](){const _0xe8881=this['editor']['plugins']['get'](c),_0x3418dc=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x3418dc['channelSessions']['has'](this['_channelId'])&&_0x3418dc['unregister'](this['_channelId']),_0xe8881['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x26f46b){if(this['sessionId']!==_0x26f46b['sessionId']&&this['_lastSyncedOperationId']!==_0x26f46b['lastOperationId'])throw new J();return this['sessionId']=_0x26f46b['sessionId'],this['_handleServerResponse']([],{..._0x26f46b,'wereChangesApplied':!0x1,'data':_0x26f46b['data']},'reconnect');}async['_connectService'](_0x570199,_0x5b3e68=!0x1){const {connection:_0x46cbfd}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x46cbfd,this['_channelId'])['then'](_0x58f52d=>this['_initSessionsHandling'](_0x58f52d))['catch'](_0x146c8c=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x146c8c);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x597206,_0x1c3535)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x1c3535);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x1c9260=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x570199);this['_isPendingUpdate']=!0x0;const _0x1d9a9f=await this['_service']['connect'](_0x46cbfd,this['_compressOperations'](_0x570199),_0x1c9260);if(this['sessionId']=_0x1d9a9f['sessionId'],_0x5b3e68){if(!_0x1d9a9f['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x1d9a9f['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x570199,_0x1d9a9f,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x1d9a9f,_0x570199);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x2463b1=this['editor']['plugins']['get'](r),_0x595fe2=this['editor']['plugins']['get'](H),_0x636757=_0x2463b1['channelSessions']['get'](this['_channelId']);_0x636757&&_0x636757['length']>0x1?_0x595fe2['createUserMarkerOperations']():this['listenTo'](_0x2463b1,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x2463b1['channelSessions']['get'](this['_channelId'])['length']&&_0x595fe2['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x57c09b,_0x34e487,_0x5ba972,_0x53860a){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x34e487){const _0x1ec1a1=this['_decompressOperations'](_0x5ba972,_0x53860a);await this['_fetchMissingUsers'](_0x1ec1a1),this['_handleExternalOperations'](_0x1ec1a1,_0x34e487,_0x5ba972['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x1d975a}=this['editor'];let _0x5f0c85;try{_0x5f0c85=await this['_service']['getDocumentDetails']();}catch(_0x55c284){const _0x4e750d=q(_0x1d975a,'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'](_0x4e750d);}const _0x29866d=_0x5f0c85['currentDocumentSession']||_0x5f0c85['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x29866d['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x18b4a7=q(_0x1d975a,'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'](_0x18b4a7);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x40495c){const _0x136230=this['editor']['plugins']['get'](r);this['listenTo'](_0x136230,'sessionAdd:'+this['_channelId'],(_0x27088f,{session:_0x437822})=>{if(_0x437822['id']===_0x136230['mySessionId']){_0x27088f['off']();const _0x57dcfb=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x40d467=_0x437822['permissions'];_0x57dcfb&&_0x57dcfb['isEnabled']&&(_0x40d467=_0x40d467['filter'](_0x243781=>'document:write'!==_0x243781)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x40d467,this['_channelId']);}}),_0x136230['register'](this['_channelId'],_0x40495c);}['_initThrowingOnDataSet'](){const _0xb4a428=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x4e71bf)=>{if(!_0x4e71bf[_0x4e71bf['length']-0x1]['suppressErrorInCollaboration'])throw new _0x2bc765('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0xb4a428['apply'](this['editor']['data'],_0x4e71bf);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x293b5a,[_0x338651])=>{if(this['_document']['version'])throw new _0x2bc765('realtimecollaborationclient-init-document-already-initialized',this);_0x293b5a['stop'](),this['_setPendingAction']();const _0x3ba33f=this['editor']['config']['get']('rootsAttributes'),_0x171b38=this['_getOperationsFromInitData'](_0x338651,_0x3ba33f);0x0==_0x171b38['length']&&_0x171b38['push'](new _0x1d7bb6(0x0)),_0x293b5a['return']=this['_connectService'](_0x171b38)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0xc0c9ed=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0xc0c9ed))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x56b494,[_0x5dcf06,_0x5a7bfe])=>{_0x56b494['stop']();const _0xa169ca=this['editor']['model']['document']['getRoot'](_0x5dcf06);if(!this['_knownRootNames']['has'](_0x5dcf06)){const _0x523e4d=_0x5a7bfe&&_0x5a7bfe['data']?_0x5a7bfe['data']:'',_0x53a20d=_0x5a7bfe&&_0x5a7bfe['attributes']?_0x5a7bfe['attributes']:{};await this['_loadRoot'](_0x5dcf06,_0x523e4d,_0x53a20d);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0xa169ca['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0xa169ca);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x279822){const _0x30e7dc=this['editor']['plugins']['get'](_0x2441e3),{connection:_0x5a0597}=this['editor']['plugins']['get'](c),_0x12deaa=new Set();for(const _0x57e385 of _0x279822){const _0x34a1fe=_0x57e385['_authorId'];_0x34a1fe&&!_0x30e7dc['getUser'](_0x34a1fe)&&_0x12deaa['add'](_0x34a1fe);}if(0x0===_0x12deaa['size'])return;const _0x347ead=await dt['getMany'](_0x5a0597,Array['from'](_0x12deaa));for(const _0x4793eb of _0x347ead)_0x30e7dc['getUser'](_0x4793eb['id'])||_0x30e7dc['addUser'](_0x4793eb);}['_getOperationsFromInitData'](_0x203d6e,_0x432282={}){const _0x2563e3=this['editor']['model'],_0x475d9c=[];let _0xdf39b2=0x0;const _0x4e28e8='string'==typeof _0x203d6e?{'main':_0x203d6e}:_0x203d6e;for(const _0x55c10e of Object['keys'](_0x4e28e8)){if(!this['_document']['roots']['has'](_0x55c10e))throw new _0x2bc765('realtimecollaborationclient-init-non-existent-root',this);const _0x3a7bad=this['editor']['data']['parse'](_0x4e28e8[_0x55c10e]),_0x469811=this['_document']['getRoot'](_0x55c10e),_0x2985a5=new _0x55de0c(_0x2563e3['createPositionAt'](_0x469811,0x0),_0x3a7bad,_0xdf39b2++);_0x475d9c['push'](_0x2985a5);for(const [_0x5ce1d5,_0x3aa006]of _0x3a7bad['markers']){const _0x33b538=_0x2563e3['createRange'](_0x2563e3['createPositionFromPath'](_0x469811,_0x3aa006['start']['path']['slice']()),_0x2563e3['createPositionFromPath'](_0x469811,_0x3aa006['end']['path']['slice']())),_0x4ddd47=new _0x493d42(_0x5ce1d5,null,_0x33b538,_0x2563e3['markers'],!0x0,_0xdf39b2++);_0x475d9c['push'](_0x4ddd47);}}if(_0x432282)for(const [_0x53cf50,_0x3f7fc7]of Object['entries'](_0x432282)){const _0x117420=_0x2563e3['document']['getRoot'](_0x53cf50);if(!_0x117420)throw new _0x2bc765('multi-root-editor-root-attributes-no-root',null);for(const [_0x1a8030,_0x4978e1]of Object['entries'](_0x3f7fc7))if(null!==_0x4978e1){const _0x3c2543=new _0x32919d(_0x117420,_0x1a8030,null,_0x4978e1,_0xdf39b2++);_0x475d9c['push'](_0x3c2543);}}return _0x475d9c;}async['_loadRoot'](_0x546d88,_0x45f6c1,_0x226ffa){this['_getOperationsFromInitData']({[_0x546d88]:_0x45f6c1},{[_0x546d88]:_0x226ffa})['forEach']((_0x4b9c52,_0x52692b)=>{_0x4b9c52['baseVersion']=this['_document']['version']+_0x52692b,_0x4b9c52['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x4b9c52);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x478053,_0x28e6e3){let _0x5296fd;this['_offset']=_0x478053['offset'];const _0x46d8b3=_0x478053['wereChangesApplied']&&!_0x478053['initData'],_0x32bdd5=_0x46d8b3?0x0:_0x478053['data']['baseVersion'];if(_0x28e6e3['forEach'](_0x46e5e6=>{_0x46e5e6['_isInit']=!0x0,_0x46e5e6['createdAt']=_0x478053['sessionCreatedAt'],_0x46e5e6['_authorId']=null;}),_0x46d8b3)_0x5296fd=_0x28e6e3,this['_applyOperationsSet'](_0x5296fd,_0x46d8b3);else{if(_0x478053['initData']){const _0x1e5d90=this['_getOperationsFromInitData'](_0x478053['initData']);this['_document']['history']['version']=-_0x1e5d90['length'],_0x1e5d90['forEach'](_0x2742f6=>{_0x2742f6['baseVersion']-=_0x1e5d90['length'],_0x2742f6['createdAt']=_0x478053['sessionCreatedAt'],_0x2742f6['_isInit']=!0x0,_0x2742f6['_authorId']=null;}),this['_applyOperationsSet'](_0x1e5d90,!0x0),this['serverHistory']['version']=-_0x1e5d90['length']+this['_offset'],this['_updateServerHistory'](_0x1e5d90);}this['_document']['history']['version']=_0x32bdd5,_0x5296fd=this['_decompressOperations'](_0x478053['data'],_0x478053['metadata']),await this['_fetchMissingUsers'](_0x5296fd),this['_applyOperationsSet'](_0x5296fd,_0x46d8b3);}_0x478053['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x5296fd,_0x478053['lastOperationId']),this['_lastSyncedOperationId']=_0x478053['lastOperationId']),this['serverHistory']['version']=_0x32bdd5+this['_offset'],this['_updateServerHistory'](_0x5296fd),_0x28e6e3['filter'](_0x34dc39=>{const _0x1b303b=this['_getAffectedRoot'](_0x34dc39);return _0x1b303b&&!this['_knownRootNames']['has'](_0x1b303b);})['forEach']((_0x59d350,_0xed1998)=>{_0x59d350['baseVersion']=this['_document']['version']+_0xed1998,this['_saveOperationInBuffer'](_0x59d350);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x509440,_0x7d6a6b){throw this['_isPendingUpdate']=!0x0,_0x7d6a6b&&console['error'](_0x7d6a6b),new _0x2bc765(_0x509440,this['editor']);}['_saveOperationInBuffer'](_0x10f47b){this['_knownOperations']['has'](_0x10f47b)||(this['_knownOperations']['add'](_0x10f47b),this['_bufferedOperations']['push'](_0x10f47b),this['_pendingAction']||'marker'==_0x10f47b['type']&&!_0x10f47b['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x547820=!0x1){!_0x547820&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x1fc68c=>{_0x1fc68c&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x1aaf87=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0xe87078){return _0xe87078['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0xe87078['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0xe87078['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x1aaf87))throw _0x1aaf87;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0xb37c69=>{this['on']('change:_isPendingUpdate',()=>{_0xb37c69();});});}async['_sendBufferedOperations'](){const _0x46dda6=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x46dda6['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x19a217=[...this['_bufferedOperations']];for(const _0x5ec426 of _0x19a217)_0x5ec426['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x5ec426);const _0x495d21=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x19a217),_0x82a608=K++,_0x3436cd=this['_compressOperations'](_0x19a217),_0xe9ef47=await this['_service']['sendOperations'](_0x3436cd,_0x3436cd['baseVersion'],_0x495d21);try{return await this['_handleServerResponse'](_0x19a217,_0xe9ef47,_0x82a608);}catch(_0x28946a){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x28946a);}}async['_handleServerResponse'](_0x2098d8,_0x31a40c,_0x316534){if('error'in _0x31a40c)throw _0x31a40c['error'];let _0x4da0ad=!0x1;if(_0x31a40c['wereChangesApplied']){_0x31a40c['lastOperationId']&&(this['_lastSyncedOperationId']=_0x31a40c['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x5567a9=>!_0x2098d8['includes'](_0x5567a9));for(const _0x16a409 of _0x2098d8)_0x16a409['createdAt']='lastOperationAcceptedAt'in _0x31a40c&&_0x31a40c['lastOperationAcceptedAt']||void 0x0;Q(_0x2098d8,_0x31a40c['version']-_0x2098d8['length']),this['_updateServerHistory'](_0x2098d8);const _0x128992=_0x2098d8['filter'](_0x11bbd0=>{if(!_0x11bbd0['_isInit'])return!0x1;const _0x1e6b8f=this['_getAffectedRoot'](_0x11bbd0);return _0x1e6b8f&&!this['_knownRootNames']['has'](_0x1e6b8f);});Q(_0x128992,this['_document']['version']),this['_applyOperationsSet'](_0x128992),_0x4da0ad=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x435515=this['_decompressOperations'](_0x31a40c['data'],_0x31a40c['metadata'])['filter'](_0x161207=>_0x161207['baseVersion']>=this['_lastServerVersion']);_0x435515['forEach'](_0x4c3890=>this['_addKnownRoot'](_0x4c3890)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x33e73d=>!_0x33e73d['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x33e73d))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x435515),_0x4da0ad=this['_handleExternalOperations'](_0x435515,_0x31a40c['version'],_0x31a40c['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x4da0ad?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x11f527,_0x5129ae,_0x38ad39){try{const _0x34bded={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x1db98e,operationsB:_0x37662f,originalOperations:_0x4b9232}=_0xaa48ff(_0x11f527,this['_bufferedOperations'],_0x34bded);Q(_0x1db98e,this['_document']['version']),Q(_0x37662f,_0x5129ae);for(const _0x329f3c of _0x1db98e){const _0x48473f=_0x4b9232['get'](_0x329f3c);_0x329f3c['_authorId']=_0x48473f?_0x48473f['_authorId']:null;}_0x38ad39&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x11f527,_0x38ad39),this['_lastSyncedOperationId']=_0x38ad39),this['_bufferedOperations']=[..._0x37662f],this['_applyOperationsSet'](_0x1db98e),this['_updateServerHistory'](_0x11f527);}catch(_0x56fdad){return console['error'](_0x56fdad),!0x1;}return!0x0;}['_applyOperationsSet'](_0x42d4e0,_0x1a813e=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x3c6a63=>{for(const _0x175db3 of _0x42d4e0)this['_knownOperations']['add'](_0x175db3),this['_addKnownRoot'](_0x175db3),_0x3c6a63['batch']['addOperation'](_0x175db3),this['editor']['model']['applyOperation'](_0x175db3);});}['_addKnownRoot'](_0x101b67){const _0x80c895=this['_getAffectedRoot'](_0x101b67);_0x80c895&&this['_knownRootNames']['add'](_0x80c895);}['_getAffectedRoot'](_0x58ee50){let _0x52646f,_0x3ef846;switch(_0x58ee50['type']){case'insert':_0x52646f=_0x58ee50['position']['root'];break;case'marker':if(_0x3ef846=_0x58ee50['newRange'],!_0x3ef846)return null;_0x52646f=_0x3ef846['root'];break;case'addRootAttribute':_0x52646f=_0x58ee50['root'];break;case'addRoot':_0x52646f=_0x58ee50['affectedSelectable'];break;case'move':_0x52646f=_0x58ee50['targetPosition']['root'];break;default:return null;}return _0x52646f['rootName'];}['_updateServerHistory'](_0x4214ca){_0x4214ca['forEach'](_0x3c15eb=>{const _0x4ddd37=_0x3c15eb['clone']();_0x4ddd37['_authorId']=_0x3c15eb['_authorId'],_0x4ddd37['_isInit']=!!_0x3c15eb['_isInit'],_0x4ddd37['createdAt']=_0x3c15eb['createdAt'],_0x4ddd37['baseVersion']+=this['_offset'],_0x3c15eb['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x4ddd37),this['serverHistory']['addOperation'](_0x4ddd37);});}['_handleReconnectionError'](_0x405458){const _0x5a901b=this['editor']['plugins']['get']('Notification'),_0x5b8796=this['editor']['locale'];_0x405458||(_0x405458=q(_0x5b8796,'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.')),_0x5a901b['showWarning'](_0x405458,{'title':q(_0x5b8796,'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'](_0x37aea0)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x37aea0)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x4d230a){const _0x24d8d1=_0x4d230a['map'](_0x2212e8=>_0x2212e8['toJSON']());return this['_compressor']['compress'](_0x24d8d1);}['_decompressOperations'](_0x3bb2d9,_0x56b97a){return this['_compressor']['decompress'](_0x3bb2d9)['map']((_0x497625,_0x330a56)=>{const _0x537d25='init'==_0x56b97a[_0x330a56]['type'];if('InsertOperation'==_0x497625['__className']){const _0x5c61e3=_0x497625['position']['root'];!this['_document']['getRoot'](_0x5c61e3)&&(this['_document']['createRoot']('$root',_0x5c61e3)['_isAttached']=!0x1);}const _0x4dfe97=_0x5002ae['fromJSON'](_0x497625,this['_document']);return _0x4dfe97['wasUndone']=_0x497625['wasUndone'],_0x4dfe97['_isInit']=_0x537d25,_0x4dfe97['_authorId']=_0x537d25?null:_0x56b97a[_0x330a56]['userId'],_0x4dfe97['_isDisconnection']='cs:removeUser'===_0x56b97a[_0x330a56]['type'],_0x4dfe97['createdAt']=_0x56b97a[_0x330a56]['createdAt'],_0x4dfe97;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x318eea=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x318eea&&_0x318eea['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x34f77f,_0x2a456f){for(const _0x331786 of _0x34f77f)_0x331786['baseVersion']=_0x2a456f++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x344f43){this['_ignoredOperations']=_0x344f43,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x1759b6){let _0x1b2f65=_0x1759b6['length'];for(;_0x1b2f65--;){const _0x3baa75=_0x1759b6[_0x1b2f65];if(!this['_ignoredOperations']['has'](_0x3baa75)){if(!this['_operationToId']['has'](_0x3baa75)){const _0x215226=_0x4976cf()['slice'](0x1,0x12);this['_operationToId']['set'](_0x3baa75,_0x215226);}return this['_operationToId']['get'](_0x3baa75);}}}['setIdForTheLastOperation'](_0x22a7fb,_0x2e6679){if(!_0x2e6679)return;let _0x2b964f=_0x22a7fb['length'];for(;_0x2b964f--;){const _0x1be428=_0x22a7fb[_0x2b964f];this['_ignoredOperations']['has'](_0x1be428)||this['_operationToId']['set'](_0x1be428,_0x2e6679);}}}class n extends _0x3f2414{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x51b4aa{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
- ((()=>_0x34e845)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x2441e3];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x5017ba){super(_0x5017ba),this['_services']=new Map();}async['init'](){const _0x1a2ac2=this['context'],_0x5f5499=_0x1a2ac2['plugins']['get']('CommentsRepository');if(_0x1a2ac2['plugins']['get'](c)['addToReconnectionStack'](this),_0x5f5499['adapter']={'addCommentThread':async({channelId:_0x29a6fa,threadId:_0x3ffe14,comments:_0x164e4c,resolvedAt:_0xdc0199,resolvedBy:_0x452420,context:_0x28ad3c,attributes:_0x5a9f0e})=>{const _0x346fb2=await this['_getService'](_0x29a6fa)['addCommentThread']({'commentThreadId':_0x3ffe14,'comments':_0x164e4c['map'](_0x332450=>function(_0x426499,_0x27ef23,_0x3f9539){return{'commentThreadId':_0x3f9539,'commentId':_0x426499['commentId'],'userId':_0x426499['authorId'],'content':_0x426499['content'],'documentId':_0x27ef23,'createdAt':_0x426499['createdAt'],'attributes':_0x426499['attributes']||{}};}(_0x332450,_0x29a6fa,_0x3ffe14)),'resolvedAt':_0xdc0199,'resolvedBy':_0x452420,'context':_0x28ad3c,'attributes':_0x5a9f0e})['catch'](lt);return{'threadId':_0x346fb2['commentThreadId'],'comments':_0x346fb2['comments']};},'getCommentThread':async({channelId:_0xb8f32c,threadId:_0x252599})=>{const _0x1d9a80=await this['_getService'](_0xb8f32c)['getCommentThread'](_0x252599)['catch'](lt);return await this['_fetchMissingUsersForThreads']([_0x1d9a80]),{'threadId':_0x1d9a80['commentThreadId'],'comments':_0x1d9a80['comments']['map'](R),'context':_0x1d9a80['context'],'resolvedAt':_0x1d9a80['resolvedAt'],'resolvedBy':_0x1d9a80['resolvedBy'],'attributes':_0x1d9a80['attributes']||{}};},'updateCommentThread':async({channelId:_0x1f2259,threadId:_0x3f1f7d,context:_0x3aa8be,unlinkedAt:_0x45fc54,attributes:_0x19eeca})=>this['_getService'](_0x1f2259)['updateCommentThread']({'commentThreadId':_0x3f1f7d,'context':_0x3aa8be,'attributes':_0x19eeca,'unlinkedAt':_0x45fc54})['catch'](F)['catch'](lt),'resolveCommentThread':async({channelId:_0x51a43f,threadId:_0x124fc0})=>{const _0x1e6c6a=await this['_getService'](_0x51a43f)['resolveCommentThread'](_0x124fc0)['catch'](F)['catch'](lt);return{'threadId':_0x1e6c6a['commentThreadId'],'resolvedAt':_0x1e6c6a['resolvedAt'],'resolvedBy':_0x1e6c6a['resolvedBy']};},'reopenCommentThread':async({channelId:_0x570425,threadId:_0x6b2e9a})=>this['_getService'](_0x570425)['reopenCommentThread'](_0x6b2e9a)['catch'](F)['catch'](lt),'removeCommentThread':({channelId:_0x16b954,threadId:_0x27684e})=>this['_getService'](_0x16b954)['removeCommentThread'](_0x27684e)['catch'](F)['catch'](lt),'addComment':({channelId:_0x3135ca,threadId:_0x587510,commentId:_0x4f3116,content:_0x14332d,attributes:_0xd4c867})=>this['_getService'](_0x3135ca)['addComment'](_0x587510,_0x4f3116,_0x14332d,_0xd4c867)['catch'](lt),'updateComment':({channelId:_0x532b70,threadId:_0x11a667,commentId:_0x20aca5,content:_0x3a1f65,attributes:_0x49eac8})=>this['_getService'](_0x532b70)['updateComment'](_0x11a667,_0x20aca5,_0x3a1f65,_0x49eac8)['catch'](F)['catch'](lt),'removeComment':({channelId:_0x21078f,threadId:_0x4c7243,commentId:_0x3ca65c})=>this['_getService'](_0x21078f)['removeComment'](_0x4c7243,_0x3ca65c)['catch'](F)['catch'](lt)},_0x1a2ac2 instanceof _0x4feb74){const _0x5e7ee8=_0x1a2ac2['config']['get']('collaboration.channelId'),_0x3422bb=_0x1a2ac2['plugins']['get'](r);await this['_setUpService'](_0x5e7ee8);const _0x5d5291=await this['_services']['get'](_0x5e7ee8)['getConnectedSessions']();this['listenTo'](_0x3422bb,'sessionAdd:'+_0x5e7ee8,(_0x13520c,{session:_0x2215e9})=>{_0x2215e9['id']===_0x3422bb['mySessionId']&&(_0x13520c['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x2215e9['permissions'],_0x5e7ee8));}),_0x3422bb['register'](_0x5e7ee8,_0x5d5291);}}async['_setUpService'](_0x284b34){if(this['_services']['has'](_0x284b34))throw new _0x2bc765('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x284b34});const _0x1a9452=this['context']['plugins']['get']('CommentsRepository'),_0x3860ab=new a['CommentsService'](_0x284b34);this['_services']['set'](_0x284b34,_0x3860ab),this['listenTo'](_0x3860ab,'commentThreadAdded',(_0x43bc9a,_0x4d13b7)=>{const {commentThreadId:_0x1b63a5,documentId:_0x512908,context:_0x5e59d2,attributes:_0xd9b00b,resolvedAt:_0x4f4a68,resolvedBy:_0x1a859e,comments:_0x170e95}=_0x4d13b7;_0x1a9452['getCommentThread'](_0x1b63a5)||_0x1a9452['addCommentThread']({'threadId':_0x1b63a5,'channelId':_0x512908,'comments':_0x170e95?_0x170e95['map'](R):[],'context':_0x5e59d2,'attributes':_0xd9b00b,'resolvedAt':_0x4f4a68,'resolvedBy':_0x1a859e,'isFromAdapter':!0x0});}),this['listenTo'](_0x3860ab,'commentThreadUpdated',(_0x2a1dfe,{commentThreadId:_0x14bfe4,documentId:_0x4c1ca4,context:_0xc713cb,unlinkedAt:_0x3cd354,attributes:_0x59035d})=>{_0x1a9452['getCommentThread'](_0x14bfe4)&&_0x1a9452['updateCommentThread']({'threadId':_0x14bfe4,'channelId':_0x4c1ca4,'context':_0xc713cb,'unlinkedAt':_0x3cd354,'attributes':_0x59035d,'isFromAdapter':!0x0});}),this['listenTo'](_0x3860ab,'commentThreadResolved',(_0x499787,{commentThreadId:_0xdb18f1,resolvedBy:_0x736a1a,resolvedAt:_0x204703})=>{const _0x635c01=_0x1a9452['getCommentThread'](_0xdb18f1);_0x635c01&&_0x635c01['resolve']({'resolvedBy':_0x736a1a,'resolvedAt':_0x204703,'isFromAdapter':!0x0});}),this['listenTo'](_0x3860ab,'commentThreadReopened',(_0x29fcda,{commentThreadId:_0x28c322})=>{const _0xc85354=_0x1a9452['getCommentThread'](_0x28c322);_0xc85354&&_0xc85354['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x3860ab,'commentThreadRemoved',(_0x45245d,{commentThreadId:_0x1b9c23})=>{const _0x19e74f=_0x1a9452['getCommentThread'](_0x1b9c23);_0x19e74f&&_0x19e74f['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x3860ab,'commentAdded',(_0x43c28f,_0x530bc9)=>{const _0x107a46=_0x530bc9['commentThreadId'],_0x594cdb=_0x1a9452['getCommentThread'](_0x107a46);_0x594cdb&&_0x594cdb['addComment']({...R(_0x530bc9),'isFromAdapter':!0x0});}),this['listenTo'](_0x3860ab,'commentUpdated',(_0x45f000,{commentThreadId:_0x266155,commentId:_0x4cfee4,content:_0x3de3b7,attributes:_0x30ea2a})=>{const _0x1554fe=_0x1a9452['getCommentThread'](_0x266155);if(_0x1554fe){const _0x5afbac=_0x1554fe['getComment'](_0x4cfee4);_0x5afbac&&_0x5afbac['update']({'content':_0x3de3b7,'attributes':_0x30ea2a,'isFromAdapter':!0x0});}}),this['listenTo'](_0x3860ab,'commentRemoved',(_0x13ca37,{commentThreadId:_0x44d424,commentId:_0x2db684})=>{const _0x29917b=_0x1a9452['getCommentThread'](_0x44d424);if(_0x29917b){const _0x195445=_0x29917b['getComment'](_0x2db684);_0x195445&&_0x195445['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x284b34);}['destroy'](){if(this['context']instanceof _0x4feb74){const _0x2cb8f7=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x2cb8f7);}}['_terminateService'](_0x3a4129){if(!this['_services']['has'](_0x3a4129))throw new _0x2bc765('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x3a4129});this['_getService'](_0x3a4129)['disconnect'](),this['_services']['delete'](_0x3a4129);}async['reconnect'](){for(const _0x42175c of this['_services']['keys']())await this['_connectService'](_0x42175c);if(this['context']instanceof _0x4feb74){const _0x407a06=this['context']['config']['get']('collaboration.channelId'),_0x3c49e2=this['context']['plugins']['get'](r);_0x3c49e2['unregister'](_0x407a06);const _0xfe7254=await this['_services']['get'](_0x407a06)['getConnectedSessions']();_0x3c49e2['register'](_0x407a06,_0xfe7254);}}async['_connectService'](_0x5938ac){const {connection:_0x54ae97}=this['context']['plugins']['get'](c),_0x308a3b=this['context']['plugins']['get']('CommentsRepository'),_0x919fd5=this['_services']['get'](_0x5938ac),_0x52abf7=await _0x919fd5['connect'](_0x54ae97);await this['_fetchMissingUsersForThreads'](_0x52abf7);const _0x4c004f=new Set(Array['from'](_0x308a3b['getCommentThreads']({'channelId':_0x5938ac}),_0x140714=>_0x140714['id']));for(const _0x38fca4 of _0x52abf7)_0x38fca4['deletedAt']||_0x4c004f['delete'](_0x38fca4['commentThreadId']);for(const _0x4e66fc of _0x4c004f)_0x308a3b['getCommentThread'](_0x4e66fc)['remove']({'isFromAdapter':!0x0});for(const _0x343857 of _0x52abf7){let _0x328749=_0x308a3b['getCommentThread'](_0x343857['commentThreadId']);const {commentThreadId:_0x593786,context:_0x1897e4,attributes:_0x18c9ea,resolvedBy:_0x2c31d8,resolvedAt:_0x48684c,unlinkedAt:_0x1d1866,deletedAt:_0x440ead}=_0x343857;if(_0x440ead)continue;_0x328749||(_0x328749=_0x308a3b['addCommentThread']({'channelId':_0x5938ac,'threadId':_0x593786,'context':_0x1897e4,'attributes':_0x18c9ea||{},'resolvedBy':_0x2c31d8,'resolvedAt':_0x48684c,'unlinkedAt':_0x1d1866,'isFromAdapter':!0x0}));const _0x23f8d3=new Set(Array['from'](_0x328749['comments'],_0x9e3215=>_0x9e3215['id']));for(const _0x338bca of _0x343857['comments'])_0x23f8d3['delete'](_0x338bca['commentId']);for(const _0x5462b1 of _0x23f8d3)_0x328749['getComment'](_0x5462b1)['remove']({'isFromAdapter':!0x0});for(const _0x4d9526 of _0x343857['comments']){const _0x4bd32b=_0x328749['getComment'](_0x4d9526['commentId']);_0x4bd32b?_0x4bd32b['content']!==_0x4d9526['content']&&_0x4bd32b['update']({'content':_0x4d9526['content'],'isFromAdapter':!0x0}):_0x328749['addComment'](Object['assign'](R(_0x4d9526),{'isFromAdapter':!0x0}));}}}['_getService'](_0x5a9dd1){if(!this['_services']['has'](_0x5a9dd1))throw new _0x2bc765('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x5a9dd1});return this['_services']['get'](_0x5a9dd1);}async['_fetchMissingUsersForThreads'](_0x42ca87){const _0x515abd=this['context']['plugins']['get'](_0x2441e3),{connection:_0x54830a}=this['context']['plugins']['get'](c),_0x39b792=new Set();for(const {resolvedBy:_0x14dea1,comments:_0x33ee2a}of _0x42ca87){_0x14dea1&&!_0x515abd['getUser'](_0x14dea1)&&_0x39b792['add'](_0x14dea1);for(const {userId:_0xe79c73}of _0x33ee2a)_0x515abd['getUser'](_0xe79c73)||_0x39b792['add'](_0xe79c73);}if(0x0===_0x39b792['size'])return;const _0xff2cf6=await dt['getMany'](_0x54830a,Array['from'](_0x39b792));for(const _0x50a7f9 of _0xff2cf6)_0x515abd['getUser'](_0x50a7f9['id'])||_0x515abd['addUser'](_0x50a7f9);}}async function F(_0x237664){if('404'!==_0x237664['code'])throw _0x237664;}function lt(_0x31b5a3){if((_0x41b40e=_0x31b5a3)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x41b40e['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x41b40e['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x41b40e;throw _0x31b5a3;}function R(_0x30171d){return{'threadId':_0x30171d['commentThreadId'],'commentId':_0x30171d['commentId'],'content':_0x30171d['content'],'createdAt':_0x30171d['createdAt'],'authorId':_0x30171d['userId'],'attributes':_0x30171d['attributes']||{}};}class g extends _0x3f2414{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
- ((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x4ec52a){super(_0x4ec52a);const _0x1c8625=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x1c8625);}['init'](){const _0x1b0946=this['editor']['plugins']['get'](c),_0x3c61cb=this['editor']['plugins']['get']('TrackChangesEditing');return _0x3c61cb['adapter']={'getSuggestion':async _0x30dbda=>{await this['_waitForServiceReady']();const _0x4d02f0=await this['_trackChangesService']['get'](_0x30dbda)['catch'](B);return await this['_fetchMissingUsersForThreads']([_0x4d02f0]),_0x4d02f0;},'addSuggestion':async({id:_0x1a8333,type:_0x47209d,data:_0x2c94fd,originalSuggestionId:_0x271251,attributes:_0x22f09a})=>{await this['_waitForServiceReady']();const _0x477a66={'id':_0x1a8333,'type':_0x47209d,'data':_0x2c94fd,'originalSuggestionId':_0x271251,'attributes':_0x22f09a},_0x54e063=await this['_trackChangesService']['add'](_0x1a8333,_0x47209d,_0x2c94fd,_0x271251,_0x22f09a)['catch'](_0x487fa5=>{if(ut(_0x487fa5))return new Promise(_0x3e1d96=>{this['_bufferedRequests']['set'](_0x1a8333,{'resolve':_0x3e1d96,'suggestionData':_0x477a66});});throw _0x487fa5;});return this['_bufferedRequests']['delete'](_0x1a8333),_0x54e063;},'updateSuggestion':async(_0x42765c,_0x5b4253)=>{if(await this['_waitForServiceReady'](),'open'!==_0x5b4253['state'])return this['_trackChangesService']['update'](_0x42765c,_0x5b4253)['catch'](B);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x355dc8,_0x805d4f)=>{_0x3c61cb['hasSuggestion'](_0x805d4f['id'])&&(_0x3c61cb['getSuggestion'](_0x805d4f['id'])['attributes']=_0x805d4f['attributes']);}),this['_trackChangesService']['connect'](_0x1b0946['connection'])['then'](_0x4d11b4=>(_0x1b0946['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x4d11b4)['then'](()=>{for(const _0x5534ae of _0x4d11b4){_0x3c61cb['addSuggestionData'](_0x5534ae)['_saved']=!0x0;}})));}async['reconnect'](){const _0x57d1ff=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0xa3090c}=this['editor']['plugins']['get'](c),_0x3bfdf5=await this['_trackChangesService']['connect'](_0xa3090c);await this['_fetchMissingUsersForThreads'](_0x3bfdf5);for(const {suggestionData:_0x206666,resolve:_0x19ff34}of this['_bufferedRequests']['values']()){let _0x4a7e24=_0x3bfdf5['find'](_0x5d8a95=>_0x5d8a95['id']===_0x206666['id']);_0x4a7e24||(_0x4a7e24=await this['_trackChangesService']['add'](_0x206666['id'],_0x206666['type'],_0x206666['data'],_0x206666['originalSuggestionId'])),_0x19ff34(_0x4a7e24);}for(const _0x24aa05 of _0x3bfdf5)_0x57d1ff['hasSuggestion'](_0x24aa05['id'])||_0x57d1ff['addSuggestionData'](_0x24aa05);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x18e764=>{this['listenTo'](this['_trackChangesService'],'connected',_0x46505e=>{_0x46505e['off'](),_0x18e764();});});}async['_fetchMissingUsersForThreads'](_0x1d0431){const _0x3f7c55=this['editor']['plugins']['get'](_0x2441e3),{connection:_0x64e205}=this['editor']['plugins']['get'](c),_0x155425=new Set();for(const {authorId:_0x33761c}of _0x1d0431)_0x3f7c55['getUser'](_0x33761c)||_0x155425['add'](_0x33761c);if(0x0===_0x155425['size'])return;const _0xa46300=await dt['getMany'](_0x64e205,Array['from'](_0x155425));for(const _0x49bcc8 of _0xa46300)_0x3f7c55['getUser'](_0x49bcc8['id'])||_0x3f7c55['addUser'](_0x49bcc8);}}function B(_0x5823d2){if(ut(_0x5823d2))return new Promise(()=>{});throw _0x5823d2;}function ut(_0x2cf3fa){return _0x2cf3fa['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2cf3fa['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x3f2414{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x134d39=this['editor']['plugins']['get'](c),_0x27f8df=this['editor']['plugins']['get']('CommentsEditing'),_0x10111f=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x134d39,'change:state',(_0x4fe0f1,_0x17c0ed,_0x249cbb)=>{_0x27f8df['isThreadsLoadingPaused']='connected'!==_0x249cbb;});}),this['listenTo'](_0x134d39,'change:state',(_0x22f610,_0x1e9103,_0x4c3846)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x4c3846);}),_0x10111f['_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 _0x3f2414{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x3f2414{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
- ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x2441e3];}constructor(_0x3477fb){super(_0x3477fb);const _0xe63bf9=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0xe63bf9);}async['init'](){const _0x3e3528=this['editor']['plugins']['get'](l),_0x419a2d=_0x3e3528['serverHistory'],_0x3bd9ec=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x419a2d,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x3e3528['sessionId']});const _0x32ce9=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x5e1372=await tt['isBundleUploaded'](_0x3bd9ec['connection'],_0x32ce9);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x198a7d})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x198a7d)),'updateRevisions':async _0x52b20e=>{await this['_waitForServiceReady']();const _0x21d317=this['_revisionTracker']['currentRevision'];if(_0x5e1372&&0x1===_0x52b20e['length']&&_0x52b20e[0x0]['id']===_0x21d317['id'])return _0x52b20e;for(const _0xc80765 of _0x52b20e)_0xc80765['id']===_0x21d317['id']&&(_0xc80765['isEmptyCurrent']=_0xc80765['fromVersion']===_0xc80765['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x52b20e,this['_lastRequestId'])['then'](_0x59c8a7=>(this['_lastRequestId']=_0x59c8a7,_0x52b20e))['catch'](_0x49cfec=>{if(st(_0x49cfec)||'400'===_0x49cfec['code']&&void 0x0!==_0x49cfec['data']['wrongRequestId']){for(const _0x29c982 of _0x52b20e){!this['_revisionTracker']['repository']['getRevision'](_0x29c982['id'])||this['_revisionTracker']['_bufferUpdate'](_0x29c982['id'],_0x29c982,!0x1);}if(st(_0x49cfec))throw _0x49cfec;return _0x52b20e;}throw _0x49cfec;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x5b16cc,{revisionsData:_0x4b2533,requestId:_0xed2200})=>{Math['max'](..._0x4b2533['map'](_0xcd0614=>_0xcd0614['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x4b2533,_0xed2200);}):this['_handleRevisionsUpdate'](_0x4b2533,_0xed2200);});const {revisions:_0x4ef0c9,requestId:_0x14c3c5}=await this['_revisionHistoryService']['connect'](_0x3bd9ec['connection']);_0x3bd9ec['addToReconnectionStack'](this),this['_lastRequestId']=_0x14c3c5,await this['_fetchMissingUsers'](_0x4ef0c9);for(const _0x18ecdc of _0x4ef0c9)this['_revisionTracker']['addRevisionData'](_0x18ecdc);this['listenTo'](_0x3e3528,'change:_isConnected',(_0x47b12e,_0x1d317b,_0x36c898)=>{_0x36c898&&(this['_oldOffset']=_0x3e3528['_offset'],_0x47b12e['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x3bd9ec,'state',_0x2aead2=>_0x2aead2===_0x47b369['CONNECTED']);}async['reconnect'](){const _0x52c388=this['editor']['plugins']['get'](c),_0x53025f=this['editor']['plugins']['get'](l),_0x3bc896=async()=>{const _0x276234=this['_revisionTracker']['currentRevision'],_0x13973c=_0x276234['id'],_0x43a64b=_0x13973c!==_0x53025f['sessionId'];if(_0x43a64b){const _0x2b304e=_0x53025f['_offset']-this['_oldOffset'],_0x5c8924=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x276234['toVersion']+_0x2b304e!==_0x5c8924){const _0x5ddce8=_0x276234['fromVersion']+_0x2b304e,_0xc6487d=this['editor']['plugins']['get'](_0x2441e3),_0x3d37bd=this['_revisionTracker']['buildRevisionData']({'revision':_0x276234,'from':_0x5ddce8,'to':_0x5c8924});_0x3d37bd['id']=_0x276234['id'];const _0x190960=_0x3d37bd['authorsIds']['map'](_0x2aa185=>_0xc6487d['getUser'](_0x2aa185));_0x276234['_update']({..._0x3d37bd,'authors':_0x190960},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x276234['id'],_0x3d37bd,!0x0);}this['_revisionTracker']['_startingVersion']=_0x5c8924,(_0x276234['toVersion']===_0x276234['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x13973c)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x13973c),this['_revisionTracker']['_createCurrentRevision'](_0x5c8924));}const {revisions:_0x5ade8e,requestId:_0x5962b7}=await this['_revisionHistoryService']['reconnect'](_0x52c388['connection'],this['_lastRequestId']);_0x43a64b&&_0x5ade8e['length']>0x0?_0x53025f['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x5ade8e),this['_handleRevisionsUpdate'](_0x5ade8e,_0x5962b7),this['_revisionTracker']['sendBufferedUpdates']());};return _0x53025f['_isConnected']?_0x3bc896():new Promise((_0xdb2511,_0x4c074b)=>{_0x53025f['once']('change:_isConnected',()=>{_0x3bc896()['then'](_0xdb2511)['catch'](_0x4c074b);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x97372e=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x2fbc6e=>{_0x2fbc6e['off'](),_0x97372e();});});}['_getLatestVersionFromServerOperations'](){const _0x4172a9=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x43705c of _0x4172a9)if('marker'!==_0x43705c['type']||_0x43705c['affectsData'])return _0x43705c['baseVersion']+0x1;}['_getLatestVersion'](){const _0x2fc555=this['editor']['plugins']['get'](l);return new Promise(_0x56ff4d=>{_0x2fc555['_isPendingUpdate']?_0x2fc555['once']('change:_isPendingUpdate',()=>{_0x56ff4d(this['_getLatestVersionFromServerOperations']());}):_0x56ff4d(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x5f0811,_0x4da782){const _0x525024=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x4da782;for(const _0x2f373d of _0x5f0811){const _0x1a2b40=_0x525024['getRevision'](_0x2f373d['id']);if(_0x1a2b40){if((_0x2f373d['fromVersion']||_0x2f373d['toVersion'])&&(_0x2f373d['diffData']=null),_0x1a2b40===this['_revisionTracker']['currentRevision']){const _0x1ba6f9=Math['max'](_0x1a2b40['toVersion'],_0x2f373d['toVersion']),_0x465379=Math['max'](_0x1a2b40['fromVersion'],_0x2f373d['fromVersion']);let _0x18aed6;_0x1a2b40['toVersion']===_0x2f373d['toVersion']&&_0x1a2b40['fromVersion']===_0x2f373d['fromVersion']?(_0x18aed6=!0x0,this['_preventResendingRevisionData'](_0x2f373d)):_0x2f373d['toVersion']===_0x1ba6f9&&_0x2f373d['fromVersion']===_0x465379?_0x18aed6=!0x1:(_0x1a2b40['toVersion']===_0x1ba6f9&&_0x1a2b40['fromVersion']===_0x465379||this['_fixRevision']({'revision':_0x1a2b40,'from':_0x465379,'to':_0x1ba6f9}),_0x18aed6=!0x0),_0x18aed6&&(delete _0x2f373d['fromVersion'],delete _0x2f373d['toVersion'],delete _0x2f373d['diffData'],delete _0x2f373d['createdAt'],delete _0x2f373d['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x2f373d),this['_preventResendingRevisionData'](_0x2f373d);}else this['_revisionTracker']['addRevisionData'](_0x2f373d);}const _0x3ecf4a=_0x525024['getRevisions']();_0x3ecf4a['reverse']();for(let _0x50d66f=0x0;_0x50d66f<_0x3ecf4a['length']-0x1;_0x50d66f++){const _0x57bc14=_0x3ecf4a[_0x50d66f],_0x5d705b=_0x3ecf4a[_0x50d66f+0x1];if(_0x57bc14['fromVersion']<_0x5d705b['toVersion']){const _0x36d4aa=_0x5d705b['toVersion'],_0x2861a4=Math['max'](_0x36d4aa,_0x57bc14['toVersion']);this['_fixRevision']({'revision':_0x57bc14,'from':_0x36d4aa,'to':_0x2861a4});}}}['_fixRevision']({revision:_0x678e19,from:_0x2b8592,to:_0x302fb2}={}){const _0x3435a6=this['editor']['plugins']['get'](_0x2441e3),_0x53c0f7=this['_revisionTracker']['buildRevisionData']({'revision':_0x678e19,'from':_0x2b8592,'to':_0x302fb2});_0x53c0f7['authors']=_0x53c0f7['authorsIds']['map'](_0x178672=>_0x3435a6['getUser'](_0x178672)),_0x678e19['_update'](_0x53c0f7);}['_preventResendingRevisionData'](_0x64d243){const _0x3222bc={};_0x3222bc['id']=_0x64d243['id'];for(const _0x39fe2c of Object['keys'](_0x64d243))'id'!==_0x39fe2c&&(_0x3222bc[_0x39fe2c]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x3222bc['id'],_0x3222bc,!0x0);}async['_fetchMissingUsers'](_0x1c1798){const _0x265845=this['editor']['plugins']['get'](_0x2441e3),{connection:_0x438581}=this['editor']['plugins']['get'](c),_0x2cf2c7=new Set();for(const _0x3ae264 of _0x1c1798){for(const _0x1c5496 of _0x3ae264['authorsIds'])_0x440fd1(_0x1c5496);_0x3ae264['creatorId']&&_0x440fd1(_0x3ae264['creatorId']);}if(0x0===_0x2cf2c7['size'])return;const _0xa47361=await dt['getMany'](_0x438581,Array['from'](_0x2cf2c7));for(const _0x429c4d of _0xa47361)_0x265845['getUser'](_0x429c4d['id'])||_0x265845['addUser'](_0x429c4d);function _0x440fd1(_0x5ace3c){_0x265845['getUser'](_0x5ace3c)||_0x2cf2c7['add'](_0x5ace3c);}}}function st(_0x535030){return _0x535030['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x535030['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x535030['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x3f2414{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x3f2a09{constructor(_0x3566cb){super(_0x3566cb);const _0x3a4b0e=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x3a4b0e['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x3a4b0e['to']('usersCount',_0x265f18=>q(_0x3566cb,'CONNECTED_USERS',_0x265f18))}]});}}class rt extends _0x3f2a09{['items'];constructor(_0x555cf5){super(_0x555cf5),this['items']=this['createCollection']();const _0x2362f3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x2362f3['to'](()=>this['fire']('execute'))}});}}class k extends _0x3f2a09{['counterView'];['inlineListView'];constructor(_0xf8dbd6){super(_0xf8dbd6);const _0x27cfac=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new rt(_0xf8dbd6),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x3b6e5f of this['inlineListView']['items'])_0x3b6e5f['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',_0x27cfac['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class x extends _0x3f2a09{['items'];constructor(_0x958af3){super(_0x958af3),this['items']=this['createCollection'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__dropdown-list']},'children':[{'tag':'div','attributes':{'class':['ck','ck-presence-list__dropdown-list-wrapper']},'children':this['items']}]});}}class y extends _0x3f2a09{['userView'];constructor(_0x47a501,_0x565837,_0x5a6fb7){super(_0x47a501);const _0x2ab290=this['bindTemplate'];this['userView']=new ct(_0x47a501,_0x565837);const _0x8b54dc={'tag':'div','attributes':{'class':['ck','ck-presence-list__dropdown-list-item']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x565837['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x565837['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x5a6fb7&&(_0x8b54dc['tag']='button',_0x8b54dc['on']={'click':_0x2ab290['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x8b54dc);}}class A extends _0x3f2a09{['userView'];['markerView'];constructor(_0x494d9b,_0x7e7a76,_0x43c8ea){super(_0x494d9b);const _0x90e330=this['bindTemplate'];this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x494d9b,_0x7e7a76),this['markerView']=new ot(_0x494d9b,_0x7e7a76);const _0x524e98={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x90e330['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x90e330['to']('hasTooltip',_0xf9e8b4=>!_0xf9e8b4),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView']]};_0x43c8ea&&(_0x524e98['tag']='button',_0x524e98['on']={'click':_0x90e330['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x524e98);}}class ot extends _0x3f2a09{constructor(_0x496146,_0x35cce5){super(_0x496146),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x35cce5['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const _={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x51b4aa{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection'];constructor(_0x5eb3fd){super(_0x5eb3fd),this['context']['config']['define']('presenceList',_);const _0x181301=_0x5eb3fd['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x181301)throw new _0x2bc765('presencelist-collapseat-invalid-format',this);if(_0x181301<0x1)throw new _0x2bc765('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x5109e1(),this['balloonPanelView']=new _0x389e13(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x13bd1d of this['_allConnectedUsers'])this['_handleUserAdd'](_0x13bd1d);this['listenTo'](this['_allConnectedUsers'],'add',(_0x433840,_0x347124)=>{this['_handleUserAdd'](_0x347124);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x4bdffe,_0x3b221f)=>{this['_handleUserRemove'](_0x3b221f);});}['_createView'](){const _0x371708=this['context'],_0x468d81=new k(this['context']['locale']),_0x3562df=this['balloonPanelView'];if(!_0x189686(_0x371708['config']['get']('presenceList.container')))throw new _0x2bc765('presencelist-missing-container',this);return _0x468d81['counterView']['bind']('usersCount')['to'](this),_0x468d81['bind']('isCollapsed')['to'](this,'usersCount',_0x3ba7f1=>{const {collapseAt:_0x18f3db,displayMe:_0x478eaf}=_0x371708['config']['get']('presenceList'),_0x3119ca=_0x3ba7f1>=_0x18f3db;return _0x468d81['counterView']['isHidden']=!(0x1==_0x3ba7f1&&_0x478eaf||_0x3119ca),_0x3119ca||this['hideDropdown'](),_0x3119ca;}),_0x468d81['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x30734d=>{const _0x32d7db=_0x371708['config']['get']('presenceList'),_0x3cefa6=new A(_0x371708['locale'],_0x30734d,!!_0x32d7db['onClick']);return _0x3cefa6['bind']('hasTooltip')['to'](_0x468d81,'isCollapsed',_0x428622=>!_0x428622),_0x32d7db['onClick']&&this['listenTo'](_0x3cefa6,'execute',()=>{this['view']['isCollapsed']||_0x32d7db['onClick'](_0x30734d,_0x3cefa6['element']);}),_0x3cefa6;}),this['listenTo'](_0x468d81['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x468d81['render'](),_0x3562df['render'](),_0x3bdd20({'emitter':_0x468d81,'activator':()=>_0x3562df['isVisible'],'contextElements':[_0x3562df['element'],_0x468d81['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x371708['config']['get']('presenceList.container')['appendChild'](_0x468d81['element']),this['_bodyCollection']=new _0x587dfd(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](_0x3562df),_0x468d81;}['_handleUserAdd'](_0x3b8054){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x3b8054['isMe'])return;const _0x408933=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x408933&&this['currentDisplayedUsers']['remove'](0x0);const _0x32a205=this['_calculateNewUserPosition'](_0x3b8054);this['currentDisplayedUsers']['add'](_0x3b8054,_0x32a205);}['_handleUserRemove'](_0x3083e5){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x3083e5['id'])&&(this['currentDisplayedUsers']['remove'](_0x3083e5['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x27cd19 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x27cd19['id']))return void this['currentDisplayedUsers']['add'](_0x27cd19,0x0);}}['_calculateNewUserPosition'](_0x23adf3){return Boolean(this['currentDisplayedUsers']['last']&&this['currentDisplayedUsers']['last']['isMe'])&&!_0x23adf3['isMe']?this['currentDisplayedUsers']['length']-0x1:this['currentDisplayedUsers']['length'];}['showDropdown'](){if(this['presenceDropdownView'])return;this['presenceDropdownView']=new x(this['context']['locale']);const _0x84e831=this['context']['config']['get']('presenceList');this['presenceDropdownView']['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x2d9004=>{if(!_0x84e831['displayMe']&&_0x2d9004['isMe'])return null;const _0x542ead=new y(this['context']['locale'],_0x2d9004,!!_0x84e831['onClick']);return _0x84e831['onClick']&&this['listenTo'](_0x542ead,'execute',()=>{_0x84e831['onClick'](_0x2d9004,_0x542ead['element']);}),_0x542ead;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']});}['hideDropdown'](){this['presenceDropdownView']&&(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']();}}class i extends _0x51b4aa{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 _0x598c24,Plugin as _0x46a97b,PendingActions as _0x5b7e56,Context as _0xe7e5e1}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x350a6c,CKEditorError as _0x54234f,Collection as _0x4dc19a,global as _0x506019,version as nt,uid as _0x295c1b}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x292bdf,View as _0x338bb6,BalloonPanelView as _0x3b3385,clickOutsideHandler as _0x532085,BodyCollection as _0x382311}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0x2749fe,NoOperation as _0x28cb9a,InsertOperation as _0x551703,MarkerOperation as _0x482c97,RootAttributeOperation as _0x4a4c64,transformSets as _0x452878,OperationFactory as _0x5b7b5f}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as at,WEB_SOCKET_GATEWAY_STATES as _0x204c9a,CollaborativeEditingService as _0x2704da,User as dt,CommentsService as _0x4d1a6a,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x3ee037,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x3c465e}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x28bb9b}from'lodash-es';class c extends _0x598c24{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
24
+ ((()=>at)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x292bdf];}static get['pluginName'](){return'WebSocketGateway';}constructor(_0x25d30b){super(_0x25d30b),this['set']('state',_0x204c9a['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x350a6c);}['init'](){const _0x322311=this['context'],_0x19f58b=_0x322311['plugins']['get']('CloudServices'),_0x28c964=_0x322311['plugins']['get'](_0x292bdf);if(!_0x19f58b['token'])throw new _0x54234f('websocketgateway-missing-token',this);if(!_0x19f58b['webSocketUrl'])throw new _0x54234f('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'](_0x19f58b['token'],_0x19f58b['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x5b0b98=>{if(this['connection']=_0x5b0b98,this['bind']('state')['to'](_0x5b0b98,'state',this,'_isBrowserOffline',(_0x1581d1,_0x3aa05e)=>('connected'!==_0x1581d1&&(this['_shouldPluginsReconnect']=!0x0),_0x3aa05e||_0x1581d1!==_0x204c9a['CONNECTED']?_0x204c9a['DISCONNECTED']:this['state']==_0x204c9a['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x204c9a['CONNECTING']):_0x204c9a['CONNECTED'])),this['connection']['on']('error',(_0x3b56a6,_0x4c3b0f)=>{if('limitExceeded'!==_0x4c3b0f['code'])throw console['error'](_0x4c3b0f),new _0x54234f('cloudservices-init',null,{'originalError':_0x4c3b0f});_0x28c964['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'});}),!_0x5b0b98['me'])return new Promise(_0x2c2990=>_0x5b0b98['on']('change:me',_0x2c2990));})['catch'](_0x1e08df=>{throw console['error'](_0x1e08df),new _0x54234f('cloudservices-init',null,{'originalError':_0x1e08df});});}['addToReconnectionStack'](_0x3f611c){if('function'!=typeof _0x3f611c['reconnect'])throw new _0x54234f('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x3f611c))throw new _0x54234f('websocketgateway-plugin-already-registered',this,{'name':_0x3f611c['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x3f611c);}['removeFromReconnectionStack'](_0x354573){this['_reconnectionStack']['delete'](_0x354573);}['isInReconnectionStack'](_0x5679f5){return this['_reconnectionStack']['has'](_0x5679f5);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0xf0e610=>_0xf0e610['reconnect']())))['then'](()=>this['state']=_0x204c9a['CONNECTED'])['catch'](_0x558819=>{throw console['error'](_0x558819),new _0x54234f('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x204c9a['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class r extends _0x598c24{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['requires'](){return[c,_0x3ee037];}constructor(_0x261c51){super(_0x261c51),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x4dc19a(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x3ee037);}['init'](){const _0x374941=this['context']['plugins']['get'](c);this['listenTo'](_0x374941,'change:state',(_0x401554,_0x1e66c3,_0x2fe6d0)=>{if('connected'!==_0x2fe6d0)this['channelSessions']['forEach'](_0x3b10c7=>_0x3b10c7['clear']()),this['channelConnectedUsers']['forEach'](_0x5d01fd=>_0x5d01fd['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x433009,_0x417257]of this['_registeredSessions'])for(const _0x6bf039 of _0x417257)this['_handleSessionAdd'](_0x433009,_0x6bf039);}}),this['_createUser'](_0x374941['connection']['me'],!0x0);}['register'](_0x251f91,_0x1dd4cf){if(this['_registeredSessions']['has'](_0x251f91))throw new _0x54234f('sessions-register-already-registered',null,{'channelId':_0x251f91});this['_registeredSessions']['set'](_0x251f91,_0x1dd4cf),this['channelSessions']['set'](_0x251f91,new _0x4dc19a()),this['channelConnectedUsers']['set'](_0x251f91,new _0x4dc19a()),this['listenTo'](_0x1dd4cf,'add',(_0xf4259,_0x3eb97e)=>this['_handleSessionAdd'](_0x251f91,_0x3eb97e)),this['listenTo'](_0x1dd4cf,'remove',(_0x18fb04,_0x57055f)=>this['_handleSessionRemove'](_0x251f91,_0x57055f));for(const _0x7bdad5 of _0x1dd4cf)this['_handleSessionAdd'](_0x251f91,_0x7bdad5);}['unregister'](_0xa3009d){if(!this['_registeredSessions']['has'](_0xa3009d))throw new _0x54234f('sessions-unregister-not-exist',null,{'channelId':_0xa3009d});const _0x38b688=this['_registeredSessions']['get'](_0xa3009d);this['stopListening'](_0x38b688);for(const _0x46cd38 of _0x38b688)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0xa3009d,_0x46cd38);this['_registeredSessions']['delete'](_0xa3009d),this['channelSessions']['delete'](_0xa3009d),this['channelConnectedUsers']['delete'](_0xa3009d);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x4f30d4){for(const _0x52a7a3 of this['channelSessions']['values']())for(const _0x177eb9 of _0x52a7a3)if(_0x177eb9['id']===_0x4f30d4)return _0x177eb9['user'];}['getUserSessions'](_0x4bc1da,_0x5c0d53){const _0x42f099=_0x5c0d53?[this['channelSessions']['get'](_0x5c0d53)]:this['channelSessions']['values'](),_0x21dcb2=new Set();for(const _0xd4e9fd of _0x42f099)for(const _0xc6f467 of _0xd4e9fd)_0xc6f467['user']['id']===_0x4bc1da['id']&&_0x21dcb2['add'](_0xc6f467['id']);return _0x21dcb2;}['getUserRole'](_0x4f02ac){for(const _0x14fe7f of this['channelSessions']['values']())for(const _0x4894ba of _0x14fe7f)if(_0x4894ba['user']===_0x4f02ac)return _0x4894ba['role'];}['_handleSessionAdd'](_0x6fd0d0,_0x102a2a){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x29920f=_0x102a2a['user'],_0x3ecbd2=this['_users']['getUser'](_0x29920f['id'])||this['_createUser'](_0x29920f),_0x2270a7=Object['assign']({},_0x102a2a,{'user':_0x3ecbd2});this['channelSessions']['get'](_0x6fd0d0)['add'](_0x2270a7);const _0x536280=this['channelConnectedUsers']['get'](_0x6fd0d0);_0x536280['has'](_0x3ecbd2['id'])||_0x536280['add'](_0x3ecbd2),this['allConnectedUsers']['has'](_0x3ecbd2['id'])||this['allConnectedUsers']['add'](_0x3ecbd2,_0x3ecbd2['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x6fd0d0,{'channelId':_0x6fd0d0,'session':_0x2270a7});}['_handleSessionRemove'](_0x2e6b5b,_0x4dd91e){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x34f1d7=this['channelConnectedUsers']['get'](_0x2e6b5b),_0x2ad386=_0x4dd91e['user'];_0x2ad386['id']&&(this['channelSessions']['get'](_0x2e6b5b)['remove'](_0x4dd91e['id']),_0x34f1d7['has'](_0x2ad386['id'])&&!this['getUserSessions'](_0x2ad386,_0x2e6b5b)['size']&&_0x34f1d7['remove'](_0x2ad386['id']),this['allConnectedUsers']['get'](_0x2ad386['id'])&&!this['getUserSessions'](_0x2ad386)['size']&&this['allConnectedUsers']['remove'](_0x2ad386['id']));}['_createUser'](_0x545cf5,_0x135cbe){const _0x2e0aa7=this['_users']['addUser'](_0x545cf5);return _0x135cbe&&this['_users']['defineMe'](_0x545cf5['id']),_0x2e0aa7['orderNumber']=this['_uniqueUsersCount']++,_0x2e0aa7;}}class H extends _0x46a97b{['_domEmitter']=new(_0x350a6c())();static get['requires'](){return[r];}static get['pluginName'](){return'UserMarkers';}['init'](){const _0xe80223=this['editor'],_0x41bb24=_0xe80223['plugins']['get'](r);_0xe80223['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x2781ee,{writer:_0x25ac9e})=>function(_0x10180c,_0x141ae3,_0x59db09,_0x54f4c9){const _0x54c412=_0x10180c['markerName']['split'](':')[0x2],_0x17b720=_0x59db09['getUserBySessionId'](_0x54c412);if(!_0x17b720||_0x54c412===_0x59db09['mySessionId'])return;if(!_0x54f4c9['model']['schema']['checkChild'](_0x10180c['markerRange']['start'],'$text'))return;const _0x111ab4={'class':'ck-user__marker\x20'+_0x17b720['color']['getMarkerClass'](),'data-name':_0x17b720['name'],'data-session-id':_0x54c412},_0x17da21=_0x54f4c9['model']['markers']['get'](_0x10180c['markerName']),_0x2c8a5b=_0x17da21['getStart'](),_0x4ec889=_0x2c8a5b['nodeAfter'],_0x43be8b=_0x54f4c9['model']['schema'];if(_0x4ec889&&_0x43be8b['isObject'](_0x4ec889)&&_0x43be8b['isInline'](_0x4ec889)&&!_0x54f4c9['model']['markers']['get']('user:range:'+_0x54c412)['getRange']()['isCollapsed'])return;const _0x3ba848=_0x2c8a5b['parent'];return _0x54f4c9['model']['schema']['isLimit'](_0x3ba848)&&!_0x54f4c9['model']['hasContent'](_0x3ba848)&&(_0x111ab4['contenteditable']=!0x1),function(_0x4fdbce,_0x28d602,_0x3c2290){const _0x335f53=_0x4fdbce['createUIElement']('span',_0x28d602);return _0x4fdbce['setCustomProperty']('userPositionMarker',!0x0,_0x335f53),_0x335f53['render']=function(_0x5360b5){const _0x5ae5ef=this['toDomElement'](_0x5360b5);return _0x5ae5ef['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>'+_0x3c2290['name']+'</span>⁠',_0x5ae5ef['addEventListener']('mouseenter',()=>{_0x5ae5ef['classList']['add']('ck-user__marker_hovered');}),_0x5ae5ef['addEventListener']('mouseleave',()=>{_0x5ae5ef['classList']['remove']('ck-user__marker_hovered');}),_0x5ae5ef;},_0x335f53['isSimilar']=function(_0xd32788){return!(!this['getCustomProperty']('userPositionMarker')||!_0xd32788['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0xd32788['getAttribute']('data-session-id'));},_0x335f53;}(_0x141ae3,_0x111ab4,_0x17b720);}(_0x2781ee,_0x25ac9e,_0x41bb24,_0xe80223)}),_0xe80223['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x2daec5=>function(_0x8ad934,_0x8559eb){const _0x277eee=_0x8ad934['markerName']['split'](':')[0x2];if(_0x277eee===_0x8559eb['mySessionId'])return null;const _0x6b98ac=_0x8559eb['getUserBySessionId'](_0x277eee);if(!_0x6b98ac)return{'id':_0x277eee,'classes':[]};return{'id':_0x277eee,'classes':['ck-user__selection',_0x6b98ac['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x277eee},'priority':0x7d0+_0x6b98ac['orderNumber']};}(_0x2daec5,_0x41bb24)}),function(_0x35f019){const _0xcb3401=_0x35f019['model'],_0x4b7afc=new Map(),_0x21f8f1=_0x35f019['plugins']['get'](r);_0xcb3401['markers']['on']('update:user:range',(_0x1823f3,_0x5f16fa,_0x1c90da,_0x4856ec)=>{if(!_0x4856ec&&_0x4b7afc['get'](_0x5f16fa['name']))return _0x4b7afc['get'](_0x5f16fa['name'])['detach'](),void _0x4b7afc['delete'](_0x5f16fa['name']);const _0x4168f6=_0x5f16fa['name']['split'](':')[0x2];if(_0x4168f6===_0x21f8f1['mySessionId'])return;const _0x318d0b='user:position:'+_0x4168f6;_0xcb3401['markers']['has'](_0x318d0b)&&_0x35f019['editing']['reconvertMarker'](_0x318d0b),_0x5f16fa['on']('change:range',(_0x28a03d,_0x3523ad,_0x401064)=>{if('$graveyard'!=_0x3523ad['root']['rootName']&&'$graveyard'==_0x5f16fa['getRange']()['root']['rootName']&&!_0x4b7afc['has'](_0x5f16fa['name'])){const _0x35112b=_0xcb3401['schema']['getNearestSelectionRange'](_0x401064['deletionPosition']);if(_0x35112b){const _0x4384f3=ht['fromRange'](_0x35112b);_0x4b7afc['set'](_0x5f16fa['name'],_0x4384f3),_0x4384f3['on']('change:range',(_0x4d4d64,_0x4062f1,_0x4c7858)=>{if('$graveyard'==_0x4384f3['root']['rootName']){const _0x49dd2c=_0xcb3401['schema']['getNearestSelectionRange'](_0x4c7858['deletionPosition']);_0x49dd2c?(_0x4384f3['start']=_0x49dd2c['start'],_0x4384f3['end']=_0x49dd2c['end']):(_0x4b7afc['delete'](_0x5f16fa['name']),_0x4384f3['detach']());}});}}});}),_0xcb3401['document']['on']('change',()=>{_0x4b7afc['size']>0x0&&_0xcb3401['enqueueChange']({'isUndoable':!0x1},_0x23b751=>{for(const [_0x203f9e,_0x2e3689]of _0x4b7afc)'$graveyard'==_0xcb3401['markers']['get'](_0x203f9e)['getRange']()['root']['rootName']&&(re(_0x203f9e['split'](':')[0x2],_0x2e3689['toRange'](),_0xcb3401,_0x23b751),_0x2e3689['detach']());_0x4b7afc['clear']();});});}(_0xe80223),this['_domEmitter']['listenTo'](_0x506019['document'],'keydown',(_0x240315,{key:_0x4a1f2d})=>{'Escape'===_0x4a1f2d&&function(_0x10c0f2){_0x10c0f2['editing']['view']['change'](_0x5ab0c4=>{for(const _0x97db2a of _0x10c0f2['model']['markers']){if(!_0x97db2a['name']['startsWith']('user:position'))continue;const _0x250229=_0x10c0f2['editing']['mapper']['markerNameToElements'](_0x97db2a['name']);if(_0x250229){for(const _0x80c825 of _0x250229)_0x5ab0c4['removeClass']('ck-user__marker_hovered',_0x80c825);}}});}(_0xe80223);},{'useCapture':!0x0});}['afterInit'](){const _0x47dcbd=this['editor'],_0x4251e2=_0x47dcbd['commands']['get']('undo');_0x4251e2&&_0x47dcbd['model']['on']('applyOperation',(_0x2f9e93,_0x36e694)=>{const _0x4988d9=_0x36e694[0x0];if('marker'!=_0x4988d9['type']||!_0x4988d9['name']['startsWith']('user:'))return;const _0x4e9015=_0x4988d9['batch'];_0x4251e2['_createdBatches']['has'](_0x4e9015)&&(_0x4988d9['newRange']=_0x4988d9['oldRange']?_0x47dcbd['model']['createRange'](_0x4988d9['oldRange']['start'],_0x4988d9['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x328890=this['editor'],_0x314f0e=_0x328890['model']['document'],_0x4769e4=_0x328890['plugins']['get'](r);_0x328890['model']['enqueueChange']({'isUndoable':!0x1},_0xa02ba4=>{const _0x452f4d='user:range:'+_0x4769e4['mySessionId'],_0x186a2c='user:position:'+_0x4769e4['mySessionId'],_0x31bae6=_0x328890['model']['markers']['has'](_0x452f4d);_0x328890['editing']['view']['hasDomSelection']?re(_0x4769e4['mySessionId'],_0x314f0e['selection']['getFirstRange'](),_0x328890['model'],_0xa02ba4):_0x31bae6&&(_0xa02ba4['removeMarker'](_0x452f4d),_0xa02ba4['removeMarker'](_0x186a2c));});}}function re(_0x3e44b5,_0x575a7b,_0x49d637,_0x336c48){const _0x333e71='user:range:'+_0x3e44b5,_0x562c0a='user:position:'+_0x3e44b5,_0x219aa=_0x575a7b['getContainedElement']();let _0x54f182=_0x575a7b['start'];_0x219aa&&_0x219aa['is']('element','tableCell')&&(_0x54f182=function(_0x2265ba,_0xaf446e){for(const _0x1fe4cf of _0x2265ba['getPositions']())if(_0xaf446e['schema']['checkChild'](_0x1fe4cf,'$text'))return _0x1fe4cf;}(_0x575a7b,_0x49d637),_0x575a7b=_0x336c48['createRange'](_0x54f182));const _0x258d26=_0x336c48['createRange'](_0x54f182);_0x49d637['markers']['has'](_0x333e71)?(_0x336c48['updateMarker'](_0x333e71,{'range':_0x575a7b}),_0x336c48['updateMarker'](_0x562c0a,{'range':_0x258d26})):(_0x336c48['addMarker'](_0x333e71,{'range':_0x575a7b,'usingOperation':!0x0}),_0x336c48['addMarker'](_0x562c0a,{'range':_0x258d26,'usingOperation':!0x0}));}function q(_0x475dc8,_0x544f92,_0x58fdac){const t=_0x475dc8['t'];switch(_0x544f92){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'PENDING_ACTION_REVISION_HISTORY':return t({'string':'Unsaved\x20change\x20in\x20revision\x20history.','id':'PENDING_ACTION_REVISION_HISTORY'});case'CONNECTED_USERS':return t({'string':'1\x20connected\x20user\x20(me)','plural':'%0\x20connected\x20users','id':'CONNECTED_USERS'},_0x58fdac);default:return'';}}let K=0x1;class l extends _0x46a97b{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
25
+ ((()=>_0x2704da)());['_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,_0x5b7e56,_0x3ee037,_0x292bdf];}static get['pluginName'](){return'RealTimeCollaborationClient';}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x3698f1=this['serverHistory']['getOperations']();for(let _0x2a87f0=_0x3698f1['length']-0x1;_0x2a87f0>=0x0;_0x2a87f0--){const _0x3bf092=_0x3698f1[_0x2a87f0];if(!this['_disconnectionOperations']['has'](_0x3bf092))return _0x3bf092['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0xf65c24){if(super(_0xf65c24),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x2749fe(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x54234f('collaboration-missing-channelid',this);const _0x5bdd12=_0xf65c24['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x5bdd12,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x3c465e(),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 _0x52a4a0=this['editor'],_0x3d26dc=_0x52a4a0['plugins']['get'](_0x3ee037),_0x3799c0=_0x52a4a0['plugins']['get'](c);this['listenTo'](_0x3d26dc,'getOperationAuthor',(_0x1069d7,_0x25d72b)=>{const _0xb8b427=_0x25d72b[0x0];_0xb8b427['_authorId']&&(_0x1069d7['return']=_0x3d26dc['getUser'](_0xb8b427['_authorId']),_0x1069d7['stop']()),null===_0xb8b427['_authorId']&&(_0x1069d7['return']=null,_0x1069d7['stop']());},{'priority':'high'}),this['listenTo'](_0x52a4a0['model']['document']['selection'],'change:range',(_0x41db72,_0x262143)=>{_0x262143['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x52a4a0['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x52a4a0['model']['on']('applyOperation',(_0x4a929b,_0x1a0197)=>{const _0x15a052=_0x1a0197[0x0];_0x15a052['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x15a052),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x3799c0,'state',this,'_hasSynchronizationProblem',(_0x58d2a6,_0x373c78)=>'connected'===_0x58d2a6&&!_0x373c78),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x52a4a0['disableReadOnlyMode']('rtc-offline'):_0x52a4a0['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x52a4a0['disableReadOnlyMode']('rtc-offline'):_0x52a4a0['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x3c20c9=this['editor']['plugins']['get'](r),_0x165102=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x3c20c9['unregister'](this['_channelId']);const _0x4291e7=await this['_service']['reconnect'](_0x165102['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x4291e7)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x5efce5=await this['_service']['getConnectedSessions']();_0x3c20c9['register'](this['_channelId'],_0x5efce5),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x3aa3d3){if(function(_0x8e8be2){return'404'===_0x8e8be2['code'];}(_0x3aa3d3)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x60f0a4){return'409'===_0x60f0a4['code'];}(_0x3aa3d3)){const _0x86eb94=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'](_0x86eb94);}else{if(!(_0x3aa3d3 instanceof J))throw _0x3aa3d3;this['_handleReconnectionError']();}}}}['destroy'](){const _0x2a7143=this['editor']['plugins']['get'](c),_0x40c49f=this['editor']['plugins']['get'](r);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x40c49f['channelSessions']['has'](this['_channelId'])&&_0x40c49f['unregister'](this['_channelId']),_0x2a7143['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0xf10cb){if(this['sessionId']!==_0xf10cb['sessionId']&&this['_lastSyncedOperationId']!==_0xf10cb['lastOperationId'])throw new J();return this['sessionId']=_0xf10cb['sessionId'],this['_handleServerResponse']([],{..._0xf10cb,'wereChangesApplied':!0x1,'data':_0xf10cb['data']},'reconnect');}async['_connectService'](_0x359950,_0x44c800=!0x1){const {connection:_0xcc2ded}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0xcc2ded,this['_channelId'])['then'](_0x582fd3=>this['_initSessionsHandling'](_0x582fd3))['catch'](_0x2694aa=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x2694aa);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x33b45c,_0x5623bc)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x5623bc);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0xc36b3b=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x359950);this['_isPendingUpdate']=!0x0;const _0x2703e6=await this['_service']['connect'](_0xcc2ded,this['_compressOperations'](_0x359950),_0xc36b3b);if(this['sessionId']=_0x2703e6['sessionId'],_0x44c800){if(!_0x2703e6['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x2703e6['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x359950,_0x2703e6,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x2703e6,_0x359950);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x707b08=this['editor']['plugins']['get'](r),_0xfa0585=this['editor']['plugins']['get'](H),_0x14320b=_0x707b08['channelSessions']['get'](this['_channelId']);_0x14320b&&_0x14320b['length']>0x1?_0xfa0585['createUserMarkerOperations']():this['listenTo'](_0x707b08,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x707b08['channelSessions']['get'](this['_channelId'])['length']&&_0xfa0585['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x5b4c11,_0x64cba3,_0x44d265,_0x2ce765){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x64cba3){const _0x39e6e9=this['_decompressOperations'](_0x44d265,_0x2ce765);await this['_fetchMissingUsers'](_0x39e6e9),this['_handleExternalOperations'](_0x39e6e9,_0x64cba3,_0x44d265['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x5e5c82}=this['editor'];let _0x5d6f3d;try{_0x5d6f3d=await this['_service']['getDocumentDetails']();}catch(_0x2e3a3e){const _0x5a9a6e=q(_0x5e5c82,'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'](_0x5a9a6e);}const _0x3b2b38=_0x5d6f3d['currentDocumentSession']||_0x5d6f3d['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x3b2b38['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x3cff2=q(_0x5e5c82,'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'](_0x3cff2);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x7a882c){const _0x131f75=this['editor']['plugins']['get'](r);this['listenTo'](_0x131f75,'sessionAdd:'+this['_channelId'],(_0xd37753,{session:_0x59b7c0})=>{if(_0x59b7c0['id']===_0x131f75['mySessionId']){_0xd37753['off']();const _0x514ddf=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x1fbd10=_0x59b7c0['permissions'];_0x514ddf&&_0x514ddf['isEnabled']&&(_0x1fbd10=_0x1fbd10['filter'](_0xd6886d=>'document:write'!==_0xd6886d)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x1fbd10,this['_channelId']);}}),_0x131f75['register'](this['_channelId'],_0x7a882c);}['_initThrowingOnDataSet'](){const _0x2d4d3a=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x305925)=>{if(!_0x305925[_0x305925['length']-0x1]['suppressErrorInCollaboration'])throw new _0x54234f('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x2d4d3a['apply'](this['editor']['data'],_0x305925);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x9a3da1,[_0x32f5f2])=>{if(this['_document']['version'])throw new _0x54234f('realtimecollaborationclient-init-document-already-initialized',this);_0x9a3da1['stop'](),this['_setPendingAction']();const _0x54d794=this['editor']['config']['get']('rootsAttributes'),_0x3daee1=this['_getOperationsFromInitData'](_0x32f5f2,_0x54d794);0x0==_0x3daee1['length']&&_0x3daee1['push'](new _0x28cb9a(0x0)),_0x9a3da1['return']=this['_connectService'](_0x3daee1)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x24a4ea=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x24a4ea))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x4e515f,[_0x4a0fff,_0x2accf6])=>{_0x4e515f['stop']();const _0xe28103=this['editor']['model']['document']['getRoot'](_0x4a0fff);if(!this['_knownRootNames']['has'](_0x4a0fff)){const _0x333201=_0x2accf6&&_0x2accf6['data']?_0x2accf6['data']:'',_0x492dc8=_0x2accf6&&_0x2accf6['attributes']?_0x2accf6['attributes']:{};await this['_loadRoot'](_0x4a0fff,_0x333201,_0x492dc8);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0xe28103['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0xe28103);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x2b55b1){const _0x32b0b8=this['editor']['plugins']['get'](_0x3ee037),{connection:_0x40b676}=this['editor']['plugins']['get'](c),_0x4b72b3=new Set();for(const _0x173451 of _0x2b55b1){const _0x4e7e52=_0x173451['_authorId'];_0x4e7e52&&!_0x32b0b8['getUser'](_0x4e7e52)&&_0x4b72b3['add'](_0x4e7e52);}if(0x0===_0x4b72b3['size'])return;const _0x57277d=await dt['getMany'](_0x40b676,Array['from'](_0x4b72b3));for(const _0xe36da0 of _0x57277d)_0x32b0b8['getUser'](_0xe36da0['id'])||_0x32b0b8['addUser'](_0xe36da0);}['_getOperationsFromInitData'](_0x97af4e,_0x5b00f3={}){const _0x594eb3=this['editor']['model'],_0x31f71e=[];let _0x15d828=0x0;const _0x18316c='string'==typeof _0x97af4e?{'main':_0x97af4e}:_0x97af4e;for(const _0x3101e8 of Object['keys'](_0x18316c)){if(!this['_document']['roots']['has'](_0x3101e8))throw new _0x54234f('realtimecollaborationclient-init-non-existent-root',this);const _0x4a76fd=this['editor']['data']['parse'](_0x18316c[_0x3101e8]),_0x2d3563=this['_document']['getRoot'](_0x3101e8),_0x32db34=new _0x551703(_0x594eb3['createPositionAt'](_0x2d3563,0x0),_0x4a76fd,_0x15d828++);_0x31f71e['push'](_0x32db34);for(const [_0x17068e,_0x5abe07]of _0x4a76fd['markers']){const _0x33b47e=_0x594eb3['createRange'](_0x594eb3['createPositionFromPath'](_0x2d3563,_0x5abe07['start']['path']['slice']()),_0x594eb3['createPositionFromPath'](_0x2d3563,_0x5abe07['end']['path']['slice']())),_0x3c78ab=new _0x482c97(_0x17068e,null,_0x33b47e,_0x594eb3['markers'],!0x0,_0x15d828++);_0x31f71e['push'](_0x3c78ab);}}if(_0x5b00f3)for(const [_0x42e648,_0x330532]of Object['entries'](_0x5b00f3)){const _0x1de05c=_0x594eb3['document']['getRoot'](_0x42e648);if(!_0x1de05c)throw new _0x54234f('multi-root-editor-root-attributes-no-root',null);for(const [_0x5ba796,_0x1b4ff1]of Object['entries'](_0x330532))if(null!==_0x1b4ff1){const _0x534db4=new _0x4a4c64(_0x1de05c,_0x5ba796,null,_0x1b4ff1,_0x15d828++);_0x31f71e['push'](_0x534db4);}}return _0x31f71e;}async['_loadRoot'](_0x4e23a1,_0x1b421d,_0x1267c2){this['_getOperationsFromInitData']({[_0x4e23a1]:_0x1b421d},{[_0x4e23a1]:_0x1267c2})['forEach']((_0x71ca20,_0x1ea932)=>{_0x71ca20['baseVersion']=this['_document']['version']+_0x1ea932,_0x71ca20['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x71ca20);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x5e4f95,_0x3405e3){let _0x189eb1;this['_offset']=_0x5e4f95['offset'];const _0x34212d=_0x5e4f95['wereChangesApplied']&&!_0x5e4f95['initData'],_0x522df4=_0x34212d?0x0:_0x5e4f95['data']['baseVersion'];if(_0x3405e3['forEach'](_0x3d81ff=>{_0x3d81ff['_isInit']=!0x0,_0x3d81ff['createdAt']=_0x5e4f95['sessionCreatedAt'],_0x3d81ff['_authorId']=null;}),_0x34212d)_0x189eb1=_0x3405e3,this['_applyOperationsSet'](_0x189eb1,_0x34212d);else{if(_0x5e4f95['initData']){const _0x1dc856=this['_getOperationsFromInitData'](_0x5e4f95['initData']);this['_document']['history']['version']=-_0x1dc856['length'],_0x1dc856['forEach'](_0x2ed550=>{_0x2ed550['baseVersion']-=_0x1dc856['length'],_0x2ed550['createdAt']=_0x5e4f95['sessionCreatedAt'],_0x2ed550['_isInit']=!0x0,_0x2ed550['_authorId']=null;}),this['_applyOperationsSet'](_0x1dc856,!0x0),this['serverHistory']['version']=-_0x1dc856['length']+this['_offset'],this['_updateServerHistory'](_0x1dc856);}this['_document']['history']['version']=_0x522df4,_0x189eb1=this['_decompressOperations'](_0x5e4f95['data'],_0x5e4f95['metadata']),await this['_fetchMissingUsers'](_0x189eb1),this['_applyOperationsSet'](_0x189eb1,_0x34212d);}_0x5e4f95['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x189eb1,_0x5e4f95['lastOperationId']),this['_lastSyncedOperationId']=_0x5e4f95['lastOperationId']),this['serverHistory']['version']=_0x522df4+this['_offset'],this['_updateServerHistory'](_0x189eb1),_0x3405e3['filter'](_0x2221c2=>{const _0x39a4ae=this['_getAffectedRoot'](_0x2221c2);return _0x39a4ae&&!this['_knownRootNames']['has'](_0x39a4ae);})['forEach']((_0x2be2d0,_0x3f2773)=>{_0x2be2d0['baseVersion']=this['_document']['version']+_0x3f2773,this['_saveOperationInBuffer'](_0x2be2d0);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x413aab,_0x1e6773){throw this['_isPendingUpdate']=!0x0,_0x1e6773&&console['error'](_0x1e6773),new _0x54234f(_0x413aab,this['editor']);}['_saveOperationInBuffer'](_0x5e0bed){this['_knownOperations']['has'](_0x5e0bed)||(this['_knownOperations']['add'](_0x5e0bed),this['_bufferedOperations']['push'](_0x5e0bed),this['_pendingAction']||'marker'==_0x5e0bed['type']&&!_0x5e0bed['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x3a3992=!0x1){!_0x3a3992&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x4cb0eb=>{_0x4cb0eb&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x498a18=>{if(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,!function(_0x585f12){return _0x585f12['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x585f12['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x585f12['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x498a18))throw _0x498a18;});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x31406b=>{this['on']('change:_isPendingUpdate',()=>{_0x31406b();});});}async['_sendBufferedOperations'](){const _0x3c5571=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x3c5571['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x494d23=[...this['_bufferedOperations']];for(const _0x1f649c of _0x494d23)_0x1f649c['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x1f649c);const _0x514319=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x494d23),_0x48e4d6=K++,_0x487dda=this['_compressOperations'](_0x494d23),_0x3d5c78=await this['_service']['sendOperations'](_0x487dda,_0x487dda['baseVersion'],_0x514319);try{return await this['_handleServerResponse'](_0x494d23,_0x3d5c78,_0x48e4d6);}catch(_0x4e0c99){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x4e0c99);}}async['_handleServerResponse'](_0x1a8684,_0x4f330e,_0x4bb0e9){if('error'in _0x4f330e)throw _0x4f330e['error'];let _0x25b663=!0x1;if(_0x4f330e['wereChangesApplied']){_0x4f330e['lastOperationId']&&(this['_lastSyncedOperationId']=_0x4f330e['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x9dca67=>!_0x1a8684['includes'](_0x9dca67));for(const _0x320d4c of _0x1a8684)_0x320d4c['createdAt']='lastOperationAcceptedAt'in _0x4f330e&&_0x4f330e['lastOperationAcceptedAt']||void 0x0;Q(_0x1a8684,_0x4f330e['version']-_0x1a8684['length']),this['_updateServerHistory'](_0x1a8684);const _0x5d1cd0=_0x1a8684['filter'](_0x448a47=>{if(!_0x448a47['_isInit'])return!0x1;const _0x3369f4=this['_getAffectedRoot'](_0x448a47);return _0x3369f4&&!this['_knownRootNames']['has'](_0x3369f4);});Q(_0x5d1cd0,this['_document']['version']),this['_applyOperationsSet'](_0x5d1cd0),_0x25b663=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x11fc79=this['_decompressOperations'](_0x4f330e['data'],_0x4f330e['metadata'])['filter'](_0x8d1550=>_0x8d1550['baseVersion']>=this['_lastServerVersion']);_0x11fc79['forEach'](_0x20a5a3=>this['_addKnownRoot'](_0x20a5a3)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x535a8e=>!_0x535a8e['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x535a8e))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x11fc79),_0x25b663=this['_handleExternalOperations'](_0x11fc79,_0x4f330e['version'],_0x4f330e['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x25b663?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x118f8d,_0x52e07a,_0x56044d){try{const _0x5a1333={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x1d8d4f,operationsB:_0x10700e,originalOperations:_0x526183}=_0x452878(_0x118f8d,this['_bufferedOperations'],_0x5a1333);Q(_0x1d8d4f,this['_document']['version']),Q(_0x10700e,_0x52e07a);for(const _0x386c76 of _0x1d8d4f){const _0x25cb3d=_0x526183['get'](_0x386c76);_0x386c76['_authorId']=_0x25cb3d?_0x25cb3d['_authorId']:null;}_0x56044d&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x118f8d,_0x56044d),this['_lastSyncedOperationId']=_0x56044d),this['_bufferedOperations']=[..._0x10700e],this['_applyOperationsSet'](_0x1d8d4f),this['_updateServerHistory'](_0x118f8d);}catch(_0x15b4f0){return console['error'](_0x15b4f0),!0x1;}return!0x0;}['_applyOperationsSet'](_0x36f870,_0x52be2f=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x59b46c=>{for(const _0x57bfd2 of _0x36f870)this['_knownOperations']['add'](_0x57bfd2),this['_addKnownRoot'](_0x57bfd2),_0x59b46c['batch']['addOperation'](_0x57bfd2),this['editor']['model']['applyOperation'](_0x57bfd2);});}['_addKnownRoot'](_0x50edf1){const _0x3f7bf3=this['_getAffectedRoot'](_0x50edf1);_0x3f7bf3&&this['_knownRootNames']['add'](_0x3f7bf3);}['_getAffectedRoot'](_0x511a1a){let _0x5a558d,_0x431079;switch(_0x511a1a['type']){case'insert':_0x5a558d=_0x511a1a['position']['root'];break;case'marker':if(_0x431079=_0x511a1a['newRange'],!_0x431079)return null;_0x5a558d=_0x431079['root'];break;case'addRootAttribute':_0x5a558d=_0x511a1a['root'];break;case'addRoot':_0x5a558d=_0x511a1a['affectedSelectable'];break;case'move':_0x5a558d=_0x511a1a['targetPosition']['root'];break;default:return null;}return _0x5a558d['rootName'];}['_updateServerHistory'](_0x44b766){_0x44b766['forEach'](_0x2c59b0=>{const _0x59a9d3=_0x2c59b0['clone']();_0x59a9d3['_authorId']=_0x2c59b0['_authorId'],_0x59a9d3['_isInit']=!!_0x2c59b0['_isInit'],_0x59a9d3['createdAt']=_0x2c59b0['createdAt'],_0x59a9d3['baseVersion']+=this['_offset'],_0x2c59b0['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x59a9d3),this['serverHistory']['addOperation'](_0x59a9d3);});}['_handleReconnectionError'](_0x5a10ad){const _0x37c819=this['editor']['plugins']['get']('Notification'),_0x513536=this['editor']['locale'];_0x5a10ad||(_0x5a10ad=q(_0x513536,'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.')),_0x37c819['showWarning'](_0x5a10ad,{'title':q(_0x513536,'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'](_0x5b7e56)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x5b7e56)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x31d866){const _0x175b76=_0x31d866['map'](_0x30d31d=>_0x30d31d['toJSON']());return this['_compressor']['compress'](_0x175b76);}['_decompressOperations'](_0x245f55,_0x1d126f){return this['_compressor']['decompress'](_0x245f55)['map']((_0x4b5102,_0x4f2a09)=>{const _0x14264f='init'==_0x1d126f[_0x4f2a09]['type'];if('InsertOperation'==_0x4b5102['__className']){const _0x13d31d=_0x4b5102['position']['root'];!this['_document']['getRoot'](_0x13d31d)&&(this['_document']['createRoot']('$root',_0x13d31d)['_isAttached']=!0x1);}const _0x1068f7=_0x5b7b5f['fromJSON'](_0x4b5102,this['_document']);return _0x1068f7['wasUndone']=_0x4b5102['wasUndone'],_0x1068f7['_isInit']=_0x14264f,_0x1068f7['_authorId']=_0x14264f?null:_0x1d126f[_0x4f2a09]['userId'],_0x1068f7['_isDisconnection']='cs:removeUser'===_0x1d126f[_0x4f2a09]['type'],_0x1068f7['createdAt']=_0x1d126f[_0x4f2a09]['createdAt'],_0x1068f7;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x303a6f=this['editor']['plugins']['get'](r)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x303a6f&&_0x303a6f['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x28196b,_0x40cd4a){for(const _0x4882f5 of _0x28196b)_0x4882f5['baseVersion']=_0x40cd4a++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x23bf0b){this['_ignoredOperations']=_0x23bf0b,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x89eea2){let _0x5d6b90=_0x89eea2['length'];for(;_0x5d6b90--;){const _0x4ea387=_0x89eea2[_0x5d6b90];if(!this['_ignoredOperations']['has'](_0x4ea387)){if(!this['_operationToId']['has'](_0x4ea387)){const _0x48fdac=_0x295c1b()['slice'](0x1,0x12);this['_operationToId']['set'](_0x4ea387,_0x48fdac);}return this['_operationToId']['get'](_0x4ea387);}}}['setIdForTheLastOperation'](_0x1870a5,_0x582abd){if(!_0x582abd)return;let _0x225c3f=_0x1870a5['length'];for(;_0x225c3f--;){const _0x1d0043=_0x1870a5[_0x225c3f];this['_ignoredOperations']['has'](_0x1d0043)||this['_operationToId']['set'](_0x1d0043,_0x582abd);}}}class n extends _0x46a97b{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}}class a extends _0x598c24{static ['CommentsService']=/* #__PURE__ -- @preserve */
26
+ ((()=>_0x4d1a6a)());['_services'];static get['requires'](){return[c,'CommentsRepository',r,_0x3ee037];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}constructor(_0x12f5d9){super(_0x12f5d9),this['_services']=new Map();}async['init'](){const _0x4de328=this['context'],_0x5e546a=_0x4de328['plugins']['get']('CommentsRepository');if(_0x4de328['plugins']['get'](c)['addToReconnectionStack'](this),_0x5e546a['adapter']={'addCommentThread':async({channelId:_0x5d3882,threadId:_0x24ea05,comments:_0xc8671f,resolvedAt:_0x4b8dc,resolvedBy:_0x581054,context:_0x2c1d77,attributes:_0x3011a1})=>{const _0x53261f=await this['_getService'](_0x5d3882)['addCommentThread']({'commentThreadId':_0x24ea05,'comments':_0xc8671f['map'](_0x1af5a4=>function(_0x4541aa,_0x3e8f0e,_0x9ff13a){return{'commentThreadId':_0x9ff13a,'commentId':_0x4541aa['commentId'],'userId':_0x4541aa['authorId'],'content':_0x4541aa['content'],'documentId':_0x3e8f0e,'createdAt':_0x4541aa['createdAt'],'attributes':_0x4541aa['attributes']||{}};}(_0x1af5a4,_0x5d3882,_0x24ea05)),'resolvedAt':_0x4b8dc,'resolvedBy':_0x581054,'context':_0x2c1d77,'attributes':_0x3011a1})['catch'](lt);return{'threadId':_0x53261f['commentThreadId'],'comments':_0x53261f['comments']};},'getCommentThread':async({channelId:_0x3242f4,threadId:_0xb2b4a4})=>{const _0x14aa17=await this['_getService'](_0x3242f4)['getCommentThread'](_0xb2b4a4)['catch'](lt);return await this['_fetchMissingUsersForThreads']([_0x14aa17]),{'threadId':_0x14aa17['commentThreadId'],'comments':_0x14aa17['comments']['map'](R),'context':_0x14aa17['context'],'resolvedAt':_0x14aa17['resolvedAt'],'resolvedBy':_0x14aa17['resolvedBy'],'attributes':_0x14aa17['attributes']||{}};},'updateCommentThread':async({channelId:_0x18a026,threadId:_0x1355b2,context:_0x58bbb5,unlinkedAt:_0x4856d5,attributes:_0x3114a5})=>this['_getService'](_0x18a026)['updateCommentThread']({'commentThreadId':_0x1355b2,'context':_0x58bbb5,'attributes':_0x3114a5,'unlinkedAt':_0x4856d5})['catch'](F)['catch'](lt),'resolveCommentThread':async({channelId:_0x39e8fc,threadId:_0x53e2ca})=>{const _0x32567d=await this['_getService'](_0x39e8fc)['resolveCommentThread'](_0x53e2ca)['catch'](F)['catch'](lt);return{'threadId':_0x32567d['commentThreadId'],'resolvedAt':_0x32567d['resolvedAt'],'resolvedBy':_0x32567d['resolvedBy']};},'reopenCommentThread':async({channelId:_0x494307,threadId:_0x29892c})=>this['_getService'](_0x494307)['reopenCommentThread'](_0x29892c)['catch'](F)['catch'](lt),'removeCommentThread':({channelId:_0x3bbde4,threadId:_0x440a6e})=>this['_getService'](_0x3bbde4)['removeCommentThread'](_0x440a6e)['catch'](F)['catch'](lt),'addComment':({channelId:_0xb5ebc2,threadId:_0x32ace3,commentId:_0xca052d,content:_0x29543e,attributes:_0x68a5c6})=>this['_getService'](_0xb5ebc2)['addComment'](_0x32ace3,_0xca052d,_0x29543e,_0x68a5c6)['catch'](lt),'updateComment':({channelId:_0x283b99,threadId:_0xe9368b,commentId:_0x42d871,content:_0xd48f0f,attributes:_0x54334a})=>this['_getService'](_0x283b99)['updateComment'](_0xe9368b,_0x42d871,_0xd48f0f,_0x54334a)['catch'](F)['catch'](lt),'removeComment':({channelId:_0x5b2f59,threadId:_0x42fc5c,commentId:_0x287010})=>this['_getService'](_0x5b2f59)['removeComment'](_0x42fc5c,_0x287010)['catch'](F)['catch'](lt)},_0x4de328 instanceof _0xe7e5e1){const _0x51bd83=_0x4de328['config']['get']('collaboration.channelId'),_0x2d64d9=_0x4de328['plugins']['get'](r);await this['_setUpService'](_0x51bd83);const _0x5a1f35=await this['_services']['get'](_0x51bd83)['getConnectedSessions']();this['listenTo'](_0x2d64d9,'sessionAdd:'+_0x51bd83,(_0x4f373b,{session:_0x4a301e})=>{_0x4a301e['id']===_0x2d64d9['mySessionId']&&(_0x4f373b['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x4a301e['permissions'],_0x51bd83));}),_0x2d64d9['register'](_0x51bd83,_0x5a1f35);}}async['_setUpService'](_0x2cf2ec){if(this['_services']['has'](_0x2cf2ec))throw new _0x54234f('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x2cf2ec});const _0x39eb49=this['context']['plugins']['get']('CommentsRepository'),_0x344f13=new a['CommentsService'](_0x2cf2ec);this['_services']['set'](_0x2cf2ec,_0x344f13),this['listenTo'](_0x344f13,'commentThreadAdded',(_0x2c1a67,_0x2c7af5)=>{const {commentThreadId:_0x4f3278,documentId:_0x1592c1,context:_0x5d1738,attributes:_0x368385,resolvedAt:_0x4ca2d8,resolvedBy:_0xd9c27,comments:_0x1363b8}=_0x2c7af5;_0x39eb49['getCommentThread'](_0x4f3278)||_0x39eb49['addCommentThread']({'threadId':_0x4f3278,'channelId':_0x1592c1,'comments':_0x1363b8?_0x1363b8['map'](R):[],'context':_0x5d1738,'attributes':_0x368385,'resolvedAt':_0x4ca2d8,'resolvedBy':_0xd9c27,'isFromAdapter':!0x0});}),this['listenTo'](_0x344f13,'commentThreadUpdated',(_0x284610,{commentThreadId:_0x47988c,documentId:_0x505ebf,context:_0x6627b3,unlinkedAt:_0x2b86e3,attributes:_0x395989})=>{_0x39eb49['getCommentThread'](_0x47988c)&&_0x39eb49['updateCommentThread']({'threadId':_0x47988c,'channelId':_0x505ebf,'context':_0x6627b3,'unlinkedAt':_0x2b86e3,'attributes':_0x395989,'isFromAdapter':!0x0});}),this['listenTo'](_0x344f13,'commentThreadResolved',(_0x12469e,{commentThreadId:_0x191341,resolvedBy:_0x474730,resolvedAt:_0x5a038a})=>{const _0x2e7c28=_0x39eb49['getCommentThread'](_0x191341);_0x2e7c28&&_0x2e7c28['resolve']({'resolvedBy':_0x474730,'resolvedAt':_0x5a038a,'isFromAdapter':!0x0});}),this['listenTo'](_0x344f13,'commentThreadReopened',(_0x167abe,{commentThreadId:_0x54a76b})=>{const _0x389db4=_0x39eb49['getCommentThread'](_0x54a76b);_0x389db4&&_0x389db4['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x344f13,'commentThreadRemoved',(_0x29d084,{commentThreadId:_0x5db95a})=>{const _0x1e2752=_0x39eb49['getCommentThread'](_0x5db95a);_0x1e2752&&_0x1e2752['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x344f13,'commentAdded',(_0x47a389,_0xccafbf)=>{const _0x154d69=_0xccafbf['commentThreadId'],_0x803338=_0x39eb49['getCommentThread'](_0x154d69);_0x803338&&_0x803338['addComment']({...R(_0xccafbf),'isFromAdapter':!0x0});}),this['listenTo'](_0x344f13,'commentUpdated',(_0x520a38,{commentThreadId:_0x32e611,commentId:_0x112f3b,content:_0x3509b1,attributes:_0x3e5baf})=>{const _0x58dbb1=_0x39eb49['getCommentThread'](_0x32e611);if(_0x58dbb1){const _0x2511d5=_0x58dbb1['getComment'](_0x112f3b);_0x2511d5&&_0x2511d5['update']({'content':_0x3509b1,'attributes':_0x3e5baf,'isFromAdapter':!0x0});}}),this['listenTo'](_0x344f13,'commentRemoved',(_0x488ef3,{commentThreadId:_0x1c6253,commentId:_0x233eee})=>{const _0x444b75=_0x39eb49['getCommentThread'](_0x1c6253);if(_0x444b75){const _0x5075fc=_0x444b75['getComment'](_0x233eee);_0x5075fc&&_0x5075fc['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x2cf2ec);}['destroy'](){if(this['context']instanceof _0xe7e5e1){const _0x19be62=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x19be62);}}['_terminateService'](_0x501223){if(!this['_services']['has'](_0x501223))throw new _0x54234f('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x501223});this['_getService'](_0x501223)['disconnect'](),this['_services']['delete'](_0x501223);}async['reconnect'](){for(const _0x37196d of this['_services']['keys']())await this['_connectService'](_0x37196d);if(this['context']instanceof _0xe7e5e1){const _0x103bc0=this['context']['config']['get']('collaboration.channelId'),_0x29867e=this['context']['plugins']['get'](r);_0x29867e['unregister'](_0x103bc0);const _0x28f174=await this['_services']['get'](_0x103bc0)['getConnectedSessions']();_0x29867e['register'](_0x103bc0,_0x28f174);}}async['_connectService'](_0x2ecf6c){const {connection:_0x25e5f8}=this['context']['plugins']['get'](c),_0x2e5fd6=this['context']['plugins']['get']('CommentsRepository'),_0x428c2d=this['_services']['get'](_0x2ecf6c),_0x14c168=await _0x428c2d['connect'](_0x25e5f8);await this['_fetchMissingUsersForThreads'](_0x14c168);const _0x42189d=new Set(Array['from'](_0x2e5fd6['getCommentThreads']({'channelId':_0x2ecf6c}),_0x5849da=>_0x5849da['id']));for(const _0x294a3 of _0x14c168)_0x294a3['deletedAt']||_0x42189d['delete'](_0x294a3['commentThreadId']);for(const _0x76e880 of _0x42189d)_0x2e5fd6['getCommentThread'](_0x76e880)['remove']({'isFromAdapter':!0x0});for(const _0x20b958 of _0x14c168){let _0x1eb2c1=_0x2e5fd6['getCommentThread'](_0x20b958['commentThreadId']);const {commentThreadId:_0x121c40,context:_0x49eba2,attributes:_0x5d142b,resolvedBy:_0x28126b,resolvedAt:_0x1cce06,unlinkedAt:_0xba1f41,deletedAt:_0x223a10}=_0x20b958;if(_0x223a10)continue;_0x1eb2c1||(_0x1eb2c1=_0x2e5fd6['addCommentThread']({'channelId':_0x2ecf6c,'threadId':_0x121c40,'context':_0x49eba2,'attributes':_0x5d142b||{},'resolvedBy':_0x28126b,'resolvedAt':_0x1cce06,'unlinkedAt':_0xba1f41,'isFromAdapter':!0x0}));const _0x33566a=new Set(Array['from'](_0x1eb2c1['comments'],_0x5afac0=>_0x5afac0['id']));for(const _0x197b9d of _0x20b958['comments'])_0x33566a['delete'](_0x197b9d['commentId']);for(const _0x5b48f6 of _0x33566a)_0x1eb2c1['getComment'](_0x5b48f6)['remove']({'isFromAdapter':!0x0});for(const _0x5f24cf of _0x20b958['comments']){const _0x3c261f=_0x1eb2c1['getComment'](_0x5f24cf['commentId']);_0x3c261f?_0x3c261f['content']!==_0x5f24cf['content']&&_0x3c261f['update']({'content':_0x5f24cf['content'],'isFromAdapter':!0x0}):_0x1eb2c1['addComment'](Object['assign'](R(_0x5f24cf),{'isFromAdapter':!0x0}));}}}['_getService'](_0x2d8696){if(!this['_services']['has'](_0x2d8696))throw new _0x54234f('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x2d8696});return this['_services']['get'](_0x2d8696);}async['_fetchMissingUsersForThreads'](_0x514616){const _0x1aee24=this['context']['plugins']['get'](_0x3ee037),{connection:_0x445baa}=this['context']['plugins']['get'](c),_0x4c9ff4=new Set();for(const {resolvedBy:_0x1610b4,comments:_0xa6747e}of _0x514616){_0x1610b4&&!_0x1aee24['getUser'](_0x1610b4)&&_0x4c9ff4['add'](_0x1610b4);for(const {userId:_0x433637}of _0xa6747e)_0x1aee24['getUser'](_0x433637)||_0x4c9ff4['add'](_0x433637);}if(0x0===_0x4c9ff4['size'])return;const _0x5ebd90=await dt['getMany'](_0x445baa,Array['from'](_0x4c9ff4));for(const _0x36d37a of _0x5ebd90)_0x1aee24['getUser'](_0x36d37a['id'])||_0x1aee24['addUser'](_0x36d37a);}}async function F(_0x2537e6){if('404'!==_0x2537e6['code'])throw _0x2537e6;}function lt(_0x55f25d){if((_0x1540f6=_0x55f25d)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x1540f6['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x1540f6['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x1540f6;throw _0x55f25d;}function R(_0x5b0ebc){return{'threadId':_0x5b0ebc['commentThreadId'],'commentId':_0x5b0ebc['commentId'],'content':_0x5b0ebc['content'],'createdAt':_0x5b0ebc['createdAt'],'authorId':_0x5b0ebc['userId'],'attributes':_0x5b0ebc['attributes']||{}};}class g extends _0x46a97b{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
27
+ ((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}constructor(_0x3de1fc){super(_0x3de1fc);const _0x100268=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new g['TrackChangesService'](_0x100268);}['init'](){const _0xb27e60=this['editor']['plugins']['get'](c),_0x38ea69=this['editor']['plugins']['get']('TrackChangesEditing');return _0x38ea69['adapter']={'getSuggestion':async _0x214d64=>{await this['_waitForServiceReady']();const _0x1c50b0=await this['_trackChangesService']['get'](_0x214d64)['catch'](B);return await this['_fetchMissingUsersForThreads']([_0x1c50b0]),_0x1c50b0;},'addSuggestion':async({id:_0x171f29,type:_0x5ead90,data:_0x5d61ca,originalSuggestionId:_0x2beab2,attributes:_0x2d1ad6})=>{await this['_waitForServiceReady']();const _0x48e113={'id':_0x171f29,'type':_0x5ead90,'data':_0x5d61ca,'originalSuggestionId':_0x2beab2,'attributes':_0x2d1ad6},_0x173820=await this['_trackChangesService']['add'](_0x171f29,_0x5ead90,_0x5d61ca,_0x2beab2,_0x2d1ad6)['catch'](_0x3ad8fb=>{if(ut(_0x3ad8fb))return new Promise(_0x5177d0=>{this['_bufferedRequests']['set'](_0x171f29,{'resolve':_0x5177d0,'suggestionData':_0x48e113});});throw _0x3ad8fb;});return this['_bufferedRequests']['delete'](_0x171f29),_0x173820;},'updateSuggestion':async(_0x325f0e,_0x1adec8)=>{if(await this['_waitForServiceReady'](),'open'!==_0x1adec8['state'])return this['_trackChangesService']['update'](_0x325f0e,_0x1adec8)['catch'](B);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x46f5d8,_0x1bc0c7)=>{_0x38ea69['hasSuggestion'](_0x1bc0c7['id'])&&(_0x38ea69['getSuggestion'](_0x1bc0c7['id'])['attributes']=_0x1bc0c7['attributes']);}),this['_trackChangesService']['connect'](_0xb27e60['connection'])['then'](_0x26ae3b=>(_0xb27e60['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x26ae3b)['then'](()=>{for(const _0x3f88eb of _0x26ae3b){_0x38ea69['addSuggestionData'](_0x3f88eb)['_saved']=!0x0;}})));}async['reconnect'](){const _0x365840=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x28ea76}=this['editor']['plugins']['get'](c),_0x302c63=await this['_trackChangesService']['connect'](_0x28ea76);await this['_fetchMissingUsersForThreads'](_0x302c63);for(const {suggestionData:_0x17149e,resolve:_0x57cd0b}of this['_bufferedRequests']['values']()){let _0x3c171e=_0x302c63['find'](_0x5c95c6=>_0x5c95c6['id']===_0x17149e['id']);_0x3c171e||(_0x3c171e=await this['_trackChangesService']['add'](_0x17149e['id'],_0x17149e['type'],_0x17149e['data'],_0x17149e['originalSuggestionId'])),_0x57cd0b(_0x3c171e);}for(const _0x4df3b9 of _0x302c63)_0x365840['hasSuggestion'](_0x4df3b9['id'])||_0x365840['addSuggestionData'](_0x4df3b9);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x313a0e=>{this['listenTo'](this['_trackChangesService'],'connected',_0x15c666=>{_0x15c666['off'](),_0x313a0e();});});}async['_fetchMissingUsersForThreads'](_0x4138b7){const _0x4098f1=this['editor']['plugins']['get'](_0x3ee037),{connection:_0x17ef85}=this['editor']['plugins']['get'](c),_0x52fa4a=new Set();for(const {authorId:_0xb5ea0c}of _0x4138b7)_0x4098f1['getUser'](_0xb5ea0c)||_0x52fa4a['add'](_0xb5ea0c);if(0x0===_0x52fa4a['size'])return;const _0x3191be=await dt['getMany'](_0x17ef85,Array['from'](_0x52fa4a));for(const _0x5ab700 of _0x3191be)_0x4098f1['getUser'](_0x5ab700['id'])||_0x4098f1['addUser'](_0x5ab700);}}function B(_0x589945){if(ut(_0x589945))return new Promise(()=>{});throw _0x589945;}function ut(_0x2934be){return _0x2934be['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2934be['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x46a97b{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}['init'](){const _0x2567b7=this['editor']['plugins']['get'](c),_0x42ddc6=this['editor']['plugins']['get']('CommentsEditing'),_0x272efe=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x2567b7,'change:state',(_0x18adbd,_0x16c8fa,_0x416d15)=>{_0x42ddc6['isThreadsLoadingPaused']='connected'!==_0x416d15;});}),this['listenTo'](_0x2567b7,'change:state',(_0x3e53e4,_0x5d42da,_0x57c688)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x57c688);}),_0x272efe['_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 _0x46a97b{static get['requires'](){return[m,g,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}}class v extends _0x46a97b{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
28
+ ((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',r,_0x3ee037];}constructor(_0x3e6224){super(_0x3e6224);const _0x2d050a=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new v['RevisionHistoryService'](_0x2d050a);}async['init'](){const _0x113f6b=this['editor']['plugins']['get'](l),_0x32962d=_0x113f6b['serverHistory'],_0x123e5e=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x32962d,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x113f6b['sessionId']});const _0x3b6a2e=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x5b255a=await tt['isBundleUploaded'](_0x123e5e['connection'],_0x3b6a2e);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x34cbb1})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x34cbb1)),'updateRevisions':async _0x2f4823=>{await this['_waitForServiceReady']();const _0x25f448=this['_revisionTracker']['currentRevision'];if(_0x5b255a&&0x1===_0x2f4823['length']&&_0x2f4823[0x0]['id']===_0x25f448['id'])return _0x2f4823;for(const _0x4b95b3 of _0x2f4823)_0x4b95b3['id']===_0x25f448['id']&&(_0x4b95b3['isEmptyCurrent']=_0x4b95b3['fromVersion']===_0x4b95b3['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x2f4823,this['_lastRequestId'])['then'](_0x12d397=>(this['_lastRequestId']=_0x12d397,_0x2f4823))['catch'](_0x4cd7b3=>{if(st(_0x4cd7b3)||'400'===_0x4cd7b3['code']&&void 0x0!==_0x4cd7b3['data']['wrongRequestId']){for(const _0x5d2b23 of _0x2f4823){!this['_revisionTracker']['repository']['getRevision'](_0x5d2b23['id'])||this['_revisionTracker']['_bufferUpdate'](_0x5d2b23['id'],_0x5d2b23,!0x1);}if(st(_0x4cd7b3))throw _0x4cd7b3;return _0x2f4823;}throw _0x4cd7b3;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x129664,{revisionsData:_0x14830a,requestId:_0x167eae})=>{Math['max'](..._0x14830a['map'](_0x15c252=>_0x15c252['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x14830a,_0x167eae);}):this['_handleRevisionsUpdate'](_0x14830a,_0x167eae);});const {revisions:_0x4c909f,requestId:_0x22e6c3}=await this['_revisionHistoryService']['connect'](_0x123e5e['connection']);_0x123e5e['addToReconnectionStack'](this),this['_lastRequestId']=_0x22e6c3,await this['_fetchMissingUsers'](_0x4c909f);for(const _0x251a9c of _0x4c909f)this['_revisionTracker']['addRevisionData'](_0x251a9c);this['listenTo'](_0x113f6b,'change:_isConnected',(_0x194a83,_0x2e13f3,_0x7d34c8)=>{_0x7d34c8&&(this['_oldOffset']=_0x113f6b['_offset'],_0x194a83['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x123e5e,'state',_0x52a99c=>_0x52a99c===_0x204c9a['CONNECTED']);}async['reconnect'](){const _0x500645=this['editor']['plugins']['get'](c),_0x27a3e0=this['editor']['plugins']['get'](l),_0x19d5b2=async()=>{const _0x4708b1=this['_revisionTracker']['currentRevision'],_0x3b0536=_0x4708b1['id'],_0x250422=_0x3b0536!==_0x27a3e0['sessionId'];if(_0x250422){const _0x586bd2=_0x27a3e0['_offset']-this['_oldOffset'],_0x20c407=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x4708b1['toVersion']+_0x586bd2!==_0x20c407){const _0x3a59f5=_0x4708b1['fromVersion']+_0x586bd2,_0x124449=this['editor']['plugins']['get'](_0x3ee037),_0x19e5d5=this['_revisionTracker']['buildRevisionData']({'revision':_0x4708b1,'from':_0x3a59f5,'to':_0x20c407});_0x19e5d5['id']=_0x4708b1['id'];const _0x402f1a=_0x19e5d5['authorsIds']['map'](_0x259daa=>_0x124449['getUser'](_0x259daa));_0x4708b1['_update']({..._0x19e5d5,'authors':_0x402f1a},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x4708b1['id'],_0x19e5d5,!0x0);}this['_revisionTracker']['_startingVersion']=_0x20c407,(_0x4708b1['toVersion']===_0x4708b1['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x3b0536)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x3b0536),this['_revisionTracker']['_createCurrentRevision'](_0x20c407));}const {revisions:_0x4e6d47,requestId:_0x294974}=await this['_revisionHistoryService']['reconnect'](_0x500645['connection'],this['_lastRequestId']);_0x250422&&_0x4e6d47['length']>0x0?_0x27a3e0['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x4e6d47),this['_handleRevisionsUpdate'](_0x4e6d47,_0x294974),this['_revisionTracker']['sendBufferedUpdates']());};return _0x27a3e0['_isConnected']?_0x19d5b2():new Promise((_0x33ccbe,_0x5174cd)=>{_0x27a3e0['once']('change:_isConnected',()=>{_0x19d5b2()['then'](_0x33ccbe)['catch'](_0x5174cd);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x38a94d=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x42b4bc=>{_0x42b4bc['off'](),_0x38a94d();});});}['_getLatestVersionFromServerOperations'](){const _0x53cb0c=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x1b0e2 of _0x53cb0c)if('marker'!==_0x1b0e2['type']||_0x1b0e2['affectsData'])return _0x1b0e2['baseVersion']+0x1;}['_getLatestVersion'](){const _0x5d1a65=this['editor']['plugins']['get'](l);return new Promise(_0x3b373e=>{_0x5d1a65['_isPendingUpdate']?_0x5d1a65['once']('change:_isPendingUpdate',()=>{_0x3b373e(this['_getLatestVersionFromServerOperations']());}):_0x3b373e(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x3b51cd,_0x2e7543){const _0xd65664=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x2e7543;for(const _0x2cb7f9 of _0x3b51cd){const _0x5311d3=_0xd65664['getRevision'](_0x2cb7f9['id']);if(_0x5311d3){if((_0x2cb7f9['fromVersion']||_0x2cb7f9['toVersion'])&&(_0x2cb7f9['diffData']=null),_0x5311d3===this['_revisionTracker']['currentRevision']){const _0x7fb2ea=Math['max'](_0x5311d3['toVersion'],_0x2cb7f9['toVersion']),_0x319cdc=Math['max'](_0x5311d3['fromVersion'],_0x2cb7f9['fromVersion']);let _0x56d3b5;_0x5311d3['toVersion']===_0x2cb7f9['toVersion']&&_0x5311d3['fromVersion']===_0x2cb7f9['fromVersion']?(_0x56d3b5=!0x0,this['_preventResendingRevisionData'](_0x2cb7f9)):_0x2cb7f9['toVersion']===_0x7fb2ea&&_0x2cb7f9['fromVersion']===_0x319cdc?_0x56d3b5=!0x1:(_0x5311d3['toVersion']===_0x7fb2ea&&_0x5311d3['fromVersion']===_0x319cdc||this['_fixRevision']({'revision':_0x5311d3,'from':_0x319cdc,'to':_0x7fb2ea}),_0x56d3b5=!0x0),_0x56d3b5&&(delete _0x2cb7f9['fromVersion'],delete _0x2cb7f9['toVersion'],delete _0x2cb7f9['diffData'],delete _0x2cb7f9['createdAt'],delete _0x2cb7f9['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x2cb7f9),this['_preventResendingRevisionData'](_0x2cb7f9);}else this['_revisionTracker']['addRevisionData'](_0x2cb7f9);}const _0x1613ae=_0xd65664['getRevisions']();_0x1613ae['reverse']();for(let _0x24dd97=0x0;_0x24dd97<_0x1613ae['length']-0x1;_0x24dd97++){const _0x122bfd=_0x1613ae[_0x24dd97],_0x4a803b=_0x1613ae[_0x24dd97+0x1];if(_0x122bfd['fromVersion']<_0x4a803b['toVersion']){const _0x64aa91=_0x4a803b['toVersion'],_0x397869=Math['max'](_0x64aa91,_0x122bfd['toVersion']);this['_fixRevision']({'revision':_0x122bfd,'from':_0x64aa91,'to':_0x397869});}}}['_fixRevision']({revision:_0x25e348,from:_0x21cce6,to:_0x362a78}={}){const _0x120431=this['editor']['plugins']['get'](_0x3ee037),_0x5111d3=this['_revisionTracker']['buildRevisionData']({'revision':_0x25e348,'from':_0x21cce6,'to':_0x362a78});_0x5111d3['authors']=_0x5111d3['authorsIds']['map'](_0x31f2fb=>_0x120431['getUser'](_0x31f2fb)),_0x25e348['_update'](_0x5111d3);}['_preventResendingRevisionData'](_0x3284c6){const _0x5d819a={};_0x5d819a['id']=_0x3284c6['id'];for(const _0x29f21d of Object['keys'](_0x3284c6))'id'!==_0x29f21d&&(_0x5d819a[_0x29f21d]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x5d819a['id'],_0x5d819a,!0x0);}async['_fetchMissingUsers'](_0xc6697b){const _0x3f1916=this['editor']['plugins']['get'](_0x3ee037),{connection:_0x4b6081}=this['editor']['plugins']['get'](c),_0x1a0ba7=new Set();for(const _0x24613e of _0xc6697b){for(const _0x348264 of _0x24613e['authorsIds'])_0x28121f(_0x348264);_0x24613e['creatorId']&&_0x28121f(_0x24613e['creatorId']);}if(0x0===_0x1a0ba7['size'])return;const _0x337357=await dt['getMany'](_0x4b6081,Array['from'](_0x1a0ba7));for(const _0x31a459 of _0x337357)_0x3f1916['getUser'](_0x31a459['id'])||_0x3f1916['addUser'](_0x31a459);function _0x28121f(_0x38561a){_0x3f1916['getUser'](_0x38561a)||_0x1a0ba7['add'](_0x38561a);}}}function st(_0x2d0b9f){return _0x2d0b9f['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x2d0b9f['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2d0b9f['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class d extends _0x46a97b{static get['requires'](){return['RevisionHistory',v,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}}class ts extends _0x338bb6{constructor(_0x45a6f6){super(_0x45a6f6);const _0x2eafee=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x2eafee['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x2eafee['to']('usersCount',_0x400eab=>q(_0x45a6f6,'CONNECTED_USERS',_0x400eab))}]});}}class rt extends _0x338bb6{['items'];constructor(_0x4c5f78){super(_0x4c5f78),this['items']=this['createCollection']();const _0x3fc29b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x3fc29b['to'](()=>this['fire']('execute'))}});}}class k extends _0x338bb6{['counterView'];['inlineListView'];constructor(_0x1bb0ab){super(_0x1bb0ab);const _0x427fe1=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new rt(_0x1bb0ab),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x1dc020 of this['inlineListView']['items'])_0x1dc020['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',_0x427fe1['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class x extends _0x338bb6{['items'];constructor(_0x3e487c){super(_0x3e487c),this['items']=this['createCollection'](),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__dropdown-list']},'children':[{'tag':'div','attributes':{'class':['ck','ck-presence-list__dropdown-list-wrapper']},'children':this['items']}]});}}class y extends _0x338bb6{['userView'];constructor(_0x3d6655,_0x5d45cb,_0x1dc3d6){super(_0x3d6655);const _0x10629a=this['bindTemplate'];this['userView']=new ct(_0x3d6655,_0x5d45cb);const _0x5b5b9c={'tag':'div','attributes':{'class':['ck','ck-presence-list__dropdown-list-item']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x5d45cb['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x5d45cb['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x1dc3d6&&(_0x5b5b9c['tag']='button',_0x5b5b9c['on']={'click':_0x10629a['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x5b5b9c);}}class A extends _0x338bb6{['userView'];['markerView'];constructor(_0x2f2001,_0x5d289e,_0x251415){super(_0x2f2001);const _0x13ac7b=this['bindTemplate'];this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x2f2001,_0x5d289e),this['markerView']=new ot(_0x2f2001,_0x5d289e);const _0x467dd4={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x13ac7b['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x13ac7b['to']('hasTooltip',_0x58cbb5=>!_0x58cbb5),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView']]};_0x251415&&(_0x467dd4['tag']='button',_0x467dd4['on']={'click':_0x13ac7b['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x467dd4);}}class ot extends _0x338bb6{constructor(_0x5de3ea,_0xe5485f){super(_0x5de3ea),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0xe5485f['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const _={'collapseAt':0x6,'displayMe':!0x0};class s extends _0x598c24{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection'];constructor(_0x45dda8){super(_0x45dda8),this['context']['config']['define']('presenceList',_);const _0x6e7acd=_0x45dda8['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x6e7acd)throw new _0x54234f('presencelist-collapseat-invalid-format',this);if(_0x6e7acd<0x1)throw new _0x54234f('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](r)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x4dc19a(),this['balloonPanelView']=new _0x3b3385(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[r];}['init'](){for(const _0x51af50 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x51af50);this['listenTo'](this['_allConnectedUsers'],'add',(_0x3c9e9d,_0x289e82)=>{this['_handleUserAdd'](_0x289e82);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x1360f5,_0x1221e6)=>{this['_handleUserRemove'](_0x1221e6);});}['_createView'](){const _0x194306=this['context'],_0x577f87=new k(this['context']['locale']),_0x1d8535=this['balloonPanelView'];if(!_0x28bb9b(_0x194306['config']['get']('presenceList.container')))throw new _0x54234f('presencelist-missing-container',this);return _0x577f87['counterView']['bind']('usersCount')['to'](this),_0x577f87['bind']('isCollapsed')['to'](this,'usersCount',_0x621bf3=>{const {collapseAt:_0x315db1,displayMe:_0x3b850c}=_0x194306['config']['get']('presenceList'),_0x4e4c72=_0x621bf3>=_0x315db1;return _0x577f87['counterView']['isHidden']=!(0x1==_0x621bf3&&_0x3b850c||_0x4e4c72),_0x4e4c72||this['hideDropdown'](),_0x4e4c72;}),_0x577f87['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x3c23c9=>{const _0x43fc73=_0x194306['config']['get']('presenceList'),_0x4f5f54=new A(_0x194306['locale'],_0x3c23c9,!!_0x43fc73['onClick']);return _0x4f5f54['bind']('hasTooltip')['to'](_0x577f87,'isCollapsed',_0x5254df=>!_0x5254df),_0x43fc73['onClick']&&this['listenTo'](_0x4f5f54,'execute',()=>{this['view']['isCollapsed']||_0x43fc73['onClick'](_0x3c23c9,_0x4f5f54['element']);}),_0x4f5f54;}),this['listenTo'](_0x577f87['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x577f87['render'](),_0x1d8535['render'](),_0x532085({'emitter':_0x577f87,'activator':()=>_0x1d8535['isVisible'],'contextElements':[_0x1d8535['element'],_0x577f87['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x194306['config']['get']('presenceList.container')['appendChild'](_0x577f87['element']),this['_bodyCollection']=new _0x382311(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](_0x1d8535),_0x577f87;}['_handleUserAdd'](_0x504b20){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x504b20['isMe'])return;const _0x1f7c57=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x1f7c57&&this['currentDisplayedUsers']['remove'](0x0);const _0x5144d9=this['_calculateNewUserPosition'](_0x504b20);this['currentDisplayedUsers']['add'](_0x504b20,_0x5144d9);}['_handleUserRemove'](_0x761b25){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x761b25['id'])&&(this['currentDisplayedUsers']['remove'](_0x761b25['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x68e33d of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x68e33d['id']))return void this['currentDisplayedUsers']['add'](_0x68e33d,0x0);}}['_calculateNewUserPosition'](_0x5a0f02){return Boolean(this['currentDisplayedUsers']['last']&&this['currentDisplayedUsers']['last']['isMe'])&&!_0x5a0f02['isMe']?this['currentDisplayedUsers']['length']-0x1:this['currentDisplayedUsers']['length'];}['showDropdown'](){if(this['presenceDropdownView'])return;this['presenceDropdownView']=new x(this['context']['locale']);const _0x39887b=this['context']['config']['get']('presenceList');this['presenceDropdownView']['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x30ca09=>{if(!_0x39887b['displayMe']&&_0x30ca09['isMe'])return null;const _0x130278=new y(this['context']['locale'],_0x30ca09,!!_0x39887b['onClick']);return _0x39887b['onClick']&&this['listenTo'](_0x130278,'execute',()=>{_0x39887b['onClick'](_0x30ca09,_0x130278['element']);}),_0x130278;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']});}['hideDropdown'](){this['presenceDropdownView']&&(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']();}}class i extends _0x598c24{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المزامنة','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':_0x15879b=>0x0==_0x15879b?0x0:0x1==_0x15879b?0x1:0x2==_0x15879b?0x2:_0x15879b%0x64>=0x3&&_0x15879b%0x64<=0xa?0x3:_0x15879b%0x64>=0xb&&_0x15879b%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المزامنة','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':_0x1f15bf=>0x0==_0x1f15bf?0x0:0x1==_0x1f15bf?0x1:0x2==_0x1f15bf?0x2:_0x1f15bf%0x64>=0x3&&_0x1f15bf%0x64<=0xa?0x3:_0x1f15bf%0x64>=0xb&&_0x1f15bf%0x64<=0x63?0x4:0x5}};
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- (_0x2b7a8a=>{const {ar:{dictionary:_0x573c25,getPluralForm:_0x405427}}={'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المزامنة','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':_0x19932f=>0x0==_0x19932f?0x0:0x1==_0x19932f?0x1:0x2==_0x19932f?0x2:_0x19932f%0x64>=0x3&&_0x19932f%0x64<=0xa?0x3:_0x19932f%0x64>=0xb&&_0x19932f%0x64<=0x63?0x4:0x5}};_0x2b7a8a['ar']||={'dictionary':{},'getPluralForm':null},_0x2b7a8a['ar']['dictionary']=Object['assign'](_0x2b7a8a['ar']['dictionary'],_0x573c25),_0x2b7a8a['ar']['getPluralForm']=_0x405427;})(window['CKEDITOR_TRANSLATIONS']||={});
23
+ (_0x476067=>{const {ar:{dictionary:_0x15de78,getPluralForm:_0x3c2099}}={'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المزامنة','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':_0x54e697=>0x0==_0x54e697?0x0:0x1==_0x54e697?0x1:0x2==_0x54e697?0x2:_0x54e697%0x64>=0x3&&_0x54e697%0x64<=0xa?0x3:_0x54e697%0x64>=0xb&&_0x54e697%0x64<=0x63?0x4:0x5}};_0x476067['ar']||={'dictionary':{},'getPluralForm':null},_0x476067['ar']['dictionary']=Object['assign'](_0x476067['ar']['dictionary'],_0x15de78),_0x476067['ar']['getPluralForm']=_0x3c2099;})(window['CKEDITOR_TRANSLATIONS']||={});
@@ -20,4 +20,4 @@
20
20
  *
21
21
  *
22
22
  */
23
- export default{'bg':{'dictionary':{'CONNECTED_USERS':['1\x20свързан\x20потребител\x20(аз)','%0\x20свързан\x20потребители'],'PENDING_ACTION_SENDING_DATA':'Изпращане\x20на\x20данни\x20до\x20сървъра.','Synchronization\x20issue':'Проблем\x20при\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презаредете\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го\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':_0xdd17a8=>0x1!=_0xdd17a8}};
23
+ export default{'bg':{'dictionary':{'CONNECTED_USERS':['1\x20свързан\x20потребител\x20(аз)','%0\x20свързан\x20потребители'],'PENDING_ACTION_SENDING_DATA':'Изпращане\x20на\x20данни\x20до\x20сървъра.','Synchronization\x20issue':'Проблем\x20при\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презаредете\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го\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':_0x938d95=>0x1!=_0x938d95}};