@ckeditor/ckeditor5-real-time-collaboration 44.0.0-alpha.7 → 44.0.0-alpha.8
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/LICENSE.md +7 -7
- package/README.md +11 -9
- 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
|
-
((()=>ht)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x38939d];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x64680f){super(_0x64680f),this['set']('state',_0xb3db39['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x43446f);}['init'](){const _0x223727=this['context'],_0x138140=_0x223727['plugins']['get']('CloudServices'),_0x5bff70=_0x223727['plugins']['get'](_0x38939d);if(!_0x138140['token'])throw new _0x5dafe4('websocketgateway-missing-token',this);if(!_0x138140['webSocketUrl'])throw new _0x5dafe4('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'](_0x138140['token'],_0x138140['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x5bd2e0=>{if(this['connection']=_0x5bd2e0,this['bind']('state')['to'](_0x5bd2e0,'state',this,'_isBrowserOffline',(_0x47fc23,_0x1ab794)=>('connected'!==_0x47fc23&&(this['_shouldPluginsReconnect']=!0x0),_0x1ab794||_0x47fc23!==_0xb3db39['CONNECTED']?_0xb3db39['DISCONNECTED']:this['state']==_0xb3db39['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0xb3db39['CONNECTING']):_0xb3db39['CONNECTED'])),this['connection']['on']('error',(_0x17e401,_0x472f44)=>{if('limitExceeded'!==_0x472f44['code'])throw console['error'](_0x472f44),new _0x5dafe4('cloudservices-init',null,{'originalError':_0x472f44});_0x5bff70['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'});}),!_0x5bd2e0['me'])return new Promise(_0x27463f=>_0x5bd2e0['on']('change:me',_0x27463f));})['catch'](_0x23e690=>{throw console['error'](_0x23e690),new _0x5dafe4('cloudservices-init',null,{'originalError':_0x23e690});});}['addToReconnectionStack'](_0x2ebaa4){if('function'!=typeof _0x2ebaa4['reconnect'])throw new _0x5dafe4('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x2ebaa4))throw new _0x5dafe4('websocketgateway-plugin-already-registered',this,{'name':_0x2ebaa4['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x2ebaa4);}['removeFromReconnectionStack'](_0x20aad1){this['_reconnectionStack']['delete'](_0x20aad1);}['isInReconnectionStack'](_0x558ab2){return this['_reconnectionStack']['has'](_0x558ab2);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x3736bf=>_0x3736bf['reconnect']())))['then'](()=>this['state']=_0xb3db39['CONNECTED'])['catch'](_0x43c572=>{throw console['error'](_0x43c572),new _0x5dafe4('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0xb3db39['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x5bc9f1{['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,_0x168467];}constructor(_0x5d5eeb){super(_0x5d5eeb),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x22f200(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x168467);}['init'](){const _0x14dfc9=this['context']['plugins']['get'](c);this['listenTo'](_0x14dfc9,'change:state',(_0x4faa55,_0x2e2223,_0x32ce64)=>{if('connected'!==_0x32ce64)this['channelSessions']['forEach'](_0x31f4e1=>_0x31f4e1['clear']()),this['channelConnectedUsers']['forEach'](_0x2b438b=>_0x2b438b['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x49492d,_0x4e3cd3]of this['_registeredSessions'])for(const _0x1d4897 of _0x4e3cd3)this['_handleSessionAdd'](_0x49492d,_0x1d4897);}}),this['_createUser'](_0x14dfc9['connection']['me'],!0x0);}['register'](_0x1d6ab1,_0x46044d){if(this['_registeredSessions']['has'](_0x1d6ab1))throw new _0x5dafe4('sessions-register-already-registered',null,{'channelId':_0x1d6ab1});this['_registeredSessions']['set'](_0x1d6ab1,_0x46044d),this['channelSessions']['set'](_0x1d6ab1,new _0x22f200()),this['channelConnectedUsers']['set'](_0x1d6ab1,new _0x22f200()),this['listenTo'](_0x46044d,'add',(_0xe55ee7,_0x2a2694)=>this['_handleSessionAdd'](_0x1d6ab1,_0x2a2694)),this['listenTo'](_0x46044d,'remove',(_0x187933,_0x6da7a2)=>this['_handleSessionRemove'](_0x1d6ab1,_0x6da7a2));for(const _0x501dbd of _0x46044d)this['_handleSessionAdd'](_0x1d6ab1,_0x501dbd);}['unregister'](_0x4d6636){if(!this['_registeredSessions']['has'](_0x4d6636))throw new _0x5dafe4('sessions-unregister-not-exist',null,{'channelId':_0x4d6636});const _0x29024c=this['_registeredSessions']['get'](_0x4d6636);this['stopListening'](_0x29024c);for(const _0x35d1e0 of _0x29024c)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x4d6636,_0x35d1e0);this['_registeredSessions']['delete'](_0x4d6636),this['channelSessions']['delete'](_0x4d6636),this['channelConnectedUsers']['delete'](_0x4d6636);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x3d403b){for(const _0x2195a2 of this['channelSessions']['values']())for(const _0x478966 of _0x2195a2)if(_0x478966['id']===_0x3d403b)return _0x478966['user'];}['getUserSessions'](_0x54366b,_0x1cd84a){const _0x1526d3=_0x1cd84a?[this['channelSessions']['get'](_0x1cd84a)]:this['channelSessions']['values'](),_0x28f1d3=new Set();for(const _0x4c3746 of _0x1526d3)for(const _0x2beb54 of _0x4c3746)_0x2beb54['user']['id']===_0x54366b['id']&&_0x28f1d3['add'](_0x2beb54['id']);return _0x28f1d3;}['getUserRole'](_0x2b8f22){for(const _0x2aeab5 of this['channelSessions']['values']())for(const _0x84c5ad of _0x2aeab5)if(_0x84c5ad['user']===_0x2b8f22)return _0x84c5ad['role'];}['_handleSessionAdd'](_0x24c07a,_0x17ea38){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x2988fb=_0x17ea38['user'],_0x1d4c95=this['_users']['getUser'](_0x2988fb['id'])||this['_createUser'](_0x2988fb),_0x592774=Object['assign']({},_0x17ea38,{'user':_0x1d4c95});this['channelSessions']['get'](_0x24c07a)['add'](_0x592774);const _0xfb6854=this['channelConnectedUsers']['get'](_0x24c07a);_0xfb6854['has'](_0x1d4c95['id'])||_0xfb6854['add'](_0x1d4c95),this['allConnectedUsers']['has'](_0x1d4c95['id'])||this['allConnectedUsers']['add'](_0x1d4c95,_0x1d4c95['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x24c07a,{'channelId':_0x24c07a,'session':_0x592774});}['_handleSessionRemove'](_0x28c571,_0x34620f){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x4ae43c=this['channelConnectedUsers']['get'](_0x28c571),_0x187fb8=_0x34620f['user'];_0x187fb8['id']&&(this['channelSessions']['get'](_0x28c571)['remove'](_0x34620f['id']),_0x4ae43c['has'](_0x187fb8['id'])&&!this['getUserSessions'](_0x187fb8,_0x28c571)['size']&&_0x4ae43c['remove'](_0x187fb8['id']),this['allConnectedUsers']['get'](_0x187fb8['id'])&&!this['getUserSessions'](_0x187fb8)['size']&&this['allConnectedUsers']['remove'](_0x187fb8['id']));}['_createUser'](_0x34978b,_0x1dcab6){const _0x3de5bc=this['_users']['addUser'](_0x34978b);return _0x1dcab6&&this['_users']['defineMe'](_0x34978b['id']),_0x3de5bc['orderNumber']=this['_uniqueUsersCount']++,_0x3de5bc;}}class J extends _0x5ae23e{['_domEmitter']=new(_0x43446f())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x4fcd3e=this['editor'],_0x11ec97=_0x4fcd3e['plugins']['get'](i);_0x4fcd3e['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x53b67f,{writer:_0x495ee9})=>function(_0x46de76,_0x2e052b,_0x563e5c,_0x2f9b9b){const _0x3191bc=_0x46de76['markerName']['split'](':')[0x2],_0x2c34e7=_0x563e5c['getUserBySessionId'](_0x3191bc);if(!_0x2c34e7||_0x3191bc===_0x563e5c['mySessionId'])return;if(!_0x2f9b9b['model']['schema']['checkChild'](_0x46de76['markerRange']['start'],'$text'))return;const _0x1bc22a={'class':'ck-user__marker\x20'+_0x2c34e7['color']['getMarkerClass'](),'data-name':_0x2c34e7['name'],'data-session-id':_0x3191bc},_0x2077c2=_0x2f9b9b['model']['markers']['get'](_0x46de76['markerName']),_0x367da3=_0x2077c2['getStart'](),_0x55ee20=_0x367da3['nodeAfter'],_0x3fa620=_0x2f9b9b['model']['schema'];if(_0x55ee20&&_0x3fa620['isObject'](_0x55ee20)&&_0x3fa620['isInline'](_0x55ee20)&&!_0x2f9b9b['model']['markers']['get']('user:range:'+_0x3191bc)['getRange']()['isCollapsed'])return;const _0x3ee888=_0x367da3['parent'];return _0x2f9b9b['model']['schema']['isLimit'](_0x3ee888)&&!_0x2f9b9b['model']['hasContent'](_0x3ee888)&&(_0x1bc22a['contenteditable']=!0x1),function(_0x5ceedd,_0x57317d,_0x571ec3){const _0x53dada=_0x5ceedd['createUIElement']('span',_0x57317d);return _0x5ceedd['setCustomProperty']('userPositionMarker',!0x0,_0x53dada),_0x53dada['render']=function(_0x296625){const _0xc15bb9=this['toDomElement'](_0x296625);return _0xc15bb9['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>'+_0x571ec3['name']+'</span>',_0xc15bb9['addEventListener']('mouseenter',()=>{_0xc15bb9['classList']['add']('ck-user__marker_hovered');}),_0xc15bb9['addEventListener']('mouseleave',()=>{_0xc15bb9['classList']['remove']('ck-user__marker_hovered');}),_0xc15bb9;},_0x53dada['isSimilar']=function(_0x15ef4c){return!(!this['getCustomProperty']('userPositionMarker')||!_0x15ef4c['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x15ef4c['getAttribute']('data-session-id'));},_0x53dada;}(_0x2e052b,_0x1bc22a,_0x2c34e7);}(_0x53b67f,_0x495ee9,_0x11ec97,_0x4fcd3e)}),_0x4fcd3e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x2af256=>function(_0x48f9ce,_0x71c81b){const _0x5ea51b=_0x48f9ce['markerName']['split'](':')[0x2];if(_0x5ea51b===_0x71c81b['mySessionId'])return null;const _0x2ceb3c=_0x71c81b['getUserBySessionId'](_0x5ea51b);if(!_0x2ceb3c)return{'id':_0x5ea51b,'classes':[]};return{'id':_0x5ea51b,'classes':['ck-user__selection',_0x2ceb3c['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x5ea51b},'priority':0x7d0+_0x2ceb3c['orderNumber']};}(_0x2af256,_0x11ec97)}),function(_0x179603){const _0xa836e8=_0x179603['model'],_0x33c52a=new Map(),_0x330a88=_0x179603['plugins']['get'](i);_0xa836e8['markers']['on']('update:user:range',(_0x2d64b0,_0x43368b,_0x3be0e4,_0x14a6df)=>{if(!_0x14a6df&&_0x33c52a['get'](_0x43368b['name']))return _0x33c52a['get'](_0x43368b['name'])['detach'](),void _0x33c52a['delete'](_0x43368b['name']);const _0x381e1d=_0x43368b['name']['split'](':')[0x2];if(_0x381e1d===_0x330a88['mySessionId'])return;const _0x5edf4f='user:position:'+_0x381e1d;_0xa836e8['markers']['has'](_0x5edf4f)&&_0x179603['editing']['reconvertMarker'](_0x5edf4f),_0x43368b['on']('change:range',(_0x72229b,_0x3b210c,_0x597079)=>{if('$graveyard'!=_0x3b210c['root']['rootName']&&'$graveyard'==_0x43368b['getRange']()['root']['rootName']&&!_0x33c52a['has'](_0x43368b['name'])){const _0x8f17d6=_0xa836e8['schema']['getNearestSelectionRange'](_0x597079['deletionPosition']);if(_0x8f17d6){const _0x41184b=at['fromRange'](_0x8f17d6);_0x33c52a['set'](_0x43368b['name'],_0x41184b),_0x41184b['on']('change:range',(_0x32404f,_0x3e31e7,_0x24897f)=>{if('$graveyard'==_0x41184b['root']['rootName']){const _0x16eba6=_0xa836e8['schema']['getNearestSelectionRange'](_0x24897f['deletionPosition']);_0x16eba6?(_0x41184b['start']=_0x16eba6['start'],_0x41184b['end']=_0x16eba6['end']):(_0x33c52a['delete'](_0x43368b['name']),_0x41184b['detach']());}});}}});}),_0xa836e8['document']['on']('change',()=>{_0x33c52a['size']>0x0&&_0xa836e8['enqueueChange']({'isUndoable':!0x1},_0x5484df=>{for(const [_0x11bbb3,_0x53528a]of _0x33c52a)'$graveyard'==_0xa836e8['markers']['get'](_0x11bbb3)['getRange']()['root']['rootName']&&(te(_0x11bbb3['split'](':')[0x2],_0x53528a['toRange'](),_0xa836e8,_0x5484df),_0x53528a['detach']());_0x33c52a['clear']();});});}(_0x4fcd3e),this['_domEmitter']['listenTo'](_0x348fa0['document'],'keydown',(_0x338b96,{key:_0x5bcb92})=>{'Escape'===_0x5bcb92&&function(_0x3fd21d){_0x3fd21d['editing']['view']['change'](_0x4bcb19=>{for(const _0x364619 of _0x3fd21d['model']['markers']){if(!_0x364619['name']['startsWith']('user:position'))continue;const _0x2cc142=_0x3fd21d['editing']['mapper']['markerNameToElements'](_0x364619['name']);if(_0x2cc142){for(const _0x2120a7 of _0x2cc142)_0x4bcb19['removeClass']('ck-user__marker_hovered',_0x2120a7);}}});}(_0x4fcd3e);},{'useCapture':!0x0});}['afterInit'](){const _0x129568=this['editor'],_0x55438b=_0x129568['commands']['get']('undo');_0x55438b&&_0x129568['model']['on']('applyOperation',(_0x12693d,_0x38721c)=>{const _0x3127f1=_0x38721c[0x0];if('marker'!=_0x3127f1['type']||!_0x3127f1['name']['startsWith']('user:'))return;const _0x1e7f2f=_0x3127f1['batch'];_0x55438b['_createdBatches']['has'](_0x1e7f2f)&&(_0x3127f1['newRange']=_0x3127f1['oldRange']?_0x129568['model']['createRange'](_0x3127f1['oldRange']['start'],_0x3127f1['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x5511f4=this['editor'],_0x382430=_0x5511f4['model']['document'],_0x2e2c5b=_0x5511f4['plugins']['get'](i);_0x5511f4['model']['enqueueChange']({'isUndoable':!0x1},_0x5bf2af=>{const _0x10a71c='user:range:'+_0x2e2c5b['mySessionId'],_0x261b2a='user:position:'+_0x2e2c5b['mySessionId'],_0x4337bc=_0x5511f4['model']['markers']['has'](_0x10a71c);_0x5511f4['editing']['view']['hasDomSelection']?te(_0x2e2c5b['mySessionId'],_0x382430['selection']['getFirstRange'](),_0x5511f4['model'],_0x5bf2af):_0x4337bc&&(_0x5bf2af['removeMarker'](_0x10a71c),_0x5bf2af['removeMarker'](_0x261b2a));});}}function te(_0x1ca3d3,_0x215800,_0x33b24a,_0x4a6b5f){const _0x3b47a0='user:range:'+_0x1ca3d3,_0x385eca='user:position:'+_0x1ca3d3,_0x309ddc=_0x215800['getContainedElement']();let _0x5dfcd0=_0x215800['start'];_0x309ddc&&_0x309ddc['is']('element','tableCell')&&(_0x5dfcd0=function(_0x3403ad,_0x57bea5){for(const _0x20ec29 of _0x3403ad['getPositions']())if(_0x57bea5['schema']['checkChild'](_0x20ec29,'$text'))return _0x20ec29;}(_0x215800,_0x33b24a),_0x215800=_0x4a6b5f['createRange'](_0x5dfcd0));const _0x51ec36=_0x4a6b5f['createRange'](_0x5dfcd0);_0x33b24a['markers']['has'](_0x3b47a0)?(_0x4a6b5f['updateMarker'](_0x3b47a0,{'range':_0x215800}),_0x4a6b5f['updateMarker'](_0x385eca,{'range':_0x51ec36})):(_0x4a6b5f['addMarker'](_0x3b47a0,{'range':_0x215800,'usingOperation':!0x0}),_0x4a6b5f['addMarker'](_0x385eca,{'range':_0x51ec36,'usingOperation':!0x0}));}function Q(_0x56c763,_0x5ef184,_0x470c4d){const _0x3b9a5e=_0x56c763['t'],t=_0x56c763['t'];switch(_0x5ef184){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 _0x3b9a5e({'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'},_0x470c4d);default:return'';}}let Z=0x1;class l extends _0x5ae23e{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
-
((()=>_0x32cd25)());['_offset'];['sessionId'];['serverHistory'];['_channelId'];['_service'];['_document'];['_compressor'];['_bufferedOperations'];['_knownOperations'];['_knownRootNames'];['_pendingAction'];['_hasSelectionChanged'];['_sendBufferedOperationsDelayId'];['_baseBufferDelay'];['_currentBufferDelay'];['_lastSyncedOperationId'];['_disconnectionOperations'];['_operationIdentifier'];static get['requires'](){return[c,i,J,_0x522c90,_0x168467,_0x38939d];}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 _0x5688bd=this['serverHistory']['getOperations']();for(let _0xf7a97f=_0x5688bd['length']-0x1;_0xf7a97f>=0x0;_0xf7a97f--){const _0x4a7641=_0x5688bd[_0xf7a97f];if(!this['_disconnectionOperations']['has'](_0x4a7641))return _0x4a7641['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x369a35){if(super(_0x369a35),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0x3a165a(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x5dafe4('collaboration-missing-channelid',this);const _0x4744ec=_0x369a35['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x4744ec,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x513803(),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 st(this['_disconnectionOperations']);}['init'](){const _0x5a1d00=this['editor'],_0x27e72b=_0x5a1d00['plugins']['get'](_0x168467),_0x511d6b=_0x5a1d00['plugins']['get'](c);this['listenTo'](_0x27e72b,'getOperationAuthor',(_0x55d283,_0x32a604)=>{const _0x3b1a48=_0x32a604[0x0];_0x3b1a48['_authorId']&&(_0x55d283['return']=_0x27e72b['getUser'](_0x3b1a48['_authorId']),_0x55d283['stop']()),null===_0x3b1a48['_authorId']&&(_0x55d283['return']=null,_0x55d283['stop']());},{'priority':'high'}),this['listenTo'](_0x5a1d00['model']['document']['selection'],'change:range',(_0x479c8f,_0x17c9d7)=>{_0x17c9d7['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x5a1d00['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x5a1d00['model']['on']('applyOperation',(_0x383a82,_0x1360fd)=>{const _0x587016=_0x1360fd[0x0];_0x587016['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x587016),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x511d6b,'state',this,'_hasSynchronizationProblem',(_0x1eb540,_0x1d5077)=>'connected'===_0x1eb540&&!_0x1d5077),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x5a1d00['disableReadOnlyMode']('rtc-offline'):_0x5a1d00['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x5a1d00['disableReadOnlyMode']('rtc-offline'):_0x5a1d00['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0x173c9b=this['editor']['plugins']['get'](i),_0x4b70e0=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0x173c9b['unregister'](this['_channelId']);const _0x2fc83b=await this['_service']['reconnect'](_0x4b70e0['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x2fc83b)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x16cc57=await this['_service']['getConnectedSessions']();_0x173c9b['register'](this['_channelId'],_0x16cc57),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x239934){if(function(_0x481536){return'404'===_0x481536['code'];}(_0x239934)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x12cd5f){return'409'===_0x12cd5f['code'];}(_0x239934)){const _0x2b7c77=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'](_0x2b7c77);}else{if(!(_0x239934 instanceof tt))throw _0x239934;this['_handleReconnectionError']();}}}}['destroy'](){const _0x549653=this['editor']['plugins']['get'](c),_0xba9a73=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0xba9a73['channelSessions']['has'](this['_channelId'])&&_0xba9a73['unregister'](this['_channelId']),_0x549653['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x57bcd5){if(this['sessionId']!==_0x57bcd5['sessionId']&&this['_lastSyncedOperationId']!==_0x57bcd5['lastOperationId'])throw new tt();return this['sessionId']=_0x57bcd5['sessionId'],this['_handleServerResponse']([],{..._0x57bcd5,'wereChangesApplied':!0x1,'data':_0x57bcd5['data']},'reconnect');}async['_connectService'](_0x4258f4,_0x55f8ba=!0x1){const {connection:_0x2d9b94}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x2d9b94,this['_channelId'])['then'](_0x3f6d25=>this['_initSessionsHandling'](_0x3f6d25))['catch'](_0x37b7db=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x37b7db);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0x5983af,_0x493801)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x493801);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x5447ef=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x4258f4);this['_isPendingUpdate']=!0x0;const _0x2b332d=await this['_service']['connect'](_0x2d9b94,this['_compressOperations'](_0x4258f4),_0x5447ef);if(this['sessionId']=_0x2b332d['sessionId'],_0x55f8ba){if(!_0x2b332d['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x2b332d['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x4258f4,_0x2b332d,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x2b332d,_0x4258f4);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x30fdf2=this['editor']['plugins']['get'](i),_0x3dda3d=this['editor']['plugins']['get'](J),_0x4f5e0e=_0x30fdf2['channelSessions']['get'](this['_channelId']);_0x4f5e0e&&_0x4f5e0e['length']>0x1?_0x3dda3d['createUserMarkerOperations']():this['listenTo'](_0x30fdf2,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x30fdf2['channelSessions']['get'](this['_channelId'])['length']&&_0x3dda3d['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x46d05b,_0x4b7869,_0x2a8c91,_0x26aea3){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x4b7869){const _0x16107a=this['_decompressOperations'](_0x2a8c91,_0x26aea3);await this['_fetchMissingUsers'](_0x16107a),this['_handleExternalOperations'](_0x16107a,_0x4b7869,_0x2a8c91['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x28060d}=this['editor'];let _0xf783b1;try{_0xf783b1=await this['_service']['getDocumentDetails']();}catch(_0x4b2cc4){const _0x33808a=Q(_0x28060d,'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'](_0x33808a);}const _0xdacdf=_0xf783b1['currentDocumentSession']||_0xf783b1['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0xdacdf['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x57397e=Q(_0x28060d,'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'](_0x57397e);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x142564){const _0x327856=this['editor']['plugins']['get'](i);this['listenTo'](_0x327856,'sessionAdd:'+this['_channelId'],(_0x37cf92,{session:_0x544349})=>{if(_0x544349['id']===_0x327856['mySessionId']){_0x37cf92['off']();const _0x3259ee=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x21b54a=_0x544349['permissions'];_0x3259ee&&_0x3259ee['isEnabled']&&(_0x21b54a=_0x21b54a['filter'](_0x3d12=>'document:write'!==_0x3d12)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x21b54a,this['_channelId']);}}),_0x327856['register'](this['_channelId'],_0x142564);}['_initThrowingOnDataSet'](){const _0x34fff1=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x52e5ea)=>{if(!_0x52e5ea[_0x52e5ea['length']-0x1]['suppressErrorInCollaboration'])throw new _0x5dafe4('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x34fff1['apply'](this['editor']['data'],_0x52e5ea);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x2f3db2,[_0xa51787])=>{if(this['_document']['version'])throw new _0x5dafe4('realtimecollaborationclient-init-document-already-initialized',this);_0x2f3db2['stop'](),this['_setPendingAction']();const _0x10db37=this['editor']['config']['get']('rootsAttributes'),_0x2055a9=this['_getOperationsFromInitData'](_0xa51787,_0x10db37);0x0==_0x2055a9['length']&&_0x2055a9['push'](new _0x373698(0x0)),_0x2f3db2['return']=this['_connectService'](_0x2055a9)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x465a19=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x465a19))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x5d8b8c,[_0x9afe4,_0x5bda22])=>{_0x5d8b8c['stop']();const _0x4a90e4=this['editor']['model']['document']['getRoot'](_0x9afe4);if(!this['_knownRootNames']['has'](_0x9afe4)){const _0x328a0e=_0x5bda22&&_0x5bda22['data']?_0x5bda22['data']:'',_0x3961e0=_0x5bda22&&_0x5bda22['attributes']?_0x5bda22['attributes']:{};await this['_loadRoot'](_0x9afe4,_0x328a0e,_0x3961e0);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x4a90e4['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x4a90e4);});},{'priority':'high'});}async['_fetchMissingUsers'](_0xecc0b8){const _0x49ee5f=this['editor']['plugins']['get'](_0x168467),{connection:_0x29ed9f}=this['editor']['plugins']['get'](c),_0x495c34=new Set();for(const _0x450681 of _0xecc0b8){const _0x4a8919=_0x450681['_authorId'];_0x4a8919&&!_0x49ee5f['getUser'](_0x4a8919)&&_0x495c34['add'](_0x4a8919);}if(0x0===_0x495c34['size'])return;const _0x584c75=await lt['getMany'](_0x29ed9f,Array['from'](_0x495c34));for(const _0x1f497f of _0x584c75)_0x49ee5f['getUser'](_0x1f497f['id'])||_0x49ee5f['addUser'](_0x1f497f);}['_getOperationsFromInitData'](_0x587f55,_0x26d0fe={}){const _0x42a6c5=this['editor']['model'],_0x3aa107=[];let _0x4e5a81=0x0;const _0x197e0c='string'==typeof _0x587f55?{'main':_0x587f55}:_0x587f55;for(const _0x378cf3 of Object['keys'](_0x197e0c)){if(!this['_document']['roots']['has'](_0x378cf3))throw new _0x5dafe4('realtimecollaborationclient-init-non-existent-root',this);const _0x56f1ea=this['editor']['data']['parse'](_0x197e0c[_0x378cf3]),_0x371897=this['_document']['getRoot'](_0x378cf3),_0x4d8706=new _0x270b1e(_0x42a6c5['createPositionAt'](_0x371897,0x0),_0x56f1ea,_0x4e5a81++);_0x3aa107['push'](_0x4d8706);for(const [_0x2e5093,_0x355a3a]of _0x56f1ea['markers']){const _0x5f050a=_0x42a6c5['createRange'](_0x42a6c5['createPositionFromPath'](_0x371897,_0x355a3a['start']['path']['slice']()),_0x42a6c5['createPositionFromPath'](_0x371897,_0x355a3a['end']['path']['slice']())),_0x42b65a=new _0x3f1eec(_0x2e5093,null,_0x5f050a,_0x42a6c5['markers'],!0x0,_0x4e5a81++);_0x3aa107['push'](_0x42b65a);}}if(_0x26d0fe)for(const [_0x287c9d,_0x48cc31]of Object['entries'](_0x26d0fe)){const _0x1e3ebb=_0x42a6c5['document']['getRoot'](_0x287c9d);if(!_0x1e3ebb)throw new _0x5dafe4('multi-root-editor-root-attributes-no-root',null);for(const [_0x5c54a6,_0x4e9ffe]of Object['entries'](_0x48cc31))if(null!==_0x4e9ffe){const _0x27a296=new _0x5cfc94(_0x1e3ebb,_0x5c54a6,null,_0x4e9ffe,_0x4e5a81++);_0x3aa107['push'](_0x27a296);}}return _0x3aa107;}async['_loadRoot'](_0x1b6ede,_0x15153f,_0x3c1df9){this['_getOperationsFromInitData']({[_0x1b6ede]:_0x15153f},{[_0x1b6ede]:_0x3c1df9})['forEach']((_0x48ad3d,_0xd0f793)=>{_0x48ad3d['baseVersion']=this['_document']['version']+_0xd0f793,_0x48ad3d['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x48ad3d);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x1bfca5,_0x1dc7f8){let _0x36c01b;this['_offset']=_0x1bfca5['offset'];const _0x236b1e=_0x1bfca5['wereChangesApplied']&&!_0x1bfca5['initData'],_0x4d6a2a=_0x236b1e?0x0:_0x1bfca5['data']['baseVersion'];if(_0x1dc7f8['forEach'](_0x2e792c=>{_0x2e792c['_isInit']=!0x0,_0x2e792c['createdAt']=_0x1bfca5['sessionCreatedAt'],_0x2e792c['_authorId']=null;}),_0x236b1e)_0x36c01b=_0x1dc7f8,this['_applyOperationsSet'](_0x36c01b,_0x236b1e);else{if(_0x1bfca5['initData']){const _0x2faa79=this['_getOperationsFromInitData'](_0x1bfca5['initData']);this['_document']['history']['version']=-_0x2faa79['length'],_0x2faa79['forEach'](_0x52ce7a=>{_0x52ce7a['baseVersion']-=_0x2faa79['length'],_0x52ce7a['createdAt']=_0x1bfca5['sessionCreatedAt'],_0x52ce7a['_isInit']=!0x0,_0x52ce7a['_authorId']=null;}),this['_applyOperationsSet'](_0x2faa79,!0x0),this['serverHistory']['version']=-_0x2faa79['length']+this['_offset'],this['_updateServerHistory'](_0x2faa79);}this['_document']['history']['version']=_0x4d6a2a,_0x36c01b=this['_decompressOperations'](_0x1bfca5['data'],_0x1bfca5['metadata']),await this['_fetchMissingUsers'](_0x36c01b),this['_applyOperationsSet'](_0x36c01b,_0x236b1e);}_0x1bfca5['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x36c01b,_0x1bfca5['lastOperationId']),this['_lastSyncedOperationId']=_0x1bfca5['lastOperationId']),this['serverHistory']['version']=_0x4d6a2a+this['_offset'],this['_updateServerHistory'](_0x36c01b),_0x1dc7f8['filter'](_0x28328e=>{const _0x470c1e=this['_getAffectedRoot'](_0x28328e);return _0x470c1e&&!this['_knownRootNames']['has'](_0x470c1e);})['forEach']((_0xd5c11d,_0x465c3d)=>{_0xd5c11d['baseVersion']=this['_document']['version']+_0x465c3d,this['_saveOperationInBuffer'](_0xd5c11d);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x4a1594,_0x2260c7,_0x2e7c2e){throw this['_isPendingUpdate']=!0x0,_0x2260c7&&console['error'](_0x2260c7),_0x2e7c2e&&this['editor']['enableReadOnlyMode']('realtimecollaborationclient-error'),new _0x5dafe4(_0x4a1594,this['editor']);}['_saveOperationInBuffer'](_0x539c77){this['_knownOperations']['has'](_0x539c77)||(this['_knownOperations']['add'](_0x539c77),this['_bufferedOperations']['push'](_0x539c77),this['_pendingAction']||'marker'==_0x539c77['type']&&!_0x539c77['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x31af12=!0x1){!_0x31af12&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x51cc81=>{_0x51cc81&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x55d05e=>{this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,function(_0x46e670){return _0x46e670['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x46e670['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x46e670['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x55d05e)||this['_crash'](_0x55d05e['message'],_0x55d05e,!0x0);});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x47a9d4=>{this['on']('change:_isPendingUpdate',()=>{_0x47a9d4();});});}async['_sendBufferedOperations'](){const _0x221172=this['editor']['plugins']['get'](J);if(this['_shouldSendSelectionUpdate']()&&(_0x221172['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x1a2a10=[...this['_bufferedOperations']];for(const _0x1e403b of _0x1a2a10)_0x1e403b['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x1e403b);const _0x219a12=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x1a2a10),_0x5e32ca=Z++,_0x189b3b=this['_compressOperations'](_0x1a2a10),_0x1e5b28=await this['_service']['sendOperations'](_0x189b3b,_0x189b3b['baseVersion'],_0x219a12);try{return await this['_handleServerResponse'](_0x1a2a10,_0x1e5b28,_0x5e32ca);}catch(_0x369392){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x369392);}}async['_handleServerResponse'](_0x422d26,_0x2db6a9,_0x26e64a){if('error'in _0x2db6a9)throw _0x2db6a9['error'];let _0x24a9da=!0x1;if(_0x2db6a9['wereChangesApplied']){_0x2db6a9['lastOperationId']&&(this['_lastSyncedOperationId']=_0x2db6a9['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x276a50=>!_0x422d26['includes'](_0x276a50));for(const _0x2931ed of _0x422d26)_0x2931ed['createdAt']='lastOperationAcceptedAt'in _0x2db6a9&&_0x2db6a9['lastOperationAcceptedAt']||void 0x0;it(_0x422d26,_0x2db6a9['version']-_0x422d26['length']),this['_updateServerHistory'](_0x422d26);const _0x4f1273=_0x422d26['filter'](_0x2fa6d8=>{if(!_0x2fa6d8['_isInit'])return!0x1;const _0x30ca5c=this['_getAffectedRoot'](_0x2fa6d8);return _0x30ca5c&&!this['_knownRootNames']['has'](_0x30ca5c);});it(_0x4f1273,this['_document']['version']),this['_applyOperationsSet'](_0x4f1273),_0x24a9da=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x2d44ea=this['_decompressOperations'](_0x2db6a9['data'],_0x2db6a9['metadata'])['filter'](_0x14350b=>_0x14350b['baseVersion']>=this['_lastServerVersion']);_0x2d44ea['forEach'](_0x24564b=>this['_addKnownRoot'](_0x24564b)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x4db14f=>!_0x4db14f['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x4db14f))),this['_bufferedOperations']['length']&&it(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x2d44ea),_0x24a9da=this['_handleExternalOperations'](_0x2d44ea,_0x2db6a9['version'],_0x2db6a9['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x24a9da?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x590393,_0x48f3b2,_0x58d20d){try{const _0x3ca167={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x26d2a1,operationsB:_0x410750,originalOperations:_0x25afd5}=_0x5d5603(_0x590393,this['_bufferedOperations'],_0x3ca167);it(_0x26d2a1,this['_document']['version']),it(_0x410750,_0x48f3b2);for(const _0x259ddc of _0x26d2a1){const _0x160f48=_0x25afd5['get'](_0x259ddc);_0x259ddc['_authorId']=_0x160f48?_0x160f48['_authorId']:null;}_0x58d20d&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x590393,_0x58d20d),this['_lastSyncedOperationId']=_0x58d20d),this['_bufferedOperations']=[..._0x410750],this['_applyOperationsSet'](_0x26d2a1),this['_updateServerHistory'](_0x590393);}catch(_0x1e27fb){return console['error'](_0x1e27fb),!0x1;}return!0x0;}['_applyOperationsSet'](_0x5416b9,_0x40bb41=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x274aae=>{for(const _0x17450e of _0x5416b9)this['_knownOperations']['add'](_0x17450e),this['_addKnownRoot'](_0x17450e),_0x274aae['batch']['addOperation'](_0x17450e),this['editor']['model']['applyOperation'](_0x17450e);});}['_addKnownRoot'](_0x5e5755){const _0x17be89=this['_getAffectedRoot'](_0x5e5755);_0x17be89&&this['_knownRootNames']['add'](_0x17be89);}['_getAffectedRoot'](_0x59aa83){let _0x53b315,_0x21159d;switch(_0x59aa83['type']){case'insert':_0x53b315=_0x59aa83['position']['root'];break;case'marker':if(_0x21159d=_0x59aa83['newRange'],!_0x21159d)return null;_0x53b315=_0x21159d['root'];break;case'addRootAttribute':_0x53b315=_0x59aa83['root'];break;case'addRoot':_0x53b315=_0x59aa83['affectedSelectable'];break;case'move':_0x53b315=_0x59aa83['targetPosition']['root'];break;default:return null;}return _0x53b315['rootName'];}['_updateServerHistory'](_0x4f363d){_0x4f363d['forEach'](_0x24c279=>{const _0x28e295=_0x24c279['clone']();_0x28e295['_authorId']=_0x24c279['_authorId'],_0x28e295['_isInit']=!!_0x24c279['_isInit'],_0x28e295['createdAt']=_0x24c279['createdAt'],_0x28e295['baseVersion']+=this['_offset'],_0x24c279['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x28e295),this['serverHistory']['addOperation'](_0x28e295);});}['_handleReconnectionError'](_0x157c3d){const _0x3c4f1b=this['editor']['plugins']['get']('Notification'),_0x22a394=this['editor']['locale'];_0x157c3d||(_0x157c3d=Q(_0x22a394,'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.')),_0x3c4f1b['showWarning'](_0x157c3d,{'title':Q(_0x22a394,'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'](_0x522c90)['add'](Q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x522c90)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x36f106){const _0x1821cc=_0x36f106['map'](_0x3288e8=>_0x3288e8['toJSON']());return this['_compressor']['compress'](_0x1821cc);}['_decompressOperations'](_0x34640a,_0x4e8001){return this['_compressor']['decompress'](_0x34640a)['map']((_0x442179,_0x3faf4c)=>{const _0x42418d='init'==_0x4e8001[_0x3faf4c]['type'];if('InsertOperation'==_0x442179['__className']){const _0x49680e=_0x442179['position']['root'];!this['_document']['getRoot'](_0x49680e)&&(this['_document']['createRoot']('$root',_0x49680e)['_isAttached']=!0x1);}const _0x52420f=_0x5f59a7['fromJSON'](_0x442179,this['_document']);return _0x52420f['wasUndone']=_0x442179['wasUndone'],_0x52420f['_isInit']=_0x42418d,_0x52420f['_authorId']=_0x42418d?null:_0x4e8001[_0x3faf4c]['userId'],_0x52420f['_isDisconnection']='cs:removeUser'===_0x4e8001[_0x3faf4c]['type'],_0x52420f['createdAt']=_0x4e8001[_0x3faf4c]['createdAt'],_0x52420f;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x164f14=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x164f14&&_0x164f14['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class tt extends Error{}function it(_0x5c3ccb,_0x5e8602){for(const _0x1d7f95 of _0x5c3ccb)_0x1d7f95['baseVersion']=_0x5e8602++;}class st{['_ignoredOperations'];['_operationToId'];constructor(_0x33baaf){this['_ignoredOperations']=_0x33baaf,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0xdc547){let _0x16dd68=_0xdc547['length'];for(;_0x16dd68--;){const _0x589fa2=_0xdc547[_0x16dd68];if(!this['_ignoredOperations']['has'](_0x589fa2)){if(!this['_operationToId']['has'](_0x589fa2)){const _0x61f81e=_0x33a0ac()['slice'](0x1,0x12);this['_operationToId']['set'](_0x589fa2,_0x61f81e);}return this['_operationToId']['get'](_0x589fa2);}}}['setIdForTheLastOperation'](_0x4c647d,_0xa21561){if(!_0xa21561)return;let _0x4595b2=_0x4c647d['length'];for(;_0x4595b2--;){const _0x29ae7e=_0x4c647d[_0x4595b2];this['_ignoredOperations']['has'](_0x29ae7e)||this['_operationToId']['set'](_0x29ae7e,_0xa21561);}}}class n extends _0x5ae23e{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x5bc9f1{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
-
((()=>_0x33b68b)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x168467];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x563f7d){super(_0x563f7d),this['_services']=new Map();}async['init'](){const _0x56fd51=this['context'],_0x2a8fc8=_0x56fd51['plugins']['get']('CommentsRepository');if(_0x56fd51['plugins']['get'](c)['addToReconnectionStack'](this),_0x2a8fc8['adapter']={'addCommentThread':async({channelId:_0x27d085,threadId:_0x379ff4,comments:_0x1508f7,resolvedAt:_0x472269,resolvedBy:_0x4a7336,context:_0x2efdb9,attributes:_0x1d9518})=>{const _0x421dc1=await this['_getService'](_0x27d085)['addCommentThread']({'commentThreadId':_0x379ff4,'comments':_0x1508f7['map'](_0x4af31b=>function(_0x185d41,_0x4bb70e,_0x4473d9){return{'commentThreadId':_0x4473d9,'commentId':_0x185d41['commentId'],'userId':_0x185d41['authorId'],'content':_0x185d41['content'],'documentId':_0x4bb70e,'createdAt':_0x185d41['createdAt'],'attributes':_0x185d41['attributes']||{}};}(_0x4af31b,_0x27d085,_0x379ff4)),'resolvedAt':_0x472269,'resolvedBy':_0x4a7336,'context':_0x2efdb9,'attributes':_0x1d9518})['catch'](dt);return{'threadId':_0x421dc1['commentThreadId'],'comments':_0x421dc1['comments']};},'getCommentThread':async({channelId:_0x3839f5,threadId:_0x25e9c0})=>{const _0x3bdc92=await this['_getService'](_0x3839f5)['getCommentThread'](_0x25e9c0)['catch'](dt);return _0x3bdc92['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x3bdc92]),{'threadId':_0x3bdc92['commentThreadId'],'comments':_0x3bdc92['comments']['map'](b),'context':_0x3bdc92['context'],'resolvedAt':_0x3bdc92['resolvedAt'],'resolvedBy':_0x3bdc92['resolvedBy'],'attributes':_0x3bdc92['attributes']||{}});},'updateCommentThread':async({channelId:_0x37679c,threadId:_0x107dbe,context:_0x8f0cfd,unlinkedAt:_0xd5c0c5,attributes:_0x2c1ac7})=>this['_getService'](_0x37679c)['updateCommentThread']({'commentThreadId':_0x107dbe,'context':_0x8f0cfd,'attributes':_0x2c1ac7,'unlinkedAt':_0xd5c0c5})['catch'](y)['catch'](dt),'resolveCommentThread':async({channelId:_0x463575,threadId:_0xf3ccd5})=>{const _0x1fed7a=await this['_getService'](_0x463575)['resolveCommentThread'](_0xf3ccd5)['catch'](y)['catch'](dt);return{'threadId':_0x1fed7a['commentThreadId'],'resolvedAt':_0x1fed7a['resolvedAt'],'resolvedBy':_0x1fed7a['resolvedBy']};},'reopenCommentThread':async({channelId:_0x1b38da,threadId:_0x5e7869})=>this['_getService'](_0x1b38da)['reopenCommentThread'](_0x5e7869)['catch'](y)['catch'](dt),'removeCommentThread':({channelId:_0x4eb4cf,threadId:_0x381888})=>this['_getService'](_0x4eb4cf)['removeCommentThread'](_0x381888)['catch'](y)['catch'](dt),'addComment':({channelId:_0x56485a,threadId:_0x20f0de,commentId:_0x26cbf1,content:_0x5c9d89,attributes:_0x5c2753})=>this['_getService'](_0x56485a)['addComment'](_0x20f0de,_0x26cbf1,_0x5c9d89,_0x5c2753)['catch'](dt),'updateComment':({channelId:_0x202cbe,threadId:_0x41ed9a,commentId:_0x5ce3fa,content:_0x21600d,attributes:_0x212942})=>this['_getService'](_0x202cbe)['updateComment'](_0x41ed9a,_0x5ce3fa,_0x21600d,_0x212942)['catch'](y)['catch'](dt),'removeComment':({channelId:_0x229a18,threadId:_0x3180e2,commentId:_0x52f2ae})=>this['_getService'](_0x229a18)['removeComment'](_0x3180e2,_0x52f2ae)['catch'](y)['catch'](dt)},_0x56fd51 instanceof _0x3ebec1){const _0x24b2b3=_0x56fd51['config']['get']('collaboration.channelId'),_0xf2466c=_0x56fd51['plugins']['get'](i);await this['_setUpService'](_0x24b2b3);const _0x4ad261=await this['_services']['get'](_0x24b2b3)['getConnectedSessions']();this['listenTo'](_0xf2466c,'sessionAdd:'+_0x24b2b3,(_0x2b05ed,{session:_0x2c2e58})=>{_0x2c2e58['id']===_0xf2466c['mySessionId']&&(_0x2b05ed['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x2c2e58['permissions'],_0x24b2b3));}),_0xf2466c['register'](_0x24b2b3,_0x4ad261);}}async['_setUpService'](_0x422023){if(this['_services']['has'](_0x422023))throw new _0x5dafe4('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x422023});const _0x203c04=this['context']['plugins']['get']('CommentsRepository'),_0x26ee70=new a['CommentsService'](_0x422023);this['_services']['set'](_0x422023,_0x26ee70),this['listenTo'](_0x26ee70,'commentThreadAdded',(_0x415fdc,_0x4b3063)=>{const {commentThreadId:_0x4f2868,documentId:_0x20e62e,context:_0x26bb36,attributes:_0xb355ca,resolvedAt:_0x3cf5c4,resolvedBy:_0x2f8960,comments:_0x10705a}=_0x4b3063;_0x203c04['getCommentThread'](_0x4f2868)||_0x203c04['addCommentThread']({'threadId':_0x4f2868,'channelId':_0x20e62e,'comments':_0x10705a?_0x10705a['map'](b):[],'context':_0x26bb36,'attributes':_0xb355ca,'resolvedAt':_0x3cf5c4,'resolvedBy':_0x2f8960,'isFromAdapter':!0x0});}),this['listenTo'](_0x26ee70,'commentThreadUpdated',(_0x47fccb,{commentThreadId:_0xeb7cef,documentId:_0x457543,context:_0x5ec980,unlinkedAt:_0x503893,attributes:_0xab93b1})=>{_0x203c04['getCommentThread'](_0xeb7cef)&&_0x203c04['updateCommentThread']({'threadId':_0xeb7cef,'channelId':_0x457543,'context':_0x5ec980,'unlinkedAt':_0x503893,'attributes':_0xab93b1,'isFromAdapter':!0x0});}),this['listenTo'](_0x26ee70,'commentThreadResolved',(_0x44fba8,{commentThreadId:_0x48bae0,resolvedBy:_0x37a000,resolvedAt:_0x21241f})=>{const _0x174c3a=_0x203c04['getCommentThread'](_0x48bae0);_0x174c3a&&_0x174c3a['resolve']({'resolvedBy':_0x37a000,'resolvedAt':_0x21241f,'isFromAdapter':!0x0});}),this['listenTo'](_0x26ee70,'commentThreadReopened',(_0x41176b,{commentThreadId:_0xcd4c2e})=>{const _0x1cf7e1=_0x203c04['getCommentThread'](_0xcd4c2e);_0x1cf7e1&&_0x1cf7e1['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x26ee70,'commentThreadRemoved',(_0x44d918,{commentThreadId:_0x38a7f5})=>{const _0x48016b=_0x203c04['getCommentThread'](_0x38a7f5);_0x48016b&&_0x48016b['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x26ee70,'commentAdded',(_0xe05bc9,_0x5f1e6a)=>{const _0x2c825a=_0x5f1e6a['commentThreadId'],_0x26490a=_0x203c04['getCommentThread'](_0x2c825a);_0x26490a&&_0x26490a['addComment']({...b(_0x5f1e6a),'isFromAdapter':!0x0});}),this['listenTo'](_0x26ee70,'commentUpdated',(_0x3e5438,{commentThreadId:_0x5de6fa,commentId:_0x8589d3,content:_0x4e4624,attributes:_0xda6312})=>{const _0x5f4e90=_0x203c04['getCommentThread'](_0x5de6fa);if(_0x5f4e90){const _0x3bd6da=_0x5f4e90['getComment'](_0x8589d3);_0x3bd6da&&_0x3bd6da['update']({'content':_0x4e4624,'attributes':_0xda6312,'isFromAdapter':!0x0});}}),this['listenTo'](_0x26ee70,'commentRemoved',(_0x3a52ca,{commentThreadId:_0x1c74c8,commentId:_0x31539e})=>{const _0x5f5020=_0x203c04['getCommentThread'](_0x1c74c8);if(_0x5f5020){const _0x1ca1ae=_0x5f5020['getComment'](_0x31539e);_0x1ca1ae&&_0x1ca1ae['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x422023);}['destroy'](){if(this['context']instanceof _0x3ebec1){const _0x24b0ee=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x24b0ee);}}['_terminateService'](_0x28882c){if(!this['_services']['has'](_0x28882c))throw new _0x5dafe4('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x28882c});this['_getService'](_0x28882c)['disconnect'](),this['_services']['delete'](_0x28882c);}async['reconnect'](){for(const _0x259b13 of this['_services']['keys']())await this['_connectService'](_0x259b13);if(this['context']instanceof _0x3ebec1){const _0xf4b0c4=this['context']['config']['get']('collaboration.channelId'),_0x548eea=this['context']['plugins']['get'](i);_0x548eea['unregister'](_0xf4b0c4);const _0x5f18df=await this['_services']['get'](_0xf4b0c4)['getConnectedSessions']();_0x548eea['register'](_0xf4b0c4,_0x5f18df);}}async['_connectService'](_0x465b6f){const {connection:_0x2fca9f}=this['context']['plugins']['get'](c),_0x40f460=this['context']['plugins']['get']('CommentsRepository'),_0x8c84e9=this['_services']['get'](_0x465b6f),_0x4ea6e6=await _0x8c84e9['connect'](_0x2fca9f);await this['_fetchMissingUsersForThreads'](_0x4ea6e6);const _0x1f94ed=new Set(Array['from'](_0x40f460['getCommentThreads']({'channelId':_0x465b6f}),_0x11f489=>_0x11f489['id']));for(const _0x17ce54 of _0x4ea6e6)_0x17ce54['deletedAt']||_0x1f94ed['delete'](_0x17ce54['commentThreadId']);for(const _0x37ba82 of _0x1f94ed)_0x40f460['getCommentThread'](_0x37ba82)['remove']({'isFromAdapter':!0x0});for(const _0x5803b0 of _0x4ea6e6){let _0x3ba9c3=_0x40f460['getCommentThread'](_0x5803b0['commentThreadId']);const {commentThreadId:_0x45e322,context:_0x41249c,attributes:_0x489ae1,resolvedBy:_0x32e763,resolvedAt:_0x5502ee,unlinkedAt:_0x1e1f53,deletedAt:_0xf8df10}=_0x5803b0;if(_0xf8df10)continue;_0x3ba9c3||(_0x3ba9c3=_0x40f460['addCommentThread']({'channelId':_0x465b6f,'threadId':_0x45e322,'context':_0x41249c,'attributes':_0x489ae1||{},'resolvedBy':_0x32e763,'resolvedAt':_0x5502ee,'unlinkedAt':_0x1e1f53,'isFromAdapter':!0x0}));const _0xa6af30=new Set(Array['from'](_0x3ba9c3['comments'],_0x72055f=>_0x72055f['id']));for(const _0x428b49 of _0x5803b0['comments'])_0xa6af30['delete'](_0x428b49['commentId']);for(const _0x353af3 of _0xa6af30)_0x3ba9c3['getComment'](_0x353af3)['remove']({'isFromAdapter':!0x0});for(const _0x362945 of _0x5803b0['comments']){const _0x59c7a7=_0x3ba9c3['getComment'](_0x362945['commentId']);_0x59c7a7?_0x59c7a7['content']!==_0x362945['content']&&_0x59c7a7['update']({'content':_0x362945['content'],'isFromAdapter':!0x0}):_0x3ba9c3['addComment'](Object['assign'](b(_0x362945),{'isFromAdapter':!0x0}));}}}['_getService'](_0x3acba4){if(!this['_services']['has'](_0x3acba4))throw new _0x5dafe4('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0x3acba4});return this['_services']['get'](_0x3acba4);}async['_fetchMissingUsersForThreads'](_0xfe29f8){const _0x350788=this['context']['plugins']['get'](_0x168467),{connection:_0x5722fe}=this['context']['plugins']['get'](c),_0xbfd4f9=new Set();for(const {resolvedBy:_0x1271fe,comments:_0x524df3}of _0xfe29f8){_0x1271fe&&!_0x350788['getUser'](_0x1271fe)&&_0xbfd4f9['add'](_0x1271fe);for(const {userId:_0x455e86}of _0x524df3)_0x350788['getUser'](_0x455e86)||_0xbfd4f9['add'](_0x455e86);}if(0x0===_0xbfd4f9['size'])return;const _0x5199ee=await lt['getMany'](_0x5722fe,Array['from'](_0xbfd4f9));for(const _0x3b6f8e of _0x5199ee)_0x350788['getUser'](_0x3b6f8e['id'])||_0x350788['addUser'](_0x3b6f8e);}}async function y(_0x3ae56d){if('404'!==_0x3ae56d['code'])throw _0x3ae56d;}function dt(_0x5e7148){if((_0x450073=_0x5e7148)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x450073['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x450073['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x450073;throw _0x5e7148;}function b(_0x3aa81e){return{'threadId':_0x3aa81e['commentThreadId'],'commentId':_0x3aa81e['commentId'],'content':_0x3aa81e['content'],'createdAt':_0x3aa81e['createdAt'],'authorId':_0x3aa81e['userId'],'attributes':_0x3aa81e['attributes']||{}};}class f extends _0x5ae23e{static ['TrackChangesService']=/* #__PURE__ -- @preserve */
|
|
27
|
-
((()=>
|
|
28
|
-
((()=>_0x3af8a8)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x168467];}static get['pluginName'](){return'CloudServicesRevisionHistoryAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x6424f8){super(_0x6424f8);const _0x5b0cc7=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x5b0cc7);}async['init'](){const _0x43ae6c=this['editor']['plugins']['get'](l),_0x576b66=_0x43ae6c['serverHistory'],_0x5d1ec=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x576b66,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x43ae6c['sessionId']});const _0x389a63=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x2fd515=await _0x166950['isBundleUploaded'](_0x5d1ec['connection'],_0x389a63);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x415204})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x415204)),'updateRevisions':async _0x437de7=>{await this['_waitForServiceReady']();const _0x3245ec=this['_revisionTracker']['currentRevision'];if(_0x2fd515&&0x1===_0x437de7['length']&&_0x437de7[0x0]['id']===_0x3245ec['id'])return _0x437de7;for(const _0x5a8484 of _0x437de7)_0x5a8484['id']===_0x3245ec['id']&&(_0x5a8484['isEmptyCurrent']=_0x5a8484['fromVersion']===_0x5a8484['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x437de7,this['_lastRequestId'])['then'](_0x52d757=>(this['_lastRequestId']=_0x52d757,_0x437de7))['catch'](_0x3b6f5b=>{if(P(_0x3b6f5b)||'400'===_0x3b6f5b['code']&&void 0x0!==_0x3b6f5b['data']['wrongRequestId']){for(const _0x402818 of _0x437de7){!this['_revisionTracker']['repository']['getRevision'](_0x402818['id'])||this['_revisionTracker']['_bufferUpdate'](_0x402818['id'],_0x402818,!0x1);}if(P(_0x3b6f5b))throw _0x3b6f5b;return _0x437de7;}throw _0x3b6f5b;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x417f4b,{revisionsData:_0xb8e498,requestId:_0x498bb6})=>{Math['max'](..._0xb8e498['map'](_0x4be211=>_0x4be211['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0xb8e498,_0x498bb6);}):this['_handleRevisionsUpdate'](_0xb8e498,_0x498bb6);});const {revisions:_0x47ff83,requestId:_0x1a97bf}=await this['_revisionHistoryService']['connect'](_0x5d1ec['connection']);_0x5d1ec['addToReconnectionStack'](this),this['_lastRequestId']=_0x1a97bf,await this['_fetchMissingUsers'](_0x47ff83);for(const _0x180515 of _0x47ff83)this['_revisionTracker']['addRevisionData'](_0x180515);this['listenTo'](_0x43ae6c,'change:_isConnected',(_0x3e02a6,_0x35b5c1,_0x2851bf)=>{_0x2851bf&&(this['_oldOffset']=_0x43ae6c['_offset'],_0x3e02a6['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x5d1ec,'state',_0x11da30=>_0x11da30===_0xb3db39['CONNECTED']);}async['reconnect'](){const _0x35a06d=this['editor']['plugins']['get'](c),_0x35e66f=this['editor']['plugins']['get'](l),_0x4bae06=async()=>{const _0x31690d=this['_revisionTracker']['currentRevision'],_0x1eb53f=_0x31690d['id'],_0x24c83d=_0x1eb53f!==_0x35e66f['sessionId'];if(_0x24c83d){const _0x5d8b4d=_0x35e66f['_offset']-this['_oldOffset'],_0x28a78b=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x31690d['toVersion']+_0x5d8b4d!==_0x28a78b){const _0x6745d5=_0x31690d['fromVersion']+_0x5d8b4d,_0x107d32=this['editor']['plugins']['get'](_0x168467),_0x18c8fc=this['_revisionTracker']['buildRevisionData']({'revision':_0x31690d,'from':_0x6745d5,'to':_0x28a78b});_0x18c8fc['id']=_0x31690d['id'];const _0x44db0a=_0x18c8fc['authorsIds']['map'](_0x5aecd1=>_0x107d32['getUser'](_0x5aecd1));_0x31690d['_update']({..._0x18c8fc,'authors':_0x44db0a},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x31690d['id'],_0x18c8fc,!0x0);}this['_revisionTracker']['_startingVersion']=_0x28a78b,(_0x31690d['toVersion']===_0x31690d['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x1eb53f)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x1eb53f),this['_revisionTracker']['_createCurrentRevision'](_0x28a78b));}const {revisions:_0x4d93e1,requestId:_0x583665}=await this['_revisionHistoryService']['reconnect'](_0x35a06d['connection'],this['_lastRequestId']);_0x24c83d&&_0x4d93e1['length']>0x0?_0x35e66f['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x4d93e1),this['_handleRevisionsUpdate'](_0x4d93e1,_0x583665),this['_revisionTracker']['sendBufferedUpdates']());};return _0x35e66f['_isConnected']?_0x4bae06():new Promise((_0x922873,_0x46e461)=>{_0x35e66f['once']('change:_isConnected',()=>{_0x4bae06()['then'](_0x922873)['catch'](_0x46e461);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x293f5c=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x438a24=>{_0x438a24['off'](),_0x293f5c();});});}['_getLatestVersionFromServerOperations'](){const _0x61e3de=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x2a8634 of _0x61e3de)if('marker'!==_0x2a8634['type']||_0x2a8634['affectsData'])return _0x2a8634['baseVersion']+0x1;}['_getLatestVersion'](){const _0x24c3ff=this['editor']['plugins']['get'](l);return new Promise(_0x57eec3=>{_0x24c3ff['_isPendingUpdate']?_0x24c3ff['once']('change:_isPendingUpdate',()=>{_0x57eec3(this['_getLatestVersionFromServerOperations']());}):_0x57eec3(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x51c773,_0x417961){const _0x132dc9=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x417961;for(const _0x2cbfb4 of _0x51c773){const _0x55f461=_0x132dc9['getRevision'](_0x2cbfb4['id']);if(_0x55f461){if((_0x2cbfb4['fromVersion']||_0x2cbfb4['toVersion'])&&(_0x2cbfb4['diffData']=null),_0x55f461===this['_revisionTracker']['currentRevision']){const _0x35b9d2=Math['max'](_0x55f461['toVersion'],_0x2cbfb4['toVersion']),_0x32825f=Math['max'](_0x55f461['fromVersion'],_0x2cbfb4['fromVersion']);let _0x4a8d4e;_0x55f461['toVersion']===_0x2cbfb4['toVersion']&&_0x55f461['fromVersion']===_0x2cbfb4['fromVersion']?(_0x4a8d4e=!0x0,this['_preventResendingRevisionData'](_0x2cbfb4)):_0x2cbfb4['toVersion']===_0x35b9d2&&_0x2cbfb4['fromVersion']===_0x32825f?_0x4a8d4e=!0x1:(_0x55f461['toVersion']===_0x35b9d2&&_0x55f461['fromVersion']===_0x32825f||this['_fixRevision']({'revision':_0x55f461,'from':_0x32825f,'to':_0x35b9d2}),_0x4a8d4e=!0x0),_0x4a8d4e&&(delete _0x2cbfb4['fromVersion'],delete _0x2cbfb4['toVersion'],delete _0x2cbfb4['diffData'],delete _0x2cbfb4['createdAt'],delete _0x2cbfb4['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x2cbfb4),this['_preventResendingRevisionData'](_0x2cbfb4);}else this['_revisionTracker']['addRevisionData'](_0x2cbfb4);}const _0xe8a555=_0x132dc9['getRevisions']();_0xe8a555['reverse']();for(let _0x2b384a=0x0;_0x2b384a<_0xe8a555['length']-0x1;_0x2b384a++){const _0x4a042e=_0xe8a555[_0x2b384a],_0x1e0022=_0xe8a555[_0x2b384a+0x1];if(_0x4a042e['fromVersion']<_0x1e0022['toVersion']){const _0x2f82de=_0x1e0022['toVersion'],_0x19eb36=Math['max'](_0x2f82de,_0x4a042e['toVersion']);this['_fixRevision']({'revision':_0x4a042e,'from':_0x2f82de,'to':_0x19eb36});}}}['_fixRevision']({revision:_0x45eb63,from:_0x378fac,to:_0x1d521f}={}){const _0x3b1d02=this['editor']['plugins']['get'](_0x168467),_0x47bec5=this['_revisionTracker']['buildRevisionData']({'revision':_0x45eb63,'from':_0x378fac,'to':_0x1d521f});_0x47bec5['authors']=_0x47bec5['authorsIds']['map'](_0x5d8ec0=>_0x3b1d02['getUser'](_0x5d8ec0)),_0x45eb63['_update'](_0x47bec5);}['_preventResendingRevisionData'](_0x28db74){const _0x528893={};_0x528893['id']=_0x28db74['id'];for(const _0x138771 of Object['keys'](_0x28db74))'id'!==_0x138771&&(_0x528893[_0x138771]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x528893['id'],_0x528893,!0x0);}async['_fetchMissingUsers'](_0x5279a6){const _0x500947=this['editor']['plugins']['get'](_0x168467),{connection:_0x49f248}=this['editor']['plugins']['get'](c),_0x1e400d=new Set();for(const _0x444e27 of _0x5279a6){for(const _0xb8fb16 of _0x444e27['authorsIds'])_0x4187b8(_0xb8fb16);_0x444e27['creatorId']&&_0x4187b8(_0x444e27['creatorId']);}if(0x0===_0x1e400d['size'])return;const _0x3a8baf=await lt['getMany'](_0x49f248,Array['from'](_0x1e400d));for(const _0x1223b9 of _0x3a8baf)_0x500947['getUser'](_0x1223b9['id'])||_0x500947['addUser'](_0x1223b9);function _0x4187b8(_0x70081){_0x500947['getUser'](_0x70081)||_0x1e400d['add'](_0x70081);}}}function P(_0x37ed00){return _0x37ed00['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x37ed00['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x37ed00['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x5ae23e{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 _0x258e32{constructor(_0x599f83){super(_0x599f83);const _0x33e445=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x33e445['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x33e445['to']('usersCount',_0x3c6807=>Q(_0x599f83,'CONNECTED_USERS',_0x3c6807))}]});}}class es extends _0x258e32{['items'];['keystrokes'];constructor(_0x232aa8){super(_0x232aa8);const _0x4921ff=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x1362ce(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x4921ff['if']('hasPopup'),'aria-expanded':_0x4921ff['to']('isExpanded',_0x27f637=>this['hasPopup']&&String(_0x27f637)),'aria-label':_0x4921ff['to']('hasPopup',_0x246839=>Q(_0x232aa8,_0x246839?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x4921ff['to']('hasPopup',_0x5c1f7d=>!!_0x5c1f7d&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x4921ff['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x4a1db9,_0x3521c9,_0x17b5a9)=>{this['element']&&(_0x17b5a9?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 _ extends _0x258e32{['counterView'];['inlineListView'];constructor(_0xcf8fc1){super(_0xcf8fc1);const _0x340e1d=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0xcf8fc1),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x17184c of this['inlineListView']['items'])_0x17184c['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',_0x340e1d['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class M extends _0x258e32{['listWrapperView'];constructor(_0x4f7f56,_0x5629d4){super(_0x4f7f56),this['listWrapperView']=new ft(_0x4f7f56,_0x5629d4),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':Q(_0x4f7f56,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class ft extends _0x176ef2{constructor(_0x5a6684,_0x5cda0e){super(_0x5a6684);const _0x2510fb=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x5cda0e?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x2510fb['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x2510fb['to']('role'),'aria-label':_0x2510fb['to']('ariaLabel'),'aria-labelledby':_0x2510fb['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x348fa0['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x176ec4=this['element'];_0x176ec4&&(this['_isScrollable']=Math['max'](_0x176ec4['scrollHeight'],_0x176ec4['clientHeight'])>0.8*window['innerHeight']);}}class E extends et{['userView'];constructor(_0x58ea83,_0x2f415b,_0x4ef5af){super(_0x58ea83);const _0x2f6544=this['bindTemplate'];this['userView']=new rt(_0x58ea83,_0x2f415b);const _0x1ce010={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x2f415b['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x2f415b['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x2f415b['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x4ef5af&&(_0x1ce010['tag']='button',_0x1ce010['on']={'click':_0x2f6544['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x1ce010);}['focus'](){this['element']['focus']();}}class T extends _0x258e32{['userView'];['markerView'];constructor(_0x36ec14,_0x252362,_0x31e70f){super(_0x36ec14);const _0x12a57f=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new rt(_0x36ec14,_0x252362),this['markerView']=new ct(_0x36ec14,_0x252362);const _0x35a38a=new ot(_0x36ec14);_0x35a38a['template']['tag']='span',_0x35a38a['text']=_0x252362['name'];const _0x3ec8a1={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x12a57f['to']('isFocusable',_0x5bc86a=>!!_0x5bc86a&&0x0),'aria-labelledby':_0x35a38a['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x12a57f['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x12a57f['to']('hasTooltip',_0x2b2837=>!_0x2b2837),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x35a38a]};_0x31e70f&&(_0x3ec8a1['tag']='button',_0x3ec8a1['on']={'click':_0x12a57f['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x3ec8a1);}}class ct extends _0x258e32{constructor(_0xd121b8,_0xce8356){super(_0xd121b8),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0xce8356['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const D={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x5bc9f1{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x49c3ca){super(_0x49c3ca),this['context']['config']['define']('presenceList',D);const _0x486a0a=_0x49c3ca['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x486a0a)throw new _0x5dafe4('presencelist-collapseat-invalid-format',this);if(_0x486a0a<0x1)throw new _0x5dafe4('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x22f200(),this['balloonPanelView']=new _0x98860e(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x5ea34a of this['_allConnectedUsers'])this['_handleUserAdd'](_0x5ea34a);this['listenTo'](this['_allConnectedUsers'],'add',(_0xe40dd5,_0x20615e)=>{this['_handleUserAdd'](_0x20615e);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x37ff13,_0x22136b)=>{this['_handleUserRemove'](_0x22136b);});}['_createView'](){const _0x2e739a=this['context'],_0x84046e=new _(this['context']['locale']),_0x56f7a7=this['balloonPanelView'];if(!_0x3745c5(_0x2e739a['config']['get']('presenceList.container')))throw new _0x5dafe4('presencelist-missing-container',this);return _0x84046e['counterView']['bind']('usersCount')['to'](this),_0x84046e['bind']('isCollapsed')['to'](this,'usersCount',_0x11e9d9=>{const {collapseAt:_0x1fae18,displayMe:_0x401b10}=_0x2e739a['config']['get']('presenceList'),_0xe518de=_0x11e9d9>=_0x1fae18;return _0x84046e['counterView']['isHidden']=!(0x1==_0x11e9d9&&_0x401b10||_0xe518de),_0xe518de||this['hideDropdown'](),_0xe518de;}),_0x84046e['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x368af1=>{const _0x2d2d34=_0x2e739a['config']['get']('presenceList'),_0x467e40=new T(_0x2e739a['locale'],_0x368af1,!!_0x2d2d34['onClick']);return _0x467e40['bind']('hasTooltip')['to'](_0x84046e,'isCollapsed',_0x453204=>!_0x453204),_0x467e40['bind']('isFocusable')['to'](_0x84046e,'isCollapsed',_0x5b45fd=>!_0x5b45fd),_0x2d2d34['onClick']&&this['listenTo'](_0x467e40,'execute',()=>{this['view']['isCollapsed']||_0x2d2d34['onClick'](_0x368af1,_0x467e40['element']);}),_0x467e40;}),this['listenTo'](_0x84046e['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x84046e['inlineListView']['keystrokes']['set']('Enter',(_0x26fd8c,_0x2560ad)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x2560ad());}),_0x84046e['render'](),_0x56f7a7['render'](),_0x3878d8({'emitter':_0x84046e,'activator':()=>_0x56f7a7['isVisible'],'contextElements':[_0x56f7a7['element'],_0x84046e['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x2e739a['config']['get']('presenceList.container')['appendChild'](_0x84046e['element']),this['_bodyCollection']=new _0x9f0ffd(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x84046e;}['_handleUserAdd'](_0x57f75c){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x57f75c['isMe'])return;const _0x42d4e2=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x42d4e2&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x590fc6=_0x57f75c['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x57f75c,_0x590fc6);}['_handleUserRemove'](_0x1ee36b){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x1ee36b['id'])&&(this['currentDisplayedUsers']['remove'](_0x1ee36b['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x437734 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x437734['id']))return void this['currentDisplayedUsers']['add'](_0x437734,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x39ba31=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new M(this['context']['locale'],!!_0x39ba31['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x287384}=this['presenceDropdownView'];_0x287384['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x30baf5=>{if(!_0x39ba31['displayMe']&&_0x30baf5['isMe'])return null;const _0x228e99=new E(this['context']['locale'],_0x30baf5,!!_0x39ba31['onClick']);return _0x39ba31['onClick']&&this['listenTo'](_0x228e99,'execute',()=>{_0x39ba31['onClick'](_0x30baf5,_0x228e99['element']);}),_0x228e99;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x287384['focus'](),_0x287384['checkIfScrollable']();const _0x34e5fa=(_0x4c1c23,_0x191ce5)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x191ce5();};_0x287384['keystrokes']['set']('Esc',_0x34e5fa),_0x287384['keystrokes']['set']('Shift+Tab',_0x34e5fa),_0x287384['keystrokes']['set']('Tab',(_0x3a6318,_0x65a2c8)=>{!function(_0x3265e5){const _0x5191d2=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x39ff0c=>_0x39ff0c+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x2e7fb7=[...document['body']['querySelectorAll'](_0x5191d2)]['filter'](_0x128ec9=>_0x128ec9===document['activeElement']||_0x128ec9['offsetWidth']+_0x128ec9['offsetHeight']>0x0)['sort']((_0x2a3bf9,_0x4d5cbf)=>(_0x2a3bf9['tabIndex']||0x0)-(_0x4d5cbf['tabIndex']||0x0)),_0x4cf29a=_0x2e7fb7['indexOf'](_0x3265e5),_0x4463a1=_0x2e7fb7[(_0x4cf29a+0x1)%_0x2e7fb7['length']];_0x4463a1&&_0x4463a1['focus']();}(this['view']['element']),this['hideDropdown'](),_0x65a2c8();}),_0x287384['focusTracker']['add'](this['view']['element']),_0x287384['focusTracker']['on']('change:isFocused',(_0x65c797,_0x31aff3,_0x3f538a)=>{_0x3f538a||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 _0x5bc9f1{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 _0x44cad5,Plugin as _0x3aa519,PendingActions as _0x4bc24d,Context as _0x36edd1}from'@ckeditor/ckeditor5-core/dist/index.js';import{DomEmitterMixin as _0x2416f5,CKEditorError as _0x33cd62,Collection as _0x35e6fd,global as _0x3d2acd,version as nt,uid as _0x243928,KeystrokeHandler as _0x47fa68}from'@ckeditor/ckeditor5-utils/dist/index.js';import{Notification as _0x2a5600,View as _0x11e2dc,ListView as _0x40737a,ListItemView as rt,LabelView as ot,BalloonPanelView as _0xb1cf9a,clickOutsideHandler as _0x24e8ff,BodyCollection as _0x2a110c}from'@ckeditor/ckeditor5-ui/dist/index.js';import{LiveRange as ht,History as _0xfe3099,NoOperation as _0x15be44,InsertOperation as _0x107b34,MarkerOperation as _0x1cded2,RootAttributeOperation as _0x1215aa,transformSets as _0x357384,OperationFactory as _0x1b15ef}from'@ckeditor/ckeditor5-engine/dist/index.js';import{WebSocketGateway as lt,WEB_SOCKET_GATEWAY_STATES as _0x198497,CollaborativeEditingService as _0x305cc7,User as dt,CommentsService as _0x2f050d,TrackChangesService as et,RevisionHistoryService as it,EditorService as tt}from'@ckeditor/ckeditor-cloud-services-collaboration/dist/index.js';import{Users as _0x1f4be7,UserView as ct}from'ckeditor5-collaboration/dist/index.js';import{Compressor as _0x264e7c}from'@ckeditor/ckeditor5-operations-compressor/dist/index.js';import{isElement as _0xc0e31b}from'lodash-es';class c extends _0x44cad5{static ['WebSocketGateway']=/* #__PURE__ -- @preserve */
|
|
24
|
+
((()=>lt)());static ['initialReconnectionInterval']=0x3e8;['connection'];['_reconnectionStack'];['_shouldPluginsReconnect'];['_domEmitter'];static get['requires'](){return['CloudServices',_0x2a5600];}static get['pluginName'](){return'WebSocketGateway';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d2d1c){super(_0x4d2d1c),this['set']('state',_0x198497['CONNECTED']),this['set']('_isBrowserOffline',!0x1),this['_reconnectionStack']=new Set(),this['_shouldPluginsReconnect']=!0x1,this['_domEmitter']=Object['create'](_0x2416f5);}['init'](){const _0x57fa66=this['context'],_0x4337f6=_0x57fa66['plugins']['get']('CloudServices'),_0x315e32=_0x57fa66['plugins']['get'](_0x2a5600);if(!_0x4337f6['token'])throw new _0x33cd62('websocketgateway-missing-token',this);if(!_0x4337f6['webSocketUrl'])throw new _0x33cd62('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'](_0x4337f6['token'],_0x4337f6['webSocketUrl'],{'timeout':0x3e8*this['context']['config']['get']('cloudServices.connectionTimeout'),'requestTimeout':0x3e8*this['context']['config']['get']('cloudServices.requestTimeout')})['then'](_0x40870a=>{if(this['connection']=_0x40870a,this['bind']('state')['to'](_0x40870a,'state',this,'_isBrowserOffline',(_0x386be5,_0x2beb08)=>('connected'!==_0x386be5&&(this['_shouldPluginsReconnect']=!0x0),_0x2beb08||_0x386be5!==_0x198497['CONNECTED']?_0x198497['DISCONNECTED']:this['state']==_0x198497['DISCONNECTED']&&this['_shouldPluginsReconnect']?(this['_shouldPluginsReconnect']=!0x1,this['_reconnect'](),_0x198497['CONNECTING']):_0x198497['CONNECTED'])),this['connection']['on']('error',(_0x122e64,_0x85ad97)=>{if('limitExceeded'!==_0x85ad97['code'])throw console['error'](_0x85ad97),new _0x33cd62('cloudservices-init',null,{'originalError':_0x85ad97});_0x315e32['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'});}),!_0x40870a['me'])return new Promise(_0x13445b=>_0x40870a['on']('change:me',_0x13445b));})['catch'](_0x2a6c84=>{throw console['error'](_0x2a6c84),new _0x33cd62('cloudservices-init',null,{'originalError':_0x2a6c84});});}['addToReconnectionStack'](_0x4459cd){if('function'!=typeof _0x4459cd['reconnect'])throw new _0x33cd62('websocketgateway-invalid-plugin-interface',this);if(this['isInReconnectionStack'](_0x4459cd))throw new _0x33cd62('websocketgateway-plugin-already-registered',this,{'name':_0x4459cd['constructor']['pluginName']});this['_reconnectionStack']['add'](_0x4459cd);}['removeFromReconnectionStack'](_0x1f05c8){this['_reconnectionStack']['delete'](_0x1f05c8);}['isInReconnectionStack'](_0x571c97){return this['_reconnectionStack']['has'](_0x571c97);}['_reconnect'](){return this['connection']['reconnect']()['then'](()=>Promise['all'](Array['from'](this['_reconnectionStack'],_0x4752ab=>_0x4752ab['reconnect']())))['then'](()=>this['state']=_0x198497['CONNECTED'])['catch'](_0x316696=>{throw console['error'](_0x316696),new _0x33cd62('cloudservices-reconnection-error',this['context']);});}['destroy'](){this['connection']&&this['connection']['disconnect'](),this['state']=_0x198497['DISCONNECTED'],this['_domEmitter']['stopListening'](),super['destroy']();}}class i extends _0x44cad5{['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,_0x1f4be7];}constructor(_0xa873fd){super(_0xa873fd),this['channelSessions']=new Map(),this['channelConnectedUsers']=new Map(),this['allConnectedUsers']=new _0x35e6fd(),this['_registeredSessions']=new Map(),this['_uniqueUsersCount']=0x0,this['_users']=this['context']['plugins']['get'](_0x1f4be7);}['init'](){const _0x9a0a35=this['context']['plugins']['get'](c);this['listenTo'](_0x9a0a35,'change:state',(_0x4512ad,_0x8d4b82,_0x3ff0e0)=>{if('connected'!==_0x3ff0e0)this['channelSessions']['forEach'](_0x538886=>_0x538886['clear']()),this['channelConnectedUsers']['forEach'](_0x3ab997=>_0x3ab997['clear']()),this['allConnectedUsers']['clear']();else{for(const [_0x55133f,_0x5e78e8]of this['_registeredSessions'])for(const _0x207bb5 of _0x5e78e8)this['_handleSessionAdd'](_0x55133f,_0x207bb5);}}),this['_createUser'](_0x9a0a35['connection']['me'],!0x0);}['register'](_0x4d9d48,_0x342e36){if(this['_registeredSessions']['has'](_0x4d9d48))throw new _0x33cd62('sessions-register-already-registered',null,{'channelId':_0x4d9d48});this['_registeredSessions']['set'](_0x4d9d48,_0x342e36),this['channelSessions']['set'](_0x4d9d48,new _0x35e6fd()),this['channelConnectedUsers']['set'](_0x4d9d48,new _0x35e6fd()),this['listenTo'](_0x342e36,'add',(_0x5db8ad,_0xef208a)=>this['_handleSessionAdd'](_0x4d9d48,_0xef208a)),this['listenTo'](_0x342e36,'remove',(_0x3d7857,_0x2d8113)=>this['_handleSessionRemove'](_0x4d9d48,_0x2d8113));for(const _0x36a357 of _0x342e36)this['_handleSessionAdd'](_0x4d9d48,_0x36a357);}['unregister'](_0x23bf12){if(!this['_registeredSessions']['has'](_0x23bf12))throw new _0x33cd62('sessions-unregister-not-exist',null,{'channelId':_0x23bf12});const _0x22cf9c=this['_registeredSessions']['get'](_0x23bf12);this['stopListening'](_0x22cf9c);for(const _0x87ff39 of _0x22cf9c)'connected'===this['context']['plugins']['get'](c)['state']&&this['_handleSessionRemove'](_0x23bf12,_0x87ff39);this['_registeredSessions']['delete'](_0x23bf12),this['channelSessions']['delete'](_0x23bf12),this['channelConnectedUsers']['delete'](_0x23bf12);}get['mySessionId'](){return this['context']['plugins']['get'](c)['connection']['sessionId'];}['getUserBySessionId'](_0x23f4b1){for(const _0x26b12d of this['channelSessions']['values']())for(const _0x3f4a29 of _0x26b12d)if(_0x3f4a29['id']===_0x23f4b1)return _0x3f4a29['user'];}['getUserSessions'](_0x53a561,_0x3becf2){const _0x386177=_0x3becf2?[this['channelSessions']['get'](_0x3becf2)]:this['channelSessions']['values'](),_0xb78153=new Set();for(const _0x4e7a85 of _0x386177)for(const _0x33535c of _0x4e7a85)_0x33535c['user']['id']===_0x53a561['id']&&_0xb78153['add'](_0x33535c['id']);return _0xb78153;}['getUserRole'](_0x3eaa56){for(const _0x43d1d9 of this['channelSessions']['values']())for(const _0x3006c4 of _0x43d1d9)if(_0x3006c4['user']===_0x3eaa56)return _0x3006c4['role'];}['_handleSessionAdd'](_0x37a35e,_0x9a48db){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x2c8d9f=_0x9a48db['user'],_0x3969f0=this['_users']['getUser'](_0x2c8d9f['id'])||this['_createUser'](_0x2c8d9f),_0x4f1e8f=Object['assign']({},_0x9a48db,{'user':_0x3969f0});this['channelSessions']['get'](_0x37a35e)['add'](_0x4f1e8f);const _0x5de800=this['channelConnectedUsers']['get'](_0x37a35e);_0x5de800['has'](_0x3969f0['id'])||_0x5de800['add'](_0x3969f0),this['allConnectedUsers']['has'](_0x3969f0['id'])||this['allConnectedUsers']['add'](_0x3969f0,_0x3969f0['isMe']?0x0:void 0x0),this['fire']('sessionAdd:'+_0x37a35e,{'channelId':_0x37a35e,'session':_0x4f1e8f});}['_handleSessionRemove'](_0x187e41,_0x4c2f8f){if('connected'!==this['context']['plugins']['get'](c)['state'])return;const _0x4412c2=this['channelConnectedUsers']['get'](_0x187e41),_0x47471b=_0x4c2f8f['user'];_0x47471b['id']&&(this['channelSessions']['get'](_0x187e41)['remove'](_0x4c2f8f['id']),_0x4412c2['has'](_0x47471b['id'])&&!this['getUserSessions'](_0x47471b,_0x187e41)['size']&&_0x4412c2['remove'](_0x47471b['id']),this['allConnectedUsers']['get'](_0x47471b['id'])&&!this['getUserSessions'](_0x47471b)['size']&&this['allConnectedUsers']['remove'](_0x47471b['id']));}['_createUser'](_0x394892,_0x3be342){const _0x581a22=this['_users']['addUser'](_0x394892);return _0x3be342&&this['_users']['defineMe'](_0x394892['id']),_0x581a22['orderNumber']=this['_uniqueUsersCount']++,_0x581a22;}}class H extends _0x3aa519{['_domEmitter']=new(_0x2416f5())();static get['requires'](){return[i];}static get['pluginName'](){return'UserMarkers';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['init'](){const _0x269861=this['editor'],_0x5eebd6=_0x269861['plugins']['get'](i);_0x269861['conversion']['for']('editingDowncast')['markerToElement']({'model':'user:position','view':(_0x1ddbad,{writer:_0x256eee})=>function(_0x5d8189,_0x3096a7,_0x32ab33,_0x2b4775){const _0x3fd93e=_0x5d8189['markerName']['split'](':')[0x2],_0x2bba4e=_0x32ab33['getUserBySessionId'](_0x3fd93e);if(!_0x2bba4e||_0x3fd93e===_0x32ab33['mySessionId'])return;if(!_0x2b4775['model']['schema']['checkChild'](_0x5d8189['markerRange']['start'],'$text'))return;const _0x49d85f={'class':'ck-user__marker\x20'+_0x2bba4e['color']['getMarkerClass'](),'data-name':_0x2bba4e['name'],'data-session-id':_0x3fd93e},_0x1a2ad0=_0x2b4775['model']['markers']['get'](_0x5d8189['markerName']),_0x1e8712=_0x1a2ad0['getStart'](),_0x4cc7e6=_0x1e8712['nodeAfter'],_0xe37dfc=_0x2b4775['model']['schema'];if(_0x4cc7e6&&_0xe37dfc['isObject'](_0x4cc7e6)&&_0xe37dfc['isInline'](_0x4cc7e6)&&!_0x2b4775['model']['markers']['get']('user:range:'+_0x3fd93e)['getRange']()['isCollapsed'])return;const _0x23fe4d=_0x1e8712['parent'];return _0x2b4775['model']['schema']['isLimit'](_0x23fe4d)&&!_0x2b4775['model']['hasContent'](_0x23fe4d)&&(_0x49d85f['contenteditable']=!0x1),function(_0x524464,_0x45491d,_0x5270ac){const _0x1ba26a=_0x524464['createUIElement']('span',_0x45491d);return _0x524464['setCustomProperty']('userPositionMarker',!0x0,_0x1ba26a),_0x1ba26a['render']=function(_0x5e38df){const _0x3881d1=this['toDomElement'](_0x5e38df);return _0x3881d1['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>'+_0x5270ac['name']+'</span>',_0x3881d1['addEventListener']('mouseenter',()=>{_0x3881d1['classList']['add']('ck-user__marker_hovered');}),_0x3881d1['addEventListener']('mouseleave',()=>{_0x3881d1['classList']['remove']('ck-user__marker_hovered');}),_0x3881d1;},_0x1ba26a['isSimilar']=function(_0x5ea6d9){return!(!this['getCustomProperty']('userPositionMarker')||!_0x5ea6d9['getCustomProperty']('userPositionMarker')||this['getAttribute']('data-session-id')!=_0x5ea6d9['getAttribute']('data-session-id'));},_0x1ba26a;}(_0x3096a7,_0x49d85f,_0x2bba4e);}(_0x1ddbad,_0x256eee,_0x5eebd6,_0x269861)}),_0x269861['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'user:range','view':_0x55c877=>function(_0x3c3d98,_0x2afd16){const _0x1b9ddc=_0x3c3d98['markerName']['split'](':')[0x2];if(_0x1b9ddc===_0x2afd16['mySessionId'])return null;const _0x4ba639=_0x2afd16['getUserBySessionId'](_0x1b9ddc);if(!_0x4ba639)return{'id':_0x1b9ddc,'classes':[]};return{'id':_0x1b9ddc,'classes':['ck-user__selection',_0x4ba639['color']['getSelectionClass']()],'attributes':{'data-session-id':_0x1b9ddc},'priority':0x7d0+_0x4ba639['orderNumber']};}(_0x55c877,_0x5eebd6)}),function(_0x50614f){const _0x5d2fb5=_0x50614f['model'],_0x3703b6=new Map(),_0x2ee0e7=_0x50614f['plugins']['get'](i);_0x5d2fb5['markers']['on']('update:user:range',(_0x3e50ca,_0x16ee10,_0x3c3dde,_0xad1cfe)=>{if(!_0xad1cfe&&_0x3703b6['get'](_0x16ee10['name']))return _0x3703b6['get'](_0x16ee10['name'])['detach'](),void _0x3703b6['delete'](_0x16ee10['name']);const _0x532b64=_0x16ee10['name']['split'](':')[0x2];if(_0x532b64===_0x2ee0e7['mySessionId'])return;const _0x1e9ee7='user:position:'+_0x532b64;_0x5d2fb5['markers']['has'](_0x1e9ee7)&&_0x50614f['editing']['reconvertMarker'](_0x1e9ee7),_0x16ee10['on']('change:range',(_0x1d4b4c,_0xdd310e,_0x2faf61)=>{if('$graveyard'!=_0xdd310e['root']['rootName']&&'$graveyard'==_0x16ee10['getRange']()['root']['rootName']&&!_0x3703b6['has'](_0x16ee10['name'])){const _0x5722fd=_0x5d2fb5['schema']['getNearestSelectionRange'](_0x2faf61['deletionPosition']);if(_0x5722fd){const _0xf9e41c=ht['fromRange'](_0x5722fd);_0x3703b6['set'](_0x16ee10['name'],_0xf9e41c),_0xf9e41c['on']('change:range',(_0x40cae,_0x2028c8,_0x4ad682)=>{if('$graveyard'==_0xf9e41c['root']['rootName']){const _0x2acbbb=_0x5d2fb5['schema']['getNearestSelectionRange'](_0x4ad682['deletionPosition']);_0x2acbbb?(_0xf9e41c['start']=_0x2acbbb['start'],_0xf9e41c['end']=_0x2acbbb['end']):(_0x3703b6['delete'](_0x16ee10['name']),_0xf9e41c['detach']());}});}}});}),_0x5d2fb5['document']['on']('change',()=>{_0x3703b6['size']>0x0&&_0x5d2fb5['enqueueChange']({'isUndoable':!0x1},_0x2d2d41=>{for(const [_0x40a5c0,_0x287b56]of _0x3703b6)'$graveyard'==_0x5d2fb5['markers']['get'](_0x40a5c0)['getRange']()['root']['rootName']&&(re(_0x40a5c0['split'](':')[0x2],_0x287b56['toRange'](),_0x5d2fb5,_0x2d2d41),_0x287b56['detach']());_0x3703b6['clear']();});});}(_0x269861),this['_domEmitter']['listenTo'](_0x3d2acd['document'],'keydown',(_0x173eed,{key:_0x512104})=>{'Escape'===_0x512104&&function(_0x229fd2){_0x229fd2['editing']['view']['change'](_0x49d0cb=>{for(const _0x53946c of _0x229fd2['model']['markers']){if(!_0x53946c['name']['startsWith']('user:position'))continue;const _0x59bff7=_0x229fd2['editing']['mapper']['markerNameToElements'](_0x53946c['name']);if(_0x59bff7){for(const _0x1d34ed of _0x59bff7)_0x49d0cb['removeClass']('ck-user__marker_hovered',_0x1d34ed);}}});}(_0x269861);},{'useCapture':!0x0});}['afterInit'](){const _0xb42cf2=this['editor'],_0x238297=_0xb42cf2['commands']['get']('undo');_0x238297&&_0xb42cf2['model']['on']('applyOperation',(_0x220c5f,_0x4130e7)=>{const _0x22c54f=_0x4130e7[0x0];if('marker'!=_0x22c54f['type']||!_0x22c54f['name']['startsWith']('user:'))return;const _0xb80d63=_0x22c54f['batch'];_0x238297['_createdBatches']['has'](_0xb80d63)&&(_0x22c54f['newRange']=_0x22c54f['oldRange']?_0xb42cf2['model']['createRange'](_0x22c54f['oldRange']['start'],_0x22c54f['oldRange']['end']):null);},{'priority':'highest'});}['destroy'](){return this['_domEmitter']['stopListening'](),super['destroy']();}['createUserMarkerOperations'](){const _0x1e4300=this['editor'],_0x2df37d=_0x1e4300['model']['document'],_0x598fe8=_0x1e4300['plugins']['get'](i);_0x1e4300['model']['enqueueChange']({'isUndoable':!0x1},_0x38072e=>{const _0x484918='user:range:'+_0x598fe8['mySessionId'],_0x5bd05d='user:position:'+_0x598fe8['mySessionId'],_0x35572f=_0x1e4300['model']['markers']['has'](_0x484918);_0x1e4300['editing']['view']['hasDomSelection']?re(_0x598fe8['mySessionId'],_0x2df37d['selection']['getFirstRange'](),_0x1e4300['model'],_0x38072e):_0x35572f&&(_0x38072e['removeMarker'](_0x484918),_0x38072e['removeMarker'](_0x5bd05d));});}}function re(_0x457547,_0x1721c8,_0x494b99,_0x16e20c){const _0x7dd99f='user:range:'+_0x457547,_0x1de65f='user:position:'+_0x457547,_0x9323d1=_0x1721c8['getContainedElement']();let _0x4e390b=_0x1721c8['start'];_0x9323d1&&_0x9323d1['is']('element','tableCell')&&(_0x4e390b=function(_0x53ba4e,_0x2554c3){for(const _0x11f90b of _0x53ba4e['getPositions']())if(_0x2554c3['schema']['checkChild'](_0x11f90b,'$text'))return _0x11f90b;}(_0x1721c8,_0x494b99),_0x1721c8=_0x16e20c['createRange'](_0x4e390b));const _0x1a9e0e=_0x16e20c['createRange'](_0x4e390b);_0x494b99['markers']['has'](_0x7dd99f)?(_0x16e20c['updateMarker'](_0x7dd99f,{'range':_0x1721c8}),_0x16e20c['updateMarker'](_0x1de65f,{'range':_0x1a9e0e})):(_0x16e20c['addMarker'](_0x7dd99f,{'range':_0x1721c8,'usingOperation':!0x0}),_0x16e20c['addMarker'](_0x1de65f,{'range':_0x1a9e0e,'usingOperation':!0x0}));}function q(_0x5ed1ef,_0x15a52b,_0x224baa){const _0x1e250a=_0x5ed1ef['t'],t=_0x5ed1ef['t'];switch(_0x15a52b){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 _0x1e250a({'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'},_0x224baa);default:return'';}}let K=0x1;class l extends _0x3aa519{static ['CollaborativeEditingService']=/* #__PURE__ -- @preserve */
|
|
25
|
+
((()=>_0x305cc7)());['_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,_0x4bc24d,_0x1f4be7,_0x2a5600];}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 _0x452d9f=this['serverHistory']['getOperations']();for(let _0x2e736d=_0x452d9f['length']-0x1;_0x2e736d>=0x0;_0x2e736d--){const _0x43d948=_0x452d9f[_0x2e736d];if(!this['_disconnectionOperations']['has'](_0x43d948))return _0x43d948['baseVersion']+0x1-this['_offset'];}return 0x0;}constructor(_0x5763a5){if(super(_0x5763a5),this['_offset']=0x0,this['sessionId']=null,this['serverHistory']=new _0xfe3099(),this['editor']['config']['define']('collaboration',{}),this['_channelId']=this['editor']['config']['get']('collaboration.channelId'),!this['_channelId'])throw new _0x33cd62('collaboration-missing-channelid',this);const _0x42e3c6=_0x5763a5['config']['get']('cloudServices.bundleVersion')||nt;this['_service']=new l['CollaborativeEditingService'](_0x42e3c6,this['_channelId']),this['_document']=this['editor']['model']['document'],this['_compressor']=new _0x264e7c(),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 _0x236890=this['editor'],_0xceb757=_0x236890['plugins']['get'](_0x1f4be7),_0x20db29=_0x236890['plugins']['get'](c);this['listenTo'](_0xceb757,'getOperationAuthor',(_0x42f417,_0x1c3fbc)=>{const _0x46c020=_0x1c3fbc[0x0];_0x46c020['_authorId']&&(_0x42f417['return']=_0xceb757['getUser'](_0x46c020['_authorId']),_0x42f417['stop']()),null===_0x46c020['_authorId']&&(_0x42f417['return']=null,_0x42f417['stop']());},{'priority':'high'}),this['listenTo'](_0x236890['model']['document']['selection'],'change:range',(_0x769396,_0x50c5ac)=>{_0x50c5ac['directChange']&&this['_refreshUserSelectionMarkers']();}),this['listenTo'](_0x236890['editing']['view'],'change:hasDomSelection',()=>{this['_refreshUserSelectionMarkers']();}),this['_initThrowingOnDataSet'](),_0x236890['model']['on']('applyOperation',(_0xdbf728,_0x19e0f1)=>{const _0x155b0d=_0x19e0f1[0x0];_0x155b0d['isDocumentOperation']&&(this['_saveOperationInBuffer'](_0x155b0d),this['_shouldSendUpdate']()&&this['_sendBufferedOperationsDelayed']());}),this['_setUpDataInit'](),this['bind']('_isEditingAllowed')['to'](_0x20db29,'state',this,'_hasSynchronizationProblem',(_0x119fb7,_0x14b751)=>'connected'===_0x119fb7&&!_0x14b751),this['on']('change:_isEditingAllowed',()=>{this['_isEditingAllowed']?_0x236890['disableReadOnlyMode']('rtc-offline'):_0x236890['enableReadOnlyMode']('rtc-offline');}),this['_isEditingAllowed']?_0x236890['disableReadOnlyMode']('rtc-offline'):_0x236890['enableReadOnlyMode']('rtc-offline'),this['set']('_isConnected',!0x1);}async['reconnect'](){const _0xf48c6=this['editor']['plugins']['get'](i),_0x539bc2=this['editor']['plugins']['get'](c);try{this['_isPendingUpdate']=!0x0,_0xf48c6['unregister'](this['_channelId']);const _0x575839=await this['_service']['reconnect'](_0x539bc2['connection'],this['lastSyncVersion']);await this['_handleReconnectionResponse'](_0x575839)&&(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());const _0x3330ba=await this['_service']['getConnectedSessions']();_0xf48c6['register'](this['_channelId'],_0x3330ba),this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}catch(_0x2081d5){if(function(_0x58625c){return'404'===_0x58625c['code'];}(_0x2081d5)&&this['sessionId'])await this['_connectAfterSessionHasBeenFlushed']();else{if(function(_0x1a12e1){return'409'===_0x1a12e1['code'];}(_0x2081d5)){const _0x25de33=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'](_0x25de33);}else{if(!(_0x2081d5 instanceof J))throw _0x2081d5;this['_handleReconnectionError']();}}}}['destroy'](){const _0x24dd84=this['editor']['plugins']['get'](c),_0x1354ff=this['editor']['plugins']['get'](i);this['editor']['enableReadOnlyMode']('rtc-destroyed'),_0x1354ff['channelSessions']['has'](this['_channelId'])&&_0x1354ff['unregister'](this['_channelId']),_0x24dd84['removeFromReconnectionStack'](this),this['_disconnectService'](),super['destroy']();}async['_handleReconnectionResponse'](_0x9ff105){if(this['sessionId']!==_0x9ff105['sessionId']&&this['_lastSyncedOperationId']!==_0x9ff105['lastOperationId'])throw new J();return this['sessionId']=_0x9ff105['sessionId'],this['_handleServerResponse']([],{..._0x9ff105,'wereChangesApplied':!0x1,'data':_0x9ff105['data']},'reconnect');}async['_connectService'](_0x5a991e,_0x3fc40c=!0x1){const {connection:_0x4e0143}=this['editor']['plugins']['get'](c);l['CollaborativeEditingService']['getConnectedSessions'](_0x4e0143,this['_channelId'])['then'](_0x524b2e=>this['_initSessionsHandling'](_0x524b2e))['catch'](_0x379f2e=>{this['_crash']('realtimecollaborationclient-init-session-connection-error',_0x379f2e);}),this['listenTo'](this['_service'],'operationsReceived',this['_handleReceivedOperations']['bind'](this)),this['listenTo'](this['_service'],'error',(_0xb6f127,_0x12a8bd)=>{this['_crash']('realtimecollaborationclient-initservice-internal-error',_0x12a8bd);}),this['listenTo'](this['_service'],'disconnected',()=>{this['_isConnected']=!0x1;});const _0x144c93=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x5a991e);this['_isPendingUpdate']=!0x0;const _0x236f8c=await this['_service']['connect'](_0x4e0143,this['_compressOperations'](_0x5a991e),_0x144c93);if(this['sessionId']=_0x236f8c['sessionId'],_0x3fc40c){if(!_0x236f8c['wereChangesApplied'])return void this['_handleReconnectionError']();this['_isPendingUpdate']=!0x1,this['_clearPendingAction'](),this['serverHistory']['reset'](),this['_offset']=_0x236f8c['offset'],this['serverHistory']['version']=this['_offset'],await this['_handleServerResponse'](_0x5a991e,_0x236f8c,'reconnection:\x20flushed\x20session');}else await this['_handleInitialConnectionData'](_0x236f8c,_0x5a991e);this['_handleSendingSelectionMarkers'](),this['_isConnected']=!0x0;}['_handleSendingSelectionMarkers'](){const _0x15f3e3=this['editor']['plugins']['get'](i),_0x2f5a0e=this['editor']['plugins']['get'](H),_0x20434e=_0x15f3e3['channelSessions']['get'](this['_channelId']);_0x20434e&&_0x20434e['length']>0x1?_0x2f5a0e['createUserMarkerOperations']():this['listenTo'](_0x15f3e3,'sessionAdd:'+this['_channelId'],()=>{0x2===_0x15f3e3['channelSessions']['get'](this['_channelId'])['length']&&_0x2f5a0e['createUserMarkerOperations']();});}async['_handleReceivedOperations'](_0x443c3a,_0x2245ab,_0x2200a4,_0x87fc30){if(!this['_isPendingUpdate']&&this['_document']['version']==_0x2245ab){const _0x353c3e=this['_decompressOperations'](_0x2200a4,_0x87fc30);await this['_fetchMissingUsers'](_0x353c3e),this['_handleExternalOperations'](_0x353c3e,_0x2245ab,_0x2200a4['lastOperationId'])||this['_crash']('realtimecollaborationclient-initservice-incorrect-server-operation');}}async['_connectAfterSessionHasBeenFlushed'](){this['_disconnectService']();const {locale:_0x5161a5}=this['editor'];let _0x237588;try{_0x237588=await this['_service']['getDocumentDetails']();}catch(_0x481791){const _0x4e71ae=q(_0x5161a5,'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'](_0x4e71ae);}const _0x1d0047=_0x237588['currentDocumentSession']||_0x237588['lastDocumentSession'];if(this['_lastSyncedOperationId']===_0x1d0047['lastOperationId'])await this['_connectService'](this['editor']['model']['document']['history']['getOperations'](),!0x0);else{const _0x3afee9=q(_0x5161a5,'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'](_0x3afee9);}}['_disconnectService'](){this['_service']['disconnect'](),this['_bufferedOperations']=[],clearTimeout(this['_sendBufferedOperationsDelayId']),this['stopListening'](this['_service']);}['_initSessionsHandling'](_0x5d56a2){const _0x222a6b=this['editor']['plugins']['get'](i);this['listenTo'](_0x222a6b,'sessionAdd:'+this['_channelId'],(_0x5c7305,{session:_0x334e32})=>{if(_0x334e32['id']===_0x222a6b['mySessionId']){_0x5c7305['off']();const _0x241612=this['editor']['plugins']['has']('CommentsOnly')&&this['editor']['plugins']['get']('CommentsOnly');let _0x5e6e14=_0x334e32['permissions'];_0x241612&&_0x241612['isEnabled']&&(_0x5e6e14=_0x5e6e14['filter'](_0x47f82a=>'document:write'!==_0x47f82a)),this['editor']['plugins']['get']('Permissions')['setPermissions'](_0x5e6e14,this['_channelId']);}}),_0x222a6b['register'](this['_channelId'],_0x5d56a2);}['_initThrowingOnDataSet'](){const _0x4e6b46=this['editor']['data']['set'];this['editor']['data']['set']=(..._0x2fd1e3)=>{if(!_0x2fd1e3[_0x2fd1e3['length']-0x1]['suppressErrorInCollaboration'])throw new _0x33cd62('realtimecollaborationclient-editor-setdata-and-editor-data-set-are-forbidden-in-real-time-collaboration',this);_0x4e6b46['apply'](this['editor']['data'],_0x2fd1e3);};}['_setUpDataInit'](){this['editor']['data']['on']('init',(_0x3f9d37,[_0x2d9d9e])=>{if(this['_document']['version'])throw new _0x33cd62('realtimecollaborationclient-init-document-already-initialized',this);_0x3f9d37['stop'](),this['_setPendingAction']();const _0x397a93=this['editor']['config']['get']('rootsAttributes'),_0x19243e=this['_getOperationsFromInitData'](_0x2d9d9e,_0x397a93);0x0==_0x19243e['length']&&_0x19243e['push'](new _0x15be44(0x0)),_0x3f9d37['return']=this['_connectService'](_0x19243e)['then'](()=>{this['editor']['plugins']['get'](c)['addToReconnectionStack'](this),this['editor']['data']['fire']('ready');})['catch'](_0x359359=>this['_crash']('realtimecollaborationclient-init-connection-failed',_0x359359))['finally'](()=>this['_clearPendingAction']());},{'priority':'high'}),this['editor']['on']('loadRoot',async(_0x34b488,[_0x2eeef0,_0x323bc4])=>{_0x34b488['stop']();const _0x21ff1c=this['editor']['model']['document']['getRoot'](_0x2eeef0);if(!this['_knownRootNames']['has'](_0x2eeef0)){const _0x300cef=_0x323bc4&&_0x323bc4['data']?_0x323bc4['data']:'',_0x8250f5=_0x323bc4&&_0x323bc4['attributes']?_0x323bc4['attributes']:{};await this['_loadRoot'](_0x2eeef0,_0x300cef,_0x8250f5);}this['editor']['model']['enqueueChange']({'isUndoable':!0x1},()=>{_0x21ff1c['_isLoaded']=!0x0,this['editor']['model']['document']['differ']['_bufferRootLoad'](_0x21ff1c);});},{'priority':'high'});}async['_fetchMissingUsers'](_0x31f628){const _0x54987a=this['editor']['plugins']['get'](_0x1f4be7),{connection:_0x359a80}=this['editor']['plugins']['get'](c),_0x5c9f52=new Set();for(const _0xb39d09 of _0x31f628){const _0x475f51=_0xb39d09['_authorId'];_0x475f51&&!_0x54987a['getUser'](_0x475f51)&&_0x5c9f52['add'](_0x475f51);}if(0x0===_0x5c9f52['size'])return;const _0x368074=await dt['getMany'](_0x359a80,Array['from'](_0x5c9f52));for(const _0x31f881 of _0x368074)_0x54987a['getUser'](_0x31f881['id'])||_0x54987a['addUser'](_0x31f881);}['_getOperationsFromInitData'](_0x1e93be,_0x40166e={}){const _0x36b975=this['editor']['model'],_0x5e608f=[];let _0x1ff647=0x0;const _0x88ff9='string'==typeof _0x1e93be?{'main':_0x1e93be}:_0x1e93be;for(const _0x26a8c9 of Object['keys'](_0x88ff9)){if(!this['_document']['roots']['has'](_0x26a8c9))throw new _0x33cd62('realtimecollaborationclient-init-non-existent-root',this);const _0x1b003e=this['editor']['data']['parse'](_0x88ff9[_0x26a8c9]),_0x6b3cd4=this['_document']['getRoot'](_0x26a8c9),_0x183082=new _0x107b34(_0x36b975['createPositionAt'](_0x6b3cd4,0x0),_0x1b003e,_0x1ff647++);_0x5e608f['push'](_0x183082);for(const [_0x17ca04,_0x1cddc8]of _0x1b003e['markers']){const _0x167f68=_0x36b975['createRange'](_0x36b975['createPositionFromPath'](_0x6b3cd4,_0x1cddc8['start']['path']['slice']()),_0x36b975['createPositionFromPath'](_0x6b3cd4,_0x1cddc8['end']['path']['slice']())),_0x5cdb58=new _0x1cded2(_0x17ca04,null,_0x167f68,_0x36b975['markers'],!0x0,_0x1ff647++);_0x5e608f['push'](_0x5cdb58);}}if(_0x40166e)for(const [_0x1de0ec,_0x497082]of Object['entries'](_0x40166e)){const _0x4128fb=_0x36b975['document']['getRoot'](_0x1de0ec);if(!_0x4128fb)throw new _0x33cd62('multi-root-editor-root-attributes-no-root',null);for(const [_0x3d7716,_0x3f61ce]of Object['entries'](_0x497082))if(null!==_0x3f61ce){const _0x56ce3d=new _0x1215aa(_0x4128fb,_0x3d7716,null,_0x3f61ce,_0x1ff647++);_0x5e608f['push'](_0x56ce3d);}}return _0x5e608f;}async['_loadRoot'](_0x1d1e1b,_0x44ff40,_0x24a89b){this['_getOperationsFromInitData']({[_0x1d1e1b]:_0x44ff40},{[_0x1d1e1b]:_0x24a89b})['forEach']((_0x1872d2,_0xa3e0cb)=>{_0x1872d2['baseVersion']=this['_document']['version']+_0xa3e0cb,_0x1872d2['_isInit']=!0x0,this['_saveOperationInBuffer'](_0x1872d2);}),this['_sendBufferedOperationsDelayed'](),await this['_waitUntilSynced']();}async['_handleInitialConnectionData'](_0x42b738,_0x3ff059){let _0x535534;this['_offset']=_0x42b738['offset'];const _0x3cf721=_0x42b738['wereChangesApplied']&&!_0x42b738['initData'],_0x427f16=_0x3cf721?0x0:_0x42b738['data']['baseVersion'];if(_0x3ff059['forEach'](_0x4c316b=>{_0x4c316b['_isInit']=!0x0,_0x4c316b['createdAt']=_0x42b738['sessionCreatedAt'],_0x4c316b['_authorId']=null;}),_0x3cf721)_0x535534=_0x3ff059,this['_applyOperationsSet'](_0x535534,_0x3cf721);else{if(_0x42b738['initData']){const _0x5ca62b=this['_getOperationsFromInitData'](_0x42b738['initData']);this['_document']['history']['version']=-_0x5ca62b['length'],_0x5ca62b['forEach'](_0x47dd3c=>{_0x47dd3c['baseVersion']-=_0x5ca62b['length'],_0x47dd3c['createdAt']=_0x42b738['sessionCreatedAt'],_0x47dd3c['_isInit']=!0x0,_0x47dd3c['_authorId']=null;}),this['_applyOperationsSet'](_0x5ca62b,!0x0),this['serverHistory']['version']=-_0x5ca62b['length']+this['_offset'],this['_updateServerHistory'](_0x5ca62b);}this['_document']['history']['version']=_0x427f16,_0x535534=this['_decompressOperations'](_0x42b738['data'],_0x42b738['metadata']),await this['_fetchMissingUsers'](_0x535534),this['_applyOperationsSet'](_0x535534,_0x3cf721);}_0x42b738['lastOperationId']&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x535534,_0x42b738['lastOperationId']),this['_lastSyncedOperationId']=_0x42b738['lastOperationId']),this['serverHistory']['version']=_0x427f16+this['_offset'],this['_updateServerHistory'](_0x535534),_0x3ff059['filter'](_0x5a25f2=>{const _0xf212ad=this['_getAffectedRoot'](_0x5a25f2);return _0xf212ad&&!this['_knownRootNames']['has'](_0xf212ad);})['forEach']((_0x4c9b72,_0x47d518)=>{_0x4c9b72['baseVersion']=this['_document']['version']+_0x47d518,this['_saveOperationInBuffer'](_0x4c9b72);}),this['_shouldSendUpdate']()?(this['_currentBufferDelay']=0x0,this['_sendBufferedOperationsDelayed'](!0x0),await this['_waitUntilSynced']()):(this['_isPendingUpdate']=!0x1,this['_clearPendingAction']());}['_crash'](_0x2ee220,_0x2115b8,_0x4c0f0f){throw this['_isPendingUpdate']=!0x0,_0x2115b8&&console['error'](_0x2115b8),_0x4c0f0f&&this['editor']['enableReadOnlyMode']('realtimecollaborationclient-error'),new _0x33cd62(_0x2ee220,this['editor']);}['_saveOperationInBuffer'](_0x1912f1){this['_knownOperations']['has'](_0x1912f1)||(this['_knownOperations']['add'](_0x1912f1),this['_bufferedOperations']['push'](_0x1912f1),this['_pendingAction']||'marker'==_0x1912f1['type']&&!_0x1912f1['affectsData']||this['_setPendingAction']());}['_sendBufferedOperationsDelayed'](_0x2e0a9e=!0x1){!_0x2e0a9e&&this['_isPendingUpdate']||(this['_isPendingUpdate']=!0x0,clearTimeout(this['_sendBufferedOperationsDelayId']),this['_sendBufferedOperationsDelayId']=setTimeout(()=>{this['_sendBufferedOperations']()['then'](_0x545872=>{_0x545872&&(this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1);})['catch'](_0x259569=>{this['_clearPendingAction'](),this['_isPendingUpdate']=!0x1,function(_0x3e619f){return _0x3e619f['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x3e619f['message']['startsWith']('cloud-services-internal-error:\x20Collaborative\x20Editing\x20Service\x20is\x20not\x20connected.')||_0x3e619f['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}(_0x259569)||this['_crash'](_0x259569['message'],_0x259569,!0x0);});},this['_currentBufferDelay']));}['_waitUntilSynced'](){return new Promise(_0x290145=>{this['on']('change:_isPendingUpdate',()=>{_0x290145();});});}async['_sendBufferedOperations'](){const _0x2340a5=this['editor']['plugins']['get'](H);if(this['_shouldSendSelectionUpdate']()&&(_0x2340a5['createUserMarkerOperations'](),this['_hasSelectionChanged']=!0x1),!this['_shouldSendUpdate']())return!0x0;const _0x502e01=[...this['_bufferedOperations']];for(const _0x46d1d1 of _0x502e01)_0x46d1d1['wasUndone']=this['_document']['history']['isUndoneOperation'](_0x46d1d1);const _0x5e97f9=this['_operationIdentifier']['getIdOfTheLastOperation'](_0x502e01),_0x2aa967=K++,_0x18aeb8=this['_compressOperations'](_0x502e01),_0xb1c49c=await this['_service']['sendOperations'](_0x18aeb8,_0x18aeb8['baseVersion'],_0x5e97f9);try{return await this['_handleServerResponse'](_0x502e01,_0xb1c49c,_0x2aa967);}catch(_0x46b2a8){return this['_crash']('realtimecollaborationclient-sendbufferedoperations',_0x46b2a8);}}async['_handleServerResponse'](_0x34643b,_0x541c64,_0xde7253){if('error'in _0x541c64)throw _0x541c64['error'];let _0x5a56fa=!0x1;if(_0x541c64['wereChangesApplied']){_0x541c64['lastOperationId']&&(this['_lastSyncedOperationId']=_0x541c64['lastOperationId']),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x247284=>!_0x34643b['includes'](_0x247284));for(const _0x28589b of _0x34643b)_0x28589b['createdAt']='lastOperationAcceptedAt'in _0x541c64&&_0x541c64['lastOperationAcceptedAt']||void 0x0;Q(_0x34643b,_0x541c64['version']-_0x34643b['length']),this['_updateServerHistory'](_0x34643b);const _0x4832fd=_0x34643b['filter'](_0x5c82e0=>{if(!_0x5c82e0['_isInit'])return!0x1;const _0x530283=this['_getAffectedRoot'](_0x5c82e0);return _0x530283&&!this['_knownRootNames']['has'](_0x530283);});Q(_0x4832fd,this['_document']['version']),this['_applyOperationsSet'](_0x4832fd),_0x5a56fa=!0x0,this['_currentBufferDelay']=this['_baseBufferDelay'];}else{const _0x58dfda=this['_decompressOperations'](_0x541c64['data'],_0x541c64['metadata'])['filter'](_0x465fe9=>_0x465fe9['baseVersion']>=this['_lastServerVersion']);_0x58dfda['forEach'](_0x3d180e=>this['_addKnownRoot'](_0x3d180e)),this['_bufferedOperations']=this['_bufferedOperations']['filter'](_0x32042b=>!_0x32042b['_isInit']||!this['_knownRootNames']['has'](this['_getAffectedRoot'](_0x32042b))),this['_bufferedOperations']['length']&&Q(this['_bufferedOperations'],this['_bufferedOperations'][0x0]['baseVersion']),await this['_fetchMissingUsers'](_0x58dfda),_0x5a56fa=this['_handleExternalOperations'](_0x58dfda,_0x541c64['version'],_0x541c64['lastOperationId']),this['_currentBufferDelay']=Math['round'](this['_currentBufferDelay']/0x2);}return _0x5a56fa?!this['_shouldSendUpdate']()||(this['_sendBufferedOperationsDelayed'](!0x0),!0x1):this['_crash']('realtimecollaborationclient-handleserverresponse');}['_handleExternalOperations'](_0x4f6009,_0x3800f2,_0x57f5d2){try{const _0x140ec={'document':this['_document'],'useRelations':!0x1,'padWithNoOps':!0x0},{operationsA:_0x58a13,operationsB:_0x1f7d99,originalOperations:_0x6cf248}=_0x357384(_0x4f6009,this['_bufferedOperations'],_0x140ec);Q(_0x58a13,this['_document']['version']),Q(_0x1f7d99,_0x3800f2);for(const _0x1f83d4 of _0x58a13){const _0xc19d1=_0x6cf248['get'](_0x1f83d4);_0x1f83d4['_authorId']=_0xc19d1?_0xc19d1['_authorId']:null;}_0x57f5d2&&(this['_operationIdentifier']['setIdForTheLastOperation'](_0x4f6009,_0x57f5d2),this['_lastSyncedOperationId']=_0x57f5d2),this['_bufferedOperations']=[..._0x1f7d99],this['_applyOperationsSet'](_0x58a13),this['_updateServerHistory'](_0x4f6009);}catch(_0x2b35ec){return console['error'](_0x2b35ec),!0x1;}return!0x0;}['_applyOperationsSet'](_0x4c9272,_0x2be4d4=!0x1){this['editor']['model']['enqueueChange']({'isUndoable':!0x1,'isLocal':!0x1},_0x42ea55=>{for(const _0x1b5aac of _0x4c9272)this['_knownOperations']['add'](_0x1b5aac),this['_addKnownRoot'](_0x1b5aac),_0x42ea55['batch']['addOperation'](_0x1b5aac),this['editor']['model']['applyOperation'](_0x1b5aac);});}['_addKnownRoot'](_0xafeeac){const _0x364bf9=this['_getAffectedRoot'](_0xafeeac);_0x364bf9&&this['_knownRootNames']['add'](_0x364bf9);}['_getAffectedRoot'](_0x27b824){let _0xcbe210,_0x5d61c;switch(_0x27b824['type']){case'insert':_0xcbe210=_0x27b824['position']['root'];break;case'marker':if(_0x5d61c=_0x27b824['newRange'],!_0x5d61c)return null;_0xcbe210=_0x5d61c['root'];break;case'addRootAttribute':_0xcbe210=_0x27b824['root'];break;case'addRoot':_0xcbe210=_0x27b824['affectedSelectable'];break;case'move':_0xcbe210=_0x27b824['targetPosition']['root'];break;default:return null;}return _0xcbe210['rootName'];}['_updateServerHistory'](_0x15ea2a){_0x15ea2a['forEach'](_0x2d8c9b=>{const _0x4fa1e9=_0x2d8c9b['clone']();_0x4fa1e9['_authorId']=_0x2d8c9b['_authorId'],_0x4fa1e9['_isInit']=!!_0x2d8c9b['_isInit'],_0x4fa1e9['createdAt']=_0x2d8c9b['createdAt'],_0x4fa1e9['baseVersion']+=this['_offset'],_0x2d8c9b['_isDisconnection']&&this['_disconnectionOperations']['add'](_0x4fa1e9),this['serverHistory']['addOperation'](_0x4fa1e9);});}['_handleReconnectionError'](_0x4fe734){const _0x1a7826=this['editor']['plugins']['get']('Notification'),_0x5750c1=this['editor']['locale'];_0x4fe734||(_0x4fe734=q(_0x5750c1,'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.')),_0x1a7826['showWarning'](_0x4fe734,{'title':q(_0x5750c1,'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'](_0x4bc24d)['add'](q(this['editor']['locale'],'PENDING_ACTION_SENDING_DATA')));}['_clearPendingAction'](){this['_pendingAction']&&(this['editor']['plugins']['get'](_0x4bc24d)['remove'](this['_pendingAction']),this['_pendingAction']=null);}['_compressOperations'](_0x15236b){const _0x5e7a5b=_0x15236b['map'](_0x416d49=>_0x416d49['toJSON']());return this['_compressor']['compress'](_0x5e7a5b);}['_decompressOperations'](_0x2f02cf,_0xf631e){return this['_compressor']['decompress'](_0x2f02cf)['map']((_0x10f3e4,_0x50c1aa)=>{const _0x294143='init'==_0xf631e[_0x50c1aa]['type'];if('InsertOperation'==_0x10f3e4['__className']){const _0x17a511=_0x10f3e4['position']['root'];!this['_document']['getRoot'](_0x17a511)&&(this['_document']['createRoot']('$root',_0x17a511)['_isAttached']=!0x1);}const _0x5c9ebb=_0x1b15ef['fromJSON'](_0x10f3e4,this['_document']);return _0x5c9ebb['wasUndone']=_0x10f3e4['wasUndone'],_0x5c9ebb['_isInit']=_0x294143,_0x5c9ebb['_authorId']=_0x294143?null:_0xf631e[_0x50c1aa]['userId'],_0x5c9ebb['_isDisconnection']='cs:removeUser'===_0xf631e[_0x50c1aa]['type'],_0x5c9ebb['createdAt']=_0xf631e[_0x50c1aa]['createdAt'],_0x5c9ebb;});}['_refreshUserSelectionMarkers'](){this['_hasSelectionChanged']=!0x0,this['_shouldSendSelectionUpdate']()?this['_sendBufferedOperationsDelayed']():this['_hasSelectionChanged']=!0x1;}['_shouldSendSelectionUpdate'](){const _0x22d006=this['editor']['plugins']['get'](i)['channelSessions']['get'](this['_channelId']);return!this['editor']['isReadOnly']&&!!_0x22d006&&_0x22d006['length']>0x1&&this['_hasSelectionChanged'];}['_shouldSendUpdate'](){return this['_bufferedOperations']['length']>0x0||this['_shouldSendSelectionUpdate']();}}class J extends Error{}function Q(_0xd57a00,_0x1cfcfb){for(const _0x11af4d of _0xd57a00)_0x11af4d['baseVersion']=_0x1cfcfb++;}class X{['_ignoredOperations'];['_operationToId'];constructor(_0x5a3c47){this['_ignoredOperations']=_0x5a3c47,this['_operationToId']=new WeakMap();}['getIdOfTheLastOperation'](_0xba9098){let _0x263a0e=_0xba9098['length'];for(;_0x263a0e--;){const _0x4ccebf=_0xba9098[_0x263a0e];if(!this['_ignoredOperations']['has'](_0x4ccebf)){if(!this['_operationToId']['has'](_0x4ccebf)){const _0x6e094b=_0x243928()['slice'](0x1,0x12);this['_operationToId']['set'](_0x4ccebf,_0x6e094b);}return this['_operationToId']['get'](_0x4ccebf);}}}['setIdForTheLastOperation'](_0x1e4ef5,_0x3a3e98){if(!_0x3a3e98)return;let _0x45b083=_0x1e4ef5['length'];for(;_0x45b083--;){const _0x3d5fbe=_0x1e4ef5[_0x45b083];this['_ignoredOperations']['has'](_0x3d5fbe)||this['_operationToId']['set'](_0x3d5fbe,_0x3a3e98);}}}class n extends _0x3aa519{static get['requires'](){return[l];}static get['pluginName'](){return'RealTimeCollaborativeEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}class a extends _0x44cad5{static ['CommentsService']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>_0x2f050d)());['_services'];static get['requires'](){return[c,'CommentsRepository',i,_0x1f4be7];}static get['pluginName'](){return'CloudServicesCommentsAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3433c1){super(_0x3433c1),this['_services']=new Map();}async['init'](){const _0x4d2af8=this['context'],_0x3b9e0e=_0x4d2af8['plugins']['get']('CommentsRepository');if(_0x4d2af8['plugins']['get'](c)['addToReconnectionStack'](this),_0x3b9e0e['adapter']={'addCommentThread':async({channelId:_0x23abf0,threadId:_0xbe9453,comments:_0x495579,resolvedAt:_0x4a01f1,resolvedBy:_0x188b65,context:_0x1c44fe,attributes:_0x9f4569})=>{const _0x3da180=await this['_getService'](_0x23abf0)['addCommentThread']({'commentThreadId':_0xbe9453,'comments':_0x495579['map'](_0x5d96f5=>function(_0x17de97,_0x4680df,_0x2ff6fa){return{'commentThreadId':_0x2ff6fa,'commentId':_0x17de97['commentId'],'userId':_0x17de97['authorId'],'content':_0x17de97['content'],'documentId':_0x4680df,'createdAt':_0x17de97['createdAt'],'attributes':_0x17de97['attributes']||{}};}(_0x5d96f5,_0x23abf0,_0xbe9453)),'resolvedAt':_0x4a01f1,'resolvedBy':_0x188b65,'context':_0x1c44fe,'attributes':_0x9f4569})['catch'](ut);return{'threadId':_0x3da180['commentThreadId'],'comments':_0x3da180['comments']};},'getCommentThread':async({channelId:_0x28ea0c,threadId:_0x3d636d})=>{const _0x257545=await this['_getService'](_0x28ea0c)['getCommentThread'](_0x3d636d)['catch'](ut);return _0x257545['deletedAt']?null:(await this['_fetchMissingUsersForThreads']([_0x257545]),{'threadId':_0x257545['commentThreadId'],'comments':_0x257545['comments']['map'](S),'context':_0x257545['context'],'resolvedAt':_0x257545['resolvedAt'],'resolvedBy':_0x257545['resolvedBy'],'attributes':_0x257545['attributes']||{}});},'updateCommentThread':async({channelId:_0x2f57ba,threadId:_0x2e8540,context:_0x1352b5,unlinkedAt:_0x520e8b,attributes:_0x5a28d1})=>this['_getService'](_0x2f57ba)['updateCommentThread']({'commentThreadId':_0x2e8540,'context':_0x1352b5,'attributes':_0x5a28d1,'unlinkedAt':_0x520e8b})['catch'](B)['catch'](ut),'resolveCommentThread':async({channelId:_0x5e5af2,threadId:_0x251fc8})=>{const _0x5be326=await this['_getService'](_0x5e5af2)['resolveCommentThread'](_0x251fc8)['catch'](B)['catch'](ut);return{'threadId':_0x5be326['commentThreadId'],'resolvedAt':_0x5be326['resolvedAt'],'resolvedBy':_0x5be326['resolvedBy']};},'reopenCommentThread':async({channelId:_0xf57daa,threadId:_0x5b11d6})=>this['_getService'](_0xf57daa)['reopenCommentThread'](_0x5b11d6)['catch'](B)['catch'](ut),'removeCommentThread':({channelId:_0x55377a,threadId:_0x3cb021})=>this['_getService'](_0x55377a)['removeCommentThread'](_0x3cb021)['catch'](B)['catch'](ut),'addComment':({channelId:_0x42a15d,threadId:_0x593405,commentId:_0x139229,content:_0x1117bf,attributes:_0x29a96d})=>this['_getService'](_0x42a15d)['addComment'](_0x593405,_0x139229,_0x1117bf,_0x29a96d)['catch'](ut),'updateComment':({channelId:_0x4e2d90,threadId:_0x141cb7,commentId:_0x56e5c8,content:_0x16b21b,attributes:_0x18b7e7})=>this['_getService'](_0x4e2d90)['updateComment'](_0x141cb7,_0x56e5c8,_0x16b21b,_0x18b7e7)['catch'](B)['catch'](ut),'removeComment':({channelId:_0x59fe00,threadId:_0x2b6bd5,commentId:_0x2e0d87})=>this['_getService'](_0x59fe00)['removeComment'](_0x2b6bd5,_0x2e0d87)['catch'](B)['catch'](ut)},_0x4d2af8 instanceof _0x36edd1){const _0x8b48e=_0x4d2af8['config']['get']('collaboration.channelId'),_0x541806=_0x4d2af8['plugins']['get'](i);await this['_setUpService'](_0x8b48e);const _0x38801b=await this['_services']['get'](_0x8b48e)['getConnectedSessions']();this['listenTo'](_0x541806,'sessionAdd:'+_0x8b48e,(_0x2e40b4,{session:_0x525753})=>{_0x525753['id']===_0x541806['mySessionId']&&(_0x2e40b4['off'](),this['context']['plugins']['get']('Permissions')['setPermissions'](_0x525753['permissions'],_0x8b48e));}),_0x541806['register'](_0x8b48e,_0x38801b);}}async['_setUpService'](_0x437841){if(this['_services']['has'](_0x437841))throw new _0x33cd62('cloudservicescommentsadapter-connect-already-connected',null,{'channelId':_0x437841});const _0x3ffb2b=this['context']['plugins']['get']('CommentsRepository'),_0x11c5d0=new a['CommentsService'](_0x437841);this['_services']['set'](_0x437841,_0x11c5d0),this['listenTo'](_0x11c5d0,'commentThreadAdded',(_0x382505,_0x3da07a)=>{const {commentThreadId:_0xbf7ed9,documentId:_0x422ee3,context:_0x370f4d,attributes:_0x31239d,resolvedAt:_0x277f37,resolvedBy:_0x92974d,comments:_0x1f7bd7}=_0x3da07a;_0x3ffb2b['getCommentThread'](_0xbf7ed9)||_0x3ffb2b['addCommentThread']({'threadId':_0xbf7ed9,'channelId':_0x422ee3,'comments':_0x1f7bd7?_0x1f7bd7['map'](S):[],'context':_0x370f4d,'attributes':_0x31239d,'resolvedAt':_0x277f37,'resolvedBy':_0x92974d,'isFromAdapter':!0x0});}),this['listenTo'](_0x11c5d0,'commentThreadUpdated',(_0x41c6b7,{commentThreadId:_0x2a6914,documentId:_0x8c8ccf,context:_0x198dd4,unlinkedAt:_0x19a37c,attributes:_0x314f4e})=>{_0x3ffb2b['getCommentThread'](_0x2a6914)&&_0x3ffb2b['updateCommentThread']({'threadId':_0x2a6914,'channelId':_0x8c8ccf,'context':_0x198dd4,'unlinkedAt':_0x19a37c,'attributes':_0x314f4e,'isFromAdapter':!0x0});}),this['listenTo'](_0x11c5d0,'commentThreadResolved',(_0x314326,{commentThreadId:_0x2df02f,resolvedBy:_0x124112,resolvedAt:_0x2fa4bc})=>{const _0xdfb077=_0x3ffb2b['getCommentThread'](_0x2df02f);_0xdfb077&&_0xdfb077['resolve']({'resolvedBy':_0x124112,'resolvedAt':_0x2fa4bc,'isFromAdapter':!0x0});}),this['listenTo'](_0x11c5d0,'commentThreadReopened',(_0x362c4e,{commentThreadId:_0x346829})=>{const _0x53f862=_0x3ffb2b['getCommentThread'](_0x346829);_0x53f862&&_0x53f862['reopen']({'isFromAdapter':!0x0});}),this['listenTo'](_0x11c5d0,'commentThreadRemoved',(_0x3e7040,{commentThreadId:_0x44eb60})=>{const _0x1396c3=_0x3ffb2b['getCommentThread'](_0x44eb60);_0x1396c3&&_0x1396c3['remove']({'isFromAdapter':!0x0});}),this['listenTo'](_0x11c5d0,'commentAdded',(_0x17e232,_0x53c34f)=>{const _0x10d572=_0x53c34f['commentThreadId'],_0x5154ca=_0x3ffb2b['getCommentThread'](_0x10d572);_0x5154ca&&_0x5154ca['addComment']({...S(_0x53c34f),'isFromAdapter':!0x0});}),this['listenTo'](_0x11c5d0,'commentUpdated',(_0x1133fe,{commentThreadId:_0xe8c026,commentId:_0x219b8d,content:_0x10ad7c,attributes:_0x539d6b})=>{const _0x20d1cd=_0x3ffb2b['getCommentThread'](_0xe8c026);if(_0x20d1cd){const _0x25e8ba=_0x20d1cd['getComment'](_0x219b8d);_0x25e8ba&&_0x25e8ba['update']({'content':_0x10ad7c,'attributes':_0x539d6b,'isFromAdapter':!0x0});}}),this['listenTo'](_0x11c5d0,'commentRemoved',(_0x10fc01,{commentThreadId:_0x1aa4a5,commentId:_0x192cec})=>{const _0x100f5a=_0x3ffb2b['getCommentThread'](_0x1aa4a5);if(_0x100f5a){const _0x5d4b5b=_0x100f5a['getComment'](_0x192cec);_0x5d4b5b&&_0x5d4b5b['remove']({'isFromAdapter':!0x0});}}),await this['_connectService'](_0x437841);}['destroy'](){if(this['context']instanceof _0x36edd1){const _0x5c10e9=this['context']['config']['get']('collaboration.channelId');this['_terminateService'](_0x5c10e9);}}['_terminateService'](_0x3cafa9){if(!this['_services']['has'](_0x3cafa9))throw new _0x33cd62('cloudservicescommentsadapter-disconnect-not-exist',null,{'channelId':_0x3cafa9});this['_getService'](_0x3cafa9)['disconnect'](),this['_services']['delete'](_0x3cafa9);}async['reconnect'](){for(const _0x3fd3c5 of this['_services']['keys']())await this['_connectService'](_0x3fd3c5);if(this['context']instanceof _0x36edd1){const _0x3be5ca=this['context']['config']['get']('collaboration.channelId'),_0x358314=this['context']['plugins']['get'](i);_0x358314['unregister'](_0x3be5ca);const _0x16f946=await this['_services']['get'](_0x3be5ca)['getConnectedSessions']();_0x358314['register'](_0x3be5ca,_0x16f946);}}async['_connectService'](_0x13129e){const {connection:_0x1d99d6}=this['context']['plugins']['get'](c),_0x1432e7=this['context']['plugins']['get']('CommentsRepository'),_0xde9470=this['_services']['get'](_0x13129e),_0x49192d=await _0xde9470['connect'](_0x1d99d6);await this['_fetchMissingUsersForThreads'](_0x49192d);const _0x5a0ed1=new Set(Array['from'](_0x1432e7['getCommentThreads']({'channelId':_0x13129e}),_0x1e5962=>_0x1e5962['id']));for(const _0x55d3ba of _0x49192d)_0x55d3ba['deletedAt']||_0x5a0ed1['delete'](_0x55d3ba['commentThreadId']);for(const _0x30fdc7 of _0x5a0ed1)_0x1432e7['getCommentThread'](_0x30fdc7)['remove']({'isFromAdapter':!0x0});for(const _0x1c35e9 of _0x49192d){let _0x494108=_0x1432e7['getCommentThread'](_0x1c35e9['commentThreadId']);const {commentThreadId:_0x508a84,context:_0x294d29,attributes:_0x5309c2,resolvedBy:_0x13a2b6,resolvedAt:_0x53b0c2,unlinkedAt:_0x124e9d,deletedAt:_0x1b85fd}=_0x1c35e9;if(_0x1b85fd)continue;_0x494108||(_0x494108=_0x1432e7['addCommentThread']({'channelId':_0x13129e,'threadId':_0x508a84,'context':_0x294d29,'attributes':_0x5309c2||{},'resolvedBy':_0x13a2b6,'resolvedAt':_0x53b0c2,'unlinkedAt':_0x124e9d,'isFromAdapter':!0x0}));const _0x4d491f=new Set(Array['from'](_0x494108['comments'],_0x200014=>_0x200014['id']));for(const _0x487e40 of _0x1c35e9['comments'])_0x4d491f['delete'](_0x487e40['commentId']);for(const _0x48aaa8 of _0x4d491f)_0x494108['getComment'](_0x48aaa8)['remove']({'isFromAdapter':!0x0});for(const _0x5aaecd of _0x1c35e9['comments']){const _0x558a99=_0x494108['getComment'](_0x5aaecd['commentId']);_0x558a99?_0x558a99['content']!==_0x5aaecd['content']&&_0x558a99['update']({'content':_0x5aaecd['content'],'isFromAdapter':!0x0}):_0x494108['addComment'](Object['assign'](S(_0x5aaecd),{'isFromAdapter':!0x0}));}}}['_getService'](_0xd294dc){if(!this['_services']['has'](_0xd294dc))throw new _0x33cd62('cloudservicescommentsadapter-service-not-exist',null,{'channelId':_0xd294dc});return this['_services']['get'](_0xd294dc);}async['_fetchMissingUsersForThreads'](_0x31f178){const _0x4428aa=this['context']['plugins']['get'](_0x1f4be7),{connection:_0x44af09}=this['context']['plugins']['get'](c),_0x3cbff6=new Set();for(const {resolvedBy:_0x1dd6a5,comments:_0x405bf2}of _0x31f178){_0x1dd6a5&&!_0x4428aa['getUser'](_0x1dd6a5)&&_0x3cbff6['add'](_0x1dd6a5);for(const {userId:_0xb083c2}of _0x405bf2)_0x4428aa['getUser'](_0xb083c2)||_0x3cbff6['add'](_0xb083c2);}if(0x0===_0x3cbff6['size'])return;const _0x146a2f=await dt['getMany'](_0x44af09,Array['from'](_0x3cbff6));for(const _0x52edfc of _0x146a2f)_0x4428aa['getUser'](_0x52edfc['id'])||_0x4428aa['addUser'](_0x52edfc);}}async function B(_0x608616){if('404'!==_0x608616['code'])throw _0x608616;}function ut(_0x582153){if((_0x3bca23=_0x582153)['message']['startsWith']('cloud-services-internal-error:\x20Comments\x20Service\x20is\x20not\x20connected.')||_0x3bca23['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x3bca23['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.'))return new Promise(()=>{});var _0x3bca23;throw _0x582153;}function S(_0x24fdb6){return{'threadId':_0x24fdb6['commentThreadId'],'commentId':_0x24fdb6['commentId'],'content':_0x24fdb6['content'],'createdAt':_0x24fdb6['createdAt'],'authorId':_0x24fdb6['userId'],'attributes':_0x24fdb6['attributes']||{}};}class f extends _0x3aa519{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(_0xacca7c){super(_0xacca7c);const _0x1ae86b=this['editor']['config']['get']('collaboration.channelId');this['_bufferedRequests']=new Map(),this['_trackChangesService']=new f['TrackChangesService'](_0x1ae86b);}['init'](){const _0x2734bd=this['editor']['plugins']['get'](c),_0x29f6a3=this['editor']['plugins']['get']('TrackChangesEditing');return _0x29f6a3['adapter']={'getSuggestion':async _0x1fd2e9=>{await this['_waitForServiceReady']();const _0x1c1113=await this['_trackChangesService']['get'](_0x1fd2e9)['catch'](R);return await this['_fetchMissingUsersForThreads']([_0x1c1113]),_0x1c1113;},'addSuggestion':async({id:_0x50b712,type:_0x384576,data:_0x187bb5,originalSuggestionId:_0x567320,attributes:_0x4ad568})=>{await this['_waitForServiceReady']();const _0x2f9af9={'id':_0x50b712,'type':_0x384576,'data':_0x187bb5,'originalSuggestionId':_0x567320,'attributes':_0x4ad568},_0x7a08da=await this['_trackChangesService']['add'](_0x50b712,_0x384576,_0x187bb5,_0x567320,_0x4ad568)['catch'](_0x4801be=>{if(ft(_0x4801be))return new Promise(_0x159a19=>{this['_bufferedRequests']['set'](_0x50b712,{'resolve':_0x159a19,'suggestionData':_0x2f9af9});});throw _0x4801be;});return this['_bufferedRequests']['delete'](_0x50b712),_0x7a08da;},'updateSuggestion':async(_0x5864c7,_0xa33c2a)=>{if(await this['_waitForServiceReady'](),'open'!==_0xa33c2a['state'])return this['_trackChangesService']['update'](_0x5864c7,_0xa33c2a)['catch'](R);}},this['listenTo'](this['_trackChangesService'],'suggestionUpdated',(_0x462683,_0x3fd7e4)=>{_0x29f6a3['hasSuggestion'](_0x3fd7e4['id'])&&(_0x29f6a3['getSuggestion'](_0x3fd7e4['id'])['attributes']=_0x3fd7e4['attributes']);}),this['_trackChangesService']['connect'](_0x2734bd['connection'])['then'](_0x3d93b3=>(_0x2734bd['addToReconnectionStack'](this),this['_fetchMissingUsersForThreads'](_0x3d93b3)['then'](()=>{for(const _0x23bf10 of _0x3d93b3){_0x29f6a3['addSuggestionData'](_0x23bf10)['_saved']=!0x0;}})));}async['reconnect'](){const _0x216069=this['editor']['plugins']['get']('TrackChangesEditing'),{connection:_0x474ec4}=this['editor']['plugins']['get'](c),_0x41b62c=await this['_trackChangesService']['connect'](_0x474ec4);await this['_fetchMissingUsersForThreads'](_0x41b62c);for(const {suggestionData:_0x512cd2,resolve:_0x5ff173}of this['_bufferedRequests']['values']()){let _0x3b498b=_0x41b62c['find'](_0x1bc2a5=>_0x1bc2a5['id']===_0x512cd2['id']);_0x3b498b||(_0x3b498b=await this['_trackChangesService']['add'](_0x512cd2['id'],_0x512cd2['type'],_0x512cd2['data'],_0x512cd2['originalSuggestionId'])),_0x5ff173(_0x3b498b);}for(const _0x3929dd of _0x41b62c)_0x216069['hasSuggestion'](_0x3929dd['id'])||_0x216069['addSuggestionData'](_0x3929dd);}async['_waitForServiceReady'](){this['_trackChangesService']['isConnected']||await new Promise(_0x3659a4=>{this['listenTo'](this['_trackChangesService'],'connected',_0x213be1=>{_0x213be1['off'](),_0x3659a4();});});}async['_fetchMissingUsersForThreads'](_0x2baeae){const _0x507cfe=this['editor']['plugins']['get'](_0x1f4be7),{connection:_0xa456e9}=this['editor']['plugins']['get'](c),_0x3fc290=new Set();for(const {authorId:_0x16d01f}of _0x2baeae)_0x507cfe['getUser'](_0x16d01f)||_0x3fc290['add'](_0x16d01f);if(0x0===_0x3fc290['size'])return;const _0x12ae8b=await dt['getMany'](_0xa456e9,Array['from'](_0x3fc290));for(const _0x1b8164 of _0x12ae8b)_0x507cfe['getUser'](_0x1b8164['id'])||_0x507cfe['addUser'](_0x1b8164);}}function R(_0x2fb935){if(ft(_0x2fb935))return new Promise(()=>{});throw _0x2fb935;}function ft(_0x585bba){return _0x585bba['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x585bba['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class m extends _0x3aa519{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 _0x2deff8=this['editor']['plugins']['get'](c),_0x14abaa=this['editor']['plugins']['get']('CommentsEditing'),_0x176a34=this['editor']['plugins']['get'](a);return this['editor']['data']['once']('ready',()=>{this['listenTo'](_0x2deff8,'change:state',(_0x59a0bc,_0x26b75d,_0x34ec57)=>{_0x14abaa['isThreadsLoadingPaused']='connected'!==_0x34ec57;});}),this['listenTo'](_0x2deff8,'change:state',(_0x2bce5,_0xd0b3d0,_0xd2f85b)=>{this['editor']['plugins']['get']('CommentsRepository')['switchReadOnly']('connected'!==_0xd2f85b);}),_0x176a34['_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 _0x3aa519{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 _0x3aa519{static ['RevisionHistoryService']=/* #__PURE__ -- @preserve */
|
|
28
|
+
((()=>it)());['_lastRequestId'];['_revisionTracker'];['_revisionHistoryService'];['_oldOffset'];static get['requires'](){return[c,l,'RevisionTracker',i,_0x1f4be7];}static get['pluginName'](){return'CloudServicesRevisionHistoryAdapter';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2eed43){super(_0x2eed43);const _0x2d9feb=this['editor']['config']['get']('collaboration.channelId');this['_lastRequestId']=null,this['_revisionTracker']=this['editor']['plugins']['get']('RevisionTracker'),this['_revisionHistoryService']=new u['RevisionHistoryService'](_0x2d9feb);}async['init'](){const _0x53c50a=this['editor']['plugins']['get'](l),_0x2b31fd=_0x53c50a['serverHistory'],_0x322413=this['editor']['plugins']['get'](c);this['_revisionTracker']['setSource']({'history':_0x2b31fd,'getLatestVersion':()=>this['_getLatestVersion'](),'getCurrentRevisionId':()=>_0x53c50a['sessionId']});const _0x356733=this['editor']['config']['get']('cloudServices.bundleVersion')||nt,_0x4d73af=await tt['isBundleUploaded'](_0x322413['connection'],_0x356733);this['_revisionTracker']['adapter']={'getRevision':async({revisionId:_0x395b5f})=>(await this['_waitForServiceReady'](),await this['_revisionHistoryService']['getRevision'](_0x395b5f)),'updateRevisions':async _0x5443bd=>{await this['_waitForServiceReady']();const _0x5b790f=this['_revisionTracker']['currentRevision'];if(_0x4d73af&&0x1===_0x5443bd['length']&&_0x5443bd[0x0]['id']===_0x5b790f['id'])return _0x5443bd;for(const _0x207faa of _0x5443bd)_0x207faa['id']===_0x5b790f['id']&&(_0x207faa['isEmptyCurrent']=_0x207faa['fromVersion']===_0x207faa['toVersion']);return this['_revisionHistoryService']['updateRevisions'](_0x5443bd,this['_lastRequestId'])['then'](_0x195e07=>(this['_lastRequestId']=_0x195e07,_0x5443bd))['catch'](_0x57961c=>{if(st(_0x57961c)||'400'===_0x57961c['code']&&void 0x0!==_0x57961c['data']['wrongRequestId']){for(const _0x2e9dea of _0x5443bd){!this['_revisionTracker']['repository']['getRevision'](_0x2e9dea['id'])||this['_revisionTracker']['_bufferUpdate'](_0x2e9dea['id'],_0x2e9dea,!0x1);}if(st(_0x57961c))throw _0x57961c;return _0x5443bd;}throw _0x57961c;});}},this['listenTo'](this['_revisionHistoryService'],'revisionsUpdated',(_0x1e30fa,{revisionsData:_0x517812,requestId:_0x57f5b6})=>{Math['max'](..._0x517812['map'](_0x1107e0=>_0x1107e0['toVersion']))>this['_getLatestVersionFromServerOperations']()-0x1?this['_getLatestVersion']()['then'](()=>{this['_handleRevisionsUpdate'](_0x517812,_0x57f5b6);}):this['_handleRevisionsUpdate'](_0x517812,_0x57f5b6);});const {revisions:_0x5d01c6,requestId:_0x5e6c53}=await this['_revisionHistoryService']['connect'](_0x322413['connection']);_0x322413['addToReconnectionStack'](this),this['_lastRequestId']=_0x5e6c53,await this['_fetchMissingUsers'](_0x5d01c6);for(const _0x3606dd of _0x5d01c6)this['_revisionTracker']['addRevisionData'](_0x3606dd);this['listenTo'](_0x53c50a,'change:_isConnected',(_0x278ed2,_0x26cce8,_0x1c3263)=>{_0x1c3263&&(this['_oldOffset']=_0x53c50a['_offset'],_0x278ed2['off']());}),this['_revisionTracker']['bind']('isEnabled')['to'](_0x322413,'state',_0x36fe05=>_0x36fe05===_0x198497['CONNECTED']);}async['reconnect'](){const _0x5531e4=this['editor']['plugins']['get'](c),_0x4cb8ba=this['editor']['plugins']['get'](l),_0x54273a=async()=>{const _0x3e733a=this['_revisionTracker']['currentRevision'],_0x1ab770=_0x3e733a['id'],_0x4243f9=_0x1ab770!==_0x4cb8ba['sessionId'];if(_0x4243f9){const _0x4ca455=_0x4cb8ba['_offset']-this['_oldOffset'],_0x3802c8=this['_getLatestVersionFromServerOperations']();this['_revisionTracker']['_revisionDataBuilder']['reInit']();if(_0x3e733a['toVersion']+_0x4ca455!==_0x3802c8){const _0x5ad180=_0x3e733a['fromVersion']+_0x4ca455,_0x3059a8=this['editor']['plugins']['get'](_0x1f4be7),_0x34db39=this['_revisionTracker']['buildRevisionData']({'revision':_0x3e733a,'from':_0x5ad180,'to':_0x3802c8});_0x34db39['id']=_0x3e733a['id'];const _0x9f1acf=_0x34db39['authorsIds']['map'](_0x28921a=>_0x3059a8['getUser'](_0x28921a));_0x3e733a['_update']({..._0x34db39,'authors':_0x9f1acf},!0x0),this['_revisionTracker']['_bufferUpdate'](_0x3e733a['id'],_0x34db39,!0x0);}this['_revisionTracker']['_startingVersion']=_0x3802c8,(_0x3e733a['toVersion']===_0x3e733a['fromVersion']&&!this['_revisionTracker']['_bufferedUpdates']['has'](_0x1ab770)&&this['_revisionTracker']['repository']['_revisions']['remove'](_0x1ab770),this['_revisionTracker']['_createCurrentRevision'](_0x3802c8));}const {revisions:_0x5f5798,requestId:_0x1095b6}=await this['_revisionHistoryService']['reconnect'](_0x5531e4['connection'],this['_lastRequestId']);_0x4243f9&&_0x5f5798['length']>0x0?_0x4cb8ba['_handleReconnectionError']():(await this['_fetchMissingUsers'](_0x5f5798),this['_handleRevisionsUpdate'](_0x5f5798,_0x1095b6),this['_revisionTracker']['sendBufferedUpdates']());};return _0x4cb8ba['_isConnected']?_0x54273a():new Promise((_0x2f13c3,_0x5d7e5f)=>{_0x4cb8ba['once']('change:_isConnected',()=>{_0x54273a()['then'](_0x2f13c3)['catch'](_0x5d7e5f);});});}['destroy'](){super['destroy']();}async['_waitForServiceReady'](){this['_revisionHistoryService']['isConnected']||await new Promise(_0x15ea79=>{this['listenTo'](this['_revisionHistoryService'],'connected',_0x2c929e=>{_0x2c929e['off'](),_0x15ea79();});});}['_getLatestVersionFromServerOperations'](){const _0x3841ee=this['editor']['plugins']['get'](l)['serverHistory']['getOperations']()['reverse']();for(const _0x1d1bfb of _0x3841ee)if('marker'!==_0x1d1bfb['type']||_0x1d1bfb['affectsData'])return _0x1d1bfb['baseVersion']+0x1;}['_getLatestVersion'](){const _0x1edb8f=this['editor']['plugins']['get'](l);return new Promise(_0x18acb5=>{_0x1edb8f['_isPendingUpdate']?_0x1edb8f['once']('change:_isPendingUpdate',()=>{_0x18acb5(this['_getLatestVersionFromServerOperations']());}):_0x18acb5(this['_getLatestVersionFromServerOperations']());});}['_handleRevisionsUpdate'](_0x28e5ac,_0x1b3e75){const _0x53e26d=this['_revisionTracker']['repository'];this['_lastRequestId']=_0x1b3e75;for(const _0x400b2a of _0x28e5ac){const _0x1fb475=_0x53e26d['getRevision'](_0x400b2a['id']);if(_0x1fb475){if((_0x400b2a['fromVersion']||_0x400b2a['toVersion'])&&(_0x400b2a['diffData']=null),_0x1fb475===this['_revisionTracker']['currentRevision']){const _0x1ea9ba=Math['max'](_0x1fb475['toVersion'],_0x400b2a['toVersion']),_0x2f2c8b=Math['max'](_0x1fb475['fromVersion'],_0x400b2a['fromVersion']);let _0x3866fe;_0x1fb475['toVersion']===_0x400b2a['toVersion']&&_0x1fb475['fromVersion']===_0x400b2a['fromVersion']?(_0x3866fe=!0x0,this['_preventResendingRevisionData'](_0x400b2a)):_0x400b2a['toVersion']===_0x1ea9ba&&_0x400b2a['fromVersion']===_0x2f2c8b?_0x3866fe=!0x1:(_0x1fb475['toVersion']===_0x1ea9ba&&_0x1fb475['fromVersion']===_0x2f2c8b||this['_fixRevision']({'revision':_0x1fb475,'from':_0x2f2c8b,'to':_0x1ea9ba}),_0x3866fe=!0x0),_0x3866fe&&(delete _0x400b2a['fromVersion'],delete _0x400b2a['toVersion'],delete _0x400b2a['diffData'],delete _0x400b2a['createdAt'],delete _0x400b2a['authorsIds']);}this['_revisionTracker']['setRevisionData'](_0x400b2a),this['_preventResendingRevisionData'](_0x400b2a);}else this['_revisionTracker']['addRevisionData'](_0x400b2a);}const _0x3d03dc=_0x53e26d['getRevisions']();_0x3d03dc['reverse']();for(let _0x13aee5=0x0;_0x13aee5<_0x3d03dc['length']-0x1;_0x13aee5++){const _0x10d5a8=_0x3d03dc[_0x13aee5],_0x3bbca5=_0x3d03dc[_0x13aee5+0x1];if(_0x10d5a8['fromVersion']<_0x3bbca5['toVersion']){const _0xb87b3b=_0x3bbca5['toVersion'],_0x4e2834=Math['max'](_0xb87b3b,_0x10d5a8['toVersion']);this['_fixRevision']({'revision':_0x10d5a8,'from':_0xb87b3b,'to':_0x4e2834});}}}['_fixRevision']({revision:_0x23ff4b,from:_0x45f343,to:_0x2c0124}={}){const _0x24dc57=this['editor']['plugins']['get'](_0x1f4be7),_0x442955=this['_revisionTracker']['buildRevisionData']({'revision':_0x23ff4b,'from':_0x45f343,'to':_0x2c0124});_0x442955['authors']=_0x442955['authorsIds']['map'](_0x187b51=>_0x24dc57['getUser'](_0x187b51)),_0x23ff4b['_update'](_0x442955);}['_preventResendingRevisionData'](_0x9a043e){const _0x4268cf={};_0x4268cf['id']=_0x9a043e['id'];for(const _0x33be21 of Object['keys'](_0x9a043e))'id'!==_0x33be21&&(_0x4268cf[_0x33be21]=void 0x0);this['_revisionTracker']['_bufferUpdate'](_0x4268cf['id'],_0x4268cf,!0x0);}async['_fetchMissingUsers'](_0x47f40d){const _0x21efec=this['editor']['plugins']['get'](_0x1f4be7),{connection:_0x14bec0}=this['editor']['plugins']['get'](c),_0x5e66ac=new Set();for(const _0x38a92c of _0x47f40d){for(const _0x2781d9 of _0x38a92c['authorsIds'])_0x34d294(_0x2781d9);_0x38a92c['creatorId']&&_0x34d294(_0x38a92c['creatorId']);}if(0x0===_0x5e66ac['size'])return;const _0x205709=await dt['getMany'](_0x14bec0,Array['from'](_0x5e66ac));for(const _0x5b280e of _0x205709)_0x21efec['getUser'](_0x5b280e['id'])||_0x21efec['addUser'](_0x5b280e);function _0x34d294(_0x4992c6){_0x21efec['getUser'](_0x4992c6)||_0x5e66ac['add'](_0x4992c6);}}}function st(_0x188f64){return _0x188f64['message']['startsWith']('cloud-services-internal-error:\x20Revision\x20History\x20Service\x20is\x20not\x20connected.')||_0x188f64['message']['startsWith']('cloud-services-internal-error:\x20Not\x20connected.')||_0x188f64['message']['startsWith']('cloud-services-internal-error:\x20Request\x20timeout.');}class g extends _0x3aa519{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 _0x11e2dc{constructor(_0x5cd687){super(_0x5cd687);const _0x2ac43b=this['bindTemplate'];this['set']('usersCount',0x0),this['set']('isHidden',!0x0),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-presence-list__counter',_0x2ac43b['if']('isHidden','ck-presence-list__counter--hidden')]},'children':[{'text':_0x2ac43b['to']('usersCount',_0x65d494=>q(_0x5cd687,'CONNECTED_USERS',_0x65d494))}]});}}class es extends _0x11e2dc{['items'];['keystrokes'];constructor(_0x4bf805){super(_0x4bf805);const _0x5afa5e=this['bindTemplate'];this['items']=this['createCollection'](),this['keystrokes']=new _0x47fa68(),this['set']({'hasPopup':!0x1,'isExpanded':!0x1}),this['setTemplate']({'tag':'div','attributes':{'aria-haspopup':_0x5afa5e['if']('hasPopup'),'aria-expanded':_0x5afa5e['to']('isExpanded',_0x4440df=>this['hasPopup']&&String(_0x4440df)),'aria-label':_0x5afa5e['to']('hasPopup',_0x11c49f=>q(_0x4bf805,_0x11c49f?'Collapsed\x20connected\x20users\x20list\x20(press\x20ENTER\x20to\x20open\x20it)':'Connected\x20users\x20list')),'role':'list','tabindex':_0x5afa5e['to']('hasPopup',_0x4f945c=>!!_0x4f945c&&0x0),'class':['ck','ck-presence-list__list']},'children':this['items'],'on':{'click':_0x5afa5e['to'](()=>this['fire']('execute'))}}),this['on']('change:hasPopup',(_0x43ca1b,_0x348fe0,_0x370c38)=>{this['element']&&(_0x370c38?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 _0x11e2dc{['counterView'];['inlineListView'];constructor(_0x386c20){super(_0x386c20);const _0x315796=this['bindTemplate'];this['set']('isCollapsed',!0x0),this['counterView']=new ts(this['locale']),this['inlineListView']=new es(_0x386c20),this['inlineListView']['bind']('hasPopup')['to'](this,'isCollapsed'),this['listenTo'](this['inlineListView']['items'],'change',()=>{for(const _0x5da74a of this['inlineListView']['items'])_0x5da74a['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',_0x315796['if']('isCollapsed','ck-presence-list--collapsed')]},'children':[this['counterView'],this['inlineListView']]});}}class j extends _0x11e2dc{['listWrapperView'];constructor(_0x2a8e97,_0x2fa574){super(_0x2a8e97),this['listWrapperView']=new mt(_0x2a8e97,_0x2fa574),this['setTemplate']({'tag':'div','attributes':{'tabindex':-0x1,'role':'application','class':['ck','ck-presence-list__dropdown-list'],'aria-label':q(_0x2a8e97,'Connected\x20users\x20list\x20dropdown\x20menu')},'children':[this['listWrapperView']]});}}class mt extends _0x40737a{constructor(_0x5f1542,_0x5c904a){super(_0x5f1542);const _0x42f1a6=this['bindTemplate'];this['set']('_isScrollable',!0x1),this['setTemplate']({'tag':_0x5c904a?'div':'ul','attributes':{'class':['ck','ck-reset','ck-list','ck-presence-list__dropdown-list-wrapper',_0x42f1a6['if']('_isScrollable','ck-presence-list__dropdown-list-wrapper_scrollable')],'role':_0x42f1a6['to']('role'),'aria-label':_0x42f1a6['to']('ariaLabel'),'aria-labelledby':_0x42f1a6['to']('ariaLabelledBy')},'children':this['items']}),this['listenTo'](_0x3d2acd['window'],'resize',()=>this['checkIfScrollable']()),this['items']['on']('change',()=>this['checkIfScrollable']());}['render'](){super['render'](),this['checkIfScrollable']();}['checkIfScrollable'](){const _0x3ca287=this['element'];_0x3ca287&&(this['_isScrollable']=Math['max'](_0x3ca287['scrollHeight'],_0x3ca287['clientHeight'])>0.8*window['innerHeight']);}}class k extends rt{['userView'];constructor(_0x273c94,_0x354e76,_0x2199da){super(_0x273c94);const _0x3bc09a=this['bindTemplate'];this['userView']=new ct(_0x273c94,_0x354e76);const _0xe6192c={'tag':'li','attributes':{'class':['ck','ck-presence-list__dropdown-list-item'],'tabindex':-0x1,'role':'presentation','aria-label':_0x354e76['name']},'children':[this['userView'],{'tag':'span','attributes':{'class':['ck','ck-user__full-name']},'children':[{'text':_0x354e76['name']}]},{'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x354e76['color']['getBackgroundColorClass']()],'aria-hidden':'true'}}]};_0x2199da&&(_0xe6192c['tag']='button',_0xe6192c['on']={'click':_0x3bc09a['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0xe6192c);}['focus'](){this['element']['focus']();}}class y extends _0x11e2dc{['userView'];['markerView'];constructor(_0x23bb3b,_0x549253,_0xe2cf97){super(_0x23bb3b);const _0x4f2c80=this['bindTemplate'];this['set']('isFocusable',!0x1),this['set']('hasTooltip',!0x0),this['set']('tooltipPosition',''),this['userView']=new ct(_0x23bb3b,_0x549253),this['markerView']=new at(_0x23bb3b,_0x549253);const _0x389673=new ot(_0x23bb3b);_0x389673['template']['tag']='span',_0x389673['text']=_0x549253['name'];const _0x5cd520={'tag':'div','attributes':{'class':['ck','ck-presence-list__list-item'],'role':'listitem','tabindex':_0x4f2c80['to']('isFocusable',_0x3ff11d=>!!_0x3ff11d&&0x0),'aria-labelledby':_0x389673['id'],'data-cke-tooltip-text':this['userView']['name'],'data-cke-tooltip-position':_0x4f2c80['to']('tooltipPosition'),'data-cke-tooltip-disabled':_0x4f2c80['to']('hasTooltip',_0x3a4ce8=>!_0x3a4ce8),'data-cke-tooltip-class':'ck-presence-list__list-item__tooltip'},'children':[this['userView'],this['markerView'],_0x389673]};_0xe2cf97&&(_0x5cd520['tag']='button',_0x5cd520['on']={'click':_0x4f2c80['to'](()=>this['fire']('execute'))}),this['setTemplate'](_0x5cd520);}}class at extends _0x11e2dc{constructor(_0x10e476,_0x50141a){super(_0x10e476),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-presence-list__marker',_0x50141a['color']['getBackgroundColorClass']()],'aria-hidden':'true'}});}}const A={'collapseAt':0x6,'displayMe':!0x0};class r extends _0x44cad5{['currentDisplayedUsers'];['balloonPanelView'];['view'];['presenceDropdownView'];['_bodyCollection']=null;constructor(_0x3a2208){super(_0x3a2208),this['context']['config']['define']('presenceList',A);const _0x335ae6=_0x3a2208['config']['get']('presenceList.collapseAt');if('number'!=typeof _0x335ae6)throw new _0x33cd62('presencelist-collapseat-invalid-format',this);if(_0x335ae6<0x1)throw new _0x33cd62('presencelist-collapseat-invalid-format',this);this['_allConnectedUsers']=this['context']['plugins']['get'](i)['allConnectedUsers'],this['set']('usersCount',0x0),this['currentDisplayedUsers']=new _0x35e6fd(),this['balloonPanelView']=new _0xb1cf9a(),this['balloonPanelView']['class']='ck\x20ck-presence-list__balloon',this['view']=this['_createView'](),this['presenceDropdownView']=void 0x0;}static get['requires'](){return[i];}['init'](){for(const _0x3cba85 of this['_allConnectedUsers'])this['_handleUserAdd'](_0x3cba85);this['listenTo'](this['_allConnectedUsers'],'add',(_0x4e65aa,_0x203061)=>{this['_handleUserAdd'](_0x203061);}),this['listenTo'](this['_allConnectedUsers'],'remove',(_0x52653c,_0x20bf9e)=>{this['_handleUserRemove'](_0x20bf9e);});}['_createView'](){const _0x310959=this['context'],_0x3573a7=new L(this['context']['locale']),_0x1ea9d1=this['balloonPanelView'];if(!_0xc0e31b(_0x310959['config']['get']('presenceList.container')))throw new _0x33cd62('presencelist-missing-container',this);return _0x3573a7['counterView']['bind']('usersCount')['to'](this),_0x3573a7['bind']('isCollapsed')['to'](this,'usersCount',_0x1bc1e8=>{const {collapseAt:_0xc4c83,displayMe:_0x3a6b8a}=_0x310959['config']['get']('presenceList'),_0x57497a=_0x1bc1e8>=_0xc4c83;return _0x3573a7['counterView']['isHidden']=!(0x1==_0x1bc1e8&&_0x3a6b8a||_0x57497a),_0x57497a||this['hideDropdown'](),_0x57497a;}),_0x3573a7['inlineListView']['items']['bindTo'](this['currentDisplayedUsers'])['using'](_0x4ee199=>{const _0x5dccf7=_0x310959['config']['get']('presenceList'),_0x9b01b1=new y(_0x310959['locale'],_0x4ee199,!!_0x5dccf7['onClick']);return _0x9b01b1['bind']('hasTooltip')['to'](_0x3573a7,'isCollapsed',_0x5a54a8=>!_0x5a54a8),_0x9b01b1['bind']('isFocusable')['to'](_0x3573a7,'isCollapsed',_0xae6be4=>!_0xae6be4),_0x5dccf7['onClick']&&this['listenTo'](_0x9b01b1,'execute',()=>{this['view']['isCollapsed']||_0x5dccf7['onClick'](_0x4ee199,_0x9b01b1['element']);}),_0x9b01b1;}),this['listenTo'](_0x3573a7['inlineListView'],'execute',()=>{this['presenceDropdownView']?this['hideDropdown']():this['view']['isCollapsed']&&this['showDropdown']();}),_0x3573a7['inlineListView']['keystrokes']['set']('Enter',(_0xc97822,_0x286fa6)=>{this['view']['isCollapsed']&&(this['showDropdown'](),_0x286fa6());}),_0x3573a7['render'](),_0x1ea9d1['render'](),_0x24e8ff({'emitter':_0x3573a7,'activator':()=>_0x1ea9d1['isVisible'],'contextElements':[_0x1ea9d1['element'],_0x3573a7['inlineListView']['element']],'callback':()=>this['hideDropdown']()}),_0x310959['config']['get']('presenceList.container')['appendChild'](_0x3573a7['element']),this['_bodyCollection']=new _0x2a110c(this['context']['locale']),this['_bodyCollection']['attachToDom'](),this['_bodyCollection']['add'](this['balloonPanelView']),_0x3573a7;}['_handleUserAdd'](_0x80f9a1){if(!this['context']['config']['get']('presenceList.displayMe')&&_0x80f9a1['isMe'])return;const _0x5d3021=this['context']['config']['get']('presenceList.collapseAt')-0x1;this['usersCount']++,this['currentDisplayedUsers']['length']==_0x5d3021&&this['currentDisplayedUsers']['length']>0x1&&this['currentDisplayedUsers']['remove'](0x1);const _0x6db0e9=_0x80f9a1['isMe']?0x0:this['currentDisplayedUsers']['length'];this['currentDisplayedUsers']['add'](_0x80f9a1,_0x6db0e9);}['_handleUserRemove'](_0x54aefb){if(this['usersCount']--,this['currentDisplayedUsers']['get'](_0x54aefb['id'])&&(this['currentDisplayedUsers']['remove'](_0x54aefb['id']),this['currentDisplayedUsers']['length']<this['usersCount'])){for(const _0x5be4d7 of Array['from'](this['_allConnectedUsers'])['reverse']())if(!this['currentDisplayedUsers']['get'](_0x5be4d7['id']))return void this['currentDisplayedUsers']['add'](_0x5be4d7,Math['min'](this['currentDisplayedUsers']['length'],0x1));}}['showDropdown'](){if(this['presenceDropdownView'])return;const _0x1a3974=this['context']['config']['get']('presenceList');this['presenceDropdownView']=new j(this['context']['locale'],!!_0x1a3974['onClick']),this['view']['inlineListView']['isExpanded']=!0x0;const {listWrapperView:_0x4c4bdd}=this['presenceDropdownView'];_0x4c4bdd['items']['bindTo'](this['_allConnectedUsers'])['using'](_0x19e687=>{if(!_0x1a3974['displayMe']&&_0x19e687['isMe'])return null;const _0x372219=new k(this['context']['locale'],_0x19e687,!!_0x1a3974['onClick']);return _0x1a3974['onClick']&&this['listenTo'](_0x372219,'execute',()=>{_0x1a3974['onClick'](_0x19e687,_0x372219['element']);}),_0x372219;}),this['balloonPanelView']['content']['add'](this['presenceDropdownView']),this['balloonPanelView']['pin']({'target':this['view']['inlineListView']['element']}),_0x4c4bdd['focus'](),_0x4c4bdd['checkIfScrollable']();const _0x23b3ae=(_0x1e0c23,_0x555c8f)=>{this['hideDropdown'](),this['view']['inlineListView']['focus'](),_0x555c8f();};_0x4c4bdd['keystrokes']['set']('Esc',_0x23b3ae),_0x4c4bdd['keystrokes']['set']('Shift+Tab',_0x23b3ae),_0x4c4bdd['keystrokes']['set']('Tab',(_0x4a1cf0,_0x1df721)=>{!function(_0x6f9bd){const _0x3d9a27=['a','button','input','select','textarea','[tabindex]','[contenteditable]']['map'](_0x25b579=>_0x25b579+':not([disabled]):not([tabindex=\x22-1\x22])')['join'](','),_0x6e69d9=[...document['body']['querySelectorAll'](_0x3d9a27)]['filter'](_0x216bae=>_0x216bae===document['activeElement']||_0x216bae['offsetWidth']+_0x216bae['offsetHeight']>0x0)['sort']((_0x457a8c,_0x4db2ed)=>(_0x457a8c['tabIndex']||0x0)-(_0x4db2ed['tabIndex']||0x0)),_0x4033f8=_0x6e69d9['indexOf'](_0x6f9bd),_0x544810=_0x6e69d9[(_0x4033f8+0x1)%_0x6e69d9['length']];_0x544810&&_0x544810['focus']();}(this['view']['element']),this['hideDropdown'](),_0x1df721();}),_0x4c4bdd['focusTracker']['add'](this['view']['element']),_0x4c4bdd['focusTracker']['on']('change:isFocused',(_0x42e8af,_0x5da921,_0x4cf31b)=>{_0x4cf31b||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 _0x44cad5{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':_0x1e5366=>0x1!=_0x1e5366}};
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
(
|
|
23
|
+
(_0x34bc60=>{const {af:{dictionary:_0x168902,getPluralForm:_0x204486}}={'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':_0x154b3b=>0x1!=_0x154b3b}};_0x34bc60['af']||={'dictionary':{},'getPluralForm':null},_0x34bc60['af']['dictionary']=Object['assign'](_0x34bc60['af']['dictionary'],_0x168902),_0x34bc60['af']['getPluralForm']=_0x204486;})(window['CKEDITOR_TRANSLATIONS']||={});
|