@ckeditor/ckeditor5-comments 48.2.0-alpha.7 → 48.3.0-alpha.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/dist/annotations/annotation.d.ts +84 -87
- package/dist/annotations/annotationcollection.d.ts +83 -83
- package/dist/annotations/annotations.d.ts +148 -148
- package/dist/annotations/annotationsuis.d.ts +235 -235
- package/dist/annotations/editorannotations.d.ts +71 -71
- package/dist/annotations/inlineannotations.d.ts +93 -93
- package/dist/annotations/narrowsidebar.d.ts +88 -88
- package/dist/annotations/sidebar.d.ts +105 -105
- package/dist/annotations/view/annotationcounterbuttonview.d.ts +24 -24
- package/dist/annotations/view/annotationview.d.ts +83 -83
- package/dist/annotations/view/sidebaritemview.d.ts +54 -54
- package/dist/annotations/view/sidebarview.d.ts +48 -48
- package/dist/annotations/widesidebar.d.ts +80 -80
- package/dist/augmentation.d.ts +57 -57
- package/dist/comments/addcommentthreadcommand.d.ts +69 -69
- package/dist/comments/commentsarchive.d.ts +34 -34
- package/dist/comments/commentsarchiveui.d.ts +48 -48
- package/dist/comments/commentsediting.d.ts +90 -90
- package/dist/comments/commentsrepository.d.ts +1042 -1054
- package/dist/comments/commentsui.d.ts +40 -40
- package/dist/comments/integrations/clipboard.d.ts +21 -21
- package/dist/comments/integrations/commentsrestrictededitingmode.d.ts +12 -12
- package/dist/comments/integrations/importword.d.ts +16 -16
- package/dist/comments/integrations/showcommenthighlights.d.ts +14 -14
- package/dist/comments/ui/commenteditor/commenteditor.d.ts +33 -32
- package/dist/comments/ui/commenteditor/commenteditorui.d.ts +27 -27
- package/dist/comments/ui/commenteditor/commenteditoruiview.d.ts +32 -32
- package/dist/comments/ui/commentthreadcontroller.d.ts +62 -60
- package/dist/comments/ui/view/basecommentthreadview.d.ts +134 -134
- package/dist/comments/ui/view/basecommentview.d.ts +136 -136
- package/dist/comments/ui/view/collapsedcommentsview.d.ts +9 -9
- package/dist/comments/ui/view/commentcontentview.d.ts +10 -10
- package/dist/comments/ui/view/commentinputview.d.ts +93 -93
- package/dist/comments/ui/view/commentsarchiveview.d.ts +41 -41
- package/dist/comments/ui/view/commentslistview.d.ts +107 -107
- package/dist/comments/ui/view/commentthreadheadercontextview.d.ts +19 -19
- package/dist/comments/ui/view/commentthreadheaderview.d.ts +67 -67
- package/dist/comments/ui/view/commentthreadinputview.d.ts +51 -51
- package/dist/comments/ui/view/commentthreadview.d.ts +116 -116
- package/dist/comments/ui/view/commentview.d.ts +225 -230
- package/dist/comments.d.ts +38 -38
- package/dist/commentsonly.d.ts +36 -36
- package/dist/config.d.ts +186 -186
- package/dist/index.d.ts +35 -35
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/dist/utils/common-translations.d.ts +6 -6
- package/dist/utils/createmutationobserver.d.ts +9 -9
- package/dist/utils/splitmarkername.d.ts +10 -10
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>bt)());constructor(_0x3ea1fc={}){function _0x134431(_0x46f1c4){return _0x46f1c4['map'](_0x17b10c=>String['fromCharCode'](_0x17b10c))['join']('');}(_0x3ea1fc=Object['assign']({},_0x3ea1fc))['plugins']||(_0x3ea1fc['plugins']=CommentEditor['defaultPlugins']),super(_0x3ea1fc),this['ui']=new CommentEditorUI(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x134431([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x134431([0x76,0x69,0x65,0x77])][_0x134431([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x134431([0x61,0x75,0x74,0x6f]),this[_0x134431([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x134431([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x134431([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x134431([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x134431([0x6f,0x6b])});}['create'](){const _0x33a1ee=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x33a1ee))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2869b0=>{const _0x53edbf=this['model']['document']['getRoot'](),_0x3da6ec=_0x53edbf&&_0x53edbf['getChild'](_0x53edbf['childCount']-0x1);_0x2869b0['setSelection'](_0x3da6ec,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3c16be=this['editing']['view'],_0xf2f376=_0x3c16be['document']['getRoot'](),_0x57868c=_0xf2f376['getChild'](0x0);_0xf2f376['childCount']>0x1||!_0x57868c||'p'!=_0x57868c['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x3c16be,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x57868c['placeholder']=this['placeholder']),lt({'view':_0x3c16be,'element':_0x57868c,'keepOnFocus':!0x0}),this['placeholderElement']=_0x57868c);}}class CommentInputView extends _0xfc41b8{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3c27b7,_0x304f96={}){super(_0x3c27b7),this['editor']=null,this['_editorConfig']=_0x304f96,this['set']('value',_0x304f96['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',vt(_0x3c27b7,'Reply...')),this['set']('submitLabel',vt(_0x3c27b7,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0xa713a2(),this['focusTracker']=new _0x266855(),this['focusCycler']=new _0x4af7f0({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4d81d6=>!_0x4d81d6['defaultPrevented']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x17fa28,_0x18db9e)=>{this['cancelButtonView']['fire']('execute'),_0x18db9e();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3ff2eb,_0x5c6ce1)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5c6ce1());}),this['on']('submit',(_0x503e66,_0x2b554c)=>{_0x2b554c['length']>0xfde8?(alert(vt(_0x3c27b7,'TOO_LONG_COMMENT_ALERT',[_0x2b554c['length'],0xfde8])),_0x503e66['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new CommentEditor(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x57a902=this['editor'];this['element']['insertBefore'](_0x57a902['ui']['element'],this['element']['firstChild']),_0x57a902['model']['document']['on']('change',()=>this['value']=_0x57a902['getData']()),_0x57a902['bind']('placeholder')['to'](this),this['focusables']['add'](_0x57a902['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x58ce45){-0x1===_0x58ce45?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x500a77}=this,_0x47c1ef=new _0x4f2fe4(_0x500a77);return _0x47c1ef['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x47c1ef['withText']=!0x0,_0x47c1ef['bind']('label')['to'](this,'submitLabel'),_0x47c1ef['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x47c1ef['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4cb7e2,_0x3bab38)=>!_0x3bab38&&!!_0x4cb7e2['trim']()),_0x47c1ef;}['_createCancelButton'](){const {locale:_0x2034d3}=this,_0x204dee=new _0x4f2fe4(_0x2034d3);return _0x204dee['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x204dee['label']=vt(_0x2034d3,'Cancel'),_0x204dee['withText']=!0x0,_0x204dee['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x204dee;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x57786d=>{this['focusTracker']['add'](_0x57786d['element']);}),this['focusables']['on']('change',(_0x29b7d1,_0x3fd0a7)=>{for(const _0x21e7c4 of Array['from'](_0x3fd0a7['added'])['reverse']())this['focusTracker']['add'](_0x21e7c4['element']);});}}class CommentThreadInputView extends _0xfc41b8{constructor(_0x59952e,_0x8e176e,_0x2023d9){super(_0x59952e),this['commentInputView']=new CommentInputView(_0x59952e,_0x2023d9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3b82d1,_0x1f268b)=>_0x3b82d1||!!_0x1f268b),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x5a8984(_0x59952e,_0x8e176e),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x28bf30){this['commentInputView']['focus'](_0x28bf30);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x233b04,_0x16524b)=>{const {submitButtonView:_0x59bfae,cancelButtonView:_0x39f033,editor:_0x24b7ae}=this['commentInputView'];[_0x59bfae['element'],_0x39f033['element'],_0x24b7ae?_0x24b7ae['editing']['view']['getDomRoot']():null]['filter'](_0x2977c2=>_0x2977c2)['some'](_0x30e300=>_0x30e300['contains'](_0x16524b['target']))||(this['focus'](),_0x16524b['preventDefault']());});}}class CollapsedCommentsView extends _0xfc41b8{constructor(_0x383c1d){super(_0x383c1d);const _0x3d3638=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3d3638['to']('count',_0x4330b2=>vt(_0x383c1d,'NUMBER_OF_COMMENTS',_0x4330b2))}]});}}class CommentsListView extends _0xfc41b8{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2a9911,_0x4df3cf,_0x46a924){super(_0x2a9911);const _0x2f65c7=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4df3cf['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4df3cf,this['_config']=_0x46a924,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x266855(),this['keystrokes']=new _0xa713a2(),this['focusCycler']=new _0x4af7f0({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x545e91=>this['commentViews']['map'](_0x20af70=>_0x20af70['element'])['includes'](_0x545e91['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new CollapsedCommentsView(_0x2a9911),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2f3f73=>_0x2f3f73-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5ee987 of _0x4df3cf['comments'])this['_handleNewCommentModel'](_0x5ee987);this['_handleInfoComment'](),this['listenTo'](_0x4df3cf['comments'],'add',(_0x54a2f3,_0x4daff2)=>{const _0x89cb80=this['_calculatePosition'](_0x4daff2);this['length']++,this['_handleNewCommentModel'](_0x4daff2,_0x89cb80),this['refreshVisibleViews']();}),this['listenTo'](_0x4df3cf['comments'],'remove',(_0xb248ca,_0x4de60a)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4de60a),this['refreshVisibleViews']();}),this['listenTo'](_0x4df3cf,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4df3cf,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x2f65c7['if']('length','ck-hidden',_0x1746c4=>!_0x1746c4)],'aria-label':vt(_0x2a9911,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x3f560f){-0x1===_0x3f560f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4ec3be of this['commentViews'])_0x4ec3be['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x2e7ae7,_0x21cadc){const _0x16cb44=new this['_config']['CommentView'](this['locale'],_0x2e7ae7,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x16cb44['viewUid']=_0x2e7ae7['id'],_0x16cb44['delegate']('removeComment')['to'](this),_0x16cb44['delegate']('updateComment')['to'](this),_0x16cb44['delegate']('resolveCommentThread')['to'](this),_0x16cb44['delegate']('editorReady')['to'](this),_0x16cb44['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x16cb44,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x16cb44,_0x21cadc);}['_calculatePosition'](_0x33af73){const _0x447af5=this['_model']['_findOptimalIndex'](_0x33af73);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x33af73['authoredAt']?_0x447af5-0x1:_0x447af5:_0x447af5-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x8aa05e={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':vt(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x8aa05e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x8aa05e));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x20f094){const _0x2e727c=this['commentViews']['remove'](_0x20f094['id']);this['stopListening'](_0x2e727c),_0x2e727c['isEditMode']&&this['_updateHasDirtyComment'](),_0x2e727c['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x361a78=>_0x361a78['isEditMode']);}['_rearrangeCollapse'](){const _0xaf5b7d=function(_0x1d7d9e){const _0x230573=new _0x1c17cd();for(const _0x477e79 of _0x1d7d9e)_0x230573['add'](_0x477e79);return _0x230573;}(this['commentViews']),_0x3d331b=this['_collapsedCommentsView']['count'];for(let _0x20974c=0x1;_0x20974c<=_0x3d331b;_0x20974c++)_0xaf5b7d['remove'](0x1);for(const _0x37f1cd of _0xaf5b7d)_0x37f1cd['collapse']();_0x3d331b>0x0&&_0xaf5b7d['add'](this['_collapsedCommentsView'],0x1),Et(_0x25d148(Array['from'](this['visibleViews']),Array['from'](_0xaf5b7d)),this['visibleViews'],_0xaf5b7d);}['_rearrangeExpand'](){Et(_0x25d148(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x27e47a of this['visibleViews'])_0x27e47a['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5c47f7=>{this['focusTracker']['add'](_0x5c47f7['element']),this['keystrokes']['listenTo'](_0x5c47f7['element']);}),this['commentViews']['on']('change',(_0x12d8d4,_0x4db774)=>{for(const _0x21bd66 of _0x4db774['removed'])this['focusTracker']['remove'](_0x21bd66['element']),this['keystrokes']['stopListening'](_0x21bd66['element']);for(const _0x228371 of Array['from'](_0x4db774['added'])['reverse']())this['focusTracker']['add'](_0x228371['element']),this['keystrokes']['listenTo'](_0x228371['element']);});}}function Et(_0x1d85c9,_0x3308ae,_0x221ccf){let _0x6c95a5=0x0;for(const _0x4e6c71 of _0x1d85c9)switch(_0x4e6c71){case'insert':_0x3308ae['add'](_0x221ccf['get'](_0x6c95a5),_0x6c95a5),_0x6c95a5++;break;case'delete':_0x3308ae['remove'](_0x6c95a5);break;case'equal':_0x6c95a5++;}}class CommentThreadHeaderContextView extends _0xfc41b8{constructor(_0x22180f){super(_0x22180f);const _0x64ba62=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x64ba62['to']('contextValue',_0x1fd326=>vt(_0x22180f,'THREAD_CONTEXT_LABEL',_0x1fd326)),'tabindex':-0x1},'children':[{'text':_0x64ba62['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class CommentThreadHeaderView extends _0xfc41b8{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2c2668,_0x47dcc4){super(_0x2c2668);const _0x26f031=this['bindTemplate'];this['_model']=_0x47dcc4,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x266855(),this['keystrokes']=new _0xa713a2(),this['focusCycler']=new _0x4af7f0({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3f741d=>!!_0x3f741d),this['bind']('contextValue')['to'](this['_model'],'context',_0x32efc3=>_0x32efc3&&_0x32efc3['value']?this['_trimContextValue'](_0x32efc3['value']):vt(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x26f031['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x4c50be=new _0x4f2fe4(this['locale']);return _0x4c50be['label']=vt(this['locale'],'Reopen'),_0x4c50be['tooltip']=vt(this['locale'],'Reopen'),_0x4c50be['icon']=_0x3843e3,_0x4c50be['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3edd62=>!_0x3edd62),_0x4c50be['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x12df09,_0x553489)=>_0x12df09&&_0x553489),_0x4c50be['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4c50be;}['_trimContextValue'](_0x229abb){if(_0x229abb['length']<0x96)return _0x229abb;const _0x2a9f50=_0x229abb['lastIndexOf']('\x20',0x93);return _0x229abb['substring'](0x0,_0x2a9f50>-0x1?_0x2a9f50:0x93)+'...';}['_attachContextActions'](){const _0x56f5ec=this['element']['querySelector']('.ck-context'),_0x390eb7=_0x56f5ec['querySelector']('.ck-context__value');this['listenTo'](_0x56f5ec,'mouseenter',()=>{_0x390eb7['offsetWidth']<_0x390eb7['scrollWidth']&&_0x56f5ec['classList']['add']('overlay');}),this['listenTo'](_0x56f5ec,'mouseleave',()=>{_0x56f5ec['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x1522ac of this['focusables'])this['focusTracker']['add'](_0x1522ac['element']),this['keystrokes']['listenTo'](_0x1522ac['element']);}['_createContextView'](){const _0x5bcebb=new CommentThreadHeaderContextView(this['locale']);return _0x5bcebb['bind']('contextValue')['to'](this),_0x5bcebb;}}class BaseCommentThreadView extends _0xfc41b8{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5b43e8,_0x434385,_0x5f3f5f,_0x2810a3){super(_0x5b43e8),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x434385,this['_localUser']=_0x5f3f5f,this['_config']=_0x2810a3,this['commentThreadHeaderView']=new CommentThreadHeaderView(_0x5b43e8,_0x434385),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x218140(_0x5b43e8,vt(_0x5b43e8,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new CommentsListView(_0x5b43e8,_0x434385,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2810a3)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x2f8702,_0x11e845)=>_0x2f8702||!!_0x11e845),this['bind']('isUnlinked')['to'](_0x434385,'unlinkedAt',_0x523eba=>!!_0x523eba),this['bind']('ariaLabel')['to'](this,'length',_0x56d3b5=>{const _0x29a5f4=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return vt(this['locale'],'COMMENT_THREAD_LABEL',[_0x56d3b5,_0x29a5f4]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x266855(),this['keystrokes']=new _0xa713a2(),this['focusCycler']=new _0x4af7f0({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x21560c=>_0x21560c['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0x3110ee(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x531318=new CommentThreadInputView(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x24ea85=_0x531318['commentInputView'];return _0x531318['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x24ea85,'value',(_0x67b141,_0x8d68d5,_0x22fafb,_0x45fff5,_0x160fa6)=>!!_0x160fa6||!!_0x45fff5&&_0x22fafb&&!_0x8d68d5||_0x67b141&&_0x22fafb&&!_0x8d68d5),_0x24ea85['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x368968,_0x191a20,_0xa75859)=>{let _0x5ed0a6;return _0x5ed0a6=_0xa75859&&_0x191a20?'Reply\x20to\x20reopen\x20discussion...':_0x368968?'Reply...':'Write\x20a\x20comment...',vt(this['locale'],_0x5ed0a6);}),_0x24ea85['bind']('submitLabel')['to'](this,'length',_0x3d9abd=>vt(this['locale'],_0x3d9abd?'Reply':'Comment')),_0x24ea85['on']('submit',(_0x19a588,_0x488697)=>{this['fire']('addComment',_0x488697),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x24ea85['on']('cancel',()=>{this['focus']();}),_0x24ea85['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x24ea85['on']('cancel',_0x466bad=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x466bad['stop']());}),this['on']('change:isActive',(_0x306a4a,_0x24fba9,_0x529bd9)=>{_0x529bd9||this['length']||_0x24ea85['value']||this['fire']('removeCommentThread');}),_0x531318;}}class CommentThreadView extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x1b707f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x593ab9,target:_0xa9d2f4,type:_0x420902,isVisible:_0xdf43bd=!0x0}){super(),this['view']=_0x593ab9,this['view']['element']||this['view']['render'](),this['_type']=_0x420902,this['_target']=_0xa9d2f4,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1c17cd([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xadcdcd,_0x419064)=>{this['view']['focusTracker']['add'](_0x419064);}),this['focusableElements']['on']('remove',(_0xb4da3e,_0x49d1aa)=>{this['view']['focusTracker']['remove'](_0x49d1aa);}),this['set']('isVisible',_0xdf43bd);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1e5c93=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x1e5c93),_0x1e5c93;}get['targetRect'](){const _0x8f9ba=this['target'];if(null===_0x8f9ba)return null;if(_0x8f9ba instanceof _0x36862e)return _0x8f9ba;const _0x4c418e=_0x8f9ba['filter'](_0x28d601=>function(_0x8a49c3){const _0x3f3fce=_0x8a49c3['offsetParent'];if(_0x3f3fce)return!0x0;const _0x189570=_0x8a49c3['getClientRects']()['item'](0x0);return!!_0x189570;}(_0x28d601));return 0x0===_0x4c418e['length']?null:_0x36862e['getDomElementRects'](_0x4c418e[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x16b9d7){this['view']['isActive']=_0x16b9d7,this['view']['mainView']['isActive']=_0x16b9d7;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x52bd3f){if(!(null===_0x52bd3f||_0x52bd3f instanceof _0x36862e||Array['isArray'](_0x52bd3f)&&_0x52bd3f['every'](_0x3339d2=>kt(_0x3339d2))))throw new _0x381f6d('annotation-invalid-target',null,{'target':_0x52bd3f});}['_getNormalizedTarget'](){const _0x38877='function'==typeof this['_target']?this['_target']():this['_target'];return kt(_0x38877)?[_0x38877]:_0x38877;}}function kt(_0x1a3657){return null!==_0x1a3657&&'object'==typeof _0x1a3657&&'nodeType'in _0x1a3657&&0x1===_0x1a3657['nodeType'];}class AnnotationCollection extends _0x1c17cd{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x31e0c1=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x266855(),this['_focusTracker']['on']('change:isFocused',(_0x4b2751,_0x1852f8,_0x136b23)=>{_0x136b23||this['fire']('blur');});for(const _0x119e51 of _0x31e0c1)this['add'](_0x119e51);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x25021a){if(this['has'](_0x25021a))throw new _0x381f6d('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x25021a['innerView'],_0x25021a),this['_viewToAnnotation']['set'](_0x25021a['view'],_0x25021a);for(const _0x12ff40 of _0x25021a['focusableElements'])this['_focusTracker']['add'](_0x12ff40);if(this['listenTo'](_0x25021a['focusableElements'],'add',(_0x1df52e,_0x2d02be)=>{this['_focusTracker']['add'](_0x2d02be);}),this['listenTo'](_0x25021a['focusableElements'],'remove',(_0x3820ae,_0x42bacb)=>{this['_focusTracker']['remove'](_0x42bacb);}),this['listenTo'](_0x25021a['view']['focusTracker'],'change:isFocused',(_0x239da8,_0x506bfc,_0x1d8d23)=>{_0x1d8d23&&this['fire']('focus',_0x25021a);}),_0x25021a['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x386e79 of this)_0x386e79['updateTargetRect']();}const _0x5d940d=this['_getOrderInContent'](_0x25021a['view']['targetRect']);return super['add'](_0x25021a,_0x5d940d);}['remove'](_0x7b587){if(!this['has'](_0x7b587))throw new _0x381f6d('annotationcollection-not-existing-item',null);this['stopListening'](_0x7b587['view']['focusTracker']),this['stopListening'](_0x7b587['focusableElements']);for(const _0xd34e97 of _0x7b587['focusableElements'])this['_focusTracker']['remove'](_0xd34e97);return this['_viewToAnnotation']['delete'](_0x7b587['view']),this['_innerViewToAnnotation']['delete'](_0x7b587['innerView']),super['remove'](_0x7b587);}['getByInnerView'](_0x3fbc95){return this['_innerViewToAnnotation']['get'](_0x3fbc95);}['getByView'](_0x211755){return this['_viewToAnnotation']['get'](_0x211755);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x199cd0 of this)_0x199cd0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4f3fef=Array['from'](this)['sort']((_0x222c2a,_0x2bd398)=>Rt(_0x222c2a['view']['targetRect'],_0x2bd398['view']['targetRect']));for(let _0x4380ac=_0x4f3fef['length']-0x1;_0x4380ac>0x0;_0x4380ac--){const _0x8dfccf=_0x4f3fef[_0x4380ac];_0x4380ac!==this['getIndex'](_0x8dfccf)&&(this['remove'](_0x8dfccf),this['add'](_0x8dfccf));}}['_getOrderInContent'](_0x478c24){let _0x3e2107=0x0;if(!_0x478c24)return this['length'];for(const _0x5aa2c7 of this){const _0xb0dbe=_0x5aa2c7['view']['targetRect'];if(_0xb0dbe){if(Rt(_0x478c24,_0xb0dbe)<0x0)return _0x3e2107;_0x3e2107++;}}return _0x3e2107;}['_areCachedRectsStale'](){const _0x10b03e=this['get'](0x0);if(!_0x10b03e)return!0x1;const _0x39b40d=_0x10b03e['view']['targetRect'],_0x5d9b51=_0x10b03e['targetRect'];return!(!_0x39b40d||!_0x5d9b51)&&(_0x39b40d['top']!==_0x5d9b51['top']||_0x39b40d['left']!==_0x5d9b51['left']);}}function Ot({source:_0x2d8fa4,target:_0x53b07e,filter:_0x293b74}){for(const _0xe67cd8 of _0x2d8fa4)_0x293b74(_0xe67cd8)&&_0x53b07e['add'](_0xe67cd8);_0x53b07e['listenTo'](_0x2d8fa4,'add',(_0x30b7cd,_0x26c15b)=>{_0x293b74(_0x26c15b)&&_0x53b07e['add'](_0x26c15b);}),_0x53b07e['listenTo'](_0x2d8fa4,'remove',(_0x1403a2,_0x5b90a7)=>{_0x53b07e['has'](_0x5b90a7)&&_0x53b07e['remove'](_0x5b90a7);});}function Rt(_0x30c586,_0x42e79b){if(null===_0x30c586&&null===_0x42e79b)return 0x0;if(null===_0x30c586)return-0x1;if(null===_0x42e79b)return 0x1;const _0x2c2c3b=_0x30c586['top']-_0x42e79b['top'];return 0x0==_0x2c2c3b?_0x30c586['left']-_0x42e79b['left']:_0x2c2c3b;}class Annotations extends _0x16b5a9{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x848f7a){if(super(_0x848f7a),this['collection']=new AnnotationCollection(),this['_visibleAnnotations']=new AnnotationCollection(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x848f7a instanceof _0x502eb9){const _0x3a0326=_0x848f7a['locale'];_0x848f7a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':vt(_0x3a0326,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':vt(_0x3a0326,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':vt(_0x3a0326,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':vt(_0x3a0326,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':vt(_0x3a0326,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':vt(_0x3a0326,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':vt(_0x3a0326,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x279c31){this['collection']['add'](_0x279c31);}['remove'](_0x4f2c96){this['collection']['remove'](_0x4f2c96),_0x4f2c96['destroy']();}['refreshVisibility'](){for(const _0x34acea of this['collection'])_0x34acea['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5407c9){return this['collection']['getByInnerView'](_0x5407c9);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x501ef5 of this['collection'])_0x501ef5['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4f23f4){this['fire']('_activateAnnotation',_0x4f23f4);}['createAnnotation'](_0x53cc89){return new Annotation(_0x53cc89);}['createAnnotationView'](_0x2c64c2,_0x103e86){return new AnnotationView(_0x2c64c2,_0x103e86);}['_addActiveAnnotation'](_0x2be3c4){const _0x2ddd07=new Set(this['activeAnnotations']);_0x2ddd07['add'](_0x2be3c4),this['activeAnnotations']=_0x2ddd07;}['_removeActiveAnnotation'](_0x213af3){const _0x55e32c=new Set(this['activeAnnotations']);_0x55e32c['delete'](_0x213af3),this['activeAnnotations']=_0x55e32c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4b3dc0=this['collection'],_0x583c31=this['_visibleAnnotations'];function _0x2111e6(_0x1df8fa){const _0xb06d02=_0x1df8fa['source'];_0xb06d02['isVisible']&&!_0x583c31['has'](_0xb06d02)?_0x583c31['add'](_0xb06d02):!_0xb06d02['isVisible']&&_0x583c31['has'](_0xb06d02)&&_0x583c31['remove'](_0xb06d02),_0xb06d02['view']['focusTracker']['remove'](_0xb06d02['view']['element']),_0xb06d02['view']['focusTracker']['add'](_0xb06d02['view']['element']);}this['listenTo'](_0x4b3dc0,'add',(_0x27a2f8,_0x12139f)=>{_0x12139f['isVisible']&&_0x583c31['add'](_0x12139f),this['listenTo'](_0x12139f,'change:isVisible',_0x2111e6);}),this['listenTo'](_0x4b3dc0,'remove',(_0x204a19,_0xed5291)=>{_0x583c31['has'](_0xed5291)&&_0x583c31['remove'](_0xed5291),this['stopListening'](_0xed5291,'change:isVisible',_0x2111e6);});}['_setupEnterAnnotationKeystroke'](){const _0x2a54d4=_0x13990e=>{_0x13990e['on']('ready',()=>{_0x13990e['keystrokes']['set'](_0x274104,(_0x16a84f,_0x9b9683)=>{const _0x5cee9f=_0x253ba7(this['activeAnnotations']['values']());_0x5cee9f&&(_0x5cee9f['view']['focus'](),_0x9b9683());});});};this['context']instanceof _0x502eb9?_0x2a54d4(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4dfdf3,_0x392f0b)=>{_0x2a54d4(_0x392f0b);});}['_setupEscapeAnnotationHandling'](){const _0x488af0=_0x296002=>{const _0x42ef3d=_0x296002['source'],_0x3081fd=[];let _0x48c609;if(Array['isArray'](_0x42ef3d['target'])){_0x48c609=_0x42ef3d['target'][0x0],this['context']instanceof _0x502eb9?_0x3081fd['push'](this['context']):this['context']['editors']&&_0x3081fd['push'](...this['context']['editors']);for(const _0x54f78d of _0x3081fd)for(const _0x4bd5eb of _0x54f78d['editing']['view']['domRoots']['values']())if(_0x4bd5eb['contains'](_0x48c609))return void _0x54f78d['editing']['view']['focus']();_0x48c609['focus']();}};this['listenTo'](this['collection'],'add',(_0x12a48d,_0x9d8d13)=>{this['listenTo'](_0x9d8d13,'escape',_0x488af0,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3a53d4,_0x31f2aa)=>{this['stopListening'](_0x31f2aa,'escape',_0x488af0);});}}const Mt=Symbol('noChannel'),St={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class CommentsRepository extends _0x16b5a9{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[Annotations,_0x311346,_0xddae28];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x301627){super(_0x301627),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x270de9=this['context']['config'];_0x270de9['define']('comments.maxCommentsWhenCollapsed',0x2),_0x270de9['define']('comments.maxThreadTotalWeight',0x1f4),_0x270de9['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x270de9['define']('comments.CommentThreadView',CommentThreadView),_0x270de9['define']('comments.CommentView',CommentView),_0x270de9['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3ea505=this['context']['plugins']['get'](Annotations);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x294adb,_0x11471c)=>this['_addCommentThread'](_0x11471c)),this['on']('submitCommentThread',(_0x48713c,_0x22041c)=>this['_submitCommentThread'](_0x22041c)),this['on']('resolveCommentThread',(_0xe5e333,_0x555eee)=>this['_resolveCommentThread'](_0x555eee)),this['on']('resolveCommentThread',(_0x1f5bc9,_0x489964)=>this['_updateActiveAnnotation'](_0x489964),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5955eb,_0x3afba5)=>this['_reopenCommentThread'](_0x3afba5)),this['on']('reopenCommentThread',(_0xfbd9b0,_0x52daa3)=>this['_updateActiveAnnotation'](_0x52daa3),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x40e2f0,_0x4290e3)=>this['_removeCommentThread'](_0x4290e3)),this['on']('updateCommentThread',(_0x14a8ba,_0x454457)=>this['_updateCommentThread'](_0x454457)),this['on']('updateCommentThread',(_0x2839d0,_0x48ecf7)=>this['_updateActiveAnnotation'](_0x48ecf7),{'priority':'lowest'}),this['on']('addComment',(_0x1d7c48,_0x3129dc)=>this['_addComment'](_0x3129dc)),this['on']('updateComment',(_0x553481,_0x1985b4)=>this['_updateComment'](_0x1985b4)),this['on']('removeComment',(_0xf0a17a,_0x1a9536)=>this['_removeComment'](_0x1a9536)),this['on']('addComment',(_0x11959c,{threadId:_0x4c7246,isFromAdapter:_0x3394fc})=>{if(_0x3394fc)return;const _0x40f7a5=this['getCommentThread'](_0x4c7246),_0x4ff553=_0x40f7a5&&this['_threadToController']['get'](_0x40f7a5);_0x4ff553&&_0x4ff553['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3ea505,'change:activeAnnotations',(_0x147b53,_0x81f3d6,_0x4bad7f)=>{const _0x3b9ec2=Array['from'](_0x4bad7f)['map'](_0x4b3892=>this['_viewToController']['get'](_0x4b3892['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3b9ec2?_0x3b9ec2['model']:null;});}set['adapter'](_0x3d9692){if(this['_adapter'])throw new _0x381f6d('commentsrepository-adapter-already-set');this['_adapter']=_0x3d9692;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x42de28=Mt,threadId:_0x3364cd=_0x5e992a(),comments:_0x4dd483=[],unlinkedAt:_0x3edf35=null,resolvedAt:_0x440f0a=null,resolvedBy:_0x58ffc6=null,target:_0x44a81b=null,context:_0x55dd39=null,attributes:_0x4dd3a5={},isResolvable:_0x91bbf4=!0x0,isSubmitted:_0x587331=!0x1,isFromAdapter:_0x21a5f8=!0x1}={}){return this['fire'](xt('addCommentThread',_0x42de28),{'channelId':_0x42de28,'threadId':_0x3364cd,'comments':_0x4dd483,'unlinkedAt':_0x3edf35,'resolvedAt':_0x440f0a,'resolvedBy':_0x58ffc6,'target':_0x44a81b,'context':_0x55dd39,'attributes':_0x4dd3a5,'isFromAdapter':_0x21a5f8,'isResolvable':_0x91bbf4,'isSubmitted':_0x587331}),this['getCommentThread'](_0x3364cd);}['openNewCommentThread']({channelId:_0x3f6af9=Mt,threadId:_0x3bc5ab=_0x5e992a(),target:_0x4e6cae,context:_0x254f7d=null,isResolvable:_0x3e5088=!0x0}){if(this['_readOnlyChannels']['has'](_0x3f6af9)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4e6cae)throw new _0x381f6d('commentsrepository-missing-target');const _0x50d5e3=this['addCommentThread']({'channelId':_0x3f6af9,'threadId':_0x3bc5ab,'target':_0x4e6cae,'context':_0x254f7d,'isResolvable':_0x3e5088});if(!_0x50d5e3)return null;const _0x1626c6=this['_threadToController']['get'](_0x50d5e3),_0x50d60a=_0x1626c6['view']['commentThreadInputView']['commentInputView'],_0x4092a5=this['context']['plugins']['get'](Annotations),_0x4c0667=_0x4092a5['getByInnerView'](_0x1626c6['view']);return _0x4092a5['activate'](_0x4c0667),_0x50d60a['once']('editorReady',()=>_0x50d60a['focus']()),_0x50d5e3;}['hasCommentThread'](_0x207691){if('string'!=typeof _0x207691)throw new _0x381f6d('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x207691);}['updateCommentThread']({channelId:_0x5ed0a7=Mt,threadId:_0x3b489c,context:_0x4397e9,unlinkedAt:_0x285baa,attributes:_0x905837,isFromAdapter:_0x59c82e=!0x1}){return this['fire'](xt('updateCommentThread',_0x5ed0a7),{'channelId':_0x5ed0a7,'threadId':_0x3b489c,'context':_0x4397e9,'unlinkedAt':_0x285baa,'attributes':_0x905837,'isFromAdapter':_0x59c82e}),this['getCommentThread'](_0x3b489c);}['getCommentThread'](_0x3dd0b0){if('string'!=typeof _0x3dd0b0)throw new _0x381f6d('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3dd0b0);}['fetchCommentThread']({channelId:_0x363ec6,threadId:_0x1817fa}={}){const _0x208def=this['getCommentThread'](_0x1817fa);if(_0x208def)return Promise['resolve'](_0x208def);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x381f6d('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x363ec6,'threadId':_0x1817fa})['then'](_0x3a2ae3=>this['hasCommentThread'](_0x1817fa)?this['getCommentThread'](_0x1817fa):_0x3a2ae3?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x363ec6},_0x3a2ae3)):void 0x0)['catch'](_0x2ef682=>{throw console['error'](_0x2ef682),new _0x381f6d('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x47ece7,skipNotAttached:_0x1d45be=!0x1,skipEmpty:_0x226efa=!0x1,toJSON:_0x1e757c=!0x1}={}){const _0x404236=[];for(const _0x1179cd of this['_threads']['values']())_0x47ece7&&_0x1179cd['channelId']!==_0x47ece7||_0x1d45be&&!_0x1179cd['isAttached']||_0x226efa&&0x0===_0x1179cd['length']||_0x404236['push'](_0x1179cd);return _0x1e757c?_0x404236['map'](_0x5f134c=>_0x5f134c['toJSON']()):_0x404236;}['getAnnotationForCommentThread'](_0x5c0f8e){const _0x5d8ae6=this['_threadToController']['get'](_0x5c0f8e);if(!_0x5d8ae6)return null;return this['context']['plugins']['get'](Annotations)['getByInnerView'](_0x5d8ae6['view'])||null;}['getCommentThreadForAnnotation'](_0x5c747e){const _0x929671=this['_viewToController']['get'](_0x5c747e['innerView']);return _0x929671?_0x929671['model']:null;}['setActiveCommentThread'](_0x27401f){const _0x4fe435=this['context']['plugins']['get'](Annotations);if(!_0x27401f)return void(this['activeCommentThread']&&_0x4fe435['deactivateAll']());const _0x2a5737=this['getCommentThread'](_0x27401f);if(!_0x2a5737)throw new _0x381f6d('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x27401f});if(!this['_threadToController']['has'](_0x2a5737))throw new _0x381f6d('commentsrepository-active-not-attached',null,{'threadId':_0x27401f});const _0x4e521c=_0x4fe435['getByInnerView'](this['_threadToController']['get'](_0x2a5737)['view']);_0x4fe435['activate'](_0x4e521c);}['switchReadOnly'](_0xaddfc9,_0x481eff){_0xaddfc9?this['_readOnlyChannels']['add'](_0x481eff):this['_readOnlyChannels']['delete'](_0x481eff),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x30b892){return this['_readOnlyChannels']['has'](_0x30b892)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x19ad99,_0x5591c6){return new CommentThreadController(_0x19ad99,_0x5591c6);}['setPermissions'](_0x17e3f4,_0x235fb4=Mt){this['_permissions']['set'](_0x235fb4,_0x17e3f4),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2199d1=Mt){return this['_permissions']['has'](_0x2199d1)?this['_permissions']['get'](_0x2199d1):St;}['_addCommentThread']({channelId:_0x1b6e94,threadId:_0x4c7fe9,comments:_0x5a9a68,unlinkedAt:_0x438a20,resolvedAt:_0x1e97ff,resolvedBy:_0x4c8796,target:_0x2f297b,context:_0x3ca875,attributes:_0x6a24ed,isFromAdapter:_0x450e82,isResolvable:_0x2233f8,isSubmitted:_0xe1e83b}){if('string'!=typeof _0x4c7fe9)throw new _0x381f6d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4c7fe9});if(this['hasCommentThread'](_0x4c7fe9))throw new _0x381f6d('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4c7fe9});const _0x406ca0=new CommentThread(this,{'channelId':_0x1b6e94,'id':_0x4c7fe9,'context':_0x3ca875,'attributes':_0x6a24ed,'unlinkedAt':_0x438a20,'resolvedAt':_0x1e97ff,'resolvedBy':_0x4c8796?this['context']['plugins']['get'](_0xddae28)['getUser'](_0x4c8796):null,'isResolvable':_0x2233f8,'isSubmitted':_0xe1e83b||_0x450e82});this['_threads']['set'](_0x4c7fe9,_0x406ca0);for(const _0x26cccf of _0x5a9a68)_0x406ca0['_add'](this['_createNewComment']({'threadId':_0x4c7fe9,..._0x26cccf}));return _0x2f297b&&_0x406ca0['attachTo'](_0x2f297b),_0x450e82||!_0x406ca0['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1b6e94,'threadId':_0x4c7fe9});}['_submitCommentThread']({channelId:_0x4bb2d9,threadId:_0x192f96}){if(!this['hasCommentThread'](_0x192f96))throw new _0x381f6d('commentsrepository-missing-comment-thread',this);const _0x3f53a4=this['getCommentThread'](_0x192f96);if(_0x3f53a4['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x322937,comments:_0x2325e5,resolvedAt:_0x1cabbc,resolvedBy:_0x2ec97e,context:_0x3b68e3,attributes:_0x176faa}=_0x3f53a4,_0x1f70c3=this['context']['plugins']['get']('PendingActions'),_0x3c7c93=_0x1f70c3['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4bb2d9,'threadId':_0x322937,'comments':_0x2325e5['map'](_0x3d67f1=>_0x3d67f1['toJSON']()),'resolvedAt':_0x1cabbc,'resolvedBy':_0x2ec97e?_0x2ec97e['id']:_0x2ec97e,'context':_0x3b68e3,'attributes':_0x176faa})['then'](({comments:_0x346929})=>{_0x1f70c3['remove'](_0x3c7c93);for(const _0x526014 of _0x346929)this['_updateComment']({'channelId':_0x4bb2d9,'threadId':_0x192f96,'commentId':_0x526014['commentId'],'createdAt':_0x526014['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x49324b=>{throw console['error'](_0x49324b),new _0x381f6d('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5ba605,target:_0x4392e4}){const _0x22d375=this['getCommentThread'](_0x5ba605);if(!_0x22d375)throw new _0x381f6d('commentsrepository-attach-missing-comment-thread',this);const _0x474dbc=this['context']['plugins']['get']('PendingActions'),_0x476b94=this['context']['plugins']['get'](Annotations),_0x5674ea=this['_createCommentThreadView'](_0x22d375),_0x1261c1=new CommentThreadController(_0x22d375,_0x5674ea);let _0x22c789=null;_0x5674ea['on']('change:isDirty',(_0x6ef988,_0x155073,_0x25aab4)=>{_0x25aab4?_0x22c789=_0x474dbc['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x22c789&&(_0x474dbc['remove'](_0x22c789),_0x22c789=null);}),this['_threadToController']['set'](_0x22d375,_0x1261c1),this['_viewToController']['set'](_0x5674ea,_0x1261c1);const _0x411617=new AnnotationView(this['context']['locale'],_0x5674ea);_0x411617['bind']('length')['to'](_0x5674ea),_0x411617['bind']('isDirty')['to'](_0x5674ea,'isDirty',_0x5674ea,'length',(_0x4b50dd,_0x58d487)=>_0x4b50dd||!_0x58d487),_0x411617['bind']('isActive')['to'](_0x5674ea),_0x411617['type']='comment';const _0x3d6b97=new Annotation({'view':_0x411617,'target':_0x4392e4,'type':'comment','isVisible':!_0x22d375['archivedAt']&&!!('function'==typeof _0x4392e4?_0x4392e4():_0x4392e4)});return _0x5674ea['on']('escape',()=>{_0x3d6b97['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5674ea,_0x3d6b97),_0x476b94['add'](_0x3d6b97),_0x3d6b97;}['_bindAnnotationToEditors'](_0x5f3513,_0x5c513d){this['listenTo'](_0x5f3513,'editorReady',(_0x5a6d0c,_0x4eb63b)=>{const _0x2cdb2c=_0x4eb63b['ui']['view']['body']['bodyCollectionContainer'];_0x5c513d['focusableElements']['add'](_0x2cdb2c),this['context']instanceof _0x502eb9&&this['context']['ui']['focusTracker']['add'](_0x2cdb2c);},{'priority':'highest'}),this['listenTo'](_0x5f3513,'editorDestroyed',(_0x45cffe,_0x3a76b6)=>{const _0x1e2029=_0x3a76b6['ui']['view']['body']['bodyCollectionContainer'];_0x5c513d['focusableElements']['has'](_0x1e2029)&&_0x5c513d['focusableElements']['remove'](_0x1e2029),this['context']instanceof _0x502eb9&&this['context']['ui']['focusTracker']['remove'](_0x1e2029);});}['_unbindEditors'](_0x5e8028){this['stopListening'](_0x5e8028,'editorReady'),this['stopListening'](_0x5e8028,'editorDestroyed');}['_createCommentThreadView'](_0x33ba64){const _0x4ade78=this['context']['plugins']['get'](_0xddae28),{config:_0x5a8116,locale:_0x4c4032}=this['context'],_0x5ced4c=_0x3f98e5(_0x5a8116['get']('locale'),_0x4c4032);return new(0x0,(_0x5a8116['get']('comments'))['CommentThreadView'])(_0x4c4032,_0x33ba64,_0x4ade78['me'],{'editorConfig':{..._0x5a8116['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5a8116['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5a8116['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5a8116['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5a8116['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5ced4c,'CommentView':_0x5a8116['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0xcdabf4,channelId:_0x116a60,resolvedAt:_0x86ba40,resolvedBy:_0x5149b5,isFromAdapter:_0x3339aa}){if(!this['hasCommentThread'](_0xcdabf4))throw new _0x381f6d('commentsrepository-missing-comment-thread',null,{'threadId':_0xcdabf4});const _0xa36f9f=this['getCommentThread'](_0xcdabf4);if(_0xa36f9f['isResolved'])throw new _0x381f6d('commentsrepository-resolved-comment-thread',null,{'threadId':_0xcdabf4});const _0x4b22f0=this['context']['plugins']['get'](_0xddae28);if(_0xa36f9f['resolvedBy']=_0x4b22f0['getUser'](_0x5149b5),_0xa36f9f['resolvedAt']=_0x86ba40,_0x3339aa||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x140bad=this['context']['plugins']['get']('PendingActions'),_0x273eb9=_0x140bad['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x116a60,'threadId':_0xcdabf4})['then'](({resolvedAt:_0x2731ba,resolvedBy:_0x553202})=>{_0x140bad['remove'](_0x273eb9),_0xa36f9f['resolvedBy']['id']!==_0x553202&&(_0xa36f9f['resolvedBy']=_0x4b22f0['getUser'](_0x553202)),_0xa36f9f['resolvedAt']=_0x2731ba;})['catch'](_0x2ac614=>{throw console['error'](_0x2ac614),new _0x381f6d('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x51edec,channelId:_0x78ea05,isFromAdapter:_0x1464f1}){if(!this['hasCommentThread'](_0x51edec))throw new _0x381f6d('commentsrepository-missing-comment-thread',null,{'threadId':_0x51edec});const _0x29f712=this['getCommentThread'](_0x51edec);if(!_0x29f712['isResolved'])throw new _0x381f6d('commentsrepository-reopen-comment-thread',null,{'threadId':_0x51edec});if(_0x29f712['resolvedBy']=null,_0x29f712['resolvedAt']=null,_0x1464f1||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3d7811=this['context']['plugins']['get']('PendingActions'),_0x110cc3=_0x3d7811['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x78ea05,'threadId':_0x51edec})['then'](()=>_0x3d7811['remove'](_0x110cc3))['catch'](_0x123f11=>{throw console['error'](_0x123f11),new _0x381f6d('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x4faaf8,isFromAdapter:_0x53298b}){const _0x51af17=this['getCommentThread'](_0x4faaf8);if(!_0x51af17)throw new _0x381f6d('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x4faaf8),this['_threads']['delete'](_0x4faaf8),!_0x51af17['isSubmitted']||_0x53298b||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4d6243=this['context']['plugins']['get']('PendingActions'),{channelId:_0x26e1e8}=_0x51af17,_0x44115f=_0x4d6243['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x26e1e8,'threadId':_0x4faaf8})['then'](()=>_0x4d6243['remove'](_0x44115f))['catch'](_0x5da1a1=>{throw console['error'](_0x5da1a1),new _0x381f6d('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1f9f71,unlinkedAt:_0x5e1bc6,context:_0x461497,attributes:_0x20212b,isFromAdapter:_0x46988e}){if('string'!=typeof _0x1f9f71)throw new _0x381f6d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1f9f71});if(!this['hasCommentThread'](_0x1f9f71))throw new _0x381f6d('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f9f71});const _0x4a939f=this['getCommentThread'](_0x1f9f71);let _0x27a7cc=!0x1;if(void 0x0!==_0x461497&&_0x4a939f['context']!==_0x461497&&(_0x4a939f['context']=_0x461497,_0x27a7cc=!0x0),void 0x0!==_0x5e1bc6&&_0x4a939f['unlinkedAt']!==_0x5e1bc6&&(_0x4a939f['unlinkedAt']=_0x5e1bc6,_0x27a7cc=!0x0),_0x20212b&&!_0x31c3ca(_0x20212b,_0x4a939f['attributes'])&&(_0x4a939f['attributes']=_0x20212b,_0x27a7cc=!0x0),!_0x27a7cc)return Promise['resolve']();if(!_0x4a939f['isSubmitted']||_0x46988e||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x476cd9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x52f88e}=_0x4a939f,_0x3792a3=_0x476cd9['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x52f88e,'threadId':_0x1f9f71,'context':_0x461497,'unlinkedAt':_0x5e1bc6,'attributes':_0x20212b})['then'](()=>_0x476cd9['remove'](_0x3792a3))['catch'](_0x3a1a87=>{throw console['error'](_0x3a1a87),new _0x381f6d('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x14c713){const _0xd99e05=this['context']['plugins']['get'](Annotations),_0x5ece47=this['getCommentThread'](_0x14c713);if(_0x5ece47['_isAttached']=!0x1,this['_threadToController']['has'](_0x5ece47)){const _0x3776c4=this['_threadToController']['get'](_0x5ece47),_0x293563=_0x3776c4['view'],_0x35a59f=_0xd99e05['getByInnerView'](_0x293563);this['_threadToController']['delete'](_0x5ece47),this['_viewToController']['delete'](_0x293563),_0x35a59f&&_0xd99e05['remove'](_0x35a59f),_0x3776c4['destroy'](),_0x293563['destroy']()['then'](()=>{this['_unbindEditors'](_0x293563);});}}['_updateActiveAnnotation']({threadId:_0x14201e,resolvedAt:_0x10262e,unlinkedAt:_0x6ba606}){const _0x4ec8c0=!!_0x10262e,_0x219fb7=this['context']['plugins']['get'](Annotations),_0x3046fe=this['getCommentThread'](_0x14201e);if(this['_threadToController']['has'](_0x3046fe)){const _0x16427f=this['_threadToController']['get'](_0x3046fe)['view'],_0x9e4bfc=_0x219fb7['getByInnerView'](_0x16427f);_0x9e4bfc&&(_0x4ec8c0&&_0x219fb7['_removeActiveAnnotation'](_0x9e4bfc),_0x6ba606?_0x9e4bfc['isVisible']=!0x1:_0x9e4bfc['refreshVisibility']());}}['_getExternalAuthor'](_0x3ff1da){const _0x55331a=this['context']['plugins']['get'](_0xddae28),_0x5bd862=_0x45d494('external:'+_0x3ff1da),_0x160fb9=_0x55331a['getUser'](_0x5bd862);return _0x160fb9||_0x55331a['addUser']({'id':_0x5bd862,'name':_0x3ff1da});}['_createNewComment']({threadId:_0x31dd8c,commentId:_0x2e6b70=_0x5e992a(),content:_0x261a69,authorId:_0xb5a4ef,createdAt:_0x43f6d4,attributes:_0x30f4b}){if('string'!=typeof _0x2e6b70)throw new _0x381f6d('commentsrepository-invalid-commentid');if('string'!=typeof _0xb5a4ef)throw new _0x381f6d('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x261a69||!_0x261a69['trim']())throw new _0x381f6d('commentsrepository-invalid-comment-content');const _0x841a0=this['context']['plugins']['get'](_0xddae28)['getUser'](_0xb5a4ef);if(!_0x841a0)throw new _0x381f6d('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xb5a4ef});let _0xc8ed0c=null,_0x243092=_0x43f6d4;return _0x30f4b?.['@external']&&(_0xc8ed0c=this['_getExternalAuthor'](_0x30f4b['@external']['authorName']),_0x243092=new Date(_0x30f4b['@external']['createdAt'])),new Comment(this,{'threadId':_0x31dd8c,'id':_0x2e6b70,'author':_0xc8ed0c||_0x841a0,'creator':_0x841a0,'content':_0x261a69,'createdAt':_0x43f6d4,'authoredAt':_0x243092,'attributes':_0x30f4b});}['_addComment'](_0x21ae0a){let {threadId:_0x228b69,content:_0x5b697c,attributes:_0x47fcb3,isFromAdapter:_0x29206d}=_0x21ae0a;const _0x181238=this['getCommentThread'](_0x21ae0a['threadId']);if(!_0x181238)throw new _0x381f6d('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x40d5b5=this['_createNewComment'](_0x21ae0a),{id:_0x242fe8}=_0x40d5b5;if(_0x181238['_add'](_0x40d5b5),_0x29206d||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x181238['isSubmitted'])return Promise['resolve']();const _0x37e1ac=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3246c8}=_0x181238,_0x214c05=_0x37e1ac['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x47fcb3||(_0x47fcb3={}),this['adapter']['addComment']({'channelId':_0x3246c8,'threadId':_0x228b69,'commentId':_0x242fe8,'content':_0x5b697c,'attributes':_0x47fcb3})['then'](_0x3b15a2=>{_0x37e1ac['remove'](_0x214c05),_0x3b15a2&&this['_updateComment']({'channelId':_0x3246c8,'threadId':_0x228b69,'commentId':_0x242fe8,'createdAt':_0x3b15a2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5ad732=>{throw console['error'](_0x5ad732),new _0x381f6d('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x25ecb8,commentId:_0x2e14d5,content:_0xbd4759,createdAt:_0x575fd6,attributes:_0x61aa32,isFromAdapter:_0x133f4b}){if(void 0x0!==_0xbd4759&&('string'!=typeof _0xbd4759||!_0xbd4759['trim']()['length']))throw new _0x381f6d('commentsrepository-update-comment-invalid-content');const _0x5a1717=this['getCommentThread'](_0x25ecb8),_0x3336e8=_0x5a1717['getComment'](_0x2e14d5);if(!_0x3336e8)throw new _0x381f6d('commentsrepository-update-missing-comment',this);let _0x11c6b4=!0x1;if(_0xbd4759&&_0xbd4759!==_0x3336e8['content']&&(_0x3336e8['isEditable']||_0x133f4b)&&(_0x3336e8['content']=_0xbd4759,_0x11c6b4=!0x0),_0x575fd6&&_0x575fd6!==_0x3336e8['createdAt']&&(_0x3336e8['createdAt']=_0x575fd6,_0x3336e8['attributes']&&_0x3336e8['attributes']['@external']||(_0x3336e8['authoredAt']=_0x575fd6),_0x11c6b4=!0x0),_0x61aa32&&!_0x31c3ca(_0x61aa32,_0x3336e8['attributes'])&&(_0x3336e8['attributes']=_0x61aa32,_0x11c6b4=!0x0),!_0x11c6b4)return Promise['resolve']();if(_0x5a1717['fire']('commentUpdated'),_0x133f4b||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x9c30b8=this['context']['plugins']['get']('PendingActions'),{channelId:_0xec7191}=this['getCommentThread'](_0x3336e8['threadId']),_0x57037a=_0x9c30b8['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xec7191,'threadId':_0x25ecb8,'commentId':_0x2e14d5,'content':_0xbd4759,'attributes':_0x61aa32})['then'](()=>_0x9c30b8['remove'](_0x57037a))['catch'](_0x3d314b=>{throw console['error'](_0x3d314b),new _0x381f6d('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x455f25,commentId:_0x54566b,isFromAdapter:_0x2c349d}){const _0x1d5569=this['getCommentThread'](_0x455f25),_0x36f0ae=_0x1d5569['getComment'](_0x54566b);if(!_0x36f0ae)throw new _0x381f6d('commentsrepository-remove-missing-comment',this);if(_0x1d5569['_remove'](_0x36f0ae),_0x2c349d||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x40fef6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3dce3a}=_0x1d5569,_0x5dfd61=_0x40fef6['add'](vt(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3dce3a,'threadId':_0x455f25,'commentId':_0x54566b})['then'](()=>_0x40fef6['remove'](_0x5dfd61))['catch'](_0x102079=>{throw console['error'](_0x102079),new _0x381f6d('commentsrepository-remove-comment-internal-error',this);});}}class CommentThread extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x1b707f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x45c462,_0x587624){super();const _0x2402ed=_0x45c462['context']['plugins']['get'](_0xddae28)['me'],_0x39266e=_0x45c462['getCommentThread'](_0x587624['threadId']),_0x1f85e9=0x0===_0x39266e['comments']['length'],_0x2dec40=_0x2402ed===_0x587624['author'];this['id']=_0x587624['id'],this['threadId']=_0x587624['threadId'],this['author']=_0x587624['author'],this['creator']=_0x587624['creator'],this['isExternal']=Boolean(_0x587624['attributes']&&_0x587624['attributes']['@external']),this['set']('content',_0x587624['content']),this['createdAt']=_0x587624['createdAt']||new Date(),this['set']('authoredAt',_0x587624['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x39266e,'resolvedAt'),this['set']('attributes',_0x587624['attributes']||{}),this['bind']('isEditable')['to'](_0x45c462,'_permissions',()=>{const _0x4a06cd=_0x45c462['getPermissions'](_0x39266e['channelId'])['write'],_0x2c3d7d=_0x45c462['getPermissions'](_0x39266e['channelId'])['modifyAll'];return _0x2dec40&&_0x4a06cd||!_0x2dec40&&_0x2c3d7d;}),this['bind']('isRemovable')['to'](_0x39266e,'isRemovable',_0x45c462,'_permissions',_0x178113=>{const _0x3824e6=_0x45c462['getPermissions'](_0x39266e['channelId'])['write'],_0x2fac83=_0x45c462['getPermissions'](_0x39266e['channelId'])['modifyAll'];return _0x2dec40&&_0x3824e6||_0x178113&&_0x1f85e9||!_0x2dec40&&_0x2fac83&&!_0x1f85e9;}),this['bind']('isReadOnly')['to'](_0x39266e,'isReadOnly'),this['_repository']=_0x45c462;}get['weight'](){return Math['max'](function(_0x5a93bc){const _0x3345fd=document['createElement']('div');return _0x3345fd['innerHTML']=_0x5a93bc,_0x3345fd['textContent']['length'];}(this['content']),0xc8);}['update'](_0xf3e7b6){const {threadId:_0x36b25c,id:_0x4f3fac}=this;if(!this['_repository']['hasCommentThread'](_0x36b25c))throw new _0x381f6d('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5727b9}=this['_repository']['getCommentThread'](_0x36b25c);this['_repository']['fire'](xt('updateComment',_0x5727b9,_0x36b25c),{'channelId':_0x5727b9,'threadId':_0x36b25c,'commentId':_0x4f3fac,..._0xf3e7b6});}['setAttribute'](_0x4a9df1,_0x514ee2){const _0x1e5b61=_0x1092cd(this['attributes']);_0x2af3a3(_0x1e5b61,_0x4a9df1,_0x514ee2),this['update']({'attributes':_0x1e5b61});}['removeAttribute'](_0x2b2cac){const _0x379b26=_0x1092cd(this['attributes']);_0x5ee211(_0x379b26,_0x2b2cac),this['update']({'attributes':_0x379b26});}['remove'](_0x5f1885={}){if(!_0x5f1885['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x295c15,id:_0x2a3e15}=this;if(!this['_repository']['hasCommentThread'](_0x295c15))throw new _0x381f6d('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2e3003}=this['_repository']['getCommentThread'](_0x295c15);this['_repository']['fire'](xt('removeComment',_0x2e3003,_0x295c15),{'channelId':_0x2e3003,'threadId':_0x295c15,'commentId':_0x2a3e15,..._0x5f1885});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function xt(_0xbebed2,..._0x205679){for(const _0x398386 of _0x205679)void 0x0!==_0x398386&&(_0xbebed2+=':'+String(_0x398386));return _0xbebed2;}class AddCommentThreadCommand extends _0x408e8b{constructor(_0x1bd9a3){super(_0x1bd9a3),this['set']('hasContent',!0x1);}['refresh'](){const _0x2e385a=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3a2d7e of _0x2e385a['getRanges']())if(this['_hasContent'](_0x3a2d7e))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x526c16=_0x5e992a(),ranges:_0x1bb9ee,comment:_0x5c36d6}={}){const _0x504949=this['editor']['model'],_0x380eae=_0x1bb9ee??Array['from'](_0x504949['document']['selection']['getRanges']()),_0x4284c3=[];for(const _0x525044 of _0x380eae)this['_hasContent'](_0x525044)&&_0x4284c3['push'](this['_trimToContent'](_0x525044));if(!_0x4284c3['length'])throw new _0x381f6d('addcommentthreadcommand-incorrect-ranges',null);_0x5c36d6&&this['_createCommentThread'](_0x526c16,_0x5c36d6),this['_createMarkersFromRanges'](_0x526c16,_0x4284c3,!!_0x5c36d6);}['_createMarkersFromRanges'](_0x359d4f,_0x27a0,_0xe05ff0){this['editor']['model']['change'](_0x47d1d3=>{for(const _0x921d5 of _0x27a0){const _0x20a6c9=_0x5e992a()['substr'](0x1,0x5),_0x2f14bc='comment:'+_0x359d4f+':'+_0x20a6c9;_0x47d1d3['addMarker'](_0x2f14bc,{'range':_0x921d5,'usingOperation':_0xe05ff0,'affectsData':_0xe05ff0});}});}['_createCommentThread'](_0x51e269,_0xc9445c){const _0x59b5e2=this['editor']['plugins']['get']('CommentsRepository'),_0x453118=this['editor']['config']['get']('collaboration.channelId'),_0xf4697d=this['editor']['plugins']['get']('Users')['me'];if(!_0xf4697d)throw new _0x381f6d('addcommentthreadcommand-user-not-found',null);_0x59b5e2['addCommentThread']({'threadId':_0x51e269,'channelId':_0x453118,'comments':[{'authorId':_0xf4697d['id'],'content':_0xc9445c,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x10b9c5){for(const _0x1c3986 of _0x10b9c5['getItems']())if(this['_itemIsContent'](_0x1c3986))return!0x0;return!0x1;}['_itemIsContent'](_0x424c36){return _0x424c36['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x424c36)&&!_0x424c36['is']('element','tableCell');}['_trimToContent'](_0x30315e){const _0x119c26=_0x3d30f8=>!this['_itemIsContent'](_0x3d30f8['item']),_0x32992c=_0x30315e['start']['getLastMatchingPosition'](_0x119c26),_0x55df24=_0x30315e['end']['getLastMatchingPosition'](_0x119c26,{'direction':'backward'});return this['editor']['model']['createRange'](_0x32992c,_0x55df24);}}class EditorAnnotations extends _0x4f2bb8{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[Annotations];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x36d7e6){super(_0x36d7e6),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3a7651=this['editor'],_0x16825a=_0x3a7651['model']['document']['selection'],_0x373fe4=_0x232ddf(()=>this['refreshSelectedViews'](),0xa);_0x16825a['on']('change:range',(_0x30c231,_0x1826a3)=>{_0x1826a3['directChange']&&(_0x373fe4['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3a7651['editing']['view']['document'],'change:isFocused',(_0x5bb68a,_0xb26454,_0x37ff6a)=>{_0x37ff6a&&_0x373fe4();}),this['listenTo'](_0x3a7651['ui']['focusTracker'],'change:isFocused',(_0x514079,_0x4ae35a,_0x59995e)=>{_0x59995e||this['fire']('blur',{'isAnnotationTracked':_0x522b76=>this['_editorAnnotationsData']['has'](_0x522b76['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3020e7){if(this['_editorAnnotations']['has'](_0x3020e7['view']))return;this['_editorAnnotations']['add'](_0x3020e7['view']),this['editor']['ui']['focusTracker']['add'](_0x3020e7['view']['element']);const _0x1fd9f1=this['editor']['plugins']['get'](Annotations);this['listenTo'](_0x1fd9f1['collection'],'remove',(_0x3ce4eb,_0x591e30)=>{this['editor']['ui']['focusTracker']['remove'](_0x591e30['view']['element']),this['_editorAnnotations']['delete'](_0x591e30['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4d6e60){if('function'!=typeof _0x4d6e60)throw new _0x381f6d('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4d6e60);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x96d86a,annotations:_0x3b565a}){const _0x56fe3f=[],_0x13b810=this['editor']['model']['document']['selection'],_0x26a1a1=Array['from'](_0x13b810['getRanges']());for(const [_0x3bd5d0,_0x1f39c9]of this['_editorAnnotationsData']){const _0x14005e=_0x2db6f7(_0x1f39c9),_0x474826=_0x3b565a['getByInnerView'](_0x3bd5d0);_0x14005e&&_0x474826&&_0x56fe3f['push']({'annotation':_0x474826,'range':_0x14005e});}function _0x2db6f7(_0x37a704){for(const _0x16d0fa of _0x37a704)for(const _0x5611a6 of _0x26a1a1)if(_0x16d0fa['containsRange'](_0x5611a6,!_0x13b810['isCollapsed']))return _0x16d0fa;return null;}return _0x56fe3f['sort']((_0x39dfd3,_0x2b0a19)=>{const _0x6dd158=_0x39dfd3['range'],_0x56f9d5=_0x2b0a19['range'];if(!_0x6dd158['isEqual'](_0x56f9d5)){if(_0x6dd158['containsRange'](_0x56f9d5,!0x0))return 0x1;if(_0x56f9d5['containsRange'](_0x6dd158,!0x0))return-0x1;}return _0x39dfd3['annotation']==_0x96d86a?-0x1:_0x2b0a19['annotation']==_0x96d86a?0x1:0x0;})['map'](_0x1352df=>_0x1352df['annotation']);}get['_editorAnnotationsData'](){const _0x341cbb=new Map();for(const _0x2977f2 of Array['from'](this['_dataCollectors']))for(const [_0x3cd3f2,_0x250ef7]of _0x2977f2())_0x341cbb['set'](_0x3cd3f2,_0x250ef7);return _0x341cbb;}}class CommentsRestrictedEditingMode extends _0x4f2bb8{['afterInit'](){const _0x3a7667=this['editor'];if(!_0x3a7667['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3a7667['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class CommentsImportWord extends _0x4f2bb8{constructor(_0x29e02b){super(_0x29e02b),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x58c074=this['editor'],_0xc5efe7=_0x58c074['commands']['get']('importWord'),_0x4f1973=_0x58c074['plugins']['get'](_0xddae28);_0xc5efe7&&(_0xc5efe7['on']('execute',(_0x2289df,[,_0x1c1358])=>{_0x1c1358['collaboration_features']={'comments':!0x0,'user_id':_0x4f1973['me']['id']};},{'priority':_0x4683b1['high']+0xa}),this['listenTo'](_0xc5efe7,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x59c69e,_0x5b1085){const {comment_threads:_0x4f6990}=_0x5b1085;_0x4f6990&&_0x4f6990['forEach'](({thread_id:_0x5a13bf,comments:_0x3ea66f,is_resolved:_0x11ee47})=>{const _0x4c513e=new Date(),_0x27635a=_0x3ea66f['map'](({author:_0x40ccfe,content:_0xd55c86,created_at:_0x1a5138})=>({'content':_0xd55c86,'authorId':this['editor']['plugins']['get'](_0xddae28)['me']['id'],'createdAt':_0x4c513e,'attributes':{'@external':{'authorName':_0x40ccfe,'createdAt':_0x1a5138?new Date(_0x1a5138):new Date(),'source':'importWord'}}})),_0x2e97f5=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](CommentsRepository)['addCommentThread']({'channelId':_0x2e97f5,'threadId':_0x5a13bf,'comments':_0x27635a,'resolvedAt':_0x11ee47?_0x4c513e:null});});}}class CommentsClipboard extends _0x4f2bb8{constructor(_0x4fbfd6){super(_0x4fbfd6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x312804=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x312804,'contentInsertion',(_0x4fc9f6,_0x5ba286)=>this['_removeMarkersWithoutThreads'](_0x5ba286['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x502b5b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x502b5b;const _0x3a4d05=this['editor']['plugins']['get']('CommentsRepository');for(const _0x21d914 of _0x502b5b['keys']()){const [_0x52509e,_0x33012c]=_0x21d914['split'](':');'comment'!=_0x52509e||_0x3a4d05['hasCommentThread'](_0x33012c)||_0x502b5b['delete'](_0x21d914);}return _0x502b5b;}['_registerMarkerInClipboardPipeline'](){const _0x382e1a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x122f95=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x122f95&&_0x382e1a['_registerMarkerToCopy']('comment',_0x122f95);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x325fc){switch(_0x325fc){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function Pt(_0x3b8cf6){const _0x548f73=_0x3b8cf6['split'](':');return{'group':_0x548f73[0x0],'id':_0x548f73[0x1],'part':_0x548f73[0x2]};}class ShowCommentHighlights extends _0x4f2bb8{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x310712,_0x21eae8)=>{if(!_0x21eae8['options']['showCommentHighlights'])return null;if(_0x21eae8['options']['ignoreResolvedComments']){const {id:_0xdd956f}=Pt(_0x310712['markerName']),_0x553e8b=this['editor']['plugins']['get'](CommentsRepository);if(_0x553e8b['getCommentThread'](_0xdd956f)?.['isResolved']&&_0x310712['item'])return _0x21eae8['consumable']['consume'](_0x310712['item'],'addMarker:'+_0x310712['markerName']),_0x21eae8['consumable']['consume'](_0x310712['item'],'removeMarker:'+_0x310712['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x225ec2=>{_0x225ec2['on']('addMarker:comment',(_0xf783e,_0x81a7f8,_0x4567c8)=>{if(!_0x4567c8['options']['showCommentHighlights'])return;const _0x4c5391=_0x81a7f8['item'];if(!_0x4c5391)return;const _0x2c7ed6=_0x4567c8['mapper']['toViewElement'](_0x4c5391);this['editor']['model']['schema']['isObject'](_0x4c5391)&&_0x2c7ed6&&!_0x2c7ed6['getCustomProperty']('widget')&&_0x2c7ed6['is']('containerElement')&&It(_0x2c7ed6,_0x4567c8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x1deeec,{writer:_0x564c56,options:_0x281594})=>{if(!_0x281594['showCommentHighlights'])return null;const _0x1f512=_0x564c56['createContainerElement']('div'),_0x2c3ecb=_0x564c56['createEmptyElement']('hr');return _0x564c56['addClass']('ck-horizontal-line',_0x1f512),_0x564c56['insert'](_0x564c56['createPositionAt'](_0x1f512,0x0),_0x2c3ecb),_0x1f512;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x32fba6,{writer:_0x2efa6d,options:_0x46ae0a})=>{if(!_0x46ae0a['showCommentHighlights'])return null;const _0x1850b9=_0x2efa6d['createContainerElement']('span'),_0x3240ac=_0x2efa6d['createEmptyElement']('img');return _0x2efa6d['addClass']('image-inline',_0x1850b9),_0x2efa6d['insert'](_0x2efa6d['createPositionAt'](_0x1850b9,0x0),_0x3240ac),_0x1850b9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5c7ca7,{writer:_0x721fc0,options:_0x2beadb})=>{if(_0x2beadb['showCommentHighlights'])return _0x721fc0['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x43fd94,_0x2c8ae8,_0x16da56)=>{_0x16da56['options']['showCommentHighlights']&&_0x43fd94['stop']();},{'priority':'high'});}}class CommentsEditing extends _0x4f2bb8{static get['requires'](){return[CommentsRepository,EditorAnnotations,_0xddae28,CommentsRestrictedEditingMode,CommentsImportWord,CommentsClipboard,ShowCommentHighlights];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2485ba){super(_0x2485ba),this['set']('isThreadsLoadingPaused',!0x0),_0x2485ba['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x19bdbc,_0x4bdf9f,_0x3c244c,_0x42374c)=>{const _0x14b29f=_0x2485ba['plugins']['get'](CommentsRepository),_0x467c56=_0x3c244c?Pt(_0x3c244c)['id']:null;_0x2485ba['model']['change'](()=>{if(_0x467c56){const _0x3bd4ab=this['getAllMarkersForId'](_0x467c56);for(const _0x376b8c of _0x3bd4ab)_0x2485ba['editing']['reconvertMarker'](_0x376b8c);}if(_0x42374c){const {id:_0x101615}=Pt(_0x42374c),_0x234c5c=_0x14b29f['getCommentThread'](_0x101615);if(_0x234c5c&&_0x234c5c['unlinkedAt'])return;if(_0x234c5c&&!_0x234c5c['isAttached'])return;const _0x43aaf7=this['getAllMarkersForId'](_0x101615);for(const _0x13529e of _0x43aaf7)_0x2485ba['editing']['reconvertMarker'](_0x13529e);}}),_0x467c56&&this['scrollToThreadMarker'](_0x467c56);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2688c0=this['editor'],_0x3b56f8=_0x2688c0['plugins']['get'](CommentsRepository),_0xeab76=_0x2688c0['config']['get']('collaboration.channelId'),_0x6a41a7=_0x3b56f8['getCommentThreads']()['filter'](_0x4fd236=>_0x4fd236['channelId']!==_0xeab76);_0x2688c0['commands']['add']('addCommentThread',new AddCommentThreadCommand(_0x2688c0)),this['listenTo'](_0x2688c0,'change:isReadOnly',(_0x3d4e9d,_0x2a394b,_0x4b7923)=>{_0x3b56f8['switchReadOnly'](_0x4b7923,_0x2688c0['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3b56f8,Vt('addCommentThread',_0xeab76),(_0x5b87ad,{threadId:_0x3cb0c2})=>{const _0x2c69f1=this['editor']['plugins']['get'](CommentsRepository)['getCommentThread'](_0x3cb0c2);_0x2c69f1?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3cb0c2);}),this['listenTo'](_0x3b56f8,Vt('removeCommentThread',_0xeab76),(_0x134d44,{threadId:_0x500ba0})=>{_0x2688c0['model']['enqueueChange']({'isUndoable':!0x1},_0x590c74=>{const _0x2cf783=this['getAllMarkersForId'](_0x500ba0);for(const _0x138665 of _0x2cf783)_0x590c74['removeMarker'](_0x138665);});}),this['listenTo'](_0x3b56f8,Vt('resolveCommentThread',_0xeab76),(_0x3246cc,{threadId:_0x4efedf})=>{this['_reconvertMarkers'](_0x4efedf);const _0x2d2b41=this['editor']['plugins']['get'](Annotations);(this['editor']['editing']['view']['hasDomSelection']||_0x2d2b41['collection']['isFocused'])&&(this['editor']['plugins']['get'](CommentsRepository)['getCommentThread'](_0x4efedf)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3b56f8,Vt('reopenCommentThread',_0xeab76),(_0x2f2f67,{threadId:_0x224591})=>{this['_reconvertMarkers'](_0x224591);},{'priority':'low'}),this['listenTo'](_0x3b56f8,Vt('addComment',_0xeab76),(_0x5badf1,{threadId:_0x3fe99b,isFromAdapter:_0x328073})=>{const _0x51ffcd=this['getAllMarkersForId'](_0x3fe99b);if(_0x328073||0x0==_0x51ffcd['length']||!_0x3b56f8['hasCommentThread'](_0x3fe99b))return;0x1===_0x3b56f8['getCommentThread'](_0x3fe99b)['length']&&_0x2688c0['model']['enqueueChange']({'isUndoable':!0x1},_0x559f94=>{for(const _0x28a42a of _0x51ffcd)_0x559f94['updateMarker'](_0x28a42a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x6a41a7);}['afterInit'](){!async function(_0x30b1c7){const _0x385ad0=_0x15520b([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x1cd591=0x73460ab3,_0x128973=0x73418163^_0x1cd591,_0x1f4003=window[_0x15520b([0x44,0x61,0x74,0x65])][_0x15520b([0x6e,0x6f,0x77])](),_0x2fb965=_0x30b1c7[_0x15520b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4d22b6=new window[(_0x15520b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a93c7=>{_0x2fb965[_0x15520b([0x6f,0x6e,0x63,0x65])](_0x15520b([0x72,0x65,0x61,0x64,0x79]),_0x4a93c7);}),_0x16f832={[_0x15520b([0x6b,0x74,0x79])]:_0x15520b([0x45,0x43]),[_0x15520b([0x75,0x73,0x65])]:_0x15520b([0x73,0x69,0x67]),[_0x15520b([0x63,0x72,0x76])]:_0x15520b([0x50,0x2d,0x32,0x35,0x36]),[_0x15520b([0x78])]:_0x15520b([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x15520b([0x79])]:_0x15520b([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x15520b([0x61,0x6c,0x67])]:_0x15520b([0x45,0x53,0x32,0x35,0x36])},_0x386d08=_0x2fb965[_0x15520b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x15520b([0x67,0x65,0x74])](_0x15520b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x24d806(){let _0x2e096e,_0x291457=null,_0x5ca9fc=null;try{if(_0x386d08==_0x15520b([0x47,0x50,0x4c]))return _0x15520b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2e096e=_0x13aa62(),!_0x2e096e)return _0x15520b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2e096e[_0x15520b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5ca9fc=_0x35c740(_0x2e096e[_0x15520b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2e096e[_0x15520b([0x6a,0x74,0x69])])),await _0x16ae14()?_0x133738()?_0x3c84d6()?_0x15520b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x18cc29()?(_0x2e096e[_0x15520b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x15520b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x291457=_0x35bc27(_0x15520b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0xd9a799()):_0x15520b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x15520b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x15520b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x15520b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x3c84d6(){const _0x5dffe4=[_0x15520b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x15520b([0x74,0x72,0x69,0x61,0x6c])][_0x15520b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e096e[_0x15520b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1f4003/0x3e8:0xe10*_0x128973;return _0x2e096e[_0x15520b([0x65,0x78,0x70])]<_0x5dffe4;}function _0x133738(){const _0xc99451=_0x2e096e[_0x15520b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0xc99451)return!0x1;if(_0xc99451[_0x15520b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15520b([0x2a])))return!0x0;if(_0xc99451[_0x15520b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15520b([0x43,0x4d,0x54])))return!0x0;if(_0xc99451[_0x15520b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15520b([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x26f0b5())return!0x0;if(_0xc99451[_0x15520b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15520b([0x52,0x43,0x4d,0x54]))){if(_0x183536())return!0x0;if(_0xa57184()||_0x48f68d())return!0x0;}return!0x1;}function _0x18cc29(){const _0xa5a5a2=_0x2e096e[_0x15520b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0xa5a5a2||0x0==_0xa5a5a2[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x7fb7dc}=new URL(window[_0x15520b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0xa5a5a2[_0x15520b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x7fb7dc))return!0x0;const _0x55b972=_0x7fb7dc[_0x15520b([0x73,0x70,0x6c,0x69,0x74])](_0x15520b([0x2e]));return _0xa5a5a2[_0x15520b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32a4b3=>_0x32a4b3[_0x15520b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15520b([0x2a])))[_0x15520b([0x6d,0x61,0x70])](_0x27a968=>_0x27a968[_0x15520b([0x73,0x70,0x6c,0x69,0x74])](_0x15520b([0x2e])))[_0x15520b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1d192e=>_0x1d192e[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x55b972[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x15520b([0x6d,0x61,0x70])](_0x558c04=>Array(_0x55b972[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x558c04[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x15520b([0x66,0x69,0x6c,0x6c])](_0x558c04[0x0]===_0x15520b([0x2a])?_0x15520b([0x2a]):'')[_0x15520b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x558c04))[_0x15520b([0x73,0x6f,0x6d,0x65])](_0x44c887=>_0x55b972[_0x15520b([0x65,0x76,0x65,0x72,0x79])]((_0x5834d1,_0x389352)=>_0x44c887[_0x389352]===_0x5834d1||_0x44c887[_0x389352]===_0x15520b([0x2a])));}function _0xd9a799(){return _0x291457&&_0x5ca9fc?new window[(_0x15520b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1b8ea1,_0x3f19c7)=>{_0x291457[_0x15520b([0x74,0x68,0x65,0x6e])](_0x1b8ea1,_0x3f19c7),_0x5ca9fc[_0x15520b([0x74,0x68,0x65,0x6e])](_0x1b4e59=>{_0x1b4e59!=_0x15520b([0x56,0x61,0x6c,0x69,0x64])&&_0x1b8ea1(_0x1b4e59);},_0x3f19c7);}):_0x291457||_0x5ca9fc||_0x15520b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x35c740(_0x4eeafb,_0x39f837){return new window[(_0x15520b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50dcec=>{if(_0xdf1fc5())return _0x50dcec(_0x15520b([0x56,0x61,0x6c,0x69,0x64]));_0x183700(),_0x2fb965[_0x15520b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x15520b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x71d6cd=!0x1;const _0x16dc9f=_0x5e992a();function _0x5753b4(_0x1b45a3){return!!_0x1b45a3&&(typeof _0x1b45a3===_0x15520b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1b45a3===_0x15520b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1b45a3[_0x15520b([0x74,0x68,0x65,0x6e])]===_0x15520b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1b45a3[_0x15520b([0x63,0x61,0x74,0x63,0x68])]===_0x15520b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x350519(_0x2a2459){_0x3b7c83(_0x2a2459)[_0x15520b([0x74,0x68,0x65,0x6e])](_0x459faf=>{if(!_0x459faf||_0x459faf[_0x15520b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x15520b([0x6f,0x6b]))return _0x15520b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x57c76a(_0x3fec61(_0x16dc9f+_0x39f837))!=_0x459faf[_0x15520b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x15520b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x15520b([0x56,0x61,0x6c,0x69,0x64]);})[_0x15520b([0x74,0x68,0x65,0x6e])](_0x316bb3=>(_0x49cfbd(),_0x316bb3),()=>{const _0x3ddd89=_0x4a4643();return null==_0x3ddd89?(_0x49cfbd(),_0x15520b([0x56,0x61,0x6c,0x69,0x64])):_0x15520b(_0x1f4003-_0x3ddd89>(0x574a8eb3^_0x1cd591)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x15520b([0x74,0x68,0x65,0x6e])](_0x50dcec)[_0x15520b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x50dcec(_0x15520b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x54eec8=0x7370e433^_0x1cd591;function _0x49cfbd(){const _0x2d2d85=_0x15520b([0x6c,0x6c,0x63,0x74,0x2d])+_0x57c76a(_0x3fec61(_0x4eeafb)),_0x16a812=_0x2af64f(_0x57c76a(window[_0x15520b([0x4d,0x61,0x74,0x68])][_0x15520b([0x63,0x65,0x69,0x6c])](_0x1f4003/_0x54eec8)));window[_0x15520b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x15520b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2d2d85,_0x16a812);}function _0x4a4643(){const _0x3608af=_0x15520b([0x6c,0x6c,0x63,0x74,0x2d])+_0x57c76a(_0x3fec61(_0x4eeafb)),_0x4e230f=window[_0x15520b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x15520b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3608af);return _0x4e230f?window[_0x15520b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2af64f(_0x4e230f),0x10)*_0x54eec8:null;}function _0x3b7c83(_0x3c8e47){return new window[(_0x15520b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5c1754,_0x26bef1)=>{_0x3c8e47[_0x15520b([0x74,0x68,0x65,0x6e])](_0x5c1754,_0x26bef1),window[_0x15520b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x26bef1,0x7347de73^_0x1cd591);});}}_0x2fb965[_0x15520b([0x6f,0x6e])](_0x15520b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1dff81,_0x2c59f0)=>{if(_0x2c59f0[0x0]!=_0x4eeafb)return _0x50dcec(_0x15520b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2c59f0[0x1]={..._0x2c59f0[0x1],[_0x15520b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x16dc9f};},{[_0x15520b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x15520b([0x68,0x69,0x67,0x68])}),_0x2fb965[_0x15520b([0x6f,0x6e])](_0x15520b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x571bee=>{_0x5753b4(_0x571bee[_0x15520b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x71d6cd=!0x0,_0x350519(_0x571bee[_0x15520b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x15520b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x15520b([0x6c,0x6f,0x77])}),_0x4d22b6[_0x15520b([0x74,0x68,0x65,0x6e])](()=>{_0x71d6cd||_0x50dcec(_0x15520b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xdf1fc5(){return _0x2fb965[_0x15520b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15520b([0x76,0x69,0x65,0x77])][_0x15520b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x15520b([0x61,0x75,0x74,0x6f]);}function _0x183700(){_0x2fb965[_0x15520b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15520b([0x76,0x69,0x65,0x77])][_0x15520b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x15520b([0x61,0x75,0x74,0x6f]);}}function _0x35bc27(_0x3d5cb9){const _0x19ae81=[new window[(_0x15520b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xfc82a6=>setTimeout(_0xfc82a6,0x734f347f^_0x1cd591)),_0x4d22b6[_0x15520b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x15520b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xe42730=>{let _0x8e3f87=0x0;_0x2fb965[_0x15520b([0x6d,0x6f,0x64,0x65,0x6c])][_0x15520b([0x6f,0x6e])](_0x15520b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1e42d0,_0x1149bf)=>{_0x1149bf[0x0][_0x15520b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x8e3f87++,_0x8e3f87==(0x73460f5b^_0x1cd591)&&(_0xe42730(),_0x1e42d0[_0x15520b([0x6f,0x66,0x66])]());});}))];return window[_0x15520b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x15520b([0x72,0x61,0x63,0x65])](_0x19ae81)[_0x15520b([0x74,0x68,0x65,0x6e])](()=>_0x3d5cb9);}async function _0x57de93(){await _0x4d22b6,_0x2fb965[_0x15520b([0x6d,0x6f,0x64,0x65,0x6c])][_0x15520b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2da55d,_0x2fb965[_0x15520b([0x6d,0x6f,0x64,0x65,0x6c])][_0x15520b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2da55d,_0x2fb965[_0x15520b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x15520b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x26f0b5(){return window[_0x15520b([0x67,0x6c,0x6f,0x62])]&&window[_0x15520b([0x67,0x6c,0x6f,0x62])][_0x15520b([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x183536(){return _0x12f8bf(_0x15520b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3d41b0(_0x15520b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x15520b([0x73,0x74,0x61,0x74,0x65])]==_0x15520b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xa57184(){return _0x12f8bf(_0x15520b([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x48f68d(){return _0x12f8bf(_0x15520b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x39bc77(_0xed400a){const _0x377c3c=_0x3538ae();_0x2fb965[_0x377c3c]=_0x15520b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xed400a,_0xed400a!=_0x15520b([0x56,0x61,0x6c,0x69,0x64])&&_0x57de93();}function _0x3538ae(){const _0x4f74fb=window[_0x15520b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x15520b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x15520b([0x6e,0x6f,0x77])]())[_0x15520b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x15520b([0x2e]),'');let _0x83ddac=_0x15520b([0x4b]);for(let _0x3fdc80=0x0;_0x3fdc80<_0x4f74fb[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3fdc80+=0x2){let _0x4c45d6=window[_0x15520b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f74fb[_0x15520b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3fdc80,_0x3fdc80+0x2));_0x4c45d6>=_0x385ad0[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4c45d6-=_0x385ad0[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x83ddac+=_0x385ad0[_0x4c45d6];}return _0x83ddac;}function _0x13aa62(){const _0x4ba0a8=_0x386d08[_0x15520b([0x73,0x70,0x6c,0x69,0x74])](_0x15520b([0x2e]));if(0x3!=_0x4ba0a8[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3f571d(_0x4ba0a8[0x1]);function _0x3f571d(_0xfff348){const _0x5482ed=_0x793194(_0xfff348);return _0x5482ed&&_0x808e00()?_0x5482ed:null;function _0x808e00(){const _0x5ad509=_0x5482ed[_0x15520b([0x6a,0x74,0x69])],_0x3ed52c=window[_0x15520b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5ad509[_0x15520b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5ad509[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xc0690a={..._0x5482ed,[_0x15520b([0x6a,0x74,0x69])]:_0x5ad509[_0x15520b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5ad509[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xc0690a[_0x15520b([0x76,0x63])],_0x3fec61(_0xc0690a)==_0x3ed52c;}}}async function _0x16ae14(){let _0x1e7345=!0x0;try{const _0xa14a51=_0x386d08[_0x15520b([0x73,0x70,0x6c,0x69,0x74])](_0x15520b([0x2e])),[_0x16a10d,_0x1d6534,_0x259cc8]=_0xa14a51;return _0x2555a8(_0x16a10d),await _0x392444(_0x16a10d,_0x1d6534,_0x259cc8),_0x1e7345;}catch{return!0x1;}function _0x2555a8(_0x50c96b){const _0x5891c9=_0x793194(_0x50c96b);_0x5891c9&&_0x5891c9[_0x15520b([0x61,0x6c,0x67])]==_0x15520b([0x45,0x53,0x32,0x35,0x36])||(_0x1e7345=!0x1);}async function _0x392444(_0x20a9b2,_0x208d8c,_0x26730e){const _0x1999e1=window[_0x15520b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x15520b([0x66,0x72,0x6f,0x6d])](_0x19fb57(_0x26730e),_0x36530d=>_0x36530d[_0x15520b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5d7803=new window[(_0x15520b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x15520b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x20a9b2+_0x15520b([0x2e])+_0x208d8c),_0x39a3e3=window[_0x15520b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x15520b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x39a3e3)return;const _0x268496=await _0x39a3e3[_0x15520b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x15520b([0x6a,0x77,0x6b]),_0x16f832,{[_0x15520b([0x6e,0x61,0x6d,0x65])]:_0x15520b([0x45,0x43,0x44,0x53,0x41]),[_0x15520b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x15520b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x15520b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x39a3e3[_0x15520b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x15520b([0x6e,0x61,0x6d,0x65])]:_0x15520b([0x45,0x43,0x44,0x53,0x41]),[_0x15520b([0x68,0x61,0x73,0x68])]:{[_0x15520b([0x6e,0x61,0x6d,0x65])]:_0x15520b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x268496,_0x1999e1,_0x5d7803)||(_0x1e7345=!0x1);}}function _0x793194(_0x55b893){return _0x55b893[_0x15520b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x15520b([0x65,0x79]))?JSON[_0x15520b([0x70,0x61,0x72,0x73,0x65])](_0x19fb57(_0x55b893)):null;}function _0x19fb57(_0x2b47d5){return window[_0x15520b([0x61,0x74,0x6f,0x62])](_0x2b47d5[_0x15520b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x15520b([0x2b]))[_0x15520b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x15520b([0x2f])));}function _0x3fec61(_0x2021b7){let _0x18c827=0x1505;function _0x3b5c1a(_0x33e4e0){for(let _0x1326c6=0x0;_0x1326c6<_0x33e4e0[_0x15520b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1326c6++){const _0x145206=_0x33e4e0[_0x15520b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1326c6);_0x18c827=(_0x18c827<<0x5)+_0x18c827+_0x145206,_0x18c827&=_0x18c827;}}function _0x112bf2(_0x2e7f6f){Array[_0x15520b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2e7f6f)?_0x2e7f6f[_0x15520b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x112bf2):_0x2e7f6f&&typeof _0x2e7f6f==_0x15520b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x15520b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2e7f6f)[_0x15520b([0x73,0x6f,0x72,0x74])]()[_0x15520b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xd7343f,_0x1900de])=>{_0x3b5c1a(_0xd7343f),_0x112bf2(_0x1900de);}):_0x3b5c1a(window[_0x15520b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2e7f6f));}return _0x112bf2(_0x2021b7),_0x18c827>>>0x0;}function _0x57c76a(_0x179f03){return _0x179f03[_0x15520b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x15520b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x15520b([0x30]));}function _0x2af64f(_0x3ef765){return _0x3ef765[_0x15520b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x15520b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x15520b([0x6a,0x6f,0x69,0x6e])]('');}function _0x12f8bf(_0x5f110d){return _0x2fb965[_0x15520b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x15520b([0x68,0x61,0x73])](_0x5f110d);}function _0x3d41b0(_0x2b5f87){return _0x2fb965[_0x15520b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x15520b([0x67,0x65,0x74])](_0x2b5f87);}function _0x2da55d(){}function _0x15520b(_0x2f5309){return _0x2f5309['map'](_0x1df4e6=>String['fromCharCode'](_0x1df4e6))['join']('');}_0x39bc77(await _0x24d806());}(this);}['destroy'](){const _0x135100=this['editor']['plugins']['get'](CommentsRepository),_0x4b7335=this['editor']['config']['get']('collaboration.channelId');for(const _0xd45599 of _0x135100['getCommentThreads']({'channelId':_0x4b7335}))_0x135100['_detachCommentThread'](_0xd45599['id']),_0x135100['_threads']['delete'](_0xd45599['id']);super['destroy']();}['hasMarkerForId'](_0x9d7fa4){return this['getAllMarkersForId'](_0x9d7fa4)['length']>0x0;}['getAllMarkersForId'](_0x17f89e){const _0x158b38=[];for(const _0x1c0bf9 of this['editor']['model']['markers'])_0x1c0bf9['name']['startsWith']('comment:'+_0x17f89e)&&_0x158b38['push'](_0x1c0bf9);return _0x158b38;}['scrollToThreadMarker'](_0x1366a2){setTimeout(()=>{const _0xe020bc=this['_getTargetForId'](_0x1366a2);if(!_0xe020bc)return;this['activeMarker']&&Pt(this['activeMarker'])['id']===_0x1366a2&&_0x25985d({'target':_0xe020bc[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x29eeb8){this['editor']['model']['change'](()=>{for(const _0x13d118 of this['getAllMarkersForId'](_0x29eeb8))this['editor']['editing']['reconvertMarker'](_0x13d118);});}['_attachArchivedThread'](_0x29c292){const _0x2ab4d6=this['editor']['plugins']['get'](CommentsRepository),_0x384b16=this['editor']['plugins']['get'](EditorAnnotations),_0x17a3e7=_0x2ab4d6['getCommentThread'](_0x29c292);if(!_0x17a3e7['isAttached']){const _0x54b016=_0x17a3e7['attachTo'](()=>this['_getTargetForId'](_0x17a3e7['id']));_0x384b16['registerAnnotation'](_0x54b016),_0x17a3e7['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4ead1c=this['editor'],_0x4fac0b=_0x4ead1c['plugins']['get'](_0xddae28);_0x4ead1c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2bc15e,_0x150995)=>{const {id:_0x4198c6}=Pt(_0x2bc15e['markerName']),_0x108572=_0x4ead1c['plugins']['get'](CommentsRepository)['getCommentThread'](_0x4198c6),_0x5c2af4=this['activeMarker']&&Pt(this['activeMarker'])['id']===_0x4198c6;let _0x57fbba;if(_0x108572&&_0x108572['isResolved']&&!_0x5c2af4&&_0x2bc15e['item'])return _0x150995['consumable']['consume'](_0x2bc15e['item'],'addMarker:'+_0x2bc15e['markerName']),_0x150995['consumable']['consume'](_0x2bc15e['item'],'removeMarker:'+_0x2bc15e['markerName']),null;const _0x47d987=['ck-comment-marker'];return _0x5c2af4&&_0x47d987['push']('ck-comment-marker--active'),_0x57fbba=_0x108572?.['length']?_0x108572['comments']['first']['author']['id']:_0x4fac0b['me']['id'],{'classes':_0x47d987,'attributes':{'data-comment':_0x4198c6,'data-author-id':_0x57fbba}};}}),_0x4ead1c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x37980d,{options:_0x1d9fa1})=>{if(_0x1d9fa1['showCommentHighlights'])return null;const _0x561711=_0x4ead1c['plugins']['get'](CommentsRepository),_0x1e1a36=_0x4ead1c['model']['markers']['get'](_0x37980d),{id:_0x40c415,part:_0x24249a}=Pt(_0x37980d);return _0x1e1a36&&!_0x1e1a36['affectsData']||_0x1d9fa1['ignoreResolvedComments']&&_0x561711['getCommentThread'](_0x40c415)?.['isResolved']?null:{'group':'comment','name':_0x24249a?_0x40c415+':'+_0x24249a:_0x40c415};}}),_0x4ead1c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x4b61e5,{writer:_0x169e65})=>_0x169e65['createElement']('$marker',{'data-name':'comment:'+_0x4b61e5['getAttribute']('id')})}),_0x4ead1c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x35ef27=this['editor'],_0x50d226=_0x35ef27['plugins']['get'](CommentsRepository),_0x2c4f8c=new Set(),_0x28d686=new Set();_0x35ef27['model']['document']['registerPostFixer'](_0x5d7250=>{let _0x4e12c1=!0x1;for(const {name:_0x25cca8,data:_0x27e101}of _0x35ef27['model']['document']['differ']['getChangedMarkers']()){const {group:_0xc47b37,id:_0x18bdf1}=Pt(_0x25cca8);let _0x18d192=_0x27e101['newRange'];if('comment'!==_0xc47b37||!_0x18d192)continue;const _0x234e8e='$graveyard'===_0x18d192['root']['rootName'];_0x234e8e||(_0x18d192=Lt(_0x18d192,_0x35ef27['model']),!_0x18d192||_0x18d192['isCollapsed']||!_0x27e101['newRange']||_0x18d192['isEqual'](_0x27e101['newRange']))?_0x35ef27['model']['hasContent'](_0x18d192)&&!_0x234e8e?this['isThreadsLoadingPaused']?_0x2c4f8c['add'](_0x25cca8):this['_handleThreadMarker'](_0x25cca8,_0x18bdf1):(_0x28d686['add'](_0x25cca8),_0x2c4f8c['delete'](_0x25cca8),_0x5d7250['removeMarker'](_0x25cca8),_0x4e12c1=!0x0):(_0x5d7250['updateMarker'](_0x25cca8,{'range':_0x18d192}),_0x4e12c1=!0x0);}return _0x4e12c1;}),this['on']('change:isThreadsLoadingPaused',(_0x81c6c5,_0x4d4e8c,_0x1a8097)=>{if(!_0x1a8097&&_0x2c4f8c['size'])for(const _0x481e8c of _0x2c4f8c){const {id:_0x22c029}=Pt(_0x481e8c);_0x2c4f8c['delete'](_0x481e8c),_0x35ef27['model']['markers']['get'](_0x481e8c)&&this['_handleThreadMarker'](_0x481e8c,_0x22c029);}}),this['listenTo'](_0x35ef27['model']['document'],'change',()=>{for(const {name:_0x50bf36,data:{newRange:_0x3dc0ee}}of _0x35ef27['model']['document']['differ']['getChangedMarkers']()){const {group:_0x41de39,id:_0x349c6c}=Pt(_0x50bf36);if('comment'!==_0x41de39)continue;const _0x5bb107=_0x50d226['getCommentThread'](_0x349c6c),_0x3b63f3=this['hasMarkerForId'](_0x349c6c);_0x5bb107&&(!_0x5bb107['_hasTargetInContent']&&_0x3dc0ee&&_0x35ef27['editing']['view']['once']('render',()=>{const _0x15d4c0=_0x35ef27['plugins']['get'](Annotations),_0x47ac26=_0x50d226['_threadToController']['get'](_0x5bb107)['view'];_0x15d4c0['getByInnerView'](_0x47ac26)['refreshVisibility']();},{'priority':'low'}),_0x5bb107['_hasTargetInContent']=_0x3b63f3||!!_0x3dc0ee),_0x3dc0ee||(_0x28d686['add'](_0x50bf36),_0x2c4f8c['delete'](_0x50bf36));}for(const _0x551219 of _0x28d686){const {id:_0x455396}=Pt(_0x551219),_0x42cc6b=_0x50d226['getCommentThread'](_0x455396);if(_0x2c4f8c['delete'](_0x551219),!_0x42cc6b)continue;const _0x35625f=this['hasMarkerForId'](_0x455396);_0x35625f||_0x42cc6b['isSubmitted']?_0x35625f||_0x42cc6b['unlinkedAt']||_0x42cc6b['setUnlinkedAt'](new Date()):_0x42cc6b['remove']();}_0x28d686['clear']();});}['_handleInitialThreads'](_0x33cc1e){_0x33cc1e['forEach'](_0x33814d=>{_0x33814d['unlinkedAt']&&this['_attachArchivedThread'](_0x33814d['id']);});}['_getTargetForId'](_0x536c46){const _0x5bf50d=this['editor'],_0x33c5be=this['getAllMarkersForId'](_0x536c46);return _0x38b934(_0x5bf50d['editing'],_0x33c5be);}['_getTextContext'](_0x51eda8){const _0x20e670=this['getAllMarkersForId'](_0x51eda8);let _0x48b721='',_0x42e330=!0x1;for(const _0x38e030 of _0x20e670){const _0x43a283=_0x38e030['getRange']();for(const _0x11b001 of Array['from'](_0x43a283['getItems']()))_0x11b001['is']('$textProxy')?(_0x48b721&&_0x42e330&&(_0x48b721+='\x20',_0x42e330=!0x1),_0x48b721+=_0x11b001['data']):_0x42e330=!0x0;_0x42e330=!0x0;}return _0x48b721['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x165e6e,_0x217d6c){const _0x1b97ca=this['editor'],_0xd67fbd=_0x1b97ca['plugins']['get'](CommentsRepository);let _0x385f7d=_0xd67fbd['getCommentThread'](_0x217d6c);const _0x22dd46=_0x1b97ca['config']['get']('collaboration.channelId'),_0x43b779=_0x1b97ca['plugins']['get'](EditorAnnotations);if(_0x385f7d&&(_0x385f7d['unlinkedAt']&&_0x385f7d['setUnlinkedAt'](null),_0x385f7d['isAttached']))return _0x385f7d;return!this['getAllMarkersForId'](_0x217d6c)[0x0]['managedUsingOperations']?_0x1b97ca['editing']['view']['once']('render',()=>{if(_0xd67fbd['getCommentThread'](_0x217d6c))return;const _0x4e9a58=_0x1b97ca['plugins']['get'](Annotations);_0x385f7d=_0xd67fbd['openNewCommentThread']({'channelId':_0x22dd46,'threadId':_0x217d6c,'target':()=>this['_getTargetForId'](_0x217d6c),'context':{'type':'text','value':this['_getTextContext'](_0x217d6c)}});const _0x578783=_0xd67fbd['_threadToController']['get'](_0x385f7d)['view'],_0x2a0772=_0x4e9a58['getByInnerView'](_0x578783);_0x2a0772&&_0x43b779['registerAnnotation'](_0x2a0772);},{'priority':'low'}):_0xd67fbd['fetchCommentThread']({'channelId':_0x22dd46,'threadId':_0x217d6c})['then'](_0x5cb1a6=>{if('destroyed'!==_0x1b97ca['state']){if(_0x385f7d=_0x5cb1a6,_0x385f7d&&!_0x385f7d['isAttached']){const _0x3567e9=_0x385f7d['attachTo'](()=>this['_getTargetForId'](_0x217d6c));_0x43b779['registerAnnotation'](_0x3567e9),_0x385f7d['isResolved']&&this['_reconvertMarkers'](_0x217d6c);}else{if(!_0x385f7d){const _0x4d2908=this['getAllMarkersForId'](_0x217d6c);_0x1b97ca['model']['change'](_0xf0ba33=>{for(const _0x5750ed of _0x4d2908)_0xf0ba33['removeMarker'](_0x5750ed);});}}}}),_0x385f7d;}['_handleThreadMarker'](_0x2d66d3,_0xcad76c){const _0x339b8a=this['_attachMarkerToThread'](_0x2d66d3,_0xcad76c);_0x339b8a&&!_0x339b8a['context']&&_0x339b8a['setContext']({'type':'text','value':this['_getTextContext'](_0xcad76c)});}['_initAriaMarkerChangeAnnouncements'](){const _0x67bf97=this['editor'];_0x53b429(_0x67bf97['model'],({left:_0x285e96,entered:_0x14c73a})=>{for(const _0x373699 of _0x285e96)if(Dt(_0x373699)){_0x67bf97['ui']['ariaLiveAnnouncer']['announce'](vt(_0x67bf97['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2fe794 of _0x14c73a)if(Dt(_0x2fe794)){_0x67bf97['ui']['ariaLiveAnnouncer']['announce'](vt(_0x67bf97['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x2b8cc1(_0x274104)));break;}});}}function Vt(_0x4ebfdb,_0x8949b4){return _0x8949b4?_0x4ebfdb+':'+_0x8949b4:_0x4ebfdb;}function Lt(_0x28ddef,_0x448792){const _0x3b2ea6=_0x448792['schema'],_0x3232f8=_0x448792['createRange'](_0x28ddef['start']);for(const _0xcf89b1 of _0x28ddef['getWalker']()){const {type:_0xed5ec1,item:_0x3311c3,nextPosition:_0x92f266}=_0xcf89b1;if('text'===_0xed5ec1||_0x3b2ea6['isObject'](_0x3311c3)){const _0x3efc0e=_0x448792['createPositionBefore'](_0x3311c3);_0x3232f8['isCollapsed']&&(_0x3232f8['start']=_0x3efc0e),_0x3232f8['end']=_0x92f266;}}return _0x3232f8;}function Dt(_0x4a8204){return'comment'===Pt(_0x4a8204['name'])['group'];}class CommentsUI extends _0x4f2bb8{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsRepository,CommentsEditing,EditorAnnotations,Annotations];}get['CommentsListView'](){return CommentsListView;}get['CommentThreadInputView'](){return CommentThreadInputView;}['init'](){const _0x2dd5c1=this['editor'],_0x3b5c01=_0x2dd5c1['plugins']['get'](CommentsRepository),_0x1a866f=_0x2dd5c1['plugins']['get'](CommentsEditing),_0x16376e=_0x2dd5c1['plugins']['get'](Annotations),_0x528646=_0x2dd5c1['plugins']['get'](EditorAnnotations);_0x2dd5c1['ui']['componentFactory']['add']('comment',()=>{const _0xbbaa95=this['_createUIButton'](_0x4f2fe4);return _0xbbaa95['tooltip']=!0x0,_0xbbaa95;}),_0x2dd5c1['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](ot)),_0x528646['addSourceCollector'](()=>{const _0x8909d0=[];for(const [_0x334397,_0x37aeb7]of _0x3b5c01['_threadToController']){const _0x21377a=_0x1a866f['getAllMarkersForId'](_0x334397['id']),_0x5f5080=_0x21377a['map'](_0x3e1f92=>_0x3e1f92['getRange']());_0x21377a['length']>0x0&&_0x8909d0['push']([_0x37aeb7['view'],_0x5f5080]);}return _0x8909d0;}),this['listenTo'](_0x16376e,'change:activeAnnotations',(_0x1f7c6c,_0x2c2325,_0x48ccb2)=>{const _0x7f5988=Array['from'](_0x48ccb2)['map'](_0x12a9c7=>_0x12a9c7['innerView'])['find'](_0x48e24e=>_0x3b5c01['_viewToController']['has'](_0x48e24e));if(!_0x7f5988)return void(_0x1a866f['activeMarker']=null);const _0x539f7e=_0x3b5c01['_viewToController']['get'](_0x7f5988)['model']['id'],_0x3a23af='comment:'+_0x539f7e;_0x539f7e&&_0x1a866f['hasMarkerForId'](_0x539f7e)?_0x1a866f['activeMarker']=_0x3a23af:_0x1a866f['activeMarker']&&(_0x1a866f['activeMarker']=null);}),this['listenTo'](_0x3b5c01,'removeCommentThread',(_0x11c5b0,{threadId:_0x3ab1d3,isFromAdapter:_0x2547ed})=>{!_0x2547ed&&_0x2dd5c1['ui']['focusTracker']['isFocused']&&_0x1a866f['hasMarkerForId'](_0x3ab1d3)&&_0x2dd5c1['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3b5c01,'addComment',(_0x426d15,{threadId:_0x295a42,isFromAdapter:_0x333f39})=>{if(_0x333f39||!_0x1a866f['hasMarkerForId'](_0x295a42)||!_0x3b5c01['hasCommentThread'](_0x295a42))return;0x1===_0x3b5c01['getCommentThread'](_0x295a42)['length']&&(_0x2dd5c1['editing']['view']['focus'](),_0x426d15['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x41dd3f=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3bd5f1;for(const _0x1d39c4 in _0x41dd3f){const _0x3baad7=_0x1d39c4,_0x2b239b=_0x41dd3f[_0x3baad7];if('commentsLicenseKeyValid'==_0x2b239b||'commentsLicenseKeyInvalid'==_0x2b239b||'commentsLicenseKeyExpired'==_0x2b239b||'commentsLicenseKeyDomainLimit'==_0x2b239b||'commentsLicenseKeyNotAllowed'==_0x2b239b||'commentsLicenseKeyEvaluationLimit'==_0x2b239b||'commentsLicenseKeyUsageLimit'==_0x2b239b){delete _0x41dd3f[_0x3baad7],_0x3bd5f1=_0x2b239b,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3bd5f1&&_0x41dd3f['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3bd5f1&&_0x41dd3f['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3bd5f1&&_0x41dd3f['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3bd5f1&&_0x41dd3f['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3bd5f1&&_0x41dd3f['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3bd5f1&&_0x41dd3f['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x45c11c){const _0x5907d0=this['editor'],_0xc6bb59=new _0x45c11c(_0x5907d0['locale']),_0x1a40ed=_0x5907d0['commands']['get']('addCommentThread');return _0xc6bb59['set']({'label':vt(_0x5907d0['locale'],'Comment'),'icon':_0x41581f}),_0xc6bb59['bind']('isEnabled')['to'](_0x1a40ed,'isEnabled',_0x1a40ed,'hasContent',(_0x4b1c76,_0x5e3954)=>_0x4b1c76&&_0x5e3954),this['listenTo'](_0xc6bb59,'execute',()=>{_0x1a40ed['execute']();}),_0xc6bb59;}}class CommentsOnly extends _0x4f2bb8{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsEditing];}constructor(_0x1fe0f2){super(_0x1fe0f2),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1fb229,_0x4713da,_0x87d167)=>{_0x87d167?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1941db,_0x5b246b]of this['editor']['commands'])_0x5b246b['affectsData']&&'addCommentThread'!==_0x1941db&&_0x5b246b['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x3e0e37=this['editor']['editing']['view']['document'];this['listenTo'](_0x3e0e37,'cut',_0x576f08=>_0x576f08['stop'](),{'priority':'highest'}),this['listenTo'](_0x3e0e37,'clipboardInput',_0x28fa64=>_0x28fa64['stop'](),{'priority':'highest'}),this['listenTo'](_0x3e0e37,'delete',_0x447d96=>_0x447d96['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2e6e52,_0x3e4029]of this['editor']['commands'])_0x3e4029['affectsData']&&'addCommentThread'!==_0x2e6e52&&_0x3e4029['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class AnnotationsUIs extends _0x16b5a9{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[Annotations];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2fab7){super(_0x2fab7),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x311e07=this['context']['plugins']['get'](Annotations);this['listenTo'](_0x311e07,'_activateAnnotation',(_0x4f90f1,_0x3b658e)=>{for(const _0x58ee18 of this['activeUIs']){const _0x35560e=this['_uis']['get'](_0x58ee18);(0x0,this['uisData']['get'](_0x58ee18)['filter'])(_0x3b658e)&&_0x35560e['setActiveAnnotation'](_0x3b658e);}}),this['listenTo'](_0x311e07,'_deactivateAllAnnotations',()=>{for(const _0x57ba3f of this['activeUIs']){this['_uis']['get'](_0x57ba3f)['setActiveAnnotation'](null);}}),this['listenTo'](_0x311e07['_visibleAnnotations'],'add',(_0x45463a,_0x2e9c18)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2e9c18);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x59d313){return this['activeUIs']['has'](_0x59d313);}['activate'](_0x4d5c74,_0x32b5c9=this['defaultFilter']){const _0x312a26=this['context']['plugins']['get'](Annotations);if(!this['_uis']['has'](_0x4d5c74))throw new _0x381f6d('annotationsuis-missing-ui',this,{'uiName':_0x4d5c74});this['isActive'](_0x4d5c74)&&this['deactivate'](_0x4d5c74),this['activeUIs']['add'](_0x4d5c74);const _0x19c632=new AnnotationCollection();Ot({'source':_0x312a26['_visibleAnnotations'],'target':_0x19c632,'filter':_0x32b5c9}),this['uisData']['set'](_0x4d5c74,{'collection':_0x19c632,'filter':_0x32b5c9});const _0xbc3851=this['_uis']['get'](_0x4d5c74);_0xbc3851['attach'](_0x19c632),this['listenTo'](_0xbc3851,'change:activeAnnotation',(_0x3248e7,_0x32aa0c,_0x2d1094,_0x450d6d)=>{_0x450d6d&&_0x312a26['_removeActiveAnnotation'](_0x450d6d),_0x2d1094&&_0x312a26['_addActiveAnnotation'](_0x2d1094);});}['deactivate'](_0xce74e6){if(this['activeUIs']['delete'](_0xce74e6),!this['_uis']['has'](_0xce74e6))throw new _0x381f6d('annotationsuis-missing-ui',this,{'uiName':_0xce74e6});const _0x80137c=this['_uis']['get'](_0xce74e6);_0x80137c['detach'](),this['stopListening'](_0x80137c),this['uisData']['get'](_0xce74e6)['collection']['destroy'](),this['uisData']['delete'](_0xce74e6);}['switchTo'](_0x11b0dc){if(!this['_uis']['has'](_0x11b0dc))throw new _0x381f6d('annotationsuis-missing-ui',this,{'uiName':_0x11b0dc});const _0x455f9b=this['context']['plugins']['get'](Annotations),_0x57ee44=Array['from'](_0x455f9b['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x11b0dc);const _0x1aa345=this['_uis']['get'](_0x11b0dc);_0x1aa345['setActiveAnnotation'](_0x57ee44),_0x1aa345['_setSelectedAnnotations']&&_0x57ee44&&_0x1aa345['_setSelectedAnnotations']([_0x57ee44]);}['deactivateAll'](){for(const _0x3f1a30 of this['activeUIs'])this['deactivate'](_0x3f1a30);}['register'](_0x5ea746,_0x40d242){if(this['_uis']['has'](_0x5ea746))throw new _0x381f6d('annotationsuis-register-already-registered');if('function'!=typeof _0x40d242['attach']||'function'!=typeof _0x40d242['detach']||'function'!=typeof _0x40d242['setActiveAnnotation'])throw new _0x381f6d('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5ea746,_0x40d242);}['refilterAnnotations'](){const _0x431134=this['context']['plugins']['get'](Annotations)['collection'],_0x2c4ff8=new Map(),_0x2d3775=Array['from'](this['activeUIs']);for(const _0xfac252 of this['activeUIs']){const _0x1a7235=this['uisData']['get'](_0xfac252)['collection'];for(const _0x4c7c83 of _0x1a7235)_0x2c4ff8['set'](_0x4c7c83,_0xfac252);}for(const _0x3b2bce of _0x431134){const _0x38fd7b=_0x2c4ff8['get'](_0x3b2bce);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3b2bce);const _0x16ba0b=_0x2d3775['find'](_0x4aef40=>this['uisData']['get'](_0x4aef40)['filter'](_0x3b2bce));_0x38fd7b!==_0x16ba0b&&(_0x38fd7b&&this['uisData']['get'](_0x38fd7b)['collection']['remove'](_0x3b2bce),_0x16ba0b&&this['uisData']['get'](_0x16ba0b)['collection']['add'](_0x3b2bce));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd75229){const _0x5306d2=[];for(const _0x57ff5e of this['activeUIs']){(0x0,this['uisData']['get'](_0x57ff5e)['filter'])(_0xd75229)&&_0x5306d2['push'](_0x57ff5e);}if(_0x5306d2['length']>0x1)throw new _0x381f6d('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5306d2,'annotationType':_0xd75229['type']});}}const Bt=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
_0x189a0c('px');class AnnotationsSidebarItemView extends _0xfc41b8{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x20baf6){super(_0x20baf6),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4e0425,_0x4a02da)=>_0x4e0425+_0x4a02da),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Nt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4b87c8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4b87c8['to']('isAnimationDisabled',_0x1792fe=>_0x1792fe?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4b87c8['to']('top',_0x2f001a=>Ht(_0x2f001a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x22cf88=this['element']['clientHeight'];_0x22cf88&&(this['height']=_0x22cf88);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class Sidebar extends _0x16b5a9{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8325f0){super(_0x8325f0),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x96319a=this['context']['config']['get']('sidebar.container');_0x96319a&&this['setContainer'](_0x96319a);}['setContainer'](_0x21e445){if(!Ft(_0x21e445))throw new _0x381f6d('sidebar-setcontainer-invalid-element');this['container']=_0x21e445;}['_attachToContainer']({viewClass:_0xf1dc4e='',spaceBetweenItems:_0x22c43c=0x19}={}){if(!Ft(this['container']))throw new _0x381f6d('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0xf1dc4e,this['_spaceBetweenItems']=_0x22c43c;}['rearrange']({removedAnnotation:_0x4a7738,previousAnnotation:_0x30343a,nextAnnotation:_0x5aa723}){const _0x4f12dd=this['getSidebarItemView'](_0x4a7738);this['view']['list']['remove'](_0x4f12dd),this['_destroySidebarItemView'](_0x4a7738),_0x30343a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x30343a)),_0x5aa723&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5aa723)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x12047a,activatedAnnotation:_0x53980f,disableAnimationOnActivatedAnnotation:_0x10a29f}){if(this['_activeAnnotation']=_0x53980f,_0x12047a){_0x12047a['isActive']=!0x1;const _0x41f5c7=this['getSidebarItemView'](_0x12047a);_0x41f5c7&&_0x10a29f&&(_0x41f5c7['isAnimationDisabled']=!0x1);}if(_0x53980f){const _0x2525ce=this['getSidebarItemView'](_0x53980f);_0x2525ce&&(_0x53980f['isActive']=!0x0,_0x10a29f&&(_0x2525ce['isAnimationDisabled']=!0x0,_0x2525ce['top']+=0x1),this['_alignToTargetRect'](_0x2525ce));}}['_detachFromContainer'](_0x3914eb){if(this['view']['element']['remove'](),_0x3914eb){for(const _0x44b774 of _0x3914eb)this['_destroySidebarItemView'](_0x44b774);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0xab6f5,_0x461e46){_0x461e46||(_0x461e46=_0xab6f5['view']);const _0x24105b=new AnnotationsSidebarItemView(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x24105b,_0xab6f5),this['_annotationToSidebarItemView']['set'](_0xab6f5,_0x24105b),_0x24105b['content']['add'](_0x461e46),this['listenTo'](_0xab6f5['view'],'change:targetRect',(_0x369970,_0x25608d,_0x248f2c)=>{const _0x4bda68=this['_getTargetTop'](_0xab6f5,_0x248f2c);_0x24105b['_targetTop']!=_0x4bda68&&(_0x24105b['_targetTop']=_0x4bda68,this['_setItemTop'](_0x24105b,_0x4bda68));}),this['listenTo'](_0x24105b,'change:top',()=>{this['_recalculate'](_0x24105b,'top');}),this['listenTo'](_0x24105b,'change:bottom',()=>{this['_recalculate'](_0x24105b,'bottom');}),this['_alignToTargetRect'](_0x24105b);const _0x1a41e8=this['_getItemBefore'](_0x24105b);if(_0x1a41e8)this['_alignAfterItem'](_0x1a41e8,_0x24105b)||this['_alignToTargetRect'](_0x24105b);else this['_alignToTargetRect'](_0x24105b);return this['_updateLastItem'](),this['view']['list']['add'](_0x24105b),_0x24105b;}['_alignForTopChange'](_0x349793){if(!_0x349793['content']['length'])return;const _0x507352=this['_getItemBefore'](_0x349793);if(!_0x507352)return;const _0x1a18ed=this['_sidebarItemViewToAnnotation']['get'](_0x507352),_0x218fd5=this['_activeAnnotation'];_0x218fd5&&_0x218fd5===_0x1a18ed?this['_alignAfterItem'](_0x507352,_0x349793):this['_alignBeforeItem'](_0x349793,_0x507352);}['_alignForBottomChange'](_0x2f19b1){if(!_0x2f19b1['content']['length'])return;const _0x394b2b=this['_getItemAfter'](_0x2f19b1);if(!_0x394b2b)return;const _0x1cfd17=this['_sidebarItemViewToAnnotation']['get'](_0x394b2b),_0x3c8e6c=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xbd9214=this['_activeAnnotation'];_0xbd9214&&_0xbd9214===_0x1cfd17&&_0x3c8e6c?(this['_alignBeforeItem'](_0x394b2b,_0x2f19b1),this['_alignAfterItem'](_0x2f19b1,_0x394b2b)):_0xbd9214&&_0xbd9214===_0x1cfd17?this['_alignBeforeItem'](_0x394b2b,_0x2f19b1):this['_alignAfterItem'](_0x2f19b1,_0x394b2b);}['_recalculate'](_0x596e32,_0x2fbcbc){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x245dcb,changedProp:_0x548506}of this['_recalculateBuffer'])'top'===_0x548506?this['_alignForTopChange'](_0x245dcb):this['_alignForBottomChange'](_0x245dcb);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x596e32,'changedProp':_0x2fbcbc});}['getSidebarItemView'](_0x49b0e8){return this['_annotationToSidebarItemView']['get'](_0x49b0e8);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5cd61f){const _0x5910ec=this['getSidebarItemView'](_0x5cd61f);this['stopListening'](_0x5910ec),this['stopListening'](_0x5cd61f['view']),_0x5910ec['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5cd61f),this['_sidebarItemViewToAnnotation']['delete'](_0x5910ec);}['_createSidebarView'](){const _0x10587d=new AnnotationsSidebarView(this['context']['locale']);return _0x10587d['render'](),this['on']('change:_lastItem',(_0x5726db,_0x3f43fb,_0xac0a29,_0x334f59)=>{_0x334f59&&_0x10587d['unbind']('minHeight'),_0xac0a29?_0x10587d['bind']('minHeight')['to'](_0xac0a29,'bottom'):_0x10587d['minHeight']=null;}),_0x10587d;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x46ae2f){const _0x45ed51=this['_sidebarItemViewToAnnotation']['get'](_0x46ae2f),_0x552ef4=_0x45ed51&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x45ed51)-0x1);return _0x552ef4&&this['getSidebarItemView'](_0x552ef4)||null;}['_getItemAfter'](_0xe74d36){const _0x27f6cf=this['_sidebarItemViewToAnnotation']['get'](_0xe74d36),_0x2a8734=_0x27f6cf&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x27f6cf)+0x1);return _0x2a8734&&this['getSidebarItemView'](_0x2a8734)||null;}['_alignBeforeItem'](_0x3f0813,_0x696fed){_0x3f0813['updateHeight']();const _0x3078f6=Ut(_0x696fed['bottom']+this['_spaceBetweenItems'],_0x3f0813['top']);return!!_0x3078f6&&(this['_setItemTop'](_0x696fed,_0x696fed['top']-_0x3078f6),!0x0);}['_alignAfterItem'](_0x533c7a,_0x4ac478){_0x533c7a['updateHeight']();const _0x3857fc=Ut(_0x533c7a['bottom']+this['_spaceBetweenItems'],_0x4ac478['top']);return!!_0x3857fc&&(this['_setItemTop'](_0x4ac478,_0x4ac478['top']+_0x3857fc,!0x1),!0x0);}['_alignToTargetRect'](_0x375ee5){const _0x5966a1=this['_sidebarItemViewToAnnotation']['get'](_0x375ee5);if(!_0x5966a1||!_0x5966a1['target']||!_0x5966a1['targetRect'])return;const _0x143054=this['_getTargetTop'](_0x5966a1,_0x5966a1['targetRect']);this['_setItemTop'](_0x375ee5,_0x143054);}['_getTargetTop'](_0x134fec,_0x24eefa){if(null===_0x24eefa)return 0x0;if(_0x134fec['target']instanceof _0x36862e)return _0x24eefa['top'];{const _0x51eafa=new _0x36862e(this['view']['element'])['top'];return _0x24eefa['top']-_0x51eafa;}}['_setItemTop'](_0x503f8b,_0xdea776,_0x201746=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x201746&&(_0xdea776=Math['max'](_0xdea776,this['_getMaxAvailableTop'](_0x503f8b))),_0x503f8b['top']=_0xdea776;}['_getMaxAvailableTop'](_0x2fe6f0){let _0x44b355=this['_getItemBefore'](_0x2fe6f0),_0x33cec6=0x0;for(;_0x44b355;)_0x44b355['updateHeight'](),_0x33cec6+=this['_spaceBetweenItems']+_0x44b355['height'],_0x44b355=this['_getItemBefore'](_0x44b355);return _0x33cec6;}}function Ut(_0x254b04,_0x14e882){return Math['max'](_0x254b04-_0x14e882,0x0);}function Ft(_0x254673){return null!==_0x254673&&'object'==typeof _0x254673&&0x1===_0x254673['nodeType'];}class WideSidebar extends _0x16b5a9{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Sidebar,AnnotationsUIs];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xfd0db3){super(_0xfd0db3),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1c17cd(),this['_refreshPositioningDebounced']=_0x232ddf(()=>{_0xfd0db3['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x316e6f=this['context']['plugins']['get'](AnnotationsUIs),_0x468cce=this['context']['plugins']['get'](Sidebar);_0x316e6f['register']('wideSidebar',this),_0x468cce['container']&&_0x316e6f['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3d2e49){if(_0x3d2e49===this['activeAnnotation'])return;const _0xdbee79=this['context']['plugins']['get'](Sidebar);_0xdbee79['_activeAnnotation']=_0x3d2e49;const _0x42fab1=this['activeAnnotation'];_0xdbee79['refresh']({'blurredAnnotation':_0x42fab1,'activatedAnnotation':_0x3d2e49}),this['activeAnnotation']=_0x3d2e49;}['attach'](_0x579d69){this['annotations']=_0x579d69;const _0x4ee258=this['context']['plugins']['get'](Sidebar);if(_0x4ee258['_annotations']=_0x579d69,this['isAttached'])throw new _0x381f6d('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4ee258,'set:container',()=>{this['detach'](),this['listenTo'](_0x4ee258,'change:container',_0x7a073c=>{_0x7a073c['off'](),this['attach'](_0x579d69);});}),_0x4ee258['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1a7ab2=_0x3ef221=>{_0x3ef221['updateTargetRect'](),_0x4ee258['addAnnotation'](_0x3ef221);};for(const _0x4823d1 of _0x579d69)_0x1a7ab2(_0x4823d1);this['listenTo'](_0x579d69,'add',(_0x285ebb,_0x52f26f)=>{_0x1a7ab2(_0x52f26f);}),this['listenTo'](_0x579d69,'remove',(_0x4698a2,_0x27f752,_0x25d0d4)=>{_0x4ee258['rearrange']({'removedAnnotation':_0x27f752,'previousAnnotation':_0x579d69['get'](_0x25d0d4-0x1),'nextAnnotation':_0x579d69['get'](_0x25d0d4+0x1)}),_0x27f752===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x579d69,'focus',(_0x9a8b1f,_0x219d2e)=>{this['setActiveAnnotation'](_0x219d2e);}),this['listenTo'](_0x579d69,'blur',()=>{this['setActiveAnnotation'](null);});const _0x55c417=this['context']instanceof _0x549bd3?this['context']['editors']:new _0x1c17cd([this['context']]);for(const _0x59c2d4 of _0x55c417)this['_integrateWithEditorAnnotations'](_0x59c2d4);this['listenTo'](_0x55c417,'add',(_0x1fcbe9,_0x426ea9)=>{this['listenTo'](_0x426ea9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x426ea9);});}),this['listenTo'](_0x55c417,'remove',(_0x2bc41c,_0x3a9e63)=>{_0x3a9e63['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3a9e63['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x381f6d('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1a2f17=this['context']['plugins']['get'](Sidebar);_0x1a2f17['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1a2f17),this['stopListening'](this['annotations']),this['context']instanceof _0x549bd3&&this['stopListening'](this['context']['editors']);for(const _0x3bd495 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3bd495);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1f233e){if(!_0x1f233e['plugins']['has']('EditorAnnotations'))return;const _0x123695=_0x1f233e['plugins']['get']('EditorAnnotations'),_0x1f0637=()=>{const _0x11f431=_0x123695['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x11f431[0x0]||null);};this['listenTo'](_0x123695,'refresh',_0x1f0637),this['listenTo'](_0x123695,'blur',(_0x1ab506,{isAnnotationTracked:_0x12f5a5})=>{this['activeAnnotation']&&_0x12f5a5(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x123695,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3ccb74=>{_0x123695['hasDomSelection']()&&(_0x1f0637(),_0x3ccb74['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x123695);}['_destroyEditorAnnotationsIntegration'](_0x3c4e7a){this['stopListening'](_0x3c4e7a),this['_editorAnnotations']['remove'](_0x3c4e7a);}}class AnnotationCounterButtonView extends _0x4f2fe4{['counterView'];constructor(_0x551848){super(_0x551848);const _0xb18e92=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x994fcc,_0x4c62bd)=>_0x994fcc?'...':_0x4c62bd['toString']()),this['set']('annotationType',''),this['icon']=_0x41581f,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new _0xfc41b8(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xb18e92['to']('annotationType',_0x4c2560=>'ck-annotation-counter__badge--'+_0x4c2560),_0xb18e92['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xb18e92['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class NarrowSidebar extends _0x16b5a9{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[Sidebar,AnnotationsUIs];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4c9b91){super(_0x4c9b91),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4a5a5a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1c17cd(),this['_refreshPositioningDebounced']=_0x232ddf(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](AnnotationsUIs)['register']('narrowSidebar',this),this['bodyCollection']=new rt(this['context']['locale']),this['balloonPanelView']=new ht(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x497fee){this['annotations']=_0x497fee;const _0x1b15ff=this['context']['plugins']['get'](Sidebar),_0x411382=this['balloonPanelView'];if(_0x1b15ff['_annotations']=_0x497fee,this['isAttached'])throw new _0x381f6d('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1b15ff,'set:container',()=>{this['detach'](),this['listenTo'](_0x1b15ff,'change:container',_0x39672d=>{_0x39672d['off'](),this['attach'](_0x497fee);});}),_0x1b15ff['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x49ffe2=_0x1bb643=>{const _0x1fed2f=new AnnotationCounterButtonView(this['context']['locale']);_0x1b15ff['addAnnotation'](_0x1bb643,_0x1fed2f),this['_annotationToNarrowView']['set'](_0x1bb643,_0x1fed2f),_0x1fed2f['bind']('isDirty','annotationType','number')['to'](_0x1bb643['view'],'isDirty','type','length'),_0x1fed2f['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x411382['content']['first']!==_0x1bb643['view']?(this['_showBalloon'](_0x1bb643),_0x1bb643['view']['element']['focus'](),this['setActiveAnnotation'](_0x1bb643)):this['setActiveAnnotation'](null);});};for(const _0x96e7ee of _0x497fee)_0x49ffe2(_0x96e7ee);this['listenTo'](_0x497fee,'add',(_0x1111e3,_0x58d3f4)=>{_0x49ffe2(_0x58d3f4);}),this['listenTo'](_0x497fee,'remove',(_0x10dc08,_0x25d776,_0x25220f)=>{this['_annotationToNarrowView']['get'](_0x25d776)['destroy'](),this['_annotationToNarrowView']['delete'](_0x25d776),_0x1b15ff['rearrange']({'removedAnnotation':_0x25d776,'previousAnnotation':_0x497fee['get'](_0x25220f-0x1),'nextAnnotation':_0x497fee['get'](_0x25220f+0x1)}),_0x25d776===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x497fee,'focus',(_0x11c48d,_0x529f65)=>{this['setActiveAnnotation'](_0x529f65);}),this['listenTo'](_0x497fee,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3171b6,_0x11596c)=>{_0x11596c['keyCode']===_0x5456d9['esc']&&_0x411382['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x411382['content']['first']),this['_hideBalloon'](),_0x11596c['stopPropagation'](),_0x11596c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x529695,_0x1d8170)=>{const _0x189476=_0x1d8170['target'];_0x411382['isVisible']&&_0x411382['element']['contains'](_0x189476)||_0x1b15ff['view']['element']['contains'](_0x189476)||_0x529695['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x275c08=>_0x275c08['contains'](_0x189476))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3c2680=this['context']instanceof _0x549bd3?this['context']['editors']:new _0x1c17cd([this['context']]);for(const _0x4fbce4 of _0x3c2680)this['_integrateWithEditorAnnotations'](_0x4fbce4);this['listenTo'](_0x3c2680,'add',(_0x4c9976,_0x35ef28)=>{this['listenTo'](_0x35ef28,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x35ef28);});}),this['listenTo'](_0x3c2680,'remove',(_0x3f6aa4,_0x41afe6)=>{_0x41afe6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x41afe6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x32cac5){if(_0x32cac5===this['activeAnnotation'])return;const _0xbb23a3=this['context']['plugins']['get'](Sidebar);if(_0xbb23a3['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x32cac5,'disableAnimationOnActivatedAnnotation':!0x0}),_0x32cac5)_0xbb23a3['getSidebarItemView'](_0x32cac5)?this['_showBalloon'](_0x32cac5):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x32cac5;}['detach'](){if(!this['isAttached'])throw new _0x381f6d('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x30c34f=this['context']['plugins']['get'](Sidebar);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x53a775=>_0x53a775['destroy']()),this['_annotationToNarrowView']['clear'](),_0x30c34f['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x549bd3&&this['stopListening'](this['context']['editors']);for(const _0x4022b1 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4022b1);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x332d29){if(!_0x332d29['plugins']['has']('EditorAnnotations'))return;const _0x3ee115=_0x332d29['plugins']['get']('EditorAnnotations'),_0x12283b=this['context']['plugins']['get'](Sidebar),_0x41549a=this['annotations'],_0x3f4ab6=this['balloonPanelView'],_0x20a538=()=>{const _0x2eeb18=_0x3ee115['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2eeb18),this['setActiveAnnotation'](_0x2eeb18[0x0]||null);};this['listenTo'](_0x3ee115,'refresh',_0x20a538),this['listenTo'](_0x3ee115,'blur',(_0x494cb9,{isAnnotationTracked:_0x13e51d})=>{this['activeAnnotation']&&_0x13e51d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3ee115,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x41549a,'blur',_0x3e566a=>{_0x3ee115['hasDomSelection']()&&_0x3e566a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xbb9307,_0x5b7ad7)=>{const _0x3407bd=_0x5b7ad7['target'];_0x3f4ab6['isVisible']&&_0x3f4ab6['element']['contains'](_0x3407bd)||_0x12283b['view']['element']['contains'](_0x3407bd)||this['activeAnnotation']&&_0x3ee115['hasDomSelection']()&&(_0x20a538(),_0xbb9307['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3ee115);}['_destroyEditorAnnotationsIntegration'](_0x493191){_0x493191&&(this['stopListening'](_0x493191),this['_editorAnnotations']['remove'](_0x493191));}['_setSelectedAnnotations'](_0x1c45d8){for(const _0x3c36dd of this['_selectedAnnotations'])_0x1c45d8['includes'](_0x3c36dd)||this['_manuallyClosedAnnotationViews']['delete'](_0x3c36dd['view']);this['_selectedAnnotations']=_0x1c45d8;}['_refreshPositioning'](){const _0x4717fd=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x4717fd['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x35d19a){if(this['_manuallyClosedAnnotationViews']['has'](_0x35d19a['view']))return;const _0x52e152=this['balloonPanelView']['content']['first'];_0x52e152!==_0x35d19a['view']?(_0x52e152&&this['_detachListeners'](_0x52e152),this['_attachListeners'](_0x35d19a['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x35d19a['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4ddee2=this['balloonPanelView']['content']['first'],_0x200068=_0x4ddee2&&this['annotations']['getByView'](_0x4ddee2);if(!_0x200068||!this['_annotationToNarrowView']['has'](_0x200068))return;const _0x3297a3=this['_annotationToNarrowView']['get'](_0x200068)['element'],_0x3960e7=(function(){const _0x3c7e2f=ht['defaultPositions'];return[_0x3c7e2f['southArrowNorthEast'],_0x3c7e2f['northArrowSouthEast'],_0x3c7e2f['southArrowNorth'],_0x3c7e2f['northArrowSouth'],_0x3c7e2f['southArrowNorthWest'],_0x3c7e2f['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3297a3,'positions':_0x3960e7});}['_hideBalloon'](){const _0x543898=this['balloonPanelView'],_0x2b3b4b=_0x543898['content']['first'];_0x2b3b4b&&(this['_detachListeners'](_0x2b3b4b),_0x543898['unpin'](),_0x543898['content']['clear']());}['_attachListeners'](_0x3607f1){this['listenTo'](_0x3607f1,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3607f1,'Esc',(_0x4b1b15,_0x2bce45)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3607f1),this['_hideBalloon'](),_0x2bce45();});}['_detachListeners'](_0x862e46){this['stopListening'](_0x862e46);}}class InlineAnnotations extends _0x4f2bb8{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[EditorAnnotations,at,AnnotationsUIs];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2f5fad){super(_0x2f5fad),_0x2f5fad['editing']['view']['addObserver'](ut),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x2f5fad['plugins']['get'](at),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x232ddf(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x383536=this['editor']['plugins']['get'](AnnotationsUIs);_0x383536['context']===this['editor']&&(_0x383536['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x423916,_0x583f52)=>{const _0x203b0c=this['_balloon'];if(this['isAttached']&&_0x203b0c['visibleView']){const _0x3eb083=this['annotations']['getByView'](_0x203b0c['visibleView']);_0x3eb083&&this['_closeAnnotation'](_0x3eb083),_0x583f52();}}));}['afterInit'](){const _0x172bd9=this['editor']['plugins']['get'](AnnotationsUIs);_0x172bd9['context']===this['editor']&&(_0x172bd9['hasActive']()||_0x172bd9['switchTo']('inline'));}['setActiveAnnotation'](_0x5873f6){_0x5873f6!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5873f6&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5873f6)&&this['_addAnnotationToBalloon'](_0x5873f6,!0x0),_0x5873f6['isActive']=!0x0),_0x5873f6||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5873f6);}['attach'](_0x4ac258){this['annotations']=_0x4ac258;const _0x1a7673=this['editor']['plugins']['get'](AnnotationsUIs),_0x11ff21=this['_balloon'];if(this['isAttached'])throw new _0x381f6d('inlineannotations-attach-already-attached',this);if(_0x1a7673['context']!==this['editor'])throw new _0x381f6d('inlineannotations-not-allowed-with-context',this);const _0x39b89f=this['editor']['plugins']['get'](EditorAnnotations);this['listenTo'](_0x39b89f,'refresh',()=>{const _0x5141f0=_0x39b89f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3ab8f1,_0x193837;!this['_forceRefresh']&&(_0x3ab8f1=_0x5141f0,_0x193837=this['_selectedAnnotations'],_0x3ab8f1['length']===_0x193837['length']&&_0x3ab8f1['every'](_0xe7c4b9=>_0x193837['includes'](_0xe7c4b9)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x5141f0),this['setActiveAnnotation'](_0x5141f0[0x0]||null));}),this['listenTo'](_0x39b89f,'blur',(_0x5a517d,{isAnnotationTracked:_0x42ee61})=>{this['activeAnnotation']&&_0x42ee61(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x39b89f,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x29cabf,_0x594dc1,_0x3bb525)=>{_0x3bb525||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4ac258,'remove',(_0x142fbf,_0x5f19a9)=>{this['_removeAnnotationFromBalloon'](_0x5f19a9),_0x5f19a9===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x11ff21,'change:visibleView',(_0x277d9b,_0x1c4def,_0x1cf9a5,_0x49f2f1)=>{_0x49f2f1&&this['stopListening'](_0x49f2f1);const _0x596cb8=_0x4ac258['getByView'](_0x1cf9a5);_0x1cf9a5&&_0x596cb8&&(this['listenTo'](_0x1cf9a5,'change:height',()=>{_0x11ff21['updatePosition']();}),this['listenTo'](_0x1cf9a5,'Esc',()=>{this['_closeAnnotation'](_0x596cb8),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x596cb8&&this['setActiveAnnotation'](_0x596cb8));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x11ff21['visibleView']&&(_0x4ac258['getByView'](_0x11ff21['visibleView'])&&_0x11ff21['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x381f6d('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x255f92 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x255f92);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x27921e){for(const _0x3d5f96 of this['_selectedAnnotations'])_0x27921e['includes'](_0x3d5f96)||this['_manuallyClosed']['delete'](_0x3d5f96);for(const _0x2de642 of this['annotations'])_0x27921e['includes'](_0x2de642)||this['_removeAnnotationFromBalloon'](_0x2de642);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5dafb1 of _0x27921e)this['_addAnnotationToBalloon'](_0x5dafb1);}this['_selectedAnnotations']=_0x27921e;}['_addAnnotationToBalloon'](_0x10425b,_0x382c60=!0x1){this['_manuallyClosed']['has'](_0x10425b)||(this['_addedAnnotations']['has'](_0x10425b)||this['_balloon']['hasView'](_0x10425b['view'])||(this['_addedAnnotations']['add'](_0x10425b),this['_balloon']['add']({'stackId':_0x10425b['view']['id'],'view':_0x10425b['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x10425b)}})),_0x382c60&&this['_balloon']['showStack'](_0x10425b['view']['id']));}['_getBalloonTargetForAnnotation'](_0x146e6f){const _0x20c6e7=_0x146e6f['target'],_0x124a1e=this['editor']['editing']['view'],_0x489e41=_0x124a1e['document']['selection']['getFirstRange'](),_0xa1eb90=_0x124a1e['domConverter']['viewRangeToDom'](_0x489e41);if(_0xa1eb90['collapse'](!0x0),_0x20c6e7){if(_0x20c6e7 instanceof _0x36862e)return _0x20c6e7;let _0x38bd8e=[];for(const _0x56a80e of _0x20c6e7)_0x38bd8e['push'](..._0x36862e['getDomElementRects'](_0x56a80e));_0x38bd8e=function(_0x1b7092){const _0x54296f=[];let _0x2b9e48=_0x1b7092[0x0];for(let _0xad3ddf=0x1;_0xad3ddf<_0x1b7092['length'];_0xad3ddf++)if(Wt(_0x2b9e48,_0x1b7092[_0xad3ddf])){const _0x384970=_0x1b7092[_0xad3ddf]['width'];_0x2b9e48['width']+=_0x384970,_0x2b9e48['right']+=_0x384970;}else _0x54296f['push'](_0x2b9e48),_0x2b9e48=_0x1b7092[_0xad3ddf];return _0x54296f['push'](_0x2b9e48),_0x54296f;}(_0x38bd8e);const _0x532e99=_0xa1eb90['getBoundingClientRect']();return _0x38bd8e['find'](_0x413f8e=>_0x413f8e['top']<=_0x532e99['top']&&_0x413f8e['bottom']>=_0x532e99['bottom']&&_0x413f8e['left']<=_0x532e99['left']&&_0x413f8e['right']>=_0x532e99['right'])||_0x38bd8e[0x0];}return _0x146e6f['targetRect']||_0xa1eb90;}['_removeAnnotationFromBalloon'](_0x2d869a){this['_addedAnnotations']['has'](_0x2d869a)&&this['_balloon']['hasView'](_0x2d869a['view'])&&(this['_addedAnnotations']['delete'](_0x2d869a),this['_balloon']['remove'](_0x2d869a['view']));}['_closeAnnotation'](_0x4df488){this['_manuallyClosed']['add'](_0x4df488),this['_removeAnnotationFromBalloon'](_0x4df488);}}function Wt(_0x220372,_0x11d04a){return _0x220372['top']===_0x11d04a['top']&&_0x220372['bottom']===_0x11d04a['bottom']&&_0x220372['right']===_0x11d04a['left'];}class CommentsArchiveView extends _0xfc41b8{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x204bdb,_0x3d0e20){super(_0x204bdb),this['set']('isEmpty',!_0x3d0e20['length']),this['focusTracker']=new _0x266855(),this['_annotationViews']=_0x3d0e20,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4af7f0({'focusables':_0x3d0e20,'focusTracker':this['focusTracker']}),this['listenTo'](_0x3d0e20,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x3d0e20,'remove',(_0x451b9a,_0x58620e)=>{_0x58620e['isActive']&&this['focus'](),_0x3d0e20['length']||(this['isEmpty']=!0x0);});const _0x4080e7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':vt(_0x204bdb,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x3d0e20},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4080e7['if']('isEmpty','ck-hidden',_0x1088e5=>!_0x1088e5)]},'children':[{'text':vt(_0x204bdb,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x357d3f of this['_annotationViews'])this['focusTracker']['add'](_0x357d3f['element']);this['_annotationViews']['on']('change',(_0x3328d0,{added:_0x17f26c,removed:_0x58d3f9})=>{for(const _0x221da6 of _0x17f26c)this['focusTracker']['add'](_0x221da6['element']);for(const _0x23d450 of _0x58d3f9)this['focusTracker']['remove'](_0x23d450['element']);});}}class CommentsArchive extends _0x16b5a9{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsRepository,Annotations];}constructor(_0x38ee6d){super(_0x38ee6d),this['archivedThreads']=new _0x1c17cd();}['init'](){const _0x59ecd6=this['context'],_0x180e0e=_0x59ecd6['plugins']['get'](CommentsRepository),_0x5caf7d=_0x59ecd6['plugins']['get'](Annotations);this['listenTo'](_0x180e0e,'addCommentThread',(_0x5a5395,{threadId:_0xd5c4ad})=>{const _0x4398d8=_0x180e0e['getCommentThread'](_0xd5c4ad);_0x4398d8['archivedAt']&&this['archivedThreads']['add'](_0x4398d8,this['_calculatePosition'](_0x4398d8['archivedAt'])),this['listenTo'](_0x4398d8,'change:archivedAt',(_0x535c31,_0x1af99b,_0x318535)=>{_0x318535?this['archivedThreads']['has'](_0x4398d8)||this['archivedThreads']['add'](_0x4398d8,this['_calculatePosition'](_0x4398d8['archivedAt'])):this['archivedThreads']['has'](_0x4398d8)&&this['archivedThreads']['remove'](_0x4398d8);});}),this['listenTo'](_0x180e0e,'removeCommentThread',(_0x4908e2,{threadId:_0x480566})=>{const _0x4a1841=_0x180e0e['getCommentThread'](_0x480566);this['stopListening'](_0x4a1841),this['archivedThreads']['has'](_0x4a1841)&&this['archivedThreads']['remove'](_0x4a1841);},{'priority':'highest'}),this['listenTo'](_0x5caf7d['collection'],'focus',(_0x3d6bbb,_0x34c66f)=>{_0x34c66f['isVisible']||(_0x34c66f['isActive']=!0x0,_0x5caf7d['activate'](_0x34c66f));});}['_calculatePosition'](_0x2f3f20){const _0x5321d3=[...this['archivedThreads']]['findIndex'](_0xd587cc=>_0xd587cc['archivedAt']<_0x2f3f20);return _0x5321d3>-0x1?_0x5321d3:this['archivedThreads']['length'];}}class CommentsArchiveUI extends _0x4f2bb8{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[CommentsArchive,ct];}constructor(_0x346ff4){super(_0x346ff4),this['annotationViews']=new tt(),this['_pendingThreads']=[];}['init'](){const _0x4987c1=this['editor'],_0x4f0f6e=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4987c1['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4f2fe4,!0x0)),_0x4987c1['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2ad15d=this['_createCommentsArchiveButton'](ot);return _0x2ad15d['set']({'role':'menuitemcheckbox'}),_0x2ad15d;});const _0x36bb30=_0x4987c1['plugins']['get'](CommentsArchive),_0x419470=_0x4987c1['plugins']['get']('Annotations'),_0x4a1331=_0x4987c1['plugins']['get']('CommentsRepository');_0x36bb30['archivedThreads']['forEach'](_0x19c375=>{this['_handleNewThread'](_0x19c375);}),this['listenTo'](_0x36bb30['archivedThreads'],'add',(_0x489a59,_0x414d65)=>{this['_handleNewThread'](_0x414d65);}),this['listenTo'](_0x419470['collection'],'add',(_0x5c24b1,_0x5ca9a2)=>{const _0x159439=this['_pendingThreads']['find'](_0x3387f0=>{const _0x463b24=_0x4a1331['_threadToController']['get'](_0x3387f0);return _0x463b24&&_0x5ca9a2['innerView']===_0x463b24['view'];});if(_0x159439){const _0x2b792b=this['_calculatePosition'](_0x159439['archivedAt']);this['_addAnnotationToArchive'](_0x5ca9a2,_0x2b792b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x159439),0x1);}}),this['listenTo'](_0x36bb30['archivedThreads'],'remove',(_0x4895fc,_0x32ddcd)=>{const _0x3a50e7=_0x4987c1['config']['get']('collaboration.channelId');if(!_0x3a50e7||_0x32ddcd['channelId']===_0x3a50e7){if(this['_pendingThreads']['includes'](_0x32ddcd))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x32ddcd),0x1);else{const _0x2a0256=_0x4a1331['_threadToController']['get'](_0x32ddcd),_0x1e023b=_0x419470['getByInnerView'](_0x2a0256['view']);this['annotationViews']['remove'](_0x1e023b['view']),this['stopListening'](_0x1e023b),this['stopListening'](_0x1e023b['focusableElements']);}}}),this['listenTo'](_0x419470['collection'],'add',(_0x233593,_0xe44322)=>{this['listenTo'](_0xe44322,'escape',_0x4f0f6e);}),this['listenTo'](_0x419470['collection'],'remove',(_0x546036,_0x164297)=>{this['stopListening'](_0x164297,'escape',_0x4f0f6e);});}['_addAnnotationToArchive'](_0x4a8313,_0x5352b6){this['listenTo'](_0x4a8313,'set:isVisible',_0x68b94f=>{_0x68b94f['return']=!0x1,_0x68b94f['stop']();}),this['annotationViews']['add'](_0x4a8313['view'],_0x5352b6);}['_handleNewThread'](_0x5de258){const _0x12cc54=this['editor']['plugins']['get']('CommentsRepository'),_0x59b89f=this['editor']['plugins']['get']('Annotations'),_0x430bfc=this['editor']['config']['get']('collaboration.channelId');if(!_0x430bfc||_0x5de258['channelId']===_0x430bfc){const _0x5b3bfc=_0x12cc54['_threadToController']['get'](_0x5de258);if(!_0x5b3bfc)return void this['_pendingThreads']['push'](_0x5de258);const _0x1a239d=this['_calculatePosition'](_0x5de258['archivedAt']),_0x443e9d=_0x59b89f['getByInnerView'](_0x5b3bfc['view']);_0x443e9d['isVisible']&&_0x59b89f['_visibleAnnotations']['remove'](_0x443e9d),this['_addAnnotationToArchive'](_0x443e9d,_0x1a239d);}}['_calculatePosition'](_0x2ffcc5){const _0x4ffb6f=this['editor']['config']['get']('collaboration.channelId'),_0xa3b25c=[...this['editor']['plugins']['get'](CommentsArchive)['archivedThreads']]['filter'](_0x589868=>_0x589868['channelId']===_0x4ffb6f)['findIndex'](_0x3c80c1=>_0x3c80c1['archivedAt']<_0x2ffcc5);return _0xa3b25c<0x0||_0xa3b25c>this['annotationViews']['length']?this['annotationViews']['length']:_0xa3b25c-0x1;}['_toggleDialog'](){const _0x4fd748=this['editor'],_0x14c0dd=_0x4fd748['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new CommentsArchiveView(_0x4fd748['locale'],this['annotationViews'])),'commentsArchive'===_0x14c0dd['id']?_0x14c0dd['hide']():_0x14c0dd['show']({'id':'commentsArchive','title':vt(_0x4fd748['locale'],'COMMENTS_ARCHIVE'),'icon':_0x10ece0,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':dt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2d2edf,_0x3d3881=!0x1){const _0x487135=this['editor']['locale'],_0x48a8a0=this['editor']['plugins']['get']('Dialog'),_0x10f99b=new _0x2d2edf(_0x487135);return _0x10f99b['bind']('isEnabled')['to'](this,'isEnabled'),_0x10f99b['bind']('isOn')['to'](_0x48a8a0,'id',_0x7da25b=>'commentsArchive'===_0x7da25b),_0x10f99b['set']({'label':vt(_0x487135,'COMMENTS_ARCHIVE'),'icon':_0x10ece0,'isToggleable':!0x0}),_0x3d3881&&(_0x10f99b['tooltip']=!0x0),this['listenTo'](_0x10f99b,'execute',()=>this['_toggleDialog']()),_0x10f99b;}['_hideDialogOnAnnotationEscape']=_0x4baaad=>{const _0xbfd4ae=_0x4baaad['source'];if(!this['annotationViews']['has'](_0xbfd4ae['view']))return;const _0x5c347b=this['editor']['plugins']['get']('Dialog');_0x5c347b['isOpen']&&'commentsArchive'===_0x5c347b['id']&&(_0x5c347b['hide'](),_0x4baaad['stop']());};}class Comments extends _0x4f2bb8{static get['requires'](){return[CommentsRepository,CommentsEditing,CommentsUI,CommentsArchive,CommentsArchiveUI,CommentsOnly,WideSidebar,NarrowSidebar,InlineAnnotations];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{AddCommentThreadCommand,Annotation,AnnotationCollection,AnnotationCounterButtonView,AnnotationView,Annotations,AnnotationsSidebarItemView,AnnotationsSidebarView,AnnotationsUIs,BaseCommentThreadView,BaseCommentView,Comment,CommentThread,CommentThreadController,CommentThreadInputView,CommentThreadView,CommentView,Comments,CommentsArchive,CommentsArchiveUI,CommentsEditing,CommentsListView,CommentsOnly,CommentsRepository,CommentsUI,EditorAnnotations,InlineAnnotations,NarrowSidebar,Sidebar,WideSidebar,Ot as bindAnnotationCollections};
|
|
23
|
+
import{Command as _0x3dff44,Context as _0x20c5a3,ContextPlugin as _0x6aba6a,Editor as _0x9416a1,PendingActions as _0x8faac9,Plugin as _0x49d365}from'@ckeditor/ckeditor5-core';import{CKEditorError as _0xf4a2b6,Collection as _0x476485,DomEmitterMixin as _0x571ba5,FocusTracker as _0x53f520,KeystrokeHandler as _0x187a58,ObservableMixin as _0x3abe1c,Rect as _0x407ea7,diff as _0x5da05b,first as _0x165a08,getEnvKeystrokeText as _0x36733e,keyCodes as _0x2ff755,priorities as _0x3152ea,scrollViewportToShowTarget as _0x30ce45,toUnit as _0x20a9bf,uid as _0x4e0aef}from'@ckeditor/ckeditor5-utils';import{AriaDescriptionView as _0x44a60,ConfirmMixin as _0x1c333a,FOCUS_ANNOTATION_KEYSTROKE as _0x201e54,LateFocusButtonView as _0x46341e,LateFocusDropdownButtonView as _0x40e15b,UserView as _0x20e9ea,Users as _0x599743,getAllMarkersDomElementsSorted as _0x5d06b3,getDateTimeFormatter as _0x596719,hashObject as _0x24d26c,setupThreadKeyboardNavigation as _0xafcf81,surroundingMarkersDetector as _0x29a9ac,trimHtml as _0xdfa245}from'@ckeditor/ckeditor5-collaboration-core';import{cloneDeep as _0x36cfaf,debounce as _0x2e8ec0,isEqual as _0x23b053,set as _0x4097c1,throttle as _0x3d18e8,unset as _0x5a6d71}from'es-toolkit/compat';import{IconAddComment as _0x15d386,IconCheck as _0x579355,IconCommentsArchive as _0x43722b,IconPencil as _0x4031db,IconRemoveComment as _0x5ed6e1,IconThreeVerticalDots as _0x3e270c,IconUndo as _0x24125f}from'@ckeditor/ckeditor5-icons';import{BalloonPanelView as _0x46a25b,BodyCollection as _0x408a86,ButtonView as _0x465f26,ContextualBalloon as _0x423bf9,Dialog as _0x5d1c76,DialogViewPosition as _0x4f90c2,EditorUI as tt,EditorUIView as it,FocusCycler as et,InlineEditableUIView as st,ListItemView as nt,ListView as ot,MenuBarMenuListItemButtonView as rt,View as ht,ViewCollection as at,createDropdown as ct,focusChildOnDropdownOpen as dt}from'@ckeditor/ckeditor5-ui';import{MouseObserver as lt,disableViewPlaceholder as mt,enableViewPlaceholder as ut}from'@ckeditor/ckeditor5-engine';import{Clipboard as ft,ClipboardMarkersUtils as pt,ClipboardPipeline as wt}from'@ckeditor/ckeditor5-clipboard';import{Enter as gt,ShiftEnter as _t}from'@ckeditor/ckeditor5-enter';import{SelectAll as At}from'@ckeditor/ckeditor5-select-all';import{Typing as vt}from'@ckeditor/ckeditor5-typing';import{Undo as yt}from'@ckeditor/ckeditor5-undo';import{Paragraph as Tt}from'@ckeditor/ckeditor5-paragraph';import{toWidget as Ct}from'@ckeditor/ckeditor5-widget';const It=/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3abe1c();var bt=class extends It{['model'];['view'];constructor(_0x55c1f4,_0x2d3e66){super(),this['model']=_0x55c1f4,this['model']['_isAttached']=!0x0,this['view']=_0x2d3e66,this['listenTo'](_0x2d3e66,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x2d3e66,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x2d3e66,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x2d3e66,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x2d3e66,'addComment',(_0x3eff3e,_0x556e6c)=>this['addComment'](_0x556e6c)),this['listenTo'](_0x2d3e66,'updateComment',(_0x8bef40,_0xaa9252,_0xe7d2d8)=>this['updateComment'](_0xaa9252,_0xe7d2d8)),this['listenTo'](_0x2d3e66,'removeComment',(_0x691853,_0x26079d)=>this['removeComment'](_0x26079d));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x5a2f2c){this['model']['addComment']({'content':_0x5a2f2c,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x52dccc,_0x58531d){this['model']['getComment'](_0x52dccc)['update']({'content':_0x58531d});}['removeComment'](_0x37a49c){this['model']['getComment'](_0x37a49c)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}};function Et(_0x17290b,_0x4383ab,_0x55f0df){const t=_0x17290b['t'];switch(_0x4383ab){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x55f0df);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%0\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x55f0df);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x55f0df);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x55f0df);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x55f0df);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x55f0df);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x55f0df);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x55f0df);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}var kt=class extends it{['main'];['editable'];constructor(_0x30fe34,_0x4994cb){super(_0x30fe34);const _0x44f8a0=_0x4e0aef();this['main']=this['createCollection'](),this['editable']=new st(_0x30fe34,_0x4994cb,void 0x0,{'label':()=>Et(_0x30fe34,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x30fe34['uiLanguageDirection'],'lang':_0x30fe34['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x44f8a0},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}},Nt=class extends tt{['view'];constructor(_0x3457e0){super(_0x3457e0),this['view']=new kt(_0x3457e0['locale'],_0x3457e0['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x231f60=this['editor']['editing']['view'],_0x4dc453=this['view']['editable'];_0x4dc453['name']=_0x231f60['document']['getRoot']()['rootName'],this['view']['render']();const _0x57c124=_0x4dc453['element'];this['setEditableElement'](_0x4dc453['name'],_0x57c124),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x231f60['attachDomRoot'](_0x57c124),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}};const Ot=[ft,gt,_t,At,vt,yt,Tt],Mt=/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3abe1c(_0x9416a1);var Rt=class CommentEditor extends Mt{static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Ot)());constructor(_0x2f7798={}){(_0x2f7798=Object['assign']({},_0x2f7798))['plugins']||(_0x2f7798['plugins']=CommentEditor['defaultPlugins']),super(_0x2f7798),this['ui']=new Nt(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this['editing']['view']['_overlayModeHint']='auto',this['_sendUsageRequest']=()=>window['Promise']['resolve']({'status':'ok'});}['create'](){const _0x24ca76=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x24ca76))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5aac2=>{const _0x43e52e=this['model']['document']['getRoot'](),_0x1c2d33=_0x43e52e&&_0x43e52e['getChild'](_0x43e52e['childCount']-0x1);_0x5aac2['setSelection'](_0x1c2d33,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x213fa1=this['editing']['view'],_0x11a2e6=_0x213fa1['document']['getRoot'](),_0x4acb45=_0x11a2e6['getChild'](0x0);_0x11a2e6['childCount']>0x1||!_0x4acb45||'p'!=_0x4acb45['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(mt(_0x213fa1,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4acb45['placeholder']=this['placeholder']),ut({'view':_0x213fa1,'element':_0x4acb45,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4acb45);}},St=class extends ht{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x473160,_0x369bee={}){super(_0x473160),this['editor']=null,this['_editorConfig']=_0x369bee,this['set']('value',_0x369bee['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',Et(_0x473160,'Reply...')),this['set']('submitLabel',Et(_0x473160,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new _0x187a58(),this['focusTracker']=new _0x53f520(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x227e87=>!_0x227e87['defaultPrevented']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0xba7aa2,_0x5193e5)=>{this['cancelButtonView']['fire']('execute'),_0x5193e5();}),this['keystrokes']['set']('Ctrl+Enter',(_0x943ae0,_0x4a54d3)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4a54d3());}),this['on']('submit',(_0x3278b8,_0x212a78)=>{_0x212a78['length']>0xfde8?(alert(Et(_0x473160,'TOO_LONG_COMMENT_ALERT',[_0x212a78['length'],0xfde8])),_0x3278b8['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x3e7437=this['editor'];this['element']['insertBefore'](_0x3e7437['ui']['element'],this['element']['firstChild']),_0x3e7437['model']['document']['on']('change',()=>this['value']=_0x3e7437['getData']()),_0x3e7437['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3e7437['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x43fa1c){-0x1===_0x43fa1c?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x4eaba4}=this,_0x194395=new _0x465f26(_0x4eaba4);return _0x194395['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x194395['withText']=!0x0,_0x194395['bind']('label')['to'](this,'submitLabel'),_0x194395['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x194395['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x54650b,_0x6d22b6)=>!_0x6d22b6&&!!_0x54650b['trim']()),_0x194395;}['_createCancelButton'](){const {locale:_0x5c95c4}=this,_0x56fdd4=new _0x465f26(_0x5c95c4);return _0x56fdd4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x56fdd4['label']=Et(_0x5c95c4,'Cancel'),_0x56fdd4['withText']=!0x0,_0x56fdd4['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x56fdd4;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1ab513=>{this['focusTracker']['add'](_0x1ab513['element']);}),this['focusables']['on']('change',(_0x19f3bb,_0x593137)=>{for(const _0x250c6a of Array['from'](_0x593137['added'])['reverse']())this['focusTracker']['add'](_0x250c6a['element']);});}},xt=class extends ht{constructor(_0x54b9af,_0x155175,_0x263977){super(_0x54b9af),this['commentInputView']=new St(_0x54b9af,_0x263977),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x253585,_0x38d7d8)=>_0x253585||!!_0x38d7d8),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x20e9ea(_0x54b9af,_0x155175),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x23b7a5){this['commentInputView']['focus'](_0x23b7a5);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x6e9458,_0x14fbc8)=>{const {submitButtonView:_0x2940cb,cancelButtonView:_0x4ef441,editor:_0x1f615a}=this['commentInputView'];[_0x2940cb['element'],_0x4ef441['element'],_0x1f615a?_0x1f615a['editing']['view']['getDomRoot']():null]['filter'](_0x597f42=>_0x597f42)['some'](_0x45f39b=>_0x45f39b['contains'](_0x14fbc8['target']))||(this['focus'](),_0x14fbc8['preventDefault']());});}},Pt=class extends ht{constructor(_0x56ec8c){super(_0x56ec8c);const _0x3f3b91=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3f3b91['to']('count',_0x2eb625=>Et(_0x56ec8c,'NUMBER_OF_COMMENTS',_0x2eb625))}]});}},Lt=class extends ht{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x32b72f,_0x2e40a2,_0x2b4d18){super(_0x32b72f);const _0x5d05f4=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2e40a2['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2e40a2,this['_config']=_0x2b4d18,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x53f520(),this['keystrokes']=new _0x187a58(),this['focusCycler']=new et({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1cd1dc=>this['commentViews']['map'](_0x2499e9=>_0x2499e9['element'])['includes'](_0x1cd1dc['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Pt(_0x32b72f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x38ec9c=>_0x38ec9c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2a6154 of _0x2e40a2['comments'])this['_handleNewCommentModel'](_0x2a6154);this['_handleInfoComment'](),this['listenTo'](_0x2e40a2['comments'],'add',(_0x17773f,_0x1524f3)=>{const _0x58b24d=this['_calculatePosition'](_0x1524f3);this['length']++,this['_handleNewCommentModel'](_0x1524f3,_0x58b24d),this['refreshVisibleViews']();}),this['listenTo'](_0x2e40a2['comments'],'remove',(_0x56f577,_0x81ff04)=>{this['length']--,this['_handleRemoveCommentModel'](_0x81ff04),this['refreshVisibleViews']();}),this['listenTo'](_0x2e40a2,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2e40a2,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x5d05f4['if']('length','ck-hidden',_0x3550ef=>!_0x3550ef)],'aria-label':Et(_0x32b72f,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0xbf9a5f){-0x1===_0xbf9a5f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x47d25f of this['commentViews'])_0x47d25f['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1f64a9,_0x46b4ec){const _0x4ffd50=new this['_config']['CommentView'](this['locale'],_0x1f64a9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4ffd50['viewUid']=_0x1f64a9['id'],_0x4ffd50['delegate']('removeComment')['to'](this),_0x4ffd50['delegate']('updateComment')['to'](this),_0x4ffd50['delegate']('resolveCommentThread')['to'](this),_0x4ffd50['delegate']('editorReady')['to'](this),_0x4ffd50['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4ffd50,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4ffd50,_0x46b4ec);}['_calculatePosition'](_0x4a44ff){const _0x2e436d=this['_model']['_findOptimalIndex'](_0x4a44ff);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x4a44ff['authoredAt']?_0x2e436d-0x1:_0x2e436d:_0x2e436d-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3c2668={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':Et(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3c2668,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3c2668));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1bb3ef){const _0x4f2e72=this['commentViews']['remove'](_0x1bb3ef['id']);this['stopListening'](_0x4f2e72),_0x4f2e72['isEditMode']&&this['_updateHasDirtyComment'](),_0x4f2e72['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5a5d75=>_0x5a5d75['isEditMode']);}['_rearrangeCollapse'](){const _0x66894=function(_0x24150e){const _0x277a86=new _0x476485();for(const _0x493e41 of _0x24150e)_0x277a86['add'](_0x493e41);return _0x277a86;}(this['commentViews']),_0x272b4f=this['_collapsedCommentsView']['count'];for(let _0x2ff4ae=0x1;_0x2ff4ae<=_0x272b4f;_0x2ff4ae++)_0x66894['remove'](0x1);for(const _0x32f6d1 of _0x66894)_0x32f6d1['collapse']();_0x272b4f>0x0&&_0x66894['add'](this['_collapsedCommentsView'],0x1),Dt(_0x5da05b(Array['from'](this['visibleViews']),Array['from'](_0x66894)),this['visibleViews'],_0x66894);}['_rearrangeExpand'](){Dt(_0x5da05b(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x15548d of this['visibleViews'])_0x15548d['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4c83fb=>{this['focusTracker']['add'](_0x4c83fb['element']),this['keystrokes']['listenTo'](_0x4c83fb['element']);}),this['commentViews']['on']('change',(_0x50942f,_0x216f9b)=>{for(const _0x29c9c3 of _0x216f9b['removed'])this['focusTracker']['remove'](_0x29c9c3['element']),this['keystrokes']['stopListening'](_0x29c9c3['element']);for(const _0x569115 of Array['from'](_0x216f9b['added'])['reverse']())this['focusTracker']['add'](_0x569115['element']),this['keystrokes']['listenTo'](_0x569115['element']);});}};function Dt(_0x599820,_0x161d4f,_0x597f13){let _0x3b1448=0x0;for(const _0x2a290a of _0x599820)switch(_0x2a290a){case'insert':_0x161d4f['add'](_0x597f13['get'](_0x3b1448),_0x3b1448),_0x3b1448++;break;case'delete':_0x161d4f['remove'](_0x3b1448);break;case'equal':_0x3b1448++;}}var Vt=class extends ht{constructor(_0x149985){super(_0x149985);const _0x2d2148=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x2d2148['to']('contextValue',_0x55cac1=>Et(_0x149985,'THREAD_CONTEXT_LABEL',_0x55cac1)),'tabindex':-0x1},'children':[{'text':_0x2d2148['to']('contextValue')}]});}['focus'](){this['element']['focus']();}},Bt=class extends ht{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4b2d65,_0x36d07e){super(_0x4b2d65);const _0x3385b7=this['bindTemplate'];this['_model']=_0x36d07e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x53f520(),this['keystrokes']=new _0x187a58(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x9724dd=>!!_0x9724dd),this['bind']('contextValue')['to'](this['_model'],'context',_0x67d868=>_0x67d868&&_0x67d868['value']?this['_trimContextValue'](_0x67d868['value']):Et(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x3385b7['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x3a4f5e=new _0x465f26(this['locale']);return _0x3a4f5e['label']=Et(this['locale'],'Reopen'),_0x3a4f5e['tooltip']=Et(this['locale'],'Reopen'),_0x3a4f5e['icon']=_0x24125f,_0x3a4f5e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3cb18c=>!_0x3cb18c),_0x3a4f5e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x91615f,_0x30de12)=>_0x91615f&&_0x30de12),_0x3a4f5e['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3a4f5e;}['_trimContextValue'](_0x3db3c0){if(_0x3db3c0['length']<0x96)return _0x3db3c0;const _0x15516b=_0x3db3c0['lastIndexOf']('\x20',0x93);return _0x3db3c0['substring'](0x0,_0x15516b>-0x1?_0x15516b:0x93)+'...';}['_attachContextActions'](){const _0x5844e6=this['element']['querySelector']('.ck-context'),_0x449e9e=_0x5844e6['querySelector']('.ck-context__value');this['listenTo'](_0x5844e6,'mouseenter',()=>{_0x449e9e['offsetWidth']<_0x449e9e['scrollWidth']&&_0x5844e6['classList']['add']('overlay');}),this['listenTo'](_0x5844e6,'mouseleave',()=>{_0x5844e6['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x85e10c of this['focusables'])this['focusTracker']['add'](_0x85e10c['element']),this['keystrokes']['listenTo'](_0x85e10c['element']);}['_createContextView'](){const _0xa238ee=new Vt(this['locale']);return _0xa238ee['bind']('contextValue')['to'](this),_0xa238ee;}},Ht=class extends ht{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xc0a330,_0x3db6a4,_0x38b5cc,_0x15f0f6){super(_0xc0a330),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3db6a4,this['_localUser']=_0x38b5cc,this['_config']=_0x15f0f6,this['commentThreadHeaderView']=new Bt(_0xc0a330,_0x3db6a4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new _0x44a60(_0xc0a330,Et(_0xc0a330,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new Lt(_0xc0a330,_0x3db6a4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x15f0f6)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x340c3f,_0x57e0b4)=>_0x340c3f||!!_0x57e0b4),this['bind']('isUnlinked')['to'](_0x3db6a4,'unlinkedAt',_0x2ee6dc=>!!_0x2ee6dc);let _0x2bd719=null;const _0x24dfa1=()=>{const _0x5a6cb7=this['_model']['comments']['first']||null;_0x5a6cb7!==_0x2bd719&&(_0x2bd719&&this['stopListening'](_0x2bd719,'change:content'),_0x2bd719=_0x5a6cb7,_0x5a6cb7&&this['listenTo'](_0x5a6cb7,'change:content',_0x24dfa1));const _0x1794b0=_0x5a6cb7?_0x5a6cb7['author']['name']:this['_localUser']['name'],_0x4c8776=_0x5a6cb7?new DOMParser()['parseFromString'](_0xdfa245(_0x5a6cb7['content'],{'limit':this['_config']['maxCommentCharsWhenCollapsed']}),'text/html')['body']['textContent']:'',_0x2e7348=Et(this['locale'],'COMMENT_THREAD_LABEL',[this['length'],_0x1794b0]);this['set']('ariaLabel',_0x4c8776?_0x2e7348+'\x20'+_0x4c8776:_0x2e7348);};this['listenTo'](this['_model']['comments'],'change',_0x24dfa1),_0x24dfa1(),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x53f520(),this['keystrokes']=new _0x187a58(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4d7ad0=>_0x4d7ad0['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),_0xafcf81(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x3b6001=new xt(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5d9dc0=_0x3b6001['commentInputView'];return _0x3b6001['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5d9dc0,'value',(_0x220c58,_0x355a70,_0x5d928a,_0x239985,_0x21c0c2)=>!!_0x21c0c2||!!_0x239985&&_0x5d928a&&!_0x355a70||_0x220c58&&_0x5d928a&&!_0x355a70),_0x5d9dc0['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x47a4a6,_0x10769f,_0x5a001d)=>{let _0x1381f9;return _0x1381f9=_0x5a001d&&_0x10769f?'Reply\x20to\x20reopen\x20discussion...':_0x47a4a6?'Reply...':'Write\x20a\x20comment...',Et(this['locale'],_0x1381f9);}),_0x5d9dc0['bind']('submitLabel')['to'](this,'length',_0x5501c8=>Et(this['locale'],_0x5501c8?'Reply':'Comment')),_0x5d9dc0['on']('submit',(_0x12e20c,_0x40353e)=>{this['fire']('addComment',_0x40353e),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5d9dc0['on']('cancel',()=>{this['focus']();}),_0x5d9dc0['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5d9dc0['on']('cancel',_0x495a52=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x495a52['stop']());}),this['on']('change:isActive',(_0x3d97d7,_0x1839b0,_0x206ad0)=>{_0x206ad0||this['length']||_0x5d9dc0['value']||this['fire']('removeCommentThread');}),_0x3b6001;}};const Ft=/* #__PURE__ -- @preserve */
|
|
27
|
+
_0x1c333a(Ht);var Ut=class extends Ft{['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x164789,_0x3b96a0,_0x169ca0,_0x5753ab){super(_0x164789,_0x3b96a0,_0x169ca0,_0x5753ab),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x164789,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x4c3efb,_0x143705,_0xf47d05)=>{_0xf47d05||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1405c4,_0x4ad568,_0x5381c0)=>{_0x5381c0&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x23bb76=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x23bb76['if']('isActive','ck-thread--active'),_0x23bb76['if']('isUnlinked','ck-thread--unlinked'),_0x23bb76['to']('actionIndicator',_0x8c3b82=>_0x8c3b82?'ck-thread--'+_0x8c3b82:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x23bb76['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x16c132 of this['commentsListView']['commentViews'])_0x16c132['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3ede8d}=this,_0x16c617=this['commentsListView']['commentViews']['get'](0x0);_0x16c617===this['_boundFirstCommentView']||_0x16c617['isSystemComment']||(this['_boundFirstCommentView']=_0x16c617,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x16c617,'actionIndicator',_0x5e415f=>'remove'===_0x5e415f?'remove':null),_0x16c617['placeholder']=Et(_0x3ede8d,'Write\x20a\x20comment...'),_0x16c617['removeButton']['on']('execute',_0x25bb7e=>{_0x25bb7e['stop'](),this['showConfirm'](Et(_0x3ede8d,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x16c617['focus']();}),_0x16c617['actionBar']['add'](this['resolveButton'],0x0),_0x16c617['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x35a72b=new _0x46341e(this['locale']);return _0x35a72b['label']=Et(this['locale'],'Resolve'),_0x35a72b['tooltip']=Et(this['locale'],'Resolve'),_0x35a72b['icon']=_0x579355,_0x35a72b['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x35a72b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x12e15f=>!_0x12e15f),_0x35a72b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5a5675,_0x2e0b7d)=>_0x5a5675&&!_0x2e0b7d),_0x35a72b['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x35a72b;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}},Wt=class extends ht{constructor(_0xe4d700){super(_0xe4d700),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x58cb88,_0x232b1c,_0x38b8bd)=>{this['element']['innerHTML']=_0x38b8bd;}),this['element']['innerHTML']=this['content'];}},Kt=class extends ht{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1a545f,_0x378859,_0x52e9c7){super(_0x1a545f),this['_model']=_0x378859,this['_config']=_0x52e9c7,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x378859,'content',_0x378859,'authoredAt',(_0x3582f9,_0x2503c9)=>Et(_0x1a545f,'COMMENT_ARIA_LABEL',[_0x378859['author']['name'],_0x52e9c7['formatDateTime'](_0x2503c9),new DOMParser()['parseFromString'](_0x3582f9,'text/html')['body']['textContent'],_0x378859['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new _0x44a60(_0x1a545f,Et(_0x1a545f,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new at(),this['focusTracker']=new _0x53f520(),this['keystrokes']=new _0x187a58(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x18edd9=>_0x18edd9['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):Et(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?Et(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):Et(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x5ee64c=new Wt(this['locale']);return _0x5ee64c['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x53690f,_0x47fd01)=>_0x47fd01?_0xdfa245(_0x53690f,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x53690f),_0x5ee64c;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x11598b=new St(this['locale'],this['_config']['editorConfig']);return _0x11598b['value']=this['_model']['content'],_0x11598b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x11598b['submitLabel']=Et(this['locale'],'Save'),_0x11598b['on']('submit',(_0x2c9efb,_0x20ba87)=>{this['fire']('updateComment',this['_model']['id'],_0x20ba87),this['switchToDisplayMode'](),this['focus']();}),_0x11598b['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x11598b['once']('editorReady',()=>{_0x11598b['focus']();}),_0x11598b['createEditor'](),_0x11598b['delegate']('editorReady')['to'](this),_0x11598b['delegate']('editorDestroyed')['to'](this),_0x11598b;}['_setupKeyboardNavigation'](){const _0x17b553=this['element'];this['keystrokes']['listenTo'](_0x17b553);for(const _0x537300 of this['focusables'])this['focusTracker']['add'](_0x537300['element']),this['keystrokes']['listenTo'](_0x537300['element']);this['focusables']['on']('change',(_0x498f0f,_0x33e615)=>{for(const _0x4a8dda of _0x33e615['removed'])this['focusTracker']['remove'](_0x4a8dda['element']),this['keystrokes']['stopListening'](_0x4a8dda['element']);for(const _0x10abda of _0x33e615['added'])this['focusTracker']['add'](_0x10abda['element']),this['keystrokes']['listenTo'](_0x10abda['element']);}),this['keystrokes']['set']('enter',(_0x6d7332,_0x418bf3)=>{_0x17b553===_0x6d7332['target']&&(this['focusCycler']['focusFirst'](),_0x418bf3());}),this['keystrokes']['set']('esc',(_0xbc9403,_0x599cdf)=>{_0x17b553!==_0xbc9403['target']&&(this['focus'](),_0x599cdf());});}};const Gt=/* #__PURE__ -- @preserve */
|
|
28
|
+
_0x1c333a(Kt);var Yt=class extends Gt{['actionBar'];['userView'];constructor(_0x3db95a,_0x346d4b,_0x23dcc5){super(_0x3db95a,_0x346d4b,_0x23dcc5),this['set']('actionIndicator',null),this['set']('placeholder',Et(_0x3db95a,'Reply...')),this['bind']('authoredAt')['to'](_0x346d4b),this['bind']('resolvedAt')['to'](_0x346d4b),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x20e9ea(_0x3db95a,_0x346d4b['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x346d4b,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0xdc67a7=this['bindTemplate'],_0x14e0f0=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0xdc67a7['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0xdc67a7['to']('authoredAt',_0x130f88=>this['_config']['formatDateTime'](_0x130f88))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0xdc67a7['if']('isEditMode','ck-comment__actions--hidden'),_0xdc67a7['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x14e0f0['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0xdc67a7['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0xdc67a7['if']('isEditMode','ck-comment--edit'),_0xdc67a7['if']('isSystemComment','ck-comment--info'),_0xdc67a7['to']('actionIndicator',_0x52e202=>_0x52e202?'ck-comment--'+_0x52e202:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x14e0f0}]}]};}['_createEditButton'](){const _0x3602a1=new _0x465f26(this['locale']);return _0x3602a1['label']=Et(this['locale'],'Edit'),_0x3602a1['icon']=_0x4031db,_0x3602a1['withText']=!0x0,_0x3602a1['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x3602a1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4c0124=>!_0x4c0124),_0x3602a1['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x3602a1['on']('execute',()=>this['switchToEditMode']()),_0x3602a1;}['_createRemoveButton'](){const _0x56b10d=new _0x465f26(this['locale']);return _0x56b10d['label']=Et(this['locale'],'Remove'),_0x56b10d['icon']=_0x5ed6e1,_0x56b10d['withText']=!0x0,_0x56b10d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x56b10d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3688a1=>!_0x3688a1),_0x56b10d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x56b10d['on']('execute',()=>{this['showConfirm'](Et(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x56b10d;}['_createDropdown'](){const _0xadf886=ct(this['locale'],_0x40e15b),_0x42fa06=_0xadf886['panelView']['children'],_0x1aba0b=new ot(this['locale']),_0x4ef04d=_0xadf886['bindTemplate'];dt(_0xadf886,()=>this['items']['find'](_0x3cf2ed=>_0x3cf2ed['isVisible'])),_0xadf886['extendTemplate']({'attributes':{'class':[_0x4ef04d['if']('isVisible','ck-hidden',_0x37df2f=>!_0x37df2f)]}});const _0x1be4b4=(_0x558af2,_0x1b70cb=-0x1)=>{const _0x4760c3=new nt(this['locale']);_0x4760c3['children']['add'](_0x558af2);const _0x409c7b=_0x1b70cb>-0x1?_0x1b70cb:_0x1aba0b['items']['length'];_0x1aba0b['items']['add'](_0x4760c3,_0x409c7b);const _0x46845e=Array['from'](this['items']);_0xadf886['unbind']('isEnabled','isVisible'),_0xadf886['bind']('isEnabled')['toMany'](_0x46845e,'isEnabled',(..._0x58c1ca)=>_0x58c1ca['some'](_0x210453=>_0x210453)),_0xadf886['bind']('isVisible')['toMany'](_0x46845e,'isVisible',(..._0x5632f6)=>_0x5632f6['some'](_0xecaa23=>_0xecaa23));};_0xadf886['panelPosition']='sw',_0xadf886['buttonView']['set']({'label':Et(this['locale'],'Show\x20more\x20items'),'icon':_0x3e270c});for(const _0x56ac39 of this['items'])_0x1be4b4(_0x56ac39);return _0x42fa06['add'](_0x1aba0b),_0xadf886['listenTo'](this['items'],'add',(_0x19dd1e,_0x382d73,_0x36078c)=>{_0x1be4b4(_0x382d73,_0x36078c);}),_0xadf886['listenTo'](this['items'],'remove',(_0x23ef99,_0x1d2bda,_0x7addfc)=>{_0x1aba0b['items']['remove'](_0x7addfc);}),_0xadf886;}['_attachActions'](_0x3b6c3b,_0x882d8e){const _0x11bf54=_0x3b6c3b&&_0x3b6c3b['element'];_0x11bf54&&(this['listenTo'](_0x11bf54,'mouseenter',()=>this['actionIndicator']=_0x882d8e),this['listenTo'](_0x11bf54,'focus',()=>this['actionIndicator']=_0x882d8e),this['listenTo'](_0x11bf54,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x11bf54,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1d3570=super['_createCommentInputView']();return _0x1d3570['bind']('placeholder')['to'](this),_0x1d3570;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}};function Xt(_0x3518d8){const _0x49d5ca=_0x3d18e8(_0x3518d8,0x1e),_0x18cd44=new MutationObserver(_0x39c65c=>{for(const _0x2ab045 of _0x39c65c)('attributes'==_0x2ab045['type']&&'class'==_0x2ab045['attributeName']||'childList'==_0x2ab045['type']||'characterData'==_0x2ab045['type'])&&_0x49d5ca();});return{'attach'(_0xe0e9ad){_0x18cd44['observe'](_0xe0e9ad,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x18cd44['disconnect'](),_0x49d5ca['cancel']();}};}var qt=class extends ht{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x195c84,_0x511f9f){super(_0x195c84),this['id']=_0x4e0aef(),this['focusTracker']=new _0x53f520(),this['keystrokes']=new _0x187a58(),this['keystrokes']['set']('Esc',(_0x544672,_0xad18fd)=>this['fire']('Esc',_0xad18fd)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x511f9f),this['mainView']=_0x511f9f;const _0x3b3be9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x3b3be9['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x15fbb7=this['element']['clientHeight'];_0x15fbb7&&(this['height']=_0x15fbb7);}};const jt=/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3abe1c();var $t=class Annotation extends jt{['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x195ac0,target:_0x3106d1,type:_0x286e8e,isVisible:_0x7c6757=!0x0}){super(),this['view']=_0x195ac0,this['view']['element']||this['view']['render'](),this['_type']=_0x286e8e,this['_target']=_0x3106d1,Annotation['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x476485([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3bdccb,_0x4b8ea5)=>{this['view']['focusTracker']['add'](_0x4b8ea5);}),this['focusableElements']['on']('remove',(_0xc31c70,_0x30928d)=>{this['view']['focusTracker']['remove'](_0x30928d);}),this['set']('isVisible',_0x7c6757);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x329712=this['_getNormalizedTarget']();return Annotation['_assertCorrectTarget'](_0x329712),_0x329712;}get['targetRect'](){const _0x1b543a=this['target'];if(null===_0x1b543a)return null;if(_0x1b543a instanceof _0x407ea7)return _0x1b543a;const _0xa29209=_0x1b543a['filter'](_0x1f4c04=>function(_0x34fa1e){return!!_0x34fa1e['offsetParent']||!!_0x34fa1e['getClientRects']()['item'](0x0);}(_0x1f4c04));return 0x0===_0xa29209['length']?null:_0x407ea7['getDomElementRects'](_0xa29209[0x0])[0x0];}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0xe47a2f){this['view']['isActive']=_0xe47a2f,this['view']['mainView']['isActive']=_0xe47a2f;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x55b893){if(!(null===_0x55b893||_0x55b893 instanceof _0x407ea7||Array['isArray'](_0x55b893)&&_0x55b893['every'](_0x168b56=>zt(_0x168b56))))throw new _0xf4a2b6('annotation-invalid-target',null,{'target':_0x55b893});}['_getNormalizedTarget'](){const _0x22ae4e='function'==typeof this['_target']?this['_target']():this['_target'];return zt(_0x22ae4e)?[_0x22ae4e]:_0x22ae4e;}};function zt(_0x271a28){return null!==_0x271a28&&'object'==typeof _0x271a28&&'nodeType'in _0x271a28&&0x1===_0x271a28['nodeType'];}var Jt=class extends _0x476485{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5d4cd5=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x53f520(),this['_focusTracker']['on']('change:isFocused',(_0x356a69,_0xf5c7cf,_0x3fe474)=>{_0x3fe474||this['fire']('blur');});for(const _0x27412f of _0x5d4cd5)this['add'](_0x27412f);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x60edb1){if(this['has'](_0x60edb1))throw new _0xf4a2b6('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x60edb1['innerView'],_0x60edb1),this['_viewToAnnotation']['set'](_0x60edb1['view'],_0x60edb1);for(const _0x8a990d of _0x60edb1['focusableElements'])this['_focusTracker']['add'](_0x8a990d);if(this['listenTo'](_0x60edb1['focusableElements'],'add',(_0x1f7d79,_0x1e2a95)=>{this['_focusTracker']['add'](_0x1e2a95);}),this['listenTo'](_0x60edb1['focusableElements'],'remove',(_0xacfb97,_0x4cde23)=>{this['_focusTracker']['remove'](_0x4cde23);}),this['listenTo'](_0x60edb1['view']['focusTracker'],'change:isFocused',(_0x51079a,_0x4fd3d2,_0x38afb8)=>{_0x38afb8&&this['fire']('focus',_0x60edb1);}),_0x60edb1['updateTargetRect'](),this['_areCachedRectsStale']()){for(const _0x8d73c2 of this)_0x8d73c2['updateTargetRect']();}const _0x10d528=this['_getOrderInContent'](_0x60edb1['view']['targetRect']);return super['add'](_0x60edb1,_0x10d528);}['remove'](_0x2cfe6d){if(!this['has'](_0x2cfe6d))throw new _0xf4a2b6('annotationcollection-not-existing-item',null);this['stopListening'](_0x2cfe6d['view']['focusTracker']),this['stopListening'](_0x2cfe6d['focusableElements']);for(const _0xd4549f of _0x2cfe6d['focusableElements'])this['_focusTracker']['remove'](_0xd4549f);return this['_viewToAnnotation']['delete'](_0x2cfe6d['view']),this['_innerViewToAnnotation']['delete'](_0x2cfe6d['innerView']),super['remove'](_0x2cfe6d);}['getByInnerView'](_0x3f1120){return this['_innerViewToAnnotation']['get'](_0x3f1120);}['getByView'](_0x1d6790){return this['_viewToAnnotation']['get'](_0x1d6790);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1da234 of this)_0x1da234['updateTargetRect']();this['_sort']();}['_sort'](){const _0x22e853=Array['from'](this)['sort']((_0x5c3a13,_0x1a71d3)=>Zt(_0x5c3a13['view']['targetRect'],_0x1a71d3['view']['targetRect']));for(let _0x366690=_0x22e853['length']-0x1;_0x366690>0x0;_0x366690--){const _0x3a1aa1=_0x22e853[_0x366690];_0x366690!==this['getIndex'](_0x3a1aa1)&&(this['remove'](_0x3a1aa1),this['add'](_0x3a1aa1));}}['_getOrderInContent'](_0x10202f){let _0x191326=0x0;if(!_0x10202f)return this['length'];for(const _0x8f01f2 of this){const _0x51c337=_0x8f01f2['view']['targetRect'];if(_0x51c337){if(Zt(_0x10202f,_0x51c337)<0x0)return _0x191326;_0x191326++;}}return _0x191326;}['_areCachedRectsStale'](){const _0x430e6d=this['get'](0x0);if(!_0x430e6d)return!0x1;const _0x550fba=_0x430e6d['view']['targetRect'],_0x44604a=_0x430e6d['targetRect'];return!(!_0x550fba||!_0x44604a)&&(_0x550fba['top']!==_0x44604a['top']||_0x550fba['left']!==_0x44604a['left']);}};function Qt({source:_0x19322d,target:_0x2d9987,filter:_0x4f3df3}){for(const _0x5e7e82 of _0x19322d)_0x4f3df3(_0x5e7e82)&&_0x2d9987['add'](_0x5e7e82);_0x2d9987['listenTo'](_0x19322d,'add',(_0x4f543b,_0x60347d)=>{_0x4f3df3(_0x60347d)&&_0x2d9987['add'](_0x60347d);}),_0x2d9987['listenTo'](_0x19322d,'remove',(_0x3f98d4,_0x42e3b5)=>{_0x2d9987['has'](_0x42e3b5)&&_0x2d9987['remove'](_0x42e3b5);});}function Zt(_0x1e18ac,_0x31cf96){if(null===_0x1e18ac&&null===_0x31cf96)return 0x0;if(null===_0x1e18ac)return-0x1;if(null===_0x31cf96)return 0x1;const _0x36f735=_0x1e18ac['top']-_0x31cf96['top'];return 0x0==_0x36f735?_0x1e18ac['left']-_0x31cf96['left']:_0x36f735;}var ti=class extends _0x6aba6a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x27740d){if(super(_0x27740d),this['collection']=new Jt(),this['_visibleAnnotations']=new Jt(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x27740d instanceof _0x9416a1){const _0x1c7c15=_0x27740d['locale'];_0x27740d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':Et(_0x1c7c15,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':Et(_0x1c7c15,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':Et(_0x1c7c15,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':Et(_0x1c7c15,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':Et(_0x1c7c15,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':Et(_0x1c7c15,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':Et(_0x1c7c15,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x102000){this['collection']['add'](_0x102000);}['remove'](_0x215d51){this['collection']['remove'](_0x215d51),_0x215d51['destroy']();}['refreshVisibility'](){for(const _0x4b3ce2 of this['collection'])_0x4b3ce2['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1d3687){return this['collection']['getByInnerView'](_0x1d3687);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x512559 of this['collection'])_0x512559['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x60cf75){this['fire']('_activateAnnotation',_0x60cf75);}['createAnnotation'](_0x1092ec){return new $t(_0x1092ec);}['createAnnotationView'](_0x15a7a2,_0x3eca65){return new qt(_0x15a7a2,_0x3eca65);}['_addActiveAnnotation'](_0x683e06){const _0xabe9cc=new Set(this['activeAnnotations']);_0xabe9cc['add'](_0x683e06),this['activeAnnotations']=_0xabe9cc;}['_removeActiveAnnotation'](_0x1f5d9a){const _0x2d2146=new Set(this['activeAnnotations']);_0x2d2146['delete'](_0x1f5d9a),this['activeAnnotations']=_0x2d2146;}['_bindAnnotationsToVisibleAnnotations'](){const _0xd9ec3f=this['collection'],_0x58f68e=this['_visibleAnnotations'];function _0x1554f0(_0x320f0f){const _0x5dd966=_0x320f0f['source'];_0x5dd966['isVisible']&&!_0x58f68e['has'](_0x5dd966)?_0x58f68e['add'](_0x5dd966):!_0x5dd966['isVisible']&&_0x58f68e['has'](_0x5dd966)&&_0x58f68e['remove'](_0x5dd966),_0x5dd966['view']['focusTracker']['remove'](_0x5dd966['view']['element']),_0x5dd966['view']['focusTracker']['add'](_0x5dd966['view']['element']);}this['listenTo'](_0xd9ec3f,'add',(_0x33302f,_0x17ff48)=>{_0x17ff48['isVisible']&&_0x58f68e['add'](_0x17ff48),this['listenTo'](_0x17ff48,'change:isVisible',_0x1554f0);}),this['listenTo'](_0xd9ec3f,'remove',(_0xc73679,_0x1d1611)=>{_0x58f68e['has'](_0x1d1611)&&_0x58f68e['remove'](_0x1d1611),this['stopListening'](_0x1d1611,'change:isVisible',_0x1554f0);});}['_setupEnterAnnotationKeystroke'](){const _0x5e1fa4=_0x2fe88d=>{_0x2fe88d['on']('ready',()=>{_0x2fe88d['keystrokes']['set'](_0x201e54,(_0x4adf3b,_0xf4b2e2)=>{const _0x419c03=_0x165a08(this['activeAnnotations']['values']());_0x419c03&&(_0x419c03['view']['focus'](),_0xf4b2e2());});});};this['context']instanceof _0x9416a1?_0x5e1fa4(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x20f801,_0x14eefc)=>{_0x5e1fa4(_0x14eefc);});}['_setupEscapeAnnotationHandling'](){const _0x44251b=_0x1c9309=>{const _0x19c40b=_0x1c9309['source'],_0x45ecb6=[];let _0x3bd5ff;if(Array['isArray'](_0x19c40b['target'])){_0x3bd5ff=_0x19c40b['target'][0x0],this['context']instanceof _0x9416a1?_0x45ecb6['push'](this['context']):this['context']['editors']&&_0x45ecb6['push'](...this['context']['editors']);for(const _0x2e6dae of _0x45ecb6)for(const _0x3aab55 of _0x2e6dae['editing']['view']['domRoots']['values']())if(_0x3aab55['contains'](_0x3bd5ff))return void _0x2e6dae['editing']['view']['focus']();_0x3bd5ff['focus']();}};this['listenTo'](this['collection'],'add',(_0xf0b50d,_0x33cfb5)=>{this['listenTo'](_0x33cfb5,'escape',_0x44251b,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x13ec13,_0x563d68)=>{this['stopListening'](_0x563d68,'escape',_0x44251b);});}};const ii=Symbol('noChannel'),ei={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0},si=/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3abe1c(),ni=/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3abe1c();var oi=class extends _0x6aba6a{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[ti,_0x8faac9,_0x599743];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4d5e1b){super(_0x4d5e1b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xcfb54f=this['context']['config'];_0xcfb54f['define']('comments.maxCommentsWhenCollapsed',0x2),_0xcfb54f['define']('comments.maxThreadTotalWeight',0x1f4),_0xcfb54f['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xcfb54f['define']('comments.CommentThreadView',Ut),_0xcfb54f['define']('comments.CommentView',Yt),_0xcfb54f['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1f093f=this['context']['plugins']['get'](ti);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x118c89,_0x27bb8c)=>this['_addCommentThread'](_0x27bb8c)),this['on']('submitCommentThread',(_0x48c3a7,_0x2de2b6)=>this['_submitCommentThread'](_0x2de2b6)),this['on']('resolveCommentThread',(_0x2b593f,_0x155801)=>this['_resolveCommentThread'](_0x155801)),this['on']('resolveCommentThread',(_0x43baac,_0x17bde4)=>this['_updateActiveAnnotation'](_0x17bde4),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3e92fe,_0x3b892e)=>this['_reopenCommentThread'](_0x3b892e)),this['on']('reopenCommentThread',(_0x25d048,_0x40ee37)=>this['_updateActiveAnnotation'](_0x40ee37),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x223cb6,_0x37417c)=>this['_removeCommentThread'](_0x37417c)),this['on']('updateCommentThread',(_0x41a47e,_0x16c9de)=>this['_updateCommentThread'](_0x16c9de)),this['on']('updateCommentThread',(_0x22c4bd,_0x520a64)=>this['_updateActiveAnnotation'](_0x520a64),{'priority':'lowest'}),this['on']('addComment',(_0x5ab2e3,_0x1712c6)=>this['_addComment'](_0x1712c6)),this['on']('updateComment',(_0x5b40b5,_0x708b7)=>this['_updateComment'](_0x708b7)),this['on']('removeComment',(_0x18c2ab,_0x203795)=>this['_removeComment'](_0x203795)),this['on']('addComment',(_0x5e5459,{threadId:_0x23b857,isFromAdapter:_0x59d28f})=>{if(_0x59d28f)return;const _0x3a85d9=this['getCommentThread'](_0x23b857),_0x3cbc9b=_0x3a85d9&&this['_threadToController']['get'](_0x3a85d9);_0x3cbc9b&&_0x3cbc9b['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1f093f,'change:activeAnnotations',(_0x6bc5d0,_0x1a4353,_0x1ab94b)=>{const _0x40cf2e=Array['from'](_0x1ab94b)['map'](_0x559924=>this['_viewToController']['get'](_0x559924['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x40cf2e?_0x40cf2e['model']:null;});}set['adapter'](_0x1f27f1){if(this['_adapter'])throw new _0xf4a2b6('commentsrepository-adapter-already-set');this['_adapter']=_0x1f27f1;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x10a495=ii,threadId:_0x310254=_0x4e0aef(),comments:_0x38beba=[],unlinkedAt:_0x1b3dcb=null,resolvedAt:_0x7e9c70=null,resolvedBy:_0x485865=null,target:_0x6905bd=null,context:_0x764661=null,attributes:_0x5868e6={},isResolvable:_0x1c8646=!0x0,isSubmitted:_0x534f45=!0x1,isFromAdapter:_0x2504e2=!0x1}={}){return this['fire'](ai('addCommentThread',_0x10a495),{'channelId':_0x10a495,'threadId':_0x310254,'comments':_0x38beba,'unlinkedAt':_0x1b3dcb,'resolvedAt':_0x7e9c70,'resolvedBy':_0x485865,'target':_0x6905bd,'context':_0x764661,'attributes':_0x5868e6,'isFromAdapter':_0x2504e2,'isResolvable':_0x1c8646,'isSubmitted':_0x534f45}),this['getCommentThread'](_0x310254);}['openNewCommentThread']({channelId:_0xb1bbcf=ii,threadId:_0x372ffe=_0x4e0aef(),target:_0x58c438,context:_0x265701=null,isResolvable:_0xb54d23=!0x0}){if(this['_readOnlyChannels']['has'](_0xb1bbcf)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x58c438)throw new _0xf4a2b6('commentsrepository-missing-target');const _0x5154f6=this['addCommentThread']({'channelId':_0xb1bbcf,'threadId':_0x372ffe,'target':_0x58c438,'context':_0x265701,'isResolvable':_0xb54d23});if(!_0x5154f6)return null;const _0xc68609=this['_threadToController']['get'](_0x5154f6),_0x2f8203=_0xc68609['view']['commentThreadInputView']['commentInputView'],_0x5dbc14=this['context']['plugins']['get'](ti),_0x273b7f=_0x5dbc14['getByInnerView'](_0xc68609['view']);return _0x5dbc14['activate'](_0x273b7f),_0x2f8203['once']('editorReady',()=>_0x2f8203['focus']()),_0x5154f6;}['hasCommentThread'](_0x73ace6){if('string'!=typeof _0x73ace6)throw new _0xf4a2b6('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x73ace6);}['updateCommentThread']({channelId:_0x230800=ii,threadId:_0x4999b9,context:_0x25cde3,unlinkedAt:_0x533804,attributes:_0x4dfd2e,isFromAdapter:_0x32d373=!0x1}){return this['fire'](ai('updateCommentThread',_0x230800),{'channelId':_0x230800,'threadId':_0x4999b9,'context':_0x25cde3,'unlinkedAt':_0x533804,'attributes':_0x4dfd2e,'isFromAdapter':_0x32d373}),this['getCommentThread'](_0x4999b9);}['getCommentThread'](_0x4065e1){if('string'!=typeof _0x4065e1)throw new _0xf4a2b6('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4065e1);}['fetchCommentThread']({channelId:_0x3517f9,threadId:_0xc2bf0a}={}){const _0x3e5887=this['getCommentThread'](_0xc2bf0a);if(_0x3e5887)return Promise['resolve'](_0x3e5887);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xf4a2b6('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3517f9,'threadId':_0xc2bf0a})['then'](_0x6594eb=>this['hasCommentThread'](_0xc2bf0a)?this['getCommentThread'](_0xc2bf0a):_0x6594eb?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3517f9},_0x6594eb)):void 0x0)['catch'](_0x13ef3e=>{throw console['error'](_0x13ef3e),new _0xf4a2b6('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2a75b1,skipNotAttached:_0x2232b5=!0x1,skipEmpty:_0x5a8d42=!0x1,toJSON:_0xd40800=!0x1}={}){const _0x14b4b1=[];for(const _0x807c3 of this['_threads']['values']())_0x2a75b1&&_0x807c3['channelId']!==_0x2a75b1||_0x2232b5&&!_0x807c3['isAttached']||_0x5a8d42&&0x0===_0x807c3['length']||_0x14b4b1['push'](_0x807c3);return _0xd40800?_0x14b4b1['map'](_0xd9dc10=>_0xd9dc10['toJSON']()):_0x14b4b1;}['getAnnotationForCommentThread'](_0x26d31a){const _0x4b7f56=this['_threadToController']['get'](_0x26d31a);return _0x4b7f56&&this['context']['plugins']['get'](ti)['getByInnerView'](_0x4b7f56['view'])||null;}['getCommentThreadForAnnotation'](_0x3848f9){const _0x1c72b2=this['_viewToController']['get'](_0x3848f9['innerView']);return _0x1c72b2?_0x1c72b2['model']:null;}['setActiveCommentThread'](_0x2c0ff3){const _0x1bce28=this['context']['plugins']['get'](ti);if(!_0x2c0ff3)return void(this['activeCommentThread']&&_0x1bce28['deactivateAll']());const _0x19a56c=this['getCommentThread'](_0x2c0ff3);if(!_0x19a56c)throw new _0xf4a2b6('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x2c0ff3});if(!this['_threadToController']['has'](_0x19a56c))throw new _0xf4a2b6('commentsrepository-active-not-attached',null,{'threadId':_0x2c0ff3});const _0x435862=_0x1bce28['getByInnerView'](this['_threadToController']['get'](_0x19a56c)['view']);_0x1bce28['activate'](_0x435862);}['switchReadOnly'](_0x1d1f91,_0x41ecb0){_0x1d1f91?this['_readOnlyChannels']['add'](_0x41ecb0):this['_readOnlyChannels']['delete'](_0x41ecb0),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x8c4569){return this['_readOnlyChannels']['has'](_0x8c4569)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x33e7fb,_0x9b75b9){return new bt(_0x33e7fb,_0x9b75b9);}['setPermissions'](_0x328116,_0x1bdcd2=ii){this['_permissions']['set'](_0x1bdcd2,_0x328116),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2dfcec=ii){return this['_permissions']['has'](_0x2dfcec)?this['_permissions']['get'](_0x2dfcec):ei;}['_addCommentThread']({channelId:_0x1d6d3e,threadId:_0x12d3c9,comments:_0x1c9637,unlinkedAt:_0x1202f0,resolvedAt:_0x4c5569,resolvedBy:_0x48cb27,target:_0x318ab4,context:_0x196429,attributes:_0x4a7453,isFromAdapter:_0x1a9e4f,isResolvable:_0x3b4be0,isSubmitted:_0x143c82}){if('string'!=typeof _0x12d3c9)throw new _0xf4a2b6('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x12d3c9});if(this['hasCommentThread'](_0x12d3c9))throw new _0xf4a2b6('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x12d3c9});const _0x43202e=new ri(this,{'channelId':_0x1d6d3e,'id':_0x12d3c9,'context':_0x196429,'attributes':_0x4a7453,'unlinkedAt':_0x1202f0,'resolvedAt':_0x4c5569,'resolvedBy':_0x48cb27?this['context']['plugins']['get'](_0x599743)['getUser'](_0x48cb27):null,'isResolvable':_0x3b4be0,'isSubmitted':_0x143c82||_0x1a9e4f});this['_threads']['set'](_0x12d3c9,_0x43202e);for(const _0x37a4af of _0x1c9637)_0x43202e['_add'](this['_createNewComment']({'threadId':_0x12d3c9,..._0x37a4af}));return _0x318ab4&&_0x43202e['attachTo'](_0x318ab4),_0x1a9e4f||!_0x43202e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1d6d3e,'threadId':_0x12d3c9});}['_submitCommentThread']({channelId:_0x252b3b,threadId:_0x39a2f3}){if(!this['hasCommentThread'](_0x39a2f3))throw new _0xf4a2b6('commentsrepository-missing-comment-thread',this);const _0x1d653e=this['getCommentThread'](_0x39a2f3);if(_0x1d653e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x265895,comments:_0x5c4cc6,resolvedAt:_0x2159ef,resolvedBy:_0x4b5017,context:_0x55fb9c,attributes:_0x4054b6}=_0x1d653e,_0x10aee5=this['context']['plugins']['get']('PendingActions'),_0x214eb6=_0x10aee5['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x252b3b,'threadId':_0x265895,'comments':_0x5c4cc6['map'](_0x5e09a9=>_0x5e09a9['toJSON']()),'resolvedAt':_0x2159ef,'resolvedBy':_0x4b5017?_0x4b5017['id']:_0x4b5017,'context':_0x55fb9c,'attributes':_0x4054b6})['then'](({comments:_0x2ca136})=>{_0x10aee5['remove'](_0x214eb6);for(const _0x40b063 of _0x2ca136)this['_updateComment']({'channelId':_0x252b3b,'threadId':_0x39a2f3,'commentId':_0x40b063['commentId'],'createdAt':_0x40b063['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1f2e1e=>{throw console['error'](_0x1f2e1e),new _0xf4a2b6('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x524553,target:_0x4acd9e}){const _0x59bcb9=this['getCommentThread'](_0x524553);if(!_0x59bcb9)throw new _0xf4a2b6('commentsrepository-attach-missing-comment-thread',this);const _0x297070=this['context']['plugins']['get']('PendingActions'),_0x1a5e92=this['context']['plugins']['get'](ti),_0x23b1d5=this['_createCommentThreadView'](_0x59bcb9),_0x446386=new bt(_0x59bcb9,_0x23b1d5);let _0x519563=null;_0x23b1d5['on']('change:isDirty',(_0x2ba1ad,_0x58a5e8,_0x179c0e)=>{_0x179c0e?_0x519563=_0x297070['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x519563&&(_0x297070['remove'](_0x519563),_0x519563=null);}),this['_threadToController']['set'](_0x59bcb9,_0x446386),this['_viewToController']['set'](_0x23b1d5,_0x446386);const _0x4129cd=new qt(this['context']['locale'],_0x23b1d5);_0x4129cd['bind']('length')['to'](_0x23b1d5),_0x4129cd['bind']('isDirty')['to'](_0x23b1d5,'isDirty',_0x23b1d5,'length',(_0x2cbeee,_0x35a62c)=>_0x2cbeee||!_0x35a62c),_0x4129cd['bind']('isActive')['to'](_0x23b1d5),_0x4129cd['type']='comment';const _0x459bb4=new $t({'view':_0x4129cd,'target':_0x4acd9e,'type':'comment','isVisible':!_0x59bcb9['archivedAt']&&!!('function'==typeof _0x4acd9e?_0x4acd9e():_0x4acd9e)});return _0x23b1d5['on']('escape',()=>{_0x459bb4['fire']('escape');}),this['_bindAnnotationToEditors'](_0x23b1d5,_0x459bb4),_0x1a5e92['add'](_0x459bb4),_0x459bb4;}['_bindAnnotationToEditors'](_0x51556d,_0x132e68){this['listenTo'](_0x51556d,'editorReady',(_0x37b6f4,_0x38e4be)=>{const _0x494a19=_0x38e4be['ui']['view']['body']['bodyCollectionContainer'];_0x132e68['focusableElements']['add'](_0x494a19),this['context']instanceof _0x9416a1&&this['context']['ui']['focusTracker']['add'](_0x494a19);},{'priority':'highest'}),this['listenTo'](_0x51556d,'editorDestroyed',(_0x20922d,_0x10d8d1)=>{const _0xdbcd0b=_0x10d8d1['ui']['view']['body']['bodyCollectionContainer'];_0x132e68['focusableElements']['has'](_0xdbcd0b)&&_0x132e68['focusableElements']['remove'](_0xdbcd0b),this['context']instanceof _0x9416a1&&this['context']['ui']['focusTracker']['remove'](_0xdbcd0b);});}['_unbindEditors'](_0x2cfbe2){this['stopListening'](_0x2cfbe2,'editorReady'),this['stopListening'](_0x2cfbe2,'editorDestroyed');}['_createCommentThreadView'](_0x1a0ce5){const _0x4ba48e=this['context']['plugins']['get'](_0x599743),{config:_0x3f586b,locale:_0x5c2400}=this['context'],_0x4b8e2c=_0x596719(_0x3f586b['get']('locale'),_0x5c2400);return new(0x0,(_0x3f586b['get']('comments'))['CommentThreadView'])(_0x5c2400,_0x1a0ce5,_0x4ba48e['me'],{'editorConfig':{..._0x3f586b['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3f586b['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3f586b['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3f586b['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3f586b['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4b8e2c,'CommentView':_0x3f586b['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x558790,channelId:_0x2be500,resolvedAt:_0x5b356f,resolvedBy:_0x5b9211,isFromAdapter:_0x2240bf}){if(!this['hasCommentThread'](_0x558790))throw new _0xf4a2b6('commentsrepository-missing-comment-thread',null,{'threadId':_0x558790});const _0x2c034d=this['getCommentThread'](_0x558790);if(_0x2c034d['isResolved'])throw new _0xf4a2b6('commentsrepository-resolved-comment-thread',null,{'threadId':_0x558790});const _0x1ffb8b=this['context']['plugins']['get'](_0x599743);if(_0x2c034d['resolvedBy']=_0x1ffb8b['getUser'](_0x5b9211),_0x2c034d['resolvedAt']=_0x5b356f,_0x2240bf||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3ad50f=this['context']['plugins']['get']('PendingActions'),_0x54637b=_0x3ad50f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2be500,'threadId':_0x558790})['then'](({resolvedAt:_0x4f56d7,resolvedBy:_0x5446e9})=>{_0x3ad50f['remove'](_0x54637b),_0x2c034d['resolvedBy']['id']!==_0x5446e9&&(_0x2c034d['resolvedBy']=_0x1ffb8b['getUser'](_0x5446e9)),_0x2c034d['resolvedAt']=_0x4f56d7;})['catch'](_0x257859=>{throw console['error'](_0x257859),new _0xf4a2b6('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x503f3a,channelId:_0x35cb81,isFromAdapter:_0x44103e}){if(!this['hasCommentThread'](_0x503f3a))throw new _0xf4a2b6('commentsrepository-missing-comment-thread',null,{'threadId':_0x503f3a});const _0x4c44e8=this['getCommentThread'](_0x503f3a);if(!_0x4c44e8['isResolved'])throw new _0xf4a2b6('commentsrepository-reopen-comment-thread',null,{'threadId':_0x503f3a});if(_0x4c44e8['resolvedBy']=null,_0x4c44e8['resolvedAt']=null,_0x44103e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4ca0f3=this['context']['plugins']['get']('PendingActions'),_0x351643=_0x4ca0f3['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x35cb81,'threadId':_0x503f3a})['then'](()=>_0x4ca0f3['remove'](_0x351643))['catch'](_0x17b10c=>{throw console['error'](_0x17b10c),new _0xf4a2b6('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x18a93c,isFromAdapter:_0x127696}){const _0x52b24b=this['getCommentThread'](_0x18a93c);if(!_0x52b24b)throw new _0xf4a2b6('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x18a93c),this['_threads']['delete'](_0x18a93c),!_0x52b24b['isSubmitted']||_0x127696||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xc576e1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x124c0b}=_0x52b24b,_0x23fd5a=_0xc576e1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x124c0b,'threadId':_0x18a93c})['then'](()=>_0xc576e1['remove'](_0x23fd5a))['catch'](_0x428503=>{throw console['error'](_0x428503),new _0xf4a2b6('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4ce30e,unlinkedAt:_0x264e28,context:_0x1eff8c,attributes:_0x5eb7cc,isFromAdapter:_0x61493d}){if('string'!=typeof _0x4ce30e)throw new _0xf4a2b6('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4ce30e});if(!this['hasCommentThread'](_0x4ce30e))throw new _0xf4a2b6('commentsrepository-missing-comment-thread',null,{'threadId':_0x4ce30e});const _0x366993=this['getCommentThread'](_0x4ce30e);let _0x505191=!0x1;if(void 0x0!==_0x1eff8c&&_0x366993['context']!==_0x1eff8c&&(_0x366993['context']=_0x1eff8c,_0x505191=!0x0),void 0x0!==_0x264e28&&_0x366993['unlinkedAt']!==_0x264e28&&(_0x366993['unlinkedAt']=_0x264e28,_0x505191=!0x0),_0x5eb7cc&&!_0x23b053(_0x5eb7cc,_0x366993['attributes'])&&(_0x366993['attributes']=_0x5eb7cc,_0x505191=!0x0),!_0x505191)return Promise['resolve']();if(!_0x366993['isSubmitted']||_0x61493d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2e5471=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4f34a0}=_0x366993,_0x35ddbe=_0x2e5471['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4f34a0,'threadId':_0x4ce30e,'context':_0x1eff8c,'unlinkedAt':_0x264e28,'attributes':_0x5eb7cc})['then'](()=>_0x2e5471['remove'](_0x35ddbe))['catch'](_0x4f4f83=>{throw console['error'](_0x4f4f83),new _0xf4a2b6('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x45f651){const _0x2a3893=this['context']['plugins']['get'](ti),_0x24f16f=this['getCommentThread'](_0x45f651);if(_0x24f16f['_isAttached']=!0x1,this['_threadToController']['has'](_0x24f16f)){const _0x3b15f2=this['_threadToController']['get'](_0x24f16f),_0x69b569=_0x3b15f2['view'],_0x4df5e7=_0x2a3893['getByInnerView'](_0x69b569);this['_threadToController']['delete'](_0x24f16f),this['_viewToController']['delete'](_0x69b569),_0x4df5e7&&_0x2a3893['remove'](_0x4df5e7),_0x3b15f2['destroy'](),_0x69b569['destroy']()['then'](()=>{this['_unbindEditors'](_0x69b569);});}}['_updateActiveAnnotation']({threadId:_0x4f96bd,resolvedAt:_0x3eac6e,unlinkedAt:_0xe6d42b}){const _0x20375a=!!_0x3eac6e,_0x264cbc=this['context']['plugins']['get'](ti),_0x4bfdc7=this['getCommentThread'](_0x4f96bd);if(this['_threadToController']['has'](_0x4bfdc7)){const _0x40f343=this['_threadToController']['get'](_0x4bfdc7)['view'],_0x5a16a3=_0x264cbc['getByInnerView'](_0x40f343);_0x5a16a3&&(_0x20375a&&_0x264cbc['_removeActiveAnnotation'](_0x5a16a3),_0xe6d42b?_0x5a16a3['isVisible']=!0x1:_0x5a16a3['refreshVisibility']());}}['_getExternalAuthor'](_0x40e103){const _0x373f57=this['context']['plugins']['get'](_0x599743),_0x47052e=_0x24d26c('external:'+_0x40e103),_0x23d28e=_0x373f57['getUser'](_0x47052e);return _0x23d28e||_0x373f57['addUser']({'id':_0x47052e,'name':_0x40e103});}['_createNewComment']({threadId:_0x5ddc78,commentId:_0x4228c0=_0x4e0aef(),content:_0x4cda7f,authorId:_0x44a6d6,createdAt:_0x504bc8,attributes:_0x492d1f}){if('string'!=typeof _0x4228c0)throw new _0xf4a2b6('commentsrepository-invalid-commentid');if('string'!=typeof _0x44a6d6)throw new _0xf4a2b6('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4cda7f||!_0x4cda7f['trim']())throw new _0xf4a2b6('commentsrepository-invalid-comment-content');const _0x5e593f=this['context']['plugins']['get'](_0x599743)['getUser'](_0x44a6d6);if(!_0x5e593f)throw new _0xf4a2b6('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x44a6d6});let _0x3f09a2=null,_0x20220f=_0x504bc8;return _0x492d1f?.['@external']&&(_0x3f09a2=this['_getExternalAuthor'](_0x492d1f['@external']['authorName']),_0x20220f=new Date(_0x492d1f['@external']['createdAt'])),new hi(this,{'threadId':_0x5ddc78,'id':_0x4228c0,'author':_0x3f09a2||_0x5e593f,'creator':_0x5e593f,'content':_0x4cda7f,'createdAt':_0x504bc8,'authoredAt':_0x20220f,'attributes':_0x492d1f});}['_addComment'](_0x1faf2f){let {threadId:_0x6ee2d2,content:_0x21cf13,attributes:_0x3a462f,isFromAdapter:_0x489fc7}=_0x1faf2f;const _0x24cd68=this['getCommentThread'](_0x1faf2f['threadId']);if(!_0x24cd68)throw new _0xf4a2b6('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2a2167=this['_createNewComment'](_0x1faf2f),{id:_0x27b1c3}=_0x2a2167;if(_0x24cd68['_add'](_0x2a2167),_0x489fc7||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x24cd68['isSubmitted'])return Promise['resolve']();const _0x5d58b1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x140c59}=_0x24cd68,_0x4dbefa=_0x5d58b1['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3a462f||(_0x3a462f={}),this['adapter']['addComment']({'channelId':_0x140c59,'threadId':_0x6ee2d2,'commentId':_0x27b1c3,'content':_0x21cf13,'attributes':_0x3a462f})['then'](_0x86945d=>{_0x5d58b1['remove'](_0x4dbefa),_0x86945d&&this['_updateComment']({'channelId':_0x140c59,'threadId':_0x6ee2d2,'commentId':_0x27b1c3,'createdAt':_0x86945d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x377719=>{throw console['error'](_0x377719),new _0xf4a2b6('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x405737,commentId:_0x5487a7,content:_0x5833b6,createdAt:_0x244cb5,attributes:_0x5f28a7,isFromAdapter:_0x2fc324}){if(void 0x0!==_0x5833b6&&('string'!=typeof _0x5833b6||!_0x5833b6['trim']()['length']))throw new _0xf4a2b6('commentsrepository-update-comment-invalid-content');const _0x46ff89=this['getCommentThread'](_0x405737),_0x5b26c9=_0x46ff89['getComment'](_0x5487a7);if(!_0x5b26c9)throw new _0xf4a2b6('commentsrepository-update-missing-comment',this);let _0x26540b=!0x1;if(_0x5833b6&&_0x5833b6!==_0x5b26c9['content']&&(_0x5b26c9['isEditable']||_0x2fc324)&&(_0x5b26c9['content']=_0x5833b6,_0x26540b=!0x0),_0x244cb5&&_0x244cb5!==_0x5b26c9['createdAt']&&(_0x5b26c9['createdAt']=_0x244cb5,_0x5b26c9['isExternal']||(_0x5b26c9['authoredAt']=_0x244cb5),_0x26540b=!0x0),_0x5f28a7&&!_0x23b053(_0x5f28a7,_0x5b26c9['attributes'])&&(_0x5b26c9['attributes']=_0x5f28a7,_0x26540b=!0x0),!_0x26540b)return Promise['resolve']();if(_0x46ff89['fire']('commentUpdated'),_0x2fc324||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1b93ba=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3f39b7}=this['getCommentThread'](_0x5b26c9['threadId']),_0x130ab9=_0x1b93ba['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3f39b7,'threadId':_0x405737,'commentId':_0x5487a7,'content':_0x5833b6,'attributes':_0x5f28a7})['then'](()=>_0x1b93ba['remove'](_0x130ab9))['catch'](_0x45abfd=>{throw console['error'](_0x45abfd),new _0xf4a2b6('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1093c5,commentId:_0x48bb45,isFromAdapter:_0x4e381f}){const _0x577cb1=this['getCommentThread'](_0x1093c5),_0x53dae0=_0x577cb1['getComment'](_0x48bb45);if(!_0x53dae0)throw new _0xf4a2b6('commentsrepository-remove-missing-comment',this);if(_0x577cb1['_remove'](_0x53dae0),_0x4e381f||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x305c0f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5d6877}=_0x577cb1,_0x4a6742=_0x305c0f['add'](Et(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5d6877,'threadId':_0x1093c5,'commentId':_0x48bb45})['then'](()=>_0x305c0f['remove'](_0x4a6742))['catch'](_0x106c14=>{throw console['error'](_0x106c14),new _0xf4a2b6('commentsrepository-remove-comment-internal-error',this);});}},ri=class extends si{['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x3d1927,_0x199cfc){super();const _0x48a4c4=_0x199cfc['isResolvable'];this['channelId']=_0x199cfc['channelId'],this['id']=_0x199cfc['id'],this['comments']=new _0x476485(),this['_repository']=_0x3d1927,this['_isAttached']=!0x1,this['_isSubmitted']=_0x199cfc['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x3d1927,'_permissions',_0x3d1927,'_readOnlyChannels',()=>_0x3d1927['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x3d1927,'_permissions',()=>_0x3d1927['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x3d1927,'_permissions',()=>{const _0x300c9e=_0x3d1927['getPermissions'](this['channelId']);return _0x300c9e['write']||_0x300c9e['admin'];}),this['bind']('isResolvable')['to'](_0x3d1927,'_permissions',()=>_0x48a4c4&&_0x3d1927['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x199cfc['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x45304b,_0x187a4b)=>_0x45304b?_0x187a4b?_0x45304b<_0x187a4b?_0x45304b:_0x187a4b:_0x45304b:_0x187a4b),this['set']('unlinkedAt',_0x199cfc['unlinkedAt']||null),this['set']('resolvedAt',_0x199cfc['resolvedAt']||null),this['set']('resolvedBy',_0x199cfc['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x46a2db=>!!_0x46a2db),this['set']('attributes',_0x199cfc['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x3ab9b1,_0x29697c)=>_0x3ab9b1+_0x29697c['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x17d43e,id:_0xe5682f}=this;this['_repository']['fire'](ai('submitCommentThread',_0x17d43e),{'channelId':_0x17d43e,'threadId':_0xe5682f});}['setUnlinkedAt'](_0x49ca3c){this['_update']({'unlinkedAt':_0x49ca3c});}['resolve']({resolvedAt:_0x549fcf=new Date(),resolvedBy:_0x38fa81='',isFromAdapter:_0x4cd2a9=!0x1}={}){const _0x5b65d6=this['_repository']['context']['plugins']['get'](_0x599743)['me'],{channelId:_0x2a8126,id:_0x194b6f}=this;this['_repository']['fire'](ai('resolveCommentThread',_0x2a8126),{'channelId':_0x2a8126,'threadId':_0x194b6f,'resolvedAt':_0x549fcf,'resolvedBy':_0x38fa81||_0x5b65d6['id'],'isFromAdapter':_0x4cd2a9});}['reopen']({isFromAdapter:_0x9063fc=!0x1}={}){const {channelId:_0x52f602,id:_0x15eb42}=this;this['_repository']['fire'](ai('reopenCommentThread',_0x52f602),{'channelId':_0x52f602,'threadId':_0x15eb42,'isFromAdapter':_0x9063fc});}['setContext'](_0x44c189){this['context']||this['_update']({'context':_0x44c189});}['setAttribute'](_0x30c2f6,_0x50479c){const _0x3030fd=_0x36cfaf(this['attributes']);_0x4097c1(_0x3030fd,_0x30c2f6,_0x50479c),this['_update']({'attributes':_0x3030fd});}['removeAttribute'](_0x51c859){const _0x8ba34=_0x36cfaf(this['attributes']);_0x5a6d71(_0x8ba34,_0x51c859),this['_update']({'attributes':_0x8ba34});}['remove']({isFromAdapter:_0x42c90b=!0x1}={}){const {channelId:_0x488e09,id:_0x529f35}=this;this['_repository']['fire'](ai('removeCommentThread',_0x488e09),{'channelId':_0x488e09,'threadId':_0x529f35,'isFromAdapter':_0x42c90b});}['attachTo'](_0x145cdb){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x145cdb});}['addComment'](_0x3cc667){const {channelId:_0x5df916,id:_0x372f7f}=this;this['_repository']['fire'](ai('addComment',_0x5df916,_0x372f7f),Object['assign']({'channelId':_0x5df916,'threadId':_0x372f7f},_0x3cc667));}['getComment'](_0xbfb18d){if('string'!=typeof _0xbfb18d)throw new _0xf4a2b6('commentsrepository-get-comment-invalid-id',null,{'commentId':_0xbfb18d});return this['comments']['get'](_0xbfb18d);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x1fc9c7=>_0x1fc9c7['toJSON']()),'attributes':this['attributes']};}['_add'](_0xe64be4){return this['listenTo'](_0xe64be4,'change:authoredAt',()=>{const _0x286f8c=this['_findOptimalIndex'](_0xe64be4),_0x3827db=this['comments'];_0x286f8c-0x1!=_0x3827db['getIndex'](_0xe64be4)&&_0x286f8c+0x1!=_0x3827db['getIndex'](_0xe64be4)&&(this['_remove'](_0xe64be4),this['_add'](_0xe64be4));}),this['comments']['add'](_0xe64be4,this['_findOptimalIndex'](_0xe64be4));}['_update'](_0x3ba0b2){const {channelId:_0x5b1677,id:_0x33964e}=this;this['_repository']['fire'](ai('updateCommentThread',_0x5b1677),{..._0x3ba0b2,'channelId':_0x5b1677,'threadId':_0x33964e});}['_remove'](_0x2c7b83){return this['stopListening'](_0x2c7b83),_0x2c7b83['destroy'](),this['comments']['remove'](_0x2c7b83);}['_findOptimalIndex'](_0x1c2cea){const _0xdfd285=this['comments']['find'](_0x209800=>new Date(_0x209800['authoredAt'])['getTime']()>new Date(_0x1c2cea['authoredAt'])['getTime']());return _0xdfd285?this['comments']['getIndex'](_0xdfd285):this['length'];}},hi=class extends ni{['id'];['threadId'];['author'];['creator'];['createdAt'];['_repository'];constructor(_0x4fe4fd,_0x4e58c4){super();const _0x13a4dc=_0x4fe4fd['context']['plugins']['get'](_0x599743)['me'],_0x4d77b1=_0x4fe4fd['getCommentThread'](_0x4e58c4['threadId']),_0x2aa359=0x0===_0x4d77b1['comments']['length'],_0x2e43c5=_0x13a4dc===_0x4e58c4['author'];this['id']=_0x4e58c4['id'],this['threadId']=_0x4e58c4['threadId'],this['author']=_0x4e58c4['author'],this['creator']=_0x4e58c4['creator'],this['set']('content',_0x4e58c4['content']),this['createdAt']=_0x4e58c4['createdAt']||new Date(),this['set']('authoredAt',_0x4e58c4['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4d77b1,'resolvedAt'),this['set']('attributes',_0x4e58c4['attributes']||{}),this['bind']('isEditable')['to'](_0x4fe4fd,'_permissions',()=>{const _0x648c6b=_0x4fe4fd['getPermissions'](_0x4d77b1['channelId'])['write'],_0x57e18a=_0x4fe4fd['getPermissions'](_0x4d77b1['channelId'])['modifyAll'];return _0x2e43c5&&_0x648c6b||!_0x2e43c5&&_0x57e18a;}),this['bind']('isRemovable')['to'](_0x4d77b1,'isRemovable',_0x4fe4fd,'_permissions',_0x55dc45=>{const _0x1df817=_0x4fe4fd['getPermissions'](_0x4d77b1['channelId'])['write'],_0x4e927f=_0x4fe4fd['getPermissions'](_0x4d77b1['channelId'])['modifyAll'];return _0x2e43c5&&_0x1df817||_0x55dc45&&_0x2aa359||!_0x2e43c5&&_0x4e927f&&!_0x2aa359;}),this['bind']('isReadOnly')['to'](_0x4d77b1,'isReadOnly'),this['_repository']=_0x4fe4fd;}get['isExternal'](){return Boolean(this['attributes']&&this['attributes']['@external']);}get['weight'](){return Math['max'](function(_0x8a50c5){const _0x350b06=document['createElement']('div');return _0x350b06['innerHTML']=_0x8a50c5,_0x350b06['textContent']['length'];}(this['content']),0xc8);}['update'](_0x589458){const {threadId:_0x58e65d,id:_0x472209}=this;if(!this['_repository']['hasCommentThread'](_0x58e65d))throw new _0xf4a2b6('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x56035e}=this['_repository']['getCommentThread'](_0x58e65d);this['_repository']['fire'](ai('updateComment',_0x56035e,_0x58e65d),{'channelId':_0x56035e,'threadId':_0x58e65d,'commentId':_0x472209,..._0x589458});}['setAttribute'](_0x15f1ac,_0x4d598a){const _0x354771=_0x36cfaf(this['attributes']);_0x4097c1(_0x354771,_0x15f1ac,_0x4d598a),this['update']({'attributes':_0x354771});}['removeAttribute'](_0x410bfc){const _0x25c14f=_0x36cfaf(this['attributes']);_0x5a6d71(_0x25c14f,_0x410bfc),this['update']({'attributes':_0x25c14f});}['remove'](_0x42c0be={}){if(!_0x42c0be['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x403ecf,id:_0x3f840d}=this;if(!this['_repository']['hasCommentThread'](_0x403ecf))throw new _0xf4a2b6('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x48655d}=this['_repository']['getCommentThread'](_0x403ecf);this['_repository']['fire'](ai('removeComment',_0x48655d,_0x403ecf),{'channelId':_0x48655d,'threadId':_0x403ecf,'commentId':_0x3f840d,..._0x42c0be});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}};function ai(_0x24d37d,..._0x14e733){for(const _0x15e395 of _0x14e733)void 0x0!==_0x15e395&&(_0x24d37d+=':'+String(_0x15e395));return _0x24d37d;}var ci=class extends _0x3dff44{constructor(_0xa630bd){super(_0xa630bd),this['set']('hasContent',!0x1);}['refresh'](){const _0x3ad6e6=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3c1a32 of _0x3ad6e6['getRanges']())if(this['_hasContent'](_0x3c1a32))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x57498e=_0x4e0aef(),ranges:_0x10ed9e,comment:_0x43c044}={}){const _0x57aeab=this['editor']['model'],_0x52a591=_0x10ed9e??Array['from'](_0x57aeab['document']['selection']['getRanges']()),_0x1d9235=[];for(const _0x1406d2 of _0x52a591)this['_hasContent'](_0x1406d2)&&_0x1d9235['push'](this['_trimToContent'](_0x1406d2));if(!_0x1d9235['length'])throw new _0xf4a2b6('addcommentthreadcommand-incorrect-ranges',null);_0x43c044&&this['_createCommentThread'](_0x57498e,_0x43c044),this['_createMarkersFromRanges'](_0x57498e,_0x1d9235,!!_0x43c044);}['_createMarkersFromRanges'](_0x264fe5,_0x3b4560,_0x441a65){this['editor']['model']['change'](_0x1e7d4b=>{for(const _0x32394f of _0x3b4560){const _0x37cfde='comment:'+_0x264fe5+':'+_0x4e0aef()['substr'](0x1,0x5);_0x1e7d4b['addMarker'](_0x37cfde,{'range':_0x32394f,'usingOperation':_0x441a65,'affectsData':_0x441a65});}});}['_createCommentThread'](_0x1ac40a,_0x121aa5){const _0x5b3665=this['editor']['plugins']['get']('CommentsRepository'),_0x566306=this['editor']['config']['get']('collaboration.channelId'),_0x185e95=this['editor']['plugins']['get']('Users')['me'];if(!_0x185e95)throw new _0xf4a2b6('addcommentthreadcommand-user-not-found',null);_0x5b3665['addCommentThread']({'threadId':_0x1ac40a,'channelId':_0x566306,'comments':[{'authorId':_0x185e95['id'],'content':_0x121aa5,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x40b3ba){for(const _0x51557f of _0x40b3ba['getItems']())if(this['_itemIsContent'](_0x51557f))return!0x0;return!0x1;}['_itemIsContent'](_0x1beb02){return _0x1beb02['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1beb02)&&!_0x1beb02['is']('element','tableCell');}['_trimToContent'](_0x33faca){const _0x333416=_0x274064=>!this['_itemIsContent'](_0x274064['item']),_0x30f5ab=_0x33faca['start']['getLastMatchingPosition'](_0x333416),_0x20e8cd=_0x33faca['end']['getLastMatchingPosition'](_0x333416,{'direction':'backward'});return this['editor']['model']['createRange'](_0x30f5ab,_0x20e8cd);}},di=class extends _0x49d365{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[ti];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x355d96){super(_0x355d96),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x7953b1=this['editor'],_0x33020f=_0x7953b1['model']['document']['selection'],_0x2b3939=_0x2e8ec0(()=>this['refreshSelectedViews'](),0xa);_0x33020f['on']('change:range',(_0x123431,_0x950be1)=>{_0x950be1['directChange']&&(_0x2b3939['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x7953b1['editing']['view']['document'],'change:isFocused',(_0x186d99,_0x434807,_0x3b0a61)=>{_0x3b0a61&&_0x2b3939();}),this['listenTo'](_0x7953b1['ui']['focusTracker'],'change:isFocused',(_0xe10e8,_0x4365e9,_0x50f8e6)=>{_0x50f8e6||this['fire']('blur',{'isAnnotationTracked':_0x5cc201=>this['_editorAnnotationsData']['has'](_0x5cc201['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x4da62a){if(this['_editorAnnotations']['has'](_0x4da62a['view']))return;this['_editorAnnotations']['add'](_0x4da62a['view']),this['editor']['ui']['focusTracker']['add'](_0x4da62a['view']['element']);const _0x1c800a=this['editor']['plugins']['get'](ti);this['listenTo'](_0x1c800a['collection'],'remove',(_0x481721,_0x5a7615)=>{this['editor']['ui']['focusTracker']['remove'](_0x5a7615['view']['element']),this['_editorAnnotations']['delete'](_0x5a7615['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1a60ae){if('function'!=typeof _0x1a60ae)throw new _0xf4a2b6('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1a60ae);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4f470b,annotations:_0x3c754d}){const _0x33f711=[],_0x1a7623=this['editor']['model']['document']['selection'],_0x21edfe=Array['from'](_0x1a7623['getRanges']());for(const [_0x502681,_0xffaa15]of this['_editorAnnotationsData']){const _0x3a2860=_0x6626f2(_0xffaa15),_0x28b18b=_0x3c754d['getByInnerView'](_0x502681);_0x3a2860&&_0x28b18b&&_0x33f711['push']({'annotation':_0x28b18b,'range':_0x3a2860});}function _0x6626f2(_0x3eed34){for(const _0x52bfe3 of _0x3eed34)for(const _0x535791 of _0x21edfe)if(_0x52bfe3['containsRange'](_0x535791,!_0x1a7623['isCollapsed']))return _0x52bfe3;return null;}return _0x33f711['sort']((_0x5cdaf1,_0xc122c9)=>{const _0x37dd4f=_0x5cdaf1['range'],_0x1d51b2=_0xc122c9['range'];if(!_0x37dd4f['isEqual'](_0x1d51b2)){if(_0x37dd4f['containsRange'](_0x1d51b2,!0x0))return 0x1;if(_0x1d51b2['containsRange'](_0x37dd4f,!0x0))return-0x1;}return _0x5cdaf1['annotation']==_0x4f470b?-0x1:_0xc122c9['annotation']==_0x4f470b?0x1:0x0;})['map'](_0x252678=>_0x252678['annotation']);}get['_editorAnnotationsData'](){const _0x171738=new Map();for(const _0x5caa2b of Array['from'](this['_dataCollectors']))for(const [_0x119c1e,_0x41cdff]of _0x5caa2b())_0x171738['set'](_0x119c1e,_0x41cdff);return _0x171738;}},li=class extends _0x49d365{['afterInit'](){const _0x384a4e=this['editor'];_0x384a4e['plugins']['has']('RestrictedEditingModeEditing')&&_0x384a4e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}},mi=class extends _0x49d365{constructor(_0x4d2f5d){super(_0x4d2f5d),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2aa77f=this['editor'],_0x534d2e=_0x2aa77f['commands']['get']('importWord'),_0x338f7d=_0x2aa77f['plugins']['get'](_0x599743);_0x534d2e&&(_0x534d2e['on']('execute',(_0x34dbe6,[,_0x351915])=>{_0x351915['collaboration_features']={'comments':!0x0,'user_id':_0x338f7d['me']['id']};},{'priority':_0x3152ea['high']+0xa}),this['listenTo'](_0x534d2e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x8bf893,_0x1fdc01){const {comment_threads:_0x168af1}=_0x1fdc01;_0x168af1&&_0x168af1['forEach'](({thread_id:_0x30d9f0,comments:_0x567cae,is_resolved:_0x279eaa})=>{const _0x2210c4=new Date(),_0x37eecb=_0x567cae['map'](({author:_0x57ef93,content:_0xc730a4,created_at:_0x3e04ba})=>({'content':_0xc730a4,'authorId':this['editor']['plugins']['get'](_0x599743)['me']['id'],'createdAt':_0x2210c4,'attributes':{'@external':{'authorName':_0x57ef93,'createdAt':_0x3e04ba?new Date(_0x3e04ba):new Date(),'source':'importWord'}}})),_0x2c21a9=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](oi)['addCommentThread']({'channelId':_0x2c21a9,'threadId':_0x30d9f0,'comments':_0x37eecb,'resolvedAt':_0x279eaa?_0x2210c4:null});});}},ui=class extends _0x49d365{constructor(_0x1f5d4a){super(_0x1f5d4a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[pt,wt];}['afterInit'](){const _0x57c384=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x57c384,'contentInsertion',(_0x10a05b,_0x53f89f)=>this['_removeMarkersWithoutThreads'](_0x53f89f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x445537){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x445537;const _0x341a37=this['editor']['plugins']['get']('CommentsRepository');for(const _0x24675b of _0x445537['keys']()){const [_0x1c8d56,_0x1f8e74]=_0x24675b['split'](':');'comment'!=_0x1c8d56||_0x341a37['hasCommentThread'](_0x1f8e74)||_0x445537['delete'](_0x24675b);}return _0x445537;}['_registerMarkerInClipboardPipeline'](){const _0x1d70ef=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x516103=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x516103&&_0x1d70ef['_registerMarkerToCopy']('comment',_0x516103);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x450d60){switch(_0x450d60){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}};function fi(_0x56e3db){const _0x308618=_0x56e3db['split'](':');return{'group':_0x308618[0x0],'id':_0x308618[0x1],'part':_0x308618[0x2]};}var pi=class extends _0x49d365{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0xaff9f0,_0x52cb0e)=>{if(!_0x52cb0e['options']['showCommentHighlights'])return null;if(_0x52cb0e['options']['ignoreResolvedComments']){const {id:_0x4ad1ef}=fi(_0xaff9f0['markerName']);if(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x4ad1ef)?.['isResolved']&&_0xaff9f0['item'])return _0x52cb0e['consumable']['consume'](_0xaff9f0['item'],'addMarker:'+_0xaff9f0['markerName']),_0x52cb0e['consumable']['consume'](_0xaff9f0['item'],'removeMarker:'+_0xaff9f0['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2714df=>{_0x2714df['on']('addMarker:comment',(_0x354b82,_0x2c118d,_0x120d8d)=>{if(!_0x120d8d['options']['showCommentHighlights'])return;const _0xfab983=_0x2c118d['item'];if(!_0xfab983)return;const _0x1b81fb=_0x120d8d['mapper']['toViewElement'](_0xfab983);this['editor']['model']['schema']['isObject'](_0xfab983)&&_0x1b81fb&&!_0x1b81fb['getCustomProperty']('widget')&&_0x1b81fb['is']('containerElement')&&Ct(_0x1b81fb,_0x120d8d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x57e184,{writer:_0x207615,options:_0x3c15d4})=>{if(!_0x3c15d4['showCommentHighlights'])return null;const _0x50f720=_0x207615['createContainerElement']('div'),_0xf008d9=_0x207615['createEmptyElement']('hr');return _0x207615['addClass']('ck-horizontal-line',_0x50f720),_0x207615['insert'](_0x207615['createPositionAt'](_0x50f720,0x0),_0xf008d9),_0x50f720;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x128dcd,{writer:_0x2552f9,options:_0x168935})=>{if(!_0x168935['showCommentHighlights'])return null;const _0xdda4e6=_0x2552f9['createContainerElement']('span'),_0x5484fd=_0x2552f9['createEmptyElement']('img');return _0x2552f9['addClass']('image-inline',_0xdda4e6),_0x2552f9['insert'](_0x2552f9['createPositionAt'](_0xdda4e6,0x0),_0x5484fd),_0xdda4e6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x357910,{writer:_0x1ab528,options:_0x5d39bb})=>{if(_0x5d39bb['showCommentHighlights'])return _0x1ab528['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1c3c92,_0x3e1069,_0xb93245)=>{_0xb93245['options']['showCommentHighlights']&&_0x1c3c92['stop']();},{'priority':'high'});}},wi=class extends _0x49d365{static get['requires'](){return[oi,di,_0x599743,li,mi,ui,pi];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x69ac60){super(_0x69ac60),this['set']('isThreadsLoadingPaused',!0x0),_0x69ac60['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0xdc3dc7,_0x5a0f5f,_0x4eb785,_0x1c9f9c)=>{const _0x4f2b14=_0x69ac60['plugins']['get'](oi),_0x582cc3=_0x4eb785?fi(_0x4eb785)['id']:null;_0x69ac60['model']['change'](()=>{if(_0x582cc3){const _0x48bf21=this['getAllMarkersForId'](_0x582cc3);for(const _0x509e62 of _0x48bf21)_0x69ac60['editing']['reconvertMarker'](_0x509e62);}if(_0x1c9f9c){const {id:_0x52ea8c}=fi(_0x1c9f9c),_0x411238=_0x4f2b14['getCommentThread'](_0x52ea8c);if(_0x411238&&_0x411238['unlinkedAt'])return;if(_0x411238&&!_0x411238['isAttached'])return;const _0x108079=this['getAllMarkersForId'](_0x52ea8c);for(const _0x3bf13a of _0x108079)_0x69ac60['editing']['reconvertMarker'](_0x3bf13a);}}),_0x582cc3&&this['scrollToThreadMarker'](_0x582cc3);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x40bed3=this['editor'],_0x91fd44=_0x40bed3['plugins']['get'](oi),_0x4be5b6=_0x40bed3['config']['get']('collaboration.channelId'),_0x4d8413=_0x91fd44['getCommentThreads']()['filter'](_0x404859=>_0x404859['channelId']!==_0x4be5b6);_0x40bed3['commands']['add']('addCommentThread',new ci(_0x40bed3)),this['listenTo'](_0x40bed3,'change:isReadOnly',(_0x2b6191,_0xa5037b,_0x47b362)=>{_0x91fd44['switchReadOnly'](_0x47b362,_0x40bed3['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x91fd44,gi('addCommentThread',_0x4be5b6),(_0x3e9642,{threadId:_0x416fab})=>{this['editor']['plugins']['get'](oi)['getCommentThread'](_0x416fab)?.['unlinkedAt']&&this['_attachArchivedThread'](_0x416fab);}),this['listenTo'](_0x91fd44,gi('removeCommentThread',_0x4be5b6),(_0x5668d2,{threadId:_0x1ee129})=>{_0x40bed3['model']['enqueueChange']({'isUndoable':!0x1},_0x21974e=>{const _0x63104d=this['getAllMarkersForId'](_0x1ee129);for(const _0x58f92e of _0x63104d)_0x21974e['removeMarker'](_0x58f92e);});}),this['listenTo'](_0x91fd44,gi('resolveCommentThread',_0x4be5b6),(_0x4d2a40,{threadId:_0x51efac})=>{this['_reconvertMarkers'](_0x51efac);const _0x9ef9b1=this['editor']['plugins']['get'](ti);(this['editor']['editing']['view']['hasDomSelection']||_0x9ef9b1['collection']['isFocused'])&&(this['editor']['plugins']['get'](oi)['getCommentThread'](_0x51efac)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x91fd44,gi('reopenCommentThread',_0x4be5b6),(_0x488a95,{threadId:_0xdaf72f})=>{this['_reconvertMarkers'](_0xdaf72f);},{'priority':'low'}),this['listenTo'](_0x91fd44,gi('addComment',_0x4be5b6),(_0x34d7bf,{threadId:_0x3d6261,isFromAdapter:_0x2faa9f})=>{const _0x5af37a=this['getAllMarkersForId'](_0x3d6261);!_0x2faa9f&&0x0!=_0x5af37a['length']&&_0x91fd44['hasCommentThread'](_0x3d6261)&&0x1===_0x91fd44['getCommentThread'](_0x3d6261)['length']&&_0x40bed3['model']['enqueueChange']({'isUndoable':!0x1},_0x34cb16=>{for(const _0x356acd of _0x5af37a)_0x34cb16['updateMarker'](_0x356acd,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4d8413);}['afterInit'](){!async function(_0x4eb5cd){const _0x121308='KpOBJGNSEgqCyfVF1kZ8lbnRjM7eIzAsDQHw9aThu6rcYi05UmPL4d3X2Wotvx',_0x3f2657=0x78de0,_0x5a95f9=window['Date']['now'](),_0x55c476=_0x4eb5cd['editor'],_0x355a05=new window['Promise'](_0x1b798a=>{_0x55c476['once']('ready',_0x1b798a);}),_0x5b17b1={'kty':'EC','use':'sig','crv':'P-256','x':'iCjOCvDFI6lQHHT18jVwRfkfHQ2a_MymT35LQVoFSAI','y':'kXIyJ4evtCEFRmxKSUpK9fDW459vXOvVrhf6uQAeOio','alg':'ES256'},_0x3675aa=_0x55c476['config']['get']('licenseKey');async function _0x52ccce(){let _0x521d09,_0x13dacf=null,_0x43a0b7=null;try{return'GPL'==_0x3675aa?'NotAllowed':(_0x521d09=_0xefb3c8(),_0x521d09?(_0x521d09['usageEndpoint']&&(_0x43a0b7=_0x2a9f66(_0x521d09['usageEndpoint'],_0x521d09['jti'])),await _0x50bf88()?_0x25b8b1()?_0x128c92()?'Expired':_0x2164cf()?('evaluation'==_0x521d09['licenseType']&&(_0x13dacf=_0x5be640('EvaluationLimit')),await _0x880da8()):'DomainLimit':'NotAllowed':'Invalid'):'Invalid');}catch{return'Invalid';}function _0x128c92(){const _0x3b82be=['evaluation','trial']['includes'](_0x521d09['licenseType'])?_0x5a95f9/0x3e8:0xe10*_0x3f2657;return _0x521d09['exp']<_0x3b82be;}function _0x25b8b1(){const _0x5ecbc5=_0x521d09['features'];if(!_0x5ecbc5)return!0x1;if(_0x5ecbc5['includes']('*'))return!0x0;if(_0x5ecbc5['includes']('CMT'))return!0x0;if(_0x5ecbc5['includes']('TRILIUM')&&_0x192c9b())return!0x0;if(_0x5ecbc5['includes']('RCMT')){if(_0x1872c6())return!0x0;if(_0x53c749()||_0x4e81f7())return!0x0;}return!0x1;}function _0x2164cf(){const _0x55de39=_0x521d09['licensedHosts'];if(!_0x55de39||0x0==_0x55de39['length'])return!0x0;const {hostname:_0x26add9}=new URL(window['location']['href']);if(_0x55de39['includes'](_0x26add9))return!0x0;const _0x5db2b5=_0x26add9['split']('.');return _0x55de39['filter'](_0xbc26ab=>_0xbc26ab['includes']('*'))['map'](_0x44219b=>_0x44219b['split']('.'))['filter'](_0x47159c=>_0x47159c['length']<=_0x5db2b5['length'])['map'](_0x5dd346=>Array(_0x5db2b5['length']-_0x5dd346['length'])['fill']('*'===_0x5dd346[0x0]?'*':'')['concat'](_0x5dd346))['some'](_0x3a5a63=>_0x5db2b5['every']((_0x332097,_0x3b5f61)=>_0x3a5a63[_0x3b5f61]===_0x332097||'*'===_0x3a5a63[_0x3b5f61]));}function _0x880da8(){return _0x13dacf&&_0x43a0b7?new window['Promise']((_0x5594dd,_0x564161)=>{_0x13dacf['then'](_0x5594dd,_0x564161),_0x43a0b7['then'](_0x28fb59=>{'Valid'!=_0x28fb59&&_0x5594dd(_0x28fb59);},_0x564161);}):_0x13dacf||_0x43a0b7||'Valid';}}function _0x2a9f66(_0x369695,_0x36d56d){return new window['Promise'](_0x2bddcb=>{if(_0x57300f())return _0x2bddcb('Valid');_0x5d0b58(),_0x55c476['decorate']('_sendUsageRequest');let _0x13f081=!0x1;const _0x1d3be8=_0x4e0aef();function _0x589a8f(_0x4c4ec1){return!!_0x4c4ec1&&('object'==typeof _0x4c4ec1||'function'==typeof _0x4c4ec1)&&'function'==typeof _0x4c4ec1['then']&&'function'==typeof _0x4c4ec1['catch'];}function _0x2421c5(_0x580c12){_0x51a38a(_0x580c12)['then'](_0xe15488=>_0xe15488&&'ok'==_0xe15488['status']?_0x553f3d(_0x540039(_0x1d3be8+_0x36d56d))!=_0xe15488['verification']?'UsageLimit':'Valid':'UsageLimit')['then'](_0x349169=>(_0x54bed3(),_0x349169),()=>{const _0x457b5c=_0x26f460();return null==_0x457b5c?(_0x54bed3(),'Valid'):_0x5a95f9-_0x457b5c>0x240c8400?'UsageLimit':'Valid';})['then'](_0x2bddcb)['catch'](()=>{_0x2bddcb('UsageLimit');});const _0x2f1cf9=0x36ee80;function _0x54bed3(){const _0x3a3422='llct-'+_0x553f3d(_0x540039(_0x369695)),_0x4d958a=_0x490d7d(_0x553f3d(window['Math']['ceil'](_0x5a95f9/_0x2f1cf9)));window['localStorage']['setItem'](_0x3a3422,_0x4d958a);}function _0x26f460(){const _0x3d7721='llct-'+_0x553f3d(_0x540039(_0x369695)),_0x4227de=window['localStorage']['getItem'](_0x3d7721);return _0x4227de?window['parseInt'](_0x490d7d(_0x4227de),0x10)*_0x2f1cf9:null;}function _0x51a38a(_0x5dfc2b){return new window['Promise']((_0x12fcea,_0x169f15)=>{_0x5dfc2b['then'](_0x12fcea,_0x169f15),window['setTimeout'](_0x169f15,0x1d4c0);});}}_0x55c476['on']('_sendUsageRequest',(_0x13b21b,_0x4e7d22)=>{if(_0x4e7d22[0x0]!=_0x369695)return _0x2bddcb('UsageLimit');_0x4e7d22[0x1]={..._0x4e7d22[0x1],'requestId':_0x1d3be8};},{'priority':'high'}),_0x55c476['on']('_sendUsageRequest',_0x4989b6=>{_0x589a8f(_0x4989b6['return'])&&(_0x13f081=!0x0,_0x2421c5(_0x4989b6['return']));},{'priority':'low'}),_0x355a05['then'](()=>{_0x13f081||_0x2bddcb('UsageLimit');});});function _0x57300f(){return'auto'==_0x55c476['editing']['view']['_overlayModeHint'];}function _0x5d0b58(){_0x55c476['editing']['view']['_overlayModeHint']='auto';}}function _0x5be640(_0x26f963){const _0xdb9949=[new window['Promise'](_0x2b4385=>setTimeout(_0x2b4385,0x93ecc)),_0x355a05['then'](()=>new window['Promise'](_0x191568=>{let _0x9aa7de=0x0;_0x55c476['model']['on']('applyOperation',(_0x26f7bc,_0x55729a)=>{_0x55729a[0x0]['isDocumentOperation']&&_0x9aa7de++,0x5e8==_0x9aa7de&&(_0x191568(),_0x26f7bc['off']());});}))];return window['Promise']['race'](_0xdb9949)['then'](()=>_0x26f963);}async function _0x3171c2(){await _0x355a05,_0x55c476['model']['change']=_0x33a9db,_0x55c476['model']['enqueueChange']=_0x33a9db,_0x55c476['enableReadOnlyMode']('model');}function _0x192c9b(){return window['glob']&&window['glob']['triliumVersion'];}function _0x1872c6(){return _0x98a554('WebSocketGateway')&&'connected'==_0x224d84('WebSocketGateway')['state'];}function _0x53c749(){return _0x98a554('RevisionViewerIntegration');}function _0x4e81f7(){return _0x98a554('TrackChangesDataGetter');}function _0x498c2c(_0x251b47){const _0x310d44=_0x59754b();_0x55c476[_0x310d44]='commentsLicenseKey'+_0x251b47,'Valid'!=_0x251b47&&_0x3171c2();}function _0x59754b(){const _0x2f3060=window['String'](window['performance']['now']())['replace']('.','');let _0x2e6241='K';for(let _0x1f1787=0x0;_0x1f1787<_0x2f3060['length'];_0x1f1787+=0x2){let _0x4b676d=window['parseInt'](_0x2f3060['substring'](_0x1f1787,_0x1f1787+0x2));_0x4b676d>=0x3e&&(_0x4b676d-=0x3e),_0x2e6241+=_0x121308[_0x4b676d];}return _0x2e6241;}function _0xefb3c8(){const _0x1a0ae2=_0x3675aa['split']('.');if(0x3!=_0x1a0ae2['length'])return null;return _0x169bd2(_0x1a0ae2[0x1]);function _0x169bd2(_0x10f4b8){const _0x28a461=_0x39f416(_0x10f4b8);return _0x28a461&&_0x5053a8()?_0x28a461:null;function _0x5053a8(){const _0xd891b1=_0x28a461['jti'],_0x5907b5=window['parseInt'](_0xd891b1['substring'](_0xd891b1['length']-0x8),0x10),_0x3c3b5c={..._0x28a461,'jti':_0xd891b1['substring'](0x0,_0xd891b1['length']-0x8)};return delete _0x3c3b5c['vc'],_0x540039(_0x3c3b5c)==_0x5907b5;}}}async function _0x50bf88(){let _0x4f9683=!0x0;try{const [_0x194833,_0x439838,_0x403996]=_0x3675aa['split']('.');return _0x3cfecc(_0x194833),await _0x3a9df8(_0x194833,_0x439838,_0x403996),_0x4f9683;}catch{return!0x1;}function _0x3cfecc(_0x19878e){const _0x11b0fd=_0x39f416(_0x19878e);_0x11b0fd&&'ES256'==_0x11b0fd['alg']||(_0x4f9683=!0x1);}async function _0x3a9df8(_0x59f61a,_0x1e7c47,_0x1a8f7c){const _0x473224=window['Uint8Array']['from'](_0xfa82fc(_0x1a8f7c),_0x305c26=>_0x305c26['charCodeAt'](0x0)),_0x3aabd4=new window['TextEncoder']()['encode'](_0x59f61a+'.'+_0x1e7c47),_0x3cd246=window['crypto']['subtle'];if(!_0x3cd246)return;const _0x87c28b=await _0x3cd246['importKey']('jwk',_0x5b17b1,{'name':'ECDSA','namedCurve':'P-256'},!0x1,['verify']);await _0x3cd246['verify']({'name':'ECDSA','hash':{'name':'SHA-256'}},_0x87c28b,_0x473224,_0x3aabd4)||(_0x4f9683=!0x1);}}function _0x39f416(_0x4cce42){return _0x4cce42['startsWith']('ey')?JSON['parse'](_0xfa82fc(_0x4cce42)):null;}function _0xfa82fc(_0x43ee40){return window['atob'](_0x43ee40['replace'](/-/g,'+')['replace'](/_/g,'/'));}function _0x540039(_0x4814d7){let _0x4a1a4b=0x1505;function _0x56b9db(_0x3d4718){for(let _0xf1045e=0x0;_0xf1045e<_0x3d4718['length'];_0xf1045e++){const _0x5402eb=_0x3d4718['charCodeAt'](_0xf1045e);_0x4a1a4b=(_0x4a1a4b<<0x5)+_0x4a1a4b+_0x5402eb,_0x4a1a4b&=_0x4a1a4b;}}function _0x51c117(_0x367df1){Array['isArray'](_0x367df1)?_0x367df1['forEach'](_0x51c117):_0x367df1&&'object'==typeof _0x367df1?Object['entries'](_0x367df1)['sort']()['forEach'](([_0x45b59c,_0x1cff93])=>{_0x56b9db(_0x45b59c),_0x51c117(_0x1cff93);}):_0x56b9db(window['String'](_0x367df1));}return _0x51c117(_0x4814d7),_0x4a1a4b>>>0x0;}function _0x553f3d(_0x4e3d8f){return _0x4e3d8f['toString'](0x10)['padStart'](0x8,'0');}function _0x490d7d(_0x1df879){return _0x1df879['split']('')['reverse']()['join']('');}function _0x98a554(_0x45b7e8){return _0x55c476['plugins']['has'](_0x45b7e8);}function _0x224d84(_0x50ff08){return _0x55c476['plugins']['get'](_0x50ff08);}function _0x33a9db(){}_0x498c2c(await _0x52ccce());}(this);}['destroy'](){const _0x18bd6c=this['editor']['plugins']['get'](oi),_0x3109e4=this['editor']['config']['get']('collaboration.channelId');for(const _0x409c24 of _0x18bd6c['getCommentThreads']({'channelId':_0x3109e4}))_0x18bd6c['_detachCommentThread'](_0x409c24['id']),_0x18bd6c['_threads']['delete'](_0x409c24['id']);super['destroy']();}['hasMarkerForId'](_0x54ec22){return this['getAllMarkersForId'](_0x54ec22)['length']>0x0;}['getAllMarkersForId'](_0x2a3ce4){const _0x19fe1f=[];for(const _0x39bbbe of this['editor']['model']['markers'])_0x39bbbe['name']['startsWith']('comment:'+_0x2a3ce4)&&_0x19fe1f['push'](_0x39bbbe);return _0x19fe1f;}['scrollToThreadMarker'](_0x4d1be6){setTimeout(()=>{const _0x48efc2=this['_getTargetForId'](_0x4d1be6);_0x48efc2&&this['activeMarker']&&fi(this['activeMarker'])['id']===_0x4d1be6&&_0x30ce45({'target':_0x48efc2[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xc446bf){this['editor']['model']['change'](()=>{for(const _0x20aabd of this['getAllMarkersForId'](_0xc446bf))this['editor']['editing']['reconvertMarker'](_0x20aabd);});}['_attachArchivedThread'](_0xc9fb8a){const _0xff7f32=this['editor']['plugins']['get'](oi),_0x27a1c5=this['editor']['plugins']['get'](di),_0x266910=_0xff7f32['getCommentThread'](_0xc9fb8a);if(!_0x266910['isAttached']){const _0x30cce5=_0x266910['attachTo'](()=>this['_getTargetForId'](_0x266910['id']));_0x27a1c5['registerAnnotation'](_0x30cce5),_0x266910['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x19c363=this['editor'],_0x179621=_0x19c363['plugins']['get'](_0x599743);_0x19c363['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x593424,_0x50fed5)=>{const {id:_0x58a3b7}=fi(_0x593424['markerName']),_0x4917db=_0x19c363['plugins']['get'](oi)['getCommentThread'](_0x58a3b7),_0x5edf6d=this['activeMarker']&&fi(this['activeMarker'])['id']===_0x58a3b7;let _0x1b42d0;if(_0x4917db&&_0x4917db['isResolved']&&!_0x5edf6d&&_0x593424['item'])return _0x50fed5['consumable']['consume'](_0x593424['item'],'addMarker:'+_0x593424['markerName']),_0x50fed5['consumable']['consume'](_0x593424['item'],'removeMarker:'+_0x593424['markerName']),null;const _0x5d357f=['ck-comment-marker'];return _0x5edf6d&&_0x5d357f['push']('ck-comment-marker--active'),_0x1b42d0=_0x4917db?.['length']?_0x4917db['comments']['first']['author']['id']:_0x179621['me']['id'],{'classes':_0x5d357f,'attributes':{'data-comment':_0x58a3b7,'data-author-id':_0x1b42d0}};}}),_0x19c363['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x293ef9,{options:_0x606c3e})=>{if(_0x606c3e['showCommentHighlights'])return null;const _0x80b980=_0x19c363['plugins']['get'](oi),_0xe1ab46=_0x19c363['model']['markers']['get'](_0x293ef9),{id:_0x1aa100,part:_0x3177aa}=fi(_0x293ef9);return _0xe1ab46&&!_0xe1ab46['affectsData']||_0x606c3e['ignoreResolvedComments']&&_0x80b980['getCommentThread'](_0x1aa100)?.['isResolved']?null:{'group':'comment','name':_0x3177aa?_0x1aa100+':'+_0x3177aa:_0x1aa100};}}),_0x19c363['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x34951e,{writer:_0x5672bd})=>_0x5672bd['createElement']('$marker',{'data-name':'comment:'+_0x34951e['getAttribute']('id')})}),_0x19c363['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x1be631=this['editor'],_0x4b666d=_0x1be631['plugins']['get'](oi),_0x497120=new Set(),_0x3fb0a3=new Set();_0x1be631['model']['document']['registerPostFixer'](_0x346c17=>{let _0x88db9c=!0x1;for(const {name:_0x5ff31e,data:_0x3da0a6}of _0x1be631['model']['document']['differ']['getChangedMarkers']()){const {group:_0x17bd04,id:_0x103758}=fi(_0x5ff31e);let _0x591aca=_0x3da0a6['newRange'];if('comment'!==_0x17bd04||!_0x591aca)continue;const _0x398a7d='$graveyard'===_0x591aca['root']['rootName'];_0x398a7d||(_0x591aca=_i(_0x591aca,_0x1be631['model']),!_0x591aca||_0x591aca['isCollapsed']||!_0x3da0a6['newRange']||_0x591aca['isEqual'](_0x3da0a6['newRange']))?_0x1be631['model']['hasContent'](_0x591aca)&&!_0x398a7d?this['isThreadsLoadingPaused']?_0x497120['add'](_0x5ff31e):this['_handleThreadMarker'](_0x5ff31e,_0x103758):(_0x3fb0a3['add'](_0x5ff31e),_0x497120['delete'](_0x5ff31e),_0x346c17['removeMarker'](_0x5ff31e),_0x88db9c=!0x0):(_0x346c17['updateMarker'](_0x5ff31e,{'range':_0x591aca}),_0x88db9c=!0x0);}return _0x88db9c;}),this['on']('change:isThreadsLoadingPaused',(_0x5503c9,_0x4af0bf,_0x2a4364)=>{if(!_0x2a4364&&_0x497120['size'])for(const _0x3048f0 of _0x497120){const {id:_0x9a905f}=fi(_0x3048f0);_0x497120['delete'](_0x3048f0),_0x1be631['model']['markers']['get'](_0x3048f0)&&this['_handleThreadMarker'](_0x3048f0,_0x9a905f);}}),this['listenTo'](_0x1be631['model']['document'],'change',()=>{for(const {name:_0xc3b201,data:{newRange:_0x49b0ed}}of _0x1be631['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2fb764,id:_0x21a6dc}=fi(_0xc3b201);if('comment'!==_0x2fb764)continue;const _0x56061a=_0x4b666d['getCommentThread'](_0x21a6dc),_0x237e31=this['hasMarkerForId'](_0x21a6dc);_0x56061a&&(!_0x56061a['_hasTargetInContent']&&_0x49b0ed&&_0x1be631['editing']['view']['once']('render',()=>{const _0x4c17f2=_0x1be631['plugins']['get'](ti),_0x55b7c3=_0x4b666d['_threadToController']['get'](_0x56061a)['view'];_0x4c17f2['getByInnerView'](_0x55b7c3)['refreshVisibility']();},{'priority':'low'}),_0x56061a['_hasTargetInContent']=_0x237e31||!!_0x49b0ed),_0x49b0ed||(_0x3fb0a3['add'](_0xc3b201),_0x497120['delete'](_0xc3b201));}for(const _0x5f4797 of _0x3fb0a3){const {id:_0x57d76c}=fi(_0x5f4797),_0x13880e=_0x4b666d['getCommentThread'](_0x57d76c);if(_0x497120['delete'](_0x5f4797),!_0x13880e)continue;const _0x4ce86=this['hasMarkerForId'](_0x57d76c);_0x4ce86||_0x13880e['isSubmitted']?_0x4ce86||_0x13880e['unlinkedAt']||_0x13880e['setUnlinkedAt'](new Date()):_0x13880e['remove']();}_0x3fb0a3['clear']();});}['_handleInitialThreads'](_0x203fe3){_0x203fe3['forEach'](_0x252b4b=>{_0x252b4b['unlinkedAt']&&this['_attachArchivedThread'](_0x252b4b['id']);});}['_getTargetForId'](_0x52ca3b){const _0x1f1177=this['editor'],_0x486c01=this['getAllMarkersForId'](_0x52ca3b);return _0x5d06b3(_0x1f1177['editing'],_0x486c01);}['_getTextContext'](_0x5cda98){const _0x2106ab=this['getAllMarkersForId'](_0x5cda98);let _0x2c1a8b='',_0x41c168=!0x1;for(const _0x42a2df of _0x2106ab){const _0x4f1a01=_0x42a2df['getRange']();for(const _0x28d673 of Array['from'](_0x4f1a01['getItems']()))_0x28d673['is']('$textProxy')?(_0x2c1a8b&&_0x41c168&&(_0x2c1a8b+='\x20',_0x41c168=!0x1),_0x2c1a8b+=_0x28d673['data']):_0x41c168=!0x0;_0x41c168=!0x0;}return _0x2c1a8b['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x8f1102,_0x5b8e22){const _0xb22e94=this['editor'],_0x3e280b=_0xb22e94['plugins']['get'](oi);let _0x3a2adf=_0x3e280b['getCommentThread'](_0x5b8e22);const _0x1bb995=_0xb22e94['config']['get']('collaboration.channelId'),_0x1c5131=_0xb22e94['plugins']['get'](di);return _0x3a2adf&&(_0x3a2adf['unlinkedAt']&&_0x3a2adf['setUnlinkedAt'](null),_0x3a2adf['isAttached'])||(this['getAllMarkersForId'](_0x5b8e22)[0x0]['managedUsingOperations']?_0x3e280b['fetchCommentThread']({'channelId':_0x1bb995,'threadId':_0x5b8e22})['then'](_0x50e320=>{if('destroyed'!==_0xb22e94['state']){if(_0x3a2adf=_0x50e320,_0x3a2adf&&!_0x3a2adf['isAttached']){const _0xf21fd5=_0x3a2adf['attachTo'](()=>this['_getTargetForId'](_0x5b8e22));_0x1c5131['registerAnnotation'](_0xf21fd5),_0x3a2adf['isResolved']&&this['_reconvertMarkers'](_0x5b8e22);}else{if(!_0x3a2adf){const _0x45390a=this['getAllMarkersForId'](_0x5b8e22);_0xb22e94['model']['change'](_0x468848=>{for(const _0x327b56 of _0x45390a)_0x468848['removeMarker'](_0x327b56);});}}}}):_0xb22e94['editing']['view']['once']('render',()=>{if(_0x3e280b['getCommentThread'](_0x5b8e22))return;const _0x473c7c=_0xb22e94['plugins']['get'](ti);_0x3a2adf=_0x3e280b['openNewCommentThread']({'channelId':_0x1bb995,'threadId':_0x5b8e22,'target':()=>this['_getTargetForId'](_0x5b8e22),'context':{'type':'text','value':this['_getTextContext'](_0x5b8e22)}});const _0x342a73=_0x3e280b['_threadToController']['get'](_0x3a2adf)['view'],_0x4ede50=_0x473c7c['getByInnerView'](_0x342a73);_0x4ede50&&_0x1c5131['registerAnnotation'](_0x4ede50);},{'priority':'low'})),_0x3a2adf;}['_handleThreadMarker'](_0x2274cc,_0x2c15d0){const _0x3ce8e9=this['_attachMarkerToThread'](_0x2274cc,_0x2c15d0);_0x3ce8e9&&!_0x3ce8e9['context']&&_0x3ce8e9['setContext']({'type':'text','value':this['_getTextContext'](_0x2c15d0)});}['_initAriaMarkerChangeAnnouncements'](){const _0x17a328=this['editor'];_0x29a9ac(_0x17a328['model'],({left:_0x19de21,entered:_0x533193})=>{for(const _0x2264e7 of _0x19de21)if(Ai(_0x2264e7)){_0x17a328['ui']['ariaLiveAnnouncer']['announce'](Et(_0x17a328['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4fc028 of _0x533193)if(Ai(_0x4fc028)){_0x17a328['ui']['ariaLiveAnnouncer']['announce'](Et(_0x17a328['locale'],'ENTER_COMMENT_ANNOUNCEMENT',_0x36733e(_0x201e54)));break;}});}};function gi(_0x2de83a,_0x262747){return _0x262747?_0x2de83a+':'+_0x262747:_0x2de83a;}function _i(_0x166b6c,_0x4bd79c){const _0x414ca9=_0x4bd79c['schema'],_0x2d2e7c=_0x4bd79c['createRange'](_0x166b6c['start']);for(const _0x198d89 of _0x166b6c['getWalker']()){const {type:_0x134429,item:_0x551053,nextPosition:_0x1317e1}=_0x198d89;if('text'===_0x134429||_0x414ca9['isObject'](_0x551053)){const _0x33a2a3=_0x4bd79c['createPositionBefore'](_0x551053);_0x2d2e7c['isCollapsed']&&(_0x2d2e7c['start']=_0x33a2a3),_0x2d2e7c['end']=_0x1317e1;}}return _0x2d2e7c;}function Ai(_0x5f2c3a){return'comment'===fi(_0x5f2c3a['name'])['group'];}var vi=class extends _0x49d365{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,wi,di,ti];}get['CommentsListView'](){return Lt;}get['CommentThreadInputView'](){return xt;}['init'](){const _0x5ee28c=this['editor'],_0x31297a=_0x5ee28c['plugins']['get'](oi),_0x1815a7=_0x5ee28c['plugins']['get'](wi),_0x501ad6=_0x5ee28c['plugins']['get'](ti),_0x59d1e2=_0x5ee28c['plugins']['get'](di);_0x5ee28c['ui']['componentFactory']['add']('comment',()=>{const _0x26a1e4=this['_createUIButton'](_0x465f26);return _0x26a1e4['tooltip']=!0x0,_0x26a1e4;}),_0x5ee28c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](rt)),_0x59d1e2['addSourceCollector'](()=>{const _0x1b38a2=[];for(const [_0x116dac,_0x577799]of _0x31297a['_threadToController']){const _0x55841e=_0x1815a7['getAllMarkersForId'](_0x116dac['id']),_0x200483=_0x55841e['map'](_0x358788=>_0x358788['getRange']());_0x55841e['length']>0x0&&_0x1b38a2['push']([_0x577799['view'],_0x200483]);}return _0x1b38a2;}),this['listenTo'](_0x501ad6,'change:activeAnnotations',(_0x3d0195,_0x56e490,_0x3e5d26)=>{const _0x3c6e06=Array['from'](_0x3e5d26)['map'](_0x317b5c=>_0x317b5c['innerView'])['find'](_0x41005d=>_0x31297a['_viewToController']['has'](_0x41005d));if(!_0x3c6e06)return void(_0x1815a7['activeMarker']=null);const _0x16236c=_0x31297a['_viewToController']['get'](_0x3c6e06)['model']['id'],_0xb984b2='comment:'+_0x16236c;_0x16236c&&_0x1815a7['hasMarkerForId'](_0x16236c)?_0x1815a7['activeMarker']=_0xb984b2:_0x1815a7['activeMarker']&&(_0x1815a7['activeMarker']=null);}),this['listenTo'](_0x31297a,'removeCommentThread',(_0x382742,{threadId:_0xe78f55,isFromAdapter:_0xe9d82e})=>{!_0xe9d82e&&_0x5ee28c['ui']['focusTracker']['isFocused']&&_0x1815a7['hasMarkerForId'](_0xe78f55)&&_0x5ee28c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x31297a,'addComment',(_0x4185ac,{threadId:_0x3f0657,isFromAdapter:_0x457dc2})=>{!_0x457dc2&&_0x1815a7['hasMarkerForId'](_0x3f0657)&&_0x31297a['hasCommentThread'](_0x3f0657)&&0x1===_0x31297a['getCommentThread'](_0x3f0657)['length']&&(_0x5ee28c['editing']['view']['focus'](),_0x4185ac['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x7f49e4=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x49e8c8;for(const _0x4227d8 in _0x7f49e4){const _0x48be51=_0x4227d8,_0x2e1481=_0x7f49e4[_0x48be51];if('commentsLicenseKeyValid'==_0x2e1481||'commentsLicenseKeyInvalid'==_0x2e1481||'commentsLicenseKeyExpired'==_0x2e1481||'commentsLicenseKeyDomainLimit'==_0x2e1481||'commentsLicenseKeyNotAllowed'==_0x2e1481||'commentsLicenseKeyEvaluationLimit'==_0x2e1481||'commentsLicenseKeyUsageLimit'==_0x2e1481){delete _0x7f49e4[_0x48be51],_0x49e8c8=_0x2e1481,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x49e8c8&&_0x7f49e4['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x49e8c8&&_0x7f49e4['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x49e8c8&&_0x7f49e4['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x49e8c8&&_0x7f49e4['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x49e8c8&&_0x7f49e4['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x49e8c8&&_0x7f49e4['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x42d31e){const _0x1031de=this['editor'],_0x318de1=new _0x42d31e(_0x1031de['locale']),_0x5a1218=_0x1031de['commands']['get']('addCommentThread');return _0x318de1['set']({'label':Et(_0x1031de['locale'],'Comment'),'icon':_0x15d386}),_0x318de1['bind']('isEnabled')['to'](_0x5a1218,'isEnabled',_0x5a1218,'hasContent',(_0x1cdc1b,_0x568884)=>_0x1cdc1b&&_0x568884),this['listenTo'](_0x318de1,'execute',()=>{_0x5a1218['execute']();}),_0x318de1;}},yi=class extends _0x49d365{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[wi];}constructor(_0x48b28c){super(_0x48b28c),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x168cb3,_0x2f2776,_0x4456ee)=>{_0x4456ee?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x810af7,_0x3192c1]of this['editor']['commands'])_0x3192c1['affectsData']&&'addCommentThread'!==_0x810af7&&_0x3192c1['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x301992=this['editor']['editing']['view']['document'];this['listenTo'](_0x301992,'cut',_0x2c6d57=>_0x2c6d57['stop'](),{'priority':'highest'}),this['listenTo'](_0x301992,'clipboardInput',_0x4c1ffb=>_0x4c1ffb['stop'](),{'priority':'highest'}),this['listenTo'](_0x301992,'delete',_0x36590d=>_0x36590d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x30dfc8,_0x5b393c]of this['editor']['commands'])_0x5b393c['affectsData']&&'addCommentThread'!==_0x30dfc8&&_0x5b393c['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}},Ti=class extends _0x6aba6a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[ti];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x37e77e){super(_0x37e77e),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x542c32=this['context']['plugins']['get'](ti);this['listenTo'](_0x542c32,'_activateAnnotation',(_0x25d084,_0x5bb89e)=>{for(const _0x2eddae of this['activeUIs']){const _0x229a8b=this['_uis']['get'](_0x2eddae);(0x0,this['uisData']['get'](_0x2eddae)['filter'])(_0x5bb89e)&&_0x229a8b['setActiveAnnotation'](_0x5bb89e);}}),this['listenTo'](_0x542c32,'_deactivateAllAnnotations',()=>{for(const _0x19dcaa of this['activeUIs'])this['_uis']['get'](_0x19dcaa)['setActiveAnnotation'](null);}),this['listenTo'](_0x542c32['_visibleAnnotations'],'add',(_0x11b81a,_0x1fbf57)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1fbf57);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x20b545){return this['activeUIs']['has'](_0x20b545);}['activate'](_0x1899ed,_0x52cb10=this['defaultFilter']){const _0x58c76b=this['context']['plugins']['get'](ti);if(!this['_uis']['has'](_0x1899ed))throw new _0xf4a2b6('annotationsuis-missing-ui',this,{'uiName':_0x1899ed});this['isActive'](_0x1899ed)&&this['deactivate'](_0x1899ed),this['activeUIs']['add'](_0x1899ed);const _0x78d20b=new Jt();Qt({'source':_0x58c76b['_visibleAnnotations'],'target':_0x78d20b,'filter':_0x52cb10}),this['uisData']['set'](_0x1899ed,{'collection':_0x78d20b,'filter':_0x52cb10});const _0x181a58=this['_uis']['get'](_0x1899ed);_0x181a58['attach'](_0x78d20b),this['listenTo'](_0x181a58,'change:activeAnnotation',(_0x4e1b4d,_0x10c1f1,_0x59877e,_0x1e9e75)=>{_0x1e9e75&&_0x58c76b['_removeActiveAnnotation'](_0x1e9e75),_0x59877e&&_0x58c76b['_addActiveAnnotation'](_0x59877e);});}['deactivate'](_0x50cf13){if(this['activeUIs']['delete'](_0x50cf13),!this['_uis']['has'](_0x50cf13))throw new _0xf4a2b6('annotationsuis-missing-ui',this,{'uiName':_0x50cf13});const _0x3e30f7=this['_uis']['get'](_0x50cf13);_0x3e30f7['detach'](),this['stopListening'](_0x3e30f7),this['uisData']['get'](_0x50cf13)['collection']['destroy'](),this['uisData']['delete'](_0x50cf13);}['switchTo'](_0x53e4b2){if(!this['_uis']['has'](_0x53e4b2))throw new _0xf4a2b6('annotationsuis-missing-ui',this,{'uiName':_0x53e4b2});const _0x45e5d9=this['context']['plugins']['get'](ti),_0x597c3a=Array['from'](_0x45e5d9['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x53e4b2);const _0x15b484=this['_uis']['get'](_0x53e4b2);_0x15b484['setActiveAnnotation'](_0x597c3a),_0x15b484['_setSelectedAnnotations']&&_0x597c3a&&_0x15b484['_setSelectedAnnotations']([_0x597c3a]);}['deactivateAll'](){for(const _0x1237fd of this['activeUIs'])this['deactivate'](_0x1237fd);}['register'](_0x16bdb8,_0x3ced99){if(this['_uis']['has'](_0x16bdb8))throw new _0xf4a2b6('annotationsuis-register-already-registered');if('function'!=typeof _0x3ced99['attach']||'function'!=typeof _0x3ced99['detach']||'function'!=typeof _0x3ced99['setActiveAnnotation'])throw new _0xf4a2b6('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x16bdb8,_0x3ced99);}['refilterAnnotations'](){const _0x29183f=this['context']['plugins']['get'](ti)['collection'],_0x5dfee7=new Map(),_0x3422f7=Array['from'](this['activeUIs']);for(const _0x59c001 of this['activeUIs']){const _0x49150f=this['uisData']['get'](_0x59c001)['collection'];for(const _0x24475c of _0x49150f)_0x5dfee7['set'](_0x24475c,_0x59c001);}for(const _0x5db587 of _0x29183f){const _0x5dc5dc=_0x5dfee7['get'](_0x5db587);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5db587);const _0x44bf6a=_0x3422f7['find'](_0x53473c=>this['uisData']['get'](_0x53473c)['filter'](_0x5db587));_0x5dc5dc!==_0x44bf6a&&(_0x5dc5dc&&this['uisData']['get'](_0x5dc5dc)['collection']['remove'](_0x5db587),_0x44bf6a&&this['uisData']['get'](_0x44bf6a)['collection']['add'](_0x5db587));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x330ed6){const _0x5ab20f=[];for(const _0x4029ea of this['activeUIs']){(0x0,this['uisData']['get'](_0x4029ea)['filter'])(_0x330ed6)&&_0x5ab20f['push'](_0x4029ea);}if(_0x5ab20f['length']>0x1)throw new _0xf4a2b6('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5ab20f,'annotationType':_0x330ed6['type']});}};const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
+
_0x20a9bf('px');var Ii=class extends ht{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x26b35a){super(_0x26b35a);const _0x228834=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x53f520(),this['focusCycler']=new et({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x228834['to']('class')],'style':{'minHeight':_0x228834['to']('minHeight',_0x4b640e=>'number'==typeof _0x4b640e?Ci(_0x4b640e+0xa):null)},'dir':_0x26b35a['uiLanguageDirection'],'role':'application','aria-label':Et(_0x26b35a,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':Et(_0x26b35a,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x213b20=>{this['_updateItemPositionInFocusables'](_0x213b20['source']);}),this['list']['forEach'](_0x5d1717=>{this['focusTracker']['add'](_0x5d1717['element']),this['_updateItemPositionInFocusables'](_0x5d1717);}),this['list']['on']('change',(_0x27ff4a,_0x22b7a9)=>{for(const _0x2dde6c of _0x22b7a9['removed'])this['focusTracker']['remove'](_0x2dde6c['element']),this['focusables']['remove'](_0x2dde6c);for(const _0x4ed2f0 of _0x22b7a9['added'])this['focusTracker']['add'](_0x4ed2f0['element']),this['_updateItemPositionInFocusables'](_0x4ed2f0);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x58292e){const _0x339529=this['focusables']['getIndex'](_0x58292e);let _0x21c75e,_0x3024eb;for(const _0x3dbd9c of this['focusables'])if(_0x58292e['top']<_0x3dbd9c['top']){_0x21c75e=_0x3dbd9c;break;}if(_0x3024eb=_0x21c75e?this['focusables']['getIndex'](_0x21c75e):this['focusables']['length'],-0x1!==_0x339529){if(_0x339529===_0x3024eb-0x1)return;this['focusables']['remove'](_0x58292e),_0x3024eb=_0x21c75e?this['focusables']['getIndex'](_0x21c75e):this['focusables']['length'];}this['focusables']['add'](_0x58292e,_0x3024eb);}};const bi=/* #__PURE__ -- @preserve */
|
|
33
|
+
_0x20a9bf('px');var Ei=class extends ht{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x46a42b){super(_0x46a42b),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x18ed46,_0x5c9f27)=>_0x18ed46+_0x5c9f27),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x305b63=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x305b63['to']('isAnimationDisabled',_0x294725=>_0x294725?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x305b63['to']('top',_0x4dc74e=>bi(_0x4dc74e))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xb9e49f=this['element']['clientHeight'];_0xb9e49f&&(this['height']=_0xb9e49f);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}},ki=class extends _0x6aba6a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ab261){super(_0x3ab261),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x349f31=this['context']['config']['get']('sidebar.container');_0x349f31&&this['setContainer'](_0x349f31);}['setContainer'](_0x485138){if(!Oi(_0x485138))throw new _0xf4a2b6('sidebar-setcontainer-invalid-element');this['container']=_0x485138;}['_attachToContainer']({viewClass:_0x4b15ba='',spaceBetweenItems:_0x2bd7c8=0x19}={}){if(!Oi(this['container']))throw new _0xf4a2b6('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4b15ba,this['_spaceBetweenItems']=_0x2bd7c8;}['rearrange']({removedAnnotation:_0x50cb83,previousAnnotation:_0x4f5955,nextAnnotation:_0x1ec6ad}){const _0x2a7c4d=this['getSidebarItemView'](_0x50cb83);this['view']['list']['remove'](_0x2a7c4d),this['_destroySidebarItemView'](_0x50cb83),_0x4f5955&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4f5955)),_0x1ec6ad&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1ec6ad)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x8c5c88,activatedAnnotation:_0x4312c4,disableAnimationOnActivatedAnnotation:_0x2deb69}){if(this['_activeAnnotation']=_0x4312c4,_0x8c5c88){_0x8c5c88['isActive']=!0x1;const _0x2c7cdb=this['getSidebarItemView'](_0x8c5c88);_0x2c7cdb&&_0x2deb69&&(_0x2c7cdb['isAnimationDisabled']=!0x1);}if(_0x4312c4){const _0x151dc9=this['getSidebarItemView'](_0x4312c4);_0x151dc9&&(_0x4312c4['isActive']=!0x0,_0x2deb69&&(_0x151dc9['isAnimationDisabled']=!0x0,_0x151dc9['top']+=0x1),this['_alignToTargetRect'](_0x151dc9));}}['_detachFromContainer'](_0x2f79f3){if(this['view']['element']['remove'](),_0x2f79f3){for(const _0x279d76 of _0x2f79f3)this['_destroySidebarItemView'](_0x279d76);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x23066a,_0x427aad){_0x427aad||(_0x427aad=_0x23066a['view']);const _0x58226a=new Ei(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x58226a,_0x23066a),this['_annotationToSidebarItemView']['set'](_0x23066a,_0x58226a),_0x58226a['content']['add'](_0x427aad),this['listenTo'](_0x23066a['view'],'change:targetRect',(_0x146870,_0x63bf59,_0x207c94)=>{const _0x3af337=this['_getTargetTop'](_0x23066a,_0x207c94);_0x58226a['_targetTop']!=_0x3af337&&(_0x58226a['_targetTop']=_0x3af337,this['_setItemTop'](_0x58226a,_0x3af337));}),this['listenTo'](_0x58226a,'change:top',()=>{this['_recalculate'](_0x58226a,'top');}),this['listenTo'](_0x58226a,'change:bottom',()=>{this['_recalculate'](_0x58226a,'bottom');}),this['_alignToTargetRect'](_0x58226a);const _0x46ae95=this['_getItemBefore'](_0x58226a);return _0x46ae95&&this['_alignAfterItem'](_0x46ae95,_0x58226a)||this['_alignToTargetRect'](_0x58226a),this['_updateLastItem'](),this['view']['list']['add'](_0x58226a),_0x58226a;}['_alignForTopChange'](_0xb92c92){if(!_0xb92c92['content']['length'])return;const _0x287e31=this['_getItemBefore'](_0xb92c92);if(!_0x287e31)return;const _0x3fe894=this['_sidebarItemViewToAnnotation']['get'](_0x287e31),_0x105d8c=this['_activeAnnotation'];_0x105d8c&&_0x105d8c===_0x3fe894?this['_alignAfterItem'](_0x287e31,_0xb92c92):this['_alignBeforeItem'](_0xb92c92,_0x287e31);}['_alignForBottomChange'](_0x420675){if(!_0x420675['content']['length'])return;const _0x4d3c15=this['_getItemAfter'](_0x420675);if(!_0x4d3c15)return;const _0x247862=this['_sidebarItemViewToAnnotation']['get'](_0x4d3c15),_0x4d9586=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x42a3dd=this['_activeAnnotation'];_0x42a3dd&&_0x42a3dd===_0x247862&&_0x4d9586?(this['_alignBeforeItem'](_0x4d3c15,_0x420675),this['_alignAfterItem'](_0x420675,_0x4d3c15)):_0x42a3dd&&_0x42a3dd===_0x247862?this['_alignBeforeItem'](_0x4d3c15,_0x420675):this['_alignAfterItem'](_0x420675,_0x4d3c15);}['_recalculate'](_0x4fae31,_0x4e5be3){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2df88d,changedProp:_0xc31c56}of this['_recalculateBuffer'])'top'===_0xc31c56?this['_alignForTopChange'](_0x2df88d):this['_alignForBottomChange'](_0x2df88d);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4fae31,'changedProp':_0x4e5be3});}['getSidebarItemView'](_0x16d85b){return this['_annotationToSidebarItemView']['get'](_0x16d85b);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x23ea37){const _0x459c0b=this['getSidebarItemView'](_0x23ea37);this['stopListening'](_0x459c0b),this['stopListening'](_0x23ea37['view']),_0x459c0b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x23ea37),this['_sidebarItemViewToAnnotation']['delete'](_0x459c0b);}['_createSidebarView'](){const _0x2c6d4d=new Ii(this['context']['locale']);return _0x2c6d4d['render'](),this['on']('change:_lastItem',(_0x1afe86,_0x59959b,_0x59a7b0,_0x20a637)=>{_0x20a637&&_0x2c6d4d['unbind']('minHeight'),_0x59a7b0?_0x2c6d4d['bind']('minHeight')['to'](_0x59a7b0,'bottom'):_0x2c6d4d['minHeight']=null;}),_0x2c6d4d;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x3fa903){const _0x1a7167=this['_sidebarItemViewToAnnotation']['get'](_0x3fa903),_0x1b5e97=_0x1a7167&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1a7167)-0x1);return _0x1b5e97&&this['getSidebarItemView'](_0x1b5e97)||null;}['_getItemAfter'](_0x59e8ea){const _0xe3437a=this['_sidebarItemViewToAnnotation']['get'](_0x59e8ea),_0x376041=_0xe3437a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xe3437a)+0x1);return _0x376041&&this['getSidebarItemView'](_0x376041)||null;}['_alignBeforeItem'](_0x477453,_0x2c6bd4){_0x477453['updateHeight']();const _0x24b2de=Ni(_0x2c6bd4['bottom']+this['_spaceBetweenItems'],_0x477453['top']);return!!_0x24b2de&&(this['_setItemTop'](_0x2c6bd4,_0x2c6bd4['top']-_0x24b2de),!0x0);}['_alignAfterItem'](_0x62b301,_0x4fb947){_0x62b301['updateHeight']();const _0x7343fb=Ni(_0x62b301['bottom']+this['_spaceBetweenItems'],_0x4fb947['top']);return!!_0x7343fb&&(this['_setItemTop'](_0x4fb947,_0x4fb947['top']+_0x7343fb,!0x1),!0x0);}['_alignToTargetRect'](_0x16e32a){const _0x56c292=this['_sidebarItemViewToAnnotation']['get'](_0x16e32a);if(!_0x56c292||!_0x56c292['target']||!_0x56c292['targetRect'])return;const _0x364cfa=this['_getTargetTop'](_0x56c292,_0x56c292['targetRect']);this['_setItemTop'](_0x16e32a,_0x364cfa);}['_getTargetTop'](_0x58d5fe,_0x1b5384){if(null===_0x1b5384)return 0x0;if(_0x58d5fe['target']instanceof _0x407ea7)return _0x1b5384['top'];{const _0x19e9a8=new _0x407ea7(this['view']['element'])['top'];return _0x1b5384['top']-_0x19e9a8;}}['_setItemTop'](_0x535432,_0x58b594,_0x53ef5a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x53ef5a&&(_0x58b594=Math['max'](_0x58b594,this['_getMaxAvailableTop'](_0x535432))),_0x535432['top']=_0x58b594;}['_getMaxAvailableTop'](_0x4604fe){let _0x16d5a2=this['_getItemBefore'](_0x4604fe),_0x4b6260=0x0;for(;_0x16d5a2;)_0x16d5a2['updateHeight'](),_0x4b6260+=this['_spaceBetweenItems']+_0x16d5a2['height'],_0x16d5a2=this['_getItemBefore'](_0x16d5a2);return _0x4b6260;}};function Ni(_0x526639,_0x249f3f){return Math['max'](_0x526639-_0x249f3f,0x0);}function Oi(_0x5eea4e){return null!==_0x5eea4e&&'object'==typeof _0x5eea4e&&0x1===_0x5eea4e['nodeType'];}var Mi=class extends _0x6aba6a{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x41de08){super(_0x41de08),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x476485(),this['_refreshPositioningDebounced']=_0x2e8ec0(()=>{_0x41de08['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5b6846=this['context']['plugins']['get'](Ti),_0x3d514a=this['context']['plugins']['get'](ki);_0x5b6846['register']('wideSidebar',this),_0x3d514a['container']&&_0x5b6846['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x21b82d){if(_0x21b82d===this['activeAnnotation'])return;const _0x333018=this['context']['plugins']['get'](ki);_0x333018['_activeAnnotation']=_0x21b82d;const _0x3e9d25=this['activeAnnotation'];_0x333018['refresh']({'blurredAnnotation':_0x3e9d25,'activatedAnnotation':_0x21b82d}),this['activeAnnotation']=_0x21b82d;}['attach'](_0x4c7b99){this['annotations']=_0x4c7b99;const _0x2ddf07=this['context']['plugins']['get'](ki);if(_0x2ddf07['_annotations']=_0x4c7b99,this['isAttached'])throw new _0xf4a2b6('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2ddf07,'set:container',()=>{this['detach'](),this['listenTo'](_0x2ddf07,'change:container',_0x538287=>{_0x538287['off'](),this['attach'](_0x4c7b99);});}),_0x2ddf07['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x48a1f7=_0x34b7ab=>{_0x34b7ab['updateTargetRect'](),_0x2ddf07['addAnnotation'](_0x34b7ab);};for(const _0x432b30 of _0x4c7b99)_0x48a1f7(_0x432b30);this['listenTo'](_0x4c7b99,'add',(_0x2e547b,_0x232a4a)=>{_0x48a1f7(_0x232a4a);}),this['listenTo'](_0x4c7b99,'remove',(_0x22fac1,_0x165b1e,_0x59d5da)=>{_0x2ddf07['rearrange']({'removedAnnotation':_0x165b1e,'previousAnnotation':_0x4c7b99['get'](_0x59d5da-0x1),'nextAnnotation':_0x4c7b99['get'](_0x59d5da+0x1)}),_0x165b1e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4c7b99,'focus',(_0x5db4e6,_0xe398d4)=>{this['setActiveAnnotation'](_0xe398d4);}),this['listenTo'](_0x4c7b99,'blur',()=>{this['setActiveAnnotation'](null);});const _0x273498=this['context']instanceof _0x20c5a3?this['context']['editors']:new _0x476485([this['context']]);for(const _0x1ae436 of _0x273498)this['_integrateWithEditorAnnotations'](_0x1ae436);this['listenTo'](_0x273498,'add',(_0x4e85ef,_0x16b3ab)=>{this['listenTo'](_0x16b3ab,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x16b3ab);});}),this['listenTo'](_0x273498,'remove',(_0xe595aa,_0x5818d7)=>{_0x5818d7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5818d7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xf4a2b6('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2d68b5=this['context']['plugins']['get'](ki);_0x2d68b5['_detachFromContainer'](this['annotations']),this['stopListening'](_0x2d68b5),this['stopListening'](this['annotations']),this['context']instanceof _0x20c5a3&&this['stopListening'](this['context']['editors']);for(const _0x4bc846 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4bc846);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0xc3369){if(!_0xc3369['plugins']['has']('EditorAnnotations'))return;const _0x50e2e4=_0xc3369['plugins']['get']('EditorAnnotations'),_0x18e408=()=>{const _0x15106b=_0x50e2e4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x15106b[0x0]||null);};this['listenTo'](_0x50e2e4,'refresh',_0x18e408),this['listenTo'](_0x50e2e4,'blur',(_0x4d51a3,{isAnnotationTracked:_0x3ca1f9})=>{this['activeAnnotation']&&_0x3ca1f9(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x50e2e4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x734245=>{_0x50e2e4['hasDomSelection']()&&(_0x18e408(),_0x734245['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x50e2e4);}['_destroyEditorAnnotationsIntegration'](_0x45e647){this['stopListening'](_0x45e647),this['_editorAnnotations']['remove'](_0x45e647);}},Ri=class extends _0x465f26{['counterView'];constructor(_0x412e25){super(_0x412e25);const _0x14182d=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2afa69,_0x51ac06)=>_0x2afa69?'...':_0x51ac06['toString']()),this['set']('annotationType',''),this['icon']=_0x15d386,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new ht(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x14182d['to']('annotationType',_0x269958=>'ck-annotation-counter__badge--'+_0x269958),_0x14182d['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x14182d['to']('_badge')}]}),this['children']['add'](this['counterView']);}},Si=class extends _0x6aba6a{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[ki,Ti];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a3466){super(_0x1a3466),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x571ba5())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x476485(),this['_refreshPositioningDebounced']=_0x2e8ec0(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](Ti)['register']('narrowSidebar',this),this['bodyCollection']=new _0x408a86(this['context']['locale']),this['balloonPanelView']=new _0x46a25b(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3a59d5){this['annotations']=_0x3a59d5;const _0x3f7bc7=this['context']['plugins']['get'](ki),_0x1874a5=this['balloonPanelView'];if(_0x3f7bc7['_annotations']=_0x3a59d5,this['isAttached'])throw new _0xf4a2b6('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3f7bc7,'set:container',()=>{this['detach'](),this['listenTo'](_0x3f7bc7,'change:container',_0x1c29e1=>{_0x1c29e1['off'](),this['attach'](_0x3a59d5);});}),_0x3f7bc7['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2de04e=_0x52cffe=>{const _0x347235=new Ri(this['context']['locale']);_0x3f7bc7['addAnnotation'](_0x52cffe,_0x347235),this['_annotationToNarrowView']['set'](_0x52cffe,_0x347235),_0x347235['bind']('isDirty','annotationType','number')['to'](_0x52cffe['view'],'isDirty','type','length'),_0x347235['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1874a5['content']['first']!==_0x52cffe['view']?(this['_showBalloon'](_0x52cffe),_0x52cffe['view']['element']['focus'](),this['setActiveAnnotation'](_0x52cffe)):this['setActiveAnnotation'](null);});};for(const _0x1886e5 of _0x3a59d5)_0x2de04e(_0x1886e5);this['listenTo'](_0x3a59d5,'add',(_0x1e75a2,_0x5472f9)=>{_0x2de04e(_0x5472f9);}),this['listenTo'](_0x3a59d5,'remove',(_0x5262c1,_0x50914d,_0x571774)=>{this['_annotationToNarrowView']['get'](_0x50914d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x50914d),_0x3f7bc7['rearrange']({'removedAnnotation':_0x50914d,'previousAnnotation':_0x3a59d5['get'](_0x571774-0x1),'nextAnnotation':_0x3a59d5['get'](_0x571774+0x1)}),_0x50914d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3a59d5,'focus',(_0x177242,_0xc5c855)=>{this['setActiveAnnotation'](_0xc5c855);}),this['listenTo'](_0x3a59d5,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x381c11,_0x52d8d7)=>{_0x52d8d7['keyCode']===_0x2ff755['esc']&&_0x1874a5['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1874a5['content']['first']),this['_hideBalloon'](),_0x52d8d7['stopPropagation'](),_0x52d8d7['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x126576,_0x4bbc96)=>{const _0x46e362=_0x4bbc96['target'];_0x1874a5['isVisible']&&_0x1874a5['element']['contains'](_0x46e362)||_0x3f7bc7['view']['element']['contains'](_0x46e362)||_0x126576['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3abce4=>_0x3abce4['contains'](_0x46e362))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xda7659=this['context']instanceof _0x20c5a3?this['context']['editors']:new _0x476485([this['context']]);for(const _0x5d278c of _0xda7659)this['_integrateWithEditorAnnotations'](_0x5d278c);this['listenTo'](_0xda7659,'add',(_0x9dee9d,_0x409547)=>{this['listenTo'](_0x409547,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x409547);});}),this['listenTo'](_0xda7659,'remove',(_0x47b0e9,_0x10fd12)=>{_0x10fd12['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x10fd12['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x359df7){if(_0x359df7===this['activeAnnotation'])return;const _0x780550=this['context']['plugins']['get'](ki);_0x780550['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x359df7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x359df7&&_0x780550['getSidebarItemView'](_0x359df7)?this['_showBalloon'](_0x359df7):this['_hideBalloon'](),this['activeAnnotation']=_0x359df7;}['detach'](){if(!this['isAttached'])throw new _0xf4a2b6('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4e70af=this['context']['plugins']['get'](ki);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2238cd=>_0x2238cd['destroy']()),this['_annotationToNarrowView']['clear'](),_0x4e70af['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x20c5a3&&this['stopListening'](this['context']['editors']);for(const _0x16a6d7 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x16a6d7);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x5a2710){if(!_0x5a2710['plugins']['has']('EditorAnnotations'))return;const _0x144bed=_0x5a2710['plugins']['get']('EditorAnnotations'),_0x10bbc1=this['context']['plugins']['get'](ki),_0x3cdac6=this['annotations'],_0x4c32cf=this['balloonPanelView'],_0x5d68a1=()=>{const _0x415ad6=_0x144bed['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x415ad6),this['setActiveAnnotation'](_0x415ad6[0x0]||null);};this['listenTo'](_0x144bed,'refresh',_0x5d68a1),this['listenTo'](_0x144bed,'blur',(_0x56737b,{isAnnotationTracked:_0x1bb227})=>{this['activeAnnotation']&&_0x1bb227(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x144bed,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3cdac6,'blur',_0x1bd960=>{_0x144bed['hasDomSelection']()&&_0x1bd960['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x32db4c,_0x4ffada)=>{const _0x5c56ec=_0x4ffada['target'];_0x4c32cf['isVisible']&&_0x4c32cf['element']['contains'](_0x5c56ec)||_0x10bbc1['view']['element']['contains'](_0x5c56ec)||this['activeAnnotation']&&_0x144bed['hasDomSelection']()&&(_0x5d68a1(),_0x32db4c['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x144bed);}['_destroyEditorAnnotationsIntegration'](_0x919c48){_0x919c48&&(this['stopListening'](_0x919c48),this['_editorAnnotations']['remove'](_0x919c48));}['_setSelectedAnnotations'](_0x2f08b6){for(const _0x2b143e of this['_selectedAnnotations'])_0x2f08b6['includes'](_0x2b143e)||this['_manuallyClosedAnnotationViews']['delete'](_0x2b143e['view']);this['_selectedAnnotations']=_0x2f08b6;}['_refreshPositioning'](){const _0x5e8202=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5e8202['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x54a46f){if(this['_manuallyClosedAnnotationViews']['has'](_0x54a46f['view']))return;const _0xd44aef=this['balloonPanelView']['content']['first'];_0xd44aef!==_0x54a46f['view']?(_0xd44aef&&this['_detachListeners'](_0xd44aef),this['_attachListeners'](_0x54a46f['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x54a46f['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2dc127=this['balloonPanelView']['content']['first'],_0x4045a8=_0x2dc127&&this['annotations']['getByView'](_0x2dc127);if(!_0x4045a8||!this['_annotationToNarrowView']['has'](_0x4045a8))return;const _0x3290f7=this['_annotationToNarrowView']['get'](_0x4045a8)['element'],_0x173a07=(function(){const _0xa44209=_0x46a25b['defaultPositions'];return[_0xa44209['southArrowNorthEast'],_0xa44209['northArrowSouthEast'],_0xa44209['southArrowNorth'],_0xa44209['northArrowSouth'],_0xa44209['southArrowNorthWest'],_0xa44209['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3290f7,'positions':_0x173a07});}['_hideBalloon'](){const _0x5405a9=this['balloonPanelView'],_0x25171e=_0x5405a9['content']['first'];_0x25171e&&(this['_detachListeners'](_0x25171e),_0x5405a9['unpin'](),_0x5405a9['content']['clear']());}['_attachListeners'](_0x1fdb14){this['listenTo'](_0x1fdb14,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1fdb14,'Esc',(_0x321884,_0x290aaf)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1fdb14),this['_hideBalloon'](),_0x290aaf();});}['_detachListeners'](_0x3d6350){this['stopListening'](_0x3d6350);}},xi=class extends _0x49d365{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[di,_0x423bf9,Ti];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x527edd){super(_0x527edd),_0x527edd['editing']['view']['addObserver'](lt),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x527edd['plugins']['get'](_0x423bf9),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x2e8ec0(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x1723a4=this['editor']['plugins']['get'](Ti);_0x1723a4['context']===this['editor']&&(_0x1723a4['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3f57c4,_0x4734ff)=>{const _0x283da9=this['_balloon'];if(this['isAttached']&&_0x283da9['visibleView']){const _0x3f5f62=this['annotations']['getByView'](_0x283da9['visibleView']);_0x3f5f62&&this['_closeAnnotation'](_0x3f5f62),_0x4734ff();}}));}['afterInit'](){const _0x147f5a=this['editor']['plugins']['get'](Ti);_0x147f5a['context']===this['editor']&&(_0x147f5a['hasActive']()||_0x147f5a['switchTo']('inline'));}['setActiveAnnotation'](_0x4efa94){_0x4efa94!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4efa94&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4efa94)&&this['_addAnnotationToBalloon'](_0x4efa94,!0x0),_0x4efa94['isActive']=!0x0),_0x4efa94||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4efa94);}['attach'](_0x14e2bc){this['annotations']=_0x14e2bc;const _0x3d8eea=this['editor']['plugins']['get'](Ti),_0x394661=this['_balloon'];if(this['isAttached'])throw new _0xf4a2b6('inlineannotations-attach-already-attached',this);if(_0x3d8eea['context']!==this['editor'])throw new _0xf4a2b6('inlineannotations-not-allowed-with-context',this);const _0x183b8b=this['editor']['plugins']['get'](di);this['listenTo'](_0x183b8b,'refresh',()=>{const _0x1315f9=_0x183b8b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x51975b,_0x5aefc7;!this['_forceRefresh']&&(_0x51975b=_0x1315f9,_0x5aefc7=this['_selectedAnnotations'],_0x51975b['length']===_0x5aefc7['length']&&_0x51975b['every'](_0xc5cf4e=>_0x5aefc7['includes'](_0xc5cf4e)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1315f9),this['setActiveAnnotation'](_0x1315f9[0x0]||null));}),this['listenTo'](_0x183b8b,'blur',(_0x21f439,{isAnnotationTracked:_0x21aa22})=>{this['activeAnnotation']&&_0x21aa22(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x183b8b,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x534107,_0x2a743c,_0xec962)=>{_0xec962||this['setActiveAnnotation'](null);}),this['listenTo'](_0x14e2bc,'remove',(_0xa36cd0,_0x2df734)=>{this['_removeAnnotationFromBalloon'](_0x2df734),_0x2df734===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x394661,'change:visibleView',(_0x44432b,_0xc5f322,_0x5e1ad9,_0x154cd6)=>{_0x154cd6&&this['stopListening'](_0x154cd6);const _0x241789=_0x14e2bc['getByView'](_0x5e1ad9);_0x5e1ad9&&_0x241789&&(this['listenTo'](_0x5e1ad9,'change:height',()=>{_0x394661['updatePosition']();}),this['listenTo'](_0x5e1ad9,'Esc',()=>{this['_closeAnnotation'](_0x241789),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x241789&&this['setActiveAnnotation'](_0x241789));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x394661['visibleView']&&_0x14e2bc['getByView'](_0x394661['visibleView'])&&_0x394661['updatePosition']();}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0xf4a2b6('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x546732 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x546732);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3b3651){for(const _0xd7ae35 of this['_selectedAnnotations'])_0x3b3651['includes'](_0xd7ae35)||this['_manuallyClosed']['delete'](_0xd7ae35);for(const _0x491d08 of this['annotations'])_0x3b3651['includes'](_0x491d08)||this['_removeAnnotationFromBalloon'](_0x491d08);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x372d1a of _0x3b3651)this['_addAnnotationToBalloon'](_0x372d1a);}this['_selectedAnnotations']=_0x3b3651;}['_addAnnotationToBalloon'](_0x3e2844,_0x145546=!0x1){this['_manuallyClosed']['has'](_0x3e2844)||(this['_addedAnnotations']['has'](_0x3e2844)||this['_balloon']['hasView'](_0x3e2844['view'])||(this['_addedAnnotations']['add'](_0x3e2844),this['_balloon']['add']({'stackId':_0x3e2844['view']['id'],'view':_0x3e2844['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3e2844)}})),_0x145546&&this['_balloon']['showStack'](_0x3e2844['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5d8d5f){const _0x370d23=_0x5d8d5f['target'],_0x5e9ee1=this['editor']['editing']['view'],_0x16b53f=_0x5e9ee1['document']['selection']['getFirstRange'](),_0xbe3b20=_0x5e9ee1['domConverter']['viewRangeToDom'](_0x16b53f);if(_0xbe3b20['collapse'](!0x0),_0x370d23){if(_0x370d23 instanceof _0x407ea7)return _0x370d23;let _0x2c60ac=[];for(const _0x8ca31e of _0x370d23)_0x2c60ac['push'](..._0x407ea7['getDomElementRects'](_0x8ca31e));_0x2c60ac=function(_0x2740c6){const _0x1ee9f1=[];let _0x352dba=_0x2740c6[0x0];for(let _0x2070f5=0x1;_0x2070f5<_0x2740c6['length'];_0x2070f5++)if(Pi(_0x352dba,_0x2740c6[_0x2070f5])){const _0x24ae0a=_0x2740c6[_0x2070f5]['width'];_0x352dba['width']+=_0x24ae0a,_0x352dba['right']+=_0x24ae0a;}else _0x1ee9f1['push'](_0x352dba),_0x352dba=_0x2740c6[_0x2070f5];return _0x1ee9f1['push'](_0x352dba),_0x1ee9f1;}(_0x2c60ac);const _0x3d5676=_0xbe3b20['getBoundingClientRect']();return _0x2c60ac['find'](_0x4d8155=>_0x4d8155['top']<=_0x3d5676['top']&&_0x4d8155['bottom']>=_0x3d5676['bottom']&&_0x4d8155['left']<=_0x3d5676['left']&&_0x4d8155['right']>=_0x3d5676['right'])||_0x2c60ac[0x0];}return _0x5d8d5f['targetRect']||_0xbe3b20;}['_removeAnnotationFromBalloon'](_0x386457){this['_addedAnnotations']['has'](_0x386457)&&this['_balloon']['hasView'](_0x386457['view'])&&(this['_addedAnnotations']['delete'](_0x386457),this['_balloon']['remove'](_0x386457['view']));}['_closeAnnotation'](_0x4cd79e){this['_manuallyClosed']['add'](_0x4cd79e),this['_removeAnnotationFromBalloon'](_0x4cd79e);}};function Pi(_0x3c2fa0,_0x5a8ae9){return _0x3c2fa0['top']===_0x5a8ae9['top']&&_0x3c2fa0['bottom']===_0x5a8ae9['bottom']&&_0x3c2fa0['right']===_0x5a8ae9['left'];}var Li=class extends ht{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x488bcb,_0x38fd0c){super(_0x488bcb),this['set']('isEmpty',!_0x38fd0c['length']),this['focusTracker']=new _0x53f520(),this['_annotationViews']=_0x38fd0c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new et({'focusables':_0x38fd0c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x38fd0c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x38fd0c,'remove',(_0x4a0f34,_0x16c012)=>{_0x16c012['isActive']&&this['focus'](),_0x38fd0c['length']||(this['isEmpty']=!0x0);});const _0x19ec24=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':Et(_0x488bcb,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x38fd0c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x19ec24['if']('isEmpty','ck-hidden',_0x3e4e52=>!_0x3e4e52)]},'children':[{'text':Et(_0x488bcb,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0x55664f of this['_annotationViews'])this['focusTracker']['add'](_0x55664f['element']);this['_annotationViews']['on']('change',(_0x235d0e,{added:_0x1f42f5,removed:_0x1e4aee})=>{for(const _0x221903 of _0x1f42f5)this['focusTracker']['add'](_0x221903['element']);for(const _0x2ca12b of _0x1e4aee)this['focusTracker']['remove'](_0x2ca12b['element']);});}},Di=class extends _0x6aba6a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[oi,ti];}constructor(_0x580041){super(_0x580041),this['archivedThreads']=new _0x476485();}['init'](){const _0x1ec808=this['context'],_0x32f967=_0x1ec808['plugins']['get'](oi),_0x39581a=_0x1ec808['plugins']['get'](ti);this['listenTo'](_0x32f967,'addCommentThread',(_0x50b2a5,{threadId:_0x3a90c6})=>{const _0x3bc7e7=_0x32f967['getCommentThread'](_0x3a90c6);_0x3bc7e7['archivedAt']&&this['archivedThreads']['add'](_0x3bc7e7,this['_calculatePosition'](_0x3bc7e7['archivedAt'])),this['listenTo'](_0x3bc7e7,'change:archivedAt',(_0x2ec30d,_0x40c5a9,_0x1c94f1)=>{_0x1c94f1?this['archivedThreads']['has'](_0x3bc7e7)||this['archivedThreads']['add'](_0x3bc7e7,this['_calculatePosition'](_0x3bc7e7['archivedAt'])):this['archivedThreads']['has'](_0x3bc7e7)&&this['archivedThreads']['remove'](_0x3bc7e7);});}),this['listenTo'](_0x32f967,'removeCommentThread',(_0x4508a8,{threadId:_0x48d1b9})=>{const _0x2e093e=_0x32f967['getCommentThread'](_0x48d1b9);this['stopListening'](_0x2e093e),this['archivedThreads']['has'](_0x2e093e)&&this['archivedThreads']['remove'](_0x2e093e);},{'priority':'highest'}),this['listenTo'](_0x39581a['collection'],'focus',(_0x412b45,_0x4e560e)=>{_0x4e560e['isVisible']||(_0x4e560e['isActive']=!0x0,_0x39581a['activate'](_0x4e560e));});}['_calculatePosition'](_0x1eb657){const _0x284a95=[...this['archivedThreads']]['findIndex'](_0x2c30ef=>_0x2c30ef['archivedAt']<_0x1eb657);return _0x284a95>-0x1?_0x284a95:this['archivedThreads']['length'];}},Vi=class extends _0x49d365{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[Di,_0x5d1c76];}constructor(_0xcb47fd){super(_0xcb47fd),this['annotationViews']=new at(),this['_pendingThreads']=[];}['init'](){const _0x2ab9d9=this['editor'],_0x3daa58=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2ab9d9['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x465f26,!0x0)),_0x2ab9d9['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5f1ea5=this['_createCommentsArchiveButton'](rt);return _0x5f1ea5['set']({'role':'menuitemcheckbox'}),_0x5f1ea5;});const _0x5e29b3=_0x2ab9d9['plugins']['get'](Di),_0x1c2d0b=_0x2ab9d9['plugins']['get']('Annotations'),_0x37c68e=_0x2ab9d9['plugins']['get']('CommentsRepository');_0x5e29b3['archivedThreads']['forEach'](_0x3e59fd=>{this['_handleNewThread'](_0x3e59fd);}),this['listenTo'](_0x5e29b3['archivedThreads'],'add',(_0x106509,_0x5b979b)=>{this['_handleNewThread'](_0x5b979b);}),this['listenTo'](_0x1c2d0b['collection'],'add',(_0x335096,_0x58890d)=>{const _0x36d5e2=this['_pendingThreads']['find'](_0x2f1cd5=>{const _0x5e2761=_0x37c68e['_threadToController']['get'](_0x2f1cd5);return _0x5e2761&&_0x58890d['innerView']===_0x5e2761['view'];});if(_0x36d5e2){const _0x490a59=this['_calculatePosition'](_0x36d5e2['archivedAt']);this['_addAnnotationToArchive'](_0x58890d,_0x490a59),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x36d5e2),0x1);}}),this['listenTo'](_0x5e29b3['archivedThreads'],'remove',(_0x1cc7f2,_0x13e605)=>{const _0x16852b=_0x2ab9d9['config']['get']('collaboration.channelId');if(!_0x16852b||_0x13e605['channelId']===_0x16852b){if(this['_pendingThreads']['includes'](_0x13e605))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x13e605),0x1);else{const _0x27f36f=_0x37c68e['_threadToController']['get'](_0x13e605),_0x3462a1=_0x1c2d0b['getByInnerView'](_0x27f36f['view']);this['annotationViews']['remove'](_0x3462a1['view']),this['stopListening'](_0x3462a1),this['stopListening'](_0x3462a1['focusableElements']);}}}),this['listenTo'](_0x1c2d0b['collection'],'add',(_0x8ea77,_0x48a312)=>{this['listenTo'](_0x48a312,'escape',_0x3daa58);}),this['listenTo'](_0x1c2d0b['collection'],'remove',(_0x488470,_0x2735eb)=>{this['stopListening'](_0x2735eb,'escape',_0x3daa58);});}['_addAnnotationToArchive'](_0x5b9f68,_0xf2ed12){this['listenTo'](_0x5b9f68,'set:isVisible',_0xe53a8e=>{_0xe53a8e['return']=!0x1,_0xe53a8e['stop']();}),this['annotationViews']['add'](_0x5b9f68['view'],_0xf2ed12);}['_handleNewThread'](_0x41c717){const _0x225102=this['editor']['plugins']['get']('CommentsRepository'),_0x4db4aa=this['editor']['plugins']['get']('Annotations'),_0x3ea893=this['editor']['config']['get']('collaboration.channelId');if(!_0x3ea893||_0x41c717['channelId']===_0x3ea893){const _0x1763b8=_0x225102['_threadToController']['get'](_0x41c717);if(!_0x1763b8)return void this['_pendingThreads']['push'](_0x41c717);const _0xc92dcd=this['_calculatePosition'](_0x41c717['archivedAt']),_0x2ae0da=_0x4db4aa['getByInnerView'](_0x1763b8['view']);_0x2ae0da['isVisible']&&_0x4db4aa['_visibleAnnotations']['remove'](_0x2ae0da),this['_addAnnotationToArchive'](_0x2ae0da,_0xc92dcd);}}['_calculatePosition'](_0x9f7bbc){const _0x1658aa=this['editor']['config']['get']('collaboration.channelId'),_0x3fcd46=[...this['editor']['plugins']['get'](Di)['archivedThreads']]['filter'](_0x1c3fd=>_0x1c3fd['channelId']===_0x1658aa)['findIndex'](_0x8d15d4=>_0x8d15d4['archivedAt']<_0x9f7bbc);return _0x3fcd46<0x0||_0x3fcd46>this['annotationViews']['length']?this['annotationViews']['length']:_0x3fcd46-0x1;}['_toggleDialog'](){const _0x3ea2c6=this['editor'],_0x568d52=_0x3ea2c6['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Li(_0x3ea2c6['locale'],this['annotationViews'])),'commentsArchive'===_0x568d52['id']?_0x568d52['hide']():_0x568d52['show']({'id':'commentsArchive','title':Et(_0x3ea2c6['locale'],'COMMENTS_ARCHIVE'),'icon':_0x43722b,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4f90c2['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2a0a6d,_0x154b4f=!0x1){const _0xa237a0=this['editor']['locale'],_0x12517d=this['editor']['plugins']['get']('Dialog'),_0x38c051=new _0x2a0a6d(_0xa237a0);return _0x38c051['bind']('isEnabled')['to'](this,'isEnabled'),_0x38c051['bind']('isOn')['to'](_0x12517d,'id',_0x4fe8aa=>'commentsArchive'===_0x4fe8aa),_0x38c051['set']({'label':Et(_0xa237a0,'COMMENTS_ARCHIVE'),'icon':_0x43722b,'isToggleable':!0x0}),_0x154b4f&&(_0x38c051['tooltip']=!0x0),this['listenTo'](_0x38c051,'execute',()=>this['_toggleDialog']()),_0x38c051;}['_hideDialogOnAnnotationEscape']=_0x5b219f=>{const _0x48b509=_0x5b219f['source'];if(!this['annotationViews']['has'](_0x48b509['view']))return;const _0xdc81c0=this['editor']['plugins']['get']('Dialog');_0xdc81c0['isOpen']&&'commentsArchive'===_0xdc81c0['id']&&(_0xdc81c0['hide'](),_0x5b219f['stop']());};},Bi=class extends _0x49d365{static get['requires'](){return[oi,wi,vi,Di,Vi,yi,Mi,Si,xi];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}};export{ci as AddCommentThreadCommand,$t as Annotation,Jt as AnnotationCollection,Ri as AnnotationCounterButtonView,qt as AnnotationView,ti as Annotations,Ei as AnnotationsSidebarItemView,Ii as AnnotationsSidebarView,Ti as AnnotationsUIs,Ht as BaseCommentThreadView,Kt as BaseCommentView,hi as Comment,ri as CommentThread,bt as CommentThreadController,xt as CommentThreadInputView,Ut as CommentThreadView,Yt as CommentView,Bi as Comments,Di as CommentsArchive,Vi as CommentsArchiveUI,wi as CommentsEditing,Lt as CommentsListView,yi as CommentsOnly,oi as CommentsRepository,vi as CommentsUI,di as EditorAnnotations,xi as InlineAnnotations,Si as NarrowSidebar,ki as Sidebar,Mi as WideSidebar,Qt as bindAnnotationCollections};
|