@ckeditor/ckeditor5-comments 46.0.2 → 46.0.3
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(_0x134da6={}){function _0x4f0a64(_0x141462){return _0x141462['map'](_0x422566=>String['fromCharCode'](_0x422566))['join']('');}(_0x134da6=Object['assign']({},_0x134da6))['plugins']||(_0x134da6['plugins']=Rt['defaultPlugins']),super(_0x134da6),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[_0x4f0a64([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4f0a64([0x76,0x69,0x65,0x77])][_0x4f0a64([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4f0a64([0x61,0x75,0x74,0x6f]),this[_0x4f0a64([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4f0a64([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4f0a64([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4f0a64([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4f0a64([0x6f,0x6b])});}['create'](){const _0x466c41=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x466c41))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x13ab6a=>{const _0x2334be=this['model']['document']['getRoot'](),_0x54e88f=_0x2334be&&_0x2334be['getChild'](_0x2334be['childCount']-0x1);_0x13ab6a['setSelection'](_0x54e88f,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x4886fb=this['editing']['view'],_0x2db3c3=_0x4886fb['document']['getRoot'](),_0x17292d=_0x2db3c3['getChild'](0x0);_0x2db3c3['childCount']>0x1||!_0x17292d||'p'!=_0x17292d['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x4886fb,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x17292d['placeholder']=this['placeholder']),St({'view':_0x4886fb,'element':_0x17292d,'keepOnFocus':!0x0}),this['placeholderElement']=_0x17292d);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5bf9ba,_0x5e7bab={}){super(_0x5bf9ba),this['editor']=null,this['_editorConfig']=_0x5e7bab,this['set']('value',_0x5e7bab['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x5bf9ba,'Reply...')),this['set']('submitLabel',N(_0x5bf9ba,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x27a125(),this['focusCycler']=new _0x53ae9a({'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',(_0x8c14d4,_0x4d858e)=>{this['cancelButtonView']['fire']('execute'),_0x4d858e();}),this['keystrokes']['set']('Ctrl+Enter',(_0x332ddd,_0x305ccb)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x305ccb());}),this['on']('submit',(_0x303487,_0x48840c)=>{_0x48840c['length']>0xfde8?(alert(N(_0x5bf9ba,'TOO_LONG_COMMENT_ALERT',[_0x48840c['length'],0xfde8])),_0x303487['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 _0x7a8bb4=this['editor'];this['element']['insertBefore'](_0x7a8bb4['ui']['element'],this['element']['firstChild']),_0x7a8bb4['model']['document']['on']('change',()=>this['value']=_0x7a8bb4['getData']()),_0x7a8bb4['bind']('placeholder')['to'](this),this['focusables']['add'](_0x7a8bb4['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x48d790){-0x1===_0x48d790?(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:_0x56213c}=this,_0x5d627a=new _0xebef4f(_0x56213c);return _0x5d627a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5d627a['withText']=!0x0,_0x5d627a['bind']('label')['to'](this,'submitLabel'),_0x5d627a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5d627a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5b7c77,_0x5a1027)=>!_0x5a1027&&!!_0x5b7c77['trim']()),_0x5d627a;}['_createCancelButton'](){const {locale:_0x35af29}=this,_0x32403c=new _0xebef4f(_0x35af29);return _0x32403c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x32403c['label']=N(_0x35af29,'Cancel'),_0x32403c['withText']=!0x0,_0x32403c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x32403c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x41ca48=>{this['focusTracker']['add'](_0x41ca48['element']);}),this['focusables']['on']('change',(_0x1d3c84,_0x4ed5ad)=>{for(const _0x10da80 of Array['from'](_0x4ed5ad['added'])['reverse']())this['focusTracker']['add'](_0x10da80['element']);});}}class ie extends kt{constructor(_0x15a7bf,_0x103da0,_0x203f3f){super(_0x15a7bf),this['commentInputView']=new os(_0x15a7bf,_0x203f3f),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2589a9,_0x44faf7)=>_0x2589a9||!!_0x44faf7),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 _0x18b2e3(_0x15a7bf,_0x103da0),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'](_0x44a023){this['commentInputView']['focus'](_0x44a023);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x51a330,_0x2df5ad)=>{const {submitButtonView:_0xe831e3,cancelButtonView:_0x38486f,editor:_0x45f5e3}=this['commentInputView'];[_0xe831e3['element'],_0x38486f['element'],_0x45f5e3?_0x45f5e3['editing']['view']['getDomRoot']():null]['filter'](_0x1e92bc=>_0x1e92bc)['some'](_0x96b998=>_0x96b998['contains'](_0x2df5ad['target']))||(this['focus'](),_0x2df5ad['preventDefault']());});}}class rs extends kt{constructor(_0x54fdb){super(_0x54fdb);const _0x5d26d1=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5d26d1['to']('count',_0x39d32e=>N(_0x54fdb,'NUMBER_OF_COMMENTS',_0x39d32e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x269db1,_0x46be37,_0x2da9ee){super(_0x269db1);const _0x4cea4c=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x46be37['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x46be37,this['_config']=_0x2da9ee,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x27a125(),this['keystrokes']=new jt(),this['focusCycler']=new _0x53ae9a({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x51185e=>this['commentViews']['map'](_0x7df68d=>_0x7df68d['element'])['includes'](_0x51185e['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x269db1),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x3ec670=>_0x3ec670-this['_config']['maxCommentsWhenCollapsed']);for(const _0xf1238e of _0x46be37['comments'])this['_handleNewCommentModel'](_0xf1238e);this['_handleInfoComment'](),this['listenTo'](_0x46be37['comments'],'add',(_0x166ff2,_0x59f699)=>{const _0x2fdb12=this['_calculatePosition'](_0x59f699);this['length']++,this['_handleNewCommentModel'](_0x59f699,_0x2fdb12),this['refreshVisibleViews']();}),this['listenTo'](_0x46be37['comments'],'remove',(_0x590cdd,_0x156420)=>{this['length']--,this['_handleRemoveCommentModel'](_0x156420),this['refreshVisibleViews']();}),this['listenTo'](_0x46be37,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x46be37,'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',_0x4cea4c['if']('length','ck-hidden',_0x105843=>!_0x105843)],'aria-label':N(_0x269db1,'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'](_0xb1a6ed){-0x1===_0xb1a6ed?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xa42d75 of this['commentViews'])_0xa42d75['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x59a3c0,_0x1cc5c9){const _0x4a4247=new this['_config']['CommentView'](this['locale'],_0x59a3c0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x4a4247['viewUid']=_0x59a3c0['id'],_0x4a4247['delegate']('removeComment')['to'](this),_0x4a4247['delegate']('updateComment')['to'](this),_0x4a4247['delegate']('resolveCommentThread')['to'](this),_0x4a4247['delegate']('editorReady')['to'](this),_0x4a4247['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x4a4247,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x4a4247,_0x1cc5c9);}['_calculatePosition'](_0x749343){const _0x5c34fc=this['_model']['_findOptimalIndex'](_0x749343);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x749343['authoredAt']?_0x5c34fc-0x1:_0x5c34fc:_0x5c34fc-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4775c0={'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'],_0x4775c0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4775c0));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1de6e3){const _0x39d787=this['commentViews']['remove'](_0x1de6e3['id']);this['stopListening'](_0x39d787),_0x39d787['isEditMode']&&this['_updateHasDirtyComment'](),_0x39d787['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3ff78d=>_0x3ff78d['isEditMode']);}['_rearrangeCollapse'](){const _0x2c1f8d=function(_0x27c592){const _0x4f3be2=new _0x15baf7();for(const _0x56dcea of _0x27c592)_0x4f3be2['add'](_0x56dcea);return _0x4f3be2;}(this['commentViews']),_0x356015=this['_collapsedCommentsView']['count'];for(let _0x8391=0x1;_0x8391<=_0x356015;_0x8391++)_0x2c1f8d['remove'](0x1);for(const _0x40e918 of _0x2c1f8d)_0x40e918['collapse']();_0x356015>0x0&&_0x2c1f8d['add'](this['_collapsedCommentsView'],0x1),ns(_0x1978b0(Array['from'](this['visibleViews']),Array['from'](_0x2c1f8d)),this['visibleViews'],_0x2c1f8d);}['_rearrangeExpand'](){ns(_0x1978b0(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x27b79e of this['visibleViews'])_0x27b79e['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5eebdf=>{this['focusTracker']['add'](_0x5eebdf['element']),this['keystrokes']['listenTo'](_0x5eebdf['element']);}),this['commentViews']['on']('change',(_0x47fea9,_0x4e0c73)=>{for(const _0x239d14 of _0x4e0c73['removed'])this['focusTracker']['remove'](_0x239d14['element']),this['keystrokes']['stopListening'](_0x239d14['element']);for(const _0x3b76f0 of Array['from'](_0x4e0c73['added'])['reverse']())this['focusTracker']['add'](_0x3b76f0['element']),this['keystrokes']['listenTo'](_0x3b76f0['element']);});}}function ns(_0xe3d8e,_0x108c72,_0x47d355){let _0xbcfd47=0x0;for(const _0x50f393 of _0xe3d8e)switch(_0x50f393){case'insert':_0x108c72['add'](_0x47d355['get'](_0xbcfd47),_0xbcfd47),_0xbcfd47++;break;case'delete':_0x108c72['remove'](_0xbcfd47);break;case'equal':_0xbcfd47++;}}class oe extends kt{constructor(_0xfba0c9){super(_0xfba0c9);const _0xdabef4=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0xdabef4['to']('contextValue',_0x1fb403=>N(_0xfba0c9,'THREAD_CONTEXT_LABEL',_0x1fb403)),'tabindex':-0x1},'children':[{'text':_0xdabef4['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x51eda1,_0x5d90e3){super(_0x51eda1);const _0x2a1c73=this['bindTemplate'];this['_model']=_0x5d90e3,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x27a125(),this['keystrokes']=new jt(),this['focusCycler']=new _0x53ae9a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x528455=>!!_0x528455),this['bind']('contextValue')['to'](this['_model'],'context',_0x2e6648=>_0x2e6648&&_0x2e6648['value']?this['_trimContextValue'](_0x2e6648['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',_0x2a1c73['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 _0x5db9ed=new _0xebef4f(this['locale']);return _0x5db9ed['label']=N(this['locale'],'Reopen'),_0x5db9ed['tooltip']=N(this['locale'],'Reopen'),_0x5db9ed['icon']=_0x4e8910,_0x5db9ed['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x55344c=>!_0x55344c),_0x5db9ed['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3504e3,_0x3480c9)=>_0x3504e3&&_0x3480c9),_0x5db9ed['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5db9ed;}['_trimContextValue'](_0x1eb930){if(_0x1eb930['length']<0x96)return _0x1eb930;const _0x5ee181=_0x1eb930['lastIndexOf']('\x20',0x93);return _0x1eb930['substring'](0x0,_0x5ee181>-0x1?_0x5ee181:0x93)+'...';}['_attachContextActions'](){const _0x2ac362=this['element']['querySelector']('.ck-context'),_0x4bb55c=_0x2ac362['querySelector']('.ck-context__value');this['listenTo'](_0x2ac362,'mouseenter',()=>{_0x4bb55c['offsetWidth']<_0x4bb55c['scrollWidth']&&_0x2ac362['classList']['add']('overlay');}),this['listenTo'](_0x2ac362,'mouseleave',()=>{_0x2ac362['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x9ffbd4 of this['focusables'])this['focusTracker']['add'](_0x9ffbd4['element']),this['keystrokes']['listenTo'](_0x9ffbd4['element']);}['_createContextView'](){const _0x42a269=new oe(this['locale']);return _0x42a269['bind']('contextValue')['to'](this),_0x42a269;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5734fc,_0x217333,_0x4eb32e,_0x57e8ab){super(_0x5734fc),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x217333,this['_localUser']=_0x4eb32e,this['_config']=_0x57e8ab,this['commentThreadHeaderView']=new Yt(_0x5734fc,_0x217333),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5734fc,N(_0x5734fc,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5734fc,_0x217333,Object['assign']({'CommentView':this['_config']['CommentView']},_0x57e8ab)),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',(_0x393cf5,_0x3ad45c)=>_0x393cf5||!!_0x3ad45c),this['bind']('isUnlinked')['to'](_0x217333,'unlinkedAt',_0x5e648b=>!!_0x5e648b),this['bind']('ariaLabel')['to'](this,'length',_0x3d5d21=>{const _0x5ec101=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x3d5d21,_0x5ec101]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x27a125(),this['keystrokes']=new jt(),this['focusCycler']=new _0x53ae9a({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd743ad=>_0xd743ad['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 _0x2f16c2=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3fe8aa=_0x2f16c2['commentInputView'];return _0x2f16c2['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3fe8aa,'value',(_0x2bb58b,_0x6d01ff,_0x31dea9,_0x5a4222,_0x37670a)=>!!_0x37670a||!!_0x5a4222&&_0x31dea9&&!_0x6d01ff||_0x2bb58b&&_0x31dea9&&!_0x6d01ff),_0x3fe8aa['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xe1c1d1,_0x17e52f,_0x219804)=>{let _0x4318bd;return _0x4318bd=_0x219804&&_0x17e52f?'Reply\x20to\x20reopen\x20discussion...':_0xe1c1d1?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x4318bd);}),_0x3fe8aa['bind']('submitLabel')['to'](this,'length',_0x2e1895=>N(this['locale'],_0x2e1895?'Reply':'Comment')),_0x3fe8aa['on']('submit',(_0x2b1748,_0x5eec5d)=>{this['fire']('addComment',_0x5eec5d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3fe8aa['on']('cancel',()=>{this['focus']();}),_0x3fe8aa['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3fe8aa['on']('cancel',_0x4ea2bd=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4ea2bd['stop']());}),this['on']('change:isActive',(_0x34e95c,_0x156dcb,_0x2da5a1)=>{_0x2da5a1||this['length']||_0x3fe8aa['value']||this['fire']('removeCommentThread');}),_0x2f16c2;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x45c4d8(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2326b9,target:_0x18ead6,type:_0x5a2311,isVisible:_0x5712d9=!0x0}){super(),this['view']=_0x2326b9,this['view']['element']||this['view']['render'](),this['_type']=_0x5a2311,this['_target']=_0x18ead6,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x15baf7([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1dd02d,_0x4554bf)=>{this['view']['focusTracker']['add'](_0x4554bf);}),this['focusableElements']['on']('remove',(_0x3edbf2,_0x33fbc2)=>{this['view']['focusTracker']['remove'](_0x33fbc2);}),this['set']('isVisible',_0x5712d9);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4dd0d3=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x4dd0d3),_0x4dd0d3;}get['targetRect'](){const _0x3c1353=this['target'];if(null===_0x3c1353)return null;if(_0x3c1353 instanceof _0x330918)return _0x3c1353;const _0x225f77=_0x3c1353['filter'](_0x4ab589=>function(_0x4031a1){const _0x84114c=_0x4031a1['offsetParent'];if(_0x84114c)return!0x0;const _0x37e73b=_0x4031a1['getClientRects']()['item'](0x0);return!!_0x37e73b;}(_0x4ab589));return 0x0===_0x225f77['length']?null:new _0x330918(_0x225f77[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1cad70){this['view']['isActive']=_0x1cad70,this['view']['mainView']['isActive']=_0x1cad70;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x55fb7f){if(!(null===_0x55fb7f||_0x55fb7f instanceof _0x330918||Array['isArray'](_0x55fb7f)&&_0x55fb7f['every'](_0xbfb952=>fi(_0xbfb952))))throw new _0x20868b('annotation-invalid-target',null,{'target':_0x55fb7f});}['_getNormalizedTarget'](){const _0x1add77='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x1add77)?[_0x1add77]:_0x1add77;}}function fi(_0x511819){return null!==_0x511819&&'object'==typeof _0x511819&&'nodeType'in _0x511819&&0x1===_0x511819['nodeType'];}class S extends _0x15baf7{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x26edf3=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x27a125(),this['_focusTracker']['on']('change:isFocused',(_0x8a3fdd,_0x57b2f8,_0x88cc9a)=>{_0x88cc9a||this['fire']('blur');});for(const _0x2bf51d of _0x26edf3)this['add'](_0x2bf51d);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2cbede){if(this['has'](_0x2cbede))throw new _0x20868b('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2cbede['innerView'],_0x2cbede),this['_viewToAnnotation']['set'](_0x2cbede['view'],_0x2cbede);for(const _0x4bd784 of _0x2cbede['focusableElements'])this['_focusTracker']['add'](_0x4bd784);this['listenTo'](_0x2cbede['focusableElements'],'add',(_0x54caaa,_0x5d2394)=>{this['_focusTracker']['add'](_0x5d2394);}),this['listenTo'](_0x2cbede['focusableElements'],'remove',(_0x1284be,_0x229565)=>{this['_focusTracker']['remove'](_0x229565);}),this['listenTo'](_0x2cbede['view']['focusTracker'],'change:isFocused',(_0xeeb48e,_0x21d823,_0x2a9454)=>{_0x2a9454&&this['fire']('focus',_0x2cbede);}),_0x2cbede['updateTargetRect']();const _0x230324=this['_getOrderInContent'](_0x2cbede['view']['targetRect']);return super['add'](_0x2cbede,_0x230324);}['remove'](_0x217d02){if(!this['has'](_0x217d02))throw new _0x20868b('annotationcollection-not-existing-item',null);this['stopListening'](_0x217d02['view']['focusTracker']),this['stopListening'](_0x217d02['focusableElements']);for(const _0xae3816 of _0x217d02['focusableElements'])this['_focusTracker']['remove'](_0xae3816);return this['_viewToAnnotation']['delete'](_0x217d02['view']),this['_innerViewToAnnotation']['delete'](_0x217d02['innerView']),super['remove'](_0x217d02);}['getByInnerView'](_0x2e2064){return this['_innerViewToAnnotation']['get'](_0x2e2064);}['getByView'](_0x204a57){return this['_viewToAnnotation']['get'](_0x204a57);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x29f69f of this)_0x29f69f['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4ce715=Array['from'](this)['sort']((_0x124ba7,_0x60a3f2)=>w(_0x124ba7['view']['targetRect'],_0x60a3f2['view']['targetRect']));for(let _0x29a1cf=_0x4ce715['length']-0x1;_0x29a1cf>0x0;_0x29a1cf--){const _0x1aa035=_0x4ce715[_0x29a1cf];_0x29a1cf!==this['getIndex'](_0x1aa035)&&(this['remove'](_0x1aa035),this['add'](_0x1aa035));}}['_getOrderInContent'](_0x4d92d7){let _0x31c038=0x0;if(!_0x4d92d7)return this['length'];for(const _0x4c6770 of this){const _0x33e740=_0x4c6770['view']['targetRect'];if(_0x33e740){if(w(_0x4d92d7,_0x33e740)<0x0)return _0x31c038;_0x31c038++;}}return _0x31c038;}}function v({source:_0x1f2e19,target:_0x50dd40,filter:_0x55344b}){for(const _0x1f00a0 of _0x1f2e19)_0x55344b(_0x1f00a0)&&_0x50dd40['add'](_0x1f00a0);_0x50dd40['listenTo'](_0x1f2e19,'add',(_0x551b97,_0x217e45)=>{_0x55344b(_0x217e45)&&_0x50dd40['add'](_0x217e45);}),_0x50dd40['listenTo'](_0x1f2e19,'remove',(_0x23d906,_0xab9849)=>{_0x50dd40['has'](_0xab9849)&&_0x50dd40['remove'](_0xab9849);});}function w(_0x27c07a,_0x16bd66){if(null===_0x27c07a&&null===_0x16bd66)return 0x0;if(null===_0x27c07a)return-0x1;if(null===_0x16bd66)return 0x1;const _0x233a54=_0x27c07a['top']-_0x16bd66['top'];return 0x0==_0x233a54?_0x27c07a['left']-_0x16bd66['left']:_0x233a54;}class y extends _0x590f0e{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x336cdb){if(super(_0x336cdb),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x336cdb instanceof _0x5717b8){const _0x1f7793=_0x336cdb['locale'];_0x336cdb['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x1f7793,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x1f7793,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x1f7793,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x1f7793,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x1f7793,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x1f7793,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x1f7793,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3302b3){this['collection']['add'](_0x3302b3);}['remove'](_0x5c2a3d){this['collection']['remove'](_0x5c2a3d),_0x5c2a3d['destroy']();}['refreshVisibility'](){for(const _0x53a92c of this['collection'])_0x53a92c['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1de096){return this['collection']['getByInnerView'](_0x1de096);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4d3986 of this['collection'])_0x4d3986['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1c1506){this['fire']('_activateAnnotation',_0x1c1506);}['createAnnotation'](_0x4ce7fe){return new T(_0x4ce7fe);}['createAnnotationView'](_0x3da174,_0x2f8c22){return new E(_0x3da174,_0x2f8c22);}['_addActiveAnnotation'](_0x128b7a){const _0x20d566=new Set(this['activeAnnotations']);_0x20d566['add'](_0x128b7a),this['activeAnnotations']=_0x20d566;}['_removeActiveAnnotation'](_0x272cfb){const _0x1ed906=new Set(this['activeAnnotations']);_0x1ed906['delete'](_0x272cfb),this['activeAnnotations']=_0x1ed906;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4a1891=this['collection'],_0x4abe36=this['_visibleAnnotations'];function _0x1047a9(_0x4dfba0){const _0x237d5b=_0x4dfba0['source'];_0x237d5b['isVisible']&&!_0x4abe36['has'](_0x237d5b)?_0x4abe36['add'](_0x237d5b):!_0x237d5b['isVisible']&&_0x4abe36['has'](_0x237d5b)&&_0x4abe36['remove'](_0x237d5b),_0x237d5b['view']['focusTracker']['remove'](_0x237d5b['view']['element']),_0x237d5b['view']['focusTracker']['add'](_0x237d5b['view']['element']);}this['listenTo'](_0x4a1891,'add',(_0x226d02,_0x2e5acd)=>{_0x2e5acd['isVisible']&&_0x4abe36['add'](_0x2e5acd),this['listenTo'](_0x2e5acd,'change:isVisible',_0x1047a9);}),this['listenTo'](_0x4a1891,'remove',(_0x145132,_0x27e722)=>{_0x4abe36['has'](_0x27e722)&&_0x4abe36['remove'](_0x27e722),this['stopListening'](_0x27e722,'change:isVisible',_0x1047a9);});}['_setupEnterAnnotationKeystroke'](){const _0x5b6417=_0x3d41e4=>{_0x3d41e4['on']('ready',()=>{_0x3d41e4['keystrokes']['set'](_0x18f63a,(_0x36f52e,_0x33ac6e)=>{const _0x458703=_0x49612f(this['activeAnnotations']['values']());_0x458703&&(_0x458703['view']['focus'](),_0x33ac6e());});});};this['context']instanceof _0x5717b8?_0x5b6417(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x5f29ec,_0x93575f)=>{_0x5b6417(_0x93575f);});}['_setupEscapeAnnotationHandling'](){const _0x2ddae6=_0x4bd047=>{const _0x2fb7e0=_0x4bd047['source'],_0x1ffa86=[];let _0x1a4e28;if(Array['isArray'](_0x2fb7e0['target'])){_0x1a4e28=_0x2fb7e0['target'][0x0],this['context']instanceof _0x5717b8?_0x1ffa86['push'](this['context']):this['context']['editors']&&_0x1ffa86['push'](...this['context']['editors']);for(const _0x361d1b of _0x1ffa86)for(const _0x35ed26 of _0x361d1b['editing']['view']['domRoots']['values']())if(_0x35ed26['contains'](_0x1a4e28))return void _0x361d1b['editing']['view']['focus']();_0x1a4e28['focus']();}};this['listenTo'](this['collection'],'add',(_0x349533,_0x3a4330)=>{this['listenTo'](_0x3a4330,'escape',_0x2ddae6,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x475e0d,_0x57fb8b)=>{this['stopListening'](_0x57fb8b,'escape',_0x2ddae6);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x590f0e{['_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(_0x1187f5){super(_0x1187f5),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x22c271=this['context']['config'];_0x22c271['define']('comments.maxCommentsWhenCollapsed',0x2),_0x22c271['define']('comments.maxThreadTotalWeight',0x1f4),_0x22c271['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x22c271['define']('comments.CommentThreadView',gt),_0x22c271['define']('comments.CommentView',Tt),_0x22c271['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0xe78f93=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5e6cbf,_0x4e1c2c)=>this['_addCommentThread'](_0x4e1c2c)),this['on']('submitCommentThread',(_0x2f3aa2,_0x16e823)=>this['_submitCommentThread'](_0x16e823)),this['on']('resolveCommentThread',(_0x297dd7,_0x1fa97a)=>this['_resolveCommentThread'](_0x1fa97a)),this['on']('resolveCommentThread',(_0x14c73b,_0x8df7c)=>this['_updateActiveAnnotation'](_0x8df7c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5b39a4,_0x5d367d)=>this['_reopenCommentThread'](_0x5d367d)),this['on']('reopenCommentThread',(_0x131f5c,_0x5d3855)=>this['_updateActiveAnnotation'](_0x5d3855),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1b1beb,_0x282277)=>this['_removeCommentThread'](_0x282277)),this['on']('updateCommentThread',(_0x30e6c5,_0x13800f)=>this['_updateCommentThread'](_0x13800f)),this['on']('updateCommentThread',(_0x2034cc,_0x29d6e0)=>this['_updateActiveAnnotation'](_0x29d6e0),{'priority':'lowest'}),this['on']('addComment',(_0xe554cf,_0x337e18)=>this['_addComment'](_0x337e18)),this['on']('updateComment',(_0x259da5,_0x4cb95f)=>this['_updateComment'](_0x4cb95f)),this['on']('removeComment',(_0x83c586,_0x38faf2)=>this['_removeComment'](_0x38faf2)),this['on']('addComment',(_0x5651a8,{threadId:_0xb48bcc,isFromAdapter:_0x5749b4})=>{if(_0x5749b4)return;const _0x2b8658=this['getCommentThread'](_0xb48bcc),_0x498ff3=_0x2b8658&&this['_threadToController']['get'](_0x2b8658);_0x498ff3&&_0x498ff3['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0xe78f93,'change:activeAnnotations',(_0x533bde,_0x41fbaf,_0x44df71)=>{const _0x5c65d8=Array['from'](_0x44df71)['map'](_0x478fa7=>this['_viewToController']['get'](_0x478fa7['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5c65d8?_0x5c65d8['model']:null;});}set['adapter'](_0x4c4881){if(this['_adapter'])throw new _0x20868b('commentsrepository-adapter-already-set');this['_adapter']=_0x4c4881;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x295dc2=_t,threadId:_0x57189d=_0x4151cd(),comments:_0x9f5bae=[],unlinkedAt:_0x290a93=null,resolvedAt:_0x5ac575=null,resolvedBy:_0x15ff26=null,target:_0x5c8271=null,context:_0x543fb6=null,attributes:_0x4d1815={},isResolvable:_0x569852=!0x0,isSubmitted:_0x29394d=!0x1,isFromAdapter:_0x2e0e8=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x295dc2),{'channelId':_0x295dc2,'threadId':_0x57189d,'comments':_0x9f5bae,'unlinkedAt':_0x290a93,'resolvedAt':_0x5ac575,'resolvedBy':_0x15ff26,'target':_0x5c8271,'context':_0x543fb6,'attributes':_0x4d1815,'isFromAdapter':_0x2e0e8,'isResolvable':_0x569852,'isSubmitted':_0x29394d}),this['getCommentThread'](_0x57189d);}['openNewCommentThread']({channelId:_0x43b202=_t,threadId:_0xb13e32=_0x4151cd(),target:_0x4faf7a,context:_0x17fe41=null,isResolvable:_0x5082d9=!0x0}){if(this['_readOnlyChannels']['has'](_0x43b202)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x4faf7a)throw new _0x20868b('commentsrepository-missing-target');const _0x5b6afc=this['addCommentThread']({'channelId':_0x43b202,'threadId':_0xb13e32,'target':_0x4faf7a,'context':_0x17fe41,'isResolvable':_0x5082d9});if(!_0x5b6afc)return null;const _0x553a90=this['_threadToController']['get'](_0x5b6afc),_0x5dc793=_0x553a90['view']['commentThreadInputView']['commentInputView'],_0x38d9cd=this['context']['plugins']['get'](y),_0x5dd566=_0x38d9cd['getByInnerView'](_0x553a90['view']);return _0x38d9cd['activate'](_0x5dd566),_0x5dc793['once']('editorReady',()=>_0x5dc793['focus']()),_0x5b6afc;}['hasCommentThread'](_0x5a64a1){if('string'!=typeof _0x5a64a1)throw new _0x20868b('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5a64a1);}['updateCommentThread']({channelId:_0x5a1b2e=_t,threadId:_0x52c6fd,context:_0xb8be4,unlinkedAt:_0x64800c,attributes:_0x2d8842,isFromAdapter:_0x43056e=!0x1}){return this['fire'](Nt('updateCommentThread',_0x5a1b2e),{'channelId':_0x5a1b2e,'threadId':_0x52c6fd,'context':_0xb8be4,'unlinkedAt':_0x64800c,'attributes':_0x2d8842,'isFromAdapter':_0x43056e}),this['getCommentThread'](_0x52c6fd);}['getCommentThread'](_0xfeccca){if('string'!=typeof _0xfeccca)throw new _0x20868b('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0xfeccca);}['fetchCommentThread']({channelId:_0x257833,threadId:_0x1f81de}={}){const _0x3f9987=this['getCommentThread'](_0x1f81de);if(_0x3f9987)return Promise['resolve'](_0x3f9987);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x20868b('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x257833,'threadId':_0x1f81de})['then'](_0x4c57dd=>this['hasCommentThread'](_0x1f81de)?this['getCommentThread'](_0x1f81de):_0x4c57dd?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x257833},_0x4c57dd)):void 0x0)['catch'](_0x2d480d=>{throw console['error'](_0x2d480d),new _0x20868b('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1bb84b,skipNotAttached:_0x3b8bbe=!0x1,skipEmpty:_0x16be3c=!0x1,toJSON:_0x276e66=!0x1}={}){const _0x5029e0=[];for(const _0x43d965 of this['_threads']['values']())_0x1bb84b&&_0x43d965['channelId']!==_0x1bb84b||_0x3b8bbe&&!_0x43d965['isAttached']||_0x16be3c&&0x0===_0x43d965['length']||_0x5029e0['push'](_0x43d965);return _0x276e66?_0x5029e0['map'](_0x5ae3e0=>_0x5ae3e0['toJSON']()):_0x5029e0;}['getAnnotationForCommentThread'](_0x485f2e){const _0x711c98=this['_threadToController']['get'](_0x485f2e);if(!_0x711c98)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x711c98['view'])||null;}['getCommentThreadForAnnotation'](_0x4574e0){const _0xc4783c=this['_viewToController']['get'](_0x4574e0['innerView']);return _0xc4783c?_0xc4783c['model']:null;}['setActiveCommentThread'](_0x5a487c){const _0x436494=this['context']['plugins']['get'](y);if(!_0x5a487c)return void(this['activeCommentThread']&&_0x436494['deactivateAll']());const _0x4aabf3=this['getCommentThread'](_0x5a487c);if(!_0x4aabf3)throw new _0x20868b('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x5a487c});if(!this['_threadToController']['has'](_0x4aabf3))throw new _0x20868b('commentsrepository-active-not-attached',null,{'threadId':_0x5a487c});const _0x3bd177=_0x436494['getByInnerView'](this['_threadToController']['get'](_0x4aabf3)['view']);_0x436494['activate'](_0x3bd177);}['switchReadOnly'](_0x47c1ea,_0x2b8eec){_0x47c1ea?this['_readOnlyChannels']['add'](_0x2b8eec):this['_readOnlyChannels']['delete'](_0x2b8eec),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5c4f3b){return this['_readOnlyChannels']['has'](_0x5c4f3b)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x521cd7,_0xe8b52e){return new vt(_0x521cd7,_0xe8b52e);}['setPermissions'](_0x1cc2bf,_0x4f1354=_t){this['_permissions']['set'](_0x4f1354,_0x1cc2bf),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x593a80=_t){return this['_permissions']['has'](_0x593a80)?this['_permissions']['get'](_0x593a80):bt;}['_addCommentThread']({channelId:_0x4fdb94,threadId:_0x58b1e5,comments:_0x3faf3b,unlinkedAt:_0x3dfd14,resolvedAt:_0x2bb048,resolvedBy:_0x34d48c,target:_0x50a186,context:_0x564ce6,attributes:_0x469af2,isFromAdapter:_0xc3c67c,isResolvable:_0x4aff15,isSubmitted:_0x1db9aa}){if('string'!=typeof _0x58b1e5)throw new _0x20868b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x58b1e5});if(this['hasCommentThread'](_0x58b1e5))throw new _0x20868b('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x58b1e5});const _0x3d5860=new pi(this,{'channelId':_0x4fdb94,'id':_0x58b1e5,'context':_0x564ce6,'attributes':_0x469af2,'unlinkedAt':_0x3dfd14,'resolvedAt':_0x2bb048,'resolvedBy':_0x34d48c?this['context']['plugins']['get'](it)['getUser'](_0x34d48c):null,'isResolvable':_0x4aff15,'isSubmitted':_0x1db9aa||_0xc3c67c});this['_threads']['set'](_0x58b1e5,_0x3d5860);for(const _0x5a94e7 of _0x3faf3b)_0x3d5860['_add'](this['_createNewComment']({'threadId':_0x58b1e5,..._0x5a94e7}));return _0x50a186&&_0x3d5860['attachTo'](_0x50a186),_0xc3c67c||!_0x3d5860['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4fdb94,'threadId':_0x58b1e5});}['_submitCommentThread']({channelId:_0x586a34,threadId:_0x1c9087}){if(!this['hasCommentThread'](_0x1c9087))throw new _0x20868b('commentsrepository-missing-comment-thread',this);const _0x2d2fc1=this['getCommentThread'](_0x1c9087);if(_0x2d2fc1['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x18f3cd,comments:_0x5b7aa2,resolvedAt:_0x2fbc55,resolvedBy:_0x1be642,context:_0x5a2163,attributes:_0x12f272}=_0x2d2fc1,_0x2e8035=this['context']['plugins']['get']('PendingActions'),_0x2719f0=_0x2e8035['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x586a34,'threadId':_0x18f3cd,'comments':_0x5b7aa2['map'](_0x5c58ef=>_0x5c58ef['toJSON']()),'resolvedAt':_0x2fbc55,'resolvedBy':_0x1be642?_0x1be642['id']:_0x1be642,'context':_0x5a2163,'attributes':_0x12f272})['then'](({comments:_0x1d1956})=>{_0x2e8035['remove'](_0x2719f0);for(const _0x1a36e1 of _0x1d1956)this['_updateComment']({'channelId':_0x586a34,'threadId':_0x1c9087,'commentId':_0x1a36e1['commentId'],'createdAt':_0x1a36e1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0xfc122b=>{throw console['error'](_0xfc122b),new _0x20868b('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5050cf,target:_0x5724b4}){const _0x2771bc=this['getCommentThread'](_0x5050cf);if(!_0x2771bc)throw new _0x20868b('commentsrepository-attach-missing-comment-thread',this);const _0x5c18e9=this['context']['plugins']['get']('PendingActions'),_0xb29089=this['context']['plugins']['get'](y),_0x392c1a=this['_createCommentThreadView'](_0x2771bc),_0x29fd82=new vt(_0x2771bc,_0x392c1a);let _0x9722b8=null;_0x392c1a['on']('change:isDirty',(_0xc7fd53,_0x5b2867,_0x2dd874)=>{_0x2dd874?_0x9722b8=_0x5c18e9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x9722b8&&(_0x5c18e9['remove'](_0x9722b8),_0x9722b8=null);}),this['_threadToController']['set'](_0x2771bc,_0x29fd82),this['_viewToController']['set'](_0x392c1a,_0x29fd82);const _0x39f372=new E(this['context']['locale'],_0x392c1a);_0x39f372['bind']('length')['to'](_0x392c1a),_0x39f372['bind']('isDirty')['to'](_0x392c1a,'isDirty',_0x392c1a,'length',(_0x49719f,_0x1207a6)=>_0x49719f||!_0x1207a6),_0x39f372['bind']('isActive')['to'](_0x392c1a),_0x39f372['type']='comment';const _0x55863b=new T({'view':_0x39f372,'target':_0x5724b4,'type':'comment','isVisible':!_0x2771bc['archivedAt']&&!!('function'==typeof _0x5724b4?_0x5724b4():_0x5724b4)});return _0x392c1a['on']('escape',()=>{_0x55863b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x392c1a,_0x55863b),_0xb29089['add'](_0x55863b),_0x55863b;}['_bindAnnotationToEditors'](_0x325914,_0x3a8e07){this['listenTo'](_0x325914,'editorReady',(_0x3da605,_0x2f8a74)=>{const _0x336cd3=_0x2f8a74['ui']['view']['body']['bodyCollectionContainer'];_0x3a8e07['focusableElements']['add'](_0x336cd3),this['context']instanceof _0x5717b8&&this['context']['ui']['focusTracker']['add'](_0x336cd3);},{'priority':'highest'}),this['listenTo'](_0x325914,'editorDestroyed',(_0x778fe2,_0x57bc52)=>{const _0x21b44d=_0x57bc52['ui']['view']['body']['bodyCollectionContainer'];_0x3a8e07['focusableElements']['has'](_0x21b44d)&&_0x3a8e07['focusableElements']['remove'](_0x21b44d),this['context']instanceof _0x5717b8&&this['context']['ui']['focusTracker']['remove'](_0x21b44d);});}['_unbindEditors'](_0x234eb9){this['stopListening'](_0x234eb9,'editorReady'),this['stopListening'](_0x234eb9,'editorDestroyed');}['_createCommentThreadView'](_0x11bb01){const _0x4c5cb1=this['context']['plugins']['get'](it),{config:_0x172e5e,locale:_0x3e396d}=this['context'],_0xdc2512=pt(_0x172e5e['get']('locale'),_0x3e396d);return new(0x0,(_0x172e5e['get']('comments'))['CommentThreadView'])(_0x3e396d,_0x11bb01,_0x4c5cb1['me'],{'editorConfig':{..._0x172e5e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x172e5e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x172e5e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x172e5e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x172e5e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xdc2512,'CommentView':_0x172e5e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x34c90d,channelId:_0x12378e,resolvedAt:_0x531458,resolvedBy:_0x29bdb2,isFromAdapter:_0x57fea2}){if(!this['hasCommentThread'](_0x34c90d))throw new _0x20868b('commentsrepository-missing-comment-thread',null,{'threadId':_0x34c90d});const _0x32c013=this['getCommentThread'](_0x34c90d);if(_0x32c013['isResolved'])throw new _0x20868b('commentsrepository-resolved-comment-thread',null,{'threadId':_0x34c90d});const _0x17e0a3=this['context']['plugins']['get'](it);if(_0x32c013['resolvedBy']=_0x17e0a3['getUser'](_0x29bdb2),_0x32c013['resolvedAt']=_0x531458,_0x57fea2||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4a15bf=this['context']['plugins']['get']('PendingActions'),_0x2bbfb7=_0x4a15bf['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x12378e,'threadId':_0x34c90d})['then'](({resolvedAt:_0x4e1d7a,resolvedBy:_0x9d98cf})=>{_0x4a15bf['remove'](_0x2bbfb7),_0x32c013['resolvedBy']['id']!==_0x9d98cf&&(_0x32c013['resolvedBy']=_0x17e0a3['getUser'](_0x9d98cf)),_0x32c013['resolvedAt']=_0x4e1d7a;})['catch'](_0x3f3824=>{throw console['error'](_0x3f3824),new _0x20868b('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x50df5d,channelId:_0x12f21a,isFromAdapter:_0xe59679}){if(!this['hasCommentThread'](_0x50df5d))throw new _0x20868b('commentsrepository-missing-comment-thread',null,{'threadId':_0x50df5d});const _0x29a81f=this['getCommentThread'](_0x50df5d);if(!_0x29a81f['isResolved'])throw new _0x20868b('commentsrepository-reopen-comment-thread',null,{'threadId':_0x50df5d});if(_0x29a81f['resolvedBy']=null,_0x29a81f['resolvedAt']=null,_0xe59679||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x28e4cb=this['context']['plugins']['get']('PendingActions'),_0x4cdc87=_0x28e4cb['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x12f21a,'threadId':_0x50df5d})['then'](()=>_0x28e4cb['remove'](_0x4cdc87))['catch'](_0x5eadd4=>{throw console['error'](_0x5eadd4),new _0x20868b('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x9bb7a4,isFromAdapter:_0x11f126}){const _0x25d4ad=this['getCommentThread'](_0x9bb7a4);if(!_0x25d4ad)throw new _0x20868b('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x9bb7a4),this['_threads']['delete'](_0x9bb7a4),!_0x25d4ad['isSubmitted']||_0x11f126||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2f2cc0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4b78bf}=_0x25d4ad,_0x1dcf8c=_0x2f2cc0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4b78bf,'threadId':_0x9bb7a4})['then'](()=>_0x2f2cc0['remove'](_0x1dcf8c))['catch'](_0x96ef6d=>{throw console['error'](_0x96ef6d),new _0x20868b('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2bcfe9,unlinkedAt:_0x31409e,context:_0x2396d0,attributes:_0x2bd689,isFromAdapter:_0x158fd7}){if('string'!=typeof _0x2bcfe9)throw new _0x20868b('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2bcfe9});if(!this['hasCommentThread'](_0x2bcfe9))throw new _0x20868b('commentsrepository-missing-comment-thread',null,{'threadId':_0x2bcfe9});const _0x597a9f=this['getCommentThread'](_0x2bcfe9);let _0x441b20=!0x1;if(void 0x0!==_0x2396d0&&_0x597a9f['context']!==_0x2396d0&&(_0x597a9f['context']=_0x2396d0,_0x441b20=!0x0),void 0x0!==_0x31409e&&_0x597a9f['unlinkedAt']!==_0x31409e&&(_0x597a9f['unlinkedAt']=_0x31409e,_0x441b20=!0x0),_0x2bd689&&!At(_0x2bd689,_0x597a9f['attributes'])&&(_0x597a9f['attributes']=_0x2bd689,_0x441b20=!0x0),!_0x441b20)return Promise['resolve']();if(!_0x597a9f['isSubmitted']||_0x158fd7||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x188491=this['context']['plugins']['get']('PendingActions'),{channelId:_0x11f5d6}=_0x597a9f,_0x28c9b5=_0x188491['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x11f5d6,'threadId':_0x2bcfe9,'context':_0x2396d0,'unlinkedAt':_0x31409e,'attributes':_0x2bd689})['then'](()=>_0x188491['remove'](_0x28c9b5))['catch'](_0x3403af=>{throw console['error'](_0x3403af),new _0x20868b('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2f76f6){const _0x10fe0a=this['context']['plugins']['get'](y),_0x4227fe=this['getCommentThread'](_0x2f76f6);if(_0x4227fe['_isAttached']=!0x1,this['_threadToController']['has'](_0x4227fe)){const _0x250383=this['_threadToController']['get'](_0x4227fe),_0x4208fb=_0x250383['view'],_0x39ebcd=_0x10fe0a['getByInnerView'](_0x4208fb);this['_threadToController']['delete'](_0x4227fe),this['_viewToController']['delete'](_0x4208fb),_0x39ebcd&&_0x10fe0a['remove'](_0x39ebcd),_0x250383['destroy'](),_0x4208fb['destroy']()['then'](()=>{this['_unbindEditors'](_0x4208fb);});}}['_updateActiveAnnotation']({threadId:_0x210c1d,resolvedAt:_0x21e63c,unlinkedAt:_0x439d09}){const _0x388f02=!!_0x21e63c,_0x360729=this['context']['plugins']['get'](y),_0x411ca2=this['getCommentThread'](_0x210c1d);if(this['_threadToController']['has'](_0x411ca2)){const _0x284d73=this['_threadToController']['get'](_0x411ca2)['view'],_0x58a333=_0x360729['getByInnerView'](_0x284d73);_0x58a333&&(_0x388f02&&_0x360729['_removeActiveAnnotation'](_0x58a333),_0x439d09?_0x58a333['isVisible']=!0x1:_0x58a333['refreshVisibility']());}}['_getExternalAuthor'](_0x356064){const _0x509a95=this['context']['plugins']['get'](it),_0x6c889b=It('external:'+_0x356064),_0x3889e8=_0x509a95['getUser'](_0x6c889b);return _0x3889e8||_0x509a95['addUser']({'id':_0x6c889b,'name':_0x356064});}['_createNewComment']({threadId:_0x57e5ac,commentId:_0x3868ed=_0x4151cd(),content:_0x3f8ff2,authorId:_0x203159,createdAt:_0x353613,attributes:_0x1a32db}){if('string'!=typeof _0x3868ed)throw new _0x20868b('commentsrepository-invalid-commentid');if('string'!=typeof _0x203159)throw new _0x20868b('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3f8ff2||!_0x3f8ff2['trim']())throw new _0x20868b('commentsrepository-invalid-comment-content');const _0x461328=this['context']['plugins']['get'](it)['getUser'](_0x203159);if(!_0x461328)throw new _0x20868b('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x203159});let _0x1618ca=null,_0x2f8778=_0x353613;return _0x1a32db?.['@external']&&(_0x1618ca=this['_getExternalAuthor'](_0x1a32db['@external']['authorName']),_0x2f8778=new Date(_0x1a32db['@external']['createdAt'])),new wi(this,{'threadId':_0x57e5ac,'id':_0x3868ed,'author':_0x1618ca||_0x461328,'creator':_0x461328,'content':_0x3f8ff2,'createdAt':_0x353613,'authoredAt':_0x2f8778,'attributes':_0x1a32db});}['_addComment'](_0x516771){let {threadId:_0x3d1b70,content:_0x17d195,attributes:_0xab4244,isFromAdapter:_0x29e33a}=_0x516771;const _0x967666=this['getCommentThread'](_0x516771['threadId']);if(!_0x967666)throw new _0x20868b('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x12b5bd=this['_createNewComment'](_0x516771),{id:_0x50baf4}=_0x12b5bd;if(_0x967666['_add'](_0x12b5bd),_0x29e33a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x967666['isSubmitted'])return Promise['resolve']();const _0x2541f7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x330a03}=_0x967666,_0x9c16d6=_0x2541f7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xab4244||(_0xab4244={}),this['adapter']['addComment']({'channelId':_0x330a03,'threadId':_0x3d1b70,'commentId':_0x50baf4,'content':_0x17d195,'attributes':_0xab4244})['then'](_0x1ae6a1=>{_0x2541f7['remove'](_0x9c16d6),_0x1ae6a1&&this['_updateComment']({'channelId':_0x330a03,'threadId':_0x3d1b70,'commentId':_0x50baf4,'createdAt':_0x1ae6a1['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1a640a=>{throw console['error'](_0x1a640a),new _0x20868b('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x36a898,commentId:_0x573913,content:_0x540bc3,createdAt:_0x4a8b79,attributes:_0x1303ee,isFromAdapter:_0x369d78}){if(void 0x0!==_0x540bc3&&('string'!=typeof _0x540bc3||!_0x540bc3['trim']()['length']))throw new _0x20868b('commentsrepository-update-comment-invalid-content');const _0x2e7760=this['getCommentThread'](_0x36a898),_0xcb05b=_0x2e7760['getComment'](_0x573913);if(!_0xcb05b)throw new _0x20868b('commentsrepository-update-missing-comment',this);let _0x308850=!0x1;if(_0x540bc3&&_0x540bc3!==_0xcb05b['content']&&(_0xcb05b['isEditable']||_0x369d78)&&(_0xcb05b['content']=_0x540bc3,_0x308850=!0x0),_0x4a8b79&&_0x4a8b79!==_0xcb05b['createdAt']&&(_0xcb05b['createdAt']=_0x4a8b79,_0xcb05b['attributes']&&_0xcb05b['attributes']['@external']||(_0xcb05b['authoredAt']=_0x4a8b79),_0x308850=!0x0),_0x1303ee&&!At(_0x1303ee,_0xcb05b['attributes'])&&(_0xcb05b['attributes']=_0x1303ee,_0x308850=!0x0),!_0x308850)return Promise['resolve']();if(_0x2e7760['fire']('commentUpdated'),_0x369d78||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x492cb1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2d1f40}=this['getCommentThread'](_0xcb05b['threadId']),_0x5dd744=_0x492cb1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x2d1f40,'threadId':_0x36a898,'commentId':_0x573913,'content':_0x540bc3,'attributes':_0x1303ee})['then'](()=>_0x492cb1['remove'](_0x5dd744))['catch'](_0x1a09d6=>{throw console['error'](_0x1a09d6),new _0x20868b('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x15df3a,commentId:_0x11b8c3,isFromAdapter:_0x5df5ce}){const _0x381c44=this['getCommentThread'](_0x15df3a),_0x1d2bca=_0x381c44['getComment'](_0x11b8c3);if(!_0x1d2bca)throw new _0x20868b('commentsrepository-remove-missing-comment',this);if(_0x381c44['_remove'](_0x1d2bca),_0x5df5ce||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x347ea8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x28138d}=_0x381c44,_0x1dde96=_0x347ea8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x28138d,'threadId':_0x15df3a,'commentId':_0x11b8c3})['then'](()=>_0x347ea8['remove'](_0x1dde96))['catch'](_0x68d52e=>{throw console['error'](_0x68d52e),new _0x20868b('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x45c4d8(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x47b584,_0x180f66){super();const _0x2e9bc6=_0x47b584['context']['plugins']['get'](it)['me'],_0x2e7de6=_0x47b584['getCommentThread'](_0x180f66['threadId']),_0x3151fe=0x0===_0x2e7de6['comments']['length'],_0x357c28=_0x2e9bc6===_0x180f66['author'];this['id']=_0x180f66['id'],this['threadId']=_0x180f66['threadId'],this['author']=_0x180f66['author'],this['creator']=_0x180f66['creator'],this['isExternal']=Boolean(_0x180f66['attributes']&&_0x180f66['attributes']['@external']),this['set']('content',_0x180f66['content']),this['createdAt']=_0x180f66['createdAt']||new Date(),this['set']('authoredAt',_0x180f66['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2e7de6,'resolvedAt'),this['set']('attributes',_0x180f66['attributes']||{}),this['bind']('isEditable')['to'](_0x47b584,'_permissions',()=>{const _0x3f2988=_0x47b584['getPermissions'](_0x2e7de6['channelId'])['write'],_0x52fbd0=_0x47b584['getPermissions'](_0x2e7de6['channelId'])['modifyAll'];return _0x357c28&&_0x3f2988||!_0x357c28&&_0x52fbd0;}),this['bind']('isRemovable')['to'](_0x2e7de6,'isRemovable',_0x47b584,'_permissions',_0x36e614=>{const _0x20f418=_0x47b584['getPermissions'](_0x2e7de6['channelId'])['write'],_0x5921d7=_0x47b584['getPermissions'](_0x2e7de6['channelId'])['modifyAll'];return _0x357c28&&_0x20f418||_0x36e614&&_0x3151fe||!_0x357c28&&_0x5921d7&&!_0x3151fe;}),this['bind']('isReadOnly')['to'](_0x2e7de6,'isReadOnly'),this['_repository']=_0x47b584;}get['weight'](){return Math['max'](function(_0x1be95b){const _0x45d1fc=document['createElement']('div');return _0x45d1fc['innerHTML']=_0x1be95b,_0x45d1fc['textContent']['length'];}(this['content']),0xc8);}['update'](_0xd3d910){const {threadId:_0x6cdf15,id:_0x76fdca}=this;if(!this['_repository']['hasCommentThread'](_0x6cdf15))throw new _0x20868b('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x36ccbd}=this['_repository']['getCommentThread'](_0x6cdf15);this['_repository']['fire'](Nt('updateComment',_0x36ccbd,_0x6cdf15),{'channelId':_0x36ccbd,'threadId':_0x6cdf15,'commentId':_0x76fdca,..._0xd3d910});}['setAttribute'](_0x2ef175,_0x1c302a){const _0x58e251=wt(this['attributes']);yt(_0x58e251,_0x2ef175,_0x1c302a),this['update']({'attributes':_0x58e251});}['removeAttribute'](_0x4cbe4e){const _0x2232a1=wt(this['attributes']);Ct(_0x2232a1,_0x4cbe4e),this['update']({'attributes':_0x2232a1});}['remove'](_0x677f33={}){if(!_0x677f33['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3b5eac,id:_0x526769}=this;if(!this['_repository']['hasCommentThread'](_0x3b5eac))throw new _0x20868b('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x5da901}=this['_repository']['getCommentThread'](_0x3b5eac);this['_repository']['fire'](Nt('removeComment',_0x5da901,_0x3b5eac),{'channelId':_0x5da901,'threadId':_0x3b5eac,'commentId':_0x526769,..._0x677f33});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0xbf993c,..._0x3e97de){for(const _0x2015cf of _0x3e97de)void 0x0!==_0x2015cf&&(_0xbf993c+=':'+String(_0x2015cf));return _0xbf993c;}class ot extends _0x3de72f{constructor(_0xb68c55){super(_0xb68c55),this['set']('hasContent',!0x1);}['refresh'](){const _0x43de5e=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x40bc7f of _0x43de5e['getRanges']())if(this['_hasContent'](_0x40bc7f))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x4469b2=_0x4151cd(),ranges:_0x3c0432,comment:_0x3e2e53}={}){const _0x5417f8=this['editor']['model'],_0x5b3242=_0x3c0432??Array['from'](_0x5417f8['document']['selection']['getRanges']()),_0x55b396=[];for(const _0x37ac62 of _0x5b3242)this['_hasContent'](_0x37ac62)&&_0x55b396['push'](this['_trimToContent'](_0x37ac62));if(!_0x55b396['length'])throw new _0x20868b('addcommentthreadcommand-incorrect-ranges',null);_0x3e2e53&&this['_createCommentThread'](_0x4469b2,_0x3e2e53),this['_createMarkersFromRanges'](_0x4469b2,_0x55b396,!!_0x3e2e53);}['_createMarkersFromRanges'](_0x300e94,_0x5d642b,_0x569f3f){this['editor']['model']['change'](_0x20a1f1=>{for(const _0x2f85a7 of _0x5d642b){const _0x72749b=_0x4151cd()['substr'](0x1,0x5),_0x3666ee='comment:'+_0x300e94+':'+_0x72749b;_0x20a1f1['addMarker'](_0x3666ee,{'range':_0x2f85a7,'usingOperation':_0x569f3f,'affectsData':_0x569f3f});}});}['_createCommentThread'](_0x5c68f7,_0x23522e){const _0x20d4aa=this['editor']['plugins']['get']('CommentsRepository'),_0x4b336b=this['editor']['config']['get']('collaboration.channelId'),_0x2da4b0=this['editor']['plugins']['get']('Users')['me'];if(!_0x2da4b0)throw new _0x20868b('addcommentthreadcommand-user-not-found',null);_0x20d4aa['addCommentThread']({'threadId':_0x5c68f7,'channelId':_0x4b336b,'comments':[{'authorId':_0x2da4b0['id'],'content':_0x23522e,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xfada8e){for(const _0x3a57ec of _0xfada8e['getItems']())if(this['_itemIsContent'](_0x3a57ec))return!0x0;return!0x1;}['_itemIsContent'](_0x259b78){return _0x259b78['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x259b78)&&!_0x259b78['is']('element','tableCell');}['_trimToContent'](_0x2e1056){const _0x142f8f=_0x8b2368=>!this['_itemIsContent'](_0x8b2368['item']),_0x58d0d3=_0x2e1056['start']['getLastMatchingPosition'](_0x142f8f),_0x60b9af=_0x2e1056['end']['getLastMatchingPosition'](_0x142f8f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x58d0d3,_0x60b9af);}}class b extends _0x38185c{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x210987){super(_0x210987),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4a96b2=this['editor'],_0x32ecc0=_0x4a96b2['model']['document']['selection'],_0x5c92e0=_0x213d6b(()=>this['refreshSelectedViews'](),0xa);_0x32ecc0['on']('change:range',(_0x385d84,_0x1a616c)=>{_0x1a616c['directChange']&&(_0x5c92e0['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4a96b2['editing']['view']['document'],'change:isFocused',(_0x242be2,_0x134107,_0xf358dc)=>{_0xf358dc&&_0x5c92e0();}),this['listenTo'](_0x4a96b2['ui']['focusTracker'],'change:isFocused',(_0xac4386,_0x53f184,_0x1449c0)=>{_0x1449c0||this['fire']('blur',{'isAnnotationTracked':_0x2a586e=>this['_editorAnnotationsData']['has'](_0x2a586e['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x19b87d){if(this['_editorAnnotations']['has'](_0x19b87d['view']))return;this['_editorAnnotations']['add'](_0x19b87d['view']),this['editor']['ui']['focusTracker']['add'](_0x19b87d['view']['element']);const _0x53f9f3=this['editor']['plugins']['get'](y);this['listenTo'](_0x53f9f3['collection'],'remove',(_0x1665e4,_0x6b7edd)=>{this['editor']['ui']['focusTracker']['remove'](_0x6b7edd['view']['element']),this['_editorAnnotations']['delete'](_0x6b7edd['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x44cdfa){if('function'!=typeof _0x44cdfa)throw new _0x20868b('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x44cdfa);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x24cc71,annotations:_0x32472b}){const _0x437618=[],_0x250245=this['editor']['model']['document']['selection'],_0x136487=Array['from'](_0x250245['getRanges']());for(const [_0x58ce0c,_0x280237]of this['_editorAnnotationsData']){const _0x371300=_0x1e4ed1(_0x280237),_0x1e8357=_0x32472b['getByInnerView'](_0x58ce0c);_0x371300&&_0x1e8357&&_0x437618['push']({'annotation':_0x1e8357,'range':_0x371300});}function _0x1e4ed1(_0x8b5c66){for(const _0x2a616e of _0x8b5c66)for(const _0x3724c6 of _0x136487)if(_0x2a616e['containsRange'](_0x3724c6,!_0x250245['isCollapsed']))return _0x2a616e;return null;}return _0x437618['sort']((_0x5ecd2e,_0x50c41c)=>{const _0x7e9914=_0x5ecd2e['range'],_0x1166cf=_0x50c41c['range'];if(!_0x7e9914['isEqual'](_0x1166cf)){if(_0x7e9914['containsRange'](_0x1166cf,!0x0))return 0x1;if(_0x1166cf['containsRange'](_0x7e9914,!0x0))return-0x1;}return _0x5ecd2e['annotation']==_0x24cc71?-0x1:_0x50c41c['annotation']==_0x24cc71?0x1:0x0;})['map'](_0x43a1e0=>_0x43a1e0['annotation']);}get['_editorAnnotationsData'](){const _0xd8919c=new Map();for(const _0x32533e of Array['from'](this['_dataCollectors']))for(const [_0x5d57b4,_0x3cc008]of _0x32533e())_0xd8919c['set'](_0x5d57b4,_0x3cc008);return _0xd8919c;}}class st extends _0x38185c{['afterInit'](){const _0x29a97a=this['editor'];if(!_0x29a97a['plugins']['has']('RestrictedEditingModeEditing'))return;_0x29a97a['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x38185c{constructor(_0x5561e9){super(_0x5561e9),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x103ed0=this['editor'],_0x94f8a2=_0x103ed0['commands']['get']('importWord'),_0x1cdbea=_0x103ed0['plugins']['get'](it);_0x94f8a2&&(_0x94f8a2['on']('execute',(_0x36423d,[,_0xfc92b7])=>{_0xfc92b7['collaboration_features']={'comments':!0x0,'user_id':_0x1cdbea['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x94f8a2,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x272bdb,_0x20ac91){const {comment_threads:_0x4a295d}=_0x20ac91;_0x4a295d&&_0x4a295d['forEach'](({thread_id:_0xa92961,comments:_0x351cd3,is_resolved:_0x24941d})=>{const _0x57f591=new Date(),_0xad2ab3=_0x351cd3['map'](({author:_0x5ed3d8,content:_0x258485,created_at:_0xe235a3})=>({'content':_0x258485,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x57f591,'attributes':{'@external':{'authorName':_0x5ed3d8,'createdAt':_0xe235a3?new Date(_0xe235a3):new Date(),'source':'importWord'}}})),_0x3e75eb=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3e75eb,'threadId':_0xa92961,'comments':_0xad2ab3,'resolvedAt':_0x24941d?_0x57f591:null});});}}class at extends _0x38185c{constructor(_0xb44fe2){super(_0xb44fe2),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x329d9c=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x329d9c,'contentInsertion',(_0x5b2167,_0x8ec3de)=>this['_removeMarkersWithoutThreads'](_0x8ec3de['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x262640){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x262640;const _0x977733=this['editor']['plugins']['get']('CommentsRepository');for(const _0x3ce5a5 of _0x262640['keys']()){const [_0x3db525,_0x537249]=_0x3ce5a5['split'](':');'comment'!=_0x3db525||_0x977733['hasCommentThread'](_0x537249)||_0x262640['delete'](_0x3ce5a5);}return _0x262640;}['_registerMarkerInClipboardPipeline'](){const _0x24ac3a=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4d985b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4d985b&&_0x24ac3a['_registerMarkerToCopy']('comment',_0x4d985b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x3f33b7){switch(_0x3f33b7){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x55c9ae){const _0x593e10=_0x55c9ae['split'](':');return{'group':_0x593e10[0x0],'id':_0x593e10[0x1],'part':_0x593e10[0x2]};}class ut extends _0x38185c{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2e07dd,_0xfed4bb)=>{if(!_0xfed4bb['options']['showCommentHighlights'])return null;if(_0xfed4bb['options']['ignoreResolvedComments']){const {id:_0x1f9846}=ft(_0x2e07dd['markerName']),_0x69fc08=this['editor']['plugins']['get'](o);if(_0x69fc08['getCommentThread'](_0x1f9846)?.['isResolved']&&_0x2e07dd['item'])return _0xfed4bb['consumable']['consume'](_0x2e07dd['item'],'addMarker:'+_0x2e07dd['markerName']),_0xfed4bb['consumable']['consume'](_0x2e07dd['item'],'removeMarker:'+_0x2e07dd['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x43c152=>{_0x43c152['on']('addMarker:comment',(_0x1aa8ae,_0x3d7e0d,_0x4e2ddc)=>{if(!_0x4e2ddc['options']['showCommentHighlights'])return;const _0x8b8b53=_0x3d7e0d['item'];if(!_0x8b8b53)return;const _0xaf9fb2=_0x4e2ddc['mapper']['toViewElement'](_0x8b8b53);this['editor']['model']['schema']['isObject'](_0x8b8b53)&&_0xaf9fb2&&!_0xaf9fb2['getCustomProperty']('widget')&&_0xaf9fb2['is']('containerElement')&&_0x3090e7(_0xaf9fb2,_0x4e2ddc['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0xb7630e,{writer:_0x41c76f,options:_0x28a718})=>{if(!_0x28a718['showCommentHighlights'])return null;const _0x1e01d7=_0x41c76f['createContainerElement']('div'),_0x15eb26=_0x41c76f['createEmptyElement']('hr');return _0x41c76f['addClass']('ck-horizontal-line',_0x1e01d7),_0x41c76f['insert'](_0x41c76f['createPositionAt'](_0x1e01d7,0x0),_0x15eb26),_0x1e01d7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x12d277,{writer:_0x3a0c77,options:_0x30e1d2})=>{if(!_0x30e1d2['showCommentHighlights'])return null;const _0x27bb4f=_0x3a0c77['createContainerElement']('span'),_0x4c509e=_0x3a0c77['createEmptyElement']('img');return _0x3a0c77['addClass']('image-inline',_0x27bb4f),_0x3a0c77['insert'](_0x3a0c77['createPositionAt'](_0x27bb4f,0x0),_0x4c509e),_0x27bb4f;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x5dce11,{writer:_0x25bdd6,options:_0x5ada6e})=>{if(_0x5ada6e['showCommentHighlights'])return _0x25bdd6['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0xd84e0a,_0x35703f,_0x38dfe8)=>{_0x38dfe8['options']['showCommentHighlights']&&_0xd84e0a['stop']();},{'priority':'high'});}}class r extends _0x38185c{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(_0x24a95b){super(_0x24a95b),this['set']('isThreadsLoadingPaused',!0x0),_0x24a95b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3bea91,_0xcf5192,_0x11dc47,_0x94934)=>{const _0xca5a8a=_0x24a95b['plugins']['get'](o),_0x3883ba=_0x11dc47?ft(_0x11dc47)['id']:null;_0x24a95b['model']['change'](()=>{if(_0x3883ba){const _0x3a6047=this['getAllMarkersForId'](_0x3883ba);for(const _0x76e794 of _0x3a6047)_0x24a95b['editing']['reconvertMarker'](_0x76e794);}if(_0x94934){const {id:_0x40b99f}=ft(_0x94934),_0xf566ed=_0xca5a8a['getCommentThread'](_0x40b99f);if(_0xf566ed&&_0xf566ed['unlinkedAt'])return;if(_0xf566ed&&!_0xf566ed['isAttached'])return;const _0x3e030b=this['getAllMarkersForId'](_0x40b99f);for(const _0x3fe72f of _0x3e030b)_0x24a95b['editing']['reconvertMarker'](_0x3fe72f);}}),_0x3883ba&&this['scrollToThreadMarker'](_0x3883ba);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2d3c11=this['editor'],_0x1814bd=_0x2d3c11['plugins']['get'](o),_0x4c5f32=_0x2d3c11['config']['get']('collaboration.channelId'),_0x11a710=_0x1814bd['getCommentThreads']()['filter'](_0x4b6ca8=>_0x4b6ca8['channelId']!==_0x4c5f32);_0x2d3c11['commands']['add']('addCommentThread',new ot(_0x2d3c11)),this['listenTo'](_0x2d3c11,'change:isReadOnly',(_0x2ef71a,_0x2a4e12,_0x2ef43a)=>{_0x1814bd['switchReadOnly'](_0x2ef43a,_0x2d3c11['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1814bd,dt('addCommentThread',_0x4c5f32),(_0x4961f7,{threadId:_0x57c6c6})=>{const _0x444852=this['editor']['plugins']['get'](o)['getCommentThread'](_0x57c6c6);_0x444852?.['unlinkedAt']&&this['_attachArchivedThread'](_0x57c6c6);}),this['listenTo'](_0x1814bd,dt('removeCommentThread',_0x4c5f32),(_0x4e6e63,{threadId:_0x12b2ac})=>{_0x2d3c11['model']['enqueueChange']({'isUndoable':!0x1},_0x458318=>{const _0x5a79f7=this['getAllMarkersForId'](_0x12b2ac);for(const _0x35cf24 of _0x5a79f7)_0x458318['removeMarker'](_0x35cf24);});}),this['listenTo'](_0x1814bd,dt('resolveCommentThread',_0x4c5f32),(_0x3a44c6,{threadId:_0x32b2b8})=>{(this['_reconvertMarkers'](_0x32b2b8),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x32b2b8)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1814bd,dt('reopenCommentThread',_0x4c5f32),(_0x87bf6f,{threadId:_0x1372b9})=>{this['_reconvertMarkers'](_0x1372b9);},{'priority':'low'}),this['listenTo'](_0x1814bd,dt('addComment',_0x4c5f32),(_0x1560c5,{threadId:_0x346ee2,isFromAdapter:_0x40dca0})=>{const _0x145be4=this['getAllMarkersForId'](_0x346ee2);if(_0x40dca0||0x0==_0x145be4['length']||!_0x1814bd['hasCommentThread'](_0x346ee2))return;0x1===_0x1814bd['getCommentThread'](_0x346ee2)['length']&&_0x2d3c11['model']['enqueueChange']({'isUndoable':!0x1},_0x34bc4a=>{for(const _0x49f290 of _0x145be4)_0x34bc4a['updateMarker'](_0x49f290,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x11a710);}['afterInit'](){!async function(_0x1dbe5e){const _0x362204=_0x55d431([0x4f,0x6e,0x55,0x64,0x42,0x71,0x4d,0x4c,0x78,0x62,0x37,0x75,0x33,0x70,0x41,0x77,0x53,0x6c,0x58,0x50,0x4b,0x4a,0x73,0x69,0x57,0x54,0x47,0x46,0x68,0x76,0x79,0x43,0x66,0x6d,0x34,0x6b,0x72,0x65,0x48,0x44,0x36,0x4e,0x61,0x67,0x51,0x74,0x45,0x49,0x32,0x52,0x6a,0x30,0x6f,0x39,0x56,0x38,0x59,0x31,0x35,0x7a,0x63,0x5a]),_0x402139=0x5515e3ef,_0x4cbb0e=0x55129307^_0x402139,_0x817ac9=window[_0x55d431([0x44,0x61,0x74,0x65])][_0x55d431([0x6e,0x6f,0x77])](),_0x51a4b3=_0x1dbe5e[_0x55d431([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4a42a7=new window[(_0x55d431([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x358f36=>{_0x51a4b3[_0x55d431([0x6f,0x6e,0x63,0x65])](_0x55d431([0x72,0x65,0x61,0x64,0x79]),_0x358f36);}),_0x488dbf={[_0x55d431([0x6b,0x74,0x79])]:_0x55d431([0x45,0x43]),[_0x55d431([0x75,0x73,0x65])]:_0x55d431([0x73,0x69,0x67]),[_0x55d431([0x63,0x72,0x76])]:_0x55d431([0x50,0x2d,0x32,0x35,0x36]),[_0x55d431([0x78])]:_0x55d431([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]),[_0x55d431([0x79])]:_0x55d431([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]),[_0x55d431([0x61,0x6c,0x67])]:_0x55d431([0x45,0x53,0x32,0x35,0x36])},_0x5f5738=_0x51a4b3[_0x55d431([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x55d431([0x67,0x65,0x74])](_0x55d431([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x136396(){let _0x44e0db,_0x132b24=null,_0x408308=null;try{if(_0x5f5738==_0x55d431([0x47,0x50,0x4c]))return _0x55d431([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x44e0db=_0x40fc01(),!_0x44e0db)return _0x55d431([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x44e0db[_0x55d431([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x408308=_0x1e23c0(_0x44e0db[_0x55d431([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x44e0db[_0x55d431([0x6a,0x74,0x69])])),await _0x5b1960()?_0x2adc02()?_0x25bf2e()?_0x55d431([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4de0dc()?(_0x44e0db[_0x55d431([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x55d431([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x132b24=_0xd4afd9(_0x55d431([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x44e0db[_0x55d431([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x55d431([0x74,0x72,0x69,0x61,0x6c])&&(_0x132b24=_0xd4afd9(_0x55d431([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x147f79()):_0x55d431([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x55d431([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x55d431([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x55d431([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x25bf2e(){const _0x39220e=[_0x55d431([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x55d431([0x74,0x72,0x69,0x61,0x6c])][_0x55d431([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x44e0db[_0x55d431([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x817ac9/0x3e8:0xe10*_0x4cbb0e;return _0x44e0db[_0x55d431([0x65,0x78,0x70])]<_0x39220e;}function _0x2adc02(){const _0x4b6146=_0x44e0db[_0x55d431([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x4b6146)return!0x1;if(_0x4b6146[_0x55d431([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55d431([0x2a])))return!0x0;if(_0x4b6146[_0x55d431([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55d431([0x43,0x4d,0x54])))return!0x0;if(_0x4b6146[_0x55d431([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55d431([0x52,0x43,0x4d,0x54]))){if(_0x7531fe())return!0x0;if(_0x590483()||_0x11733f())return!0x0;}return!0x1;}function _0x4de0dc(){const _0x439553=_0x44e0db[_0x55d431([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x439553||0x0==_0x439553[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3fb1ff}=new URL(window[_0x55d431([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x439553[_0x55d431([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3fb1ff))return!0x0;const _0x44c1c9=_0x3fb1ff[_0x55d431([0x73,0x70,0x6c,0x69,0x74])](_0x55d431([0x2e]));return _0x439553[_0x55d431([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x400f6d=>_0x400f6d[_0x55d431([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x55d431([0x2a])))[_0x55d431([0x6d,0x61,0x70])](_0x67182c=>_0x67182c[_0x55d431([0x73,0x70,0x6c,0x69,0x74])](_0x55d431([0x2e])))[_0x55d431([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xcbac1f=>_0xcbac1f[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x44c1c9[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x55d431([0x6d,0x61,0x70])](_0x4c5098=>Array(_0x44c1c9[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x4c5098[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x55d431([0x66,0x69,0x6c,0x6c])](_0x4c5098[0x0]===_0x55d431([0x2a])?_0x55d431([0x2a]):'')[_0x55d431([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x4c5098))[_0x55d431([0x73,0x6f,0x6d,0x65])](_0x593990=>_0x44c1c9[_0x55d431([0x65,0x76,0x65,0x72,0x79])]((_0x525a2d,_0x22ab01)=>_0x593990[_0x22ab01]===_0x525a2d||_0x593990[_0x22ab01]===_0x55d431([0x2a])));}function _0x147f79(){return _0x132b24&&_0x408308?new window[(_0x55d431([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x476cd1,_0x3c15ca)=>{_0x132b24[_0x55d431([0x74,0x68,0x65,0x6e])](_0x476cd1,_0x3c15ca),_0x408308[_0x55d431([0x74,0x68,0x65,0x6e])](_0x2c6036=>{_0x2c6036!=_0x55d431([0x56,0x61,0x6c,0x69,0x64])&&_0x476cd1(_0x2c6036);},_0x3c15ca);}):_0x132b24||_0x408308||_0x55d431([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1e23c0(_0x41a86f,_0x43b57c){return new window[(_0x55d431([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x45fefe=>{if(_0x1a6441())return _0x45fefe(_0x55d431([0x56,0x61,0x6c,0x69,0x64]));_0x14c82(),_0x51a4b3[_0x55d431([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x55d431([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x42087e=!0x1;const _0x48390a=_0x4151cd();function _0x3a2f1a(_0x47f16e){return!!_0x47f16e&&(typeof _0x47f16e===_0x55d431([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x47f16e===_0x55d431([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x47f16e[_0x55d431([0x74,0x68,0x65,0x6e])]===_0x55d431([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x47f16e[_0x55d431([0x63,0x61,0x74,0x63,0x68])]===_0x55d431([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1d316c(_0x444f6b){_0x55a477(_0x444f6b)[_0x55d431([0x74,0x68,0x65,0x6e])](_0x4bc9c0=>{if(!_0x4bc9c0||_0x4bc9c0[_0x55d431([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x55d431([0x6f,0x6b]))return _0x55d431([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x587f19(_0x208e07(_0x48390a+_0x43b57c))!=_0x4bc9c0[_0x55d431([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x55d431([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x55d431([0x56,0x61,0x6c,0x69,0x64]);})[_0x55d431([0x74,0x68,0x65,0x6e])](_0x55be5f=>(_0x4182ff(),_0x55be5f),()=>{const _0x43f75f=_0xbe1aad();return null==_0x43f75f?(_0x4182ff(),_0x55d431([0x56,0x61,0x6c,0x69,0x64])):_0x55d431(_0x817ac9-_0x43f75f>(0x711967ef^_0x402139)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x55d431([0x74,0x68,0x65,0x6e])](_0x45fefe)[_0x55d431([0x63,0x61,0x74,0x63,0x68])](()=>{_0x45fefe(_0x55d431([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3a40f9=0x55230d6f^_0x402139;function _0x4182ff(){const _0x254bdb=_0x55d431([0x6c,0x6c,0x63,0x74,0x2d])+_0x587f19(_0x208e07(_0x41a86f)),_0x402769=_0x58793b(_0x587f19(window[_0x55d431([0x4d,0x61,0x74,0x68])][_0x55d431([0x63,0x65,0x69,0x6c])](_0x817ac9/_0x3a40f9)));window[_0x55d431([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x55d431([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x254bdb,_0x402769);}function _0xbe1aad(){const _0x5264de=_0x55d431([0x6c,0x6c,0x63,0x74,0x2d])+_0x587f19(_0x208e07(_0x41a86f)),_0x5362c1=window[_0x55d431([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x55d431([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5264de);return _0x5362c1?window[_0x55d431([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x58793b(_0x5362c1),0x10)*_0x3a40f9:null;}function _0x55a477(_0x436f47){return new window[(_0x55d431([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x19da15,_0x3fa5f9)=>{_0x436f47[_0x55d431([0x74,0x68,0x65,0x6e])](_0x19da15,_0x3fa5f9),window[_0x55d431([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3fa5f9,0x5514372f^_0x402139);});}}_0x51a4b3[_0x55d431([0x6f,0x6e])](_0x55d431([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x19b18b,_0x558e61)=>{if(_0x558e61[0x0]!=_0x41a86f)return _0x45fefe(_0x55d431([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x558e61[0x1]={..._0x558e61[0x1],[_0x55d431([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x48390a};},{[_0x55d431([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x55d431([0x68,0x69,0x67,0x68])}),_0x51a4b3[_0x55d431([0x6f,0x6e])](_0x55d431([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x45f9ff=>{_0x3a2f1a(_0x45f9ff[_0x55d431([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x42087e=!0x0,_0x1d316c(_0x45f9ff[_0x55d431([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x55d431([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x55d431([0x6c,0x6f,0x77])}),_0x4a42a7[_0x55d431([0x74,0x68,0x65,0x6e])](()=>{_0x42087e||_0x45fefe(_0x55d431([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1a6441(){return _0x51a4b3[_0x55d431([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x55d431([0x76,0x69,0x65,0x77])][_0x55d431([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x55d431([0x61,0x75,0x74,0x6f]);}function _0x14c82(){_0x51a4b3[_0x55d431([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x55d431([0x76,0x69,0x65,0x77])][_0x55d431([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x55d431([0x61,0x75,0x74,0x6f]);}}function _0xd4afd9(_0x24eed4){const _0xf3f8fd=[new window[(_0x55d431([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x496849=>setTimeout(_0x496849,0x551cdd23^_0x402139)),_0x4a42a7[_0x55d431([0x74,0x68,0x65,0x6e])](()=>new window[(_0x55d431([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3c4d61=>{let _0x4a2150=0x0;_0x51a4b3[_0x55d431([0x6d,0x6f,0x64,0x65,0x6c])][_0x55d431([0x6f,0x6e])](_0x55d431([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x189f8b,_0x3e402f)=>{_0x3e402f[0x0][_0x55d431([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4a2150++,_0x4a2150==(0x5515e217^_0x402139)&&(_0x3c4d61(),_0x189f8b[_0x55d431([0x6f,0x66,0x66])]());});}))];return window[_0x55d431([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x55d431([0x72,0x61,0x63,0x65])](_0xf3f8fd)[_0x55d431([0x74,0x68,0x65,0x6e])](()=>_0x24eed4);}async function _0x102356(){await _0x4a42a7,_0x51a4b3[_0x55d431([0x6d,0x6f,0x64,0x65,0x6c])][_0x55d431([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x37b321,_0x51a4b3[_0x55d431([0x6d,0x6f,0x64,0x65,0x6c])][_0x55d431([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x37b321,_0x51a4b3[_0x55d431([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x55d431([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x7531fe(){return _0x21cbe6(_0x55d431([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x33639a(_0x55d431([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x55d431([0x73,0x74,0x61,0x74,0x65])]==_0x55d431([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x590483(){return _0x21cbe6(_0x55d431([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 _0x11733f(){return _0x21cbe6(_0x55d431([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x55314f(_0xdbc140){const _0x5c876e=_0x202a09();_0x51a4b3[_0x5c876e]=_0x55d431([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0xdbc140,_0xdbc140!=_0x55d431([0x56,0x61,0x6c,0x69,0x64])&&_0x102356();}function _0x202a09(){const _0x433b17=window[_0x55d431([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x55d431([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x55d431([0x6e,0x6f,0x77])]())[_0x55d431([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x55d431([0x2e]),'');let _0x2b09d0=_0x55d431([0x4f]);for(let _0x59f170=0x0;_0x59f170<_0x433b17[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x59f170+=0x2){let _0x343549=window[_0x55d431([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x433b17[_0x55d431([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x59f170,_0x59f170+0x2));_0x343549>=_0x362204[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x343549-=_0x362204[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2b09d0+=_0x362204[_0x343549];}return _0x2b09d0;}function _0x40fc01(){const _0x1a53f7=_0x5f5738[_0x55d431([0x73,0x70,0x6c,0x69,0x74])](_0x55d431([0x2e]));if(0x3!=_0x1a53f7[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3286cf(_0x1a53f7[0x1]);function _0x3286cf(_0x5da04f){const _0x3e8063=_0x1c0487(_0x5da04f);return _0x3e8063&&_0x965e0c()?_0x3e8063:null;function _0x965e0c(){const _0x4f1f3a=_0x3e8063[_0x55d431([0x6a,0x74,0x69])],_0x2f627d=window[_0x55d431([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f1f3a[_0x55d431([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f1f3a[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x12742f={..._0x3e8063,[_0x55d431([0x6a,0x74,0x69])]:_0x4f1f3a[_0x55d431([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f1f3a[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x12742f[_0x55d431([0x76,0x63])],_0x208e07(_0x12742f)==_0x2f627d;}}}async function _0x5b1960(){let _0x487f01=!0x0;try{const _0x3a2bda=_0x5f5738[_0x55d431([0x73,0x70,0x6c,0x69,0x74])](_0x55d431([0x2e])),[_0x194042,_0xb5a50d,_0x44ced2]=_0x3a2bda;return _0x3e037c(_0x194042),await _0x3f87f1(_0x194042,_0xb5a50d,_0x44ced2),_0x487f01;}catch{return!0x1;}function _0x3e037c(_0x406f1a){const _0x5c3020=_0x1c0487(_0x406f1a);_0x5c3020&&_0x5c3020[_0x55d431([0x61,0x6c,0x67])]==_0x55d431([0x45,0x53,0x32,0x35,0x36])||(_0x487f01=!0x1);}async function _0x3f87f1(_0x346784,_0x2af4db,_0x396c4b){const _0x19947b=window[_0x55d431([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x55d431([0x66,0x72,0x6f,0x6d])](_0x4c12f3(_0x396c4b),_0x586012=>_0x586012[_0x55d431([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x46aae9=new window[(_0x55d431([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x55d431([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x346784+_0x55d431([0x2e])+_0x2af4db),_0x43ed3c=window[_0x55d431([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x55d431([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x43ed3c)return;const _0x15d872=await _0x43ed3c[_0x55d431([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x55d431([0x6a,0x77,0x6b]),_0x488dbf,{[_0x55d431([0x6e,0x61,0x6d,0x65])]:_0x55d431([0x45,0x43,0x44,0x53,0x41]),[_0x55d431([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x55d431([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x55d431([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x43ed3c[_0x55d431([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x55d431([0x6e,0x61,0x6d,0x65])]:_0x55d431([0x45,0x43,0x44,0x53,0x41]),[_0x55d431([0x68,0x61,0x73,0x68])]:{[_0x55d431([0x6e,0x61,0x6d,0x65])]:_0x55d431([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x15d872,_0x19947b,_0x46aae9)||(_0x487f01=!0x1);}}function _0x1c0487(_0x23a843){return _0x23a843[_0x55d431([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x55d431([0x65,0x79]))?JSON[_0x55d431([0x70,0x61,0x72,0x73,0x65])](_0x4c12f3(_0x23a843)):null;}function _0x4c12f3(_0x3e5e65){return window[_0x55d431([0x61,0x74,0x6f,0x62])](_0x3e5e65[_0x55d431([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x55d431([0x2b]))[_0x55d431([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x55d431([0x2f])));}function _0x208e07(_0xa60a98){let _0x2dc4d7=0x1505;function _0x567eff(_0x323ccd){for(let _0x35b057=0x0;_0x35b057<_0x323ccd[_0x55d431([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x35b057++){const _0x27c443=_0x323ccd[_0x55d431([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x35b057);_0x2dc4d7=(_0x2dc4d7<<0x5)+_0x2dc4d7+_0x27c443,_0x2dc4d7&=_0x2dc4d7;}}function _0xc602ca(_0x566ca5){Array[_0x55d431([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x566ca5)?_0x566ca5[_0x55d431([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xc602ca):_0x566ca5&&typeof _0x566ca5==_0x55d431([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x55d431([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x566ca5)[_0x55d431([0x73,0x6f,0x72,0x74])]()[_0x55d431([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x30b878,_0xeaef8b])=>{_0x567eff(_0x30b878),_0xc602ca(_0xeaef8b);}):_0x567eff(window[_0x55d431([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x566ca5));}return _0xc602ca(_0xa60a98),_0x2dc4d7>>>0x0;}function _0x587f19(_0x3da49c){return _0x3da49c[_0x55d431([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x55d431([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x55d431([0x30]));}function _0x58793b(_0x208ecd){return _0x208ecd[_0x55d431([0x73,0x70,0x6c,0x69,0x74])]('')[_0x55d431([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x55d431([0x6a,0x6f,0x69,0x6e])]('');}function _0x21cbe6(_0x4615fb){return _0x51a4b3[_0x55d431([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x55d431([0x68,0x61,0x73])](_0x4615fb);}function _0x33639a(_0x51795c){return _0x51a4b3[_0x55d431([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x55d431([0x67,0x65,0x74])](_0x51795c);}function _0x37b321(){}function _0x55d431(_0x25738b){return _0x25738b['map'](_0x284b3c=>String['fromCharCode'](_0x284b3c))['join']('');}_0x55314f(await _0x136396());}(this);}['destroy'](){const _0x29733b=this['editor']['plugins']['get'](o),_0xecc1b7=this['editor']['config']['get']('collaboration.channelId');for(const _0x2419e5 of _0x29733b['getCommentThreads']({'channelId':_0xecc1b7}))_0x29733b['_detachCommentThread'](_0x2419e5['id']),_0x29733b['_threads']['delete'](_0x2419e5['id']);super['destroy']();}['hasMarkerForId'](_0x5c09f5){return this['getAllMarkersForId'](_0x5c09f5)['length']>0x0;}['getAllMarkersForId'](_0x22c64d){const _0x461d92=[];for(const _0x22fce2 of this['editor']['model']['markers'])_0x22fce2['name']['startsWith']('comment:'+_0x22c64d)&&_0x461d92['push'](_0x22fce2);return _0x461d92;}['scrollToThreadMarker'](_0x278127){setTimeout(()=>{const _0x363145=this['_getTargetForId'](_0x278127);if(!_0x363145)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x278127&&nt({'target':_0x363145[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2eebdf){this['editor']['model']['change'](()=>{for(const _0x2656ea of this['getAllMarkersForId'](_0x2eebdf))this['editor']['editing']['reconvertMarker'](_0x2656ea);});}['_attachArchivedThread'](_0x4a99c0){const _0x40f792=this['editor']['plugins']['get'](o),_0x4a6d0e=this['editor']['plugins']['get'](b),_0x525d89=_0x40f792['getCommentThread'](_0x4a99c0);if(!_0x525d89['isAttached']){const _0x12fe10=_0x525d89['attachTo'](()=>this['_getTargetForId'](_0x525d89['id']));_0x4a6d0e['registerAnnotation'](_0x12fe10),_0x525d89['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2a5f5c=this['editor'],_0x1ad021=_0x2a5f5c['plugins']['get'](it);_0x2a5f5c['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x37a91b,_0x2534b5)=>{const {id:_0x477c6d}=ft(_0x37a91b['markerName']),_0x2c4972=_0x2a5f5c['plugins']['get'](o)['getCommentThread'](_0x477c6d),_0x4b85e=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x477c6d;let _0x5b85d3;if(_0x2c4972&&_0x2c4972['isResolved']&&!_0x4b85e&&_0x37a91b['item'])return _0x2534b5['consumable']['consume'](_0x37a91b['item'],'addMarker:'+_0x37a91b['markerName']),_0x2534b5['consumable']['consume'](_0x37a91b['item'],'removeMarker:'+_0x37a91b['markerName']),null;const _0x193468=['ck-comment-marker'];return _0x4b85e&&_0x193468['push']('ck-comment-marker--active'),_0x5b85d3=_0x2c4972?.['length']?_0x2c4972['comments']['first']['author']['id']:_0x1ad021['me']['id'],{'classes':_0x193468,'attributes':{'data-comment':_0x477c6d,'data-author-id':_0x5b85d3}};}}),_0x2a5f5c['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5a1d7f,{options:_0x34a07f})=>{if(_0x34a07f['showCommentHighlights'])return null;const _0x1be397=_0x2a5f5c['plugins']['get'](o),_0x576d83=_0x2a5f5c['model']['markers']['get'](_0x5a1d7f),{id:_0x779cd8,part:_0x370f2f}=ft(_0x5a1d7f);return _0x576d83&&!_0x576d83['affectsData']||_0x34a07f['ignoreResolvedComments']&&_0x1be397['getCommentThread'](_0x779cd8)?.['isResolved']?null:{'group':'comment','name':_0x370f2f?_0x779cd8+':'+_0x370f2f:_0x779cd8};}}),_0x2a5f5c['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x34b1c2,{writer:_0x218c33})=>_0x218c33['createElement']('$marker',{'data-name':'comment:'+_0x34b1c2['getAttribute']('id')})}),_0x2a5f5c['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x35bffb=this['editor'],_0xd351e3=_0x35bffb['plugins']['get'](o),_0x4e746e=new Set(),_0x5df813=new Set();_0x35bffb['model']['document']['registerPostFixer'](_0x1f6a43=>{let _0x56c350=!0x1;for(const {name:_0x39a031,data:_0x1ab8e2}of _0x35bffb['model']['document']['differ']['getChangedMarkers']()){const {group:_0x59fa7a,id:_0xcd6d6c}=ft(_0x39a031);let _0x1ac816=_0x1ab8e2['newRange'];if('comment'!==_0x59fa7a||!_0x1ac816)continue;const _0x5d035b='$graveyard'===_0x1ac816['root']['rootName'];_0x5d035b||(_0x1ac816=ht(_0x1ac816,_0x35bffb['model']),!_0x1ac816||_0x1ac816['isCollapsed']||!_0x1ab8e2['newRange']||_0x1ac816['isEqual'](_0x1ab8e2['newRange']))?_0x35bffb['model']['hasContent'](_0x1ac816)&&!_0x5d035b?this['isThreadsLoadingPaused']?_0x4e746e['add'](_0x39a031):this['_handleThreadMarker'](_0x39a031,_0xcd6d6c):(_0x5df813['add'](_0x39a031),_0x4e746e['delete'](_0x39a031),_0x1f6a43['removeMarker'](_0x39a031),_0x56c350=!0x0):(_0x1f6a43['updateMarker'](_0x39a031,{'range':_0x1ac816}),_0x56c350=!0x0);}return _0x56c350;}),this['on']('change:isThreadsLoadingPaused',(_0x2cb3eb,_0x4f7d05,_0x78f9a8)=>{if(!_0x78f9a8&&_0x4e746e['size'])for(const _0x3c7e7b of _0x4e746e){const {id:_0x5a06d6}=ft(_0x3c7e7b);_0x4e746e['delete'](_0x3c7e7b),_0x35bffb['model']['markers']['get'](_0x3c7e7b)&&this['_handleThreadMarker'](_0x3c7e7b,_0x5a06d6);}}),this['listenTo'](_0x35bffb['model']['document'],'change',()=>{for(const {name:_0x1d3d5a,data:{newRange:_0x3c696d}}of _0x35bffb['model']['document']['differ']['getChangedMarkers']()){const {group:_0x9590af,id:_0x36e774}=ft(_0x1d3d5a);if('comment'!==_0x9590af)continue;const _0x1b5bf7=_0xd351e3['getCommentThread'](_0x36e774),_0x24637a=this['hasMarkerForId'](_0x36e774);_0x1b5bf7&&(!_0x1b5bf7['_hasTargetInContent']&&_0x3c696d&&_0x35bffb['editing']['view']['once']('render',()=>{const _0x511df4=_0x35bffb['plugins']['get'](y),_0x396c37=_0xd351e3['_threadToController']['get'](_0x1b5bf7)['view'];_0x511df4['getByInnerView'](_0x396c37)['refreshVisibility']();},{'priority':'low'}),_0x1b5bf7['_hasTargetInContent']=_0x24637a||!!_0x3c696d),_0x3c696d||(_0x5df813['add'](_0x1d3d5a),_0x4e746e['delete'](_0x1d3d5a));}for(const _0x23b9be of _0x5df813){const {id:_0x1d5603}=ft(_0x23b9be),_0x31c46c=_0xd351e3['getCommentThread'](_0x1d5603);if(_0x4e746e['delete'](_0x23b9be),!_0x31c46c)continue;const _0x2282e8=this['hasMarkerForId'](_0x1d5603);_0x2282e8||_0x31c46c['isSubmitted']?_0x2282e8||_0x31c46c['unlinkedAt']||_0x31c46c['setUnlinkedAt'](new Date()):_0x31c46c['remove']();}_0x5df813['clear']();});}['_handleInitialThreads'](_0x53739e){_0x53739e['forEach'](_0x448029=>{_0x448029['unlinkedAt']&&this['_attachArchivedThread'](_0x448029['id']);});}['_getTargetForId'](_0x3dfaf6){const _0x1520de=this['editor'],_0x2154e9=this['getAllMarkersForId'](_0x3dfaf6);return et(_0x1520de['editing'],_0x2154e9);}['_getTextContext'](_0x3c58ca){const _0x4947d9=this['getAllMarkersForId'](_0x3c58ca);let _0x4ff152='',_0x17a4b4=!0x1;for(const _0x2677da of _0x4947d9){const _0x7d4245=_0x2677da['getRange']();for(const _0x803e53 of Array['from'](_0x7d4245['getItems']()))_0x803e53['is']('$textProxy')?(_0x4ff152&&_0x17a4b4&&(_0x4ff152+='\x20',_0x17a4b4=!0x1),_0x4ff152+=_0x803e53['data']):_0x17a4b4=!0x0;_0x17a4b4=!0x0;}return _0x4ff152['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x2c194d,_0x5962c3){const _0x2c660f=this['editor'],_0x358e31=_0x2c660f['plugins']['get'](o);let _0x1fd7f0=_0x358e31['getCommentThread'](_0x5962c3);const _0x202663=_0x2c660f['config']['get']('collaboration.channelId'),_0x187d88=_0x2c660f['plugins']['get'](b);if(_0x1fd7f0&&(_0x1fd7f0['unlinkedAt']&&_0x1fd7f0['setUnlinkedAt'](null),_0x1fd7f0['isAttached']))return _0x1fd7f0;return!this['getAllMarkersForId'](_0x5962c3)[0x0]['managedUsingOperations']?_0x2c660f['editing']['view']['once']('render',()=>{if(_0x358e31['getCommentThread'](_0x5962c3))return;const _0x451a00=_0x2c660f['plugins']['get'](y);_0x1fd7f0=_0x358e31['openNewCommentThread']({'channelId':_0x202663,'threadId':_0x5962c3,'target':()=>this['_getTargetForId'](_0x5962c3),'context':{'type':'text','value':this['_getTextContext'](_0x5962c3)}});const _0x5bf631=_0x358e31['_threadToController']['get'](_0x1fd7f0)['view'],_0x266614=_0x451a00['getByInnerView'](_0x5bf631);_0x266614&&_0x187d88['registerAnnotation'](_0x266614);},{'priority':'low'}):_0x358e31['fetchCommentThread']({'channelId':_0x202663,'threadId':_0x5962c3})['then'](_0x483b6a=>{if('destroyed'!==_0x2c660f['state']){if(_0x1fd7f0=_0x483b6a,_0x1fd7f0&&!_0x1fd7f0['isAttached']){const _0x121e7d=_0x1fd7f0['attachTo'](()=>this['_getTargetForId'](_0x5962c3));_0x187d88['registerAnnotation'](_0x121e7d),_0x1fd7f0['isResolved']&&this['_reconvertMarkers'](_0x5962c3);}else{if(!_0x1fd7f0){const _0x26c758=this['getAllMarkersForId'](_0x5962c3);_0x2c660f['model']['change'](_0x5c45d2=>{for(const _0xeb5aa of _0x26c758)_0x5c45d2['removeMarker'](_0xeb5aa);});}}}}),_0x1fd7f0;}['_handleThreadMarker'](_0x3c313f,_0x5881e6){const _0x28fd61=this['_attachMarkerToThread'](_0x3c313f,_0x5881e6);_0x28fd61&&!_0x28fd61['context']&&_0x28fd61['setContext']({'type':'text','value':this['_getTextContext'](_0x5881e6)});}['_initAriaMarkerChangeAnnouncements'](){const _0xe8de1c=this['editor'];rt(_0xe8de1c['model'],({left:_0x4f7aac,entered:_0x4f972c})=>{for(const _0xbcb643 of _0x4f7aac)if(mt(_0xbcb643)){_0xe8de1c['ui']['ariaLiveAnnouncer']['announce'](N(_0xe8de1c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4229b9 of _0x4f972c)if(mt(_0x4229b9)){_0xe8de1c['ui']['ariaLiveAnnouncer']['announce'](N(_0xe8de1c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x5ec040)));break;}});}}function dt(_0x21a871,_0x14ba9a){return _0x14ba9a?_0x21a871+':'+_0x14ba9a:_0x21a871;}function ht(_0x544f1d,_0x35ad73){const _0x3caaf1=_0x35ad73['schema'],_0xaa39a1=_0x35ad73['createRange'](_0x544f1d['start']);for(const _0x585929 of _0x544f1d['getWalker']()){const {type:_0x49972e,item:_0x985b49,nextPosition:_0x21712f}=_0x585929;if('text'===_0x49972e||_0x3caaf1['isObject'](_0x985b49)){const _0x31c8c0=_0x35ad73['createPositionBefore'](_0x985b49);_0xaa39a1['isCollapsed']&&(_0xaa39a1['start']=_0x31c8c0),_0xaa39a1['end']=_0x21712f;}}return _0xaa39a1;}function mt(_0x303371){return'comment'===ft(_0x303371['name'])['group'];}class s extends _0x38185c{['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 _0x2ed20f=this['editor'],_0x1bb191=_0x2ed20f['plugins']['get'](o),_0x45ba86=_0x2ed20f['plugins']['get'](r),_0x332db4=_0x2ed20f['plugins']['get'](y),_0x10d17a=_0x2ed20f['plugins']['get'](b);_0x2ed20f['ui']['componentFactory']['add']('comment',()=>{const _0x154df6=this['_createUIButton'](_0xebef4f);return _0x154df6['tooltip']=!0x0,_0x154df6;}),_0x2ed20f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x32a340)),_0x10d17a['addSourceCollector'](()=>{const _0x452630=[];for(const [_0x1a0632,_0xae9e92]of _0x1bb191['_threadToController']){const _0x2f9e34=_0x45ba86['getAllMarkersForId'](_0x1a0632['id']),_0x20d9c5=_0x2f9e34['map'](_0x164440=>_0x164440['getRange']());_0x2f9e34['length']>0x0&&_0x452630['push']([_0xae9e92['view'],_0x20d9c5]);}return _0x452630;}),this['listenTo'](_0x332db4,'change:activeAnnotations',(_0x187eed,_0x4df9d0,_0xf7c28d)=>{const _0x3d9ac1=Array['from'](_0xf7c28d)['map'](_0x1295c5=>_0x1295c5['innerView'])['find'](_0x21c556=>_0x1bb191['_viewToController']['has'](_0x21c556));if(!_0x3d9ac1)return void(_0x45ba86['activeMarker']=null);const _0x3f50f7=_0x1bb191['_viewToController']['get'](_0x3d9ac1)['model']['id'],_0x52ba48='comment:'+_0x3f50f7;_0x3f50f7&&_0x45ba86['hasMarkerForId'](_0x3f50f7)?_0x45ba86['activeMarker']=_0x52ba48:_0x45ba86['activeMarker']&&(_0x45ba86['activeMarker']=null);}),this['listenTo'](_0x1bb191,'removeCommentThread',(_0x50ffff,{threadId:_0xaff0b6,isFromAdapter:_0x28b30f})=>{!_0x28b30f&&_0x2ed20f['ui']['focusTracker']['isFocused']&&_0x45ba86['hasMarkerForId'](_0xaff0b6)&&_0x2ed20f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x1bb191,'addComment',(_0xdbb463,{threadId:_0x8b8f91,isFromAdapter:_0x571c4a})=>{if(_0x571c4a||!_0x45ba86['hasMarkerForId'](_0x8b8f91)||!_0x1bb191['hasCommentThread'](_0x8b8f91))return;0x1===_0x1bb191['getCommentThread'](_0x8b8f91)['length']&&(_0x2ed20f['editing']['view']['focus'](),_0xdbb463['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2281e2=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x54c48c;for(const _0x1763c2 in _0x2281e2){const _0x41d77f=_0x1763c2,_0x100ed5=_0x2281e2[_0x41d77f];if('commentsLicenseKeyValid'==_0x100ed5||'commentsLicenseKeyInvalid'==_0x100ed5||'commentsLicenseKeyExpired'==_0x100ed5||'commentsLicenseKeyDomainLimit'==_0x100ed5||'commentsLicenseKeyNotAllowed'==_0x100ed5||'commentsLicenseKeyEvaluationLimit'==_0x100ed5||'commentsLicenseKeyTrialLimit'==_0x100ed5||'commentsLicenseKeyUsageLimit'==_0x100ed5){delete _0x2281e2[_0x41d77f],_0x54c48c=_0x100ed5,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x54c48c&&_0x2281e2['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x54c48c&&_0x2281e2['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x54c48c&&_0x2281e2['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x54c48c&&_0x2281e2['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x54c48c&&_0x2281e2['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x54c48c&&_0x2281e2['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x54c48c&&_0x2281e2['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2bbe05){const _0x10613e=this['editor'],_0x526865=new _0x2bbe05(_0x10613e['locale']),_0x40b84c=_0x10613e['commands']['get']('addCommentThread');return _0x526865['set']({'label':N(_0x10613e['locale'],'Comment'),'icon':_0x2356d6}),_0x526865['bind']('isEnabled')['to'](_0x40b84c,'hasContent'),this['listenTo'](_0x526865,'execute',()=>{_0x40b84c['execute']();}),_0x526865;}}class i extends _0x38185c{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x27a830){super(_0x27a830),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x595b73,_0x1ac2c6,_0x2fdb63)=>{_0x2fdb63?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x12a21c,_0x3e697e]of this['editor']['commands'])_0x3e697e['affectsData']&&'addCommentThread'!==_0x12a21c&&_0x3e697e['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 _0x26c34a=this['editor']['editing']['view']['document'];this['listenTo'](_0x26c34a,'cut',_0x1c5d25=>_0x1c5d25['stop'](),{'priority':'highest'}),this['listenTo'](_0x26c34a,'clipboardInput',_0xaf523=>_0xaf523['stop'](),{'priority':'highest'}),this['listenTo'](_0x26c34a,'delete',_0x162d95=>_0x162d95['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5915e2,_0x44679e]of this['editor']['commands'])_0x44679e['affectsData']&&'addCommentThread'!==_0x5915e2&&_0x44679e['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 _0x590f0e{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3011c8){super(_0x3011c8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x368a79=this['context']['plugins']['get'](y);this['listenTo'](_0x368a79,'_activateAnnotation',(_0x1d4067,_0x184e8b)=>{for(const _0x5415f6 of this['activeUIs']){const _0x54a86d=this['_uis']['get'](_0x5415f6);(0x0,this['uisData']['get'](_0x5415f6)['filter'])(_0x184e8b)&&_0x54a86d['setActiveAnnotation'](_0x184e8b);}}),this['listenTo'](_0x368a79,'_deactivateAllAnnotations',()=>{for(const _0xbf1132 of this['activeUIs']){this['_uis']['get'](_0xbf1132)['setActiveAnnotation'](null);}}),this['listenTo'](_0x368a79['_visibleAnnotations'],'add',(_0x553767,_0x3ebdd4)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3ebdd4);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0xa92403){return this['activeUIs']['has'](_0xa92403);}['activate'](_0x18d078,_0xfb7c47=this['defaultFilter']){const _0x266c15=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x18d078))throw new _0x20868b('annotationsuis-missing-ui',this,{'uiName':_0x18d078});this['isActive'](_0x18d078)&&this['deactivate'](_0x18d078),this['activeUIs']['add'](_0x18d078);const _0x5409ce=new S();v({'source':_0x266c15['_visibleAnnotations'],'target':_0x5409ce,'filter':_0xfb7c47}),this['uisData']['set'](_0x18d078,{'collection':_0x5409ce,'filter':_0xfb7c47});const _0x160de7=this['_uis']['get'](_0x18d078);_0x160de7['attach'](_0x5409ce),this['listenTo'](_0x160de7,'change:activeAnnotation',(_0x217399,_0x5d6079,_0x3e94ff,_0x1d4fef)=>{_0x1d4fef&&_0x266c15['_removeActiveAnnotation'](_0x1d4fef),_0x3e94ff&&_0x266c15['_addActiveAnnotation'](_0x3e94ff);});}['deactivate'](_0x104cc0){if(this['activeUIs']['delete'](_0x104cc0),!this['_uis']['has'](_0x104cc0))throw new _0x20868b('annotationsuis-missing-ui',this,{'uiName':_0x104cc0});const _0x3f19ee=this['_uis']['get'](_0x104cc0);_0x3f19ee['detach'](),this['stopListening'](_0x3f19ee),this['uisData']['get'](_0x104cc0)['collection']['destroy'](),this['uisData']['delete'](_0x104cc0);}['switchTo'](_0x287b94){if(!this['_uis']['has'](_0x287b94))throw new _0x20868b('annotationsuis-missing-ui',this,{'uiName':_0x287b94});const _0x2647db=this['context']['plugins']['get'](y),_0x40394f=Array['from'](_0x2647db['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x287b94);const _0x27449f=this['_uis']['get'](_0x287b94);_0x27449f['setActiveAnnotation'](_0x40394f),_0x27449f['_setSelectedAnnotations']&&_0x40394f&&_0x27449f['_setSelectedAnnotations']([_0x40394f]);}['deactivateAll'](){for(const _0x146288 of this['activeUIs'])this['deactivate'](_0x146288);}['register'](_0x2f9266,_0x3151ca){if(this['_uis']['has'](_0x2f9266))throw new _0x20868b('annotationsuis-register-already-registered');if('function'!=typeof _0x3151ca['attach']||'function'!=typeof _0x3151ca['detach']||'function'!=typeof _0x3151ca['setActiveAnnotation'])throw new _0x20868b('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2f9266,_0x3151ca);}['refilterAnnotations'](){const _0xccbd71=this['context']['plugins']['get'](y)['collection'],_0x3ec57f=new Map(),_0x3a8389=Array['from'](this['activeUIs']);for(const _0x7cee99 of this['activeUIs']){const _0xf3b179=this['uisData']['get'](_0x7cee99)['collection'];for(const _0x2a6089 of _0xf3b179)_0x3ec57f['set'](_0x2a6089,_0x7cee99);}for(const _0x129713 of _0xccbd71){const _0x9fb316=_0x3ec57f['get'](_0x129713);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x129713);const _0x375550=_0x3a8389['find'](_0x1a31c0=>this['uisData']['get'](_0x1a31c0)['filter'](_0x129713));_0x9fb316!==_0x375550&&(_0x9fb316&&this['uisData']['get'](_0x9fb316)['collection']['remove'](_0x129713),_0x375550&&this['uisData']['get'](_0x375550)['collection']['add'](_0x129713));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x55dded){const _0x829cc3=[];for(const _0x3f780a of this['activeUIs']){(0x0,this['uisData']['get'](_0x3f780a)['filter'])(_0x55dded)&&_0x829cc3['push'](_0x3f780a);}if(_0x829cc3['length']>0x1)throw new _0x20868b('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x829cc3,'annotationType':_0x55dded['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(_0x430909){super(_0x430909),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x1908c3,_0x5ac6d3)=>_0x1908c3+_0x5ac6d3),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x128153=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x128153['to']('isAnimationDisabled',_0x576e7e=>_0x576e7e?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x128153['to']('top',_0x1ccb53=>Ot(_0x1ccb53))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x590f29=this['element']['clientHeight'];_0x590f29&&(this['height']=_0x590f29);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x590f0e{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1fc941){super(_0x1fc941),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 _0x2ec68f=this['context']['config']['get']('sidebar.container');_0x2ec68f&&this['setContainer'](_0x2ec68f);}['setContainer'](_0x2351a6){if(!g(_0x2351a6))throw new _0x20868b('sidebar-setcontainer-invalid-element');this['container']=_0x2351a6;}['_attachToContainer']({viewClass:_0x2cc5b7='',spaceBetweenItems:_0x33753d=0x19}={}){if(!g(this['container']))throw new _0x20868b('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2cc5b7,this['_spaceBetweenItems']=_0x33753d;}['rearrange']({removedAnnotation:_0x415d02,previousAnnotation:_0x108197,nextAnnotation:_0x3b8d85}){const _0x4644b5=this['getSidebarItemView'](_0x415d02);this['view']['list']['remove'](_0x4644b5),this['_destroySidebarItemView'](_0x415d02),_0x108197&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x108197)),_0x3b8d85&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3b8d85)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2a9ff0,activatedAnnotation:_0x6fd27,disableAnimationOnActivatedAnnotation:_0x4cd938}){if(this['_activeAnnotation']=_0x6fd27,_0x2a9ff0){_0x2a9ff0['isActive']=!0x1;const _0x581f22=this['getSidebarItemView'](_0x2a9ff0);_0x581f22&&_0x4cd938&&(_0x581f22['isAnimationDisabled']=!0x1);}if(_0x6fd27){const _0x42cd98=this['getSidebarItemView'](_0x6fd27);_0x42cd98&&(_0x6fd27['isActive']=!0x0,_0x4cd938&&(_0x42cd98['isAnimationDisabled']=!0x0,_0x42cd98['top']+=0x1),this['_alignToTargetRect'](_0x42cd98));}}['_detachFromContainer'](_0x5c37d9){if(this['view']['element']['remove'](),_0x5c37d9){for(const _0x1ffc6b of _0x5c37d9)this['_destroySidebarItemView'](_0x1ffc6b);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x2b81d0,_0x29eef3){_0x29eef3||(_0x29eef3=_0x2b81d0['view']);const _0x9725d3=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x9725d3,_0x2b81d0),this['_annotationToSidebarItemView']['set'](_0x2b81d0,_0x9725d3),_0x9725d3['content']['add'](_0x29eef3),this['listenTo'](_0x2b81d0['view'],'change:targetRect',(_0x13a3e1,_0x1895af,_0x3e3188)=>{const _0x19b8ac=this['_getTargetTop'](_0x2b81d0,_0x3e3188);_0x9725d3['_targetTop']!=_0x19b8ac&&(_0x9725d3['_targetTop']=_0x19b8ac,this['_setItemTop'](_0x9725d3,_0x19b8ac));}),this['listenTo'](_0x9725d3,'change:top',()=>{this['_recalculate'](_0x9725d3,'top');}),this['listenTo'](_0x9725d3,'change:bottom',()=>{this['_recalculate'](_0x9725d3,'bottom');}),this['_alignToTargetRect'](_0x9725d3);const _0x391821=this['_getItemBefore'](_0x9725d3);if(_0x391821)this['_alignAfterItem'](_0x391821,_0x9725d3)||this['_alignToTargetRect'](_0x9725d3);else this['_alignToTargetRect'](_0x9725d3);return this['_updateLastItem'](),this['view']['list']['add'](_0x9725d3),_0x9725d3;}['_alignForTopChange'](_0x41b8a9){if(!_0x41b8a9['content']['length'])return;const _0x116ad7=this['_getItemBefore'](_0x41b8a9);if(!_0x116ad7)return;const _0x2bc14e=this['_sidebarItemViewToAnnotation']['get'](_0x116ad7),_0x5570b5=this['_activeAnnotation'];_0x5570b5&&_0x5570b5===_0x2bc14e?this['_alignAfterItem'](_0x116ad7,_0x41b8a9):this['_alignBeforeItem'](_0x41b8a9,_0x116ad7);}['_alignForBottomChange'](_0x299f02){if(!_0x299f02['content']['length'])return;const _0x1160bd=this['_getItemAfter'](_0x299f02);if(!_0x1160bd)return;const _0x337840=this['_sidebarItemViewToAnnotation']['get'](_0x1160bd),_0x5a9e86=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x2c9a87=this['_activeAnnotation'];_0x2c9a87&&_0x2c9a87===_0x337840&&_0x5a9e86?(this['_alignBeforeItem'](_0x1160bd,_0x299f02),this['_alignAfterItem'](_0x299f02,_0x1160bd)):_0x2c9a87&&_0x2c9a87===_0x337840?this['_alignBeforeItem'](_0x1160bd,_0x299f02):this['_alignAfterItem'](_0x299f02,_0x1160bd);}['_recalculate'](_0x346f66,_0xd41b48){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3f705e,changedProp:_0x3d4cf5}of this['_recalculateBuffer'])'top'===_0x3d4cf5?this['_alignForTopChange'](_0x3f705e):this['_alignForBottomChange'](_0x3f705e);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x346f66,'changedProp':_0xd41b48});}['getSidebarItemView'](_0x59b475){return this['_annotationToSidebarItemView']['get'](_0x59b475);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x3f4960){const _0x2cdf8f=this['getSidebarItemView'](_0x3f4960);this['stopListening'](_0x2cdf8f),this['stopListening'](_0x3f4960['view']),_0x2cdf8f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x3f4960),this['_sidebarItemViewToAnnotation']['delete'](_0x2cdf8f);}['_createSidebarView'](){const _0x4785d0=new H(this['context']['locale']);return _0x4785d0['render'](),this['on']('change:_lastItem',(_0x3dcbc6,_0xb7c3ff,_0x2b197a,_0x5a0aba)=>{_0x5a0aba&&_0x4785d0['unbind']('minHeight'),_0x2b197a?_0x4785d0['bind']('minHeight')['to'](_0x2b197a,'bottom'):_0x4785d0['minHeight']=null;}),_0x4785d0;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5bdb2c){const _0x2791ca=this['_sidebarItemViewToAnnotation']['get'](_0x5bdb2c),_0x26dc66=_0x2791ca&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2791ca)-0x1);return _0x26dc66&&this['getSidebarItemView'](_0x26dc66)||null;}['_getItemAfter'](_0xb9a25b){const _0x1b8479=this['_sidebarItemViewToAnnotation']['get'](_0xb9a25b),_0xfad632=_0x1b8479&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1b8479)+0x1);return _0xfad632&&this['getSidebarItemView'](_0xfad632)||null;}['_alignBeforeItem'](_0x1390fc,_0x3eaf87){_0x1390fc['updateHeight']();const _0x5155c8=G(_0x3eaf87['bottom']+this['_spaceBetweenItems'],_0x1390fc['top']);return!!_0x5155c8&&(this['_setItemTop'](_0x3eaf87,_0x3eaf87['top']-_0x5155c8),!0x0);}['_alignAfterItem'](_0x3c6db0,_0x1aaf2e){_0x3c6db0['updateHeight']();const _0x45916d=G(_0x3c6db0['bottom']+this['_spaceBetweenItems'],_0x1aaf2e['top']);return!!_0x45916d&&(this['_setItemTop'](_0x1aaf2e,_0x1aaf2e['top']+_0x45916d,!0x1),!0x0);}['_alignToTargetRect'](_0x294f12){const _0x2ab150=this['_sidebarItemViewToAnnotation']['get'](_0x294f12);if(!_0x2ab150||!_0x2ab150['target']||!_0x2ab150['targetRect'])return;const _0x3e38a4=this['_getTargetTop'](_0x2ab150,_0x2ab150['targetRect']);this['_setItemTop'](_0x294f12,_0x3e38a4);}['_getTargetTop'](_0x240d03,_0x5c39d5){if(null===_0x5c39d5)return 0x0;if(_0x240d03['target']instanceof _0x330918)return _0x5c39d5['top'];{const _0x2bae25=new _0x330918(this['view']['element'])['top'];return _0x5c39d5['top']-_0x2bae25;}}['_setItemTop'](_0x348051,_0x59bdcf,_0x2f16f7=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2f16f7&&(_0x59bdcf=Math['max'](_0x59bdcf,this['_getMaxAvailableTop'](_0x348051))),_0x348051['top']=_0x59bdcf;}['_getMaxAvailableTop'](_0x4f7838){let _0x5e4eec=this['_getItemBefore'](_0x4f7838),_0x56c347=0x0;for(;_0x5e4eec;)_0x5e4eec['updateHeight'](),_0x56c347+=this['_spaceBetweenItems']+_0x5e4eec['height'],_0x5e4eec=this['_getItemBefore'](_0x5e4eec);return _0x56c347;}}function G(_0x47d16a,_0x30ef7f){return Math['max'](_0x47d16a-_0x30ef7f,0x0);}function g(_0x28f70c){return null!==_0x28f70c&&'object'==typeof _0x28f70c&&0x1===_0x28f70c['nodeType'];}class e extends _0x590f0e{['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(_0x5fe183){super(_0x5fe183),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x15baf7(),this['_refreshPositioningDebounced']=_0x213d6b(()=>{_0x5fe183['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1a76aa=this['context']['plugins']['get'](j),_0x3d4f98=this['context']['plugins']['get'](z);_0x1a76aa['register']('wideSidebar',this),_0x3d4f98['container']&&_0x1a76aa['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x2066ba){if(_0x2066ba===this['activeAnnotation'])return;const _0x542154=this['context']['plugins']['get'](z);_0x542154['_activeAnnotation']=_0x2066ba;const _0x7d54cc=this['activeAnnotation'];_0x542154['refresh']({'blurredAnnotation':_0x7d54cc,'activatedAnnotation':_0x2066ba}),this['activeAnnotation']=_0x2066ba;}['attach'](_0x2236bc){this['annotations']=_0x2236bc;const _0x21b21f=this['context']['plugins']['get'](z);if(_0x21b21f['_annotations']=_0x2236bc,this['isAttached'])throw new _0x20868b('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x21b21f,'set:container',()=>{this['detach'](),this['listenTo'](_0x21b21f,'change:container',_0x252048=>{_0x252048['off'](),this['attach'](_0x2236bc);});}),_0x21b21f['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5f349f=_0x171c04=>{_0x171c04['updateTargetRect'](),_0x21b21f['addAnnotation'](_0x171c04);};for(const _0x285a86 of _0x2236bc)_0x5f349f(_0x285a86);this['listenTo'](_0x2236bc,'add',(_0x3ba33f,_0x12f9c0)=>{_0x5f349f(_0x12f9c0);}),this['listenTo'](_0x2236bc,'remove',(_0x148f24,_0xbbdf51,_0x3ca735)=>{_0x21b21f['rearrange']({'removedAnnotation':_0xbbdf51,'previousAnnotation':_0x2236bc['get'](_0x3ca735-0x1),'nextAnnotation':_0x2236bc['get'](_0x3ca735+0x1)}),_0xbbdf51===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2236bc,'focus',(_0x52c413,_0x229c68)=>{this['setActiveAnnotation'](_0x229c68);}),this['listenTo'](_0x2236bc,'blur',()=>{this['setActiveAnnotation'](null);});const _0x54ec11=this['context']instanceof _0x43c561?this['context']['editors']:new _0x15baf7([this['context']]);for(const _0x573876 of _0x54ec11)this['_integrateWithEditorAnnotations'](_0x573876);this['listenTo'](_0x54ec11,'add',(_0x530f78,_0x52e297)=>{this['listenTo'](_0x52e297,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x52e297);});}),this['listenTo'](_0x54ec11,'remove',(_0x5d6183,_0x45b8b6)=>{_0x45b8b6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x45b8b6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x20868b('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4435e7=this['context']['plugins']['get'](z);_0x4435e7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4435e7),this['stopListening'](this['annotations']),this['context']instanceof _0x43c561&&this['stopListening'](this['context']['editors']);for(const _0x33841d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x33841d);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x48245b){if(!_0x48245b['plugins']['has']('EditorAnnotations'))return;const _0x1c6278=_0x48245b['plugins']['get']('EditorAnnotations'),_0x439bf0=()=>{const _0x5d33f5=_0x1c6278['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x5d33f5[0x0]||null);};this['listenTo'](_0x1c6278,'refresh',_0x439bf0),this['listenTo'](_0x1c6278,'blur',(_0x247966,{isAnnotationTracked:_0x3df60f})=>{this['activeAnnotation']&&_0x3df60f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1c6278,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x175647=>{_0x1c6278['hasDomSelection']()&&(_0x439bf0(),_0x175647['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1c6278);}['_destroyEditorAnnotationsIntegration'](_0x39f95b){this['stopListening'](_0x39f95b),this['_editorAnnotations']['remove'](_0x39f95b);}}class C extends _0xebef4f{['counterView'];constructor(_0x4786de){super(_0x4786de);const _0x1ab1e5=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x222fc4,_0x318ec8)=>_0x222fc4?'...':_0x318ec8['toString']()),this['set']('annotationType',''),this['icon']=_0x2356d6,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1ab1e5['to']('annotationType',_0x1be2e8=>'ck-annotation-counter__badge--'+_0x1be2e8),_0x1ab1e5['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1ab1e5['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x590f0e{['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(_0x398405){super(_0x398405),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x13c6ce())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x15baf7(),this['_refreshPositioningDebounced']=_0x213d6b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3e66b6(this['context']['locale']),this['balloonPanelView']=new _0x113c00(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x95c517){this['annotations']=_0x95c517;const _0x5206a4=this['context']['plugins']['get'](z),_0xfc0ce=this['balloonPanelView'];if(_0x5206a4['_annotations']=_0x95c517,this['isAttached'])throw new _0x20868b('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5206a4,'set:container',()=>{this['detach'](),this['listenTo'](_0x5206a4,'change:container',_0x138af9=>{_0x138af9['off'](),this['attach'](_0x95c517);});}),_0x5206a4['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1b63b3=_0x240e77=>{const _0x1d2a6e=new C(this['context']['locale']);_0x5206a4['addAnnotation'](_0x240e77,_0x1d2a6e),this['_annotationToNarrowView']['set'](_0x240e77,_0x1d2a6e),_0x1d2a6e['bind']('isDirty','annotationType','number')['to'](_0x240e77['view'],'isDirty','type','length'),_0x1d2a6e['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xfc0ce['content']['first']!==_0x240e77['view']?(this['_showBalloon'](_0x240e77),_0x240e77['view']['element']['focus'](),this['setActiveAnnotation'](_0x240e77)):this['setActiveAnnotation'](null);});};for(const _0x685727 of _0x95c517)_0x1b63b3(_0x685727);this['listenTo'](_0x95c517,'add',(_0x1e68ff,_0x3cfec3)=>{_0x1b63b3(_0x3cfec3);}),this['listenTo'](_0x95c517,'remove',(_0x28b062,_0x246c79,_0xfc646)=>{this['_annotationToNarrowView']['get'](_0x246c79)['destroy'](),this['_annotationToNarrowView']['delete'](_0x246c79),_0x5206a4['rearrange']({'removedAnnotation':_0x246c79,'previousAnnotation':_0x95c517['get'](_0xfc646-0x1),'nextAnnotation':_0x95c517['get'](_0xfc646+0x1)}),_0x246c79===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x95c517,'focus',(_0x3425a3,_0x2eaaae)=>{this['setActiveAnnotation'](_0x2eaaae);}),this['listenTo'](_0x95c517,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x2c3e4a,_0x2571ba)=>{_0x2571ba['keyCode']===_0x37838f['esc']&&_0xfc0ce['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xfc0ce['content']['first']),this['_hideBalloon'](),_0x2571ba['stopPropagation'](),_0x2571ba['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2e216c,_0x51f173)=>{const _0x4f7804=_0x51f173['target'];_0xfc0ce['isVisible']&&_0xfc0ce['element']['contains'](_0x4f7804)||_0x5206a4['view']['element']['contains'](_0x4f7804)||_0x2e216c['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3f82ee=>_0x3f82ee['contains'](_0x4f7804))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x48824e=this['context']instanceof _0x43c561?this['context']['editors']:new _0x15baf7([this['context']]);for(const _0x564715 of _0x48824e)this['_integrateWithEditorAnnotations'](_0x564715);this['listenTo'](_0x48824e,'add',(_0x11a6c7,_0x4e5af5)=>{this['listenTo'](_0x4e5af5,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4e5af5);});}),this['listenTo'](_0x48824e,'remove',(_0x2daf39,_0xc483e9)=>{_0xc483e9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xc483e9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x496ba0){if(_0x496ba0===this['activeAnnotation'])return;const _0x2dab81=this['context']['plugins']['get'](z);if(_0x2dab81['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x496ba0,'disableAnimationOnActivatedAnnotation':!0x0}),_0x496ba0)_0x2dab81['getSidebarItemView'](_0x496ba0)?this['_showBalloon'](_0x496ba0):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x496ba0;}['detach'](){if(!this['isAttached'])throw new _0x20868b('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xeb9d07=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5bcc55=>_0x5bcc55['destroy']()),this['_annotationToNarrowView']['clear'](),_0xeb9d07['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x43c561&&this['stopListening'](this['context']['editors']);for(const _0x258488 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x258488);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'](_0x58bbfb){if(!_0x58bbfb['plugins']['has']('EditorAnnotations'))return;const _0x547859=_0x58bbfb['plugins']['get']('EditorAnnotations'),_0x3f1971=this['context']['plugins']['get'](z),_0x1ca5ab=this['annotations'],_0x128ce8=this['balloonPanelView'],_0x20308c=()=>{const _0x13e970=_0x547859['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x13e970),this['setActiveAnnotation'](_0x13e970[0x0]||null);};this['listenTo'](_0x547859,'refresh',_0x20308c),this['listenTo'](_0x547859,'blur',(_0x4c2bc8,{isAnnotationTracked:_0xbf8bce})=>{this['activeAnnotation']&&_0xbf8bce(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x547859,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1ca5ab,'blur',_0x1e7598=>{_0x547859['hasDomSelection']()&&_0x1e7598['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4ebf8d,_0x37d76e)=>{const _0x1184a3=_0x37d76e['target'];_0x128ce8['isVisible']&&_0x128ce8['element']['contains'](_0x1184a3)||_0x3f1971['view']['element']['contains'](_0x1184a3)||this['activeAnnotation']&&_0x547859['hasDomSelection']()&&(_0x20308c(),_0x4ebf8d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x547859);}['_destroyEditorAnnotationsIntegration'](_0x5e9952){_0x5e9952&&(this['stopListening'](_0x5e9952),this['_editorAnnotations']['remove'](_0x5e9952));}['_setSelectedAnnotations'](_0x3cfa46){for(const _0x53ddad of this['_selectedAnnotations'])_0x3cfa46['includes'](_0x53ddad)||this['_manuallyClosedAnnotationViews']['delete'](_0x53ddad['view']);this['_selectedAnnotations']=_0x3cfa46;}['_refreshPositioning'](){const _0x52f41a=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x52f41a['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3b0ec4){if(this['_manuallyClosedAnnotationViews']['has'](_0x3b0ec4['view']))return;const _0x3f7f77=this['balloonPanelView']['content']['first'];_0x3f7f77!==_0x3b0ec4['view']?(_0x3f7f77&&this['_detachListeners'](_0x3f7f77),this['_attachListeners'](_0x3b0ec4['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3b0ec4['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x69b6f9=this['balloonPanelView']['content']['first'],_0xaa5c8f=_0x69b6f9&&this['annotations']['getByView'](_0x69b6f9);if(!_0xaa5c8f||!this['_annotationToNarrowView']['has'](_0xaa5c8f))return;const _0x43881=this['_annotationToNarrowView']['get'](_0xaa5c8f)['element'],_0x3a9936=(function(){const _0x16e287=_0x113c00['defaultPositions'];return[_0x16e287['southArrowNorthEast'],_0x16e287['northArrowSouthEast'],_0x16e287['southArrowNorth'],_0x16e287['northArrowSouth'],_0x16e287['southArrowNorthWest'],_0x16e287['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x43881,'positions':_0x3a9936});}['_hideBalloon'](){const _0x4393f1=this['balloonPanelView'],_0x2e4c9e=_0x4393f1['content']['first'];_0x2e4c9e&&(this['_detachListeners'](_0x2e4c9e),_0x4393f1['unpin'](),_0x4393f1['content']['clear']());}['_attachListeners'](_0x8fc3ef){this['listenTo'](_0x8fc3ef,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x8fc3ef,'Esc',(_0x23a813,_0x1724d7)=>{this['_manuallyClosedAnnotationViews']['add'](_0x8fc3ef),this['_hideBalloon'](),_0x1724d7();});}['_detachListeners'](_0x574a57){this['stopListening'](_0x574a57);}}class c extends _0x38185c{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x503e49,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x466f88){super(_0x466f88),_0x466f88['editing']['view']['addObserver'](_0x35d2a0),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x466f88['plugins']['get'](_0x503e49),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x2fb952=this['editor']['plugins']['get'](j);_0x2fb952['context']===this['editor']&&(_0x2fb952['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1a9cdb,_0xa0b104)=>{const _0x5d843f=this['_balloon'];if(this['isAttached']&&_0x5d843f['visibleView']){const _0x1793ed=this['annotations']['getByView'](_0x5d843f['visibleView']);_0x1793ed&&this['_closeAnnotation'](_0x1793ed),_0xa0b104();}}));}['afterInit'](){const _0x480acf=this['editor']['plugins']['get'](j);_0x480acf['context']===this['editor']&&(_0x480acf['hasActive']()||_0x480acf['switchTo']('inline'));}['setActiveAnnotation'](_0x1cdd1c){_0x1cdd1c!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1cdd1c&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1cdd1c)&&this['_addAnnotationToBalloon'](_0x1cdd1c,!0x0),_0x1cdd1c['isActive']=!0x0),_0x1cdd1c||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1cdd1c);}['attach'](_0x2e7bc0){this['annotations']=_0x2e7bc0;const _0xea325d=this['editor']['plugins']['get'](j),_0x4b7e08=this['_balloon'];if(this['isAttached'])throw new _0x20868b('inlineannotations-attach-already-attached',this);if(_0xea325d['context']!==this['editor'])throw new _0x20868b('inlineannotations-not-allowed-with-context',this);const _0x36c46=this['editor']['plugins']['get'](b);this['listenTo'](_0x36c46,'refresh',()=>{const _0x2fc5b5=_0x36c46['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x13b199,_0x269d89;!this['_forceRefresh']&&(_0x13b199=_0x2fc5b5,_0x269d89=this['_selectedAnnotations'],_0x13b199['length']===_0x269d89['length']&&_0x13b199['every'](_0x4766ba=>_0x269d89['includes'](_0x4766ba)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2fc5b5),this['setActiveAnnotation'](_0x2fc5b5[0x0]||null));}),this['listenTo'](_0x36c46,'blur',(_0x2a959c,{isAnnotationTracked:_0x1d0e33})=>{this['activeAnnotation']&&_0x1d0e33(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4f3973,_0x11792a,_0x33e48a)=>{_0x33e48a||this['setActiveAnnotation'](null);}),this['listenTo'](_0x2e7bc0,'remove',(_0x4ccdd0,_0x404d09)=>{this['_removeAnnotationFromBalloon'](_0x404d09),_0x404d09===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4b7e08,'change:visibleView',(_0x3f7f4e,_0x33bcb3,_0xc1e6f,_0x5c2e7b)=>{_0x5c2e7b&&this['stopListening'](_0x5c2e7b);const _0x125a0c=_0x2e7bc0['getByView'](_0xc1e6f);_0xc1e6f&&_0x125a0c&&(this['listenTo'](_0xc1e6f,'change:height',()=>{_0x4b7e08['updatePosition']();}),this['listenTo'](_0xc1e6f,'Esc',()=>{this['_closeAnnotation'](_0x125a0c),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x125a0c&&this['setActiveAnnotation'](_0x125a0c));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4b7e08['visibleView']&&(_0x2e7bc0['getByView'](_0x4b7e08['visibleView'])&&_0x4b7e08['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 _0x20868b('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1da936 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1da936);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x28367a){for(const _0x3a9705 of this['_selectedAnnotations'])_0x28367a['includes'](_0x3a9705)||this['_manuallyClosed']['delete'](_0x3a9705);for(const _0x58bc01 of this['annotations'])_0x28367a['includes'](_0x58bc01)||this['_removeAnnotationFromBalloon'](_0x58bc01);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x143409 of _0x28367a)this['_addAnnotationToBalloon'](_0x143409);}this['_selectedAnnotations']=_0x28367a;}['_addAnnotationToBalloon'](_0x22d358,_0x5796cf=!0x1){this['_manuallyClosed']['has'](_0x22d358)||(this['_addedAnnotations']['has'](_0x22d358)||this['_balloon']['hasView'](_0x22d358['view'])||(this['_addedAnnotations']['add'](_0x22d358),this['_balloon']['add']({'stackId':_0x22d358['view']['id'],'view':_0x22d358['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x22d358)}})),_0x5796cf&&this['_balloon']['showStack'](_0x22d358['view']['id']));}['_getBalloonTargetForAnnotation'](_0x220fae){const _0x58796b=_0x220fae['target'],_0x1a3c0a=this['editor']['editing']['view'],_0x898ac4=_0x1a3c0a['document']['selection']['getFirstRange'](),_0x7e3803=_0x1a3c0a['domConverter']['viewRangeToDom'](_0x898ac4);if(_0x7e3803['collapse'](!0x0),_0x58796b){if(_0x58796b instanceof _0x330918)return _0x58796b;let _0x10e00e=[];for(const _0x2c9dbc of _0x58796b)_0x10e00e['push'](...F(_0x2c9dbc['getClientRects']()));_0x10e00e=function(_0x3de627){const _0x1d6a17=[];let _0x28cf2f=_0x3de627[0x0];for(let _0x4b09ac=0x1;_0x4b09ac<_0x3de627['length'];_0x4b09ac++)P(_0x28cf2f,_0x3de627[_0x4b09ac])?_0x28cf2f['width']+=_0x3de627[_0x4b09ac]['width']:(_0x1d6a17['push'](_0x28cf2f),_0x28cf2f=_0x3de627[_0x4b09ac]);return _0x1d6a17['push'](_0x28cf2f),_0x1d6a17;}(_0x10e00e);const _0x4773f3=_0x7e3803['getBoundingClientRect']();return _0x10e00e['find'](_0x1c0b16=>_0x1c0b16['top']<=_0x4773f3['top']&&_0x1c0b16['bottom']>=_0x4773f3['bottom']&&_0x1c0b16['left']<=_0x4773f3['left']&&_0x1c0b16['right']>=_0x4773f3['right'])||_0x10e00e[0x0];}return _0x220fae['targetRect']||_0x7e3803;}['_removeAnnotationFromBalloon'](_0x27ca7e){this['_addedAnnotations']['has'](_0x27ca7e)&&this['_balloon']['hasView'](_0x27ca7e['view'])&&(this['_addedAnnotations']['delete'](_0x27ca7e),this['_balloon']['remove'](_0x27ca7e['view']));}['_closeAnnotation'](_0x2bfccb){this['_manuallyClosed']['add'](_0x2bfccb),this['_removeAnnotationFromBalloon'](_0x2bfccb);}}function F(_0x443608){return Array['from'](_0x443608)['map'](DOMRect['fromRect']);}function P(_0x173788,_0x3f842e){return _0x173788['top']===_0x3f842e['top']&&_0x173788['bottom']===_0x3f842e['bottom']&&_0x173788['right']===_0x3f842e['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x41a69e,_0x4e4478){super(_0x41a69e),this['set']('isEmpty',!_0x4e4478['length']),this['focusTracker']=new _0x27a125(),this['_annotationViews']=_0x4e4478,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x53ae9a({'focusables':_0x4e4478,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4e4478,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4e4478,'remove',(_0x1be032,_0x8456ff)=>{_0x8456ff['isActive']&&this['focus'](),_0x4e4478['length']||(this['isEmpty']=!0x0);});const _0x1c5a70=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x41a69e,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4e4478},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1c5a70['if']('isEmpty','ck-hidden',_0x41f252=>!_0x41f252)]},'children':[{'text':N(_0x41a69e,'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 _0x4c031c of this['_annotationViews'])this['focusTracker']['add'](_0x4c031c['element']);this['_annotationViews']['on']('change',(_0x182864,{added:_0x1d68e4,removed:_0x4c5148})=>{for(const _0x2eaf44 of _0x1d68e4)this['focusTracker']['add'](_0x2eaf44['element']);for(const _0x23f0db of _0x4c5148)this['focusTracker']['remove'](_0x23f0db['element']);});}}class p extends _0x590f0e{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x34755c){super(_0x34755c),this['archivedThreads']=new _0x15baf7();}['init'](){const _0x24e4de=this['context'],_0x4e6cf5=_0x24e4de['plugins']['get'](o),_0x493c7f=_0x24e4de['plugins']['get'](y);this['listenTo'](_0x4e6cf5,'addCommentThread',(_0xd2d99c,{threadId:_0x1f1e08})=>{const _0x54f4a2=_0x4e6cf5['getCommentThread'](_0x1f1e08);_0x54f4a2['archivedAt']&&this['archivedThreads']['add'](_0x54f4a2,this['_calculatePosition'](_0x54f4a2['archivedAt'])),this['listenTo'](_0x54f4a2,'change:archivedAt',(_0x1f9201,_0x3bf775,_0x5d6fd7)=>{_0x5d6fd7?this['archivedThreads']['has'](_0x54f4a2)||this['archivedThreads']['add'](_0x54f4a2,this['_calculatePosition'](_0x54f4a2['archivedAt'])):this['archivedThreads']['has'](_0x54f4a2)&&this['archivedThreads']['remove'](_0x54f4a2);});}),this['listenTo'](_0x4e6cf5,'removeCommentThread',(_0x5def77,{threadId:_0x18ddc9})=>{const _0x29f869=_0x4e6cf5['getCommentThread'](_0x18ddc9);this['stopListening'](_0x29f869),this['archivedThreads']['has'](_0x29f869)&&this['archivedThreads']['remove'](_0x29f869);},{'priority':'highest'}),this['listenTo'](_0x493c7f['collection'],'focus',(_0x481e65,_0x12a114)=>{_0x12a114['isVisible']||(_0x12a114['isActive']=!0x0,_0x493c7f['activate'](_0x12a114));});}['_calculatePosition'](_0x510238){const _0x2ba092=[...this['archivedThreads']]['findIndex'](_0x1170c5=>_0x1170c5['archivedAt']<_0x510238);return _0x2ba092>-0x1?_0x2ba092:this['archivedThreads']['length'];}}class a extends _0x38185c{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x25b998];}constructor(_0x403847){super(_0x403847),this['annotationViews']=new _0x483a9f(),this['_pendingThreads']=[];}['init'](){const _0x4874e2=this['editor'],_0x4f548a=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4874e2['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xebef4f,!0x0)),_0x4874e2['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1971f4=this['_createCommentsArchiveButton'](_0x32a340);return _0x1971f4['set']({'role':'menuitemcheckbox'}),_0x1971f4;});const _0x3e37f3=_0x4874e2['plugins']['get'](p),_0x226940=_0x4874e2['plugins']['get']('Annotations'),_0x335b55=_0x4874e2['plugins']['get']('CommentsRepository');_0x3e37f3['archivedThreads']['forEach'](_0x2449ee=>{this['_handleNewThread'](_0x2449ee);}),this['listenTo'](_0x3e37f3['archivedThreads'],'add',(_0x21fc0d,_0x40282b)=>{this['_handleNewThread'](_0x40282b);}),this['listenTo'](_0x226940['collection'],'add',(_0x37b35e,_0x1d2dfe)=>{const _0x54f7c2=this['_pendingThreads']['find'](_0x4f7088=>{const _0x1cfff8=_0x335b55['_threadToController']['get'](_0x4f7088);return _0x1cfff8&&_0x1d2dfe['innerView']===_0x1cfff8['view'];});if(_0x54f7c2){const _0x32b1dd=this['_calculatePosition'](_0x54f7c2['archivedAt']);this['_addAnnotationToArchive'](_0x1d2dfe,_0x32b1dd),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x54f7c2),0x1);}}),this['listenTo'](_0x3e37f3['archivedThreads'],'remove',(_0x1bd08e,_0xc90a7d)=>{const _0x42964f=_0x4874e2['config']['get']('collaboration.channelId');if(!_0x42964f||_0xc90a7d['channelId']===_0x42964f){if(this['_pendingThreads']['includes'](_0xc90a7d))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xc90a7d),0x1);else{const _0x563b2b=_0x335b55['_threadToController']['get'](_0xc90a7d),_0x598025=_0x226940['getByInnerView'](_0x563b2b['view']);this['annotationViews']['remove'](_0x598025['view']),this['stopListening'](_0x598025),this['stopListening'](_0x598025['focusableElements']);}}}),this['listenTo'](_0x226940['collection'],'add',(_0x4b28b8,_0x2abd56)=>{this['listenTo'](_0x2abd56,'escape',_0x4f548a);}),this['listenTo'](_0x226940['collection'],'remove',(_0x28002d,_0x1f2452)=>{this['stopListening'](_0x1f2452,'escape',_0x4f548a);});}['_addAnnotationToArchive'](_0x434285,_0x3c3ad2){this['listenTo'](_0x434285,'set:isVisible',_0x3652a8=>{_0x3652a8['return']=!0x1,_0x3652a8['stop']();}),this['annotationViews']['add'](_0x434285['view'],_0x3c3ad2);}['_handleNewThread'](_0x226edf){const _0x523bac=this['editor']['plugins']['get']('CommentsRepository'),_0x3fc6db=this['editor']['plugins']['get']('Annotations'),_0x1e1044=this['editor']['config']['get']('collaboration.channelId');if(!_0x1e1044||_0x226edf['channelId']===_0x1e1044){const _0x3cf3cb=_0x523bac['_threadToController']['get'](_0x226edf);if(!_0x3cf3cb)return void this['_pendingThreads']['push'](_0x226edf);const _0x5b5f97=this['_calculatePosition'](_0x226edf['archivedAt']),_0x191545=_0x3fc6db['getByInnerView'](_0x3cf3cb['view']);_0x191545['isVisible']&&_0x3fc6db['_visibleAnnotations']['remove'](_0x191545),this['_addAnnotationToArchive'](_0x191545,_0x5b5f97);}}['_calculatePosition'](_0xa27ef2){const _0x33530f=this['editor']['config']['get']('collaboration.channelId'),_0x4f7302=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4926bd=>_0x4926bd['channelId']===_0x33530f)['findIndex'](_0x4cd8fd=>_0x4cd8fd['archivedAt']<_0xa27ef2);return _0x4f7302<0x0||_0x4f7302>this['annotationViews']['length']?this['annotationViews']['length']:_0x4f7302-0x1;}['_toggleDialog'](){const _0x5d5d47=this['editor'],_0x57a2e9=_0x5d5d47['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x5d5d47['locale'],this['annotationViews'])),'commentsArchive'===_0x57a2e9['id']?_0x57a2e9['hide']():_0x57a2e9['show']({'id':'commentsArchive','title':N(_0x5d5d47['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4394e7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3a354d['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xd9889,_0x5eb299=!0x1){const _0x20a9a4=this['editor']['locale'],_0x164074=this['editor']['plugins']['get']('Dialog'),_0xfabc2=new _0xd9889(_0x20a9a4);return _0xfabc2['bind']('isEnabled')['to'](this,'isEnabled'),_0xfabc2['bind']('isOn')['to'](_0x164074,'id',_0x1e88e0=>'commentsArchive'===_0x1e88e0),_0xfabc2['set']({'label':N(_0x20a9a4,'COMMENTS_ARCHIVE'),'icon':_0x4394e7,'isToggleable':!0x0}),_0x5eb299&&(_0xfabc2['tooltip']=!0x0),this['listenTo'](_0xfabc2,'execute',()=>this['_toggleDialog']()),_0xfabc2;}['_hideDialogOnAnnotationEscape']=_0x4f8b11=>{const _0xd00a36=_0x4f8b11['source'];if(!this['annotationViews']['has'](_0xd00a36['view']))return;const _0x2f19db=this['editor']['plugins']['get']('Dialog');_0x2f19db['isOpen']&&'commentsArchive'===_0x2f19db['id']&&(_0x2f19db['hide'](),_0x4f8b11['stop']());};}class gi extends _0x38185c{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 _0x1b0da7,ContextPlugin as _0x313b3a,PendingActions as lt,Command as _0x2d7805,Plugin as _0x6d2056,Context as _0x4d6295}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3e3063,uid as _0x2f2703,KeystrokeHandler as jt,FocusTracker as _0x5f12d6,diff as _0x54c417,Collection as _0x4d5d77,Rect as _0x23d655,CKEditorError as _0x2cc838,first as _0x1f0347,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x1147f3,keyCodes as _0x2ff53f}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3f7232,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x2eee69,trimHtml as _0x471ff4,LateFocusDropdownButtonView as _0x4f1863,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x3f042c}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x35ab00}from'es-toolkit/compat';import{IconUndo as _0xb49e9d,IconCheck as _0x48c961,IconPencil as _0x4128fc,IconRemoveComment as _0x33f560,IconThreeVerticalDots as _0x5944a9,IconAddComment as _0x57f000,IconCommentsArchive as _0x445ed3}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as _0x349db7,ButtonView as _0x3596fa,ViewCollection as _0x118739,createDropdown as _0x40a70c,ListView as _0x1118c0,focusChildOnDropdownOpen as _0xf4a41c,ListItemView as _0x30e474,MenuBarMenuListItemButtonView as _0x1a9c60,BodyCollection as _0x4e9d65,BalloonPanelView as _0x39affa,ContextualBalloon as _0x1b4ef4,Dialog as _0x1c0817,DialogViewPosition as _0x324a55}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x21fed6}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 _0xab76d7}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3d60c9}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3e3063(){['model'];['view'];constructor(_0x5bb33c,_0x448e78){super(),this['model']=_0x5bb33c,this['model']['_isAttached']=!0x0,this['view']=_0x448e78,this['listenTo'](_0x448e78,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x448e78,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x448e78,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x448e78,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x448e78,'addComment',(_0x4c43eb,_0x3f2b8a)=>this['addComment'](_0x3f2b8a)),this['listenTo'](_0x448e78,'updateComment',(_0x693adf,_0x2c3e65,_0x4248cf)=>this['updateComment'](_0x2c3e65,_0x4248cf)),this['listenTo'](_0x448e78,'removeComment',(_0x59f577,_0x2c4ac1)=>this['removeComment'](_0x2c4ac1));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x341c68){this['model']['addComment']({'content':_0x341c68,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x4f8a3f,_0x171366){this['model']['getComment'](_0x4f8a3f)['update']({'content':_0x171366});}['removeComment'](_0x3c6ab2){this['model']['getComment'](_0x3c6ab2)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x5b4fec,_0xd8e970,_0x340262){const t=_0x5b4fec['t'];switch(_0xd8e970){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'},_0x340262);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'},_0x340262);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'},_0x340262);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'},_0x340262);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x340262);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'},_0x340262);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'},_0x340262);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'},_0x340262);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(_0x2430ba,_0x3ff025){super(_0x2430ba);const _0xd2f2ff=_0x2f2703();this['main']=this['createCollection'](),this['editable']=new $t(_0x2430ba,_0x3ff025,void 0x0,{'label':()=>N(_0x2430ba,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2430ba['uiLanguageDirection'],'lang':_0x2430ba['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0xd2f2ff},'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(_0x396844){super(_0x396844),this['view']=new Vt(_0x396844['locale'],_0x396844['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x23218c=this['editor']['editing']['view'],_0x1ad372=this['view']['editable'],_0x193dd8=_0x23218c['document']['getRoot']();_0x1ad372['name']=_0x193dd8['rootName'],this['view']['render']();const _0x4a543f=_0x1ad372['element'];this['setEditableElement'](_0x1ad372['name'],_0x4a543f),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x23218c['attachDomRoot'](_0x4a543f),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3e3063(_0x1b0da7){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x4aec43={}){function _0x2c2497(_0x1608b9){return _0x1608b9['map'](_0x248fa3=>String['fromCharCode'](_0x248fa3))['join']('');}(_0x4aec43=Object['assign']({},_0x4aec43))['plugins']||(_0x4aec43['plugins']=Rt['defaultPlugins']),super(_0x4aec43),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[_0x2c2497([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2c2497([0x76,0x69,0x65,0x77])][_0x2c2497([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2c2497([0x61,0x75,0x74,0x6f]),this[_0x2c2497([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2c2497([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2c2497([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2c2497([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2c2497([0x6f,0x6b])});}['create'](){const _0x4948a9=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4948a9))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x24c953=>{const _0x3d3b57=this['model']['document']['getRoot'](),_0x3dcf34=_0x3d3b57&&_0x3d3b57['getChild'](_0x3d3b57['childCount']-0x1);_0x24c953['setSelection'](_0x3dcf34,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xf4275a=this['editing']['view'],_0x1dc037=_0xf4275a['document']['getRoot'](),_0x4a07b5=_0x1dc037['getChild'](0x0);_0x1dc037['childCount']>0x1||!_0x4a07b5||'p'!=_0x4a07b5['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0xf4275a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4a07b5['placeholder']=this['placeholder']),St({'view':_0xf4275a,'element':_0x4a07b5,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4a07b5);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x29808f,_0x4c0dc5={}){super(_0x29808f),this['editor']=null,this['_editorConfig']=_0x4c0dc5,this['set']('value',_0x4c0dc5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x29808f,'Reply...')),this['set']('submitLabel',N(_0x29808f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x5f12d6(),this['focusCycler']=new _0x349db7({'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',(_0x3fff06,_0x1df4a)=>{this['cancelButtonView']['fire']('execute'),_0x1df4a();}),this['keystrokes']['set']('Ctrl+Enter',(_0x23234b,_0x5b0d7e)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5b0d7e());}),this['on']('submit',(_0x503e47,_0x3c076d)=>{_0x3c076d['length']>0xfde8?(alert(N(_0x29808f,'TOO_LONG_COMMENT_ALERT',[_0x3c076d['length'],0xfde8])),_0x503e47['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 _0x9e1861=this['editor'];this['element']['insertBefore'](_0x9e1861['ui']['element'],this['element']['firstChild']),_0x9e1861['model']['document']['on']('change',()=>this['value']=_0x9e1861['getData']()),_0x9e1861['bind']('placeholder')['to'](this),this['focusables']['add'](_0x9e1861['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x9f6175){-0x1===_0x9f6175?(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:_0x2e5ce0}=this,_0x116558=new _0x3596fa(_0x2e5ce0);return _0x116558['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x116558['withText']=!0x0,_0x116558['bind']('label')['to'](this,'submitLabel'),_0x116558['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x116558['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x22f531,_0x1338d1)=>!_0x1338d1&&!!_0x22f531['trim']()),_0x116558;}['_createCancelButton'](){const {locale:_0x543541}=this,_0x21295c=new _0x3596fa(_0x543541);return _0x21295c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x21295c['label']=N(_0x543541,'Cancel'),_0x21295c['withText']=!0x0,_0x21295c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x21295c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xdc7bd5=>{this['focusTracker']['add'](_0xdc7bd5['element']);}),this['focusables']['on']('change',(_0x538633,_0x3a10e9)=>{for(const _0x437c04 of Array['from'](_0x3a10e9['added'])['reverse']())this['focusTracker']['add'](_0x437c04['element']);});}}class ie extends kt{constructor(_0x31d81d,_0x4cffb4,_0x3f8944){super(_0x31d81d),this['commentInputView']=new os(_0x31d81d,_0x3f8944),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x12b49f,_0x5be5f9)=>_0x12b49f||!!_0x5be5f9),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 _0x3f7232(_0x31d81d,_0x4cffb4),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'](_0x3ec2c4){this['commentInputView']['focus'](_0x3ec2c4);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3d52d5,_0x7fad78)=>{const {submitButtonView:_0x324732,cancelButtonView:_0x12ad26,editor:_0x2530d5}=this['commentInputView'];[_0x324732['element'],_0x12ad26['element'],_0x2530d5?_0x2530d5['editing']['view']['getDomRoot']():null]['filter'](_0x35a40c=>_0x35a40c)['some'](_0x42b20d=>_0x42b20d['contains'](_0x7fad78['target']))||(this['focus'](),_0x7fad78['preventDefault']());});}}class rs extends kt{constructor(_0x3506ae){super(_0x3506ae);const _0x2afe13=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2afe13['to']('count',_0x5f4d11=>N(_0x3506ae,'NUMBER_OF_COMMENTS',_0x5f4d11))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5bae54,_0x35f428,_0x419fe1){super(_0x5bae54);const _0xb9571e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x35f428['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x35f428,this['_config']=_0x419fe1,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x22e7a3=>this['commentViews']['map'](_0x2cdb48=>_0x2cdb48['element'])['includes'](_0x22e7a3['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x5bae54),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4e09ac=>_0x4e09ac-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5a4588 of _0x35f428['comments'])this['_handleNewCommentModel'](_0x5a4588);this['_handleInfoComment'](),this['listenTo'](_0x35f428['comments'],'add',(_0x4a22e5,_0x59321b)=>{const _0x533598=this['_calculatePosition'](_0x59321b);this['length']++,this['_handleNewCommentModel'](_0x59321b,_0x533598),this['refreshVisibleViews']();}),this['listenTo'](_0x35f428['comments'],'remove',(_0x38ff44,_0xc4fcd6)=>{this['length']--,this['_handleRemoveCommentModel'](_0xc4fcd6),this['refreshVisibleViews']();}),this['listenTo'](_0x35f428,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x35f428,'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',_0xb9571e['if']('length','ck-hidden',_0x3e66d1=>!_0x3e66d1)],'aria-label':N(_0x5bae54,'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'](_0x135d68){-0x1===_0x135d68?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2202a2 of this['commentViews'])_0x2202a2['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1afc42,_0x798efa){const _0x108950=new this['_config']['CommentView'](this['locale'],_0x1afc42,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x108950['viewUid']=_0x1afc42['id'],_0x108950['delegate']('removeComment')['to'](this),_0x108950['delegate']('updateComment')['to'](this),_0x108950['delegate']('resolveCommentThread')['to'](this),_0x108950['delegate']('editorReady')['to'](this),_0x108950['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x108950,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x108950,_0x798efa);}['_calculatePosition'](_0x532a8f){const _0x5bee5f=this['_model']['_findOptimalIndex'](_0x532a8f);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x532a8f['authoredAt']?_0x5bee5f-0x1:_0x5bee5f:_0x5bee5f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3c91c9={'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'],_0x3c91c9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3c91c9));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xe614a4){const _0x23e44c=this['commentViews']['remove'](_0xe614a4['id']);this['stopListening'](_0x23e44c),_0x23e44c['isEditMode']&&this['_updateHasDirtyComment'](),_0x23e44c['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x4e5d50=>_0x4e5d50['isEditMode']);}['_rearrangeCollapse'](){const _0x8e75b5=function(_0x599e6c){const _0x9e6773=new _0x4d5d77();for(const _0x2abe9e of _0x599e6c)_0x9e6773['add'](_0x2abe9e);return _0x9e6773;}(this['commentViews']),_0xb1b3e6=this['_collapsedCommentsView']['count'];for(let _0x3b8b79=0x1;_0x3b8b79<=_0xb1b3e6;_0x3b8b79++)_0x8e75b5['remove'](0x1);for(const _0x449a80 of _0x8e75b5)_0x449a80['collapse']();_0xb1b3e6>0x0&&_0x8e75b5['add'](this['_collapsedCommentsView'],0x1),ns(_0x54c417(Array['from'](this['visibleViews']),Array['from'](_0x8e75b5)),this['visibleViews'],_0x8e75b5);}['_rearrangeExpand'](){ns(_0x54c417(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x58f403 of this['visibleViews'])_0x58f403['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1d451e=>{this['focusTracker']['add'](_0x1d451e['element']),this['keystrokes']['listenTo'](_0x1d451e['element']);}),this['commentViews']['on']('change',(_0x21deaf,_0xb5adcb)=>{for(const _0x5e0e80 of _0xb5adcb['removed'])this['focusTracker']['remove'](_0x5e0e80['element']),this['keystrokes']['stopListening'](_0x5e0e80['element']);for(const _0x48844d of Array['from'](_0xb5adcb['added'])['reverse']())this['focusTracker']['add'](_0x48844d['element']),this['keystrokes']['listenTo'](_0x48844d['element']);});}}function ns(_0x431faa,_0x4612d5,_0xc8402b){let _0x424ce9=0x0;for(const _0x5243e5 of _0x431faa)switch(_0x5243e5){case'insert':_0x4612d5['add'](_0xc8402b['get'](_0x424ce9),_0x424ce9),_0x424ce9++;break;case'delete':_0x4612d5['remove'](_0x424ce9);break;case'equal':_0x424ce9++;}}class oe extends kt{constructor(_0xff5afe){super(_0xff5afe);const _0x3dcc8c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3dcc8c['to']('contextValue',_0x565301=>N(_0xff5afe,'THREAD_CONTEXT_LABEL',_0x565301)),'tabindex':-0x1},'children':[{'text':_0x3dcc8c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x87502f,_0x4e0703){super(_0x87502f);const _0x55e4bc=this['bindTemplate'];this['_model']=_0x4e0703,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x2c2628=>!!_0x2c2628),this['bind']('contextValue')['to'](this['_model'],'context',_0x3e9ecf=>_0x3e9ecf&&_0x3e9ecf['value']?this['_trimContextValue'](_0x3e9ecf['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',_0x55e4bc['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 _0x1b7a47=new _0x3596fa(this['locale']);return _0x1b7a47['label']=N(this['locale'],'Reopen'),_0x1b7a47['tooltip']=N(this['locale'],'Reopen'),_0x1b7a47['icon']=_0xb49e9d,_0x1b7a47['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x37c715=>!_0x37c715),_0x1b7a47['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x457809,_0x55703e)=>_0x457809&&_0x55703e),_0x1b7a47['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x1b7a47;}['_trimContextValue'](_0x4d773a){if(_0x4d773a['length']<0x96)return _0x4d773a;const _0x2457d7=_0x4d773a['lastIndexOf']('\x20',0x93);return _0x4d773a['substring'](0x0,_0x2457d7>-0x1?_0x2457d7:0x93)+'...';}['_attachContextActions'](){const _0x3714c2=this['element']['querySelector']('.ck-context'),_0x4125bb=_0x3714c2['querySelector']('.ck-context__value');this['listenTo'](_0x3714c2,'mouseenter',()=>{_0x4125bb['offsetWidth']<_0x4125bb['scrollWidth']&&_0x3714c2['classList']['add']('overlay');}),this['listenTo'](_0x3714c2,'mouseleave',()=>{_0x3714c2['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x599e6b of this['focusables'])this['focusTracker']['add'](_0x599e6b['element']),this['keystrokes']['listenTo'](_0x599e6b['element']);}['_createContextView'](){const _0x962210=new oe(this['locale']);return _0x962210['bind']('contextValue')['to'](this),_0x962210;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x11a80d,_0x3a3de1,_0x193722,_0x1e092e){super(_0x11a80d),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3a3de1,this['_localUser']=_0x193722,this['_config']=_0x1e092e,this['commentThreadHeaderView']=new Yt(_0x11a80d,_0x3a3de1),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x11a80d,N(_0x11a80d,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x11a80d,_0x3a3de1,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1e092e)),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',(_0x25f67c,_0x1fd3df)=>_0x25f67c||!!_0x1fd3df),this['bind']('isUnlinked')['to'](_0x3a3de1,'unlinkedAt',_0x550153=>!!_0x550153),this['bind']('ariaLabel')['to'](this,'length',_0x2a977c=>{const _0x4d5cb6=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2a977c,_0x4d5cb6]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x358eb9=>_0x358eb9['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 _0x278c83=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x216a81=_0x278c83['commentInputView'];return _0x278c83['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x216a81,'value',(_0xf002b5,_0x121831,_0x305c16,_0x5c002e,_0x4cf7a1)=>!!_0x4cf7a1||!!_0x5c002e&&_0x305c16&&!_0x121831||_0xf002b5&&_0x305c16&&!_0x121831),_0x216a81['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x977154,_0x374b78,_0x463859)=>{let _0x36285f;return _0x36285f=_0x463859&&_0x374b78?'Reply\x20to\x20reopen\x20discussion...':_0x977154?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x36285f);}),_0x216a81['bind']('submitLabel')['to'](this,'length',_0x5a93d2=>N(this['locale'],_0x5a93d2?'Reply':'Comment')),_0x216a81['on']('submit',(_0x51b8cd,_0xe7715d)=>{this['fire']('addComment',_0xe7715d),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x216a81['on']('cancel',()=>{this['focus']();}),_0x216a81['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x216a81['on']('cancel',_0x244f12=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x244f12['stop']());}),this['on']('change:isActive',(_0x432b6f,_0x3c684b,_0xceee3e)=>{_0xceee3e||this['length']||_0x216a81['value']||this['fire']('removeCommentThread');}),_0x278c83;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4db3c9,_0xc2d3f3,_0x136e2d,_0x2d4137){super(_0x4db3c9,_0xc2d3f3,_0x136e2d,_0x2d4137),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4db3c9,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2c8df6,_0xfe9d4c,_0x555769)=>{_0x555769||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x28a31a,_0x4d33e2,_0x26e55c)=>{_0x26e55c&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x19f0d1=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x19f0d1['if']('isActive','ck-thread--active'),_0x19f0d1['if']('isUnlinked','ck-thread--unlinked'),_0x19f0d1['if']('isConfirm','ck-thread--remove-confirmation'),_0x19f0d1['to']('actionIndicator',_0x24f6bf=>_0x24f6bf?'ck-thread--'+_0x24f6bf:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x19f0d1['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 _0x4621ce of this['commentsListView']['commentViews'])_0x4621ce['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3f2bba}=this,_0x50dba5=this['commentsListView']['commentViews']['get'](0x0);_0x50dba5===this['_boundFirstCommentView']||_0x50dba5['isSystemComment']||(this['_boundFirstCommentView']=_0x50dba5,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x50dba5,'actionIndicator',_0x202507=>'remove'===_0x202507?'remove':null),_0x50dba5['placeholder']=N(_0x3f2bba,'Write\x20a\x20comment...'),_0x50dba5['removeButton']['on']('execute',_0x46caec=>{_0x46caec['stop'](),this['showConfirm'](N(_0x3f2bba,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x50dba5['focus']();}),_0x50dba5['actionBar']['add'](this['resolveButton'],0x0),_0x50dba5['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x2538bb=new _0x2eee69(this['locale']);return _0x2538bb['label']=N(this['locale'],'Resolve'),_0x2538bb['tooltip']=N(this['locale'],'Resolve'),_0x2538bb['icon']=_0x48c961,_0x2538bb['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x2538bb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5c5913=>!_0x5c5913),_0x2538bb['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x342e85,_0x5ddc8c)=>_0x342e85&&!_0x5ddc8c),_0x2538bb['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x2538bb;}['_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(_0x4e08a6){super(_0x4e08a6),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x453270,_0x52bdc7,_0x2feb7b)=>{this['element']['innerHTML']=_0x2feb7b;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x5cb125,_0xea4085,_0x7d4aca){super(_0x5cb125),this['_model']=_0xea4085,this['_config']=_0x7d4aca,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0xea4085,'content',_0xea4085,'authoredAt',(_0x4dba6b,_0x453469)=>N(_0x5cb125,'COMMENT_ARIA_LABEL',[_0xea4085['author']['name'],_0x7d4aca['formatDateTime'](_0x453469),new DOMParser()['parseFromString'](_0x4dba6b,'text/html')['body']['textContent'],_0xea4085['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x5cb125,N(_0x5cb125,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x118739(),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x54e16b=>_0x54e16b['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 _0xfa70d0=new es(this['locale']);return _0xfa70d0['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x4caaac,_0x5dc199)=>_0x5dc199?_0x471ff4(_0x4caaac,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x4caaac),_0xfa70d0;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x335326=new os(this['locale'],this['_config']['editorConfig']);return _0x335326['value']=this['_model']['content'],_0x335326['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x335326['submitLabel']=N(this['locale'],'Save'),_0x335326['on']('submit',(_0x1e36ab,_0x27315d)=>{this['fire']('updateComment',this['_model']['id'],_0x27315d),this['switchToDisplayMode'](),this['focus']();}),_0x335326['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x335326['once']('editorReady',()=>{_0x335326['focus']();}),_0x335326['createEditor'](),_0x335326['delegate']('editorReady')['to'](this),_0x335326['delegate']('editorDestroyed')['to'](this),_0x335326;}['_setupKeyboardNavigation'](){const _0x276f5a=this['element'];this['keystrokes']['listenTo'](_0x276f5a);for(const _0x5df1b2 of this['focusables'])this['focusTracker']['add'](_0x5df1b2['element']),this['keystrokes']['listenTo'](_0x5df1b2['element']);this['focusables']['on']('change',(_0x1be898,_0x30362a)=>{for(const _0x216134 of _0x30362a['removed'])this['focusTracker']['remove'](_0x216134['element']),this['keystrokes']['stopListening'](_0x216134['element']);for(const _0x1ab793 of _0x30362a['added'])this['focusTracker']['add'](_0x1ab793['element']),this['keystrokes']['listenTo'](_0x1ab793['element']);}),this['keystrokes']['set']('enter',(_0x5308ee,_0xbe7c62)=>{_0x276f5a===_0x5308ee['target']&&(this['focusCycler']['focusFirst'](),_0xbe7c62());}),this['keystrokes']['set']('esc',(_0x4b3bc6,_0x2385dc)=>{_0x276f5a!==_0x4b3bc6['target']&&(this['focus'](),_0x2385dc());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x4f2642,_0x4abed0,_0x575c05){super(_0x4f2642,_0x4abed0,_0x575c05),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x4f2642,'Reply...')),this['bind']('authoredAt')['to'](_0x4abed0),this['bind']('resolvedAt')['to'](_0x4abed0),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 _0x3f7232(_0x4f2642,_0x4abed0['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4abed0,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x5a9f1b=this['bindTemplate'],_0x32e3b9=[{'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':_0x5a9f1b['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x5a9f1b['to']('authoredAt',_0x61933=>this['_config']['formatDateTime'](_0x61933))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x5a9f1b['if']('isEditMode','ck-comment__actions--hidden'),_0x5a9f1b['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']&&_0x32e3b9['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x5a9f1b['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x5a9f1b['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x5a9f1b['if']('isEditMode','ck-comment--edit'),_0x5a9f1b['if']('isSystemComment','ck-comment--info'),_0x5a9f1b['to']('actionIndicator',_0x345b16=>_0x345b16?'ck-comment--'+_0x345b16:'')],'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':_0x32e3b9}]}]};}['_createEditButton'](){const _0x1bc2ec=new _0x3596fa(this['locale']);return _0x1bc2ec['label']=N(this['locale'],'Edit'),_0x1bc2ec['icon']=_0x4128fc,_0x1bc2ec['withText']=!0x0,_0x1bc2ec['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1bc2ec['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1ef200=>!_0x1ef200),_0x1bc2ec['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1bc2ec['on']('execute',()=>this['switchToEditMode']()),_0x1bc2ec;}['_createRemoveButton'](){const _0xbe0397=new _0x3596fa(this['locale']);return _0xbe0397['label']=N(this['locale'],'Remove'),_0xbe0397['icon']=_0x33f560,_0xbe0397['withText']=!0x0,_0xbe0397['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xbe0397['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x271447=>!_0x271447),_0xbe0397['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xbe0397['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xbe0397;}['_createDropdown'](){const _0x232e9f=_0x40a70c(this['locale'],_0x4f1863),_0xba0e21=_0x232e9f['panelView']['children'],_0x1e82bf=new _0x1118c0(this['locale']),_0x224d0a=_0x232e9f['bindTemplate'];_0xf4a41c(_0x232e9f,()=>this['items']['find'](_0x10ee4d=>_0x10ee4d['isVisible'])),_0x232e9f['extendTemplate']({'attributes':{'class':[_0x224d0a['if']('isVisible','ck-hidden',_0x290dc2=>!_0x290dc2)]}});const _0x42c29f=(_0x3cc305,_0x64cbc=-0x1)=>{const _0x382958=new _0x30e474(this['locale']);_0x382958['children']['add'](_0x3cc305);const _0x3b0870=_0x64cbc>-0x1?_0x64cbc:_0x1e82bf['items']['length'];_0x1e82bf['items']['add'](_0x382958,_0x3b0870);const _0x502ed1=Array['from'](this['items']);_0x232e9f['unbind']('isEnabled','isVisible'),_0x232e9f['bind']('isEnabled')['toMany'](_0x502ed1,'isEnabled',(..._0x56d388)=>_0x56d388['some'](_0x18858=>_0x18858)),_0x232e9f['bind']('isVisible')['toMany'](_0x502ed1,'isVisible',(..._0x356966)=>_0x356966['some'](_0x298ce7=>_0x298ce7));};_0x232e9f['panelPosition']='sw',_0x232e9f['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x5944a9});for(const _0x215b51 of this['items'])_0x42c29f(_0x215b51);return _0xba0e21['add'](_0x1e82bf),_0x232e9f['listenTo'](this['items'],'add',(_0x1552bf,_0x5217a9,_0x4e7f1a)=>{_0x42c29f(_0x5217a9,_0x4e7f1a);}),_0x232e9f['listenTo'](this['items'],'remove',(_0x5cd86c,_0x29b831,_0x1bbbb3)=>{_0x1e82bf['items']['remove'](_0x1bbbb3);}),_0x232e9f;}['_attachActions'](_0x4f99ab,_0x31836c){const _0x305d2c=_0x4f99ab&&_0x4f99ab['element'];_0x305d2c&&(this['listenTo'](_0x305d2c,'mouseenter',()=>this['actionIndicator']=_0x31836c),this['listenTo'](_0x305d2c,'focus',()=>this['actionIndicator']=_0x31836c),this['listenTo'](_0x305d2c,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x305d2c,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x41fca8=super['_createCommentInputView']();return _0x41fca8['bind']('placeholder')['to'](this),_0x41fca8;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x191092){const _0x513e95=Dt(_0x191092,0x1e),_0x479d3f=new MutationObserver(_0x1043f0=>{for(const _0x2d8c25 of _0x1043f0)('attributes'==_0x2d8c25['type']&&'class'==_0x2d8c25['attributeName']||'childList'==_0x2d8c25['type']||'characterData'==_0x2d8c25['type'])&&_0x513e95();});return{'attach'(_0x2d0775){_0x479d3f['observe'](_0x2d0775,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x479d3f['disconnect'](),_0x513e95['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x5d43ec,_0x474f5e){super(_0x5d43ec),this['id']=_0x2f2703(),this['focusTracker']=new _0x5f12d6(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x5be1d0,_0x44962b)=>this['fire']('Esc',_0x44962b)),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'](_0x474f5e),this['mainView']=_0x474f5e;const _0x362e35=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x362e35['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 _0x2116bb=this['element']['clientHeight'];_0x2116bb&&(this['height']=_0x2116bb);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3e3063(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x250235,target:_0x14b01d,type:_0x3e6267,isVisible:_0x203d80=!0x0}){super(),this['view']=_0x250235,this['view']['element']||this['view']['render'](),this['_type']=_0x3e6267,this['_target']=_0x14b01d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4d5d77([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x16c4bc,_0x1135e7)=>{this['view']['focusTracker']['add'](_0x1135e7);}),this['focusableElements']['on']('remove',(_0x4e6483,_0x1e919d)=>{this['view']['focusTracker']['remove'](_0x1e919d);}),this['set']('isVisible',_0x203d80);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x51225e=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x51225e),_0x51225e;}get['targetRect'](){const _0x1f3199=this['target'];if(null===_0x1f3199)return null;if(_0x1f3199 instanceof _0x23d655)return _0x1f3199;const _0x258d5e=_0x1f3199['filter'](_0x5c2b29=>function(_0x426f65){const _0x298498=_0x426f65['offsetParent'];if(_0x298498)return!0x0;const _0x3026cb=_0x426f65['getClientRects']()['item'](0x0);return!!_0x3026cb;}(_0x5c2b29));return 0x0===_0x258d5e['length']?null:new _0x23d655(_0x258d5e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5b4856){this['view']['isActive']=_0x5b4856,this['view']['mainView']['isActive']=_0x5b4856;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3d3d52){if(!(null===_0x3d3d52||_0x3d3d52 instanceof _0x23d655||Array['isArray'](_0x3d3d52)&&_0x3d3d52['every'](_0x17d82e=>fi(_0x17d82e))))throw new _0x2cc838('annotation-invalid-target',null,{'target':_0x3d3d52});}['_getNormalizedTarget'](){const _0x6a295='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x6a295)?[_0x6a295]:_0x6a295;}}function fi(_0x4f6f6d){return null!==_0x4f6f6d&&'object'==typeof _0x4f6f6d&&'nodeType'in _0x4f6f6d&&0x1===_0x4f6f6d['nodeType'];}class S extends _0x4d5d77{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x280c38=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x5f12d6(),this['_focusTracker']['on']('change:isFocused',(_0x42ef1f,_0x21f359,_0x6b31c2)=>{_0x6b31c2||this['fire']('blur');});for(const _0x4b1ada of _0x280c38)this['add'](_0x4b1ada);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x323627){if(this['has'](_0x323627))throw new _0x2cc838('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x323627['innerView'],_0x323627),this['_viewToAnnotation']['set'](_0x323627['view'],_0x323627);for(const _0x114859 of _0x323627['focusableElements'])this['_focusTracker']['add'](_0x114859);this['listenTo'](_0x323627['focusableElements'],'add',(_0xd4c7ac,_0x319972)=>{this['_focusTracker']['add'](_0x319972);}),this['listenTo'](_0x323627['focusableElements'],'remove',(_0x49d71d,_0x12a3d3)=>{this['_focusTracker']['remove'](_0x12a3d3);}),this['listenTo'](_0x323627['view']['focusTracker'],'change:isFocused',(_0x9b0632,_0x1013ed,_0x18e2d2)=>{_0x18e2d2&&this['fire']('focus',_0x323627);}),_0x323627['updateTargetRect']();const _0x186bf7=this['_getOrderInContent'](_0x323627['view']['targetRect']);return super['add'](_0x323627,_0x186bf7);}['remove'](_0x2fd5a5){if(!this['has'](_0x2fd5a5))throw new _0x2cc838('annotationcollection-not-existing-item',null);this['stopListening'](_0x2fd5a5['view']['focusTracker']),this['stopListening'](_0x2fd5a5['focusableElements']);for(const _0x5599ec of _0x2fd5a5['focusableElements'])this['_focusTracker']['remove'](_0x5599ec);return this['_viewToAnnotation']['delete'](_0x2fd5a5['view']),this['_innerViewToAnnotation']['delete'](_0x2fd5a5['innerView']),super['remove'](_0x2fd5a5);}['getByInnerView'](_0x3aa678){return this['_innerViewToAnnotation']['get'](_0x3aa678);}['getByView'](_0x291a80){return this['_viewToAnnotation']['get'](_0x291a80);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x212247 of this)_0x212247['updateTargetRect']();this['_sort']();}['_sort'](){const _0xcfbabb=Array['from'](this)['sort']((_0x5e891e,_0x25639a)=>w(_0x5e891e['view']['targetRect'],_0x25639a['view']['targetRect']));for(let _0x2e2df1=_0xcfbabb['length']-0x1;_0x2e2df1>0x0;_0x2e2df1--){const _0x1b413f=_0xcfbabb[_0x2e2df1];_0x2e2df1!==this['getIndex'](_0x1b413f)&&(this['remove'](_0x1b413f),this['add'](_0x1b413f));}}['_getOrderInContent'](_0x26c8a0){let _0x322991=0x0;if(!_0x26c8a0)return this['length'];for(const _0x1a1d44 of this){const _0x57bf20=_0x1a1d44['view']['targetRect'];if(_0x57bf20){if(w(_0x26c8a0,_0x57bf20)<0x0)return _0x322991;_0x322991++;}}return _0x322991;}}function v({source:_0x2511a4,target:_0x15d8e2,filter:_0x46c3cd}){for(const _0xf35631 of _0x2511a4)_0x46c3cd(_0xf35631)&&_0x15d8e2['add'](_0xf35631);_0x15d8e2['listenTo'](_0x2511a4,'add',(_0x18607d,_0x46de61)=>{_0x46c3cd(_0x46de61)&&_0x15d8e2['add'](_0x46de61);}),_0x15d8e2['listenTo'](_0x2511a4,'remove',(_0x313e63,_0x46f317)=>{_0x15d8e2['has'](_0x46f317)&&_0x15d8e2['remove'](_0x46f317);});}function w(_0x43df97,_0x548646){if(null===_0x43df97&&null===_0x548646)return 0x0;if(null===_0x43df97)return-0x1;if(null===_0x548646)return 0x1;const _0x47b642=_0x43df97['top']-_0x548646['top'];return 0x0==_0x47b642?_0x43df97['left']-_0x548646['left']:_0x47b642;}class y extends _0x313b3a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2cba8e){if(super(_0x2cba8e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2cba8e instanceof _0x1b0da7){const _0x202c45=_0x2cba8e['locale'];_0x2cba8e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x202c45,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x282cc7){this['collection']['add'](_0x282cc7);}['remove'](_0x512f76){this['collection']['remove'](_0x512f76),_0x512f76['destroy']();}['refreshVisibility'](){for(const _0x429346 of this['collection'])_0x429346['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x523e7e){return this['collection']['getByInnerView'](_0x523e7e);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x14aaf1 of this['collection'])_0x14aaf1['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x1a5e1d){this['fire']('_activateAnnotation',_0x1a5e1d);}['createAnnotation'](_0x59d73b){return new T(_0x59d73b);}['createAnnotationView'](_0x1336b0,_0x27063c){return new E(_0x1336b0,_0x27063c);}['_addActiveAnnotation'](_0xaa2b91){const _0x59cc6d=new Set(this['activeAnnotations']);_0x59cc6d['add'](_0xaa2b91),this['activeAnnotations']=_0x59cc6d;}['_removeActiveAnnotation'](_0x322bde){const _0x595ed7=new Set(this['activeAnnotations']);_0x595ed7['delete'](_0x322bde),this['activeAnnotations']=_0x595ed7;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2ff525=this['collection'],_0x1c0f90=this['_visibleAnnotations'];function _0x44577d(_0x104620){const _0xccf3f=_0x104620['source'];_0xccf3f['isVisible']&&!_0x1c0f90['has'](_0xccf3f)?_0x1c0f90['add'](_0xccf3f):!_0xccf3f['isVisible']&&_0x1c0f90['has'](_0xccf3f)&&_0x1c0f90['remove'](_0xccf3f),_0xccf3f['view']['focusTracker']['remove'](_0xccf3f['view']['element']),_0xccf3f['view']['focusTracker']['add'](_0xccf3f['view']['element']);}this['listenTo'](_0x2ff525,'add',(_0x2ba171,_0x280fbb)=>{_0x280fbb['isVisible']&&_0x1c0f90['add'](_0x280fbb),this['listenTo'](_0x280fbb,'change:isVisible',_0x44577d);}),this['listenTo'](_0x2ff525,'remove',(_0x10317f,_0x2abbfb)=>{_0x1c0f90['has'](_0x2abbfb)&&_0x1c0f90['remove'](_0x2abbfb),this['stopListening'](_0x2abbfb,'change:isVisible',_0x44577d);});}['_setupEnterAnnotationKeystroke'](){const _0x1b112e=_0x13b3a4=>{_0x13b3a4['on']('ready',()=>{_0x13b3a4['keystrokes']['set'](_0xab76d7,(_0x19f6b4,_0x26da4c)=>{const _0x36a249=_0x1f0347(this['activeAnnotations']['values']());_0x36a249&&(_0x36a249['view']['focus'](),_0x26da4c());});});};this['context']instanceof _0x1b0da7?_0x1b112e(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x483d77,_0x1cc392)=>{_0x1b112e(_0x1cc392);});}['_setupEscapeAnnotationHandling'](){const _0x7675ce=_0x4c36f5=>{const _0x491e55=_0x4c36f5['source'],_0x3c839c=[];let _0x12e2ac;if(Array['isArray'](_0x491e55['target'])){_0x12e2ac=_0x491e55['target'][0x0],this['context']instanceof _0x1b0da7?_0x3c839c['push'](this['context']):this['context']['editors']&&_0x3c839c['push'](...this['context']['editors']);for(const _0x4352c8 of _0x3c839c)for(const _0x548820 of _0x4352c8['editing']['view']['domRoots']['values']())if(_0x548820['contains'](_0x12e2ac))return void _0x4352c8['editing']['view']['focus']();_0x12e2ac['focus']();}};this['listenTo'](this['collection'],'add',(_0x3885f9,_0x3b24ee)=>{this['listenTo'](_0x3b24ee,'escape',_0x7675ce,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x250485,_0x1b0cb9)=>{this['stopListening'](_0x1b0cb9,'escape',_0x7675ce);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x313b3a{['_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(_0x1d9f3f){super(_0x1d9f3f),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x1de600=this['context']['config'];_0x1de600['define']('comments.maxCommentsWhenCollapsed',0x2),_0x1de600['define']('comments.maxThreadTotalWeight',0x1f4),_0x1de600['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x1de600['define']('comments.CommentThreadView',gt),_0x1de600['define']('comments.CommentView',Tt),_0x1de600['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3e6a0f=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x43b616,_0x41bbff)=>this['_addCommentThread'](_0x41bbff)),this['on']('submitCommentThread',(_0x2898ba,_0x1a7f02)=>this['_submitCommentThread'](_0x1a7f02)),this['on']('resolveCommentThread',(_0x1b4c3b,_0x225427)=>this['_resolveCommentThread'](_0x225427)),this['on']('resolveCommentThread',(_0x389864,_0x3fdb64)=>this['_updateActiveAnnotation'](_0x3fdb64),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x464074,_0x2f90de)=>this['_reopenCommentThread'](_0x2f90de)),this['on']('reopenCommentThread',(_0xf6026e,_0x473db0)=>this['_updateActiveAnnotation'](_0x473db0),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2cb463,_0x43694f)=>this['_removeCommentThread'](_0x43694f)),this['on']('updateCommentThread',(_0x30155c,_0x4d0b70)=>this['_updateCommentThread'](_0x4d0b70)),this['on']('updateCommentThread',(_0x104534,_0x4503ec)=>this['_updateActiveAnnotation'](_0x4503ec),{'priority':'lowest'}),this['on']('addComment',(_0x429761,_0x187d8b)=>this['_addComment'](_0x187d8b)),this['on']('updateComment',(_0x1c9c1b,_0x6d219)=>this['_updateComment'](_0x6d219)),this['on']('removeComment',(_0x2fd058,_0x50ee69)=>this['_removeComment'](_0x50ee69)),this['on']('addComment',(_0x5ccaac,{threadId:_0x1204cc,isFromAdapter:_0x15f698})=>{if(_0x15f698)return;const _0x878528=this['getCommentThread'](_0x1204cc),_0x26eaa1=_0x878528&&this['_threadToController']['get'](_0x878528);_0x26eaa1&&_0x26eaa1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3e6a0f,'change:activeAnnotations',(_0x4c3673,_0x146ddb,_0x2139a0)=>{const _0x39ae80=Array['from'](_0x2139a0)['map'](_0x22095a=>this['_viewToController']['get'](_0x22095a['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x39ae80?_0x39ae80['model']:null;});}set['adapter'](_0x51ac0d){if(this['_adapter'])throw new _0x2cc838('commentsrepository-adapter-already-set');this['_adapter']=_0x51ac0d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x1e368a=_t,threadId:_0x340333=_0x2f2703(),comments:_0xa773a5=[],unlinkedAt:_0x3e1a7e=null,resolvedAt:_0xb2935d=null,resolvedBy:_0x9f6504=null,target:_0x233369=null,context:_0x11dd4a=null,attributes:_0x39f0b3={},isResolvable:_0x4d1840=!0x0,isSubmitted:_0x20fb8f=!0x1,isFromAdapter:_0x5590f9=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x1e368a),{'channelId':_0x1e368a,'threadId':_0x340333,'comments':_0xa773a5,'unlinkedAt':_0x3e1a7e,'resolvedAt':_0xb2935d,'resolvedBy':_0x9f6504,'target':_0x233369,'context':_0x11dd4a,'attributes':_0x39f0b3,'isFromAdapter':_0x5590f9,'isResolvable':_0x4d1840,'isSubmitted':_0x20fb8f}),this['getCommentThread'](_0x340333);}['openNewCommentThread']({channelId:_0x2b0852=_t,threadId:_0x1bc2df=_0x2f2703(),target:_0x245776,context:_0x4581c8=null,isResolvable:_0x550b36=!0x0}){if(this['_readOnlyChannels']['has'](_0x2b0852)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x245776)throw new _0x2cc838('commentsrepository-missing-target');const _0x1a81f7=this['addCommentThread']({'channelId':_0x2b0852,'threadId':_0x1bc2df,'target':_0x245776,'context':_0x4581c8,'isResolvable':_0x550b36});if(!_0x1a81f7)return null;const _0x3fd01d=this['_threadToController']['get'](_0x1a81f7),_0x53ad3f=_0x3fd01d['view']['commentThreadInputView']['commentInputView'],_0x17674a=this['context']['plugins']['get'](y),_0x5b1a9e=_0x17674a['getByInnerView'](_0x3fd01d['view']);return _0x17674a['activate'](_0x5b1a9e),_0x53ad3f['once']('editorReady',()=>_0x53ad3f['focus']()),_0x1a81f7;}['hasCommentThread'](_0x3662f3){if('string'!=typeof _0x3662f3)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3662f3);}['updateCommentThread']({channelId:_0x3ce1c1=_t,threadId:_0x306dab,context:_0x5c066f,unlinkedAt:_0x4d2b1f,attributes:_0xd74564,isFromAdapter:_0x373e92=!0x1}){return this['fire'](Nt('updateCommentThread',_0x3ce1c1),{'channelId':_0x3ce1c1,'threadId':_0x306dab,'context':_0x5c066f,'unlinkedAt':_0x4d2b1f,'attributes':_0xd74564,'isFromAdapter':_0x373e92}),this['getCommentThread'](_0x306dab);}['getCommentThread'](_0x133ae0){if('string'!=typeof _0x133ae0)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x133ae0);}['fetchCommentThread']({channelId:_0x36ae3b,threadId:_0xd509d6}={}){const _0x2b2aea=this['getCommentThread'](_0xd509d6);if(_0x2b2aea)return Promise['resolve'](_0x2b2aea);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x2cc838('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x36ae3b,'threadId':_0xd509d6})['then'](_0x1db47e=>this['hasCommentThread'](_0xd509d6)?this['getCommentThread'](_0xd509d6):_0x1db47e?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x36ae3b},_0x1db47e)):void 0x0)['catch'](_0x1fa9a5=>{throw console['error'](_0x1fa9a5),new _0x2cc838('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x18daf9,skipNotAttached:_0x2a4a0c=!0x1,skipEmpty:_0x40342a=!0x1,toJSON:_0x36b320=!0x1}={}){const _0x5ada87=[];for(const _0x19901d of this['_threads']['values']())_0x18daf9&&_0x19901d['channelId']!==_0x18daf9||_0x2a4a0c&&!_0x19901d['isAttached']||_0x40342a&&0x0===_0x19901d['length']||_0x5ada87['push'](_0x19901d);return _0x36b320?_0x5ada87['map'](_0x433d71=>_0x433d71['toJSON']()):_0x5ada87;}['getAnnotationForCommentThread'](_0x3a2271){const _0xb5d3fa=this['_threadToController']['get'](_0x3a2271);if(!_0xb5d3fa)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0xb5d3fa['view'])||null;}['getCommentThreadForAnnotation'](_0x1c3f88){const _0x65278b=this['_viewToController']['get'](_0x1c3f88['innerView']);return _0x65278b?_0x65278b['model']:null;}['setActiveCommentThread'](_0x104c64){const _0x42cd6e=this['context']['plugins']['get'](y);if(!_0x104c64)return void(this['activeCommentThread']&&_0x42cd6e['deactivateAll']());const _0x314961=this['getCommentThread'](_0x104c64);if(!_0x314961)throw new _0x2cc838('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x104c64});if(!this['_threadToController']['has'](_0x314961))throw new _0x2cc838('commentsrepository-active-not-attached',null,{'threadId':_0x104c64});const _0x45d1a8=_0x42cd6e['getByInnerView'](this['_threadToController']['get'](_0x314961)['view']);_0x42cd6e['activate'](_0x45d1a8);}['switchReadOnly'](_0x4ff0cb,_0x15c0ac){_0x4ff0cb?this['_readOnlyChannels']['add'](_0x15c0ac):this['_readOnlyChannels']['delete'](_0x15c0ac),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x366db0){return this['_readOnlyChannels']['has'](_0x366db0)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3a1a9c,_0x453abc){return new vt(_0x3a1a9c,_0x453abc);}['setPermissions'](_0x35908c,_0x29e493=_t){this['_permissions']['set'](_0x29e493,_0x35908c),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3006cc=_t){return this['_permissions']['has'](_0x3006cc)?this['_permissions']['get'](_0x3006cc):bt;}['_addCommentThread']({channelId:_0x2c63b1,threadId:_0x2bb0ae,comments:_0x36d6ed,unlinkedAt:_0x36cb6e,resolvedAt:_0x3d966c,resolvedBy:_0x4caee0,target:_0x74044d,context:_0x140c19,attributes:_0x599ded,isFromAdapter:_0x5e63ed,isResolvable:_0x37ff82,isSubmitted:_0x48b3b4}){if('string'!=typeof _0x2bb0ae)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2bb0ae});if(this['hasCommentThread'](_0x2bb0ae))throw new _0x2cc838('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2bb0ae});const _0x5b7ccd=new pi(this,{'channelId':_0x2c63b1,'id':_0x2bb0ae,'context':_0x140c19,'attributes':_0x599ded,'unlinkedAt':_0x36cb6e,'resolvedAt':_0x3d966c,'resolvedBy':_0x4caee0?this['context']['plugins']['get'](it)['getUser'](_0x4caee0):null,'isResolvable':_0x37ff82,'isSubmitted':_0x48b3b4||_0x5e63ed});this['_threads']['set'](_0x2bb0ae,_0x5b7ccd);for(const _0x1a4b05 of _0x36d6ed)_0x5b7ccd['_add'](this['_createNewComment']({'threadId':_0x2bb0ae,..._0x1a4b05}));return _0x74044d&&_0x5b7ccd['attachTo'](_0x74044d),_0x5e63ed||!_0x5b7ccd['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2c63b1,'threadId':_0x2bb0ae});}['_submitCommentThread']({channelId:_0x1a5dc2,threadId:_0x359933}){if(!this['hasCommentThread'](_0x359933))throw new _0x2cc838('commentsrepository-missing-comment-thread',this);const _0x885caa=this['getCommentThread'](_0x359933);if(_0x885caa['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4ed894,comments:_0x1682a4,resolvedAt:_0x38ef5e,resolvedBy:_0x3336ac,context:_0xc22ed9,attributes:_0x25a084}=_0x885caa,_0x2265c5=this['context']['plugins']['get']('PendingActions'),_0x4df3eb=_0x2265c5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1a5dc2,'threadId':_0x4ed894,'comments':_0x1682a4['map'](_0x10df11=>_0x10df11['toJSON']()),'resolvedAt':_0x38ef5e,'resolvedBy':_0x3336ac?_0x3336ac['id']:_0x3336ac,'context':_0xc22ed9,'attributes':_0x25a084})['then'](({comments:_0x5bfd9a})=>{_0x2265c5['remove'](_0x4df3eb);for(const _0xcffd94 of _0x5bfd9a)this['_updateComment']({'channelId':_0x1a5dc2,'threadId':_0x359933,'commentId':_0xcffd94['commentId'],'createdAt':_0xcffd94['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x35c6a3=>{throw console['error'](_0x35c6a3),new _0x2cc838('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5c0b3b,target:_0xb5933f}){const _0x35739e=this['getCommentThread'](_0x5c0b3b);if(!_0x35739e)throw new _0x2cc838('commentsrepository-attach-missing-comment-thread',this);const _0x4b68c0=this['context']['plugins']['get']('PendingActions'),_0x5f082a=this['context']['plugins']['get'](y),_0x643f2a=this['_createCommentThreadView'](_0x35739e),_0x32cdef=new vt(_0x35739e,_0x643f2a);let _0xdea1ec=null;_0x643f2a['on']('change:isDirty',(_0x133b51,_0x4e3ea8,_0x5e4292)=>{_0x5e4292?_0xdea1ec=_0x4b68c0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xdea1ec&&(_0x4b68c0['remove'](_0xdea1ec),_0xdea1ec=null);}),this['_threadToController']['set'](_0x35739e,_0x32cdef),this['_viewToController']['set'](_0x643f2a,_0x32cdef);const _0x1bac2b=new E(this['context']['locale'],_0x643f2a);_0x1bac2b['bind']('length')['to'](_0x643f2a),_0x1bac2b['bind']('isDirty')['to'](_0x643f2a,'isDirty',_0x643f2a,'length',(_0x55abde,_0x2d0421)=>_0x55abde||!_0x2d0421),_0x1bac2b['bind']('isActive')['to'](_0x643f2a),_0x1bac2b['type']='comment';const _0x5b2f90=new T({'view':_0x1bac2b,'target':_0xb5933f,'type':'comment','isVisible':!_0x35739e['archivedAt']&&!!('function'==typeof _0xb5933f?_0xb5933f():_0xb5933f)});return _0x643f2a['on']('escape',()=>{_0x5b2f90['fire']('escape');}),this['_bindAnnotationToEditors'](_0x643f2a,_0x5b2f90),_0x5f082a['add'](_0x5b2f90),_0x5b2f90;}['_bindAnnotationToEditors'](_0x5dd4c4,_0x33c517){this['listenTo'](_0x5dd4c4,'editorReady',(_0x71ca53,_0x18fa47)=>{const _0x2e20d8=_0x18fa47['ui']['view']['body']['bodyCollectionContainer'];_0x33c517['focusableElements']['add'](_0x2e20d8),this['context']instanceof _0x1b0da7&&this['context']['ui']['focusTracker']['add'](_0x2e20d8);},{'priority':'highest'}),this['listenTo'](_0x5dd4c4,'editorDestroyed',(_0x486ede,_0x34b132)=>{const _0x7c219d=_0x34b132['ui']['view']['body']['bodyCollectionContainer'];_0x33c517['focusableElements']['has'](_0x7c219d)&&_0x33c517['focusableElements']['remove'](_0x7c219d),this['context']instanceof _0x1b0da7&&this['context']['ui']['focusTracker']['remove'](_0x7c219d);});}['_unbindEditors'](_0x433011){this['stopListening'](_0x433011,'editorReady'),this['stopListening'](_0x433011,'editorDestroyed');}['_createCommentThreadView'](_0xeb81a2){const _0x1e24ff=this['context']['plugins']['get'](it),{config:_0x4dd957,locale:_0x4c03c6}=this['context'],_0x457ef5=pt(_0x4dd957['get']('locale'),_0x4c03c6);return new(0x0,(_0x4dd957['get']('comments'))['CommentThreadView'])(_0x4c03c6,_0xeb81a2,_0x1e24ff['me'],{'editorConfig':{..._0x4dd957['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4dd957['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4dd957['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4dd957['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4dd957['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x457ef5,'CommentView':_0x4dd957['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x311a4c,channelId:_0x124212,resolvedAt:_0x2224de,resolvedBy:_0x55dc81,isFromAdapter:_0x4a157b}){if(!this['hasCommentThread'](_0x311a4c))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x311a4c});const _0x395305=this['getCommentThread'](_0x311a4c);if(_0x395305['isResolved'])throw new _0x2cc838('commentsrepository-resolved-comment-thread',null,{'threadId':_0x311a4c});const _0x2a0a00=this['context']['plugins']['get'](it);if(_0x395305['resolvedBy']=_0x2a0a00['getUser'](_0x55dc81),_0x395305['resolvedAt']=_0x2224de,_0x4a157b||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3bdec3=this['context']['plugins']['get']('PendingActions'),_0x2413a7=_0x3bdec3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x124212,'threadId':_0x311a4c})['then'](({resolvedAt:_0x25d09b,resolvedBy:_0x347dbc})=>{_0x3bdec3['remove'](_0x2413a7),_0x395305['resolvedBy']['id']!==_0x347dbc&&(_0x395305['resolvedBy']=_0x2a0a00['getUser'](_0x347dbc)),_0x395305['resolvedAt']=_0x25d09b;})['catch'](_0x5b1c6a=>{throw console['error'](_0x5b1c6a),new _0x2cc838('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x440a68,channelId:_0x5621c4,isFromAdapter:_0x31fbb5}){if(!this['hasCommentThread'](_0x440a68))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x440a68});const _0x467dc6=this['getCommentThread'](_0x440a68);if(!_0x467dc6['isResolved'])throw new _0x2cc838('commentsrepository-reopen-comment-thread',null,{'threadId':_0x440a68});if(_0x467dc6['resolvedBy']=null,_0x467dc6['resolvedAt']=null,_0x31fbb5||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x388925=this['context']['plugins']['get']('PendingActions'),_0x94694f=_0x388925['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5621c4,'threadId':_0x440a68})['then'](()=>_0x388925['remove'](_0x94694f))['catch'](_0x193fef=>{throw console['error'](_0x193fef),new _0x2cc838('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2e0665,isFromAdapter:_0xb82c23}){const _0x3bd9b2=this['getCommentThread'](_0x2e0665);if(!_0x3bd9b2)throw new _0x2cc838('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2e0665),this['_threads']['delete'](_0x2e0665),!_0x3bd9b2['isSubmitted']||_0xb82c23||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x37e4a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42da1e}=_0x3bd9b2,_0x34a2d6=_0x37e4a8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x42da1e,'threadId':_0x2e0665})['then'](()=>_0x37e4a8['remove'](_0x34a2d6))['catch'](_0xe21051=>{throw console['error'](_0xe21051),new _0x2cc838('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5580c4,unlinkedAt:_0xd18a94,context:_0x5002a1,attributes:_0x2af075,isFromAdapter:_0x2a9806}){if('string'!=typeof _0x5580c4)throw new _0x2cc838('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5580c4});if(!this['hasCommentThread'](_0x5580c4))throw new _0x2cc838('commentsrepository-missing-comment-thread',null,{'threadId':_0x5580c4});const _0x37c6f4=this['getCommentThread'](_0x5580c4);let _0x5753f8=!0x1;if(void 0x0!==_0x5002a1&&_0x37c6f4['context']!==_0x5002a1&&(_0x37c6f4['context']=_0x5002a1,_0x5753f8=!0x0),void 0x0!==_0xd18a94&&_0x37c6f4['unlinkedAt']!==_0xd18a94&&(_0x37c6f4['unlinkedAt']=_0xd18a94,_0x5753f8=!0x0),_0x2af075&&!At(_0x2af075,_0x37c6f4['attributes'])&&(_0x37c6f4['attributes']=_0x2af075,_0x5753f8=!0x0),!_0x5753f8)return Promise['resolve']();if(!_0x37c6f4['isSubmitted']||_0x2a9806||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x12cdfd=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1960ea}=_0x37c6f4,_0x3130b9=_0x12cdfd['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1960ea,'threadId':_0x5580c4,'context':_0x5002a1,'unlinkedAt':_0xd18a94,'attributes':_0x2af075})['then'](()=>_0x12cdfd['remove'](_0x3130b9))['catch'](_0x282009=>{throw console['error'](_0x282009),new _0x2cc838('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1c9296){const _0x136334=this['context']['plugins']['get'](y),_0x34d49c=this['getCommentThread'](_0x1c9296);if(_0x34d49c['_isAttached']=!0x1,this['_threadToController']['has'](_0x34d49c)){const _0x7ac81a=this['_threadToController']['get'](_0x34d49c),_0x11803b=_0x7ac81a['view'],_0x147111=_0x136334['getByInnerView'](_0x11803b);this['_threadToController']['delete'](_0x34d49c),this['_viewToController']['delete'](_0x11803b),_0x147111&&_0x136334['remove'](_0x147111),_0x7ac81a['destroy'](),_0x11803b['destroy']()['then'](()=>{this['_unbindEditors'](_0x11803b);});}}['_updateActiveAnnotation']({threadId:_0x420b0b,resolvedAt:_0x321b9d,unlinkedAt:_0x33da56}){const _0x48df13=!!_0x321b9d,_0x1e383c=this['context']['plugins']['get'](y),_0x588714=this['getCommentThread'](_0x420b0b);if(this['_threadToController']['has'](_0x588714)){const _0xcd8249=this['_threadToController']['get'](_0x588714)['view'],_0x20eb6d=_0x1e383c['getByInnerView'](_0xcd8249);_0x20eb6d&&(_0x48df13&&_0x1e383c['_removeActiveAnnotation'](_0x20eb6d),_0x33da56?_0x20eb6d['isVisible']=!0x1:_0x20eb6d['refreshVisibility']());}}['_getExternalAuthor'](_0x4964e6){const _0x2a2ac3=this['context']['plugins']['get'](it),_0x5e18c5=It('external:'+_0x4964e6),_0x35e5cb=_0x2a2ac3['getUser'](_0x5e18c5);return _0x35e5cb||_0x2a2ac3['addUser']({'id':_0x5e18c5,'name':_0x4964e6});}['_createNewComment']({threadId:_0x4aa1d0,commentId:_0x17de47=_0x2f2703(),content:_0x3cb91e,authorId:_0x5996b6,createdAt:_0x5055df,attributes:_0x3103f8}){if('string'!=typeof _0x17de47)throw new _0x2cc838('commentsrepository-invalid-commentid');if('string'!=typeof _0x5996b6)throw new _0x2cc838('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3cb91e||!_0x3cb91e['trim']())throw new _0x2cc838('commentsrepository-invalid-comment-content');const _0x3df70f=this['context']['plugins']['get'](it)['getUser'](_0x5996b6);if(!_0x3df70f)throw new _0x2cc838('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5996b6});let _0x4c012e=null,_0x14a3a7=_0x5055df;return _0x3103f8?.['@external']&&(_0x4c012e=this['_getExternalAuthor'](_0x3103f8['@external']['authorName']),_0x14a3a7=new Date(_0x3103f8['@external']['createdAt'])),new wi(this,{'threadId':_0x4aa1d0,'id':_0x17de47,'author':_0x4c012e||_0x3df70f,'creator':_0x3df70f,'content':_0x3cb91e,'createdAt':_0x5055df,'authoredAt':_0x14a3a7,'attributes':_0x3103f8});}['_addComment'](_0x461791){let {threadId:_0x126779,content:_0x5a11ed,attributes:_0x400258,isFromAdapter:_0x16fc00}=_0x461791;const _0x36ad83=this['getCommentThread'](_0x461791['threadId']);if(!_0x36ad83)throw new _0x2cc838('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2b482f=this['_createNewComment'](_0x461791),{id:_0x2ce3ba}=_0x2b482f;if(_0x36ad83['_add'](_0x2b482f),_0x16fc00||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x36ad83['isSubmitted'])return Promise['resolve']();const _0x644f06=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7f0dfd}=_0x36ad83,_0x4442c9=_0x644f06['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x400258||(_0x400258={}),this['adapter']['addComment']({'channelId':_0x7f0dfd,'threadId':_0x126779,'commentId':_0x2ce3ba,'content':_0x5a11ed,'attributes':_0x400258})['then'](_0x3ed7a4=>{_0x644f06['remove'](_0x4442c9),_0x3ed7a4&&this['_updateComment']({'channelId':_0x7f0dfd,'threadId':_0x126779,'commentId':_0x2ce3ba,'createdAt':_0x3ed7a4['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x218f6a=>{throw console['error'](_0x218f6a),new _0x2cc838('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x237e1c,commentId:_0x20a46b,content:_0x324278,createdAt:_0x5284aa,attributes:_0x31b146,isFromAdapter:_0x2d03d3}){if(void 0x0!==_0x324278&&('string'!=typeof _0x324278||!_0x324278['trim']()['length']))throw new _0x2cc838('commentsrepository-update-comment-invalid-content');const _0x2229c1=this['getCommentThread'](_0x237e1c),_0x28efca=_0x2229c1['getComment'](_0x20a46b);if(!_0x28efca)throw new _0x2cc838('commentsrepository-update-missing-comment',this);let _0x39778f=!0x1;if(_0x324278&&_0x324278!==_0x28efca['content']&&(_0x28efca['isEditable']||_0x2d03d3)&&(_0x28efca['content']=_0x324278,_0x39778f=!0x0),_0x5284aa&&_0x5284aa!==_0x28efca['createdAt']&&(_0x28efca['createdAt']=_0x5284aa,_0x28efca['attributes']&&_0x28efca['attributes']['@external']||(_0x28efca['authoredAt']=_0x5284aa),_0x39778f=!0x0),_0x31b146&&!At(_0x31b146,_0x28efca['attributes'])&&(_0x28efca['attributes']=_0x31b146,_0x39778f=!0x0),!_0x39778f)return Promise['resolve']();if(_0x2229c1['fire']('commentUpdated'),_0x2d03d3||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2eb26b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x21d050}=this['getCommentThread'](_0x28efca['threadId']),_0x5b6f46=_0x2eb26b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x21d050,'threadId':_0x237e1c,'commentId':_0x20a46b,'content':_0x324278,'attributes':_0x31b146})['then'](()=>_0x2eb26b['remove'](_0x5b6f46))['catch'](_0xf34a9e=>{throw console['error'](_0xf34a9e),new _0x2cc838('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x4de302,commentId:_0x33aa7c,isFromAdapter:_0x49af17}){const _0x16d18a=this['getCommentThread'](_0x4de302),_0x372d50=_0x16d18a['getComment'](_0x33aa7c);if(!_0x372d50)throw new _0x2cc838('commentsrepository-remove-missing-comment',this);if(_0x16d18a['_remove'](_0x372d50),_0x49af17||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3c3c5c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2b95c3}=_0x16d18a,_0x240bc2=_0x3c3c5c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2b95c3,'threadId':_0x4de302,'commentId':_0x33aa7c})['then'](()=>_0x3c3c5c['remove'](_0x240bc2))['catch'](_0x5a80d8=>{throw console['error'](_0x5a80d8),new _0x2cc838('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3e3063(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x1f1514,_0x10f5f2){super();const _0x4777d9=_0x10f5f2['isResolvable'];this['channelId']=_0x10f5f2['channelId'],this['id']=_0x10f5f2['id'],this['comments']=new _0x4d5d77(),this['_repository']=_0x1f1514,this['_isAttached']=!0x1,this['_isSubmitted']=_0x10f5f2['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x1f1514,'_permissions',_0x1f1514,'_readOnlyChannels',()=>_0x1f1514['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x1f1514,'_permissions',()=>_0x1f1514['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x1f1514,'_permissions',()=>{const _0x3d159e=_0x1f1514['getPermissions'](this['channelId']);return _0x3d159e['write']||_0x3d159e['admin'];}),this['bind']('isResolvable')['to'](_0x1f1514,'_permissions',()=>_0x4777d9&&_0x1f1514['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x10f5f2['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x1988f0,_0x2170dc)=>_0x1988f0?_0x2170dc?_0x1988f0<_0x2170dc?_0x1988f0:_0x2170dc:_0x1988f0:_0x2170dc),this['set']('unlinkedAt',_0x10f5f2['unlinkedAt']||null),this['set']('resolvedAt',_0x10f5f2['resolvedAt']||null),this['set']('resolvedBy',_0x10f5f2['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x542160=>!!_0x542160),this['set']('attributes',_0x10f5f2['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x229776,_0x146b8a)=>_0x229776+_0x146b8a['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x438c5e,id:_0x108b05}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x438c5e),{'channelId':_0x438c5e,'threadId':_0x108b05});}['setUnlinkedAt'](_0x5499cc){this['_update']({'unlinkedAt':_0x5499cc});}['resolve']({resolvedAt:_0x2aaca4=new Date(),resolvedBy:_0x253dc3=null,isFromAdapter:_0x2ac236=!0x1}={}){const _0x129f35=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x9e32a7,id:_0x5c45e0}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x9e32a7),{'channelId':_0x9e32a7,'threadId':_0x5c45e0,'resolvedAt':_0x2aaca4,'resolvedBy':_0x253dc3||_0x129f35['id'],'isFromAdapter':_0x2ac236});}['reopen']({isFromAdapter:_0x4968f7=!0x1}={}){const {channelId:_0x7dc3ec,id:_0x34b9b5}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x7dc3ec),{'channelId':_0x7dc3ec,'threadId':_0x34b9b5,'isFromAdapter':_0x4968f7});}['setContext'](_0x481ebe){this['context']||this['_update']({'context':_0x481ebe});}['setAttribute'](_0x4f1c72,_0x54b416){const _0x215889=wt(this['attributes']);yt(_0x215889,_0x4f1c72,_0x54b416),this['_update']({'attributes':_0x215889});}['removeAttribute'](_0x175f85){const _0x1248d7=wt(this['attributes']);Ct(_0x1248d7,_0x175f85),this['_update']({'attributes':_0x1248d7});}['remove']({isFromAdapter:_0x26e4ee=!0x1}={}){const {channelId:_0x1b9f2d,id:_0x1fe3c5}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x1b9f2d),{'channelId':_0x1b9f2d,'threadId':_0x1fe3c5,'isFromAdapter':_0x26e4ee});}['attachTo'](_0x48c48c){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x48c48c});}['addComment'](_0xd5b4b1){const {channelId:_0x3769c3,id:_0x21392b}=this;this['_repository']['fire'](Nt('addComment',_0x3769c3,_0x21392b),Object['assign']({'channelId':_0x3769c3,'threadId':_0x21392b},_0xd5b4b1));}['getComment'](_0x3ac3fe){if('string'!=typeof _0x3ac3fe)throw new _0x2cc838('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x3ac3fe});return this['comments']['get'](_0x3ac3fe);}['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'](_0x1241bf=>_0x1241bf['toJSON']()),'attributes':this['attributes']};}['_add'](_0x29660b){return this['listenTo'](_0x29660b,'change:authoredAt',()=>{const _0x5301f8=this['_findOptimalIndex'](_0x29660b),_0x1ab6e5=this['comments'];_0x5301f8-0x1!=_0x1ab6e5['getIndex'](_0x29660b)&&_0x5301f8+0x1!=_0x1ab6e5['getIndex'](_0x29660b)&&(this['_remove'](_0x29660b),this['_add'](_0x29660b));}),this['comments']['add'](_0x29660b,this['_findOptimalIndex'](_0x29660b));}['_update'](_0x5c7091){const {channelId:_0x388abc,id:_0x342da3}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x388abc),{..._0x5c7091,'channelId':_0x388abc,'threadId':_0x342da3});}['_remove'](_0x3f6948){return this['stopListening'](_0x3f6948),_0x3f6948['destroy'](),this['comments']['remove'](_0x3f6948);}['_findOptimalIndex'](_0x120ff4){const _0x5c1d8a=this['comments']['find'](_0x161578=>new Date(_0x161578['authoredAt'])['getTime']()>new Date(_0x120ff4['authoredAt'])['getTime']());return _0x5c1d8a?this['comments']['getIndex'](_0x5c1d8a):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3e3063(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1d6b0c,_0x336b10){super();const _0x259979=_0x1d6b0c['context']['plugins']['get'](it)['me'],_0x3d7dfc=_0x1d6b0c['getCommentThread'](_0x336b10['threadId']),_0x3599d2=0x0===_0x3d7dfc['comments']['length'],_0x5b6421=_0x259979===_0x336b10['author'];this['id']=_0x336b10['id'],this['threadId']=_0x336b10['threadId'],this['author']=_0x336b10['author'],this['creator']=_0x336b10['creator'],this['isExternal']=Boolean(_0x336b10['attributes']&&_0x336b10['attributes']['@external']),this['set']('content',_0x336b10['content']),this['createdAt']=_0x336b10['createdAt']||new Date(),this['set']('authoredAt',_0x336b10['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3d7dfc,'resolvedAt'),this['set']('attributes',_0x336b10['attributes']||{}),this['bind']('isEditable')['to'](_0x1d6b0c,'_permissions',()=>{const _0x235912=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['write'],_0x2163a1=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['modifyAll'];return _0x5b6421&&_0x235912||!_0x5b6421&&_0x2163a1;}),this['bind']('isRemovable')['to'](_0x3d7dfc,'isRemovable',_0x1d6b0c,'_permissions',_0x4b388c=>{const _0x145af3=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['write'],_0x7ae242=_0x1d6b0c['getPermissions'](_0x3d7dfc['channelId'])['modifyAll'];return _0x5b6421&&_0x145af3||_0x4b388c&&_0x3599d2||!_0x5b6421&&_0x7ae242&&!_0x3599d2;}),this['bind']('isReadOnly')['to'](_0x3d7dfc,'isReadOnly'),this['_repository']=_0x1d6b0c;}get['weight'](){return Math['max'](function(_0x1b1fc3){const _0x379083=document['createElement']('div');return _0x379083['innerHTML']=_0x1b1fc3,_0x379083['textContent']['length'];}(this['content']),0xc8);}['update'](_0x409c36){const {threadId:_0x5aa64d,id:_0x2931ca}=this;if(!this['_repository']['hasCommentThread'](_0x5aa64d))throw new _0x2cc838('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x545c3d}=this['_repository']['getCommentThread'](_0x5aa64d);this['_repository']['fire'](Nt('updateComment',_0x545c3d,_0x5aa64d),{'channelId':_0x545c3d,'threadId':_0x5aa64d,'commentId':_0x2931ca,..._0x409c36});}['setAttribute'](_0x38d147,_0x345dda){const _0xf2f29b=wt(this['attributes']);yt(_0xf2f29b,_0x38d147,_0x345dda),this['update']({'attributes':_0xf2f29b});}['removeAttribute'](_0x13aace){const _0x159bc5=wt(this['attributes']);Ct(_0x159bc5,_0x13aace),this['update']({'attributes':_0x159bc5});}['remove'](_0x51ef2c={}){if(!_0x51ef2c['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0xd15db4,id:_0x5f2af1}=this;if(!this['_repository']['hasCommentThread'](_0xd15db4))throw new _0x2cc838('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x157531}=this['_repository']['getCommentThread'](_0xd15db4);this['_repository']['fire'](Nt('removeComment',_0x157531,_0xd15db4),{'channelId':_0x157531,'threadId':_0xd15db4,'commentId':_0x5f2af1,..._0x51ef2c});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x446f02,..._0x18e2e3){for(const _0x2da497 of _0x18e2e3)void 0x0!==_0x2da497&&(_0x446f02+=':'+String(_0x2da497));return _0x446f02;}class ot extends _0x2d7805{constructor(_0x26b13f){super(_0x26b13f),this['set']('hasContent',!0x1);}['refresh'](){const _0x6319cc=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x38c2e8 of _0x6319cc['getRanges']())if(this['_hasContent'](_0x38c2e8))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3fe051=_0x2f2703(),ranges:_0x1c3139,comment:_0x40888f}={}){const _0x200a12=this['editor']['model'],_0x11e3d7=_0x1c3139??Array['from'](_0x200a12['document']['selection']['getRanges']()),_0x438a8b=[];for(const _0x1f90e5 of _0x11e3d7)this['_hasContent'](_0x1f90e5)&&_0x438a8b['push'](this['_trimToContent'](_0x1f90e5));if(!_0x438a8b['length'])throw new _0x2cc838('addcommentthreadcommand-incorrect-ranges',null);_0x40888f&&this['_createCommentThread'](_0x3fe051,_0x40888f),this['_createMarkersFromRanges'](_0x3fe051,_0x438a8b,!!_0x40888f);}['_createMarkersFromRanges'](_0x35c67b,_0x5df179,_0x462ada){this['editor']['model']['change'](_0x40e172=>{for(const _0x3fc86e of _0x5df179){const _0x21f19a=_0x2f2703()['substr'](0x1,0x5),_0x5369f1='comment:'+_0x35c67b+':'+_0x21f19a;_0x40e172['addMarker'](_0x5369f1,{'range':_0x3fc86e,'usingOperation':_0x462ada,'affectsData':_0x462ada});}});}['_createCommentThread'](_0x3d801c,_0x2f3266){const _0x1d4643=this['editor']['plugins']['get']('CommentsRepository'),_0x5450f7=this['editor']['config']['get']('collaboration.channelId'),_0x3c73c0=this['editor']['plugins']['get']('Users')['me'];if(!_0x3c73c0)throw new _0x2cc838('addcommentthreadcommand-user-not-found',null);_0x1d4643['addCommentThread']({'threadId':_0x3d801c,'channelId':_0x5450f7,'comments':[{'authorId':_0x3c73c0['id'],'content':_0x2f3266,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x386fa0){for(const _0x226cc7 of _0x386fa0['getItems']())if(this['_itemIsContent'](_0x226cc7))return!0x0;return!0x1;}['_itemIsContent'](_0x7d4818){return _0x7d4818['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x7d4818)&&!_0x7d4818['is']('element','tableCell');}['_trimToContent'](_0x2df054){const _0x42fa2e=_0x3c503a=>!this['_itemIsContent'](_0x3c503a['item']),_0x1d7c2b=_0x2df054['start']['getLastMatchingPosition'](_0x42fa2e),_0x1e9e78=_0x2df054['end']['getLastMatchingPosition'](_0x42fa2e,{'direction':'backward'});return this['editor']['model']['createRange'](_0x1d7c2b,_0x1e9e78);}}class b extends _0x6d2056{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5cacc0){super(_0x5cacc0),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1a93d5=this['editor'],_0x577d18=_0x1a93d5['model']['document']['selection'],_0x2db02d=_0x35ab00(()=>this['refreshSelectedViews'](),0xa);_0x577d18['on']('change:range',(_0x420110,_0xb5d22a)=>{_0xb5d22a['directChange']&&(_0x2db02d['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1a93d5['editing']['view']['document'],'change:isFocused',(_0x5f2459,_0xa02d20,_0x2c7bdf)=>{_0x2c7bdf&&_0x2db02d();}),this['listenTo'](_0x1a93d5['ui']['focusTracker'],'change:isFocused',(_0x562331,_0x1997a9,_0x33ba2e)=>{_0x33ba2e||this['fire']('blur',{'isAnnotationTracked':_0x528ca6=>this['_editorAnnotationsData']['has'](_0x528ca6['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5136db){if(this['_editorAnnotations']['has'](_0x5136db['view']))return;this['_editorAnnotations']['add'](_0x5136db['view']),this['editor']['ui']['focusTracker']['add'](_0x5136db['view']['element']);const _0x5a3a6c=this['editor']['plugins']['get'](y);this['listenTo'](_0x5a3a6c['collection'],'remove',(_0x33c2f4,_0x3aa74a)=>{this['editor']['ui']['focusTracker']['remove'](_0x3aa74a['view']['element']),this['_editorAnnotations']['delete'](_0x3aa74a['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x311e74){if('function'!=typeof _0x311e74)throw new _0x2cc838('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x311e74);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xdfd8a3,annotations:_0x1f60c9}){const _0x2fd4b0=[],_0x19a129=this['editor']['model']['document']['selection'],_0x5f25c5=Array['from'](_0x19a129['getRanges']());for(const [_0x460ccf,_0x379443]of this['_editorAnnotationsData']){const _0x27694d=_0x1bb795(_0x379443),_0x4eddc3=_0x1f60c9['getByInnerView'](_0x460ccf);_0x27694d&&_0x4eddc3&&_0x2fd4b0['push']({'annotation':_0x4eddc3,'range':_0x27694d});}function _0x1bb795(_0x856fc7){for(const _0xdf69ee of _0x856fc7)for(const _0x3f261d of _0x5f25c5)if(_0xdf69ee['containsRange'](_0x3f261d,!_0x19a129['isCollapsed']))return _0xdf69ee;return null;}return _0x2fd4b0['sort']((_0x33f35e,_0x5c7b23)=>{const _0x5cd4cb=_0x33f35e['range'],_0x4fd2db=_0x5c7b23['range'];if(!_0x5cd4cb['isEqual'](_0x4fd2db)){if(_0x5cd4cb['containsRange'](_0x4fd2db,!0x0))return 0x1;if(_0x4fd2db['containsRange'](_0x5cd4cb,!0x0))return-0x1;}return _0x33f35e['annotation']==_0xdfd8a3?-0x1:_0x5c7b23['annotation']==_0xdfd8a3?0x1:0x0;})['map'](_0x48041c=>_0x48041c['annotation']);}get['_editorAnnotationsData'](){const _0x555290=new Map();for(const _0x308995 of Array['from'](this['_dataCollectors']))for(const [_0x16d12b,_0x2049ad]of _0x308995())_0x555290['set'](_0x16d12b,_0x2049ad);return _0x555290;}}class st extends _0x6d2056{['afterInit'](){const _0x303441=this['editor'];if(!_0x303441['plugins']['has']('RestrictedEditingModeEditing'))return;_0x303441['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x6d2056{constructor(_0x37e932){super(_0x37e932),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2affe0=this['editor'],_0x130d98=_0x2affe0['commands']['get']('importWord'),_0x190fae=_0x2affe0['plugins']['get'](it);_0x130d98&&(_0x130d98['on']('execute',(_0x1dc417,[,_0x3c03bf])=>{_0x3c03bf['collaboration_features']={'comments':!0x0,'user_id':_0x190fae['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x130d98,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x55ea29,_0x12e940){const {comment_threads:_0x378425}=_0x12e940;_0x378425&&_0x378425['forEach'](({thread_id:_0x1524fc,comments:_0x3fea25,is_resolved:_0x462d3d})=>{const _0x16c0e6=new Date(),_0x504d04=_0x3fea25['map'](({author:_0x115b71,content:_0x2de15c,created_at:_0x2b075f})=>({'content':_0x2de15c,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x16c0e6,'attributes':{'@external':{'authorName':_0x115b71,'createdAt':_0x2b075f?new Date(_0x2b075f):new Date(),'source':'importWord'}}})),_0x3b29ef=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3b29ef,'threadId':_0x1524fc,'comments':_0x504d04,'resolvedAt':_0x462d3d?_0x16c0e6:null});});}}class at extends _0x6d2056{constructor(_0x37d336){super(_0x37d336),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5f4077=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5f4077,'contentInsertion',(_0x3367a7,_0x6e2b0d)=>this['_removeMarkersWithoutThreads'](_0x6e2b0d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x6353e7){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x6353e7;const _0x3f422d=this['editor']['plugins']['get']('CommentsRepository');for(const _0x11e984 of _0x6353e7['keys']()){const [_0x286918,_0x44e6c0]=_0x11e984['split'](':');'comment'!=_0x286918||_0x3f422d['hasCommentThread'](_0x44e6c0)||_0x6353e7['delete'](_0x11e984);}return _0x6353e7;}['_registerMarkerInClipboardPipeline'](){const _0x47c247=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x49c1a5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x49c1a5&&_0x47c247['_registerMarkerToCopy']('comment',_0x49c1a5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x2715af){switch(_0x2715af){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5ec4d9){const _0x411889=_0x5ec4d9['split'](':');return{'group':_0x411889[0x0],'id':_0x411889[0x1],'part':_0x411889[0x2]};}class ut extends _0x6d2056{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3cd63e,_0xc19e64)=>{if(!_0xc19e64['options']['showCommentHighlights'])return null;if(_0xc19e64['options']['ignoreResolvedComments']){const {id:_0x3fd657}=ft(_0x3cd63e['markerName']),_0xdf495a=this['editor']['plugins']['get'](o);if(_0xdf495a['getCommentThread'](_0x3fd657)?.['isResolved']&&_0x3cd63e['item'])return _0xc19e64['consumable']['consume'](_0x3cd63e['item'],'addMarker:'+_0x3cd63e['markerName']),_0xc19e64['consumable']['consume'](_0x3cd63e['item'],'removeMarker:'+_0x3cd63e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5ef63f=>{_0x5ef63f['on']('addMarker:comment',(_0x1efc0,_0x4830bf,_0x1e2ed8)=>{if(!_0x1e2ed8['options']['showCommentHighlights'])return;const _0x3e2922=_0x4830bf['item'];if(!_0x3e2922)return;const _0xf27d0c=_0x1e2ed8['mapper']['toViewElement'](_0x3e2922);this['editor']['model']['schema']['isObject'](_0x3e2922)&&_0xf27d0c&&!_0xf27d0c['getCustomProperty']('widget')&&_0xf27d0c['is']('containerElement')&&_0x3d60c9(_0xf27d0c,_0x1e2ed8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5dfe9c,{writer:_0x3c5e1d,options:_0x443a9a})=>{if(!_0x443a9a['showCommentHighlights'])return null;const _0x21d98e=_0x3c5e1d['createContainerElement']('div'),_0x220705=_0x3c5e1d['createEmptyElement']('hr');return _0x3c5e1d['addClass']('ck-horizontal-line',_0x21d98e),_0x3c5e1d['insert'](_0x3c5e1d['createPositionAt'](_0x21d98e,0x0),_0x220705),_0x21d98e;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x488cea,{writer:_0x500da2,options:_0x4a5502})=>{if(!_0x4a5502['showCommentHighlights'])return null;const _0x1928b3=_0x500da2['createContainerElement']('span'),_0x798e5b=_0x500da2['createEmptyElement']('img');return _0x500da2['addClass']('image-inline',_0x1928b3),_0x500da2['insert'](_0x500da2['createPositionAt'](_0x1928b3,0x0),_0x798e5b),_0x1928b3;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x66de85,{writer:_0x4a1721,options:_0x21f5b1})=>{if(_0x21f5b1['showCommentHighlights'])return _0x4a1721['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2aeb2e,_0x3f820f,_0x3c8bad)=>{_0x3c8bad['options']['showCommentHighlights']&&_0x2aeb2e['stop']();},{'priority':'high'});}}class r extends _0x6d2056{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(_0x19f109){super(_0x19f109),this['set']('isThreadsLoadingPaused',!0x0),_0x19f109['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1ae9e9,_0x47d2bb,_0x545352,_0x458feb)=>{const _0x4bc907=_0x19f109['plugins']['get'](o),_0x445479=_0x545352?ft(_0x545352)['id']:null;_0x19f109['model']['change'](()=>{if(_0x445479){const _0x5e7bce=this['getAllMarkersForId'](_0x445479);for(const _0x37e73a of _0x5e7bce)_0x19f109['editing']['reconvertMarker'](_0x37e73a);}if(_0x458feb){const {id:_0x170730}=ft(_0x458feb),_0x242bc1=_0x4bc907['getCommentThread'](_0x170730);if(_0x242bc1&&_0x242bc1['unlinkedAt'])return;if(_0x242bc1&&!_0x242bc1['isAttached'])return;const _0x2fe6be=this['getAllMarkersForId'](_0x170730);for(const _0x1a256c of _0x2fe6be)_0x19f109['editing']['reconvertMarker'](_0x1a256c);}}),_0x445479&&this['scrollToThreadMarker'](_0x445479);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x1d719c=this['editor'],_0x2e5829=_0x1d719c['plugins']['get'](o),_0x50a6cb=_0x1d719c['config']['get']('collaboration.channelId'),_0x287056=_0x2e5829['getCommentThreads']()['filter'](_0x147bcd=>_0x147bcd['channelId']!==_0x50a6cb);_0x1d719c['commands']['add']('addCommentThread',new ot(_0x1d719c)),this['listenTo'](_0x1d719c,'change:isReadOnly',(_0x23088a,_0xb1dd5b,_0x5aa870)=>{_0x2e5829['switchReadOnly'](_0x5aa870,_0x1d719c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2e5829,dt('addCommentThread',_0x50a6cb),(_0x21e911,{threadId:_0x4fde66})=>{const _0x2ec32b=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4fde66);_0x2ec32b?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4fde66);}),this['listenTo'](_0x2e5829,dt('removeCommentThread',_0x50a6cb),(_0xa77f0f,{threadId:_0x138d87})=>{_0x1d719c['model']['enqueueChange']({'isUndoable':!0x1},_0x1ef85f=>{const _0x80e49a=this['getAllMarkersForId'](_0x138d87);for(const _0x54166b of _0x80e49a)_0x1ef85f['removeMarker'](_0x54166b);});}),this['listenTo'](_0x2e5829,dt('resolveCommentThread',_0x50a6cb),(_0x5025c4,{threadId:_0x5d19c7})=>{(this['_reconvertMarkers'](_0x5d19c7),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5d19c7)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2e5829,dt('reopenCommentThread',_0x50a6cb),(_0x44d82a,{threadId:_0xf4d149})=>{this['_reconvertMarkers'](_0xf4d149);},{'priority':'low'}),this['listenTo'](_0x2e5829,dt('addComment',_0x50a6cb),(_0x18b3f8,{threadId:_0x305dcf,isFromAdapter:_0x38e46c})=>{const _0x40d75f=this['getAllMarkersForId'](_0x305dcf);if(_0x38e46c||0x0==_0x40d75f['length']||!_0x2e5829['hasCommentThread'](_0x305dcf))return;0x1===_0x2e5829['getCommentThread'](_0x305dcf)['length']&&_0x1d719c['model']['enqueueChange']({'isUndoable':!0x1},_0x495897=>{for(const _0x43d822 of _0x40d75f)_0x495897['updateMarker'](_0x43d822,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x287056);}['afterInit'](){!async function(_0xa7ae8e){const _0x12ccfd=_0x304d83([0x4d,0x4e,0x4c,0x45,0x4f,0x50,0x57,0x58,0x5a,0x69,0x6f,0x68,0x31,0x54,0x38,0x70,0x56,0x75,0x77,0x61,0x6c,0x65,0x34,0x39,0x76,0x32,0x37,0x42,0x36,0x6b,0x6a,0x52,0x6d,0x49,0x51,0x63,0x78,0x62,0x47,0x48,0x30,0x59,0x79,0x7a,0x66,0x4a,0x46,0x41,0x43,0x4b,0x71,0x44,0x53,0x6e,0x73,0x64,0x35,0x33,0x74,0x55,0x72,0x67]),_0x331356=0x213e51b3,_0x4b7f02=0x213923e3^_0x331356,_0x6ec92=window[_0x304d83([0x44,0x61,0x74,0x65])][_0x304d83([0x6e,0x6f,0x77])](),_0x424d62=_0xa7ae8e[_0x304d83([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x43e1ac=new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x17eaf3=>{_0x424d62[_0x304d83([0x6f,0x6e,0x63,0x65])](_0x304d83([0x72,0x65,0x61,0x64,0x79]),_0x17eaf3);}),_0x357450={[_0x304d83([0x6b,0x74,0x79])]:_0x304d83([0x45,0x43]),[_0x304d83([0x75,0x73,0x65])]:_0x304d83([0x73,0x69,0x67]),[_0x304d83([0x63,0x72,0x76])]:_0x304d83([0x50,0x2d,0x32,0x35,0x36]),[_0x304d83([0x78])]:_0x304d83([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]),[_0x304d83([0x79])]:_0x304d83([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]),[_0x304d83([0x61,0x6c,0x67])]:_0x304d83([0x45,0x53,0x32,0x35,0x36])},_0x5e04d2=_0x424d62[_0x304d83([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x304d83([0x67,0x65,0x74])](_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x405082(){let _0x1d1137,_0x3197ac=null,_0x3733b3=null;try{if(_0x5e04d2==_0x304d83([0x47,0x50,0x4c]))return _0x304d83([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1d1137=_0x1de278(),!_0x1d1137)return _0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1d1137[_0x304d83([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3733b3=_0x1efa49(_0x1d1137[_0x304d83([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1d1137[_0x304d83([0x6a,0x74,0x69])])),await _0x9817e2()?_0xf3b585()?_0x181661()?_0x304d83([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x363c0b()?(_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x304d83([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3197ac=_0x17916a(_0x304d83([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x304d83([0x74,0x72,0x69,0x61,0x6c])&&(_0x3197ac=_0x17916a(_0x304d83([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x53d50c()):_0x304d83([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x304d83([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x304d83([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x181661(){const _0xae1d08=[_0x304d83([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x304d83([0x74,0x72,0x69,0x61,0x6c])][_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x6ec92/0x3e8:0xe10*_0x4b7f02;return _0x1d1137[_0x304d83([0x65,0x78,0x70])]<_0xae1d08;}function _0xf3b585(){const _0x539bab=_0x1d1137[_0x304d83([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x539bab)return!0x1;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x2a])))return!0x0;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x43,0x4d,0x54])))return!0x0;if(_0x539bab[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x52,0x43,0x4d,0x54]))){if(_0x172e89())return!0x0;if(_0x2b2120()||_0x3fe7d3())return!0x0;}return!0x1;}function _0x363c0b(){const _0x51d234=_0x1d1137[_0x304d83([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x51d234||0x0==_0x51d234[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xb6c678}=new URL(window[_0x304d83([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x51d234[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xb6c678))return!0x0;const _0x368735=_0xb6c678[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e]));return _0x51d234[_0x304d83([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3e0402=>_0x3e0402[_0x304d83([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x304d83([0x2a])))[_0x304d83([0x6d,0x61,0x70])](_0x22dba3=>_0x22dba3[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e])))[_0x304d83([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11d016=>_0x11d016[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x368735[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x304d83([0x6d,0x61,0x70])](_0x885145=>Array(_0x368735[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x885145[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x304d83([0x66,0x69,0x6c,0x6c])](_0x885145[0x0]===_0x304d83([0x2a])?_0x304d83([0x2a]):'')[_0x304d83([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x885145))[_0x304d83([0x73,0x6f,0x6d,0x65])](_0x483ccf=>_0x368735[_0x304d83([0x65,0x76,0x65,0x72,0x79])]((_0x5ad9e4,_0x457276)=>_0x483ccf[_0x457276]===_0x5ad9e4||_0x483ccf[_0x457276]===_0x304d83([0x2a])));}function _0x53d50c(){return _0x3197ac&&_0x3733b3?new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3bd79c,_0x5bbb0e)=>{_0x3197ac[_0x304d83([0x74,0x68,0x65,0x6e])](_0x3bd79c,_0x5bbb0e),_0x3733b3[_0x304d83([0x74,0x68,0x65,0x6e])](_0x5e97ee=>{_0x5e97ee!=_0x304d83([0x56,0x61,0x6c,0x69,0x64])&&_0x3bd79c(_0x5e97ee);},_0x5bbb0e);}):_0x3197ac||_0x3733b3||_0x304d83([0x56,0x61,0x6c,0x69,0x64]);}}function _0x1efa49(_0x4248ee,_0x5e72b6){return new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2cf861=>{if(_0x52cb22())return _0x2cf861(_0x304d83([0x56,0x61,0x6c,0x69,0x64]));_0x35b36a(),_0x424d62[_0x304d83([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x23b7f0=!0x1;const _0x6d5627=_0x2f2703();function _0x24fe69(_0x5a6d5d){return!!_0x5a6d5d&&(typeof _0x5a6d5d===_0x304d83([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5a6d5d===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5a6d5d[_0x304d83([0x74,0x68,0x65,0x6e])]===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5a6d5d[_0x304d83([0x63,0x61,0x74,0x63,0x68])]===_0x304d83([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1b3caf(_0x1e9b86){_0x488172(_0x1e9b86)[_0x304d83([0x74,0x68,0x65,0x6e])](_0xfa2d1d=>{if(!_0xfa2d1d||_0xfa2d1d[_0x304d83([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x304d83([0x6f,0x6b]))return _0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1da36b(_0x40651f(_0x6d5627+_0x5e72b6))!=_0xfa2d1d[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x304d83([0x56,0x61,0x6c,0x69,0x64]);})[_0x304d83([0x74,0x68,0x65,0x6e])](_0x2375c3=>(_0x2a61e3(),_0x2375c3),()=>{const _0x5065b8=_0x5d6aa8();return null==_0x5065b8?(_0x2a61e3(),_0x304d83([0x56,0x61,0x6c,0x69,0x64])):_0x304d83(_0x6ec92-_0x5065b8>(0x532d5b3^_0x331356)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x304d83([0x74,0x68,0x65,0x6e])](_0x2cf861)[_0x304d83([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4d8fc5=0x2108bf33^_0x331356;function _0x2a61e3(){const _0x127877=_0x304d83([0x6c,0x6c,0x63,0x74,0x2d])+_0x1da36b(_0x40651f(_0x4248ee)),_0x39c817=_0x10813a(_0x1da36b(window[_0x304d83([0x4d,0x61,0x74,0x68])][_0x304d83([0x63,0x65,0x69,0x6c])](_0x6ec92/_0x4d8fc5)));window[_0x304d83([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x304d83([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x127877,_0x39c817);}function _0x5d6aa8(){const _0xd4226c=_0x304d83([0x6c,0x6c,0x63,0x74,0x2d])+_0x1da36b(_0x40651f(_0x4248ee)),_0xbd8371=window[_0x304d83([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x304d83([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd4226c);return _0xbd8371?window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x10813a(_0xbd8371),0x10)*_0x4d8fc5:null;}function _0x488172(_0x1ef958){return new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0xccc14a,_0x2c7ca5)=>{_0x1ef958[_0x304d83([0x74,0x68,0x65,0x6e])](_0xccc14a,_0x2c7ca5),window[_0x304d83([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2c7ca5,0x213f8573^_0x331356);});}}_0x424d62[_0x304d83([0x6f,0x6e])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1f4f76,_0x1f8f78)=>{if(_0x1f8f78[0x0]!=_0x4248ee)return _0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1f8f78[0x1]={..._0x1f8f78[0x1],[_0x304d83([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x6d5627};},{[_0x304d83([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x304d83([0x68,0x69,0x67,0x68])}),_0x424d62[_0x304d83([0x6f,0x6e])](_0x304d83([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x469193=>{_0x24fe69(_0x469193[_0x304d83([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x23b7f0=!0x0,_0x1b3caf(_0x469193[_0x304d83([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x304d83([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x304d83([0x6c,0x6f,0x77])}),_0x43e1ac[_0x304d83([0x74,0x68,0x65,0x6e])](()=>{_0x23b7f0||_0x2cf861(_0x304d83([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x52cb22(){return _0x424d62[_0x304d83([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x304d83([0x76,0x69,0x65,0x77])][_0x304d83([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x304d83([0x61,0x75,0x74,0x6f]);}function _0x35b36a(){_0x424d62[_0x304d83([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x304d83([0x76,0x69,0x65,0x77])][_0x304d83([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x304d83([0x61,0x75,0x74,0x6f]);}}function _0x17916a(_0x29fd5c){const _0x24eeaa=[new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xcf5a9=>setTimeout(_0xcf5a9,0x21376f7f^_0x331356)),_0x43e1ac[_0x304d83([0x74,0x68,0x65,0x6e])](()=>new window[(_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3ae218=>{let _0x1cd314=0x0;_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x6f,0x6e])](_0x304d83([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x420d62,_0x37773a)=>{_0x37773a[0x0][_0x304d83([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1cd314++,_0x1cd314==(0x213e504b^_0x331356)&&(_0x3ae218(),_0x420d62[_0x304d83([0x6f,0x66,0x66])]());});}))];return window[_0x304d83([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x304d83([0x72,0x61,0x63,0x65])](_0x24eeaa)[_0x304d83([0x74,0x68,0x65,0x6e])](()=>_0x29fd5c);}async function _0x310f4c(){await _0x43e1ac,_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1d866f,_0x424d62[_0x304d83([0x6d,0x6f,0x64,0x65,0x6c])][_0x304d83([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1d866f,_0x424d62[_0x304d83([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x304d83([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x172e89(){return _0x4b4645(_0x304d83([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x4be3c2(_0x304d83([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x304d83([0x73,0x74,0x61,0x74,0x65])]==_0x304d83([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2b2120(){return _0x4b4645(_0x304d83([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 _0x3fe7d3(){return _0x4b4645(_0x304d83([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x110dab(_0x548920){const _0x8b67b4=_0x1abb03();_0x424d62[_0x8b67b4]=_0x304d83([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x548920,_0x548920!=_0x304d83([0x56,0x61,0x6c,0x69,0x64])&&_0x310f4c();}function _0x1abb03(){const _0x242662=window[_0x304d83([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x304d83([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x304d83([0x6e,0x6f,0x77])]())[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x304d83([0x2e]),'');let _0x3777e2=_0x304d83([0x4d]);for(let _0x63065c=0x0;_0x63065c<_0x242662[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x63065c+=0x2){let _0x1788db=window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x242662[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x63065c,_0x63065c+0x2));_0x1788db>=_0x12ccfd[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1788db-=_0x12ccfd[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3777e2+=_0x12ccfd[_0x1788db];}return _0x3777e2;}function _0x1de278(){const _0x1e0a58=_0x5e04d2[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e]));if(0x3!=_0x1e0a58[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3a4654(_0x1e0a58[0x1]);function _0x3a4654(_0x29d4e9){const _0x10d3a7=_0x21d067(_0x29d4e9);return _0x10d3a7&&_0x45f574()?_0x10d3a7:null;function _0x45f574(){const _0x29de8d=_0x10d3a7[_0x304d83([0x6a,0x74,0x69])],_0x3cbb77=window[_0x304d83([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x29de8d[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x29de8d[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x2e3cd6={..._0x10d3a7,[_0x304d83([0x6a,0x74,0x69])]:_0x29de8d[_0x304d83([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x29de8d[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x2e3cd6[_0x304d83([0x76,0x63])],_0x40651f(_0x2e3cd6)==_0x3cbb77;}}}async function _0x9817e2(){let _0x2d7d2a=!0x0;try{const _0x552126=_0x5e04d2[_0x304d83([0x73,0x70,0x6c,0x69,0x74])](_0x304d83([0x2e])),[_0x4794c7,_0x4555a0,_0x10d7e6]=_0x552126;return _0x131d58(_0x4794c7),await _0x2b0b8e(_0x4794c7,_0x4555a0,_0x10d7e6),_0x2d7d2a;}catch{return!0x1;}function _0x131d58(_0x2c09c2){const _0x3c8684=_0x21d067(_0x2c09c2);_0x3c8684&&_0x3c8684[_0x304d83([0x61,0x6c,0x67])]==_0x304d83([0x45,0x53,0x32,0x35,0x36])||(_0x2d7d2a=!0x1);}async function _0x2b0b8e(_0x460701,_0x51f79c,_0x43a74b){const _0x516afc=window[_0x304d83([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x304d83([0x66,0x72,0x6f,0x6d])](_0x181b7f(_0x43a74b),_0x3e2977=>_0x3e2977[_0x304d83([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x157fca=new window[(_0x304d83([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x304d83([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x460701+_0x304d83([0x2e])+_0x51f79c),_0x49802c=window[_0x304d83([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x304d83([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x49802c)return;const _0x1429ef=await _0x49802c[_0x304d83([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x304d83([0x6a,0x77,0x6b]),_0x357450,{[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x45,0x43,0x44,0x53,0x41]),[_0x304d83([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x304d83([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x49802c[_0x304d83([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x45,0x43,0x44,0x53,0x41]),[_0x304d83([0x68,0x61,0x73,0x68])]:{[_0x304d83([0x6e,0x61,0x6d,0x65])]:_0x304d83([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1429ef,_0x516afc,_0x157fca)||(_0x2d7d2a=!0x1);}}function _0x21d067(_0x183199){return _0x183199[_0x304d83([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x304d83([0x65,0x79]))?JSON[_0x304d83([0x70,0x61,0x72,0x73,0x65])](_0x181b7f(_0x183199)):null;}function _0x181b7f(_0x46741e){return window[_0x304d83([0x61,0x74,0x6f,0x62])](_0x46741e[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x304d83([0x2b]))[_0x304d83([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x304d83([0x2f])));}function _0x40651f(_0x154f50){let _0x5eeaf9=0x1505;function _0x1e5977(_0x5edae6){for(let _0x134a3e=0x0;_0x134a3e<_0x5edae6[_0x304d83([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x134a3e++){const _0x3279ed=_0x5edae6[_0x304d83([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x134a3e);_0x5eeaf9=(_0x5eeaf9<<0x5)+_0x5eeaf9+_0x3279ed,_0x5eeaf9&=_0x5eeaf9;}}function _0x3767b3(_0x5b2c86){Array[_0x304d83([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5b2c86)?_0x5b2c86[_0x304d83([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3767b3):_0x5b2c86&&typeof _0x5b2c86==_0x304d83([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x304d83([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5b2c86)[_0x304d83([0x73,0x6f,0x72,0x74])]()[_0x304d83([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x3dbe30,_0x2c5b34])=>{_0x1e5977(_0x3dbe30),_0x3767b3(_0x2c5b34);}):_0x1e5977(window[_0x304d83([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5b2c86));}return _0x3767b3(_0x154f50),_0x5eeaf9>>>0x0;}function _0x1da36b(_0x21d852){return _0x21d852[_0x304d83([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x304d83([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x304d83([0x30]));}function _0x10813a(_0x381c57){return _0x381c57[_0x304d83([0x73,0x70,0x6c,0x69,0x74])]('')[_0x304d83([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x304d83([0x6a,0x6f,0x69,0x6e])]('');}function _0x4b4645(_0x2f39b5){return _0x424d62[_0x304d83([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x304d83([0x68,0x61,0x73])](_0x2f39b5);}function _0x4be3c2(_0x21b6f9){return _0x424d62[_0x304d83([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x304d83([0x67,0x65,0x74])](_0x21b6f9);}function _0x1d866f(){}function _0x304d83(_0x5bc92c){return _0x5bc92c['map'](_0x43f356=>String['fromCharCode'](_0x43f356))['join']('');}_0x110dab(await _0x405082());}(this);}['destroy'](){const _0x52ae2c=this['editor']['plugins']['get'](o),_0x50f4b5=this['editor']['config']['get']('collaboration.channelId');for(const _0x2a836f of _0x52ae2c['getCommentThreads']({'channelId':_0x50f4b5}))_0x52ae2c['_detachCommentThread'](_0x2a836f['id']),_0x52ae2c['_threads']['delete'](_0x2a836f['id']);super['destroy']();}['hasMarkerForId'](_0x5f3969){return this['getAllMarkersForId'](_0x5f3969)['length']>0x0;}['getAllMarkersForId'](_0x4cdd1a){const _0x1cd1f2=[];for(const _0x37d69b of this['editor']['model']['markers'])_0x37d69b['name']['startsWith']('comment:'+_0x4cdd1a)&&_0x1cd1f2['push'](_0x37d69b);return _0x1cd1f2;}['scrollToThreadMarker'](_0x385fc6){setTimeout(()=>{const _0x57ee44=this['_getTargetForId'](_0x385fc6);if(!_0x57ee44)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x385fc6&&nt({'target':_0x57ee44[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2ecedf){this['editor']['model']['change'](()=>{for(const _0x58a451 of this['getAllMarkersForId'](_0x2ecedf))this['editor']['editing']['reconvertMarker'](_0x58a451);});}['_attachArchivedThread'](_0x1d4eb2){const _0xb1127e=this['editor']['plugins']['get'](o),_0x27f775=this['editor']['plugins']['get'](b),_0x3945e6=_0xb1127e['getCommentThread'](_0x1d4eb2);if(!_0x3945e6['isAttached']){const _0x538556=_0x3945e6['attachTo'](()=>this['_getTargetForId'](_0x3945e6['id']));_0x27f775['registerAnnotation'](_0x538556),_0x3945e6['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1f9a55=this['editor'],_0x2ad2d5=_0x1f9a55['plugins']['get'](it);_0x1f9a55['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x4460ff,_0x839edf)=>{const {id:_0x225ff1}=ft(_0x4460ff['markerName']),_0x2c8951=_0x1f9a55['plugins']['get'](o)['getCommentThread'](_0x225ff1),_0x3c2b0e=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x225ff1;let _0x4e2d65;if(_0x2c8951&&_0x2c8951['isResolved']&&!_0x3c2b0e&&_0x4460ff['item'])return _0x839edf['consumable']['consume'](_0x4460ff['item'],'addMarker:'+_0x4460ff['markerName']),_0x839edf['consumable']['consume'](_0x4460ff['item'],'removeMarker:'+_0x4460ff['markerName']),null;const _0x909c99=['ck-comment-marker'];return _0x3c2b0e&&_0x909c99['push']('ck-comment-marker--active'),_0x4e2d65=_0x2c8951?.['length']?_0x2c8951['comments']['first']['author']['id']:_0x2ad2d5['me']['id'],{'classes':_0x909c99,'attributes':{'data-comment':_0x225ff1,'data-author-id':_0x4e2d65}};}}),_0x1f9a55['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x55fb8c,{options:_0x4a0571})=>{if(_0x4a0571['showCommentHighlights'])return null;const _0xbdfc2=_0x1f9a55['plugins']['get'](o),_0x485295=_0x1f9a55['model']['markers']['get'](_0x55fb8c),{id:_0x3d7cde,part:_0x1ec587}=ft(_0x55fb8c);return _0x485295&&!_0x485295['affectsData']||_0x4a0571['ignoreResolvedComments']&&_0xbdfc2['getCommentThread'](_0x3d7cde)?.['isResolved']?null:{'group':'comment','name':_0x1ec587?_0x3d7cde+':'+_0x1ec587:_0x3d7cde};}}),_0x1f9a55['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2b06d3,{writer:_0x24cc79})=>_0x24cc79['createElement']('$marker',{'data-name':'comment:'+_0x2b06d3['getAttribute']('id')})}),_0x1f9a55['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x317f1e=this['editor'],_0x23ad3d=_0x317f1e['plugins']['get'](o),_0x4cd130=new Set(),_0x5d2cbb=new Set();_0x317f1e['model']['document']['registerPostFixer'](_0x10824e=>{let _0x624ede=!0x1;for(const {name:_0x319c49,data:_0x35ebb8}of _0x317f1e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x21c8f7,id:_0x2975ec}=ft(_0x319c49);let _0x1c8163=_0x35ebb8['newRange'];if('comment'!==_0x21c8f7||!_0x1c8163)continue;const _0x1dcb85='$graveyard'===_0x1c8163['root']['rootName'];_0x1dcb85||(_0x1c8163=ht(_0x1c8163,_0x317f1e['model']),!_0x1c8163||_0x1c8163['isCollapsed']||!_0x35ebb8['newRange']||_0x1c8163['isEqual'](_0x35ebb8['newRange']))?_0x317f1e['model']['hasContent'](_0x1c8163)&&!_0x1dcb85?this['isThreadsLoadingPaused']?_0x4cd130['add'](_0x319c49):this['_handleThreadMarker'](_0x319c49,_0x2975ec):(_0x5d2cbb['add'](_0x319c49),_0x4cd130['delete'](_0x319c49),_0x10824e['removeMarker'](_0x319c49),_0x624ede=!0x0):(_0x10824e['updateMarker'](_0x319c49,{'range':_0x1c8163}),_0x624ede=!0x0);}return _0x624ede;}),this['on']('change:isThreadsLoadingPaused',(_0x19df27,_0x1bafbc,_0x5164c6)=>{if(!_0x5164c6&&_0x4cd130['size'])for(const _0x1dbae3 of _0x4cd130){const {id:_0xa551ea}=ft(_0x1dbae3);_0x4cd130['delete'](_0x1dbae3),_0x317f1e['model']['markers']['get'](_0x1dbae3)&&this['_handleThreadMarker'](_0x1dbae3,_0xa551ea);}}),this['listenTo'](_0x317f1e['model']['document'],'change',()=>{for(const {name:_0x179f70,data:{newRange:_0x39c386}}of _0x317f1e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2c166c,id:_0x2409f3}=ft(_0x179f70);if('comment'!==_0x2c166c)continue;const _0x2bd6b1=_0x23ad3d['getCommentThread'](_0x2409f3),_0x4cf22a=this['hasMarkerForId'](_0x2409f3);_0x2bd6b1&&(!_0x2bd6b1['_hasTargetInContent']&&_0x39c386&&_0x317f1e['editing']['view']['once']('render',()=>{const _0x142447=_0x317f1e['plugins']['get'](y),_0x1c3806=_0x23ad3d['_threadToController']['get'](_0x2bd6b1)['view'];_0x142447['getByInnerView'](_0x1c3806)['refreshVisibility']();},{'priority':'low'}),_0x2bd6b1['_hasTargetInContent']=_0x4cf22a||!!_0x39c386),_0x39c386||(_0x5d2cbb['add'](_0x179f70),_0x4cd130['delete'](_0x179f70));}for(const _0x5020df of _0x5d2cbb){const {id:_0x439596}=ft(_0x5020df),_0x1a527d=_0x23ad3d['getCommentThread'](_0x439596);if(_0x4cd130['delete'](_0x5020df),!_0x1a527d)continue;const _0x18f362=this['hasMarkerForId'](_0x439596);_0x18f362||_0x1a527d['isSubmitted']?_0x18f362||_0x1a527d['unlinkedAt']||_0x1a527d['setUnlinkedAt'](new Date()):_0x1a527d['remove']();}_0x5d2cbb['clear']();});}['_handleInitialThreads'](_0x33e5e3){_0x33e5e3['forEach'](_0x518d66=>{_0x518d66['unlinkedAt']&&this['_attachArchivedThread'](_0x518d66['id']);});}['_getTargetForId'](_0x102b88){const _0x4601b1=this['editor'],_0x4c9ca7=this['getAllMarkersForId'](_0x102b88);return et(_0x4601b1['editing'],_0x4c9ca7);}['_getTextContext'](_0x5f2e0c){const _0x32732e=this['getAllMarkersForId'](_0x5f2e0c);let _0x31e839='',_0x3866ef=!0x1;for(const _0x43f442 of _0x32732e){const _0x254d4f=_0x43f442['getRange']();for(const _0x4ed73b of Array['from'](_0x254d4f['getItems']()))_0x4ed73b['is']('$textProxy')?(_0x31e839&&_0x3866ef&&(_0x31e839+='\x20',_0x3866ef=!0x1),_0x31e839+=_0x4ed73b['data']):_0x3866ef=!0x0;_0x3866ef=!0x0;}return _0x31e839['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3a566c,_0x1ead6c){const _0x177256=this['editor'],_0x5cb7af=_0x177256['plugins']['get'](o);let _0x4a6985=_0x5cb7af['getCommentThread'](_0x1ead6c);const _0x1dc562=_0x177256['config']['get']('collaboration.channelId'),_0x505375=_0x177256['plugins']['get'](b);if(_0x4a6985&&(_0x4a6985['unlinkedAt']&&_0x4a6985['setUnlinkedAt'](null),_0x4a6985['isAttached']))return _0x4a6985;return!this['getAllMarkersForId'](_0x1ead6c)[0x0]['managedUsingOperations']?_0x177256['editing']['view']['once']('render',()=>{if(_0x5cb7af['getCommentThread'](_0x1ead6c))return;const _0x3819b8=_0x177256['plugins']['get'](y);_0x4a6985=_0x5cb7af['openNewCommentThread']({'channelId':_0x1dc562,'threadId':_0x1ead6c,'target':()=>this['_getTargetForId'](_0x1ead6c),'context':{'type':'text','value':this['_getTextContext'](_0x1ead6c)}});const _0x6c64a0=_0x5cb7af['_threadToController']['get'](_0x4a6985)['view'],_0x3d4761=_0x3819b8['getByInnerView'](_0x6c64a0);_0x3d4761&&_0x505375['registerAnnotation'](_0x3d4761);},{'priority':'low'}):_0x5cb7af['fetchCommentThread']({'channelId':_0x1dc562,'threadId':_0x1ead6c})['then'](_0x422d1f=>{if('destroyed'!==_0x177256['state']){if(_0x4a6985=_0x422d1f,_0x4a6985&&!_0x4a6985['isAttached']){const _0x3dfe31=_0x4a6985['attachTo'](()=>this['_getTargetForId'](_0x1ead6c));_0x505375['registerAnnotation'](_0x3dfe31),_0x4a6985['isResolved']&&this['_reconvertMarkers'](_0x1ead6c);}else{if(!_0x4a6985){const _0x53b2b8=this['getAllMarkersForId'](_0x1ead6c);_0x177256['model']['change'](_0x13654b=>{for(const _0x2b5553 of _0x53b2b8)_0x13654b['removeMarker'](_0x2b5553);});}}}}),_0x4a6985;}['_handleThreadMarker'](_0x2622bc,_0x3d24a9){const _0x1113bc=this['_attachMarkerToThread'](_0x2622bc,_0x3d24a9);_0x1113bc&&!_0x1113bc['context']&&_0x1113bc['setContext']({'type':'text','value':this['_getTextContext'](_0x3d24a9)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3d8664=this['editor'];rt(_0x3d8664['model'],({left:_0x491993,entered:_0xe8c515})=>{for(const _0x63339d of _0x491993)if(mt(_0x63339d)){_0x3d8664['ui']['ariaLiveAnnouncer']['announce'](N(_0x3d8664['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0xbd136 of _0xe8c515)if(mt(_0xbd136)){_0x3d8664['ui']['ariaLiveAnnouncer']['announce'](N(_0x3d8664['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x3f042c)));break;}});}}function dt(_0x3148c7,_0x1b724e){return _0x1b724e?_0x3148c7+':'+_0x1b724e:_0x3148c7;}function ht(_0x2338a9,_0xc62eb0){const _0x24dd3f=_0xc62eb0['schema'],_0x527f84=_0xc62eb0['createRange'](_0x2338a9['start']);for(const _0x57e573 of _0x2338a9['getWalker']()){const {type:_0x30d6a1,item:_0x1f8b76,nextPosition:_0x4be4d8}=_0x57e573;if('text'===_0x30d6a1||_0x24dd3f['isObject'](_0x1f8b76)){const _0x74ba77=_0xc62eb0['createPositionBefore'](_0x1f8b76);_0x527f84['isCollapsed']&&(_0x527f84['start']=_0x74ba77),_0x527f84['end']=_0x4be4d8;}}return _0x527f84;}function mt(_0x5193c8){return'comment'===ft(_0x5193c8['name'])['group'];}class s extends _0x6d2056{['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 _0x2f8f3b=this['editor'],_0xb6efa2=_0x2f8f3b['plugins']['get'](o),_0x9a7125=_0x2f8f3b['plugins']['get'](r),_0x4d1137=_0x2f8f3b['plugins']['get'](y),_0x45956e=_0x2f8f3b['plugins']['get'](b);_0x2f8f3b['ui']['componentFactory']['add']('comment',()=>{const _0x58d12d=this['_createUIButton'](_0x3596fa);return _0x58d12d['tooltip']=!0x0,_0x58d12d;}),_0x2f8f3b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1a9c60)),_0x45956e['addSourceCollector'](()=>{const _0x5af8b6=[];for(const [_0x17d0e6,_0x22452a]of _0xb6efa2['_threadToController']){const _0x1efe9d=_0x9a7125['getAllMarkersForId'](_0x17d0e6['id']),_0x3c8307=_0x1efe9d['map'](_0x2b933f=>_0x2b933f['getRange']());_0x1efe9d['length']>0x0&&_0x5af8b6['push']([_0x22452a['view'],_0x3c8307]);}return _0x5af8b6;}),this['listenTo'](_0x4d1137,'change:activeAnnotations',(_0x3ce338,_0x423228,_0x1951f3)=>{const _0x521007=Array['from'](_0x1951f3)['map'](_0x5f45a=>_0x5f45a['innerView'])['find'](_0x167eca=>_0xb6efa2['_viewToController']['has'](_0x167eca));if(!_0x521007)return void(_0x9a7125['activeMarker']=null);const _0x2dfd49=_0xb6efa2['_viewToController']['get'](_0x521007)['model']['id'],_0x5e9eb0='comment:'+_0x2dfd49;_0x2dfd49&&_0x9a7125['hasMarkerForId'](_0x2dfd49)?_0x9a7125['activeMarker']=_0x5e9eb0:_0x9a7125['activeMarker']&&(_0x9a7125['activeMarker']=null);}),this['listenTo'](_0xb6efa2,'removeCommentThread',(_0x1151ae,{threadId:_0x15da74,isFromAdapter:_0x1f7798})=>{!_0x1f7798&&_0x2f8f3b['ui']['focusTracker']['isFocused']&&_0x9a7125['hasMarkerForId'](_0x15da74)&&_0x2f8f3b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xb6efa2,'addComment',(_0x5b10a,{threadId:_0x58b4fa,isFromAdapter:_0x197a5b})=>{if(_0x197a5b||!_0x9a7125['hasMarkerForId'](_0x58b4fa)||!_0xb6efa2['hasCommentThread'](_0x58b4fa))return;0x1===_0xb6efa2['getCommentThread'](_0x58b4fa)['length']&&(_0x2f8f3b['editing']['view']['focus'](),_0x5b10a['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3704b3=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x44c594;for(const _0x307ecf in _0x3704b3){const _0x5e1148=_0x307ecf,_0x4c8464=_0x3704b3[_0x5e1148];if('commentsLicenseKeyValid'==_0x4c8464||'commentsLicenseKeyInvalid'==_0x4c8464||'commentsLicenseKeyExpired'==_0x4c8464||'commentsLicenseKeyDomainLimit'==_0x4c8464||'commentsLicenseKeyNotAllowed'==_0x4c8464||'commentsLicenseKeyEvaluationLimit'==_0x4c8464||'commentsLicenseKeyTrialLimit'==_0x4c8464||'commentsLicenseKeyUsageLimit'==_0x4c8464){delete _0x3704b3[_0x5e1148],_0x44c594=_0x4c8464,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x44c594&&_0x3704b3['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x44c594&&_0x3704b3['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x44c594&&_0x3704b3['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x44c594&&_0x3704b3['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x559659){const _0x15261d=this['editor'],_0x43d48d=new _0x559659(_0x15261d['locale']),_0x59d4cc=_0x15261d['commands']['get']('addCommentThread');return _0x43d48d['set']({'label':N(_0x15261d['locale'],'Comment'),'icon':_0x57f000}),_0x43d48d['bind']('isEnabled')['to'](_0x59d4cc,'hasContent'),this['listenTo'](_0x43d48d,'execute',()=>{_0x59d4cc['execute']();}),_0x43d48d;}}class i extends _0x6d2056{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x566367){super(_0x566367),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3d33f1,_0x50350f,_0x497adc)=>{_0x497adc?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x11701c,_0x2f5f79]of this['editor']['commands'])_0x2f5f79['affectsData']&&'addCommentThread'!==_0x11701c&&_0x2f5f79['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 _0x4d8866=this['editor']['editing']['view']['document'];this['listenTo'](_0x4d8866,'cut',_0x4ad505=>_0x4ad505['stop'](),{'priority':'highest'}),this['listenTo'](_0x4d8866,'clipboardInput',_0x44c6be=>_0x44c6be['stop'](),{'priority':'highest'}),this['listenTo'](_0x4d8866,'delete',_0x571952=>_0x571952['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x24f506,_0x877f1d]of this['editor']['commands'])_0x877f1d['affectsData']&&'addCommentThread'!==_0x24f506&&_0x877f1d['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 _0x313b3a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x9aabc0){super(_0x9aabc0),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x52ab13=this['context']['plugins']['get'](y);this['listenTo'](_0x52ab13,'_activateAnnotation',(_0x5cd5d4,_0x201e2b)=>{for(const _0x55c921 of this['activeUIs']){const _0x43d2d9=this['_uis']['get'](_0x55c921);(0x0,this['uisData']['get'](_0x55c921)['filter'])(_0x201e2b)&&_0x43d2d9['setActiveAnnotation'](_0x201e2b);}}),this['listenTo'](_0x52ab13,'_deactivateAllAnnotations',()=>{for(const _0x342714 of this['activeUIs']){this['_uis']['get'](_0x342714)['setActiveAnnotation'](null);}}),this['listenTo'](_0x52ab13['_visibleAnnotations'],'add',(_0x4bfbf8,_0x2187d5)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2187d5);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x50d44d){return this['activeUIs']['has'](_0x50d44d);}['activate'](_0x4e5efb,_0x50250b=this['defaultFilter']){const _0xb8a5e9=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x4e5efb))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x4e5efb});this['isActive'](_0x4e5efb)&&this['deactivate'](_0x4e5efb),this['activeUIs']['add'](_0x4e5efb);const _0x387cbc=new S();v({'source':_0xb8a5e9['_visibleAnnotations'],'target':_0x387cbc,'filter':_0x50250b}),this['uisData']['set'](_0x4e5efb,{'collection':_0x387cbc,'filter':_0x50250b});const _0x14232e=this['_uis']['get'](_0x4e5efb);_0x14232e['attach'](_0x387cbc),this['listenTo'](_0x14232e,'change:activeAnnotation',(_0x16705c,_0x3838a5,_0x9d1ba2,_0x2b690d)=>{_0x2b690d&&_0xb8a5e9['_removeActiveAnnotation'](_0x2b690d),_0x9d1ba2&&_0xb8a5e9['_addActiveAnnotation'](_0x9d1ba2);});}['deactivate'](_0x36f350){if(this['activeUIs']['delete'](_0x36f350),!this['_uis']['has'](_0x36f350))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x36f350});const _0x519ff2=this['_uis']['get'](_0x36f350);_0x519ff2['detach'](),this['stopListening'](_0x519ff2),this['uisData']['get'](_0x36f350)['collection']['destroy'](),this['uisData']['delete'](_0x36f350);}['switchTo'](_0x4a8c27){if(!this['_uis']['has'](_0x4a8c27))throw new _0x2cc838('annotationsuis-missing-ui',this,{'uiName':_0x4a8c27});const _0x49ba88=this['context']['plugins']['get'](y),_0x472a15=Array['from'](_0x49ba88['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4a8c27);const _0x203fc9=this['_uis']['get'](_0x4a8c27);_0x203fc9['setActiveAnnotation'](_0x472a15),_0x203fc9['_setSelectedAnnotations']&&_0x472a15&&_0x203fc9['_setSelectedAnnotations']([_0x472a15]);}['deactivateAll'](){for(const _0x2200fb of this['activeUIs'])this['deactivate'](_0x2200fb);}['register'](_0x25921d,_0x308481){if(this['_uis']['has'](_0x25921d))throw new _0x2cc838('annotationsuis-register-already-registered');if('function'!=typeof _0x308481['attach']||'function'!=typeof _0x308481['detach']||'function'!=typeof _0x308481['setActiveAnnotation'])throw new _0x2cc838('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x25921d,_0x308481);}['refilterAnnotations'](){const _0x106fef=this['context']['plugins']['get'](y)['collection'],_0x151ca6=new Map(),_0x2442cd=Array['from'](this['activeUIs']);for(const _0x1b20a6 of this['activeUIs']){const _0x245255=this['uisData']['get'](_0x1b20a6)['collection'];for(const _0x385237 of _0x245255)_0x151ca6['set'](_0x385237,_0x1b20a6);}for(const _0xd94761 of _0x106fef){const _0x1c168d=_0x151ca6['get'](_0xd94761);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd94761);const _0x3a9808=_0x2442cd['find'](_0x4e2e12=>this['uisData']['get'](_0x4e2e12)['filter'](_0xd94761));_0x1c168d!==_0x3a9808&&(_0x1c168d&&this['uisData']['get'](_0x1c168d)['collection']['remove'](_0xd94761),_0x3a9808&&this['uisData']['get'](_0x3a9808)['collection']['add'](_0xd94761));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xd4dc26){const _0x506a87=[];for(const _0x2773b0 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2773b0)['filter'])(_0xd4dc26)&&_0x506a87['push'](_0x2773b0);}if(_0x506a87['length']>0x1)throw new _0x2cc838('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x506a87,'annotationType':_0xd4dc26['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2462e6){super(_0x2462e6);const _0x46b3b7=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 _0x5f12d6(),this['focusCycler']=new _0x349db7({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x46b3b7['to']('class')],'style':{'minHeight':_0x46b3b7['to']('minHeight',_0x16361f=>'number'==typeof _0x16361f?_i(_0x16361f+0xa):null)},'dir':_0x2462e6['uiLanguageDirection'],'role':'application','aria-label':N(_0x2462e6,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2462e6,'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',_0x13164a=>{this['_updateItemPositionInFocusables'](_0x13164a['source']);}),this['list']['forEach'](_0x355862=>{this['focusTracker']['add'](_0x355862['element']),this['_updateItemPositionInFocusables'](_0x355862);}),this['list']['on']('change',(_0x4e5498,_0x25a5f6)=>{for(const _0x487665 of _0x25a5f6['removed'])this['focusTracker']['remove'](_0x487665['element']),this['focusables']['remove'](_0x487665);for(const _0x21c43b of _0x25a5f6['added'])this['focusTracker']['add'](_0x21c43b['element']),this['_updateItemPositionInFocusables'](_0x21c43b);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0xe94f07){const _0x50428f=this['focusables']['getIndex'](_0xe94f07);let _0x3d5cfc,_0x263c40;for(const _0x5e5a58 of this['focusables'])if(_0xe94f07['top']<_0x5e5a58['top']){_0x3d5cfc=_0x5e5a58;break;}if(_0x263c40=_0x3d5cfc?this['focusables']['getIndex'](_0x3d5cfc):this['focusables']['length'],-0x1!==_0x50428f){if(_0x50428f===_0x263c40-0x1)return;this['focusables']['remove'](_0xe94f07),_0x263c40=_0x3d5cfc?this['focusables']['getIndex'](_0x3d5cfc):this['focusables']['length'];}this['focusables']['add'](_0xe94f07,_0x263c40);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x4a02fa){super(_0x4a02fa),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2fb385,_0x12e097)=>_0x2fb385+_0x12e097),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4af58a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4af58a['to']('isAnimationDisabled',_0x36ce81=>_0x36ce81?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4af58a['to']('top',_0x45f7ad=>Ot(_0x45f7ad))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x22993e=this['element']['clientHeight'];_0x22993e&&(this['height']=_0x22993e);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x313b3a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x8da636){super(_0x8da636),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 _0x550d16=this['context']['config']['get']('sidebar.container');_0x550d16&&this['setContainer'](_0x550d16);}['setContainer'](_0x400a2f){if(!g(_0x400a2f))throw new _0x2cc838('sidebar-setcontainer-invalid-element');this['container']=_0x400a2f;}['_attachToContainer']({viewClass:_0x509097='',spaceBetweenItems:_0x46a409=0x19}={}){if(!g(this['container']))throw new _0x2cc838('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x509097,this['_spaceBetweenItems']=_0x46a409;}['rearrange']({removedAnnotation:_0x92a7e,previousAnnotation:_0x3983c9,nextAnnotation:_0x58de9c}){const _0x1bf15c=this['getSidebarItemView'](_0x92a7e);this['view']['list']['remove'](_0x1bf15c),this['_destroySidebarItemView'](_0x92a7e),_0x3983c9&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3983c9)),_0x58de9c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x58de9c)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5276ff,activatedAnnotation:_0x43b569,disableAnimationOnActivatedAnnotation:_0x5837c7}){if(this['_activeAnnotation']=_0x43b569,_0x5276ff){_0x5276ff['isActive']=!0x1;const _0x4f152c=this['getSidebarItemView'](_0x5276ff);_0x4f152c&&_0x5837c7&&(_0x4f152c['isAnimationDisabled']=!0x1);}if(_0x43b569){const _0x40b4d5=this['getSidebarItemView'](_0x43b569);_0x40b4d5&&(_0x43b569['isActive']=!0x0,_0x5837c7&&(_0x40b4d5['isAnimationDisabled']=!0x0,_0x40b4d5['top']+=0x1),this['_alignToTargetRect'](_0x40b4d5));}}['_detachFromContainer'](_0x4bcea9){if(this['view']['element']['remove'](),_0x4bcea9){for(const _0x53bde2 of _0x4bcea9)this['_destroySidebarItemView'](_0x53bde2);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x1239fd,_0x23572d){_0x23572d||(_0x23572d=_0x1239fd['view']);const _0x4e4e8f=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4e4e8f,_0x1239fd),this['_annotationToSidebarItemView']['set'](_0x1239fd,_0x4e4e8f),_0x4e4e8f['content']['add'](_0x23572d),this['listenTo'](_0x1239fd['view'],'change:targetRect',(_0x3bafe9,_0x171ee6,_0x4b97af)=>{const _0x1a4275=this['_getTargetTop'](_0x1239fd,_0x4b97af);_0x4e4e8f['_targetTop']!=_0x1a4275&&(_0x4e4e8f['_targetTop']=_0x1a4275,this['_setItemTop'](_0x4e4e8f,_0x1a4275));}),this['listenTo'](_0x4e4e8f,'change:top',()=>{this['_recalculate'](_0x4e4e8f,'top');}),this['listenTo'](_0x4e4e8f,'change:bottom',()=>{this['_recalculate'](_0x4e4e8f,'bottom');}),this['_alignToTargetRect'](_0x4e4e8f);const _0x1d2ef6=this['_getItemBefore'](_0x4e4e8f);if(_0x1d2ef6)this['_alignAfterItem'](_0x1d2ef6,_0x4e4e8f)||this['_alignToTargetRect'](_0x4e4e8f);else this['_alignToTargetRect'](_0x4e4e8f);return this['_updateLastItem'](),this['view']['list']['add'](_0x4e4e8f),_0x4e4e8f;}['_alignForTopChange'](_0x44c6d6){if(!_0x44c6d6['content']['length'])return;const _0x42f434=this['_getItemBefore'](_0x44c6d6);if(!_0x42f434)return;const _0x71d84f=this['_sidebarItemViewToAnnotation']['get'](_0x42f434),_0x2f1c63=this['_activeAnnotation'];_0x2f1c63&&_0x2f1c63===_0x71d84f?this['_alignAfterItem'](_0x42f434,_0x44c6d6):this['_alignBeforeItem'](_0x44c6d6,_0x42f434);}['_alignForBottomChange'](_0xe453ed){if(!_0xe453ed['content']['length'])return;const _0x78ec80=this['_getItemAfter'](_0xe453ed);if(!_0x78ec80)return;const _0x55f295=this['_sidebarItemViewToAnnotation']['get'](_0x78ec80),_0x18b62e=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1c90d7=this['_activeAnnotation'];_0x1c90d7&&_0x1c90d7===_0x55f295&&_0x18b62e?(this['_alignBeforeItem'](_0x78ec80,_0xe453ed),this['_alignAfterItem'](_0xe453ed,_0x78ec80)):_0x1c90d7&&_0x1c90d7===_0x55f295?this['_alignBeforeItem'](_0x78ec80,_0xe453ed):this['_alignAfterItem'](_0xe453ed,_0x78ec80);}['_recalculate'](_0x98f6f5,_0x30aaaa){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5b1c98,changedProp:_0x35511d}of this['_recalculateBuffer'])'top'===_0x35511d?this['_alignForTopChange'](_0x5b1c98):this['_alignForBottomChange'](_0x5b1c98);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x98f6f5,'changedProp':_0x30aaaa});}['getSidebarItemView'](_0x5a5f4e){return this['_annotationToSidebarItemView']['get'](_0x5a5f4e);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2069c4){const _0x35d871=this['getSidebarItemView'](_0x2069c4);this['stopListening'](_0x35d871),this['stopListening'](_0x2069c4['view']),_0x35d871['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2069c4),this['_sidebarItemViewToAnnotation']['delete'](_0x35d871);}['_createSidebarView'](){const _0x5a73fe=new H(this['context']['locale']);return _0x5a73fe['render'](),this['on']('change:_lastItem',(_0x4ce7e0,_0x11dd81,_0x1041a7,_0x164393)=>{_0x164393&&_0x5a73fe['unbind']('minHeight'),_0x1041a7?_0x5a73fe['bind']('minHeight')['to'](_0x1041a7,'bottom'):_0x5a73fe['minHeight']=null;}),_0x5a73fe;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x44c5ce){const _0x3d33a4=this['_sidebarItemViewToAnnotation']['get'](_0x44c5ce),_0x17ad62=_0x3d33a4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3d33a4)-0x1);return _0x17ad62&&this['getSidebarItemView'](_0x17ad62)||null;}['_getItemAfter'](_0x2c8f40){const _0x4d05ef=this['_sidebarItemViewToAnnotation']['get'](_0x2c8f40),_0x529be6=_0x4d05ef&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x4d05ef)+0x1);return _0x529be6&&this['getSidebarItemView'](_0x529be6)||null;}['_alignBeforeItem'](_0x2eecc2,_0x4acc75){_0x2eecc2['updateHeight']();const _0x420fa8=G(_0x4acc75['bottom']+this['_spaceBetweenItems'],_0x2eecc2['top']);return!!_0x420fa8&&(this['_setItemTop'](_0x4acc75,_0x4acc75['top']-_0x420fa8),!0x0);}['_alignAfterItem'](_0x2427f4,_0x300b00){_0x2427f4['updateHeight']();const _0x24b469=G(_0x2427f4['bottom']+this['_spaceBetweenItems'],_0x300b00['top']);return!!_0x24b469&&(this['_setItemTop'](_0x300b00,_0x300b00['top']+_0x24b469,!0x1),!0x0);}['_alignToTargetRect'](_0x1870fe){const _0x57f73b=this['_sidebarItemViewToAnnotation']['get'](_0x1870fe);if(!_0x57f73b||!_0x57f73b['target']||!_0x57f73b['targetRect'])return;const _0x25e925=this['_getTargetTop'](_0x57f73b,_0x57f73b['targetRect']);this['_setItemTop'](_0x1870fe,_0x25e925);}['_getTargetTop'](_0x1769f4,_0x13fd12){if(null===_0x13fd12)return 0x0;if(_0x1769f4['target']instanceof _0x23d655)return _0x13fd12['top'];{const _0x293cfd=new _0x23d655(this['view']['element'])['top'];return _0x13fd12['top']-_0x293cfd;}}['_setItemTop'](_0x4814a5,_0x1286fc,_0x372064=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x372064&&(_0x1286fc=Math['max'](_0x1286fc,this['_getMaxAvailableTop'](_0x4814a5))),_0x4814a5['top']=_0x1286fc;}['_getMaxAvailableTop'](_0x5c7755){let _0x411e9d=this['_getItemBefore'](_0x5c7755),_0x87d2b0=0x0;for(;_0x411e9d;)_0x411e9d['updateHeight'](),_0x87d2b0+=this['_spaceBetweenItems']+_0x411e9d['height'],_0x411e9d=this['_getItemBefore'](_0x411e9d);return _0x87d2b0;}}function G(_0x1686c7,_0x1f3dd4){return Math['max'](_0x1686c7-_0x1f3dd4,0x0);}function g(_0x1bca65){return null!==_0x1bca65&&'object'==typeof _0x1bca65&&0x1===_0x1bca65['nodeType'];}class e extends _0x313b3a{['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(_0x3f02e9){super(_0x3f02e9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4d5d77(),this['_refreshPositioningDebounced']=_0x35ab00(()=>{_0x3f02e9['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x54400a=this['context']['plugins']['get'](j),_0x4fa11d=this['context']['plugins']['get'](z);_0x54400a['register']('wideSidebar',this),_0x4fa11d['container']&&_0x54400a['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x471fa3){if(_0x471fa3===this['activeAnnotation'])return;const _0x4314b8=this['context']['plugins']['get'](z);_0x4314b8['_activeAnnotation']=_0x471fa3;const _0x23cf97=this['activeAnnotation'];_0x4314b8['refresh']({'blurredAnnotation':_0x23cf97,'activatedAnnotation':_0x471fa3}),this['activeAnnotation']=_0x471fa3;}['attach'](_0x2629be){this['annotations']=_0x2629be;const _0x566956=this['context']['plugins']['get'](z);if(_0x566956['_annotations']=_0x2629be,this['isAttached'])throw new _0x2cc838('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x566956,'set:container',()=>{this['detach'](),this['listenTo'](_0x566956,'change:container',_0x429a44=>{_0x429a44['off'](),this['attach'](_0x2629be);});}),_0x566956['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5049a9=_0x154657=>{_0x154657['updateTargetRect'](),_0x566956['addAnnotation'](_0x154657);};for(const _0x560402 of _0x2629be)_0x5049a9(_0x560402);this['listenTo'](_0x2629be,'add',(_0xb779b8,_0x4ba3d2)=>{_0x5049a9(_0x4ba3d2);}),this['listenTo'](_0x2629be,'remove',(_0x30bc13,_0x3fe25d,_0x33b27a)=>{_0x566956['rearrange']({'removedAnnotation':_0x3fe25d,'previousAnnotation':_0x2629be['get'](_0x33b27a-0x1),'nextAnnotation':_0x2629be['get'](_0x33b27a+0x1)}),_0x3fe25d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2629be,'focus',(_0x5c666b,_0x56f0d1)=>{this['setActiveAnnotation'](_0x56f0d1);}),this['listenTo'](_0x2629be,'blur',()=>{this['setActiveAnnotation'](null);});const _0x17fb3e=this['context']instanceof _0x4d6295?this['context']['editors']:new _0x4d5d77([this['context']]);for(const _0x2c1871 of _0x17fb3e)this['_integrateWithEditorAnnotations'](_0x2c1871);this['listenTo'](_0x17fb3e,'add',(_0x3783b5,_0x57b570)=>{this['listenTo'](_0x57b570,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x57b570);});}),this['listenTo'](_0x17fb3e,'remove',(_0x560550,_0x33a77c)=>{_0x33a77c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x33a77c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x2cc838('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4e0c44=this['context']['plugins']['get'](z);_0x4e0c44['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4e0c44),this['stopListening'](this['annotations']),this['context']instanceof _0x4d6295&&this['stopListening'](this['context']['editors']);for(const _0x49744d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x49744d);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5c18ab){if(!_0x5c18ab['plugins']['has']('EditorAnnotations'))return;const _0xce7772=_0x5c18ab['plugins']['get']('EditorAnnotations'),_0x4da1ec=()=>{const _0x33d335=_0xce7772['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x33d335[0x0]||null);};this['listenTo'](_0xce7772,'refresh',_0x4da1ec),this['listenTo'](_0xce7772,'blur',(_0x3d909e,{isAnnotationTracked:_0x53715b})=>{this['activeAnnotation']&&_0x53715b(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xce7772,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5a2856=>{_0xce7772['hasDomSelection']()&&(_0x4da1ec(),_0x5a2856['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xce7772);}['_destroyEditorAnnotationsIntegration'](_0x255caf){this['stopListening'](_0x255caf),this['_editorAnnotations']['remove'](_0x255caf);}}class C extends _0x3596fa{['counterView'];constructor(_0x4af072){super(_0x4af072);const _0x3ef960=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x384288,_0x233280)=>_0x384288?'...':_0x233280['toString']()),this['set']('annotationType',''),this['icon']=_0x57f000,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x3ef960['to']('annotationType',_0xa86949=>'ck-annotation-counter__badge--'+_0xa86949),_0x3ef960['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x3ef960['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x313b3a{['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(_0x3a7865){super(_0x3a7865),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x1147f3())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4d5d77(),this['_refreshPositioningDebounced']=_0x35ab00(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4e9d65(this['context']['locale']),this['balloonPanelView']=new _0x39affa(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x5ca996){this['annotations']=_0x5ca996;const _0x12ba04=this['context']['plugins']['get'](z),_0x6a7807=this['balloonPanelView'];if(_0x12ba04['_annotations']=_0x5ca996,this['isAttached'])throw new _0x2cc838('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x12ba04,'set:container',()=>{this['detach'](),this['listenTo'](_0x12ba04,'change:container',_0x40eb76=>{_0x40eb76['off'](),this['attach'](_0x5ca996);});}),_0x12ba04['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x499e2b=_0x4b2d9d=>{const _0x5048fc=new C(this['context']['locale']);_0x12ba04['addAnnotation'](_0x4b2d9d,_0x5048fc),this['_annotationToNarrowView']['set'](_0x4b2d9d,_0x5048fc),_0x5048fc['bind']('isDirty','annotationType','number')['to'](_0x4b2d9d['view'],'isDirty','type','length'),_0x5048fc['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x6a7807['content']['first']!==_0x4b2d9d['view']?(this['_showBalloon'](_0x4b2d9d),_0x4b2d9d['view']['element']['focus'](),this['setActiveAnnotation'](_0x4b2d9d)):this['setActiveAnnotation'](null);});};for(const _0x55af2f of _0x5ca996)_0x499e2b(_0x55af2f);this['listenTo'](_0x5ca996,'add',(_0x494d0b,_0x1fed91)=>{_0x499e2b(_0x1fed91);}),this['listenTo'](_0x5ca996,'remove',(_0x31d462,_0x50dd92,_0xdc309c)=>{this['_annotationToNarrowView']['get'](_0x50dd92)['destroy'](),this['_annotationToNarrowView']['delete'](_0x50dd92),_0x12ba04['rearrange']({'removedAnnotation':_0x50dd92,'previousAnnotation':_0x5ca996['get'](_0xdc309c-0x1),'nextAnnotation':_0x5ca996['get'](_0xdc309c+0x1)}),_0x50dd92===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x5ca996,'focus',(_0x3772f1,_0x19c9c5)=>{this['setActiveAnnotation'](_0x19c9c5);}),this['listenTo'](_0x5ca996,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3cadc0,_0x1e1a95)=>{_0x1e1a95['keyCode']===_0x2ff53f['esc']&&_0x6a7807['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x6a7807['content']['first']),this['_hideBalloon'](),_0x1e1a95['stopPropagation'](),_0x1e1a95['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x551c9f,_0x2af19c)=>{const _0x3f2eca=_0x2af19c['target'];_0x6a7807['isVisible']&&_0x6a7807['element']['contains'](_0x3f2eca)||_0x12ba04['view']['element']['contains'](_0x3f2eca)||_0x551c9f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3bb35c=>_0x3bb35c['contains'](_0x3f2eca))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x38debb=this['context']instanceof _0x4d6295?this['context']['editors']:new _0x4d5d77([this['context']]);for(const _0x4a1e58 of _0x38debb)this['_integrateWithEditorAnnotations'](_0x4a1e58);this['listenTo'](_0x38debb,'add',(_0x56f237,_0x5abb60)=>{this['listenTo'](_0x5abb60,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5abb60);});}),this['listenTo'](_0x38debb,'remove',(_0x3bdbb3,_0x3cd6e9)=>{_0x3cd6e9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3cd6e9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x299718){if(_0x299718===this['activeAnnotation'])return;const _0x1c2727=this['context']['plugins']['get'](z);if(_0x1c2727['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x299718,'disableAnimationOnActivatedAnnotation':!0x0}),_0x299718)_0x1c2727['getSidebarItemView'](_0x299718)?this['_showBalloon'](_0x299718):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x299718;}['detach'](){if(!this['isAttached'])throw new _0x2cc838('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x767511=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3fe185=>_0x3fe185['destroy']()),this['_annotationToNarrowView']['clear'](),_0x767511['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4d6295&&this['stopListening'](this['context']['editors']);for(const _0x47cd7d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x47cd7d);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'](_0x577d41){if(!_0x577d41['plugins']['has']('EditorAnnotations'))return;const _0x19e132=_0x577d41['plugins']['get']('EditorAnnotations'),_0x1e06a7=this['context']['plugins']['get'](z),_0x565b0f=this['annotations'],_0x3c69b3=this['balloonPanelView'],_0x2d9d3f=()=>{const _0x13f94=_0x19e132['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x13f94),this['setActiveAnnotation'](_0x13f94[0x0]||null);};this['listenTo'](_0x19e132,'refresh',_0x2d9d3f),this['listenTo'](_0x19e132,'blur',(_0x17a773,{isAnnotationTracked:_0x3aa3d1})=>{this['activeAnnotation']&&_0x3aa3d1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x19e132,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x565b0f,'blur',_0x1877fd=>{_0x19e132['hasDomSelection']()&&_0x1877fd['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x14ad26,_0x1ef8a0)=>{const _0x1f318d=_0x1ef8a0['target'];_0x3c69b3['isVisible']&&_0x3c69b3['element']['contains'](_0x1f318d)||_0x1e06a7['view']['element']['contains'](_0x1f318d)||this['activeAnnotation']&&_0x19e132['hasDomSelection']()&&(_0x2d9d3f(),_0x14ad26['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x19e132);}['_destroyEditorAnnotationsIntegration'](_0xe56195){_0xe56195&&(this['stopListening'](_0xe56195),this['_editorAnnotations']['remove'](_0xe56195));}['_setSelectedAnnotations'](_0x58ef4d){for(const _0x1442ea of this['_selectedAnnotations'])_0x58ef4d['includes'](_0x1442ea)||this['_manuallyClosedAnnotationViews']['delete'](_0x1442ea['view']);this['_selectedAnnotations']=_0x58ef4d;}['_refreshPositioning'](){const _0x5a3f61=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5a3f61['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2838bf){if(this['_manuallyClosedAnnotationViews']['has'](_0x2838bf['view']))return;const _0xe7337c=this['balloonPanelView']['content']['first'];_0xe7337c!==_0x2838bf['view']?(_0xe7337c&&this['_detachListeners'](_0xe7337c),this['_attachListeners'](_0x2838bf['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2838bf['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x6f5e9c=this['balloonPanelView']['content']['first'],_0x2679a9=_0x6f5e9c&&this['annotations']['getByView'](_0x6f5e9c);if(!_0x2679a9||!this['_annotationToNarrowView']['has'](_0x2679a9))return;const _0x3d35fd=this['_annotationToNarrowView']['get'](_0x2679a9)['element'],_0x5bc0f0=(function(){const _0x5e30ad=_0x39affa['defaultPositions'];return[_0x5e30ad['southArrowNorthEast'],_0x5e30ad['northArrowSouthEast'],_0x5e30ad['southArrowNorth'],_0x5e30ad['northArrowSouth'],_0x5e30ad['southArrowNorthWest'],_0x5e30ad['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3d35fd,'positions':_0x5bc0f0});}['_hideBalloon'](){const _0xe771f=this['balloonPanelView'],_0x3d877b=_0xe771f['content']['first'];_0x3d877b&&(this['_detachListeners'](_0x3d877b),_0xe771f['unpin'](),_0xe771f['content']['clear']());}['_attachListeners'](_0x136575){this['listenTo'](_0x136575,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x136575,'Esc',(_0x3a3c69,_0x55aa9d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x136575),this['_hideBalloon'](),_0x55aa9d();});}['_detachListeners'](_0x3069a1){this['stopListening'](_0x3069a1);}}class c extends _0x6d2056{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x1b4ef4,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ed044){super(_0x4ed044),_0x4ed044['editing']['view']['addObserver'](_0x21fed6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4ed044['plugins']['get'](_0x1b4ef4),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3703e3=this['editor']['plugins']['get'](j);_0x3703e3['context']===this['editor']&&(_0x3703e3['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x39a325,_0x59a630)=>{const _0xca0ab=this['_balloon'];if(this['isAttached']&&_0xca0ab['visibleView']){const _0x3f46a6=this['annotations']['getByView'](_0xca0ab['visibleView']);_0x3f46a6&&this['_closeAnnotation'](_0x3f46a6),_0x59a630();}}));}['afterInit'](){const _0x210c6b=this['editor']['plugins']['get'](j);_0x210c6b['context']===this['editor']&&(_0x210c6b['hasActive']()||_0x210c6b['switchTo']('inline'));}['setActiveAnnotation'](_0x2047c7){_0x2047c7!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2047c7&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2047c7)&&this['_addAnnotationToBalloon'](_0x2047c7,!0x0),_0x2047c7['isActive']=!0x0),_0x2047c7||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2047c7);}['attach'](_0x4d952e){this['annotations']=_0x4d952e;const _0x51f0a4=this['editor']['plugins']['get'](j),_0x38fd2c=this['_balloon'];if(this['isAttached'])throw new _0x2cc838('inlineannotations-attach-already-attached',this);if(_0x51f0a4['context']!==this['editor'])throw new _0x2cc838('inlineannotations-not-allowed-with-context',this);const _0x35b35c=this['editor']['plugins']['get'](b);this['listenTo'](_0x35b35c,'refresh',()=>{const _0xacaeda=_0x35b35c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2c81c8,_0x89363b;!this['_forceRefresh']&&(_0x2c81c8=_0xacaeda,_0x89363b=this['_selectedAnnotations'],_0x2c81c8['length']===_0x89363b['length']&&_0x2c81c8['every'](_0x326fdf=>_0x89363b['includes'](_0x326fdf)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xacaeda),this['setActiveAnnotation'](_0xacaeda[0x0]||null));}),this['listenTo'](_0x35b35c,'blur',(_0x48fc41,{isAnnotationTracked:_0x2cfb1e})=>{this['activeAnnotation']&&_0x2cfb1e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3ec74e,_0x247c53,_0x5c24d3)=>{_0x5c24d3||this['setActiveAnnotation'](null);}),this['listenTo'](_0x4d952e,'remove',(_0x4ceebc,_0x3ca461)=>{this['_removeAnnotationFromBalloon'](_0x3ca461),_0x3ca461===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x38fd2c,'change:visibleView',(_0x2aa3dc,_0x780442,_0x456258,_0x4ef989)=>{_0x4ef989&&this['stopListening'](_0x4ef989);const _0x5a0b41=_0x4d952e['getByView'](_0x456258);_0x456258&&_0x5a0b41&&(this['listenTo'](_0x456258,'change:height',()=>{_0x38fd2c['updatePosition']();}),this['listenTo'](_0x456258,'Esc',()=>{this['_closeAnnotation'](_0x5a0b41),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5a0b41&&this['setActiveAnnotation'](_0x5a0b41));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x38fd2c['visibleView']&&(_0x4d952e['getByView'](_0x38fd2c['visibleView'])&&_0x38fd2c['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 _0x2cc838('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4a4419 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4a4419);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x23a031){for(const _0x133809 of this['_selectedAnnotations'])_0x23a031['includes'](_0x133809)||this['_manuallyClosed']['delete'](_0x133809);for(const _0x38515c of this['annotations'])_0x23a031['includes'](_0x38515c)||this['_removeAnnotationFromBalloon'](_0x38515c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x7cff2a of _0x23a031)this['_addAnnotationToBalloon'](_0x7cff2a);}this['_selectedAnnotations']=_0x23a031;}['_addAnnotationToBalloon'](_0x1e5f41,_0x18e27e=!0x1){this['_manuallyClosed']['has'](_0x1e5f41)||(this['_addedAnnotations']['has'](_0x1e5f41)||this['_balloon']['hasView'](_0x1e5f41['view'])||(this['_addedAnnotations']['add'](_0x1e5f41),this['_balloon']['add']({'stackId':_0x1e5f41['view']['id'],'view':_0x1e5f41['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1e5f41)}})),_0x18e27e&&this['_balloon']['showStack'](_0x1e5f41['view']['id']));}['_getBalloonTargetForAnnotation'](_0x50af96){const _0x41bc50=_0x50af96['target'],_0x214e47=this['editor']['editing']['view'],_0x4eb01e=_0x214e47['document']['selection']['getFirstRange'](),_0x5bf77b=_0x214e47['domConverter']['viewRangeToDom'](_0x4eb01e);if(_0x5bf77b['collapse'](!0x0),_0x41bc50){if(_0x41bc50 instanceof _0x23d655)return _0x41bc50;let _0x18248b=[];for(const _0x4d4028 of _0x41bc50)_0x18248b['push'](...F(_0x4d4028['getClientRects']()));_0x18248b=function(_0xdb2d6c){const _0x4f1589=[];let _0x212d78=_0xdb2d6c[0x0];for(let _0x4e9c66=0x1;_0x4e9c66<_0xdb2d6c['length'];_0x4e9c66++)P(_0x212d78,_0xdb2d6c[_0x4e9c66])?_0x212d78['width']+=_0xdb2d6c[_0x4e9c66]['width']:(_0x4f1589['push'](_0x212d78),_0x212d78=_0xdb2d6c[_0x4e9c66]);return _0x4f1589['push'](_0x212d78),_0x4f1589;}(_0x18248b);const _0x509881=_0x5bf77b['getBoundingClientRect']();return _0x18248b['find'](_0x1a6993=>_0x1a6993['top']<=_0x509881['top']&&_0x1a6993['bottom']>=_0x509881['bottom']&&_0x1a6993['left']<=_0x509881['left']&&_0x1a6993['right']>=_0x509881['right'])||_0x18248b[0x0];}return _0x50af96['targetRect']||_0x5bf77b;}['_removeAnnotationFromBalloon'](_0x156637){this['_addedAnnotations']['has'](_0x156637)&&this['_balloon']['hasView'](_0x156637['view'])&&(this['_addedAnnotations']['delete'](_0x156637),this['_balloon']['remove'](_0x156637['view']));}['_closeAnnotation'](_0x25bb98){this['_manuallyClosed']['add'](_0x25bb98),this['_removeAnnotationFromBalloon'](_0x25bb98);}}function F(_0x43f9e2){return Array['from'](_0x43f9e2)['map'](DOMRect['fromRect']);}function P(_0x41e1f6,_0x1f2a9a){return _0x41e1f6['top']===_0x1f2a9a['top']&&_0x41e1f6['bottom']===_0x1f2a9a['bottom']&&_0x41e1f6['right']===_0x1f2a9a['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x59eb73,_0x4acc80){super(_0x59eb73),this['set']('isEmpty',!_0x4acc80['length']),this['focusTracker']=new _0x5f12d6(),this['_annotationViews']=_0x4acc80,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x349db7({'focusables':_0x4acc80,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4acc80,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4acc80,'remove',(_0x3cb408,_0x13bf88)=>{_0x13bf88['isActive']&&this['focus'](),_0x4acc80['length']||(this['isEmpty']=!0x0);});const _0x44f767=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x59eb73,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4acc80},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x44f767['if']('isEmpty','ck-hidden',_0x334b7d=>!_0x334b7d)]},'children':[{'text':N(_0x59eb73,'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 _0x50aa33 of this['_annotationViews'])this['focusTracker']['add'](_0x50aa33['element']);this['_annotationViews']['on']('change',(_0x1ac178,{added:_0x20346d,removed:_0x1ab8f0})=>{for(const _0x3a0723 of _0x20346d)this['focusTracker']['add'](_0x3a0723['element']);for(const _0x1b3225 of _0x1ab8f0)this['focusTracker']['remove'](_0x1b3225['element']);});}}class p extends _0x313b3a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x315d89){super(_0x315d89),this['archivedThreads']=new _0x4d5d77();}['init'](){const _0x45b28e=this['context'],_0x4b007b=_0x45b28e['plugins']['get'](o),_0x239699=_0x45b28e['plugins']['get'](y);this['listenTo'](_0x4b007b,'addCommentThread',(_0x2c5df0,{threadId:_0x1124e6})=>{const _0x1daf16=_0x4b007b['getCommentThread'](_0x1124e6);_0x1daf16['archivedAt']&&this['archivedThreads']['add'](_0x1daf16,this['_calculatePosition'](_0x1daf16['archivedAt'])),this['listenTo'](_0x1daf16,'change:archivedAt',(_0x4528a8,_0xa4cc2c,_0x34df2e)=>{_0x34df2e?this['archivedThreads']['has'](_0x1daf16)||this['archivedThreads']['add'](_0x1daf16,this['_calculatePosition'](_0x1daf16['archivedAt'])):this['archivedThreads']['has'](_0x1daf16)&&this['archivedThreads']['remove'](_0x1daf16);});}),this['listenTo'](_0x4b007b,'removeCommentThread',(_0x1d8344,{threadId:_0x44d6d3})=>{const _0x238b68=_0x4b007b['getCommentThread'](_0x44d6d3);this['stopListening'](_0x238b68),this['archivedThreads']['has'](_0x238b68)&&this['archivedThreads']['remove'](_0x238b68);},{'priority':'highest'}),this['listenTo'](_0x239699['collection'],'focus',(_0x35fbe8,_0x26dd81)=>{_0x26dd81['isVisible']||(_0x26dd81['isActive']=!0x0,_0x239699['activate'](_0x26dd81));});}['_calculatePosition'](_0x3b83d2){const _0x3b1ccf=[...this['archivedThreads']]['findIndex'](_0x1738c3=>_0x1738c3['archivedAt']<_0x3b83d2);return _0x3b1ccf>-0x1?_0x3b1ccf:this['archivedThreads']['length'];}}class a extends _0x6d2056{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1c0817];}constructor(_0x569f94){super(_0x569f94),this['annotationViews']=new _0x118739(),this['_pendingThreads']=[];}['init'](){const _0x44c2c8=this['editor'],_0x584148=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x44c2c8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3596fa,!0x0)),_0x44c2c8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2df3da=this['_createCommentsArchiveButton'](_0x1a9c60);return _0x2df3da['set']({'role':'menuitemcheckbox'}),_0x2df3da;});const _0x3b40a4=_0x44c2c8['plugins']['get'](p),_0x4e8042=_0x44c2c8['plugins']['get']('Annotations'),_0x21d232=_0x44c2c8['plugins']['get']('CommentsRepository');_0x3b40a4['archivedThreads']['forEach'](_0x35f226=>{this['_handleNewThread'](_0x35f226);}),this['listenTo'](_0x3b40a4['archivedThreads'],'add',(_0x350847,_0x5cb7d4)=>{this['_handleNewThread'](_0x5cb7d4);}),this['listenTo'](_0x4e8042['collection'],'add',(_0x4817d1,_0x5cd8fb)=>{const _0x394964=this['_pendingThreads']['find'](_0x448732=>{const _0xbd08fd=_0x21d232['_threadToController']['get'](_0x448732);return _0xbd08fd&&_0x5cd8fb['innerView']===_0xbd08fd['view'];});if(_0x394964){const _0xed0e18=this['_calculatePosition'](_0x394964['archivedAt']);this['_addAnnotationToArchive'](_0x5cd8fb,_0xed0e18),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x394964),0x1);}}),this['listenTo'](_0x3b40a4['archivedThreads'],'remove',(_0x5ca7cf,_0x31be4b)=>{const _0x1f6da9=_0x44c2c8['config']['get']('collaboration.channelId');if(!_0x1f6da9||_0x31be4b['channelId']===_0x1f6da9){if(this['_pendingThreads']['includes'](_0x31be4b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x31be4b),0x1);else{const _0xd50263=_0x21d232['_threadToController']['get'](_0x31be4b),_0x4d15aa=_0x4e8042['getByInnerView'](_0xd50263['view']);this['annotationViews']['remove'](_0x4d15aa['view']),this['stopListening'](_0x4d15aa),this['stopListening'](_0x4d15aa['focusableElements']);}}}),this['listenTo'](_0x4e8042['collection'],'add',(_0x5866df,_0x38d40d)=>{this['listenTo'](_0x38d40d,'escape',_0x584148);}),this['listenTo'](_0x4e8042['collection'],'remove',(_0x575b80,_0x199bbf)=>{this['stopListening'](_0x199bbf,'escape',_0x584148);});}['_addAnnotationToArchive'](_0x5bc0bb,_0x31818c){this['listenTo'](_0x5bc0bb,'set:isVisible',_0x41beff=>{_0x41beff['return']=!0x1,_0x41beff['stop']();}),this['annotationViews']['add'](_0x5bc0bb['view'],_0x31818c);}['_handleNewThread'](_0x28c644){const _0x32b28a=this['editor']['plugins']['get']('CommentsRepository'),_0x20e116=this['editor']['plugins']['get']('Annotations'),_0x441390=this['editor']['config']['get']('collaboration.channelId');if(!_0x441390||_0x28c644['channelId']===_0x441390){const _0x3f7682=_0x32b28a['_threadToController']['get'](_0x28c644);if(!_0x3f7682)return void this['_pendingThreads']['push'](_0x28c644);const _0x1292d4=this['_calculatePosition'](_0x28c644['archivedAt']),_0x3ce210=_0x20e116['getByInnerView'](_0x3f7682['view']);_0x3ce210['isVisible']&&_0x20e116['_visibleAnnotations']['remove'](_0x3ce210),this['_addAnnotationToArchive'](_0x3ce210,_0x1292d4);}}['_calculatePosition'](_0x4f2769){const _0x43b7c4=this['editor']['config']['get']('collaboration.channelId'),_0x5476e7=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x7f07af=>_0x7f07af['channelId']===_0x43b7c4)['findIndex'](_0x43de74=>_0x43de74['archivedAt']<_0x4f2769);return _0x5476e7<0x0||_0x5476e7>this['annotationViews']['length']?this['annotationViews']['length']:_0x5476e7-0x1;}['_toggleDialog'](){const _0x15a40a=this['editor'],_0xa4d6f7=_0x15a40a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x15a40a['locale'],this['annotationViews'])),'commentsArchive'===_0xa4d6f7['id']?_0xa4d6f7['hide']():_0xa4d6f7['show']({'id':'commentsArchive','title':N(_0x15a40a['locale'],'COMMENTS_ARCHIVE'),'icon':_0x445ed3,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x324a55['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x499f0c,_0x4e5979=!0x1){const _0x1226ac=this['editor']['locale'],_0x356caf=this['editor']['plugins']['get']('Dialog'),_0x562cba=new _0x499f0c(_0x1226ac);return _0x562cba['bind']('isEnabled')['to'](this,'isEnabled'),_0x562cba['bind']('isOn')['to'](_0x356caf,'id',_0xd02979=>'commentsArchive'===_0xd02979),_0x562cba['set']({'label':N(_0x1226ac,'COMMENTS_ARCHIVE'),'icon':_0x445ed3,'isToggleable':!0x0}),_0x4e5979&&(_0x562cba['tooltip']=!0x0),this['listenTo'](_0x562cba,'execute',()=>this['_toggleDialog']()),_0x562cba;}['_hideDialogOnAnnotationEscape']=_0x31a8d9=>{const _0x1b4615=_0x31a8d9['source'];if(!this['annotationViews']['has'](_0x1b4615['view']))return;const _0x3ace16=this['editor']['plugins']['get']('Dialog');_0x3ace16['isOpen']&&'commentsArchive'===_0x3ace16['id']&&(_0x3ace16['hide'](),_0x31a8d9['stop']());};}class gi extends _0x6d2056{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};
|