@ckeditor/ckeditor5-comments 45.2.1 → 45.2.2
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/build/comments.js +1 -1
- package/dist/index.js +9 -9
- 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/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Lt)());constructor(_0x53ac0f={}){function _0x28c6df(_0x3a3206){return _0x3a3206['map'](_0x476032=>String['fromCharCode'](_0x476032))['join']('');}(_0x53ac0f=Object['assign']({},_0x53ac0f))['plugins']||(_0x53ac0f['plugins']=Qt['defaultPlugins']),super(_0x53ac0f),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x28c6df([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28c6df([0x76,0x69,0x65,0x77])][_0x28c6df([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x28c6df([0x61,0x75,0x74,0x6f]),this[_0x28c6df([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x28c6df([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x28c6df([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x28c6df([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x28c6df([0x6f,0x6b])});}['create'](){const _0x34b2a5=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x34b2a5))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x5df908=>{const _0x25c443=this['model']['document']['getRoot'](),_0x2546a6=_0x25c443&&_0x25c443['getChild'](_0x25c443['childCount']-0x1);_0x5df908['setSelection'](_0x2546a6,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x326ae1=this['editing']['view'],_0x31a2a5=_0x326ae1['document']['getRoot'](),_0x3fea43=_0x31a2a5['getChild'](0x0);_0x31a2a5['childCount']>0x1||!_0x3fea43||'p'!=_0x3fea43['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x326ae1,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3fea43['placeholder']=this['placeholder']),Ft({'view':_0x326ae1,'element':_0x3fea43,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3fea43);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x9f776,_0x44fe90={}){super(_0x9f776),this['editor']=null,this['_editorConfig']=_0x44fe90,this['set']('value',_0x44fe90['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x9f776,'Reply...')),this['set']('submitLabel',E(_0x9f776,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x56f3e8(),this['focusCycler']=new _0x28df27({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'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',(_0x488307,_0x2ab755)=>{this['cancelButtonView']['fire']('execute'),_0x2ab755();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2c2097,_0x5cadb8)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5cadb8());}),this['on']('submit',(_0x27f654,_0x333af7)=>{_0x333af7['length']>0xfde8?(alert(E(_0x9f776,'TOO_LONG_COMMENT_ALERT',[_0x333af7['length'],0xfde8])),_0x27f654['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x565982=this['editor'];this['element']['insertBefore'](_0x565982['ui']['element'],this['element']['firstChild']),_0x565982['model']['document']['on']('change',()=>this['value']=_0x565982['getData']()),_0x565982['bind']('placeholder')['to'](this),this['focusables']['add'](_0x565982['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3d44ae){-0x1===_0x3d44ae?(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:_0x12f99f}=this,_0x3f7577=new tt(_0x12f99f);return _0x3f7577['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3f7577['withText']=!0x0,_0x3f7577['bind']('label')['to'](this,'submitLabel'),_0x3f7577['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3f7577['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x3a2072,_0x5858e2)=>!_0x5858e2&&!!_0x3a2072['trim']()),_0x3f7577;}['_createCancelButton'](){const {locale:_0x509d8b}=this,_0x3e790f=new tt(_0x509d8b);return _0x3e790f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3e790f['label']=E(_0x509d8b,'Cancel'),_0x3e790f['withText']=!0x0,_0x3e790f['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3e790f;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x453191=>{this['focusTracker']['add'](_0x453191['element']);}),this['focusables']['on']('change',(_0x197719,_0x2450a0)=>{for(const _0x32f397 of Array['from'](_0x2450a0['added'])['reverse']())this['focusTracker']['add'](_0x32f397['element']);});}}class ie extends kt{constructor(_0x259dc1,_0x54fd24,_0x1cbdb9){super(_0x259dc1),this['commentInputView']=new hs(_0x259dc1,_0x1cbdb9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x419e9b,_0x37b1eb)=>_0x419e9b||!!_0x37b1eb),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 _0x42ded1(_0x259dc1,_0x54fd24),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'](_0x34ef7c){this['commentInputView']['focus'](_0x34ef7c);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xc1cc72,_0x150993)=>{const {submitButtonView:_0x437064,cancelButtonView:_0x382042,editor:_0x4b3e10}=this['commentInputView'];[_0x437064['element'],_0x382042['element'],_0x4b3e10?_0x4b3e10['editing']['view']['getDomRoot']():null]['filter'](_0xf6cf8f=>_0xf6cf8f)['some'](_0x200a18=>_0x200a18['contains'](_0x150993['target']))||(this['focus'](),_0x150993['preventDefault']());});}}class cs extends kt{constructor(_0x244b66){super(_0x244b66);const _0x5220aa=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5220aa['to']('count',_0x2ae3db=>E(_0x244b66,'NUMBER_OF_COMMENTS',_0x2ae3db))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x39503c,_0x297056,_0x12085f){super(_0x39503c);const _0x2155ee=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x297056['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x297056,this['_config']=_0x12085f,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x56f3e8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x28df27({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x151230=>this['commentViews']['map'](_0x2ada77=>_0x2ada77['element'])['includes'](_0x151230['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x39503c),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x34df79=>_0x34df79-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4f5d47 of _0x297056['comments'])this['_handleNewCommentModel'](_0x4f5d47);this['_handleInfoComment'](),this['listenTo'](_0x297056['comments'],'add',(_0x150d56,_0x4b02c9)=>{const _0xbb9a92=this['_calculatePosition'](_0x4b02c9);this['length']++,this['_handleNewCommentModel'](_0x4b02c9,_0xbb9a92),this['refreshVisibleViews']();}),this['listenTo'](_0x297056['comments'],'remove',(_0x1e85c7,_0x562438)=>{this['length']--,this['_handleRemoveCommentModel'](_0x562438),this['refreshVisibleViews']();}),this['listenTo'](_0x297056,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x297056,'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',_0x2155ee['if']('length','ck-hidden',_0x58fbbb=>!_0x58fbbb)],'aria-label':E(_0x39503c,'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'](_0x3fb37d){-0x1===_0x3fb37d?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4aab0d of this['commentViews'])_0x4aab0d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x400660,_0x319670){const _0x5a1b8e=new this['_config']['CommentView'](this['locale'],_0x400660,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5a1b8e['viewUid']=_0x400660['id'],_0x5a1b8e['delegate']('removeComment')['to'](this),_0x5a1b8e['delegate']('updateComment')['to'](this),_0x5a1b8e['delegate']('resolveCommentThread')['to'](this),_0x5a1b8e['delegate']('editorReady')['to'](this),_0x5a1b8e['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5a1b8e,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5a1b8e,_0x319670);}['_calculatePosition'](_0x5772b9){const _0x25d540=this['_model']['_findOptimalIndex'](_0x5772b9);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5772b9['authoredAt']?_0x25d540-0x1:_0x25d540:_0x25d540-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4d9db2={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4d9db2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4d9db2));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x2a1837){const _0x13d654=this['commentViews']['remove'](_0x2a1837['id']);this['stopListening'](_0x13d654),_0x13d654['isEditMode']&&this['_updateHasDirtyComment'](),_0x13d654['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x580a8e=>_0x580a8e['isEditMode']);}['_rearrangeCollapse'](){const _0x5b5f18=function(_0xccab6b){const _0x303fba=new _0x20f5ac();for(const _0x1a9fdc of _0xccab6b)_0x303fba['add'](_0x1a9fdc);return _0x303fba;}(this['commentViews']),_0x203a0f=this['_collapsedCommentsView']['count'];for(let _0x269d75=0x1;_0x269d75<=_0x203a0f;_0x269d75++)_0x5b5f18['remove'](0x1);for(const _0x10d346 of _0x5b5f18)_0x10d346['collapse']();_0x203a0f>0x0&&_0x5b5f18['add'](this['_collapsedCommentsView'],0x1),as(_0x4e6603(Array['from'](this['visibleViews']),Array['from'](_0x5b5f18)),this['visibleViews'],_0x5b5f18);}['_rearrangeExpand'](){as(_0x4e6603(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4501a9 of this['visibleViews'])_0x4501a9['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x131e6e=>{this['focusTracker']['add'](_0x131e6e['element']),this['keystrokes']['listenTo'](_0x131e6e['element']);}),this['commentViews']['on']('change',(_0x337bb9,_0x2b2cdf)=>{for(const _0x138a1b of _0x2b2cdf['removed'])this['focusTracker']['remove'](_0x138a1b['element']),this['keystrokes']['stopListening'](_0x138a1b['element']);for(const _0x285338 of Array['from'](_0x2b2cdf['added'])['reverse']())this['focusTracker']['add'](_0x285338['element']),this['keystrokes']['listenTo'](_0x285338['element']);});}}function as(_0x6fb221,_0x75bc0b,_0x2c565c){let _0x16724a=0x0;for(const _0x37e46e of _0x6fb221)switch(_0x37e46e){case'insert':_0x75bc0b['add'](_0x2c565c['get'](_0x16724a),_0x16724a),_0x16724a++;break;case'delete':_0x75bc0b['remove'](_0x16724a);break;case'equal':_0x16724a++;}}class ls extends kt{constructor(_0x500187){super(_0x500187);const _0x3ac45c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3ac45c['to']('contextValue',_0x302b01=>E(_0x500187,'THREAD_CONTEXT_LABEL',_0x302b01)),'tabindex':-0x1},'children':[{'text':_0x3ac45c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5c86a8,_0x70babe){super(_0x5c86a8);const _0x472774=this['bindTemplate'];this['_model']=_0x70babe,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x56f3e8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x28df27({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x53e6f4=>!!_0x53e6f4),this['bind']('contextValue')['to'](this['_model'],'context',_0x321596=>_0x321596&&_0x321596['value']?this['_trimContextValue'](_0x321596['value']):E(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',_0x472774['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 _0x1ce60e=new tt(this['locale']);return _0x1ce60e['label']=E(this['locale'],'Reopen'),_0x1ce60e['tooltip']=E(this['locale'],'Reopen'),_0x1ce60e['icon']=_0x5c102c,_0x1ce60e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5adaa4=>!_0x5adaa4),_0x1ce60e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x40c22e,_0x27ec2c)=>_0x40c22e&&_0x27ec2c),_0x1ce60e['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1ce60e;}['_trimContextValue'](_0x58924d){if(_0x58924d['length']<0x96)return _0x58924d;const _0x379382=_0x58924d['lastIndexOf']('\x20',0x93);return _0x58924d['substring'](0x0,_0x379382>-0x1?_0x379382:0x93)+'...';}['_attachContextActions'](){const _0x12de75=this['element']['querySelector']('.ck-context'),_0x4f6390=_0x12de75['querySelector']('.ck-context__value');this['listenTo'](_0x12de75,'mouseenter',()=>{_0x4f6390['offsetWidth']<_0x4f6390['scrollWidth']&&_0x12de75['classList']['add']('overlay');}),this['listenTo'](_0x12de75,'mouseleave',()=>{_0x12de75['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4366c8 of this['focusables'])this['focusTracker']['add'](_0x4366c8['element']),this['keystrokes']['listenTo'](_0x4366c8['element']);}['_createContextView'](){const _0x38c07c=new ls(this['locale']);return _0x38c07c['bind']('contextValue')['to'](this),_0x38c07c;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x4d6546,_0x2cdd75,_0x445fb4,_0x114be6){super(_0x4d6546),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x2cdd75,this['_localUser']=_0x445fb4,this['_config']=_0x114be6,this['commentThreadHeaderView']=new Yt(_0x4d6546,_0x2cdd75),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x4d6546,E(_0x4d6546,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x4d6546,_0x2cdd75,Object['assign']({'CommentView':this['_config']['CommentView']},_0x114be6)),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',(_0x24e462,_0x58894a)=>_0x24e462||!!_0x58894a),this['bind']('isUnlinked')['to'](_0x2cdd75,'unlinkedAt',_0xd4f630=>!!_0xd4f630),this['bind']('ariaLabel')['to'](this,'length',_0x423345=>{const _0x9f04c6=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x423345,_0x9f04c6]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x56f3e8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x28df27({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1ed6e8=>_0x1ed6e8['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x301d4d=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x4838cc=_0x301d4d['commentInputView'];return _0x301d4d['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x4838cc,'value',(_0x166821,_0x29eae5,_0x7dd5b7,_0x5f3f2b,_0x9af6ca)=>!!_0x9af6ca||!!_0x5f3f2b&&_0x7dd5b7&&!_0x29eae5||_0x166821&&_0x7dd5b7&&!_0x29eae5),_0x4838cc['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x42eb7e,_0x4dcd40,_0x27a3b6)=>{let _0x1eeb17;return _0x1eeb17=_0x27a3b6&&_0x4dcd40?'Reply\x20to\x20reopen\x20discussion...':_0x42eb7e?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x1eeb17);}),_0x4838cc['bind']('submitLabel')['to'](this,'length',_0x192ab3=>E(this['locale'],_0x192ab3?'Reply':'Comment')),_0x4838cc['on']('submit',(_0x5df751,_0x5544e3)=>{this['fire']('addComment',_0x5544e3),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x4838cc['on']('cancel',()=>{this['focus']();}),_0x4838cc['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4838cc['on']('cancel',_0x2b4387=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2b4387['stop']());}),this['on']('change:isActive',(_0x166097,_0x17880a,_0xc4f106)=>{_0xc4f106||this['length']||_0x4838cc['value']||this['fire']('removeCommentThread');}),_0x301d4d;}}class _t extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(rs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x3cc1f3(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3ce86e,target:_0x1e937a,type:_0x5b473d,isVisible:_0x403353=!0x0}){super(),this['view']=_0x3ce86e,this['view']['element']||this['view']['render'](),this['_type']=_0x5b473d,this['_target']=_0x1e937a,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x20f5ac([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x2d8ec9,_0x4afc60)=>{this['view']['focusTracker']['add'](_0x4afc60);}),this['focusableElements']['on']('remove',(_0x1cf2a0,_0x1e1956)=>{this['view']['focusTracker']['remove'](_0x1e1956);}),this['set']('isVisible',_0x403353);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3ae140=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x3ae140),_0x3ae140;}get['targetRect'](){const _0x9d8844=this['target'];if(null===_0x9d8844)return null;if(_0x9d8844 instanceof _0x8e59e0)return _0x9d8844;const _0x3ff2f2=_0x9d8844['filter'](_0x3c8233=>function(_0x5d9f67){const _0x1fe70a=_0x5d9f67['offsetParent'];if(_0x1fe70a)return!0x0;const _0x46b8b7=_0x5d9f67['getClientRects']()['item'](0x0);return!!_0x46b8b7;}(_0x3c8233));return 0x0===_0x3ff2f2['length']?null:new _0x8e59e0(_0x3ff2f2[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x12f11e){this['view']['isActive']=_0x12f11e,this['view']['mainView']['isActive']=_0x12f11e;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3e32a9){if(!(null===_0x3e32a9||_0x3e32a9 instanceof _0x8e59e0||Array['isArray'](_0x3e32a9)&&_0x3e32a9['every'](_0x1bd387=>li(_0x1bd387))))throw new _0x44a585('annotation-invalid-target',null,{'target':_0x3e32a9});}['_getNormalizedTarget'](){const _0x2e4a37='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x2e4a37)?[_0x2e4a37]:_0x2e4a37;}}function li(_0x4e7cc1){return null!==_0x4e7cc1&&'object'==typeof _0x4e7cc1&&'nodeType'in _0x4e7cc1&&0x1===_0x4e7cc1['nodeType'];}class _ extends _0x20f5ac{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2f6b55=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x56f3e8(),this['_focusTracker']['on']('change:isFocused',(_0x27d823,_0x98e8a5,_0x80d64f)=>{_0x80d64f||this['fire']('blur');});for(const _0x358590 of _0x2f6b55)this['add'](_0x358590);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x188587){if(this['has'](_0x188587))throw new _0x44a585('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x188587['innerView'],_0x188587),this['_viewToAnnotation']['set'](_0x188587['view'],_0x188587);for(const _0x45d80c of _0x188587['focusableElements'])this['_focusTracker']['add'](_0x45d80c);this['listenTo'](_0x188587['focusableElements'],'add',(_0x143708,_0x4b1391)=>{this['_focusTracker']['add'](_0x4b1391);}),this['listenTo'](_0x188587['focusableElements'],'remove',(_0x4c274a,_0x33cd6a)=>{this['_focusTracker']['remove'](_0x33cd6a);}),this['listenTo'](_0x188587['view']['focusTracker'],'change:isFocused',(_0x1797ae,_0x2085ef,_0xf0bf3a)=>{_0xf0bf3a&&this['fire']('focus',_0x188587);}),_0x188587['updateTargetRect']();const _0x3b6135=this['_getOrderInContent'](_0x188587['view']['targetRect']);return super['add'](_0x188587,_0x3b6135);}['remove'](_0x1fa6da){if(!this['has'](_0x1fa6da))throw new _0x44a585('annotationcollection-not-existing-item',null);this['stopListening'](_0x1fa6da['view']['focusTracker']),this['stopListening'](_0x1fa6da['focusableElements']);for(const _0x371749 of _0x1fa6da['focusableElements'])this['_focusTracker']['remove'](_0x371749);return this['_viewToAnnotation']['delete'](_0x1fa6da['view']),this['_innerViewToAnnotation']['delete'](_0x1fa6da['innerView']),super['remove'](_0x1fa6da);}['getByInnerView'](_0x262130){return this['_innerViewToAnnotation']['get'](_0x262130);}['getByView'](_0x5e2129){return this['_viewToAnnotation']['get'](_0x5e2129);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2af167 of this)_0x2af167['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4c64cf=Array['from'](this)['sort']((_0x12f4f7,_0x3ec643)=>v(_0x12f4f7['view']['targetRect'],_0x3ec643['view']['targetRect']));for(let _0x236925=_0x4c64cf['length']-0x1;_0x236925>0x0;_0x236925--){const _0x29533d=_0x4c64cf[_0x236925];_0x236925!==this['getIndex'](_0x29533d)&&(this['remove'](_0x29533d),this['add'](_0x29533d));}}['_getOrderInContent'](_0x284679){let _0x2d6040=0x0;if(!_0x284679)return this['length'];for(const _0x43c817 of this){const _0x5e3fd7=_0x43c817['view']['targetRect'];if(_0x5e3fd7){if(v(_0x284679,_0x5e3fd7)<0x0)return _0x2d6040;_0x2d6040++;}}return _0x2d6040;}}function v(_0x2bf213,_0xa4f605){if(null===_0x2bf213&&null===_0xa4f605)return 0x0;if(null===_0x2bf213)return-0x1;if(null===_0xa4f605)return 0x1;const _0x284860=_0x2bf213['top']-_0xa4f605['top'];return 0x0==_0x284860?_0x2bf213['left']-_0xa4f605['left']:_0x284860;}class O extends _0x421416{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x427cca){if(super(_0x427cca),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x427cca instanceof _0x41e8fa){const _0x2169aa=_0x427cca['locale'];_0x427cca['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x2169aa,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x2169aa,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x2169aa,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x2169aa,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x2169aa,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x2169aa,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x2169aa,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x501ad0){this['collection']['add'](_0x501ad0);}['remove'](_0x374708){this['collection']['remove'](_0x374708),_0x374708['destroy']();}['refreshVisibility'](){for(const _0xc30980 of this['collection'])_0xc30980['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2d399a){return this['collection']['getByInnerView'](_0x2d399a);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x13ee9c of this['collection'])_0x13ee9c['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4edcee){this['fire']('_activateAnnotation',_0x4edcee);}['createAnnotation'](_0x115d37){return new d(_0x115d37);}['createAnnotationView'](_0x3d772c,_0x2028e7){return new S(_0x3d772c,_0x2028e7);}['_addActiveAnnotation'](_0x5f4799){const _0x27f9a0=new Set(this['activeAnnotations']);_0x27f9a0['add'](_0x5f4799),this['activeAnnotations']=_0x27f9a0;}['_removeActiveAnnotation'](_0x23158a){const _0x492126=new Set(this['activeAnnotations']);_0x492126['delete'](_0x23158a),this['activeAnnotations']=_0x492126;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2eb47b=this['collection'],_0x3b6693=this['_visibleAnnotations'];function _0x66dee6(_0x2076f1){const _0x23b25f=_0x2076f1['source'];_0x23b25f['isVisible']&&!_0x3b6693['has'](_0x23b25f)?_0x3b6693['add'](_0x23b25f):!_0x23b25f['isVisible']&&_0x3b6693['has'](_0x23b25f)&&_0x3b6693['remove'](_0x23b25f),_0x23b25f['view']['focusTracker']['remove'](_0x23b25f['view']['element']),_0x23b25f['view']['focusTracker']['add'](_0x23b25f['view']['element']);}this['listenTo'](_0x2eb47b,'add',(_0x44b961,_0x3a8fb2)=>{_0x3a8fb2['isVisible']&&_0x3b6693['add'](_0x3a8fb2),this['listenTo'](_0x3a8fb2,'change:isVisible',_0x66dee6);}),this['listenTo'](_0x2eb47b,'remove',(_0x2d5cb2,_0x4356d9)=>{_0x3b6693['has'](_0x4356d9)&&_0x3b6693['remove'](_0x4356d9),this['stopListening'](_0x4356d9,'change:isVisible',_0x66dee6);});}['_setupEnterAnnotationKeystroke'](){const _0x63e49d=_0x582abc=>{_0x582abc['on']('ready',()=>{_0x582abc['keystrokes']['set'](_0x2c0348,(_0x15510b,_0x4c6aa6)=>{const _0x11ea8a=_0x55f116(this['activeAnnotations']['values']());_0x11ea8a&&(_0x11ea8a['view']['focus'](),_0x4c6aa6());});});};this['context']instanceof _0x41e8fa?_0x63e49d(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x51cedc,_0x1b8346)=>{_0x63e49d(_0x1b8346);});}['_setupEscapeAnnotationHandling'](){const _0x312f74=_0x315074=>{const _0x35cd51=_0x315074['source'],_0x12888d=[];let _0xb273ea;if(Array['isArray'](_0x35cd51['target'])){_0xb273ea=_0x35cd51['target'][0x0],this['context']instanceof _0x41e8fa?_0x12888d['push'](this['context']):this['context']['editors']&&_0x12888d['push'](...this['context']['editors']);for(const _0x4745b5 of _0x12888d)for(const _0x7a21b4 of _0x4745b5['editing']['view']['domRoots']['values']())if(_0x7a21b4['contains'](_0xb273ea))return void _0x4745b5['editing']['view']['focus']();_0xb273ea['focus']();}};this['listenTo'](this['collection'],'add',(_0x2120c7,_0x40127f)=>{this['listenTo'](_0x40127f,'escape',_0x312f74,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x18c98e,_0x1cf475)=>{this['stopListening'](_0x1cf475,'escape',_0x312f74);});}}const Nt=Symbol('noChannel'),xt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x421416{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,pt,at];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2726bb){super(_0x2726bb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x282567=this['context']['config'];_0x282567['define']('comments.maxCommentsWhenCollapsed',0x2),_0x282567['define']('comments.maxThreadTotalWeight',0x1f4),_0x282567['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x282567['define']('comments.CommentThreadView',_t),_0x282567['define']('comments.CommentView',bt),_0x282567['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2c348a=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x2e2cd1,_0x1db1ff)=>this['_addCommentThread'](_0x1db1ff)),this['on']('submitCommentThread',(_0x2d6c5d,_0x4275e4)=>this['_submitCommentThread'](_0x4275e4)),this['on']('resolveCommentThread',(_0x4dd0d7,_0x3ad10c)=>this['_resolveCommentThread'](_0x3ad10c)),this['on']('resolveCommentThread',(_0x1db305,_0x46826d)=>this['_updateActiveAnnotation'](_0x46826d),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1cd103,_0x43d16f)=>this['_reopenCommentThread'](_0x43d16f)),this['on']('reopenCommentThread',(_0x2f64ae,_0x1cd777)=>this['_updateActiveAnnotation'](_0x1cd777),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x52a6fa,_0x346516)=>this['_removeCommentThread'](_0x346516)),this['on']('updateCommentThread',(_0xd92905,_0x335b9a)=>this['_updateCommentThread'](_0x335b9a)),this['on']('updateCommentThread',(_0x431c22,_0x289d6b)=>this['_updateActiveAnnotation'](_0x289d6b),{'priority':'lowest'}),this['on']('addComment',(_0x52c7cd,_0x200068)=>this['_addComment'](_0x200068)),this['on']('updateComment',(_0x5195b0,_0x23a448)=>this['_updateComment'](_0x23a448)),this['on']('removeComment',(_0x364c23,_0x2140a5)=>this['_removeComment'](_0x2140a5)),this['on']('addComment',(_0x51095b,{threadId:_0xe6996b,isFromAdapter:_0x544d4b})=>{if(_0x544d4b)return;const _0x471811=this['getCommentThread'](_0xe6996b),_0x118590=_0x471811&&this['_threadToController']['get'](_0x471811);_0x118590&&_0x118590['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2c348a,'change:activeAnnotations',(_0x3f8d45,_0x40b844,_0x121bdc)=>{const _0x464c20=Array['from'](_0x121bdc)['map'](_0x3ef9a5=>this['_viewToController']['get'](_0x3ef9a5['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x464c20?_0x464c20['model']:null;});}set['adapter'](_0x6c0250){if(this['_adapter'])throw new _0x44a585('commentsrepository-adapter-already-set');this['_adapter']=_0x6c0250;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2941d6=Nt,threadId:_0x1cd515=_0x17c280(),comments:_0x43daed=[],unlinkedAt:_0x4bf7e8=null,resolvedAt:_0x59b434=null,resolvedBy:_0x15c2e8=null,target:_0x375138=null,context:_0x488654=null,attributes:_0x382f3e={},isResolvable:_0x1eede4=!0x0,isSubmitted:_0x468a4a=!0x1,isFromAdapter:_0x127b34=!0x1}={}){return this['fire'](Pt('addCommentThread',_0x2941d6),{'channelId':_0x2941d6,'threadId':_0x1cd515,'comments':_0x43daed,'unlinkedAt':_0x4bf7e8,'resolvedAt':_0x59b434,'resolvedBy':_0x15c2e8,'target':_0x375138,'context':_0x488654,'attributes':_0x382f3e,'isFromAdapter':_0x127b34,'isResolvable':_0x1eede4,'isSubmitted':_0x468a4a}),this['getCommentThread'](_0x1cd515);}['openNewCommentThread']({channelId:_0x3faf6e=Nt,threadId:_0x37d797=_0x17c280(),target:_0x1c6c11,context:_0x375f43=null,isResolvable:_0x2c1e97=!0x0}){if(this['_readOnlyChannels']['has'](_0x3faf6e)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1c6c11)throw new _0x44a585('commentsrepository-missing-target');const _0x5c5f91=this['addCommentThread']({'channelId':_0x3faf6e,'threadId':_0x37d797,'target':_0x1c6c11,'context':_0x375f43,'isResolvable':_0x2c1e97});if(!_0x5c5f91)return null;const _0x5c1d40=this['_threadToController']['get'](_0x5c5f91),_0x46f985=_0x5c1d40['view']['commentThreadInputView']['commentInputView'],_0x3d54d6=this['context']['plugins']['get'](O),_0x371c2d=_0x3d54d6['getByInnerView'](_0x5c1d40['view']);return _0x3d54d6['activate'](_0x371c2d),_0x46f985['once']('editorReady',()=>_0x46f985['focus']()),_0x5c5f91;}['hasCommentThread'](_0x1a83d8){if('string'!=typeof _0x1a83d8)throw new _0x44a585('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x1a83d8);}['updateCommentThread']({channelId:_0x481db5=Nt,threadId:_0x2b6a2d,context:_0xb8166e,unlinkedAt:_0x180984,attributes:_0x2c9522,isFromAdapter:_0x3cdcb9=!0x1}){return this['fire'](Pt('updateCommentThread',_0x481db5),{'channelId':_0x481db5,'threadId':_0x2b6a2d,'context':_0xb8166e,'unlinkedAt':_0x180984,'attributes':_0x2c9522,'isFromAdapter':_0x3cdcb9}),this['getCommentThread'](_0x2b6a2d);}['getCommentThread'](_0x24a88e){if('string'!=typeof _0x24a88e)throw new _0x44a585('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x24a88e);}['fetchCommentThread']({channelId:_0x184683,threadId:_0x49429d}={}){const _0x35a3fd=this['getCommentThread'](_0x49429d);if(_0x35a3fd)return Promise['resolve'](_0x35a3fd);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x44a585('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x184683,'threadId':_0x49429d})['then'](_0x2733d4=>this['hasCommentThread'](_0x49429d)?this['getCommentThread'](_0x49429d):_0x2733d4?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x184683},_0x2733d4)):void 0x0)['catch'](_0x2d4836=>{throw console['error'](_0x2d4836),new _0x44a585('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x370218,skipNotAttached:_0x1ad58e=!0x1,skipEmpty:_0x542f45=!0x1,toJSON:_0x208dc1=!0x1}={}){const _0xe7a25b=[];for(const _0x28501c of this['_threads']['values']())_0x370218&&_0x28501c['channelId']!==_0x370218||_0x1ad58e&&!_0x28501c['isAttached']||_0x542f45&&0x0===_0x28501c['length']||_0xe7a25b['push'](_0x28501c);return _0x208dc1?_0xe7a25b['map'](_0x2aa8a2=>_0x2aa8a2['toJSON']()):_0xe7a25b;}['setActiveCommentThread'](_0x367f62){const _0x472f71=this['context']['plugins']['get'](O);if(!_0x367f62)return void(this['activeCommentThread']&&_0x472f71['deactivateAll']());const _0x47f1ff=this['getCommentThread'](_0x367f62);if(!_0x47f1ff)throw new _0x44a585('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x367f62});if(!this['_threadToController']['has'](_0x47f1ff))throw new _0x44a585('commentsrepository-active-not-attached',null,{'threadId':_0x367f62});const _0x385204=_0x472f71['getByInnerView'](this['_threadToController']['get'](_0x47f1ff)['view']);_0x472f71['activate'](_0x385204);}['switchReadOnly'](_0x3fb8d6,_0x237b88){_0x3fb8d6?this['_readOnlyChannels']['add'](_0x237b88):this['_readOnlyChannels']['delete'](_0x237b88),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x59ede7){return this['_readOnlyChannels']['has'](_0x59ede7)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x4d24c4,_0x217e95){return new Tt(_0x4d24c4,_0x217e95);}['setPermissions'](_0x38ee96,_0x31f882=Nt){this['_permissions']['set'](_0x31f882,_0x38ee96),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x17c6c7=Nt){return this['_permissions']['has'](_0x17c6c7)?this['_permissions']['get'](_0x17c6c7):xt;}['_addCommentThread']({channelId:_0x2a393b,threadId:_0x46f6fe,comments:_0x1163c8,unlinkedAt:_0x723a43,resolvedAt:_0x2c6007,resolvedBy:_0x18dbda,target:_0x3cf01c,context:_0x410efb,attributes:_0x15f3d7,isFromAdapter:_0x145b76,isResolvable:_0x16fef2,isSubmitted:_0x2f8bb7}){if('string'!=typeof _0x46f6fe)throw new _0x44a585('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x46f6fe});if(this['hasCommentThread'](_0x46f6fe))throw new _0x44a585('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x46f6fe});const _0x1f892f=new ui(this,{'channelId':_0x2a393b,'id':_0x46f6fe,'context':_0x410efb,'attributes':_0x15f3d7,'unlinkedAt':_0x723a43,'resolvedAt':_0x2c6007,'resolvedBy':_0x18dbda?this['context']['plugins']['get'](at)['getUser'](_0x18dbda):null,'isResolvable':_0x16fef2,'isSubmitted':_0x2f8bb7||_0x145b76});this['_threads']['set'](_0x46f6fe,_0x1f892f);for(const _0x3a493e of _0x1163c8)_0x1f892f['_add'](this['_createNewComment']({'threadId':_0x46f6fe,..._0x3a493e}));return _0x3cf01c&&_0x1f892f['attachTo'](_0x3cf01c),_0x145b76||!_0x1f892f['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2a393b,'threadId':_0x46f6fe});}['_submitCommentThread']({channelId:_0x500348,threadId:_0x4f2ae5}){if(!this['hasCommentThread'](_0x4f2ae5))throw new _0x44a585('commentsrepository-missing-comment-thread',this);const _0x5452d4=this['getCommentThread'](_0x4f2ae5);if(_0x5452d4['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x53a684,comments:_0x5e9bac,resolvedAt:_0x26b0b5,resolvedBy:_0x538425,context:_0x34646d,attributes:_0x20e3a2}=_0x5452d4,_0xb7e888=this['context']['plugins']['get']('PendingActions'),_0x262cfa=_0xb7e888['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x500348,'threadId':_0x53a684,'comments':_0x5e9bac['map'](_0x3aab7f=>_0x3aab7f['toJSON']()),'resolvedAt':_0x26b0b5,'resolvedBy':_0x538425?_0x538425['id']:_0x538425,'context':_0x34646d,'attributes':_0x20e3a2})['then'](({comments:_0x7c9f10})=>{_0xb7e888['remove'](_0x262cfa);for(const _0x366a8d of _0x7c9f10)this['_updateComment']({'channelId':_0x500348,'threadId':_0x4f2ae5,'commentId':_0x366a8d['commentId'],'createdAt':_0x366a8d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5b0aa0=>{throw console['error'](_0x5b0aa0),new _0x44a585('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x2ef29d,target:_0x54239d}){const _0x175412=this['getCommentThread'](_0x2ef29d);if(!_0x175412)throw new _0x44a585('commentsrepository-attach-missing-comment-thread',this);const _0x1fd8f5=this['context']['plugins']['get']('PendingActions'),_0x256cea=this['context']['plugins']['get'](O),_0x361a97=this['_createCommentThreadView'](_0x175412),_0x288926=new Tt(_0x175412,_0x361a97);let _0x4092c1=null;_0x361a97['on']('change:isDirty',(_0x404170,_0x40dbfa,_0xce2c3d)=>{_0xce2c3d?_0x4092c1=_0x1fd8f5['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4092c1&&(_0x1fd8f5['remove'](_0x4092c1),_0x4092c1=null);}),this['_threadToController']['set'](_0x175412,_0x288926),this['_viewToController']['set'](_0x361a97,_0x288926);const _0xb07f2b=new S(this['context']['locale'],_0x361a97);_0xb07f2b['bind']('length')['to'](_0x361a97),_0xb07f2b['bind']('isDirty')['to'](_0x361a97,'isDirty',_0x361a97,'length',(_0x49e70f,_0x207e25)=>_0x49e70f||!_0x207e25),_0xb07f2b['bind']('isActive')['to'](_0x361a97),_0xb07f2b['type']='comment';const _0x3083d8=new d({'view':_0xb07f2b,'target':_0x54239d,'type':'comment','isVisible':!_0x175412['archivedAt']});return _0x361a97['on']('escape',()=>{_0x3083d8['fire']('escape');}),this['_bindAnnotationToEditors'](_0x361a97,_0x3083d8),_0x256cea['add'](_0x3083d8),_0x3083d8;}['_bindAnnotationToEditors'](_0x1a329e,_0x2e539d){this['listenTo'](_0x1a329e,'editorReady',(_0x516580,_0x35baf8)=>{const _0x5110e3=_0x35baf8['ui']['view']['body']['bodyCollectionContainer'];_0x2e539d['focusableElements']['add'](_0x5110e3),this['context']instanceof _0x41e8fa&&this['context']['ui']['focusTracker']['add'](_0x5110e3);},{'priority':'highest'}),this['listenTo'](_0x1a329e,'editorDestroyed',(_0x5c34eb,_0x495050)=>{const _0x197b61=_0x495050['ui']['view']['body']['bodyCollectionContainer'];_0x2e539d['focusableElements']['has'](_0x197b61)&&_0x2e539d['focusableElements']['remove'](_0x197b61),this['context']instanceof _0x41e8fa&&this['context']['ui']['focusTracker']['remove'](_0x197b61);});}['_unbindEditors'](_0x28695f){this['stopListening'](_0x28695f,'editorReady'),this['stopListening'](_0x28695f,'editorDestroyed');}['_createCommentThreadView'](_0x54a216){const _0x2dfbbd=this['context']['plugins']['get'](at),{config:_0x4ac705,locale:_0x4b9dbf}=this['context'],_0x19b327=It(_0x4ac705['get']('locale'),_0x4b9dbf);return new(0x0,(_0x4ac705['get']('comments'))['CommentThreadView'])(_0x4b9dbf,_0x54a216,_0x2dfbbd['me'],{'editorConfig':{..._0x4ac705['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4ac705['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4ac705['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4ac705['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4ac705['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x19b327,'CommentView':_0x4ac705['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x121d01,channelId:_0x44e330,resolvedAt:_0x373f67,resolvedBy:_0x4f156a,isFromAdapter:_0x457e16}){if(!this['hasCommentThread'](_0x121d01))throw new _0x44a585('commentsrepository-missing-comment-thread',null,{'threadId':_0x121d01});const _0x7b1a56=this['getCommentThread'](_0x121d01);if(_0x7b1a56['isResolved'])throw new _0x44a585('commentsrepository-resolved-comment-thread',null,{'threadId':_0x121d01});const _0x2dbec1=this['context']['plugins']['get'](at);if(_0x7b1a56['resolvedBy']=_0x2dbec1['getUser'](_0x4f156a),_0x7b1a56['resolvedAt']=_0x373f67,_0x457e16||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x48c8a6=this['context']['plugins']['get']('PendingActions'),_0x3a4042=_0x48c8a6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x44e330,'threadId':_0x121d01})['then'](({resolvedAt:_0x4e8e55,resolvedBy:_0x190ff8})=>{_0x48c8a6['remove'](_0x3a4042),_0x7b1a56['resolvedBy']['id']!==_0x190ff8&&(_0x7b1a56['resolvedBy']=_0x2dbec1['getUser'](_0x190ff8)),_0x7b1a56['resolvedAt']=_0x4e8e55;})['catch'](_0x2255f2=>{throw console['error'](_0x2255f2),new _0x44a585('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x58d5b8,channelId:_0x4a0b0f,isFromAdapter:_0x4edb9d}){if(!this['hasCommentThread'](_0x58d5b8))throw new _0x44a585('commentsrepository-missing-comment-thread',null,{'threadId':_0x58d5b8});const _0x4bc745=this['getCommentThread'](_0x58d5b8);if(!_0x4bc745['isResolved'])throw new _0x44a585('commentsrepository-reopen-comment-thread',null,{'threadId':_0x58d5b8});if(_0x4bc745['resolvedBy']=null,_0x4bc745['resolvedAt']=null,_0x4edb9d||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5d0e9e=this['context']['plugins']['get']('PendingActions'),_0x5db355=_0x5d0e9e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4a0b0f,'threadId':_0x58d5b8})['then'](()=>_0x5d0e9e['remove'](_0x5db355))['catch'](_0x36f436=>{throw console['error'](_0x36f436),new _0x44a585('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x147e62,isFromAdapter:_0x72dcbc}){const _0x130f6b=this['getCommentThread'](_0x147e62);if(!_0x130f6b)throw new _0x44a585('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x147e62),this['_threads']['delete'](_0x147e62),!_0x130f6b['isSubmitted']||_0x72dcbc||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x13d0d7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x12a928}=_0x130f6b,_0x462f96=_0x13d0d7['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x12a928,'threadId':_0x147e62})['then'](()=>_0x13d0d7['remove'](_0x462f96))['catch'](_0x4438ed=>{throw console['error'](_0x4438ed),new _0x44a585('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x18cda4,unlinkedAt:_0x3964c8,context:_0x29e68d,attributes:_0x223e65,isFromAdapter:_0x68235b}){if('string'!=typeof _0x18cda4)throw new _0x44a585('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x18cda4});if(!this['hasCommentThread'](_0x18cda4))throw new _0x44a585('commentsrepository-missing-comment-thread',null,{'threadId':_0x18cda4});const _0x5a2a1c=this['getCommentThread'](_0x18cda4);let _0x1d9e37=!0x1;if(void 0x0!==_0x29e68d&&_0x5a2a1c['context']!==_0x29e68d&&(_0x5a2a1c['context']=_0x29e68d,_0x1d9e37=!0x0),void 0x0!==_0x3964c8&&_0x5a2a1c['unlinkedAt']!==_0x3964c8&&(_0x5a2a1c['unlinkedAt']=_0x3964c8,_0x1d9e37=!0x0),_0x223e65&&!Ct(_0x223e65,_0x5a2a1c['attributes'])&&(_0x5a2a1c['attributes']=_0x223e65,_0x1d9e37=!0x0),!_0x1d9e37)return Promise['resolve']();if(!_0x5a2a1c['isSubmitted']||_0x68235b||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x84e148=this['context']['plugins']['get']('PendingActions'),{channelId:_0x460284}=_0x5a2a1c,_0x2ac0f9=_0x84e148['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x460284,'threadId':_0x18cda4,'context':_0x29e68d,'unlinkedAt':_0x3964c8,'attributes':_0x223e65})['then'](()=>_0x84e148['remove'](_0x2ac0f9))['catch'](_0x2f678a=>{throw console['error'](_0x2f678a),new _0x44a585('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3b5181){const _0x5627cd=this['context']['plugins']['get'](O),_0x5cde31=this['getCommentThread'](_0x3b5181);if(_0x5cde31['_isAttached']=!0x1,this['_threadToController']['has'](_0x5cde31)){const _0x23cfa2=this['_threadToController']['get'](_0x5cde31),_0x401615=_0x23cfa2['view'],_0x10a47f=_0x5627cd['getByInnerView'](_0x401615);this['_threadToController']['delete'](_0x5cde31),this['_viewToController']['delete'](_0x401615),_0x10a47f&&_0x5627cd['remove'](_0x10a47f),_0x23cfa2['destroy'](),_0x401615['destroy']()['then'](()=>{this['_unbindEditors'](_0x401615);});}}['_updateActiveAnnotation']({threadId:_0x4e3b27,resolvedAt:_0x55c2c0,unlinkedAt:_0x47381c}){const _0xde07b0=!!_0x55c2c0,_0x2ed3de=this['context']['plugins']['get'](O),_0x2e0d16=this['getCommentThread'](_0x4e3b27);if(this['_threadToController']['has'](_0x2e0d16)){const _0x3940a2=this['_threadToController']['get'](_0x2e0d16)['view'],_0x1afc69=_0x2ed3de['getByInnerView'](_0x3940a2);_0x1afc69&&(_0xde07b0&&_0x2ed3de['_removeActiveAnnotation'](_0x1afc69),_0x47381c?_0x1afc69['isVisible']=!0x1:_0x1afc69['refreshVisibility']());}}['_getExternalAuthor'](_0x319108){const _0x5e378c=this['context']['plugins']['get'](at),_0x4de485=At('external:'+_0x319108),_0x181103=_0x5e378c['getUser'](_0x4de485);return _0x181103||_0x5e378c['addUser']({'id':_0x4de485,'name':_0x319108});}['_createNewComment']({threadId:_0x204a10,commentId:_0x55a891=_0x17c280(),content:_0x3a4b71,authorId:_0x2bf3e3,createdAt:_0x289c40,attributes:_0x835902}){if('string'!=typeof _0x55a891)throw new _0x44a585('commentsrepository-invalid-commentid');if('string'!=typeof _0x2bf3e3)throw new _0x44a585('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3a4b71||!_0x3a4b71['trim']())throw new _0x44a585('commentsrepository-invalid-comment-content');const _0x5ad88d=this['context']['plugins']['get'](at)['getUser'](_0x2bf3e3);if(!_0x5ad88d)throw new _0x44a585('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2bf3e3});let _0x4b599c=null,_0x5c23b6=_0x289c40;return _0x835902?.['@external']&&(_0x4b599c=this['_getExternalAuthor'](_0x835902['@external']['authorName']),_0x5c23b6=new Date(_0x835902['@external']['createdAt'])),new fi(this,{'threadId':_0x204a10,'id':_0x55a891,'author':_0x4b599c||_0x5ad88d,'creator':_0x5ad88d,'content':_0x3a4b71,'createdAt':_0x289c40,'authoredAt':_0x5c23b6,'attributes':_0x835902});}['_addComment'](_0x4a11f9){let {threadId:_0x10b453,content:_0x2e2b75,attributes:_0x53edc9,isFromAdapter:_0x421893}=_0x4a11f9;const _0x2c1b5d=this['getCommentThread'](_0x4a11f9['threadId']);if(!_0x2c1b5d)throw new _0x44a585('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x50372=this['_createNewComment'](_0x4a11f9),{id:_0x23f417}=_0x50372;if(_0x2c1b5d['_add'](_0x50372),_0x421893||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2c1b5d['isSubmitted'])return Promise['resolve']();const _0x5f1f32=this['context']['plugins']['get']('PendingActions'),{channelId:_0x215dc7}=_0x2c1b5d,_0x5f32fe=_0x5f1f32['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x53edc9||(_0x53edc9={}),this['adapter']['addComment']({'channelId':_0x215dc7,'threadId':_0x10b453,'commentId':_0x23f417,'content':_0x2e2b75,'attributes':_0x53edc9})['then'](_0x29ef3b=>{_0x5f1f32['remove'](_0x5f32fe),_0x29ef3b&&this['_updateComment']({'channelId':_0x215dc7,'threadId':_0x10b453,'commentId':_0x23f417,'createdAt':_0x29ef3b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x104812=>{throw console['error'](_0x104812),new _0x44a585('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x27935d,commentId:_0x32ec66,content:_0x580ac9,createdAt:_0x29ab8e,attributes:_0x217d4f,isFromAdapter:_0x220c47}){if(void 0x0!==_0x580ac9&&('string'!=typeof _0x580ac9||!_0x580ac9['trim']()['length']))throw new _0x44a585('commentsrepository-update-comment-invalid-content');const _0x2406ed=this['getCommentThread'](_0x27935d),_0x49dcd8=_0x2406ed['getComment'](_0x32ec66);if(!_0x49dcd8)throw new _0x44a585('commentsrepository-update-missing-comment',this);let _0x3193d0=!0x1;if(_0x580ac9&&_0x580ac9!==_0x49dcd8['content']&&(_0x49dcd8['isEditable']||_0x220c47)&&(_0x49dcd8['content']=_0x580ac9,_0x3193d0=!0x0),_0x29ab8e&&_0x29ab8e!==_0x49dcd8['createdAt']&&(_0x49dcd8['createdAt']=_0x29ab8e,_0x49dcd8['attributes']&&_0x49dcd8['attributes']['@external']||(_0x49dcd8['authoredAt']=_0x29ab8e),_0x3193d0=!0x0),_0x217d4f&&!Ct(_0x217d4f,_0x49dcd8['attributes'])&&(_0x49dcd8['attributes']=_0x217d4f,_0x3193d0=!0x0),!_0x3193d0)return Promise['resolve']();if(_0x2406ed['fire']('commentUpdated'),_0x220c47||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x34665b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5f072a}=this['getCommentThread'](_0x49dcd8['threadId']),_0x55c99e=_0x34665b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5f072a,'threadId':_0x27935d,'commentId':_0x32ec66,'content':_0x580ac9,'attributes':_0x217d4f})['then'](()=>_0x34665b['remove'](_0x55c99e))['catch'](_0x2b810d=>{throw console['error'](_0x2b810d),new _0x44a585('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x118844,commentId:_0x25e733,isFromAdapter:_0x3d5f78}){const _0x529a9a=this['getCommentThread'](_0x118844),_0x33685f=_0x529a9a['getComment'](_0x25e733);if(!_0x33685f)throw new _0x44a585('commentsrepository-remove-missing-comment',this);if(_0x529a9a['_remove'](_0x33685f),_0x3d5f78||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x7fcbc4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a3aac}=_0x529a9a,_0x2d1d38=_0x7fcbc4['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2a3aac,'threadId':_0x118844,'commentId':_0x25e733})['then'](()=>_0x7fcbc4['remove'](_0x2d1d38))['catch'](_0x1c834c=>{throw console['error'](_0x1c834c),new _0x44a585('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3cc1f3(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x3e1fbf,_0x868f88){super();const _0xbe04cd=_0x3e1fbf['context']['plugins']['get'](at)['me'],_0x5aca32=_0x3e1fbf['getCommentThread'](_0x868f88['threadId']),_0x5c77ba=0x0===_0x5aca32['comments']['length'],_0x49e559=_0xbe04cd===_0x868f88['author'];this['id']=_0x868f88['id'],this['threadId']=_0x868f88['threadId'],this['author']=_0x868f88['author'],this['creator']=_0x868f88['creator'],this['isExternal']=Boolean(_0x868f88['attributes']&&_0x868f88['attributes']['@external']),this['set']('content',_0x868f88['content']),this['createdAt']=_0x868f88['createdAt']||new Date(),this['set']('authoredAt',_0x868f88['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x5aca32,'resolvedAt'),this['set']('attributes',_0x868f88['attributes']||{}),this['bind']('isEditable')['to'](_0x3e1fbf,'_permissions',()=>{const _0x52a1d8=_0x3e1fbf['getPermissions'](_0x5aca32['channelId'])['write'],_0x2e227b=_0x3e1fbf['getPermissions'](_0x5aca32['channelId'])['modifyAll'];return _0x49e559&&_0x52a1d8||!_0x49e559&&_0x2e227b;}),this['bind']('isRemovable')['to'](_0x5aca32,'isRemovable',_0x3e1fbf,'_permissions',_0x1c7772=>{const _0x5d50f3=_0x3e1fbf['getPermissions'](_0x5aca32['channelId'])['write'],_0x3e3076=_0x3e1fbf['getPermissions'](_0x5aca32['channelId'])['modifyAll'];return _0x49e559&&_0x5d50f3||_0x1c7772&&_0x5c77ba||!_0x49e559&&_0x3e3076&&!_0x5c77ba;}),this['bind']('isReadOnly')['to'](_0x5aca32,'isReadOnly'),this['_repository']=_0x3e1fbf;}get['weight'](){return Math['max'](function(_0x2d2125){const _0x286f70=document['createElement']('div');return _0x286f70['innerHTML']=_0x2d2125,_0x286f70['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1dad32){const {threadId:_0x5454b2,id:_0x752635}=this;if(!this['_repository']['hasCommentThread'](_0x5454b2))throw new _0x44a585('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x396cab}=this['_repository']['getCommentThread'](_0x5454b2);this['_repository']['fire'](Pt('updateComment',_0x396cab,_0x5454b2),{'channelId':_0x396cab,'threadId':_0x5454b2,'commentId':_0x752635,..._0x1dad32});}['setAttribute'](_0x4cab39,_0x5459e1){const _0x84b8a4=yt(this['attributes']);vt(_0x84b8a4,_0x4cab39,_0x5459e1),this['update']({'attributes':_0x84b8a4});}['removeAttribute'](_0x38c37c){const _0x45b187=yt(this['attributes']);gt(_0x45b187,_0x38c37c),this['update']({'attributes':_0x45b187});}['remove'](_0x10b560={}){if(!_0x10b560['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x57865e,id:_0x4bb1d8}=this;if(!this['_repository']['hasCommentThread'](_0x57865e))throw new _0x44a585('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5751b9}=this['_repository']['getCommentThread'](_0x57865e);this['_repository']['fire'](Pt('removeComment',_0x5751b9,_0x57865e),{'channelId':_0x5751b9,'threadId':_0x57865e,'commentId':_0x4bb1d8,..._0x10b560});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Pt(_0x5dd633,..._0x2336b8){for(const _0xd5acbb of _0x2336b8)void 0x0!==_0xd5acbb&&(_0x5dd633+=':'+String(_0xd5acbb));return _0x5dd633;}class W extends _0x3c4e9e{['refresh'](){const _0x5c51f7=this['editor']['model']['document']['selection'];for(const _0x501f8c of _0x5c51f7['getRanges']())if(this['_hasContent'](_0x501f8c))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x45bed7=_0x17c280()}={}){const _0x2a3d87=this['editor']['model'],_0x1196bd=[];for(const _0x1ca1d8 of _0x2a3d87['document']['selection']['getRanges']())this['_hasContent'](_0x1ca1d8)&&_0x1196bd['push'](this['_trimToContent'](_0x1ca1d8));_0x2a3d87['change'](_0x255575=>{for(const _0x574838 of _0x1196bd){const _0x3a794c=_0x17c280()['substr'](0x1,0x5),_0x135bcc='comment:'+_0x45bed7+':'+_0x3a794c;_0x255575['addMarker'](_0x135bcc,{'range':_0x574838,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x2bfc9c){for(const _0x4b6176 of _0x2bfc9c['getItems']())if(this['_itemIsContent'](_0x4b6176))return!0x0;return!0x1;}['_itemIsContent'](_0x51b3bf){return _0x51b3bf['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x51b3bf)&&!_0x51b3bf['is']('element','tableCell');}['_trimToContent'](_0x5ecf98){const _0xe88890=_0x4ea379=>!this['_itemIsContent'](_0x4ea379['item']),_0x3421ff=_0x5ecf98['start']['getLastMatchingPosition'](_0xe88890),_0x1199a5=_0x5ecf98['end']['getLastMatchingPosition'](_0xe88890,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3421ff,_0x1199a5);}}class P extends _0x1ba062{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1cde6b){super(_0x1cde6b),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2d50b3=this['editor'],_0x3f582c=_0x2d50b3['model']['document']['selection'],_0x163168=_0x34c114(()=>this['refreshSelectedViews'](),0xa);_0x3f582c['on']('change:range',(_0x57c593,_0x2ce842)=>{_0x2ce842['directChange']&&(_0x163168['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2d50b3['editing']['view']['document'],'change:isFocused',(_0x43d3c0,_0x1200b9,_0x93b74a)=>{_0x93b74a&&_0x163168();}),this['listenTo'](_0x2d50b3['ui']['focusTracker'],'change:isFocused',(_0x16b3de,_0x14be84,_0xda80c5)=>{_0xda80c5||_0x2d50b3['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1f36ea=>this['_editorAnnotationsData']['has'](_0x1f36ea['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x41c5a9){if(this['_editorAnnotations']['has'](_0x41c5a9['view']))return;this['_editorAnnotations']['add'](_0x41c5a9['view']),this['editor']['ui']['focusTracker']['add'](_0x41c5a9['view']['element']);const _0x1313fb=this['editor']['plugins']['get'](O);this['listenTo'](_0x1313fb['collection'],'remove',(_0x449dd4,_0xcad687)=>{this['editor']['ui']['focusTracker']['remove'](_0xcad687['view']['element']),this['_editorAnnotations']['delete'](_0xcad687['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x13f8f3){if('function'!=typeof _0x13f8f3)throw new _0x44a585('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x13f8f3);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2ae76e,annotations:_0x222fed}){const _0x3f772f=[],_0x33d28f=this['editor']['model']['document']['selection'],_0x339f57=Array['from'](_0x33d28f['getRanges']());for(const [_0x58777e,_0x3e05f8]of this['_editorAnnotationsData']){const _0x4d85e7=_0x4c271c(_0x3e05f8),_0x86e668=_0x222fed['getByInnerView'](_0x58777e);_0x4d85e7&&_0x86e668&&_0x3f772f['push']({'annotation':_0x86e668,'range':_0x4d85e7});}function _0x4c271c(_0x75033a){for(const _0x5aab41 of _0x75033a)for(const _0x5595be of _0x339f57)if(_0x5aab41['containsRange'](_0x5595be,!_0x33d28f['isCollapsed']))return _0x5aab41;return null;}return _0x3f772f['sort']((_0x3eff9a,_0x309100)=>{const _0x31a400=_0x3eff9a['range'],_0x5b1513=_0x309100['range'];if(!_0x31a400['isEqual'](_0x5b1513)){if(_0x31a400['containsRange'](_0x5b1513,!0x0))return 0x1;if(_0x5b1513['containsRange'](_0x31a400,!0x0))return-0x1;}return _0x3eff9a['annotation']==_0x2ae76e?-0x1:_0x309100['annotation']==_0x2ae76e?0x1:0x0;})['map'](_0x59fd5f=>_0x59fd5f['annotation']);}get['_editorAnnotationsData'](){const _0x5f24e3=new Map();for(const _0x36038b of Array['from'](this['_dataCollectors']))for(const [_0x21d50d,_0x3a3b45]of _0x36038b())_0x5f24e3['set'](_0x21d50d,_0x3a3b45);return _0x5f24e3;}}class ut extends _0x1ba062{['afterInit'](){const _0x1021e9=this['editor'];if(!_0x1021e9['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1021e9['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ft extends _0x1ba062{constructor(_0x20b24d){super(_0x20b24d),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x218357=this['editor'],_0x4441bd=_0x218357['commands']['get']('importWord'),_0x1f52e7=_0x218357['plugins']['get'](at);_0x4441bd&&(_0x4441bd['on']('execute',(_0x7ccc74,[,_0x220e7c])=>{_0x220e7c['collaboration_features']={'comments':!0x0,'user_id':_0x1f52e7['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x4441bd,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1d15fa,_0xf8a1d){const {comment_threads:_0x280a9e}=_0xf8a1d;_0x280a9e&&_0x280a9e['forEach'](({thread_id:_0x1bf352,comments:_0x15f509,is_resolved:_0x53e178})=>{const _0x5491bf=new Date(),_0x2a1a65=_0x15f509['map'](({author:_0x63c821,content:_0x23f742,created_at:_0x13ba38})=>({'content':_0x23f742,'authorId':this['editor']['plugins']['get'](at)['me']['id'],'createdAt':_0x5491bf,'attributes':{'@external':{'authorName':_0x63c821,'createdAt':_0x13ba38?new Date(_0x13ba38):new Date(),'source':'importWord'}}})),_0x223d29=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x223d29,'threadId':_0x1bf352,'comments':_0x2a1a65,'resolvedAt':_0x53e178?_0x5491bf:null});});}}class dt extends _0x1ba062{constructor(_0x45554a){super(_0x45554a),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Rt,Mt];}['afterInit'](){const _0x531479=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x531479,'contentInsertion',(_0x5d035a,_0x41f361)=>this['_removeMarkersWithoutThreads'](_0x41f361['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2fd7e6){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2fd7e6;const _0x2c286f=this['editor']['plugins']['get']('CommentsRepository');for(const _0x42feec of _0x2fd7e6['keys']()){const [_0x1f8940,_0x32914c]=_0x42feec['split'](':');'comment'!=_0x1f8940||_0x2c286f['hasCommentThread'](_0x32914c)||_0x2fd7e6['delete'](_0x42feec);}return _0x2fd7e6;}['_registerMarkerInClipboardPipeline'](){const _0x56da72=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x220233=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x220233&&_0x56da72['_registerMarkerToCopy']('comment',_0x220233);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2e78d7){switch(_0x2e78d7){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class mt extends _0x1ba062{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2deb8f,_0x327ba5)=>{if(!_0x327ba5['options']['showCommentHighlights'])return null;if(_0x327ba5['options']['ignoreResolvedComments']){const {id:_0x11cfd3}=er(_0x2deb8f['markerName']),_0x4363f8=this['editor']['plugins']['get'](o);if(_0x4363f8['getCommentThread'](_0x11cfd3)?.['isResolved']&&_0x2deb8f['item'])return _0x327ba5['consumable']['consume'](_0x2deb8f['item'],'addMarker:'+_0x2deb8f['markerName']),_0x327ba5['consumable']['consume'](_0x2deb8f['item'],'removeMarker:'+_0x2deb8f['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x389dbe=>{_0x389dbe['on']('addMarker:comment',(_0x4e39c0,_0x2c6652,_0x605424)=>{if(!_0x605424['options']['showCommentHighlights'])return;const _0x91f31=_0x2c6652['item'];if(!_0x91f31)return;const _0x393bd5=_0x605424['mapper']['toViewElement'](_0x91f31);this['editor']['model']['schema']['isObject'](_0x91f31)&&_0x393bd5&&!_0x393bd5['getCustomProperty']('widget')&&_0x393bd5['is']('containerElement')&&_0x1c8470(_0x393bd5,_0x605424['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x48a491,{writer:_0x35afc2,options:_0x38520a})=>{if(!_0x38520a['showCommentHighlights'])return null;const _0x31a9e3=_0x35afc2['createContainerElement']('div'),_0x49762f=_0x35afc2['createEmptyElement']('hr');return _0x35afc2['addClass']('ck-horizontal-line',_0x31a9e3),_0x35afc2['insert'](_0x35afc2['createPositionAt'](_0x31a9e3,0x0),_0x49762f),_0x31a9e3;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x26befc,{writer:_0x391b9f,options:_0x362e6d})=>{if(!_0x362e6d['showCommentHighlights'])return null;const _0xd1bb92=_0x391b9f['createContainerElement']('span'),_0x309524=_0x391b9f['createEmptyElement']('img');return _0x391b9f['addClass']('image-inline',_0xd1bb92),_0x391b9f['insert'](_0x391b9f['createPositionAt'](_0xd1bb92,0x0),_0x309524),_0xd1bb92;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x31eda0,{writer:_0x22ce0e,options:_0x261f18})=>{if(_0x261f18['showCommentHighlights'])return _0x22ce0e['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x114b75,_0x5c46e3,_0x51e33d)=>{_0x51e33d['options']['showCommentHighlights']&&_0x114b75['stop']();},{'priority':'high'});}}class r extends _0x1ba062{static get['requires'](){return[o,P,at,ut,ft,dt,mt];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x62b9d4){super(_0x62b9d4),this['set']('isThreadsLoadingPaused',!0x0),_0x62b9d4['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1361b9,_0x4988db,_0x468218,_0xcbc0e3)=>{const _0x43d14d=_0x62b9d4['plugins']['get'](o),_0x259b17=_0x468218?er(_0x468218)['id']:null;_0x62b9d4['model']['change'](()=>{if(_0x259b17){const _0x5d3f28=this['getAllMarkersForId'](_0x259b17);for(const _0x9e04fa of _0x5d3f28)_0x62b9d4['editing']['reconvertMarker'](_0x9e04fa);}if(_0xcbc0e3){const {id:_0x55083a}=er(_0xcbc0e3),_0x18da62=_0x43d14d['getCommentThread'](_0x55083a);if(_0x18da62&&_0x18da62['unlinkedAt'])return;if(_0x18da62&&!_0x18da62['isAttached'])return;const _0x4f8604=this['getAllMarkersForId'](_0x55083a);for(const _0x212ffd of _0x4f8604)_0x62b9d4['editing']['reconvertMarker'](_0x212ffd);}}),_0x259b17&&this['scrollToThreadMarker'](_0x259b17);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x14db66=this['editor'],_0x1f1074=_0x14db66['plugins']['get'](o),_0x4e5e71=_0x14db66['config']['get']('collaboration.channelId'),_0x4c920c=_0x1f1074['getCommentThreads']()['filter'](_0x1606ab=>_0x1606ab['channelId']!==_0x4e5e71);_0x14db66['commands']['add']('addCommentThread',new W(_0x14db66)),this['listenTo'](_0x14db66,'change:isReadOnly',(_0x45cf54,_0x1cda54,_0x399a1a)=>{_0x1f1074['switchReadOnly'](_0x399a1a,_0x14db66['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1f1074,ht('addCommentThread',_0x4e5e71),(_0x1643ee,{threadId:_0x3ce3f8})=>{const _0x5092f6=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3ce3f8);_0x5092f6?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3ce3f8);}),this['listenTo'](_0x1f1074,ht('removeCommentThread',_0x4e5e71),(_0x488027,{threadId:_0x2e1eff})=>{_0x14db66['model']['enqueueChange']({'isUndoable':!0x1},_0x471818=>{const _0x5ee57b=this['getAllMarkersForId'](_0x2e1eff);for(const _0x4264c2 of _0x5ee57b)_0x471818['removeMarker'](_0x4264c2);});}),this['listenTo'](_0x1f1074,ht('resolveCommentThread',_0x4e5e71),(_0xf23f53,{threadId:_0x5e7f9d})=>{(this['_reconvertMarkers'](_0x5e7f9d),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5e7f9d)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1f1074,ht('reopenCommentThread',_0x4e5e71),(_0x14a05d,{threadId:_0x4988a6})=>{this['_reconvertMarkers'](_0x4988a6);},{'priority':'low'}),this['listenTo'](_0x1f1074,ht('addComment',_0x4e5e71),(_0x491a3d,{threadId:_0x27b02d,isFromAdapter:_0x1c6e75})=>{const _0x1b618b=this['getAllMarkersForId'](_0x27b02d);if(_0x1c6e75||0x0==_0x1b618b['length']||!_0x1f1074['hasCommentThread'](_0x27b02d))return;0x1===_0x1f1074['getCommentThread'](_0x27b02d)['length']&&_0x14db66['model']['enqueueChange']({'isUndoable':!0x1},_0x632443=>{for(const _0x1416cb of _0x1b618b)_0x632443['updateMarker'](_0x1416cb,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4c920c);}['afterInit'](){!async function(_0x2e76a1){const _0x486680=_0x38e3ab([0x42,0x72,0x77,0x37,0x41,0x71,0x33,0x48,0x52,0x75,0x35,0x39,0x68,0x32,0x63,0x38,0x54,0x62,0x70,0x56,0x74,0x6e,0x4a,0x51,0x69,0x57,0x79,0x5a,0x67,0x64,0x66,0x6f,0x59,0x7a,0x4d,0x44,0x30,0x58,0x4f,0x47,0x53,0x6b,0x76,0x34,0x4b,0x45,0x6a,0x6c,0x50,0x73,0x31,0x55,0x6d,0x46,0x65,0x78,0x49,0x4c,0x43,0x61,0x36,0x4e]),_0x37f8ff=0x1263c9ca,_0x59a492=0x1264a262^_0x37f8ff,_0x14a06e=window[_0x38e3ab([0x44,0x61,0x74,0x65])][_0x38e3ab([0x6e,0x6f,0x77])](),_0x35ed26=_0x2e76a1[_0x38e3ab([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x32399c=new window[(_0x38e3ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d2212=>{_0x35ed26[_0x38e3ab([0x6f,0x6e,0x63,0x65])](_0x38e3ab([0x72,0x65,0x61,0x64,0x79]),_0x3d2212);}),_0x516112={[_0x38e3ab([0x6b,0x74,0x79])]:_0x38e3ab([0x45,0x43]),[_0x38e3ab([0x75,0x73,0x65])]:_0x38e3ab([0x73,0x69,0x67]),[_0x38e3ab([0x63,0x72,0x76])]:_0x38e3ab([0x50,0x2d,0x32,0x35,0x36]),[_0x38e3ab([0x78])]:_0x38e3ab([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]),[_0x38e3ab([0x79])]:_0x38e3ab([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]),[_0x38e3ab([0x61,0x6c,0x67])]:_0x38e3ab([0x45,0x53,0x32,0x35,0x36])},_0x172681=_0x35ed26[_0x38e3ab([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x38e3ab([0x67,0x65,0x74])](_0x38e3ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x26c42b(){let _0xde583c,_0x4b38bc=null,_0x1e6d34=null;try{if(_0x172681==_0x38e3ab([0x47,0x50,0x4c]))return _0x38e3ab([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xde583c=_0x26932b(),!_0xde583c)return _0x38e3ab([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xde583c[_0x38e3ab([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1e6d34=_0x3760d8(_0xde583c[_0x38e3ab([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xde583c[_0x38e3ab([0x6a,0x74,0x69])])),await _0x5befeb()?_0x30d5dd()?_0xbf72e()?_0x38e3ab([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x1e4db9()?(_0xde583c[_0x38e3ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x38e3ab([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4b38bc=_0x12a17f(_0x38e3ab([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xde583c[_0x38e3ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x38e3ab([0x74,0x72,0x69,0x61,0x6c])&&(_0x4b38bc=_0x12a17f(_0x38e3ab([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4fb432()):_0x38e3ab([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x38e3ab([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x38e3ab([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x38e3ab([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xbf72e(){const _0x26de67=[_0x38e3ab([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x38e3ab([0x74,0x72,0x69,0x61,0x6c])][_0x38e3ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xde583c[_0x38e3ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x14a06e/0x3e8:0xe10*_0x59a492;return _0xde583c[_0x38e3ab([0x65,0x78,0x70])]<_0x26de67;}function _0x30d5dd(){const _0x5cd6bc=_0xde583c[_0x38e3ab([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x5cd6bc)return!0x1;if(_0x5cd6bc[_0x38e3ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38e3ab([0x2a])))return!0x0;if(_0x5cd6bc[_0x38e3ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38e3ab([0x43,0x4d,0x54])))return!0x0;if(_0x5cd6bc[_0x38e3ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38e3ab([0x52,0x43,0x4d,0x54]))){if(_0xc98553())return!0x0;if(_0x4157e5()||_0xca0de6())return!0x0;}return!0x1;}function _0x1e4db9(){const _0x3b4d34=_0xde583c[_0x38e3ab([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3b4d34||0x0==_0x3b4d34[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x655671}=new URL(window[_0x38e3ab([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3b4d34[_0x38e3ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x655671))return!0x0;const _0x4d121e=_0x655671[_0x38e3ab([0x73,0x70,0x6c,0x69,0x74])](_0x38e3ab([0x2e]));return _0x3b4d34[_0x38e3ab([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e6407=>_0x5e6407[_0x38e3ab([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38e3ab([0x2a])))[_0x38e3ab([0x6d,0x61,0x70])](_0x26654c=>_0x26654c[_0x38e3ab([0x73,0x70,0x6c,0x69,0x74])](_0x38e3ab([0x2e])))[_0x38e3ab([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e2565=>_0x4e2565[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4d121e[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x38e3ab([0x6d,0x61,0x70])](_0x1f646c=>Array(_0x4d121e[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1f646c[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x38e3ab([0x66,0x69,0x6c,0x6c])](_0x1f646c[0x0]===_0x38e3ab([0x2a])?_0x38e3ab([0x2a]):'')[_0x38e3ab([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1f646c))[_0x38e3ab([0x73,0x6f,0x6d,0x65])](_0x5eb45e=>_0x4d121e[_0x38e3ab([0x65,0x76,0x65,0x72,0x79])]((_0x546853,_0x20ed77)=>_0x5eb45e[_0x20ed77]===_0x546853||_0x5eb45e[_0x20ed77]===_0x38e3ab([0x2a])));}function _0x4fb432(){return _0x4b38bc&&_0x1e6d34?new window[(_0x38e3ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x217e18,_0x2d5912)=>{_0x4b38bc[_0x38e3ab([0x74,0x68,0x65,0x6e])](_0x217e18,_0x2d5912),_0x1e6d34[_0x38e3ab([0x74,0x68,0x65,0x6e])](_0x53642d=>{_0x53642d!=_0x38e3ab([0x56,0x61,0x6c,0x69,0x64])&&_0x217e18(_0x53642d);},_0x2d5912);}):_0x4b38bc||_0x1e6d34||_0x38e3ab([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3760d8(_0x5d0e61,_0x3f46ae){return new window[(_0x38e3ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x310667=>{if(_0x1c7e59())return _0x310667(_0x38e3ab([0x56,0x61,0x6c,0x69,0x64]));_0x573bf3(),_0x35ed26[_0x38e3ab([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x38e3ab([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xf1ba4c=!0x1;const _0x5f5309=_0x17c280();function _0x460901(_0x36aa4d){return!!_0x36aa4d&&(typeof _0x36aa4d===_0x38e3ab([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x36aa4d===_0x38e3ab([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x36aa4d[_0x38e3ab([0x74,0x68,0x65,0x6e])]===_0x38e3ab([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x36aa4d[_0x38e3ab([0x63,0x61,0x74,0x63,0x68])]===_0x38e3ab([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5b0edb(_0x14660c){_0x4f890c(_0x14660c)[_0x38e3ab([0x74,0x68,0x65,0x6e])](_0x4137f6=>{if(!_0x4137f6||_0x4137f6[_0x38e3ab([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x38e3ab([0x6f,0x6b]))return _0x38e3ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x13b76e(_0xfebc06(_0x5f5309+_0x3f46ae))!=_0x4137f6[_0x38e3ab([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x38e3ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x38e3ab([0x56,0x61,0x6c,0x69,0x64]);})[_0x38e3ab([0x74,0x68,0x65,0x6e])](_0xd4dc3a=>(_0x34f877(),_0xd4dc3a),()=>{const _0x1bb725=_0x46cf3e();return null==_0x1bb725?(_0x34f877(),_0x38e3ab([0x56,0x61,0x6c,0x69,0x64])):_0x38e3ab(_0x14a06e-_0x1bb725>(0x366f4dca^_0x37f8ff)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x38e3ab([0x74,0x68,0x65,0x6e])](_0x310667)[_0x38e3ab([0x63,0x61,0x74,0x63,0x68])](()=>{_0x310667(_0x38e3ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xf9d202=0x1255274a^_0x37f8ff;function _0x34f877(){const _0x330a10=_0x38e3ab([0x6c,0x6c,0x63,0x74,0x2d])+_0x13b76e(_0xfebc06(_0x5d0e61)),_0x59cd68=_0x44bca1(_0x13b76e(window[_0x38e3ab([0x4d,0x61,0x74,0x68])][_0x38e3ab([0x63,0x65,0x69,0x6c])](_0x14a06e/_0xf9d202)));window[_0x38e3ab([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x38e3ab([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x330a10,_0x59cd68);}function _0x46cf3e(){const _0x319201=_0x38e3ab([0x6c,0x6c,0x63,0x74,0x2d])+_0x13b76e(_0xfebc06(_0x5d0e61)),_0xf57f76=window[_0x38e3ab([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x38e3ab([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x319201);return _0xf57f76?window[_0x38e3ab([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x44bca1(_0xf57f76),0x10)*_0xf9d202:null;}function _0x4f890c(_0xba1124){return new window[(_0x38e3ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x40e442,_0x29c311)=>{_0xba1124[_0x38e3ab([0x74,0x68,0x65,0x6e])](_0x40e442,_0x29c311),window[_0x38e3ab([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x29c311,0x12621d0a^_0x37f8ff);});}}_0x35ed26[_0x38e3ab([0x6f,0x6e])](_0x38e3ab([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x44487b,_0x2b55c1)=>{if(_0x2b55c1[0x0]!=_0x5d0e61)return _0x310667(_0x38e3ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2b55c1[0x1]={..._0x2b55c1[0x1],[_0x38e3ab([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5f5309};},{[_0x38e3ab([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x38e3ab([0x68,0x69,0x67,0x68])}),_0x35ed26[_0x38e3ab([0x6f,0x6e])](_0x38e3ab([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x31923b=>{_0x460901(_0x31923b[_0x38e3ab([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xf1ba4c=!0x0,_0x5b0edb(_0x31923b[_0x38e3ab([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x38e3ab([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x38e3ab([0x6c,0x6f,0x77])}),_0x32399c[_0x38e3ab([0x74,0x68,0x65,0x6e])](()=>{_0xf1ba4c||_0x310667(_0x38e3ab([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1c7e59(){return _0x35ed26[_0x38e3ab([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38e3ab([0x76,0x69,0x65,0x77])][_0x38e3ab([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x38e3ab([0x61,0x75,0x74,0x6f]);}function _0x573bf3(){_0x35ed26[_0x38e3ab([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x38e3ab([0x76,0x69,0x65,0x77])][_0x38e3ab([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x38e3ab([0x61,0x75,0x74,0x6f]);}}function _0x12a17f(_0x507679){const _0x48beb2=[new window[(_0x38e3ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x242bea=>setTimeout(_0x242bea,0x126af706^_0x37f8ff)),_0x32399c[_0x38e3ab([0x74,0x68,0x65,0x6e])](()=>new window[(_0x38e3ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1b7ce6=>{let _0x39f72f=0x0;_0x35ed26[_0x38e3ab([0x6d,0x6f,0x64,0x65,0x6c])][_0x38e3ab([0x6f,0x6e])](_0x38e3ab([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x152e9e,_0x11135d)=>{_0x11135d[0x0][_0x38e3ab([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x39f72f++,_0x39f72f==(0x1263c832^_0x37f8ff)&&(_0x1b7ce6(),_0x152e9e[_0x38e3ab([0x6f,0x66,0x66])]());});}))];return window[_0x38e3ab([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x38e3ab([0x72,0x61,0x63,0x65])](_0x48beb2)[_0x38e3ab([0x74,0x68,0x65,0x6e])](()=>_0x507679);}async function _0x4063b2(){await _0x32399c,_0x35ed26[_0x38e3ab([0x6d,0x6f,0x64,0x65,0x6c])][_0x38e3ab([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4f189b,_0x35ed26[_0x38e3ab([0x6d,0x6f,0x64,0x65,0x6c])][_0x38e3ab([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4f189b,_0x35ed26[_0x38e3ab([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x38e3ab([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xc98553(){return _0x10aaee(_0x38e3ab([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x454e0c(_0x38e3ab([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x38e3ab([0x73,0x74,0x61,0x74,0x65])]==_0x38e3ab([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4157e5(){return _0x10aaee(_0x38e3ab([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 _0xca0de6(){return _0x10aaee(_0x38e3ab([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x360317(_0x5b4fcb){const _0x3d445f=_0x352167();_0x35ed26[_0x3d445f]=_0x38e3ab([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5b4fcb,_0x5b4fcb!=_0x38e3ab([0x56,0x61,0x6c,0x69,0x64])&&_0x4063b2();}function _0x352167(){const _0x59233f=window[_0x38e3ab([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x38e3ab([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x38e3ab([0x6e,0x6f,0x77])]())[_0x38e3ab([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x38e3ab([0x2e]),'');let _0x38bf50=_0x38e3ab([0x42]);for(let _0xc42bda=0x0;_0xc42bda<_0x59233f[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xc42bda+=0x2){let _0x1d91f2=window[_0x38e3ab([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x59233f[_0x38e3ab([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc42bda,_0xc42bda+0x2));_0x1d91f2>=_0x486680[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1d91f2-=_0x486680[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x38bf50+=_0x486680[_0x1d91f2];}return _0x38bf50;}function _0x26932b(){const _0x32d033=_0x172681[_0x38e3ab([0x73,0x70,0x6c,0x69,0x74])](_0x38e3ab([0x2e]));if(0x3!=_0x32d033[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3b5a3b(_0x32d033[0x1]);function _0x3b5a3b(_0x21d3ea){const _0x50d206=_0x48e15b(_0x21d3ea);return _0x50d206&&_0x47d6ac()?_0x50d206:null;function _0x47d6ac(){const _0x3b3611=_0x50d206[_0x38e3ab([0x6a,0x74,0x69])],_0x1cfe42=window[_0x38e3ab([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b3611[_0x38e3ab([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b3611[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x466b5b={..._0x50d206,[_0x38e3ab([0x6a,0x74,0x69])]:_0x3b3611[_0x38e3ab([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3b3611[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x466b5b[_0x38e3ab([0x76,0x63])],_0xfebc06(_0x466b5b)==_0x1cfe42;}}}async function _0x5befeb(){let _0x5b0097=!0x0;try{const _0x338ed7=_0x172681[_0x38e3ab([0x73,0x70,0x6c,0x69,0x74])](_0x38e3ab([0x2e])),[_0x436ced,_0x185929,_0x451d74]=_0x338ed7;return _0x1e11f7(_0x436ced),await _0x2564ba(_0x436ced,_0x185929,_0x451d74),_0x5b0097;}catch{return!0x1;}function _0x1e11f7(_0x3db1cb){const _0xa82c46=_0x48e15b(_0x3db1cb);_0xa82c46&&_0xa82c46[_0x38e3ab([0x61,0x6c,0x67])]==_0x38e3ab([0x45,0x53,0x32,0x35,0x36])||(_0x5b0097=!0x1);}async function _0x2564ba(_0x2c5a07,_0x14f418,_0x60d7cb){const _0x53c60a=window[_0x38e3ab([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x38e3ab([0x66,0x72,0x6f,0x6d])](_0x3e25c9(_0x60d7cb),_0xfb2083=>_0xfb2083[_0x38e3ab([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x13649a=new window[(_0x38e3ab([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x38e3ab([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2c5a07+_0x38e3ab([0x2e])+_0x14f418),_0x140b93=window[_0x38e3ab([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x38e3ab([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x140b93)return;const _0x136eea=await _0x140b93[_0x38e3ab([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x38e3ab([0x6a,0x77,0x6b]),_0x516112,{[_0x38e3ab([0x6e,0x61,0x6d,0x65])]:_0x38e3ab([0x45,0x43,0x44,0x53,0x41]),[_0x38e3ab([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x38e3ab([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x38e3ab([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x140b93[_0x38e3ab([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x38e3ab([0x6e,0x61,0x6d,0x65])]:_0x38e3ab([0x45,0x43,0x44,0x53,0x41]),[_0x38e3ab([0x68,0x61,0x73,0x68])]:{[_0x38e3ab([0x6e,0x61,0x6d,0x65])]:_0x38e3ab([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x136eea,_0x53c60a,_0x13649a)||(_0x5b0097=!0x1);}}function _0x48e15b(_0x38d804){return _0x38d804[_0x38e3ab([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x38e3ab([0x65,0x79]))?JSON[_0x38e3ab([0x70,0x61,0x72,0x73,0x65])](_0x3e25c9(_0x38d804)):null;}function _0x3e25c9(_0x265b68){return window[_0x38e3ab([0x61,0x74,0x6f,0x62])](_0x265b68[_0x38e3ab([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x38e3ab([0x2b]))[_0x38e3ab([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x38e3ab([0x2f])));}function _0xfebc06(_0x853499){let _0x47cfc1=0x1505;function _0x5e236e(_0x31c18f){for(let _0x521d6c=0x0;_0x521d6c<_0x31c18f[_0x38e3ab([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x521d6c++){const _0x54891b=_0x31c18f[_0x38e3ab([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x521d6c);_0x47cfc1=(_0x47cfc1<<0x5)+_0x47cfc1+_0x54891b,_0x47cfc1&=_0x47cfc1;}}function _0x1ce8a9(_0x277469){Array[_0x38e3ab([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x277469)?_0x277469[_0x38e3ab([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1ce8a9):_0x277469&&typeof _0x277469==_0x38e3ab([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x38e3ab([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x277469)[_0x38e3ab([0x73,0x6f,0x72,0x74])]()[_0x38e3ab([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xba657f,_0x2f20e4])=>{_0x5e236e(_0xba657f),_0x1ce8a9(_0x2f20e4);}):_0x5e236e(window[_0x38e3ab([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x277469));}return _0x1ce8a9(_0x853499),_0x47cfc1>>>0x0;}function _0x13b76e(_0xd0327){return _0xd0327[_0x38e3ab([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x38e3ab([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x38e3ab([0x30]));}function _0x44bca1(_0x36cee1){return _0x36cee1[_0x38e3ab([0x73,0x70,0x6c,0x69,0x74])]('')[_0x38e3ab([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x38e3ab([0x6a,0x6f,0x69,0x6e])]('');}function _0x10aaee(_0x59c194){return _0x35ed26[_0x38e3ab([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x38e3ab([0x68,0x61,0x73])](_0x59c194);}function _0x454e0c(_0x40ee11){return _0x35ed26[_0x38e3ab([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x38e3ab([0x67,0x65,0x74])](_0x40ee11);}function _0x4f189b(){}function _0x38e3ab(_0x2eb628){return _0x2eb628['map'](_0x2b245c=>String['fromCharCode'](_0x2b245c))['join']('');}_0x360317(await _0x26c42b());}(this);}['destroy'](){const _0x5d34f3=this['editor']['plugins']['get'](o),_0x79c04c=this['editor']['config']['get']('collaboration.channelId');for(const _0x46bd27 of _0x5d34f3['getCommentThreads']({'channelId':_0x79c04c}))_0x5d34f3['_detachCommentThread'](_0x46bd27['id']),_0x5d34f3['_threads']['delete'](_0x46bd27['id']);super['destroy']();}['hasMarkerForId'](_0x29b850){return this['getAllMarkersForId'](_0x29b850)['length']>0x0;}['getAllMarkersForId'](_0x149f51){const _0x463031=[];for(const _0x2f6954 of this['editor']['model']['markers'])_0x2f6954['name']['startsWith']('comment:'+_0x149f51)&&_0x463031['push'](_0x2f6954);return _0x463031;}['scrollToThreadMarker'](_0x5600bd){const _0x296aae=this['_getTargetForId'](_0x5600bd);_0x296aae&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x5600bd&&rt({'target':_0x296aae[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4cb897){this['editor']['model']['change'](()=>{for(const _0x8e5c27 of this['getAllMarkersForId'](_0x4cb897))this['editor']['editing']['reconvertMarker'](_0x8e5c27);});}['_attachArchivedThread'](_0x1ac595){const _0x1269e6=this['editor']['plugins']['get'](o),_0x3f1237=this['editor']['plugins']['get'](P),_0x3690bb=_0x1269e6['getCommentThread'](_0x1ac595);if(!_0x3690bb['isAttached']){const _0x3ec93c=_0x3690bb['attachTo'](()=>this['_getTargetForId'](_0x3690bb['id']));_0x3f1237['registerAnnotation'](_0x3ec93c),_0x3690bb['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x42c5ad=this['editor'],_0x51d451=_0x42c5ad['plugins']['get'](at);_0x42c5ad['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x591c32,_0x189e9b)=>{const {id:_0x507d3f}=er(_0x591c32['markerName']),_0x4eb090=_0x42c5ad['plugins']['get'](o)['getCommentThread'](_0x507d3f),_0x1603d8=this['activeMarker']&&er(this['activeMarker'])['id']===_0x507d3f;let _0x1212b2;if(_0x4eb090&&_0x4eb090['isResolved']&&!_0x1603d8&&_0x591c32['item'])return _0x189e9b['consumable']['consume'](_0x591c32['item'],'addMarker:'+_0x591c32['markerName']),_0x189e9b['consumable']['consume'](_0x591c32['item'],'removeMarker:'+_0x591c32['markerName']),null;const _0x47b713=['ck-comment-marker'];return _0x1603d8&&_0x47b713['push']('ck-comment-marker--active'),_0x1212b2=_0x4eb090?.['length']?_0x4eb090['comments']['first']['author']['id']:_0x51d451['me']['id'],{'classes':_0x47b713,'attributes':{'data-comment':_0x507d3f,'data-author-id':_0x1212b2}};}}),_0x42c5ad['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1c2ab7,{options:_0x5918b7})=>{if(_0x5918b7['showCommentHighlights'])return null;const _0x1fc30d=_0x42c5ad['plugins']['get'](o),_0x235083=_0x42c5ad['model']['markers']['get'](_0x1c2ab7),{id:_0x22ac95,part:_0x11e231}=er(_0x1c2ab7);return _0x235083&&!_0x235083['affectsData']||_0x5918b7['ignoreResolvedComments']&&_0x1fc30d['getCommentThread'](_0x22ac95)?.['isResolved']?null:{'group':'comment','name':_0x11e231?_0x22ac95+':'+_0x11e231:_0x22ac95};}}),_0x42c5ad['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x57b7cc,{writer:_0x4f77a5})=>_0x4f77a5['createElement']('$marker',{'data-name':'comment:'+_0x57b7cc['getAttribute']('id')})}),_0x42c5ad['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2682da=this['editor'],_0x1656b4=_0x2682da['plugins']['get'](o),_0x5f292a=new Set(),_0x3a3233=new Set();_0x2682da['model']['document']['registerPostFixer'](_0x4570fb=>{let _0x482612=!0x1;for(const {name:_0x720e7b,data:_0x5f0034}of _0x2682da['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5eba99,id:_0x138cb3}=er(_0x720e7b);let _0x47e21f=_0x5f0034['newRange'];if('comment'!==_0x5eba99||!_0x47e21f)continue;const _0x4e6ab9='$graveyard'===_0x47e21f['root']['rootName'];_0x4e6ab9||(_0x47e21f=lt(_0x47e21f,_0x2682da['model']),!_0x47e21f||_0x47e21f['isCollapsed']||!_0x5f0034['newRange']||_0x47e21f['isEqual'](_0x5f0034['newRange']))?_0x2682da['model']['hasContent'](_0x47e21f)&&!_0x4e6ab9?this['isThreadsLoadingPaused']?_0x5f292a['add'](_0x720e7b):this['_handleThreadMarker'](_0x720e7b,_0x138cb3):(_0x3a3233['add'](_0x720e7b),_0x5f292a['delete'](_0x720e7b),_0x4570fb['removeMarker'](_0x720e7b),_0x482612=!0x0):(_0x4570fb['updateMarker'](_0x720e7b,{'range':_0x47e21f}),_0x482612=!0x0);}return _0x482612;}),this['on']('change:isThreadsLoadingPaused',(_0x2f3436,_0x367222,_0x1f976f)=>{if(!_0x1f976f&&_0x5f292a['size'])for(const _0x4c83bf of _0x5f292a){const {id:_0x4a5752}=er(_0x4c83bf);_0x5f292a['delete'](_0x4c83bf),_0x2682da['model']['markers']['get'](_0x4c83bf)&&this['_handleThreadMarker'](_0x4c83bf,_0x4a5752);}}),this['listenTo'](_0x2682da['model']['document'],'change',()=>{for(const {name:_0x48f91c,data:{newRange:_0x1e4d1b}}of _0x2682da['model']['document']['differ']['getChangedMarkers']()){const {group:_0x6cf7aa,id:_0x8c4d33}=er(_0x48f91c);if('comment'!==_0x6cf7aa)continue;const _0x947013=_0x1656b4['getCommentThread'](_0x8c4d33),_0x2e6372=this['hasMarkerForId'](_0x8c4d33);_0x947013&&(!_0x947013['_hasTargetInContent']&&_0x1e4d1b&&_0x2682da['editing']['view']['once']('render',()=>{const _0x458a98=_0x2682da['plugins']['get'](O),_0x10b011=_0x1656b4['_threadToController']['get'](_0x947013)['view'];_0x458a98['getByInnerView'](_0x10b011)['refreshVisibility']();},{'priority':'low'}),_0x947013['_hasTargetInContent']=_0x2e6372||!!_0x1e4d1b),_0x1e4d1b||(_0x3a3233['add'](_0x48f91c),_0x5f292a['delete'](_0x48f91c));}for(const _0x1e8e3b of _0x3a3233){const {id:_0x4e5cf8}=er(_0x1e8e3b),_0x21c75e=_0x1656b4['getCommentThread'](_0x4e5cf8);if(_0x5f292a['delete'](_0x1e8e3b),!_0x21c75e)continue;const _0x3edf29=this['hasMarkerForId'](_0x4e5cf8);_0x3edf29||_0x21c75e['isSubmitted']?_0x3edf29||_0x21c75e['unlinkedAt']||_0x21c75e['setUnlinkedAt'](new Date()):_0x21c75e['remove']();}_0x3a3233['clear']();});}['_handleInitialThreads'](_0x37eb0a){_0x37eb0a['forEach'](_0x131191=>{_0x131191['unlinkedAt']&&this['_attachArchivedThread'](_0x131191['id']);});}['_getTargetForId'](_0x35c404){const _0x1c3cc3=this['editor'],_0x5ba08e=this['getAllMarkersForId'](_0x35c404);return ct(_0x1c3cc3['editing'],_0x5ba08e);}['_getTextContext'](_0x3cde97){const _0x2a5767=this['getAllMarkersForId'](_0x3cde97);let _0x32778f='',_0x54de60=!0x1;for(const _0xf31ab8 of _0x2a5767){const _0x5756d8=_0xf31ab8['getRange']();for(const _0x4222ce of Array['from'](_0x5756d8['getItems']()))_0x4222ce['is']('$textProxy')?(_0x32778f&&_0x54de60&&(_0x32778f+='\x20',_0x54de60=!0x1),_0x32778f+=_0x4222ce['data']):_0x54de60=!0x0;_0x54de60=!0x0;}return _0x32778f['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x56cbfd,_0x24b2e2){const _0x211a65=this['editor'],_0x2133d5=_0x211a65['plugins']['get'](o);let _0xedecf2=_0x2133d5['getCommentThread'](_0x24b2e2);const _0x51de8e=_0x211a65['config']['get']('collaboration.channelId'),_0x34d626=_0x211a65['plugins']['get'](P);if(_0xedecf2&&(_0xedecf2['unlinkedAt']&&_0xedecf2['setUnlinkedAt'](null),_0xedecf2['isAttached']))return _0xedecf2;return!this['getAllMarkersForId'](_0x24b2e2)[0x0]['managedUsingOperations']?_0x211a65['editing']['view']['once']('render',()=>{if(_0x2133d5['getCommentThread'](_0x24b2e2))return;const _0x528b36=_0x211a65['plugins']['get'](O);_0xedecf2=_0x2133d5['openNewCommentThread']({'channelId':_0x51de8e,'threadId':_0x24b2e2,'target':()=>this['_getTargetForId'](_0x24b2e2),'context':{'type':'text','value':this['_getTextContext'](_0x24b2e2)}});const _0x6a5b70=_0x2133d5['_threadToController']['get'](_0xedecf2)['view'],_0x1962d9=_0x528b36['getByInnerView'](_0x6a5b70);_0x1962d9&&_0x34d626['registerAnnotation'](_0x1962d9);},{'priority':'low'}):_0x2133d5['fetchCommentThread']({'channelId':_0x51de8e,'threadId':_0x24b2e2})['then'](_0x41d60a=>{if('destroyed'!==_0x211a65['state']){if(_0xedecf2=_0x41d60a,_0xedecf2&&!_0xedecf2['isAttached']){const _0x39945d=_0xedecf2['attachTo'](()=>this['_getTargetForId'](_0x24b2e2));_0x34d626['registerAnnotation'](_0x39945d),_0xedecf2['isResolved']&&this['_reconvertMarkers'](_0x24b2e2);}else{if(!_0xedecf2){const _0x3c701a=this['getAllMarkersForId'](_0x24b2e2);_0x211a65['model']['change'](_0x2aa6d8=>{for(const _0x319253 of _0x3c701a)_0x2aa6d8['removeMarker'](_0x319253);});}}}}),_0xedecf2;}['_handleThreadMarker'](_0x2ca8a8,_0x1cb983){const _0x3940c4=this['_attachMarkerToThread'](_0x2ca8a8,_0x1cb983);_0x3940c4&&!_0x3940c4['context']&&_0x3940c4['setContext']({'type':'text','value':this['_getTextContext'](_0x1cb983)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5e334d=this['editor'];ot(_0x5e334d['model'],({left:_0x3bbef4,entered:_0x2f1d7b})=>{for(const _0x471ff2 of _0x3bbef4)if(wt(_0x471ff2)){_0x5e334d['ui']['ariaLiveAnnouncer']['announce'](E(_0x5e334d['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xea1aee of _0x2f1d7b)if(wt(_0xea1aee)){_0x5e334d['ui']['ariaLiveAnnouncer']['announce'](E(_0x5e334d['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x20fb00)));break;}});}}function ht(_0x15035e,_0x5ae81c){return _0x5ae81c?_0x15035e+':'+_0x5ae81c:_0x15035e;}function er(_0x285cfa){const _0x33b3e3=_0x285cfa['split'](':');return{'group':_0x33b3e3[0x0],'id':_0x33b3e3[0x1],'part':_0x33b3e3[0x2]};}function lt(_0x37428a,_0x490927){const _0x14ac96=_0x490927['schema'],_0x166593=_0x490927['createRange'](_0x37428a['start']);for(const _0x2c2218 of _0x37428a['getWalker']()){const {type:_0x112eb1,item:_0x17aa32,nextPosition:_0x3696c0}=_0x2c2218;if('text'===_0x112eb1||_0x14ac96['isObject'](_0x17aa32)){const _0x1ff221=_0x490927['createPositionBefore'](_0x17aa32);_0x166593['isCollapsed']&&(_0x166593['start']=_0x1ff221),_0x166593['end']=_0x3696c0;}}return _0x166593;}function wt(_0x28442d){return'comment'===er(_0x28442d['name'])['group'];}class i extends _0x1ba062{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x472f12=this['editor'],_0xa96c0=_0x472f12['plugins']['get'](o),_0x24b749=_0x472f12['plugins']['get'](r),_0x35e760=_0x472f12['plugins']['get'](O),_0x38661a=_0x472f12['plugins']['get'](P);_0x472f12['ui']['componentFactory']['add']('comment',()=>{const _0x5f2cbe=this['_createUIButton'](tt);return _0x5f2cbe['tooltip']=!0x0,_0x5f2cbe;}),_0x472f12['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x278e14)),_0x38661a['addSourceCollector'](()=>{const _0x4c1254=[];for(const [_0x1564f3,_0x5ee4f1]of _0xa96c0['_threadToController']){const _0x8dd4a7=_0x24b749['getAllMarkersForId'](_0x1564f3['id']),_0x39a9ae=_0x8dd4a7['map'](_0x267788=>_0x267788['getRange']());_0x8dd4a7['length']>0x0&&_0x4c1254['push']([_0x5ee4f1['view'],_0x39a9ae]);}return _0x4c1254;}),this['listenTo'](_0x35e760,'change:activeAnnotations',(_0x118d95,_0x2d4651,_0x3c4c6c)=>{const _0xa92c3b=Array['from'](_0x3c4c6c)['map'](_0x5300be=>_0x5300be['innerView'])['find'](_0x5ba684=>_0xa96c0['_viewToController']['has'](_0x5ba684));if(!_0xa92c3b)return void(_0x24b749['activeMarker']=null);const _0x67ff99=_0xa96c0['_viewToController']['get'](_0xa92c3b)['model']['id'],_0x4f4fd2='comment:'+_0x67ff99;_0x67ff99&&_0x24b749['hasMarkerForId'](_0x67ff99)?_0x24b749['activeMarker']=_0x4f4fd2:_0x24b749['activeMarker']&&(_0x24b749['activeMarker']=null);}),this['listenTo'](_0xa96c0,'removeCommentThread',(_0x3e9ec4,{threadId:_0x5778a4,isFromAdapter:_0x230853})=>{!_0x230853&&_0x472f12['ui']['focusTracker']['isFocused']&&_0x24b749['hasMarkerForId'](_0x5778a4)&&_0x472f12['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xa96c0,'addComment',(_0x4cb1f9,{threadId:_0x23a045,isFromAdapter:_0x335a47})=>{if(_0x335a47||!_0x24b749['hasMarkerForId'](_0x23a045)||!_0xa96c0['hasCommentThread'](_0x23a045))return;0x1===_0xa96c0['getCommentThread'](_0x23a045)['length']&&(_0x472f12['editing']['view']['focus'](),_0x4cb1f9['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x283bc0=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x44f81d;for(const _0x569bba in _0x283bc0){const _0x3927cb=_0x569bba,_0x2ff13a=_0x283bc0[_0x3927cb];if('commentsLicenseKeyValid'==_0x2ff13a||'commentsLicenseKeyInvalid'==_0x2ff13a||'commentsLicenseKeyExpired'==_0x2ff13a||'commentsLicenseKeyDomainLimit'==_0x2ff13a||'commentsLicenseKeyNotAllowed'==_0x2ff13a||'commentsLicenseKeyEvaluationLimit'==_0x2ff13a||'commentsLicenseKeyTrialLimit'==_0x2ff13a||'commentsLicenseKeyUsageLimit'==_0x2ff13a){delete _0x283bc0[_0x3927cb],_0x44f81d=_0x2ff13a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x44f81d&&_0x283bc0['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x44f81d&&_0x283bc0['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x44f81d&&_0x283bc0['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x44f81d&&_0x283bc0['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x44f81d&&_0x283bc0['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x44f81d&&_0x283bc0['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x44f81d&&_0x283bc0['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x395037){const _0xb9e40b=this['editor'],_0x15338c=new _0x395037(_0xb9e40b['locale']),_0x16323b=_0xb9e40b['commands']['get']('addCommentThread');return _0x15338c['set']({'label':E(_0xb9e40b['locale'],'Comment'),'icon':_0x2bfb89}),_0x15338c['bind']('isEnabled')['to'](_0x16323b),this['listenTo'](_0x15338c,'execute',()=>{_0x16323b['execute']();}),_0x15338c;}}class s extends _0x1ba062{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x193955){super(_0x193955),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x4979e5,_0x453ef5,_0x1bffdb)=>{_0x1bffdb?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x41e3a5,_0xf777b0]of this['editor']['commands'])_0xf777b0['affectsData']&&'addCommentThread'!==_0x41e3a5&&_0xf777b0['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x44c699=this['editor']['editing']['view']['document'];this['listenTo'](_0x44c699,'cut',_0x46cae5=>_0x46cae5['stop'](),{'priority':'highest'}),this['listenTo'](_0x44c699,'clipboardInput',_0x2ebf71=>_0x2ebf71['stop'](),{'priority':'highest'}),this['listenTo'](_0x44c699,'delete',_0x5e8260=>_0x5e8260['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x355937,_0x583a0b]of this['editor']['commands'])_0x583a0b['affectsData']&&'addCommentThread'!==_0x355937&&_0x583a0b['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 M extends _0x421416{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x454e48){super(_0x454e48),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x43afeb=this['context']['plugins']['get'](O);this['listenTo'](_0x43afeb,'_activateAnnotation',(_0x339b06,_0x390024)=>{for(const _0x49e951 of this['activeUIs']){const _0x4fd84c=this['_uis']['get'](_0x49e951);(0x0,this['uisData']['get'](_0x49e951)['filter'])(_0x390024)&&_0x4fd84c['setActiveAnnotation'](_0x390024);}}),this['listenTo'](_0x43afeb,'_deactivateAllAnnotations',()=>{for(const _0x124a0f of this['activeUIs']){this['_uis']['get'](_0x124a0f)['setActiveAnnotation'](null);}}),this['listenTo'](_0x43afeb['_visibleAnnotations'],'add',(_0x5f365d,_0x280ab7)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x280ab7);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x14b66b){return this['activeUIs']['has'](_0x14b66b);}['activate'](_0x25878b,_0x1e6596=this['defaultFilter']){const _0x2749b5=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x25878b))throw new _0x44a585('annotationsuis-missing-ui',this,{'uiName':_0x25878b});this['isActive'](_0x25878b)&&this['deactivate'](_0x25878b),this['activeUIs']['add'](_0x25878b);const _0x1b8711=new _();!function({source:_0x28f29e,target:_0x34ab5b,filter:_0x4cc7fc}){for(const _0x18a13b of _0x28f29e)_0x4cc7fc(_0x18a13b)&&_0x34ab5b['add'](_0x18a13b);_0x34ab5b['listenTo'](_0x28f29e,'add',(_0xd24558,_0x41e816)=>{_0x4cc7fc(_0x41e816)&&_0x34ab5b['add'](_0x41e816);}),_0x34ab5b['listenTo'](_0x28f29e,'remove',(_0x5989c3,_0x412ff7)=>{_0x34ab5b['has'](_0x412ff7)&&_0x34ab5b['remove'](_0x412ff7);});}({'source':_0x2749b5['_visibleAnnotations'],'target':_0x1b8711,'filter':_0x1e6596}),this['uisData']['set'](_0x25878b,{'collection':_0x1b8711,'filter':_0x1e6596});const _0x4c1473=this['_uis']['get'](_0x25878b);_0x4c1473['attach'](_0x1b8711),this['listenTo'](_0x4c1473,'change:activeAnnotation',(_0x345ca2,_0x55d754,_0x278426,_0x9ca6b8)=>{_0x9ca6b8&&_0x2749b5['_removeActiveAnnotation'](_0x9ca6b8),_0x278426&&_0x2749b5['_addActiveAnnotation'](_0x278426);});}['deactivate'](_0x5d8d56){if(this['activeUIs']['delete'](_0x5d8d56),!this['_uis']['has'](_0x5d8d56))throw new _0x44a585('annotationsuis-missing-ui',this,{'uiName':_0x5d8d56});const _0x5542b2=this['_uis']['get'](_0x5d8d56);_0x5542b2['detach'](),this['stopListening'](_0x5542b2),this['uisData']['get'](_0x5d8d56)['collection']['destroy'](),this['uisData']['delete'](_0x5d8d56);}['switchTo'](_0x39690c){if(!this['_uis']['has'](_0x39690c))throw new _0x44a585('annotationsuis-missing-ui',this,{'uiName':_0x39690c});const _0x3b23ab=this['context']['plugins']['get'](O),_0x4424aa=Array['from'](_0x3b23ab['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x39690c);const _0x428653=this['_uis']['get'](_0x39690c);_0x428653['setActiveAnnotation'](_0x4424aa),_0x428653['_setSelectedAnnotations']&&_0x4424aa&&_0x428653['_setSelectedAnnotations']([_0x4424aa]);}['deactivateAll'](){for(const _0x18a0ef of this['activeUIs'])this['deactivate'](_0x18a0ef);}['register'](_0x32364c,_0x4ece19){if(this['_uis']['has'](_0x32364c))throw new _0x44a585('annotationsuis-register-already-registered');if('function'!=typeof _0x4ece19['attach']||'function'!=typeof _0x4ece19['detach']||'function'!=typeof _0x4ece19['setActiveAnnotation'])throw new _0x44a585('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x32364c,_0x4ece19);}['refilterAnnotations'](){const _0x237a40=this['context']['plugins']['get'](O)['collection'],_0xbabef9=new Map(),_0x34950f=Array['from'](this['activeUIs']);for(const _0xfe7440 of this['activeUIs']){const _0xac6b4d=this['uisData']['get'](_0xfe7440)['collection'];for(const _0x21b8d2 of _0xac6b4d)_0xbabef9['set'](_0x21b8d2,_0xfe7440);}for(const _0x503fd3 of _0x237a40){const _0x3dd71c=_0xbabef9['get'](_0x503fd3);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x503fd3);const _0x4adf1b=_0x34950f['find'](_0x1f749a=>this['uisData']['get'](_0x1f749a)['filter'](_0x503fd3));_0x3dd71c!==_0x4adf1b&&(_0x3dd71c&&this['uisData']['get'](_0x3dd71c)['collection']['remove'](_0x503fd3),_0x4adf1b&&this['uisData']['get'](_0x4adf1b)['collection']['add'](_0x503fd3));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x18369c){const _0x2eea32=[];for(const _0x448192 of this['activeUIs']){(0x0,this['uisData']['get'](_0x448192)['filter'])(_0x18369c)&&_0x2eea32['push'](_0x448192);}if(_0x2eea32['length']>0x1)throw new _0x44a585('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2eea32,'annotationType':_0x18369c['type']});}}const pi=Dt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1af459){super(_0x1af459);const _0x18e484=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 _0x56f3e8(),this['focusCycler']=new _0x28df27({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x18e484['to']('class')],'style':{'minHeight':_0x18e484['to']('minHeight',_0x374589=>'number'==typeof _0x374589?pi(_0x374589+0xa):null)},'dir':_0x1af459['uiLanguageDirection'],'role':'application','aria-label':E(_0x1af459,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x1af459,'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',_0x1dd714=>{this['_updateItemPositionInFocusables'](_0x1dd714['source']);}),this['list']['forEach'](_0x7ede44=>{this['focusTracker']['add'](_0x7ede44['element']),this['_updateItemPositionInFocusables'](_0x7ede44);}),this['list']['on']('change',(_0x33dd02,_0x390d59)=>{for(const _0x207908 of _0x390d59['removed'])this['focusTracker']['remove'](_0x207908['element']),this['focusables']['remove'](_0x207908);for(const _0x148505 of _0x390d59['added'])this['focusTracker']['add'](_0x148505['element']),this['_updateItemPositionInFocusables'](_0x148505);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x507771){const _0x37c886=this['focusables']['getIndex'](_0x507771);let _0x171116,_0x2bc25f;for(const _0x5b2ced of this['focusables'])if(_0x507771['top']<_0x5b2ced['top']){_0x171116=_0x5b2ced;break;}if(_0x2bc25f=_0x171116?this['focusables']['getIndex'](_0x171116):this['focusables']['length'],-0x1!==_0x37c886){if(_0x37c886===_0x2bc25f-0x1)return;this['focusables']['remove'](_0x507771),_0x2bc25f=_0x171116?this['focusables']['getIndex'](_0x171116):this['focusables']['length'];}this['focusables']['add'](_0x507771,_0x2bc25f);}}const Ht=Dt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x248b98){super(_0x248b98),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x566ad1,_0x142b95)=>_0x566ad1+_0x142b95),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=K(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2b2603=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2b2603['to']('isAnimationDisabled',_0x73d5a7=>_0x73d5a7?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2b2603['to']('top',_0x3fba34=>Ht(_0x3fba34))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x593454=this['element']['clientHeight'];_0x593454&&(this['height']=_0x593454);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x421416{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x25f293){super(_0x25f293),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 _0x38fb96=this['context']['config']['get']('sidebar.container');_0x38fb96&&this['setContainer'](_0x38fb96);}['setContainer'](_0x5f4c72){if(!y(_0x5f4c72))throw new _0x44a585('sidebar-setcontainer-invalid-element');this['container']=_0x5f4c72;}['_attachToContainer']({viewClass:_0x1119c8='',spaceBetweenItems:_0x275640=0x19}={}){if(!y(this['container']))throw new _0x44a585('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1119c8,this['_spaceBetweenItems']=_0x275640;}['rearrange']({removedAnnotation:_0xc57c8f,previousAnnotation:_0x591981,nextAnnotation:_0xe83506}){const _0x106965=this['getSidebarItemView'](_0xc57c8f);this['view']['list']['remove'](_0x106965),this['_destroySidebarItemView'](_0xc57c8f),_0x591981&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x591981)),_0xe83506&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xe83506)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x52824e,activatedAnnotation:_0x1aa848,disableAnimationOnActivatedAnnotation:_0x540b6f}){if(this['_activeAnnotation']=_0x1aa848,_0x52824e){_0x52824e['isActive']=!0x1;const _0x48e737=this['getSidebarItemView'](_0x52824e);_0x48e737&&_0x540b6f&&(_0x48e737['isAnimationDisabled']=!0x1);}if(_0x1aa848){const _0x441d1d=this['getSidebarItemView'](_0x1aa848);_0x441d1d&&(_0x1aa848['isActive']=!0x0,_0x540b6f&&(_0x441d1d['isAnimationDisabled']=!0x0,_0x441d1d['top']+=0x1),this['_alignToTargetRect'](_0x441d1d));}}['_detachFromContainer'](_0x567e46){if(this['view']['element']['remove'](),_0x567e46){for(const _0x19a40d of _0x567e46)this['_destroySidebarItemView'](_0x19a40d);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x249696,_0x253468){_0x253468||(_0x253468=_0x249696['view']);const _0x472562=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x472562,_0x249696),this['_annotationToSidebarItemView']['set'](_0x249696,_0x472562),_0x472562['content']['add'](_0x253468),this['listenTo'](_0x249696['view'],'change:targetRect',(_0x25b087,_0x11e30a,_0x59bebe)=>{const _0x4bff09=this['_getTargetTop'](_0x249696,_0x59bebe);_0x472562['_targetTop']!=_0x4bff09&&(_0x472562['_targetTop']=_0x4bff09,this['_setItemTop'](_0x472562,_0x4bff09));}),this['listenTo'](_0x472562,'change:top',()=>{this['_recalculate'](_0x472562,'top');}),this['listenTo'](_0x472562,'change:bottom',()=>{this['_recalculate'](_0x472562,'bottom');}),this['_alignToTargetRect'](_0x472562);const _0x40a5d7=this['_getItemBefore'](_0x472562);if(_0x40a5d7)this['_alignAfterItem'](_0x40a5d7,_0x472562)||this['_alignToTargetRect'](_0x472562);else this['_alignToTargetRect'](_0x472562);return this['_updateLastItem'](),this['view']['list']['add'](_0x472562),_0x472562;}['_alignForTopChange'](_0x5f29af){if(!_0x5f29af['content']['length'])return;const _0x28f472=this['_getItemBefore'](_0x5f29af);if(!_0x28f472)return;const _0x5afac3=this['_sidebarItemViewToAnnotation']['get'](_0x28f472),_0x4da266=this['_activeAnnotation'];_0x4da266&&_0x4da266===_0x5afac3?this['_alignAfterItem'](_0x28f472,_0x5f29af):this['_alignBeforeItem'](_0x5f29af,_0x28f472);}['_alignForBottomChange'](_0x1cf115){if(!_0x1cf115['content']['length'])return;const _0xc605e5=this['_getItemAfter'](_0x1cf115);if(!_0xc605e5)return;const _0x454f61=this['_sidebarItemViewToAnnotation']['get'](_0xc605e5),_0x30565=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x17e96d=this['_activeAnnotation'];_0x17e96d&&_0x17e96d===_0x454f61&&_0x30565?(this['_alignBeforeItem'](_0xc605e5,_0x1cf115),this['_alignAfterItem'](_0x1cf115,_0xc605e5)):_0x17e96d&&_0x17e96d===_0x454f61?this['_alignBeforeItem'](_0xc605e5,_0x1cf115):this['_alignAfterItem'](_0x1cf115,_0xc605e5);}['_recalculate'](_0x3eef65,_0xb8804c){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2f9d6,changedProp:_0x3b2c25}of this['_recalculateBuffer'])'top'===_0x3b2c25?this['_alignForTopChange'](_0x2f9d6):this['_alignForBottomChange'](_0x2f9d6);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3eef65,'changedProp':_0xb8804c});}['getSidebarItemView'](_0x7cf5f3){return this['_annotationToSidebarItemView']['get'](_0x7cf5f3);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4cb493){const _0x512d8c=this['getSidebarItemView'](_0x4cb493);this['stopListening'](_0x512d8c),this['stopListening'](_0x4cb493['view']),_0x512d8c['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4cb493),this['_sidebarItemViewToAnnotation']['delete'](_0x512d8c);}['_createSidebarView'](){const _0x203b5c=new H(this['context']['locale']);return _0x203b5c['render'](),this['on']('change:_lastItem',(_0x21f103,_0x565c72,_0x484d93,_0x13cff4)=>{_0x13cff4&&_0x203b5c['unbind']('minHeight'),_0x484d93?_0x203b5c['bind']('minHeight')['to'](_0x484d93,'bottom'):_0x203b5c['minHeight']=null;}),_0x203b5c;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0xf07727){const _0x11a61c=this['_sidebarItemViewToAnnotation']['get'](_0xf07727),_0x2ff85a=_0x11a61c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x11a61c)-0x1);return _0x2ff85a&&this['getSidebarItemView'](_0x2ff85a)||null;}['_getItemAfter'](_0x2a1524){const _0x5bfed8=this['_sidebarItemViewToAnnotation']['get'](_0x2a1524),_0xa1c29e=_0x5bfed8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5bfed8)+0x1);return _0xa1c29e&&this['getSidebarItemView'](_0xa1c29e)||null;}['_alignBeforeItem'](_0x16edbe,_0x24f2bb){_0x16edbe['updateHeight']();const _0x5cb3ed=G(_0x24f2bb['bottom']+this['_spaceBetweenItems'],_0x16edbe['top']);return!!_0x5cb3ed&&(this['_setItemTop'](_0x24f2bb,_0x24f2bb['top']-_0x5cb3ed),!0x0);}['_alignAfterItem'](_0xb95e26,_0x4ca4ee){_0xb95e26['updateHeight']();const _0x3d0083=G(_0xb95e26['bottom']+this['_spaceBetweenItems'],_0x4ca4ee['top']);return!!_0x3d0083&&(this['_setItemTop'](_0x4ca4ee,_0x4ca4ee['top']+_0x3d0083,!0x1),!0x0);}['_alignToTargetRect'](_0x23db76){const _0x3d45a6=this['_sidebarItemViewToAnnotation']['get'](_0x23db76);if(!_0x3d45a6||!_0x3d45a6['target']||!_0x3d45a6['targetRect'])return;const _0x2f7877=this['_getTargetTop'](_0x3d45a6,_0x3d45a6['targetRect']);this['_setItemTop'](_0x23db76,_0x2f7877);}['_getTargetTop'](_0x545f63,_0x1b2580){if(null===_0x1b2580)return 0x0;if(_0x545f63['target']instanceof _0x8e59e0)return _0x1b2580['top'];{const _0x5ae6f7=new _0x8e59e0(this['view']['element'])['top'];return _0x1b2580['top']-_0x5ae6f7;}}['_setItemTop'](_0x46156e,_0x5ba0de,_0x79949f=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x79949f&&(_0x5ba0de=Math['max'](_0x5ba0de,this['_getMaxAvailableTop'](_0x46156e))),_0x46156e['top']=_0x5ba0de;}['_getMaxAvailableTop'](_0x3ccb6c){let _0x6ac50c=this['_getItemBefore'](_0x3ccb6c),_0x204966=0x0;for(;_0x6ac50c;)_0x6ac50c['updateHeight'](),_0x204966+=this['_spaceBetweenItems']+_0x6ac50c['height'],_0x6ac50c=this['_getItemBefore'](_0x6ac50c);return _0x204966;}}function G(_0x447794,_0x4becd1){return Math['max'](_0x447794-_0x4becd1,0x0);}function y(_0x2d0bd2){return null!==_0x2d0bd2&&'object'==typeof _0x2d0bd2&&0x1===_0x2d0bd2['nodeType'];}class e extends _0x421416{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20e078){super(_0x20e078),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x20f5ac(),this['_refreshPositioningDebounced']=_0x34c114(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2c2804=this['context']['plugins']['get'](M),_0x26e6d2=this['context']['plugins']['get'](z);_0x2c2804['register']('wideSidebar',this),_0x26e6d2['container']&&_0x2c2804['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x305fe7){if(_0x305fe7===this['activeAnnotation'])return;const _0x51aa48=this['context']['plugins']['get'](z);_0x51aa48['_activeAnnotation']=_0x305fe7;const _0x2e9498=this['activeAnnotation'];_0x51aa48['refresh']({'blurredAnnotation':_0x2e9498,'activatedAnnotation':_0x305fe7}),this['activeAnnotation']=_0x305fe7;}['attach'](_0x505fc6){this['annotations']=_0x505fc6;const _0x1aaccf=this['context']['plugins']['get'](z);if(_0x1aaccf['_annotations']=_0x505fc6,this['isAttached'])throw new _0x44a585('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1aaccf,'set:container',()=>{this['detach'](),this['listenTo'](_0x1aaccf,'change:container',_0x1e7731=>{_0x1e7731['off'](),this['attach'](_0x505fc6);});}),_0x1aaccf['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2fdbdf=_0x12e856=>{_0x12e856['updateTargetRect'](),_0x1aaccf['addAnnotation'](_0x12e856);};for(const _0x1473b6 of _0x505fc6)_0x2fdbdf(_0x1473b6);this['listenTo'](_0x505fc6,'add',(_0x8a8bb1,_0x75b55d)=>{_0x2fdbdf(_0x75b55d);}),this['listenTo'](_0x505fc6,'remove',(_0x2d771d,_0x4fe3ad,_0x42d106)=>{_0x1aaccf['rearrange']({'removedAnnotation':_0x4fe3ad,'previousAnnotation':_0x505fc6['get'](_0x42d106-0x1),'nextAnnotation':_0x505fc6['get'](_0x42d106+0x1)}),_0x4fe3ad===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x505fc6,'focus',(_0x8fa9ae,_0xd1149d)=>{this['setActiveAnnotation'](_0xd1149d);}),this['listenTo'](_0x505fc6,'blur',()=>{this['setActiveAnnotation'](null);});const _0xed0d8d=this['context']instanceof _0x14f334?this['context']['editors']:new _0x20f5ac([this['context']]);for(const _0x266df6 of _0xed0d8d)this['_integrateWithEditorAnnotations'](_0x266df6);this['listenTo'](_0xed0d8d,'add',(_0x369134,_0x213ddc)=>{this['listenTo'](_0x213ddc,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x213ddc);});}),this['listenTo'](_0xed0d8d,'remove',(_0x13faf3,_0x1a36a1)=>{_0x1a36a1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1a36a1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x44a585('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4c5fc1=this['context']['plugins']['get'](z);_0x4c5fc1['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4c5fc1),this['stopListening'](this['annotations']),this['context']instanceof _0x14f334&&this['stopListening'](this['context']['editors']);for(const _0x147124 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x147124);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x171ea8){if(!_0x171ea8['plugins']['has']('EditorAnnotations'))return;const _0x132a19=_0x171ea8['plugins']['get']('EditorAnnotations'),_0x2ead67=()=>{const _0x4fa55a=_0x132a19['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4fa55a[0x0]||null);};this['listenTo'](_0x132a19,'refresh',_0x2ead67),this['listenTo'](_0x132a19,'blur',(_0x35ff96,{isAnnotationTracked:_0x3d70ff})=>{this['activeAnnotation']&&_0x3d70ff(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x132a19,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x17dde9=>{_0x132a19['hasDomSelection']()&&(_0x2ead67(),_0x17dde9['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x132a19);}['_destroyEditorAnnotationsIntegration'](_0xf4380e){this['stopListening'](_0xf4380e),this['_editorAnnotations']['remove'](_0xf4380e);}}class C extends tt{['counterView'];constructor(_0x5ea090){super(_0x5ea090);const _0x508329=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2dd6f5,_0x3981b2)=>_0x2dd6f5?'...':_0x3981b2['toString']()),this['set']('annotationType',''),this['icon']=_0x2bfb89,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x508329['to']('annotationType',_0x56bf48=>'ck-annotation-counter__badge--'+_0x56bf48),_0x508329['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x508329['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x421416{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5c9e42){super(_0x5c9e42),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x1dc1fd),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x20f5ac(),this['_refreshPositioningDebounced']=_0x34c114(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x124027(this['context']['locale']),this['balloonPanelView']=new _0x1bb654(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x13701a){this['annotations']=_0x13701a;const _0x6e9c47=this['context']['plugins']['get'](z),_0x36ee5f=this['balloonPanelView'];if(_0x6e9c47['_annotations']=_0x13701a,this['isAttached'])throw new _0x44a585('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x6e9c47,'set:container',()=>{this['detach'](),this['listenTo'](_0x6e9c47,'change:container',_0x33f7c8=>{_0x33f7c8['off'](),this['attach'](_0x13701a);});}),_0x6e9c47['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4f16e8=_0x5ebf99=>{const _0x3c2128=new C(this['context']['locale']);_0x6e9c47['addAnnotation'](_0x5ebf99,_0x3c2128),this['_annotationToNarrowView']['set'](_0x5ebf99,_0x3c2128),_0x3c2128['bind']('isDirty','annotationType','number')['to'](_0x5ebf99['view'],'isDirty','type','length'),_0x3c2128['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x36ee5f['content']['first']!==_0x5ebf99['view']?(this['_showBalloon'](_0x5ebf99),_0x5ebf99['view']['element']['focus'](),this['setActiveAnnotation'](_0x5ebf99)):this['setActiveAnnotation'](null);});};for(const _0x58f988 of _0x13701a)_0x4f16e8(_0x58f988);this['listenTo'](_0x13701a,'add',(_0x26f784,_0x4c98df)=>{_0x4f16e8(_0x4c98df);}),this['listenTo'](_0x13701a,'remove',(_0x300eca,_0x404b88,_0x56a53e)=>{this['_annotationToNarrowView']['get'](_0x404b88)['destroy'](),this['_annotationToNarrowView']['delete'](_0x404b88),_0x6e9c47['rearrange']({'removedAnnotation':_0x404b88,'previousAnnotation':_0x13701a['get'](_0x56a53e-0x1),'nextAnnotation':_0x13701a['get'](_0x56a53e+0x1)}),_0x404b88===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x13701a,'focus',(_0x296d98,_0x458daa)=>{this['setActiveAnnotation'](_0x458daa);}),this['listenTo'](_0x13701a,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x5283b1,_0x36f283)=>{_0x36f283['keyCode']===_0x36e4d5['esc']&&_0x36ee5f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x36ee5f['content']['first']),this['_hideBalloon'](),_0x36f283['stopPropagation'](),_0x36f283['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x1ada22,_0x4ca200)=>{const _0x196f35=_0x4ca200['target'];_0x36ee5f['isVisible']&&_0x36ee5f['element']['contains'](_0x196f35)||_0x6e9c47['view']['element']['contains'](_0x196f35)||_0x1ada22['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1c8d06=>_0x1c8d06['contains'](_0x196f35))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x3f1bfc=this['context']instanceof _0x14f334?this['context']['editors']:new _0x20f5ac([this['context']]);for(const _0x594c55 of _0x3f1bfc)this['_integrateWithEditorAnnotations'](_0x594c55);this['listenTo'](_0x3f1bfc,'add',(_0x3b0279,_0x29e6a1)=>{this['listenTo'](_0x29e6a1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x29e6a1);});}),this['listenTo'](_0x3f1bfc,'remove',(_0x5baba0,_0x3009d5)=>{_0x3009d5['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3009d5['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1ff0a6){if(_0x1ff0a6===this['activeAnnotation'])return;const _0x41cf4e=this['context']['plugins']['get'](z);if(_0x41cf4e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1ff0a6,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1ff0a6)_0x41cf4e['getSidebarItemView'](_0x1ff0a6)?this['_showBalloon'](_0x1ff0a6):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x1ff0a6;}['detach'](){if(!this['isAttached'])throw new _0x44a585('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x42ade9=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x587a0a=>_0x587a0a['destroy']()),this['_annotationToNarrowView']['clear'](),_0x42ade9['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x14f334&&this['stopListening'](this['context']['editors']);for(const _0xf703ca of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xf703ca);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'](_0x2c25c6){if(!_0x2c25c6['plugins']['has']('EditorAnnotations'))return;const _0x414657=_0x2c25c6['plugins']['get']('EditorAnnotations'),_0x5b2620=this['context']['plugins']['get'](z),_0x38fc4b=this['annotations'],_0x39a876=this['balloonPanelView'],_0x58d616=()=>{const _0x48f972=_0x414657['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x48f972),this['setActiveAnnotation'](_0x48f972[0x0]||null);};this['listenTo'](_0x414657,'refresh',_0x58d616),this['listenTo'](_0x414657,'blur',(_0x5ab28f,{isAnnotationTracked:_0x1c2e28})=>{this['activeAnnotation']&&_0x1c2e28(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x414657,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x38fc4b,'blur',_0x29f996=>{_0x414657['hasDomSelection']()&&_0x29f996['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x47403f,_0x718cc2)=>{const _0x40635e=_0x718cc2['target'];_0x39a876['isVisible']&&_0x39a876['element']['contains'](_0x40635e)||_0x5b2620['view']['element']['contains'](_0x40635e)||this['activeAnnotation']&&_0x414657['hasDomSelection']()&&(_0x58d616(),_0x47403f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x414657);}['_destroyEditorAnnotationsIntegration'](_0x3e7d87){_0x3e7d87&&(this['stopListening'](_0x3e7d87),this['_editorAnnotations']['remove'](_0x3e7d87));}['_setSelectedAnnotations'](_0x2eef19){for(const _0x12d02d of this['_selectedAnnotations'])_0x2eef19['includes'](_0x12d02d)||this['_manuallyClosedAnnotationViews']['delete'](_0x12d02d['view']);this['_selectedAnnotations']=_0x2eef19;}['_refreshPositioning'](){const _0xa8b42a=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0xa8b42a['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3de4a4){if(this['_manuallyClosedAnnotationViews']['has'](_0x3de4a4['view']))return;const _0x35b8cd=this['balloonPanelView']['content']['first'];_0x35b8cd!==_0x3de4a4['view']?(_0x35b8cd&&this['_detachListeners'](_0x35b8cd),this['_attachListeners'](_0x3de4a4['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3de4a4['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x375082=this['balloonPanelView']['content']['first'],_0x302099=_0x375082&&this['annotations']['getByView'](_0x375082);if(!_0x302099||!this['_annotationToNarrowView']['has'](_0x302099))return;const _0x261762=this['_annotationToNarrowView']['get'](_0x302099)['element'],_0x9a050a=(function(){const _0x5b017d=_0x1bb654['defaultPositions'];return[_0x5b017d['southArrowNorthEast'],_0x5b017d['northArrowSouthEast'],_0x5b017d['southArrowNorth'],_0x5b017d['northArrowSouth'],_0x5b017d['southArrowNorthWest'],_0x5b017d['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x261762,'positions':_0x9a050a});}['_hideBalloon'](){const _0x3dbed9=this['balloonPanelView'],_0x581f7b=_0x3dbed9['content']['first'];_0x581f7b&&(this['_detachListeners'](_0x581f7b),_0x3dbed9['unpin'](),_0x3dbed9['content']['clear']());}['_attachListeners'](_0x456a7c){this['listenTo'](_0x456a7c,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x456a7c,'Esc',(_0x2867f7,_0x1747cc)=>{this['_manuallyClosedAnnotationViews']['add'](_0x456a7c),this['_hideBalloon'](),_0x1747cc();});}['_detachListeners'](_0x372f96){this['stopListening'](_0x372f96);}}class c extends _0x1ba062{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x4e8dcc,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x42cb5a){super(_0x42cb5a),_0x42cb5a['editing']['view']['addObserver'](_0x579eac),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x42cb5a['plugins']['get'](_0x4e8dcc),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x22a1c2=this['editor']['plugins']['get'](M);_0x22a1c2['context']===this['editor']&&(_0x22a1c2['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x3efef6,_0x10a78b)=>{const _0x23e0e6=this['_balloon'];if(this['isAttached']&&_0x23e0e6['visibleView']){const _0x701f68=this['annotations']['getByView'](_0x23e0e6['visibleView']);_0x701f68&&this['_closeAnnotation'](_0x701f68),_0x10a78b();}}));}['afterInit'](){const _0xb9e64e=this['editor']['plugins']['get'](M);_0xb9e64e['context']===this['editor']&&(_0xb9e64e['hasActive']()||_0xb9e64e['switchTo']('inline'));}['setActiveAnnotation'](_0x55bac1){_0x55bac1!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x55bac1&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x55bac1)&&this['_addAnnotationToBalloon'](_0x55bac1,!0x0),_0x55bac1['isActive']=!0x0),_0x55bac1||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x55bac1);}['attach'](_0x1b1ac7){this['annotations']=_0x1b1ac7;const _0x39e9c6=this['editor']['plugins']['get'](M),_0x4f7147=this['_balloon'];if(this['isAttached'])throw new _0x44a585('inlineannotations-attach-already-attached',this);if(_0x39e9c6['context']!==this['editor'])throw new _0x44a585('inlineannotations-not-allowed-with-context',this);const _0x3c0cc3=this['editor']['plugins']['get'](P);this['listenTo'](_0x3c0cc3,'refresh',()=>{const _0x1697e9=_0x3c0cc3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x5ba611,_0x3e8157;!this['_forceRefresh']&&(_0x5ba611=_0x1697e9,_0x3e8157=this['_selectedAnnotations'],_0x5ba611['length']===_0x3e8157['length']&&_0x5ba611['every'](_0x3f0cc4=>_0x3e8157['includes'](_0x3f0cc4)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x1697e9),this['setActiveAnnotation'](_0x1697e9[0x0]||null));}),this['listenTo'](_0x3c0cc3,'blur',(_0xc102c4,{isAnnotationTracked:_0x22a2a6})=>{this['activeAnnotation']&&_0x22a2a6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1ec8ce,_0x34df03,_0x356c25)=>{_0x356c25||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b1ac7,'remove',(_0x5ccafe,_0x59e9b6)=>{this['_removeAnnotationFromBalloon'](_0x59e9b6),_0x59e9b6===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4f7147,'change:visibleView',(_0x4952b2,_0x3dc766,_0xf40273,_0x4f3754)=>{_0x4f3754&&this['stopListening'](_0x4f3754);const _0x4d3d08=_0x1b1ac7['getByView'](_0xf40273);_0xf40273&&_0x4d3d08&&(this['listenTo'](_0xf40273,'change:height',()=>{_0x4f7147['updatePosition']();}),this['listenTo'](_0xf40273,'Esc',()=>{this['_closeAnnotation'](_0x4d3d08),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4d3d08&&this['setActiveAnnotation'](_0x4d3d08));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4f7147['visibleView']&&(_0x1b1ac7['getByView'](_0x4f7147['visibleView'])&&_0x4f7147['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 _0x44a585('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x552b1b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x552b1b);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x25a972){for(const _0x2dd288 of this['_selectedAnnotations'])_0x25a972['includes'](_0x2dd288)||this['_manuallyClosed']['delete'](_0x2dd288);for(const _0x52df16 of this['annotations'])_0x25a972['includes'](_0x52df16)||this['_removeAnnotationFromBalloon'](_0x52df16);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x38f465 of _0x25a972)this['_addAnnotationToBalloon'](_0x38f465);}this['_selectedAnnotations']=_0x25a972;}['_addAnnotationToBalloon'](_0x2c81c4,_0x140d70=!0x1){this['_manuallyClosed']['has'](_0x2c81c4)||(this['_addedAnnotations']['has'](_0x2c81c4)||this['_balloon']['hasView'](_0x2c81c4['view'])||(this['_addedAnnotations']['add'](_0x2c81c4),this['_balloon']['add']({'stackId':_0x2c81c4['view']['id'],'view':_0x2c81c4['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2c81c4)}})),_0x140d70&&this['_balloon']['showStack'](_0x2c81c4['view']['id']));}['_getBalloonTargetForAnnotation'](_0x50e957){const _0x57cbee=_0x50e957['target'],_0x354c5c=this['editor']['editing']['view'],_0x49c4f4=_0x354c5c['document']['selection']['getFirstRange'](),_0x2cb85b=_0x354c5c['domConverter']['viewRangeToDom'](_0x49c4f4);if(_0x2cb85b['collapse'](!0x0),_0x57cbee){if(_0x57cbee instanceof _0x8e59e0)return _0x57cbee;let _0x557c09=[];for(const _0x407d3c of _0x57cbee)_0x557c09['push'](...B(_0x407d3c['getClientRects']()));_0x557c09=function(_0x2d137c){const _0x2ffab6=[];let _0x1617cf=_0x2d137c[0x0];for(let _0x8fb255=0x1;_0x8fb255<_0x2d137c['length'];_0x8fb255++)F(_0x1617cf,_0x2d137c[_0x8fb255])?_0x1617cf['width']+=_0x2d137c[_0x8fb255]['width']:(_0x2ffab6['push'](_0x1617cf),_0x1617cf=_0x2d137c[_0x8fb255]);return _0x2ffab6['push'](_0x1617cf),_0x2ffab6;}(_0x557c09);const _0x33a59a=_0x2cb85b['getBoundingClientRect']();return _0x557c09['find'](_0x21fdf4=>_0x21fdf4['top']<=_0x33a59a['top']&&_0x21fdf4['bottom']>=_0x33a59a['bottom']&&_0x21fdf4['left']<=_0x33a59a['left']&&_0x21fdf4['right']>=_0x33a59a['right'])||_0x557c09[0x0];}return _0x50e957['targetRect']||_0x2cb85b;}['_removeAnnotationFromBalloon'](_0x27d918){this['_addedAnnotations']['has'](_0x27d918)&&this['_balloon']['hasView'](_0x27d918['view'])&&(this['_addedAnnotations']['delete'](_0x27d918),this['_balloon']['remove'](_0x27d918['view']));}['_closeAnnotation'](_0x3b1429){this['_manuallyClosed']['add'](_0x3b1429),this['_removeAnnotationFromBalloon'](_0x3b1429);}}function B(_0x69dd75){return Array['from'](_0x69dd75)['map'](DOMRect['fromRect']);}function F(_0x7fca5,_0x4aa2cd){return _0x7fca5['top']===_0x4aa2cd['top']&&_0x7fca5['bottom']===_0x4aa2cd['bottom']&&_0x7fca5['right']===_0x4aa2cd['left'];}class et extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x56e1a3,_0x2cf729){super(_0x56e1a3),this['set']('isEmpty',!_0x2cf729['length']),this['focusTracker']=new _0x56f3e8(),this['_annotationViews']=_0x2cf729,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x28df27({'focusables':_0x2cf729,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2cf729,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2cf729,'remove',(_0x4855fe,_0x10ffb5)=>{_0x10ffb5['isActive']&&this['focus'](),_0x2cf729['length']||(this['isEmpty']=!0x0);});const _0xc747cc=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x56e1a3,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2cf729},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0xc747cc['if']('isEmpty','ck-hidden',_0xefae73=>!_0xefae73)]},'children':[{'text':E(_0x56e1a3,'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 _0x31f57a of this['_annotationViews'])this['focusTracker']['add'](_0x31f57a['element']);this['_annotationViews']['on']('change',(_0x477c8b,{added:_0x29aea1,removed:_0xc55f56})=>{for(const _0x29c46f of _0x29aea1)this['focusTracker']['add'](_0x29c46f['element']);for(const _0x239abb of _0xc55f56)this['focusTracker']['remove'](_0x239abb['element']);});}}class f extends _0x421416{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x1816e7){super(_0x1816e7),this['archivedThreads']=new _0x20f5ac();}['init'](){const _0x54bfec=this['context'],_0x2f9996=_0x54bfec['plugins']['get'](o),_0x573e10=_0x54bfec['plugins']['get'](O);this['listenTo'](_0x2f9996,'addCommentThread',(_0xec8320,{threadId:_0x5801db})=>{const _0x4e15af=_0x2f9996['getCommentThread'](_0x5801db);_0x4e15af['archivedAt']&&this['archivedThreads']['add'](_0x4e15af,this['_calculatePosition'](_0x4e15af['archivedAt'])),this['listenTo'](_0x4e15af,'change:archivedAt',(_0x171d01,_0x1f6a2a,_0x585f51)=>{_0x585f51?this['archivedThreads']['has'](_0x4e15af)||this['archivedThreads']['add'](_0x4e15af,this['_calculatePosition'](_0x4e15af['archivedAt'])):this['archivedThreads']['has'](_0x4e15af)&&this['archivedThreads']['remove'](_0x4e15af);});}),this['listenTo'](_0x2f9996,'removeCommentThread',(_0x952901,{threadId:_0xb3c9bf})=>{const _0x4de5e1=_0x2f9996['getCommentThread'](_0xb3c9bf);this['stopListening'](_0x4de5e1),this['archivedThreads']['has'](_0x4de5e1)&&this['archivedThreads']['remove'](_0x4de5e1);},{'priority':'highest'}),this['listenTo'](_0x573e10['collection'],'focus',(_0x13dff2,_0x502da8)=>{_0x502da8['isVisible']||(_0x502da8['isActive']=!0x0,_0x573e10['activate'](_0x502da8));});}['_calculatePosition'](_0x3d2ecc){const _0x2c47e5=[...this['archivedThreads']]['findIndex'](_0x4d7405=>_0x4d7405['archivedAt']<_0x3d2ecc);return _0x2c47e5>-0x1?_0x2c47e5:this['archivedThreads']['length'];}}class a extends _0x1ba062{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,it];}constructor(_0x52199a){super(_0x52199a),this['annotationViews']=new _0x269a3e(),this['_pendingThreads']=[];}['init'](){const _0x8fa0a6=this['editor'],_0x46b592=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x8fa0a6['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](tt,!0x0)),_0x8fa0a6['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x562766=this['_createCommentsArchiveButton'](_0x278e14);return _0x562766['set']({'role':'menuitemcheckbox'}),_0x562766;});const _0x3eb100=_0x8fa0a6['plugins']['get'](f),_0x4812c5=_0x8fa0a6['plugins']['get']('Annotations'),_0x4e82a5=_0x8fa0a6['plugins']['get']('CommentsRepository');_0x3eb100['archivedThreads']['forEach'](_0x4add5c=>{this['_handleNewThread'](_0x4add5c);}),this['listenTo'](_0x3eb100['archivedThreads'],'add',(_0x784e1,_0x3148d1)=>{this['_handleNewThread'](_0x3148d1);}),this['listenTo'](_0x4812c5['collection'],'add',(_0x18cc9a,_0x501d35)=>{const _0x567946=this['_pendingThreads']['find'](_0x115d1b=>{const _0x26f70f=_0x4e82a5['_threadToController']['get'](_0x115d1b);return _0x26f70f&&_0x501d35['innerView']===_0x26f70f['view'];});if(_0x567946){const _0x559fe6=this['_calculatePosition'](_0x567946['archivedAt']);this['annotationViews']['add'](_0x501d35['view'],_0x559fe6),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x567946),0x1);}}),this['listenTo'](_0x3eb100['archivedThreads'],'remove',(_0x4ba822,_0x4a50a5)=>{const _0x251b00=_0x8fa0a6['config']['get']('collaboration.channelId');if(!_0x251b00||_0x4a50a5['channelId']===_0x251b00){if(this['_pendingThreads']['includes'](_0x4a50a5))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4a50a5),0x1);else{const _0x545ad8=_0x4e82a5['_threadToController']['get'](_0x4a50a5),_0x3ebc49=_0x4812c5['getByInnerView'](_0x545ad8['view']);this['annotationViews']['remove'](_0x3ebc49['view']),this['stopListening'](_0x3ebc49['focusableElements']);}}}),this['listenTo'](_0x4812c5['collection'],'add',(_0x4ef471,_0x3c4776)=>{this['listenTo'](_0x3c4776,'escape',_0x46b592);}),this['listenTo'](_0x4812c5['collection'],'remove',(_0x3e953b,_0x342500)=>{this['stopListening'](_0x342500,'escape',_0x46b592);});}['_handleNewThread'](_0x2cd373){const _0x4beb71=this['editor']['plugins']['get']('CommentsRepository'),_0x10719a=this['editor']['plugins']['get']('Annotations'),_0x43c645=this['editor']['config']['get']('collaboration.channelId');if(!_0x43c645||_0x2cd373['channelId']===_0x43c645){const _0x573ec2=_0x4beb71['_threadToController']['get'](_0x2cd373);if(!_0x573ec2)return void this['_pendingThreads']['push'](_0x2cd373);const _0x593c6a=this['_calculatePosition'](_0x2cd373['archivedAt']),_0x395ada=_0x10719a['getByInnerView'](_0x573ec2['view']);_0x395ada['isVisible']&&_0x10719a['_visibleAnnotations']['remove'](_0x395ada),this['annotationViews']['add'](_0x395ada['view'],_0x593c6a);}}['_calculatePosition'](_0x164ab5){const _0xbfc93a=this['editor']['config']['get']('collaboration.channelId'),_0x407dcf=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0xb5d96d=>_0xb5d96d['channelId']===_0xbfc93a)['findIndex'](_0x5d58b2=>_0x5d58b2['archivedAt']<_0x164ab5);return _0x407dcf<0x0||_0x407dcf>this['annotationViews']['length']?this['annotationViews']['length']:_0x407dcf-0x1;}['_toggleDialog'](){const _0x3ba84c=this['editor'],_0xf1175=_0x3ba84c['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new et(_0x3ba84c['locale'],this['annotationViews'])),'commentsArchive'===_0xf1175['id']?_0xf1175['hide']():_0xf1175['show']({'id':'commentsArchive','title':E(_0x3ba84c['locale'],'COMMENTS_ARCHIVE'),'icon':_0x1bf6a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':st['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x16f357,_0x4d4731=!0x1){const _0x3371f5=this['editor']['locale'],_0x98260=this['editor']['plugins']['get']('Dialog'),_0x3c1f6c=new _0x16f357(_0x3371f5);return _0x3c1f6c['bind']('isEnabled')['to'](this,'isEnabled'),_0x3c1f6c['bind']('isOn')['to'](_0x98260,'id',_0x3c5272=>'commentsArchive'===_0x3c5272),_0x3c1f6c['set']({'label':E(_0x3371f5,'COMMENTS_ARCHIVE'),'icon':_0x1bf6a,'isToggleable':!0x0}),_0x4d4731&&(_0x3c1f6c['tooltip']=!0x0),this['listenTo'](_0x3c1f6c,'execute',()=>this['_toggleDialog']()),_0x3c1f6c;}['_hideDialogOnAnnotationEscape']=_0x3fbecf=>{const _0x90d77=_0x3fbecf['source'];if(!this['annotationViews']['has'](_0x90d77['view']))return;const _0x3d52af=this['editor']['plugins']['get']('Dialog');_0x3d52af['isOpen']&&'commentsArchive'===_0x3d52af['id']&&(_0x3d52af['hide'](),_0x3fbecf['stop']());};}class p extends _0x1ba062{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,Tt as CommentThreadController,ie as CommentThreadInputView,_t as CommentThreadView,bt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0xac8302,ContextPlugin as _0x18f184,PendingActions as lt,Command as _0x58209a,Plugin as _0x454998,Context as _0x300bcf}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x56605d,uid as _0xad4cb1,KeystrokeHandler as jt,FocusTracker as _0x23af45,diff as _0x2d9a31,Collection as _0x104685,Rect as _0x272831,CKEditorError as _0x3b855d,first as _0x2bd294,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x1cb629,keyCodes as _0x4e1d06}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2b24da,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x4094e9,trimHtml as _0xacdd3e,LateFocusDropdownButtonView as _0x7adfe0,Users as st,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x8b439e}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x250c1b}from'es-toolkit/compat';import{IconUndo as _0x50d6f8,IconCheck as _0x436e93,IconPencil as _0x3acb6e,IconRemoveComment as _0x41b314,IconThreeVerticalDots as _0x5e7bde,IconAddComment as _0x4ad487,IconCommentsArchive as _0x17b757}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x13d99f,ButtonView as _0x367ece,ViewCollection as _0x245df5,createDropdown as _0x370620,ListView as _0xfe4ad3,focusChildOnDropdownOpen as _0x599507,ListItemView as _0x17a3b1,MenuBarMenuListItemButtonView as _0x37c988,BodyCollection as _0x4f9103,BalloonPanelView as _0x5eba4e,ContextualBalloon as _0x109ba7,Dialog as _0x3afdf9,DialogViewPosition as tt}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x2a0f49}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x549d4b}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x55487f}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x56605d(){['model'];['view'];constructor(_0x290b99,_0x2cf670){super(),this['model']=_0x290b99,this['model']['_isAttached']=!0x0,this['view']=_0x2cf670,this['listenTo'](_0x2cf670,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x2cf670,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x2cf670,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x2cf670,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x2cf670,'addComment',(_0x5580e1,_0x5a3cca)=>this['addComment'](_0x5a3cca)),this['listenTo'](_0x2cf670,'updateComment',(_0x1892fd,_0x2ec642,_0x479718)=>this['updateComment'](_0x2ec642,_0x479718)),this['listenTo'](_0x2cf670,'removeComment',(_0x1bd512,_0x470f23)=>this['removeComment'](_0x470f23));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x30c406){this['model']['addComment']({'content':_0x30c406,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0xbebffc,_0x2678f3){this['model']['getComment'](_0xbebffc)['update']({'content':_0x2678f3});}['removeComment'](_0x695783){this['model']['getComment'](_0x695783)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0x2003f2,_0x35ee8f,_0x76a761){const t=_0x2003f2['t'];switch(_0x35ee8f){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'},_0x76a761);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x76a761);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'},_0x76a761);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'},_0x76a761);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x76a761);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'},_0x76a761);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'},_0x76a761);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'},_0x76a761);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'';}}class Vt extends Xt{['main'];['editable'];constructor(_0xd7360,_0x16d82c){super(_0xd7360);const _0x40bf85=_0xad4cb1();this['main']=this['createCollection'](),this['editable']=new $t(_0xd7360,_0x16d82c,void 0x0,{'label':()=>E(_0xd7360,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xd7360['uiLanguageDirection'],'lang':_0xd7360['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x40bf85},'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']();}}class Ot extends Ut{['view'];constructor(_0x4d2c7e){super(_0x4d2c7e),this['view']=new Vt(_0x4d2c7e['locale'],_0x4d2c7e['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x590489=this['editor']['editing']['view'],_0x43b65e=this['view']['editable'],_0x3b62af=_0x590489['document']['getRoot']();_0x43b65e['name']=_0x3b62af['rootName'],this['view']['render']();const _0x41419c=_0x43b65e['element'];this['setEditableElement'](_0x43b65e['name'],_0x41419c),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x590489['attachDomRoot'](_0x41419c),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x56605d(_0xac8302){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x1f6ff3={}){function _0x4fd76d(_0x48b906){return _0x48b906['map'](_0x122d8c=>String['fromCharCode'](_0x122d8c))['join']('');}(_0x1f6ff3=Object['assign']({},_0x1f6ff3))['plugins']||(_0x1f6ff3['plugins']=Rt['defaultPlugins']),super(_0x1f6ff3),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4fd76d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4fd76d([0x76,0x69,0x65,0x77])][_0x4fd76d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4fd76d([0x61,0x75,0x74,0x6f]),this[_0x4fd76d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4fd76d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4fd76d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4fd76d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4fd76d([0x6f,0x6b])});}['create'](){const _0x3b16b8=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3b16b8))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1c39be=>{const _0x5d19ec=this['model']['document']['getRoot'](),_0x5709aa=_0x5d19ec&&_0x5d19ec['getChild'](_0x5d19ec['childCount']-0x1);_0x1c39be['setSelection'](_0x5709aa,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x17535d=this['editing']['view'],_0x4d8b00=_0x17535d['document']['getRoot'](),_0x1df6a5=_0x4d8b00['getChild'](0x0);_0x4d8b00['childCount']>0x1||!_0x1df6a5||'p'!=_0x1df6a5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x17535d,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1df6a5['placeholder']=this['placeholder']),Ft({'view':_0x17535d,'element':_0x1df6a5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1df6a5);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x44a11e,_0x1966e2={}){super(_0x44a11e),this['editor']=null,this['_editorConfig']=_0x1966e2,this['set']('value',_0x1966e2['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x44a11e,'Reply...')),this['set']('submitLabel',E(_0x44a11e,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x23af45(),this['focusCycler']=new _0x13d99f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'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',(_0x23d112,_0x59a345)=>{this['cancelButtonView']['fire']('execute'),_0x59a345();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3ff492,_0x4740c3)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4740c3());}),this['on']('submit',(_0x5bc498,_0x25fc43)=>{_0x25fc43['length']>0xfde8?(alert(E(_0x44a11e,'TOO_LONG_COMMENT_ALERT',[_0x25fc43['length'],0xfde8])),_0x5bc498['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 _0x7ef5ce=this['editor'];this['element']['insertBefore'](_0x7ef5ce['ui']['element'],this['element']['firstChild']),_0x7ef5ce['model']['document']['on']('change',()=>this['value']=_0x7ef5ce['getData']()),_0x7ef5ce['bind']('placeholder')['to'](this),this['focusables']['add'](_0x7ef5ce['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4fa6ba){-0x1===_0x4fa6ba?(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:_0x3dbb7f}=this,_0x2a2394=new _0x367ece(_0x3dbb7f);return _0x2a2394['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2a2394['withText']=!0x0,_0x2a2394['bind']('label')['to'](this,'submitLabel'),_0x2a2394['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2a2394['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x59490e,_0x595a74)=>!_0x595a74&&!!_0x59490e['trim']()),_0x2a2394;}['_createCancelButton'](){const {locale:_0x19b50f}=this,_0x186d75=new _0x367ece(_0x19b50f);return _0x186d75['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x186d75['label']=E(_0x19b50f,'Cancel'),_0x186d75['withText']=!0x0,_0x186d75['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x186d75;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5460d2=>{this['focusTracker']['add'](_0x5460d2['element']);}),this['focusables']['on']('change',(_0x94cadd,_0x52c20e)=>{for(const _0xe38c37 of Array['from'](_0x52c20e['added'])['reverse']())this['focusTracker']['add'](_0xe38c37['element']);});}}class ie extends kt{constructor(_0x20e536,_0x26a2d2,_0x37e24a){super(_0x20e536),this['commentInputView']=new hs(_0x20e536,_0x37e24a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3c9097,_0x35532f)=>_0x3c9097||!!_0x35532f),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 _0x2b24da(_0x20e536,_0x26a2d2),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'](_0x145001){this['commentInputView']['focus'](_0x145001);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x27518b,_0x39a8b9)=>{const {submitButtonView:_0x979d76,cancelButtonView:_0x34b1cf,editor:_0x5aafa5}=this['commentInputView'];[_0x979d76['element'],_0x34b1cf['element'],_0x5aafa5?_0x5aafa5['editing']['view']['getDomRoot']():null]['filter'](_0x1e21f8=>_0x1e21f8)['some'](_0x480af5=>_0x480af5['contains'](_0x39a8b9['target']))||(this['focus'](),_0x39a8b9['preventDefault']());});}}class cs extends kt{constructor(_0x1f278c){super(_0x1f278c);const _0x2da6fd=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2da6fd['to']('count',_0x453830=>E(_0x1f278c,'NUMBER_OF_COMMENTS',_0x453830))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x4fbe61,_0x4c6519,_0x1f166e){super(_0x4fbe61);const _0x2f775b=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4c6519['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4c6519,this['_config']=_0x1f166e,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x23af45(),this['keystrokes']=new jt(),this['focusCycler']=new _0x13d99f({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x51b807=>this['commentViews']['map'](_0xc6e7b2=>_0xc6e7b2['element'])['includes'](_0x51b807['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x4fbe61),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3cb505=>_0x3cb505-this['_config']['maxCommentsWhenCollapsed']);for(const _0x19661f of _0x4c6519['comments'])this['_handleNewCommentModel'](_0x19661f);this['_handleInfoComment'](),this['listenTo'](_0x4c6519['comments'],'add',(_0x2e59af,_0x410cc4)=>{const _0x3fc829=this['_calculatePosition'](_0x410cc4);this['length']++,this['_handleNewCommentModel'](_0x410cc4,_0x3fc829),this['refreshVisibleViews']();}),this['listenTo'](_0x4c6519['comments'],'remove',(_0x3051eb,_0xd786c5)=>{this['length']--,this['_handleRemoveCommentModel'](_0xd786c5),this['refreshVisibleViews']();}),this['listenTo'](_0x4c6519,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4c6519,'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',_0x2f775b['if']('length','ck-hidden',_0x228059=>!_0x228059)],'aria-label':E(_0x4fbe61,'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'](_0x663ffd){-0x1===_0x663ffd?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xaa9dfe of this['commentViews'])_0xaa9dfe['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x254cd2,_0x51baea){const _0x439f84=new this['_config']['CommentView'](this['locale'],_0x254cd2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x439f84['viewUid']=_0x254cd2['id'],_0x439f84['delegate']('removeComment')['to'](this),_0x439f84['delegate']('updateComment')['to'](this),_0x439f84['delegate']('resolveCommentThread')['to'](this),_0x439f84['delegate']('editorReady')['to'](this),_0x439f84['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x439f84,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x439f84,_0x51baea);}['_calculatePosition'](_0xe77f22){const _0x52df36=this['_model']['_findOptimalIndex'](_0xe77f22);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0xe77f22['authoredAt']?_0x52df36-0x1:_0x52df36:_0x52df36-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x570df5={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x570df5,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x570df5));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x32090a){const _0x187907=this['commentViews']['remove'](_0x32090a['id']);this['stopListening'](_0x187907),_0x187907['isEditMode']&&this['_updateHasDirtyComment'](),_0x187907['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2aa202=>_0x2aa202['isEditMode']);}['_rearrangeCollapse'](){const _0x1031b0=function(_0x20cda6){const _0x145b7c=new _0x104685();for(const _0x5b6043 of _0x20cda6)_0x145b7c['add'](_0x5b6043);return _0x145b7c;}(this['commentViews']),_0x462774=this['_collapsedCommentsView']['count'];for(let _0x29fbae=0x1;_0x29fbae<=_0x462774;_0x29fbae++)_0x1031b0['remove'](0x1);for(const _0x1fa6ec of _0x1031b0)_0x1fa6ec['collapse']();_0x462774>0x0&&_0x1031b0['add'](this['_collapsedCommentsView'],0x1),as(_0x2d9a31(Array['from'](this['visibleViews']),Array['from'](_0x1031b0)),this['visibleViews'],_0x1031b0);}['_rearrangeExpand'](){as(_0x2d9a31(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1ed50d of this['visibleViews'])_0x1ed50d['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4ae400=>{this['focusTracker']['add'](_0x4ae400['element']),this['keystrokes']['listenTo'](_0x4ae400['element']);}),this['commentViews']['on']('change',(_0x23fc69,_0xe0096d)=>{for(const _0x4d07c1 of _0xe0096d['removed'])this['focusTracker']['remove'](_0x4d07c1['element']),this['keystrokes']['stopListening'](_0x4d07c1['element']);for(const _0x461f02 of Array['from'](_0xe0096d['added'])['reverse']())this['focusTracker']['add'](_0x461f02['element']),this['keystrokes']['listenTo'](_0x461f02['element']);});}}function as(_0x4110e2,_0x40f83d,_0x1443a2){let _0xcca861=0x0;for(const _0x11a7c4 of _0x4110e2)switch(_0x11a7c4){case'insert':_0x40f83d['add'](_0x1443a2['get'](_0xcca861),_0xcca861),_0xcca861++;break;case'delete':_0x40f83d['remove'](_0xcca861);break;case'equal':_0xcca861++;}}class ls extends kt{constructor(_0x581071){super(_0x581071);const _0x34c5b9=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x34c5b9['to']('contextValue',_0xed68c3=>E(_0x581071,'THREAD_CONTEXT_LABEL',_0xed68c3)),'tabindex':-0x1},'children':[{'text':_0x34c5b9['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3e620f,_0x12ba6b){super(_0x3e620f);const _0x36a223=this['bindTemplate'];this['_model']=_0x12ba6b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x23af45(),this['keystrokes']=new jt(),this['focusCycler']=new _0x13d99f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x513c15=>!!_0x513c15),this['bind']('contextValue')['to'](this['_model'],'context',_0x5491ab=>_0x5491ab&&_0x5491ab['value']?this['_trimContextValue'](_0x5491ab['value']):E(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',_0x36a223['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 _0x2c1439=new _0x367ece(this['locale']);return _0x2c1439['label']=E(this['locale'],'Reopen'),_0x2c1439['tooltip']=E(this['locale'],'Reopen'),_0x2c1439['icon']=_0x50d6f8,_0x2c1439['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4984d1=>!_0x4984d1),_0x2c1439['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x58a9f4,_0x4f7bbc)=>_0x58a9f4&&_0x4f7bbc),_0x2c1439['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2c1439;}['_trimContextValue'](_0x17ebca){if(_0x17ebca['length']<0x96)return _0x17ebca;const _0xbf23c8=_0x17ebca['lastIndexOf']('\x20',0x93);return _0x17ebca['substring'](0x0,_0xbf23c8>-0x1?_0xbf23c8:0x93)+'...';}['_attachContextActions'](){const _0x25685c=this['element']['querySelector']('.ck-context'),_0x14bbdd=_0x25685c['querySelector']('.ck-context__value');this['listenTo'](_0x25685c,'mouseenter',()=>{_0x14bbdd['offsetWidth']<_0x14bbdd['scrollWidth']&&_0x25685c['classList']['add']('overlay');}),this['listenTo'](_0x25685c,'mouseleave',()=>{_0x25685c['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3e9c99 of this['focusables'])this['focusTracker']['add'](_0x3e9c99['element']),this['keystrokes']['listenTo'](_0x3e9c99['element']);}['_createContextView'](){const _0x3698c4=new ls(this['locale']);return _0x3698c4['bind']('contextValue')['to'](this),_0x3698c4;}}class is extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x44fc9a,_0x1d975c,_0x18748f,_0x4dde79){super(_0x44fc9a),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1d975c,this['_localUser']=_0x18748f,this['_config']=_0x4dde79,this['commentThreadHeaderView']=new Yt(_0x44fc9a,_0x1d975c),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x44fc9a,E(_0x44fc9a,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x44fc9a,_0x1d975c,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4dde79)),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',(_0x192304,_0x6119ce)=>_0x192304||!!_0x6119ce),this['bind']('isUnlinked')['to'](_0x1d975c,'unlinkedAt',_0x1da973=>!!_0x1da973),this['bind']('ariaLabel')['to'](this,'length',_0x3c9c36=>{const _0x12875e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x3c9c36,_0x12875e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x23af45(),this['keystrokes']=new jt(),this['focusCycler']=new _0x13d99f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x40cc86=>_0x40cc86['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x57541c=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x43773f=_0x57541c['commentInputView'];return _0x57541c['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x43773f,'value',(_0x3a0001,_0x447d4a,_0x450502,_0x5e5f8a,_0x70fb6)=>!!_0x70fb6||!!_0x5e5f8a&&_0x450502&&!_0x447d4a||_0x3a0001&&_0x450502&&!_0x447d4a),_0x43773f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3b8e6c,_0x132f7c,_0x4f5eeb)=>{let _0x10c3c1;return _0x10c3c1=_0x4f5eeb&&_0x132f7c?'Reply\x20to\x20reopen\x20discussion...':_0x3b8e6c?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x10c3c1);}),_0x43773f['bind']('submitLabel')['to'](this,'length',_0x4185ef=>E(this['locale'],_0x4185ef?'Reply':'Comment')),_0x43773f['on']('submit',(_0x2f971f,_0x8c3331)=>{this['fire']('addComment',_0x8c3331),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x43773f['on']('cancel',()=>{this['focus']();}),_0x43773f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x43773f['on']('cancel',_0x4104ec=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4104ec['stop']());}),this['on']('change:isActive',(_0x2ded3a,_0x543af5,_0x44333c)=>{_0x44333c||this['length']||_0x43773f['value']||this['fire']('removeCommentThread');}),_0x57541c;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(is){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x184e18,_0xee9373,_0x2ef406,_0x3998ed){super(_0x184e18,_0xee9373,_0x2ef406,_0x3998ed),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x184e18,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x3e4f77,_0x49ca1d,_0x42abcc)=>{_0x42abcc||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x3d0ce9,_0x12a88c,_0xe4933f)=>{_0xe4933f&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x42c824=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x42c824['if']('isActive','ck-thread--active'),_0x42c824['if']('isUnlinked','ck-thread--unlinked'),_0x42c824['if']('isConfirm','ck-thread--remove-confirmation'),_0x42c824['to']('actionIndicator',_0x30b8d9=>_0x30b8d9?'ck-thread--'+_0x30b8d9:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x42c824['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 _0x3034ca of this['commentsListView']['commentViews'])_0x3034ca['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3b8baf}=this,_0x23a4b8=this['commentsListView']['commentViews']['get'](0x0);_0x23a4b8===this['_boundFirstCommentView']||_0x23a4b8['isSystemComment']||(this['_boundFirstCommentView']=_0x23a4b8,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x23a4b8,'actionIndicator',_0xe08cb0=>'remove'===_0xe08cb0?'remove':null),_0x23a4b8['placeholder']=E(_0x3b8baf,'Write\x20a\x20comment...'),_0x23a4b8['removeButton']['on']('execute',_0x245c60=>{_0x245c60['stop'](),this['showConfirm'](E(_0x3b8baf,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x23a4b8['focus']();}),_0x23a4b8['actionBar']['add'](this['resolveButton'],0x0),_0x23a4b8['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4987c9=new _0x4094e9(this['locale']);return _0x4987c9['label']=E(this['locale'],'Resolve'),_0x4987c9['tooltip']=E(this['locale'],'Resolve'),_0x4987c9['icon']=_0x436e93,_0x4987c9['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4987c9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4247af=>!_0x4247af),_0x4987c9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2a7d28,_0x2a2fb7)=>_0x2a7d28&&!_0x2a2fb7),_0x4987c9['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4987c9;}['_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']));}}class os extends kt{constructor(_0x34fd1d){super(_0x34fd1d),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1f8ab6,_0x561eb8,_0x509f28)=>{this['element']['innerHTML']=_0x509f28;}),this['element']['innerHTML']=this['content'];}}class rs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0xc85e56,_0x184a2d,_0x42b90e){super(_0xc85e56),this['_model']=_0x184a2d,this['_config']=_0x42b90e,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x184a2d,'content',_0x184a2d,'authoredAt',(_0xf65d3d,_0x471569)=>E(_0xc85e56,'COMMENT_ARIA_LABEL',[_0x184a2d['author']['name'],_0x42b90e['formatDateTime'](_0x471569),new DOMParser()['parseFromString'](_0xf65d3d,'text/html')['body']['textContent'],_0x184a2d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0xc85e56,E(_0xc85e56,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x245df5(),this['focusTracker']=new _0x23af45(),this['keystrokes']=new jt(),this['focusCycler']=new _0x13d99f({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2d9cbb=>_0x2d9cbb['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']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x492b88=new os(this['locale']);return _0x492b88['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x332352,_0x4823e4)=>_0x4823e4?_0xacdd3e(_0x332352,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x332352),_0x492b88;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x32f464=new hs(this['locale'],this['_config']['editorConfig']);return _0x32f464['value']=this['_model']['content'],_0x32f464['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x32f464['submitLabel']=E(this['locale'],'Save'),_0x32f464['on']('submit',(_0x382d41,_0x286630)=>{this['fire']('updateComment',this['_model']['id'],_0x286630),this['switchToDisplayMode'](),this['focus']();}),_0x32f464['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x32f464['once']('editorReady',()=>{_0x32f464['focus']();}),_0x32f464['createEditor'](),_0x32f464['delegate']('editorReady')['to'](this),_0x32f464['delegate']('editorDestroyed')['to'](this),_0x32f464;}['_setupKeyboardNavigation'](){const _0x3d40c2=this['element'];this['keystrokes']['listenTo'](_0x3d40c2);for(const _0x3803c1 of this['focusables'])this['focusTracker']['add'](_0x3803c1['element']),this['keystrokes']['listenTo'](_0x3803c1['element']);this['focusables']['on']('change',(_0xc522c8,_0x263586)=>{for(const _0x15ec25 of _0x263586['removed'])this['focusTracker']['remove'](_0x15ec25['element']),this['keystrokes']['stopListening'](_0x15ec25['element']);for(const _0x3c7935 of _0x263586['added'])this['focusTracker']['add'](_0x3c7935['element']),this['keystrokes']['listenTo'](_0x3c7935['element']);}),this['keystrokes']['set']('enter',(_0x1cb27d,_0x56941d)=>{_0x3d40c2===_0x1cb27d['target']&&(this['focusCycler']['focusFirst'](),_0x56941d());}),this['keystrokes']['set']('esc',(_0x3427f6,_0x541bb4)=>{_0x3d40c2!==_0x3427f6['target']&&(this['focus'](),_0x541bb4());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(rs){['actionBar'];['userView'];constructor(_0x21d23a,_0x1bb5f4,_0x7a2b1f){super(_0x21d23a,_0x1bb5f4,_0x7a2b1f),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x21d23a,'Reply...')),this['bind']('authoredAt')['to'](_0x1bb5f4),this['bind']('resolvedAt')['to'](_0x1bb5f4),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 _0x2b24da(_0x21d23a,_0x1bb5f4['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x1bb5f4,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x49c681=this['bindTemplate'],_0x1482df=[{'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':_0x49c681['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x49c681['to']('authoredAt',_0x362d59=>this['_config']['formatDateTime'](_0x362d59))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x49c681['if']('isEditMode','ck-comment__actions--hidden'),_0x49c681['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']&&_0x1482df['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x49c681['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x49c681['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x49c681['if']('isEditMode','ck-comment--edit'),_0x49c681['if']('isSystemComment','ck-comment--info'),_0x49c681['to']('actionIndicator',_0x4799dc=>_0x4799dc?'ck-comment--'+_0x4799dc:'')],'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':_0x1482df}]}]};}['_createEditButton'](){const _0x1c75b0=new _0x367ece(this['locale']);return _0x1c75b0['label']=E(this['locale'],'Edit'),_0x1c75b0['icon']=_0x3acb6e,_0x1c75b0['withText']=!0x0,_0x1c75b0['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1c75b0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x58dd3d=>!_0x58dd3d),_0x1c75b0['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1c75b0['on']('execute',()=>this['switchToEditMode']()),_0x1c75b0;}['_createRemoveButton'](){const _0x36029a=new _0x367ece(this['locale']);return _0x36029a['label']=E(this['locale'],'Remove'),_0x36029a['icon']=_0x41b314,_0x36029a['withText']=!0x0,_0x36029a['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x36029a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x499e2f=>!_0x499e2f),_0x36029a['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x36029a['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x36029a;}['_createDropdown'](){const _0x30727d=_0x370620(this['locale'],_0x7adfe0),_0x977930=_0x30727d['panelView']['children'],_0x39f4f7=new _0xfe4ad3(this['locale']),_0x52de25=_0x30727d['bindTemplate'];_0x599507(_0x30727d,()=>this['items']['find'](_0x4bc647=>_0x4bc647['isVisible'])),_0x30727d['extendTemplate']({'attributes':{'class':[_0x52de25['if']('isVisible','ck-hidden',_0x7fec7c=>!_0x7fec7c)]}});const _0x27ba4c=(_0x2af862,_0x95f4ad=-0x1)=>{const _0x3a7033=new _0x17a3b1(this['locale']);_0x3a7033['children']['add'](_0x2af862);const _0x5f9dbf=_0x95f4ad>-0x1?_0x95f4ad:_0x39f4f7['items']['length'];_0x39f4f7['items']['add'](_0x3a7033,_0x5f9dbf);const _0x1c702c=Array['from'](this['items']);_0x30727d['unbind']('isEnabled','isVisible'),_0x30727d['bind']('isEnabled')['toMany'](_0x1c702c,'isEnabled',(..._0x47cd2f)=>_0x47cd2f['some'](_0x409b9f=>_0x409b9f)),_0x30727d['bind']('isVisible')['toMany'](_0x1c702c,'isVisible',(..._0x312a29)=>_0x312a29['some'](_0x5b970b=>_0x5b970b));};_0x30727d['panelPosition']='sw',_0x30727d['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x5e7bde});for(const _0x3f2865 of this['items'])_0x27ba4c(_0x3f2865);return _0x977930['add'](_0x39f4f7),_0x30727d['listenTo'](this['items'],'add',(_0x4a28f0,_0x3768c1,_0x40483f)=>{_0x27ba4c(_0x3768c1,_0x40483f);}),_0x30727d['listenTo'](this['items'],'remove',(_0x54d961,_0x81d24b,_0x111472)=>{_0x39f4f7['items']['remove'](_0x111472);}),_0x30727d;}['_attachActions'](_0x4e043e,_0x3760c1){const _0x3f8485=_0x4e043e&&_0x4e043e['element'];_0x3f8485&&(this['listenTo'](_0x3f8485,'mouseenter',()=>this['actionIndicator']=_0x3760c1),this['listenTo'](_0x3f8485,'focus',()=>this['actionIndicator']=_0x3760c1),this['listenTo'](_0x3f8485,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3f8485,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x1c949d=super['_createCommentInputView']();return _0x1c949d['bind']('placeholder')['to'](this),_0x1c949d;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x1a5cb4){const _0x56e6e7=Dt(_0x1a5cb4,0x1e),_0x2fe49c=new MutationObserver(_0x358370=>{for(const _0x30a239 of _0x358370)('attributes'==_0x30a239['type']&&'class'==_0x30a239['attributeName']||'childList'==_0x30a239['type']||'characterData'==_0x30a239['type'])&&_0x56e6e7();});return{'attach'(_0x543d7c){_0x2fe49c['observe'](_0x543d7c,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x2fe49c['disconnect'](),_0x56e6e7['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x23588d,_0x462ae4){super(_0x23588d),this['id']=_0xad4cb1(),this['focusTracker']=new _0x23af45(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x4f0042,_0x299a8f)=>this['fire']('Esc',_0x299a8f)),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']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x462ae4),this['mainView']=_0x462ae4;const _0x48b0d4=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x48b0d4['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 _0x1fbdfe=this['element']['clientHeight'];_0x1fbdfe&&(this['height']=_0x1fbdfe);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x56605d(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5ae02a,target:_0x1c3d0b,type:_0x29d408,isVisible:_0x5b2e78=!0x0}){super(),this['view']=_0x5ae02a,this['view']['element']||this['view']['render'](),this['_type']=_0x29d408,this['_target']=_0x1c3d0b,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x104685([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x291254,_0x541eb5)=>{this['view']['focusTracker']['add'](_0x541eb5);}),this['focusableElements']['on']('remove',(_0x3737b1,_0x97f4ad)=>{this['view']['focusTracker']['remove'](_0x97f4ad);}),this['set']('isVisible',_0x5b2e78);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4c8945=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x4c8945),_0x4c8945;}get['targetRect'](){const _0x454049=this['target'];if(null===_0x454049)return null;if(_0x454049 instanceof _0x272831)return _0x454049;const _0x1152c4=_0x454049['filter'](_0x96bfc4=>function(_0x3975d5){const _0x2d368b=_0x3975d5['offsetParent'];if(_0x2d368b)return!0x0;const _0x5ea904=_0x3975d5['getClientRects']()['item'](0x0);return!!_0x5ea904;}(_0x96bfc4));return 0x0===_0x1152c4['length']?null:new _0x272831(_0x1152c4[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x952dc3){this['view']['isActive']=_0x952dc3,this['view']['mainView']['isActive']=_0x952dc3;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xfa97ab){if(!(null===_0xfa97ab||_0xfa97ab instanceof _0x272831||Array['isArray'](_0xfa97ab)&&_0xfa97ab['every'](_0x194607=>li(_0x194607))))throw new _0x3b855d('annotation-invalid-target',null,{'target':_0xfa97ab});}['_getNormalizedTarget'](){const _0x1289d3='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x1289d3)?[_0x1289d3]:_0x1289d3;}}function li(_0x87a163){return null!==_0x87a163&&'object'==typeof _0x87a163&&'nodeType'in _0x87a163&&0x1===_0x87a163['nodeType'];}class _ extends _0x104685{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2fa681=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x23af45(),this['_focusTracker']['on']('change:isFocused',(_0x4c39d9,_0x501e94,_0xe4c5ae)=>{_0xe4c5ae||this['fire']('blur');});for(const _0x196648 of _0x2fa681)this['add'](_0x196648);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x35856d){if(this['has'](_0x35856d))throw new _0x3b855d('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x35856d['innerView'],_0x35856d),this['_viewToAnnotation']['set'](_0x35856d['view'],_0x35856d);for(const _0x1d882f of _0x35856d['focusableElements'])this['_focusTracker']['add'](_0x1d882f);this['listenTo'](_0x35856d['focusableElements'],'add',(_0x3a343d,_0x5813a3)=>{this['_focusTracker']['add'](_0x5813a3);}),this['listenTo'](_0x35856d['focusableElements'],'remove',(_0x828b1e,_0x2e3d3f)=>{this['_focusTracker']['remove'](_0x2e3d3f);}),this['listenTo'](_0x35856d['view']['focusTracker'],'change:isFocused',(_0x43376d,_0x23a05d,_0x338fa5)=>{_0x338fa5&&this['fire']('focus',_0x35856d);}),_0x35856d['updateTargetRect']();const _0x5b7489=this['_getOrderInContent'](_0x35856d['view']['targetRect']);return super['add'](_0x35856d,_0x5b7489);}['remove'](_0x4b4902){if(!this['has'](_0x4b4902))throw new _0x3b855d('annotationcollection-not-existing-item',null);this['stopListening'](_0x4b4902['view']['focusTracker']),this['stopListening'](_0x4b4902['focusableElements']);for(const _0x54e893 of _0x4b4902['focusableElements'])this['_focusTracker']['remove'](_0x54e893);return this['_viewToAnnotation']['delete'](_0x4b4902['view']),this['_innerViewToAnnotation']['delete'](_0x4b4902['innerView']),super['remove'](_0x4b4902);}['getByInnerView'](_0x486d8a){return this['_innerViewToAnnotation']['get'](_0x486d8a);}['getByView'](_0x70e193){return this['_viewToAnnotation']['get'](_0x70e193);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3953cc of this)_0x3953cc['updateTargetRect']();this['_sort']();}['_sort'](){const _0x56bd6b=Array['from'](this)['sort']((_0x1492b8,_0x51661f)=>v(_0x1492b8['view']['targetRect'],_0x51661f['view']['targetRect']));for(let _0x19759f=_0x56bd6b['length']-0x1;_0x19759f>0x0;_0x19759f--){const _0x76eeb8=_0x56bd6b[_0x19759f];_0x19759f!==this['getIndex'](_0x76eeb8)&&(this['remove'](_0x76eeb8),this['add'](_0x76eeb8));}}['_getOrderInContent'](_0x25758d){let _0x578741=0x0;if(!_0x25758d)return this['length'];for(const _0x5a7c5e of this){const _0x211d7b=_0x5a7c5e['view']['targetRect'];if(_0x211d7b){if(v(_0x25758d,_0x211d7b)<0x0)return _0x578741;_0x578741++;}}return _0x578741;}}function v(_0x2edce9,_0x106b5b){if(null===_0x2edce9&&null===_0x106b5b)return 0x0;if(null===_0x2edce9)return-0x1;if(null===_0x106b5b)return 0x1;const _0xd4a536=_0x2edce9['top']-_0x106b5b['top'];return 0x0==_0xd4a536?_0x2edce9['left']-_0x106b5b['left']:_0xd4a536;}class O extends _0x18f184{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38144a){if(super(_0x38144a),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x38144a instanceof _0xac8302){const _0x2a1b7a=_0x38144a['locale'];_0x38144a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x2a1b7a,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x2a1b7a,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x2a1b7a,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x2a1b7a,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x2a1b7a,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x2a1b7a,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x2a1b7a,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0xa7d5cf){this['collection']['add'](_0xa7d5cf);}['remove'](_0x26bd7e){this['collection']['remove'](_0x26bd7e),_0x26bd7e['destroy']();}['refreshVisibility'](){for(const _0x568079 of this['collection'])_0x568079['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x229146){return this['collection']['getByInnerView'](_0x229146);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5316e6 of this['collection'])_0x5316e6['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x173ef2){this['fire']('_activateAnnotation',_0x173ef2);}['createAnnotation'](_0x173ee2){return new d(_0x173ee2);}['createAnnotationView'](_0x13d9af,_0x4b7fb2){return new S(_0x13d9af,_0x4b7fb2);}['_addActiveAnnotation'](_0x5196df){const _0xb4e11c=new Set(this['activeAnnotations']);_0xb4e11c['add'](_0x5196df),this['activeAnnotations']=_0xb4e11c;}['_removeActiveAnnotation'](_0x12f911){const _0x283ce4=new Set(this['activeAnnotations']);_0x283ce4['delete'](_0x12f911),this['activeAnnotations']=_0x283ce4;}['_bindAnnotationsToVisibleAnnotations'](){const _0x52f031=this['collection'],_0x1a7f7a=this['_visibleAnnotations'];function _0x28531b(_0x382ad0){const _0x60013=_0x382ad0['source'];_0x60013['isVisible']&&!_0x1a7f7a['has'](_0x60013)?_0x1a7f7a['add'](_0x60013):!_0x60013['isVisible']&&_0x1a7f7a['has'](_0x60013)&&_0x1a7f7a['remove'](_0x60013),_0x60013['view']['focusTracker']['remove'](_0x60013['view']['element']),_0x60013['view']['focusTracker']['add'](_0x60013['view']['element']);}this['listenTo'](_0x52f031,'add',(_0x363e9e,_0x5914dc)=>{_0x5914dc['isVisible']&&_0x1a7f7a['add'](_0x5914dc),this['listenTo'](_0x5914dc,'change:isVisible',_0x28531b);}),this['listenTo'](_0x52f031,'remove',(_0x35d199,_0x2c66b9)=>{_0x1a7f7a['has'](_0x2c66b9)&&_0x1a7f7a['remove'](_0x2c66b9),this['stopListening'](_0x2c66b9,'change:isVisible',_0x28531b);});}['_setupEnterAnnotationKeystroke'](){const _0x49b9c4=_0x5a21c6=>{_0x5a21c6['on']('ready',()=>{_0x5a21c6['keystrokes']['set'](_0x549d4b,(_0x57d25c,_0x447b5c)=>{const _0x2d29f3=_0x2bd294(this['activeAnnotations']['values']());_0x2d29f3&&(_0x2d29f3['view']['focus'](),_0x447b5c());});});};this['context']instanceof _0xac8302?_0x49b9c4(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1e9168,_0xe20833)=>{_0x49b9c4(_0xe20833);});}['_setupEscapeAnnotationHandling'](){const _0x256eb3=_0x39ea98=>{const _0x8c89b2=_0x39ea98['source'],_0x2de83f=[];let _0x4b2f7f;if(Array['isArray'](_0x8c89b2['target'])){_0x4b2f7f=_0x8c89b2['target'][0x0],this['context']instanceof _0xac8302?_0x2de83f['push'](this['context']):this['context']['editors']&&_0x2de83f['push'](...this['context']['editors']);for(const _0x716625 of _0x2de83f)for(const _0x3b0952 of _0x716625['editing']['view']['domRoots']['values']())if(_0x3b0952['contains'](_0x4b2f7f))return void _0x716625['editing']['view']['focus']();_0x4b2f7f['focus']();}};this['listenTo'](this['collection'],'add',(_0x226fcf,_0x32b469)=>{this['listenTo'](_0x32b469,'escape',_0x256eb3,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1ccb24,_0x2acabc)=>{this['stopListening'](_0x2acabc,'escape',_0x256eb3);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x18f184{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f2671){super(_0x1f2671),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x32e975=this['context']['config'];_0x32e975['define']('comments.maxCommentsWhenCollapsed',0x2),_0x32e975['define']('comments.maxThreadTotalWeight',0x1f4),_0x32e975['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x32e975['define']('comments.CommentThreadView',gt),_0x32e975['define']('comments.CommentView',Tt),_0x32e975['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4a8108=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1602a4,_0x34ea90)=>this['_addCommentThread'](_0x34ea90)),this['on']('submitCommentThread',(_0xc21691,_0x1fdf5c)=>this['_submitCommentThread'](_0x1fdf5c)),this['on']('resolveCommentThread',(_0x4167da,_0x49d4ee)=>this['_resolveCommentThread'](_0x49d4ee)),this['on']('resolveCommentThread',(_0xefb658,_0x53aee8)=>this['_updateActiveAnnotation'](_0x53aee8),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x533cec,_0x11b398)=>this['_reopenCommentThread'](_0x11b398)),this['on']('reopenCommentThread',(_0x270591,_0x1d9bb2)=>this['_updateActiveAnnotation'](_0x1d9bb2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x52d4b5,_0x20eef3)=>this['_removeCommentThread'](_0x20eef3)),this['on']('updateCommentThread',(_0x813210,_0x243718)=>this['_updateCommentThread'](_0x243718)),this['on']('updateCommentThread',(_0x36c55c,_0x75a04d)=>this['_updateActiveAnnotation'](_0x75a04d),{'priority':'lowest'}),this['on']('addComment',(_0x252a79,_0x10568a)=>this['_addComment'](_0x10568a)),this['on']('updateComment',(_0xba7de6,_0x5892c8)=>this['_updateComment'](_0x5892c8)),this['on']('removeComment',(_0x3b3e11,_0x435c83)=>this['_removeComment'](_0x435c83)),this['on']('addComment',(_0x1e790d,{threadId:_0xf87707,isFromAdapter:_0x46121a})=>{if(_0x46121a)return;const _0x4a58a5=this['getCommentThread'](_0xf87707),_0x5d3fde=_0x4a58a5&&this['_threadToController']['get'](_0x4a58a5);_0x5d3fde&&_0x5d3fde['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4a8108,'change:activeAnnotations',(_0x41b8a5,_0x8bae49,_0x138230)=>{const _0x21acb8=Array['from'](_0x138230)['map'](_0x4f2fb8=>this['_viewToController']['get'](_0x4f2fb8['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x21acb8?_0x21acb8['model']:null;});}set['adapter'](_0x2e40c0){if(this['_adapter'])throw new _0x3b855d('commentsrepository-adapter-already-set');this['_adapter']=_0x2e40c0;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x5a4e83=_t,threadId:_0x1d4f72=_0xad4cb1(),comments:_0x180ca6=[],unlinkedAt:_0x12668e=null,resolvedAt:_0x47d67c=null,resolvedBy:_0x1c8d9d=null,target:_0x38c4cf=null,context:_0x5efa6e=null,attributes:_0xefe4fc={},isResolvable:_0x3fd51f=!0x0,isSubmitted:_0xcdcbaf=!0x1,isFromAdapter:_0x388684=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x5a4e83),{'channelId':_0x5a4e83,'threadId':_0x1d4f72,'comments':_0x180ca6,'unlinkedAt':_0x12668e,'resolvedAt':_0x47d67c,'resolvedBy':_0x1c8d9d,'target':_0x38c4cf,'context':_0x5efa6e,'attributes':_0xefe4fc,'isFromAdapter':_0x388684,'isResolvable':_0x3fd51f,'isSubmitted':_0xcdcbaf}),this['getCommentThread'](_0x1d4f72);}['openNewCommentThread']({channelId:_0x270b3a=_t,threadId:_0x38c7ee=_0xad4cb1(),target:_0x53112c,context:_0x3f79f5=null,isResolvable:_0x1838aa=!0x0}){if(this['_readOnlyChannels']['has'](_0x270b3a)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x53112c)throw new _0x3b855d('commentsrepository-missing-target');const _0x5ce6d7=this['addCommentThread']({'channelId':_0x270b3a,'threadId':_0x38c7ee,'target':_0x53112c,'context':_0x3f79f5,'isResolvable':_0x1838aa});if(!_0x5ce6d7)return null;const _0x55a717=this['_threadToController']['get'](_0x5ce6d7),_0x506e96=_0x55a717['view']['commentThreadInputView']['commentInputView'],_0x426640=this['context']['plugins']['get'](O),_0x1cb3c4=_0x426640['getByInnerView'](_0x55a717['view']);return _0x426640['activate'](_0x1cb3c4),_0x506e96['once']('editorReady',()=>_0x506e96['focus']()),_0x5ce6d7;}['hasCommentThread'](_0x2535ee){if('string'!=typeof _0x2535ee)throw new _0x3b855d('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2535ee);}['updateCommentThread']({channelId:_0x540941=_t,threadId:_0x419fa9,context:_0x3973ed,unlinkedAt:_0x12510f,attributes:_0x459ed2,isFromAdapter:_0x246691=!0x1}){return this['fire'](Nt('updateCommentThread',_0x540941),{'channelId':_0x540941,'threadId':_0x419fa9,'context':_0x3973ed,'unlinkedAt':_0x12510f,'attributes':_0x459ed2,'isFromAdapter':_0x246691}),this['getCommentThread'](_0x419fa9);}['getCommentThread'](_0x6d2533){if('string'!=typeof _0x6d2533)throw new _0x3b855d('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x6d2533);}['fetchCommentThread']({channelId:_0x98b7cb,threadId:_0x371b1e}={}){const _0x2ea263=this['getCommentThread'](_0x371b1e);if(_0x2ea263)return Promise['resolve'](_0x2ea263);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3b855d('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x98b7cb,'threadId':_0x371b1e})['then'](_0x52c2cb=>this['hasCommentThread'](_0x371b1e)?this['getCommentThread'](_0x371b1e):_0x52c2cb?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x98b7cb},_0x52c2cb)):void 0x0)['catch'](_0x14e64c=>{throw console['error'](_0x14e64c),new _0x3b855d('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2377e9,skipNotAttached:_0xb3dd38=!0x1,skipEmpty:_0x568d2a=!0x1,toJSON:_0x5e3271=!0x1}={}){const _0x5822bb=[];for(const _0xd3582b of this['_threads']['values']())_0x2377e9&&_0xd3582b['channelId']!==_0x2377e9||_0xb3dd38&&!_0xd3582b['isAttached']||_0x568d2a&&0x0===_0xd3582b['length']||_0x5822bb['push'](_0xd3582b);return _0x5e3271?_0x5822bb['map'](_0x30ab6d=>_0x30ab6d['toJSON']()):_0x5822bb;}['setActiveCommentThread'](_0x476d5b){const _0x47037a=this['context']['plugins']['get'](O);if(!_0x476d5b)return void(this['activeCommentThread']&&_0x47037a['deactivateAll']());const _0x37f7c4=this['getCommentThread'](_0x476d5b);if(!_0x37f7c4)throw new _0x3b855d('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x476d5b});if(!this['_threadToController']['has'](_0x37f7c4))throw new _0x3b855d('commentsrepository-active-not-attached',null,{'threadId':_0x476d5b});const _0x5ef153=_0x47037a['getByInnerView'](this['_threadToController']['get'](_0x37f7c4)['view']);_0x47037a['activate'](_0x5ef153);}['switchReadOnly'](_0x3c1e79,_0x29f9eb){_0x3c1e79?this['_readOnlyChannels']['add'](_0x29f9eb):this['_readOnlyChannels']['delete'](_0x29f9eb),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5a8936){return this['_readOnlyChannels']['has'](_0x5a8936)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x56f420,_0x5ac6a1){return new vt(_0x56f420,_0x5ac6a1);}['setPermissions'](_0xead98c,_0x2bc348=_t){this['_permissions']['set'](_0x2bc348,_0xead98c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2e670f=_t){return this['_permissions']['has'](_0x2e670f)?this['_permissions']['get'](_0x2e670f):bt;}['_addCommentThread']({channelId:_0x2f96b6,threadId:_0x2393a7,comments:_0x568b86,unlinkedAt:_0x35fdc8,resolvedAt:_0x3ec282,resolvedBy:_0x400006,target:_0x4b7771,context:_0x4566e5,attributes:_0x30302a,isFromAdapter:_0x1ffb8c,isResolvable:_0x8f0776,isSubmitted:_0x4e7c26}){if('string'!=typeof _0x2393a7)throw new _0x3b855d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2393a7});if(this['hasCommentThread'](_0x2393a7))throw new _0x3b855d('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2393a7});const _0x5c37a4=new ui(this,{'channelId':_0x2f96b6,'id':_0x2393a7,'context':_0x4566e5,'attributes':_0x30302a,'unlinkedAt':_0x35fdc8,'resolvedAt':_0x3ec282,'resolvedBy':_0x400006?this['context']['plugins']['get'](st)['getUser'](_0x400006):null,'isResolvable':_0x8f0776,'isSubmitted':_0x4e7c26||_0x1ffb8c});this['_threads']['set'](_0x2393a7,_0x5c37a4);for(const _0x491169 of _0x568b86)_0x5c37a4['_add'](this['_createNewComment']({'threadId':_0x2393a7,..._0x491169}));return _0x4b7771&&_0x5c37a4['attachTo'](_0x4b7771),_0x1ffb8c||!_0x5c37a4['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2f96b6,'threadId':_0x2393a7});}['_submitCommentThread']({channelId:_0x3358cd,threadId:_0x3fd2b5}){if(!this['hasCommentThread'](_0x3fd2b5))throw new _0x3b855d('commentsrepository-missing-comment-thread',this);const _0x159769=this['getCommentThread'](_0x3fd2b5);if(_0x159769['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x120939,comments:_0x5f1db8,resolvedAt:_0x70bb36,resolvedBy:_0x5014cc,context:_0x470105,attributes:_0x43b60c}=_0x159769,_0x556a08=this['context']['plugins']['get']('PendingActions'),_0xd36bab=_0x556a08['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3358cd,'threadId':_0x120939,'comments':_0x5f1db8['map'](_0x2b2c76=>_0x2b2c76['toJSON']()),'resolvedAt':_0x70bb36,'resolvedBy':_0x5014cc?_0x5014cc['id']:_0x5014cc,'context':_0x470105,'attributes':_0x43b60c})['then'](({comments:_0x2a1a3c})=>{_0x556a08['remove'](_0xd36bab);for(const _0xf9f320 of _0x2a1a3c)this['_updateComment']({'channelId':_0x3358cd,'threadId':_0x3fd2b5,'commentId':_0xf9f320['commentId'],'createdAt':_0xf9f320['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x338037=>{throw console['error'](_0x338037),new _0x3b855d('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5d7687,target:_0x2e5c8c}){const _0x3e2b1a=this['getCommentThread'](_0x5d7687);if(!_0x3e2b1a)throw new _0x3b855d('commentsrepository-attach-missing-comment-thread',this);const _0x252a1b=this['context']['plugins']['get']('PendingActions'),_0x4270e4=this['context']['plugins']['get'](O),_0x155315=this['_createCommentThreadView'](_0x3e2b1a),_0x347eff=new vt(_0x3e2b1a,_0x155315);let _0x182518=null;_0x155315['on']('change:isDirty',(_0x29faf5,_0x52b1e9,_0x3e2dbb)=>{_0x3e2dbb?_0x182518=_0x252a1b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x182518&&(_0x252a1b['remove'](_0x182518),_0x182518=null);}),this['_threadToController']['set'](_0x3e2b1a,_0x347eff),this['_viewToController']['set'](_0x155315,_0x347eff);const _0x1fb14e=new S(this['context']['locale'],_0x155315);_0x1fb14e['bind']('length')['to'](_0x155315),_0x1fb14e['bind']('isDirty')['to'](_0x155315,'isDirty',_0x155315,'length',(_0x3ec014,_0x36b60e)=>_0x3ec014||!_0x36b60e),_0x1fb14e['bind']('isActive')['to'](_0x155315),_0x1fb14e['type']='comment';const _0x27f9ee=new d({'view':_0x1fb14e,'target':_0x2e5c8c,'type':'comment','isVisible':!_0x3e2b1a['archivedAt']});return _0x155315['on']('escape',()=>{_0x27f9ee['fire']('escape');}),this['_bindAnnotationToEditors'](_0x155315,_0x27f9ee),_0x4270e4['add'](_0x27f9ee),_0x27f9ee;}['_bindAnnotationToEditors'](_0x1f0d64,_0x32ce4f){this['listenTo'](_0x1f0d64,'editorReady',(_0xcc6dfd,_0xdcc370)=>{const _0x286773=_0xdcc370['ui']['view']['body']['bodyCollectionContainer'];_0x32ce4f['focusableElements']['add'](_0x286773),this['context']instanceof _0xac8302&&this['context']['ui']['focusTracker']['add'](_0x286773);},{'priority':'highest'}),this['listenTo'](_0x1f0d64,'editorDestroyed',(_0x472c48,_0x57b2e3)=>{const _0x140112=_0x57b2e3['ui']['view']['body']['bodyCollectionContainer'];_0x32ce4f['focusableElements']['has'](_0x140112)&&_0x32ce4f['focusableElements']['remove'](_0x140112),this['context']instanceof _0xac8302&&this['context']['ui']['focusTracker']['remove'](_0x140112);});}['_unbindEditors'](_0x16b4d4){this['stopListening'](_0x16b4d4,'editorReady'),this['stopListening'](_0x16b4d4,'editorDestroyed');}['_createCommentThreadView'](_0x29b43c){const _0x6b70a4=this['context']['plugins']['get'](st),{config:_0x16afb4,locale:_0x5b2029}=this['context'],_0x242a13=pt(_0x16afb4['get']('locale'),_0x5b2029);return new(0x0,(_0x16afb4['get']('comments'))['CommentThreadView'])(_0x5b2029,_0x29b43c,_0x6b70a4['me'],{'editorConfig':{..._0x16afb4['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x16afb4['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x16afb4['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x16afb4['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x16afb4['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x242a13,'CommentView':_0x16afb4['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5d0bf3,channelId:_0x375f31,resolvedAt:_0x59204c,resolvedBy:_0xfdd4f9,isFromAdapter:_0x356b14}){if(!this['hasCommentThread'](_0x5d0bf3))throw new _0x3b855d('commentsrepository-missing-comment-thread',null,{'threadId':_0x5d0bf3});const _0x2630fe=this['getCommentThread'](_0x5d0bf3);if(_0x2630fe['isResolved'])throw new _0x3b855d('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5d0bf3});const _0x45e2b3=this['context']['plugins']['get'](st);if(_0x2630fe['resolvedBy']=_0x45e2b3['getUser'](_0xfdd4f9),_0x2630fe['resolvedAt']=_0x59204c,_0x356b14||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1a4f98=this['context']['plugins']['get']('PendingActions'),_0x330c19=_0x1a4f98['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x375f31,'threadId':_0x5d0bf3})['then'](({resolvedAt:_0x5c878d,resolvedBy:_0x549942})=>{_0x1a4f98['remove'](_0x330c19),_0x2630fe['resolvedBy']['id']!==_0x549942&&(_0x2630fe['resolvedBy']=_0x45e2b3['getUser'](_0x549942)),_0x2630fe['resolvedAt']=_0x5c878d;})['catch'](_0x12b250=>{throw console['error'](_0x12b250),new _0x3b855d('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1a9bee,channelId:_0x3706ad,isFromAdapter:_0x1f9460}){if(!this['hasCommentThread'](_0x1a9bee))throw new _0x3b855d('commentsrepository-missing-comment-thread',null,{'threadId':_0x1a9bee});const _0x4cd841=this['getCommentThread'](_0x1a9bee);if(!_0x4cd841['isResolved'])throw new _0x3b855d('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1a9bee});if(_0x4cd841['resolvedBy']=null,_0x4cd841['resolvedAt']=null,_0x1f9460||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x58012c=this['context']['plugins']['get']('PendingActions'),_0x310cd8=_0x58012c['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x3706ad,'threadId':_0x1a9bee})['then'](()=>_0x58012c['remove'](_0x310cd8))['catch'](_0x43e52b=>{throw console['error'](_0x43e52b),new _0x3b855d('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x9758ed,isFromAdapter:_0x6e67c}){const _0x3843c6=this['getCommentThread'](_0x9758ed);if(!_0x3843c6)throw new _0x3b855d('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x9758ed),this['_threads']['delete'](_0x9758ed),!_0x3843c6['isSubmitted']||_0x6e67c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x25e00d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x57538f}=_0x3843c6,_0x5dc5a3=_0x25e00d['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x57538f,'threadId':_0x9758ed})['then'](()=>_0x25e00d['remove'](_0x5dc5a3))['catch'](_0x340e04=>{throw console['error'](_0x340e04),new _0x3b855d('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4460f2,unlinkedAt:_0x48d246,context:_0x5e17d2,attributes:_0x52cddc,isFromAdapter:_0xcde87c}){if('string'!=typeof _0x4460f2)throw new _0x3b855d('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4460f2});if(!this['hasCommentThread'](_0x4460f2))throw new _0x3b855d('commentsrepository-missing-comment-thread',null,{'threadId':_0x4460f2});const _0x51e9c8=this['getCommentThread'](_0x4460f2);let _0x234307=!0x1;if(void 0x0!==_0x5e17d2&&_0x51e9c8['context']!==_0x5e17d2&&(_0x51e9c8['context']=_0x5e17d2,_0x234307=!0x0),void 0x0!==_0x48d246&&_0x51e9c8['unlinkedAt']!==_0x48d246&&(_0x51e9c8['unlinkedAt']=_0x48d246,_0x234307=!0x0),_0x52cddc&&!At(_0x52cddc,_0x51e9c8['attributes'])&&(_0x51e9c8['attributes']=_0x52cddc,_0x234307=!0x0),!_0x234307)return Promise['resolve']();if(!_0x51e9c8['isSubmitted']||_0xcde87c||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x561be6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2abc8a}=_0x51e9c8,_0x4ebed6=_0x561be6['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2abc8a,'threadId':_0x4460f2,'context':_0x5e17d2,'unlinkedAt':_0x48d246,'attributes':_0x52cddc})['then'](()=>_0x561be6['remove'](_0x4ebed6))['catch'](_0x283ee8=>{throw console['error'](_0x283ee8),new _0x3b855d('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x8c5d2d){const _0x4c66ed=this['context']['plugins']['get'](O),_0x3c5747=this['getCommentThread'](_0x8c5d2d);if(_0x3c5747['_isAttached']=!0x1,this['_threadToController']['has'](_0x3c5747)){const _0x415e8d=this['_threadToController']['get'](_0x3c5747),_0x515c10=_0x415e8d['view'],_0x27720d=_0x4c66ed['getByInnerView'](_0x515c10);this['_threadToController']['delete'](_0x3c5747),this['_viewToController']['delete'](_0x515c10),_0x27720d&&_0x4c66ed['remove'](_0x27720d),_0x415e8d['destroy'](),_0x515c10['destroy']()['then'](()=>{this['_unbindEditors'](_0x515c10);});}}['_updateActiveAnnotation']({threadId:_0x292d56,resolvedAt:_0x1581e7,unlinkedAt:_0x53d603}){const _0x1781d7=!!_0x1581e7,_0x20ec3b=this['context']['plugins']['get'](O),_0x2a41ff=this['getCommentThread'](_0x292d56);if(this['_threadToController']['has'](_0x2a41ff)){const _0x58f5d3=this['_threadToController']['get'](_0x2a41ff)['view'],_0x567dc2=_0x20ec3b['getByInnerView'](_0x58f5d3);_0x567dc2&&(_0x1781d7&&_0x20ec3b['_removeActiveAnnotation'](_0x567dc2),_0x53d603?_0x567dc2['isVisible']=!0x1:_0x567dc2['refreshVisibility']());}}['_getExternalAuthor'](_0x4ec3a4){const _0x49ff84=this['context']['plugins']['get'](st),_0x41707d=It('external:'+_0x4ec3a4),_0x4dfcc0=_0x49ff84['getUser'](_0x41707d);return _0x4dfcc0||_0x49ff84['addUser']({'id':_0x41707d,'name':_0x4ec3a4});}['_createNewComment']({threadId:_0xe93161,commentId:_0xba3d9d=_0xad4cb1(),content:_0x39c09b,authorId:_0xc1b9ec,createdAt:_0x3a3e92,attributes:_0x10ec56}){if('string'!=typeof _0xba3d9d)throw new _0x3b855d('commentsrepository-invalid-commentid');if('string'!=typeof _0xc1b9ec)throw new _0x3b855d('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x39c09b||!_0x39c09b['trim']())throw new _0x3b855d('commentsrepository-invalid-comment-content');const _0x1c4e3b=this['context']['plugins']['get'](st)['getUser'](_0xc1b9ec);if(!_0x1c4e3b)throw new _0x3b855d('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xc1b9ec});let _0x4dec83=null,_0x35e771=_0x3a3e92;return _0x10ec56?.['@external']&&(_0x4dec83=this['_getExternalAuthor'](_0x10ec56['@external']['authorName']),_0x35e771=new Date(_0x10ec56['@external']['createdAt'])),new fi(this,{'threadId':_0xe93161,'id':_0xba3d9d,'author':_0x4dec83||_0x1c4e3b,'creator':_0x1c4e3b,'content':_0x39c09b,'createdAt':_0x3a3e92,'authoredAt':_0x35e771,'attributes':_0x10ec56});}['_addComment'](_0x393fd0){let {threadId:_0x4c5092,content:_0x13be63,attributes:_0x525272,isFromAdapter:_0x5841aa}=_0x393fd0;const _0x22b4da=this['getCommentThread'](_0x393fd0['threadId']);if(!_0x22b4da)throw new _0x3b855d('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5eb197=this['_createNewComment'](_0x393fd0),{id:_0x4b3594}=_0x5eb197;if(_0x22b4da['_add'](_0x5eb197),_0x5841aa||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x22b4da['isSubmitted'])return Promise['resolve']();const _0x5ee3db=this['context']['plugins']['get']('PendingActions'),{channelId:_0x34d67c}=_0x22b4da,_0x39f046=_0x5ee3db['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x525272||(_0x525272={}),this['adapter']['addComment']({'channelId':_0x34d67c,'threadId':_0x4c5092,'commentId':_0x4b3594,'content':_0x13be63,'attributes':_0x525272})['then'](_0x544305=>{_0x5ee3db['remove'](_0x39f046),_0x544305&&this['_updateComment']({'channelId':_0x34d67c,'threadId':_0x4c5092,'commentId':_0x4b3594,'createdAt':_0x544305['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x541fb5=>{throw console['error'](_0x541fb5),new _0x3b855d('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x3e58dc,commentId:_0x13ba0d,content:_0x28bdeb,createdAt:_0x1c7d02,attributes:_0x395477,isFromAdapter:_0x1c8820}){if(void 0x0!==_0x28bdeb&&('string'!=typeof _0x28bdeb||!_0x28bdeb['trim']()['length']))throw new _0x3b855d('commentsrepository-update-comment-invalid-content');const _0x560339=this['getCommentThread'](_0x3e58dc),_0xef6533=_0x560339['getComment'](_0x13ba0d);if(!_0xef6533)throw new _0x3b855d('commentsrepository-update-missing-comment',this);let _0x333e2d=!0x1;if(_0x28bdeb&&_0x28bdeb!==_0xef6533['content']&&(_0xef6533['isEditable']||_0x1c8820)&&(_0xef6533['content']=_0x28bdeb,_0x333e2d=!0x0),_0x1c7d02&&_0x1c7d02!==_0xef6533['createdAt']&&(_0xef6533['createdAt']=_0x1c7d02,_0xef6533['attributes']&&_0xef6533['attributes']['@external']||(_0xef6533['authoredAt']=_0x1c7d02),_0x333e2d=!0x0),_0x395477&&!At(_0x395477,_0xef6533['attributes'])&&(_0xef6533['attributes']=_0x395477,_0x333e2d=!0x0),!_0x333e2d)return Promise['resolve']();if(_0x560339['fire']('commentUpdated'),_0x1c8820||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x373fb8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2624fb}=this['getCommentThread'](_0xef6533['threadId']),_0x272f58=_0x373fb8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2624fb,'threadId':_0x3e58dc,'commentId':_0x13ba0d,'content':_0x28bdeb,'attributes':_0x395477})['then'](()=>_0x373fb8['remove'](_0x272f58))['catch'](_0xe8db37=>{throw console['error'](_0xe8db37),new _0x3b855d('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x294723,commentId:_0x23a0d3,isFromAdapter:_0x2ea7e7}){const _0x6fdf38=this['getCommentThread'](_0x294723),_0x1178b7=_0x6fdf38['getComment'](_0x23a0d3);if(!_0x1178b7)throw new _0x3b855d('commentsrepository-remove-missing-comment',this);if(_0x6fdf38['_remove'](_0x1178b7),_0x2ea7e7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x24e983=this['context']['plugins']['get']('PendingActions'),{channelId:_0x417c72}=_0x6fdf38,_0x5df944=_0x24e983['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x417c72,'threadId':_0x294723,'commentId':_0x23a0d3})['then'](()=>_0x24e983['remove'](_0x5df944))['catch'](_0x51a1ea=>{throw console['error'](_0x51a1ea),new _0x3b855d('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x56605d(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x280dbe,_0x173591){super();const _0x159292=_0x173591['isResolvable'];this['channelId']=_0x173591['channelId'],this['id']=_0x173591['id'],this['comments']=new _0x104685(),this['_repository']=_0x280dbe,this['_isAttached']=!0x1,this['_isSubmitted']=_0x173591['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x280dbe,'_permissions',_0x280dbe,'_readOnlyChannels',()=>_0x280dbe['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x280dbe,'_permissions',()=>_0x280dbe['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x280dbe,'_permissions',()=>{const _0x50a492=_0x280dbe['getPermissions'](this['channelId']);return _0x50a492['write']||_0x50a492['admin'];}),this['bind']('isResolvable')['to'](_0x280dbe,'_permissions',()=>_0x159292&&_0x280dbe['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x173591['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5b0121,_0x1a1e2c)=>_0x5b0121?_0x1a1e2c?_0x5b0121<_0x1a1e2c?_0x5b0121:_0x1a1e2c:_0x5b0121:_0x1a1e2c),this['set']('unlinkedAt',_0x173591['unlinkedAt']||null),this['set']('resolvedAt',_0x173591['resolvedAt']||null),this['set']('resolvedBy',_0x173591['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x56a6ae=>!!_0x56a6ae),this['set']('attributes',_0x173591['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x4868d9,_0x44e879)=>_0x4868d9+_0x44e879['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x3c5622,id:_0x16394f}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x3c5622),{'channelId':_0x3c5622,'threadId':_0x16394f});}['setUnlinkedAt'](_0x6e9e80){this['_update']({'unlinkedAt':_0x6e9e80});}['resolve']({resolvedAt:_0x2f3347=new Date(),resolvedBy:_0x3d7ea3=null,isFromAdapter:_0x4b0530=!0x1}={}){const _0x5a8f08=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x4f671e,id:_0x906fd5}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x4f671e),{'channelId':_0x4f671e,'threadId':_0x906fd5,'resolvedAt':_0x2f3347,'resolvedBy':_0x3d7ea3||_0x5a8f08['id'],'isFromAdapter':_0x4b0530});}['reopen']({isFromAdapter:_0x2c7c7d=!0x1}={}){const {channelId:_0xca4f7,id:_0x251874}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0xca4f7),{'channelId':_0xca4f7,'threadId':_0x251874,'isFromAdapter':_0x2c7c7d});}['setContext'](_0x2d3dad){this['context']||this['_update']({'context':_0x2d3dad});}['setAttribute'](_0x2a501d,_0x43977c){const _0x8a9500=wt(this['attributes']);yt(_0x8a9500,_0x2a501d,_0x43977c),this['_update']({'attributes':_0x8a9500});}['removeAttribute'](_0x2d8b12){const _0x489bc0=wt(this['attributes']);Ct(_0x489bc0,_0x2d8b12),this['_update']({'attributes':_0x489bc0});}['remove']({isFromAdapter:_0x3cf8dc=!0x1}={}){const {channelId:_0x16eb71,id:_0x3d45da}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x16eb71),{'channelId':_0x16eb71,'threadId':_0x3d45da,'isFromAdapter':_0x3cf8dc});}['attachTo'](_0x986192){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x986192});}['addComment'](_0x29fce9){const {channelId:_0x39002a,id:_0x5c28bb}=this;this['_repository']['fire'](Nt('addComment',_0x39002a,_0x5c28bb),Object['assign']({'channelId':_0x39002a,'threadId':_0x5c28bb},_0x29fce9));}['getComment'](_0x23016c){if('string'!=typeof _0x23016c)throw new _0x3b855d('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x23016c});return this['comments']['get'](_0x23016c);}['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'](_0x2d4d03=>_0x2d4d03['toJSON']()),'attributes':this['attributes']};}['_add'](_0x54b32d){return this['listenTo'](_0x54b32d,'change:authoredAt',()=>{const _0x14c54b=this['_findOptimalIndex'](_0x54b32d),_0x4eb44=this['comments'];_0x14c54b-0x1!=_0x4eb44['getIndex'](_0x54b32d)&&_0x14c54b+0x1!=_0x4eb44['getIndex'](_0x54b32d)&&(this['_remove'](_0x54b32d),this['_add'](_0x54b32d));}),this['comments']['add'](_0x54b32d,this['_findOptimalIndex'](_0x54b32d));}['_update'](_0x267d44){const {channelId:_0x18c3ab,id:_0x29c641}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x18c3ab),{..._0x267d44,'channelId':_0x18c3ab,'threadId':_0x29c641});}['_remove'](_0xb956c6){return this['stopListening'](_0xb956c6),_0xb956c6['destroy'](),this['comments']['remove'](_0xb956c6);}['_findOptimalIndex'](_0x3a4ad5){const _0x34d8e6=this['comments']['find'](_0x3d61cc=>new Date(_0x3d61cc['authoredAt'])['getTime']()>new Date(_0x3a4ad5['authoredAt'])['getTime']());return _0x34d8e6?this['comments']['getIndex'](_0x34d8e6):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x56605d(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1808e5,_0x3c3919){super();const _0x59e113=_0x1808e5['context']['plugins']['get'](st)['me'],_0x3d6c07=_0x1808e5['getCommentThread'](_0x3c3919['threadId']),_0x49a674=0x0===_0x3d6c07['comments']['length'],_0x1ac363=_0x59e113===_0x3c3919['author'];this['id']=_0x3c3919['id'],this['threadId']=_0x3c3919['threadId'],this['author']=_0x3c3919['author'],this['creator']=_0x3c3919['creator'],this['isExternal']=Boolean(_0x3c3919['attributes']&&_0x3c3919['attributes']['@external']),this['set']('content',_0x3c3919['content']),this['createdAt']=_0x3c3919['createdAt']||new Date(),this['set']('authoredAt',_0x3c3919['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3d6c07,'resolvedAt'),this['set']('attributes',_0x3c3919['attributes']||{}),this['bind']('isEditable')['to'](_0x1808e5,'_permissions',()=>{const _0x4752a0=_0x1808e5['getPermissions'](_0x3d6c07['channelId'])['write'],_0x5325a9=_0x1808e5['getPermissions'](_0x3d6c07['channelId'])['modifyAll'];return _0x1ac363&&_0x4752a0||!_0x1ac363&&_0x5325a9;}),this['bind']('isRemovable')['to'](_0x3d6c07,'isRemovable',_0x1808e5,'_permissions',_0x576b4b=>{const _0xf0dd15=_0x1808e5['getPermissions'](_0x3d6c07['channelId'])['write'],_0x583d73=_0x1808e5['getPermissions'](_0x3d6c07['channelId'])['modifyAll'];return _0x1ac363&&_0xf0dd15||_0x576b4b&&_0x49a674||!_0x1ac363&&_0x583d73&&!_0x49a674;}),this['bind']('isReadOnly')['to'](_0x3d6c07,'isReadOnly'),this['_repository']=_0x1808e5;}get['weight'](){return Math['max'](function(_0x3637f3){const _0x31c70b=document['createElement']('div');return _0x31c70b['innerHTML']=_0x3637f3,_0x31c70b['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1bc969){const {threadId:_0x1b31e3,id:_0x331491}=this;if(!this['_repository']['hasCommentThread'](_0x1b31e3))throw new _0x3b855d('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5e0ab6}=this['_repository']['getCommentThread'](_0x1b31e3);this['_repository']['fire'](Nt('updateComment',_0x5e0ab6,_0x1b31e3),{'channelId':_0x5e0ab6,'threadId':_0x1b31e3,'commentId':_0x331491,..._0x1bc969});}['setAttribute'](_0x27bc1e,_0x43ac56){const _0x1b6ef5=wt(this['attributes']);yt(_0x1b6ef5,_0x27bc1e,_0x43ac56),this['update']({'attributes':_0x1b6ef5});}['removeAttribute'](_0x3859fc){const _0x11372a=wt(this['attributes']);Ct(_0x11372a,_0x3859fc),this['update']({'attributes':_0x11372a});}['remove'](_0x418ff1={}){if(!_0x418ff1['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4c14e3,id:_0x4b6fd9}=this;if(!this['_repository']['hasCommentThread'](_0x4c14e3))throw new _0x3b855d('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x29efb7}=this['_repository']['getCommentThread'](_0x4c14e3);this['_repository']['fire'](Nt('removeComment',_0x29efb7,_0x4c14e3),{'channelId':_0x29efb7,'threadId':_0x4c14e3,'commentId':_0x4b6fd9,..._0x418ff1});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x1830c8,..._0x2922ae){for(const _0x144feb of _0x2922ae)void 0x0!==_0x144feb&&(_0x1830c8+=':'+String(_0x144feb));return _0x1830c8;}class K extends _0x58209a{['refresh'](){const _0x49c25c=this['editor']['model']['document']['selection'];for(const _0x54e6e5 of _0x49c25c['getRanges']())if(this['_hasContent'](_0x54e6e5))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x259b49=_0xad4cb1()}={}){const _0x106e2c=this['editor']['model'],_0x12b8c2=[];for(const _0x566e8b of _0x106e2c['document']['selection']['getRanges']())this['_hasContent'](_0x566e8b)&&_0x12b8c2['push'](this['_trimToContent'](_0x566e8b));_0x106e2c['change'](_0x5670ae=>{for(const _0x3e53da of _0x12b8c2){const _0x2cb0f5=_0xad4cb1()['substr'](0x1,0x5),_0x12e011='comment:'+_0x259b49+':'+_0x2cb0f5;_0x5670ae['addMarker'](_0x12e011,{'range':_0x3e53da,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x7fa227){for(const _0x173249 of _0x7fa227['getItems']())if(this['_itemIsContent'](_0x173249))return!0x0;return!0x1;}['_itemIsContent'](_0x263e3b){return _0x263e3b['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x263e3b)&&!_0x263e3b['is']('element','tableCell');}['_trimToContent'](_0x1a7cdc){const _0x535362=_0x6a3c07=>!this['_itemIsContent'](_0x6a3c07['item']),_0x3d2499=_0x1a7cdc['start']['getLastMatchingPosition'](_0x535362),_0x57bd8c=_0x1a7cdc['end']['getLastMatchingPosition'](_0x535362,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3d2499,_0x57bd8c);}}class P extends _0x454998{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2181cb){super(_0x2181cb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5ea500=this['editor'],_0xa49b22=_0x5ea500['model']['document']['selection'],_0x37a486=_0x250c1b(()=>this['refreshSelectedViews'](),0xa);_0xa49b22['on']('change:range',(_0x2da730,_0x4d87e4)=>{_0x4d87e4['directChange']&&(_0x37a486['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5ea500['editing']['view']['document'],'change:isFocused',(_0xad1ff8,_0x254ad7,_0x5aeaf5)=>{_0x5aeaf5&&_0x37a486();}),this['listenTo'](_0x5ea500['ui']['focusTracker'],'change:isFocused',(_0x19f814,_0x24f260,_0xf800ea)=>{_0xf800ea||_0x5ea500['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x2fbddd=>this['_editorAnnotationsData']['has'](_0x2fbddd['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x58e3bf){if(this['_editorAnnotations']['has'](_0x58e3bf['view']))return;this['_editorAnnotations']['add'](_0x58e3bf['view']),this['editor']['ui']['focusTracker']['add'](_0x58e3bf['view']['element']);const _0x4194c3=this['editor']['plugins']['get'](O);this['listenTo'](_0x4194c3['collection'],'remove',(_0x3b0acc,_0x2d3db5)=>{this['editor']['ui']['focusTracker']['remove'](_0x2d3db5['view']['element']),this['_editorAnnotations']['delete'](_0x2d3db5['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5add69){if('function'!=typeof _0x5add69)throw new _0x3b855d('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5add69);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x51d72c,annotations:_0xe07255}){const _0x32852d=[],_0x1373ef=this['editor']['model']['document']['selection'],_0x5baa78=Array['from'](_0x1373ef['getRanges']());for(const [_0x232e3f,_0x4dda3a]of this['_editorAnnotationsData']){const _0x2905c2=_0x140bd0(_0x4dda3a),_0x589778=_0xe07255['getByInnerView'](_0x232e3f);_0x2905c2&&_0x589778&&_0x32852d['push']({'annotation':_0x589778,'range':_0x2905c2});}function _0x140bd0(_0x38469c){for(const _0x431157 of _0x38469c)for(const _0x2bc740 of _0x5baa78)if(_0x431157['containsRange'](_0x2bc740,!_0x1373ef['isCollapsed']))return _0x431157;return null;}return _0x32852d['sort']((_0x32b7b0,_0x2c3b50)=>{const _0x544991=_0x32b7b0['range'],_0x129590=_0x2c3b50['range'];if(!_0x544991['isEqual'](_0x129590)){if(_0x544991['containsRange'](_0x129590,!0x0))return 0x1;if(_0x129590['containsRange'](_0x544991,!0x0))return-0x1;}return _0x32b7b0['annotation']==_0x51d72c?-0x1:_0x2c3b50['annotation']==_0x51d72c?0x1:0x0;})['map'](_0x36b7a1=>_0x36b7a1['annotation']);}get['_editorAnnotationsData'](){const _0x277d32=new Map();for(const _0x418d33 of Array['from'](this['_dataCollectors']))for(const [_0x4057d3,_0xe021d7]of _0x418d33())_0x277d32['set'](_0x4057d3,_0xe021d7);return _0x277d32;}}class ct extends _0x454998{['afterInit'](){const _0xa2c19c=this['editor'];if(!_0xa2c19c['plugins']['has']('RestrictedEditingModeEditing'))return;_0xa2c19c['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x454998{constructor(_0x13e5ee){super(_0x13e5ee),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x38ffc5=this['editor'],_0x324702=_0x38ffc5['commands']['get']('importWord'),_0x52ad4f=_0x38ffc5['plugins']['get'](st);_0x324702&&(_0x324702['on']('execute',(_0x444b9b,[,_0x228e61])=>{_0x228e61['collaboration_features']={'comments':!0x0,'user_id':_0x52ad4f['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x324702,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x20179d,_0xed2518){const {comment_threads:_0x5a96ea}=_0xed2518;_0x5a96ea&&_0x5a96ea['forEach'](({thread_id:_0x5270a7,comments:_0x238076,is_resolved:_0x3dc7c3})=>{const _0x35ff7f=new Date(),_0xa9a559=_0x238076['map'](({author:_0x15b49e,content:_0x2ade5c,created_at:_0x4fcf65})=>({'content':_0x2ade5c,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x35ff7f,'attributes':{'@external':{'authorName':_0x15b49e,'createdAt':_0x4fcf65?new Date(_0x4fcf65):new Date(),'source':'importWord'}}})),_0x4945fd=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4945fd,'threadId':_0x5270a7,'comments':_0xa9a559,'resolvedAt':_0x3dc7c3?_0x35ff7f:null});});}}class ut extends _0x454998{constructor(_0x13c03d){super(_0x13c03d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x4aea0e=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4aea0e,'contentInsertion',(_0xbce7af,_0x41a641)=>this['_removeMarkersWithoutThreads'](_0x41a641['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xe1ae8b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xe1ae8b;const _0xd95f85=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4677dd of _0xe1ae8b['keys']()){const [_0x417bc0,_0x5650bb]=_0x4677dd['split'](':');'comment'!=_0x417bc0||_0xd95f85['hasCommentThread'](_0x5650bb)||_0xe1ae8b['delete'](_0x4677dd);}return _0xe1ae8b;}['_registerMarkerInClipboardPipeline'](){const _0x49f3ca=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x159a21=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x159a21&&_0x49f3ca['_registerMarkerToCopy']('comment',_0x159a21);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x305bca){switch(_0x305bca){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0x454998{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x544b23,_0x5e8991)=>{if(!_0x5e8991['options']['showCommentHighlights'])return null;if(_0x5e8991['options']['ignoreResolvedComments']){const {id:_0x52cb89}=er(_0x544b23['markerName']),_0x3a638f=this['editor']['plugins']['get'](o);if(_0x3a638f['getCommentThread'](_0x52cb89)?.['isResolved']&&_0x544b23['item'])return _0x5e8991['consumable']['consume'](_0x544b23['item'],'addMarker:'+_0x544b23['markerName']),_0x5e8991['consumable']['consume'](_0x544b23['item'],'removeMarker:'+_0x544b23['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x257728=>{_0x257728['on']('addMarker:comment',(_0x2a2b18,_0x16bde0,_0xc6849c)=>{if(!_0xc6849c['options']['showCommentHighlights'])return;const _0x10f2db=_0x16bde0['item'];if(!_0x10f2db)return;const _0xd424b=_0xc6849c['mapper']['toViewElement'](_0x10f2db);this['editor']['model']['schema']['isObject'](_0x10f2db)&&_0xd424b&&!_0xd424b['getCustomProperty']('widget')&&_0xd424b['is']('containerElement')&&_0x55487f(_0xd424b,_0xc6849c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x29addb,{writer:_0xb6eb4b,options:_0x5ce1f4})=>{if(!_0x5ce1f4['showCommentHighlights'])return null;const _0x59977c=_0xb6eb4b['createContainerElement']('div'),_0x36955a=_0xb6eb4b['createEmptyElement']('hr');return _0xb6eb4b['addClass']('ck-horizontal-line',_0x59977c),_0xb6eb4b['insert'](_0xb6eb4b['createPositionAt'](_0x59977c,0x0),_0x36955a),_0x59977c;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1d18cd,{writer:_0x16c80b,options:_0x49d5dc})=>{if(!_0x49d5dc['showCommentHighlights'])return null;const _0x5b48ca=_0x16c80b['createContainerElement']('span'),_0x191076=_0x16c80b['createEmptyElement']('img');return _0x16c80b['addClass']('image-inline',_0x5b48ca),_0x16c80b['insert'](_0x16c80b['createPositionAt'](_0x5b48ca,0x0),_0x191076),_0x5b48ca;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x25104e,{writer:_0x27bc8d,options:_0x4b46b9})=>{if(_0x4b46b9['showCommentHighlights'])return _0x27bc8d['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3cea4d,_0x25c603,_0x187cfe)=>{_0x187cfe['options']['showCommentHighlights']&&_0x3cea4d['stop']();},{'priority':'high'});}}class r extends _0x454998{static get['requires'](){return[o,P,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31692a){super(_0x31692a),this['set']('isThreadsLoadingPaused',!0x0),_0x31692a['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5a2714,_0x1253cf,_0x490126,_0x1aeadd)=>{const _0x4c0b5f=_0x31692a['plugins']['get'](o),_0x46644b=_0x490126?er(_0x490126)['id']:null;_0x31692a['model']['change'](()=>{if(_0x46644b){const _0xbf0914=this['getAllMarkersForId'](_0x46644b);for(const _0x5d930e of _0xbf0914)_0x31692a['editing']['reconvertMarker'](_0x5d930e);}if(_0x1aeadd){const {id:_0x449165}=er(_0x1aeadd),_0xba1e2e=_0x4c0b5f['getCommentThread'](_0x449165);if(_0xba1e2e&&_0xba1e2e['unlinkedAt'])return;if(_0xba1e2e&&!_0xba1e2e['isAttached'])return;const _0x3f6fcc=this['getAllMarkersForId'](_0x449165);for(const _0x33812f of _0x3f6fcc)_0x31692a['editing']['reconvertMarker'](_0x33812f);}}),_0x46644b&&this['scrollToThreadMarker'](_0x46644b);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x1d1228=this['editor'],_0x15a441=_0x1d1228['plugins']['get'](o),_0x188215=_0x1d1228['config']['get']('collaboration.channelId'),_0x27230b=_0x15a441['getCommentThreads']()['filter'](_0x12591d=>_0x12591d['channelId']!==_0x188215);_0x1d1228['commands']['add']('addCommentThread',new K(_0x1d1228)),this['listenTo'](_0x1d1228,'change:isReadOnly',(_0x47ae93,_0x1ac37b,_0x3027ab)=>{_0x15a441['switchReadOnly'](_0x3027ab,_0x1d1228['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x15a441,dt('addCommentThread',_0x188215),(_0x349bf2,{threadId:_0x3a8c86})=>{const _0x4f6bd2=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3a8c86);_0x4f6bd2?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3a8c86);}),this['listenTo'](_0x15a441,dt('removeCommentThread',_0x188215),(_0x4a67d8,{threadId:_0x32c931})=>{_0x1d1228['model']['enqueueChange']({'isUndoable':!0x1},_0x3eec2a=>{const _0x441068=this['getAllMarkersForId'](_0x32c931);for(const _0xe0d49c of _0x441068)_0x3eec2a['removeMarker'](_0xe0d49c);});}),this['listenTo'](_0x15a441,dt('resolveCommentThread',_0x188215),(_0x1f932e,{threadId:_0xf92577})=>{(this['_reconvertMarkers'](_0xf92577),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0xf92577)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x15a441,dt('reopenCommentThread',_0x188215),(_0x236a43,{threadId:_0x3e5a15})=>{this['_reconvertMarkers'](_0x3e5a15);},{'priority':'low'}),this['listenTo'](_0x15a441,dt('addComment',_0x188215),(_0xe75dd3,{threadId:_0x3085b3,isFromAdapter:_0x13302b})=>{const _0x5bfd46=this['getAllMarkersForId'](_0x3085b3);if(_0x13302b||0x0==_0x5bfd46['length']||!_0x15a441['hasCommentThread'](_0x3085b3))return;0x1===_0x15a441['getCommentThread'](_0x3085b3)['length']&&_0x1d1228['model']['enqueueChange']({'isUndoable':!0x1},_0x4f420d=>{for(const _0x3cbeba of _0x5bfd46)_0x4f420d['updateMarker'](_0x3cbeba,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x27230b);}['afterInit'](){!async function(_0x136b09){const _0x38bd23=_0x2e25d8([0x66,0x53,0x77,0x76,0x44,0x70,0x62,0x6a,0x59,0x47,0x43,0x69,0x72,0x74,0x48,0x6b,0x37,0x75,0x4a,0x4e,0x54,0x64,0x51,0x6d,0x36,0x41,0x65,0x5a,0x63,0x4d,0x6e,0x61,0x56,0x4f,0x79,0x52,0x45,0x31,0x38,0x35,0x6f,0x78,0x73,0x4c,0x57,0x49,0x46,0x7a,0x6c,0x55,0x67,0x58,0x50,0x34,0x4b,0x30,0x32,0x33,0x71,0x42,0x39,0x68]),_0x59271c=0x43a9de3d,_0x40f1d9=0x43aeac6d^_0x59271c,_0x86bcbb=window[_0x2e25d8([0x44,0x61,0x74,0x65])][_0x2e25d8([0x6e,0x6f,0x77])](),_0x48ec87=_0x136b09[_0x2e25d8([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x15cb21=new window[(_0x2e25d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x56944d=>{_0x48ec87[_0x2e25d8([0x6f,0x6e,0x63,0x65])](_0x2e25d8([0x72,0x65,0x61,0x64,0x79]),_0x56944d);}),_0x561eef={[_0x2e25d8([0x6b,0x74,0x79])]:_0x2e25d8([0x45,0x43]),[_0x2e25d8([0x75,0x73,0x65])]:_0x2e25d8([0x73,0x69,0x67]),[_0x2e25d8([0x63,0x72,0x76])]:_0x2e25d8([0x50,0x2d,0x32,0x35,0x36]),[_0x2e25d8([0x78])]:_0x2e25d8([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]),[_0x2e25d8([0x79])]:_0x2e25d8([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]),[_0x2e25d8([0x61,0x6c,0x67])]:_0x2e25d8([0x45,0x53,0x32,0x35,0x36])},_0x1930eb=_0x48ec87[_0x2e25d8([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2e25d8([0x67,0x65,0x74])](_0x2e25d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4f9d31(){let _0x416abd,_0x1e7ab7=null,_0x54715d=null;try{if(_0x1930eb==_0x2e25d8([0x47,0x50,0x4c]))return _0x2e25d8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x416abd=_0x4546d3(),!_0x416abd)return _0x2e25d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x416abd[_0x2e25d8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x54715d=_0x517ed3(_0x416abd[_0x2e25d8([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x416abd[_0x2e25d8([0x6a,0x74,0x69])])),await _0x540aa7()?_0x4d450f()?_0x45667d()?_0x2e25d8([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x58a269()?(_0x416abd[_0x2e25d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2e25d8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1e7ab7=_0x379571(_0x2e25d8([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x416abd[_0x2e25d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2e25d8([0x74,0x72,0x69,0x61,0x6c])&&(_0x1e7ab7=_0x379571(_0x2e25d8([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x54b308()):_0x2e25d8([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2e25d8([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2e25d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2e25d8([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x45667d(){const _0x5a721f=[_0x2e25d8([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2e25d8([0x74,0x72,0x69,0x61,0x6c])][_0x2e25d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x416abd[_0x2e25d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x86bcbb/0x3e8:0xe10*_0x40f1d9;return _0x416abd[_0x2e25d8([0x65,0x78,0x70])]<_0x5a721f;}function _0x4d450f(){const _0x1a0a83=_0x416abd[_0x2e25d8([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1a0a83)return!0x1;if(_0x1a0a83[_0x2e25d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e25d8([0x2a])))return!0x0;if(_0x1a0a83[_0x2e25d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e25d8([0x43,0x4d,0x54])))return!0x0;if(_0x1a0a83[_0x2e25d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e25d8([0x52,0x43,0x4d,0x54]))){if(_0x4432db())return!0x0;if(_0x3d4772()||_0x33bb00())return!0x0;}return!0x1;}function _0x58a269(){const _0x35f964=_0x416abd[_0x2e25d8([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x35f964||0x0==_0x35f964[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x33351a}=new URL(window[_0x2e25d8([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x35f964[_0x2e25d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33351a))return!0x0;const _0x2d111d=_0x33351a[_0x2e25d8([0x73,0x70,0x6c,0x69,0x74])](_0x2e25d8([0x2e]));return _0x35f964[_0x2e25d8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3f5057=>_0x3f5057[_0x2e25d8([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e25d8([0x2a])))[_0x2e25d8([0x6d,0x61,0x70])](_0x12131a=>_0x12131a[_0x2e25d8([0x73,0x70,0x6c,0x69,0x74])](_0x2e25d8([0x2e])))[_0x2e25d8([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1c1c98=>_0x1c1c98[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2d111d[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2e25d8([0x6d,0x61,0x70])](_0x23eb13=>Array(_0x2d111d[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x23eb13[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2e25d8([0x66,0x69,0x6c,0x6c])](_0x23eb13[0x0]===_0x2e25d8([0x2a])?_0x2e25d8([0x2a]):'')[_0x2e25d8([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x23eb13))[_0x2e25d8([0x73,0x6f,0x6d,0x65])](_0x508bc4=>_0x2d111d[_0x2e25d8([0x65,0x76,0x65,0x72,0x79])]((_0x574222,_0x5c5b50)=>_0x508bc4[_0x5c5b50]===_0x574222||_0x508bc4[_0x5c5b50]===_0x2e25d8([0x2a])));}function _0x54b308(){return _0x1e7ab7&&_0x54715d?new window[(_0x2e25d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2974a3,_0x24a703)=>{_0x1e7ab7[_0x2e25d8([0x74,0x68,0x65,0x6e])](_0x2974a3,_0x24a703),_0x54715d[_0x2e25d8([0x74,0x68,0x65,0x6e])](_0x452387=>{_0x452387!=_0x2e25d8([0x56,0x61,0x6c,0x69,0x64])&&_0x2974a3(_0x452387);},_0x24a703);}):_0x1e7ab7||_0x54715d||_0x2e25d8([0x56,0x61,0x6c,0x69,0x64]);}}function _0x517ed3(_0x5220c4,_0x1b096b){return new window[(_0x2e25d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1dc313=>{if(_0x263634())return _0x1dc313(_0x2e25d8([0x56,0x61,0x6c,0x69,0x64]));_0x5673e9(),_0x48ec87[_0x2e25d8([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2e25d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x655f74=!0x1;const _0x12788b=_0xad4cb1();function _0x2c7818(_0xdb1956){return!!_0xdb1956&&(typeof _0xdb1956===_0x2e25d8([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xdb1956===_0x2e25d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xdb1956[_0x2e25d8([0x74,0x68,0x65,0x6e])]===_0x2e25d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xdb1956[_0x2e25d8([0x63,0x61,0x74,0x63,0x68])]===_0x2e25d8([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x374087(_0x397db3){_0x174b24(_0x397db3)[_0x2e25d8([0x74,0x68,0x65,0x6e])](_0x4d33e5=>{if(!_0x4d33e5||_0x4d33e5[_0x2e25d8([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2e25d8([0x6f,0x6b]))return _0x2e25d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x3b54ad(_0x4d2d46(_0x12788b+_0x1b096b))!=_0x4d33e5[_0x2e25d8([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2e25d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2e25d8([0x56,0x61,0x6c,0x69,0x64]);})[_0x2e25d8([0x74,0x68,0x65,0x6e])](_0x4a4a81=>(_0x4af69b(),_0x4a4a81),()=>{const _0x343606=_0x5d399f();return null==_0x343606?(_0x4af69b(),_0x2e25d8([0x56,0x61,0x6c,0x69,0x64])):_0x2e25d8(_0x86bcbb-_0x343606>(0x67a55a3d^_0x59271c)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2e25d8([0x74,0x68,0x65,0x6e])](_0x1dc313)[_0x2e25d8([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1dc313(_0x2e25d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x56711c=0x439f30bd^_0x59271c;function _0x4af69b(){const _0x46a14b=_0x2e25d8([0x6c,0x6c,0x63,0x74,0x2d])+_0x3b54ad(_0x4d2d46(_0x5220c4)),_0xe7862=_0xd5bfe3(_0x3b54ad(window[_0x2e25d8([0x4d,0x61,0x74,0x68])][_0x2e25d8([0x63,0x65,0x69,0x6c])](_0x86bcbb/_0x56711c)));window[_0x2e25d8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2e25d8([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x46a14b,_0xe7862);}function _0x5d399f(){const _0x53d8a8=_0x2e25d8([0x6c,0x6c,0x63,0x74,0x2d])+_0x3b54ad(_0x4d2d46(_0x5220c4)),_0x24e588=window[_0x2e25d8([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2e25d8([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x53d8a8);return _0x24e588?window[_0x2e25d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xd5bfe3(_0x24e588),0x10)*_0x56711c:null;}function _0x174b24(_0x5d42a8){return new window[(_0x2e25d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x290b7a,_0x4f3576)=>{_0x5d42a8[_0x2e25d8([0x74,0x68,0x65,0x6e])](_0x290b7a,_0x4f3576),window[_0x2e25d8([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4f3576,0x43a80afd^_0x59271c);});}}_0x48ec87[_0x2e25d8([0x6f,0x6e])](_0x2e25d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x15f4a5,_0x4865cd)=>{if(_0x4865cd[0x0]!=_0x5220c4)return _0x1dc313(_0x2e25d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4865cd[0x1]={..._0x4865cd[0x1],[_0x2e25d8([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x12788b};},{[_0x2e25d8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2e25d8([0x68,0x69,0x67,0x68])}),_0x48ec87[_0x2e25d8([0x6f,0x6e])](_0x2e25d8([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5d6e04=>{_0x2c7818(_0x5d6e04[_0x2e25d8([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x655f74=!0x0,_0x374087(_0x5d6e04[_0x2e25d8([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2e25d8([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2e25d8([0x6c,0x6f,0x77])}),_0x15cb21[_0x2e25d8([0x74,0x68,0x65,0x6e])](()=>{_0x655f74||_0x1dc313(_0x2e25d8([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x263634(){return _0x48ec87[_0x2e25d8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2e25d8([0x76,0x69,0x65,0x77])][_0x2e25d8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2e25d8([0x61,0x75,0x74,0x6f]);}function _0x5673e9(){_0x48ec87[_0x2e25d8([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2e25d8([0x76,0x69,0x65,0x77])][_0x2e25d8([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2e25d8([0x61,0x75,0x74,0x6f]);}}function _0x379571(_0x1c7523){const _0x11a2f6=[new window[(_0x2e25d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1380bc=>setTimeout(_0x1380bc,0x43a0e0f1^_0x59271c)),_0x15cb21[_0x2e25d8([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2e25d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x372311=>{let _0x5d5518=0x0;_0x48ec87[_0x2e25d8([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e25d8([0x6f,0x6e])](_0x2e25d8([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1cc01f,_0x4bbd81)=>{_0x4bbd81[0x0][_0x2e25d8([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5d5518++,_0x5d5518==(0x43a9dfc5^_0x59271c)&&(_0x372311(),_0x1cc01f[_0x2e25d8([0x6f,0x66,0x66])]());});}))];return window[_0x2e25d8([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2e25d8([0x72,0x61,0x63,0x65])](_0x11a2f6)[_0x2e25d8([0x74,0x68,0x65,0x6e])](()=>_0x1c7523);}async function _0x580410(){await _0x15cb21,_0x48ec87[_0x2e25d8([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e25d8([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16d23e,_0x48ec87[_0x2e25d8([0x6d,0x6f,0x64,0x65,0x6c])][_0x2e25d8([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16d23e,_0x48ec87[_0x2e25d8([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2e25d8([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x4432db(){return _0x664375(_0x2e25d8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3d3f49(_0x2e25d8([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2e25d8([0x73,0x74,0x61,0x74,0x65])]==_0x2e25d8([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3d4772(){return _0x664375(_0x2e25d8([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 _0x33bb00(){return _0x664375(_0x2e25d8([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1cbfa3(_0x1389c3){const _0x2a6af1=_0x3081ce();_0x48ec87[_0x2a6af1]=_0x2e25d8([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1389c3,_0x1389c3!=_0x2e25d8([0x56,0x61,0x6c,0x69,0x64])&&_0x580410();}function _0x3081ce(){const _0x54ce0c=window[_0x2e25d8([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2e25d8([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2e25d8([0x6e,0x6f,0x77])]())[_0x2e25d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2e25d8([0x2e]),'');let _0xf627b2=_0x2e25d8([0x66]);for(let _0x3b9d8f=0x0;_0x3b9d8f<_0x54ce0c[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3b9d8f+=0x2){let _0x4460d1=window[_0x2e25d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x54ce0c[_0x2e25d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b9d8f,_0x3b9d8f+0x2));_0x4460d1>=_0x38bd23[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4460d1-=_0x38bd23[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0xf627b2+=_0x38bd23[_0x4460d1];}return _0xf627b2;}function _0x4546d3(){const _0x476766=_0x1930eb[_0x2e25d8([0x73,0x70,0x6c,0x69,0x74])](_0x2e25d8([0x2e]));if(0x3!=_0x476766[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x132afd(_0x476766[0x1]);function _0x132afd(_0x59d846){const _0x121ceb=_0x325b6d(_0x59d846);return _0x121ceb&&_0x58786a()?_0x121ceb:null;function _0x58786a(){const _0x186722=_0x121ceb[_0x2e25d8([0x6a,0x74,0x69])],_0x37f216=window[_0x2e25d8([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x186722[_0x2e25d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x186722[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x265343={..._0x121ceb,[_0x2e25d8([0x6a,0x74,0x69])]:_0x186722[_0x2e25d8([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x186722[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x265343[_0x2e25d8([0x76,0x63])],_0x4d2d46(_0x265343)==_0x37f216;}}}async function _0x540aa7(){let _0x370f7f=!0x0;try{const _0x326648=_0x1930eb[_0x2e25d8([0x73,0x70,0x6c,0x69,0x74])](_0x2e25d8([0x2e])),[_0x6fa379,_0x36cf6d,_0x3346f6]=_0x326648;return _0x5c6c54(_0x6fa379),await _0x30ce7e(_0x6fa379,_0x36cf6d,_0x3346f6),_0x370f7f;}catch{return!0x1;}function _0x5c6c54(_0x499ecf){const _0x1802ac=_0x325b6d(_0x499ecf);_0x1802ac&&_0x1802ac[_0x2e25d8([0x61,0x6c,0x67])]==_0x2e25d8([0x45,0x53,0x32,0x35,0x36])||(_0x370f7f=!0x1);}async function _0x30ce7e(_0x4e2c39,_0xfd1615,_0xf082b){const _0x229ee9=window[_0x2e25d8([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2e25d8([0x66,0x72,0x6f,0x6d])](_0x59bfe3(_0xf082b),_0x354438=>_0x354438[_0x2e25d8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x419137=new window[(_0x2e25d8([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2e25d8([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x4e2c39+_0x2e25d8([0x2e])+_0xfd1615),_0x3cf013=window[_0x2e25d8([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2e25d8([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3cf013)return;const _0x414b74=await _0x3cf013[_0x2e25d8([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2e25d8([0x6a,0x77,0x6b]),_0x561eef,{[_0x2e25d8([0x6e,0x61,0x6d,0x65])]:_0x2e25d8([0x45,0x43,0x44,0x53,0x41]),[_0x2e25d8([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2e25d8([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2e25d8([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3cf013[_0x2e25d8([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2e25d8([0x6e,0x61,0x6d,0x65])]:_0x2e25d8([0x45,0x43,0x44,0x53,0x41]),[_0x2e25d8([0x68,0x61,0x73,0x68])]:{[_0x2e25d8([0x6e,0x61,0x6d,0x65])]:_0x2e25d8([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x414b74,_0x229ee9,_0x419137)||(_0x370f7f=!0x1);}}function _0x325b6d(_0x718a2e){return _0x718a2e[_0x2e25d8([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2e25d8([0x65,0x79]))?JSON[_0x2e25d8([0x70,0x61,0x72,0x73,0x65])](_0x59bfe3(_0x718a2e)):null;}function _0x59bfe3(_0x4a19a8){return window[_0x2e25d8([0x61,0x74,0x6f,0x62])](_0x4a19a8[_0x2e25d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2e25d8([0x2b]))[_0x2e25d8([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2e25d8([0x2f])));}function _0x4d2d46(_0xef94b3){let _0x2b9ec5=0x1505;function _0x5cef88(_0x5a1c53){for(let _0x105ab7=0x0;_0x105ab7<_0x5a1c53[_0x2e25d8([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x105ab7++){const _0x558f93=_0x5a1c53[_0x2e25d8([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x105ab7);_0x2b9ec5=(_0x2b9ec5<<0x5)+_0x2b9ec5+_0x558f93,_0x2b9ec5&=_0x2b9ec5;}}function _0x1270ff(_0x5addd2){Array[_0x2e25d8([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5addd2)?_0x5addd2[_0x2e25d8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1270ff):_0x5addd2&&typeof _0x5addd2==_0x2e25d8([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2e25d8([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5addd2)[_0x2e25d8([0x73,0x6f,0x72,0x74])]()[_0x2e25d8([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x22b9e0,_0x10960d])=>{_0x5cef88(_0x22b9e0),_0x1270ff(_0x10960d);}):_0x5cef88(window[_0x2e25d8([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5addd2));}return _0x1270ff(_0xef94b3),_0x2b9ec5>>>0x0;}function _0x3b54ad(_0x185d59){return _0x185d59[_0x2e25d8([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2e25d8([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2e25d8([0x30]));}function _0xd5bfe3(_0x4d4433){return _0x4d4433[_0x2e25d8([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2e25d8([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2e25d8([0x6a,0x6f,0x69,0x6e])]('');}function _0x664375(_0x2649d0){return _0x48ec87[_0x2e25d8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2e25d8([0x68,0x61,0x73])](_0x2649d0);}function _0x3d3f49(_0x3918ac){return _0x48ec87[_0x2e25d8([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2e25d8([0x67,0x65,0x74])](_0x3918ac);}function _0x16d23e(){}function _0x2e25d8(_0x5a0b3e){return _0x5a0b3e['map'](_0x47b607=>String['fromCharCode'](_0x47b607))['join']('');}_0x1cbfa3(await _0x4f9d31());}(this);}['destroy'](){const _0x563742=this['editor']['plugins']['get'](o),_0x562e6f=this['editor']['config']['get']('collaboration.channelId');for(const _0x8ce250 of _0x563742['getCommentThreads']({'channelId':_0x562e6f}))_0x563742['_detachCommentThread'](_0x8ce250['id']),_0x563742['_threads']['delete'](_0x8ce250['id']);super['destroy']();}['hasMarkerForId'](_0x206502){return this['getAllMarkersForId'](_0x206502)['length']>0x0;}['getAllMarkersForId'](_0x2e2c67){const _0xb537d5=[];for(const _0x329d1d of this['editor']['model']['markers'])_0x329d1d['name']['startsWith']('comment:'+_0x2e2c67)&&_0xb537d5['push'](_0x329d1d);return _0xb537d5;}['scrollToThreadMarker'](_0x367063){const _0x25a38e=this['_getTargetForId'](_0x367063);_0x25a38e&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x367063&&rt({'target':_0x25a38e[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0xd3ed3c){this['editor']['model']['change'](()=>{for(const _0x4e6799 of this['getAllMarkersForId'](_0xd3ed3c))this['editor']['editing']['reconvertMarker'](_0x4e6799);});}['_attachArchivedThread'](_0x4a2a79){const _0x4ece00=this['editor']['plugins']['get'](o),_0x24811b=this['editor']['plugins']['get'](P),_0x4ea22c=_0x4ece00['getCommentThread'](_0x4a2a79);if(!_0x4ea22c['isAttached']){const _0x4e1781=_0x4ea22c['attachTo'](()=>this['_getTargetForId'](_0x4ea22c['id']));_0x24811b['registerAnnotation'](_0x4e1781),_0x4ea22c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x471438=this['editor'],_0x25843c=_0x471438['plugins']['get'](st);_0x471438['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x526ae3,_0x28320a)=>{const {id:_0x2ec3ea}=er(_0x526ae3['markerName']),_0x16195c=_0x471438['plugins']['get'](o)['getCommentThread'](_0x2ec3ea),_0x177b46=this['activeMarker']&&er(this['activeMarker'])['id']===_0x2ec3ea;let _0x1600dc;if(_0x16195c&&_0x16195c['isResolved']&&!_0x177b46&&_0x526ae3['item'])return _0x28320a['consumable']['consume'](_0x526ae3['item'],'addMarker:'+_0x526ae3['markerName']),_0x28320a['consumable']['consume'](_0x526ae3['item'],'removeMarker:'+_0x526ae3['markerName']),null;const _0x4aac97=['ck-comment-marker'];return _0x177b46&&_0x4aac97['push']('ck-comment-marker--active'),_0x1600dc=_0x16195c?.['length']?_0x16195c['comments']['first']['author']['id']:_0x25843c['me']['id'],{'classes':_0x4aac97,'attributes':{'data-comment':_0x2ec3ea,'data-author-id':_0x1600dc}};}}),_0x471438['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3857bf,{options:_0x6cc428})=>{if(_0x6cc428['showCommentHighlights'])return null;const _0x4fbf2c=_0x471438['plugins']['get'](o),_0x2cbf3e=_0x471438['model']['markers']['get'](_0x3857bf),{id:_0x3c24d2,part:_0x557cf7}=er(_0x3857bf);return _0x2cbf3e&&!_0x2cbf3e['affectsData']||_0x6cc428['ignoreResolvedComments']&&_0x4fbf2c['getCommentThread'](_0x3c24d2)?.['isResolved']?null:{'group':'comment','name':_0x557cf7?_0x3c24d2+':'+_0x557cf7:_0x3c24d2};}}),_0x471438['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2fcac2,{writer:_0x3b729b})=>_0x3b729b['createElement']('$marker',{'data-name':'comment:'+_0x2fcac2['getAttribute']('id')})}),_0x471438['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3b4cb6=this['editor'],_0x19042c=_0x3b4cb6['plugins']['get'](o),_0x24bbdf=new Set(),_0x1322b5=new Set();_0x3b4cb6['model']['document']['registerPostFixer'](_0x1dab95=>{let _0x35bc5d=!0x1;for(const {name:_0x1e97f9,data:_0x584a4b}of _0x3b4cb6['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5f28fa,id:_0x48838f}=er(_0x1e97f9);let _0x156f27=_0x584a4b['newRange'];if('comment'!==_0x5f28fa||!_0x156f27)continue;const _0x30bec0='$graveyard'===_0x156f27['root']['rootName'];_0x30bec0||(_0x156f27=mt(_0x156f27,_0x3b4cb6['model']),!_0x156f27||_0x156f27['isCollapsed']||!_0x584a4b['newRange']||_0x156f27['isEqual'](_0x584a4b['newRange']))?_0x3b4cb6['model']['hasContent'](_0x156f27)&&!_0x30bec0?this['isThreadsLoadingPaused']?_0x24bbdf['add'](_0x1e97f9):this['_handleThreadMarker'](_0x1e97f9,_0x48838f):(_0x1322b5['add'](_0x1e97f9),_0x24bbdf['delete'](_0x1e97f9),_0x1dab95['removeMarker'](_0x1e97f9),_0x35bc5d=!0x0):(_0x1dab95['updateMarker'](_0x1e97f9,{'range':_0x156f27}),_0x35bc5d=!0x0);}return _0x35bc5d;}),this['on']('change:isThreadsLoadingPaused',(_0x511076,_0x5520b3,_0x465097)=>{if(!_0x465097&&_0x24bbdf['size'])for(const _0x19dfd2 of _0x24bbdf){const {id:_0x1435e2}=er(_0x19dfd2);_0x24bbdf['delete'](_0x19dfd2),_0x3b4cb6['model']['markers']['get'](_0x19dfd2)&&this['_handleThreadMarker'](_0x19dfd2,_0x1435e2);}}),this['listenTo'](_0x3b4cb6['model']['document'],'change',()=>{for(const {name:_0x2a57f9,data:{newRange:_0x5632d4}}of _0x3b4cb6['model']['document']['differ']['getChangedMarkers']()){const {group:_0x29441b,id:_0x20b611}=er(_0x2a57f9);if('comment'!==_0x29441b)continue;const _0x5a5019=_0x19042c['getCommentThread'](_0x20b611),_0x2b9235=this['hasMarkerForId'](_0x20b611);_0x5a5019&&(!_0x5a5019['_hasTargetInContent']&&_0x5632d4&&_0x3b4cb6['editing']['view']['once']('render',()=>{const _0x5b7d32=_0x3b4cb6['plugins']['get'](O),_0xfa9b53=_0x19042c['_threadToController']['get'](_0x5a5019)['view'];_0x5b7d32['getByInnerView'](_0xfa9b53)['refreshVisibility']();},{'priority':'low'}),_0x5a5019['_hasTargetInContent']=_0x2b9235||!!_0x5632d4),_0x5632d4||(_0x1322b5['add'](_0x2a57f9),_0x24bbdf['delete'](_0x2a57f9));}for(const _0x618ebc of _0x1322b5){const {id:_0x467a1e}=er(_0x618ebc),_0x3540b3=_0x19042c['getCommentThread'](_0x467a1e);if(_0x24bbdf['delete'](_0x618ebc),!_0x3540b3)continue;const _0x7793f=this['hasMarkerForId'](_0x467a1e);_0x7793f||_0x3540b3['isSubmitted']?_0x7793f||_0x3540b3['unlinkedAt']||_0x3540b3['setUnlinkedAt'](new Date()):_0x3540b3['remove']();}_0x1322b5['clear']();});}['_handleInitialThreads'](_0x29890a){_0x29890a['forEach'](_0x33bc1c=>{_0x33bc1c['unlinkedAt']&&this['_attachArchivedThread'](_0x33bc1c['id']);});}['_getTargetForId'](_0x130f61){const _0x298fea=this['editor'],_0x49bf7f=this['getAllMarkersForId'](_0x130f61);return et(_0x298fea['editing'],_0x49bf7f);}['_getTextContext'](_0x162d37){const _0x2b50f2=this['getAllMarkersForId'](_0x162d37);let _0x312027='',_0x1633a0=!0x1;for(const _0x38c262 of _0x2b50f2){const _0x45e6c9=_0x38c262['getRange']();for(const _0x5ea8f2 of Array['from'](_0x45e6c9['getItems']()))_0x5ea8f2['is']('$textProxy')?(_0x312027&&_0x1633a0&&(_0x312027+='\x20',_0x1633a0=!0x1),_0x312027+=_0x5ea8f2['data']):_0x1633a0=!0x0;_0x1633a0=!0x0;}return _0x312027['substring'](0x0,0x96);}['_attachMarkerToThread'](_0xfde189,_0x60dbd9){const _0x5ae3f5=this['editor'],_0x29b572=_0x5ae3f5['plugins']['get'](o);let _0x174a02=_0x29b572['getCommentThread'](_0x60dbd9);const _0x5508c8=_0x5ae3f5['config']['get']('collaboration.channelId'),_0x46ec98=_0x5ae3f5['plugins']['get'](P);if(_0x174a02&&(_0x174a02['unlinkedAt']&&_0x174a02['setUnlinkedAt'](null),_0x174a02['isAttached']))return _0x174a02;return!this['getAllMarkersForId'](_0x60dbd9)[0x0]['managedUsingOperations']?_0x5ae3f5['editing']['view']['once']('render',()=>{if(_0x29b572['getCommentThread'](_0x60dbd9))return;const _0xd6ec41=_0x5ae3f5['plugins']['get'](O);_0x174a02=_0x29b572['openNewCommentThread']({'channelId':_0x5508c8,'threadId':_0x60dbd9,'target':()=>this['_getTargetForId'](_0x60dbd9),'context':{'type':'text','value':this['_getTextContext'](_0x60dbd9)}});const _0x3dc670=_0x29b572['_threadToController']['get'](_0x174a02)['view'],_0x40e3b1=_0xd6ec41['getByInnerView'](_0x3dc670);_0x40e3b1&&_0x46ec98['registerAnnotation'](_0x40e3b1);},{'priority':'low'}):_0x29b572['fetchCommentThread']({'channelId':_0x5508c8,'threadId':_0x60dbd9})['then'](_0x5a6b31=>{if('destroyed'!==_0x5ae3f5['state']){if(_0x174a02=_0x5a6b31,_0x174a02&&!_0x174a02['isAttached']){const _0x5627e0=_0x174a02['attachTo'](()=>this['_getTargetForId'](_0x60dbd9));_0x46ec98['registerAnnotation'](_0x5627e0),_0x174a02['isResolved']&&this['_reconvertMarkers'](_0x60dbd9);}else{if(!_0x174a02){const _0x5b5225=this['getAllMarkersForId'](_0x60dbd9);_0x5ae3f5['model']['change'](_0x1d06ff=>{for(const _0x5519e9 of _0x5b5225)_0x1d06ff['removeMarker'](_0x5519e9);});}}}}),_0x174a02;}['_handleThreadMarker'](_0x1d6b9b,_0x1fee8f){const _0x23b32e=this['_attachMarkerToThread'](_0x1d6b9b,_0x1fee8f);_0x23b32e&&!_0x23b32e['context']&&_0x23b32e['setContext']({'type':'text','value':this['_getTextContext'](_0x1fee8f)});}['_initAriaMarkerChangeAnnouncements'](){const _0xdd097a=this['editor'];ot(_0xdd097a['model'],({left:_0x222c6b,entered:_0x58ccc4})=>{for(const _0x42d5b4 of _0x222c6b)if(ht(_0x42d5b4)){_0xdd097a['ui']['ariaLiveAnnouncer']['announce'](E(_0xdd097a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x453536 of _0x58ccc4)if(ht(_0x453536)){_0xdd097a['ui']['ariaLiveAnnouncer']['announce'](E(_0xdd097a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x8b439e)));break;}});}}function dt(_0x2dcdef,_0x41cda1){return _0x41cda1?_0x2dcdef+':'+_0x41cda1:_0x2dcdef;}function er(_0x50aee8){const _0x1feb96=_0x50aee8['split'](':');return{'group':_0x1feb96[0x0],'id':_0x1feb96[0x1],'part':_0x1feb96[0x2]};}function mt(_0x53626e,_0x1aaf7c){const _0x2c40fb=_0x1aaf7c['schema'],_0x1054b2=_0x1aaf7c['createRange'](_0x53626e['start']);for(const _0x4240e6 of _0x53626e['getWalker']()){const {type:_0x341635,item:_0x35e218,nextPosition:_0x5c82ed}=_0x4240e6;if('text'===_0x341635||_0x2c40fb['isObject'](_0x35e218)){const _0x4affa3=_0x1aaf7c['createPositionBefore'](_0x35e218);_0x1054b2['isCollapsed']&&(_0x1054b2['start']=_0x4affa3),_0x1054b2['end']=_0x5c82ed;}}return _0x1054b2;}function ht(_0x2d987c){return'comment'===er(_0x2d987c['name'])['group'];}class i extends _0x454998{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x500b90=this['editor'],_0xe307a1=_0x500b90['plugins']['get'](o),_0x4d907d=_0x500b90['plugins']['get'](r),_0x56d8ab=_0x500b90['plugins']['get'](O),_0xa371e7=_0x500b90['plugins']['get'](P);_0x500b90['ui']['componentFactory']['add']('comment',()=>{const _0x285ad7=this['_createUIButton'](_0x367ece);return _0x285ad7['tooltip']=!0x0,_0x285ad7;}),_0x500b90['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x37c988)),_0xa371e7['addSourceCollector'](()=>{const _0x1a4269=[];for(const [_0x418b6e,_0x5753d2]of _0xe307a1['_threadToController']){const _0x24ed15=_0x4d907d['getAllMarkersForId'](_0x418b6e['id']),_0x33863b=_0x24ed15['map'](_0xe49f2d=>_0xe49f2d['getRange']());_0x24ed15['length']>0x0&&_0x1a4269['push']([_0x5753d2['view'],_0x33863b]);}return _0x1a4269;}),this['listenTo'](_0x56d8ab,'change:activeAnnotations',(_0x7d6427,_0x4dabfb,_0x57ba2a)=>{const _0x549bac=Array['from'](_0x57ba2a)['map'](_0x539d64=>_0x539d64['innerView'])['find'](_0x2230e7=>_0xe307a1['_viewToController']['has'](_0x2230e7));if(!_0x549bac)return void(_0x4d907d['activeMarker']=null);const _0x350165=_0xe307a1['_viewToController']['get'](_0x549bac)['model']['id'],_0x25a572='comment:'+_0x350165;_0x350165&&_0x4d907d['hasMarkerForId'](_0x350165)?_0x4d907d['activeMarker']=_0x25a572:_0x4d907d['activeMarker']&&(_0x4d907d['activeMarker']=null);}),this['listenTo'](_0xe307a1,'removeCommentThread',(_0x1181c2,{threadId:_0x325b99,isFromAdapter:_0x158d74})=>{!_0x158d74&&_0x500b90['ui']['focusTracker']['isFocused']&&_0x4d907d['hasMarkerForId'](_0x325b99)&&_0x500b90['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xe307a1,'addComment',(_0x16062d,{threadId:_0x5e7d40,isFromAdapter:_0x59d8c6})=>{if(_0x59d8c6||!_0x4d907d['hasMarkerForId'](_0x5e7d40)||!_0xe307a1['hasCommentThread'](_0x5e7d40))return;0x1===_0xe307a1['getCommentThread'](_0x5e7d40)['length']&&(_0x500b90['editing']['view']['focus'](),_0x16062d['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x46116b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3aecd7;for(const _0x2003da in _0x46116b){const _0x422fad=_0x2003da,_0x3e843a=_0x46116b[_0x422fad];if('commentsLicenseKeyValid'==_0x3e843a||'commentsLicenseKeyInvalid'==_0x3e843a||'commentsLicenseKeyExpired'==_0x3e843a||'commentsLicenseKeyDomainLimit'==_0x3e843a||'commentsLicenseKeyNotAllowed'==_0x3e843a||'commentsLicenseKeyEvaluationLimit'==_0x3e843a||'commentsLicenseKeyTrialLimit'==_0x3e843a||'commentsLicenseKeyUsageLimit'==_0x3e843a){delete _0x46116b[_0x422fad],_0x3aecd7=_0x3e843a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3aecd7&&_0x46116b['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3aecd7&&_0x46116b['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3aecd7&&_0x46116b['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3aecd7&&_0x46116b['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3aecd7&&_0x46116b['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x3aecd7&&_0x46116b['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x3aecd7&&_0x46116b['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x5c0cf1){const _0x44f45a=this['editor'],_0x5c63fd=new _0x5c0cf1(_0x44f45a['locale']),_0x188274=_0x44f45a['commands']['get']('addCommentThread');return _0x5c63fd['set']({'label':E(_0x44f45a['locale'],'Comment'),'icon':_0x4ad487}),_0x5c63fd['bind']('isEnabled')['to'](_0x188274),this['listenTo'](_0x5c63fd,'execute',()=>{_0x188274['execute']();}),_0x5c63fd;}}class s extends _0x454998{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5ed0ac){super(_0x5ed0ac),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1a44a1,_0x23a7e8,_0x3304f5)=>{_0x3304f5?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5063db,_0x1546f7]of this['editor']['commands'])_0x1546f7['affectsData']&&'addCommentThread'!==_0x5063db&&_0x1546f7['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x5d1c14=this['editor']['editing']['view']['document'];this['listenTo'](_0x5d1c14,'cut',_0x54d17b=>_0x54d17b['stop'](),{'priority':'highest'}),this['listenTo'](_0x5d1c14,'clipboardInput',_0x58d00d=>_0x58d00d['stop'](),{'priority':'highest'}),this['listenTo'](_0x5d1c14,'delete',_0x300b3e=>_0x300b3e['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0xbd13b2,_0x25adb6]of this['editor']['commands'])_0x25adb6['affectsData']&&'addCommentThread'!==_0xbd13b2&&_0x25adb6['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 M extends _0x18f184{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3fbe45){super(_0x3fbe45),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x39bb00=this['context']['plugins']['get'](O);this['listenTo'](_0x39bb00,'_activateAnnotation',(_0x33d16f,_0xaa1d24)=>{for(const _0x3a2110 of this['activeUIs']){const _0x107380=this['_uis']['get'](_0x3a2110);(0x0,this['uisData']['get'](_0x3a2110)['filter'])(_0xaa1d24)&&_0x107380['setActiveAnnotation'](_0xaa1d24);}}),this['listenTo'](_0x39bb00,'_deactivateAllAnnotations',()=>{for(const _0x2dbac6 of this['activeUIs']){this['_uis']['get'](_0x2dbac6)['setActiveAnnotation'](null);}}),this['listenTo'](_0x39bb00['_visibleAnnotations'],'add',(_0x3773b7,_0xf3ccce)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xf3ccce);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x548b26){return this['activeUIs']['has'](_0x548b26);}['activate'](_0x88d65d,_0x72e3c0=this['defaultFilter']){const _0x1c127c=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x88d65d))throw new _0x3b855d('annotationsuis-missing-ui',this,{'uiName':_0x88d65d});this['isActive'](_0x88d65d)&&this['deactivate'](_0x88d65d),this['activeUIs']['add'](_0x88d65d);const _0x45b62e=new _();!function({source:_0x28afd9,target:_0x4f9121,filter:_0x5b90e8}){for(const _0x57d3b4 of _0x28afd9)_0x5b90e8(_0x57d3b4)&&_0x4f9121['add'](_0x57d3b4);_0x4f9121['listenTo'](_0x28afd9,'add',(_0x3bd403,_0x36bf78)=>{_0x5b90e8(_0x36bf78)&&_0x4f9121['add'](_0x36bf78);}),_0x4f9121['listenTo'](_0x28afd9,'remove',(_0x27572e,_0x544b09)=>{_0x4f9121['has'](_0x544b09)&&_0x4f9121['remove'](_0x544b09);});}({'source':_0x1c127c['_visibleAnnotations'],'target':_0x45b62e,'filter':_0x72e3c0}),this['uisData']['set'](_0x88d65d,{'collection':_0x45b62e,'filter':_0x72e3c0});const _0x2eb65c=this['_uis']['get'](_0x88d65d);_0x2eb65c['attach'](_0x45b62e),this['listenTo'](_0x2eb65c,'change:activeAnnotation',(_0x2c42f4,_0x43e0c1,_0x1f0148,_0x10241a)=>{_0x10241a&&_0x1c127c['_removeActiveAnnotation'](_0x10241a),_0x1f0148&&_0x1c127c['_addActiveAnnotation'](_0x1f0148);});}['deactivate'](_0xbf397){if(this['activeUIs']['delete'](_0xbf397),!this['_uis']['has'](_0xbf397))throw new _0x3b855d('annotationsuis-missing-ui',this,{'uiName':_0xbf397});const _0x4e18ea=this['_uis']['get'](_0xbf397);_0x4e18ea['detach'](),this['stopListening'](_0x4e18ea),this['uisData']['get'](_0xbf397)['collection']['destroy'](),this['uisData']['delete'](_0xbf397);}['switchTo'](_0x3e88a8){if(!this['_uis']['has'](_0x3e88a8))throw new _0x3b855d('annotationsuis-missing-ui',this,{'uiName':_0x3e88a8});const _0xf40931=this['context']['plugins']['get'](O),_0x365de0=Array['from'](_0xf40931['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3e88a8);const _0x47ebf5=this['_uis']['get'](_0x3e88a8);_0x47ebf5['setActiveAnnotation'](_0x365de0),_0x47ebf5['_setSelectedAnnotations']&&_0x365de0&&_0x47ebf5['_setSelectedAnnotations']([_0x365de0]);}['deactivateAll'](){for(const _0x40663d of this['activeUIs'])this['deactivate'](_0x40663d);}['register'](_0x48e47d,_0x4ca7c9){if(this['_uis']['has'](_0x48e47d))throw new _0x3b855d('annotationsuis-register-already-registered');if('function'!=typeof _0x4ca7c9['attach']||'function'!=typeof _0x4ca7c9['detach']||'function'!=typeof _0x4ca7c9['setActiveAnnotation'])throw new _0x3b855d('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x48e47d,_0x4ca7c9);}['refilterAnnotations'](){const _0x144ded=this['context']['plugins']['get'](O)['collection'],_0x1c6870=new Map(),_0x184034=Array['from'](this['activeUIs']);for(const _0x46a115 of this['activeUIs']){const _0x320a3e=this['uisData']['get'](_0x46a115)['collection'];for(const _0x3d4c7c of _0x320a3e)_0x1c6870['set'](_0x3d4c7c,_0x46a115);}for(const _0x2d2797 of _0x144ded){const _0x262950=_0x1c6870['get'](_0x2d2797);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2d2797);const _0xa3e16b=_0x184034['find'](_0x21cdef=>this['uisData']['get'](_0x21cdef)['filter'](_0x2d2797));_0x262950!==_0xa3e16b&&(_0x262950&&this['uisData']['get'](_0x262950)['collection']['remove'](_0x2d2797),_0xa3e16b&&this['uisData']['get'](_0xa3e16b)['collection']['add'](_0x2d2797));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x33ea9d){const _0x5dc8f1=[];for(const _0x581b99 of this['activeUIs']){(0x0,this['uisData']['get'](_0x581b99)['filter'])(_0x33ea9d)&&_0x5dc8f1['push'](_0x581b99);}if(_0x5dc8f1['length']>0x1)throw new _0x3b855d('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5dc8f1,'annotationType':_0x33ea9d['type']});}}const pi=xt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x50480e){super(_0x50480e);const _0x4582cc=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 _0x23af45(),this['focusCycler']=new _0x13d99f({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4582cc['to']('class')],'style':{'minHeight':_0x4582cc['to']('minHeight',_0x6cbd7c=>'number'==typeof _0x6cbd7c?pi(_0x6cbd7c+0xa):null)},'dir':_0x50480e['uiLanguageDirection'],'role':'application','aria-label':E(_0x50480e,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x50480e,'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',_0x42ff32=>{this['_updateItemPositionInFocusables'](_0x42ff32['source']);}),this['list']['forEach'](_0x35de4b=>{this['focusTracker']['add'](_0x35de4b['element']),this['_updateItemPositionInFocusables'](_0x35de4b);}),this['list']['on']('change',(_0x51b555,_0x23c272)=>{for(const _0xf0e488 of _0x23c272['removed'])this['focusTracker']['remove'](_0xf0e488['element']),this['focusables']['remove'](_0xf0e488);for(const _0x58fe41 of _0x23c272['added'])this['focusTracker']['add'](_0x58fe41['element']),this['_updateItemPositionInFocusables'](_0x58fe41);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x144c95){const _0x5efef6=this['focusables']['getIndex'](_0x144c95);let _0x1321b4,_0x238bb9;for(const _0x3e81d9 of this['focusables'])if(_0x144c95['top']<_0x3e81d9['top']){_0x1321b4=_0x3e81d9;break;}if(_0x238bb9=_0x1321b4?this['focusables']['getIndex'](_0x1321b4):this['focusables']['length'],-0x1!==_0x5efef6){if(_0x5efef6===_0x238bb9-0x1)return;this['focusables']['remove'](_0x144c95),_0x238bb9=_0x1321b4?this['focusables']['getIndex'](_0x1321b4):this['focusables']['length'];}this['focusables']['add'](_0x144c95,_0x238bb9);}}const Ht=xt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x29fcd1){super(_0x29fcd1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x15f18f,_0x33f960)=>_0x15f18f+_0x33f960),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x14740d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x14740d['to']('isAnimationDisabled',_0x433ecc=>_0x433ecc?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x14740d['to']('top',_0x1154eb=>Ht(_0x1154eb))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1db5fa=this['element']['clientHeight'];_0x1db5fa&&(this['height']=_0x1db5fa);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x18f184{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x777a9a){super(_0x777a9a),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 _0xbeb3c7=this['context']['config']['get']('sidebar.container');_0xbeb3c7&&this['setContainer'](_0xbeb3c7);}['setContainer'](_0x3c46c5){if(!y(_0x3c46c5))throw new _0x3b855d('sidebar-setcontainer-invalid-element');this['container']=_0x3c46c5;}['_attachToContainer']({viewClass:_0x411fc9='',spaceBetweenItems:_0x275ea1=0x19}={}){if(!y(this['container']))throw new _0x3b855d('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x411fc9,this['_spaceBetweenItems']=_0x275ea1;}['rearrange']({removedAnnotation:_0x57c596,previousAnnotation:_0x411fce,nextAnnotation:_0xd3312b}){const _0x2ef5af=this['getSidebarItemView'](_0x57c596);this['view']['list']['remove'](_0x2ef5af),this['_destroySidebarItemView'](_0x57c596),_0x411fce&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x411fce)),_0xd3312b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xd3312b)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1bd20d,activatedAnnotation:_0x4aeb58,disableAnimationOnActivatedAnnotation:_0x307d72}){if(this['_activeAnnotation']=_0x4aeb58,_0x1bd20d){_0x1bd20d['isActive']=!0x1;const _0x2c6682=this['getSidebarItemView'](_0x1bd20d);_0x2c6682&&_0x307d72&&(_0x2c6682['isAnimationDisabled']=!0x1);}if(_0x4aeb58){const _0x35e3db=this['getSidebarItemView'](_0x4aeb58);_0x35e3db&&(_0x4aeb58['isActive']=!0x0,_0x307d72&&(_0x35e3db['isAnimationDisabled']=!0x0,_0x35e3db['top']+=0x1),this['_alignToTargetRect'](_0x35e3db));}}['_detachFromContainer'](_0xc35621){if(this['view']['element']['remove'](),_0xc35621){for(const _0x621ba8 of _0xc35621)this['_destroySidebarItemView'](_0x621ba8);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x3c01b8,_0x4e2099){_0x4e2099||(_0x4e2099=_0x3c01b8['view']);const _0x139620=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x139620,_0x3c01b8),this['_annotationToSidebarItemView']['set'](_0x3c01b8,_0x139620),_0x139620['content']['add'](_0x4e2099),this['listenTo'](_0x3c01b8['view'],'change:targetRect',(_0x507813,_0x43d893,_0x15ae77)=>{const _0x124623=this['_getTargetTop'](_0x3c01b8,_0x15ae77);_0x139620['_targetTop']!=_0x124623&&(_0x139620['_targetTop']=_0x124623,this['_setItemTop'](_0x139620,_0x124623));}),this['listenTo'](_0x139620,'change:top',()=>{this['_recalculate'](_0x139620,'top');}),this['listenTo'](_0x139620,'change:bottom',()=>{this['_recalculate'](_0x139620,'bottom');}),this['_alignToTargetRect'](_0x139620);const _0x33f636=this['_getItemBefore'](_0x139620);if(_0x33f636)this['_alignAfterItem'](_0x33f636,_0x139620)||this['_alignToTargetRect'](_0x139620);else this['_alignToTargetRect'](_0x139620);return this['_updateLastItem'](),this['view']['list']['add'](_0x139620),_0x139620;}['_alignForTopChange'](_0xbfb710){if(!_0xbfb710['content']['length'])return;const _0x524922=this['_getItemBefore'](_0xbfb710);if(!_0x524922)return;const _0x22c805=this['_sidebarItemViewToAnnotation']['get'](_0x524922),_0x561bf1=this['_activeAnnotation'];_0x561bf1&&_0x561bf1===_0x22c805?this['_alignAfterItem'](_0x524922,_0xbfb710):this['_alignBeforeItem'](_0xbfb710,_0x524922);}['_alignForBottomChange'](_0x32cbe9){if(!_0x32cbe9['content']['length'])return;const _0xb98eae=this['_getItemAfter'](_0x32cbe9);if(!_0xb98eae)return;const _0x5db298=this['_sidebarItemViewToAnnotation']['get'](_0xb98eae),_0x4d226d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x50084e=this['_activeAnnotation'];_0x50084e&&_0x50084e===_0x5db298&&_0x4d226d?(this['_alignBeforeItem'](_0xb98eae,_0x32cbe9),this['_alignAfterItem'](_0x32cbe9,_0xb98eae)):_0x50084e&&_0x50084e===_0x5db298?this['_alignBeforeItem'](_0xb98eae,_0x32cbe9):this['_alignAfterItem'](_0x32cbe9,_0xb98eae);}['_recalculate'](_0x510ef8,_0x461780){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x38651e,changedProp:_0x31ae08}of this['_recalculateBuffer'])'top'===_0x31ae08?this['_alignForTopChange'](_0x38651e):this['_alignForBottomChange'](_0x38651e);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x510ef8,'changedProp':_0x461780});}['getSidebarItemView'](_0x284602){return this['_annotationToSidebarItemView']['get'](_0x284602);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xd00451){const _0x160433=this['getSidebarItemView'](_0xd00451);this['stopListening'](_0x160433),this['stopListening'](_0xd00451['view']),_0x160433['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xd00451),this['_sidebarItemViewToAnnotation']['delete'](_0x160433);}['_createSidebarView'](){const _0x3b926e=new H(this['context']['locale']);return _0x3b926e['render'](),this['on']('change:_lastItem',(_0x5cd06e,_0x254696,_0x5da4c3,_0x42ac52)=>{_0x42ac52&&_0x3b926e['unbind']('minHeight'),_0x5da4c3?_0x3b926e['bind']('minHeight')['to'](_0x5da4c3,'bottom'):_0x3b926e['minHeight']=null;}),_0x3b926e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x361c4d){const _0x196212=this['_sidebarItemViewToAnnotation']['get'](_0x361c4d),_0x361bb4=_0x196212&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x196212)-0x1);return _0x361bb4&&this['getSidebarItemView'](_0x361bb4)||null;}['_getItemAfter'](_0xd7d27){const _0x5a57c7=this['_sidebarItemViewToAnnotation']['get'](_0xd7d27),_0x3ffc02=_0x5a57c7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5a57c7)+0x1);return _0x3ffc02&&this['getSidebarItemView'](_0x3ffc02)||null;}['_alignBeforeItem'](_0x88822,_0x114173){_0x88822['updateHeight']();const _0xe046a5=G(_0x114173['bottom']+this['_spaceBetweenItems'],_0x88822['top']);return!!_0xe046a5&&(this['_setItemTop'](_0x114173,_0x114173['top']-_0xe046a5),!0x0);}['_alignAfterItem'](_0x5ea9bf,_0x29af0b){_0x5ea9bf['updateHeight']();const _0x4b9bd0=G(_0x5ea9bf['bottom']+this['_spaceBetweenItems'],_0x29af0b['top']);return!!_0x4b9bd0&&(this['_setItemTop'](_0x29af0b,_0x29af0b['top']+_0x4b9bd0,!0x1),!0x0);}['_alignToTargetRect'](_0x5ed7a7){const _0x151b38=this['_sidebarItemViewToAnnotation']['get'](_0x5ed7a7);if(!_0x151b38||!_0x151b38['target']||!_0x151b38['targetRect'])return;const _0x1a2862=this['_getTargetTop'](_0x151b38,_0x151b38['targetRect']);this['_setItemTop'](_0x5ed7a7,_0x1a2862);}['_getTargetTop'](_0x673787,_0xe33a3e){if(null===_0xe33a3e)return 0x0;if(_0x673787['target']instanceof _0x272831)return _0xe33a3e['top'];{const _0x46f019=new _0x272831(this['view']['element'])['top'];return _0xe33a3e['top']-_0x46f019;}}['_setItemTop'](_0x30b94b,_0x11148c,_0x4ad39b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4ad39b&&(_0x11148c=Math['max'](_0x11148c,this['_getMaxAvailableTop'](_0x30b94b))),_0x30b94b['top']=_0x11148c;}['_getMaxAvailableTop'](_0x32fdec){let _0x2edb43=this['_getItemBefore'](_0x32fdec),_0x13ea8f=0x0;for(;_0x2edb43;)_0x2edb43['updateHeight'](),_0x13ea8f+=this['_spaceBetweenItems']+_0x2edb43['height'],_0x2edb43=this['_getItemBefore'](_0x2edb43);return _0x13ea8f;}}function G(_0x2a03f2,_0x4d0ccf){return Math['max'](_0x2a03f2-_0x4d0ccf,0x0);}function y(_0x4b2e57){return null!==_0x4b2e57&&'object'==typeof _0x4b2e57&&0x1===_0x4b2e57['nodeType'];}class e extends _0x18f184{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5df512){super(_0x5df512),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x104685(),this['_refreshPositioningDebounced']=_0x250c1b(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x39c675=this['context']['plugins']['get'](M),_0x528f7d=this['context']['plugins']['get'](z);_0x39c675['register']('wideSidebar',this),_0x528f7d['container']&&_0x39c675['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x24d4c8){if(_0x24d4c8===this['activeAnnotation'])return;const _0x3f31ff=this['context']['plugins']['get'](z);_0x3f31ff['_activeAnnotation']=_0x24d4c8;const _0x27dde4=this['activeAnnotation'];_0x3f31ff['refresh']({'blurredAnnotation':_0x27dde4,'activatedAnnotation':_0x24d4c8}),this['activeAnnotation']=_0x24d4c8;}['attach'](_0xc1c532){this['annotations']=_0xc1c532;const _0x24161d=this['context']['plugins']['get'](z);if(_0x24161d['_annotations']=_0xc1c532,this['isAttached'])throw new _0x3b855d('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x24161d,'set:container',()=>{this['detach'](),this['listenTo'](_0x24161d,'change:container',_0x3dd32f=>{_0x3dd32f['off'](),this['attach'](_0xc1c532);});}),_0x24161d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1fec42=_0x190557=>{_0x190557['updateTargetRect'](),_0x24161d['addAnnotation'](_0x190557);};for(const _0x4cfa98 of _0xc1c532)_0x1fec42(_0x4cfa98);this['listenTo'](_0xc1c532,'add',(_0x21327c,_0x1f1c6f)=>{_0x1fec42(_0x1f1c6f);}),this['listenTo'](_0xc1c532,'remove',(_0x35f9f1,_0x581d5b,_0x48559c)=>{_0x24161d['rearrange']({'removedAnnotation':_0x581d5b,'previousAnnotation':_0xc1c532['get'](_0x48559c-0x1),'nextAnnotation':_0xc1c532['get'](_0x48559c+0x1)}),_0x581d5b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xc1c532,'focus',(_0x4db745,_0x1c9606)=>{this['setActiveAnnotation'](_0x1c9606);}),this['listenTo'](_0xc1c532,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4c6c6b=this['context']instanceof _0x300bcf?this['context']['editors']:new _0x104685([this['context']]);for(const _0x51e327 of _0x4c6c6b)this['_integrateWithEditorAnnotations'](_0x51e327);this['listenTo'](_0x4c6c6b,'add',(_0x15c32a,_0x5c3825)=>{this['listenTo'](_0x5c3825,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5c3825);});}),this['listenTo'](_0x4c6c6b,'remove',(_0x551eaf,_0x114488)=>{_0x114488['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x114488['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3b855d('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4f7f95=this['context']['plugins']['get'](z);_0x4f7f95['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4f7f95),this['stopListening'](this['annotations']),this['context']instanceof _0x300bcf&&this['stopListening'](this['context']['editors']);for(const _0x40b366 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x40b366);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x372b91){if(!_0x372b91['plugins']['has']('EditorAnnotations'))return;const _0x35a13e=_0x372b91['plugins']['get']('EditorAnnotations'),_0x54d9e9=()=>{const _0x116a80=_0x35a13e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x116a80[0x0]||null);};this['listenTo'](_0x35a13e,'refresh',_0x54d9e9),this['listenTo'](_0x35a13e,'blur',(_0x1dd00f,{isAnnotationTracked:_0x15c813})=>{this['activeAnnotation']&&_0x15c813(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x35a13e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x3da9fc=>{_0x35a13e['hasDomSelection']()&&(_0x54d9e9(),_0x3da9fc['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x35a13e);}['_destroyEditorAnnotationsIntegration'](_0x510084){this['stopListening'](_0x510084),this['_editorAnnotations']['remove'](_0x510084);}}class C extends _0x367ece{['counterView'];constructor(_0x182115){super(_0x182115);const _0x65d2fa=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x35e56f,_0x350668)=>_0x35e56f?'...':_0x350668['toString']()),this['set']('annotationType',''),this['icon']=_0x4ad487,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x65d2fa['to']('annotationType',_0x2f5fc0=>'ck-annotation-counter__badge--'+_0x2f5fc0),_0x65d2fa['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x65d2fa['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x18f184{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4135d8){super(_0x4135d8),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x1cb629),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x104685(),this['_refreshPositioningDebounced']=_0x250c1b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4f9103(this['context']['locale']),this['balloonPanelView']=new _0x5eba4e(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1d91c7){this['annotations']=_0x1d91c7;const _0x1900ab=this['context']['plugins']['get'](z),_0x45edc4=this['balloonPanelView'];if(_0x1900ab['_annotations']=_0x1d91c7,this['isAttached'])throw new _0x3b855d('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1900ab,'set:container',()=>{this['detach'](),this['listenTo'](_0x1900ab,'change:container',_0x32d2d8=>{_0x32d2d8['off'](),this['attach'](_0x1d91c7);});}),_0x1900ab['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3be871=_0x56ad34=>{const _0x56cb01=new C(this['context']['locale']);_0x1900ab['addAnnotation'](_0x56ad34,_0x56cb01),this['_annotationToNarrowView']['set'](_0x56ad34,_0x56cb01),_0x56cb01['bind']('isDirty','annotationType','number')['to'](_0x56ad34['view'],'isDirty','type','length'),_0x56cb01['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x45edc4['content']['first']!==_0x56ad34['view']?(this['_showBalloon'](_0x56ad34),_0x56ad34['view']['element']['focus'](),this['setActiveAnnotation'](_0x56ad34)):this['setActiveAnnotation'](null);});};for(const _0x2a0fb9 of _0x1d91c7)_0x3be871(_0x2a0fb9);this['listenTo'](_0x1d91c7,'add',(_0x3f5a3c,_0x54a1d8)=>{_0x3be871(_0x54a1d8);}),this['listenTo'](_0x1d91c7,'remove',(_0x3f4eef,_0xd5210a,_0x2b437d)=>{this['_annotationToNarrowView']['get'](_0xd5210a)['destroy'](),this['_annotationToNarrowView']['delete'](_0xd5210a),_0x1900ab['rearrange']({'removedAnnotation':_0xd5210a,'previousAnnotation':_0x1d91c7['get'](_0x2b437d-0x1),'nextAnnotation':_0x1d91c7['get'](_0x2b437d+0x1)}),_0xd5210a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1d91c7,'focus',(_0x5b4d2d,_0x5b68cc)=>{this['setActiveAnnotation'](_0x5b68cc);}),this['listenTo'](_0x1d91c7,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xe5ce78,_0x27bdeb)=>{_0x27bdeb['keyCode']===_0x4e1d06['esc']&&_0x45edc4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x45edc4['content']['first']),this['_hideBalloon'](),_0x27bdeb['stopPropagation'](),_0x27bdeb['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x32d777,_0x10bb87)=>{const _0x2b305c=_0x10bb87['target'];_0x45edc4['isVisible']&&_0x45edc4['element']['contains'](_0x2b305c)||_0x1900ab['view']['element']['contains'](_0x2b305c)||_0x32d777['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x41be15=>_0x41be15['contains'](_0x2b305c))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x23603f=this['context']instanceof _0x300bcf?this['context']['editors']:new _0x104685([this['context']]);for(const _0x504d27 of _0x23603f)this['_integrateWithEditorAnnotations'](_0x504d27);this['listenTo'](_0x23603f,'add',(_0x5755bd,_0x442d80)=>{this['listenTo'](_0x442d80,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x442d80);});}),this['listenTo'](_0x23603f,'remove',(_0x483a9f,_0x2227f2)=>{_0x2227f2['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2227f2['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x1695f0){if(_0x1695f0===this['activeAnnotation'])return;const _0x110bfc=this['context']['plugins']['get'](z);if(_0x110bfc['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x1695f0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x1695f0)_0x110bfc['getSidebarItemView'](_0x1695f0)?this['_showBalloon'](_0x1695f0):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x1695f0;}['detach'](){if(!this['isAttached'])throw new _0x3b855d('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5d3a3a=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x11d57e=>_0x11d57e['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5d3a3a['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x300bcf&&this['stopListening'](this['context']['editors']);for(const _0x396b0d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x396b0d);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'](_0x3bc8ab){if(!_0x3bc8ab['plugins']['has']('EditorAnnotations'))return;const _0x5ae04e=_0x3bc8ab['plugins']['get']('EditorAnnotations'),_0x4cdb82=this['context']['plugins']['get'](z),_0x1683e2=this['annotations'],_0x553066=this['balloonPanelView'],_0x4e0b1d=()=>{const _0x56d157=_0x5ae04e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x56d157),this['setActiveAnnotation'](_0x56d157[0x0]||null);};this['listenTo'](_0x5ae04e,'refresh',_0x4e0b1d),this['listenTo'](_0x5ae04e,'blur',(_0x16761f,{isAnnotationTracked:_0xa25e3c})=>{this['activeAnnotation']&&_0xa25e3c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x5ae04e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1683e2,'blur',_0x1f7a69=>{_0x5ae04e['hasDomSelection']()&&_0x1f7a69['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xdda906,_0x347c8b)=>{const _0x5133fe=_0x347c8b['target'];_0x553066['isVisible']&&_0x553066['element']['contains'](_0x5133fe)||_0x4cdb82['view']['element']['contains'](_0x5133fe)||this['activeAnnotation']&&_0x5ae04e['hasDomSelection']()&&(_0x4e0b1d(),_0xdda906['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5ae04e);}['_destroyEditorAnnotationsIntegration'](_0x5e1f91){_0x5e1f91&&(this['stopListening'](_0x5e1f91),this['_editorAnnotations']['remove'](_0x5e1f91));}['_setSelectedAnnotations'](_0x33c578){for(const _0x44d372 of this['_selectedAnnotations'])_0x33c578['includes'](_0x44d372)||this['_manuallyClosedAnnotationViews']['delete'](_0x44d372['view']);this['_selectedAnnotations']=_0x33c578;}['_refreshPositioning'](){const _0x4682ae=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x4682ae['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1a0206){if(this['_manuallyClosedAnnotationViews']['has'](_0x1a0206['view']))return;const _0x54b458=this['balloonPanelView']['content']['first'];_0x54b458!==_0x1a0206['view']?(_0x54b458&&this['_detachListeners'](_0x54b458),this['_attachListeners'](_0x1a0206['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1a0206['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x378913=this['balloonPanelView']['content']['first'],_0x14d4ef=_0x378913&&this['annotations']['getByView'](_0x378913);if(!_0x14d4ef||!this['_annotationToNarrowView']['has'](_0x14d4ef))return;const _0xe0bf3a=this['_annotationToNarrowView']['get'](_0x14d4ef)['element'],_0x341ff4=(function(){const _0xcfc36a=_0x5eba4e['defaultPositions'];return[_0xcfc36a['southArrowNorthEast'],_0xcfc36a['northArrowSouthEast'],_0xcfc36a['southArrowNorth'],_0xcfc36a['northArrowSouth'],_0xcfc36a['southArrowNorthWest'],_0xcfc36a['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xe0bf3a,'positions':_0x341ff4});}['_hideBalloon'](){const _0xec68af=this['balloonPanelView'],_0x1ad347=_0xec68af['content']['first'];_0x1ad347&&(this['_detachListeners'](_0x1ad347),_0xec68af['unpin'](),_0xec68af['content']['clear']());}['_attachListeners'](_0x4a35ed){this['listenTo'](_0x4a35ed,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4a35ed,'Esc',(_0x424393,_0x2e11d3)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4a35ed),this['_hideBalloon'](),_0x2e11d3();});}['_detachListeners'](_0x4fea06){this['stopListening'](_0x4fea06);}}class c extends _0x454998{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x109ba7,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x208831){super(_0x208831),_0x208831['editing']['view']['addObserver'](_0x2a0f49),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x208831['plugins']['get'](_0x109ba7),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x523f18=this['editor']['plugins']['get'](M);_0x523f18['context']===this['editor']&&(_0x523f18['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4dcd8e,_0x448f70)=>{const _0xdcce32=this['_balloon'];if(this['isAttached']&&_0xdcce32['visibleView']){const _0x5786b7=this['annotations']['getByView'](_0xdcce32['visibleView']);_0x5786b7&&this['_closeAnnotation'](_0x5786b7),_0x448f70();}}));}['afterInit'](){const _0x14706b=this['editor']['plugins']['get'](M);_0x14706b['context']===this['editor']&&(_0x14706b['hasActive']()||_0x14706b['switchTo']('inline'));}['setActiveAnnotation'](_0x1aa392){_0x1aa392!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1aa392&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1aa392)&&this['_addAnnotationToBalloon'](_0x1aa392,!0x0),_0x1aa392['isActive']=!0x0),_0x1aa392||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1aa392);}['attach'](_0xda74f4){this['annotations']=_0xda74f4;const _0x583bdf=this['editor']['plugins']['get'](M),_0x5623e3=this['_balloon'];if(this['isAttached'])throw new _0x3b855d('inlineannotations-attach-already-attached',this);if(_0x583bdf['context']!==this['editor'])throw new _0x3b855d('inlineannotations-not-allowed-with-context',this);const _0x57fb8b=this['editor']['plugins']['get'](P);this['listenTo'](_0x57fb8b,'refresh',()=>{const _0xf36645=_0x57fb8b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4e36eb,_0x19c33f;!this['_forceRefresh']&&(_0x4e36eb=_0xf36645,_0x19c33f=this['_selectedAnnotations'],_0x4e36eb['length']===_0x19c33f['length']&&_0x4e36eb['every'](_0x32e7a6=>_0x19c33f['includes'](_0x32e7a6)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xf36645),this['setActiveAnnotation'](_0xf36645[0x0]||null));}),this['listenTo'](_0x57fb8b,'blur',(_0x27d0d9,{isAnnotationTracked:_0x361b1a})=>{this['activeAnnotation']&&_0x361b1a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4e8c5e,_0x311ef2,_0x214c52)=>{_0x214c52||this['setActiveAnnotation'](null);}),this['listenTo'](_0xda74f4,'remove',(_0x4800de,_0x5173f0)=>{this['_removeAnnotationFromBalloon'](_0x5173f0),_0x5173f0===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5623e3,'change:visibleView',(_0x32425,_0x436bc2,_0x750ab3,_0x32bd03)=>{_0x32bd03&&this['stopListening'](_0x32bd03);const _0x4f617e=_0xda74f4['getByView'](_0x750ab3);_0x750ab3&&_0x4f617e&&(this['listenTo'](_0x750ab3,'change:height',()=>{_0x5623e3['updatePosition']();}),this['listenTo'](_0x750ab3,'Esc',()=>{this['_closeAnnotation'](_0x4f617e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4f617e&&this['setActiveAnnotation'](_0x4f617e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5623e3['visibleView']&&(_0xda74f4['getByView'](_0x5623e3['visibleView'])&&_0x5623e3['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 _0x3b855d('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x2c567b of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x2c567b);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x242891){for(const _0x4e3c30 of this['_selectedAnnotations'])_0x242891['includes'](_0x4e3c30)||this['_manuallyClosed']['delete'](_0x4e3c30);for(const _0x398905 of this['annotations'])_0x242891['includes'](_0x398905)||this['_removeAnnotationFromBalloon'](_0x398905);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5e1d7c of _0x242891)this['_addAnnotationToBalloon'](_0x5e1d7c);}this['_selectedAnnotations']=_0x242891;}['_addAnnotationToBalloon'](_0x45e384,_0x2e665a=!0x1){this['_manuallyClosed']['has'](_0x45e384)||(this['_addedAnnotations']['has'](_0x45e384)||this['_balloon']['hasView'](_0x45e384['view'])||(this['_addedAnnotations']['add'](_0x45e384),this['_balloon']['add']({'stackId':_0x45e384['view']['id'],'view':_0x45e384['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x45e384)}})),_0x2e665a&&this['_balloon']['showStack'](_0x45e384['view']['id']));}['_getBalloonTargetForAnnotation'](_0x55f428){const _0x2d5bdf=_0x55f428['target'],_0x103912=this['editor']['editing']['view'],_0x1c9e31=_0x103912['document']['selection']['getFirstRange'](),_0x34225b=_0x103912['domConverter']['viewRangeToDom'](_0x1c9e31);if(_0x34225b['collapse'](!0x0),_0x2d5bdf){if(_0x2d5bdf instanceof _0x272831)return _0x2d5bdf;let _0x52df5e=[];for(const _0x2bdada of _0x2d5bdf)_0x52df5e['push'](...B(_0x2bdada['getClientRects']()));_0x52df5e=function(_0x3f7528){const _0x3cb04c=[];let _0x2d23f7=_0x3f7528[0x0];for(let _0x544e91=0x1;_0x544e91<_0x3f7528['length'];_0x544e91++)F(_0x2d23f7,_0x3f7528[_0x544e91])?_0x2d23f7['width']+=_0x3f7528[_0x544e91]['width']:(_0x3cb04c['push'](_0x2d23f7),_0x2d23f7=_0x3f7528[_0x544e91]);return _0x3cb04c['push'](_0x2d23f7),_0x3cb04c;}(_0x52df5e);const _0xcebee9=_0x34225b['getBoundingClientRect']();return _0x52df5e['find'](_0x587d0b=>_0x587d0b['top']<=_0xcebee9['top']&&_0x587d0b['bottom']>=_0xcebee9['bottom']&&_0x587d0b['left']<=_0xcebee9['left']&&_0x587d0b['right']>=_0xcebee9['right'])||_0x52df5e[0x0];}return _0x55f428['targetRect']||_0x34225b;}['_removeAnnotationFromBalloon'](_0x4c394a){this['_addedAnnotations']['has'](_0x4c394a)&&this['_balloon']['hasView'](_0x4c394a['view'])&&(this['_addedAnnotations']['delete'](_0x4c394a),this['_balloon']['remove'](_0x4c394a['view']));}['_closeAnnotation'](_0xfe4705){this['_manuallyClosed']['add'](_0xfe4705),this['_removeAnnotationFromBalloon'](_0xfe4705);}}function B(_0x366bef){return Array['from'](_0x366bef)['map'](DOMRect['fromRect']);}function F(_0x2fcabb,_0xa72395){return _0x2fcabb['top']===_0xa72395['top']&&_0x2fcabb['bottom']===_0xa72395['bottom']&&_0x2fcabb['right']===_0xa72395['left'];}class it extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x8d4fc1,_0x2402c7){super(_0x8d4fc1),this['set']('isEmpty',!_0x2402c7['length']),this['focusTracker']=new _0x23af45(),this['_annotationViews']=_0x2402c7,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x13d99f({'focusables':_0x2402c7,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2402c7,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2402c7,'remove',(_0x32cdc9,_0x256b11)=>{_0x256b11['isActive']&&this['focus'](),_0x2402c7['length']||(this['isEmpty']=!0x0);});const _0x11953c=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x8d4fc1,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2402c7},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x11953c['if']('isEmpty','ck-hidden',_0x5ddc74=>!_0x5ddc74)]},'children':[{'text':E(_0x8d4fc1,'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 _0xd3f9f5 of this['_annotationViews'])this['focusTracker']['add'](_0xd3f9f5['element']);this['_annotationViews']['on']('change',(_0x510e01,{added:_0x299550,removed:_0x4f3337})=>{for(const _0x1a8afa of _0x299550)this['focusTracker']['add'](_0x1a8afa['element']);for(const _0x4dce7e of _0x4f3337)this['focusTracker']['remove'](_0x4dce7e['element']);});}}class f extends _0x18f184{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0xa0cf82){super(_0xa0cf82),this['archivedThreads']=new _0x104685();}['init'](){const _0x31032e=this['context'],_0x16934f=_0x31032e['plugins']['get'](o),_0x570f74=_0x31032e['plugins']['get'](O);this['listenTo'](_0x16934f,'addCommentThread',(_0x5a6c9f,{threadId:_0x34baad})=>{const _0x3504b6=_0x16934f['getCommentThread'](_0x34baad);_0x3504b6['archivedAt']&&this['archivedThreads']['add'](_0x3504b6,this['_calculatePosition'](_0x3504b6['archivedAt'])),this['listenTo'](_0x3504b6,'change:archivedAt',(_0xfa0754,_0x301a49,_0x2c9336)=>{_0x2c9336?this['archivedThreads']['has'](_0x3504b6)||this['archivedThreads']['add'](_0x3504b6,this['_calculatePosition'](_0x3504b6['archivedAt'])):this['archivedThreads']['has'](_0x3504b6)&&this['archivedThreads']['remove'](_0x3504b6);});}),this['listenTo'](_0x16934f,'removeCommentThread',(_0x14c379,{threadId:_0x252853})=>{const _0x4aa41f=_0x16934f['getCommentThread'](_0x252853);this['stopListening'](_0x4aa41f),this['archivedThreads']['has'](_0x4aa41f)&&this['archivedThreads']['remove'](_0x4aa41f);},{'priority':'highest'}),this['listenTo'](_0x570f74['collection'],'focus',(_0x3d5510,_0x51b508)=>{_0x51b508['isVisible']||(_0x51b508['isActive']=!0x0,_0x570f74['activate'](_0x51b508));});}['_calculatePosition'](_0x301876){const _0x48ff90=[...this['archivedThreads']]['findIndex'](_0x20650b=>_0x20650b['archivedAt']<_0x301876);return _0x48ff90>-0x1?_0x48ff90:this['archivedThreads']['length'];}}class a extends _0x454998{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x3afdf9];}constructor(_0x42f296){super(_0x42f296),this['annotationViews']=new _0x245df5(),this['_pendingThreads']=[];}['init'](){const _0x5c38d6=this['editor'],_0x2df15b=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x5c38d6['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x367ece,!0x0)),_0x5c38d6['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x4b9faa=this['_createCommentsArchiveButton'](_0x37c988);return _0x4b9faa['set']({'role':'menuitemcheckbox'}),_0x4b9faa;});const _0x4b41ef=_0x5c38d6['plugins']['get'](f),_0x17fcb8=_0x5c38d6['plugins']['get']('Annotations'),_0x521b80=_0x5c38d6['plugins']['get']('CommentsRepository');_0x4b41ef['archivedThreads']['forEach'](_0x49eeb0=>{this['_handleNewThread'](_0x49eeb0);}),this['listenTo'](_0x4b41ef['archivedThreads'],'add',(_0x37de12,_0x24c22d)=>{this['_handleNewThread'](_0x24c22d);}),this['listenTo'](_0x17fcb8['collection'],'add',(_0xaf51d1,_0x277ffe)=>{const _0x547564=this['_pendingThreads']['find'](_0x2ae67c=>{const _0x3b376c=_0x521b80['_threadToController']['get'](_0x2ae67c);return _0x3b376c&&_0x277ffe['innerView']===_0x3b376c['view'];});if(_0x547564){const _0x344c11=this['_calculatePosition'](_0x547564['archivedAt']);this['annotationViews']['add'](_0x277ffe['view'],_0x344c11),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x547564),0x1);}}),this['listenTo'](_0x4b41ef['archivedThreads'],'remove',(_0x194f7d,_0x23c95e)=>{const _0x158e56=_0x5c38d6['config']['get']('collaboration.channelId');if(!_0x158e56||_0x23c95e['channelId']===_0x158e56){if(this['_pendingThreads']['includes'](_0x23c95e))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x23c95e),0x1);else{const _0xb99e0e=_0x521b80['_threadToController']['get'](_0x23c95e),_0x731148=_0x17fcb8['getByInnerView'](_0xb99e0e['view']);this['annotationViews']['remove'](_0x731148['view']),this['stopListening'](_0x731148['focusableElements']);}}}),this['listenTo'](_0x17fcb8['collection'],'add',(_0x20361c,_0x222a49)=>{this['listenTo'](_0x222a49,'escape',_0x2df15b);}),this['listenTo'](_0x17fcb8['collection'],'remove',(_0x56c1ad,_0x876417)=>{this['stopListening'](_0x876417,'escape',_0x2df15b);});}['_handleNewThread'](_0x1ce2d7){const _0x5b09bb=this['editor']['plugins']['get']('CommentsRepository'),_0x498246=this['editor']['plugins']['get']('Annotations'),_0x4f7d23=this['editor']['config']['get']('collaboration.channelId');if(!_0x4f7d23||_0x1ce2d7['channelId']===_0x4f7d23){const _0x27b8c2=_0x5b09bb['_threadToController']['get'](_0x1ce2d7);if(!_0x27b8c2)return void this['_pendingThreads']['push'](_0x1ce2d7);const _0x216ead=this['_calculatePosition'](_0x1ce2d7['archivedAt']),_0x445490=_0x498246['getByInnerView'](_0x27b8c2['view']);_0x445490['isVisible']&&_0x498246['_visibleAnnotations']['remove'](_0x445490),this['annotationViews']['add'](_0x445490['view'],_0x216ead);}}['_calculatePosition'](_0x300e84){const _0x4b575e=this['editor']['config']['get']('collaboration.channelId'),_0x4b1ed2=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x5e9aab=>_0x5e9aab['channelId']===_0x4b575e)['findIndex'](_0x416d29=>_0x416d29['archivedAt']<_0x300e84);return _0x4b1ed2<0x0||_0x4b1ed2>this['annotationViews']['length']?this['annotationViews']['length']:_0x4b1ed2-0x1;}['_toggleDialog'](){const _0x4dca63=this['editor'],_0x80c2a7=_0x4dca63['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new it(_0x4dca63['locale'],this['annotationViews'])),'commentsArchive'===_0x80c2a7['id']?_0x80c2a7['hide']():_0x80c2a7['show']({'id':'commentsArchive','title':E(_0x4dca63['locale'],'COMMENTS_ARCHIVE'),'icon':_0x17b757,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':tt['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x8d00c7,_0x570e97=!0x1){const _0x406e66=this['editor']['locale'],_0x5275ae=this['editor']['plugins']['get']('Dialog'),_0x254d05=new _0x8d00c7(_0x406e66);return _0x254d05['bind']('isEnabled')['to'](this,'isEnabled'),_0x254d05['bind']('isOn')['to'](_0x5275ae,'id',_0x45129b=>'commentsArchive'===_0x45129b),_0x254d05['set']({'label':E(_0x406e66,'COMMENTS_ARCHIVE'),'icon':_0x17b757,'isToggleable':!0x0}),_0x570e97&&(_0x254d05['tooltip']=!0x0),this['listenTo'](_0x254d05,'execute',()=>this['_toggleDialog']()),_0x254d05;}['_hideDialogOnAnnotationEscape']=_0x19776d=>{const _0x47a352=_0x19776d['source'];if(!this['annotationViews']['has'](_0x47a352['view']))return;const _0x4930b3=this['editor']['plugins']['get']('Dialog');_0x4930b3['isOpen']&&'commentsArchive'===_0x4930b3['id']&&(_0x4930b3['hide'](),_0x19776d['stop']());};}class p extends _0x454998{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,is as BaseCommentThreadView,rs as BaseCommentView,fi as Comment,ui as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|