@ckeditor/ckeditor5-collaboration-core 44.1.0-alpha.4 → 44.1.0-alpha.5
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 _0x33f123,Editor as _0x3c96f9,icons as _0x199b84}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x76ba49,Collection as _0x279455,uid as _0x57bfd8,first as _0x5ec4ac,FocusTracker as _0x39aeeb,KeystrokeHandler as _0x185c3c}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x3af50a,IconView as _0x2cb3f0,ButtonView as _0x49c6f4,DropdownButtonView as _0x2d1f93,FocusCycler as _0x111768,isViewWithFocusCycler as _0x3b0111}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x2ed73c from'date-fns/format/index.js';import _0x2201d8 from'date-fns/parseISO/index.js';import _0xba169d from'date-fns/differenceInCalendarDays/index.js';class n extends _0x33f123{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x6d2e8e,_0x6b6a2e){let _0x2c4654;if(_0x6b6a2e||(_0x6b6a2e=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x6b6a2e?_0x2c4654=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x2c4654=this['context']['editors']['find'](_0x3e26e2=>_0x3e26e2['config']['get']('collaboration.channelId')==_0x6b6a2e)),!_0x2c4654)throw new _0x76ba49('permissions-set-permissions-invalid-channel-id',null);const _0x1d06f6=_0x2c4654['plugins'],_0x24eea5=_0x1d06f6['has']('CommentsRepository')?_0x1d06f6['get']('CommentsRepository'):void 0x0,_0x109f37=_0x1d06f6['has']('CommentsOnly')&&_0x1d06f6['get']('CommentsOnly'),_0x585850=_0x6d2e8e['includes']('document:write'),_0x53a8c3=_0x6d2e8e['includes']('comment:modify_all'),_0xeec4a8=_0x6d2e8e['includes']('comment:admin'),_0x1dec96=_0x6d2e8e['includes']('comment:write'),_0x4842e5=_0x1dec96||_0xeec4a8,_0x32ee84=_0x4842e5||_0x53a8c3,_0x3d208f=_0x585850||_0x4842e5;(_0x109f37&&(_0x109f37['isEnabled']=!_0x585850&&_0x32ee84),_0x2c4654 instanceof _0x3c96f9)&&(!(_0x585850||_0x32ee84&&_0x24eea5)?_0x2c4654['enableReadOnlyMode']('no-permissions'):_0x2c4654['disableReadOnlyMode']('no-permissions'));if(_0x24eea5){_0x24eea5['setPermissions']({'admin':_0xeec4a8,'modifyAll':_0x53a8c3,'write':_0x1dec96,'resolve':_0x3d208f},_0x6b6a2e);const _0x5efd58=_0x2c4654 instanceof _0x3c96f9&&_0x2c4654['commands']['get']('addCommentThread');_0x5efd58&&(_0x4842e5?_0x5efd58['clearForceDisabled']('noPermissions'):_0x5efd58['forceDisabled']('noPermissions'));}}}function o(_0x532626,_0x3e935f){const t=_0x532626['t'];switch(_0x3e935f){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 u extends _0x33f123{['users'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[n];}constructor(_0x1c4b1b){super(_0x1c4b1b),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x279455(),this['_locale']=_0x1c4b1b['locale'],this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x8377d,name:_0x50d304,..._0x512e3b}){if(!_0x8377d||'string'!=typeof _0x8377d)throw new _0x76ba49('users-add-invalid-id');if(this['users']['has'](_0x8377d))throw new _0x76ba49('users-add-duplicated-id',null,{'id':_0x8377d});const _0x35a228={..._0x512e3b,'id':_0x8377d,'name':h(this['_locale'],_0x50d304),'color':this['_getNextColor']()};_0x35a228['name']=h(this['_locale'],_0x35a228['name']);const _0x3d4645=new P(_0x35a228);return this['users']['add'](_0x3d4645),_0x3d4645;}['getUser'](_0x5a885a){return this['users']['get'](_0x5a885a);}['useAnonymousUser'](){const _0x3ceb10=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x3ceb10);}['defineMe'](_0x23cd06){if(this['_myId'])throw new _0x76ba49('users-me-already-defined',null);const _0x2f0689=this['getUser'](_0x23cd06);if(!_0x2f0689)throw new _0x76ba49('users-me-missing-user',null);this['_myId']=_0x23cd06,_0x2f0689['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x1875b2=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x1875b2&&(this['_lastColor']=0x0),new c(this['_lastColor']++);}['_addAnonymousUser'](){const _0x40e396=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x40e396,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x31d48c){this['id']=_0x31d48c['id'],this['color']=_0x31d48c['color'],this['name']=_0x31d48c['name'],this['avatar']=_0x31d48c['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x5393e3=this['name']['split']('\x20');return 0x1===_0x5393e3['length']?this['_getInitial'](_0x5393e3[0x0]):this['_getInitial'](_0x5393e3[0x0])+this['_getInitial'](_0x5393e3[_0x5393e3['length']-0x1]);}['_getInitial'](_0x3d4075){return _0x3d4075['charAt'](0x0)['toUpperCase']();}}function h(_0x4c0212,_0x5436d6=''){return''==(_0x5436d6=_0x5436d6['trim']())?o(_0x4c0212,'Anonymous'):_0x5436d6;}class c{['_id'];constructor(_0x559246){this['_id']=_0x559246;}['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 _0x3af50a{['name'];['notificationView'];constructor(_0xdd774d,_0x12c974,_0x224dd8){super(_0xdd774d),this['name']=_0x12c974['name'],this['notificationView']=null;const _0x1d7208=['ck','ck-user'],_0x219b46=['ck','ck-user__img'];if(_0x12c974['isAnonymous']&&_0x219b46['push']('ck-user__anonymous'),!_0x12c974['isAnonymous']&&_0x12c974['isMe']&&_0x1d7208['push']('ck-user_me'),_0x12c974['avatar']&&_0x219b46['push']('ck-user__avatar'),_0x224dd8){const _0x3165eb=new _0x2cb3f0();_0x3165eb['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x3165eb['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':_0x224dd8},'children':[_0x3165eb]};}const _0x4c2e0d=[{'tag':'div','attributes':{'class':_0x219b46,'style':{'background-image':_0x12c974['avatar']?'url(\x27'+_0x12c974['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x12c974['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x12c974['name']},'children':[{'text':_0x12c974['initials']}]}];this['notificationView']&&_0x4c2e0d['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x1d7208,'data-user-id':_0x12c974['id']},'children':_0x4c2e0d});}}class G extends _0x3af50a{['id'];constructor(_0x42d4f1,_0x43e799){super(_0x42d4f1),this['id']='ck-aria-description-'+_0x57bfd8(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x43e799}]});}}class U extends _0x49c6f4{['render'](){super['render'](),V(this);}}class Y extends _0x2d1f93{['render'](){super['render'](),V(this);}}function V(_0x17ca40){_0x17ca40['listenTo'](_0x17ca40['element'],'mousedown',(_0xf6dd05,_0x1b25d4)=>{_0x1b25d4['stopPropagation'](),_0x1b25d4['preventDefault']();}),_0x17ca40['listenTo'](_0x17ca40['element'],'mouseup',()=>{_0x17ca40['element']['focus']();});}function E(_0x5321d2={}){if(void 0x0!==_0x5321d2['dateTimeFormat']&&'function'!=typeof _0x5321d2['dateTimeFormat'])throw new _0x76ba49('invalid-date-time-format');return _0x3d0dcd=>{const _0x271056='string'==typeof _0x3d0dcd?_0x2201d8(_0x3d0dcd):_0x3d0dcd,_0x9c8523=new Date(),_0x303c45=_0xba169d(_0x9c8523,_0x271056);return _0x5321d2['dateTimeFormat']?_0x5321d2['dateTimeFormat'](_0x271056):_0x2ed73c(_0x271056,0x0===_0x303c45?'\x27Today\x27\x20hh:mma':0x1===_0x303c45?'\x27Yesterday\x27\x20hh:mma':_0x303c45<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x57c5dc,_0x19db3d){const _0x2c458e=_0x57c5dc['mapper']['markerNameToElements'](_0x19db3d['name']);if(!_0x2c458e)return null;const _0x4ddda7=_0x5ec4ac(_0x2c458e['values']());return _0x57c5dc['view']['domConverter']['mapViewToDom'](_0x4ddda7)||null;}function R(_0x211227,_0x5f5cd7){if(0x0===_0x5f5cd7['length'])return null;const _0x45bf53=[],_0x1b5c3d=_0x211227['view']['domConverter'];for(const _0x29fb62 of _0x5f5cd7){const _0x28ff99=_0x211227['mapper']['markerNameToElements'](_0x29fb62['name']);if(!_0x28ff99)continue;const _0x2f288a=Array['from'](_0x28ff99)['map'](_0x3655b1=>_0x1b5c3d['mapViewToDom'](_0x3655b1))['filter'](_0x2f348a=>!!_0x2f348a);_0x45bf53['push'](..._0x2f288a);}if(0x0===_0x45bf53['length'])return null;const _0x146e66=[];for(const _0x3c9e26 of _0x45bf53){const _0x627e5=_0x3c9e26['getClientRects']()['item'](0x0);_0x627e5&&_0x146e66['push']({'x':_0x627e5['x'],'y':_0x627e5['y'],'domElement':_0x3c9e26});}return 0x0===_0x146e66['length']?null:(_0x146e66['sort']((_0x3eb371,_0x385ca5)=>_0x3eb371['y']-_0x385ca5['y']||_0x3eb371['x']-_0x385ca5['x']),_0x146e66['map'](_0x47abcb=>_0x47abcb['domElement']));}function Z(_0x3679b8,{limit:_0x4bb858,suffix:_0x32ce5b='...'}){const _0x550e03=[];let _0x366869=0x0;const _0x244c90=_0x3679b8['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x5661af=0x0;_0x5661af<_0x244c90['length'];_0x5661af++){let _0x17e99e=_0x244c90[_0x5661af];const _0x378f37=$(_0x17e99e);if(_0x17e99e['startsWith']('<')){if(_0x366869>=_0x4bb858){const _0x79e71d=_0x17e99e['match'](/[a-zA-Z]+/);if(!_0x79e71d){_0x244c90[_0x5661af]='';continue;}const _0x3ddcd5=_0x79e71d[0x0];_0x17e99e['startsWith']('</')?(_0x550e03['length']&&(_0x17e99e=''),_0x550e03['pop']()):(_0x550e03['push'](_0x3ddcd5),_0x17e99e='');}}else{if(_0x366869>=_0x4bb858)_0x17e99e='';else{if(_0x366869+_0x378f37['length']>=_0x4bb858){let _0xdabc59=_0x4bb858-_0x366869;if('\x20'===_0x378f37[_0xdabc59-0x1])_0xdabc59--;else{const _0x34e21f=_0x378f37['slice'](_0xdabc59)['indexOf']('\x20');-0x1!==_0x34e21f?_0xdabc59+=_0x34e21f:_0xdabc59=_0x17e99e['length'];}_0x17e99e=_0x378f37['slice'](0x0,_0xdabc59)['join']('')+_0x32ce5b,_0x366869=_0x4bb858;}else _0x366869+=_0x378f37['length'];}}_0x244c90[_0x5661af]=_0x17e99e;}return _0x244c90['join']('\x0a')['replace'](/\n/g,'');}function $(_0xa86284){const _0x37c41e=[];for(let _0x14f5a0=0x0;_0x14f5a0<_0xa86284['length'];_0x14f5a0++){const _0x51c937=_0xa86284['substring'](_0x14f5a0)['match'](/^&[a-z0-9#]+;/);if(_0x51c937){const _0x417c47=_0x51c937[0x0];_0x37c41e['push'](_0x417c47),_0x14f5a0+=_0x417c47['length']-0x1;}else _0x37c41e['push'](_0xa86284[_0x14f5a0]);}return _0x37c41e;}class m extends _0x3af50a{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x4bbe07){super(_0x4bbe07);const _0x14266b=this['bindTemplate'];this['set']('message',o(_0x4bbe07,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x4bbe07,o(_0x4bbe07,'Yes'),_0x199b84['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x4bbe07,o(_0x4bbe07,'No'),_0x199b84['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x39aeeb(),this['keystrokes']=new _0x185c3c(),this['focusCycler']=new _0x111768({'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':_0x14266b['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'](_0x5d6828,_0x4e295e,_0x23033c,_0x4c47c0){const _0x5f5b3a=new _0x49c6f4(_0x5d6828);return _0x5f5b3a['label']=_0x4e295e,_0x5f5b3a['icon']=_0x23033c,_0x5f5b3a['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0x4c47c0}}),_0x5f5b3a['on']('execute',()=>this['fire'](_0x4c47c0)),_0x5f5b3a;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x15813e=>{this['keystrokes']['listenTo'](_0x15813e['element']),this['focusTracker']['add'](_0x15813e['element']);}),this['keystrokes']['set']('esc',(_0x2420d8,_0x5ee155)=>{this['fire']('cancel'),_0x5ee155();});}}function f(_0x20b6fa){return class extends _0x20b6fa{['showConfirm'](_0x2f41bb,_0x367495){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x2f41bb,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x367495['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x2dd432=>this['confirmView']['on']('submit',_0x2dd432));}['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(_0xd55be9){let _0x345c72=0x0,_0x1e4dd4=0x0;for(const _0x350ca7 of q(_0xd55be9))_0x345c72=(_0x345c72<<0x5)-_0x345c72+_0x350ca7,_0x345c72|=0x0,[_0x345c72,_0x1e4dd4]=[_0x1e4dd4,_0x345c72];return z(_0x345c72)+z(_0x1e4dd4);}function*O(_0x573d9a){null==_0x573d9a||null==_0x573d9a?yield 0x12b9b0a1:0x0===_0x573d9a||!0x1===_0x573d9a?yield 0x0:0x1===_0x573d9a||0x1==_0x573d9a?yield 0x1:Array['isArray'](_0x573d9a)?yield*function*(_0x442878){for(const _0x51cc3c of _0x442878)yield*O(_0x51cc3c);}(_0x573d9a):'object'==typeof _0x573d9a?yield*q(_0x573d9a):'string'==typeof _0x573d9a?yield*v(_0x573d9a):'number'==typeof _0x573d9a&&(yield _0x573d9a);}function*q(_0x190d75){if(yield w('{'),_0x190d75){const _0x4194b0=Object['keys'](_0x190d75)['sort']();for(const _0x2f956d of _0x4194b0){yield*v(_0x2f956d),yield w(':');const _0x517dd3=_0x190d75[_0x2f956d];yield*O(_0x517dd3);}}yield w('}');}function*v(_0x3a3fe7){yield w('\x22');for(const _0x44428d of _0x3a3fe7)yield w(_0x44428d);yield w('\x22');}function w(_0x28518c){return _0x28518c['charCodeAt'](0x0);}function z(_0x457b83){return(_0x457b83*=Math['sign'](_0x457b83))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x4187d8,_0x23e3a4,_0x411fd8,_0x55880c=[]){const _0x2ae9fa='string'==typeof _0x4187d8?_0x411fd8['get'](_0x4187d8)['constructor']:_0x4187d8['prototype']['constructor'];if(_0x23e3a4['has'](_0x2ae9fa))return _0x23e3a4['get'](_0x2ae9fa);_0x23e3a4['set'](_0x2ae9fa,!0x0);const _0x531694=[...D,..._0x55880c]['map'](_0x4d84d1=>{if(_0x411fd8['has'](_0x4d84d1))return _0x411fd8['get'](_0x4d84d1)['constructor'];})['filter'](_0x157a78=>_0x157a78);if(_0x2ae9fa&&_0x531694['includes'](_0x2ae9fa))return _0x23e3a4['set'](_0x2ae9fa,!0x1),!0x1;if(!_0x2ae9fa['requires'])return _0x23e3a4['set'](_0x2ae9fa,!0x0),!0x0;const _0x5b18a5=_0x2ae9fa['requires']['every'](_0x275adb=>S(_0x275adb,_0x23e3a4,_0x411fd8,_0x55880c));return _0x23e3a4['set'](_0x2ae9fa,_0x5b18a5),_0x5b18a5;}function C(_0x571b0c,_0x35bb18){const _0x21bc45={};for(const _0x2a93e3 of _0x571b0c['config']['names']())W['includes'](_0x2a93e3)||(_0x21bc45[_0x2a93e3]=_0x571b0c['config']['get'](_0x2a93e3));const _0x539071=_0x21bc45['plugins']||[],_0x51f117=_0x571b0c['constructor']['builtinPlugins']||[],_0x4f9d12=_0x539071['length']?_0x539071:_0x51f117,_0x2853ee=_0x21bc45['extraPlugins']||[];delete _0x21bc45['extraPlugins'];const _0x318aae=_0x21bc45['removePlugins']||[];delete _0x21bc45['removePlugins'];const _0x143365=_0x571b0c['_context']['config']['get']('plugins')||[],_0x81cea0=_0x4f9d12['concat'](_0x2853ee)['concat'](_0x143365)['map'](_0x4683ae=>'string'==typeof _0x4683ae?_0x51f117['find'](_0x34bec6=>_0x34bec6['pluginName']==_0x4683ae):_0x4683ae)['filter'](_0x542d35=>!_0x318aae['includes'](_0x542d35)&&!_0x318aae['includes'](_0x542d35['pluginName'])),_0x5e6974=Array['from'](new Set(_0x81cea0)),_0x35b51b=new Map();return _0x21bc45['plugins']=_0x5e6974['filter'](_0x2600b7=>S(_0x2600b7,_0x35b51b,_0x571b0c['plugins'],_0x35bb18)),_0x21bc45;}function B(_0x2e25c7,_0x557a34){const _0x324512=[];_0x2e25c7['document']['selection']['on']('change:range',()=>{const _0x309b4f=function(_0x29055a,_0x4caac7){const _0x9ab45a=[];for(const _0x1364d0 of _0x29055a['markers']){const _0x307b2e=_0x1364d0['getRange']();(_0x307b2e['containsPosition'](_0x4caac7)||_0x307b2e['start']['isEqual'](_0x4caac7)||_0x307b2e['end']['isEqual'](_0x4caac7))&&_0x9ab45a['push'](_0x1364d0);}return _0x9ab45a;}(_0x2e25c7,_0x2e25c7['document']['selection']['focus']),_0x2a4b40=[],_0x431e4c=[],_0x4b99ee=[];for(const _0x2b56aa of _0x324512)_0x309b4f['includes'](_0x2b56aa)||_0x2a4b40['push'](_0x2b56aa);for(const _0x14bc6c of _0x309b4f)_0x324512['includes'](_0x14bc6c)||_0x431e4c['push'](_0x14bc6c),_0x4b99ee['push'](_0x14bc6c);(_0x2a4b40['length']||_0x431e4c['length'])&&_0x557a34({'left':_0x2a4b40,'entered':_0x431e4c}),_0x324512['length']=0x0,_0x324512['push'](..._0x4b99ee);});}const Q='Ctrl+Shift+E';function T(_0x6aa13b,_0x4038c5){const _0x1ecf13=_0x6aa13b['element'];_0x6aa13b['keystrokes']['listenTo'](_0x1ecf13);for(const _0x3d7edd of _0x4038c5)K(_0x6aa13b,_0x3d7edd);_0x4038c5['on']('change',(_0x2a2d35,_0x3a3ad6)=>{for(const _0x2ba956 of _0x3a3ad6['removed'])_(_0x6aa13b,_0x2ba956);for(const _0x19f459 of Array['from'](_0x3a3ad6['added'])['reverse']())K(_0x6aa13b,_0x19f459);}),_0x6aa13b['keystrokes']['set']('enter',(_0x373228,_0x45e061)=>{_0x1ecf13===_0x373228['target']&&(_0x6aa13b['focusCycler']['focusFirst'](),_0x45e061());},{'filter':_0x52e9f4=>_0x52e9f4['target']===_0x1ecf13}),_0x6aa13b['keystrokes']['set']('esc',(_0x47b8b7,_0xe05ec5)=>{_0x1ecf13!==_0x47b8b7['target']?_0x6aa13b['focus']():_0x6aa13b['fire']('escape'),_0xe05ec5();}),_0x6aa13b['keystrokes']['set']('arrowdown',(_0x171add,_0x1c46e7)=>{_0x1ecf13===_0x171add['target']&&(_0x6aa13b['fire']('arrowdown'),_0x1c46e7());}),_0x6aa13b['keystrokes']['set']('arrowup',(_0x21711f,_0x268891)=>{_0x1ecf13===_0x21711f['target']&&(_0x6aa13b['fire']('arrowup'),_0x268891());});}function K(_0x1509e8,_0x46cbbb){_0x46cbbb['isRendered']&&(_0x1509e8['focusTracker']['add'](_0x46cbbb['element']),_0x1509e8['keystrokes']['listenTo'](_0x46cbbb['element']),_0x3b0111(_0x46cbbb)&&function(_0x44c820,_0x3b0b0a){const _0x2a0bdb=_0x44c820['actions'],_0x1db2f5=_0x3b0b0a['actions'];for(const _0x3dc6eb of Object['keys'](_0x2a0bdb))if(_0x3dc6eb in _0x1db2f5&&_0x2a0bdb[_0x3dc6eb]!==_0x1db2f5[_0x3dc6eb])return!0x1;return!0x0;}(_0x1509e8['focusCycler'],_0x46cbbb['focusCycler'])&&_0x1509e8['focusCycler']['chain'](_0x46cbbb['focusCycler']));}function _(_0x478da8,_0x306b45){_0x478da8['focusTracker']['remove'](_0x306b45['element']),_0x478da8['keystrokes']['stopListening'](_0x306b45['element']),_0x3b0111(_0x306b45)&&_0x478da8['focusCycler']['unchain'](_0x306b45['focusCycler']);}export{G as AriaDescriptionView,f as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,J as UserView,u 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 _0x302c65,Editor as _0x24427a,icons as _0x498a59}from'@ckeditor/ckeditor5-core/dist/index.js';import{CKEditorError as _0x36d767,Collection as _0x292c29,uid as _0x305f78,first as _0x112ec3,FocusTracker as _0x27f945,KeystrokeHandler as _0x4f11b9}from'@ckeditor/ckeditor5-utils/dist/index.js';import{View as _0x2475dd,IconView as _0x4985eb,ButtonView as _0x2a4c8f,DropdownButtonView as _0x3ef2bc,FocusCycler as _0x5e0d87,isViewWithFocusCycler as _0x41deb7}from'@ckeditor/ckeditor5-ui/dist/index.js';import _0x528bca from'date-fns/format/index.js';import _0x249290 from'date-fns/parseISO/index.js';import _0x276e18 from'date-fns/differenceInCalendarDays/index.js';class n extends _0x302c65{static get['pluginName'](){return'Permissions';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}['setPermissions'](_0x18a160,_0x250974){let _0x240d06;if(_0x250974||(_0x250974=this['context']['config']['get']('collaboration.channelId')),this['context']['config']['get']('collaboration.channelId')==_0x250974?_0x240d06=this['context']:'editors'in this['context']&&this['context']['editors']&&(_0x240d06=this['context']['editors']['find'](_0x33cef7=>_0x33cef7['config']['get']('collaboration.channelId')==_0x250974)),!_0x240d06)throw new _0x36d767('permissions-set-permissions-invalid-channel-id',null);const _0x9862e8=_0x240d06['plugins'],_0x3ff18e=_0x9862e8['has']('CommentsRepository')?_0x9862e8['get']('CommentsRepository'):void 0x0,_0x25d092=_0x9862e8['has']('CommentsOnly')&&_0x9862e8['get']('CommentsOnly'),_0x4bc24f=_0x18a160['includes']('document:write'),_0x3ba533=_0x18a160['includes']('comment:modify_all'),_0x5c1aec=_0x18a160['includes']('comment:admin'),_0x48dc03=_0x18a160['includes']('comment:write'),_0xb5c23=_0x48dc03||_0x5c1aec,_0x34ef72=_0xb5c23||_0x3ba533,_0x4cf6af=_0x4bc24f||_0xb5c23;(_0x25d092&&(_0x25d092['isEnabled']=!_0x4bc24f&&_0x34ef72),_0x240d06 instanceof _0x24427a)&&(!(_0x4bc24f||_0x34ef72&&_0x3ff18e)?_0x240d06['enableReadOnlyMode']('no-permissions'):_0x240d06['disableReadOnlyMode']('no-permissions'));if(_0x3ff18e){_0x3ff18e['setPermissions']({'admin':_0x5c1aec,'modifyAll':_0x3ba533,'write':_0x48dc03,'resolve':_0x4cf6af},_0x250974);const _0x22c685=_0x240d06 instanceof _0x24427a&&_0x240d06['commands']['get']('addCommentThread');_0x22c685&&(_0xb5c23?_0x22c685['clearForceDisabled']('noPermissions'):_0x22c685['forceDisabled']('noPermissions'));}}}function o(_0x41e929,_0xa35a26){const t=_0x41e929['t'];switch(_0xa35a26){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 u extends _0x302c65{['users'];['_lastColor'];['_myId'];['_locale'];static get['pluginName'](){return'Users';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[n];}constructor(_0x52cc17){super(_0x52cc17),this['context']['config']['define']('users.anonymousUserId','anonymous-user'),this['context']['config']['define']('users.colorsCount',0x8),this['users']=new _0x292c29(),this['_locale']=_0x52cc17['locale'],this['_lastColor']=0x0,this['_myId']=null,this['decorate']('getOperationAuthor');}['init'](){this['_addAnonymousUser']();}get['me'](){return null==this['_myId']?null:this['getUser'](this['_myId']);}['addUser']({id:_0x4fae27,name:_0x18b1c2,..._0x2b2bde}){if(!_0x4fae27||'string'!=typeof _0x4fae27)throw new _0x36d767('users-add-invalid-id');if(this['users']['has'](_0x4fae27))throw new _0x36d767('users-add-duplicated-id',null,{'id':_0x4fae27});const _0x31bc50={..._0x2b2bde,'id':_0x4fae27,'name':h(this['_locale'],_0x18b1c2),'color':this['_getNextColor']()};_0x31bc50['name']=h(this['_locale'],_0x31bc50['name']);const _0x396dd4=new P(_0x31bc50);return this['users']['add'](_0x396dd4),_0x396dd4;}['getUser'](_0x4291de){return this['users']['get'](_0x4291de);}['useAnonymousUser'](){const _0x67a065=this['context']['config']['get']('users.anonymousUserId');this['_myId']||this['defineMe'](_0x67a065);}['defineMe'](_0x58a381){if(this['_myId'])throw new _0x36d767('users-me-already-defined',null);const _0x5374ce=this['getUser'](_0x58a381);if(!_0x5374ce)throw new _0x36d767('users-me-missing-user',null);this['_myId']=_0x58a381,_0x5374ce['_isMe']=!0x0;}['getOperationAuthor'](){return this['me'];}['_getNextColor'](){const _0x4f14a5=this['context']['config']['get']('users.colorsCount');return this['_lastColor']>=_0x4f14a5&&(this['_lastColor']=0x0),new c(this['_lastColor']++);}['_addAnonymousUser'](){const _0x319161=this['context']['config']['get']('users.anonymousUserId');this['addUser']({'id':_0x319161,'name':o(this['_locale'],'Anonymous')})['_isAnonymous']=!0x0;}}class P{['id'];['color'];['name'];['avatar'];['_isMe'];['_isAnonymous'];constructor(_0x2aba2b){this['id']=_0x2aba2b['id'],this['color']=_0x2aba2b['color'],this['name']=_0x2aba2b['name'],this['avatar']=_0x2aba2b['avatar'],this['_isAnonymous']=!0x1,this['_isMe']=!0x1;}get['isAnonymous'](){return this['_isAnonymous'];}get['isMe'](){return this['_isMe'];}get['initials'](){const _0x1e692f=this['name']['split']('\x20');return 0x1===_0x1e692f['length']?this['_getInitial'](_0x1e692f[0x0]):this['_getInitial'](_0x1e692f[0x0])+this['_getInitial'](_0x1e692f[_0x1e692f['length']-0x1]);}['_getInitial'](_0x283124){return _0x283124['charAt'](0x0)['toUpperCase']();}}function h(_0x1433bb,_0x4d9e7b=''){return''==(_0x4d9e7b=_0x4d9e7b['trim']())?o(_0x1433bb,'Anonymous'):_0x4d9e7b;}class c{['_id'];constructor(_0x51e494){this['_id']=_0x51e494;}['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 _0x2475dd{['name'];['notificationView'];constructor(_0x251efc,_0x3319bc,_0xc7c375){super(_0x251efc),this['name']=_0x3319bc['name'],this['notificationView']=null;const _0x21f4f1=['ck','ck-user'],_0x2122ca=['ck','ck-user__img'];if(_0x3319bc['isAnonymous']&&_0x2122ca['push']('ck-user__anonymous'),!_0x3319bc['isAnonymous']&&_0x3319bc['isMe']&&_0x21f4f1['push']('ck-user_me'),_0x3319bc['avatar']&&_0x2122ca['push']('ck-user__avatar'),_0xc7c375){const _0x35330d=new _0x4985eb();_0x35330d['extendTemplate']({'attributes':{'class':['ck-user__icon']}}),_0x35330d['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':_0xc7c375},'children':[_0x35330d]};}const _0x30157e=[{'tag':'div','attributes':{'class':_0x2122ca,'style':{'background-image':_0x3319bc['avatar']?'url(\x27'+_0x3319bc['avatar']+'\x27)':''}}},{'tag':'div','attributes':{'class':_0x3319bc['avatar']?'ck\x20ck-user__name\x20ck-user__name--hidden':'ck\x20ck-user__name','aria-label':_0x3319bc['name']},'children':[{'text':_0x3319bc['initials']}]}];this['notificationView']&&_0x30157e['push'](this['notificationView']),this['setTemplate']({'tag':'div','attributes':{'class':_0x21f4f1,'data-user-id':_0x3319bc['id']},'children':_0x30157e});}}class J extends _0x2475dd{['id'];constructor(_0x587cc3,_0x22d38a){super(_0x587cc3),this['id']='ck-aria-description-'+_0x305f78(),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-aria-description'],'id':this['id']},'children':[{'text':_0x22d38a}]});}}class U extends _0x2a4c8f{['render'](){super['render'](),V(this);}}class Y extends _0x3ef2bc{['render'](){super['render'](),V(this);}}function V(_0x5e4057){_0x5e4057['listenTo'](_0x5e4057['element'],'mousedown',(_0x4e2d70,_0x216b33)=>{_0x216b33['stopPropagation'](),_0x216b33['preventDefault']();}),_0x5e4057['listenTo'](_0x5e4057['element'],'mouseup',()=>{_0x5e4057['element']['focus']();});}function E(_0x228619={}){if(void 0x0!==_0x228619['dateTimeFormat']&&'function'!=typeof _0x228619['dateTimeFormat'])throw new _0x36d767('invalid-date-time-format');return _0x41b330=>{const _0x2e56c8='string'==typeof _0x41b330?_0x249290(_0x41b330):_0x41b330,_0x2ce121=new Date(),_0x20f31e=_0x276e18(_0x2ce121,_0x2e56c8);return _0x228619['dateTimeFormat']?_0x228619['dateTimeFormat'](_0x2e56c8):_0x528bca(_0x2e56c8,0x0===_0x20f31e?'\x27Today\x27\x20hh:mma':0x1===_0x20f31e?'\x27Yesterday\x27\x20hh:mma':_0x20f31e<0x7?'\x27Last\x27\x20EEEE\x20hh:mma':'MM-dd-yyyy\x20hh:mma');};}function g(_0x5c049d,_0x5550f5){const _0x175419=_0x5c049d['mapper']['markerNameToElements'](_0x5550f5['name']);if(!_0x175419)return null;const _0x4771cc=_0x112ec3(_0x175419['values']());return _0x5c049d['view']['domConverter']['mapViewToDom'](_0x4771cc)||null;}function R(_0x1ab799,_0x187aed){if(0x0===_0x187aed['length'])return null;const _0x68f457=[],_0x2ee5ae=_0x1ab799['view']['domConverter'];for(const _0x8d0b2d of _0x187aed){const _0x47394a=_0x1ab799['mapper']['markerNameToElements'](_0x8d0b2d['name']);if(!_0x47394a)continue;const _0x287d9e=Array['from'](_0x47394a)['map'](_0x328095=>_0x2ee5ae['mapViewToDom'](_0x328095))['filter'](_0x4655dc=>!!_0x4655dc);_0x68f457['push'](..._0x287d9e);}if(0x0===_0x68f457['length'])return null;const _0x574407=[];for(const _0x13e500 of _0x68f457){const _0x24b55b=_0x13e500['getClientRects']()['item'](0x0);_0x24b55b&&_0x574407['push']({'x':_0x24b55b['x'],'y':_0x24b55b['y'],'domElement':_0x13e500});}return 0x0===_0x574407['length']?null:(_0x574407['sort']((_0x208b97,_0x45181b)=>_0x208b97['y']-_0x45181b['y']||_0x208b97['x']-_0x45181b['x']),_0x574407['map'](_0xaa37a7=>_0xaa37a7['domElement']));}function Z(_0x5ce6df,{limit:_0x113ae4,suffix:_0x4f7fe5='...'}){const _0x2b6d81=[];let _0x2cf521=0x0;const _0x597ca9=_0x5ce6df['replace'](/</g,'\x0a<')['replace'](/>/g,'>\x0a')['replace'](/^\n/g,'')['replace'](/\n$/g,'')['split']('\x0a');for(let _0x66bd15=0x0;_0x66bd15<_0x597ca9['length'];_0x66bd15++){let _0x361aaa=_0x597ca9[_0x66bd15];const _0x57d599=$(_0x361aaa);if(_0x361aaa['startsWith']('<')){if(_0x2cf521>=_0x113ae4){const _0x431787=_0x361aaa['match'](/[a-zA-Z]+/);if(!_0x431787){_0x597ca9[_0x66bd15]='';continue;}const _0xec2797=_0x431787[0x0];_0x361aaa['startsWith']('</')?(_0x2b6d81['length']&&(_0x361aaa=''),_0x2b6d81['pop']()):(_0x2b6d81['push'](_0xec2797),_0x361aaa='');}}else{if(_0x2cf521>=_0x113ae4)_0x361aaa='';else{if(_0x2cf521+_0x57d599['length']>=_0x113ae4){let _0x290a34=_0x113ae4-_0x2cf521;if('\x20'===_0x57d599[_0x290a34-0x1])_0x290a34--;else{const _0x3e18d3=_0x57d599['slice'](_0x290a34)['indexOf']('\x20');-0x1!==_0x3e18d3?_0x290a34+=_0x3e18d3:_0x290a34=_0x361aaa['length'];}_0x361aaa=_0x57d599['slice'](0x0,_0x290a34)['join']('')+_0x4f7fe5,_0x2cf521=_0x113ae4;}else _0x2cf521+=_0x57d599['length'];}}_0x597ca9[_0x66bd15]=_0x361aaa;}return _0x597ca9['join']('\x0a')['replace'](/\n/g,'');}function $(_0x41a5d2){const _0x5a4cf5=[];for(let _0x70fc49=0x0;_0x70fc49<_0x41a5d2['length'];_0x70fc49++){const _0x5f5248=_0x41a5d2['substring'](_0x70fc49)['match'](/^&[a-z0-9#]+;/);if(_0x5f5248){const _0x1c1d3d=_0x5f5248[0x0];_0x5a4cf5['push'](_0x1c1d3d),_0x70fc49+=_0x1c1d3d['length']-0x1;}else _0x5a4cf5['push'](_0x41a5d2[_0x70fc49]);}return _0x5a4cf5;}class m extends _0x2475dd{['submitView'];['cancelView'];['focusTracker'];['keystrokes'];['focusCycler'];['focusables'];constructor(_0x2f47bd){super(_0x2f47bd);const _0x5918b4=this['bindTemplate'];this['set']('message',o(_0x2f47bd,'Are\x20you\x20sure?')),this['submitView']=this['_createButtonView'](_0x2f47bd,o(_0x2f47bd,'Yes'),_0x498a59['check'],'submit'),this['cancelView']=this['_createButtonView'](_0x2f47bd,o(_0x2f47bd,'No'),_0x498a59['cancel'],'cancel'),this['focusables']=this['createCollection']([this['submitView'],this['cancelView']]),this['focusTracker']=new _0x27f945(),this['keystrokes']=new _0x4f11b9(),this['focusCycler']=new _0x5e0d87({'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':_0x5918b4['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'](_0x25751d,_0x463b4b,_0x6e9d9b,_0xeee440){const _0x420662=new _0x2a4c8f(_0x25751d);return _0x420662['label']=_0x463b4b,_0x420662['icon']=_0x6e9d9b,_0x420662['extendTemplate']({'attributes':{'class':'ck-thread__remove-confirm-'+_0xeee440}}),_0x420662['on']('execute',()=>this['fire'](_0xeee440)),_0x420662;}['_setupKeyboardNavigation'](){this['focusables']['forEach'](_0x23024c=>{this['keystrokes']['listenTo'](_0x23024c['element']),this['focusTracker']['add'](_0x23024c['element']);}),this['keystrokes']['set']('esc',(_0x525448,_0x5abe74)=>{this['fire']('cancel'),_0x5abe74();});}}function f(_0x22c2b6){return class extends _0x22c2b6{['showConfirm'](_0x29bc1d,_0x502657){return this['confirmView']=new m(this['locale']),this['confirmView']['render'](),this['confirmView']['message']=_0x29bc1d,this['confirmView']['once']('cancel',()=>{this['_removeConfirm']();}),this['confirmView']['once']('submit',()=>{this['_removeConfirm']();}),_0x502657['appendChild'](this['confirmView']['element']),this['registerChild'](this['confirmView']),this['confirmView']['focus'](),this['set']('isConfirm',!0x0),new Promise(_0x47c28a=>this['confirmView']['on']('submit',_0x47c28a));}['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(_0x1cda9f){let _0xbb4173=0x0,_0x57792b=0x0;for(const _0x2d4a0f of q(_0x1cda9f))_0xbb4173=(_0xbb4173<<0x5)-_0xbb4173+_0x2d4a0f,_0xbb4173|=0x0,[_0xbb4173,_0x57792b]=[_0x57792b,_0xbb4173];return z(_0xbb4173)+z(_0x57792b);}function*O(_0x57d68f){null==_0x57d68f||null==_0x57d68f?yield 0x12b9b0a1:0x0===_0x57d68f||!0x1===_0x57d68f?yield 0x0:0x1===_0x57d68f||0x1==_0x57d68f?yield 0x1:Array['isArray'](_0x57d68f)?yield*function*(_0x2b538f){for(const _0x101e6c of _0x2b538f)yield*O(_0x101e6c);}(_0x57d68f):'object'==typeof _0x57d68f?yield*q(_0x57d68f):'string'==typeof _0x57d68f?yield*v(_0x57d68f):'number'==typeof _0x57d68f&&(yield _0x57d68f);}function*q(_0x396184){if(yield w('{'),_0x396184){const _0x1f8a92=Object['keys'](_0x396184)['sort']();for(const _0x5b8de0 of _0x1f8a92){yield*v(_0x5b8de0),yield w(':');const _0x1e8c1d=_0x396184[_0x5b8de0];yield*O(_0x1e8c1d);}}yield w('}');}function*v(_0x2dc41e){yield w('\x22');for(const _0xaa83ab of _0x2dc41e)yield w(_0xaa83ab);yield w('\x22');}function w(_0x17dedf){return _0x17dedf['charCodeAt'](0x0);}function z(_0x331e3b){return(_0x331e3b*=Math['sign'](_0x331e3b))['toString'](0x24);}const W=['initialData','context','toolbar','rootsAttributes'],D=['WebSocketGateway','RevisionTracker','Autosave','WordCount','DocumentOutline','WProofreader'];function S(_0x7d241a,_0x51a061,_0x28f2a2,_0x2ae3fb=[]){const _0x51fc72='string'==typeof _0x7d241a?_0x28f2a2['get'](_0x7d241a)['constructor']:_0x7d241a['prototype']['constructor'];if(_0x51a061['has'](_0x51fc72))return _0x51a061['get'](_0x51fc72);_0x51a061['set'](_0x51fc72,!0x0);const _0x3a4482=[...D,..._0x2ae3fb]['map'](_0x41fa85=>{if(_0x28f2a2['has'](_0x41fa85))return _0x28f2a2['get'](_0x41fa85)['constructor'];})['filter'](_0x579ca6=>_0x579ca6);if(_0x51fc72&&_0x3a4482['includes'](_0x51fc72))return _0x51a061['set'](_0x51fc72,!0x1),!0x1;if(!_0x51fc72['requires'])return _0x51a061['set'](_0x51fc72,!0x0),!0x0;const _0x1da6f4=_0x51fc72['requires']['every'](_0x8f10a5=>S(_0x8f10a5,_0x51a061,_0x28f2a2,_0x2ae3fb));return _0x51a061['set'](_0x51fc72,_0x1da6f4),_0x1da6f4;}function C(_0x269bab,_0x5ef6b6){const _0x4feaa5={};for(const _0x51e508 of _0x269bab['config']['names']())W['includes'](_0x51e508)||(_0x4feaa5[_0x51e508]=_0x269bab['config']['get'](_0x51e508));const _0x4d4ec9=_0x4feaa5['plugins']||[],_0x32b249=_0x269bab['constructor']['builtinPlugins']||[],_0x17fac1=_0x4d4ec9['length']?_0x4d4ec9:_0x32b249,_0x2549da=_0x4feaa5['extraPlugins']||[];delete _0x4feaa5['extraPlugins'];const _0x3c5e25=_0x4feaa5['removePlugins']||[];delete _0x4feaa5['removePlugins'];const _0x513ee0=_0x269bab['_context']['config']['get']('plugins')||[],_0x37bf3a=_0x17fac1['concat'](_0x2549da)['concat'](_0x513ee0)['map'](_0xd2e02e=>'string'==typeof _0xd2e02e?_0x32b249['find'](_0xfbe8de=>_0xfbe8de['pluginName']==_0xd2e02e):_0xd2e02e)['filter'](_0x4a0c40=>!_0x3c5e25['includes'](_0x4a0c40)&&!_0x3c5e25['includes'](_0x4a0c40['pluginName'])),_0x188b7d=Array['from'](new Set(_0x37bf3a)),_0x57a551=new Map();return _0x4feaa5['plugins']=_0x188b7d['filter'](_0x268f73=>S(_0x268f73,_0x57a551,_0x269bab['plugins'],_0x5ef6b6)),_0x4feaa5;}function B(_0x3e8189,_0x1f9c0f){const _0x42583f=[];_0x3e8189['document']['selection']['on']('change:range',()=>{const _0x23932e=function(_0x34a6d7,_0x38f7cc){const _0x512e82=[];for(const _0x2d41cd of _0x34a6d7['markers']){const _0x346e81=_0x2d41cd['getRange']();(_0x346e81['containsPosition'](_0x38f7cc)||_0x346e81['start']['isEqual'](_0x38f7cc)||_0x346e81['end']['isEqual'](_0x38f7cc))&&_0x512e82['push'](_0x2d41cd);}return _0x512e82;}(_0x3e8189,_0x3e8189['document']['selection']['focus']),_0x5c1ad5=[],_0x5c9ed9=[],_0x46dd5b=[];for(const _0x855dc of _0x42583f)_0x23932e['includes'](_0x855dc)||_0x5c1ad5['push'](_0x855dc);for(const _0x3813ff of _0x23932e)_0x42583f['includes'](_0x3813ff)||_0x5c9ed9['push'](_0x3813ff),_0x46dd5b['push'](_0x3813ff);(_0x5c1ad5['length']||_0x5c9ed9['length'])&&_0x1f9c0f({'left':_0x5c1ad5,'entered':_0x5c9ed9}),_0x42583f['length']=0x0,_0x42583f['push'](..._0x46dd5b);});}const Q='Ctrl+Shift+E';function T(_0xcbcb82,_0x22dfb8){const _0x446a25=_0xcbcb82['element'];_0xcbcb82['keystrokes']['listenTo'](_0x446a25);for(const _0x582435 of _0x22dfb8)K(_0xcbcb82,_0x582435);_0x22dfb8['on']('change',(_0x321a56,_0x5e602)=>{for(const _0x5a4a89 of _0x5e602['removed'])_(_0xcbcb82,_0x5a4a89);for(const _0x44d4d7 of Array['from'](_0x5e602['added'])['reverse']())K(_0xcbcb82,_0x44d4d7);}),_0xcbcb82['keystrokes']['set']('enter',(_0x3984a2,_0x5dfd0f)=>{_0x446a25===_0x3984a2['target']&&(_0xcbcb82['focusCycler']['focusFirst'](),_0x5dfd0f());},{'filter':_0x469179=>_0x469179['target']===_0x446a25}),_0xcbcb82['keystrokes']['set']('esc',(_0x549f74,_0x361472)=>{_0x446a25!==_0x549f74['target']?_0xcbcb82['focus']():_0xcbcb82['fire']('escape'),_0x361472();}),_0xcbcb82['keystrokes']['set']('arrowdown',(_0x2cb1a3,_0x207aee)=>{_0x446a25===_0x2cb1a3['target']&&(_0xcbcb82['fire']('arrowdown'),_0x207aee());}),_0xcbcb82['keystrokes']['set']('arrowup',(_0x335fd8,_0x5dfbad)=>{_0x446a25===_0x335fd8['target']&&(_0xcbcb82['fire']('arrowup'),_0x5dfbad());});}function K(_0x26e348,_0x3543ac){_0x3543ac['isRendered']&&(_0x26e348['focusTracker']['add'](_0x3543ac['element']),_0x26e348['keystrokes']['listenTo'](_0x3543ac['element']),_0x41deb7(_0x3543ac)&&function(_0x3156dc,_0x335b2c){const _0x1ebd49=_0x3156dc['actions'],_0x4d34f7=_0x335b2c['actions'];for(const _0x4fd07f of Object['keys'](_0x1ebd49))if(_0x4fd07f in _0x4d34f7&&_0x1ebd49[_0x4fd07f]!==_0x4d34f7[_0x4fd07f])return!0x1;return!0x0;}(_0x26e348['focusCycler'],_0x3543ac['focusCycler'])&&_0x26e348['focusCycler']['chain'](_0x3543ac['focusCycler']));}function _(_0x42faf2,_0x1c924b){_0x42faf2['focusTracker']['remove'](_0x1c924b['element']),_0x42faf2['keystrokes']['stopListening'](_0x1c924b['element']),_0x41deb7(_0x1c924b)&&_0x42faf2['focusCycler']['unchain'](_0x1c924b['focusCycler']);}export{J as AriaDescriptionView,f as ConfirmMixin,Q as FOCUS_ANNOTATION_KEYSTROKE,U as LateFocusButtonView,Y as LateFocusDropdownButtonView,n as Permissions,H as UserView,u 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": "44.1.0-alpha.
|
3
|
+
"version": "44.1.0-alpha.5",
|
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": "44.1.0-alpha.
|
36
|
-
"@ckeditor/ckeditor5-theme-lark": "44.1.0-alpha.
|
37
|
-
"@ckeditor/ckeditor5-ui": "44.1.0-alpha.
|
38
|
-
"@ckeditor/ckeditor5-utils": "44.1.0-alpha.
|
39
|
-
"ckeditor5": "44.1.0-alpha.
|
35
|
+
"@ckeditor/ckeditor5-core": "44.1.0-alpha.5",
|
36
|
+
"@ckeditor/ckeditor5-theme-lark": "44.1.0-alpha.5",
|
37
|
+
"@ckeditor/ckeditor5-ui": "44.1.0-alpha.5",
|
38
|
+
"@ckeditor/ckeditor5-utils": "44.1.0-alpha.5",
|
39
|
+
"ckeditor5": "44.1.0-alpha.5",
|
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 _0x2e68(_0x3c70e7,_0xa5cc98){var _0x46e383=_0x46e3();return _0x2e68=function(_0x2e68e0,_0x1b54f6){_0x2e68e0=_0x2e68e0-0x12b;var _0x1cf963=_0x46e383[_0x2e68e0];return _0x1cf963;},_0x2e68(_0x3c70e7,_0xa5cc98);}(function(_0x2ded06,_0x2d7132){var _0x1f494d=_0x2e68,_0x41bce7=_0x2ded06();while(!![]){try{var _0x33b25f=parseInt(_0x1f494d(0x130))/0x1*(-parseInt(_0x1f494d(0x12e))/0x2)+parseInt(_0x1f494d(0x133))/0x3*(-parseInt(_0x1f494d(0x136))/0x4)+parseInt(_0x1f494d(0x135))/0x5+-parseInt(_0x1f494d(0x12b))/0x6+-parseInt(_0x1f494d(0x12f))/0x7+-parseInt(_0x1f494d(0x131))/0x8+parseInt(_0x1f494d(0x137))/0x9;if(_0x33b25f===_0x2d7132)break;else _0x41bce7['push'](_0x41bce7['shift']());}catch(_0x4a292b){_0x41bce7['push'](_0x41bce7['shift']());}}}(_0x46e3,0xf1307));import{uid as _0x29738c}from'ckeditor5/src/utils.js';function _0x46e3(){var _0x143d28=['8058631JnaBkI','753253PtUyAl','12431192QHWrUQ','setTemplate','15UTIHpa','ck-aria-description','9047035UBzDgF','1043428buwMsQ','42357195CQfuRB','71568VaqIdJ','span','ck-aria-description-','4HroWaH'];_0x46e3=function(){return _0x143d28;};return _0x46e3();}import{View as _0x5f6e9f}from'ckeditor5/src/ui.js';export default class J extends _0x5f6e9f{constructor(_0x5918c5,_0x28da04){var _0x500465=_0x2e68;super(_0x5918c5),this['id']=_0x500465(0x12d)+_0x29738c(),this[_0x500465(0x132)]({'tag':_0x500465(0x12c),'attributes':{'class':['ck',_0x500465(0x134)],'id':this['id']},'children':[{'text':_0x28da04}]});}}
|
@@ -20,4 +20,4 @@
|
|
20
20
|
*
|
21
21
|
*
|
22
22
|
*/
|
23
|
-
(function(
|
23
|
+
(function(_0x5511ae,_0x560f5a){const _0x10510f=_0x453c,_0x352b3d=_0x5511ae();while(!![]){try{const _0x250efc=parseInt(_0x10510f(0xfb))/0x1+parseInt(_0x10510f(0x111))/0x2+-parseInt(_0x10510f(0x10f))/0x3+-parseInt(_0x10510f(0x102))/0x4*(parseInt(_0x10510f(0x119))/0x5)+-parseInt(_0x10510f(0x101))/0x6*(-parseInt(_0x10510f(0x115))/0x7)+parseInt(_0x10510f(0x103))/0x8+parseInt(_0x10510f(0x116))/0x9*(-parseInt(_0x10510f(0x109))/0xa);if(_0x250efc===_0x560f5a)break;else _0x352b3d['push'](_0x352b3d['shift']());}catch(_0x246d6e){_0x352b3d['push'](_0x352b3d['shift']());}}}(_0x3332,0xc5341));function _0x3332(){const _0x366931=['setTemplate','initials','push','84585lwbiVs','notificationView','75844xIByQn','ck-user','div','isAnonymous','90993mmOJWk','2249622QyOkjs','ck\x20ck-user__name','ck-user__img','3065FPAJCt','67000kCEQny','ck-user__notification','ck-user_me','isMe','url(\x27','ck-user__anonymous','738QWGgxW','7088eVdrJP','3746680cVRTcX','extendTemplate','name','ck\x20ck-user__name\x20ck-user__name--hidden','content','ck-user__icon','10OpCGXW','ck-user__avatar','avatar'];_0x3332=function(){return _0x366931;};return _0x3332();}import{View as _0x1237ee,IconView as _0x22975c}from'ckeditor5/src/ui.js';import _0x3839cd from'../../../theme/icons/notification.svg';import'../../../theme/users.css';function _0x453c(_0x1536a3,_0x19a906){const _0x3332dd=_0x3332();return _0x453c=function(_0x453c8d,_0x5d25cc){_0x453c8d=_0x453c8d-0xfb;let _0x441c5a=_0x3332dd[_0x453c8d];return _0x441c5a;},_0x453c(_0x1536a3,_0x19a906);}export default class H extends _0x1237ee{constructor(_0x6f3cd1,_0x318b40,_0x57dfed){const _0x404cb8=_0x453c;super(_0x6f3cd1),this[_0x404cb8(0x105)]=_0x318b40[_0x404cb8(0x105)],this[_0x404cb8(0x110)]=null;const _0x36e45c=['ck',_0x404cb8(0x112)],_0x4de84b=['ck',_0x404cb8(0x118)];if(_0x318b40[_0x404cb8(0x114)]&&_0x4de84b[_0x404cb8(0x10e)](_0x404cb8(0x100)),!_0x318b40[_0x404cb8(0x114)]&&_0x318b40[_0x404cb8(0xfe)]&&_0x36e45c[_0x404cb8(0x10e)](_0x404cb8(0xfd)),_0x318b40[_0x404cb8(0x10b)]&&_0x4de84b[_0x404cb8(0x10e)](_0x404cb8(0x10a)),_0x57dfed){const _0x4f0a10=new _0x22975c();_0x4f0a10[_0x404cb8(0x104)]({'attributes':{'class':[_0x404cb8(0x108)]}}),_0x4f0a10[_0x404cb8(0x107)]=_0x3839cd,this[_0x404cb8(0x110)]={'tag':_0x404cb8(0x113),'attributes':{'class':['ck',_0x404cb8(0xfc)],'data-cke-tooltip-position':'n','data-cke-tooltip-text':_0x57dfed},'children':[_0x4f0a10]};}const _0x3365da=[{'tag':_0x404cb8(0x113),'attributes':{'class':_0x4de84b,'style':{'background-image':_0x318b40[_0x404cb8(0x10b)]?_0x404cb8(0xff)+_0x318b40[_0x404cb8(0x10b)]+'\x27)':''}}},{'tag':_0x404cb8(0x113),'attributes':{'class':_0x318b40[_0x404cb8(0x10b)]?_0x404cb8(0x106):_0x404cb8(0x117),'aria-label':_0x318b40[_0x404cb8(0x105)]},'children':[{'text':_0x318b40[_0x404cb8(0x10d)]}]}];this[_0x404cb8(0x110)]&&_0x3365da[_0x404cb8(0x10e)](this[_0x404cb8(0x110)]),this[_0x404cb8(0x10c)]({'tag':_0x404cb8(0x113),'attributes':{'class':_0x36e45c,'data-user-id':_0x318b40['id']},'children':_0x3365da});}}
|