@ckeditor/ckeditor5-comments 46.0.1-alpha.6 → 46.0.1-alpha.8
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(_0x5a83a1={}){function _0x480573(_0x47b86c){return _0x47b86c['map'](_0x45ee7a=>String['fromCharCode'](_0x45ee7a))['join']('');}(_0x5a83a1=Object['assign']({},_0x5a83a1))['plugins']||(_0x5a83a1['plugins']=Rt['defaultPlugins']),super(_0x5a83a1),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[_0x480573([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x480573([0x76,0x69,0x65,0x77])][_0x480573([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x480573([0x61,0x75,0x74,0x6f]),this[_0x480573([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x480573([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x480573([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x480573([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x480573([0x6f,0x6b])});}['create'](){const _0x74f00a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x74f00a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x108b2e=>{const _0x1dd865=this['model']['document']['getRoot'](),_0xaaa0b1=_0x1dd865&&_0x1dd865['getChild'](_0x1dd865['childCount']-0x1);_0x108b2e['setSelection'](_0xaaa0b1,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2ed6c6=this['editing']['view'],_0x12f24a=_0x2ed6c6['document']['getRoot'](),_0xa87f60=_0x12f24a['getChild'](0x0);_0x12f24a['childCount']>0x1||!_0xa87f60||'p'!=_0xa87f60['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x2ed6c6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xa87f60['placeholder']=this['placeholder']),St({'view':_0x2ed6c6,'element':_0xa87f60,'keepOnFocus':!0x0}),this['placeholderElement']=_0xa87f60);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x4802cf,_0x3086f0={}){super(_0x4802cf),this['editor']=null,this['_editorConfig']=_0x3086f0,this['set']('value',_0x3086f0['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x4802cf,'Reply...')),this['set']('submitLabel',N(_0x4802cf,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5d97f7(),this['focusCycler']=new _0x3261e3({'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',(_0x5bfb11,_0x518556)=>{this['cancelButtonView']['fire']('execute'),_0x518556();}),this['keystrokes']['set']('Ctrl+Enter',(_0x45c28b,_0x565999)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x565999());}),this['on']('submit',(_0x5f0d84,_0x559bd6)=>{_0x559bd6['length']>0xfde8?(alert(N(_0x4802cf,'TOO_LONG_COMMENT_ALERT',[_0x559bd6['length'],0xfde8])),_0x5f0d84['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 _0x5d697a=this['editor'];this['element']['insertBefore'](_0x5d697a['ui']['element'],this['element']['firstChild']),_0x5d697a['model']['document']['on']('change',()=>this['value']=_0x5d697a['getData']()),_0x5d697a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5d697a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x10c51d){-0x1===_0x10c51d?(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:_0x338784}=this,_0x33e6a5=new _0x1db6f3(_0x338784);return _0x33e6a5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x33e6a5['withText']=!0x0,_0x33e6a5['bind']('label')['to'](this,'submitLabel'),_0x33e6a5['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x33e6a5['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x272db3,_0x506758)=>!_0x506758&&!!_0x272db3['trim']()),_0x33e6a5;}['_createCancelButton'](){const {locale:_0x16cdbb}=this,_0x490f89=new _0x1db6f3(_0x16cdbb);return _0x490f89['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x490f89['label']=N(_0x16cdbb,'Cancel'),_0x490f89['withText']=!0x0,_0x490f89['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x490f89;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x315a0b=>{this['focusTracker']['add'](_0x315a0b['element']);}),this['focusables']['on']('change',(_0x2bffe1,_0x24874e)=>{for(const _0x443103 of Array['from'](_0x24874e['added'])['reverse']())this['focusTracker']['add'](_0x443103['element']);});}}class ie extends kt{constructor(_0xc82ab0,_0x30c2de,_0x319365){super(_0xc82ab0),this['commentInputView']=new os(_0xc82ab0,_0x319365),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x27f42a,_0x10450e)=>_0x27f42a||!!_0x10450e),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 _0x5290df(_0xc82ab0,_0x30c2de),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'](_0x58ef1f){this['commentInputView']['focus'](_0x58ef1f);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xad203,_0x7d6842)=>{const {submitButtonView:_0x4ba747,cancelButtonView:_0x1c9223,editor:_0x1f47d8}=this['commentInputView'];[_0x4ba747['element'],_0x1c9223['element'],_0x1f47d8?_0x1f47d8['editing']['view']['getDomRoot']():null]['filter'](_0x5c399f=>_0x5c399f)['some'](_0xeff76d=>_0xeff76d['contains'](_0x7d6842['target']))||(this['focus'](),_0x7d6842['preventDefault']());});}}class rs extends kt{constructor(_0x5ed0d7){super(_0x5ed0d7);const _0x2f6b67=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2f6b67['to']('count',_0x256fb9=>N(_0x5ed0d7,'NUMBER_OF_COMMENTS',_0x256fb9))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5d7838,_0x339344,_0x58bf82){super(_0x5d7838);const _0x17decc=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x339344['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x339344,this['_config']=_0x58bf82,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5515d4=>this['commentViews']['map'](_0x37c0e4=>_0x37c0e4['element'])['includes'](_0x5515d4['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5d7838),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xb55f42=>_0xb55f42-this['_config']['maxCommentsWhenCollapsed']);for(const _0x14d4f0 of _0x339344['comments'])this['_handleNewCommentModel'](_0x14d4f0);this['_handleInfoComment'](),this['listenTo'](_0x339344['comments'],'add',(_0x2e60c0,_0x5cbcc3)=>{const _0x1ef194=this['_calculatePosition'](_0x5cbcc3);this['length']++,this['_handleNewCommentModel'](_0x5cbcc3,_0x1ef194),this['refreshVisibleViews']();}),this['listenTo'](_0x339344['comments'],'remove',(_0x478d01,_0x47f205)=>{this['length']--,this['_handleRemoveCommentModel'](_0x47f205),this['refreshVisibleViews']();}),this['listenTo'](_0x339344,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x339344,'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',_0x17decc['if']('length','ck-hidden',_0xca6673=>!_0xca6673)],'aria-label':N(_0x5d7838,'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'](_0xd10e3){-0x1===_0xd10e3?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3850da of this['commentViews'])_0x3850da['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1e2174,_0x412ab8){const _0x556716=new this['_config']['CommentView'](this['locale'],_0x1e2174,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x556716['viewUid']=_0x1e2174['id'],_0x556716['delegate']('removeComment')['to'](this),_0x556716['delegate']('updateComment')['to'](this),_0x556716['delegate']('resolveCommentThread')['to'](this),_0x556716['delegate']('editorReady')['to'](this),_0x556716['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x556716,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x556716,_0x412ab8);}['_calculatePosition'](_0x3309ba){const _0x5e14f3=this['_model']['_findOptimalIndex'](_0x3309ba);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x3309ba['authoredAt']?_0x5e14f3-0x1:_0x5e14f3:_0x5e14f3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5c20aa={'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'],_0x5c20aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5c20aa));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1c2dc){const _0x48deac=this['commentViews']['remove'](_0x1c2dc['id']);this['stopListening'](_0x48deac),_0x48deac['isEditMode']&&this['_updateHasDirtyComment'](),_0x48deac['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x59df65=>_0x59df65['isEditMode']);}['_rearrangeCollapse'](){const _0x5f021c=function(_0x3fb733){const _0x4094c0=new _0x24de43();for(const _0x3cdbe3 of _0x3fb733)_0x4094c0['add'](_0x3cdbe3);return _0x4094c0;}(this['commentViews']),_0x3178b0=this['_collapsedCommentsView']['count'];for(let _0x56ec34=0x1;_0x56ec34<=_0x3178b0;_0x56ec34++)_0x5f021c['remove'](0x1);for(const _0x5c3270 of _0x5f021c)_0x5c3270['collapse']();_0x3178b0>0x0&&_0x5f021c['add'](this['_collapsedCommentsView'],0x1),ns(_0x51dad5(Array['from'](this['visibleViews']),Array['from'](_0x5f021c)),this['visibleViews'],_0x5f021c);}['_rearrangeExpand'](){ns(_0x51dad5(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1c4422 of this['visibleViews'])_0x1c4422['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1738f9=>{this['focusTracker']['add'](_0x1738f9['element']),this['keystrokes']['listenTo'](_0x1738f9['element']);}),this['commentViews']['on']('change',(_0x553318,_0x4c3da3)=>{for(const _0x4168a0 of _0x4c3da3['removed'])this['focusTracker']['remove'](_0x4168a0['element']),this['keystrokes']['stopListening'](_0x4168a0['element']);for(const _0x1b5571 of Array['from'](_0x4c3da3['added'])['reverse']())this['focusTracker']['add'](_0x1b5571['element']),this['keystrokes']['listenTo'](_0x1b5571['element']);});}}function ns(_0x396ffa,_0x18620c,_0x41f743){let _0x2c7965=0x0;for(const _0x44f287 of _0x396ffa)switch(_0x44f287){case'insert':_0x18620c['add'](_0x41f743['get'](_0x2c7965),_0x2c7965),_0x2c7965++;break;case'delete':_0x18620c['remove'](_0x2c7965);break;case'equal':_0x2c7965++;}}class oe extends kt{constructor(_0x28be6){super(_0x28be6);const _0x43ae17=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x43ae17['to']('contextValue',_0x35eba4=>N(_0x28be6,'THREAD_CONTEXT_LABEL',_0x35eba4)),'tabindex':-0x1},'children':[{'text':_0x43ae17['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x25470f,_0x89f5b7){super(_0x25470f);const _0x2cff99=this['bindTemplate'];this['_model']=_0x89f5b7,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3ddb50=>!!_0x3ddb50),this['bind']('contextValue')['to'](this['_model'],'context',_0x5bc668=>_0x5bc668&&_0x5bc668['value']?this['_trimContextValue'](_0x5bc668['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',_0x2cff99['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 _0x4e65df=new _0x1db6f3(this['locale']);return _0x4e65df['label']=N(this['locale'],'Reopen'),_0x4e65df['tooltip']=N(this['locale'],'Reopen'),_0x4e65df['icon']=_0x3961d6,_0x4e65df['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2cd33a=>!_0x2cd33a),_0x4e65df['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x34db67,_0x5dee67)=>_0x34db67&&_0x5dee67),_0x4e65df['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4e65df;}['_trimContextValue'](_0x42d77b){if(_0x42d77b['length']<0x96)return _0x42d77b;const _0x399bad=_0x42d77b['lastIndexOf']('\x20',0x93);return _0x42d77b['substring'](0x0,_0x399bad>-0x1?_0x399bad:0x93)+'...';}['_attachContextActions'](){const _0xd0d732=this['element']['querySelector']('.ck-context'),_0x2f64a5=_0xd0d732['querySelector']('.ck-context__value');this['listenTo'](_0xd0d732,'mouseenter',()=>{_0x2f64a5['offsetWidth']<_0x2f64a5['scrollWidth']&&_0xd0d732['classList']['add']('overlay');}),this['listenTo'](_0xd0d732,'mouseleave',()=>{_0xd0d732['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x360367 of this['focusables'])this['focusTracker']['add'](_0x360367['element']),this['keystrokes']['listenTo'](_0x360367['element']);}['_createContextView'](){const _0x1811e2=new oe(this['locale']);return _0x1811e2['bind']('contextValue')['to'](this),_0x1811e2;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x29e6ae,_0x1362bb,_0x53494c,_0x14529a){super(_0x29e6ae),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1362bb,this['_localUser']=_0x53494c,this['_config']=_0x14529a,this['commentThreadHeaderView']=new Yt(_0x29e6ae,_0x1362bb),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x29e6ae,N(_0x29e6ae,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x29e6ae,_0x1362bb,Object['assign']({'CommentView':this['_config']['CommentView']},_0x14529a)),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',(_0x25ad24,_0x199b1c)=>_0x25ad24||!!_0x199b1c),this['bind']('isUnlinked')['to'](_0x1362bb,'unlinkedAt',_0x56bbd9=>!!_0x56bbd9),this['bind']('ariaLabel')['to'](this,'length',_0x61bbfe=>{const _0x203801=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x61bbfe,_0x203801]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5d97f7(),this['keystrokes']=new jt(),this['focusCycler']=new _0x3261e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x550958=>_0x550958['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 _0x14409c=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5adfab=_0x14409c['commentInputView'];return _0x14409c['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5adfab,'value',(_0x52ccf3,_0x189e2b,_0x1273e3,_0x5b2e2a,_0x1ace41)=>!!_0x1ace41||!!_0x5b2e2a&&_0x1273e3&&!_0x189e2b||_0x52ccf3&&_0x1273e3&&!_0x189e2b),_0x5adfab['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xe68c2b,_0x104619,_0x2d518e)=>{let _0xed415c;return _0xed415c=_0x2d518e&&_0x104619?'Reply\x20to\x20reopen\x20discussion...':_0xe68c2b?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xed415c);}),_0x5adfab['bind']('submitLabel')['to'](this,'length',_0x4c8642=>N(this['locale'],_0x4c8642?'Reply':'Comment')),_0x5adfab['on']('submit',(_0x3dd0ce,_0x59c940)=>{this['fire']('addComment',_0x59c940),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5adfab['on']('cancel',()=>{this['focus']();}),_0x5adfab['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5adfab['on']('cancel',_0x2eaeba=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2eaeba['stop']());}),this['on']('change:isActive',(_0x1f84e9,_0x11ce46,_0x21079c)=>{_0x21079c||this['length']||_0x5adfab['value']||this['fire']('removeCommentThread');}),_0x14409c;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0xa31544(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xb300a7,target:_0x3bf307,type:_0x36e76e,isVisible:_0x16b81c=!0x0}){super(),this['view']=_0xb300a7,this['view']['element']||this['view']['render'](),this['_type']=_0x36e76e,this['_target']=_0x3bf307,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x24de43([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x221ba0,_0x377307)=>{this['view']['focusTracker']['add'](_0x377307);}),this['focusableElements']['on']('remove',(_0x4dc635,_0x496f8e)=>{this['view']['focusTracker']['remove'](_0x496f8e);}),this['set']('isVisible',_0x16b81c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x396aea=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x396aea),_0x396aea;}get['targetRect'](){const _0xc66ee0=this['target'];if(null===_0xc66ee0)return null;if(_0xc66ee0 instanceof _0x2770d5)return _0xc66ee0;const _0x4bdc18=_0xc66ee0['filter'](_0x71011=>function(_0x584235){const _0x12aa5b=_0x584235['offsetParent'];if(_0x12aa5b)return!0x0;const _0x1ed446=_0x584235['getClientRects']()['item'](0x0);return!!_0x1ed446;}(_0x71011));return 0x0===_0x4bdc18['length']?null:new _0x2770d5(_0x4bdc18[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x7a1d2b){this['view']['isActive']=_0x7a1d2b,this['view']['mainView']['isActive']=_0x7a1d2b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x11777f){if(!(null===_0x11777f||_0x11777f instanceof _0x2770d5||Array['isArray'](_0x11777f)&&_0x11777f['every'](_0x5e2f99=>fi(_0x5e2f99))))throw new _0x55af7e('annotation-invalid-target',null,{'target':_0x11777f});}['_getNormalizedTarget'](){const _0x38d8a5='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x38d8a5)?[_0x38d8a5]:_0x38d8a5;}}function fi(_0x3795c3){return null!==_0x3795c3&&'object'==typeof _0x3795c3&&'nodeType'in _0x3795c3&&0x1===_0x3795c3['nodeType'];}class S extends _0x24de43{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x324417=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5d97f7(),this['_focusTracker']['on']('change:isFocused',(_0x4160f4,_0x2b4b1b,_0x452cd1)=>{_0x452cd1||this['fire']('blur');});for(const _0x45cd26 of _0x324417)this['add'](_0x45cd26);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x54f564){if(this['has'](_0x54f564))throw new _0x55af7e('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x54f564['innerView'],_0x54f564),this['_viewToAnnotation']['set'](_0x54f564['view'],_0x54f564);for(const _0x2e3773 of _0x54f564['focusableElements'])this['_focusTracker']['add'](_0x2e3773);this['listenTo'](_0x54f564['focusableElements'],'add',(_0x1ca9f0,_0x46ae74)=>{this['_focusTracker']['add'](_0x46ae74);}),this['listenTo'](_0x54f564['focusableElements'],'remove',(_0x5f3a7c,_0x23bc78)=>{this['_focusTracker']['remove'](_0x23bc78);}),this['listenTo'](_0x54f564['view']['focusTracker'],'change:isFocused',(_0x480e60,_0x12f18f,_0x14c27f)=>{_0x14c27f&&this['fire']('focus',_0x54f564);}),_0x54f564['updateTargetRect']();const _0x3989be=this['_getOrderInContent'](_0x54f564['view']['targetRect']);return super['add'](_0x54f564,_0x3989be);}['remove'](_0x3a7981){if(!this['has'](_0x3a7981))throw new _0x55af7e('annotationcollection-not-existing-item',null);this['stopListening'](_0x3a7981['view']['focusTracker']),this['stopListening'](_0x3a7981['focusableElements']);for(const _0x5b843f of _0x3a7981['focusableElements'])this['_focusTracker']['remove'](_0x5b843f);return this['_viewToAnnotation']['delete'](_0x3a7981['view']),this['_innerViewToAnnotation']['delete'](_0x3a7981['innerView']),super['remove'](_0x3a7981);}['getByInnerView'](_0xb2182c){return this['_innerViewToAnnotation']['get'](_0xb2182c);}['getByView'](_0x9f1c45){return this['_viewToAnnotation']['get'](_0x9f1c45);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x198e55 of this)_0x198e55['updateTargetRect']();this['_sort']();}['_sort'](){const _0x145cd6=Array['from'](this)['sort']((_0x442587,_0xe21629)=>w(_0x442587['view']['targetRect'],_0xe21629['view']['targetRect']));for(let _0x361b06=_0x145cd6['length']-0x1;_0x361b06>0x0;_0x361b06--){const _0x5e9a85=_0x145cd6[_0x361b06];_0x361b06!==this['getIndex'](_0x5e9a85)&&(this['remove'](_0x5e9a85),this['add'](_0x5e9a85));}}['_getOrderInContent'](_0x428450){let _0x2d4937=0x0;if(!_0x428450)return this['length'];for(const _0x372abd of this){const _0x32cb2a=_0x372abd['view']['targetRect'];if(_0x32cb2a){if(w(_0x428450,_0x32cb2a)<0x0)return _0x2d4937;_0x2d4937++;}}return _0x2d4937;}}function v({source:_0x445d58,target:_0x329271,filter:_0x49ace2}){for(const _0x1a2915 of _0x445d58)_0x49ace2(_0x1a2915)&&_0x329271['add'](_0x1a2915);_0x329271['listenTo'](_0x445d58,'add',(_0x33d7c8,_0x1293a2)=>{_0x49ace2(_0x1293a2)&&_0x329271['add'](_0x1293a2);}),_0x329271['listenTo'](_0x445d58,'remove',(_0x2a8715,_0x4da704)=>{_0x329271['has'](_0x4da704)&&_0x329271['remove'](_0x4da704);});}function w(_0x19cf2b,_0x11bc84){if(null===_0x19cf2b&&null===_0x11bc84)return 0x0;if(null===_0x19cf2b)return-0x1;if(null===_0x11bc84)return 0x1;const _0x20525f=_0x19cf2b['top']-_0x11bc84['top'];return 0x0==_0x20525f?_0x19cf2b['left']-_0x11bc84['left']:_0x20525f;}class y extends _0x1756af{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3cef63){if(super(_0x3cef63),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3cef63 instanceof _0x581330){const _0x49cde3=_0x3cef63['locale'];_0x3cef63['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x49cde3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x59244d){this['collection']['add'](_0x59244d);}['remove'](_0x5c44c2){this['collection']['remove'](_0x5c44c2),_0x5c44c2['destroy']();}['refreshVisibility'](){for(const _0x6a2f9a of this['collection'])_0x6a2f9a['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x83220b){return this['collection']['getByInnerView'](_0x83220b);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x5cbb40 of this['collection'])_0x5cbb40['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x320ac6){this['fire']('_activateAnnotation',_0x320ac6);}['createAnnotation'](_0x6d02b1){return new T(_0x6d02b1);}['createAnnotationView'](_0x2df8e5,_0x282d26){return new E(_0x2df8e5,_0x282d26);}['_addActiveAnnotation'](_0x51f984){const _0x2ba29d=new Set(this['activeAnnotations']);_0x2ba29d['add'](_0x51f984),this['activeAnnotations']=_0x2ba29d;}['_removeActiveAnnotation'](_0x3634c1){const _0x3a5cdc=new Set(this['activeAnnotations']);_0x3a5cdc['delete'](_0x3634c1),this['activeAnnotations']=_0x3a5cdc;}['_bindAnnotationsToVisibleAnnotations'](){const _0x428085=this['collection'],_0x2d768c=this['_visibleAnnotations'];function _0x2a35f0(_0x15837a){const _0x17c6f3=_0x15837a['source'];_0x17c6f3['isVisible']&&!_0x2d768c['has'](_0x17c6f3)?_0x2d768c['add'](_0x17c6f3):!_0x17c6f3['isVisible']&&_0x2d768c['has'](_0x17c6f3)&&_0x2d768c['remove'](_0x17c6f3),_0x17c6f3['view']['focusTracker']['remove'](_0x17c6f3['view']['element']),_0x17c6f3['view']['focusTracker']['add'](_0x17c6f3['view']['element']);}this['listenTo'](_0x428085,'add',(_0x1434c7,_0x34c65e)=>{_0x34c65e['isVisible']&&_0x2d768c['add'](_0x34c65e),this['listenTo'](_0x34c65e,'change:isVisible',_0x2a35f0);}),this['listenTo'](_0x428085,'remove',(_0x47941c,_0x13b0d1)=>{_0x2d768c['has'](_0x13b0d1)&&_0x2d768c['remove'](_0x13b0d1),this['stopListening'](_0x13b0d1,'change:isVisible',_0x2a35f0);});}['_setupEnterAnnotationKeystroke'](){const _0x3ac2e1=_0x215cef=>{_0x215cef['on']('ready',()=>{_0x215cef['keystrokes']['set'](_0x4b75c9,(_0x51b32e,_0x3aea9e)=>{const _0x59bc26=_0x201e2d(this['activeAnnotations']['values']());_0x59bc26&&(_0x59bc26['view']['focus'](),_0x3aea9e());});});};this['context']instanceof _0x581330?_0x3ac2e1(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x114350,_0x10d76f)=>{_0x3ac2e1(_0x10d76f);});}['_setupEscapeAnnotationHandling'](){const _0x3319fa=_0x212f10=>{const _0x43bf0a=_0x212f10['source'],_0x4c425f=[];let _0x510efd;if(Array['isArray'](_0x43bf0a['target'])){_0x510efd=_0x43bf0a['target'][0x0],this['context']instanceof _0x581330?_0x4c425f['push'](this['context']):this['context']['editors']&&_0x4c425f['push'](...this['context']['editors']);for(const _0x36c75f of _0x4c425f)for(const _0x2c5497 of _0x36c75f['editing']['view']['domRoots']['values']())if(_0x2c5497['contains'](_0x510efd))return void _0x36c75f['editing']['view']['focus']();_0x510efd['focus']();}};this['listenTo'](this['collection'],'add',(_0x52832b,_0x157c3a)=>{this['listenTo'](_0x157c3a,'escape',_0x3319fa,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3b3082,_0xf61b0e)=>{this['stopListening'](_0xf61b0e,'escape',_0x3319fa);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1756af{['_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(_0x3fb165){super(_0x3fb165),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xf7a537=this['context']['config'];_0xf7a537['define']('comments.maxCommentsWhenCollapsed',0x2),_0xf7a537['define']('comments.maxThreadTotalWeight',0x1f4),_0xf7a537['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xf7a537['define']('comments.CommentThreadView',gt),_0xf7a537['define']('comments.CommentView',Tt),_0xf7a537['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x1d83b8=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x19c88d,_0x34bdad)=>this['_addCommentThread'](_0x34bdad)),this['on']('submitCommentThread',(_0x35cc8a,_0x476a43)=>this['_submitCommentThread'](_0x476a43)),this['on']('resolveCommentThread',(_0x2e2e4b,_0x39226a)=>this['_resolveCommentThread'](_0x39226a)),this['on']('resolveCommentThread',(_0x44e62b,_0x1faf23)=>this['_updateActiveAnnotation'](_0x1faf23),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x28218e,_0x34ce4a)=>this['_reopenCommentThread'](_0x34ce4a)),this['on']('reopenCommentThread',(_0x51ebca,_0x43ff7a)=>this['_updateActiveAnnotation'](_0x43ff7a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x29d716,_0x539f16)=>this['_removeCommentThread'](_0x539f16)),this['on']('updateCommentThread',(_0x27fe04,_0x39e386)=>this['_updateCommentThread'](_0x39e386)),this['on']('updateCommentThread',(_0x47fb10,_0x3ff309)=>this['_updateActiveAnnotation'](_0x3ff309),{'priority':'lowest'}),this['on']('addComment',(_0x3fabc2,_0x5b6249)=>this['_addComment'](_0x5b6249)),this['on']('updateComment',(_0x86e168,_0x22ddd9)=>this['_updateComment'](_0x22ddd9)),this['on']('removeComment',(_0x3e147f,_0x106150)=>this['_removeComment'](_0x106150)),this['on']('addComment',(_0x285f3b,{threadId:_0xb164e4,isFromAdapter:_0x28ee2a})=>{if(_0x28ee2a)return;const _0x20021a=this['getCommentThread'](_0xb164e4),_0x5b3802=_0x20021a&&this['_threadToController']['get'](_0x20021a);_0x5b3802&&_0x5b3802['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x1d83b8,'change:activeAnnotations',(_0xec4abb,_0x4d4a34,_0x55146e)=>{const _0x47e4d1=Array['from'](_0x55146e)['map'](_0x2ecbc6=>this['_viewToController']['get'](_0x2ecbc6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x47e4d1?_0x47e4d1['model']:null;});}set['adapter'](_0x4a9a32){if(this['_adapter'])throw new _0x55af7e('commentsrepository-adapter-already-set');this['_adapter']=_0x4a9a32;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4009ac=_t,threadId:_0x57e846=_0x1797dc(),comments:_0x1d919c=[],unlinkedAt:_0x471f1c=null,resolvedAt:_0x57b8be=null,resolvedBy:_0xd2774f=null,target:_0x47345c=null,context:_0x42ca05=null,attributes:_0x309bb4={},isResolvable:_0x286ef2=!0x0,isSubmitted:_0x34e263=!0x1,isFromAdapter:_0x4c8852=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4009ac),{'channelId':_0x4009ac,'threadId':_0x57e846,'comments':_0x1d919c,'unlinkedAt':_0x471f1c,'resolvedAt':_0x57b8be,'resolvedBy':_0xd2774f,'target':_0x47345c,'context':_0x42ca05,'attributes':_0x309bb4,'isFromAdapter':_0x4c8852,'isResolvable':_0x286ef2,'isSubmitted':_0x34e263}),this['getCommentThread'](_0x57e846);}['openNewCommentThread']({channelId:_0x160bd=_t,threadId:_0x161c00=_0x1797dc(),target:_0x3e07d7,context:_0x449544=null,isResolvable:_0x219802=!0x0}){if(this['_readOnlyChannels']['has'](_0x160bd)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3e07d7)throw new _0x55af7e('commentsrepository-missing-target');const _0x12c297=this['addCommentThread']({'channelId':_0x160bd,'threadId':_0x161c00,'target':_0x3e07d7,'context':_0x449544,'isResolvable':_0x219802});if(!_0x12c297)return null;const _0x53b49a=this['_threadToController']['get'](_0x12c297),_0x3148dc=_0x53b49a['view']['commentThreadInputView']['commentInputView'],_0xf3061=this['context']['plugins']['get'](y),_0x3b3d39=_0xf3061['getByInnerView'](_0x53b49a['view']);return _0xf3061['activate'](_0x3b3d39),_0x3148dc['once']('editorReady',()=>_0x3148dc['focus']()),_0x12c297;}['hasCommentThread'](_0x324827){if('string'!=typeof _0x324827)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x324827);}['updateCommentThread']({channelId:_0x351ee3=_t,threadId:_0x43c750,context:_0xe06b46,unlinkedAt:_0x26171d,attributes:_0x2cea66,isFromAdapter:_0x8cb60f=!0x1}){return this['fire'](Nt('updateCommentThread',_0x351ee3),{'channelId':_0x351ee3,'threadId':_0x43c750,'context':_0xe06b46,'unlinkedAt':_0x26171d,'attributes':_0x2cea66,'isFromAdapter':_0x8cb60f}),this['getCommentThread'](_0x43c750);}['getCommentThread'](_0x37f39){if('string'!=typeof _0x37f39)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x37f39);}['fetchCommentThread']({channelId:_0x2ec133,threadId:_0x171bcc}={}){const _0x16b69f=this['getCommentThread'](_0x171bcc);if(_0x16b69f)return Promise['resolve'](_0x16b69f);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x55af7e('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x2ec133,'threadId':_0x171bcc})['then'](_0x27d751=>this['hasCommentThread'](_0x171bcc)?this['getCommentThread'](_0x171bcc):_0x27d751?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x2ec133},_0x27d751)):void 0x0)['catch'](_0x27a6eb=>{throw console['error'](_0x27a6eb),new _0x55af7e('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x555f95,skipNotAttached:_0x468bc8=!0x1,skipEmpty:_0x4cbe9f=!0x1,toJSON:_0x4fe7c0=!0x1}={}){const _0x1b7de7=[];for(const _0x12f080 of this['_threads']['values']())_0x555f95&&_0x12f080['channelId']!==_0x555f95||_0x468bc8&&!_0x12f080['isAttached']||_0x4cbe9f&&0x0===_0x12f080['length']||_0x1b7de7['push'](_0x12f080);return _0x4fe7c0?_0x1b7de7['map'](_0x4df287=>_0x4df287['toJSON']()):_0x1b7de7;}['getAnnotationForCommentThread'](_0x39dce0){const _0x3c8061=this['_threadToController']['get'](_0x39dce0);if(!_0x3c8061)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3c8061['view'])||null;}['getCommentThreadForAnnotation'](_0x556f2a){const _0x29c5f3=this['_viewToController']['get'](_0x556f2a['innerView']);return _0x29c5f3?_0x29c5f3['model']:null;}['setActiveCommentThread'](_0x154bb3){const _0x477d35=this['context']['plugins']['get'](y);if(!_0x154bb3)return void(this['activeCommentThread']&&_0x477d35['deactivateAll']());const _0x5bcfcf=this['getCommentThread'](_0x154bb3);if(!_0x5bcfcf)throw new _0x55af7e('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x154bb3});if(!this['_threadToController']['has'](_0x5bcfcf))throw new _0x55af7e('commentsrepository-active-not-attached',null,{'threadId':_0x154bb3});const _0x17d2d7=_0x477d35['getByInnerView'](this['_threadToController']['get'](_0x5bcfcf)['view']);_0x477d35['activate'](_0x17d2d7);}['switchReadOnly'](_0x291cc1,_0x1930ad){_0x291cc1?this['_readOnlyChannels']['add'](_0x1930ad):this['_readOnlyChannels']['delete'](_0x1930ad),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x39fa13){return this['_readOnlyChannels']['has'](_0x39fa13)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x81e5f4,_0x348203){return new vt(_0x81e5f4,_0x348203);}['setPermissions'](_0x1ced07,_0x4c38a7=_t){this['_permissions']['set'](_0x4c38a7,_0x1ced07),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x18e4d6=_t){return this['_permissions']['has'](_0x18e4d6)?this['_permissions']['get'](_0x18e4d6):bt;}['_addCommentThread']({channelId:_0x100026,threadId:_0x264a18,comments:_0x5e3cc4,unlinkedAt:_0x400150,resolvedAt:_0x2800dc,resolvedBy:_0xbadc0b,target:_0xc37c62,context:_0x3e6382,attributes:_0x1b7977,isFromAdapter:_0x3427eb,isResolvable:_0x5e54d3,isSubmitted:_0x1caa47}){if('string'!=typeof _0x264a18)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x264a18});if(this['hasCommentThread'](_0x264a18))throw new _0x55af7e('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x264a18});const _0x263bec=new pi(this,{'channelId':_0x100026,'id':_0x264a18,'context':_0x3e6382,'attributes':_0x1b7977,'unlinkedAt':_0x400150,'resolvedAt':_0x2800dc,'resolvedBy':_0xbadc0b?this['context']['plugins']['get'](it)['getUser'](_0xbadc0b):null,'isResolvable':_0x5e54d3,'isSubmitted':_0x1caa47||_0x3427eb});this['_threads']['set'](_0x264a18,_0x263bec);for(const _0x3fd277 of _0x5e3cc4)_0x263bec['_add'](this['_createNewComment']({'threadId':_0x264a18,..._0x3fd277}));return _0xc37c62&&_0x263bec['attachTo'](_0xc37c62),_0x3427eb||!_0x263bec['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x100026,'threadId':_0x264a18});}['_submitCommentThread']({channelId:_0x105444,threadId:_0x2a7818}){if(!this['hasCommentThread'](_0x2a7818))throw new _0x55af7e('commentsrepository-missing-comment-thread',this);const _0x58e039=this['getCommentThread'](_0x2a7818);if(_0x58e039['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0xf025ef,comments:_0x249dd1,resolvedAt:_0x5c859e,resolvedBy:_0x180025,context:_0x54a2df,attributes:_0xabb37d}=_0x58e039,_0x1e29c3=this['context']['plugins']['get']('PendingActions'),_0x3a03df=_0x1e29c3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x105444,'threadId':_0xf025ef,'comments':_0x249dd1['map'](_0x55d436=>_0x55d436['toJSON']()),'resolvedAt':_0x5c859e,'resolvedBy':_0x180025?_0x180025['id']:_0x180025,'context':_0x54a2df,'attributes':_0xabb37d})['then'](({comments:_0x241f0f})=>{_0x1e29c3['remove'](_0x3a03df);for(const _0x260e8f of _0x241f0f)this['_updateComment']({'channelId':_0x105444,'threadId':_0x2a7818,'commentId':_0x260e8f['commentId'],'createdAt':_0x260e8f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x55ed3a=>{throw console['error'](_0x55ed3a),new _0x55af7e('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x113690,target:_0x47cc46}){const _0x23a10c=this['getCommentThread'](_0x113690);if(!_0x23a10c)throw new _0x55af7e('commentsrepository-attach-missing-comment-thread',this);const _0x4f1c8f=this['context']['plugins']['get']('PendingActions'),_0x509359=this['context']['plugins']['get'](y),_0x1e0d49=this['_createCommentThreadView'](_0x23a10c),_0x46fe5b=new vt(_0x23a10c,_0x1e0d49);let _0x244cee=null;_0x1e0d49['on']('change:isDirty',(_0x161f2b,_0x32a539,_0x209b81)=>{_0x209b81?_0x244cee=_0x4f1c8f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x244cee&&(_0x4f1c8f['remove'](_0x244cee),_0x244cee=null);}),this['_threadToController']['set'](_0x23a10c,_0x46fe5b),this['_viewToController']['set'](_0x1e0d49,_0x46fe5b);const _0x41fa99=new E(this['context']['locale'],_0x1e0d49);_0x41fa99['bind']('length')['to'](_0x1e0d49),_0x41fa99['bind']('isDirty')['to'](_0x1e0d49,'isDirty',_0x1e0d49,'length',(_0x16c424,_0x133527)=>_0x16c424||!_0x133527),_0x41fa99['bind']('isActive')['to'](_0x1e0d49),_0x41fa99['type']='comment';const _0x4e598d=new T({'view':_0x41fa99,'target':_0x47cc46,'type':'comment','isVisible':!_0x23a10c['archivedAt']&&!!('function'==typeof _0x47cc46?_0x47cc46():_0x47cc46)});return _0x1e0d49['on']('escape',()=>{_0x4e598d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1e0d49,_0x4e598d),_0x509359['add'](_0x4e598d),_0x4e598d;}['_bindAnnotationToEditors'](_0x3af503,_0x31ebb8){this['listenTo'](_0x3af503,'editorReady',(_0x553300,_0x42e676)=>{const _0x3bc0e5=_0x42e676['ui']['view']['body']['bodyCollectionContainer'];_0x31ebb8['focusableElements']['add'](_0x3bc0e5),this['context']instanceof _0x581330&&this['context']['ui']['focusTracker']['add'](_0x3bc0e5);},{'priority':'highest'}),this['listenTo'](_0x3af503,'editorDestroyed',(_0x63e5a7,_0x2619e1)=>{const _0x3aff85=_0x2619e1['ui']['view']['body']['bodyCollectionContainer'];_0x31ebb8['focusableElements']['has'](_0x3aff85)&&_0x31ebb8['focusableElements']['remove'](_0x3aff85),this['context']instanceof _0x581330&&this['context']['ui']['focusTracker']['remove'](_0x3aff85);});}['_unbindEditors'](_0x5e6feb){this['stopListening'](_0x5e6feb,'editorReady'),this['stopListening'](_0x5e6feb,'editorDestroyed');}['_createCommentThreadView'](_0x1d0a75){const _0x109bb4=this['context']['plugins']['get'](it),{config:_0x11e919,locale:_0x420299}=this['context'],_0x1e341b=pt(_0x11e919['get']('locale'),_0x420299);return new(0x0,(_0x11e919['get']('comments'))['CommentThreadView'])(_0x420299,_0x1d0a75,_0x109bb4['me'],{'editorConfig':{..._0x11e919['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x11e919['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x11e919['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x11e919['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x11e919['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1e341b,'CommentView':_0x11e919['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2cba61,channelId:_0x4485de,resolvedAt:_0xbe5b54,resolvedBy:_0x344d72,isFromAdapter:_0x26d400}){if(!this['hasCommentThread'](_0x2cba61))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x2cba61});const _0x2c6f0f=this['getCommentThread'](_0x2cba61);if(_0x2c6f0f['isResolved'])throw new _0x55af7e('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2cba61});const _0xb63f54=this['context']['plugins']['get'](it);if(_0x2c6f0f['resolvedBy']=_0xb63f54['getUser'](_0x344d72),_0x2c6f0f['resolvedAt']=_0xbe5b54,_0x26d400||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x54b89d=this['context']['plugins']['get']('PendingActions'),_0x1ab79a=_0x54b89d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4485de,'threadId':_0x2cba61})['then'](({resolvedAt:_0x3246e4,resolvedBy:_0x454cc5})=>{_0x54b89d['remove'](_0x1ab79a),_0x2c6f0f['resolvedBy']['id']!==_0x454cc5&&(_0x2c6f0f['resolvedBy']=_0xb63f54['getUser'](_0x454cc5)),_0x2c6f0f['resolvedAt']=_0x3246e4;})['catch'](_0x523b69=>{throw console['error'](_0x523b69),new _0x55af7e('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1f1faf,channelId:_0x4cb1ac,isFromAdapter:_0x276700}){if(!this['hasCommentThread'](_0x1f1faf))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f1faf});const _0x5e7de5=this['getCommentThread'](_0x1f1faf);if(!_0x5e7de5['isResolved'])throw new _0x55af7e('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1f1faf});if(_0x5e7de5['resolvedBy']=null,_0x5e7de5['resolvedAt']=null,_0x276700||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x230741=this['context']['plugins']['get']('PendingActions'),_0x1f204d=_0x230741['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4cb1ac,'threadId':_0x1f1faf})['then'](()=>_0x230741['remove'](_0x1f204d))['catch'](_0x20bf65=>{throw console['error'](_0x20bf65),new _0x55af7e('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2e4079,isFromAdapter:_0x35c720}){const _0x287ea3=this['getCommentThread'](_0x2e4079);if(!_0x287ea3)throw new _0x55af7e('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2e4079),this['_threads']['delete'](_0x2e4079),!_0x287ea3['isSubmitted']||_0x35c720||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4b7752=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3dcead}=_0x287ea3,_0x446da2=_0x4b7752['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3dcead,'threadId':_0x2e4079})['then'](()=>_0x4b7752['remove'](_0x446da2))['catch'](_0xa8dc1f=>{throw console['error'](_0xa8dc1f),new _0x55af7e('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x415dc4,unlinkedAt:_0x31b053,context:_0x287eb9,attributes:_0x2d6fd4,isFromAdapter:_0x5219e3}){if('string'!=typeof _0x415dc4)throw new _0x55af7e('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x415dc4});if(!this['hasCommentThread'](_0x415dc4))throw new _0x55af7e('commentsrepository-missing-comment-thread',null,{'threadId':_0x415dc4});const _0x53443c=this['getCommentThread'](_0x415dc4);let _0x5695f8=!0x1;if(void 0x0!==_0x287eb9&&_0x53443c['context']!==_0x287eb9&&(_0x53443c['context']=_0x287eb9,_0x5695f8=!0x0),void 0x0!==_0x31b053&&_0x53443c['unlinkedAt']!==_0x31b053&&(_0x53443c['unlinkedAt']=_0x31b053,_0x5695f8=!0x0),_0x2d6fd4&&!At(_0x2d6fd4,_0x53443c['attributes'])&&(_0x53443c['attributes']=_0x2d6fd4,_0x5695f8=!0x0),!_0x5695f8)return Promise['resolve']();if(!_0x53443c['isSubmitted']||_0x5219e3||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x12740b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4cc0e0}=_0x53443c,_0x409892=_0x12740b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4cc0e0,'threadId':_0x415dc4,'context':_0x287eb9,'unlinkedAt':_0x31b053,'attributes':_0x2d6fd4})['then'](()=>_0x12740b['remove'](_0x409892))['catch'](_0x5b6176=>{throw console['error'](_0x5b6176),new _0x55af7e('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x347bd4){const _0x634c98=this['context']['plugins']['get'](y),_0x5cf96e=this['getCommentThread'](_0x347bd4);if(_0x5cf96e['_isAttached']=!0x1,this['_threadToController']['has'](_0x5cf96e)){const _0x3405ae=this['_threadToController']['get'](_0x5cf96e),_0x240ac5=_0x3405ae['view'],_0x53ac15=_0x634c98['getByInnerView'](_0x240ac5);this['_threadToController']['delete'](_0x5cf96e),this['_viewToController']['delete'](_0x240ac5),_0x53ac15&&_0x634c98['remove'](_0x53ac15),_0x3405ae['destroy'](),_0x240ac5['destroy']()['then'](()=>{this['_unbindEditors'](_0x240ac5);});}}['_updateActiveAnnotation']({threadId:_0x198294,resolvedAt:_0x3abc95,unlinkedAt:_0x18fcaf}){const _0x16b2f3=!!_0x3abc95,_0x360e11=this['context']['plugins']['get'](y),_0x519898=this['getCommentThread'](_0x198294);if(this['_threadToController']['has'](_0x519898)){const _0x180074=this['_threadToController']['get'](_0x519898)['view'],_0x338e7b=_0x360e11['getByInnerView'](_0x180074);_0x338e7b&&(_0x16b2f3&&_0x360e11['_removeActiveAnnotation'](_0x338e7b),_0x18fcaf?_0x338e7b['isVisible']=!0x1:_0x338e7b['refreshVisibility']());}}['_getExternalAuthor'](_0x221de8){const _0x5bc5e0=this['context']['plugins']['get'](it),_0x3d4296=It('external:'+_0x221de8),_0x427ae3=_0x5bc5e0['getUser'](_0x3d4296);return _0x427ae3||_0x5bc5e0['addUser']({'id':_0x3d4296,'name':_0x221de8});}['_createNewComment']({threadId:_0x459606,commentId:_0x2c60b4=_0x1797dc(),content:_0x10d9ad,authorId:_0x580a6f,createdAt:_0x20786e,attributes:_0x2a9d55}){if('string'!=typeof _0x2c60b4)throw new _0x55af7e('commentsrepository-invalid-commentid');if('string'!=typeof _0x580a6f)throw new _0x55af7e('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x10d9ad||!_0x10d9ad['trim']())throw new _0x55af7e('commentsrepository-invalid-comment-content');const _0x1c1c85=this['context']['plugins']['get'](it)['getUser'](_0x580a6f);if(!_0x1c1c85)throw new _0x55af7e('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x580a6f});let _0x2a5d06=null,_0xd4188c=_0x20786e;return _0x2a9d55?.['@external']&&(_0x2a5d06=this['_getExternalAuthor'](_0x2a9d55['@external']['authorName']),_0xd4188c=new Date(_0x2a9d55['@external']['createdAt'])),new wi(this,{'threadId':_0x459606,'id':_0x2c60b4,'author':_0x2a5d06||_0x1c1c85,'creator':_0x1c1c85,'content':_0x10d9ad,'createdAt':_0x20786e,'authoredAt':_0xd4188c,'attributes':_0x2a9d55});}['_addComment'](_0x453e7e){let {threadId:_0x29b957,content:_0x4a3249,attributes:_0x5510df,isFromAdapter:_0x1f4d8e}=_0x453e7e;const _0x13a07d=this['getCommentThread'](_0x453e7e['threadId']);if(!_0x13a07d)throw new _0x55af7e('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x28d36b=this['_createNewComment'](_0x453e7e),{id:_0x4fb344}=_0x28d36b;if(_0x13a07d['_add'](_0x28d36b),_0x1f4d8e||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x13a07d['isSubmitted'])return Promise['resolve']();const _0x5977b2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4ba61d}=_0x13a07d,_0x29bd39=_0x5977b2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5510df||(_0x5510df={}),this['adapter']['addComment']({'channelId':_0x4ba61d,'threadId':_0x29b957,'commentId':_0x4fb344,'content':_0x4a3249,'attributes':_0x5510df})['then'](_0x5ab5a2=>{_0x5977b2['remove'](_0x29bd39),_0x5ab5a2&&this['_updateComment']({'channelId':_0x4ba61d,'threadId':_0x29b957,'commentId':_0x4fb344,'createdAt':_0x5ab5a2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x530d74=>{throw console['error'](_0x530d74),new _0x55af7e('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x18d6f6,commentId:_0xc59b9b,content:_0x3e2961,createdAt:_0x540c75,attributes:_0x1c07d5,isFromAdapter:_0x1bc539}){if(void 0x0!==_0x3e2961&&('string'!=typeof _0x3e2961||!_0x3e2961['trim']()['length']))throw new _0x55af7e('commentsrepository-update-comment-invalid-content');const _0x30198b=this['getCommentThread'](_0x18d6f6),_0xd9e303=_0x30198b['getComment'](_0xc59b9b);if(!_0xd9e303)throw new _0x55af7e('commentsrepository-update-missing-comment',this);let _0x27d7f1=!0x1;if(_0x3e2961&&_0x3e2961!==_0xd9e303['content']&&(_0xd9e303['isEditable']||_0x1bc539)&&(_0xd9e303['content']=_0x3e2961,_0x27d7f1=!0x0),_0x540c75&&_0x540c75!==_0xd9e303['createdAt']&&(_0xd9e303['createdAt']=_0x540c75,_0xd9e303['attributes']&&_0xd9e303['attributes']['@external']||(_0xd9e303['authoredAt']=_0x540c75),_0x27d7f1=!0x0),_0x1c07d5&&!At(_0x1c07d5,_0xd9e303['attributes'])&&(_0xd9e303['attributes']=_0x1c07d5,_0x27d7f1=!0x0),!_0x27d7f1)return Promise['resolve']();if(_0x30198b['fire']('commentUpdated'),_0x1bc539||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5a2fc5=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd37e2a}=this['getCommentThread'](_0xd9e303['threadId']),_0x2914e9=_0x5a2fc5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xd37e2a,'threadId':_0x18d6f6,'commentId':_0xc59b9b,'content':_0x3e2961,'attributes':_0x1c07d5})['then'](()=>_0x5a2fc5['remove'](_0x2914e9))['catch'](_0x1ead1e=>{throw console['error'](_0x1ead1e),new _0x55af7e('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x34ec97,commentId:_0x1d2280,isFromAdapter:_0x567597}){const _0x5258fc=this['getCommentThread'](_0x34ec97),_0x2a79b8=_0x5258fc['getComment'](_0x1d2280);if(!_0x2a79b8)throw new _0x55af7e('commentsrepository-remove-missing-comment',this);if(_0x5258fc['_remove'](_0x2a79b8),_0x567597||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x590ea1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x239da6}=_0x5258fc,_0x32b084=_0x590ea1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x239da6,'threadId':_0x34ec97,'commentId':_0x1d2280})['then'](()=>_0x590ea1['remove'](_0x32b084))['catch'](_0x3e2391=>{throw console['error'](_0x3e2391),new _0x55af7e('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0xa31544(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x25071e,_0x1cd237){super();const _0x1b1c3b=_0x25071e['context']['plugins']['get'](it)['me'],_0x24ce51=_0x25071e['getCommentThread'](_0x1cd237['threadId']),_0x14a9ee=0x0===_0x24ce51['comments']['length'],_0x2ff987=_0x1b1c3b===_0x1cd237['author'];this['id']=_0x1cd237['id'],this['threadId']=_0x1cd237['threadId'],this['author']=_0x1cd237['author'],this['creator']=_0x1cd237['creator'],this['isExternal']=Boolean(_0x1cd237['attributes']&&_0x1cd237['attributes']['@external']),this['set']('content',_0x1cd237['content']),this['createdAt']=_0x1cd237['createdAt']||new Date(),this['set']('authoredAt',_0x1cd237['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x24ce51,'resolvedAt'),this['set']('attributes',_0x1cd237['attributes']||{}),this['bind']('isEditable')['to'](_0x25071e,'_permissions',()=>{const _0x6f757a=_0x25071e['getPermissions'](_0x24ce51['channelId'])['write'],_0x429ad=_0x25071e['getPermissions'](_0x24ce51['channelId'])['modifyAll'];return _0x2ff987&&_0x6f757a||!_0x2ff987&&_0x429ad;}),this['bind']('isRemovable')['to'](_0x24ce51,'isRemovable',_0x25071e,'_permissions',_0x9a4f20=>{const _0x262c3b=_0x25071e['getPermissions'](_0x24ce51['channelId'])['write'],_0x40ec0e=_0x25071e['getPermissions'](_0x24ce51['channelId'])['modifyAll'];return _0x2ff987&&_0x262c3b||_0x9a4f20&&_0x14a9ee||!_0x2ff987&&_0x40ec0e&&!_0x14a9ee;}),this['bind']('isReadOnly')['to'](_0x24ce51,'isReadOnly'),this['_repository']=_0x25071e;}get['weight'](){return Math['max'](function(_0x52bfe4){const _0x16491a=document['createElement']('div');return _0x16491a['innerHTML']=_0x52bfe4,_0x16491a['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1a02c2){const {threadId:_0x151f29,id:_0x52a26c}=this;if(!this['_repository']['hasCommentThread'](_0x151f29))throw new _0x55af7e('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3c334d}=this['_repository']['getCommentThread'](_0x151f29);this['_repository']['fire'](Nt('updateComment',_0x3c334d,_0x151f29),{'channelId':_0x3c334d,'threadId':_0x151f29,'commentId':_0x52a26c,..._0x1a02c2});}['setAttribute'](_0x3e7021,_0x104957){const _0x34f4fa=wt(this['attributes']);yt(_0x34f4fa,_0x3e7021,_0x104957),this['update']({'attributes':_0x34f4fa});}['removeAttribute'](_0x40b71e){const _0x1e5a0a=wt(this['attributes']);Ct(_0x1e5a0a,_0x40b71e),this['update']({'attributes':_0x1e5a0a});}['remove'](_0x53b2fd={}){if(!_0x53b2fd['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x44ca07,id:_0x11be95}=this;if(!this['_repository']['hasCommentThread'](_0x44ca07))throw new _0x55af7e('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x782541}=this['_repository']['getCommentThread'](_0x44ca07);this['_repository']['fire'](Nt('removeComment',_0x782541,_0x44ca07),{'channelId':_0x782541,'threadId':_0x44ca07,'commentId':_0x11be95,..._0x53b2fd});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x309484,..._0x3541cc){for(const _0x214941 of _0x3541cc)void 0x0!==_0x214941&&(_0x309484+=':'+String(_0x214941));return _0x309484;}class ot extends _0xb3b2c2{constructor(_0x4603ae){super(_0x4603ae),this['set']('hasContent',!0x1);}['refresh'](){const _0xa7f1fe=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x592a8b of _0xa7f1fe['getRanges']())if(this['_hasContent'](_0x592a8b))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3c98ca=_0x1797dc(),ranges:_0x40e7d2,comment:_0xc9736f}={}){const _0x371318=this['editor']['model'],_0x254344=_0x40e7d2??Array['from'](_0x371318['document']['selection']['getRanges']()),_0xb8fca7=[];for(const _0x3d1222 of _0x254344)this['_hasContent'](_0x3d1222)&&_0xb8fca7['push'](this['_trimToContent'](_0x3d1222));if(!_0xb8fca7['length'])throw new _0x55af7e('addcommentthreadcommand-incorrect-ranges',null);_0xc9736f&&this['_createCommentThread'](_0x3c98ca,_0xc9736f),this['_createMarkersFromRanges'](_0x3c98ca,_0xb8fca7,!!_0xc9736f);}['_createMarkersFromRanges'](_0x268b1b,_0x175e84,_0x1b1460){this['editor']['model']['change'](_0x4da8ca=>{for(const _0x29c102 of _0x175e84){const _0x164ec8=_0x1797dc()['substr'](0x1,0x5),_0x4bf10e='comment:'+_0x268b1b+':'+_0x164ec8;_0x4da8ca['addMarker'](_0x4bf10e,{'range':_0x29c102,'usingOperation':_0x1b1460,'affectsData':_0x1b1460});}});}['_createCommentThread'](_0x4c6a36,_0x228a28){const _0x3dc3db=this['editor']['plugins']['get']('CommentsRepository'),_0x5aa1a7=this['editor']['config']['get']('collaboration.channelId'),_0x35a17c=this['editor']['plugins']['get']('Users')['me'];if(!_0x35a17c)throw new _0x55af7e('addcommentthreadcommand-user-not-found',null);_0x3dc3db['addCommentThread']({'threadId':_0x4c6a36,'channelId':_0x5aa1a7,'comments':[{'authorId':_0x35a17c['id'],'content':_0x228a28,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x23f60d){for(const _0x1c6a20 of _0x23f60d['getItems']())if(this['_itemIsContent'](_0x1c6a20))return!0x0;return!0x1;}['_itemIsContent'](_0xeaf873){return _0xeaf873['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xeaf873)&&!_0xeaf873['is']('element','tableCell');}['_trimToContent'](_0x3d76ab){const _0x46c137=_0x5c06ef=>!this['_itemIsContent'](_0x5c06ef['item']),_0x2fff9d=_0x3d76ab['start']['getLastMatchingPosition'](_0x46c137),_0x5b939e=_0x3d76ab['end']['getLastMatchingPosition'](_0x46c137,{'direction':'backward'});return this['editor']['model']['createRange'](_0x2fff9d,_0x5b939e);}}class b extends _0xeeaaab{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f967e){super(_0x1f967e),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1a559c=this['editor'],_0x494e57=_0x1a559c['model']['document']['selection'],_0x4ba421=_0x20001b(()=>this['refreshSelectedViews'](),0xa);_0x494e57['on']('change:range',(_0x539513,_0xcc3e43)=>{_0xcc3e43['directChange']&&(_0x4ba421['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1a559c['editing']['view']['document'],'change:isFocused',(_0x5bd7de,_0x11cc68,_0xe452b0)=>{_0xe452b0&&_0x4ba421();}),this['listenTo'](_0x1a559c['ui']['focusTracker'],'change:isFocused',(_0x242c36,_0x314b2f,_0x10f12e)=>{_0x10f12e||this['fire']('blur',{'isAnnotationTracked':_0x5b8ad1=>this['_editorAnnotationsData']['has'](_0x5b8ad1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x50902e){if(this['_editorAnnotations']['has'](_0x50902e['view']))return;this['_editorAnnotations']['add'](_0x50902e['view']),this['editor']['ui']['focusTracker']['add'](_0x50902e['view']['element']);const _0x53e9b2=this['editor']['plugins']['get'](y);this['listenTo'](_0x53e9b2['collection'],'remove',(_0x22367f,_0xf7ea30)=>{this['editor']['ui']['focusTracker']['remove'](_0xf7ea30['view']['element']),this['_editorAnnotations']['delete'](_0xf7ea30['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1a9deb){if('function'!=typeof _0x1a9deb)throw new _0x55af7e('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1a9deb);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x43c532,annotations:_0x321c5c}){const _0x5afa67=[],_0x1dfc9c=this['editor']['model']['document']['selection'],_0x3485dc=Array['from'](_0x1dfc9c['getRanges']());for(const [_0x119c62,_0x3cabaf]of this['_editorAnnotationsData']){const _0xfd714d=_0x311012(_0x3cabaf),_0x333705=_0x321c5c['getByInnerView'](_0x119c62);_0xfd714d&&_0x333705&&_0x5afa67['push']({'annotation':_0x333705,'range':_0xfd714d});}function _0x311012(_0x44d97e){for(const _0x41fa4c of _0x44d97e)for(const _0x469423 of _0x3485dc)if(_0x41fa4c['containsRange'](_0x469423,!_0x1dfc9c['isCollapsed']))return _0x41fa4c;return null;}return _0x5afa67['sort']((_0x212513,_0x2bc1fb)=>{const _0x2cc2df=_0x212513['range'],_0x54acd6=_0x2bc1fb['range'];if(!_0x2cc2df['isEqual'](_0x54acd6)){if(_0x2cc2df['containsRange'](_0x54acd6,!0x0))return 0x1;if(_0x54acd6['containsRange'](_0x2cc2df,!0x0))return-0x1;}return _0x212513['annotation']==_0x43c532?-0x1:_0x2bc1fb['annotation']==_0x43c532?0x1:0x0;})['map'](_0x3e1d61=>_0x3e1d61['annotation']);}get['_editorAnnotationsData'](){const _0x4a1a50=new Map();for(const _0x377e0e of Array['from'](this['_dataCollectors']))for(const [_0x42bd4e,_0x575b93]of _0x377e0e())_0x4a1a50['set'](_0x42bd4e,_0x575b93);return _0x4a1a50;}}class st extends _0xeeaaab{['afterInit'](){const _0x1117f5=this['editor'];if(!_0x1117f5['plugins']['has']('RestrictedEditingModeEditing'))return;_0x1117f5['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xeeaaab{constructor(_0x30b958){super(_0x30b958),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xaf13c7=this['editor'],_0x2007ed=_0xaf13c7['commands']['get']('importWord'),_0x5ef5d8=_0xaf13c7['plugins']['get'](it);_0x2007ed&&(_0x2007ed['on']('execute',(_0x5774ab,[,_0x172d79])=>{_0x172d79['collaboration_features']={'comments':!0x0,'user_id':_0x5ef5d8['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2007ed,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2b2d66,_0x5c534f){const {comment_threads:_0x1ed445}=_0x5c534f;_0x1ed445&&_0x1ed445['forEach'](({thread_id:_0x371747,comments:_0x2341b7,is_resolved:_0x316255})=>{const _0x44cc33=new Date(),_0x235e82=_0x2341b7['map'](({author:_0x3a6ad5,content:_0x597d7c,created_at:_0x45a9c8})=>({'content':_0x597d7c,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x44cc33,'attributes':{'@external':{'authorName':_0x3a6ad5,'createdAt':_0x45a9c8?new Date(_0x45a9c8):new Date(),'source':'importWord'}}})),_0x910d6=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x910d6,'threadId':_0x371747,'comments':_0x235e82,'resolvedAt':_0x316255?_0x44cc33:null});});}}class at extends _0xeeaaab{constructor(_0x4942c6){super(_0x4942c6),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x135a44=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x135a44,'contentInsertion',(_0x4f5ed1,_0x59bc38)=>this['_removeMarkersWithoutThreads'](_0x59bc38['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x13863b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x13863b;const _0x4aa4c2=this['editor']['plugins']['get']('CommentsRepository');for(const _0x41de12 of _0x13863b['keys']()){const [_0x2f9555,_0x2233f1]=_0x41de12['split'](':');'comment'!=_0x2f9555||_0x4aa4c2['hasCommentThread'](_0x2233f1)||_0x13863b['delete'](_0x41de12);}return _0x13863b;}['_registerMarkerInClipboardPipeline'](){const _0x239089=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3de1f5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3de1f5&&_0x239089['_registerMarkerToCopy']('comment',_0x3de1f5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4e2f99){switch(_0x4e2f99){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x3b0e2d){const _0x23b081=_0x3b0e2d['split'](':');return{'group':_0x23b081[0x0],'id':_0x23b081[0x1],'part':_0x23b081[0x2]};}class ut extends _0xeeaaab{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3dd554,_0x9e2e29)=>{if(!_0x9e2e29['options']['showCommentHighlights'])return null;if(_0x9e2e29['options']['ignoreResolvedComments']){const {id:_0xc4ddfb}=ft(_0x3dd554['markerName']),_0x58b5a6=this['editor']['plugins']['get'](o);if(_0x58b5a6['getCommentThread'](_0xc4ddfb)?.['isResolved']&&_0x3dd554['item'])return _0x9e2e29['consumable']['consume'](_0x3dd554['item'],'addMarker:'+_0x3dd554['markerName']),_0x9e2e29['consumable']['consume'](_0x3dd554['item'],'removeMarker:'+_0x3dd554['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x25b7fe=>{_0x25b7fe['on']('addMarker:comment',(_0x33df8c,_0x3e7b51,_0x269627)=>{if(!_0x269627['options']['showCommentHighlights'])return;const _0x23a800=_0x3e7b51['item'];if(!_0x23a800)return;const _0x192660=_0x269627['mapper']['toViewElement'](_0x23a800);this['editor']['model']['schema']['isObject'](_0x23a800)&&_0x192660&&!_0x192660['getCustomProperty']('widget')&&_0x192660['is']('containerElement')&&_0x3f4190(_0x192660,_0x269627['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x41212e,{writer:_0x55a5f0,options:_0x364c0a})=>{if(!_0x364c0a['showCommentHighlights'])return null;const _0x3fbf8f=_0x55a5f0['createContainerElement']('div'),_0x343f9f=_0x55a5f0['createEmptyElement']('hr');return _0x55a5f0['addClass']('ck-horizontal-line',_0x3fbf8f),_0x55a5f0['insert'](_0x55a5f0['createPositionAt'](_0x3fbf8f,0x0),_0x343f9f),_0x3fbf8f;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x492f5d,{writer:_0x49c368,options:_0x443bb3})=>{if(!_0x443bb3['showCommentHighlights'])return null;const _0xfa06d8=_0x49c368['createContainerElement']('span'),_0x4668f1=_0x49c368['createEmptyElement']('img');return _0x49c368['addClass']('image-inline',_0xfa06d8),_0x49c368['insert'](_0x49c368['createPositionAt'](_0xfa06d8,0x0),_0x4668f1),_0xfa06d8;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x37e7ce,{writer:_0x33e392,options:_0x1bb851})=>{if(_0x1bb851['showCommentHighlights'])return _0x33e392['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2c75e7,_0x183690,_0x4eccce)=>{_0x4eccce['options']['showCommentHighlights']&&_0x2c75e7['stop']();},{'priority':'high'});}}class r extends _0xeeaaab{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(_0x46414a){super(_0x46414a),this['set']('isThreadsLoadingPaused',!0x0),_0x46414a['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5d613f,_0x494293,_0x2e8891,_0x18c217)=>{const _0x3cb53f=_0x46414a['plugins']['get'](o),_0x2ddf41=_0x2e8891?ft(_0x2e8891)['id']:null;_0x46414a['model']['change'](()=>{if(_0x2ddf41){const _0x3b6a9e=this['getAllMarkersForId'](_0x2ddf41);for(const _0x4e3c24 of _0x3b6a9e)_0x46414a['editing']['reconvertMarker'](_0x4e3c24);}if(_0x18c217){const {id:_0x488d53}=ft(_0x18c217),_0x592244=_0x3cb53f['getCommentThread'](_0x488d53);if(_0x592244&&_0x592244['unlinkedAt'])return;if(_0x592244&&!_0x592244['isAttached'])return;const _0x3515b1=this['getAllMarkersForId'](_0x488d53);for(const _0x462b87 of _0x3515b1)_0x46414a['editing']['reconvertMarker'](_0x462b87);}}),_0x2ddf41&&this['scrollToThreadMarker'](_0x2ddf41);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3ea021=this['editor'],_0x2f2c72=_0x3ea021['plugins']['get'](o),_0x57dbd9=_0x3ea021['config']['get']('collaboration.channelId'),_0x532ab8=_0x2f2c72['getCommentThreads']()['filter'](_0x6e5897=>_0x6e5897['channelId']!==_0x57dbd9);_0x3ea021['commands']['add']('addCommentThread',new ot(_0x3ea021)),this['listenTo'](_0x3ea021,'change:isReadOnly',(_0x5deb5c,_0x110b7d,_0x290e9e)=>{_0x2f2c72['switchReadOnly'](_0x290e9e,_0x3ea021['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2f2c72,dt('addCommentThread',_0x57dbd9),(_0x3db4fc,{threadId:_0x28d67e})=>{const _0x13233c=this['editor']['plugins']['get'](o)['getCommentThread'](_0x28d67e);_0x13233c?.['unlinkedAt']&&this['_attachArchivedThread'](_0x28d67e);}),this['listenTo'](_0x2f2c72,dt('removeCommentThread',_0x57dbd9),(_0x5d0d68,{threadId:_0xfefcb1})=>{_0x3ea021['model']['enqueueChange']({'isUndoable':!0x1},_0x4f6af9=>{const _0x588aa0=this['getAllMarkersForId'](_0xfefcb1);for(const _0x4e5377 of _0x588aa0)_0x4f6af9['removeMarker'](_0x4e5377);});}),this['listenTo'](_0x2f2c72,dt('resolveCommentThread',_0x57dbd9),(_0x2fdb44,{threadId:_0x1dafe0})=>{(this['_reconvertMarkers'](_0x1dafe0),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1dafe0)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2f2c72,dt('reopenCommentThread',_0x57dbd9),(_0x1eeae3,{threadId:_0x2a4036})=>{this['_reconvertMarkers'](_0x2a4036);},{'priority':'low'}),this['listenTo'](_0x2f2c72,dt('addComment',_0x57dbd9),(_0x8db919,{threadId:_0x38d1b9,isFromAdapter:_0x52818d})=>{const _0x412773=this['getAllMarkersForId'](_0x38d1b9);if(_0x52818d||0x0==_0x412773['length']||!_0x2f2c72['hasCommentThread'](_0x38d1b9))return;0x1===_0x2f2c72['getCommentThread'](_0x38d1b9)['length']&&_0x3ea021['model']['enqueueChange']({'isUndoable':!0x1},_0x4b00ba=>{for(const _0x53bc29 of _0x412773)_0x4b00ba['updateMarker'](_0x53bc29,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x532ab8);}['afterInit'](){!async function(_0x1091a3){const _0x19e04c=_0x47297d([0x73,0x56,0x35,0x6d,0x52,0x49,0x75,0x53,0x71,0x6b,0x4d,0x7a,0x69,0x61,0x47,0x57,0x62,0x32,0x42,0x45,0x51,0x58,0x70,0x4a,0x63,0x79,0x68,0x30,0x48,0x50,0x55,0x4e,0x6e,0x4f,0x5a,0x54,0x39,0x72,0x33,0x6a,0x65,0x4b,0x67,0x64,0x31,0x76,0x59,0x37,0x41,0x66,0x44,0x43,0x78,0x6c,0x6f,0x34,0x38,0x74,0x77,0x4c,0x36,0x46]),_0x23a496=0x673793ce,_0x454b73=0x6730fc56^_0x23a496,_0x5997f0=window[_0x47297d([0x44,0x61,0x74,0x65])][_0x47297d([0x6e,0x6f,0x77])](),_0x196d72=_0x1091a3[_0x47297d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2ac91e=new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x441df4=>{_0x196d72[_0x47297d([0x6f,0x6e,0x63,0x65])](_0x47297d([0x72,0x65,0x61,0x64,0x79]),_0x441df4);}),_0x6b4286={[_0x47297d([0x6b,0x74,0x79])]:_0x47297d([0x45,0x43]),[_0x47297d([0x75,0x73,0x65])]:_0x47297d([0x73,0x69,0x67]),[_0x47297d([0x63,0x72,0x76])]:_0x47297d([0x50,0x2d,0x32,0x35,0x36]),[_0x47297d([0x78])]:_0x47297d([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]),[_0x47297d([0x79])]:_0x47297d([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]),[_0x47297d([0x61,0x6c,0x67])]:_0x47297d([0x45,0x53,0x32,0x35,0x36])},_0x270f39=_0x196d72[_0x47297d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x47297d([0x67,0x65,0x74])](_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x42627e(){let _0x31f9c8,_0x45af00=null,_0x29fe45=null;try{if(_0x270f39==_0x47297d([0x47,0x50,0x4c]))return _0x47297d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x31f9c8=_0x1d4eba(),!_0x31f9c8)return _0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x31f9c8[_0x47297d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x29fe45=_0x19c5c8(_0x31f9c8[_0x47297d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x31f9c8[_0x47297d([0x6a,0x74,0x69])])),await _0x29a487()?_0x2bad50()?_0x393c8d()?_0x47297d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x539375()?(_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47297d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x45af00=_0x44f89c(_0x47297d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x47297d([0x74,0x72,0x69,0x61,0x6c])&&(_0x45af00=_0x44f89c(_0x47297d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x46f0b2()):_0x47297d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x47297d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x47297d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x393c8d(){const _0x56fd3b=[_0x47297d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x47297d([0x74,0x72,0x69,0x61,0x6c])][_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5997f0/0x3e8:0xe10*_0x454b73;return _0x31f9c8[_0x47297d([0x65,0x78,0x70])]<_0x56fd3b;}function _0x2bad50(){const _0x23e7ab=_0x31f9c8[_0x47297d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x23e7ab)return!0x1;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x2a])))return!0x0;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x43,0x4d,0x54])))return!0x0;if(_0x23e7ab[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x52,0x43,0x4d,0x54]))){if(_0x5bffd0())return!0x0;if(_0x5b9080()||_0x102683())return!0x0;}return!0x1;}function _0x539375(){const _0x315c83=_0x31f9c8[_0x47297d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x315c83||0x0==_0x315c83[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2c474c}=new URL(window[_0x47297d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x315c83[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c474c))return!0x0;const _0x5437bf=_0x2c474c[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e]));return _0x315c83[_0x47297d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x54c23c=>_0x54c23c[_0x47297d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x47297d([0x2a])))[_0x47297d([0x6d,0x61,0x70])](_0x69b70e=>_0x69b70e[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e])))[_0x47297d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x12c397=>_0x12c397[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5437bf[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47297d([0x6d,0x61,0x70])](_0x461e2d=>Array(_0x5437bf[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x461e2d[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x47297d([0x66,0x69,0x6c,0x6c])](_0x461e2d[0x0]===_0x47297d([0x2a])?_0x47297d([0x2a]):'')[_0x47297d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x461e2d))[_0x47297d([0x73,0x6f,0x6d,0x65])](_0x4e3d3d=>_0x5437bf[_0x47297d([0x65,0x76,0x65,0x72,0x79])]((_0x4d3ed1,_0x3ceb67)=>_0x4e3d3d[_0x3ceb67]===_0x4d3ed1||_0x4e3d3d[_0x3ceb67]===_0x47297d([0x2a])));}function _0x46f0b2(){return _0x45af00&&_0x29fe45?new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4c412e,_0x43c633)=>{_0x45af00[_0x47297d([0x74,0x68,0x65,0x6e])](_0x4c412e,_0x43c633),_0x29fe45[_0x47297d([0x74,0x68,0x65,0x6e])](_0x39b3bd=>{_0x39b3bd!=_0x47297d([0x56,0x61,0x6c,0x69,0x64])&&_0x4c412e(_0x39b3bd);},_0x43c633);}):_0x45af00||_0x29fe45||_0x47297d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x19c5c8(_0x4f63e8,_0x4af72b){return new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5c5bd0=>{if(_0x359ac5())return _0x5c5bd0(_0x47297d([0x56,0x61,0x6c,0x69,0x64]));_0x17b835(),_0x196d72[_0x47297d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x60d929=!0x1;const _0x2f6b55=_0x1797dc();function _0x114941(_0x5dc021){return!!_0x5dc021&&(typeof _0x5dc021===_0x47297d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5dc021===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5dc021[_0x47297d([0x74,0x68,0x65,0x6e])]===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5dc021[_0x47297d([0x63,0x61,0x74,0x63,0x68])]===_0x47297d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3265e0(_0x1d5684){_0x15b743(_0x1d5684)[_0x47297d([0x74,0x68,0x65,0x6e])](_0x48b3a9=>{if(!_0x48b3a9||_0x48b3a9[_0x47297d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x47297d([0x6f,0x6b]))return _0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x209198(_0x2c7d53(_0x2f6b55+_0x4af72b))!=_0x48b3a9[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x47297d([0x56,0x61,0x6c,0x69,0x64]);})[_0x47297d([0x74,0x68,0x65,0x6e])](_0x38ac4a=>(_0x16d794(),_0x38ac4a),()=>{const _0x2f80ef=_0x14a6cf();return null==_0x2f80ef?(_0x16d794(),_0x47297d([0x56,0x61,0x6c,0x69,0x64])):_0x47297d(_0x5997f0-_0x2f80ef>(0x433b17ce^_0x23a496)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x47297d([0x74,0x68,0x65,0x6e])](_0x5c5bd0)[_0x47297d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x475a3f=0x67017d4e^_0x23a496;function _0x16d794(){const _0x5b3664=_0x47297d([0x6c,0x6c,0x63,0x74,0x2d])+_0x209198(_0x2c7d53(_0x4f63e8)),_0x8a7f6e=_0x3a16ee(_0x209198(window[_0x47297d([0x4d,0x61,0x74,0x68])][_0x47297d([0x63,0x65,0x69,0x6c])](_0x5997f0/_0x475a3f)));window[_0x47297d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47297d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5b3664,_0x8a7f6e);}function _0x14a6cf(){const _0x31275a=_0x47297d([0x6c,0x6c,0x63,0x74,0x2d])+_0x209198(_0x2c7d53(_0x4f63e8)),_0x5e16c3=window[_0x47297d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x47297d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x31275a);return _0x5e16c3?window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3a16ee(_0x5e16c3),0x10)*_0x475a3f:null;}function _0x15b743(_0x175565){return new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x506aba,_0x4819ca)=>{_0x175565[_0x47297d([0x74,0x68,0x65,0x6e])](_0x506aba,_0x4819ca),window[_0x47297d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4819ca,0x6736470e^_0x23a496);});}}_0x196d72[_0x47297d([0x6f,0x6e])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x20d74e,_0x40e332)=>{if(_0x40e332[0x0]!=_0x4f63e8)return _0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x40e332[0x1]={..._0x40e332[0x1],[_0x47297d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2f6b55};},{[_0x47297d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47297d([0x68,0x69,0x67,0x68])}),_0x196d72[_0x47297d([0x6f,0x6e])](_0x47297d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x47c573=>{_0x114941(_0x47c573[_0x47297d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x60d929=!0x0,_0x3265e0(_0x47c573[_0x47297d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x47297d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x47297d([0x6c,0x6f,0x77])}),_0x2ac91e[_0x47297d([0x74,0x68,0x65,0x6e])](()=>{_0x60d929||_0x5c5bd0(_0x47297d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x359ac5(){return _0x196d72[_0x47297d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47297d([0x76,0x69,0x65,0x77])][_0x47297d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x47297d([0x61,0x75,0x74,0x6f]);}function _0x17b835(){_0x196d72[_0x47297d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x47297d([0x76,0x69,0x65,0x77])][_0x47297d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x47297d([0x61,0x75,0x74,0x6f]);}}function _0x44f89c(_0x3902ff){const _0x5e239d=[new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x422c3a=>setTimeout(_0x422c3a,0x673ead02^_0x23a496)),_0x2ac91e[_0x47297d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x25885e=>{let _0x7ed6a2=0x0;_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x6f,0x6e])](_0x47297d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4c1eed,_0x4bbef7)=>{_0x4bbef7[0x0][_0x47297d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x7ed6a2++,_0x7ed6a2==(0x67379236^_0x23a496)&&(_0x25885e(),_0x4c1eed[_0x47297d([0x6f,0x66,0x66])]());});}))];return window[_0x47297d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x47297d([0x72,0x61,0x63,0x65])](_0x5e239d)[_0x47297d([0x74,0x68,0x65,0x6e])](()=>_0x3902ff);}async function _0x47c860(){await _0x2ac91e,_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4fbe2a,_0x196d72[_0x47297d([0x6d,0x6f,0x64,0x65,0x6c])][_0x47297d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4fbe2a,_0x196d72[_0x47297d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x47297d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5bffd0(){return _0x4d4b3b(_0x47297d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4ebb00(_0x47297d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x47297d([0x73,0x74,0x61,0x74,0x65])]==_0x47297d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5b9080(){return _0x4d4b3b(_0x47297d([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 _0x102683(){return _0x4d4b3b(_0x47297d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4eee56(_0x21f1b3){const _0x5d7cab=_0x2bf939();_0x196d72[_0x5d7cab]=_0x47297d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x21f1b3,_0x21f1b3!=_0x47297d([0x56,0x61,0x6c,0x69,0x64])&&_0x47c860();}function _0x2bf939(){const _0x476873=window[_0x47297d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x47297d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x47297d([0x6e,0x6f,0x77])]())[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x47297d([0x2e]),'');let _0x20c3a6=_0x47297d([0x73]);for(let _0x4b4d7c=0x0;_0x4b4d7c<_0x476873[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b4d7c+=0x2){let _0x26e6f3=window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x476873[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b4d7c,_0x4b4d7c+0x2));_0x26e6f3>=_0x19e04c[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x26e6f3-=_0x19e04c[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x20c3a6+=_0x19e04c[_0x26e6f3];}return _0x20c3a6;}function _0x1d4eba(){const _0x3ccfb6=_0x270f39[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e]));if(0x3!=_0x3ccfb6[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x4bba35(_0x3ccfb6[0x1]);function _0x4bba35(_0x1ab4ea){const _0x4794b3=_0x17be03(_0x1ab4ea);return _0x4794b3&&_0x19f5a3()?_0x4794b3:null;function _0x19f5a3(){const _0x9caeac=_0x4794b3[_0x47297d([0x6a,0x74,0x69])],_0x1cf747=window[_0x47297d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x9caeac[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x9caeac[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1207ab={..._0x4794b3,[_0x47297d([0x6a,0x74,0x69])]:_0x9caeac[_0x47297d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x9caeac[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1207ab[_0x47297d([0x76,0x63])],_0x2c7d53(_0x1207ab)==_0x1cf747;}}}async function _0x29a487(){let _0x430279=!0x0;try{const _0x4ec327=_0x270f39[_0x47297d([0x73,0x70,0x6c,0x69,0x74])](_0x47297d([0x2e])),[_0x397b50,_0xeaa804,_0x149010]=_0x4ec327;return _0x571c00(_0x397b50),await _0x4a9e9a(_0x397b50,_0xeaa804,_0x149010),_0x430279;}catch{return!0x1;}function _0x571c00(_0x4bc900){const _0x756fc0=_0x17be03(_0x4bc900);_0x756fc0&&_0x756fc0[_0x47297d([0x61,0x6c,0x67])]==_0x47297d([0x45,0x53,0x32,0x35,0x36])||(_0x430279=!0x1);}async function _0x4a9e9a(_0x5edf4c,_0x224627,_0x11902f){const _0x249986=window[_0x47297d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x47297d([0x66,0x72,0x6f,0x6d])](_0x1397ff(_0x11902f),_0x4ff612=>_0x4ff612[_0x47297d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5c0318=new window[(_0x47297d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x47297d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5edf4c+_0x47297d([0x2e])+_0x224627),_0x54447c=window[_0x47297d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x47297d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x54447c)return;const _0xf6d948=await _0x54447c[_0x47297d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x47297d([0x6a,0x77,0x6b]),_0x6b4286,{[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x45,0x43,0x44,0x53,0x41]),[_0x47297d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x47297d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x54447c[_0x47297d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x45,0x43,0x44,0x53,0x41]),[_0x47297d([0x68,0x61,0x73,0x68])]:{[_0x47297d([0x6e,0x61,0x6d,0x65])]:_0x47297d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xf6d948,_0x249986,_0x5c0318)||(_0x430279=!0x1);}}function _0x17be03(_0x1910f0){return _0x1910f0[_0x47297d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x47297d([0x65,0x79]))?JSON[_0x47297d([0x70,0x61,0x72,0x73,0x65])](_0x1397ff(_0x1910f0)):null;}function _0x1397ff(_0x5ed6ea){return window[_0x47297d([0x61,0x74,0x6f,0x62])](_0x5ed6ea[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x47297d([0x2b]))[_0x47297d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x47297d([0x2f])));}function _0x2c7d53(_0x25c802){let _0x5876af=0x1505;function _0xf73e1c(_0x185968){for(let _0x3e4ffe=0x0;_0x3e4ffe<_0x185968[_0x47297d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3e4ffe++){const _0x4a180e=_0x185968[_0x47297d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3e4ffe);_0x5876af=(_0x5876af<<0x5)+_0x5876af+_0x4a180e,_0x5876af&=_0x5876af;}}function _0x39d931(_0xe64048){Array[_0x47297d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xe64048)?_0xe64048[_0x47297d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39d931):_0xe64048&&typeof _0xe64048==_0x47297d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x47297d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xe64048)[_0x47297d([0x73,0x6f,0x72,0x74])]()[_0x47297d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x56260d,_0x19a035])=>{_0xf73e1c(_0x56260d),_0x39d931(_0x19a035);}):_0xf73e1c(window[_0x47297d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xe64048));}return _0x39d931(_0x25c802),_0x5876af>>>0x0;}function _0x209198(_0x37e1ae){return _0x37e1ae[_0x47297d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x47297d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x47297d([0x30]));}function _0x3a16ee(_0x282c4e){return _0x282c4e[_0x47297d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x47297d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x47297d([0x6a,0x6f,0x69,0x6e])]('');}function _0x4d4b3b(_0x47d9fc){return _0x196d72[_0x47297d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x47297d([0x68,0x61,0x73])](_0x47d9fc);}function _0x4ebb00(_0x1c9acc){return _0x196d72[_0x47297d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x47297d([0x67,0x65,0x74])](_0x1c9acc);}function _0x4fbe2a(){}function _0x47297d(_0x3f9c18){return _0x3f9c18['map'](_0xfe8966=>String['fromCharCode'](_0xfe8966))['join']('');}_0x4eee56(await _0x42627e());}(this);}['destroy'](){const _0x4ac9af=this['editor']['plugins']['get'](o),_0x40e6ee=this['editor']['config']['get']('collaboration.channelId');for(const _0x5914bb of _0x4ac9af['getCommentThreads']({'channelId':_0x40e6ee}))_0x4ac9af['_detachCommentThread'](_0x5914bb['id']),_0x4ac9af['_threads']['delete'](_0x5914bb['id']);super['destroy']();}['hasMarkerForId'](_0x6d992d){return this['getAllMarkersForId'](_0x6d992d)['length']>0x0;}['getAllMarkersForId'](_0x48cb7e){const _0x1b7145=[];for(const _0x126195 of this['editor']['model']['markers'])_0x126195['name']['startsWith']('comment:'+_0x48cb7e)&&_0x1b7145['push'](_0x126195);return _0x1b7145;}['scrollToThreadMarker'](_0x184485){setTimeout(()=>{const _0x506e36=this['_getTargetForId'](_0x184485);if(!_0x506e36)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x184485&&nt({'target':_0x506e36[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1791fe){this['editor']['model']['change'](()=>{for(const _0x14d275 of this['getAllMarkersForId'](_0x1791fe))this['editor']['editing']['reconvertMarker'](_0x14d275);});}['_attachArchivedThread'](_0x1cee28){const _0x149b6f=this['editor']['plugins']['get'](o),_0x241a54=this['editor']['plugins']['get'](b),_0x4ca328=_0x149b6f['getCommentThread'](_0x1cee28);if(!_0x4ca328['isAttached']){const _0x20ac0b=_0x4ca328['attachTo'](()=>this['_getTargetForId'](_0x4ca328['id']));_0x241a54['registerAnnotation'](_0x20ac0b),_0x4ca328['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1de35c=this['editor'],_0x50597a=_0x1de35c['plugins']['get'](it);_0x1de35c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x34518d,_0x57ac01)=>{const {id:_0x2ce8ea}=ft(_0x34518d['markerName']),_0x12496a=_0x1de35c['plugins']['get'](o)['getCommentThread'](_0x2ce8ea),_0xdf9488=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2ce8ea;let _0x38e5db;if(_0x12496a&&_0x12496a['isResolved']&&!_0xdf9488&&_0x34518d['item'])return _0x57ac01['consumable']['consume'](_0x34518d['item'],'addMarker:'+_0x34518d['markerName']),_0x57ac01['consumable']['consume'](_0x34518d['item'],'removeMarker:'+_0x34518d['markerName']),null;const _0x248993=['ck-comment-marker'];return _0xdf9488&&_0x248993['push']('ck-comment-marker--active'),_0x38e5db=_0x12496a?.['length']?_0x12496a['comments']['first']['author']['id']:_0x50597a['me']['id'],{'classes':_0x248993,'attributes':{'data-comment':_0x2ce8ea,'data-author-id':_0x38e5db}};}}),_0x1de35c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x556d84,{options:_0xadbed8})=>{if(_0xadbed8['showCommentHighlights'])return null;const _0x1cf454=_0x1de35c['plugins']['get'](o),_0x129260=_0x1de35c['model']['markers']['get'](_0x556d84),{id:_0x38d09c,part:_0x52c33f}=ft(_0x556d84);return _0x129260&&!_0x129260['affectsData']||_0xadbed8['ignoreResolvedComments']&&_0x1cf454['getCommentThread'](_0x38d09c)?.['isResolved']?null:{'group':'comment','name':_0x52c33f?_0x38d09c+':'+_0x52c33f:_0x38d09c};}}),_0x1de35c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1f061d,{writer:_0x3ad10d})=>_0x3ad10d['createElement']('$marker',{'data-name':'comment:'+_0x1f061d['getAttribute']('id')})}),_0x1de35c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4189f2=this['editor'],_0x2757da=_0x4189f2['plugins']['get'](o),_0x560391=new Set(),_0x1140b0=new Set();_0x4189f2['model']['document']['registerPostFixer'](_0x259250=>{let _0x35687d=!0x1;for(const {name:_0x2aaf25,data:_0x4e48b9}of _0x4189f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1879ee,id:_0x2d0cf9}=ft(_0x2aaf25);let _0x492a7d=_0x4e48b9['newRange'];if('comment'!==_0x1879ee||!_0x492a7d)continue;const _0x41d83a='$graveyard'===_0x492a7d['root']['rootName'];_0x41d83a||(_0x492a7d=ht(_0x492a7d,_0x4189f2['model']),!_0x492a7d||_0x492a7d['isCollapsed']||!_0x4e48b9['newRange']||_0x492a7d['isEqual'](_0x4e48b9['newRange']))?_0x4189f2['model']['hasContent'](_0x492a7d)&&!_0x41d83a?this['isThreadsLoadingPaused']?_0x560391['add'](_0x2aaf25):this['_handleThreadMarker'](_0x2aaf25,_0x2d0cf9):(_0x1140b0['add'](_0x2aaf25),_0x560391['delete'](_0x2aaf25),_0x259250['removeMarker'](_0x2aaf25),_0x35687d=!0x0):(_0x259250['updateMarker'](_0x2aaf25,{'range':_0x492a7d}),_0x35687d=!0x0);}return _0x35687d;}),this['on']('change:isThreadsLoadingPaused',(_0x3fe157,_0x3e1442,_0x3dcac7)=>{if(!_0x3dcac7&&_0x560391['size'])for(const _0x17149e of _0x560391){const {id:_0xc267b8}=ft(_0x17149e);_0x560391['delete'](_0x17149e),_0x4189f2['model']['markers']['get'](_0x17149e)&&this['_handleThreadMarker'](_0x17149e,_0xc267b8);}}),this['listenTo'](_0x4189f2['model']['document'],'change',()=>{for(const {name:_0x3ca7f6,data:{newRange:_0x189417}}of _0x4189f2['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5e2e4c,id:_0x118572}=ft(_0x3ca7f6);if('comment'!==_0x5e2e4c)continue;const _0x1817a7=_0x2757da['getCommentThread'](_0x118572),_0x55b07b=this['hasMarkerForId'](_0x118572);_0x1817a7&&(!_0x1817a7['_hasTargetInContent']&&_0x189417&&_0x4189f2['editing']['view']['once']('render',()=>{const _0x4db0dd=_0x4189f2['plugins']['get'](y),_0x1e074d=_0x2757da['_threadToController']['get'](_0x1817a7)['view'];_0x4db0dd['getByInnerView'](_0x1e074d)['refreshVisibility']();},{'priority':'low'}),_0x1817a7['_hasTargetInContent']=_0x55b07b||!!_0x189417),_0x189417||(_0x1140b0['add'](_0x3ca7f6),_0x560391['delete'](_0x3ca7f6));}for(const _0x5e63b6 of _0x1140b0){const {id:_0x1e9800}=ft(_0x5e63b6),_0x32004e=_0x2757da['getCommentThread'](_0x1e9800);if(_0x560391['delete'](_0x5e63b6),!_0x32004e)continue;const _0x5edf69=this['hasMarkerForId'](_0x1e9800);_0x5edf69||_0x32004e['isSubmitted']?_0x5edf69||_0x32004e['unlinkedAt']||_0x32004e['setUnlinkedAt'](new Date()):_0x32004e['remove']();}_0x1140b0['clear']();});}['_handleInitialThreads'](_0x5e071c){_0x5e071c['forEach'](_0x373581=>{_0x373581['unlinkedAt']&&this['_attachArchivedThread'](_0x373581['id']);});}['_getTargetForId'](_0x23431d){const _0x37e8d1=this['editor'],_0x2379ec=this['getAllMarkersForId'](_0x23431d);return et(_0x37e8d1['editing'],_0x2379ec);}['_getTextContext'](_0x2ec90b){const _0x2fdbd2=this['getAllMarkersForId'](_0x2ec90b);let _0x52eff7='',_0x210601=!0x1;for(const _0x1a5780 of _0x2fdbd2){const _0x24c040=_0x1a5780['getRange']();for(const _0x5500b0 of Array['from'](_0x24c040['getItems']()))_0x5500b0['is']('$textProxy')?(_0x52eff7&&_0x210601&&(_0x52eff7+='\x20',_0x210601=!0x1),_0x52eff7+=_0x5500b0['data']):_0x210601=!0x0;_0x210601=!0x0;}return _0x52eff7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x137336,_0x2873be){const _0x1e528b=this['editor'],_0xe98a41=_0x1e528b['plugins']['get'](o);let _0x5af1ca=_0xe98a41['getCommentThread'](_0x2873be);const _0x5a63a5=_0x1e528b['config']['get']('collaboration.channelId'),_0x2f9031=_0x1e528b['plugins']['get'](b);if(_0x5af1ca&&(_0x5af1ca['unlinkedAt']&&_0x5af1ca['setUnlinkedAt'](null),_0x5af1ca['isAttached']))return _0x5af1ca;return!this['getAllMarkersForId'](_0x2873be)[0x0]['managedUsingOperations']?_0x1e528b['editing']['view']['once']('render',()=>{if(_0xe98a41['getCommentThread'](_0x2873be))return;const _0x252b75=_0x1e528b['plugins']['get'](y);_0x5af1ca=_0xe98a41['openNewCommentThread']({'channelId':_0x5a63a5,'threadId':_0x2873be,'target':()=>this['_getTargetForId'](_0x2873be),'context':{'type':'text','value':this['_getTextContext'](_0x2873be)}});const _0x2757ab=_0xe98a41['_threadToController']['get'](_0x5af1ca)['view'],_0x59c01a=_0x252b75['getByInnerView'](_0x2757ab);_0x59c01a&&_0x2f9031['registerAnnotation'](_0x59c01a);},{'priority':'low'}):_0xe98a41['fetchCommentThread']({'channelId':_0x5a63a5,'threadId':_0x2873be})['then'](_0x37e808=>{if('destroyed'!==_0x1e528b['state']){if(_0x5af1ca=_0x37e808,_0x5af1ca&&!_0x5af1ca['isAttached']){const _0x3e713b=_0x5af1ca['attachTo'](()=>this['_getTargetForId'](_0x2873be));_0x2f9031['registerAnnotation'](_0x3e713b),_0x5af1ca['isResolved']&&this['_reconvertMarkers'](_0x2873be);}else{if(!_0x5af1ca){const _0x14f717=this['getAllMarkersForId'](_0x2873be);_0x1e528b['model']['change'](_0x34ea06=>{for(const _0x3cd5e7 of _0x14f717)_0x34ea06['removeMarker'](_0x3cd5e7);});}}}}),_0x5af1ca;}['_handleThreadMarker'](_0x23799d,_0x12ab84){const _0xc7b115=this['_attachMarkerToThread'](_0x23799d,_0x12ab84);_0xc7b115&&!_0xc7b115['context']&&_0xc7b115['setContext']({'type':'text','value':this['_getTextContext'](_0x12ab84)});}['_initAriaMarkerChangeAnnouncements'](){const _0x130426=this['editor'];rt(_0x130426['model'],({left:_0x3f18e1,entered:_0xe0e125})=>{for(const _0xfb7a4a of _0x3f18e1)if(mt(_0xfb7a4a)){_0x130426['ui']['ariaLiveAnnouncer']['announce'](N(_0x130426['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x220d2e of _0xe0e125)if(mt(_0x220d2e)){_0x130426['ui']['ariaLiveAnnouncer']['announce'](N(_0x130426['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0xabbee7)));break;}});}}function dt(_0x34ad36,_0x26f512){return _0x26f512?_0x34ad36+':'+_0x26f512:_0x34ad36;}function ht(_0x44b953,_0x21d751){const _0x1de267=_0x21d751['schema'],_0x21c35f=_0x21d751['createRange'](_0x44b953['start']);for(const _0x2a970d of _0x44b953['getWalker']()){const {type:_0x143686,item:_0x14c3a2,nextPosition:_0x2a8a2e}=_0x2a970d;if('text'===_0x143686||_0x1de267['isObject'](_0x14c3a2)){const _0x37cf51=_0x21d751['createPositionBefore'](_0x14c3a2);_0x21c35f['isCollapsed']&&(_0x21c35f['start']=_0x37cf51),_0x21c35f['end']=_0x2a8a2e;}}return _0x21c35f;}function mt(_0x493f57){return'comment'===ft(_0x493f57['name'])['group'];}class s extends _0xeeaaab{['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 _0x527463=this['editor'],_0x2c96bb=_0x527463['plugins']['get'](o),_0x41b960=_0x527463['plugins']['get'](r),_0x4fd9be=_0x527463['plugins']['get'](y),_0x934580=_0x527463['plugins']['get'](b);_0x527463['ui']['componentFactory']['add']('comment',()=>{const _0x4d13f5=this['_createUIButton'](_0x1db6f3);return _0x4d13f5['tooltip']=!0x0,_0x4d13f5;}),_0x527463['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x19b513)),_0x934580['addSourceCollector'](()=>{const _0x2c65a3=[];for(const [_0x5acf2a,_0x2b72c9]of _0x2c96bb['_threadToController']){const _0x407e04=_0x41b960['getAllMarkersForId'](_0x5acf2a['id']),_0x303c9d=_0x407e04['map'](_0x594c92=>_0x594c92['getRange']());_0x407e04['length']>0x0&&_0x2c65a3['push']([_0x2b72c9['view'],_0x303c9d]);}return _0x2c65a3;}),this['listenTo'](_0x4fd9be,'change:activeAnnotations',(_0x2dfd39,_0x1a0c5e,_0x930944)=>{const _0x3b7be9=Array['from'](_0x930944)['map'](_0xedf1b2=>_0xedf1b2['innerView'])['find'](_0x3f1d83=>_0x2c96bb['_viewToController']['has'](_0x3f1d83));if(!_0x3b7be9)return void(_0x41b960['activeMarker']=null);const _0x4aa1e3=_0x2c96bb['_viewToController']['get'](_0x3b7be9)['model']['id'],_0xff7a47='comment:'+_0x4aa1e3;_0x4aa1e3&&_0x41b960['hasMarkerForId'](_0x4aa1e3)?_0x41b960['activeMarker']=_0xff7a47:_0x41b960['activeMarker']&&(_0x41b960['activeMarker']=null);}),this['listenTo'](_0x2c96bb,'removeCommentThread',(_0x1457c9,{threadId:_0x2ff853,isFromAdapter:_0x9828b8})=>{!_0x9828b8&&_0x527463['ui']['focusTracker']['isFocused']&&_0x41b960['hasMarkerForId'](_0x2ff853)&&_0x527463['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2c96bb,'addComment',(_0x5215e7,{threadId:_0x4f0229,isFromAdapter:_0x109970})=>{if(_0x109970||!_0x41b960['hasMarkerForId'](_0x4f0229)||!_0x2c96bb['hasCommentThread'](_0x4f0229))return;0x1===_0x2c96bb['getCommentThread'](_0x4f0229)['length']&&(_0x527463['editing']['view']['focus'](),_0x5215e7['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x486523=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x108e5e;for(const _0x45ea7e in _0x486523){const _0x2b75b5=_0x45ea7e,_0x20f0c8=_0x486523[_0x2b75b5];if('commentsLicenseKeyValid'==_0x20f0c8||'commentsLicenseKeyInvalid'==_0x20f0c8||'commentsLicenseKeyExpired'==_0x20f0c8||'commentsLicenseKeyDomainLimit'==_0x20f0c8||'commentsLicenseKeyNotAllowed'==_0x20f0c8||'commentsLicenseKeyEvaluationLimit'==_0x20f0c8||'commentsLicenseKeyTrialLimit'==_0x20f0c8||'commentsLicenseKeyUsageLimit'==_0x20f0c8){delete _0x486523[_0x2b75b5],_0x108e5e=_0x20f0c8,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x108e5e&&_0x486523['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x108e5e&&_0x486523['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x108e5e&&_0x486523['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x108e5e&&_0x486523['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x108e5e&&_0x486523['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x108e5e&&_0x486523['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x108e5e&&_0x486523['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x48b4ed){const _0x2998cc=this['editor'],_0x37d385=new _0x48b4ed(_0x2998cc['locale']),_0x2199fd=_0x2998cc['commands']['get']('addCommentThread');return _0x37d385['set']({'label':N(_0x2998cc['locale'],'Comment'),'icon':_0x1797e5}),_0x37d385['bind']('isEnabled')['to'](_0x2199fd,'hasContent'),this['listenTo'](_0x37d385,'execute',()=>{_0x2199fd['execute']();}),_0x37d385;}}class i extends _0xeeaaab{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5e404f){super(_0x5e404f),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x79bd6b,_0x320479,_0x4f98c2)=>{_0x4f98c2?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4f6e3a,_0x5c7483]of this['editor']['commands'])_0x5c7483['affectsData']&&'addCommentThread'!==_0x4f6e3a&&_0x5c7483['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 _0x234744=this['editor']['editing']['view']['document'];this['listenTo'](_0x234744,'cut',_0x1a23a0=>_0x1a23a0['stop'](),{'priority':'highest'}),this['listenTo'](_0x234744,'clipboardInput',_0x3fbade=>_0x3fbade['stop'](),{'priority':'highest'}),this['listenTo'](_0x234744,'delete',_0x574840=>_0x574840['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x155740,_0xb0ca35]of this['editor']['commands'])_0xb0ca35['affectsData']&&'addCommentThread'!==_0x155740&&_0xb0ca35['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 _0x1756af{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ee156){super(_0x1ee156),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x354d04=this['context']['plugins']['get'](y);this['listenTo'](_0x354d04,'_activateAnnotation',(_0x45f602,_0x3de5e0)=>{for(const _0x37c615 of this['activeUIs']){const _0x144244=this['_uis']['get'](_0x37c615);(0x0,this['uisData']['get'](_0x37c615)['filter'])(_0x3de5e0)&&_0x144244['setActiveAnnotation'](_0x3de5e0);}}),this['listenTo'](_0x354d04,'_deactivateAllAnnotations',()=>{for(const _0x1a1a6b of this['activeUIs']){this['_uis']['get'](_0x1a1a6b)['setActiveAnnotation'](null);}}),this['listenTo'](_0x354d04['_visibleAnnotations'],'add',(_0x12bce1,_0x2f23fb)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2f23fb);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4ac31f){return this['activeUIs']['has'](_0x4ac31f);}['activate'](_0x27d48d,_0x42acb3=this['defaultFilter']){const _0x31cc44=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x27d48d))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x27d48d});this['isActive'](_0x27d48d)&&this['deactivate'](_0x27d48d),this['activeUIs']['add'](_0x27d48d);const _0x543219=new S();v({'source':_0x31cc44['_visibleAnnotations'],'target':_0x543219,'filter':_0x42acb3}),this['uisData']['set'](_0x27d48d,{'collection':_0x543219,'filter':_0x42acb3});const _0x459e51=this['_uis']['get'](_0x27d48d);_0x459e51['attach'](_0x543219),this['listenTo'](_0x459e51,'change:activeAnnotation',(_0x56697d,_0xf4f923,_0x52b18e,_0x1e2683)=>{_0x1e2683&&_0x31cc44['_removeActiveAnnotation'](_0x1e2683),_0x52b18e&&_0x31cc44['_addActiveAnnotation'](_0x52b18e);});}['deactivate'](_0x13610a){if(this['activeUIs']['delete'](_0x13610a),!this['_uis']['has'](_0x13610a))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x13610a});const _0xf725e1=this['_uis']['get'](_0x13610a);_0xf725e1['detach'](),this['stopListening'](_0xf725e1),this['uisData']['get'](_0x13610a)['collection']['destroy'](),this['uisData']['delete'](_0x13610a);}['switchTo'](_0x5cfa7f){if(!this['_uis']['has'](_0x5cfa7f))throw new _0x55af7e('annotationsuis-missing-ui',this,{'uiName':_0x5cfa7f});const _0x4a4d73=this['context']['plugins']['get'](y),_0x26cd3b=Array['from'](_0x4a4d73['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x5cfa7f);const _0xeab352=this['_uis']['get'](_0x5cfa7f);_0xeab352['setActiveAnnotation'](_0x26cd3b),_0xeab352['_setSelectedAnnotations']&&_0x26cd3b&&_0xeab352['_setSelectedAnnotations']([_0x26cd3b]);}['deactivateAll'](){for(const _0x3c2c72 of this['activeUIs'])this['deactivate'](_0x3c2c72);}['register'](_0x353566,_0x22e389){if(this['_uis']['has'](_0x353566))throw new _0x55af7e('annotationsuis-register-already-registered');if('function'!=typeof _0x22e389['attach']||'function'!=typeof _0x22e389['detach']||'function'!=typeof _0x22e389['setActiveAnnotation'])throw new _0x55af7e('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x353566,_0x22e389);}['refilterAnnotations'](){const _0x56b483=this['context']['plugins']['get'](y)['collection'],_0x1f8a35=new Map(),_0x335fb7=Array['from'](this['activeUIs']);for(const _0x490b82 of this['activeUIs']){const _0x307bbd=this['uisData']['get'](_0x490b82)['collection'];for(const _0x44802e of _0x307bbd)_0x1f8a35['set'](_0x44802e,_0x490b82);}for(const _0x260750 of _0x56b483){const _0x1446f8=_0x1f8a35['get'](_0x260750);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x260750);const _0x1af900=_0x335fb7['find'](_0x11f166=>this['uisData']['get'](_0x11f166)['filter'](_0x260750));_0x1446f8!==_0x1af900&&(_0x1446f8&&this['uisData']['get'](_0x1446f8)['collection']['remove'](_0x260750),_0x1af900&&this['uisData']['get'](_0x1af900)['collection']['add'](_0x260750));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x11960c){const _0xdeb8d7=[];for(const _0x2e9427 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2e9427)['filter'])(_0x11960c)&&_0xdeb8d7['push'](_0x2e9427);}if(_0xdeb8d7['length']>0x1)throw new _0x55af7e('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0xdeb8d7,'annotationType':_0x11960c['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(_0x33cca4){super(_0x33cca4),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x342e56,_0x1455be)=>_0x342e56+_0x1455be),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x39afa3=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x39afa3['to']('isAnimationDisabled',_0x494958=>_0x494958?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x39afa3['to']('top',_0x1a0df3=>Ot(_0x1a0df3))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x45a709=this['element']['clientHeight'];_0x45a709&&(this['height']=_0x45a709);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1756af{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x39ccf5){super(_0x39ccf5),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 _0x497d73=this['context']['config']['get']('sidebar.container');_0x497d73&&this['setContainer'](_0x497d73);}['setContainer'](_0x4228c5){if(!g(_0x4228c5))throw new _0x55af7e('sidebar-setcontainer-invalid-element');this['container']=_0x4228c5;}['_attachToContainer']({viewClass:_0x58a1bd='',spaceBetweenItems:_0x173357=0x19}={}){if(!g(this['container']))throw new _0x55af7e('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x58a1bd,this['_spaceBetweenItems']=_0x173357;}['rearrange']({removedAnnotation:_0x3634fc,previousAnnotation:_0x5a8072,nextAnnotation:_0x47e7e6}){const _0x5dff1d=this['getSidebarItemView'](_0x3634fc);this['view']['list']['remove'](_0x5dff1d),this['_destroySidebarItemView'](_0x3634fc),_0x5a8072&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5a8072)),_0x47e7e6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x47e7e6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x9a2231,activatedAnnotation:_0x58c662,disableAnimationOnActivatedAnnotation:_0x38b6ac}){if(this['_activeAnnotation']=_0x58c662,_0x9a2231){_0x9a2231['isActive']=!0x1;const _0xe79417=this['getSidebarItemView'](_0x9a2231);_0xe79417&&_0x38b6ac&&(_0xe79417['isAnimationDisabled']=!0x1);}if(_0x58c662){const _0x5497a4=this['getSidebarItemView'](_0x58c662);_0x5497a4&&(_0x58c662['isActive']=!0x0,_0x38b6ac&&(_0x5497a4['isAnimationDisabled']=!0x0,_0x5497a4['top']+=0x1),this['_alignToTargetRect'](_0x5497a4));}}['_detachFromContainer'](_0x37559d){if(this['view']['element']['remove'](),_0x37559d){for(const _0x52da46 of _0x37559d)this['_destroySidebarItemView'](_0x52da46);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x280106,_0x3fc45a){_0x3fc45a||(_0x3fc45a=_0x280106['view']);const _0x453d93=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x453d93,_0x280106),this['_annotationToSidebarItemView']['set'](_0x280106,_0x453d93),_0x453d93['content']['add'](_0x3fc45a),this['listenTo'](_0x280106['view'],'change:targetRect',(_0x4d4206,_0xaeddf7,_0x4306cf)=>{const _0x36381c=this['_getTargetTop'](_0x280106,_0x4306cf);_0x453d93['_targetTop']!=_0x36381c&&(_0x453d93['_targetTop']=_0x36381c,this['_setItemTop'](_0x453d93,_0x36381c));}),this['listenTo'](_0x453d93,'change:top',()=>{this['_recalculate'](_0x453d93,'top');}),this['listenTo'](_0x453d93,'change:bottom',()=>{this['_recalculate'](_0x453d93,'bottom');}),this['_alignToTargetRect'](_0x453d93);const _0x125dae=this['_getItemBefore'](_0x453d93);if(_0x125dae)this['_alignAfterItem'](_0x125dae,_0x453d93)||this['_alignToTargetRect'](_0x453d93);else this['_alignToTargetRect'](_0x453d93);return this['_updateLastItem'](),this['view']['list']['add'](_0x453d93),_0x453d93;}['_alignForTopChange'](_0x230b25){if(!_0x230b25['content']['length'])return;const _0x4c3450=this['_getItemBefore'](_0x230b25);if(!_0x4c3450)return;const _0x3cf8ae=this['_sidebarItemViewToAnnotation']['get'](_0x4c3450),_0x7f0d90=this['_activeAnnotation'];_0x7f0d90&&_0x7f0d90===_0x3cf8ae?this['_alignAfterItem'](_0x4c3450,_0x230b25):this['_alignBeforeItem'](_0x230b25,_0x4c3450);}['_alignForBottomChange'](_0x13a8b3){if(!_0x13a8b3['content']['length'])return;const _0x26ad81=this['_getItemAfter'](_0x13a8b3);if(!_0x26ad81)return;const _0x314578=this['_sidebarItemViewToAnnotation']['get'](_0x26ad81),_0x321fae=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4442e4=this['_activeAnnotation'];_0x4442e4&&_0x4442e4===_0x314578&&_0x321fae?(this['_alignBeforeItem'](_0x26ad81,_0x13a8b3),this['_alignAfterItem'](_0x13a8b3,_0x26ad81)):_0x4442e4&&_0x4442e4===_0x314578?this['_alignBeforeItem'](_0x26ad81,_0x13a8b3):this['_alignAfterItem'](_0x13a8b3,_0x26ad81);}['_recalculate'](_0x262288,_0x105b4f){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0xc574f5,changedProp:_0x3615bb}of this['_recalculateBuffer'])'top'===_0x3615bb?this['_alignForTopChange'](_0xc574f5):this['_alignForBottomChange'](_0xc574f5);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x262288,'changedProp':_0x105b4f});}['getSidebarItemView'](_0x200a3d){return this['_annotationToSidebarItemView']['get'](_0x200a3d);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x5534ac){const _0x52cf0f=this['getSidebarItemView'](_0x5534ac);this['stopListening'](_0x52cf0f),this['stopListening'](_0x5534ac['view']),_0x52cf0f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x5534ac),this['_sidebarItemViewToAnnotation']['delete'](_0x52cf0f);}['_createSidebarView'](){const _0x4419f4=new H(this['context']['locale']);return _0x4419f4['render'](),this['on']('change:_lastItem',(_0x1e3e1c,_0x1c8d8d,_0x3af26c,_0x872ce9)=>{_0x872ce9&&_0x4419f4['unbind']('minHeight'),_0x3af26c?_0x4419f4['bind']('minHeight')['to'](_0x3af26c,'bottom'):_0x4419f4['minHeight']=null;}),_0x4419f4;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x55a457){const _0x5ed6fd=this['_sidebarItemViewToAnnotation']['get'](_0x55a457),_0x2543b5=_0x5ed6fd&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5ed6fd)-0x1);return _0x2543b5&&this['getSidebarItemView'](_0x2543b5)||null;}['_getItemAfter'](_0x85f748){const _0x5b9e7e=this['_sidebarItemViewToAnnotation']['get'](_0x85f748),_0x23481c=_0x5b9e7e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5b9e7e)+0x1);return _0x23481c&&this['getSidebarItemView'](_0x23481c)||null;}['_alignBeforeItem'](_0x5b6842,_0x2e2ac3){_0x5b6842['updateHeight']();const _0x4fafc0=G(_0x2e2ac3['bottom']+this['_spaceBetweenItems'],_0x5b6842['top']);return!!_0x4fafc0&&(this['_setItemTop'](_0x2e2ac3,_0x2e2ac3['top']-_0x4fafc0),!0x0);}['_alignAfterItem'](_0x2e4464,_0x150e0e){_0x2e4464['updateHeight']();const _0x378244=G(_0x2e4464['bottom']+this['_spaceBetweenItems'],_0x150e0e['top']);return!!_0x378244&&(this['_setItemTop'](_0x150e0e,_0x150e0e['top']+_0x378244,!0x1),!0x0);}['_alignToTargetRect'](_0x1ee0ef){const _0x5b4d24=this['_sidebarItemViewToAnnotation']['get'](_0x1ee0ef);if(!_0x5b4d24||!_0x5b4d24['target']||!_0x5b4d24['targetRect'])return;const _0x81e129=this['_getTargetTop'](_0x5b4d24,_0x5b4d24['targetRect']);this['_setItemTop'](_0x1ee0ef,_0x81e129);}['_getTargetTop'](_0x4d7844,_0x2eb8b2){if(null===_0x2eb8b2)return 0x0;if(_0x4d7844['target']instanceof _0x2770d5)return _0x2eb8b2['top'];{const _0x4e4551=new _0x2770d5(this['view']['element'])['top'];return _0x2eb8b2['top']-_0x4e4551;}}['_setItemTop'](_0x443b55,_0x50f583,_0x53e6ca=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x53e6ca&&(_0x50f583=Math['max'](_0x50f583,this['_getMaxAvailableTop'](_0x443b55))),_0x443b55['top']=_0x50f583;}['_getMaxAvailableTop'](_0x320aad){let _0x3d6d14=this['_getItemBefore'](_0x320aad),_0x3c433d=0x0;for(;_0x3d6d14;)_0x3d6d14['updateHeight'](),_0x3c433d+=this['_spaceBetweenItems']+_0x3d6d14['height'],_0x3d6d14=this['_getItemBefore'](_0x3d6d14);return _0x3c433d;}}function G(_0x5df252,_0x37b2cd){return Math['max'](_0x5df252-_0x37b2cd,0x0);}function g(_0x94c5ec){return null!==_0x94c5ec&&'object'==typeof _0x94c5ec&&0x1===_0x94c5ec['nodeType'];}class e extends _0x1756af{['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(_0x70c59c){super(_0x70c59c),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x24de43(),this['_refreshPositioningDebounced']=_0x20001b(()=>{_0x70c59c['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3bf50b=this['context']['plugins']['get'](j),_0x24480a=this['context']['plugins']['get'](z);_0x3bf50b['register']('wideSidebar',this),_0x24480a['container']&&_0x3bf50b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x6fe44){if(_0x6fe44===this['activeAnnotation'])return;const _0x3a7417=this['context']['plugins']['get'](z);_0x3a7417['_activeAnnotation']=_0x6fe44;const _0xfa4450=this['activeAnnotation'];_0x3a7417['refresh']({'blurredAnnotation':_0xfa4450,'activatedAnnotation':_0x6fe44}),this['activeAnnotation']=_0x6fe44;}['attach'](_0x1a45d4){this['annotations']=_0x1a45d4;const _0x10a5f8=this['context']['plugins']['get'](z);if(_0x10a5f8['_annotations']=_0x1a45d4,this['isAttached'])throw new _0x55af7e('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x10a5f8,'set:container',()=>{this['detach'](),this['listenTo'](_0x10a5f8,'change:container',_0x4f472b=>{_0x4f472b['off'](),this['attach'](_0x1a45d4);});}),_0x10a5f8['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0xa99b74=_0x1fdfc8=>{_0x1fdfc8['updateTargetRect'](),_0x10a5f8['addAnnotation'](_0x1fdfc8);};for(const _0x3b7612 of _0x1a45d4)_0xa99b74(_0x3b7612);this['listenTo'](_0x1a45d4,'add',(_0x2e8468,_0xc74631)=>{_0xa99b74(_0xc74631);}),this['listenTo'](_0x1a45d4,'remove',(_0x4d99bb,_0x3ef399,_0x292b7d)=>{_0x10a5f8['rearrange']({'removedAnnotation':_0x3ef399,'previousAnnotation':_0x1a45d4['get'](_0x292b7d-0x1),'nextAnnotation':_0x1a45d4['get'](_0x292b7d+0x1)}),_0x3ef399===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1a45d4,'focus',(_0x452eb5,_0x394402)=>{this['setActiveAnnotation'](_0x394402);}),this['listenTo'](_0x1a45d4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x317d7d=this['context']instanceof _0x3609be?this['context']['editors']:new _0x24de43([this['context']]);for(const _0x317685 of _0x317d7d)this['_integrateWithEditorAnnotations'](_0x317685);this['listenTo'](_0x317d7d,'add',(_0x1df84e,_0x24ffb0)=>{this['listenTo'](_0x24ffb0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x24ffb0);});}),this['listenTo'](_0x317d7d,'remove',(_0x958ec7,_0x2bde9b)=>{_0x2bde9b['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2bde9b['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x55af7e('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x131ed3=this['context']['plugins']['get'](z);_0x131ed3['_detachFromContainer'](this['annotations']),this['stopListening'](_0x131ed3),this['stopListening'](this['annotations']),this['context']instanceof _0x3609be&&this['stopListening'](this['context']['editors']);for(const _0x5dada8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5dada8);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2a89d9){if(!_0x2a89d9['plugins']['has']('EditorAnnotations'))return;const _0x18b4a3=_0x2a89d9['plugins']['get']('EditorAnnotations'),_0x515df2=()=>{const _0x178b6a=_0x18b4a3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x178b6a[0x0]||null);};this['listenTo'](_0x18b4a3,'refresh',_0x515df2),this['listenTo'](_0x18b4a3,'blur',(_0x28ade0,{isAnnotationTracked:_0x4d8db1})=>{this['activeAnnotation']&&_0x4d8db1(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x18b4a3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x21011e=>{_0x18b4a3['hasDomSelection']()&&(_0x515df2(),_0x21011e['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x18b4a3);}['_destroyEditorAnnotationsIntegration'](_0x45cc44){this['stopListening'](_0x45cc44),this['_editorAnnotations']['remove'](_0x45cc44);}}class C extends _0x1db6f3{['counterView'];constructor(_0x2ecdc2){super(_0x2ecdc2);const _0x5b70ce=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5a263b,_0x130001)=>_0x5a263b?'...':_0x130001['toString']()),this['set']('annotationType',''),this['icon']=_0x1797e5,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x5b70ce['to']('annotationType',_0x5d8406=>'ck-annotation-counter__badge--'+_0x5d8406),_0x5b70ce['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x5b70ce['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1756af{['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(_0x4e6ed1){super(_0x4e6ed1),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3faab5())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x24de43(),this['_refreshPositioningDebounced']=_0x20001b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x9bd70f(this['context']['locale']),this['balloonPanelView']=new _0x580a5d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1e12b3){this['annotations']=_0x1e12b3;const _0x6962e7=this['context']['plugins']['get'](z),_0x5327c1=this['balloonPanelView'];if(_0x6962e7['_annotations']=_0x1e12b3,this['isAttached'])throw new _0x55af7e('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x6962e7,'set:container',()=>{this['detach'](),this['listenTo'](_0x6962e7,'change:container',_0x226eac=>{_0x226eac['off'](),this['attach'](_0x1e12b3);});}),_0x6962e7['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x15384d=_0xcff3f6=>{const _0x14f4e4=new C(this['context']['locale']);_0x6962e7['addAnnotation'](_0xcff3f6,_0x14f4e4),this['_annotationToNarrowView']['set'](_0xcff3f6,_0x14f4e4),_0x14f4e4['bind']('isDirty','annotationType','number')['to'](_0xcff3f6['view'],'isDirty','type','length'),_0x14f4e4['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5327c1['content']['first']!==_0xcff3f6['view']?(this['_showBalloon'](_0xcff3f6),_0xcff3f6['view']['element']['focus'](),this['setActiveAnnotation'](_0xcff3f6)):this['setActiveAnnotation'](null);});};for(const _0x458454 of _0x1e12b3)_0x15384d(_0x458454);this['listenTo'](_0x1e12b3,'add',(_0xfdfaa5,_0x45b402)=>{_0x15384d(_0x45b402);}),this['listenTo'](_0x1e12b3,'remove',(_0x5f56d2,_0x5b7de4,_0x5cd2e8)=>{this['_annotationToNarrowView']['get'](_0x5b7de4)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5b7de4),_0x6962e7['rearrange']({'removedAnnotation':_0x5b7de4,'previousAnnotation':_0x1e12b3['get'](_0x5cd2e8-0x1),'nextAnnotation':_0x1e12b3['get'](_0x5cd2e8+0x1)}),_0x5b7de4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1e12b3,'focus',(_0x58be5d,_0x1d17f6)=>{this['setActiveAnnotation'](_0x1d17f6);}),this['listenTo'](_0x1e12b3,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x12247e,_0x365b57)=>{_0x365b57['keyCode']===_0xdebc38['esc']&&_0x5327c1['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5327c1['content']['first']),this['_hideBalloon'](),_0x365b57['stopPropagation'](),_0x365b57['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x105cf7,_0x38460a)=>{const _0x38a970=_0x38460a['target'];_0x5327c1['isVisible']&&_0x5327c1['element']['contains'](_0x38a970)||_0x6962e7['view']['element']['contains'](_0x38a970)||_0x105cf7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x47fce9=>_0x47fce9['contains'](_0x38a970))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5e38c7=this['context']instanceof _0x3609be?this['context']['editors']:new _0x24de43([this['context']]);for(const _0x106fdd of _0x5e38c7)this['_integrateWithEditorAnnotations'](_0x106fdd);this['listenTo'](_0x5e38c7,'add',(_0x473df0,_0x612654)=>{this['listenTo'](_0x612654,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x612654);});}),this['listenTo'](_0x5e38c7,'remove',(_0x1b7b07,_0x59a580)=>{_0x59a580['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x59a580['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x39e7d7){if(_0x39e7d7===this['activeAnnotation'])return;const _0x3c2a37=this['context']['plugins']['get'](z);if(_0x3c2a37['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x39e7d7,'disableAnimationOnActivatedAnnotation':!0x0}),_0x39e7d7)_0x3c2a37['getSidebarItemView'](_0x39e7d7)?this['_showBalloon'](_0x39e7d7):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x39e7d7;}['detach'](){if(!this['isAttached'])throw new _0x55af7e('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x333b60=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x38ae8c=>_0x38ae8c['destroy']()),this['_annotationToNarrowView']['clear'](),_0x333b60['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3609be&&this['stopListening'](this['context']['editors']);for(const _0x2c8679 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2c8679);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'](_0x24327a){if(!_0x24327a['plugins']['has']('EditorAnnotations'))return;const _0x52500b=_0x24327a['plugins']['get']('EditorAnnotations'),_0x275802=this['context']['plugins']['get'](z),_0x29dc8e=this['annotations'],_0x4d904b=this['balloonPanelView'],_0x441e7b=()=>{const _0x21c893=_0x52500b['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x21c893),this['setActiveAnnotation'](_0x21c893[0x0]||null);};this['listenTo'](_0x52500b,'refresh',_0x441e7b),this['listenTo'](_0x52500b,'blur',(_0x4282f3,{isAnnotationTracked:_0x76c60d})=>{this['activeAnnotation']&&_0x76c60d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x52500b,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x29dc8e,'blur',_0x405802=>{_0x52500b['hasDomSelection']()&&_0x405802['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5512c2,_0x3c2654)=>{const _0x273110=_0x3c2654['target'];_0x4d904b['isVisible']&&_0x4d904b['element']['contains'](_0x273110)||_0x275802['view']['element']['contains'](_0x273110)||this['activeAnnotation']&&_0x52500b['hasDomSelection']()&&(_0x441e7b(),_0x5512c2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x52500b);}['_destroyEditorAnnotationsIntegration'](_0x43aa3c){_0x43aa3c&&(this['stopListening'](_0x43aa3c),this['_editorAnnotations']['remove'](_0x43aa3c));}['_setSelectedAnnotations'](_0x3ce406){for(const _0x5673dd of this['_selectedAnnotations'])_0x3ce406['includes'](_0x5673dd)||this['_manuallyClosedAnnotationViews']['delete'](_0x5673dd['view']);this['_selectedAnnotations']=_0x3ce406;}['_refreshPositioning'](){const _0xabd0f2=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0xabd0f2['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x59424c){if(this['_manuallyClosedAnnotationViews']['has'](_0x59424c['view']))return;const _0x5a4070=this['balloonPanelView']['content']['first'];_0x5a4070!==_0x59424c['view']?(_0x5a4070&&this['_detachListeners'](_0x5a4070),this['_attachListeners'](_0x59424c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x59424c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x453766=this['balloonPanelView']['content']['first'],_0x4b6975=_0x453766&&this['annotations']['getByView'](_0x453766);if(!_0x4b6975||!this['_annotationToNarrowView']['has'](_0x4b6975))return;const _0xa0d8ab=this['_annotationToNarrowView']['get'](_0x4b6975)['element'],_0x1fc3e2=(function(){const _0x5b46dd=_0x580a5d['defaultPositions'];return[_0x5b46dd['southArrowNorthEast'],_0x5b46dd['northArrowSouthEast'],_0x5b46dd['southArrowNorth'],_0x5b46dd['northArrowSouth'],_0x5b46dd['southArrowNorthWest'],_0x5b46dd['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xa0d8ab,'positions':_0x1fc3e2});}['_hideBalloon'](){const _0x3783f2=this['balloonPanelView'],_0x50d665=_0x3783f2['content']['first'];_0x50d665&&(this['_detachListeners'](_0x50d665),_0x3783f2['unpin'](),_0x3783f2['content']['clear']());}['_attachListeners'](_0x32763d){this['listenTo'](_0x32763d,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x32763d,'Esc',(_0x2cb751,_0x56f01e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x32763d),this['_hideBalloon'](),_0x56f01e();});}['_detachListeners'](_0x516549){this['stopListening'](_0x516549);}}class c extends _0xeeaaab{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x54b6ce,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x172495){super(_0x172495),_0x172495['editing']['view']['addObserver'](_0x1fb595),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x172495['plugins']['get'](_0x54b6ce),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x399563=this['editor']['plugins']['get'](j);_0x399563['context']===this['editor']&&(_0x399563['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x126183,_0x4b8512)=>{const _0x35c8b0=this['_balloon'];if(this['isAttached']&&_0x35c8b0['visibleView']){const _0xdaf4d=this['annotations']['getByView'](_0x35c8b0['visibleView']);_0xdaf4d&&this['_closeAnnotation'](_0xdaf4d),_0x4b8512();}}));}['afterInit'](){const _0xdf20af=this['editor']['plugins']['get'](j);_0xdf20af['context']===this['editor']&&(_0xdf20af['hasActive']()||_0xdf20af['switchTo']('inline'));}['setActiveAnnotation'](_0x212d88){_0x212d88!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x212d88&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x212d88)&&this['_addAnnotationToBalloon'](_0x212d88,!0x0),_0x212d88['isActive']=!0x0),_0x212d88||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x212d88);}['attach'](_0x2fb3d7){this['annotations']=_0x2fb3d7;const _0x22548c=this['editor']['plugins']['get'](j),_0x55b48f=this['_balloon'];if(this['isAttached'])throw new _0x55af7e('inlineannotations-attach-already-attached',this);if(_0x22548c['context']!==this['editor'])throw new _0x55af7e('inlineannotations-not-allowed-with-context',this);const _0x3cd965=this['editor']['plugins']['get'](b);this['listenTo'](_0x3cd965,'refresh',()=>{const _0xee320e=_0x3cd965['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x214d76,_0x415f08;!this['_forceRefresh']&&(_0x214d76=_0xee320e,_0x415f08=this['_selectedAnnotations'],_0x214d76['length']===_0x415f08['length']&&_0x214d76['every'](_0x5b74cf=>_0x415f08['includes'](_0x5b74cf)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xee320e),this['setActiveAnnotation'](_0xee320e[0x0]||null));}),this['listenTo'](_0x3cd965,'blur',(_0x2ffb5e,{isAnnotationTracked:_0x1b5337})=>{this['activeAnnotation']&&_0x1b5337(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2c073e,_0x4fc09b,_0x2747e8)=>{_0x2747e8||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2fb3d7,'remove',(_0x4388bf,_0x24d4bb)=>{this['_removeAnnotationFromBalloon'](_0x24d4bb),_0x24d4bb===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x55b48f,'change:visibleView',(_0x29b071,_0x14031c,_0x17c9e6,_0x123d9d)=>{_0x123d9d&&this['stopListening'](_0x123d9d);const _0x42ea76=_0x2fb3d7['getByView'](_0x17c9e6);_0x17c9e6&&_0x42ea76&&(this['listenTo'](_0x17c9e6,'change:height',()=>{_0x55b48f['updatePosition']();}),this['listenTo'](_0x17c9e6,'Esc',()=>{this['_closeAnnotation'](_0x42ea76),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x42ea76&&this['setActiveAnnotation'](_0x42ea76));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x55b48f['visibleView']&&(_0x2fb3d7['getByView'](_0x55b48f['visibleView'])&&_0x55b48f['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 _0x55af7e('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x27abbc of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x27abbc);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x2502f6){for(const _0xde2f72 of this['_selectedAnnotations'])_0x2502f6['includes'](_0xde2f72)||this['_manuallyClosed']['delete'](_0xde2f72);for(const _0xdf7d21 of this['annotations'])_0x2502f6['includes'](_0xdf7d21)||this['_removeAnnotationFromBalloon'](_0xdf7d21);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5d3fbd of _0x2502f6)this['_addAnnotationToBalloon'](_0x5d3fbd);}this['_selectedAnnotations']=_0x2502f6;}['_addAnnotationToBalloon'](_0x1111f2,_0x512545=!0x1){this['_manuallyClosed']['has'](_0x1111f2)||(this['_addedAnnotations']['has'](_0x1111f2)||this['_balloon']['hasView'](_0x1111f2['view'])||(this['_addedAnnotations']['add'](_0x1111f2),this['_balloon']['add']({'stackId':_0x1111f2['view']['id'],'view':_0x1111f2['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1111f2)}})),_0x512545&&this['_balloon']['showStack'](_0x1111f2['view']['id']));}['_getBalloonTargetForAnnotation'](_0x561e0f){const _0x2be8b3=_0x561e0f['target'],_0x12b791=this['editor']['editing']['view'],_0x10bf18=_0x12b791['document']['selection']['getFirstRange'](),_0x38fb82=_0x12b791['domConverter']['viewRangeToDom'](_0x10bf18);if(_0x38fb82['collapse'](!0x0),_0x2be8b3){if(_0x2be8b3 instanceof _0x2770d5)return _0x2be8b3;let _0x394d5f=[];for(const _0xff63e3 of _0x2be8b3)_0x394d5f['push'](...F(_0xff63e3['getClientRects']()));_0x394d5f=function(_0x56b292){const _0x4ccb8d=[];let _0x28ae77=_0x56b292[0x0];for(let _0x135017=0x1;_0x135017<_0x56b292['length'];_0x135017++)P(_0x28ae77,_0x56b292[_0x135017])?_0x28ae77['width']+=_0x56b292[_0x135017]['width']:(_0x4ccb8d['push'](_0x28ae77),_0x28ae77=_0x56b292[_0x135017]);return _0x4ccb8d['push'](_0x28ae77),_0x4ccb8d;}(_0x394d5f);const _0x4eee01=_0x38fb82['getBoundingClientRect']();return _0x394d5f['find'](_0x5ceca5=>_0x5ceca5['top']<=_0x4eee01['top']&&_0x5ceca5['bottom']>=_0x4eee01['bottom']&&_0x5ceca5['left']<=_0x4eee01['left']&&_0x5ceca5['right']>=_0x4eee01['right'])||_0x394d5f[0x0];}return _0x561e0f['targetRect']||_0x38fb82;}['_removeAnnotationFromBalloon'](_0x3ee38e){this['_addedAnnotations']['has'](_0x3ee38e)&&this['_balloon']['hasView'](_0x3ee38e['view'])&&(this['_addedAnnotations']['delete'](_0x3ee38e),this['_balloon']['remove'](_0x3ee38e['view']));}['_closeAnnotation'](_0xc038f8){this['_manuallyClosed']['add'](_0xc038f8),this['_removeAnnotationFromBalloon'](_0xc038f8);}}function F(_0x255e52){return Array['from'](_0x255e52)['map'](DOMRect['fromRect']);}function P(_0x10ba29,_0x3f9ece){return _0x10ba29['top']===_0x3f9ece['top']&&_0x10ba29['bottom']===_0x3f9ece['bottom']&&_0x10ba29['right']===_0x3f9ece['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x293dd6,_0x4e336c){super(_0x293dd6),this['set']('isEmpty',!_0x4e336c['length']),this['focusTracker']=new _0x5d97f7(),this['_annotationViews']=_0x4e336c,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x3261e3({'focusables':_0x4e336c,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4e336c,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4e336c,'remove',(_0x25c828,_0x40d4b2)=>{_0x40d4b2['isActive']&&this['focus'](),_0x4e336c['length']||(this['isEmpty']=!0x0);});const _0x22ff13=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x293dd6,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4e336c},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x22ff13['if']('isEmpty','ck-hidden',_0x31c32f=>!_0x31c32f)]},'children':[{'text':N(_0x293dd6,'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 _0x3a0e49 of this['_annotationViews'])this['focusTracker']['add'](_0x3a0e49['element']);this['_annotationViews']['on']('change',(_0x1e754e,{added:_0x4a06f5,removed:_0x5d66e1})=>{for(const _0x4550a7 of _0x4a06f5)this['focusTracker']['add'](_0x4550a7['element']);for(const _0x516f61 of _0x5d66e1)this['focusTracker']['remove'](_0x516f61['element']);});}}class p extends _0x1756af{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x24593d){super(_0x24593d),this['archivedThreads']=new _0x24de43();}['init'](){const _0x119177=this['context'],_0x1bd4fd=_0x119177['plugins']['get'](o),_0x29f4ec=_0x119177['plugins']['get'](y);this['listenTo'](_0x1bd4fd,'addCommentThread',(_0xccb168,{threadId:_0x4aeae4})=>{const _0x4907c4=_0x1bd4fd['getCommentThread'](_0x4aeae4);_0x4907c4['archivedAt']&&this['archivedThreads']['add'](_0x4907c4,this['_calculatePosition'](_0x4907c4['archivedAt'])),this['listenTo'](_0x4907c4,'change:archivedAt',(_0x234d90,_0x5a376c,_0x1026ef)=>{_0x1026ef?this['archivedThreads']['has'](_0x4907c4)||this['archivedThreads']['add'](_0x4907c4,this['_calculatePosition'](_0x4907c4['archivedAt'])):this['archivedThreads']['has'](_0x4907c4)&&this['archivedThreads']['remove'](_0x4907c4);});}),this['listenTo'](_0x1bd4fd,'removeCommentThread',(_0x171ca0,{threadId:_0x3802cd})=>{const _0x1b3563=_0x1bd4fd['getCommentThread'](_0x3802cd);this['stopListening'](_0x1b3563),this['archivedThreads']['has'](_0x1b3563)&&this['archivedThreads']['remove'](_0x1b3563);},{'priority':'highest'}),this['listenTo'](_0x29f4ec['collection'],'focus',(_0x1dedb5,_0x144959)=>{_0x144959['isVisible']||(_0x144959['isActive']=!0x0,_0x29f4ec['activate'](_0x144959));});}['_calculatePosition'](_0x4a25d2){const _0x172d36=[...this['archivedThreads']]['findIndex'](_0xaf3c7c=>_0xaf3c7c['archivedAt']<_0x4a25d2);return _0x172d36>-0x1?_0x172d36:this['archivedThreads']['length'];}}class a extends _0xeeaaab{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x119b5];}constructor(_0x83e22a){super(_0x83e22a),this['annotationViews']=new _0x1f1fea(),this['_pendingThreads']=[];}['init'](){const _0x189407=this['editor'],_0x35d22a=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x189407['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x1db6f3,!0x0)),_0x189407['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x41365b=this['_createCommentsArchiveButton'](_0x19b513);return _0x41365b['set']({'role':'menuitemcheckbox'}),_0x41365b;});const _0x46a47e=_0x189407['plugins']['get'](p),_0x109115=_0x189407['plugins']['get']('Annotations'),_0x3c2a1e=_0x189407['plugins']['get']('CommentsRepository');_0x46a47e['archivedThreads']['forEach'](_0x2ba123=>{this['_handleNewThread'](_0x2ba123);}),this['listenTo'](_0x46a47e['archivedThreads'],'add',(_0x532984,_0x5951f2)=>{this['_handleNewThread'](_0x5951f2);}),this['listenTo'](_0x109115['collection'],'add',(_0x56083d,_0x15d383)=>{const _0x2ba2bc=this['_pendingThreads']['find'](_0x530f78=>{const _0x552831=_0x3c2a1e['_threadToController']['get'](_0x530f78);return _0x552831&&_0x15d383['innerView']===_0x552831['view'];});if(_0x2ba2bc){const _0x1bad38=this['_calculatePosition'](_0x2ba2bc['archivedAt']);this['annotationViews']['add'](_0x15d383['view'],_0x1bad38),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ba2bc),0x1);}}),this['listenTo'](_0x46a47e['archivedThreads'],'remove',(_0x2f3f7b,_0xff1f43)=>{const _0x5f201b=_0x189407['config']['get']('collaboration.channelId');if(!_0x5f201b||_0xff1f43['channelId']===_0x5f201b){if(this['_pendingThreads']['includes'](_0xff1f43))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xff1f43),0x1);else{const _0x28679a=_0x3c2a1e['_threadToController']['get'](_0xff1f43),_0x569306=_0x109115['getByInnerView'](_0x28679a['view']);this['annotationViews']['remove'](_0x569306['view']),this['stopListening'](_0x569306['focusableElements']);}}}),this['listenTo'](_0x109115['collection'],'add',(_0x5482f4,_0x494291)=>{this['listenTo'](_0x494291,'escape',_0x35d22a);}),this['listenTo'](_0x109115['collection'],'remove',(_0x5f46ee,_0x2343b4)=>{this['stopListening'](_0x2343b4,'escape',_0x35d22a);});}['_handleNewThread'](_0x25cd3b){const _0x51078c=this['editor']['plugins']['get']('CommentsRepository'),_0x37fef5=this['editor']['plugins']['get']('Annotations'),_0xbc4760=this['editor']['config']['get']('collaboration.channelId');if(!_0xbc4760||_0x25cd3b['channelId']===_0xbc4760){const _0xf30281=_0x51078c['_threadToController']['get'](_0x25cd3b);if(!_0xf30281)return void this['_pendingThreads']['push'](_0x25cd3b);const _0x164aeb=this['_calculatePosition'](_0x25cd3b['archivedAt']),_0x4c2535=_0x37fef5['getByInnerView'](_0xf30281['view']);_0x4c2535['isVisible']&&_0x37fef5['_visibleAnnotations']['remove'](_0x4c2535),this['annotationViews']['add'](_0x4c2535['view'],_0x164aeb);}}['_calculatePosition'](_0x282b61){const _0x6e0978=this['editor']['config']['get']('collaboration.channelId'),_0x12ef5b=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x3e3717=>_0x3e3717['channelId']===_0x6e0978)['findIndex'](_0x1e22e6=>_0x1e22e6['archivedAt']<_0x282b61);return _0x12ef5b<0x0||_0x12ef5b>this['annotationViews']['length']?this['annotationViews']['length']:_0x12ef5b-0x1;}['_toggleDialog'](){const _0x36dd35=this['editor'],_0x41104f=_0x36dd35['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x36dd35['locale'],this['annotationViews'])),'commentsArchive'===_0x41104f['id']?_0x41104f['hide']():_0x41104f['show']({'id':'commentsArchive','title':N(_0x36dd35['locale'],'COMMENTS_ARCHIVE'),'icon':_0x50ad17,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x51e3c0['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x76a1b0,_0x526c72=!0x1){const _0x4e11f0=this['editor']['locale'],_0x2a1548=this['editor']['plugins']['get']('Dialog'),_0xf2b936=new _0x76a1b0(_0x4e11f0);return _0xf2b936['bind']('isEnabled')['to'](this,'isEnabled'),_0xf2b936['bind']('isOn')['to'](_0x2a1548,'id',_0x404beb=>'commentsArchive'===_0x404beb),_0xf2b936['set']({'label':N(_0x4e11f0,'COMMENTS_ARCHIVE'),'icon':_0x50ad17,'isToggleable':!0x0}),_0x526c72&&(_0xf2b936['tooltip']=!0x0),this['listenTo'](_0xf2b936,'execute',()=>this['_toggleDialog']()),_0xf2b936;}['_hideDialogOnAnnotationEscape']=_0x22d99f=>{const _0x16f7a1=_0x22d99f['source'];if(!this['annotationViews']['has'](_0x16f7a1['view']))return;const _0x14b9ce=this['editor']['plugins']['get']('Dialog');_0x14b9ce['isOpen']&&'commentsArchive'===_0x14b9ce['id']&&(_0x14b9ce['hide'](),_0x22d99f['stop']());};}class gi extends _0xeeaaab{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 _0x5b1ec6,ContextPlugin as _0x565db7,PendingActions as lt,Command as _0x3cd900,Plugin as _0x48f069,Context as _0x2180b4}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x289e5b,uid as _0x240cbb,KeystrokeHandler as jt,FocusTracker as _0x40a4de,diff as _0xf497c5,Collection as _0x434287,Rect as _0x13f83e,CKEditorError as _0x2b0648,first as _0x42cb1a,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x29767a,keyCodes as _0x28e2c2}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2c11a9,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0xe763ff,trimHtml as _0x345b0b,LateFocusDropdownButtonView as _0xb7ad09,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x4f5ef3}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x3fee7d}from'es-toolkit/compat';import{IconUndo as _0xa5ae79,IconCheck as _0x382b25,IconPencil as _0x4bc3db,IconRemoveComment as _0x4456f5,IconThreeVerticalDots as _0x42d978,IconAddComment as _0x33239b,IconCommentsArchive as _0xdc9f4a}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x4d1493,ButtonView as _0x5381c7,ViewCollection as _0x263ec4,createDropdown as _0x21272b,ListView as _0x224aca,focusChildOnDropdownOpen as _0x36fc61,ListItemView as _0x44d1f6,MenuBarMenuListItemButtonView as _0x39f9bd,BodyCollection as _0xc4bcbf,BalloonPanelView as _0x124ee5,ContextualBalloon as _0x248293,Dialog as _0xda48dc,DialogViewPosition as _0xfa45d9}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x450994}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x11f4fd}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x1b2e6c}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x289e5b(){['model'];['view'];constructor(_0x3ca9ea,_0x489157){super(),this['model']=_0x3ca9ea,this['model']['_isAttached']=!0x0,this['view']=_0x489157,this['listenTo'](_0x489157,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x489157,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x489157,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x489157,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x489157,'addComment',(_0x45cdad,_0x32159d)=>this['addComment'](_0x32159d)),this['listenTo'](_0x489157,'updateComment',(_0x32d963,_0x17ed08,_0x5b53cd)=>this['updateComment'](_0x17ed08,_0x5b53cd)),this['listenTo'](_0x489157,'removeComment',(_0x4ab653,_0x5212a5)=>this['removeComment'](_0x5212a5));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x493848){this['model']['addComment']({'content':_0x493848,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3c9874,_0x14c4cc){this['model']['getComment'](_0x3c9874)['update']({'content':_0x14c4cc});}['removeComment'](_0x509286){this['model']['getComment'](_0x509286)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x15849c,_0x1c0306,_0x28e29f){const t=_0x15849c['t'];switch(_0x1c0306){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'},_0x28e29f);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'},_0x28e29f);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'},_0x28e29f);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'},_0x28e29f);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x28e29f);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'},_0x28e29f);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'},_0x28e29f);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'},_0x28e29f);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Vt extends Xt{['main'];['editable'];constructor(_0x1fe2cd,_0x35851b){super(_0x1fe2cd);const _0x5cc6c9=_0x240cbb();this['main']=this['createCollection'](),this['editable']=new $t(_0x1fe2cd,_0x35851b,void 0x0,{'label':()=>N(_0x1fe2cd,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1fe2cd['uiLanguageDirection'],'lang':_0x1fe2cd['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5cc6c9},'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 Ft extends Ut{['view'];constructor(_0x1831ce){super(_0x1831ce),this['view']=new Vt(_0x1831ce['locale'],_0x1831ce['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x75e411=this['editor']['editing']['view'],_0x40e74f=this['view']['editable'],_0x4a55d2=_0x75e411['document']['getRoot']();_0x40e74f['name']=_0x4a55d2['rootName'],this['view']['render']();const _0x218a98=_0x40e74f['element'];this['setEditableElement'](_0x40e74f['name'],_0x218a98),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x75e411['attachDomRoot'](_0x218a98),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x289e5b(_0x5b1ec6){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x26d643={}){function _0x1dd628(_0x51b8ea){return _0x51b8ea['map'](_0x6fa8dc=>String['fromCharCode'](_0x6fa8dc))['join']('');}(_0x26d643=Object['assign']({},_0x26d643))['plugins']||(_0x26d643['plugins']=Rt['defaultPlugins']),super(_0x26d643),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[_0x1dd628([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x1dd628([0x76,0x69,0x65,0x77])][_0x1dd628([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x1dd628([0x61,0x75,0x74,0x6f]),this[_0x1dd628([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x1dd628([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x1dd628([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x1dd628([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x1dd628([0x6f,0x6b])});}['create'](){const _0x17ad3e=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x17ad3e))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x588290=>{const _0x4af6d3=this['model']['document']['getRoot'](),_0x479b0f=_0x4af6d3&&_0x4af6d3['getChild'](_0x4af6d3['childCount']-0x1);_0x588290['setSelection'](_0x479b0f,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x313003=this['editing']['view'],_0x2248fb=_0x313003['document']['getRoot'](),_0x2e6c35=_0x2248fb['getChild'](0x0);_0x2248fb['childCount']>0x1||!_0x2e6c35||'p'!=_0x2e6c35['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x313003,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2e6c35['placeholder']=this['placeholder']),St({'view':_0x313003,'element':_0x2e6c35,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2e6c35);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x343e6c,_0x21f0d7={}){super(_0x343e6c),this['editor']=null,this['_editorConfig']=_0x21f0d7,this['set']('value',_0x21f0d7['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x343e6c,'Reply...')),this['set']('submitLabel',N(_0x343e6c,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x40a4de(),this['focusCycler']=new _0x4d1493({'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',(_0x304157,_0x20569f)=>{this['cancelButtonView']['fire']('execute'),_0x20569f();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2aaad2,_0x37f4f8)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x37f4f8());}),this['on']('submit',(_0x5e6cbc,_0x313602)=>{_0x313602['length']>0xfde8?(alert(N(_0x343e6c,'TOO_LONG_COMMENT_ALERT',[_0x313602['length'],0xfde8])),_0x5e6cbc['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 _0x43090c=this['editor'];this['element']['insertBefore'](_0x43090c['ui']['element'],this['element']['firstChild']),_0x43090c['model']['document']['on']('change',()=>this['value']=_0x43090c['getData']()),_0x43090c['bind']('placeholder')['to'](this),this['focusables']['add'](_0x43090c['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x45b2f8){-0x1===_0x45b2f8?(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:_0x327f6b}=this,_0x2d7787=new _0x5381c7(_0x327f6b);return _0x2d7787['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2d7787['withText']=!0x0,_0x2d7787['bind']('label')['to'](this,'submitLabel'),_0x2d7787['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2d7787['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5d51ef,_0x5b2c59)=>!_0x5b2c59&&!!_0x5d51ef['trim']()),_0x2d7787;}['_createCancelButton'](){const {locale:_0x1bd3a8}=this,_0x8887d5=new _0x5381c7(_0x1bd3a8);return _0x8887d5['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x8887d5['label']=N(_0x1bd3a8,'Cancel'),_0x8887d5['withText']=!0x0,_0x8887d5['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x8887d5;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x28f65e=>{this['focusTracker']['add'](_0x28f65e['element']);}),this['focusables']['on']('change',(_0x23ed6f,_0x2dcd3e)=>{for(const _0x52d274 of Array['from'](_0x2dcd3e['added'])['reverse']())this['focusTracker']['add'](_0x52d274['element']);});}}class ie extends kt{constructor(_0x2be280,_0x5da49b,_0xdd506e){super(_0x2be280),this['commentInputView']=new os(_0x2be280,_0xdd506e),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x14d7d1,_0x32cc24)=>_0x14d7d1||!!_0x32cc24),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 _0x2c11a9(_0x2be280,_0x5da49b),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'](_0x4fb4f5){this['commentInputView']['focus'](_0x4fb4f5);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xb6a69c,_0x2ce9f1)=>{const {submitButtonView:_0x498ea2,cancelButtonView:_0x1a0a85,editor:_0x91f40a}=this['commentInputView'];[_0x498ea2['element'],_0x1a0a85['element'],_0x91f40a?_0x91f40a['editing']['view']['getDomRoot']():null]['filter'](_0x1a3426=>_0x1a3426)['some'](_0x422eee=>_0x422eee['contains'](_0x2ce9f1['target']))||(this['focus'](),_0x2ce9f1['preventDefault']());});}}class rs extends kt{constructor(_0x32f2da){super(_0x32f2da);const _0x3107e7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3107e7['to']('count',_0x35ef44=>N(_0x32f2da,'NUMBER_OF_COMMENTS',_0x35ef44))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x31f16a,_0x2a8447,_0x23a639){super(_0x31f16a);const _0x20f487=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2a8447['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2a8447,this['_config']=_0x23a639,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x40a4de(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4d1493({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x115e25=>this['commentViews']['map'](_0x446845=>_0x446845['element'])['includes'](_0x115e25['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x31f16a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x239fe7=>_0x239fe7-this['_config']['maxCommentsWhenCollapsed']);for(const _0x260b07 of _0x2a8447['comments'])this['_handleNewCommentModel'](_0x260b07);this['_handleInfoComment'](),this['listenTo'](_0x2a8447['comments'],'add',(_0x1e37cb,_0x5e0941)=>{const _0x4d7da3=this['_calculatePosition'](_0x5e0941);this['length']++,this['_handleNewCommentModel'](_0x5e0941,_0x4d7da3),this['refreshVisibleViews']();}),this['listenTo'](_0x2a8447['comments'],'remove',(_0x21efc6,_0x2948be)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2948be),this['refreshVisibleViews']();}),this['listenTo'](_0x2a8447,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2a8447,'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',_0x20f487['if']('length','ck-hidden',_0xf3387f=>!_0xf3387f)],'aria-label':N(_0x31f16a,'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'](_0x10b494){-0x1===_0x10b494?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4fe5d3 of this['commentViews'])_0x4fe5d3['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3f4076,_0x3f4b72){const _0x3effc4=new this['_config']['CommentView'](this['locale'],_0x3f4076,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3effc4['viewUid']=_0x3f4076['id'],_0x3effc4['delegate']('removeComment')['to'](this),_0x3effc4['delegate']('updateComment')['to'](this),_0x3effc4['delegate']('resolveCommentThread')['to'](this),_0x3effc4['delegate']('editorReady')['to'](this),_0x3effc4['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3effc4,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3effc4,_0x3f4b72);}['_calculatePosition'](_0x1d4770){const _0x26f40f=this['_model']['_findOptimalIndex'](_0x1d4770);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1d4770['authoredAt']?_0x26f40f-0x1:_0x26f40f:_0x26f40f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x378693={'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'],_0x378693,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x378693));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x526881){const _0x5ab622=this['commentViews']['remove'](_0x526881['id']);this['stopListening'](_0x5ab622),_0x5ab622['isEditMode']&&this['_updateHasDirtyComment'](),_0x5ab622['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x347082=>_0x347082['isEditMode']);}['_rearrangeCollapse'](){const _0x47ba2b=function(_0x57cc45){const _0x45a19d=new _0x434287();for(const _0x15ec43 of _0x57cc45)_0x45a19d['add'](_0x15ec43);return _0x45a19d;}(this['commentViews']),_0x5d8e9d=this['_collapsedCommentsView']['count'];for(let _0x95541e=0x1;_0x95541e<=_0x5d8e9d;_0x95541e++)_0x47ba2b['remove'](0x1);for(const _0x13ab54 of _0x47ba2b)_0x13ab54['collapse']();_0x5d8e9d>0x0&&_0x47ba2b['add'](this['_collapsedCommentsView'],0x1),ns(_0xf497c5(Array['from'](this['visibleViews']),Array['from'](_0x47ba2b)),this['visibleViews'],_0x47ba2b);}['_rearrangeExpand'](){ns(_0xf497c5(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x187129 of this['visibleViews'])_0x187129['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0xb5d4d9=>{this['focusTracker']['add'](_0xb5d4d9['element']),this['keystrokes']['listenTo'](_0xb5d4d9['element']);}),this['commentViews']['on']('change',(_0x1dec82,_0x28c8c8)=>{for(const _0x22f475 of _0x28c8c8['removed'])this['focusTracker']['remove'](_0x22f475['element']),this['keystrokes']['stopListening'](_0x22f475['element']);for(const _0x343c45 of Array['from'](_0x28c8c8['added'])['reverse']())this['focusTracker']['add'](_0x343c45['element']),this['keystrokes']['listenTo'](_0x343c45['element']);});}}function ns(_0x4ac87a,_0x5b24d4,_0x4d07e0){let _0x12bb2e=0x0;for(const _0x5c0ebb of _0x4ac87a)switch(_0x5c0ebb){case'insert':_0x5b24d4['add'](_0x4d07e0['get'](_0x12bb2e),_0x12bb2e),_0x12bb2e++;break;case'delete':_0x5b24d4['remove'](_0x12bb2e);break;case'equal':_0x12bb2e++;}}class oe extends kt{constructor(_0x467fe7){super(_0x467fe7);const _0x1a9d13=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1a9d13['to']('contextValue',_0x2eaf16=>N(_0x467fe7,'THREAD_CONTEXT_LABEL',_0x2eaf16)),'tabindex':-0x1},'children':[{'text':_0x1a9d13['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x265487,_0xbe4d06){super(_0x265487);const _0x1959e6=this['bindTemplate'];this['_model']=_0xbe4d06,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x40a4de(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4d1493({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x147f82=>!!_0x147f82),this['bind']('contextValue')['to'](this['_model'],'context',_0x41b027=>_0x41b027&&_0x41b027['value']?this['_trimContextValue'](_0x41b027['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',_0x1959e6['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 _0xc42e4a=new _0x5381c7(this['locale']);return _0xc42e4a['label']=N(this['locale'],'Reopen'),_0xc42e4a['tooltip']=N(this['locale'],'Reopen'),_0xc42e4a['icon']=_0xa5ae79,_0xc42e4a['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x16319f=>!_0x16319f),_0xc42e4a['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x384539,_0x833cfd)=>_0x384539&&_0x833cfd),_0xc42e4a['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0xc42e4a;}['_trimContextValue'](_0x2550a5){if(_0x2550a5['length']<0x96)return _0x2550a5;const _0x42567e=_0x2550a5['lastIndexOf']('\x20',0x93);return _0x2550a5['substring'](0x0,_0x42567e>-0x1?_0x42567e:0x93)+'...';}['_attachContextActions'](){const _0x371ed7=this['element']['querySelector']('.ck-context'),_0x58f570=_0x371ed7['querySelector']('.ck-context__value');this['listenTo'](_0x371ed7,'mouseenter',()=>{_0x58f570['offsetWidth']<_0x58f570['scrollWidth']&&_0x371ed7['classList']['add']('overlay');}),this['listenTo'](_0x371ed7,'mouseleave',()=>{_0x371ed7['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xf602c8 of this['focusables'])this['focusTracker']['add'](_0xf602c8['element']),this['keystrokes']['listenTo'](_0xf602c8['element']);}['_createContextView'](){const _0x291065=new oe(this['locale']);return _0x291065['bind']('contextValue')['to'](this),_0x291065;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x16d0bf,_0x1a05aa,_0x117b71,_0xe5d179){super(_0x16d0bf),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1a05aa,this['_localUser']=_0x117b71,this['_config']=_0xe5d179,this['commentThreadHeaderView']=new Yt(_0x16d0bf,_0x1a05aa),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x16d0bf,N(_0x16d0bf,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x16d0bf,_0x1a05aa,Object['assign']({'CommentView':this['_config']['CommentView']},_0xe5d179)),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',(_0x1dcb11,_0x679894)=>_0x1dcb11||!!_0x679894),this['bind']('isUnlinked')['to'](_0x1a05aa,'unlinkedAt',_0xa74c5=>!!_0xa74c5),this['bind']('ariaLabel')['to'](this,'length',_0x1ab902=>{const _0x421db8=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x1ab902,_0x421db8]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x40a4de(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4d1493({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4f0404=>_0x4f0404['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 _0x4de158=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x192e8f=_0x4de158['commentInputView'];return _0x4de158['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x192e8f,'value',(_0x10292d,_0x957866,_0x30dfe2,_0x29da2d,_0x2afeaf)=>!!_0x2afeaf||!!_0x29da2d&&_0x30dfe2&&!_0x957866||_0x10292d&&_0x30dfe2&&!_0x957866),_0x192e8f['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5f4cae,_0x52854c,_0x5dd0ae)=>{let _0x337491;return _0x337491=_0x5dd0ae&&_0x52854c?'Reply\x20to\x20reopen\x20discussion...':_0x5f4cae?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x337491);}),_0x192e8f['bind']('submitLabel')['to'](this,'length',_0x25e344=>N(this['locale'],_0x25e344?'Reply':'Comment')),_0x192e8f['on']('submit',(_0x77009d,_0xc05a75)=>{this['fire']('addComment',_0xc05a75),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x192e8f['on']('cancel',()=>{this['focus']();}),_0x192e8f['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x192e8f['on']('cancel',_0x196b56=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x196b56['stop']());}),this['on']('change:isActive',(_0x1672f0,_0x5db92c,_0x1ec7de)=>{_0x1ec7de||this['length']||_0x192e8f['value']||this['fire']('removeCommentThread');}),_0x4de158;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1552af,_0x3d15eb,_0x99b445,_0x46ebd3){super(_0x1552af,_0x3d15eb,_0x99b445,_0x46ebd3),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1552af,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x5ba936,_0x3caa9b,_0x2031be)=>{_0x2031be||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5bb470,_0x1e02a2,_0x27d7d7)=>{_0x27d7d7&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x504aa9=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x504aa9['if']('isActive','ck-thread--active'),_0x504aa9['if']('isUnlinked','ck-thread--unlinked'),_0x504aa9['if']('isConfirm','ck-thread--remove-confirmation'),_0x504aa9['to']('actionIndicator',_0x147bd2=>_0x147bd2?'ck-thread--'+_0x147bd2:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x504aa9['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 _0x196ca3 of this['commentsListView']['commentViews'])_0x196ca3['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3edde0}=this,_0x3389c1=this['commentsListView']['commentViews']['get'](0x0);_0x3389c1===this['_boundFirstCommentView']||_0x3389c1['isSystemComment']||(this['_boundFirstCommentView']=_0x3389c1,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x3389c1,'actionIndicator',_0x529b46=>'remove'===_0x529b46?'remove':null),_0x3389c1['placeholder']=N(_0x3edde0,'Write\x20a\x20comment...'),_0x3389c1['removeButton']['on']('execute',_0x465948=>{_0x465948['stop'](),this['showConfirm'](N(_0x3edde0,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x3389c1['focus']();}),_0x3389c1['actionBar']['add'](this['resolveButton'],0x0),_0x3389c1['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x3e8dc2=new _0xe763ff(this['locale']);return _0x3e8dc2['label']=N(this['locale'],'Resolve'),_0x3e8dc2['tooltip']=N(this['locale'],'Resolve'),_0x3e8dc2['icon']=_0x382b25,_0x3e8dc2['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x3e8dc2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x311e2b=>!_0x311e2b),_0x3e8dc2['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2a96ee,_0x20e360)=>_0x2a96ee&&!_0x20e360),_0x3e8dc2['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x3e8dc2;}['_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 es extends kt{constructor(_0x7a6d64){super(_0x7a6d64),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x459271,_0xa91d06,_0x141548)=>{this['element']['innerHTML']=_0x141548;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x51d360,_0x2a927c,_0x666f5d){super(_0x51d360),this['_model']=_0x2a927c,this['_config']=_0x666f5d,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x2a927c,'content',_0x2a927c,'authoredAt',(_0x592cf6,_0x3855bf)=>N(_0x51d360,'COMMENT_ARIA_LABEL',[_0x2a927c['author']['name'],_0x666f5d['formatDateTime'](_0x3855bf),new DOMParser()['parseFromString'](_0x592cf6,'text/html')['body']['textContent'],_0x2a927c['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x51d360,N(_0x51d360,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x263ec4(),this['focusTracker']=new _0x40a4de(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4d1493({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xc88746=>_0xc88746['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 _0x128d1e=new es(this['locale']);return _0x128d1e['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x548f04,_0xbc1f6c)=>_0xbc1f6c?_0x345b0b(_0x548f04,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x548f04),_0x128d1e;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x14d26c=new os(this['locale'],this['_config']['editorConfig']);return _0x14d26c['value']=this['_model']['content'],_0x14d26c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x14d26c['submitLabel']=N(this['locale'],'Save'),_0x14d26c['on']('submit',(_0x51e718,_0x4e4ab8)=>{this['fire']('updateComment',this['_model']['id'],_0x4e4ab8),this['switchToDisplayMode'](),this['focus']();}),_0x14d26c['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x14d26c['once']('editorReady',()=>{_0x14d26c['focus']();}),_0x14d26c['createEditor'](),_0x14d26c['delegate']('editorReady')['to'](this),_0x14d26c['delegate']('editorDestroyed')['to'](this),_0x14d26c;}['_setupKeyboardNavigation'](){const _0x2151c5=this['element'];this['keystrokes']['listenTo'](_0x2151c5);for(const _0xc6f61 of this['focusables'])this['focusTracker']['add'](_0xc6f61['element']),this['keystrokes']['listenTo'](_0xc6f61['element']);this['focusables']['on']('change',(_0x564e18,_0x1c5899)=>{for(const _0x511f13 of _0x1c5899['removed'])this['focusTracker']['remove'](_0x511f13['element']),this['keystrokes']['stopListening'](_0x511f13['element']);for(const _0x3a1952 of _0x1c5899['added'])this['focusTracker']['add'](_0x3a1952['element']),this['keystrokes']['listenTo'](_0x3a1952['element']);}),this['keystrokes']['set']('enter',(_0x5d724d,_0x129a28)=>{_0x2151c5===_0x5d724d['target']&&(this['focusCycler']['focusFirst'](),_0x129a28());}),this['keystrokes']['set']('esc',(_0x5336f9,_0x5ee1ac)=>{_0x2151c5!==_0x5336f9['target']&&(this['focus'](),_0x5ee1ac());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x45c268,_0xc216d6,_0x5a7bca){super(_0x45c268,_0xc216d6,_0x5a7bca),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x45c268,'Reply...')),this['bind']('authoredAt')['to'](_0xc216d6),this['bind']('resolvedAt')['to'](_0xc216d6),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 _0x2c11a9(_0x45c268,_0xc216d6['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xc216d6,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x11f647=this['bindTemplate'],_0x4f3d1e=[{'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':_0x11f647['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x11f647['to']('authoredAt',_0x3ecc8d=>this['_config']['formatDateTime'](_0x3ecc8d))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x11f647['if']('isEditMode','ck-comment__actions--hidden'),_0x11f647['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']&&_0x4f3d1e['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x11f647['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x11f647['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x11f647['if']('isEditMode','ck-comment--edit'),_0x11f647['if']('isSystemComment','ck-comment--info'),_0x11f647['to']('actionIndicator',_0x469e35=>_0x469e35?'ck-comment--'+_0x469e35:'')],'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':_0x4f3d1e}]}]};}['_createEditButton'](){const _0x43438c=new _0x5381c7(this['locale']);return _0x43438c['label']=N(this['locale'],'Edit'),_0x43438c['icon']=_0x4bc3db,_0x43438c['withText']=!0x0,_0x43438c['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x43438c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x379587=>!_0x379587),_0x43438c['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x43438c['on']('execute',()=>this['switchToEditMode']()),_0x43438c;}['_createRemoveButton'](){const _0x185aff=new _0x5381c7(this['locale']);return _0x185aff['label']=N(this['locale'],'Remove'),_0x185aff['icon']=_0x4456f5,_0x185aff['withText']=!0x0,_0x185aff['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x185aff['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2b749d=>!_0x2b749d),_0x185aff['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x185aff['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x185aff;}['_createDropdown'](){const _0x1bcba7=_0x21272b(this['locale'],_0xb7ad09),_0x1e6710=_0x1bcba7['panelView']['children'],_0x6159c3=new _0x224aca(this['locale']),_0x2110b8=_0x1bcba7['bindTemplate'];_0x36fc61(_0x1bcba7,()=>this['items']['find'](_0x4420bd=>_0x4420bd['isVisible'])),_0x1bcba7['extendTemplate']({'attributes':{'class':[_0x2110b8['if']('isVisible','ck-hidden',_0x537733=>!_0x537733)]}});const _0x26d6dc=(_0x23d787,_0x3d01b5=-0x1)=>{const _0x2ef3ba=new _0x44d1f6(this['locale']);_0x2ef3ba['children']['add'](_0x23d787);const _0x5518b1=_0x3d01b5>-0x1?_0x3d01b5:_0x6159c3['items']['length'];_0x6159c3['items']['add'](_0x2ef3ba,_0x5518b1);const _0x4d7dab=Array['from'](this['items']);_0x1bcba7['unbind']('isEnabled','isVisible'),_0x1bcba7['bind']('isEnabled')['toMany'](_0x4d7dab,'isEnabled',(..._0x492b5f)=>_0x492b5f['some'](_0xa8b1df=>_0xa8b1df)),_0x1bcba7['bind']('isVisible')['toMany'](_0x4d7dab,'isVisible',(..._0x12a89c)=>_0x12a89c['some'](_0x209ef2=>_0x209ef2));};_0x1bcba7['panelPosition']='sw',_0x1bcba7['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x42d978});for(const _0x3aefab of this['items'])_0x26d6dc(_0x3aefab);return _0x1e6710['add'](_0x6159c3),_0x1bcba7['listenTo'](this['items'],'add',(_0x4eea0d,_0x3fa4af,_0x19b1fe)=>{_0x26d6dc(_0x3fa4af,_0x19b1fe);}),_0x1bcba7['listenTo'](this['items'],'remove',(_0x1a4b40,_0x2757e7,_0x3309b6)=>{_0x6159c3['items']['remove'](_0x3309b6);}),_0x1bcba7;}['_attachActions'](_0x31f76d,_0x1b4ab3){const _0x198c48=_0x31f76d&&_0x31f76d['element'];_0x198c48&&(this['listenTo'](_0x198c48,'mouseenter',()=>this['actionIndicator']=_0x1b4ab3),this['listenTo'](_0x198c48,'focus',()=>this['actionIndicator']=_0x1b4ab3),this['listenTo'](_0x198c48,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x198c48,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x48585f=super['_createCommentInputView']();return _0x48585f['bind']('placeholder')['to'](this),_0x48585f;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x146844){const _0x28dbad=Dt(_0x146844,0x1e),_0xd2ddb8=new MutationObserver(_0x17c77c=>{for(const _0xf69d47 of _0x17c77c)('attributes'==_0xf69d47['type']&&'class'==_0xf69d47['attributeName']||'childList'==_0xf69d47['type']||'characterData'==_0xf69d47['type'])&&_0x28dbad();});return{'attach'(_0x431a87){_0xd2ddb8['observe'](_0x431a87,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0xd2ddb8['disconnect'](),_0x28dbad['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x219531,_0x5b0bf8){super(_0x219531),this['id']=_0x240cbb(),this['focusTracker']=new _0x40a4de(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x3886ec,_0x4ba06b)=>this['fire']('Esc',_0x4ba06b)),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'](_0x5b0bf8),this['mainView']=_0x5b0bf8;const _0xb5b683=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0xb5b683['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 _0x599efd=this['element']['clientHeight'];_0x599efd&&(this['height']=_0x599efd);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x289e5b(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x164ab8,target:_0x5e8381,type:_0x25efd6,isVisible:_0x2c7109=!0x0}){super(),this['view']=_0x164ab8,this['view']['element']||this['view']['render'](),this['_type']=_0x25efd6,this['_target']=_0x5e8381,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x434287([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0xf7acce,_0x5e5224)=>{this['view']['focusTracker']['add'](_0x5e5224);}),this['focusableElements']['on']('remove',(_0x240f22,_0x5f5284)=>{this['view']['focusTracker']['remove'](_0x5f5284);}),this['set']('isVisible',_0x2c7109);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x394d30=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x394d30),_0x394d30;}get['targetRect'](){const _0x5b1a58=this['target'];if(null===_0x5b1a58)return null;if(_0x5b1a58 instanceof _0x13f83e)return _0x5b1a58;const _0x637db8=_0x5b1a58['filter'](_0x8d6666=>function(_0x4b36b3){const _0x5003bd=_0x4b36b3['offsetParent'];if(_0x5003bd)return!0x0;const _0x3a92fd=_0x4b36b3['getClientRects']()['item'](0x0);return!!_0x3a92fd;}(_0x8d6666));return 0x0===_0x637db8['length']?null:new _0x13f83e(_0x637db8[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x55bc8f){this['view']['isActive']=_0x55bc8f,this['view']['mainView']['isActive']=_0x55bc8f;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3ee050){if(!(null===_0x3ee050||_0x3ee050 instanceof _0x13f83e||Array['isArray'](_0x3ee050)&&_0x3ee050['every'](_0x4643b2=>fi(_0x4643b2))))throw new _0x2b0648('annotation-invalid-target',null,{'target':_0x3ee050});}['_getNormalizedTarget'](){const _0x20a410='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x20a410)?[_0x20a410]:_0x20a410;}}function fi(_0x1090d9){return null!==_0x1090d9&&'object'==typeof _0x1090d9&&'nodeType'in _0x1090d9&&0x1===_0x1090d9['nodeType'];}class S extends _0x434287{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4bc657=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x40a4de(),this['_focusTracker']['on']('change:isFocused',(_0x37d6ec,_0x32d37a,_0x418b72)=>{_0x418b72||this['fire']('blur');});for(const _0x578dae of _0x4bc657)this['add'](_0x578dae);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2aa298){if(this['has'](_0x2aa298))throw new _0x2b0648('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2aa298['innerView'],_0x2aa298),this['_viewToAnnotation']['set'](_0x2aa298['view'],_0x2aa298);for(const _0x584ea2 of _0x2aa298['focusableElements'])this['_focusTracker']['add'](_0x584ea2);this['listenTo'](_0x2aa298['focusableElements'],'add',(_0x19a0ef,_0x316317)=>{this['_focusTracker']['add'](_0x316317);}),this['listenTo'](_0x2aa298['focusableElements'],'remove',(_0x572f39,_0x3ee7b8)=>{this['_focusTracker']['remove'](_0x3ee7b8);}),this['listenTo'](_0x2aa298['view']['focusTracker'],'change:isFocused',(_0x2ade15,_0x3a3ac2,_0x4243b3)=>{_0x4243b3&&this['fire']('focus',_0x2aa298);}),_0x2aa298['updateTargetRect']();const _0x3e7850=this['_getOrderInContent'](_0x2aa298['view']['targetRect']);return super['add'](_0x2aa298,_0x3e7850);}['remove'](_0x54fd9f){if(!this['has'](_0x54fd9f))throw new _0x2b0648('annotationcollection-not-existing-item',null);this['stopListening'](_0x54fd9f['view']['focusTracker']),this['stopListening'](_0x54fd9f['focusableElements']);for(const _0x174953 of _0x54fd9f['focusableElements'])this['_focusTracker']['remove'](_0x174953);return this['_viewToAnnotation']['delete'](_0x54fd9f['view']),this['_innerViewToAnnotation']['delete'](_0x54fd9f['innerView']),super['remove'](_0x54fd9f);}['getByInnerView'](_0x455c37){return this['_innerViewToAnnotation']['get'](_0x455c37);}['getByView'](_0x331cec){return this['_viewToAnnotation']['get'](_0x331cec);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0xb32f99 of this)_0xb32f99['updateTargetRect']();this['_sort']();}['_sort'](){const _0x74c00f=Array['from'](this)['sort']((_0x3988a4,_0x273860)=>w(_0x3988a4['view']['targetRect'],_0x273860['view']['targetRect']));for(let _0x384aaa=_0x74c00f['length']-0x1;_0x384aaa>0x0;_0x384aaa--){const _0x1baea4=_0x74c00f[_0x384aaa];_0x384aaa!==this['getIndex'](_0x1baea4)&&(this['remove'](_0x1baea4),this['add'](_0x1baea4));}}['_getOrderInContent'](_0x5d82a6){let _0x28f0d3=0x0;if(!_0x5d82a6)return this['length'];for(const _0x4dab93 of this){const _0x16f105=_0x4dab93['view']['targetRect'];if(_0x16f105){if(w(_0x5d82a6,_0x16f105)<0x0)return _0x28f0d3;_0x28f0d3++;}}return _0x28f0d3;}}function v({source:_0x4e08fd,target:_0x110f27,filter:_0x5e46fe}){for(const _0x3de832 of _0x4e08fd)_0x5e46fe(_0x3de832)&&_0x110f27['add'](_0x3de832);_0x110f27['listenTo'](_0x4e08fd,'add',(_0x233233,_0x53d88c)=>{_0x5e46fe(_0x53d88c)&&_0x110f27['add'](_0x53d88c);}),_0x110f27['listenTo'](_0x4e08fd,'remove',(_0x4eedfe,_0x52b3f8)=>{_0x110f27['has'](_0x52b3f8)&&_0x110f27['remove'](_0x52b3f8);});}function w(_0x3833df,_0x2d0589){if(null===_0x3833df&&null===_0x2d0589)return 0x0;if(null===_0x3833df)return-0x1;if(null===_0x2d0589)return 0x1;const _0x30864d=_0x3833df['top']-_0x2d0589['top'];return 0x0==_0x30864d?_0x3833df['left']-_0x2d0589['left']:_0x30864d;}class y extends _0x565db7{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x40b4f8){if(super(_0x40b4f8),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x40b4f8 instanceof _0x5b1ec6){const _0x37bbe3=_0x40b4f8['locale'];_0x40b4f8['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x37bbe3,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x37bbe3,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x37bbe3,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x37bbe3,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x37bbe3,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x37bbe3,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x37bbe3,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2b108d){this['collection']['add'](_0x2b108d);}['remove'](_0x481964){this['collection']['remove'](_0x481964),_0x481964['destroy']();}['refreshVisibility'](){for(const _0x4813f5 of this['collection'])_0x4813f5['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x145d2c){return this['collection']['getByInnerView'](_0x145d2c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x27d6d6 of this['collection'])_0x27d6d6['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x21b2f2){this['fire']('_activateAnnotation',_0x21b2f2);}['createAnnotation'](_0x17498e){return new T(_0x17498e);}['createAnnotationView'](_0xc9a3be,_0x229faa){return new E(_0xc9a3be,_0x229faa);}['_addActiveAnnotation'](_0x1e6f2a){const _0x2656ad=new Set(this['activeAnnotations']);_0x2656ad['add'](_0x1e6f2a),this['activeAnnotations']=_0x2656ad;}['_removeActiveAnnotation'](_0x3a8533){const _0x2b6254=new Set(this['activeAnnotations']);_0x2b6254['delete'](_0x3a8533),this['activeAnnotations']=_0x2b6254;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3d7f5d=this['collection'],_0x30a67b=this['_visibleAnnotations'];function _0xcd5a8d(_0x5b7119){const _0x352ad9=_0x5b7119['source'];_0x352ad9['isVisible']&&!_0x30a67b['has'](_0x352ad9)?_0x30a67b['add'](_0x352ad9):!_0x352ad9['isVisible']&&_0x30a67b['has'](_0x352ad9)&&_0x30a67b['remove'](_0x352ad9),_0x352ad9['view']['focusTracker']['remove'](_0x352ad9['view']['element']),_0x352ad9['view']['focusTracker']['add'](_0x352ad9['view']['element']);}this['listenTo'](_0x3d7f5d,'add',(_0xe0a638,_0x2adbc4)=>{_0x2adbc4['isVisible']&&_0x30a67b['add'](_0x2adbc4),this['listenTo'](_0x2adbc4,'change:isVisible',_0xcd5a8d);}),this['listenTo'](_0x3d7f5d,'remove',(_0x5898ac,_0x3a4011)=>{_0x30a67b['has'](_0x3a4011)&&_0x30a67b['remove'](_0x3a4011),this['stopListening'](_0x3a4011,'change:isVisible',_0xcd5a8d);});}['_setupEnterAnnotationKeystroke'](){const _0x49a0c7=_0x13e4fd=>{_0x13e4fd['on']('ready',()=>{_0x13e4fd['keystrokes']['set'](_0x11f4fd,(_0x5ca487,_0x3e8a27)=>{const _0x3975a0=_0x42cb1a(this['activeAnnotations']['values']());_0x3975a0&&(_0x3975a0['view']['focus'](),_0x3e8a27());});});};this['context']instanceof _0x5b1ec6?_0x49a0c7(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x433080,_0x523b1c)=>{_0x49a0c7(_0x523b1c);});}['_setupEscapeAnnotationHandling'](){const _0x34077d=_0x44d548=>{const _0x19e68d=_0x44d548['source'],_0x34ffd7=[];let _0x1daa75;if(Array['isArray'](_0x19e68d['target'])){_0x1daa75=_0x19e68d['target'][0x0],this['context']instanceof _0x5b1ec6?_0x34ffd7['push'](this['context']):this['context']['editors']&&_0x34ffd7['push'](...this['context']['editors']);for(const _0xeacc5d of _0x34ffd7)for(const _0x166d99 of _0xeacc5d['editing']['view']['domRoots']['values']())if(_0x166d99['contains'](_0x1daa75))return void _0xeacc5d['editing']['view']['focus']();_0x1daa75['focus']();}};this['listenTo'](this['collection'],'add',(_0x5353e0,_0x110403)=>{this['listenTo'](_0x110403,'escape',_0x34077d,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5c6732,_0x431ff9)=>{this['stopListening'](_0x431ff9,'escape',_0x34077d);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x565db7{['_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(_0x1b449b){super(_0x1b449b),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3c4259=this['context']['config'];_0x3c4259['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3c4259['define']('comments.maxThreadTotalWeight',0x1f4),_0x3c4259['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3c4259['define']('comments.CommentThreadView',gt),_0x3c4259['define']('comments.CommentView',Tt),_0x3c4259['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5671b3=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x1f25a5,_0x12f295)=>this['_addCommentThread'](_0x12f295)),this['on']('submitCommentThread',(_0x563f52,_0x9fbf1b)=>this['_submitCommentThread'](_0x9fbf1b)),this['on']('resolveCommentThread',(_0x51ac1d,_0x122f92)=>this['_resolveCommentThread'](_0x122f92)),this['on']('resolveCommentThread',(_0x3afe3d,_0x346df3)=>this['_updateActiveAnnotation'](_0x346df3),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5db6f7,_0x30137e)=>this['_reopenCommentThread'](_0x30137e)),this['on']('reopenCommentThread',(_0x2bcd1f,_0x43ebbd)=>this['_updateActiveAnnotation'](_0x43ebbd),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x317fc0,_0x133bc1)=>this['_removeCommentThread'](_0x133bc1)),this['on']('updateCommentThread',(_0x534e0e,_0x2c08d9)=>this['_updateCommentThread'](_0x2c08d9)),this['on']('updateCommentThread',(_0xda300f,_0x1f460a)=>this['_updateActiveAnnotation'](_0x1f460a),{'priority':'lowest'}),this['on']('addComment',(_0x4df6e6,_0x4cc09d)=>this['_addComment'](_0x4cc09d)),this['on']('updateComment',(_0xf9b04b,_0xaff045)=>this['_updateComment'](_0xaff045)),this['on']('removeComment',(_0x3951ac,_0x906a55)=>this['_removeComment'](_0x906a55)),this['on']('addComment',(_0x10d759,{threadId:_0x496f4a,isFromAdapter:_0x4375e5})=>{if(_0x4375e5)return;const _0x6f970e=this['getCommentThread'](_0x496f4a),_0x4cd2dc=_0x6f970e&&this['_threadToController']['get'](_0x6f970e);_0x4cd2dc&&_0x4cd2dc['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5671b3,'change:activeAnnotations',(_0x30fce3,_0x5a8599,_0x24d32d)=>{const _0x5f2f5c=Array['from'](_0x24d32d)['map'](_0x571378=>this['_viewToController']['get'](_0x571378['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5f2f5c?_0x5f2f5c['model']:null;});}set['adapter'](_0x101b83){if(this['_adapter'])throw new _0x2b0648('commentsrepository-adapter-already-set');this['_adapter']=_0x101b83;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x15e510=_t,threadId:_0x290d91=_0x240cbb(),comments:_0x17910d=[],unlinkedAt:_0x5c4e04=null,resolvedAt:_0x273b11=null,resolvedBy:_0x2e2768=null,target:_0x497f97=null,context:_0x36fbcc=null,attributes:_0x57ab40={},isResolvable:_0x20bbdc=!0x0,isSubmitted:_0x32888f=!0x1,isFromAdapter:_0x2ba3b0=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x15e510),{'channelId':_0x15e510,'threadId':_0x290d91,'comments':_0x17910d,'unlinkedAt':_0x5c4e04,'resolvedAt':_0x273b11,'resolvedBy':_0x2e2768,'target':_0x497f97,'context':_0x36fbcc,'attributes':_0x57ab40,'isFromAdapter':_0x2ba3b0,'isResolvable':_0x20bbdc,'isSubmitted':_0x32888f}),this['getCommentThread'](_0x290d91);}['openNewCommentThread']({channelId:_0x562d27=_t,threadId:_0x293c84=_0x240cbb(),target:_0x5ba761,context:_0x2ad0f4=null,isResolvable:_0x1cd488=!0x0}){if(this['_readOnlyChannels']['has'](_0x562d27)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x5ba761)throw new _0x2b0648('commentsrepository-missing-target');const _0x51406c=this['addCommentThread']({'channelId':_0x562d27,'threadId':_0x293c84,'target':_0x5ba761,'context':_0x2ad0f4,'isResolvable':_0x1cd488});if(!_0x51406c)return null;const _0x5f0d4e=this['_threadToController']['get'](_0x51406c),_0x4db628=_0x5f0d4e['view']['commentThreadInputView']['commentInputView'],_0x5073ca=this['context']['plugins']['get'](y),_0x112f5b=_0x5073ca['getByInnerView'](_0x5f0d4e['view']);return _0x5073ca['activate'](_0x112f5b),_0x4db628['once']('editorReady',()=>_0x4db628['focus']()),_0x51406c;}['hasCommentThread'](_0x32a4a0){if('string'!=typeof _0x32a4a0)throw new _0x2b0648('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x32a4a0);}['updateCommentThread']({channelId:_0x31341d=_t,threadId:_0x3cd773,context:_0x518af9,unlinkedAt:_0x2a07c8,attributes:_0x44e63f,isFromAdapter:_0x19ff2a=!0x1}){return this['fire'](Nt('updateCommentThread',_0x31341d),{'channelId':_0x31341d,'threadId':_0x3cd773,'context':_0x518af9,'unlinkedAt':_0x2a07c8,'attributes':_0x44e63f,'isFromAdapter':_0x19ff2a}),this['getCommentThread'](_0x3cd773);}['getCommentThread'](_0x447466){if('string'!=typeof _0x447466)throw new _0x2b0648('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x447466);}['fetchCommentThread']({channelId:_0x189ecc,threadId:_0x5b158f}={}){const _0x5da1ab=this['getCommentThread'](_0x5b158f);if(_0x5da1ab)return Promise['resolve'](_0x5da1ab);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2b0648('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x189ecc,'threadId':_0x5b158f})['then'](_0x48d8cc=>this['hasCommentThread'](_0x5b158f)?this['getCommentThread'](_0x5b158f):_0x48d8cc?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x189ecc},_0x48d8cc)):void 0x0)['catch'](_0x5370c9=>{throw console['error'](_0x5370c9),new _0x2b0648('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x10dad5,skipNotAttached:_0x1745b7=!0x1,skipEmpty:_0x28c91d=!0x1,toJSON:_0x27010d=!0x1}={}){const _0x264977=[];for(const _0x5578ed of this['_threads']['values']())_0x10dad5&&_0x5578ed['channelId']!==_0x10dad5||_0x1745b7&&!_0x5578ed['isAttached']||_0x28c91d&&0x0===_0x5578ed['length']||_0x264977['push'](_0x5578ed);return _0x27010d?_0x264977['map'](_0x41a183=>_0x41a183['toJSON']()):_0x264977;}['getAnnotationForCommentThread'](_0x115b51){const _0x2ef7c0=this['_threadToController']['get'](_0x115b51);if(!_0x2ef7c0)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2ef7c0['view'])||null;}['getCommentThreadForAnnotation'](_0x46528f){const _0x5d3a13=this['_viewToController']['get'](_0x46528f['innerView']);return _0x5d3a13?_0x5d3a13['model']:null;}['setActiveCommentThread'](_0x35ba0e){const _0xe5b08f=this['context']['plugins']['get'](y);if(!_0x35ba0e)return void(this['activeCommentThread']&&_0xe5b08f['deactivateAll']());const _0x1c8590=this['getCommentThread'](_0x35ba0e);if(!_0x1c8590)throw new _0x2b0648('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x35ba0e});if(!this['_threadToController']['has'](_0x1c8590))throw new _0x2b0648('commentsrepository-active-not-attached',null,{'threadId':_0x35ba0e});const _0x2f7e4e=_0xe5b08f['getByInnerView'](this['_threadToController']['get'](_0x1c8590)['view']);_0xe5b08f['activate'](_0x2f7e4e);}['switchReadOnly'](_0x1311f7,_0x4b877d){_0x1311f7?this['_readOnlyChannels']['add'](_0x4b877d):this['_readOnlyChannels']['delete'](_0x4b877d),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x43358a){return this['_readOnlyChannels']['has'](_0x43358a)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5a813e,_0x3976ac){return new vt(_0x5a813e,_0x3976ac);}['setPermissions'](_0x1d07c8,_0x29aec5=_t){this['_permissions']['set'](_0x29aec5,_0x1d07c8),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xaf8749=_t){return this['_permissions']['has'](_0xaf8749)?this['_permissions']['get'](_0xaf8749):bt;}['_addCommentThread']({channelId:_0x10cf06,threadId:_0x4f04c2,comments:_0x4ea0bf,unlinkedAt:_0x574346,resolvedAt:_0x1b788c,resolvedBy:_0x2f73ba,target:_0x52c6a9,context:_0x56ca19,attributes:_0x4c56cb,isFromAdapter:_0xaaf9d3,isResolvable:_0x551dc9,isSubmitted:_0x2a35b8}){if('string'!=typeof _0x4f04c2)throw new _0x2b0648('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4f04c2});if(this['hasCommentThread'](_0x4f04c2))throw new _0x2b0648('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4f04c2});const _0x235a62=new pi(this,{'channelId':_0x10cf06,'id':_0x4f04c2,'context':_0x56ca19,'attributes':_0x4c56cb,'unlinkedAt':_0x574346,'resolvedAt':_0x1b788c,'resolvedBy':_0x2f73ba?this['context']['plugins']['get'](it)['getUser'](_0x2f73ba):null,'isResolvable':_0x551dc9,'isSubmitted':_0x2a35b8||_0xaaf9d3});this['_threads']['set'](_0x4f04c2,_0x235a62);for(const _0x27c64f of _0x4ea0bf)_0x235a62['_add'](this['_createNewComment']({'threadId':_0x4f04c2,..._0x27c64f}));return _0x52c6a9&&_0x235a62['attachTo'](_0x52c6a9),_0xaaf9d3||!_0x235a62['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x10cf06,'threadId':_0x4f04c2});}['_submitCommentThread']({channelId:_0x4b8787,threadId:_0x3da456}){if(!this['hasCommentThread'](_0x3da456))throw new _0x2b0648('commentsrepository-missing-comment-thread',this);const _0x4ebd4e=this['getCommentThread'](_0x3da456);if(_0x4ebd4e['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x504b06,comments:_0xc3b6ed,resolvedAt:_0x50a3cd,resolvedBy:_0x6ed974,context:_0x38d4d3,attributes:_0x31f4b4}=_0x4ebd4e,_0x50024e=this['context']['plugins']['get']('PendingActions'),_0x5a91ac=_0x50024e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4b8787,'threadId':_0x504b06,'comments':_0xc3b6ed['map'](_0x62e3d8=>_0x62e3d8['toJSON']()),'resolvedAt':_0x50a3cd,'resolvedBy':_0x6ed974?_0x6ed974['id']:_0x6ed974,'context':_0x38d4d3,'attributes':_0x31f4b4})['then'](({comments:_0x37a1cd})=>{_0x50024e['remove'](_0x5a91ac);for(const _0x68b0a0 of _0x37a1cd)this['_updateComment']({'channelId':_0x4b8787,'threadId':_0x3da456,'commentId':_0x68b0a0['commentId'],'createdAt':_0x68b0a0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x37b6cf=>{throw console['error'](_0x37b6cf),new _0x2b0648('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x312b19,target:_0x8405b1}){const _0x53aa50=this['getCommentThread'](_0x312b19);if(!_0x53aa50)throw new _0x2b0648('commentsrepository-attach-missing-comment-thread',this);const _0x4c7092=this['context']['plugins']['get']('PendingActions'),_0x404693=this['context']['plugins']['get'](y),_0x51b5bd=this['_createCommentThreadView'](_0x53aa50),_0xb74669=new vt(_0x53aa50,_0x51b5bd);let _0x5901d=null;_0x51b5bd['on']('change:isDirty',(_0x155f6c,_0x53f914,_0x48013d)=>{_0x48013d?_0x5901d=_0x4c7092['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5901d&&(_0x4c7092['remove'](_0x5901d),_0x5901d=null);}),this['_threadToController']['set'](_0x53aa50,_0xb74669),this['_viewToController']['set'](_0x51b5bd,_0xb74669);const _0x4811d5=new E(this['context']['locale'],_0x51b5bd);_0x4811d5['bind']('length')['to'](_0x51b5bd),_0x4811d5['bind']('isDirty')['to'](_0x51b5bd,'isDirty',_0x51b5bd,'length',(_0x382082,_0x3ad601)=>_0x382082||!_0x3ad601),_0x4811d5['bind']('isActive')['to'](_0x51b5bd),_0x4811d5['type']='comment';const _0x53ad92=new T({'view':_0x4811d5,'target':_0x8405b1,'type':'comment','isVisible':!_0x53aa50['archivedAt']&&!!('function'==typeof _0x8405b1?_0x8405b1():_0x8405b1)});return _0x51b5bd['on']('escape',()=>{_0x53ad92['fire']('escape');}),this['_bindAnnotationToEditors'](_0x51b5bd,_0x53ad92),_0x404693['add'](_0x53ad92),_0x53ad92;}['_bindAnnotationToEditors'](_0x4d8f93,_0x15cd0c){this['listenTo'](_0x4d8f93,'editorReady',(_0x8662aa,_0x249abd)=>{const _0x5e3b2d=_0x249abd['ui']['view']['body']['bodyCollectionContainer'];_0x15cd0c['focusableElements']['add'](_0x5e3b2d),this['context']instanceof _0x5b1ec6&&this['context']['ui']['focusTracker']['add'](_0x5e3b2d);},{'priority':'highest'}),this['listenTo'](_0x4d8f93,'editorDestroyed',(_0x2159ea,_0x20bebb)=>{const _0x3156e7=_0x20bebb['ui']['view']['body']['bodyCollectionContainer'];_0x15cd0c['focusableElements']['has'](_0x3156e7)&&_0x15cd0c['focusableElements']['remove'](_0x3156e7),this['context']instanceof _0x5b1ec6&&this['context']['ui']['focusTracker']['remove'](_0x3156e7);});}['_unbindEditors'](_0x45dc23){this['stopListening'](_0x45dc23,'editorReady'),this['stopListening'](_0x45dc23,'editorDestroyed');}['_createCommentThreadView'](_0x5cbdcf){const _0x336d3a=this['context']['plugins']['get'](it),{config:_0x1ac2ad,locale:_0x160c94}=this['context'],_0x2f9255=pt(_0x1ac2ad['get']('locale'),_0x160c94);return new(0x0,(_0x1ac2ad['get']('comments'))['CommentThreadView'])(_0x160c94,_0x5cbdcf,_0x336d3a['me'],{'editorConfig':{..._0x1ac2ad['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1ac2ad['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1ac2ad['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1ac2ad['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1ac2ad['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2f9255,'CommentView':_0x1ac2ad['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x1041a5,channelId:_0x37a64b,resolvedAt:_0x1fe00a,resolvedBy:_0x3e619a,isFromAdapter:_0x1fa569}){if(!this['hasCommentThread'](_0x1041a5))throw new _0x2b0648('commentsrepository-missing-comment-thread',null,{'threadId':_0x1041a5});const _0x3605b3=this['getCommentThread'](_0x1041a5);if(_0x3605b3['isResolved'])throw new _0x2b0648('commentsrepository-resolved-comment-thread',null,{'threadId':_0x1041a5});const _0x2e5f0d=this['context']['plugins']['get'](it);if(_0x3605b3['resolvedBy']=_0x2e5f0d['getUser'](_0x3e619a),_0x3605b3['resolvedAt']=_0x1fe00a,_0x1fa569||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0xce1daa=this['context']['plugins']['get']('PendingActions'),_0x2130eb=_0xce1daa['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x37a64b,'threadId':_0x1041a5})['then'](({resolvedAt:_0x533beb,resolvedBy:_0x13696e})=>{_0xce1daa['remove'](_0x2130eb),_0x3605b3['resolvedBy']['id']!==_0x13696e&&(_0x3605b3['resolvedBy']=_0x2e5f0d['getUser'](_0x13696e)),_0x3605b3['resolvedAt']=_0x533beb;})['catch'](_0x5718ab=>{throw console['error'](_0x5718ab),new _0x2b0648('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xda468e,channelId:_0x42b6fd,isFromAdapter:_0x51192f}){if(!this['hasCommentThread'](_0xda468e))throw new _0x2b0648('commentsrepository-missing-comment-thread',null,{'threadId':_0xda468e});const _0x22ee41=this['getCommentThread'](_0xda468e);if(!_0x22ee41['isResolved'])throw new _0x2b0648('commentsrepository-reopen-comment-thread',null,{'threadId':_0xda468e});if(_0x22ee41['resolvedBy']=null,_0x22ee41['resolvedAt']=null,_0x51192f||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1f86fa=this['context']['plugins']['get']('PendingActions'),_0x2ecc9=_0x1f86fa['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x42b6fd,'threadId':_0xda468e})['then'](()=>_0x1f86fa['remove'](_0x2ecc9))['catch'](_0x3b430a=>{throw console['error'](_0x3b430a),new _0x2b0648('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x455301,isFromAdapter:_0x10ca67}){const _0x48ad8d=this['getCommentThread'](_0x455301);if(!_0x48ad8d)throw new _0x2b0648('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x455301),this['_threads']['delete'](_0x455301),!_0x48ad8d['isSubmitted']||_0x10ca67||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2341bd=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd03492}=_0x48ad8d,_0x2c28cf=_0x2341bd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xd03492,'threadId':_0x455301})['then'](()=>_0x2341bd['remove'](_0x2c28cf))['catch'](_0x1605b1=>{throw console['error'](_0x1605b1),new _0x2b0648('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4831fe,unlinkedAt:_0x297757,context:_0x5d9e57,attributes:_0xff3cca,isFromAdapter:_0x19e935}){if('string'!=typeof _0x4831fe)throw new _0x2b0648('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4831fe});if(!this['hasCommentThread'](_0x4831fe))throw new _0x2b0648('commentsrepository-missing-comment-thread',null,{'threadId':_0x4831fe});const _0x4aed9d=this['getCommentThread'](_0x4831fe);let _0x4cfa09=!0x1;if(void 0x0!==_0x5d9e57&&_0x4aed9d['context']!==_0x5d9e57&&(_0x4aed9d['context']=_0x5d9e57,_0x4cfa09=!0x0),void 0x0!==_0x297757&&_0x4aed9d['unlinkedAt']!==_0x297757&&(_0x4aed9d['unlinkedAt']=_0x297757,_0x4cfa09=!0x0),_0xff3cca&&!At(_0xff3cca,_0x4aed9d['attributes'])&&(_0x4aed9d['attributes']=_0xff3cca,_0x4cfa09=!0x0),!_0x4cfa09)return Promise['resolve']();if(!_0x4aed9d['isSubmitted']||_0x19e935||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3e52f4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x559024}=_0x4aed9d,_0x49ab69=_0x3e52f4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x559024,'threadId':_0x4831fe,'context':_0x5d9e57,'unlinkedAt':_0x297757,'attributes':_0xff3cca})['then'](()=>_0x3e52f4['remove'](_0x49ab69))['catch'](_0xc1942f=>{throw console['error'](_0xc1942f),new _0x2b0648('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x169ffd){const _0x52839a=this['context']['plugins']['get'](y),_0x588b45=this['getCommentThread'](_0x169ffd);if(_0x588b45['_isAttached']=!0x1,this['_threadToController']['has'](_0x588b45)){const _0x3ac883=this['_threadToController']['get'](_0x588b45),_0x4c9ee3=_0x3ac883['view'],_0x7f80f1=_0x52839a['getByInnerView'](_0x4c9ee3);this['_threadToController']['delete'](_0x588b45),this['_viewToController']['delete'](_0x4c9ee3),_0x7f80f1&&_0x52839a['remove'](_0x7f80f1),_0x3ac883['destroy'](),_0x4c9ee3['destroy']()['then'](()=>{this['_unbindEditors'](_0x4c9ee3);});}}['_updateActiveAnnotation']({threadId:_0x2aae9d,resolvedAt:_0x529b7a,unlinkedAt:_0x3d1f72}){const _0xa70054=!!_0x529b7a,_0x8b24ad=this['context']['plugins']['get'](y),_0x198aa9=this['getCommentThread'](_0x2aae9d);if(this['_threadToController']['has'](_0x198aa9)){const _0x7858aa=this['_threadToController']['get'](_0x198aa9)['view'],_0x1a1f90=_0x8b24ad['getByInnerView'](_0x7858aa);_0x1a1f90&&(_0xa70054&&_0x8b24ad['_removeActiveAnnotation'](_0x1a1f90),_0x3d1f72?_0x1a1f90['isVisible']=!0x1:_0x1a1f90['refreshVisibility']());}}['_getExternalAuthor'](_0xb7caae){const _0x496680=this['context']['plugins']['get'](it),_0x43cb12=It('external:'+_0xb7caae),_0x1de93f=_0x496680['getUser'](_0x43cb12);return _0x1de93f||_0x496680['addUser']({'id':_0x43cb12,'name':_0xb7caae});}['_createNewComment']({threadId:_0x4e976e,commentId:_0x2b867f=_0x240cbb(),content:_0x4963b6,authorId:_0x10bbe1,createdAt:_0x365903,attributes:_0x5df590}){if('string'!=typeof _0x2b867f)throw new _0x2b0648('commentsrepository-invalid-commentid');if('string'!=typeof _0x10bbe1)throw new _0x2b0648('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4963b6||!_0x4963b6['trim']())throw new _0x2b0648('commentsrepository-invalid-comment-content');const _0x36e09c=this['context']['plugins']['get'](it)['getUser'](_0x10bbe1);if(!_0x36e09c)throw new _0x2b0648('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x10bbe1});let _0x3a345b=null,_0x327da0=_0x365903;return _0x5df590?.['@external']&&(_0x3a345b=this['_getExternalAuthor'](_0x5df590['@external']['authorName']),_0x327da0=new Date(_0x5df590['@external']['createdAt'])),new wi(this,{'threadId':_0x4e976e,'id':_0x2b867f,'author':_0x3a345b||_0x36e09c,'creator':_0x36e09c,'content':_0x4963b6,'createdAt':_0x365903,'authoredAt':_0x327da0,'attributes':_0x5df590});}['_addComment'](_0x3b40af){let {threadId:_0x1333a4,content:_0x78cfad,attributes:_0x1cdfc8,isFromAdapter:_0x3ee6b0}=_0x3b40af;const _0xf25261=this['getCommentThread'](_0x3b40af['threadId']);if(!_0xf25261)throw new _0x2b0648('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xdf82c1=this['_createNewComment'](_0x3b40af),{id:_0x6baded}=_0xdf82c1;if(_0xf25261['_add'](_0xdf82c1),_0x3ee6b0||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0xf25261['isSubmitted'])return Promise['resolve']();const _0x1ff052=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3024f8}=_0xf25261,_0x3387c4=_0x1ff052['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1cdfc8||(_0x1cdfc8={}),this['adapter']['addComment']({'channelId':_0x3024f8,'threadId':_0x1333a4,'commentId':_0x6baded,'content':_0x78cfad,'attributes':_0x1cdfc8})['then'](_0x1249ec=>{_0x1ff052['remove'](_0x3387c4),_0x1249ec&&this['_updateComment']({'channelId':_0x3024f8,'threadId':_0x1333a4,'commentId':_0x6baded,'createdAt':_0x1249ec['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x53da31=>{throw console['error'](_0x53da31),new _0x2b0648('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x413805,commentId:_0x302e75,content:_0x1e2adf,createdAt:_0x2546b6,attributes:_0x4fa80f,isFromAdapter:_0x17c10f}){if(void 0x0!==_0x1e2adf&&('string'!=typeof _0x1e2adf||!_0x1e2adf['trim']()['length']))throw new _0x2b0648('commentsrepository-update-comment-invalid-content');const _0x1dbc6d=this['getCommentThread'](_0x413805),_0x4fa0bc=_0x1dbc6d['getComment'](_0x302e75);if(!_0x4fa0bc)throw new _0x2b0648('commentsrepository-update-missing-comment',this);let _0x559326=!0x1;if(_0x1e2adf&&_0x1e2adf!==_0x4fa0bc['content']&&(_0x4fa0bc['isEditable']||_0x17c10f)&&(_0x4fa0bc['content']=_0x1e2adf,_0x559326=!0x0),_0x2546b6&&_0x2546b6!==_0x4fa0bc['createdAt']&&(_0x4fa0bc['createdAt']=_0x2546b6,_0x4fa0bc['attributes']&&_0x4fa0bc['attributes']['@external']||(_0x4fa0bc['authoredAt']=_0x2546b6),_0x559326=!0x0),_0x4fa80f&&!At(_0x4fa80f,_0x4fa0bc['attributes'])&&(_0x4fa0bc['attributes']=_0x4fa80f,_0x559326=!0x0),!_0x559326)return Promise['resolve']();if(_0x1dbc6d['fire']('commentUpdated'),_0x17c10f||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x15aa0a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3161e2}=this['getCommentThread'](_0x4fa0bc['threadId']),_0x23bcb5=_0x15aa0a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3161e2,'threadId':_0x413805,'commentId':_0x302e75,'content':_0x1e2adf,'attributes':_0x4fa80f})['then'](()=>_0x15aa0a['remove'](_0x23bcb5))['catch'](_0xb39326=>{throw console['error'](_0xb39326),new _0x2b0648('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x312de0,commentId:_0x2e1545,isFromAdapter:_0x5730c9}){const _0x1bbb62=this['getCommentThread'](_0x312de0),_0x283265=_0x1bbb62['getComment'](_0x2e1545);if(!_0x283265)throw new _0x2b0648('commentsrepository-remove-missing-comment',this);if(_0x1bbb62['_remove'](_0x283265),_0x5730c9||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1f9d57=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1a38b0}=_0x1bbb62,_0x407a12=_0x1f9d57['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1a38b0,'threadId':_0x312de0,'commentId':_0x2e1545})['then'](()=>_0x1f9d57['remove'](_0x407a12))['catch'](_0x1fb22d=>{throw console['error'](_0x1fb22d),new _0x2b0648('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x289e5b(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x50e66d,_0x39e1c7){super();const _0x453144=_0x39e1c7['isResolvable'];this['channelId']=_0x39e1c7['channelId'],this['id']=_0x39e1c7['id'],this['comments']=new _0x434287(),this['_repository']=_0x50e66d,this['_isAttached']=!0x1,this['_isSubmitted']=_0x39e1c7['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x50e66d,'_permissions',_0x50e66d,'_readOnlyChannels',()=>_0x50e66d['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x50e66d,'_permissions',()=>_0x50e66d['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x50e66d,'_permissions',()=>{const _0x1274ed=_0x50e66d['getPermissions'](this['channelId']);return _0x1274ed['write']||_0x1274ed['admin'];}),this['bind']('isResolvable')['to'](_0x50e66d,'_permissions',()=>_0x453144&&_0x50e66d['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x39e1c7['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x16e006,_0x5af60b)=>_0x16e006?_0x5af60b?_0x16e006<_0x5af60b?_0x16e006:_0x5af60b:_0x16e006:_0x5af60b),this['set']('unlinkedAt',_0x39e1c7['unlinkedAt']||null),this['set']('resolvedAt',_0x39e1c7['resolvedAt']||null),this['set']('resolvedBy',_0x39e1c7['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x530ac7=>!!_0x530ac7),this['set']('attributes',_0x39e1c7['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x5f5dbf,_0x599b25)=>_0x5f5dbf+_0x599b25['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5d2360,id:_0x54c91d}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x5d2360),{'channelId':_0x5d2360,'threadId':_0x54c91d});}['setUnlinkedAt'](_0x51072){this['_update']({'unlinkedAt':_0x51072});}['resolve']({resolvedAt:_0x567302=new Date(),resolvedBy:_0x4ecd4d=null,isFromAdapter:_0x3f5349=!0x1}={}){const _0x4ff468=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0xb1b3b,id:_0x5bc30e}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0xb1b3b),{'channelId':_0xb1b3b,'threadId':_0x5bc30e,'resolvedAt':_0x567302,'resolvedBy':_0x4ecd4d||_0x4ff468['id'],'isFromAdapter':_0x3f5349});}['reopen']({isFromAdapter:_0x1c7999=!0x1}={}){const {channelId:_0x190dde,id:_0x6d1b32}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x190dde),{'channelId':_0x190dde,'threadId':_0x6d1b32,'isFromAdapter':_0x1c7999});}['setContext'](_0x2fd895){this['context']||this['_update']({'context':_0x2fd895});}['setAttribute'](_0x2f97f4,_0x155c69){const _0x4a1d6c=wt(this['attributes']);yt(_0x4a1d6c,_0x2f97f4,_0x155c69),this['_update']({'attributes':_0x4a1d6c});}['removeAttribute'](_0x4bd045){const _0x3369bf=wt(this['attributes']);Ct(_0x3369bf,_0x4bd045),this['_update']({'attributes':_0x3369bf});}['remove']({isFromAdapter:_0x867b72=!0x1}={}){const {channelId:_0x1790a7,id:_0x55d824}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x1790a7),{'channelId':_0x1790a7,'threadId':_0x55d824,'isFromAdapter':_0x867b72});}['attachTo'](_0x41af2e){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x41af2e});}['addComment'](_0x488d5e){const {channelId:_0x53cc0e,id:_0x353e3c}=this;this['_repository']['fire'](Nt('addComment',_0x53cc0e,_0x353e3c),Object['assign']({'channelId':_0x53cc0e,'threadId':_0x353e3c},_0x488d5e));}['getComment'](_0x435d12){if('string'!=typeof _0x435d12)throw new _0x2b0648('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x435d12});return this['comments']['get'](_0x435d12);}['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'](_0x376cc3=>_0x376cc3['toJSON']()),'attributes':this['attributes']};}['_add'](_0x4a4b73){return this['listenTo'](_0x4a4b73,'change:authoredAt',()=>{const _0x20c733=this['_findOptimalIndex'](_0x4a4b73),_0x31d6ad=this['comments'];_0x20c733-0x1!=_0x31d6ad['getIndex'](_0x4a4b73)&&_0x20c733+0x1!=_0x31d6ad['getIndex'](_0x4a4b73)&&(this['_remove'](_0x4a4b73),this['_add'](_0x4a4b73));}),this['comments']['add'](_0x4a4b73,this['_findOptimalIndex'](_0x4a4b73));}['_update'](_0x549bb9){const {channelId:_0x5d7299,id:_0x5598bc}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x5d7299),{..._0x549bb9,'channelId':_0x5d7299,'threadId':_0x5598bc});}['_remove'](_0x1d4856){return this['stopListening'](_0x1d4856),_0x1d4856['destroy'](),this['comments']['remove'](_0x1d4856);}['_findOptimalIndex'](_0x3f1798){const _0x1386ec=this['comments']['find'](_0x16022b=>new Date(_0x16022b['authoredAt'])['getTime']()>new Date(_0x3f1798['authoredAt'])['getTime']());return _0x1386ec?this['comments']['getIndex'](_0x1386ec):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x289e5b(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x24bb9f,_0x3ba5f4){super();const _0x43c04d=_0x24bb9f['context']['plugins']['get'](it)['me'],_0x58d300=_0x24bb9f['getCommentThread'](_0x3ba5f4['threadId']),_0x3f0461=0x0===_0x58d300['comments']['length'],_0x220309=_0x43c04d===_0x3ba5f4['author'];this['id']=_0x3ba5f4['id'],this['threadId']=_0x3ba5f4['threadId'],this['author']=_0x3ba5f4['author'],this['creator']=_0x3ba5f4['creator'],this['isExternal']=Boolean(_0x3ba5f4['attributes']&&_0x3ba5f4['attributes']['@external']),this['set']('content',_0x3ba5f4['content']),this['createdAt']=_0x3ba5f4['createdAt']||new Date(),this['set']('authoredAt',_0x3ba5f4['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x58d300,'resolvedAt'),this['set']('attributes',_0x3ba5f4['attributes']||{}),this['bind']('isEditable')['to'](_0x24bb9f,'_permissions',()=>{const _0x5445a5=_0x24bb9f['getPermissions'](_0x58d300['channelId'])['write'],_0x2a2c11=_0x24bb9f['getPermissions'](_0x58d300['channelId'])['modifyAll'];return _0x220309&&_0x5445a5||!_0x220309&&_0x2a2c11;}),this['bind']('isRemovable')['to'](_0x58d300,'isRemovable',_0x24bb9f,'_permissions',_0x184228=>{const _0x1c0d94=_0x24bb9f['getPermissions'](_0x58d300['channelId'])['write'],_0x1534de=_0x24bb9f['getPermissions'](_0x58d300['channelId'])['modifyAll'];return _0x220309&&_0x1c0d94||_0x184228&&_0x3f0461||!_0x220309&&_0x1534de&&!_0x3f0461;}),this['bind']('isReadOnly')['to'](_0x58d300,'isReadOnly'),this['_repository']=_0x24bb9f;}get['weight'](){return Math['max'](function(_0x2ceba4){const _0x55d490=document['createElement']('div');return _0x55d490['innerHTML']=_0x2ceba4,_0x55d490['textContent']['length'];}(this['content']),0xc8);}['update'](_0x284e8d){const {threadId:_0x444881,id:_0x424179}=this;if(!this['_repository']['hasCommentThread'](_0x444881))throw new _0x2b0648('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3afaa2}=this['_repository']['getCommentThread'](_0x444881);this['_repository']['fire'](Nt('updateComment',_0x3afaa2,_0x444881),{'channelId':_0x3afaa2,'threadId':_0x444881,'commentId':_0x424179,..._0x284e8d});}['setAttribute'](_0x45e61b,_0x157fdd){const _0x1951d2=wt(this['attributes']);yt(_0x1951d2,_0x45e61b,_0x157fdd),this['update']({'attributes':_0x1951d2});}['removeAttribute'](_0x1f0385){const _0x35e5f9=wt(this['attributes']);Ct(_0x35e5f9,_0x1f0385),this['update']({'attributes':_0x35e5f9});}['remove'](_0x4fafa1={}){if(!_0x4fafa1['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1e8210,id:_0x53909}=this;if(!this['_repository']['hasCommentThread'](_0x1e8210))throw new _0x2b0648('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4d82c8}=this['_repository']['getCommentThread'](_0x1e8210);this['_repository']['fire'](Nt('removeComment',_0x4d82c8,_0x1e8210),{'channelId':_0x4d82c8,'threadId':_0x1e8210,'commentId':_0x53909,..._0x4fafa1});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x365158,..._0x5ec7f7){for(const _0x2a1c0b of _0x5ec7f7)void 0x0!==_0x2a1c0b&&(_0x365158+=':'+String(_0x2a1c0b));return _0x365158;}class ot extends _0x3cd900{constructor(_0xee03e4){super(_0xee03e4),this['set']('hasContent',!0x1);}['refresh'](){const _0x2a6c5d=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5b159c of _0x2a6c5d['getRanges']())if(this['_hasContent'](_0x5b159c))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x1e98dd=_0x240cbb(),ranges:_0x22d44d,comment:_0x41a5c2}={}){const _0x50ae49=this['editor']['model'],_0x44161a=_0x22d44d??Array['from'](_0x50ae49['document']['selection']['getRanges']()),_0x18ab2e=[];for(const _0x2105f0 of _0x44161a)this['_hasContent'](_0x2105f0)&&_0x18ab2e['push'](this['_trimToContent'](_0x2105f0));if(!_0x18ab2e['length'])throw new _0x2b0648('addcommentthreadcommand-incorrect-ranges',null);_0x41a5c2&&this['_createCommentThread'](_0x1e98dd,_0x41a5c2),this['_createMarkersFromRanges'](_0x1e98dd,_0x18ab2e,!!_0x41a5c2);}['_createMarkersFromRanges'](_0x357d3b,_0x103db4,_0x50b25a){this['editor']['model']['change'](_0x414ab9=>{for(const _0x81caac of _0x103db4){const _0x1f46d0=_0x240cbb()['substr'](0x1,0x5),_0x47f3dc='comment:'+_0x357d3b+':'+_0x1f46d0;_0x414ab9['addMarker'](_0x47f3dc,{'range':_0x81caac,'usingOperation':_0x50b25a,'affectsData':_0x50b25a});}});}['_createCommentThread'](_0x52f933,_0x8af17a){const _0x296a8b=this['editor']['plugins']['get']('CommentsRepository'),_0x2ac0cd=this['editor']['config']['get']('collaboration.channelId'),_0x44d43d=this['editor']['plugins']['get']('Users')['me'];if(!_0x44d43d)throw new _0x2b0648('addcommentthreadcommand-user-not-found',null);_0x296a8b['addCommentThread']({'threadId':_0x52f933,'channelId':_0x2ac0cd,'comments':[{'authorId':_0x44d43d['id'],'content':_0x8af17a,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x54be09){for(const _0x21bfcf of _0x54be09['getItems']())if(this['_itemIsContent'](_0x21bfcf))return!0x0;return!0x1;}['_itemIsContent'](_0x4c7224){return _0x4c7224['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4c7224)&&!_0x4c7224['is']('element','tableCell');}['_trimToContent'](_0x9def81){const _0x5965fd=_0x5f0d99=>!this['_itemIsContent'](_0x5f0d99['item']),_0x151614=_0x9def81['start']['getLastMatchingPosition'](_0x5965fd),_0xc838be=_0x9def81['end']['getLastMatchingPosition'](_0x5965fd,{'direction':'backward'});return this['editor']['model']['createRange'](_0x151614,_0xc838be);}}class b extends _0x48f069{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf97fd8){super(_0xf97fd8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x57f677=this['editor'],_0x3a8241=_0x57f677['model']['document']['selection'],_0xd67385=_0x3fee7d(()=>this['refreshSelectedViews'](),0xa);_0x3a8241['on']('change:range',(_0x4601bd,_0x1fbf2f)=>{_0x1fbf2f['directChange']&&(_0xd67385['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x57f677['editing']['view']['document'],'change:isFocused',(_0x340cf2,_0x207aac,_0x369397)=>{_0x369397&&_0xd67385();}),this['listenTo'](_0x57f677['ui']['focusTracker'],'change:isFocused',(_0x3a28f0,_0x5c6cb9,_0x1e4d6c)=>{_0x1e4d6c||this['fire']('blur',{'isAnnotationTracked':_0x16dffe=>this['_editorAnnotationsData']['has'](_0x16dffe['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x507e2c){if(this['_editorAnnotations']['has'](_0x507e2c['view']))return;this['_editorAnnotations']['add'](_0x507e2c['view']),this['editor']['ui']['focusTracker']['add'](_0x507e2c['view']['element']);const _0xbb6868=this['editor']['plugins']['get'](y);this['listenTo'](_0xbb6868['collection'],'remove',(_0xb1997,_0x18e930)=>{this['editor']['ui']['focusTracker']['remove'](_0x18e930['view']['element']),this['_editorAnnotations']['delete'](_0x18e930['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1f1317){if('function'!=typeof _0x1f1317)throw new _0x2b0648('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1f1317);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x183723,annotations:_0x310df4}){const _0x112876=[],_0x57ccce=this['editor']['model']['document']['selection'],_0xe0950=Array['from'](_0x57ccce['getRanges']());for(const [_0x1e214b,_0x4212f0]of this['_editorAnnotationsData']){const _0x5698ae=_0x495504(_0x4212f0),_0x28db83=_0x310df4['getByInnerView'](_0x1e214b);_0x5698ae&&_0x28db83&&_0x112876['push']({'annotation':_0x28db83,'range':_0x5698ae});}function _0x495504(_0x5ed73e){for(const _0x2b6f7f of _0x5ed73e)for(const _0x5c86af of _0xe0950)if(_0x2b6f7f['containsRange'](_0x5c86af,!_0x57ccce['isCollapsed']))return _0x2b6f7f;return null;}return _0x112876['sort']((_0x217881,_0x3b30d8)=>{const _0x28f5f4=_0x217881['range'],_0x4db587=_0x3b30d8['range'];if(!_0x28f5f4['isEqual'](_0x4db587)){if(_0x28f5f4['containsRange'](_0x4db587,!0x0))return 0x1;if(_0x4db587['containsRange'](_0x28f5f4,!0x0))return-0x1;}return _0x217881['annotation']==_0x183723?-0x1:_0x3b30d8['annotation']==_0x183723?0x1:0x0;})['map'](_0x232ea0=>_0x232ea0['annotation']);}get['_editorAnnotationsData'](){const _0x53d1b1=new Map();for(const _0x3155f1 of Array['from'](this['_dataCollectors']))for(const [_0x2fe4f3,_0xf05da8]of _0x3155f1())_0x53d1b1['set'](_0x2fe4f3,_0xf05da8);return _0x53d1b1;}}class st extends _0x48f069{['afterInit'](){const _0x3fa8b2=this['editor'];if(!_0x3fa8b2['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3fa8b2['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x48f069{constructor(_0x4f290f){super(_0x4f290f),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x590b9a=this['editor'],_0x2362ee=_0x590b9a['commands']['get']('importWord'),_0x1d34e8=_0x590b9a['plugins']['get'](it);_0x2362ee&&(_0x2362ee['on']('execute',(_0x4930cf,[,_0x44867b])=>{_0x44867b['collaboration_features']={'comments':!0x0,'user_id':_0x1d34e8['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2362ee,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x853e0a,_0x1facb3){const {comment_threads:_0x361497}=_0x1facb3;_0x361497&&_0x361497['forEach'](({thread_id:_0xf605cd,comments:_0x73e7fa,is_resolved:_0x563ca7})=>{const _0xf890b8=new Date(),_0x3f1236=_0x73e7fa['map'](({author:_0x45dff3,content:_0xabeae9,created_at:_0x33a5b2})=>({'content':_0xabeae9,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xf890b8,'attributes':{'@external':{'authorName':_0x45dff3,'createdAt':_0x33a5b2?new Date(_0x33a5b2):new Date(),'source':'importWord'}}})),_0x1982e5=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1982e5,'threadId':_0xf605cd,'comments':_0x3f1236,'resolvedAt':_0x563ca7?_0xf890b8:null});});}}class at extends _0x48f069{constructor(_0xa1456){super(_0xa1456),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5f026=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5f026,'contentInsertion',(_0x158bfc,_0x5e2345)=>this['_removeMarkersWithoutThreads'](_0x5e2345['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x1981bf){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x1981bf;const _0x24ae9b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x54d40c of _0x1981bf['keys']()){const [_0x4e2067,_0x2e610b]=_0x54d40c['split'](':');'comment'!=_0x4e2067||_0x24ae9b['hasCommentThread'](_0x2e610b)||_0x1981bf['delete'](_0x54d40c);}return _0x1981bf;}['_registerMarkerInClipboardPipeline'](){const _0x4ef27a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x311f90=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x311f90&&_0x4ef27a['_registerMarkerToCopy']('comment',_0x311f90);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x444903){switch(_0x444903){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x521695){const _0x3a43c6=_0x521695['split'](':');return{'group':_0x3a43c6[0x0],'id':_0x3a43c6[0x1],'part':_0x3a43c6[0x2]};}class ut extends _0x48f069{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4d72e5,_0x42dbe0)=>{if(!_0x42dbe0['options']['showCommentHighlights'])return null;if(_0x42dbe0['options']['ignoreResolvedComments']){const {id:_0x426c0c}=ft(_0x4d72e5['markerName']),_0xb2461d=this['editor']['plugins']['get'](o);if(_0xb2461d['getCommentThread'](_0x426c0c)?.['isResolved']&&_0x4d72e5['item'])return _0x42dbe0['consumable']['consume'](_0x4d72e5['item'],'addMarker:'+_0x4d72e5['markerName']),_0x42dbe0['consumable']['consume'](_0x4d72e5['item'],'removeMarker:'+_0x4d72e5['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3aa066=>{_0x3aa066['on']('addMarker:comment',(_0x3beac1,_0x2a64d6,_0x18c16c)=>{if(!_0x18c16c['options']['showCommentHighlights'])return;const _0x1f57d7=_0x2a64d6['item'];if(!_0x1f57d7)return;const _0x181e79=_0x18c16c['mapper']['toViewElement'](_0x1f57d7);this['editor']['model']['schema']['isObject'](_0x1f57d7)&&_0x181e79&&!_0x181e79['getCustomProperty']('widget')&&_0x181e79['is']('containerElement')&&_0x1b2e6c(_0x181e79,_0x18c16c['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3b5a0e,{writer:_0x407329,options:_0x3ed026})=>{if(!_0x3ed026['showCommentHighlights'])return null;const _0x300cd8=_0x407329['createContainerElement']('div'),_0x11d1dd=_0x407329['createEmptyElement']('hr');return _0x407329['addClass']('ck-horizontal-line',_0x300cd8),_0x407329['insert'](_0x407329['createPositionAt'](_0x300cd8,0x0),_0x11d1dd),_0x300cd8;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4b3f44,{writer:_0x459214,options:_0x2ba342})=>{if(!_0x2ba342['showCommentHighlights'])return null;const _0x10a132=_0x459214['createContainerElement']('span'),_0x3877f6=_0x459214['createEmptyElement']('img');return _0x459214['addClass']('image-inline',_0x10a132),_0x459214['insert'](_0x459214['createPositionAt'](_0x10a132,0x0),_0x3877f6),_0x10a132;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4625b2,{writer:_0x185789,options:_0x1278dc})=>{if(_0x1278dc['showCommentHighlights'])return _0x185789['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x19ac50,_0x52a9f9,_0x526363)=>{_0x526363['options']['showCommentHighlights']&&_0x19ac50['stop']();},{'priority':'high'});}}class r extends _0x48f069{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(_0x5ed6bd){super(_0x5ed6bd),this['set']('isThreadsLoadingPaused',!0x0),_0x5ed6bd['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x126a82,_0x1e3bad,_0x5ed9e7,_0x5d726e)=>{const _0x5089dd=_0x5ed6bd['plugins']['get'](o),_0x12d286=_0x5ed9e7?ft(_0x5ed9e7)['id']:null;_0x5ed6bd['model']['change'](()=>{if(_0x12d286){const _0x56a7ff=this['getAllMarkersForId'](_0x12d286);for(const _0x255ccf of _0x56a7ff)_0x5ed6bd['editing']['reconvertMarker'](_0x255ccf);}if(_0x5d726e){const {id:_0x303eb3}=ft(_0x5d726e),_0x5d69bf=_0x5089dd['getCommentThread'](_0x303eb3);if(_0x5d69bf&&_0x5d69bf['unlinkedAt'])return;if(_0x5d69bf&&!_0x5d69bf['isAttached'])return;const _0x1a8d9f=this['getAllMarkersForId'](_0x303eb3);for(const _0xba7a3b of _0x1a8d9f)_0x5ed6bd['editing']['reconvertMarker'](_0xba7a3b);}}),_0x12d286&&this['scrollToThreadMarker'](_0x12d286);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x3a3630=this['editor'],_0x5f09eb=_0x3a3630['plugins']['get'](o),_0x550b80=_0x3a3630['config']['get']('collaboration.channelId'),_0x4318f9=_0x5f09eb['getCommentThreads']()['filter'](_0x446ced=>_0x446ced['channelId']!==_0x550b80);_0x3a3630['commands']['add']('addCommentThread',new ot(_0x3a3630)),this['listenTo'](_0x3a3630,'change:isReadOnly',(_0x3e9782,_0x3d85cd,_0x494867)=>{_0x5f09eb['switchReadOnly'](_0x494867,_0x3a3630['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5f09eb,dt('addCommentThread',_0x550b80),(_0x4df10d,{threadId:_0x3d6e87})=>{const _0x3fc304=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3d6e87);_0x3fc304?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3d6e87);}),this['listenTo'](_0x5f09eb,dt('removeCommentThread',_0x550b80),(_0x63eca5,{threadId:_0x3309b0})=>{_0x3a3630['model']['enqueueChange']({'isUndoable':!0x1},_0x4cb09b=>{const _0x5f3c8f=this['getAllMarkersForId'](_0x3309b0);for(const _0x1ff214 of _0x5f3c8f)_0x4cb09b['removeMarker'](_0x1ff214);});}),this['listenTo'](_0x5f09eb,dt('resolveCommentThread',_0x550b80),(_0x52e71f,{threadId:_0xf7c72})=>{(this['_reconvertMarkers'](_0xf7c72),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0xf7c72)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5f09eb,dt('reopenCommentThread',_0x550b80),(_0x13f1fb,{threadId:_0x4fe16c})=>{this['_reconvertMarkers'](_0x4fe16c);},{'priority':'low'}),this['listenTo'](_0x5f09eb,dt('addComment',_0x550b80),(_0x5e9809,{threadId:_0x31f60f,isFromAdapter:_0x403ff5})=>{const _0x3a8831=this['getAllMarkersForId'](_0x31f60f);if(_0x403ff5||0x0==_0x3a8831['length']||!_0x5f09eb['hasCommentThread'](_0x31f60f))return;0x1===_0x5f09eb['getCommentThread'](_0x31f60f)['length']&&_0x3a3630['model']['enqueueChange']({'isUndoable':!0x1},_0x32b11f=>{for(const _0x47cc19 of _0x3a8831)_0x32b11f['updateMarker'](_0x47cc19,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x4318f9);}['afterInit'](){!async function(_0x3faeed){const _0x5cce5f=_0x4db90b([0x45,0x44,0x6d,0x33,0x68,0x52,0x76,0x72,0x6b,0x4f,0x41,0x5a,0x4c,0x42,0x4b,0x78,0x74,0x4e,0x57,0x46,0x48,0x38,0x50,0x59,0x6c,0x55,0x66,0x30,0x37,0x6e,0x65,0x77,0x47,0x73,0x62,0x4d,0x49,0x43,0x70,0x6a,0x71,0x36,0x53,0x56,0x35,0x75,0x31,0x39,0x32,0x54,0x67,0x58,0x79,0x63,0x4a,0x6f,0x34,0x64,0x69,0x51,0x61,0x7a]),_0x195624=0x67aabed5,_0xacb02b=0x67add165^_0x195624,_0xcef307=window[_0x4db90b([0x44,0x61,0x74,0x65])][_0x4db90b([0x6e,0x6f,0x77])](),_0x94e9b9=_0x3faeed[_0x4db90b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x390f44=new window[(_0x4db90b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52d2c5=>{_0x94e9b9[_0x4db90b([0x6f,0x6e,0x63,0x65])](_0x4db90b([0x72,0x65,0x61,0x64,0x79]),_0x52d2c5);}),_0x2cdfb2={[_0x4db90b([0x6b,0x74,0x79])]:_0x4db90b([0x45,0x43]),[_0x4db90b([0x75,0x73,0x65])]:_0x4db90b([0x73,0x69,0x67]),[_0x4db90b([0x63,0x72,0x76])]:_0x4db90b([0x50,0x2d,0x32,0x35,0x36]),[_0x4db90b([0x78])]:_0x4db90b([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]),[_0x4db90b([0x79])]:_0x4db90b([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]),[_0x4db90b([0x61,0x6c,0x67])]:_0x4db90b([0x45,0x53,0x32,0x35,0x36])},_0x255c43=_0x94e9b9[_0x4db90b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4db90b([0x67,0x65,0x74])](_0x4db90b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5477b1(){let _0x1ed6eb,_0x587b7d=null,_0x16c894=null;try{if(_0x255c43==_0x4db90b([0x47,0x50,0x4c]))return _0x4db90b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1ed6eb=_0x14e66c(),!_0x1ed6eb)return _0x4db90b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1ed6eb[_0x4db90b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x16c894=_0x266965(_0x1ed6eb[_0x4db90b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1ed6eb[_0x4db90b([0x6a,0x74,0x69])])),await _0x3dadca()?_0x1a96e1()?_0x378fd2()?_0x4db90b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x17560e()?(_0x1ed6eb[_0x4db90b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4db90b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x587b7d=_0x2b2051(_0x4db90b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1ed6eb[_0x4db90b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4db90b([0x74,0x72,0x69,0x61,0x6c])&&(_0x587b7d=_0x2b2051(_0x4db90b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5e952a()):_0x4db90b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4db90b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4db90b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4db90b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x378fd2(){const _0xf008bb=[_0x4db90b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4db90b([0x74,0x72,0x69,0x61,0x6c])][_0x4db90b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1ed6eb[_0x4db90b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0xcef307/0x3e8:0xe10*_0xacb02b;return _0x1ed6eb[_0x4db90b([0x65,0x78,0x70])]<_0xf008bb;}function _0x1a96e1(){const _0x58da40=_0x1ed6eb[_0x4db90b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x58da40)return!0x1;if(_0x58da40[_0x4db90b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4db90b([0x2a])))return!0x0;if(_0x58da40[_0x4db90b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4db90b([0x43,0x4d,0x54])))return!0x0;if(_0x58da40[_0x4db90b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4db90b([0x52,0x43,0x4d,0x54]))){if(_0x26fb6d())return!0x0;if(_0x844f7d()||_0x37eb15())return!0x0;}return!0x1;}function _0x17560e(){const _0x4bf3d7=_0x1ed6eb[_0x4db90b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4bf3d7||0x0==_0x4bf3d7[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x1cad16}=new URL(window[_0x4db90b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4bf3d7[_0x4db90b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1cad16))return!0x0;const _0x54c90e=_0x1cad16[_0x4db90b([0x73,0x70,0x6c,0x69,0x74])](_0x4db90b([0x2e]));return _0x4bf3d7[_0x4db90b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x313850=>_0x313850[_0x4db90b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4db90b([0x2a])))[_0x4db90b([0x6d,0x61,0x70])](_0x37eeb2=>_0x37eeb2[_0x4db90b([0x73,0x70,0x6c,0x69,0x74])](_0x4db90b([0x2e])))[_0x4db90b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3cab43=>_0x3cab43[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x54c90e[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4db90b([0x6d,0x61,0x70])](_0x4f1606=>Array(_0x54c90e[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4f1606[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4db90b([0x66,0x69,0x6c,0x6c])](_0x4f1606[0x0]===_0x4db90b([0x2a])?_0x4db90b([0x2a]):'')[_0x4db90b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4f1606))[_0x4db90b([0x73,0x6f,0x6d,0x65])](_0x19aec9=>_0x54c90e[_0x4db90b([0x65,0x76,0x65,0x72,0x79])]((_0x21e430,_0x449b5b)=>_0x19aec9[_0x449b5b]===_0x21e430||_0x19aec9[_0x449b5b]===_0x4db90b([0x2a])));}function _0x5e952a(){return _0x587b7d&&_0x16c894?new window[(_0x4db90b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x9a3df,_0x37abdf)=>{_0x587b7d[_0x4db90b([0x74,0x68,0x65,0x6e])](_0x9a3df,_0x37abdf),_0x16c894[_0x4db90b([0x74,0x68,0x65,0x6e])](_0x31f741=>{_0x31f741!=_0x4db90b([0x56,0x61,0x6c,0x69,0x64])&&_0x9a3df(_0x31f741);},_0x37abdf);}):_0x587b7d||_0x16c894||_0x4db90b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x266965(_0x4d96ee,_0x2fd069){return new window[(_0x4db90b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26ef97=>{if(_0x2e79c1())return _0x26ef97(_0x4db90b([0x56,0x61,0x6c,0x69,0x64]));_0x17b36e(),_0x94e9b9[_0x4db90b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4db90b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x215949=!0x1;const _0x4f9080=_0x240cbb();function _0x5b8e3c(_0x5c9d4e){return!!_0x5c9d4e&&(typeof _0x5c9d4e===_0x4db90b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5c9d4e===_0x4db90b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5c9d4e[_0x4db90b([0x74,0x68,0x65,0x6e])]===_0x4db90b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5c9d4e[_0x4db90b([0x63,0x61,0x74,0x63,0x68])]===_0x4db90b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1ac918(_0x99837){_0x21130e(_0x99837)[_0x4db90b([0x74,0x68,0x65,0x6e])](_0x75a6e2=>{if(!_0x75a6e2||_0x75a6e2[_0x4db90b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4db90b([0x6f,0x6b]))return _0x4db90b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x120117(_0x314b86(_0x4f9080+_0x2fd069))!=_0x75a6e2[_0x4db90b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4db90b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4db90b([0x56,0x61,0x6c,0x69,0x64]);})[_0x4db90b([0x74,0x68,0x65,0x6e])](_0x167549=>(_0x503ad7(),_0x167549),()=>{const _0x3331f0=_0x571f7b();return null==_0x3331f0?(_0x503ad7(),_0x4db90b([0x56,0x61,0x6c,0x69,0x64])):_0x4db90b(_0xcef307-_0x3331f0>(0x43a63ad5^_0x195624)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4db90b([0x74,0x68,0x65,0x6e])](_0x26ef97)[_0x4db90b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x26ef97(_0x4db90b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x12efc0=0x679c5055^_0x195624;function _0x503ad7(){const _0x59a8b1=_0x4db90b([0x6c,0x6c,0x63,0x74,0x2d])+_0x120117(_0x314b86(_0x4d96ee)),_0x520352=_0x3fee77(_0x120117(window[_0x4db90b([0x4d,0x61,0x74,0x68])][_0x4db90b([0x63,0x65,0x69,0x6c])](_0xcef307/_0x12efc0)));window[_0x4db90b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4db90b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x59a8b1,_0x520352);}function _0x571f7b(){const _0x5090e7=_0x4db90b([0x6c,0x6c,0x63,0x74,0x2d])+_0x120117(_0x314b86(_0x4d96ee)),_0x275766=window[_0x4db90b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4db90b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5090e7);return _0x275766?window[_0x4db90b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3fee77(_0x275766),0x10)*_0x12efc0:null;}function _0x21130e(_0x2f2cd9){return new window[(_0x4db90b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x183442,_0x2feca6)=>{_0x2f2cd9[_0x4db90b([0x74,0x68,0x65,0x6e])](_0x183442,_0x2feca6),window[_0x4db90b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2feca6,0x67ab6a15^_0x195624);});}}_0x94e9b9[_0x4db90b([0x6f,0x6e])](_0x4db90b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x33f80d,_0x3fd6a2)=>{if(_0x3fd6a2[0x0]!=_0x4d96ee)return _0x26ef97(_0x4db90b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3fd6a2[0x1]={..._0x3fd6a2[0x1],[_0x4db90b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x4f9080};},{[_0x4db90b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4db90b([0x68,0x69,0x67,0x68])}),_0x94e9b9[_0x4db90b([0x6f,0x6e])](_0x4db90b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x42689c=>{_0x5b8e3c(_0x42689c[_0x4db90b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x215949=!0x0,_0x1ac918(_0x42689c[_0x4db90b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4db90b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4db90b([0x6c,0x6f,0x77])}),_0x390f44[_0x4db90b([0x74,0x68,0x65,0x6e])](()=>{_0x215949||_0x26ef97(_0x4db90b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2e79c1(){return _0x94e9b9[_0x4db90b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4db90b([0x76,0x69,0x65,0x77])][_0x4db90b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4db90b([0x61,0x75,0x74,0x6f]);}function _0x17b36e(){_0x94e9b9[_0x4db90b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4db90b([0x76,0x69,0x65,0x77])][_0x4db90b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4db90b([0x61,0x75,0x74,0x6f]);}}function _0x2b2051(_0x463475){const _0x15dfeb=[new window[(_0x4db90b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4011e5=>setTimeout(_0x4011e5,0x67a38019^_0x195624)),_0x390f44[_0x4db90b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4db90b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x373e22=>{let _0x12c9c4=0x0;_0x94e9b9[_0x4db90b([0x6d,0x6f,0x64,0x65,0x6c])][_0x4db90b([0x6f,0x6e])](_0x4db90b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5afa14,_0xf4971)=>{_0xf4971[0x0][_0x4db90b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x12c9c4++,_0x12c9c4==(0x67aabf2d^_0x195624)&&(_0x373e22(),_0x5afa14[_0x4db90b([0x6f,0x66,0x66])]());});}))];return window[_0x4db90b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4db90b([0x72,0x61,0x63,0x65])](_0x15dfeb)[_0x4db90b([0x74,0x68,0x65,0x6e])](()=>_0x463475);}async function _0x21e715(){await _0x390f44,_0x94e9b9[_0x4db90b([0x6d,0x6f,0x64,0x65,0x6c])][_0x4db90b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x455582,_0x94e9b9[_0x4db90b([0x6d,0x6f,0x64,0x65,0x6c])][_0x4db90b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x455582,_0x94e9b9[_0x4db90b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4db90b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x26fb6d(){return _0xf3675e(_0x4db90b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0xc6686e(_0x4db90b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4db90b([0x73,0x74,0x61,0x74,0x65])]==_0x4db90b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x844f7d(){return _0xf3675e(_0x4db90b([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 _0x37eb15(){return _0xf3675e(_0x4db90b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x38d678(_0x2cfd2a){const _0x18f7da=_0x3994e6();_0x94e9b9[_0x18f7da]=_0x4db90b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2cfd2a,_0x2cfd2a!=_0x4db90b([0x56,0x61,0x6c,0x69,0x64])&&_0x21e715();}function _0x3994e6(){const _0x167c10=window[_0x4db90b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4db90b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4db90b([0x6e,0x6f,0x77])]())[_0x4db90b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4db90b([0x2e]),'');let _0x5d4040=_0x4db90b([0x45]);for(let _0x1eea3a=0x0;_0x1eea3a<_0x167c10[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1eea3a+=0x2){let _0x20ad06=window[_0x4db90b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x167c10[_0x4db90b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1eea3a,_0x1eea3a+0x2));_0x20ad06>=_0x5cce5f[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x20ad06-=_0x5cce5f[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5d4040+=_0x5cce5f[_0x20ad06];}return _0x5d4040;}function _0x14e66c(){const _0xefac98=_0x255c43[_0x4db90b([0x73,0x70,0x6c,0x69,0x74])](_0x4db90b([0x2e]));if(0x3!=_0xefac98[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x34a2f6(_0xefac98[0x1]);function _0x34a2f6(_0x121543){const _0x1661f9=_0x1f5b7c(_0x121543);return _0x1661f9&&_0xf9bdc6()?_0x1661f9:null;function _0xf9bdc6(){const _0x4469a4=_0x1661f9[_0x4db90b([0x6a,0x74,0x69])],_0x281fe6=window[_0x4db90b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4469a4[_0x4db90b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4469a4[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x62a490={..._0x1661f9,[_0x4db90b([0x6a,0x74,0x69])]:_0x4469a4[_0x4db90b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4469a4[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x62a490[_0x4db90b([0x76,0x63])],_0x314b86(_0x62a490)==_0x281fe6;}}}async function _0x3dadca(){let _0x1c3932=!0x0;try{const _0xab5302=_0x255c43[_0x4db90b([0x73,0x70,0x6c,0x69,0x74])](_0x4db90b([0x2e])),[_0x142ee2,_0x38b522,_0x5d4c67]=_0xab5302;return _0x48f03c(_0x142ee2),await _0x246d14(_0x142ee2,_0x38b522,_0x5d4c67),_0x1c3932;}catch{return!0x1;}function _0x48f03c(_0x19974b){const _0x4bb4a9=_0x1f5b7c(_0x19974b);_0x4bb4a9&&_0x4bb4a9[_0x4db90b([0x61,0x6c,0x67])]==_0x4db90b([0x45,0x53,0x32,0x35,0x36])||(_0x1c3932=!0x1);}async function _0x246d14(_0x3afdb4,_0x102be2,_0xf10b55){const _0x23f615=window[_0x4db90b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4db90b([0x66,0x72,0x6f,0x6d])](_0x7ca409(_0xf10b55),_0x2700a1=>_0x2700a1[_0x4db90b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x2b8959=new window[(_0x4db90b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4db90b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x3afdb4+_0x4db90b([0x2e])+_0x102be2),_0x38aca7=window[_0x4db90b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4db90b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x38aca7)return;const _0x5be5fe=await _0x38aca7[_0x4db90b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4db90b([0x6a,0x77,0x6b]),_0x2cdfb2,{[_0x4db90b([0x6e,0x61,0x6d,0x65])]:_0x4db90b([0x45,0x43,0x44,0x53,0x41]),[_0x4db90b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4db90b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4db90b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x38aca7[_0x4db90b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4db90b([0x6e,0x61,0x6d,0x65])]:_0x4db90b([0x45,0x43,0x44,0x53,0x41]),[_0x4db90b([0x68,0x61,0x73,0x68])]:{[_0x4db90b([0x6e,0x61,0x6d,0x65])]:_0x4db90b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5be5fe,_0x23f615,_0x2b8959)||(_0x1c3932=!0x1);}}function _0x1f5b7c(_0x4af455){return _0x4af455[_0x4db90b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4db90b([0x65,0x79]))?JSON[_0x4db90b([0x70,0x61,0x72,0x73,0x65])](_0x7ca409(_0x4af455)):null;}function _0x7ca409(_0x3adf37){return window[_0x4db90b([0x61,0x74,0x6f,0x62])](_0x3adf37[_0x4db90b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4db90b([0x2b]))[_0x4db90b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4db90b([0x2f])));}function _0x314b86(_0x4eb273){let _0xc4bc87=0x1505;function _0x9f52b8(_0x431e44){for(let _0x24d2ce=0x0;_0x24d2ce<_0x431e44[_0x4db90b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x24d2ce++){const _0x56f6a4=_0x431e44[_0x4db90b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x24d2ce);_0xc4bc87=(_0xc4bc87<<0x5)+_0xc4bc87+_0x56f6a4,_0xc4bc87&=_0xc4bc87;}}function _0x39279a(_0x3d0698){Array[_0x4db90b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3d0698)?_0x3d0698[_0x4db90b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39279a):_0x3d0698&&typeof _0x3d0698==_0x4db90b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4db90b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3d0698)[_0x4db90b([0x73,0x6f,0x72,0x74])]()[_0x4db90b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5ed560,_0x2b82f9])=>{_0x9f52b8(_0x5ed560),_0x39279a(_0x2b82f9);}):_0x9f52b8(window[_0x4db90b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3d0698));}return _0x39279a(_0x4eb273),_0xc4bc87>>>0x0;}function _0x120117(_0xe75af2){return _0xe75af2[_0x4db90b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4db90b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4db90b([0x30]));}function _0x3fee77(_0x288e87){return _0x288e87[_0x4db90b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4db90b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4db90b([0x6a,0x6f,0x69,0x6e])]('');}function _0xf3675e(_0x152067){return _0x94e9b9[_0x4db90b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4db90b([0x68,0x61,0x73])](_0x152067);}function _0xc6686e(_0x237825){return _0x94e9b9[_0x4db90b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4db90b([0x67,0x65,0x74])](_0x237825);}function _0x455582(){}function _0x4db90b(_0x4aa759){return _0x4aa759['map'](_0x49a484=>String['fromCharCode'](_0x49a484))['join']('');}_0x38d678(await _0x5477b1());}(this);}['destroy'](){const _0x1eb7f7=this['editor']['plugins']['get'](o),_0x416c76=this['editor']['config']['get']('collaboration.channelId');for(const _0x35ba5b of _0x1eb7f7['getCommentThreads']({'channelId':_0x416c76}))_0x1eb7f7['_detachCommentThread'](_0x35ba5b['id']),_0x1eb7f7['_threads']['delete'](_0x35ba5b['id']);super['destroy']();}['hasMarkerForId'](_0x397a2c){return this['getAllMarkersForId'](_0x397a2c)['length']>0x0;}['getAllMarkersForId'](_0x1d376d){const _0x5989f2=[];for(const _0x24e828 of this['editor']['model']['markers'])_0x24e828['name']['startsWith']('comment:'+_0x1d376d)&&_0x5989f2['push'](_0x24e828);return _0x5989f2;}['scrollToThreadMarker'](_0x288e24){setTimeout(()=>{const _0x358282=this['_getTargetForId'](_0x288e24);if(!_0x358282)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x288e24&&nt({'target':_0x358282[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4c6ac4){this['editor']['model']['change'](()=>{for(const _0x19981a of this['getAllMarkersForId'](_0x4c6ac4))this['editor']['editing']['reconvertMarker'](_0x19981a);});}['_attachArchivedThread'](_0x3859c7){const _0x4747da=this['editor']['plugins']['get'](o),_0x49a58b=this['editor']['plugins']['get'](b),_0xc92644=_0x4747da['getCommentThread'](_0x3859c7);if(!_0xc92644['isAttached']){const _0x1c3790=_0xc92644['attachTo'](()=>this['_getTargetForId'](_0xc92644['id']));_0x49a58b['registerAnnotation'](_0x1c3790),_0xc92644['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x20df01=this['editor'],_0x1d5379=_0x20df01['plugins']['get'](it);_0x20df01['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xc1b32d,_0x58ff35)=>{const {id:_0x3c4c6b}=ft(_0xc1b32d['markerName']),_0x58382f=_0x20df01['plugins']['get'](o)['getCommentThread'](_0x3c4c6b),_0x2f381d=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x3c4c6b;let _0x47a44d;if(_0x58382f&&_0x58382f['isResolved']&&!_0x2f381d&&_0xc1b32d['item'])return _0x58ff35['consumable']['consume'](_0xc1b32d['item'],'addMarker:'+_0xc1b32d['markerName']),_0x58ff35['consumable']['consume'](_0xc1b32d['item'],'removeMarker:'+_0xc1b32d['markerName']),null;const _0x23e6f0=['ck-comment-marker'];return _0x2f381d&&_0x23e6f0['push']('ck-comment-marker--active'),_0x47a44d=_0x58382f?.['length']?_0x58382f['comments']['first']['author']['id']:_0x1d5379['me']['id'],{'classes':_0x23e6f0,'attributes':{'data-comment':_0x3c4c6b,'data-author-id':_0x47a44d}};}}),_0x20df01['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4141dd,{options:_0x213994})=>{if(_0x213994['showCommentHighlights'])return null;const _0x40c647=_0x20df01['plugins']['get'](o),_0x26938d=_0x20df01['model']['markers']['get'](_0x4141dd),{id:_0x4f21bd,part:_0x1c92c9}=ft(_0x4141dd);return _0x26938d&&!_0x26938d['affectsData']||_0x213994['ignoreResolvedComments']&&_0x40c647['getCommentThread'](_0x4f21bd)?.['isResolved']?null:{'group':'comment','name':_0x1c92c9?_0x4f21bd+':'+_0x1c92c9:_0x4f21bd};}}),_0x20df01['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3746a0,{writer:_0x889e36})=>_0x889e36['createElement']('$marker',{'data-name':'comment:'+_0x3746a0['getAttribute']('id')})}),_0x20df01['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x55afb=this['editor'],_0x14c902=_0x55afb['plugins']['get'](o),_0x44b43a=new Set(),_0xf76a75=new Set();_0x55afb['model']['document']['registerPostFixer'](_0x1129a2=>{let _0x186951=!0x1;for(const {name:_0x51cca5,data:_0x568bb0}of _0x55afb['model']['document']['differ']['getChangedMarkers']()){const {group:_0x318eff,id:_0x1dbe57}=ft(_0x51cca5);let _0x4d2162=_0x568bb0['newRange'];if('comment'!==_0x318eff||!_0x4d2162)continue;const _0x5d6089='$graveyard'===_0x4d2162['root']['rootName'];_0x5d6089||(_0x4d2162=ht(_0x4d2162,_0x55afb['model']),!_0x4d2162||_0x4d2162['isCollapsed']||!_0x568bb0['newRange']||_0x4d2162['isEqual'](_0x568bb0['newRange']))?_0x55afb['model']['hasContent'](_0x4d2162)&&!_0x5d6089?this['isThreadsLoadingPaused']?_0x44b43a['add'](_0x51cca5):this['_handleThreadMarker'](_0x51cca5,_0x1dbe57):(_0xf76a75['add'](_0x51cca5),_0x44b43a['delete'](_0x51cca5),_0x1129a2['removeMarker'](_0x51cca5),_0x186951=!0x0):(_0x1129a2['updateMarker'](_0x51cca5,{'range':_0x4d2162}),_0x186951=!0x0);}return _0x186951;}),this['on']('change:isThreadsLoadingPaused',(_0x501480,_0x56834e,_0x4723ae)=>{if(!_0x4723ae&&_0x44b43a['size'])for(const _0x24fd8d of _0x44b43a){const {id:_0x2aa8a2}=ft(_0x24fd8d);_0x44b43a['delete'](_0x24fd8d),_0x55afb['model']['markers']['get'](_0x24fd8d)&&this['_handleThreadMarker'](_0x24fd8d,_0x2aa8a2);}}),this['listenTo'](_0x55afb['model']['document'],'change',()=>{for(const {name:_0x4eca30,data:{newRange:_0x4b7494}}of _0x55afb['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3c83aa,id:_0x7c5baa}=ft(_0x4eca30);if('comment'!==_0x3c83aa)continue;const _0x34c006=_0x14c902['getCommentThread'](_0x7c5baa),_0x3c9863=this['hasMarkerForId'](_0x7c5baa);_0x34c006&&(!_0x34c006['_hasTargetInContent']&&_0x4b7494&&_0x55afb['editing']['view']['once']('render',()=>{const _0x10a6d4=_0x55afb['plugins']['get'](y),_0x28679d=_0x14c902['_threadToController']['get'](_0x34c006)['view'];_0x10a6d4['getByInnerView'](_0x28679d)['refreshVisibility']();},{'priority':'low'}),_0x34c006['_hasTargetInContent']=_0x3c9863||!!_0x4b7494),_0x4b7494||(_0xf76a75['add'](_0x4eca30),_0x44b43a['delete'](_0x4eca30));}for(const _0x37d73c of _0xf76a75){const {id:_0x4a1e0e}=ft(_0x37d73c),_0x2b2825=_0x14c902['getCommentThread'](_0x4a1e0e);if(_0x44b43a['delete'](_0x37d73c),!_0x2b2825)continue;const _0x461ea5=this['hasMarkerForId'](_0x4a1e0e);_0x461ea5||_0x2b2825['isSubmitted']?_0x461ea5||_0x2b2825['unlinkedAt']||_0x2b2825['setUnlinkedAt'](new Date()):_0x2b2825['remove']();}_0xf76a75['clear']();});}['_handleInitialThreads'](_0x39ea69){_0x39ea69['forEach'](_0x5e7b67=>{_0x5e7b67['unlinkedAt']&&this['_attachArchivedThread'](_0x5e7b67['id']);});}['_getTargetForId'](_0x47f527){const _0x170781=this['editor'],_0xccfd76=this['getAllMarkersForId'](_0x47f527);return et(_0x170781['editing'],_0xccfd76);}['_getTextContext'](_0xec4a20){const _0x574624=this['getAllMarkersForId'](_0xec4a20);let _0x4fff2d='',_0x45c0fa=!0x1;for(const _0x3c86d1 of _0x574624){const _0x24d8ef=_0x3c86d1['getRange']();for(const _0x44dae3 of Array['from'](_0x24d8ef['getItems']()))_0x44dae3['is']('$textProxy')?(_0x4fff2d&&_0x45c0fa&&(_0x4fff2d+='\x20',_0x45c0fa=!0x1),_0x4fff2d+=_0x44dae3['data']):_0x45c0fa=!0x0;_0x45c0fa=!0x0;}return _0x4fff2d['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x65bf88,_0x2754a2){const _0x5f2ea6=this['editor'],_0x36f51e=_0x5f2ea6['plugins']['get'](o);let _0x38e11e=_0x36f51e['getCommentThread'](_0x2754a2);const _0x48ddab=_0x5f2ea6['config']['get']('collaboration.channelId'),_0x51b6db=_0x5f2ea6['plugins']['get'](b);if(_0x38e11e&&(_0x38e11e['unlinkedAt']&&_0x38e11e['setUnlinkedAt'](null),_0x38e11e['isAttached']))return _0x38e11e;return!this['getAllMarkersForId'](_0x2754a2)[0x0]['managedUsingOperations']?_0x5f2ea6['editing']['view']['once']('render',()=>{if(_0x36f51e['getCommentThread'](_0x2754a2))return;const _0x428127=_0x5f2ea6['plugins']['get'](y);_0x38e11e=_0x36f51e['openNewCommentThread']({'channelId':_0x48ddab,'threadId':_0x2754a2,'target':()=>this['_getTargetForId'](_0x2754a2),'context':{'type':'text','value':this['_getTextContext'](_0x2754a2)}});const _0x3a7477=_0x36f51e['_threadToController']['get'](_0x38e11e)['view'],_0x448faf=_0x428127['getByInnerView'](_0x3a7477);_0x448faf&&_0x51b6db['registerAnnotation'](_0x448faf);},{'priority':'low'}):_0x36f51e['fetchCommentThread']({'channelId':_0x48ddab,'threadId':_0x2754a2})['then'](_0x3b332a=>{if('destroyed'!==_0x5f2ea6['state']){if(_0x38e11e=_0x3b332a,_0x38e11e&&!_0x38e11e['isAttached']){const _0x15626a=_0x38e11e['attachTo'](()=>this['_getTargetForId'](_0x2754a2));_0x51b6db['registerAnnotation'](_0x15626a),_0x38e11e['isResolved']&&this['_reconvertMarkers'](_0x2754a2);}else{if(!_0x38e11e){const _0x4d9e62=this['getAllMarkersForId'](_0x2754a2);_0x5f2ea6['model']['change'](_0x59279a=>{for(const _0x376356 of _0x4d9e62)_0x59279a['removeMarker'](_0x376356);});}}}}),_0x38e11e;}['_handleThreadMarker'](_0x2676e8,_0x3ce519){const _0x33774c=this['_attachMarkerToThread'](_0x2676e8,_0x3ce519);_0x33774c&&!_0x33774c['context']&&_0x33774c['setContext']({'type':'text','value':this['_getTextContext'](_0x3ce519)});}['_initAriaMarkerChangeAnnouncements'](){const _0x46f43f=this['editor'];rt(_0x46f43f['model'],({left:_0x51878a,entered:_0x5a49b0})=>{for(const _0x2898e4 of _0x51878a)if(mt(_0x2898e4)){_0x46f43f['ui']['ariaLiveAnnouncer']['announce'](N(_0x46f43f['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x12b602 of _0x5a49b0)if(mt(_0x12b602)){_0x46f43f['ui']['ariaLiveAnnouncer']['announce'](N(_0x46f43f['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x4f5ef3)));break;}});}}function dt(_0x4a465f,_0x4a9d23){return _0x4a9d23?_0x4a465f+':'+_0x4a9d23:_0x4a465f;}function ht(_0x1db675,_0x5e1e20){const _0xf5f729=_0x5e1e20['schema'],_0x2fad43=_0x5e1e20['createRange'](_0x1db675['start']);for(const _0x2e23fb of _0x1db675['getWalker']()){const {type:_0x26a46c,item:_0x5877b4,nextPosition:_0x114939}=_0x2e23fb;if('text'===_0x26a46c||_0xf5f729['isObject'](_0x5877b4)){const _0x25732f=_0x5e1e20['createPositionBefore'](_0x5877b4);_0x2fad43['isCollapsed']&&(_0x2fad43['start']=_0x25732f),_0x2fad43['end']=_0x114939;}}return _0x2fad43;}function mt(_0x5cee5a){return'comment'===ft(_0x5cee5a['name'])['group'];}class s extends _0x48f069{['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 _0x4af78f=this['editor'],_0x5c3e05=_0x4af78f['plugins']['get'](o),_0x3ba9e6=_0x4af78f['plugins']['get'](r),_0x63b945=_0x4af78f['plugins']['get'](y),_0x3f2350=_0x4af78f['plugins']['get'](b);_0x4af78f['ui']['componentFactory']['add']('comment',()=>{const _0x340d98=this['_createUIButton'](_0x5381c7);return _0x340d98['tooltip']=!0x0,_0x340d98;}),_0x4af78f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x39f9bd)),_0x3f2350['addSourceCollector'](()=>{const _0x439e7a=[];for(const [_0x4dd363,_0x2e90c4]of _0x5c3e05['_threadToController']){const _0x3147f8=_0x3ba9e6['getAllMarkersForId'](_0x4dd363['id']),_0x565fdc=_0x3147f8['map'](_0x2a6d2c=>_0x2a6d2c['getRange']());_0x3147f8['length']>0x0&&_0x439e7a['push']([_0x2e90c4['view'],_0x565fdc]);}return _0x439e7a;}),this['listenTo'](_0x63b945,'change:activeAnnotations',(_0x1a61b9,_0x46af8d,_0xeea852)=>{const _0x5d9a30=Array['from'](_0xeea852)['map'](_0x3042d5=>_0x3042d5['innerView'])['find'](_0x1f3e71=>_0x5c3e05['_viewToController']['has'](_0x1f3e71));if(!_0x5d9a30)return void(_0x3ba9e6['activeMarker']=null);const _0xa6b328=_0x5c3e05['_viewToController']['get'](_0x5d9a30)['model']['id'],_0x140bda='comment:'+_0xa6b328;_0xa6b328&&_0x3ba9e6['hasMarkerForId'](_0xa6b328)?_0x3ba9e6['activeMarker']=_0x140bda:_0x3ba9e6['activeMarker']&&(_0x3ba9e6['activeMarker']=null);}),this['listenTo'](_0x5c3e05,'removeCommentThread',(_0x3ddb91,{threadId:_0x105984,isFromAdapter:_0x67b21b})=>{!_0x67b21b&&_0x4af78f['ui']['focusTracker']['isFocused']&&_0x3ba9e6['hasMarkerForId'](_0x105984)&&_0x4af78f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x5c3e05,'addComment',(_0x4415b1,{threadId:_0x38c149,isFromAdapter:_0xb3029f})=>{if(_0xb3029f||!_0x3ba9e6['hasMarkerForId'](_0x38c149)||!_0x5c3e05['hasCommentThread'](_0x38c149))return;0x1===_0x5c3e05['getCommentThread'](_0x38c149)['length']&&(_0x4af78f['editing']['view']['focus'](),_0x4415b1['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x5acf44=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x242ea9;for(const _0x4938e9 in _0x5acf44){const _0x2b4a42=_0x4938e9,_0x16d7a5=_0x5acf44[_0x2b4a42];if('commentsLicenseKeyValid'==_0x16d7a5||'commentsLicenseKeyInvalid'==_0x16d7a5||'commentsLicenseKeyExpired'==_0x16d7a5||'commentsLicenseKeyDomainLimit'==_0x16d7a5||'commentsLicenseKeyNotAllowed'==_0x16d7a5||'commentsLicenseKeyEvaluationLimit'==_0x16d7a5||'commentsLicenseKeyTrialLimit'==_0x16d7a5||'commentsLicenseKeyUsageLimit'==_0x16d7a5){delete _0x5acf44[_0x2b4a42],_0x242ea9=_0x16d7a5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x242ea9&&_0x5acf44['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x242ea9&&_0x5acf44['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x242ea9&&_0x5acf44['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x242ea9&&_0x5acf44['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x242ea9&&_0x5acf44['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x242ea9&&_0x5acf44['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x242ea9&&_0x5acf44['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2e0b8e){const _0x3a92d3=this['editor'],_0x36ab35=new _0x2e0b8e(_0x3a92d3['locale']),_0x150789=_0x3a92d3['commands']['get']('addCommentThread');return _0x36ab35['set']({'label':N(_0x3a92d3['locale'],'Comment'),'icon':_0x33239b}),_0x36ab35['bind']('isEnabled')['to'](_0x150789,'hasContent'),this['listenTo'](_0x36ab35,'execute',()=>{_0x150789['execute']();}),_0x36ab35;}}class i extends _0x48f069{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x1815d1){super(_0x1815d1),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x76b0be,_0x397ad9,_0xbbe37f)=>{_0xbbe37f?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4a79a5,_0x954cd0]of this['editor']['commands'])_0x954cd0['affectsData']&&'addCommentThread'!==_0x4a79a5&&_0x954cd0['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 _0x2bd103=this['editor']['editing']['view']['document'];this['listenTo'](_0x2bd103,'cut',_0x4d517d=>_0x4d517d['stop'](),{'priority':'highest'}),this['listenTo'](_0x2bd103,'clipboardInput',_0x17d716=>_0x17d716['stop'](),{'priority':'highest'}),this['listenTo'](_0x2bd103,'delete',_0x304973=>_0x304973['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5d049d,_0x32452c]of this['editor']['commands'])_0x32452c['affectsData']&&'addCommentThread'!==_0x5d049d&&_0x32452c['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 _0x565db7{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x53bf17){super(_0x53bf17),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xac90cf=this['context']['plugins']['get'](y);this['listenTo'](_0xac90cf,'_activateAnnotation',(_0x16410f,_0x3d4980)=>{for(const _0x6a4d7c of this['activeUIs']){const _0x32d014=this['_uis']['get'](_0x6a4d7c);(0x0,this['uisData']['get'](_0x6a4d7c)['filter'])(_0x3d4980)&&_0x32d014['setActiveAnnotation'](_0x3d4980);}}),this['listenTo'](_0xac90cf,'_deactivateAllAnnotations',()=>{for(const _0x9548bf of this['activeUIs']){this['_uis']['get'](_0x9548bf)['setActiveAnnotation'](null);}}),this['listenTo'](_0xac90cf['_visibleAnnotations'],'add',(_0x5ab051,_0x1ca30c)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1ca30c);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x424097){return this['activeUIs']['has'](_0x424097);}['activate'](_0x2bddc0,_0x11410b=this['defaultFilter']){const _0x335684=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2bddc0))throw new _0x2b0648('annotationsuis-missing-ui',this,{'uiName':_0x2bddc0});this['isActive'](_0x2bddc0)&&this['deactivate'](_0x2bddc0),this['activeUIs']['add'](_0x2bddc0);const _0x20d0d8=new S();v({'source':_0x335684['_visibleAnnotations'],'target':_0x20d0d8,'filter':_0x11410b}),this['uisData']['set'](_0x2bddc0,{'collection':_0x20d0d8,'filter':_0x11410b});const _0x24033a=this['_uis']['get'](_0x2bddc0);_0x24033a['attach'](_0x20d0d8),this['listenTo'](_0x24033a,'change:activeAnnotation',(_0xc725eb,_0x790d1,_0x1cbfe1,_0x58e77f)=>{_0x58e77f&&_0x335684['_removeActiveAnnotation'](_0x58e77f),_0x1cbfe1&&_0x335684['_addActiveAnnotation'](_0x1cbfe1);});}['deactivate'](_0x32e318){if(this['activeUIs']['delete'](_0x32e318),!this['_uis']['has'](_0x32e318))throw new _0x2b0648('annotationsuis-missing-ui',this,{'uiName':_0x32e318});const _0x32d2c2=this['_uis']['get'](_0x32e318);_0x32d2c2['detach'](),this['stopListening'](_0x32d2c2),this['uisData']['get'](_0x32e318)['collection']['destroy'](),this['uisData']['delete'](_0x32e318);}['switchTo'](_0x4afd33){if(!this['_uis']['has'](_0x4afd33))throw new _0x2b0648('annotationsuis-missing-ui',this,{'uiName':_0x4afd33});const _0x156558=this['context']['plugins']['get'](y),_0xde2b28=Array['from'](_0x156558['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4afd33);const _0x130e1d=this['_uis']['get'](_0x4afd33);_0x130e1d['setActiveAnnotation'](_0xde2b28),_0x130e1d['_setSelectedAnnotations']&&_0xde2b28&&_0x130e1d['_setSelectedAnnotations']([_0xde2b28]);}['deactivateAll'](){for(const _0x179606 of this['activeUIs'])this['deactivate'](_0x179606);}['register'](_0x25ca47,_0x2d2a52){if(this['_uis']['has'](_0x25ca47))throw new _0x2b0648('annotationsuis-register-already-registered');if('function'!=typeof _0x2d2a52['attach']||'function'!=typeof _0x2d2a52['detach']||'function'!=typeof _0x2d2a52['setActiveAnnotation'])throw new _0x2b0648('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x25ca47,_0x2d2a52);}['refilterAnnotations'](){const _0x251e71=this['context']['plugins']['get'](y)['collection'],_0xea1257=new Map(),_0x5c6bd3=Array['from'](this['activeUIs']);for(const _0x5d21d2 of this['activeUIs']){const _0x315d1c=this['uisData']['get'](_0x5d21d2)['collection'];for(const _0x40af2e of _0x315d1c)_0xea1257['set'](_0x40af2e,_0x5d21d2);}for(const _0x249a5b of _0x251e71){const _0x1bee1f=_0xea1257['get'](_0x249a5b);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x249a5b);const _0x3934a5=_0x5c6bd3['find'](_0x208a26=>this['uisData']['get'](_0x208a26)['filter'](_0x249a5b));_0x1bee1f!==_0x3934a5&&(_0x1bee1f&&this['uisData']['get'](_0x1bee1f)['collection']['remove'](_0x249a5b),_0x3934a5&&this['uisData']['get'](_0x3934a5)['collection']['add'](_0x249a5b));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5abfcc){const _0x749948=[];for(const _0x592b71 of this['activeUIs']){(0x0,this['uisData']['get'](_0x592b71)['filter'])(_0x5abfcc)&&_0x749948['push'](_0x592b71);}if(_0x749948['length']>0x1)throw new _0x2b0648('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x749948,'annotationType':_0x5abfcc['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x602bab){super(_0x602bab);const _0x101e5e=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 _0x40a4de(),this['focusCycler']=new _0x4d1493({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x101e5e['to']('class')],'style':{'minHeight':_0x101e5e['to']('minHeight',_0x1d2cca=>'number'==typeof _0x1d2cca?_i(_0x1d2cca+0xa):null)},'dir':_0x602bab['uiLanguageDirection'],'role':'application','aria-label':N(_0x602bab,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x602bab,'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',_0x45c8b2=>{this['_updateItemPositionInFocusables'](_0x45c8b2['source']);}),this['list']['forEach'](_0x2f35f5=>{this['focusTracker']['add'](_0x2f35f5['element']),this['_updateItemPositionInFocusables'](_0x2f35f5);}),this['list']['on']('change',(_0x2476bc,_0x4d4723)=>{for(const _0x545b1a of _0x4d4723['removed'])this['focusTracker']['remove'](_0x545b1a['element']),this['focusables']['remove'](_0x545b1a);for(const _0x31ff17 of _0x4d4723['added'])this['focusTracker']['add'](_0x31ff17['element']),this['_updateItemPositionInFocusables'](_0x31ff17);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1c63b3){const _0x3e296c=this['focusables']['getIndex'](_0x1c63b3);let _0x250d2e,_0x34a9de;for(const _0x1a7a5e of this['focusables'])if(_0x1c63b3['top']<_0x1a7a5e['top']){_0x250d2e=_0x1a7a5e;break;}if(_0x34a9de=_0x250d2e?this['focusables']['getIndex'](_0x250d2e):this['focusables']['length'],-0x1!==_0x3e296c){if(_0x3e296c===_0x34a9de-0x1)return;this['focusables']['remove'](_0x1c63b3),_0x34a9de=_0x250d2e?this['focusables']['getIndex'](_0x250d2e):this['focusables']['length'];}this['focusables']['add'](_0x1c63b3,_0x34a9de);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x302762){super(_0x302762),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x212f26,_0x50aa61)=>_0x212f26+_0x50aa61),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x421827=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x421827['to']('isAnimationDisabled',_0x472160=>_0x472160?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x421827['to']('top',_0x357e96=>Ot(_0x357e96))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2b547e=this['element']['clientHeight'];_0x2b547e&&(this['height']=_0x2b547e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x565db7{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5014c3){super(_0x5014c3),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 _0x1319c7=this['context']['config']['get']('sidebar.container');_0x1319c7&&this['setContainer'](_0x1319c7);}['setContainer'](_0x258661){if(!g(_0x258661))throw new _0x2b0648('sidebar-setcontainer-invalid-element');this['container']=_0x258661;}['_attachToContainer']({viewClass:_0xb1e17e='',spaceBetweenItems:_0x1cb047=0x19}={}){if(!g(this['container']))throw new _0x2b0648('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0xb1e17e,this['_spaceBetweenItems']=_0x1cb047;}['rearrange']({removedAnnotation:_0x366d68,previousAnnotation:_0x297083,nextAnnotation:_0x14c745}){const _0x137d4b=this['getSidebarItemView'](_0x366d68);this['view']['list']['remove'](_0x137d4b),this['_destroySidebarItemView'](_0x366d68),_0x297083&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x297083)),_0x14c745&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x14c745)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xa1b442,activatedAnnotation:_0x530204,disableAnimationOnActivatedAnnotation:_0x10aa7a}){if(this['_activeAnnotation']=_0x530204,_0xa1b442){_0xa1b442['isActive']=!0x1;const _0xc3f4ab=this['getSidebarItemView'](_0xa1b442);_0xc3f4ab&&_0x10aa7a&&(_0xc3f4ab['isAnimationDisabled']=!0x1);}if(_0x530204){const _0x4b81bb=this['getSidebarItemView'](_0x530204);_0x4b81bb&&(_0x530204['isActive']=!0x0,_0x10aa7a&&(_0x4b81bb['isAnimationDisabled']=!0x0,_0x4b81bb['top']+=0x1),this['_alignToTargetRect'](_0x4b81bb));}}['_detachFromContainer'](_0x41a44d){if(this['view']['element']['remove'](),_0x41a44d){for(const _0x33cb6a of _0x41a44d)this['_destroySidebarItemView'](_0x33cb6a);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x535d6d,_0x4aaf2e){_0x4aaf2e||(_0x4aaf2e=_0x535d6d['view']);const _0x34a893=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x34a893,_0x535d6d),this['_annotationToSidebarItemView']['set'](_0x535d6d,_0x34a893),_0x34a893['content']['add'](_0x4aaf2e),this['listenTo'](_0x535d6d['view'],'change:targetRect',(_0xfad899,_0x585c81,_0x17dc1c)=>{const _0x26374b=this['_getTargetTop'](_0x535d6d,_0x17dc1c);_0x34a893['_targetTop']!=_0x26374b&&(_0x34a893['_targetTop']=_0x26374b,this['_setItemTop'](_0x34a893,_0x26374b));}),this['listenTo'](_0x34a893,'change:top',()=>{this['_recalculate'](_0x34a893,'top');}),this['listenTo'](_0x34a893,'change:bottom',()=>{this['_recalculate'](_0x34a893,'bottom');}),this['_alignToTargetRect'](_0x34a893);const _0x120818=this['_getItemBefore'](_0x34a893);if(_0x120818)this['_alignAfterItem'](_0x120818,_0x34a893)||this['_alignToTargetRect'](_0x34a893);else this['_alignToTargetRect'](_0x34a893);return this['_updateLastItem'](),this['view']['list']['add'](_0x34a893),_0x34a893;}['_alignForTopChange'](_0x316054){if(!_0x316054['content']['length'])return;const _0x4eb9e9=this['_getItemBefore'](_0x316054);if(!_0x4eb9e9)return;const _0x415904=this['_sidebarItemViewToAnnotation']['get'](_0x4eb9e9),_0x3462a9=this['_activeAnnotation'];_0x3462a9&&_0x3462a9===_0x415904?this['_alignAfterItem'](_0x4eb9e9,_0x316054):this['_alignBeforeItem'](_0x316054,_0x4eb9e9);}['_alignForBottomChange'](_0x3c4cda){if(!_0x3c4cda['content']['length'])return;const _0x50664e=this['_getItemAfter'](_0x3c4cda);if(!_0x50664e)return;const _0x2db261=this['_sidebarItemViewToAnnotation']['get'](_0x50664e),_0x511196=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x259023=this['_activeAnnotation'];_0x259023&&_0x259023===_0x2db261&&_0x511196?(this['_alignBeforeItem'](_0x50664e,_0x3c4cda),this['_alignAfterItem'](_0x3c4cda,_0x50664e)):_0x259023&&_0x259023===_0x2db261?this['_alignBeforeItem'](_0x50664e,_0x3c4cda):this['_alignAfterItem'](_0x3c4cda,_0x50664e);}['_recalculate'](_0xa73cd5,_0xa6ad37){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x219c41,changedProp:_0x477fe0}of this['_recalculateBuffer'])'top'===_0x477fe0?this['_alignForTopChange'](_0x219c41):this['_alignForBottomChange'](_0x219c41);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0xa73cd5,'changedProp':_0xa6ad37});}['getSidebarItemView'](_0xe0cb8a){return this['_annotationToSidebarItemView']['get'](_0xe0cb8a);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4f87ff){const _0x2d85ec=this['getSidebarItemView'](_0x4f87ff);this['stopListening'](_0x2d85ec),this['stopListening'](_0x4f87ff['view']),_0x2d85ec['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4f87ff),this['_sidebarItemViewToAnnotation']['delete'](_0x2d85ec);}['_createSidebarView'](){const _0x4669af=new H(this['context']['locale']);return _0x4669af['render'](),this['on']('change:_lastItem',(_0x47ab08,_0xe435b4,_0x5974b4,_0xbc82a)=>{_0xbc82a&&_0x4669af['unbind']('minHeight'),_0x5974b4?_0x4669af['bind']('minHeight')['to'](_0x5974b4,'bottom'):_0x4669af['minHeight']=null;}),_0x4669af;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4f649a){const _0x5ec131=this['_sidebarItemViewToAnnotation']['get'](_0x4f649a),_0x482b4a=_0x5ec131&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5ec131)-0x1);return _0x482b4a&&this['getSidebarItemView'](_0x482b4a)||null;}['_getItemAfter'](_0x4208ec){const _0x1ae71a=this['_sidebarItemViewToAnnotation']['get'](_0x4208ec),_0x53bfef=_0x1ae71a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1ae71a)+0x1);return _0x53bfef&&this['getSidebarItemView'](_0x53bfef)||null;}['_alignBeforeItem'](_0x5a7a8d,_0x4bba6f){_0x5a7a8d['updateHeight']();const _0x3e5226=G(_0x4bba6f['bottom']+this['_spaceBetweenItems'],_0x5a7a8d['top']);return!!_0x3e5226&&(this['_setItemTop'](_0x4bba6f,_0x4bba6f['top']-_0x3e5226),!0x0);}['_alignAfterItem'](_0x479d7b,_0x58d93c){_0x479d7b['updateHeight']();const _0x3c896d=G(_0x479d7b['bottom']+this['_spaceBetweenItems'],_0x58d93c['top']);return!!_0x3c896d&&(this['_setItemTop'](_0x58d93c,_0x58d93c['top']+_0x3c896d,!0x1),!0x0);}['_alignToTargetRect'](_0xa8ade3){const _0x4c0b60=this['_sidebarItemViewToAnnotation']['get'](_0xa8ade3);if(!_0x4c0b60||!_0x4c0b60['target']||!_0x4c0b60['targetRect'])return;const _0x25d899=this['_getTargetTop'](_0x4c0b60,_0x4c0b60['targetRect']);this['_setItemTop'](_0xa8ade3,_0x25d899);}['_getTargetTop'](_0x12b679,_0x493241){if(null===_0x493241)return 0x0;if(_0x12b679['target']instanceof _0x13f83e)return _0x493241['top'];{const _0x5dd186=new _0x13f83e(this['view']['element'])['top'];return _0x493241['top']-_0x5dd186;}}['_setItemTop'](_0x1d60d0,_0x3d3250,_0x124a84=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x124a84&&(_0x3d3250=Math['max'](_0x3d3250,this['_getMaxAvailableTop'](_0x1d60d0))),_0x1d60d0['top']=_0x3d3250;}['_getMaxAvailableTop'](_0x55e0cb){let _0xf82af6=this['_getItemBefore'](_0x55e0cb),_0x47606b=0x0;for(;_0xf82af6;)_0xf82af6['updateHeight'](),_0x47606b+=this['_spaceBetweenItems']+_0xf82af6['height'],_0xf82af6=this['_getItemBefore'](_0xf82af6);return _0x47606b;}}function G(_0x3d94e0,_0x121c56){return Math['max'](_0x3d94e0-_0x121c56,0x0);}function g(_0x2a585a){return null!==_0x2a585a&&'object'==typeof _0x2a585a&&0x1===_0x2a585a['nodeType'];}class e extends _0x565db7{['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(_0x4e7754){super(_0x4e7754),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x434287(),this['_refreshPositioningDebounced']=_0x3fee7d(()=>{_0x4e7754['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x43a8ae=this['context']['plugins']['get'](j),_0x214416=this['context']['plugins']['get'](z);_0x43a8ae['register']('wideSidebar',this),_0x214416['container']&&_0x43a8ae['switchTo']('wideSidebar');}['setActiveAnnotation'](_0xc50988){if(_0xc50988===this['activeAnnotation'])return;const _0x42637e=this['context']['plugins']['get'](z);_0x42637e['_activeAnnotation']=_0xc50988;const _0x21f8ef=this['activeAnnotation'];_0x42637e['refresh']({'blurredAnnotation':_0x21f8ef,'activatedAnnotation':_0xc50988}),this['activeAnnotation']=_0xc50988;}['attach'](_0x27dee6){this['annotations']=_0x27dee6;const _0xcda323=this['context']['plugins']['get'](z);if(_0xcda323['_annotations']=_0x27dee6,this['isAttached'])throw new _0x2b0648('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xcda323,'set:container',()=>{this['detach'](),this['listenTo'](_0xcda323,'change:container',_0x29d88a=>{_0x29d88a['off'](),this['attach'](_0x27dee6);});}),_0xcda323['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x413e85=_0x3c0e84=>{_0x3c0e84['updateTargetRect'](),_0xcda323['addAnnotation'](_0x3c0e84);};for(const _0x50e229 of _0x27dee6)_0x413e85(_0x50e229);this['listenTo'](_0x27dee6,'add',(_0x2c9f0d,_0x2af23b)=>{_0x413e85(_0x2af23b);}),this['listenTo'](_0x27dee6,'remove',(_0x1574b0,_0x2a7033,_0x388cf7)=>{_0xcda323['rearrange']({'removedAnnotation':_0x2a7033,'previousAnnotation':_0x27dee6['get'](_0x388cf7-0x1),'nextAnnotation':_0x27dee6['get'](_0x388cf7+0x1)}),_0x2a7033===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x27dee6,'focus',(_0xb43773,_0x5e71f2)=>{this['setActiveAnnotation'](_0x5e71f2);}),this['listenTo'](_0x27dee6,'blur',()=>{this['setActiveAnnotation'](null);});const _0xa84ef5=this['context']instanceof _0x2180b4?this['context']['editors']:new _0x434287([this['context']]);for(const _0x49c172 of _0xa84ef5)this['_integrateWithEditorAnnotations'](_0x49c172);this['listenTo'](_0xa84ef5,'add',(_0x25027f,_0x52c8e2)=>{this['listenTo'](_0x52c8e2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x52c8e2);});}),this['listenTo'](_0xa84ef5,'remove',(_0x579e9a,_0x5a1495)=>{_0x5a1495['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5a1495['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2b0648('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x195039=this['context']['plugins']['get'](z);_0x195039['_detachFromContainer'](this['annotations']),this['stopListening'](_0x195039),this['stopListening'](this['annotations']),this['context']instanceof _0x2180b4&&this['stopListening'](this['context']['editors']);for(const _0x3c74ac of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3c74ac);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x534c5d){if(!_0x534c5d['plugins']['has']('EditorAnnotations'))return;const _0x16a36e=_0x534c5d['plugins']['get']('EditorAnnotations'),_0x4ee832=()=>{const _0x49fe12=_0x16a36e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x49fe12[0x0]||null);};this['listenTo'](_0x16a36e,'refresh',_0x4ee832),this['listenTo'](_0x16a36e,'blur',(_0x214829,{isAnnotationTracked:_0x481733})=>{this['activeAnnotation']&&_0x481733(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x16a36e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5debfe=>{_0x16a36e['hasDomSelection']()&&(_0x4ee832(),_0x5debfe['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x16a36e);}['_destroyEditorAnnotationsIntegration'](_0x1f0cdf){this['stopListening'](_0x1f0cdf),this['_editorAnnotations']['remove'](_0x1f0cdf);}}class C extends _0x5381c7{['counterView'];constructor(_0x35b381){super(_0x35b381);const _0x38c410=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x2d348c,_0x210a36)=>_0x2d348c?'...':_0x210a36['toString']()),this['set']('annotationType',''),this['icon']=_0x33239b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x38c410['to']('annotationType',_0x7a7740=>'ck-annotation-counter__badge--'+_0x7a7740),_0x38c410['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x38c410['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x565db7{['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(_0x37af76){super(_0x37af76),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x29767a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x434287(),this['_refreshPositioningDebounced']=_0x3fee7d(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0xc4bcbf(this['context']['locale']),this['balloonPanelView']=new _0x124ee5(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2ace3d){this['annotations']=_0x2ace3d;const _0x47dec2=this['context']['plugins']['get'](z),_0x57c650=this['balloonPanelView'];if(_0x47dec2['_annotations']=_0x2ace3d,this['isAttached'])throw new _0x2b0648('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x47dec2,'set:container',()=>{this['detach'](),this['listenTo'](_0x47dec2,'change:container',_0x5b5477=>{_0x5b5477['off'](),this['attach'](_0x2ace3d);});}),_0x47dec2['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xd5dd40=_0x508f7c=>{const _0x58ad6a=new C(this['context']['locale']);_0x47dec2['addAnnotation'](_0x508f7c,_0x58ad6a),this['_annotationToNarrowView']['set'](_0x508f7c,_0x58ad6a),_0x58ad6a['bind']('isDirty','annotationType','number')['to'](_0x508f7c['view'],'isDirty','type','length'),_0x58ad6a['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x57c650['content']['first']!==_0x508f7c['view']?(this['_showBalloon'](_0x508f7c),_0x508f7c['view']['element']['focus'](),this['setActiveAnnotation'](_0x508f7c)):this['setActiveAnnotation'](null);});};for(const _0x3a8bd2 of _0x2ace3d)_0xd5dd40(_0x3a8bd2);this['listenTo'](_0x2ace3d,'add',(_0x3f14f5,_0x3d1aaf)=>{_0xd5dd40(_0x3d1aaf);}),this['listenTo'](_0x2ace3d,'remove',(_0xc8f62f,_0x572e9f,_0x146d90)=>{this['_annotationToNarrowView']['get'](_0x572e9f)['destroy'](),this['_annotationToNarrowView']['delete'](_0x572e9f),_0x47dec2['rearrange']({'removedAnnotation':_0x572e9f,'previousAnnotation':_0x2ace3d['get'](_0x146d90-0x1),'nextAnnotation':_0x2ace3d['get'](_0x146d90+0x1)}),_0x572e9f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2ace3d,'focus',(_0x2b47d5,_0x2b4ec9)=>{this['setActiveAnnotation'](_0x2b4ec9);}),this['listenTo'](_0x2ace3d,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4732df,_0x2e1814)=>{_0x2e1814['keyCode']===_0x28e2c2['esc']&&_0x57c650['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x57c650['content']['first']),this['_hideBalloon'](),_0x2e1814['stopPropagation'](),_0x2e1814['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x485356,_0x17286e)=>{const _0x1de0b2=_0x17286e['target'];_0x57c650['isVisible']&&_0x57c650['element']['contains'](_0x1de0b2)||_0x47dec2['view']['element']['contains'](_0x1de0b2)||_0x485356['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x42f32d=>_0x42f32d['contains'](_0x1de0b2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x284673=this['context']instanceof _0x2180b4?this['context']['editors']:new _0x434287([this['context']]);for(const _0x2009fc of _0x284673)this['_integrateWithEditorAnnotations'](_0x2009fc);this['listenTo'](_0x284673,'add',(_0x4c1c1c,_0x205a23)=>{this['listenTo'](_0x205a23,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x205a23);});}),this['listenTo'](_0x284673,'remove',(_0x536a16,_0x85bb27)=>{_0x85bb27['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x85bb27['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x4d2587){if(_0x4d2587===this['activeAnnotation'])return;const _0xbe76b5=this['context']['plugins']['get'](z);if(_0xbe76b5['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x4d2587,'disableAnimationOnActivatedAnnotation':!0x0}),_0x4d2587)_0xbe76b5['getSidebarItemView'](_0x4d2587)?this['_showBalloon'](_0x4d2587):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x4d2587;}['detach'](){if(!this['isAttached'])throw new _0x2b0648('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3ba60d=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5eff1d=>_0x5eff1d['destroy']()),this['_annotationToNarrowView']['clear'](),_0x3ba60d['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2180b4&&this['stopListening'](this['context']['editors']);for(const _0x72c516 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x72c516);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'](_0x1c2998){if(!_0x1c2998['plugins']['has']('EditorAnnotations'))return;const _0xe5e953=_0x1c2998['plugins']['get']('EditorAnnotations'),_0x13e7ec=this['context']['plugins']['get'](z),_0x39ceaf=this['annotations'],_0x43062e=this['balloonPanelView'],_0x14a931=()=>{const _0x39075b=_0xe5e953['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x39075b),this['setActiveAnnotation'](_0x39075b[0x0]||null);};this['listenTo'](_0xe5e953,'refresh',_0x14a931),this['listenTo'](_0xe5e953,'blur',(_0x4a5263,{isAnnotationTracked:_0x3398c0})=>{this['activeAnnotation']&&_0x3398c0(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xe5e953,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x39ceaf,'blur',_0x5b1362=>{_0xe5e953['hasDomSelection']()&&_0x5b1362['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x641962,_0x2b2659)=>{const _0xc44fd0=_0x2b2659['target'];_0x43062e['isVisible']&&_0x43062e['element']['contains'](_0xc44fd0)||_0x13e7ec['view']['element']['contains'](_0xc44fd0)||this['activeAnnotation']&&_0xe5e953['hasDomSelection']()&&(_0x14a931(),_0x641962['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0xe5e953);}['_destroyEditorAnnotationsIntegration'](_0x2fd8aa){_0x2fd8aa&&(this['stopListening'](_0x2fd8aa),this['_editorAnnotations']['remove'](_0x2fd8aa));}['_setSelectedAnnotations'](_0x5a46ff){for(const _0x3b27f8 of this['_selectedAnnotations'])_0x5a46ff['includes'](_0x3b27f8)||this['_manuallyClosedAnnotationViews']['delete'](_0x3b27f8['view']);this['_selectedAnnotations']=_0x5a46ff;}['_refreshPositioning'](){const _0x36666a=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x36666a['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x23b9fb){if(this['_manuallyClosedAnnotationViews']['has'](_0x23b9fb['view']))return;const _0x16b500=this['balloonPanelView']['content']['first'];_0x16b500!==_0x23b9fb['view']?(_0x16b500&&this['_detachListeners'](_0x16b500),this['_attachListeners'](_0x23b9fb['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x23b9fb['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x55174b=this['balloonPanelView']['content']['first'],_0x2b2f71=_0x55174b&&this['annotations']['getByView'](_0x55174b);if(!_0x2b2f71||!this['_annotationToNarrowView']['has'](_0x2b2f71))return;const _0xebb37a=this['_annotationToNarrowView']['get'](_0x2b2f71)['element'],_0x4b2342=(function(){const _0x123fc6=_0x124ee5['defaultPositions'];return[_0x123fc6['southArrowNorthEast'],_0x123fc6['northArrowSouthEast'],_0x123fc6['southArrowNorth'],_0x123fc6['northArrowSouth'],_0x123fc6['southArrowNorthWest'],_0x123fc6['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0xebb37a,'positions':_0x4b2342});}['_hideBalloon'](){const _0x43e5bd=this['balloonPanelView'],_0x415e63=_0x43e5bd['content']['first'];_0x415e63&&(this['_detachListeners'](_0x415e63),_0x43e5bd['unpin'](),_0x43e5bd['content']['clear']());}['_attachListeners'](_0x35e560){this['listenTo'](_0x35e560,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x35e560,'Esc',(_0x11177a,_0x1cae1d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x35e560),this['_hideBalloon'](),_0x1cae1d();});}['_detachListeners'](_0x78f5d3){this['stopListening'](_0x78f5d3);}}class c extends _0x48f069{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x248293,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ddfc9){super(_0x3ddfc9),_0x3ddfc9['editing']['view']['addObserver'](_0x450994),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x3ddfc9['plugins']['get'](_0x248293),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x53c99a=this['editor']['plugins']['get'](j);_0x53c99a['context']===this['editor']&&(_0x53c99a['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x4ac136,_0x5e8de1)=>{const _0x212f4c=this['_balloon'];if(this['isAttached']&&_0x212f4c['visibleView']){const _0xe688e9=this['annotations']['getByView'](_0x212f4c['visibleView']);_0xe688e9&&this['_closeAnnotation'](_0xe688e9),_0x5e8de1();}}));}['afterInit'](){const _0x217dc4=this['editor']['plugins']['get'](j);_0x217dc4['context']===this['editor']&&(_0x217dc4['hasActive']()||_0x217dc4['switchTo']('inline'));}['setActiveAnnotation'](_0x3e152e){_0x3e152e!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3e152e&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3e152e)&&this['_addAnnotationToBalloon'](_0x3e152e,!0x0),_0x3e152e['isActive']=!0x0),_0x3e152e||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3e152e);}['attach'](_0x5710e5){this['annotations']=_0x5710e5;const _0x190a62=this['editor']['plugins']['get'](j),_0x514d0a=this['_balloon'];if(this['isAttached'])throw new _0x2b0648('inlineannotations-attach-already-attached',this);if(_0x190a62['context']!==this['editor'])throw new _0x2b0648('inlineannotations-not-allowed-with-context',this);const _0x554ca7=this['editor']['plugins']['get'](b);this['listenTo'](_0x554ca7,'refresh',()=>{const _0x323c89=_0x554ca7['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x708f9f,_0x3a148c;!this['_forceRefresh']&&(_0x708f9f=_0x323c89,_0x3a148c=this['_selectedAnnotations'],_0x708f9f['length']===_0x3a148c['length']&&_0x708f9f['every'](_0x4111fe=>_0x3a148c['includes'](_0x4111fe)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x323c89),this['setActiveAnnotation'](_0x323c89[0x0]||null));}),this['listenTo'](_0x554ca7,'blur',(_0xa42297,{isAnnotationTracked:_0x2d3f6e})=>{this['activeAnnotation']&&_0x2d3f6e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x17e8e3,_0x165963,_0x4eb1db)=>{_0x4eb1db||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5710e5,'remove',(_0x28191f,_0x480ffc)=>{this['_removeAnnotationFromBalloon'](_0x480ffc),_0x480ffc===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x514d0a,'change:visibleView',(_0x382397,_0x1f0978,_0x2d47ad,_0x2da16c)=>{_0x2da16c&&this['stopListening'](_0x2da16c);const _0x10cab9=_0x5710e5['getByView'](_0x2d47ad);_0x2d47ad&&_0x10cab9&&(this['listenTo'](_0x2d47ad,'change:height',()=>{_0x514d0a['updatePosition']();}),this['listenTo'](_0x2d47ad,'Esc',()=>{this['_closeAnnotation'](_0x10cab9),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x10cab9&&this['setActiveAnnotation'](_0x10cab9));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x514d0a['visibleView']&&(_0x5710e5['getByView'](_0x514d0a['visibleView'])&&_0x514d0a['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 _0x2b0648('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x7ed660 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x7ed660);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x482192){for(const _0x2ffd56 of this['_selectedAnnotations'])_0x482192['includes'](_0x2ffd56)||this['_manuallyClosed']['delete'](_0x2ffd56);for(const _0x514e8d of this['annotations'])_0x482192['includes'](_0x514e8d)||this['_removeAnnotationFromBalloon'](_0x514e8d);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x3908bd of _0x482192)this['_addAnnotationToBalloon'](_0x3908bd);}this['_selectedAnnotations']=_0x482192;}['_addAnnotationToBalloon'](_0x422999,_0x43f411=!0x1){this['_manuallyClosed']['has'](_0x422999)||(this['_addedAnnotations']['has'](_0x422999)||this['_balloon']['hasView'](_0x422999['view'])||(this['_addedAnnotations']['add'](_0x422999),this['_balloon']['add']({'stackId':_0x422999['view']['id'],'view':_0x422999['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x422999)}})),_0x43f411&&this['_balloon']['showStack'](_0x422999['view']['id']));}['_getBalloonTargetForAnnotation'](_0x5ae88e){const _0x22f0af=_0x5ae88e['target'],_0x4d4701=this['editor']['editing']['view'],_0x2ce763=_0x4d4701['document']['selection']['getFirstRange'](),_0x45cce0=_0x4d4701['domConverter']['viewRangeToDom'](_0x2ce763);if(_0x45cce0['collapse'](!0x0),_0x22f0af){if(_0x22f0af instanceof _0x13f83e)return _0x22f0af;let _0xcae256=[];for(const _0x2c0d45 of _0x22f0af)_0xcae256['push'](...F(_0x2c0d45['getClientRects']()));_0xcae256=function(_0x26273d){const _0x3499cd=[];let _0x1fee06=_0x26273d[0x0];for(let _0x35f2ed=0x1;_0x35f2ed<_0x26273d['length'];_0x35f2ed++)P(_0x1fee06,_0x26273d[_0x35f2ed])?_0x1fee06['width']+=_0x26273d[_0x35f2ed]['width']:(_0x3499cd['push'](_0x1fee06),_0x1fee06=_0x26273d[_0x35f2ed]);return _0x3499cd['push'](_0x1fee06),_0x3499cd;}(_0xcae256);const _0x2e1d3e=_0x45cce0['getBoundingClientRect']();return _0xcae256['find'](_0x2104a2=>_0x2104a2['top']<=_0x2e1d3e['top']&&_0x2104a2['bottom']>=_0x2e1d3e['bottom']&&_0x2104a2['left']<=_0x2e1d3e['left']&&_0x2104a2['right']>=_0x2e1d3e['right'])||_0xcae256[0x0];}return _0x5ae88e['targetRect']||_0x45cce0;}['_removeAnnotationFromBalloon'](_0x3b5c2d){this['_addedAnnotations']['has'](_0x3b5c2d)&&this['_balloon']['hasView'](_0x3b5c2d['view'])&&(this['_addedAnnotations']['delete'](_0x3b5c2d),this['_balloon']['remove'](_0x3b5c2d['view']));}['_closeAnnotation'](_0x3f2f3c){this['_manuallyClosed']['add'](_0x3f2f3c),this['_removeAnnotationFromBalloon'](_0x3f2f3c);}}function F(_0x2650b8){return Array['from'](_0x2650b8)['map'](DOMRect['fromRect']);}function P(_0x4f9624,_0x3799fc){return _0x4f9624['top']===_0x3799fc['top']&&_0x4f9624['bottom']===_0x3799fc['bottom']&&_0x4f9624['right']===_0x3799fc['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5f031d,_0x2b0eb9){super(_0x5f031d),this['set']('isEmpty',!_0x2b0eb9['length']),this['focusTracker']=new _0x40a4de(),this['_annotationViews']=_0x2b0eb9,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4d1493({'focusables':_0x2b0eb9,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2b0eb9,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2b0eb9,'remove',(_0x54e0e5,_0x25dda1)=>{_0x25dda1['isActive']&&this['focus'](),_0x2b0eb9['length']||(this['isEmpty']=!0x0);});const _0x552e0e=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x5f031d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2b0eb9},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x552e0e['if']('isEmpty','ck-hidden',_0x1777ab=>!_0x1777ab)]},'children':[{'text':N(_0x5f031d,'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 _0x4e4554 of this['_annotationViews'])this['focusTracker']['add'](_0x4e4554['element']);this['_annotationViews']['on']('change',(_0x337546,{added:_0x1884d0,removed:_0x287858})=>{for(const _0x491b4c of _0x1884d0)this['focusTracker']['add'](_0x491b4c['element']);for(const _0x5bf7c4 of _0x287858)this['focusTracker']['remove'](_0x5bf7c4['element']);});}}class p extends _0x565db7{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x30b8b0){super(_0x30b8b0),this['archivedThreads']=new _0x434287();}['init'](){const _0x2249f0=this['context'],_0x3de559=_0x2249f0['plugins']['get'](o),_0x303108=_0x2249f0['plugins']['get'](y);this['listenTo'](_0x3de559,'addCommentThread',(_0xc57535,{threadId:_0x211d40})=>{const _0x5c5239=_0x3de559['getCommentThread'](_0x211d40);_0x5c5239['archivedAt']&&this['archivedThreads']['add'](_0x5c5239,this['_calculatePosition'](_0x5c5239['archivedAt'])),this['listenTo'](_0x5c5239,'change:archivedAt',(_0x5a6b4a,_0x55316a,_0x588d7c)=>{_0x588d7c?this['archivedThreads']['has'](_0x5c5239)||this['archivedThreads']['add'](_0x5c5239,this['_calculatePosition'](_0x5c5239['archivedAt'])):this['archivedThreads']['has'](_0x5c5239)&&this['archivedThreads']['remove'](_0x5c5239);});}),this['listenTo'](_0x3de559,'removeCommentThread',(_0xbc68eb,{threadId:_0x793bd4})=>{const _0x12d45e=_0x3de559['getCommentThread'](_0x793bd4);this['stopListening'](_0x12d45e),this['archivedThreads']['has'](_0x12d45e)&&this['archivedThreads']['remove'](_0x12d45e);},{'priority':'highest'}),this['listenTo'](_0x303108['collection'],'focus',(_0x568541,_0x1b903d)=>{_0x1b903d['isVisible']||(_0x1b903d['isActive']=!0x0,_0x303108['activate'](_0x1b903d));});}['_calculatePosition'](_0x56b0ea){const _0x354349=[...this['archivedThreads']]['findIndex'](_0x2aa3ff=>_0x2aa3ff['archivedAt']<_0x56b0ea);return _0x354349>-0x1?_0x354349:this['archivedThreads']['length'];}}class a extends _0x48f069{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0xda48dc];}constructor(_0x196fc9){super(_0x196fc9),this['annotationViews']=new _0x263ec4(),this['_pendingThreads']=[];}['init'](){const _0x4e0740=this['editor'],_0x524bcb=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4e0740['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5381c7,!0x0)),_0x4e0740['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x23e30b=this['_createCommentsArchiveButton'](_0x39f9bd);return _0x23e30b['set']({'role':'menuitemcheckbox'}),_0x23e30b;});const _0x48f12e=_0x4e0740['plugins']['get'](p),_0xb6adf1=_0x4e0740['plugins']['get']('Annotations'),_0x10dd72=_0x4e0740['plugins']['get']('CommentsRepository');_0x48f12e['archivedThreads']['forEach'](_0x295249=>{this['_handleNewThread'](_0x295249);}),this['listenTo'](_0x48f12e['archivedThreads'],'add',(_0x49720e,_0xa88a91)=>{this['_handleNewThread'](_0xa88a91);}),this['listenTo'](_0xb6adf1['collection'],'add',(_0x33bcf8,_0x7fb467)=>{const _0x376b10=this['_pendingThreads']['find'](_0x2615d6=>{const _0x21b645=_0x10dd72['_threadToController']['get'](_0x2615d6);return _0x21b645&&_0x7fb467['innerView']===_0x21b645['view'];});if(_0x376b10){const _0xbb2f3=this['_calculatePosition'](_0x376b10['archivedAt']);this['annotationViews']['add'](_0x7fb467['view'],_0xbb2f3),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x376b10),0x1);}}),this['listenTo'](_0x48f12e['archivedThreads'],'remove',(_0x5d7144,_0x1f2bee)=>{const _0x2709b6=_0x4e0740['config']['get']('collaboration.channelId');if(!_0x2709b6||_0x1f2bee['channelId']===_0x2709b6){if(this['_pendingThreads']['includes'](_0x1f2bee))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1f2bee),0x1);else{const _0x2e1a0f=_0x10dd72['_threadToController']['get'](_0x1f2bee),_0x12d74d=_0xb6adf1['getByInnerView'](_0x2e1a0f['view']);this['annotationViews']['remove'](_0x12d74d['view']),this['stopListening'](_0x12d74d['focusableElements']);}}}),this['listenTo'](_0xb6adf1['collection'],'add',(_0x50d975,_0x3e64ef)=>{this['listenTo'](_0x3e64ef,'escape',_0x524bcb);}),this['listenTo'](_0xb6adf1['collection'],'remove',(_0x145834,_0x4c4845)=>{this['stopListening'](_0x4c4845,'escape',_0x524bcb);});}['_handleNewThread'](_0x59d42b){const _0x4eb91f=this['editor']['plugins']['get']('CommentsRepository'),_0x4899fa=this['editor']['plugins']['get']('Annotations'),_0x11c6c6=this['editor']['config']['get']('collaboration.channelId');if(!_0x11c6c6||_0x59d42b['channelId']===_0x11c6c6){const _0x473dac=_0x4eb91f['_threadToController']['get'](_0x59d42b);if(!_0x473dac)return void this['_pendingThreads']['push'](_0x59d42b);const _0x381261=this['_calculatePosition'](_0x59d42b['archivedAt']),_0x33ae80=_0x4899fa['getByInnerView'](_0x473dac['view']);_0x33ae80['isVisible']&&_0x4899fa['_visibleAnnotations']['remove'](_0x33ae80),this['annotationViews']['add'](_0x33ae80['view'],_0x381261);}}['_calculatePosition'](_0x4ca7b){const _0x3bfd25=this['editor']['config']['get']('collaboration.channelId'),_0x3a369e=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x231608=>_0x231608['channelId']===_0x3bfd25)['findIndex'](_0x458b3d=>_0x458b3d['archivedAt']<_0x4ca7b);return _0x3a369e<0x0||_0x3a369e>this['annotationViews']['length']?this['annotationViews']['length']:_0x3a369e-0x1;}['_toggleDialog'](){const _0x4b6b4a=this['editor'],_0x442f9b=_0x4b6b4a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x4b6b4a['locale'],this['annotationViews'])),'commentsArchive'===_0x442f9b['id']?_0x442f9b['hide']():_0x442f9b['show']({'id':'commentsArchive','title':N(_0x4b6b4a['locale'],'COMMENTS_ARCHIVE'),'icon':_0xdc9f4a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xfa45d9['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x51ee01,_0x474e5c=!0x1){const _0x495bfe=this['editor']['locale'],_0x492674=this['editor']['plugins']['get']('Dialog'),_0x59356c=new _0x51ee01(_0x495bfe);return _0x59356c['bind']('isEnabled')['to'](this,'isEnabled'),_0x59356c['bind']('isOn')['to'](_0x492674,'id',_0x463d0f=>'commentsArchive'===_0x463d0f),_0x59356c['set']({'label':N(_0x495bfe,'COMMENTS_ARCHIVE'),'icon':_0xdc9f4a,'isToggleable':!0x0}),_0x474e5c&&(_0x59356c['tooltip']=!0x0),this['listenTo'](_0x59356c,'execute',()=>this['_toggleDialog']()),_0x59356c;}['_hideDialogOnAnnotationEscape']=_0x24cf58=>{const _0x1c85ac=_0x24cf58['source'];if(!this['annotationViews']['has'](_0x1c85ac['view']))return;const _0x102b95=this['editor']['plugins']['get']('Dialog');_0x102b95['isOpen']&&'commentsArchive'===_0x102b95['id']&&(_0x102b95['hide'](),_0x24cf58['stop']());};}class gi extends _0x48f069{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};
|