@ckeditor/ckeditor5-comments 47.6.2-alpha.1 → 47.7.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +19 -19
- 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(_0x3073f7={}){function _0x57e2af(_0x5a8110){return _0x5a8110['map'](_0x29b8f0=>String['fromCharCode'](_0x29b8f0))['join']('');}(_0x3073f7=Object['assign']({},_0x3073f7))['plugins']||(_0x3073f7['plugins']=hs['defaultPlugins']),super(_0x3073f7),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x57e2af([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x57e2af([0x76,0x69,0x65,0x77])][_0x57e2af([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x57e2af([0x61,0x75,0x74,0x6f]),this[_0x57e2af([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x57e2af([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x57e2af([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x57e2af([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x57e2af([0x6f,0x6b])});}['create'](){const _0x1235d4=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x1235d4))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3c9b85=>{const _0x48052a=this['model']['document']['getRoot'](),_0x53f0ed=_0x48052a&&_0x48052a['getChild'](_0x48052a['childCount']-0x1);_0x3c9b85['setSelection'](_0x53f0ed,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x59413c=this['editing']['view'],_0x56581d=_0x59413c['document']['getRoot'](),_0x3c3b98=_0x56581d['getChild'](0x0);_0x56581d['childCount']>0x1||!_0x3c3b98||'p'!=_0x3c3b98['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x59413c,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3c3b98['placeholder']=this['placeholder']),Ft({'view':_0x59413c,'element':_0x3c3b98,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3c3b98);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x20ca14,_0x17b230={}){super(_0x20ca14),this['editor']=null,this['_editorConfig']=_0x17b230,this['set']('value',_0x17b230['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x20ca14,'Reply...')),this['set']('submitLabel',N(_0x20ca14,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x44f1cb(),this['focusCycler']=new _0x47d7f6({'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',(_0x3b979b,_0x10d1bc)=>{this['cancelButtonView']['fire']('execute'),_0x10d1bc();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4e3443,_0x1d4243)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x1d4243());}),this['on']('submit',(_0x5783e2,_0x4d5370)=>{_0x4d5370['length']>0xfde8?(alert(N(_0x20ca14,'TOO_LONG_COMMENT_ALERT',[_0x4d5370['length'],0xfde8])),_0x5783e2['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2845cd=this['editor'];this['element']['insertBefore'](_0x2845cd['ui']['element'],this['element']['firstChild']),_0x2845cd['model']['document']['on']('change',()=>this['value']=_0x2845cd['getData']()),_0x2845cd['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2845cd['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x255736){-0x1===_0x255736?(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:_0x5dbc64}=this,_0x49f541=new _0xf18eca(_0x5dbc64);return _0x49f541['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x49f541['withText']=!0x0,_0x49f541['bind']('label')['to'](this,'submitLabel'),_0x49f541['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x49f541['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x20cda0,_0x8bd780)=>!_0x8bd780&&!!_0x20cda0['trim']()),_0x49f541;}['_createCancelButton'](){const {locale:_0x28b44b}=this,_0x4fb08e=new _0xf18eca(_0x28b44b);return _0x4fb08e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4fb08e['label']=N(_0x28b44b,'Cancel'),_0x4fb08e['withText']=!0x0,_0x4fb08e['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4fb08e;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x4eb504=>{this['focusTracker']['add'](_0x4eb504['element']);}),this['focusables']['on']('change',(_0x3e9b75,_0x40cb76)=>{for(const _0x451d2b of Array['from'](_0x40cb76['added'])['reverse']())this['focusTracker']['add'](_0x451d2b['element']);});}}class ie extends kt{constructor(_0xafa8ad,_0x17ca89,_0x108004){super(_0xafa8ad),this['commentInputView']=new es(_0xafa8ad,_0x108004),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1be040,_0x16aaf6)=>_0x1be040||!!_0x16aaf6),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 _0x5537f3(_0xafa8ad,_0x17ca89),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'](_0x492e4e){this['commentInputView']['focus'](_0x492e4e);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x56943e,_0x3f465d)=>{const {submitButtonView:_0x548e8e,cancelButtonView:_0x354573,editor:_0x21d867}=this['commentInputView'];[_0x548e8e['element'],_0x354573['element'],_0x21d867?_0x21d867['editing']['view']['getDomRoot']():null]['filter'](_0x276b76=>_0x276b76)['some'](_0x2dbcc5=>_0x2dbcc5['contains'](_0x3f465d['target']))||(this['focus'](),_0x3f465d['preventDefault']());});}}class rs extends kt{constructor(_0x37e497){super(_0x37e497);const _0x491e04=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x491e04['to']('count',_0x12d7fb=>N(_0x37e497,'NUMBER_OF_COMMENTS',_0x12d7fb))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x42f88a,_0x24dd2a,_0x1533b5){super(_0x42f88a);const _0x2e89e5=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x24dd2a['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x24dd2a,this['_config']=_0x1533b5,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x44f1cb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47d7f6({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x26f84d=>this['commentViews']['map'](_0x242934=>_0x242934['element'])['includes'](_0x26f84d['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x42f88a),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0xaca3c7=>_0xaca3c7-this['_config']['maxCommentsWhenCollapsed']);for(const _0x33eee3 of _0x24dd2a['comments'])this['_handleNewCommentModel'](_0x33eee3);this['_handleInfoComment'](),this['listenTo'](_0x24dd2a['comments'],'add',(_0x511a72,_0x1384a7)=>{const _0xa3f37c=this['_calculatePosition'](_0x1384a7);this['length']++,this['_handleNewCommentModel'](_0x1384a7,_0xa3f37c),this['refreshVisibleViews']();}),this['listenTo'](_0x24dd2a['comments'],'remove',(_0x2f50cd,_0x22e07c)=>{this['length']--,this['_handleRemoveCommentModel'](_0x22e07c),this['refreshVisibleViews']();}),this['listenTo'](_0x24dd2a,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x24dd2a,'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',_0x2e89e5['if']('length','ck-hidden',_0x4a034b=>!_0x4a034b)],'aria-label':N(_0x42f88a,'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'](_0xd67d8f){-0x1===_0xd67d8f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x503e9d of this['commentViews'])_0x503e9d['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1591e4,_0x5e7a69){const _0x1a64a5=new this['_config']['CommentView'](this['locale'],_0x1591e4,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1a64a5['viewUid']=_0x1591e4['id'],_0x1a64a5['delegate']('removeComment')['to'](this),_0x1a64a5['delegate']('updateComment')['to'](this),_0x1a64a5['delegate']('resolveCommentThread')['to'](this),_0x1a64a5['delegate']('editorReady')['to'](this),_0x1a64a5['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1a64a5,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1a64a5,_0x5e7a69);}['_calculatePosition'](_0x6c02d8){const _0x4efeaa=this['_model']['_findOptimalIndex'](_0x6c02d8);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x6c02d8['authoredAt']?_0x4efeaa-0x1:_0x4efeaa:_0x4efeaa-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2fdfc8={'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'],_0x2fdfc8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2fdfc8));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0xe5e8e){const _0x4155f3=this['commentViews']['remove'](_0xe5e8e['id']);this['stopListening'](_0x4155f3),_0x4155f3['isEditMode']&&this['_updateHasDirtyComment'](),_0x4155f3['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5b4cca=>_0x5b4cca['isEditMode']);}['_rearrangeCollapse'](){const _0xe70320=function(_0x286ab7){const _0x1ebc6b=new _0x4fc713();for(const _0x46370b of _0x286ab7)_0x1ebc6b['add'](_0x46370b);return _0x1ebc6b;}(this['commentViews']),_0x1b2486=this['_collapsedCommentsView']['count'];for(let _0x2db9a4=0x1;_0x2db9a4<=_0x1b2486;_0x2db9a4++)_0xe70320['remove'](0x1);for(const _0x3510cf of _0xe70320)_0x3510cf['collapse']();_0x1b2486>0x0&&_0xe70320['add'](this['_collapsedCommentsView'],0x1),ns(_0x3f67f3(Array['from'](this['visibleViews']),Array['from'](_0xe70320)),this['visibleViews'],_0xe70320);}['_rearrangeExpand'](){ns(_0x3f67f3(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x11f025 of this['visibleViews'])_0x11f025['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1a131c=>{this['focusTracker']['add'](_0x1a131c['element']),this['keystrokes']['listenTo'](_0x1a131c['element']);}),this['commentViews']['on']('change',(_0x203feb,_0x6e37c1)=>{for(const _0x4ddbf4 of _0x6e37c1['removed'])this['focusTracker']['remove'](_0x4ddbf4['element']),this['keystrokes']['stopListening'](_0x4ddbf4['element']);for(const _0x54b591 of Array['from'](_0x6e37c1['added'])['reverse']())this['focusTracker']['add'](_0x54b591['element']),this['keystrokes']['listenTo'](_0x54b591['element']);});}}function ns(_0x16812f,_0x408fad,_0x1f641d){let _0x32ccbb=0x0;for(const _0xe882bf of _0x16812f)switch(_0xe882bf){case'insert':_0x408fad['add'](_0x1f641d['get'](_0x32ccbb),_0x32ccbb),_0x32ccbb++;break;case'delete':_0x408fad['remove'](_0x32ccbb);break;case'equal':_0x32ccbb++;}}class oe extends kt{constructor(_0x479335){super(_0x479335);const _0x483e9a=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x483e9a['to']('contextValue',_0x42887a=>N(_0x479335,'THREAD_CONTEXT_LABEL',_0x42887a)),'tabindex':-0x1},'children':[{'text':_0x483e9a['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x391476,_0x44c6ad){super(_0x391476);const _0x5b5406=this['bindTemplate'];this['_model']=_0x44c6ad,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x44f1cb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47d7f6({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x3ce96d=>!!_0x3ce96d),this['bind']('contextValue')['to'](this['_model'],'context',_0x44ac17=>_0x44ac17&&_0x44ac17['value']?this['_trimContextValue'](_0x44ac17['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',_0x5b5406['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 _0x2c0e7b=new _0xf18eca(this['locale']);return _0x2c0e7b['label']=N(this['locale'],'Reopen'),_0x2c0e7b['tooltip']=N(this['locale'],'Reopen'),_0x2c0e7b['icon']=_0x434316,_0x2c0e7b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x185e4a=>!_0x185e4a),_0x2c0e7b['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x47d451,_0x26c2ff)=>_0x47d451&&_0x26c2ff),_0x2c0e7b['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2c0e7b;}['_trimContextValue'](_0x8cd1b3){if(_0x8cd1b3['length']<0x96)return _0x8cd1b3;const _0x1b0cc3=_0x8cd1b3['lastIndexOf']('\x20',0x93);return _0x8cd1b3['substring'](0x0,_0x1b0cc3>-0x1?_0x1b0cc3:0x93)+'...';}['_attachContextActions'](){const _0x5e8802=this['element']['querySelector']('.ck-context'),_0x3cd566=_0x5e8802['querySelector']('.ck-context__value');this['listenTo'](_0x5e8802,'mouseenter',()=>{_0x3cd566['offsetWidth']<_0x3cd566['scrollWidth']&&_0x5e8802['classList']['add']('overlay');}),this['listenTo'](_0x5e8802,'mouseleave',()=>{_0x5e8802['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4ba79e of this['focusables'])this['focusTracker']['add'](_0x4ba79e['element']),this['keystrokes']['listenTo'](_0x4ba79e['element']);}['_createContextView'](){const _0x2a56e7=new oe(this['locale']);return _0x2a56e7['bind']('contextValue')['to'](this),_0x2a56e7;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x594838,_0x1ca75e,_0x491ca2,_0x3b391b){super(_0x594838),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1ca75e,this['_localUser']=_0x491ca2,this['_config']=_0x3b391b,this['commentThreadHeaderView']=new Xt(_0x594838,_0x1ca75e),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x594838,N(_0x594838,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x594838,_0x1ca75e,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3b391b)),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',(_0x223a97,_0x3ca68d)=>_0x223a97||!!_0x3ca68d),this['bind']('isUnlinked')['to'](_0x1ca75e,'unlinkedAt',_0x2dd11a=>!!_0x2dd11a),this['bind']('ariaLabel')['to'](this,'length',_0x16d884=>{const _0x463bff=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x16d884,_0x463bff]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x44f1cb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x47d7f6({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3d26fb=>_0x3d26fb['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x15979b=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x593fae=_0x15979b['commentInputView'];return _0x15979b['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x593fae,'value',(_0x4f389c,_0x11bcbb,_0x10c5b9,_0x1f2950,_0x3500ad)=>!!_0x3500ad||!!_0x1f2950&&_0x10c5b9&&!_0x11bcbb||_0x4f389c&&_0x10c5b9&&!_0x11bcbb),_0x593fae['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5050d4,_0x1229a8,_0x1c851a)=>{let _0x3083ee;return _0x3083ee=_0x1c851a&&_0x1229a8?'Reply\x20to\x20reopen\x20discussion...':_0x5050d4?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3083ee);}),_0x593fae['bind']('submitLabel')['to'](this,'length',_0x1e9698=>N(this['locale'],_0x1e9698?'Reply':'Comment')),_0x593fae['on']('submit',(_0x4fbf74,_0x248770)=>{this['fire']('addComment',_0x248770),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x593fae['on']('cancel',()=>{this['focus']();}),_0x593fae['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x593fae['on']('cancel',_0x1e5139=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1e5139['stop']());}),this['on']('change:isActive',(_0xb5299d,_0x3e23cc,_0x3ae429)=>{_0x3ae429||this['length']||_0x593fae['value']||this['fire']('removeCommentThread');}),_0x15979b;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0xca3058(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x3a68d7,target:_0x2d96a0,type:_0x271538,isVisible:_0x668990=!0x0}){super(),this['view']=_0x3a68d7,this['view']['element']||this['view']['render'](),this['_type']=_0x271538,this['_target']=_0x2d96a0,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4fc713([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x24a6e4,_0x56291b)=>{this['view']['focusTracker']['add'](_0x56291b);}),this['focusableElements']['on']('remove',(_0x312044,_0x2a9af9)=>{this['view']['focusTracker']['remove'](_0x2a9af9);}),this['set']('isVisible',_0x668990);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2b285d=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2b285d),_0x2b285d;}get['targetRect'](){const _0x2d36d5=this['target'];if(null===_0x2d36d5)return null;if(_0x2d36d5 instanceof _0x375970)return _0x2d36d5;const _0x21f0d9=_0x2d36d5['filter'](_0x430c12=>function(_0x1047ed){const _0x4657c5=_0x1047ed['offsetParent'];if(_0x4657c5)return!0x0;const _0x1a6000=_0x1047ed['getClientRects']()['item'](0x0);return!!_0x1a6000;}(_0x430c12));return 0x0===_0x21f0d9['length']?null:new _0x375970(_0x21f0d9[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2e8a98){this['view']['isActive']=_0x2e8a98,this['view']['mainView']['isActive']=_0x2e8a98;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x32e085){if(!(null===_0x32e085||_0x32e085 instanceof _0x375970||Array['isArray'](_0x32e085)&&_0x32e085['every'](_0x520763=>fi(_0x520763))))throw new _0xd7b9fb('annotation-invalid-target',null,{'target':_0x32e085});}['_getNormalizedTarget'](){const _0x558d1c='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x558d1c)?[_0x558d1c]:_0x558d1c;}}function fi(_0x12e54a){return null!==_0x12e54a&&'object'==typeof _0x12e54a&&'nodeType'in _0x12e54a&&0x1===_0x12e54a['nodeType'];}class S extends _0x4fc713{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4c3e1b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x44f1cb(),this['_focusTracker']['on']('change:isFocused',(_0x417558,_0xc0505e,_0x5b4c89)=>{_0x5b4c89||this['fire']('blur');});for(const _0x4fd90a of _0x4c3e1b)this['add'](_0x4fd90a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xe3a09){if(this['has'](_0xe3a09))throw new _0xd7b9fb('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xe3a09['innerView'],_0xe3a09),this['_viewToAnnotation']['set'](_0xe3a09['view'],_0xe3a09);for(const _0x15a30b of _0xe3a09['focusableElements'])this['_focusTracker']['add'](_0x15a30b);this['listenTo'](_0xe3a09['focusableElements'],'add',(_0x52233a,_0x3e7348)=>{this['_focusTracker']['add'](_0x3e7348);}),this['listenTo'](_0xe3a09['focusableElements'],'remove',(_0x2eae83,_0x108faa)=>{this['_focusTracker']['remove'](_0x108faa);}),this['listenTo'](_0xe3a09['view']['focusTracker'],'change:isFocused',(_0x20d7a2,_0x4d7369,_0x49c15e)=>{_0x49c15e&&this['fire']('focus',_0xe3a09);}),_0xe3a09['updateTargetRect']();const _0x1b4ddc=this['_getOrderInContent'](_0xe3a09['view']['targetRect']);return super['add'](_0xe3a09,_0x1b4ddc);}['remove'](_0x22cbf4){if(!this['has'](_0x22cbf4))throw new _0xd7b9fb('annotationcollection-not-existing-item',null);this['stopListening'](_0x22cbf4['view']['focusTracker']),this['stopListening'](_0x22cbf4['focusableElements']);for(const _0x5c341e of _0x22cbf4['focusableElements'])this['_focusTracker']['remove'](_0x5c341e);return this['_viewToAnnotation']['delete'](_0x22cbf4['view']),this['_innerViewToAnnotation']['delete'](_0x22cbf4['innerView']),super['remove'](_0x22cbf4);}['getByInnerView'](_0x9e8dba){return this['_innerViewToAnnotation']['get'](_0x9e8dba);}['getByView'](_0x518a3c){return this['_viewToAnnotation']['get'](_0x518a3c);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x445f48 of this)_0x445f48['updateTargetRect']();this['_sort']();}['_sort'](){const _0xaf43e6=Array['from'](this)['sort']((_0x390b29,_0xe3f556)=>w(_0x390b29['view']['targetRect'],_0xe3f556['view']['targetRect']));for(let _0x1cd7d5=_0xaf43e6['length']-0x1;_0x1cd7d5>0x0;_0x1cd7d5--){const _0x35bad3=_0xaf43e6[_0x1cd7d5];_0x1cd7d5!==this['getIndex'](_0x35bad3)&&(this['remove'](_0x35bad3),this['add'](_0x35bad3));}}['_getOrderInContent'](_0x427e7d){let _0x4d2dc7=0x0;if(!_0x427e7d)return this['length'];for(const _0x41b00a of this){const _0x4b9111=_0x41b00a['view']['targetRect'];if(_0x4b9111){if(w(_0x427e7d,_0x4b9111)<0x0)return _0x4d2dc7;_0x4d2dc7++;}}return _0x4d2dc7;}}function v({source:_0x4578ae,target:_0x1f1378,filter:_0x5ad2b2}){for(const _0x13ba31 of _0x4578ae)_0x5ad2b2(_0x13ba31)&&_0x1f1378['add'](_0x13ba31);_0x1f1378['listenTo'](_0x4578ae,'add',(_0x460981,_0x589c14)=>{_0x5ad2b2(_0x589c14)&&_0x1f1378['add'](_0x589c14);}),_0x1f1378['listenTo'](_0x4578ae,'remove',(_0x52c4b6,_0x4169cf)=>{_0x1f1378['has'](_0x4169cf)&&_0x1f1378['remove'](_0x4169cf);});}function w(_0x2332ef,_0x4c1580){if(null===_0x2332ef&&null===_0x4c1580)return 0x0;if(null===_0x2332ef)return-0x1;if(null===_0x4c1580)return 0x1;const _0x1f3c9c=_0x2332ef['top']-_0x4c1580['top'];return 0x0==_0x1f3c9c?_0x2332ef['left']-_0x4c1580['left']:_0x1f3c9c;}class y extends _0x3110a5{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5490c3){if(super(_0x5490c3),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5490c3 instanceof _0x22a44e){const _0x1de3c6=_0x5490c3['locale'];_0x5490c3['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x1de3c6,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x1de3c6,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x1de3c6,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x1de3c6,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x1de3c6,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x1de3c6,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x1de3c6,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x8475bf){this['collection']['add'](_0x8475bf);}['remove'](_0x383638){this['collection']['remove'](_0x383638),_0x383638['destroy']();}['refreshVisibility'](){for(const _0x5df636 of this['collection'])_0x5df636['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x45b1b4){return this['collection']['getByInnerView'](_0x45b1b4);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x8c3fe of this['collection'])_0x8c3fe['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4edbd9){this['fire']('_activateAnnotation',_0x4edbd9);}['createAnnotation'](_0x1b6fb3){return new T(_0x1b6fb3);}['createAnnotationView'](_0x11bb2d,_0x519322){return new E(_0x11bb2d,_0x519322);}['_addActiveAnnotation'](_0x21b802){const _0x5eab76=new Set(this['activeAnnotations']);_0x5eab76['add'](_0x21b802),this['activeAnnotations']=_0x5eab76;}['_removeActiveAnnotation'](_0x2b43a5){const _0x9b0c71=new Set(this['activeAnnotations']);_0x9b0c71['delete'](_0x2b43a5),this['activeAnnotations']=_0x9b0c71;}['_bindAnnotationsToVisibleAnnotations'](){const _0x35ac78=this['collection'],_0x55f9f9=this['_visibleAnnotations'];function _0x13a2ab(_0x554c34){const _0x15ad91=_0x554c34['source'];_0x15ad91['isVisible']&&!_0x55f9f9['has'](_0x15ad91)?_0x55f9f9['add'](_0x15ad91):!_0x15ad91['isVisible']&&_0x55f9f9['has'](_0x15ad91)&&_0x55f9f9['remove'](_0x15ad91),_0x15ad91['view']['focusTracker']['remove'](_0x15ad91['view']['element']),_0x15ad91['view']['focusTracker']['add'](_0x15ad91['view']['element']);}this['listenTo'](_0x35ac78,'add',(_0xac99cb,_0x58db64)=>{_0x58db64['isVisible']&&_0x55f9f9['add'](_0x58db64),this['listenTo'](_0x58db64,'change:isVisible',_0x13a2ab);}),this['listenTo'](_0x35ac78,'remove',(_0x1e38ba,_0x496f13)=>{_0x55f9f9['has'](_0x496f13)&&_0x55f9f9['remove'](_0x496f13),this['stopListening'](_0x496f13,'change:isVisible',_0x13a2ab);});}['_setupEnterAnnotationKeystroke'](){const _0x2e9759=_0x3e3635=>{_0x3e3635['on']('ready',()=>{_0x3e3635['keystrokes']['set'](_0xa0140e,(_0x26c7a7,_0x269293)=>{const _0x436bab=_0xa3ef79(this['activeAnnotations']['values']());_0x436bab&&(_0x436bab['view']['focus'](),_0x269293());});});};this['context']instanceof _0x22a44e?_0x2e9759(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x57448f,_0x4de36b)=>{_0x2e9759(_0x4de36b);});}['_setupEscapeAnnotationHandling'](){const _0x1f7a31=_0x22a04c=>{const _0x48bdfc=_0x22a04c['source'],_0x25368a=[];let _0x18dc3e;if(Array['isArray'](_0x48bdfc['target'])){_0x18dc3e=_0x48bdfc['target'][0x0],this['context']instanceof _0x22a44e?_0x25368a['push'](this['context']):this['context']['editors']&&_0x25368a['push'](...this['context']['editors']);for(const _0x360554 of _0x25368a)for(const _0x343065 of _0x360554['editing']['view']['domRoots']['values']())if(_0x343065['contains'](_0x18dc3e))return void _0x360554['editing']['view']['focus']();_0x18dc3e['focus']();}};this['listenTo'](this['collection'],'add',(_0xe3f4c8,_0x15ca55)=>{this['listenTo'](_0x15ca55,'escape',_0x1f7a31,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2f1749,_0x5a2081)=>{this['stopListening'](_0x5a2081,'escape',_0x1f7a31);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3110a5{['_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(_0x5c5075){super(_0x5c5075),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x380dd4=this['context']['config'];_0x380dd4['define']('comments.maxCommentsWhenCollapsed',0x2),_0x380dd4['define']('comments.maxThreadTotalWeight',0x1f4),_0x380dd4['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x380dd4['define']('comments.CommentThreadView',gt),_0x380dd4['define']('comments.CommentView',Tt),_0x380dd4['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x3fca60=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x7d0b76,_0x56dda8)=>this['_addCommentThread'](_0x56dda8)),this['on']('submitCommentThread',(_0x2ce513,_0xf0503a)=>this['_submitCommentThread'](_0xf0503a)),this['on']('resolveCommentThread',(_0x130d8d,_0x2f90d4)=>this['_resolveCommentThread'](_0x2f90d4)),this['on']('resolveCommentThread',(_0x4abc78,_0x54087a)=>this['_updateActiveAnnotation'](_0x54087a),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x32d7e7,_0x508374)=>this['_reopenCommentThread'](_0x508374)),this['on']('reopenCommentThread',(_0x3c14ad,_0x43fb1c)=>this['_updateActiveAnnotation'](_0x43fb1c),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4c14fc,_0x3f1fca)=>this['_removeCommentThread'](_0x3f1fca)),this['on']('updateCommentThread',(_0x179817,_0x1a21e2)=>this['_updateCommentThread'](_0x1a21e2)),this['on']('updateCommentThread',(_0x1f68bc,_0x28f8f8)=>this['_updateActiveAnnotation'](_0x28f8f8),{'priority':'lowest'}),this['on']('addComment',(_0x4c2848,_0x5df7cd)=>this['_addComment'](_0x5df7cd)),this['on']('updateComment',(_0x2f3971,_0x505c8f)=>this['_updateComment'](_0x505c8f)),this['on']('removeComment',(_0x10c440,_0x3e9074)=>this['_removeComment'](_0x3e9074)),this['on']('addComment',(_0x1aad30,{threadId:_0xcc3b83,isFromAdapter:_0x595d9c})=>{if(_0x595d9c)return;const _0x5075f4=this['getCommentThread'](_0xcc3b83),_0x4d8de1=_0x5075f4&&this['_threadToController']['get'](_0x5075f4);_0x4d8de1&&_0x4d8de1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x3fca60,'change:activeAnnotations',(_0x33e116,_0x8b7c4e,_0x2d7337)=>{const _0x544ef=Array['from'](_0x2d7337)['map'](_0x592442=>this['_viewToController']['get'](_0x592442['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x544ef?_0x544ef['model']:null;});}set['adapter'](_0x43b90b){if(this['_adapter'])throw new _0xd7b9fb('commentsrepository-adapter-already-set');this['_adapter']=_0x43b90b;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0xc82883=_t,threadId:_0x31339b=_0x14661f(),comments:_0x440987=[],unlinkedAt:_0x45eaf4=null,resolvedAt:_0x2ab819=null,resolvedBy:_0x3d167c=null,target:_0xd1d8bf=null,context:_0x1fb57d=null,attributes:_0x44466c={},isResolvable:_0x1f9c5d=!0x0,isSubmitted:_0x3f781f=!0x1,isFromAdapter:_0x1b62fe=!0x1}={}){return this['fire'](Nt('addCommentThread',_0xc82883),{'channelId':_0xc82883,'threadId':_0x31339b,'comments':_0x440987,'unlinkedAt':_0x45eaf4,'resolvedAt':_0x2ab819,'resolvedBy':_0x3d167c,'target':_0xd1d8bf,'context':_0x1fb57d,'attributes':_0x44466c,'isFromAdapter':_0x1b62fe,'isResolvable':_0x1f9c5d,'isSubmitted':_0x3f781f}),this['getCommentThread'](_0x31339b);}['openNewCommentThread']({channelId:_0x333219=_t,threadId:_0x1960f3=_0x14661f(),target:_0x1369bc,context:_0xd39023=null,isResolvable:_0xa52bd6=!0x0}){if(this['_readOnlyChannels']['has'](_0x333219)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1369bc)throw new _0xd7b9fb('commentsrepository-missing-target');const _0x3cb9f5=this['addCommentThread']({'channelId':_0x333219,'threadId':_0x1960f3,'target':_0x1369bc,'context':_0xd39023,'isResolvable':_0xa52bd6});if(!_0x3cb9f5)return null;const _0x178394=this['_threadToController']['get'](_0x3cb9f5),_0x20e070=_0x178394['view']['commentThreadInputView']['commentInputView'],_0x572860=this['context']['plugins']['get'](y),_0xec432d=_0x572860['getByInnerView'](_0x178394['view']);return _0x572860['activate'](_0xec432d),_0x20e070['once']('editorReady',()=>_0x20e070['focus']()),_0x3cb9f5;}['hasCommentThread'](_0x5c9344){if('string'!=typeof _0x5c9344)throw new _0xd7b9fb('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5c9344);}['updateCommentThread']({channelId:_0x18a834=_t,threadId:_0x1e77a0,context:_0x1818e7,unlinkedAt:_0xafdb92,attributes:_0x2e4f04,isFromAdapter:_0x170d6c=!0x1}){return this['fire'](Nt('updateCommentThread',_0x18a834),{'channelId':_0x18a834,'threadId':_0x1e77a0,'context':_0x1818e7,'unlinkedAt':_0xafdb92,'attributes':_0x2e4f04,'isFromAdapter':_0x170d6c}),this['getCommentThread'](_0x1e77a0);}['getCommentThread'](_0x269710){if('string'!=typeof _0x269710)throw new _0xd7b9fb('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x269710);}['fetchCommentThread']({channelId:_0x18af39,threadId:_0x395e90}={}){const _0x47ddd9=this['getCommentThread'](_0x395e90);if(_0x47ddd9)return Promise['resolve'](_0x47ddd9);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xd7b9fb('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x18af39,'threadId':_0x395e90})['then'](_0x3c054e=>this['hasCommentThread'](_0x395e90)?this['getCommentThread'](_0x395e90):_0x3c054e?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x18af39},_0x3c054e)):void 0x0)['catch'](_0x3c00f0=>{throw console['error'](_0x3c00f0),new _0xd7b9fb('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1d6211,skipNotAttached:_0x5db6fb=!0x1,skipEmpty:_0x23fdd1=!0x1,toJSON:_0x148b36=!0x1}={}){const _0x30b0df=[];for(const _0x3e2e61 of this['_threads']['values']())_0x1d6211&&_0x3e2e61['channelId']!==_0x1d6211||_0x5db6fb&&!_0x3e2e61['isAttached']||_0x23fdd1&&0x0===_0x3e2e61['length']||_0x30b0df['push'](_0x3e2e61);return _0x148b36?_0x30b0df['map'](_0x2aa469=>_0x2aa469['toJSON']()):_0x30b0df;}['getAnnotationForCommentThread'](_0x4657ff){const _0x5a85be=this['_threadToController']['get'](_0x4657ff);if(!_0x5a85be)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x5a85be['view'])||null;}['getCommentThreadForAnnotation'](_0x23430e){const _0x572afb=this['_viewToController']['get'](_0x23430e['innerView']);return _0x572afb?_0x572afb['model']:null;}['setActiveCommentThread'](_0x14b56d){const _0x2a591c=this['context']['plugins']['get'](y);if(!_0x14b56d)return void(this['activeCommentThread']&&_0x2a591c['deactivateAll']());const _0x3d86de=this['getCommentThread'](_0x14b56d);if(!_0x3d86de)throw new _0xd7b9fb('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x14b56d});if(!this['_threadToController']['has'](_0x3d86de))throw new _0xd7b9fb('commentsrepository-active-not-attached',null,{'threadId':_0x14b56d});const _0x420411=_0x2a591c['getByInnerView'](this['_threadToController']['get'](_0x3d86de)['view']);_0x2a591c['activate'](_0x420411);}['switchReadOnly'](_0x17d4ca,_0x407baf){_0x17d4ca?this['_readOnlyChannels']['add'](_0x407baf):this['_readOnlyChannels']['delete'](_0x407baf),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3b30f0){return this['_readOnlyChannels']['has'](_0x3b30f0)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3a8a06,_0x3fbb62){return new vt(_0x3a8a06,_0x3fbb62);}['setPermissions'](_0x281072,_0x3d0b89=_t){this['_permissions']['set'](_0x3d0b89,_0x281072),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1cfeef=_t){return this['_permissions']['has'](_0x1cfeef)?this['_permissions']['get'](_0x1cfeef):bt;}['_addCommentThread']({channelId:_0x51db38,threadId:_0x3d4cff,comments:_0x2f2be7,unlinkedAt:_0x446636,resolvedAt:_0xaf5b48,resolvedBy:_0xf5f1b7,target:_0x34a51e,context:_0x26bee2,attributes:_0x274431,isFromAdapter:_0x17ce30,isResolvable:_0x3c2c48,isSubmitted:_0x4ff762}){if('string'!=typeof _0x3d4cff)throw new _0xd7b9fb('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3d4cff});if(this['hasCommentThread'](_0x3d4cff))throw new _0xd7b9fb('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3d4cff});const _0x48efc2=new pi(this,{'channelId':_0x51db38,'id':_0x3d4cff,'context':_0x26bee2,'attributes':_0x274431,'unlinkedAt':_0x446636,'resolvedAt':_0xaf5b48,'resolvedBy':_0xf5f1b7?this['context']['plugins']['get'](it)['getUser'](_0xf5f1b7):null,'isResolvable':_0x3c2c48,'isSubmitted':_0x4ff762||_0x17ce30});this['_threads']['set'](_0x3d4cff,_0x48efc2);for(const _0x3c25d9 of _0x2f2be7)_0x48efc2['_add'](this['_createNewComment']({'threadId':_0x3d4cff,..._0x3c25d9}));return _0x34a51e&&_0x48efc2['attachTo'](_0x34a51e),_0x17ce30||!_0x48efc2['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x51db38,'threadId':_0x3d4cff});}['_submitCommentThread']({channelId:_0x22220a,threadId:_0x481c6a}){if(!this['hasCommentThread'](_0x481c6a))throw new _0xd7b9fb('commentsrepository-missing-comment-thread',this);const _0x29b913=this['getCommentThread'](_0x481c6a);if(_0x29b913['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x57d1c3,comments:_0x3e8f12,resolvedAt:_0x5d592d,resolvedBy:_0xf41a64,context:_0x4790a9,attributes:_0x5b058f}=_0x29b913,_0xb32cdb=this['context']['plugins']['get']('PendingActions'),_0x11aa22=_0xb32cdb['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x22220a,'threadId':_0x57d1c3,'comments':_0x3e8f12['map'](_0x3e11da=>_0x3e11da['toJSON']()),'resolvedAt':_0x5d592d,'resolvedBy':_0xf41a64?_0xf41a64['id']:_0xf41a64,'context':_0x4790a9,'attributes':_0x5b058f})['then'](({comments:_0x3ca940})=>{_0xb32cdb['remove'](_0x11aa22);for(const _0x4fcd50 of _0x3ca940)this['_updateComment']({'channelId':_0x22220a,'threadId':_0x481c6a,'commentId':_0x4fcd50['commentId'],'createdAt':_0x4fcd50['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5a91a1=>{throw console['error'](_0x5a91a1),new _0xd7b9fb('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4552ae,target:_0x4f6755}){const _0x226672=this['getCommentThread'](_0x4552ae);if(!_0x226672)throw new _0xd7b9fb('commentsrepository-attach-missing-comment-thread',this);const _0x1c4664=this['context']['plugins']['get']('PendingActions'),_0x2ff926=this['context']['plugins']['get'](y),_0x4cd734=this['_createCommentThreadView'](_0x226672),_0x36ddce=new vt(_0x226672,_0x4cd734);let _0x4973cb=null;_0x4cd734['on']('change:isDirty',(_0x4d8414,_0x43ec91,_0x28c97b)=>{_0x28c97b?_0x4973cb=_0x1c4664['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4973cb&&(_0x1c4664['remove'](_0x4973cb),_0x4973cb=null);}),this['_threadToController']['set'](_0x226672,_0x36ddce),this['_viewToController']['set'](_0x4cd734,_0x36ddce);const _0x424571=new E(this['context']['locale'],_0x4cd734);_0x424571['bind']('length')['to'](_0x4cd734),_0x424571['bind']('isDirty')['to'](_0x4cd734,'isDirty',_0x4cd734,'length',(_0x2c16f7,_0x18bd7c)=>_0x2c16f7||!_0x18bd7c),_0x424571['bind']('isActive')['to'](_0x4cd734),_0x424571['type']='comment';const _0x52e8f4=new T({'view':_0x424571,'target':_0x4f6755,'type':'comment','isVisible':!_0x226672['archivedAt']&&!!('function'==typeof _0x4f6755?_0x4f6755():_0x4f6755)});return _0x4cd734['on']('escape',()=>{_0x52e8f4['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4cd734,_0x52e8f4),_0x2ff926['add'](_0x52e8f4),_0x52e8f4;}['_bindAnnotationToEditors'](_0x265da8,_0x51569f){this['listenTo'](_0x265da8,'editorReady',(_0x56c3ed,_0x1c2e68)=>{const _0x38bab8=_0x1c2e68['ui']['view']['body']['bodyCollectionContainer'];_0x51569f['focusableElements']['add'](_0x38bab8),this['context']instanceof _0x22a44e&&this['context']['ui']['focusTracker']['add'](_0x38bab8);},{'priority':'highest'}),this['listenTo'](_0x265da8,'editorDestroyed',(_0x50f47d,_0x454d85)=>{const _0x226cbf=_0x454d85['ui']['view']['body']['bodyCollectionContainer'];_0x51569f['focusableElements']['has'](_0x226cbf)&&_0x51569f['focusableElements']['remove'](_0x226cbf),this['context']instanceof _0x22a44e&&this['context']['ui']['focusTracker']['remove'](_0x226cbf);});}['_unbindEditors'](_0x5124ca){this['stopListening'](_0x5124ca,'editorReady'),this['stopListening'](_0x5124ca,'editorDestroyed');}['_createCommentThreadView'](_0x230e0c){const _0x382140=this['context']['plugins']['get'](it),{config:_0x3e63d9,locale:_0x31ddef}=this['context'],_0x3a49f7=pt(_0x3e63d9['get']('locale'),_0x31ddef);return new(0x0,(_0x3e63d9['get']('comments'))['CommentThreadView'])(_0x31ddef,_0x230e0c,_0x382140['me'],{'editorConfig':{..._0x3e63d9['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3e63d9['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3e63d9['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3e63d9['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3e63d9['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3a49f7,'CommentView':_0x3e63d9['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5dffd7,channelId:_0x52b4f6,resolvedAt:_0x5d5848,resolvedBy:_0x43f165,isFromAdapter:_0x523a03}){if(!this['hasCommentThread'](_0x5dffd7))throw new _0xd7b9fb('commentsrepository-missing-comment-thread',null,{'threadId':_0x5dffd7});const _0x3b0edb=this['getCommentThread'](_0x5dffd7);if(_0x3b0edb['isResolved'])throw new _0xd7b9fb('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5dffd7});const _0x55217c=this['context']['plugins']['get'](it);if(_0x3b0edb['resolvedBy']=_0x55217c['getUser'](_0x43f165),_0x3b0edb['resolvedAt']=_0x5d5848,_0x523a03||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3d3a55=this['context']['plugins']['get']('PendingActions'),_0x5ebd17=_0x3d3a55['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x52b4f6,'threadId':_0x5dffd7})['then'](({resolvedAt:_0x230e9e,resolvedBy:_0x3f387c})=>{_0x3d3a55['remove'](_0x5ebd17),_0x3b0edb['resolvedBy']['id']!==_0x3f387c&&(_0x3b0edb['resolvedBy']=_0x55217c['getUser'](_0x3f387c)),_0x3b0edb['resolvedAt']=_0x230e9e;})['catch'](_0xc19179=>{throw console['error'](_0xc19179),new _0xd7b9fb('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5c69f2,channelId:_0x37f877,isFromAdapter:_0x4a720c}){if(!this['hasCommentThread'](_0x5c69f2))throw new _0xd7b9fb('commentsrepository-missing-comment-thread',null,{'threadId':_0x5c69f2});const _0x176ef9=this['getCommentThread'](_0x5c69f2);if(!_0x176ef9['isResolved'])throw new _0xd7b9fb('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5c69f2});if(_0x176ef9['resolvedBy']=null,_0x176ef9['resolvedAt']=null,_0x4a720c||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x30d07e=this['context']['plugins']['get']('PendingActions'),_0x1c54e4=_0x30d07e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x37f877,'threadId':_0x5c69f2})['then'](()=>_0x30d07e['remove'](_0x1c54e4))['catch'](_0x8e8f59=>{throw console['error'](_0x8e8f59),new _0xd7b9fb('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2ad614,isFromAdapter:_0x43b5ac}){const _0x16ba63=this['getCommentThread'](_0x2ad614);if(!_0x16ba63)throw new _0xd7b9fb('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2ad614),this['_threads']['delete'](_0x2ad614),!_0x16ba63['isSubmitted']||_0x43b5ac||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x127320=this['context']['plugins']['get']('PendingActions'),{channelId:_0x522ce8}=_0x16ba63,_0x6d50ed=_0x127320['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x522ce8,'threadId':_0x2ad614})['then'](()=>_0x127320['remove'](_0x6d50ed))['catch'](_0x531f5c=>{throw console['error'](_0x531f5c),new _0xd7b9fb('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3c02a2,unlinkedAt:_0x57c8ba,context:_0x2fda28,attributes:_0x27c3f2,isFromAdapter:_0x570118}){if('string'!=typeof _0x3c02a2)throw new _0xd7b9fb('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3c02a2});if(!this['hasCommentThread'](_0x3c02a2))throw new _0xd7b9fb('commentsrepository-missing-comment-thread',null,{'threadId':_0x3c02a2});const _0x1398ff=this['getCommentThread'](_0x3c02a2);let _0x394b02=!0x1;if(void 0x0!==_0x2fda28&&_0x1398ff['context']!==_0x2fda28&&(_0x1398ff['context']=_0x2fda28,_0x394b02=!0x0),void 0x0!==_0x57c8ba&&_0x1398ff['unlinkedAt']!==_0x57c8ba&&(_0x1398ff['unlinkedAt']=_0x57c8ba,_0x394b02=!0x0),_0x27c3f2&&!At(_0x27c3f2,_0x1398ff['attributes'])&&(_0x1398ff['attributes']=_0x27c3f2,_0x394b02=!0x0),!_0x394b02)return Promise['resolve']();if(!_0x1398ff['isSubmitted']||_0x570118||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xc6b000=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a864a}=_0x1398ff,_0x40f573=_0xc6b000['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2a864a,'threadId':_0x3c02a2,'context':_0x2fda28,'unlinkedAt':_0x57c8ba,'attributes':_0x27c3f2})['then'](()=>_0xc6b000['remove'](_0x40f573))['catch'](_0x311ef1=>{throw console['error'](_0x311ef1),new _0xd7b9fb('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x5ba991){const _0xf9367d=this['context']['plugins']['get'](y),_0x441799=this['getCommentThread'](_0x5ba991);if(_0x441799['_isAttached']=!0x1,this['_threadToController']['has'](_0x441799)){const _0x4c5602=this['_threadToController']['get'](_0x441799),_0x185ba9=_0x4c5602['view'],_0x1a9514=_0xf9367d['getByInnerView'](_0x185ba9);this['_threadToController']['delete'](_0x441799),this['_viewToController']['delete'](_0x185ba9),_0x1a9514&&_0xf9367d['remove'](_0x1a9514),_0x4c5602['destroy'](),_0x185ba9['destroy']()['then'](()=>{this['_unbindEditors'](_0x185ba9);});}}['_updateActiveAnnotation']({threadId:_0x1fe507,resolvedAt:_0x1d2505,unlinkedAt:_0x446b53}){const _0x2a1e10=!!_0x1d2505,_0x1250eb=this['context']['plugins']['get'](y),_0x37384c=this['getCommentThread'](_0x1fe507);if(this['_threadToController']['has'](_0x37384c)){const _0x288c74=this['_threadToController']['get'](_0x37384c)['view'],_0x217a74=_0x1250eb['getByInnerView'](_0x288c74);_0x217a74&&(_0x2a1e10&&_0x1250eb['_removeActiveAnnotation'](_0x217a74),_0x446b53?_0x217a74['isVisible']=!0x1:_0x217a74['refreshVisibility']());}}['_getExternalAuthor'](_0x5b654e){const _0x3b8ce2=this['context']['plugins']['get'](it),_0xe8796d=It('external:'+_0x5b654e),_0x5b8edf=_0x3b8ce2['getUser'](_0xe8796d);return _0x5b8edf||_0x3b8ce2['addUser']({'id':_0xe8796d,'name':_0x5b654e});}['_createNewComment']({threadId:_0x27d994,commentId:_0x2d2c37=_0x14661f(),content:_0x23c5b9,authorId:_0xb5b6b8,createdAt:_0x3d5bea,attributes:_0x1d8dfa}){if('string'!=typeof _0x2d2c37)throw new _0xd7b9fb('commentsrepository-invalid-commentid');if('string'!=typeof _0xb5b6b8)throw new _0xd7b9fb('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x23c5b9||!_0x23c5b9['trim']())throw new _0xd7b9fb('commentsrepository-invalid-comment-content');const _0x54bae5=this['context']['plugins']['get'](it)['getUser'](_0xb5b6b8);if(!_0x54bae5)throw new _0xd7b9fb('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xb5b6b8});let _0x1a45ac=null,_0x4172df=_0x3d5bea;return _0x1d8dfa?.['@external']&&(_0x1a45ac=this['_getExternalAuthor'](_0x1d8dfa['@external']['authorName']),_0x4172df=new Date(_0x1d8dfa['@external']['createdAt'])),new wi(this,{'threadId':_0x27d994,'id':_0x2d2c37,'author':_0x1a45ac||_0x54bae5,'creator':_0x54bae5,'content':_0x23c5b9,'createdAt':_0x3d5bea,'authoredAt':_0x4172df,'attributes':_0x1d8dfa});}['_addComment'](_0x49fe0f){let {threadId:_0x3c256e,content:_0x26ccdc,attributes:_0x429fdd,isFromAdapter:_0x2618de}=_0x49fe0f;const _0x2cc654=this['getCommentThread'](_0x49fe0f['threadId']);if(!_0x2cc654)throw new _0xd7b9fb('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x50af6c=this['_createNewComment'](_0x49fe0f),{id:_0x1bcf7a}=_0x50af6c;if(_0x2cc654['_add'](_0x50af6c),_0x2618de||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2cc654['isSubmitted'])return Promise['resolve']();const _0x245518=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3dc6b5}=_0x2cc654,_0x2f6b39=_0x245518['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x429fdd||(_0x429fdd={}),this['adapter']['addComment']({'channelId':_0x3dc6b5,'threadId':_0x3c256e,'commentId':_0x1bcf7a,'content':_0x26ccdc,'attributes':_0x429fdd})['then'](_0x282803=>{_0x245518['remove'](_0x2f6b39),_0x282803&&this['_updateComment']({'channelId':_0x3dc6b5,'threadId':_0x3c256e,'commentId':_0x1bcf7a,'createdAt':_0x282803['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1ca638=>{throw console['error'](_0x1ca638),new _0xd7b9fb('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x309e95,commentId:_0x49c0b9,content:_0x547448,createdAt:_0x29aa0f,attributes:_0x22036b,isFromAdapter:_0x365039}){if(void 0x0!==_0x547448&&('string'!=typeof _0x547448||!_0x547448['trim']()['length']))throw new _0xd7b9fb('commentsrepository-update-comment-invalid-content');const _0xb2c25=this['getCommentThread'](_0x309e95),_0x49cf9b=_0xb2c25['getComment'](_0x49c0b9);if(!_0x49cf9b)throw new _0xd7b9fb('commentsrepository-update-missing-comment',this);let _0x36b482=!0x1;if(_0x547448&&_0x547448!==_0x49cf9b['content']&&(_0x49cf9b['isEditable']||_0x365039)&&(_0x49cf9b['content']=_0x547448,_0x36b482=!0x0),_0x29aa0f&&_0x29aa0f!==_0x49cf9b['createdAt']&&(_0x49cf9b['createdAt']=_0x29aa0f,_0x49cf9b['attributes']&&_0x49cf9b['attributes']['@external']||(_0x49cf9b['authoredAt']=_0x29aa0f),_0x36b482=!0x0),_0x22036b&&!At(_0x22036b,_0x49cf9b['attributes'])&&(_0x49cf9b['attributes']=_0x22036b,_0x36b482=!0x0),!_0x36b482)return Promise['resolve']();if(_0xb2c25['fire']('commentUpdated'),_0x365039||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5610e8=this['context']['plugins']['get']('PendingActions'),{channelId:_0xed5f6f}=this['getCommentThread'](_0x49cf9b['threadId']),_0x32d628=_0x5610e8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xed5f6f,'threadId':_0x309e95,'commentId':_0x49c0b9,'content':_0x547448,'attributes':_0x22036b})['then'](()=>_0x5610e8['remove'](_0x32d628))['catch'](_0x552050=>{throw console['error'](_0x552050),new _0xd7b9fb('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x26578d,commentId:_0x28dfac,isFromAdapter:_0x21d9f7}){const _0x350802=this['getCommentThread'](_0x26578d),_0x18273f=_0x350802['getComment'](_0x28dfac);if(!_0x18273f)throw new _0xd7b9fb('commentsrepository-remove-missing-comment',this);if(_0x350802['_remove'](_0x18273f),_0x21d9f7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x1b50fc=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30b166}=_0x350802,_0x1b7505=_0x1b50fc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x30b166,'threadId':_0x26578d,'commentId':_0x28dfac})['then'](()=>_0x1b50fc['remove'](_0x1b7505))['catch'](_0x6ed77d=>{throw console['error'](_0x6ed77d),new _0xd7b9fb('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0xca3058(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x20d44e,_0x28845a){super();const _0x4d84bb=_0x20d44e['context']['plugins']['get'](it)['me'],_0x392588=_0x20d44e['getCommentThread'](_0x28845a['threadId']),_0x3d7e45=0x0===_0x392588['comments']['length'],_0x11ca52=_0x4d84bb===_0x28845a['author'];this['id']=_0x28845a['id'],this['threadId']=_0x28845a['threadId'],this['author']=_0x28845a['author'],this['creator']=_0x28845a['creator'],this['isExternal']=Boolean(_0x28845a['attributes']&&_0x28845a['attributes']['@external']),this['set']('content',_0x28845a['content']),this['createdAt']=_0x28845a['createdAt']||new Date(),this['set']('authoredAt',_0x28845a['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x392588,'resolvedAt'),this['set']('attributes',_0x28845a['attributes']||{}),this['bind']('isEditable')['to'](_0x20d44e,'_permissions',()=>{const _0x20b1db=_0x20d44e['getPermissions'](_0x392588['channelId'])['write'],_0x3c97dc=_0x20d44e['getPermissions'](_0x392588['channelId'])['modifyAll'];return _0x11ca52&&_0x20b1db||!_0x11ca52&&_0x3c97dc;}),this['bind']('isRemovable')['to'](_0x392588,'isRemovable',_0x20d44e,'_permissions',_0x498b40=>{const _0xd1c51e=_0x20d44e['getPermissions'](_0x392588['channelId'])['write'],_0x35035c=_0x20d44e['getPermissions'](_0x392588['channelId'])['modifyAll'];return _0x11ca52&&_0xd1c51e||_0x498b40&&_0x3d7e45||!_0x11ca52&&_0x35035c&&!_0x3d7e45;}),this['bind']('isReadOnly')['to'](_0x392588,'isReadOnly'),this['_repository']=_0x20d44e;}get['weight'](){return Math['max'](function(_0x3a815a){const _0x2494a0=document['createElement']('div');return _0x2494a0['innerHTML']=_0x3a815a,_0x2494a0['textContent']['length'];}(this['content']),0xc8);}['update'](_0x4774e8){const {threadId:_0x311a8a,id:_0x120ba1}=this;if(!this['_repository']['hasCommentThread'](_0x311a8a))throw new _0xd7b9fb('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x24ebef}=this['_repository']['getCommentThread'](_0x311a8a);this['_repository']['fire'](Nt('updateComment',_0x24ebef,_0x311a8a),{'channelId':_0x24ebef,'threadId':_0x311a8a,'commentId':_0x120ba1,..._0x4774e8});}['setAttribute'](_0x430ff1,_0x36fc2c){const _0x57303f=wt(this['attributes']);yt(_0x57303f,_0x430ff1,_0x36fc2c),this['update']({'attributes':_0x57303f});}['removeAttribute'](_0x598769){const _0x3d42ee=wt(this['attributes']);Ct(_0x3d42ee,_0x598769),this['update']({'attributes':_0x3d42ee});}['remove'](_0x1c9a89={}){if(!_0x1c9a89['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x3b914c,id:_0x2cc7d8}=this;if(!this['_repository']['hasCommentThread'](_0x3b914c))throw new _0xd7b9fb('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4ce589}=this['_repository']['getCommentThread'](_0x3b914c);this['_repository']['fire'](Nt('removeComment',_0x4ce589,_0x3b914c),{'channelId':_0x4ce589,'threadId':_0x3b914c,'commentId':_0x2cc7d8,..._0x1c9a89});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x2e1386,..._0x3293ce){for(const _0x511c50 of _0x3293ce)void 0x0!==_0x511c50&&(_0x2e1386+=':'+String(_0x511c50));return _0x2e1386;}class ot extends _0x296d98{constructor(_0x2db86e){super(_0x2db86e),this['set']('hasContent',!0x1);}['refresh'](){const _0x5172dd=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x43b5f7 of _0x5172dd['getRanges']())if(this['_hasContent'](_0x43b5f7))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x34b732=_0x14661f(),ranges:_0x271243,comment:_0x19badf}={}){const _0x5c6dfc=this['editor']['model'],_0x4387af=_0x271243??Array['from'](_0x5c6dfc['document']['selection']['getRanges']()),_0x53e7ea=[];for(const _0x5ac6d2 of _0x4387af)this['_hasContent'](_0x5ac6d2)&&_0x53e7ea['push'](this['_trimToContent'](_0x5ac6d2));if(!_0x53e7ea['length'])throw new _0xd7b9fb('addcommentthreadcommand-incorrect-ranges',null);_0x19badf&&this['_createCommentThread'](_0x34b732,_0x19badf),this['_createMarkersFromRanges'](_0x34b732,_0x53e7ea,!!_0x19badf);}['_createMarkersFromRanges'](_0x504734,_0x5ab299,_0x29927e){this['editor']['model']['change'](_0x243fa1=>{for(const _0x167c9a of _0x5ab299){const _0x2ded3d=_0x14661f()['substr'](0x1,0x5),_0x36e7c7='comment:'+_0x504734+':'+_0x2ded3d;_0x243fa1['addMarker'](_0x36e7c7,{'range':_0x167c9a,'usingOperation':_0x29927e,'affectsData':_0x29927e});}});}['_createCommentThread'](_0x3bb312,_0x54b347){const _0x21b80d=this['editor']['plugins']['get']('CommentsRepository'),_0x55f511=this['editor']['config']['get']('collaboration.channelId'),_0x45b2bc=this['editor']['plugins']['get']('Users')['me'];if(!_0x45b2bc)throw new _0xd7b9fb('addcommentthreadcommand-user-not-found',null);_0x21b80d['addCommentThread']({'threadId':_0x3bb312,'channelId':_0x55f511,'comments':[{'authorId':_0x45b2bc['id'],'content':_0x54b347,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x2cb536){for(const _0xe67dfb of _0x2cb536['getItems']())if(this['_itemIsContent'](_0xe67dfb))return!0x0;return!0x1;}['_itemIsContent'](_0x42a677){return _0x42a677['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x42a677)&&!_0x42a677['is']('element','tableCell');}['_trimToContent'](_0x334579){const _0x1fa50d=_0x2160ee=>!this['_itemIsContent'](_0x2160ee['item']),_0x53ee5b=_0x334579['start']['getLastMatchingPosition'](_0x1fa50d),_0xd85e5=_0x334579['end']['getLastMatchingPosition'](_0x1fa50d,{'direction':'backward'});return this['editor']['model']['createRange'](_0x53ee5b,_0xd85e5);}}class b extends _0x25b6bf{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2a17ce){super(_0x2a17ce),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x20dbdd=this['editor'],_0x2c7422=_0x20dbdd['model']['document']['selection'],_0x3b1beb=_0x46ba7a(()=>this['refreshSelectedViews'](),0xa);_0x2c7422['on']('change:range',(_0x543f8d,_0x4c28ad)=>{_0x4c28ad['directChange']&&(_0x3b1beb['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x20dbdd['editing']['view']['document'],'change:isFocused',(_0x128a63,_0x4b7d63,_0xb2df1)=>{_0xb2df1&&_0x3b1beb();}),this['listenTo'](_0x20dbdd['ui']['focusTracker'],'change:isFocused',(_0x57f112,_0x411ee4,_0x57f938)=>{_0x57f938||this['fire']('blur',{'isAnnotationTracked':_0x681814=>this['_editorAnnotationsData']['has'](_0x681814['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1a57a0){if(this['_editorAnnotations']['has'](_0x1a57a0['view']))return;this['_editorAnnotations']['add'](_0x1a57a0['view']),this['editor']['ui']['focusTracker']['add'](_0x1a57a0['view']['element']);const _0x20e0a9=this['editor']['plugins']['get'](y);this['listenTo'](_0x20e0a9['collection'],'remove',(_0x59756b,_0x174436)=>{this['editor']['ui']['focusTracker']['remove'](_0x174436['view']['element']),this['_editorAnnotations']['delete'](_0x174436['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x156851){if('function'!=typeof _0x156851)throw new _0xd7b9fb('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x156851);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x847f73,annotations:_0x3b5ff0}){const _0x8c7365=[],_0x54519=this['editor']['model']['document']['selection'],_0x8cac56=Array['from'](_0x54519['getRanges']());for(const [_0x2dd42a,_0x4035bc]of this['_editorAnnotationsData']){const _0x370ff3=_0x5ceffe(_0x4035bc),_0x39610=_0x3b5ff0['getByInnerView'](_0x2dd42a);_0x370ff3&&_0x39610&&_0x8c7365['push']({'annotation':_0x39610,'range':_0x370ff3});}function _0x5ceffe(_0x188e6f){for(const _0x5663db of _0x188e6f)for(const _0x420d42 of _0x8cac56)if(_0x5663db['containsRange'](_0x420d42,!_0x54519['isCollapsed']))return _0x5663db;return null;}return _0x8c7365['sort']((_0x2ae7d4,_0x397ab9)=>{const _0x22a9de=_0x2ae7d4['range'],_0x43afd3=_0x397ab9['range'];if(!_0x22a9de['isEqual'](_0x43afd3)){if(_0x22a9de['containsRange'](_0x43afd3,!0x0))return 0x1;if(_0x43afd3['containsRange'](_0x22a9de,!0x0))return-0x1;}return _0x2ae7d4['annotation']==_0x847f73?-0x1:_0x397ab9['annotation']==_0x847f73?0x1:0x0;})['map'](_0x2c8e7a=>_0x2c8e7a['annotation']);}get['_editorAnnotationsData'](){const _0x351633=new Map();for(const _0x31ce1c of Array['from'](this['_dataCollectors']))for(const [_0x3c1ec8,_0x32f3a1]of _0x31ce1c())_0x351633['set'](_0x3c1ec8,_0x32f3a1);return _0x351633;}}class st extends _0x25b6bf{['afterInit'](){const _0x30dfac=this['editor'];if(!_0x30dfac['plugins']['has']('RestrictedEditingModeEditing'))return;_0x30dfac['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x25b6bf{constructor(_0x49d25e){super(_0x49d25e),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1ae99c=this['editor'],_0x22844c=_0x1ae99c['commands']['get']('importWord'),_0x3afbda=_0x1ae99c['plugins']['get'](it);_0x22844c&&(_0x22844c['on']('execute',(_0x8a3b02,[,_0x49511])=>{_0x49511['collaboration_features']={'comments':!0x0,'user_id':_0x3afbda['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x22844c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x3d94c7,_0x277d88){const {comment_threads:_0x2ef4a7}=_0x277d88;_0x2ef4a7&&_0x2ef4a7['forEach'](({thread_id:_0xc9160b,comments:_0x190bb7,is_resolved:_0x3ac300})=>{const _0x40bc24=new Date(),_0x23e744=_0x190bb7['map'](({author:_0x1e8248,content:_0x119c03,created_at:_0x852455})=>({'content':_0x119c03,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x40bc24,'attributes':{'@external':{'authorName':_0x1e8248,'createdAt':_0x852455?new Date(_0x852455):new Date(),'source':'importWord'}}})),_0xe73ded=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xe73ded,'threadId':_0xc9160b,'comments':_0x23e744,'resolvedAt':_0x3ac300?_0x40bc24:null});});}}class at extends _0x25b6bf{constructor(_0x12c595){super(_0x12c595),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x140717=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x140717,'contentInsertion',(_0x29edbf,_0x1412a4)=>this['_removeMarkersWithoutThreads'](_0x1412a4['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x32364b){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x32364b;const _0x3c139b=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4d8974 of _0x32364b['keys']()){const [_0x46baef,_0x21a378]=_0x4d8974['split'](':');'comment'!=_0x46baef||_0x3c139b['hasCommentThread'](_0x21a378)||_0x32364b['delete'](_0x4d8974);}return _0x32364b;}['_registerMarkerInClipboardPipeline'](){const _0x24e9cc=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3ba415=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3ba415&&_0x24e9cc['_registerMarkerToCopy']('comment',_0x3ba415);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x216f6d){switch(_0x216f6d){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x531e2c){const _0x2bc5d2=_0x531e2c['split'](':');return{'group':_0x2bc5d2[0x0],'id':_0x2bc5d2[0x1],'part':_0x2bc5d2[0x2]};}class ut extends _0x25b6bf{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x581904,_0x5e5122)=>{if(!_0x5e5122['options']['showCommentHighlights'])return null;if(_0x5e5122['options']['ignoreResolvedComments']){const {id:_0x421536}=ft(_0x581904['markerName']),_0x54efb5=this['editor']['plugins']['get'](o);if(_0x54efb5['getCommentThread'](_0x421536)?.['isResolved']&&_0x581904['item'])return _0x5e5122['consumable']['consume'](_0x581904['item'],'addMarker:'+_0x581904['markerName']),_0x5e5122['consumable']['consume'](_0x581904['item'],'removeMarker:'+_0x581904['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x14a913=>{_0x14a913['on']('addMarker:comment',(_0x10847e,_0x506623,_0x4464c6)=>{if(!_0x4464c6['options']['showCommentHighlights'])return;const _0x1df9ba=_0x506623['item'];if(!_0x1df9ba)return;const _0xa3c77d=_0x4464c6['mapper']['toViewElement'](_0x1df9ba);this['editor']['model']['schema']['isObject'](_0x1df9ba)&&_0xa3c77d&&!_0xa3c77d['getCustomProperty']('widget')&&_0xa3c77d['is']('containerElement')&&_0x631d41(_0xa3c77d,_0x4464c6['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x466c36,{writer:_0x316e51,options:_0x2dcb97})=>{if(!_0x2dcb97['showCommentHighlights'])return null;const _0x245685=_0x316e51['createContainerElement']('div'),_0x50c80=_0x316e51['createEmptyElement']('hr');return _0x316e51['addClass']('ck-horizontal-line',_0x245685),_0x316e51['insert'](_0x316e51['createPositionAt'](_0x245685,0x0),_0x50c80),_0x245685;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x46511e,{writer:_0x56b82e,options:_0x11fea5})=>{if(!_0x11fea5['showCommentHighlights'])return null;const _0x140c33=_0x56b82e['createContainerElement']('span'),_0x119ba0=_0x56b82e['createEmptyElement']('img');return _0x56b82e['addClass']('image-inline',_0x140c33),_0x56b82e['insert'](_0x56b82e['createPositionAt'](_0x140c33,0x0),_0x119ba0),_0x140c33;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xa8b82,{writer:_0x2bba03,options:_0x38f0ba})=>{if(_0x38f0ba['showCommentHighlights'])return _0x2bba03['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4c9e86,_0x138673,_0x2d9be0)=>{_0x2d9be0['options']['showCommentHighlights']&&_0x4c9e86['stop']();},{'priority':'high'});}}class r extends _0x25b6bf{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(_0x121e33){super(_0x121e33),this['set']('isThreadsLoadingPaused',!0x0),_0x121e33['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1c8790,_0xf818ac,_0x5ea72c,_0x2726cb)=>{const _0x2b8f0b=_0x121e33['plugins']['get'](o),_0x4b2296=_0x5ea72c?ft(_0x5ea72c)['id']:null;_0x121e33['model']['change'](()=>{if(_0x4b2296){const _0x53941d=this['getAllMarkersForId'](_0x4b2296);for(const _0x50d915 of _0x53941d)_0x121e33['editing']['reconvertMarker'](_0x50d915);}if(_0x2726cb){const {id:_0x4da8e0}=ft(_0x2726cb),_0x2bda23=_0x2b8f0b['getCommentThread'](_0x4da8e0);if(_0x2bda23&&_0x2bda23['unlinkedAt'])return;if(_0x2bda23&&!_0x2bda23['isAttached'])return;const _0x2e9b07=this['getAllMarkersForId'](_0x4da8e0);for(const _0x1c2b33 of _0x2e9b07)_0x121e33['editing']['reconvertMarker'](_0x1c2b33);}}),_0x4b2296&&this['scrollToThreadMarker'](_0x4b2296);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2adeff=this['editor'],_0x2101ab=_0x2adeff['plugins']['get'](o),_0xdc8a59=_0x2adeff['config']['get']('collaboration.channelId'),_0x372689=_0x2101ab['getCommentThreads']()['filter'](_0x32457c=>_0x32457c['channelId']!==_0xdc8a59);_0x2adeff['commands']['add']('addCommentThread',new ot(_0x2adeff)),this['listenTo'](_0x2adeff,'change:isReadOnly',(_0x258a48,_0x1d2bc4,_0x391c83)=>{_0x2101ab['switchReadOnly'](_0x391c83,_0x2adeff['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x2101ab,dt('addCommentThread',_0xdc8a59),(_0x1b7063,{threadId:_0x1f40d6})=>{const _0x585a3e=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1f40d6);_0x585a3e?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1f40d6);}),this['listenTo'](_0x2101ab,dt('removeCommentThread',_0xdc8a59),(_0x4adbbf,{threadId:_0x6dc3de})=>{_0x2adeff['model']['enqueueChange']({'isUndoable':!0x1},_0x2c0cd3=>{const _0x3e6e82=this['getAllMarkersForId'](_0x6dc3de);for(const _0x1624d0 of _0x3e6e82)_0x2c0cd3['removeMarker'](_0x1624d0);});}),this['listenTo'](_0x2101ab,dt('resolveCommentThread',_0xdc8a59),(_0x4bc1a9,{threadId:_0x4e4976})=>{(this['_reconvertMarkers'](_0x4e4976),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x4e4976)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x2101ab,dt('reopenCommentThread',_0xdc8a59),(_0x501f75,{threadId:_0x297513})=>{this['_reconvertMarkers'](_0x297513);},{'priority':'low'}),this['listenTo'](_0x2101ab,dt('addComment',_0xdc8a59),(_0x4e4b84,{threadId:_0x13c563,isFromAdapter:_0x5f310f})=>{const _0x21de02=this['getAllMarkersForId'](_0x13c563);if(_0x5f310f||0x0==_0x21de02['length']||!_0x2101ab['hasCommentThread'](_0x13c563))return;0x1===_0x2101ab['getCommentThread'](_0x13c563)['length']&&_0x2adeff['model']['enqueueChange']({'isUndoable':!0x1},_0x554dd3=>{for(const _0xd846cf of _0x21de02)_0x554dd3['updateMarker'](_0xd846cf,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x372689);}['afterInit'](){!async function(_0x31519f){const _0x5aefdc=_0x310aa0([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x3bdae4=0x73460ab3,_0x584f6f=0x73418c1b^_0x3bdae4,_0x3732bb=window[_0x310aa0([0x44,0x61,0x74,0x65])][_0x310aa0([0x6e,0x6f,0x77])](),_0x5c7091=_0x31519f[_0x310aa0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x219745=new window[(_0x310aa0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x78e5bc=>{_0x5c7091[_0x310aa0([0x6f,0x6e,0x63,0x65])](_0x310aa0([0x72,0x65,0x61,0x64,0x79]),_0x78e5bc);}),_0x3aa57d={[_0x310aa0([0x6b,0x74,0x79])]:_0x310aa0([0x45,0x43]),[_0x310aa0([0x75,0x73,0x65])]:_0x310aa0([0x73,0x69,0x67]),[_0x310aa0([0x63,0x72,0x76])]:_0x310aa0([0x50,0x2d,0x32,0x35,0x36]),[_0x310aa0([0x78])]:_0x310aa0([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]),[_0x310aa0([0x79])]:_0x310aa0([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]),[_0x310aa0([0x61,0x6c,0x67])]:_0x310aa0([0x45,0x53,0x32,0x35,0x36])},_0x5b698a=_0x5c7091[_0x310aa0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x310aa0([0x67,0x65,0x74])](_0x310aa0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x240e08(){let _0x151168,_0x47ebeb=null,_0x16b4cf=null;try{if(_0x5b698a==_0x310aa0([0x47,0x50,0x4c]))return _0x310aa0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x151168=_0x18d24e(),!_0x151168)return _0x310aa0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x151168[_0x310aa0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x16b4cf=_0x46b606(_0x151168[_0x310aa0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x151168[_0x310aa0([0x6a,0x74,0x69])])),await _0x42911d()?_0x4d07dd()?_0x58ce1()?_0x310aa0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5aed0f()?(_0x151168[_0x310aa0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x310aa0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x47ebeb=_0x32cfd4(_0x310aa0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2c01e7()):_0x310aa0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x310aa0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x310aa0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x310aa0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x58ce1(){const _0x12e298=[_0x310aa0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x310aa0([0x74,0x72,0x69,0x61,0x6c])][_0x310aa0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x151168[_0x310aa0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x3732bb/0x3e8:0xe10*_0x584f6f;return _0x151168[_0x310aa0([0x65,0x78,0x70])]<_0x12e298;}function _0x4d07dd(){const _0x53e4d9=_0x151168[_0x310aa0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x53e4d9)return!0x1;if(_0x53e4d9[_0x310aa0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310aa0([0x2a])))return!0x0;if(_0x53e4d9[_0x310aa0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310aa0([0x43,0x4d,0x54])))return!0x0;if(_0x53e4d9[_0x310aa0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310aa0([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x970364())return!0x0;if(_0x53e4d9[_0x310aa0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310aa0([0x52,0x43,0x4d,0x54]))){if(_0xbfad26())return!0x0;if(_0x277df0()||_0x2f67f7())return!0x0;}return!0x1;}function _0x5aed0f(){const _0x29dec3=_0x151168[_0x310aa0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x29dec3||0x0==_0x29dec3[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2a0fdd}=new URL(window[_0x310aa0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x29dec3[_0x310aa0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a0fdd))return!0x0;const _0x37f917=_0x2a0fdd[_0x310aa0([0x73,0x70,0x6c,0x69,0x74])](_0x310aa0([0x2e]));return _0x29dec3[_0x310aa0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x438db8=>_0x438db8[_0x310aa0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x310aa0([0x2a])))[_0x310aa0([0x6d,0x61,0x70])](_0x3bf971=>_0x3bf971[_0x310aa0([0x73,0x70,0x6c,0x69,0x74])](_0x310aa0([0x2e])))[_0x310aa0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x35d3e9=>_0x35d3e9[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x37f917[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x310aa0([0x6d,0x61,0x70])](_0x3ce0b9=>Array(_0x37f917[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3ce0b9[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x310aa0([0x66,0x69,0x6c,0x6c])](_0x3ce0b9[0x0]===_0x310aa0([0x2a])?_0x310aa0([0x2a]):'')[_0x310aa0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3ce0b9))[_0x310aa0([0x73,0x6f,0x6d,0x65])](_0x573a1e=>_0x37f917[_0x310aa0([0x65,0x76,0x65,0x72,0x79])]((_0x363e62,_0x577176)=>_0x573a1e[_0x577176]===_0x363e62||_0x573a1e[_0x577176]===_0x310aa0([0x2a])));}function _0x2c01e7(){return _0x47ebeb&&_0x16b4cf?new window[(_0x310aa0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1bd6b4,_0x55bccb)=>{_0x47ebeb[_0x310aa0([0x74,0x68,0x65,0x6e])](_0x1bd6b4,_0x55bccb),_0x16b4cf[_0x310aa0([0x74,0x68,0x65,0x6e])](_0x20ba45=>{_0x20ba45!=_0x310aa0([0x56,0x61,0x6c,0x69,0x64])&&_0x1bd6b4(_0x20ba45);},_0x55bccb);}):_0x47ebeb||_0x16b4cf||_0x310aa0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x46b606(_0x5d1e97,_0x4621c7){return new window[(_0x310aa0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9d6cb6=>{if(_0x48f193())return _0x9d6cb6(_0x310aa0([0x56,0x61,0x6c,0x69,0x64]));_0x3b5138(),_0x5c7091[_0x310aa0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x310aa0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x36da7f=!0x1;const _0x224e51=_0x14661f();function _0x299654(_0x5af3e4){return!!_0x5af3e4&&(typeof _0x5af3e4===_0x310aa0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x5af3e4===_0x310aa0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x5af3e4[_0x310aa0([0x74,0x68,0x65,0x6e])]===_0x310aa0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x5af3e4[_0x310aa0([0x63,0x61,0x74,0x63,0x68])]===_0x310aa0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x12bf11(_0x5b9ac2){_0x3cbe0d(_0x5b9ac2)[_0x310aa0([0x74,0x68,0x65,0x6e])](_0x1059f4=>{if(!_0x1059f4||_0x1059f4[_0x310aa0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x310aa0([0x6f,0x6b]))return _0x310aa0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x36d8d3(_0x56c4e6(_0x224e51+_0x4621c7))!=_0x1059f4[_0x310aa0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x310aa0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x310aa0([0x56,0x61,0x6c,0x69,0x64]);})[_0x310aa0([0x74,0x68,0x65,0x6e])](_0x1dd389=>(_0x39d532(),_0x1dd389),()=>{const _0x204020=_0x299004();return null==_0x204020?(_0x39d532(),_0x310aa0([0x56,0x61,0x6c,0x69,0x64])):_0x310aa0(_0x3732bb-_0x204020>(0x574a8eb3^_0x3bdae4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x310aa0([0x74,0x68,0x65,0x6e])](_0x9d6cb6)[_0x310aa0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x9d6cb6(_0x310aa0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x33f97d=0x7370e433^_0x3bdae4;function _0x39d532(){const _0x3eb25d=_0x310aa0([0x6c,0x6c,0x63,0x74,0x2d])+_0x36d8d3(_0x56c4e6(_0x5d1e97)),_0xd727fe=_0x23580c(_0x36d8d3(window[_0x310aa0([0x4d,0x61,0x74,0x68])][_0x310aa0([0x63,0x65,0x69,0x6c])](_0x3732bb/_0x33f97d)));window[_0x310aa0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x310aa0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3eb25d,_0xd727fe);}function _0x299004(){const _0x4d0fd4=_0x310aa0([0x6c,0x6c,0x63,0x74,0x2d])+_0x36d8d3(_0x56c4e6(_0x5d1e97)),_0x308c98=window[_0x310aa0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x310aa0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4d0fd4);return _0x308c98?window[_0x310aa0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x23580c(_0x308c98),0x10)*_0x33f97d:null;}function _0x3cbe0d(_0x58b92a){return new window[(_0x310aa0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4bcb08,_0x5d0b59)=>{_0x58b92a[_0x310aa0([0x74,0x68,0x65,0x6e])](_0x4bcb08,_0x5d0b59),window[_0x310aa0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5d0b59,0x7347de73^_0x3bdae4);});}}_0x5c7091[_0x310aa0([0x6f,0x6e])](_0x310aa0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x53a9b0,_0x38557d)=>{if(_0x38557d[0x0]!=_0x5d1e97)return _0x9d6cb6(_0x310aa0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x38557d[0x1]={..._0x38557d[0x1],[_0x310aa0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x224e51};},{[_0x310aa0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x310aa0([0x68,0x69,0x67,0x68])}),_0x5c7091[_0x310aa0([0x6f,0x6e])](_0x310aa0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x1365c1=>{_0x299654(_0x1365c1[_0x310aa0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x36da7f=!0x0,_0x12bf11(_0x1365c1[_0x310aa0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x310aa0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x310aa0([0x6c,0x6f,0x77])}),_0x219745[_0x310aa0([0x74,0x68,0x65,0x6e])](()=>{_0x36da7f||_0x9d6cb6(_0x310aa0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x48f193(){return _0x5c7091[_0x310aa0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x310aa0([0x76,0x69,0x65,0x77])][_0x310aa0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x310aa0([0x61,0x75,0x74,0x6f]);}function _0x3b5138(){_0x5c7091[_0x310aa0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x310aa0([0x76,0x69,0x65,0x77])][_0x310aa0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x310aa0([0x61,0x75,0x74,0x6f]);}}function _0x32cfd4(_0x4019af){const _0x4d52c4=[new window[(_0x310aa0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24444d=>setTimeout(_0x24444d,0x734f347f^_0x3bdae4)),_0x219745[_0x310aa0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x310aa0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x196c98=>{let _0x170044=0x0;_0x5c7091[_0x310aa0([0x6d,0x6f,0x64,0x65,0x6c])][_0x310aa0([0x6f,0x6e])](_0x310aa0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x377677,_0x16302f)=>{_0x16302f[0x0][_0x310aa0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x170044++,_0x170044==(0x73460f5b^_0x3bdae4)&&(_0x196c98(),_0x377677[_0x310aa0([0x6f,0x66,0x66])]());});}))];return window[_0x310aa0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x310aa0([0x72,0x61,0x63,0x65])](_0x4d52c4)[_0x310aa0([0x74,0x68,0x65,0x6e])](()=>_0x4019af);}async function _0x33a499(){await _0x219745,_0x5c7091[_0x310aa0([0x6d,0x6f,0x64,0x65,0x6c])][_0x310aa0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x4b1737,_0x5c7091[_0x310aa0([0x6d,0x6f,0x64,0x65,0x6c])][_0x310aa0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x4b1737,_0x5c7091[_0x310aa0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x310aa0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x970364(){return window[_0x310aa0([0x67,0x6c,0x6f,0x62])]&&window[_0x310aa0([0x67,0x6c,0x6f,0x62])][_0x310aa0([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0xbfad26(){return _0x29ce2b(_0x310aa0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x183178(_0x310aa0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x310aa0([0x73,0x74,0x61,0x74,0x65])]==_0x310aa0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x277df0(){return _0x29ce2b(_0x310aa0([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 _0x2f67f7(){return _0x29ce2b(_0x310aa0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x175ab5(_0x13b055){const _0x333b23=_0x31fdbe();_0x5c7091[_0x333b23]=_0x310aa0([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x13b055,_0x13b055!=_0x310aa0([0x56,0x61,0x6c,0x69,0x64])&&_0x33a499();}function _0x31fdbe(){const _0xbf0591=window[_0x310aa0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x310aa0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x310aa0([0x6e,0x6f,0x77])]())[_0x310aa0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x310aa0([0x2e]),'');let _0x918422=_0x310aa0([0x4b]);for(let _0x242278=0x0;_0x242278<_0xbf0591[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x242278+=0x2){let _0xda5bbc=window[_0x310aa0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xbf0591[_0x310aa0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x242278,_0x242278+0x2));_0xda5bbc>=_0x5aefdc[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xda5bbc-=_0x5aefdc[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x918422+=_0x5aefdc[_0xda5bbc];}return _0x918422;}function _0x18d24e(){const _0x15c0c1=_0x5b698a[_0x310aa0([0x73,0x70,0x6c,0x69,0x74])](_0x310aa0([0x2e]));if(0x3!=_0x15c0c1[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x10fec5(_0x15c0c1[0x1]);function _0x10fec5(_0x56b605){const _0x276b11=_0x1653de(_0x56b605);return _0x276b11&&_0x435566()?_0x276b11:null;function _0x435566(){const _0x523a10=_0x276b11[_0x310aa0([0x6a,0x74,0x69])],_0x1450bd=window[_0x310aa0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x523a10[_0x310aa0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x523a10[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xbebdb3={..._0x276b11,[_0x310aa0([0x6a,0x74,0x69])]:_0x523a10[_0x310aa0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x523a10[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xbebdb3[_0x310aa0([0x76,0x63])],_0x56c4e6(_0xbebdb3)==_0x1450bd;}}}async function _0x42911d(){let _0x3042e2=!0x0;try{const _0x5f35da=_0x5b698a[_0x310aa0([0x73,0x70,0x6c,0x69,0x74])](_0x310aa0([0x2e])),[_0x1ffd37,_0x26ce4f,_0x15c504]=_0x5f35da;return _0x13a20f(_0x1ffd37),await _0x1acffa(_0x1ffd37,_0x26ce4f,_0x15c504),_0x3042e2;}catch{return!0x1;}function _0x13a20f(_0x1a0b9c){const _0x37d7d9=_0x1653de(_0x1a0b9c);_0x37d7d9&&_0x37d7d9[_0x310aa0([0x61,0x6c,0x67])]==_0x310aa0([0x45,0x53,0x32,0x35,0x36])||(_0x3042e2=!0x1);}async function _0x1acffa(_0x1a72b3,_0x461064,_0x476d76){const _0x80fa0c=window[_0x310aa0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x310aa0([0x66,0x72,0x6f,0x6d])](_0x4f14a0(_0x476d76),_0xf7113f=>_0xf7113f[_0x310aa0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x41dc90=new window[(_0x310aa0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x310aa0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1a72b3+_0x310aa0([0x2e])+_0x461064),_0xf7bbf2=window[_0x310aa0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x310aa0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xf7bbf2)return;const _0x436186=await _0xf7bbf2[_0x310aa0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x310aa0([0x6a,0x77,0x6b]),_0x3aa57d,{[_0x310aa0([0x6e,0x61,0x6d,0x65])]:_0x310aa0([0x45,0x43,0x44,0x53,0x41]),[_0x310aa0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x310aa0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x310aa0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xf7bbf2[_0x310aa0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x310aa0([0x6e,0x61,0x6d,0x65])]:_0x310aa0([0x45,0x43,0x44,0x53,0x41]),[_0x310aa0([0x68,0x61,0x73,0x68])]:{[_0x310aa0([0x6e,0x61,0x6d,0x65])]:_0x310aa0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x436186,_0x80fa0c,_0x41dc90)||(_0x3042e2=!0x1);}}function _0x1653de(_0x79f23d){return _0x79f23d[_0x310aa0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x310aa0([0x65,0x79]))?JSON[_0x310aa0([0x70,0x61,0x72,0x73,0x65])](_0x4f14a0(_0x79f23d)):null;}function _0x4f14a0(_0x5e3722){return window[_0x310aa0([0x61,0x74,0x6f,0x62])](_0x5e3722[_0x310aa0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x310aa0([0x2b]))[_0x310aa0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x310aa0([0x2f])));}function _0x56c4e6(_0x40316a){let _0x2ef408=0x1505;function _0x531b8a(_0x438edf){for(let _0x38f322=0x0;_0x38f322<_0x438edf[_0x310aa0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x38f322++){const _0x899e54=_0x438edf[_0x310aa0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x38f322);_0x2ef408=(_0x2ef408<<0x5)+_0x2ef408+_0x899e54,_0x2ef408&=_0x2ef408;}}function _0x431511(_0x27fc9d){Array[_0x310aa0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x27fc9d)?_0x27fc9d[_0x310aa0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x431511):_0x27fc9d&&typeof _0x27fc9d==_0x310aa0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x310aa0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x27fc9d)[_0x310aa0([0x73,0x6f,0x72,0x74])]()[_0x310aa0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x344ded,_0x1049d6])=>{_0x531b8a(_0x344ded),_0x431511(_0x1049d6);}):_0x531b8a(window[_0x310aa0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x27fc9d));}return _0x431511(_0x40316a),_0x2ef408>>>0x0;}function _0x36d8d3(_0x59e00f){return _0x59e00f[_0x310aa0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x310aa0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x310aa0([0x30]));}function _0x23580c(_0x12f06c){return _0x12f06c[_0x310aa0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x310aa0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x310aa0([0x6a,0x6f,0x69,0x6e])]('');}function _0x29ce2b(_0x43c9f2){return _0x5c7091[_0x310aa0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x310aa0([0x68,0x61,0x73])](_0x43c9f2);}function _0x183178(_0xe520af){return _0x5c7091[_0x310aa0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x310aa0([0x67,0x65,0x74])](_0xe520af);}function _0x4b1737(){}function _0x310aa0(_0x8c1a08){return _0x8c1a08['map'](_0x5e05d8=>String['fromCharCode'](_0x5e05d8))['join']('');}_0x175ab5(await _0x240e08());}(this);}['destroy'](){const _0x291cb7=this['editor']['plugins']['get'](o),_0x16c3f2=this['editor']['config']['get']('collaboration.channelId');for(const _0x576e61 of _0x291cb7['getCommentThreads']({'channelId':_0x16c3f2}))_0x291cb7['_detachCommentThread'](_0x576e61['id']),_0x291cb7['_threads']['delete'](_0x576e61['id']);super['destroy']();}['hasMarkerForId'](_0x3b3cee){return this['getAllMarkersForId'](_0x3b3cee)['length']>0x0;}['getAllMarkersForId'](_0x4e4728){const _0x331ba2=[];for(const _0x580157 of this['editor']['model']['markers'])_0x580157['name']['startsWith']('comment:'+_0x4e4728)&&_0x331ba2['push'](_0x580157);return _0x331ba2;}['scrollToThreadMarker'](_0x46e848){setTimeout(()=>{const _0x6dff41=this['_getTargetForId'](_0x46e848);if(!_0x6dff41)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x46e848&&nt({'target':_0x6dff41[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x43f5c4){this['editor']['model']['change'](()=>{for(const _0x4a3ffe of this['getAllMarkersForId'](_0x43f5c4))this['editor']['editing']['reconvertMarker'](_0x4a3ffe);});}['_attachArchivedThread'](_0x3185e5){const _0x48d0bc=this['editor']['plugins']['get'](o),_0x1b6e1c=this['editor']['plugins']['get'](b),_0x37b832=_0x48d0bc['getCommentThread'](_0x3185e5);if(!_0x37b832['isAttached']){const _0x5adefe=_0x37b832['attachTo'](()=>this['_getTargetForId'](_0x37b832['id']));_0x1b6e1c['registerAnnotation'](_0x5adefe),_0x37b832['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x295631=this['editor'],_0x2ab2d0=_0x295631['plugins']['get'](it);_0x295631['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x808e0f,_0x2c88fc)=>{const {id:_0xa96178}=ft(_0x808e0f['markerName']),_0x39632a=_0x295631['plugins']['get'](o)['getCommentThread'](_0xa96178),_0x2848a9=this['activeMarker']&&ft(this['activeMarker'])['id']===_0xa96178;let _0x1083f0;if(_0x39632a&&_0x39632a['isResolved']&&!_0x2848a9&&_0x808e0f['item'])return _0x2c88fc['consumable']['consume'](_0x808e0f['item'],'addMarker:'+_0x808e0f['markerName']),_0x2c88fc['consumable']['consume'](_0x808e0f['item'],'removeMarker:'+_0x808e0f['markerName']),null;const _0x5c732b=['ck-comment-marker'];return _0x2848a9&&_0x5c732b['push']('ck-comment-marker--active'),_0x1083f0=_0x39632a?.['length']?_0x39632a['comments']['first']['author']['id']:_0x2ab2d0['me']['id'],{'classes':_0x5c732b,'attributes':{'data-comment':_0xa96178,'data-author-id':_0x1083f0}};}}),_0x295631['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x10a1d4,{options:_0x250433})=>{if(_0x250433['showCommentHighlights'])return null;const _0x32f0be=_0x295631['plugins']['get'](o),_0x13e072=_0x295631['model']['markers']['get'](_0x10a1d4),{id:_0x2bd42f,part:_0x5d3997}=ft(_0x10a1d4);return _0x13e072&&!_0x13e072['affectsData']||_0x250433['ignoreResolvedComments']&&_0x32f0be['getCommentThread'](_0x2bd42f)?.['isResolved']?null:{'group':'comment','name':_0x5d3997?_0x2bd42f+':'+_0x5d3997:_0x2bd42f};}}),_0x295631['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5c58ae,{writer:_0xf4c99})=>_0xf4c99['createElement']('$marker',{'data-name':'comment:'+_0x5c58ae['getAttribute']('id')})}),_0x295631['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x2e60ab=this['editor'],_0x13e1c7=_0x2e60ab['plugins']['get'](o),_0x1d7141=new Set(),_0x1cbf6d=new Set();_0x2e60ab['model']['document']['registerPostFixer'](_0x5cae4d=>{let _0x37874c=!0x1;for(const {name:_0xd115bb,data:_0x1bf854}of _0x2e60ab['model']['document']['differ']['getChangedMarkers']()){const {group:_0x28e8bb,id:_0x4d218f}=ft(_0xd115bb);let _0x594ca7=_0x1bf854['newRange'];if('comment'!==_0x28e8bb||!_0x594ca7)continue;const _0x900edd='$graveyard'===_0x594ca7['root']['rootName'];_0x900edd||(_0x594ca7=ht(_0x594ca7,_0x2e60ab['model']),!_0x594ca7||_0x594ca7['isCollapsed']||!_0x1bf854['newRange']||_0x594ca7['isEqual'](_0x1bf854['newRange']))?_0x2e60ab['model']['hasContent'](_0x594ca7)&&!_0x900edd?this['isThreadsLoadingPaused']?_0x1d7141['add'](_0xd115bb):this['_handleThreadMarker'](_0xd115bb,_0x4d218f):(_0x1cbf6d['add'](_0xd115bb),_0x1d7141['delete'](_0xd115bb),_0x5cae4d['removeMarker'](_0xd115bb),_0x37874c=!0x0):(_0x5cae4d['updateMarker'](_0xd115bb,{'range':_0x594ca7}),_0x37874c=!0x0);}return _0x37874c;}),this['on']('change:isThreadsLoadingPaused',(_0x188096,_0x58ebd8,_0x6aeba7)=>{if(!_0x6aeba7&&_0x1d7141['size'])for(const _0x393165 of _0x1d7141){const {id:_0x52a31a}=ft(_0x393165);_0x1d7141['delete'](_0x393165),_0x2e60ab['model']['markers']['get'](_0x393165)&&this['_handleThreadMarker'](_0x393165,_0x52a31a);}}),this['listenTo'](_0x2e60ab['model']['document'],'change',()=>{for(const {name:_0x2686b1,data:{newRange:_0x496360}}of _0x2e60ab['model']['document']['differ']['getChangedMarkers']()){const {group:_0x61045d,id:_0x2a12a0}=ft(_0x2686b1);if('comment'!==_0x61045d)continue;const _0x36bcc5=_0x13e1c7['getCommentThread'](_0x2a12a0),_0x2df1f7=this['hasMarkerForId'](_0x2a12a0);_0x36bcc5&&(!_0x36bcc5['_hasTargetInContent']&&_0x496360&&_0x2e60ab['editing']['view']['once']('render',()=>{const _0x258552=_0x2e60ab['plugins']['get'](y),_0x2f3527=_0x13e1c7['_threadToController']['get'](_0x36bcc5)['view'];_0x258552['getByInnerView'](_0x2f3527)['refreshVisibility']();},{'priority':'low'}),_0x36bcc5['_hasTargetInContent']=_0x2df1f7||!!_0x496360),_0x496360||(_0x1cbf6d['add'](_0x2686b1),_0x1d7141['delete'](_0x2686b1));}for(const _0x10fcf1 of _0x1cbf6d){const {id:_0x1b6206}=ft(_0x10fcf1),_0x50d1c4=_0x13e1c7['getCommentThread'](_0x1b6206);if(_0x1d7141['delete'](_0x10fcf1),!_0x50d1c4)continue;const _0x59e4c2=this['hasMarkerForId'](_0x1b6206);_0x59e4c2||_0x50d1c4['isSubmitted']?_0x59e4c2||_0x50d1c4['unlinkedAt']||_0x50d1c4['setUnlinkedAt'](new Date()):_0x50d1c4['remove']();}_0x1cbf6d['clear']();});}['_handleInitialThreads'](_0xee309e){_0xee309e['forEach'](_0x18e2c7=>{_0x18e2c7['unlinkedAt']&&this['_attachArchivedThread'](_0x18e2c7['id']);});}['_getTargetForId'](_0x22614f){const _0x24ef5b=this['editor'],_0x545a29=this['getAllMarkersForId'](_0x22614f);return et(_0x24ef5b['editing'],_0x545a29);}['_getTextContext'](_0x4c3844){const _0x1b1b01=this['getAllMarkersForId'](_0x4c3844);let _0x9cc08a='',_0x271424=!0x1;for(const _0x48ba15 of _0x1b1b01){const _0x3dfb28=_0x48ba15['getRange']();for(const _0x157ecc of Array['from'](_0x3dfb28['getItems']()))_0x157ecc['is']('$textProxy')?(_0x9cc08a&&_0x271424&&(_0x9cc08a+='\x20',_0x271424=!0x1),_0x9cc08a+=_0x157ecc['data']):_0x271424=!0x0;_0x271424=!0x0;}return _0x9cc08a['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x130cba,_0x51ed4c){const _0x3a8994=this['editor'],_0x5ea16b=_0x3a8994['plugins']['get'](o);let _0x248046=_0x5ea16b['getCommentThread'](_0x51ed4c);const _0x277a78=_0x3a8994['config']['get']('collaboration.channelId'),_0x4b54bb=_0x3a8994['plugins']['get'](b);if(_0x248046&&(_0x248046['unlinkedAt']&&_0x248046['setUnlinkedAt'](null),_0x248046['isAttached']))return _0x248046;return!this['getAllMarkersForId'](_0x51ed4c)[0x0]['managedUsingOperations']?_0x3a8994['editing']['view']['once']('render',()=>{if(_0x5ea16b['getCommentThread'](_0x51ed4c))return;const _0x2f230f=_0x3a8994['plugins']['get'](y);_0x248046=_0x5ea16b['openNewCommentThread']({'channelId':_0x277a78,'threadId':_0x51ed4c,'target':()=>this['_getTargetForId'](_0x51ed4c),'context':{'type':'text','value':this['_getTextContext'](_0x51ed4c)}});const _0x306c76=_0x5ea16b['_threadToController']['get'](_0x248046)['view'],_0x35e167=_0x2f230f['getByInnerView'](_0x306c76);_0x35e167&&_0x4b54bb['registerAnnotation'](_0x35e167);},{'priority':'low'}):_0x5ea16b['fetchCommentThread']({'channelId':_0x277a78,'threadId':_0x51ed4c})['then'](_0x463e2e=>{if('destroyed'!==_0x3a8994['state']){if(_0x248046=_0x463e2e,_0x248046&&!_0x248046['isAttached']){const _0x4fecc7=_0x248046['attachTo'](()=>this['_getTargetForId'](_0x51ed4c));_0x4b54bb['registerAnnotation'](_0x4fecc7),_0x248046['isResolved']&&this['_reconvertMarkers'](_0x51ed4c);}else{if(!_0x248046){const _0x501219=this['getAllMarkersForId'](_0x51ed4c);_0x3a8994['model']['change'](_0x17fdbf=>{for(const _0x43747 of _0x501219)_0x17fdbf['removeMarker'](_0x43747);});}}}}),_0x248046;}['_handleThreadMarker'](_0x24e39f,_0xebc063){const _0x3a67e0=this['_attachMarkerToThread'](_0x24e39f,_0xebc063);_0x3a67e0&&!_0x3a67e0['context']&&_0x3a67e0['setContext']({'type':'text','value':this['_getTextContext'](_0xebc063)});}['_initAriaMarkerChangeAnnouncements'](){const _0x56a64b=this['editor'];rt(_0x56a64b['model'],({left:_0x4092f8,entered:_0x841be2})=>{for(const _0x58d2ea of _0x4092f8)if(mt(_0x58d2ea)){_0x56a64b['ui']['ariaLiveAnnouncer']['announce'](N(_0x56a64b['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2ea8e3 of _0x841be2)if(mt(_0x2ea8e3)){_0x56a64b['ui']['ariaLiveAnnouncer']['announce'](N(_0x56a64b['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x253346)));break;}});}}function dt(_0xcc5a2a,_0x10feb9){return _0x10feb9?_0xcc5a2a+':'+_0x10feb9:_0xcc5a2a;}function ht(_0x3dbbe1,_0x4905b4){const _0x252b7c=_0x4905b4['schema'],_0x420faf=_0x4905b4['createRange'](_0x3dbbe1['start']);for(const _0x3dd4fc of _0x3dbbe1['getWalker']()){const {type:_0x18d680,item:_0x139571,nextPosition:_0x453fa8}=_0x3dd4fc;if('text'===_0x18d680||_0x252b7c['isObject'](_0x139571)){const _0x50895f=_0x4905b4['createPositionBefore'](_0x139571);_0x420faf['isCollapsed']&&(_0x420faf['start']=_0x50895f),_0x420faf['end']=_0x453fa8;}}return _0x420faf;}function mt(_0x5be3c1){return'comment'===ft(_0x5be3c1['name'])['group'];}class s extends _0x25b6bf{['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 _0x3242aa=this['editor'],_0x32f7e4=_0x3242aa['plugins']['get'](o),_0x3be2e4=_0x3242aa['plugins']['get'](r),_0x3f138d=_0x3242aa['plugins']['get'](y),_0x3cbeea=_0x3242aa['plugins']['get'](b);_0x3242aa['ui']['componentFactory']['add']('comment',()=>{const _0x30748b=this['_createUIButton'](_0xf18eca);return _0x30748b['tooltip']=!0x0,_0x30748b;}),_0x3242aa['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x892bd0)),_0x3cbeea['addSourceCollector'](()=>{const _0x548fd1=[];for(const [_0x4ec05a,_0x4243cc]of _0x32f7e4['_threadToController']){const _0x4a6834=_0x3be2e4['getAllMarkersForId'](_0x4ec05a['id']),_0x52e6c8=_0x4a6834['map'](_0x3ce8ca=>_0x3ce8ca['getRange']());_0x4a6834['length']>0x0&&_0x548fd1['push']([_0x4243cc['view'],_0x52e6c8]);}return _0x548fd1;}),this['listenTo'](_0x3f138d,'change:activeAnnotations',(_0x1193d2,_0x11fe4d,_0x4c5b23)=>{const _0x461a89=Array['from'](_0x4c5b23)['map'](_0x2a4d58=>_0x2a4d58['innerView'])['find'](_0x51a902=>_0x32f7e4['_viewToController']['has'](_0x51a902));if(!_0x461a89)return void(_0x3be2e4['activeMarker']=null);const _0x519d44=_0x32f7e4['_viewToController']['get'](_0x461a89)['model']['id'],_0x357e42='comment:'+_0x519d44;_0x519d44&&_0x3be2e4['hasMarkerForId'](_0x519d44)?_0x3be2e4['activeMarker']=_0x357e42:_0x3be2e4['activeMarker']&&(_0x3be2e4['activeMarker']=null);}),this['listenTo'](_0x32f7e4,'removeCommentThread',(_0x30dce3,{threadId:_0x199e8b,isFromAdapter:_0x21a844})=>{!_0x21a844&&_0x3242aa['ui']['focusTracker']['isFocused']&&_0x3be2e4['hasMarkerForId'](_0x199e8b)&&_0x3242aa['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x32f7e4,'addComment',(_0x35198d,{threadId:_0x5ada9c,isFromAdapter:_0x30caf6})=>{if(_0x30caf6||!_0x3be2e4['hasMarkerForId'](_0x5ada9c)||!_0x32f7e4['hasCommentThread'](_0x5ada9c))return;0x1===_0x32f7e4['getCommentThread'](_0x5ada9c)['length']&&(_0x3242aa['editing']['view']['focus'](),_0x35198d['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1e2b17=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2eb60e;for(const _0x1f1e3d in _0x1e2b17){const _0x28a7be=_0x1f1e3d,_0x23a4ed=_0x1e2b17[_0x28a7be];if('commentsLicenseKeyValid'==_0x23a4ed||'commentsLicenseKeyInvalid'==_0x23a4ed||'commentsLicenseKeyExpired'==_0x23a4ed||'commentsLicenseKeyDomainLimit'==_0x23a4ed||'commentsLicenseKeyNotAllowed'==_0x23a4ed||'commentsLicenseKeyEvaluationLimit'==_0x23a4ed||'commentsLicenseKeyUsageLimit'==_0x23a4ed){delete _0x1e2b17[_0x28a7be],_0x2eb60e=_0x23a4ed,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2eb60e&&_0x1e2b17['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2eb60e&&_0x1e2b17['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2eb60e&&_0x1e2b17['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2eb60e&&_0x1e2b17['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2eb60e&&_0x1e2b17['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x2eb60e&&_0x1e2b17['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x282969){const _0x2b6fcc=this['editor'],_0x487f37=new _0x282969(_0x2b6fcc['locale']),_0x324a39=_0x2b6fcc['commands']['get']('addCommentThread');return _0x487f37['set']({'label':N(_0x2b6fcc['locale'],'Comment'),'icon':_0x37d815}),_0x487f37['bind']('isEnabled')['to'](_0x324a39,'isEnabled',_0x324a39,'hasContent',(_0xf34cae,_0x3b27f4)=>_0xf34cae&&_0x3b27f4),this['listenTo'](_0x487f37,'execute',()=>{_0x324a39['execute']();}),_0x487f37;}}class i extends _0x25b6bf{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x37a65b){super(_0x37a65b),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1d5a18,_0x396fad,_0x35e5bd)=>{_0x35e5bd?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x4cc22f,_0x350428]of this['editor']['commands'])_0x350428['affectsData']&&'addCommentThread'!==_0x4cc22f&&_0x350428['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x3a8751=this['editor']['editing']['view']['document'];this['listenTo'](_0x3a8751,'cut',_0x3c1694=>_0x3c1694['stop'](),{'priority':'highest'}),this['listenTo'](_0x3a8751,'clipboardInput',_0x214861=>_0x214861['stop'](),{'priority':'highest'}),this['listenTo'](_0x3a8751,'delete',_0x28405c=>_0x28405c['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x84fdbe,_0x406695]of this['editor']['commands'])_0x406695['affectsData']&&'addCommentThread'!==_0x84fdbe&&_0x406695['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x3110a5{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x59d8c8){super(_0x59d8c8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xc8b48f=this['context']['plugins']['get'](y);this['listenTo'](_0xc8b48f,'_activateAnnotation',(_0x51f023,_0x523c0e)=>{for(const _0x3ce35a of this['activeUIs']){const _0x2f0cac=this['_uis']['get'](_0x3ce35a);(0x0,this['uisData']['get'](_0x3ce35a)['filter'])(_0x523c0e)&&_0x2f0cac['setActiveAnnotation'](_0x523c0e);}}),this['listenTo'](_0xc8b48f,'_deactivateAllAnnotations',()=>{for(const _0x41ef90 of this['activeUIs']){this['_uis']['get'](_0x41ef90)['setActiveAnnotation'](null);}}),this['listenTo'](_0xc8b48f['_visibleAnnotations'],'add',(_0x589bc2,_0x5bd3d6)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5bd3d6);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x402ae2){return this['activeUIs']['has'](_0x402ae2);}['activate'](_0x64f5ab,_0x1f14b3=this['defaultFilter']){const _0x388dd5=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x64f5ab))throw new _0xd7b9fb('annotationsuis-missing-ui',this,{'uiName':_0x64f5ab});this['isActive'](_0x64f5ab)&&this['deactivate'](_0x64f5ab),this['activeUIs']['add'](_0x64f5ab);const _0x3647c2=new S();v({'source':_0x388dd5['_visibleAnnotations'],'target':_0x3647c2,'filter':_0x1f14b3}),this['uisData']['set'](_0x64f5ab,{'collection':_0x3647c2,'filter':_0x1f14b3});const _0x2176a3=this['_uis']['get'](_0x64f5ab);_0x2176a3['attach'](_0x3647c2),this['listenTo'](_0x2176a3,'change:activeAnnotation',(_0x165d9a,_0x3d5aed,_0x2c64fc,_0x13e29a)=>{_0x13e29a&&_0x388dd5['_removeActiveAnnotation'](_0x13e29a),_0x2c64fc&&_0x388dd5['_addActiveAnnotation'](_0x2c64fc);});}['deactivate'](_0x1759b8){if(this['activeUIs']['delete'](_0x1759b8),!this['_uis']['has'](_0x1759b8))throw new _0xd7b9fb('annotationsuis-missing-ui',this,{'uiName':_0x1759b8});const _0x37cf7a=this['_uis']['get'](_0x1759b8);_0x37cf7a['detach'](),this['stopListening'](_0x37cf7a),this['uisData']['get'](_0x1759b8)['collection']['destroy'](),this['uisData']['delete'](_0x1759b8);}['switchTo'](_0x1a6f50){if(!this['_uis']['has'](_0x1a6f50))throw new _0xd7b9fb('annotationsuis-missing-ui',this,{'uiName':_0x1a6f50});const _0x7e7b46=this['context']['plugins']['get'](y),_0x2d89be=Array['from'](_0x7e7b46['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x1a6f50);const _0x42f129=this['_uis']['get'](_0x1a6f50);_0x42f129['setActiveAnnotation'](_0x2d89be),_0x42f129['_setSelectedAnnotations']&&_0x2d89be&&_0x42f129['_setSelectedAnnotations']([_0x2d89be]);}['deactivateAll'](){for(const _0x41c606 of this['activeUIs'])this['deactivate'](_0x41c606);}['register'](_0x41306e,_0x49688b){if(this['_uis']['has'](_0x41306e))throw new _0xd7b9fb('annotationsuis-register-already-registered');if('function'!=typeof _0x49688b['attach']||'function'!=typeof _0x49688b['detach']||'function'!=typeof _0x49688b['setActiveAnnotation'])throw new _0xd7b9fb('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x41306e,_0x49688b);}['refilterAnnotations'](){const _0x1c7396=this['context']['plugins']['get'](y)['collection'],_0x44f626=new Map(),_0x5eba61=Array['from'](this['activeUIs']);for(const _0x8d628e of this['activeUIs']){const _0x5ae933=this['uisData']['get'](_0x8d628e)['collection'];for(const _0x108723 of _0x5ae933)_0x44f626['set'](_0x108723,_0x8d628e);}for(const _0x5e9d85 of _0x1c7396){const _0x392aee=_0x44f626['get'](_0x5e9d85);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5e9d85);const _0x384a70=_0x5eba61['find'](_0x555549=>this['uisData']['get'](_0x555549)['filter'](_0x5e9d85));_0x392aee!==_0x384a70&&(_0x392aee&&this['uisData']['get'](_0x392aee)['collection']['remove'](_0x5e9d85),_0x384a70&&this['uisData']['get'](_0x384a70)['collection']['add'](_0x5e9d85));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x90c1d8){const _0x1844c8=[];for(const _0x5b3242 of this['activeUIs']){(0x0,this['uisData']['get'](_0x5b3242)['filter'])(_0x90c1d8)&&_0x1844c8['push'](_0x5b3242);}if(_0x1844c8['length']>0x1)throw new _0xd7b9fb('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1844c8,'annotationType':_0x90c1d8['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(_0x44363b){super(_0x44363b),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2579a2,_0x41cc73)=>_0x2579a2+_0x41cc73),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x38efa1=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x38efa1['to']('isAnimationDisabled',_0x5e3a72=>_0x5e3a72?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x38efa1['to']('top',_0x6db3aa=>Ot(_0x6db3aa))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x3c8844=this['element']['clientHeight'];_0x3c8844&&(this['height']=_0x3c8844);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3110a5{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x197c2c){super(_0x197c2c),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 _0x579482=this['context']['config']['get']('sidebar.container');_0x579482&&this['setContainer'](_0x579482);}['setContainer'](_0x5d80ce){if(!g(_0x5d80ce))throw new _0xd7b9fb('sidebar-setcontainer-invalid-element');this['container']=_0x5d80ce;}['_attachToContainer']({viewClass:_0x1a8285='',spaceBetweenItems:_0x4a3cf6=0x19}={}){if(!g(this['container']))throw new _0xd7b9fb('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x1a8285,this['_spaceBetweenItems']=_0x4a3cf6;}['rearrange']({removedAnnotation:_0x35b3ec,previousAnnotation:_0x5d02cc,nextAnnotation:_0x302c5e}){const _0x5093ab=this['getSidebarItemView'](_0x35b3ec);this['view']['list']['remove'](_0x5093ab),this['_destroySidebarItemView'](_0x35b3ec),_0x5d02cc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5d02cc)),_0x302c5e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x302c5e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1b3de8,activatedAnnotation:_0x95bbc2,disableAnimationOnActivatedAnnotation:_0x2d019a}){if(this['_activeAnnotation']=_0x95bbc2,_0x1b3de8){_0x1b3de8['isActive']=!0x1;const _0x347b2d=this['getSidebarItemView'](_0x1b3de8);_0x347b2d&&_0x2d019a&&(_0x347b2d['isAnimationDisabled']=!0x1);}if(_0x95bbc2){const _0x12f8c7=this['getSidebarItemView'](_0x95bbc2);_0x12f8c7&&(_0x95bbc2['isActive']=!0x0,_0x2d019a&&(_0x12f8c7['isAnimationDisabled']=!0x0,_0x12f8c7['top']+=0x1),this['_alignToTargetRect'](_0x12f8c7));}}['_detachFromContainer'](_0x3ccb0e){if(this['view']['element']['remove'](),_0x3ccb0e){for(const _0x43226e of _0x3ccb0e)this['_destroySidebarItemView'](_0x43226e);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x231ab1,_0x2387ff){_0x2387ff||(_0x2387ff=_0x231ab1['view']);const _0x1975f2=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x1975f2,_0x231ab1),this['_annotationToSidebarItemView']['set'](_0x231ab1,_0x1975f2),_0x1975f2['content']['add'](_0x2387ff),this['listenTo'](_0x231ab1['view'],'change:targetRect',(_0x47bac7,_0x27aac6,_0x6b70ed)=>{const _0x28350c=this['_getTargetTop'](_0x231ab1,_0x6b70ed);_0x1975f2['_targetTop']!=_0x28350c&&(_0x1975f2['_targetTop']=_0x28350c,this['_setItemTop'](_0x1975f2,_0x28350c));}),this['listenTo'](_0x1975f2,'change:top',()=>{this['_recalculate'](_0x1975f2,'top');}),this['listenTo'](_0x1975f2,'change:bottom',()=>{this['_recalculate'](_0x1975f2,'bottom');}),this['_alignToTargetRect'](_0x1975f2);const _0x5a8822=this['_getItemBefore'](_0x1975f2);if(_0x5a8822)this['_alignAfterItem'](_0x5a8822,_0x1975f2)||this['_alignToTargetRect'](_0x1975f2);else this['_alignToTargetRect'](_0x1975f2);return this['_updateLastItem'](),this['view']['list']['add'](_0x1975f2),_0x1975f2;}['_alignForTopChange'](_0x9b631b){if(!_0x9b631b['content']['length'])return;const _0xb2e88e=this['_getItemBefore'](_0x9b631b);if(!_0xb2e88e)return;const _0x13d524=this['_sidebarItemViewToAnnotation']['get'](_0xb2e88e),_0x3f1dac=this['_activeAnnotation'];_0x3f1dac&&_0x3f1dac===_0x13d524?this['_alignAfterItem'](_0xb2e88e,_0x9b631b):this['_alignBeforeItem'](_0x9b631b,_0xb2e88e);}['_alignForBottomChange'](_0x2e35b1){if(!_0x2e35b1['content']['length'])return;const _0x17f06d=this['_getItemAfter'](_0x2e35b1);if(!_0x17f06d)return;const _0x55b86d=this['_sidebarItemViewToAnnotation']['get'](_0x17f06d),_0x5f2cc6=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xe8a1e0=this['_activeAnnotation'];_0xe8a1e0&&_0xe8a1e0===_0x55b86d&&_0x5f2cc6?(this['_alignBeforeItem'](_0x17f06d,_0x2e35b1),this['_alignAfterItem'](_0x2e35b1,_0x17f06d)):_0xe8a1e0&&_0xe8a1e0===_0x55b86d?this['_alignBeforeItem'](_0x17f06d,_0x2e35b1):this['_alignAfterItem'](_0x2e35b1,_0x17f06d);}['_recalculate'](_0x18116c,_0x16e077){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5369ff,changedProp:_0x3ef740}of this['_recalculateBuffer'])'top'===_0x3ef740?this['_alignForTopChange'](_0x5369ff):this['_alignForBottomChange'](_0x5369ff);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x18116c,'changedProp':_0x16e077});}['getSidebarItemView'](_0x1ffbc1){return this['_annotationToSidebarItemView']['get'](_0x1ffbc1);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4e6a89){const _0x230155=this['getSidebarItemView'](_0x4e6a89);this['stopListening'](_0x230155),this['stopListening'](_0x4e6a89['view']),_0x230155['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4e6a89),this['_sidebarItemViewToAnnotation']['delete'](_0x230155);}['_createSidebarView'](){const _0x5c3c9a=new H(this['context']['locale']);return _0x5c3c9a['render'](),this['on']('change:_lastItem',(_0x451bfd,_0x28082a,_0x2003f7,_0x2cbec4)=>{_0x2cbec4&&_0x5c3c9a['unbind']('minHeight'),_0x2003f7?_0x5c3c9a['bind']('minHeight')['to'](_0x2003f7,'bottom'):_0x5c3c9a['minHeight']=null;}),_0x5c3c9a;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4d7b34){const _0x151f1e=this['_sidebarItemViewToAnnotation']['get'](_0x4d7b34),_0x142b33=_0x151f1e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x151f1e)-0x1);return _0x142b33&&this['getSidebarItemView'](_0x142b33)||null;}['_getItemAfter'](_0x35f9a2){const _0x1a7edc=this['_sidebarItemViewToAnnotation']['get'](_0x35f9a2),_0x233ec8=_0x1a7edc&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1a7edc)+0x1);return _0x233ec8&&this['getSidebarItemView'](_0x233ec8)||null;}['_alignBeforeItem'](_0x3f4c71,_0x57902c){_0x3f4c71['updateHeight']();const _0x4f8008=G(_0x57902c['bottom']+this['_spaceBetweenItems'],_0x3f4c71['top']);return!!_0x4f8008&&(this['_setItemTop'](_0x57902c,_0x57902c['top']-_0x4f8008),!0x0);}['_alignAfterItem'](_0x3e61ae,_0x61048f){_0x3e61ae['updateHeight']();const _0x11427f=G(_0x3e61ae['bottom']+this['_spaceBetweenItems'],_0x61048f['top']);return!!_0x11427f&&(this['_setItemTop'](_0x61048f,_0x61048f['top']+_0x11427f,!0x1),!0x0);}['_alignToTargetRect'](_0x5293d7){const _0x35336b=this['_sidebarItemViewToAnnotation']['get'](_0x5293d7);if(!_0x35336b||!_0x35336b['target']||!_0x35336b['targetRect'])return;const _0x48b8b7=this['_getTargetTop'](_0x35336b,_0x35336b['targetRect']);this['_setItemTop'](_0x5293d7,_0x48b8b7);}['_getTargetTop'](_0x1aa000,_0x2e3813){if(null===_0x2e3813)return 0x0;if(_0x1aa000['target']instanceof _0x375970)return _0x2e3813['top'];{const _0x1c77fe=new _0x375970(this['view']['element'])['top'];return _0x2e3813['top']-_0x1c77fe;}}['_setItemTop'](_0x51ed18,_0x507b32,_0x35b627=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x35b627&&(_0x507b32=Math['max'](_0x507b32,this['_getMaxAvailableTop'](_0x51ed18))),_0x51ed18['top']=_0x507b32;}['_getMaxAvailableTop'](_0x40ab2a){let _0x1f40c5=this['_getItemBefore'](_0x40ab2a),_0x30595e=0x0;for(;_0x1f40c5;)_0x1f40c5['updateHeight'](),_0x30595e+=this['_spaceBetweenItems']+_0x1f40c5['height'],_0x1f40c5=this['_getItemBefore'](_0x1f40c5);return _0x30595e;}}function G(_0x5ae92f,_0x408ef5){return Math['max'](_0x5ae92f-_0x408ef5,0x0);}function g(_0x3579fd){return null!==_0x3579fd&&'object'==typeof _0x3579fd&&0x1===_0x3579fd['nodeType'];}class e extends _0x3110a5{['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(_0x1436ec){super(_0x1436ec),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4fc713(),this['_refreshPositioningDebounced']=_0x46ba7a(()=>{_0x1436ec['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x712bc6=this['context']['plugins']['get'](j),_0x4cf60d=this['context']['plugins']['get'](z);_0x712bc6['register']('wideSidebar',this),_0x4cf60d['container']&&_0x712bc6['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x228581){if(_0x228581===this['activeAnnotation'])return;const _0x4aa3e1=this['context']['plugins']['get'](z);_0x4aa3e1['_activeAnnotation']=_0x228581;const _0x18795c=this['activeAnnotation'];_0x4aa3e1['refresh']({'blurredAnnotation':_0x18795c,'activatedAnnotation':_0x228581}),this['activeAnnotation']=_0x228581;}['attach'](_0x24c1b2){this['annotations']=_0x24c1b2;const _0x541250=this['context']['plugins']['get'](z);if(_0x541250['_annotations']=_0x24c1b2,this['isAttached'])throw new _0xd7b9fb('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x541250,'set:container',()=>{this['detach'](),this['listenTo'](_0x541250,'change:container',_0x43d9be=>{_0x43d9be['off'](),this['attach'](_0x24c1b2);});}),_0x541250['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x183a8d=_0x45baa5=>{_0x45baa5['updateTargetRect'](),_0x541250['addAnnotation'](_0x45baa5);};for(const _0x24e05a of _0x24c1b2)_0x183a8d(_0x24e05a);this['listenTo'](_0x24c1b2,'add',(_0x89d3b8,_0x592c5a)=>{_0x183a8d(_0x592c5a);}),this['listenTo'](_0x24c1b2,'remove',(_0x4b96f5,_0x5c7385,_0x136760)=>{_0x541250['rearrange']({'removedAnnotation':_0x5c7385,'previousAnnotation':_0x24c1b2['get'](_0x136760-0x1),'nextAnnotation':_0x24c1b2['get'](_0x136760+0x1)}),_0x5c7385===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x24c1b2,'focus',(_0x301c57,_0x3857e4)=>{this['setActiveAnnotation'](_0x3857e4);}),this['listenTo'](_0x24c1b2,'blur',()=>{this['setActiveAnnotation'](null);});const _0x4afccc=this['context']instanceof _0x1726b6?this['context']['editors']:new _0x4fc713([this['context']]);for(const _0x159a4b of _0x4afccc)this['_integrateWithEditorAnnotations'](_0x159a4b);this['listenTo'](_0x4afccc,'add',(_0x167cca,_0x4d73c3)=>{this['listenTo'](_0x4d73c3,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4d73c3);});}),this['listenTo'](_0x4afccc,'remove',(_0x55e3c3,_0x373694)=>{_0x373694['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x373694['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xd7b9fb('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4961f3=this['context']['plugins']['get'](z);_0x4961f3['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4961f3),this['stopListening'](this['annotations']),this['context']instanceof _0x1726b6&&this['stopListening'](this['context']['editors']);for(const _0x567a39 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x567a39);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x213e02){if(!_0x213e02['plugins']['has']('EditorAnnotations'))return;const _0x2bd7f1=_0x213e02['plugins']['get']('EditorAnnotations'),_0x1a7d8b=()=>{const _0x1a6f84=_0x2bd7f1['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1a6f84[0x0]||null);};this['listenTo'](_0x2bd7f1,'refresh',_0x1a7d8b),this['listenTo'](_0x2bd7f1,'blur',(_0x19fd87,{isAnnotationTracked:_0x2a016d})=>{this['activeAnnotation']&&_0x2a016d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2bd7f1,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x1a5c11=>{_0x2bd7f1['hasDomSelection']()&&(_0x1a7d8b(),_0x1a5c11['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2bd7f1);}['_destroyEditorAnnotationsIntegration'](_0x4a15db){this['stopListening'](_0x4a15db),this['_editorAnnotations']['remove'](_0x4a15db);}}class C extends _0xf18eca{['counterView'];constructor(_0x248446){super(_0x248446);const _0x334357=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0xc7ef35,_0x58dbd2)=>_0xc7ef35?'...':_0x58dbd2['toString']()),this['set']('annotationType',''),this['icon']=_0x37d815,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x334357['to']('annotationType',_0x1b7682=>'ck-annotation-counter__badge--'+_0x1b7682),_0x334357['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x334357['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3110a5{['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(_0x297def){super(_0x297def),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x68bcfd())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4fc713(),this['_refreshPositioningDebounced']=_0x46ba7a(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x9a194a(this['context']['locale']),this['balloonPanelView']=new _0x484888(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xcbbac1){this['annotations']=_0xcbbac1;const _0x15781f=this['context']['plugins']['get'](z),_0x56d79b=this['balloonPanelView'];if(_0x15781f['_annotations']=_0xcbbac1,this['isAttached'])throw new _0xd7b9fb('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x15781f,'set:container',()=>{this['detach'](),this['listenTo'](_0x15781f,'change:container',_0x4083fc=>{_0x4083fc['off'](),this['attach'](_0xcbbac1);});}),_0x15781f['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0xc8afde=_0x312bec=>{const _0x2a489a=new C(this['context']['locale']);_0x15781f['addAnnotation'](_0x312bec,_0x2a489a),this['_annotationToNarrowView']['set'](_0x312bec,_0x2a489a),_0x2a489a['bind']('isDirty','annotationType','number')['to'](_0x312bec['view'],'isDirty','type','length'),_0x2a489a['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x56d79b['content']['first']!==_0x312bec['view']?(this['_showBalloon'](_0x312bec),_0x312bec['view']['element']['focus'](),this['setActiveAnnotation'](_0x312bec)):this['setActiveAnnotation'](null);});};for(const _0x467bc3 of _0xcbbac1)_0xc8afde(_0x467bc3);this['listenTo'](_0xcbbac1,'add',(_0x270c2d,_0x535165)=>{_0xc8afde(_0x535165);}),this['listenTo'](_0xcbbac1,'remove',(_0x50d3da,_0x40724f,_0x43deb3)=>{this['_annotationToNarrowView']['get'](_0x40724f)['destroy'](),this['_annotationToNarrowView']['delete'](_0x40724f),_0x15781f['rearrange']({'removedAnnotation':_0x40724f,'previousAnnotation':_0xcbbac1['get'](_0x43deb3-0x1),'nextAnnotation':_0xcbbac1['get'](_0x43deb3+0x1)}),_0x40724f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xcbbac1,'focus',(_0x2ca35d,_0x509773)=>{this['setActiveAnnotation'](_0x509773);}),this['listenTo'](_0xcbbac1,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xe55731,_0x396955)=>{_0x396955['keyCode']===_0x5eb4f3['esc']&&_0x56d79b['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x56d79b['content']['first']),this['_hideBalloon'](),_0x396955['stopPropagation'](),_0x396955['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x338b63,_0x209c2c)=>{const _0x560561=_0x209c2c['target'];_0x56d79b['isVisible']&&_0x56d79b['element']['contains'](_0x560561)||_0x15781f['view']['element']['contains'](_0x560561)||_0x338b63['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x1cdb78=>_0x1cdb78['contains'](_0x560561))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4c96dc=this['context']instanceof _0x1726b6?this['context']['editors']:new _0x4fc713([this['context']]);for(const _0x4cf2fe of _0x4c96dc)this['_integrateWithEditorAnnotations'](_0x4cf2fe);this['listenTo'](_0x4c96dc,'add',(_0x1af139,_0x5c7ee4)=>{this['listenTo'](_0x5c7ee4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5c7ee4);});}),this['listenTo'](_0x4c96dc,'remove',(_0x59a424,_0x8cd9a0)=>{_0x8cd9a0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x8cd9a0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x42a05b){if(_0x42a05b===this['activeAnnotation'])return;const _0x3b2539=this['context']['plugins']['get'](z);if(_0x3b2539['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x42a05b,'disableAnimationOnActivatedAnnotation':!0x0}),_0x42a05b)_0x3b2539['getSidebarItemView'](_0x42a05b)?this['_showBalloon'](_0x42a05b):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x42a05b;}['detach'](){if(!this['isAttached'])throw new _0xd7b9fb('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x1f7320=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1bb618=>_0x1bb618['destroy']()),this['_annotationToNarrowView']['clear'](),_0x1f7320['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x1726b6&&this['stopListening'](this['context']['editors']);for(const _0xb3ac51 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xb3ac51);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'](_0x364b9d){if(!_0x364b9d['plugins']['has']('EditorAnnotations'))return;const _0x76e307=_0x364b9d['plugins']['get']('EditorAnnotations'),_0x590b05=this['context']['plugins']['get'](z),_0x1d9aee=this['annotations'],_0x57ebbf=this['balloonPanelView'],_0x2b6739=()=>{const _0x6034f5=_0x76e307['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x6034f5),this['setActiveAnnotation'](_0x6034f5[0x0]||null);};this['listenTo'](_0x76e307,'refresh',_0x2b6739),this['listenTo'](_0x76e307,'blur',(_0x26c520,{isAnnotationTracked:_0x20a093})=>{this['activeAnnotation']&&_0x20a093(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x76e307,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1d9aee,'blur',_0x38b620=>{_0x76e307['hasDomSelection']()&&_0x38b620['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4ee73f,_0x304982)=>{const _0x4e0436=_0x304982['target'];_0x57ebbf['isVisible']&&_0x57ebbf['element']['contains'](_0x4e0436)||_0x590b05['view']['element']['contains'](_0x4e0436)||this['activeAnnotation']&&_0x76e307['hasDomSelection']()&&(_0x2b6739(),_0x4ee73f['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x76e307);}['_destroyEditorAnnotationsIntegration'](_0x145d81){_0x145d81&&(this['stopListening'](_0x145d81),this['_editorAnnotations']['remove'](_0x145d81));}['_setSelectedAnnotations'](_0x12370a){for(const _0x151600 of this['_selectedAnnotations'])_0x12370a['includes'](_0x151600)||this['_manuallyClosedAnnotationViews']['delete'](_0x151600['view']);this['_selectedAnnotations']=_0x12370a;}['_refreshPositioning'](){const _0x45ac8b=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x45ac8b['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x8d88b4){if(this['_manuallyClosedAnnotationViews']['has'](_0x8d88b4['view']))return;const _0x4e9d51=this['balloonPanelView']['content']['first'];_0x4e9d51!==_0x8d88b4['view']?(_0x4e9d51&&this['_detachListeners'](_0x4e9d51),this['_attachListeners'](_0x8d88b4['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x8d88b4['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x56af15=this['balloonPanelView']['content']['first'],_0x5e973a=_0x56af15&&this['annotations']['getByView'](_0x56af15);if(!_0x5e973a||!this['_annotationToNarrowView']['has'](_0x5e973a))return;const _0x1e3678=this['_annotationToNarrowView']['get'](_0x5e973a)['element'],_0x2f0f76=(function(){const _0x4631f1=_0x484888['defaultPositions'];return[_0x4631f1['southArrowNorthEast'],_0x4631f1['northArrowSouthEast'],_0x4631f1['southArrowNorth'],_0x4631f1['northArrowSouth'],_0x4631f1['southArrowNorthWest'],_0x4631f1['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1e3678,'positions':_0x2f0f76});}['_hideBalloon'](){const _0x573047=this['balloonPanelView'],_0x2c6677=_0x573047['content']['first'];_0x2c6677&&(this['_detachListeners'](_0x2c6677),_0x573047['unpin'](),_0x573047['content']['clear']());}['_attachListeners'](_0x1d5ad2){this['listenTo'](_0x1d5ad2,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1d5ad2,'Esc',(_0x29350b,_0x5b40a3)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1d5ad2),this['_hideBalloon'](),_0x5b40a3();});}['_detachListeners'](_0x16a1b6){this['stopListening'](_0x16a1b6);}}class c extends _0x25b6bf{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x4ecb9d,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x18f7f0){super(_0x18f7f0),_0x18f7f0['editing']['view']['addObserver'](_0x5956f6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x18f7f0['plugins']['get'](_0x4ecb9d),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x46ba7a(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x49d4da=this['editor']['plugins']['get'](j);_0x49d4da['context']===this['editor']&&(_0x49d4da['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1235e6,_0xbdb525)=>{const _0x400491=this['_balloon'];if(this['isAttached']&&_0x400491['visibleView']){const _0x541b6e=this['annotations']['getByView'](_0x400491['visibleView']);_0x541b6e&&this['_closeAnnotation'](_0x541b6e),_0xbdb525();}}));}['afterInit'](){const _0x1c7977=this['editor']['plugins']['get'](j);_0x1c7977['context']===this['editor']&&(_0x1c7977['hasActive']()||_0x1c7977['switchTo']('inline'));}['setActiveAnnotation'](_0x5740b4){_0x5740b4!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5740b4&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5740b4)&&this['_addAnnotationToBalloon'](_0x5740b4,!0x0),_0x5740b4['isActive']=!0x0),_0x5740b4||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5740b4);}['attach'](_0x136906){this['annotations']=_0x136906;const _0x10ccd1=this['editor']['plugins']['get'](j),_0xb50f3e=this['_balloon'];if(this['isAttached'])throw new _0xd7b9fb('inlineannotations-attach-already-attached',this);if(_0x10ccd1['context']!==this['editor'])throw new _0xd7b9fb('inlineannotations-not-allowed-with-context',this);const _0xa65b31=this['editor']['plugins']['get'](b);this['listenTo'](_0xa65b31,'refresh',()=>{const _0x2bd376=_0xa65b31['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2d3a84,_0x19e841;!this['_forceRefresh']&&(_0x2d3a84=_0x2bd376,_0x19e841=this['_selectedAnnotations'],_0x2d3a84['length']===_0x19e841['length']&&_0x2d3a84['every'](_0x5ad500=>_0x19e841['includes'](_0x5ad500)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2bd376),this['setActiveAnnotation'](_0x2bd376[0x0]||null));}),this['listenTo'](_0xa65b31,'blur',(_0x469486,{isAnnotationTracked:_0x1431cb})=>{this['activeAnnotation']&&_0x1431cb(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0xa65b31,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2b7f40,_0x2b3ba3,_0x3e53bd)=>{_0x3e53bd||this['setActiveAnnotation'](null);}),this['listenTo'](_0x136906,'remove',(_0x5b01e7,_0x1caf4b)=>{this['_removeAnnotationFromBalloon'](_0x1caf4b),_0x1caf4b===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xb50f3e,'change:visibleView',(_0x5b210e,_0x503413,_0x40b127,_0x29bce3)=>{_0x29bce3&&this['stopListening'](_0x29bce3);const _0xe59c50=_0x136906['getByView'](_0x40b127);_0x40b127&&_0xe59c50&&(this['listenTo'](_0x40b127,'change:height',()=>{_0xb50f3e['updatePosition']();}),this['listenTo'](_0x40b127,'Esc',()=>{this['_closeAnnotation'](_0xe59c50),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xe59c50&&this['setActiveAnnotation'](_0xe59c50));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0xb50f3e['visibleView']&&(_0x136906['getByView'](_0xb50f3e['visibleView'])&&_0xb50f3e['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 _0xd7b9fb('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1a0909 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1a0909);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x2e630a){for(const _0x4b0591 of this['_selectedAnnotations'])_0x2e630a['includes'](_0x4b0591)||this['_manuallyClosed']['delete'](_0x4b0591);for(const _0x5bfcaa of this['annotations'])_0x2e630a['includes'](_0x5bfcaa)||this['_removeAnnotationFromBalloon'](_0x5bfcaa);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2afd76 of _0x2e630a)this['_addAnnotationToBalloon'](_0x2afd76);}this['_selectedAnnotations']=_0x2e630a;}['_addAnnotationToBalloon'](_0x192242,_0x353cb6=!0x1){this['_manuallyClosed']['has'](_0x192242)||(this['_addedAnnotations']['has'](_0x192242)||this['_balloon']['hasView'](_0x192242['view'])||(this['_addedAnnotations']['add'](_0x192242),this['_balloon']['add']({'stackId':_0x192242['view']['id'],'view':_0x192242['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x192242)}})),_0x353cb6&&this['_balloon']['showStack'](_0x192242['view']['id']));}['_getBalloonTargetForAnnotation'](_0xf31349){const _0x2d2c7e=_0xf31349['target'],_0x3997f1=this['editor']['editing']['view'],_0x5668ee=_0x3997f1['document']['selection']['getFirstRange'](),_0x4e7a97=_0x3997f1['domConverter']['viewRangeToDom'](_0x5668ee);if(_0x4e7a97['collapse'](!0x0),_0x2d2c7e){if(_0x2d2c7e instanceof _0x375970)return _0x2d2c7e;let _0x2ea9fb=[];for(const _0x5e0c31 of _0x2d2c7e)_0x2ea9fb['push'](...F(_0x5e0c31['getClientRects']()));_0x2ea9fb=function(_0x20816b){const _0x57e013=[];let _0x2cf40b=_0x20816b[0x0];for(let _0x58021f=0x1;_0x58021f<_0x20816b['length'];_0x58021f++)P(_0x2cf40b,_0x20816b[_0x58021f])?_0x2cf40b['width']+=_0x20816b[_0x58021f]['width']:(_0x57e013['push'](_0x2cf40b),_0x2cf40b=_0x20816b[_0x58021f]);return _0x57e013['push'](_0x2cf40b),_0x57e013;}(_0x2ea9fb);const _0x1f1a78=_0x4e7a97['getBoundingClientRect']();return _0x2ea9fb['find'](_0x21ef89=>_0x21ef89['top']<=_0x1f1a78['top']&&_0x21ef89['bottom']>=_0x1f1a78['bottom']&&_0x21ef89['left']<=_0x1f1a78['left']&&_0x21ef89['right']>=_0x1f1a78['right'])||_0x2ea9fb[0x0];}return _0xf31349['targetRect']||_0x4e7a97;}['_removeAnnotationFromBalloon'](_0xa02175){this['_addedAnnotations']['has'](_0xa02175)&&this['_balloon']['hasView'](_0xa02175['view'])&&(this['_addedAnnotations']['delete'](_0xa02175),this['_balloon']['remove'](_0xa02175['view']));}['_closeAnnotation'](_0x29345d){this['_manuallyClosed']['add'](_0x29345d),this['_removeAnnotationFromBalloon'](_0x29345d);}}function F(_0x368d1d){return Array['from'](_0x368d1d)['map'](DOMRect['fromRect']);}function P(_0x4003b2,_0x567b16){return _0x4003b2['top']===_0x567b16['top']&&_0x4003b2['bottom']===_0x567b16['bottom']&&_0x4003b2['right']===_0x567b16['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x306776,_0x2e021f){super(_0x306776),this['set']('isEmpty',!_0x2e021f['length']),this['focusTracker']=new _0x44f1cb(),this['_annotationViews']=_0x2e021f,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x47d7f6({'focusables':_0x2e021f,'focusTracker':this['focusTracker']}),this['listenTo'](_0x2e021f,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x2e021f,'remove',(_0x8634f9,_0x7d3472)=>{_0x7d3472['isActive']&&this['focus'](),_0x2e021f['length']||(this['isEmpty']=!0x0);});const _0x43c182=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x306776,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x2e021f},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x43c182['if']('isEmpty','ck-hidden',_0x5b3e3e=>!_0x5b3e3e)]},'children':[{'text':N(_0x306776,'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 _0x317cba of this['_annotationViews'])this['focusTracker']['add'](_0x317cba['element']);this['_annotationViews']['on']('change',(_0x2e601b,{added:_0x1802a0,removed:_0x466e8d})=>{for(const _0x5d1ae5 of _0x1802a0)this['focusTracker']['add'](_0x5d1ae5['element']);for(const _0x43e53b of _0x466e8d)this['focusTracker']['remove'](_0x43e53b['element']);});}}class p extends _0x3110a5{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5f3fa2){super(_0x5f3fa2),this['archivedThreads']=new _0x4fc713();}['init'](){const _0x4faa33=this['context'],_0x267673=_0x4faa33['plugins']['get'](o),_0x35fb3d=_0x4faa33['plugins']['get'](y);this['listenTo'](_0x267673,'addCommentThread',(_0x111dde,{threadId:_0x3fd50f})=>{const _0x26ddec=_0x267673['getCommentThread'](_0x3fd50f);_0x26ddec['archivedAt']&&this['archivedThreads']['add'](_0x26ddec,this['_calculatePosition'](_0x26ddec['archivedAt'])),this['listenTo'](_0x26ddec,'change:archivedAt',(_0x2e0be2,_0x2a3e5a,_0x3bc5ab)=>{_0x3bc5ab?this['archivedThreads']['has'](_0x26ddec)||this['archivedThreads']['add'](_0x26ddec,this['_calculatePosition'](_0x26ddec['archivedAt'])):this['archivedThreads']['has'](_0x26ddec)&&this['archivedThreads']['remove'](_0x26ddec);});}),this['listenTo'](_0x267673,'removeCommentThread',(_0x23c0c4,{threadId:_0x1d3e81})=>{const _0xb673b0=_0x267673['getCommentThread'](_0x1d3e81);this['stopListening'](_0xb673b0),this['archivedThreads']['has'](_0xb673b0)&&this['archivedThreads']['remove'](_0xb673b0);},{'priority':'highest'}),this['listenTo'](_0x35fb3d['collection'],'focus',(_0x1522bf,_0x318a9d)=>{_0x318a9d['isVisible']||(_0x318a9d['isActive']=!0x0,_0x35fb3d['activate'](_0x318a9d));});}['_calculatePosition'](_0x7937e7){const _0x5c8387=[...this['archivedThreads']]['findIndex'](_0x15cefd=>_0x15cefd['archivedAt']<_0x7937e7);return _0x5c8387>-0x1?_0x5c8387:this['archivedThreads']['length'];}}class a extends _0x25b6bf{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x57a2d7];}constructor(_0x16f4b2){super(_0x16f4b2),this['annotationViews']=new _0x9ecf0b(),this['_pendingThreads']=[];}['init'](){const _0xb8cb61=this['editor'],_0x951ae7=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xb8cb61['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xf18eca,!0x0)),_0xb8cb61['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x2fb8f9=this['_createCommentsArchiveButton'](_0x892bd0);return _0x2fb8f9['set']({'role':'menuitemcheckbox'}),_0x2fb8f9;});const _0x219cad=_0xb8cb61['plugins']['get'](p),_0x15757c=_0xb8cb61['plugins']['get']('Annotations'),_0x205419=_0xb8cb61['plugins']['get']('CommentsRepository');_0x219cad['archivedThreads']['forEach'](_0x531882=>{this['_handleNewThread'](_0x531882);}),this['listenTo'](_0x219cad['archivedThreads'],'add',(_0x4b04fc,_0x2f2976)=>{this['_handleNewThread'](_0x2f2976);}),this['listenTo'](_0x15757c['collection'],'add',(_0x4ba2b5,_0x417fab)=>{const _0x41eafc=this['_pendingThreads']['find'](_0x5c5a17=>{const _0x4f56c5=_0x205419['_threadToController']['get'](_0x5c5a17);return _0x4f56c5&&_0x417fab['innerView']===_0x4f56c5['view'];});if(_0x41eafc){const _0x46c167=this['_calculatePosition'](_0x41eafc['archivedAt']);this['_addAnnotationToArchive'](_0x417fab,_0x46c167),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x41eafc),0x1);}}),this['listenTo'](_0x219cad['archivedThreads'],'remove',(_0x2b963b,_0xddd1d2)=>{const _0x1e27bc=_0xb8cb61['config']['get']('collaboration.channelId');if(!_0x1e27bc||_0xddd1d2['channelId']===_0x1e27bc){if(this['_pendingThreads']['includes'](_0xddd1d2))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xddd1d2),0x1);else{const _0x1b39a8=_0x205419['_threadToController']['get'](_0xddd1d2),_0x44a12a=_0x15757c['getByInnerView'](_0x1b39a8['view']);this['annotationViews']['remove'](_0x44a12a['view']),this['stopListening'](_0x44a12a),this['stopListening'](_0x44a12a['focusableElements']);}}}),this['listenTo'](_0x15757c['collection'],'add',(_0x44a821,_0x1d0422)=>{this['listenTo'](_0x1d0422,'escape',_0x951ae7);}),this['listenTo'](_0x15757c['collection'],'remove',(_0x1753e0,_0x1a4328)=>{this['stopListening'](_0x1a4328,'escape',_0x951ae7);});}['_addAnnotationToArchive'](_0x5bd55f,_0x1d62c4){this['listenTo'](_0x5bd55f,'set:isVisible',_0xc2cf62=>{_0xc2cf62['return']=!0x1,_0xc2cf62['stop']();}),this['annotationViews']['add'](_0x5bd55f['view'],_0x1d62c4);}['_handleNewThread'](_0x233204){const _0x101a6f=this['editor']['plugins']['get']('CommentsRepository'),_0x456b52=this['editor']['plugins']['get']('Annotations'),_0x4ae842=this['editor']['config']['get']('collaboration.channelId');if(!_0x4ae842||_0x233204['channelId']===_0x4ae842){const _0xcd1483=_0x101a6f['_threadToController']['get'](_0x233204);if(!_0xcd1483)return void this['_pendingThreads']['push'](_0x233204);const _0x434ee9=this['_calculatePosition'](_0x233204['archivedAt']),_0x4e4dff=_0x456b52['getByInnerView'](_0xcd1483['view']);_0x4e4dff['isVisible']&&_0x456b52['_visibleAnnotations']['remove'](_0x4e4dff),this['_addAnnotationToArchive'](_0x4e4dff,_0x434ee9);}}['_calculatePosition'](_0x52df7b){const _0x520c39=this['editor']['config']['get']('collaboration.channelId'),_0x15658b=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4e21a8=>_0x4e21a8['channelId']===_0x520c39)['findIndex'](_0x459b04=>_0x459b04['archivedAt']<_0x52df7b);return _0x15658b<0x0||_0x15658b>this['annotationViews']['length']?this['annotationViews']['length']:_0x15658b-0x1;}['_toggleDialog'](){const _0x49a100=this['editor'],_0xaead88=_0x49a100['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x49a100['locale'],this['annotationViews'])),'commentsArchive'===_0xaead88['id']?_0xaead88['hide']():_0xaead88['show']({'id':'commentsArchive','title':N(_0x49a100['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3db991,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1300f0['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x19bcfc,_0x381f18=!0x1){const _0x1003b4=this['editor']['locale'],_0xc8ceef=this['editor']['plugins']['get']('Dialog'),_0x12d5a2=new _0x19bcfc(_0x1003b4);return _0x12d5a2['bind']('isEnabled')['to'](this,'isEnabled'),_0x12d5a2['bind']('isOn')['to'](_0xc8ceef,'id',_0x336188=>'commentsArchive'===_0x336188),_0x12d5a2['set']({'label':N(_0x1003b4,'COMMENTS_ARCHIVE'),'icon':_0x3db991,'isToggleable':!0x0}),_0x381f18&&(_0x12d5a2['tooltip']=!0x0),this['listenTo'](_0x12d5a2,'execute',()=>this['_toggleDialog']()),_0x12d5a2;}['_hideDialogOnAnnotationEscape']=_0x59ff3a=>{const _0x4b15be=_0x59ff3a['source'];if(!this['annotationViews']['has'](_0x4b15be['view']))return;const _0x262d5d=this['editor']['plugins']['get']('Dialog');_0x262d5d['isOpen']&&'commentsArchive'===_0x262d5d['id']&&(_0x262d5d['hide'](),_0x59ff3a['stop']());};}class gi extends _0x25b6bf{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 _0x3b2802,ContextPlugin as _0x2cf45d,PendingActions as lt,Command as _0x72c86f,Plugin as _0x25d649,Context as _0x2d2228}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x3495be,uid as _0x3c7a69,KeystrokeHandler as jt,FocusTracker as _0x19bf9d,diff as _0x52af5d,Collection as _0x1e2837,Rect as _0x1d4450,CKEditorError as _0x354fbc,first as _0x4a7b67,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x378623,keyCodes as _0x3c9634}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x318ab3,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x5a9c39,trimHtml as ts,LateFocusDropdownButtonView as _0x3c8003,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x11f337}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0xacb6a5}from'es-toolkit/compat';import{IconUndo as _0xae0a1e,IconCheck as _0xcff3d4,IconPencil as _0x3b4f51,IconRemoveComment as _0x3d18bd,IconThreeVerticalDots as _0x34cf99,IconAddComment as _0x5caa89,IconCommentsArchive as _0x969c68}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x34c114,ButtonView as _0x175706,ViewCollection as _0x47c617,createDropdown as _0x48f904,ListView as _0x51e688,focusChildOnDropdownOpen as _0x16617c,ListItemView as _0x2ca21a,MenuBarMenuListItemButtonView as _0x22f4b8,BodyCollection as _0x191c5b,BalloonPanelView as _0x82f7f5,ContextualBalloon as _0x4e9b7e,Dialog as _0xf97b9c,DialogViewPosition as _0x1d88d4}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x4955d5}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as 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 _0x886b93}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x326d12}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x3495be(){['model'];['view'];constructor(_0x5802a8,_0x78540f){super(),this['model']=_0x5802a8,this['model']['_isAttached']=!0x0,this['view']=_0x78540f,this['listenTo'](_0x78540f,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x78540f,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x78540f,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x78540f,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x78540f,'addComment',(_0x38c6ee,_0x30d4d0)=>this['addComment'](_0x30d4d0)),this['listenTo'](_0x78540f,'updateComment',(_0x50555a,_0x599e7b,_0xe99409)=>this['updateComment'](_0x599e7b,_0xe99409)),this['listenTo'](_0x78540f,'removeComment',(_0x46f3cc,_0x27e8bf)=>this['removeComment'](_0x27e8bf));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x499203){this['model']['addComment']({'content':_0x499203,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x37f2d2,_0x33ecfb){this['model']['getComment'](_0x37f2d2)['update']({'content':_0x33ecfb});}['removeComment'](_0x56866f){this['model']['getComment'](_0x56866f)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x4da2fb,_0x57d4c2,_0x581c71){const t=_0x4da2fb['t'];switch(_0x57d4c2){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'},_0x581c71);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'},_0x581c71);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'},_0x581c71);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'},_0x581c71);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x581c71);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'},_0x581c71);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'},_0x581c71);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'},_0x581c71);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 Rt extends $t{['main'];['editable'];constructor(_0x27af6e,_0x3f40ce){super(_0x27af6e);const _0x5563cd=_0x3c7a69();this['main']=this['createCollection'](),this['editable']=new Vt(_0x27af6e,_0x3f40ce,void 0x0,{'label':()=>N(_0x27af6e,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x27af6e['uiLanguageDirection'],'lang':_0x27af6e['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5563cd},'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 Et extends Ut{['view'];constructor(_0x50a43e){super(_0x50a43e),this['view']=new Rt(_0x50a43e['locale'],_0x50a43e['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x45df1a=this['editor']['editing']['view'],_0xce5a3a=this['view']['editable'],_0x57669c=_0x45df1a['document']['getRoot']();_0xce5a3a['name']=_0x57669c['rootName'],this['view']['render']();const _0x362be4=_0xce5a3a['element'];this['setEditableElement'](_0xce5a3a['name'],_0x362be4),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x45df1a['attachDomRoot'](_0x362be4),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x3495be(_0x3b2802){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x2de6c6={}){function _0x3f9481(_0x337787){return _0x337787['map'](_0x1baa88=>String['fromCharCode'](_0x1baa88))['join']('');}(_0x2de6c6=Object['assign']({},_0x2de6c6))['plugins']||(_0x2de6c6['plugins']=hs['defaultPlugins']),super(_0x2de6c6),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x3f9481([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3f9481([0x76,0x69,0x65,0x77])][_0x3f9481([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3f9481([0x61,0x75,0x74,0x6f]),this[_0x3f9481([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x3f9481([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3f9481([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x3f9481([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x3f9481([0x6f,0x6b])});}['create'](){const _0xa37c1a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xa37c1a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2b58a2=>{const _0x23ff13=this['model']['document']['getRoot'](),_0x1e080a=_0x23ff13&&_0x23ff13['getChild'](_0x23ff13['childCount']-0x1);_0x2b58a2['setSelection'](_0x1e080a,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x10dfc7=this['editing']['view'],_0x1fd1ec=_0x10dfc7['document']['getRoot'](),_0x9ed310=_0x1fd1ec['getChild'](0x0);_0x1fd1ec['childCount']>0x1||!_0x9ed310||'p'!=_0x9ed310['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x10dfc7,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x9ed310['placeholder']=this['placeholder']),Ft({'view':_0x10dfc7,'element':_0x9ed310,'keepOnFocus':!0x0}),this['placeholderElement']=_0x9ed310);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0xed5bbf,_0x1ae778={}){super(_0xed5bbf),this['editor']=null,this['_editorConfig']=_0x1ae778,this['set']('value',_0x1ae778['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0xed5bbf,'Reply...')),this['set']('submitLabel',N(_0xed5bbf,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x19bf9d(),this['focusCycler']=new _0x34c114({'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',(_0x40724d,_0x1ee8a2)=>{this['cancelButtonView']['fire']('execute'),_0x1ee8a2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x417c27,_0x5f0c60)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5f0c60());}),this['on']('submit',(_0x54b1e7,_0x307446)=>{_0x307446['length']>0xfde8?(alert(N(_0xed5bbf,'TOO_LONG_COMMENT_ALERT',[_0x307446['length'],0xfde8])),_0x54b1e7['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2b3253=this['editor'];this['element']['insertBefore'](_0x2b3253['ui']['element'],this['element']['firstChild']),_0x2b3253['model']['document']['on']('change',()=>this['value']=_0x2b3253['getData']()),_0x2b3253['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2b3253['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x9a2a5e){-0x1===_0x9a2a5e?(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:_0xc7652a}=this,_0x1fc698=new _0x175706(_0xc7652a);return _0x1fc698['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x1fc698['withText']=!0x0,_0x1fc698['bind']('label')['to'](this,'submitLabel'),_0x1fc698['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x1fc698['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x3e5730,_0x51205d)=>!_0x51205d&&!!_0x3e5730['trim']()),_0x1fc698;}['_createCancelButton'](){const {locale:_0x51155c}=this,_0x303400=new _0x175706(_0x51155c);return _0x303400['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x303400['label']=N(_0x51155c,'Cancel'),_0x303400['withText']=!0x0,_0x303400['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x303400;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x9b5191=>{this['focusTracker']['add'](_0x9b5191['element']);}),this['focusables']['on']('change',(_0x22b51c,_0x438ebf)=>{for(const _0x46b056 of Array['from'](_0x438ebf['added'])['reverse']())this['focusTracker']['add'](_0x46b056['element']);});}}class ie extends kt{constructor(_0x27507b,_0x2a23bb,_0x2c11a7){super(_0x27507b),this['commentInputView']=new es(_0x27507b,_0x2c11a7),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2bda80,_0x4649bc)=>_0x2bda80||!!_0x4649bc),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 _0x318ab3(_0x27507b,_0x2a23bb),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'](_0x26b1dd){this['commentInputView']['focus'](_0x26b1dd);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x66b7c0,_0x4e8a89)=>{const {submitButtonView:_0x385061,cancelButtonView:_0x5c1d32,editor:_0x3e5776}=this['commentInputView'];[_0x385061['element'],_0x5c1d32['element'],_0x3e5776?_0x3e5776['editing']['view']['getDomRoot']():null]['filter'](_0x532b5a=>_0x532b5a)['some'](_0x35cd18=>_0x35cd18['contains'](_0x4e8a89['target']))||(this['focus'](),_0x4e8a89['preventDefault']());});}}class rs extends kt{constructor(_0x38f73a){super(_0x38f73a);const _0x2af9c9=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2af9c9['to']('count',_0x838b4e=>N(_0x38f73a,'NUMBER_OF_COMMENTS',_0x838b4e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x22a751,_0x1168cd,_0x13fcad){super(_0x22a751);const _0x30d25e=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1168cd['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1168cd,this['_config']=_0x13fcad,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x19bf9d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x34c114({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xc08f74=>this['commentViews']['map'](_0x2819b3=>_0x2819b3['element'])['includes'](_0xc08f74['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x22a751),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x4f8635=>_0x4f8635-this['_config']['maxCommentsWhenCollapsed']);for(const _0x25cbcb of _0x1168cd['comments'])this['_handleNewCommentModel'](_0x25cbcb);this['_handleInfoComment'](),this['listenTo'](_0x1168cd['comments'],'add',(_0x5e05b4,_0x1e23a5)=>{const _0x4f0dc5=this['_calculatePosition'](_0x1e23a5);this['length']++,this['_handleNewCommentModel'](_0x1e23a5,_0x4f0dc5),this['refreshVisibleViews']();}),this['listenTo'](_0x1168cd['comments'],'remove',(_0x5b66af,_0x2d529b)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2d529b),this['refreshVisibleViews']();}),this['listenTo'](_0x1168cd,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1168cd,'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',_0x30d25e['if']('length','ck-hidden',_0x12b56b=>!_0x12b56b)],'aria-label':N(_0x22a751,'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'](_0x35d71c){-0x1===_0x35d71c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x314241 of this['commentViews'])_0x314241['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1ba1d9,_0x4bd9c3){const _0x19099f=new this['_config']['CommentView'](this['locale'],_0x1ba1d9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x19099f['viewUid']=_0x1ba1d9['id'],_0x19099f['delegate']('removeComment')['to'](this),_0x19099f['delegate']('updateComment')['to'](this),_0x19099f['delegate']('resolveCommentThread')['to'](this),_0x19099f['delegate']('editorReady')['to'](this),_0x19099f['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x19099f,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x19099f,_0x4bd9c3);}['_calculatePosition'](_0x178498){const _0x1842c8=this['_model']['_findOptimalIndex'](_0x178498);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x178498['authoredAt']?_0x1842c8-0x1:_0x1842c8:_0x1842c8-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x2d536c={'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'],_0x2d536c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x2d536c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5b4d5b){const _0x161714=this['commentViews']['remove'](_0x5b4d5b['id']);this['stopListening'](_0x161714),_0x161714['isEditMode']&&this['_updateHasDirtyComment'](),_0x161714['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2b93f5=>_0x2b93f5['isEditMode']);}['_rearrangeCollapse'](){const _0x2b6f2d=function(_0x1678c4){const _0x39dd4b=new _0x1e2837();for(const _0x39ef3b of _0x1678c4)_0x39dd4b['add'](_0x39ef3b);return _0x39dd4b;}(this['commentViews']),_0x1dc03a=this['_collapsedCommentsView']['count'];for(let _0x55dcde=0x1;_0x55dcde<=_0x1dc03a;_0x55dcde++)_0x2b6f2d['remove'](0x1);for(const _0x247a99 of _0x2b6f2d)_0x247a99['collapse']();_0x1dc03a>0x0&&_0x2b6f2d['add'](this['_collapsedCommentsView'],0x1),ns(_0x52af5d(Array['from'](this['visibleViews']),Array['from'](_0x2b6f2d)),this['visibleViews'],_0x2b6f2d);}['_rearrangeExpand'](){ns(_0x52af5d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x10b5fd of this['visibleViews'])_0x10b5fd['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0xaf58e1=>{this['focusTracker']['add'](_0xaf58e1['element']),this['keystrokes']['listenTo'](_0xaf58e1['element']);}),this['commentViews']['on']('change',(_0x17010e,_0x310ae6)=>{for(const _0x5832ed of _0x310ae6['removed'])this['focusTracker']['remove'](_0x5832ed['element']),this['keystrokes']['stopListening'](_0x5832ed['element']);for(const _0x504234 of Array['from'](_0x310ae6['added'])['reverse']())this['focusTracker']['add'](_0x504234['element']),this['keystrokes']['listenTo'](_0x504234['element']);});}}function ns(_0x7b261,_0x5f483c,_0x3934dd){let _0x3ef9a0=0x0;for(const _0x30156e of _0x7b261)switch(_0x30156e){case'insert':_0x5f483c['add'](_0x3934dd['get'](_0x3ef9a0),_0x3ef9a0),_0x3ef9a0++;break;case'delete':_0x5f483c['remove'](_0x3ef9a0);break;case'equal':_0x3ef9a0++;}}class oe extends kt{constructor(_0x17ce53){super(_0x17ce53);const _0x5d6ba8=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5d6ba8['to']('contextValue',_0x39afd0=>N(_0x17ce53,'THREAD_CONTEXT_LABEL',_0x39afd0)),'tabindex':-0x1},'children':[{'text':_0x5d6ba8['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3fd862,_0x56a85b){super(_0x3fd862);const _0x579bde=this['bindTemplate'];this['_model']=_0x56a85b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x19bf9d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x34c114({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1cf4f0=>!!_0x1cf4f0),this['bind']('contextValue')['to'](this['_model'],'context',_0x46a7c2=>_0x46a7c2&&_0x46a7c2['value']?this['_trimContextValue'](_0x46a7c2['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',_0x579bde['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 _0x4d3e58=new _0x175706(this['locale']);return _0x4d3e58['label']=N(this['locale'],'Reopen'),_0x4d3e58['tooltip']=N(this['locale'],'Reopen'),_0x4d3e58['icon']=_0xae0a1e,_0x4d3e58['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x22ecf2=>!_0x22ecf2),_0x4d3e58['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x52681e,_0x2b9806)=>_0x52681e&&_0x2b9806),_0x4d3e58['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x4d3e58;}['_trimContextValue'](_0x5640d5){if(_0x5640d5['length']<0x96)return _0x5640d5;const _0x2c608c=_0x5640d5['lastIndexOf']('\x20',0x93);return _0x5640d5['substring'](0x0,_0x2c608c>-0x1?_0x2c608c:0x93)+'...';}['_attachContextActions'](){const _0x5ca20f=this['element']['querySelector']('.ck-context'),_0x107327=_0x5ca20f['querySelector']('.ck-context__value');this['listenTo'](_0x5ca20f,'mouseenter',()=>{_0x107327['offsetWidth']<_0x107327['scrollWidth']&&_0x5ca20f['classList']['add']('overlay');}),this['listenTo'](_0x5ca20f,'mouseleave',()=>{_0x5ca20f['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3ab647 of this['focusables'])this['focusTracker']['add'](_0x3ab647['element']),this['keystrokes']['listenTo'](_0x3ab647['element']);}['_createContextView'](){const _0x251a0f=new oe(this['locale']);return _0x251a0f['bind']('contextValue')['to'](this),_0x251a0f;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3f6562,_0x11ace0,_0x200a16,_0x14c6ae){super(_0x3f6562),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x11ace0,this['_localUser']=_0x200a16,this['_config']=_0x14c6ae,this['commentThreadHeaderView']=new Xt(_0x3f6562,_0x11ace0),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x3f6562,N(_0x3f6562,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3f6562,_0x11ace0,Object['assign']({'CommentView':this['_config']['CommentView']},_0x14c6ae)),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',(_0x13245f,_0x4853ab)=>_0x13245f||!!_0x4853ab),this['bind']('isUnlinked')['to'](_0x11ace0,'unlinkedAt',_0x4a9cee=>!!_0x4a9cee),this['bind']('ariaLabel')['to'](this,'length',_0x57334e=>{const _0xe09308=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x57334e,_0xe09308]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x19bf9d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x34c114({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2c38db=>_0x2c38db['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x427e4f=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5c5210=_0x427e4f['commentInputView'];return _0x427e4f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5c5210,'value',(_0x301759,_0xc6b6d2,_0x4cd4da,_0x117efa,_0x2226b5)=>!!_0x2226b5||!!_0x117efa&&_0x4cd4da&&!_0xc6b6d2||_0x301759&&_0x4cd4da&&!_0xc6b6d2),_0x5c5210['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x487f45,_0x42c078,_0x4eb87c)=>{let _0xd95f5a;return _0xd95f5a=_0x4eb87c&&_0x42c078?'Reply\x20to\x20reopen\x20discussion...':_0x487f45?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0xd95f5a);}),_0x5c5210['bind']('submitLabel')['to'](this,'length',_0x12904a=>N(this['locale'],_0x12904a?'Reply':'Comment')),_0x5c5210['on']('submit',(_0x418441,_0x489e6a)=>{this['fire']('addComment',_0x489e6a),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5c5210['on']('cancel',()=>{this['focus']();}),_0x5c5210['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5c5210['on']('cancel',_0x5798fb=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5798fb['stop']());}),this['on']('change:isActive',(_0x20fc41,_0x53cb38,_0x42974d)=>{_0x42974d||this['length']||_0x5c5210['value']||this['fire']('removeCommentThread');}),_0x427e4f;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x8d3b5a,_0x16017f,_0x39234a,_0x18de33){super(_0x8d3b5a,_0x16017f,_0x39234a,_0x18de33),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x8d3b5a,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x20410b,_0x205c57,_0x12bea6)=>{_0x12bea6||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x4820a7,_0x3b0258,_0x5413b7)=>{_0x5413b7&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2ec534=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2ec534['if']('isActive','ck-thread--active'),_0x2ec534['if']('isUnlinked','ck-thread--unlinked'),_0x2ec534['to']('actionIndicator',_0x10bf7c=>_0x10bf7c?'ck-thread--'+_0x10bf7c:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2ec534['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 _0x58da61 of this['commentsListView']['commentViews'])_0x58da61['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x595250}=this,_0x5afdcc=this['commentsListView']['commentViews']['get'](0x0);_0x5afdcc===this['_boundFirstCommentView']||_0x5afdcc['isSystemComment']||(this['_boundFirstCommentView']=_0x5afdcc,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5afdcc,'actionIndicator',_0x401e6f=>'remove'===_0x401e6f?'remove':null),_0x5afdcc['placeholder']=N(_0x595250,'Write\x20a\x20comment...'),_0x5afdcc['removeButton']['on']('execute',_0x47542a=>{_0x47542a['stop'](),this['showConfirm'](N(_0x595250,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5afdcc['focus']();}),_0x5afdcc['actionBar']['add'](this['resolveButton'],0x0),_0x5afdcc['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x19fe6e=new _0x5a9c39(this['locale']);return _0x19fe6e['label']=N(this['locale'],'Resolve'),_0x19fe6e['tooltip']=N(this['locale'],'Resolve'),_0x19fe6e['icon']=_0xcff3d4,_0x19fe6e['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x19fe6e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5cd4c=>!_0x5cd4c),_0x19fe6e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4cd7ce,_0x596ff5)=>_0x4cd7ce&&!_0x596ff5),_0x19fe6e['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x19fe6e;}['_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 is extends kt{constructor(_0x4152d2){super(_0x4152d2),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x2afaaa,_0x2db051,_0x23b13)=>{this['element']['innerHTML']=_0x23b13;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x23f51e,_0x264af2,_0x476008){super(_0x23f51e),this['_model']=_0x264af2,this['_config']=_0x476008,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x264af2,'content',_0x264af2,'authoredAt',(_0x263bad,_0x19f98f)=>N(_0x23f51e,'COMMENT_ARIA_LABEL',[_0x264af2['author']['name'],_0x476008['formatDateTime'](_0x19f98f),new DOMParser()['parseFromString'](_0x263bad,'text/html')['body']['textContent'],_0x264af2['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x23f51e,N(_0x23f51e,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x47c617(),this['focusTracker']=new _0x19bf9d(),this['keystrokes']=new jt(),this['focusCycler']=new _0x34c114({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5adc4f=>_0x5adc4f['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 _0x500ed2=new is(this['locale']);return _0x500ed2['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x24e095,_0x400845)=>_0x400845?ts(_0x24e095,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x24e095),_0x500ed2;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x2ba84d=new es(this['locale'],this['_config']['editorConfig']);return _0x2ba84d['value']=this['_model']['content'],_0x2ba84d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x2ba84d['submitLabel']=N(this['locale'],'Save'),_0x2ba84d['on']('submit',(_0x447190,_0x75984c)=>{this['fire']('updateComment',this['_model']['id'],_0x75984c),this['switchToDisplayMode'](),this['focus']();}),_0x2ba84d['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x2ba84d['once']('editorReady',()=>{_0x2ba84d['focus']();}),_0x2ba84d['createEditor'](),_0x2ba84d['delegate']('editorReady')['to'](this),_0x2ba84d['delegate']('editorDestroyed')['to'](this),_0x2ba84d;}['_setupKeyboardNavigation'](){const _0x5ef381=this['element'];this['keystrokes']['listenTo'](_0x5ef381);for(const _0x159b39 of this['focusables'])this['focusTracker']['add'](_0x159b39['element']),this['keystrokes']['listenTo'](_0x159b39['element']);this['focusables']['on']('change',(_0x2eca70,_0x7ac102)=>{for(const _0x3bf313 of _0x7ac102['removed'])this['focusTracker']['remove'](_0x3bf313['element']),this['keystrokes']['stopListening'](_0x3bf313['element']);for(const _0x3341f0 of _0x7ac102['added'])this['focusTracker']['add'](_0x3341f0['element']),this['keystrokes']['listenTo'](_0x3341f0['element']);}),this['keystrokes']['set']('enter',(_0x1f872d,_0x33e4ce)=>{_0x5ef381===_0x1f872d['target']&&(this['focusCycler']['focusFirst'](),_0x33e4ce());}),this['keystrokes']['set']('esc',(_0x27405b,_0x593c2c)=>{_0x5ef381!==_0x27405b['target']&&(this['focus'](),_0x593c2c());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x34285a,_0x10fdff,_0x5da88b){super(_0x34285a,_0x10fdff,_0x5da88b),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x34285a,'Reply...')),this['bind']('authoredAt')['to'](_0x10fdff),this['bind']('resolvedAt')['to'](_0x10fdff),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 _0x318ab3(_0x34285a,_0x10fdff['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x10fdff,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x44e12a=this['bindTemplate'],_0x164e84=[{'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':_0x44e12a['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x44e12a['to']('authoredAt',_0x279fca=>this['_config']['formatDateTime'](_0x279fca))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x44e12a['if']('isEditMode','ck-comment__actions--hidden'),_0x44e12a['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']&&_0x164e84['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x44e12a['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x44e12a['if']('isEditMode','ck-comment--edit'),_0x44e12a['if']('isSystemComment','ck-comment--info'),_0x44e12a['to']('actionIndicator',_0x404b82=>_0x404b82?'ck-comment--'+_0x404b82:'')],'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':_0x164e84}]}]};}['_createEditButton'](){const _0x2dfbba=new _0x175706(this['locale']);return _0x2dfbba['label']=N(this['locale'],'Edit'),_0x2dfbba['icon']=_0x3b4f51,_0x2dfbba['withText']=!0x0,_0x2dfbba['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x2dfbba['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x305f59=>!_0x305f59),_0x2dfbba['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x2dfbba['on']('execute',()=>this['switchToEditMode']()),_0x2dfbba;}['_createRemoveButton'](){const _0x6017ff=new _0x175706(this['locale']);return _0x6017ff['label']=N(this['locale'],'Remove'),_0x6017ff['icon']=_0x3d18bd,_0x6017ff['withText']=!0x0,_0x6017ff['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x6017ff['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x331ffc=>!_0x331ffc),_0x6017ff['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x6017ff['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x6017ff;}['_createDropdown'](){const _0x4dff71=_0x48f904(this['locale'],_0x3c8003),_0x570be0=_0x4dff71['panelView']['children'],_0x1ca395=new _0x51e688(this['locale']),_0x93a94f=_0x4dff71['bindTemplate'];_0x16617c(_0x4dff71,()=>this['items']['find'](_0x139099=>_0x139099['isVisible'])),_0x4dff71['extendTemplate']({'attributes':{'class':[_0x93a94f['if']('isVisible','ck-hidden',_0x2ea2bc=>!_0x2ea2bc)]}});const _0x546d3b=(_0x3cf922,_0x1b38a1=-0x1)=>{const _0x2b25e7=new _0x2ca21a(this['locale']);_0x2b25e7['children']['add'](_0x3cf922);const _0x218b5d=_0x1b38a1>-0x1?_0x1b38a1:_0x1ca395['items']['length'];_0x1ca395['items']['add'](_0x2b25e7,_0x218b5d);const _0x42e1b8=Array['from'](this['items']);_0x4dff71['unbind']('isEnabled','isVisible'),_0x4dff71['bind']('isEnabled')['toMany'](_0x42e1b8,'isEnabled',(..._0x37fc45)=>_0x37fc45['some'](_0x54daa7=>_0x54daa7)),_0x4dff71['bind']('isVisible')['toMany'](_0x42e1b8,'isVisible',(..._0xbec90a)=>_0xbec90a['some'](_0x23d051=>_0x23d051));};_0x4dff71['panelPosition']='sw',_0x4dff71['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x34cf99});for(const _0x551782 of this['items'])_0x546d3b(_0x551782);return _0x570be0['add'](_0x1ca395),_0x4dff71['listenTo'](this['items'],'add',(_0x1e5687,_0x31f791,_0x497a68)=>{_0x546d3b(_0x31f791,_0x497a68);}),_0x4dff71['listenTo'](this['items'],'remove',(_0x1e05d9,_0x460dfb,_0x5d4c20)=>{_0x1ca395['items']['remove'](_0x5d4c20);}),_0x4dff71;}['_attachActions'](_0x53ffc3,_0x358104){const _0x2251bf=_0x53ffc3&&_0x53ffc3['element'];_0x2251bf&&(this['listenTo'](_0x2251bf,'mouseenter',()=>this['actionIndicator']=_0x358104),this['listenTo'](_0x2251bf,'focus',()=>this['actionIndicator']=_0x358104),this['listenTo'](_0x2251bf,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2251bf,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0xe7488d=super['_createCommentInputView']();return _0xe7488d['bind']('placeholder')['to'](this),_0xe7488d;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x1e4cde){const _0x3d3d2a=Dt(_0x1e4cde,0x1e),_0x3397ca=new MutationObserver(_0x187673=>{for(const _0x6ba3ff of _0x187673)('attributes'==_0x6ba3ff['type']&&'class'==_0x6ba3ff['attributeName']||'childList'==_0x6ba3ff['type']||'characterData'==_0x6ba3ff['type'])&&_0x3d3d2a();});return{'attach'(_0x3f18cf){_0x3397ca['observe'](_0x3f18cf,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x3397ca['disconnect'](),_0x3d3d2a['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x4d983f,_0x113be9){super(_0x4d983f),this['id']=_0x3c7a69(),this['focusTracker']=new _0x19bf9d(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x53fbe1,_0x25d80b)=>this['fire']('Esc',_0x25d80b)),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'](_0x113be9),this['mainView']=_0x113be9;const _0x11e3fc=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x11e3fc['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 _0x5e8279=this['element']['clientHeight'];_0x5e8279&&(this['height']=_0x5e8279);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x3495be(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x59b051,target:_0x53020d,type:_0x1f469f,isVisible:_0x3f9c31=!0x0}){super(),this['view']=_0x59b051,this['view']['element']||this['view']['render'](),this['_type']=_0x1f469f,this['_target']=_0x53020d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1e2837([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x46bf35,_0x1f7fee)=>{this['view']['focusTracker']['add'](_0x1f7fee);}),this['focusableElements']['on']('remove',(_0x3cc1f8,_0x52db59)=>{this['view']['focusTracker']['remove'](_0x52db59);}),this['set']('isVisible',_0x3f9c31);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2d08be=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2d08be),_0x2d08be;}get['targetRect'](){const _0x423a8a=this['target'];if(null===_0x423a8a)return null;if(_0x423a8a instanceof _0x1d4450)return _0x423a8a;const _0x3c0f4c=_0x423a8a['filter'](_0x2c7e70=>function(_0x259793){const _0xfe926c=_0x259793['offsetParent'];if(_0xfe926c)return!0x0;const _0x311f09=_0x259793['getClientRects']()['item'](0x0);return!!_0x311f09;}(_0x2c7e70));return 0x0===_0x3c0f4c['length']?null:new _0x1d4450(_0x3c0f4c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x11392f){this['view']['isActive']=_0x11392f,this['view']['mainView']['isActive']=_0x11392f;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x1e6c2c){if(!(null===_0x1e6c2c||_0x1e6c2c instanceof _0x1d4450||Array['isArray'](_0x1e6c2c)&&_0x1e6c2c['every'](_0x3cd08e=>fi(_0x3cd08e))))throw new _0x354fbc('annotation-invalid-target',null,{'target':_0x1e6c2c});}['_getNormalizedTarget'](){const _0x52cb9a='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x52cb9a)?[_0x52cb9a]:_0x52cb9a;}}function fi(_0x50cc8a){return null!==_0x50cc8a&&'object'==typeof _0x50cc8a&&'nodeType'in _0x50cc8a&&0x1===_0x50cc8a['nodeType'];}class S extends _0x1e2837{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x12ca77=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x19bf9d(),this['_focusTracker']['on']('change:isFocused',(_0x317072,_0x9d8d26,_0x378f9d)=>{_0x378f9d||this['fire']('blur');});for(const _0x6e0b2b of _0x12ca77)this['add'](_0x6e0b2b);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x56da6a){if(this['has'](_0x56da6a))throw new _0x354fbc('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x56da6a['innerView'],_0x56da6a),this['_viewToAnnotation']['set'](_0x56da6a['view'],_0x56da6a);for(const _0x3e9e97 of _0x56da6a['focusableElements'])this['_focusTracker']['add'](_0x3e9e97);this['listenTo'](_0x56da6a['focusableElements'],'add',(_0x303d9b,_0x12e7c2)=>{this['_focusTracker']['add'](_0x12e7c2);}),this['listenTo'](_0x56da6a['focusableElements'],'remove',(_0x2dabc9,_0x4a6efc)=>{this['_focusTracker']['remove'](_0x4a6efc);}),this['listenTo'](_0x56da6a['view']['focusTracker'],'change:isFocused',(_0x561992,_0x1b0dcf,_0x264005)=>{_0x264005&&this['fire']('focus',_0x56da6a);}),_0x56da6a['updateTargetRect']();const _0x5c56cf=this['_getOrderInContent'](_0x56da6a['view']['targetRect']);return super['add'](_0x56da6a,_0x5c56cf);}['remove'](_0x5dadfd){if(!this['has'](_0x5dadfd))throw new _0x354fbc('annotationcollection-not-existing-item',null);this['stopListening'](_0x5dadfd['view']['focusTracker']),this['stopListening'](_0x5dadfd['focusableElements']);for(const _0x4e0a39 of _0x5dadfd['focusableElements'])this['_focusTracker']['remove'](_0x4e0a39);return this['_viewToAnnotation']['delete'](_0x5dadfd['view']),this['_innerViewToAnnotation']['delete'](_0x5dadfd['innerView']),super['remove'](_0x5dadfd);}['getByInnerView'](_0x38d0fe){return this['_innerViewToAnnotation']['get'](_0x38d0fe);}['getByView'](_0x18c4fd){return this['_viewToAnnotation']['get'](_0x18c4fd);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x103063 of this)_0x103063['updateTargetRect']();this['_sort']();}['_sort'](){const _0x42f257=Array['from'](this)['sort']((_0x153b75,_0x176b7b)=>w(_0x153b75['view']['targetRect'],_0x176b7b['view']['targetRect']));for(let _0x4e8103=_0x42f257['length']-0x1;_0x4e8103>0x0;_0x4e8103--){const _0x520c68=_0x42f257[_0x4e8103];_0x4e8103!==this['getIndex'](_0x520c68)&&(this['remove'](_0x520c68),this['add'](_0x520c68));}}['_getOrderInContent'](_0x5a89db){let _0x494557=0x0;if(!_0x5a89db)return this['length'];for(const _0x25e373 of this){const _0x3a84ae=_0x25e373['view']['targetRect'];if(_0x3a84ae){if(w(_0x5a89db,_0x3a84ae)<0x0)return _0x494557;_0x494557++;}}return _0x494557;}}function v({source:_0x3a2cf9,target:_0x581150,filter:_0x49d99a}){for(const _0x4c08ac of _0x3a2cf9)_0x49d99a(_0x4c08ac)&&_0x581150['add'](_0x4c08ac);_0x581150['listenTo'](_0x3a2cf9,'add',(_0x582780,_0x23d4a3)=>{_0x49d99a(_0x23d4a3)&&_0x581150['add'](_0x23d4a3);}),_0x581150['listenTo'](_0x3a2cf9,'remove',(_0x282695,_0x339ec0)=>{_0x581150['has'](_0x339ec0)&&_0x581150['remove'](_0x339ec0);});}function w(_0x457986,_0x365b92){if(null===_0x457986&&null===_0x365b92)return 0x0;if(null===_0x457986)return-0x1;if(null===_0x365b92)return 0x1;const _0x45d53d=_0x457986['top']-_0x365b92['top'];return 0x0==_0x45d53d?_0x457986['left']-_0x365b92['left']:_0x45d53d;}class y extends _0x2cf45d{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x16d1ef){if(super(_0x16d1ef),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x16d1ef instanceof _0x3b2802){const _0xaf8701=_0x16d1ef['locale'];_0x16d1ef['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0xaf8701,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0xaf8701,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0xaf8701,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0xaf8701,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0xaf8701,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0xaf8701,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0xaf8701,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3ac56e){this['collection']['add'](_0x3ac56e);}['remove'](_0x456bf2){this['collection']['remove'](_0x456bf2),_0x456bf2['destroy']();}['refreshVisibility'](){for(const _0x2152d4 of this['collection'])_0x2152d4['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0xa8c717){return this['collection']['getByInnerView'](_0xa8c717);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x57caa5 of this['collection'])_0x57caa5['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x38d9bc){this['fire']('_activateAnnotation',_0x38d9bc);}['createAnnotation'](_0x1a447f){return new T(_0x1a447f);}['createAnnotationView'](_0x4aaf3f,_0x2cfabb){return new E(_0x4aaf3f,_0x2cfabb);}['_addActiveAnnotation'](_0x3e226b){const _0x435110=new Set(this['activeAnnotations']);_0x435110['add'](_0x3e226b),this['activeAnnotations']=_0x435110;}['_removeActiveAnnotation'](_0x163c8f){const _0x41905d=new Set(this['activeAnnotations']);_0x41905d['delete'](_0x163c8f),this['activeAnnotations']=_0x41905d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x45da93=this['collection'],_0x19369c=this['_visibleAnnotations'];function _0x5e075c(_0x59f34e){const _0x5113db=_0x59f34e['source'];_0x5113db['isVisible']&&!_0x19369c['has'](_0x5113db)?_0x19369c['add'](_0x5113db):!_0x5113db['isVisible']&&_0x19369c['has'](_0x5113db)&&_0x19369c['remove'](_0x5113db),_0x5113db['view']['focusTracker']['remove'](_0x5113db['view']['element']),_0x5113db['view']['focusTracker']['add'](_0x5113db['view']['element']);}this['listenTo'](_0x45da93,'add',(_0x173009,_0x2d3992)=>{_0x2d3992['isVisible']&&_0x19369c['add'](_0x2d3992),this['listenTo'](_0x2d3992,'change:isVisible',_0x5e075c);}),this['listenTo'](_0x45da93,'remove',(_0x3237a7,_0x4dfe93)=>{_0x19369c['has'](_0x4dfe93)&&_0x19369c['remove'](_0x4dfe93),this['stopListening'](_0x4dfe93,'change:isVisible',_0x5e075c);});}['_setupEnterAnnotationKeystroke'](){const _0x450d36=_0x5e6758=>{_0x5e6758['on']('ready',()=>{_0x5e6758['keystrokes']['set'](_0x886b93,(_0x2af570,_0xcf830c)=>{const _0x510fe6=_0x4a7b67(this['activeAnnotations']['values']());_0x510fe6&&(_0x510fe6['view']['focus'](),_0xcf830c());});});};this['context']instanceof _0x3b2802?_0x450d36(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4cd2e1,_0x595fe2)=>{_0x450d36(_0x595fe2);});}['_setupEscapeAnnotationHandling'](){const _0x9dfffb=_0x3126ae=>{const _0x30adc0=_0x3126ae['source'],_0xcfd603=[];let _0x2a900a;if(Array['isArray'](_0x30adc0['target'])){_0x2a900a=_0x30adc0['target'][0x0],this['context']instanceof _0x3b2802?_0xcfd603['push'](this['context']):this['context']['editors']&&_0xcfd603['push'](...this['context']['editors']);for(const _0x47a368 of _0xcfd603)for(const _0x14f15f of _0x47a368['editing']['view']['domRoots']['values']())if(_0x14f15f['contains'](_0x2a900a))return void _0x47a368['editing']['view']['focus']();_0x2a900a['focus']();}};this['listenTo'](this['collection'],'add',(_0x1ca737,_0x445703)=>{this['listenTo'](_0x445703,'escape',_0x9dfffb,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5e9326,_0x5583b1)=>{this['stopListening'](_0x5583b1,'escape',_0x9dfffb);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2cf45d{['_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(_0x323dcd){super(_0x323dcd),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3e0941=this['context']['config'];_0x3e0941['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3e0941['define']('comments.maxThreadTotalWeight',0x1f4),_0x3e0941['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3e0941['define']('comments.CommentThreadView',gt),_0x3e0941['define']('comments.CommentView',Tt),_0x3e0941['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5b955a=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x31e45c,_0x564b35)=>this['_addCommentThread'](_0x564b35)),this['on']('submitCommentThread',(_0x4b4b29,_0x195f84)=>this['_submitCommentThread'](_0x195f84)),this['on']('resolveCommentThread',(_0x3dd06b,_0x49b4d7)=>this['_resolveCommentThread'](_0x49b4d7)),this['on']('resolveCommentThread',(_0x7e8097,_0x478309)=>this['_updateActiveAnnotation'](_0x478309),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1a6a23,_0x35f9eb)=>this['_reopenCommentThread'](_0x35f9eb)),this['on']('reopenCommentThread',(_0x4f9654,_0x2409c3)=>this['_updateActiveAnnotation'](_0x2409c3),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x324df7,_0x4d81a0)=>this['_removeCommentThread'](_0x4d81a0)),this['on']('updateCommentThread',(_0x28820a,_0x5b9a7a)=>this['_updateCommentThread'](_0x5b9a7a)),this['on']('updateCommentThread',(_0x1a3542,_0x1af5fb)=>this['_updateActiveAnnotation'](_0x1af5fb),{'priority':'lowest'}),this['on']('addComment',(_0x2a94b2,_0x1ad21f)=>this['_addComment'](_0x1ad21f)),this['on']('updateComment',(_0x541a91,_0x4745c1)=>this['_updateComment'](_0x4745c1)),this['on']('removeComment',(_0x5314df,_0x7d9423)=>this['_removeComment'](_0x7d9423)),this['on']('addComment',(_0x2ac1d3,{threadId:_0x159120,isFromAdapter:_0x362661})=>{if(_0x362661)return;const _0x24c383=this['getCommentThread'](_0x159120),_0x42f769=_0x24c383&&this['_threadToController']['get'](_0x24c383);_0x42f769&&_0x42f769['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5b955a,'change:activeAnnotations',(_0x5f14f5,_0x30bfa3,_0x4dfe3b)=>{const _0x2e0c1f=Array['from'](_0x4dfe3b)['map'](_0x38eed3=>this['_viewToController']['get'](_0x38eed3['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x2e0c1f?_0x2e0c1f['model']:null;});}set['adapter'](_0x5ca666){if(this['_adapter'])throw new _0x354fbc('commentsrepository-adapter-already-set');this['_adapter']=_0x5ca666;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4d39ed=_t,threadId:_0x55521a=_0x3c7a69(),comments:_0x4f353e=[],unlinkedAt:_0xa2a7cc=null,resolvedAt:_0x792435=null,resolvedBy:_0x4ac1fd=null,target:_0x28b8f4=null,context:_0x9e0552=null,attributes:_0x8eee9={},isResolvable:_0x794ed6=!0x0,isSubmitted:_0xe42d92=!0x1,isFromAdapter:_0x4f70b6=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4d39ed),{'channelId':_0x4d39ed,'threadId':_0x55521a,'comments':_0x4f353e,'unlinkedAt':_0xa2a7cc,'resolvedAt':_0x792435,'resolvedBy':_0x4ac1fd,'target':_0x28b8f4,'context':_0x9e0552,'attributes':_0x8eee9,'isFromAdapter':_0x4f70b6,'isResolvable':_0x794ed6,'isSubmitted':_0xe42d92}),this['getCommentThread'](_0x55521a);}['openNewCommentThread']({channelId:_0x4904dc=_t,threadId:_0x2b8d0c=_0x3c7a69(),target:_0x17f0f3,context:_0x3d02de=null,isResolvable:_0x12a6db=!0x0}){if(this['_readOnlyChannels']['has'](_0x4904dc)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x17f0f3)throw new _0x354fbc('commentsrepository-missing-target');const _0x545448=this['addCommentThread']({'channelId':_0x4904dc,'threadId':_0x2b8d0c,'target':_0x17f0f3,'context':_0x3d02de,'isResolvable':_0x12a6db});if(!_0x545448)return null;const _0x209873=this['_threadToController']['get'](_0x545448),_0x162526=_0x209873['view']['commentThreadInputView']['commentInputView'],_0xfdab3c=this['context']['plugins']['get'](y),_0x5916ce=_0xfdab3c['getByInnerView'](_0x209873['view']);return _0xfdab3c['activate'](_0x5916ce),_0x162526['once']('editorReady',()=>_0x162526['focus']()),_0x545448;}['hasCommentThread'](_0x80074f){if('string'!=typeof _0x80074f)throw new _0x354fbc('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x80074f);}['updateCommentThread']({channelId:_0x42a103=_t,threadId:_0x1a807e,context:_0x2b0bc7,unlinkedAt:_0x431af9,attributes:_0x3f3fc0,isFromAdapter:_0x5e552b=!0x1}){return this['fire'](Nt('updateCommentThread',_0x42a103),{'channelId':_0x42a103,'threadId':_0x1a807e,'context':_0x2b0bc7,'unlinkedAt':_0x431af9,'attributes':_0x3f3fc0,'isFromAdapter':_0x5e552b}),this['getCommentThread'](_0x1a807e);}['getCommentThread'](_0x1ca714){if('string'!=typeof _0x1ca714)throw new _0x354fbc('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1ca714);}['fetchCommentThread']({channelId:_0x3aa17f,threadId:_0x5bee3c}={}){const _0x5451a2=this['getCommentThread'](_0x5bee3c);if(_0x5451a2)return Promise['resolve'](_0x5451a2);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x354fbc('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3aa17f,'threadId':_0x5bee3c})['then'](_0x5e8015=>this['hasCommentThread'](_0x5bee3c)?this['getCommentThread'](_0x5bee3c):_0x5e8015?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3aa17f},_0x5e8015)):void 0x0)['catch'](_0x1232cf=>{throw console['error'](_0x1232cf),new _0x354fbc('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x13149a,skipNotAttached:_0x2d761c=!0x1,skipEmpty:_0x4172e4=!0x1,toJSON:_0x5b464d=!0x1}={}){const _0x460c77=[];for(const _0x4d4a1c of this['_threads']['values']())_0x13149a&&_0x4d4a1c['channelId']!==_0x13149a||_0x2d761c&&!_0x4d4a1c['isAttached']||_0x4172e4&&0x0===_0x4d4a1c['length']||_0x460c77['push'](_0x4d4a1c);return _0x5b464d?_0x460c77['map'](_0x25a4e4=>_0x25a4e4['toJSON']()):_0x460c77;}['getAnnotationForCommentThread'](_0x1f1ab8){const _0x286471=this['_threadToController']['get'](_0x1f1ab8);if(!_0x286471)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x286471['view'])||null;}['getCommentThreadForAnnotation'](_0x27682f){const _0x245d34=this['_viewToController']['get'](_0x27682f['innerView']);return _0x245d34?_0x245d34['model']:null;}['setActiveCommentThread'](_0x3c8d95){const _0x2b55b2=this['context']['plugins']['get'](y);if(!_0x3c8d95)return void(this['activeCommentThread']&&_0x2b55b2['deactivateAll']());const _0x371324=this['getCommentThread'](_0x3c8d95);if(!_0x371324)throw new _0x354fbc('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3c8d95});if(!this['_threadToController']['has'](_0x371324))throw new _0x354fbc('commentsrepository-active-not-attached',null,{'threadId':_0x3c8d95});const _0x36df27=_0x2b55b2['getByInnerView'](this['_threadToController']['get'](_0x371324)['view']);_0x2b55b2['activate'](_0x36df27);}['switchReadOnly'](_0x32fbf2,_0x38eec3){_0x32fbf2?this['_readOnlyChannels']['add'](_0x38eec3):this['_readOnlyChannels']['delete'](_0x38eec3),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x31965e){return this['_readOnlyChannels']['has'](_0x31965e)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0xc50131,_0x5df33e){return new vt(_0xc50131,_0x5df33e);}['setPermissions'](_0x3fc3ac,_0x126118=_t){this['_permissions']['set'](_0x126118,_0x3fc3ac),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x639c45=_t){return this['_permissions']['has'](_0x639c45)?this['_permissions']['get'](_0x639c45):bt;}['_addCommentThread']({channelId:_0x1e60a6,threadId:_0x5e1c27,comments:_0x503909,unlinkedAt:_0x1d1864,resolvedAt:_0xeffa9c,resolvedBy:_0x38cf30,target:_0x47dbca,context:_0x4ee740,attributes:_0x3a7c6e,isFromAdapter:_0x466a8b,isResolvable:_0xaf1fdd,isSubmitted:_0x36b885}){if('string'!=typeof _0x5e1c27)throw new _0x354fbc('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5e1c27});if(this['hasCommentThread'](_0x5e1c27))throw new _0x354fbc('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x5e1c27});const _0x24855a=new pi(this,{'channelId':_0x1e60a6,'id':_0x5e1c27,'context':_0x4ee740,'attributes':_0x3a7c6e,'unlinkedAt':_0x1d1864,'resolvedAt':_0xeffa9c,'resolvedBy':_0x38cf30?this['context']['plugins']['get'](it)['getUser'](_0x38cf30):null,'isResolvable':_0xaf1fdd,'isSubmitted':_0x36b885||_0x466a8b});this['_threads']['set'](_0x5e1c27,_0x24855a);for(const _0x5b6306 of _0x503909)_0x24855a['_add'](this['_createNewComment']({'threadId':_0x5e1c27,..._0x5b6306}));return _0x47dbca&&_0x24855a['attachTo'](_0x47dbca),_0x466a8b||!_0x24855a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1e60a6,'threadId':_0x5e1c27});}['_submitCommentThread']({channelId:_0x4d7442,threadId:_0x8f1eb7}){if(!this['hasCommentThread'](_0x8f1eb7))throw new _0x354fbc('commentsrepository-missing-comment-thread',this);const _0x932c14=this['getCommentThread'](_0x8f1eb7);if(_0x932c14['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3f275b,comments:_0x1810cc,resolvedAt:_0x1bf38c,resolvedBy:_0xfaca00,context:_0x3b04e6,attributes:_0x20f677}=_0x932c14,_0x326adc=this['context']['plugins']['get']('PendingActions'),_0x310f61=_0x326adc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4d7442,'threadId':_0x3f275b,'comments':_0x1810cc['map'](_0x303ac9=>_0x303ac9['toJSON']()),'resolvedAt':_0x1bf38c,'resolvedBy':_0xfaca00?_0xfaca00['id']:_0xfaca00,'context':_0x3b04e6,'attributes':_0x20f677})['then'](({comments:_0x1e46fc})=>{_0x326adc['remove'](_0x310f61);for(const _0x1be7f0 of _0x1e46fc)this['_updateComment']({'channelId':_0x4d7442,'threadId':_0x8f1eb7,'commentId':_0x1be7f0['commentId'],'createdAt':_0x1be7f0['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x497ca8=>{throw console['error'](_0x497ca8),new _0x354fbc('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x3eb2f9,target:_0x21de32}){const _0x28f681=this['getCommentThread'](_0x3eb2f9);if(!_0x28f681)throw new _0x354fbc('commentsrepository-attach-missing-comment-thread',this);const _0x58bcdb=this['context']['plugins']['get']('PendingActions'),_0x52a8a1=this['context']['plugins']['get'](y),_0x27bb01=this['_createCommentThreadView'](_0x28f681),_0x27c8f4=new vt(_0x28f681,_0x27bb01);let _0xdafd28=null;_0x27bb01['on']('change:isDirty',(_0x1146d5,_0xc2011b,_0x309f2c)=>{_0x309f2c?_0xdafd28=_0x58bcdb['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xdafd28&&(_0x58bcdb['remove'](_0xdafd28),_0xdafd28=null);}),this['_threadToController']['set'](_0x28f681,_0x27c8f4),this['_viewToController']['set'](_0x27bb01,_0x27c8f4);const _0x4bc5b4=new E(this['context']['locale'],_0x27bb01);_0x4bc5b4['bind']('length')['to'](_0x27bb01),_0x4bc5b4['bind']('isDirty')['to'](_0x27bb01,'isDirty',_0x27bb01,'length',(_0xf0e2f8,_0x273b03)=>_0xf0e2f8||!_0x273b03),_0x4bc5b4['bind']('isActive')['to'](_0x27bb01),_0x4bc5b4['type']='comment';const _0x49536d=new T({'view':_0x4bc5b4,'target':_0x21de32,'type':'comment','isVisible':!_0x28f681['archivedAt']&&!!('function'==typeof _0x21de32?_0x21de32():_0x21de32)});return _0x27bb01['on']('escape',()=>{_0x49536d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x27bb01,_0x49536d),_0x52a8a1['add'](_0x49536d),_0x49536d;}['_bindAnnotationToEditors'](_0x4b6391,_0x368bf6){this['listenTo'](_0x4b6391,'editorReady',(_0x4105d1,_0x5b3fe0)=>{const _0x4662ce=_0x5b3fe0['ui']['view']['body']['bodyCollectionContainer'];_0x368bf6['focusableElements']['add'](_0x4662ce),this['context']instanceof _0x3b2802&&this['context']['ui']['focusTracker']['add'](_0x4662ce);},{'priority':'highest'}),this['listenTo'](_0x4b6391,'editorDestroyed',(_0x5c4bfb,_0x245a07)=>{const _0x3ce833=_0x245a07['ui']['view']['body']['bodyCollectionContainer'];_0x368bf6['focusableElements']['has'](_0x3ce833)&&_0x368bf6['focusableElements']['remove'](_0x3ce833),this['context']instanceof _0x3b2802&&this['context']['ui']['focusTracker']['remove'](_0x3ce833);});}['_unbindEditors'](_0x318a56){this['stopListening'](_0x318a56,'editorReady'),this['stopListening'](_0x318a56,'editorDestroyed');}['_createCommentThreadView'](_0x173d31){const _0xa71147=this['context']['plugins']['get'](it),{config:_0x931e88,locale:_0x5c8685}=this['context'],_0x5eeb8c=pt(_0x931e88['get']('locale'),_0x5c8685);return new(0x0,(_0x931e88['get']('comments'))['CommentThreadView'])(_0x5c8685,_0x173d31,_0xa71147['me'],{'editorConfig':{..._0x931e88['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x931e88['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x931e88['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x931e88['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x931e88['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5eeb8c,'CommentView':_0x931e88['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0xd23791,channelId:_0x50065e,resolvedAt:_0x278653,resolvedBy:_0x395900,isFromAdapter:_0x2f9ad2}){if(!this['hasCommentThread'](_0xd23791))throw new _0x354fbc('commentsrepository-missing-comment-thread',null,{'threadId':_0xd23791});const _0x35cce6=this['getCommentThread'](_0xd23791);if(_0x35cce6['isResolved'])throw new _0x354fbc('commentsrepository-resolved-comment-thread',null,{'threadId':_0xd23791});const _0x5c141e=this['context']['plugins']['get'](it);if(_0x35cce6['resolvedBy']=_0x5c141e['getUser'](_0x395900),_0x35cce6['resolvedAt']=_0x278653,_0x2f9ad2||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x83e232=this['context']['plugins']['get']('PendingActions'),_0x475216=_0x83e232['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x50065e,'threadId':_0xd23791})['then'](({resolvedAt:_0x28b1ae,resolvedBy:_0x21f472})=>{_0x83e232['remove'](_0x475216),_0x35cce6['resolvedBy']['id']!==_0x21f472&&(_0x35cce6['resolvedBy']=_0x5c141e['getUser'](_0x21f472)),_0x35cce6['resolvedAt']=_0x28b1ae;})['catch'](_0x322502=>{throw console['error'](_0x322502),new _0x354fbc('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4c9ec8,channelId:_0x2e6120,isFromAdapter:_0x2af45e}){if(!this['hasCommentThread'](_0x4c9ec8))throw new _0x354fbc('commentsrepository-missing-comment-thread',null,{'threadId':_0x4c9ec8});const _0x311dcd=this['getCommentThread'](_0x4c9ec8);if(!_0x311dcd['isResolved'])throw new _0x354fbc('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4c9ec8});if(_0x311dcd['resolvedBy']=null,_0x311dcd['resolvedAt']=null,_0x2af45e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x17753e=this['context']['plugins']['get']('PendingActions'),_0x55e197=_0x17753e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2e6120,'threadId':_0x4c9ec8})['then'](()=>_0x17753e['remove'](_0x55e197))['catch'](_0x40d924=>{throw console['error'](_0x40d924),new _0x354fbc('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x55748a,isFromAdapter:_0x5bc74b}){const _0x2984d6=this['getCommentThread'](_0x55748a);if(!_0x2984d6)throw new _0x354fbc('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x55748a),this['_threads']['delete'](_0x55748a),!_0x2984d6['isSubmitted']||_0x5bc74b||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2e457a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x53213b}=_0x2984d6,_0x36d52c=_0x2e457a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x53213b,'threadId':_0x55748a})['then'](()=>_0x2e457a['remove'](_0x36d52c))['catch'](_0x271cf8=>{throw console['error'](_0x271cf8),new _0x354fbc('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x223e07,unlinkedAt:_0x42b5cb,context:_0x48fd3f,attributes:_0x16b4e5,isFromAdapter:_0x1984f3}){if('string'!=typeof _0x223e07)throw new _0x354fbc('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x223e07});if(!this['hasCommentThread'](_0x223e07))throw new _0x354fbc('commentsrepository-missing-comment-thread',null,{'threadId':_0x223e07});const _0x1e2871=this['getCommentThread'](_0x223e07);let _0x476fc5=!0x1;if(void 0x0!==_0x48fd3f&&_0x1e2871['context']!==_0x48fd3f&&(_0x1e2871['context']=_0x48fd3f,_0x476fc5=!0x0),void 0x0!==_0x42b5cb&&_0x1e2871['unlinkedAt']!==_0x42b5cb&&(_0x1e2871['unlinkedAt']=_0x42b5cb,_0x476fc5=!0x0),_0x16b4e5&&!At(_0x16b4e5,_0x1e2871['attributes'])&&(_0x1e2871['attributes']=_0x16b4e5,_0x476fc5=!0x0),!_0x476fc5)return Promise['resolve']();if(!_0x1e2871['isSubmitted']||_0x1984f3||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1ab827=this['context']['plugins']['get']('PendingActions'),{channelId:_0x11608f}=_0x1e2871,_0x547669=_0x1ab827['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x11608f,'threadId':_0x223e07,'context':_0x48fd3f,'unlinkedAt':_0x42b5cb,'attributes':_0x16b4e5})['then'](()=>_0x1ab827['remove'](_0x547669))['catch'](_0x1b992c=>{throw console['error'](_0x1b992c),new _0x354fbc('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3784ef){const _0x199750=this['context']['plugins']['get'](y),_0x4d986a=this['getCommentThread'](_0x3784ef);if(_0x4d986a['_isAttached']=!0x1,this['_threadToController']['has'](_0x4d986a)){const _0xea5ea2=this['_threadToController']['get'](_0x4d986a),_0x2a6ab8=_0xea5ea2['view'],_0x4fbef0=_0x199750['getByInnerView'](_0x2a6ab8);this['_threadToController']['delete'](_0x4d986a),this['_viewToController']['delete'](_0x2a6ab8),_0x4fbef0&&_0x199750['remove'](_0x4fbef0),_0xea5ea2['destroy'](),_0x2a6ab8['destroy']()['then'](()=>{this['_unbindEditors'](_0x2a6ab8);});}}['_updateActiveAnnotation']({threadId:_0x4a04a6,resolvedAt:_0x40d0b8,unlinkedAt:_0x567d25}){const _0x40ce4b=!!_0x40d0b8,_0x22cb3f=this['context']['plugins']['get'](y),_0x9244a4=this['getCommentThread'](_0x4a04a6);if(this['_threadToController']['has'](_0x9244a4)){const _0x2cdfdc=this['_threadToController']['get'](_0x9244a4)['view'],_0x19e950=_0x22cb3f['getByInnerView'](_0x2cdfdc);_0x19e950&&(_0x40ce4b&&_0x22cb3f['_removeActiveAnnotation'](_0x19e950),_0x567d25?_0x19e950['isVisible']=!0x1:_0x19e950['refreshVisibility']());}}['_getExternalAuthor'](_0x2fece5){const _0x25b684=this['context']['plugins']['get'](it),_0x3f1fcc=It('external:'+_0x2fece5),_0x436bc8=_0x25b684['getUser'](_0x3f1fcc);return _0x436bc8||_0x25b684['addUser']({'id':_0x3f1fcc,'name':_0x2fece5});}['_createNewComment']({threadId:_0x869c04,commentId:_0x198b7c=_0x3c7a69(),content:_0x4edc9b,authorId:_0x19fac2,createdAt:_0xefe69b,attributes:_0x419747}){if('string'!=typeof _0x198b7c)throw new _0x354fbc('commentsrepository-invalid-commentid');if('string'!=typeof _0x19fac2)throw new _0x354fbc('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4edc9b||!_0x4edc9b['trim']())throw new _0x354fbc('commentsrepository-invalid-comment-content');const _0x579d1b=this['context']['plugins']['get'](it)['getUser'](_0x19fac2);if(!_0x579d1b)throw new _0x354fbc('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x19fac2});let _0x56a7df=null,_0x4c778a=_0xefe69b;return _0x419747?.['@external']&&(_0x56a7df=this['_getExternalAuthor'](_0x419747['@external']['authorName']),_0x4c778a=new Date(_0x419747['@external']['createdAt'])),new wi(this,{'threadId':_0x869c04,'id':_0x198b7c,'author':_0x56a7df||_0x579d1b,'creator':_0x579d1b,'content':_0x4edc9b,'createdAt':_0xefe69b,'authoredAt':_0x4c778a,'attributes':_0x419747});}['_addComment'](_0x30d9a8){let {threadId:_0x4d8cfd,content:_0x3a030a,attributes:_0x15bf7a,isFromAdapter:_0x17621a}=_0x30d9a8;const _0x47c34b=this['getCommentThread'](_0x30d9a8['threadId']);if(!_0x47c34b)throw new _0x354fbc('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x40e05b=this['_createNewComment'](_0x30d9a8),{id:_0x28eafd}=_0x40e05b;if(_0x47c34b['_add'](_0x40e05b),_0x17621a||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x47c34b['isSubmitted'])return Promise['resolve']();const _0x37db23=this['context']['plugins']['get']('PendingActions'),{channelId:_0x7cf3e}=_0x47c34b,_0x2dcee8=_0x37db23['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x15bf7a||(_0x15bf7a={}),this['adapter']['addComment']({'channelId':_0x7cf3e,'threadId':_0x4d8cfd,'commentId':_0x28eafd,'content':_0x3a030a,'attributes':_0x15bf7a})['then'](_0x31b01b=>{_0x37db23['remove'](_0x2dcee8),_0x31b01b&&this['_updateComment']({'channelId':_0x7cf3e,'threadId':_0x4d8cfd,'commentId':_0x28eafd,'createdAt':_0x31b01b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3174da=>{throw console['error'](_0x3174da),new _0x354fbc('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5a56df,commentId:_0x401145,content:_0x5aafe3,createdAt:_0x1783dd,attributes:_0x1dbec4,isFromAdapter:_0x4b7157}){if(void 0x0!==_0x5aafe3&&('string'!=typeof _0x5aafe3||!_0x5aafe3['trim']()['length']))throw new _0x354fbc('commentsrepository-update-comment-invalid-content');const _0x2f0fd8=this['getCommentThread'](_0x5a56df),_0x2cfb79=_0x2f0fd8['getComment'](_0x401145);if(!_0x2cfb79)throw new _0x354fbc('commentsrepository-update-missing-comment',this);let _0x503d4c=!0x1;if(_0x5aafe3&&_0x5aafe3!==_0x2cfb79['content']&&(_0x2cfb79['isEditable']||_0x4b7157)&&(_0x2cfb79['content']=_0x5aafe3,_0x503d4c=!0x0),_0x1783dd&&_0x1783dd!==_0x2cfb79['createdAt']&&(_0x2cfb79['createdAt']=_0x1783dd,_0x2cfb79['attributes']&&_0x2cfb79['attributes']['@external']||(_0x2cfb79['authoredAt']=_0x1783dd),_0x503d4c=!0x0),_0x1dbec4&&!At(_0x1dbec4,_0x2cfb79['attributes'])&&(_0x2cfb79['attributes']=_0x1dbec4,_0x503d4c=!0x0),!_0x503d4c)return Promise['resolve']();if(_0x2f0fd8['fire']('commentUpdated'),_0x4b7157||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x376c40=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1a2287}=this['getCommentThread'](_0x2cfb79['threadId']),_0x564c0d=_0x376c40['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1a2287,'threadId':_0x5a56df,'commentId':_0x401145,'content':_0x5aafe3,'attributes':_0x1dbec4})['then'](()=>_0x376c40['remove'](_0x564c0d))['catch'](_0x42acf0=>{throw console['error'](_0x42acf0),new _0x354fbc('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x203bda,commentId:_0x27595c,isFromAdapter:_0x4a39ee}){const _0x2dbf04=this['getCommentThread'](_0x203bda),_0x92605=_0x2dbf04['getComment'](_0x27595c);if(!_0x92605)throw new _0x354fbc('commentsrepository-remove-missing-comment',this);if(_0x2dbf04['_remove'](_0x92605),_0x4a39ee||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x5a3c5c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x9889bc}=_0x2dbf04,_0x443d47=_0x5a3c5c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x9889bc,'threadId':_0x203bda,'commentId':_0x27595c})['then'](()=>_0x5a3c5c['remove'](_0x443d47))['catch'](_0x42cc6c=>{throw console['error'](_0x42cc6c),new _0x354fbc('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x3495be(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x34ba2a,_0x12f217){super();const _0x2b6f6f=_0x12f217['isResolvable'];this['channelId']=_0x12f217['channelId'],this['id']=_0x12f217['id'],this['comments']=new _0x1e2837(),this['_repository']=_0x34ba2a,this['_isAttached']=!0x1,this['_isSubmitted']=_0x12f217['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x34ba2a,'_permissions',_0x34ba2a,'_readOnlyChannels',()=>_0x34ba2a['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x34ba2a,'_permissions',()=>_0x34ba2a['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x34ba2a,'_permissions',()=>{const _0x41cda0=_0x34ba2a['getPermissions'](this['channelId']);return _0x41cda0['write']||_0x41cda0['admin'];}),this['bind']('isResolvable')['to'](_0x34ba2a,'_permissions',()=>_0x2b6f6f&&_0x34ba2a['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x12f217['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x33a68c,_0x1ebc2e)=>_0x33a68c?_0x1ebc2e?_0x33a68c<_0x1ebc2e?_0x33a68c:_0x1ebc2e:_0x33a68c:_0x1ebc2e),this['set']('unlinkedAt',_0x12f217['unlinkedAt']||null),this['set']('resolvedAt',_0x12f217['resolvedAt']||null),this['set']('resolvedBy',_0x12f217['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4e1b36=>!!_0x4e1b36),this['set']('attributes',_0x12f217['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0xf09d58,_0x57b83c)=>_0xf09d58+_0x57b83c['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x24a281,id:_0x37acc5}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x24a281),{'channelId':_0x24a281,'threadId':_0x37acc5});}['setUnlinkedAt'](_0x45ae14){this['_update']({'unlinkedAt':_0x45ae14});}['resolve']({resolvedAt:_0x42357a=new Date(),resolvedBy:_0x348379='',isFromAdapter:_0x41c054=!0x1}={}){const _0x474d0b=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x24183b,id:_0x306a7c}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x24183b),{'channelId':_0x24183b,'threadId':_0x306a7c,'resolvedAt':_0x42357a,'resolvedBy':_0x348379||_0x474d0b['id'],'isFromAdapter':_0x41c054});}['reopen']({isFromAdapter:_0xc2d9ff=!0x1}={}){const {channelId:_0x28aab5,id:_0x3bfc1a}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x28aab5),{'channelId':_0x28aab5,'threadId':_0x3bfc1a,'isFromAdapter':_0xc2d9ff});}['setContext'](_0x39a359){this['context']||this['_update']({'context':_0x39a359});}['setAttribute'](_0x321f02,_0x54f4c7){const _0x4e76cc=wt(this['attributes']);yt(_0x4e76cc,_0x321f02,_0x54f4c7),this['_update']({'attributes':_0x4e76cc});}['removeAttribute'](_0x2a8bfd){const _0x58e811=wt(this['attributes']);Ct(_0x58e811,_0x2a8bfd),this['_update']({'attributes':_0x58e811});}['remove']({isFromAdapter:_0x2099d6=!0x1}={}){const {channelId:_0x1823d4,id:_0x5031f0}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x1823d4),{'channelId':_0x1823d4,'threadId':_0x5031f0,'isFromAdapter':_0x2099d6});}['attachTo'](_0x524172){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x524172});}['addComment'](_0x3c8b0e){const {channelId:_0xda871c,id:_0x2285d1}=this;this['_repository']['fire'](Nt('addComment',_0xda871c,_0x2285d1),Object['assign']({'channelId':_0xda871c,'threadId':_0x2285d1},_0x3c8b0e));}['getComment'](_0x3a0237){if('string'!=typeof _0x3a0237)throw new _0x354fbc('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x3a0237});return this['comments']['get'](_0x3a0237);}['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'](_0x5ee9dd=>_0x5ee9dd['toJSON']()),'attributes':this['attributes']};}['_add'](_0x46b58a){return this['listenTo'](_0x46b58a,'change:authoredAt',()=>{const _0x5672aa=this['_findOptimalIndex'](_0x46b58a),_0x237199=this['comments'];_0x5672aa-0x1!=_0x237199['getIndex'](_0x46b58a)&&_0x5672aa+0x1!=_0x237199['getIndex'](_0x46b58a)&&(this['_remove'](_0x46b58a),this['_add'](_0x46b58a));}),this['comments']['add'](_0x46b58a,this['_findOptimalIndex'](_0x46b58a));}['_update'](_0x45903f){const {channelId:_0x32976c,id:_0x7232f2}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x32976c),{..._0x45903f,'channelId':_0x32976c,'threadId':_0x7232f2});}['_remove'](_0x1897ad){return this['stopListening'](_0x1897ad),_0x1897ad['destroy'](),this['comments']['remove'](_0x1897ad);}['_findOptimalIndex'](_0x48a650){const _0x174ad5=this['comments']['find'](_0x3ad184=>new Date(_0x3ad184['authoredAt'])['getTime']()>new Date(_0x48a650['authoredAt'])['getTime']());return _0x174ad5?this['comments']['getIndex'](_0x174ad5):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x3495be(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x37306a,_0x3d78c9){super();const _0x247826=_0x37306a['context']['plugins']['get'](it)['me'],_0x570702=_0x37306a['getCommentThread'](_0x3d78c9['threadId']),_0x3de1ab=0x0===_0x570702['comments']['length'],_0x987ad9=_0x247826===_0x3d78c9['author'];this['id']=_0x3d78c9['id'],this['threadId']=_0x3d78c9['threadId'],this['author']=_0x3d78c9['author'],this['creator']=_0x3d78c9['creator'],this['isExternal']=Boolean(_0x3d78c9['attributes']&&_0x3d78c9['attributes']['@external']),this['set']('content',_0x3d78c9['content']),this['createdAt']=_0x3d78c9['createdAt']||new Date(),this['set']('authoredAt',_0x3d78c9['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x570702,'resolvedAt'),this['set']('attributes',_0x3d78c9['attributes']||{}),this['bind']('isEditable')['to'](_0x37306a,'_permissions',()=>{const _0x595326=_0x37306a['getPermissions'](_0x570702['channelId'])['write'],_0x28d6e3=_0x37306a['getPermissions'](_0x570702['channelId'])['modifyAll'];return _0x987ad9&&_0x595326||!_0x987ad9&&_0x28d6e3;}),this['bind']('isRemovable')['to'](_0x570702,'isRemovable',_0x37306a,'_permissions',_0x4b3e3f=>{const _0x2b800a=_0x37306a['getPermissions'](_0x570702['channelId'])['write'],_0x157c8a=_0x37306a['getPermissions'](_0x570702['channelId'])['modifyAll'];return _0x987ad9&&_0x2b800a||_0x4b3e3f&&_0x3de1ab||!_0x987ad9&&_0x157c8a&&!_0x3de1ab;}),this['bind']('isReadOnly')['to'](_0x570702,'isReadOnly'),this['_repository']=_0x37306a;}get['weight'](){return Math['max'](function(_0x1407cc){const _0x3d05db=document['createElement']('div');return _0x3d05db['innerHTML']=_0x1407cc,_0x3d05db['textContent']['length'];}(this['content']),0xc8);}['update'](_0x8b06e0){const {threadId:_0x1dc426,id:_0x44ecb3}=this;if(!this['_repository']['hasCommentThread'](_0x1dc426))throw new _0x354fbc('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3ae64c}=this['_repository']['getCommentThread'](_0x1dc426);this['_repository']['fire'](Nt('updateComment',_0x3ae64c,_0x1dc426),{'channelId':_0x3ae64c,'threadId':_0x1dc426,'commentId':_0x44ecb3,..._0x8b06e0});}['setAttribute'](_0x16f922,_0x39f3d1){const _0x41c277=wt(this['attributes']);yt(_0x41c277,_0x16f922,_0x39f3d1),this['update']({'attributes':_0x41c277});}['removeAttribute'](_0x61d4e){const _0x3727a5=wt(this['attributes']);Ct(_0x3727a5,_0x61d4e),this['update']({'attributes':_0x3727a5});}['remove'](_0x53ad82={}){if(!_0x53ad82['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x558bf7,id:_0x1bd098}=this;if(!this['_repository']['hasCommentThread'](_0x558bf7))throw new _0x354fbc('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x440e5c}=this['_repository']['getCommentThread'](_0x558bf7);this['_repository']['fire'](Nt('removeComment',_0x440e5c,_0x558bf7),{'channelId':_0x440e5c,'threadId':_0x558bf7,'commentId':_0x1bd098,..._0x53ad82});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x2b8fe6,..._0xae9bec){for(const _0x537f1b of _0xae9bec)void 0x0!==_0x537f1b&&(_0x2b8fe6+=':'+String(_0x537f1b));return _0x2b8fe6;}class ot extends _0x72c86f{constructor(_0x100e45){super(_0x100e45),this['set']('hasContent',!0x1);}['refresh'](){const _0x388a44=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x482d63 of _0x388a44['getRanges']())if(this['_hasContent'](_0x482d63))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x53e64f=_0x3c7a69(),ranges:_0xbc3f9e,comment:_0x307cb1}={}){const _0xfce17=this['editor']['model'],_0x2c1453=_0xbc3f9e??Array['from'](_0xfce17['document']['selection']['getRanges']()),_0x37a788=[];for(const _0x21f6eb of _0x2c1453)this['_hasContent'](_0x21f6eb)&&_0x37a788['push'](this['_trimToContent'](_0x21f6eb));if(!_0x37a788['length'])throw new _0x354fbc('addcommentthreadcommand-incorrect-ranges',null);_0x307cb1&&this['_createCommentThread'](_0x53e64f,_0x307cb1),this['_createMarkersFromRanges'](_0x53e64f,_0x37a788,!!_0x307cb1);}['_createMarkersFromRanges'](_0x466660,_0x24d351,_0x180071){this['editor']['model']['change'](_0x1e1d0e=>{for(const _0x3a3c85 of _0x24d351){const _0x1fee8a=_0x3c7a69()['substr'](0x1,0x5),_0x4c36e8='comment:'+_0x466660+':'+_0x1fee8a;_0x1e1d0e['addMarker'](_0x4c36e8,{'range':_0x3a3c85,'usingOperation':_0x180071,'affectsData':_0x180071});}});}['_createCommentThread'](_0x5d14f7,_0x405e84){const _0x555bc1=this['editor']['plugins']['get']('CommentsRepository'),_0x3be764=this['editor']['config']['get']('collaboration.channelId'),_0x388f03=this['editor']['plugins']['get']('Users')['me'];if(!_0x388f03)throw new _0x354fbc('addcommentthreadcommand-user-not-found',null);_0x555bc1['addCommentThread']({'threadId':_0x5d14f7,'channelId':_0x3be764,'comments':[{'authorId':_0x388f03['id'],'content':_0x405e84,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0xaec54e){for(const _0x57ac0d of _0xaec54e['getItems']())if(this['_itemIsContent'](_0x57ac0d))return!0x0;return!0x1;}['_itemIsContent'](_0x25fd8d){return _0x25fd8d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x25fd8d)&&!_0x25fd8d['is']('element','tableCell');}['_trimToContent'](_0x248e2d){const _0x36504e=_0x14d32a=>!this['_itemIsContent'](_0x14d32a['item']),_0x522f2f=_0x248e2d['start']['getLastMatchingPosition'](_0x36504e),_0x2d428e=_0x248e2d['end']['getLastMatchingPosition'](_0x36504e,{'direction':'backward'});return this['editor']['model']['createRange'](_0x522f2f,_0x2d428e);}}class b extends _0x25d649{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x414f97){super(_0x414f97),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4abe73=this['editor'],_0x15e83c=_0x4abe73['model']['document']['selection'],_0x3ddda8=_0xacb6a5(()=>this['refreshSelectedViews'](),0xa);_0x15e83c['on']('change:range',(_0x41f5c5,_0x4482f3)=>{_0x4482f3['directChange']&&(_0x3ddda8['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4abe73['editing']['view']['document'],'change:isFocused',(_0xb6bf64,_0x398009,_0x374f9a)=>{_0x374f9a&&_0x3ddda8();}),this['listenTo'](_0x4abe73['ui']['focusTracker'],'change:isFocused',(_0x24e36e,_0x47c36c,_0x2adcb5)=>{_0x2adcb5||this['fire']('blur',{'isAnnotationTracked':_0x5c9ba8=>this['_editorAnnotationsData']['has'](_0x5c9ba8['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5c96d4){if(this['_editorAnnotations']['has'](_0x5c96d4['view']))return;this['_editorAnnotations']['add'](_0x5c96d4['view']),this['editor']['ui']['focusTracker']['add'](_0x5c96d4['view']['element']);const _0x37ae99=this['editor']['plugins']['get'](y);this['listenTo'](_0x37ae99['collection'],'remove',(_0x2f29d0,_0x25a2b1)=>{this['editor']['ui']['focusTracker']['remove'](_0x25a2b1['view']['element']),this['_editorAnnotations']['delete'](_0x25a2b1['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2a400e){if('function'!=typeof _0x2a400e)throw new _0x354fbc('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2a400e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0xff7347,annotations:_0xda904c}){const _0x527808=[],_0x64b6f8=this['editor']['model']['document']['selection'],_0x5e64df=Array['from'](_0x64b6f8['getRanges']());for(const [_0x1c96ab,_0x190740]of this['_editorAnnotationsData']){const _0x566502=_0x35000d(_0x190740),_0x5a8604=_0xda904c['getByInnerView'](_0x1c96ab);_0x566502&&_0x5a8604&&_0x527808['push']({'annotation':_0x5a8604,'range':_0x566502});}function _0x35000d(_0x292ddc){for(const _0x3137de of _0x292ddc)for(const _0x124455 of _0x5e64df)if(_0x3137de['containsRange'](_0x124455,!_0x64b6f8['isCollapsed']))return _0x3137de;return null;}return _0x527808['sort']((_0x249d3c,_0x109f6b)=>{const _0x48a9ef=_0x249d3c['range'],_0x4a9c30=_0x109f6b['range'];if(!_0x48a9ef['isEqual'](_0x4a9c30)){if(_0x48a9ef['containsRange'](_0x4a9c30,!0x0))return 0x1;if(_0x4a9c30['containsRange'](_0x48a9ef,!0x0))return-0x1;}return _0x249d3c['annotation']==_0xff7347?-0x1:_0x109f6b['annotation']==_0xff7347?0x1:0x0;})['map'](_0x2be3af=>_0x2be3af['annotation']);}get['_editorAnnotationsData'](){const _0x3b36d4=new Map();for(const _0x105ecd of Array['from'](this['_dataCollectors']))for(const [_0x24106b,_0x509a9a]of _0x105ecd())_0x3b36d4['set'](_0x24106b,_0x509a9a);return _0x3b36d4;}}class st extends _0x25d649{['afterInit'](){const _0x542d22=this['editor'];if(!_0x542d22['plugins']['has']('RestrictedEditingModeEditing'))return;_0x542d22['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x25d649{constructor(_0x2c7c60){super(_0x2c7c60),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x20760c=this['editor'],_0xb99b48=_0x20760c['commands']['get']('importWord'),_0x24591b=_0x20760c['plugins']['get'](it);_0xb99b48&&(_0xb99b48['on']('execute',(_0x426400,[,_0x1da198])=>{_0x1da198['collaboration_features']={'comments':!0x0,'user_id':_0x24591b['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0xb99b48,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x4a899c,_0x5800f){const {comment_threads:_0x25b1ac}=_0x5800f;_0x25b1ac&&_0x25b1ac['forEach'](({thread_id:_0x560b65,comments:_0x1dc527,is_resolved:_0x321fb1})=>{const _0x369ba4=new Date(),_0x3318e6=_0x1dc527['map'](({author:_0x31b322,content:_0x16b3cd,created_at:_0x345605})=>({'content':_0x16b3cd,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x369ba4,'attributes':{'@external':{'authorName':_0x31b322,'createdAt':_0x345605?new Date(_0x345605):new Date(),'source':'importWord'}}})),_0x27c6fb=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x27c6fb,'threadId':_0x560b65,'comments':_0x3318e6,'resolvedAt':_0x321fb1?_0x369ba4:null});});}}class at extends _0x25d649{constructor(_0x21c8a1){super(_0x21c8a1),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x7f458=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x7f458,'contentInsertion',(_0x38a100,_0x40224f)=>this['_removeMarkersWithoutThreads'](_0x40224f['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x587fb3){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x587fb3;const _0x322734=this['editor']['plugins']['get']('CommentsRepository');for(const _0x10f7d9 of _0x587fb3['keys']()){const [_0x11a5f4,_0x5819e6]=_0x10f7d9['split'](':');'comment'!=_0x11a5f4||_0x322734['hasCommentThread'](_0x5819e6)||_0x587fb3['delete'](_0x10f7d9);}return _0x587fb3;}['_registerMarkerInClipboardPipeline'](){const _0x58c005=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x23a5ea=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x23a5ea&&_0x58c005['_registerMarkerToCopy']('comment',_0x23a5ea);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x373cea){switch(_0x373cea){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x30cb3e){const _0x17fe4e=_0x30cb3e['split'](':');return{'group':_0x17fe4e[0x0],'id':_0x17fe4e[0x1],'part':_0x17fe4e[0x2]};}class ut extends _0x25d649{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x535e66,_0x3ebecd)=>{if(!_0x3ebecd['options']['showCommentHighlights'])return null;if(_0x3ebecd['options']['ignoreResolvedComments']){const {id:_0x4081af}=ft(_0x535e66['markerName']),_0x404848=this['editor']['plugins']['get'](o);if(_0x404848['getCommentThread'](_0x4081af)?.['isResolved']&&_0x535e66['item'])return _0x3ebecd['consumable']['consume'](_0x535e66['item'],'addMarker:'+_0x535e66['markerName']),_0x3ebecd['consumable']['consume'](_0x535e66['item'],'removeMarker:'+_0x535e66['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4a2e7d=>{_0x4a2e7d['on']('addMarker:comment',(_0x310e00,_0x321b2d,_0xc47779)=>{if(!_0xc47779['options']['showCommentHighlights'])return;const _0x2ff831=_0x321b2d['item'];if(!_0x2ff831)return;const _0x4fe791=_0xc47779['mapper']['toViewElement'](_0x2ff831);this['editor']['model']['schema']['isObject'](_0x2ff831)&&_0x4fe791&&!_0x4fe791['getCustomProperty']('widget')&&_0x4fe791['is']('containerElement')&&_0x326d12(_0x4fe791,_0xc47779['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x104198,{writer:_0x46129c,options:_0x2a24cf})=>{if(!_0x2a24cf['showCommentHighlights'])return null;const _0x4a3fc5=_0x46129c['createContainerElement']('div'),_0x3e710a=_0x46129c['createEmptyElement']('hr');return _0x46129c['addClass']('ck-horizontal-line',_0x4a3fc5),_0x46129c['insert'](_0x46129c['createPositionAt'](_0x4a3fc5,0x0),_0x3e710a),_0x4a3fc5;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1effbb,{writer:_0xf5f6cc,options:_0x5c91a8})=>{if(!_0x5c91a8['showCommentHighlights'])return null;const _0x527415=_0xf5f6cc['createContainerElement']('span'),_0x2d66f1=_0xf5f6cc['createEmptyElement']('img');return _0xf5f6cc['addClass']('image-inline',_0x527415),_0xf5f6cc['insert'](_0xf5f6cc['createPositionAt'](_0x527415,0x0),_0x2d66f1),_0x527415;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4e8742,{writer:_0x1f0dce,options:_0x6f12c5})=>{if(_0x6f12c5['showCommentHighlights'])return _0x1f0dce['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x9e66b0,_0x6f6bfe,_0x4b68d4)=>{_0x4b68d4['options']['showCommentHighlights']&&_0x9e66b0['stop']();},{'priority':'high'});}}class r extends _0x25d649{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(_0x17578e){super(_0x17578e),this['set']('isThreadsLoadingPaused',!0x0),_0x17578e['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5a4952,_0x2b0a99,_0x1a554e,_0x19bec2)=>{const _0x5ba937=_0x17578e['plugins']['get'](o),_0x358459=_0x1a554e?ft(_0x1a554e)['id']:null;_0x17578e['model']['change'](()=>{if(_0x358459){const _0x464287=this['getAllMarkersForId'](_0x358459);for(const _0x36b61a of _0x464287)_0x17578e['editing']['reconvertMarker'](_0x36b61a);}if(_0x19bec2){const {id:_0x593521}=ft(_0x19bec2),_0x40e310=_0x5ba937['getCommentThread'](_0x593521);if(_0x40e310&&_0x40e310['unlinkedAt'])return;if(_0x40e310&&!_0x40e310['isAttached'])return;const _0xf95acf=this['getAllMarkersForId'](_0x593521);for(const _0x4c42c8 of _0xf95acf)_0x17578e['editing']['reconvertMarker'](_0x4c42c8);}}),_0x358459&&this['scrollToThreadMarker'](_0x358459);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x15eb27=this['editor'],_0x5f55fd=_0x15eb27['plugins']['get'](o),_0x38049b=_0x15eb27['config']['get']('collaboration.channelId'),_0x40b365=_0x5f55fd['getCommentThreads']()['filter'](_0x1fe3ce=>_0x1fe3ce['channelId']!==_0x38049b);_0x15eb27['commands']['add']('addCommentThread',new ot(_0x15eb27)),this['listenTo'](_0x15eb27,'change:isReadOnly',(_0x525479,_0x138c17,_0x5c201c)=>{_0x5f55fd['switchReadOnly'](_0x5c201c,_0x15eb27['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5f55fd,dt('addCommentThread',_0x38049b),(_0xb5f2a5,{threadId:_0x1d3b26})=>{const _0x345658=this['editor']['plugins']['get'](o)['getCommentThread'](_0x1d3b26);_0x345658?.['unlinkedAt']&&this['_attachArchivedThread'](_0x1d3b26);}),this['listenTo'](_0x5f55fd,dt('removeCommentThread',_0x38049b),(_0x2c7668,{threadId:_0x34aeae})=>{_0x15eb27['model']['enqueueChange']({'isUndoable':!0x1},_0x2527b2=>{const _0x1fefb7=this['getAllMarkersForId'](_0x34aeae);for(const _0x5f477f of _0x1fefb7)_0x2527b2['removeMarker'](_0x5f477f);});}),this['listenTo'](_0x5f55fd,dt('resolveCommentThread',_0x38049b),(_0xbbb6d3,{threadId:_0xf94242})=>{(this['_reconvertMarkers'](_0xf94242),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0xf94242)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5f55fd,dt('reopenCommentThread',_0x38049b),(_0x364248,{threadId:_0x5a90ec})=>{this['_reconvertMarkers'](_0x5a90ec);},{'priority':'low'}),this['listenTo'](_0x5f55fd,dt('addComment',_0x38049b),(_0x2237dd,{threadId:_0x4427b3,isFromAdapter:_0x391fd3})=>{const _0x15342a=this['getAllMarkersForId'](_0x4427b3);if(_0x391fd3||0x0==_0x15342a['length']||!_0x5f55fd['hasCommentThread'](_0x4427b3))return;0x1===_0x5f55fd['getCommentThread'](_0x4427b3)['length']&&_0x15eb27['model']['enqueueChange']({'isUndoable':!0x1},_0xdca78d=>{for(const _0x4a865e of _0x15342a)_0xdca78d['updateMarker'](_0x4a865e,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x40b365);}['afterInit'](){!async function(_0x5aba2f){const _0x247cd1=_0x4e0a13([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x579d23=0x73460ab3,_0x5ce7bf=0x73418c1b^_0x579d23,_0x277f2e=window[_0x4e0a13([0x44,0x61,0x74,0x65])][_0x4e0a13([0x6e,0x6f,0x77])](),_0x37c39a=_0x5aba2f[_0x4e0a13([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3acdee=new window[(_0x4e0a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb25b21=>{_0x37c39a[_0x4e0a13([0x6f,0x6e,0x63,0x65])](_0x4e0a13([0x72,0x65,0x61,0x64,0x79]),_0xb25b21);}),_0x222e97={[_0x4e0a13([0x6b,0x74,0x79])]:_0x4e0a13([0x45,0x43]),[_0x4e0a13([0x75,0x73,0x65])]:_0x4e0a13([0x73,0x69,0x67]),[_0x4e0a13([0x63,0x72,0x76])]:_0x4e0a13([0x50,0x2d,0x32,0x35,0x36]),[_0x4e0a13([0x78])]:_0x4e0a13([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]),[_0x4e0a13([0x79])]:_0x4e0a13([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]),[_0x4e0a13([0x61,0x6c,0x67])]:_0x4e0a13([0x45,0x53,0x32,0x35,0x36])},_0x42053e=_0x37c39a[_0x4e0a13([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4e0a13([0x67,0x65,0x74])](_0x4e0a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x8d7a82(){let _0x534b44,_0x3efa80=null,_0x44a74f=null;try{if(_0x42053e==_0x4e0a13([0x47,0x50,0x4c]))return _0x4e0a13([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x534b44=_0x4ddd0b(),!_0x534b44)return _0x4e0a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x534b44[_0x4e0a13([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x44a74f=_0xc196ed(_0x534b44[_0x4e0a13([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x534b44[_0x4e0a13([0x6a,0x74,0x69])])),await _0x214af4()?_0x239ed8()?_0xd51208()?_0x4e0a13([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xef23e2()?(_0x534b44[_0x4e0a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4e0a13([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3efa80=_0x3f81e0(_0x4e0a13([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x19550b()):_0x4e0a13([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4e0a13([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4e0a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4e0a13([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0xd51208(){const _0x592410=[_0x4e0a13([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4e0a13([0x74,0x72,0x69,0x61,0x6c])][_0x4e0a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x534b44[_0x4e0a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x277f2e/0x3e8:0xe10*_0x5ce7bf;return _0x534b44[_0x4e0a13([0x65,0x78,0x70])]<_0x592410;}function _0x239ed8(){const _0x56730e=_0x534b44[_0x4e0a13([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x56730e)return!0x1;if(_0x56730e[_0x4e0a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0a13([0x2a])))return!0x0;if(_0x56730e[_0x4e0a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0a13([0x43,0x4d,0x54])))return!0x0;if(_0x56730e[_0x4e0a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0a13([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x2e9131())return!0x0;if(_0x56730e[_0x4e0a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0a13([0x52,0x43,0x4d,0x54]))){if(_0x50c100())return!0x0;if(_0x314548()||_0x7d66f2())return!0x0;}return!0x1;}function _0xef23e2(){const _0x1e0912=_0x534b44[_0x4e0a13([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1e0912||0x0==_0x1e0912[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x36fb1f}=new URL(window[_0x4e0a13([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1e0912[_0x4e0a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x36fb1f))return!0x0;const _0x5597b9=_0x36fb1f[_0x4e0a13([0x73,0x70,0x6c,0x69,0x74])](_0x4e0a13([0x2e]));return _0x1e0912[_0x4e0a13([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x17ecbe=>_0x17ecbe[_0x4e0a13([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4e0a13([0x2a])))[_0x4e0a13([0x6d,0x61,0x70])](_0x1cb3a5=>_0x1cb3a5[_0x4e0a13([0x73,0x70,0x6c,0x69,0x74])](_0x4e0a13([0x2e])))[_0x4e0a13([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xb03b5d=>_0xb03b5d[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x5597b9[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4e0a13([0x6d,0x61,0x70])](_0x30cab5=>Array(_0x5597b9[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x30cab5[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4e0a13([0x66,0x69,0x6c,0x6c])](_0x30cab5[0x0]===_0x4e0a13([0x2a])?_0x4e0a13([0x2a]):'')[_0x4e0a13([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x30cab5))[_0x4e0a13([0x73,0x6f,0x6d,0x65])](_0x2c4f07=>_0x5597b9[_0x4e0a13([0x65,0x76,0x65,0x72,0x79])]((_0x142724,_0x249870)=>_0x2c4f07[_0x249870]===_0x142724||_0x2c4f07[_0x249870]===_0x4e0a13([0x2a])));}function _0x19550b(){return _0x3efa80&&_0x44a74f?new window[(_0x4e0a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x54a679,_0x39be7b)=>{_0x3efa80[_0x4e0a13([0x74,0x68,0x65,0x6e])](_0x54a679,_0x39be7b),_0x44a74f[_0x4e0a13([0x74,0x68,0x65,0x6e])](_0x3f249b=>{_0x3f249b!=_0x4e0a13([0x56,0x61,0x6c,0x69,0x64])&&_0x54a679(_0x3f249b);},_0x39be7b);}):_0x3efa80||_0x44a74f||_0x4e0a13([0x56,0x61,0x6c,0x69,0x64]);}}function _0xc196ed(_0x28d09c,_0x454eab){return new window[(_0x4e0a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50ab8b=>{if(_0x49d5e5())return _0x50ab8b(_0x4e0a13([0x56,0x61,0x6c,0x69,0x64]));_0x519098(),_0x37c39a[_0x4e0a13([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4e0a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3ed86d=!0x1;const _0x1f8b8e=_0x3c7a69();function _0x174df4(_0x31e247){return!!_0x31e247&&(typeof _0x31e247===_0x4e0a13([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x31e247===_0x4e0a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x31e247[_0x4e0a13([0x74,0x68,0x65,0x6e])]===_0x4e0a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x31e247[_0x4e0a13([0x63,0x61,0x74,0x63,0x68])]===_0x4e0a13([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x43afb4(_0x2ddd56){_0x1642e3(_0x2ddd56)[_0x4e0a13([0x74,0x68,0x65,0x6e])](_0xe845ee=>{if(!_0xe845ee||_0xe845ee[_0x4e0a13([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4e0a13([0x6f,0x6b]))return _0x4e0a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x5f18ac(_0x1fd2b6(_0x1f8b8e+_0x454eab))!=_0xe845ee[_0x4e0a13([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4e0a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4e0a13([0x56,0x61,0x6c,0x69,0x64]);})[_0x4e0a13([0x74,0x68,0x65,0x6e])](_0x389732=>(_0x44f9e6(),_0x389732),()=>{const _0x24680d=_0x278fb1();return null==_0x24680d?(_0x44f9e6(),_0x4e0a13([0x56,0x61,0x6c,0x69,0x64])):_0x4e0a13(_0x277f2e-_0x24680d>(0x574a8eb3^_0x579d23)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4e0a13([0x74,0x68,0x65,0x6e])](_0x50ab8b)[_0x4e0a13([0x63,0x61,0x74,0x63,0x68])](()=>{_0x50ab8b(_0x4e0a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xa31ef7=0x7370e433^_0x579d23;function _0x44f9e6(){const _0x2b50f2=_0x4e0a13([0x6c,0x6c,0x63,0x74,0x2d])+_0x5f18ac(_0x1fd2b6(_0x28d09c)),_0x43814e=_0x5c2455(_0x5f18ac(window[_0x4e0a13([0x4d,0x61,0x74,0x68])][_0x4e0a13([0x63,0x65,0x69,0x6c])](_0x277f2e/_0xa31ef7)));window[_0x4e0a13([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4e0a13([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2b50f2,_0x43814e);}function _0x278fb1(){const _0x9bb892=_0x4e0a13([0x6c,0x6c,0x63,0x74,0x2d])+_0x5f18ac(_0x1fd2b6(_0x28d09c)),_0x419c29=window[_0x4e0a13([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4e0a13([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x9bb892);return _0x419c29?window[_0x4e0a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5c2455(_0x419c29),0x10)*_0xa31ef7:null;}function _0x1642e3(_0x479d29){return new window[(_0x4e0a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x57f838,_0x6b2e83)=>{_0x479d29[_0x4e0a13([0x74,0x68,0x65,0x6e])](_0x57f838,_0x6b2e83),window[_0x4e0a13([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x6b2e83,0x7347de73^_0x579d23);});}}_0x37c39a[_0x4e0a13([0x6f,0x6e])](_0x4e0a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x1c7560,_0x3024b6)=>{if(_0x3024b6[0x0]!=_0x28d09c)return _0x50ab8b(_0x4e0a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3024b6[0x1]={..._0x3024b6[0x1],[_0x4e0a13([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1f8b8e};},{[_0x4e0a13([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4e0a13([0x68,0x69,0x67,0x68])}),_0x37c39a[_0x4e0a13([0x6f,0x6e])](_0x4e0a13([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2f890e=>{_0x174df4(_0x2f890e[_0x4e0a13([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3ed86d=!0x0,_0x43afb4(_0x2f890e[_0x4e0a13([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4e0a13([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4e0a13([0x6c,0x6f,0x77])}),_0x3acdee[_0x4e0a13([0x74,0x68,0x65,0x6e])](()=>{_0x3ed86d||_0x50ab8b(_0x4e0a13([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x49d5e5(){return _0x37c39a[_0x4e0a13([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e0a13([0x76,0x69,0x65,0x77])][_0x4e0a13([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4e0a13([0x61,0x75,0x74,0x6f]);}function _0x519098(){_0x37c39a[_0x4e0a13([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e0a13([0x76,0x69,0x65,0x77])][_0x4e0a13([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4e0a13([0x61,0x75,0x74,0x6f]);}}function _0x3f81e0(_0x11058b){const _0x6e44c=[new window[(_0x4e0a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x29ff7b=>setTimeout(_0x29ff7b,0x734f347f^_0x579d23)),_0x3acdee[_0x4e0a13([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4e0a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5cbce6=>{let _0x3df921=0x0;_0x37c39a[_0x4e0a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e0a13([0x6f,0x6e])](_0x4e0a13([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x229818,_0x2fc3c3)=>{_0x2fc3c3[0x0][_0x4e0a13([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3df921++,_0x3df921==(0x73460f5b^_0x579d23)&&(_0x5cbce6(),_0x229818[_0x4e0a13([0x6f,0x66,0x66])]());});}))];return window[_0x4e0a13([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4e0a13([0x72,0x61,0x63,0x65])](_0x6e44c)[_0x4e0a13([0x74,0x68,0x65,0x6e])](()=>_0x11058b);}async function _0x3abeb6(){await _0x3acdee,_0x37c39a[_0x4e0a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e0a13([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x34979c,_0x37c39a[_0x4e0a13([0x6d,0x6f,0x64,0x65,0x6c])][_0x4e0a13([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x34979c,_0x37c39a[_0x4e0a13([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4e0a13([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2e9131(){return window[_0x4e0a13([0x67,0x6c,0x6f,0x62])]&&window[_0x4e0a13([0x67,0x6c,0x6f,0x62])][_0x4e0a13([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x50c100(){return _0x5a3da6(_0x4e0a13([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x28e50e(_0x4e0a13([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4e0a13([0x73,0x74,0x61,0x74,0x65])]==_0x4e0a13([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x314548(){return _0x5a3da6(_0x4e0a13([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 _0x7d66f2(){return _0x5a3da6(_0x4e0a13([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x33dc03(_0x32dae5){const _0x54d901=_0x3eaabf();_0x37c39a[_0x54d901]=_0x4e0a13([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x32dae5,_0x32dae5!=_0x4e0a13([0x56,0x61,0x6c,0x69,0x64])&&_0x3abeb6();}function _0x3eaabf(){const _0x438add=window[_0x4e0a13([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4e0a13([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4e0a13([0x6e,0x6f,0x77])]())[_0x4e0a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4e0a13([0x2e]),'');let _0x2ae8b=_0x4e0a13([0x4b]);for(let _0xd457bc=0x0;_0xd457bc<_0x438add[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd457bc+=0x2){let _0x1bf471=window[_0x4e0a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x438add[_0x4e0a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd457bc,_0xd457bc+0x2));_0x1bf471>=_0x247cd1[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1bf471-=_0x247cd1[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2ae8b+=_0x247cd1[_0x1bf471];}return _0x2ae8b;}function _0x4ddd0b(){const _0x4984ff=_0x42053e[_0x4e0a13([0x73,0x70,0x6c,0x69,0x74])](_0x4e0a13([0x2e]));if(0x3!=_0x4984ff[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x588b9b(_0x4984ff[0x1]);function _0x588b9b(_0x12d549){const _0x335e92=_0x8d7911(_0x12d549);return _0x335e92&&_0x2ba2be()?_0x335e92:null;function _0x2ba2be(){const _0x4f8684=_0x335e92[_0x4e0a13([0x6a,0x74,0x69])],_0x4cb940=window[_0x4e0a13([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4f8684[_0x4e0a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4f8684[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x34eb79={..._0x335e92,[_0x4e0a13([0x6a,0x74,0x69])]:_0x4f8684[_0x4e0a13([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x4f8684[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x34eb79[_0x4e0a13([0x76,0x63])],_0x1fd2b6(_0x34eb79)==_0x4cb940;}}}async function _0x214af4(){let _0xe199f8=!0x0;try{const _0xe06a54=_0x42053e[_0x4e0a13([0x73,0x70,0x6c,0x69,0x74])](_0x4e0a13([0x2e])),[_0x1d5fee,_0xfa5d7e,_0x24919b]=_0xe06a54;return _0x19d4a9(_0x1d5fee),await _0x1f3f5d(_0x1d5fee,_0xfa5d7e,_0x24919b),_0xe199f8;}catch{return!0x1;}function _0x19d4a9(_0x49df07){const _0x55c4d8=_0x8d7911(_0x49df07);_0x55c4d8&&_0x55c4d8[_0x4e0a13([0x61,0x6c,0x67])]==_0x4e0a13([0x45,0x53,0x32,0x35,0x36])||(_0xe199f8=!0x1);}async function _0x1f3f5d(_0x2c6f17,_0x2fceec,_0x261f9b){const _0x26cf42=window[_0x4e0a13([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4e0a13([0x66,0x72,0x6f,0x6d])](_0x2e167b(_0x261f9b),_0x2c5f16=>_0x2c5f16[_0x4e0a13([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x14dfca=new window[(_0x4e0a13([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4e0a13([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2c6f17+_0x4e0a13([0x2e])+_0x2fceec),_0x468105=window[_0x4e0a13([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4e0a13([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x468105)return;const _0x328a08=await _0x468105[_0x4e0a13([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4e0a13([0x6a,0x77,0x6b]),_0x222e97,{[_0x4e0a13([0x6e,0x61,0x6d,0x65])]:_0x4e0a13([0x45,0x43,0x44,0x53,0x41]),[_0x4e0a13([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4e0a13([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4e0a13([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x468105[_0x4e0a13([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4e0a13([0x6e,0x61,0x6d,0x65])]:_0x4e0a13([0x45,0x43,0x44,0x53,0x41]),[_0x4e0a13([0x68,0x61,0x73,0x68])]:{[_0x4e0a13([0x6e,0x61,0x6d,0x65])]:_0x4e0a13([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x328a08,_0x26cf42,_0x14dfca)||(_0xe199f8=!0x1);}}function _0x8d7911(_0x5d143c){return _0x5d143c[_0x4e0a13([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4e0a13([0x65,0x79]))?JSON[_0x4e0a13([0x70,0x61,0x72,0x73,0x65])](_0x2e167b(_0x5d143c)):null;}function _0x2e167b(_0x56b93e){return window[_0x4e0a13([0x61,0x74,0x6f,0x62])](_0x56b93e[_0x4e0a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4e0a13([0x2b]))[_0x4e0a13([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4e0a13([0x2f])));}function _0x1fd2b6(_0x4139e5){let _0x545822=0x1505;function _0x290f0a(_0x22a978){for(let _0x1a83ce=0x0;_0x1a83ce<_0x22a978[_0x4e0a13([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1a83ce++){const _0x270b46=_0x22a978[_0x4e0a13([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1a83ce);_0x545822=(_0x545822<<0x5)+_0x545822+_0x270b46,_0x545822&=_0x545822;}}function _0x14c9ed(_0x1132e3){Array[_0x4e0a13([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1132e3)?_0x1132e3[_0x4e0a13([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x14c9ed):_0x1132e3&&typeof _0x1132e3==_0x4e0a13([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4e0a13([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1132e3)[_0x4e0a13([0x73,0x6f,0x72,0x74])]()[_0x4e0a13([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x261cc8,_0x549ed5])=>{_0x290f0a(_0x261cc8),_0x14c9ed(_0x549ed5);}):_0x290f0a(window[_0x4e0a13([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1132e3));}return _0x14c9ed(_0x4139e5),_0x545822>>>0x0;}function _0x5f18ac(_0xe58bc0){return _0xe58bc0[_0x4e0a13([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4e0a13([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4e0a13([0x30]));}function _0x5c2455(_0xe26bf5){return _0xe26bf5[_0x4e0a13([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4e0a13([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4e0a13([0x6a,0x6f,0x69,0x6e])]('');}function _0x5a3da6(_0x207416){return _0x37c39a[_0x4e0a13([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4e0a13([0x68,0x61,0x73])](_0x207416);}function _0x28e50e(_0xbf90c0){return _0x37c39a[_0x4e0a13([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4e0a13([0x67,0x65,0x74])](_0xbf90c0);}function _0x34979c(){}function _0x4e0a13(_0x1ceccb){return _0x1ceccb['map'](_0xa3796=>String['fromCharCode'](_0xa3796))['join']('');}_0x33dc03(await _0x8d7a82());}(this);}['destroy'](){const _0x24e7f1=this['editor']['plugins']['get'](o),_0x685621=this['editor']['config']['get']('collaboration.channelId');for(const _0x40033f of _0x24e7f1['getCommentThreads']({'channelId':_0x685621}))_0x24e7f1['_detachCommentThread'](_0x40033f['id']),_0x24e7f1['_threads']['delete'](_0x40033f['id']);super['destroy']();}['hasMarkerForId'](_0x5cc2a4){return this['getAllMarkersForId'](_0x5cc2a4)['length']>0x0;}['getAllMarkersForId'](_0x33e431){const _0x1544a1=[];for(const _0x23a890 of this['editor']['model']['markers'])_0x23a890['name']['startsWith']('comment:'+_0x33e431)&&_0x1544a1['push'](_0x23a890);return _0x1544a1;}['scrollToThreadMarker'](_0x49c190){setTimeout(()=>{const _0x521787=this['_getTargetForId'](_0x49c190);if(!_0x521787)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x49c190&&nt({'target':_0x521787[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5b68b2){this['editor']['model']['change'](()=>{for(const _0x14b8f0 of this['getAllMarkersForId'](_0x5b68b2))this['editor']['editing']['reconvertMarker'](_0x14b8f0);});}['_attachArchivedThread'](_0x34a173){const _0x481596=this['editor']['plugins']['get'](o),_0x4a7e05=this['editor']['plugins']['get'](b),_0x39acbc=_0x481596['getCommentThread'](_0x34a173);if(!_0x39acbc['isAttached']){const _0x157cad=_0x39acbc['attachTo'](()=>this['_getTargetForId'](_0x39acbc['id']));_0x4a7e05['registerAnnotation'](_0x157cad),_0x39acbc['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x20edef=this['editor'],_0x171fe0=_0x20edef['plugins']['get'](it);_0x20edef['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2f28b4,_0x298415)=>{const {id:_0x2f6bc6}=ft(_0x2f28b4['markerName']),_0x530e18=_0x20edef['plugins']['get'](o)['getCommentThread'](_0x2f6bc6),_0x39bd2c=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2f6bc6;let _0x52dda4;if(_0x530e18&&_0x530e18['isResolved']&&!_0x39bd2c&&_0x2f28b4['item'])return _0x298415['consumable']['consume'](_0x2f28b4['item'],'addMarker:'+_0x2f28b4['markerName']),_0x298415['consumable']['consume'](_0x2f28b4['item'],'removeMarker:'+_0x2f28b4['markerName']),null;const _0x1b598c=['ck-comment-marker'];return _0x39bd2c&&_0x1b598c['push']('ck-comment-marker--active'),_0x52dda4=_0x530e18?.['length']?_0x530e18['comments']['first']['author']['id']:_0x171fe0['me']['id'],{'classes':_0x1b598c,'attributes':{'data-comment':_0x2f6bc6,'data-author-id':_0x52dda4}};}}),_0x20edef['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x51472f,{options:_0x4e2fa6})=>{if(_0x4e2fa6['showCommentHighlights'])return null;const _0x26318f=_0x20edef['plugins']['get'](o),_0x446215=_0x20edef['model']['markers']['get'](_0x51472f),{id:_0x1840f3,part:_0x1698ce}=ft(_0x51472f);return _0x446215&&!_0x446215['affectsData']||_0x4e2fa6['ignoreResolvedComments']&&_0x26318f['getCommentThread'](_0x1840f3)?.['isResolved']?null:{'group':'comment','name':_0x1698ce?_0x1840f3+':'+_0x1698ce:_0x1840f3};}}),_0x20edef['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3d358b,{writer:_0x1cd0f1})=>_0x1cd0f1['createElement']('$marker',{'data-name':'comment:'+_0x3d358b['getAttribute']('id')})}),_0x20edef['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x24586e=this['editor'],_0x378cf0=_0x24586e['plugins']['get'](o),_0x2f345f=new Set(),_0x36e92b=new Set();_0x24586e['model']['document']['registerPostFixer'](_0x51a0b4=>{let _0x117330=!0x1;for(const {name:_0x18ab09,data:_0x404412}of _0x24586e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1bc8f8,id:_0x19d1f2}=ft(_0x18ab09);let _0x23061d=_0x404412['newRange'];if('comment'!==_0x1bc8f8||!_0x23061d)continue;const _0x3c4631='$graveyard'===_0x23061d['root']['rootName'];_0x3c4631||(_0x23061d=ht(_0x23061d,_0x24586e['model']),!_0x23061d||_0x23061d['isCollapsed']||!_0x404412['newRange']||_0x23061d['isEqual'](_0x404412['newRange']))?_0x24586e['model']['hasContent'](_0x23061d)&&!_0x3c4631?this['isThreadsLoadingPaused']?_0x2f345f['add'](_0x18ab09):this['_handleThreadMarker'](_0x18ab09,_0x19d1f2):(_0x36e92b['add'](_0x18ab09),_0x2f345f['delete'](_0x18ab09),_0x51a0b4['removeMarker'](_0x18ab09),_0x117330=!0x0):(_0x51a0b4['updateMarker'](_0x18ab09,{'range':_0x23061d}),_0x117330=!0x0);}return _0x117330;}),this['on']('change:isThreadsLoadingPaused',(_0x16f917,_0x30a9bc,_0x36f311)=>{if(!_0x36f311&&_0x2f345f['size'])for(const _0x56553b of _0x2f345f){const {id:_0x191c21}=ft(_0x56553b);_0x2f345f['delete'](_0x56553b),_0x24586e['model']['markers']['get'](_0x56553b)&&this['_handleThreadMarker'](_0x56553b,_0x191c21);}}),this['listenTo'](_0x24586e['model']['document'],'change',()=>{for(const {name:_0x57f204,data:{newRange:_0x1e4282}}of _0x24586e['model']['document']['differ']['getChangedMarkers']()){const {group:_0x49a224,id:_0x56a10d}=ft(_0x57f204);if('comment'!==_0x49a224)continue;const _0x3c7654=_0x378cf0['getCommentThread'](_0x56a10d),_0x8d2f4c=this['hasMarkerForId'](_0x56a10d);_0x3c7654&&(!_0x3c7654['_hasTargetInContent']&&_0x1e4282&&_0x24586e['editing']['view']['once']('render',()=>{const _0x18a534=_0x24586e['plugins']['get'](y),_0x3096ca=_0x378cf0['_threadToController']['get'](_0x3c7654)['view'];_0x18a534['getByInnerView'](_0x3096ca)['refreshVisibility']();},{'priority':'low'}),_0x3c7654['_hasTargetInContent']=_0x8d2f4c||!!_0x1e4282),_0x1e4282||(_0x36e92b['add'](_0x57f204),_0x2f345f['delete'](_0x57f204));}for(const _0x43600b of _0x36e92b){const {id:_0x596277}=ft(_0x43600b),_0x3b9df5=_0x378cf0['getCommentThread'](_0x596277);if(_0x2f345f['delete'](_0x43600b),!_0x3b9df5)continue;const _0x3bc27f=this['hasMarkerForId'](_0x596277);_0x3bc27f||_0x3b9df5['isSubmitted']?_0x3bc27f||_0x3b9df5['unlinkedAt']||_0x3b9df5['setUnlinkedAt'](new Date()):_0x3b9df5['remove']();}_0x36e92b['clear']();});}['_handleInitialThreads'](_0x65d960){_0x65d960['forEach'](_0x309ffa=>{_0x309ffa['unlinkedAt']&&this['_attachArchivedThread'](_0x309ffa['id']);});}['_getTargetForId'](_0x3e9ec9){const _0x347e46=this['editor'],_0x5f4f07=this['getAllMarkersForId'](_0x3e9ec9);return et(_0x347e46['editing'],_0x5f4f07);}['_getTextContext'](_0x2a2060){const _0xc3d855=this['getAllMarkersForId'](_0x2a2060);let _0x251775='',_0x410abf=!0x1;for(const _0x50d27c of _0xc3d855){const _0x275352=_0x50d27c['getRange']();for(const _0x38801d of Array['from'](_0x275352['getItems']()))_0x38801d['is']('$textProxy')?(_0x251775&&_0x410abf&&(_0x251775+='\x20',_0x410abf=!0x1),_0x251775+=_0x38801d['data']):_0x410abf=!0x0;_0x410abf=!0x0;}return _0x251775['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1d4351,_0x3c307d){const _0x1247c3=this['editor'],_0x5a0a6a=_0x1247c3['plugins']['get'](o);let _0x2b1539=_0x5a0a6a['getCommentThread'](_0x3c307d);const _0x259d15=_0x1247c3['config']['get']('collaboration.channelId'),_0x31568e=_0x1247c3['plugins']['get'](b);if(_0x2b1539&&(_0x2b1539['unlinkedAt']&&_0x2b1539['setUnlinkedAt'](null),_0x2b1539['isAttached']))return _0x2b1539;return!this['getAllMarkersForId'](_0x3c307d)[0x0]['managedUsingOperations']?_0x1247c3['editing']['view']['once']('render',()=>{if(_0x5a0a6a['getCommentThread'](_0x3c307d))return;const _0x4270b2=_0x1247c3['plugins']['get'](y);_0x2b1539=_0x5a0a6a['openNewCommentThread']({'channelId':_0x259d15,'threadId':_0x3c307d,'target':()=>this['_getTargetForId'](_0x3c307d),'context':{'type':'text','value':this['_getTextContext'](_0x3c307d)}});const _0x1a8d55=_0x5a0a6a['_threadToController']['get'](_0x2b1539)['view'],_0xeab1de=_0x4270b2['getByInnerView'](_0x1a8d55);_0xeab1de&&_0x31568e['registerAnnotation'](_0xeab1de);},{'priority':'low'}):_0x5a0a6a['fetchCommentThread']({'channelId':_0x259d15,'threadId':_0x3c307d})['then'](_0x3912d4=>{if('destroyed'!==_0x1247c3['state']){if(_0x2b1539=_0x3912d4,_0x2b1539&&!_0x2b1539['isAttached']){const _0x2d96da=_0x2b1539['attachTo'](()=>this['_getTargetForId'](_0x3c307d));_0x31568e['registerAnnotation'](_0x2d96da),_0x2b1539['isResolved']&&this['_reconvertMarkers'](_0x3c307d);}else{if(!_0x2b1539){const _0x37e503=this['getAllMarkersForId'](_0x3c307d);_0x1247c3['model']['change'](_0x55c0dc=>{for(const _0x6cf8f2 of _0x37e503)_0x55c0dc['removeMarker'](_0x6cf8f2);});}}}}),_0x2b1539;}['_handleThreadMarker'](_0x4ff894,_0x56a734){const _0x90cad0=this['_attachMarkerToThread'](_0x4ff894,_0x56a734);_0x90cad0&&!_0x90cad0['context']&&_0x90cad0['setContext']({'type':'text','value':this['_getTextContext'](_0x56a734)});}['_initAriaMarkerChangeAnnouncements'](){const _0x533b8e=this['editor'];rt(_0x533b8e['model'],({left:_0x4b70fd,entered:_0x3b5197})=>{for(const _0x572a37 of _0x4b70fd)if(mt(_0x572a37)){_0x533b8e['ui']['ariaLiveAnnouncer']['announce'](N(_0x533b8e['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5accd5 of _0x3b5197)if(mt(_0x5accd5)){_0x533b8e['ui']['ariaLiveAnnouncer']['announce'](N(_0x533b8e['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x11f337)));break;}});}}function dt(_0x1db8ae,_0x15232f){return _0x15232f?_0x1db8ae+':'+_0x15232f:_0x1db8ae;}function ht(_0x261c04,_0x4926e2){const _0x47557b=_0x4926e2['schema'],_0x2c8218=_0x4926e2['createRange'](_0x261c04['start']);for(const _0xadc44b of _0x261c04['getWalker']()){const {type:_0x1e62cf,item:_0x3c507b,nextPosition:_0x21f523}=_0xadc44b;if('text'===_0x1e62cf||_0x47557b['isObject'](_0x3c507b)){const _0x33e913=_0x4926e2['createPositionBefore'](_0x3c507b);_0x2c8218['isCollapsed']&&(_0x2c8218['start']=_0x33e913),_0x2c8218['end']=_0x21f523;}}return _0x2c8218;}function mt(_0x2dc9f9){return'comment'===ft(_0x2dc9f9['name'])['group'];}class s extends _0x25d649{['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 _0x2d2920=this['editor'],_0x271434=_0x2d2920['plugins']['get'](o),_0x433264=_0x2d2920['plugins']['get'](r),_0x26b535=_0x2d2920['plugins']['get'](y),_0x1b31fb=_0x2d2920['plugins']['get'](b);_0x2d2920['ui']['componentFactory']['add']('comment',()=>{const _0x51eb72=this['_createUIButton'](_0x175706);return _0x51eb72['tooltip']=!0x0,_0x51eb72;}),_0x2d2920['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x22f4b8)),_0x1b31fb['addSourceCollector'](()=>{const _0xaeb224=[];for(const [_0x139da2,_0x59ef55]of _0x271434['_threadToController']){const _0x2b994c=_0x433264['getAllMarkersForId'](_0x139da2['id']),_0xa79f6d=_0x2b994c['map'](_0x53e4e9=>_0x53e4e9['getRange']());_0x2b994c['length']>0x0&&_0xaeb224['push']([_0x59ef55['view'],_0xa79f6d]);}return _0xaeb224;}),this['listenTo'](_0x26b535,'change:activeAnnotations',(_0x6279b0,_0x1d2c17,_0x316c30)=>{const _0x3193a4=Array['from'](_0x316c30)['map'](_0x369280=>_0x369280['innerView'])['find'](_0x379f9d=>_0x271434['_viewToController']['has'](_0x379f9d));if(!_0x3193a4)return void(_0x433264['activeMarker']=null);const _0x2cb6bf=_0x271434['_viewToController']['get'](_0x3193a4)['model']['id'],_0x4b6bab='comment:'+_0x2cb6bf;_0x2cb6bf&&_0x433264['hasMarkerForId'](_0x2cb6bf)?_0x433264['activeMarker']=_0x4b6bab:_0x433264['activeMarker']&&(_0x433264['activeMarker']=null);}),this['listenTo'](_0x271434,'removeCommentThread',(_0x210884,{threadId:_0x3f2d7f,isFromAdapter:_0x30ed67})=>{!_0x30ed67&&_0x2d2920['ui']['focusTracker']['isFocused']&&_0x433264['hasMarkerForId'](_0x3f2d7f)&&_0x2d2920['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x271434,'addComment',(_0x52c015,{threadId:_0x2d28a6,isFromAdapter:_0x103c7f})=>{if(_0x103c7f||!_0x433264['hasMarkerForId'](_0x2d28a6)||!_0x271434['hasCommentThread'](_0x2d28a6))return;0x1===_0x271434['getCommentThread'](_0x2d28a6)['length']&&(_0x2d2920['editing']['view']['focus'](),_0x52c015['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x27fca6=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x24f3ab;for(const _0x220ce4 in _0x27fca6){const _0x32a06c=_0x220ce4,_0x3cb781=_0x27fca6[_0x32a06c];if('commentsLicenseKeyValid'==_0x3cb781||'commentsLicenseKeyInvalid'==_0x3cb781||'commentsLicenseKeyExpired'==_0x3cb781||'commentsLicenseKeyDomainLimit'==_0x3cb781||'commentsLicenseKeyNotAllowed'==_0x3cb781||'commentsLicenseKeyEvaluationLimit'==_0x3cb781||'commentsLicenseKeyUsageLimit'==_0x3cb781){delete _0x27fca6[_0x32a06c],_0x24f3ab=_0x3cb781,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x24f3ab&&_0x27fca6['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x24f3ab&&_0x27fca6['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x24f3ab&&_0x27fca6['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x24f3ab&&_0x27fca6['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x24f3ab&&_0x27fca6['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x24f3ab&&_0x27fca6['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1d72b3){const _0x4fd4a8=this['editor'],_0x362246=new _0x1d72b3(_0x4fd4a8['locale']),_0x14bac4=_0x4fd4a8['commands']['get']('addCommentThread');return _0x362246['set']({'label':N(_0x4fd4a8['locale'],'Comment'),'icon':_0x5caa89}),_0x362246['bind']('isEnabled')['to'](_0x14bac4,'isEnabled',_0x14bac4,'hasContent',(_0x193e08,_0x550113)=>_0x193e08&&_0x550113),this['listenTo'](_0x362246,'execute',()=>{_0x14bac4['execute']();}),_0x362246;}}class i extends _0x25d649{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x3639dd){super(_0x3639dd),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x3a3d6f,_0x3c685a,_0x575df5)=>{_0x575df5?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x42ae6f,_0x5e6173]of this['editor']['commands'])_0x5e6173['affectsData']&&'addCommentThread'!==_0x42ae6f&&_0x5e6173['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4a6380=this['editor']['editing']['view']['document'];this['listenTo'](_0x4a6380,'cut',_0x366f47=>_0x366f47['stop'](),{'priority':'highest'}),this['listenTo'](_0x4a6380,'clipboardInput',_0x107c3e=>_0x107c3e['stop'](),{'priority':'highest'}),this['listenTo'](_0x4a6380,'delete',_0x19c69d=>_0x19c69d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x25ba17,_0x243a26]of this['editor']['commands'])_0x243a26['affectsData']&&'addCommentThread'!==_0x25ba17&&_0x243a26['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x2cf45d{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2173ca){super(_0x2173ca),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3ae3ee=this['context']['plugins']['get'](y);this['listenTo'](_0x3ae3ee,'_activateAnnotation',(_0x13a3d2,_0x32fab9)=>{for(const _0x454c9 of this['activeUIs']){const _0x5de0e6=this['_uis']['get'](_0x454c9);(0x0,this['uisData']['get'](_0x454c9)['filter'])(_0x32fab9)&&_0x5de0e6['setActiveAnnotation'](_0x32fab9);}}),this['listenTo'](_0x3ae3ee,'_deactivateAllAnnotations',()=>{for(const _0x5c1822 of this['activeUIs']){this['_uis']['get'](_0x5c1822)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3ae3ee['_visibleAnnotations'],'add',(_0x41fedd,_0x3dc22c)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3dc22c);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x57f830){return this['activeUIs']['has'](_0x57f830);}['activate'](_0x53a8c9,_0x19e201=this['defaultFilter']){const _0x265bcc=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x53a8c9))throw new _0x354fbc('annotationsuis-missing-ui',this,{'uiName':_0x53a8c9});this['isActive'](_0x53a8c9)&&this['deactivate'](_0x53a8c9),this['activeUIs']['add'](_0x53a8c9);const _0x50fe2c=new S();v({'source':_0x265bcc['_visibleAnnotations'],'target':_0x50fe2c,'filter':_0x19e201}),this['uisData']['set'](_0x53a8c9,{'collection':_0x50fe2c,'filter':_0x19e201});const _0x2e3866=this['_uis']['get'](_0x53a8c9);_0x2e3866['attach'](_0x50fe2c),this['listenTo'](_0x2e3866,'change:activeAnnotation',(_0x24aedf,_0xb9d813,_0x521719,_0x49bbb3)=>{_0x49bbb3&&_0x265bcc['_removeActiveAnnotation'](_0x49bbb3),_0x521719&&_0x265bcc['_addActiveAnnotation'](_0x521719);});}['deactivate'](_0x104167){if(this['activeUIs']['delete'](_0x104167),!this['_uis']['has'](_0x104167))throw new _0x354fbc('annotationsuis-missing-ui',this,{'uiName':_0x104167});const _0x39742b=this['_uis']['get'](_0x104167);_0x39742b['detach'](),this['stopListening'](_0x39742b),this['uisData']['get'](_0x104167)['collection']['destroy'](),this['uisData']['delete'](_0x104167);}['switchTo'](_0x244982){if(!this['_uis']['has'](_0x244982))throw new _0x354fbc('annotationsuis-missing-ui',this,{'uiName':_0x244982});const _0x39a668=this['context']['plugins']['get'](y),_0x5710b2=Array['from'](_0x39a668['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x244982);const _0xe33c7c=this['_uis']['get'](_0x244982);_0xe33c7c['setActiveAnnotation'](_0x5710b2),_0xe33c7c['_setSelectedAnnotations']&&_0x5710b2&&_0xe33c7c['_setSelectedAnnotations']([_0x5710b2]);}['deactivateAll'](){for(const _0x4a7cc5 of this['activeUIs'])this['deactivate'](_0x4a7cc5);}['register'](_0x1362eb,_0x40a2ce){if(this['_uis']['has'](_0x1362eb))throw new _0x354fbc('annotationsuis-register-already-registered');if('function'!=typeof _0x40a2ce['attach']||'function'!=typeof _0x40a2ce['detach']||'function'!=typeof _0x40a2ce['setActiveAnnotation'])throw new _0x354fbc('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x1362eb,_0x40a2ce);}['refilterAnnotations'](){const _0x177a75=this['context']['plugins']['get'](y)['collection'],_0xca2c8=new Map(),_0x4913ae=Array['from'](this['activeUIs']);for(const _0x57ce03 of this['activeUIs']){const _0x4fc605=this['uisData']['get'](_0x57ce03)['collection'];for(const _0x574b94 of _0x4fc605)_0xca2c8['set'](_0x574b94,_0x57ce03);}for(const _0x3bcc7d of _0x177a75){const _0x2b296a=_0xca2c8['get'](_0x3bcc7d);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3bcc7d);const _0xd0f54e=_0x4913ae['find'](_0x1701ae=>this['uisData']['get'](_0x1701ae)['filter'](_0x3bcc7d));_0x2b296a!==_0xd0f54e&&(_0x2b296a&&this['uisData']['get'](_0x2b296a)['collection']['remove'](_0x3bcc7d),_0xd0f54e&&this['uisData']['get'](_0xd0f54e)['collection']['add'](_0x3bcc7d));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3339b5){const _0x258d1b=[];for(const _0x561ddb of this['activeUIs']){(0x0,this['uisData']['get'](_0x561ddb)['filter'])(_0x3339b5)&&_0x258d1b['push'](_0x561ddb);}if(_0x258d1b['length']>0x1)throw new _0x354fbc('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x258d1b,'annotationType':_0x3339b5['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x2bceb6){super(_0x2bceb6);const _0x418cbb=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 _0x19bf9d(),this['focusCycler']=new _0x34c114({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x418cbb['to']('class')],'style':{'minHeight':_0x418cbb['to']('minHeight',_0x235c49=>'number'==typeof _0x235c49?_i(_0x235c49+0xa):null)},'dir':_0x2bceb6['uiLanguageDirection'],'role':'application','aria-label':N(_0x2bceb6,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x2bceb6,'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',_0x296e88=>{this['_updateItemPositionInFocusables'](_0x296e88['source']);}),this['list']['forEach'](_0xeacb64=>{this['focusTracker']['add'](_0xeacb64['element']),this['_updateItemPositionInFocusables'](_0xeacb64);}),this['list']['on']('change',(_0x48a2c2,_0x4f2f14)=>{for(const _0x5b1eab of _0x4f2f14['removed'])this['focusTracker']['remove'](_0x5b1eab['element']),this['focusables']['remove'](_0x5b1eab);for(const _0x29447c of _0x4f2f14['added'])this['focusTracker']['add'](_0x29447c['element']),this['_updateItemPositionInFocusables'](_0x29447c);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5966cb){const _0x52b0a9=this['focusables']['getIndex'](_0x5966cb);let _0x442407,_0x3571f5;for(const _0x4ef617 of this['focusables'])if(_0x5966cb['top']<_0x4ef617['top']){_0x442407=_0x4ef617;break;}if(_0x3571f5=_0x442407?this['focusables']['getIndex'](_0x442407):this['focusables']['length'],-0x1!==_0x52b0a9){if(_0x52b0a9===_0x3571f5-0x1)return;this['focusables']['remove'](_0x5966cb),_0x3571f5=_0x442407?this['focusables']['getIndex'](_0x442407):this['focusables']['length'];}this['focusables']['add'](_0x5966cb,_0x3571f5);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x12b6ee){super(_0x12b6ee),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x3b0d20,_0x199d13)=>_0x3b0d20+_0x199d13),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2cc6e6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2cc6e6['to']('isAnimationDisabled',_0xa98a6f=>_0xa98a6f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2cc6e6['to']('top',_0x252cb6=>Ot(_0x252cb6))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x6e0e5b=this['element']['clientHeight'];_0x6e0e5b&&(this['height']=_0x6e0e5b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2cf45d{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3efe10){super(_0x3efe10),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 _0x544405=this['context']['config']['get']('sidebar.container');_0x544405&&this['setContainer'](_0x544405);}['setContainer'](_0x52964c){if(!g(_0x52964c))throw new _0x354fbc('sidebar-setcontainer-invalid-element');this['container']=_0x52964c;}['_attachToContainer']({viewClass:_0x8e951c='',spaceBetweenItems:_0xd03780=0x19}={}){if(!g(this['container']))throw new _0x354fbc('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x8e951c,this['_spaceBetweenItems']=_0xd03780;}['rearrange']({removedAnnotation:_0x383ae2,previousAnnotation:_0xa02739,nextAnnotation:_0x113cda}){const _0x53c4d5=this['getSidebarItemView'](_0x383ae2);this['view']['list']['remove'](_0x53c4d5),this['_destroySidebarItemView'](_0x383ae2),_0xa02739&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xa02739)),_0x113cda&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x113cda)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xaef8fa,activatedAnnotation:_0x1c24c7,disableAnimationOnActivatedAnnotation:_0x1d4a09}){if(this['_activeAnnotation']=_0x1c24c7,_0xaef8fa){_0xaef8fa['isActive']=!0x1;const _0x2e5bea=this['getSidebarItemView'](_0xaef8fa);_0x2e5bea&&_0x1d4a09&&(_0x2e5bea['isAnimationDisabled']=!0x1);}if(_0x1c24c7){const _0x3cf48e=this['getSidebarItemView'](_0x1c24c7);_0x3cf48e&&(_0x1c24c7['isActive']=!0x0,_0x1d4a09&&(_0x3cf48e['isAnimationDisabled']=!0x0,_0x3cf48e['top']+=0x1),this['_alignToTargetRect'](_0x3cf48e));}}['_detachFromContainer'](_0x295b94){if(this['view']['element']['remove'](),_0x295b94){for(const _0x58c81a of _0x295b94)this['_destroySidebarItemView'](_0x58c81a);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x9597d,_0x43bad7){_0x43bad7||(_0x43bad7=_0x9597d['view']);const _0x96536=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x96536,_0x9597d),this['_annotationToSidebarItemView']['set'](_0x9597d,_0x96536),_0x96536['content']['add'](_0x43bad7),this['listenTo'](_0x9597d['view'],'change:targetRect',(_0x3b2960,_0x38dd7a,_0x9bdb7d)=>{const _0x128d1f=this['_getTargetTop'](_0x9597d,_0x9bdb7d);_0x96536['_targetTop']!=_0x128d1f&&(_0x96536['_targetTop']=_0x128d1f,this['_setItemTop'](_0x96536,_0x128d1f));}),this['listenTo'](_0x96536,'change:top',()=>{this['_recalculate'](_0x96536,'top');}),this['listenTo'](_0x96536,'change:bottom',()=>{this['_recalculate'](_0x96536,'bottom');}),this['_alignToTargetRect'](_0x96536);const _0x139909=this['_getItemBefore'](_0x96536);if(_0x139909)this['_alignAfterItem'](_0x139909,_0x96536)||this['_alignToTargetRect'](_0x96536);else this['_alignToTargetRect'](_0x96536);return this['_updateLastItem'](),this['view']['list']['add'](_0x96536),_0x96536;}['_alignForTopChange'](_0x51555c){if(!_0x51555c['content']['length'])return;const _0x4f4f01=this['_getItemBefore'](_0x51555c);if(!_0x4f4f01)return;const _0x9d2a68=this['_sidebarItemViewToAnnotation']['get'](_0x4f4f01),_0x4094f6=this['_activeAnnotation'];_0x4094f6&&_0x4094f6===_0x9d2a68?this['_alignAfterItem'](_0x4f4f01,_0x51555c):this['_alignBeforeItem'](_0x51555c,_0x4f4f01);}['_alignForBottomChange'](_0x227acb){if(!_0x227acb['content']['length'])return;const _0xc31dcd=this['_getItemAfter'](_0x227acb);if(!_0xc31dcd)return;const _0x3ca949=this['_sidebarItemViewToAnnotation']['get'](_0xc31dcd),_0x2f1d95=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x16f049=this['_activeAnnotation'];_0x16f049&&_0x16f049===_0x3ca949&&_0x2f1d95?(this['_alignBeforeItem'](_0xc31dcd,_0x227acb),this['_alignAfterItem'](_0x227acb,_0xc31dcd)):_0x16f049&&_0x16f049===_0x3ca949?this['_alignBeforeItem'](_0xc31dcd,_0x227acb):this['_alignAfterItem'](_0x227acb,_0xc31dcd);}['_recalculate'](_0x5c7b88,_0x1e26e0){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5917bc,changedProp:_0x16e16a}of this['_recalculateBuffer'])'top'===_0x16e16a?this['_alignForTopChange'](_0x5917bc):this['_alignForBottomChange'](_0x5917bc);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5c7b88,'changedProp':_0x1e26e0});}['getSidebarItemView'](_0x5cd8a0){return this['_annotationToSidebarItemView']['get'](_0x5cd8a0);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2ad366){const _0x514901=this['getSidebarItemView'](_0x2ad366);this['stopListening'](_0x514901),this['stopListening'](_0x2ad366['view']),_0x514901['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2ad366),this['_sidebarItemViewToAnnotation']['delete'](_0x514901);}['_createSidebarView'](){const _0x2b3f1f=new H(this['context']['locale']);return _0x2b3f1f['render'](),this['on']('change:_lastItem',(_0x5e226e,_0xb6d2f4,_0x39a1a9,_0x4d6762)=>{_0x4d6762&&_0x2b3f1f['unbind']('minHeight'),_0x39a1a9?_0x2b3f1f['bind']('minHeight')['to'](_0x39a1a9,'bottom'):_0x2b3f1f['minHeight']=null;}),_0x2b3f1f;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4186b4){const _0x44835d=this['_sidebarItemViewToAnnotation']['get'](_0x4186b4),_0x566ef6=_0x44835d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x44835d)-0x1);return _0x566ef6&&this['getSidebarItemView'](_0x566ef6)||null;}['_getItemAfter'](_0x353e5b){const _0x5d9cc4=this['_sidebarItemViewToAnnotation']['get'](_0x353e5b),_0x3e8853=_0x5d9cc4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5d9cc4)+0x1);return _0x3e8853&&this['getSidebarItemView'](_0x3e8853)||null;}['_alignBeforeItem'](_0x1b2b5c,_0x282681){_0x1b2b5c['updateHeight']();const _0x18136d=G(_0x282681['bottom']+this['_spaceBetweenItems'],_0x1b2b5c['top']);return!!_0x18136d&&(this['_setItemTop'](_0x282681,_0x282681['top']-_0x18136d),!0x0);}['_alignAfterItem'](_0x1a9e1d,_0x4cab15){_0x1a9e1d['updateHeight']();const _0x5a8840=G(_0x1a9e1d['bottom']+this['_spaceBetweenItems'],_0x4cab15['top']);return!!_0x5a8840&&(this['_setItemTop'](_0x4cab15,_0x4cab15['top']+_0x5a8840,!0x1),!0x0);}['_alignToTargetRect'](_0x484d89){const _0xeb9f7e=this['_sidebarItemViewToAnnotation']['get'](_0x484d89);if(!_0xeb9f7e||!_0xeb9f7e['target']||!_0xeb9f7e['targetRect'])return;const _0x280cbe=this['_getTargetTop'](_0xeb9f7e,_0xeb9f7e['targetRect']);this['_setItemTop'](_0x484d89,_0x280cbe);}['_getTargetTop'](_0x42c006,_0x2164be){if(null===_0x2164be)return 0x0;if(_0x42c006['target']instanceof _0x1d4450)return _0x2164be['top'];{const _0x4b3e89=new _0x1d4450(this['view']['element'])['top'];return _0x2164be['top']-_0x4b3e89;}}['_setItemTop'](_0x54beb4,_0x483c9e,_0x18987b=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x18987b&&(_0x483c9e=Math['max'](_0x483c9e,this['_getMaxAvailableTop'](_0x54beb4))),_0x54beb4['top']=_0x483c9e;}['_getMaxAvailableTop'](_0x2cc788){let _0x22360b=this['_getItemBefore'](_0x2cc788),_0x2cfd2c=0x0;for(;_0x22360b;)_0x22360b['updateHeight'](),_0x2cfd2c+=this['_spaceBetweenItems']+_0x22360b['height'],_0x22360b=this['_getItemBefore'](_0x22360b);return _0x2cfd2c;}}function G(_0x4d1568,_0x40273d){return Math['max'](_0x4d1568-_0x40273d,0x0);}function g(_0x5f1891){return null!==_0x5f1891&&'object'==typeof _0x5f1891&&0x1===_0x5f1891['nodeType'];}class e extends _0x2cf45d{['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(_0x377985){super(_0x377985),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1e2837(),this['_refreshPositioningDebounced']=_0xacb6a5(()=>{_0x377985['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3658ea=this['context']['plugins']['get'](j),_0x5b3b8d=this['context']['plugins']['get'](z);_0x3658ea['register']('wideSidebar',this),_0x5b3b8d['container']&&_0x3658ea['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x265596){if(_0x265596===this['activeAnnotation'])return;const _0xcd3cdd=this['context']['plugins']['get'](z);_0xcd3cdd['_activeAnnotation']=_0x265596;const _0x500f8f=this['activeAnnotation'];_0xcd3cdd['refresh']({'blurredAnnotation':_0x500f8f,'activatedAnnotation':_0x265596}),this['activeAnnotation']=_0x265596;}['attach'](_0x236f54){this['annotations']=_0x236f54;const _0x5d6fc1=this['context']['plugins']['get'](z);if(_0x5d6fc1['_annotations']=_0x236f54,this['isAttached'])throw new _0x354fbc('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5d6fc1,'set:container',()=>{this['detach'](),this['listenTo'](_0x5d6fc1,'change:container',_0x48eaf3=>{_0x48eaf3['off'](),this['attach'](_0x236f54);});}),_0x5d6fc1['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0xd78663=_0x2c2f6f=>{_0x2c2f6f['updateTargetRect'](),_0x5d6fc1['addAnnotation'](_0x2c2f6f);};for(const _0x3dd206 of _0x236f54)_0xd78663(_0x3dd206);this['listenTo'](_0x236f54,'add',(_0x5d7a10,_0x557ba6)=>{_0xd78663(_0x557ba6);}),this['listenTo'](_0x236f54,'remove',(_0x39dc3a,_0x195c17,_0x472d8f)=>{_0x5d6fc1['rearrange']({'removedAnnotation':_0x195c17,'previousAnnotation':_0x236f54['get'](_0x472d8f-0x1),'nextAnnotation':_0x236f54['get'](_0x472d8f+0x1)}),_0x195c17===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x236f54,'focus',(_0x9e8fdd,_0x48a13a)=>{this['setActiveAnnotation'](_0x48a13a);}),this['listenTo'](_0x236f54,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1382d4=this['context']instanceof _0x2d2228?this['context']['editors']:new _0x1e2837([this['context']]);for(const _0x442e91 of _0x1382d4)this['_integrateWithEditorAnnotations'](_0x442e91);this['listenTo'](_0x1382d4,'add',(_0x3e3d2c,_0x346d47)=>{this['listenTo'](_0x346d47,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x346d47);});}),this['listenTo'](_0x1382d4,'remove',(_0x18f1c4,_0x32bcb9)=>{_0x32bcb9['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x32bcb9['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x354fbc('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5030cd=this['context']['plugins']['get'](z);_0x5030cd['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5030cd),this['stopListening'](this['annotations']),this['context']instanceof _0x2d2228&&this['stopListening'](this['context']['editors']);for(const _0xcac872 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0xcac872);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x35fa8c){if(!_0x35fa8c['plugins']['has']('EditorAnnotations'))return;const _0x2f2284=_0x35fa8c['plugins']['get']('EditorAnnotations'),_0x3548db=()=>{const _0x35abe8=_0x2f2284['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x35abe8[0x0]||null);};this['listenTo'](_0x2f2284,'refresh',_0x3548db),this['listenTo'](_0x2f2284,'blur',(_0x57d32f,{isAnnotationTracked:_0x2b2177})=>{this['activeAnnotation']&&_0x2b2177(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2f2284,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x33496d=>{_0x2f2284['hasDomSelection']()&&(_0x3548db(),_0x33496d['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2f2284);}['_destroyEditorAnnotationsIntegration'](_0x485211){this['stopListening'](_0x485211),this['_editorAnnotations']['remove'](_0x485211);}}class C extends _0x175706{['counterView'];constructor(_0x1845aa){super(_0x1845aa);const _0x112ef3=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x81ca4a,_0x48ad2a)=>_0x81ca4a?'...':_0x48ad2a['toString']()),this['set']('annotationType',''),this['icon']=_0x5caa89,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x112ef3['to']('annotationType',_0x2b13b7=>'ck-annotation-counter__badge--'+_0x2b13b7),_0x112ef3['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x112ef3['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2cf45d{['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(_0x2215e0){super(_0x2215e0),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x378623())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1e2837(),this['_refreshPositioningDebounced']=_0xacb6a5(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x191c5b(this['context']['locale']),this['balloonPanelView']=new _0x82f7f5(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3dba79){this['annotations']=_0x3dba79;const _0x2055cd=this['context']['plugins']['get'](z),_0x5d0892=this['balloonPanelView'];if(_0x2055cd['_annotations']=_0x3dba79,this['isAttached'])throw new _0x354fbc('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2055cd,'set:container',()=>{this['detach'](),this['listenTo'](_0x2055cd,'change:container',_0x476a16=>{_0x476a16['off'](),this['attach'](_0x3dba79);});}),_0x2055cd['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x5318d3=_0x1b5e39=>{const _0x5301e6=new C(this['context']['locale']);_0x2055cd['addAnnotation'](_0x1b5e39,_0x5301e6),this['_annotationToNarrowView']['set'](_0x1b5e39,_0x5301e6),_0x5301e6['bind']('isDirty','annotationType','number')['to'](_0x1b5e39['view'],'isDirty','type','length'),_0x5301e6['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5d0892['content']['first']!==_0x1b5e39['view']?(this['_showBalloon'](_0x1b5e39),_0x1b5e39['view']['element']['focus'](),this['setActiveAnnotation'](_0x1b5e39)):this['setActiveAnnotation'](null);});};for(const _0x4078a3 of _0x3dba79)_0x5318d3(_0x4078a3);this['listenTo'](_0x3dba79,'add',(_0xaa25d0,_0x5d9cf2)=>{_0x5318d3(_0x5d9cf2);}),this['listenTo'](_0x3dba79,'remove',(_0x379d55,_0x24d102,_0x518843)=>{this['_annotationToNarrowView']['get'](_0x24d102)['destroy'](),this['_annotationToNarrowView']['delete'](_0x24d102),_0x2055cd['rearrange']({'removedAnnotation':_0x24d102,'previousAnnotation':_0x3dba79['get'](_0x518843-0x1),'nextAnnotation':_0x3dba79['get'](_0x518843+0x1)}),_0x24d102===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3dba79,'focus',(_0x31da58,_0x51426f)=>{this['setActiveAnnotation'](_0x51426f);}),this['listenTo'](_0x3dba79,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x35762a,_0x57d6c2)=>{_0x57d6c2['keyCode']===_0x3c9634['esc']&&_0x5d0892['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5d0892['content']['first']),this['_hideBalloon'](),_0x57d6c2['stopPropagation'](),_0x57d6c2['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x24d2d7,_0x11af76)=>{const _0x3ef553=_0x11af76['target'];_0x5d0892['isVisible']&&_0x5d0892['element']['contains'](_0x3ef553)||_0x2055cd['view']['element']['contains'](_0x3ef553)||_0x24d2d7['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x66c327=>_0x66c327['contains'](_0x3ef553))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x24e1f5=this['context']instanceof _0x2d2228?this['context']['editors']:new _0x1e2837([this['context']]);for(const _0x5b853a of _0x24e1f5)this['_integrateWithEditorAnnotations'](_0x5b853a);this['listenTo'](_0x24e1f5,'add',(_0x307e7c,_0x32b1c1)=>{this['listenTo'](_0x32b1c1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x32b1c1);});}),this['listenTo'](_0x24e1f5,'remove',(_0x1148bc,_0x4438d1)=>{_0x4438d1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4438d1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x305ef8){if(_0x305ef8===this['activeAnnotation'])return;const _0x40049f=this['context']['plugins']['get'](z);if(_0x40049f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x305ef8,'disableAnimationOnActivatedAnnotation':!0x0}),_0x305ef8)_0x40049f['getSidebarItemView'](_0x305ef8)?this['_showBalloon'](_0x305ef8):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x305ef8;}['detach'](){if(!this['isAttached'])throw new _0x354fbc('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2d2ec5=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2b33d5=>_0x2b33d5['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2d2ec5['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2d2228&&this['stopListening'](this['context']['editors']);for(const _0x27b0a2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x27b0a2);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'](_0x4f27ff){if(!_0x4f27ff['plugins']['has']('EditorAnnotations'))return;const _0x1e78f4=_0x4f27ff['plugins']['get']('EditorAnnotations'),_0x1f1cc3=this['context']['plugins']['get'](z),_0x18b9f1=this['annotations'],_0xf33a75=this['balloonPanelView'],_0x2b87fa=()=>{const _0x401df1=_0x1e78f4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x401df1),this['setActiveAnnotation'](_0x401df1[0x0]||null);};this['listenTo'](_0x1e78f4,'refresh',_0x2b87fa),this['listenTo'](_0x1e78f4,'blur',(_0x18d4a1,{isAnnotationTracked:_0x213507})=>{this['activeAnnotation']&&_0x213507(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1e78f4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x18b9f1,'blur',_0x24c69f=>{_0x1e78f4['hasDomSelection']()&&_0x24c69f['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5bfb62,_0x5e1b3e)=>{const _0x15c32d=_0x5e1b3e['target'];_0xf33a75['isVisible']&&_0xf33a75['element']['contains'](_0x15c32d)||_0x1f1cc3['view']['element']['contains'](_0x15c32d)||this['activeAnnotation']&&_0x1e78f4['hasDomSelection']()&&(_0x2b87fa(),_0x5bfb62['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1e78f4);}['_destroyEditorAnnotationsIntegration'](_0x313661){_0x313661&&(this['stopListening'](_0x313661),this['_editorAnnotations']['remove'](_0x313661));}['_setSelectedAnnotations'](_0x33268f){for(const _0x3fe776 of this['_selectedAnnotations'])_0x33268f['includes'](_0x3fe776)||this['_manuallyClosedAnnotationViews']['delete'](_0x3fe776['view']);this['_selectedAnnotations']=_0x33268f;}['_refreshPositioning'](){const _0x442a58=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x442a58['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1e236c){if(this['_manuallyClosedAnnotationViews']['has'](_0x1e236c['view']))return;const _0x7aa3c2=this['balloonPanelView']['content']['first'];_0x7aa3c2!==_0x1e236c['view']?(_0x7aa3c2&&this['_detachListeners'](_0x7aa3c2),this['_attachListeners'](_0x1e236c['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1e236c['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x3b1eb7=this['balloonPanelView']['content']['first'],_0x4030ec=_0x3b1eb7&&this['annotations']['getByView'](_0x3b1eb7);if(!_0x4030ec||!this['_annotationToNarrowView']['has'](_0x4030ec))return;const _0x192530=this['_annotationToNarrowView']['get'](_0x4030ec)['element'],_0x144640=(function(){const _0x95d16c=_0x82f7f5['defaultPositions'];return[_0x95d16c['southArrowNorthEast'],_0x95d16c['northArrowSouthEast'],_0x95d16c['southArrowNorth'],_0x95d16c['northArrowSouth'],_0x95d16c['southArrowNorthWest'],_0x95d16c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x192530,'positions':_0x144640});}['_hideBalloon'](){const _0x281779=this['balloonPanelView'],_0x448c8d=_0x281779['content']['first'];_0x448c8d&&(this['_detachListeners'](_0x448c8d),_0x281779['unpin'](),_0x281779['content']['clear']());}['_attachListeners'](_0x3aee8a){this['listenTo'](_0x3aee8a,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3aee8a,'Esc',(_0x1a07e3,_0x1cd346)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3aee8a),this['_hideBalloon'](),_0x1cd346();});}['_detachListeners'](_0x12b05c){this['stopListening'](_0x12b05c);}}class c extends _0x25d649{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x4e9b7e,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xadf0ac){super(_0xadf0ac),_0xadf0ac['editing']['view']['addObserver'](_0x4955d5),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0xadf0ac['plugins']['get'](_0x4e9b7e),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0xacb6a5(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x2355a5=this['editor']['plugins']['get'](j);_0x2355a5['context']===this['editor']&&(_0x2355a5['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x587f8d,_0x55ac2d)=>{const _0x2dd53a=this['_balloon'];if(this['isAttached']&&_0x2dd53a['visibleView']){const _0x2bc443=this['annotations']['getByView'](_0x2dd53a['visibleView']);_0x2bc443&&this['_closeAnnotation'](_0x2bc443),_0x55ac2d();}}));}['afterInit'](){const _0xbb8012=this['editor']['plugins']['get'](j);_0xbb8012['context']===this['editor']&&(_0xbb8012['hasActive']()||_0xbb8012['switchTo']('inline'));}['setActiveAnnotation'](_0x1412fc){_0x1412fc!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x1412fc&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x1412fc)&&this['_addAnnotationToBalloon'](_0x1412fc,!0x0),_0x1412fc['isActive']=!0x0),_0x1412fc||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x1412fc);}['attach'](_0x5554eb){this['annotations']=_0x5554eb;const _0x2be007=this['editor']['plugins']['get'](j),_0x8c9e60=this['_balloon'];if(this['isAttached'])throw new _0x354fbc('inlineannotations-attach-already-attached',this);if(_0x2be007['context']!==this['editor'])throw new _0x354fbc('inlineannotations-not-allowed-with-context',this);const _0x3a2fa6=this['editor']['plugins']['get'](b);this['listenTo'](_0x3a2fa6,'refresh',()=>{const _0xf7d478=_0x3a2fa6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1f84ae,_0x14dc76;!this['_forceRefresh']&&(_0x1f84ae=_0xf7d478,_0x14dc76=this['_selectedAnnotations'],_0x1f84ae['length']===_0x14dc76['length']&&_0x1f84ae['every'](_0x1b0bd7=>_0x14dc76['includes'](_0x1b0bd7)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xf7d478),this['setActiveAnnotation'](_0xf7d478[0x0]||null));}),this['listenTo'](_0x3a2fa6,'blur',(_0x33170a,{isAnnotationTracked:_0x182b6f})=>{this['activeAnnotation']&&_0x182b6f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3a2fa6,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x390d1c,_0x568939,_0x2449d7)=>{_0x2449d7||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5554eb,'remove',(_0x3342d2,_0x3521c1)=>{this['_removeAnnotationFromBalloon'](_0x3521c1),_0x3521c1===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x8c9e60,'change:visibleView',(_0x27b3a3,_0x190ba1,_0x6afbc5,_0xfabfdb)=>{_0xfabfdb&&this['stopListening'](_0xfabfdb);const _0x18f9fb=_0x5554eb['getByView'](_0x6afbc5);_0x6afbc5&&_0x18f9fb&&(this['listenTo'](_0x6afbc5,'change:height',()=>{_0x8c9e60['updatePosition']();}),this['listenTo'](_0x6afbc5,'Esc',()=>{this['_closeAnnotation'](_0x18f9fb),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x18f9fb&&this['setActiveAnnotation'](_0x18f9fb));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x8c9e60['visibleView']&&(_0x5554eb['getByView'](_0x8c9e60['visibleView'])&&_0x8c9e60['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 _0x354fbc('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x143b9a of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x143b9a);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x3085ab){for(const _0x310818 of this['_selectedAnnotations'])_0x3085ab['includes'](_0x310818)||this['_manuallyClosed']['delete'](_0x310818);for(const _0x543b26 of this['annotations'])_0x3085ab['includes'](_0x543b26)||this['_removeAnnotationFromBalloon'](_0x543b26);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0xf74152 of _0x3085ab)this['_addAnnotationToBalloon'](_0xf74152);}this['_selectedAnnotations']=_0x3085ab;}['_addAnnotationToBalloon'](_0x4bd98e,_0x35c00=!0x1){this['_manuallyClosed']['has'](_0x4bd98e)||(this['_addedAnnotations']['has'](_0x4bd98e)||this['_balloon']['hasView'](_0x4bd98e['view'])||(this['_addedAnnotations']['add'](_0x4bd98e),this['_balloon']['add']({'stackId':_0x4bd98e['view']['id'],'view':_0x4bd98e['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4bd98e)}})),_0x35c00&&this['_balloon']['showStack'](_0x4bd98e['view']['id']));}['_getBalloonTargetForAnnotation'](_0xbf2ae9){const _0x266b78=_0xbf2ae9['target'],_0x3737a3=this['editor']['editing']['view'],_0x14671b=_0x3737a3['document']['selection']['getFirstRange'](),_0x367020=_0x3737a3['domConverter']['viewRangeToDom'](_0x14671b);if(_0x367020['collapse'](!0x0),_0x266b78){if(_0x266b78 instanceof _0x1d4450)return _0x266b78;let _0x2163dc=[];for(const _0x78e727 of _0x266b78)_0x2163dc['push'](...F(_0x78e727['getClientRects']()));_0x2163dc=function(_0x1760e5){const _0x1134e6=[];let _0x24ccad=_0x1760e5[0x0];for(let _0xba72de=0x1;_0xba72de<_0x1760e5['length'];_0xba72de++)P(_0x24ccad,_0x1760e5[_0xba72de])?_0x24ccad['width']+=_0x1760e5[_0xba72de]['width']:(_0x1134e6['push'](_0x24ccad),_0x24ccad=_0x1760e5[_0xba72de]);return _0x1134e6['push'](_0x24ccad),_0x1134e6;}(_0x2163dc);const _0x86a797=_0x367020['getBoundingClientRect']();return _0x2163dc['find'](_0xc38710=>_0xc38710['top']<=_0x86a797['top']&&_0xc38710['bottom']>=_0x86a797['bottom']&&_0xc38710['left']<=_0x86a797['left']&&_0xc38710['right']>=_0x86a797['right'])||_0x2163dc[0x0];}return _0xbf2ae9['targetRect']||_0x367020;}['_removeAnnotationFromBalloon'](_0x4abc5a){this['_addedAnnotations']['has'](_0x4abc5a)&&this['_balloon']['hasView'](_0x4abc5a['view'])&&(this['_addedAnnotations']['delete'](_0x4abc5a),this['_balloon']['remove'](_0x4abc5a['view']));}['_closeAnnotation'](_0x5e6133){this['_manuallyClosed']['add'](_0x5e6133),this['_removeAnnotationFromBalloon'](_0x5e6133);}}function F(_0x2dd64a){return Array['from'](_0x2dd64a)['map'](DOMRect['fromRect']);}function P(_0x14376f,_0x39b791){return _0x14376f['top']===_0x39b791['top']&&_0x14376f['bottom']===_0x39b791['bottom']&&_0x14376f['right']===_0x39b791['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1b0114,_0x522edd){super(_0x1b0114),this['set']('isEmpty',!_0x522edd['length']),this['focusTracker']=new _0x19bf9d(),this['_annotationViews']=_0x522edd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x34c114({'focusables':_0x522edd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x522edd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x522edd,'remove',(_0xf685d4,_0x286a10)=>{_0x286a10['isActive']&&this['focus'](),_0x522edd['length']||(this['isEmpty']=!0x0);});const _0x5a4a34=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1b0114,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x522edd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5a4a34['if']('isEmpty','ck-hidden',_0x4d26a1=>!_0x4d26a1)]},'children':[{'text':N(_0x1b0114,'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 _0x1d6daf of this['_annotationViews'])this['focusTracker']['add'](_0x1d6daf['element']);this['_annotationViews']['on']('change',(_0x1714d1,{added:_0x323960,removed:_0x499f20})=>{for(const _0x96ccd3 of _0x323960)this['focusTracker']['add'](_0x96ccd3['element']);for(const _0x411e8b of _0x499f20)this['focusTracker']['remove'](_0x411e8b['element']);});}}class p extends _0x2cf45d{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0xebbd2e){super(_0xebbd2e),this['archivedThreads']=new _0x1e2837();}['init'](){const _0x3e9acb=this['context'],_0x2ed24e=_0x3e9acb['plugins']['get'](o),_0x7fbcaa=_0x3e9acb['plugins']['get'](y);this['listenTo'](_0x2ed24e,'addCommentThread',(_0x17dcc7,{threadId:_0x1123ef})=>{const _0x1d3b31=_0x2ed24e['getCommentThread'](_0x1123ef);_0x1d3b31['archivedAt']&&this['archivedThreads']['add'](_0x1d3b31,this['_calculatePosition'](_0x1d3b31['archivedAt'])),this['listenTo'](_0x1d3b31,'change:archivedAt',(_0x21a688,_0x3ae753,_0x2c3d3b)=>{_0x2c3d3b?this['archivedThreads']['has'](_0x1d3b31)||this['archivedThreads']['add'](_0x1d3b31,this['_calculatePosition'](_0x1d3b31['archivedAt'])):this['archivedThreads']['has'](_0x1d3b31)&&this['archivedThreads']['remove'](_0x1d3b31);});}),this['listenTo'](_0x2ed24e,'removeCommentThread',(_0x4a1101,{threadId:_0x26bf60})=>{const _0x285af4=_0x2ed24e['getCommentThread'](_0x26bf60);this['stopListening'](_0x285af4),this['archivedThreads']['has'](_0x285af4)&&this['archivedThreads']['remove'](_0x285af4);},{'priority':'highest'}),this['listenTo'](_0x7fbcaa['collection'],'focus',(_0x553bba,_0x1a58bd)=>{_0x1a58bd['isVisible']||(_0x1a58bd['isActive']=!0x0,_0x7fbcaa['activate'](_0x1a58bd));});}['_calculatePosition'](_0x25e2a0){const _0x2b4d9b=[...this['archivedThreads']]['findIndex'](_0x3f3e9d=>_0x3f3e9d['archivedAt']<_0x25e2a0);return _0x2b4d9b>-0x1?_0x2b4d9b:this['archivedThreads']['length'];}}class a extends _0x25d649{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0xf97b9c];}constructor(_0x10ff17){super(_0x10ff17),this['annotationViews']=new _0x47c617(),this['_pendingThreads']=[];}['init'](){const _0x248680=this['editor'],_0x185179=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x248680['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x175706,!0x0)),_0x248680['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3f1bee=this['_createCommentsArchiveButton'](_0x22f4b8);return _0x3f1bee['set']({'role':'menuitemcheckbox'}),_0x3f1bee;});const _0x220d3d=_0x248680['plugins']['get'](p),_0x288011=_0x248680['plugins']['get']('Annotations'),_0x11a25e=_0x248680['plugins']['get']('CommentsRepository');_0x220d3d['archivedThreads']['forEach'](_0x52332d=>{this['_handleNewThread'](_0x52332d);}),this['listenTo'](_0x220d3d['archivedThreads'],'add',(_0x5d43c5,_0x1b50af)=>{this['_handleNewThread'](_0x1b50af);}),this['listenTo'](_0x288011['collection'],'add',(_0x599dc8,_0x461d26)=>{const _0x3ad03d=this['_pendingThreads']['find'](_0x4ed774=>{const _0x36be04=_0x11a25e['_threadToController']['get'](_0x4ed774);return _0x36be04&&_0x461d26['innerView']===_0x36be04['view'];});if(_0x3ad03d){const _0x115370=this['_calculatePosition'](_0x3ad03d['archivedAt']);this['_addAnnotationToArchive'](_0x461d26,_0x115370),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3ad03d),0x1);}}),this['listenTo'](_0x220d3d['archivedThreads'],'remove',(_0x4e7c3b,_0x24d211)=>{const _0x13272b=_0x248680['config']['get']('collaboration.channelId');if(!_0x13272b||_0x24d211['channelId']===_0x13272b){if(this['_pendingThreads']['includes'](_0x24d211))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x24d211),0x1);else{const _0x521ae7=_0x11a25e['_threadToController']['get'](_0x24d211),_0x8f55a3=_0x288011['getByInnerView'](_0x521ae7['view']);this['annotationViews']['remove'](_0x8f55a3['view']),this['stopListening'](_0x8f55a3),this['stopListening'](_0x8f55a3['focusableElements']);}}}),this['listenTo'](_0x288011['collection'],'add',(_0x499d4c,_0x28a3eb)=>{this['listenTo'](_0x28a3eb,'escape',_0x185179);}),this['listenTo'](_0x288011['collection'],'remove',(_0x14043b,_0x26cbd4)=>{this['stopListening'](_0x26cbd4,'escape',_0x185179);});}['_addAnnotationToArchive'](_0x3871ae,_0x443c59){this['listenTo'](_0x3871ae,'set:isVisible',_0x1f556a=>{_0x1f556a['return']=!0x1,_0x1f556a['stop']();}),this['annotationViews']['add'](_0x3871ae['view'],_0x443c59);}['_handleNewThread'](_0x353c09){const _0x2b8d40=this['editor']['plugins']['get']('CommentsRepository'),_0xc40bc3=this['editor']['plugins']['get']('Annotations'),_0x4408a2=this['editor']['config']['get']('collaboration.channelId');if(!_0x4408a2||_0x353c09['channelId']===_0x4408a2){const _0x15e63f=_0x2b8d40['_threadToController']['get'](_0x353c09);if(!_0x15e63f)return void this['_pendingThreads']['push'](_0x353c09);const _0xd20168=this['_calculatePosition'](_0x353c09['archivedAt']),_0x25066d=_0xc40bc3['getByInnerView'](_0x15e63f['view']);_0x25066d['isVisible']&&_0xc40bc3['_visibleAnnotations']['remove'](_0x25066d),this['_addAnnotationToArchive'](_0x25066d,_0xd20168);}}['_calculatePosition'](_0x3342e1){const _0x498504=this['editor']['config']['get']('collaboration.channelId'),_0x1e4086=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x53ac6d=>_0x53ac6d['channelId']===_0x498504)['findIndex'](_0x535bf1=>_0x535bf1['archivedAt']<_0x3342e1);return _0x1e4086<0x0||_0x1e4086>this['annotationViews']['length']?this['annotationViews']['length']:_0x1e4086-0x1;}['_toggleDialog'](){const _0x297dbd=this['editor'],_0x12ed2d=_0x297dbd['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x297dbd['locale'],this['annotationViews'])),'commentsArchive'===_0x12ed2d['id']?_0x12ed2d['hide']():_0x12ed2d['show']({'id':'commentsArchive','title':N(_0x297dbd['locale'],'COMMENTS_ARCHIVE'),'icon':_0x969c68,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1d88d4['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x135010,_0x3ae8d9=!0x1){const _0x2c65b7=this['editor']['locale'],_0xd2a82a=this['editor']['plugins']['get']('Dialog'),_0x530041=new _0x135010(_0x2c65b7);return _0x530041['bind']('isEnabled')['to'](this,'isEnabled'),_0x530041['bind']('isOn')['to'](_0xd2a82a,'id',_0x4fd4ad=>'commentsArchive'===_0x4fd4ad),_0x530041['set']({'label':N(_0x2c65b7,'COMMENTS_ARCHIVE'),'icon':_0x969c68,'isToggleable':!0x0}),_0x3ae8d9&&(_0x530041['tooltip']=!0x0),this['listenTo'](_0x530041,'execute',()=>this['_toggleDialog']()),_0x530041;}['_hideDialogOnAnnotationEscape']=_0x4d7019=>{const _0x2062d7=_0x4d7019['source'];if(!this['annotationViews']['has'](_0x2062d7['view']))return;const _0x621557=this['editor']['plugins']['get']('Dialog');_0x621557['isOpen']&&'commentsArchive'===_0x621557['id']&&(_0x621557['hide'](),_0x4d7019['stop']());};}class gi extends _0x25d649{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};
|