@ckeditor/ckeditor5-comments 46.1.1-alpha.0 → 46.1.1-alpha.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 +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/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 +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- 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/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x11297e={}){function _0xaf6f62(_0x4bd540){return _0x4bd540['map'](_0x539a99=>String['fromCharCode'](_0x539a99))['join']('');}(_0x11297e=Object['assign']({},_0x11297e))['plugins']||(_0x11297e['plugins']=Rt['defaultPlugins']),super(_0x11297e),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xaf6f62([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xaf6f62([0x76,0x69,0x65,0x77])][_0xaf6f62([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xaf6f62([0x61,0x75,0x74,0x6f]),this[_0xaf6f62([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xaf6f62([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xaf6f62([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xaf6f62([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xaf6f62([0x6f,0x6b])});}['create'](){const _0x3550f2=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x3550f2))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x1cf43b=>{const _0x39b660=this['model']['document']['getRoot'](),_0x38aad8=_0x39b660&&_0x39b660['getChild'](_0x39b660['childCount']-0x1);_0x1cf43b['setSelection'](_0x38aad8,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3ac3b0=this['editing']['view'],_0x336991=_0x3ac3b0['document']['getRoot'](),_0x22094a=_0x336991['getChild'](0x0);_0x336991['childCount']>0x1||!_0x22094a||'p'!=_0x22094a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x3ac3b0,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x22094a['placeholder']=this['placeholder']),St({'view':_0x3ac3b0,'element':_0x22094a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x22094a);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x33b103,_0x2e9d8d={}){super(_0x33b103),this['editor']=null,this['_editorConfig']=_0x2e9d8d,this['set']('value',_0x2e9d8d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x33b103,'Reply...')),this['set']('submitLabel',N(_0x33b103,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1b2c22(),this['focusCycler']=new _0x37d3b8({'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',(_0x1ce145,_0x19be43)=>{this['cancelButtonView']['fire']('execute'),_0x19be43();}),this['keystrokes']['set']('Ctrl+Enter',(_0x240a09,_0x21962a)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x21962a());}),this['on']('submit',(_0x413dad,_0x555c08)=>{_0x555c08['length']>0xfde8?(alert(N(_0x33b103,'TOO_LONG_COMMENT_ALERT',[_0x555c08['length'],0xfde8])),_0x413dad['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 _0x1cbc8d=this['editor'];this['element']['insertBefore'](_0x1cbc8d['ui']['element'],this['element']['firstChild']),_0x1cbc8d['model']['document']['on']('change',()=>this['value']=_0x1cbc8d['getData']()),_0x1cbc8d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x1cbc8d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4bcb92){-0x1===_0x4bcb92?(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:_0x46463e}=this,_0x568d71=new _0x2a8d4c(_0x46463e);return _0x568d71['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x568d71['withText']=!0x0,_0x568d71['bind']('label')['to'](this,'submitLabel'),_0x568d71['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x568d71['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x134b5f,_0x5f167a)=>!_0x5f167a&&!!_0x134b5f['trim']()),_0x568d71;}['_createCancelButton'](){const {locale:_0x51b5af}=this,_0xa56d8d=new _0x2a8d4c(_0x51b5af);return _0xa56d8d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xa56d8d['label']=N(_0x51b5af,'Cancel'),_0xa56d8d['withText']=!0x0,_0xa56d8d['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xa56d8d;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3182f5=>{this['focusTracker']['add'](_0x3182f5['element']);}),this['focusables']['on']('change',(_0x1a5079,_0x327e6a)=>{for(const _0x108b2d of Array['from'](_0x327e6a['added'])['reverse']())this['focusTracker']['add'](_0x108b2d['element']);});}}class ie extends kt{constructor(_0x5683fe,_0x3bedf6,_0x9d810a){super(_0x5683fe),this['commentInputView']=new os(_0x5683fe,_0x9d810a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1d0307,_0x4f9d94)=>_0x1d0307||!!_0x4f9d94),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 _0xcad54(_0x5683fe,_0x3bedf6),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'](_0x2a389b){this['commentInputView']['focus'](_0x2a389b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x23d9d7,_0x302067)=>{const {submitButtonView:_0x2191f5,cancelButtonView:_0x32e103,editor:_0x5d38a2}=this['commentInputView'];[_0x2191f5['element'],_0x32e103['element'],_0x5d38a2?_0x5d38a2['editing']['view']['getDomRoot']():null]['filter'](_0x55880a=>_0x55880a)['some'](_0xf90da1=>_0xf90da1['contains'](_0x302067['target']))||(this['focus'](),_0x302067['preventDefault']());});}}class rs extends kt{constructor(_0x2575ce){super(_0x2575ce);const _0x4701f5=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4701f5['to']('count',_0x140f44=>N(_0x2575ce,'NUMBER_OF_COMMENTS',_0x140f44))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x57edd3,_0x209647,_0x5af550){super(_0x57edd3);const _0x535913=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x209647['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x209647,this['_config']=_0x5af550,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1b2c22(),this['keystrokes']=new jt(),this['focusCycler']=new _0x37d3b8({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x24fc39=>this['commentViews']['map'](_0x3c502c=>_0x3c502c['element'])['includes'](_0x24fc39['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x57edd3),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x209616=>_0x209616-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2de6f7 of _0x209647['comments'])this['_handleNewCommentModel'](_0x2de6f7);this['_handleInfoComment'](),this['listenTo'](_0x209647['comments'],'add',(_0x1bcc96,_0xf5d3cd)=>{const _0x1992de=this['_calculatePosition'](_0xf5d3cd);this['length']++,this['_handleNewCommentModel'](_0xf5d3cd,_0x1992de),this['refreshVisibleViews']();}),this['listenTo'](_0x209647['comments'],'remove',(_0xbccf32,_0x373d7b)=>{this['length']--,this['_handleRemoveCommentModel'](_0x373d7b),this['refreshVisibleViews']();}),this['listenTo'](_0x209647,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x209647,'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',_0x535913['if']('length','ck-hidden',_0x394752=>!_0x394752)],'aria-label':N(_0x57edd3,'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'](_0x2d5704){-0x1===_0x2d5704?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x428887 of this['commentViews'])_0x428887['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x24b8b6,_0xcfbd68){const _0x216945=new this['_config']['CommentView'](this['locale'],_0x24b8b6,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x216945['viewUid']=_0x24b8b6['id'],_0x216945['delegate']('removeComment')['to'](this),_0x216945['delegate']('updateComment')['to'](this),_0x216945['delegate']('resolveCommentThread')['to'](this),_0x216945['delegate']('editorReady')['to'](this),_0x216945['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x216945,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x216945,_0xcfbd68);}['_calculatePosition'](_0x37cbf8){const _0x11d182=this['_model']['_findOptimalIndex'](_0x37cbf8);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x37cbf8['authoredAt']?_0x11d182-0x1:_0x11d182:_0x11d182-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x14a749={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x14a749,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x14a749));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x100db9){const _0x1d1f00=this['commentViews']['remove'](_0x100db9['id']);this['stopListening'](_0x1d1f00),_0x1d1f00['isEditMode']&&this['_updateHasDirtyComment'](),_0x1d1f00['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x20c17e=>_0x20c17e['isEditMode']);}['_rearrangeCollapse'](){const _0x333d70=function(_0x10fc68){const _0xba612d=new _0x6d21a2();for(const _0x2dde03 of _0x10fc68)_0xba612d['add'](_0x2dde03);return _0xba612d;}(this['commentViews']),_0x2bbbaf=this['_collapsedCommentsView']['count'];for(let _0x2e35df=0x1;_0x2e35df<=_0x2bbbaf;_0x2e35df++)_0x333d70['remove'](0x1);for(const _0x41fd13 of _0x333d70)_0x41fd13['collapse']();_0x2bbbaf>0x0&&_0x333d70['add'](this['_collapsedCommentsView'],0x1),ns(_0x391eb1(Array['from'](this['visibleViews']),Array['from'](_0x333d70)),this['visibleViews'],_0x333d70);}['_rearrangeExpand'](){ns(_0x391eb1(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x299435 of this['visibleViews'])_0x299435['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x54d0b0=>{this['focusTracker']['add'](_0x54d0b0['element']),this['keystrokes']['listenTo'](_0x54d0b0['element']);}),this['commentViews']['on']('change',(_0x50305f,_0x32f8b2)=>{for(const _0x15ad5a of _0x32f8b2['removed'])this['focusTracker']['remove'](_0x15ad5a['element']),this['keystrokes']['stopListening'](_0x15ad5a['element']);for(const _0x3f509a of Array['from'](_0x32f8b2['added'])['reverse']())this['focusTracker']['add'](_0x3f509a['element']),this['keystrokes']['listenTo'](_0x3f509a['element']);});}}function ns(_0x21d0f0,_0x22e157,_0x18a534){let _0x3972d3=0x0;for(const _0x51b653 of _0x21d0f0)switch(_0x51b653){case'insert':_0x22e157['add'](_0x18a534['get'](_0x3972d3),_0x3972d3),_0x3972d3++;break;case'delete':_0x22e157['remove'](_0x3972d3);break;case'equal':_0x3972d3++;}}class oe extends kt{constructor(_0x1b5092){super(_0x1b5092);const _0x4d61ba=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4d61ba['to']('contextValue',_0xf7d2fa=>N(_0x1b5092,'THREAD_CONTEXT_LABEL',_0xf7d2fa)),'tabindex':-0x1},'children':[{'text':_0x4d61ba['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x131a00,_0x4ed55e){super(_0x131a00);const _0x33eb95=this['bindTemplate'];this['_model']=_0x4ed55e,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1b2c22(),this['keystrokes']=new jt(),this['focusCycler']=new _0x37d3b8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x39e776=>!!_0x39e776),this['bind']('contextValue')['to'](this['_model'],'context',_0xfeb561=>_0xfeb561&&_0xfeb561['value']?this['_trimContextValue'](_0xfeb561['value']):N(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',_0x33eb95['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 _0x43b0f4=new _0x2a8d4c(this['locale']);return _0x43b0f4['label']=N(this['locale'],'Reopen'),_0x43b0f4['tooltip']=N(this['locale'],'Reopen'),_0x43b0f4['icon']=_0x32991c,_0x43b0f4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x490d60=>!_0x490d60),_0x43b0f4['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x231507,_0x32ca90)=>_0x231507&&_0x32ca90),_0x43b0f4['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x43b0f4;}['_trimContextValue'](_0x451234){if(_0x451234['length']<0x96)return _0x451234;const _0x3fdaef=_0x451234['lastIndexOf']('\x20',0x93);return _0x451234['substring'](0x0,_0x3fdaef>-0x1?_0x3fdaef:0x93)+'...';}['_attachContextActions'](){const _0x2d57af=this['element']['querySelector']('.ck-context'),_0x2f46b7=_0x2d57af['querySelector']('.ck-context__value');this['listenTo'](_0x2d57af,'mouseenter',()=>{_0x2f46b7['offsetWidth']<_0x2f46b7['scrollWidth']&&_0x2d57af['classList']['add']('overlay');}),this['listenTo'](_0x2d57af,'mouseleave',()=>{_0x2d57af['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x242c90 of this['focusables'])this['focusTracker']['add'](_0x242c90['element']),this['keystrokes']['listenTo'](_0x242c90['element']);}['_createContextView'](){const _0x1928d0=new oe(this['locale']);return _0x1928d0['bind']('contextValue')['to'](this),_0x1928d0;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x52a3cc,_0x15bd32,_0x5d18f5,_0x4a9ac1){super(_0x52a3cc),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x15bd32,this['_localUser']=_0x5d18f5,this['_config']=_0x4a9ac1,this['commentThreadHeaderView']=new Yt(_0x52a3cc,_0x15bd32),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x52a3cc,N(_0x52a3cc,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x52a3cc,_0x15bd32,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4a9ac1)),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',(_0x36011d,_0xe69c40)=>_0x36011d||!!_0xe69c40),this['bind']('isUnlinked')['to'](_0x15bd32,'unlinkedAt',_0x4264b6=>!!_0x4264b6),this['bind']('ariaLabel')['to'](this,'length',_0x3a7475=>{const _0x30a7d0=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x3a7475,_0x30a7d0]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1b2c22(),this['keystrokes']=new jt(),this['focusCycler']=new _0x37d3b8({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd0bc80=>_0xd0bc80['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 _0x5c78c9=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0xbd45dc=_0x5c78c9['commentInputView'];return _0x5c78c9['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0xbd45dc,'value',(_0x1adaca,_0x1c4499,_0xfb642a,_0x203085,_0x114327)=>!!_0x114327||!!_0x203085&&_0xfb642a&&!_0x1c4499||_0x1adaca&&_0xfb642a&&!_0x1c4499),_0xbd45dc['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1a7d5a,_0x573338,_0x648690)=>{let _0x1dabd7;return _0x1dabd7=_0x648690&&_0x573338?'Reply\x20to\x20reopen\x20discussion...':_0x1a7d5a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x1dabd7);}),_0xbd45dc['bind']('submitLabel')['to'](this,'length',_0x4b0a7a=>N(this['locale'],_0x4b0a7a?'Reply':'Comment')),_0xbd45dc['on']('submit',(_0x3a4e9e,_0x37e755)=>{this['fire']('addComment',_0x37e755),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0xbd45dc['on']('cancel',()=>{this['focus']();}),_0xbd45dc['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0xbd45dc['on']('cancel',_0x43f569=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x43f569['stop']());}),this['on']('change:isActive',(_0x35c7fa,_0x39b10f,_0x2c713e)=>{_0x2c713e||this['length']||_0xbd45dc['value']||this['fire']('removeCommentThread');}),_0x5c78c9;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
_0x3b516f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xaafa1,target:_0x4e208d,type:_0x1cf700,isVisible:_0x548ae5=!0x0}){super(),this['view']=_0xaafa1,this['view']['element']||this['view']['render'](),this['_type']=_0x1cf700,this['_target']=_0x4e208d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x6d21a2([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xb87917,_0xaac605)=>{this['view']['focusTracker']['add'](_0xaac605);}),this['focusableElements']['on']('remove',(_0x484fc0,_0xe432dd)=>{this['view']['focusTracker']['remove'](_0xe432dd);}),this['set']('isVisible',_0x548ae5);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1353e5=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x1353e5),_0x1353e5;}get['targetRect'](){const _0x3bbc51=this['target'];if(null===_0x3bbc51)return null;if(_0x3bbc51 instanceof _0x2a3444)return _0x3bbc51;const _0x537a73=_0x3bbc51['filter'](_0x114eaf=>function(_0x469d01){const _0x438136=_0x469d01['offsetParent'];if(_0x438136)return!0x0;const _0x2a333f=_0x469d01['getClientRects']()['item'](0x0);return!!_0x2a333f;}(_0x114eaf));return 0x0===_0x537a73['length']?null:new _0x2a3444(_0x537a73[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5cae33){this['view']['isActive']=_0x5cae33,this['view']['mainView']['isActive']=_0x5cae33;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3ed17e){if(!(null===_0x3ed17e||_0x3ed17e instanceof _0x2a3444||Array['isArray'](_0x3ed17e)&&_0x3ed17e['every'](_0x58de4f=>fi(_0x58de4f))))throw new _0x3a839e('annotation-invalid-target',null,{'target':_0x3ed17e});}['_getNormalizedTarget'](){const _0x373662='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x373662)?[_0x373662]:_0x373662;}}function fi(_0x3f9a87){return null!==_0x3f9a87&&'object'==typeof _0x3f9a87&&'nodeType'in _0x3f9a87&&0x1===_0x3f9a87['nodeType'];}class S extends _0x6d21a2{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5e80aa=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1b2c22(),this['_focusTracker']['on']('change:isFocused',(_0xa429c1,_0x2495fa,_0x2ab753)=>{_0x2ab753||this['fire']('blur');});for(const _0x5a0849 of _0x5e80aa)this['add'](_0x5a0849);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x122ede){if(this['has'](_0x122ede))throw new _0x3a839e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x122ede['innerView'],_0x122ede),this['_viewToAnnotation']['set'](_0x122ede['view'],_0x122ede);for(const _0x284fbc of _0x122ede['focusableElements'])this['_focusTracker']['add'](_0x284fbc);this['listenTo'](_0x122ede['focusableElements'],'add',(_0x4fff66,_0x2568ac)=>{this['_focusTracker']['add'](_0x2568ac);}),this['listenTo'](_0x122ede['focusableElements'],'remove',(_0x1de6a3,_0x5d5155)=>{this['_focusTracker']['remove'](_0x5d5155);}),this['listenTo'](_0x122ede['view']['focusTracker'],'change:isFocused',(_0x312094,_0x521e53,_0x5076dd)=>{_0x5076dd&&this['fire']('focus',_0x122ede);}),_0x122ede['updateTargetRect']();const _0x4bea9f=this['_getOrderInContent'](_0x122ede['view']['targetRect']);return super['add'](_0x122ede,_0x4bea9f);}['remove'](_0x2f7a9a){if(!this['has'](_0x2f7a9a))throw new _0x3a839e('annotationcollection-not-existing-item',null);this['stopListening'](_0x2f7a9a['view']['focusTracker']),this['stopListening'](_0x2f7a9a['focusableElements']);for(const _0x35d707 of _0x2f7a9a['focusableElements'])this['_focusTracker']['remove'](_0x35d707);return this['_viewToAnnotation']['delete'](_0x2f7a9a['view']),this['_innerViewToAnnotation']['delete'](_0x2f7a9a['innerView']),super['remove'](_0x2f7a9a);}['getByInnerView'](_0x4d9647){return this['_innerViewToAnnotation']['get'](_0x4d9647);}['getByView'](_0x505e4a){return this['_viewToAnnotation']['get'](_0x505e4a);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2914dd of this)_0x2914dd['updateTargetRect']();this['_sort']();}['_sort'](){const _0x27b74e=Array['from'](this)['sort']((_0xc5a024,_0x1020ce)=>w(_0xc5a024['view']['targetRect'],_0x1020ce['view']['targetRect']));for(let _0xa5ac66=_0x27b74e['length']-0x1;_0xa5ac66>0x0;_0xa5ac66--){const _0x58bc6e=_0x27b74e[_0xa5ac66];_0xa5ac66!==this['getIndex'](_0x58bc6e)&&(this['remove'](_0x58bc6e),this['add'](_0x58bc6e));}}['_getOrderInContent'](_0x52165d){let _0x808464=0x0;if(!_0x52165d)return this['length'];for(const _0x57f74c of this){const _0x170dc7=_0x57f74c['view']['targetRect'];if(_0x170dc7){if(w(_0x52165d,_0x170dc7)<0x0)return _0x808464;_0x808464++;}}return _0x808464;}}function v({source:_0x552c14,target:_0x1db82f,filter:_0x5e6d26}){for(const _0x18b778 of _0x552c14)_0x5e6d26(_0x18b778)&&_0x1db82f['add'](_0x18b778);_0x1db82f['listenTo'](_0x552c14,'add',(_0x3b431e,_0x2cbe3b)=>{_0x5e6d26(_0x2cbe3b)&&_0x1db82f['add'](_0x2cbe3b);}),_0x1db82f['listenTo'](_0x552c14,'remove',(_0x42c104,_0x18054f)=>{_0x1db82f['has'](_0x18054f)&&_0x1db82f['remove'](_0x18054f);});}function w(_0x14f3e3,_0x5c5f80){if(null===_0x14f3e3&&null===_0x5c5f80)return 0x0;if(null===_0x14f3e3)return-0x1;if(null===_0x5c5f80)return 0x1;const _0x3ba6af=_0x14f3e3['top']-_0x5c5f80['top'];return 0x0==_0x3ba6af?_0x14f3e3['left']-_0x5c5f80['left']:_0x3ba6af;}class y extends _0x45882f{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3843b1){if(super(_0x3843b1),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3843b1 instanceof _0x105e8c){const _0x362542=_0x3843b1['locale'];_0x3843b1['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x362542,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x362542,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x362542,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x362542,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x362542,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x362542,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x362542,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x11575d){this['collection']['add'](_0x11575d);}['remove'](_0x49a8a0){this['collection']['remove'](_0x49a8a0),_0x49a8a0['destroy']();}['refreshVisibility'](){for(const _0x2aa74f of this['collection'])_0x2aa74f['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2aa84c){return this['collection']['getByInnerView'](_0x2aa84c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3fe5a7 of this['collection'])_0x3fe5a7['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2dc3b8){this['fire']('_activateAnnotation',_0x2dc3b8);}['createAnnotation'](_0x58acce){return new T(_0x58acce);}['createAnnotationView'](_0x5ea4d0,_0x2ef5d1){return new E(_0x5ea4d0,_0x2ef5d1);}['_addActiveAnnotation'](_0x235146){const _0x45aa58=new Set(this['activeAnnotations']);_0x45aa58['add'](_0x235146),this['activeAnnotations']=_0x45aa58;}['_removeActiveAnnotation'](_0x2cd372){const _0x3dba98=new Set(this['activeAnnotations']);_0x3dba98['delete'](_0x2cd372),this['activeAnnotations']=_0x3dba98;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2f699e=this['collection'],_0x1c8280=this['_visibleAnnotations'];function _0x2a8109(_0x5ad483){const _0x14684d=_0x5ad483['source'];_0x14684d['isVisible']&&!_0x1c8280['has'](_0x14684d)?_0x1c8280['add'](_0x14684d):!_0x14684d['isVisible']&&_0x1c8280['has'](_0x14684d)&&_0x1c8280['remove'](_0x14684d),_0x14684d['view']['focusTracker']['remove'](_0x14684d['view']['element']),_0x14684d['view']['focusTracker']['add'](_0x14684d['view']['element']);}this['listenTo'](_0x2f699e,'add',(_0x1ce6d1,_0x3955bc)=>{_0x3955bc['isVisible']&&_0x1c8280['add'](_0x3955bc),this['listenTo'](_0x3955bc,'change:isVisible',_0x2a8109);}),this['listenTo'](_0x2f699e,'remove',(_0x511c8c,_0x3011b5)=>{_0x1c8280['has'](_0x3011b5)&&_0x1c8280['remove'](_0x3011b5),this['stopListening'](_0x3011b5,'change:isVisible',_0x2a8109);});}['_setupEnterAnnotationKeystroke'](){const _0x327fbf=_0x102639=>{_0x102639['on']('ready',()=>{_0x102639['keystrokes']['set'](_0x5af31f,(_0x52fd90,_0x229f22)=>{const _0x21759f=_0x50af64(this['activeAnnotations']['values']());_0x21759f&&(_0x21759f['view']['focus'](),_0x229f22());});});};this['context']instanceof _0x105e8c?_0x327fbf(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x19a121,_0x197c85)=>{_0x327fbf(_0x197c85);});}['_setupEscapeAnnotationHandling'](){const _0x13e9b1=_0x4ca7dc=>{const _0x4b2be4=_0x4ca7dc['source'],_0x1d51c8=[];let _0x221a3e;if(Array['isArray'](_0x4b2be4['target'])){_0x221a3e=_0x4b2be4['target'][0x0],this['context']instanceof _0x105e8c?_0x1d51c8['push'](this['context']):this['context']['editors']&&_0x1d51c8['push'](...this['context']['editors']);for(const _0x4d78b1 of _0x1d51c8)for(const _0x3925d8 of _0x4d78b1['editing']['view']['domRoots']['values']())if(_0x3925d8['contains'](_0x221a3e))return void _0x4d78b1['editing']['view']['focus']();_0x221a3e['focus']();}};this['listenTo'](this['collection'],'add',(_0x4935d7,_0x17c51c)=>{this['listenTo'](_0x17c51c,'escape',_0x13e9b1,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3cc4c0,_0x20da10)=>{this['stopListening'](_0x20da10,'escape',_0x13e9b1);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x45882f{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x56b7a1){super(_0x56b7a1),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1d4177=this['context']['config'];_0x1d4177['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1d4177['define']('comments.maxThreadTotalWeight',0x1f4),_0x1d4177['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1d4177['define']('comments.CommentThreadView',gt),_0x1d4177['define']('comments.CommentView',Tt),_0x1d4177['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x45850c=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x46eed9,_0x2815a6)=>this['_addCommentThread'](_0x2815a6)),this['on']('submitCommentThread',(_0x5b1359,_0xcee1fb)=>this['_submitCommentThread'](_0xcee1fb)),this['on']('resolveCommentThread',(_0x1cea4,_0xea5cfd)=>this['_resolveCommentThread'](_0xea5cfd)),this['on']('resolveCommentThread',(_0x4aa97d,_0x25ea8c)=>this['_updateActiveAnnotation'](_0x25ea8c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2785b3,_0x903ef5)=>this['_reopenCommentThread'](_0x903ef5)),this['on']('reopenCommentThread',(_0x597e74,_0x35234c)=>this['_updateActiveAnnotation'](_0x35234c),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x126f05,_0x1b4aa3)=>this['_removeCommentThread'](_0x1b4aa3)),this['on']('updateCommentThread',(_0x5beaf7,_0xfec400)=>this['_updateCommentThread'](_0xfec400)),this['on']('updateCommentThread',(_0x2c480c,_0x27de67)=>this['_updateActiveAnnotation'](_0x27de67),{'priority':'lowest'}),this['on']('addComment',(_0x494699,_0x3038d8)=>this['_addComment'](_0x3038d8)),this['on']('updateComment',(_0x20e001,_0x48b105)=>this['_updateComment'](_0x48b105)),this['on']('removeComment',(_0x4278bc,_0x641296)=>this['_removeComment'](_0x641296)),this['on']('addComment',(_0x22ae58,{threadId:_0x6d8891,isFromAdapter:_0x580f15})=>{if(_0x580f15)return;const _0x40fa2c=this['getCommentThread'](_0x6d8891),_0x3cd2a3=_0x40fa2c&&this['_threadToController']['get'](_0x40fa2c);_0x3cd2a3&&_0x3cd2a3['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x45850c,'change:activeAnnotations',(_0x6d58a8,_0x155b4f,_0x342eaa)=>{const _0x4ef702=Array['from'](_0x342eaa)['map'](_0x54c4ba=>this['_viewToController']['get'](_0x54c4ba['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4ef702?_0x4ef702['model']:null;});}set['adapter'](_0x31a15c){if(this['_adapter'])throw new _0x3a839e('commentsrepository-adapter-already-set');this['_adapter']=_0x31a15c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2ca388=_t,threadId:_0x108583=_0x54b8c0(),comments:_0x173b3a=[],unlinkedAt:_0x3e2dae=null,resolvedAt:_0x541b5b=null,resolvedBy:_0x56b749=null,target:_0x484c41=null,context:_0x151b09=null,attributes:_0x531e3b={},isResolvable:_0x275e68=!0x0,isSubmitted:_0x59c18e=!0x1,isFromAdapter:_0x1b2fde=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x2ca388),{'channelId':_0x2ca388,'threadId':_0x108583,'comments':_0x173b3a,'unlinkedAt':_0x3e2dae,'resolvedAt':_0x541b5b,'resolvedBy':_0x56b749,'target':_0x484c41,'context':_0x151b09,'attributes':_0x531e3b,'isFromAdapter':_0x1b2fde,'isResolvable':_0x275e68,'isSubmitted':_0x59c18e}),this['getCommentThread'](_0x108583);}['openNewCommentThread']({channelId:_0xd74c72=_t,threadId:_0x29b8a2=_0x54b8c0(),target:_0x56dc88,context:_0x4de206=null,isResolvable:_0x21b16d=!0x0}){if(this['_readOnlyChannels']['has'](_0xd74c72)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x56dc88)throw new _0x3a839e('commentsrepository-missing-target');const _0x42993a=this['addCommentThread']({'channelId':_0xd74c72,'threadId':_0x29b8a2,'target':_0x56dc88,'context':_0x4de206,'isResolvable':_0x21b16d});if(!_0x42993a)return null;const _0x207068=this['_threadToController']['get'](_0x42993a),_0x2e6012=_0x207068['view']['commentThreadInputView']['commentInputView'],_0x1a275f=this['context']['plugins']['get'](y),_0x49692b=_0x1a275f['getByInnerView'](_0x207068['view']);return _0x1a275f['activate'](_0x49692b),_0x2e6012['once']('editorReady',()=>_0x2e6012['focus']()),_0x42993a;}['hasCommentThread'](_0x32a586){if('string'!=typeof _0x32a586)throw new _0x3a839e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x32a586);}['updateCommentThread']({channelId:_0x5b3db0=_t,threadId:_0x32516f,context:_0x1224d7,unlinkedAt:_0x40c76,attributes:_0x596ffc,isFromAdapter:_0x1c1e5d=!0x1}){return this['fire'](Nt('updateCommentThread',_0x5b3db0),{'channelId':_0x5b3db0,'threadId':_0x32516f,'context':_0x1224d7,'unlinkedAt':_0x40c76,'attributes':_0x596ffc,'isFromAdapter':_0x1c1e5d}),this['getCommentThread'](_0x32516f);}['getCommentThread'](_0x375efd){if('string'!=typeof _0x375efd)throw new _0x3a839e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x375efd);}['fetchCommentThread']({channelId:_0x12a39c,threadId:_0x55b04f}={}){const _0x2c1372=this['getCommentThread'](_0x55b04f);if(_0x2c1372)return Promise['resolve'](_0x2c1372);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3a839e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x12a39c,'threadId':_0x55b04f})['then'](_0xce937b=>this['hasCommentThread'](_0x55b04f)?this['getCommentThread'](_0x55b04f):_0xce937b?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x12a39c},_0xce937b)):void 0x0)['catch'](_0x470c3c=>{throw console['error'](_0x470c3c),new _0x3a839e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5af5f5,skipNotAttached:_0x421579=!0x1,skipEmpty:_0x2b795a=!0x1,toJSON:_0x285482=!0x1}={}){const _0x398d33=[];for(const _0x23d72c of this['_threads']['values']())_0x5af5f5&&_0x23d72c['channelId']!==_0x5af5f5||_0x421579&&!_0x23d72c['isAttached']||_0x2b795a&&0x0===_0x23d72c['length']||_0x398d33['push'](_0x23d72c);return _0x285482?_0x398d33['map'](_0x5d6800=>_0x5d6800['toJSON']()):_0x398d33;}['getAnnotationForCommentThread'](_0x8c463e){const _0x546e30=this['_threadToController']['get'](_0x8c463e);if(!_0x546e30)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x546e30['view'])||null;}['getCommentThreadForAnnotation'](_0xba6091){const _0x3ddae7=this['_viewToController']['get'](_0xba6091['innerView']);return _0x3ddae7?_0x3ddae7['model']:null;}['setActiveCommentThread'](_0x877280){const _0x2dd282=this['context']['plugins']['get'](y);if(!_0x877280)return void(this['activeCommentThread']&&_0x2dd282['deactivateAll']());const _0x3974eb=this['getCommentThread'](_0x877280);if(!_0x3974eb)throw new _0x3a839e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x877280});if(!this['_threadToController']['has'](_0x3974eb))throw new _0x3a839e('commentsrepository-active-not-attached',null,{'threadId':_0x877280});const _0x3c6da8=_0x2dd282['getByInnerView'](this['_threadToController']['get'](_0x3974eb)['view']);_0x2dd282['activate'](_0x3c6da8);}['switchReadOnly'](_0x34dd55,_0x24c01e){_0x34dd55?this['_readOnlyChannels']['add'](_0x24c01e):this['_readOnlyChannels']['delete'](_0x24c01e),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x42e9e0){return this['_readOnlyChannels']['has'](_0x42e9e0)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x41b5a6,_0x1cb652){return new vt(_0x41b5a6,_0x1cb652);}['setPermissions'](_0x335af0,_0x128b62=_t){this['_permissions']['set'](_0x128b62,_0x335af0),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3d8a7c=_t){return this['_permissions']['has'](_0x3d8a7c)?this['_permissions']['get'](_0x3d8a7c):bt;}['_addCommentThread']({channelId:_0x47764c,threadId:_0x192975,comments:_0x20a000,unlinkedAt:_0x6323d0,resolvedAt:_0x1b0d7f,resolvedBy:_0x2523f8,target:_0x3cb666,context:_0x5068fd,attributes:_0x518d74,isFromAdapter:_0x15d0ef,isResolvable:_0x2b9394,isSubmitted:_0x5ade7d}){if('string'!=typeof _0x192975)throw new _0x3a839e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x192975});if(this['hasCommentThread'](_0x192975))throw new _0x3a839e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x192975});const _0x35d92e=new pi(this,{'channelId':_0x47764c,'id':_0x192975,'context':_0x5068fd,'attributes':_0x518d74,'unlinkedAt':_0x6323d0,'resolvedAt':_0x1b0d7f,'resolvedBy':_0x2523f8?this['context']['plugins']['get'](it)['getUser'](_0x2523f8):null,'isResolvable':_0x2b9394,'isSubmitted':_0x5ade7d||_0x15d0ef});this['_threads']['set'](_0x192975,_0x35d92e);for(const _0x46e4c5 of _0x20a000)_0x35d92e['_add'](this['_createNewComment']({'threadId':_0x192975,..._0x46e4c5}));return _0x3cb666&&_0x35d92e['attachTo'](_0x3cb666),_0x15d0ef||!_0x35d92e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x47764c,'threadId':_0x192975});}['_submitCommentThread']({channelId:_0x44b0a4,threadId:_0x36ea23}){if(!this['hasCommentThread'](_0x36ea23))throw new _0x3a839e('commentsrepository-missing-comment-thread',this);const _0x29211b=this['getCommentThread'](_0x36ea23);if(_0x29211b['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x352590,comments:_0xf8580d,resolvedAt:_0x27e3e2,resolvedBy:_0x41bd9c,context:_0x339086,attributes:_0x4087fd}=_0x29211b,_0x2a29b3=this['context']['plugins']['get']('PendingActions'),_0x5cb5e7=_0x2a29b3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x44b0a4,'threadId':_0x352590,'comments':_0xf8580d['map'](_0x25cd01=>_0x25cd01['toJSON']()),'resolvedAt':_0x27e3e2,'resolvedBy':_0x41bd9c?_0x41bd9c['id']:_0x41bd9c,'context':_0x339086,'attributes':_0x4087fd})['then'](({comments:_0x7ce831})=>{_0x2a29b3['remove'](_0x5cb5e7);for(const _0x3f97ea of _0x7ce831)this['_updateComment']({'channelId':_0x44b0a4,'threadId':_0x36ea23,'commentId':_0x3f97ea['commentId'],'createdAt':_0x3f97ea['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2dd4b=>{throw console['error'](_0x2dd4b),new _0x3a839e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x6a2067,target:_0x20a6b6}){const _0x53b722=this['getCommentThread'](_0x6a2067);if(!_0x53b722)throw new _0x3a839e('commentsrepository-attach-missing-comment-thread',this);const _0x256b58=this['context']['plugins']['get']('PendingActions'),_0x1bcafd=this['context']['plugins']['get'](y),_0x313ac0=this['_createCommentThreadView'](_0x53b722),_0x3c2d43=new vt(_0x53b722,_0x313ac0);let _0x2ab7dc=null;_0x313ac0['on']('change:isDirty',(_0x1bda12,_0x192c62,_0x29add5)=>{_0x29add5?_0x2ab7dc=_0x256b58['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2ab7dc&&(_0x256b58['remove'](_0x2ab7dc),_0x2ab7dc=null);}),this['_threadToController']['set'](_0x53b722,_0x3c2d43),this['_viewToController']['set'](_0x313ac0,_0x3c2d43);const _0x1d45e4=new E(this['context']['locale'],_0x313ac0);_0x1d45e4['bind']('length')['to'](_0x313ac0),_0x1d45e4['bind']('isDirty')['to'](_0x313ac0,'isDirty',_0x313ac0,'length',(_0x31b36c,_0x3acf58)=>_0x31b36c||!_0x3acf58),_0x1d45e4['bind']('isActive')['to'](_0x313ac0),_0x1d45e4['type']='comment';const _0x447627=new T({'view':_0x1d45e4,'target':_0x20a6b6,'type':'comment','isVisible':!_0x53b722['archivedAt']&&!!('function'==typeof _0x20a6b6?_0x20a6b6():_0x20a6b6)});return _0x313ac0['on']('escape',()=>{_0x447627['fire']('escape');}),this['_bindAnnotationToEditors'](_0x313ac0,_0x447627),_0x1bcafd['add'](_0x447627),_0x447627;}['_bindAnnotationToEditors'](_0x210cd8,_0x30181e){this['listenTo'](_0x210cd8,'editorReady',(_0x1960c5,_0x264cd8)=>{const _0x4d503b=_0x264cd8['ui']['view']['body']['bodyCollectionContainer'];_0x30181e['focusableElements']['add'](_0x4d503b),this['context']instanceof _0x105e8c&&this['context']['ui']['focusTracker']['add'](_0x4d503b);},{'priority':'highest'}),this['listenTo'](_0x210cd8,'editorDestroyed',(_0x5c251c,_0x2f27f6)=>{const _0x5abc52=_0x2f27f6['ui']['view']['body']['bodyCollectionContainer'];_0x30181e['focusableElements']['has'](_0x5abc52)&&_0x30181e['focusableElements']['remove'](_0x5abc52),this['context']instanceof _0x105e8c&&this['context']['ui']['focusTracker']['remove'](_0x5abc52);});}['_unbindEditors'](_0x4b0857){this['stopListening'](_0x4b0857,'editorReady'),this['stopListening'](_0x4b0857,'editorDestroyed');}['_createCommentThreadView'](_0x4b37d7){const _0x2e8372=this['context']['plugins']['get'](it),{config:_0xa4e2f1,locale:_0x203676}=this['context'],_0x5305c0=pt(_0xa4e2f1['get']('locale'),_0x203676);return new(0x0,(_0xa4e2f1['get']('comments'))['CommentThreadView'])(_0x203676,_0x4b37d7,_0x2e8372['me'],{'editorConfig':{..._0xa4e2f1['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xa4e2f1['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xa4e2f1['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xa4e2f1['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xa4e2f1['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5305c0,'CommentView':_0xa4e2f1['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x205670,channelId:_0x11a8ae,resolvedAt:_0x451325,resolvedBy:_0x4f041a,isFromAdapter:_0x291670}){if(!this['hasCommentThread'](_0x205670))throw new _0x3a839e('commentsrepository-missing-comment-thread',null,{'threadId':_0x205670});const _0x1aa891=this['getCommentThread'](_0x205670);if(_0x1aa891['isResolved'])throw new _0x3a839e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x205670});const _0x523322=this['context']['plugins']['get'](it);if(_0x1aa891['resolvedBy']=_0x523322['getUser'](_0x4f041a),_0x1aa891['resolvedAt']=_0x451325,_0x291670||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x91c762=this['context']['plugins']['get']('PendingActions'),_0x24de20=_0x91c762['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x11a8ae,'threadId':_0x205670})['then'](({resolvedAt:_0x59e3a6,resolvedBy:_0xf0b339})=>{_0x91c762['remove'](_0x24de20),_0x1aa891['resolvedBy']['id']!==_0xf0b339&&(_0x1aa891['resolvedBy']=_0x523322['getUser'](_0xf0b339)),_0x1aa891['resolvedAt']=_0x59e3a6;})['catch'](_0x13f071=>{throw console['error'](_0x13f071),new _0x3a839e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4a5570,channelId:_0xd3653,isFromAdapter:_0x458254}){if(!this['hasCommentThread'](_0x4a5570))throw new _0x3a839e('commentsrepository-missing-comment-thread',null,{'threadId':_0x4a5570});const _0x49eedc=this['getCommentThread'](_0x4a5570);if(!_0x49eedc['isResolved'])throw new _0x3a839e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4a5570});if(_0x49eedc['resolvedBy']=null,_0x49eedc['resolvedAt']=null,_0x458254||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x94a7fe=this['context']['plugins']['get']('PendingActions'),_0x3a729a=_0x94a7fe['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xd3653,'threadId':_0x4a5570})['then'](()=>_0x94a7fe['remove'](_0x3a729a))['catch'](_0xbd2e21=>{throw console['error'](_0xbd2e21),new _0x3a839e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x46b9a1,isFromAdapter:_0xa6eb1}){const _0x491881=this['getCommentThread'](_0x46b9a1);if(!_0x491881)throw new _0x3a839e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x46b9a1),this['_threads']['delete'](_0x46b9a1),!_0x491881['isSubmitted']||_0xa6eb1||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x172f64=this['context']['plugins']['get']('PendingActions'),{channelId:_0x12fc8d}=_0x491881,_0xf53cc4=_0x172f64['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x12fc8d,'threadId':_0x46b9a1})['then'](()=>_0x172f64['remove'](_0xf53cc4))['catch'](_0x313e12=>{throw console['error'](_0x313e12),new _0x3a839e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3f87f0,unlinkedAt:_0x43f62f,context:_0x2f119c,attributes:_0x17de5b,isFromAdapter:_0x212eba}){if('string'!=typeof _0x3f87f0)throw new _0x3a839e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3f87f0});if(!this['hasCommentThread'](_0x3f87f0))throw new _0x3a839e('commentsrepository-missing-comment-thread',null,{'threadId':_0x3f87f0});const _0x212941=this['getCommentThread'](_0x3f87f0);let _0x38a2d4=!0x1;if(void 0x0!==_0x2f119c&&_0x212941['context']!==_0x2f119c&&(_0x212941['context']=_0x2f119c,_0x38a2d4=!0x0),void 0x0!==_0x43f62f&&_0x212941['unlinkedAt']!==_0x43f62f&&(_0x212941['unlinkedAt']=_0x43f62f,_0x38a2d4=!0x0),_0x17de5b&&!At(_0x17de5b,_0x212941['attributes'])&&(_0x212941['attributes']=_0x17de5b,_0x38a2d4=!0x0),!_0x38a2d4)return Promise['resolve']();if(!_0x212941['isSubmitted']||_0x212eba||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x42c845=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1c12c6}=_0x212941,_0x53334e=_0x42c845['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1c12c6,'threadId':_0x3f87f0,'context':_0x2f119c,'unlinkedAt':_0x43f62f,'attributes':_0x17de5b})['then'](()=>_0x42c845['remove'](_0x53334e))['catch'](_0x40398f=>{throw console['error'](_0x40398f),new _0x3a839e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x5d13b8){const _0x9cb11f=this['context']['plugins']['get'](y),_0x4b4367=this['getCommentThread'](_0x5d13b8);if(_0x4b4367['_isAttached']=!0x1,this['_threadToController']['has'](_0x4b4367)){const _0x493397=this['_threadToController']['get'](_0x4b4367),_0x306b50=_0x493397['view'],_0xf7e04e=_0x9cb11f['getByInnerView'](_0x306b50);this['_threadToController']['delete'](_0x4b4367),this['_viewToController']['delete'](_0x306b50),_0xf7e04e&&_0x9cb11f['remove'](_0xf7e04e),_0x493397['destroy'](),_0x306b50['destroy']()['then'](()=>{this['_unbindEditors'](_0x306b50);});}}['_updateActiveAnnotation']({threadId:_0x1eceaf,resolvedAt:_0x1eebe5,unlinkedAt:_0x1f9a11}){const _0x1c63ce=!!_0x1eebe5,_0x5b3152=this['context']['plugins']['get'](y),_0x1ccac9=this['getCommentThread'](_0x1eceaf);if(this['_threadToController']['has'](_0x1ccac9)){const _0x57fbdf=this['_threadToController']['get'](_0x1ccac9)['view'],_0x251107=_0x5b3152['getByInnerView'](_0x57fbdf);_0x251107&&(_0x1c63ce&&_0x5b3152['_removeActiveAnnotation'](_0x251107),_0x1f9a11?_0x251107['isVisible']=!0x1:_0x251107['refreshVisibility']());}}['_getExternalAuthor'](_0x2302e2){const _0x452344=this['context']['plugins']['get'](it),_0x137eeb=It('external:'+_0x2302e2),_0x2f0b14=_0x452344['getUser'](_0x137eeb);return _0x2f0b14||_0x452344['addUser']({'id':_0x137eeb,'name':_0x2302e2});}['_createNewComment']({threadId:_0x11eac3,commentId:_0x15b8fe=_0x54b8c0(),content:_0x186a05,authorId:_0x1dd840,createdAt:_0x4ad6ca,attributes:_0x56965a}){if('string'!=typeof _0x15b8fe)throw new _0x3a839e('commentsrepository-invalid-commentid');if('string'!=typeof _0x1dd840)throw new _0x3a839e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x186a05||!_0x186a05['trim']())throw new _0x3a839e('commentsrepository-invalid-comment-content');const _0x5bc477=this['context']['plugins']['get'](it)['getUser'](_0x1dd840);if(!_0x5bc477)throw new _0x3a839e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x1dd840});let _0x4e8387=null,_0x361982=_0x4ad6ca;return _0x56965a?.['@external']&&(_0x4e8387=this['_getExternalAuthor'](_0x56965a['@external']['authorName']),_0x361982=new Date(_0x56965a['@external']['createdAt'])),new wi(this,{'threadId':_0x11eac3,'id':_0x15b8fe,'author':_0x4e8387||_0x5bc477,'creator':_0x5bc477,'content':_0x186a05,'createdAt':_0x4ad6ca,'authoredAt':_0x361982,'attributes':_0x56965a});}['_addComment'](_0x2f995b){let {threadId:_0x311b61,content:_0x1bd9d4,attributes:_0x214133,isFromAdapter:_0x15f5c5}=_0x2f995b;const _0x1ab982=this['getCommentThread'](_0x2f995b['threadId']);if(!_0x1ab982)throw new _0x3a839e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x5df366=this['_createNewComment'](_0x2f995b),{id:_0x141413}=_0x5df366;if(_0x1ab982['_add'](_0x5df366),_0x15f5c5||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1ab982['isSubmitted'])return Promise['resolve']();const _0x16aa37=this['context']['plugins']['get']('PendingActions'),{channelId:_0x6f9a68}=_0x1ab982,_0x13b468=_0x16aa37['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x214133||(_0x214133={}),this['adapter']['addComment']({'channelId':_0x6f9a68,'threadId':_0x311b61,'commentId':_0x141413,'content':_0x1bd9d4,'attributes':_0x214133})['then'](_0x5e8d40=>{_0x16aa37['remove'](_0x13b468),_0x5e8d40&&this['_updateComment']({'channelId':_0x6f9a68,'threadId':_0x311b61,'commentId':_0x141413,'createdAt':_0x5e8d40['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xf782c4=>{throw console['error'](_0xf782c4),new _0x3a839e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0xd4f403,commentId:_0x391bba,content:_0x4f85d0,createdAt:_0x25713a,attributes:_0x4f66b5,isFromAdapter:_0xccf2be}){if(void 0x0!==_0x4f85d0&&('string'!=typeof _0x4f85d0||!_0x4f85d0['trim']()['length']))throw new _0x3a839e('commentsrepository-update-comment-invalid-content');const _0x934cc4=this['getCommentThread'](_0xd4f403),_0x27e91c=_0x934cc4['getComment'](_0x391bba);if(!_0x27e91c)throw new _0x3a839e('commentsrepository-update-missing-comment',this);let _0x4c5c3b=!0x1;if(_0x4f85d0&&_0x4f85d0!==_0x27e91c['content']&&(_0x27e91c['isEditable']||_0xccf2be)&&(_0x27e91c['content']=_0x4f85d0,_0x4c5c3b=!0x0),_0x25713a&&_0x25713a!==_0x27e91c['createdAt']&&(_0x27e91c['createdAt']=_0x25713a,_0x27e91c['attributes']&&_0x27e91c['attributes']['@external']||(_0x27e91c['authoredAt']=_0x25713a),_0x4c5c3b=!0x0),_0x4f66b5&&!At(_0x4f66b5,_0x27e91c['attributes'])&&(_0x27e91c['attributes']=_0x4f66b5,_0x4c5c3b=!0x0),!_0x4c5c3b)return Promise['resolve']();if(_0x934cc4['fire']('commentUpdated'),_0xccf2be||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x49a0d2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30bfbe}=this['getCommentThread'](_0x27e91c['threadId']),_0x8f9fa8=_0x49a0d2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x30bfbe,'threadId':_0xd4f403,'commentId':_0x391bba,'content':_0x4f85d0,'attributes':_0x4f66b5})['then'](()=>_0x49a0d2['remove'](_0x8f9fa8))['catch'](_0x382f46=>{throw console['error'](_0x382f46),new _0x3a839e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x16231a,commentId:_0x596e16,isFromAdapter:_0x525562}){const _0x20dca5=this['getCommentThread'](_0x16231a),_0x54145e=_0x20dca5['getComment'](_0x596e16);if(!_0x54145e)throw new _0x3a839e('commentsrepository-remove-missing-comment',this);if(_0x20dca5['_remove'](_0x54145e),_0x525562||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x23c6d6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4644e5}=_0x20dca5,_0x2c422f=_0x23c6d6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4644e5,'threadId':_0x16231a,'commentId':_0x596e16})['then'](()=>_0x23c6d6['remove'](_0x2c422f))['catch'](_0x51c2a0=>{throw console['error'](_0x51c2a0),new _0x3a839e('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x3b516f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x18375d,_0x22b48d){super();const _0x3193d5=_0x18375d['context']['plugins']['get'](it)['me'],_0x59b6d2=_0x18375d['getCommentThread'](_0x22b48d['threadId']),_0x1bd403=0x0===_0x59b6d2['comments']['length'],_0x3684b0=_0x3193d5===_0x22b48d['author'];this['id']=_0x22b48d['id'],this['threadId']=_0x22b48d['threadId'],this['author']=_0x22b48d['author'],this['creator']=_0x22b48d['creator'],this['isExternal']=Boolean(_0x22b48d['attributes']&&_0x22b48d['attributes']['@external']),this['set']('content',_0x22b48d['content']),this['createdAt']=_0x22b48d['createdAt']||new Date(),this['set']('authoredAt',_0x22b48d['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x59b6d2,'resolvedAt'),this['set']('attributes',_0x22b48d['attributes']||{}),this['bind']('isEditable')['to'](_0x18375d,'_permissions',()=>{const _0x2cc500=_0x18375d['getPermissions'](_0x59b6d2['channelId'])['write'],_0x5d46e9=_0x18375d['getPermissions'](_0x59b6d2['channelId'])['modifyAll'];return _0x3684b0&&_0x2cc500||!_0x3684b0&&_0x5d46e9;}),this['bind']('isRemovable')['to'](_0x59b6d2,'isRemovable',_0x18375d,'_permissions',_0x14c6c1=>{const _0x1c7096=_0x18375d['getPermissions'](_0x59b6d2['channelId'])['write'],_0x3fc495=_0x18375d['getPermissions'](_0x59b6d2['channelId'])['modifyAll'];return _0x3684b0&&_0x1c7096||_0x14c6c1&&_0x1bd403||!_0x3684b0&&_0x3fc495&&!_0x1bd403;}),this['bind']('isReadOnly')['to'](_0x59b6d2,'isReadOnly'),this['_repository']=_0x18375d;}get['weight'](){return Math['max'](function(_0x4c9a36){const _0x3c6ff3=document['createElement']('div');return _0x3c6ff3['innerHTML']=_0x4c9a36,_0x3c6ff3['textContent']['length'];}(this['content']),0xc8);}['update'](_0x46e757){const {threadId:_0x3e3651,id:_0x388062}=this;if(!this['_repository']['hasCommentThread'](_0x3e3651))throw new _0x3a839e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x1b8a5d}=this['_repository']['getCommentThread'](_0x3e3651);this['_repository']['fire'](Nt('updateComment',_0x1b8a5d,_0x3e3651),{'channelId':_0x1b8a5d,'threadId':_0x3e3651,'commentId':_0x388062,..._0x46e757});}['setAttribute'](_0x28febf,_0x548c1f){const _0x5e256e=wt(this['attributes']);yt(_0x5e256e,_0x28febf,_0x548c1f),this['update']({'attributes':_0x5e256e});}['removeAttribute'](_0x337513){const _0x38e8e0=wt(this['attributes']);Ct(_0x38e8e0,_0x337513),this['update']({'attributes':_0x38e8e0});}['remove'](_0x49b53e={}){if(!_0x49b53e['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xeb55d1,id:_0x472adf}=this;if(!this['_repository']['hasCommentThread'](_0xeb55d1))throw new _0x3a839e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x56b5e9}=this['_repository']['getCommentThread'](_0xeb55d1);this['_repository']['fire'](Nt('removeComment',_0x56b5e9,_0xeb55d1),{'channelId':_0x56b5e9,'threadId':_0xeb55d1,'commentId':_0x472adf,..._0x49b53e});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x462e24,..._0x50b947){for(const _0x23c4c0 of _0x50b947)void 0x0!==_0x23c4c0&&(_0x462e24+=':'+String(_0x23c4c0));return _0x462e24;}class ot extends _0x3b1e3e{constructor(_0x5dcff8){super(_0x5dcff8),this['set']('hasContent',!0x1);}['refresh'](){const _0x535568=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x213666 of _0x535568['getRanges']())if(this['_hasContent'](_0x213666))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5880cc=_0x54b8c0(),ranges:_0x583626,comment:_0xf9cd07}={}){const _0x302023=this['editor']['model'],_0x2d471f=_0x583626??Array['from'](_0x302023['document']['selection']['getRanges']()),_0x33bb3f=[];for(const _0x59db71 of _0x2d471f)this['_hasContent'](_0x59db71)&&_0x33bb3f['push'](this['_trimToContent'](_0x59db71));if(!_0x33bb3f['length'])throw new _0x3a839e('addcommentthreadcommand-incorrect-ranges',null);_0xf9cd07&&this['_createCommentThread'](_0x5880cc,_0xf9cd07),this['_createMarkersFromRanges'](_0x5880cc,_0x33bb3f,!!_0xf9cd07);}['_createMarkersFromRanges'](_0x3e83a3,_0x44f3cc,_0x2ad3f2){this['editor']['model']['change'](_0x31b27d=>{for(const _0x2ef7ff of _0x44f3cc){const _0x2e4fc7=_0x54b8c0()['substr'](0x1,0x5),_0x735c3='comment:'+_0x3e83a3+':'+_0x2e4fc7;_0x31b27d['addMarker'](_0x735c3,{'range':_0x2ef7ff,'usingOperation':_0x2ad3f2,'affectsData':_0x2ad3f2});}});}['_createCommentThread'](_0x5a1a13,_0x6d0283){const _0x271902=this['editor']['plugins']['get']('CommentsRepository'),_0x45cdac=this['editor']['config']['get']('collaboration.channelId'),_0x47bb86=this['editor']['plugins']['get']('Users')['me'];if(!_0x47bb86)throw new _0x3a839e('addcommentthreadcommand-user-not-found',null);_0x271902['addCommentThread']({'threadId':_0x5a1a13,'channelId':_0x45cdac,'comments':[{'authorId':_0x47bb86['id'],'content':_0x6d0283,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3fc290){for(const _0xf18424 of _0x3fc290['getItems']())if(this['_itemIsContent'](_0xf18424))return!0x0;return!0x1;}['_itemIsContent'](_0x93f85d){return _0x93f85d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x93f85d)&&!_0x93f85d['is']('element','tableCell');}['_trimToContent'](_0xf77fb8){const _0x2a9d41=_0x35c571=>!this['_itemIsContent'](_0x35c571['item']),_0x4ebcb6=_0xf77fb8['start']['getLastMatchingPosition'](_0x2a9d41),_0x471fa3=_0xf77fb8['end']['getLastMatchingPosition'](_0x2a9d41,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4ebcb6,_0x471fa3);}}class b extends _0x343473{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x564702){super(_0x564702),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x173c11=this['editor'],_0x37ba04=_0x173c11['model']['document']['selection'],_0x3b383c=_0x274d42(()=>this['refreshSelectedViews'](),0xa);_0x37ba04['on']('change:range',(_0x29382e,_0x5ae1f4)=>{_0x5ae1f4['directChange']&&(_0x3b383c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x173c11['editing']['view']['document'],'change:isFocused',(_0x5a3a9f,_0x32cc0e,_0x50d2ce)=>{_0x50d2ce&&_0x3b383c();}),this['listenTo'](_0x173c11['ui']['focusTracker'],'change:isFocused',(_0x28e66c,_0x13fd59,_0x9eb4c7)=>{_0x9eb4c7||this['fire']('blur',{'isAnnotationTracked':_0x3e313e=>this['_editorAnnotationsData']['has'](_0x3e313e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2d9839){if(this['_editorAnnotations']['has'](_0x2d9839['view']))return;this['_editorAnnotations']['add'](_0x2d9839['view']),this['editor']['ui']['focusTracker']['add'](_0x2d9839['view']['element']);const _0x5895a9=this['editor']['plugins']['get'](y);this['listenTo'](_0x5895a9['collection'],'remove',(_0x48f3ac,_0x1b398f)=>{this['editor']['ui']['focusTracker']['remove'](_0x1b398f['view']['element']),this['_editorAnnotations']['delete'](_0x1b398f['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x36a371){if('function'!=typeof _0x36a371)throw new _0x3a839e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x36a371);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3d7af0,annotations:_0x215c95}){const _0xd8b5cd=[],_0x40cf14=this['editor']['model']['document']['selection'],_0x23753c=Array['from'](_0x40cf14['getRanges']());for(const [_0x150a2e,_0x2403cd]of this['_editorAnnotationsData']){const _0x59d9e5=_0x5c53fa(_0x2403cd),_0x256171=_0x215c95['getByInnerView'](_0x150a2e);_0x59d9e5&&_0x256171&&_0xd8b5cd['push']({'annotation':_0x256171,'range':_0x59d9e5});}function _0x5c53fa(_0x58ed7d){for(const _0x4a389c of _0x58ed7d)for(const _0x504af8 of _0x23753c)if(_0x4a389c['containsRange'](_0x504af8,!_0x40cf14['isCollapsed']))return _0x4a389c;return null;}return _0xd8b5cd['sort']((_0x175a18,_0x515963)=>{const _0x357886=_0x175a18['range'],_0x1dde3f=_0x515963['range'];if(!_0x357886['isEqual'](_0x1dde3f)){if(_0x357886['containsRange'](_0x1dde3f,!0x0))return 0x1;if(_0x1dde3f['containsRange'](_0x357886,!0x0))return-0x1;}return _0x175a18['annotation']==_0x3d7af0?-0x1:_0x515963['annotation']==_0x3d7af0?0x1:0x0;})['map'](_0xba6b91=>_0xba6b91['annotation']);}get['_editorAnnotationsData'](){const _0x38a53a=new Map();for(const _0x47736f of Array['from'](this['_dataCollectors']))for(const [_0x5e13dd,_0x22067a]of _0x47736f())_0x38a53a['set'](_0x5e13dd,_0x22067a);return _0x38a53a;}}class st extends _0x343473{['afterInit'](){const _0x51dfdc=this['editor'];if(!_0x51dfdc['plugins']['has']('RestrictedEditingModeEditing'))return;_0x51dfdc['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x343473{constructor(_0x504a62){super(_0x504a62),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xaad88=this['editor'],_0x4cc83e=_0xaad88['commands']['get']('importWord'),_0xff88e8=_0xaad88['plugins']['get'](it);_0x4cc83e&&(_0x4cc83e['on']('execute',(_0x1e183a,[,_0x2adfdd])=>{_0x2adfdd['collaboration_features']={'comments':!0x0,'user_id':_0xff88e8['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x4cc83e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3a1719,_0x3a322f){const {comment_threads:_0x457b8a}=_0x3a322f;_0x457b8a&&_0x457b8a['forEach'](({thread_id:_0x6da76c,comments:_0x19cea3,is_resolved:_0xdf0d4c})=>{const _0x164281=new Date(),_0x14b6af=_0x19cea3['map'](({author:_0x4e3494,content:_0x2e1d7f,created_at:_0x2fbd6f})=>({'content':_0x2e1d7f,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x164281,'attributes':{'@external':{'authorName':_0x4e3494,'createdAt':_0x2fbd6f?new Date(_0x2fbd6f):new Date(),'source':'importWord'}}})),_0x24b2da=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x24b2da,'threadId':_0x6da76c,'comments':_0x14b6af,'resolvedAt':_0xdf0d4c?_0x164281:null});});}}class at extends _0x343473{constructor(_0x21d63d){super(_0x21d63d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x46f554=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x46f554,'contentInsertion',(_0x323907,_0x1a1802)=>this['_removeMarkersWithoutThreads'](_0x1a1802['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x513481){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x513481;const _0x44c1d7=this['editor']['plugins']['get']('CommentsRepository');for(const _0xbab38f of _0x513481['keys']()){const [_0x207a42,_0x5c03d0]=_0xbab38f['split'](':');'comment'!=_0x207a42||_0x44c1d7['hasCommentThread'](_0x5c03d0)||_0x513481['delete'](_0xbab38f);}return _0x513481;}['_registerMarkerInClipboardPipeline'](){const _0x2adc2d=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x505fac=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x505fac&&_0x2adc2d['_registerMarkerToCopy']('comment',_0x505fac);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x12137a){switch(_0x12137a){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x47be26){const _0x356cb=_0x47be26['split'](':');return{'group':_0x356cb[0x0],'id':_0x356cb[0x1],'part':_0x356cb[0x2]};}class ut extends _0x343473{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x56b737,_0x2ef600)=>{if(!_0x2ef600['options']['showCommentHighlights'])return null;if(_0x2ef600['options']['ignoreResolvedComments']){const {id:_0x12e0bf}=ft(_0x56b737['markerName']),_0x437609=this['editor']['plugins']['get'](o);if(_0x437609['getCommentThread'](_0x12e0bf)?.['isResolved']&&_0x56b737['item'])return _0x2ef600['consumable']['consume'](_0x56b737['item'],'addMarker:'+_0x56b737['markerName']),_0x2ef600['consumable']['consume'](_0x56b737['item'],'removeMarker:'+_0x56b737['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4a964a=>{_0x4a964a['on']('addMarker:comment',(_0x51cf62,_0x2b63d6,_0x24f45a)=>{if(!_0x24f45a['options']['showCommentHighlights'])return;const _0x3b1ed1=_0x2b63d6['item'];if(!_0x3b1ed1)return;const _0x28b45d=_0x24f45a['mapper']['toViewElement'](_0x3b1ed1);this['editor']['model']['schema']['isObject'](_0x3b1ed1)&&_0x28b45d&&!_0x28b45d['getCustomProperty']('widget')&&_0x28b45d['is']('containerElement')&&_0x3f33bd(_0x28b45d,_0x24f45a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4649ea,{writer:_0x27960c,options:_0x58effe})=>{if(!_0x58effe['showCommentHighlights'])return null;const _0x5d0f86=_0x27960c['createContainerElement']('div'),_0x95c253=_0x27960c['createEmptyElement']('hr');return _0x27960c['addClass']('ck-horizontal-line',_0x5d0f86),_0x27960c['insert'](_0x27960c['createPositionAt'](_0x5d0f86,0x0),_0x95c253),_0x5d0f86;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x26f6df,{writer:_0x25c78b,options:_0x3a98a0})=>{if(!_0x3a98a0['showCommentHighlights'])return null;const _0x4e10f2=_0x25c78b['createContainerElement']('span'),_0x3b09e6=_0x25c78b['createEmptyElement']('img');return _0x25c78b['addClass']('image-inline',_0x4e10f2),_0x25c78b['insert'](_0x25c78b['createPositionAt'](_0x4e10f2,0x0),_0x3b09e6),_0x4e10f2;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x55b0b9,{writer:_0x141bb8,options:_0x14d619})=>{if(_0x14d619['showCommentHighlights'])return _0x141bb8['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x31761c,_0x232f97,_0x1055ef)=>{_0x1055ef['options']['showCommentHighlights']&&_0x31761c['stop']();},{'priority':'high'});}}class r extends _0x343473{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5aec11){super(_0x5aec11),this['set']('isThreadsLoadingPaused',!0x0),_0x5aec11['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x552c35,_0x547ae8,_0x4ca59a,_0x58e641)=>{const _0x2f8a6a=_0x5aec11['plugins']['get'](o),_0x3538e0=_0x4ca59a?ft(_0x4ca59a)['id']:null;_0x5aec11['model']['change'](()=>{if(_0x3538e0){const _0x34bc30=this['getAllMarkersForId'](_0x3538e0);for(const _0x1c487e of _0x34bc30)_0x5aec11['editing']['reconvertMarker'](_0x1c487e);}if(_0x58e641){const {id:_0x5116e7}=ft(_0x58e641),_0x38c1da=_0x2f8a6a['getCommentThread'](_0x5116e7);if(_0x38c1da&&_0x38c1da['unlinkedAt'])return;if(_0x38c1da&&!_0x38c1da['isAttached'])return;const _0x59edd7=this['getAllMarkersForId'](_0x5116e7);for(const _0x40991d of _0x59edd7)_0x5aec11['editing']['reconvertMarker'](_0x40991d);}}),_0x3538e0&&this['scrollToThreadMarker'](_0x3538e0);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3eddfc=this['editor'],_0x2db571=_0x3eddfc['plugins']['get'](o),_0x193224=_0x3eddfc['config']['get']('collaboration.channelId'),_0x4b89d8=_0x2db571['getCommentThreads']()['filter'](_0x1d3de4=>_0x1d3de4['channelId']!==_0x193224);_0x3eddfc['commands']['add']('addCommentThread',new ot(_0x3eddfc)),this['listenTo'](_0x3eddfc,'change:isReadOnly',(_0x22f244,_0x40880d,_0x10e29f)=>{_0x2db571['switchReadOnly'](_0x10e29f,_0x3eddfc['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2db571,dt('addCommentThread',_0x193224),(_0x2f003e,{threadId:_0x552a52})=>{const _0x592260=this['editor']['plugins']['get'](o)['getCommentThread'](_0x552a52);_0x592260?.['unlinkedAt']&&this['_attachArchivedThread'](_0x552a52);}),this['listenTo'](_0x2db571,dt('removeCommentThread',_0x193224),(_0x5a74a8,{threadId:_0x3822bd})=>{_0x3eddfc['model']['enqueueChange']({'isUndoable':!0x1},_0x3bdd87=>{const _0x26fc03=this['getAllMarkersForId'](_0x3822bd);for(const _0x1c8b7b of _0x26fc03)_0x3bdd87['removeMarker'](_0x1c8b7b);});}),this['listenTo'](_0x2db571,dt('resolveCommentThread',_0x193224),(_0x3f7933,{threadId:_0x332520})=>{(this['_reconvertMarkers'](_0x332520),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x332520)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2db571,dt('reopenCommentThread',_0x193224),(_0x17c2c3,{threadId:_0x4fc257})=>{this['_reconvertMarkers'](_0x4fc257);},{'priority':'low'}),this['listenTo'](_0x2db571,dt('addComment',_0x193224),(_0x151664,{threadId:_0x12e2c7,isFromAdapter:_0x28f087})=>{const _0x5e1966=this['getAllMarkersForId'](_0x12e2c7);if(_0x28f087||0x0==_0x5e1966['length']||!_0x2db571['hasCommentThread'](_0x12e2c7))return;0x1===_0x2db571['getCommentThread'](_0x12e2c7)['length']&&_0x3eddfc['model']['enqueueChange']({'isUndoable':!0x1},_0x29329a=>{for(const _0x34640f of _0x5e1966)_0x29329a['updateMarker'](_0x34640f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4b89d8);}['afterInit'](){!async function(_0x4fe172){const _0x5d5d27=_0x4af555([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x3aa2e4=0x73460ab3,_0x386887=0x7341799b^_0x3aa2e4,_0xdd1c39=window[_0x4af555([0x44,0x61,0x74,0x65])][_0x4af555([0x6e,0x6f,0x77])](),_0x44b4bc=_0x4fe172[_0x4af555([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x218280=new window[(_0x4af555([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x203409=>{_0x44b4bc[_0x4af555([0x6f,0x6e,0x63,0x65])](_0x4af555([0x72,0x65,0x61,0x64,0x79]),_0x203409);}),_0x15a0e1={[_0x4af555([0x6b,0x74,0x79])]:_0x4af555([0x45,0x43]),[_0x4af555([0x75,0x73,0x65])]:_0x4af555([0x73,0x69,0x67]),[_0x4af555([0x63,0x72,0x76])]:_0x4af555([0x50,0x2d,0x32,0x35,0x36]),[_0x4af555([0x78])]:_0x4af555([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]),[_0x4af555([0x79])]:_0x4af555([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]),[_0x4af555([0x61,0x6c,0x67])]:_0x4af555([0x45,0x53,0x32,0x35,0x36])},_0x1f00f1=_0x44b4bc[_0x4af555([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4af555([0x67,0x65,0x74])](_0x4af555([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x567de2(){let _0x405437,_0x38a9c8=null,_0x21e9c6=null;try{if(_0x1f00f1==_0x4af555([0x47,0x50,0x4c]))return _0x4af555([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x405437=_0x23c04e(),!_0x405437)return _0x4af555([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x405437[_0x4af555([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x21e9c6=_0x201311(_0x405437[_0x4af555([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x405437[_0x4af555([0x6a,0x74,0x69])])),await _0x558672()?_0x56fe92()?_0x1a8aa7()?_0x4af555([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x19a21c()?(_0x405437[_0x4af555([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4af555([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x38a9c8=_0x3cb2ef(_0x4af555([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x405437[_0x4af555([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4af555([0x74,0x72,0x69,0x61,0x6c])&&(_0x38a9c8=_0x3cb2ef(_0x4af555([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x22ca8f()):_0x4af555([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4af555([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4af555([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4af555([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1a8aa7(){const _0x3553ff=[_0x4af555([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4af555([0x74,0x72,0x69,0x61,0x6c])][_0x4af555([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x405437[_0x4af555([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xdd1c39/0x3e8:0xe10*_0x386887;return _0x405437[_0x4af555([0x65,0x78,0x70])]<_0x3553ff;}function _0x56fe92(){const _0x59e556=_0x405437[_0x4af555([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x59e556)return!0x1;if(_0x59e556[_0x4af555([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4af555([0x2a])))return!0x0;if(_0x59e556[_0x4af555([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4af555([0x43,0x4d,0x54])))return!0x0;if(_0x59e556[_0x4af555([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4af555([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x403550())return!0x0;if(_0x59e556[_0x4af555([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4af555([0x52,0x43,0x4d,0x54]))){if(_0x1d5efd())return!0x0;if(_0x3acc2a()||_0xf0d95d())return!0x0;}return!0x1;}function _0x19a21c(){const _0x19e623=_0x405437[_0x4af555([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x19e623||0x0==_0x19e623[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5be232}=new URL(window[_0x4af555([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x19e623[_0x4af555([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5be232))return!0x0;const _0x4e20c7=_0x5be232[_0x4af555([0x73,0x70,0x6c,0x69,0x74])](_0x4af555([0x2e]));return _0x19e623[_0x4af555([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2e21ba=>_0x2e21ba[_0x4af555([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4af555([0x2a])))[_0x4af555([0x6d,0x61,0x70])](_0x3954c3=>_0x3954c3[_0x4af555([0x73,0x70,0x6c,0x69,0x74])](_0x4af555([0x2e])))[_0x4af555([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x32ed0b=>_0x32ed0b[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4e20c7[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4af555([0x6d,0x61,0x70])](_0x519393=>Array(_0x4e20c7[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x519393[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4af555([0x66,0x69,0x6c,0x6c])](_0x519393[0x0]===_0x4af555([0x2a])?_0x4af555([0x2a]):'')[_0x4af555([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x519393))[_0x4af555([0x73,0x6f,0x6d,0x65])](_0x228fe0=>_0x4e20c7[_0x4af555([0x65,0x76,0x65,0x72,0x79])]((_0x27b240,_0x381cda)=>_0x228fe0[_0x381cda]===_0x27b240||_0x228fe0[_0x381cda]===_0x4af555([0x2a])));}function _0x22ca8f(){return _0x38a9c8&&_0x21e9c6?new window[(_0x4af555([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3a4c47,_0xcffa0a)=>{_0x38a9c8[_0x4af555([0x74,0x68,0x65,0x6e])](_0x3a4c47,_0xcffa0a),_0x21e9c6[_0x4af555([0x74,0x68,0x65,0x6e])](_0x5dbd9d=>{_0x5dbd9d!=_0x4af555([0x56,0x61,0x6c,0x69,0x64])&&_0x3a4c47(_0x5dbd9d);},_0xcffa0a);}):_0x38a9c8||_0x21e9c6||_0x4af555([0x56,0x61,0x6c,0x69,0x64]);}}function _0x201311(_0xc372a1,_0x308f17){return new window[(_0x4af555([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9fbf1b=>{if(_0x4e56bc())return _0x9fbf1b(_0x4af555([0x56,0x61,0x6c,0x69,0x64]));_0x3f9029(),_0x44b4bc[_0x4af555([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4af555([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4b2ca0=!0x1;const _0x5eb1f7=_0x54b8c0();function _0x7aa8a8(_0x14061a){return!!_0x14061a&&(typeof _0x14061a===_0x4af555([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x14061a===_0x4af555([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x14061a[_0x4af555([0x74,0x68,0x65,0x6e])]===_0x4af555([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x14061a[_0x4af555([0x63,0x61,0x74,0x63,0x68])]===_0x4af555([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1063ca(_0x4c612f){_0x1c0a98(_0x4c612f)[_0x4af555([0x74,0x68,0x65,0x6e])](_0x2d7f04=>{if(!_0x2d7f04||_0x2d7f04[_0x4af555([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4af555([0x6f,0x6b]))return _0x4af555([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xb1a7fc(_0x498e3d(_0x5eb1f7+_0x308f17))!=_0x2d7f04[_0x4af555([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4af555([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4af555([0x56,0x61,0x6c,0x69,0x64]);})[_0x4af555([0x74,0x68,0x65,0x6e])](_0x174f5e=>(_0x4dc63b(),_0x174f5e),()=>{const _0x2a1369=_0x15a656();return null==_0x2a1369?(_0x4dc63b(),_0x4af555([0x56,0x61,0x6c,0x69,0x64])):_0x4af555(_0xdd1c39-_0x2a1369>(0x574a8eb3^_0x3aa2e4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4af555([0x74,0x68,0x65,0x6e])](_0x9fbf1b)[_0x4af555([0x63,0x61,0x74,0x63,0x68])](()=>{_0x9fbf1b(_0x4af555([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x2dda01=0x7370e433^_0x3aa2e4;function _0x4dc63b(){const _0x348baa=_0x4af555([0x6c,0x6c,0x63,0x74,0x2d])+_0xb1a7fc(_0x498e3d(_0xc372a1)),_0x5b27f6=_0x248003(_0xb1a7fc(window[_0x4af555([0x4d,0x61,0x74,0x68])][_0x4af555([0x63,0x65,0x69,0x6c])](_0xdd1c39/_0x2dda01)));window[_0x4af555([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4af555([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x348baa,_0x5b27f6);}function _0x15a656(){const _0x147024=_0x4af555([0x6c,0x6c,0x63,0x74,0x2d])+_0xb1a7fc(_0x498e3d(_0xc372a1)),_0x30d4b4=window[_0x4af555([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4af555([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x147024);return _0x30d4b4?window[_0x4af555([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x248003(_0x30d4b4),0x10)*_0x2dda01:null;}function _0x1c0a98(_0x17c2ed){return new window[(_0x4af555([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1a5c4b,_0x26786e)=>{_0x17c2ed[_0x4af555([0x74,0x68,0x65,0x6e])](_0x1a5c4b,_0x26786e),window[_0x4af555([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x26786e,0x7347de73^_0x3aa2e4);});}}_0x44b4bc[_0x4af555([0x6f,0x6e])](_0x4af555([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x789bbe,_0x4a1cbe)=>{if(_0x4a1cbe[0x0]!=_0xc372a1)return _0x9fbf1b(_0x4af555([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4a1cbe[0x1]={..._0x4a1cbe[0x1],[_0x4af555([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x5eb1f7};},{[_0x4af555([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4af555([0x68,0x69,0x67,0x68])}),_0x44b4bc[_0x4af555([0x6f,0x6e])](_0x4af555([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x67a6d=>{_0x7aa8a8(_0x67a6d[_0x4af555([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4b2ca0=!0x0,_0x1063ca(_0x67a6d[_0x4af555([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4af555([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4af555([0x6c,0x6f,0x77])}),_0x218280[_0x4af555([0x74,0x68,0x65,0x6e])](()=>{_0x4b2ca0||_0x9fbf1b(_0x4af555([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4e56bc(){return _0x44b4bc[_0x4af555([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4af555([0x76,0x69,0x65,0x77])][_0x4af555([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4af555([0x61,0x75,0x74,0x6f]);}function _0x3f9029(){_0x44b4bc[_0x4af555([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4af555([0x76,0x69,0x65,0x77])][_0x4af555([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4af555([0x61,0x75,0x74,0x6f]);}}function _0x3cb2ef(_0x33a239){const _0x9cd135=[new window[(_0x4af555([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ed8b7=>setTimeout(_0x2ed8b7,0x734f347f^_0x3aa2e4)),_0x218280[_0x4af555([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4af555([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2a3961=>{let _0x471bff=0x0;_0x44b4bc[_0x4af555([0x6d,0x6f,0x64,0x65,0x6c])][_0x4af555([0x6f,0x6e])](_0x4af555([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1c1b8d,_0x4675f5)=>{_0x4675f5[0x0][_0x4af555([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x471bff++,_0x471bff==(0x73460b4b^_0x3aa2e4)&&(_0x2a3961(),_0x1c1b8d[_0x4af555([0x6f,0x66,0x66])]());});}))];return window[_0x4af555([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4af555([0x72,0x61,0x63,0x65])](_0x9cd135)[_0x4af555([0x74,0x68,0x65,0x6e])](()=>_0x33a239);}async function _0x4e8997(){await _0x218280,_0x44b4bc[_0x4af555([0x6d,0x6f,0x64,0x65,0x6c])][_0x4af555([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2f5e27,_0x44b4bc[_0x4af555([0x6d,0x6f,0x64,0x65,0x6c])][_0x4af555([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2f5e27,_0x44b4bc[_0x4af555([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4af555([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x403550(){return window[_0x4af555([0x67,0x6c,0x6f,0x62])]&&window[_0x4af555([0x67,0x6c,0x6f,0x62])][_0x4af555([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1d5efd(){return _0x101990(_0x4af555([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xb6e152(_0x4af555([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4af555([0x73,0x74,0x61,0x74,0x65])]==_0x4af555([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3acc2a(){return _0x101990(_0x4af555([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 _0xf0d95d(){return _0x101990(_0x4af555([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4153a1(_0x22a434){const _0xb2624f=_0x2861ce();_0x44b4bc[_0xb2624f]=_0x4af555([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x22a434,_0x22a434!=_0x4af555([0x56,0x61,0x6c,0x69,0x64])&&_0x4e8997();}function _0x2861ce(){const _0x2f7cdc=window[_0x4af555([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4af555([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4af555([0x6e,0x6f,0x77])]())[_0x4af555([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4af555([0x2e]),'');let _0x2b765c=_0x4af555([0x4b]);for(let _0x13ffd1=0x0;_0x13ffd1<_0x2f7cdc[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x13ffd1+=0x2){let _0x32c69b=window[_0x4af555([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2f7cdc[_0x4af555([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x13ffd1,_0x13ffd1+0x2));_0x32c69b>=_0x5d5d27[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x32c69b-=_0x5d5d27[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2b765c+=_0x5d5d27[_0x32c69b];}return _0x2b765c;}function _0x23c04e(){const _0x39b019=_0x1f00f1[_0x4af555([0x73,0x70,0x6c,0x69,0x74])](_0x4af555([0x2e]));if(0x3!=_0x39b019[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0xa139de(_0x39b019[0x1]);function _0xa139de(_0x5e64b0){const _0xa70229=_0x40b223(_0x5e64b0);return _0xa70229&&_0x3579a5()?_0xa70229:null;function _0x3579a5(){const _0xb7f3c0=_0xa70229[_0x4af555([0x6a,0x74,0x69])],_0x1a6dc2=window[_0x4af555([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb7f3c0[_0x4af555([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xb7f3c0[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x47b571={..._0xa70229,[_0x4af555([0x6a,0x74,0x69])]:_0xb7f3c0[_0x4af555([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xb7f3c0[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x47b571[_0x4af555([0x76,0x63])],_0x498e3d(_0x47b571)==_0x1a6dc2;}}}async function _0x558672(){let _0x5d1f07=!0x0;try{const _0x4c739a=_0x1f00f1[_0x4af555([0x73,0x70,0x6c,0x69,0x74])](_0x4af555([0x2e])),[_0x18cabf,_0x8d65c5,_0x38c6f3]=_0x4c739a;return _0x4d6286(_0x18cabf),await _0x20fd22(_0x18cabf,_0x8d65c5,_0x38c6f3),_0x5d1f07;}catch{return!0x1;}function _0x4d6286(_0x4dc2ef){const _0x22bdf9=_0x40b223(_0x4dc2ef);_0x22bdf9&&_0x22bdf9[_0x4af555([0x61,0x6c,0x67])]==_0x4af555([0x45,0x53,0x32,0x35,0x36])||(_0x5d1f07=!0x1);}async function _0x20fd22(_0x1d60d9,_0x4307a9,_0x1fb146){const _0x576d76=window[_0x4af555([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4af555([0x66,0x72,0x6f,0x6d])](_0x35907c(_0x1fb146),_0x4eea29=>_0x4eea29[_0x4af555([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x103042=new window[(_0x4af555([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4af555([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1d60d9+_0x4af555([0x2e])+_0x4307a9),_0x25f272=window[_0x4af555([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4af555([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x25f272)return;const _0x5c2763=await _0x25f272[_0x4af555([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4af555([0x6a,0x77,0x6b]),_0x15a0e1,{[_0x4af555([0x6e,0x61,0x6d,0x65])]:_0x4af555([0x45,0x43,0x44,0x53,0x41]),[_0x4af555([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4af555([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4af555([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x25f272[_0x4af555([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4af555([0x6e,0x61,0x6d,0x65])]:_0x4af555([0x45,0x43,0x44,0x53,0x41]),[_0x4af555([0x68,0x61,0x73,0x68])]:{[_0x4af555([0x6e,0x61,0x6d,0x65])]:_0x4af555([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5c2763,_0x576d76,_0x103042)||(_0x5d1f07=!0x1);}}function _0x40b223(_0x19b490){return _0x19b490[_0x4af555([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4af555([0x65,0x79]))?JSON[_0x4af555([0x70,0x61,0x72,0x73,0x65])](_0x35907c(_0x19b490)):null;}function _0x35907c(_0x531559){return window[_0x4af555([0x61,0x74,0x6f,0x62])](_0x531559[_0x4af555([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4af555([0x2b]))[_0x4af555([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4af555([0x2f])));}function _0x498e3d(_0x1154dc){let _0x1d0995=0x1505;function _0x1951bf(_0x40c285){for(let _0x5cfdef=0x0;_0x5cfdef<_0x40c285[_0x4af555([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5cfdef++){const _0x2c66f8=_0x40c285[_0x4af555([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x5cfdef);_0x1d0995=(_0x1d0995<<0x5)+_0x1d0995+_0x2c66f8,_0x1d0995&=_0x1d0995;}}function _0x50aeee(_0x556b3a){Array[_0x4af555([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x556b3a)?_0x556b3a[_0x4af555([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x50aeee):_0x556b3a&&typeof _0x556b3a==_0x4af555([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4af555([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x556b3a)[_0x4af555([0x73,0x6f,0x72,0x74])]()[_0x4af555([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3fb250,_0x4fef4])=>{_0x1951bf(_0x3fb250),_0x50aeee(_0x4fef4);}):_0x1951bf(window[_0x4af555([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x556b3a));}return _0x50aeee(_0x1154dc),_0x1d0995>>>0x0;}function _0xb1a7fc(_0x134ed8){return _0x134ed8[_0x4af555([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4af555([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4af555([0x30]));}function _0x248003(_0x5be5ac){return _0x5be5ac[_0x4af555([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4af555([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4af555([0x6a,0x6f,0x69,0x6e])]('');}function _0x101990(_0x3dc2fc){return _0x44b4bc[_0x4af555([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4af555([0x68,0x61,0x73])](_0x3dc2fc);}function _0xb6e152(_0x594082){return _0x44b4bc[_0x4af555([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4af555([0x67,0x65,0x74])](_0x594082);}function _0x2f5e27(){}function _0x4af555(_0x16e3e5){return _0x16e3e5['map'](_0x3c490e=>String['fromCharCode'](_0x3c490e))['join']('');}_0x4153a1(await _0x567de2());}(this);}['destroy'](){const _0x7d33c2=this['editor']['plugins']['get'](o),_0x362000=this['editor']['config']['get']('collaboration.channelId');for(const _0x13ea50 of _0x7d33c2['getCommentThreads']({'channelId':_0x362000}))_0x7d33c2['_detachCommentThread'](_0x13ea50['id']),_0x7d33c2['_threads']['delete'](_0x13ea50['id']);super['destroy']();}['hasMarkerForId'](_0x1091c0){return this['getAllMarkersForId'](_0x1091c0)['length']>0x0;}['getAllMarkersForId'](_0x9ee8e0){const _0x57ffea=[];for(const _0x374542 of this['editor']['model']['markers'])_0x374542['name']['startsWith']('comment:'+_0x9ee8e0)&&_0x57ffea['push'](_0x374542);return _0x57ffea;}['scrollToThreadMarker'](_0x338660){setTimeout(()=>{const _0xd3cdb5=this['_getTargetForId'](_0x338660);if(!_0xd3cdb5)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x338660&&nt({'target':_0xd3cdb5[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x424b06){this['editor']['model']['change'](()=>{for(const _0x42b585 of this['getAllMarkersForId'](_0x424b06))this['editor']['editing']['reconvertMarker'](_0x42b585);});}['_attachArchivedThread'](_0x1efd3c){const _0x19ec31=this['editor']['plugins']['get'](o),_0x180c6b=this['editor']['plugins']['get'](b),_0x217dd5=_0x19ec31['getCommentThread'](_0x1efd3c);if(!_0x217dd5['isAttached']){const _0xa612eb=_0x217dd5['attachTo'](()=>this['_getTargetForId'](_0x217dd5['id']));_0x180c6b['registerAnnotation'](_0xa612eb),_0x217dd5['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x43b965=this['editor'],_0x5d8bf0=_0x43b965['plugins']['get'](it);_0x43b965['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4f5857,_0xf4ea3d)=>{const {id:_0x516338}=ft(_0x4f5857['markerName']),_0x50f220=_0x43b965['plugins']['get'](o)['getCommentThread'](_0x516338),_0x361aff=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x516338;let _0x37b5cd;if(_0x50f220&&_0x50f220['isResolved']&&!_0x361aff&&_0x4f5857['item'])return _0xf4ea3d['consumable']['consume'](_0x4f5857['item'],'addMarker:'+_0x4f5857['markerName']),_0xf4ea3d['consumable']['consume'](_0x4f5857['item'],'removeMarker:'+_0x4f5857['markerName']),null;const _0x1e5f83=['ck-comment-marker'];return _0x361aff&&_0x1e5f83['push']('ck-comment-marker--active'),_0x37b5cd=_0x50f220?.['length']?_0x50f220['comments']['first']['author']['id']:_0x5d8bf0['me']['id'],{'classes':_0x1e5f83,'attributes':{'data-comment':_0x516338,'data-author-id':_0x37b5cd}};}}),_0x43b965['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4b761c,{options:_0x1dd15c})=>{if(_0x1dd15c['showCommentHighlights'])return null;const _0x4e626a=_0x43b965['plugins']['get'](o),_0x14ffb9=_0x43b965['model']['markers']['get'](_0x4b761c),{id:_0x43f758,part:_0x37468b}=ft(_0x4b761c);return _0x14ffb9&&!_0x14ffb9['affectsData']||_0x1dd15c['ignoreResolvedComments']&&_0x4e626a['getCommentThread'](_0x43f758)?.['isResolved']?null:{'group':'comment','name':_0x37468b?_0x43f758+':'+_0x37468b:_0x43f758};}}),_0x43b965['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5b46b6,{writer:_0x5b817c})=>_0x5b817c['createElement']('$marker',{'data-name':'comment:'+_0x5b46b6['getAttribute']('id')})}),_0x43b965['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x393d78=this['editor'],_0x6a0350=_0x393d78['plugins']['get'](o),_0x46331f=new Set(),_0x2ca8aa=new Set();_0x393d78['model']['document']['registerPostFixer'](_0xbcd6ee=>{let _0x48be5e=!0x1;for(const {name:_0xae44dd,data:_0x1b6a4f}of _0x393d78['model']['document']['differ']['getChangedMarkers']()){const {group:_0x32ca98,id:_0x906970}=ft(_0xae44dd);let _0x5b0273=_0x1b6a4f['newRange'];if('comment'!==_0x32ca98||!_0x5b0273)continue;const _0x19317d='$graveyard'===_0x5b0273['root']['rootName'];_0x19317d||(_0x5b0273=ht(_0x5b0273,_0x393d78['model']),!_0x5b0273||_0x5b0273['isCollapsed']||!_0x1b6a4f['newRange']||_0x5b0273['isEqual'](_0x1b6a4f['newRange']))?_0x393d78['model']['hasContent'](_0x5b0273)&&!_0x19317d?this['isThreadsLoadingPaused']?_0x46331f['add'](_0xae44dd):this['_handleThreadMarker'](_0xae44dd,_0x906970):(_0x2ca8aa['add'](_0xae44dd),_0x46331f['delete'](_0xae44dd),_0xbcd6ee['removeMarker'](_0xae44dd),_0x48be5e=!0x0):(_0xbcd6ee['updateMarker'](_0xae44dd,{'range':_0x5b0273}),_0x48be5e=!0x0);}return _0x48be5e;}),this['on']('change:isThreadsLoadingPaused',(_0x5691b6,_0xdd3a82,_0x542126)=>{if(!_0x542126&&_0x46331f['size'])for(const _0x35d249 of _0x46331f){const {id:_0x5c11b9}=ft(_0x35d249);_0x46331f['delete'](_0x35d249),_0x393d78['model']['markers']['get'](_0x35d249)&&this['_handleThreadMarker'](_0x35d249,_0x5c11b9);}}),this['listenTo'](_0x393d78['model']['document'],'change',()=>{for(const {name:_0x4c44b5,data:{newRange:_0x256289}}of _0x393d78['model']['document']['differ']['getChangedMarkers']()){const {group:_0x50b0e6,id:_0x83e87c}=ft(_0x4c44b5);if('comment'!==_0x50b0e6)continue;const _0x22b6f9=_0x6a0350['getCommentThread'](_0x83e87c),_0x10a21e=this['hasMarkerForId'](_0x83e87c);_0x22b6f9&&(!_0x22b6f9['_hasTargetInContent']&&_0x256289&&_0x393d78['editing']['view']['once']('render',()=>{const _0x4baef5=_0x393d78['plugins']['get'](y),_0xcaeafd=_0x6a0350['_threadToController']['get'](_0x22b6f9)['view'];_0x4baef5['getByInnerView'](_0xcaeafd)['refreshVisibility']();},{'priority':'low'}),_0x22b6f9['_hasTargetInContent']=_0x10a21e||!!_0x256289),_0x256289||(_0x2ca8aa['add'](_0x4c44b5),_0x46331f['delete'](_0x4c44b5));}for(const _0x2a0bcc of _0x2ca8aa){const {id:_0x2fa8f9}=ft(_0x2a0bcc),_0x18cea2=_0x6a0350['getCommentThread'](_0x2fa8f9);if(_0x46331f['delete'](_0x2a0bcc),!_0x18cea2)continue;const _0x5329c4=this['hasMarkerForId'](_0x2fa8f9);_0x5329c4||_0x18cea2['isSubmitted']?_0x5329c4||_0x18cea2['unlinkedAt']||_0x18cea2['setUnlinkedAt'](new Date()):_0x18cea2['remove']();}_0x2ca8aa['clear']();});}['_handleInitialThreads'](_0x2eb995){_0x2eb995['forEach'](_0x21795e=>{_0x21795e['unlinkedAt']&&this['_attachArchivedThread'](_0x21795e['id']);});}['_getTargetForId'](_0x2aff66){const _0x5d6e65=this['editor'],_0x3e274f=this['getAllMarkersForId'](_0x2aff66);return et(_0x5d6e65['editing'],_0x3e274f);}['_getTextContext'](_0x506748){const _0xef54b4=this['getAllMarkersForId'](_0x506748);let _0x523bd8='',_0x1b7c39=!0x1;for(const _0x41efff of _0xef54b4){const _0x4b013b=_0x41efff['getRange']();for(const _0x1a6cba of Array['from'](_0x4b013b['getItems']()))_0x1a6cba['is']('$textProxy')?(_0x523bd8&&_0x1b7c39&&(_0x523bd8+='\x20',_0x1b7c39=!0x1),_0x523bd8+=_0x1a6cba['data']):_0x1b7c39=!0x0;_0x1b7c39=!0x0;}return _0x523bd8['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4a3b6d,_0x474c27){const _0x203818=this['editor'],_0x44f3f4=_0x203818['plugins']['get'](o);let _0x427b9b=_0x44f3f4['getCommentThread'](_0x474c27);const _0x5dbb40=_0x203818['config']['get']('collaboration.channelId'),_0x3b8cf9=_0x203818['plugins']['get'](b);if(_0x427b9b&&(_0x427b9b['unlinkedAt']&&_0x427b9b['setUnlinkedAt'](null),_0x427b9b['isAttached']))return _0x427b9b;return!this['getAllMarkersForId'](_0x474c27)[0x0]['managedUsingOperations']?_0x203818['editing']['view']['once']('render',()=>{if(_0x44f3f4['getCommentThread'](_0x474c27))return;const _0x393eff=_0x203818['plugins']['get'](y);_0x427b9b=_0x44f3f4['openNewCommentThread']({'channelId':_0x5dbb40,'threadId':_0x474c27,'target':()=>this['_getTargetForId'](_0x474c27),'context':{'type':'text','value':this['_getTextContext'](_0x474c27)}});const _0xa8bf28=_0x44f3f4['_threadToController']['get'](_0x427b9b)['view'],_0x3b4ab3=_0x393eff['getByInnerView'](_0xa8bf28);_0x3b4ab3&&_0x3b8cf9['registerAnnotation'](_0x3b4ab3);},{'priority':'low'}):_0x44f3f4['fetchCommentThread']({'channelId':_0x5dbb40,'threadId':_0x474c27})['then'](_0x4a68e0=>{if('destroyed'!==_0x203818['state']){if(_0x427b9b=_0x4a68e0,_0x427b9b&&!_0x427b9b['isAttached']){const _0x5bb0cf=_0x427b9b['attachTo'](()=>this['_getTargetForId'](_0x474c27));_0x3b8cf9['registerAnnotation'](_0x5bb0cf),_0x427b9b['isResolved']&&this['_reconvertMarkers'](_0x474c27);}else{if(!_0x427b9b){const _0x320fc9=this['getAllMarkersForId'](_0x474c27);_0x203818['model']['change'](_0x1ee403=>{for(const _0x248198 of _0x320fc9)_0x1ee403['removeMarker'](_0x248198);});}}}}),_0x427b9b;}['_handleThreadMarker'](_0xe2c5ea,_0x350336){const _0x17e052=this['_attachMarkerToThread'](_0xe2c5ea,_0x350336);_0x17e052&&!_0x17e052['context']&&_0x17e052['setContext']({'type':'text','value':this['_getTextContext'](_0x350336)});}['_initAriaMarkerChangeAnnouncements'](){const _0x26e5ad=this['editor'];rt(_0x26e5ad['model'],({left:_0x5b69cf,entered:_0x3b1c6a})=>{for(const _0x5b8139 of _0x5b69cf)if(mt(_0x5b8139)){_0x26e5ad['ui']['ariaLiveAnnouncer']['announce'](N(_0x26e5ad['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5b1aee of _0x3b1c6a)if(mt(_0x5b1aee)){_0x26e5ad['ui']['ariaLiveAnnouncer']['announce'](N(_0x26e5ad['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x19c6b5)));break;}});}}function dt(_0x5ad189,_0x38f50f){return _0x38f50f?_0x5ad189+':'+_0x38f50f:_0x5ad189;}function ht(_0x1b3271,_0xa735f0){const _0x2b5677=_0xa735f0['schema'],_0x3153e8=_0xa735f0['createRange'](_0x1b3271['start']);for(const _0x52ca4a of _0x1b3271['getWalker']()){const {type:_0x5ea735,item:_0x3ce121,nextPosition:_0x48e53a}=_0x52ca4a;if('text'===_0x5ea735||_0x2b5677['isObject'](_0x3ce121)){const _0x3a7dc2=_0xa735f0['createPositionBefore'](_0x3ce121);_0x3153e8['isCollapsed']&&(_0x3153e8['start']=_0x3a7dc2),_0x3153e8['end']=_0x48e53a;}}return _0x3153e8;}function mt(_0x5bc31e){return'comment'===ft(_0x5bc31e['name'])['group'];}class s extends _0x343473{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x16bf7c=this['editor'],_0x3a79b3=_0x16bf7c['plugins']['get'](o),_0x3ccedd=_0x16bf7c['plugins']['get'](r),_0x57f8d4=_0x16bf7c['plugins']['get'](y),_0x2a702e=_0x16bf7c['plugins']['get'](b);_0x16bf7c['ui']['componentFactory']['add']('comment',()=>{const _0x56952b=this['_createUIButton'](_0x2a8d4c);return _0x56952b['tooltip']=!0x0,_0x56952b;}),_0x16bf7c['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2d277e)),_0x2a702e['addSourceCollector'](()=>{const _0x3782b0=[];for(const [_0x142a97,_0x85f6a]of _0x3a79b3['_threadToController']){const _0x4295be=_0x3ccedd['getAllMarkersForId'](_0x142a97['id']),_0x3f81e9=_0x4295be['map'](_0x5cb718=>_0x5cb718['getRange']());_0x4295be['length']>0x0&&_0x3782b0['push']([_0x85f6a['view'],_0x3f81e9]);}return _0x3782b0;}),this['listenTo'](_0x57f8d4,'change:activeAnnotations',(_0x4eab76,_0x42141c,_0x4a2c1a)=>{const _0x5e53f0=Array['from'](_0x4a2c1a)['map'](_0x45b2fd=>_0x45b2fd['innerView'])['find'](_0x1d9c78=>_0x3a79b3['_viewToController']['has'](_0x1d9c78));if(!_0x5e53f0)return void(_0x3ccedd['activeMarker']=null);const _0x263291=_0x3a79b3['_viewToController']['get'](_0x5e53f0)['model']['id'],_0x4c1c35='comment:'+_0x263291;_0x263291&&_0x3ccedd['hasMarkerForId'](_0x263291)?_0x3ccedd['activeMarker']=_0x4c1c35:_0x3ccedd['activeMarker']&&(_0x3ccedd['activeMarker']=null);}),this['listenTo'](_0x3a79b3,'removeCommentThread',(_0x20864b,{threadId:_0x2bfa8b,isFromAdapter:_0x38ecff})=>{!_0x38ecff&&_0x16bf7c['ui']['focusTracker']['isFocused']&&_0x3ccedd['hasMarkerForId'](_0x2bfa8b)&&_0x16bf7c['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3a79b3,'addComment',(_0x400bfe,{threadId:_0x13ac22,isFromAdapter:_0x11718e})=>{if(_0x11718e||!_0x3ccedd['hasMarkerForId'](_0x13ac22)||!_0x3a79b3['hasCommentThread'](_0x13ac22))return;0x1===_0x3a79b3['getCommentThread'](_0x13ac22)['length']&&(_0x16bf7c['editing']['view']['focus'](),_0x400bfe['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4e3156=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x59aac2;for(const _0x319bc7 in _0x4e3156){const _0x29c571=_0x319bc7,_0x2ddb27=_0x4e3156[_0x29c571];if('commentsLicenseKeyValid'==_0x2ddb27||'commentsLicenseKeyInvalid'==_0x2ddb27||'commentsLicenseKeyExpired'==_0x2ddb27||'commentsLicenseKeyDomainLimit'==_0x2ddb27||'commentsLicenseKeyNotAllowed'==_0x2ddb27||'commentsLicenseKeyEvaluationLimit'==_0x2ddb27||'commentsLicenseKeyTrialLimit'==_0x2ddb27||'commentsLicenseKeyUsageLimit'==_0x2ddb27){delete _0x4e3156[_0x29c571],_0x59aac2=_0x2ddb27,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x59aac2&&_0x4e3156['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x59aac2&&_0x4e3156['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x59aac2&&_0x4e3156['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x59aac2&&_0x4e3156['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x59aac2&&_0x4e3156['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x59aac2&&_0x4e3156['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x59aac2&&_0x4e3156['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x770f80){const _0x3da207=this['editor'],_0x4c2654=new _0x770f80(_0x3da207['locale']),_0x36d1f2=_0x3da207['commands']['get']('addCommentThread');return _0x4c2654['set']({'label':N(_0x3da207['locale'],'Comment'),'icon':_0x19095f}),_0x4c2654['bind']('isEnabled')['to'](_0x36d1f2,'hasContent'),this['listenTo'](_0x4c2654,'execute',()=>{_0x36d1f2['execute']();}),_0x4c2654;}}class i extends _0x343473{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5531bc){super(_0x5531bc),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x47809d,_0x2429f2,_0x52c6ae)=>{_0x52c6ae?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2baf11,_0x1d2ccb]of this['editor']['commands'])_0x1d2ccb['affectsData']&&'addCommentThread'!==_0x2baf11&&_0x1d2ccb['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 _0x3ff588=this['editor']['editing']['view']['document'];this['listenTo'](_0x3ff588,'cut',_0x4aa7d3=>_0x4aa7d3['stop'](),{'priority':'highest'}),this['listenTo'](_0x3ff588,'clipboardInput',_0x58cc95=>_0x58cc95['stop'](),{'priority':'highest'}),this['listenTo'](_0x3ff588,'delete',_0x34e36d=>_0x34e36d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x1e74fd,_0x207bf1]of this['editor']['commands'])_0x207bf1['affectsData']&&'addCommentThread'!==_0x1e74fd&&_0x207bf1['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 j extends _0x45882f{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5ea33d){super(_0x5ea33d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x2bcce7=this['context']['plugins']['get'](y);this['listenTo'](_0x2bcce7,'_activateAnnotation',(_0x284a95,_0x396f62)=>{for(const _0x306a8f of this['activeUIs']){const _0x432590=this['_uis']['get'](_0x306a8f);(0x0,this['uisData']['get'](_0x306a8f)['filter'])(_0x396f62)&&_0x432590['setActiveAnnotation'](_0x396f62);}}),this['listenTo'](_0x2bcce7,'_deactivateAllAnnotations',()=>{for(const _0x506485 of this['activeUIs']){this['_uis']['get'](_0x506485)['setActiveAnnotation'](null);}}),this['listenTo'](_0x2bcce7['_visibleAnnotations'],'add',(_0x67fa4e,_0x27da9b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x27da9b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x32f799){return this['activeUIs']['has'](_0x32f799);}['activate'](_0xe14e54,_0x23b557=this['defaultFilter']){const _0x5ce816=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0xe14e54))throw new _0x3a839e('annotationsuis-missing-ui',this,{'uiName':_0xe14e54});this['isActive'](_0xe14e54)&&this['deactivate'](_0xe14e54),this['activeUIs']['add'](_0xe14e54);const _0x26cc90=new S();v({'source':_0x5ce816['_visibleAnnotations'],'target':_0x26cc90,'filter':_0x23b557}),this['uisData']['set'](_0xe14e54,{'collection':_0x26cc90,'filter':_0x23b557});const _0x55564a=this['_uis']['get'](_0xe14e54);_0x55564a['attach'](_0x26cc90),this['listenTo'](_0x55564a,'change:activeAnnotation',(_0xfd6171,_0x4d9b4e,_0x30aef7,_0x29b79a)=>{_0x29b79a&&_0x5ce816['_removeActiveAnnotation'](_0x29b79a),_0x30aef7&&_0x5ce816['_addActiveAnnotation'](_0x30aef7);});}['deactivate'](_0x2ccd35){if(this['activeUIs']['delete'](_0x2ccd35),!this['_uis']['has'](_0x2ccd35))throw new _0x3a839e('annotationsuis-missing-ui',this,{'uiName':_0x2ccd35});const _0x3e16a7=this['_uis']['get'](_0x2ccd35);_0x3e16a7['detach'](),this['stopListening'](_0x3e16a7),this['uisData']['get'](_0x2ccd35)['collection']['destroy'](),this['uisData']['delete'](_0x2ccd35);}['switchTo'](_0x44f8e0){if(!this['_uis']['has'](_0x44f8e0))throw new _0x3a839e('annotationsuis-missing-ui',this,{'uiName':_0x44f8e0});const _0x4784c1=this['context']['plugins']['get'](y),_0x4c6cc4=Array['from'](_0x4784c1['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x44f8e0);const _0x59d17e=this['_uis']['get'](_0x44f8e0);_0x59d17e['setActiveAnnotation'](_0x4c6cc4),_0x59d17e['_setSelectedAnnotations']&&_0x4c6cc4&&_0x59d17e['_setSelectedAnnotations']([_0x4c6cc4]);}['deactivateAll'](){for(const _0x4b9245 of this['activeUIs'])this['deactivate'](_0x4b9245);}['register'](_0x526707,_0x51dbee){if(this['_uis']['has'](_0x526707))throw new _0x3a839e('annotationsuis-register-already-registered');if('function'!=typeof _0x51dbee['attach']||'function'!=typeof _0x51dbee['detach']||'function'!=typeof _0x51dbee['setActiveAnnotation'])throw new _0x3a839e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x526707,_0x51dbee);}['refilterAnnotations'](){const _0x34b57a=this['context']['plugins']['get'](y)['collection'],_0xa69d99=new Map(),_0x50f607=Array['from'](this['activeUIs']);for(const _0x54f9bc of this['activeUIs']){const _0x2fed46=this['uisData']['get'](_0x54f9bc)['collection'];for(const _0x66c089 of _0x2fed46)_0xa69d99['set'](_0x66c089,_0x54f9bc);}for(const _0x5a500d of _0x34b57a){const _0x11aa27=_0xa69d99['get'](_0x5a500d);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5a500d);const _0x5d5cd3=_0x50f607['find'](_0x450f83=>this['uisData']['get'](_0x450f83)['filter'](_0x5a500d));_0x11aa27!==_0x5d5cd3&&(_0x11aa27&&this['uisData']['get'](_0x11aa27)['collection']['remove'](_0x5a500d),_0x5d5cd3&&this['uisData']['get'](_0x5d5cd3)['collection']['add'](_0x5a500d));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x7dbc8c){const _0xafaafc=[];for(const _0xe3298d of this['activeUIs']){(0x0,this['uisData']['get'](_0xe3298d)['filter'])(_0x7dbc8c)&&_0xafaafc['push'](_0xe3298d);}if(_0xafaafc['length']>0x1)throw new _0x3a839e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xafaafc,'annotationType':_0x7dbc8c['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5e652c){super(_0x5e652c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x118e73,_0x208578)=>_0x118e73+_0x208578),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x3707e7=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x3707e7['to']('isAnimationDisabled',_0x29cd8c=>_0x29cd8c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x3707e7['to']('top',_0x1685bd=>Ot(_0x1685bd))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1c609e=this['element']['clientHeight'];_0x1c609e&&(this['height']=_0x1c609e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x45882f{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x248496){super(_0x248496),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 _0x55ae6c=this['context']['config']['get']('sidebar.container');_0x55ae6c&&this['setContainer'](_0x55ae6c);}['setContainer'](_0x1fc517){if(!g(_0x1fc517))throw new _0x3a839e('sidebar-setcontainer-invalid-element');this['container']=_0x1fc517;}['_attachToContainer']({viewClass:_0x2630e8='',spaceBetweenItems:_0x1a2fd7=0x19}={}){if(!g(this['container']))throw new _0x3a839e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2630e8,this['_spaceBetweenItems']=_0x1a2fd7;}['rearrange']({removedAnnotation:_0x1bd947,previousAnnotation:_0x3dc825,nextAnnotation:_0x4f8f9f}){const _0x45bdf4=this['getSidebarItemView'](_0x1bd947);this['view']['list']['remove'](_0x45bdf4),this['_destroySidebarItemView'](_0x1bd947),_0x3dc825&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3dc825)),_0x4f8f9f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4f8f9f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x430022,activatedAnnotation:_0x3d6190,disableAnimationOnActivatedAnnotation:_0x4eb206}){if(this['_activeAnnotation']=_0x3d6190,_0x430022){_0x430022['isActive']=!0x1;const _0x50aac0=this['getSidebarItemView'](_0x430022);_0x50aac0&&_0x4eb206&&(_0x50aac0['isAnimationDisabled']=!0x1);}if(_0x3d6190){const _0x164121=this['getSidebarItemView'](_0x3d6190);_0x164121&&(_0x3d6190['isActive']=!0x0,_0x4eb206&&(_0x164121['isAnimationDisabled']=!0x0,_0x164121['top']+=0x1),this['_alignToTargetRect'](_0x164121));}}['_detachFromContainer'](_0x42a99f){if(this['view']['element']['remove'](),_0x42a99f){for(const _0x37b028 of _0x42a99f)this['_destroySidebarItemView'](_0x37b028);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x33161b,_0x48012c){_0x48012c||(_0x48012c=_0x33161b['view']);const _0x584f13=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x584f13,_0x33161b),this['_annotationToSidebarItemView']['set'](_0x33161b,_0x584f13),_0x584f13['content']['add'](_0x48012c),this['listenTo'](_0x33161b['view'],'change:targetRect',(_0x4c5ce9,_0x1bc705,_0x3af2cc)=>{const _0x13fa95=this['_getTargetTop'](_0x33161b,_0x3af2cc);_0x584f13['_targetTop']!=_0x13fa95&&(_0x584f13['_targetTop']=_0x13fa95,this['_setItemTop'](_0x584f13,_0x13fa95));}),this['listenTo'](_0x584f13,'change:top',()=>{this['_recalculate'](_0x584f13,'top');}),this['listenTo'](_0x584f13,'change:bottom',()=>{this['_recalculate'](_0x584f13,'bottom');}),this['_alignToTargetRect'](_0x584f13);const _0x2c8302=this['_getItemBefore'](_0x584f13);if(_0x2c8302)this['_alignAfterItem'](_0x2c8302,_0x584f13)||this['_alignToTargetRect'](_0x584f13);else this['_alignToTargetRect'](_0x584f13);return this['_updateLastItem'](),this['view']['list']['add'](_0x584f13),_0x584f13;}['_alignForTopChange'](_0x3f0112){if(!_0x3f0112['content']['length'])return;const _0x5a90ba=this['_getItemBefore'](_0x3f0112);if(!_0x5a90ba)return;const _0x321f9f=this['_sidebarItemViewToAnnotation']['get'](_0x5a90ba),_0x334a9d=this['_activeAnnotation'];_0x334a9d&&_0x334a9d===_0x321f9f?this['_alignAfterItem'](_0x5a90ba,_0x3f0112):this['_alignBeforeItem'](_0x3f0112,_0x5a90ba);}['_alignForBottomChange'](_0x3a6e4f){if(!_0x3a6e4f['content']['length'])return;const _0x4f23e0=this['_getItemAfter'](_0x3a6e4f);if(!_0x4f23e0)return;const _0x535459=this['_sidebarItemViewToAnnotation']['get'](_0x4f23e0),_0x2d22e=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5b4e0b=this['_activeAnnotation'];_0x5b4e0b&&_0x5b4e0b===_0x535459&&_0x2d22e?(this['_alignBeforeItem'](_0x4f23e0,_0x3a6e4f),this['_alignAfterItem'](_0x3a6e4f,_0x4f23e0)):_0x5b4e0b&&_0x5b4e0b===_0x535459?this['_alignBeforeItem'](_0x4f23e0,_0x3a6e4f):this['_alignAfterItem'](_0x3a6e4f,_0x4f23e0);}['_recalculate'](_0x14ebd3,_0x25a500){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2bb078,changedProp:_0x4f4dc1}of this['_recalculateBuffer'])'top'===_0x4f4dc1?this['_alignForTopChange'](_0x2bb078):this['_alignForBottomChange'](_0x2bb078);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x14ebd3,'changedProp':_0x25a500});}['getSidebarItemView'](_0x28d449){return this['_annotationToSidebarItemView']['get'](_0x28d449);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2214be){const _0x60734b=this['getSidebarItemView'](_0x2214be);this['stopListening'](_0x60734b),this['stopListening'](_0x2214be['view']),_0x60734b['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2214be),this['_sidebarItemViewToAnnotation']['delete'](_0x60734b);}['_createSidebarView'](){const _0x49f5c3=new H(this['context']['locale']);return _0x49f5c3['render'](),this['on']('change:_lastItem',(_0x1d2820,_0x408109,_0x1d138c,_0x5e1249)=>{_0x5e1249&&_0x49f5c3['unbind']('minHeight'),_0x1d138c?_0x49f5c3['bind']('minHeight')['to'](_0x1d138c,'bottom'):_0x49f5c3['minHeight']=null;}),_0x49f5c3;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x129f55){const _0x17fa6e=this['_sidebarItemViewToAnnotation']['get'](_0x129f55),_0x255bab=_0x17fa6e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x17fa6e)-0x1);return _0x255bab&&this['getSidebarItemView'](_0x255bab)||null;}['_getItemAfter'](_0x4a4a6b){const _0x509737=this['_sidebarItemViewToAnnotation']['get'](_0x4a4a6b),_0x290ac5=_0x509737&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x509737)+0x1);return _0x290ac5&&this['getSidebarItemView'](_0x290ac5)||null;}['_alignBeforeItem'](_0x3679d9,_0x2bef40){_0x3679d9['updateHeight']();const _0x20fe6e=G(_0x2bef40['bottom']+this['_spaceBetweenItems'],_0x3679d9['top']);return!!_0x20fe6e&&(this['_setItemTop'](_0x2bef40,_0x2bef40['top']-_0x20fe6e),!0x0);}['_alignAfterItem'](_0x2eff56,_0x5b071a){_0x2eff56['updateHeight']();const _0x199809=G(_0x2eff56['bottom']+this['_spaceBetweenItems'],_0x5b071a['top']);return!!_0x199809&&(this['_setItemTop'](_0x5b071a,_0x5b071a['top']+_0x199809,!0x1),!0x0);}['_alignToTargetRect'](_0x542859){const _0x574108=this['_sidebarItemViewToAnnotation']['get'](_0x542859);if(!_0x574108||!_0x574108['target']||!_0x574108['targetRect'])return;const _0x36b0af=this['_getTargetTop'](_0x574108,_0x574108['targetRect']);this['_setItemTop'](_0x542859,_0x36b0af);}['_getTargetTop'](_0x39f944,_0x3da191){if(null===_0x3da191)return 0x0;if(_0x39f944['target']instanceof _0x2a3444)return _0x3da191['top'];{const _0x4ae910=new _0x2a3444(this['view']['element'])['top'];return _0x3da191['top']-_0x4ae910;}}['_setItemTop'](_0x17ed42,_0x1156d3,_0xbdf11b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xbdf11b&&(_0x1156d3=Math['max'](_0x1156d3,this['_getMaxAvailableTop'](_0x17ed42))),_0x17ed42['top']=_0x1156d3;}['_getMaxAvailableTop'](_0x2179cc){let _0x5227b8=this['_getItemBefore'](_0x2179cc),_0x58cece=0x0;for(;_0x5227b8;)_0x5227b8['updateHeight'](),_0x58cece+=this['_spaceBetweenItems']+_0x5227b8['height'],_0x5227b8=this['_getItemBefore'](_0x5227b8);return _0x58cece;}}function G(_0x1ffaa4,_0x2869d0){return Math['max'](_0x1ffaa4-_0x2869d0,0x0);}function g(_0x456eab){return null!==_0x456eab&&'object'==typeof _0x456eab&&0x1===_0x456eab['nodeType'];}class e extends _0x45882f{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28544b){super(_0x28544b),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x6d21a2(),this['_refreshPositioningDebounced']=_0x274d42(()=>{_0x28544b['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3425db=this['context']['plugins']['get'](j),_0x22832b=this['context']['plugins']['get'](z);_0x3425db['register']('wideSidebar',this),_0x22832b['container']&&_0x3425db['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5ea8d6){if(_0x5ea8d6===this['activeAnnotation'])return;const _0xea899e=this['context']['plugins']['get'](z);_0xea899e['_activeAnnotation']=_0x5ea8d6;const _0x9284b9=this['activeAnnotation'];_0xea899e['refresh']({'blurredAnnotation':_0x9284b9,'activatedAnnotation':_0x5ea8d6}),this['activeAnnotation']=_0x5ea8d6;}['attach'](_0x3a6b07){this['annotations']=_0x3a6b07;const _0x217be0=this['context']['plugins']['get'](z);if(_0x217be0['_annotations']=_0x3a6b07,this['isAttached'])throw new _0x3a839e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x217be0,'set:container',()=>{this['detach'](),this['listenTo'](_0x217be0,'change:container',_0x2001e6=>{_0x2001e6['off'](),this['attach'](_0x3a6b07);});}),_0x217be0['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x348869=_0x47f7e1=>{_0x47f7e1['updateTargetRect'](),_0x217be0['addAnnotation'](_0x47f7e1);};for(const _0x10053f of _0x3a6b07)_0x348869(_0x10053f);this['listenTo'](_0x3a6b07,'add',(_0x223709,_0x53ad9d)=>{_0x348869(_0x53ad9d);}),this['listenTo'](_0x3a6b07,'remove',(_0x23ff15,_0x56f046,_0x597ad4)=>{_0x217be0['rearrange']({'removedAnnotation':_0x56f046,'previousAnnotation':_0x3a6b07['get'](_0x597ad4-0x1),'nextAnnotation':_0x3a6b07['get'](_0x597ad4+0x1)}),_0x56f046===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x3a6b07,'focus',(_0x4856a7,_0x144812)=>{this['setActiveAnnotation'](_0x144812);}),this['listenTo'](_0x3a6b07,'blur',()=>{this['setActiveAnnotation'](null);});const _0x23653a=this['context']instanceof _0x42ce06?this['context']['editors']:new _0x6d21a2([this['context']]);for(const _0x6ae263 of _0x23653a)this['_integrateWithEditorAnnotations'](_0x6ae263);this['listenTo'](_0x23653a,'add',(_0x50e0fa,_0xeff310)=>{this['listenTo'](_0xeff310,'ready',()=>{this['_integrateWithEditorAnnotations'](_0xeff310);});}),this['listenTo'](_0x23653a,'remove',(_0x4f3c42,_0x529dc7)=>{_0x529dc7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x529dc7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3a839e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1429ac=this['context']['plugins']['get'](z);_0x1429ac['_detachFromContainer'](this['annotations']),this['stopListening'](_0x1429ac),this['stopListening'](this['annotations']),this['context']instanceof _0x42ce06&&this['stopListening'](this['context']['editors']);for(const _0x3396e9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3396e9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x30894c){if(!_0x30894c['plugins']['has']('EditorAnnotations'))return;const _0x497eed=_0x30894c['plugins']['get']('EditorAnnotations'),_0x38e2c3=()=>{const _0x248212=_0x497eed['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x248212[0x0]||null);};this['listenTo'](_0x497eed,'refresh',_0x38e2c3),this['listenTo'](_0x497eed,'blur',(_0x15821b,{isAnnotationTracked:_0x5a4482})=>{this['activeAnnotation']&&_0x5a4482(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x497eed,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x41da75=>{_0x497eed['hasDomSelection']()&&(_0x38e2c3(),_0x41da75['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x497eed);}['_destroyEditorAnnotationsIntegration'](_0x5e6b70){this['stopListening'](_0x5e6b70),this['_editorAnnotations']['remove'](_0x5e6b70);}}class C extends _0x2a8d4c{['counterView'];constructor(_0x66040){super(_0x66040);const _0x459838=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x54c5b6,_0x30b563)=>_0x54c5b6?'...':_0x30b563['toString']()),this['set']('annotationType',''),this['icon']=_0x19095f,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x459838['to']('annotationType',_0x951678=>'ck-annotation-counter__badge--'+_0x951678),_0x459838['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x459838['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x45882f{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5ce440){super(_0x5ce440),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x35b43f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x6d21a2(),this['_refreshPositioningDebounced']=_0x274d42(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x113f37(this['context']['locale']),this['balloonPanelView']=new _0x18fe7e(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x20eff7){this['annotations']=_0x20eff7;const _0x477ffd=this['context']['plugins']['get'](z),_0x15ba65=this['balloonPanelView'];if(_0x477ffd['_annotations']=_0x20eff7,this['isAttached'])throw new _0x3a839e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x477ffd,'set:container',()=>{this['detach'](),this['listenTo'](_0x477ffd,'change:container',_0x285d8b=>{_0x285d8b['off'](),this['attach'](_0x20eff7);});}),_0x477ffd['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x18894a=_0x58cfdb=>{const _0x2c44a7=new C(this['context']['locale']);_0x477ffd['addAnnotation'](_0x58cfdb,_0x2c44a7),this['_annotationToNarrowView']['set'](_0x58cfdb,_0x2c44a7),_0x2c44a7['bind']('isDirty','annotationType','number')['to'](_0x58cfdb['view'],'isDirty','type','length'),_0x2c44a7['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x15ba65['content']['first']!==_0x58cfdb['view']?(this['_showBalloon'](_0x58cfdb),_0x58cfdb['view']['element']['focus'](),this['setActiveAnnotation'](_0x58cfdb)):this['setActiveAnnotation'](null);});};for(const _0x148f3e of _0x20eff7)_0x18894a(_0x148f3e);this['listenTo'](_0x20eff7,'add',(_0x3d5a2b,_0x225de8)=>{_0x18894a(_0x225de8);}),this['listenTo'](_0x20eff7,'remove',(_0x3a5797,_0x30b027,_0x2c012b)=>{this['_annotationToNarrowView']['get'](_0x30b027)['destroy'](),this['_annotationToNarrowView']['delete'](_0x30b027),_0x477ffd['rearrange']({'removedAnnotation':_0x30b027,'previousAnnotation':_0x20eff7['get'](_0x2c012b-0x1),'nextAnnotation':_0x20eff7['get'](_0x2c012b+0x1)}),_0x30b027===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x20eff7,'focus',(_0x211a39,_0x1cc9e4)=>{this['setActiveAnnotation'](_0x1cc9e4);}),this['listenTo'](_0x20eff7,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x57df1e,_0x172692)=>{_0x172692['keyCode']===_0x27e8f5['esc']&&_0x15ba65['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x15ba65['content']['first']),this['_hideBalloon'](),_0x172692['stopPropagation'](),_0x172692['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x234ab3,_0x5d5fb5)=>{const _0x255fd0=_0x5d5fb5['target'];_0x15ba65['isVisible']&&_0x15ba65['element']['contains'](_0x255fd0)||_0x477ffd['view']['element']['contains'](_0x255fd0)||_0x234ab3['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x51c403=>_0x51c403['contains'](_0x255fd0))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1619b6=this['context']instanceof _0x42ce06?this['context']['editors']:new _0x6d21a2([this['context']]);for(const _0x488e3c of _0x1619b6)this['_integrateWithEditorAnnotations'](_0x488e3c);this['listenTo'](_0x1619b6,'add',(_0x152dd1,_0x12eb32)=>{this['listenTo'](_0x12eb32,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x12eb32);});}),this['listenTo'](_0x1619b6,'remove',(_0x18f852,_0x339cd6)=>{_0x339cd6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x339cd6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2fc4a7){if(_0x2fc4a7===this['activeAnnotation'])return;const _0x29189c=this['context']['plugins']['get'](z);if(_0x29189c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2fc4a7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2fc4a7)_0x29189c['getSidebarItemView'](_0x2fc4a7)?this['_showBalloon'](_0x2fc4a7):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2fc4a7;}['detach'](){if(!this['isAttached'])throw new _0x3a839e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x195ea6=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x567715=>_0x567715['destroy']()),this['_annotationToNarrowView']['clear'](),_0x195ea6['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x42ce06&&this['stopListening'](this['context']['editors']);for(const _0x17596a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x17596a);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'](_0x2053e1){if(!_0x2053e1['plugins']['has']('EditorAnnotations'))return;const _0x3a51f8=_0x2053e1['plugins']['get']('EditorAnnotations'),_0x13993c=this['context']['plugins']['get'](z),_0x587ca6=this['annotations'],_0xb14a24=this['balloonPanelView'],_0x177212=()=>{const _0x1d670f=_0x3a51f8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1d670f),this['setActiveAnnotation'](_0x1d670f[0x0]||null);};this['listenTo'](_0x3a51f8,'refresh',_0x177212),this['listenTo'](_0x3a51f8,'blur',(_0x2eeb8d,{isAnnotationTracked:_0x17007f})=>{this['activeAnnotation']&&_0x17007f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3a51f8,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x587ca6,'blur',_0x14245c=>{_0x3a51f8['hasDomSelection']()&&_0x14245c['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4f5b8a,_0x2c6b7c)=>{const _0x3bf223=_0x2c6b7c['target'];_0xb14a24['isVisible']&&_0xb14a24['element']['contains'](_0x3bf223)||_0x13993c['view']['element']['contains'](_0x3bf223)||this['activeAnnotation']&&_0x3a51f8['hasDomSelection']()&&(_0x177212(),_0x4f5b8a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3a51f8);}['_destroyEditorAnnotationsIntegration'](_0x24a1b4){_0x24a1b4&&(this['stopListening'](_0x24a1b4),this['_editorAnnotations']['remove'](_0x24a1b4));}['_setSelectedAnnotations'](_0xfb3077){for(const _0x7ee933 of this['_selectedAnnotations'])_0xfb3077['includes'](_0x7ee933)||this['_manuallyClosedAnnotationViews']['delete'](_0x7ee933['view']);this['_selectedAnnotations']=_0xfb3077;}['_refreshPositioning'](){const _0x297f09=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x297f09['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x347b71){if(this['_manuallyClosedAnnotationViews']['has'](_0x347b71['view']))return;const _0x5a9d6b=this['balloonPanelView']['content']['first'];_0x5a9d6b!==_0x347b71['view']?(_0x5a9d6b&&this['_detachListeners'](_0x5a9d6b),this['_attachListeners'](_0x347b71['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x347b71['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x165c3e=this['balloonPanelView']['content']['first'],_0x36fd23=_0x165c3e&&this['annotations']['getByView'](_0x165c3e);if(!_0x36fd23||!this['_annotationToNarrowView']['has'](_0x36fd23))return;const _0x20b146=this['_annotationToNarrowView']['get'](_0x36fd23)['element'],_0x989525=(function(){const _0x33a5e7=_0x18fe7e['defaultPositions'];return[_0x33a5e7['southArrowNorthEast'],_0x33a5e7['northArrowSouthEast'],_0x33a5e7['southArrowNorth'],_0x33a5e7['northArrowSouth'],_0x33a5e7['southArrowNorthWest'],_0x33a5e7['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x20b146,'positions':_0x989525});}['_hideBalloon'](){const _0x53fb3a=this['balloonPanelView'],_0x9222ff=_0x53fb3a['content']['first'];_0x9222ff&&(this['_detachListeners'](_0x9222ff),_0x53fb3a['unpin'](),_0x53fb3a['content']['clear']());}['_attachListeners'](_0x447d18){this['listenTo'](_0x447d18,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x447d18,'Esc',(_0x3aa049,_0x1306b5)=>{this['_manuallyClosedAnnotationViews']['add'](_0x447d18),this['_hideBalloon'](),_0x1306b5();});}['_detachListeners'](_0xf39853){this['stopListening'](_0xf39853);}}class c extends _0x343473{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x5a40fb,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3324ce){super(_0x3324ce),_0x3324ce['editing']['view']['addObserver'](_0xd78016),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3324ce['plugins']['get'](_0x5a40fb),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x207be8=this['editor']['plugins']['get'](j);_0x207be8['context']===this['editor']&&(_0x207be8['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4fbb68,_0x2a9ffd)=>{const _0x4d7d05=this['_balloon'];if(this['isAttached']&&_0x4d7d05['visibleView']){const _0x171dca=this['annotations']['getByView'](_0x4d7d05['visibleView']);_0x171dca&&this['_closeAnnotation'](_0x171dca),_0x2a9ffd();}}));}['afterInit'](){const _0x427aec=this['editor']['plugins']['get'](j);_0x427aec['context']===this['editor']&&(_0x427aec['hasActive']()||_0x427aec['switchTo']('inline'));}['setActiveAnnotation'](_0x1ad30d){_0x1ad30d!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1ad30d&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1ad30d)&&this['_addAnnotationToBalloon'](_0x1ad30d,!0x0),_0x1ad30d['isActive']=!0x0),_0x1ad30d||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1ad30d);}['attach'](_0x2e7bf0){this['annotations']=_0x2e7bf0;const _0x34229d=this['editor']['plugins']['get'](j),_0x43e40c=this['_balloon'];if(this['isAttached'])throw new _0x3a839e('inlineannotations-attach-already-attached',this);if(_0x34229d['context']!==this['editor'])throw new _0x3a839e('inlineannotations-not-allowed-with-context',this);const _0x5b39c0=this['editor']['plugins']['get'](b);this['listenTo'](_0x5b39c0,'refresh',()=>{const _0x17deba=_0x5b39c0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x40be6b,_0x13ce3b;!this['_forceRefresh']&&(_0x40be6b=_0x17deba,_0x13ce3b=this['_selectedAnnotations'],_0x40be6b['length']===_0x13ce3b['length']&&_0x40be6b['every'](_0x250c61=>_0x13ce3b['includes'](_0x250c61)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x17deba),this['setActiveAnnotation'](_0x17deba[0x0]||null));}),this['listenTo'](_0x5b39c0,'blur',(_0x5de6a4,{isAnnotationTracked:_0x2c2b1d})=>{this['activeAnnotation']&&_0x2c2b1d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3caee0,_0x5b87df,_0x550d94)=>{_0x550d94||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2e7bf0,'remove',(_0x4c44ee,_0x2239dd)=>{this['_removeAnnotationFromBalloon'](_0x2239dd),_0x2239dd===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x43e40c,'change:visibleView',(_0x1d9dfa,_0x5f1d65,_0x51f372,_0x1314e3)=>{_0x1314e3&&this['stopListening'](_0x1314e3);const _0x4bf73c=_0x2e7bf0['getByView'](_0x51f372);_0x51f372&&_0x4bf73c&&(this['listenTo'](_0x51f372,'change:height',()=>{_0x43e40c['updatePosition']();}),this['listenTo'](_0x51f372,'Esc',()=>{this['_closeAnnotation'](_0x4bf73c),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x4bf73c&&this['setActiveAnnotation'](_0x4bf73c));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x43e40c['visibleView']&&(_0x2e7bf0['getByView'](_0x43e40c['visibleView'])&&_0x43e40c['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 _0x3a839e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4cb972 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4cb972);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2ae917){for(const _0xc20f9e of this['_selectedAnnotations'])_0x2ae917['includes'](_0xc20f9e)||this['_manuallyClosed']['delete'](_0xc20f9e);for(const _0x3bd272 of this['annotations'])_0x2ae917['includes'](_0x3bd272)||this['_removeAnnotationFromBalloon'](_0x3bd272);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5a030e of _0x2ae917)this['_addAnnotationToBalloon'](_0x5a030e);}this['_selectedAnnotations']=_0x2ae917;}['_addAnnotationToBalloon'](_0x37531c,_0x297fd0=!0x1){this['_manuallyClosed']['has'](_0x37531c)||(this['_addedAnnotations']['has'](_0x37531c)||this['_balloon']['hasView'](_0x37531c['view'])||(this['_addedAnnotations']['add'](_0x37531c),this['_balloon']['add']({'stackId':_0x37531c['view']['id'],'view':_0x37531c['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x37531c)}})),_0x297fd0&&this['_balloon']['showStack'](_0x37531c['view']['id']));}['_getBalloonTargetForAnnotation'](_0x576283){const _0x405f8c=_0x576283['target'],_0xf93ecf=this['editor']['editing']['view'],_0x553350=_0xf93ecf['document']['selection']['getFirstRange'](),_0x1812dc=_0xf93ecf['domConverter']['viewRangeToDom'](_0x553350);if(_0x1812dc['collapse'](!0x0),_0x405f8c){if(_0x405f8c instanceof _0x2a3444)return _0x405f8c;let _0x1f197a=[];for(const _0x11cbc2 of _0x405f8c)_0x1f197a['push'](...F(_0x11cbc2['getClientRects']()));_0x1f197a=function(_0x2f0f02){const _0x2590ac=[];let _0x500da3=_0x2f0f02[0x0];for(let _0x3c9018=0x1;_0x3c9018<_0x2f0f02['length'];_0x3c9018++)P(_0x500da3,_0x2f0f02[_0x3c9018])?_0x500da3['width']+=_0x2f0f02[_0x3c9018]['width']:(_0x2590ac['push'](_0x500da3),_0x500da3=_0x2f0f02[_0x3c9018]);return _0x2590ac['push'](_0x500da3),_0x2590ac;}(_0x1f197a);const _0x2410ac=_0x1812dc['getBoundingClientRect']();return _0x1f197a['find'](_0x136b30=>_0x136b30['top']<=_0x2410ac['top']&&_0x136b30['bottom']>=_0x2410ac['bottom']&&_0x136b30['left']<=_0x2410ac['left']&&_0x136b30['right']>=_0x2410ac['right'])||_0x1f197a[0x0];}return _0x576283['targetRect']||_0x1812dc;}['_removeAnnotationFromBalloon'](_0x3ab88){this['_addedAnnotations']['has'](_0x3ab88)&&this['_balloon']['hasView'](_0x3ab88['view'])&&(this['_addedAnnotations']['delete'](_0x3ab88),this['_balloon']['remove'](_0x3ab88['view']));}['_closeAnnotation'](_0x10ba91){this['_manuallyClosed']['add'](_0x10ba91),this['_removeAnnotationFromBalloon'](_0x10ba91);}}function F(_0x4ff4e5){return Array['from'](_0x4ff4e5)['map'](DOMRect['fromRect']);}function P(_0x3ceb70,_0x4babfa){return _0x3ceb70['top']===_0x4babfa['top']&&_0x3ceb70['bottom']===_0x4babfa['bottom']&&_0x3ceb70['right']===_0x4babfa['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x59e5e4,_0x170d5e){super(_0x59e5e4),this['set']('isEmpty',!_0x170d5e['length']),this['focusTracker']=new _0x1b2c22(),this['_annotationViews']=_0x170d5e,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x37d3b8({'focusables':_0x170d5e,'focusTracker':this['focusTracker']}),this['listenTo'](_0x170d5e,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x170d5e,'remove',(_0x1ab7cb,_0x5e881d)=>{_0x5e881d['isActive']&&this['focus'](),_0x170d5e['length']||(this['isEmpty']=!0x0);});const _0x2d19e9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x59e5e4,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x170d5e},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2d19e9['if']('isEmpty','ck-hidden',_0x1c1e18=>!_0x1c1e18)]},'children':[{'text':N(_0x59e5e4,'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 _0x5f4b0c of this['_annotationViews'])this['focusTracker']['add'](_0x5f4b0c['element']);this['_annotationViews']['on']('change',(_0x58183a,{added:_0x421b0d,removed:_0x4a67e6})=>{for(const _0x1934cb of _0x421b0d)this['focusTracker']['add'](_0x1934cb['element']);for(const _0x4dd9d5 of _0x4a67e6)this['focusTracker']['remove'](_0x4dd9d5['element']);});}}class p extends _0x45882f{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5597d1){super(_0x5597d1),this['archivedThreads']=new _0x6d21a2();}['init'](){const _0x58d087=this['context'],_0x46aa60=_0x58d087['plugins']['get'](o),_0xd20205=_0x58d087['plugins']['get'](y);this['listenTo'](_0x46aa60,'addCommentThread',(_0x19740d,{threadId:_0x218de0})=>{const _0x1ae4c3=_0x46aa60['getCommentThread'](_0x218de0);_0x1ae4c3['archivedAt']&&this['archivedThreads']['add'](_0x1ae4c3,this['_calculatePosition'](_0x1ae4c3['archivedAt'])),this['listenTo'](_0x1ae4c3,'change:archivedAt',(_0x3b85a2,_0x58d7c0,_0x18125a)=>{_0x18125a?this['archivedThreads']['has'](_0x1ae4c3)||this['archivedThreads']['add'](_0x1ae4c3,this['_calculatePosition'](_0x1ae4c3['archivedAt'])):this['archivedThreads']['has'](_0x1ae4c3)&&this['archivedThreads']['remove'](_0x1ae4c3);});}),this['listenTo'](_0x46aa60,'removeCommentThread',(_0x1aebe6,{threadId:_0x3e1bb0})=>{const _0x48d376=_0x46aa60['getCommentThread'](_0x3e1bb0);this['stopListening'](_0x48d376),this['archivedThreads']['has'](_0x48d376)&&this['archivedThreads']['remove'](_0x48d376);},{'priority':'highest'}),this['listenTo'](_0xd20205['collection'],'focus',(_0x1a0508,_0x57bfa1)=>{_0x57bfa1['isVisible']||(_0x57bfa1['isActive']=!0x0,_0xd20205['activate'](_0x57bfa1));});}['_calculatePosition'](_0x3111fd){const _0x3f3349=[...this['archivedThreads']]['findIndex'](_0x4dd9da=>_0x4dd9da['archivedAt']<_0x3111fd);return _0x3f3349>-0x1?_0x3f3349:this['archivedThreads']['length'];}}class a extends _0x343473{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x5d034a];}constructor(_0x109783){super(_0x109783),this['annotationViews']=new _0x20e792(),this['_pendingThreads']=[];}['init'](){const _0x40d170=this['editor'],_0x25fde2=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x40d170['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x2a8d4c,!0x0)),_0x40d170['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2219f7=this['_createCommentsArchiveButton'](_0x2d277e);return _0x2219f7['set']({'role':'menuitemcheckbox'}),_0x2219f7;});const _0x4172a9=_0x40d170['plugins']['get'](p),_0x4507a0=_0x40d170['plugins']['get']('Annotations'),_0x22b6ca=_0x40d170['plugins']['get']('CommentsRepository');_0x4172a9['archivedThreads']['forEach'](_0x53d920=>{this['_handleNewThread'](_0x53d920);}),this['listenTo'](_0x4172a9['archivedThreads'],'add',(_0x1ceeb0,_0xfc6045)=>{this['_handleNewThread'](_0xfc6045);}),this['listenTo'](_0x4507a0['collection'],'add',(_0x141087,_0x41f414)=>{const _0x3be92d=this['_pendingThreads']['find'](_0x44eb25=>{const _0x439489=_0x22b6ca['_threadToController']['get'](_0x44eb25);return _0x439489&&_0x41f414['innerView']===_0x439489['view'];});if(_0x3be92d){const _0x3e4f67=this['_calculatePosition'](_0x3be92d['archivedAt']);this['_addAnnotationToArchive'](_0x41f414,_0x3e4f67),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3be92d),0x1);}}),this['listenTo'](_0x4172a9['archivedThreads'],'remove',(_0x44ca96,_0x2ff45c)=>{const _0x260419=_0x40d170['config']['get']('collaboration.channelId');if(!_0x260419||_0x2ff45c['channelId']===_0x260419){if(this['_pendingThreads']['includes'](_0x2ff45c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ff45c),0x1);else{const _0x356531=_0x22b6ca['_threadToController']['get'](_0x2ff45c),_0xae5dc1=_0x4507a0['getByInnerView'](_0x356531['view']);this['annotationViews']['remove'](_0xae5dc1['view']),this['stopListening'](_0xae5dc1),this['stopListening'](_0xae5dc1['focusableElements']);}}}),this['listenTo'](_0x4507a0['collection'],'add',(_0x1c36d5,_0x2d54fd)=>{this['listenTo'](_0x2d54fd,'escape',_0x25fde2);}),this['listenTo'](_0x4507a0['collection'],'remove',(_0x45c1ae,_0x53efcd)=>{this['stopListening'](_0x53efcd,'escape',_0x25fde2);});}['_addAnnotationToArchive'](_0x3b9ef5,_0x98d063){this['listenTo'](_0x3b9ef5,'set:isVisible',_0x24e0c7=>{_0x24e0c7['return']=!0x1,_0x24e0c7['stop']();}),this['annotationViews']['add'](_0x3b9ef5['view'],_0x98d063);}['_handleNewThread'](_0x2c632c){const _0x5b2081=this['editor']['plugins']['get']('CommentsRepository'),_0x9188b5=this['editor']['plugins']['get']('Annotations'),_0x131cc9=this['editor']['config']['get']('collaboration.channelId');if(!_0x131cc9||_0x2c632c['channelId']===_0x131cc9){const _0x3d6d87=_0x5b2081['_threadToController']['get'](_0x2c632c);if(!_0x3d6d87)return void this['_pendingThreads']['push'](_0x2c632c);const _0x130c5b=this['_calculatePosition'](_0x2c632c['archivedAt']),_0x2b0bf6=_0x9188b5['getByInnerView'](_0x3d6d87['view']);_0x2b0bf6['isVisible']&&_0x9188b5['_visibleAnnotations']['remove'](_0x2b0bf6),this['_addAnnotationToArchive'](_0x2b0bf6,_0x130c5b);}}['_calculatePosition'](_0x399960){const _0x2e66f3=this['editor']['config']['get']('collaboration.channelId'),_0xb4f67=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x143090=>_0x143090['channelId']===_0x2e66f3)['findIndex'](_0x8d1cb6=>_0x8d1cb6['archivedAt']<_0x399960);return _0xb4f67<0x0||_0xb4f67>this['annotationViews']['length']?this['annotationViews']['length']:_0xb4f67-0x1;}['_toggleDialog'](){const _0x3c61e5=this['editor'],_0x5a2c72=_0x3c61e5['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x3c61e5['locale'],this['annotationViews'])),'commentsArchive'===_0x5a2c72['id']?_0x5a2c72['hide']():_0x5a2c72['show']({'id':'commentsArchive','title':N(_0x3c61e5['locale'],'COMMENTS_ARCHIVE'),'icon':_0x429585,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x30a45d['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x123453,_0x4b2fdb=!0x1){const _0x2ce92a=this['editor']['locale'],_0x2b1311=this['editor']['plugins']['get']('Dialog'),_0x503071=new _0x123453(_0x2ce92a);return _0x503071['bind']('isEnabled')['to'](this,'isEnabled'),_0x503071['bind']('isOn')['to'](_0x2b1311,'id',_0x1af933=>'commentsArchive'===_0x1af933),_0x503071['set']({'label':N(_0x2ce92a,'COMMENTS_ARCHIVE'),'icon':_0x429585,'isToggleable':!0x0}),_0x4b2fdb&&(_0x503071['tooltip']=!0x0),this['listenTo'](_0x503071,'execute',()=>this['_toggleDialog']()),_0x503071;}['_hideDialogOnAnnotationEscape']=_0x246090=>{const _0x3f1506=_0x246090['source'];if(!this['annotationViews']['has'](_0x3f1506['view']))return;const _0x47a86d=this['editor']['plugins']['get']('Dialog');_0x47a86d['isOpen']&&'commentsArchive'===_0x47a86d['id']&&(_0x47a86d['hide'](),_0x246090['stop']());};}class gi extends _0x343473{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x464974,ContextPlugin as _0x3e241b,PendingActions as lt,Command as _0x2768e0,Plugin as _0x5753fc,Context as _0x492057}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x457f69,uid as _0x29df72,KeystrokeHandler as jt,FocusTracker as _0x529579,diff as qt,Collection as _0x214515,Rect as _0x305cf4,CKEditorError as _0xc716c1,first as _0x3a1931,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x7dec1f,keyCodes as _0x3316b1}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as Ft,AriaDescriptionView as Et,setupThreadKeyboardNavigation as Vt,ConfirmMixin as $t,LateFocusButtonView as Jt,trimHtml as Lt,LateFocusDropdownButtonView as _0x3fec06,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x35e476}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x324384}from'es-toolkit/compat';import{IconUndo as Gt,IconCheck as Qt,IconPencil as ti,IconRemoveComment as Zt,IconThreeVerticalDots as _0x35dbda,IconAddComment as _0x601cc9,IconCommentsArchive as _0x5913f2}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as _0x2673a1,InlineEditableUIView as _0x48f58c,EditorUI as ts,View as kt,FocusCycler as _0x1fd229,ButtonView as _0x37ddc6,ViewCollection as _0x15d44a,createDropdown as _0x4aa4a0,ListView as _0x18860f,focusChildOnDropdownOpen as _0x11ba4d,ListItemView as _0x157730,MenuBarMenuListItemButtonView as _0x427723,BodyCollection as _0x4a9de3,BalloonPanelView as _0xeedbd9,ContextualBalloon as _0x314700,Dialog as _0x570c6b,DialogViewPosition as _0x4f9160}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as _0xbd9234,enableViewPlaceholder as _0x4e3bb8,MouseObserver as _0x59b6e8}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as _0x41fefe,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as _0x4c1ebe,ShiftEnter as _0x33bc93}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as _0x466236}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as _0xae3d92}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as _0x520430}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as _0x17c1d1}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x4c09c6}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x2a2fd1}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x457f69(){['model'];['view'];constructor(_0x3e6a4e,_0x207e9b){super(),this['model']=_0x3e6a4e,this['model']['_isAttached']=!0x0,this['view']=_0x207e9b,this['listenTo'](_0x207e9b,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x207e9b,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x207e9b,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x207e9b,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x207e9b,'addComment',(_0x248ae8,_0x530777)=>this['addComment'](_0x530777)),this['listenTo'](_0x207e9b,'updateComment',(_0xe3fea6,_0x2221d5,_0x13803f)=>this['updateComment'](_0x2221d5,_0x13803f)),this['listenTo'](_0x207e9b,'removeComment',(_0x5ef9bd,_0x4f6248)=>this['removeComment'](_0x4f6248));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x143511){this['model']['addComment']({'content':_0x143511,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x713303,_0x304109){this['model']['getComment'](_0x713303)['update']({'content':_0x304109});}['removeComment'](_0x44efae){this['model']['getComment'](_0x44efae)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x463144,_0x377d47,_0x2b5c9c){const t=_0x463144['t'];switch(_0x377d47){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'},_0x2b5c9c);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'},_0x2b5c9c);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'},_0x2b5c9c);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'},_0x2b5c9c);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2b5c9c);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'},_0x2b5c9c);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'},_0x2b5c9c);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'},_0x2b5c9c);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 is extends _0x2673a1{['main'];['editable'];constructor(_0x53a0e3,_0x4cb735){super(_0x53a0e3);const _0x1e2539=_0x29df72();this['main']=this['createCollection'](),this['editable']=new _0x48f58c(_0x53a0e3,_0x4cb735,void 0x0,{'label':()=>N(_0x53a0e3,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x53a0e3['uiLanguageDirection'],'lang':_0x53a0e3['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1e2539},'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 ri extends ts{['view'];constructor(_0x4d5d50){super(_0x4d5d50),this['view']=new is(_0x4d5d50['locale'],_0x4d5d50['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x44f1f3=this['editor']['editing']['view'],_0x377d5c=this['view']['editable'],_0x271f18=_0x44f1f3['document']['getRoot']();_0x377d5c['name']=_0x271f18['rootName'],this['view']['render']();const _0x97c9bd=_0x377d5c['element'];this['setEditableElement'](_0x377d5c['name'],_0x97c9bd),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x44f1f3['attachDomRoot'](_0x97c9bd),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const gi=[_0x41fefe,_0x4c1ebe,_0x33bc93,_0x466236,_0xae3d92,_0x520430,_0x17c1d1];class Bt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x457f69(_0x464974){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>gi)());constructor(_0x458095={}){function _0x10406e(_0xdf9762){return _0xdf9762['map'](_0x4cfdc3=>String['fromCharCode'](_0x4cfdc3))['join']('');}(_0x458095=Object['assign']({},_0x458095))['plugins']||(_0x458095['plugins']=Bt['defaultPlugins']),super(_0x458095),this['ui']=new ri(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x10406e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x10406e([0x76,0x69,0x65,0x77])][_0x10406e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x10406e([0x61,0x75,0x74,0x6f]),this[_0x10406e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x10406e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x10406e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x10406e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x10406e([0x6f,0x6b])});}['create'](){const _0xfe84b8=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xfe84b8))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x54a6d1=>{const _0x1d8640=this['model']['document']['getRoot'](),_0x5e2837=_0x1d8640&&_0x1d8640['getChild'](_0x1d8640['childCount']-0x1);_0x54a6d1['setSelection'](_0x5e2837,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x14c6ab=this['editing']['view'],_0x4b2633=_0x14c6ab['document']['getRoot'](),_0x17503d=_0x4b2633['getChild'](0x0);_0x4b2633['childCount']>0x1||!_0x17503d||'p'!=_0x17503d['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(_0xbd9234(_0x14c6ab,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x17503d['placeholder']=this['placeholder']),_0x4e3bb8({'view':_0x14c6ab,'element':_0x17503d,'keepOnFocus':!0x0}),this['placeholderElement']=_0x17503d);}}class St extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3a9062,_0xf73ad4={}){super(_0x3a9062),this['editor']=null,this['_editorConfig']=_0xf73ad4,this['set']('value',_0xf73ad4['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3a9062,'Reply...')),this['set']('submitLabel',N(_0x3a9062,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x529579(),this['focusCycler']=new _0x1fd229({'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',(_0x26c9c5,_0x2738d1)=>{this['cancelButtonView']['fire']('execute'),_0x2738d1();}),this['keystrokes']['set']('Ctrl+Enter',(_0x3137f8,_0x3e84ac)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3e84ac());}),this['on']('submit',(_0x53bcb4,_0x4ed968)=>{_0x4ed968['length']>0xfde8?(alert(N(_0x3a9062,'TOO_LONG_COMMENT_ALERT',[_0x4ed968['length'],0xfde8])),_0x53bcb4['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Bt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x532def=this['editor'];this['element']['insertBefore'](_0x532def['ui']['element'],this['element']['firstChild']),_0x532def['model']['document']['on']('change',()=>this['value']=_0x532def['getData']()),_0x532def['bind']('placeholder')['to'](this),this['focusables']['add'](_0x532def['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2b3e23){-0x1===_0x2b3e23?(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:_0x4b9674}=this,_0x3ee6b2=new _0x37ddc6(_0x4b9674);return _0x3ee6b2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3ee6b2['withText']=!0x0,_0x3ee6b2['bind']('label')['to'](this,'submitLabel'),_0x3ee6b2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3ee6b2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x3d9536,_0x2a02e4)=>!_0x2a02e4&&!!_0x3d9536['trim']()),_0x3ee6b2;}['_createCancelButton'](){const {locale:_0x519ca7}=this,_0x570b4c=new _0x37ddc6(_0x519ca7);return _0x570b4c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x570b4c['label']=N(_0x519ca7,'Cancel'),_0x570b4c['withText']=!0x0,_0x570b4c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x570b4c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x139001=>{this['focusTracker']['add'](_0x139001['element']);}),this['focusables']['on']('change',(_0x32da31,_0x3f51f1)=>{for(const _0x270a1b of Array['from'](_0x3f51f1['added'])['reverse']())this['focusTracker']['add'](_0x270a1b['element']);});}}class ie extends kt{constructor(_0x4874f9,_0x23111c,_0x42ba92){super(_0x4874f9),this['commentInputView']=new St(_0x4874f9,_0x42ba92),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x589dc2,_0x5cf40f)=>_0x589dc2||!!_0x5cf40f),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 Ft(_0x4874f9,_0x23111c),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'](_0x157a71){this['commentInputView']['focus'](_0x157a71);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x57828e,_0x4a8a81)=>{const {submitButtonView:_0x429424,cancelButtonView:_0x2b3ec4,editor:_0x180b6e}=this['commentInputView'];[_0x429424['element'],_0x2b3ec4['element'],_0x180b6e?_0x180b6e['editing']['view']['getDomRoot']():null]['filter'](_0x10b213=>_0x10b213)['some'](_0x5b7d69=>_0x5b7d69['contains'](_0x4a8a81['target']))||(this['focus'](),_0x4a8a81['preventDefault']());});}}class Kt extends kt{constructor(_0x29f631){super(_0x29f631);const _0x51e128=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x51e128['to']('count',_0xebac98=>N(_0x29f631,'NUMBER_OF_COMMENTS',_0xebac98))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x18db71,_0x3b8019,_0x48c93f){super(_0x18db71);const _0xc783b5=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x3b8019['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x3b8019,this['_config']=_0x48c93f,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x529579(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1fd229({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x314bfb=>this['commentViews']['map'](_0x231910=>_0x231910['element'])['includes'](_0x314bfb['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new Kt(_0x18db71),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1120e6=>_0x1120e6-this['_config']['maxCommentsWhenCollapsed']);for(const _0x3f2b8e of _0x3b8019['comments'])this['_handleNewCommentModel'](_0x3f2b8e);this['_handleInfoComment'](),this['listenTo'](_0x3b8019['comments'],'add',(_0x33abcf,_0x5a5168)=>{const _0x20e96e=this['_calculatePosition'](_0x5a5168);this['length']++,this['_handleNewCommentModel'](_0x5a5168,_0x20e96e),this['refreshVisibleViews']();}),this['listenTo'](_0x3b8019['comments'],'remove',(_0x261263,_0x56a32c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x56a32c),this['refreshVisibleViews']();}),this['listenTo'](_0x3b8019,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x3b8019,'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',_0xc783b5['if']('length','ck-hidden',_0x4a6b05=>!_0x4a6b05)],'aria-label':N(_0x18db71,'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'](_0x24b7e3){-0x1===_0x24b7e3?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2bb23f of this['commentViews'])_0x2bb23f['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x51219e,_0x1c3437){const _0x5bf91b=new this['_config']['CommentView'](this['locale'],_0x51219e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5bf91b['viewUid']=_0x51219e['id'],_0x5bf91b['delegate']('removeComment')['to'](this),_0x5bf91b['delegate']('updateComment')['to'](this),_0x5bf91b['delegate']('resolveCommentThread')['to'](this),_0x5bf91b['delegate']('editorReady')['to'](this),_0x5bf91b['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5bf91b,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5bf91b,_0x1c3437);}['_calculatePosition'](_0x1b15c3){const _0x3b7f61=this['_model']['_findOptimalIndex'](_0x1b15c3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1b15c3['authoredAt']?_0x3b7f61-0x1:_0x3b7f61:_0x3b7f61-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x379e07={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x379e07,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x379e07));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5e82e4){const _0x3b3ba2=this['commentViews']['remove'](_0x5e82e4['id']);this['stopListening'](_0x3b3ba2),_0x3b3ba2['isEditMode']&&this['_updateHasDirtyComment'](),_0x3b3ba2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x46d676=>_0x46d676['isEditMode']);}['_rearrangeCollapse'](){const _0x58f458=function(_0x4501c4){const _0x31da27=new _0x214515();for(const _0x4e5e3b of _0x4501c4)_0x31da27['add'](_0x4e5e3b);return _0x31da27;}(this['commentViews']),_0x2304a7=this['_collapsedCommentsView']['count'];for(let _0xea42ed=0x1;_0xea42ed<=_0x2304a7;_0xea42ed++)_0x58f458['remove'](0x1);for(const _0x2602f8 of _0x58f458)_0x2602f8['collapse']();_0x2304a7>0x0&&_0x58f458['add'](this['_collapsedCommentsView'],0x1),Ut(qt(Array['from'](this['visibleViews']),Array['from'](_0x58f458)),this['visibleViews'],_0x58f458);}['_rearrangeExpand'](){Ut(qt(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1a12ea of this['visibleViews'])_0x1a12ea['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x56a67f=>{this['focusTracker']['add'](_0x56a67f['element']),this['keystrokes']['listenTo'](_0x56a67f['element']);}),this['commentViews']['on']('change',(_0x493117,_0x57c279)=>{for(const _0x5c22cd of _0x57c279['removed'])this['focusTracker']['remove'](_0x5c22cd['element']),this['keystrokes']['stopListening'](_0x5c22cd['element']);for(const _0x43c472 of Array['from'](_0x57c279['added'])['reverse']())this['focusTracker']['add'](_0x43c472['element']),this['keystrokes']['listenTo'](_0x43c472['element']);});}}function Ut(_0x556073,_0x5b4e7a,_0x44f684){let _0x473c7d=0x0;for(const _0x5bd5aa of _0x556073)switch(_0x5bd5aa){case'insert':_0x5b4e7a['add'](_0x44f684['get'](_0x473c7d),_0x473c7d),_0x473c7d++;break;case'delete':_0x5b4e7a['remove'](_0x473c7d);break;case'equal':_0x473c7d++;}}class zt extends kt{constructor(_0x2144ab){super(_0x2144ab);const _0x5a4785=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5a4785['to']('contextValue',_0x9d4140=>N(_0x2144ab,'THREAD_CONTEXT_LABEL',_0x9d4140)),'tabindex':-0x1},'children':[{'text':_0x5a4785['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Rt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5c78e6,_0x65a55b){super(_0x5c78e6);const _0x41a4db=this['bindTemplate'];this['_model']=_0x65a55b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x529579(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1fd229({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x452bcb=>!!_0x452bcb),this['bind']('contextValue')['to'](this['_model'],'context',_0x3e3d5e=>_0x3e3d5e&&_0x3e3d5e['value']?this['_trimContextValue'](_0x3e3d5e['value']):N(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',_0x41a4db['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 _0x3412ed=new _0x37ddc6(this['locale']);return _0x3412ed['label']=N(this['locale'],'Reopen'),_0x3412ed['tooltip']=N(this['locale'],'Reopen'),_0x3412ed['icon']=Gt,_0x3412ed['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x445181=>!_0x445181),_0x3412ed['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0xd3ed88,_0x5f27ea)=>_0xd3ed88&&_0x5f27ea),_0x3412ed['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3412ed;}['_trimContextValue'](_0x3d0fa0){if(_0x3d0fa0['length']<0x96)return _0x3d0fa0;const _0x58bf07=_0x3d0fa0['lastIndexOf']('\x20',0x93);return _0x3d0fa0['substring'](0x0,_0x58bf07>-0x1?_0x58bf07:0x93)+'...';}['_attachContextActions'](){const _0x3aef48=this['element']['querySelector']('.ck-context'),_0xa334f5=_0x3aef48['querySelector']('.ck-context__value');this['listenTo'](_0x3aef48,'mouseenter',()=>{_0xa334f5['offsetWidth']<_0xa334f5['scrollWidth']&&_0x3aef48['classList']['add']('overlay');}),this['listenTo'](_0x3aef48,'mouseleave',()=>{_0x3aef48['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5d62a3 of this['focusables'])this['focusTracker']['add'](_0x5d62a3['element']),this['keystrokes']['listenTo'](_0x5d62a3['element']);}['_createContextView'](){const _0x3f0f54=new zt(this['locale']);return _0x3f0f54['bind']('contextValue')['to'](this),_0x3f0f54;}}class Yt extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x29753b,_0x68950b,_0x2aa1ba,_0x1999e1){super(_0x29753b),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x68950b,this['_localUser']=_0x2aa1ba,this['_config']=_0x1999e1,this['commentThreadHeaderView']=new Rt(_0x29753b,_0x68950b),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Et(_0x29753b,N(_0x29753b,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x29753b,_0x68950b,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1999e1)),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',(_0x1ca1bc,_0xe51ff7)=>_0x1ca1bc||!!_0xe51ff7),this['bind']('isUnlinked')['to'](_0x68950b,'unlinkedAt',_0x94c7dd=>!!_0x94c7dd),this['bind']('ariaLabel')['to'](this,'length',_0x3082d4=>{const _0x4a7137=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x3082d4,_0x4a7137]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x529579(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1fd229({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x50c008=>_0x50c008['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Vt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x483920=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x31da98=_0x483920['commentInputView'];return _0x483920['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x31da98,'value',(_0x5c51a0,_0x1ff462,_0x4fa44e,_0x3adb2c,_0xb04297)=>!!_0xb04297||!!_0x3adb2c&&_0x4fa44e&&!_0x1ff462||_0x5c51a0&&_0x4fa44e&&!_0x1ff462),_0x31da98['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x124380,_0x2be660,_0x256985)=>{let _0x3b7e58;return _0x3b7e58=_0x256985&&_0x2be660?'Reply\x20to\x20reopen\x20discussion...':_0x124380?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3b7e58);}),_0x31da98['bind']('submitLabel')['to'](this,'length',_0x5cd5ce=>N(this['locale'],_0x5cd5ce?'Reply':'Comment')),_0x31da98['on']('submit',(_0xbf80a9,_0x14f20e)=>{this['fire']('addComment',_0x14f20e),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x31da98['on']('cancel',()=>{this['focus']();}),_0x31da98['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x31da98['on']('cancel',_0x217a98=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x217a98['stop']());}),this['on']('change:isActive',(_0x31eeac,_0xeb5874,_0xe82549)=>{_0xe82549||this['length']||_0x31da98['value']||this['fire']('removeCommentThread');}),_0x483920;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
$t(Yt){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x26a56b,_0x137f0a,_0x2f5ebc,_0x191cb7){super(_0x26a56b,_0x137f0a,_0x2f5ebc,_0x191cb7),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x26a56b,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x52edab,_0x24f844,_0x90ad40)=>{_0x90ad40||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x4ee490,_0x2f97c2,_0x241206)=>{_0x241206&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x197b2d=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x197b2d['if']('isActive','ck-thread--active'),_0x197b2d['if']('isUnlinked','ck-thread--unlinked'),_0x197b2d['if']('isConfirm','ck-thread--remove-confirmation'),_0x197b2d['to']('actionIndicator',_0x8fbc5b=>_0x8fbc5b?'ck-thread--'+_0x8fbc5b:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x197b2d['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 _0x1facea of this['commentsListView']['commentViews'])_0x1facea['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5b5449}=this,_0x509b8c=this['commentsListView']['commentViews']['get'](0x0);_0x509b8c===this['_boundFirstCommentView']||_0x509b8c['isSystemComment']||(this['_boundFirstCommentView']=_0x509b8c,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x509b8c,'actionIndicator',_0x556c8b=>'remove'===_0x556c8b?'remove':null),_0x509b8c['placeholder']=N(_0x5b5449,'Write\x20a\x20comment...'),_0x509b8c['removeButton']['on']('execute',_0x57828d=>{_0x57828d['stop'](),this['showConfirm'](N(_0x5b5449,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x509b8c['focus']();}),_0x509b8c['actionBar']['add'](this['resolveButton'],0x0),_0x509b8c['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x316338=new Jt(this['locale']);return _0x316338['label']=N(this['locale'],'Resolve'),_0x316338['tooltip']=N(this['locale'],'Resolve'),_0x316338['icon']=Qt,_0x316338['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x316338['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4f0e15=>!_0x4f0e15),_0x316338['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2c874e,_0xba4ed1)=>_0x2c874e&&!_0xba4ed1),_0x316338['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x316338;}['_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 Xt extends kt{constructor(_0xe84f06){super(_0xe84f06),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x486657,_0x6614dc,_0x3ed2be)=>{this['element']['innerHTML']=_0x3ed2be;}),this['element']['innerHTML']=this['content'];}}class ci extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x1dde9a,_0x42b127,_0x403d93){super(_0x1dde9a),this['_model']=_0x42b127,this['_config']=_0x403d93,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x42b127,'content',_0x42b127,'authoredAt',(_0x392125,_0x4b93ef)=>N(_0x1dde9a,'COMMENT_ARIA_LABEL',[_0x42b127['author']['name'],_0x403d93['formatDateTime'](_0x4b93ef),new DOMParser()['parseFromString'](_0x392125,'text/html')['body']['textContent'],_0x42b127['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Et(_0x1dde9a,N(_0x1dde9a,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x15d44a(),this['focusTracker']=new _0x529579(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1fd229({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x13d77a=>_0x13d77a['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']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x2de2b=new Xt(this['locale']);return _0x2de2b['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x53607b,_0x1f492c)=>_0x1f492c?Lt(_0x53607b,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x53607b),_0x2de2b;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x5eb661=new St(this['locale'],this['_config']['editorConfig']);return _0x5eb661['value']=this['_model']['content'],_0x5eb661['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5eb661['submitLabel']=N(this['locale'],'Save'),_0x5eb661['on']('submit',(_0x2f3eec,_0x55dde0)=>{this['fire']('updateComment',this['_model']['id'],_0x55dde0),this['switchToDisplayMode'](),this['focus']();}),_0x5eb661['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x5eb661['once']('editorReady',()=>{_0x5eb661['focus']();}),_0x5eb661['createEditor'](),_0x5eb661['delegate']('editorReady')['to'](this),_0x5eb661['delegate']('editorDestroyed')['to'](this),_0x5eb661;}['_setupKeyboardNavigation'](){const _0x4c8441=this['element'];this['keystrokes']['listenTo'](_0x4c8441);for(const _0x59b5e1 of this['focusables'])this['focusTracker']['add'](_0x59b5e1['element']),this['keystrokes']['listenTo'](_0x59b5e1['element']);this['focusables']['on']('change',(_0x24e2fb,_0x29400c)=>{for(const _0x996419 of _0x29400c['removed'])this['focusTracker']['remove'](_0x996419['element']),this['keystrokes']['stopListening'](_0x996419['element']);for(const _0x40f5d6 of _0x29400c['added'])this['focusTracker']['add'](_0x40f5d6['element']),this['keystrokes']['listenTo'](_0x40f5d6['element']);}),this['keystrokes']['set']('enter',(_0x3e0ce2,_0x4f8307)=>{_0x4c8441===_0x3e0ce2['target']&&(this['focusCycler']['focusFirst'](),_0x4f8307());}),this['keystrokes']['set']('esc',(_0x4d77f4,_0x3de126)=>{_0x4c8441!==_0x4d77f4['target']&&(this['focus'](),_0x3de126());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
$t(ci){['actionBar'];['userView'];constructor(_0x7c82a,_0x205f5b,_0x4df1f5){super(_0x7c82a,_0x205f5b,_0x4df1f5),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x7c82a,'Reply...')),this['bind']('authoredAt')['to'](_0x205f5b),this['bind']('resolvedAt')['to'](_0x205f5b),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 Ft(_0x7c82a,_0x205f5b['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x205f5b,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x43d0d4=this['bindTemplate'],_0x363887=[{'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':_0x43d0d4['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x43d0d4['to']('authoredAt',_0x4ec48a=>this['_config']['formatDateTime'](_0x4ec48a))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x43d0d4['if']('isEditMode','ck-comment__actions--hidden'),_0x43d0d4['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']&&_0x363887['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x43d0d4['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x43d0d4['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x43d0d4['if']('isEditMode','ck-comment--edit'),_0x43d0d4['if']('isSystemComment','ck-comment--info'),_0x43d0d4['to']('actionIndicator',_0x2e7b7a=>_0x2e7b7a?'ck-comment--'+_0x2e7b7a:'')],'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':_0x363887}]}]};}['_createEditButton'](){const _0x2c679b=new _0x37ddc6(this['locale']);return _0x2c679b['label']=N(this['locale'],'Edit'),_0x2c679b['icon']=ti,_0x2c679b['withText']=!0x0,_0x2c679b['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2c679b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x49a68a=>!_0x49a68a),_0x2c679b['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2c679b['on']('execute',()=>this['switchToEditMode']()),_0x2c679b;}['_createRemoveButton'](){const _0x33526d=new _0x37ddc6(this['locale']);return _0x33526d['label']=N(this['locale'],'Remove'),_0x33526d['icon']=Zt,_0x33526d['withText']=!0x0,_0x33526d['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x33526d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x147081=>!_0x147081),_0x33526d['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x33526d['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x33526d;}['_createDropdown'](){const _0x44d71b=_0x4aa4a0(this['locale'],_0x3fec06),_0x457101=_0x44d71b['panelView']['children'],_0x39d398=new _0x18860f(this['locale']),_0x509331=_0x44d71b['bindTemplate'];_0x11ba4d(_0x44d71b,()=>this['items']['find'](_0x462d19=>_0x462d19['isVisible'])),_0x44d71b['extendTemplate']({'attributes':{'class':[_0x509331['if']('isVisible','ck-hidden',_0x2417c2=>!_0x2417c2)]}});const _0x4a667e=(_0x1868c7,_0x4840eb=-0x1)=>{const _0x52096e=new _0x157730(this['locale']);_0x52096e['children']['add'](_0x1868c7);const _0x498e92=_0x4840eb>-0x1?_0x4840eb:_0x39d398['items']['length'];_0x39d398['items']['add'](_0x52096e,_0x498e92);const _0x1d61e6=Array['from'](this['items']);_0x44d71b['unbind']('isEnabled','isVisible'),_0x44d71b['bind']('isEnabled')['toMany'](_0x1d61e6,'isEnabled',(..._0x2fab70)=>_0x2fab70['some'](_0x4f2d55=>_0x4f2d55)),_0x44d71b['bind']('isVisible')['toMany'](_0x1d61e6,'isVisible',(..._0x202222)=>_0x202222['some'](_0x25d2f7=>_0x25d2f7));};_0x44d71b['panelPosition']='sw',_0x44d71b['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x35dbda});for(const _0xdba9ca of this['items'])_0x4a667e(_0xdba9ca);return _0x457101['add'](_0x39d398),_0x44d71b['listenTo'](this['items'],'add',(_0x236ecd,_0x24aed1,_0x5d9675)=>{_0x4a667e(_0x24aed1,_0x5d9675);}),_0x44d71b['listenTo'](this['items'],'remove',(_0x5133ee,_0x1c824c,_0x1d790a)=>{_0x39d398['items']['remove'](_0x1d790a);}),_0x44d71b;}['_attachActions'](_0x3a3160,_0x2df88f){const _0x1c05f6=_0x3a3160&&_0x3a3160['element'];_0x1c05f6&&(this['listenTo'](_0x1c05f6,'mouseenter',()=>this['actionIndicator']=_0x2df88f),this['listenTo'](_0x1c05f6,'focus',()=>this['actionIndicator']=_0x2df88f),this['listenTo'](_0x1c05f6,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1c05f6,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0xff3855=super['_createCommentInputView']();return _0xff3855['bind']('placeholder')['to'](this),_0xff3855;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x2db823){const _0x494d0e=Dt(_0x2db823,0x1e),_0x35e647=new MutationObserver(_0x4f2c84=>{for(const _0x114681 of _0x4f2c84)('attributes'==_0x114681['type']&&'class'==_0x114681['attributeName']||'childList'==_0x114681['type']||'characterData'==_0x114681['type'])&&_0x494d0e();});return{'attach'(_0x24da9e){_0x35e647['observe'](_0x24da9e,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x35e647['disconnect'](),_0x494d0e['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x303d81,_0x354abb){super(_0x303d81),this['id']=_0x29df72(),this['focusTracker']=new _0x529579(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x4fbf94,_0x5c1289)=>this['fire']('Esc',_0x5c1289)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x354abb),this['mainView']=_0x354abb;const _0xc8ab97=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xc8ab97['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 _0x59ce41=this['element']['clientHeight'];_0x59ce41&&(this['height']=_0x59ce41);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x457f69(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x32688d,target:_0x152824,type:_0x36d9ed,isVisible:_0x29d4c1=!0x0}){super(),this['view']=_0x32688d,this['view']['element']||this['view']['render'](),this['_type']=_0x36d9ed,this['_target']=_0x152824,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x214515([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x39876a,_0x4c499f)=>{this['view']['focusTracker']['add'](_0x4c499f);}),this['focusableElements']['on']('remove',(_0xe1040b,_0x507b44)=>{this['view']['focusTracker']['remove'](_0x507b44);}),this['set']('isVisible',_0x29d4c1);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x380f5b=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x380f5b),_0x380f5b;}get['targetRect'](){const _0x30a66c=this['target'];if(null===_0x30a66c)return null;if(_0x30a66c instanceof _0x305cf4)return _0x30a66c;const _0x3f15e7=_0x30a66c['filter'](_0x43a97e=>function(_0x45ae7a){const _0xab45f0=_0x45ae7a['offsetParent'];if(_0xab45f0)return!0x0;const _0x9f9097=_0x45ae7a['getClientRects']()['item'](0x0);return!!_0x9f9097;}(_0x43a97e));return 0x0===_0x3f15e7['length']?null:new _0x305cf4(_0x3f15e7[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x45b7d1){this['view']['isActive']=_0x45b7d1,this['view']['mainView']['isActive']=_0x45b7d1;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x43df4c){if(!(null===_0x43df4c||_0x43df4c instanceof _0x305cf4||Array['isArray'](_0x43df4c)&&_0x43df4c['every'](_0x36d026=>Ai(_0x36d026))))throw new _0xc716c1('annotation-invalid-target',null,{'target':_0x43df4c});}['_getNormalizedTarget'](){const _0x2eded5='function'==typeof this['_target']?this['_target']():this['_target'];return Ai(_0x2eded5)?[_0x2eded5]:_0x2eded5;}}function Ai(_0x287200){return null!==_0x287200&&'object'==typeof _0x287200&&'nodeType'in _0x287200&&0x1===_0x287200['nodeType'];}class S extends _0x214515{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3d58b9=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x529579(),this['_focusTracker']['on']('change:isFocused',(_0x43f842,_0x238a49,_0x4c89fa)=>{_0x4c89fa||this['fire']('blur');});for(const _0x24419e of _0x3d58b9)this['add'](_0x24419e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3e8575){if(this['has'](_0x3e8575))throw new _0xc716c1('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3e8575['innerView'],_0x3e8575),this['_viewToAnnotation']['set'](_0x3e8575['view'],_0x3e8575);for(const _0x22a8ef of _0x3e8575['focusableElements'])this['_focusTracker']['add'](_0x22a8ef);this['listenTo'](_0x3e8575['focusableElements'],'add',(_0x3d994e,_0x518fa4)=>{this['_focusTracker']['add'](_0x518fa4);}),this['listenTo'](_0x3e8575['focusableElements'],'remove',(_0x1a50d1,_0x3ae8f8)=>{this['_focusTracker']['remove'](_0x3ae8f8);}),this['listenTo'](_0x3e8575['view']['focusTracker'],'change:isFocused',(_0x11eeac,_0x2125b3,_0x223140)=>{_0x223140&&this['fire']('focus',_0x3e8575);}),_0x3e8575['updateTargetRect']();const _0x140955=this['_getOrderInContent'](_0x3e8575['view']['targetRect']);return super['add'](_0x3e8575,_0x140955);}['remove'](_0x57587f){if(!this['has'](_0x57587f))throw new _0xc716c1('annotationcollection-not-existing-item',null);this['stopListening'](_0x57587f['view']['focusTracker']),this['stopListening'](_0x57587f['focusableElements']);for(const _0xbf186f of _0x57587f['focusableElements'])this['_focusTracker']['remove'](_0xbf186f);return this['_viewToAnnotation']['delete'](_0x57587f['view']),this['_innerViewToAnnotation']['delete'](_0x57587f['innerView']),super['remove'](_0x57587f);}['getByInnerView'](_0x3f8f76){return this['_innerViewToAnnotation']['get'](_0x3f8f76);}['getByView'](_0x1b5c72){return this['_viewToAnnotation']['get'](_0x1b5c72);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1c8d39 of this)_0x1c8d39['updateTargetRect']();this['_sort']();}['_sort'](){const _0x5704fc=Array['from'](this)['sort']((_0x2b7a93,_0x329a80)=>w(_0x2b7a93['view']['targetRect'],_0x329a80['view']['targetRect']));for(let _0x5ea485=_0x5704fc['length']-0x1;_0x5ea485>0x0;_0x5ea485--){const _0x455e13=_0x5704fc[_0x5ea485];_0x5ea485!==this['getIndex'](_0x455e13)&&(this['remove'](_0x455e13),this['add'](_0x455e13));}}['_getOrderInContent'](_0x2c9e3d){let _0x3b1b8e=0x0;if(!_0x2c9e3d)return this['length'];for(const _0x1701c9 of this){const _0x1fe96b=_0x1701c9['view']['targetRect'];if(_0x1fe96b){if(w(_0x2c9e3d,_0x1fe96b)<0x0)return _0x3b1b8e;_0x3b1b8e++;}}return _0x3b1b8e;}}function v({source:_0x500d07,target:_0x4e992f,filter:_0x47d32c}){for(const _0x216976 of _0x500d07)_0x47d32c(_0x216976)&&_0x4e992f['add'](_0x216976);_0x4e992f['listenTo'](_0x500d07,'add',(_0x4c8722,_0x2cc941)=>{_0x47d32c(_0x2cc941)&&_0x4e992f['add'](_0x2cc941);}),_0x4e992f['listenTo'](_0x500d07,'remove',(_0x390230,_0x46d0df)=>{_0x4e992f['has'](_0x46d0df)&&_0x4e992f['remove'](_0x46d0df);});}function w(_0xd630d1,_0x146fd4){if(null===_0xd630d1&&null===_0x146fd4)return 0x0;if(null===_0xd630d1)return-0x1;if(null===_0x146fd4)return 0x1;const _0x49d5ff=_0xd630d1['top']-_0x146fd4['top'];return 0x0==_0x49d5ff?_0xd630d1['left']-_0x146fd4['left']:_0x49d5ff;}class y extends _0x3e241b{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2bc99c){if(super(_0x2bc99c),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2bc99c instanceof _0x464974){const _0x1df173=_0x2bc99c['locale'];_0x2bc99c['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x1df173,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x1df173,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x1df173,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x1df173,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x1df173,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x1df173,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x1df173,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x305b82){this['collection']['add'](_0x305b82);}['remove'](_0x2fb56a){this['collection']['remove'](_0x2fb56a),_0x2fb56a['destroy']();}['refreshVisibility'](){for(const _0x1fe557 of this['collection'])_0x1fe557['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3a0082){return this['collection']['getByInnerView'](_0x3a0082);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x30aedd of this['collection'])_0x30aedd['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x22f346){this['fire']('_activateAnnotation',_0x22f346);}['createAnnotation'](_0x2ceb13){return new T(_0x2ceb13);}['createAnnotationView'](_0x930b46,_0x231da8){return new E(_0x930b46,_0x231da8);}['_addActiveAnnotation'](_0x24794f){const _0x4acc77=new Set(this['activeAnnotations']);_0x4acc77['add'](_0x24794f),this['activeAnnotations']=_0x4acc77;}['_removeActiveAnnotation'](_0x5421e6){const _0x31975=new Set(this['activeAnnotations']);_0x31975['delete'](_0x5421e6),this['activeAnnotations']=_0x31975;}['_bindAnnotationsToVisibleAnnotations'](){const _0xf0990b=this['collection'],_0x333e21=this['_visibleAnnotations'];function _0x3ac22c(_0x16ca60){const _0x25c20d=_0x16ca60['source'];_0x25c20d['isVisible']&&!_0x333e21['has'](_0x25c20d)?_0x333e21['add'](_0x25c20d):!_0x25c20d['isVisible']&&_0x333e21['has'](_0x25c20d)&&_0x333e21['remove'](_0x25c20d),_0x25c20d['view']['focusTracker']['remove'](_0x25c20d['view']['element']),_0x25c20d['view']['focusTracker']['add'](_0x25c20d['view']['element']);}this['listenTo'](_0xf0990b,'add',(_0x34b188,_0x3ab2f2)=>{_0x3ab2f2['isVisible']&&_0x333e21['add'](_0x3ab2f2),this['listenTo'](_0x3ab2f2,'change:isVisible',_0x3ac22c);}),this['listenTo'](_0xf0990b,'remove',(_0x22f1d6,_0x34112e)=>{_0x333e21['has'](_0x34112e)&&_0x333e21['remove'](_0x34112e),this['stopListening'](_0x34112e,'change:isVisible',_0x3ac22c);});}['_setupEnterAnnotationKeystroke'](){const _0x1eead4=_0x1469c9=>{_0x1469c9['on']('ready',()=>{_0x1469c9['keystrokes']['set'](_0x4c09c6,(_0x5d8cea,_0xb915b6)=>{const _0x256bed=_0x3a1931(this['activeAnnotations']['values']());_0x256bed&&(_0x256bed['view']['focus'](),_0xb915b6());});});};this['context']instanceof _0x464974?_0x1eead4(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x268ab1,_0x5eada1)=>{_0x1eead4(_0x5eada1);});}['_setupEscapeAnnotationHandling'](){const _0x5de2f2=_0x329ee2=>{const _0x11af70=_0x329ee2['source'],_0x3fcc4d=[];let _0x114a2d;if(Array['isArray'](_0x11af70['target'])){_0x114a2d=_0x11af70['target'][0x0],this['context']instanceof _0x464974?_0x3fcc4d['push'](this['context']):this['context']['editors']&&_0x3fcc4d['push'](...this['context']['editors']);for(const _0x233248 of _0x3fcc4d)for(const _0x53654a of _0x233248['editing']['view']['domRoots']['values']())if(_0x53654a['contains'](_0x114a2d))return void _0x233248['editing']['view']['focus']();_0x114a2d['focus']();}};this['listenTo'](this['collection'],'add',(_0x5179d6,_0x4eb47)=>{this['listenTo'](_0x4eb47,'escape',_0x5de2f2,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x52fb77,_0x26e397)=>{this['stopListening'](_0x26e397,'escape',_0x5de2f2);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3e241b{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3cd3f6){super(_0x3cd3f6),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xacadc4=this['context']['config'];_0xacadc4['define']('comments.maxCommentsWhenCollapsed',0x2),_0xacadc4['define']('comments.maxThreadTotalWeight',0x1f4),_0xacadc4['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xacadc4['define']('comments.CommentThreadView',gt),_0xacadc4['define']('comments.CommentView',Tt),_0xacadc4['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5db853=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x793f89,_0x28dc02)=>this['_addCommentThread'](_0x28dc02)),this['on']('submitCommentThread',(_0x125f23,_0x358787)=>this['_submitCommentThread'](_0x358787)),this['on']('resolveCommentThread',(_0x332a90,_0x1e64fa)=>this['_resolveCommentThread'](_0x1e64fa)),this['on']('resolveCommentThread',(_0x3bb6d5,_0x511f3d)=>this['_updateActiveAnnotation'](_0x511f3d),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x55c0aa,_0x457183)=>this['_reopenCommentThread'](_0x457183)),this['on']('reopenCommentThread',(_0x2c7a33,_0x43c4a7)=>this['_updateActiveAnnotation'](_0x43c4a7),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2a721f,_0x3a7744)=>this['_removeCommentThread'](_0x3a7744)),this['on']('updateCommentThread',(_0x4bc62b,_0x1837f9)=>this['_updateCommentThread'](_0x1837f9)),this['on']('updateCommentThread',(_0x1e76ee,_0x5c6e75)=>this['_updateActiveAnnotation'](_0x5c6e75),{'priority':'lowest'}),this['on']('addComment',(_0x1a8006,_0x33eeb2)=>this['_addComment'](_0x33eeb2)),this['on']('updateComment',(_0x46a829,_0x2149c9)=>this['_updateComment'](_0x2149c9)),this['on']('removeComment',(_0x469b79,_0x490bd1)=>this['_removeComment'](_0x490bd1)),this['on']('addComment',(_0x86629d,{threadId:_0x523d8b,isFromAdapter:_0x3be36e})=>{if(_0x3be36e)return;const _0x56a2d5=this['getCommentThread'](_0x523d8b),_0xe58e56=_0x56a2d5&&this['_threadToController']['get'](_0x56a2d5);_0xe58e56&&_0xe58e56['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5db853,'change:activeAnnotations',(_0x21d0c7,_0x39adf8,_0xcd2ff9)=>{const _0x648bc9=Array['from'](_0xcd2ff9)['map'](_0x33c651=>this['_viewToController']['get'](_0x33c651['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x648bc9?_0x648bc9['model']:null;});}set['adapter'](_0x49a180){if(this['_adapter'])throw new _0xc716c1('commentsrepository-adapter-already-set');this['_adapter']=_0x49a180;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x56fb13=_t,threadId:_0x59eea2=_0x29df72(),comments:_0x9f6f3f=[],unlinkedAt:_0x58b6ac=null,resolvedAt:_0xc62baa=null,resolvedBy:_0x1036a1=null,target:_0x20c93f=null,context:_0x42de23=null,attributes:_0x568781={},isResolvable:_0x33b4a0=!0x0,isSubmitted:_0x25cbcc=!0x1,isFromAdapter:_0x3e589e=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x56fb13),{'channelId':_0x56fb13,'threadId':_0x59eea2,'comments':_0x9f6f3f,'unlinkedAt':_0x58b6ac,'resolvedAt':_0xc62baa,'resolvedBy':_0x1036a1,'target':_0x20c93f,'context':_0x42de23,'attributes':_0x568781,'isFromAdapter':_0x3e589e,'isResolvable':_0x33b4a0,'isSubmitted':_0x25cbcc}),this['getCommentThread'](_0x59eea2);}['openNewCommentThread']({channelId:_0xb65da7=_t,threadId:_0x41c857=_0x29df72(),target:_0x341cba,context:_0x126581=null,isResolvable:_0x48ae89=!0x0}){if(this['_readOnlyChannels']['has'](_0xb65da7)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x341cba)throw new _0xc716c1('commentsrepository-missing-target');const _0x5d5f4e=this['addCommentThread']({'channelId':_0xb65da7,'threadId':_0x41c857,'target':_0x341cba,'context':_0x126581,'isResolvable':_0x48ae89});if(!_0x5d5f4e)return null;const _0x26b21c=this['_threadToController']['get'](_0x5d5f4e),_0x2b7a2f=_0x26b21c['view']['commentThreadInputView']['commentInputView'],_0x4775d7=this['context']['plugins']['get'](y),_0x344177=_0x4775d7['getByInnerView'](_0x26b21c['view']);return _0x4775d7['activate'](_0x344177),_0x2b7a2f['once']('editorReady',()=>_0x2b7a2f['focus']()),_0x5d5f4e;}['hasCommentThread'](_0x72aef5){if('string'!=typeof _0x72aef5)throw new _0xc716c1('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x72aef5);}['updateCommentThread']({channelId:_0x5ecb42=_t,threadId:_0x5733c7,context:_0x4c0cdf,unlinkedAt:_0x67d0f0,attributes:_0x25fd65,isFromAdapter:_0x1dd161=!0x1}){return this['fire'](Nt('updateCommentThread',_0x5ecb42),{'channelId':_0x5ecb42,'threadId':_0x5733c7,'context':_0x4c0cdf,'unlinkedAt':_0x67d0f0,'attributes':_0x25fd65,'isFromAdapter':_0x1dd161}),this['getCommentThread'](_0x5733c7);}['getCommentThread'](_0x46ed69){if('string'!=typeof _0x46ed69)throw new _0xc716c1('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x46ed69);}['fetchCommentThread']({channelId:_0x319dad,threadId:_0x5f17ed}={}){const _0x2b8768=this['getCommentThread'](_0x5f17ed);if(_0x2b8768)return Promise['resolve'](_0x2b8768);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xc716c1('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x319dad,'threadId':_0x5f17ed})['then'](_0x2672e6=>this['hasCommentThread'](_0x5f17ed)?this['getCommentThread'](_0x5f17ed):_0x2672e6?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x319dad},_0x2672e6)):void 0x0)['catch'](_0x13e62b=>{throw console['error'](_0x13e62b),new _0xc716c1('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x31f661,skipNotAttached:_0x53af8c=!0x1,skipEmpty:_0x35c537=!0x1,toJSON:_0x249a5c=!0x1}={}){const _0x168c12=[];for(const _0x2756c4 of this['_threads']['values']())_0x31f661&&_0x2756c4['channelId']!==_0x31f661||_0x53af8c&&!_0x2756c4['isAttached']||_0x35c537&&0x0===_0x2756c4['length']||_0x168c12['push'](_0x2756c4);return _0x249a5c?_0x168c12['map'](_0x19573b=>_0x19573b['toJSON']()):_0x168c12;}['getAnnotationForCommentThread'](_0x3a3197){const _0x4d0b88=this['_threadToController']['get'](_0x3a3197);if(!_0x4d0b88)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x4d0b88['view'])||null;}['getCommentThreadForAnnotation'](_0x1bb729){const _0x2a3662=this['_viewToController']['get'](_0x1bb729['innerView']);return _0x2a3662?_0x2a3662['model']:null;}['setActiveCommentThread'](_0x4a39bd){const _0x4e8395=this['context']['plugins']['get'](y);if(!_0x4a39bd)return void(this['activeCommentThread']&&_0x4e8395['deactivateAll']());const _0x2f9554=this['getCommentThread'](_0x4a39bd);if(!_0x2f9554)throw new _0xc716c1('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4a39bd});if(!this['_threadToController']['has'](_0x2f9554))throw new _0xc716c1('commentsrepository-active-not-attached',null,{'threadId':_0x4a39bd});const _0x30010c=_0x4e8395['getByInnerView'](this['_threadToController']['get'](_0x2f9554)['view']);_0x4e8395['activate'](_0x30010c);}['switchReadOnly'](_0x356004,_0x4386e1){_0x356004?this['_readOnlyChannels']['add'](_0x4386e1):this['_readOnlyChannels']['delete'](_0x4386e1),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x1d423e){return this['_readOnlyChannels']['has'](_0x1d423e)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x134708,_0x37112b){return new vt(_0x134708,_0x37112b);}['setPermissions'](_0xc87370,_0x2c0e33=_t){this['_permissions']['set'](_0x2c0e33,_0xc87370),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x33553f=_t){return this['_permissions']['has'](_0x33553f)?this['_permissions']['get'](_0x33553f):bt;}['_addCommentThread']({channelId:_0x1e6c04,threadId:_0x1f7e08,comments:_0x48475b,unlinkedAt:_0x288426,resolvedAt:_0x34da70,resolvedBy:_0x4420e6,target:_0x4fef66,context:_0x407cc7,attributes:_0x1a3aaf,isFromAdapter:_0x4be012,isResolvable:_0x480c96,isSubmitted:_0x32c77f}){if('string'!=typeof _0x1f7e08)throw new _0xc716c1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1f7e08});if(this['hasCommentThread'](_0x1f7e08))throw new _0xc716c1('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1f7e08});const _0x9219c=new Ti(this,{'channelId':_0x1e6c04,'id':_0x1f7e08,'context':_0x407cc7,'attributes':_0x1a3aaf,'unlinkedAt':_0x288426,'resolvedAt':_0x34da70,'resolvedBy':_0x4420e6?this['context']['plugins']['get'](it)['getUser'](_0x4420e6):null,'isResolvable':_0x480c96,'isSubmitted':_0x32c77f||_0x4be012});this['_threads']['set'](_0x1f7e08,_0x9219c);for(const _0x1eabfd of _0x48475b)_0x9219c['_add'](this['_createNewComment']({'threadId':_0x1f7e08,..._0x1eabfd}));return _0x4fef66&&_0x9219c['attachTo'](_0x4fef66),_0x4be012||!_0x9219c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1e6c04,'threadId':_0x1f7e08});}['_submitCommentThread']({channelId:_0x418d14,threadId:_0x4359fd}){if(!this['hasCommentThread'](_0x4359fd))throw new _0xc716c1('commentsrepository-missing-comment-thread',this);const _0x5de95c=this['getCommentThread'](_0x4359fd);if(_0x5de95c['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x119d2a,comments:_0x3413c0,resolvedAt:_0x57dd35,resolvedBy:_0xdbddb5,context:_0x3a2300,attributes:_0x261973}=_0x5de95c,_0x42ec40=this['context']['plugins']['get']('PendingActions'),_0x31c10f=_0x42ec40['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x418d14,'threadId':_0x119d2a,'comments':_0x3413c0['map'](_0x2ae8e9=>_0x2ae8e9['toJSON']()),'resolvedAt':_0x57dd35,'resolvedBy':_0xdbddb5?_0xdbddb5['id']:_0xdbddb5,'context':_0x3a2300,'attributes':_0x261973})['then'](({comments:_0x311585})=>{_0x42ec40['remove'](_0x31c10f);for(const _0x5ba865 of _0x311585)this['_updateComment']({'channelId':_0x418d14,'threadId':_0x4359fd,'commentId':_0x5ba865['commentId'],'createdAt':_0x5ba865['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x6e457f=>{throw console['error'](_0x6e457f),new _0xc716c1('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x403397,target:_0x557c92}){const _0xedfb94=this['getCommentThread'](_0x403397);if(!_0xedfb94)throw new _0xc716c1('commentsrepository-attach-missing-comment-thread',this);const _0x215707=this['context']['plugins']['get']('PendingActions'),_0x2263ff=this['context']['plugins']['get'](y),_0x14350d=this['_createCommentThreadView'](_0xedfb94),_0x50b248=new vt(_0xedfb94,_0x14350d);let _0x4c37b3=null;_0x14350d['on']('change:isDirty',(_0x494074,_0x3e9e5b,_0x1f214a)=>{_0x1f214a?_0x4c37b3=_0x215707['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4c37b3&&(_0x215707['remove'](_0x4c37b3),_0x4c37b3=null);}),this['_threadToController']['set'](_0xedfb94,_0x50b248),this['_viewToController']['set'](_0x14350d,_0x50b248);const _0x38d3ab=new E(this['context']['locale'],_0x14350d);_0x38d3ab['bind']('length')['to'](_0x14350d),_0x38d3ab['bind']('isDirty')['to'](_0x14350d,'isDirty',_0x14350d,'length',(_0x2dece0,_0x4c261e)=>_0x2dece0||!_0x4c261e),_0x38d3ab['bind']('isActive')['to'](_0x14350d),_0x38d3ab['type']='comment';const _0x3ffd6b=new T({'view':_0x38d3ab,'target':_0x557c92,'type':'comment','isVisible':!_0xedfb94['archivedAt']&&!!('function'==typeof _0x557c92?_0x557c92():_0x557c92)});return _0x14350d['on']('escape',()=>{_0x3ffd6b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x14350d,_0x3ffd6b),_0x2263ff['add'](_0x3ffd6b),_0x3ffd6b;}['_bindAnnotationToEditors'](_0x3fdd37,_0x48d4d0){this['listenTo'](_0x3fdd37,'editorReady',(_0x44fc36,_0x16e541)=>{const _0x22d5d1=_0x16e541['ui']['view']['body']['bodyCollectionContainer'];_0x48d4d0['focusableElements']['add'](_0x22d5d1),this['context']instanceof _0x464974&&this['context']['ui']['focusTracker']['add'](_0x22d5d1);},{'priority':'highest'}),this['listenTo'](_0x3fdd37,'editorDestroyed',(_0x3f894e,_0x1d86a3)=>{const _0x3f96b7=_0x1d86a3['ui']['view']['body']['bodyCollectionContainer'];_0x48d4d0['focusableElements']['has'](_0x3f96b7)&&_0x48d4d0['focusableElements']['remove'](_0x3f96b7),this['context']instanceof _0x464974&&this['context']['ui']['focusTracker']['remove'](_0x3f96b7);});}['_unbindEditors'](_0x56c3d2){this['stopListening'](_0x56c3d2,'editorReady'),this['stopListening'](_0x56c3d2,'editorDestroyed');}['_createCommentThreadView'](_0x319328){const _0x36887f=this['context']['plugins']['get'](it),{config:_0x158f13,locale:_0x1987bb}=this['context'],_0x1d673a=pt(_0x158f13['get']('locale'),_0x1987bb);return new(0x0,(_0x158f13['get']('comments'))['CommentThreadView'])(_0x1987bb,_0x319328,_0x36887f['me'],{'editorConfig':{..._0x158f13['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x158f13['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x158f13['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x158f13['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x158f13['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1d673a,'CommentView':_0x158f13['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x111295,channelId:_0x18f003,resolvedAt:_0x28243a,resolvedBy:_0x28caa4,isFromAdapter:_0x353034}){if(!this['hasCommentThread'](_0x111295))throw new _0xc716c1('commentsrepository-missing-comment-thread',null,{'threadId':_0x111295});const _0x12d38c=this['getCommentThread'](_0x111295);if(_0x12d38c['isResolved'])throw new _0xc716c1('commentsrepository-resolved-comment-thread',null,{'threadId':_0x111295});const _0x5172d1=this['context']['plugins']['get'](it);if(_0x12d38c['resolvedBy']=_0x5172d1['getUser'](_0x28caa4),_0x12d38c['resolvedAt']=_0x28243a,_0x353034||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1bb194=this['context']['plugins']['get']('PendingActions'),_0x11ecfb=_0x1bb194['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x18f003,'threadId':_0x111295})['then'](({resolvedAt:_0xf265ed,resolvedBy:_0x5d683d})=>{_0x1bb194['remove'](_0x11ecfb),_0x12d38c['resolvedBy']['id']!==_0x5d683d&&(_0x12d38c['resolvedBy']=_0x5172d1['getUser'](_0x5d683d)),_0x12d38c['resolvedAt']=_0xf265ed;})['catch'](_0xfaa146=>{throw console['error'](_0xfaa146),new _0xc716c1('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x441f4b,channelId:_0x1d1d8a,isFromAdapter:_0x37e895}){if(!this['hasCommentThread'](_0x441f4b))throw new _0xc716c1('commentsrepository-missing-comment-thread',null,{'threadId':_0x441f4b});const _0x3ab3a2=this['getCommentThread'](_0x441f4b);if(!_0x3ab3a2['isResolved'])throw new _0xc716c1('commentsrepository-reopen-comment-thread',null,{'threadId':_0x441f4b});if(_0x3ab3a2['resolvedBy']=null,_0x3ab3a2['resolvedAt']=null,_0x37e895||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x14d703=this['context']['plugins']['get']('PendingActions'),_0x3faa63=_0x14d703['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1d1d8a,'threadId':_0x441f4b})['then'](()=>_0x14d703['remove'](_0x3faa63))['catch'](_0x5a8d02=>{throw console['error'](_0x5a8d02),new _0xc716c1('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1f3e08,isFromAdapter:_0xa5f0ae}){const _0x85dc1c=this['getCommentThread'](_0x1f3e08);if(!_0x85dc1c)throw new _0xc716c1('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1f3e08),this['_threads']['delete'](_0x1f3e08),!_0x85dc1c['isSubmitted']||_0xa5f0ae||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4dab00=this['context']['plugins']['get']('PendingActions'),{channelId:_0x31feee}=_0x85dc1c,_0x2d8c7c=_0x4dab00['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x31feee,'threadId':_0x1f3e08})['then'](()=>_0x4dab00['remove'](_0x2d8c7c))['catch'](_0xd033dd=>{throw console['error'](_0xd033dd),new _0xc716c1('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1efe5a,unlinkedAt:_0x1606f6,context:_0x2827b9,attributes:_0x2e29c7,isFromAdapter:_0x4fc23f}){if('string'!=typeof _0x1efe5a)throw new _0xc716c1('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1efe5a});if(!this['hasCommentThread'](_0x1efe5a))throw new _0xc716c1('commentsrepository-missing-comment-thread',null,{'threadId':_0x1efe5a});const _0x59ed52=this['getCommentThread'](_0x1efe5a);let _0x3b2e91=!0x1;if(void 0x0!==_0x2827b9&&_0x59ed52['context']!==_0x2827b9&&(_0x59ed52['context']=_0x2827b9,_0x3b2e91=!0x0),void 0x0!==_0x1606f6&&_0x59ed52['unlinkedAt']!==_0x1606f6&&(_0x59ed52['unlinkedAt']=_0x1606f6,_0x3b2e91=!0x0),_0x2e29c7&&!At(_0x2e29c7,_0x59ed52['attributes'])&&(_0x59ed52['attributes']=_0x2e29c7,_0x3b2e91=!0x0),!_0x3b2e91)return Promise['resolve']();if(!_0x59ed52['isSubmitted']||_0x4fc23f||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x241b75=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4f68df}=_0x59ed52,_0x4a3f02=_0x241b75['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4f68df,'threadId':_0x1efe5a,'context':_0x2827b9,'unlinkedAt':_0x1606f6,'attributes':_0x2e29c7})['then'](()=>_0x241b75['remove'](_0x4a3f02))['catch'](_0x401e0b=>{throw console['error'](_0x401e0b),new _0xc716c1('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3d4b61){const _0x281e57=this['context']['plugins']['get'](y),_0x3197a5=this['getCommentThread'](_0x3d4b61);if(_0x3197a5['_isAttached']=!0x1,this['_threadToController']['has'](_0x3197a5)){const _0x3a879f=this['_threadToController']['get'](_0x3197a5),_0x550240=_0x3a879f['view'],_0x126c9d=_0x281e57['getByInnerView'](_0x550240);this['_threadToController']['delete'](_0x3197a5),this['_viewToController']['delete'](_0x550240),_0x126c9d&&_0x281e57['remove'](_0x126c9d),_0x3a879f['destroy'](),_0x550240['destroy']()['then'](()=>{this['_unbindEditors'](_0x550240);});}}['_updateActiveAnnotation']({threadId:_0xa9f410,resolvedAt:_0x27c61f,unlinkedAt:_0x47e999}){const _0x1433a2=!!_0x27c61f,_0x563452=this['context']['plugins']['get'](y),_0x5d2c56=this['getCommentThread'](_0xa9f410);if(this['_threadToController']['has'](_0x5d2c56)){const _0x517ff9=this['_threadToController']['get'](_0x5d2c56)['view'],_0xe0326c=_0x563452['getByInnerView'](_0x517ff9);_0xe0326c&&(_0x1433a2&&_0x563452['_removeActiveAnnotation'](_0xe0326c),_0x47e999?_0xe0326c['isVisible']=!0x1:_0xe0326c['refreshVisibility']());}}['_getExternalAuthor'](_0xb4498a){const _0x47581c=this['context']['plugins']['get'](it),_0x1737ff=It('external:'+_0xb4498a),_0x91e79=_0x47581c['getUser'](_0x1737ff);return _0x91e79||_0x47581c['addUser']({'id':_0x1737ff,'name':_0xb4498a});}['_createNewComment']({threadId:_0x209d61,commentId:_0x443684=_0x29df72(),content:_0x2f3c8e,authorId:_0x366bac,createdAt:_0x45c512,attributes:_0x46dd88}){if('string'!=typeof _0x443684)throw new _0xc716c1('commentsrepository-invalid-commentid');if('string'!=typeof _0x366bac)throw new _0xc716c1('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2f3c8e||!_0x2f3c8e['trim']())throw new _0xc716c1('commentsrepository-invalid-comment-content');const _0x4ca38a=this['context']['plugins']['get'](it)['getUser'](_0x366bac);if(!_0x4ca38a)throw new _0xc716c1('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x366bac});let _0x5b0f71=null,_0x4f798b=_0x45c512;return _0x46dd88?.['@external']&&(_0x5b0f71=this['_getExternalAuthor'](_0x46dd88['@external']['authorName']),_0x4f798b=new Date(_0x46dd88['@external']['createdAt'])),new yi(this,{'threadId':_0x209d61,'id':_0x443684,'author':_0x5b0f71||_0x4ca38a,'creator':_0x4ca38a,'content':_0x2f3c8e,'createdAt':_0x45c512,'authoredAt':_0x4f798b,'attributes':_0x46dd88});}['_addComment'](_0x360a8c){let {threadId:_0x4767f7,content:_0x9cb5b8,attributes:_0x22d8d8,isFromAdapter:_0x2b85a2}=_0x360a8c;const _0x14dcef=this['getCommentThread'](_0x360a8c['threadId']);if(!_0x14dcef)throw new _0xc716c1('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x35da18=this['_createNewComment'](_0x360a8c),{id:_0x1414b7}=_0x35da18;if(_0x14dcef['_add'](_0x35da18),_0x2b85a2||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x14dcef['isSubmitted'])return Promise['resolve']();const _0x369eee=this['context']['plugins']['get']('PendingActions'),{channelId:_0x31a663}=_0x14dcef,_0x14578d=_0x369eee['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x22d8d8||(_0x22d8d8={}),this['adapter']['addComment']({'channelId':_0x31a663,'threadId':_0x4767f7,'commentId':_0x1414b7,'content':_0x9cb5b8,'attributes':_0x22d8d8})['then'](_0x5d68a4=>{_0x369eee['remove'](_0x14578d),_0x5d68a4&&this['_updateComment']({'channelId':_0x31a663,'threadId':_0x4767f7,'commentId':_0x1414b7,'createdAt':_0x5d68a4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x805ae9=>{throw console['error'](_0x805ae9),new _0xc716c1('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x20c049,commentId:_0x5f0204,content:_0x41e1d5,createdAt:_0x54cb62,attributes:_0x213f4b,isFromAdapter:_0x252d6c}){if(void 0x0!==_0x41e1d5&&('string'!=typeof _0x41e1d5||!_0x41e1d5['trim']()['length']))throw new _0xc716c1('commentsrepository-update-comment-invalid-content');const _0x42b5c1=this['getCommentThread'](_0x20c049),_0x3e92e9=_0x42b5c1['getComment'](_0x5f0204);if(!_0x3e92e9)throw new _0xc716c1('commentsrepository-update-missing-comment',this);let _0x147324=!0x1;if(_0x41e1d5&&_0x41e1d5!==_0x3e92e9['content']&&(_0x3e92e9['isEditable']||_0x252d6c)&&(_0x3e92e9['content']=_0x41e1d5,_0x147324=!0x0),_0x54cb62&&_0x54cb62!==_0x3e92e9['createdAt']&&(_0x3e92e9['createdAt']=_0x54cb62,_0x3e92e9['attributes']&&_0x3e92e9['attributes']['@external']||(_0x3e92e9['authoredAt']=_0x54cb62),_0x147324=!0x0),_0x213f4b&&!At(_0x213f4b,_0x3e92e9['attributes'])&&(_0x3e92e9['attributes']=_0x213f4b,_0x147324=!0x0),!_0x147324)return Promise['resolve']();if(_0x42b5c1['fire']('commentUpdated'),_0x252d6c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x41bd3b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x49e9dd}=this['getCommentThread'](_0x3e92e9['threadId']),_0x7bbdaa=_0x41bd3b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x49e9dd,'threadId':_0x20c049,'commentId':_0x5f0204,'content':_0x41e1d5,'attributes':_0x213f4b})['then'](()=>_0x41bd3b['remove'](_0x7bbdaa))['catch'](_0x576d76=>{throw console['error'](_0x576d76),new _0xc716c1('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x15a87a,commentId:_0x3bf7b5,isFromAdapter:_0x5d6d65}){const _0x1961e8=this['getCommentThread'](_0x15a87a),_0x582d70=_0x1961e8['getComment'](_0x3bf7b5);if(!_0x582d70)throw new _0xc716c1('commentsrepository-remove-missing-comment',this);if(_0x1961e8['_remove'](_0x582d70),_0x5d6d65||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xa9adfe=this['context']['plugins']['get']('PendingActions'),{channelId:_0x256839}=_0x1961e8,_0xbaaef6=_0xa9adfe['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x256839,'threadId':_0x15a87a,'commentId':_0x3bf7b5})['then'](()=>_0xa9adfe['remove'](_0xbaaef6))['catch'](_0x1ed5e7=>{throw console['error'](_0x1ed5e7),new _0xc716c1('commentsrepository-remove-comment-internal-error',this);});}}class Ti extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x457f69(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0xed4317,_0x494408){super();const _0x44275f=_0x494408['isResolvable'];this['channelId']=_0x494408['channelId'],this['id']=_0x494408['id'],this['comments']=new _0x214515(),this['_repository']=_0xed4317,this['_isAttached']=!0x1,this['_isSubmitted']=_0x494408['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xed4317,'_permissions',_0xed4317,'_readOnlyChannels',()=>_0xed4317['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xed4317,'_permissions',()=>_0xed4317['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xed4317,'_permissions',()=>{const _0x22a68b=_0xed4317['getPermissions'](this['channelId']);return _0x22a68b['write']||_0x22a68b['admin'];}),this['bind']('isResolvable')['to'](_0xed4317,'_permissions',()=>_0x44275f&&_0xed4317['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x494408['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x504233,_0x5f06ed)=>_0x504233?_0x5f06ed?_0x504233<_0x5f06ed?_0x504233:_0x5f06ed:_0x504233:_0x5f06ed),this['set']('unlinkedAt',_0x494408['unlinkedAt']||null),this['set']('resolvedAt',_0x494408['resolvedAt']||null),this['set']('resolvedBy',_0x494408['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x18e4c0=>!!_0x18e4c0),this['set']('attributes',_0x494408['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x44838a,_0x262bb5)=>_0x44838a+_0x262bb5['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x2741d9,id:_0x47286f}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x2741d9),{'channelId':_0x2741d9,'threadId':_0x47286f});}['setUnlinkedAt'](_0x43f4e8){this['_update']({'unlinkedAt':_0x43f4e8});}['resolve']({resolvedAt:_0x594d5c=new Date(),resolvedBy:_0x2ee12d=null,isFromAdapter:_0xfc8624=!0x1}={}){const _0x35b999=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0xfd77b8,id:_0x2a00f2}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0xfd77b8),{'channelId':_0xfd77b8,'threadId':_0x2a00f2,'resolvedAt':_0x594d5c,'resolvedBy':_0x2ee12d||_0x35b999['id'],'isFromAdapter':_0xfc8624});}['reopen']({isFromAdapter:_0x11a2f1=!0x1}={}){const {channelId:_0x2398db,id:_0x163f94}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x2398db),{'channelId':_0x2398db,'threadId':_0x163f94,'isFromAdapter':_0x11a2f1});}['setContext'](_0x3d9553){this['context']||this['_update']({'context':_0x3d9553});}['setAttribute'](_0x9148dd,_0x3adb82){const _0x20ba0c=wt(this['attributes']);yt(_0x20ba0c,_0x9148dd,_0x3adb82),this['_update']({'attributes':_0x20ba0c});}['removeAttribute'](_0x19a412){const _0x50ee43=wt(this['attributes']);Ct(_0x50ee43,_0x19a412),this['_update']({'attributes':_0x50ee43});}['remove']({isFromAdapter:_0x26e1e1=!0x1}={}){const {channelId:_0x2d3935,id:_0x359c69}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x2d3935),{'channelId':_0x2d3935,'threadId':_0x359c69,'isFromAdapter':_0x26e1e1});}['attachTo'](_0xa0b9a3){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xa0b9a3});}['addComment'](_0x4446d7){const {channelId:_0x4d5767,id:_0x2d3fb8}=this;this['_repository']['fire'](Nt('addComment',_0x4d5767,_0x2d3fb8),Object['assign']({'channelId':_0x4d5767,'threadId':_0x2d3fb8},_0x4446d7));}['getComment'](_0x562d5f){if('string'!=typeof _0x562d5f)throw new _0xc716c1('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x562d5f});return this['comments']['get'](_0x562d5f);}['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'](_0x37bbef=>_0x37bbef['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2b0196){return this['listenTo'](_0x2b0196,'change:authoredAt',()=>{const _0x2d63f8=this['_findOptimalIndex'](_0x2b0196),_0x197217=this['comments'];_0x2d63f8-0x1!=_0x197217['getIndex'](_0x2b0196)&&_0x2d63f8+0x1!=_0x197217['getIndex'](_0x2b0196)&&(this['_remove'](_0x2b0196),this['_add'](_0x2b0196));}),this['comments']['add'](_0x2b0196,this['_findOptimalIndex'](_0x2b0196));}['_update'](_0x25fe54){const {channelId:_0x2e29f1,id:_0x322dfc}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x2e29f1),{..._0x25fe54,'channelId':_0x2e29f1,'threadId':_0x322dfc});}['_remove'](_0x23e335){return this['stopListening'](_0x23e335),_0x23e335['destroy'](),this['comments']['remove'](_0x23e335);}['_findOptimalIndex'](_0x45c7d3){const _0x5ca8d5=this['comments']['find'](_0x15f1c9=>new Date(_0x15f1c9['authoredAt'])['getTime']()>new Date(_0x45c7d3['authoredAt'])['getTime']());return _0x5ca8d5?this['comments']['getIndex'](_0x5ca8d5):this['length'];}}class yi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x457f69(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5ceb88,_0x217995){super();const _0x5171f0=_0x5ceb88['context']['plugins']['get'](it)['me'],_0x289462=_0x5ceb88['getCommentThread'](_0x217995['threadId']),_0x56b94a=0x0===_0x289462['comments']['length'],_0x277f00=_0x5171f0===_0x217995['author'];this['id']=_0x217995['id'],this['threadId']=_0x217995['threadId'],this['author']=_0x217995['author'],this['creator']=_0x217995['creator'],this['isExternal']=Boolean(_0x217995['attributes']&&_0x217995['attributes']['@external']),this['set']('content',_0x217995['content']),this['createdAt']=_0x217995['createdAt']||new Date(),this['set']('authoredAt',_0x217995['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x289462,'resolvedAt'),this['set']('attributes',_0x217995['attributes']||{}),this['bind']('isEditable')['to'](_0x5ceb88,'_permissions',()=>{const _0x539d4a=_0x5ceb88['getPermissions'](_0x289462['channelId'])['write'],_0x540579=_0x5ceb88['getPermissions'](_0x289462['channelId'])['modifyAll'];return _0x277f00&&_0x539d4a||!_0x277f00&&_0x540579;}),this['bind']('isRemovable')['to'](_0x289462,'isRemovable',_0x5ceb88,'_permissions',_0x582063=>{const _0x3a3d48=_0x5ceb88['getPermissions'](_0x289462['channelId'])['write'],_0x57c85b=_0x5ceb88['getPermissions'](_0x289462['channelId'])['modifyAll'];return _0x277f00&&_0x3a3d48||_0x582063&&_0x56b94a||!_0x277f00&&_0x57c85b&&!_0x56b94a;}),this['bind']('isReadOnly')['to'](_0x289462,'isReadOnly'),this['_repository']=_0x5ceb88;}get['weight'](){return Math['max'](function(_0x4a95c2){const _0x5b99b7=document['createElement']('div');return _0x5b99b7['innerHTML']=_0x4a95c2,_0x5b99b7['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3c25f2){const {threadId:_0x300e51,id:_0x972bbd}=this;if(!this['_repository']['hasCommentThread'](_0x300e51))throw new _0xc716c1('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x43b71d}=this['_repository']['getCommentThread'](_0x300e51);this['_repository']['fire'](Nt('updateComment',_0x43b71d,_0x300e51),{'channelId':_0x43b71d,'threadId':_0x300e51,'commentId':_0x972bbd,..._0x3c25f2});}['setAttribute'](_0x452f23,_0x2e1bcb){const _0x3460f9=wt(this['attributes']);yt(_0x3460f9,_0x452f23,_0x2e1bcb),this['update']({'attributes':_0x3460f9});}['removeAttribute'](_0x68faff){const _0x31cc78=wt(this['attributes']);Ct(_0x31cc78,_0x68faff),this['update']({'attributes':_0x31cc78});}['remove'](_0x225f42={}){if(!_0x225f42['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x4cb13f,id:_0x1e49bb}=this;if(!this['_repository']['hasCommentThread'](_0x4cb13f))throw new _0xc716c1('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x382c26}=this['_repository']['getCommentThread'](_0x4cb13f);this['_repository']['fire'](Nt('removeComment',_0x382c26,_0x4cb13f),{'channelId':_0x382c26,'threadId':_0x4cb13f,'commentId':_0x1e49bb,..._0x225f42});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0xdb15cc,..._0x34618f){for(const _0x1680a9 of _0x34618f)void 0x0!==_0x1680a9&&(_0xdb15cc+=':'+String(_0x1680a9));return _0xdb15cc;}class ot extends _0x2768e0{constructor(_0x47b2fb){super(_0x47b2fb),this['set']('hasContent',!0x1);}['refresh'](){const _0x1269af=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x50592c of _0x1269af['getRanges']())if(this['_hasContent'](_0x50592c))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3beefe=_0x29df72(),ranges:_0x3f8dd1,comment:_0x5e87b7}={}){const _0x11d22e=this['editor']['model'],_0x222905=_0x3f8dd1??Array['from'](_0x11d22e['document']['selection']['getRanges']()),_0x47633a=[];for(const _0x3418a0 of _0x222905)this['_hasContent'](_0x3418a0)&&_0x47633a['push'](this['_trimToContent'](_0x3418a0));if(!_0x47633a['length'])throw new _0xc716c1('addcommentthreadcommand-incorrect-ranges',null);_0x5e87b7&&this['_createCommentThread'](_0x3beefe,_0x5e87b7),this['_createMarkersFromRanges'](_0x3beefe,_0x47633a,!!_0x5e87b7);}['_createMarkersFromRanges'](_0x61db8b,_0x5ddcef,_0x16ae79){this['editor']['model']['change'](_0x3346e0=>{for(const _0x2b4934 of _0x5ddcef){const _0x367f73=_0x29df72()['substr'](0x1,0x5),_0x4cbf10='comment:'+_0x61db8b+':'+_0x367f73;_0x3346e0['addMarker'](_0x4cbf10,{'range':_0x2b4934,'usingOperation':_0x16ae79,'affectsData':_0x16ae79});}});}['_createCommentThread'](_0x45a24e,_0x3ae3cb){const _0xb008c4=this['editor']['plugins']['get']('CommentsRepository'),_0x1d9785=this['editor']['config']['get']('collaboration.channelId'),_0x16e7f4=this['editor']['plugins']['get']('Users')['me'];if(!_0x16e7f4)throw new _0xc716c1('addcommentthreadcommand-user-not-found',null);_0xb008c4['addCommentThread']({'threadId':_0x45a24e,'channelId':_0x1d9785,'comments':[{'authorId':_0x16e7f4['id'],'content':_0x3ae3cb,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x203f42){for(const _0x35365f of _0x203f42['getItems']())if(this['_itemIsContent'](_0x35365f))return!0x0;return!0x1;}['_itemIsContent'](_0x381fc5){return _0x381fc5['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x381fc5)&&!_0x381fc5['is']('element','tableCell');}['_trimToContent'](_0x395e70){const _0x75b7a3=_0x5ee811=>!this['_itemIsContent'](_0x5ee811['item']),_0x398a08=_0x395e70['start']['getLastMatchingPosition'](_0x75b7a3),_0x42f9af=_0x395e70['end']['getLastMatchingPosition'](_0x75b7a3,{'direction':'backward'});return this['editor']['model']['createRange'](_0x398a08,_0x42f9af);}}class b extends _0x5753fc{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3aa501){super(_0x3aa501),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3059ef=this['editor'],_0x4a7463=_0x3059ef['model']['document']['selection'],_0xe0cd99=_0x324384(()=>this['refreshSelectedViews'](),0xa);_0x4a7463['on']('change:range',(_0x1daebf,_0x45dc40)=>{_0x45dc40['directChange']&&(_0xe0cd99['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3059ef['editing']['view']['document'],'change:isFocused',(_0x2de8c6,_0x433c49,_0x1bcc86)=>{_0x1bcc86&&_0xe0cd99();}),this['listenTo'](_0x3059ef['ui']['focusTracker'],'change:isFocused',(_0x53ff18,_0x3dc7f9,_0x3c1bf4)=>{_0x3c1bf4||this['fire']('blur',{'isAnnotationTracked':_0x524641=>this['_editorAnnotationsData']['has'](_0x524641['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x35da86){if(this['_editorAnnotations']['has'](_0x35da86['view']))return;this['_editorAnnotations']['add'](_0x35da86['view']),this['editor']['ui']['focusTracker']['add'](_0x35da86['view']['element']);const _0x1e2d12=this['editor']['plugins']['get'](y);this['listenTo'](_0x1e2d12['collection'],'remove',(_0x244908,_0xe7fad0)=>{this['editor']['ui']['focusTracker']['remove'](_0xe7fad0['view']['element']),this['_editorAnnotations']['delete'](_0xe7fad0['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x5320aa){if('function'!=typeof _0x5320aa)throw new _0xc716c1('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x5320aa);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x42e12d,annotations:_0xeb2ccf}){const _0x93b511=[],_0x51f178=this['editor']['model']['document']['selection'],_0x365155=Array['from'](_0x51f178['getRanges']());for(const [_0x1e12d3,_0x3e0401]of this['_editorAnnotationsData']){const _0x5d8032=_0x4f1103(_0x3e0401),_0xa7dc44=_0xeb2ccf['getByInnerView'](_0x1e12d3);_0x5d8032&&_0xa7dc44&&_0x93b511['push']({'annotation':_0xa7dc44,'range':_0x5d8032});}function _0x4f1103(_0x50f4ce){for(const _0x56889b of _0x50f4ce)for(const _0xf5815d of _0x365155)if(_0x56889b['containsRange'](_0xf5815d,!_0x51f178['isCollapsed']))return _0x56889b;return null;}return _0x93b511['sort']((_0x4765e2,_0xc4caf8)=>{const _0x2d0eca=_0x4765e2['range'],_0x46d600=_0xc4caf8['range'];if(!_0x2d0eca['isEqual'](_0x46d600)){if(_0x2d0eca['containsRange'](_0x46d600,!0x0))return 0x1;if(_0x46d600['containsRange'](_0x2d0eca,!0x0))return-0x1;}return _0x4765e2['annotation']==_0x42e12d?-0x1:_0xc4caf8['annotation']==_0x42e12d?0x1:0x0;})['map'](_0x3d5eb0=>_0x3d5eb0['annotation']);}get['_editorAnnotationsData'](){const _0x1ffb4e=new Map();for(const _0x9bd387 of Array['from'](this['_dataCollectors']))for(const [_0x407273,_0x575a0d]of _0x9bd387())_0x1ffb4e['set'](_0x407273,_0x575a0d);return _0x1ffb4e;}}class st extends _0x5753fc{['afterInit'](){const _0x4fa733=this['editor'];if(!_0x4fa733['plugins']['has']('RestrictedEditingModeEditing'))return;_0x4fa733['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x5753fc{constructor(_0x33b2e2){super(_0x33b2e2),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x51d1ed=this['editor'],_0x7700fe=_0x51d1ed['commands']['get']('importWord'),_0xd892b8=_0x51d1ed['plugins']['get'](it);_0x7700fe&&(_0x7700fe['on']('execute',(_0x57ffd5,[,_0x18659b])=>{_0x18659b['collaboration_features']={'comments':!0x0,'user_id':_0xd892b8['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x7700fe,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1448c4,_0x24bb98){const {comment_threads:_0x5be6f9}=_0x24bb98;_0x5be6f9&&_0x5be6f9['forEach'](({thread_id:_0x43c677,comments:_0x240c22,is_resolved:_0x1599a7})=>{const _0x27f2c7=new Date(),_0x45149e=_0x240c22['map'](({author:_0x3989d9,content:_0x24de51,created_at:_0x3b34c7})=>({'content':_0x24de51,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x27f2c7,'attributes':{'@external':{'authorName':_0x3989d9,'createdAt':_0x3b34c7?new Date(_0x3b34c7):new Date(),'source':'importWord'}}})),_0x419281=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x419281,'threadId':_0x43c677,'comments':_0x45149e,'resolvedAt':_0x1599a7?_0x27f2c7:null});});}}class at extends _0x5753fc{constructor(_0x4d11d3){super(_0x4d11d3),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x30dfe2=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x30dfe2,'contentInsertion',(_0x5f4e6c,_0x4fda85)=>this['_removeMarkersWithoutThreads'](_0x4fda85['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x74db4d){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x74db4d;const _0x2b8e89=this['editor']['plugins']['get']('CommentsRepository');for(const _0xfa63b of _0x74db4d['keys']()){const [_0x23420f,_0x4329ca]=_0xfa63b['split'](':');'comment'!=_0x23420f||_0x2b8e89['hasCommentThread'](_0x4329ca)||_0x74db4d['delete'](_0xfa63b);}return _0x74db4d;}['_registerMarkerInClipboardPipeline'](){const _0x342804=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x427013=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x427013&&_0x342804['_registerMarkerToCopy']('comment',_0x427013);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x45234d){switch(_0x45234d){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x25025b){const _0x292275=_0x25025b['split'](':');return{'group':_0x292275[0x0],'id':_0x292275[0x1],'part':_0x292275[0x2]};}class ut extends _0x5753fc{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x5130cd,_0x4c32c2)=>{if(!_0x4c32c2['options']['showCommentHighlights'])return null;if(_0x4c32c2['options']['ignoreResolvedComments']){const {id:_0x81772c}=ft(_0x5130cd['markerName']),_0x32a26e=this['editor']['plugins']['get'](o);if(_0x32a26e['getCommentThread'](_0x81772c)?.['isResolved']&&_0x5130cd['item'])return _0x4c32c2['consumable']['consume'](_0x5130cd['item'],'addMarker:'+_0x5130cd['markerName']),_0x4c32c2['consumable']['consume'](_0x5130cd['item'],'removeMarker:'+_0x5130cd['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3def4e=>{_0x3def4e['on']('addMarker:comment',(_0x33174a,_0x5c174c,_0x1c7323)=>{if(!_0x1c7323['options']['showCommentHighlights'])return;const _0x4b99f0=_0x5c174c['item'];if(!_0x4b99f0)return;const _0x579ebe=_0x1c7323['mapper']['toViewElement'](_0x4b99f0);this['editor']['model']['schema']['isObject'](_0x4b99f0)&&_0x579ebe&&!_0x579ebe['getCustomProperty']('widget')&&_0x579ebe['is']('containerElement')&&_0x2a2fd1(_0x579ebe,_0x1c7323['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2fc906,{writer:_0x280a8d,options:_0x12fbfc})=>{if(!_0x12fbfc['showCommentHighlights'])return null;const _0x5244c3=_0x280a8d['createContainerElement']('div'),_0x2b4d02=_0x280a8d['createEmptyElement']('hr');return _0x280a8d['addClass']('ck-horizontal-line',_0x5244c3),_0x280a8d['insert'](_0x280a8d['createPositionAt'](_0x5244c3,0x0),_0x2b4d02),_0x5244c3;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x27c8fb,{writer:_0x5eda45,options:_0x537173})=>{if(!_0x537173['showCommentHighlights'])return null;const _0x47971c=_0x5eda45['createContainerElement']('span'),_0xd28a05=_0x5eda45['createEmptyElement']('img');return _0x5eda45['addClass']('image-inline',_0x47971c),_0x5eda45['insert'](_0x5eda45['createPositionAt'](_0x47971c,0x0),_0xd28a05),_0x47971c;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4a90ec,{writer:_0x41e821,options:_0x315587})=>{if(_0x315587['showCommentHighlights'])return _0x41e821['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1c9323,_0x5190e3,_0x66d0e1)=>{_0x66d0e1['options']['showCommentHighlights']&&_0x1c9323['stop']();},{'priority':'high'});}}class r extends _0x5753fc{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1629f8){super(_0x1629f8),this['set']('isThreadsLoadingPaused',!0x0),_0x1629f8['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x45fd66,_0x5239d4,_0x9fa8b9,_0x52f53a)=>{const _0x10ad20=_0x1629f8['plugins']['get'](o),_0x92e82f=_0x9fa8b9?ft(_0x9fa8b9)['id']:null;_0x1629f8['model']['change'](()=>{if(_0x92e82f){const _0x59408c=this['getAllMarkersForId'](_0x92e82f);for(const _0x1b34aa of _0x59408c)_0x1629f8['editing']['reconvertMarker'](_0x1b34aa);}if(_0x52f53a){const {id:_0x2289c0}=ft(_0x52f53a),_0x4210e9=_0x10ad20['getCommentThread'](_0x2289c0);if(_0x4210e9&&_0x4210e9['unlinkedAt'])return;if(_0x4210e9&&!_0x4210e9['isAttached'])return;const _0x545886=this['getAllMarkersForId'](_0x2289c0);for(const _0x2f31e9 of _0x545886)_0x1629f8['editing']['reconvertMarker'](_0x2f31e9);}}),_0x92e82f&&this['scrollToThreadMarker'](_0x92e82f);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x4cce65=this['editor'],_0x463d32=_0x4cce65['plugins']['get'](o),_0x44626c=_0x4cce65['config']['get']('collaboration.channelId'),_0x3e868c=_0x463d32['getCommentThreads']()['filter'](_0x58b15e=>_0x58b15e['channelId']!==_0x44626c);_0x4cce65['commands']['add']('addCommentThread',new ot(_0x4cce65)),this['listenTo'](_0x4cce65,'change:isReadOnly',(_0x59f472,_0x111811,_0xd3a0b4)=>{_0x463d32['switchReadOnly'](_0xd3a0b4,_0x4cce65['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x463d32,dt('addCommentThread',_0x44626c),(_0x4ded58,{threadId:_0x4b2887})=>{const _0x22ee7d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4b2887);_0x22ee7d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4b2887);}),this['listenTo'](_0x463d32,dt('removeCommentThread',_0x44626c),(_0x48340d,{threadId:_0x4ae046})=>{_0x4cce65['model']['enqueueChange']({'isUndoable':!0x1},_0x30dfbc=>{const _0x21c769=this['getAllMarkersForId'](_0x4ae046);for(const _0x14ba5a of _0x21c769)_0x30dfbc['removeMarker'](_0x14ba5a);});}),this['listenTo'](_0x463d32,dt('resolveCommentThread',_0x44626c),(_0x16154d,{threadId:_0x4d8492})=>{(this['_reconvertMarkers'](_0x4d8492),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x4d8492)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x463d32,dt('reopenCommentThread',_0x44626c),(_0x5d9215,{threadId:_0x3f1623})=>{this['_reconvertMarkers'](_0x3f1623);},{'priority':'low'}),this['listenTo'](_0x463d32,dt('addComment',_0x44626c),(_0x550cf1,{threadId:_0x48ebdb,isFromAdapter:_0xed4ff3})=>{const _0x160232=this['getAllMarkersForId'](_0x48ebdb);if(_0xed4ff3||0x0==_0x160232['length']||!_0x463d32['hasCommentThread'](_0x48ebdb))return;0x1===_0x463d32['getCommentThread'](_0x48ebdb)['length']&&_0x4cce65['model']['enqueueChange']({'isUndoable':!0x1},_0x260fac=>{for(const _0x46241f of _0x160232)_0x260fac['updateMarker'](_0x46241f,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3e868c);}['afterInit'](){!async function(_0x198fbe){const _0x3b0dc1=_0x4ee41c([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x4af546=0x73460ab3,_0x1b6668=0x734179eb^_0x4af546,_0x1c12de=window[_0x4ee41c([0x44,0x61,0x74,0x65])][_0x4ee41c([0x6e,0x6f,0x77])](),_0x55aaa8=_0x198fbe[_0x4ee41c([0x65,0x64,0x69,0x74,0x6f,0x72])],_0xe94ed7=new window[(_0x4ee41c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x14122d=>{_0x55aaa8[_0x4ee41c([0x6f,0x6e,0x63,0x65])](_0x4ee41c([0x72,0x65,0x61,0x64,0x79]),_0x14122d);}),_0x1d02e6={[_0x4ee41c([0x6b,0x74,0x79])]:_0x4ee41c([0x45,0x43]),[_0x4ee41c([0x75,0x73,0x65])]:_0x4ee41c([0x73,0x69,0x67]),[_0x4ee41c([0x63,0x72,0x76])]:_0x4ee41c([0x50,0x2d,0x32,0x35,0x36]),[_0x4ee41c([0x78])]:_0x4ee41c([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]),[_0x4ee41c([0x79])]:_0x4ee41c([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]),[_0x4ee41c([0x61,0x6c,0x67])]:_0x4ee41c([0x45,0x53,0x32,0x35,0x36])},_0xdb5ee3=_0x55aaa8[_0x4ee41c([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4ee41c([0x67,0x65,0x74])](_0x4ee41c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x46b5b2(){let _0x5ca0ea,_0x483358=null,_0x2fd7ca=null;try{if(_0xdb5ee3==_0x4ee41c([0x47,0x50,0x4c]))return _0x4ee41c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x5ca0ea=_0x1e64ca(),!_0x5ca0ea)return _0x4ee41c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x5ca0ea[_0x4ee41c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2fd7ca=_0x9b7920(_0x5ca0ea[_0x4ee41c([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x5ca0ea[_0x4ee41c([0x6a,0x74,0x69])])),await _0x30ef68()?_0x4953ca()?_0x57dc55()?_0x4ee41c([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x431ef6()?(_0x5ca0ea[_0x4ee41c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ee41c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x483358=_0xfbd8de(_0x4ee41c([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x5ca0ea[_0x4ee41c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4ee41c([0x74,0x72,0x69,0x61,0x6c])&&(_0x483358=_0xfbd8de(_0x4ee41c([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x491f7d()):_0x4ee41c([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4ee41c([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4ee41c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4ee41c([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x57dc55(){const _0x1321f7=[_0x4ee41c([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4ee41c([0x74,0x72,0x69,0x61,0x6c])][_0x4ee41c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5ca0ea[_0x4ee41c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1c12de/0x3e8:0xe10*_0x1b6668;return _0x5ca0ea[_0x4ee41c([0x65,0x78,0x70])]<_0x1321f7;}function _0x4953ca(){const _0x4545b4=_0x5ca0ea[_0x4ee41c([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4545b4)return!0x1;if(_0x4545b4[_0x4ee41c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee41c([0x2a])))return!0x0;if(_0x4545b4[_0x4ee41c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee41c([0x43,0x4d,0x54])))return!0x0;if(_0x4545b4[_0x4ee41c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee41c([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x55bed3())return!0x0;if(_0x4545b4[_0x4ee41c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee41c([0x52,0x43,0x4d,0x54]))){if(_0x3b4c10())return!0x0;if(_0x2ff1e3()||_0x1e0e76())return!0x0;}return!0x1;}function _0x431ef6(){const _0x517192=_0x5ca0ea[_0x4ee41c([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x517192||0x0==_0x517192[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x21c036}=new URL(window[_0x4ee41c([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x517192[_0x4ee41c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x21c036))return!0x0;const _0x323cd8=_0x21c036[_0x4ee41c([0x73,0x70,0x6c,0x69,0x74])](_0x4ee41c([0x2e]));return _0x517192[_0x4ee41c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5e8638=>_0x5e8638[_0x4ee41c([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ee41c([0x2a])))[_0x4ee41c([0x6d,0x61,0x70])](_0x394ddc=>_0x394ddc[_0x4ee41c([0x73,0x70,0x6c,0x69,0x74])](_0x4ee41c([0x2e])))[_0x4ee41c([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x589ef7=>_0x589ef7[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x323cd8[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4ee41c([0x6d,0x61,0x70])](_0x2af2ba=>Array(_0x323cd8[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2af2ba[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4ee41c([0x66,0x69,0x6c,0x6c])](_0x2af2ba[0x0]===_0x4ee41c([0x2a])?_0x4ee41c([0x2a]):'')[_0x4ee41c([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2af2ba))[_0x4ee41c([0x73,0x6f,0x6d,0x65])](_0x4f1bd3=>_0x323cd8[_0x4ee41c([0x65,0x76,0x65,0x72,0x79])]((_0x12f12d,_0x55ce2e)=>_0x4f1bd3[_0x55ce2e]===_0x12f12d||_0x4f1bd3[_0x55ce2e]===_0x4ee41c([0x2a])));}function _0x491f7d(){return _0x483358&&_0x2fd7ca?new window[(_0x4ee41c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x31e8c,_0x31ba84)=>{_0x483358[_0x4ee41c([0x74,0x68,0x65,0x6e])](_0x31e8c,_0x31ba84),_0x2fd7ca[_0x4ee41c([0x74,0x68,0x65,0x6e])](_0xc8c30f=>{_0xc8c30f!=_0x4ee41c([0x56,0x61,0x6c,0x69,0x64])&&_0x31e8c(_0xc8c30f);},_0x31ba84);}):_0x483358||_0x2fd7ca||_0x4ee41c([0x56,0x61,0x6c,0x69,0x64]);}}function _0x9b7920(_0x10b5c2,_0x42c9b8){return new window[(_0x4ee41c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x57565b=>{if(_0x170a11())return _0x57565b(_0x4ee41c([0x56,0x61,0x6c,0x69,0x64]));_0x53d01d(),_0x55aaa8[_0x4ee41c([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4ee41c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x16a4db=!0x1;const _0x30a175=_0x29df72();function _0x37b370(_0x51d962){return!!_0x51d962&&(typeof _0x51d962===_0x4ee41c([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x51d962===_0x4ee41c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x51d962[_0x4ee41c([0x74,0x68,0x65,0x6e])]===_0x4ee41c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x51d962[_0x4ee41c([0x63,0x61,0x74,0x63,0x68])]===_0x4ee41c([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x42bc1c(_0x21079c){_0x257a2c(_0x21079c)[_0x4ee41c([0x74,0x68,0x65,0x6e])](_0x2a51fe=>{if(!_0x2a51fe||_0x2a51fe[_0x4ee41c([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4ee41c([0x6f,0x6b]))return _0x4ee41c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x12eaa2(_0x53c969(_0x30a175+_0x42c9b8))!=_0x2a51fe[_0x4ee41c([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4ee41c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4ee41c([0x56,0x61,0x6c,0x69,0x64]);})[_0x4ee41c([0x74,0x68,0x65,0x6e])](_0x392afc=>(_0x19bd86(),_0x392afc),()=>{const _0x4fb74e=_0x1fad38();return null==_0x4fb74e?(_0x19bd86(),_0x4ee41c([0x56,0x61,0x6c,0x69,0x64])):_0x4ee41c(_0x1c12de-_0x4fb74e>(0x574a8eb3^_0x4af546)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4ee41c([0x74,0x68,0x65,0x6e])](_0x57565b)[_0x4ee41c([0x63,0x61,0x74,0x63,0x68])](()=>{_0x57565b(_0x4ee41c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1e10f6=0x7370e433^_0x4af546;function _0x19bd86(){const _0x2a5498=_0x4ee41c([0x6c,0x6c,0x63,0x74,0x2d])+_0x12eaa2(_0x53c969(_0x10b5c2)),_0x1b3a91=_0x2afe83(_0x12eaa2(window[_0x4ee41c([0x4d,0x61,0x74,0x68])][_0x4ee41c([0x63,0x65,0x69,0x6c])](_0x1c12de/_0x1e10f6)));window[_0x4ee41c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ee41c([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2a5498,_0x1b3a91);}function _0x1fad38(){const _0x57ed30=_0x4ee41c([0x6c,0x6c,0x63,0x74,0x2d])+_0x12eaa2(_0x53c969(_0x10b5c2)),_0x3dda82=window[_0x4ee41c([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4ee41c([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x57ed30);return _0x3dda82?window[_0x4ee41c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2afe83(_0x3dda82),0x10)*_0x1e10f6:null;}function _0x257a2c(_0x25567e){return new window[(_0x4ee41c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x51947c,_0xf82bac)=>{_0x25567e[_0x4ee41c([0x74,0x68,0x65,0x6e])](_0x51947c,_0xf82bac),window[_0x4ee41c([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xf82bac,0x7347de73^_0x4af546);});}}_0x55aaa8[_0x4ee41c([0x6f,0x6e])](_0x4ee41c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x12f231,_0x232fbe)=>{if(_0x232fbe[0x0]!=_0x10b5c2)return _0x57565b(_0x4ee41c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x232fbe[0x1]={..._0x232fbe[0x1],[_0x4ee41c([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x30a175};},{[_0x4ee41c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ee41c([0x68,0x69,0x67,0x68])}),_0x55aaa8[_0x4ee41c([0x6f,0x6e])](_0x4ee41c([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x4fa5b8=>{_0x37b370(_0x4fa5b8[_0x4ee41c([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x16a4db=!0x0,_0x42bc1c(_0x4fa5b8[_0x4ee41c([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4ee41c([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4ee41c([0x6c,0x6f,0x77])}),_0xe94ed7[_0x4ee41c([0x74,0x68,0x65,0x6e])](()=>{_0x16a4db||_0x57565b(_0x4ee41c([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x170a11(){return _0x55aaa8[_0x4ee41c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ee41c([0x76,0x69,0x65,0x77])][_0x4ee41c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4ee41c([0x61,0x75,0x74,0x6f]);}function _0x53d01d(){_0x55aaa8[_0x4ee41c([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4ee41c([0x76,0x69,0x65,0x77])][_0x4ee41c([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4ee41c([0x61,0x75,0x74,0x6f]);}}function _0xfbd8de(_0x404e1c){const _0x10ee10=[new window[(_0x4ee41c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x851c08=>setTimeout(_0x851c08,0x734f347f^_0x4af546)),_0xe94ed7[_0x4ee41c([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4ee41c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21f5a0=>{let _0x4f238e=0x0;_0x55aaa8[_0x4ee41c([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ee41c([0x6f,0x6e])](_0x4ee41c([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x286612,_0x48033a)=>{_0x48033a[0x0][_0x4ee41c([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4f238e++,_0x4f238e==(0x73460b4b^_0x4af546)&&(_0x21f5a0(),_0x286612[_0x4ee41c([0x6f,0x66,0x66])]());});}))];return window[_0x4ee41c([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4ee41c([0x72,0x61,0x63,0x65])](_0x10ee10)[_0x4ee41c([0x74,0x68,0x65,0x6e])](()=>_0x404e1c);}async function _0x30e48a(){await _0xe94ed7,_0x55aaa8[_0x4ee41c([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ee41c([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3056e8,_0x55aaa8[_0x4ee41c([0x6d,0x6f,0x64,0x65,0x6c])][_0x4ee41c([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3056e8,_0x55aaa8[_0x4ee41c([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4ee41c([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x55bed3(){return window[_0x4ee41c([0x67,0x6c,0x6f,0x62])]&&window[_0x4ee41c([0x67,0x6c,0x6f,0x62])][_0x4ee41c([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x3b4c10(){return _0x304fdd(_0x4ee41c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3bd8bb(_0x4ee41c([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4ee41c([0x73,0x74,0x61,0x74,0x65])]==_0x4ee41c([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2ff1e3(){return _0x304fdd(_0x4ee41c([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 _0x1e0e76(){return _0x304fdd(_0x4ee41c([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x2ebedd(_0xdcf567){const _0x278b43=_0x13609c();_0x55aaa8[_0x278b43]=_0x4ee41c([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xdcf567,_0xdcf567!=_0x4ee41c([0x56,0x61,0x6c,0x69,0x64])&&_0x30e48a();}function _0x13609c(){const _0x41e073=window[_0x4ee41c([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4ee41c([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4ee41c([0x6e,0x6f,0x77])]())[_0x4ee41c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4ee41c([0x2e]),'');let _0x124e26=_0x4ee41c([0x4b]);for(let _0x344f50=0x0;_0x344f50<_0x41e073[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x344f50+=0x2){let _0x2f962e=window[_0x4ee41c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x41e073[_0x4ee41c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x344f50,_0x344f50+0x2));_0x2f962e>=_0x3b0dc1[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2f962e-=_0x3b0dc1[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x124e26+=_0x3b0dc1[_0x2f962e];}return _0x124e26;}function _0x1e64ca(){const _0x3e6791=_0xdb5ee3[_0x4ee41c([0x73,0x70,0x6c,0x69,0x74])](_0x4ee41c([0x2e]));if(0x3!=_0x3e6791[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3ac6d9(_0x3e6791[0x1]);function _0x3ac6d9(_0x27acb0){const _0x56045d=_0x3cff43(_0x27acb0);return _0x56045d&&_0x2732cf()?_0x56045d:null;function _0x2732cf(){const _0x3bb7a=_0x56045d[_0x4ee41c([0x6a,0x74,0x69])],_0x50b414=window[_0x4ee41c([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3bb7a[_0x4ee41c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3bb7a[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x50188e={..._0x56045d,[_0x4ee41c([0x6a,0x74,0x69])]:_0x3bb7a[_0x4ee41c([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3bb7a[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x50188e[_0x4ee41c([0x76,0x63])],_0x53c969(_0x50188e)==_0x50b414;}}}async function _0x30ef68(){let _0x48e058=!0x0;try{const _0x413b47=_0xdb5ee3[_0x4ee41c([0x73,0x70,0x6c,0x69,0x74])](_0x4ee41c([0x2e])),[_0x516990,_0x34917e,_0x23d2a0]=_0x413b47;return _0x1528f4(_0x516990),await _0x359d64(_0x516990,_0x34917e,_0x23d2a0),_0x48e058;}catch{return!0x1;}function _0x1528f4(_0x48c2bf){const _0x1d6a11=_0x3cff43(_0x48c2bf);_0x1d6a11&&_0x1d6a11[_0x4ee41c([0x61,0x6c,0x67])]==_0x4ee41c([0x45,0x53,0x32,0x35,0x36])||(_0x48e058=!0x1);}async function _0x359d64(_0x73b3c8,_0x2c798a,_0x4237c7){const _0x56f31e=window[_0x4ee41c([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4ee41c([0x66,0x72,0x6f,0x6d])](_0x1eb786(_0x4237c7),_0x143f25=>_0x143f25[_0x4ee41c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1835ff=new window[(_0x4ee41c([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4ee41c([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x73b3c8+_0x4ee41c([0x2e])+_0x2c798a),_0x54521f=window[_0x4ee41c([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4ee41c([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54521f)return;const _0x2805ba=await _0x54521f[_0x4ee41c([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4ee41c([0x6a,0x77,0x6b]),_0x1d02e6,{[_0x4ee41c([0x6e,0x61,0x6d,0x65])]:_0x4ee41c([0x45,0x43,0x44,0x53,0x41]),[_0x4ee41c([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4ee41c([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4ee41c([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54521f[_0x4ee41c([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4ee41c([0x6e,0x61,0x6d,0x65])]:_0x4ee41c([0x45,0x43,0x44,0x53,0x41]),[_0x4ee41c([0x68,0x61,0x73,0x68])]:{[_0x4ee41c([0x6e,0x61,0x6d,0x65])]:_0x4ee41c([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2805ba,_0x56f31e,_0x1835ff)||(_0x48e058=!0x1);}}function _0x3cff43(_0x4209c3){return _0x4209c3[_0x4ee41c([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4ee41c([0x65,0x79]))?JSON[_0x4ee41c([0x70,0x61,0x72,0x73,0x65])](_0x1eb786(_0x4209c3)):null;}function _0x1eb786(_0x13367a){return window[_0x4ee41c([0x61,0x74,0x6f,0x62])](_0x13367a[_0x4ee41c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4ee41c([0x2b]))[_0x4ee41c([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4ee41c([0x2f])));}function _0x53c969(_0x33c0e5){let _0xc087d8=0x1505;function _0x5b15cc(_0x4739ad){for(let _0x75a71f=0x0;_0x75a71f<_0x4739ad[_0x4ee41c([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x75a71f++){const _0x4dcfe6=_0x4739ad[_0x4ee41c([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x75a71f);_0xc087d8=(_0xc087d8<<0x5)+_0xc087d8+_0x4dcfe6,_0xc087d8&=_0xc087d8;}}function _0x3bc8e8(_0x2d684d){Array[_0x4ee41c([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2d684d)?_0x2d684d[_0x4ee41c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3bc8e8):_0x2d684d&&typeof _0x2d684d==_0x4ee41c([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4ee41c([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2d684d)[_0x4ee41c([0x73,0x6f,0x72,0x74])]()[_0x4ee41c([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x4ed6c8,_0x24e2e2])=>{_0x5b15cc(_0x4ed6c8),_0x3bc8e8(_0x24e2e2);}):_0x5b15cc(window[_0x4ee41c([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2d684d));}return _0x3bc8e8(_0x33c0e5),_0xc087d8>>>0x0;}function _0x12eaa2(_0x4a6e6b){return _0x4a6e6b[_0x4ee41c([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4ee41c([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4ee41c([0x30]));}function _0x2afe83(_0x3e5d9b){return _0x3e5d9b[_0x4ee41c([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4ee41c([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4ee41c([0x6a,0x6f,0x69,0x6e])]('');}function _0x304fdd(_0x71efd0){return _0x55aaa8[_0x4ee41c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4ee41c([0x68,0x61,0x73])](_0x71efd0);}function _0x3bd8bb(_0x264a25){return _0x55aaa8[_0x4ee41c([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4ee41c([0x67,0x65,0x74])](_0x264a25);}function _0x3056e8(){}function _0x4ee41c(_0x4c9cc8){return _0x4c9cc8['map'](_0x40a027=>String['fromCharCode'](_0x40a027))['join']('');}_0x2ebedd(await _0x46b5b2());}(this);}['destroy'](){const _0x2b3a44=this['editor']['plugins']['get'](o),_0x26c6f2=this['editor']['config']['get']('collaboration.channelId');for(const _0x43b69c of _0x2b3a44['getCommentThreads']({'channelId':_0x26c6f2}))_0x2b3a44['_detachCommentThread'](_0x43b69c['id']),_0x2b3a44['_threads']['delete'](_0x43b69c['id']);super['destroy']();}['hasMarkerForId'](_0x20dff9){return this['getAllMarkersForId'](_0x20dff9)['length']>0x0;}['getAllMarkersForId'](_0x37df5b){const _0x4a3700=[];for(const _0x1481c5 of this['editor']['model']['markers'])_0x1481c5['name']['startsWith']('comment:'+_0x37df5b)&&_0x4a3700['push'](_0x1481c5);return _0x4a3700;}['scrollToThreadMarker'](_0x5d66d8){setTimeout(()=>{const _0x235cdd=this['_getTargetForId'](_0x5d66d8);if(!_0x235cdd)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5d66d8&&nt({'target':_0x235cdd[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x32dd9f){this['editor']['model']['change'](()=>{for(const _0x1ee401 of this['getAllMarkersForId'](_0x32dd9f))this['editor']['editing']['reconvertMarker'](_0x1ee401);});}['_attachArchivedThread'](_0x5581a8){const _0x3f289f=this['editor']['plugins']['get'](o),_0xbfd717=this['editor']['plugins']['get'](b),_0x12abc1=_0x3f289f['getCommentThread'](_0x5581a8);if(!_0x12abc1['isAttached']){const _0x293a0b=_0x12abc1['attachTo'](()=>this['_getTargetForId'](_0x12abc1['id']));_0xbfd717['registerAnnotation'](_0x293a0b),_0x12abc1['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x53162e=this['editor'],_0x42a762=_0x53162e['plugins']['get'](it);_0x53162e['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x552521,_0xb2bd2e)=>{const {id:_0x23c0fb}=ft(_0x552521['markerName']),_0x20fbbf=_0x53162e['plugins']['get'](o)['getCommentThread'](_0x23c0fb),_0x19e90f=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x23c0fb;let _0x2835fa;if(_0x20fbbf&&_0x20fbbf['isResolved']&&!_0x19e90f&&_0x552521['item'])return _0xb2bd2e['consumable']['consume'](_0x552521['item'],'addMarker:'+_0x552521['markerName']),_0xb2bd2e['consumable']['consume'](_0x552521['item'],'removeMarker:'+_0x552521['markerName']),null;const _0x21c928=['ck-comment-marker'];return _0x19e90f&&_0x21c928['push']('ck-comment-marker--active'),_0x2835fa=_0x20fbbf?.['length']?_0x20fbbf['comments']['first']['author']['id']:_0x42a762['me']['id'],{'classes':_0x21c928,'attributes':{'data-comment':_0x23c0fb,'data-author-id':_0x2835fa}};}}),_0x53162e['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1f9571,{options:_0x174ebf})=>{if(_0x174ebf['showCommentHighlights'])return null;const _0x24ba20=_0x53162e['plugins']['get'](o),_0x2daa8a=_0x53162e['model']['markers']['get'](_0x1f9571),{id:_0x2f645e,part:_0xe7a461}=ft(_0x1f9571);return _0x2daa8a&&!_0x2daa8a['affectsData']||_0x174ebf['ignoreResolvedComments']&&_0x24ba20['getCommentThread'](_0x2f645e)?.['isResolved']?null:{'group':'comment','name':_0xe7a461?_0x2f645e+':'+_0xe7a461:_0x2f645e};}}),_0x53162e['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x59e7b3,{writer:_0x5419a3})=>_0x5419a3['createElement']('$marker',{'data-name':'comment:'+_0x59e7b3['getAttribute']('id')})}),_0x53162e['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3f8763=this['editor'],_0x5765ad=_0x3f8763['plugins']['get'](o),_0x5129d5=new Set(),_0x3322e8=new Set();_0x3f8763['model']['document']['registerPostFixer'](_0xc16490=>{let _0x533248=!0x1;for(const {name:_0x446d84,data:_0x6f3790}of _0x3f8763['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1c3b68,id:_0x5bc111}=ft(_0x446d84);let _0x10a5da=_0x6f3790['newRange'];if('comment'!==_0x1c3b68||!_0x10a5da)continue;const _0x2f330f='$graveyard'===_0x10a5da['root']['rootName'];_0x2f330f||(_0x10a5da=ht(_0x10a5da,_0x3f8763['model']),!_0x10a5da||_0x10a5da['isCollapsed']||!_0x6f3790['newRange']||_0x10a5da['isEqual'](_0x6f3790['newRange']))?_0x3f8763['model']['hasContent'](_0x10a5da)&&!_0x2f330f?this['isThreadsLoadingPaused']?_0x5129d5['add'](_0x446d84):this['_handleThreadMarker'](_0x446d84,_0x5bc111):(_0x3322e8['add'](_0x446d84),_0x5129d5['delete'](_0x446d84),_0xc16490['removeMarker'](_0x446d84),_0x533248=!0x0):(_0xc16490['updateMarker'](_0x446d84,{'range':_0x10a5da}),_0x533248=!0x0);}return _0x533248;}),this['on']('change:isThreadsLoadingPaused',(_0x1a1238,_0x73863d,_0xf6f084)=>{if(!_0xf6f084&&_0x5129d5['size'])for(const _0x27a717 of _0x5129d5){const {id:_0x118cd1}=ft(_0x27a717);_0x5129d5['delete'](_0x27a717),_0x3f8763['model']['markers']['get'](_0x27a717)&&this['_handleThreadMarker'](_0x27a717,_0x118cd1);}}),this['listenTo'](_0x3f8763['model']['document'],'change',()=>{for(const {name:_0x481eff,data:{newRange:_0x4b93fe}}of _0x3f8763['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1a8f66,id:_0x2d36fc}=ft(_0x481eff);if('comment'!==_0x1a8f66)continue;const _0x46e83b=_0x5765ad['getCommentThread'](_0x2d36fc),_0x3667ea=this['hasMarkerForId'](_0x2d36fc);_0x46e83b&&(!_0x46e83b['_hasTargetInContent']&&_0x4b93fe&&_0x3f8763['editing']['view']['once']('render',()=>{const _0x13e9b1=_0x3f8763['plugins']['get'](y),_0x1eb078=_0x5765ad['_threadToController']['get'](_0x46e83b)['view'];_0x13e9b1['getByInnerView'](_0x1eb078)['refreshVisibility']();},{'priority':'low'}),_0x46e83b['_hasTargetInContent']=_0x3667ea||!!_0x4b93fe),_0x4b93fe||(_0x3322e8['add'](_0x481eff),_0x5129d5['delete'](_0x481eff));}for(const _0x5fe31a of _0x3322e8){const {id:_0x1d8c8d}=ft(_0x5fe31a),_0x479b71=_0x5765ad['getCommentThread'](_0x1d8c8d);if(_0x5129d5['delete'](_0x5fe31a),!_0x479b71)continue;const _0x9a68e=this['hasMarkerForId'](_0x1d8c8d);_0x9a68e||_0x479b71['isSubmitted']?_0x9a68e||_0x479b71['unlinkedAt']||_0x479b71['setUnlinkedAt'](new Date()):_0x479b71['remove']();}_0x3322e8['clear']();});}['_handleInitialThreads'](_0xccef63){_0xccef63['forEach'](_0x4b396c=>{_0x4b396c['unlinkedAt']&&this['_attachArchivedThread'](_0x4b396c['id']);});}['_getTargetForId'](_0x2d4fc7){const _0x497a84=this['editor'],_0x195617=this['getAllMarkersForId'](_0x2d4fc7);return et(_0x497a84['editing'],_0x195617);}['_getTextContext'](_0x519a29){const _0x5ebd7a=this['getAllMarkersForId'](_0x519a29);let _0x142eaa='',_0x33bd7e=!0x1;for(const _0x4d8147 of _0x5ebd7a){const _0x375f45=_0x4d8147['getRange']();for(const _0x4eb981 of Array['from'](_0x375f45['getItems']()))_0x4eb981['is']('$textProxy')?(_0x142eaa&&_0x33bd7e&&(_0x142eaa+='\x20',_0x33bd7e=!0x1),_0x142eaa+=_0x4eb981['data']):_0x33bd7e=!0x0;_0x33bd7e=!0x0;}return _0x142eaa['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x753f03,_0xacde74){const _0x1dffbd=this['editor'],_0x44f648=_0x1dffbd['plugins']['get'](o);let _0x553179=_0x44f648['getCommentThread'](_0xacde74);const _0x2d0f32=_0x1dffbd['config']['get']('collaboration.channelId'),_0x88c41d=_0x1dffbd['plugins']['get'](b);if(_0x553179&&(_0x553179['unlinkedAt']&&_0x553179['setUnlinkedAt'](null),_0x553179['isAttached']))return _0x553179;return!this['getAllMarkersForId'](_0xacde74)[0x0]['managedUsingOperations']?_0x1dffbd['editing']['view']['once']('render',()=>{if(_0x44f648['getCommentThread'](_0xacde74))return;const _0x41c795=_0x1dffbd['plugins']['get'](y);_0x553179=_0x44f648['openNewCommentThread']({'channelId':_0x2d0f32,'threadId':_0xacde74,'target':()=>this['_getTargetForId'](_0xacde74),'context':{'type':'text','value':this['_getTextContext'](_0xacde74)}});const _0x1c326b=_0x44f648['_threadToController']['get'](_0x553179)['view'],_0x5b34c8=_0x41c795['getByInnerView'](_0x1c326b);_0x5b34c8&&_0x88c41d['registerAnnotation'](_0x5b34c8);},{'priority':'low'}):_0x44f648['fetchCommentThread']({'channelId':_0x2d0f32,'threadId':_0xacde74})['then'](_0x3bf952=>{if('destroyed'!==_0x1dffbd['state']){if(_0x553179=_0x3bf952,_0x553179&&!_0x553179['isAttached']){const _0x59f559=_0x553179['attachTo'](()=>this['_getTargetForId'](_0xacde74));_0x88c41d['registerAnnotation'](_0x59f559),_0x553179['isResolved']&&this['_reconvertMarkers'](_0xacde74);}else{if(!_0x553179){const _0x3221f4=this['getAllMarkersForId'](_0xacde74);_0x1dffbd['model']['change'](_0x57c51a=>{for(const _0x2f243a of _0x3221f4)_0x57c51a['removeMarker'](_0x2f243a);});}}}}),_0x553179;}['_handleThreadMarker'](_0x33b9c1,_0x38f8f3){const _0x2c529e=this['_attachMarkerToThread'](_0x33b9c1,_0x38f8f3);_0x2c529e&&!_0x2c529e['context']&&_0x2c529e['setContext']({'type':'text','value':this['_getTextContext'](_0x38f8f3)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1c3c8a=this['editor'];rt(_0x1c3c8a['model'],({left:_0x336991,entered:_0x4ed02f})=>{for(const _0x3c57ea of _0x336991)if(mt(_0x3c57ea)){_0x1c3c8a['ui']['ariaLiveAnnouncer']['announce'](N(_0x1c3c8a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x20a474 of _0x4ed02f)if(mt(_0x20a474)){_0x1c3c8a['ui']['ariaLiveAnnouncer']['announce'](N(_0x1c3c8a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x35e476)));break;}});}}function dt(_0xdb68eb,_0x55279d){return _0x55279d?_0xdb68eb+':'+_0x55279d:_0xdb68eb;}function ht(_0x7ca486,_0x3f3f97){const _0x113b77=_0x3f3f97['schema'],_0x4c18c2=_0x3f3f97['createRange'](_0x7ca486['start']);for(const _0x1ff402 of _0x7ca486['getWalker']()){const {type:_0x59e390,item:_0x3c09ab,nextPosition:_0x4bf7b4}=_0x1ff402;if('text'===_0x59e390||_0x113b77['isObject'](_0x3c09ab)){const _0x432d3b=_0x3f3f97['createPositionBefore'](_0x3c09ab);_0x4c18c2['isCollapsed']&&(_0x4c18c2['start']=_0x432d3b),_0x4c18c2['end']=_0x4bf7b4;}}return _0x4c18c2;}function mt(_0xfea3f6){return'comment'===ft(_0xfea3f6['name'])['group'];}class s extends _0x5753fc{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x3106ba=this['editor'],_0x245f4b=_0x3106ba['plugins']['get'](o),_0x39501a=_0x3106ba['plugins']['get'](r),_0x579fbb=_0x3106ba['plugins']['get'](y),_0x2229e9=_0x3106ba['plugins']['get'](b);_0x3106ba['ui']['componentFactory']['add']('comment',()=>{const _0x5fd9af=this['_createUIButton'](_0x37ddc6);return _0x5fd9af['tooltip']=!0x0,_0x5fd9af;}),_0x3106ba['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x427723)),_0x2229e9['addSourceCollector'](()=>{const _0x39fb33=[];for(const [_0xe1e2ab,_0x4add72]of _0x245f4b['_threadToController']){const _0x52c9d4=_0x39501a['getAllMarkersForId'](_0xe1e2ab['id']),_0x332247=_0x52c9d4['map'](_0x1cbc01=>_0x1cbc01['getRange']());_0x52c9d4['length']>0x0&&_0x39fb33['push']([_0x4add72['view'],_0x332247]);}return _0x39fb33;}),this['listenTo'](_0x579fbb,'change:activeAnnotations',(_0x195699,_0x3a4d40,_0x14fb1b)=>{const _0x4b5cb6=Array['from'](_0x14fb1b)['map'](_0x212b9b=>_0x212b9b['innerView'])['find'](_0x4dcccb=>_0x245f4b['_viewToController']['has'](_0x4dcccb));if(!_0x4b5cb6)return void(_0x39501a['activeMarker']=null);const _0x1f2fa6=_0x245f4b['_viewToController']['get'](_0x4b5cb6)['model']['id'],_0x2052ca='comment:'+_0x1f2fa6;_0x1f2fa6&&_0x39501a['hasMarkerForId'](_0x1f2fa6)?_0x39501a['activeMarker']=_0x2052ca:_0x39501a['activeMarker']&&(_0x39501a['activeMarker']=null);}),this['listenTo'](_0x245f4b,'removeCommentThread',(_0x2dcf44,{threadId:_0x851c12,isFromAdapter:_0x111c0b})=>{!_0x111c0b&&_0x3106ba['ui']['focusTracker']['isFocused']&&_0x39501a['hasMarkerForId'](_0x851c12)&&_0x3106ba['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x245f4b,'addComment',(_0x4e056b,{threadId:_0x44e80c,isFromAdapter:_0x43624e})=>{if(_0x43624e||!_0x39501a['hasMarkerForId'](_0x44e80c)||!_0x245f4b['hasCommentThread'](_0x44e80c))return;0x1===_0x245f4b['getCommentThread'](_0x44e80c)['length']&&(_0x3106ba['editing']['view']['focus'](),_0x4e056b['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3c95d5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4bd25c;for(const _0x11633e in _0x3c95d5){const _0x379589=_0x11633e,_0x35bc91=_0x3c95d5[_0x379589];if('commentsLicenseKeyValid'==_0x35bc91||'commentsLicenseKeyInvalid'==_0x35bc91||'commentsLicenseKeyExpired'==_0x35bc91||'commentsLicenseKeyDomainLimit'==_0x35bc91||'commentsLicenseKeyNotAllowed'==_0x35bc91||'commentsLicenseKeyEvaluationLimit'==_0x35bc91||'commentsLicenseKeyTrialLimit'==_0x35bc91||'commentsLicenseKeyUsageLimit'==_0x35bc91){delete _0x3c95d5[_0x379589],_0x4bd25c=_0x35bc91,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4bd25c&&_0x3c95d5['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4bd25c&&_0x3c95d5['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4bd25c&&_0x3c95d5['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4bd25c&&_0x3c95d5['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4bd25c&&_0x3c95d5['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4bd25c&&_0x3c95d5['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4bd25c&&_0x3c95d5['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3ebab8){const _0x36da68=this['editor'],_0x55ed92=new _0x3ebab8(_0x36da68['locale']),_0x1c9f8c=_0x36da68['commands']['get']('addCommentThread');return _0x55ed92['set']({'label':N(_0x36da68['locale'],'Comment'),'icon':_0x601cc9}),_0x55ed92['bind']('isEnabled')['to'](_0x1c9f8c,'hasContent'),this['listenTo'](_0x55ed92,'execute',()=>{_0x1c9f8c['execute']();}),_0x55ed92;}}class i extends _0x5753fc{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x4d3da8){super(_0x4d3da8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x500485,_0x3f70c5,_0x23f614)=>{_0x23f614?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x368c41,_0x5cb8f4]of this['editor']['commands'])_0x5cb8f4['affectsData']&&'addCommentThread'!==_0x368c41&&_0x5cb8f4['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 _0x1482da=this['editor']['editing']['view']['document'];this['listenTo'](_0x1482da,'cut',_0x467b58=>_0x467b58['stop'](),{'priority':'highest'}),this['listenTo'](_0x1482da,'clipboardInput',_0x17db52=>_0x17db52['stop'](),{'priority':'highest'}),this['listenTo'](_0x1482da,'delete',_0x2ccde9=>_0x2ccde9['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5ecaf2,_0x3ff388]of this['editor']['commands'])_0x3ff388['affectsData']&&'addCommentThread'!==_0x5ecaf2&&_0x3ff388['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 j extends _0x3e241b{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49ce68){super(_0x49ce68),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x7105f1=this['context']['plugins']['get'](y);this['listenTo'](_0x7105f1,'_activateAnnotation',(_0x16547c,_0x4ede92)=>{for(const _0x520548 of this['activeUIs']){const _0x514756=this['_uis']['get'](_0x520548);(0x0,this['uisData']['get'](_0x520548)['filter'])(_0x4ede92)&&_0x514756['setActiveAnnotation'](_0x4ede92);}}),this['listenTo'](_0x7105f1,'_deactivateAllAnnotations',()=>{for(const _0x49014b of this['activeUIs']){this['_uis']['get'](_0x49014b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x7105f1['_visibleAnnotations'],'add',(_0x299368,_0x274816)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x274816);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x41e707){return this['activeUIs']['has'](_0x41e707);}['activate'](_0x398bce,_0x1af6f6=this['defaultFilter']){const _0x3689b0=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x398bce))throw new _0xc716c1('annotationsuis-missing-ui',this,{'uiName':_0x398bce});this['isActive'](_0x398bce)&&this['deactivate'](_0x398bce),this['activeUIs']['add'](_0x398bce);const _0x37b197=new S();v({'source':_0x3689b0['_visibleAnnotations'],'target':_0x37b197,'filter':_0x1af6f6}),this['uisData']['set'](_0x398bce,{'collection':_0x37b197,'filter':_0x1af6f6});const _0x41c7e0=this['_uis']['get'](_0x398bce);_0x41c7e0['attach'](_0x37b197),this['listenTo'](_0x41c7e0,'change:activeAnnotation',(_0x3f9495,_0x202818,_0x191ec8,_0x4c39a5)=>{_0x4c39a5&&_0x3689b0['_removeActiveAnnotation'](_0x4c39a5),_0x191ec8&&_0x3689b0['_addActiveAnnotation'](_0x191ec8);});}['deactivate'](_0x385827){if(this['activeUIs']['delete'](_0x385827),!this['_uis']['has'](_0x385827))throw new _0xc716c1('annotationsuis-missing-ui',this,{'uiName':_0x385827});const _0xe29934=this['_uis']['get'](_0x385827);_0xe29934['detach'](),this['stopListening'](_0xe29934),this['uisData']['get'](_0x385827)['collection']['destroy'](),this['uisData']['delete'](_0x385827);}['switchTo'](_0x45aa51){if(!this['_uis']['has'](_0x45aa51))throw new _0xc716c1('annotationsuis-missing-ui',this,{'uiName':_0x45aa51});const _0x3bc91d=this['context']['plugins']['get'](y),_0x3bf6eb=Array['from'](_0x3bc91d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x45aa51);const _0x28dc6f=this['_uis']['get'](_0x45aa51);_0x28dc6f['setActiveAnnotation'](_0x3bf6eb),_0x28dc6f['_setSelectedAnnotations']&&_0x3bf6eb&&_0x28dc6f['_setSelectedAnnotations']([_0x3bf6eb]);}['deactivateAll'](){for(const _0x1c6643 of this['activeUIs'])this['deactivate'](_0x1c6643);}['register'](_0x291d56,_0x1b464e){if(this['_uis']['has'](_0x291d56))throw new _0xc716c1('annotationsuis-register-already-registered');if('function'!=typeof _0x1b464e['attach']||'function'!=typeof _0x1b464e['detach']||'function'!=typeof _0x1b464e['setActiveAnnotation'])throw new _0xc716c1('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x291d56,_0x1b464e);}['refilterAnnotations'](){const _0x50b77b=this['context']['plugins']['get'](y)['collection'],_0x5cbf1e=new Map(),_0x58a654=Array['from'](this['activeUIs']);for(const _0xc7c660 of this['activeUIs']){const _0x456639=this['uisData']['get'](_0xc7c660)['collection'];for(const _0xc62078 of _0x456639)_0x5cbf1e['set'](_0xc62078,_0xc7c660);}for(const _0x294a1c of _0x50b77b){const _0x3d2e6e=_0x5cbf1e['get'](_0x294a1c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x294a1c);const _0x48c9bf=_0x58a654['find'](_0x382613=>this['uisData']['get'](_0x382613)['filter'](_0x294a1c));_0x3d2e6e!==_0x48c9bf&&(_0x3d2e6e&&this['uisData']['get'](_0x3d2e6e)['collection']['remove'](_0x294a1c),_0x48c9bf&&this['uisData']['get'](_0x48c9bf)['collection']['add'](_0x294a1c));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x63e9c){const _0x5a2b35=[];for(const _0x56a802 of this['activeUIs']){(0x0,this['uisData']['get'](_0x56a802)['filter'])(_0x63e9c)&&_0x5a2b35['push'](_0x56a802);}if(_0x5a2b35['length']>0x1)throw new _0xc716c1('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5a2b35,'annotationType':_0x63e9c['type']});}}const Ci=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4c62b4){super(_0x4c62b4);const _0x2f013f=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 _0x529579(),this['focusCycler']=new _0x1fd229({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x2f013f['to']('class')],'style':{'minHeight':_0x2f013f['to']('minHeight',_0x47b211=>'number'==typeof _0x47b211?Ci(_0x47b211+0xa):null)},'dir':_0x4c62b4['uiLanguageDirection'],'role':'application','aria-label':N(_0x4c62b4,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x4c62b4,'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',_0x56e236=>{this['_updateItemPositionInFocusables'](_0x56e236['source']);}),this['list']['forEach'](_0x2a54dc=>{this['focusTracker']['add'](_0x2a54dc['element']),this['_updateItemPositionInFocusables'](_0x2a54dc);}),this['list']['on']('change',(_0x4c2928,_0x5c4abf)=>{for(const _0x39bdf0 of _0x5c4abf['removed'])this['focusTracker']['remove'](_0x39bdf0['element']),this['focusables']['remove'](_0x39bdf0);for(const _0x215d13 of _0x5c4abf['added'])this['focusTracker']['add'](_0x215d13['element']),this['_updateItemPositionInFocusables'](_0x215d13);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x3568a6){const _0x1941c3=this['focusables']['getIndex'](_0x3568a6);let _0x5ba614,_0x3a92d4;for(const _0x4942a2 of this['focusables'])if(_0x3568a6['top']<_0x4942a2['top']){_0x5ba614=_0x4942a2;break;}if(_0x3a92d4=_0x5ba614?this['focusables']['getIndex'](_0x5ba614):this['focusables']['length'],-0x1!==_0x1941c3){if(_0x1941c3===_0x3a92d4-0x1)return;this['focusables']['remove'](_0x3568a6),_0x3a92d4=_0x5ba614?this['focusables']['getIndex'](_0x5ba614):this['focusables']['length'];}this['focusables']['add'](_0x3568a6,_0x3a92d4);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4d9bdc){super(_0x4d9bdc),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2af51e,_0x42c46b)=>_0x2af51e+_0x42c46b),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x281e97=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x281e97['to']('isAnimationDisabled',_0x401628=>_0x401628?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x281e97['to']('top',_0x9df150=>Ot(_0x9df150))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x479e90=this['element']['clientHeight'];_0x479e90&&(this['height']=_0x479e90);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3e241b{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a7aed){super(_0x4a7aed),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 _0x5168d1=this['context']['config']['get']('sidebar.container');_0x5168d1&&this['setContainer'](_0x5168d1);}['setContainer'](_0x3d79c2){if(!g(_0x3d79c2))throw new _0xc716c1('sidebar-setcontainer-invalid-element');this['container']=_0x3d79c2;}['_attachToContainer']({viewClass:_0x519285='',spaceBetweenItems:_0x33d637=0x19}={}){if(!g(this['container']))throw new _0xc716c1('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x519285,this['_spaceBetweenItems']=_0x33d637;}['rearrange']({removedAnnotation:_0x122702,previousAnnotation:_0x2e6117,nextAnnotation:_0x484c34}){const _0xd7dcab=this['getSidebarItemView'](_0x122702);this['view']['list']['remove'](_0xd7dcab),this['_destroySidebarItemView'](_0x122702),_0x2e6117&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2e6117)),_0x484c34&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x484c34)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4bb709,activatedAnnotation:_0x5aa76a,disableAnimationOnActivatedAnnotation:_0x1f8221}){if(this['_activeAnnotation']=_0x5aa76a,_0x4bb709){_0x4bb709['isActive']=!0x1;const _0x50c26d=this['getSidebarItemView'](_0x4bb709);_0x50c26d&&_0x1f8221&&(_0x50c26d['isAnimationDisabled']=!0x1);}if(_0x5aa76a){const _0x1e995a=this['getSidebarItemView'](_0x5aa76a);_0x1e995a&&(_0x5aa76a['isActive']=!0x0,_0x1f8221&&(_0x1e995a['isAnimationDisabled']=!0x0,_0x1e995a['top']+=0x1),this['_alignToTargetRect'](_0x1e995a));}}['_detachFromContainer'](_0xa865a0){if(this['view']['element']['remove'](),_0xa865a0){for(const _0x198625 of _0xa865a0)this['_destroySidebarItemView'](_0x198625);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2f756f,_0x542545){_0x542545||(_0x542545=_0x2f756f['view']);const _0xd2489d=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0xd2489d,_0x2f756f),this['_annotationToSidebarItemView']['set'](_0x2f756f,_0xd2489d),_0xd2489d['content']['add'](_0x542545),this['listenTo'](_0x2f756f['view'],'change:targetRect',(_0x12b1f5,_0x59dfa0,_0x504eb9)=>{const _0x386e07=this['_getTargetTop'](_0x2f756f,_0x504eb9);_0xd2489d['_targetTop']!=_0x386e07&&(_0xd2489d['_targetTop']=_0x386e07,this['_setItemTop'](_0xd2489d,_0x386e07));}),this['listenTo'](_0xd2489d,'change:top',()=>{this['_recalculate'](_0xd2489d,'top');}),this['listenTo'](_0xd2489d,'change:bottom',()=>{this['_recalculate'](_0xd2489d,'bottom');}),this['_alignToTargetRect'](_0xd2489d);const _0x53e799=this['_getItemBefore'](_0xd2489d);if(_0x53e799)this['_alignAfterItem'](_0x53e799,_0xd2489d)||this['_alignToTargetRect'](_0xd2489d);else this['_alignToTargetRect'](_0xd2489d);return this['_updateLastItem'](),this['view']['list']['add'](_0xd2489d),_0xd2489d;}['_alignForTopChange'](_0x3afa2c){if(!_0x3afa2c['content']['length'])return;const _0x1e0c08=this['_getItemBefore'](_0x3afa2c);if(!_0x1e0c08)return;const _0x26a9f9=this['_sidebarItemViewToAnnotation']['get'](_0x1e0c08),_0x598de9=this['_activeAnnotation'];_0x598de9&&_0x598de9===_0x26a9f9?this['_alignAfterItem'](_0x1e0c08,_0x3afa2c):this['_alignBeforeItem'](_0x3afa2c,_0x1e0c08);}['_alignForBottomChange'](_0x109ccf){if(!_0x109ccf['content']['length'])return;const _0x19360e=this['_getItemAfter'](_0x109ccf);if(!_0x19360e)return;const _0x508306=this['_sidebarItemViewToAnnotation']['get'](_0x19360e),_0x37d9f0=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2531dc=this['_activeAnnotation'];_0x2531dc&&_0x2531dc===_0x508306&&_0x37d9f0?(this['_alignBeforeItem'](_0x19360e,_0x109ccf),this['_alignAfterItem'](_0x109ccf,_0x19360e)):_0x2531dc&&_0x2531dc===_0x508306?this['_alignBeforeItem'](_0x19360e,_0x109ccf):this['_alignAfterItem'](_0x109ccf,_0x19360e);}['_recalculate'](_0x911474,_0x2b3c10){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1b6bca,changedProp:_0x28af91}of this['_recalculateBuffer'])'top'===_0x28af91?this['_alignForTopChange'](_0x1b6bca):this['_alignForBottomChange'](_0x1b6bca);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x911474,'changedProp':_0x2b3c10});}['getSidebarItemView'](_0x5c8d4c){return this['_annotationToSidebarItemView']['get'](_0x5c8d4c);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3a9562){const _0x1eb049=this['getSidebarItemView'](_0x3a9562);this['stopListening'](_0x1eb049),this['stopListening'](_0x3a9562['view']),_0x1eb049['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3a9562),this['_sidebarItemViewToAnnotation']['delete'](_0x1eb049);}['_createSidebarView'](){const _0x19a01e=new H(this['context']['locale']);return _0x19a01e['render'](),this['on']('change:_lastItem',(_0xf49d7e,_0x3b12a6,_0x42b5d4,_0x3749af)=>{_0x3749af&&_0x19a01e['unbind']('minHeight'),_0x42b5d4?_0x19a01e['bind']('minHeight')['to'](_0x42b5d4,'bottom'):_0x19a01e['minHeight']=null;}),_0x19a01e;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x16789c){const _0x20a24a=this['_sidebarItemViewToAnnotation']['get'](_0x16789c),_0xf1aa3=_0x20a24a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x20a24a)-0x1);return _0xf1aa3&&this['getSidebarItemView'](_0xf1aa3)||null;}['_getItemAfter'](_0x7a5882){const _0x54bb95=this['_sidebarItemViewToAnnotation']['get'](_0x7a5882),_0x152307=_0x54bb95&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x54bb95)+0x1);return _0x152307&&this['getSidebarItemView'](_0x152307)||null;}['_alignBeforeItem'](_0x1e36d8,_0x1d2ddb){_0x1e36d8['updateHeight']();const _0x16a86e=G(_0x1d2ddb['bottom']+this['_spaceBetweenItems'],_0x1e36d8['top']);return!!_0x16a86e&&(this['_setItemTop'](_0x1d2ddb,_0x1d2ddb['top']-_0x16a86e),!0x0);}['_alignAfterItem'](_0x3ecb36,_0x134a5){_0x3ecb36['updateHeight']();const _0x1bf9ea=G(_0x3ecb36['bottom']+this['_spaceBetweenItems'],_0x134a5['top']);return!!_0x1bf9ea&&(this['_setItemTop'](_0x134a5,_0x134a5['top']+_0x1bf9ea,!0x1),!0x0);}['_alignToTargetRect'](_0x80cecc){const _0xa951bb=this['_sidebarItemViewToAnnotation']['get'](_0x80cecc);if(!_0xa951bb||!_0xa951bb['target']||!_0xa951bb['targetRect'])return;const _0xe8927d=this['_getTargetTop'](_0xa951bb,_0xa951bb['targetRect']);this['_setItemTop'](_0x80cecc,_0xe8927d);}['_getTargetTop'](_0x25f077,_0x26d091){if(null===_0x26d091)return 0x0;if(_0x25f077['target']instanceof _0x305cf4)return _0x26d091['top'];{const _0x3eebd3=new _0x305cf4(this['view']['element'])['top'];return _0x26d091['top']-_0x3eebd3;}}['_setItemTop'](_0x387b5c,_0x58e292,_0x396c07=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x396c07&&(_0x58e292=Math['max'](_0x58e292,this['_getMaxAvailableTop'](_0x387b5c))),_0x387b5c['top']=_0x58e292;}['_getMaxAvailableTop'](_0x77a15f){let _0x20c460=this['_getItemBefore'](_0x77a15f),_0x19da3d=0x0;for(;_0x20c460;)_0x20c460['updateHeight'](),_0x19da3d+=this['_spaceBetweenItems']+_0x20c460['height'],_0x20c460=this['_getItemBefore'](_0x20c460);return _0x19da3d;}}function G(_0x6f29b7,_0x2c70ed){return Math['max'](_0x6f29b7-_0x2c70ed,0x0);}function g(_0x2b8230){return null!==_0x2b8230&&'object'==typeof _0x2b8230&&0x1===_0x2b8230['nodeType'];}class e extends _0x3e241b{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x364431){super(_0x364431),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x214515(),this['_refreshPositioningDebounced']=_0x324384(()=>{_0x364431['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5e4d5c=this['context']['plugins']['get'](j),_0xfea015=this['context']['plugins']['get'](z);_0x5e4d5c['register']('wideSidebar',this),_0xfea015['container']&&_0x5e4d5c['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3bad94){if(_0x3bad94===this['activeAnnotation'])return;const _0x1b4656=this['context']['plugins']['get'](z);_0x1b4656['_activeAnnotation']=_0x3bad94;const _0x2171bf=this['activeAnnotation'];_0x1b4656['refresh']({'blurredAnnotation':_0x2171bf,'activatedAnnotation':_0x3bad94}),this['activeAnnotation']=_0x3bad94;}['attach'](_0x468d6a){this['annotations']=_0x468d6a;const _0x5f4327=this['context']['plugins']['get'](z);if(_0x5f4327['_annotations']=_0x468d6a,this['isAttached'])throw new _0xc716c1('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5f4327,'set:container',()=>{this['detach'](),this['listenTo'](_0x5f4327,'change:container',_0x5e45b5=>{_0x5e45b5['off'](),this['attach'](_0x468d6a);});}),_0x5f4327['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x243cf7=_0x2dadec=>{_0x2dadec['updateTargetRect'](),_0x5f4327['addAnnotation'](_0x2dadec);};for(const _0x39ea7e of _0x468d6a)_0x243cf7(_0x39ea7e);this['listenTo'](_0x468d6a,'add',(_0x39001d,_0x35c633)=>{_0x243cf7(_0x35c633);}),this['listenTo'](_0x468d6a,'remove',(_0x40af21,_0x237eb1,_0xe0caf2)=>{_0x5f4327['rearrange']({'removedAnnotation':_0x237eb1,'previousAnnotation':_0x468d6a['get'](_0xe0caf2-0x1),'nextAnnotation':_0x468d6a['get'](_0xe0caf2+0x1)}),_0x237eb1===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x468d6a,'focus',(_0x3a0d2e,_0x55d01c)=>{this['setActiveAnnotation'](_0x55d01c);}),this['listenTo'](_0x468d6a,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2759e6=this['context']instanceof _0x492057?this['context']['editors']:new _0x214515([this['context']]);for(const _0x5c44b3 of _0x2759e6)this['_integrateWithEditorAnnotations'](_0x5c44b3);this['listenTo'](_0x2759e6,'add',(_0x459835,_0x42c091)=>{this['listenTo'](_0x42c091,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x42c091);});}),this['listenTo'](_0x2759e6,'remove',(_0x4256a7,_0x9ada74)=>{_0x9ada74['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x9ada74['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xc716c1('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x454213=this['context']['plugins']['get'](z);_0x454213['_detachFromContainer'](this['annotations']),this['stopListening'](_0x454213),this['stopListening'](this['annotations']),this['context']instanceof _0x492057&&this['stopListening'](this['context']['editors']);for(const _0x3847af of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3847af);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5dd1ca){if(!_0x5dd1ca['plugins']['has']('EditorAnnotations'))return;const _0x3efcfd=_0x5dd1ca['plugins']['get']('EditorAnnotations'),_0x458162=()=>{const _0x4ff7c5=_0x3efcfd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x4ff7c5[0x0]||null);};this['listenTo'](_0x3efcfd,'refresh',_0x458162),this['listenTo'](_0x3efcfd,'blur',(_0x4a4ddf,{isAnnotationTracked:_0xa0492b})=>{this['activeAnnotation']&&_0xa0492b(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3efcfd,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x48d26f=>{_0x3efcfd['hasDomSelection']()&&(_0x458162(),_0x48d26f['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3efcfd);}['_destroyEditorAnnotationsIntegration'](_0x35c1f3){this['stopListening'](_0x35c1f3),this['_editorAnnotations']['remove'](_0x35c1f3);}}class C extends _0x37ddc6{['counterView'];constructor(_0x16f274){super(_0x16f274);const _0x38804b=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x16f789,_0x331a5f)=>_0x16f789?'...':_0x331a5f['toString']()),this['set']('annotationType',''),this['icon']=_0x601cc9,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x38804b['to']('annotationType',_0x4af043=>'ck-annotation-counter__badge--'+_0x4af043),_0x38804b['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x38804b['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3e241b{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4b6dbe){super(_0x4b6dbe),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x7dec1f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x214515(),this['_refreshPositioningDebounced']=_0x324384(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4a9de3(this['context']['locale']),this['balloonPanelView']=new _0xeedbd9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x47ab30){this['annotations']=_0x47ab30;const _0x47c626=this['context']['plugins']['get'](z),_0x5a0590=this['balloonPanelView'];if(_0x47c626['_annotations']=_0x47ab30,this['isAttached'])throw new _0xc716c1('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x47c626,'set:container',()=>{this['detach'](),this['listenTo'](_0x47c626,'change:container',_0x311637=>{_0x311637['off'](),this['attach'](_0x47ab30);});}),_0x47c626['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x56e05c=_0x214d34=>{const _0x2639fe=new C(this['context']['locale']);_0x47c626['addAnnotation'](_0x214d34,_0x2639fe),this['_annotationToNarrowView']['set'](_0x214d34,_0x2639fe),_0x2639fe['bind']('isDirty','annotationType','number')['to'](_0x214d34['view'],'isDirty','type','length'),_0x2639fe['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5a0590['content']['first']!==_0x214d34['view']?(this['_showBalloon'](_0x214d34),_0x214d34['view']['element']['focus'](),this['setActiveAnnotation'](_0x214d34)):this['setActiveAnnotation'](null);});};for(const _0xd725ec of _0x47ab30)_0x56e05c(_0xd725ec);this['listenTo'](_0x47ab30,'add',(_0x3e0317,_0x3e9ed5)=>{_0x56e05c(_0x3e9ed5);}),this['listenTo'](_0x47ab30,'remove',(_0x407d37,_0x336203,_0x34fd24)=>{this['_annotationToNarrowView']['get'](_0x336203)['destroy'](),this['_annotationToNarrowView']['delete'](_0x336203),_0x47c626['rearrange']({'removedAnnotation':_0x336203,'previousAnnotation':_0x47ab30['get'](_0x34fd24-0x1),'nextAnnotation':_0x47ab30['get'](_0x34fd24+0x1)}),_0x336203===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x47ab30,'focus',(_0x541b94,_0x214972)=>{this['setActiveAnnotation'](_0x214972);}),this['listenTo'](_0x47ab30,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x1ecc15,_0x3134c2)=>{_0x3134c2['keyCode']===_0x3316b1['esc']&&_0x5a0590['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5a0590['content']['first']),this['_hideBalloon'](),_0x3134c2['stopPropagation'](),_0x3134c2['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5c2f36,_0x2618ad)=>{const _0x48a776=_0x2618ad['target'];_0x5a0590['isVisible']&&_0x5a0590['element']['contains'](_0x48a776)||_0x47c626['view']['element']['contains'](_0x48a776)||_0x5c2f36['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x448221=>_0x448221['contains'](_0x48a776))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4c8eae=this['context']instanceof _0x492057?this['context']['editors']:new _0x214515([this['context']]);for(const _0x59a84e of _0x4c8eae)this['_integrateWithEditorAnnotations'](_0x59a84e);this['listenTo'](_0x4c8eae,'add',(_0x38891a,_0x1fd346)=>{this['listenTo'](_0x1fd346,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1fd346);});}),this['listenTo'](_0x4c8eae,'remove',(_0x72922b,_0x30a35f)=>{_0x30a35f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x30a35f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x45fce5){if(_0x45fce5===this['activeAnnotation'])return;const _0x588b82=this['context']['plugins']['get'](z);if(_0x588b82['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x45fce5,'disableAnimationOnActivatedAnnotation':!0x0}),_0x45fce5)_0x588b82['getSidebarItemView'](_0x45fce5)?this['_showBalloon'](_0x45fce5):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x45fce5;}['detach'](){if(!this['isAttached'])throw new _0xc716c1('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4aedb0=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2075c3=>_0x2075c3['destroy']()),this['_annotationToNarrowView']['clear'](),_0x4aedb0['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x492057&&this['stopListening'](this['context']['editors']);for(const _0x2ca21e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2ca21e);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'](_0x3e359d){if(!_0x3e359d['plugins']['has']('EditorAnnotations'))return;const _0x1f4e7d=_0x3e359d['plugins']['get']('EditorAnnotations'),_0x2bb393=this['context']['plugins']['get'](z),_0x37fd34=this['annotations'],_0x401c06=this['balloonPanelView'],_0x3e12d7=()=>{const _0x369107=_0x1f4e7d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x369107),this['setActiveAnnotation'](_0x369107[0x0]||null);};this['listenTo'](_0x1f4e7d,'refresh',_0x3e12d7),this['listenTo'](_0x1f4e7d,'blur',(_0xbf39b1,{isAnnotationTracked:_0x524184})=>{this['activeAnnotation']&&_0x524184(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1f4e7d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x37fd34,'blur',_0x188c97=>{_0x1f4e7d['hasDomSelection']()&&_0x188c97['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x537e8a,_0x5b2a59)=>{const _0x525c63=_0x5b2a59['target'];_0x401c06['isVisible']&&_0x401c06['element']['contains'](_0x525c63)||_0x2bb393['view']['element']['contains'](_0x525c63)||this['activeAnnotation']&&_0x1f4e7d['hasDomSelection']()&&(_0x3e12d7(),_0x537e8a['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1f4e7d);}['_destroyEditorAnnotationsIntegration'](_0x31face){_0x31face&&(this['stopListening'](_0x31face),this['_editorAnnotations']['remove'](_0x31face));}['_setSelectedAnnotations'](_0x62767d){for(const _0x2f8e4 of this['_selectedAnnotations'])_0x62767d['includes'](_0x2f8e4)||this['_manuallyClosedAnnotationViews']['delete'](_0x2f8e4['view']);this['_selectedAnnotations']=_0x62767d;}['_refreshPositioning'](){const _0x1e04fc=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x1e04fc['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x15d43f){if(this['_manuallyClosedAnnotationViews']['has'](_0x15d43f['view']))return;const _0x325cec=this['balloonPanelView']['content']['first'];_0x325cec!==_0x15d43f['view']?(_0x325cec&&this['_detachListeners'](_0x325cec),this['_attachListeners'](_0x15d43f['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x15d43f['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x367c3e=this['balloonPanelView']['content']['first'],_0x3ba7b1=_0x367c3e&&this['annotations']['getByView'](_0x367c3e);if(!_0x3ba7b1||!this['_annotationToNarrowView']['has'](_0x3ba7b1))return;const _0x5ee453=this['_annotationToNarrowView']['get'](_0x3ba7b1)['element'],_0x1a18e3=(function(){const _0x22c29b=_0xeedbd9['defaultPositions'];return[_0x22c29b['southArrowNorthEast'],_0x22c29b['northArrowSouthEast'],_0x22c29b['southArrowNorth'],_0x22c29b['northArrowSouth'],_0x22c29b['southArrowNorthWest'],_0x22c29b['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5ee453,'positions':_0x1a18e3});}['_hideBalloon'](){const _0x390d03=this['balloonPanelView'],_0x213223=_0x390d03['content']['first'];_0x213223&&(this['_detachListeners'](_0x213223),_0x390d03['unpin'](),_0x390d03['content']['clear']());}['_attachListeners'](_0x10c072){this['listenTo'](_0x10c072,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x10c072,'Esc',(_0x5f3fc4,_0x10a440)=>{this['_manuallyClosedAnnotationViews']['add'](_0x10c072),this['_hideBalloon'](),_0x10a440();});}['_detachListeners'](_0x14ab9d){this['stopListening'](_0x14ab9d);}}class c extends _0x5753fc{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x314700,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1078bc){super(_0x1078bc),_0x1078bc['editing']['view']['addObserver'](_0x59b6e8),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x1078bc['plugins']['get'](_0x314700),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x484b06=this['editor']['plugins']['get'](j);_0x484b06['context']===this['editor']&&(_0x484b06['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x49249d,_0x4e436f)=>{const _0x28d266=this['_balloon'];if(this['isAttached']&&_0x28d266['visibleView']){const _0x928049=this['annotations']['getByView'](_0x28d266['visibleView']);_0x928049&&this['_closeAnnotation'](_0x928049),_0x4e436f();}}));}['afterInit'](){const _0x289411=this['editor']['plugins']['get'](j);_0x289411['context']===this['editor']&&(_0x289411['hasActive']()||_0x289411['switchTo']('inline'));}['setActiveAnnotation'](_0x32fc05){_0x32fc05!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x32fc05&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x32fc05)&&this['_addAnnotationToBalloon'](_0x32fc05,!0x0),_0x32fc05['isActive']=!0x0),_0x32fc05||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x32fc05);}['attach'](_0x765290){this['annotations']=_0x765290;const _0x139499=this['editor']['plugins']['get'](j),_0x117f8e=this['_balloon'];if(this['isAttached'])throw new _0xc716c1('inlineannotations-attach-already-attached',this);if(_0x139499['context']!==this['editor'])throw new _0xc716c1('inlineannotations-not-allowed-with-context',this);const _0x5e2b8b=this['editor']['plugins']['get'](b);this['listenTo'](_0x5e2b8b,'refresh',()=>{const _0x4ef9f9=_0x5e2b8b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1e9fcb,_0x343e8c;!this['_forceRefresh']&&(_0x1e9fcb=_0x4ef9f9,_0x343e8c=this['_selectedAnnotations'],_0x1e9fcb['length']===_0x343e8c['length']&&_0x1e9fcb['every'](_0x3ca2b6=>_0x343e8c['includes'](_0x3ca2b6)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4ef9f9),this['setActiveAnnotation'](_0x4ef9f9[0x0]||null));}),this['listenTo'](_0x5e2b8b,'blur',(_0x113804,{isAnnotationTracked:_0xf5e4b3})=>{this['activeAnnotation']&&_0xf5e4b3(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x59453d,_0x3c8e0c,_0x188b9d)=>{_0x188b9d||this['setActiveAnnotation'](null);}),this['listenTo'](_0x765290,'remove',(_0x2f539a,_0x58b58b)=>{this['_removeAnnotationFromBalloon'](_0x58b58b),_0x58b58b===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x117f8e,'change:visibleView',(_0x153195,_0x6b6c1f,_0x4bfd36,_0x549284)=>{_0x549284&&this['stopListening'](_0x549284);const _0xd5974f=_0x765290['getByView'](_0x4bfd36);_0x4bfd36&&_0xd5974f&&(this['listenTo'](_0x4bfd36,'change:height',()=>{_0x117f8e['updatePosition']();}),this['listenTo'](_0x4bfd36,'Esc',()=>{this['_closeAnnotation'](_0xd5974f),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xd5974f&&this['setActiveAnnotation'](_0xd5974f));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x117f8e['visibleView']&&(_0x765290['getByView'](_0x117f8e['visibleView'])&&_0x117f8e['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 _0xc716c1('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x58d1fb of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x58d1fb);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x828295){for(const _0x69f762 of this['_selectedAnnotations'])_0x828295['includes'](_0x69f762)||this['_manuallyClosed']['delete'](_0x69f762);for(const _0x2ea882 of this['annotations'])_0x828295['includes'](_0x2ea882)||this['_removeAnnotationFromBalloon'](_0x2ea882);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x17752d of _0x828295)this['_addAnnotationToBalloon'](_0x17752d);}this['_selectedAnnotations']=_0x828295;}['_addAnnotationToBalloon'](_0xc2f097,_0x526fa9=!0x1){this['_manuallyClosed']['has'](_0xc2f097)||(this['_addedAnnotations']['has'](_0xc2f097)||this['_balloon']['hasView'](_0xc2f097['view'])||(this['_addedAnnotations']['add'](_0xc2f097),this['_balloon']['add']({'stackId':_0xc2f097['view']['id'],'view':_0xc2f097['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xc2f097)}})),_0x526fa9&&this['_balloon']['showStack'](_0xc2f097['view']['id']));}['_getBalloonTargetForAnnotation'](_0x12c89e){const _0x3dfef4=_0x12c89e['target'],_0x4313d9=this['editor']['editing']['view'],_0x34d543=_0x4313d9['document']['selection']['getFirstRange'](),_0x41d62b=_0x4313d9['domConverter']['viewRangeToDom'](_0x34d543);if(_0x41d62b['collapse'](!0x0),_0x3dfef4){if(_0x3dfef4 instanceof _0x305cf4)return _0x3dfef4;let _0x176d4b=[];for(const _0x3f5eb5 of _0x3dfef4)_0x176d4b['push'](...F(_0x3f5eb5['getClientRects']()));_0x176d4b=function(_0x42d40a){const _0x29de8a=[];let _0x2cdc15=_0x42d40a[0x0];for(let _0x33f504=0x1;_0x33f504<_0x42d40a['length'];_0x33f504++)P(_0x2cdc15,_0x42d40a[_0x33f504])?_0x2cdc15['width']+=_0x42d40a[_0x33f504]['width']:(_0x29de8a['push'](_0x2cdc15),_0x2cdc15=_0x42d40a[_0x33f504]);return _0x29de8a['push'](_0x2cdc15),_0x29de8a;}(_0x176d4b);const _0x3619b6=_0x41d62b['getBoundingClientRect']();return _0x176d4b['find'](_0x44efbe=>_0x44efbe['top']<=_0x3619b6['top']&&_0x44efbe['bottom']>=_0x3619b6['bottom']&&_0x44efbe['left']<=_0x3619b6['left']&&_0x44efbe['right']>=_0x3619b6['right'])||_0x176d4b[0x0];}return _0x12c89e['targetRect']||_0x41d62b;}['_removeAnnotationFromBalloon'](_0x3b9d55){this['_addedAnnotations']['has'](_0x3b9d55)&&this['_balloon']['hasView'](_0x3b9d55['view'])&&(this['_addedAnnotations']['delete'](_0x3b9d55),this['_balloon']['remove'](_0x3b9d55['view']));}['_closeAnnotation'](_0xfd109b){this['_manuallyClosed']['add'](_0xfd109b),this['_removeAnnotationFromBalloon'](_0xfd109b);}}function F(_0x54c964){return Array['from'](_0x54c964)['map'](DOMRect['fromRect']);}function P(_0x33c542,_0x181339){return _0x33c542['top']===_0x181339['top']&&_0x33c542['bottom']===_0x181339['bottom']&&_0x33c542['right']===_0x181339['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1774d9,_0x2d4cda){super(_0x1774d9),this['set']('isEmpty',!_0x2d4cda['length']),this['focusTracker']=new _0x529579(),this['_annotationViews']=_0x2d4cda,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1fd229({'focusables':_0x2d4cda,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2d4cda,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2d4cda,'remove',(_0x20e0df,_0x52555e)=>{_0x52555e['isActive']&&this['focus'](),_0x2d4cda['length']||(this['isEmpty']=!0x0);});const _0x5b749e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1774d9,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2d4cda},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5b749e['if']('isEmpty','ck-hidden',_0x118dbe=>!_0x118dbe)]},'children':[{'text':N(_0x1774d9,'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 _0x4118cc of this['_annotationViews'])this['focusTracker']['add'](_0x4118cc['element']);this['_annotationViews']['on']('change',(_0x5ef2e5,{added:_0x12fc92,removed:_0x59e448})=>{for(const _0x1f916b of _0x12fc92)this['focusTracker']['add'](_0x1f916b['element']);for(const _0xcfb43b of _0x59e448)this['focusTracker']['remove'](_0xcfb43b['element']);});}}class p extends _0x3e241b{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x537c7c){super(_0x537c7c),this['archivedThreads']=new _0x214515();}['init'](){const _0x5d3e19=this['context'],_0x21c6c1=_0x5d3e19['plugins']['get'](o),_0x76016b=_0x5d3e19['plugins']['get'](y);this['listenTo'](_0x21c6c1,'addCommentThread',(_0x39da00,{threadId:_0x33c148})=>{const _0x26c00d=_0x21c6c1['getCommentThread'](_0x33c148);_0x26c00d['archivedAt']&&this['archivedThreads']['add'](_0x26c00d,this['_calculatePosition'](_0x26c00d['archivedAt'])),this['listenTo'](_0x26c00d,'change:archivedAt',(_0x40f216,_0x48ffb6,_0x278098)=>{_0x278098?this['archivedThreads']['has'](_0x26c00d)||this['archivedThreads']['add'](_0x26c00d,this['_calculatePosition'](_0x26c00d['archivedAt'])):this['archivedThreads']['has'](_0x26c00d)&&this['archivedThreads']['remove'](_0x26c00d);});}),this['listenTo'](_0x21c6c1,'removeCommentThread',(_0x8377e3,{threadId:_0x55e6cc})=>{const _0x28c20b=_0x21c6c1['getCommentThread'](_0x55e6cc);this['stopListening'](_0x28c20b),this['archivedThreads']['has'](_0x28c20b)&&this['archivedThreads']['remove'](_0x28c20b);},{'priority':'highest'}),this['listenTo'](_0x76016b['collection'],'focus',(_0x5caabe,_0x43fa5a)=>{_0x43fa5a['isVisible']||(_0x43fa5a['isActive']=!0x0,_0x76016b['activate'](_0x43fa5a));});}['_calculatePosition'](_0x1313c1){const _0xf836c4=[...this['archivedThreads']]['findIndex'](_0x10e1b0=>_0x10e1b0['archivedAt']<_0x1313c1);return _0xf836c4>-0x1?_0xf836c4:this['archivedThreads']['length'];}}class a extends _0x5753fc{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x570c6b];}constructor(_0x505994){super(_0x505994),this['annotationViews']=new _0x15d44a(),this['_pendingThreads']=[];}['init'](){const _0x229730=this['editor'],_0x4c39b3=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x229730['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x37ddc6,!0x0)),_0x229730['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x35e640=this['_createCommentsArchiveButton'](_0x427723);return _0x35e640['set']({'role':'menuitemcheckbox'}),_0x35e640;});const _0x1fea06=_0x229730['plugins']['get'](p),_0x37a263=_0x229730['plugins']['get']('Annotations'),_0x4afa54=_0x229730['plugins']['get']('CommentsRepository');_0x1fea06['archivedThreads']['forEach'](_0x13573c=>{this['_handleNewThread'](_0x13573c);}),this['listenTo'](_0x1fea06['archivedThreads'],'add',(_0x5a4e18,_0x1d3993)=>{this['_handleNewThread'](_0x1d3993);}),this['listenTo'](_0x37a263['collection'],'add',(_0x301226,_0x210ec8)=>{const _0xff0dcc=this['_pendingThreads']['find'](_0x8c8707=>{const _0x1bb2db=_0x4afa54['_threadToController']['get'](_0x8c8707);return _0x1bb2db&&_0x210ec8['innerView']===_0x1bb2db['view'];});if(_0xff0dcc){const _0x2598d0=this['_calculatePosition'](_0xff0dcc['archivedAt']);this['_addAnnotationToArchive'](_0x210ec8,_0x2598d0),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xff0dcc),0x1);}}),this['listenTo'](_0x1fea06['archivedThreads'],'remove',(_0x4fa680,_0x318293)=>{const _0x1b6c8a=_0x229730['config']['get']('collaboration.channelId');if(!_0x1b6c8a||_0x318293['channelId']===_0x1b6c8a){if(this['_pendingThreads']['includes'](_0x318293))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x318293),0x1);else{const _0x2efdc7=_0x4afa54['_threadToController']['get'](_0x318293),_0x431922=_0x37a263['getByInnerView'](_0x2efdc7['view']);this['annotationViews']['remove'](_0x431922['view']),this['stopListening'](_0x431922),this['stopListening'](_0x431922['focusableElements']);}}}),this['listenTo'](_0x37a263['collection'],'add',(_0x8563f6,_0x1c3523)=>{this['listenTo'](_0x1c3523,'escape',_0x4c39b3);}),this['listenTo'](_0x37a263['collection'],'remove',(_0x779fed,_0x4d85dd)=>{this['stopListening'](_0x4d85dd,'escape',_0x4c39b3);});}['_addAnnotationToArchive'](_0x4c9b84,_0x264324){this['listenTo'](_0x4c9b84,'set:isVisible',_0x366aef=>{_0x366aef['return']=!0x1,_0x366aef['stop']();}),this['annotationViews']['add'](_0x4c9b84['view'],_0x264324);}['_handleNewThread'](_0x2eee3d){const _0x110d0e=this['editor']['plugins']['get']('CommentsRepository'),_0x3dd934=this['editor']['plugins']['get']('Annotations'),_0x31f39b=this['editor']['config']['get']('collaboration.channelId');if(!_0x31f39b||_0x2eee3d['channelId']===_0x31f39b){const _0x206d9a=_0x110d0e['_threadToController']['get'](_0x2eee3d);if(!_0x206d9a)return void this['_pendingThreads']['push'](_0x2eee3d);const _0x2f82d3=this['_calculatePosition'](_0x2eee3d['archivedAt']),_0x541860=_0x3dd934['getByInnerView'](_0x206d9a['view']);_0x541860['isVisible']&&_0x3dd934['_visibleAnnotations']['remove'](_0x541860),this['_addAnnotationToArchive'](_0x541860,_0x2f82d3);}}['_calculatePosition'](_0x54e11d){const _0xdef90b=this['editor']['config']['get']('collaboration.channelId'),_0x1ef6a7=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x33f7d1=>_0x33f7d1['channelId']===_0xdef90b)['findIndex'](_0x57d6e8=>_0x57d6e8['archivedAt']<_0x54e11d);return _0x1ef6a7<0x0||_0x1ef6a7>this['annotationViews']['length']?this['annotationViews']['length']:_0x1ef6a7-0x1;}['_toggleDialog'](){const _0x1d7218=this['editor'],_0x4af817=_0x1d7218['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x1d7218['locale'],this['annotationViews'])),'commentsArchive'===_0x4af817['id']?_0x4af817['hide']():_0x4af817['show']({'id':'commentsArchive','title':N(_0x1d7218['locale'],'COMMENTS_ARCHIVE'),'icon':_0x5913f2,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4f9160['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x24119e,_0x48b828=!0x1){const _0x130a60=this['editor']['locale'],_0x47c8a6=this['editor']['plugins']['get']('Dialog'),_0x49262c=new _0x24119e(_0x130a60);return _0x49262c['bind']('isEnabled')['to'](this,'isEnabled'),_0x49262c['bind']('isOn')['to'](_0x47c8a6,'id',_0x16e19d=>'commentsArchive'===_0x16e19d),_0x49262c['set']({'label':N(_0x130a60,'COMMENTS_ARCHIVE'),'icon':_0x5913f2,'isToggleable':!0x0}),_0x48b828&&(_0x49262c['tooltip']=!0x0),this['listenTo'](_0x49262c,'execute',()=>this['_toggleDialog']()),_0x49262c;}['_hideDialogOnAnnotationEscape']=_0x499aa2=>{const _0x3288de=_0x499aa2['source'];if(!this['annotationViews']['has'](_0x3288de['view']))return;const _0x50235b=this['editor']['plugins']['get']('Dialog');_0x50235b['isOpen']&&'commentsArchive'===_0x50235b['id']&&(_0x50235b['hide'](),_0x499aa2['stop']());};}class vi extends _0x5753fc{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,Yt as BaseCommentThreadView,ci as BaseCommentView,yi as Comment,Ti as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,vi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|