@ckeditor/ckeditor5-collaboration-core 43.3.0-alpha.3 → 43.3.0-alpha.7
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/dist/index.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
import{ContextPlugin as _0x6eaea2,Editor as _0x36e04e,icons as _0x4b708d}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x453e27,Collection as _0x33ddd0,uid as _0x58a93d,first as _0x41312b,FocusTracker as _0x262fb6,KeystrokeHandler as _0x3b6b5f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x39f517,IconView as _0x53f2f8,ButtonView as _0x4d10af,DropdownButtonView as _0x201fc2,FocusCycler as _0x396c63,isViewWithFocusCycler as _0x194f45}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x9bb03 from'date-fns/format/index.js';import _0x3cd478 from'date-fns/parseISO/index.js';import _0x14a7f7 from'date-fns/differenceInCalendarDays/index.js';class o extends _0x6eaea2{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x2c4e88,_0xdb39d9){let _0x56e2d1;if(_0xdb39d9||(_0xdb39d9=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0xdb39d9?_0x56e2d1=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x56e2d1=this['context']['editors']['find'](_0x52da0f=>_0x52da0f['config']['get']('collaboration.channelId')==_0xdb39d9)),!_0x56e2d1)throw new _0x453e27('permissions-set-permissions-invalid-channel-id',null);const _0x5ea1aa=_0x56e2d1['plugins'],_0x58e43a=_0x5ea1aa['has']('CommentsRepository')?_0x5ea1aa['get']('CommentsRepository'):void 0x0,_0x26eb01=_0x5ea1aa['has']('CommentsOnly')&&_0x5ea1aa['get']('CommentsOnly'),_0x25e096=_0x2c4e88['includes']('document:write'),_0x329c01=_0x2c4e88['includes']('comment:modify_all'),_0x3af3b2=_0x2c4e88['includes']('comment:admin'),_0x511454=_0x2c4e88['includes']('comment:write'),_0x527a78=_0x511454||_0x3af3b2,_0x2378d0=_0x527a78||_0x329c01,_0x451092=_0x25e096||_0x527a78;(_0x26eb01&&(_0x26eb01['isEnabled']=!_0x25e096&&_0x2378d0),_0x56e2d1 instanceof _0x36e04e)&&(!(_0x25e096||_0x2378d0&&_0x58e43a)?_0x56e2d1['enableReadOnlyMode']('no-permissions'):_0x56e2d1['disableReadOnlyMode']('no-permissions'));if(_0x58e43a){_0x58e43a['setPermissions']({'admin':_0x3af3b2,'modifyAll':_0x329c01,'write':_0x511454,'resolve':_0x451092},_0xdb39d9);const _0x2a9322=_0x56e2d1 instanceof _0x36e04e&&_0x56e2d1['commands']['get']('addCommentThread');_0x2a9322&&(_0x527a78?_0x2a9322['clearForceDisabled']('noPermissions'):_0x2a9322['forceDisabled']('noPermissions'));}}}function r(_0x599b2b,_0x158a07){const t=_0x599b2b['t'];switch(_0x158a07){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class l extends _0x6eaea2{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o];}constructor(_0x3f94fa){super(_0x3f94fa),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x33ddd0(),this['_locale']=_0x3f94fa['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x45a25d=this['context'];this['licenseKey']=_0x45a25d['config']['get']('licenseKey');const _0xbff6f=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x522945;for(const _0x294a7f in _0x45a25d){const _0x5820fb=_0x45a25d[_0x294a7f];if(_0xbff6f['includes'](_0x5820fb)){delete _0x45a25d[_0x294a7f],_0x522945=_0x5820fb;break;}}if('licenseKeyInvalid'===_0x522945)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x453e27('invalid-license-key',null);if('licenseKeyTrial'===_0x522945&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20collaboration\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'licenseKeyTrialLimit:operations'===_0x522945)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x453e27('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x522945)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x453e27('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x522945)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x453e27('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x522945&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x8bcee8,name:_0x5140c3,..._0x3656e9}){if(!_0x8bcee8||'string'!=typeof _0x8bcee8)throw new _0x453e27('users-add-invalid-id');if(this['users']['has'](_0x8bcee8))throw new _0x453e27('users-add-duplicated-id',null,{'id':_0x8bcee8});const _0x44c501={..._0x3656e9,'id':_0x8bcee8,'name':u(this['_locale'],_0x5140c3),'color':this['_getNextColor']()};_0x44c501['name']=u(this['_locale'],_0x44c501['name']);const _0xf9f589=new P(_0x44c501);return this['users']['add'](_0xf9f589),_0xf9f589;}['getUser'](_0x17b7e2){return this['users']['get'](_0x17b7e2);}['useAnonymousUser'](){const _0x452a1d=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x452a1d);}['defineMe'](_0x18bfa9){if(this['_myId'])throw new _0x453e27('users-me-already-defined',null);const _0x1e1ca9=this['getUser'](_0x18bfa9);if(!_0x1e1ca9)throw new _0x453e27('users-me-missing-user',null);this['_myId']=_0x18bfa9,_0x1e1ca9['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x3f1e07=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x3f1e07&&(this['_lastColor']=0x0),new a(this['_lastColor']++);}['_addAnonymousUser'](){const _0x4f5d62=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x4f5d62,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x5adf63){this['id']=_0x5adf63['id'],this['color']=_0x5adf63['color'],this['name']=_0x5adf63['name'],this['avatar']=_0x5adf63['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x9c9ef6=this['name']['split']('\x20');return 0x1===_0x9c9ef6['length']?this['_getInitial'](_0x9c9ef6[0x0]):this['_getInitial'](_0x9c9ef6[0x0])+this['_getInitial'](_0x9c9ef6[_0x9c9ef6['length']-0x1]);}['_getInitial'](_0x20f73c){return _0x20f73c['charAt'](0x0)['toUpperCase']();}}function u(_0x18337c,_0x5c3a77=''){return''==(_0x5c3a77=_0x5c3a77['trim']())?r(_0x18337c,'Anonymous'):_0x5c3a77;}class a{['_id'];constructor(_0x3e65ee){this['_id']=_0x3e65ee;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class J extends _0x39f517{['name'];['notificationView'];constructor(_0x442dc2,_0x3f017e,_0x305c3d){super(_0x442dc2),this['name']=_0x3f017e['name'],this['notificationView']=null;const _0x47e9a5=['ck','ck-user'],_0x45b5d2=['ck','ck-user__img'];if(_0x3f017e['isAnonymous']&&_0x45b5d2['push']('ck-user__anonymous'),!_0x3f017e['isAnonymous']&&_0x3f017e['isMe']&&_0x47e9a5['push']('ck-user_me'),_0x3f017e['avatar']&&_0x45b5d2['push']('ck-user__avatar'),_0x305c3d){const _0x4c40e9=new _0x53f2f8();_0x4c40e9['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x4c40e9['content']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10\x200C4.48\x200\x200\x204.48\x200\x2010s4.48\x2010\x2010\x2010\x2010-4.48\x2010-10S15.52\x200\x2010\x200zm1\x2015H9v-2h2v2zm0-4H9V5h2v6z\x22/></svg>\x0a',this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x305c3d},'children':[_0x4c40e9]};}const _0x569ef8=[{'tag':'div','attributes':{'class':_0x45b5d2,'style':{'background-image':_0x3f017e['avatar']?'url(\x27'+_0x3f017e['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x3f017e['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x3f017e['name']},'children':[{'text':_0x3f017e['initials']}]}];this['notificationView']&&_0x569ef8['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x47e9a5,'data-user-id':_0x3f017e['id']},'children':_0x569ef8});}}class G extends _0x39f517{['id'];constructor(_0xeeb707,_0x36f9b7){super(_0xeeb707),this['id']='ck-aria-description-'+_0x58a93d(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x36f9b7}]});}}class U extends _0x4d10af{['render'](){super['render'](),V(this);}}class Y extends _0x201fc2{['render'](){super['render'](),V(this);}}function V(_0x4ed839){_0x4ed839['listenTo'](_0x4ed839['element'],'mousedown',(_0x2b4004,_0x4e7ee0)=>{_0x4e7ee0['stopPropagation'](),_0x4e7ee0['preventDefault']();}),_0x4ed839['listenTo'](_0x4ed839['element'],'mouseup',()=>{_0x4ed839['element']['focus']();});}function E(_0x46ec02={}){if(void 0x0!==_0x46ec02['dateTimeFormat']&&'function'!=typeof _0x46ec02['dateTimeFormat'])throw new _0x453e27('invalid-date-time-format');return _0x124ed6=>{const _0x5d7139='string'==typeof _0x124ed6?_0x3cd478(_0x124ed6):_0x124ed6,_0x36ff01=new Date(),_0x4a318a=_0x14a7f7(_0x36ff01,_0x5d7139);return _0x46ec02['dateTimeFormat']?_0x46ec02['dateTimeFormat'](_0x5d7139):_0x9bb03(_0x5d7139,0x0===_0x4a318a?'\x27Today\x27\x20hh:mma':0x1===_0x4a318a?'\x27Yesterday\x27\x20hh:mma':_0x4a318a<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x4e429f,_0x206f10){const _0x69ff0e=_0x4e429f['mapper']['markerNameToElements'](_0x206f10['name']);if(!_0x69ff0e)return null;const _0x1e12ca=_0x41312b(_0x69ff0e['values']());return _0x4e429f['view']['domConverter']['mapViewToDom'](_0x1e12ca)||null;}function R(_0x5a3ad6,_0x163643){if(0x0===_0x163643['length'])return null;const _0x3042c2=[],_0x8d204c=_0x5a3ad6['view']['domConverter'];for(const _0x36afba of _0x163643){const _0x560959=_0x5a3ad6['mapper']['markerNameToElements'](_0x36afba['name']);if(!_0x560959)continue;const _0x20357f=Array['from'](_0x560959)['map'](_0x21829e=>_0x8d204c['mapViewToDom'](_0x21829e))['filter'](_0x3c833e=>!!_0x3c833e);_0x3042c2['push'](..._0x20357f);}if(0x0===_0x3042c2['length'])return null;const _0x205466=[];for(const _0x7e1586 of _0x3042c2){const _0x3ec347=_0x7e1586['getClientRects']()['item'](0x0);_0x3ec347&&_0x205466['push']({'x':_0x3ec347['x'],'y':_0x3ec347['y'],'domElement':_0x7e1586});}return 0x0===_0x205466['length']?null:(_0x205466['sort']((_0x688568,_0x3f6d85)=>_0x688568['y']-_0x3f6d85['y']||_0x688568['x']-_0x3f6d85['x']),_0x205466['map'](_0x1fab8d=>_0x1fab8d['domElement']));}function Z(_0x2f2265,{limit:_0xdcd76c,suffix:_0x4263a6='...'}){const _0x1b6c73=[];let _0x744cb=0x0;const _0x1dd493=_0x2f2265['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x2dac38=0x0;_0x2dac38<_0x1dd493['length'];_0x2dac38++){let _0x4ebaeb=_0x1dd493[_0x2dac38];const _0x402f05=$(_0x4ebaeb);if(_0x4ebaeb['startsWith']('<')){if(_0x744cb>=_0xdcd76c){const _0x4f3197=_0x4ebaeb['match'](/[a-zA-Z]+/);if(!_0x4f3197){_0x1dd493[_0x2dac38]='';continue;}const _0xb73ae0=_0x4f3197[0x0];_0x4ebaeb['startsWith']('</')?(_0x1b6c73['length']&&(_0x4ebaeb=''),_0x1b6c73['pop']()):(_0x1b6c73['push'](_0xb73ae0),_0x4ebaeb='');}}else{if(_0x744cb>=_0xdcd76c)_0x4ebaeb='';else{if(_0x744cb+_0x402f05['length']>=_0xdcd76c){let _0x4e8739=_0xdcd76c-_0x744cb;if('\x20'===_0x402f05[_0x4e8739-0x1])_0x4e8739--;else{const _0x234f0f=_0x402f05['slice'](_0x4e8739)['indexOf']('\x20');-0x1!==_0x234f0f?_0x4e8739+=_0x234f0f:_0x4e8739=_0x4ebaeb['length'];}_0x4ebaeb=_0x402f05['slice'](0x0,_0x4e8739)['join']('')+_0x4263a6,_0x744cb=_0xdcd76c;}else _0x744cb+=_0x402f05['length'];}}_0x1dd493[_0x2dac38]=_0x4ebaeb;}return _0x1dd493['join']('\x0a')['replace'](/\n/g,'');}function $(_0x15f4e5){const _0x151e37=[];for(let _0x581b97=0x0;_0x581b97<_0x15f4e5['length'];_0x581b97++){const _0x37fe4a=_0x15f4e5['substring'](_0x581b97)['match'](/^&[a-z0-9#]+;/);if(_0x37fe4a){const _0x2629e7=_0x37fe4a[0x0];_0x151e37['push'](_0x2629e7),_0x581b97+=_0x2629e7['length']-0x1;}else _0x151e37['push'](_0x15f4e5[_0x581b97]);}return _0x151e37;}class h extends _0x39f517{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x48ad20){super(_0x48ad20);const _0x5a0b15=this['bindTemplate'];this['set']('message',r(_0x48ad20,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x48ad20,r(_0x48ad20,'Yes'),_0x4b708d['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x48ad20,r(_0x48ad20,'No'),_0x4b708d['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x262fb6(),this['keystrokes']=new _0x3b6b5f(),this['focusCycler']=new _0x396c63({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-thread__remove-confirm'],'tabindex':-0x1,'role':'alertdialog'},'children':[{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-inner','role':'presentation'},'children':[{'tag':'p','children':[{'text':_0x5a0b15['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['cancelView']['element']['focus']({'preventScroll':!0x0});}['_createButtonView'](_0x5a9d50,_0x46303b,_0x3e7097,_0x392935){const _0x573cc7=new _0x4d10af(_0x5a9d50);return _0x573cc7['label']=_0x46303b,_0x573cc7['icon']=_0x3e7097,_0x573cc7['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x392935}}),_0x573cc7['on']('execute',()=>this['fire'](_0x392935)),_0x573cc7;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x203b6b=>{this['keystrokes']['listenTo'](_0x203b6b['element']),this['focusTracker']['add'](_0x203b6b['element']);}),this['keystrokes']['set']('esc',(_0x54b1fa,_0x1ddcf5)=>{this['fire']('cancel'),_0x1ddcf5();});}}function m(_0x255292){return class extends _0x255292{['showConfirm'](_0x3b69b6,_0x2e24bf){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x3b69b6,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x2e24bf['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x42478a=>this['confirmView']['on']('submit',_0x42478a));}['cancelConfirm'](){this['isConfirm']&&this['confirmView']['fire']('cancel');}['_removeConfirm'](){this['element']&&this['confirmView']&&this['confirmView']['element']&&(this['element']['focus'](),this['confirmView']['element']['remove'](),this['deregisterChild'](this['confirmView']),this['isConfirm']=!0x1,this['fire']('removeConfirm'),this['confirmView']['destroy'](),this['confirmView']=void 0x0);}};}function M(_0x3cf96b){let _0x31c1b5=0x0,_0x389a2d=0x0;for(const _0x2d352c of q(_0x3cf96b))_0x31c1b5=(_0x31c1b5<<0x5)-_0x31c1b5+_0x2d352c,_0x31c1b5|=0x0,[_0x31c1b5,_0x389a2d]=[_0x389a2d,_0x31c1b5];return z(_0x31c1b5)+z(_0x389a2d);}function*O(_0x5186a7){null==_0x5186a7||null==_0x5186a7?yield 0x12b9b0a1:0x0===_0x5186a7||!0x1===_0x5186a7?yield 0x0:0x1===_0x5186a7||0x1==_0x5186a7?yield 0x1:Array['isArray'](_0x5186a7)?yield*function*(_0x234da8){for(const _0x34b5b7 of _0x234da8)yield*O(_0x34b5b7);}(_0x5186a7):'object'==typeof _0x5186a7?yield*q(_0x5186a7):'string'==typeof _0x5186a7?yield*v(_0x5186a7):'number'==typeof _0x5186a7&&(yield _0x5186a7);}function*q(_0xd793fe){if(yield w('{'),_0xd793fe){const _0x380763=Object['keys'](_0xd793fe)['sort']();for(const _0x22a704 of _0x380763){yield*v(_0x22a704),yield w(':');const _0x197d34=_0xd793fe[_0x22a704];yield*O(_0x197d34);}}yield w('}');}function*v(_0x3299ed){yield w('\x22');for(const _0x30dfce of _0x3299ed)yield w(_0x30dfce);yield w('\x22');}function w(_0x4c6261){return _0x4c6261['charCodeAt'](0x0);}function z(_0x2c7e58){return(_0x2c7e58*=Math['sign'](_0x2c7e58))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x2bf2a7,_0x96bd65,_0x4d430d,_0x173b5c=[]){const _0x132e29='string'==typeof _0x2bf2a7?_0x4d430d['get'](_0x2bf2a7)['constructor']:_0x2bf2a7['prototype']['constructor'];if(_0x96bd65['has'](_0x132e29))return _0x96bd65['get'](_0x132e29);_0x96bd65['set'](_0x132e29,!0x0);const _0x2e4fcb=[...D,..._0x173b5c]['map'](_0x434682=>{if(_0x4d430d['has'](_0x434682))return _0x4d430d['get'](_0x434682)['constructor'];})['filter'](_0x90364d=>_0x90364d);if(_0x132e29&&_0x2e4fcb['includes'](_0x132e29))return _0x96bd65['set'](_0x132e29,!0x1),!0x1;if(!_0x132e29['requires'])return _0x96bd65['set'](_0x132e29,!0x0),!0x0;const _0x3a4847=_0x132e29['requires']['every'](_0x5ecc35=>S(_0x5ecc35,_0x96bd65,_0x4d430d,_0x173b5c));return _0x96bd65['set'](_0x132e29,_0x3a4847),_0x3a4847;}function C(_0x8ac6b9,_0x37054e){const _0x8704aa={};for(const _0x126363 of _0x8ac6b9['config']['names']())W['includes'](_0x126363)||(_0x8704aa[_0x126363]=_0x8ac6b9['config']['get'](_0x126363));const _0x2fa4b7=_0x8704aa['plugins']||[],_0x38444e=_0x8ac6b9['constructor']['builtinPlugins']||[],_0x50ec5e=_0x2fa4b7['length']?_0x2fa4b7:_0x38444e,_0x191188=_0x8704aa['extraPlugins']||[];delete _0x8704aa['extraPlugins'];const _0x22398d=_0x8704aa['removePlugins']||[];delete _0x8704aa['removePlugins'];const _0x5b1840=_0x8ac6b9['_context']['config']['get']('plugins')||[],_0xa2cb60=_0x50ec5e['concat'](_0x191188)['concat'](_0x5b1840)['map'](_0x5f3472=>'string'==typeof _0x5f3472?_0x38444e['find'](_0xca2e76=>_0xca2e76['pluginName']==_0x5f3472):_0x5f3472)['filter'](_0x28ec7d=>!_0x22398d['includes'](_0x28ec7d)&&!_0x22398d['includes'](_0x28ec7d['pluginName'])),_0x1c520d=Array['from'](new Set(_0xa2cb60)),_0x143e14=new Map();return _0x8704aa['plugins']=_0x1c520d['filter'](_0x508552=>S(_0x508552,_0x143e14,_0x8ac6b9['plugins'],_0x37054e)),_0x8704aa;}function B(_0x59a736,_0x2c7038){const _0x51ba52=[];_0x59a736['document']['selection']['on']('change:range',()=>{const _0x1dff0f=function(_0x1e5467,_0xf8de60){const _0x31c54d=[];for(const _0x25543f of _0x1e5467['markers']){const _0x76ab3e=_0x25543f['getRange']();(_0x76ab3e['containsPosition'](_0xf8de60)||_0x76ab3e['start']['isEqual'](_0xf8de60)||_0x76ab3e['end']['isEqual'](_0xf8de60))&&_0x31c54d['push'](_0x25543f);}return _0x31c54d;}(_0x59a736,_0x59a736['document']['selection']['focus']),_0x5dcc26=[],_0x7eabf7=[],_0x5cdd5e=[];for(const _0x22bf80 of _0x51ba52)_0x1dff0f['includes'](_0x22bf80)||_0x5dcc26['push'](_0x22bf80);for(const _0x5a2437 of _0x1dff0f)_0x51ba52['includes'](_0x5a2437)||_0x7eabf7['push'](_0x5a2437),_0x5cdd5e['push'](_0x5a2437);(_0x5dcc26['length']||_0x7eabf7['length'])&&_0x2c7038({'left':_0x5dcc26,'entered':_0x7eabf7}),_0x51ba52['length']=0x0,_0x51ba52['push'](..._0x5cdd5e);});}const Q='Ctrl+Shift+E';function T(_0x2bb64a,_0x144361){const _0x218a1e=_0x2bb64a['element'];_0x2bb64a['keystrokes']['listenTo'](_0x218a1e);for(const _0x1bd9f0 of _0x144361)K(_0x2bb64a,_0x1bd9f0);_0x144361['on']('change',(_0x1782de,_0x4ba26f)=>{for(const _0x4fb2f9 of _0x4ba26f['removed'])_(_0x2bb64a,_0x4fb2f9);for(const _0x5e5d89 of Array['from'](_0x4ba26f['added'])['reverse']())K(_0x2bb64a,_0x5e5d89);}),_0x2bb64a['keystrokes']['set']('enter',(_0x59be50,_0x56b0eb)=>{_0x218a1e===_0x59be50['target']&&(_0x2bb64a['focusCycler']['focusFirst'](),_0x56b0eb());},{'filter':_0x3ceb78=>_0x3ceb78['target']===_0x218a1e}),_0x2bb64a['keystrokes']['set']('esc',(_0x4438a4,_0x58121a)=>{_0x218a1e!==_0x4438a4['target']?_0x2bb64a['focus']():_0x2bb64a['fire']('escape'),_0x58121a();}),_0x2bb64a['keystrokes']['set']('arrowdown',(_0x8eecfd,_0x420575)=>{_0x218a1e===_0x8eecfd['target']&&(_0x2bb64a['fire']('arrowdown'),_0x420575());}),_0x2bb64a['keystrokes']['set']('arrowup',(_0x95072b,_0x52aa32)=>{_0x218a1e===_0x95072b['target']&&(_0x2bb64a['fire']('arrowup'),_0x52aa32());});}function K(_0x2022dc,_0x4a0e3c){_0x4a0e3c['isRendered']&&(_0x2022dc['focusTracker']['add'](_0x4a0e3c['element']),_0x2022dc['keystrokes']['listenTo'](_0x4a0e3c['element']),_0x194f45(_0x4a0e3c)&&function(_0xbbdfd9,_0x2781a8){const _0x361e1e=_0xbbdfd9['actions'],_0x4eb869=_0x2781a8['actions'];for(const _0x450662 of Object['keys'](_0x361e1e))if(_0x450662 in _0x4eb869&&_0x361e1e[_0x450662]!==_0x4eb869[_0x450662])return!0x1;return!0x0;}(_0x2022dc['focusCycler'],_0x4a0e3c['focusCycler'])&&_0x2022dc['focusCycler']['chain'](_0x4a0e3c['focusCycler']));}function _(_0xe09b98,_0x36f7e2){_0xe09b98['focusTracker']['remove'](_0x36f7e2['element']),_0xe09b98['keystrokes']['stopListening'](_0x36f7e2['element']),_0x194f45(_0x36f7e2)&&_0xe09b98['focusCycler']['unchain'](_0x36f7e2['focusCycler']);}export{G as AriaDescriptionView,m as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,o as Permissions,J as UserView,l as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
|
23
|
+
import{ContextPlugin as _0x43ebb6,Editor as _0x5d34c9,icons as _0x1f429f}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x5a7a88,Collection as _0x4ebc07,uid as _0xad6d7e,first as _0x17e66c,FocusTracker as _0x965fb4,KeystrokeHandler as _0x232c82}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x246b5d,IconView as _0x3439fd,ButtonView as _0x57280b,DropdownButtonView as _0x18bda2,FocusCycler as _0x247f16,isViewWithFocusCycler as _0xac70cf}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x652578 from'date-fns/format/index.js';import _0x1b0d0c from'date-fns/parseISO/index.js';import _0x158afb from'date-fns/differenceInCalendarDays/index.js';class o extends _0x43ebb6{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x13bd6d,_0x8e7b2){let _0x24a2f1;if(_0x8e7b2||(_0x8e7b2=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x8e7b2?_0x24a2f1=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x24a2f1=this['context']['editors']['find'](_0x2af96a=>_0x2af96a['config']['get']('collaboration.channelId')==_0x8e7b2)),!_0x24a2f1)throw new _0x5a7a88('permissions-set-permissions-invalid-channel-id',null);const _0x43b391=_0x24a2f1['plugins'],_0x5b627d=_0x43b391['has']('CommentsRepository')?_0x43b391['get']('CommentsRepository'):void 0x0,_0x3ba5b9=_0x43b391['has']('CommentsOnly')&&_0x43b391['get']('CommentsOnly'),_0x2ea6ce=_0x13bd6d['includes']('document:write'),_0x812e8b=_0x13bd6d['includes']('comment:modify_all'),_0x272866=_0x13bd6d['includes']('comment:admin'),_0x35ad15=_0x13bd6d['includes']('comment:write'),_0x597859=_0x35ad15||_0x272866,_0x2c7c9b=_0x597859||_0x812e8b,_0x134827=_0x2ea6ce||_0x597859;(_0x3ba5b9&&(_0x3ba5b9['isEnabled']=!_0x2ea6ce&&_0x2c7c9b),_0x24a2f1 instanceof _0x5d34c9)&&(!(_0x2ea6ce||_0x2c7c9b&&_0x5b627d)?_0x24a2f1['enableReadOnlyMode']('no-permissions'):_0x24a2f1['disableReadOnlyMode']('no-permissions'));if(_0x5b627d){_0x5b627d['setPermissions']({'admin':_0x272866,'modifyAll':_0x812e8b,'write':_0x35ad15,'resolve':_0x134827},_0x8e7b2);const _0x95590b=_0x24a2f1 instanceof _0x5d34c9&&_0x24a2f1['commands']['get']('addCommentThread');_0x95590b&&(_0x597859?_0x95590b['clearForceDisabled']('noPermissions'):_0x95590b['forceDisabled']('noPermissions'));}}}function r(_0x3b4a8f,_0x5ef56f){const t=_0x3b4a8f['t'];switch(_0x5ef56f){case'Anonymous':return t('Anonymous');case'Yes':return t('Yes');case'No':return t('No');case'Are\x20you\x20sure?':return t('Are\x20you\x20sure?');default:return'';}}class l extends _0x43ebb6{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o];}constructor(_0x348362){super(_0x348362),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x4ebc07(),this['_locale']=_0x348362['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x12808d=this['context'];this['licenseKey']=_0x12808d['config']['get']('licenseKey');const _0x1a49df=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4ea747;for(const _0x3c7e7e in _0x12808d){const _0x5293df=_0x12808d[_0x3c7e7e];if(_0x1a49df['includes'](_0x5293df)){delete _0x12808d[_0x3c7e7e],_0x4ea747=_0x5293df;break;}}if('licenseKeyInvalid'===_0x4ea747)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x5a7a88('invalid-license-key',null);if('licenseKeyTrial'===_0x4ea747&&console['info']('You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20collaboration\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.'),'licenseKeyTrialLimit:operations'===_0x4ea747)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x5a7a88('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x4ea747)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x5a7a88('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x4ea747)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x5a7a88('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x4ea747&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x1a1e75,name:_0x77d44d,..._0xe77986}){if(!_0x1a1e75||'string'!=typeof _0x1a1e75)throw new _0x5a7a88('users-add-invalid-id');if(this['users']['has'](_0x1a1e75))throw new _0x5a7a88('users-add-duplicated-id',null,{'id':_0x1a1e75});const _0x259893={..._0xe77986,'id':_0x1a1e75,'name':u(this['_locale'],_0x77d44d),'color':this['_getNextColor']()};_0x259893['name']=u(this['_locale'],_0x259893['name']);const _0x212032=new P(_0x259893);return this['users']['add'](_0x212032),_0x212032;}['getUser'](_0x3c6b6b){return this['users']['get'](_0x3c6b6b);}['useAnonymousUser'](){const _0x27fb53=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x27fb53);}['defineMe'](_0x21f192){if(this['_myId'])throw new _0x5a7a88('users-me-already-defined',null);const _0x3bab93=this['getUser'](_0x21f192);if(!_0x3bab93)throw new _0x5a7a88('users-me-missing-user',null);this['_myId']=_0x21f192,_0x3bab93['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x3fa7c3=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x3fa7c3&&(this['_lastColor']=0x0),new a(this['_lastColor']++);}['_addAnonymousUser'](){const _0xa0a251=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0xa0a251,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x4dd41d){this['id']=_0x4dd41d['id'],this['color']=_0x4dd41d['color'],this['name']=_0x4dd41d['name'],this['avatar']=_0x4dd41d['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x171920=this['name']['split']('\x20');return 0x1===_0x171920['length']?this['_getInitial'](_0x171920[0x0]):this['_getInitial'](_0x171920[0x0])+this['_getInitial'](_0x171920[_0x171920['length']-0x1]);}['_getInitial'](_0x5c8c28){return _0x5c8c28['charAt'](0x0)['toUpperCase']();}}function u(_0x3b16e2,_0x332059=''){return''==(_0x332059=_0x332059['trim']())?r(_0x3b16e2,'Anonymous'):_0x332059;}class a{['_id'];constructor(_0x1b7214){this['_id']=_0x1b7214;}['getBackgroundColorClass'](){return'ck-user__bg-color--'+this['_id'];}['getSelectionClass'](){return'ck-user__selection--'+this['_id'];}['getMarkerClass'](){return'ck-user__marker--'+this['_id'];}}class H extends _0x246b5d{['name'];['notificationView'];constructor(_0x32fbe7,_0x227178,_0x597881){super(_0x32fbe7),this['name']=_0x227178['name'],this['notificationView']=null;const _0xbb3c=['ck','ck-user'],_0x3d8eb6=['ck','ck-user__img'];if(_0x227178['isAnonymous']&&_0x3d8eb6['push']('ck-user__anonymous'),!_0x227178['isAnonymous']&&_0x227178['isMe']&&_0xbb3c['push']('ck-user_me'),_0x227178['avatar']&&_0x3d8eb6['push']('ck-user__avatar'),_0x597881){const _0x3a1e00=new _0x3439fd();_0x3a1e00['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x3a1e00['content']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M10\x200C4.48\x200\x200\x204.48\x200\x2010s4.48\x2010\x2010\x2010\x2010-4.48\x2010-10S15.52\x200\x2010\x200zm1\x2015H9v-2h2v2zm0-4H9V5h2v6z\x22/></svg>\x0a',this['notificationView']={'tag':'div','attributes':{'class':['ck','ck-user__notification'],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x597881},'children':[_0x3a1e00]};}const _0x42cbb1=[{'tag':'div','attributes':{'class':_0x3d8eb6,'style':{'background-image':_0x227178['avatar']?'url(\x27'+_0x227178['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x227178['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x227178['name']},'children':[{'text':_0x227178['initials']}]}];this['notificationView']&&_0x42cbb1['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0xbb3c,'data-user-id':_0x227178['id']},'children':_0x42cbb1});}}class J extends _0x246b5d{['id'];constructor(_0xa7f1e9,_0x1b74da){super(_0xa7f1e9),this['id']='ck-aria-description-'+_0xad6d7e(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x1b74da}]});}}class U extends _0x57280b{['render'](){super['render'](),V(this);}}class Y extends _0x18bda2{['render'](){super['render'](),V(this);}}function V(_0x315072){_0x315072['listenTo'](_0x315072['element'],'mousedown',(_0x59409b,_0x3efd42)=>{_0x3efd42['stopPropagation'](),_0x3efd42['preventDefault']();}),_0x315072['listenTo'](_0x315072['element'],'mouseup',()=>{_0x315072['element']['focus']();});}function E(_0x75cea6={}){if(void 0x0!==_0x75cea6['dateTimeFormat']&&'function'!=typeof _0x75cea6['dateTimeFormat'])throw new _0x5a7a88('invalid-date-time-format');return _0x18b798=>{const _0x14cfac='string'==typeof _0x18b798?_0x1b0d0c(_0x18b798):_0x18b798,_0x15c107=new Date(),_0x39a020=_0x158afb(_0x15c107,_0x14cfac);return _0x75cea6['dateTimeFormat']?_0x75cea6['dateTimeFormat'](_0x14cfac):_0x652578(_0x14cfac,0x0===_0x39a020?'\x27Today\x27\x20hh:mma':0x1===_0x39a020?'\x27Yesterday\x27\x20hh:mma':_0x39a020<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x18baec,_0x47ffc9){const _0xb8e95d=_0x18baec['mapper']['markerNameToElements'](_0x47ffc9['name']);if(!_0xb8e95d)return null;const _0x1756b3=_0x17e66c(_0xb8e95d['values']());return _0x18baec['view']['domConverter']['mapViewToDom'](_0x1756b3)||null;}function R(_0x1ab58c,_0xf8752d){if(0x0===_0xf8752d['length'])return null;const _0x4db41f=[],_0x23f6a2=_0x1ab58c['view']['domConverter'];for(const _0x4eb31f of _0xf8752d){const _0x23ded0=_0x1ab58c['mapper']['markerNameToElements'](_0x4eb31f['name']);if(!_0x23ded0)continue;const _0x2f0493=Array['from'](_0x23ded0)['map'](_0x115cdf=>_0x23f6a2['mapViewToDom'](_0x115cdf))['filter'](_0x2acdcd=>!!_0x2acdcd);_0x4db41f['push'](..._0x2f0493);}if(0x0===_0x4db41f['length'])return null;const _0x11d447=[];for(const _0x1b2de5 of _0x4db41f){const _0x585b5b=_0x1b2de5['getClientRects']()['item'](0x0);_0x585b5b&&_0x11d447['push']({'x':_0x585b5b['x'],'y':_0x585b5b['y'],'domElement':_0x1b2de5});}return 0x0===_0x11d447['length']?null:(_0x11d447['sort']((_0x3188d1,_0x171105)=>_0x3188d1['y']-_0x171105['y']||_0x3188d1['x']-_0x171105['x']),_0x11d447['map'](_0x7bd73d=>_0x7bd73d['domElement']));}function Z(_0x13d4f1,{limit:_0x38a088,suffix:_0x4e3f76='...'}){const _0x50bd44=[];let _0x1c9529=0x0;const _0x303129=_0x13d4f1['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x22243e=0x0;_0x22243e<_0x303129['length'];_0x22243e++){let _0x309588=_0x303129[_0x22243e];const _0x5e8b65=$(_0x309588);if(_0x309588['startsWith']('<')){if(_0x1c9529>=_0x38a088){const _0x5b3b44=_0x309588['match'](/[a-zA-Z]+/);if(!_0x5b3b44){_0x303129[_0x22243e]='';continue;}const _0x4d0128=_0x5b3b44[0x0];_0x309588['startsWith']('</')?(_0x50bd44['length']&&(_0x309588=''),_0x50bd44['pop']()):(_0x50bd44['push'](_0x4d0128),_0x309588='');}}else{if(_0x1c9529>=_0x38a088)_0x309588='';else{if(_0x1c9529+_0x5e8b65['length']>=_0x38a088){let _0x263b61=_0x38a088-_0x1c9529;if('\x20'===_0x5e8b65[_0x263b61-0x1])_0x263b61--;else{const _0x132d22=_0x5e8b65['slice'](_0x263b61)['indexOf']('\x20');-0x1!==_0x132d22?_0x263b61+=_0x132d22:_0x263b61=_0x309588['length'];}_0x309588=_0x5e8b65['slice'](0x0,_0x263b61)['join']('')+_0x4e3f76,_0x1c9529=_0x38a088;}else _0x1c9529+=_0x5e8b65['length'];}}_0x303129[_0x22243e]=_0x309588;}return _0x303129['join']('\x0a')['replace'](/\n/g,'');}function $(_0x74b920){const _0x975bb9=[];for(let _0x5b1c32=0x0;_0x5b1c32<_0x74b920['length'];_0x5b1c32++){const _0x26826d=_0x74b920['substring'](_0x5b1c32)['match'](/^&[a-z0-9#]+;/);if(_0x26826d){const _0x1cc8ba=_0x26826d[0x0];_0x975bb9['push'](_0x1cc8ba),_0x5b1c32+=_0x1cc8ba['length']-0x1;}else _0x975bb9['push'](_0x74b920[_0x5b1c32]);}return _0x975bb9;}class h extends _0x246b5d{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x366aa3){super(_0x366aa3);const _0x25fc69=this['bindTemplate'];this['set']('message',r(_0x366aa3,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x366aa3,r(_0x366aa3,'Yes'),_0x1f429f['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x366aa3,r(_0x366aa3,'No'),_0x1f429f['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x965fb4(),this['keystrokes']=new _0x232c82(),this['focusCycler']=new _0x247f16({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-thread__remove-confirm'],'tabindex':-0x1,'role':'alertdialog'},'children':[{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-inner','role':'presentation'},'children':[{'tag':'p','children':[{'text':_0x25fc69['to']('message')}]},{'tag':'div','attributes':{'class':'ck-thread__remove-confirm-actions'},'children':[this['submitView'],this['cancelView']]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['cancelView']['element']['focus']({'preventScroll':!0x0});}['_createButtonView'](_0x3124ec,_0x139b08,_0x5a0b5b,_0x81b588){const _0x3e4a85=new _0x57280b(_0x3124ec);return _0x3e4a85['label']=_0x139b08,_0x3e4a85['icon']=_0x5a0b5b,_0x3e4a85['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x81b588}}),_0x3e4a85['on']('execute',()=>this['fire'](_0x81b588)),_0x3e4a85;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x28c856=>{this['keystrokes']['listenTo'](_0x28c856['element']),this['focusTracker']['add'](_0x28c856['element']);}),this['keystrokes']['set']('esc',(_0xd922bb,_0x477cbe)=>{this['fire']('cancel'),_0x477cbe();});}}function m(_0x487c99){return class extends _0x487c99{['showConfirm'](_0x5009ab,_0x57d724){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x5009ab,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x57d724['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x24949a=>this['confirmView']['on']('submit',_0x24949a));}['cancelConfirm'](){this['isConfirm']&&this['confirmView']['fire']('cancel');}['_removeConfirm'](){this['element']&&this['confirmView']&&this['confirmView']['element']&&(this['element']['focus'](),this['confirmView']['element']['remove'](),this['deregisterChild'](this['confirmView']),this['isConfirm']=!0x1,this['fire']('removeConfirm'),this['confirmView']['destroy'](),this['confirmView']=void 0x0);}};}function M(_0x278011){let _0xf5615d=0x0,_0x5418ad=0x0;for(const _0x3b7950 of q(_0x278011))_0xf5615d=(_0xf5615d<<0x5)-_0xf5615d+_0x3b7950,_0xf5615d|=0x0,[_0xf5615d,_0x5418ad]=[_0x5418ad,_0xf5615d];return z(_0xf5615d)+z(_0x5418ad);}function*O(_0x3f6704){null==_0x3f6704||null==_0x3f6704?yield 0x12b9b0a1:0x0===_0x3f6704||!0x1===_0x3f6704?yield 0x0:0x1===_0x3f6704||0x1==_0x3f6704?yield 0x1:Array['isArray'](_0x3f6704)?yield*function*(_0x2097b9){for(const _0x51921d of _0x2097b9)yield*O(_0x51921d);}(_0x3f6704):'object'==typeof _0x3f6704?yield*q(_0x3f6704):'string'==typeof _0x3f6704?yield*v(_0x3f6704):'number'==typeof _0x3f6704&&(yield _0x3f6704);}function*q(_0x280f90){if(yield w('{'),_0x280f90){const _0x3bec57=Object['keys'](_0x280f90)['sort']();for(const _0x101ea9 of _0x3bec57){yield*v(_0x101ea9),yield w(':');const _0xf91804=_0x280f90[_0x101ea9];yield*O(_0xf91804);}}yield w('}');}function*v(_0x585102){yield w('\x22');for(const _0x14ef4a of _0x585102)yield w(_0x14ef4a);yield w('\x22');}function w(_0x344e5d){return _0x344e5d['charCodeAt'](0x0);}function z(_0x22d171){return(_0x22d171*=Math['sign'](_0x22d171))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x37946c,_0x4f9634,_0x2968d4,_0x4f55d6=[]){const _0x12e8e8='string'==typeof _0x37946c?_0x2968d4['get'](_0x37946c)['constructor']:_0x37946c['prototype']['constructor'];if(_0x4f9634['has'](_0x12e8e8))return _0x4f9634['get'](_0x12e8e8);_0x4f9634['set'](_0x12e8e8,!0x0);const _0x3ebaf3=[...D,..._0x4f55d6]['map'](_0xd6e258=>{if(_0x2968d4['has'](_0xd6e258))return _0x2968d4['get'](_0xd6e258)['constructor'];})['filter'](_0x2d4386=>_0x2d4386);if(_0x12e8e8&&_0x3ebaf3['includes'](_0x12e8e8))return _0x4f9634['set'](_0x12e8e8,!0x1),!0x1;if(!_0x12e8e8['requires'])return _0x4f9634['set'](_0x12e8e8,!0x0),!0x0;const _0x204460=_0x12e8e8['requires']['every'](_0x48ff7d=>S(_0x48ff7d,_0x4f9634,_0x2968d4,_0x4f55d6));return _0x4f9634['set'](_0x12e8e8,_0x204460),_0x204460;}function C(_0x33ddf5,_0x2f4239){const _0x360e80={};for(const _0x6dd954 of _0x33ddf5['config']['names']())W['includes'](_0x6dd954)||(_0x360e80[_0x6dd954]=_0x33ddf5['config']['get'](_0x6dd954));const _0x2bfd9a=_0x360e80['plugins']||[],_0x1f702e=_0x33ddf5['constructor']['builtinPlugins']||[],_0x5828bd=_0x2bfd9a['length']?_0x2bfd9a:_0x1f702e,_0x3f6883=_0x360e80['extraPlugins']||[];delete _0x360e80['extraPlugins'];const _0x4d91fc=_0x360e80['removePlugins']||[];delete _0x360e80['removePlugins'];const _0x537159=_0x33ddf5['_context']['config']['get']('plugins')||[],_0x5916e5=_0x5828bd['concat'](_0x3f6883)['concat'](_0x537159)['map'](_0x1d718d=>'string'==typeof _0x1d718d?_0x1f702e['find'](_0x3c0917=>_0x3c0917['pluginName']==_0x1d718d):_0x1d718d)['filter'](_0x4fd571=>!_0x4d91fc['includes'](_0x4fd571)&&!_0x4d91fc['includes'](_0x4fd571['pluginName'])),_0x3024fb=Array['from'](new Set(_0x5916e5)),_0x4fd1c0=new Map();return _0x360e80['plugins']=_0x3024fb['filter'](_0x13decd=>S(_0x13decd,_0x4fd1c0,_0x33ddf5['plugins'],_0x2f4239)),_0x360e80;}function B(_0x67e956,_0x4910e3){const _0x9ebb6d=[];_0x67e956['document']['selection']['on']('change:range',()=>{const _0x5f317b=function(_0x377141,_0x23998a){const _0x1a2cc5=[];for(const _0x10c955 of _0x377141['markers']){const _0x47edd8=_0x10c955['getRange']();(_0x47edd8['containsPosition'](_0x23998a)||_0x47edd8['start']['isEqual'](_0x23998a)||_0x47edd8['end']['isEqual'](_0x23998a))&&_0x1a2cc5['push'](_0x10c955);}return _0x1a2cc5;}(_0x67e956,_0x67e956['document']['selection']['focus']),_0x27d054=[],_0x30bac8=[],_0x31bd3a=[];for(const _0x3d9f42 of _0x9ebb6d)_0x5f317b['includes'](_0x3d9f42)||_0x27d054['push'](_0x3d9f42);for(const _0x35b80d of _0x5f317b)_0x9ebb6d['includes'](_0x35b80d)||_0x30bac8['push'](_0x35b80d),_0x31bd3a['push'](_0x35b80d);(_0x27d054['length']||_0x30bac8['length'])&&_0x4910e3({'left':_0x27d054,'entered':_0x30bac8}),_0x9ebb6d['length']=0x0,_0x9ebb6d['push'](..._0x31bd3a);});}const Q='Ctrl+Shift+E';function T(_0x9cb323,_0x453087){const _0x39d3ba=_0x9cb323['element'];_0x9cb323['keystrokes']['listenTo'](_0x39d3ba);for(const _0x2197b3 of _0x453087)K(_0x9cb323,_0x2197b3);_0x453087['on']('change',(_0x49d005,_0x2e1a30)=>{for(const _0x2dcb26 of _0x2e1a30['removed'])_(_0x9cb323,_0x2dcb26);for(const _0x2bce38 of Array['from'](_0x2e1a30['added'])['reverse']())K(_0x9cb323,_0x2bce38);}),_0x9cb323['keystrokes']['set']('enter',(_0x14ed27,_0x170969)=>{_0x39d3ba===_0x14ed27['target']&&(_0x9cb323['focusCycler']['focusFirst'](),_0x170969());},{'filter':_0xe8190f=>_0xe8190f['target']===_0x39d3ba}),_0x9cb323['keystrokes']['set']('esc',(_0x71b28b,_0x41a530)=>{_0x39d3ba!==_0x71b28b['target']?_0x9cb323['focus']():_0x9cb323['fire']('escape'),_0x41a530();}),_0x9cb323['keystrokes']['set']('arrowdown',(_0x385592,_0x7b1837)=>{_0x39d3ba===_0x385592['target']&&(_0x9cb323['fire']('arrowdown'),_0x7b1837());}),_0x9cb323['keystrokes']['set']('arrowup',(_0x694633,_0x47b107)=>{_0x39d3ba===_0x694633['target']&&(_0x9cb323['fire']('arrowup'),_0x47b107());});}function K(_0x4c7363,_0xfd4f51){_0xfd4f51['isRendered']&&(_0x4c7363['focusTracker']['add'](_0xfd4f51['element']),_0x4c7363['keystrokes']['listenTo'](_0xfd4f51['element']),_0xac70cf(_0xfd4f51)&&function(_0x557f88,_0x27df55){const _0x51f92e=_0x557f88['actions'],_0xdebe97=_0x27df55['actions'];for(const _0x2b2b80 of Object['keys'](_0x51f92e))if(_0x2b2b80 in _0xdebe97&&_0x51f92e[_0x2b2b80]!==_0xdebe97[_0x2b2b80])return!0x1;return!0x0;}(_0x4c7363['focusCycler'],_0xfd4f51['focusCycler'])&&_0x4c7363['focusCycler']['chain'](_0xfd4f51['focusCycler']));}function _(_0x15b274,_0x192fac){_0x15b274['focusTracker']['remove'](_0x192fac['element']),_0x15b274['keystrokes']['stopListening'](_0x192fac['element']),_0xac70cf(_0x192fac)&&_0x15b274['focusCycler']['unchain'](_0x192fac['focusCycler']);}export{J as AriaDescriptionView,m as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,o as Permissions,H as UserView,l as Users,R as getAllMarkersDomElementsSorted,E as getDateTimeFormatter,g as getMarkerDomElement,M as hashObject,C as sanitizeEditorConfig,T as setupThreadKeyboardNavigation,B as surroundingMarkersDetector,Z as trimHtml};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-collaboration-core",
|
3
|
-
"version": "43.3.0-alpha.
|
3
|
+
"version": "43.3.0-alpha.7",
|
4
4
|
"description": "Base utilities used by CKEditor 5 collaboration features to support multiple users working together in a rich text editor.",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
6
6
|
"author": "CKSource (http://cksource.com/)",
|
@@ -32,11 +32,11 @@
|
|
32
32
|
"type": "module",
|
33
33
|
"main": "src/index.js",
|
34
34
|
"dependencies": {
|
35
|
-
"@ckeditor/ckeditor5-core": "43.3.0-alpha.
|
36
|
-
"@ckeditor/ckeditor5-theme-lark": "43.3.0-alpha.
|
37
|
-
"@ckeditor/ckeditor5-ui": "43.3.0-alpha.
|
38
|
-
"@ckeditor/ckeditor5-utils": "43.3.0-alpha.
|
39
|
-
"ckeditor5": "43.3.0-alpha.
|
35
|
+
"@ckeditor/ckeditor5-core": "43.3.0-alpha.7",
|
36
|
+
"@ckeditor/ckeditor5-theme-lark": "43.3.0-alpha.7",
|
37
|
+
"@ckeditor/ckeditor5-ui": "43.3.0-alpha.7",
|
38
|
+
"@ckeditor/ckeditor5-utils": "43.3.0-alpha.7",
|
39
|
+
"ckeditor5": "43.3.0-alpha.7",
|
40
40
|
"date-fns": "2.30.0"
|
41
41
|
},
|
42
42
|
"files": [
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(function(
|
23
|
+
(function(_0x16cc0f,_0x5a2bdf){var _0x402a0f=_0x1074,_0x3ea1e0=_0x16cc0f();while(!![]){try{var _0x5166e7=parseInt(_0x402a0f(0x14e))/0x1*(parseInt(_0x402a0f(0x152))/0x2)+-parseInt(_0x402a0f(0x14c))/0x3+parseInt(_0x402a0f(0x154))/0x4*(parseInt(_0x402a0f(0x14d))/0x5)+-parseInt(_0x402a0f(0x153))/0x6+parseInt(_0x402a0f(0x148))/0x7+parseInt(_0x402a0f(0x150))/0x8*(parseInt(_0x402a0f(0x156))/0x9)+parseInt(_0x402a0f(0x14b))/0xa*(-parseInt(_0x402a0f(0x149))/0xb);if(_0x5166e7===_0x5a2bdf)break;else _0x3ea1e0['push'](_0x3ea1e0['shift']());}catch(_0x269f8f){_0x3ea1e0['push'](_0x3ea1e0['shift']());}}}(_0x28e7,0x5509c));function _0x1074(_0x354dc2,_0x1870fd){var _0x28e7da=_0x28e7();return _0x1074=function(_0x10741f,_0x18699e){_0x10741f=_0x10741f-0x148;var _0x29e7b4=_0x28e7da[_0x10741f];return _0x29e7b4;},_0x1074(_0x354dc2,_0x1870fd);}import{uid as _0x5769b7}from'ckeditor5/src/utils.js';import{View as _0x156095}from'ckeditor5/src/ui.js';function _0x28e7(){var _0x37f09f=['3318678WmMbSR','44GOpAYd','span','1172349WDZWhN','3220308lMqCuN','187mhjdKC','setTemplate','129460aTfXUo','528105XIuFkT','108995quygCM','112397zvniwe','ck-aria-description-','16jBjKTq','ck-aria-description','6KqWwlX'];_0x28e7=function(){return _0x37f09f;};return _0x28e7();}export default class J extends _0x156095{constructor(_0x5b0db1,_0x4359f3){var _0x485daa=_0x1074;super(_0x5b0db1),this['id']=_0x485daa(0x14f)+_0x5769b7(),this[_0x485daa(0x14a)]({'tag':_0x485daa(0x155),'attributes':{'class':['ck',_0x485daa(0x151)],'id':this['id']},'children':[{'text':_0x4359f3}]});}}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(function(
|
23
|
+
function _0x2a3f(_0x30e84e,_0x1e907a){const _0x4d51cb=_0x4d51();return _0x2a3f=function(_0x2a3fd4,_0x2fdd60){_0x2a3fd4=_0x2a3fd4-0x146;let _0x4dc04f=_0x4d51cb[_0x2a3fd4];return _0x4dc04f;},_0x2a3f(_0x30e84e,_0x1e907a);}(function(_0x1b21e5,_0x118e5b){const _0x390591=_0x2a3f,_0x2d665d=_0x1b21e5();while(!![]){try{const _0x4831e8=parseInt(_0x390591(0x163))/0x1+parseInt(_0x390591(0x14d))/0x2*(parseInt(_0x390591(0x155))/0x3)+parseInt(_0x390591(0x15a))/0x4+-parseInt(_0x390591(0x158))/0x5*(-parseInt(_0x390591(0x14f))/0x6)+parseInt(_0x390591(0x154))/0x7+-parseInt(_0x390591(0x14c))/0x8*(-parseInt(_0x390591(0x14e))/0x9)+-parseInt(_0x390591(0x15f))/0xa;if(_0x4831e8===_0x118e5b)break;else _0x2d665d['push'](_0x2d665d['shift']());}catch(_0x2305af){_0x2d665d['push'](_0x2d665d['shift']());}}}(_0x4d51,0x6a0ca));import{View as _0x4606b2,IconView as _0x11aeb7}from'ckeditor5/src/ui.js';function _0x4d51(){const _0x2f02fd=['extendTemplate','2787200mSArnN','ck-user_me','ck-user__notification','notificationView','avatar','32616550jmcTVG','ck-user__avatar','url(\x27','push','402579ovvCCk','initials','div','ck-user__img','ck\x20ck-user__name\x20ck-user__name--hidden','ck\x20ck-user__name','ck-user__anonymous','content','813928ZxOOok','50776PXdvyx','63XdlYWR','1205358BVqUOH','ck-user','ck-user__icon','isAnonymous','setTemplate','5951344gULJrA','51Gkjwja','name','isMe','15NCxVwC'];_0x4d51=function(){return _0x2f02fd;};return _0x4d51();}import _0x67f723 from'../../../theme/icons/notification.svg';import'../../../theme/users.css';export default class H extends _0x4606b2{constructor(_0x12abf,_0x244126,_0x5a5131){const _0x41f365=_0x2a3f;super(_0x12abf),this[_0x41f365(0x156)]=_0x244126[_0x41f365(0x156)],this[_0x41f365(0x15d)]=null;const _0x55f93f=['ck',_0x41f365(0x150)],_0x37fc61=['ck',_0x41f365(0x147)];if(_0x244126[_0x41f365(0x152)]&&_0x37fc61[_0x41f365(0x162)](_0x41f365(0x14a)),!_0x244126[_0x41f365(0x152)]&&_0x244126[_0x41f365(0x157)]&&_0x55f93f[_0x41f365(0x162)](_0x41f365(0x15b)),_0x244126[_0x41f365(0x15e)]&&_0x37fc61[_0x41f365(0x162)](_0x41f365(0x160)),_0x5a5131){const _0x42343c=new _0x11aeb7();_0x42343c[_0x41f365(0x159)]({'attributes':{'class':[_0x41f365(0x151)]}}),_0x42343c[_0x41f365(0x14b)]=_0x67f723,this[_0x41f365(0x15d)]={'tag':_0x41f365(0x146),'attributes':{'class':['ck',_0x41f365(0x15c)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x5a5131},'children':[_0x42343c]};}const _0x3d8226=[{'tag':_0x41f365(0x146),'attributes':{'class':_0x37fc61,'style':{'background-image':_0x244126[_0x41f365(0x15e)]?_0x41f365(0x161)+_0x244126[_0x41f365(0x15e)]+'\x27)':''}}},{'tag':_0x41f365(0x146),'attributes':{'class':_0x244126[_0x41f365(0x15e)]?_0x41f365(0x148):_0x41f365(0x149),'aria-label':_0x244126[_0x41f365(0x156)]},'children':[{'text':_0x244126[_0x41f365(0x164)]}]}];this[_0x41f365(0x15d)]&&_0x3d8226[_0x41f365(0x162)](this[_0x41f365(0x15d)]),this[_0x41f365(0x153)]({'tag':_0x41f365(0x146),'attributes':{'class':_0x55f93f,'data-user-id':_0x244126['id']},'children':_0x3d8226});}}
|