@ckeditor/ckeditor5-real-time-collaboration 44.0.0-alpha.4 → 44.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/real-time-collaboration.js +1 -1
- package/dist/index.js +6 -6
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +9 -9
- package/src/common-translations.js +1 -1
- package/src/index.js +1 -1
- package/src/presencelist/presencelistui.js +1 -1
- package/src/presencelist/view/presencecounterview.js +1 -1
- package/src/presencelist/view/presencedropdownlistitemview.js +1 -1
- package/src/presencelist/view/presencedropdownlistview.js +1 -1
- package/src/presencelist/view/presenceinlinelistitemview.js +1 -1
- package/src/presencelist/view/presenceinlinelistview.js +1 -1
- package/src/presencelist/view/presencelistview.js +1 -1
- package/src/presencelist.js +1 -1
- package/src/realtimecollaborativecomments/cloudservicescommentsadapter.js +1 -1
- package/src/realtimecollaborativecomments.js +1 -1
- package/src/realtimecollaborativeediting/realtimecollaborationclient.js +1 -1
- package/src/realtimecollaborativeediting/sessions.js +1 -1
- package/src/realtimecollaborativeediting/usermarkers.js +1 -1
- package/src/realtimecollaborativeediting/websocketgateway.js +1 -1
- package/src/realtimecollaborativeediting.js +1 -1
- package/src/realtimecollaborativerevisionhistory/cloudservicesrevisionhistoryadapter.js +1 -1
- package/src/realtimecollaborativerevisionhistory.js +1 -1
- package/src/realtimecollaborativetrackchanges/cloudservicestrackchangesadapter.js +1 -1
- package/src/realtimecollaborativetrackchanges.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{ContextPlugin as
|
|
24
|
-
((()=>lt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x580b9];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xee19bb){super(_0xee19bb),this['set']('state',_0x597b3f['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x1d1d21);}['init'](){const _0x3904a6=this['context'],_0x5051d1=_0x3904a6['plugins']['get']('CloudServices'),_0x23b951=_0x3904a6['plugins']['get'](_0x580b9);if(!_0x5051d1['token'])throw new _0x3d0c02('websocketgateway-missing-token',this);if(!_0x5051d1['webSocketUrl'])throw new _0x3d0c02('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'](_0x5051d1['token'],_0x5051d1['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x39c10a=>{if(this['connection']=_0x39c10a,this['bind']('state')['to'](_0x39c10a,'state',this,'_isBrowserOffline',(_0x351355,_0x43a799)=>('connected'!==_0x351355&&(this['_shouldPluginsReconnect']=!0x0),_0x43a799||_0x351355!==_0x597b3f['CONNECTED']?_0x597b3f['DISCONNECTED']:this['state']==_0x597b3f['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x597b3f['CONNECTING']):_0x597b3f['CONNECTED'])),this['connection']['on']('error',(_0x1d3eba,_0x18b182)=>{if('limitExceeded'!==_0x18b182['code'])throw console['error'](_0x18b182),new _0x3d0c02('cloudservices-init',null,{'originalError':_0x18b182});_0x23b951['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'});}),!_0x39c10a['me'])return new Promise(_0x4eccb1=>_0x39c10a['on']('change:me',_0x4eccb1));})['catch'](_0x542609=>{throw console['error'](_0x542609),new _0x3d0c02('cloudservices-init',null,{'originalError':_0x542609});});}['addToReconnectionStack'](_0x2e8e72){if('function'!=typeof _0x2e8e72['reconnect'])throw new _0x3d0c02('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x2e8e72))throw new _0x3d0c02('websocketgateway-plugin-already-registered',this,{'name':_0x2e8e72['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x2e8e72);}['removeFromReconnectionStack'](_0x567200){this['_reconnectionStack']['delete'](_0x567200);}['isInReconnectionStack'](_0x5c746b){return this['_reconnectionStack']['has'](_0x5c746b);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x10544d=>_0x10544d['reconnect']())))['then'](()=>this['state']=_0x597b3f['CONNECTED'])['catch'](_0x20ab9c=>{throw console['error'](_0x20ab9c),new _0x3d0c02('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x597b3f['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x5b046d{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[c,_0x305f5d];}constructor(_0x89fe37){super(_0x89fe37),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x3c61b0(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x305f5d);}['init'](){const _0x3ec710=this['context']['plugins']['get'](c);this['listenTo'](_0x3ec710,'change:state',(_0x523103,_0x1ca620,_0x345f99)=>{if('connected'!==_0x345f99)this['channelSessions']['forEach'](_0xeb6ff=>_0xeb6ff['clear']()),this['channelConnectedUsers']['forEach'](_0x4c9f66=>_0x4c9f66['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x4be1f3,_0x5a5f2c]of this['_registeredSessions'])for(const _0x3ae398 of _0x5a5f2c)this['_handleSessionAdd'](_0x4be1f3,_0x3ae398);}}),this['_createUser'](_0x3ec710['connection']['me'],!0x0);}['register'](_0x3e9b39,_0x58b8f7){if(this['_registeredSessions']['has'](_0x3e9b39))throw new _0x3d0c02('sessions-register-already-registered',null,{'channelId':_0x3e9b39});this['_registeredSessions']['set'](_0x3e9b39,_0x58b8f7),this['channelSessions']['set'](_0x3e9b39,new _0x3c61b0()),this['channelConnectedUsers']['set'](_0x3e9b39,new _0x3c61b0()),this['listenTo'](_0x58b8f7,'add',(_0x257718,_0x25ec2f)=>this['_handleSessionAdd'](_0x3e9b39,_0x25ec2f)),this['listenTo'](_0x58b8f7,'remove',(_0x217807,_0x33df66)=>this['_handleSessionRemove'](_0x3e9b39,_0x33df66));for(const _0x58ebe1 of _0x58b8f7)this['_handleSessionAdd'](_0x3e9b39,_0x58ebe1);}['unregister'](_0xc49df8){if(!this['_registeredSessions']['has'](_0xc49df8))throw new _0x3d0c02('sessions-unregister-not-exist',null,{'channelId':_0xc49df8});const _0x32cac3=this['_registeredSessions']['get'](_0xc49df8);this['stopListening'](_0x32cac3);for(const _0x104cea of _0x32cac3)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0xc49df8,_0x104cea);this['_registeredSessions']['delete'](_0xc49df8),this['channelSessions']['delete'](_0xc49df8),this['channelConnectedUsers']['delete'](_0xc49df8);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x568517){for(const _0x1c6792 of this['channelSessions']['values']())for(const _0x5719d8 of _0x1c6792)if(_0x5719d8['id']===_0x568517)return _0x5719d8['user'];}['getUserSessions'](_0xbcf33c,_0x23993d){const _0xe1a89a=_0x23993d?[this['channelSessions']['get'](_0x23993d)]:this['channelSessions']['values'](),_0x50cdf5=new Set();for(const _0x8ccfff of _0xe1a89a)for(const _0x1cdb7d of _0x8ccfff)_0x1cdb7d['user']['id']===_0xbcf33c['id']&&_0x50cdf5['add'](_0x1cdb7d['id']);return _0x50cdf5;}['getUserRole'](_0x180d06){for(const _0x3a7755 of this['channelSessions']['values']())for(const _0x96a12c of _0x3a7755)if(_0x96a12c['user']===_0x180d06)return _0x96a12c['role'];}['_handleSessionAdd'](_0x3214b7,_0x30e8e3){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x4058df=_0x30e8e3['user'],_0x327e38=this['_users']['getUser'](_0x4058df['id'])||this['_createUser'](_0x4058df),_0x4b0345=Object['assign']({},_0x30e8e3,{'user':_0x327e38});this['channelSessions']['get'](_0x3214b7)['add'](_0x4b0345);const _0x40be62=this['channelConnectedUsers']['get'](_0x3214b7);_0x40be62['has'](_0x327e38['id'])||_0x40be62['add'](_0x327e38),this['allConnectedUsers']['has'](_0x327e38['id'])||this['allConnectedUsers']['add'](_0x327e38,_0x327e38['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x3214b7,{'channelId':_0x3214b7,'session':_0x4b0345});}['_handleSessionRemove'](_0xc8c260,_0x1405fd){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x55b08d=this['channelConnectedUsers']['get'](_0xc8c260),_0x398b1a=_0x1405fd['user'];_0x398b1a['id']&&(this['channelSessions']['get'](_0xc8c260)['remove'](_0x1405fd['id']),_0x55b08d['has'](_0x398b1a['id'])&&!this['getUserSessions'](_0x398b1a,_0xc8c260)['size']&&_0x55b08d['remove'](_0x398b1a['id']),this['allConnectedUsers']['get'](_0x398b1a['id'])&&!this['getUserSessions'](_0x398b1a)['size']&&this['allConnectedUsers']['remove'](_0x398b1a['id']));}['_createUser'](_0x294288,_0x265b02){const _0x6002fe=this['_users']['addUser'](_0x294288);return _0x265b02&&this['_users']['defineMe'](_0x294288['id']),_0x6002fe['orderNumber']=this['_uniqueUsersCount']++,_0x6002fe;}}class H extends _0x3b81de{['_domEmitter']=new(_0x1d1d21())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x81c490=this['editor'],_0x59878c=_0x81c490['plugins']['get'](i);_0x81c490['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x242325,{writer:_0x420b9b})=>function(_0x1285c6,_0x5d1faf,_0x15850e,_0x551812){const _0x211c86=_0x1285c6['markerName']['split'](':')[0x2],_0x4aa106=_0x15850e['getUserBySessionId'](_0x211c86);if(!_0x4aa106||_0x211c86===_0x15850e['mySessionId'])return;if(!_0x551812['model']['schema']['checkChild'](_0x1285c6['markerRange']['start'],'$text'))return;const _0x3c2ca1={'class':'ck-user__marker\x20'+_0x4aa106['color']['getMarkerClass'](),'data-name':_0x4aa106['name'],'data-session-id':_0x211c86},_0x4e7a5d=_0x551812['model']['markers']['get'](_0x1285c6['markerName']),_0x4b2525=_0x4e7a5d['getStart'](),_0xbbbe61=_0x4b2525['nodeAfter'],_0x2ef228=_0x551812['model']['schema'];if(_0xbbbe61&&_0x2ef228['isObject'](_0xbbbe61)&&_0x2ef228['isInline'](_0xbbbe61)&&!_0x551812['model']['markers']['get']('user:range:'+_0x211c86)['getRange']()['isCollapsed'])return;const _0x323393=_0x4b2525['parent'];return _0x551812['model']['schema']['isLimit'](_0x323393)&&!_0x551812['model']['hasContent'](_0x323393)&&(_0x3c2ca1['contenteditable']=!0x1),function(_0x495ed0,_0x5d3b1e,_0x104502){const _0x4cc9be=_0x495ed0['createUIElement']('span',_0x5d3b1e);return _0x495ed0['setCustomProperty']('userPositionMarker',!0x0,_0x4cc9be),_0x4cc9be['render']=function(_0x2006e1){const _0x54bbc5=this['toDomElement'](_0x2006e1);return _0x54bbc5['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>'+_0x104502['name']+'</span>',_0x54bbc5['addEventListener']('mouseenter',()=>{_0x54bbc5['classList']['add']('ck-user__marker_hovered');}),_0x54bbc5['addEventListener']('mouseleave',()=>{_0x54bbc5['classList']['remove']('ck-user__marker_hovered');}),_0x54bbc5;},_0x4cc9be['isSimilar']=function(_0x3a3886){return!(!this['getCustomProperty']('userPositionMarker')||!_0x3a3886['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x3a3886['getAttribute']('data-session-id'));},_0x4cc9be;}(_0x5d1faf,_0x3c2ca1,_0x4aa106);}(_0x242325,_0x420b9b,_0x59878c,_0x81c490)}),_0x81c490['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x318a41=>function(_0x583525,_0x398fd9){const _0x21b609=_0x583525['markerName']['split'](':')[0x2];if(_0x21b609===_0x398fd9['mySessionId'])return null;const _0x1b96ce=_0x398fd9['getUserBySessionId'](_0x21b609);if(!_0x1b96ce)return{'id':_0x21b609,'classes':[]};return{'id':_0x21b609,'classes':['ck-user__selection',_0x1b96ce['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x21b609},'priority':0x7d0+_0x1b96ce['orderNumber']};}(_0x318a41,_0x59878c)}),function(_0x160f72){const _0x5a7ba3=_0x160f72['model'],_0x557199=new Map(),_0x15c0f8=_0x160f72['plugins']['get'](i);_0x5a7ba3['markers']['on']('update:user:range',(_0x2b118a,_0x529fe8,_0x4d0e06,_0x1a42de)=>{if(!_0x1a42de&&_0x557199['get'](_0x529fe8['name']))return _0x557199['get'](_0x529fe8['name'])['detach'](),void _0x557199['delete'](_0x529fe8['name']);const _0x56efba=_0x529fe8['name']['split'](':')[0x2];if(_0x56efba===_0x15c0f8['mySessionId'])return;const _0x565750='user:position:'+_0x56efba;_0x5a7ba3['markers']['has'](_0x565750)&&_0x160f72['editing']['reconvertMarker'](_0x565750),_0x529fe8['on']('change:range',(_0x22dec2,_0x48ae58,_0x390c21)=>{if('$graveyard'!=_0x48ae58['root']['rootName']&&'$graveyard'==_0x529fe8['getRange']()['root']['rootName']&&!_0x557199['has'](_0x529fe8['name'])){const _0x55a975=_0x5a7ba3['schema']['getNearestSelectionRange'](_0x390c21['deletionPosition']);if(_0x55a975){const _0x205064=ht['fromRange'](_0x55a975);_0x557199['set'](_0x529fe8['name'],_0x205064),_0x205064['on']('change:range',(_0x3afd05,_0x8cc385,_0x5ef939)=>{if('$graveyard'==_0x205064['root']['rootName']){const _0x1a9d67=_0x5a7ba3['schema']['getNearestSelectionRange'](_0x5ef939['deletionPosition']);_0x1a9d67?(_0x205064['start']=_0x1a9d67['start'],_0x205064['end']=_0x1a9d67['end']):(_0x557199['delete'](_0x529fe8['name']),_0x205064['detach']());}});}}});}),_0x5a7ba3['document']['on']('change',()=>{_0x557199['size']>0x0&&_0x5a7ba3['enqueueChange']({'isUndoable':!0x1},_0x5d6cc6=>{for(const [_0x1fe5a6,_0xad9d8e]of _0x557199)'$graveyard'==_0x5a7ba3['markers']['get'](_0x1fe5a6)['getRange']()['root']['rootName']&&(re(_0x1fe5a6['split'](':')[0x2],_0xad9d8e['toRange'](),_0x5a7ba3,_0x5d6cc6),_0xad9d8e['detach']());_0x557199['clear']();});});}(_0x81c490),this['_domEmitter']['listenTo'](_0x5a383f['document'],'keydown',(_0x5bc031,{key:_0x80ffb7})=>{'Escape'===_0x80ffb7&&function(_0x44a996){_0x44a996['editing']['view']['change'](_0x51d046=>{for(const _0x46b977 of _0x44a996['model']['markers']){if(!_0x46b977['name']['startsWith']('user:position'))continue;const _0x5e1f63=_0x44a996['editing']['mapper']['markerNameToElements'](_0x46b977['name']);if(_0x5e1f63){for(const _0x4eb0b3 of _0x5e1f63)_0x51d046['removeClass']('ck-user__marker_hovered',_0x4eb0b3);}}});}(_0x81c490);},{'useCapture':!0x0});}['afterInit'](){const _0x2ffc2c=this['editor'],_0x585af2=_0x2ffc2c['commands']['get']('undo');_0x585af2&&_0x2ffc2c['model']['on']('applyOperation',(_0x516aed,_0x2a7b8f)=>{const _0x1a9e68=_0x2a7b8f[0x0];if('marker'!=_0x1a9e68['type']||!_0x1a9e68['name']['startsWith']('user:'))return;const _0x141f48=_0x1a9e68['batch'];_0x585af2['_createdBatches']['has'](_0x141f48)&&(_0x1a9e68['newRange']=_0x1a9e68['oldRange']?_0x2ffc2c['model']['createRange'](_0x1a9e68['oldRange']['start'],_0x1a9e68['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x2265cb=this['editor'],_0x4ccdd2=_0x2265cb['model']['document'],_0x205e68=_0x2265cb['plugins']['get'](i);_0x2265cb['model']['enqueueChange']({'isUndoable':!0x1},_0x4e0fc9=>{const _0x4196d2='user:range:'+_0x205e68['mySessionId'],_0x3fe0a3='user:position:'+_0x205e68['mySessionId'],_0x34b55a=_0x2265cb['model']['markers']['has'](_0x4196d2);_0x2265cb['editing']['view']['hasDomSelection']?re(_0x205e68['mySessionId'],_0x4ccdd2['selection']['getFirstRange'](),_0x2265cb['model'],_0x4e0fc9):_0x34b55a&&(_0x4e0fc9['removeMarker'](_0x4196d2),_0x4e0fc9['removeMarker'](_0x3fe0a3));});}}function re(_0x121ca8,_0x484361,_0x30ef8b,_0x184240){const _0x5dd9f8='user:range:'+_0x121ca8,_0x20ec9e='user:position:'+_0x121ca8,_0x11483c=_0x484361['getContainedElement']();let _0x3fe48f=_0x484361['start'];_0x11483c&&_0x11483c['is']('element','tableCell')&&(_0x3fe48f=function(_0x51ba0e,_0x5783a5){for(const _0x3a5836 of _0x51ba0e['getPositions']())if(_0x5783a5['schema']['checkChild'](_0x3a5836,'$text'))return _0x3a5836;}(_0x484361,_0x30ef8b),_0x484361=_0x184240['createRange'](_0x3fe48f));const _0x75cd0f=_0x184240['createRange'](_0x3fe48f);_0x30ef8b['markers']['has'](_0x5dd9f8)?(_0x184240['updateMarker'](_0x5dd9f8,{'range':_0x484361}),_0x184240['updateMarker'](_0x20ec9e,{'range':_0x75cd0f})):(_0x184240['addMarker'](_0x5dd9f8,{'range':_0x484361,'usingOperation':!0x0}),_0x184240['addMarker'](_0x20ec9e,{'range':_0x75cd0f,'usingOperation':!0x0}));}function q(_0x4c5e2c,_0x406f5c,_0x3685e7){const _0x510511=_0x4c5e2c['t'],t=_0x4c5e2c['t'];switch(_0x406f5c){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');case'PENDING_ACTION_REVISION_HISTORY':return _0x510511({'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'},_0x3685e7);default:return'';}}let K=0x1;class l extends _0x3b81de{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
-
((()=>_0x2ef4b7)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,H,_0x5c30be,_0x305f5d,_0x580b9];}static get['pluginName'](){return'RealTimeCollaborationClient';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x2d0de0=this['serverHistory']['getOperations']();for(let _0x541d51=_0x2d0de0['length']-0x1;_0x541d51>=0x0;_0x541d51--){const _0x2aea69=_0x2d0de0[_0x541d51];if(!this['_disconnectionOperations']['has'](_0x2aea69))return _0x2aea69['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x38ec6e){if(super(_0x38ec6e),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x358a9d(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x3d0c02('collaboration-missing-channelid',this);const _0x2131df=_0x38ec6e['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x2131df,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x263294(),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 _0x4f589e=this['editor'],_0x25fe36=_0x4f589e['plugins']['get'](_0x305f5d),_0x5bb410=_0x4f589e['plugins']['get'](c);this['listenTo'](_0x25fe36,'getOperationAuthor',(_0x1c9b88,_0x13d9b7)=>{const _0x392727=_0x13d9b7[0x0];_0x392727['_authorId']&&(_0x1c9b88['return']=_0x25fe36['getUser'](_0x392727['_authorId']),_0x1c9b88['stop']()),null===_0x392727['_authorId']&&(_0x1c9b88['return']=null,_0x1c9b88['stop']());},{'priority':'high'}),this['listenTo'](_0x4f589e['model']['document']['selection'],'change:range',(_0x4f8ff1,_0x21b163)=>{_0x21b163['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x4f589e['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x4f589e['model']['on']('applyOperation',(_0xb1feca,_0x1919cc)=>{const _0x51e7e3=_0x1919cc[0x0];_0x51e7e3['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x51e7e3),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x5bb410,'state',this,'_hasSynchronizationProblem',(_0x1b4a6f,_0x1d063b)=>'connected'===_0x1b4a6f&&!_0x1d063b),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x4f589e['disableReadOnlyMode']('rtc-offline'):_0x4f589e['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x4f589e['disableReadOnlyMode']('rtc-offline'):_0x4f589e['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x338bf2=this['editor']['plugins']['get'](i),_0x55dfa2=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x338bf2['unregister'](this['_channelId']);const _0x4d317c=await this['_service']['reconnect'](_0x55dfa2['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x4d317c)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x56105f=await this['_service']['getConnectedSessions']();_0x338bf2['register'](this['_channelId'],_0x56105f),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x20921a){if(function(_0x34862a){return'404'===_0x34862a['code'];}(_0x20921a)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x2d6b1b){return'409'===_0x2d6b1b['code'];}(_0x20921a)){const _0x25e45=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'](_0x25e45);}else{if(!(_0x20921a instanceof J))throw _0x20921a;this['_handleReconnectionError']();}}}}['destroy'](){const _0x134958=this['editor']['plugins']['get'](c),_0x43465f=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x43465f['channelSessions']['has'](this['_channelId'])&&_0x43465f['unregister'](this['_channelId']),_0x134958['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x4c1f3f){if(this['sessionId']!==_0x4c1f3f['sessionId']&&this['_lastSyncedOperationId']!==_0x4c1f3f['lastOperationId'])throw new J();return this['sessionId']=_0x4c1f3f['sessionId'],this['_handleServerResponse']([],{..._0x4c1f3f,'wereChangesApplied':!0x1,'data':_0x4c1f3f['data']},'reconnect');}async['_connectService'](_0xef76f3,_0x56561f=!0x1){const {connection:_0x1e32b3}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x1e32b3,this['_channelId'])['then'](_0x283b60=>this['_initSessionsHandling'](_0x283b60))['catch'](_0x4ca795=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x4ca795);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x52f6e6,_0x2ea5dc)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x2ea5dc);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x3a7ae0=this['_operationIdentifier']['getIdOfTheLastOperation'](_0xef76f3);this['_isPendingUpdate']=!0x0;const _0x1005a7=await this['_service']['connect'](_0x1e32b3,this['_compressOperations'](_0xef76f3),_0x3a7ae0);if(this['sessionId']=_0x1005a7['sessionId'],_0x56561f){if(!_0x1005a7['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x1005a7['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0xef76f3,_0x1005a7,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x1005a7,_0xef76f3);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x30a6f7=this['editor']['plugins']['get'](i),_0xd0cade=this['editor']['plugins']['get'](H),_0x153c41=_0x30a6f7['channelSessions']['get'](this['_channelId']);_0x153c41&&_0x153c41['length']>0x1?_0xd0cade['createUserMarkerOperations']():this['listenTo'](_0x30a6f7,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x30a6f7['channelSessions']['get'](this['_channelId'])['length']&&_0xd0cade['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x1e5d8e,_0x5686d8,_0x38450f,_0x269a0a){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x5686d8){const _0x46d6f6=this['_decompressOperations'](_0x38450f,_0x269a0a);await this['_fetchMissingUsers'](_0x46d6f6),this['_handleExternalOperations'](_0x46d6f6,_0x5686d8,_0x38450f['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x39981e}=this['editor'];let _0x5cdb9a;try{_0x5cdb9a=await this['_service']['getDocumentDetails']();}catch(_0x476a4d){const _0x1f0247=q(_0x39981e,'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'](_0x1f0247);}const _0x1d592b=_0x5cdb9a['currentDocumentSession']||_0x5cdb9a['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x1d592b['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x218dfc=q(_0x39981e,'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'](_0x218dfc);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x3fce74){const _0x221547=this['editor']['plugins']['get'](i);this['listenTo'](_0x221547,'sessionAdd:'+this['_channelId'],(_0x3b946d,{session:_0x23d7ce})=>{if(_0x23d7ce['id']===_0x221547['mySessionId']){_0x3b946d['off']();const _0x34745f=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x1188b3=_0x23d7ce['permissions'];_0x34745f&&_0x34745f['isEnabled']&&(_0x1188b3=_0x1188b3['filter'](_0x21fe79=>'document:write'!==_0x21fe79)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x1188b3,this['_channelId']);}}),_0x221547['register'](this['_channelId'],_0x3fce74);}['_initThrowingOnDataSet'](){const _0x482c4c=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x131ef7)=>{if(!_0x131ef7[_0x131ef7['length']-0x1]['suppressErrorInCollaboration'])throw new _0x3d0c02('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x482c4c['apply'](this['editor']['data'],_0x131ef7);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x2afe8c,[_0xd7dbf3])=>{if(this['_document']['version'])throw new _0x3d0c02('realtimecollaborationclient-init-document-already-initialized',this);_0x2afe8c['stop'](),this['_setPendingAction']();const _0x19ab23=this['editor']['config']['get']('rootsAttributes'),_0x4e6044=this['_getOperationsFromInitData'](_0xd7dbf3,_0x19ab23);0x0==_0x4e6044['length']&&_0x4e6044['push'](new _0x2334c7(0x0)),_0x2afe8c['return']=this['_connectService'](_0x4e6044)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x24e809=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x24e809))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x1d4a48,[_0x598ad6,_0x2bb562])=>{_0x1d4a48['stop']();const _0x523012=this['editor']['model']['document']['getRoot'](_0x598ad6);if(!this['_knownRootNames']['has'](_0x598ad6)){const _0x3910b2=_0x2bb562&&_0x2bb562['data']?_0x2bb562['data']:'',_0x365cc6=_0x2bb562&&_0x2bb562['attributes']?_0x2bb562['attributes']:{};await this['_loadRoot'](_0x598ad6,_0x3910b2,_0x365cc6);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x523012['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x523012);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x43009e){const _0x365095=this['editor']['plugins']['get'](_0x305f5d),{connection:_0x39f646}=this['editor']['plugins']['get'](c),_0x2bf945=new Set();for(const _0x585065 of _0x43009e){const _0x51ea6e=_0x585065['_authorId'];_0x51ea6e&&!_0x365095['getUser'](_0x51ea6e)&&_0x2bf945['add'](_0x51ea6e);}if(0x0===_0x2bf945['size'])return;const _0x4477c9=await dt['getMany'](_0x39f646,Array['from'](_0x2bf945));for(const _0x408231 of _0x4477c9)_0x365095['getUser'](_0x408231['id'])||_0x365095['addUser'](_0x408231);}['_getOperationsFromInitData'](_0x31d8a9,_0x425966={}){const _0x2e6b60=this['editor']['model'],_0x2f6d28=[];let _0x113378=0x0;const _0x1ed460='string'==typeof _0x31d8a9?{'main':_0x31d8a9}:_0x31d8a9;for(const _0x20575b of Object['keys'](_0x1ed460)){if(!this['_document']['roots']['has'](_0x20575b))throw new _0x3d0c02('realtimecollaborationclient-init-non-existent-root',this);const _0xbd04e9=this['editor']['data']['parse'](_0x1ed460[_0x20575b]),_0x41beed=this['_document']['getRoot'](_0x20575b),_0x107f97=new _0x19d019(_0x2e6b60['createPositionAt'](_0x41beed,0x0),_0xbd04e9,_0x113378++);_0x2f6d28['push'](_0x107f97);for(const [_0x146371,_0x2719b9]of _0xbd04e9['markers']){const _0x48432d=_0x2e6b60['createRange'](_0x2e6b60['createPositionFromPath'](_0x41beed,_0x2719b9['start']['path']['slice']()),_0x2e6b60['createPositionFromPath'](_0x41beed,_0x2719b9['end']['path']['slice']())),_0x31f544=new _0x21b767(_0x146371,null,_0x48432d,_0x2e6b60['markers'],!0x0,_0x113378++);_0x2f6d28['push'](_0x31f544);}}if(_0x425966)for(const [_0x11fa08,_0x1412bb]of Object['entries'](_0x425966)){const _0xfed834=_0x2e6b60['document']['getRoot'](_0x11fa08);if(!_0xfed834)throw new _0x3d0c02('multi-root-editor-root-attributes-no-root',null);for(const [_0x2477cb,_0x326eb3]of Object['entries'](_0x1412bb))if(null!==_0x326eb3){const _0x5230a4=new _0x3b1d5d(_0xfed834,_0x2477cb,null,_0x326eb3,_0x113378++);_0x2f6d28['push'](_0x5230a4);}}return _0x2f6d28;}async['_loadRoot'](_0x3cae51,_0x58dbcc,_0x2c075f){this['_getOperationsFromInitData']({[_0x3cae51]:_0x58dbcc},{[_0x3cae51]:_0x2c075f})['forEach']((_0x52a217,_0x190b11)=>{_0x52a217['baseVersion']=this['_document']['version']+_0x190b11,_0x52a217['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x52a217);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x129569,_0x54b044){let _0x1d7680;this['_offset']=_0x129569['offset'];const _0x172d5c=_0x129569['wereChangesApplied']&&!_0x129569['initData'],_0x1ec5ab=_0x172d5c?0x0:_0x129569['data']['baseVersion'];if(_0x54b044['forEach'](_0x5435ac=>{_0x5435ac['_isInit']=!0x0,_0x5435ac['createdAt']=_0x129569['sessionCreatedAt'],_0x5435ac['_authorId']=null;}),_0x172d5c)_0x1d7680=_0x54b044,this['_applyOperationsSet'](_0x1d7680,_0x172d5c);else{if(_0x129569['initData']){const _0x77757e=this['_getOperationsFromInitData'](_0x129569['initData']);this['_document']['history']['version']=-_0x77757e['length'],_0x77757e['forEach'](_0x425499=>{_0x425499['baseVersion']-=_0x77757e['length'],_0x425499['createdAt']=_0x129569['sessionCreatedAt'],_0x425499['_isInit']=!0x0,_0x425499['_authorId']=null;}),this['_applyOperationsSet'](_0x77757e,!0x0),this['serverHistory']['version']=-_0x77757e['length']+this['_offset'],this['_updateServerHistory'](_0x77757e);}this['_document']['history']['version']=_0x1ec5ab,_0x1d7680=this['_decompressOperations'](_0x129569['data'],_0x129569['metadata']),await this['_fetchMissingUsers'](_0x1d7680),this['_applyOperationsSet'](_0x1d7680,_0x172d5c);}_0x129569['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x1d7680,_0x129569['lastOperationId']),this['_lastSyncedOperationId']=_0x129569['lastOperationId']),this['serverHistory']['version']=_0x1ec5ab+this['_offset'],this['_updateServerHistory'](_0x1d7680),_0x54b044['filter'](_0x5e3da9=>{const _0x5a3b4e=this['_getAffectedRoot'](_0x5e3da9);return _0x5a3b4e&&!this['_knownRootNames']['has'](_0x5a3b4e);})['forEach']((_0x5cee4,_0x171249)=>{_0x5cee4['baseVersion']=this['_document']['version']+_0x171249,this['_saveOperationInBuffer'](_0x5cee4);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0xfb0058,_0x3c441a,_0x14de0e){throw this['_isPendingUpdate']=!0x0,_0x3c441a&&console['error'](_0x3c441a),_0x14de0e&&this['editor']['enableReadOnlyMode']('realtimecollaborationclient-error'),new _0x3d0c02(_0xfb0058,this['editor']);}['_saveOperationInBuffer'](_0x4c6a7f){this['_knownOperations']['has'](_0x4c6a7f)||(this['_knownOperations']['add'](_0x4c6a7f),this['_bufferedOperations']['push'](_0x4c6a7f),this['_pendingAction']||'marker'==_0x4c6a7f['type']&&!_0x4c6a7f['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x37fcfb=!0x1){!_0x37fcfb&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0xb2dda9=>{_0xb2dda9&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x8bdc72=>{this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,function(_0x544b97){return _0x544b97['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x544b97['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x544b97['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x8bdc72)||this['_crash'](_0x8bdc72['message'],_0x8bdc72,!0x0);});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x1a2c16=>{this['on']('change:_isPendingUpdate',()=>{_0x1a2c16();});});}async['_sendBufferedOperations'](){const _0x380f21=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x380f21['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x174d00=[...this['_bufferedOperations']];for(const _0x252faf of _0x174d00)_0x252faf['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x252faf);const _0x2eddd4=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x174d00),_0x34cfb7=K++,_0x49f10a=this['_compressOperations'](_0x174d00),_0x4d94b5=await this['_service']['sendOperations'](_0x49f10a,_0x49f10a['baseVersion'],_0x2eddd4);try{return await this['_handleServerResponse'](_0x174d00,_0x4d94b5,_0x34cfb7);}catch(_0x4b1e24){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x4b1e24);}}async['_handleServerResponse'](_0x453528,_0x4bb91a,_0x121767){if('error'in _0x4bb91a)throw _0x4bb91a['error'];let _0x2a3117=!0x1;if(_0x4bb91a['wereChangesApplied']){_0x4bb91a['lastOperationId']&&(this['_lastSyncedOperationId']=_0x4bb91a['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x4cde13=>!_0x453528['includes'](_0x4cde13));for(const _0xb7d3d5 of _0x453528)_0xb7d3d5['createdAt']='lastOperationAcceptedAt'in _0x4bb91a&&_0x4bb91a['lastOperationAcceptedAt']||void 0x0;Q(_0x453528,_0x4bb91a['version']-_0x453528['length']),this['_updateServerHistory'](_0x453528);const _0x5f0b17=_0x453528['filter'](_0x267f3d=>{if(!_0x267f3d['_isInit'])return!0x1;const _0x14d5aa=this['_getAffectedRoot'](_0x267f3d);return _0x14d5aa&&!this['_knownRootNames']['has'](_0x14d5aa);});Q(_0x5f0b17,this['_document']['version']),this['_applyOperationsSet'](_0x5f0b17),_0x2a3117=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x3b493b=this['_decompressOperations'](_0x4bb91a['data'],_0x4bb91a['metadata'])['filter'](_0x3e1e97=>_0x3e1e97['baseVersion']>=this['_lastServerVersion']);_0x3b493b['forEach'](_0x249e9f=>this['_addKnownRoot'](_0x249e9f)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x3cb2dc=>!_0x3cb2dc['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x3cb2dc))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x3b493b),_0x2a3117=this['_handleExternalOperations'](_0x3b493b,_0x4bb91a['version'],_0x4bb91a['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x2a3117?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0xee96d9,_0x1558c9,_0x311a0a){try{const _0x529723={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x414d64,operationsB:_0x215152,originalOperations:_0x52714b}=_0x11f3c8(_0xee96d9,this['_bufferedOperations'],_0x529723);Q(_0x414d64,this['_document']['version']),Q(_0x215152,_0x1558c9);for(const _0x1bbf63 of _0x414d64){const _0x423e28=_0x52714b['get'](_0x1bbf63);_0x1bbf63['_authorId']=_0x423e28?_0x423e28['_authorId']:null;}_0x311a0a&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0xee96d9,_0x311a0a),this['_lastSyncedOperationId']=_0x311a0a),this['_bufferedOperations']=[..._0x215152],this['_applyOperationsSet'](_0x414d64),this['_updateServerHistory'](_0xee96d9);}catch(_0x567757){return console['error'](_0x567757),!0x1;}return!0x0;}['_applyOperationsSet'](_0x356624,_0x209138=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x339812=>{for(const _0x1d120b of _0x356624)this['_knownOperations']['add'](_0x1d120b),this['_addKnownRoot'](_0x1d120b),_0x339812['batch']['addOperation'](_0x1d120b),this['editor']['model']['applyOperation'](_0x1d120b);});}['_addKnownRoot'](_0x2955b0){const _0x5bf870=this['_getAffectedRoot'](_0x2955b0);_0x5bf870&&this['_knownRootNames']['add'](_0x5bf870);}['_getAffectedRoot'](_0x47b4bf){let _0x11803a,_0x27a45e;switch(_0x47b4bf['type']){case'insert':_0x11803a=_0x47b4bf['position']['root'];break;case'marker':if(_0x27a45e=_0x47b4bf['newRange'],!_0x27a45e)return null;_0x11803a=_0x27a45e['root'];break;case'addRootAttribute':_0x11803a=_0x47b4bf['root'];break;case'addRoot':_0x11803a=_0x47b4bf['affectedSelectable'];break;case'move':_0x11803a=_0x47b4bf['targetPosition']['root'];break;default:return null;}return _0x11803a['rootName'];}['_updateServerHistory'](_0x5d0281){_0x5d0281['forEach'](_0x20339c=>{const _0x45b697=_0x20339c['clone']();_0x45b697['_authorId']=_0x20339c['_authorId'],_0x45b697['_isInit']=!!_0x20339c['_isInit'],_0x45b697['createdAt']=_0x20339c['createdAt'],_0x45b697['baseVersion']+=this['_offset'],_0x20339c['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x45b697),this['serverHistory']['addOperation'](_0x45b697);});}['_handleReconnectionError'](_0x56518f){const _0x33014e=this['editor']['plugins']['get']('Notification'),_0x94642d=this['editor']['locale'];_0x56518f||(_0x56518f=q(_0x94642d,'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.')),_0x33014e['showWarning'](_0x56518f,{'title':q(_0x94642d,'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'](_0x5c30be)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x5c30be)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x399fca){const _0x47b0d3=_0x399fca['map'](_0x490e65=>_0x490e65['toJSON']());return this['_compressor']['compress'](_0x47b0d3);}['_decompressOperations'](_0x1d4ae4,_0x4a8399){return this['_compressor']['decompress'](_0x1d4ae4)['map']((_0x537bde,_0x303e2f)=>{const _0x55b135='init'==_0x4a8399[_0x303e2f]['type'];if('InsertOperation'==_0x537bde['__className']){const _0x351b7f=_0x537bde['position']['root'];!this['_document']['getRoot'](_0x351b7f)&&(this['_document']['createRoot']('$root',_0x351b7f)['_isAttached']=!0x1);}const _0x3a6528=_0x38f585['fromJSON'](_0x537bde,this['_document']);return _0x3a6528['wasUndone']=_0x537bde['wasUndone'],_0x3a6528['_isInit']=_0x55b135,_0x3a6528['_authorId']=_0x55b135?null:_0x4a8399[_0x303e2f]['userId'],_0x3a6528['_isDisconnection']='cs:removeUser'===_0x4a8399[_0x303e2f]['type'],_0x3a6528['createdAt']=_0x4a8399[_0x303e2f]['createdAt'],_0x3a6528;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x1cd7de=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x1cd7de&&_0x1cd7de['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0x412540,_0x215202){for(const _0x15e815 of _0x412540)_0x15e815['baseVersion']=_0x215202++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x5e9858){this['_ignoredOperations']=_0x5e9858,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x223277){let _0x39807f=_0x223277['length'];for(;_0x39807f--;){const _0x1b203a=_0x223277[_0x39807f];if(!this['_ignoredOperations']['has'](_0x1b203a)){if(!this['_operationToId']['has'](_0x1b203a)){const _0x10080a=_0x4cacba()['slice'](0x1,0x12);this['_operationToId']['set'](_0x1b203a,_0x10080a);}return this['_operationToId']['get'](_0x1b203a);}}}['setIdForTheLastOperation'](_0x5dbbfc,_0x8755b9){if(!_0x8755b9)return;let _0x99dad1=_0x5dbbfc['length'];for(;_0x99dad1--;){const _0x3c96a0=_0x5dbbfc[_0x99dad1];this['_ignoredOperations']['has'](_0x3c96a0)||this['_operationToId']['set'](_0x3c96a0,_0x8755b9);}}}class n extends _0x3b81de{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x5b046d{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
-
((()=>_0x2228f5)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x305f5d];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x48a339){super(_0x48a339),this['_services']=new Map();}async['init'](){const _0x578ceb=this['context'],_0x2bcdd3=_0x578ceb['plugins']['get']('CommentsRepository');if(_0x578ceb['plugins']['get'](c)['addToReconnectionStack'](this),_0x2bcdd3['adapter']={'addCommentThread':async({channelId:_0xdab520,threadId:_0x24030b,comments:_0x5dd94c,resolvedAt:_0x5b0b9f,resolvedBy:_0x29a23e,context:_0x37a2dc,attributes:_0x13df04})=>{const _0x4d8e4f=await this['_getService'](_0xdab520)['addCommentThread']({'commentThreadId':_0x24030b,'comments':_0x5dd94c['map'](_0x1f5095=>function(_0x300932,_0x44247b,_0x3f9f1d){return{'commentThreadId':_0x3f9f1d,'commentId':_0x300932['commentId'],'userId':_0x300932['authorId'],'content':_0x300932['content'],'documentId':_0x44247b,'createdAt':_0x300932['createdAt'],'attributes':_0x300932['attributes']||{}};}(_0x1f5095,_0xdab520,_0x24030b)),'resolvedAt':_0x5b0b9f,'resolvedBy':_0x29a23e,'context':_0x37a2dc,'attributes':_0x13df04})['catch'](ut);return{'threadId':_0x4d8e4f['commentThreadId'],'comments':_0x4d8e4f['comments']};},'getCommentThread':async({channelId:_0x45d306,threadId:_0x4d1e36})=>{const _0x3a92e7=await this['_getService'](_0x45d306)['getCommentThread'](_0x4d1e36)['catch'](ut);return _0x3a92e7['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x3a92e7]),{'threadId':_0x3a92e7['commentThreadId'],'comments':_0x3a92e7['comments']['map'](S),'context':_0x3a92e7['context'],'resolvedAt':_0x3a92e7['resolvedAt'],'resolvedBy':_0x3a92e7['resolvedBy'],'attributes':_0x3a92e7['attributes']||{}});},'updateCommentThread':async({channelId:_0x391452,threadId:_0x1367df,context:_0x22dd71,unlinkedAt:_0x1c91df,attributes:_0x340104})=>this['_getService'](_0x391452)['updateCommentThread']({'commentThreadId':_0x1367df,'context':_0x22dd71,'attributes':_0x340104,'unlinkedAt':_0x1c91df})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x41510f,threadId:_0x56d866})=>{const _0x2de1ce=await this['_getService'](_0x41510f)['resolveCommentThread'](_0x56d866)['catch'](B)['catch'](ut);return{'threadId':_0x2de1ce['commentThreadId'],'resolvedAt':_0x2de1ce['resolvedAt'],'resolvedBy':_0x2de1ce['resolvedBy']};},'reopenCommentThread':async({channelId:_0x163c7d,threadId:_0x153531})=>this['_getService'](_0x163c7d)['reopenCommentThread'](_0x153531)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x1edd21,threadId:_0x37941f})=>this['_getService'](_0x1edd21)['removeCommentThread'](_0x37941f)['catch'](B)['catch'](ut),'addComment':({channelId:_0x10b2ea,threadId:_0x32d8d0,commentId:_0x39b0e6,content:_0x2699a1,attributes:_0x1a2109})=>this['_getService'](_0x10b2ea)['addComment'](_0x32d8d0,_0x39b0e6,_0x2699a1,_0x1a2109)['catch'](ut),'updateComment':({channelId:_0x22acf7,threadId:_0x5d63e0,commentId:_0x3e07cd,content:_0x129d5d,attributes:_0x447f86})=>this['_getService'](_0x22acf7)['updateComment'](_0x5d63e0,_0x3e07cd,_0x129d5d,_0x447f86)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x370378,threadId:_0x1beaec,commentId:_0x19ee7b})=>this['_getService'](_0x370378)['removeComment'](_0x1beaec,_0x19ee7b)['catch'](B)['catch'](ut)},_0x578ceb instanceof _0x285205){const _0x12192a=_0x578ceb['config']['get']('collaboration.channelId'),_0x16ab8b=_0x578ceb['plugins']['get'](i);await this['_setUpService'](_0x12192a);const _0x1fb59a=await this['_services']['get'](_0x12192a)['getConnectedSessions']();this['listenTo'](_0x16ab8b,'sessionAdd:'+_0x12192a,(_0x225fb4,{session:_0x2aa143})=>{_0x2aa143['id']===_0x16ab8b['mySessionId']&&(_0x225fb4['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x2aa143['permissions'],_0x12192a));}),_0x16ab8b['register'](_0x12192a,_0x1fb59a);}}async['_setUpService'](_0x122c65){if(this['_services']['has'](_0x122c65))throw new _0x3d0c02('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x122c65});const _0x2fabfe=this['context']['plugins']['get']('CommentsRepository'),_0x3cc508=new a['CommentsService'](_0x122c65);this['_services']['set'](_0x122c65,_0x3cc508),this['listenTo'](_0x3cc508,'commentThreadAdded',(_0x410928,_0x57a172)=>{const {commentThreadId:_0x1ddb0f,documentId:_0x58b81a,context:_0x477c39,attributes:_0x57d070,resolvedAt:_0xbb219f,resolvedBy:_0x20f334,comments:_0x331f2b}=_0x57a172;_0x2fabfe['getCommentThread'](_0x1ddb0f)||_0x2fabfe['addCommentThread']({'threadId':_0x1ddb0f,'channelId':_0x58b81a,'comments':_0x331f2b?_0x331f2b['map'](S):[],'context':_0x477c39,'attributes':_0x57d070,'resolvedAt':_0xbb219f,'resolvedBy':_0x20f334,'isFromAdapter':!0x0});}),this['listenTo'](_0x3cc508,'commentThreadUpdated',(_0x23ef7e,{commentThreadId:_0x5ae0be,documentId:_0x150fd5,context:_0x27c011,unlinkedAt:_0x433fe6,attributes:_0x1718a2})=>{_0x2fabfe['getCommentThread'](_0x5ae0be)&&_0x2fabfe['updateCommentThread']({'threadId':_0x5ae0be,'channelId':_0x150fd5,'context':_0x27c011,'unlinkedAt':_0x433fe6,'attributes':_0x1718a2,'isFromAdapter':!0x0});}),this['listenTo'](_0x3cc508,'commentThreadResolved',(_0x711983,{commentThreadId:_0x3c3bbb,resolvedBy:_0x53c971,resolvedAt:_0x38f516})=>{const _0x973022=_0x2fabfe['getCommentThread'](_0x3c3bbb);_0x973022&&_0x973022['resolve']({'resolvedBy':_0x53c971,'resolvedAt':_0x38f516,'isFromAdapter':!0x0});}),this['listenTo'](_0x3cc508,'commentThreadReopened',(_0xf4e927,{commentThreadId:_0x45ba2d})=>{const _0x1ee8dc=_0x2fabfe['getCommentThread'](_0x45ba2d);_0x1ee8dc&&_0x1ee8dc['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x3cc508,'commentThreadRemoved',(_0x5af135,{commentThreadId:_0x11e8ab})=>{const _0xcf92d8=_0x2fabfe['getCommentThread'](_0x11e8ab);_0xcf92d8&&_0xcf92d8['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x3cc508,'commentAdded',(_0x1cdd82,_0x507ea4)=>{const _0x29afbb=_0x507ea4['commentThreadId'],_0x5dd5f0=_0x2fabfe['getCommentThread'](_0x29afbb);_0x5dd5f0&&_0x5dd5f0['addComment']({...S(_0x507ea4),'isFromAdapter':!0x0});}),this['listenTo'](_0x3cc508,'commentUpdated',(_0x315769,{commentThreadId:_0x5ea1c0,commentId:_0x65e556,content:_0x20d29a,attributes:_0x103c4c})=>{const _0x3a3347=_0x2fabfe['getCommentThread'](_0x5ea1c0);if(_0x3a3347){const _0x2d1919=_0x3a3347['getComment'](_0x65e556);_0x2d1919&&_0x2d1919['update']({'content':_0x20d29a,'attributes':_0x103c4c,'isFromAdapter':!0x0});}}),this['listenTo'](_0x3cc508,'commentRemoved',(_0x69c571,{commentThreadId:_0x2d3a66,commentId:_0x1766c8})=>{const _0x239b85=_0x2fabfe['getCommentThread'](_0x2d3a66);if(_0x239b85){const _0x12ea5e=_0x239b85['getComment'](_0x1766c8);_0x12ea5e&&_0x12ea5e['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x122c65);}['destroy'](){if(this['context']instanceof _0x285205){const _0x28066f=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x28066f);}}['_terminateService'](_0x3ee94b){if(!this['_services']['has'](_0x3ee94b))throw new _0x3d0c02('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x3ee94b});this['_getService'](_0x3ee94b)['disconnect'](),this['_services']['delete'](_0x3ee94b);}async['reconnect'](){for(const _0x277ab5 of this['_services']['keys']())await this['_connectService'](_0x277ab5);if(this['context']instanceof _0x285205){const _0x4216c2=this['context']['config']['get']('collaboration.channelId'),_0x59bfc6=this['context']['plugins']['get'](i);_0x59bfc6['unregister'](_0x4216c2);const _0xba5fc2=await this['_services']['get'](_0x4216c2)['getConnectedSessions']();_0x59bfc6['register'](_0x4216c2,_0xba5fc2);}}async['_connectService'](_0x1bb92e){const {connection:_0x3ca5c0}=this['context']['plugins']['get'](c),_0x5e5c12=this['context']['plugins']['get']('CommentsRepository'),_0x192ed9=this['_services']['get'](_0x1bb92e),_0x110f77=await _0x192ed9['connect'](_0x3ca5c0);await this['_fetchMissingUsersForThreads'](_0x110f77);const _0x2f74f3=new Set(Array['from'](_0x5e5c12['getCommentThreads']({'channelId':_0x1bb92e}),_0x10f6d4=>_0x10f6d4['id']));for(const _0x4f1551 of _0x110f77)_0x4f1551['deletedAt']||_0x2f74f3['delete'](_0x4f1551['commentThreadId']);for(const _0x4f9ef8 of _0x2f74f3)_0x5e5c12['getCommentThread'](_0x4f9ef8)['remove']({'isFromAdapter':!0x0});for(const _0x5005fb of _0x110f77){let _0x5f17ad=_0x5e5c12['getCommentThread'](_0x5005fb['commentThreadId']);const {commentThreadId:_0x5d2855,context:_0x4f8b79,attributes:_0x51320b,resolvedBy:_0x284286,resolvedAt:_0x508487,unlinkedAt:_0x30ae3b,deletedAt:_0x527849}=_0x5005fb;if(_0x527849)continue;_0x5f17ad||(_0x5f17ad=_0x5e5c12['addCommentThread']({'channelId':_0x1bb92e,'threadId':_0x5d2855,'context':_0x4f8b79,'attributes':_0x51320b||{},'resolvedBy':_0x284286,'resolvedAt':_0x508487,'unlinkedAt':_0x30ae3b,'isFromAdapter':!0x0}));const _0x4c34d9=new Set(Array['from'](_0x5f17ad['comments'],_0x1f2b94=>_0x1f2b94['id']));for(const _0x526842 of _0x5005fb['comments'])_0x4c34d9['delete'](_0x526842['commentId']);for(const _0x52c365 of _0x4c34d9)_0x5f17ad['getComment'](_0x52c365)['remove']({'isFromAdapter':!0x0});for(const _0xb97e4b of _0x5005fb['comments']){const _0x13fe69=_0x5f17ad['getComment'](_0xb97e4b['commentId']);_0x13fe69?_0x13fe69['content']!==_0xb97e4b['content']&&_0x13fe69['update']({'content':_0xb97e4b['content'],'isFromAdapter':!0x0}):_0x5f17ad['addComment'](Object['assign'](S(_0xb97e4b),{'isFromAdapter':!0x0}));}}}['_getService'](_0x202aec){if(!this['_services']['has'](_0x202aec))throw new _0x3d0c02('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x202aec});return this['_services']['get'](_0x202aec);}async['_fetchMissingUsersForThreads'](_0x357bdf){const _0x1a42ec=this['context']['plugins']['get'](_0x305f5d),{connection:_0x3ee10e}=this['context']['plugins']['get'](c),_0x2995be=new Set();for(const {resolvedBy:_0x1b4013,comments:_0x126bb4}of _0x357bdf){_0x1b4013&&!_0x1a42ec['getUser'](_0x1b4013)&&_0x2995be['add'](_0x1b4013);for(const {userId:_0x4a4c37}of _0x126bb4)_0x1a42ec['getUser'](_0x4a4c37)||_0x2995be['add'](_0x4a4c37);}if(0x0===_0x2995be['size'])return;const _0x427db8=await dt['getMany'](_0x3ee10e,Array['from'](_0x2995be));for(const _0x5b2e86 of _0x427db8)_0x1a42ec['getUser'](_0x5b2e86['id'])||_0x1a42ec['addUser'](_0x5b2e86);}}async function B(_0x5c8811){if('404'!==_0x5c8811['code'])throw _0x5c8811;}function ut(_0x56d36b){if((_0x3501a1=_0x56d36b)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x3501a1['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x3501a1['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x3501a1;throw _0x56d36b;}function S(_0x2504c0){return{'threadId':_0x2504c0['commentThreadId'],'commentId':_0x2504c0['commentId'],'content':_0x2504c0['content'],'createdAt':_0x2504c0['createdAt'],'authorId':_0x2504c0['userId'],'attributes':_0x2504c0['attributes']||{}};}class f extends _0x3b81de{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
-
((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}static get['pluginName'](){return'CloudServicesTrackChangesAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(
|
|
28
|
-
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x305f5d];}static get['pluginName'](){return'CloudServicesRevisionHistoryAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x182690){super(_0x182690);const _0x520cb7=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x520cb7);}async['init'](){const _0x448922=this['editor']['plugins']['get'](l),_0x550502=_0x448922['serverHistory'],_0x49224c=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x550502,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x448922['sessionId']});const _0x49f063=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x4fec7a=await tt['isBundleUploaded'](_0x49224c['connection'],_0x49f063);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x531ab})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x531ab)),'updateRevisions':async _0x77317b=>{await this['_waitForServiceReady']();const _0x593665=this['_revisionTracker']['currentRevision'];if(_0x4fec7a&&0x1===_0x77317b['length']&&_0x77317b[0x0]['id']===_0x593665['id'])return _0x77317b;for(const _0x896c0a of _0x77317b)_0x896c0a['id']===_0x593665['id']&&(_0x896c0a['isEmptyCurrent']=_0x896c0a['fromVersion']===_0x896c0a['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x77317b,this['_lastRequestId'])['then'](_0xee6018=>(this['_lastRequestId']=_0xee6018,_0x77317b))['catch'](_0x279973=>{if(st(_0x279973)||'400'===_0x279973['code']&&void 0x0!==_0x279973['data']['wrongRequestId']){for(const _0x34f9bd of _0x77317b){!this['_revisionTracker']['repository']['getRevision'](_0x34f9bd['id'])||this['_revisionTracker']['_bufferUpdate'](_0x34f9bd['id'],_0x34f9bd,!0x1);}if(st(_0x279973))throw _0x279973;return _0x77317b;}throw _0x279973;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x3ebbf5,{revisionsData:_0x30681d,requestId:_0x16da07})=>{Math['max'](..._0x30681d['map'](_0x59c5d8=>_0x59c5d8['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x30681d,_0x16da07);}):this['_handleRevisionsUpdate'](_0x30681d,_0x16da07);});const {revisions:_0x275a33,requestId:_0x25a5ee}=await this['_revisionHistoryService']['connect'](_0x49224c['connection']);_0x49224c['addToReconnectionStack'](this),this['_lastRequestId']=_0x25a5ee,await this['_fetchMissingUsers'](_0x275a33);for(const _0x4453b6 of _0x275a33)this['_revisionTracker']['addRevisionData'](_0x4453b6);this['listenTo'](_0x448922,'change:_isConnected',(_0x1654e1,_0x5c666b,_0x5a6212)=>{_0x5a6212&&(this['_oldOffset']=_0x448922['_offset'],_0x1654e1['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x49224c,'state',_0x4ad18c=>_0x4ad18c===_0x597b3f['CONNECTED']);}async['reconnect'](){const _0x2b328f=this['editor']['plugins']['get'](c),_0x232bee=this['editor']['plugins']['get'](l),_0x54580f=async()=>{const _0x18e3b4=this['_revisionTracker']['currentRevision'],_0x178fb1=_0x18e3b4['id'],_0x20c85e=_0x178fb1!==_0x232bee['sessionId'];if(_0x20c85e){const _0x510727=_0x232bee['_offset']-this['_oldOffset'],_0x4135fb=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x18e3b4['toVersion']+_0x510727!==_0x4135fb){const _0x40a5f8=_0x18e3b4['fromVersion']+_0x510727,_0x514a65=this['editor']['plugins']['get'](_0x305f5d),_0x4bff66=this['_revisionTracker']['buildRevisionData']({'revision':_0x18e3b4,'from':_0x40a5f8,'to':_0x4135fb});_0x4bff66['id']=_0x18e3b4['id'];const _0x4ffbdf=_0x4bff66['authorsIds']['map'](_0x54b5f0=>_0x514a65['getUser'](_0x54b5f0));_0x18e3b4['_update']({..._0x4bff66,'authors':_0x4ffbdf},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x18e3b4['id'],_0x4bff66,!0x0);}this['_revisionTracker']['_startingVersion']=_0x4135fb,(_0x18e3b4['toVersion']===_0x18e3b4['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x178fb1)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x178fb1),this['_revisionTracker']['_createCurrentRevision'](_0x4135fb));}const {revisions:_0x2262a2,requestId:_0x183b3e}=await this['_revisionHistoryService']['reconnect'](_0x2b328f['connection'],this['_lastRequestId']);_0x20c85e&&_0x2262a2['length']>0x0?_0x232bee['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x2262a2),this['_handleRevisionsUpdate'](_0x2262a2,_0x183b3e),this['_revisionTracker']['sendBufferedUpdates']());};return _0x232bee['_isConnected']?_0x54580f():new Promise((_0x4c6dc1,_0x141b9f)=>{_0x232bee['once']('change:_isConnected',()=>{_0x54580f()['then'](_0x4c6dc1)['catch'](_0x141b9f);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x35edc6=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x5208af=>{_0x5208af['off'](),_0x35edc6();});});}['_getLatestVersionFromServerOperations'](){const _0x3e14ce=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x273d33 of _0x3e14ce)if('marker'!==_0x273d33['type']||_0x273d33['affectsData'])return _0x273d33['baseVersion']+0x1;}['_getLatestVersion'](){const _0x20e67e=this['editor']['plugins']['get'](l);return new Promise(_0x19372c=>{_0x20e67e['_isPendingUpdate']?_0x20e67e['once']('change:_isPendingUpdate',()=>{_0x19372c(this['_getLatestVersionFromServerOperations']());}):_0x19372c(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x5cb753,_0x23242b){const _0x44f2b4=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x23242b;for(const _0x37a8dd of _0x5cb753){const _0x40ddb4=_0x44f2b4['getRevision'](_0x37a8dd['id']);if(_0x40ddb4){if((_0x37a8dd['fromVersion']||_0x37a8dd['toVersion'])&&(_0x37a8dd['diffData']=null),_0x40ddb4===this['_revisionTracker']['currentRevision']){const _0x1d9fa6=Math['max'](_0x40ddb4['toVersion'],_0x37a8dd['toVersion']),_0x3ff617=Math['max'](_0x40ddb4['fromVersion'],_0x37a8dd['fromVersion']);let _0x748352;_0x40ddb4['toVersion']===_0x37a8dd['toVersion']&&_0x40ddb4['fromVersion']===_0x37a8dd['fromVersion']?(_0x748352=!0x0,this['_preventResendingRevisionData'](_0x37a8dd)):_0x37a8dd['toVersion']===_0x1d9fa6&&_0x37a8dd['fromVersion']===_0x3ff617?_0x748352=!0x1:(_0x40ddb4['toVersion']===_0x1d9fa6&&_0x40ddb4['fromVersion']===_0x3ff617||this['_fixRevision']({'revision':_0x40ddb4,'from':_0x3ff617,'to':_0x1d9fa6}),_0x748352=!0x0),_0x748352&&(delete _0x37a8dd['fromVersion'],delete _0x37a8dd['toVersion'],delete _0x37a8dd['diffData'],delete _0x37a8dd['createdAt'],delete _0x37a8dd['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x37a8dd),this['_preventResendingRevisionData'](_0x37a8dd);}else this['_revisionTracker']['addRevisionData'](_0x37a8dd);}const _0xac995a=_0x44f2b4['getRevisions']();_0xac995a['reverse']();for(let _0xa4c290=0x0;_0xa4c290<_0xac995a['length']-0x1;_0xa4c290++){const _0x25ab96=_0xac995a[_0xa4c290],_0x42303d=_0xac995a[_0xa4c290+0x1];if(_0x25ab96['fromVersion']<_0x42303d['toVersion']){const _0x39386f=_0x42303d['toVersion'],_0x3523e6=Math['max'](_0x39386f,_0x25ab96['toVersion']);this['_fixRevision']({'revision':_0x25ab96,'from':_0x39386f,'to':_0x3523e6});}}}['_fixRevision']({revision:_0x11c5e5,from:_0x429d4b,to:_0x5e7867}={}){const _0xa4bc3b=this['editor']['plugins']['get'](_0x305f5d),_0x43cf91=this['_revisionTracker']['buildRevisionData']({'revision':_0x11c5e5,'from':_0x429d4b,'to':_0x5e7867});_0x43cf91['authors']=_0x43cf91['authorsIds']['map'](_0x2ff61b=>_0xa4bc3b['getUser'](_0x2ff61b)),_0x11c5e5['_update'](_0x43cf91);}['_preventResendingRevisionData'](_0x598e46){const _0xcd2dcc={};_0xcd2dcc['id']=_0x598e46['id'];for(const _0x59ddbd of Object['keys'](_0x598e46))'id'!==_0x59ddbd&&(_0xcd2dcc[_0x59ddbd]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0xcd2dcc['id'],_0xcd2dcc,!0x0);}async['_fetchMissingUsers'](_0x374661){const _0x234fa3=this['editor']['plugins']['get'](_0x305f5d),{connection:_0x2de467}=this['editor']['plugins']['get'](c),_0x1a1f52=new Set();for(const _0x5de212 of _0x374661){for(const _0x153774 of _0x5de212['authorsIds'])_0x3f3f9c(_0x153774);_0x5de212['creatorId']&&_0x3f3f9c(_0x5de212['creatorId']);}if(0x0===_0x1a1f52['size'])return;const _0x2699f0=await dt['getMany'](_0x2de467,Array['from'](_0x1a1f52));for(const _0x12d624 of _0x2699f0)_0x234fa3['getUser'](_0x12d624['id'])||_0x234fa3['addUser'](_0x12d624);function _0x3f3f9c(_0x71b7c0){_0x234fa3['getUser'](_0x71b7c0)||_0x1a1f52['add'](_0x71b7c0);}}}function st(_0x483802){return _0x483802['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x483802['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x483802['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x3b81de{static get['requires'](){return['RevisionHistory',u,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class ts extends _0x57c216{constructor(_0x539bc6){super(_0x539bc6);const _0x38105d=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x38105d['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x38105d['to']('usersCount',_0x1f9f69=>q(_0x539bc6,'CONNECTED_USERS',_0x1f9f69))}]});}}class es extends _0x57c216{['items'];['keystrokes'];constructor(_0x2cfeaf){super(_0x2cfeaf);const _0x302678=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x57d7ba(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x302678['if']('hasPopup'),'aria-expanded':_0x302678['to']('isExpanded',_0x4643bd=>this['hasPopup']&&String(_0x4643bd)),'aria-label':_0x302678['to']('hasPopup',_0x54f924=>q(_0x2cfeaf,_0x54f924?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x302678['to']('hasPopup',_0x237930=>!!_0x237930&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x302678['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0xacbac1,_0x145eb1,_0xe54051)=>{this['element']&&(_0xe54051?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class L extends _0x57c216{['counterView'];['inlineListView'];constructor(_0xa7bce){super(_0xa7bce);const _0x5c9015=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0xa7bce),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x5191ae of this['inlineListView']['items'])_0x5191ae['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',_0x5c9015['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x57c216{['listWrapperView'];constructor(_0x27d01a,_0x5434c2){super(_0x27d01a),this['listWrapperView']=new mt(_0x27d01a,_0x5434c2),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x27d01a,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x121aff{constructor(_0x44fbd3,_0x494336){super(_0x44fbd3);const _0x1c2d55=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x494336?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x1c2d55['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x1c2d55['to']('role'),'aria-label':_0x1c2d55['to']('ariaLabel'),'aria-labelledby':_0x1c2d55['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x5a383f['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x5e15c2=this['element'];_0x5e15c2&&(this['_isScrollable']=Math['max'](_0x5e15c2['scrollHeight'],_0x5e15c2['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x2cdfa6,_0x4b8918,_0xdc0616){super(_0x2cdfa6);const _0x374632=this['bindTemplate'];this['userView']=new ct(_0x2cdfa6,_0x4b8918);const _0xdcc022={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x4b8918['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x4b8918['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x4b8918['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0xdc0616&&(_0xdcc022['tag']='button',_0xdcc022['on']={'click':_0x374632['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0xdcc022);}['focus'](){this['element']['focus']();}}class y extends _0x57c216{['userView'];['markerView'];constructor(_0x2174e2,_0x594ab2,_0x350e75){super(_0x2174e2);const _0x45e08a=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x2174e2,_0x594ab2),this['markerView']=new at(_0x2174e2,_0x594ab2);const _0x5744cd=new ot(_0x2174e2);_0x5744cd['template']['tag']='span',_0x5744cd['text']=_0x594ab2['name'];const _0x5cd04e={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x45e08a['to']('isFocusable',_0xfe667=>!!_0xfe667&&0x0),'aria-labelledby':_0x5744cd['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x45e08a['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x45e08a['to']('hasTooltip',_0x3b6c9a=>!_0x3b6c9a),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x5744cd]};_0x350e75&&(_0x5cd04e['tag']='button',_0x5cd04e['on']={'click':_0x45e08a['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x5cd04e);}}class at extends _0x57c216{constructor(_0x289fa3,_0x17af32){super(_0x289fa3),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x17af32['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x5b046d{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x2c94ec){super(_0x2c94ec),this['context']['config']['define']('presenceList',A);const _0x578c8d=_0x2c94ec['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x578c8d)throw new _0x3d0c02('presencelist-collapseat-invalid-format',this);if(_0x578c8d<0x1)throw new _0x3d0c02('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x3c61b0(),this['balloonPanelView']=new _0x2e4728(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x35f3ac of this['_allConnectedUsers'])this['_handleUserAdd'](_0x35f3ac);this['listenTo'](this['_allConnectedUsers'],'add',(_0xcfdcd5,_0x372b83)=>{this['_handleUserAdd'](_0x372b83);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x1c357c,_0x4d23b5)=>{this['_handleUserRemove'](_0x4d23b5);});}['_createView'](){const _0x5d8ea7=this['context'],_0x288bc1=new L(this['context']['locale']),_0x4c0780=this['balloonPanelView'];if(!_0x4c3572(_0x5d8ea7['config']['get']('presenceList.container')))throw new _0x3d0c02('presencelist-missing-container',this);return _0x288bc1['counterView']['bind']('usersCount')['to'](this),_0x288bc1['bind']('isCollapsed')['to'](this,'usersCount',_0x315467=>{const {collapseAt:_0x3b7ff9,displayMe:_0x59e70b}=_0x5d8ea7['config']['get']('presenceList'),_0x30d3e3=_0x315467>=_0x3b7ff9;return _0x288bc1['counterView']['isHidden']=!(0x1==_0x315467&&_0x59e70b||_0x30d3e3),_0x30d3e3||this['hideDropdown'](),_0x30d3e3;}),_0x288bc1['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x52f658=>{const _0x2d054d=_0x5d8ea7['config']['get']('presenceList'),_0x444b8b=new y(_0x5d8ea7['locale'],_0x52f658,!!_0x2d054d['onClick']);return _0x444b8b['bind']('hasTooltip')['to'](_0x288bc1,'isCollapsed',_0x130753=>!_0x130753),_0x444b8b['bind']('isFocusable')['to'](_0x288bc1,'isCollapsed',_0x284ce8=>!_0x284ce8),_0x2d054d['onClick']&&this['listenTo'](_0x444b8b,'execute',()=>{this['view']['isCollapsed']||_0x2d054d['onClick'](_0x52f658,_0x444b8b['element']);}),_0x444b8b;}),this['listenTo'](_0x288bc1['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x288bc1['inlineListView']['keystrokes']['set']('Enter',(_0x37a008,_0x5988bf)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x5988bf());}),_0x288bc1['render'](),_0x4c0780['render'](),_0x18b487({'emitter':_0x288bc1,'activator':()=>_0x4c0780['isVisible'],'contextElements':[_0x4c0780['element'],_0x288bc1['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x5d8ea7['config']['get']('presenceList.container')['appendChild'](_0x288bc1['element']),this['_bodyCollection']=new _0x2000c1(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x288bc1;}['_handleUserAdd'](_0x332ddc){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x332ddc['isMe'])return;const _0x83860=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x83860&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x21f0a7=_0x332ddc['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x332ddc,_0x21f0a7);}['_handleUserRemove'](_0x266bb4){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x266bb4['id'])&&(this['currentDisplayedUsers']['remove'](_0x266bb4['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x100327 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x100327['id']))return void this['currentDisplayedUsers']['add'](_0x100327,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x5bbef1=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x5bbef1['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x515b07}=this['presenceDropdownView'];_0x515b07['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x2603b4=>{if(!_0x5bbef1['displayMe']&&_0x2603b4['isMe'])return null;const _0x3eae13=new k(this['context']['locale'],_0x2603b4,!!_0x5bbef1['onClick']);return _0x5bbef1['onClick']&&this['listenTo'](_0x3eae13,'execute',()=>{_0x5bbef1['onClick'](_0x2603b4,_0x3eae13['element']);}),_0x3eae13;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x515b07['focus'](),_0x515b07['checkIfScrollable']();const _0x286aa2=(_0x432347,_0x3429a4)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x3429a4();};_0x515b07['keystrokes']['set']('Esc',_0x286aa2),_0x515b07['keystrokes']['set']('Shift+Tab',_0x286aa2),_0x515b07['keystrokes']['set']('Tab',(_0x1763fb,_0x1a74ce)=>{!function(_0x15eefa){const _0x541498=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0xfd1d22=>_0xfd1d22+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x2f9614=[...document['body']['querySelectorAll'](_0x541498)]['filter'](_0x30c900=>_0x30c900===document['activeElement']||_0x30c900['offsetWidth']+_0x30c900['offsetHeight']>0x0)['sort']((_0x4d1e95,_0x5e8810)=>(_0x4d1e95['tabIndex']||0x0)-(_0x5e8810['tabIndex']||0x0)),_0x55737b=_0x2f9614['indexOf'](_0x15eefa),_0x22a269=_0x2f9614[(_0x55737b+0x1)%_0x2f9614['length']];_0x22a269&&_0x22a269['focus']();}(this['view']['element']),this['hideDropdown'](),_0x1a74ce();}),_0x515b07['focusTracker']['add'](this['view']['element']),_0x515b07['focusTracker']['on']('change:isFocused',(_0x46ea8e,_0x3d946d,_0x5a1473)=>{_0x5a1473||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class s extends _0x5b046d{static get['requires'](){return[i,r];}static get['pluginName'](){return'PresenceList';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{a as CloudServicesCommentsAdapter,u as CloudServicesRevisionHistoryAdapter,f as CloudServicesTrackChangesAdapter,s as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,g as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
|
|
23
|
+
import{ContextPlugin as _0x184910,Plugin as _0x1759aa,PendingActions as _0x1a2a4e,Context as _0x3236ce}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x6e4419,CKEditorError as _0xc87a33,Collection as _0x47caef,global as _0x9ebb7c,version as nt,uid as _0x3bc747,KeystrokeHandler as _0x5e0fa}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x143451,View as _0xf48b3b,ListView as _0x2f6580,ListItemView as st,LabelView as ot,BalloonPanelView as _0x4a300f,clickOutsideHandler as _0x72d790,BodyCollection as _0x53f6bf}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as at,History as _0x3af4a3,NoOperation as _0x14a6cc,InsertOperation as _0x5501f9,MarkerOperation as _0x49c112,RootAttributeOperation as _0x55223d,transformSets as _0x70a411,OperationFactory as _0x1b1b79}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as ht,WEB_SOCKET_GATEWAY_STATES as _0x13cf18,CollaborativeEditingService as _0xee38f1,User as lt,CommentsService as _0x3dffdf,TrackChangesService as et,RevisionHistoryService as _0xef0510,EditorService as _0x262950}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x192ea2,UserView as rt}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x224220}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0x200d06}from'lodash-es';class c extends _0x184910{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
|
|
24
|
+
((()=>ht)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x143451];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x433f10){super(_0x433f10),this['set']('state',_0x13cf18['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x6e4419);}['init'](){const _0x5f2c41=this['context'],_0x58f5ef=_0x5f2c41['plugins']['get']('CloudServices'),_0x1bcc51=_0x5f2c41['plugins']['get'](_0x143451);if(!_0x58f5ef['token'])throw new _0xc87a33('websocketgateway-missing-token',this);if(!_0x58f5ef['webSocketUrl'])throw new _0xc87a33('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'](_0x58f5ef['token'],_0x58f5ef['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x444744=>{if(this['connection']=_0x444744,this['bind']('state')['to'](_0x444744,'state',this,'_isBrowserOffline',(_0x290c77,_0x3d9a23)=>('connected'!==_0x290c77&&(this['_shouldPluginsReconnect']=!0x0),_0x3d9a23||_0x290c77!==_0x13cf18['CONNECTED']?_0x13cf18['DISCONNECTED']:this['state']==_0x13cf18['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x13cf18['CONNECTING']):_0x13cf18['CONNECTED'])),this['connection']['on']('error',(_0x358efe,_0x2fdf89)=>{if('limitExceeded'!==_0x2fdf89['code'])throw console['error'](_0x2fdf89),new _0xc87a33('cloudservices-init',null,{'originalError':_0x2fdf89});_0x1bcc51['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'});}),!_0x444744['me'])return new Promise(_0x46492a=>_0x444744['on']('change:me',_0x46492a));})['catch'](_0x145dd5=>{throw console['error'](_0x145dd5),new _0xc87a33('cloudservices-init',null,{'originalError':_0x145dd5});});}['addToReconnectionStack'](_0x4fe549){if('function'!=typeof _0x4fe549['reconnect'])throw new _0xc87a33('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x4fe549))throw new _0xc87a33('websocketgateway-plugin-already-registered',this,{'name':_0x4fe549['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x4fe549);}['removeFromReconnectionStack'](_0x1cee46){this['_reconnectionStack']['delete'](_0x1cee46);}['isInReconnectionStack'](_0x50b903){return this['_reconnectionStack']['has'](_0x50b903);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x5bdb9b=>_0x5bdb9b['reconnect']())))['then'](()=>this['state']=_0x13cf18['CONNECTED'])['catch'](_0x491f8d=>{throw console['error'](_0x491f8d),new _0xc87a33('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x13cf18['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x184910{['channelSessions'];['channelConnectedUsers'];['allConnectedUsers'];['_registeredSessions'];['_uniqueUsersCount'];['_users'];static get['pluginName'](){return'Sessions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[c,_0x192ea2];}constructor(_0x4858c1){super(_0x4858c1),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x47caef(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x192ea2);}['init'](){const _0x1cb216=this['context']['plugins']['get'](c);this['listenTo'](_0x1cb216,'change:state',(_0x397bac,_0x4c3f47,_0x5844f8)=>{if('connected'!==_0x5844f8)this['channelSessions']['forEach'](_0x25e61d=>_0x25e61d['clear']()),this['channelConnectedUsers']['forEach'](_0x365ff7=>_0x365ff7['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x2dcf72,_0x788f82]of this['_registeredSessions'])for(const _0xd11364 of _0x788f82)this['_handleSessionAdd'](_0x2dcf72,_0xd11364);}}),this['_createUser'](_0x1cb216['connection']['me'],!0x0);}['register'](_0x4496b7,_0xa2edae){if(this['_registeredSessions']['has'](_0x4496b7))throw new _0xc87a33('sessions-register-already-registered',null,{'channelId':_0x4496b7});this['_registeredSessions']['set'](_0x4496b7,_0xa2edae),this['channelSessions']['set'](_0x4496b7,new _0x47caef()),this['channelConnectedUsers']['set'](_0x4496b7,new _0x47caef()),this['listenTo'](_0xa2edae,'add',(_0x2593dc,_0x13514c)=>this['_handleSessionAdd'](_0x4496b7,_0x13514c)),this['listenTo'](_0xa2edae,'remove',(_0x3e84cb,_0x592ac6)=>this['_handleSessionRemove'](_0x4496b7,_0x592ac6));for(const _0x4c7a2c of _0xa2edae)this['_handleSessionAdd'](_0x4496b7,_0x4c7a2c);}['unregister'](_0x29110e){if(!this['_registeredSessions']['has'](_0x29110e))throw new _0xc87a33('sessions-unregister-not-exist',null,{'channelId':_0x29110e});const _0x224f97=this['_registeredSessions']['get'](_0x29110e);this['stopListening'](_0x224f97);for(const _0x3bf2ed of _0x224f97)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x29110e,_0x3bf2ed);this['_registeredSessions']['delete'](_0x29110e),this['channelSessions']['delete'](_0x29110e),this['channelConnectedUsers']['delete'](_0x29110e);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x5efe26){for(const _0x43de56 of this['channelSessions']['values']())for(const _0x7edda2 of _0x43de56)if(_0x7edda2['id']===_0x5efe26)return _0x7edda2['user'];}['getUserSessions'](_0x12c515,_0x573373){const _0x2176bf=_0x573373?[this['channelSessions']['get'](_0x573373)]:this['channelSessions']['values'](),_0x297b6e=new Set();for(const _0x3c3d79 of _0x2176bf)for(const _0xa8538a of _0x3c3d79)_0xa8538a['user']['id']===_0x12c515['id']&&_0x297b6e['add'](_0xa8538a['id']);return _0x297b6e;}['getUserRole'](_0x1f76cd){for(const _0x4c1b47 of this['channelSessions']['values']())for(const _0x57e839 of _0x4c1b47)if(_0x57e839['user']===_0x1f76cd)return _0x57e839['role'];}['_handleSessionAdd'](_0x4c0d09,_0x5c441e){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x322aa7=_0x5c441e['user'],_0x1581c7=this['_users']['getUser'](_0x322aa7['id'])||this['_createUser'](_0x322aa7),_0x236b7d=Object['assign']({},_0x5c441e,{'user':_0x1581c7});this['channelSessions']['get'](_0x4c0d09)['add'](_0x236b7d);const _0x4eda7a=this['channelConnectedUsers']['get'](_0x4c0d09);_0x4eda7a['has'](_0x1581c7['id'])||_0x4eda7a['add'](_0x1581c7),this['allConnectedUsers']['has'](_0x1581c7['id'])||this['allConnectedUsers']['add'](_0x1581c7,_0x1581c7['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x4c0d09,{'channelId':_0x4c0d09,'session':_0x236b7d});}['_handleSessionRemove'](_0x59c076,_0x3444de){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x4594ec=this['channelConnectedUsers']['get'](_0x59c076),_0x52e264=_0x3444de['user'];_0x52e264['id']&&(this['channelSessions']['get'](_0x59c076)['remove'](_0x3444de['id']),_0x4594ec['has'](_0x52e264['id'])&&!this['getUserSessions'](_0x52e264,_0x59c076)['size']&&_0x4594ec['remove'](_0x52e264['id']),this['allConnectedUsers']['get'](_0x52e264['id'])&&!this['getUserSessions'](_0x52e264)['size']&&this['allConnectedUsers']['remove'](_0x52e264['id']));}['_createUser'](_0x2a17ca,_0x5b5a4c){const _0x558bd6=this['_users']['addUser'](_0x2a17ca);return _0x5b5a4c&&this['_users']['defineMe'](_0x2a17ca['id']),_0x558bd6['orderNumber']=this['_uniqueUsersCount']++,_0x558bd6;}}class K extends _0x1759aa{['_domEmitter']=new(_0x6e4419())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x31903a=this['editor'],_0x1eb5ea=_0x31903a['plugins']['get'](i);_0x31903a['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x1f850e,{writer:_0x372403})=>function(_0x4aebef,_0x276a4e,_0x1c46f5,_0x3f88ef){const _0x317465=_0x4aebef['markerName']['split'](':')[0x2],_0xb480e5=_0x1c46f5['getUserBySessionId'](_0x317465);if(!_0xb480e5||_0x317465===_0x1c46f5['mySessionId'])return;if(!_0x3f88ef['model']['schema']['checkChild'](_0x4aebef['markerRange']['start'],'$text'))return;const _0x35473c={'class':'ck-user__marker\x20'+_0xb480e5['color']['getMarkerClass'](),'data-name':_0xb480e5['name'],'data-session-id':_0x317465},_0x159503=_0x3f88ef['model']['markers']['get'](_0x4aebef['markerName']),_0x2889a7=_0x159503['getStart'](),_0x4bf041=_0x2889a7['nodeAfter'],_0x11285b=_0x3f88ef['model']['schema'];if(_0x4bf041&&_0x11285b['isObject'](_0x4bf041)&&_0x11285b['isInline'](_0x4bf041)&&!_0x3f88ef['model']['markers']['get']('user:range:'+_0x317465)['getRange']()['isCollapsed'])return;const _0x202f65=_0x2889a7['parent'];return _0x3f88ef['model']['schema']['isLimit'](_0x202f65)&&!_0x3f88ef['model']['hasContent'](_0x202f65)&&(_0x35473c['contenteditable']=!0x1),function(_0x2d41f2,_0x13e820,_0x3d93ce){const _0x520245=_0x2d41f2['createUIElement']('span',_0x13e820);return _0x2d41f2['setCustomProperty']('userPositionMarker',!0x0,_0x520245),_0x520245['render']=function(_0x1fa8fb){const _0x37082b=this['toDomElement'](_0x1fa8fb);return _0x37082b['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>'+_0x3d93ce['name']+'</span>',_0x37082b['addEventListener']('mouseenter',()=>{_0x37082b['classList']['add']('ck-user__marker_hovered');}),_0x37082b['addEventListener']('mouseleave',()=>{_0x37082b['classList']['remove']('ck-user__marker_hovered');}),_0x37082b;},_0x520245['isSimilar']=function(_0x7de484){return!(!this['getCustomProperty']('userPositionMarker')||!_0x7de484['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x7de484['getAttribute']('data-session-id'));},_0x520245;}(_0x276a4e,_0x35473c,_0xb480e5);}(_0x1f850e,_0x372403,_0x1eb5ea,_0x31903a)}),_0x31903a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x477882=>function(_0x3479c6,_0x1863e9){const _0x17f34d=_0x3479c6['markerName']['split'](':')[0x2];if(_0x17f34d===_0x1863e9['mySessionId'])return null;const _0x2185e6=_0x1863e9['getUserBySessionId'](_0x17f34d);if(!_0x2185e6)return{'id':_0x17f34d,'classes':[]};return{'id':_0x17f34d,'classes':['ck-user__selection',_0x2185e6['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x17f34d},'priority':0x7d0+_0x2185e6['orderNumber']};}(_0x477882,_0x1eb5ea)}),function(_0x281261){const _0x5476f6=_0x281261['model'],_0x40e5ce=new Map(),_0x378db9=_0x281261['plugins']['get'](i);_0x5476f6['markers']['on']('update:user:range',(_0x219b66,_0x25bbfd,_0x101db0,_0x223af9)=>{if(!_0x223af9&&_0x40e5ce['get'](_0x25bbfd['name']))return _0x40e5ce['get'](_0x25bbfd['name'])['detach'](),void _0x40e5ce['delete'](_0x25bbfd['name']);const _0x24ecf8=_0x25bbfd['name']['split'](':')[0x2];if(_0x24ecf8===_0x378db9['mySessionId'])return;const _0x4d79f4='user:position:'+_0x24ecf8;_0x5476f6['markers']['has'](_0x4d79f4)&&_0x281261['editing']['reconvertMarker'](_0x4d79f4),_0x25bbfd['on']('change:range',(_0x3813b4,_0x127c35,_0x266893)=>{if('$graveyard'!=_0x127c35['root']['rootName']&&'$graveyard'==_0x25bbfd['getRange']()['root']['rootName']&&!_0x40e5ce['has'](_0x25bbfd['name'])){const _0x131d3e=_0x5476f6['schema']['getNearestSelectionRange'](_0x266893['deletionPosition']);if(_0x131d3e){const _0x4d7e47=at['fromRange'](_0x131d3e);_0x40e5ce['set'](_0x25bbfd['name'],_0x4d7e47),_0x4d7e47['on']('change:range',(_0x38c582,_0x1fe20d,_0x3dd83a)=>{if('$graveyard'==_0x4d7e47['root']['rootName']){const _0x24893a=_0x5476f6['schema']['getNearestSelectionRange'](_0x3dd83a['deletionPosition']);_0x24893a?(_0x4d7e47['start']=_0x24893a['start'],_0x4d7e47['end']=_0x24893a['end']):(_0x40e5ce['delete'](_0x25bbfd['name']),_0x4d7e47['detach']());}});}}});}),_0x5476f6['document']['on']('change',()=>{_0x40e5ce['size']>0x0&&_0x5476f6['enqueueChange']({'isUndoable':!0x1},_0x8d2f83=>{for(const [_0x40d0c0,_0x3801cc]of _0x40e5ce)'$graveyard'==_0x5476f6['markers']['get'](_0x40d0c0)['getRange']()['root']['rootName']&&(te(_0x40d0c0['split'](':')[0x2],_0x3801cc['toRange'](),_0x5476f6,_0x8d2f83),_0x3801cc['detach']());_0x40e5ce['clear']();});});}(_0x31903a),this['_domEmitter']['listenTo'](_0x9ebb7c['document'],'keydown',(_0x5c333e,{key:_0x1a550d})=>{'Escape'===_0x1a550d&&function(_0x4ec1dc){_0x4ec1dc['editing']['view']['change'](_0x55eb46=>{for(const _0x304e05 of _0x4ec1dc['model']['markers']){if(!_0x304e05['name']['startsWith']('user:position'))continue;const _0x3cd3a9=_0x4ec1dc['editing']['mapper']['markerNameToElements'](_0x304e05['name']);if(_0x3cd3a9){for(const _0x58e44a of _0x3cd3a9)_0x55eb46['removeClass']('ck-user__marker_hovered',_0x58e44a);}}});}(_0x31903a);},{'useCapture':!0x0});}['afterInit'](){const _0x595f16=this['editor'],_0x33d9fa=_0x595f16['commands']['get']('undo');_0x33d9fa&&_0x595f16['model']['on']('applyOperation',(_0x5dd3e4,_0x532372)=>{const _0x2af26f=_0x532372[0x0];if('marker'!=_0x2af26f['type']||!_0x2af26f['name']['startsWith']('user:'))return;const _0x5c75c3=_0x2af26f['batch'];_0x33d9fa['_createdBatches']['has'](_0x5c75c3)&&(_0x2af26f['newRange']=_0x2af26f['oldRange']?_0x595f16['model']['createRange'](_0x2af26f['oldRange']['start'],_0x2af26f['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x350919=this['editor'],_0xf34750=_0x350919['model']['document'],_0x3a392f=_0x350919['plugins']['get'](i);_0x350919['model']['enqueueChange']({'isUndoable':!0x1},_0x337c40=>{const _0x4b3fbb='user:range:'+_0x3a392f['mySessionId'],_0x2cbef2='user:position:'+_0x3a392f['mySessionId'],_0x571458=_0x350919['model']['markers']['has'](_0x4b3fbb);_0x350919['editing']['view']['hasDomSelection']?te(_0x3a392f['mySessionId'],_0xf34750['selection']['getFirstRange'](),_0x350919['model'],_0x337c40):_0x571458&&(_0x337c40['removeMarker'](_0x4b3fbb),_0x337c40['removeMarker'](_0x2cbef2));});}}function te(_0x1dbebf,_0x5a5352,_0x12b835,_0x2af3f9){const _0x3b3288='user:range:'+_0x1dbebf,_0x49386a='user:position:'+_0x1dbebf,_0x1559a2=_0x5a5352['getContainedElement']();let _0x4e7b12=_0x5a5352['start'];_0x1559a2&&_0x1559a2['is']('element','tableCell')&&(_0x4e7b12=function(_0x285df6,_0x4b80d0){for(const _0x2f705d of _0x285df6['getPositions']())if(_0x4b80d0['schema']['checkChild'](_0x2f705d,'$text'))return _0x2f705d;}(_0x5a5352,_0x12b835),_0x5a5352=_0x2af3f9['createRange'](_0x4e7b12));const _0x419151=_0x2af3f9['createRange'](_0x4e7b12);_0x12b835['markers']['has'](_0x3b3288)?(_0x2af3f9['updateMarker'](_0x3b3288,{'range':_0x5a5352}),_0x2af3f9['updateMarker'](_0x49386a,{'range':_0x419151})):(_0x2af3f9['addMarker'](_0x3b3288,{'range':_0x5a5352,'usingOperation':!0x0}),_0x2af3f9['addMarker'](_0x49386a,{'range':_0x419151,'usingOperation':!0x0}));}function J(_0x293db5,_0x5ad137,_0x2e1a8e){const _0x44274f=_0x293db5['t'],t=_0x293db5['t'];switch(_0x5ad137){case'PENDING_ACTION_SENDING_DATA':return t({'string':'Sending\x20data\x20to\x20the\x20server.','id':'PENDING_ACTION_SENDING_DATA'});case'The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20local\x20document\x20and\x20server\x20document\x20differ\x20and\x20merging\x20them\x20can\x20cause\x20unexpected\x20behavior.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':return t('The\x20last\x20saved\x20version\x20of\x20the\x20document\x20does\x20not\x20match\x20the\x20local\x20version.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.');case'Synchronization\x20issue':return t('Synchronization\x20issue');case'Connected\x20users\x20list\x20dropdown\x20menu':return t('Connected\x20users\x20list\x20dropdown\x20menu');case'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':return t('Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)');case'Connected\x20users\x20list':return t('Connected\x20users\x20list');case'PENDING_ACTION_REVISION_HISTORY':return _0x44274f({'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'},_0x2e1a8e);default:return'';}}let Y=0x1;class l extends _0x1759aa{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
+
((()=>_0xee38f1)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,K,_0x1a2a4e,_0x192ea2,_0x143451];}static get['pluginName'](){return'RealTimeCollaborationClient';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}get['cloudDocumentVersion'](){return this['_lastServerVersion']+this['_offset'];}get['_lastServerVersion'](){return this['serverHistory']['version']-this['_offset'];}get['lastSyncVersion'](){const _0x1aee4a=this['serverHistory']['getOperations']();for(let _0x4c89ff=_0x1aee4a['length']-0x1;_0x4c89ff>=0x0;_0x4c89ff--){const _0x199d5d=_0x1aee4a[_0x4c89ff];if(!this['_disconnectionOperations']['has'](_0x199d5d))return _0x199d5d['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x16e7b6){if(super(_0x16e7b6),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x3af4a3(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0xc87a33('collaboration-missing-channelid',this);const _0x19b8ad=_0x16e7b6['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x19b8ad,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x224220(),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 it(this['_disconnectionOperations']);}['init'](){const _0x237da5=this['editor'],_0x47ffd7=_0x237da5['plugins']['get'](_0x192ea2),_0x3f67f2=_0x237da5['plugins']['get'](c);this['listenTo'](_0x47ffd7,'getOperationAuthor',(_0xd66112,_0x4a6b69)=>{const _0x14c739=_0x4a6b69[0x0];_0x14c739['_authorId']&&(_0xd66112['return']=_0x47ffd7['getUser'](_0x14c739['_authorId']),_0xd66112['stop']()),null===_0x14c739['_authorId']&&(_0xd66112['return']=null,_0xd66112['stop']());},{'priority':'high'}),this['listenTo'](_0x237da5['model']['document']['selection'],'change:range',(_0x121954,_0x26ece8)=>{_0x26ece8['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x237da5['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x237da5['model']['on']('applyOperation',(_0xa89b42,_0x104be8)=>{const _0x317e80=_0x104be8[0x0];_0x317e80['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x317e80),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x3f67f2,'state',this,'_hasSynchronizationProblem',(_0x1e6212,_0x5a61dc)=>'connected'===_0x1e6212&&!_0x5a61dc),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x237da5['disableReadOnlyMode']('rtc-offline'):_0x237da5['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x237da5['disableReadOnlyMode']('rtc-offline'):_0x237da5['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x19fd7d=this['editor']['plugins']['get'](i),_0x40346e=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x19fd7d['unregister'](this['_channelId']);const _0x932e66=await this['_service']['reconnect'](_0x40346e['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x932e66)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x1af937=await this['_service']['getConnectedSessions']();_0x19fd7d['register'](this['_channelId'],_0x1af937),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x166963){if(function(_0x39d367){return'404'===_0x39d367['code'];}(_0x166963)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x7faaf0){return'409'===_0x7faaf0['code'];}(_0x166963)){const _0x9e8fb1=J(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'](_0x9e8fb1);}else{if(!(_0x166963 instanceof Z))throw _0x166963;this['_handleReconnectionError']();}}}}['destroy'](){const _0x32c812=this['editor']['plugins']['get'](c),_0x31b1d2=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x31b1d2['channelSessions']['has'](this['_channelId'])&&_0x31b1d2['unregister'](this['_channelId']),_0x32c812['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x11c56f){if(this['sessionId']!==_0x11c56f['sessionId']&&this['_lastSyncedOperationId']!==_0x11c56f['lastOperationId'])throw new Z();return this['sessionId']=_0x11c56f['sessionId'],this['_handleServerResponse']([],{..._0x11c56f,'wereChangesApplied':!0x1,'data':_0x11c56f['data']},'reconnect');}async['_connectService'](_0x49fbe1,_0x1a1420=!0x1){const {connection:_0x5c5a13}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x5c5a13,this['_channelId'])['then'](_0x4c2dbb=>this['_initSessionsHandling'](_0x4c2dbb))['catch'](_0x3ca8ec=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x3ca8ec);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x31a1cc,_0x1bc512)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x1bc512);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x301b02=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x49fbe1);this['_isPendingUpdate']=!0x0;const _0x5a5a54=await this['_service']['connect'](_0x5c5a13,this['_compressOperations'](_0x49fbe1),_0x301b02);if(this['sessionId']=_0x5a5a54['sessionId'],_0x1a1420){if(!_0x5a5a54['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x5a5a54['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x49fbe1,_0x5a5a54,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x5a5a54,_0x49fbe1);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x4a54d1=this['editor']['plugins']['get'](i),_0x21bbaa=this['editor']['plugins']['get'](K),_0xb1bf07=_0x4a54d1['channelSessions']['get'](this['_channelId']);_0xb1bf07&&_0xb1bf07['length']>0x1?_0x21bbaa['createUserMarkerOperations']():this['listenTo'](_0x4a54d1,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x4a54d1['channelSessions']['get'](this['_channelId'])['length']&&_0x21bbaa['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x3791a9,_0x5a7fc2,_0x49fbcb,_0x1fcd8d){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x5a7fc2){const _0x4d76d6=this['_decompressOperations'](_0x49fbcb,_0x1fcd8d);await this['_fetchMissingUsers'](_0x4d76d6),this['_handleExternalOperations'](_0x4d76d6,_0x5a7fc2,_0x49fbcb['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x505d4d}=this['editor'];let _0xd6d5cb;try{_0xd6d5cb=await this['_service']['getDocumentDetails']();}catch(_0x433c2d){const _0x25f134=J(_0x505d4d,'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'](_0x25f134);}const _0x447181=_0xd6d5cb['currentDocumentSession']||_0xd6d5cb['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x447181['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x56afd2=J(_0x505d4d,'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'](_0x56afd2);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x311b76){const _0x315e53=this['editor']['plugins']['get'](i);this['listenTo'](_0x315e53,'sessionAdd:'+this['_channelId'],(_0x31b618,{session:_0xbf8c5d})=>{if(_0xbf8c5d['id']===_0x315e53['mySessionId']){_0x31b618['off']();const _0x39523e=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x599f23=_0xbf8c5d['permissions'];_0x39523e&&_0x39523e['isEnabled']&&(_0x599f23=_0x599f23['filter'](_0x725148=>'document:write'!==_0x725148)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x599f23,this['_channelId']);}}),_0x315e53['register'](this['_channelId'],_0x311b76);}['_initThrowingOnDataSet'](){const _0x17dc81=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x9a96c9)=>{if(!_0x9a96c9[_0x9a96c9['length']-0x1]['suppressErrorInCollaboration'])throw new _0xc87a33('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x17dc81['apply'](this['editor']['data'],_0x9a96c9);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x24bf6d,[_0x1daf7d])=>{if(this['_document']['version'])throw new _0xc87a33('realtimecollaborationclient-init-document-already-initialized',this);_0x24bf6d['stop'](),this['_setPendingAction']();const _0x53e69c=this['editor']['config']['get']('rootsAttributes'),_0x5a48e8=this['_getOperationsFromInitData'](_0x1daf7d,_0x53e69c);0x0==_0x5a48e8['length']&&_0x5a48e8['push'](new _0x14a6cc(0x0)),_0x24bf6d['return']=this['_connectService'](_0x5a48e8)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x2aea3f=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x2aea3f))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x106c60,[_0x5435b9,_0x35a344])=>{_0x106c60['stop']();const _0x42420b=this['editor']['model']['document']['getRoot'](_0x5435b9);if(!this['_knownRootNames']['has'](_0x5435b9)){const _0x723b30=_0x35a344&&_0x35a344['data']?_0x35a344['data']:'',_0x3cc06e=_0x35a344&&_0x35a344['attributes']?_0x35a344['attributes']:{};await this['_loadRoot'](_0x5435b9,_0x723b30,_0x3cc06e);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x42420b['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x42420b);});},{'priority':'high'});}async['_fetchMissingUsers'](_0xaeaa3a){const _0x4fe78=this['editor']['plugins']['get'](_0x192ea2),{connection:_0x1f50b2}=this['editor']['plugins']['get'](c),_0x1f53a7=new Set();for(const _0x3d49d0 of _0xaeaa3a){const _0x3f01e6=_0x3d49d0['_authorId'];_0x3f01e6&&!_0x4fe78['getUser'](_0x3f01e6)&&_0x1f53a7['add'](_0x3f01e6);}if(0x0===_0x1f53a7['size'])return;const _0x142f9a=await lt['getMany'](_0x1f50b2,Array['from'](_0x1f53a7));for(const _0x33b8f9 of _0x142f9a)_0x4fe78['getUser'](_0x33b8f9['id'])||_0x4fe78['addUser'](_0x33b8f9);}['_getOperationsFromInitData'](_0x1f6715,_0xb86d27={}){const _0x11029f=this['editor']['model'],_0x5a46fb=[];let _0x503bfd=0x0;const _0x356af3='string'==typeof _0x1f6715?{'main':_0x1f6715}:_0x1f6715;for(const _0x87d50 of Object['keys'](_0x356af3)){if(!this['_document']['roots']['has'](_0x87d50))throw new _0xc87a33('realtimecollaborationclient-init-non-existent-root',this);const _0x1fdb6f=this['editor']['data']['parse'](_0x356af3[_0x87d50]),_0x3274e9=this['_document']['getRoot'](_0x87d50),_0x5335a0=new _0x5501f9(_0x11029f['createPositionAt'](_0x3274e9,0x0),_0x1fdb6f,_0x503bfd++);_0x5a46fb['push'](_0x5335a0);for(const [_0x342e38,_0x2fcd4c]of _0x1fdb6f['markers']){const _0x4e1d50=_0x11029f['createRange'](_0x11029f['createPositionFromPath'](_0x3274e9,_0x2fcd4c['start']['path']['slice']()),_0x11029f['createPositionFromPath'](_0x3274e9,_0x2fcd4c['end']['path']['slice']())),_0xdadd9e=new _0x49c112(_0x342e38,null,_0x4e1d50,_0x11029f['markers'],!0x0,_0x503bfd++);_0x5a46fb['push'](_0xdadd9e);}}if(_0xb86d27)for(const [_0x289911,_0x3d2324]of Object['entries'](_0xb86d27)){const _0x247613=_0x11029f['document']['getRoot'](_0x289911);if(!_0x247613)throw new _0xc87a33('multi-root-editor-root-attributes-no-root',null);for(const [_0x37045d,_0x5ee06b]of Object['entries'](_0x3d2324))if(null!==_0x5ee06b){const _0x29b5cc=new _0x55223d(_0x247613,_0x37045d,null,_0x5ee06b,_0x503bfd++);_0x5a46fb['push'](_0x29b5cc);}}return _0x5a46fb;}async['_loadRoot'](_0x4cfa86,_0x2f1554,_0x26adfa){this['_getOperationsFromInitData']({[_0x4cfa86]:_0x2f1554},{[_0x4cfa86]:_0x26adfa})['forEach']((_0x2ab392,_0x33ce43)=>{_0x2ab392['baseVersion']=this['_document']['version']+_0x33ce43,_0x2ab392['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x2ab392);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x4398ef,_0x3c2e10){let _0xd88d47;this['_offset']=_0x4398ef['offset'];const _0x3d00c7=_0x4398ef['wereChangesApplied']&&!_0x4398ef['initData'],_0x91aee1=_0x3d00c7?0x0:_0x4398ef['data']['baseVersion'];if(_0x3c2e10['forEach'](_0x52dc4c=>{_0x52dc4c['_isInit']=!0x0,_0x52dc4c['createdAt']=_0x4398ef['sessionCreatedAt'],_0x52dc4c['_authorId']=null;}),_0x3d00c7)_0xd88d47=_0x3c2e10,this['_applyOperationsSet'](_0xd88d47,_0x3d00c7);else{if(_0x4398ef['initData']){const _0x61e27a=this['_getOperationsFromInitData'](_0x4398ef['initData']);this['_document']['history']['version']=-_0x61e27a['length'],_0x61e27a['forEach'](_0xc89a34=>{_0xc89a34['baseVersion']-=_0x61e27a['length'],_0xc89a34['createdAt']=_0x4398ef['sessionCreatedAt'],_0xc89a34['_isInit']=!0x0,_0xc89a34['_authorId']=null;}),this['_applyOperationsSet'](_0x61e27a,!0x0),this['serverHistory']['version']=-_0x61e27a['length']+this['_offset'],this['_updateServerHistory'](_0x61e27a);}this['_document']['history']['version']=_0x91aee1,_0xd88d47=this['_decompressOperations'](_0x4398ef['data'],_0x4398ef['metadata']),await this['_fetchMissingUsers'](_0xd88d47),this['_applyOperationsSet'](_0xd88d47,_0x3d00c7);}_0x4398ef['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0xd88d47,_0x4398ef['lastOperationId']),this['_lastSyncedOperationId']=_0x4398ef['lastOperationId']),this['serverHistory']['version']=_0x91aee1+this['_offset'],this['_updateServerHistory'](_0xd88d47),_0x3c2e10['filter'](_0x33ebbb=>{const _0x2302da=this['_getAffectedRoot'](_0x33ebbb);return _0x2302da&&!this['_knownRootNames']['has'](_0x2302da);})['forEach']((_0x1edf25,_0x482eb2)=>{_0x1edf25['baseVersion']=this['_document']['version']+_0x482eb2,this['_saveOperationInBuffer'](_0x1edf25);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x37792a,_0x26d3c0,_0xf66df1){throw this['_isPendingUpdate']=!0x0,_0x26d3c0&&console['error'](_0x26d3c0),_0xf66df1&&this['editor']['enableReadOnlyMode']('realtimecollaborationclient-error'),new _0xc87a33(_0x37792a,this['editor']);}['_saveOperationInBuffer'](_0x2de75a){this['_knownOperations']['has'](_0x2de75a)||(this['_knownOperations']['add'](_0x2de75a),this['_bufferedOperations']['push'](_0x2de75a),this['_pendingAction']||'marker'==_0x2de75a['type']&&!_0x2de75a['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x2b7eab=!0x1){!_0x2b7eab&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x36f69e=>{_0x36f69e&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x14ebf7=>{this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,function(_0x291cb7){return _0x291cb7['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x291cb7['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x291cb7['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x14ebf7)||this['_crash'](_0x14ebf7['message'],_0x14ebf7,!0x0);});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x5c6c1b=>{this['on']('change:_isPendingUpdate',()=>{_0x5c6c1b();});});}async['_sendBufferedOperations'](){const _0x16f5e7=this['editor']['plugins']['get'](K);if(this['_shouldSendSelectionUpdate']()&&(_0x16f5e7['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x1053bb=[...this['_bufferedOperations']];for(const _0x4bc921 of _0x1053bb)_0x4bc921['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x4bc921);const _0x3a39ea=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x1053bb),_0x5ba64e=Y++,_0x25f585=this['_compressOperations'](_0x1053bb),_0x440a16=await this['_service']['sendOperations'](_0x25f585,_0x25f585['baseVersion'],_0x3a39ea);try{return await this['_handleServerResponse'](_0x1053bb,_0x440a16,_0x5ba64e);}catch(_0x16d57b){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x16d57b);}}async['_handleServerResponse'](_0x24e937,_0x2dfb2c,_0x30074f){if('error'in _0x2dfb2c)throw _0x2dfb2c['error'];let _0x30ad12=!0x1;if(_0x2dfb2c['wereChangesApplied']){_0x2dfb2c['lastOperationId']&&(this['_lastSyncedOperationId']=_0x2dfb2c['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x1e5901=>!_0x24e937['includes'](_0x1e5901));for(const _0x5c1ada of _0x24e937)_0x5c1ada['createdAt']='lastOperationAcceptedAt'in _0x2dfb2c&&_0x2dfb2c['lastOperationAcceptedAt']||void 0x0;tt(_0x24e937,_0x2dfb2c['version']-_0x24e937['length']),this['_updateServerHistory'](_0x24e937);const _0x49422d=_0x24e937['filter'](_0x56a89c=>{if(!_0x56a89c['_isInit'])return!0x1;const _0x348950=this['_getAffectedRoot'](_0x56a89c);return _0x348950&&!this['_knownRootNames']['has'](_0x348950);});tt(_0x49422d,this['_document']['version']),this['_applyOperationsSet'](_0x49422d),_0x30ad12=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x1ebfd9=this['_decompressOperations'](_0x2dfb2c['data'],_0x2dfb2c['metadata'])['filter'](_0x590a28=>_0x590a28['baseVersion']>=this['_lastServerVersion']);_0x1ebfd9['forEach'](_0x54adcb=>this['_addKnownRoot'](_0x54adcb)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x4a1822=>!_0x4a1822['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x4a1822))),this['_bufferedOperations']['length']&&tt(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x1ebfd9),_0x30ad12=this['_handleExternalOperations'](_0x1ebfd9,_0x2dfb2c['version'],_0x2dfb2c['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x30ad12?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0xe0774e,_0x42b625,_0x24aa2a){try{const _0x1f7709={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x756471,operationsB:_0x4a0826,originalOperations:_0x5f2b5d}=_0x70a411(_0xe0774e,this['_bufferedOperations'],_0x1f7709);tt(_0x756471,this['_document']['version']),tt(_0x4a0826,_0x42b625);for(const _0x424863 of _0x756471){const _0x237f22=_0x5f2b5d['get'](_0x424863);_0x424863['_authorId']=_0x237f22?_0x237f22['_authorId']:null;}_0x24aa2a&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0xe0774e,_0x24aa2a),this['_lastSyncedOperationId']=_0x24aa2a),this['_bufferedOperations']=[..._0x4a0826],this['_applyOperationsSet'](_0x756471),this['_updateServerHistory'](_0xe0774e);}catch(_0x3cdf50){return console['error'](_0x3cdf50),!0x1;}return!0x0;}['_applyOperationsSet'](_0x29d59b,_0x2c5b03=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x3d589f=>{for(const _0x19dfaf of _0x29d59b)this['_knownOperations']['add'](_0x19dfaf),this['_addKnownRoot'](_0x19dfaf),_0x3d589f['batch']['addOperation'](_0x19dfaf),this['editor']['model']['applyOperation'](_0x19dfaf);});}['_addKnownRoot'](_0x473038){const _0x4a2877=this['_getAffectedRoot'](_0x473038);_0x4a2877&&this['_knownRootNames']['add'](_0x4a2877);}['_getAffectedRoot'](_0x5461ed){let _0x310fa3,_0xa43446;switch(_0x5461ed['type']){case'insert':_0x310fa3=_0x5461ed['position']['root'];break;case'marker':if(_0xa43446=_0x5461ed['newRange'],!_0xa43446)return null;_0x310fa3=_0xa43446['root'];break;case'addRootAttribute':_0x310fa3=_0x5461ed['root'];break;case'addRoot':_0x310fa3=_0x5461ed['affectedSelectable'];break;case'move':_0x310fa3=_0x5461ed['targetPosition']['root'];break;default:return null;}return _0x310fa3['rootName'];}['_updateServerHistory'](_0x15d7cf){_0x15d7cf['forEach'](_0x5b4abc=>{const _0x304cc2=_0x5b4abc['clone']();_0x304cc2['_authorId']=_0x5b4abc['_authorId'],_0x304cc2['_isInit']=!!_0x5b4abc['_isInit'],_0x304cc2['createdAt']=_0x5b4abc['createdAt'],_0x304cc2['baseVersion']+=this['_offset'],_0x5b4abc['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x304cc2),this['serverHistory']['addOperation'](_0x304cc2);});}['_handleReconnectionError'](_0x8663f2){const _0x1750d9=this['editor']['plugins']['get']('Notification'),_0xb350b4=this['editor']['locale'];_0x8663f2||(_0x8663f2=J(_0xb350b4,'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.')),_0x1750d9['showWarning'](_0x8663f2,{'title':J(_0xb350b4,'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'](_0x1a2a4e)['add'](J(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x1a2a4e)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x204ed5){const _0x347101=_0x204ed5['map'](_0x32023a=>_0x32023a['toJSON']());return this['_compressor']['compress'](_0x347101);}['_decompressOperations'](_0x4206c2,_0x114cdf){return this['_compressor']['decompress'](_0x4206c2)['map']((_0xe13f06,_0x24af00)=>{const _0x5e7069='init'==_0x114cdf[_0x24af00]['type'];if('InsertOperation'==_0xe13f06['__className']){const _0x997b2c=_0xe13f06['position']['root'];!this['_document']['getRoot'](_0x997b2c)&&(this['_document']['createRoot']('$root',_0x997b2c)['_isAttached']=!0x1);}const _0x4f6e76=_0x1b1b79['fromJSON'](_0xe13f06,this['_document']);return _0x4f6e76['wasUndone']=_0xe13f06['wasUndone'],_0x4f6e76['_isInit']=_0x5e7069,_0x4f6e76['_authorId']=_0x5e7069?null:_0x114cdf[_0x24af00]['userId'],_0x4f6e76['_isDisconnection']='cs:removeUser'===_0x114cdf[_0x24af00]['type'],_0x4f6e76['createdAt']=_0x114cdf[_0x24af00]['createdAt'],_0x4f6e76;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x474ba5=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x474ba5&&_0x474ba5['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class Z extends Error{}function tt(_0x23ee10,_0x273643){for(const _0x2ec0f4 of _0x23ee10)_0x2ec0f4['baseVersion']=_0x273643++;}class it{['_ignoredOperations'];['_operationToId'];constructor(_0x33d6d8){this['_ignoredOperations']=_0x33d6d8,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0x37cbcc){let _0x25e94a=_0x37cbcc['length'];for(;_0x25e94a--;){const _0x661467=_0x37cbcc[_0x25e94a];if(!this['_ignoredOperations']['has'](_0x661467)){if(!this['_operationToId']['has'](_0x661467)){const _0x449e7d=_0x3bc747()['slice'](0x1,0x12);this['_operationToId']['set'](_0x661467,_0x449e7d);}return this['_operationToId']['get'](_0x661467);}}}['setIdForTheLastOperation'](_0x4a3541,_0x2542fc){if(!_0x2542fc)return;let _0x23d002=_0x4a3541['length'];for(;_0x23d002--;){const _0x57aa49=_0x4a3541[_0x23d002];this['_ignoredOperations']['has'](_0x57aa49)||this['_operationToId']['set'](_0x57aa49,_0x2542fc);}}}class n extends _0x1759aa{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x184910{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>_0x3dffdf)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x192ea2];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b87dd){super(_0x1b87dd),this['_services']=new Map();}async['init'](){const _0x5b8970=this['context'],_0x3e52ab=_0x5b8970['plugins']['get']('CommentsRepository');if(_0x5b8970['plugins']['get'](c)['addToReconnectionStack'](this),_0x3e52ab['adapter']={'addCommentThread':async({channelId:_0x52f0a7,threadId:_0xb878ab,comments:_0x7df471,resolvedAt:_0x3fe917,resolvedBy:_0x29703b,context:_0x28c1b1,attributes:_0xdc2855})=>{const _0x6bccf0=await this['_getService'](_0x52f0a7)['addCommentThread']({'commentThreadId':_0xb878ab,'comments':_0x7df471['map'](_0x4a8283=>function(_0x2264f8,_0x4a0d54,_0x567364){return{'commentThreadId':_0x567364,'commentId':_0x2264f8['commentId'],'userId':_0x2264f8['authorId'],'content':_0x2264f8['content'],'documentId':_0x4a0d54,'createdAt':_0x2264f8['createdAt'],'attributes':_0x2264f8['attributes']||{}};}(_0x4a8283,_0x52f0a7,_0xb878ab)),'resolvedAt':_0x3fe917,'resolvedBy':_0x29703b,'context':_0x28c1b1,'attributes':_0xdc2855})['catch'](dt);return{'threadId':_0x6bccf0['commentThreadId'],'comments':_0x6bccf0['comments']};},'getCommentThread':async({channelId:_0x4260b4,threadId:_0x27e473})=>{const _0xe64bc7=await this['_getService'](_0x4260b4)['getCommentThread'](_0x27e473)['catch'](dt);return _0xe64bc7['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0xe64bc7]),{'threadId':_0xe64bc7['commentThreadId'],'comments':_0xe64bc7['comments']['map'](S),'context':_0xe64bc7['context'],'resolvedAt':_0xe64bc7['resolvedAt'],'resolvedBy':_0xe64bc7['resolvedBy'],'attributes':_0xe64bc7['attributes']||{}});},'updateCommentThread':async({channelId:_0x570ebe,threadId:_0x4c17c7,context:_0x29c453,unlinkedAt:_0x12a95a,attributes:_0x28cd5a})=>this['_getService'](_0x570ebe)['updateCommentThread']({'commentThreadId':_0x4c17c7,'context':_0x29c453,'attributes':_0x28cd5a,'unlinkedAt':_0x12a95a})['catch'](B)['catch'](dt),'resolveCommentThread':async({channelId:_0x2c4796,threadId:_0x3a1f6c})=>{const _0xd94700=await this['_getService'](_0x2c4796)['resolveCommentThread'](_0x3a1f6c)['catch'](B)['catch'](dt);return{'threadId':_0xd94700['commentThreadId'],'resolvedAt':_0xd94700['resolvedAt'],'resolvedBy':_0xd94700['resolvedBy']};},'reopenCommentThread':async({channelId:_0x15abe1,threadId:_0x441754})=>this['_getService'](_0x15abe1)['reopenCommentThread'](_0x441754)['catch'](B)['catch'](dt),'removeCommentThread':({channelId:_0x260c66,threadId:_0xb222ef})=>this['_getService'](_0x260c66)['removeCommentThread'](_0xb222ef)['catch'](B)['catch'](dt),'addComment':({channelId:_0x17d408,threadId:_0x1335d9,commentId:_0x5e7b84,content:_0x177131,attributes:_0x3ce191})=>this['_getService'](_0x17d408)['addComment'](_0x1335d9,_0x5e7b84,_0x177131,_0x3ce191)['catch'](dt),'updateComment':({channelId:_0x5a34dd,threadId:_0x5d3cda,commentId:_0x47bea1,content:_0x5e4f43,attributes:_0x1ef3fb})=>this['_getService'](_0x5a34dd)['updateComment'](_0x5d3cda,_0x47bea1,_0x5e4f43,_0x1ef3fb)['catch'](B)['catch'](dt),'removeComment':({channelId:_0x5ec136,threadId:_0x4da382,commentId:_0x145912})=>this['_getService'](_0x5ec136)['removeComment'](_0x4da382,_0x145912)['catch'](B)['catch'](dt)},_0x5b8970 instanceof _0x3236ce){const _0x4c8ed1=_0x5b8970['config']['get']('collaboration.channelId'),_0x238a2b=_0x5b8970['plugins']['get'](i);await this['_setUpService'](_0x4c8ed1);const _0x58ac52=await this['_services']['get'](_0x4c8ed1)['getConnectedSessions']();this['listenTo'](_0x238a2b,'sessionAdd:'+_0x4c8ed1,(_0x1acb9e,{session:_0x397d4a})=>{_0x397d4a['id']===_0x238a2b['mySessionId']&&(_0x1acb9e['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x397d4a['permissions'],_0x4c8ed1));}),_0x238a2b['register'](_0x4c8ed1,_0x58ac52);}}async['_setUpService'](_0x3f9abf){if(this['_services']['has'](_0x3f9abf))throw new _0xc87a33('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x3f9abf});const _0x577d0f=this['context']['plugins']['get']('CommentsRepository'),_0x4b8b42=new a['CommentsService'](_0x3f9abf);this['_services']['set'](_0x3f9abf,_0x4b8b42),this['listenTo'](_0x4b8b42,'commentThreadAdded',(_0x3d5145,_0x3224e9)=>{const {commentThreadId:_0x119f9c,documentId:_0x25e9a9,context:_0x5719e9,attributes:_0x2f3a55,resolvedAt:_0x2e67ca,resolvedBy:_0x532aa4,comments:_0x107191}=_0x3224e9;_0x577d0f['getCommentThread'](_0x119f9c)||_0x577d0f['addCommentThread']({'threadId':_0x119f9c,'channelId':_0x25e9a9,'comments':_0x107191?_0x107191['map'](S):[],'context':_0x5719e9,'attributes':_0x2f3a55,'resolvedAt':_0x2e67ca,'resolvedBy':_0x532aa4,'isFromAdapter':!0x0});}),this['listenTo'](_0x4b8b42,'commentThreadUpdated',(_0x1f28b3,{commentThreadId:_0x5565ad,documentId:_0x15c36e,context:_0x1d2a81,unlinkedAt:_0x427c85,attributes:_0x5f3033})=>{_0x577d0f['getCommentThread'](_0x5565ad)&&_0x577d0f['updateCommentThread']({'threadId':_0x5565ad,'channelId':_0x15c36e,'context':_0x1d2a81,'unlinkedAt':_0x427c85,'attributes':_0x5f3033,'isFromAdapter':!0x0});}),this['listenTo'](_0x4b8b42,'commentThreadResolved',(_0x4f2243,{commentThreadId:_0x44dfcc,resolvedBy:_0x3e3625,resolvedAt:_0x183c47})=>{const _0x1a0faa=_0x577d0f['getCommentThread'](_0x44dfcc);_0x1a0faa&&_0x1a0faa['resolve']({'resolvedBy':_0x3e3625,'resolvedAt':_0x183c47,'isFromAdapter':!0x0});}),this['listenTo'](_0x4b8b42,'commentThreadReopened',(_0x476ca4,{commentThreadId:_0x282e46})=>{const _0x33dc9e=_0x577d0f['getCommentThread'](_0x282e46);_0x33dc9e&&_0x33dc9e['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x4b8b42,'commentThreadRemoved',(_0x520b4f,{commentThreadId:_0x363aa3})=>{const _0x5be92f=_0x577d0f['getCommentThread'](_0x363aa3);_0x5be92f&&_0x5be92f['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x4b8b42,'commentAdded',(_0x53d680,_0x1a4223)=>{const _0xeb72ca=_0x1a4223['commentThreadId'],_0x410237=_0x577d0f['getCommentThread'](_0xeb72ca);_0x410237&&_0x410237['addComment']({...S(_0x1a4223),'isFromAdapter':!0x0});}),this['listenTo'](_0x4b8b42,'commentUpdated',(_0x2f7fac,{commentThreadId:_0x2e5d98,commentId:_0x14aa1e,content:_0x3cb14b,attributes:_0x581d01})=>{const _0x7afb76=_0x577d0f['getCommentThread'](_0x2e5d98);if(_0x7afb76){const _0x57d9db=_0x7afb76['getComment'](_0x14aa1e);_0x57d9db&&_0x57d9db['update']({'content':_0x3cb14b,'attributes':_0x581d01,'isFromAdapter':!0x0});}}),this['listenTo'](_0x4b8b42,'commentRemoved',(_0x2d45e0,{commentThreadId:_0x31d634,commentId:_0xd1f841})=>{const _0x489396=_0x577d0f['getCommentThread'](_0x31d634);if(_0x489396){const _0x5cae18=_0x489396['getComment'](_0xd1f841);_0x5cae18&&_0x5cae18['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x3f9abf);}['destroy'](){if(this['context']instanceof _0x3236ce){const _0x2b4e6e=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x2b4e6e);}}['_terminateService'](_0x424b73){if(!this['_services']['has'](_0x424b73))throw new _0xc87a33('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x424b73});this['_getService'](_0x424b73)['disconnect'](),this['_services']['delete'](_0x424b73);}async['reconnect'](){for(const _0x2d2f4a of this['_services']['keys']())await this['_connectService'](_0x2d2f4a);if(this['context']instanceof _0x3236ce){const _0x397602=this['context']['config']['get']('collaboration.channelId'),_0x57e3a0=this['context']['plugins']['get'](i);_0x57e3a0['unregister'](_0x397602);const _0xbfebef=await this['_services']['get'](_0x397602)['getConnectedSessions']();_0x57e3a0['register'](_0x397602,_0xbfebef);}}async['_connectService'](_0x5e071f){const {connection:_0x8a8186}=this['context']['plugins']['get'](c),_0x49fd9c=this['context']['plugins']['get']('CommentsRepository'),_0x345cf5=this['_services']['get'](_0x5e071f),_0x57b6e7=await _0x345cf5['connect'](_0x8a8186);await this['_fetchMissingUsersForThreads'](_0x57b6e7);const _0x16ba96=new Set(Array['from'](_0x49fd9c['getCommentThreads']({'channelId':_0x5e071f}),_0x435df2=>_0x435df2['id']));for(const _0x32f72b of _0x57b6e7)_0x32f72b['deletedAt']||_0x16ba96['delete'](_0x32f72b['commentThreadId']);for(const _0x272c11 of _0x16ba96)_0x49fd9c['getCommentThread'](_0x272c11)['remove']({'isFromAdapter':!0x0});for(const _0x2a4a81 of _0x57b6e7){let _0x60cad=_0x49fd9c['getCommentThread'](_0x2a4a81['commentThreadId']);const {commentThreadId:_0xab628b,context:_0x7c85ad,attributes:_0x2d40cb,resolvedBy:_0x1bdc25,resolvedAt:_0x46a4a2,unlinkedAt:_0x6e5288,deletedAt:_0x4564f2}=_0x2a4a81;if(_0x4564f2)continue;_0x60cad||(_0x60cad=_0x49fd9c['addCommentThread']({'channelId':_0x5e071f,'threadId':_0xab628b,'context':_0x7c85ad,'attributes':_0x2d40cb||{},'resolvedBy':_0x1bdc25,'resolvedAt':_0x46a4a2,'unlinkedAt':_0x6e5288,'isFromAdapter':!0x0}));const _0x25417a=new Set(Array['from'](_0x60cad['comments'],_0x315f47=>_0x315f47['id']));for(const _0x42b5f9 of _0x2a4a81['comments'])_0x25417a['delete'](_0x42b5f9['commentId']);for(const _0x33ab53 of _0x25417a)_0x60cad['getComment'](_0x33ab53)['remove']({'isFromAdapter':!0x0});for(const _0x45b52a of _0x2a4a81['comments']){const _0x4a891b=_0x60cad['getComment'](_0x45b52a['commentId']);_0x4a891b?_0x4a891b['content']!==_0x45b52a['content']&&_0x4a891b['update']({'content':_0x45b52a['content'],'isFromAdapter':!0x0}):_0x60cad['addComment'](Object['assign'](S(_0x45b52a),{'isFromAdapter':!0x0}));}}}['_getService'](_0x592f49){if(!this['_services']['has'](_0x592f49))throw new _0xc87a33('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x592f49});return this['_services']['get'](_0x592f49);}async['_fetchMissingUsersForThreads'](_0x4cd41e){const _0x57c716=this['context']['plugins']['get'](_0x192ea2),{connection:_0x667c9f}=this['context']['plugins']['get'](c),_0xd8efe=new Set();for(const {resolvedBy:_0x5321a5,comments:_0x65a919}of _0x4cd41e){_0x5321a5&&!_0x57c716['getUser'](_0x5321a5)&&_0xd8efe['add'](_0x5321a5);for(const {userId:_0x461d2a}of _0x65a919)_0x57c716['getUser'](_0x461d2a)||_0xd8efe['add'](_0x461d2a);}if(0x0===_0xd8efe['size'])return;const _0x574d14=await lt['getMany'](_0x667c9f,Array['from'](_0xd8efe));for(const _0x4d1108 of _0x574d14)_0x57c716['getUser'](_0x4d1108['id'])||_0x57c716['addUser'](_0x4d1108);}}async function B(_0x179c6c){if('404'!==_0x179c6c['code'])throw _0x179c6c;}function dt(_0x51354a){if((_0x2c30a6=_0x51354a)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x2c30a6['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x2c30a6['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x2c30a6;throw _0x51354a;}function S(_0x4fecb7){return{'threadId':_0x4fecb7['commentThreadId'],'commentId':_0x4fecb7['commentId'],'content':_0x4fecb7['content'],'createdAt':_0x4fecb7['createdAt'],'authorId':_0x4fecb7['userId'],'attributes':_0x4fecb7['attributes']||{}};}class f extends _0x1759aa{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
+
((()=>et)());['_bufferedRequests'];['_trackChangesService'];static get['requires'](){return[a,'TrackChangesEditing',c];}static get['pluginName'](){return'CloudServicesTrackChangesAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e2f08){super(_0x2e2f08);const _0x2cea3c=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x2cea3c);}['init'](){const _0x3f928e=this['editor']['plugins']['get'](c),_0x2a6af6=this['editor']['plugins']['get']('TrackChangesEditing');return _0x2a6af6['adapter']={'getSuggestion':async _0x51ede3=>{await this['_waitForServiceReady']();const _0x1bbc2b=await this['_trackChangesService']['get'](_0x51ede3)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x1bbc2b]),_0x1bbc2b;},'addSuggestion':async({id:_0x4299e6,type:_0x347630,data:_0x243506,originalSuggestionId:_0x4e7609,attributes:_0x1a0b7f})=>{await this['_waitForServiceReady']();const _0x240ad9={'id':_0x4299e6,'type':_0x347630,'data':_0x243506,'originalSuggestionId':_0x4e7609,'attributes':_0x1a0b7f},_0x55f301=await this['_trackChangesService']['add'](_0x4299e6,_0x347630,_0x243506,_0x4e7609,_0x1a0b7f)['catch'](_0x577717=>{if(ut(_0x577717))return new Promise(_0x483449=>{this['_bufferedRequests']['set'](_0x4299e6,{'resolve':_0x483449,'suggestionData':_0x240ad9});});throw _0x577717;});return this['_bufferedRequests']['delete'](_0x4299e6),_0x55f301;},'updateSuggestion':async(_0x2f5775,_0x1bc945)=>{if(await this['_waitForServiceReady'](),'open'!==_0x1bc945['state'])return this['_trackChangesService']['update'](_0x2f5775,_0x1bc945)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x3cba9c,_0x4b624b)=>{_0x2a6af6['hasSuggestion'](_0x4b624b['id'])&&(_0x2a6af6['getSuggestion'](_0x4b624b['id'])['attributes']=_0x4b624b['attributes']);}),this['_trackChangesService']['connect'](_0x3f928e['connection'])['then'](_0x57fc27=>(_0x3f928e['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x57fc27)['then'](()=>{for(const _0x4e4a96 of _0x57fc27){_0x2a6af6['addSuggestionData'](_0x4e4a96)['_saved']=!0x0;}})));}async['reconnect'](){const _0x220973=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x1eb749}=this['editor']['plugins']['get'](c),_0x315612=await this['_trackChangesService']['connect'](_0x1eb749);await this['_fetchMissingUsersForThreads'](_0x315612);for(const {suggestionData:_0x1230cf,resolve:_0x2b74d3}of this['_bufferedRequests']['values']()){let _0x1bdd89=_0x315612['find'](_0x187d6b=>_0x187d6b['id']===_0x1230cf['id']);_0x1bdd89||(_0x1bdd89=await this['_trackChangesService']['add'](_0x1230cf['id'],_0x1230cf['type'],_0x1230cf['data'],_0x1230cf['originalSuggestionId'])),_0x2b74d3(_0x1bdd89);}for(const _0x4d9961 of _0x315612)_0x220973['hasSuggestion'](_0x4d9961['id'])||_0x220973['addSuggestionData'](_0x4d9961);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x299543=>{this['listenTo'](this['_trackChangesService'],'connected',_0x4f1107=>{_0x4f1107['off'](),_0x299543();});});}async['_fetchMissingUsersForThreads'](_0x5bc485){const _0x5b3c42=this['editor']['plugins']['get'](_0x192ea2),{connection:_0x3f7236}=this['editor']['plugins']['get'](c),_0xc027ca=new Set();for(const {authorId:_0x1aa899}of _0x5bc485)_0x5b3c42['getUser'](_0x1aa899)||_0xc027ca['add'](_0x1aa899);if(0x0===_0xc027ca['size'])return;const _0x347989=await lt['getMany'](_0x3f7236,Array['from'](_0xc027ca));for(const _0x5eb672 of _0x347989)_0x5b3c42['getUser'](_0x5eb672['id'])||_0x5b3c42['addUser'](_0x5eb672);}}function R(_0x37e4ff){if(ut(_0x37e4ff))return new Promise(()=>{});throw _0x37e4ff;}function ut(_0x374b33){return _0x374b33['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x374b33['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x1759aa{static get['requires'](){return['Comments',a,n,c];}static get['pluginName'](){return'RealTimeCollaborativeComments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x1322f7=this['editor']['plugins']['get'](c),_0x2aebfb=this['editor']['plugins']['get']('CommentsEditing'),_0x2062ca=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x1322f7,'change:state',(_0x6adbb8,_0x381fac,_0xdd7531)=>{_0x2aebfb['isThreadsLoadingPaused']='connected'!==_0xdd7531;});}),this['listenTo'](_0x1322f7,'change:state',(_0xe9af1,_0x317271,_0x4c0e09)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0x4c0e09);}),_0x2062ca['_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 _0x1759aa{static get['requires'](){return[m,f,'TrackChanges'];}static get['pluginName'](){return'RealTimeCollaborativeTrackChanges';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class u extends _0x1759aa{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
|
|
28
|
+
((()=>_0xef0510)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x192ea2];}static get['pluginName'](){return'CloudServicesRevisionHistoryAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x43bbff){super(_0x43bbff);const _0x33024b=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x33024b);}async['init'](){const _0x479113=this['editor']['plugins']['get'](l),_0x35b141=_0x479113['serverHistory'],_0x1da36a=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x35b141,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x479113['sessionId']});const _0x5134f8=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x1a8fde=await _0x262950['isBundleUploaded'](_0x1da36a['connection'],_0x5134f8);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x3c09d6})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x3c09d6)),'updateRevisions':async _0x10be0d=>{await this['_waitForServiceReady']();const _0x441d76=this['_revisionTracker']['currentRevision'];if(_0x1a8fde&&0x1===_0x10be0d['length']&&_0x10be0d[0x0]['id']===_0x441d76['id'])return _0x10be0d;for(const _0x1bcb9c of _0x10be0d)_0x1bcb9c['id']===_0x441d76['id']&&(_0x1bcb9c['isEmptyCurrent']=_0x1bcb9c['fromVersion']===_0x1bcb9c['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x10be0d,this['_lastRequestId'])['then'](_0x28f88c=>(this['_lastRequestId']=_0x28f88c,_0x10be0d))['catch'](_0x3e27c7=>{if(U(_0x3e27c7)||'400'===_0x3e27c7['code']&&void 0x0!==_0x3e27c7['data']['wrongRequestId']){for(const _0xf41dd of _0x10be0d){!this['_revisionTracker']['repository']['getRevision'](_0xf41dd['id'])||this['_revisionTracker']['_bufferUpdate'](_0xf41dd['id'],_0xf41dd,!0x1);}if(U(_0x3e27c7))throw _0x3e27c7;return _0x10be0d;}throw _0x3e27c7;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x36d5c7,{revisionsData:_0x3fa5c7,requestId:_0x323c3b})=>{Math['max'](..._0x3fa5c7['map'](_0x1c95a7=>_0x1c95a7['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x3fa5c7,_0x323c3b);}):this['_handleRevisionsUpdate'](_0x3fa5c7,_0x323c3b);});const {revisions:_0x69aa8f,requestId:_0x581ded}=await this['_revisionHistoryService']['connect'](_0x1da36a['connection']);_0x1da36a['addToReconnectionStack'](this),this['_lastRequestId']=_0x581ded,await this['_fetchMissingUsers'](_0x69aa8f);for(const _0xb83222 of _0x69aa8f)this['_revisionTracker']['addRevisionData'](_0xb83222);this['listenTo'](_0x479113,'change:_isConnected',(_0x2bc9a6,_0xef3746,_0x489f1e)=>{_0x489f1e&&(this['_oldOffset']=_0x479113['_offset'],_0x2bc9a6['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x1da36a,'state',_0x4a32fb=>_0x4a32fb===_0x13cf18['CONNECTED']);}async['reconnect'](){const _0x1618dc=this['editor']['plugins']['get'](c),_0x1ea1cb=this['editor']['plugins']['get'](l),_0x25a2b1=async()=>{const _0xff1d1e=this['_revisionTracker']['currentRevision'],_0x654764=_0xff1d1e['id'],_0x217398=_0x654764!==_0x1ea1cb['sessionId'];if(_0x217398){const _0xff3933=_0x1ea1cb['_offset']-this['_oldOffset'],_0xc1c48d=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0xff1d1e['toVersion']+_0xff3933!==_0xc1c48d){const _0xa34f26=_0xff1d1e['fromVersion']+_0xff3933,_0x228dae=this['editor']['plugins']['get'](_0x192ea2),_0x3aad7b=this['_revisionTracker']['buildRevisionData']({'revision':_0xff1d1e,'from':_0xa34f26,'to':_0xc1c48d});_0x3aad7b['id']=_0xff1d1e['id'];const _0x1ff834=_0x3aad7b['authorsIds']['map'](_0x4f6ccb=>_0x228dae['getUser'](_0x4f6ccb));_0xff1d1e['_update']({..._0x3aad7b,'authors':_0x1ff834},!0x0),this['_revisionTracker']['_bufferUpdate'](_0xff1d1e['id'],_0x3aad7b,!0x0);}this['_revisionTracker']['_startingVersion']=_0xc1c48d,(_0xff1d1e['toVersion']===_0xff1d1e['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x654764)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x654764),this['_revisionTracker']['_createCurrentRevision'](_0xc1c48d));}const {revisions:_0x186355,requestId:_0x2f12d4}=await this['_revisionHistoryService']['reconnect'](_0x1618dc['connection'],this['_lastRequestId']);_0x217398&&_0x186355['length']>0x0?_0x1ea1cb['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x186355),this['_handleRevisionsUpdate'](_0x186355,_0x2f12d4),this['_revisionTracker']['sendBufferedUpdates']());};return _0x1ea1cb['_isConnected']?_0x25a2b1():new Promise((_0x5ba21e,_0x9b5147)=>{_0x1ea1cb['once']('change:_isConnected',()=>{_0x25a2b1()['then'](_0x5ba21e)['catch'](_0x9b5147);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x5754d5=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x520555=>{_0x520555['off'](),_0x5754d5();});});}['_getLatestVersionFromServerOperations'](){const _0x3a537c=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x526623 of _0x3a537c)if('marker'!==_0x526623['type']||_0x526623['affectsData'])return _0x526623['baseVersion']+0x1;}['_getLatestVersion'](){const _0x4a97e0=this['editor']['plugins']['get'](l);return new Promise(_0x29bd47=>{_0x4a97e0['_isPendingUpdate']?_0x4a97e0['once']('change:_isPendingUpdate',()=>{_0x29bd47(this['_getLatestVersionFromServerOperations']());}):_0x29bd47(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x1b840e,_0x17ddbc){const _0x5e1aa8=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x17ddbc;for(const _0x500cb1 of _0x1b840e){const _0x350543=_0x5e1aa8['getRevision'](_0x500cb1['id']);if(_0x350543){if((_0x500cb1['fromVersion']||_0x500cb1['toVersion'])&&(_0x500cb1['diffData']=null),_0x350543===this['_revisionTracker']['currentRevision']){const _0x4da128=Math['max'](_0x350543['toVersion'],_0x500cb1['toVersion']),_0x32900a=Math['max'](_0x350543['fromVersion'],_0x500cb1['fromVersion']);let _0x56477d;_0x350543['toVersion']===_0x500cb1['toVersion']&&_0x350543['fromVersion']===_0x500cb1['fromVersion']?(_0x56477d=!0x0,this['_preventResendingRevisionData'](_0x500cb1)):_0x500cb1['toVersion']===_0x4da128&&_0x500cb1['fromVersion']===_0x32900a?_0x56477d=!0x1:(_0x350543['toVersion']===_0x4da128&&_0x350543['fromVersion']===_0x32900a||this['_fixRevision']({'revision':_0x350543,'from':_0x32900a,'to':_0x4da128}),_0x56477d=!0x0),_0x56477d&&(delete _0x500cb1['fromVersion'],delete _0x500cb1['toVersion'],delete _0x500cb1['diffData'],delete _0x500cb1['createdAt'],delete _0x500cb1['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x500cb1),this['_preventResendingRevisionData'](_0x500cb1);}else this['_revisionTracker']['addRevisionData'](_0x500cb1);}const _0x3ffd01=_0x5e1aa8['getRevisions']();_0x3ffd01['reverse']();for(let _0x50d81f=0x0;_0x50d81f<_0x3ffd01['length']-0x1;_0x50d81f++){const _0x150a4e=_0x3ffd01[_0x50d81f],_0x4936fb=_0x3ffd01[_0x50d81f+0x1];if(_0x150a4e['fromVersion']<_0x4936fb['toVersion']){const _0x21f68c=_0x4936fb['toVersion'],_0x5ec0df=Math['max'](_0x21f68c,_0x150a4e['toVersion']);this['_fixRevision']({'revision':_0x150a4e,'from':_0x21f68c,'to':_0x5ec0df});}}}['_fixRevision']({revision:_0x3bb9f8,from:_0x4e7eff,to:_0x2edb0d}={}){const _0x5d150f=this['editor']['plugins']['get'](_0x192ea2),_0x26070d=this['_revisionTracker']['buildRevisionData']({'revision':_0x3bb9f8,'from':_0x4e7eff,'to':_0x2edb0d});_0x26070d['authors']=_0x26070d['authorsIds']['map'](_0x6937ec=>_0x5d150f['getUser'](_0x6937ec)),_0x3bb9f8['_update'](_0x26070d);}['_preventResendingRevisionData'](_0x4b9680){const _0x49321b={};_0x49321b['id']=_0x4b9680['id'];for(const _0x1841ac of Object['keys'](_0x4b9680))'id'!==_0x1841ac&&(_0x49321b[_0x1841ac]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x49321b['id'],_0x49321b,!0x0);}async['_fetchMissingUsers'](_0x158547){const _0x37a420=this['editor']['plugins']['get'](_0x192ea2),{connection:_0x235c80}=this['editor']['plugins']['get'](c),_0x1721b2=new Set();for(const _0x593f2a of _0x158547){for(const _0x2cde6a of _0x593f2a['authorsIds'])_0x1e21c8(_0x2cde6a);_0x593f2a['creatorId']&&_0x1e21c8(_0x593f2a['creatorId']);}if(0x0===_0x1721b2['size'])return;const _0x4db726=await lt['getMany'](_0x235c80,Array['from'](_0x1721b2));for(const _0x504aa0 of _0x4db726)_0x37a420['getUser'](_0x504aa0['id'])||_0x37a420['addUser'](_0x504aa0);function _0x1e21c8(_0x10e952){_0x37a420['getUser'](_0x10e952)||_0x1721b2['add'](_0x10e952);}}}function U(_0x498b03){return _0x498b03['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x498b03['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x498b03['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x1759aa{static get['requires'](){return['RevisionHistory',u,n];}static get['pluginName'](){return'RealTimeCollaborativeRevisionHistory';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class ts extends _0xf48b3b{constructor(_0x1af8ad){super(_0x1af8ad);const _0x542d0e=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x542d0e['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x542d0e['to']('usersCount',_0x51f8de=>J(_0x1af8ad,'CONNECTED_USERS',_0x51f8de))}]});}}class es extends _0xf48b3b{['items'];['keystrokes'];constructor(_0x1c03c1){super(_0x1c03c1);const _0x297846=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x5e0fa(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x297846['if']('hasPopup'),'aria-expanded':_0x297846['to']('isExpanded',_0x40cc70=>this['hasPopup']&&String(_0x40cc70)),'aria-label':_0x297846['to']('hasPopup',_0x1392a7=>J(_0x1c03c1,_0x1392a7?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x297846['to']('hasPopup',_0x6585a4=>!!_0x6585a4&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x297846['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x21143b,_0x2735f5,_0x3813bd)=>{this['element']&&(_0x3813bd?this['element']['setAttribute']('aria-expanded',String(this['isExpanded'])):this['element']['removeAttribute']('aria-expanded'));});}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['keystrokes']['listenTo'](this['element']);}}class L extends _0xf48b3b{['counterView'];['inlineListView'];constructor(_0x320d33){super(_0x320d33);const _0x52ff64=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x320d33),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x31dca3 of this['inlineListView']['items'])_0x31dca3['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',_0x52ff64['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0xf48b3b{['listWrapperView'];constructor(_0x54236d,_0x47820c){super(_0x54236d),this['listWrapperView']=new ft(_0x54236d,_0x47820c),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':J(_0x54236d,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class ft extends _0x2f6580{constructor(_0x3fa01b,_0xc5d77){super(_0x3fa01b);const _0xfa3032=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0xc5d77?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0xfa3032['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0xfa3032['to']('role'),'aria-label':_0xfa3032['to']('ariaLabel'),'aria-labelledby':_0xfa3032['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x9ebb7c['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x5c285d=this['element'];_0x5c285d&&(this['_isScrollable']=Math['max'](_0x5c285d['scrollHeight'],_0x5c285d['clientHeight'])>0.8*window['innerHeight']);}}class k extends st{['userView'];constructor(_0x5688a4,_0x402ba0,_0x5e4a00){super(_0x5688a4);const _0x45cd5a=this['bindTemplate'];this['userView']=new rt(_0x5688a4,_0x402ba0);const _0x1ecfc9={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x402ba0['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x402ba0['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x402ba0['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x5e4a00&&(_0x1ecfc9['tag']='button',_0x1ecfc9['on']={'click':_0x45cd5a['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1ecfc9);}['focus'](){this['element']['focus']();}}class y extends _0xf48b3b{['userView'];['markerView'];constructor(_0x5619fc,_0x4e10ff,_0x134ed5){super(_0x5619fc);const _0x5e7e33=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new rt(_0x5619fc,_0x4e10ff),this['markerView']=new ct(_0x5619fc,_0x4e10ff);const _0x93d828=new ot(_0x5619fc);_0x93d828['template']['tag']='span',_0x93d828['text']=_0x4e10ff['name'];const _0x36102f={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x5e7e33['to']('isFocusable',_0x3f9332=>!!_0x3f9332&&0x0),'aria-labelledby':_0x93d828['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x5e7e33['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x5e7e33['to']('hasTooltip',_0x3e9a4f=>!_0x3e9a4f),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x93d828]};_0x134ed5&&(_0x36102f['tag']='button',_0x36102f['on']={'click':_0x5e7e33['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x36102f);}}class ct extends _0xf48b3b{constructor(_0x339d00,_0x47245c){super(_0x339d00),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x47245c['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x184910{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x17b297){super(_0x17b297),this['context']['config']['define']('presenceList',A);const _0xeb98fe=_0x17b297['config']['get']('presenceList.collapseAt');if('number'!=typeof _0xeb98fe)throw new _0xc87a33('presencelist-collapseat-invalid-format',this);if(_0xeb98fe<0x1)throw new _0xc87a33('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x47caef(),this['balloonPanelView']=new _0x4a300f(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x3a5c97 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x3a5c97);this['listenTo'](this['_allConnectedUsers'],'add',(_0x688c16,_0x3ea2cc)=>{this['_handleUserAdd'](_0x3ea2cc);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x21bdc0,_0x5dad73)=>{this['_handleUserRemove'](_0x5dad73);});}['_createView'](){const _0x5767a1=this['context'],_0x37c0ea=new L(this['context']['locale']),_0x5898ff=this['balloonPanelView'];if(!_0x200d06(_0x5767a1['config']['get']('presenceList.container')))throw new _0xc87a33('presencelist-missing-container',this);return _0x37c0ea['counterView']['bind']('usersCount')['to'](this),_0x37c0ea['bind']('isCollapsed')['to'](this,'usersCount',_0xae2619=>{const {collapseAt:_0x285697,displayMe:_0x5f3ff9}=_0x5767a1['config']['get']('presenceList'),_0x2ffbd3=_0xae2619>=_0x285697;return _0x37c0ea['counterView']['isHidden']=!(0x1==_0xae2619&&_0x5f3ff9||_0x2ffbd3),_0x2ffbd3||this['hideDropdown'](),_0x2ffbd3;}),_0x37c0ea['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x1e5328=>{const _0x13168d=_0x5767a1['config']['get']('presenceList'),_0x4c1a24=new y(_0x5767a1['locale'],_0x1e5328,!!_0x13168d['onClick']);return _0x4c1a24['bind']('hasTooltip')['to'](_0x37c0ea,'isCollapsed',_0x5e1b3b=>!_0x5e1b3b),_0x4c1a24['bind']('isFocusable')['to'](_0x37c0ea,'isCollapsed',_0x9c1bfa=>!_0x9c1bfa),_0x13168d['onClick']&&this['listenTo'](_0x4c1a24,'execute',()=>{this['view']['isCollapsed']||_0x13168d['onClick'](_0x1e5328,_0x4c1a24['element']);}),_0x4c1a24;}),this['listenTo'](_0x37c0ea['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x37c0ea['inlineListView']['keystrokes']['set']('Enter',(_0x2208ad,_0x52feb2)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x52feb2());}),_0x37c0ea['render'](),_0x5898ff['render'](),_0x72d790({'emitter':_0x37c0ea,'activator':()=>_0x5898ff['isVisible'],'contextElements':[_0x5898ff['element'],_0x37c0ea['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x5767a1['config']['get']('presenceList.container')['appendChild'](_0x37c0ea['element']),this['_bodyCollection']=new _0x53f6bf(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x37c0ea;}['_handleUserAdd'](_0x376af8){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x376af8['isMe'])return;const _0x3c0caa=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x3c0caa&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x59afa8=_0x376af8['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x376af8,_0x59afa8);}['_handleUserRemove'](_0x4fe1cb){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x4fe1cb['id'])&&(this['currentDisplayedUsers']['remove'](_0x4fe1cb['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x223c98 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x223c98['id']))return void this['currentDisplayedUsers']['add'](_0x223c98,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x27ffaf=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x27ffaf['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0xaff543}=this['presenceDropdownView'];_0xaff543['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x15671f=>{if(!_0x27ffaf['displayMe']&&_0x15671f['isMe'])return null;const _0xa863e9=new k(this['context']['locale'],_0x15671f,!!_0x27ffaf['onClick']);return _0x27ffaf['onClick']&&this['listenTo'](_0xa863e9,'execute',()=>{_0x27ffaf['onClick'](_0x15671f,_0xa863e9['element']);}),_0xa863e9;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0xaff543['focus'](),_0xaff543['checkIfScrollable']();const _0x4c0143=(_0x288b0f,_0x3bcf3f)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x3bcf3f();};_0xaff543['keystrokes']['set']('Esc',_0x4c0143),_0xaff543['keystrokes']['set']('Shift+Tab',_0x4c0143),_0xaff543['keystrokes']['set']('Tab',(_0x3e1c73,_0x574a8b)=>{!function(_0x2f1b31){const _0x56a326=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x130ae2=>_0x130ae2+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x19c72a=[...document['body']['querySelectorAll'](_0x56a326)]['filter'](_0x40f939=>_0x40f939===document['activeElement']||_0x40f939['offsetWidth']+_0x40f939['offsetHeight']>0x0)['sort']((_0x263e9d,_0x3dc3d0)=>(_0x263e9d['tabIndex']||0x0)-(_0x3dc3d0['tabIndex']||0x0)),_0x64335=_0x19c72a['indexOf'](_0x2f1b31),_0x342bcf=_0x19c72a[(_0x64335+0x1)%_0x19c72a['length']];_0x342bcf&&_0x342bcf['focus']();}(this['view']['element']),this['hideDropdown'](),_0x574a8b();}),_0xaff543['focusTracker']['add'](this['view']['element']),_0xaff543['focusTracker']['on']('change:isFocused',(_0x1c8a16,_0xaa13c8,_0xe1957c)=>{_0xe1957c||this['hideDropdown']();});}['hideDropdown'](){this['presenceDropdownView']&&(this['view']['inlineListView']['isExpanded']=!0x1,this['balloonPanelView']['unpin'](),this['balloonPanelView']['content']['remove'](this['presenceDropdownView']),this['presenceDropdownView']['destroy'](),this['presenceDropdownView']=void 0x0);}['destroy'](){super['destroy'](),this['view']&&this['view']['isRendered']&&this['view']['destroy'](),this['_bodyCollection']&&(this['_bodyCollection']['detachFromDom'](),this['_bodyCollection']['destroy'](),this['_bodyCollection']=null);}}class s extends _0x184910{static get['requires'](){return[i,r];}static get['pluginName'](){return'PresenceList';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{a as CloudServicesCommentsAdapter,u as CloudServicesRevisionHistoryAdapter,f as CloudServicesTrackChangesAdapter,s as PresenceList,l as RealTimeCollaborationClient,m as RealTimeCollaborativeComments,n as RealTimeCollaborativeEditing,g as RealTimeCollaborativeRevisionHistory,p as RealTimeCollaborativeTrackChanges};
|
package/dist/translations/af.js
CHANGED
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
export default{'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':
|
|
23
|
+
export default{'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':_0x85ef2d=>0x1!=_0x85ef2d}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x366f87=>{const {af:{dictionary:_0x2e497c,getPluralForm:_0x5dccda}}={'af':{'dictionary':{'CONNECTED_USERS':['',''],'PENDING_ACTION_SENDING_DATA':'','Synchronization\x20issue':'','Connected\x20users\x20list\x20dropdown\x20menu':'','Connected\x20users\x20list':'','Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'','The\x20document\x20cannot\x20be\x20connected\x20back\x20to\x20the\x20server.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','The\x20document\x20details\x20could\x20not\x20be\x20taken\x20during\x20the\x20reconnection.\x20To\x20not\x20lose\x20your\x20content\x20save\x20it\x20locally\x20and\x20refresh\x20the\x20editor.':'','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.':'','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.':''},'getPluralForm':_0x20256c=>0x1!=_0x20256c}};_0x366f87['af']||={'dictionary':{},'getPluralForm':null},_0x366f87['af']['dictionary']=Object['assign'](_0x366f87['af']['dictionary'],_0x2e497c),_0x366f87['af']['getPluralForm']=_0x5dccda;})(window['CKEDITOR_TRANSLATIONS']||={});
|