@ckeditor/ckeditor5-comments 31.1.0 → 34.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +2 -2
- package/README.md +5 -2
- package/build/comments.js +5 -0
- package/build/translations/bs.js +1 -0
- package/build/translations/cs.js +1 -0
- package/build/translations/da.js +1 -0
- package/build/translations/de-ch.js +1 -0
- package/build/translations/de.js +1 -0
- package/build/translations/el.js +1 -0
- package/build/translations/en-au.js +1 -0
- package/build/translations/es.js +1 -0
- package/build/translations/et.js +1 -0
- package/build/translations/fr.js +1 -0
- package/build/translations/gl.js +1 -0
- package/build/translations/hi.js +1 -0
- package/build/translations/hr.js +1 -0
- package/build/translations/hu.js +1 -0
- package/build/translations/id.js +1 -0
- package/build/translations/it.js +1 -0
- package/build/translations/ja.js +1 -0
- package/build/translations/jv.js +1 -0
- package/build/translations/ko.js +1 -0
- package/build/translations/nl.js +1 -0
- package/build/translations/no.js +1 -0
- package/build/translations/pl.js +1 -0
- package/build/translations/pt-br.js +1 -0
- package/build/translations/ro.js +1 -0
- package/build/translations/ru.js +1 -0
- package/build/translations/sk.js +1 -0
- package/build/translations/sr-latn.js +1 -0
- package/build/translations/sr.js +1 -0
- package/build/translations/tk.js +1 -0
- package/build/translations/tr.js +1 -0
- package/build/translations/ug.js +1 -0
- package/build/translations/uk.js +1 -0
- package/build/translations/zh-cn.js +1 -0
- package/build/translations/zh.js +1 -0
- package/lang/contexts.json +0 -3
- package/lang/translations/bs.po +68 -0
- package/lang/translations/cs.po +1 -13
- package/lang/translations/da.po +1 -13
- package/lang/translations/de-ch.po +1 -13
- package/lang/translations/de.po +1 -13
- package/lang/translations/el.po +67 -0
- package/lang/translations/en-au.po +1 -13
- package/lang/translations/en.po +1 -13
- package/lang/translations/es.po +1 -13
- package/lang/translations/et.po +1 -13
- package/lang/translations/fr.po +1 -13
- package/lang/translations/gl.po +1 -13
- package/lang/translations/hi.po +1 -13
- package/lang/translations/hr.po +1 -13
- package/lang/translations/hu.po +1 -13
- package/lang/translations/id.po +1 -13
- package/lang/translations/it.po +1 -13
- package/lang/translations/ja.po +1 -13
- package/lang/translations/jv.po +66 -0
- package/lang/translations/ko.po +1 -13
- package/lang/translations/nl.po +1 -13
- package/lang/translations/no.po +1 -13
- package/lang/translations/pl.po +1 -13
- package/lang/translations/pt-br.po +1 -13
- package/lang/translations/ro.po +1 -13
- package/lang/translations/ru.po +1 -13
- package/lang/translations/sk.po +1 -13
- package/lang/translations/sr-latn.po +1 -13
- package/lang/translations/sr.po +1 -13
- package/lang/translations/tk.po +1 -13
- package/lang/translations/tr.po +1 -13
- package/lang/translations/ug.po +1 -13
- package/lang/translations/uk.po +1 -13
- package/lang/translations/zh-cn.po +1 -13
- package/lang/translations/zh.po +1 -13
- package/package.json +4 -9
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +2 -2
- package/src/annotations/annotations.js +2 -2
- package/src/annotations/annotationsuis.js +2 -2
- package/src/annotations/editorannotations.js +2 -2
- package/src/annotations/inlineannotations.js +2 -2
- package/src/annotations/narrowsidebar.js +2 -2
- package/src/annotations/sidebar.js +2 -2
- package/src/annotations/view/annotationcounterbuttonview.js +2 -2
- package/src/annotations/view/annotationview.js +2 -2
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +2 -2
- package/src/comments/addcommentthreadcommand.js +2 -2
- package/src/comments/commentsediting.js +2 -2
- package/src/comments/commentsrepository.js +2 -2
- package/src/comments/commentsui.js +2 -2
- package/src/comments/integrations/commentsrestrictededitingmode.js +2 -2
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +2 -2
- package/src/comments/ui/commenteditor/commenteditoruiview.js +2 -2
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +2 -2
- package/src/comments/ui/view/basecommentview.js +2 -2
- package/src/comments/ui/view/collapsedcommentsview.js +2 -2
- package/src/comments/ui/view/commentcontentview.js +2 -2
- package/src/comments/ui/view/commentinputview.js +2 -2
- package/src/comments/ui/view/commentslistview.js +2 -2
- package/src/comments/ui/view/commentthreadinputview.js +2 -2
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +2 -2
- package/src/commentsonly.js +2 -2
- package/src/{utils/getmarkerdomelement.js → index.js} +2 -2
- package/src/utils/common-translations.js +2 -2
- package/src/utils/createmutationobserver.js +2 -2
- package/theme/annotation-inline.css +1 -1
- package/theme/annotation.css +1 -1
- package/theme/comment.css +1 -1
- package/theme/commentinput.css +1 -1
- package/theme/commentmarker.css +1 -1
- package/theme/commentthread.css +1 -1
- package/theme/icons/add-comment.svg +1 -1
- package/theme/icons/edit-comment.svg +1 -1
- package/theme/icons/remove-comment.svg +1 -1
- package/theme/sidebar-narrow.css +1 -1
- package/theme/sidebar.css +1 -1
- package/src/comments/ui/view/confirmmixin.js +0 -23
- package/src/comments/ui/view/confirmview.js +0 -23
- package/src/utils/getdatetimeformatter.js +0 -23
- package/src/utils/trim-html.js +0 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2e14=['activeAnnotations','listenTo','register','_removeActiveAnnotation','has','plugins','collection','attach','_uis','pluginName','annotationsuis-register-invalid-interface','push','destroy','_uisData','setActiveAnnotation','deactivate','find','add','function','isActive','size','switchTo','hasActive','_deactivateAllAnnotations','from','requires','get','AnnotationsUIs','set','init','deactivateAll','_setSelectedAnnotations','annotationsuis-activate-missing-ui','change:activeAnnotation','_activateAnnotation','context','delete','activate','_addActiveAnnotation','_visibleAnnotations','type','remove','refilterAnnotations','detach','_assertAnnotationDoesNotBelongToMultipleUIs','activeUIs','filter'];(function(_0x44dc65,_0x2e1455){const _0x8a12cd=function(_0x495936){while(--_0x495936){_0x44dc65['push'](_0x44dc65['shift']());}};_0x8a12cd(++_0x2e1455);}(_0x2e14,0x185));const _0x8a12=function(_0x44dc65,_0x2e1455){_0x44dc65=_0x44dc65-0x0;let _0x8a12cd=_0x2e14[_0x44dc65];return _0x8a12cd;};import{ContextPlugin as _0x22036e}from'ckeditor5/src/core';import{CKEditorError as _0x38791a}from'ckeditor5/src/utils';import _0x5e9a40,{bindAnnotationCollections as _0x42ec58}from'./annotationcollection';import _0x335386 from'./annotations';export default class I extends _0x22036e{static get[_0x8a12('0xc')](){return[_0x335386];}static get[_0x8a12('0x2b')](){return _0x8a12('0xe');}constructor(_0xd45566){super(_0xd45566),this[_0x8a12('0x20')]=new Set(),this[_0x8a12('0x2a')]=new Map(),this[_0x8a12('0x0')]=new Map();}[_0x8a12('0x10')](){const _0x29ee7b=this[_0x8a12('0x16')][_0x8a12('0x27')][_0x8a12('0xd')](_0x335386);this[_0x8a12('0x23')](_0x29ee7b,_0x8a12('0x15'),(_0x263c9d,_0x39c43d)=>{for(const _0x548c0a of this[_0x8a12('0x20')]){const _0x42ba85=this[_0x8a12('0x2a')][_0x8a12('0xd')](_0x548c0a);(0x0,this[_0x8a12('0x0')][_0x8a12('0xd')](_0x548c0a)[_0x8a12('0x21')])(_0x39c43d)&&_0x42ba85[_0x8a12('0x1')](_0x39c43d);}}),this[_0x8a12('0x23')](_0x29ee7b,_0x8a12('0xa'),()=>{for(const _0x181d75 of this[_0x8a12('0x20')]){this[_0x8a12('0x2a')][_0x8a12('0xd')](_0x181d75)[_0x8a12('0x1')](null);}}),this[_0x8a12('0x23')](_0x29ee7b[_0x8a12('0x1a')],_0x8a12('0x4'),(_0x2e87d1,_0x2dced1)=>{this[_0x8a12('0x1f')](_0x2dced1);});}[_0x8a12('0x9')](){return this[_0x8a12('0x20')][_0x8a12('0x7')]>0x0;}[_0x8a12('0x6')](_0x39daa3){return this['activeUIs'][_0x8a12('0x26')](_0x39daa3);}[_0x8a12('0x18')](_0xf840b5,_0x247229=()=>!0x0){const _0x5943d2=this[_0x8a12('0x16')][_0x8a12('0x27')]['get'](_0x335386);if(!this[_0x8a12('0x2a')][_0x8a12('0x26')](_0xf840b5))throw new _0x38791a(_0x8a12('0x13'),this,{'uiName':_0xf840b5});this[_0x8a12('0x6')](_0xf840b5)&&this[_0x8a12('0x2')](_0xf840b5),this[_0x8a12('0x20')][_0x8a12('0x4')](_0xf840b5);const _0x4b749c=new _0x5e9a40(),_0x38964d=_0x5943d2['_visibleAnnotations'];_0x42ec58({'source':_0x38964d,'target':_0x4b749c,'filter':_0x247229}),this[_0x8a12('0x0')][_0x8a12('0xf')](_0xf840b5,{'collection':_0x4b749c,'filter':_0x247229});const _0x15adf6=this['_uis'][_0x8a12('0xd')](_0xf840b5);_0x15adf6[_0x8a12('0x29')](_0x4b749c),this[_0x8a12('0x23')](_0x15adf6,_0x8a12('0x14'),(_0x412693,_0x5585f7,_0x2351bb,_0x36b7bb)=>{_0x36b7bb&&_0x5943d2[_0x8a12('0x25')](_0x36b7bb),_0x2351bb&&_0x5943d2[_0x8a12('0x19')](_0x2351bb);});}[_0x8a12('0x2')](_0x265ff8){this[_0x8a12('0x20')][_0x8a12('0x17')](_0x265ff8);const _0x3829ac=this[_0x8a12('0x2a')]['get'](_0x265ff8);_0x3829ac[_0x8a12('0x1e')](),this['stopListening'](_0x3829ac),this[_0x8a12('0x0')]['get'](_0x265ff8)[_0x8a12('0x28')][_0x8a12('0x2e')](),this['_uisData'][_0x8a12('0x17')](_0x265ff8);}[_0x8a12('0x8')](_0x2eba1d){const _0x32d79d=this['context'][_0x8a12('0x27')][_0x8a12('0xd')](_0x335386),_0x1b7495=Array[_0x8a12('0xb')](_0x32d79d[_0x8a12('0x22')])[0x0]||null;this[_0x8a12('0x11')](),this[_0x8a12('0x18')](_0x2eba1d);const _0x183112=this[_0x8a12('0x2a')][_0x8a12('0xd')](_0x2eba1d);_0x183112[_0x8a12('0x1')](_0x1b7495),_0x183112[_0x8a12('0x12')]&&_0x1b7495&&_0x183112['_setSelectedAnnotations']([_0x1b7495]);}[_0x8a12('0x11')](){for(const _0x523c96 of this[_0x8a12('0x20')])this[_0x8a12('0x2')](_0x523c96);}[_0x8a12('0x24')](_0x2e9aab,_0x567385){if(this[_0x8a12('0x2a')][_0x8a12('0x26')](_0x2e9aab))throw new _0x38791a('annotationsuis-register-already-registered');if(_0x8a12('0x5')!=typeof _0x567385[_0x8a12('0x29')]||_0x8a12('0x5')!=typeof _0x567385[_0x8a12('0x1e')]||'function'!=typeof _0x567385[_0x8a12('0x1')])throw new _0x38791a(_0x8a12('0x2c'),null);this[_0x8a12('0x2a')]['set'](_0x2e9aab,_0x567385);}[_0x8a12('0x1d')](){const _0x53b0bb=this[_0x8a12('0x16')][_0x8a12('0x27')][_0x8a12('0xd')](_0x335386)[_0x8a12('0x28')],_0x2ea31f=new Map(),_0x116942=Array[_0x8a12('0xb')](this[_0x8a12('0x20')]);for(const _0x83593e of this[_0x8a12('0x20')]){const _0x34f758=this[_0x8a12('0x0')][_0x8a12('0xd')](_0x83593e)['collection'];for(const _0x26ddac of _0x34f758)_0x2ea31f[_0x8a12('0xf')](_0x26ddac,_0x83593e);}for(const _0x5da9a1 of _0x53b0bb){const _0x301c41=_0x2ea31f[_0x8a12('0xd')](_0x5da9a1);this[_0x8a12('0x1f')](_0x5da9a1);const _0x1a86b5=_0x116942[_0x8a12('0x3')](_0x47de3c=>this['_uisData'][_0x8a12('0xd')](_0x47de3c)[_0x8a12('0x21')](_0x5da9a1));_0x301c41!==_0x1a86b5&&(_0x301c41&&this[_0x8a12('0x0')][_0x8a12('0xd')](_0x301c41)[_0x8a12('0x28')][_0x8a12('0x1c')](_0x5da9a1),_0x1a86b5&&this[_0x8a12('0x0')][_0x8a12('0xd')](_0x1a86b5)[_0x8a12('0x28')][_0x8a12('0x4')](_0x5da9a1));}}[_0x8a12('0x2e')](){this[_0x8a12('0x11')](),super[_0x8a12('0x2e')]();}[_0x8a12('0x1f')](_0x416864){const _0x1e0956=[];for(const _0x2cd6f5 of this[_0x8a12('0x20')]){(0x0,this['_uisData'][_0x8a12('0xd')](_0x2cd6f5)['filter'])(_0x416864)&&_0x1e0956[_0x8a12('0x2d')](_0x2cd6f5);}if(_0x1e0956['length']>0x1)throw new _0x38791a('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1e0956,'annotationType':_0x416864[_0x8a12('0x1b')]});}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x5d02=['blur','model','init','element','isReadOnly','requires','refresh','_editorAnnotationsData','remove','range','selection','document','annotation','_dataCollectors','change:range','function','fire','listenTo','uiUpdate','update','isEqual','innerView','containsRange','getOrderedSelectedAnnotations','editing','add','getRanges','push','has','change:isFocused','addSourceCollector','view','focusTracker','get','collection','delete','getByInnerView','set','cancel','EditorAnnotations','editorannotations-invalid-source-callback','from','editor','hasDomSelection','refreshSelectedViews'];(function(_0x2d6d48,_0x5d02ef){const _0x703ba7=function(_0x402c49){while(--_0x402c49){_0x2d6d48['push'](_0x2d6d48['shift']());}};_0x703ba7(++_0x5d02ef);}(_0x5d02,0x122));const _0x703b=function(_0x2d6d48,_0x5d02ef){_0x2d6d48=_0x2d6d48-0x0;let _0x703ba7=_0x5d02[_0x2d6d48];return _0x703ba7;};import{Plugin as _0x1a1860}from'ckeditor5/src/core';import{CKEditorError as _0x38bc9a}from'ckeditor5/src/utils';import{debounce as _0x2bee78}from'lodash-es';import _0x1d7938 from'./annotations';export default class k extends _0x1a1860{static get[_0x703b('0x1e')](){return[_0x1d7938];}static get['pluginName'](){return _0x703b('0x13');}constructor(_0x8812db){super(_0x8812db),this['_dataCollectors']=new Set();}[_0x703b('0x1b')](){const _0xf5ec75=this[_0x703b('0x16')],_0x2ac575=_0xf5ec75['plugins'][_0x703b('0xd')](_0x1d7938),_0x2aab64=_0xf5ec75[_0x703b('0x1a')][_0x703b('0x24')][_0x703b('0x23')],_0x232d76=_0x2bee78(()=>this[_0x703b('0x18')](),0xa);_0x2aab64['on'](_0x703b('0x27'),(_0x29d245,_0x11a404)=>{_0x11a404['directChange']&&(_0x232d76[_0x703b('0x12')](),this[_0x703b('0x18')]());}),this[_0x703b('0x2a')](_0xf5ec75[_0x703b('0x4')][_0x703b('0xb')][_0x703b('0x24')],_0x703b('0x9'),(_0x5766a2,_0x46da9f,_0x956afa)=>{_0x956afa&&_0x232d76();}),this[_0x703b('0x2a')](_0xf5ec75['ui'][_0x703b('0xc')],_0x703b('0x9'),(_0x80a00,_0x1d40d5,_0x2dbb1c)=>{_0x2dbb1c||_0xf5ec75[_0x703b('0x1d')]||this['fire'](_0x703b('0x19'),{'isAnnotationTracked':_0x3931c0=>this[_0x703b('0x20')][_0x703b('0x8')](_0x3931c0['innerView'])});}),this[_0x703b('0x2a')](this[_0x703b('0x16')]['ui'],_0x703b('0x2c'),()=>this['fire'](_0x703b('0x2b')));const _0x2814e0=new Set();this[_0x703b('0x2a')](_0x2ac575[_0x703b('0xe')],_0x703b('0x5'),(_0x103755,_0x170573)=>{for(const _0x4a1b02 of this[_0x703b('0x20')]['keys']())if(_0x4a1b02===_0x170573[_0x703b('0x1')]){_0xf5ec75['ui']['focusTracker'][_0x703b('0x5')](_0x170573[_0x703b('0xb')][_0x703b('0x1c')]),_0x2814e0[_0x703b('0x5')](_0x170573['view']);break;}}),this[_0x703b('0x2a')](_0x2ac575['collection'],_0x703b('0x21'),(_0x332075,_0x33f688)=>{_0x2814e0[_0x703b('0x8')](_0x33f688[_0x703b('0xb')])&&(_0xf5ec75['ui'][_0x703b('0xc')]['remove'](_0x33f688[_0x703b('0xb')][_0x703b('0x1c')]),_0x2814e0[_0x703b('0xf')](_0x33f688[_0x703b('0xb')]));});}[_0x703b('0x17')](){return this[_0x703b('0x16')][_0x703b('0x4')][_0x703b('0xb')][_0x703b('0x17')];}[_0x703b('0xa')](_0x255b37){if(_0x703b('0x28')!=typeof _0x255b37)throw new _0x38bc9a(_0x703b('0x14'));this[_0x703b('0x26')][_0x703b('0x5')](_0x255b37);}[_0x703b('0x18')](){this[_0x703b('0x29')](_0x703b('0x1f'));}[_0x703b('0x3')]({activeAnnotation:_0x5066fd,annotations:_0x2ec0b0}){const _0x2ae3aa=[],_0x1b9ff2=this[_0x703b('0x16')][_0x703b('0x1a')][_0x703b('0x24')][_0x703b('0x23')],_0x30e1f4=Array['from'](_0x1b9ff2[_0x703b('0x6')]());for(const [_0x278464,_0x4adb68]of this[_0x703b('0x20')]){const _0x42a665=_0x2e9969(_0x4adb68),_0x395bd0=_0x2ec0b0[_0x703b('0x10')](_0x278464);_0x42a665&&_0x395bd0&&_0x2ae3aa[_0x703b('0x7')]({'annotation':_0x395bd0,'range':_0x42a665});}function _0x2e9969(_0x1d6629){for(const _0x5a1657 of _0x1d6629)for(const _0x41e178 of _0x30e1f4)if(_0x5a1657['containsRange'](_0x41e178,!_0x1b9ff2['isCollapsed']))return _0x5a1657;return null;}return _0x2ae3aa['sort']((_0x38b417,_0xf55f6a)=>{const _0x350387=_0x38b417[_0x703b('0x22')],_0x28bdce=_0xf55f6a['range'];if(!_0x350387[_0x703b('0x0')](_0x28bdce)){if(_0x350387[_0x703b('0x2')](_0x28bdce,!0x0))return 0x1;if(_0x28bdce[_0x703b('0x2')](_0x350387,!0x0))return-0x1;}return _0x38b417['annotation']==_0x5066fd?-0x1:_0xf55f6a[_0x703b('0x25')]==_0x5066fd?0x1:0x0;})['map'](_0x101b65=>_0x101b65[_0x703b('0x25')]);}get[_0x703b('0x20')](){const _0x1d1072=new Map();for(const _0x457536 of Array[_0x703b('0x15')](this[_0x703b('0x26')]))for(const [_0x2307e7,_0xa2c4b7]of _0x457536())_0x1d1072[_0x703b('0x11')](_0x2307e7,_0xa2c4b7);return _0x1d1072;}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x2f23=['detach','view','isActive','_selectedAnnotations','change:isFocused','document','afterInit','inline','refresh','_annotations','_addAnnotationToBalloon','visibleView','change:visibleView','requires','InlineAnnotations','inlineannotations-detach-not-attached','clear','_setSelectedAnnotations','editor','get','remove','selection','_manuallyClosed','isAttached','has','getSelection','set','blur','focusTracker','includes','showStack','updatePosition','add','hasView','switchTo','context','editing','delete','isFocused','attach','inlineannotations-attach-already-attached','focus','stopListening','Esc','destroy','_removeAnnotationFromBalloon','getByView','register','activeAnnotation','listenTo','mousedown','_addedAnnotations','pluginName','_balloon','plugins','targetRect','setActiveAnnotation','getOrderedSelectedAnnotations','update','bind','hasActive'];(function(_0x574bcd,_0x2f237){const _0x430660=function(_0xa5f99a){while(--_0xa5f99a){_0x574bcd['push'](_0x574bcd['shift']());}};_0x430660(++_0x2f237);}(_0x2f23,0x1d3));const _0x4306=function(_0x574bcd,_0x2f237){_0x574bcd=_0x574bcd-0x0;let _0x430660=_0x2f23[_0x574bcd];return _0x430660;};import{Plugin as _0x2a0d6f}from'ckeditor5/src/core';import _0x1f7a83 from'./annotationsuis';import _0x18b6ef from'./editorannotations';import{ContextualBalloon as _0x347abb}from'ckeditor5/src/ui';import{MouseObserver as _0x1b8dd5}from'ckeditor5/src/engine';import{CKEditorError as _0x65f77d}from'ckeditor5/src/utils';import'./../../theme/annotation-inline.css';export default class a extends _0x2a0d6f{static get[_0x4306('0x22')](){return[_0x18b6ef,_0x347abb,_0x1f7a83];}static get[_0x4306('0xc')](){return _0x4306('0x23');}constructor(_0x81dc0d){super(_0x81dc0d),_0x81dc0d[_0x4306('0x39')][_0x4306('0x16')]['addObserver'](_0x1b8dd5),this[_0x4306('0x2c')]=!0x1,this[_0x4306('0x2f')](_0x4306('0x8'),null),this[_0x4306('0x1e')]=null,this[_0x4306('0x2b')]=new Set(),this[_0x4306('0xd')]=_0x81dc0d[_0x4306('0xe')][_0x4306('0x28')](_0x347abb),this[_0x4306('0xb')]=new Set(),this[_0x4306('0x18')]=[];}['init'](){const _0x387daa=this[_0x4306('0x27')]['plugins'][_0x4306('0x28')](_0x1f7a83);_0x387daa['context']===this[_0x4306('0x27')]&&(_0x387daa[_0x4306('0x7')](_0x4306('0x1c'),this),this[_0x4306('0x27')]['keystrokes'][_0x4306('0x2f')](_0x4306('0x3'),(_0x4759e5,_0x50c5d1)=>{const _0x2cb24f=this[_0x4306('0xd')];if(this['isAttached']&&_0x2cb24f[_0x4306('0x20')]){const _0x1ccc79=this[_0x4306('0x1e')][_0x4306('0x6')](_0x2cb24f[_0x4306('0x20')]);this['_manuallyClosed'][_0x4306('0x35')](_0x1ccc79),this['_removeAnnotationFromBalloon'](_0x1ccc79),_0x50c5d1();}}));}[_0x4306('0x1b')](){const _0x5c044b=this[_0x4306('0x27')][_0x4306('0xe')][_0x4306('0x28')](_0x1f7a83);_0x5c044b['context']===this['editor']&&(_0x5c044b[_0x4306('0x14')]()||_0x5c044b[_0x4306('0x37')]('inline'));}['setActiveAnnotation'](_0x3705b7){_0x3705b7!==this[_0x4306('0x8')]&&(this[_0x4306('0x8')]&&(this['activeAnnotation'][_0x4306('0x17')]=!0x1),_0x3705b7&&this[_0x4306('0x27')]['ui'][_0x4306('0x31')][_0x4306('0x3b')]&&(this[_0x4306('0x1f')](_0x3705b7,!0x0),_0x3705b7[_0x4306('0x17')]=!0x0),_0x3705b7||this[_0x4306('0x26')]([]),this[_0x4306('0x8')]=_0x3705b7);}[_0x4306('0x3c')](_0x4311e7){this[_0x4306('0x1e')]=_0x4311e7;const _0x55ff4d=this[_0x4306('0x27')][_0x4306('0xe')][_0x4306('0x28')](_0x1f7a83),_0x19f62e=this[_0x4306('0xd')];if(this[_0x4306('0x2c')])throw new _0x65f77d(_0x4306('0x0'),this);if(_0x55ff4d[_0x4306('0x38')]!==this['editor'])throw new _0x65f77d('inlineannotations-not-allowed-with-context',this);const _0x515239=this[_0x4306('0x27')][_0x4306('0xe')]['get']('EditorAnnotations');this[_0x4306('0x9')](_0x515239,_0x4306('0x1d'),function(){const _0x2c774b=_0x515239[_0x4306('0x11')]({'activeAnnotation':this[_0x4306('0x8')],'annotations':this[_0x4306('0x1e')]});this[_0x4306('0x26')](_0x2c774b),this['setActiveAnnotation'](_0x2c774b[0x0]||null);}[_0x4306('0x13')](this)),this[_0x4306('0x9')](_0x515239,_0x4306('0x30'),(_0x7e4748,{isAnnotationTracked:_0x45b200})=>{this['activeAnnotation']&&_0x45b200(this[_0x4306('0x8')])&&(this[_0x4306('0x26')]([]),this['setActiveAnnotation'](null));}),this[_0x4306('0x9')](this[_0x4306('0x27')]['ui'][_0x4306('0x31')],_0x4306('0x19'),(_0x41d6ee,_0x4efe7c,_0x393394)=>{_0x393394||this[_0x4306('0x10')](null);}),this[_0x4306('0x9')](_0x4311e7,_0x4306('0x29'),(_0x1bb998,_0x4612e9)=>{this[_0x4306('0x5')](_0x4612e9),_0x4612e9===this[_0x4306('0x8')]&&this[_0x4306('0x10')](null);}),this['listenTo'](_0x19f62e,_0x4306('0x21'),(_0x53008f,_0xce8f4,_0xf42d96,_0x2dfecf)=>{if(_0x2dfecf&&this[_0x4306('0x2')](_0x2dfecf),!_0xf42d96||!_0x4311e7[_0x4306('0x6')](_0xf42d96))return;const _0x3c9b6e=_0x4311e7[_0x4306('0x6')](_0xf42d96);this[_0x4306('0x9')](_0xf42d96,'change:height',()=>{_0x19f62e[_0x4306('0x34')]();}),this['listenTo'](_0xf42d96,'Esc',()=>{this[_0x4306('0x2b')][_0x4306('0x35')](_0x3c9b6e),this[_0x4306('0x5')](_0x3c9b6e),this[_0x4306('0x27')]['editing'][_0x4306('0x16')][_0x4306('0x1')]();}),this[_0x4306('0x8')]!==_0x3c9b6e&&this['setActiveAnnotation'](_0x3c9b6e);}),this[_0x4306('0x9')](this[_0x4306('0x27')]['ui'],_0x4306('0x12'),()=>{_0x19f62e[_0x4306('0x20')]&&(_0x4311e7[_0x4306('0x6')](_0x19f62e[_0x4306('0x20')])&&_0x19f62e[_0x4306('0x34')]());}),this[_0x4306('0x9')](this['editor'][_0x4306('0x39')][_0x4306('0x16')][_0x4306('0x1a')],_0x4306('0xa'),()=>{this['_manuallyClosed'][_0x4306('0x25')]();}),this[_0x4306('0x27')][_0x4306('0x39')][_0x4306('0x16')][_0x4306('0x1a')][_0x4306('0x2a')]['editableElement']&&this[_0x4306('0x27')]['editing'][_0x4306('0x16')]['focus'](),this[_0x4306('0x2c')]=!0x0;}['detach'](){if(!this[_0x4306('0x2c')])throw new _0x65f77d(_0x4306('0x24'),this);this[_0x4306('0x10')](null);for(const _0x468cbb of this[_0x4306('0xb')])this['_removeAnnotationFromBalloon'](_0x468cbb);this[_0x4306('0x2')](),this[_0x4306('0x2c')]=!0x1;}[_0x4306('0x4')](){this[_0x4306('0x2c')]&&this[_0x4306('0x15')]();}['_setSelectedAnnotations'](_0x5574df){const _0x304462=this[_0x4306('0x18')];for(const _0x2e4875 of _0x304462)_0x5574df['includes'](_0x2e4875)||this['_manuallyClosed']['delete'](_0x2e4875);for(const _0x240efe of this['_annotations'])_0x5574df[_0x4306('0x32')](_0x240efe)||this['_removeAnnotationFromBalloon'](_0x240efe);if(this[_0x4306('0x27')]['ui'][_0x4306('0x31')][_0x4306('0x3b')])for(const _0x29165f of _0x5574df)this[_0x4306('0x1f')](_0x29165f);this[_0x4306('0x18')]=_0x5574df;}['_addAnnotationToBalloon'](_0x38f435,_0x3e2bc2){this['_manuallyClosed'][_0x4306('0x2d')](_0x38f435)||(this['_addedAnnotations']['has'](_0x38f435)||this['_balloon'][_0x4306('0x36')](_0x38f435[_0x4306('0x16')])||(this[_0x4306('0xb')][_0x4306('0x35')](_0x38f435),this[_0x4306('0xd')]['add']({'stackId':_0x38f435[_0x4306('0x16')]['id'],'view':_0x38f435[_0x4306('0x16')],'position':{'target':()=>_0x38f435['target']||_0x38f435[_0x4306('0xf')]||document[_0x4306('0x2e')]()['getRangeAt'](0x0)}})),_0x3e2bc2&&this['_balloon'][_0x4306('0x33')](_0x38f435[_0x4306('0x16')]['id']));}['_removeAnnotationFromBalloon'](_0x12df3a){this[_0x4306('0xb')][_0x4306('0x2d')](_0x12df3a)&&this[_0x4306('0xd')][_0x4306('0x36')](_0x12df3a[_0x4306('0x16')])&&(this[_0x4306('0xb')][_0x4306('0x3a')](_0x12df3a),this['_balloon'][_0x4306('0x29')](_0x12df3a[_0x4306('0x16')]));}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const _0x4776=['preventClosingBalloon','element','_throttledRefreshPositioning','_attachListeners','narrowsidebar-detach-not-attached','remove','delete','detachFromDom','EditorAnnotations','_setSelectedAnnotations','hasDomSelection','values','annotationType','_showBalloon','editors','northArrowSouthEast','_hideBalloon','context','contains','_refreshPositioning','change:height','locale','plugins','stop','target','unpin','bodyCollection','activeAnnotation','addAnnotation','attach','mousedown','has','_detachListeners','northArrowSouthWest','bind','create','add','southArrowNorthEast','narrowsidebar-attach-already-attached','_destroyEditorAnnotationsIntegration','_integrateWithEditorAnnotations','first','number','_selectedAnnotations','ck-sidebar--narrow','balloonPanelView','_updateBalloonPosition','type','off','refresh','stopListening','esc','change:container','pluginName','isAttached','length','high','ready','view','resize','NarrowSidebar','defaultPositions','getSidebarItemView','requires','Sidebar','preventDefault','focus','removeEventListener','setActiveAnnotation','northArrowSouth','detach','pin','keyCode','addEventListener','isVisible','blur','listenTo','_annotationToNarrowView','rearrange','stopPropagation','register','from','_attachToContainer','_manuallyClosedAnnotationViews','narrowSidebar','includes','destroy','isDirty','get','southArrowNorth','clear','_detachFromContainer','set','content','_domEmitter','Esc','_annotations','keydown','getOrderedSelectedAnnotations','_editorAnnotations','getByView'];(function(_0x537968,_0x4776e6){const _0x26dea4=function(_0x367e3e){while(--_0x367e3e){_0x537968['push'](_0x537968['shift']());}};_0x26dea4(++_0x4776e6);}(_0x4776,0x1c2));const _0x26de=function(_0x537968,_0x4776e6){_0x537968=_0x537968-0x0;let _0x26dea4=_0x4776[_0x537968];return _0x26dea4;};import{ContextPlugin as _0x5559f1}from'ckeditor5/src/core';import _0x166068 from'./annotationsuis';import _0x9ead6d from'./sidebar';import _0xd7441f from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x316fa6,BodyCollection as _0x15eca9}from'ckeditor5/src/ui';import{CKEditorError as _0x16975d,DomEmitterMixin as _0x5377c2,keyCodes as _0x51b316,Collection as _0x54159c}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{throttle as _0x43d226}from'lodash-es';export default class s extends _0x5559f1{static get[_0x26de('0x11')](){return[_0x9ead6d,_0x166068];}static get[_0x26de('0x7')](){return _0x26de('0xe');}constructor(_0x4fe69f){super(_0x4fe69f),this[_0x26de('0x8')]=!0x1,this[_0x26de('0x25')]=new Set(),this[_0x26de('0x30')]=Object[_0x26de('0x5a')](_0x5377c2),this['_annotationToNarrowView']=new Map(),this[_0x26de('0x2e')]('activeAnnotation',null),this[_0x26de('0x32')]=null,this[_0x26de('0x62')]=[],this[_0x26de('0x35')]=new _0x54159c(),this[_0x26de('0x39')]=_0x43d226(()=>{this[_0x26de('0x4a')]();},0x190,{'leading':!0x1});}['init'](){this[_0x26de('0x48')][_0x26de('0x4d')][_0x26de('0x2a')](_0x166068)[_0x26de('0x22')](_0x26de('0x26'),this),this[_0x26de('0x51')]=new _0x15eca9(this[_0x26de('0x48')][_0x26de('0x4c')]),this[_0x26de('0x64')]=new _0x316fa6(this[_0x26de('0x48')][_0x26de('0x4c')]),this[_0x26de('0x51')]['attachToDom'](),this[_0x26de('0x51')][_0x26de('0x5b')](this[_0x26de('0x64')]);}['attach'](_0x3d9f83){this[_0x26de('0x32')]=_0x3d9f83;const _0x509234=this[_0x26de('0x48')]['plugins'][_0x26de('0x2a')](_0x9ead6d),_0x70e693=this[_0x26de('0x64')];if(_0x509234[_0x26de('0x32')]=_0x3d9f83,this[_0x26de('0x8')])throw new _0x16975d(_0x26de('0x5d'),this);this[_0x26de('0x8')]=!0x0,this[_0x26de('0x1e')](_0x509234,'set:container',()=>{this[_0x26de('0x18')](),this[_0x26de('0x1e')](_0x509234,_0x26de('0x6'),_0x50b07d=>{_0x50b07d[_0x26de('0x2')](),this[_0x26de('0x54')](_0x3d9f83);});}),_0x509234[_0x26de('0x24')]({'viewClass':_0x26de('0x63'),'spaceBetweenItems':0x5});const _0x59c877=_0x3be6c0=>{const _0x19f217=new _0xd7441f(this[_0x26de('0x48')][_0x26de('0x4c')]);_0x509234[_0x26de('0x53')](_0x3be6c0,_0x19f217),this[_0x26de('0x1f')]['set'](_0x3be6c0,_0x19f217),_0x19f217[_0x26de('0x59')](_0x26de('0x29'),_0x26de('0x43'),_0x26de('0x61'))['to'](_0x3be6c0[_0x26de('0xc')],_0x26de('0x29'),_0x26de('0x1'),_0x26de('0x9')),_0x19f217['on']('execute',()=>{this[_0x26de('0x25')][_0x26de('0x2c')](),_0x70e693[_0x26de('0x2f')][_0x26de('0x60')]!==_0x3be6c0[_0x26de('0xc')]?(this[_0x26de('0x44')](_0x3be6c0),_0x3be6c0['view']['element'][_0x26de('0x14')](),this['setActiveAnnotation'](_0x3be6c0)):this[_0x26de('0x16')](null);});};for(const _0x3deb10 of _0x3d9f83)_0x59c877(_0x3deb10);this['listenTo'](_0x3d9f83,_0x26de('0x5b'),(_0x2d7f37,_0x3e7e07)=>{_0x59c877(_0x3e7e07);}),this[_0x26de('0x1e')](_0x3d9f83,'remove',(_0x4a88b4,_0x537cb1,_0x4782b5)=>{this[_0x26de('0x1f')][_0x26de('0x2a')](_0x537cb1)['destroy'](),this[_0x26de('0x1f')][_0x26de('0x3d')](_0x537cb1),_0x509234[_0x26de('0x20')]({'removedAnnotation':_0x537cb1,'previousAnnotation':_0x3d9f83[_0x26de('0x2a')](_0x4782b5-0x1),'nextAnnotation':_0x3d9f83[_0x26de('0x2a')](_0x4782b5+0x1)}),_0x537cb1===this[_0x26de('0x52')]&&this[_0x26de('0x16')](null);},{'priority':'low'}),this[_0x26de('0x1e')](_0x3d9f83,'focus',(_0x500b30,_0x2a25af)=>{this['setActiveAnnotation'](_0x2a25af);}),this[_0x26de('0x1e')](_0x3d9f83,_0x26de('0x1d'),()=>{this['setActiveAnnotation'](null);}),this[_0x26de('0x30')][_0x26de('0x1e')](document,_0x26de('0x33'),(_0x140935,_0x370f49)=>{_0x370f49[_0x26de('0x1a')]===_0x51b316[_0x26de('0x5')]&&_0x70e693['isVisible']&&(this[_0x26de('0x25')][_0x26de('0x5b')](_0x70e693[_0x26de('0x2f')][_0x26de('0x60')]),this[_0x26de('0x47')](),_0x370f49[_0x26de('0x21')](),_0x370f49[_0x26de('0x13')]());}),this[_0x26de('0x30')]['listenTo'](document,_0x26de('0x55'),(_0x4af2bf,_0x13a5b0)=>{const _0x16b48f=_0x13a5b0[_0x26de('0x4f')];_0x70e693[_0x26de('0x1c')]&&_0x70e693[_0x26de('0x38')][_0x26de('0x49')](_0x16b48f)||_0x509234[_0x26de('0xc')]['element']['contains'](_0x16b48f)||_0x4af2bf[_0x26de('0x37')]||(this[_0x26de('0x25')][_0x26de('0x2c')](),this[_0x26de('0x47')](),this[_0x26de('0x16')](null));});const _0x4003bc=this[_0x26de('0x48')][_0x26de('0x45')]?this[_0x26de('0x48')][_0x26de('0x45')]:new _0x54159c([this['context']]);for(const _0x539d0e of _0x4003bc)this['_integrateWithEditorAnnotations'](_0x539d0e);this[_0x26de('0x1e')](_0x4003bc,_0x26de('0x5b'),(_0xc7e42b,_0x52c0c5)=>{this[_0x26de('0x1e')](_0x52c0c5,_0x26de('0xb'),()=>{this[_0x26de('0x5f')](_0x52c0c5);});}),this[_0x26de('0x1e')](_0x4003bc,_0x26de('0x3c'),(_0x39c1ed,_0x4b1ce1)=>{_0x4b1ce1[_0x26de('0x4d')]['has'](_0x26de('0x3f'))&&this[_0x26de('0x5e')](_0x4b1ce1[_0x26de('0x4d')][_0x26de('0x2a')](_0x26de('0x3f')));}),window[_0x26de('0x1b')](_0x26de('0xd'),this[_0x26de('0x39')]),this[_0x26de('0x4a')]();}[_0x26de('0x16')](_0x2965cb){if(_0x2965cb===this['activeAnnotation'])return;const _0x21920f=this[_0x26de('0x48')][_0x26de('0x4d')][_0x26de('0x2a')](_0x26de('0x12'));if(_0x21920f[_0x26de('0x3')]({'blurredAnnotation':this[_0x26de('0x52')],'activatedAnnotation':_0x2965cb,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2965cb)_0x21920f[_0x26de('0x10')](_0x2965cb)?this[_0x26de('0x44')](_0x2965cb):this[_0x26de('0x47')]();else this[_0x26de('0x47')]();this[_0x26de('0x52')]=_0x2965cb;}['detach'](){if(!this[_0x26de('0x8')])throw new _0x16975d(_0x26de('0x3b'),this);this['setActiveAnnotation'](null);const _0x152c84=this[_0x26de('0x48')][_0x26de('0x4d')][_0x26de('0x2a')](_0x26de('0x12'));this[_0x26de('0x47')](),Array[_0x26de('0x23')](this[_0x26de('0x1f')][_0x26de('0x42')](),_0x478a36=>_0x478a36['destroy']()),this[_0x26de('0x1f')][_0x26de('0x2c')](),_0x152c84[_0x26de('0x2d')](this[_0x26de('0x32')]),this[_0x26de('0x4')](),this[_0x26de('0x30')][_0x26de('0x4')](),this[_0x26de('0x4')](this['context'][_0x26de('0x45')]);for(const _0x1e322e of Array[_0x26de('0x23')](this[_0x26de('0x35')]))this[_0x26de('0x5e')](_0x1e322e);window[_0x26de('0x15')](_0x26de('0xd'),this[_0x26de('0x39')]),this[_0x26de('0x39')]['cancel'](),this['_selectedAnnotations']=[],this[_0x26de('0x8')]=!0x1,this['_annotations']=null;}[_0x26de('0x28')](){this[_0x26de('0x8')]&&this[_0x26de('0x18')](),this[_0x26de('0x51')][_0x26de('0x3e')]();}['_integrateWithEditorAnnotations'](_0x3236d2){const _0x19acee=_0x3236d2[_0x26de('0x4d')]['get'](_0x26de('0x3f')),_0x15b78b=this['context'][_0x26de('0x4d')]['get'](_0x9ead6d),_0x214012=this['_annotations'],_0xabe8a0=this[_0x26de('0x64')],_0x247fe4=()=>{const _0x13f2bc=_0x19acee[_0x26de('0x34')]({'activeAnnotation':this[_0x26de('0x52')],'annotations':this[_0x26de('0x32')]});this['_setSelectedAnnotations'](_0x13f2bc),this['setActiveAnnotation'](_0x13f2bc[0x0]||null);};this['listenTo'](_0x19acee,_0x26de('0x3'),_0x247fe4),this[_0x26de('0x1e')](_0x19acee,_0x26de('0x1d'),(_0x10d79a,{isAnnotationTracked:_0x166c07})=>{this[_0x26de('0x52')]&&_0x166c07(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this[_0x26de('0x1e')](_0x19acee,'uiUpdate',()=>{this[_0x26de('0x39')]();}),this[_0x26de('0x1e')](_0x214012,'blur',_0x161b68=>{_0x19acee[_0x26de('0x41')]()&&_0x161b68[_0x26de('0x4e')]();},{'priority':'high'}),this[_0x26de('0x30')]['listenTo'](document,_0x26de('0x55'),(_0x1d5404,_0x4b668b)=>{const _0x458779=_0x4b668b[_0x26de('0x4f')];_0xabe8a0[_0x26de('0x1c')]&&_0xabe8a0[_0x26de('0x38')][_0x26de('0x49')](_0x458779)||_0x15b78b[_0x26de('0xc')][_0x26de('0x38')][_0x26de('0x49')](_0x458779)||this['activeAnnotation']&&_0x19acee[_0x26de('0x41')]()&&(_0x247fe4(),_0x1d5404[_0x26de('0x37')]=!0x0);},{'priority':_0x26de('0xa')}),this[_0x26de('0x35')][_0x26de('0x5b')](_0x19acee);}['_destroyEditorAnnotationsIntegration'](_0x4d1e65){_0x4d1e65&&(this['stopListening'](_0x4d1e65),this[_0x26de('0x35')]['remove'](_0x4d1e65));}[_0x26de('0x40')](_0x3f64a3){for(const _0x4cc231 of this[_0x26de('0x62')])_0x3f64a3[_0x26de('0x27')](_0x4cc231)||this['_manuallyClosedAnnotationViews'][_0x26de('0x3d')](_0x4cc231[_0x26de('0xc')]);this[_0x26de('0x62')]=_0x3f64a3;}[_0x26de('0x4a')](){const _0x23e9c9=this[_0x26de('0x64')];this[_0x26de('0x32')]['refreshPositioning'](),_0x23e9c9['isVisible']&&this[_0x26de('0x0')]();}[_0x26de('0x44')](_0x53a087){if(this[_0x26de('0x25')][_0x26de('0x56')](_0x53a087[_0x26de('0xc')]))return;const _0x223315=this[_0x26de('0x64')][_0x26de('0x2f')][_0x26de('0x60')];_0x223315!==_0x53a087[_0x26de('0xc')]?(_0x223315&&this[_0x26de('0x57')](_0x223315),this[_0x26de('0x3a')](_0x53a087[_0x26de('0xc')]),this[_0x26de('0x64')]['content']['clear'](),this[_0x26de('0x64')][_0x26de('0x2f')]['add'](_0x53a087[_0x26de('0xc')]),this[_0x26de('0x0')]()):this['_updateBalloonPosition']();}[_0x26de('0x0')](){const _0x113fc8=this[_0x26de('0x64')]['content']['first'],_0xbae071=this[_0x26de('0x32')][_0x26de('0x36')](_0x113fc8);if(!this[_0x26de('0x1f')][_0x26de('0x56')](_0xbae071))return;const _0x185ebf=this[_0x26de('0x1f')][_0x26de('0x2a')](_0xbae071)[_0x26de('0x38')],_0x73b957=function(){const _0x187360=_0x316fa6[_0x26de('0xf')];return[_0x187360[_0x26de('0x5c')],_0x187360[_0x26de('0x46')],_0x187360[_0x26de('0x2b')],_0x187360[_0x26de('0x17')],_0x187360['southArrowNorthWest'],_0x187360[_0x26de('0x58')]];}();this[_0x26de('0x64')][_0x26de('0x19')]({'target':_0x185ebf,'positions':_0x73b957});}[_0x26de('0x47')](){const _0x1f5dd1=this[_0x26de('0x64')],_0x20a44d=_0x1f5dd1[_0x26de('0x2f')][_0x26de('0x60')];_0x20a44d&&(this['_detachListeners'](_0x20a44d),_0x1f5dd1[_0x26de('0x50')](),_0x1f5dd1[_0x26de('0x2f')]['clear']());}['_attachListeners'](_0x4c5080){this[_0x26de('0x1e')](_0x4c5080,_0x26de('0x4b'),()=>this[_0x26de('0x0')]()),this[_0x26de('0x1e')](_0x4c5080,_0x26de('0x31'),(_0x2f7db,_0x5ca2a2)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4c5080),this['_hideBalloon'](),_0x5ca2a2();});}[_0x26de('0x57')](_0x242324){this[_0x26de('0x4')](_0x242324);}}
|
|
23
|
+
const _0x5e26=['resize','mousedown','_destroyEditorAnnotationsIntegration','change:container','activeAnnotation','destroy','low','delete','remove','_manuallyClosedAnnotationViews','EditorAnnotations','isVisible','listenTo','includes','hasDomSelection','addEventListener','view','editors','blur','init','northArrowSouthEast','high','setActiveAnnotation','narrowsidebar-attach-already-attached','stopPropagation','bodyCollection','northArrowSouthWest','length','has','_attachListeners','narrowsidebar-detach-not-attached','attach','pluginName','content','create','from','_showBalloon','change:height','stop','_throttledRefreshPositioning','Sidebar','get','refresh','element','number','preventClosingBalloon','rearrange','isAttached','annotationType','addAnnotation','_refreshPositioning','register','defaultPositions','unpin','_domEmitter','preventDefault','balloonPanelView','_editorAnnotations','detach','contains','southArrowNorthWest','attachToDom','pin','getSidebarItemView','_annotationToNarrowView','context','_updateBalloonPosition','plugins','isDirty','locale','refreshPositioning','ready','focus','_annotations','target','_hideBalloon','_detachFromContainer','narrowSidebar','esc','_selectedAnnotations','clear','execute','getByView','ck-sidebar--narrow','add','values','stopListening','_setSelectedAnnotations','bind','type','uiUpdate','keydown','keyCode','_detachListeners','removeEventListener','_integrateWithEditorAnnotations','first'];(function(_0x148a9e,_0x5e2673){const _0x58e5df=function(_0x19e3fe){while(--_0x19e3fe){_0x148a9e['push'](_0x148a9e['shift']());}};_0x58e5df(++_0x5e2673);}(_0x5e26,0x69));const _0x58e5=function(_0x148a9e,_0x5e2673){_0x148a9e=_0x148a9e-0x0;let _0x58e5df=_0x5e26[_0x148a9e];return _0x58e5df;};import{ContextPlugin as _0x313156}from'ckeditor5/src/core';import _0x49def1 from'./annotationsuis';import _0x306749 from'./sidebar';import _0x239eb3 from'./view/annotationcounterbuttonview';import{BalloonPanelView as _0x23aed9,BodyCollection as _0x21b295}from'ckeditor5/src/ui';import{CKEditorError as _0x19b1a3,DomEmitterMixin as _0x547266,keyCodes as _0x27fc61,Collection as _0x11c168}from'ckeditor5/src/utils';import'../../theme/sidebar-narrow.css';import{throttle as _0x20a860}from'lodash-es';export default class s extends _0x313156{static get['requires'](){return[_0x306749,_0x49def1];}static get[_0x58e5('0x18')](){return'NarrowSidebar';}constructor(_0xc73979){super(_0xc73979),this[_0x58e5('0x27')]=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this[_0x58e5('0x2e')]=Object[_0x58e5('0x1a')](_0x547266),this[_0x58e5('0x38')]=new Map(),this['set'](_0x58e5('0x5d'),null),this[_0x58e5('0x41')]=null,this[_0x58e5('0x47')]=[],this[_0x58e5('0x31')]=new _0x11c168(),this[_0x58e5('0x1f')]=_0x20a860(()=>{this['_refreshPositioning']();},0x190,{'leading':!0x1});}[_0x58e5('0xb')](){this[_0x58e5('0x39')][_0x58e5('0x3b')]['get'](_0x49def1)[_0x58e5('0x2b')](_0x58e5('0x45'),this),this[_0x58e5('0x11')]=new _0x21b295(this[_0x58e5('0x39')][_0x58e5('0x3d')]),this['balloonPanelView']=new _0x23aed9(this['context'][_0x58e5('0x3d')]),this[_0x58e5('0x11')][_0x58e5('0x35')](),this[_0x58e5('0x11')][_0x58e5('0x4c')](this['balloonPanelView']);}['attach'](_0x2034e2){this[_0x58e5('0x41')]=_0x2034e2;const _0x2e4f57=this[_0x58e5('0x39')][_0x58e5('0x3b')][_0x58e5('0x21')](_0x306749),_0x1f506e=this[_0x58e5('0x30')];if(_0x2e4f57[_0x58e5('0x41')]=_0x2034e2,this['isAttached'])throw new _0x19b1a3(_0x58e5('0xf'),this);this[_0x58e5('0x27')]=!0x0,this['listenTo'](_0x2e4f57,'set:container',()=>{this['detach'](),this[_0x58e5('0x4')](_0x2e4f57,_0x58e5('0x5c'),_0x4bd08d=>{_0x4bd08d['off'](),this[_0x58e5('0x17')](_0x2034e2);});}),_0x2e4f57['_attachToContainer']({'viewClass':_0x58e5('0x4b'),'spaceBetweenItems':0x5});const _0x4cb2e8=_0x5660e4=>{const _0x9554b4=new _0x239eb3(this[_0x58e5('0x39')][_0x58e5('0x3d')]);_0x2e4f57[_0x58e5('0x29')](_0x5660e4,_0x9554b4),this['_annotationToNarrowView']['set'](_0x5660e4,_0x9554b4),_0x9554b4[_0x58e5('0x50')](_0x58e5('0x3c'),_0x58e5('0x28'),_0x58e5('0x24'))['to'](_0x5660e4['view'],_0x58e5('0x3c'),_0x58e5('0x51'),_0x58e5('0x13')),_0x9554b4['on'](_0x58e5('0x49'),()=>{this[_0x58e5('0x1')][_0x58e5('0x48')](),_0x1f506e[_0x58e5('0x19')][_0x58e5('0x58')]!==_0x5660e4[_0x58e5('0x8')]?(this[_0x58e5('0x1c')](_0x5660e4),_0x5660e4[_0x58e5('0x8')][_0x58e5('0x23')][_0x58e5('0x40')](),this[_0x58e5('0xe')](_0x5660e4)):this[_0x58e5('0xe')](null);});};for(const _0x218b7c of _0x2034e2)_0x4cb2e8(_0x218b7c);this[_0x58e5('0x4')](_0x2034e2,_0x58e5('0x4c'),(_0x390ce7,_0x210add)=>{_0x4cb2e8(_0x210add);}),this['listenTo'](_0x2034e2,_0x58e5('0x0'),(_0x24708f,_0x1a9d5d,_0x34f655)=>{this[_0x58e5('0x38')][_0x58e5('0x21')](_0x1a9d5d)['destroy'](),this['_annotationToNarrowView'][_0x58e5('0x60')](_0x1a9d5d),_0x2e4f57[_0x58e5('0x26')]({'removedAnnotation':_0x1a9d5d,'previousAnnotation':_0x2034e2[_0x58e5('0x21')](_0x34f655-0x1),'nextAnnotation':_0x2034e2[_0x58e5('0x21')](_0x34f655+0x1)}),_0x1a9d5d===this[_0x58e5('0x5d')]&&this[_0x58e5('0xe')](null);},{'priority':_0x58e5('0x5f')}),this[_0x58e5('0x4')](_0x2034e2,_0x58e5('0x40'),(_0x354a5f,_0x38d1f9)=>{this[_0x58e5('0xe')](_0x38d1f9);}),this[_0x58e5('0x4')](_0x2034e2,'blur',()=>{this[_0x58e5('0xe')](null);}),this['_domEmitter'][_0x58e5('0x4')](document,_0x58e5('0x53'),(_0x46742f,_0x1efee6)=>{_0x1efee6[_0x58e5('0x54')]===_0x27fc61[_0x58e5('0x46')]&&_0x1f506e[_0x58e5('0x3')]&&(this[_0x58e5('0x1')][_0x58e5('0x4c')](_0x1f506e['content'][_0x58e5('0x58')]),this[_0x58e5('0x43')](),_0x1efee6[_0x58e5('0x10')](),_0x1efee6[_0x58e5('0x2f')]());}),this[_0x58e5('0x2e')][_0x58e5('0x4')](document,'mousedown',(_0x4480a5,_0x137be4)=>{const _0x25ac4d=_0x137be4[_0x58e5('0x42')];_0x1f506e['isVisible']&&_0x1f506e['element']['contains'](_0x25ac4d)||_0x2e4f57[_0x58e5('0x8')][_0x58e5('0x23')][_0x58e5('0x33')](_0x25ac4d)||_0x4480a5[_0x58e5('0x25')]||(this[_0x58e5('0x1')][_0x58e5('0x48')](),this['_hideBalloon'](),this[_0x58e5('0xe')](null));});const _0x30be80=this[_0x58e5('0x39')][_0x58e5('0x9')]?this[_0x58e5('0x39')][_0x58e5('0x9')]:new _0x11c168([this[_0x58e5('0x39')]]);for(const _0x534615 of _0x30be80)this['_integrateWithEditorAnnotations'](_0x534615);this[_0x58e5('0x4')](_0x30be80,_0x58e5('0x4c'),(_0x503a66,_0x530f67)=>{this[_0x58e5('0x4')](_0x530f67,_0x58e5('0x3f'),()=>{this[_0x58e5('0x57')](_0x530f67);});}),this[_0x58e5('0x4')](_0x30be80,_0x58e5('0x0'),(_0x1c79a8,_0x3bef02)=>{_0x3bef02[_0x58e5('0x3b')][_0x58e5('0x14')](_0x58e5('0x2'))&&this[_0x58e5('0x5b')](_0x3bef02[_0x58e5('0x3b')][_0x58e5('0x21')](_0x58e5('0x2')));}),window[_0x58e5('0x7')](_0x58e5('0x59'),this[_0x58e5('0x1f')]),this[_0x58e5('0x2a')]();}[_0x58e5('0xe')](_0x384535){if(_0x384535===this[_0x58e5('0x5d')])return;const _0x137bf1=this['context'][_0x58e5('0x3b')]['get']('Sidebar');if(_0x137bf1[_0x58e5('0x22')]({'blurredAnnotation':this[_0x58e5('0x5d')],'activatedAnnotation':_0x384535,'disableAnimationOnActivatedAnnotation':!0x0}),_0x384535)_0x137bf1[_0x58e5('0x37')](_0x384535)?this[_0x58e5('0x1c')](_0x384535):this[_0x58e5('0x43')]();else this['_hideBalloon']();this[_0x58e5('0x5d')]=_0x384535;}[_0x58e5('0x32')](){if(!this[_0x58e5('0x27')])throw new _0x19b1a3(_0x58e5('0x16'),this);this[_0x58e5('0xe')](null);const _0x1c0307=this['context'][_0x58e5('0x3b')][_0x58e5('0x21')](_0x58e5('0x20'));this[_0x58e5('0x43')](),Array['from'](this[_0x58e5('0x38')][_0x58e5('0x4d')](),_0x2f3fcc=>_0x2f3fcc[_0x58e5('0x5e')]()),this['_annotationToNarrowView'][_0x58e5('0x48')](),_0x1c0307[_0x58e5('0x44')](this[_0x58e5('0x41')]),this[_0x58e5('0x4e')](),this[_0x58e5('0x2e')][_0x58e5('0x4e')](),this[_0x58e5('0x4e')](this[_0x58e5('0x39')][_0x58e5('0x9')]);for(const _0x4ba6ef of Array[_0x58e5('0x1b')](this[_0x58e5('0x31')]))this[_0x58e5('0x5b')](_0x4ba6ef);window[_0x58e5('0x56')](_0x58e5('0x59'),this['_throttledRefreshPositioning']),this['_throttledRefreshPositioning']['cancel'](),this[_0x58e5('0x47')]=[],this['isAttached']=!0x1,this[_0x58e5('0x41')]=null;}[_0x58e5('0x5e')](){this['isAttached']&&this[_0x58e5('0x32')](),this['bodyCollection']['detachFromDom']();}[_0x58e5('0x57')](_0x5d5311){const _0x14bca9=_0x5d5311[_0x58e5('0x3b')][_0x58e5('0x21')](_0x58e5('0x2')),_0x705316=this[_0x58e5('0x39')][_0x58e5('0x3b')][_0x58e5('0x21')](_0x306749),_0x15defa=this['_annotations'],_0x1f7ddc=this[_0x58e5('0x30')],_0x298182=()=>{const _0x37ee04=_0x14bca9['getOrderedSelectedAnnotations']({'activeAnnotation':this['activeAnnotation'],'annotations':this['_annotations']});this['_setSelectedAnnotations'](_0x37ee04),this[_0x58e5('0xe')](_0x37ee04[0x0]||null);};this[_0x58e5('0x4')](_0x14bca9,'refresh',_0x298182),this[_0x58e5('0x4')](_0x14bca9,'blur',(_0x55767a,{isAnnotationTracked:_0x12774b})=>{this[_0x58e5('0x5d')]&&_0x12774b(this[_0x58e5('0x5d')])&&(this[_0x58e5('0x4f')]([]),this[_0x58e5('0xe')](null));}),this[_0x58e5('0x4')](_0x14bca9,_0x58e5('0x52'),()=>{this[_0x58e5('0x1f')]();}),this[_0x58e5('0x4')](_0x15defa,_0x58e5('0xa'),_0x499a27=>{_0x14bca9[_0x58e5('0x6')]()&&_0x499a27[_0x58e5('0x1e')]();},{'priority':_0x58e5('0xd')}),this[_0x58e5('0x2e')][_0x58e5('0x4')](document,_0x58e5('0x5a'),(_0x34ec50,_0x40b3d6)=>{const _0x34b8fa=_0x40b3d6[_0x58e5('0x42')];_0x1f7ddc[_0x58e5('0x3')]&&_0x1f7ddc[_0x58e5('0x23')]['contains'](_0x34b8fa)||_0x705316[_0x58e5('0x8')][_0x58e5('0x23')][_0x58e5('0x33')](_0x34b8fa)||this[_0x58e5('0x5d')]&&_0x14bca9['hasDomSelection']()&&(_0x298182(),_0x34ec50[_0x58e5('0x25')]=!0x0);},{'priority':_0x58e5('0xd')}),this[_0x58e5('0x31')][_0x58e5('0x4c')](_0x14bca9);}[_0x58e5('0x5b')](_0x4413f8){_0x4413f8&&(this['stopListening'](_0x4413f8),this[_0x58e5('0x31')][_0x58e5('0x0')](_0x4413f8));}['_setSelectedAnnotations'](_0x3b3569){for(const _0x2cb21e of this[_0x58e5('0x47')])_0x3b3569[_0x58e5('0x5')](_0x2cb21e)||this[_0x58e5('0x1')][_0x58e5('0x60')](_0x2cb21e[_0x58e5('0x8')]);this[_0x58e5('0x47')]=_0x3b3569;}[_0x58e5('0x2a')](){const _0x473a23=this[_0x58e5('0x30')];this[_0x58e5('0x41')][_0x58e5('0x3e')](),_0x473a23[_0x58e5('0x3')]&&this[_0x58e5('0x3a')]();}[_0x58e5('0x1c')](_0x52eb46){if(this[_0x58e5('0x1')]['has'](_0x52eb46[_0x58e5('0x8')]))return;const _0x1a5be4=this[_0x58e5('0x30')][_0x58e5('0x19')]['first'];_0x1a5be4!==_0x52eb46[_0x58e5('0x8')]?(_0x1a5be4&&this[_0x58e5('0x55')](_0x1a5be4),this[_0x58e5('0x15')](_0x52eb46[_0x58e5('0x8')]),this[_0x58e5('0x30')][_0x58e5('0x19')][_0x58e5('0x48')](),this[_0x58e5('0x30')][_0x58e5('0x19')][_0x58e5('0x4c')](_0x52eb46[_0x58e5('0x8')]),this[_0x58e5('0x3a')]()):this[_0x58e5('0x3a')]();}[_0x58e5('0x3a')](){const _0x1482fd=this[_0x58e5('0x30')]['content'][_0x58e5('0x58')],_0x58bb63=this[_0x58e5('0x41')][_0x58e5('0x4a')](_0x1482fd);if(!this[_0x58e5('0x38')][_0x58e5('0x14')](_0x58bb63))return;const _0x585b6c=this[_0x58e5('0x38')][_0x58e5('0x21')](_0x58bb63)[_0x58e5('0x23')],_0x40257e=function(){const _0x53e990=_0x23aed9[_0x58e5('0x2c')];return[_0x53e990['southArrowNorthEast'],_0x53e990[_0x58e5('0xc')],_0x53e990['southArrowNorth'],_0x53e990['northArrowSouth'],_0x53e990[_0x58e5('0x34')],_0x53e990[_0x58e5('0x12')]];}();this['balloonPanelView'][_0x58e5('0x36')]({'target':_0x585b6c,'positions':_0x40257e});}['_hideBalloon'](){const _0xb05b2a=this[_0x58e5('0x30')],_0x14f037=_0xb05b2a[_0x58e5('0x19')]['first'];_0x14f037&&(this[_0x58e5('0x55')](_0x14f037),_0xb05b2a[_0x58e5('0x2d')](),_0xb05b2a[_0x58e5('0x19')]['clear']());}['_attachListeners'](_0x7c7e73){this[_0x58e5('0x4')](_0x7c7e73,_0x58e5('0x1d'),()=>this['_updateBalloonPosition']()),this['listenTo'](_0x7c7e73,'Esc',(_0x2105a9,_0x3bd61f)=>{this[_0x58e5('0x1')][_0x58e5('0x4c')](_0x7c7e73),this[_0x58e5('0x43')](),_0x3bd61f();});}[_0x58e5('0x55')](_0x1c3044){this[_0x58e5('0x4e')](_0x1c3044);}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x6aa8=['view','_updateLastItem','bind','_sidebarItemViewToAnnotation','refresh','_annotations','container','sidebar.container','isAnimationDisabled','content','_alignAfterItem','getSidebarItemView','context','_getItemAfter','updateHeight','Sidebar','_getTargetTop','top','locale','isActive','_spaceBetweenItems','sidebar.preventScrollOutOfView','get','set','target','unbind','_setItemTop','listenTo','_detachFromContainer','minHeight','appendChild','element','change:top','getIndex','sidebar-setcontainer-invalid-element','stopListening','config','clear','remove','sidebar-attachtocontainer-missing-container','setContainer','bottom','_targetTop','_activeAnnotation','_alignBeforeItem','_alignToTargetRect','max','_destroySidebarItemView','_attachToContainer','init','targetRect','delete','add','_annotationToSidebarItemView','length','destroy','_lastItem','define','change:bottom','_getItemBefore','list','_createSidebarView','_getMaxAvailableTop'];(function(_0x36668f,_0x6aa844){const _0x323597=function(_0x4db177){while(--_0x4db177){_0x36668f['push'](_0x36668f['shift']());}};_0x323597(++_0x6aa844);}(_0x6aa8,0x148));const _0x3235=function(_0x36668f,_0x6aa844){_0x36668f=_0x36668f-0x0;let _0x323597=_0x6aa8[_0x36668f];return _0x323597;};import{ContextPlugin as _0x1fef07}from'ckeditor5/src/core';import _0xdee877 from'./view/sidebarview';import _0x2ac473 from'./view/sidebaritemview';import{Rect as _0x5daed1,CKEditorError as _0xadd2ea}from'ckeditor5/src/utils';import{isElement as _0x1858a1,throttle as _0x3148b1}from'lodash-es';export default class b extends _0x1fef07{static get['pluginName'](){return _0x3235('0x2');}constructor(_0xbd9b9c){super(_0xbd9b9c),this[_0x3235('0xa')]('_lastItem'),this[_0x3235('0x32')]=this['_createSidebarView'](),this[_0x3235('0xa')]('container',null),this[_0x3235('0x7')]=0x19,this[_0x3235('0x35')]=new Map(),this[_0x3235('0x28')]=new Map(),this[_0x3235('0x3e')]['config'][_0x3235('0x2c')](_0x3235('0x8'),!0x1),this['_annotations']=null,this[_0x3235('0x1e')]=null;}[_0x3235('0x24')](){const _0x51826e=this[_0x3235('0x3e')][_0x3235('0x17')][_0x3235('0x9')](_0x3235('0x39'));_0x51826e&&this[_0x3235('0x1b')](_0x51826e);}['setContainer'](_0x3205df){if(!_0x1858a1(_0x3205df))throw new _0xadd2ea(_0x3235('0x15'));this['container']=_0x3205df;}[_0x3235('0x23')]({viewClass:_0x475f80='',spaceBetweenItems:_0x2937d8=0x19}={}){if(!_0x1858a1(this[_0x3235('0x38')]))throw new _0xadd2ea(_0x3235('0x1a'),this);this[_0x3235('0x38')][_0x3235('0x11')](this['view']['element']),this[_0x3235('0x32')]['class']=_0x475f80,this[_0x3235('0x7')]=_0x2937d8;}['rearrange']({removedAnnotation:_0x573a0a,previousAnnotation:_0x2b914f,nextAnnotation:_0x59b599}){const _0xee054b=this['getSidebarItemView'](_0x573a0a);this[_0x3235('0x32')][_0x3235('0x2f')][_0x3235('0x19')](_0xee054b),this['_destroySidebarItemView'](_0x573a0a),_0x2b914f&&this[_0x3235('0x20')](this[_0x3235('0x3d')](_0x2b914f)),_0x59b599&&this[_0x3235('0x20')](this[_0x3235('0x3d')](_0x59b599)),this[_0x3235('0x33')]();}[_0x3235('0x36')]({blurredAnnotation:_0x30ca68,activatedAnnotation:_0x21708b,disableAnimationOnActivatedAnnotation:_0x165f85}){if(this['_activeAnnotation']=_0x21708b,_0x30ca68){_0x30ca68[_0x3235('0x6')]=!0x1;const _0x1560cf=this[_0x3235('0x3d')](_0x30ca68);_0x1560cf&&_0x165f85&&(_0x1560cf['isAnimationDisabled']=!0x1);}if(_0x21708b){const _0x43cf0b=this[_0x3235('0x3d')](_0x21708b);_0x43cf0b&&(_0x21708b[_0x3235('0x6')]=!0x0,_0x165f85&&(_0x43cf0b[_0x3235('0x3a')]=!0x0,_0x43cf0b[_0x3235('0x4')]+=0x1),this[_0x3235('0x20')](_0x43cf0b));}}[_0x3235('0xf')](_0x147c17){this[_0x3235('0x16')](),this[_0x3235('0x32')][_0x3235('0x12')][_0x3235('0x19')]();for(const _0x2d7935 of _0x147c17)this['_destroySidebarItemView'](_0x2d7935);this[_0x3235('0x32')][_0x3235('0x2f')][_0x3235('0x18')](),this[_0x3235('0x32')]['class']='',this[_0x3235('0x2b')]=null;}['addAnnotation'](_0x5dac3f,_0x4bf18c){_0x4bf18c||(_0x4bf18c=_0x5dac3f[_0x3235('0x32')]);const _0x5d8c57=new _0x2ac473(this[_0x3235('0x3e')][_0x3235('0x5')]);this['_sidebarItemViewToAnnotation'][_0x3235('0xa')](_0x5d8c57,_0x5dac3f),this[_0x3235('0x28')][_0x3235('0xa')](_0x5dac3f,_0x5d8c57),_0x5d8c57[_0x3235('0x3b')][_0x3235('0x27')](_0x4bf18c),this[_0x3235('0x20')](_0x5d8c57),this[_0x3235('0xe')](_0x5dac3f[_0x3235('0x32')],'change:targetRect',()=>{const _0x2993d8=this[_0x3235('0x3')](_0x5d8c57);_0x5d8c57[_0x3235('0x1d')]!=_0x2993d8&&(_0x5d8c57[_0x3235('0x1d')]=_0x2993d8,this[_0x3235('0xd')](_0x5d8c57,_0x2993d8));}),this[_0x3235('0xe')](_0x5d8c57,_0x3235('0x13'),_0x3148b1(()=>{if(!_0x5d8c57[_0x3235('0x3b')][_0x3235('0x29')])return;const _0x1943ba=this[_0x3235('0x2e')](_0x5d8c57);if(!_0x1943ba)return;const _0x2bc91c=this[_0x3235('0x35')][_0x3235('0x9')](_0x1943ba),_0x44ef8e=this[_0x3235('0x1e')];_0x44ef8e&&_0x44ef8e===_0x2bc91c?this[_0x3235('0x3c')](_0x1943ba,_0x5d8c57):this[_0x3235('0x1f')](_0x5d8c57,_0x1943ba);},0xa,{'leading':!0x1})),this[_0x3235('0xe')](_0x5d8c57,_0x3235('0x2d'),_0x3148b1(()=>{if(!_0x5d8c57['content'][_0x3235('0x29')])return;const _0x28594a=this[_0x3235('0x0')](_0x5d8c57);if(!_0x28594a)return;const _0x337d2a=this['_sidebarItemViewToAnnotation'][_0x3235('0x9')](_0x28594a),_0x33b2a7=this[_0x3235('0x3e')]['config'][_0x3235('0x9')](_0x3235('0x8')),_0x5b75d5=this['_activeAnnotation'];_0x5b75d5&&_0x5b75d5===_0x337d2a&&_0x33b2a7?(this[_0x3235('0x1f')](_0x28594a,_0x5d8c57),this[_0x3235('0x3c')](_0x5d8c57,_0x28594a)):_0x5b75d5&&_0x5b75d5===_0x337d2a?this[_0x3235('0x1f')](_0x28594a,_0x5d8c57):this[_0x3235('0x3c')](_0x5d8c57,_0x28594a);},0xa,{'leading':!0x1}));const _0x1c8257=this[_0x3235('0x2e')](_0x5d8c57);if(_0x1c8257)this[_0x3235('0x3c')](_0x1c8257,_0x5d8c57)||this['_alignToTargetRect'](_0x5d8c57);else this['_alignToTargetRect'](_0x5d8c57);return this[_0x3235('0x33')](),this['view']['list'][_0x3235('0x27')](_0x5d8c57),_0x5d8c57;}[_0x3235('0x3d')](_0x228598){return this[_0x3235('0x28')][_0x3235('0x9')](_0x228598);}[_0x3235('0x2a')](){this[_0x3235('0x32')][_0x3235('0x2a')]();}[_0x3235('0x22')](_0x3f5415){const _0x32470a=this[_0x3235('0x3d')](_0x3f5415);this[_0x3235('0x16')](_0x32470a),this[_0x3235('0x16')](_0x3f5415[_0x3235('0x32')]),_0x32470a[_0x3235('0x2a')](),this[_0x3235('0x28')]['delete'](_0x3f5415),this['_sidebarItemViewToAnnotation'][_0x3235('0x26')](_0x32470a);}[_0x3235('0x30')](){const _0x256edf=new _0xdee877(this[_0x3235('0x3e')][_0x3235('0x5')]);return _0x256edf['render'](),this['on']('change:_lastItem',(_0x4ad207,_0x3688a0,_0x1edf15,_0x15da7b)=>{_0x15da7b&&_0x256edf[_0x3235('0xc')](_0x3235('0x10')),_0x1edf15?_0x256edf[_0x3235('0x34')](_0x3235('0x10'))['to'](_0x1edf15,_0x3235('0x1c')):_0x256edf['minHeight']=null;}),_0x256edf;}[_0x3235('0x33')](){this[_0x3235('0x2b')]=this['getSidebarItemView'](this[_0x3235('0x37')]['last']);}[_0x3235('0x2e')](_0x2f908a){const _0x3cdc6b=this['_sidebarItemViewToAnnotation']['get'](_0x2f908a),_0x599ff3=this['_annotations'][_0x3235('0x9')](this['_annotations'][_0x3235('0x14')](_0x3cdc6b)-0x1);return _0x599ff3&&this[_0x3235('0x3d')](_0x599ff3);}['_getItemAfter'](_0x2cc8d1){const _0x5cff89=this[_0x3235('0x35')]['get'](_0x2cc8d1),_0x2648ba=this[_0x3235('0x37')]['get'](this[_0x3235('0x37')][_0x3235('0x14')](_0x5cff89)+0x1);return _0x2648ba&&this[_0x3235('0x3d')](_0x2648ba);}[_0x3235('0x1f')](_0x358608,_0x5b65c9){_0x358608['updateHeight']();const _0x298a78=H(_0x5b65c9[_0x3235('0x1c')]+this[_0x3235('0x7')],_0x358608[_0x3235('0x4')]);return!!_0x298a78&&(this[_0x3235('0xd')](_0x5b65c9,_0x5b65c9[_0x3235('0x4')]-_0x298a78),!0x0);}[_0x3235('0x3c')](_0x5673ae,_0x3e5888){_0x5673ae[_0x3235('0x1')]();const _0x10841d=H(_0x5673ae[_0x3235('0x1c')]+this['_spaceBetweenItems'],_0x3e5888[_0x3235('0x4')]);return!!_0x10841d&&(this['_setItemTop'](_0x3e5888,_0x3e5888[_0x3235('0x4')]+_0x10841d,!0x1),!0x0);}[_0x3235('0x20')](_0x23f142){const _0x3a04c2=this[_0x3235('0x35')][_0x3235('0x9')](_0x23f142);if(!_0x3a04c2||!_0x3a04c2[_0x3235('0xb')])return;const _0x596c83=this['_getTargetTop'](_0x23f142);this[_0x3235('0xd')](_0x23f142,_0x596c83);}['_getTargetTop'](_0xc2d715){const _0x29701a=this[_0x3235('0x35')][_0x3235('0x9')](_0xc2d715);if(null===_0x29701a[_0x3235('0x25')])return 0x0;if(_0x29701a[_0x3235('0xb')]instanceof _0x5daed1)return _0x29701a[_0x3235('0x25')][_0x3235('0x4')];{const _0x54d584=new _0x5daed1(this['view'][_0x3235('0x12')])[_0x3235('0x4')];return _0x29701a[_0x3235('0x25')][_0x3235('0x4')]-_0x54d584;}}[_0x3235('0xd')](_0x417629,_0x31890e,_0x5f04dc=this[_0x3235('0x3e')][_0x3235('0x17')][_0x3235('0x9')](_0x3235('0x8'))){_0x5f04dc&&(_0x31890e=Math[_0x3235('0x21')](_0x31890e,this[_0x3235('0x31')](_0x417629))),_0x417629['top']=_0x31890e;}[_0x3235('0x31')](_0x18e052){let _0x8da68c=this[_0x3235('0x2e')](_0x18e052),_0x4ffa46=0x0;for(;_0x8da68c;)_0x8da68c['updateHeight'](),_0x4ffa46+=this[_0x3235('0x7')]+_0x8da68c['height'],_0x8da68c=this[_0x3235('0x2e')](_0x8da68c);return _0x4ffa46;}}function H(_0x57938b,_0x425b67){return Math[_0x3235('0x21')](_0x57938b-_0x425b67,0x0);}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x4f29=['bind','add','ck-annotation-counter','bindTemplate','isDirty','icon','setTemplate','children','ck-annotation-counter__badge--edit-mode','span','_badge','extendTemplate','number','counterView','annotationType','set'];(function(_0x22a084,_0x4f2914){const _0x559d55=function(_0x19e01f){while(--_0x19e01f){_0x22a084['push'](_0x22a084['shift']());}};_0x559d55(++_0x4f2914);}(_0x4f29,0xf5));const _0x559d=function(_0x22a084,_0x4f2914){_0x22a084=_0x22a084-0x0;let _0x559d55=_0x4f29[_0x22a084];return _0x559d55;};import{ButtonView as _0x165ede,View as _0x33533b}from'ckeditor5/src/ui';import _0x5bd713 from'../../../theme/icons/add-comment.svg';export default class B extends _0x165ede{constructor(_0x50c9f9){super(_0x50c9f9);const _0x2ca483=this[_0x559d('0xe')];this['set']('isDirty',!0x1),this[_0x559d('0xa')]('number',0x0),this[_0x559d('0xb')](_0x559d('0x5'))['to'](this,'isDirty',this,_0x559d('0x7'),(_0x58c579,_0xfe3fc1)=>_0x58c579?'...':_0xfe3fc1),this[_0x559d('0xa')]('annotationType',''),this[_0x559d('0x0')]=_0x5bd713,this[_0x559d('0x6')]({'attributes':{'class':[_0x559d('0xd')]}}),this['counterView']=new _0x33533b(),this[_0x559d('0x8')][_0x559d('0x1')]({'tag':_0x559d('0x4'),'attributes':{'class':['ck-annotation-counter__badge',_0x2ca483['to'](_0x559d('0x9'),_0x2bf509=>'ck-annotation-counter__badge--'+_0x2bf509),_0x2ca483['if'](_0x559d('0xf'),_0x559d('0x3'))]},'children':[{'text':_0x2ca483['to'](_0x559d('0x5'))}]}),this[_0x559d('0x2')][_0x559d('0xc')](this['counterView']);}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x32cc=['setTemplate','type','content','listenTo','bindTemplate','Esc','isDirty','ck-rounded-corners','createCollection','height','ck-annotation-wrapper','focus','div','length','_updateHeight','keystrokes','clear','clientHeight','add','focusTracker','detach','fire','element','destroy','set','mainView','ck-annotation-wrapper--active'];(function(_0x11f6cf,_0x32cc43){const _0x48cf2a=function(_0xc640fb){while(--_0xc640fb){_0x11f6cf['push'](_0x11f6cf['shift']());}};_0x48cf2a(++_0x32cc43);}(_0x32cc,0xaf));const _0x48cf=function(_0x11f6cf,_0x32cc43){_0x11f6cf=_0x11f6cf-0x0;let _0x48cf2a=_0x32cc[_0x11f6cf];return _0x48cf2a;};import{View as _0xff819f}from'ckeditor5/src/ui';import{FocusTracker as _0x5a0a6e,KeystrokeHandler as _0x3420c8,uid as _0x34e889}from'ckeditor5/src/utils';import _0x75e86e from'../../utils/createmutationobserver';import'../../../theme/annotation.css';export default class v extends _0xff819f{constructor(_0x24f1f7,_0x248384){super(_0x24f1f7),this['id']=_0x34e889(),this[_0x48cf('0x6')]=new _0x5a0a6e(),this['keystrokes']=new _0x3420c8(),this[_0x48cf('0x2')][_0x48cf('0xb')](_0x48cf('0x13'),(_0x395647,_0x4570de)=>this[_0x48cf('0x8')](_0x48cf('0x13'),_0x4570de)),this[_0x48cf('0xb')]('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this[_0x48cf('0xb')]('height',0x0),this[_0x48cf('0xb')]('isActive',!0x1),this[_0x48cf('0xb')](_0x48cf('0x14'),!0x1),this[_0x48cf('0xb')](_0x48cf('0x0'),0x0),this['set'](_0x48cf('0xf'),''),this['_mutationObserver']=_0x75e86e(()=>this[_0x48cf('0x1')]()),this[_0x48cf('0x10')]=this[_0x48cf('0x16')](),this[_0x48cf('0x10')]['add'](_0x248384),this[_0x48cf('0xc')]=_0x248384;const _0x721e4a=this[_0x48cf('0x12')];this[_0x48cf('0xe')]({'tag':_0x48cf('0x1a'),'attributes':{'class':['ck',_0x48cf('0x18'),_0x48cf('0x15'),_0x721e4a['if']('isActive',_0x48cf('0xd'))],'tabindex':-0x1},'children':this['content']});}['render'](){super['render'](),this[_0x48cf('0x6')][_0x48cf('0x5')](this[_0x48cf('0x9')]),this[_0x48cf('0x2')][_0x48cf('0x11')](this[_0x48cf('0x9')]),this['_mutationObserver']['attach'](this[_0x48cf('0x9')]);}[_0x48cf('0xa')](){this[_0x48cf('0x10')][_0x48cf('0x3')](),this['keystrokes']['destroy'](),this[_0x48cf('0x6')][_0x48cf('0xa')](),this['_mutationObserver'][_0x48cf('0x7')](),super['destroy']();}[_0x48cf('0x19')](){this[_0x48cf('0x9')][_0x48cf('0x19')]();}[_0x48cf('0x1')](){const _0x44f3cc=this[_0x48cf('0x9')][_0x48cf('0x4')];_0x44f3cc&&(this[_0x48cf('0x17')]=_0x44f3cc);}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x1576=['updateHeight','render','_mutationObserver','ck-sidebar-item','div','clear','bind','element','bindTemplate','ck-sidebar-item--no-animation','createCollection','detach','content','destroy','_targetTop','height','isAnimationDisabled','setTemplate','top','set','bottom'];(function(_0x79b508,_0x157680){const _0x30f303=function(_0x1d4b57){while(--_0x1d4b57){_0x79b508['push'](_0x79b508['shift']());}};_0x30f303(++_0x157680);}(_0x1576,0x83));const _0x30f3=function(_0x79b508,_0x157680){_0x79b508=_0x79b508-0x0;let _0x30f303=_0x1576[_0x79b508];return _0x30f303;};import{View as _0x5688e3}from'ckeditor5/src/ui';import{toUnit as _0x1dc2f1}from'ckeditor5/src/utils';import _0x1ddf8b from'../../utils/createmutationobserver';const ft=_0x1dc2f1('px');export default class C extends _0x5688e3{constructor(_0x4826e5){super(_0x4826e5),this['set'](_0x30f3('0xd')),this[_0x30f3('0xe')](_0x30f3('0xa'),0x0),this[_0x30f3('0x1')](_0x30f3('0xf'))['to'](this,_0x30f3('0xd'),this,_0x30f3('0xa'),(_0x11d563,_0xb26ed6)=>(_0x11d563||0x0)+_0xb26ed6),this['set']('isAnimationDisabled',!0x1),this[_0x30f3('0x12')]=_0x1ddf8b(()=>this[_0x30f3('0x10')]()),this[_0x30f3('0x9')]=null,this['content']=this[_0x30f3('0x5')]();const _0x18414e=this[_0x30f3('0x3')];this[_0x30f3('0xc')]({'tag':_0x30f3('0x14'),'attributes':{'class':[_0x30f3('0x13'),_0x18414e['to'](_0x30f3('0xb'),_0x317082=>_0x317082?_0x30f3('0x4'):'')],'style':{'top':_0x18414e['to'](_0x30f3('0xd'),ft)}},'children':this[_0x30f3('0x7')]});}[_0x30f3('0x11')](){super[_0x30f3('0x11')](),this[_0x30f3('0x12')]['attach'](this[_0x30f3('0x2')]);}[_0x30f3('0x10')](){const _0x165eb4=this[_0x30f3('0x2')]['clientHeight'];_0x165eb4&&(this[_0x30f3('0xa')]=_0x165eb4);}[_0x30f3('0x8')](){this[_0x30f3('0x7')][_0x30f3('0x0')](),this[_0x30f3('0x12')][_0x30f3('0x6')](),super[_0x30f3('0x8')]();}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) 2016 -
|
|
2
|
+
* Copyright (c) 2016 - 2022, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
*
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -20,4 +20,4 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const _0x852d=['list','setTemplate','minHeight','createCollection','div','ck-sidebar','ck-reset','set','class'];(function(_0x29dd54,_0x852d01){const _0x481467=function(_0x5d47b0){while(--_0x5d47b0){_0x29dd54['push'](_0x29dd54['shift']());}};_0x481467(++_0x852d01);}(_0x852d,0x114));const _0x4814=function(_0x29dd54,_0x852d01){_0x29dd54=_0x29dd54-0x0;let _0x481467=_0x852d[_0x29dd54];return _0x481467;};import{View as _0x54697a}from'ckeditor5/src/ui';import{toUnit as _0x12f0d4}from'ckeditor5/src/utils';import'../../../theme/sidebar.css';const ft=_0x12f0d4('px');export default class T extends _0x54697a{constructor(_0x1bd18b){super(_0x1bd18b);const _0x1a51aa=this['bindTemplate'];this[_0x4814('0x1')](_0x4814('0x5'),0x0),this[_0x4814('0x1')](_0x4814('0x2'),''),this[_0x4814('0x3')]=this[_0x4814('0x6')](),this[_0x4814('0x4')]({'tag':_0x4814('0x7'),'attributes':{'class':['ck',_0x4814('0x8'),_0x4814('0x0'),_0x1a51aa['to'](_0x4814('0x2'))],'style':{'minHeight':_0x1a51aa['to'](_0x4814('0x5'),_0x42899e=>_0x42899e?ft(_0x42899e+0xa):null)}},'children':this['list']});}}
|