@ckeditor/ckeditor5-comments 45.1.0-alpha.7 → 45.2.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 +9 -9
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x5e6a04={}){function _0x26d43e(_0x4855a5){return _0x4855a5['map'](_0x23524b=>String['fromCharCode'](_0x23524b))['join']('');}(_0x5e6a04=Object['assign']({},_0x5e6a04))['plugins']||(_0x5e6a04['plugins']=Qt['defaultPlugins']),super(_0x5e6a04),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x26d43e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x26d43e([0x76,0x69,0x65,0x77])][_0x26d43e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x26d43e([0x61,0x75,0x74,0x6f]),this[_0x26d43e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x26d43e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x26d43e([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x26d43e([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x26d43e([0x6f,0x6b])});}['create'](){const _0x20d346=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x20d346))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x44c7e0=>{const _0x2dab30=this['model']['document']['getRoot'](),_0x4f0075=_0x2dab30&&_0x2dab30['getChild'](_0x2dab30['childCount']-0x1);_0x44c7e0['setSelection'](_0x4f0075,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x24b7e6=this['editing']['view'],_0x476d88=_0x24b7e6['document']['getRoot'](),_0x2d68ca=_0x476d88['getChild'](0x0);_0x476d88['childCount']>0x1||!_0x2d68ca||'p'!=_0x2d68ca['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x24b7e6,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x2d68ca['placeholder']=this['placeholder']),Ft({'view':_0x24b7e6,'element':_0x2d68ca,'keepOnFocus':!0x0}),this['placeholderElement']=_0x2d68ca);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5262bb,_0x500af3={}){super(_0x5262bb),this['editor']=null,this['_editorConfig']=_0x500af3,this['set']('value',_0x500af3['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x5262bb,'Reply...')),this['set']('submitLabel',E(_0x5262bb,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0xd81594(),this['focusCycler']=new _0x4bc745({'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',(_0x3b1fdf,_0x1487ef)=>{this['cancelButtonView']['fire']('execute'),_0x1487ef();}),this['keystrokes']['set']('Ctrl+Enter',(_0x509405,_0x4dbe96)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4dbe96());}),this['on']('submit',(_0x4531e3,_0x3bfee0)=>{_0x3bfee0['length']>0xfde8?(alert(E(_0x5262bb,'TOO_LONG_COMMENT_ALERT',[_0x3bfee0['length'],0xfde8])),_0x4531e3['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x19ac09=this['editor'];this['element']['insertBefore'](_0x19ac09['ui']['element'],this['element']['firstChild']),_0x19ac09['model']['document']['on']('change',()=>this['value']=_0x19ac09['getData']()),_0x19ac09['bind']('placeholder')['to'](this),this['focusables']['add'](_0x19ac09['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xf71112){-0x1===_0xf71112?(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:_0x355b13}=this,_0x497cd6=new _0x5e3054(_0x355b13);return _0x497cd6['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x497cd6['withText']=!0x0,_0x497cd6['bind']('label')['to'](this,'submitLabel'),_0x497cd6['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x497cd6['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4794b3,_0x1c234e)=>!_0x1c234e&&!!_0x4794b3['trim']()),_0x497cd6;}['_createCancelButton'](){const {locale:_0x25fb03}=this,_0x3a7125=new _0x5e3054(_0x25fb03);return _0x3a7125['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3a7125['label']=E(_0x25fb03,'Cancel'),_0x3a7125['withText']=!0x0,_0x3a7125['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3a7125;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2250da=>{this['focusTracker']['add'](_0x2250da['element']);}),this['focusables']['on']('change',(_0x17a581,_0xa3cfd7)=>{for(const _0x1fbe38 of Array['from'](_0xa3cfd7['added'])['reverse']())this['focusTracker']['add'](_0x1fbe38['element']);});}}class ie extends kt{constructor(_0x49d3c2,_0x46391e,_0x3ec84d){super(_0x49d3c2),this['commentInputView']=new os(_0x49d3c2,_0x3ec84d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2c2bdc,_0xf264b8)=>_0x2c2bdc||!!_0xf264b8),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 _0x29a76b(_0x49d3c2,_0x46391e),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'](_0x160334){this['commentInputView']['focus'](_0x160334);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x30618a,_0x40cfc6)=>{const {submitButtonView:_0x34f695,cancelButtonView:_0x59f096,editor:_0x1a782f}=this['commentInputView'];[_0x34f695['element'],_0x59f096['element'],_0x1a782f?_0x1a782f['editing']['view']['getDomRoot']():null]['filter'](_0x1f5e0=>_0x1f5e0)['some'](_0x28d21f=>_0x28d21f['contains'](_0x40cfc6['target']))||(this['focus'](),_0x40cfc6['preventDefault']());});}}class cs extends kt{constructor(_0x5a6760){super(_0x5a6760);const _0x2663a6=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2663a6['to']('count',_0x37869d=>E(_0x5a6760,'NUMBER_OF_COMMENTS',_0x37869d))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x53258e,_0x4e0dba,_0x10c053){super(_0x53258e);const _0x53cf01=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4e0dba['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4e0dba,this['_config']=_0x10c053,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0xd81594(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4bc745({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e06be=>this['commentViews']['map'](_0x574fd9=>_0x574fd9['element'])['includes'](_0x3e06be['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x53258e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x392d24=>_0x392d24-this['_config']['maxCommentsWhenCollapsed']);for(const _0x29a799 of _0x4e0dba['comments'])this['_handleNewCommentModel'](_0x29a799);this['_handleInfoComment'](),this['listenTo'](_0x4e0dba['comments'],'add',(_0x4e095c,_0xbf3ec4)=>{const _0x2dea76=this['_calculatePosition'](_0xbf3ec4);this['length']++,this['_handleNewCommentModel'](_0xbf3ec4,_0x2dea76),this['refreshVisibleViews']();}),this['listenTo'](_0x4e0dba['comments'],'remove',(_0x311ae9,_0x137081)=>{this['length']--,this['_handleRemoveCommentModel'](_0x137081),this['refreshVisibleViews']();}),this['listenTo'](_0x4e0dba,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4e0dba,'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',_0x53cf01['if']('length','ck-hidden',_0x420ada=>!_0x420ada)],'aria-label':E(_0x53258e,'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'](_0x1acaaa){-0x1===_0x1acaaa?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x289552 of this['commentViews'])_0x289552['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x350c8f,_0x47c52b){const _0x3b4d35=new this['_config']['CommentView'](this['locale'],_0x350c8f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3b4d35['viewUid']=_0x350c8f['id'],_0x3b4d35['delegate']('removeComment')['to'](this),_0x3b4d35['delegate']('updateComment')['to'](this),_0x3b4d35['delegate']('resolveCommentThread')['to'](this),_0x3b4d35['delegate']('editorReady')['to'](this),_0x3b4d35['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3b4d35,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3b4d35,_0x47c52b);}['_calculatePosition'](_0x53a831){const _0x1c11db=this['_model']['_findOptimalIndex'](_0x53a831);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x53a831['authoredAt']?_0x1c11db-0x1:_0x1c11db:_0x1c11db-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0xeb63f={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0xeb63f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0xeb63f));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x1e9eee){const _0x3995e9=this['commentViews']['remove'](_0x1e9eee['id']);this['stopListening'](_0x3995e9),_0x3995e9['isEditMode']&&this['_updateHasDirtyComment'](),_0x3995e9['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x21f9ea=>_0x21f9ea['isEditMode']);}['_rearrangeCollapse'](){const _0x1b7b53=function(_0x54fe2f){const _0xfaa565=new _0x11e188();for(const _0x530697 of _0x54fe2f)_0xfaa565['add'](_0x530697);return _0xfaa565;}(this['commentViews']),_0x5dce65=this['_collapsedCommentsView']['count'];for(let _0x4293f8=0x1;_0x4293f8<=_0x5dce65;_0x4293f8++)_0x1b7b53['remove'](0x1);for(const _0x22c56f of _0x1b7b53)_0x22c56f['collapse']();_0x5dce65>0x0&&_0x1b7b53['add'](this['_collapsedCommentsView'],0x1),ns(_0x1bb837(Array['from'](this['visibleViews']),Array['from'](_0x1b7b53)),this['visibleViews'],_0x1b7b53);}['_rearrangeExpand'](){ns(_0x1bb837(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3f7eed of this['visibleViews'])_0x3f7eed['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x4e51d7=>{this['focusTracker']['add'](_0x4e51d7['element']),this['keystrokes']['listenTo'](_0x4e51d7['element']);}),this['commentViews']['on']('change',(_0x29a938,_0x534636)=>{for(const _0x12ba71 of _0x534636['removed'])this['focusTracker']['remove'](_0x12ba71['element']),this['keystrokes']['stopListening'](_0x12ba71['element']);for(const _0x6f2ce4 of Array['from'](_0x534636['added'])['reverse']())this['focusTracker']['add'](_0x6f2ce4['element']),this['keystrokes']['listenTo'](_0x6f2ce4['element']);});}}function ns(_0xfeb40d,_0x411a76,_0x19a726){let _0x9ad63a=0x0;for(const _0x56b6d4 of _0xfeb40d)switch(_0x56b6d4){case'insert':_0x411a76['add'](_0x19a726['get'](_0x9ad63a),_0x9ad63a),_0x9ad63a++;break;case'delete':_0x411a76['remove'](_0x9ad63a);break;case'equal':_0x9ad63a++;}}class as extends kt{constructor(_0x2115e9){super(_0x2115e9);const _0x26dccd=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x26dccd['to']('contextValue',_0x6b971f=>E(_0x2115e9,'THREAD_CONTEXT_LABEL',_0x6b971f)),'tabindex':-0x1},'children':[{'text':_0x26dccd['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x47e0e2,_0x4f141c){super(_0x47e0e2);const _0x381c96=this['bindTemplate'];this['_model']=_0x4f141c,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0xd81594(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4bc745({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x36c30a=>!!_0x36c30a),this['bind']('contextValue')['to'](this['_model'],'context',_0x3a73e3=>_0x3a73e3&&_0x3a73e3['value']?this['_trimContextValue'](_0x3a73e3['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x381c96['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 _0x351e50=new _0x5e3054(this['locale']);return _0x351e50['label']=E(this['locale'],'Reopen'),_0x351e50['tooltip']=E(this['locale'],'Reopen'),_0x351e50['icon']=_0x26ba99,_0x351e50['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x27d8e2=>!_0x27d8e2),_0x351e50['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x25c9b7,_0x187033)=>_0x25c9b7&&_0x187033),_0x351e50['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x351e50;}['_trimContextValue'](_0x127957){if(_0x127957['length']<0x96)return _0x127957;const _0xb3ab1a=_0x127957['lastIndexOf']('\x20',0x93);return _0x127957['substring'](0x0,_0xb3ab1a>-0x1?_0xb3ab1a:0x93)+'...';}['_attachContextActions'](){const _0x4aa95d=this['element']['querySelector']('.ck-context'),_0x4acce0=_0x4aa95d['querySelector']('.ck-context__value');this['listenTo'](_0x4aa95d,'mouseenter',()=>{_0x4acce0['offsetWidth']<_0x4acce0['scrollWidth']&&_0x4aa95d['classList']['add']('overlay');}),this['listenTo'](_0x4aa95d,'mouseleave',()=>{_0x4aa95d['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xc6c1ca of this['focusables'])this['focusTracker']['add'](_0xc6c1ca['element']),this['keystrokes']['listenTo'](_0xc6c1ca['element']);}['_createContextView'](){const _0x3c6f06=new as(this['locale']);return _0x3c6f06['bind']('contextValue')['to'](this),_0x3c6f06;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xedfd90,_0x5e32e2,_0x3d4f00,_0x2c4019){super(_0xedfd90),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5e32e2,this['_localUser']=_0x3d4f00,this['_config']=_0x2c4019,this['commentThreadHeaderView']=new Xt(_0xedfd90,_0x5e32e2),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0xedfd90,E(_0xedfd90,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0xedfd90,_0x5e32e2,Object['assign']({'CommentView':this['_config']['CommentView']},_0x2c4019)),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',(_0x13bbc,_0x2e251f)=>_0x13bbc||!!_0x2e251f),this['bind']('isUnlinked')['to'](_0x5e32e2,'unlinkedAt',_0x22ed92=>!!_0x22ed92),this['bind']('ariaLabel')['to'](this,'length',_0x1a62b8=>{const _0x632321=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x1a62b8,_0x632321]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0xd81594(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4bc745({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3b6332=>_0x3b6332['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 _0x204452=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x32a76b=_0x204452['commentInputView'];return _0x204452['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x32a76b,'value',(_0x235fa5,_0x30a701,_0x5ecc45,_0x1f2142,_0x55459e)=>!!_0x55459e||!!_0x1f2142&&_0x5ecc45&&!_0x30a701||_0x235fa5&&_0x5ecc45&&!_0x30a701),_0x32a76b['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x19fc20,_0xf5ceba,_0x28b4e8)=>{let _0x41dcf1;return _0x41dcf1=_0x28b4e8&&_0xf5ceba?'Reply\x20to\x20reopen\x20discussion...':_0x19fc20?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x41dcf1);}),_0x32a76b['bind']('submitLabel')['to'](this,'length',_0x4c90ed=>E(this['locale'],_0x4c90ed?'Reply':'Comment')),_0x32a76b['on']('submit',(_0x34f12b,_0x36dfa6)=>{this['fire']('addComment',_0x36dfa6),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x32a76b['on']('cancel',()=>{this['focus']();}),_0x32a76b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x32a76b['on']('cancel',_0x464b46=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x464b46['stop']());}),this['on']('change:isActive',(_0x447a1b,_0x3a176b,_0x13c776)=>{_0x13c776||this['length']||_0x32a76b['value']||this['fire']('removeCommentThread');}),_0x204452;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(hs){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x321e78(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x44638f,target:_0x1f3e68,type:_0x4b5aa3,isVisible:_0x2a293d=!0x0}){super(),this['view']=_0x44638f,this['view']['element']||this['view']['render'](),this['_type']=_0x4b5aa3,this['_target']=_0x1f3e68,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x11e188([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x47374f,_0x5e41ad)=>{this['view']['focusTracker']['add'](_0x5e41ad);}),this['focusableElements']['on']('remove',(_0x48514c,_0x4aa530)=>{this['view']['focusTracker']['remove'](_0x4aa530);}),this['set']('isVisible',_0x2a293d);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x18c84e=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x18c84e),_0x18c84e;}get['targetRect'](){const _0x281ee5=this['target'];if(null===_0x281ee5)return null;if(_0x281ee5 instanceof _0x229aaa)return _0x281ee5;const _0x177703=_0x281ee5['filter'](_0x27b4a0=>function(_0x1507d1){const _0x47a87e=_0x1507d1['offsetParent'];if(_0x47a87e)return!0x0;const _0x16f811=_0x1507d1['getClientRects']()['item'](0x0);return!!_0x16f811;}(_0x27b4a0));return 0x0===_0x177703['length']?null:new _0x229aaa(_0x177703[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x488d1c){this['view']['isActive']=_0x488d1c,this['view']['mainView']['isActive']=_0x488d1c;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x44ca1c){if(!(null===_0x44ca1c||_0x44ca1c instanceof _0x229aaa||Array['isArray'](_0x44ca1c)&&_0x44ca1c['every'](_0x538558=>li(_0x538558))))throw new _0x4a9b4a('annotation-invalid-target',null,{'target':_0x44ca1c});}['_getNormalizedTarget'](){const _0x1b5606='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0x1b5606)?[_0x1b5606]:_0x1b5606;}}function li(_0x3eb49a){return null!==_0x3eb49a&&'object'==typeof _0x3eb49a&&'nodeType'in _0x3eb49a&&0x1===_0x3eb49a['nodeType'];}class _ extends _0x11e188{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x50d0a6=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0xd81594(),this['_focusTracker']['on']('change:isFocused',(_0x3bdb6c,_0x538aa6,_0x1e38ad)=>{_0x1e38ad||this['fire']('blur');});for(const _0x219e4a of _0x50d0a6)this['add'](_0x219e4a);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0xf72fb9){if(this['has'](_0xf72fb9))throw new _0x4a9b4a('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0xf72fb9['innerView'],_0xf72fb9),this['_viewToAnnotation']['set'](_0xf72fb9['view'],_0xf72fb9);for(const _0x21589d of _0xf72fb9['focusableElements'])this['_focusTracker']['add'](_0x21589d);this['listenTo'](_0xf72fb9['focusableElements'],'add',(_0x51c15e,_0x5965b2)=>{this['_focusTracker']['add'](_0x5965b2);}),this['listenTo'](_0xf72fb9['focusableElements'],'remove',(_0x5f107a,_0xee4684)=>{this['_focusTracker']['remove'](_0xee4684);}),this['listenTo'](_0xf72fb9['view']['focusTracker'],'change:isFocused',(_0x2a4c15,_0x4b35b2,_0x2f519a)=>{_0x2f519a&&this['fire']('focus',_0xf72fb9);}),_0xf72fb9['updateTargetRect']();const _0x19e992=this['_getOrderInContent'](_0xf72fb9['view']['targetRect']);return super['add'](_0xf72fb9,_0x19e992);}['remove'](_0x571d38){if(!this['has'](_0x571d38))throw new _0x4a9b4a('annotationcollection-not-existing-item',null);this['stopListening'](_0x571d38['view']['focusTracker']),this['stopListening'](_0x571d38['focusableElements']);for(const _0x920d64 of _0x571d38['focusableElements'])this['_focusTracker']['remove'](_0x920d64);return this['_viewToAnnotation']['delete'](_0x571d38['view']),this['_innerViewToAnnotation']['delete'](_0x571d38['innerView']),super['remove'](_0x571d38);}['getByInnerView'](_0x41e1dc){return this['_innerViewToAnnotation']['get'](_0x41e1dc);}['getByView'](_0x4fa3f7){return this['_viewToAnnotation']['get'](_0x4fa3f7);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x992302 of this)_0x992302['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3bda92=Array['from'](this)['sort']((_0x39edb3,_0x32eacc)=>v(_0x39edb3['view']['targetRect'],_0x32eacc['view']['targetRect']));for(let _0x56c609=_0x3bda92['length']-0x1;_0x56c609>0x0;_0x56c609--){const _0x3e66ce=_0x3bda92[_0x56c609];_0x56c609!==this['getIndex'](_0x3e66ce)&&(this['remove'](_0x3e66ce),this['add'](_0x3e66ce));}}['_getOrderInContent'](_0x1b1a98){let _0x15a512=0x0;if(!_0x1b1a98)return this['length'];for(const _0x1407be of this){const _0x14d24e=_0x1407be['view']['targetRect'];if(_0x14d24e){if(v(_0x1b1a98,_0x14d24e)<0x0)return _0x15a512;_0x15a512++;}}return _0x15a512;}}function v(_0x4297d4,_0x51b595){if(null===_0x4297d4&&null===_0x51b595)return 0x0;if(null===_0x4297d4)return-0x1;if(null===_0x51b595)return 0x1;const _0x397762=_0x4297d4['top']-_0x51b595['top'];return 0x0==_0x397762?_0x4297d4['left']-_0x51b595['left']:_0x397762;}class O extends _0x11dfc6{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe6349){if(super(_0xe6349),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xe6349 instanceof _0x240f2b){const _0x7111f8=_0xe6349['locale'];_0xe6349['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x7111f8,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4565e9){this['collection']['add'](_0x4565e9);}['remove'](_0x31bbb3){this['collection']['remove'](_0x31bbb3),_0x31bbb3['destroy']();}['refreshVisibility'](){for(const _0x3b2487 of this['collection'])_0x3b2487['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5c43a9){return this['collection']['getByInnerView'](_0x5c43a9);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xb02062 of this['collection'])_0xb02062['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xe26a76){this['fire']('_activateAnnotation',_0xe26a76);}['createAnnotation'](_0xefb398){return new d(_0xefb398);}['createAnnotationView'](_0x4e8556,_0x1bb5da){return new S(_0x4e8556,_0x1bb5da);}['_addActiveAnnotation'](_0x30ee59){const _0x259438=new Set(this['activeAnnotations']);_0x259438['add'](_0x30ee59),this['activeAnnotations']=_0x259438;}['_removeActiveAnnotation'](_0x14498f){const _0x48e5e9=new Set(this['activeAnnotations']);_0x48e5e9['delete'](_0x14498f),this['activeAnnotations']=_0x48e5e9;}['_bindAnnotationsToVisibleAnnotations'](){const _0x19f0ce=this['collection'],_0x5889a6=this['_visibleAnnotations'];function _0x35c7b5(_0x9062ea){const _0x2ca392=_0x9062ea['source'];_0x2ca392['isVisible']&&!_0x5889a6['has'](_0x2ca392)?_0x5889a6['add'](_0x2ca392):!_0x2ca392['isVisible']&&_0x5889a6['has'](_0x2ca392)&&_0x5889a6['remove'](_0x2ca392),_0x2ca392['view']['focusTracker']['remove'](_0x2ca392['view']['element']),_0x2ca392['view']['focusTracker']['add'](_0x2ca392['view']['element']);}this['listenTo'](_0x19f0ce,'add',(_0x45b4c1,_0x50db76)=>{_0x50db76['isVisible']&&_0x5889a6['add'](_0x50db76),this['listenTo'](_0x50db76,'change:isVisible',_0x35c7b5);}),this['listenTo'](_0x19f0ce,'remove',(_0x1f3417,_0x2f051a)=>{_0x5889a6['has'](_0x2f051a)&&_0x5889a6['remove'](_0x2f051a),this['stopListening'](_0x2f051a,'change:isVisible',_0x35c7b5);});}['_setupEnterAnnotationKeystroke'](){const _0x11f96d=_0x30b270=>{_0x30b270['on']('ready',()=>{_0x30b270['keystrokes']['set'](_0x47dcde,(_0x16520e,_0x452205)=>{const _0x274b57=_0x4224f0(this['activeAnnotations']['values']());_0x274b57&&(_0x274b57['view']['focus'](),_0x452205());});});};this['context']instanceof _0x240f2b?_0x11f96d(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x263451,_0x2800d5)=>{_0x11f96d(_0x2800d5);});}['_setupEscapeAnnotationHandling'](){const _0x12d3e6=_0xc382e5=>{const _0x2ba8f3=_0xc382e5['source'],_0x45f0cc=[];let _0x48f727;if(Array['isArray'](_0x2ba8f3['target'])){_0x48f727=_0x2ba8f3['target'][0x0],this['context']instanceof _0x240f2b?_0x45f0cc['push'](this['context']):this['context']['editors']&&_0x45f0cc['push'](...this['context']['editors']);for(const _0x10bbb1 of _0x45f0cc)for(const _0x2a7f42 of _0x10bbb1['editing']['view']['domRoots']['values']())if(_0x2a7f42['contains'](_0x48f727))return void _0x10bbb1['editing']['view']['focus']();_0x48f727['focus']();}};this['listenTo'](this['collection'],'add',(_0x4e1f30,_0xb4c5c6)=>{this['listenTo'](_0xb4c5c6,'escape',_0x12d3e6,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1a827c,_0x2a7dc0)=>{this['stopListening'](_0x2a7dc0,'escape',_0x12d3e6);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x11dfc6{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x22c319){super(_0x22c319),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x13de72=this['context']['config'];_0x13de72['define']('comments.maxCommentsWhenCollapsed',0x2),_0x13de72['define']('comments.maxThreadTotalWeight',0x1f4),_0x13de72['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x13de72['define']('comments.CommentThreadView',vt),_0x13de72['define']('comments.CommentView',gt),_0x13de72['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x249252=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x384618,_0x5724cf)=>this['_addCommentThread'](_0x5724cf)),this['on']('submitCommentThread',(_0x16c2f5,_0x5ddf68)=>this['_submitCommentThread'](_0x5ddf68)),this['on']('resolveCommentThread',(_0x404c81,_0x17d229)=>this['_resolveCommentThread'](_0x17d229)),this['on']('resolveCommentThread',(_0x1c1ff8,_0x144586)=>this['_updateActiveAnnotation'](_0x144586),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x30643d,_0x5bdb34)=>this['_reopenCommentThread'](_0x5bdb34)),this['on']('reopenCommentThread',(_0x4a9783,_0x1261fc)=>this['_updateActiveAnnotation'](_0x1261fc),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5ec567,_0x355b73)=>this['_removeCommentThread'](_0x355b73)),this['on']('updateCommentThread',(_0x48d1fc,_0x36b57c)=>this['_updateCommentThread'](_0x36b57c)),this['on']('updateCommentThread',(_0x217895,_0x3a76fc)=>this['_updateActiveAnnotation'](_0x3a76fc),{'priority':'lowest'}),this['on']('addComment',(_0x1ff57c,_0x53a594)=>this['_addComment'](_0x53a594)),this['on']('updateComment',(_0x15f059,_0xd637f3)=>this['_updateComment'](_0xd637f3)),this['on']('removeComment',(_0x3f09a7,_0x50565b)=>this['_removeComment'](_0x50565b)),this['on']('addComment',(_0x80c1b2,{threadId:_0x104604,isFromAdapter:_0x504d42})=>{if(_0x504d42)return;const _0x846c4b=this['getCommentThread'](_0x104604),_0x39f5f8=_0x846c4b&&this['_threadToController']['get'](_0x846c4b);_0x39f5f8&&_0x39f5f8['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x249252,'change:activeAnnotations',(_0x3f51a1,_0x18d1b8,_0x14ef11)=>{const _0x50b9c3=Array['from'](_0x14ef11)['map'](_0x176a12=>this['_viewToController']['get'](_0x176a12['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x50b9c3?_0x50b9c3['model']:null;});}set['adapter'](_0x3ea8fb){if(this['_adapter'])throw new _0x4a9b4a('commentsrepository-adapter-already-set');this['_adapter']=_0x3ea8fb;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x14d7fe=Tt,threadId:_0x361e91=_0x1e5d77(),comments:_0x376b98=[],unlinkedAt:_0x1185c9=null,resolvedAt:_0x39f584=null,resolvedBy:_0x40695d=null,target:_0x1bd047=null,context:_0x873007=null,attributes:_0x4d1bfa={},isResolvable:_0x209461=!0x0,isSubmitted:_0x496412=!0x1,isFromAdapter:_0x17a31a=!0x1}={}){return this['fire'](bt('addCommentThread',_0x14d7fe),{'channelId':_0x14d7fe,'threadId':_0x361e91,'comments':_0x376b98,'unlinkedAt':_0x1185c9,'resolvedAt':_0x39f584,'resolvedBy':_0x40695d,'target':_0x1bd047,'context':_0x873007,'attributes':_0x4d1bfa,'isFromAdapter':_0x17a31a,'isResolvable':_0x209461,'isSubmitted':_0x496412}),this['getCommentThread'](_0x361e91);}['openNewCommentThread']({channelId:_0x303a61=Tt,threadId:_0x1777a0=_0x1e5d77(),target:_0xed1421,context:_0x4a7b88=null,isResolvable:_0x1ded7b=!0x0}){if(this['_readOnlyChannels']['has'](_0x303a61)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0xed1421)throw new _0x4a9b4a('commentsrepository-missing-target');const _0x3d8481=this['addCommentThread']({'channelId':_0x303a61,'threadId':_0x1777a0,'target':_0xed1421,'context':_0x4a7b88,'isResolvable':_0x1ded7b});if(!_0x3d8481)return null;const _0x150768=this['_threadToController']['get'](_0x3d8481),_0x452371=_0x150768['view']['commentThreadInputView']['commentInputView'],_0x4eb69e=this['context']['plugins']['get'](O),_0x5e788b=_0x4eb69e['getByInnerView'](_0x150768['view']);return _0x4eb69e['activate'](_0x5e788b),_0x452371['once']('editorReady',()=>_0x452371['focus']()),_0x3d8481;}['hasCommentThread'](_0x337ce5){if('string'!=typeof _0x337ce5)throw new _0x4a9b4a('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x337ce5);}['updateCommentThread']({channelId:_0x37409a=Tt,threadId:_0x2f8738,context:_0x21b982,unlinkedAt:_0x4d2965,attributes:_0x48a180,isFromAdapter:_0x1ed778=!0x1}){return this['fire'](bt('updateCommentThread',_0x37409a),{'channelId':_0x37409a,'threadId':_0x2f8738,'context':_0x21b982,'unlinkedAt':_0x4d2965,'attributes':_0x48a180,'isFromAdapter':_0x1ed778}),this['getCommentThread'](_0x2f8738);}['getCommentThread'](_0x2ae886){if('string'!=typeof _0x2ae886)throw new _0x4a9b4a('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2ae886);}['fetchCommentThread']({channelId:_0xa93ac5,threadId:_0x13e279}={}){const _0x5ada0b=this['getCommentThread'](_0x13e279);if(_0x5ada0b)return Promise['resolve'](_0x5ada0b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x4a9b4a('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0xa93ac5,'threadId':_0x13e279})['then'](_0x23aafa=>this['hasCommentThread'](_0x13e279)?this['getCommentThread'](_0x13e279):_0x23aafa?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0xa93ac5},_0x23aafa)):void 0x0)['catch'](_0x2eaea1=>{throw console['error'](_0x2eaea1),new _0x4a9b4a('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x46bb92,skipNotAttached:_0x363ce7=!0x1,skipEmpty:_0x1608ae=!0x1,toJSON:_0x3193b0=!0x1}={}){const _0x20121f=[];for(const _0x28c46a of this['_threads']['values']())_0x46bb92&&_0x28c46a['channelId']!==_0x46bb92||_0x363ce7&&!_0x28c46a['isAttached']||_0x1608ae&&0x0===_0x28c46a['length']||_0x20121f['push'](_0x28c46a);return _0x3193b0?_0x20121f['map'](_0x4bd535=>_0x4bd535['toJSON']()):_0x20121f;}['setActiveCommentThread'](_0x1069ce){const _0x532754=this['context']['plugins']['get'](O);if(!_0x1069ce)return void(this['activeCommentThread']&&_0x532754['deactivateAll']());const _0x58557f=this['getCommentThread'](_0x1069ce);if(!_0x58557f)throw new _0x4a9b4a('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x1069ce});if(!this['_threadToController']['has'](_0x58557f))throw new _0x4a9b4a('commentsrepository-active-not-attached',null,{'threadId':_0x1069ce});const _0xc0fe29=_0x532754['getByInnerView'](this['_threadToController']['get'](_0x58557f)['view']);_0x532754['activate'](_0xc0fe29);}['switchReadOnly'](_0x1c6412,_0x2ea3ab){_0x1c6412?this['_readOnlyChannels']['add'](_0x2ea3ab):this['_readOnlyChannels']['delete'](_0x2ea3ab),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5ce05f){return this['_readOnlyChannels']['has'](_0x5ce05f)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x58def7,_0x5d29e6){return new Ct(_0x58def7,_0x5d29e6);}['setPermissions'](_0x1c585e,_0x519394=Tt){this['_permissions']['set'](_0x519394,_0x1c585e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x545daa=Tt){return this['_permissions']['has'](_0x545daa)?this['_permissions']['get'](_0x545daa):_t;}['_addCommentThread']({channelId:_0x4b9c6,threadId:_0x21764f,comments:_0x5d8954,unlinkedAt:_0x51d61f,resolvedAt:_0x8ac34b,resolvedBy:_0x85aab8,target:_0xc4ab4c,context:_0x977482,attributes:_0x334d3e,isFromAdapter:_0x410b85,isResolvable:_0x240ec8,isSubmitted:_0x1abd8f}){if('string'!=typeof _0x21764f)throw new _0x4a9b4a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x21764f});if(this['hasCommentThread'](_0x21764f))throw new _0x4a9b4a('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x21764f});const _0x3752dd=new ui(this,{'channelId':_0x4b9c6,'id':_0x21764f,'context':_0x977482,'attributes':_0x334d3e,'unlinkedAt':_0x51d61f,'resolvedAt':_0x8ac34b,'resolvedBy':_0x85aab8?this['context']['plugins']['get'](it)['getUser'](_0x85aab8):null,'isResolvable':_0x240ec8,'isSubmitted':_0x1abd8f||_0x410b85});this['_threads']['set'](_0x21764f,_0x3752dd);for(const _0x16d5a8 of _0x5d8954)_0x3752dd['_add'](this['_createNewComment']({'threadId':_0x21764f,..._0x16d5a8}));return _0xc4ab4c&&_0x3752dd['attachTo'](_0xc4ab4c),_0x410b85||!_0x3752dd['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4b9c6,'threadId':_0x21764f});}['_submitCommentThread']({channelId:_0x123877,threadId:_0x2223f4}){if(!this['hasCommentThread'](_0x2223f4))throw new _0x4a9b4a('commentsrepository-missing-comment-thread',this);const _0x2c86a7=this['getCommentThread'](_0x2223f4);if(_0x2c86a7['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4726bc,comments:_0x3bf7f2,resolvedAt:_0x29a34e,resolvedBy:_0x203f88,context:_0x3867bb,attributes:_0x3aa43f}=_0x2c86a7,_0x11d931=this['context']['plugins']['get']('PendingActions'),_0x1b9d3c=_0x11d931['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x123877,'threadId':_0x4726bc,'comments':_0x3bf7f2['map'](_0x54eaa3=>_0x54eaa3['toJSON']()),'resolvedAt':_0x29a34e,'resolvedBy':_0x203f88?_0x203f88['id']:_0x203f88,'context':_0x3867bb,'attributes':_0x3aa43f})['then'](({comments:_0x3f7d24})=>{_0x11d931['remove'](_0x1b9d3c);for(const _0x117c9a of _0x3f7d24)this['_updateComment']({'channelId':_0x123877,'threadId':_0x2223f4,'commentId':_0x117c9a['commentId'],'createdAt':_0x117c9a['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x205f1c=>{throw console['error'](_0x205f1c),new _0x4a9b4a('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4d23dd,target:_0x52d968}){const _0x170040=this['getCommentThread'](_0x4d23dd);if(!_0x170040)throw new _0x4a9b4a('commentsrepository-attach-missing-comment-thread',this);const _0x42c98b=this['context']['plugins']['get']('PendingActions'),_0x3c5800=this['context']['plugins']['get'](O),_0x54d5e7=this['_createCommentThreadView'](_0x170040),_0x4588f2=new Ct(_0x170040,_0x54d5e7);let _0x2d651a=null;_0x54d5e7['on']('change:isDirty',(_0x594a84,_0x187b42,_0x504685)=>{_0x504685?_0x2d651a=_0x42c98b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2d651a&&(_0x42c98b['remove'](_0x2d651a),_0x2d651a=null);}),this['_threadToController']['set'](_0x170040,_0x4588f2),this['_viewToController']['set'](_0x54d5e7,_0x4588f2);const _0x229e77=new S(this['context']['locale'],_0x54d5e7);_0x229e77['bind']('length')['to'](_0x54d5e7),_0x229e77['bind']('isDirty')['to'](_0x54d5e7,'isDirty',_0x54d5e7,'length',(_0x2cdb7d,_0x174c7e)=>_0x2cdb7d||!_0x174c7e),_0x229e77['bind']('isActive')['to'](_0x54d5e7),_0x229e77['type']='comment';const _0x350e0b=new d({'view':_0x229e77,'target':_0x52d968,'type':'comment','isVisible':!_0x170040['archivedAt']});return _0x54d5e7['on']('escape',()=>{_0x350e0b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x54d5e7,_0x350e0b),_0x3c5800['add'](_0x350e0b),_0x350e0b;}['_bindAnnotationToEditors'](_0x2f02a1,_0x4c4297){this['listenTo'](_0x2f02a1,'editorReady',(_0x4b9383,_0x461937)=>{const _0x4e11f4=_0x461937['ui']['view']['body']['bodyCollectionContainer'];_0x4c4297['focusableElements']['add'](_0x4e11f4),this['context']instanceof _0x240f2b&&this['context']['ui']['focusTracker']['add'](_0x4e11f4);},{'priority':'highest'}),this['listenTo'](_0x2f02a1,'editorDestroyed',(_0x5a6669,_0x3deefc)=>{const _0x1c3b0a=_0x3deefc['ui']['view']['body']['bodyCollectionContainer'];_0x4c4297['focusableElements']['has'](_0x1c3b0a)&&_0x4c4297['focusableElements']['remove'](_0x1c3b0a),this['context']instanceof _0x240f2b&&this['context']['ui']['focusTracker']['remove'](_0x1c3b0a);});}['_unbindEditors'](_0x5828f9){this['stopListening'](_0x5828f9,'editorReady'),this['stopListening'](_0x5828f9,'editorDestroyed');}['_createCommentThreadView'](_0x2236e6){const _0x2c0371=this['context']['plugins']['get'](it),{config:_0x4e1401,locale:_0x338002}=this['context'],_0x37e257=lt(_0x4e1401['get']('locale'),_0x338002);return new(0x0,(_0x4e1401['get']('comments'))['CommentThreadView'])(_0x338002,_0x2236e6,_0x2c0371['me'],{'editorConfig':{..._0x4e1401['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4e1401['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4e1401['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4e1401['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4e1401['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x37e257,'CommentView':_0x4e1401['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x26d294,channelId:_0x2e5fa3,resolvedAt:_0x5a85f0,resolvedBy:_0x1ab2f8,isFromAdapter:_0x18a1c9}){if(!this['hasCommentThread'](_0x26d294))throw new _0x4a9b4a('commentsrepository-missing-comment-thread',null,{'threadId':_0x26d294});const _0x12f44f=this['getCommentThread'](_0x26d294);if(_0x12f44f['isResolved'])throw new _0x4a9b4a('commentsrepository-resolved-comment-thread',null,{'threadId':_0x26d294});const _0x485a67=this['context']['plugins']['get'](it);if(_0x12f44f['resolvedBy']=_0x485a67['getUser'](_0x1ab2f8),_0x12f44f['resolvedAt']=_0x5a85f0,_0x18a1c9||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3a0801=this['context']['plugins']['get']('PendingActions'),_0x22ee48=_0x3a0801['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2e5fa3,'threadId':_0x26d294})['then'](({resolvedAt:_0x2ea480,resolvedBy:_0x3b2c0d})=>{_0x3a0801['remove'](_0x22ee48),_0x12f44f['resolvedBy']['id']!==_0x3b2c0d&&(_0x12f44f['resolvedBy']=_0x485a67['getUser'](_0x3b2c0d)),_0x12f44f['resolvedAt']=_0x2ea480;})['catch'](_0x679b03=>{throw console['error'](_0x679b03),new _0x4a9b4a('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x5d45e3,channelId:_0x1304b4,isFromAdapter:_0x44769e}){if(!this['hasCommentThread'](_0x5d45e3))throw new _0x4a9b4a('commentsrepository-missing-comment-thread',null,{'threadId':_0x5d45e3});const _0x984118=this['getCommentThread'](_0x5d45e3);if(!_0x984118['isResolved'])throw new _0x4a9b4a('commentsrepository-reopen-comment-thread',null,{'threadId':_0x5d45e3});if(_0x984118['resolvedBy']=null,_0x984118['resolvedAt']=null,_0x44769e||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x492e92=this['context']['plugins']['get']('PendingActions'),_0x4763f3=_0x492e92['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1304b4,'threadId':_0x5d45e3})['then'](()=>_0x492e92['remove'](_0x4763f3))['catch'](_0x185a98=>{throw console['error'](_0x185a98),new _0x4a9b4a('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1fdf27,isFromAdapter:_0xd39a9c}){const _0xee5fe1=this['getCommentThread'](_0x1fdf27);if(!_0xee5fe1)throw new _0x4a9b4a('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1fdf27),this['_threads']['delete'](_0x1fdf27),!_0xee5fe1['isSubmitted']||_0xd39a9c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x28a5ca=this['context']['plugins']['get']('PendingActions'),{channelId:_0x8e80f5}=_0xee5fe1,_0x3cfeca=_0x28a5ca['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x8e80f5,'threadId':_0x1fdf27})['then'](()=>_0x28a5ca['remove'](_0x3cfeca))['catch'](_0x2d5862=>{throw console['error'](_0x2d5862),new _0x4a9b4a('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3d7044,unlinkedAt:_0x45adaf,context:_0x244dee,attributes:_0x196594,isFromAdapter:_0x4bcaff}){if('string'!=typeof _0x3d7044)throw new _0x4a9b4a('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3d7044});if(!this['hasCommentThread'](_0x3d7044))throw new _0x4a9b4a('commentsrepository-missing-comment-thread',null,{'threadId':_0x3d7044});const _0x27da4b=this['getCommentThread'](_0x3d7044);let _0x136257=!0x1;if(void 0x0!==_0x244dee&&_0x27da4b['context']!==_0x244dee&&(_0x27da4b['context']=_0x244dee,_0x136257=!0x0),void 0x0!==_0x45adaf&&_0x27da4b['unlinkedAt']!==_0x45adaf&&(_0x27da4b['unlinkedAt']=_0x45adaf,_0x136257=!0x0),_0x196594&&!wt(_0x196594,_0x27da4b['attributes'])&&(_0x27da4b['attributes']=_0x196594,_0x136257=!0x0),!_0x136257)return Promise['resolve']();if(!_0x27da4b['isSubmitted']||_0x4bcaff||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x44ab40=this['context']['plugins']['get']('PendingActions'),{channelId:_0x299326}=_0x27da4b,_0xdc6ce0=_0x44ab40['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x299326,'threadId':_0x3d7044,'context':_0x244dee,'unlinkedAt':_0x45adaf,'attributes':_0x196594})['then'](()=>_0x44ab40['remove'](_0xdc6ce0))['catch'](_0x171300=>{throw console['error'](_0x171300),new _0x4a9b4a('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x53385c){const _0x3ff517=this['context']['plugins']['get'](O),_0x3a1ddd=this['getCommentThread'](_0x53385c);if(_0x3a1ddd['_isAttached']=!0x1,this['_threadToController']['has'](_0x3a1ddd)){const _0xab8c4e=this['_threadToController']['get'](_0x3a1ddd),_0x397aee=_0xab8c4e['view'],_0x1de5ad=_0x3ff517['getByInnerView'](_0x397aee);this['_threadToController']['delete'](_0x3a1ddd),this['_viewToController']['delete'](_0x397aee),_0x1de5ad&&_0x3ff517['remove'](_0x1de5ad),_0xab8c4e['destroy'](),_0x397aee['destroy']()['then'](()=>{this['_unbindEditors'](_0x397aee);});}}['_updateActiveAnnotation']({threadId:_0x469773,resolvedAt:_0x55915b,unlinkedAt:_0x73363e}){const _0x4d3134=!!_0x55915b,_0x5dcc28=this['context']['plugins']['get'](O),_0xe68c91=this['getCommentThread'](_0x469773);if(this['_threadToController']['has'](_0xe68c91)){const _0x1319c3=this['_threadToController']['get'](_0xe68c91)['view'],_0xdd8913=_0x5dcc28['getByInnerView'](_0x1319c3);_0xdd8913&&(_0x4d3134&&_0x5dcc28['_removeActiveAnnotation'](_0xdd8913),_0x73363e?_0xdd8913['isVisible']=!0x1:_0xdd8913['refreshVisibility']());}}['_getExternalAuthor'](_0x5bbcec){const _0x3d4156=this['context']['plugins']['get'](it),_0x5c9e8f=pt('external:'+_0x5bbcec),_0x442ac4=_0x3d4156['getUser'](_0x5c9e8f);return _0x442ac4||_0x3d4156['addUser']({'id':_0x5c9e8f,'name':_0x5bbcec});}['_createNewComment']({threadId:_0x302d42,commentId:_0x5c454e=_0x1e5d77(),content:_0x11fc32,authorId:_0x2cf71e,createdAt:_0x166148,attributes:_0x2b2d37}){if('string'!=typeof _0x5c454e)throw new _0x4a9b4a('commentsrepository-invalid-commentid');if('string'!=typeof _0x2cf71e)throw new _0x4a9b4a('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x11fc32||!_0x11fc32['trim']())throw new _0x4a9b4a('commentsrepository-invalid-comment-content');const _0x5b8691=this['context']['plugins']['get'](it)['getUser'](_0x2cf71e);if(!_0x5b8691)throw new _0x4a9b4a('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x2cf71e});let _0x5f05fc=null,_0x327c19=_0x166148;return _0x2b2d37?.['@external']&&(_0x5f05fc=this['_getExternalAuthor'](_0x2b2d37['@external']['authorName']),_0x327c19=new Date(_0x2b2d37['@external']['createdAt'])),new fi(this,{'threadId':_0x302d42,'id':_0x5c454e,'author':_0x5f05fc||_0x5b8691,'creator':_0x5b8691,'content':_0x11fc32,'createdAt':_0x166148,'authoredAt':_0x327c19,'attributes':_0x2b2d37});}['_addComment'](_0xc2d1ab){let {threadId:_0x173f4f,content:_0x1d72ad,attributes:_0x1b67fa,isFromAdapter:_0x165372}=_0xc2d1ab;const _0x10046a=this['getCommentThread'](_0xc2d1ab['threadId']);if(!_0x10046a)throw new _0x4a9b4a('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3056dd=this['_createNewComment'](_0xc2d1ab),{id:_0xecb2cb}=_0x3056dd;if(_0x10046a['_add'](_0x3056dd),_0x165372||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x10046a['isSubmitted'])return Promise['resolve']();const _0xa9ae50=this['context']['plugins']['get']('PendingActions'),{channelId:_0x253bf9}=_0x10046a,_0x174017=_0xa9ae50['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1b67fa||(_0x1b67fa={}),this['adapter']['addComment']({'channelId':_0x253bf9,'threadId':_0x173f4f,'commentId':_0xecb2cb,'content':_0x1d72ad,'attributes':_0x1b67fa})['then'](_0x38311b=>{_0xa9ae50['remove'](_0x174017),_0x38311b&&this['_updateComment']({'channelId':_0x253bf9,'threadId':_0x173f4f,'commentId':_0xecb2cb,'createdAt':_0x38311b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2ce181=>{throw console['error'](_0x2ce181),new _0x4a9b4a('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x402ffd,commentId:_0x2a3de7,content:_0x562870,createdAt:_0x3e862a,attributes:_0x542382,isFromAdapter:_0x465c97}){if(void 0x0!==_0x562870&&('string'!=typeof _0x562870||!_0x562870['trim']()['length']))throw new _0x4a9b4a('commentsrepository-update-comment-invalid-content');const _0x186791=this['getCommentThread'](_0x402ffd),_0x53ec84=_0x186791['getComment'](_0x2a3de7);if(!_0x53ec84)throw new _0x4a9b4a('commentsrepository-update-missing-comment',this);let _0x46d169=!0x1;if(_0x562870&&_0x562870!==_0x53ec84['content']&&(_0x53ec84['isEditable']||_0x465c97)&&(_0x53ec84['content']=_0x562870,_0x46d169=!0x0),_0x3e862a&&_0x3e862a!==_0x53ec84['createdAt']&&(_0x53ec84['createdAt']=_0x3e862a,_0x53ec84['attributes']&&_0x53ec84['attributes']['@external']||(_0x53ec84['authoredAt']=_0x3e862a),_0x46d169=!0x0),_0x542382&&!wt(_0x542382,_0x53ec84['attributes'])&&(_0x53ec84['attributes']=_0x542382,_0x46d169=!0x0),!_0x46d169)return Promise['resolve']();if(_0x186791['fire']('commentUpdated'),_0x465c97||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4f17ac=this['context']['plugins']['get']('PendingActions'),{channelId:_0x15c23a}=this['getCommentThread'](_0x53ec84['threadId']),_0x52f19b=_0x4f17ac['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x15c23a,'threadId':_0x402ffd,'commentId':_0x2a3de7,'content':_0x562870,'attributes':_0x542382})['then'](()=>_0x4f17ac['remove'](_0x52f19b))['catch'](_0x557d5e=>{throw console['error'](_0x557d5e),new _0x4a9b4a('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1ae2c1,commentId:_0x331408,isFromAdapter:_0x2ac32c}){const _0x24944c=this['getCommentThread'](_0x1ae2c1),_0x26b978=_0x24944c['getComment'](_0x331408);if(!_0x26b978)throw new _0x4a9b4a('commentsrepository-remove-missing-comment',this);if(_0x24944c['_remove'](_0x26b978),_0x2ac32c||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x50b0f7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4fa4c2}=_0x24944c,_0x4ecdac=_0x50b0f7['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x4fa4c2,'threadId':_0x1ae2c1,'commentId':_0x331408})['then'](()=>_0x50b0f7['remove'](_0x4ecdac))['catch'](_0x4c5241=>{throw console['error'](_0x4c5241),new _0x4a9b4a('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x321e78(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x46f729,_0x40439b){super();const _0x2d8980=_0x46f729['context']['plugins']['get'](it)['me'],_0x4cda6f=_0x46f729['getCommentThread'](_0x40439b['threadId']),_0x25dfb8=0x0===_0x4cda6f['comments']['length'],_0x60fcf4=_0x2d8980===_0x40439b['author'];this['id']=_0x40439b['id'],this['threadId']=_0x40439b['threadId'],this['author']=_0x40439b['author'],this['creator']=_0x40439b['creator'],this['isExternal']=Boolean(_0x40439b['attributes']&&_0x40439b['attributes']['@external']),this['set']('content',_0x40439b['content']),this['createdAt']=_0x40439b['createdAt']||new Date(),this['set']('authoredAt',_0x40439b['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4cda6f,'resolvedAt'),this['set']('attributes',_0x40439b['attributes']||{}),this['bind']('isEditable')['to'](_0x46f729,'_permissions',()=>{const _0x473ec6=_0x46f729['getPermissions'](_0x4cda6f['channelId'])['write'],_0x560eb7=_0x46f729['getPermissions'](_0x4cda6f['channelId'])['modifyAll'];return _0x60fcf4&&_0x473ec6||!_0x60fcf4&&_0x560eb7;}),this['bind']('isRemovable')['to'](_0x4cda6f,'isRemovable',_0x46f729,'_permissions',_0x2327db=>{const _0x5cb9c9=_0x46f729['getPermissions'](_0x4cda6f['channelId'])['write'],_0x2dd4b8=_0x46f729['getPermissions'](_0x4cda6f['channelId'])['modifyAll'];return _0x60fcf4&&_0x5cb9c9||_0x2327db&&_0x25dfb8||!_0x60fcf4&&_0x2dd4b8&&!_0x25dfb8;}),this['bind']('isReadOnly')['to'](_0x4cda6f,'isReadOnly'),this['_repository']=_0x46f729;}get['weight'](){return Math['max'](function(_0x55a326){const _0x27f641=document['createElement']('div');return _0x27f641['innerHTML']=_0x55a326,_0x27f641['textContent']['length'];}(this['content']),0xc8);}['update'](_0x6bc0c2){const {threadId:_0x4dcde8,id:_0x38b3}=this;if(!this['_repository']['hasCommentThread'](_0x4dcde8))throw new _0x4a9b4a('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3db277}=this['_repository']['getCommentThread'](_0x4dcde8);this['_repository']['fire'](bt('updateComment',_0x3db277,_0x4dcde8),{'channelId':_0x3db277,'threadId':_0x4dcde8,'commentId':_0x38b3,..._0x6bc0c2});}['setAttribute'](_0x46012e,_0x3e2f21){const _0xe2ab16=It(this['attributes']);At(_0xe2ab16,_0x46012e,_0x3e2f21),this['update']({'attributes':_0xe2ab16});}['removeAttribute'](_0x234963){const _0x5c8ed9=It(this['attributes']);yt(_0x5c8ed9,_0x234963),this['update']({'attributes':_0x5c8ed9});}['remove'](_0x153402={}){if(!_0x153402['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x59cec6,id:_0x588eea}=this;if(!this['_repository']['hasCommentThread'](_0x59cec6))throw new _0x4a9b4a('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x89aa9b}=this['_repository']['getCommentThread'](_0x59cec6);this['_repository']['fire'](bt('removeComment',_0x89aa9b,_0x59cec6),{'channelId':_0x89aa9b,'threadId':_0x59cec6,'commentId':_0x588eea,..._0x153402});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x29445d,..._0x45f2c2){for(const _0x1331b8 of _0x45f2c2)void 0x0!==_0x1331b8&&(_0x29445d+=':'+String(_0x1331b8));return _0x29445d;}class J extends _0xc8a10b{['refresh'](){const _0x14b1b2=this['editor']['model']['document']['selection'];for(const _0x1015b4 of _0x14b1b2['getRanges']())if(this['_hasContent'](_0x1015b4))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x387950=_0x1e5d77()}={}){const _0x3426bc=this['editor']['model'],_0x326006=[];for(const _0x4d6f1c of _0x3426bc['document']['selection']['getRanges']())this['_hasContent'](_0x4d6f1c)&&_0x326006['push'](this['_trimToContent'](_0x4d6f1c));_0x3426bc['change'](_0x1aaed7=>{for(const _0x51ff29 of _0x326006){const _0x3bf9a=_0x1e5d77()['substr'](0x1,0x5),_0x1c0301='comment:'+_0x387950+':'+_0x3bf9a;_0x1aaed7['addMarker'](_0x1c0301,{'range':_0x51ff29,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x487ae6){for(const _0xb20032 of _0x487ae6['getItems']())if(this['_itemIsContent'](_0xb20032))return!0x0;return!0x1;}['_itemIsContent'](_0x30c230){return _0x30c230['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x30c230)&&!_0x30c230['is']('element','tableCell');}['_trimToContent'](_0xc1df2d){const _0x5ceced=_0x40f225=>!this['_itemIsContent'](_0x40f225['item']),_0x3e576d=_0xc1df2d['start']['getLastMatchingPosition'](_0x5ceced),_0x151687=_0xc1df2d['end']['getLastMatchingPosition'](_0x5ceced,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3e576d,_0x151687);}}class P extends _0xfe9bd5{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4cec52){super(_0x4cec52),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5ebacf=this['editor'],_0x1acfae=_0x5ebacf['model']['document']['selection'],_0x35d3a6=_0x3ad571(()=>this['refreshSelectedViews'](),0xa);_0x1acfae['on']('change:range',(_0x5ca411,_0x19ac08)=>{_0x19ac08['directChange']&&(_0x35d3a6['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5ebacf['editing']['view']['document'],'change:isFocused',(_0x5754e5,_0x3b686c,_0x3a20bf)=>{_0x3a20bf&&_0x35d3a6();}),this['listenTo'](_0x5ebacf['ui']['focusTracker'],'change:isFocused',(_0x56d0d4,_0x200a73,_0x37789d)=>{_0x37789d||_0x5ebacf['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1bbac5=>this['_editorAnnotationsData']['has'](_0x1bbac5['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x58525b){if(this['_editorAnnotations']['has'](_0x58525b['view']))return;this['_editorAnnotations']['add'](_0x58525b['view']),this['editor']['ui']['focusTracker']['add'](_0x58525b['view']['element']);const _0x10d6cc=this['editor']['plugins']['get'](O);this['listenTo'](_0x10d6cc['collection'],'remove',(_0x25e35d,_0x39209e)=>{this['editor']['ui']['focusTracker']['remove'](_0x39209e['view']['element']),this['_editorAnnotations']['delete'](_0x39209e['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x17b4c5){if('function'!=typeof _0x17b4c5)throw new _0x4a9b4a('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x17b4c5);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1b897e,annotations:_0x5ecf54}){const _0x4c6705=[],_0x5c7fab=this['editor']['model']['document']['selection'],_0x17ba5a=Array['from'](_0x5c7fab['getRanges']());for(const [_0x528409,_0x3116e9]of this['_editorAnnotationsData']){const _0x5d7edd=_0x3f12b1(_0x3116e9),_0x32a053=_0x5ecf54['getByInnerView'](_0x528409);_0x5d7edd&&_0x32a053&&_0x4c6705['push']({'annotation':_0x32a053,'range':_0x5d7edd});}function _0x3f12b1(_0x382e6d){for(const _0x596645 of _0x382e6d)for(const _0x34f7db of _0x17ba5a)if(_0x596645['containsRange'](_0x34f7db,!_0x5c7fab['isCollapsed']))return _0x596645;return null;}return _0x4c6705['sort']((_0x5f3239,_0x33436c)=>{const _0x65bedf=_0x5f3239['range'],_0x3ece33=_0x33436c['range'];if(!_0x65bedf['isEqual'](_0x3ece33)){if(_0x65bedf['containsRange'](_0x3ece33,!0x0))return 0x1;if(_0x3ece33['containsRange'](_0x65bedf,!0x0))return-0x1;}return _0x5f3239['annotation']==_0x1b897e?-0x1:_0x33436c['annotation']==_0x1b897e?0x1:0x0;})['map'](_0x20577a=>_0x20577a['annotation']);}get['_editorAnnotationsData'](){const _0x2ba279=new Map();for(const _0x3c12a6 of Array['from'](this['_dataCollectors']))for(const [_0x3188d3,_0x45eada]of _0x3c12a6())_0x2ba279['set'](_0x3188d3,_0x45eada);return _0x2ba279;}}class st extends _0xfe9bd5{['afterInit'](){const _0x160b02=this['editor'];if(!_0x160b02['plugins']['has']('RestrictedEditingModeEditing'))return;_0x160b02['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0xfe9bd5{constructor(_0x13df70){super(_0x13df70),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x59745a=this['editor'],_0x3db3b4=_0x59745a['commands']['get']('importWord'),_0x21f22a=_0x59745a['plugins']['get'](it);_0x3db3b4&&(_0x3db3b4['on']('execute',(_0x1ab587,[,_0x31e3c9])=>{_0x31e3c9['collaboration_features']={'comments':!0x0,'user_id':_0x21f22a['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x3db3b4,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x54eddc,_0x292c65){const {comment_threads:_0xad9124}=_0x292c65;_0xad9124&&_0xad9124['forEach'](({thread_id:_0x36de4c,comments:_0x287063,is_resolved:_0x364e73})=>{const _0x2fb364=new Date(),_0x54f594=_0x287063['map'](({author:_0x3f3947,content:_0x2e5689,created_at:_0x2ff1dc})=>({'content':_0x2e5689,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2fb364,'attributes':{'@external':{'authorName':_0x3f3947,'createdAt':_0x2ff1dc?new Date(_0x2ff1dc):new Date(),'source':'importWord'}}})),_0x1f851a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1f851a,'threadId':_0x36de4c,'comments':_0x54f594,'resolvedAt':_0x364e73?_0x2fb364:null});});}}class at extends _0xfe9bd5{constructor(_0xcf32b8){super(_0xcf32b8),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5e1b19=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5e1b19,'contentInsertion',(_0x5f064f,_0x216c32)=>this['_removeMarkersWithoutThreads'](_0x216c32['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x127581){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x127581;const _0x31bd3f=this['editor']['plugins']['get']('CommentsRepository');for(const _0x58ee91 of _0x127581['keys']()){const [_0x4723f4,_0xee1c42]=_0x58ee91['split'](':');'comment'!=_0x4723f4||_0x31bd3f['hasCommentThread'](_0xee1c42)||_0x127581['delete'](_0x58ee91);}return _0x127581;}['_registerMarkerInClipboardPipeline'](){const _0xa72617=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1870c0=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1870c0&&_0xa72617['_registerMarkerToCopy']('comment',_0x1870c0);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x32fdaa){switch(_0x32fdaa){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0xfe9bd5{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x188593,_0x4c6ad6)=>{if(!_0x4c6ad6['options']['showCommentHighlights'])return null;if(_0x4c6ad6['options']['ignoreResolvedComments']){const {id:_0x134a5d}=er(_0x188593['markerName']),_0x22ef8e=this['editor']['plugins']['get'](o);if(_0x22ef8e['getCommentThread'](_0x134a5d)?.['isResolved']&&_0x188593['item'])return _0x4c6ad6['consumable']['consume'](_0x188593['item'],'addMarker:'+_0x188593['markerName']),_0x4c6ad6['consumable']['consume'](_0x188593['item'],'removeMarker:'+_0x188593['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x16d22b=>{_0x16d22b['on']('addMarker:comment',(_0x154261,_0x469708,_0x5477e9)=>{if(!_0x5477e9['options']['showCommentHighlights'])return;const _0x180e4=_0x469708['item'];if(!_0x180e4)return;const _0x318f1c=_0x5477e9['mapper']['toViewElement'](_0x180e4);this['editor']['model']['schema']['isObject'](_0x180e4)&&_0x318f1c&&!_0x318f1c['getCustomProperty']('widget')&&_0x318f1c['is']('containerElement')&&_0xdc6819(_0x318f1c,_0x5477e9['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2337c3,{writer:_0x2c4e04,options:_0x220a2a})=>{if(!_0x220a2a['showCommentHighlights'])return null;const _0x47473e=_0x2c4e04['createContainerElement']('div'),_0x2f65da=_0x2c4e04['createEmptyElement']('hr');return _0x2c4e04['addClass']('ck-horizontal-line',_0x47473e),_0x2c4e04['insert'](_0x2c4e04['createPositionAt'](_0x47473e,0x0),_0x2f65da),_0x47473e;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3fc3d3,{writer:_0x59120c,options:_0x3f1215})=>{if(!_0x3f1215['showCommentHighlights'])return null;const _0x522720=_0x59120c['createContainerElement']('span'),_0xa434ef=_0x59120c['createEmptyElement']('img');return _0x59120c['addClass']('image-inline',_0x522720),_0x59120c['insert'](_0x59120c['createPositionAt'](_0x522720,0x0),_0xa434ef),_0x522720;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x2c8720,{writer:_0x48fbe9,options:_0x23c0ea})=>{if(_0x23c0ea['showCommentHighlights'])return _0x48fbe9['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x4d6816,_0x4dc49e,_0x14afea)=>{_0x14afea['options']['showCommentHighlights']&&_0x4d6816['stop']();},{'priority':'high'});}}class r extends _0xfe9bd5{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47fd3b){super(_0x47fd3b),this['set']('isThreadsLoadingPaused',!0x0),_0x47fd3b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x19b7a3,_0x44cf5b,_0x4434af,_0x55dd9d)=>{const _0x47bc6c=_0x47fd3b['plugins']['get'](o),_0x67e9bd=_0x4434af?er(_0x4434af)['id']:null;_0x47fd3b['model']['change'](()=>{if(_0x67e9bd){const _0x5ecfe5=this['getAllMarkersForId'](_0x67e9bd);for(const _0x1c1596 of _0x5ecfe5)_0x47fd3b['editing']['reconvertMarker'](_0x1c1596);}if(_0x55dd9d){const {id:_0x952f30}=er(_0x55dd9d),_0x24f15b=_0x47bc6c['getCommentThread'](_0x952f30);if(_0x24f15b&&_0x24f15b['unlinkedAt'])return;if(_0x24f15b&&!_0x24f15b['isAttached'])return;const _0xb40e74=this['getAllMarkersForId'](_0x952f30);for(const _0xce4bb0 of _0xb40e74)_0x47fd3b['editing']['reconvertMarker'](_0xce4bb0);}}),_0x67e9bd&&this['scrollToThreadMarker'](_0x67e9bd);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2fdd29=this['editor'],_0x39bebb=_0x2fdd29['plugins']['get'](o),_0x3fdaab=_0x2fdd29['config']['get']('collaboration.channelId'),_0x1c7643=_0x39bebb['getCommentThreads']()['filter'](_0x606192=>_0x606192['channelId']!==_0x3fdaab);_0x2fdd29['commands']['add']('addCommentThread',new J(_0x2fdd29)),this['listenTo'](_0x2fdd29,'change:isReadOnly',(_0x393382,_0x1112f8,_0x9b6477)=>{_0x39bebb['switchReadOnly'](_0x9b6477,_0x2fdd29['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x39bebb,ft('addCommentThread',_0x3fdaab),(_0xba8dd3,{threadId:_0x3df197})=>{const _0x3ee15d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3df197);_0x3ee15d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3df197);}),this['listenTo'](_0x39bebb,ft('removeCommentThread',_0x3fdaab),(_0x4285c6,{threadId:_0x2d996b})=>{_0x2fdd29['model']['enqueueChange']({'isUndoable':!0x1},_0x20f4db=>{const _0x2e5a7d=this['getAllMarkersForId'](_0x2d996b);for(const _0x5cbb6a of _0x2e5a7d)_0x20f4db['removeMarker'](_0x5cbb6a);});}),this['listenTo'](_0x39bebb,ft('resolveCommentThread',_0x3fdaab),(_0x3f0b74,{threadId:_0x247d80})=>{(this['_reconvertMarkers'](_0x247d80),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x247d80)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x39bebb,ft('reopenCommentThread',_0x3fdaab),(_0x47faab,{threadId:_0x3fa95e})=>{this['_reconvertMarkers'](_0x3fa95e);},{'priority':'low'}),this['listenTo'](_0x39bebb,ft('addComment',_0x3fdaab),(_0x1caaf5,{threadId:_0x503a9c,isFromAdapter:_0x2db77e})=>{const _0x3aa886=this['getAllMarkersForId'](_0x503a9c);if(_0x2db77e||0x0==_0x3aa886['length']||!_0x39bebb['hasCommentThread'](_0x503a9c))return;0x1===_0x39bebb['getCommentThread'](_0x503a9c)['length']&&_0x2fdd29['model']['enqueueChange']({'isUndoable':!0x1},_0x54c959=>{for(const _0x2ee52a of _0x3aa886)_0x54c959['updateMarker'](_0x2ee52a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1c7643);}['afterInit'](){!async function(_0x1e14df){const _0x93738f=_0x28c7bf([0x6d,0x4f,0x66,0x4e,0x37,0x6c,0x41,0x52,0x57,0x38,0x33,0x73,0x67,0x42,0x56,0x51,0x77,0x72,0x46,0x44,0x65,0x6a,0x6b,0x32,0x30,0x7a,0x43,0x78,0x62,0x6f,0x69,0x59,0x34,0x54,0x71,0x4c,0x55,0x58,0x6e,0x35,0x50,0x64,0x36,0x45,0x47,0x74,0x75,0x70,0x4a,0x63,0x49,0x79,0x76,0x4b,0x61,0x4d,0x68,0x31,0x53,0x48,0x5a,0x39]),_0x373a4f=0x70635479,_0x138f05=0x706433a9^_0x373a4f,_0x283475=window[_0x28c7bf([0x44,0x61,0x74,0x65])][_0x28c7bf([0x6e,0x6f,0x77])](),_0x16fbd2=_0x1e14df[_0x28c7bf([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3659c5=new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x191a33=>{_0x16fbd2[_0x28c7bf([0x6f,0x6e,0x63,0x65])](_0x28c7bf([0x72,0x65,0x61,0x64,0x79]),_0x191a33);}),_0xbf19d9={[_0x28c7bf([0x6b,0x74,0x79])]:_0x28c7bf([0x45,0x43]),[_0x28c7bf([0x75,0x73,0x65])]:_0x28c7bf([0x73,0x69,0x67]),[_0x28c7bf([0x63,0x72,0x76])]:_0x28c7bf([0x50,0x2d,0x32,0x35,0x36]),[_0x28c7bf([0x78])]:_0x28c7bf([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]),[_0x28c7bf([0x79])]:_0x28c7bf([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]),[_0x28c7bf([0x61,0x6c,0x67])]:_0x28c7bf([0x45,0x53,0x32,0x35,0x36])},_0x5bb9ee=_0x16fbd2[_0x28c7bf([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x28c7bf([0x67,0x65,0x74])](_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5a9799(){let _0x2b9cbe,_0x3451cb=null,_0x1bec7c=null;try{if(_0x5bb9ee==_0x28c7bf([0x47,0x50,0x4c]))return _0x28c7bf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2b9cbe=_0x4cb0cb(),!_0x2b9cbe)return _0x28c7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2b9cbe[_0x28c7bf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1bec7c=_0x31d748(_0x2b9cbe[_0x28c7bf([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2b9cbe[_0x28c7bf([0x6a,0x74,0x69])])),await _0x420c4d()?_0xc510ca()?_0x1708c3()?_0x28c7bf([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x589159()?(_0x2b9cbe[_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x28c7bf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x3451cb=_0x4b32b8(_0x28c7bf([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2b9cbe[_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x28c7bf([0x74,0x72,0x69,0x61,0x6c])&&(_0x3451cb=_0x4b32b8(_0x28c7bf([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x2c4d66()):_0x28c7bf([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x28c7bf([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x28c7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x7a16b9){return _0x28c7bf([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1708c3(){const _0x5f0d4d=[_0x28c7bf([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x28c7bf([0x74,0x72,0x69,0x61,0x6c])][_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b9cbe[_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x283475/0x3e8:0xe10*_0x138f05;return _0x2b9cbe[_0x28c7bf([0x65,0x78,0x70])]<_0x5f0d4d;}function _0xc510ca(){const _0x12f140=_0x2b9cbe[_0x28c7bf([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x12f140)return!0x1;if(_0x12f140[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28c7bf([0x2a])))return!0x0;if(_0x12f140[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28c7bf([0x43,0x4d,0x54])))return!0x0;if(_0x12f140[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28c7bf([0x52,0x43,0x4d,0x54]))){if(_0x5dfb36())return!0x0;if(_0xd74b62()||_0x5ed878())return!0x0;}return!0x1;}function _0x589159(){const _0x2cce3a=_0x2b9cbe[_0x28c7bf([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2cce3a||0x0==_0x2cce3a[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x29d734}=new URL(window[_0x28c7bf([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2cce3a[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x29d734))return!0x0;const _0x287c1a=_0x29d734[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])](_0x28c7bf([0x2e]));return _0x2cce3a[_0x28c7bf([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x45f319=>_0x45f319[_0x28c7bf([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x28c7bf([0x2a])))[_0x28c7bf([0x6d,0x61,0x70])](_0x2c7945=>_0x2c7945[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])](_0x28c7bf([0x2e])))[_0x28c7bf([0x73,0x6f,0x6d,0x65])](_0x11c485=>_0x287c1a[_0x28c7bf([0x65,0x76,0x65,0x72,0x79])]((_0x160b6f,_0x51e6bc)=>_0x11c485[_0x51e6bc]===_0x160b6f||_0x11c485[_0x51e6bc]===_0x28c7bf([0x2a])));}function _0x2c4d66(){return _0x3451cb&&_0x1bec7c?new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x44e66f,_0x3669fb)=>{_0x3451cb[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x44e66f,_0x3669fb),_0x1bec7c[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x2a97a2=>{_0x2a97a2!=_0x28c7bf([0x56,0x61,0x6c,0x69,0x64])&&_0x44e66f(_0x2a97a2);},_0x3669fb);}):_0x3451cb||_0x1bec7c||_0x28c7bf([0x56,0x61,0x6c,0x69,0x64]);}}function _0x31d748(_0xbb9947,_0x1badc1){return new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3de7f3=>{if(_0x13abdb())return _0x3de7f3(_0x28c7bf([0x56,0x61,0x6c,0x69,0x64]));_0x4b2607(),_0x16fbd2[_0x28c7bf([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x28c7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x486b89=!0x1;const _0x9af7a9=_0x1e5d77();function _0x27d2a2(_0x59a010){return!!_0x59a010&&(typeof _0x59a010===_0x28c7bf([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x59a010===_0x28c7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x59a010[_0x28c7bf([0x74,0x68,0x65,0x6e])]===_0x28c7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x59a010[_0x28c7bf([0x63,0x61,0x74,0x63,0x68])]===_0x28c7bf([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5cfe6d(_0x4576d5){_0x410d43(_0x4576d5)[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x187721=>{if(!_0x187721||_0x187721[_0x28c7bf([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x28c7bf([0x6f,0x6b]))return _0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x270bcb(_0x1ff821(_0x9af7a9+_0x1badc1))!=_0x187721[_0x28c7bf([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x28c7bf([0x56,0x61,0x6c,0x69,0x64]);})[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x54ccd5=>(_0x449913(),_0x54ccd5),()=>{const _0x111706=_0x335ecc();return null==_0x111706?(_0x449913(),_0x28c7bf([0x56,0x61,0x6c,0x69,0x64])):_0x28c7bf(_0x283475-_0x111706>(0x546fd079^_0x373a4f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x3de7f3)[_0x28c7bf([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3de7f3(_0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e0b90=0x7055baf9^_0x373a4f;function _0x449913(){const _0x3bceed=_0x28c7bf([0x6c,0x6c,0x63,0x74,0x2d])+_0x270bcb(_0x1ff821(_0xbb9947)),_0x36c797=_0x31a33a(_0x270bcb(window[_0x28c7bf([0x4d,0x61,0x74,0x68])][_0x28c7bf([0x63,0x65,0x69,0x6c])](_0x283475/_0x4e0b90)));window[_0x28c7bf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x28c7bf([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3bceed,_0x36c797);}function _0x335ecc(){const _0x6ce6bf=_0x28c7bf([0x6c,0x6c,0x63,0x74,0x2d])+_0x270bcb(_0x1ff821(_0xbb9947)),_0x2a53ec=window[_0x28c7bf([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x28c7bf([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x6ce6bf);return _0x2a53ec?window[_0x28c7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x31a33a(_0x2a53ec),0x10)*_0x4e0b90:null;}function _0x410d43(_0x29f323){return new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5bb621,_0x5b42ac)=>{_0x29f323[_0x28c7bf([0x74,0x68,0x65,0x6e])](_0x5bb621,_0x5b42ac),window[_0x28c7bf([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x5b42ac,0x706280b9^_0x373a4f);});}}_0x16fbd2[_0x28c7bf([0x6f,0x6e])](_0x28c7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x37ff39,_0x26eeb3)=>{if(_0x26eeb3[0x0]!=_0xbb9947)return _0x3de7f3(_0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x26eeb3[0x1]={..._0x26eeb3[0x1],[_0x28c7bf([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x9af7a9};},{[_0x28c7bf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x28c7bf([0x68,0x69,0x67,0x68])}),_0x16fbd2[_0x28c7bf([0x6f,0x6e])](_0x28c7bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2ad8fc=>{_0x27d2a2(_0x2ad8fc[_0x28c7bf([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x486b89=!0x0,_0x5cfe6d(_0x2ad8fc[_0x28c7bf([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x28c7bf([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x28c7bf([0x6c,0x6f,0x77])}),_0x3659c5[_0x28c7bf([0x74,0x68,0x65,0x6e])](()=>{_0x486b89||_0x3de7f3(_0x28c7bf([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x13abdb(){return _0x16fbd2[_0x28c7bf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28c7bf([0x76,0x69,0x65,0x77])][_0x28c7bf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x28c7bf([0x61,0x75,0x74,0x6f]);}function _0x4b2607(){_0x16fbd2[_0x28c7bf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x28c7bf([0x76,0x69,0x65,0x77])][_0x28c7bf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x28c7bf([0x61,0x75,0x74,0x6f]);}}function _0x4b32b8(_0xd4e09e){const _0x28deff=[new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2498d5=>setTimeout(_0x2498d5,0x706a6ab5^_0x373a4f)),_0x3659c5[_0x28c7bf([0x74,0x68,0x65,0x6e])](()=>new window[(_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f6678=>{let _0x3b2a34=0x0;_0x16fbd2[_0x28c7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x28c7bf([0x6f,0x6e])](_0x28c7bf([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4dc34d,_0x1a0662)=>{_0x1a0662[0x0][_0x28c7bf([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x3b2a34++,_0x3b2a34==(0x70635581^_0x373a4f)&&(_0x4f6678(),_0x4dc34d[_0x28c7bf([0x6f,0x66,0x66])]());});}))];return window[_0x28c7bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x28c7bf([0x72,0x61,0x63,0x65])](_0x28deff)[_0x28c7bf([0x74,0x68,0x65,0x6e])](()=>_0xd4e09e);}async function _0x4bc125(){await _0x3659c5,_0x16fbd2[_0x28c7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x28c7bf([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x49e39d,_0x16fbd2[_0x28c7bf([0x6d,0x6f,0x64,0x65,0x6c])][_0x28c7bf([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x49e39d,_0x16fbd2[_0x28c7bf([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x28c7bf([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5dfb36(){return _0x591cee(_0x28c7bf([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x200792(_0x28c7bf([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x28c7bf([0x73,0x74,0x61,0x74,0x65])]==_0x28c7bf([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xd74b62(){return _0x591cee(_0x28c7bf([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 _0x5ed878(){return _0x591cee(_0x28c7bf([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x252303(_0x209589){const _0xda3cba=_0x3f1efd();_0x16fbd2[_0xda3cba]=_0x28c7bf([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x209589,_0x209589!=_0x28c7bf([0x56,0x61,0x6c,0x69,0x64])&&_0x4bc125();}function _0x3f1efd(){const _0x5956f4=window[_0x28c7bf([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x28c7bf([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x28c7bf([0x6e,0x6f,0x77])]())[_0x28c7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x28c7bf([0x2e]),'');let _0x15387d=_0x28c7bf([0x6d]);for(let _0xcc0afa=0x0;_0xcc0afa<_0x5956f4[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xcc0afa+=0x2){let _0x43de4e=window[_0x28c7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5956f4[_0x28c7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xcc0afa,_0xcc0afa+0x2));_0x43de4e>=_0x93738f[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x43de4e-=_0x93738f[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x15387d+=_0x93738f[_0x43de4e];}return _0x15387d;}function _0x4cb0cb(){const _0x59878f=_0x5bb9ee[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])](_0x28c7bf([0x2e]));if(0x3!=_0x59878f[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x53b906(_0x59878f[0x1]);function _0x53b906(_0x1b6cd4){const _0x2ebfc5=_0x352e71(_0x1b6cd4);return _0x2ebfc5&&_0x2404c5()?_0x2ebfc5:null;function _0x2404c5(){const _0x1575df=_0x2ebfc5[_0x28c7bf([0x6a,0x74,0x69])],_0x28a7f1=window[_0x28c7bf([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1575df[_0x28c7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1575df[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1d1c4a={..._0x2ebfc5,[_0x28c7bf([0x6a,0x74,0x69])]:_0x1575df[_0x28c7bf([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1575df[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1d1c4a[_0x28c7bf([0x76,0x63])],_0x1ff821(_0x1d1c4a)==_0x28a7f1;}}}async function _0x420c4d(){let _0x2646a0=!0x0;try{const _0x26f621=_0x5bb9ee[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])](_0x28c7bf([0x2e])),[_0x463e85,_0x51ad50,_0x3fe00]=_0x26f621;return _0x21abc0(_0x463e85),await _0x3d7e17(_0x463e85,_0x51ad50,_0x3fe00),_0x2646a0;}catch(_0x528eb6){return!0x1;}function _0x21abc0(_0x4073f3){const _0x21623c=_0x352e71(_0x4073f3);_0x21623c&&_0x21623c[_0x28c7bf([0x61,0x6c,0x67])]==_0x28c7bf([0x45,0x53,0x32,0x35,0x36])||(_0x2646a0=!0x1);}async function _0x3d7e17(_0x1ae10d,_0xe10086,_0x3f2793){const _0x10756e=window[_0x28c7bf([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x28c7bf([0x66,0x72,0x6f,0x6d])](_0x4bfdbf(_0x3f2793),_0xc819b2=>_0xc819b2[_0x28c7bf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1ce04e=new window[(_0x28c7bf([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x28c7bf([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1ae10d+_0x28c7bf([0x2e])+_0xe10086),_0xecebbc=window[_0x28c7bf([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x28c7bf([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xecebbc)return;const _0x5511a3=await _0xecebbc[_0x28c7bf([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x28c7bf([0x6a,0x77,0x6b]),_0xbf19d9,{[_0x28c7bf([0x6e,0x61,0x6d,0x65])]:_0x28c7bf([0x45,0x43,0x44,0x53,0x41]),[_0x28c7bf([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x28c7bf([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x28c7bf([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xecebbc[_0x28c7bf([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x28c7bf([0x6e,0x61,0x6d,0x65])]:_0x28c7bf([0x45,0x43,0x44,0x53,0x41]),[_0x28c7bf([0x68,0x61,0x73,0x68])]:{[_0x28c7bf([0x6e,0x61,0x6d,0x65])]:_0x28c7bf([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5511a3,_0x10756e,_0x1ce04e)||(_0x2646a0=!0x1);}}function _0x352e71(_0x55a5a0){return _0x55a5a0[_0x28c7bf([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x28c7bf([0x65,0x79]))?JSON[_0x28c7bf([0x70,0x61,0x72,0x73,0x65])](_0x4bfdbf(_0x55a5a0)):null;}function _0x4bfdbf(_0x37e138){return window[_0x28c7bf([0x61,0x74,0x6f,0x62])](_0x37e138[_0x28c7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x28c7bf([0x2b]))[_0x28c7bf([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x28c7bf([0x2f])));}function _0x1ff821(_0x3e9606){let _0xeb7de9=0x1505;function _0x291be3(_0x4571b5){for(let _0x4fb962=0x0;_0x4fb962<_0x4571b5[_0x28c7bf([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4fb962++){const _0x45c13f=_0x4571b5[_0x28c7bf([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4fb962);_0xeb7de9=(_0xeb7de9<<0x5)+_0xeb7de9+_0x45c13f,_0xeb7de9&=_0xeb7de9;}}function _0xaabb96(_0x55550a){Array[_0x28c7bf([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x55550a)?_0x55550a[_0x28c7bf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xaabb96):_0x55550a&&typeof _0x55550a==_0x28c7bf([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x28c7bf([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x55550a)[_0x28c7bf([0x73,0x6f,0x72,0x74])]()[_0x28c7bf([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x7547ae,_0x5f2043])=>{_0x291be3(_0x7547ae),_0xaabb96(_0x5f2043);}):_0x291be3(window[_0x28c7bf([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x55550a));}return _0xaabb96(_0x3e9606),_0xeb7de9>>>0x0;}function _0x270bcb(_0x4fb203){return _0x4fb203[_0x28c7bf([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x28c7bf([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x28c7bf([0x30]));}function _0x31a33a(_0x466fc3){return _0x466fc3[_0x28c7bf([0x73,0x70,0x6c,0x69,0x74])]('')[_0x28c7bf([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x28c7bf([0x6a,0x6f,0x69,0x6e])]('');}function _0x591cee(_0x28b6de){return _0x16fbd2[_0x28c7bf([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x28c7bf([0x68,0x61,0x73])](_0x28b6de);}function _0x200792(_0x2b7b41){return _0x16fbd2[_0x28c7bf([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x28c7bf([0x67,0x65,0x74])](_0x2b7b41);}function _0x49e39d(){}function _0x28c7bf(_0x242fb0){return _0x242fb0['map'](_0x1f3aef=>String['fromCharCode'](_0x1f3aef))['join']('');}_0x252303(await _0x5a9799());}(this);}['destroy'](){const _0x1d679e=this['editor']['plugins']['get'](o),_0x1dc790=this['editor']['config']['get']('collaboration.channelId');for(const _0x4dfc9c of _0x1d679e['getCommentThreads']({'channelId':_0x1dc790}))_0x1d679e['_detachCommentThread'](_0x4dfc9c['id']),_0x1d679e['_threads']['delete'](_0x4dfc9c['id']);super['destroy']();}['hasMarkerForId'](_0xc01fb0){return this['getAllMarkersForId'](_0xc01fb0)['length']>0x0;}['getAllMarkersForId'](_0x371429){const _0x484b06=[];for(const _0x3d0981 of this['editor']['model']['markers'])_0x3d0981['name']['startsWith']('comment:'+_0x371429)&&_0x484b06['push'](_0x3d0981);return _0x484b06;}['scrollToThreadMarker'](_0x36b218){const _0x349501=this['_getTargetForId'](_0x36b218);_0x349501&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x36b218&&rt({'target':_0x349501[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x341635){this['editor']['model']['change'](()=>{for(const _0x202c3e of this['getAllMarkersForId'](_0x341635))this['editor']['editing']['reconvertMarker'](_0x202c3e);});}['_attachArchivedThread'](_0x4738b1){const _0x4345ff=this['editor']['plugins']['get'](o),_0x21bcc6=this['editor']['plugins']['get'](P),_0x37636c=_0x4345ff['getCommentThread'](_0x4738b1);if(!_0x37636c['isAttached']){const _0x39780a=_0x37636c['attachTo'](()=>this['_getTargetForId'](_0x37636c['id']));_0x21bcc6['registerAnnotation'](_0x39780a),_0x37636c['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x4f6293=this['editor'],_0xd26403=_0x4f6293['plugins']['get'](it);_0x4f6293['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xd4170b,_0x38fe4b)=>{const {id:_0x1c5cfd}=er(_0xd4170b['markerName']),_0x2bc8c4=_0x4f6293['plugins']['get'](o)['getCommentThread'](_0x1c5cfd),_0x4b9182=this['activeMarker']&&er(this['activeMarker'])['id']===_0x1c5cfd;let _0x494868;if(_0x2bc8c4&&_0x2bc8c4['isResolved']&&!_0x4b9182&&_0xd4170b['item'])return _0x38fe4b['consumable']['consume'](_0xd4170b['item'],'addMarker:'+_0xd4170b['markerName']),_0x38fe4b['consumable']['consume'](_0xd4170b['item'],'removeMarker:'+_0xd4170b['markerName']),null;const _0x19a9b9=['ck-comment-marker'];return _0x4b9182&&_0x19a9b9['push']('ck-comment-marker--active'),_0x494868=_0x2bc8c4?.['length']?_0x2bc8c4['comments']['first']['author']['id']:_0xd26403['me']['id'],{'classes':_0x19a9b9,'attributes':{'data-comment':_0x1c5cfd,'data-author-id':_0x494868}};}}),_0x4f6293['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5e19c8,{options:_0x3874c2})=>{if(_0x3874c2['showCommentHighlights'])return null;const _0x21c535=_0x4f6293['plugins']['get'](o),_0x433023=_0x4f6293['model']['markers']['get'](_0x5e19c8),{id:_0x364750,part:_0x1fde5a}=er(_0x5e19c8);return _0x433023&&!_0x433023['affectsData']||_0x3874c2['ignoreResolvedComments']&&_0x21c535['getCommentThread'](_0x364750)?.['isResolved']?null:{'group':'comment','name':_0x1fde5a?_0x364750+':'+_0x1fde5a:_0x364750};}}),_0x4f6293['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1acd6d,{writer:_0xc4e3ed})=>_0xc4e3ed['createElement']('$marker',{'data-name':'comment:'+_0x1acd6d['getAttribute']('id')})}),_0x4f6293['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x40f76f=this['editor'],_0x1460f7=_0x40f76f['plugins']['get'](o),_0x519f10=new Set(),_0x2fa74=new Set();_0x40f76f['model']['document']['registerPostFixer'](_0x428391=>{let _0x26c1c9=!0x1;for(const {name:_0x2c448f,data:_0x4bfe14}of _0x40f76f['model']['document']['differ']['getChangedMarkers']()){const {group:_0xccf9f6,id:_0x322629}=er(_0x2c448f);let _0x211484=_0x4bfe14['newRange'];if('comment'!==_0xccf9f6||!_0x211484)continue;const _0x46f8c1='$graveyard'===_0x211484['root']['rootName'];_0x46f8c1||(_0x211484=dt(_0x211484,_0x40f76f['model']),!_0x211484||_0x211484['isCollapsed']||!_0x4bfe14['newRange']||_0x211484['isEqual'](_0x4bfe14['newRange']))?_0x40f76f['model']['hasContent'](_0x211484)&&!_0x46f8c1?this['isThreadsLoadingPaused']?_0x519f10['add'](_0x2c448f):this['_handleThreadMarker'](_0x2c448f,_0x322629):(_0x2fa74['add'](_0x2c448f),_0x519f10['delete'](_0x2c448f),_0x428391['removeMarker'](_0x2c448f),_0x26c1c9=!0x0):(_0x428391['updateMarker'](_0x2c448f,{'range':_0x211484}),_0x26c1c9=!0x0);}return _0x26c1c9;}),this['on']('change:isThreadsLoadingPaused',(_0x514ba8,_0x37d276,_0x203752)=>{if(!_0x203752&&_0x519f10['size'])for(const _0xfa720c of _0x519f10){const {id:_0x40e507}=er(_0xfa720c);_0x519f10['delete'](_0xfa720c),_0x40f76f['model']['markers']['get'](_0xfa720c)&&this['_handleThreadMarker'](_0xfa720c,_0x40e507);}}),this['listenTo'](_0x40f76f['model']['document'],'change',()=>{for(const {name:_0x40d5a2,data:{newRange:_0x143afa}}of _0x40f76f['model']['document']['differ']['getChangedMarkers']()){const {group:_0x44bba3,id:_0x1d8261}=er(_0x40d5a2);if('comment'!==_0x44bba3)continue;const _0x21768e=_0x1460f7['getCommentThread'](_0x1d8261),_0x205c72=this['hasMarkerForId'](_0x1d8261);_0x21768e&&(!_0x21768e['_hasTargetInContent']&&_0x143afa&&_0x40f76f['editing']['view']['once']('render',()=>{const _0x39ae1b=_0x40f76f['plugins']['get'](O),_0x1be068=_0x1460f7['_threadToController']['get'](_0x21768e)['view'];_0x39ae1b['getByInnerView'](_0x1be068)['refreshVisibility']();},{'priority':'low'}),_0x21768e['_hasTargetInContent']=_0x205c72||!!_0x143afa),_0x143afa||(_0x2fa74['add'](_0x40d5a2),_0x519f10['delete'](_0x40d5a2));}for(const _0x41c540 of _0x2fa74){const {id:_0x4e350a}=er(_0x41c540),_0x46b8c1=_0x1460f7['getCommentThread'](_0x4e350a);if(_0x519f10['delete'](_0x41c540),!_0x46b8c1)continue;const _0x478051=this['hasMarkerForId'](_0x4e350a);_0x478051||_0x46b8c1['isSubmitted']?_0x478051||_0x46b8c1['unlinkedAt']||_0x46b8c1['setUnlinkedAt'](new Date()):_0x46b8c1['remove']();}_0x2fa74['clear']();});}['_handleInitialThreads'](_0x122598){_0x122598['forEach'](_0x2e8e05=>{_0x2e8e05['unlinkedAt']&&this['_attachArchivedThread'](_0x2e8e05['id']);});}['_getTargetForId'](_0x620b98){const _0x116118=this['editor'],_0x11aece=this['getAllMarkersForId'](_0x620b98);return et(_0x116118['editing'],_0x11aece);}['_getTextContext'](_0x3a44a6){const _0x5ce92d=this['getAllMarkersForId'](_0x3a44a6);let _0x1ae51e='',_0x537390=!0x1;for(const _0x49308f of _0x5ce92d){const _0x22202e=_0x49308f['getRange']();for(const _0x3ed605 of Array['from'](_0x22202e['getItems']()))_0x3ed605['is']('$textProxy')?(_0x1ae51e&&_0x537390&&(_0x1ae51e+='\x20',_0x537390=!0x1),_0x1ae51e+=_0x3ed605['data']):_0x537390=!0x0;_0x537390=!0x0;}return _0x1ae51e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x490845,_0x3ce963){const _0x34bfae=this['editor'],_0xcef0b7=_0x34bfae['plugins']['get'](o);let _0x40d78c=_0xcef0b7['getCommentThread'](_0x3ce963);const _0x122a2a=_0x34bfae['config']['get']('collaboration.channelId'),_0x1943bf=_0x34bfae['plugins']['get'](P);if(_0x40d78c&&(_0x40d78c['unlinkedAt']&&_0x40d78c['setUnlinkedAt'](null),_0x40d78c['isAttached']))return _0x40d78c;return!this['getAllMarkersForId'](_0x3ce963)[0x0]['managedUsingOperations']?_0x34bfae['editing']['view']['once']('render',()=>{if(_0xcef0b7['getCommentThread'](_0x3ce963))return;const _0x17871c=_0x34bfae['plugins']['get'](O);_0x40d78c=_0xcef0b7['openNewCommentThread']({'channelId':_0x122a2a,'threadId':_0x3ce963,'target':()=>this['_getTargetForId'](_0x3ce963),'context':{'type':'text','value':this['_getTextContext'](_0x3ce963)}});const _0x51fd6a=_0xcef0b7['_threadToController']['get'](_0x40d78c)['view'],_0x148d16=_0x17871c['getByInnerView'](_0x51fd6a);_0x148d16&&_0x1943bf['registerAnnotation'](_0x148d16);},{'priority':'low'}):_0xcef0b7['fetchCommentThread']({'channelId':_0x122a2a,'threadId':_0x3ce963})['then'](_0x511aed=>{if('destroyed'!==_0x34bfae['state']){if(_0x40d78c=_0x511aed,_0x40d78c&&!_0x40d78c['isAttached']){const _0x43d0b2=_0x40d78c['attachTo'](()=>this['_getTargetForId'](_0x3ce963));_0x1943bf['registerAnnotation'](_0x43d0b2),_0x40d78c['isResolved']&&this['_reconvertMarkers'](_0x3ce963);}else{if(!_0x40d78c){const _0xa179de=this['getAllMarkersForId'](_0x3ce963);_0x34bfae['model']['change'](_0x1a9e25=>{for(const _0x17751a of _0xa179de)_0x1a9e25['removeMarker'](_0x17751a);});}}}}),_0x40d78c;}['_handleThreadMarker'](_0x579c7a,_0x2d4ecc){const _0x4ec8a4=this['_attachMarkerToThread'](_0x579c7a,_0x2d4ecc);_0x4ec8a4&&!_0x4ec8a4['context']&&_0x4ec8a4['setContext']({'type':'text','value':this['_getTextContext'](_0x2d4ecc)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3eec6c=this['editor'];ot(_0x3eec6c['model'],({left:_0x2d9ebe,entered:_0x3439af})=>{for(const _0x101067 of _0x2d9ebe)if(mt(_0x101067)){_0x3eec6c['ui']['ariaLiveAnnouncer']['announce'](E(_0x3eec6c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1367a8 of _0x3439af)if(mt(_0x1367a8)){_0x3eec6c['ui']['ariaLiveAnnouncer']['announce'](E(_0x3eec6c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x566818)));break;}});}}function ft(_0x540272,_0x11b281){return _0x11b281?_0x540272+':'+_0x11b281:_0x540272;}function er(_0x87fb4e){const _0x19f4f7=_0x87fb4e['split'](':');return{'group':_0x19f4f7[0x0],'id':_0x19f4f7[0x1],'part':_0x19f4f7[0x2]};}function dt(_0xfaf88c,_0x28d223){const _0x246f36=_0x28d223['schema'],_0x30e151=_0x28d223['createRange'](_0xfaf88c['start']);for(const _0x186958 of _0xfaf88c['getWalker']()){const {type:_0x4371f5,item:_0xe5ce5f,nextPosition:_0x4d850a}=_0x186958;if('text'===_0x4371f5||_0x246f36['isObject'](_0xe5ce5f)){const _0x36f305=_0x28d223['createPositionBefore'](_0xe5ce5f);_0x30e151['isCollapsed']&&(_0x30e151['start']=_0x36f305),_0x30e151['end']=_0x4d850a;}}return _0x30e151;}function mt(_0x141d3d){return'comment'===er(_0x141d3d['name'])['group'];}class i extends _0xfe9bd5{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x3e0a0b=this['editor'],_0x56279c=_0x3e0a0b['plugins']['get'](o),_0x2ab229=_0x3e0a0b['plugins']['get'](r),_0x5b59cf=_0x3e0a0b['plugins']['get'](O),_0x1ce372=_0x3e0a0b['plugins']['get'](P);_0x3e0a0b['ui']['componentFactory']['add']('comment',()=>{const _0x395ab9=this['_createUIButton'](_0x5e3054);return _0x395ab9['tooltip']=!0x0,_0x395ab9;}),_0x3e0a0b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x2971e2)),_0x1ce372['addSourceCollector'](()=>{const _0xf11b6=[];for(const [_0x183dec,_0x24f112]of _0x56279c['_threadToController']){const _0x12d707=_0x2ab229['getAllMarkersForId'](_0x183dec['id']),_0x701256=_0x12d707['map'](_0x520f52=>_0x520f52['getRange']());_0x12d707['length']>0x0&&_0xf11b6['push']([_0x24f112['view'],_0x701256]);}return _0xf11b6;}),this['listenTo'](_0x5b59cf,'change:activeAnnotations',(_0x1195f9,_0x5c7ab4,_0x4c6e92)=>{const _0x1daa70=Array['from'](_0x4c6e92)['map'](_0x4ad2c8=>_0x4ad2c8['innerView'])['find'](_0x199841=>_0x56279c['_viewToController']['has'](_0x199841));if(!_0x1daa70)return void(_0x2ab229['activeMarker']=null);const _0x23259d=_0x56279c['_viewToController']['get'](_0x1daa70)['model']['id'],_0x3b628d='comment:'+_0x23259d;_0x23259d&&_0x2ab229['hasMarkerForId'](_0x23259d)?_0x2ab229['activeMarker']=_0x3b628d:_0x2ab229['activeMarker']&&(_0x2ab229['activeMarker']=null);}),this['listenTo'](_0x56279c,'removeCommentThread',(_0xedb887,{threadId:_0x209d9d,isFromAdapter:_0x573ea9})=>{!_0x573ea9&&_0x3e0a0b['ui']['focusTracker']['isFocused']&&_0x2ab229['hasMarkerForId'](_0x209d9d)&&_0x3e0a0b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x56279c,'addComment',(_0x12dfcf,{threadId:_0x57f9a1,isFromAdapter:_0xd0a5b0})=>{if(_0xd0a5b0||!_0x2ab229['hasMarkerForId'](_0x57f9a1)||!_0x56279c['hasCommentThread'](_0x57f9a1))return;0x1===_0x56279c['getCommentThread'](_0x57f9a1)['length']&&(_0x3e0a0b['editing']['view']['focus'](),_0x12dfcf['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x53ecdc=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48e298;for(const _0x59185b in _0x53ecdc){const _0x2e6211=_0x59185b,_0x14703f=_0x53ecdc[_0x2e6211];if('commentsLicenseKeyValid'==_0x14703f||'commentsLicenseKeyInvalid'==_0x14703f||'commentsLicenseKeyExpired'==_0x14703f||'commentsLicenseKeyDomainLimit'==_0x14703f||'commentsLicenseKeyNotAllowed'==_0x14703f||'commentsLicenseKeyEvaluationLimit'==_0x14703f||'commentsLicenseKeyTrialLimit'==_0x14703f||'commentsLicenseKeyUsageLimit'==_0x14703f){delete _0x53ecdc[_0x2e6211],_0x48e298=_0x14703f,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x48e298&&_0x53ecdc['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x48e298&&_0x53ecdc['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x48e298&&_0x53ecdc['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x48e298&&_0x53ecdc['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x48e298&&_0x53ecdc['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x48e298&&_0x53ecdc['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x48e298&&_0x53ecdc['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x38cd95){const _0x53602e=this['editor'],_0x1be1ae=new _0x38cd95(_0x53602e['locale']),_0x51d21b=_0x53602e['commands']['get']('addCommentThread');return _0x1be1ae['set']({'label':E(_0x53602e['locale'],'Comment'),'icon':_0xdbf8fb}),_0x1be1ae['bind']('isEnabled')['to'](_0x51d21b),this['listenTo'](_0x1be1ae,'execute',()=>{_0x51d21b['execute']();}),_0x1be1ae;}}class s extends _0xfe9bd5{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x10537b){super(_0x10537b),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5e8902,_0x1d22dc,_0x3a9939)=>{_0x3a9939?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xabb761,_0x5b2bb5]of this['editor']['commands'])_0x5b2bb5['affectsData']&&'addCommentThread'!==_0xabb761&&_0x5b2bb5['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x5c4645=this['editor']['editing']['view']['document'];this['listenTo'](_0x5c4645,'cut',_0x472646=>_0x472646['stop'](),{'priority':'highest'}),this['listenTo'](_0x5c4645,'clipboardInput',_0x9a5811=>_0x9a5811['stop'](),{'priority':'highest'}),this['listenTo'](_0x5c4645,'delete',_0x5d194f=>_0x5d194f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x18e793,_0x27816b]of this['editor']['commands'])_0x27816b['affectsData']&&'addCommentThread'!==_0x18e793&&_0x27816b['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x11dfc6{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdf44bc){super(_0xdf44bc),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xf06f6=this['context']['plugins']['get'](O);this['listenTo'](_0xf06f6,'_activateAnnotation',(_0x235ade,_0x47db1e)=>{for(const _0x23b204 of this['activeUIs']){const _0x1d1c9c=this['_uis']['get'](_0x23b204);(0x0,this['uisData']['get'](_0x23b204)['filter'])(_0x47db1e)&&_0x1d1c9c['setActiveAnnotation'](_0x47db1e);}}),this['listenTo'](_0xf06f6,'_deactivateAllAnnotations',()=>{for(const _0x95d31c of this['activeUIs']){this['_uis']['get'](_0x95d31c)['setActiveAnnotation'](null);}}),this['listenTo'](_0xf06f6['_visibleAnnotations'],'add',(_0x20e36b,_0x5b940a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5b940a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x400b75){return this['activeUIs']['has'](_0x400b75);}['activate'](_0x20ea77,_0x16854b=this['defaultFilter']){const _0xb914b3=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x20ea77))throw new _0x4a9b4a('annotationsuis-missing-ui',this,{'uiName':_0x20ea77});this['isActive'](_0x20ea77)&&this['deactivate'](_0x20ea77),this['activeUIs']['add'](_0x20ea77);const _0x48fdca=new _();!function({source:_0x46d59e,target:_0x2780da,filter:_0x1f1cb5}){for(const _0x3a3144 of _0x46d59e)_0x1f1cb5(_0x3a3144)&&_0x2780da['add'](_0x3a3144);_0x2780da['listenTo'](_0x46d59e,'add',(_0xdac56e,_0x2f4e27)=>{_0x1f1cb5(_0x2f4e27)&&_0x2780da['add'](_0x2f4e27);}),_0x2780da['listenTo'](_0x46d59e,'remove',(_0xe1b2e4,_0x488362)=>{_0x2780da['has'](_0x488362)&&_0x2780da['remove'](_0x488362);});}({'source':_0xb914b3['_visibleAnnotations'],'target':_0x48fdca,'filter':_0x16854b}),this['uisData']['set'](_0x20ea77,{'collection':_0x48fdca,'filter':_0x16854b});const _0x125b13=this['_uis']['get'](_0x20ea77);_0x125b13['attach'](_0x48fdca),this['listenTo'](_0x125b13,'change:activeAnnotation',(_0x272b8f,_0x794754,_0x6c838d,_0x589d59)=>{_0x589d59&&_0xb914b3['_removeActiveAnnotation'](_0x589d59),_0x6c838d&&_0xb914b3['_addActiveAnnotation'](_0x6c838d);});}['deactivate'](_0x271804){if(this['activeUIs']['delete'](_0x271804),!this['_uis']['has'](_0x271804))throw new _0x4a9b4a('annotationsuis-missing-ui',this,{'uiName':_0x271804});const _0x273e26=this['_uis']['get'](_0x271804);_0x273e26['detach'](),this['stopListening'](_0x273e26),this['uisData']['get'](_0x271804)['collection']['destroy'](),this['uisData']['delete'](_0x271804);}['switchTo'](_0x4deeb6){if(!this['_uis']['has'](_0x4deeb6))throw new _0x4a9b4a('annotationsuis-missing-ui',this,{'uiName':_0x4deeb6});const _0x2163dc=this['context']['plugins']['get'](O),_0x27f897=Array['from'](_0x2163dc['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4deeb6);const _0x3fdaff=this['_uis']['get'](_0x4deeb6);_0x3fdaff['setActiveAnnotation'](_0x27f897),_0x3fdaff['_setSelectedAnnotations']&&_0x27f897&&_0x3fdaff['_setSelectedAnnotations']([_0x27f897]);}['deactivateAll'](){for(const _0x28b06b of this['activeUIs'])this['deactivate'](_0x28b06b);}['register'](_0x2c4e28,_0x15796e){if(this['_uis']['has'](_0x2c4e28))throw new _0x4a9b4a('annotationsuis-register-already-registered');if('function'!=typeof _0x15796e['attach']||'function'!=typeof _0x15796e['detach']||'function'!=typeof _0x15796e['setActiveAnnotation'])throw new _0x4a9b4a('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2c4e28,_0x15796e);}['refilterAnnotations'](){const _0x32f690=this['context']['plugins']['get'](O)['collection'],_0x2b72ea=new Map(),_0x524de3=Array['from'](this['activeUIs']);for(const _0x535c2f of this['activeUIs']){const _0x5c693b=this['uisData']['get'](_0x535c2f)['collection'];for(const _0xba7f65 of _0x5c693b)_0x2b72ea['set'](_0xba7f65,_0x535c2f);}for(const _0x3f62f5 of _0x32f690){const _0xe65e30=_0x2b72ea['get'](_0x3f62f5);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3f62f5);const _0x40216d=_0x524de3['find'](_0x388091=>this['uisData']['get'](_0x388091)['filter'](_0x3f62f5));_0xe65e30!==_0x40216d&&(_0xe65e30&&this['uisData']['get'](_0xe65e30)['collection']['remove'](_0x3f62f5),_0x40216d&&this['uisData']['get'](_0x40216d)['collection']['add'](_0x3f62f5));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x9e1787){const _0x5a61ab=[];for(const _0x4ba2f5 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4ba2f5)['filter'])(_0x9e1787)&&_0x5a61ab['push'](_0x4ba2f5);}if(_0x5a61ab['length']>0x1)throw new _0x4a9b4a('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5a61ab,'annotationType':_0x9e1787['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x550ccd){super(_0x550ccd);const _0x5f2a38=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 _0xd81594(),this['focusCycler']=new _0x4bc745({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5f2a38['to']('class')],'style':{'minHeight':_0x5f2a38['to']('minHeight',_0x144077=>'number'==typeof _0x144077?pi(_0x144077+0xa):null)},'dir':_0x550ccd['uiLanguageDirection'],'role':'application','aria-label':E(_0x550ccd,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x550ccd,'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',_0x276880=>{this['_updateItemPositionInFocusables'](_0x276880['source']);}),this['list']['forEach'](_0x2032c8=>{this['focusTracker']['add'](_0x2032c8['element']),this['_updateItemPositionInFocusables'](_0x2032c8);}),this['list']['on']('change',(_0x9c0ef6,_0x3f5cfe)=>{for(const _0x57380e of _0x3f5cfe['removed'])this['focusTracker']['remove'](_0x57380e['element']),this['focusables']['remove'](_0x57380e);for(const _0x441c15 of _0x3f5cfe['added'])this['focusTracker']['add'](_0x441c15['element']),this['_updateItemPositionInFocusables'](_0x441c15);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x394c0f){const _0x1b70ff=this['focusables']['getIndex'](_0x394c0f);let _0x513d7e,_0x26dae0;for(const _0x175762 of this['focusables'])if(_0x394c0f['top']<_0x175762['top']){_0x513d7e=_0x175762;break;}if(_0x26dae0=_0x513d7e?this['focusables']['getIndex'](_0x513d7e):this['focusables']['length'],-0x1!==_0x1b70ff){if(_0x1b70ff===_0x26dae0-0x1)return;this['focusables']['remove'](_0x394c0f),_0x26dae0=_0x513d7e?this['focusables']['getIndex'](_0x513d7e):this['focusables']['length'];}this['focusables']['add'](_0x394c0f,_0x26dae0);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x49d2f9){super(_0x49d2f9),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x41509a,_0x33cb5d)=>_0x41509a+_0x33cb5d),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x33849f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x33849f['to']('isAnimationDisabled',_0x4dca33=>_0x4dca33?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x33849f['to']('top',_0x5b1ec8=>Ht(_0x5b1ec8))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x45298c=this['element']['clientHeight'];_0x45298c&&(this['height']=_0x45298c);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x11dfc6{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x579410){super(_0x579410),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 _0x184ef8=this['context']['config']['get']('sidebar.container');_0x184ef8&&this['setContainer'](_0x184ef8);}['setContainer'](_0x40b8ea){if(!y(_0x40b8ea))throw new _0x4a9b4a('sidebar-setcontainer-invalid-element');this['container']=_0x40b8ea;}['_attachToContainer']({viewClass:_0x59b613='',spaceBetweenItems:_0x204f3a=0x19}={}){if(!y(this['container']))throw new _0x4a9b4a('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x59b613,this['_spaceBetweenItems']=_0x204f3a;}['rearrange']({removedAnnotation:_0x4d29b4,previousAnnotation:_0x2b5bbc,nextAnnotation:_0x455fb6}){const _0x21c84a=this['getSidebarItemView'](_0x4d29b4);this['view']['list']['remove'](_0x21c84a),this['_destroySidebarItemView'](_0x4d29b4),_0x2b5bbc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2b5bbc)),_0x455fb6&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x455fb6)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2a8a22,activatedAnnotation:_0x60b2ed,disableAnimationOnActivatedAnnotation:_0x4aaa41}){if(this['_activeAnnotation']=_0x60b2ed,_0x2a8a22){_0x2a8a22['isActive']=!0x1;const _0x446978=this['getSidebarItemView'](_0x2a8a22);_0x446978&&_0x4aaa41&&(_0x446978['isAnimationDisabled']=!0x1);}if(_0x60b2ed){const _0x36f916=this['getSidebarItemView'](_0x60b2ed);_0x36f916&&(_0x60b2ed['isActive']=!0x0,_0x4aaa41&&(_0x36f916['isAnimationDisabled']=!0x0,_0x36f916['top']+=0x1),this['_alignToTargetRect'](_0x36f916));}}['_detachFromContainer'](_0x326498){if(this['view']['element']['remove'](),_0x326498){for(const _0x1b309c of _0x326498)this['_destroySidebarItemView'](_0x1b309c);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x23fb8f,_0x199643){_0x199643||(_0x199643=_0x23fb8f['view']);const _0x38c87f=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x38c87f,_0x23fb8f),this['_annotationToSidebarItemView']['set'](_0x23fb8f,_0x38c87f),_0x38c87f['content']['add'](_0x199643),this['listenTo'](_0x23fb8f['view'],'change:targetRect',(_0x565196,_0x4e162a,_0x361d01)=>{const _0x647fd3=this['_getTargetTop'](_0x23fb8f,_0x361d01);_0x38c87f['_targetTop']!=_0x647fd3&&(_0x38c87f['_targetTop']=_0x647fd3,this['_setItemTop'](_0x38c87f,_0x647fd3));}),this['listenTo'](_0x38c87f,'change:top',()=>{this['_recalculate'](_0x38c87f,'top');}),this['listenTo'](_0x38c87f,'change:bottom',()=>{this['_recalculate'](_0x38c87f,'bottom');}),this['_alignToTargetRect'](_0x38c87f);const _0x1d0374=this['_getItemBefore'](_0x38c87f);if(_0x1d0374)this['_alignAfterItem'](_0x1d0374,_0x38c87f)||this['_alignToTargetRect'](_0x38c87f);else this['_alignToTargetRect'](_0x38c87f);return this['_updateLastItem'](),this['view']['list']['add'](_0x38c87f),_0x38c87f;}['_alignForTopChange'](_0x23dad0){if(!_0x23dad0['content']['length'])return;const _0xc0a065=this['_getItemBefore'](_0x23dad0);if(!_0xc0a065)return;const _0x2e836c=this['_sidebarItemViewToAnnotation']['get'](_0xc0a065),_0x5363af=this['_activeAnnotation'];_0x5363af&&_0x5363af===_0x2e836c?this['_alignAfterItem'](_0xc0a065,_0x23dad0):this['_alignBeforeItem'](_0x23dad0,_0xc0a065);}['_alignForBottomChange'](_0x2d288d){if(!_0x2d288d['content']['length'])return;const _0x1b7a17=this['_getItemAfter'](_0x2d288d);if(!_0x1b7a17)return;const _0x331d93=this['_sidebarItemViewToAnnotation']['get'](_0x1b7a17),_0x12a0fa=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x410bfe=this['_activeAnnotation'];_0x410bfe&&_0x410bfe===_0x331d93&&_0x12a0fa?(this['_alignBeforeItem'](_0x1b7a17,_0x2d288d),this['_alignAfterItem'](_0x2d288d,_0x1b7a17)):_0x410bfe&&_0x410bfe===_0x331d93?this['_alignBeforeItem'](_0x1b7a17,_0x2d288d):this['_alignAfterItem'](_0x2d288d,_0x1b7a17);}['_recalculate'](_0x3b4d14,_0x532403){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x222d67,changedProp:_0x249fb9}of this['_recalculateBuffer'])'top'===_0x249fb9?this['_alignForTopChange'](_0x222d67):this['_alignForBottomChange'](_0x222d67);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x3b4d14,'changedProp':_0x532403});}['getSidebarItemView'](_0x42a6ca){return this['_annotationToSidebarItemView']['get'](_0x42a6ca);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xe15c6){const _0x25f3eb=this['getSidebarItemView'](_0xe15c6);this['stopListening'](_0x25f3eb),this['stopListening'](_0xe15c6['view']),_0x25f3eb['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xe15c6),this['_sidebarItemViewToAnnotation']['delete'](_0x25f3eb);}['_createSidebarView'](){const _0x229172=new F(this['context']['locale']);return _0x229172['render'](),this['on']('change:_lastItem',(_0x183950,_0x194ce9,_0x163173,_0x1f1320)=>{_0x1f1320&&_0x229172['unbind']('minHeight'),_0x163173?_0x229172['bind']('minHeight')['to'](_0x163173,'bottom'):_0x229172['minHeight']=null;}),_0x229172;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5a86d4){const _0x5a100e=this['_sidebarItemViewToAnnotation']['get'](_0x5a86d4),_0x2e1444=_0x5a100e&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5a100e)-0x1);return _0x2e1444&&this['getSidebarItemView'](_0x2e1444)||null;}['_getItemAfter'](_0x5bd56d){const _0x3ec55d=this['_sidebarItemViewToAnnotation']['get'](_0x5bd56d),_0xe7fef=_0x3ec55d&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3ec55d)+0x1);return _0xe7fef&&this['getSidebarItemView'](_0xe7fef)||null;}['_alignBeforeItem'](_0x2c306d,_0x320ffe){_0x2c306d['updateHeight']();const _0x133d2d=R(_0x320ffe['bottom']+this['_spaceBetweenItems'],_0x2c306d['top']);return!!_0x133d2d&&(this['_setItemTop'](_0x320ffe,_0x320ffe['top']-_0x133d2d),!0x0);}['_alignAfterItem'](_0x5df0a5,_0x55adc3){_0x5df0a5['updateHeight']();const _0x2fc88c=R(_0x5df0a5['bottom']+this['_spaceBetweenItems'],_0x55adc3['top']);return!!_0x2fc88c&&(this['_setItemTop'](_0x55adc3,_0x55adc3['top']+_0x2fc88c,!0x1),!0x0);}['_alignToTargetRect'](_0x5506cd){const _0x1d02f8=this['_sidebarItemViewToAnnotation']['get'](_0x5506cd);if(!_0x1d02f8||!_0x1d02f8['target']||!_0x1d02f8['targetRect'])return;const _0x4ae7e5=this['_getTargetTop'](_0x1d02f8,_0x1d02f8['targetRect']);this['_setItemTop'](_0x5506cd,_0x4ae7e5);}['_getTargetTop'](_0x12bb61,_0x25329c){if(null===_0x25329c)return 0x0;if(_0x12bb61['target']instanceof _0x229aaa)return _0x25329c['top'];{const _0x5c0e65=new _0x229aaa(this['view']['element'])['top'];return _0x25329c['top']-_0x5c0e65;}}['_setItemTop'](_0xbdb891,_0x2a2782,_0x25d198=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x25d198&&(_0x2a2782=Math['max'](_0x2a2782,this['_getMaxAvailableTop'](_0xbdb891))),_0xbdb891['top']=_0x2a2782;}['_getMaxAvailableTop'](_0x2a42ae){let _0x17fa14=this['_getItemBefore'](_0x2a42ae),_0xf9c63d=0x0;for(;_0x17fa14;)_0x17fa14['updateHeight'](),_0xf9c63d+=this['_spaceBetweenItems']+_0x17fa14['height'],_0x17fa14=this['_getItemBefore'](_0x17fa14);return _0xf9c63d;}}function R(_0x530b14,_0x5bf46e){return Math['max'](_0x530b14-_0x5bf46e,0x0);}function y(_0x2d61ca){return null!==_0x2d61ca&&'object'==typeof _0x2d61ca&&0x1===_0x2d61ca['nodeType'];}class e extends _0x11dfc6{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1a336d){super(_0x1a336d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x11e188(),this['_refreshPositioningDebounced']=_0x3ad571(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x446674=this['context']['plugins']['get'](M),_0x1d4bc4=this['context']['plugins']['get'](z);_0x446674['register']('wideSidebar',this),_0x1d4bc4['container']&&_0x446674['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x25a2e9){if(_0x25a2e9===this['activeAnnotation'])return;const _0xda9125=this['context']['plugins']['get'](z);_0xda9125['_activeAnnotation']=_0x25a2e9;const _0x40d82f=this['activeAnnotation'];_0xda9125['refresh']({'blurredAnnotation':_0x40d82f,'activatedAnnotation':_0x25a2e9}),this['activeAnnotation']=_0x25a2e9;}['attach'](_0x1e0f19){this['annotations']=_0x1e0f19;const _0x3d5df3=this['context']['plugins']['get'](z);if(_0x3d5df3['_annotations']=_0x1e0f19,this['isAttached'])throw new _0x4a9b4a('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3d5df3,'set:container',()=>{this['detach'](),this['listenTo'](_0x3d5df3,'change:container',_0x8fc197=>{_0x8fc197['off'](),this['attach'](_0x1e0f19);});}),_0x3d5df3['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x243493=_0x401b01=>{_0x401b01['updateTargetRect'](),_0x3d5df3['addAnnotation'](_0x401b01);};for(const _0x593995 of _0x1e0f19)_0x243493(_0x593995);this['listenTo'](_0x1e0f19,'add',(_0x21e728,_0x5466fd)=>{_0x243493(_0x5466fd);}),this['listenTo'](_0x1e0f19,'remove',(_0x3ea3e4,_0x1ae75f,_0x57b8cf)=>{_0x3d5df3['rearrange']({'removedAnnotation':_0x1ae75f,'previousAnnotation':_0x1e0f19['get'](_0x57b8cf-0x1),'nextAnnotation':_0x1e0f19['get'](_0x57b8cf+0x1)}),_0x1ae75f===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1e0f19,'focus',(_0x1c9cb7,_0x31a024)=>{this['setActiveAnnotation'](_0x31a024);}),this['listenTo'](_0x1e0f19,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2c0ea1=this['context']instanceof _0x176874?this['context']['editors']:new _0x11e188([this['context']]);for(const _0x16a738 of _0x2c0ea1)this['_integrateWithEditorAnnotations'](_0x16a738);this['listenTo'](_0x2c0ea1,'add',(_0x447340,_0x2cbfe1)=>{this['listenTo'](_0x2cbfe1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2cbfe1);});}),this['listenTo'](_0x2c0ea1,'remove',(_0x224737,_0x15785a)=>{_0x15785a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x15785a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x4a9b4a('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x491067=this['context']['plugins']['get'](z);_0x491067['_detachFromContainer'](this['annotations']),this['stopListening'](_0x491067),this['stopListening'](this['annotations']),this['context']instanceof _0x176874&&this['stopListening'](this['context']['editors']);for(const _0x290191 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x290191);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x3922c5){if(!_0x3922c5['plugins']['has']('EditorAnnotations'))return;const _0x1501a6=_0x3922c5['plugins']['get']('EditorAnnotations'),_0x2ab96a=()=>{const _0x1fcdcd=_0x1501a6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1fcdcd[0x0]||null);};this['listenTo'](_0x1501a6,'refresh',_0x2ab96a),this['listenTo'](_0x1501a6,'blur',(_0x47403b,{isAnnotationTracked:_0x3bc7df})=>{this['activeAnnotation']&&_0x3bc7df(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1501a6,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x334a98=>{_0x1501a6['hasDomSelection']()&&(_0x2ab96a(),_0x334a98['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1501a6);}['_destroyEditorAnnotationsIntegration'](_0x3bb43f){this['stopListening'](_0x3bb43f),this['_editorAnnotations']['remove'](_0x3bb43f);}}class C extends _0x5e3054{['counterView'];constructor(_0x50e3a2){super(_0x50e3a2);const _0x4cba1c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x517ff7,_0x2f11d8)=>_0x517ff7?'...':_0x2f11d8['toString']()),this['set']('annotationType',''),this['icon']=_0xdbf8fb,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4cba1c['to']('annotationType',_0x3c28ce=>'ck-annotation-counter__badge--'+_0x3c28ce),_0x4cba1c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4cba1c['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x11dfc6{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x263b3d){super(_0x263b3d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x317c37),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x11e188(),this['_refreshPositioningDebounced']=_0x3ad571(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4ffd49(this['context']['locale']),this['balloonPanelView']=new _0x38aab7(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x13372d){this['annotations']=_0x13372d;const _0x295e87=this['context']['plugins']['get'](z),_0x3501ef=this['balloonPanelView'];if(_0x295e87['_annotations']=_0x13372d,this['isAttached'])throw new _0x4a9b4a('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x295e87,'set:container',()=>{this['detach'](),this['listenTo'](_0x295e87,'change:container',_0x10a127=>{_0x10a127['off'](),this['attach'](_0x13372d);});}),_0x295e87['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3a2bb6=_0x229d0a=>{const _0x918db4=new C(this['context']['locale']);_0x295e87['addAnnotation'](_0x229d0a,_0x918db4),this['_annotationToNarrowView']['set'](_0x229d0a,_0x918db4),_0x918db4['bind']('isDirty','annotationType','number')['to'](_0x229d0a['view'],'isDirty','type','length'),_0x918db4['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3501ef['content']['first']!==_0x229d0a['view']?(this['_showBalloon'](_0x229d0a),_0x229d0a['view']['element']['focus'](),this['setActiveAnnotation'](_0x229d0a)):this['setActiveAnnotation'](null);});};for(const _0xc96e33 of _0x13372d)_0x3a2bb6(_0xc96e33);this['listenTo'](_0x13372d,'add',(_0x4e9899,_0x509ff9)=>{_0x3a2bb6(_0x509ff9);}),this['listenTo'](_0x13372d,'remove',(_0x182fef,_0x4d6be9,_0x22a833)=>{this['_annotationToNarrowView']['get'](_0x4d6be9)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4d6be9),_0x295e87['rearrange']({'removedAnnotation':_0x4d6be9,'previousAnnotation':_0x13372d['get'](_0x22a833-0x1),'nextAnnotation':_0x13372d['get'](_0x22a833+0x1)}),_0x4d6be9===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x13372d,'focus',(_0x574233,_0x4e8800)=>{this['setActiveAnnotation'](_0x4e8800);}),this['listenTo'](_0x13372d,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3f8007,_0x3860c)=>{_0x3860c['keyCode']===_0x72709['esc']&&_0x3501ef['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3501ef['content']['first']),this['_hideBalloon'](),_0x3860c['stopPropagation'](),_0x3860c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x8b6d7c,_0x15aa36)=>{const _0x241dea=_0x15aa36['target'];_0x3501ef['isVisible']&&_0x3501ef['element']['contains'](_0x241dea)||_0x295e87['view']['element']['contains'](_0x241dea)||_0x8b6d7c['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x510346=>_0x510346['contains'](_0x241dea))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2f96e8=this['context']instanceof _0x176874?this['context']['editors']:new _0x11e188([this['context']]);for(const _0x3324aa of _0x2f96e8)this['_integrateWithEditorAnnotations'](_0x3324aa);this['listenTo'](_0x2f96e8,'add',(_0x51926e,_0x23e85b)=>{this['listenTo'](_0x23e85b,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x23e85b);});}),this['listenTo'](_0x2f96e8,'remove',(_0x1f2271,_0x30b532)=>{_0x30b532['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x30b532['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5826af){if(_0x5826af===this['activeAnnotation'])return;const _0x637b07=this['context']['plugins']['get'](z);if(_0x637b07['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5826af,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5826af)_0x637b07['getSidebarItemView'](_0x5826af)?this['_showBalloon'](_0x5826af):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5826af;}['detach'](){if(!this['isAttached'])throw new _0x4a9b4a('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x11a93e=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x177d57=>_0x177d57['destroy']()),this['_annotationToNarrowView']['clear'](),_0x11a93e['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x176874&&this['stopListening'](this['context']['editors']);for(const _0x5c08dc of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5c08dc);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'](_0x1f8b97){if(!_0x1f8b97['plugins']['has']('EditorAnnotations'))return;const _0x1b7844=_0x1f8b97['plugins']['get']('EditorAnnotations'),_0x20de72=this['context']['plugins']['get'](z),_0x3c82d=this['annotations'],_0x24f9bf=this['balloonPanelView'],_0x1d1972=()=>{const _0x1e12db=_0x1b7844['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1e12db),this['setActiveAnnotation'](_0x1e12db[0x0]||null);};this['listenTo'](_0x1b7844,'refresh',_0x1d1972),this['listenTo'](_0x1b7844,'blur',(_0x292949,{isAnnotationTracked:_0x31ba0c})=>{this['activeAnnotation']&&_0x31ba0c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1b7844,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3c82d,'blur',_0x161e14=>{_0x1b7844['hasDomSelection']()&&_0x161e14['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x41a1f8,_0x633785)=>{const _0x4b2fe7=_0x633785['target'];_0x24f9bf['isVisible']&&_0x24f9bf['element']['contains'](_0x4b2fe7)||_0x20de72['view']['element']['contains'](_0x4b2fe7)||this['activeAnnotation']&&_0x1b7844['hasDomSelection']()&&(_0x1d1972(),_0x41a1f8['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1b7844);}['_destroyEditorAnnotationsIntegration'](_0x554cdb){_0x554cdb&&(this['stopListening'](_0x554cdb),this['_editorAnnotations']['remove'](_0x554cdb));}['_setSelectedAnnotations'](_0x4ea041){for(const _0x40cd61 of this['_selectedAnnotations'])_0x4ea041['includes'](_0x40cd61)||this['_manuallyClosedAnnotationViews']['delete'](_0x40cd61['view']);this['_selectedAnnotations']=_0x4ea041;}['_refreshPositioning'](){const _0x218d9e=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x218d9e['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4663e0){if(this['_manuallyClosedAnnotationViews']['has'](_0x4663e0['view']))return;const _0x340e13=this['balloonPanelView']['content']['first'];_0x340e13!==_0x4663e0['view']?(_0x340e13&&this['_detachListeners'](_0x340e13),this['_attachListeners'](_0x4663e0['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4663e0['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x254e62=this['balloonPanelView']['content']['first'],_0x4678cc=_0x254e62&&this['annotations']['getByView'](_0x254e62);if(!_0x4678cc||!this['_annotationToNarrowView']['has'](_0x4678cc))return;const _0x3be64d=this['_annotationToNarrowView']['get'](_0x4678cc)['element'],_0x2a3ebf=(function(){const _0x47e5c0=_0x38aab7['defaultPositions'];return[_0x47e5c0['southArrowNorthEast'],_0x47e5c0['northArrowSouthEast'],_0x47e5c0['southArrowNorth'],_0x47e5c0['northArrowSouth'],_0x47e5c0['southArrowNorthWest'],_0x47e5c0['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x3be64d,'positions':_0x2a3ebf});}['_hideBalloon'](){const _0x445a00=this['balloonPanelView'],_0x3f0cc9=_0x445a00['content']['first'];_0x3f0cc9&&(this['_detachListeners'](_0x3f0cc9),_0x445a00['unpin'](),_0x445a00['content']['clear']());}['_attachListeners'](_0x42c29f){this['listenTo'](_0x42c29f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x42c29f,'Esc',(_0x4cd241,_0x15416e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x42c29f),this['_hideBalloon'](),_0x15416e();});}['_detachListeners'](_0x332738){this['stopListening'](_0x332738);}}class c extends _0xfe9bd5{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x23f0a9,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x160cf4){super(_0x160cf4),_0x160cf4['editing']['view']['addObserver'](_0x1f961f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x160cf4['plugins']['get'](_0x23f0a9),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x3e5bbc=this['editor']['plugins']['get'](M);_0x3e5bbc['context']===this['editor']&&(_0x3e5bbc['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x812909,_0x1180a8)=>{const _0x4f6d92=this['_balloon'];if(this['isAttached']&&_0x4f6d92['visibleView']){const _0x4235c7=this['annotations']['getByView'](_0x4f6d92['visibleView']);_0x4235c7&&this['_closeAnnotation'](_0x4235c7),_0x1180a8();}}));}['afterInit'](){const _0x7567db=this['editor']['plugins']['get'](M);_0x7567db['context']===this['editor']&&(_0x7567db['hasActive']()||_0x7567db['switchTo']('inline'));}['setActiveAnnotation'](_0x21d29a){_0x21d29a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x21d29a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x21d29a)&&this['_addAnnotationToBalloon'](_0x21d29a,!0x0),_0x21d29a['isActive']=!0x0),_0x21d29a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x21d29a);}['attach'](_0x15b3bf){this['annotations']=_0x15b3bf;const _0x1e2a39=this['editor']['plugins']['get'](M),_0x48d092=this['_balloon'];if(this['isAttached'])throw new _0x4a9b4a('inlineannotations-attach-already-attached',this);if(_0x1e2a39['context']!==this['editor'])throw new _0x4a9b4a('inlineannotations-not-allowed-with-context',this);const _0x97938c=this['editor']['plugins']['get'](P);this['listenTo'](_0x97938c,'refresh',()=>{const _0x48e9d2=_0x97938c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x11ea45,_0x58c1ca;!this['_forceRefresh']&&(_0x11ea45=_0x48e9d2,_0x58c1ca=this['_selectedAnnotations'],_0x11ea45['length']===_0x58c1ca['length']&&_0x11ea45['every'](_0x1240d5=>_0x58c1ca['includes'](_0x1240d5)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x48e9d2),this['setActiveAnnotation'](_0x48e9d2[0x0]||null));}),this['listenTo'](_0x97938c,'blur',(_0x53e246,{isAnnotationTracked:_0x378872})=>{this['activeAnnotation']&&_0x378872(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2ba666,_0x585970,_0x571b41)=>{_0x571b41||this['setActiveAnnotation'](null);}),this['listenTo'](_0x15b3bf,'remove',(_0x53bd21,_0x5b789c)=>{this['_removeAnnotationFromBalloon'](_0x5b789c),_0x5b789c===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x48d092,'change:visibleView',(_0x38e96b,_0x44a5a4,_0x41a454,_0x4f1324)=>{_0x4f1324&&this['stopListening'](_0x4f1324);const _0x14718e=_0x15b3bf['getByView'](_0x41a454);_0x41a454&&_0x14718e&&(this['listenTo'](_0x41a454,'change:height',()=>{_0x48d092['updatePosition']();}),this['listenTo'](_0x41a454,'Esc',()=>{this['_closeAnnotation'](_0x14718e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x14718e&&this['setActiveAnnotation'](_0x14718e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x48d092['visibleView']&&(_0x15b3bf['getByView'](_0x48d092['visibleView'])&&_0x48d092['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 _0x4a9b4a('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x44c73c of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x44c73c);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x36c2e1){for(const _0x2bdcd1 of this['_selectedAnnotations'])_0x36c2e1['includes'](_0x2bdcd1)||this['_manuallyClosed']['delete'](_0x2bdcd1);for(const _0xd38ee5 of this['annotations'])_0x36c2e1['includes'](_0xd38ee5)||this['_removeAnnotationFromBalloon'](_0xd38ee5);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x56a426 of _0x36c2e1)this['_addAnnotationToBalloon'](_0x56a426);}this['_selectedAnnotations']=_0x36c2e1;}['_addAnnotationToBalloon'](_0x5663a7,_0x27f0bc=!0x1){this['_manuallyClosed']['has'](_0x5663a7)||(this['_addedAnnotations']['has'](_0x5663a7)||this['_balloon']['hasView'](_0x5663a7['view'])||(this['_addedAnnotations']['add'](_0x5663a7),this['_balloon']['add']({'stackId':_0x5663a7['view']['id'],'view':_0x5663a7['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5663a7)}})),_0x27f0bc&&this['_balloon']['showStack'](_0x5663a7['view']['id']));}['_getBalloonTargetForAnnotation'](_0x27495d){const _0x34c52f=_0x27495d['target'],_0x458744=this['editor']['editing']['view'],_0x5701a9=_0x458744['document']['selection']['getFirstRange'](),_0x54a1b9=_0x458744['domConverter']['viewRangeToDom'](_0x5701a9);if(_0x54a1b9['collapse'](!0x0),_0x34c52f){if(_0x34c52f instanceof _0x229aaa)return _0x34c52f;let _0x28d850=[];for(const _0x577aad of _0x34c52f)_0x28d850['push'](...(_0xd405f=_0x577aad['getClientRects'](),Array['from'](_0xd405f)['map'](DOMRect['fromRect'])));_0x28d850=function(_0x1b2fed){const _0x59a3b2=[];let _0x281775=_0x1b2fed[0x0];for(let _0x1d3e4c=0x1;_0x1d3e4c<_0x1b2fed['length'];_0x1d3e4c++)B(_0x281775,_0x1b2fed[_0x1d3e4c])?_0x281775['width']+=_0x1b2fed[_0x1d3e4c]['width']:(_0x59a3b2['push'](_0x281775),_0x281775=_0x1b2fed[_0x1d3e4c]);return _0x59a3b2['push'](_0x281775),_0x59a3b2;}(_0x28d850);const _0x435e29=_0x54a1b9['getBoundingClientRect']();return _0x28d850['find'](_0x520893=>_0x520893['top']<=_0x435e29['top']&&_0x520893['bottom']>=_0x435e29['bottom']&&_0x520893['left']<=_0x435e29['left']&&_0x520893['right']>=_0x435e29['right'])||_0x28d850[0x0];}var _0xd405f;return _0x27495d['targetRect']||_0x54a1b9;}['_removeAnnotationFromBalloon'](_0x196e18){this['_addedAnnotations']['has'](_0x196e18)&&this['_balloon']['hasView'](_0x196e18['view'])&&(this['_addedAnnotations']['delete'](_0x196e18),this['_balloon']['remove'](_0x196e18['view']));}['_closeAnnotation'](_0xa0c90a){this['_manuallyClosed']['add'](_0xa0c90a),this['_removeAnnotationFromBalloon'](_0xa0c90a);}}function B(_0x5ec7ac,_0x226781){return _0x5ec7ac['top']===_0x226781['top']&&_0x5ec7ac['bottom']===_0x226781['bottom']&&_0x5ec7ac['right']===_0x226781['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x321f9d,_0x5ef1fd){super(_0x321f9d),this['set']('isEmpty',!_0x5ef1fd['length']),this['focusTracker']=new _0xd81594(),this['_annotationViews']=_0x5ef1fd,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4bc745({'focusables':_0x5ef1fd,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5ef1fd,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5ef1fd,'remove',(_0x1eef1f,_0x1b9317)=>{_0x1b9317['isActive']&&this['focus'](),_0x5ef1fd['length']||(this['isEmpty']=!0x0);});const _0x1d9757=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x321f9d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5ef1fd},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1d9757['if']('isEmpty','ck-hidden',_0x50b63a=>!_0x50b63a)]},'children':[{'text':E(_0x321f9d,'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 _0x5e5644 of this['_annotationViews'])this['focusTracker']['add'](_0x5e5644['element']);this['_annotationViews']['on']('change',(_0x2295e8,{added:_0x2cee62,removed:_0x5f1fce})=>{for(const _0x381cf9 of _0x2cee62)this['focusTracker']['add'](_0x381cf9['element']);for(const _0x22cec9 of _0x5f1fce)this['focusTracker']['remove'](_0x22cec9['element']);});}}class f extends _0x11dfc6{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x261f4f){super(_0x261f4f),this['archivedThreads']=new _0x11e188();}['init'](){const _0x1e867b=this['context'],_0x55bdd3=_0x1e867b['plugins']['get'](o),_0x30525f=_0x1e867b['plugins']['get'](O);this['listenTo'](_0x55bdd3,'addCommentThread',(_0x35d34d,{threadId:_0xa737f9})=>{const _0x1e3fcb=_0x55bdd3['getCommentThread'](_0xa737f9);_0x1e3fcb['archivedAt']&&this['archivedThreads']['add'](_0x1e3fcb,this['_calculatePosition'](_0x1e3fcb['archivedAt'])),this['listenTo'](_0x1e3fcb,'change:archivedAt',(_0x838ca7,_0x418401,_0x51ca5a)=>{_0x51ca5a?this['archivedThreads']['has'](_0x1e3fcb)||this['archivedThreads']['add'](_0x1e3fcb,this['_calculatePosition'](_0x1e3fcb['archivedAt'])):this['archivedThreads']['has'](_0x1e3fcb)&&this['archivedThreads']['remove'](_0x1e3fcb);});}),this['listenTo'](_0x55bdd3,'removeCommentThread',(_0x1ed8ab,{threadId:_0x2385e7})=>{const _0x558e56=_0x55bdd3['getCommentThread'](_0x2385e7);this['stopListening'](_0x558e56),this['archivedThreads']['has'](_0x558e56)&&this['archivedThreads']['remove'](_0x558e56);},{'priority':'highest'}),this['listenTo'](_0x30525f['collection'],'focus',(_0x4e4106,_0x1434e4)=>{_0x1434e4['isVisible']||(_0x1434e4['isActive']=!0x0,_0x30525f['activate'](_0x1434e4));});}['_calculatePosition'](_0x2364b1){const _0x35dd67=[...this['archivedThreads']]['findIndex'](_0x21a1df=>_0x21a1df['archivedAt']<_0x2364b1);return _0x35dd67>-0x1?_0x35dd67:this['archivedThreads']['length'];}}class a extends _0xfe9bd5{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x2ea84c];}constructor(_0x18f599){super(_0x18f599),this['annotationViews']=new _0x43a8d4(),this['_pendingThreads']=[];}['init'](){const _0x40ae6e=this['editor'],_0x253122=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x40ae6e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5e3054,!0x0)),_0x40ae6e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x359c3b=this['_createCommentsArchiveButton'](_0x2971e2);return _0x359c3b['set']({'role':'menuitemcheckbox'}),_0x359c3b;});const _0x5a0e9f=_0x40ae6e['plugins']['get'](f),_0x57ebea=_0x40ae6e['plugins']['get']('Annotations'),_0x494561=_0x40ae6e['plugins']['get']('CommentsRepository');_0x5a0e9f['archivedThreads']['forEach'](_0x509473=>{this['_handleNewThread'](_0x509473);}),this['listenTo'](_0x5a0e9f['archivedThreads'],'add',(_0x3a6ad7,_0x211377)=>{this['_handleNewThread'](_0x211377);}),this['listenTo'](_0x57ebea['collection'],'add',(_0x36a650,_0x5a7b64)=>{const _0x3888f7=this['_pendingThreads']['find'](_0x1ab191=>{const _0x3e5101=_0x494561['_threadToController']['get'](_0x1ab191);return _0x3e5101&&_0x5a7b64['innerView']===_0x3e5101['view'];});if(_0x3888f7){const _0x3959d7=this['_calculatePosition'](_0x3888f7['archivedAt']);this['annotationViews']['add'](_0x5a7b64['view'],_0x3959d7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3888f7),0x1);}}),this['listenTo'](_0x5a0e9f['archivedThreads'],'remove',(_0x37c47a,_0x306fd7)=>{const _0x45d685=_0x40ae6e['config']['get']('collaboration.channelId');if(!_0x45d685||_0x306fd7['channelId']===_0x45d685){if(this['_pendingThreads']['includes'](_0x306fd7))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x306fd7),0x1);else{const _0x172928=_0x494561['_threadToController']['get'](_0x306fd7),_0x51e4cf=_0x57ebea['getByInnerView'](_0x172928['view']);this['annotationViews']['remove'](_0x51e4cf['view']),this['stopListening'](_0x51e4cf['focusableElements']);}}}),this['listenTo'](_0x57ebea['collection'],'add',(_0x7f660b,_0x1b6e15)=>{this['listenTo'](_0x1b6e15,'escape',_0x253122);}),this['listenTo'](_0x57ebea['collection'],'remove',(_0x57eb00,_0x2d857d)=>{this['stopListening'](_0x2d857d,'escape',_0x253122);});}['_handleNewThread'](_0x2555ca){const _0x20f4eb=this['editor']['plugins']['get']('CommentsRepository'),_0xf83685=this['editor']['plugins']['get']('Annotations'),_0x24e9d0=this['editor']['config']['get']('collaboration.channelId');if(!_0x24e9d0||_0x2555ca['channelId']===_0x24e9d0){const _0x3f279d=_0x20f4eb['_threadToController']['get'](_0x2555ca);if(!_0x3f279d)return void this['_pendingThreads']['push'](_0x2555ca);const _0x3e5f5d=this['_calculatePosition'](_0x2555ca['archivedAt']),_0x298268=_0xf83685['getByInnerView'](_0x3f279d['view']);_0x298268['isVisible']&&_0xf83685['_visibleAnnotations']['remove'](_0x298268),this['annotationViews']['add'](_0x298268['view'],_0x3e5f5d);}}['_calculatePosition'](_0x1fe1ed){const _0x552341=this['editor']['config']['get']('collaboration.channelId'),_0x4abb02=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0xce2a75=>_0xce2a75['channelId']===_0x552341)['findIndex'](_0xa66366=>_0xa66366['archivedAt']<_0x1fe1ed);return _0x4abb02<0x0||_0x4abb02>this['annotationViews']['length']?this['annotationViews']['length']:_0x4abb02-0x1;}['_toggleDialog'](){const _0x17b8f4=this['editor'],_0x2dbdb2=_0x17b8f4['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x17b8f4['locale'],this['annotationViews'])),'commentsArchive'===_0x2dbdb2['id']?_0x2dbdb2['hide']():_0x2dbdb2['show']({'id':'commentsArchive','title':E(_0x17b8f4['locale'],'COMMENTS_ARCHIVE'),'icon':_0xa53eed,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x481f5f['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1ded75,_0x120883=!0x1){const _0x55fd09=this['editor']['locale'],_0x3ce905=this['editor']['plugins']['get']('Dialog'),_0x1f044a=new _0x1ded75(_0x55fd09);return _0x1f044a['bind']('isEnabled')['to'](this,'isEnabled'),_0x1f044a['bind']('isOn')['to'](_0x3ce905,'id',_0x389480=>'commentsArchive'===_0x389480),_0x1f044a['set']({'label':E(_0x55fd09,'COMMENTS_ARCHIVE'),'icon':_0xa53eed,'isToggleable':!0x0}),_0x120883&&(_0x1f044a['tooltip']=!0x0),this['listenTo'](_0x1f044a,'execute',()=>this['_toggleDialog']()),_0x1f044a;}['_hideDialogOnAnnotationEscape']=_0x49c144=>{const _0x437336=_0x49c144['source'];if(!this['annotationViews']['has'](_0x437336['view']))return;const _0x25ef16=this['editor']['plugins']['get']('Dialog');_0x25ef16['isOpen']&&'commentsArchive'===_0x25ef16['id']&&(_0x25ef16['hide'](),_0x49c144['stop']());};}class p extends _0xfe9bd5{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x180d0b,ContextPlugin as _0x1318aa,PendingActions as ht,Command as _0x3906d3,Plugin as _0x387cbb,Context as _0x3fe096}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1f969f,uid as _0x437d75,KeystrokeHandler as jt,FocusTracker as _0x1e0a9c,diff as _0xb268bd,Collection as _0x41f317,Rect as _0x521279,CKEditorError as _0x3b16ef,first as _0x338d21,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as xt,DomEmitterMixin as _0x12c5b6,keyCodes as _0x16ee43}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2e8d01,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x165d9b,trimHtml as _0x8bcdb6,LateFocusDropdownButtonView as _0x1b159b,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x10ebc1}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as yt,debounce as _0x5d89fe}from'es-toolkit/compat';import{IconUndo as _0x29628a,IconCheck as _0x164183,IconPencil as _0x5ea246,IconRemoveComment as _0xac44fb,IconThreeVerticalDots as _0x7d1dda,IconAddComment as _0x5e46cc,IconCommentsArchive as _0x17f915}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Vt,InlineEditableUIView as $t,EditorUI as Rt,View as kt,FocusCycler as _0x1ca448,ButtonView as _0x5134f9,ViewCollection as _0x4d7b71,createDropdown as _0x4c42d1,ListView as _0x34d210,focusChildOnDropdownOpen as _0x2a5d8c,ListItemView as _0x6b580e,MenuBarMenuListItemButtonView as _0x180ec2,BodyCollection as _0x172d8b,BalloonPanelView as _0x39e067,ContextualBalloon as _0x5f439b,Dialog as _0x2afe41,DialogViewPosition as _0x1c0c65}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as St,enablePlaceholder as Ft,MouseObserver as _0x5a2c11}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x298e25}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x43117b}from'@ckeditor/ckeditor5-widget/dist/index.js';class Ct extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1f969f(){['model'];['view'];constructor(_0x46214f,_0x5d31a1){super(),this['model']=_0x46214f,this['model']['_isAttached']=!0x0,this['view']=_0x5d31a1,this['listenTo'](_0x5d31a1,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x5d31a1,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x5d31a1,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x5d31a1,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x5d31a1,'addComment',(_0x2ec2ab,_0x1ab1ca)=>this['addComment'](_0x1ab1ca)),this['listenTo'](_0x5d31a1,'updateComment',(_0x44eeb7,_0x146553,_0x2da9d0)=>this['updateComment'](_0x146553,_0x2da9d0)),this['listenTo'](_0x5d31a1,'removeComment',(_0x58ccfb,_0x38fb32)=>this['removeComment'](_0x38fb32));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x23cef8){this['model']['addComment']({'content':_0x23cef8,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3ef7fb,_0x28be33){this['model']['getComment'](_0x3ef7fb)['update']({'content':_0x28be33});}['removeComment'](_0x125088){this['model']['getComment'](_0x125088)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function E(_0xa2cf59,_0x3dc552,_0xa13b2b){const t=_0xa2cf59['t'];switch(_0x3dc552){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'},_0xa13b2b);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'},_0xa13b2b);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'},_0xa13b2b);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'},_0xa13b2b);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0xa13b2b);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'},_0xa13b2b);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'},_0xa13b2b);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'},_0xa13b2b);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 Ut extends Vt{['main'];['editable'];constructor(_0x24da8b,_0x2ff5f7){super(_0x24da8b);const _0x52b1e2=_0x437d75();this['main']=this['createCollection'](),this['editable']=new $t(_0x24da8b,_0x2ff5f7,void 0x0,{'label':()=>E(_0x24da8b,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x24da8b['uiLanguageDirection'],'lang':_0x24da8b['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x52b1e2},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Rt{['view'];constructor(_0x133659){super(_0x133659),this['view']=new Ut(_0x133659['locale'],_0x133659['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x10c9bf=this['editor']['editing']['view'],_0x2a8024=this['view']['editable'],_0x584da5=_0x10c9bf['document']['getRoot']();_0x2a8024['name']=_0x584da5['rootName'],this['view']['render']();const _0x372a48=_0x2a8024['element'];this['setEditableElement'](_0x2a8024['name'],_0x372a48),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x10c9bf['attachDomRoot'](_0x372a48),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1f969f(_0x180d0b){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x55f216={}){function _0xedb00d(_0x5ea659){return _0x5ea659['map'](_0x48692e=>String['fromCharCode'](_0x48692e))['join']('');}(_0x55f216=Object['assign']({},_0x55f216))['plugins']||(_0x55f216['plugins']=Qt['defaultPlugins']),super(_0x55f216),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xedb00d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xedb00d([0x76,0x69,0x65,0x77])][_0xedb00d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xedb00d([0x61,0x75,0x74,0x6f]),this[_0xedb00d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xedb00d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xedb00d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xedb00d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xedb00d([0x6f,0x6b])});}['create'](){const _0x5aea8f=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5aea8f))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x375d23=>{const _0xc620f1=this['model']['document']['getRoot'](),_0x25d1c2=_0xc620f1&&_0xc620f1['getChild'](_0xc620f1['childCount']-0x1);_0x375d23['setSelection'](_0x25d1c2,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x101de4=this['editing']['view'],_0x2c827a=_0x101de4['document']['getRoot'](),_0x178225=_0x2c827a['getChild'](0x0);_0x2c827a['childCount']>0x1||!_0x178225||'p'!=_0x178225['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x101de4,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x178225['placeholder']=this['placeholder']),Ft({'view':_0x101de4,'element':_0x178225,'keepOnFocus':!0x0}),this['placeholderElement']=_0x178225);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x5d1c9a,_0x53ded0={}){super(_0x5d1c9a),this['editor']=null,this['_editorConfig']=_0x53ded0,this['set']('value',_0x53ded0['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',E(_0x5d1c9a,'Reply...')),this['set']('submitLabel',E(_0x5d1c9a,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1e0a9c(),this['focusCycler']=new _0x1ca448({'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',(_0x4990ac,_0x3e48cd)=>{this['cancelButtonView']['fire']('execute'),_0x3e48cd();}),this['keystrokes']['set']('Ctrl+Enter',(_0x6b68aa,_0x485956)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x485956());}),this['on']('submit',(_0x19ea4d,_0x3336b1)=>{_0x3336b1['length']>0xfde8?(alert(E(_0x5d1c9a,'TOO_LONG_COMMENT_ALERT',[_0x3336b1['length'],0xfde8])),_0x19ea4d['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x2f716d=this['editor'];this['element']['insertBefore'](_0x2f716d['ui']['element'],this['element']['firstChild']),_0x2f716d['model']['document']['on']('change',()=>this['value']=_0x2f716d['getData']()),_0x2f716d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x2f716d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4b4057){-0x1===_0x4b4057?(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:_0x457148}=this,_0x396de2=new _0x5134f9(_0x457148);return _0x396de2['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x396de2['withText']=!0x0,_0x396de2['bind']('label')['to'](this,'submitLabel'),_0x396de2['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x396de2['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x180075,_0x25aabf)=>!_0x25aabf&&!!_0x180075['trim']()),_0x396de2;}['_createCancelButton'](){const {locale:_0x5a59be}=this,_0x2ff87c=new _0x5134f9(_0x5a59be);return _0x2ff87c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2ff87c['label']=E(_0x5a59be,'Cancel'),_0x2ff87c['withText']=!0x0,_0x2ff87c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2ff87c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3c070f=>{this['focusTracker']['add'](_0x3c070f['element']);}),this['focusables']['on']('change',(_0x53e709,_0x5cc70d)=>{for(const _0x2ea00f of Array['from'](_0x5cc70d['added'])['reverse']())this['focusTracker']['add'](_0x2ea00f['element']);});}}class ie extends kt{constructor(_0x5cbeb2,_0x118b80,_0xcf53f9){super(_0x5cbeb2),this['commentInputView']=new os(_0x5cbeb2,_0xcf53f9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x578fc1,_0x3abb79)=>_0x578fc1||!!_0x3abb79),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 _0x2e8d01(_0x5cbeb2,_0x118b80),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'](_0x1f760f){this['commentInputView']['focus'](_0x1f760f);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x790cab,_0x302cd8)=>{const {submitButtonView:_0x4be58a,cancelButtonView:_0x1b242d,editor:_0x5ece2b}=this['commentInputView'];[_0x4be58a['element'],_0x1b242d['element'],_0x5ece2b?_0x5ece2b['editing']['view']['getDomRoot']():null]['filter'](_0xf813dd=>_0xf813dd)['some'](_0x10bf0b=>_0x10bf0b['contains'](_0x302cd8['target']))||(this['focus'](),_0x302cd8['preventDefault']());});}}class cs extends kt{constructor(_0x772d4a){super(_0x772d4a);const _0x1f4394=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1f4394['to']('count',_0x368a4b=>E(_0x772d4a,'NUMBER_OF_COMMENTS',_0x368a4b))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x38e23e,_0x2f2f73,_0xcd5549){super(_0x38e23e);const _0x224604=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2f2f73['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2f2f73,this['_config']=_0xcd5549,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1e0a9c(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ca448({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2e2d83=>this['commentViews']['map'](_0x30c674=>_0x30c674['element'])['includes'](_0x2e2d83['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x38e23e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x28d611=>_0x28d611-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4559a2 of _0x2f2f73['comments'])this['_handleNewCommentModel'](_0x4559a2);this['_handleInfoComment'](),this['listenTo'](_0x2f2f73['comments'],'add',(_0x28e17b,_0x3845f0)=>{const _0xfb8f14=this['_calculatePosition'](_0x3845f0);this['length']++,this['_handleNewCommentModel'](_0x3845f0,_0xfb8f14),this['refreshVisibleViews']();}),this['listenTo'](_0x2f2f73['comments'],'remove',(_0x5a9f2e,_0x4bd5ec)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4bd5ec),this['refreshVisibleViews']();}),this['listenTo'](_0x2f2f73,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2f2f73,'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',_0x224604['if']('length','ck-hidden',_0x438daf=>!_0x438daf)],'aria-label':E(_0x38e23e,'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'](_0x5b0d2f){-0x1===_0x5b0d2f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3cdb38 of this['commentViews'])_0x3cdb38['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x18511f,_0x3c20c9){const _0x2e8508=new this['_config']['CommentView'](this['locale'],_0x18511f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2e8508['viewUid']=_0x18511f['id'],_0x2e8508['delegate']('removeComment')['to'](this),_0x2e8508['delegate']('updateComment')['to'](this),_0x2e8508['delegate']('resolveCommentThread')['to'](this),_0x2e8508['delegate']('editorReady')['to'](this),_0x2e8508['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2e8508,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2e8508,_0x3c20c9);}['_calculatePosition'](_0x2a770d){const _0x1b68a2=this['_model']['_findOptimalIndex'](_0x2a770d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2a770d['authoredAt']?_0x1b68a2-0x1:_0x1b68a2:_0x1b68a2-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x470a10={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':E(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x470a10,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x470a10));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x19cebb){const _0x550ee4=this['commentViews']['remove'](_0x19cebb['id']);this['stopListening'](_0x550ee4),_0x550ee4['isEditMode']&&this['_updateHasDirtyComment'](),_0x550ee4['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x713c78=>_0x713c78['isEditMode']);}['_rearrangeCollapse'](){const _0x3f7d7a=function(_0x12e25b){const _0x3a2c7d=new _0x41f317();for(const _0x51520c of _0x12e25b)_0x3a2c7d['add'](_0x51520c);return _0x3a2c7d;}(this['commentViews']),_0x385a57=this['_collapsedCommentsView']['count'];for(let _0x4414a0=0x1;_0x4414a0<=_0x385a57;_0x4414a0++)_0x3f7d7a['remove'](0x1);for(const _0x19bc85 of _0x3f7d7a)_0x19bc85['collapse']();_0x385a57>0x0&&_0x3f7d7a['add'](this['_collapsedCommentsView'],0x1),ns(_0xb268bd(Array['from'](this['visibleViews']),Array['from'](_0x3f7d7a)),this['visibleViews'],_0x3f7d7a);}['_rearrangeExpand'](){ns(_0xb268bd(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x2980b7 of this['visibleViews'])_0x2980b7['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x66aea=>{this['focusTracker']['add'](_0x66aea['element']),this['keystrokes']['listenTo'](_0x66aea['element']);}),this['commentViews']['on']('change',(_0x17df68,_0x4809e6)=>{for(const _0x3784d1 of _0x4809e6['removed'])this['focusTracker']['remove'](_0x3784d1['element']),this['keystrokes']['stopListening'](_0x3784d1['element']);for(const _0x324885 of Array['from'](_0x4809e6['added'])['reverse']())this['focusTracker']['add'](_0x324885['element']),this['keystrokes']['listenTo'](_0x324885['element']);});}}function ns(_0x39c1d4,_0xa890cb,_0x559c5c){let _0x2b9885=0x0;for(const _0x37e131 of _0x39c1d4)switch(_0x37e131){case'insert':_0xa890cb['add'](_0x559c5c['get'](_0x2b9885),_0x2b9885),_0x2b9885++;break;case'delete':_0xa890cb['remove'](_0x2b9885);break;case'equal':_0x2b9885++;}}class as extends kt{constructor(_0x596633){super(_0x596633);const _0x4b9805=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4b9805['to']('contextValue',_0x545554=>E(_0x596633,'THREAD_CONTEXT_LABEL',_0x545554)),'tabindex':-0x1},'children':[{'text':_0x4b9805['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1b41bb,_0x5125e1){super(_0x1b41bb);const _0x4e64b6=this['bindTemplate'];this['_model']=_0x5125e1,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1e0a9c(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ca448({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x8d069=>!!_0x8d069),this['bind']('contextValue')['to'](this['_model'],'context',_0x36430a=>_0x36430a&&_0x36430a['value']?this['_trimContextValue'](_0x36430a['value']):E(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x4e64b6['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 _0x11ada9=new _0x5134f9(this['locale']);return _0x11ada9['label']=E(this['locale'],'Reopen'),_0x11ada9['tooltip']=E(this['locale'],'Reopen'),_0x11ada9['icon']=_0x29628a,_0x11ada9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4973ea=>!_0x4973ea),_0x11ada9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x40d77b,_0x4ab449)=>_0x40d77b&&_0x4ab449),_0x11ada9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x11ada9;}['_trimContextValue'](_0x4748ef){if(_0x4748ef['length']<0x96)return _0x4748ef;const _0x2a3b5f=_0x4748ef['lastIndexOf']('\x20',0x93);return _0x4748ef['substring'](0x0,_0x2a3b5f>-0x1?_0x2a3b5f:0x93)+'...';}['_attachContextActions'](){const _0x46ad01=this['element']['querySelector']('.ck-context'),_0x2fd035=_0x46ad01['querySelector']('.ck-context__value');this['listenTo'](_0x46ad01,'mouseenter',()=>{_0x2fd035['offsetWidth']<_0x2fd035['scrollWidth']&&_0x46ad01['classList']['add']('overlay');}),this['listenTo'](_0x46ad01,'mouseleave',()=>{_0x46ad01['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4df84b of this['focusables'])this['focusTracker']['add'](_0x4df84b['element']),this['keystrokes']['listenTo'](_0x4df84b['element']);}['_createContextView'](){const _0x3d721a=new as(this['locale']);return _0x3d721a['bind']('contextValue')['to'](this),_0x3d721a;}}class ts extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x890875,_0x33ecb3,_0x18824f,_0x187e0a){super(_0x890875),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x33ecb3,this['_localUser']=_0x18824f,this['_config']=_0x187e0a,this['commentThreadHeaderView']=new Xt(_0x890875,_0x33ecb3),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x890875,E(_0x890875,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x890875,_0x33ecb3,Object['assign']({'CommentView':this['_config']['CommentView']},_0x187e0a)),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',(_0x2e064,_0x221b07)=>_0x2e064||!!_0x221b07),this['bind']('isUnlinked')['to'](_0x33ecb3,'unlinkedAt',_0x454e2f=>!!_0x454e2f),this['bind']('ariaLabel')['to'](this,'length',_0x549660=>{const _0x8a5e5e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return E(this['locale'],'COMMENT_THREAD_LABEL',[_0x549660,_0x8a5e5e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1e0a9c(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ca448({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd75b64=>_0xd75b64['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 _0x570667=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x523f4c=_0x570667['commentInputView'];return _0x570667['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x523f4c,'value',(_0x44352f,_0xa98953,_0x661de4,_0x32ea25,_0x2f7b7a)=>!!_0x2f7b7a||!!_0x32ea25&&_0x661de4&&!_0xa98953||_0x44352f&&_0x661de4&&!_0xa98953),_0x523f4c['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4622c7,_0x51d5d0,_0xdae7c4)=>{let _0x13f591;return _0x13f591=_0xdae7c4&&_0x51d5d0?'Reply\x20to\x20reopen\x20discussion...':_0x4622c7?'Reply...':'Write\x20a\x20comment...',E(this['locale'],_0x13f591);}),_0x523f4c['bind']('submitLabel')['to'](this,'length',_0x3074ba=>E(this['locale'],_0x3074ba?'Reply':'Comment')),_0x523f4c['on']('submit',(_0x56c536,_0x576497)=>{this['fire']('addComment',_0x576497),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x523f4c['on']('cancel',()=>{this['focus']();}),_0x523f4c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x523f4c['on']('cancel',_0x22f4e7=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x22f4e7['stop']());}),this['on']('change:isActive',(_0x4a0ecd,_0x4f326b,_0x2bb692)=>{_0x2bb692||this['length']||_0x523f4c['value']||this['fire']('removeCommentThread');}),_0x570667;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ts){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x1b19cb,_0x973102,_0x3386bc,_0xdf5c2){super(_0x1b19cb,_0x973102,_0x3386bc,_0xdf5c2),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x1b19cb,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x28c8e2,_0xf78f05,_0x333840)=>{_0x333840||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5c09fb,_0x43e121,_0x9b2c4f)=>{_0x9b2c4f&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3240fc=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3240fc['if']('isActive','ck-thread--active'),_0x3240fc['if']('isUnlinked','ck-thread--unlinked'),_0x3240fc['if']('isConfirm','ck-thread--remove-confirmation'),_0x3240fc['to']('actionIndicator',_0x409ade=>_0x409ade?'ck-thread--'+_0x409ade:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3240fc['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 _0x5790ee of this['commentsListView']['commentViews'])_0x5790ee['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x229f5e}=this,_0x5b5de0=this['commentsListView']['commentViews']['get'](0x0);_0x5b5de0===this['_boundFirstCommentView']||_0x5b5de0['isSystemComment']||(this['_boundFirstCommentView']=_0x5b5de0,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5b5de0,'actionIndicator',_0x37cce8=>'remove'===_0x37cce8?'remove':null),_0x5b5de0['placeholder']=E(_0x229f5e,'Write\x20a\x20comment...'),_0x5b5de0['removeButton']['on']('execute',_0x3a1a4d=>{_0x3a1a4d['stop'](),this['showConfirm'](E(_0x229f5e,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5b5de0['focus']();}),_0x5b5de0['actionBar']['add'](this['resolveButton'],0x0),_0x5b5de0['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x11c1a3=new _0x165d9b(this['locale']);return _0x11c1a3['label']=E(this['locale'],'Resolve'),_0x11c1a3['tooltip']=E(this['locale'],'Resolve'),_0x11c1a3['icon']=_0x164183,_0x11c1a3['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x11c1a3['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3e0c7a=>!_0x3e0c7a),_0x11c1a3['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x36da2d,_0x24f4f4)=>_0x36da2d&&!_0x24f4f4),_0x11c1a3['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x11c1a3;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class es extends kt{constructor(_0x3b2319){super(_0x3b2319),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x10a082,_0x552dd8,_0x49a67e)=>{this['element']['innerHTML']=_0x49a67e;}),this['element']['innerHTML']=this['content'];}}class hs extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x11bdbb,_0x3d9568,_0x5dc663){super(_0x11bdbb),this['_model']=_0x3d9568,this['_config']=_0x5dc663,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x3d9568,'content',_0x3d9568,'authoredAt',(_0x57a90a,_0x4f2ecc)=>E(_0x11bdbb,'COMMENT_ARIA_LABEL',[_0x3d9568['author']['name'],_0x5dc663['formatDateTime'](_0x4f2ecc),new DOMParser()['parseFromString'](_0x57a90a,'text/html')['body']['textContent'],_0x3d9568['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x11bdbb,E(_0x11bdbb,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x4d7b71(),this['focusTracker']=new _0x1e0a9c(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1ca448({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1831e5=>_0x1831e5['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):E(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?E(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):E(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x1295fa=new es(this['locale']);return _0x1295fa['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x537e3f,_0x361bb0)=>_0x361bb0?_0x8bcdb6(_0x537e3f,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x537e3f),_0x1295fa;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x449cc8=new os(this['locale'],this['_config']['editorConfig']);return _0x449cc8['value']=this['_model']['content'],_0x449cc8['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x449cc8['submitLabel']=E(this['locale'],'Save'),_0x449cc8['on']('submit',(_0x4b0d2e,_0x5e43f9)=>{this['fire']('updateComment',this['_model']['id'],_0x5e43f9),this['switchToDisplayMode'](),this['focus']();}),_0x449cc8['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x449cc8['once']('editorReady',()=>{_0x449cc8['focus']();}),_0x449cc8['createEditor'](),_0x449cc8['delegate']('editorReady')['to'](this),_0x449cc8['delegate']('editorDestroyed')['to'](this),_0x449cc8;}['_setupKeyboardNavigation'](){const _0x1c8950=this['element'];this['keystrokes']['listenTo'](_0x1c8950);for(const _0x194192 of this['focusables'])this['focusTracker']['add'](_0x194192['element']),this['keystrokes']['listenTo'](_0x194192['element']);this['focusables']['on']('change',(_0x4e8c8b,_0x3794ab)=>{for(const _0x213941 of _0x3794ab['removed'])this['focusTracker']['remove'](_0x213941['element']),this['keystrokes']['stopListening'](_0x213941['element']);for(const _0x454222 of _0x3794ab['added'])this['focusTracker']['add'](_0x454222['element']),this['keystrokes']['listenTo'](_0x454222['element']);}),this['keystrokes']['set']('enter',(_0x118fa5,_0x37846c)=>{_0x1c8950===_0x118fa5['target']&&(this['focusCycler']['focusFirst'](),_0x37846c());}),this['keystrokes']['set']('esc',(_0x5f1a47,_0x4144c0)=>{_0x1c8950!==_0x5f1a47['target']&&(this['focus'](),_0x4144c0());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(hs){['actionBar'];['userView'];constructor(_0x56779a,_0x2cfb5f,_0x1e9a4c){super(_0x56779a,_0x2cfb5f,_0x1e9a4c),this['set']('actionIndicator',null),this['set']('placeholder',E(_0x56779a,'Reply...')),this['bind']('authoredAt')['to'](_0x2cfb5f),this['bind']('resolvedAt')['to'](_0x2cfb5f),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 _0x2e8d01(_0x56779a,_0x2cfb5f['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2cfb5f,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x267afe=this['bindTemplate'],_0x485837=[{'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':_0x267afe['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x267afe['to']('authoredAt',_0x1cb3c7=>this['_config']['formatDateTime'](_0x1cb3c7))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x267afe['if']('isEditMode','ck-comment__actions--hidden'),_0x267afe['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']&&_0x485837['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x267afe['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x267afe['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x267afe['if']('isEditMode','ck-comment--edit'),_0x267afe['if']('isSystemComment','ck-comment--info'),_0x267afe['to']('actionIndicator',_0xb4e663=>_0xb4e663?'ck-comment--'+_0xb4e663:'')],'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':_0x485837}]}]};}['_createEditButton'](){const _0x139ebe=new _0x5134f9(this['locale']);return _0x139ebe['label']=E(this['locale'],'Edit'),_0x139ebe['icon']=_0x5ea246,_0x139ebe['withText']=!0x0,_0x139ebe['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x139ebe['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4863a9=>!_0x4863a9),_0x139ebe['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x139ebe['on']('execute',()=>this['switchToEditMode']()),_0x139ebe;}['_createRemoveButton'](){const _0x1bf789=new _0x5134f9(this['locale']);return _0x1bf789['label']=E(this['locale'],'Remove'),_0x1bf789['icon']=_0xac44fb,_0x1bf789['withText']=!0x0,_0x1bf789['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x1bf789['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x21fa59=>!_0x21fa59),_0x1bf789['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x1bf789['on']('execute',()=>{this['showConfirm'](E(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x1bf789;}['_createDropdown'](){const _0x2da6cb=_0x4c42d1(this['locale'],_0x1b159b),_0x4f11dc=_0x2da6cb['panelView']['children'],_0x12c164=new _0x34d210(this['locale']),_0x568e73=_0x2da6cb['bindTemplate'];_0x2a5d8c(_0x2da6cb,()=>this['items']['find'](_0x2ae864=>_0x2ae864['isVisible'])),_0x2da6cb['extendTemplate']({'attributes':{'class':[_0x568e73['if']('isVisible','ck-hidden',_0xd6fe2f=>!_0xd6fe2f)]}});const _0x1c2a1f=(_0x3d613e,_0xdca7a=-0x1)=>{const _0x198780=new _0x6b580e(this['locale']);_0x198780['children']['add'](_0x3d613e);const _0x474186=_0xdca7a>-0x1?_0xdca7a:_0x12c164['items']['length'];_0x12c164['items']['add'](_0x198780,_0x474186);const _0x15c196=Array['from'](this['items']);_0x2da6cb['unbind']('isEnabled','isVisible'),_0x2da6cb['bind']('isEnabled')['toMany'](_0x15c196,'isEnabled',(..._0x18a5a7)=>_0x18a5a7['some'](_0x5dc375=>_0x5dc375)),_0x2da6cb['bind']('isVisible')['toMany'](_0x15c196,'isVisible',(..._0x53679c)=>_0x53679c['some'](_0x483992=>_0x483992));};_0x2da6cb['panelPosition']='sw',_0x2da6cb['buttonView']['set']({'label':E(this['locale'],'Show\x20more\x20items'),'icon':_0x7d1dda});for(const _0x355a70 of this['items'])_0x1c2a1f(_0x355a70);return _0x4f11dc['add'](_0x12c164),_0x2da6cb['listenTo'](this['items'],'add',(_0x225ae7,_0x5c856f,_0x315abc)=>{_0x1c2a1f(_0x5c856f,_0x315abc);}),_0x2da6cb['listenTo'](this['items'],'remove',(_0x353bb9,_0x142234,_0x4798db)=>{_0x12c164['items']['remove'](_0x4798db);}),_0x2da6cb;}['_attachActions'](_0xb992a5,_0x12c077){const _0x4e8f5f=_0xb992a5&&_0xb992a5['element'];_0x4e8f5f&&(this['listenTo'](_0x4e8f5f,'mouseenter',()=>this['actionIndicator']=_0x12c077),this['listenTo'](_0x4e8f5f,'focus',()=>this['actionIndicator']=_0x12c077),this['listenTo'](_0x4e8f5f,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4e8f5f,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x201738=super['_createCommentInputView']();return _0x201738['bind']('placeholder')['to'](this),_0x201738;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Lt(_0x2056a2){const _0x5e8fb8=Dt(_0x2056a2,0x1e),_0x7c9380=new MutationObserver(_0x33e71f=>{for(const _0x5f01a7 of _0x33e71f)('attributes'==_0x5f01a7['type']&&'class'==_0x5f01a7['attributeName']||'childList'==_0x5f01a7['type']||'characterData'==_0x5f01a7['type'])&&_0x5e8fb8();});return{'attach'(_0x1529af){_0x7c9380['observe'](_0x1529af,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x7c9380['disconnect'](),_0x5e8fb8['cancel']();}};}class S extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x467f87,_0x52c5ae){super(_0x467f87),this['id']=_0x437d75(),this['focusTracker']=new _0x1e0a9c(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x62494c,_0x268717)=>this['fire']('Esc',_0x268717)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=Lt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x52c5ae),this['mainView']=_0x52c5ae;const _0x168cdd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x168cdd['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 _0x17234e=this['element']['clientHeight'];_0x17234e&&(this['height']=_0x17234e);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1f969f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x5dcc58,target:_0x461ea6,type:_0x170372,isVisible:_0x278230=!0x0}){super(),this['view']=_0x5dcc58,this['view']['element']||this['view']['render'](),this['_type']=_0x170372,this['_target']=_0x461ea6,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x41f317([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x29549d,_0x2018a1)=>{this['view']['focusTracker']['add'](_0x2018a1);}),this['focusableElements']['on']('remove',(_0xc300d2,_0x157eb2)=>{this['view']['focusTracker']['remove'](_0x157eb2);}),this['set']('isVisible',_0x278230);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2eb308=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x2eb308),_0x2eb308;}get['targetRect'](){const _0x16f529=this['target'];if(null===_0x16f529)return null;if(_0x16f529 instanceof _0x521279)return _0x16f529;const _0x3aa63e=_0x16f529['filter'](_0x1562dd=>function(_0x4cb049){const _0x4f4035=_0x4cb049['offsetParent'];if(_0x4f4035)return!0x0;const _0x3aaf8b=_0x4cb049['getClientRects']()['item'](0x0);return!!_0x3aaf8b;}(_0x1562dd));return 0x0===_0x3aa63e['length']?null:new _0x521279(_0x3aa63e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x23cf97){this['view']['isActive']=_0x23cf97,this['view']['mainView']['isActive']=_0x23cf97;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3dad5c){if(!(null===_0x3dad5c||_0x3dad5c instanceof _0x521279||Array['isArray'](_0x3dad5c)&&_0x3dad5c['every'](_0x540868=>li(_0x540868))))throw new _0x3b16ef('annotation-invalid-target',null,{'target':_0x3dad5c});}['_getNormalizedTarget'](){const _0xf97e2='function'==typeof this['_target']?this['_target']():this['_target'];return li(_0xf97e2)?[_0xf97e2]:_0xf97e2;}}function li(_0x58e7c3){return null!==_0x58e7c3&&'object'==typeof _0x58e7c3&&'nodeType'in _0x58e7c3&&0x1===_0x58e7c3['nodeType'];}class _ extends _0x41f317{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4c6efc=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1e0a9c(),this['_focusTracker']['on']('change:isFocused',(_0x5e6081,_0x4d22e9,_0x344d67)=>{_0x344d67||this['fire']('blur');});for(const _0x204bab of _0x4c6efc)this['add'](_0x204bab);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2df131){if(this['has'](_0x2df131))throw new _0x3b16ef('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2df131['innerView'],_0x2df131),this['_viewToAnnotation']['set'](_0x2df131['view'],_0x2df131);for(const _0x256fab of _0x2df131['focusableElements'])this['_focusTracker']['add'](_0x256fab);this['listenTo'](_0x2df131['focusableElements'],'add',(_0x390c04,_0x3901c5)=>{this['_focusTracker']['add'](_0x3901c5);}),this['listenTo'](_0x2df131['focusableElements'],'remove',(_0x21094f,_0x36e66c)=>{this['_focusTracker']['remove'](_0x36e66c);}),this['listenTo'](_0x2df131['view']['focusTracker'],'change:isFocused',(_0x46cc86,_0x3b4fa0,_0x5448f1)=>{_0x5448f1&&this['fire']('focus',_0x2df131);}),_0x2df131['updateTargetRect']();const _0x126344=this['_getOrderInContent'](_0x2df131['view']['targetRect']);return super['add'](_0x2df131,_0x126344);}['remove'](_0x1da050){if(!this['has'](_0x1da050))throw new _0x3b16ef('annotationcollection-not-existing-item',null);this['stopListening'](_0x1da050['view']['focusTracker']),this['stopListening'](_0x1da050['focusableElements']);for(const _0x1f42ab of _0x1da050['focusableElements'])this['_focusTracker']['remove'](_0x1f42ab);return this['_viewToAnnotation']['delete'](_0x1da050['view']),this['_innerViewToAnnotation']['delete'](_0x1da050['innerView']),super['remove'](_0x1da050);}['getByInnerView'](_0x300159){return this['_innerViewToAnnotation']['get'](_0x300159);}['getByView'](_0x2e28e3){return this['_viewToAnnotation']['get'](_0x2e28e3);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x11bbc9 of this)_0x11bbc9['updateTargetRect']();this['_sort']();}['_sort'](){const _0x46c884=Array['from'](this)['sort']((_0x6ab347,_0x499cbb)=>v(_0x6ab347['view']['targetRect'],_0x499cbb['view']['targetRect']));for(let _0x285666=_0x46c884['length']-0x1;_0x285666>0x0;_0x285666--){const _0x2ad9fe=_0x46c884[_0x285666];_0x285666!==this['getIndex'](_0x2ad9fe)&&(this['remove'](_0x2ad9fe),this['add'](_0x2ad9fe));}}['_getOrderInContent'](_0x5a60cf){let _0x16d35c=0x0;if(!_0x5a60cf)return this['length'];for(const _0x40759c of this){const _0x42eb00=_0x40759c['view']['targetRect'];if(_0x42eb00){if(v(_0x5a60cf,_0x42eb00)<0x0)return _0x16d35c;_0x16d35c++;}}return _0x16d35c;}}function v(_0x1c64aa,_0x13cd6e){if(null===_0x1c64aa&&null===_0x13cd6e)return 0x0;if(null===_0x1c64aa)return-0x1;if(null===_0x13cd6e)return 0x1;const _0x2e716d=_0x1c64aa['top']-_0x13cd6e['top'];return 0x0==_0x2e716d?_0x1c64aa['left']-_0x13cd6e['left']:_0x2e716d;}class O extends _0x1318aa{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x159121){if(super(_0x159121),this['collection']=new _(),this['_visibleAnnotations']=new _(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x159121 instanceof _0x180d0b){const _0x3f67b0=_0x159121['locale'];_0x159121['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':E(_0x3f67b0,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x595c94){this['collection']['add'](_0x595c94);}['remove'](_0x5aa7ae){this['collection']['remove'](_0x5aa7ae),_0x5aa7ae['destroy']();}['refreshVisibility'](){for(const _0x39fb06 of this['collection'])_0x39fb06['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x2ba79a){return this['collection']['getByInnerView'](_0x2ba79a);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3d5255 of this['collection'])_0x3d5255['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x41b4f4){this['fire']('_activateAnnotation',_0x41b4f4);}['createAnnotation'](_0x184195){return new d(_0x184195);}['createAnnotationView'](_0x486479,_0x3d1269){return new S(_0x486479,_0x3d1269);}['_addActiveAnnotation'](_0x18b01c){const _0xa472fa=new Set(this['activeAnnotations']);_0xa472fa['add'](_0x18b01c),this['activeAnnotations']=_0xa472fa;}['_removeActiveAnnotation'](_0x182fa0){const _0x36b43d=new Set(this['activeAnnotations']);_0x36b43d['delete'](_0x182fa0),this['activeAnnotations']=_0x36b43d;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5a6e27=this['collection'],_0x52fb45=this['_visibleAnnotations'];function _0x529448(_0x3c5454){const _0x45c25d=_0x3c5454['source'];_0x45c25d['isVisible']&&!_0x52fb45['has'](_0x45c25d)?_0x52fb45['add'](_0x45c25d):!_0x45c25d['isVisible']&&_0x52fb45['has'](_0x45c25d)&&_0x52fb45['remove'](_0x45c25d),_0x45c25d['view']['focusTracker']['remove'](_0x45c25d['view']['element']),_0x45c25d['view']['focusTracker']['add'](_0x45c25d['view']['element']);}this['listenTo'](_0x5a6e27,'add',(_0x556897,_0xae07b1)=>{_0xae07b1['isVisible']&&_0x52fb45['add'](_0xae07b1),this['listenTo'](_0xae07b1,'change:isVisible',_0x529448);}),this['listenTo'](_0x5a6e27,'remove',(_0x2bfd0c,_0x3b7ac4)=>{_0x52fb45['has'](_0x3b7ac4)&&_0x52fb45['remove'](_0x3b7ac4),this['stopListening'](_0x3b7ac4,'change:isVisible',_0x529448);});}['_setupEnterAnnotationKeystroke'](){const _0x493e70=_0x35dc99=>{_0x35dc99['on']('ready',()=>{_0x35dc99['keystrokes']['set'](_0x298e25,(_0x463576,_0x2d45d2)=>{const _0x510500=_0x338d21(this['activeAnnotations']['values']());_0x510500&&(_0x510500['view']['focus'](),_0x2d45d2());});});};this['context']instanceof _0x180d0b?_0x493e70(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x3bf56d,_0x279122)=>{_0x493e70(_0x279122);});}['_setupEscapeAnnotationHandling'](){const _0x3ba19f=_0x5e0461=>{const _0x5bd1ce=_0x5e0461['source'],_0x2fb374=[];let _0x25d1cc;if(Array['isArray'](_0x5bd1ce['target'])){_0x25d1cc=_0x5bd1ce['target'][0x0],this['context']instanceof _0x180d0b?_0x2fb374['push'](this['context']):this['context']['editors']&&_0x2fb374['push'](...this['context']['editors']);for(const _0x231a23 of _0x2fb374)for(const _0x5a3d47 of _0x231a23['editing']['view']['domRoots']['values']())if(_0x5a3d47['contains'](_0x25d1cc))return void _0x231a23['editing']['view']['focus']();_0x25d1cc['focus']();}};this['listenTo'](this['collection'],'add',(_0xfca855,_0x4c380a)=>{this['listenTo'](_0x4c380a,'escape',_0x3ba19f,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3c74bc,_0x26478d)=>{this['stopListening'](_0x26478d,'escape',_0x3ba19f);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1318aa{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[O,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x459f75){super(_0x459f75),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4b84ad=this['context']['config'];_0x4b84ad['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4b84ad['define']('comments.maxThreadTotalWeight',0x1f4),_0x4b84ad['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4b84ad['define']('comments.CommentThreadView',vt),_0x4b84ad['define']('comments.CommentView',gt),_0x4b84ad['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5da1ec=this['context']['plugins']['get'](O);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x49ae0a,_0x406ea0)=>this['_addCommentThread'](_0x406ea0)),this['on']('submitCommentThread',(_0x3bb718,_0x426178)=>this['_submitCommentThread'](_0x426178)),this['on']('resolveCommentThread',(_0x17bc34,_0x329c61)=>this['_resolveCommentThread'](_0x329c61)),this['on']('resolveCommentThread',(_0x1a1e0c,_0x32f2ec)=>this['_updateActiveAnnotation'](_0x32f2ec),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x9dcf0,_0x53d14f)=>this['_reopenCommentThread'](_0x53d14f)),this['on']('reopenCommentThread',(_0x570fd8,_0x43663f)=>this['_updateActiveAnnotation'](_0x43663f),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4aaf8c,_0x27d440)=>this['_removeCommentThread'](_0x27d440)),this['on']('updateCommentThread',(_0x2228b4,_0x31e470)=>this['_updateCommentThread'](_0x31e470)),this['on']('updateCommentThread',(_0x359cc0,_0x2ff680)=>this['_updateActiveAnnotation'](_0x2ff680),{'priority':'lowest'}),this['on']('addComment',(_0x168132,_0x2e7880)=>this['_addComment'](_0x2e7880)),this['on']('updateComment',(_0x30a27b,_0x5dc0cd)=>this['_updateComment'](_0x5dc0cd)),this['on']('removeComment',(_0x154297,_0x1a54ab)=>this['_removeComment'](_0x1a54ab)),this['on']('addComment',(_0x5edc4a,{threadId:_0x3176ac,isFromAdapter:_0x12c4a3})=>{if(_0x12c4a3)return;const _0x5a6db4=this['getCommentThread'](_0x3176ac),_0x2af1ce=_0x5a6db4&&this['_threadToController']['get'](_0x5a6db4);_0x2af1ce&&_0x2af1ce['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5da1ec,'change:activeAnnotations',(_0xc5b705,_0x22002d,_0x33d275)=>{const _0xe798cb=Array['from'](_0x33d275)['map'](_0xb5f9a5=>this['_viewToController']['get'](_0xb5f9a5['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xe798cb?_0xe798cb['model']:null;});}set['adapter'](_0x1073cf){if(this['_adapter'])throw new _0x3b16ef('commentsrepository-adapter-already-set');this['_adapter']=_0x1073cf;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x29b25b=Tt,threadId:_0x1715fe=_0x437d75(),comments:_0x2846a8=[],unlinkedAt:_0x2555d2=null,resolvedAt:_0x3d1036=null,resolvedBy:_0x4ddacc=null,target:_0x15de3a=null,context:_0x5686f1=null,attributes:_0x4ae343={},isResolvable:_0x30a8bc=!0x0,isSubmitted:_0x42566e=!0x1,isFromAdapter:_0x809116=!0x1}={}){return this['fire'](bt('addCommentThread',_0x29b25b),{'channelId':_0x29b25b,'threadId':_0x1715fe,'comments':_0x2846a8,'unlinkedAt':_0x2555d2,'resolvedAt':_0x3d1036,'resolvedBy':_0x4ddacc,'target':_0x15de3a,'context':_0x5686f1,'attributes':_0x4ae343,'isFromAdapter':_0x809116,'isResolvable':_0x30a8bc,'isSubmitted':_0x42566e}),this['getCommentThread'](_0x1715fe);}['openNewCommentThread']({channelId:_0x4581d3=Tt,threadId:_0x248b0b=_0x437d75(),target:_0x80c3d2,context:_0x16f470=null,isResolvable:_0x1fed83=!0x0}){if(this['_readOnlyChannels']['has'](_0x4581d3)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x80c3d2)throw new _0x3b16ef('commentsrepository-missing-target');const _0x1a2e8d=this['addCommentThread']({'channelId':_0x4581d3,'threadId':_0x248b0b,'target':_0x80c3d2,'context':_0x16f470,'isResolvable':_0x1fed83});if(!_0x1a2e8d)return null;const _0x51b859=this['_threadToController']['get'](_0x1a2e8d),_0x4b6de9=_0x51b859['view']['commentThreadInputView']['commentInputView'],_0x3eb0e7=this['context']['plugins']['get'](O),_0x52e259=_0x3eb0e7['getByInnerView'](_0x51b859['view']);return _0x3eb0e7['activate'](_0x52e259),_0x4b6de9['once']('editorReady',()=>_0x4b6de9['focus']()),_0x1a2e8d;}['hasCommentThread'](_0x18660e){if('string'!=typeof _0x18660e)throw new _0x3b16ef('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x18660e);}['updateCommentThread']({channelId:_0x41ebfe=Tt,threadId:_0x5640c9,context:_0x248a1c,unlinkedAt:_0x575cdd,attributes:_0x2ca657,isFromAdapter:_0x27f02d=!0x1}){return this['fire'](bt('updateCommentThread',_0x41ebfe),{'channelId':_0x41ebfe,'threadId':_0x5640c9,'context':_0x248a1c,'unlinkedAt':_0x575cdd,'attributes':_0x2ca657,'isFromAdapter':_0x27f02d}),this['getCommentThread'](_0x5640c9);}['getCommentThread'](_0x53efea){if('string'!=typeof _0x53efea)throw new _0x3b16ef('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x53efea);}['fetchCommentThread']({channelId:_0x376580,threadId:_0x1dd63b}={}){const _0x18b99b=this['getCommentThread'](_0x1dd63b);if(_0x18b99b)return Promise['resolve'](_0x18b99b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3b16ef('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x376580,'threadId':_0x1dd63b})['then'](_0x3eaef5=>this['hasCommentThread'](_0x1dd63b)?this['getCommentThread'](_0x1dd63b):_0x3eaef5?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x376580},_0x3eaef5)):void 0x0)['catch'](_0x12267f=>{throw console['error'](_0x12267f),new _0x3b16ef('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x47177e,skipNotAttached:_0x32e539=!0x1,skipEmpty:_0x1246a5=!0x1,toJSON:_0x53897e=!0x1}={}){const _0xa452fe=[];for(const _0xf95f93 of this['_threads']['values']())_0x47177e&&_0xf95f93['channelId']!==_0x47177e||_0x32e539&&!_0xf95f93['isAttached']||_0x1246a5&&0x0===_0xf95f93['length']||_0xa452fe['push'](_0xf95f93);return _0x53897e?_0xa452fe['map'](_0x9276b3=>_0x9276b3['toJSON']()):_0xa452fe;}['setActiveCommentThread'](_0x286af1){const _0xaefcd1=this['context']['plugins']['get'](O);if(!_0x286af1)return void(this['activeCommentThread']&&_0xaefcd1['deactivateAll']());const _0x2526cb=this['getCommentThread'](_0x286af1);if(!_0x2526cb)throw new _0x3b16ef('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x286af1});if(!this['_threadToController']['has'](_0x2526cb))throw new _0x3b16ef('commentsrepository-active-not-attached',null,{'threadId':_0x286af1});const _0x3eb283=_0xaefcd1['getByInnerView'](this['_threadToController']['get'](_0x2526cb)['view']);_0xaefcd1['activate'](_0x3eb283);}['switchReadOnly'](_0x15a30b,_0x1a2fb1){_0x15a30b?this['_readOnlyChannels']['add'](_0x1a2fb1):this['_readOnlyChannels']['delete'](_0x1a2fb1),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x3fb818){return this['_readOnlyChannels']['has'](_0x3fb818)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x482f1a,_0x17469a){return new Ct(_0x482f1a,_0x17469a);}['setPermissions'](_0x493984,_0x37e237=Tt){this['_permissions']['set'](_0x37e237,_0x493984),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5b4ee8=Tt){return this['_permissions']['has'](_0x5b4ee8)?this['_permissions']['get'](_0x5b4ee8):_t;}['_addCommentThread']({channelId:_0xd6fb6c,threadId:_0x2917a3,comments:_0x28007c,unlinkedAt:_0x501b84,resolvedAt:_0x23efa,resolvedBy:_0x3feb68,target:_0x388173,context:_0x51922e,attributes:_0x305ed3,isFromAdapter:_0x5e89e8,isResolvable:_0x519d40,isSubmitted:_0x1a7577}){if('string'!=typeof _0x2917a3)throw new _0x3b16ef('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2917a3});if(this['hasCommentThread'](_0x2917a3))throw new _0x3b16ef('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x2917a3});const _0x2afa27=new ui(this,{'channelId':_0xd6fb6c,'id':_0x2917a3,'context':_0x51922e,'attributes':_0x305ed3,'unlinkedAt':_0x501b84,'resolvedAt':_0x23efa,'resolvedBy':_0x3feb68?this['context']['plugins']['get'](it)['getUser'](_0x3feb68):null,'isResolvable':_0x519d40,'isSubmitted':_0x1a7577||_0x5e89e8});this['_threads']['set'](_0x2917a3,_0x2afa27);for(const _0x570e07 of _0x28007c)_0x2afa27['_add'](this['_createNewComment']({'threadId':_0x2917a3,..._0x570e07}));return _0x388173&&_0x2afa27['attachTo'](_0x388173),_0x5e89e8||!_0x2afa27['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0xd6fb6c,'threadId':_0x2917a3});}['_submitCommentThread']({channelId:_0x49386a,threadId:_0x56cfed}){if(!this['hasCommentThread'](_0x56cfed))throw new _0x3b16ef('commentsrepository-missing-comment-thread',this);const _0x50158b=this['getCommentThread'](_0x56cfed);if(_0x50158b['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2fa7b1,comments:_0x3f9922,resolvedAt:_0x501b46,resolvedBy:_0x43a65c,context:_0x15a455,attributes:_0x3e51a1}=_0x50158b,_0x3ed084=this['context']['plugins']['get']('PendingActions'),_0x1da3c1=_0x3ed084['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x49386a,'threadId':_0x2fa7b1,'comments':_0x3f9922['map'](_0x4f2036=>_0x4f2036['toJSON']()),'resolvedAt':_0x501b46,'resolvedBy':_0x43a65c?_0x43a65c['id']:_0x43a65c,'context':_0x15a455,'attributes':_0x3e51a1})['then'](({comments:_0x5152f7})=>{_0x3ed084['remove'](_0x1da3c1);for(const _0x56ff42 of _0x5152f7)this['_updateComment']({'channelId':_0x49386a,'threadId':_0x56cfed,'commentId':_0x56ff42['commentId'],'createdAt':_0x56ff42['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x25cf2a=>{throw console['error'](_0x25cf2a),new _0x3b16ef('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x3acfc1,target:_0x58f2cc}){const _0x2d51c0=this['getCommentThread'](_0x3acfc1);if(!_0x2d51c0)throw new _0x3b16ef('commentsrepository-attach-missing-comment-thread',this);const _0x5f226a=this['context']['plugins']['get']('PendingActions'),_0x262383=this['context']['plugins']['get'](O),_0x14a209=this['_createCommentThreadView'](_0x2d51c0),_0x1f9ed5=new Ct(_0x2d51c0,_0x14a209);let _0x4c4ec3=null;_0x14a209['on']('change:isDirty',(_0x2a7224,_0x176a97,_0x6f95ce)=>{_0x6f95ce?_0x4c4ec3=_0x5f226a['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4c4ec3&&(_0x5f226a['remove'](_0x4c4ec3),_0x4c4ec3=null);}),this['_threadToController']['set'](_0x2d51c0,_0x1f9ed5),this['_viewToController']['set'](_0x14a209,_0x1f9ed5);const _0x1083c9=new S(this['context']['locale'],_0x14a209);_0x1083c9['bind']('length')['to'](_0x14a209),_0x1083c9['bind']('isDirty')['to'](_0x14a209,'isDirty',_0x14a209,'length',(_0x2c99e2,_0x3033e6)=>_0x2c99e2||!_0x3033e6),_0x1083c9['bind']('isActive')['to'](_0x14a209),_0x1083c9['type']='comment';const _0x5882b4=new d({'view':_0x1083c9,'target':_0x58f2cc,'type':'comment','isVisible':!_0x2d51c0['archivedAt']});return _0x14a209['on']('escape',()=>{_0x5882b4['fire']('escape');}),this['_bindAnnotationToEditors'](_0x14a209,_0x5882b4),_0x262383['add'](_0x5882b4),_0x5882b4;}['_bindAnnotationToEditors'](_0x1a1cfc,_0x4687e8){this['listenTo'](_0x1a1cfc,'editorReady',(_0x3afce8,_0x6118ca)=>{const _0x34b827=_0x6118ca['ui']['view']['body']['bodyCollectionContainer'];_0x4687e8['focusableElements']['add'](_0x34b827),this['context']instanceof _0x180d0b&&this['context']['ui']['focusTracker']['add'](_0x34b827);},{'priority':'highest'}),this['listenTo'](_0x1a1cfc,'editorDestroyed',(_0x208549,_0x1460c7)=>{const _0x137250=_0x1460c7['ui']['view']['body']['bodyCollectionContainer'];_0x4687e8['focusableElements']['has'](_0x137250)&&_0x4687e8['focusableElements']['remove'](_0x137250),this['context']instanceof _0x180d0b&&this['context']['ui']['focusTracker']['remove'](_0x137250);});}['_unbindEditors'](_0x522630){this['stopListening'](_0x522630,'editorReady'),this['stopListening'](_0x522630,'editorDestroyed');}['_createCommentThreadView'](_0x262baf){const _0x5b2b92=this['context']['plugins']['get'](it),{config:_0x5d768e,locale:_0x2df54f}=this['context'],_0x3736e6=lt(_0x5d768e['get']('locale'),_0x2df54f);return new(0x0,(_0x5d768e['get']('comments'))['CommentThreadView'])(_0x2df54f,_0x262baf,_0x5b2b92['me'],{'editorConfig':{..._0x5d768e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x5d768e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x5d768e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x5d768e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x5d768e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x3736e6,'CommentView':_0x5d768e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5b9740,channelId:_0x12c734,resolvedAt:_0x258e07,resolvedBy:_0x55286c,isFromAdapter:_0x584e24}){if(!this['hasCommentThread'](_0x5b9740))throw new _0x3b16ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x5b9740});const _0x5456b0=this['getCommentThread'](_0x5b9740);if(_0x5456b0['isResolved'])throw new _0x3b16ef('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5b9740});const _0x33aee1=this['context']['plugins']['get'](it);if(_0x5456b0['resolvedBy']=_0x33aee1['getUser'](_0x55286c),_0x5456b0['resolvedAt']=_0x258e07,_0x584e24||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x43d8e0=this['context']['plugins']['get']('PendingActions'),_0x5884ed=_0x43d8e0['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x12c734,'threadId':_0x5b9740})['then'](({resolvedAt:_0x45a5f3,resolvedBy:_0x2536d9})=>{_0x43d8e0['remove'](_0x5884ed),_0x5456b0['resolvedBy']['id']!==_0x2536d9&&(_0x5456b0['resolvedBy']=_0x33aee1['getUser'](_0x2536d9)),_0x5456b0['resolvedAt']=_0x45a5f3;})['catch'](_0x1ceb14=>{throw console['error'](_0x1ceb14),new _0x3b16ef('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4d6479,channelId:_0x214a0a,isFromAdapter:_0x465006}){if(!this['hasCommentThread'](_0x4d6479))throw new _0x3b16ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x4d6479});const _0x440781=this['getCommentThread'](_0x4d6479);if(!_0x440781['isResolved'])throw new _0x3b16ef('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4d6479});if(_0x440781['resolvedBy']=null,_0x440781['resolvedAt']=null,_0x465006||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x12063e=this['context']['plugins']['get']('PendingActions'),_0x4fd2d4=_0x12063e['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x214a0a,'threadId':_0x4d6479})['then'](()=>_0x12063e['remove'](_0x4fd2d4))['catch'](_0x3ca310=>{throw console['error'](_0x3ca310),new _0x3b16ef('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5494a1,isFromAdapter:_0x2bebba}){const _0x48494a=this['getCommentThread'](_0x5494a1);if(!_0x48494a)throw new _0x3b16ef('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5494a1),this['_threads']['delete'](_0x5494a1),!_0x48494a['isSubmitted']||_0x2bebba||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5ab8a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x142122}=_0x48494a,_0x55e254=_0x5ab8a8['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x142122,'threadId':_0x5494a1})['then'](()=>_0x5ab8a8['remove'](_0x55e254))['catch'](_0x53831e=>{throw console['error'](_0x53831e),new _0x3b16ef('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x239bf3,unlinkedAt:_0x12b080,context:_0x1a1c18,attributes:_0x18f6dc,isFromAdapter:_0x25df3d}){if('string'!=typeof _0x239bf3)throw new _0x3b16ef('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x239bf3});if(!this['hasCommentThread'](_0x239bf3))throw new _0x3b16ef('commentsrepository-missing-comment-thread',null,{'threadId':_0x239bf3});const _0x38febb=this['getCommentThread'](_0x239bf3);let _0x2f5c86=!0x1;if(void 0x0!==_0x1a1c18&&_0x38febb['context']!==_0x1a1c18&&(_0x38febb['context']=_0x1a1c18,_0x2f5c86=!0x0),void 0x0!==_0x12b080&&_0x38febb['unlinkedAt']!==_0x12b080&&(_0x38febb['unlinkedAt']=_0x12b080,_0x2f5c86=!0x0),_0x18f6dc&&!wt(_0x18f6dc,_0x38febb['attributes'])&&(_0x38febb['attributes']=_0x18f6dc,_0x2f5c86=!0x0),!_0x2f5c86)return Promise['resolve']();if(!_0x38febb['isSubmitted']||_0x25df3d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x43ad6b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x240f3a}=_0x38febb,_0x557763=_0x43ad6b['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x240f3a,'threadId':_0x239bf3,'context':_0x1a1c18,'unlinkedAt':_0x12b080,'attributes':_0x18f6dc})['then'](()=>_0x43ad6b['remove'](_0x557763))['catch'](_0x424ed0=>{throw console['error'](_0x424ed0),new _0x3b16ef('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x35154b){const _0x589a8f=this['context']['plugins']['get'](O),_0x4f65b8=this['getCommentThread'](_0x35154b);if(_0x4f65b8['_isAttached']=!0x1,this['_threadToController']['has'](_0x4f65b8)){const _0x1d5a95=this['_threadToController']['get'](_0x4f65b8),_0x364b89=_0x1d5a95['view'],_0x5877ed=_0x589a8f['getByInnerView'](_0x364b89);this['_threadToController']['delete'](_0x4f65b8),this['_viewToController']['delete'](_0x364b89),_0x5877ed&&_0x589a8f['remove'](_0x5877ed),_0x1d5a95['destroy'](),_0x364b89['destroy']()['then'](()=>{this['_unbindEditors'](_0x364b89);});}}['_updateActiveAnnotation']({threadId:_0x40c566,resolvedAt:_0x348e72,unlinkedAt:_0x402c72}){const _0x495e88=!!_0x348e72,_0x10c7e8=this['context']['plugins']['get'](O),_0x3f4e4b=this['getCommentThread'](_0x40c566);if(this['_threadToController']['has'](_0x3f4e4b)){const _0x58369f=this['_threadToController']['get'](_0x3f4e4b)['view'],_0x31f5a1=_0x10c7e8['getByInnerView'](_0x58369f);_0x31f5a1&&(_0x495e88&&_0x10c7e8['_removeActiveAnnotation'](_0x31f5a1),_0x402c72?_0x31f5a1['isVisible']=!0x1:_0x31f5a1['refreshVisibility']());}}['_getExternalAuthor'](_0x340d04){const _0x459f08=this['context']['plugins']['get'](it),_0x39d740=pt('external:'+_0x340d04),_0x29c1a5=_0x459f08['getUser'](_0x39d740);return _0x29c1a5||_0x459f08['addUser']({'id':_0x39d740,'name':_0x340d04});}['_createNewComment']({threadId:_0xdc5588,commentId:_0x11073a=_0x437d75(),content:_0x4c5f4f,authorId:_0x3b1000,createdAt:_0x1855cb,attributes:_0x440830}){if('string'!=typeof _0x11073a)throw new _0x3b16ef('commentsrepository-invalid-commentid');if('string'!=typeof _0x3b1000)throw new _0x3b16ef('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x4c5f4f||!_0x4c5f4f['trim']())throw new _0x3b16ef('commentsrepository-invalid-comment-content');const _0x57c790=this['context']['plugins']['get'](it)['getUser'](_0x3b1000);if(!_0x57c790)throw new _0x3b16ef('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3b1000});let _0x9c475=null,_0x5c9fa6=_0x1855cb;return _0x440830?.['@external']&&(_0x9c475=this['_getExternalAuthor'](_0x440830['@external']['authorName']),_0x5c9fa6=new Date(_0x440830['@external']['createdAt'])),new fi(this,{'threadId':_0xdc5588,'id':_0x11073a,'author':_0x9c475||_0x57c790,'creator':_0x57c790,'content':_0x4c5f4f,'createdAt':_0x1855cb,'authoredAt':_0x5c9fa6,'attributes':_0x440830});}['_addComment'](_0x30a33f){let {threadId:_0x544a34,content:_0x10c839,attributes:_0x1e4385,isFromAdapter:_0x34b99f}=_0x30a33f;const _0x4e339e=this['getCommentThread'](_0x30a33f['threadId']);if(!_0x4e339e)throw new _0x3b16ef('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x169ef0=this['_createNewComment'](_0x30a33f),{id:_0x5c0707}=_0x169ef0;if(_0x4e339e['_add'](_0x169ef0),_0x34b99f||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4e339e['isSubmitted'])return Promise['resolve']();const _0x3c1ef7=this['context']['plugins']['get']('PendingActions'),{channelId:_0x244c28}=_0x4e339e,_0xd462fd=_0x3c1ef7['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1e4385||(_0x1e4385={}),this['adapter']['addComment']({'channelId':_0x244c28,'threadId':_0x544a34,'commentId':_0x5c0707,'content':_0x10c839,'attributes':_0x1e4385})['then'](_0x4cbee8=>{_0x3c1ef7['remove'](_0xd462fd),_0x4cbee8&&this['_updateComment']({'channelId':_0x244c28,'threadId':_0x544a34,'commentId':_0x5c0707,'createdAt':_0x4cbee8['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x219538=>{throw console['error'](_0x219538),new _0x3b16ef('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x151be0,commentId:_0x4eb8f0,content:_0x3992a6,createdAt:_0x43fea9,attributes:_0x23d56f,isFromAdapter:_0x522e8d}){if(void 0x0!==_0x3992a6&&('string'!=typeof _0x3992a6||!_0x3992a6['trim']()['length']))throw new _0x3b16ef('commentsrepository-update-comment-invalid-content');const _0x4027be=this['getCommentThread'](_0x151be0),_0x3600a8=_0x4027be['getComment'](_0x4eb8f0);if(!_0x3600a8)throw new _0x3b16ef('commentsrepository-update-missing-comment',this);let _0x2775d1=!0x1;if(_0x3992a6&&_0x3992a6!==_0x3600a8['content']&&(_0x3600a8['isEditable']||_0x522e8d)&&(_0x3600a8['content']=_0x3992a6,_0x2775d1=!0x0),_0x43fea9&&_0x43fea9!==_0x3600a8['createdAt']&&(_0x3600a8['createdAt']=_0x43fea9,_0x3600a8['attributes']&&_0x3600a8['attributes']['@external']||(_0x3600a8['authoredAt']=_0x43fea9),_0x2775d1=!0x0),_0x23d56f&&!wt(_0x23d56f,_0x3600a8['attributes'])&&(_0x3600a8['attributes']=_0x23d56f,_0x2775d1=!0x0),!_0x2775d1)return Promise['resolve']();if(_0x4027be['fire']('commentUpdated'),_0x522e8d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1b0548=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1d2baa}=this['getCommentThread'](_0x3600a8['threadId']),_0x45397d=_0x1b0548['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1d2baa,'threadId':_0x151be0,'commentId':_0x4eb8f0,'content':_0x3992a6,'attributes':_0x23d56f})['then'](()=>_0x1b0548['remove'](_0x45397d))['catch'](_0x346b9d=>{throw console['error'](_0x346b9d),new _0x3b16ef('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x1e9886,commentId:_0x105113,isFromAdapter:_0x5ef8cc}){const _0x23c75f=this['getCommentThread'](_0x1e9886),_0x4de0de=_0x23c75f['getComment'](_0x105113);if(!_0x4de0de)throw new _0x3b16ef('commentsrepository-remove-missing-comment',this);if(_0x23c75f['_remove'](_0x4de0de),_0x5ef8cc||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xb92baf=this['context']['plugins']['get']('PendingActions'),{channelId:_0x27c54c}=_0x23c75f,_0x1e530c=_0xb92baf['add'](E(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x27c54c,'threadId':_0x1e9886,'commentId':_0x105113})['then'](()=>_0xb92baf['remove'](_0x1e530c))['catch'](_0x13740a=>{throw console['error'](_0x13740a),new _0x3b16ef('commentsrepository-remove-comment-internal-error',this);});}}class ui extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1f969f(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x5a37e1,_0x7e080f){super();const _0x58e4b4=_0x7e080f['isResolvable'];this['channelId']=_0x7e080f['channelId'],this['id']=_0x7e080f['id'],this['comments']=new _0x41f317(),this['_repository']=_0x5a37e1,this['_isAttached']=!0x1,this['_isSubmitted']=_0x7e080f['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x5a37e1,'_permissions',_0x5a37e1,'_readOnlyChannels',()=>_0x5a37e1['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x5a37e1,'_permissions',()=>_0x5a37e1['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x5a37e1,'_permissions',()=>{const _0x2b950e=_0x5a37e1['getPermissions'](this['channelId']);return _0x2b950e['write']||_0x2b950e['admin'];}),this['bind']('isResolvable')['to'](_0x5a37e1,'_permissions',()=>_0x58e4b4&&_0x5a37e1['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x7e080f['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x508665,_0x2ed708)=>_0x508665?_0x2ed708?_0x508665<_0x2ed708?_0x508665:_0x2ed708:_0x508665:_0x2ed708),this['set']('unlinkedAt',_0x7e080f['unlinkedAt']||null),this['set']('resolvedAt',_0x7e080f['resolvedAt']||null),this['set']('resolvedBy',_0x7e080f['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x10926e=>!!_0x10926e),this['set']('attributes',_0x7e080f['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x526e8f,_0x10c311)=>_0x526e8f+_0x10c311['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xc4e2d2,id:_0x39426c}=this;this['_repository']['fire'](bt('submitCommentThread',_0xc4e2d2),{'channelId':_0xc4e2d2,'threadId':_0x39426c});}['setUnlinkedAt'](_0x3be963){this['_update']({'unlinkedAt':_0x3be963});}['resolve']({resolvedAt:_0x4e7d46=new Date(),resolvedBy:_0x4ea2de=null,isFromAdapter:_0x21fd3a=!0x1}={}){const _0x4a348b=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x34b1d6,id:_0x54a684}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x34b1d6),{'channelId':_0x34b1d6,'threadId':_0x54a684,'resolvedAt':_0x4e7d46,'resolvedBy':_0x4ea2de||_0x4a348b['id'],'isFromAdapter':_0x21fd3a});}['reopen']({isFromAdapter:_0x1b16eb=!0x1}={}){const {channelId:_0x221e5c,id:_0x585007}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x221e5c),{'channelId':_0x221e5c,'threadId':_0x585007,'isFromAdapter':_0x1b16eb});}['setContext'](_0xd1b096){this['context']||this['_update']({'context':_0xd1b096});}['setAttribute'](_0x4a117f,_0x5c16df){const _0x3cc622=It(this['attributes']);At(_0x3cc622,_0x4a117f,_0x5c16df),this['_update']({'attributes':_0x3cc622});}['removeAttribute'](_0x11a3c6){const _0x4f4870=It(this['attributes']);yt(_0x4f4870,_0x11a3c6),this['_update']({'attributes':_0x4f4870});}['remove']({isFromAdapter:_0x9e5fed=!0x1}={}){const {channelId:_0x532d5f,id:_0x2fd832}=this;this['_repository']['fire'](bt('removeCommentThread',_0x532d5f),{'channelId':_0x532d5f,'threadId':_0x2fd832,'isFromAdapter':_0x9e5fed});}['attachTo'](_0x57c993){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x57c993});}['addComment'](_0x123517){const {channelId:_0x1e3e05,id:_0x32d83f}=this;this['_repository']['fire'](bt('addComment',_0x1e3e05,_0x32d83f),Object['assign']({'channelId':_0x1e3e05,'threadId':_0x32d83f},_0x123517));}['getComment'](_0x5f560b){if('string'!=typeof _0x5f560b)throw new _0x3b16ef('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5f560b});return this['comments']['get'](_0x5f560b);}['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'](_0x168398=>_0x168398['toJSON']()),'attributes':this['attributes']};}['_add'](_0x774b8b){return this['listenTo'](_0x774b8b,'change:authoredAt',()=>{const _0xc4dfb6=this['_findOptimalIndex'](_0x774b8b),_0x3b3db2=this['comments'];_0xc4dfb6-0x1!=_0x3b3db2['getIndex'](_0x774b8b)&&_0xc4dfb6+0x1!=_0x3b3db2['getIndex'](_0x774b8b)&&(this['_remove'](_0x774b8b),this['_add'](_0x774b8b));}),this['comments']['add'](_0x774b8b,this['_findOptimalIndex'](_0x774b8b));}['_update'](_0x1fb12f){const {channelId:_0x1ffb07,id:_0x5d8ec0}=this;this['_repository']['fire'](bt('updateCommentThread',_0x1ffb07),{..._0x1fb12f,'channelId':_0x1ffb07,'threadId':_0x5d8ec0});}['_remove'](_0x149118){return this['stopListening'](_0x149118),_0x149118['destroy'](),this['comments']['remove'](_0x149118);}['_findOptimalIndex'](_0x3bf708){const _0x22dbfd=this['comments']['find'](_0x521c74=>new Date(_0x521c74['authoredAt'])['getTime']()>new Date(_0x3bf708['authoredAt'])['getTime']());return _0x22dbfd?this['comments']['getIndex'](_0x22dbfd):this['length'];}}class fi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1f969f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x234438,_0xf4909d){super();const _0x1ae9ac=_0x234438['context']['plugins']['get'](it)['me'],_0x2f6499=_0x234438['getCommentThread'](_0xf4909d['threadId']),_0x749029=0x0===_0x2f6499['comments']['length'],_0x550776=_0x1ae9ac===_0xf4909d['author'];this['id']=_0xf4909d['id'],this['threadId']=_0xf4909d['threadId'],this['author']=_0xf4909d['author'],this['creator']=_0xf4909d['creator'],this['isExternal']=Boolean(_0xf4909d['attributes']&&_0xf4909d['attributes']['@external']),this['set']('content',_0xf4909d['content']),this['createdAt']=_0xf4909d['createdAt']||new Date(),this['set']('authoredAt',_0xf4909d['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x2f6499,'resolvedAt'),this['set']('attributes',_0xf4909d['attributes']||{}),this['bind']('isEditable')['to'](_0x234438,'_permissions',()=>{const _0x13d476=_0x234438['getPermissions'](_0x2f6499['channelId'])['write'],_0x4800b1=_0x234438['getPermissions'](_0x2f6499['channelId'])['modifyAll'];return _0x550776&&_0x13d476||!_0x550776&&_0x4800b1;}),this['bind']('isRemovable')['to'](_0x2f6499,'isRemovable',_0x234438,'_permissions',_0xa5f9e7=>{const _0x42edcf=_0x234438['getPermissions'](_0x2f6499['channelId'])['write'],_0x30be21=_0x234438['getPermissions'](_0x2f6499['channelId'])['modifyAll'];return _0x550776&&_0x42edcf||_0xa5f9e7&&_0x749029||!_0x550776&&_0x30be21&&!_0x749029;}),this['bind']('isReadOnly')['to'](_0x2f6499,'isReadOnly'),this['_repository']=_0x234438;}get['weight'](){return Math['max'](function(_0x169164){const _0x4a899c=document['createElement']('div');return _0x4a899c['innerHTML']=_0x169164,_0x4a899c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1da917){const {threadId:_0x4cae1c,id:_0x53af3e}=this;if(!this['_repository']['hasCommentThread'](_0x4cae1c))throw new _0x3b16ef('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x34ba19}=this['_repository']['getCommentThread'](_0x4cae1c);this['_repository']['fire'](bt('updateComment',_0x34ba19,_0x4cae1c),{'channelId':_0x34ba19,'threadId':_0x4cae1c,'commentId':_0x53af3e,..._0x1da917});}['setAttribute'](_0x387f8d,_0x27459c){const _0x87d870=It(this['attributes']);At(_0x87d870,_0x387f8d,_0x27459c),this['update']({'attributes':_0x87d870});}['removeAttribute'](_0x703431){const _0x33960d=It(this['attributes']);yt(_0x33960d,_0x703431),this['update']({'attributes':_0x33960d});}['remove'](_0x34128={}){if(!_0x34128['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x21cbb7,id:_0x4b977b}=this;if(!this['_repository']['hasCommentThread'](_0x21cbb7))throw new _0x3b16ef('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4f79ce}=this['_repository']['getCommentThread'](_0x21cbb7);this['_repository']['fire'](bt('removeComment',_0x4f79ce,_0x21cbb7),{'channelId':_0x4f79ce,'threadId':_0x21cbb7,'commentId':_0x4b977b,..._0x34128});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x4625ad,..._0x548250){for(const _0x1f7add of _0x548250)void 0x0!==_0x1f7add&&(_0x4625ad+=':'+String(_0x1f7add));return _0x4625ad;}class J extends _0x3906d3{['refresh'](){const _0x1a5824=this['editor']['model']['document']['selection'];for(const _0x5f44cd of _0x1a5824['getRanges']())if(this['_hasContent'](_0x5f44cd))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x1854f2=_0x437d75()}={}){const _0x2cf593=this['editor']['model'],_0x221222=[];for(const _0x141eaf of _0x2cf593['document']['selection']['getRanges']())this['_hasContent'](_0x141eaf)&&_0x221222['push'](this['_trimToContent'](_0x141eaf));_0x2cf593['change'](_0x3246d9=>{for(const _0x417ae8 of _0x221222){const _0x355272=_0x437d75()['substr'](0x1,0x5),_0xff66eb='comment:'+_0x1854f2+':'+_0x355272;_0x3246d9['addMarker'](_0xff66eb,{'range':_0x417ae8,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x2507da){for(const _0x4bddef of _0x2507da['getItems']())if(this['_itemIsContent'](_0x4bddef))return!0x0;return!0x1;}['_itemIsContent'](_0x4481ad){return _0x4481ad['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4481ad)&&!_0x4481ad['is']('element','tableCell');}['_trimToContent'](_0x703e5b){const _0x39f59f=_0xb4716=>!this['_itemIsContent'](_0xb4716['item']),_0x196ac4=_0x703e5b['start']['getLastMatchingPosition'](_0x39f59f),_0xc77ab9=_0x703e5b['end']['getLastMatchingPosition'](_0x39f59f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x196ac4,_0xc77ab9);}}class P extends _0x387cbb{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[O];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x54c283){super(_0x54c283),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x192e7b=this['editor'],_0x46df2b=_0x192e7b['model']['document']['selection'],_0x403b4b=_0x5d89fe(()=>this['refreshSelectedViews'](),0xa);_0x46df2b['on']('change:range',(_0x385e41,_0x373859)=>{_0x373859['directChange']&&(_0x403b4b['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x192e7b['editing']['view']['document'],'change:isFocused',(_0x123824,_0x199fcd,_0x40f16a)=>{_0x40f16a&&_0x403b4b();}),this['listenTo'](_0x192e7b['ui']['focusTracker'],'change:isFocused',(_0x9d9990,_0x4b3761,_0x589394)=>{_0x589394||_0x192e7b['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x3d1413=>this['_editorAnnotationsData']['has'](_0x3d1413['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x582622){if(this['_editorAnnotations']['has'](_0x582622['view']))return;this['_editorAnnotations']['add'](_0x582622['view']),this['editor']['ui']['focusTracker']['add'](_0x582622['view']['element']);const _0x56f50a=this['editor']['plugins']['get'](O);this['listenTo'](_0x56f50a['collection'],'remove',(_0x33d4a9,_0x58c128)=>{this['editor']['ui']['focusTracker']['remove'](_0x58c128['view']['element']),this['_editorAnnotations']['delete'](_0x58c128['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x2dab12){if('function'!=typeof _0x2dab12)throw new _0x3b16ef('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x2dab12);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1955cf,annotations:_0x37827d}){const _0x49a8b1=[],_0x40a356=this['editor']['model']['document']['selection'],_0x54f476=Array['from'](_0x40a356['getRanges']());for(const [_0x190e08,_0x3cb8c6]of this['_editorAnnotationsData']){const _0x6b1cfb=_0x37c7c9(_0x3cb8c6),_0x2aea41=_0x37827d['getByInnerView'](_0x190e08);_0x6b1cfb&&_0x2aea41&&_0x49a8b1['push']({'annotation':_0x2aea41,'range':_0x6b1cfb});}function _0x37c7c9(_0x44523f){for(const _0x3451c9 of _0x44523f)for(const _0x4ac548 of _0x54f476)if(_0x3451c9['containsRange'](_0x4ac548,!_0x40a356['isCollapsed']))return _0x3451c9;return null;}return _0x49a8b1['sort']((_0x44faa2,_0x36153d)=>{const _0x4e8094=_0x44faa2['range'],_0x52703c=_0x36153d['range'];if(!_0x4e8094['isEqual'](_0x52703c)){if(_0x4e8094['containsRange'](_0x52703c,!0x0))return 0x1;if(_0x52703c['containsRange'](_0x4e8094,!0x0))return-0x1;}return _0x44faa2['annotation']==_0x1955cf?-0x1:_0x36153d['annotation']==_0x1955cf?0x1:0x0;})['map'](_0x148013=>_0x148013['annotation']);}get['_editorAnnotationsData'](){const _0x51261b=new Map();for(const _0x29d717 of Array['from'](this['_dataCollectors']))for(const [_0x13680d,_0x391558]of _0x29d717())_0x51261b['set'](_0x13680d,_0x391558);return _0x51261b;}}class st extends _0x387cbb{['afterInit'](){const _0x3e7dca=this['editor'];if(!_0x3e7dca['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3e7dca['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x387cbb{constructor(_0x2df3f1){super(_0x2df3f1),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4ff054=this['editor'],_0x1eb00c=_0x4ff054['commands']['get']('importWord'),_0x5ed1a4=_0x4ff054['plugins']['get'](it);_0x1eb00c&&(_0x1eb00c['on']('execute',(_0x5cdfa,[,_0x40aeda])=>{_0x40aeda['collaboration_features']={'comments':!0x0,'user_id':_0x5ed1a4['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1eb00c,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x56e796,_0x13e922){const {comment_threads:_0x286d50}=_0x13e922;_0x286d50&&_0x286d50['forEach'](({thread_id:_0x36ffce,comments:_0x7ff8e3,is_resolved:_0xe24b6})=>{const _0x3530d7=new Date(),_0x5ebefb=_0x7ff8e3['map'](({author:_0x446355,content:_0x291d1f,created_at:_0x11b0d7})=>({'content':_0x291d1f,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x3530d7,'attributes':{'@external':{'authorName':_0x446355,'createdAt':_0x11b0d7?new Date(_0x11b0d7):new Date(),'source':'importWord'}}})),_0x2aa634=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x2aa634,'threadId':_0x36ffce,'comments':_0x5ebefb,'resolvedAt':_0xe24b6?_0x3530d7:null});});}}class at extends _0x387cbb{constructor(_0x26d1ee){super(_0x26d1ee),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x5d8caf=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5d8caf,'contentInsertion',(_0x51acf0,_0x2e23dc)=>this['_removeMarkersWithoutThreads'](_0x2e23dc['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x30604e){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x30604e;const _0x19b363=this['editor']['plugins']['get']('CommentsRepository');for(const _0x4cbd53 of _0x30604e['keys']()){const [_0x1e95aa,_0x5a5641]=_0x4cbd53['split'](':');'comment'!=_0x1e95aa||_0x19b363['hasCommentThread'](_0x5a5641)||_0x30604e['delete'](_0x4cbd53);}return _0x30604e;}['_registerMarkerInClipboardPipeline'](){const _0x464dcf=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x334ce9=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x334ce9&&_0x464dcf['_registerMarkerToCopy']('comment',_0x334ce9);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0xa9e945){switch(_0xa9e945){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x387cbb{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x26a602,_0x261b34)=>{if(!_0x261b34['options']['showCommentHighlights'])return null;if(_0x261b34['options']['ignoreResolvedComments']){const {id:_0x467a9d}=er(_0x26a602['markerName']),_0xc787d8=this['editor']['plugins']['get'](o);if(_0xc787d8['getCommentThread'](_0x467a9d)?.['isResolved']&&_0x26a602['item'])return _0x261b34['consumable']['consume'](_0x26a602['item'],'addMarker:'+_0x26a602['markerName']),_0x261b34['consumable']['consume'](_0x26a602['item'],'removeMarker:'+_0x26a602['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x274f32=>{_0x274f32['on']('addMarker:comment',(_0xf1723,_0x3fe4ef,_0x3ad96d)=>{if(!_0x3ad96d['options']['showCommentHighlights'])return;const _0x46cbbb=_0x3fe4ef['item'];if(!_0x46cbbb)return;const _0x20f957=_0x3ad96d['mapper']['toViewElement'](_0x46cbbb);this['editor']['model']['schema']['isObject'](_0x46cbbb)&&_0x20f957&&!_0x20f957['getCustomProperty']('widget')&&_0x20f957['is']('containerElement')&&_0x43117b(_0x20f957,_0x3ad96d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x423850,{writer:_0x311396,options:_0x3d24e1})=>{if(!_0x3d24e1['showCommentHighlights'])return null;const _0x2543a7=_0x311396['createContainerElement']('div'),_0x411b24=_0x311396['createEmptyElement']('hr');return _0x311396['addClass']('ck-horizontal-line',_0x2543a7),_0x311396['insert'](_0x311396['createPositionAt'](_0x2543a7,0x0),_0x411b24),_0x2543a7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2dd09a,{writer:_0x15a2ad,options:_0x198e04})=>{if(!_0x198e04['showCommentHighlights'])return null;const _0x33c82f=_0x15a2ad['createContainerElement']('span'),_0x362672=_0x15a2ad['createEmptyElement']('img');return _0x15a2ad['addClass']('image-inline',_0x33c82f),_0x15a2ad['insert'](_0x15a2ad['createPositionAt'](_0x33c82f,0x0),_0x362672),_0x33c82f;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4b7651,{writer:_0x243544,options:_0x4792af})=>{if(_0x4792af['showCommentHighlights'])return _0x243544['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x28201b,_0x5b8528,_0x50c83f)=>{_0x50c83f['options']['showCommentHighlights']&&_0x28201b['stop']();},{'priority':'high'});}}class r extends _0x387cbb{static get['requires'](){return[o,P,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1b7175){super(_0x1b7175),this['set']('isThreadsLoadingPaused',!0x0),_0x1b7175['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x27ae31,_0x14024d,_0x186dfe,_0x1b79b1)=>{const _0x38c194=_0x1b7175['plugins']['get'](o),_0x58cc33=_0x186dfe?er(_0x186dfe)['id']:null;_0x1b7175['model']['change'](()=>{if(_0x58cc33){const _0x4bb7b3=this['getAllMarkersForId'](_0x58cc33);for(const _0x22c7b3 of _0x4bb7b3)_0x1b7175['editing']['reconvertMarker'](_0x22c7b3);}if(_0x1b79b1){const {id:_0x160437}=er(_0x1b79b1),_0x48c60f=_0x38c194['getCommentThread'](_0x160437);if(_0x48c60f&&_0x48c60f['unlinkedAt'])return;if(_0x48c60f&&!_0x48c60f['isAttached'])return;const _0x10f406=this['getAllMarkersForId'](_0x160437);for(const _0x2f4507 of _0x10f406)_0x1b7175['editing']['reconvertMarker'](_0x2f4507);}}),_0x58cc33&&this['scrollToThreadMarker'](_0x58cc33);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x5480ea=this['editor'],_0x5781f7=_0x5480ea['plugins']['get'](o),_0x27789e=_0x5480ea['config']['get']('collaboration.channelId'),_0x48891b=_0x5781f7['getCommentThreads']()['filter'](_0x70f9ed=>_0x70f9ed['channelId']!==_0x27789e);_0x5480ea['commands']['add']('addCommentThread',new J(_0x5480ea)),this['listenTo'](_0x5480ea,'change:isReadOnly',(_0x314cfa,_0x37666b,_0x5e5c3e)=>{_0x5781f7['switchReadOnly'](_0x5e5c3e,_0x5480ea['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x5781f7,ft('addCommentThread',_0x27789e),(_0xf01a1f,{threadId:_0x3bc254})=>{const _0x55e43d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3bc254);_0x55e43d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3bc254);}),this['listenTo'](_0x5781f7,ft('removeCommentThread',_0x27789e),(_0x43f92b,{threadId:_0x2e6685})=>{_0x5480ea['model']['enqueueChange']({'isUndoable':!0x1},_0x3a9853=>{const _0x2270ea=this['getAllMarkersForId'](_0x2e6685);for(const _0x3f2610 of _0x2270ea)_0x3a9853['removeMarker'](_0x3f2610);});}),this['listenTo'](_0x5781f7,ft('resolveCommentThread',_0x27789e),(_0x59aed7,{threadId:_0x46b503})=>{(this['_reconvertMarkers'](_0x46b503),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x46b503)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x5781f7,ft('reopenCommentThread',_0x27789e),(_0x203863,{threadId:_0x2838bb})=>{this['_reconvertMarkers'](_0x2838bb);},{'priority':'low'}),this['listenTo'](_0x5781f7,ft('addComment',_0x27789e),(_0x5b2ecc,{threadId:_0x50a778,isFromAdapter:_0x2256ef})=>{const _0x5e2f4e=this['getAllMarkersForId'](_0x50a778);if(_0x2256ef||0x0==_0x5e2f4e['length']||!_0x5781f7['hasCommentThread'](_0x50a778))return;0x1===_0x5781f7['getCommentThread'](_0x50a778)['length']&&_0x5480ea['model']['enqueueChange']({'isUndoable':!0x1},_0x238fd0=>{for(const _0x336b35 of _0x5e2f4e)_0x238fd0['updateMarker'](_0x336b35,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x48891b);}['afterInit'](){!async function(_0x295748){const _0x23f817=_0x2735cb([0x53,0x45,0x44,0x70,0x56,0x5a,0x7a,0x67,0x4f,0x39,0x74,0x4e,0x6d,0x4b,0x75,0x69,0x66,0x64,0x32,0x30,0x36,0x61,0x46,0x37,0x42,0x58,0x48,0x43,0x54,0x73,0x63,0x33,0x78,0x57,0x31,0x34,0x4c,0x6c,0x71,0x59,0x38,0x72,0x4a,0x41,0x79,0x68,0x4d,0x6a,0x55,0x76,0x47,0x62,0x6b,0x77,0x6e,0x52,0x49,0x6f,0x51,0x35,0x65,0x50]),_0x18a0a4=0x1458ce0b,_0x2f0db4=0x145fa72b^_0x18a0a4,_0x49d7da=window[_0x2735cb([0x44,0x61,0x74,0x65])][_0x2735cb([0x6e,0x6f,0x77])](),_0x1d1e8b=_0x295748[_0x2735cb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4e7a14=new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x35163b=>{_0x1d1e8b[_0x2735cb([0x6f,0x6e,0x63,0x65])](_0x2735cb([0x72,0x65,0x61,0x64,0x79]),_0x35163b);}),_0x2d6da6={[_0x2735cb([0x6b,0x74,0x79])]:_0x2735cb([0x45,0x43]),[_0x2735cb([0x75,0x73,0x65])]:_0x2735cb([0x73,0x69,0x67]),[_0x2735cb([0x63,0x72,0x76])]:_0x2735cb([0x50,0x2d,0x32,0x35,0x36]),[_0x2735cb([0x78])]:_0x2735cb([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]),[_0x2735cb([0x79])]:_0x2735cb([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]),[_0x2735cb([0x61,0x6c,0x67])]:_0x2735cb([0x45,0x53,0x32,0x35,0x36])},_0x7d5259=_0x1d1e8b[_0x2735cb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2735cb([0x67,0x65,0x74])](_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x590de1(){let _0xd24d2a,_0x20e1e5=null,_0x2a95d4=null;try{if(_0x7d5259==_0x2735cb([0x47,0x50,0x4c]))return _0x2735cb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xd24d2a=_0x2ed3b6(),!_0xd24d2a)return _0x2735cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xd24d2a[_0x2735cb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2a95d4=_0x5d3fa1(_0xd24d2a[_0x2735cb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xd24d2a[_0x2735cb([0x6a,0x74,0x69])])),await _0x29bedd()?_0x5dd68b()?_0x1b7e40()?_0x2735cb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x2a0a15()?(_0xd24d2a[_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2735cb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x20e1e5=_0x1d762b(_0x2735cb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xd24d2a[_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2735cb([0x74,0x72,0x69,0x61,0x6c])&&(_0x20e1e5=_0x1d762b(_0x2735cb([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3136fa()):_0x2735cb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2735cb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2735cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2735cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b7e40(){const _0x2638b9=[_0x2735cb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2735cb([0x74,0x72,0x69,0x61,0x6c])][_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd24d2a[_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x49d7da/0x3e8:0xe10*_0x2f0db4;return _0xd24d2a[_0x2735cb([0x65,0x78,0x70])]<_0x2638b9;}function _0x5dd68b(){const _0x332629=_0xd24d2a[_0x2735cb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x332629)return!0x1;if(_0x332629[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2735cb([0x2a])))return!0x0;if(_0x332629[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2735cb([0x43,0x4d,0x54])))return!0x0;if(_0x332629[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2735cb([0x52,0x43,0x4d,0x54]))){if(_0x3ff2b3())return!0x0;if(_0x1515c1()||_0x3115f0())return!0x0;}return!0x1;}function _0x2a0a15(){const _0x1ebeed=_0xd24d2a[_0x2735cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x1ebeed||0x0==_0x1ebeed[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2e703d}=new URL(window[_0x2735cb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x1ebeed[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2e703d))return!0x0;const _0x573eb5=_0x2e703d[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])](_0x2735cb([0x2e]));return _0x1ebeed[_0x2735cb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf51413=>_0xf51413[_0x2735cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2735cb([0x2a])))[_0x2735cb([0x6d,0x61,0x70])](_0x4e4778=>_0x4e4778[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])](_0x2735cb([0x2e])))[_0x2735cb([0x73,0x6f,0x6d,0x65])](_0x413980=>_0x573eb5[_0x2735cb([0x65,0x76,0x65,0x72,0x79])]((_0x4b487e,_0x287fec)=>_0x413980[_0x287fec]===_0x4b487e||_0x413980[_0x287fec]===_0x2735cb([0x2a])));}function _0x3136fa(){return _0x20e1e5&&_0x2a95d4?new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5edb1d,_0x3afe36)=>{_0x20e1e5[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x5edb1d,_0x3afe36),_0x2a95d4[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x22e59f=>{_0x22e59f!=_0x2735cb([0x56,0x61,0x6c,0x69,0x64])&&_0x5edb1d(_0x22e59f);},_0x3afe36);}):_0x20e1e5||_0x2a95d4||_0x2735cb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5d3fa1(_0x4c2671,_0x3f6735){return new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x172556=>{if(_0x2860e6())return _0x172556(_0x2735cb([0x56,0x61,0x6c,0x69,0x64]));_0x1bce52(),_0x1d1e8b[_0x2735cb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2735cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x408a70=!0x1;const _0x24c2cc=_0x437d75();function _0x4fb98a(_0x6ff9ea){return!!_0x6ff9ea&&(typeof _0x6ff9ea===_0x2735cb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x6ff9ea===_0x2735cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x6ff9ea[_0x2735cb([0x74,0x68,0x65,0x6e])]===_0x2735cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x6ff9ea[_0x2735cb([0x63,0x61,0x74,0x63,0x68])]===_0x2735cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1250da(_0x21df98){_0xc57fef(_0x21df98)[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x224537=>{if(!_0x224537||_0x224537[_0x2735cb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2735cb([0x6f,0x6b]))return _0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1e01f9(_0x23f628(_0x24c2cc+_0x3f6735))!=_0x224537[_0x2735cb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2735cb([0x56,0x61,0x6c,0x69,0x64]);})[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x140f22=>(_0x2c5d81(),_0x140f22),()=>{const _0xb917fd=_0x3fe6eb();return null==_0xb917fd?(_0x2c5d81(),_0x2735cb([0x56,0x61,0x6c,0x69,0x64])):_0x2735cb(_0x49d7da-_0xb917fd>(0x30544a0b^_0x18a0a4)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x172556)[_0x2735cb([0x63,0x61,0x74,0x63,0x68])](()=>{_0x172556(_0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3d82b6=0x146e208b^_0x18a0a4;function _0x2c5d81(){const _0x793693=_0x2735cb([0x6c,0x6c,0x63,0x74,0x2d])+_0x1e01f9(_0x23f628(_0x4c2671)),_0x238e38=_0x2861a7(_0x1e01f9(window[_0x2735cb([0x4d,0x61,0x74,0x68])][_0x2735cb([0x63,0x65,0x69,0x6c])](_0x49d7da/_0x3d82b6)));window[_0x2735cb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2735cb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x793693,_0x238e38);}function _0x3fe6eb(){const _0xcc210d=_0x2735cb([0x6c,0x6c,0x63,0x74,0x2d])+_0x1e01f9(_0x23f628(_0x4c2671)),_0x22cc87=window[_0x2735cb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2735cb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xcc210d);return _0x22cc87?window[_0x2735cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2861a7(_0x22cc87),0x10)*_0x3d82b6:null;}function _0xc57fef(_0x18a07d){return new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x308085,_0x348c72)=>{_0x18a07d[_0x2735cb([0x74,0x68,0x65,0x6e])](_0x308085,_0x348c72),window[_0x2735cb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x348c72,0x14591acb^_0x18a0a4);});}}_0x1d1e8b[_0x2735cb([0x6f,0x6e])](_0x2735cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x346ce6,_0x16a9c3)=>{if(_0x16a9c3[0x0]!=_0x4c2671)return _0x172556(_0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x16a9c3[0x1]={..._0x16a9c3[0x1],[_0x2735cb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x24c2cc};},{[_0x2735cb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2735cb([0x68,0x69,0x67,0x68])}),_0x1d1e8b[_0x2735cb([0x6f,0x6e])](_0x2735cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xd2973b=>{_0x4fb98a(_0xd2973b[_0x2735cb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x408a70=!0x0,_0x1250da(_0xd2973b[_0x2735cb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2735cb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2735cb([0x6c,0x6f,0x77])}),_0x4e7a14[_0x2735cb([0x74,0x68,0x65,0x6e])](()=>{_0x408a70||_0x172556(_0x2735cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2860e6(){return _0x1d1e8b[_0x2735cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2735cb([0x76,0x69,0x65,0x77])][_0x2735cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2735cb([0x61,0x75,0x74,0x6f]);}function _0x1bce52(){_0x1d1e8b[_0x2735cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2735cb([0x76,0x69,0x65,0x77])][_0x2735cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2735cb([0x61,0x75,0x74,0x6f]);}}function _0x1d762b(_0x64363){const _0x567e89=[new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1753b4=>setTimeout(_0x1753b4,0x1451f0c7^_0x18a0a4)),_0x4e7a14[_0x2735cb([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x16f85b=>{let _0x337c46=0x0;_0x1d1e8b[_0x2735cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2735cb([0x6f,0x6e])](_0x2735cb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x129f07,_0x11fbc0)=>{_0x11fbc0[0x0][_0x2735cb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x337c46++,_0x337c46==(0x1458cff3^_0x18a0a4)&&(_0x16f85b(),_0x129f07[_0x2735cb([0x6f,0x66,0x66])]());});}))];return window[_0x2735cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2735cb([0x72,0x61,0x63,0x65])](_0x567e89)[_0x2735cb([0x74,0x68,0x65,0x6e])](()=>_0x64363);}async function _0x26e7cc(){await _0x4e7a14,_0x1d1e8b[_0x2735cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2735cb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x55a20f,_0x1d1e8b[_0x2735cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2735cb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x55a20f,_0x1d1e8b[_0x2735cb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2735cb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x3ff2b3(){return _0x8d97bc(_0x2735cb([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x3549b4(_0x2735cb([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2735cb([0x73,0x74,0x61,0x74,0x65])]==_0x2735cb([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x1515c1(){return _0x8d97bc(_0x2735cb([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 _0x3115f0(){return _0x8d97bc(_0x2735cb([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4542f7(_0x1ebb51){const _0x5a8bbf=_0x44b094();_0x1d1e8b[_0x5a8bbf]=_0x2735cb([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x1ebb51,_0x1ebb51!=_0x2735cb([0x56,0x61,0x6c,0x69,0x64])&&_0x26e7cc();}function _0x44b094(){const _0x4e84f1=window[_0x2735cb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2735cb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2735cb([0x6e,0x6f,0x77])]())[_0x2735cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2735cb([0x2e]),'');let _0x1cb9be=_0x2735cb([0x53]);for(let _0xc6c0f4=0x0;_0xc6c0f4<_0x4e84f1[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xc6c0f4+=0x2){let _0x40c287=window[_0x2735cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4e84f1[_0x2735cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xc6c0f4,_0xc6c0f4+0x2));_0x40c287>=_0x23f817[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x40c287-=_0x23f817[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1cb9be+=_0x23f817[_0x40c287];}return _0x1cb9be;}function _0x2ed3b6(){const _0x3d800a=_0x7d5259[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])](_0x2735cb([0x2e]));if(0x3!=_0x3d800a[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x35e91a(_0x3d800a[0x1]);function _0x35e91a(_0x2800c9){const _0x28c93e=_0xf734bd(_0x2800c9);return _0x28c93e&&_0x4ce526()?_0x28c93e:null;function _0x4ce526(){const _0x1b9368=_0x28c93e[_0x2735cb([0x6a,0x74,0x69])],_0x3fbb99=window[_0x2735cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1b9368[_0x2735cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b9368[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4759dd={..._0x28c93e,[_0x2735cb([0x6a,0x74,0x69])]:_0x1b9368[_0x2735cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1b9368[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4759dd[_0x2735cb([0x76,0x63])],_0x23f628(_0x4759dd)==_0x3fbb99;}}}async function _0x29bedd(){let _0x140f0e=!0x0;try{const _0x243d93=_0x7d5259[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])](_0x2735cb([0x2e])),[_0x19ced5,_0x13bbc3,_0x1f254e]=_0x243d93;return _0x2c193f(_0x19ced5),await _0x5ca520(_0x19ced5,_0x13bbc3,_0x1f254e),_0x140f0e;}catch{return!0x1;}function _0x2c193f(_0x54b6fd){const _0x1e50ce=_0xf734bd(_0x54b6fd);_0x1e50ce&&_0x1e50ce[_0x2735cb([0x61,0x6c,0x67])]==_0x2735cb([0x45,0x53,0x32,0x35,0x36])||(_0x140f0e=!0x1);}async function _0x5ca520(_0x590bc9,_0x291bf6,_0x42c376){const _0x26014a=window[_0x2735cb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2735cb([0x66,0x72,0x6f,0x6d])](_0x22d8af(_0x42c376),_0x5067bc=>_0x5067bc[_0x2735cb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x21bb06=new window[(_0x2735cb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2735cb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x590bc9+_0x2735cb([0x2e])+_0x291bf6),_0x3f56fe=window[_0x2735cb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2735cb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3f56fe)return;const _0x3faa48=await _0x3f56fe[_0x2735cb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2735cb([0x6a,0x77,0x6b]),_0x2d6da6,{[_0x2735cb([0x6e,0x61,0x6d,0x65])]:_0x2735cb([0x45,0x43,0x44,0x53,0x41]),[_0x2735cb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2735cb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2735cb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3f56fe[_0x2735cb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2735cb([0x6e,0x61,0x6d,0x65])]:_0x2735cb([0x45,0x43,0x44,0x53,0x41]),[_0x2735cb([0x68,0x61,0x73,0x68])]:{[_0x2735cb([0x6e,0x61,0x6d,0x65])]:_0x2735cb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3faa48,_0x26014a,_0x21bb06)||(_0x140f0e=!0x1);}}function _0xf734bd(_0x35a06d){return _0x35a06d[_0x2735cb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2735cb([0x65,0x79]))?JSON[_0x2735cb([0x70,0x61,0x72,0x73,0x65])](_0x22d8af(_0x35a06d)):null;}function _0x22d8af(_0x338c27){return window[_0x2735cb([0x61,0x74,0x6f,0x62])](_0x338c27[_0x2735cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2735cb([0x2b]))[_0x2735cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2735cb([0x2f])));}function _0x23f628(_0x691535){let _0x6096c3=0x1505;function _0xeebca(_0x4795fa){for(let _0x235375=0x0;_0x235375<_0x4795fa[_0x2735cb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x235375++){const _0x155c18=_0x4795fa[_0x2735cb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x235375);_0x6096c3=(_0x6096c3<<0x5)+_0x6096c3+_0x155c18,_0x6096c3&=_0x6096c3;}}function _0x39cf42(_0x2376cf){Array[_0x2735cb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2376cf)?_0x2376cf[_0x2735cb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x39cf42):_0x2376cf&&typeof _0x2376cf==_0x2735cb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2735cb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2376cf)[_0x2735cb([0x73,0x6f,0x72,0x74])]()[_0x2735cb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5f2d71,_0x32cbd0])=>{_0xeebca(_0x5f2d71),_0x39cf42(_0x32cbd0);}):_0xeebca(window[_0x2735cb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2376cf));}return _0x39cf42(_0x691535),_0x6096c3>>>0x0;}function _0x1e01f9(_0x102d51){return _0x102d51[_0x2735cb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2735cb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2735cb([0x30]));}function _0x2861a7(_0x4b678e){return _0x4b678e[_0x2735cb([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2735cb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2735cb([0x6a,0x6f,0x69,0x6e])]('');}function _0x8d97bc(_0x477ac3){return _0x1d1e8b[_0x2735cb([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2735cb([0x68,0x61,0x73])](_0x477ac3);}function _0x3549b4(_0x5e0ffc){return _0x1d1e8b[_0x2735cb([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2735cb([0x67,0x65,0x74])](_0x5e0ffc);}function _0x55a20f(){}function _0x2735cb(_0x525c8c){return _0x525c8c['map'](_0x29ae27=>String['fromCharCode'](_0x29ae27))['join']('');}_0x4542f7(await _0x590de1());}(this);}['destroy'](){const _0x443693=this['editor']['plugins']['get'](o),_0x5b6a8f=this['editor']['config']['get']('collaboration.channelId');for(const _0x133615 of _0x443693['getCommentThreads']({'channelId':_0x5b6a8f}))_0x443693['_detachCommentThread'](_0x133615['id']),_0x443693['_threads']['delete'](_0x133615['id']);super['destroy']();}['hasMarkerForId'](_0x27bed6){return this['getAllMarkersForId'](_0x27bed6)['length']>0x0;}['getAllMarkersForId'](_0xa0ef85){const _0x3aadc4=[];for(const _0x114b86 of this['editor']['model']['markers'])_0x114b86['name']['startsWith']('comment:'+_0xa0ef85)&&_0x3aadc4['push'](_0x114b86);return _0x3aadc4;}['scrollToThreadMarker'](_0x990f73){const _0x40a013=this['_getTargetForId'](_0x990f73);_0x40a013&&setTimeout(()=>{this['activeMarker']&&er(this['activeMarker'])['id']===_0x990f73&&rt({'target':_0x40a013[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1657c6){this['editor']['model']['change'](()=>{for(const _0x2cc999 of this['getAllMarkersForId'](_0x1657c6))this['editor']['editing']['reconvertMarker'](_0x2cc999);});}['_attachArchivedThread'](_0x8406b5){const _0x30edff=this['editor']['plugins']['get'](o),_0x162479=this['editor']['plugins']['get'](P),_0x406b7a=_0x30edff['getCommentThread'](_0x8406b5);if(!_0x406b7a['isAttached']){const _0x5843f9=_0x406b7a['attachTo'](()=>this['_getTargetForId'](_0x406b7a['id']));_0x162479['registerAnnotation'](_0x5843f9),_0x406b7a['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x16b395=this['editor'],_0x4c64da=_0x16b395['plugins']['get'](it);_0x16b395['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x5d6c9d,_0xecb1f3)=>{const {id:_0x23c646}=er(_0x5d6c9d['markerName']),_0x5c9d85=_0x16b395['plugins']['get'](o)['getCommentThread'](_0x23c646),_0x15fb5d=this['activeMarker']&&er(this['activeMarker'])['id']===_0x23c646;let _0x711890;if(_0x5c9d85&&_0x5c9d85['isResolved']&&!_0x15fb5d&&_0x5d6c9d['item'])return _0xecb1f3['consumable']['consume'](_0x5d6c9d['item'],'addMarker:'+_0x5d6c9d['markerName']),_0xecb1f3['consumable']['consume'](_0x5d6c9d['item'],'removeMarker:'+_0x5d6c9d['markerName']),null;const _0x46e705=['ck-comment-marker'];return _0x15fb5d&&_0x46e705['push']('ck-comment-marker--active'),_0x711890=_0x5c9d85?.['length']?_0x5c9d85['comments']['first']['author']['id']:_0x4c64da['me']['id'],{'classes':_0x46e705,'attributes':{'data-comment':_0x23c646,'data-author-id':_0x711890}};}}),_0x16b395['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x518060,{options:_0x3cef00})=>{if(_0x3cef00['showCommentHighlights'])return null;const _0x12c0ec=_0x16b395['plugins']['get'](o),_0x2cec90=_0x16b395['model']['markers']['get'](_0x518060),{id:_0x400137,part:_0x4035b9}=er(_0x518060);return _0x2cec90&&!_0x2cec90['affectsData']||_0x3cef00['ignoreResolvedComments']&&_0x12c0ec['getCommentThread'](_0x400137)?.['isResolved']?null:{'group':'comment','name':_0x4035b9?_0x400137+':'+_0x4035b9:_0x400137};}}),_0x16b395['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5630de,{writer:_0x29b68a})=>_0x29b68a['createElement']('$marker',{'data-name':'comment:'+_0x5630de['getAttribute']('id')})}),_0x16b395['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x3f2928=this['editor'],_0x1a5f03=_0x3f2928['plugins']['get'](o),_0x2eeadf=new Set(),_0x5c447b=new Set();_0x3f2928['model']['document']['registerPostFixer'](_0x1cc7b2=>{let _0x44836d=!0x1;for(const {name:_0x5f4330,data:_0x15c0d3}of _0x3f2928['model']['document']['differ']['getChangedMarkers']()){const {group:_0x48ab9d,id:_0x26545b}=er(_0x5f4330);let _0x55f364=_0x15c0d3['newRange'];if('comment'!==_0x48ab9d||!_0x55f364)continue;const _0x28419a='$graveyard'===_0x55f364['root']['rootName'];_0x28419a||(_0x55f364=dt(_0x55f364,_0x3f2928['model']),!_0x55f364||_0x55f364['isCollapsed']||!_0x15c0d3['newRange']||_0x55f364['isEqual'](_0x15c0d3['newRange']))?_0x3f2928['model']['hasContent'](_0x55f364)&&!_0x28419a?this['isThreadsLoadingPaused']?_0x2eeadf['add'](_0x5f4330):this['_handleThreadMarker'](_0x5f4330,_0x26545b):(_0x5c447b['add'](_0x5f4330),_0x2eeadf['delete'](_0x5f4330),_0x1cc7b2['removeMarker'](_0x5f4330),_0x44836d=!0x0):(_0x1cc7b2['updateMarker'](_0x5f4330,{'range':_0x55f364}),_0x44836d=!0x0);}return _0x44836d;}),this['on']('change:isThreadsLoadingPaused',(_0x79cca8,_0xb76b0,_0x46b6cc)=>{if(!_0x46b6cc&&_0x2eeadf['size'])for(const _0xc3af0a of _0x2eeadf){const {id:_0x55a2f1}=er(_0xc3af0a);_0x2eeadf['delete'](_0xc3af0a),_0x3f2928['model']['markers']['get'](_0xc3af0a)&&this['_handleThreadMarker'](_0xc3af0a,_0x55a2f1);}}),this['listenTo'](_0x3f2928['model']['document'],'change',()=>{for(const {name:_0x39edda,data:{newRange:_0x5f5198}}of _0x3f2928['model']['document']['differ']['getChangedMarkers']()){const {group:_0x734db4,id:_0x1d7a8e}=er(_0x39edda);if('comment'!==_0x734db4)continue;const _0x5144f0=_0x1a5f03['getCommentThread'](_0x1d7a8e),_0x33ecc7=this['hasMarkerForId'](_0x1d7a8e);_0x5144f0&&(!_0x5144f0['_hasTargetInContent']&&_0x5f5198&&_0x3f2928['editing']['view']['once']('render',()=>{const _0x2c94d6=_0x3f2928['plugins']['get'](O),_0x110b7b=_0x1a5f03['_threadToController']['get'](_0x5144f0)['view'];_0x2c94d6['getByInnerView'](_0x110b7b)['refreshVisibility']();},{'priority':'low'}),_0x5144f0['_hasTargetInContent']=_0x33ecc7||!!_0x5f5198),_0x5f5198||(_0x5c447b['add'](_0x39edda),_0x2eeadf['delete'](_0x39edda));}for(const _0x3cf388 of _0x5c447b){const {id:_0x453a2c}=er(_0x3cf388),_0x278041=_0x1a5f03['getCommentThread'](_0x453a2c);if(_0x2eeadf['delete'](_0x3cf388),!_0x278041)continue;const _0x3a9ef6=this['hasMarkerForId'](_0x453a2c);_0x3a9ef6||_0x278041['isSubmitted']?_0x3a9ef6||_0x278041['unlinkedAt']||_0x278041['setUnlinkedAt'](new Date()):_0x278041['remove']();}_0x5c447b['clear']();});}['_handleInitialThreads'](_0x1efaeb){_0x1efaeb['forEach'](_0x3b5f76=>{_0x3b5f76['unlinkedAt']&&this['_attachArchivedThread'](_0x3b5f76['id']);});}['_getTargetForId'](_0x9483be){const _0x11f87b=this['editor'],_0x53de90=this['getAllMarkersForId'](_0x9483be);return et(_0x11f87b['editing'],_0x53de90);}['_getTextContext'](_0x4c8f01){const _0x5080d7=this['getAllMarkersForId'](_0x4c8f01);let _0xf77d3e='',_0x395c50=!0x1;for(const _0x20f628 of _0x5080d7){const _0x30ee66=_0x20f628['getRange']();for(const _0x7207c8 of Array['from'](_0x30ee66['getItems']()))_0x7207c8['is']('$textProxy')?(_0xf77d3e&&_0x395c50&&(_0xf77d3e+='\x20',_0x395c50=!0x1),_0xf77d3e+=_0x7207c8['data']):_0x395c50=!0x0;_0x395c50=!0x0;}return _0xf77d3e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5b2d32,_0x2f0b0b){const _0x208b85=this['editor'],_0x4e6dd5=_0x208b85['plugins']['get'](o);let _0x23825f=_0x4e6dd5['getCommentThread'](_0x2f0b0b);const _0x569b99=_0x208b85['config']['get']('collaboration.channelId'),_0x453da1=_0x208b85['plugins']['get'](P);if(_0x23825f&&(_0x23825f['unlinkedAt']&&_0x23825f['setUnlinkedAt'](null),_0x23825f['isAttached']))return _0x23825f;return!this['getAllMarkersForId'](_0x2f0b0b)[0x0]['managedUsingOperations']?_0x208b85['editing']['view']['once']('render',()=>{if(_0x4e6dd5['getCommentThread'](_0x2f0b0b))return;const _0x420965=_0x208b85['plugins']['get'](O);_0x23825f=_0x4e6dd5['openNewCommentThread']({'channelId':_0x569b99,'threadId':_0x2f0b0b,'target':()=>this['_getTargetForId'](_0x2f0b0b),'context':{'type':'text','value':this['_getTextContext'](_0x2f0b0b)}});const _0x28983=_0x4e6dd5['_threadToController']['get'](_0x23825f)['view'],_0x4b35b5=_0x420965['getByInnerView'](_0x28983);_0x4b35b5&&_0x453da1['registerAnnotation'](_0x4b35b5);},{'priority':'low'}):_0x4e6dd5['fetchCommentThread']({'channelId':_0x569b99,'threadId':_0x2f0b0b})['then'](_0x241f1d=>{if('destroyed'!==_0x208b85['state']){if(_0x23825f=_0x241f1d,_0x23825f&&!_0x23825f['isAttached']){const _0x35c5ac=_0x23825f['attachTo'](()=>this['_getTargetForId'](_0x2f0b0b));_0x453da1['registerAnnotation'](_0x35c5ac),_0x23825f['isResolved']&&this['_reconvertMarkers'](_0x2f0b0b);}else{if(!_0x23825f){const _0x40576c=this['getAllMarkersForId'](_0x2f0b0b);_0x208b85['model']['change'](_0x2659eb=>{for(const _0x4398b0 of _0x40576c)_0x2659eb['removeMarker'](_0x4398b0);});}}}}),_0x23825f;}['_handleThreadMarker'](_0x2b833b,_0x4a6f3b){const _0x58ffd2=this['_attachMarkerToThread'](_0x2b833b,_0x4a6f3b);_0x58ffd2&&!_0x58ffd2['context']&&_0x58ffd2['setContext']({'type':'text','value':this['_getTextContext'](_0x4a6f3b)});}['_initAriaMarkerChangeAnnouncements'](){const _0x47d6fa=this['editor'];ot(_0x47d6fa['model'],({left:_0x58093f,entered:_0x4b6b06})=>{for(const _0x1d42ec of _0x58093f)if(mt(_0x1d42ec)){_0x47d6fa['ui']['ariaLiveAnnouncer']['announce'](E(_0x47d6fa['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x29f6cc of _0x4b6b06)if(mt(_0x29f6cc)){_0x47d6fa['ui']['ariaLiveAnnouncer']['announce'](E(_0x47d6fa['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x10ebc1)));break;}});}}function ft(_0x5bddd1,_0x18eb51){return _0x18eb51?_0x5bddd1+':'+_0x18eb51:_0x5bddd1;}function er(_0x4a6e63){const _0x356323=_0x4a6e63['split'](':');return{'group':_0x356323[0x0],'id':_0x356323[0x1],'part':_0x356323[0x2]};}function dt(_0x24d2f5,_0x99d230){const _0x2320d1=_0x99d230['schema'],_0x31db6e=_0x99d230['createRange'](_0x24d2f5['start']);for(const _0x1c0b33 of _0x24d2f5['getWalker']()){const {type:_0x1689a5,item:_0x31ca1b,nextPosition:_0x4df13c}=_0x1c0b33;if('text'===_0x1689a5||_0x2320d1['isObject'](_0x31ca1b)){const _0x2e631b=_0x99d230['createPositionBefore'](_0x31ca1b);_0x31db6e['isCollapsed']&&(_0x31db6e['start']=_0x2e631b),_0x31db6e['end']=_0x4df13c;}}return _0x31db6e;}function mt(_0x3f2218){return'comment'===er(_0x3f2218['name'])['group'];}class i extends _0x387cbb{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,O];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x231f67=this['editor'],_0x24506a=_0x231f67['plugins']['get'](o),_0x3153bd=_0x231f67['plugins']['get'](r),_0x4884d5=_0x231f67['plugins']['get'](O),_0x2b7b20=_0x231f67['plugins']['get'](P);_0x231f67['ui']['componentFactory']['add']('comment',()=>{const _0x1e3ac0=this['_createUIButton'](_0x5134f9);return _0x1e3ac0['tooltip']=!0x0,_0x1e3ac0;}),_0x231f67['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x180ec2)),_0x2b7b20['addSourceCollector'](()=>{const _0x379c30=[];for(const [_0x4290e2,_0x509079]of _0x24506a['_threadToController']){const _0x45cd9c=_0x3153bd['getAllMarkersForId'](_0x4290e2['id']),_0x4a254d=_0x45cd9c['map'](_0x551efb=>_0x551efb['getRange']());_0x45cd9c['length']>0x0&&_0x379c30['push']([_0x509079['view'],_0x4a254d]);}return _0x379c30;}),this['listenTo'](_0x4884d5,'change:activeAnnotations',(_0x4be854,_0x5cf5a1,_0x3588ea)=>{const _0x590463=Array['from'](_0x3588ea)['map'](_0x9a6c1e=>_0x9a6c1e['innerView'])['find'](_0x5b14d5=>_0x24506a['_viewToController']['has'](_0x5b14d5));if(!_0x590463)return void(_0x3153bd['activeMarker']=null);const _0x2f5544=_0x24506a['_viewToController']['get'](_0x590463)['model']['id'],_0x4425ea='comment:'+_0x2f5544;_0x2f5544&&_0x3153bd['hasMarkerForId'](_0x2f5544)?_0x3153bd['activeMarker']=_0x4425ea:_0x3153bd['activeMarker']&&(_0x3153bd['activeMarker']=null);}),this['listenTo'](_0x24506a,'removeCommentThread',(_0x2e5d79,{threadId:_0x152040,isFromAdapter:_0x59efa3})=>{!_0x59efa3&&_0x231f67['ui']['focusTracker']['isFocused']&&_0x3153bd['hasMarkerForId'](_0x152040)&&_0x231f67['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x24506a,'addComment',(_0x934270,{threadId:_0x2f8a44,isFromAdapter:_0x1bc5c1})=>{if(_0x1bc5c1||!_0x3153bd['hasMarkerForId'](_0x2f8a44)||!_0x24506a['hasCommentThread'](_0x2f8a44))return;0x1===_0x24506a['getCommentThread'](_0x2f8a44)['length']&&(_0x231f67['editing']['view']['focus'](),_0x934270['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x32c0ae=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x12f656;for(const _0x2a2687 in _0x32c0ae){const _0x1cf358=_0x2a2687,_0x3475fa=_0x32c0ae[_0x1cf358];if('commentsLicenseKeyValid'==_0x3475fa||'commentsLicenseKeyInvalid'==_0x3475fa||'commentsLicenseKeyExpired'==_0x3475fa||'commentsLicenseKeyDomainLimit'==_0x3475fa||'commentsLicenseKeyNotAllowed'==_0x3475fa||'commentsLicenseKeyEvaluationLimit'==_0x3475fa||'commentsLicenseKeyTrialLimit'==_0x3475fa||'commentsLicenseKeyUsageLimit'==_0x3475fa){delete _0x32c0ae[_0x1cf358],_0x12f656=_0x3475fa,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x12f656&&_0x32c0ae['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x12f656&&_0x32c0ae['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x12f656&&_0x32c0ae['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x12f656&&_0x32c0ae['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x12f656&&_0x32c0ae['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x12f656&&_0x32c0ae['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x12f656&&_0x32c0ae['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3dfecc){const _0x5967d0=this['editor'],_0x424501=new _0x3dfecc(_0x5967d0['locale']),_0x225e8c=_0x5967d0['commands']['get']('addCommentThread');return _0x424501['set']({'label':E(_0x5967d0['locale'],'Comment'),'icon':_0x5e46cc}),_0x424501['bind']('isEnabled')['to'](_0x225e8c),this['listenTo'](_0x424501,'execute',()=>{_0x225e8c['execute']();}),_0x424501;}}class s extends _0x387cbb{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x51419f){super(_0x51419f),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x25621e,_0x1d54f0,_0x8f2c62)=>{_0x8f2c62?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x344609,_0x181131]of this['editor']['commands'])_0x181131['affectsData']&&'addCommentThread'!==_0x344609&&_0x181131['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x192f41=this['editor']['editing']['view']['document'];this['listenTo'](_0x192f41,'cut',_0x126f7b=>_0x126f7b['stop'](),{'priority':'highest'}),this['listenTo'](_0x192f41,'clipboardInput',_0x7b4ee5=>_0x7b4ee5['stop'](),{'priority':'highest'}),this['listenTo'](_0x192f41,'delete',_0x389fb4=>_0x389fb4['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x488487,_0x359266]of this['editor']['commands'])_0x359266['affectsData']&&'addCommentThread'!==_0x488487&&_0x359266['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x1318aa{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[O];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe57ae8){super(_0xe57ae8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x436989=this['context']['plugins']['get'](O);this['listenTo'](_0x436989,'_activateAnnotation',(_0x2deef6,_0x502a91)=>{for(const _0x4130b5 of this['activeUIs']){const _0x3f169c=this['_uis']['get'](_0x4130b5);(0x0,this['uisData']['get'](_0x4130b5)['filter'])(_0x502a91)&&_0x3f169c['setActiveAnnotation'](_0x502a91);}}),this['listenTo'](_0x436989,'_deactivateAllAnnotations',()=>{for(const _0x458e07 of this['activeUIs']){this['_uis']['get'](_0x458e07)['setActiveAnnotation'](null);}}),this['listenTo'](_0x436989['_visibleAnnotations'],'add',(_0x518d3d,_0x3896bc)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3896bc);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0xd23b7d){return this['activeUIs']['has'](_0xd23b7d);}['activate'](_0x455e27,_0x15340e=this['defaultFilter']){const _0xac90d2=this['context']['plugins']['get'](O);if(!this['_uis']['has'](_0x455e27))throw new _0x3b16ef('annotationsuis-missing-ui',this,{'uiName':_0x455e27});this['isActive'](_0x455e27)&&this['deactivate'](_0x455e27),this['activeUIs']['add'](_0x455e27);const _0x4f12e8=new _();!function({source:_0x2b431b,target:_0x2f5bb1,filter:_0x4f3794}){for(const _0x1819cd of _0x2b431b)_0x4f3794(_0x1819cd)&&_0x2f5bb1['add'](_0x1819cd);_0x2f5bb1['listenTo'](_0x2b431b,'add',(_0x15f881,_0x44e67c)=>{_0x4f3794(_0x44e67c)&&_0x2f5bb1['add'](_0x44e67c);}),_0x2f5bb1['listenTo'](_0x2b431b,'remove',(_0x448eb4,_0x26dccb)=>{_0x2f5bb1['has'](_0x26dccb)&&_0x2f5bb1['remove'](_0x26dccb);});}({'source':_0xac90d2['_visibleAnnotations'],'target':_0x4f12e8,'filter':_0x15340e}),this['uisData']['set'](_0x455e27,{'collection':_0x4f12e8,'filter':_0x15340e});const _0x3f1d89=this['_uis']['get'](_0x455e27);_0x3f1d89['attach'](_0x4f12e8),this['listenTo'](_0x3f1d89,'change:activeAnnotation',(_0x16ce4c,_0x4cb693,_0x33c3e9,_0x3849dc)=>{_0x3849dc&&_0xac90d2['_removeActiveAnnotation'](_0x3849dc),_0x33c3e9&&_0xac90d2['_addActiveAnnotation'](_0x33c3e9);});}['deactivate'](_0x185c34){if(this['activeUIs']['delete'](_0x185c34),!this['_uis']['has'](_0x185c34))throw new _0x3b16ef('annotationsuis-missing-ui',this,{'uiName':_0x185c34});const _0xcccf51=this['_uis']['get'](_0x185c34);_0xcccf51['detach'](),this['stopListening'](_0xcccf51),this['uisData']['get'](_0x185c34)['collection']['destroy'](),this['uisData']['delete'](_0x185c34);}['switchTo'](_0x3a2a4b){if(!this['_uis']['has'](_0x3a2a4b))throw new _0x3b16ef('annotationsuis-missing-ui',this,{'uiName':_0x3a2a4b});const _0x3969a3=this['context']['plugins']['get'](O),_0x1fcc41=Array['from'](_0x3969a3['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3a2a4b);const _0x49aaa3=this['_uis']['get'](_0x3a2a4b);_0x49aaa3['setActiveAnnotation'](_0x1fcc41),_0x49aaa3['_setSelectedAnnotations']&&_0x1fcc41&&_0x49aaa3['_setSelectedAnnotations']([_0x1fcc41]);}['deactivateAll'](){for(const _0x5462a6 of this['activeUIs'])this['deactivate'](_0x5462a6);}['register'](_0x59fc99,_0x594ca0){if(this['_uis']['has'](_0x59fc99))throw new _0x3b16ef('annotationsuis-register-already-registered');if('function'!=typeof _0x594ca0['attach']||'function'!=typeof _0x594ca0['detach']||'function'!=typeof _0x594ca0['setActiveAnnotation'])throw new _0x3b16ef('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x59fc99,_0x594ca0);}['refilterAnnotations'](){const _0x519c96=this['context']['plugins']['get'](O)['collection'],_0x127bc8=new Map(),_0x19168a=Array['from'](this['activeUIs']);for(const _0xd466c2 of this['activeUIs']){const _0x4cb00a=this['uisData']['get'](_0xd466c2)['collection'];for(const _0x58cff5 of _0x4cb00a)_0x127bc8['set'](_0x58cff5,_0xd466c2);}for(const _0x596a25 of _0x519c96){const _0x840718=_0x127bc8['get'](_0x596a25);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x596a25);const _0x1749df=_0x19168a['find'](_0x282499=>this['uisData']['get'](_0x282499)['filter'](_0x596a25));_0x840718!==_0x1749df&&(_0x840718&&this['uisData']['get'](_0x840718)['collection']['remove'](_0x596a25),_0x1749df&&this['uisData']['get'](_0x1749df)['collection']['add'](_0x596a25));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5448e6){const _0x4827d0=[];for(const _0x4d361c of this['activeUIs']){(0x0,this['uisData']['get'](_0x4d361c)['filter'])(_0x5448e6)&&_0x4827d0['push'](_0x4d361c);}if(_0x4827d0['length']>0x1)throw new _0x3b16ef('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4827d0,'annotationType':_0x5448e6['type']});}}const pi=xt('px');class F extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5707a4){super(_0x5707a4);const _0x4206c1=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 _0x1e0a9c(),this['focusCycler']=new _0x1ca448({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4206c1['to']('class')],'style':{'minHeight':_0x4206c1['to']('minHeight',_0x195147=>'number'==typeof _0x195147?pi(_0x195147+0xa):null)},'dir':_0x5707a4['uiLanguageDirection'],'role':'application','aria-label':E(_0x5707a4,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':E(_0x5707a4,'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',_0x45ebbe=>{this['_updateItemPositionInFocusables'](_0x45ebbe['source']);}),this['list']['forEach'](_0x1c1120=>{this['focusTracker']['add'](_0x1c1120['element']),this['_updateItemPositionInFocusables'](_0x1c1120);}),this['list']['on']('change',(_0x267954,_0x18a435)=>{for(const _0x1f1e10 of _0x18a435['removed'])this['focusTracker']['remove'](_0x1f1e10['element']),this['focusables']['remove'](_0x1f1e10);for(const _0x3b7919 of _0x18a435['added'])this['focusTracker']['add'](_0x3b7919['element']),this['_updateItemPositionInFocusables'](_0x3b7919);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x4a1a9f){const _0x4fe9f5=this['focusables']['getIndex'](_0x4a1a9f);let _0x104284,_0x26da88;for(const _0xc0e488 of this['focusables'])if(_0x4a1a9f['top']<_0xc0e488['top']){_0x104284=_0xc0e488;break;}if(_0x26da88=_0x104284?this['focusables']['getIndex'](_0x104284):this['focusables']['length'],-0x1!==_0x4fe9f5){if(_0x4fe9f5===_0x26da88-0x1)return;this['focusables']['remove'](_0x4a1a9f),_0x26da88=_0x104284?this['focusables']['getIndex'](_0x104284):this['focusables']['length'];}this['focusables']['add'](_0x4a1a9f,_0x26da88);}}const Ht=xt('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0xb366f){super(_0xb366f),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2bb62e,_0xd95bb4)=>_0x2bb62e+_0xd95bb4),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Lt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x499b67=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x499b67['to']('isAnimationDisabled',_0x1dfde4=>_0x1dfde4?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x499b67['to']('top',_0x2f7017=>Ht(_0x2f7017))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x24928a=this['element']['clientHeight'];_0x24928a&&(this['height']=_0x24928a);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1318aa{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x26fe10){super(_0x26fe10),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 _0x4fa2aa=this['context']['config']['get']('sidebar.container');_0x4fa2aa&&this['setContainer'](_0x4fa2aa);}['setContainer'](_0x1358ce){if(!y(_0x1358ce))throw new _0x3b16ef('sidebar-setcontainer-invalid-element');this['container']=_0x1358ce;}['_attachToContainer']({viewClass:_0x351ed7='',spaceBetweenItems:_0x4c39be=0x19}={}){if(!y(this['container']))throw new _0x3b16ef('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x351ed7,this['_spaceBetweenItems']=_0x4c39be;}['rearrange']({removedAnnotation:_0x14f5ea,previousAnnotation:_0x26323f,nextAnnotation:_0x4cfc8a}){const _0x4a3826=this['getSidebarItemView'](_0x14f5ea);this['view']['list']['remove'](_0x4a3826),this['_destroySidebarItemView'](_0x14f5ea),_0x26323f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x26323f)),_0x4cfc8a&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4cfc8a)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x3ce848,activatedAnnotation:_0x8b1e78,disableAnimationOnActivatedAnnotation:_0x406cb3}){if(this['_activeAnnotation']=_0x8b1e78,_0x3ce848){_0x3ce848['isActive']=!0x1;const _0x1c1538=this['getSidebarItemView'](_0x3ce848);_0x1c1538&&_0x406cb3&&(_0x1c1538['isAnimationDisabled']=!0x1);}if(_0x8b1e78){const _0x4478d2=this['getSidebarItemView'](_0x8b1e78);_0x4478d2&&(_0x8b1e78['isActive']=!0x0,_0x406cb3&&(_0x4478d2['isAnimationDisabled']=!0x0,_0x4478d2['top']+=0x1),this['_alignToTargetRect'](_0x4478d2));}}['_detachFromContainer'](_0x500479){if(this['view']['element']['remove'](),_0x500479){for(const _0x32eb79 of _0x500479)this['_destroySidebarItemView'](_0x32eb79);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5e0335,_0x33e667){_0x33e667||(_0x33e667=_0x5e0335['view']);const _0x24488c=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x24488c,_0x5e0335),this['_annotationToSidebarItemView']['set'](_0x5e0335,_0x24488c),_0x24488c['content']['add'](_0x33e667),this['listenTo'](_0x5e0335['view'],'change:targetRect',(_0x55d745,_0x535726,_0x17effa)=>{const _0x404679=this['_getTargetTop'](_0x5e0335,_0x17effa);_0x24488c['_targetTop']!=_0x404679&&(_0x24488c['_targetTop']=_0x404679,this['_setItemTop'](_0x24488c,_0x404679));}),this['listenTo'](_0x24488c,'change:top',()=>{this['_recalculate'](_0x24488c,'top');}),this['listenTo'](_0x24488c,'change:bottom',()=>{this['_recalculate'](_0x24488c,'bottom');}),this['_alignToTargetRect'](_0x24488c);const _0x4f29d5=this['_getItemBefore'](_0x24488c);if(_0x4f29d5)this['_alignAfterItem'](_0x4f29d5,_0x24488c)||this['_alignToTargetRect'](_0x24488c);else this['_alignToTargetRect'](_0x24488c);return this['_updateLastItem'](),this['view']['list']['add'](_0x24488c),_0x24488c;}['_alignForTopChange'](_0x5bd022){if(!_0x5bd022['content']['length'])return;const _0x306cb6=this['_getItemBefore'](_0x5bd022);if(!_0x306cb6)return;const _0x332fb1=this['_sidebarItemViewToAnnotation']['get'](_0x306cb6),_0xf462c2=this['_activeAnnotation'];_0xf462c2&&_0xf462c2===_0x332fb1?this['_alignAfterItem'](_0x306cb6,_0x5bd022):this['_alignBeforeItem'](_0x5bd022,_0x306cb6);}['_alignForBottomChange'](_0x38f055){if(!_0x38f055['content']['length'])return;const _0x4c27c5=this['_getItemAfter'](_0x38f055);if(!_0x4c27c5)return;const _0x452dcf=this['_sidebarItemViewToAnnotation']['get'](_0x4c27c5),_0x530752=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0xccb116=this['_activeAnnotation'];_0xccb116&&_0xccb116===_0x452dcf&&_0x530752?(this['_alignBeforeItem'](_0x4c27c5,_0x38f055),this['_alignAfterItem'](_0x38f055,_0x4c27c5)):_0xccb116&&_0xccb116===_0x452dcf?this['_alignBeforeItem'](_0x4c27c5,_0x38f055):this['_alignAfterItem'](_0x38f055,_0x4c27c5);}['_recalculate'](_0x2af35b,_0x1b881a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1bae71,changedProp:_0x569bf8}of this['_recalculateBuffer'])'top'===_0x569bf8?this['_alignForTopChange'](_0x1bae71):this['_alignForBottomChange'](_0x1bae71);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2af35b,'changedProp':_0x1b881a});}['getSidebarItemView'](_0x4971da){return this['_annotationToSidebarItemView']['get'](_0x4971da);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x12c475){const _0x44d4a5=this['getSidebarItemView'](_0x12c475);this['stopListening'](_0x44d4a5),this['stopListening'](_0x12c475['view']),_0x44d4a5['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x12c475),this['_sidebarItemViewToAnnotation']['delete'](_0x44d4a5);}['_createSidebarView'](){const _0x255ed4=new F(this['context']['locale']);return _0x255ed4['render'](),this['on']('change:_lastItem',(_0x33b3d3,_0x4e4002,_0x8bf589,_0x5b3a2d)=>{_0x5b3a2d&&_0x255ed4['unbind']('minHeight'),_0x8bf589?_0x255ed4['bind']('minHeight')['to'](_0x8bf589,'bottom'):_0x255ed4['minHeight']=null;}),_0x255ed4;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4ed8d5){const _0x1eec87=this['_sidebarItemViewToAnnotation']['get'](_0x4ed8d5),_0x52c6e0=_0x1eec87&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x1eec87)-0x1);return _0x52c6e0&&this['getSidebarItemView'](_0x52c6e0)||null;}['_getItemAfter'](_0x49db49){const _0x181102=this['_sidebarItemViewToAnnotation']['get'](_0x49db49),_0x5f1c3d=_0x181102&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x181102)+0x1);return _0x5f1c3d&&this['getSidebarItemView'](_0x5f1c3d)||null;}['_alignBeforeItem'](_0x150912,_0x4017ed){_0x150912['updateHeight']();const _0x46ea06=R(_0x4017ed['bottom']+this['_spaceBetweenItems'],_0x150912['top']);return!!_0x46ea06&&(this['_setItemTop'](_0x4017ed,_0x4017ed['top']-_0x46ea06),!0x0);}['_alignAfterItem'](_0x3f75f7,_0x5963b0){_0x3f75f7['updateHeight']();const _0x496506=R(_0x3f75f7['bottom']+this['_spaceBetweenItems'],_0x5963b0['top']);return!!_0x496506&&(this['_setItemTop'](_0x5963b0,_0x5963b0['top']+_0x496506,!0x1),!0x0);}['_alignToTargetRect'](_0x289fe9){const _0x5d7e66=this['_sidebarItemViewToAnnotation']['get'](_0x289fe9);if(!_0x5d7e66||!_0x5d7e66['target']||!_0x5d7e66['targetRect'])return;const _0x2b5691=this['_getTargetTop'](_0x5d7e66,_0x5d7e66['targetRect']);this['_setItemTop'](_0x289fe9,_0x2b5691);}['_getTargetTop'](_0x5e37ca,_0x485b16){if(null===_0x485b16)return 0x0;if(_0x5e37ca['target']instanceof _0x521279)return _0x485b16['top'];{const _0x3105c4=new _0x521279(this['view']['element'])['top'];return _0x485b16['top']-_0x3105c4;}}['_setItemTop'](_0xc92fd9,_0x2e6fbf,_0x570d03=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x570d03&&(_0x2e6fbf=Math['max'](_0x2e6fbf,this['_getMaxAvailableTop'](_0xc92fd9))),_0xc92fd9['top']=_0x2e6fbf;}['_getMaxAvailableTop'](_0xb99f63){let _0x26197e=this['_getItemBefore'](_0xb99f63),_0x50a29a=0x0;for(;_0x26197e;)_0x26197e['updateHeight'](),_0x50a29a+=this['_spaceBetweenItems']+_0x26197e['height'],_0x26197e=this['_getItemBefore'](_0x26197e);return _0x50a29a;}}function R(_0x3ac2f8,_0x11cee){return Math['max'](_0x3ac2f8-_0x11cee,0x0);}function y(_0x4abb58){return null!==_0x4abb58&&'object'==typeof _0x4abb58&&0x1===_0x4abb58['nodeType'];}class e extends _0x1318aa{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e1446){super(_0x2e1446),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x41f317(),this['_refreshPositioningDebounced']=_0x5d89fe(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x5a5536=this['context']['plugins']['get'](M),_0x3a8615=this['context']['plugins']['get'](z);_0x5a5536['register']('wideSidebar',this),_0x3a8615['container']&&_0x5a5536['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3c62da){if(_0x3c62da===this['activeAnnotation'])return;const _0x3326f0=this['context']['plugins']['get'](z);_0x3326f0['_activeAnnotation']=_0x3c62da;const _0x55768e=this['activeAnnotation'];_0x3326f0['refresh']({'blurredAnnotation':_0x55768e,'activatedAnnotation':_0x3c62da}),this['activeAnnotation']=_0x3c62da;}['attach'](_0x1232df){this['annotations']=_0x1232df;const _0x4d89db=this['context']['plugins']['get'](z);if(_0x4d89db['_annotations']=_0x1232df,this['isAttached'])throw new _0x3b16ef('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4d89db,'set:container',()=>{this['detach'](),this['listenTo'](_0x4d89db,'change:container',_0x2d3d60=>{_0x2d3d60['off'](),this['attach'](_0x1232df);});}),_0x4d89db['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x4da5d8=_0x2c8604=>{_0x2c8604['updateTargetRect'](),_0x4d89db['addAnnotation'](_0x2c8604);};for(const _0x5dd6c5 of _0x1232df)_0x4da5d8(_0x5dd6c5);this['listenTo'](_0x1232df,'add',(_0x206a43,_0x435e69)=>{_0x4da5d8(_0x435e69);}),this['listenTo'](_0x1232df,'remove',(_0x4c4010,_0x224e47,_0x4f4228)=>{_0x4d89db['rearrange']({'removedAnnotation':_0x224e47,'previousAnnotation':_0x1232df['get'](_0x4f4228-0x1),'nextAnnotation':_0x1232df['get'](_0x4f4228+0x1)}),_0x224e47===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1232df,'focus',(_0x2064cb,_0x8d0ceb)=>{this['setActiveAnnotation'](_0x8d0ceb);}),this['listenTo'](_0x1232df,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1dd72e=this['context']instanceof _0x3fe096?this['context']['editors']:new _0x41f317([this['context']]);for(const _0x21cb5d of _0x1dd72e)this['_integrateWithEditorAnnotations'](_0x21cb5d);this['listenTo'](_0x1dd72e,'add',(_0x1f0ebe,_0x8da610)=>{this['listenTo'](_0x8da610,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x8da610);});}),this['listenTo'](_0x1dd72e,'remove',(_0x318ca0,_0x460f76)=>{_0x460f76['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x460f76['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3b16ef('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x504596=this['context']['plugins']['get'](z);_0x504596['_detachFromContainer'](this['annotations']),this['stopListening'](_0x504596),this['stopListening'](this['annotations']),this['context']instanceof _0x3fe096&&this['stopListening'](this['context']['editors']);for(const _0x142026 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x142026);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2a8ee1){if(!_0x2a8ee1['plugins']['has']('EditorAnnotations'))return;const _0x3c67a3=_0x2a8ee1['plugins']['get']('EditorAnnotations'),_0x1160b9=()=>{const _0x1344cd=_0x3c67a3['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1344cd[0x0]||null);};this['listenTo'](_0x3c67a3,'refresh',_0x1160b9),this['listenTo'](_0x3c67a3,'blur',(_0x49e68d,{isAnnotationTracked:_0x4b9c8b})=>{this['activeAnnotation']&&_0x4b9c8b(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3c67a3,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x191790=>{_0x3c67a3['hasDomSelection']()&&(_0x1160b9(),_0x191790['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3c67a3);}['_destroyEditorAnnotationsIntegration'](_0x1ef3ec){this['stopListening'](_0x1ef3ec),this['_editorAnnotations']['remove'](_0x1ef3ec);}}class C extends _0x5134f9{['counterView'];constructor(_0x38b90a){super(_0x38b90a);const _0x27788c=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x45a62b,_0x4769e5)=>_0x45a62b?'...':_0x4769e5['toString']()),this['set']('annotationType',''),this['icon']=_0x5e46cc,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x27788c['to']('annotationType',_0x139c5a=>'ck-annotation-counter__badge--'+_0x139c5a),_0x27788c['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x27788c['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1318aa{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x288973){super(_0x288973),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x12c5b6),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x41f317(),this['_refreshPositioningDebounced']=_0x5d89fe(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x172d8b(this['context']['locale']),this['balloonPanelView']=new _0x39e067(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3f3136){this['annotations']=_0x3f3136;const _0x154fef=this['context']['plugins']['get'](z),_0x41d1dc=this['balloonPanelView'];if(_0x154fef['_annotations']=_0x3f3136,this['isAttached'])throw new _0x3b16ef('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x154fef,'set:container',()=>{this['detach'](),this['listenTo'](_0x154fef,'change:container',_0x48356c=>{_0x48356c['off'](),this['attach'](_0x3f3136);});}),_0x154fef['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x20f016=_0x2ef98e=>{const _0x301ae0=new C(this['context']['locale']);_0x154fef['addAnnotation'](_0x2ef98e,_0x301ae0),this['_annotationToNarrowView']['set'](_0x2ef98e,_0x301ae0),_0x301ae0['bind']('isDirty','annotationType','number')['to'](_0x2ef98e['view'],'isDirty','type','length'),_0x301ae0['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x41d1dc['content']['first']!==_0x2ef98e['view']?(this['_showBalloon'](_0x2ef98e),_0x2ef98e['view']['element']['focus'](),this['setActiveAnnotation'](_0x2ef98e)):this['setActiveAnnotation'](null);});};for(const _0x4736b3 of _0x3f3136)_0x20f016(_0x4736b3);this['listenTo'](_0x3f3136,'add',(_0x212e25,_0x4d2d8d)=>{_0x20f016(_0x4d2d8d);}),this['listenTo'](_0x3f3136,'remove',(_0x34b659,_0x1f9b14,_0x53d12b)=>{this['_annotationToNarrowView']['get'](_0x1f9b14)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1f9b14),_0x154fef['rearrange']({'removedAnnotation':_0x1f9b14,'previousAnnotation':_0x3f3136['get'](_0x53d12b-0x1),'nextAnnotation':_0x3f3136['get'](_0x53d12b+0x1)}),_0x1f9b14===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3f3136,'focus',(_0x2a3fe7,_0x58fa54)=>{this['setActiveAnnotation'](_0x58fa54);}),this['listenTo'](_0x3f3136,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4a878f,_0x5049cd)=>{_0x5049cd['keyCode']===_0x16ee43['esc']&&_0x41d1dc['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x41d1dc['content']['first']),this['_hideBalloon'](),_0x5049cd['stopPropagation'](),_0x5049cd['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x43fe5e,_0x10b6f6)=>{const _0x32f863=_0x10b6f6['target'];_0x41d1dc['isVisible']&&_0x41d1dc['element']['contains'](_0x32f863)||_0x154fef['view']['element']['contains'](_0x32f863)||_0x43fe5e['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x5c93cc=>_0x5c93cc['contains'](_0x32f863))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x555d7e=this['context']instanceof _0x3fe096?this['context']['editors']:new _0x41f317([this['context']]);for(const _0x5e2897 of _0x555d7e)this['_integrateWithEditorAnnotations'](_0x5e2897);this['listenTo'](_0x555d7e,'add',(_0x24d3da,_0x5588aa)=>{this['listenTo'](_0x5588aa,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x5588aa);});}),this['listenTo'](_0x555d7e,'remove',(_0x5ed68a,_0x4a9abb)=>{_0x4a9abb['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4a9abb['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x16fae1){if(_0x16fae1===this['activeAnnotation'])return;const _0x4cf60d=this['context']['plugins']['get'](z);if(_0x4cf60d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x16fae1,'disableAnimationOnActivatedAnnotation':!0x0}),_0x16fae1)_0x4cf60d['getSidebarItemView'](_0x16fae1)?this['_showBalloon'](_0x16fae1):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x16fae1;}['detach'](){if(!this['isAttached'])throw new _0x3b16ef('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x51eec1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x42b5c7=>_0x42b5c7['destroy']()),this['_annotationToNarrowView']['clear'](),_0x51eec1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3fe096&&this['stopListening'](this['context']['editors']);for(const _0x3ddbbc of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3ddbbc);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'](_0x3c3329){if(!_0x3c3329['plugins']['has']('EditorAnnotations'))return;const _0x2ee29c=_0x3c3329['plugins']['get']('EditorAnnotations'),_0x3776a6=this['context']['plugins']['get'](z),_0xdb6a87=this['annotations'],_0x46a994=this['balloonPanelView'],_0x534a0d=()=>{const _0x1b131e=_0x2ee29c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1b131e),this['setActiveAnnotation'](_0x1b131e[0x0]||null);};this['listenTo'](_0x2ee29c,'refresh',_0x534a0d),this['listenTo'](_0x2ee29c,'blur',(_0x4b39ce,{isAnnotationTracked:_0x2b3c94})=>{this['activeAnnotation']&&_0x2b3c94(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x2ee29c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xdb6a87,'blur',_0x3d0948=>{_0x2ee29c['hasDomSelection']()&&_0x3d0948['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x564627,_0x1597d9)=>{const _0x5a7325=_0x1597d9['target'];_0x46a994['isVisible']&&_0x46a994['element']['contains'](_0x5a7325)||_0x3776a6['view']['element']['contains'](_0x5a7325)||this['activeAnnotation']&&_0x2ee29c['hasDomSelection']()&&(_0x534a0d(),_0x564627['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2ee29c);}['_destroyEditorAnnotationsIntegration'](_0x77fc76){_0x77fc76&&(this['stopListening'](_0x77fc76),this['_editorAnnotations']['remove'](_0x77fc76));}['_setSelectedAnnotations'](_0x48d346){for(const _0x4902cc of this['_selectedAnnotations'])_0x48d346['includes'](_0x4902cc)||this['_manuallyClosedAnnotationViews']['delete'](_0x4902cc['view']);this['_selectedAnnotations']=_0x48d346;}['_refreshPositioning'](){const _0x36b4ac=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x36b4ac['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3b0dd3){if(this['_manuallyClosedAnnotationViews']['has'](_0x3b0dd3['view']))return;const _0x33daa0=this['balloonPanelView']['content']['first'];_0x33daa0!==_0x3b0dd3['view']?(_0x33daa0&&this['_detachListeners'](_0x33daa0),this['_attachListeners'](_0x3b0dd3['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3b0dd3['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x173416=this['balloonPanelView']['content']['first'],_0x1a0e64=_0x173416&&this['annotations']['getByView'](_0x173416);if(!_0x1a0e64||!this['_annotationToNarrowView']['has'](_0x1a0e64))return;const _0x5bef48=this['_annotationToNarrowView']['get'](_0x1a0e64)['element'],_0x5dc9f2=(function(){const _0x3a9069=_0x39e067['defaultPositions'];return[_0x3a9069['southArrowNorthEast'],_0x3a9069['northArrowSouthEast'],_0x3a9069['southArrowNorth'],_0x3a9069['northArrowSouth'],_0x3a9069['southArrowNorthWest'],_0x3a9069['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5bef48,'positions':_0x5dc9f2});}['_hideBalloon'](){const _0x3debb9=this['balloonPanelView'],_0x35c147=_0x3debb9['content']['first'];_0x35c147&&(this['_detachListeners'](_0x35c147),_0x3debb9['unpin'](),_0x3debb9['content']['clear']());}['_attachListeners'](_0x2b1855){this['listenTo'](_0x2b1855,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x2b1855,'Esc',(_0x1f7eb2,_0x4f8933)=>{this['_manuallyClosedAnnotationViews']['add'](_0x2b1855),this['_hideBalloon'](),_0x4f8933();});}['_detachListeners'](_0x5bc14a){this['stopListening'](_0x5bc14a);}}class c extends _0x387cbb{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x5f439b,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x24438c){super(_0x24438c),_0x24438c['editing']['view']['addObserver'](_0x5a2c11),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x24438c['plugins']['get'](_0x5f439b),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x9a29e1=this['editor']['plugins']['get'](M);_0x9a29e1['context']===this['editor']&&(_0x9a29e1['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0xaefb85,_0x41b940)=>{const _0xa2afc1=this['_balloon'];if(this['isAttached']&&_0xa2afc1['visibleView']){const _0x2661cb=this['annotations']['getByView'](_0xa2afc1['visibleView']);_0x2661cb&&this['_closeAnnotation'](_0x2661cb),_0x41b940();}}));}['afterInit'](){const _0x25c6f4=this['editor']['plugins']['get'](M);_0x25c6f4['context']===this['editor']&&(_0x25c6f4['hasActive']()||_0x25c6f4['switchTo']('inline'));}['setActiveAnnotation'](_0x820a3){_0x820a3!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x820a3&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x820a3)&&this['_addAnnotationToBalloon'](_0x820a3,!0x0),_0x820a3['isActive']=!0x0),_0x820a3||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x820a3);}['attach'](_0x57ba0c){this['annotations']=_0x57ba0c;const _0x3ede31=this['editor']['plugins']['get'](M),_0x3e13f9=this['_balloon'];if(this['isAttached'])throw new _0x3b16ef('inlineannotations-attach-already-attached',this);if(_0x3ede31['context']!==this['editor'])throw new _0x3b16ef('inlineannotations-not-allowed-with-context',this);const _0x3d3ac6=this['editor']['plugins']['get'](P);this['listenTo'](_0x3d3ac6,'refresh',()=>{const _0x39a927=_0x3d3ac6['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3b7a73,_0xf17bd3;!this['_forceRefresh']&&(_0x3b7a73=_0x39a927,_0xf17bd3=this['_selectedAnnotations'],_0x3b7a73['length']===_0xf17bd3['length']&&_0x3b7a73['every'](_0x3c84e0=>_0xf17bd3['includes'](_0x3c84e0)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x39a927),this['setActiveAnnotation'](_0x39a927[0x0]||null));}),this['listenTo'](_0x3d3ac6,'blur',(_0x299a16,{isAnnotationTracked:_0x542157})=>{this['activeAnnotation']&&_0x542157(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x41c10b,_0x6f85dc,_0x15e0b1)=>{_0x15e0b1||this['setActiveAnnotation'](null);}),this['listenTo'](_0x57ba0c,'remove',(_0x2334fc,_0x178c4e)=>{this['_removeAnnotationFromBalloon'](_0x178c4e),_0x178c4e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e13f9,'change:visibleView',(_0x58cc0e,_0x4d350e,_0x28039b,_0x2e8fd0)=>{_0x2e8fd0&&this['stopListening'](_0x2e8fd0);const _0x2d0cba=_0x57ba0c['getByView'](_0x28039b);_0x28039b&&_0x2d0cba&&(this['listenTo'](_0x28039b,'change:height',()=>{_0x3e13f9['updatePosition']();}),this['listenTo'](_0x28039b,'Esc',()=>{this['_closeAnnotation'](_0x2d0cba),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x2d0cba&&this['setActiveAnnotation'](_0x2d0cba));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3e13f9['visibleView']&&(_0x57ba0c['getByView'](_0x3e13f9['visibleView'])&&_0x3e13f9['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 _0x3b16ef('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4afab5 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4afab5);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x59580c){for(const _0xcccab5 of this['_selectedAnnotations'])_0x59580c['includes'](_0xcccab5)||this['_manuallyClosed']['delete'](_0xcccab5);for(const _0x32cc0f of this['annotations'])_0x59580c['includes'](_0x32cc0f)||this['_removeAnnotationFromBalloon'](_0x32cc0f);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x21a9bc of _0x59580c)this['_addAnnotationToBalloon'](_0x21a9bc);}this['_selectedAnnotations']=_0x59580c;}['_addAnnotationToBalloon'](_0x462b77,_0x4ff7fa=!0x1){this['_manuallyClosed']['has'](_0x462b77)||(this['_addedAnnotations']['has'](_0x462b77)||this['_balloon']['hasView'](_0x462b77['view'])||(this['_addedAnnotations']['add'](_0x462b77),this['_balloon']['add']({'stackId':_0x462b77['view']['id'],'view':_0x462b77['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x462b77)}})),_0x4ff7fa&&this['_balloon']['showStack'](_0x462b77['view']['id']));}['_getBalloonTargetForAnnotation'](_0x269517){const _0x2658d9=_0x269517['target'],_0xecb979=this['editor']['editing']['view'],_0x11abb9=_0xecb979['document']['selection']['getFirstRange'](),_0x2dbca6=_0xecb979['domConverter']['viewRangeToDom'](_0x11abb9);if(_0x2dbca6['collapse'](!0x0),_0x2658d9){if(_0x2658d9 instanceof _0x521279)return _0x2658d9;let _0xe73705=[];for(const _0x4c512d of _0x2658d9)_0xe73705['push'](...(_0x27ed7b=_0x4c512d['getClientRects'](),Array['from'](_0x27ed7b)['map'](DOMRect['fromRect'])));_0xe73705=function(_0x1c5eaa){const _0x2e47c7=[];let _0x4f78ff=_0x1c5eaa[0x0];for(let _0x3ea738=0x1;_0x3ea738<_0x1c5eaa['length'];_0x3ea738++)B(_0x4f78ff,_0x1c5eaa[_0x3ea738])?_0x4f78ff['width']+=_0x1c5eaa[_0x3ea738]['width']:(_0x2e47c7['push'](_0x4f78ff),_0x4f78ff=_0x1c5eaa[_0x3ea738]);return _0x2e47c7['push'](_0x4f78ff),_0x2e47c7;}(_0xe73705);const _0x2d24f5=_0x2dbca6['getBoundingClientRect']();return _0xe73705['find'](_0x477f04=>_0x477f04['top']<=_0x2d24f5['top']&&_0x477f04['bottom']>=_0x2d24f5['bottom']&&_0x477f04['left']<=_0x2d24f5['left']&&_0x477f04['right']>=_0x2d24f5['right'])||_0xe73705[0x0];}var _0x27ed7b;return _0x269517['targetRect']||_0x2dbca6;}['_removeAnnotationFromBalloon'](_0x604938){this['_addedAnnotations']['has'](_0x604938)&&this['_balloon']['hasView'](_0x604938['view'])&&(this['_addedAnnotations']['delete'](_0x604938),this['_balloon']['remove'](_0x604938['view']));}['_closeAnnotation'](_0x364620){this['_manuallyClosed']['add'](_0x364620),this['_removeAnnotationFromBalloon'](_0x364620);}}function B(_0x11fbab,_0x29be1b){return _0x11fbab['top']===_0x29be1b['top']&&_0x11fbab['bottom']===_0x29be1b['bottom']&&_0x11fbab['right']===_0x29be1b['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5f5c67,_0x47929f){super(_0x5f5c67),this['set']('isEmpty',!_0x47929f['length']),this['focusTracker']=new _0x1e0a9c(),this['_annotationViews']=_0x47929f,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1ca448({'focusables':_0x47929f,'focusTracker':this['focusTracker']}),this['listenTo'](_0x47929f,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x47929f,'remove',(_0x320b4a,_0x2649c5)=>{_0x2649c5['isActive']&&this['focus'](),_0x47929f['length']||(this['isEmpty']=!0x0);});const _0x2149ba=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':E(_0x5f5c67,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x47929f},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2149ba['if']('isEmpty','ck-hidden',_0x2fd893=>!_0x2fd893)]},'children':[{'text':E(_0x5f5c67,'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 _0x41695d of this['_annotationViews'])this['focusTracker']['add'](_0x41695d['element']);this['_annotationViews']['on']('change',(_0x2e7097,{added:_0x40cffb,removed:_0x1c02ca})=>{for(const _0x165a27 of _0x40cffb)this['focusTracker']['add'](_0x165a27['element']);for(const _0x1713c2 of _0x1c02ca)this['focusTracker']['remove'](_0x1713c2['element']);});}}class f extends _0x1318aa{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,O];}constructor(_0x401195){super(_0x401195),this['archivedThreads']=new _0x41f317();}['init'](){const _0x444710=this['context'],_0x20c12d=_0x444710['plugins']['get'](o),_0x4de498=_0x444710['plugins']['get'](O);this['listenTo'](_0x20c12d,'addCommentThread',(_0x20c9c4,{threadId:_0x1aabb3})=>{const _0x4d0770=_0x20c12d['getCommentThread'](_0x1aabb3);_0x4d0770['archivedAt']&&this['archivedThreads']['add'](_0x4d0770,this['_calculatePosition'](_0x4d0770['archivedAt'])),this['listenTo'](_0x4d0770,'change:archivedAt',(_0x4a4d2b,_0x26dd94,_0x8d2bb3)=>{_0x8d2bb3?this['archivedThreads']['has'](_0x4d0770)||this['archivedThreads']['add'](_0x4d0770,this['_calculatePosition'](_0x4d0770['archivedAt'])):this['archivedThreads']['has'](_0x4d0770)&&this['archivedThreads']['remove'](_0x4d0770);});}),this['listenTo'](_0x20c12d,'removeCommentThread',(_0x389723,{threadId:_0x494151})=>{const _0xc166cf=_0x20c12d['getCommentThread'](_0x494151);this['stopListening'](_0xc166cf),this['archivedThreads']['has'](_0xc166cf)&&this['archivedThreads']['remove'](_0xc166cf);},{'priority':'highest'}),this['listenTo'](_0x4de498['collection'],'focus',(_0xde957e,_0x54c11c)=>{_0x54c11c['isVisible']||(_0x54c11c['isActive']=!0x0,_0x4de498['activate'](_0x54c11c));});}['_calculatePosition'](_0x25110e){const _0x33a14f=[...this['archivedThreads']]['findIndex'](_0x5bfa2a=>_0x5bfa2a['archivedAt']<_0x25110e);return _0x33a14f>-0x1?_0x33a14f:this['archivedThreads']['length'];}}class a extends _0x387cbb{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x2afe41];}constructor(_0x4902f4){super(_0x4902f4),this['annotationViews']=new _0x4d7b71(),this['_pendingThreads']=[];}['init'](){const _0x1b58b8=this['editor'],_0x56f423=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1b58b8['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x5134f9,!0x0)),_0x1b58b8['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1c1162=this['_createCommentsArchiveButton'](_0x180ec2);return _0x1c1162['set']({'role':'menuitemcheckbox'}),_0x1c1162;});const _0xa9c556=_0x1b58b8['plugins']['get'](f),_0x1a5be3=_0x1b58b8['plugins']['get']('Annotations'),_0x66111f=_0x1b58b8['plugins']['get']('CommentsRepository');_0xa9c556['archivedThreads']['forEach'](_0x3ba6dd=>{this['_handleNewThread'](_0x3ba6dd);}),this['listenTo'](_0xa9c556['archivedThreads'],'add',(_0x351f5d,_0x5d8d5f)=>{this['_handleNewThread'](_0x5d8d5f);}),this['listenTo'](_0x1a5be3['collection'],'add',(_0x569282,_0x49893f)=>{const _0x1e1da1=this['_pendingThreads']['find'](_0x5efc50=>{const _0x2b7426=_0x66111f['_threadToController']['get'](_0x5efc50);return _0x2b7426&&_0x49893f['innerView']===_0x2b7426['view'];});if(_0x1e1da1){const _0x14668a=this['_calculatePosition'](_0x1e1da1['archivedAt']);this['annotationViews']['add'](_0x49893f['view'],_0x14668a),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1e1da1),0x1);}}),this['listenTo'](_0xa9c556['archivedThreads'],'remove',(_0x8b925a,_0x347ee5)=>{const _0x2cdc74=_0x1b58b8['config']['get']('collaboration.channelId');if(!_0x2cdc74||_0x347ee5['channelId']===_0x2cdc74){if(this['_pendingThreads']['includes'](_0x347ee5))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x347ee5),0x1);else{const _0x335830=_0x66111f['_threadToController']['get'](_0x347ee5),_0x2c26e2=_0x1a5be3['getByInnerView'](_0x335830['view']);this['annotationViews']['remove'](_0x2c26e2['view']),this['stopListening'](_0x2c26e2['focusableElements']);}}}),this['listenTo'](_0x1a5be3['collection'],'add',(_0x481ce4,_0x1f151e)=>{this['listenTo'](_0x1f151e,'escape',_0x56f423);}),this['listenTo'](_0x1a5be3['collection'],'remove',(_0x39407d,_0x2a9d28)=>{this['stopListening'](_0x2a9d28,'escape',_0x56f423);});}['_handleNewThread'](_0x127d69){const _0x41919c=this['editor']['plugins']['get']('CommentsRepository'),_0x6586b8=this['editor']['plugins']['get']('Annotations'),_0x1daa9b=this['editor']['config']['get']('collaboration.channelId');if(!_0x1daa9b||_0x127d69['channelId']===_0x1daa9b){const _0x11d462=_0x41919c['_threadToController']['get'](_0x127d69);if(!_0x11d462)return void this['_pendingThreads']['push'](_0x127d69);const _0x39bebc=this['_calculatePosition'](_0x127d69['archivedAt']),_0x2924dd=_0x6586b8['getByInnerView'](_0x11d462['view']);_0x2924dd['isVisible']&&_0x6586b8['_visibleAnnotations']['remove'](_0x2924dd),this['annotationViews']['add'](_0x2924dd['view'],_0x39bebc);}}['_calculatePosition'](_0x3f464d){const _0x3f4f8e=this['editor']['config']['get']('collaboration.channelId'),_0x154dcb=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x420506=>_0x420506['channelId']===_0x3f4f8e)['findIndex'](_0x2b9511=>_0x2b9511['archivedAt']<_0x3f464d);return _0x154dcb<0x0||_0x154dcb>this['annotationViews']['length']?this['annotationViews']['length']:_0x154dcb-0x1;}['_toggleDialog'](){const _0x470e14=this['editor'],_0x4f3d43=_0x470e14['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x470e14['locale'],this['annotationViews'])),'commentsArchive'===_0x4f3d43['id']?_0x4f3d43['hide']():_0x4f3d43['show']({'id':'commentsArchive','title':E(_0x470e14['locale'],'COMMENTS_ARCHIVE'),'icon':_0x17f915,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1c0c65['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x1289c6,_0x154d99=!0x1){const _0x3e63d2=this['editor']['locale'],_0x6eb1ce=this['editor']['plugins']['get']('Dialog'),_0x132ed4=new _0x1289c6(_0x3e63d2);return _0x132ed4['bind']('isEnabled')['to'](this,'isEnabled'),_0x132ed4['bind']('isOn')['to'](_0x6eb1ce,'id',_0x14a201=>'commentsArchive'===_0x14a201),_0x132ed4['set']({'label':E(_0x3e63d2,'COMMENTS_ARCHIVE'),'icon':_0x17f915,'isToggleable':!0x0}),_0x154d99&&(_0x132ed4['tooltip']=!0x0),this['listenTo'](_0x132ed4,'execute',()=>this['_toggleDialog']()),_0x132ed4;}['_hideDialogOnAnnotationEscape']=_0xb98b92=>{const _0xfc7f0=_0xb98b92['source'];if(!this['annotationViews']['has'](_0xfc7f0['view']))return;const _0x20ede6=this['editor']['plugins']['get']('Dialog');_0x20ede6['isOpen']&&'commentsArchive'===_0x20ede6['id']&&(_0x20ede6['hide'](),_0xb98b92['stop']());};}class p extends _0x387cbb{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,_ as AnnotationCollection,S as AnnotationView,O as Annotations,M as AnnotationsUIs,ts as BaseCommentThreadView,hs as BaseCommentView,fi as Comment,ui as CommentThread,Ct as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar};
|