@ckeditor/ckeditor5-collaboration-core 43.2.0-alpha.4 → 43.2.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
import{ContextPlugin as _0x254c47,Editor as _0xe8f990,icons as _0x3b2968}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x534096,Collection as _0x1b55b2,uid as _0x2f14b3,first as _0x5e012f,FocusTracker as _0x45c802,KeystrokeHandler as _0x4da2ef}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x3fd898,IconView as _0x1479b6,ButtonView as _0x5bc45f,DropdownButtonView as _0x448dcc,FocusCycler as _0x3aa54a,isViewWithFocusCycler as _0x122c07}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x15dcf2 from'date-fns/format/index.js';import _0x48917a from'date-fns/parseISO/index.js';import _0x1f114a from'date-fns/differenceInCalendarDays/index.js';class n extends _0x254c47{static get['pluginName'](){return'Permissions';}['setPermissions'](_0x23bbb5,_0x561794){let _0x22deba;if(_0x561794||(_0x561794=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x561794?_0x22deba=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x22deba=this['context']['editors']['find'](_0x415c82=>_0x415c82['config']['get']('collaboration.channelId')==_0x561794)),!_0x22deba)throw new _0x534096('permissions-set-permissions-invalid-channel-id',null);const _0x332f03=_0x22deba['plugins'],_0x384505=_0x332f03['has']('CommentsRepository')?_0x332f03['get']('CommentsRepository'):void 0x0,_0x2194f3=_0x332f03['has']('CommentsOnly')&&_0x332f03['get']('CommentsOnly'),_0x508184=_0x23bbb5['includes']('document:write'),_0x3cb588=_0x23bbb5['includes']('comment:modify_all'),_0x2600a4=_0x23bbb5['includes']('comment:admin'),_0x1069ee=_0x23bbb5['includes']('comment:write'),_0x24a3d9=_0x1069ee||_0x2600a4,_0x2d4fad=_0x24a3d9||_0x3cb588,_0x8b8994=_0x508184||_0x24a3d9;(_0x2194f3&&(_0x2194f3['isEnabled']=!_0x508184&&_0x2d4fad),_0x22deba instanceof _0xe8f990)&&(!(_0x508184||_0x2d4fad&&_0x384505)?_0x22deba['enableReadOnlyMode']('no-permissions'):_0x22deba['disableReadOnlyMode']('no-permissions'));if(_0x384505){_0x384505['setPermissions']({'admin':_0x2600a4,'modifyAll':_0x3cb588,'write':_0x1069ee,'resolve':_0x8b8994},_0x561794);const _0x369175=_0x22deba instanceof _0xe8f990&&_0x22deba['commands']['get']('addCommentThread');_0x369175&&(_0x24a3d9?_0x369175['clearForceDisabled']('noPermissions'):_0x369175['forceDisabled']('noPermissions'));}}}function r(_0x1bc54c,_0x48d4fd){const t=_0x1bc54c['t'];switch(_0x48d4fd){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 _0x254c47{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['requires'](){return[n];}constructor(_0x30e4d3){super(_0x30e4d3),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x1b55b2(),this['_locale']=_0x30e4d3['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x597336=this['context'];this['licenseKey']=_0x597336['config']['get']('licenseKey');const _0x5d68b3=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4d9e60;for(const _0x5c73d4 in _0x597336){const _0xc1ad97=_0x597336[_0x5c73d4];if(_0x5d68b3['includes'](_0xc1ad97)){delete _0x597336[_0x5c73d4],_0x4d9e60=_0xc1ad97;break;}}if('licenseKeyInvalid'===_0x4d9e60)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x534096('invalid-license-key',null);if('licenseKeyTrial'===_0x4d9e60&&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'===_0x4d9e60)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x534096('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x4d9e60)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x534096('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x4d9e60)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x534096('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x4d9e60&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x3aa889,name:_0x2235e7,..._0x5762c8}){if(!_0x3aa889||'string'!=typeof _0x3aa889)throw new _0x534096('users-add-invalid-id');if(this['users']['has'](_0x3aa889))throw new _0x534096('users-add-duplicated-id',null,{'id':_0x3aa889});const _0x3519e5={..._0x5762c8,'id':_0x3aa889,'name':a(this['_locale'],_0x2235e7),'color':this['_getNextColor']()};_0x3519e5['name']=a(this['_locale'],_0x3519e5['name']);const _0x5d7d06=new U(_0x3519e5);return this['users']['add'](_0x5d7d06),_0x5d7d06;}['getUser'](_0x46249f){return this['users']['get'](_0x46249f);}['useAnonymousUser'](){const _0x4fa9d1=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x4fa9d1);}['defineMe'](_0x29f9f0){if(this['_myId'])throw new _0x534096('users-me-already-defined',null);const _0x3acd9f=this['getUser'](_0x29f9f0);if(!_0x3acd9f)throw new _0x534096('users-me-missing-user',null);this['_myId']=_0x29f9f0,_0x3acd9f['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x3d3838=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x3d3838&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}['_addAnonymousUser'](){const _0x5a1b44=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x5a1b44,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class U{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x179f5f){this['id']=_0x179f5f['id'],this['color']=_0x179f5f['color'],this['name']=_0x179f5f['name'],this['avatar']=_0x179f5f['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0xfb4a57=this['name']['split']('\x20');return 0x1===_0xfb4a57['length']?this['_getInitial'](_0xfb4a57[0x0]):this['_getInitial'](_0xfb4a57[0x0])+this['_getInitial'](_0xfb4a57[_0xfb4a57['length']-0x1]);}['_getInitial'](_0x38f960){return _0x38f960['charAt'](0x0)['toUpperCase']();}}function a(_0x2c6bc6,_0x2cd734=''){return''==(_0x2cd734=_0x2cd734['trim']())?r(_0x2c6bc6,'Anonymous'):_0x2cd734;}class u{['_id'];constructor(_0x541462){this['_id']=_0x541462;}['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 _0x3fd898{['name'];['notificationView'];constructor(_0xa058b4,_0x36e7fa,_0x4fe990){super(_0xa058b4),this['name']=_0x36e7fa['name'],this['notificationView']=null;const _0x16cc23=['ck','ck-user'],_0x1f5ed3=['ck','ck-user__img'];if(_0x36e7fa['isAnonymous']&&_0x1f5ed3['push']('ck-user__anonymous'),!_0x36e7fa['isAnonymous']&&_0x36e7fa['isMe']&&_0x16cc23['push']('ck-user_me'),_0x36e7fa['avatar']&&_0x1f5ed3['push']('ck-user__avatar'),_0x4fe990){const _0x3d0ba2=new _0x1479b6();_0x3d0ba2['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x3d0ba2['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':_0x4fe990},'children':[_0x3d0ba2]};}const _0x434c79=[{'tag':'div','attributes':{'class':_0x1f5ed3,'style':{'background-image':_0x36e7fa['avatar']?'url(\x27'+_0x36e7fa['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x36e7fa['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x36e7fa['name']},'children':[{'text':_0x36e7fa['initials']}]}];this['notificationView']&&_0x434c79['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x16cc23,'data-user-id':_0x36e7fa['id']},'children':_0x434c79});}}class J extends _0x3fd898{['id'];constructor(_0x52644c,_0x3d3cb7){super(_0x52644c),this['id']='ck-aria-description-'+_0x2f14b3(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x3d3cb7}]});}}class P extends _0x5bc45f{['render'](){super['render'](),V(this);}}class Y extends _0x448dcc{['render'](){super['render'](),V(this);}}function V(_0x5bc771){_0x5bc771['listenTo'](_0x5bc771['element'],'mousedown',(_0x113938,_0x57f416)=>{_0x57f416['stopPropagation'](),_0x57f416['preventDefault']();}),_0x5bc771['listenTo'](_0x5bc771['element'],'mouseup',()=>{_0x5bc771['element']['focus']();});}function E(_0x57ce39={}){if(void 0x0!==_0x57ce39['dateTimeFormat']&&'function'!=typeof _0x57ce39['dateTimeFormat'])throw new _0x534096('invalid-date-time-format');return _0x580410=>{const _0x22e34b='string'==typeof _0x580410?_0x48917a(_0x580410):_0x580410,_0x2a603f=new Date(),_0x3d9575=_0x1f114a(_0x2a603f,_0x22e34b);return _0x57ce39['dateTimeFormat']?_0x57ce39['dateTimeFormat'](_0x22e34b):_0x15dcf2(_0x22e34b,0x0===_0x3d9575?'\x27Today\x27\x20hh:mma':0x1===_0x3d9575?'\x27Yesterday\x27\x20hh:mma':_0x3d9575<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x153453,_0x280aca){const _0x5a191d=_0x153453['mapper']['markerNameToElements'](_0x280aca['name']);if(!_0x5a191d)return null;const _0x19fd9b=_0x5e012f(_0x5a191d['values']());return _0x153453['view']['domConverter']['mapViewToDom'](_0x19fd9b)||null;}function R(_0xc8a5f,_0x4ed2f8){if(0x0===_0x4ed2f8['length'])return null;const _0x3c455e=[],_0x3bb3ea=_0xc8a5f['view']['domConverter'];for(const _0x3edc0b of _0x4ed2f8){const _0x232f85=_0xc8a5f['mapper']['markerNameToElements'](_0x3edc0b['name']);if(!_0x232f85)continue;const _0x2b8a11=Array['from'](_0x232f85)['map'](_0x3d0ff5=>_0x3bb3ea['mapViewToDom'](_0x3d0ff5))['filter'](_0x35f54e=>!!_0x35f54e);_0x3c455e['push'](..._0x2b8a11);}if(0x0===_0x3c455e['length'])return null;const _0x2f290a=[];for(const _0x2801d9 of _0x3c455e){const _0x2d2db8=_0x2801d9['getClientRects']()['item'](0x0);_0x2d2db8&&_0x2f290a['push']({'x':_0x2d2db8['x'],'y':_0x2d2db8['y'],'domElement':_0x2801d9});}return 0x0===_0x2f290a['length']?null:(_0x2f290a['sort']((_0x2a742b,_0x37f712)=>_0x2a742b['y']-_0x37f712['y']||_0x2a742b['x']-_0x37f712['x']),_0x2f290a['map'](_0x3cc1fe=>_0x3cc1fe['domElement']));}function Z(_0x32b690,{limit:_0x1265ab,suffix:_0x4dbf21='...'}){const _0x5ced18=[];let _0x14b8f7=0x0;const _0x45d05f=_0x32b690['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x19fd33=0x0;_0x19fd33<_0x45d05f['length'];_0x19fd33++){let _0x4080fd=_0x45d05f[_0x19fd33];const _0x10c179=$(_0x4080fd);if(_0x4080fd['startsWith']('<')){if(_0x14b8f7>=_0x1265ab){const _0x342851=_0x4080fd['match'](/[a-zA-Z]+/);if(!_0x342851){_0x45d05f[_0x19fd33]='';continue;}const _0x5eacb4=_0x342851[0x0];_0x4080fd['startsWith']('</')?(_0x5ced18['length']&&(_0x4080fd=''),_0x5ced18['pop']()):(_0x5ced18['push'](_0x5eacb4),_0x4080fd='');}}else{if(_0x14b8f7>=_0x1265ab)_0x4080fd='';else{if(_0x14b8f7+_0x10c179['length']>=_0x1265ab){let _0x2e9afe=_0x1265ab-_0x14b8f7;if('\x20'===_0x10c179[_0x2e9afe-0x1])_0x2e9afe--;else{const _0x3d680a=_0x10c179['slice'](_0x2e9afe)['indexOf']('\x20');-0x1!==_0x3d680a?_0x2e9afe+=_0x3d680a:_0x2e9afe=_0x4080fd['length'];}_0x4080fd=_0x10c179['slice'](0x0,_0x2e9afe)['join']('')+_0x4dbf21,_0x14b8f7=_0x1265ab;}else _0x14b8f7+=_0x10c179['length'];}}_0x45d05f[_0x19fd33]=_0x4080fd;}return _0x45d05f['join']('\x0a')['replace'](/\n/g,'');}function $(_0x3f436a){const _0x458a58=[];for(let _0x40b142=0x0;_0x40b142<_0x3f436a['length'];_0x40b142++){const _0x1c3818=_0x3f436a['substring'](_0x40b142)['match'](/^&[a-z0-9#]+;/);if(_0x1c3818){const _0x471c3a=_0x1c3818[0x0];_0x458a58['push'](_0x471c3a),_0x40b142+=_0x471c3a['length']-0x1;}else _0x458a58['push'](_0x3f436a[_0x40b142]);}return _0x458a58;}class h extends _0x3fd898{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x23cf82){super(_0x23cf82);const _0x251320=this['bindTemplate'];this['set']('message',r(_0x23cf82,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x23cf82,r(_0x23cf82,'Yes'),_0x3b2968['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x23cf82,r(_0x23cf82,'No'),_0x3b2968['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x45c802(),this['keystrokes']=new _0x4da2ef(),this['focusCycler']=new _0x3aa54a({'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':_0x251320['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'](_0x19b1aa,_0x315a52,_0x410439,_0x406dac){const _0x5ee7f7=new _0x5bc45f(_0x19b1aa);return _0x5ee7f7['label']=_0x315a52,_0x5ee7f7['icon']=_0x410439,_0x5ee7f7['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x406dac}}),_0x5ee7f7['on']('execute',()=>this['fire'](_0x406dac)),_0x5ee7f7;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x59dac1=>{this['keystrokes']['listenTo'](_0x59dac1['element']),this['focusTracker']['add'](_0x59dac1['element']);}),this['keystrokes']['set']('esc',(_0x3ecdce,_0x130271)=>{this['fire']('cancel'),_0x130271();});}}function m(_0x2ba47b){return class extends _0x2ba47b{['showConfirm'](_0x324382,_0x5229f6){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x324382,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x5229f6['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x395c7d=>this['confirmView']['on']('submit',_0x395c7d));}['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(_0x2dc104){let _0x564a9d=0x0,_0x2d781a=0x0;for(const _0x5a3c67 of q(_0x2dc104))_0x564a9d=(_0x564a9d<<0x5)-_0x564a9d+_0x5a3c67,_0x564a9d|=0x0,[_0x564a9d,_0x2d781a]=[_0x2d781a,_0x564a9d];return z(_0x564a9d)+z(_0x2d781a);}function*O(_0x218744){null==_0x218744||null==_0x218744?yield 0x12b9b0a1:0x0===_0x218744||!0x1===_0x218744?yield 0x0:0x1===_0x218744||0x1==_0x218744?yield 0x1:Array['isArray'](_0x218744)?yield*function*(_0x4e9279){for(const _0x3d87aa of _0x4e9279)yield*O(_0x3d87aa);}(_0x218744):'object'==typeof _0x218744?yield*q(_0x218744):'string'==typeof _0x218744?yield*v(_0x218744):'number'==typeof _0x218744&&(yield _0x218744);}function*q(_0x4f6321){if(yield w('{'),_0x4f6321){const _0xd6e858=Object['keys'](_0x4f6321)['sort']();for(const _0xb4a58 of _0xd6e858){yield*v(_0xb4a58),yield w(':');const _0x35d91d=_0x4f6321[_0xb4a58];yield*O(_0x35d91d);}}yield w('}');}function*v(_0x1d659e){yield w('\x22');for(const _0x126d01 of _0x1d659e)yield w(_0x126d01);yield w('\x22');}function w(_0xa3f93e){return _0xa3f93e['charCodeAt'](0x0);}function z(_0x2f4022){return(_0x2f4022*=Math['sign'](_0x2f4022))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x588588,_0x27cd52,_0x5558ba,_0x17531d=[]){const _0x38e419='string'==typeof _0x588588?_0x5558ba['get'](_0x588588)['constructor']:_0x588588['prototype']['constructor'];if(_0x27cd52['has'](_0x38e419))return _0x27cd52['get'](_0x38e419);_0x27cd52['set'](_0x38e419,!0x0);const _0x62d15f=[...D,..._0x17531d]['map'](_0x52d148=>{if(_0x5558ba['has'](_0x52d148))return _0x5558ba['get'](_0x52d148)['constructor'];})['filter'](_0x25b899=>_0x25b899);if(_0x38e419&&_0x62d15f['includes'](_0x38e419))return _0x27cd52['set'](_0x38e419,!0x1),!0x1;if(!_0x38e419['requires'])return _0x27cd52['set'](_0x38e419,!0x0),!0x0;const _0x3471ed=_0x38e419['requires']['every'](_0x51c682=>S(_0x51c682,_0x27cd52,_0x5558ba,_0x17531d));return _0x27cd52['set'](_0x38e419,_0x3471ed),_0x3471ed;}function C(_0x5df076,_0x299d61){const _0x3b629f={};for(const _0x24048d of _0x5df076['config']['names']())W['includes'](_0x24048d)||(_0x3b629f[_0x24048d]=_0x5df076['config']['get'](_0x24048d));const _0x161fa3=_0x3b629f['plugins']||[],_0x5dfaee=_0x5df076['constructor']['builtinPlugins']||[],_0x3914a5=_0x161fa3['length']?_0x161fa3:_0x5dfaee,_0xeed8a1=_0x3b629f['extraPlugins']||[];delete _0x3b629f['extraPlugins'];const _0x367478=_0x3b629f['removePlugins']||[];delete _0x3b629f['removePlugins'];const _0x3eaf64=_0x5df076['_context']['config']['get']('plugins')||[],_0x5ca546=_0x3914a5['concat'](_0xeed8a1)['concat'](_0x3eaf64)['map'](_0x430ab5=>'string'==typeof _0x430ab5?_0x5dfaee['find'](_0x25d5b7=>_0x25d5b7['pluginName']==_0x430ab5):_0x430ab5)['filter'](_0x683df2=>!_0x367478['includes'](_0x683df2)&&!_0x367478['includes'](_0x683df2['pluginName'])),_0x19a8d1=Array['from'](new Set(_0x5ca546)),_0x2db011=new Map();return _0x3b629f['plugins']=_0x19a8d1['filter'](_0x93a98a=>S(_0x93a98a,_0x2db011,_0x5df076['plugins'],_0x299d61)),_0x3b629f;}function B(_0x590b8a,_0x5f4b42){const _0xf7136b=[];_0x590b8a['document']['selection']['on']('change:range',()=>{const _0xe8649b=function(_0x4d551c,_0x402605){const _0x5a7317=[];for(const _0x30549f of _0x4d551c['markers']){const _0x2a6334=_0x30549f['getRange']();(_0x2a6334['containsPosition'](_0x402605)||_0x2a6334['start']['isEqual'](_0x402605)||_0x2a6334['end']['isEqual'](_0x402605))&&_0x5a7317['push'](_0x30549f);}return _0x5a7317;}(_0x590b8a,_0x590b8a['document']['selection']['focus']),_0x2c3ee9=[],_0x4b182e=[],_0x265af4=[];for(const _0x202386 of _0xf7136b)_0xe8649b['includes'](_0x202386)||_0x2c3ee9['push'](_0x202386);for(const _0x4154d0 of _0xe8649b)_0xf7136b['includes'](_0x4154d0)||_0x4b182e['push'](_0x4154d0),_0x265af4['push'](_0x4154d0);(_0x2c3ee9['length']||_0x4b182e['length'])&&_0x5f4b42({'left':_0x2c3ee9,'entered':_0x4b182e}),_0xf7136b['length']=0x0,_0xf7136b['push'](..._0x265af4);});}const Q='Ctrl+Shift+E';function T(_0x331300,_0x3c6bf6){const _0x1e22c2=_0x331300['element'];_0x331300['keystrokes']['listenTo'](_0x1e22c2);for(const _0x5c87a1 of _0x3c6bf6)K(_0x331300,_0x5c87a1);_0x3c6bf6['on']('change',(_0x410e9a,_0x263b05)=>{for(const _0x512ace of _0x263b05['removed'])_(_0x331300,_0x512ace);for(const _0x585fdb of Array['from'](_0x263b05['added'])['reverse']())K(_0x331300,_0x585fdb);}),_0x331300['keystrokes']['set']('enter',(_0x5b8c17,_0x4c5a68)=>{_0x1e22c2===_0x5b8c17['target']&&(_0x331300['focusCycler']['focusFirst'](),_0x4c5a68());},{'filter':_0x22deb1=>_0x22deb1['target']===_0x1e22c2}),_0x331300['keystrokes']['set']('esc',(_0x1de7e6,_0xbf566e)=>{_0x1e22c2!==_0x1de7e6['target']?_0x331300['focus']():_0x331300['fire']('escape'),_0xbf566e();}),_0x331300['keystrokes']['set']('arrowdown',(_0x382a4c,_0x1f3624)=>{_0x1e22c2===_0x382a4c['target']&&(_0x331300['fire']('arrowdown'),_0x1f3624());}),_0x331300['keystrokes']['set']('arrowup',(_0x2932d0,_0x3d1977)=>{_0x1e22c2===_0x2932d0['target']&&(_0x331300['fire']('arrowup'),_0x3d1977());});}function K(_0x5c3006,_0x3e3356){_0x3e3356['isRendered']&&(_0x5c3006['focusTracker']['add'](_0x3e3356['element']),_0x5c3006['keystrokes']['listenTo'](_0x3e3356['element']),_0x122c07(_0x3e3356)&&function(_0x452494,_0x4d8dd1){const _0x20241c=_0x452494['actions'],_0x78927c=_0x4d8dd1['actions'];for(const _0x16e3d4 of Object['keys'](_0x20241c))if(_0x16e3d4 in _0x78927c&&_0x20241c[_0x16e3d4]!==_0x78927c[_0x16e3d4])return!0x1;return!0x0;}(_0x5c3006['focusCycler'],_0x3e3356['focusCycler'])&&_0x5c3006['focusCycler']['chain'](_0x3e3356['focusCycler']));}function _(_0x4a30ed,_0x37b86b){_0x4a30ed['focusTracker']['remove'](_0x37b86b['element']),_0x4a30ed['keystrokes']['stopListening'](_0x37b86b['element']),_0x122c07(_0x37b86b)&&_0x4a30ed['focusCycler']['unchain'](_0x37b86b['focusCycler']);}export{J as AriaDescriptionView,m as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,P as LateFocusButtonView,Y as LateFocusDropdownButtonView,n 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};
|
23
|
+
import{ContextPlugin as _0x456a2a,Editor as _0x1e3b4e,icons as _0x334ed6}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x46bf8a,Collection as _0x287679,uid as _0x50bdce,first as _0xac6eda,FocusTracker as _0xc14d8d,KeystrokeHandler as _0xa64ac1}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x12b8e3,IconView as _0x553e91,ButtonView as _0x5e742d,DropdownButtonView as _0x28b3f5,FocusCycler as _0x8a93ac,isViewWithFocusCycler as _0x3ca162}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x582814 from'date-fns/format/index.js';import _0x8aca49 from'date-fns/parseISO/index.js';import _0x2f1f78 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x456a2a{static get['pluginName'](){return'Permissions';}['setPermissions'](_0x3c9569,_0x242924){let _0x2940ae;if(_0x242924||(_0x242924=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x242924?_0x2940ae=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x2940ae=this['context']['editors']['find'](_0x71c326=>_0x71c326['config']['get']('collaboration.channelId')==_0x242924)),!_0x2940ae)throw new _0x46bf8a('permissions-set-permissions-invalid-channel-id',null);const _0x3e022e=_0x2940ae['plugins'],_0x3ffce2=_0x3e022e['has']('CommentsRepository')?_0x3e022e['get']('CommentsRepository'):void 0x0,_0x5ac39c=_0x3e022e['has']('CommentsOnly')&&_0x3e022e['get']('CommentsOnly'),_0x2291af=_0x3c9569['includes']('document:write'),_0x5071b0=_0x3c9569['includes']('comment:modify_all'),_0x117d11=_0x3c9569['includes']('comment:admin'),_0x1353ab=_0x3c9569['includes']('comment:write'),_0x2732d6=_0x1353ab||_0x117d11,_0x391ae7=_0x2732d6||_0x5071b0,_0xd3d4e3=_0x2291af||_0x2732d6;(_0x5ac39c&&(_0x5ac39c['isEnabled']=!_0x2291af&&_0x391ae7),_0x2940ae instanceof _0x1e3b4e)&&(!(_0x2291af||_0x391ae7&&_0x3ffce2)?_0x2940ae['enableReadOnlyMode']('no-permissions'):_0x2940ae['disableReadOnlyMode']('no-permissions'));if(_0x3ffce2){_0x3ffce2['setPermissions']({'admin':_0x117d11,'modifyAll':_0x5071b0,'write':_0x1353ab,'resolve':_0xd3d4e3},_0x242924);const _0x30a18b=_0x2940ae instanceof _0x1e3b4e&&_0x2940ae['commands']['get']('addCommentThread');_0x30a18b&&(_0x2732d6?_0x30a18b['clearForceDisabled']('noPermissions'):_0x30a18b['forceDisabled']('noPermissions'));}}}function r(_0x40309b,_0x3e2c50){const t=_0x40309b['t'];switch(_0x3e2c50){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 _0x456a2a{['users'];['_licenseKeyCheckInterval'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['requires'](){return[n];}constructor(_0x2f3acd){super(_0x2f3acd),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x287679(),this['_locale']=_0x2f3acd['locale'],this['_licenseKeyCheckInterval']=null,this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){const _0x433575=this['context'];this['licenseKey']=_0x433575['config']['get']('licenseKey');const _0x1f7d51=['licenseKeyTrial','licenseKeyInvalid','licenseKeyValid','licenseKeyTrialLimit:operations','licenseKeyTrialLimit:time','licenseKeyTrialLimit:revisions'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x421f1b;for(const _0x311c43 in _0x433575){const _0x38da98=_0x433575[_0x311c43];if(_0x1f7d51['includes'](_0x38da98)){delete _0x433575[_0x311c43],_0x421f1b=_0x38da98;break;}}if('licenseKeyInvalid'===_0x421f1b)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x46bf8a('invalid-license-key',null);if('licenseKeyTrial'===_0x421f1b&&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'===_0x421f1b)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x46bf8a('trial-license-key-reached-limit-changes',null);if('licenseKeyTrialLimit:time'===_0x421f1b)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x46bf8a('trial-license-key-reached-limit-time',null);if('licenseKeyTrialLimit:revisions'===_0x421f1b)throw clearInterval(this['_licenseKeyCheckInterval']),new _0x46bf8a('trial-license-key-reached-limit-revisions',null);'licenseKeyValid'===_0x421f1b&&clearInterval(this['_licenseKeyCheckInterval']);},0x3e8),this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x36e7b1,name:_0x34dabd,..._0x4a1308}){if(!_0x36e7b1||'string'!=typeof _0x36e7b1)throw new _0x46bf8a('users-add-invalid-id');if(this['users']['has'](_0x36e7b1))throw new _0x46bf8a('users-add-duplicated-id',null,{'id':_0x36e7b1});const _0xf6393e={..._0x4a1308,'id':_0x36e7b1,'name':a(this['_locale'],_0x34dabd),'color':this['_getNextColor']()};_0xf6393e['name']=a(this['_locale'],_0xf6393e['name']);const _0x32114b=new U(_0xf6393e);return this['users']['add'](_0x32114b),_0x32114b;}['getUser'](_0x370344){return this['users']['get'](_0x370344);}['useAnonymousUser'](){const _0x5532b9=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x5532b9);}['defineMe'](_0x432f03){if(this['_myId'])throw new _0x46bf8a('users-me-already-defined',null);const _0x5460dc=this['getUser'](_0x432f03);if(!_0x5460dc)throw new _0x46bf8a('users-me-missing-user',null);this['_myId']=_0x432f03,_0x5460dc['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['destroy'](){super['destroy'](),clearInterval(this['_licenseKeyCheckInterval']);}['_getNextColor'](){const _0x4c7b25=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x4c7b25&&(this['_lastColor']=0x0),new u(this['_lastColor']++);}['_addAnonymousUser'](){const _0x170f14=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x170f14,'name':r(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class U{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x4a03b0){this['id']=_0x4a03b0['id'],this['color']=_0x4a03b0['color'],this['name']=_0x4a03b0['name'],this['avatar']=_0x4a03b0['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x1c08d0=this['name']['split']('\x20');return 0x1===_0x1c08d0['length']?this['_getInitial'](_0x1c08d0[0x0]):this['_getInitial'](_0x1c08d0[0x0])+this['_getInitial'](_0x1c08d0[_0x1c08d0['length']-0x1]);}['_getInitial'](_0x15f78c){return _0x15f78c['charAt'](0x0)['toUpperCase']();}}function a(_0x4ce56a,_0x109fbd=''){return''==(_0x109fbd=_0x109fbd['trim']())?r(_0x4ce56a,'Anonymous'):_0x109fbd;}class u{['_id'];constructor(_0x5ad53a){this['_id']=_0x5ad53a;}['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 _0x12b8e3{['name'];['notificationView'];constructor(_0x42cc2c,_0x26fd00,_0x5b133d){super(_0x42cc2c),this['name']=_0x26fd00['name'],this['notificationView']=null;const _0x59ef85=['ck','ck-user'],_0x3dcb83=['ck','ck-user__img'];if(_0x26fd00['isAnonymous']&&_0x3dcb83['push']('ck-user__anonymous'),!_0x26fd00['isAnonymous']&&_0x26fd00['isMe']&&_0x59ef85['push']('ck-user_me'),_0x26fd00['avatar']&&_0x3dcb83['push']('ck-user__avatar'),_0x5b133d){const _0x4d77a3=new _0x553e91();_0x4d77a3['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x4d77a3['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':_0x5b133d},'children':[_0x4d77a3]};}const _0x30e0dd=[{'tag':'div','attributes':{'class':_0x3dcb83,'style':{'background-image':_0x26fd00['avatar']?'url(\x27'+_0x26fd00['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x26fd00['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x26fd00['name']},'children':[{'text':_0x26fd00['initials']}]}];this['notificationView']&&_0x30e0dd['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x59ef85,'data-user-id':_0x26fd00['id']},'children':_0x30e0dd});}}class G extends _0x12b8e3{['id'];constructor(_0x59608e,_0x162eb6){super(_0x59608e),this['id']='ck-aria-description-'+_0x50bdce(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x162eb6}]});}}class P extends _0x5e742d{['render'](){super['render'](),V(this);}}class Y extends _0x28b3f5{['render'](){super['render'](),V(this);}}function V(_0x355cba){_0x355cba['listenTo'](_0x355cba['element'],'mousedown',(_0x339f29,_0xeb8570)=>{_0xeb8570['stopPropagation'](),_0xeb8570['preventDefault']();}),_0x355cba['listenTo'](_0x355cba['element'],'mouseup',()=>{_0x355cba['element']['focus']();});}function E(_0x344ea2={}){if(void 0x0!==_0x344ea2['dateTimeFormat']&&'function'!=typeof _0x344ea2['dateTimeFormat'])throw new _0x46bf8a('invalid-date-time-format');return _0x34e468=>{const _0x382356='string'==typeof _0x34e468?_0x8aca49(_0x34e468):_0x34e468,_0x15e830=new Date(),_0x5aced7=_0x2f1f78(_0x15e830,_0x382356);return _0x344ea2['dateTimeFormat']?_0x344ea2['dateTimeFormat'](_0x382356):_0x582814(_0x382356,0x0===_0x5aced7?'\x27Today\x27\x20hh:mma':0x1===_0x5aced7?'\x27Yesterday\x27\x20hh:mma':_0x5aced7<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x43b641,_0x302787){const _0x19fc37=_0x43b641['mapper']['markerNameToElements'](_0x302787['name']);if(!_0x19fc37)return null;const _0x221588=_0xac6eda(_0x19fc37['values']());return _0x43b641['view']['domConverter']['mapViewToDom'](_0x221588)||null;}function R(_0x22a636,_0xe67f13){if(0x0===_0xe67f13['length'])return null;const _0x2b6363=[],_0x370a6c=_0x22a636['view']['domConverter'];for(const _0x22a008 of _0xe67f13){const _0xe0f956=_0x22a636['mapper']['markerNameToElements'](_0x22a008['name']);if(!_0xe0f956)continue;const _0x51ba1c=Array['from'](_0xe0f956)['map'](_0x18ea87=>_0x370a6c['mapViewToDom'](_0x18ea87))['filter'](_0x3eeb22=>!!_0x3eeb22);_0x2b6363['push'](..._0x51ba1c);}if(0x0===_0x2b6363['length'])return null;const _0x366666=[];for(const _0x39105d of _0x2b6363){const _0x26db48=_0x39105d['getClientRects']()['item'](0x0);_0x26db48&&_0x366666['push']({'x':_0x26db48['x'],'y':_0x26db48['y'],'domElement':_0x39105d});}return 0x0===_0x366666['length']?null:(_0x366666['sort']((_0x475672,_0xc5f33f)=>_0x475672['y']-_0xc5f33f['y']||_0x475672['x']-_0xc5f33f['x']),_0x366666['map'](_0x38afcd=>_0x38afcd['domElement']));}function Z(_0x48a5,{limit:_0x5de276,suffix:_0x20b487='...'}){const _0x27a2a2=[];let _0x413adc=0x0;const _0x4a4a4d=_0x48a5['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x1ce8e8=0x0;_0x1ce8e8<_0x4a4a4d['length'];_0x1ce8e8++){let _0x48901c=_0x4a4a4d[_0x1ce8e8];const _0x4d759f=$(_0x48901c);if(_0x48901c['startsWith']('<')){if(_0x413adc>=_0x5de276){const _0x27f3e3=_0x48901c['match'](/[a-zA-Z]+/);if(!_0x27f3e3){_0x4a4a4d[_0x1ce8e8]='';continue;}const _0x343200=_0x27f3e3[0x0];_0x48901c['startsWith']('</')?(_0x27a2a2['length']&&(_0x48901c=''),_0x27a2a2['pop']()):(_0x27a2a2['push'](_0x343200),_0x48901c='');}}else{if(_0x413adc>=_0x5de276)_0x48901c='';else{if(_0x413adc+_0x4d759f['length']>=_0x5de276){let _0x39c253=_0x5de276-_0x413adc;if('\x20'===_0x4d759f[_0x39c253-0x1])_0x39c253--;else{const _0x1b88c8=_0x4d759f['slice'](_0x39c253)['indexOf']('\x20');-0x1!==_0x1b88c8?_0x39c253+=_0x1b88c8:_0x39c253=_0x48901c['length'];}_0x48901c=_0x4d759f['slice'](0x0,_0x39c253)['join']('')+_0x20b487,_0x413adc=_0x5de276;}else _0x413adc+=_0x4d759f['length'];}}_0x4a4a4d[_0x1ce8e8]=_0x48901c;}return _0x4a4a4d['join']('\x0a')['replace'](/\n/g,'');}function $(_0x2da243){const _0x4321bd=[];for(let _0x8f10e9=0x0;_0x8f10e9<_0x2da243['length'];_0x8f10e9++){const _0x40279d=_0x2da243['substring'](_0x8f10e9)['match'](/^&[a-z0-9#]+;/);if(_0x40279d){const _0xb0a29d=_0x40279d[0x0];_0x4321bd['push'](_0xb0a29d),_0x8f10e9+=_0xb0a29d['length']-0x1;}else _0x4321bd['push'](_0x2da243[_0x8f10e9]);}return _0x4321bd;}class h extends _0x12b8e3{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x35c8c6){super(_0x35c8c6);const _0x3d4c23=this['bindTemplate'];this['set']('message',r(_0x35c8c6,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x35c8c6,r(_0x35c8c6,'Yes'),_0x334ed6['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x35c8c6,r(_0x35c8c6,'No'),_0x334ed6['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0xc14d8d(),this['keystrokes']=new _0xa64ac1(),this['focusCycler']=new _0x8a93ac({'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':_0x3d4c23['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'](_0x42806f,_0x1373e1,_0x35b028,_0x22eb7d){const _0x4ce150=new _0x5e742d(_0x42806f);return _0x4ce150['label']=_0x1373e1,_0x4ce150['icon']=_0x35b028,_0x4ce150['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x22eb7d}}),_0x4ce150['on']('execute',()=>this['fire'](_0x22eb7d)),_0x4ce150;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x519ea4=>{this['keystrokes']['listenTo'](_0x519ea4['element']),this['focusTracker']['add'](_0x519ea4['element']);}),this['keystrokes']['set']('esc',(_0x596396,_0x100457)=>{this['fire']('cancel'),_0x100457();});}}function m(_0x233a5a){return class extends _0x233a5a{['showConfirm'](_0x1b29f8,_0x19ce71){return this['confirmView']=new h(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x1b29f8,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x19ce71['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x4bddb5=>this['confirmView']['on']('submit',_0x4bddb5));}['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(_0x382e49){let _0x1bf74d=0x0,_0x4c35ba=0x0;for(const _0x23dfc4 of q(_0x382e49))_0x1bf74d=(_0x1bf74d<<0x5)-_0x1bf74d+_0x23dfc4,_0x1bf74d|=0x0,[_0x1bf74d,_0x4c35ba]=[_0x4c35ba,_0x1bf74d];return z(_0x1bf74d)+z(_0x4c35ba);}function*O(_0x3cb4df){null==_0x3cb4df||null==_0x3cb4df?yield 0x12b9b0a1:0x0===_0x3cb4df||!0x1===_0x3cb4df?yield 0x0:0x1===_0x3cb4df||0x1==_0x3cb4df?yield 0x1:Array['isArray'](_0x3cb4df)?yield*function*(_0x4d26cc){for(const _0x34d0fd of _0x4d26cc)yield*O(_0x34d0fd);}(_0x3cb4df):'object'==typeof _0x3cb4df?yield*q(_0x3cb4df):'string'==typeof _0x3cb4df?yield*v(_0x3cb4df):'number'==typeof _0x3cb4df&&(yield _0x3cb4df);}function*q(_0xf8cd91){if(yield w('{'),_0xf8cd91){const _0x5dedf6=Object['keys'](_0xf8cd91)['sort']();for(const _0x2a015 of _0x5dedf6){yield*v(_0x2a015),yield w(':');const _0x11d7cb=_0xf8cd91[_0x2a015];yield*O(_0x11d7cb);}}yield w('}');}function*v(_0x32c6aa){yield w('\x22');for(const _0x565fa2 of _0x32c6aa)yield w(_0x565fa2);yield w('\x22');}function w(_0x47a067){return _0x47a067['charCodeAt'](0x0);}function z(_0x590046){return(_0x590046*=Math['sign'](_0x590046))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x499cc7,_0x32f3e5,_0x43b49a,_0x4cd545=[]){const _0x30813e='string'==typeof _0x499cc7?_0x43b49a['get'](_0x499cc7)['constructor']:_0x499cc7['prototype']['constructor'];if(_0x32f3e5['has'](_0x30813e))return _0x32f3e5['get'](_0x30813e);_0x32f3e5['set'](_0x30813e,!0x0);const _0x2c2141=[...D,..._0x4cd545]['map'](_0x338dd8=>{if(_0x43b49a['has'](_0x338dd8))return _0x43b49a['get'](_0x338dd8)['constructor'];})['filter'](_0x5a1663=>_0x5a1663);if(_0x30813e&&_0x2c2141['includes'](_0x30813e))return _0x32f3e5['set'](_0x30813e,!0x1),!0x1;if(!_0x30813e['requires'])return _0x32f3e5['set'](_0x30813e,!0x0),!0x0;const _0x561eca=_0x30813e['requires']['every'](_0x577d84=>S(_0x577d84,_0x32f3e5,_0x43b49a,_0x4cd545));return _0x32f3e5['set'](_0x30813e,_0x561eca),_0x561eca;}function C(_0x3e53e8,_0x4c0a4c){const _0x24f6e0={};for(const _0x513668 of _0x3e53e8['config']['names']())W['includes'](_0x513668)||(_0x24f6e0[_0x513668]=_0x3e53e8['config']['get'](_0x513668));const _0x15bbfd=_0x24f6e0['plugins']||[],_0xbe0562=_0x3e53e8['constructor']['builtinPlugins']||[],_0x5d45ff=_0x15bbfd['length']?_0x15bbfd:_0xbe0562,_0x3e3854=_0x24f6e0['extraPlugins']||[];delete _0x24f6e0['extraPlugins'];const _0x4a940d=_0x24f6e0['removePlugins']||[];delete _0x24f6e0['removePlugins'];const _0x5e4c90=_0x3e53e8['_context']['config']['get']('plugins')||[],_0x3cc485=_0x5d45ff['concat'](_0x3e3854)['concat'](_0x5e4c90)['map'](_0x36ab01=>'string'==typeof _0x36ab01?_0xbe0562['find'](_0x2b9725=>_0x2b9725['pluginName']==_0x36ab01):_0x36ab01)['filter'](_0x20c45c=>!_0x4a940d['includes'](_0x20c45c)&&!_0x4a940d['includes'](_0x20c45c['pluginName'])),_0x4a5036=Array['from'](new Set(_0x3cc485)),_0x23df82=new Map();return _0x24f6e0['plugins']=_0x4a5036['filter'](_0x57bf87=>S(_0x57bf87,_0x23df82,_0x3e53e8['plugins'],_0x4c0a4c)),_0x24f6e0;}function B(_0x17bd23,_0xed4eec){const _0x4de55c=[];_0x17bd23['document']['selection']['on']('change:range',()=>{const _0x80b2b4=function(_0x76401,_0x3663a5){const _0x10732d=[];for(const _0x427e90 of _0x76401['markers']){const _0x10ab0b=_0x427e90['getRange']();(_0x10ab0b['containsPosition'](_0x3663a5)||_0x10ab0b['start']['isEqual'](_0x3663a5)||_0x10ab0b['end']['isEqual'](_0x3663a5))&&_0x10732d['push'](_0x427e90);}return _0x10732d;}(_0x17bd23,_0x17bd23['document']['selection']['focus']),_0x1b6673=[],_0x5e4bb6=[],_0x188cbe=[];for(const _0x2f640e of _0x4de55c)_0x80b2b4['includes'](_0x2f640e)||_0x1b6673['push'](_0x2f640e);for(const _0x417bbc of _0x80b2b4)_0x4de55c['includes'](_0x417bbc)||_0x5e4bb6['push'](_0x417bbc),_0x188cbe['push'](_0x417bbc);(_0x1b6673['length']||_0x5e4bb6['length'])&&_0xed4eec({'left':_0x1b6673,'entered':_0x5e4bb6}),_0x4de55c['length']=0x0,_0x4de55c['push'](..._0x188cbe);});}const Q='Ctrl+Shift+E';function T(_0x4c1f99,_0x5a5ab4){const _0x4a9b8e=_0x4c1f99['element'];_0x4c1f99['keystrokes']['listenTo'](_0x4a9b8e);for(const _0x3d345c of _0x5a5ab4)K(_0x4c1f99,_0x3d345c);_0x5a5ab4['on']('change',(_0x1c80cb,_0x4635cb)=>{for(const _0x1fc4cd of _0x4635cb['removed'])_(_0x4c1f99,_0x1fc4cd);for(const _0x1fb9b1 of Array['from'](_0x4635cb['added'])['reverse']())K(_0x4c1f99,_0x1fb9b1);}),_0x4c1f99['keystrokes']['set']('enter',(_0x2764a8,_0x2a4a72)=>{_0x4a9b8e===_0x2764a8['target']&&(_0x4c1f99['focusCycler']['focusFirst'](),_0x2a4a72());},{'filter':_0x14b976=>_0x14b976['target']===_0x4a9b8e}),_0x4c1f99['keystrokes']['set']('esc',(_0x937b5e,_0x169c98)=>{_0x4a9b8e!==_0x937b5e['target']?_0x4c1f99['focus']():_0x4c1f99['fire']('escape'),_0x169c98();}),_0x4c1f99['keystrokes']['set']('arrowdown',(_0x26f6d2,_0x1f825f)=>{_0x4a9b8e===_0x26f6d2['target']&&(_0x4c1f99['fire']('arrowdown'),_0x1f825f());}),_0x4c1f99['keystrokes']['set']('arrowup',(_0x1f6e39,_0x2be662)=>{_0x4a9b8e===_0x1f6e39['target']&&(_0x4c1f99['fire']('arrowup'),_0x2be662());});}function K(_0x1ac29e,_0x18730d){_0x18730d['isRendered']&&(_0x1ac29e['focusTracker']['add'](_0x18730d['element']),_0x1ac29e['keystrokes']['listenTo'](_0x18730d['element']),_0x3ca162(_0x18730d)&&function(_0x5e796b,_0x324224){const _0x16ed42=_0x5e796b['actions'],_0x25a616=_0x324224['actions'];for(const _0x4de9af of Object['keys'](_0x16ed42))if(_0x4de9af in _0x25a616&&_0x16ed42[_0x4de9af]!==_0x25a616[_0x4de9af])return!0x1;return!0x0;}(_0x1ac29e['focusCycler'],_0x18730d['focusCycler'])&&_0x1ac29e['focusCycler']['chain'](_0x18730d['focusCycler']));}function _(_0x1c3bd0,_0x2532c8){_0x1c3bd0['focusTracker']['remove'](_0x2532c8['element']),_0x1c3bd0['keystrokes']['stopListening'](_0x2532c8['element']),_0x3ca162(_0x2532c8)&&_0x1c3bd0['focusCycler']['unchain'](_0x2532c8['focusCycler']);}export{G as AriaDescriptionView,m as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,P as LateFocusButtonView,Y as LateFocusDropdownButtonView,n 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};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-collaboration-core",
|
3
|
-
"version": "43.2.0-alpha.
|
3
|
+
"version": "43.2.0-alpha.6",
|
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.2.0-alpha.
|
36
|
-
"@ckeditor/ckeditor5-theme-lark": "43.2.0-alpha.
|
37
|
-
"@ckeditor/ckeditor5-ui": "43.2.0-alpha.
|
38
|
-
"@ckeditor/ckeditor5-utils": "43.2.0-alpha.
|
39
|
-
"ckeditor5": "43.2.0-alpha.
|
35
|
+
"@ckeditor/ckeditor5-core": "43.2.0-alpha.6",
|
36
|
+
"@ckeditor/ckeditor5-theme-lark": "43.2.0-alpha.6",
|
37
|
+
"@ckeditor/ckeditor5-ui": "43.2.0-alpha.6",
|
38
|
+
"@ckeditor/ckeditor5-utils": "43.2.0-alpha.6",
|
39
|
+
"ckeditor5": "43.2.0-alpha.6",
|
40
40
|
"date-fns": "2.30.0"
|
41
41
|
},
|
42
42
|
"files": [
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
|
23
|
+
(function(_0x28bd39,_0x33ad6f){var _0x172f2d=_0x6d0d,_0x41961f=_0x28bd39();while(!![]){try{var _0x2990f9=parseInt(_0x172f2d(0xae))/0x1+-parseInt(_0x172f2d(0xa7))/0x2+-parseInt(_0x172f2d(0xa6))/0x3*(parseInt(_0x172f2d(0xa5))/0x4)+-parseInt(_0x172f2d(0xaf))/0x5*(parseInt(_0x172f2d(0xb0))/0x6)+parseInt(_0x172f2d(0xad))/0x7+parseInt(_0x172f2d(0xa2))/0x8*(parseInt(_0x172f2d(0xa9))/0x9)+parseInt(_0x172f2d(0xa4))/0xa*(parseInt(_0x172f2d(0xac))/0xb);if(_0x2990f9===_0x33ad6f)break;else _0x41961f['push'](_0x41961f['shift']());}catch(_0x5e5188){_0x41961f['push'](_0x41961f['shift']());}}}(_0x5ae8,0xb7b31));function _0x5ae8(){var _0x8263c3=['2773512CWumCZ','span','63bSNCOg','ck-aria-description-','setTemplate','21099309Tagicc','5539870DkCZwb','1074483jtJjAZ','5934315tiEwxS','6hUVeXR','203048cWZFXd','ck-aria-description','10eoydcD','4516AJIxep','1689Tfkdhr'];_0x5ae8=function(){return _0x8263c3;};return _0x5ae8();}import{uid as _0x555f39}from'ckeditor5/src/utils.js';import{View as _0x1755c5}from'ckeditor5/src/ui.js';function _0x6d0d(_0x323412,_0xfaf9d6){var _0x5ae83f=_0x5ae8();return _0x6d0d=function(_0x6d0da9,_0x96bda0){_0x6d0da9=_0x6d0da9-0xa2;var _0x58695b=_0x5ae83f[_0x6d0da9];return _0x58695b;},_0x6d0d(_0x323412,_0xfaf9d6);}export default class G extends _0x1755c5{constructor(_0x431c7f,_0x5e43e1){var _0x34060a=_0x6d0d;super(_0x431c7f),this['id']=_0x34060a(0xaa)+_0x555f39(),this[_0x34060a(0xab)]({'tag':_0x34060a(0xa8),'attributes':{'class':['ck',_0x34060a(0xa3)],'id':this['id']},'children':[{'text':_0x5e43e1}]});}}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(function(
|
23
|
+
(function(_0x48a683,_0x564684){const _0x3af52e=_0x5d0e,_0x2ff7fc=_0x48a683();while(!![]){try{const _0x435e22=parseInt(_0x3af52e(0x150))/0x1*(parseInt(_0x3af52e(0x156))/0x2)+-parseInt(_0x3af52e(0x15f))/0x3+-parseInt(_0x3af52e(0x151))/0x4+-parseInt(_0x3af52e(0x15a))/0x5*(parseInt(_0x3af52e(0x15b))/0x6)+parseInt(_0x3af52e(0x155))/0x7+parseInt(_0x3af52e(0x148))/0x8+parseInt(_0x3af52e(0x143))/0x9;if(_0x435e22===_0x564684)break;else _0x2ff7fc['push'](_0x2ff7fc['shift']());}catch(_0x554d59){_0x2ff7fc['push'](_0x2ff7fc['shift']());}}}(_0x1c63,0xd8e46));import{View as _0x31ccde,IconView as _0x4e4212}from'ckeditor5/src/ui.js';import _0x4d75cd from'../../../theme/icons/notification.svg';function _0x5d0e(_0x2414d4,_0x365bd5){const _0x1c6314=_0x1c63();return _0x5d0e=function(_0x5d0ed8,_0x28bebf){_0x5d0ed8=_0x5d0ed8-0x143;let _0x5de656=_0x1c6314[_0x5d0ed8];return _0x5de656;},_0x5d0e(_0x2414d4,_0x365bd5);}import'../../../theme/users.css';function _0x1c63(){const _0x889697=['7955YwOuzg','4476TBZqgN','setTemplate','initials','ck-user__icon','3383997mvhJoL','isMe','19519200giZzfO','div','ck-user__avatar','ck\x20ck-user__name\x20ck-user__name--hidden','ck-user_me','424320khHmhn','push','ck-user__anonymous','ck-user__notification','extendTemplate','ck-user__img','avatar','name','876164iUXkqa','2184964Mmympp','content','isAnonymous','ck-user','4560584CNaiud','2RgYBKz','url(\x27','notificationView','ck\x20ck-user__name'];_0x1c63=function(){return _0x889697;};return _0x1c63();}export default class J extends _0x31ccde{constructor(_0x2b4aef,_0x39d017,_0x27b1ff){const _0x159a50=_0x5d0e;super(_0x2b4aef),this[_0x159a50(0x14f)]=_0x39d017[_0x159a50(0x14f)],this[_0x159a50(0x158)]=null;const _0x1fc2b2=['ck',_0x159a50(0x154)],_0x237eb3=['ck',_0x159a50(0x14d)];if(_0x39d017[_0x159a50(0x153)]&&_0x237eb3[_0x159a50(0x149)](_0x159a50(0x14a)),!_0x39d017[_0x159a50(0x153)]&&_0x39d017[_0x159a50(0x160)]&&_0x1fc2b2[_0x159a50(0x149)](_0x159a50(0x147)),_0x39d017[_0x159a50(0x14e)]&&_0x237eb3[_0x159a50(0x149)](_0x159a50(0x145)),_0x27b1ff){const _0x3092f6=new _0x4e4212();_0x3092f6[_0x159a50(0x14c)]({'attributes':{'class':[_0x159a50(0x15e)]}}),_0x3092f6[_0x159a50(0x152)]=_0x4d75cd,this[_0x159a50(0x158)]={'tag':_0x159a50(0x144),'attributes':{'class':['ck',_0x159a50(0x14b)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x27b1ff},'children':[_0x3092f6]};}const _0x457858=[{'tag':_0x159a50(0x144),'attributes':{'class':_0x237eb3,'style':{'background-image':_0x39d017[_0x159a50(0x14e)]?_0x159a50(0x157)+_0x39d017[_0x159a50(0x14e)]+'\x27)':''}}},{'tag':_0x159a50(0x144),'attributes':{'class':_0x39d017[_0x159a50(0x14e)]?_0x159a50(0x146):_0x159a50(0x159),'aria-label':_0x39d017[_0x159a50(0x14f)]},'children':[{'text':_0x39d017[_0x159a50(0x15d)]}]}];this[_0x159a50(0x158)]&&_0x457858[_0x159a50(0x149)](this[_0x159a50(0x158)]),this[_0x159a50(0x15c)]({'tag':_0x159a50(0x144),'attributes':{'class':_0x1fc2b2,'data-user-id':_0x39d017['id']},'children':_0x457858});}}
|