@ckeditor/ckeditor5-comments 47.3.0-alpha.2 → 47.3.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +19 -19
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x1a1cdb={}){function _0x4e168d(_0x18da2a){return _0x18da2a['map'](_0x2be1a1=>String['fromCharCode'](_0x2be1a1))['join']('');}(_0x1a1cdb=Object['assign']({},_0x1a1cdb))['plugins']||(_0x1a1cdb['plugins']=hs['defaultPlugins']),super(_0x1a1cdb),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4e168d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4e168d([0x76,0x69,0x65,0x77])][_0x4e168d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4e168d([0x61,0x75,0x74,0x6f]),this[_0x4e168d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4e168d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4e168d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4e168d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4e168d([0x6f,0x6b])});}['create'](){const _0xc9147=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xc9147))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3d3633=>{const _0x1f357d=this['model']['document']['getRoot'](),_0x1d6575=_0x1f357d&&_0x1f357d['getChild'](_0x1f357d['childCount']-0x1);_0x3d3633['setSelection'](_0x1d6575,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2d6e93=this['editing']['view'],_0x47db0f=_0x2d6e93['document']['getRoot'](),_0x1ead01=_0x47db0f['getChild'](0x0);_0x47db0f['childCount']>0x1||!_0x1ead01||'p'!=_0x1ead01['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x2d6e93,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1ead01['placeholder']=this['placeholder']),Ft({'view':_0x2d6e93,'element':_0x1ead01,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1ead01);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x35c7d2,_0x2a64ce={}){super(_0x35c7d2),this['editor']=null,this['_editorConfig']=_0x2a64ce,this['set']('value',_0x2a64ce['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x35c7d2,'Reply...')),this['set']('submitLabel',N(_0x35c7d2,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x242e0a(),this['focusCycler']=new _0x470c60({'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',(_0x2c2aad,_0x2cd3b7)=>{this['cancelButtonView']['fire']('execute'),_0x2cd3b7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2eb027,_0x5b7135)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5b7135());}),this['on']('submit',(_0xb4bde0,_0x4e8698)=>{_0x4e8698['length']>0xfde8?(alert(N(_0x35c7d2,'TOO_LONG_COMMENT_ALERT',[_0x4e8698['length'],0xfde8])),_0xb4bde0['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x46998d=this['editor'];this['element']['insertBefore'](_0x46998d['ui']['element'],this['element']['firstChild']),_0x46998d['model']['document']['on']('change',()=>this['value']=_0x46998d['getData']()),_0x46998d['bind']('placeholder')['to'](this),this['focusables']['add'](_0x46998d['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xe4575){-0x1===_0xe4575?(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:_0xa1c306}=this,_0x55616c=new _0x222733(_0xa1c306);return _0x55616c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x55616c['withText']=!0x0,_0x55616c['bind']('label')['to'](this,'submitLabel'),_0x55616c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x55616c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1ab701,_0x368f80)=>!_0x368f80&&!!_0x1ab701['trim']()),_0x55616c;}['_createCancelButton'](){const {locale:_0x54e0b4}=this,_0x3cb205=new _0x222733(_0x54e0b4);return _0x3cb205['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x3cb205['label']=N(_0x54e0b4,'Cancel'),_0x3cb205['withText']=!0x0,_0x3cb205['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x3cb205;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2facde=>{this['focusTracker']['add'](_0x2facde['element']);}),this['focusables']['on']('change',(_0x5cca09,_0x53dffa)=>{for(const _0x52c6ef of Array['from'](_0x53dffa['added'])['reverse']())this['focusTracker']['add'](_0x52c6ef['element']);});}}class ie extends kt{constructor(_0x37a5e1,_0x117dbe,_0x154715){super(_0x37a5e1),this['commentInputView']=new es(_0x37a5e1,_0x154715),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2b00c6,_0x57e02c)=>_0x2b00c6||!!_0x57e02c),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 _0x32d2d9(_0x37a5e1,_0x117dbe),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'](_0x50ca0a){this['commentInputView']['focus'](_0x50ca0a);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xb5d4b4,_0x393e42)=>{const {submitButtonView:_0x35aac9,cancelButtonView:_0x949d59,editor:_0x332253}=this['commentInputView'];[_0x35aac9['element'],_0x949d59['element'],_0x332253?_0x332253['editing']['view']['getDomRoot']():null]['filter'](_0xe8c435=>_0xe8c435)['some'](_0x172d2b=>_0x172d2b['contains'](_0x393e42['target']))||(this['focus'](),_0x393e42['preventDefault']());});}}class rs extends kt{constructor(_0x50915f){super(_0x50915f);const _0x280492=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x280492['to']('count',_0x4d588a=>N(_0x50915f,'NUMBER_OF_COMMENTS',_0x4d588a))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2f2101,_0x5c9b3b,_0x29c862){super(_0x2f2101);const _0x59dcb2=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x5c9b3b['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x5c9b3b,this['_config']=_0x29c862,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x242e0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x470c60({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xb88673=>this['commentViews']['map'](_0xd79fba=>_0xd79fba['element'])['includes'](_0xb88673['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x2f2101),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x41957d=>_0x41957d-this['_config']['maxCommentsWhenCollapsed']);for(const _0x441392 of _0x5c9b3b['comments'])this['_handleNewCommentModel'](_0x441392);this['_handleInfoComment'](),this['listenTo'](_0x5c9b3b['comments'],'add',(_0x459e70,_0x3f4ecd)=>{const _0x3b8b8f=this['_calculatePosition'](_0x3f4ecd);this['length']++,this['_handleNewCommentModel'](_0x3f4ecd,_0x3b8b8f),this['refreshVisibleViews']();}),this['listenTo'](_0x5c9b3b['comments'],'remove',(_0x4973dd,_0x1e440e)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1e440e),this['refreshVisibleViews']();}),this['listenTo'](_0x5c9b3b,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x5c9b3b,'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',_0x59dcb2['if']('length','ck-hidden',_0x552c82=>!_0x552c82)],'aria-label':N(_0x2f2101,'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'](_0x24e541){-0x1===_0x24e541?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x22af77 of this['commentViews'])_0x22af77['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1be304,_0x3a9dde){const _0x3e2131=new this['_config']['CommentView'](this['locale'],_0x1be304,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3e2131['viewUid']=_0x1be304['id'],_0x3e2131['delegate']('removeComment')['to'](this),_0x3e2131['delegate']('updateComment')['to'](this),_0x3e2131['delegate']('resolveCommentThread')['to'](this),_0x3e2131['delegate']('editorReady')['to'](this),_0x3e2131['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3e2131,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3e2131,_0x3a9dde);}['_calculatePosition'](_0x5058fe){const _0x1f4d3f=this['_model']['_findOptimalIndex'](_0x5058fe);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5058fe['authoredAt']?_0x1f4d3f-0x1:_0x1f4d3f:_0x1f4d3f-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x10b346={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x10b346,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x10b346));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x18439f){const _0x28fca2=this['commentViews']['remove'](_0x18439f['id']);this['stopListening'](_0x28fca2),_0x28fca2['isEditMode']&&this['_updateHasDirtyComment'](),_0x28fca2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x286f9c=>_0x286f9c['isEditMode']);}['_rearrangeCollapse'](){const _0x5ce691=function(_0x5bd4c8){const _0x52ea3e=new _0x22714a();for(const _0x41905d of _0x5bd4c8)_0x52ea3e['add'](_0x41905d);return _0x52ea3e;}(this['commentViews']),_0x13d9af=this['_collapsedCommentsView']['count'];for(let _0x338493=0x1;_0x338493<=_0x13d9af;_0x338493++)_0x5ce691['remove'](0x1);for(const _0x5eefaa of _0x5ce691)_0x5eefaa['collapse']();_0x13d9af>0x0&&_0x5ce691['add'](this['_collapsedCommentsView'],0x1),ns(_0x1b3644(Array['from'](this['visibleViews']),Array['from'](_0x5ce691)),this['visibleViews'],_0x5ce691);}['_rearrangeExpand'](){ns(_0x1b3644(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1ff63b of this['visibleViews'])_0x1ff63b['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x28564a=>{this['focusTracker']['add'](_0x28564a['element']),this['keystrokes']['listenTo'](_0x28564a['element']);}),this['commentViews']['on']('change',(_0xc0b8bc,_0x51ecc6)=>{for(const _0x4e41c7 of _0x51ecc6['removed'])this['focusTracker']['remove'](_0x4e41c7['element']),this['keystrokes']['stopListening'](_0x4e41c7['element']);for(const _0x2d058b of Array['from'](_0x51ecc6['added'])['reverse']())this['focusTracker']['add'](_0x2d058b['element']),this['keystrokes']['listenTo'](_0x2d058b['element']);});}}function ns(_0x7516f7,_0x36d1ab,_0x12d99d){let _0x20fc15=0x0;for(const _0x3dc7b1 of _0x7516f7)switch(_0x3dc7b1){case'insert':_0x36d1ab['add'](_0x12d99d['get'](_0x20fc15),_0x20fc15),_0x20fc15++;break;case'delete':_0x36d1ab['remove'](_0x20fc15);break;case'equal':_0x20fc15++;}}class oe extends kt{constructor(_0x5828a7){super(_0x5828a7);const _0x5737e1=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x5737e1['to']('contextValue',_0x2c9f7a=>N(_0x5828a7,'THREAD_CONTEXT_LABEL',_0x2c9f7a)),'tabindex':-0x1},'children':[{'text':_0x5737e1['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2704be,_0x3c594f){super(_0x2704be);const _0x32d36f=this['bindTemplate'];this['_model']=_0x3c594f,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x242e0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x470c60({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x40799e=>!!_0x40799e),this['bind']('contextValue')['to'](this['_model'],'context',_0x72b1e3=>_0x72b1e3&&_0x72b1e3['value']?this['_trimContextValue'](_0x72b1e3['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x32d36f['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 _0x3e4604=new _0x222733(this['locale']);return _0x3e4604['label']=N(this['locale'],'Reopen'),_0x3e4604['tooltip']=N(this['locale'],'Reopen'),_0x3e4604['icon']=_0x5c7493,_0x3e4604['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x26f7da=>!_0x26f7da),_0x3e4604['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x16cfcd,_0x3b747b)=>_0x16cfcd&&_0x3b747b),_0x3e4604['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x3e4604;}['_trimContextValue'](_0x4e153c){if(_0x4e153c['length']<0x96)return _0x4e153c;const _0x1bf133=_0x4e153c['lastIndexOf']('\x20',0x93);return _0x4e153c['substring'](0x0,_0x1bf133>-0x1?_0x1bf133:0x93)+'...';}['_attachContextActions'](){const _0x5033f2=this['element']['querySelector']('.ck-context'),_0x13823a=_0x5033f2['querySelector']('.ck-context__value');this['listenTo'](_0x5033f2,'mouseenter',()=>{_0x13823a['offsetWidth']<_0x13823a['scrollWidth']&&_0x5033f2['classList']['add']('overlay');}),this['listenTo'](_0x5033f2,'mouseleave',()=>{_0x5033f2['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0xbbb896 of this['focusables'])this['focusTracker']['add'](_0xbbb896['element']),this['keystrokes']['listenTo'](_0xbbb896['element']);}['_createContextView'](){const _0x3e07d5=new oe(this['locale']);return _0x3e07d5['bind']('contextValue')['to'](this),_0x3e07d5;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1e57e9,_0xa6a4a4,_0x5567f4,_0x3efe99){super(_0x1e57e9),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xa6a4a4,this['_localUser']=_0x5567f4,this['_config']=_0x3efe99,this['commentThreadHeaderView']=new Xt(_0x1e57e9,_0xa6a4a4),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1e57e9,N(_0x1e57e9,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1e57e9,_0xa6a4a4,Object['assign']({'CommentView':this['_config']['CommentView']},_0x3efe99)),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',(_0x24a8a6,_0x1683bd)=>_0x24a8a6||!!_0x1683bd),this['bind']('isUnlinked')['to'](_0xa6a4a4,'unlinkedAt',_0x377307=>!!_0x377307),this['bind']('ariaLabel')['to'](this,'length',_0x43d02d=>{const _0x510a8a=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x43d02d,_0x510a8a]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x242e0a(),this['keystrokes']=new jt(),this['focusCycler']=new _0x470c60({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4ed622=>_0x4ed622['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 _0x2ab9=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x8aa457=_0x2ab9['commentInputView'];return _0x2ab9['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x8aa457,'value',(_0x24e272,_0xb67687,_0x461593,_0xb22d1e,_0x3dbd0c)=>!!_0x3dbd0c||!!_0xb22d1e&&_0x461593&&!_0xb67687||_0x24e272&&_0x461593&&!_0xb67687),_0x8aa457['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x300eb5,_0x5d1589,_0x110185)=>{let _0x3131c1;return _0x3131c1=_0x110185&&_0x5d1589?'Reply\x20to\x20reopen\x20discussion...':_0x300eb5?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3131c1);}),_0x8aa457['bind']('submitLabel')['to'](this,'length',_0x30af8f=>N(this['locale'],_0x30af8f?'Reply':'Comment')),_0x8aa457['on']('submit',(_0x596cd1,_0x4d8985)=>{this['fire']('addComment',_0x4d8985),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x8aa457['on']('cancel',()=>{this['focus']();}),_0x8aa457['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x8aa457['on']('cancel',_0x12327d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x12327d['stop']());}),this['on']('change:isActive',(_0x12b61d,_0x406e01,_0x3bd3d5)=>{_0x3bd3d5||this['length']||_0x8aa457['value']||this['fire']('removeCommentThread');}),_0x2ab9;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x1d2f19(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x475759,target:_0x4e27c3,type:_0x342890,isVisible:_0x41c6b2=!0x0}){super(),this['view']=_0x475759,this['view']['element']||this['view']['render'](),this['_type']=_0x342890,this['_target']=_0x4e27c3,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x22714a([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x478620,_0x5dcfb2)=>{this['view']['focusTracker']['add'](_0x5dcfb2);}),this['focusableElements']['on']('remove',(_0x35a1c4,_0x458dbd)=>{this['view']['focusTracker']['remove'](_0x458dbd);}),this['set']('isVisible',_0x41c6b2);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x1b1b69=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x1b1b69),_0x1b1b69;}get['targetRect'](){const _0x2d7515=this['target'];if(null===_0x2d7515)return null;if(_0x2d7515 instanceof _0x5f3a0a)return _0x2d7515;const _0x234a26=_0x2d7515['filter'](_0x533dab=>function(_0x184002){const _0x4304db=_0x184002['offsetParent'];if(_0x4304db)return!0x0;const _0x4cbc2a=_0x184002['getClientRects']()['item'](0x0);return!!_0x4cbc2a;}(_0x533dab));return 0x0===_0x234a26['length']?null:new _0x5f3a0a(_0x234a26[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x51081b){this['view']['isActive']=_0x51081b,this['view']['mainView']['isActive']=_0x51081b;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3e4ebc){if(!(null===_0x3e4ebc||_0x3e4ebc instanceof _0x5f3a0a||Array['isArray'](_0x3e4ebc)&&_0x3e4ebc['every'](_0x1dba6d=>fi(_0x1dba6d))))throw new _0x29e429('annotation-invalid-target',null,{'target':_0x3e4ebc});}['_getNormalizedTarget'](){const _0x35ecf8='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x35ecf8)?[_0x35ecf8]:_0x35ecf8;}}function fi(_0x297c30){return null!==_0x297c30&&'object'==typeof _0x297c30&&'nodeType'in _0x297c30&&0x1===_0x297c30['nodeType'];}class S extends _0x22714a{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x571531=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x242e0a(),this['_focusTracker']['on']('change:isFocused',(_0x45630d,_0x271f71,_0x3e324b)=>{_0x3e324b||this['fire']('blur');});for(const _0x4f6d99 of _0x571531)this['add'](_0x4f6d99);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x491f6a){if(this['has'](_0x491f6a))throw new _0x29e429('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x491f6a['innerView'],_0x491f6a),this['_viewToAnnotation']['set'](_0x491f6a['view'],_0x491f6a);for(const _0x4ba22e of _0x491f6a['focusableElements'])this['_focusTracker']['add'](_0x4ba22e);this['listenTo'](_0x491f6a['focusableElements'],'add',(_0x5ffee0,_0x2a354a)=>{this['_focusTracker']['add'](_0x2a354a);}),this['listenTo'](_0x491f6a['focusableElements'],'remove',(_0x7440ec,_0x3685c5)=>{this['_focusTracker']['remove'](_0x3685c5);}),this['listenTo'](_0x491f6a['view']['focusTracker'],'change:isFocused',(_0x1bfd22,_0x29beaf,_0xa9834)=>{_0xa9834&&this['fire']('focus',_0x491f6a);}),_0x491f6a['updateTargetRect']();const _0x53d425=this['_getOrderInContent'](_0x491f6a['view']['targetRect']);return super['add'](_0x491f6a,_0x53d425);}['remove'](_0x13105c){if(!this['has'](_0x13105c))throw new _0x29e429('annotationcollection-not-existing-item',null);this['stopListening'](_0x13105c['view']['focusTracker']),this['stopListening'](_0x13105c['focusableElements']);for(const _0x193f66 of _0x13105c['focusableElements'])this['_focusTracker']['remove'](_0x193f66);return this['_viewToAnnotation']['delete'](_0x13105c['view']),this['_innerViewToAnnotation']['delete'](_0x13105c['innerView']),super['remove'](_0x13105c);}['getByInnerView'](_0x311587){return this['_innerViewToAnnotation']['get'](_0x311587);}['getByView'](_0xf1d10d){return this['_viewToAnnotation']['get'](_0xf1d10d);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x5f15d4 of this)_0x5f15d4['updateTargetRect']();this['_sort']();}['_sort'](){const _0x5a3667=Array['from'](this)['sort']((_0x3315d5,_0x4b0b62)=>w(_0x3315d5['view']['targetRect'],_0x4b0b62['view']['targetRect']));for(let _0x3010d9=_0x5a3667['length']-0x1;_0x3010d9>0x0;_0x3010d9--){const _0x163a47=_0x5a3667[_0x3010d9];_0x3010d9!==this['getIndex'](_0x163a47)&&(this['remove'](_0x163a47),this['add'](_0x163a47));}}['_getOrderInContent'](_0x279ae8){let _0x476451=0x0;if(!_0x279ae8)return this['length'];for(const _0x29af88 of this){const _0x3e8dee=_0x29af88['view']['targetRect'];if(_0x3e8dee){if(w(_0x279ae8,_0x3e8dee)<0x0)return _0x476451;_0x476451++;}}return _0x476451;}}function v({source:_0x8f42e5,target:_0x309cc2,filter:_0x5ccce3}){for(const _0x96fd98 of _0x8f42e5)_0x5ccce3(_0x96fd98)&&_0x309cc2['add'](_0x96fd98);_0x309cc2['listenTo'](_0x8f42e5,'add',(_0x98f593,_0x2133c4)=>{_0x5ccce3(_0x2133c4)&&_0x309cc2['add'](_0x2133c4);}),_0x309cc2['listenTo'](_0x8f42e5,'remove',(_0xde6c4c,_0x2475c3)=>{_0x309cc2['has'](_0x2475c3)&&_0x309cc2['remove'](_0x2475c3);});}function w(_0x151975,_0x188b40){if(null===_0x151975&&null===_0x188b40)return 0x0;if(null===_0x151975)return-0x1;if(null===_0x188b40)return 0x1;const _0x16bdc5=_0x151975['top']-_0x188b40['top'];return 0x0==_0x16bdc5?_0x151975['left']-_0x188b40['left']:_0x16bdc5;}class y extends _0x35dfc2{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x66640){if(super(_0x66640),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x66640 instanceof _0x15bb05){const _0x48f900=_0x66640['locale'];_0x66640['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x48f900,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2dcc4c){this['collection']['add'](_0x2dcc4c);}['remove'](_0x2257e5){this['collection']['remove'](_0x2257e5),_0x2257e5['destroy']();}['refreshVisibility'](){for(const _0x5a2d86 of this['collection'])_0x5a2d86['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3eed44){return this['collection']['getByInnerView'](_0x3eed44);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x57f578 of this['collection'])_0x57f578['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4241df){this['fire']('_activateAnnotation',_0x4241df);}['createAnnotation'](_0xe2c3d8){return new T(_0xe2c3d8);}['createAnnotationView'](_0x4308d6,_0x1a6457){return new E(_0x4308d6,_0x1a6457);}['_addActiveAnnotation'](_0x440eb5){const _0x3b4483=new Set(this['activeAnnotations']);_0x3b4483['add'](_0x440eb5),this['activeAnnotations']=_0x3b4483;}['_removeActiveAnnotation'](_0x1783aa){const _0x5e8a2c=new Set(this['activeAnnotations']);_0x5e8a2c['delete'](_0x1783aa),this['activeAnnotations']=_0x5e8a2c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x32eef3=this['collection'],_0x2ec07d=this['_visibleAnnotations'];function _0x288a1c(_0x4a9149){const _0x125e9f=_0x4a9149['source'];_0x125e9f['isVisible']&&!_0x2ec07d['has'](_0x125e9f)?_0x2ec07d['add'](_0x125e9f):!_0x125e9f['isVisible']&&_0x2ec07d['has'](_0x125e9f)&&_0x2ec07d['remove'](_0x125e9f),_0x125e9f['view']['focusTracker']['remove'](_0x125e9f['view']['element']),_0x125e9f['view']['focusTracker']['add'](_0x125e9f['view']['element']);}this['listenTo'](_0x32eef3,'add',(_0xa58c7,_0x412fea)=>{_0x412fea['isVisible']&&_0x2ec07d['add'](_0x412fea),this['listenTo'](_0x412fea,'change:isVisible',_0x288a1c);}),this['listenTo'](_0x32eef3,'remove',(_0x55ad37,_0x10f5dc)=>{_0x2ec07d['has'](_0x10f5dc)&&_0x2ec07d['remove'](_0x10f5dc),this['stopListening'](_0x10f5dc,'change:isVisible',_0x288a1c);});}['_setupEnterAnnotationKeystroke'](){const _0xe47a89=_0x573fba=>{_0x573fba['on']('ready',()=>{_0x573fba['keystrokes']['set'](_0x59830c,(_0x49778d,_0x16cd47)=>{const _0x4e8f80=_0x1b9b5e(this['activeAnnotations']['values']());_0x4e8f80&&(_0x4e8f80['view']['focus'](),_0x16cd47());});});};this['context']instanceof _0x15bb05?_0xe47a89(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1ad7b9,_0x385e64)=>{_0xe47a89(_0x385e64);});}['_setupEscapeAnnotationHandling'](){const _0xe2065d=_0x108021=>{const _0x1080e4=_0x108021['source'],_0xddafca=[];let _0x1ffe7d;if(Array['isArray'](_0x1080e4['target'])){_0x1ffe7d=_0x1080e4['target'][0x0],this['context']instanceof _0x15bb05?_0xddafca['push'](this['context']):this['context']['editors']&&_0xddafca['push'](...this['context']['editors']);for(const _0x186f8c of _0xddafca)for(const _0xa36665 of _0x186f8c['editing']['view']['domRoots']['values']())if(_0xa36665['contains'](_0x1ffe7d))return void _0x186f8c['editing']['view']['focus']();_0x1ffe7d['focus']();}};this['listenTo'](this['collection'],'add',(_0x5b0c82,_0x21503b)=>{this['listenTo'](_0x21503b,'escape',_0xe2065d,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x492cf6,_0x932763)=>{this['stopListening'](_0x932763,'escape',_0xe2065d);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x35dfc2{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x378ca8){super(_0x378ca8),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x5127a9=this['context']['config'];_0x5127a9['define']('comments.maxCommentsWhenCollapsed',0x2),_0x5127a9['define']('comments.maxThreadTotalWeight',0x1f4),_0x5127a9['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x5127a9['define']('comments.CommentThreadView',gt),_0x5127a9['define']('comments.CommentView',Tt),_0x5127a9['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x38f883=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5462dd,_0x1c02cb)=>this['_addCommentThread'](_0x1c02cb)),this['on']('submitCommentThread',(_0x3c34e7,_0x3e0ee6)=>this['_submitCommentThread'](_0x3e0ee6)),this['on']('resolveCommentThread',(_0x55dbdd,_0x1858bb)=>this['_resolveCommentThread'](_0x1858bb)),this['on']('resolveCommentThread',(_0x31f38a,_0x5b9ce9)=>this['_updateActiveAnnotation'](_0x5b9ce9),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x3863a5,_0x113d2e)=>this['_reopenCommentThread'](_0x113d2e)),this['on']('reopenCommentThread',(_0x1ca13d,_0x209cb6)=>this['_updateActiveAnnotation'](_0x209cb6),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x18a949,_0x31f443)=>this['_removeCommentThread'](_0x31f443)),this['on']('updateCommentThread',(_0x3f501a,_0x21852d)=>this['_updateCommentThread'](_0x21852d)),this['on']('updateCommentThread',(_0x454acf,_0x4550e5)=>this['_updateActiveAnnotation'](_0x4550e5),{'priority':'lowest'}),this['on']('addComment',(_0x5d7773,_0x4d689b)=>this['_addComment'](_0x4d689b)),this['on']('updateComment',(_0x312121,_0x109cd0)=>this['_updateComment'](_0x109cd0)),this['on']('removeComment',(_0x37452f,_0x485d92)=>this['_removeComment'](_0x485d92)),this['on']('addComment',(_0x1b1d05,{threadId:_0x474cb1,isFromAdapter:_0x495448})=>{if(_0x495448)return;const _0x4ec203=this['getCommentThread'](_0x474cb1),_0x15665a=_0x4ec203&&this['_threadToController']['get'](_0x4ec203);_0x15665a&&_0x15665a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x38f883,'change:activeAnnotations',(_0x2593ae,_0x20c669,_0x58d2a1)=>{const _0x148e1e=Array['from'](_0x58d2a1)['map'](_0x46bd72=>this['_viewToController']['get'](_0x46bd72['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x148e1e?_0x148e1e['model']:null;});}set['adapter'](_0x2431bf){if(this['_adapter'])throw new _0x29e429('commentsrepository-adapter-already-set');this['_adapter']=_0x2431bf;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4cdd6f=_t,threadId:_0x2997b8=_0x1684c5(),comments:_0x3a5992=[],unlinkedAt:_0x477da5=null,resolvedAt:_0x2c421a=null,resolvedBy:_0x3b820c=null,target:_0x13ac63=null,context:_0x2e3ebb=null,attributes:_0x33fefd={},isResolvable:_0x367101=!0x0,isSubmitted:_0x4f9fdb=!0x1,isFromAdapter:_0x7ee213=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x4cdd6f),{'channelId':_0x4cdd6f,'threadId':_0x2997b8,'comments':_0x3a5992,'unlinkedAt':_0x477da5,'resolvedAt':_0x2c421a,'resolvedBy':_0x3b820c,'target':_0x13ac63,'context':_0x2e3ebb,'attributes':_0x33fefd,'isFromAdapter':_0x7ee213,'isResolvable':_0x367101,'isSubmitted':_0x4f9fdb}),this['getCommentThread'](_0x2997b8);}['openNewCommentThread']({channelId:_0x25d2d7=_t,threadId:_0x2200cd=_0x1684c5(),target:_0x13eeff,context:_0x1caeb9=null,isResolvable:_0x2cffd7=!0x0}){if(this['_readOnlyChannels']['has'](_0x25d2d7)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x13eeff)throw new _0x29e429('commentsrepository-missing-target');const _0x48e739=this['addCommentThread']({'channelId':_0x25d2d7,'threadId':_0x2200cd,'target':_0x13eeff,'context':_0x1caeb9,'isResolvable':_0x2cffd7});if(!_0x48e739)return null;const _0x2ca53b=this['_threadToController']['get'](_0x48e739),_0x4e6117=_0x2ca53b['view']['commentThreadInputView']['commentInputView'],_0x9f2650=this['context']['plugins']['get'](y),_0x3e4fe3=_0x9f2650['getByInnerView'](_0x2ca53b['view']);return _0x9f2650['activate'](_0x3e4fe3),_0x4e6117['once']('editorReady',()=>_0x4e6117['focus']()),_0x48e739;}['hasCommentThread'](_0x5ac5b5){if('string'!=typeof _0x5ac5b5)throw new _0x29e429('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5ac5b5);}['updateCommentThread']({channelId:_0x1b9707=_t,threadId:_0x32ccb8,context:_0x3609fb,unlinkedAt:_0x2534be,attributes:_0x544fb5,isFromAdapter:_0x57d861=!0x1}){return this['fire'](Nt('updateCommentThread',_0x1b9707),{'channelId':_0x1b9707,'threadId':_0x32ccb8,'context':_0x3609fb,'unlinkedAt':_0x2534be,'attributes':_0x544fb5,'isFromAdapter':_0x57d861}),this['getCommentThread'](_0x32ccb8);}['getCommentThread'](_0x1fb34a){if('string'!=typeof _0x1fb34a)throw new _0x29e429('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1fb34a);}['fetchCommentThread']({channelId:_0x198ad1,threadId:_0x542140}={}){const _0x4f49c6=this['getCommentThread'](_0x542140);if(_0x4f49c6)return Promise['resolve'](_0x4f49c6);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x29e429('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x198ad1,'threadId':_0x542140})['then'](_0x308aff=>this['hasCommentThread'](_0x542140)?this['getCommentThread'](_0x542140):_0x308aff?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x198ad1},_0x308aff)):void 0x0)['catch'](_0x5db6b2=>{throw console['error'](_0x5db6b2),new _0x29e429('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x5830be,skipNotAttached:_0x3140d9=!0x1,skipEmpty:_0x1b00b7=!0x1,toJSON:_0x2b538e=!0x1}={}){const _0x1198c6=[];for(const _0xf43a36 of this['_threads']['values']())_0x5830be&&_0xf43a36['channelId']!==_0x5830be||_0x3140d9&&!_0xf43a36['isAttached']||_0x1b00b7&&0x0===_0xf43a36['length']||_0x1198c6['push'](_0xf43a36);return _0x2b538e?_0x1198c6['map'](_0x5603a8=>_0x5603a8['toJSON']()):_0x1198c6;}['getAnnotationForCommentThread'](_0x5c76af){const _0x2e37bf=this['_threadToController']['get'](_0x5c76af);if(!_0x2e37bf)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2e37bf['view'])||null;}['getCommentThreadForAnnotation'](_0x58df89){const _0x42a334=this['_viewToController']['get'](_0x58df89['innerView']);return _0x42a334?_0x42a334['model']:null;}['setActiveCommentThread'](_0x3bf568){const _0x47fcd5=this['context']['plugins']['get'](y);if(!_0x3bf568)return void(this['activeCommentThread']&&_0x47fcd5['deactivateAll']());const _0x466862=this['getCommentThread'](_0x3bf568);if(!_0x466862)throw new _0x29e429('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3bf568});if(!this['_threadToController']['has'](_0x466862))throw new _0x29e429('commentsrepository-active-not-attached',null,{'threadId':_0x3bf568});const _0x225237=_0x47fcd5['getByInnerView'](this['_threadToController']['get'](_0x466862)['view']);_0x47fcd5['activate'](_0x225237);}['switchReadOnly'](_0x5227d3,_0x599bc4){_0x5227d3?this['_readOnlyChannels']['add'](_0x599bc4):this['_readOnlyChannels']['delete'](_0x599bc4),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2da56e){return this['_readOnlyChannels']['has'](_0x2da56e)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x501062,_0x1f5971){return new vt(_0x501062,_0x1f5971);}['setPermissions'](_0x360f0e,_0x13754e=_t){this['_permissions']['set'](_0x13754e,_0x360f0e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x11dee8=_t){return this['_permissions']['has'](_0x11dee8)?this['_permissions']['get'](_0x11dee8):bt;}['_addCommentThread']({channelId:_0x4b603e,threadId:_0x4fb3bc,comments:_0xf97549,unlinkedAt:_0x213ac6,resolvedAt:_0x1bf8f9,resolvedBy:_0xc2f64b,target:_0x310fa6,context:_0x37f6a5,attributes:_0x5965af,isFromAdapter:_0x2f360f,isResolvable:_0x360ee6,isSubmitted:_0x3ed32e}){if('string'!=typeof _0x4fb3bc)throw new _0x29e429('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4fb3bc});if(this['hasCommentThread'](_0x4fb3bc))throw new _0x29e429('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4fb3bc});const _0x18bc8a=new pi(this,{'channelId':_0x4b603e,'id':_0x4fb3bc,'context':_0x37f6a5,'attributes':_0x5965af,'unlinkedAt':_0x213ac6,'resolvedAt':_0x1bf8f9,'resolvedBy':_0xc2f64b?this['context']['plugins']['get'](it)['getUser'](_0xc2f64b):null,'isResolvable':_0x360ee6,'isSubmitted':_0x3ed32e||_0x2f360f});this['_threads']['set'](_0x4fb3bc,_0x18bc8a);for(const _0x33e2a2 of _0xf97549)_0x18bc8a['_add'](this['_createNewComment']({'threadId':_0x4fb3bc,..._0x33e2a2}));return _0x310fa6&&_0x18bc8a['attachTo'](_0x310fa6),_0x2f360f||!_0x18bc8a['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x4b603e,'threadId':_0x4fb3bc});}['_submitCommentThread']({channelId:_0x57a407,threadId:_0x4817d5}){if(!this['hasCommentThread'](_0x4817d5))throw new _0x29e429('commentsrepository-missing-comment-thread',this);const _0x350eb2=this['getCommentThread'](_0x4817d5);if(_0x350eb2['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x206951,comments:_0x558f2c,resolvedAt:_0xb5169f,resolvedBy:_0x494ed4,context:_0x32dc99,attributes:_0x4dbf46}=_0x350eb2,_0x4a8939=this['context']['plugins']['get']('PendingActions'),_0x4ab284=_0x4a8939['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x57a407,'threadId':_0x206951,'comments':_0x558f2c['map'](_0x587e5d=>_0x587e5d['toJSON']()),'resolvedAt':_0xb5169f,'resolvedBy':_0x494ed4?_0x494ed4['id']:_0x494ed4,'context':_0x32dc99,'attributes':_0x4dbf46})['then'](({comments:_0x2a9f70})=>{_0x4a8939['remove'](_0x4ab284);for(const _0x1c2038 of _0x2a9f70)this['_updateComment']({'channelId':_0x57a407,'threadId':_0x4817d5,'commentId':_0x1c2038['commentId'],'createdAt':_0x1c2038['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4dddaa=>{throw console['error'](_0x4dddaa),new _0x29e429('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x115c42,target:_0x36cf94}){const _0x39c542=this['getCommentThread'](_0x115c42);if(!_0x39c542)throw new _0x29e429('commentsrepository-attach-missing-comment-thread',this);const _0x3f8ec2=this['context']['plugins']['get']('PendingActions'),_0x4a291f=this['context']['plugins']['get'](y),_0x6ea954=this['_createCommentThreadView'](_0x39c542),_0x586a7e=new vt(_0x39c542,_0x6ea954);let _0x4db6f5=null;_0x6ea954['on']('change:isDirty',(_0x2fdc20,_0x3a1cab,_0x1c4975)=>{_0x1c4975?_0x4db6f5=_0x3f8ec2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4db6f5&&(_0x3f8ec2['remove'](_0x4db6f5),_0x4db6f5=null);}),this['_threadToController']['set'](_0x39c542,_0x586a7e),this['_viewToController']['set'](_0x6ea954,_0x586a7e);const _0x43c2ae=new E(this['context']['locale'],_0x6ea954);_0x43c2ae['bind']('length')['to'](_0x6ea954),_0x43c2ae['bind']('isDirty')['to'](_0x6ea954,'isDirty',_0x6ea954,'length',(_0x1a84e5,_0x347384)=>_0x1a84e5||!_0x347384),_0x43c2ae['bind']('isActive')['to'](_0x6ea954),_0x43c2ae['type']='comment';const _0x51675e=new T({'view':_0x43c2ae,'target':_0x36cf94,'type':'comment','isVisible':!_0x39c542['archivedAt']&&!!('function'==typeof _0x36cf94?_0x36cf94():_0x36cf94)});return _0x6ea954['on']('escape',()=>{_0x51675e['fire']('escape');}),this['_bindAnnotationToEditors'](_0x6ea954,_0x51675e),_0x4a291f['add'](_0x51675e),_0x51675e;}['_bindAnnotationToEditors'](_0x5852a5,_0x86d4dc){this['listenTo'](_0x5852a5,'editorReady',(_0x402c47,_0x55372a)=>{const _0x24c3a9=_0x55372a['ui']['view']['body']['bodyCollectionContainer'];_0x86d4dc['focusableElements']['add'](_0x24c3a9),this['context']instanceof _0x15bb05&&this['context']['ui']['focusTracker']['add'](_0x24c3a9);},{'priority':'highest'}),this['listenTo'](_0x5852a5,'editorDestroyed',(_0x131df7,_0x542a6f)=>{const _0x3c75b4=_0x542a6f['ui']['view']['body']['bodyCollectionContainer'];_0x86d4dc['focusableElements']['has'](_0x3c75b4)&&_0x86d4dc['focusableElements']['remove'](_0x3c75b4),this['context']instanceof _0x15bb05&&this['context']['ui']['focusTracker']['remove'](_0x3c75b4);});}['_unbindEditors'](_0x43530f){this['stopListening'](_0x43530f,'editorReady'),this['stopListening'](_0x43530f,'editorDestroyed');}['_createCommentThreadView'](_0x51f798){const _0x138942=this['context']['plugins']['get'](it),{config:_0x38e89e,locale:_0x345d64}=this['context'],_0x1787c0=pt(_0x38e89e['get']('locale'),_0x345d64);return new(0x0,(_0x38e89e['get']('comments'))['CommentThreadView'])(_0x345d64,_0x51f798,_0x138942['me'],{'editorConfig':{..._0x38e89e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x38e89e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x38e89e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x38e89e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x38e89e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1787c0,'CommentView':_0x38e89e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2f918d,channelId:_0x2043b0,resolvedAt:_0x9194bb,resolvedBy:_0x5d99ca,isFromAdapter:_0xd075ce}){if(!this['hasCommentThread'](_0x2f918d))throw new _0x29e429('commentsrepository-missing-comment-thread',null,{'threadId':_0x2f918d});const _0x30ebb9=this['getCommentThread'](_0x2f918d);if(_0x30ebb9['isResolved'])throw new _0x29e429('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2f918d});const _0x27499d=this['context']['plugins']['get'](it);if(_0x30ebb9['resolvedBy']=_0x27499d['getUser'](_0x5d99ca),_0x30ebb9['resolvedAt']=_0x9194bb,_0xd075ce||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3c6f3f=this['context']['plugins']['get']('PendingActions'),_0x3e9eb0=_0x3c6f3f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2043b0,'threadId':_0x2f918d})['then'](({resolvedAt:_0x1b1a8b,resolvedBy:_0xc1bb78})=>{_0x3c6f3f['remove'](_0x3e9eb0),_0x30ebb9['resolvedBy']['id']!==_0xc1bb78&&(_0x30ebb9['resolvedBy']=_0x27499d['getUser'](_0xc1bb78)),_0x30ebb9['resolvedAt']=_0x1b1a8b;})['catch'](_0x34bff2=>{throw console['error'](_0x34bff2),new _0x29e429('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4b2a4f,channelId:_0x5b2822,isFromAdapter:_0xc0cc56}){if(!this['hasCommentThread'](_0x4b2a4f))throw new _0x29e429('commentsrepository-missing-comment-thread',null,{'threadId':_0x4b2a4f});const _0x157129=this['getCommentThread'](_0x4b2a4f);if(!_0x157129['isResolved'])throw new _0x29e429('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4b2a4f});if(_0x157129['resolvedBy']=null,_0x157129['resolvedAt']=null,_0xc0cc56||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x116db4=this['context']['plugins']['get']('PendingActions'),_0x4f9d10=_0x116db4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5b2822,'threadId':_0x4b2a4f})['then'](()=>_0x116db4['remove'](_0x4f9d10))['catch'](_0x163285=>{throw console['error'](_0x163285),new _0x29e429('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x161b55,isFromAdapter:_0x48067c}){const _0x53a9e5=this['getCommentThread'](_0x161b55);if(!_0x53a9e5)throw new _0x29e429('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x161b55),this['_threads']['delete'](_0x161b55),!_0x53a9e5['isSubmitted']||_0x48067c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x86832c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ef680}=_0x53a9e5,_0x2efd5c=_0x86832c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1ef680,'threadId':_0x161b55})['then'](()=>_0x86832c['remove'](_0x2efd5c))['catch'](_0x56d279=>{throw console['error'](_0x56d279),new _0x29e429('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x44c4d8,unlinkedAt:_0xc63c63,context:_0x1b61f8,attributes:_0xdb4bba,isFromAdapter:_0x3b3a0c}){if('string'!=typeof _0x44c4d8)throw new _0x29e429('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x44c4d8});if(!this['hasCommentThread'](_0x44c4d8))throw new _0x29e429('commentsrepository-missing-comment-thread',null,{'threadId':_0x44c4d8});const _0x56e8a3=this['getCommentThread'](_0x44c4d8);let _0x29d568=!0x1;if(void 0x0!==_0x1b61f8&&_0x56e8a3['context']!==_0x1b61f8&&(_0x56e8a3['context']=_0x1b61f8,_0x29d568=!0x0),void 0x0!==_0xc63c63&&_0x56e8a3['unlinkedAt']!==_0xc63c63&&(_0x56e8a3['unlinkedAt']=_0xc63c63,_0x29d568=!0x0),_0xdb4bba&&!At(_0xdb4bba,_0x56e8a3['attributes'])&&(_0x56e8a3['attributes']=_0xdb4bba,_0x29d568=!0x0),!_0x29d568)return Promise['resolve']();if(!_0x56e8a3['isSubmitted']||_0x3b3a0c||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1571f1=this['context']['plugins']['get']('PendingActions'),{channelId:_0x359561}=_0x56e8a3,_0x281dd6=_0x1571f1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x359561,'threadId':_0x44c4d8,'context':_0x1b61f8,'unlinkedAt':_0xc63c63,'attributes':_0xdb4bba})['then'](()=>_0x1571f1['remove'](_0x281dd6))['catch'](_0x1224f8=>{throw console['error'](_0x1224f8),new _0x29e429('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xecf025){const _0x1d50c1=this['context']['plugins']['get'](y),_0x1c1849=this['getCommentThread'](_0xecf025);if(_0x1c1849['_isAttached']=!0x1,this['_threadToController']['has'](_0x1c1849)){const _0x43e8a1=this['_threadToController']['get'](_0x1c1849),_0xc374a2=_0x43e8a1['view'],_0x586ace=_0x1d50c1['getByInnerView'](_0xc374a2);this['_threadToController']['delete'](_0x1c1849),this['_viewToController']['delete'](_0xc374a2),_0x586ace&&_0x1d50c1['remove'](_0x586ace),_0x43e8a1['destroy'](),_0xc374a2['destroy']()['then'](()=>{this['_unbindEditors'](_0xc374a2);});}}['_updateActiveAnnotation']({threadId:_0xabb278,resolvedAt:_0x29aeae,unlinkedAt:_0x198aa5}){const _0x145ae1=!!_0x29aeae,_0xca62bc=this['context']['plugins']['get'](y),_0x452900=this['getCommentThread'](_0xabb278);if(this['_threadToController']['has'](_0x452900)){const _0x30cdb4=this['_threadToController']['get'](_0x452900)['view'],_0x3c31a3=_0xca62bc['getByInnerView'](_0x30cdb4);_0x3c31a3&&(_0x145ae1&&_0xca62bc['_removeActiveAnnotation'](_0x3c31a3),_0x198aa5?_0x3c31a3['isVisible']=!0x1:_0x3c31a3['refreshVisibility']());}}['_getExternalAuthor'](_0xffdea7){const _0x2121a2=this['context']['plugins']['get'](it),_0x54ab28=It('external:'+_0xffdea7),_0x216fb7=_0x2121a2['getUser'](_0x54ab28);return _0x216fb7||_0x2121a2['addUser']({'id':_0x54ab28,'name':_0xffdea7});}['_createNewComment']({threadId:_0xdc39e1,commentId:_0x3053d5=_0x1684c5(),content:_0x547536,authorId:_0x3f756c,createdAt:_0x206c4d,attributes:_0x31f93e}){if('string'!=typeof _0x3053d5)throw new _0x29e429('commentsrepository-invalid-commentid');if('string'!=typeof _0x3f756c)throw new _0x29e429('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x547536||!_0x547536['trim']())throw new _0x29e429('commentsrepository-invalid-comment-content');const _0x50be35=this['context']['plugins']['get'](it)['getUser'](_0x3f756c);if(!_0x50be35)throw new _0x29e429('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x3f756c});let _0x5b2865=null,_0x55138a=_0x206c4d;return _0x31f93e?.['@external']&&(_0x5b2865=this['_getExternalAuthor'](_0x31f93e['@external']['authorName']),_0x55138a=new Date(_0x31f93e['@external']['createdAt'])),new wi(this,{'threadId':_0xdc39e1,'id':_0x3053d5,'author':_0x5b2865||_0x50be35,'creator':_0x50be35,'content':_0x547536,'createdAt':_0x206c4d,'authoredAt':_0x55138a,'attributes':_0x31f93e});}['_addComment'](_0x350b83){let {threadId:_0x1baa02,content:_0x287969,attributes:_0x1f9a6c,isFromAdapter:_0x153a76}=_0x350b83;const _0x208719=this['getCommentThread'](_0x350b83['threadId']);if(!_0x208719)throw new _0x29e429('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x3ca48a=this['_createNewComment'](_0x350b83),{id:_0x39fdd7}=_0x3ca48a;if(_0x208719['_add'](_0x3ca48a),_0x153a76||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x208719['isSubmitted'])return Promise['resolve']();const _0x123874=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2cf856}=_0x208719,_0x1412c7=_0x123874['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x1f9a6c||(_0x1f9a6c={}),this['adapter']['addComment']({'channelId':_0x2cf856,'threadId':_0x1baa02,'commentId':_0x39fdd7,'content':_0x287969,'attributes':_0x1f9a6c})['then'](_0x29b7d6=>{_0x123874['remove'](_0x1412c7),_0x29b7d6&&this['_updateComment']({'channelId':_0x2cf856,'threadId':_0x1baa02,'commentId':_0x39fdd7,'createdAt':_0x29b7d6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5b35d4=>{throw console['error'](_0x5b35d4),new _0x29e429('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4d482f,commentId:_0x485c18,content:_0x1a66d3,createdAt:_0x433a5a,attributes:_0x1dba1b,isFromAdapter:_0x128bfd}){if(void 0x0!==_0x1a66d3&&('string'!=typeof _0x1a66d3||!_0x1a66d3['trim']()['length']))throw new _0x29e429('commentsrepository-update-comment-invalid-content');const _0x2990a8=this['getCommentThread'](_0x4d482f),_0x35c00a=_0x2990a8['getComment'](_0x485c18);if(!_0x35c00a)throw new _0x29e429('commentsrepository-update-missing-comment',this);let _0x575808=!0x1;if(_0x1a66d3&&_0x1a66d3!==_0x35c00a['content']&&(_0x35c00a['isEditable']||_0x128bfd)&&(_0x35c00a['content']=_0x1a66d3,_0x575808=!0x0),_0x433a5a&&_0x433a5a!==_0x35c00a['createdAt']&&(_0x35c00a['createdAt']=_0x433a5a,_0x35c00a['attributes']&&_0x35c00a['attributes']['@external']||(_0x35c00a['authoredAt']=_0x433a5a),_0x575808=!0x0),_0x1dba1b&&!At(_0x1dba1b,_0x35c00a['attributes'])&&(_0x35c00a['attributes']=_0x1dba1b,_0x575808=!0x0),!_0x575808)return Promise['resolve']();if(_0x2990a8['fire']('commentUpdated'),_0x128bfd||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x55ca04=this['context']['plugins']['get']('PendingActions'),{channelId:_0x442605}=this['getCommentThread'](_0x35c00a['threadId']),_0x3a9004=_0x55ca04['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x442605,'threadId':_0x4d482f,'commentId':_0x485c18,'content':_0x1a66d3,'attributes':_0x1dba1b})['then'](()=>_0x55ca04['remove'](_0x3a9004))['catch'](_0x26ac16=>{throw console['error'](_0x26ac16),new _0x29e429('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x166ac5,commentId:_0x11fca8,isFromAdapter:_0x2c66df}){const _0x555ddf=this['getCommentThread'](_0x166ac5),_0x3bde6c=_0x555ddf['getComment'](_0x11fca8);if(!_0x3bde6c)throw new _0x29e429('commentsrepository-remove-missing-comment',this);if(_0x555ddf['_remove'](_0x3bde6c),_0x2c66df||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x322485=this['context']['plugins']['get']('PendingActions'),{channelId:_0x13f9af}=_0x555ddf,_0x2b4c75=_0x322485['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x13f9af,'threadId':_0x166ac5,'commentId':_0x11fca8})['then'](()=>_0x322485['remove'](_0x2b4c75))['catch'](_0x3265e1=>{throw console['error'](_0x3265e1),new _0x29e429('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x1d2f19(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x29c99d,_0x55ae09){super();const _0x2e489c=_0x29c99d['context']['plugins']['get'](it)['me'],_0x3ed136=_0x29c99d['getCommentThread'](_0x55ae09['threadId']),_0x116f64=0x0===_0x3ed136['comments']['length'],_0x3c2827=_0x2e489c===_0x55ae09['author'];this['id']=_0x55ae09['id'],this['threadId']=_0x55ae09['threadId'],this['author']=_0x55ae09['author'],this['creator']=_0x55ae09['creator'],this['isExternal']=Boolean(_0x55ae09['attributes']&&_0x55ae09['attributes']['@external']),this['set']('content',_0x55ae09['content']),this['createdAt']=_0x55ae09['createdAt']||new Date(),this['set']('authoredAt',_0x55ae09['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x3ed136,'resolvedAt'),this['set']('attributes',_0x55ae09['attributes']||{}),this['bind']('isEditable')['to'](_0x29c99d,'_permissions',()=>{const _0x51c774=_0x29c99d['getPermissions'](_0x3ed136['channelId'])['write'],_0x37db8f=_0x29c99d['getPermissions'](_0x3ed136['channelId'])['modifyAll'];return _0x3c2827&&_0x51c774||!_0x3c2827&&_0x37db8f;}),this['bind']('isRemovable')['to'](_0x3ed136,'isRemovable',_0x29c99d,'_permissions',_0x1d9b5e=>{const _0x14d3c3=_0x29c99d['getPermissions'](_0x3ed136['channelId'])['write'],_0x4dc627=_0x29c99d['getPermissions'](_0x3ed136['channelId'])['modifyAll'];return _0x3c2827&&_0x14d3c3||_0x1d9b5e&&_0x116f64||!_0x3c2827&&_0x4dc627&&!_0x116f64;}),this['bind']('isReadOnly')['to'](_0x3ed136,'isReadOnly'),this['_repository']=_0x29c99d;}get['weight'](){return Math['max'](function(_0x29839c){const _0x334e17=document['createElement']('div');return _0x334e17['innerHTML']=_0x29839c,_0x334e17['textContent']['length'];}(this['content']),0xc8);}['update'](_0x5b369a){const {threadId:_0x302c47,id:_0x57297d}=this;if(!this['_repository']['hasCommentThread'](_0x302c47))throw new _0x29e429('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x27f247}=this['_repository']['getCommentThread'](_0x302c47);this['_repository']['fire'](Nt('updateComment',_0x27f247,_0x302c47),{'channelId':_0x27f247,'threadId':_0x302c47,'commentId':_0x57297d,..._0x5b369a});}['setAttribute'](_0x34f280,_0x46c40f){const _0x519c48=wt(this['attributes']);yt(_0x519c48,_0x34f280,_0x46c40f),this['update']({'attributes':_0x519c48});}['removeAttribute'](_0xe53021){const _0x219764=wt(this['attributes']);Ct(_0x219764,_0xe53021),this['update']({'attributes':_0x219764});}['remove'](_0x49ca51={}){if(!_0x49ca51['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x14601f,id:_0x4b0b43}=this;if(!this['_repository']['hasCommentThread'](_0x14601f))throw new _0x29e429('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x40a6a7}=this['_repository']['getCommentThread'](_0x14601f);this['_repository']['fire'](Nt('removeComment',_0x40a6a7,_0x14601f),{'channelId':_0x40a6a7,'threadId':_0x14601f,'commentId':_0x4b0b43,..._0x49ca51});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x3e3e10,..._0x5693d3){for(const _0x28560c of _0x5693d3)void 0x0!==_0x28560c&&(_0x3e3e10+=':'+String(_0x28560c));return _0x3e3e10;}class ot extends _0x445992{constructor(_0xc91e5c){super(_0xc91e5c),this['set']('hasContent',!0x1);}['refresh'](){const _0x26ce93=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x5bc93d of _0x26ce93['getRanges']())if(this['_hasContent'](_0x5bc93d))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x46cbff=_0x1684c5(),ranges:_0x49f3fd,comment:_0x3fbdaa}={}){const _0x2ed229=this['editor']['model'],_0x380f6f=_0x49f3fd??Array['from'](_0x2ed229['document']['selection']['getRanges']()),_0xc9ef73=[];for(const _0x1f41ea of _0x380f6f)this['_hasContent'](_0x1f41ea)&&_0xc9ef73['push'](this['_trimToContent'](_0x1f41ea));if(!_0xc9ef73['length'])throw new _0x29e429('addcommentthreadcommand-incorrect-ranges',null);_0x3fbdaa&&this['_createCommentThread'](_0x46cbff,_0x3fbdaa),this['_createMarkersFromRanges'](_0x46cbff,_0xc9ef73,!!_0x3fbdaa);}['_createMarkersFromRanges'](_0x163e1e,_0x303ab8,_0x346674){this['editor']['model']['change'](_0x35f664=>{for(const _0x1b1d44 of _0x303ab8){const _0x3fdd87=_0x1684c5()['substr'](0x1,0x5),_0x5d2204='comment:'+_0x163e1e+':'+_0x3fdd87;_0x35f664['addMarker'](_0x5d2204,{'range':_0x1b1d44,'usingOperation':_0x346674,'affectsData':_0x346674});}});}['_createCommentThread'](_0xbaf0b4,_0x63f4bf){const _0x6f5fea=this['editor']['plugins']['get']('CommentsRepository'),_0x20bc41=this['editor']['config']['get']('collaboration.channelId'),_0xc8c038=this['editor']['plugins']['get']('Users')['me'];if(!_0xc8c038)throw new _0x29e429('addcommentthreadcommand-user-not-found',null);_0x6f5fea['addCommentThread']({'threadId':_0xbaf0b4,'channelId':_0x20bc41,'comments':[{'authorId':_0xc8c038['id'],'content':_0x63f4bf,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x6ccb18){for(const _0x3f3b05 of _0x6ccb18['getItems']())if(this['_itemIsContent'](_0x3f3b05))return!0x0;return!0x1;}['_itemIsContent'](_0x5bbbad){return _0x5bbbad['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5bbbad)&&!_0x5bbbad['is']('element','tableCell');}['_trimToContent'](_0x336bc9){const _0x2673c0=_0x2667f0=>!this['_itemIsContent'](_0x2667f0['item']),_0x15842a=_0x336bc9['start']['getLastMatchingPosition'](_0x2673c0),_0x3befad=_0x336bc9['end']['getLastMatchingPosition'](_0x2673c0,{'direction':'backward'});return this['editor']['model']['createRange'](_0x15842a,_0x3befad);}}class b extends _0x3732d9{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2b08f8){super(_0x2b08f8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x5e02fa=this['editor'],_0x27fb0b=_0x5e02fa['model']['document']['selection'],_0x501d4a=_0x340747(()=>this['refreshSelectedViews'](),0xa);_0x27fb0b['on']('change:range',(_0x264f60,_0x10dcac)=>{_0x10dcac['directChange']&&(_0x501d4a['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x5e02fa['editing']['view']['document'],'change:isFocused',(_0x3e413c,_0xae52f7,_0x1047ad)=>{_0x1047ad&&_0x501d4a();}),this['listenTo'](_0x5e02fa['ui']['focusTracker'],'change:isFocused',(_0x12e24d,_0x1f268e,_0x18ae6b)=>{_0x18ae6b||this['fire']('blur',{'isAnnotationTracked':_0x3edb45=>this['_editorAnnotationsData']['has'](_0x3edb45['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x1f375c){if(this['_editorAnnotations']['has'](_0x1f375c['view']))return;this['_editorAnnotations']['add'](_0x1f375c['view']),this['editor']['ui']['focusTracker']['add'](_0x1f375c['view']['element']);const _0x79959c=this['editor']['plugins']['get'](y);this['listenTo'](_0x79959c['collection'],'remove',(_0x1ed863,_0x1b34e2)=>{this['editor']['ui']['focusTracker']['remove'](_0x1b34e2['view']['element']),this['_editorAnnotations']['delete'](_0x1b34e2['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x11490b){if('function'!=typeof _0x11490b)throw new _0x29e429('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x11490b);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x5270c1,annotations:_0x2fdcb6}){const _0x46eaa8=[],_0x2c627e=this['editor']['model']['document']['selection'],_0x45d8c1=Array['from'](_0x2c627e['getRanges']());for(const [_0x4f2c11,_0x150b29]of this['_editorAnnotationsData']){const _0x390702=_0x45f1a9(_0x150b29),_0x32c2a9=_0x2fdcb6['getByInnerView'](_0x4f2c11);_0x390702&&_0x32c2a9&&_0x46eaa8['push']({'annotation':_0x32c2a9,'range':_0x390702});}function _0x45f1a9(_0x2132fb){for(const _0x4e9c53 of _0x2132fb)for(const _0x44d830 of _0x45d8c1)if(_0x4e9c53['containsRange'](_0x44d830,!_0x2c627e['isCollapsed']))return _0x4e9c53;return null;}return _0x46eaa8['sort']((_0x7642e,_0x1dd6ec)=>{const _0x4c6c19=_0x7642e['range'],_0x429b77=_0x1dd6ec['range'];if(!_0x4c6c19['isEqual'](_0x429b77)){if(_0x4c6c19['containsRange'](_0x429b77,!0x0))return 0x1;if(_0x429b77['containsRange'](_0x4c6c19,!0x0))return-0x1;}return _0x7642e['annotation']==_0x5270c1?-0x1:_0x1dd6ec['annotation']==_0x5270c1?0x1:0x0;})['map'](_0x5186b8=>_0x5186b8['annotation']);}get['_editorAnnotationsData'](){const _0x363dd0=new Map();for(const _0x2cfe99 of Array['from'](this['_dataCollectors']))for(const [_0x84d8ec,_0x330465]of _0x2cfe99())_0x363dd0['set'](_0x84d8ec,_0x330465);return _0x363dd0;}}class st extends _0x3732d9{['afterInit'](){const _0x3f8c3e=this['editor'];if(!_0x3f8c3e['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3f8c3e['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3732d9{constructor(_0x41c6de){super(_0x41c6de),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x32ba02=this['editor'],_0x58e587=_0x32ba02['commands']['get']('importWord'),_0x4caf3c=_0x32ba02['plugins']['get'](it);_0x58e587&&(_0x58e587['on']('execute',(_0x20f717,[,_0x25793d])=>{_0x25793d['collaboration_features']={'comments':!0x0,'user_id':_0x4caf3c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x58e587,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xe169aa,_0x3e7d8f){const {comment_threads:_0x58db26}=_0x3e7d8f;_0x58db26&&_0x58db26['forEach'](({thread_id:_0x591541,comments:_0x2b0e24,is_resolved:_0x122497})=>{const _0x57c6b7=new Date(),_0xd71b80=_0x2b0e24['map'](({author:_0x970922,content:_0x3c4cb4,created_at:_0x4dd203})=>({'content':_0x3c4cb4,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x57c6b7,'attributes':{'@external':{'authorName':_0x970922,'createdAt':_0x4dd203?new Date(_0x4dd203):new Date(),'source':'importWord'}}})),_0x4b566a=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4b566a,'threadId':_0x591541,'comments':_0xd71b80,'resolvedAt':_0x122497?_0x57c6b7:null});});}}class at extends _0x3732d9{constructor(_0x3e3f36){super(_0x3e3f36),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x414939=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x414939,'contentInsertion',(_0x17540c,_0x4599cd)=>this['_removeMarkersWithoutThreads'](_0x4599cd['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x2b0386){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x2b0386;const _0x9bc9f0=this['editor']['plugins']['get']('CommentsRepository');for(const _0x6ec00a of _0x2b0386['keys']()){const [_0x3a15a7,_0x118930]=_0x6ec00a['split'](':');'comment'!=_0x3a15a7||_0x9bc9f0['hasCommentThread'](_0x118930)||_0x2b0386['delete'](_0x6ec00a);}return _0x2b0386;}['_registerMarkerInClipboardPipeline'](){const _0x18ebb9=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x51f4f6=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x51f4f6&&_0x18ebb9['_registerMarkerToCopy']('comment',_0x51f4f6);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x590400){switch(_0x590400){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x9e2f87){const _0x123916=_0x9e2f87['split'](':');return{'group':_0x123916[0x0],'id':_0x123916[0x1],'part':_0x123916[0x2]};}class ut extends _0x3732d9{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x26c40e,_0x5e8693)=>{if(!_0x5e8693['options']['showCommentHighlights'])return null;if(_0x5e8693['options']['ignoreResolvedComments']){const {id:_0x41e9bf}=ft(_0x26c40e['markerName']),_0x2226f2=this['editor']['plugins']['get'](o);if(_0x2226f2['getCommentThread'](_0x41e9bf)?.['isResolved']&&_0x26c40e['item'])return _0x5e8693['consumable']['consume'](_0x26c40e['item'],'addMarker:'+_0x26c40e['markerName']),_0x5e8693['consumable']['consume'](_0x26c40e['item'],'removeMarker:'+_0x26c40e['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x43bd51=>{_0x43bd51['on']('addMarker:comment',(_0x24e32d,_0x443a4f,_0x5b5428)=>{if(!_0x5b5428['options']['showCommentHighlights'])return;const _0x10740d=_0x443a4f['item'];if(!_0x10740d)return;const _0x1f9a7b=_0x5b5428['mapper']['toViewElement'](_0x10740d);this['editor']['model']['schema']['isObject'](_0x10740d)&&_0x1f9a7b&&!_0x1f9a7b['getCustomProperty']('widget')&&_0x1f9a7b['is']('containerElement')&&_0x46b3bf(_0x1f9a7b,_0x5b5428['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x325985,{writer:_0x5b7c5c,options:_0xaab2db})=>{if(!_0xaab2db['showCommentHighlights'])return null;const _0x399772=_0x5b7c5c['createContainerElement']('div'),_0x47c2e2=_0x5b7c5c['createEmptyElement']('hr');return _0x5b7c5c['addClass']('ck-horizontal-line',_0x399772),_0x5b7c5c['insert'](_0x5b7c5c['createPositionAt'](_0x399772,0x0),_0x47c2e2),_0x399772;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x2e8ac4,{writer:_0x259be1,options:_0x590024})=>{if(!_0x590024['showCommentHighlights'])return null;const _0x3e0dad=_0x259be1['createContainerElement']('span'),_0x149881=_0x259be1['createEmptyElement']('img');return _0x259be1['addClass']('image-inline',_0x3e0dad),_0x259be1['insert'](_0x259be1['createPositionAt'](_0x3e0dad,0x0),_0x149881),_0x3e0dad;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xf5e417,{writer:_0x597adb,options:_0x47a470})=>{if(_0x47a470['showCommentHighlights'])return _0x597adb['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x58358e,_0x1a89bc,_0x2f42fd)=>{_0x2f42fd['options']['showCommentHighlights']&&_0x58358e['stop']();},{'priority':'high'});}}class r extends _0x3732d9{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xdb192){super(_0xdb192),this['set']('isThreadsLoadingPaused',!0x0),_0xdb192['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1dd8cd,_0x17c8ec,_0x9520e2,_0x220696)=>{const _0x1f83be=_0xdb192['plugins']['get'](o),_0x11781a=_0x9520e2?ft(_0x9520e2)['id']:null;_0xdb192['model']['change'](()=>{if(_0x11781a){const _0x50cd0c=this['getAllMarkersForId'](_0x11781a);for(const _0x3cebff of _0x50cd0c)_0xdb192['editing']['reconvertMarker'](_0x3cebff);}if(_0x220696){const {id:_0x98931b}=ft(_0x220696),_0x587aab=_0x1f83be['getCommentThread'](_0x98931b);if(_0x587aab&&_0x587aab['unlinkedAt'])return;if(_0x587aab&&!_0x587aab['isAttached'])return;const _0x420519=this['getAllMarkersForId'](_0x98931b);for(const _0x26f1ed of _0x420519)_0xdb192['editing']['reconvertMarker'](_0x26f1ed);}}),_0x11781a&&this['scrollToThreadMarker'](_0x11781a);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x199682=this['editor'],_0x154ec6=_0x199682['plugins']['get'](o),_0xab42bb=_0x199682['config']['get']('collaboration.channelId'),_0x10f21b=_0x154ec6['getCommentThreads']()['filter'](_0x541877=>_0x541877['channelId']!==_0xab42bb);_0x199682['commands']['add']('addCommentThread',new ot(_0x199682)),this['listenTo'](_0x199682,'change:isReadOnly',(_0x4e294b,_0x239aad,_0x388e4f)=>{_0x154ec6['switchReadOnly'](_0x388e4f,_0x199682['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x154ec6,dt('addCommentThread',_0xab42bb),(_0x1e88c8,{threadId:_0xe2efde})=>{const _0x297657=this['editor']['plugins']['get'](o)['getCommentThread'](_0xe2efde);_0x297657?.['unlinkedAt']&&this['_attachArchivedThread'](_0xe2efde);}),this['listenTo'](_0x154ec6,dt('removeCommentThread',_0xab42bb),(_0xc85ecc,{threadId:_0x4bf05b})=>{_0x199682['model']['enqueueChange']({'isUndoable':!0x1},_0x47b572=>{const _0x1e723e=this['getAllMarkersForId'](_0x4bf05b);for(const _0x48d1ed of _0x1e723e)_0x47b572['removeMarker'](_0x48d1ed);});}),this['listenTo'](_0x154ec6,dt('resolveCommentThread',_0xab42bb),(_0x5aea2d,{threadId:_0x13d8a2})=>{(this['_reconvertMarkers'](_0x13d8a2),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x13d8a2)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x154ec6,dt('reopenCommentThread',_0xab42bb),(_0x297e97,{threadId:_0x1636c3})=>{this['_reconvertMarkers'](_0x1636c3);},{'priority':'low'}),this['listenTo'](_0x154ec6,dt('addComment',_0xab42bb),(_0x540daf,{threadId:_0x2b9671,isFromAdapter:_0x5c54b1})=>{const _0x5c5257=this['getAllMarkersForId'](_0x2b9671);if(_0x5c54b1||0x0==_0x5c5257['length']||!_0x154ec6['hasCommentThread'](_0x2b9671))return;0x1===_0x154ec6['getCommentThread'](_0x2b9671)['length']&&_0x199682['model']['enqueueChange']({'isUndoable':!0x1},_0x1cac3e=>{for(const _0x3eda8e of _0x5c5257)_0x1cac3e['updateMarker'](_0x3eda8e,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x10f21b);}['afterInit'](){!async function(_0x363ae0){const _0x1f7ce9=_0x2dd28b([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x3e028e=0x73460ab3,_0x1632c8=0x734170d3^_0x3e028e,_0x2dca6f=window[_0x2dd28b([0x44,0x61,0x74,0x65])][_0x2dd28b([0x6e,0x6f,0x77])](),_0x4c4828=_0x363ae0[_0x2dd28b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2cdf93=new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10de62=>{_0x4c4828[_0x2dd28b([0x6f,0x6e,0x63,0x65])](_0x2dd28b([0x72,0x65,0x61,0x64,0x79]),_0x10de62);}),_0x3be36d={[_0x2dd28b([0x6b,0x74,0x79])]:_0x2dd28b([0x45,0x43]),[_0x2dd28b([0x75,0x73,0x65])]:_0x2dd28b([0x73,0x69,0x67]),[_0x2dd28b([0x63,0x72,0x76])]:_0x2dd28b([0x50,0x2d,0x32,0x35,0x36]),[_0x2dd28b([0x78])]:_0x2dd28b([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]),[_0x2dd28b([0x79])]:_0x2dd28b([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]),[_0x2dd28b([0x61,0x6c,0x67])]:_0x2dd28b([0x45,0x53,0x32,0x35,0x36])},_0x5506c0=_0x4c4828[_0x2dd28b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2dd28b([0x67,0x65,0x74])](_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x18ac9a(){let _0x296438,_0x566c58=null,_0x295882=null;try{if(_0x5506c0==_0x2dd28b([0x47,0x50,0x4c]))return _0x2dd28b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x296438=_0x21c29b(),!_0x296438)return _0x2dd28b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x296438[_0x2dd28b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x295882=_0x35ea6a(_0x296438[_0x2dd28b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x296438[_0x2dd28b([0x6a,0x74,0x69])])),await _0x206fa7()?_0x525d68()?_0x438372()?_0x2dd28b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5ce111()?(_0x296438[_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dd28b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x566c58=_0xa15a63(_0x2dd28b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x296438[_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2dd28b([0x74,0x72,0x69,0x61,0x6c])&&(_0x566c58=_0xa15a63(_0x2dd28b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x30d58d()):_0x2dd28b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2dd28b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2dd28b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x2dd28b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x438372(){const _0x4c283f=[_0x2dd28b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2dd28b([0x74,0x72,0x69,0x61,0x6c])][_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x296438[_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x2dca6f/0x3e8:0xe10*_0x1632c8;return _0x296438[_0x2dd28b([0x65,0x78,0x70])]<_0x4c283f;}function _0x525d68(){const _0x31cc87=_0x296438[_0x2dd28b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x31cc87)return!0x1;if(_0x31cc87[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x2a])))return!0x0;if(_0x31cc87[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x43,0x4d,0x54])))return!0x0;if(_0x31cc87[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x5e416d())return!0x0;if(_0x31cc87[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x52,0x43,0x4d,0x54]))){if(_0x1c731e())return!0x0;if(_0xd21f67()||_0x30837a())return!0x0;}return!0x1;}function _0x5ce111(){const _0x3a1c0a=_0x296438[_0x2dd28b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3a1c0a||0x0==_0x3a1c0a[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5dd372}=new URL(window[_0x2dd28b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3a1c0a[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5dd372))return!0x0;const _0x3ff293=_0x5dd372[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])](_0x2dd28b([0x2e]));return _0x3a1c0a[_0x2dd28b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x373078=>_0x373078[_0x2dd28b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2dd28b([0x2a])))[_0x2dd28b([0x6d,0x61,0x70])](_0x147787=>_0x147787[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])](_0x2dd28b([0x2e])))[_0x2dd28b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x47dbb6=>_0x47dbb6[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3ff293[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2dd28b([0x6d,0x61,0x70])](_0x17fe3c=>Array(_0x3ff293[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x17fe3c[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x2dd28b([0x66,0x69,0x6c,0x6c])](_0x17fe3c[0x0]===_0x2dd28b([0x2a])?_0x2dd28b([0x2a]):'')[_0x2dd28b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x17fe3c))[_0x2dd28b([0x73,0x6f,0x6d,0x65])](_0x31e0cd=>_0x3ff293[_0x2dd28b([0x65,0x76,0x65,0x72,0x79])]((_0x40001c,_0x5067fc)=>_0x31e0cd[_0x5067fc]===_0x40001c||_0x31e0cd[_0x5067fc]===_0x2dd28b([0x2a])));}function _0x30d58d(){return _0x566c58&&_0x295882?new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5b042e,_0x425a28)=>{_0x566c58[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0x5b042e,_0x425a28),_0x295882[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0xfbf95a=>{_0xfbf95a!=_0x2dd28b([0x56,0x61,0x6c,0x69,0x64])&&_0x5b042e(_0xfbf95a);},_0x425a28);}):_0x566c58||_0x295882||_0x2dd28b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x35ea6a(_0x17d8d8,_0x57e8e7){return new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb857a=>{if(_0x2b994a())return _0xb857a(_0x2dd28b([0x56,0x61,0x6c,0x69,0x64]));_0x4cdaf7(),_0x4c4828[_0x2dd28b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2dd28b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x23b672=!0x1;const _0x483b0d=_0x1684c5();function _0x202dc7(_0xb6dbb5){return!!_0xb6dbb5&&(typeof _0xb6dbb5===_0x2dd28b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xb6dbb5===_0x2dd28b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xb6dbb5[_0x2dd28b([0x74,0x68,0x65,0x6e])]===_0x2dd28b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xb6dbb5[_0x2dd28b([0x63,0x61,0x74,0x63,0x68])]===_0x2dd28b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x347495(_0x44a5a0){_0x269c3c(_0x44a5a0)[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0x588776=>{if(!_0x588776||_0x588776[_0x2dd28b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2dd28b([0x6f,0x6b]))return _0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4671b1(_0x2de16f(_0x483b0d+_0x57e8e7))!=_0x588776[_0x2dd28b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2dd28b([0x56,0x61,0x6c,0x69,0x64]);})[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0x7e8926=>(_0x367690(),_0x7e8926),()=>{const _0x56bfec=_0x2e9a94();return null==_0x56bfec?(_0x367690(),_0x2dd28b([0x56,0x61,0x6c,0x69,0x64])):_0x2dd28b(_0x2dca6f-_0x56bfec>(0x574a8eb3^_0x3e028e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0xb857a)[_0x2dd28b([0x63,0x61,0x74,0x63,0x68])](()=>{_0xb857a(_0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xbacc69=0x7370e433^_0x3e028e;function _0x367690(){const _0x35b6a5=_0x2dd28b([0x6c,0x6c,0x63,0x74,0x2d])+_0x4671b1(_0x2de16f(_0x17d8d8)),_0x4715e8=_0x349ab7(_0x4671b1(window[_0x2dd28b([0x4d,0x61,0x74,0x68])][_0x2dd28b([0x63,0x65,0x69,0x6c])](_0x2dca6f/_0xbacc69)));window[_0x2dd28b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dd28b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x35b6a5,_0x4715e8);}function _0x2e9a94(){const _0x2e4d46=_0x2dd28b([0x6c,0x6c,0x63,0x74,0x2d])+_0x4671b1(_0x2de16f(_0x17d8d8)),_0x1bf631=window[_0x2dd28b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2dd28b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2e4d46);return _0x1bf631?window[_0x2dd28b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x349ab7(_0x1bf631),0x10)*_0xbacc69:null;}function _0x269c3c(_0x183a21){return new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x42d2c4,_0x11549f)=>{_0x183a21[_0x2dd28b([0x74,0x68,0x65,0x6e])](_0x42d2c4,_0x11549f),window[_0x2dd28b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x11549f,0x7347de73^_0x3e028e);});}}_0x4c4828[_0x2dd28b([0x6f,0x6e])](_0x2dd28b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x34a67f,_0x1c7693)=>{if(_0x1c7693[0x0]!=_0x17d8d8)return _0xb857a(_0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1c7693[0x1]={..._0x1c7693[0x1],[_0x2dd28b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x483b0d};},{[_0x2dd28b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dd28b([0x68,0x69,0x67,0x68])}),_0x4c4828[_0x2dd28b([0x6f,0x6e])](_0x2dd28b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x58a4c3=>{_0x202dc7(_0x58a4c3[_0x2dd28b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x23b672=!0x0,_0x347495(_0x58a4c3[_0x2dd28b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2dd28b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2dd28b([0x6c,0x6f,0x77])}),_0x2cdf93[_0x2dd28b([0x74,0x68,0x65,0x6e])](()=>{_0x23b672||_0xb857a(_0x2dd28b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x2b994a(){return _0x4c4828[_0x2dd28b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dd28b([0x76,0x69,0x65,0x77])][_0x2dd28b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2dd28b([0x61,0x75,0x74,0x6f]);}function _0x4cdaf7(){_0x4c4828[_0x2dd28b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2dd28b([0x76,0x69,0x65,0x77])][_0x2dd28b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2dd28b([0x61,0x75,0x74,0x6f]);}}function _0xa15a63(_0xb5366){const _0x556348=[new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d79c0=>setTimeout(_0x4d79c0,0x734f347f^_0x3e028e)),_0x2cdf93[_0x2dd28b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f6756=>{let _0x2a1ba5=0x0;_0x4c4828[_0x2dd28b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dd28b([0x6f,0x6e])](_0x2dd28b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4788df,_0x30558e)=>{_0x30558e[0x0][_0x2dd28b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2a1ba5++,_0x2a1ba5==(0x73460b4b^_0x3e028e)&&(_0x2f6756(),_0x4788df[_0x2dd28b([0x6f,0x66,0x66])]());});}))];return window[_0x2dd28b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2dd28b([0x72,0x61,0x63,0x65])](_0x556348)[_0x2dd28b([0x74,0x68,0x65,0x6e])](()=>_0xb5366);}async function _0x3472b5(){await _0x2cdf93,_0x4c4828[_0x2dd28b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dd28b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2e2fec,_0x4c4828[_0x2dd28b([0x6d,0x6f,0x64,0x65,0x6c])][_0x2dd28b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2e2fec,_0x4c4828[_0x2dd28b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2dd28b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5e416d(){return window[_0x2dd28b([0x67,0x6c,0x6f,0x62])]&&window[_0x2dd28b([0x67,0x6c,0x6f,0x62])][_0x2dd28b([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x1c731e(){return _0x2ec815(_0x2dd28b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x124407(_0x2dd28b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2dd28b([0x73,0x74,0x61,0x74,0x65])]==_0x2dd28b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xd21f67(){return _0x2ec815(_0x2dd28b([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 _0x30837a(){return _0x2ec815(_0x2dd28b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x25da3c(_0x43e74e){const _0xc0ad9d=_0x30daef();_0x4c4828[_0xc0ad9d]=_0x2dd28b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x43e74e,_0x43e74e!=_0x2dd28b([0x56,0x61,0x6c,0x69,0x64])&&_0x3472b5();}function _0x30daef(){const _0x49c091=window[_0x2dd28b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2dd28b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2dd28b([0x6e,0x6f,0x77])]())[_0x2dd28b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2dd28b([0x2e]),'');let _0x5615ea=_0x2dd28b([0x4b]);for(let _0xbb91e7=0x0;_0xbb91e7<_0x49c091[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xbb91e7+=0x2){let _0x5d5bd2=window[_0x2dd28b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x49c091[_0x2dd28b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xbb91e7,_0xbb91e7+0x2));_0x5d5bd2>=_0x1f7ce9[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x5d5bd2-=_0x1f7ce9[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5615ea+=_0x1f7ce9[_0x5d5bd2];}return _0x5615ea;}function _0x21c29b(){const _0x27d967=_0x5506c0[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])](_0x2dd28b([0x2e]));if(0x3!=_0x27d967[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x68f0c1(_0x27d967[0x1]);function _0x68f0c1(_0x4a28de){const _0x4bb004=_0x22c2b5(_0x4a28de);return _0x4bb004&&_0x2b35b4()?_0x4bb004:null;function _0x2b35b4(){const _0x46f7b1=_0x4bb004[_0x2dd28b([0x6a,0x74,0x69])],_0x15c9d2=window[_0x2dd28b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x46f7b1[_0x2dd28b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x46f7b1[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x400379={..._0x4bb004,[_0x2dd28b([0x6a,0x74,0x69])]:_0x46f7b1[_0x2dd28b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x46f7b1[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x400379[_0x2dd28b([0x76,0x63])],_0x2de16f(_0x400379)==_0x15c9d2;}}}async function _0x206fa7(){let _0x2d561f=!0x0;try{const _0x1e32da=_0x5506c0[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])](_0x2dd28b([0x2e])),[_0x13c6ff,_0x5b9664,_0x550bb3]=_0x1e32da;return _0x1f2e0e(_0x13c6ff),await _0x1c29f0(_0x13c6ff,_0x5b9664,_0x550bb3),_0x2d561f;}catch{return!0x1;}function _0x1f2e0e(_0x272888){const _0x1d1047=_0x22c2b5(_0x272888);_0x1d1047&&_0x1d1047[_0x2dd28b([0x61,0x6c,0x67])]==_0x2dd28b([0x45,0x53,0x32,0x35,0x36])||(_0x2d561f=!0x1);}async function _0x1c29f0(_0x54ceb5,_0x3b7483,_0x3446b0){const _0x3ec528=window[_0x2dd28b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2dd28b([0x66,0x72,0x6f,0x6d])](_0x5e9424(_0x3446b0),_0x584c59=>_0x584c59[_0x2dd28b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x9b0251=new window[(_0x2dd28b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2dd28b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x54ceb5+_0x2dd28b([0x2e])+_0x3b7483),_0x37599b=window[_0x2dd28b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2dd28b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x37599b)return;const _0x29b32f=await _0x37599b[_0x2dd28b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2dd28b([0x6a,0x77,0x6b]),_0x3be36d,{[_0x2dd28b([0x6e,0x61,0x6d,0x65])]:_0x2dd28b([0x45,0x43,0x44,0x53,0x41]),[_0x2dd28b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2dd28b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2dd28b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x37599b[_0x2dd28b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2dd28b([0x6e,0x61,0x6d,0x65])]:_0x2dd28b([0x45,0x43,0x44,0x53,0x41]),[_0x2dd28b([0x68,0x61,0x73,0x68])]:{[_0x2dd28b([0x6e,0x61,0x6d,0x65])]:_0x2dd28b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x29b32f,_0x3ec528,_0x9b0251)||(_0x2d561f=!0x1);}}function _0x22c2b5(_0x5aa52f){return _0x5aa52f[_0x2dd28b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2dd28b([0x65,0x79]))?JSON[_0x2dd28b([0x70,0x61,0x72,0x73,0x65])](_0x5e9424(_0x5aa52f)):null;}function _0x5e9424(_0x59a0f4){return window[_0x2dd28b([0x61,0x74,0x6f,0x62])](_0x59a0f4[_0x2dd28b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2dd28b([0x2b]))[_0x2dd28b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2dd28b([0x2f])));}function _0x2de16f(_0x186885){let _0x8dba=0x1505;function _0x52ea8(_0x1e472e){for(let _0xd6a47c=0x0;_0xd6a47c<_0x1e472e[_0x2dd28b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xd6a47c++){const _0x1a7e69=_0x1e472e[_0x2dd28b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xd6a47c);_0x8dba=(_0x8dba<<0x5)+_0x8dba+_0x1a7e69,_0x8dba&=_0x8dba;}}function _0x1623b1(_0x572344){Array[_0x2dd28b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x572344)?_0x572344[_0x2dd28b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1623b1):_0x572344&&typeof _0x572344==_0x2dd28b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2dd28b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x572344)[_0x2dd28b([0x73,0x6f,0x72,0x74])]()[_0x2dd28b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x208cfa,_0x5ccb7c])=>{_0x52ea8(_0x208cfa),_0x1623b1(_0x5ccb7c);}):_0x52ea8(window[_0x2dd28b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x572344));}return _0x1623b1(_0x186885),_0x8dba>>>0x0;}function _0x4671b1(_0x5464aa){return _0x5464aa[_0x2dd28b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2dd28b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2dd28b([0x30]));}function _0x349ab7(_0x30cb6e){return _0x30cb6e[_0x2dd28b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2dd28b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2dd28b([0x6a,0x6f,0x69,0x6e])]('');}function _0x2ec815(_0x1d3845){return _0x4c4828[_0x2dd28b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2dd28b([0x68,0x61,0x73])](_0x1d3845);}function _0x124407(_0x23fe39){return _0x4c4828[_0x2dd28b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2dd28b([0x67,0x65,0x74])](_0x23fe39);}function _0x2e2fec(){}function _0x2dd28b(_0x3b031f){return _0x3b031f['map'](_0x543abc=>String['fromCharCode'](_0x543abc))['join']('');}_0x25da3c(await _0x18ac9a());}(this);}['destroy'](){const _0x3f9a02=this['editor']['plugins']['get'](o),_0x40db8d=this['editor']['config']['get']('collaboration.channelId');for(const _0x56689a of _0x3f9a02['getCommentThreads']({'channelId':_0x40db8d}))_0x3f9a02['_detachCommentThread'](_0x56689a['id']),_0x3f9a02['_threads']['delete'](_0x56689a['id']);super['destroy']();}['hasMarkerForId'](_0xfbdba3){return this['getAllMarkersForId'](_0xfbdba3)['length']>0x0;}['getAllMarkersForId'](_0x314f0c){const _0x304ab0=[];for(const _0x12cb22 of this['editor']['model']['markers'])_0x12cb22['name']['startsWith']('comment:'+_0x314f0c)&&_0x304ab0['push'](_0x12cb22);return _0x304ab0;}['scrollToThreadMarker'](_0x5492b1){setTimeout(()=>{const _0x387dab=this['_getTargetForId'](_0x5492b1);if(!_0x387dab)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5492b1&&nt({'target':_0x387dab[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2cac90){this['editor']['model']['change'](()=>{for(const _0x50229f of this['getAllMarkersForId'](_0x2cac90))this['editor']['editing']['reconvertMarker'](_0x50229f);});}['_attachArchivedThread'](_0x4e8741){const _0x269276=this['editor']['plugins']['get'](o),_0x480f69=this['editor']['plugins']['get'](b),_0x10b0ef=_0x269276['getCommentThread'](_0x4e8741);if(!_0x10b0ef['isAttached']){const _0x2a8e05=_0x10b0ef['attachTo'](()=>this['_getTargetForId'](_0x10b0ef['id']));_0x480f69['registerAnnotation'](_0x2a8e05),_0x10b0ef['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x287250=this['editor'],_0x348e59=_0x287250['plugins']['get'](it);_0x287250['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3461e4,_0xedeb3a)=>{const {id:_0x5ebd16}=ft(_0x3461e4['markerName']),_0x5d4210=_0x287250['plugins']['get'](o)['getCommentThread'](_0x5ebd16),_0x282a1a=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5ebd16;let _0x2985ed;if(_0x5d4210&&_0x5d4210['isResolved']&&!_0x282a1a&&_0x3461e4['item'])return _0xedeb3a['consumable']['consume'](_0x3461e4['item'],'addMarker:'+_0x3461e4['markerName']),_0xedeb3a['consumable']['consume'](_0x3461e4['item'],'removeMarker:'+_0x3461e4['markerName']),null;const _0x54fea1=['ck-comment-marker'];return _0x282a1a&&_0x54fea1['push']('ck-comment-marker--active'),_0x2985ed=_0x5d4210?.['length']?_0x5d4210['comments']['first']['author']['id']:_0x348e59['me']['id'],{'classes':_0x54fea1,'attributes':{'data-comment':_0x5ebd16,'data-author-id':_0x2985ed}};}}),_0x287250['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x682cf9,{options:_0x33f253})=>{if(_0x33f253['showCommentHighlights'])return null;const _0x246075=_0x287250['plugins']['get'](o),_0x5a14a9=_0x287250['model']['markers']['get'](_0x682cf9),{id:_0x3c187a,part:_0x19c428}=ft(_0x682cf9);return _0x5a14a9&&!_0x5a14a9['affectsData']||_0x33f253['ignoreResolvedComments']&&_0x246075['getCommentThread'](_0x3c187a)?.['isResolved']?null:{'group':'comment','name':_0x19c428?_0x3c187a+':'+_0x19c428:_0x3c187a};}}),_0x287250['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2aa2ed,{writer:_0x4621e5})=>_0x4621e5['createElement']('$marker',{'data-name':'comment:'+_0x2aa2ed['getAttribute']('id')})}),_0x287250['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x320193=this['editor'],_0x3333eb=_0x320193['plugins']['get'](o),_0x481ee1=new Set(),_0x4bc1a5=new Set();_0x320193['model']['document']['registerPostFixer'](_0xbf72b7=>{let _0x47e8e2=!0x1;for(const {name:_0x1ae8c4,data:_0x47092d}of _0x320193['model']['document']['differ']['getChangedMarkers']()){const {group:_0x43415f,id:_0x46471}=ft(_0x1ae8c4);let _0x38f80d=_0x47092d['newRange'];if('comment'!==_0x43415f||!_0x38f80d)continue;const _0x495565='$graveyard'===_0x38f80d['root']['rootName'];_0x495565||(_0x38f80d=ht(_0x38f80d,_0x320193['model']),!_0x38f80d||_0x38f80d['isCollapsed']||!_0x47092d['newRange']||_0x38f80d['isEqual'](_0x47092d['newRange']))?_0x320193['model']['hasContent'](_0x38f80d)&&!_0x495565?this['isThreadsLoadingPaused']?_0x481ee1['add'](_0x1ae8c4):this['_handleThreadMarker'](_0x1ae8c4,_0x46471):(_0x4bc1a5['add'](_0x1ae8c4),_0x481ee1['delete'](_0x1ae8c4),_0xbf72b7['removeMarker'](_0x1ae8c4),_0x47e8e2=!0x0):(_0xbf72b7['updateMarker'](_0x1ae8c4,{'range':_0x38f80d}),_0x47e8e2=!0x0);}return _0x47e8e2;}),this['on']('change:isThreadsLoadingPaused',(_0x55a96f,_0xf0e647,_0x22eba9)=>{if(!_0x22eba9&&_0x481ee1['size'])for(const _0x5b8d39 of _0x481ee1){const {id:_0x1deb14}=ft(_0x5b8d39);_0x481ee1['delete'](_0x5b8d39),_0x320193['model']['markers']['get'](_0x5b8d39)&&this['_handleThreadMarker'](_0x5b8d39,_0x1deb14);}}),this['listenTo'](_0x320193['model']['document'],'change',()=>{for(const {name:_0x1f0338,data:{newRange:_0x2490c5}}of _0x320193['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3188ff,id:_0x2391a6}=ft(_0x1f0338);if('comment'!==_0x3188ff)continue;const _0x37bb44=_0x3333eb['getCommentThread'](_0x2391a6),_0x4d32a7=this['hasMarkerForId'](_0x2391a6);_0x37bb44&&(!_0x37bb44['_hasTargetInContent']&&_0x2490c5&&_0x320193['editing']['view']['once']('render',()=>{const _0x402ec6=_0x320193['plugins']['get'](y),_0x309ffb=_0x3333eb['_threadToController']['get'](_0x37bb44)['view'];_0x402ec6['getByInnerView'](_0x309ffb)['refreshVisibility']();},{'priority':'low'}),_0x37bb44['_hasTargetInContent']=_0x4d32a7||!!_0x2490c5),_0x2490c5||(_0x4bc1a5['add'](_0x1f0338),_0x481ee1['delete'](_0x1f0338));}for(const _0x9c9af8 of _0x4bc1a5){const {id:_0x3f297a}=ft(_0x9c9af8),_0x41b065=_0x3333eb['getCommentThread'](_0x3f297a);if(_0x481ee1['delete'](_0x9c9af8),!_0x41b065)continue;const _0x487af7=this['hasMarkerForId'](_0x3f297a);_0x487af7||_0x41b065['isSubmitted']?_0x487af7||_0x41b065['unlinkedAt']||_0x41b065['setUnlinkedAt'](new Date()):_0x41b065['remove']();}_0x4bc1a5['clear']();});}['_handleInitialThreads'](_0x28fd6f){_0x28fd6f['forEach'](_0x3625a9=>{_0x3625a9['unlinkedAt']&&this['_attachArchivedThread'](_0x3625a9['id']);});}['_getTargetForId'](_0x2d27e3){const _0x1a6b1a=this['editor'],_0x75b36d=this['getAllMarkersForId'](_0x2d27e3);return et(_0x1a6b1a['editing'],_0x75b36d);}['_getTextContext'](_0x4ec770){const _0x11db6e=this['getAllMarkersForId'](_0x4ec770);let _0x4229a5='',_0x6e9c20=!0x1;for(const _0x411c60 of _0x11db6e){const _0x5d8ab1=_0x411c60['getRange']();for(const _0x16804c of Array['from'](_0x5d8ab1['getItems']()))_0x16804c['is']('$textProxy')?(_0x4229a5&&_0x6e9c20&&(_0x4229a5+='\x20',_0x6e9c20=!0x1),_0x4229a5+=_0x16804c['data']):_0x6e9c20=!0x0;_0x6e9c20=!0x0;}return _0x4229a5['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x46e61f,_0x17e567){const _0x4f9715=this['editor'],_0x4a80e9=_0x4f9715['plugins']['get'](o);let _0x2c4928=_0x4a80e9['getCommentThread'](_0x17e567);const _0xbe414d=_0x4f9715['config']['get']('collaboration.channelId'),_0x46b9b7=_0x4f9715['plugins']['get'](b);if(_0x2c4928&&(_0x2c4928['unlinkedAt']&&_0x2c4928['setUnlinkedAt'](null),_0x2c4928['isAttached']))return _0x2c4928;return!this['getAllMarkersForId'](_0x17e567)[0x0]['managedUsingOperations']?_0x4f9715['editing']['view']['once']('render',()=>{if(_0x4a80e9['getCommentThread'](_0x17e567))return;const _0x3176d1=_0x4f9715['plugins']['get'](y);_0x2c4928=_0x4a80e9['openNewCommentThread']({'channelId':_0xbe414d,'threadId':_0x17e567,'target':()=>this['_getTargetForId'](_0x17e567),'context':{'type':'text','value':this['_getTextContext'](_0x17e567)}});const _0x3e8e72=_0x4a80e9['_threadToController']['get'](_0x2c4928)['view'],_0x8c4868=_0x3176d1['getByInnerView'](_0x3e8e72);_0x8c4868&&_0x46b9b7['registerAnnotation'](_0x8c4868);},{'priority':'low'}):_0x4a80e9['fetchCommentThread']({'channelId':_0xbe414d,'threadId':_0x17e567})['then'](_0x4a528a=>{if('destroyed'!==_0x4f9715['state']){if(_0x2c4928=_0x4a528a,_0x2c4928&&!_0x2c4928['isAttached']){const _0x22516a=_0x2c4928['attachTo'](()=>this['_getTargetForId'](_0x17e567));_0x46b9b7['registerAnnotation'](_0x22516a),_0x2c4928['isResolved']&&this['_reconvertMarkers'](_0x17e567);}else{if(!_0x2c4928){const _0x2e4f66=this['getAllMarkersForId'](_0x17e567);_0x4f9715['model']['change'](_0x141f3d=>{for(const _0x4b0565 of _0x2e4f66)_0x141f3d['removeMarker'](_0x4b0565);});}}}}),_0x2c4928;}['_handleThreadMarker'](_0x433b82,_0x3045e3){const _0x5f158a=this['_attachMarkerToThread'](_0x433b82,_0x3045e3);_0x5f158a&&!_0x5f158a['context']&&_0x5f158a['setContext']({'type':'text','value':this['_getTextContext'](_0x3045e3)});}['_initAriaMarkerChangeAnnouncements'](){const _0x5cd4d4=this['editor'];rt(_0x5cd4d4['model'],({left:_0x139fe3,entered:_0x24cbe7})=>{for(const _0x230388 of _0x139fe3)if(mt(_0x230388)){_0x5cd4d4['ui']['ariaLiveAnnouncer']['announce'](N(_0x5cd4d4['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x33e2ac of _0x24cbe7)if(mt(_0x33e2ac)){_0x5cd4d4['ui']['ariaLiveAnnouncer']['announce'](N(_0x5cd4d4['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x333141)));break;}});}}function dt(_0x155075,_0x1bcc1a){return _0x1bcc1a?_0x155075+':'+_0x1bcc1a:_0x155075;}function ht(_0x34c578,_0x185632){const _0xa1c423=_0x185632['schema'],_0x333c35=_0x185632['createRange'](_0x34c578['start']);for(const _0x591994 of _0x34c578['getWalker']()){const {type:_0x54bf38,item:_0x59d5ff,nextPosition:_0x47d9c2}=_0x591994;if('text'===_0x54bf38||_0xa1c423['isObject'](_0x59d5ff)){const _0x14cb7c=_0x185632['createPositionBefore'](_0x59d5ff);_0x333c35['isCollapsed']&&(_0x333c35['start']=_0x14cb7c),_0x333c35['end']=_0x47d9c2;}}return _0x333c35;}function mt(_0x45dd05){return'comment'===ft(_0x45dd05['name'])['group'];}class s extends _0x3732d9{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x19d357=this['editor'],_0x4c58cb=_0x19d357['plugins']['get'](o),_0x356c9e=_0x19d357['plugins']['get'](r),_0x24bf37=_0x19d357['plugins']['get'](y),_0x47f87c=_0x19d357['plugins']['get'](b);_0x19d357['ui']['componentFactory']['add']('comment',()=>{const _0x15bff9=this['_createUIButton'](_0x222733);return _0x15bff9['tooltip']=!0x0,_0x15bff9;}),_0x19d357['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x59a680)),_0x47f87c['addSourceCollector'](()=>{const _0x181765=[];for(const [_0x185779,_0x293ce3]of _0x4c58cb['_threadToController']){const _0xe003f4=_0x356c9e['getAllMarkersForId'](_0x185779['id']),_0x177f57=_0xe003f4['map'](_0x2bc304=>_0x2bc304['getRange']());_0xe003f4['length']>0x0&&_0x181765['push']([_0x293ce3['view'],_0x177f57]);}return _0x181765;}),this['listenTo'](_0x24bf37,'change:activeAnnotations',(_0x3a0582,_0x3e8dce,_0x1d6d98)=>{const _0x169dcd=Array['from'](_0x1d6d98)['map'](_0x5ca93f=>_0x5ca93f['innerView'])['find'](_0xac4f00=>_0x4c58cb['_viewToController']['has'](_0xac4f00));if(!_0x169dcd)return void(_0x356c9e['activeMarker']=null);const _0x237a7c=_0x4c58cb['_viewToController']['get'](_0x169dcd)['model']['id'],_0x463d6f='comment:'+_0x237a7c;_0x237a7c&&_0x356c9e['hasMarkerForId'](_0x237a7c)?_0x356c9e['activeMarker']=_0x463d6f:_0x356c9e['activeMarker']&&(_0x356c9e['activeMarker']=null);}),this['listenTo'](_0x4c58cb,'removeCommentThread',(_0x1fa112,{threadId:_0x4f951b,isFromAdapter:_0x3ec240})=>{!_0x3ec240&&_0x19d357['ui']['focusTracker']['isFocused']&&_0x356c9e['hasMarkerForId'](_0x4f951b)&&_0x19d357['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4c58cb,'addComment',(_0x586a41,{threadId:_0x4c3c02,isFromAdapter:_0x352042})=>{if(_0x352042||!_0x356c9e['hasMarkerForId'](_0x4c3c02)||!_0x4c58cb['hasCommentThread'](_0x4c3c02))return;0x1===_0x4c58cb['getCommentThread'](_0x4c3c02)['length']&&(_0x19d357['editing']['view']['focus'](),_0x586a41['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2c12d1=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x2dfe02;for(const _0x1d0077 in _0x2c12d1){const _0x104ef4=_0x1d0077,_0x3f605c=_0x2c12d1[_0x104ef4];if('commentsLicenseKeyValid'==_0x3f605c||'commentsLicenseKeyInvalid'==_0x3f605c||'commentsLicenseKeyExpired'==_0x3f605c||'commentsLicenseKeyDomainLimit'==_0x3f605c||'commentsLicenseKeyNotAllowed'==_0x3f605c||'commentsLicenseKeyEvaluationLimit'==_0x3f605c||'commentsLicenseKeyTrialLimit'==_0x3f605c||'commentsLicenseKeyUsageLimit'==_0x3f605c){delete _0x2c12d1[_0x104ef4],_0x2dfe02=_0x3f605c,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x2dfe02&&_0x2c12d1['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x424f7f){const _0x5f3db6=this['editor'],_0x579021=new _0x424f7f(_0x5f3db6['locale']),_0x5be39b=_0x5f3db6['commands']['get']('addCommentThread');return _0x579021['set']({'label':N(_0x5f3db6['locale'],'Comment'),'icon':_0x10df15}),_0x579021['bind']('isEnabled')['to'](_0x5be39b,'isEnabled',_0x5be39b,'hasContent',(_0x409c77,_0x3f3057)=>_0x409c77&&_0x3f3057),this['listenTo'](_0x579021,'execute',()=>{_0x5be39b['execute']();}),_0x579021;}}class i extends _0x3732d9{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x9063f1){super(_0x9063f1),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x324aca,_0x26704b,_0x1a36ae)=>{_0x1a36ae?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x5f5416,_0x32aa15]of this['editor']['commands'])_0x32aa15['affectsData']&&'addCommentThread'!==_0x5f5416&&_0x32aa15['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x305b42=this['editor']['editing']['view']['document'];this['listenTo'](_0x305b42,'cut',_0x49fa51=>_0x49fa51['stop'](),{'priority':'highest'}),this['listenTo'](_0x305b42,'clipboardInput',_0x1fa567=>_0x1fa567['stop'](),{'priority':'highest'}),this['listenTo'](_0x305b42,'delete',_0x3eaeac=>_0x3eaeac['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x229457,_0x4016e7]of this['editor']['commands'])_0x4016e7['affectsData']&&'addCommentThread'!==_0x229457&&_0x4016e7['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x35dfc2{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35f59b){super(_0x35f59b),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x14f506=this['context']['plugins']['get'](y);this['listenTo'](_0x14f506,'_activateAnnotation',(_0x45f1fc,_0x57c65d)=>{for(const _0x4cb4fd of this['activeUIs']){const _0x535573=this['_uis']['get'](_0x4cb4fd);(0x0,this['uisData']['get'](_0x4cb4fd)['filter'])(_0x57c65d)&&_0x535573['setActiveAnnotation'](_0x57c65d);}}),this['listenTo'](_0x14f506,'_deactivateAllAnnotations',()=>{for(const _0x4af139 of this['activeUIs']){this['_uis']['get'](_0x4af139)['setActiveAnnotation'](null);}}),this['listenTo'](_0x14f506['_visibleAnnotations'],'add',(_0x4f6d45,_0x4b53aa)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4b53aa);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x422b12){return this['activeUIs']['has'](_0x422b12);}['activate'](_0x616c65,_0x455aec=this['defaultFilter']){const _0x3a9e39=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x616c65))throw new _0x29e429('annotationsuis-missing-ui',this,{'uiName':_0x616c65});this['isActive'](_0x616c65)&&this['deactivate'](_0x616c65),this['activeUIs']['add'](_0x616c65);const _0x3bdc33=new S();v({'source':_0x3a9e39['_visibleAnnotations'],'target':_0x3bdc33,'filter':_0x455aec}),this['uisData']['set'](_0x616c65,{'collection':_0x3bdc33,'filter':_0x455aec});const _0x24b200=this['_uis']['get'](_0x616c65);_0x24b200['attach'](_0x3bdc33),this['listenTo'](_0x24b200,'change:activeAnnotation',(_0x24ba0b,_0x5cd1b9,_0x25ec7e,_0x489c8d)=>{_0x489c8d&&_0x3a9e39['_removeActiveAnnotation'](_0x489c8d),_0x25ec7e&&_0x3a9e39['_addActiveAnnotation'](_0x25ec7e);});}['deactivate'](_0x5b3ef3){if(this['activeUIs']['delete'](_0x5b3ef3),!this['_uis']['has'](_0x5b3ef3))throw new _0x29e429('annotationsuis-missing-ui',this,{'uiName':_0x5b3ef3});const _0x2d9cf9=this['_uis']['get'](_0x5b3ef3);_0x2d9cf9['detach'](),this['stopListening'](_0x2d9cf9),this['uisData']['get'](_0x5b3ef3)['collection']['destroy'](),this['uisData']['delete'](_0x5b3ef3);}['switchTo'](_0xb00135){if(!this['_uis']['has'](_0xb00135))throw new _0x29e429('annotationsuis-missing-ui',this,{'uiName':_0xb00135});const _0x33fa37=this['context']['plugins']['get'](y),_0x552023=Array['from'](_0x33fa37['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xb00135);const _0x3ab45e=this['_uis']['get'](_0xb00135);_0x3ab45e['setActiveAnnotation'](_0x552023),_0x3ab45e['_setSelectedAnnotations']&&_0x552023&&_0x3ab45e['_setSelectedAnnotations']([_0x552023]);}['deactivateAll'](){for(const _0x3ea0df of this['activeUIs'])this['deactivate'](_0x3ea0df);}['register'](_0x3985ec,_0x28aa54){if(this['_uis']['has'](_0x3985ec))throw new _0x29e429('annotationsuis-register-already-registered');if('function'!=typeof _0x28aa54['attach']||'function'!=typeof _0x28aa54['detach']||'function'!=typeof _0x28aa54['setActiveAnnotation'])throw new _0x29e429('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3985ec,_0x28aa54);}['refilterAnnotations'](){const _0x1f1934=this['context']['plugins']['get'](y)['collection'],_0x56c86d=new Map(),_0x5a2c7c=Array['from'](this['activeUIs']);for(const _0x29be84 of this['activeUIs']){const _0x40a6fb=this['uisData']['get'](_0x29be84)['collection'];for(const _0x2b159a of _0x40a6fb)_0x56c86d['set'](_0x2b159a,_0x29be84);}for(const _0x20d6db of _0x1f1934){const _0xad8db2=_0x56c86d['get'](_0x20d6db);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x20d6db);const _0x176ef3=_0x5a2c7c['find'](_0x3ba540=>this['uisData']['get'](_0x3ba540)['filter'](_0x20d6db));_0xad8db2!==_0x176ef3&&(_0xad8db2&&this['uisData']['get'](_0xad8db2)['collection']['remove'](_0x20d6db),_0x176ef3&&this['uisData']['get'](_0x176ef3)['collection']['add'](_0x20d6db));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4a37bc){const _0x1be069=[];for(const _0x710338 of this['activeUIs']){(0x0,this['uisData']['get'](_0x710338)['filter'])(_0x4a37bc)&&_0x1be069['push'](_0x710338);}if(_0x1be069['length']>0x1)throw new _0x29e429('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x1be069,'annotationType':_0x4a37bc['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x8f3d3c){super(_0x8f3d3c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x334f05,_0x304602)=>_0x334f05+_0x304602),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x20b63b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x20b63b['to']('isAnimationDisabled',_0x32db31=>_0x32db31?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x20b63b['to']('top',_0x1df32b=>Ot(_0x1df32b))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x24d71b=this['element']['clientHeight'];_0x24d71b&&(this['height']=_0x24d71b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x35dfc2{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x349af2){super(_0x349af2),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 _0x6a0baa=this['context']['config']['get']('sidebar.container');_0x6a0baa&&this['setContainer'](_0x6a0baa);}['setContainer'](_0x16f57a){if(!g(_0x16f57a))throw new _0x29e429('sidebar-setcontainer-invalid-element');this['container']=_0x16f57a;}['_attachToContainer']({viewClass:_0x84ee8e='',spaceBetweenItems:_0x1a700a=0x19}={}){if(!g(this['container']))throw new _0x29e429('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x84ee8e,this['_spaceBetweenItems']=_0x1a700a;}['rearrange']({removedAnnotation:_0x56478a,previousAnnotation:_0x3ff94b,nextAnnotation:_0x330a61}){const _0x482554=this['getSidebarItemView'](_0x56478a);this['view']['list']['remove'](_0x482554),this['_destroySidebarItemView'](_0x56478a),_0x3ff94b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3ff94b)),_0x330a61&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x330a61)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x11dd04,activatedAnnotation:_0x486185,disableAnimationOnActivatedAnnotation:_0x5b725e}){if(this['_activeAnnotation']=_0x486185,_0x11dd04){_0x11dd04['isActive']=!0x1;const _0x5cadc0=this['getSidebarItemView'](_0x11dd04);_0x5cadc0&&_0x5b725e&&(_0x5cadc0['isAnimationDisabled']=!0x1);}if(_0x486185){const _0x21bff9=this['getSidebarItemView'](_0x486185);_0x21bff9&&(_0x486185['isActive']=!0x0,_0x5b725e&&(_0x21bff9['isAnimationDisabled']=!0x0,_0x21bff9['top']+=0x1),this['_alignToTargetRect'](_0x21bff9));}}['_detachFromContainer'](_0x287f3b){if(this['view']['element']['remove'](),_0x287f3b){for(const _0x5d2620 of _0x287f3b)this['_destroySidebarItemView'](_0x5d2620);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x58254e,_0x30ec9a){_0x30ec9a||(_0x30ec9a=_0x58254e['view']);const _0x46055a=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x46055a,_0x58254e),this['_annotationToSidebarItemView']['set'](_0x58254e,_0x46055a),_0x46055a['content']['add'](_0x30ec9a),this['listenTo'](_0x58254e['view'],'change:targetRect',(_0x3a7de8,_0xa1cbca,_0x12ec34)=>{const _0x150ef0=this['_getTargetTop'](_0x58254e,_0x12ec34);_0x46055a['_targetTop']!=_0x150ef0&&(_0x46055a['_targetTop']=_0x150ef0,this['_setItemTop'](_0x46055a,_0x150ef0));}),this['listenTo'](_0x46055a,'change:top',()=>{this['_recalculate'](_0x46055a,'top');}),this['listenTo'](_0x46055a,'change:bottom',()=>{this['_recalculate'](_0x46055a,'bottom');}),this['_alignToTargetRect'](_0x46055a);const _0x594337=this['_getItemBefore'](_0x46055a);if(_0x594337)this['_alignAfterItem'](_0x594337,_0x46055a)||this['_alignToTargetRect'](_0x46055a);else this['_alignToTargetRect'](_0x46055a);return this['_updateLastItem'](),this['view']['list']['add'](_0x46055a),_0x46055a;}['_alignForTopChange'](_0x55053b){if(!_0x55053b['content']['length'])return;const _0x13d2c4=this['_getItemBefore'](_0x55053b);if(!_0x13d2c4)return;const _0x163c7d=this['_sidebarItemViewToAnnotation']['get'](_0x13d2c4),_0x3c7ee7=this['_activeAnnotation'];_0x3c7ee7&&_0x3c7ee7===_0x163c7d?this['_alignAfterItem'](_0x13d2c4,_0x55053b):this['_alignBeforeItem'](_0x55053b,_0x13d2c4);}['_alignForBottomChange'](_0x5e9cad){if(!_0x5e9cad['content']['length'])return;const _0x94ad88=this['_getItemAfter'](_0x5e9cad);if(!_0x94ad88)return;const _0xdc6141=this['_sidebarItemViewToAnnotation']['get'](_0x94ad88),_0x5a7a05=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3b8a24=this['_activeAnnotation'];_0x3b8a24&&_0x3b8a24===_0xdc6141&&_0x5a7a05?(this['_alignBeforeItem'](_0x94ad88,_0x5e9cad),this['_alignAfterItem'](_0x5e9cad,_0x94ad88)):_0x3b8a24&&_0x3b8a24===_0xdc6141?this['_alignBeforeItem'](_0x94ad88,_0x5e9cad):this['_alignAfterItem'](_0x5e9cad,_0x94ad88);}['_recalculate'](_0x1d4c01,_0x25aaf2){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x5555b0,changedProp:_0x4915c5}of this['_recalculateBuffer'])'top'===_0x4915c5?this['_alignForTopChange'](_0x5555b0):this['_alignForBottomChange'](_0x5555b0);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1d4c01,'changedProp':_0x25aaf2});}['getSidebarItemView'](_0x129ab3){return this['_annotationToSidebarItemView']['get'](_0x129ab3);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x252827){const _0x33c235=this['getSidebarItemView'](_0x252827);this['stopListening'](_0x33c235),this['stopListening'](_0x252827['view']),_0x33c235['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x252827),this['_sidebarItemViewToAnnotation']['delete'](_0x33c235);}['_createSidebarView'](){const _0x29d1ee=new H(this['context']['locale']);return _0x29d1ee['render'](),this['on']('change:_lastItem',(_0x190073,_0x3b60be,_0x99c24a,_0x46fde5)=>{_0x46fde5&&_0x29d1ee['unbind']('minHeight'),_0x99c24a?_0x29d1ee['bind']('minHeight')['to'](_0x99c24a,'bottom'):_0x29d1ee['minHeight']=null;}),_0x29d1ee;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x18f978){const _0x9ad9e5=this['_sidebarItemViewToAnnotation']['get'](_0x18f978),_0x16907d=_0x9ad9e5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x9ad9e5)-0x1);return _0x16907d&&this['getSidebarItemView'](_0x16907d)||null;}['_getItemAfter'](_0xea61b1){const _0x2daf02=this['_sidebarItemViewToAnnotation']['get'](_0xea61b1),_0x16e959=_0x2daf02&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2daf02)+0x1);return _0x16e959&&this['getSidebarItemView'](_0x16e959)||null;}['_alignBeforeItem'](_0x48d677,_0x44a8b7){_0x48d677['updateHeight']();const _0x46ee8b=G(_0x44a8b7['bottom']+this['_spaceBetweenItems'],_0x48d677['top']);return!!_0x46ee8b&&(this['_setItemTop'](_0x44a8b7,_0x44a8b7['top']-_0x46ee8b),!0x0);}['_alignAfterItem'](_0x19b6d3,_0x1bdf69){_0x19b6d3['updateHeight']();const _0x110c05=G(_0x19b6d3['bottom']+this['_spaceBetweenItems'],_0x1bdf69['top']);return!!_0x110c05&&(this['_setItemTop'](_0x1bdf69,_0x1bdf69['top']+_0x110c05,!0x1),!0x0);}['_alignToTargetRect'](_0x148176){const _0x8c56f8=this['_sidebarItemViewToAnnotation']['get'](_0x148176);if(!_0x8c56f8||!_0x8c56f8['target']||!_0x8c56f8['targetRect'])return;const _0x4b2af3=this['_getTargetTop'](_0x8c56f8,_0x8c56f8['targetRect']);this['_setItemTop'](_0x148176,_0x4b2af3);}['_getTargetTop'](_0xb3b15c,_0x52d888){if(null===_0x52d888)return 0x0;if(_0xb3b15c['target']instanceof _0x5f3a0a)return _0x52d888['top'];{const _0xbfa193=new _0x5f3a0a(this['view']['element'])['top'];return _0x52d888['top']-_0xbfa193;}}['_setItemTop'](_0x5e3edb,_0x5597d6,_0x2b5706=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2b5706&&(_0x5597d6=Math['max'](_0x5597d6,this['_getMaxAvailableTop'](_0x5e3edb))),_0x5e3edb['top']=_0x5597d6;}['_getMaxAvailableTop'](_0xffee03){let _0x31eed7=this['_getItemBefore'](_0xffee03),_0x5a9a19=0x0;for(;_0x31eed7;)_0x31eed7['updateHeight'](),_0x5a9a19+=this['_spaceBetweenItems']+_0x31eed7['height'],_0x31eed7=this['_getItemBefore'](_0x31eed7);return _0x5a9a19;}}function G(_0x432f14,_0x9f6e98){return Math['max'](_0x432f14-_0x9f6e98,0x0);}function g(_0x25cbed){return null!==_0x25cbed&&'object'==typeof _0x25cbed&&0x1===_0x25cbed['nodeType'];}class e extends _0x35dfc2{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xd0d51a){super(_0xd0d51a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x22714a(),this['_refreshPositioningDebounced']=_0x340747(()=>{_0xd0d51a['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2ddd65=this['context']['plugins']['get'](j),_0x2164e1=this['context']['plugins']['get'](z);_0x2ddd65['register']('wideSidebar',this),_0x2164e1['container']&&_0x2ddd65['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4918ef){if(_0x4918ef===this['activeAnnotation'])return;const _0x12460b=this['context']['plugins']['get'](z);_0x12460b['_activeAnnotation']=_0x4918ef;const _0x779ddb=this['activeAnnotation'];_0x12460b['refresh']({'blurredAnnotation':_0x779ddb,'activatedAnnotation':_0x4918ef}),this['activeAnnotation']=_0x4918ef;}['attach'](_0x562a5c){this['annotations']=_0x562a5c;const _0x4c9aa3=this['context']['plugins']['get'](z);if(_0x4c9aa3['_annotations']=_0x562a5c,this['isAttached'])throw new _0x29e429('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4c9aa3,'set:container',()=>{this['detach'](),this['listenTo'](_0x4c9aa3,'change:container',_0x23b064=>{_0x23b064['off'](),this['attach'](_0x562a5c);});}),_0x4c9aa3['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1867bc=_0x55934f=>{_0x55934f['updateTargetRect'](),_0x4c9aa3['addAnnotation'](_0x55934f);};for(const _0x22e11a of _0x562a5c)_0x1867bc(_0x22e11a);this['listenTo'](_0x562a5c,'add',(_0xa8f8dc,_0xb46171)=>{_0x1867bc(_0xb46171);}),this['listenTo'](_0x562a5c,'remove',(_0xc8ff91,_0x53ba4a,_0x29a8f7)=>{_0x4c9aa3['rearrange']({'removedAnnotation':_0x53ba4a,'previousAnnotation':_0x562a5c['get'](_0x29a8f7-0x1),'nextAnnotation':_0x562a5c['get'](_0x29a8f7+0x1)}),_0x53ba4a===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x562a5c,'focus',(_0x3cb638,_0x4a43ad)=>{this['setActiveAnnotation'](_0x4a43ad);}),this['listenTo'](_0x562a5c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x22018d=this['context']instanceof _0x55e756?this['context']['editors']:new _0x22714a([this['context']]);for(const _0x5b3070 of _0x22018d)this['_integrateWithEditorAnnotations'](_0x5b3070);this['listenTo'](_0x22018d,'add',(_0x15df1a,_0x1681b2)=>{this['listenTo'](_0x1681b2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1681b2);});}),this['listenTo'](_0x22018d,'remove',(_0x4df974,_0x368e5f)=>{_0x368e5f['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x368e5f['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x29e429('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3fd5b7=this['context']['plugins']['get'](z);_0x3fd5b7['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3fd5b7),this['stopListening'](this['annotations']),this['context']instanceof _0x55e756&&this['stopListening'](this['context']['editors']);for(const _0x44ab88 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x44ab88);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x11ce55){if(!_0x11ce55['plugins']['has']('EditorAnnotations'))return;const _0x534544=_0x11ce55['plugins']['get']('EditorAnnotations'),_0x896d2d=()=>{const _0x13cafd=_0x534544['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x13cafd[0x0]||null);};this['listenTo'](_0x534544,'refresh',_0x896d2d),this['listenTo'](_0x534544,'blur',(_0x28f467,{isAnnotationTracked:_0x37407e})=>{this['activeAnnotation']&&_0x37407e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x534544,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x2e45aa=>{_0x534544['hasDomSelection']()&&(_0x896d2d(),_0x2e45aa['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x534544);}['_destroyEditorAnnotationsIntegration'](_0x1c44dc){this['stopListening'](_0x1c44dc),this['_editorAnnotations']['remove'](_0x1c44dc);}}class C extends _0x222733{['counterView'];constructor(_0x4196f9){super(_0x4196f9);const _0x4d9ac7=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x1edc87,_0x5f524d)=>_0x1edc87?'...':_0x5f524d['toString']()),this['set']('annotationType',''),this['icon']=_0x10df15,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4d9ac7['to']('annotationType',_0x266980=>'ck-annotation-counter__badge--'+_0x266980),_0x4d9ac7['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4d9ac7['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x35dfc2{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x9dd79f){super(_0x9dd79f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x10f0fb())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x22714a(),this['_refreshPositioningDebounced']=_0x340747(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x2dc30b(this['context']['locale']),this['balloonPanelView']=new _0x318538(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3b42ba){this['annotations']=_0x3b42ba;const _0x3a9bba=this['context']['plugins']['get'](z),_0xd409c1=this['balloonPanelView'];if(_0x3a9bba['_annotations']=_0x3b42ba,this['isAttached'])throw new _0x29e429('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3a9bba,'set:container',()=>{this['detach'](),this['listenTo'](_0x3a9bba,'change:container',_0xb8ac6a=>{_0xb8ac6a['off'](),this['attach'](_0x3b42ba);});}),_0x3a9bba['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x555cbf=_0x3d4ce7=>{const _0x2fc754=new C(this['context']['locale']);_0x3a9bba['addAnnotation'](_0x3d4ce7,_0x2fc754),this['_annotationToNarrowView']['set'](_0x3d4ce7,_0x2fc754),_0x2fc754['bind']('isDirty','annotationType','number')['to'](_0x3d4ce7['view'],'isDirty','type','length'),_0x2fc754['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xd409c1['content']['first']!==_0x3d4ce7['view']?(this['_showBalloon'](_0x3d4ce7),_0x3d4ce7['view']['element']['focus'](),this['setActiveAnnotation'](_0x3d4ce7)):this['setActiveAnnotation'](null);});};for(const _0x8070a5 of _0x3b42ba)_0x555cbf(_0x8070a5);this['listenTo'](_0x3b42ba,'add',(_0x2a9f7a,_0x1dbf1d)=>{_0x555cbf(_0x1dbf1d);}),this['listenTo'](_0x3b42ba,'remove',(_0xeeec30,_0x5c3675,_0x256f48)=>{this['_annotationToNarrowView']['get'](_0x5c3675)['destroy'](),this['_annotationToNarrowView']['delete'](_0x5c3675),_0x3a9bba['rearrange']({'removedAnnotation':_0x5c3675,'previousAnnotation':_0x3b42ba['get'](_0x256f48-0x1),'nextAnnotation':_0x3b42ba['get'](_0x256f48+0x1)}),_0x5c3675===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3b42ba,'focus',(_0x24674a,_0x533ad3)=>{this['setActiveAnnotation'](_0x533ad3);}),this['listenTo'](_0x3b42ba,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x57d0a9,_0x4a2a5c)=>{_0x4a2a5c['keyCode']===_0x39b093['esc']&&_0xd409c1['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xd409c1['content']['first']),this['_hideBalloon'](),_0x4a2a5c['stopPropagation'](),_0x4a2a5c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x6735cb,_0x43666e)=>{const _0x1115e2=_0x43666e['target'];_0xd409c1['isVisible']&&_0xd409c1['element']['contains'](_0x1115e2)||_0x3a9bba['view']['element']['contains'](_0x1115e2)||_0x6735cb['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x395b12=>_0x395b12['contains'](_0x1115e2))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x353954=this['context']instanceof _0x55e756?this['context']['editors']:new _0x22714a([this['context']]);for(const _0x524926 of _0x353954)this['_integrateWithEditorAnnotations'](_0x524926);this['listenTo'](_0x353954,'add',(_0x40c81b,_0x356701)=>{this['listenTo'](_0x356701,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x356701);});}),this['listenTo'](_0x353954,'remove',(_0x46c989,_0x5adbf6)=>{_0x5adbf6['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5adbf6['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2be07d){if(_0x2be07d===this['activeAnnotation'])return;const _0x35d67f=this['context']['plugins']['get'](z);if(_0x35d67f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2be07d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2be07d)_0x35d67f['getSidebarItemView'](_0x2be07d)?this['_showBalloon'](_0x2be07d):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2be07d;}['detach'](){if(!this['isAttached'])throw new _0x29e429('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x469194=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x3ec5a3=>_0x3ec5a3['destroy']()),this['_annotationToNarrowView']['clear'](),_0x469194['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x55e756&&this['stopListening'](this['context']['editors']);for(const _0x549533 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x549533);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'](_0xdb28df){if(!_0xdb28df['plugins']['has']('EditorAnnotations'))return;const _0x381d4d=_0xdb28df['plugins']['get']('EditorAnnotations'),_0x26fa49=this['context']['plugins']['get'](z),_0x3ee1ea=this['annotations'],_0x2f4eed=this['balloonPanelView'],_0x567316=()=>{const _0x1c9e1a=_0x381d4d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x1c9e1a),this['setActiveAnnotation'](_0x1c9e1a[0x0]||null);};this['listenTo'](_0x381d4d,'refresh',_0x567316),this['listenTo'](_0x381d4d,'blur',(_0x315096,{isAnnotationTracked:_0x2e4e38})=>{this['activeAnnotation']&&_0x2e4e38(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x381d4d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3ee1ea,'blur',_0x1f6dfc=>{_0x381d4d['hasDomSelection']()&&_0x1f6dfc['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x1f2c6d,_0x4f9533)=>{const _0xb453eb=_0x4f9533['target'];_0x2f4eed['isVisible']&&_0x2f4eed['element']['contains'](_0xb453eb)||_0x26fa49['view']['element']['contains'](_0xb453eb)||this['activeAnnotation']&&_0x381d4d['hasDomSelection']()&&(_0x567316(),_0x1f2c6d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x381d4d);}['_destroyEditorAnnotationsIntegration'](_0x228c4a){_0x228c4a&&(this['stopListening'](_0x228c4a),this['_editorAnnotations']['remove'](_0x228c4a));}['_setSelectedAnnotations'](_0x5d95d8){for(const _0x58a604 of this['_selectedAnnotations'])_0x5d95d8['includes'](_0x58a604)||this['_manuallyClosedAnnotationViews']['delete'](_0x58a604['view']);this['_selectedAnnotations']=_0x5d95d8;}['_refreshPositioning'](){const _0x538e75=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x538e75['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x11d73b){if(this['_manuallyClosedAnnotationViews']['has'](_0x11d73b['view']))return;const _0x567e0c=this['balloonPanelView']['content']['first'];_0x567e0c!==_0x11d73b['view']?(_0x567e0c&&this['_detachListeners'](_0x567e0c),this['_attachListeners'](_0x11d73b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x11d73b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4c39d1=this['balloonPanelView']['content']['first'],_0x5c95c3=_0x4c39d1&&this['annotations']['getByView'](_0x4c39d1);if(!_0x5c95c3||!this['_annotationToNarrowView']['has'](_0x5c95c3))return;const _0x5b061e=this['_annotationToNarrowView']['get'](_0x5c95c3)['element'],_0x508ec9=(function(){const _0x1459c1=_0x318538['defaultPositions'];return[_0x1459c1['southArrowNorthEast'],_0x1459c1['northArrowSouthEast'],_0x1459c1['southArrowNorth'],_0x1459c1['northArrowSouth'],_0x1459c1['southArrowNorthWest'],_0x1459c1['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5b061e,'positions':_0x508ec9});}['_hideBalloon'](){const _0x14d290=this['balloonPanelView'],_0x51458c=_0x14d290['content']['first'];_0x51458c&&(this['_detachListeners'](_0x51458c),_0x14d290['unpin'](),_0x14d290['content']['clear']());}['_attachListeners'](_0x5ec958){this['listenTo'](_0x5ec958,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5ec958,'Esc',(_0x19ab9a,_0x1deb75)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5ec958),this['_hideBalloon'](),_0x1deb75();});}['_detachListeners'](_0x54bc9d){this['stopListening'](_0x54bc9d);}}class c extends _0x3732d9{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x3d3d3f,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x246210){super(_0x246210),_0x246210['editing']['view']['addObserver'](_0x3d1846),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x246210['plugins']['get'](_0x3d3d3f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x332620=this['editor']['plugins']['get'](j);_0x332620['context']===this['editor']&&(_0x332620['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x26e307,_0x37fcbb)=>{const _0x4dd978=this['_balloon'];if(this['isAttached']&&_0x4dd978['visibleView']){const _0xe8f768=this['annotations']['getByView'](_0x4dd978['visibleView']);_0xe8f768&&this['_closeAnnotation'](_0xe8f768),_0x37fcbb();}}));}['afterInit'](){const _0x4cd17b=this['editor']['plugins']['get'](j);_0x4cd17b['context']===this['editor']&&(_0x4cd17b['hasActive']()||_0x4cd17b['switchTo']('inline'));}['setActiveAnnotation'](_0x3b4d9a){_0x3b4d9a!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x3b4d9a&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x3b4d9a)&&this['_addAnnotationToBalloon'](_0x3b4d9a,!0x0),_0x3b4d9a['isActive']=!0x0),_0x3b4d9a||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x3b4d9a);}['attach'](_0x15a53d){this['annotations']=_0x15a53d;const _0x459a86=this['editor']['plugins']['get'](j),_0x3885f5=this['_balloon'];if(this['isAttached'])throw new _0x29e429('inlineannotations-attach-already-attached',this);if(_0x459a86['context']!==this['editor'])throw new _0x29e429('inlineannotations-not-allowed-with-context',this);const _0x524f32=this['editor']['plugins']['get'](b);this['listenTo'](_0x524f32,'refresh',()=>{const _0x2c24fc=_0x524f32['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x16137d,_0x2fca43;!this['_forceRefresh']&&(_0x16137d=_0x2c24fc,_0x2fca43=this['_selectedAnnotations'],_0x16137d['length']===_0x2fca43['length']&&_0x16137d['every'](_0x303d3f=>_0x2fca43['includes'](_0x303d3f)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2c24fc),this['setActiveAnnotation'](_0x2c24fc[0x0]||null));}),this['listenTo'](_0x524f32,'blur',(_0x109aa2,{isAnnotationTracked:_0x41d025})=>{this['activeAnnotation']&&_0x41d025(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x414f1c,_0x52fd32,_0x10ebc2)=>{_0x10ebc2||this['setActiveAnnotation'](null);}),this['listenTo'](_0x15a53d,'remove',(_0xe4b72b,_0x322a51)=>{this['_removeAnnotationFromBalloon'](_0x322a51),_0x322a51===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3885f5,'change:visibleView',(_0x18dd66,_0x142c64,_0x2793d8,_0x59abf0)=>{_0x59abf0&&this['stopListening'](_0x59abf0);const _0x134532=_0x15a53d['getByView'](_0x2793d8);_0x2793d8&&_0x134532&&(this['listenTo'](_0x2793d8,'change:height',()=>{_0x3885f5['updatePosition']();}),this['listenTo'](_0x2793d8,'Esc',()=>{this['_closeAnnotation'](_0x134532),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x134532&&this['setActiveAnnotation'](_0x134532));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x3885f5['visibleView']&&(_0x15a53d['getByView'](_0x3885f5['visibleView'])&&_0x3885f5['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 _0x29e429('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x21044d of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x21044d);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xfc5cbf){for(const _0x6c320e of this['_selectedAnnotations'])_0xfc5cbf['includes'](_0x6c320e)||this['_manuallyClosed']['delete'](_0x6c320e);for(const _0x192062 of this['annotations'])_0xfc5cbf['includes'](_0x192062)||this['_removeAnnotationFromBalloon'](_0x192062);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x2fc22b of _0xfc5cbf)this['_addAnnotationToBalloon'](_0x2fc22b);}this['_selectedAnnotations']=_0xfc5cbf;}['_addAnnotationToBalloon'](_0x3379e0,_0xc6a626=!0x1){this['_manuallyClosed']['has'](_0x3379e0)||(this['_addedAnnotations']['has'](_0x3379e0)||this['_balloon']['hasView'](_0x3379e0['view'])||(this['_addedAnnotations']['add'](_0x3379e0),this['_balloon']['add']({'stackId':_0x3379e0['view']['id'],'view':_0x3379e0['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3379e0)}})),_0xc6a626&&this['_balloon']['showStack'](_0x3379e0['view']['id']));}['_getBalloonTargetForAnnotation'](_0x57ba0a){const _0x3689ff=_0x57ba0a['target'],_0x32639a=this['editor']['editing']['view'],_0x55f8fc=_0x32639a['document']['selection']['getFirstRange'](),_0x4984e1=_0x32639a['domConverter']['viewRangeToDom'](_0x55f8fc);if(_0x4984e1['collapse'](!0x0),_0x3689ff){if(_0x3689ff instanceof _0x5f3a0a)return _0x3689ff;let _0x13f5b7=[];for(const _0x4e376a of _0x3689ff)_0x13f5b7['push'](...F(_0x4e376a['getClientRects']()));_0x13f5b7=function(_0x4a11dc){const _0x17683a=[];let _0x382354=_0x4a11dc[0x0];for(let _0x311496=0x1;_0x311496<_0x4a11dc['length'];_0x311496++)P(_0x382354,_0x4a11dc[_0x311496])?_0x382354['width']+=_0x4a11dc[_0x311496]['width']:(_0x17683a['push'](_0x382354),_0x382354=_0x4a11dc[_0x311496]);return _0x17683a['push'](_0x382354),_0x17683a;}(_0x13f5b7);const _0xd86a96=_0x4984e1['getBoundingClientRect']();return _0x13f5b7['find'](_0x3176a7=>_0x3176a7['top']<=_0xd86a96['top']&&_0x3176a7['bottom']>=_0xd86a96['bottom']&&_0x3176a7['left']<=_0xd86a96['left']&&_0x3176a7['right']>=_0xd86a96['right'])||_0x13f5b7[0x0];}return _0x57ba0a['targetRect']||_0x4984e1;}['_removeAnnotationFromBalloon'](_0x34b73c){this['_addedAnnotations']['has'](_0x34b73c)&&this['_balloon']['hasView'](_0x34b73c['view'])&&(this['_addedAnnotations']['delete'](_0x34b73c),this['_balloon']['remove'](_0x34b73c['view']));}['_closeAnnotation'](_0x6ae19a){this['_manuallyClosed']['add'](_0x6ae19a),this['_removeAnnotationFromBalloon'](_0x6ae19a);}}function F(_0x1d85bb){return Array['from'](_0x1d85bb)['map'](DOMRect['fromRect']);}function P(_0x48415e,_0x32c825){return _0x48415e['top']===_0x32c825['top']&&_0x48415e['bottom']===_0x32c825['bottom']&&_0x48415e['right']===_0x32c825['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x45a4d6,_0x38a80e){super(_0x45a4d6),this['set']('isEmpty',!_0x38a80e['length']),this['focusTracker']=new _0x242e0a(),this['_annotationViews']=_0x38a80e,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x470c60({'focusables':_0x38a80e,'focusTracker':this['focusTracker']}),this['listenTo'](_0x38a80e,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x38a80e,'remove',(_0x120d2e,_0x28a795)=>{_0x28a795['isActive']&&this['focus'](),_0x38a80e['length']||(this['isEmpty']=!0x0);});const _0x5850ae=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x45a4d6,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x38a80e},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x5850ae['if']('isEmpty','ck-hidden',_0x49907c=>!_0x49907c)]},'children':[{'text':N(_0x45a4d6,'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 _0x2549c6 of this['_annotationViews'])this['focusTracker']['add'](_0x2549c6['element']);this['_annotationViews']['on']('change',(_0x5a2b27,{added:_0x227cd2,removed:_0x469a9f})=>{for(const _0x23b6f3 of _0x227cd2)this['focusTracker']['add'](_0x23b6f3['element']);for(const _0x961cab of _0x469a9f)this['focusTracker']['remove'](_0x961cab['element']);});}}class p extends _0x35dfc2{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x2abc82){super(_0x2abc82),this['archivedThreads']=new _0x22714a();}['init'](){const _0x1987e9=this['context'],_0x36badc=_0x1987e9['plugins']['get'](o),_0x2825ac=_0x1987e9['plugins']['get'](y);this['listenTo'](_0x36badc,'addCommentThread',(_0x12bb07,{threadId:_0x4cbf30})=>{const _0x3c0f84=_0x36badc['getCommentThread'](_0x4cbf30);_0x3c0f84['archivedAt']&&this['archivedThreads']['add'](_0x3c0f84,this['_calculatePosition'](_0x3c0f84['archivedAt'])),this['listenTo'](_0x3c0f84,'change:archivedAt',(_0x4090bd,_0xd8b7f8,_0x46f789)=>{_0x46f789?this['archivedThreads']['has'](_0x3c0f84)||this['archivedThreads']['add'](_0x3c0f84,this['_calculatePosition'](_0x3c0f84['archivedAt'])):this['archivedThreads']['has'](_0x3c0f84)&&this['archivedThreads']['remove'](_0x3c0f84);});}),this['listenTo'](_0x36badc,'removeCommentThread',(_0x1f176b,{threadId:_0x22e4d2})=>{const _0x292c3c=_0x36badc['getCommentThread'](_0x22e4d2);this['stopListening'](_0x292c3c),this['archivedThreads']['has'](_0x292c3c)&&this['archivedThreads']['remove'](_0x292c3c);},{'priority':'highest'}),this['listenTo'](_0x2825ac['collection'],'focus',(_0xcf3028,_0x356e0d)=>{_0x356e0d['isVisible']||(_0x356e0d['isActive']=!0x0,_0x2825ac['activate'](_0x356e0d));});}['_calculatePosition'](_0x1ef76f){const _0x9b89fc=[...this['archivedThreads']]['findIndex'](_0x3bb935=>_0x3bb935['archivedAt']<_0x1ef76f);return _0x9b89fc>-0x1?_0x9b89fc:this['archivedThreads']['length'];}}class a extends _0x3732d9{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x2561e8];}constructor(_0x77fb7d){super(_0x77fb7d),this['annotationViews']=new _0xd5b2d1(),this['_pendingThreads']=[];}['init'](){const _0x1ac508=this['editor'],_0x39ca99=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1ac508['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x222733,!0x0)),_0x1ac508['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x201f4f=this['_createCommentsArchiveButton'](_0x59a680);return _0x201f4f['set']({'role':'menuitemcheckbox'}),_0x201f4f;});const _0x45f849=_0x1ac508['plugins']['get'](p),_0x27f97e=_0x1ac508['plugins']['get']('Annotations'),_0x22abc7=_0x1ac508['plugins']['get']('CommentsRepository');_0x45f849['archivedThreads']['forEach'](_0x58fcb2=>{this['_handleNewThread'](_0x58fcb2);}),this['listenTo'](_0x45f849['archivedThreads'],'add',(_0x410d8f,_0xdc3ec0)=>{this['_handleNewThread'](_0xdc3ec0);}),this['listenTo'](_0x27f97e['collection'],'add',(_0x716873,_0x1c40ae)=>{const _0x277768=this['_pendingThreads']['find'](_0x2bb8f3=>{const _0x26413f=_0x22abc7['_threadToController']['get'](_0x2bb8f3);return _0x26413f&&_0x1c40ae['innerView']===_0x26413f['view'];});if(_0x277768){const _0x159667=this['_calculatePosition'](_0x277768['archivedAt']);this['_addAnnotationToArchive'](_0x1c40ae,_0x159667),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x277768),0x1);}}),this['listenTo'](_0x45f849['archivedThreads'],'remove',(_0x151e2f,_0x452fca)=>{const _0x16ce8e=_0x1ac508['config']['get']('collaboration.channelId');if(!_0x16ce8e||_0x452fca['channelId']===_0x16ce8e){if(this['_pendingThreads']['includes'](_0x452fca))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x452fca),0x1);else{const _0x336a25=_0x22abc7['_threadToController']['get'](_0x452fca),_0x27b810=_0x27f97e['getByInnerView'](_0x336a25['view']);this['annotationViews']['remove'](_0x27b810['view']),this['stopListening'](_0x27b810),this['stopListening'](_0x27b810['focusableElements']);}}}),this['listenTo'](_0x27f97e['collection'],'add',(_0x537aa8,_0x289768)=>{this['listenTo'](_0x289768,'escape',_0x39ca99);}),this['listenTo'](_0x27f97e['collection'],'remove',(_0x5e9ecf,_0x2e257e)=>{this['stopListening'](_0x2e257e,'escape',_0x39ca99);});}['_addAnnotationToArchive'](_0x3ef9d2,_0x3937ad){this['listenTo'](_0x3ef9d2,'set:isVisible',_0x423e31=>{_0x423e31['return']=!0x1,_0x423e31['stop']();}),this['annotationViews']['add'](_0x3ef9d2['view'],_0x3937ad);}['_handleNewThread'](_0x227933){const _0x258a14=this['editor']['plugins']['get']('CommentsRepository'),_0x22f549=this['editor']['plugins']['get']('Annotations'),_0x273969=this['editor']['config']['get']('collaboration.channelId');if(!_0x273969||_0x227933['channelId']===_0x273969){const _0x2ecba2=_0x258a14['_threadToController']['get'](_0x227933);if(!_0x2ecba2)return void this['_pendingThreads']['push'](_0x227933);const _0xe242fc=this['_calculatePosition'](_0x227933['archivedAt']),_0x458ee0=_0x22f549['getByInnerView'](_0x2ecba2['view']);_0x458ee0['isVisible']&&_0x22f549['_visibleAnnotations']['remove'](_0x458ee0),this['_addAnnotationToArchive'](_0x458ee0,_0xe242fc);}}['_calculatePosition'](_0x1d4224){const _0x502762=this['editor']['config']['get']('collaboration.channelId'),_0x430044=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x56347e=>_0x56347e['channelId']===_0x502762)['findIndex'](_0x58a2f3=>_0x58a2f3['archivedAt']<_0x1d4224);return _0x430044<0x0||_0x430044>this['annotationViews']['length']?this['annotationViews']['length']:_0x430044-0x1;}['_toggleDialog'](){const _0x15de41=this['editor'],_0x31566e=_0x15de41['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x15de41['locale'],this['annotationViews'])),'commentsArchive'===_0x31566e['id']?_0x31566e['hide']():_0x31566e['show']({'id':'commentsArchive','title':N(_0x15de41['locale'],'COMMENTS_ARCHIVE'),'icon':_0x43bc8d,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x9c172b['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4062ef,_0x10e2db=!0x1){const _0x4a5c69=this['editor']['locale'],_0x5a624b=this['editor']['plugins']['get']('Dialog'),_0x30d814=new _0x4062ef(_0x4a5c69);return _0x30d814['bind']('isEnabled')['to'](this,'isEnabled'),_0x30d814['bind']('isOn')['to'](_0x5a624b,'id',_0xf108c1=>'commentsArchive'===_0xf108c1),_0x30d814['set']({'label':N(_0x4a5c69,'COMMENTS_ARCHIVE'),'icon':_0x43bc8d,'isToggleable':!0x0}),_0x10e2db&&(_0x30d814['tooltip']=!0x0),this['listenTo'](_0x30d814,'execute',()=>this['_toggleDialog']()),_0x30d814;}['_hideDialogOnAnnotationEscape']=_0xe829cc=>{const _0x1e01e8=_0xe829cc['source'];if(!this['annotationViews']['has'](_0x1e01e8['view']))return;const _0x360207=this['editor']['plugins']['get']('Dialog');_0x360207['isOpen']&&'commentsArchive'===_0x360207['id']&&(_0x360207['hide'](),_0xe829cc['stop']());};}class gi extends _0x3732d9{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0xa9deac,ContextPlugin as _0x4e6226,PendingActions as lt,Command as _0x26a29c,Plugin as _0x47f434,Context as _0x3cada9}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x10cdcb,uid as _0x3c34a1,KeystrokeHandler as jt,FocusTracker as _0x14acaa,diff as _0x501e27,Collection as _0x9d8aa2,Rect as _0x8bd8aa,CKEditorError as _0x1851d4,first as _0x2f4f58,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x3c1f6f,keyCodes as _0x5571fc}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3b6fe7,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x5dc02f,trimHtml as ts,LateFocusDropdownButtonView as _0x5dd518,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x20efa6}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x460b6c}from'es-toolkit/compat';import{IconUndo as _0x4e74c8,IconCheck as _0x1d5d12,IconPencil as _0x1b824c,IconRemoveComment as _0x410da3,IconThreeVerticalDots as _0x4af4d5,IconAddComment as _0x1568a7,IconCommentsArchive as _0x91df9c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x1f65eb,ButtonView as _0x3ee916,ViewCollection as _0x4e362f,createDropdown as _0x327b70,ListView as _0x4d91c6,focusChildOnDropdownOpen as _0x475322,ListItemView as _0x2fa469,MenuBarMenuListItemButtonView as _0x174a4a,BodyCollection as _0x225b52,BalloonPanelView as _0x32a398,ContextualBalloon as _0x226e1c,Dialog as _0x322339,DialogViewPosition as _0x36a5c2}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0xc33936}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x2a0c7a}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x51b430}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x10cdcb(){['model'];['view'];constructor(_0x3715b6,_0x171503){super(),this['model']=_0x3715b6,this['model']['_isAttached']=!0x0,this['view']=_0x171503,this['listenTo'](_0x171503,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x171503,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x171503,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x171503,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x171503,'addComment',(_0x33ab8e,_0x1bb5f2)=>this['addComment'](_0x1bb5f2)),this['listenTo'](_0x171503,'updateComment',(_0x2f34a7,_0x28b795,_0x43eb6b)=>this['updateComment'](_0x28b795,_0x43eb6b)),this['listenTo'](_0x171503,'removeComment',(_0x54143c,_0x2dbae9)=>this['removeComment'](_0x2dbae9));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x45833d){this['model']['addComment']({'content':_0x45833d,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x4ec4cb,_0x498693){this['model']['getComment'](_0x4ec4cb)['update']({'content':_0x498693});}['removeComment'](_0x5ce01f){this['model']['getComment'](_0x5ce01f)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x2c3c3f,_0x1b2c70,_0xddb6e4){const t=_0x2c3c3f['t'];switch(_0x1b2c70){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'},_0xddb6e4);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'},_0xddb6e4);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'},_0xddb6e4);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'},_0xddb6e4);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0xddb6e4);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'},_0xddb6e4);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'},_0xddb6e4);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'},_0xddb6e4);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0xce5c45,_0x44a49d){super(_0xce5c45);const _0x361c10=_0x3c34a1();this['main']=this['createCollection'](),this['editable']=new Vt(_0xce5c45,_0x44a49d,void 0x0,{'label':()=>N(_0xce5c45,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0xce5c45['uiLanguageDirection'],'lang':_0xce5c45['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x361c10},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Et extends Ut{['view'];constructor(_0x4b3e9b){super(_0x4b3e9b),this['view']=new Rt(_0x4b3e9b['locale'],_0x4b3e9b['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0xf3b4b7=this['editor']['editing']['view'],_0x2c8649=this['view']['editable'],_0x255739=_0xf3b4b7['document']['getRoot']();_0x2c8649['name']=_0x255739['rootName'],this['view']['render']();const _0x1d05e=_0x2c8649['element'];this['setEditableElement'](_0x2c8649['name'],_0x1d05e),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xf3b4b7['attachDomRoot'](_0x1d05e),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x10cdcb(_0xa9deac){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x715991={}){function _0x66ca7a(_0x40b0ad){return _0x40b0ad['map'](_0x27b843=>String['fromCharCode'](_0x27b843))['join']('');}(_0x715991=Object['assign']({},_0x715991))['plugins']||(_0x715991['plugins']=hs['defaultPlugins']),super(_0x715991),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x66ca7a([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x66ca7a([0x76,0x69,0x65,0x77])][_0x66ca7a([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x66ca7a([0x61,0x75,0x74,0x6f]),this[_0x66ca7a([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x66ca7a([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x66ca7a([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x66ca7a([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x66ca7a([0x6f,0x6b])});}['create'](){const _0x576ece=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x576ece))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2b9b3d=>{const _0xe2c98d=this['model']['document']['getRoot'](),_0x35a9d6=_0xe2c98d&&_0xe2c98d['getChild'](_0xe2c98d['childCount']-0x1);_0x2b9b3d['setSelection'](_0x35a9d6,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x4368ca=this['editing']['view'],_0x321347=_0x4368ca['document']['getRoot'](),_0x43d06=_0x321347['getChild'](0x0);_0x321347['childCount']>0x1||!_0x43d06||'p'!=_0x43d06['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x4368ca,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x43d06['placeholder']=this['placeholder']),Ft({'view':_0x4368ca,'element':_0x43d06,'keepOnFocus':!0x0}),this['placeholderElement']=_0x43d06);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x120bb1,_0x5e9f9d={}){super(_0x120bb1),this['editor']=null,this['_editorConfig']=_0x5e9f9d,this['set']('value',_0x5e9f9d['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x120bb1,'Reply...')),this['set']('submitLabel',N(_0x120bb1,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x14acaa(),this['focusCycler']=new _0x1f65eb({'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',(_0x33befa,_0x423169)=>{this['cancelButtonView']['fire']('execute'),_0x423169();}),this['keystrokes']['set']('Ctrl+Enter',(_0x48e8c0,_0x2c6d5f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2c6d5f());}),this['on']('submit',(_0x2ca5e1,_0x4998a5)=>{_0x4998a5['length']>0xfde8?(alert(N(_0x120bb1,'TOO_LONG_COMMENT_ALERT',[_0x4998a5['length'],0xfde8])),_0x2ca5e1['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x14e420=this['editor'];this['element']['insertBefore'](_0x14e420['ui']['element'],this['element']['firstChild']),_0x14e420['model']['document']['on']('change',()=>this['value']=_0x14e420['getData']()),_0x14e420['bind']('placeholder')['to'](this),this['focusables']['add'](_0x14e420['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x34c0d8){-0x1===_0x34c0d8?(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:_0x171d88}=this,_0x244a33=new _0x3ee916(_0x171d88);return _0x244a33['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x244a33['withText']=!0x0,_0x244a33['bind']('label')['to'](this,'submitLabel'),_0x244a33['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x244a33['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x502e94,_0x22be0d)=>!_0x22be0d&&!!_0x502e94['trim']()),_0x244a33;}['_createCancelButton'](){const {locale:_0x5576fd}=this,_0x6a780c=new _0x3ee916(_0x5576fd);return _0x6a780c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x6a780c['label']=N(_0x5576fd,'Cancel'),_0x6a780c['withText']=!0x0,_0x6a780c['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x6a780c;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x43e76a=>{this['focusTracker']['add'](_0x43e76a['element']);}),this['focusables']['on']('change',(_0x4ecd1c,_0x5b14a4)=>{for(const _0x4dbf08 of Array['from'](_0x5b14a4['added'])['reverse']())this['focusTracker']['add'](_0x4dbf08['element']);});}}class ie extends kt{constructor(_0x493b45,_0x1013f6,_0x7f10fa){super(_0x493b45),this['commentInputView']=new es(_0x493b45,_0x7f10fa),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x60b3b6,_0x1d9ba9)=>_0x60b3b6||!!_0x1d9ba9),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 _0x3b6fe7(_0x493b45,_0x1013f6),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'](_0x1f4db7){this['commentInputView']['focus'](_0x1f4db7);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x549980,_0x1b72ac)=>{const {submitButtonView:_0xd53076,cancelButtonView:_0x360559,editor:_0x4e0896}=this['commentInputView'];[_0xd53076['element'],_0x360559['element'],_0x4e0896?_0x4e0896['editing']['view']['getDomRoot']():null]['filter'](_0x3f6c11=>_0x3f6c11)['some'](_0x52041c=>_0x52041c['contains'](_0x1b72ac['target']))||(this['focus'](),_0x1b72ac['preventDefault']());});}}class rs extends kt{constructor(_0x1e261c){super(_0x1e261c);const _0x2ee295=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2ee295['to']('count',_0x1da5ea=>N(_0x1e261c,'NUMBER_OF_COMMENTS',_0x1da5ea))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x22370b,_0x581ac5,_0x3c3596){super(_0x22370b);const _0x4b2f75=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x581ac5['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x581ac5,this['_config']=_0x3c3596,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x14acaa(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1f65eb({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3155e5=>this['commentViews']['map'](_0x15ad8f=>_0x15ad8f['element'])['includes'](_0x3155e5['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x22370b),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x1d3af3=>_0x1d3af3-this['_config']['maxCommentsWhenCollapsed']);for(const _0x45b5e9 of _0x581ac5['comments'])this['_handleNewCommentModel'](_0x45b5e9);this['_handleInfoComment'](),this['listenTo'](_0x581ac5['comments'],'add',(_0x4215fb,_0x46c69b)=>{const _0x51d6af=this['_calculatePosition'](_0x46c69b);this['length']++,this['_handleNewCommentModel'](_0x46c69b,_0x51d6af),this['refreshVisibleViews']();}),this['listenTo'](_0x581ac5['comments'],'remove',(_0x2128ec,_0x2e0eba)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2e0eba),this['refreshVisibleViews']();}),this['listenTo'](_0x581ac5,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x581ac5,'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',_0x4b2f75['if']('length','ck-hidden',_0x3e4261=>!_0x3e4261)],'aria-label':N(_0x22370b,'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'](_0x4f4e28){-0x1===_0x4f4e28?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2b07c7 of this['commentViews'])_0x2b07c7['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3311da,_0x1db4d6){const _0xe86d48=new this['_config']['CommentView'](this['locale'],_0x3311da,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0xe86d48['viewUid']=_0x3311da['id'],_0xe86d48['delegate']('removeComment')['to'](this),_0xe86d48['delegate']('updateComment')['to'](this),_0xe86d48['delegate']('resolveCommentThread')['to'](this),_0xe86d48['delegate']('editorReady')['to'](this),_0xe86d48['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0xe86d48,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0xe86d48,_0x1db4d6);}['_calculatePosition'](_0x1d0e89){const _0x292c45=this['_model']['_findOptimalIndex'](_0x1d0e89);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1d0e89['authoredAt']?_0x292c45-0x1:_0x292c45:_0x292c45-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3620db={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3620db,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3620db));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x422472){const _0x47673a=this['commentViews']['remove'](_0x422472['id']);this['stopListening'](_0x47673a),_0x47673a['isEditMode']&&this['_updateHasDirtyComment'](),_0x47673a['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3f1f59=>_0x3f1f59['isEditMode']);}['_rearrangeCollapse'](){const _0x3e896a=function(_0x1f63f6){const _0x4c3469=new _0x9d8aa2();for(const _0x4d0691 of _0x1f63f6)_0x4c3469['add'](_0x4d0691);return _0x4c3469;}(this['commentViews']),_0x17237e=this['_collapsedCommentsView']['count'];for(let _0x40e47e=0x1;_0x40e47e<=_0x17237e;_0x40e47e++)_0x3e896a['remove'](0x1);for(const _0x3d5925 of _0x3e896a)_0x3d5925['collapse']();_0x17237e>0x0&&_0x3e896a['add'](this['_collapsedCommentsView'],0x1),ns(_0x501e27(Array['from'](this['visibleViews']),Array['from'](_0x3e896a)),this['visibleViews'],_0x3e896a);}['_rearrangeExpand'](){ns(_0x501e27(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x25cdfb of this['visibleViews'])_0x25cdfb['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x2d3460=>{this['focusTracker']['add'](_0x2d3460['element']),this['keystrokes']['listenTo'](_0x2d3460['element']);}),this['commentViews']['on']('change',(_0x518a66,_0x5f3e61)=>{for(const _0x33a2d6 of _0x5f3e61['removed'])this['focusTracker']['remove'](_0x33a2d6['element']),this['keystrokes']['stopListening'](_0x33a2d6['element']);for(const _0x4fbdea of Array['from'](_0x5f3e61['added'])['reverse']())this['focusTracker']['add'](_0x4fbdea['element']),this['keystrokes']['listenTo'](_0x4fbdea['element']);});}}function ns(_0x16cbc5,_0x2cf616,_0x57ea28){let _0x120d17=0x0;for(const _0x4516ca of _0x16cbc5)switch(_0x4516ca){case'insert':_0x2cf616['add'](_0x57ea28['get'](_0x120d17),_0x120d17),_0x120d17++;break;case'delete':_0x2cf616['remove'](_0x120d17);break;case'equal':_0x120d17++;}}class oe extends kt{constructor(_0xcc20e1){super(_0xcc20e1);const _0x24fd67=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x24fd67['to']('contextValue',_0x1cc2b3=>N(_0xcc20e1,'THREAD_CONTEXT_LABEL',_0x1cc2b3)),'tabindex':-0x1},'children':[{'text':_0x24fd67['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x31974f,_0x4b6d1c){super(_0x31974f);const _0xffac96=this['bindTemplate'];this['_model']=_0x4b6d1c,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x14acaa(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1f65eb({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x57c881=>!!_0x57c881),this['bind']('contextValue')['to'](this['_model'],'context',_0x55c218=>_0x55c218&&_0x55c218['value']?this['_trimContextValue'](_0x55c218['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0xffac96['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 _0x23698d=new _0x3ee916(this['locale']);return _0x23698d['label']=N(this['locale'],'Reopen'),_0x23698d['tooltip']=N(this['locale'],'Reopen'),_0x23698d['icon']=_0x4e74c8,_0x23698d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5cbbd7=>!_0x5cbbd7),_0x23698d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1b1529,_0x46813f)=>_0x1b1529&&_0x46813f),_0x23698d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x23698d;}['_trimContextValue'](_0x6ba70a){if(_0x6ba70a['length']<0x96)return _0x6ba70a;const _0xfb5013=_0x6ba70a['lastIndexOf']('\x20',0x93);return _0x6ba70a['substring'](0x0,_0xfb5013>-0x1?_0xfb5013:0x93)+'...';}['_attachContextActions'](){const _0x3a1d0a=this['element']['querySelector']('.ck-context'),_0x50a88a=_0x3a1d0a['querySelector']('.ck-context__value');this['listenTo'](_0x3a1d0a,'mouseenter',()=>{_0x50a88a['offsetWidth']<_0x50a88a['scrollWidth']&&_0x3a1d0a['classList']['add']('overlay');}),this['listenTo'](_0x3a1d0a,'mouseleave',()=>{_0x3a1d0a['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x4ab534 of this['focusables'])this['focusTracker']['add'](_0x4ab534['element']),this['keystrokes']['listenTo'](_0x4ab534['element']);}['_createContextView'](){const _0xb903fa=new oe(this['locale']);return _0xb903fa['bind']('contextValue')['to'](this),_0xb903fa;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x17cfe0,_0x5b3c5f,_0x36897a,_0x4dc23d){super(_0x17cfe0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x5b3c5f,this['_localUser']=_0x36897a,this['_config']=_0x4dc23d,this['commentThreadHeaderView']=new Xt(_0x17cfe0,_0x5b3c5f),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x17cfe0,N(_0x17cfe0,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x17cfe0,_0x5b3c5f,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4dc23d)),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',(_0xc7c687,_0x3a6109)=>_0xc7c687||!!_0x3a6109),this['bind']('isUnlinked')['to'](_0x5b3c5f,'unlinkedAt',_0x1d283a=>!!_0x1d283a),this['bind']('ariaLabel')['to'](this,'length',_0xcc10d8=>{const _0x3e53d6=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0xcc10d8,_0x3e53d6]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x14acaa(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1f65eb({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xd6259=>_0xd6259['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 _0x374bd2=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1b374b=_0x374bd2['commentInputView'];return _0x374bd2['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1b374b,'value',(_0x1ca1f9,_0x1b55f8,_0x382aa2,_0x2726fe,_0x117787)=>!!_0x117787||!!_0x2726fe&&_0x382aa2&&!_0x1b55f8||_0x1ca1f9&&_0x382aa2&&!_0x1b55f8),_0x1b374b['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x294025,_0x41015e,_0x57c4b7)=>{let _0x40d16d;return _0x40d16d=_0x57c4b7&&_0x41015e?'Reply\x20to\x20reopen\x20discussion...':_0x294025?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x40d16d);}),_0x1b374b['bind']('submitLabel')['to'](this,'length',_0x43b296=>N(this['locale'],_0x43b296?'Reply':'Comment')),_0x1b374b['on']('submit',(_0x6bd0bb,_0x2ba95f)=>{this['fire']('addComment',_0x2ba95f),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1b374b['on']('cancel',()=>{this['focus']();}),_0x1b374b['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1b374b['on']('cancel',_0x4c0ab3=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4c0ab3['stop']());}),this['on']('change:isActive',(_0x1c0142,_0x24739c,_0x121158)=>{_0x121158||this['length']||_0x1b374b['value']||this['fire']('removeCommentThread');}),_0x374bd2;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x51cb2a,_0x9c34ae,_0x1d45f2,_0x302641){super(_0x51cb2a,_0x9c34ae,_0x1d45f2,_0x302641),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x51cb2a,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x5ba365,_0x181e32,_0x18ec35)=>{_0x18ec35||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x4b3886,_0x246b1e,_0x4e6b71)=>{_0x4e6b71&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x158f48=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x158f48['if']('isActive','ck-thread--active'),_0x158f48['if']('isUnlinked','ck-thread--unlinked'),_0x158f48['to']('actionIndicator',_0x2faab7=>_0x2faab7?'ck-thread--'+_0x2faab7:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x158f48['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 _0x5e7c0d of this['commentsListView']['commentViews'])_0x5e7c0d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x5e5bcf}=this,_0x5914f6=this['commentsListView']['commentViews']['get'](0x0);_0x5914f6===this['_boundFirstCommentView']||_0x5914f6['isSystemComment']||(this['_boundFirstCommentView']=_0x5914f6,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x5914f6,'actionIndicator',_0x1c72bf=>'remove'===_0x1c72bf?'remove':null),_0x5914f6['placeholder']=N(_0x5e5bcf,'Write\x20a\x20comment...'),_0x5914f6['removeButton']['on']('execute',_0x46c908=>{_0x46c908['stop'](),this['showConfirm'](N(_0x5e5bcf,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x5914f6['focus']();}),_0x5914f6['actionBar']['add'](this['resolveButton'],0x0),_0x5914f6['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x4b11f6=new _0x5dc02f(this['locale']);return _0x4b11f6['label']=N(this['locale'],'Resolve'),_0x4b11f6['tooltip']=N(this['locale'],'Resolve'),_0x4b11f6['icon']=_0x1d5d12,_0x4b11f6['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x4b11f6['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x44214e=>!_0x44214e),_0x4b11f6['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x580a9f,_0x4f3ad7)=>_0x580a9f&&!_0x4f3ad7),_0x4b11f6['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x4b11f6;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x4fd3e3){super(_0x4fd3e3),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x39c1de,_0x33edf6,_0x3b51df)=>{this['element']['innerHTML']=_0x3b51df;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0xabcb3,_0x684c97,_0x1ba627){super(_0xabcb3),this['_model']=_0x684c97,this['_config']=_0x1ba627,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x684c97,'content',_0x684c97,'authoredAt',(_0x4e1c01,_0x1a8d82)=>N(_0xabcb3,'COMMENT_ARIA_LABEL',[_0x684c97['author']['name'],_0x1ba627['formatDateTime'](_0x1a8d82),new DOMParser()['parseFromString'](_0x4e1c01,'text/html')['body']['textContent'],_0x684c97['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0xabcb3,N(_0xabcb3,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x4e362f(),this['focusTracker']=new _0x14acaa(),this['keystrokes']=new jt(),this['focusCycler']=new _0x1f65eb({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x53df87=>_0x53df87['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x142391=new is(this['locale']);return _0x142391['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xeba934,_0x68c71a)=>_0x68c71a?ts(_0xeba934,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xeba934),_0x142391;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x207dd1=new es(this['locale'],this['_config']['editorConfig']);return _0x207dd1['value']=this['_model']['content'],_0x207dd1['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x207dd1['submitLabel']=N(this['locale'],'Save'),_0x207dd1['on']('submit',(_0x475fdf,_0x20cfd6)=>{this['fire']('updateComment',this['_model']['id'],_0x20cfd6),this['switchToDisplayMode'](),this['focus']();}),_0x207dd1['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x207dd1['once']('editorReady',()=>{_0x207dd1['focus']();}),_0x207dd1['createEditor'](),_0x207dd1['delegate']('editorReady')['to'](this),_0x207dd1['delegate']('editorDestroyed')['to'](this),_0x207dd1;}['_setupKeyboardNavigation'](){const _0x59da38=this['element'];this['keystrokes']['listenTo'](_0x59da38);for(const _0x55524c of this['focusables'])this['focusTracker']['add'](_0x55524c['element']),this['keystrokes']['listenTo'](_0x55524c['element']);this['focusables']['on']('change',(_0x54f9ac,_0x5ac2a1)=>{for(const _0x13764b of _0x5ac2a1['removed'])this['focusTracker']['remove'](_0x13764b['element']),this['keystrokes']['stopListening'](_0x13764b['element']);for(const _0x130828 of _0x5ac2a1['added'])this['focusTracker']['add'](_0x130828['element']),this['keystrokes']['listenTo'](_0x130828['element']);}),this['keystrokes']['set']('enter',(_0x551c76,_0x20316f)=>{_0x59da38===_0x551c76['target']&&(this['focusCycler']['focusFirst'](),_0x20316f());}),this['keystrokes']['set']('esc',(_0x5587a4,_0x387705)=>{_0x59da38!==_0x5587a4['target']&&(this['focus'](),_0x387705());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x5b7535,_0x5b06b7,_0x48e70b){super(_0x5b7535,_0x5b06b7,_0x48e70b),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x5b7535,'Reply...')),this['bind']('authoredAt')['to'](_0x5b06b7),this['bind']('resolvedAt')['to'](_0x5b06b7),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 _0x3b6fe7(_0x5b7535,_0x5b06b7['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x5b06b7,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x176b72=this['bindTemplate'],_0x36df03=[{'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':_0x176b72['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x176b72['to']('authoredAt',_0x2e3d1d=>this['_config']['formatDateTime'](_0x2e3d1d))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x176b72['if']('isEditMode','ck-comment__actions--hidden'),_0x176b72['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']&&_0x36df03['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x176b72['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x176b72['if']('isEditMode','ck-comment--edit'),_0x176b72['if']('isSystemComment','ck-comment--info'),_0x176b72['to']('actionIndicator',_0x5096fd=>_0x5096fd?'ck-comment--'+_0x5096fd:'')],'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':_0x36df03}]}]};}['_createEditButton'](){const _0xbb0553=new _0x3ee916(this['locale']);return _0xbb0553['label']=N(this['locale'],'Edit'),_0xbb0553['icon']=_0x1b824c,_0xbb0553['withText']=!0x0,_0xbb0553['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0xbb0553['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2789f5=>!_0x2789f5),_0xbb0553['bind']('isVisible')['to'](this['_model'],'isEditable'),_0xbb0553['on']('execute',()=>this['switchToEditMode']()),_0xbb0553;}['_createRemoveButton'](){const _0x2598e0=new _0x3ee916(this['locale']);return _0x2598e0['label']=N(this['locale'],'Remove'),_0x2598e0['icon']=_0x410da3,_0x2598e0['withText']=!0x0,_0x2598e0['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x2598e0['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xfcca6f=>!_0xfcca6f),_0x2598e0['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x2598e0['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x2598e0;}['_createDropdown'](){const _0x9b233a=_0x327b70(this['locale'],_0x5dd518),_0x20a65b=_0x9b233a['panelView']['children'],_0x38130d=new _0x4d91c6(this['locale']),_0x27225d=_0x9b233a['bindTemplate'];_0x475322(_0x9b233a,()=>this['items']['find'](_0xecc66a=>_0xecc66a['isVisible'])),_0x9b233a['extendTemplate']({'attributes':{'class':[_0x27225d['if']('isVisible','ck-hidden',_0xaf6d1b=>!_0xaf6d1b)]}});const _0x3c55da=(_0xa8b2b2,_0x331cb4=-0x1)=>{const _0x45f97c=new _0x2fa469(this['locale']);_0x45f97c['children']['add'](_0xa8b2b2);const _0x28ee2c=_0x331cb4>-0x1?_0x331cb4:_0x38130d['items']['length'];_0x38130d['items']['add'](_0x45f97c,_0x28ee2c);const _0x5734e6=Array['from'](this['items']);_0x9b233a['unbind']('isEnabled','isVisible'),_0x9b233a['bind']('isEnabled')['toMany'](_0x5734e6,'isEnabled',(..._0x5f4551)=>_0x5f4551['some'](_0xcfbe12=>_0xcfbe12)),_0x9b233a['bind']('isVisible')['toMany'](_0x5734e6,'isVisible',(..._0x22b6f2)=>_0x22b6f2['some'](_0xcc9a13=>_0xcc9a13));};_0x9b233a['panelPosition']='sw',_0x9b233a['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x4af4d5});for(const _0x81ce1f of this['items'])_0x3c55da(_0x81ce1f);return _0x20a65b['add'](_0x38130d),_0x9b233a['listenTo'](this['items'],'add',(_0x4222a5,_0x429830,_0x3885a0)=>{_0x3c55da(_0x429830,_0x3885a0);}),_0x9b233a['listenTo'](this['items'],'remove',(_0x1d7234,_0x8e5871,_0x3587e7)=>{_0x38130d['items']['remove'](_0x3587e7);}),_0x9b233a;}['_attachActions'](_0x412dde,_0x5dfee6){const _0x2160c0=_0x412dde&&_0x412dde['element'];_0x2160c0&&(this['listenTo'](_0x2160c0,'mouseenter',()=>this['actionIndicator']=_0x5dfee6),this['listenTo'](_0x2160c0,'focus',()=>this['actionIndicator']=_0x5dfee6),this['listenTo'](_0x2160c0,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2160c0,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x52875a=super['_createCommentInputView']();return _0x52875a['bind']('placeholder')['to'](this),_0x52875a;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x4d1e7c){const _0x547002=Dt(_0x4d1e7c,0x1e),_0x2bde4d=new MutationObserver(_0x3a718d=>{for(const _0x1a3c3b of _0x3a718d)('attributes'==_0x1a3c3b['type']&&'class'==_0x1a3c3b['attributeName']||'childList'==_0x1a3c3b['type']||'characterData'==_0x1a3c3b['type'])&&_0x547002();});return{'attach'(_0x4b44ba){_0x2bde4d['observe'](_0x4b44ba,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x2bde4d['disconnect'](),_0x547002['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3aba96,_0x506fbb){super(_0x3aba96),this['id']=_0x3c34a1(),this['focusTracker']=new _0x14acaa(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x18e60d,_0x1e0d01)=>this['fire']('Esc',_0x1e0d01)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x506fbb),this['mainView']=_0x506fbb;const _0x10e3f0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x10e3f0['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 _0x20a5cc=this['element']['clientHeight'];_0x20a5cc&&(this['height']=_0x20a5cc);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x10cdcb(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x35eb15,target:_0x5b003b,type:_0x311d75,isVisible:_0x5545df=!0x0}){super(),this['view']=_0x35eb15,this['view']['element']||this['view']['render'](),this['_type']=_0x311d75,this['_target']=_0x5b003b,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x9d8aa2([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x20a6ba,_0x36277c)=>{this['view']['focusTracker']['add'](_0x36277c);}),this['focusableElements']['on']('remove',(_0x148447,_0x41572c)=>{this['view']['focusTracker']['remove'](_0x41572c);}),this['set']('isVisible',_0x5545df);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2e0aad=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2e0aad),_0x2e0aad;}get['targetRect'](){const _0x430b5c=this['target'];if(null===_0x430b5c)return null;if(_0x430b5c instanceof _0x8bd8aa)return _0x430b5c;const _0x3eaf32=_0x430b5c['filter'](_0xdaa5a8=>function(_0xb6f25f){const _0x2a649b=_0xb6f25f['offsetParent'];if(_0x2a649b)return!0x0;const _0x2def5b=_0xb6f25f['getClientRects']()['item'](0x0);return!!_0x2def5b;}(_0xdaa5a8));return 0x0===_0x3eaf32['length']?null:new _0x8bd8aa(_0x3eaf32[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x27f9e6){this['view']['isActive']=_0x27f9e6,this['view']['mainView']['isActive']=_0x27f9e6;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x44d506){if(!(null===_0x44d506||_0x44d506 instanceof _0x8bd8aa||Array['isArray'](_0x44d506)&&_0x44d506['every'](_0x2cf014=>fi(_0x2cf014))))throw new _0x1851d4('annotation-invalid-target',null,{'target':_0x44d506});}['_getNormalizedTarget'](){const _0x5ad72e='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x5ad72e)?[_0x5ad72e]:_0x5ad72e;}}function fi(_0x762974){return null!==_0x762974&&'object'==typeof _0x762974&&'nodeType'in _0x762974&&0x1===_0x762974['nodeType'];}class S extends _0x9d8aa2{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x53ff9e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x14acaa(),this['_focusTracker']['on']('change:isFocused',(_0x4549e3,_0x1876d5,_0x1067a4)=>{_0x1067a4||this['fire']('blur');});for(const _0x4d01f0 of _0x53ff9e)this['add'](_0x4d01f0);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3ffc2f){if(this['has'](_0x3ffc2f))throw new _0x1851d4('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3ffc2f['innerView'],_0x3ffc2f),this['_viewToAnnotation']['set'](_0x3ffc2f['view'],_0x3ffc2f);for(const _0x31d1b7 of _0x3ffc2f['focusableElements'])this['_focusTracker']['add'](_0x31d1b7);this['listenTo'](_0x3ffc2f['focusableElements'],'add',(_0x1ac058,_0x4cf13a)=>{this['_focusTracker']['add'](_0x4cf13a);}),this['listenTo'](_0x3ffc2f['focusableElements'],'remove',(_0x3aef35,_0x27ff27)=>{this['_focusTracker']['remove'](_0x27ff27);}),this['listenTo'](_0x3ffc2f['view']['focusTracker'],'change:isFocused',(_0x1682ae,_0x4b991c,_0x344a37)=>{_0x344a37&&this['fire']('focus',_0x3ffc2f);}),_0x3ffc2f['updateTargetRect']();const _0x308e1c=this['_getOrderInContent'](_0x3ffc2f['view']['targetRect']);return super['add'](_0x3ffc2f,_0x308e1c);}['remove'](_0x5e5ee4){if(!this['has'](_0x5e5ee4))throw new _0x1851d4('annotationcollection-not-existing-item',null);this['stopListening'](_0x5e5ee4['view']['focusTracker']),this['stopListening'](_0x5e5ee4['focusableElements']);for(const _0x24fe31 of _0x5e5ee4['focusableElements'])this['_focusTracker']['remove'](_0x24fe31);return this['_viewToAnnotation']['delete'](_0x5e5ee4['view']),this['_innerViewToAnnotation']['delete'](_0x5e5ee4['innerView']),super['remove'](_0x5e5ee4);}['getByInnerView'](_0x158cd7){return this['_innerViewToAnnotation']['get'](_0x158cd7);}['getByView'](_0x118aa1){return this['_viewToAnnotation']['get'](_0x118aa1);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2b727d of this)_0x2b727d['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1fc755=Array['from'](this)['sort']((_0x2d53c3,_0x2e9a01)=>w(_0x2d53c3['view']['targetRect'],_0x2e9a01['view']['targetRect']));for(let _0x4b3fdf=_0x1fc755['length']-0x1;_0x4b3fdf>0x0;_0x4b3fdf--){const _0x1a5086=_0x1fc755[_0x4b3fdf];_0x4b3fdf!==this['getIndex'](_0x1a5086)&&(this['remove'](_0x1a5086),this['add'](_0x1a5086));}}['_getOrderInContent'](_0x3351dd){let _0x4d0d1a=0x0;if(!_0x3351dd)return this['length'];for(const _0x503f68 of this){const _0x201538=_0x503f68['view']['targetRect'];if(_0x201538){if(w(_0x3351dd,_0x201538)<0x0)return _0x4d0d1a;_0x4d0d1a++;}}return _0x4d0d1a;}}function v({source:_0x5493fc,target:_0x31ad33,filter:_0x13f455}){for(const _0x5544cb of _0x5493fc)_0x13f455(_0x5544cb)&&_0x31ad33['add'](_0x5544cb);_0x31ad33['listenTo'](_0x5493fc,'add',(_0x55f744,_0x3596d0)=>{_0x13f455(_0x3596d0)&&_0x31ad33['add'](_0x3596d0);}),_0x31ad33['listenTo'](_0x5493fc,'remove',(_0x316d00,_0x481591)=>{_0x31ad33['has'](_0x481591)&&_0x31ad33['remove'](_0x481591);});}function w(_0x5de0d1,_0x109d31){if(null===_0x5de0d1&&null===_0x109d31)return 0x0;if(null===_0x5de0d1)return-0x1;if(null===_0x109d31)return 0x1;const _0x4b5e5b=_0x5de0d1['top']-_0x109d31['top'];return 0x0==_0x4b5e5b?_0x5de0d1['left']-_0x109d31['left']:_0x4b5e5b;}class y extends _0x4e6226{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x427e04){if(super(_0x427e04),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x427e04 instanceof _0xa9deac){const _0x100444=_0x427e04['locale'];_0x427e04['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x100444,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x100444,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x100444,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x100444,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x100444,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x100444,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x100444,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x3e1a0d){this['collection']['add'](_0x3e1a0d);}['remove'](_0x220dfb){this['collection']['remove'](_0x220dfb),_0x220dfb['destroy']();}['refreshVisibility'](){for(const _0x42d27e of this['collection'])_0x42d27e['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x52e17c){return this['collection']['getByInnerView'](_0x52e17c);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x10beeb of this['collection'])_0x10beeb['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x36f833){this['fire']('_activateAnnotation',_0x36f833);}['createAnnotation'](_0x38d17f){return new T(_0x38d17f);}['createAnnotationView'](_0x5adc4f,_0x50fdfd){return new E(_0x5adc4f,_0x50fdfd);}['_addActiveAnnotation'](_0x239bd4){const _0x9a8e4a=new Set(this['activeAnnotations']);_0x9a8e4a['add'](_0x239bd4),this['activeAnnotations']=_0x9a8e4a;}['_removeActiveAnnotation'](_0x5759ea){const _0x43f79c=new Set(this['activeAnnotations']);_0x43f79c['delete'](_0x5759ea),this['activeAnnotations']=_0x43f79c;}['_bindAnnotationsToVisibleAnnotations'](){const _0x4a725d=this['collection'],_0x1afab5=this['_visibleAnnotations'];function _0x580915(_0x1c7e0b){const _0x15b3b8=_0x1c7e0b['source'];_0x15b3b8['isVisible']&&!_0x1afab5['has'](_0x15b3b8)?_0x1afab5['add'](_0x15b3b8):!_0x15b3b8['isVisible']&&_0x1afab5['has'](_0x15b3b8)&&_0x1afab5['remove'](_0x15b3b8),_0x15b3b8['view']['focusTracker']['remove'](_0x15b3b8['view']['element']),_0x15b3b8['view']['focusTracker']['add'](_0x15b3b8['view']['element']);}this['listenTo'](_0x4a725d,'add',(_0x54308c,_0x4e71ce)=>{_0x4e71ce['isVisible']&&_0x1afab5['add'](_0x4e71ce),this['listenTo'](_0x4e71ce,'change:isVisible',_0x580915);}),this['listenTo'](_0x4a725d,'remove',(_0x193c14,_0x2ed35a)=>{_0x1afab5['has'](_0x2ed35a)&&_0x1afab5['remove'](_0x2ed35a),this['stopListening'](_0x2ed35a,'change:isVisible',_0x580915);});}['_setupEnterAnnotationKeystroke'](){const _0xb83977=_0xf8c1be=>{_0xf8c1be['on']('ready',()=>{_0xf8c1be['keystrokes']['set'](_0x2a0c7a,(_0x305d5f,_0x2885af)=>{const _0x3bab31=_0x2f4f58(this['activeAnnotations']['values']());_0x3bab31&&(_0x3bab31['view']['focus'](),_0x2885af());});});};this['context']instanceof _0xa9deac?_0xb83977(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x532e65,_0x101020)=>{_0xb83977(_0x101020);});}['_setupEscapeAnnotationHandling'](){const _0x400bbd=_0x21a657=>{const _0x4ad02f=_0x21a657['source'],_0x5abdeb=[];let _0x32d689;if(Array['isArray'](_0x4ad02f['target'])){_0x32d689=_0x4ad02f['target'][0x0],this['context']instanceof _0xa9deac?_0x5abdeb['push'](this['context']):this['context']['editors']&&_0x5abdeb['push'](...this['context']['editors']);for(const _0x21256a of _0x5abdeb)for(const _0x3c6376 of _0x21256a['editing']['view']['domRoots']['values']())if(_0x3c6376['contains'](_0x32d689))return void _0x21256a['editing']['view']['focus']();_0x32d689['focus']();}};this['listenTo'](this['collection'],'add',(_0x575b51,_0x2b2c58)=>{this['listenTo'](_0x2b2c58,'escape',_0x400bbd,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4ceb24,_0x2b1623)=>{this['stopListening'](_0x2b1623,'escape',_0x400bbd);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4e6226{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2e7f1){super(_0x2e7f1),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2983da=this['context']['config'];_0x2983da['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2983da['define']('comments.maxThreadTotalWeight',0x1f4),_0x2983da['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2983da['define']('comments.CommentThreadView',gt),_0x2983da['define']('comments.CommentView',Tt),_0x2983da['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x5869eb=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3cd7fa,_0x3660ed)=>this['_addCommentThread'](_0x3660ed)),this['on']('submitCommentThread',(_0x29c260,_0x150be2)=>this['_submitCommentThread'](_0x150be2)),this['on']('resolveCommentThread',(_0x489100,_0x1ff63f)=>this['_resolveCommentThread'](_0x1ff63f)),this['on']('resolveCommentThread',(_0x4024a0,_0x3c54ea)=>this['_updateActiveAnnotation'](_0x3c54ea),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x5ae57a,_0x26391d)=>this['_reopenCommentThread'](_0x26391d)),this['on']('reopenCommentThread',(_0x2e4784,_0x5a4bb9)=>this['_updateActiveAnnotation'](_0x5a4bb9),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x47265b,_0x4f891b)=>this['_removeCommentThread'](_0x4f891b)),this['on']('updateCommentThread',(_0x4aee70,_0x2423f4)=>this['_updateCommentThread'](_0x2423f4)),this['on']('updateCommentThread',(_0x18003a,_0x30a77b)=>this['_updateActiveAnnotation'](_0x30a77b),{'priority':'lowest'}),this['on']('addComment',(_0x226bc9,_0x30ca3a)=>this['_addComment'](_0x30ca3a)),this['on']('updateComment',(_0x973820,_0x38ae56)=>this['_updateComment'](_0x38ae56)),this['on']('removeComment',(_0x1330fe,_0x386375)=>this['_removeComment'](_0x386375)),this['on']('addComment',(_0x4e2d1f,{threadId:_0x214750,isFromAdapter:_0x57b443})=>{if(_0x57b443)return;const _0x5c9539=this['getCommentThread'](_0x214750),_0x44442d=_0x5c9539&&this['_threadToController']['get'](_0x5c9539);_0x44442d&&_0x44442d['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x5869eb,'change:activeAnnotations',(_0xf566b4,_0x191790,_0x110f1a)=>{const _0xcfb30a=Array['from'](_0x110f1a)['map'](_0x3fa8a0=>this['_viewToController']['get'](_0x3fa8a0['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xcfb30a?_0xcfb30a['model']:null;});}set['adapter'](_0x3d5b03){if(this['_adapter'])throw new _0x1851d4('commentsrepository-adapter-already-set');this['_adapter']=_0x3d5b03;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x487c08=_t,threadId:_0x52e2f6=_0x3c34a1(),comments:_0x4146b1=[],unlinkedAt:_0x538282=null,resolvedAt:_0x5342b0=null,resolvedBy:_0x19c6d3=null,target:_0x9d14cb=null,context:_0x2e56bc=null,attributes:_0x21ba36={},isResolvable:_0x36d9db=!0x0,isSubmitted:_0xfcbd89=!0x1,isFromAdapter:_0x17b5ab=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x487c08),{'channelId':_0x487c08,'threadId':_0x52e2f6,'comments':_0x4146b1,'unlinkedAt':_0x538282,'resolvedAt':_0x5342b0,'resolvedBy':_0x19c6d3,'target':_0x9d14cb,'context':_0x2e56bc,'attributes':_0x21ba36,'isFromAdapter':_0x17b5ab,'isResolvable':_0x36d9db,'isSubmitted':_0xfcbd89}),this['getCommentThread'](_0x52e2f6);}['openNewCommentThread']({channelId:_0x56260a=_t,threadId:_0x52f3df=_0x3c34a1(),target:_0x277cfe,context:_0x4e230e=null,isResolvable:_0x42beeb=!0x0}){if(this['_readOnlyChannels']['has'](_0x56260a)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x277cfe)throw new _0x1851d4('commentsrepository-missing-target');const _0x46a350=this['addCommentThread']({'channelId':_0x56260a,'threadId':_0x52f3df,'target':_0x277cfe,'context':_0x4e230e,'isResolvable':_0x42beeb});if(!_0x46a350)return null;const _0x2056ad=this['_threadToController']['get'](_0x46a350),_0x4a14c9=_0x2056ad['view']['commentThreadInputView']['commentInputView'],_0x4f0700=this['context']['plugins']['get'](y),_0x577b57=_0x4f0700['getByInnerView'](_0x2056ad['view']);return _0x4f0700['activate'](_0x577b57),_0x4a14c9['once']('editorReady',()=>_0x4a14c9['focus']()),_0x46a350;}['hasCommentThread'](_0x69518a){if('string'!=typeof _0x69518a)throw new _0x1851d4('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x69518a);}['updateCommentThread']({channelId:_0x5497c1=_t,threadId:_0x5cee85,context:_0x10b4e4,unlinkedAt:_0x2984c1,attributes:_0x1844ee,isFromAdapter:_0x5c5799=!0x1}){return this['fire'](Nt('updateCommentThread',_0x5497c1),{'channelId':_0x5497c1,'threadId':_0x5cee85,'context':_0x10b4e4,'unlinkedAt':_0x2984c1,'attributes':_0x1844ee,'isFromAdapter':_0x5c5799}),this['getCommentThread'](_0x5cee85);}['getCommentThread'](_0x2b9bf4){if('string'!=typeof _0x2b9bf4)throw new _0x1851d4('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2b9bf4);}['fetchCommentThread']({channelId:_0x4b8699,threadId:_0x4e4ebc}={}){const _0x15f250=this['getCommentThread'](_0x4e4ebc);if(_0x15f250)return Promise['resolve'](_0x15f250);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x1851d4('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4b8699,'threadId':_0x4e4ebc})['then'](_0x1bb0b4=>this['hasCommentThread'](_0x4e4ebc)?this['getCommentThread'](_0x4e4ebc):_0x1bb0b4?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4b8699},_0x1bb0b4)):void 0x0)['catch'](_0x24346d=>{throw console['error'](_0x24346d),new _0x1851d4('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x3ce95b,skipNotAttached:_0x1bd376=!0x1,skipEmpty:_0x11c122=!0x1,toJSON:_0x56b0fd=!0x1}={}){const _0x2926d4=[];for(const _0x1194ad of this['_threads']['values']())_0x3ce95b&&_0x1194ad['channelId']!==_0x3ce95b||_0x1bd376&&!_0x1194ad['isAttached']||_0x11c122&&0x0===_0x1194ad['length']||_0x2926d4['push'](_0x1194ad);return _0x56b0fd?_0x2926d4['map'](_0x32fa3c=>_0x32fa3c['toJSON']()):_0x2926d4;}['getAnnotationForCommentThread'](_0xdbe028){const _0x3666eb=this['_threadToController']['get'](_0xdbe028);if(!_0x3666eb)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x3666eb['view'])||null;}['getCommentThreadForAnnotation'](_0x57fc82){const _0x5071f1=this['_viewToController']['get'](_0x57fc82['innerView']);return _0x5071f1?_0x5071f1['model']:null;}['setActiveCommentThread'](_0x555c75){const _0x45ba38=this['context']['plugins']['get'](y);if(!_0x555c75)return void(this['activeCommentThread']&&_0x45ba38['deactivateAll']());const _0xcc412f=this['getCommentThread'](_0x555c75);if(!_0xcc412f)throw new _0x1851d4('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x555c75});if(!this['_threadToController']['has'](_0xcc412f))throw new _0x1851d4('commentsrepository-active-not-attached',null,{'threadId':_0x555c75});const _0x4b80e7=_0x45ba38['getByInnerView'](this['_threadToController']['get'](_0xcc412f)['view']);_0x45ba38['activate'](_0x4b80e7);}['switchReadOnly'](_0x2d5c8b,_0x66ca0a){_0x2d5c8b?this['_readOnlyChannels']['add'](_0x66ca0a):this['_readOnlyChannels']['delete'](_0x66ca0a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x38dbd6){return this['_readOnlyChannels']['has'](_0x38dbd6)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x26d008,_0xef0e91){return new vt(_0x26d008,_0xef0e91);}['setPermissions'](_0x115cb2,_0x319aeb=_t){this['_permissions']['set'](_0x319aeb,_0x115cb2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5e36a4=_t){return this['_permissions']['has'](_0x5e36a4)?this['_permissions']['get'](_0x5e36a4):bt;}['_addCommentThread']({channelId:_0x165e0a,threadId:_0x3afc14,comments:_0x26c24d,unlinkedAt:_0x4863e3,resolvedAt:_0x48fb9e,resolvedBy:_0x17a208,target:_0xc68a9f,context:_0xe222ca,attributes:_0x1ad28d,isFromAdapter:_0x4830e4,isResolvable:_0x4761bf,isSubmitted:_0xfc1367}){if('string'!=typeof _0x3afc14)throw new _0x1851d4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3afc14});if(this['hasCommentThread'](_0x3afc14))throw new _0x1851d4('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3afc14});const _0x2e8647=new pi(this,{'channelId':_0x165e0a,'id':_0x3afc14,'context':_0xe222ca,'attributes':_0x1ad28d,'unlinkedAt':_0x4863e3,'resolvedAt':_0x48fb9e,'resolvedBy':_0x17a208?this['context']['plugins']['get'](it)['getUser'](_0x17a208):null,'isResolvable':_0x4761bf,'isSubmitted':_0xfc1367||_0x4830e4});this['_threads']['set'](_0x3afc14,_0x2e8647);for(const _0x3687f7 of _0x26c24d)_0x2e8647['_add'](this['_createNewComment']({'threadId':_0x3afc14,..._0x3687f7}));return _0xc68a9f&&_0x2e8647['attachTo'](_0xc68a9f),_0x4830e4||!_0x2e8647['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x165e0a,'threadId':_0x3afc14});}['_submitCommentThread']({channelId:_0x15936c,threadId:_0x93759d}){if(!this['hasCommentThread'](_0x93759d))throw new _0x1851d4('commentsrepository-missing-comment-thread',this);const _0x34b3de=this['getCommentThread'](_0x93759d);if(_0x34b3de['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5f089d,comments:_0x3ce7f6,resolvedAt:_0x3a4708,resolvedBy:_0x482caa,context:_0x57be3a,attributes:_0x2f6dfb}=_0x34b3de,_0x5df455=this['context']['plugins']['get']('PendingActions'),_0x2a5b5d=_0x5df455['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x15936c,'threadId':_0x5f089d,'comments':_0x3ce7f6['map'](_0x17ad8c=>_0x17ad8c['toJSON']()),'resolvedAt':_0x3a4708,'resolvedBy':_0x482caa?_0x482caa['id']:_0x482caa,'context':_0x57be3a,'attributes':_0x2f6dfb})['then'](({comments:_0x196daf})=>{_0x5df455['remove'](_0x2a5b5d);for(const _0x4b7165 of _0x196daf)this['_updateComment']({'channelId':_0x15936c,'threadId':_0x93759d,'commentId':_0x4b7165['commentId'],'createdAt':_0x4b7165['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x317adf=>{throw console['error'](_0x317adf),new _0x1851d4('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x18aa50,target:_0x56a39b}){const _0x98d0f6=this['getCommentThread'](_0x18aa50);if(!_0x98d0f6)throw new _0x1851d4('commentsrepository-attach-missing-comment-thread',this);const _0x26039b=this['context']['plugins']['get']('PendingActions'),_0x3e7693=this['context']['plugins']['get'](y),_0x433c78=this['_createCommentThreadView'](_0x98d0f6),_0x2280d4=new vt(_0x98d0f6,_0x433c78);let _0x2829e8=null;_0x433c78['on']('change:isDirty',(_0x293ac2,_0x2594b1,_0x401717)=>{_0x401717?_0x2829e8=_0x26039b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2829e8&&(_0x26039b['remove'](_0x2829e8),_0x2829e8=null);}),this['_threadToController']['set'](_0x98d0f6,_0x2280d4),this['_viewToController']['set'](_0x433c78,_0x2280d4);const _0x2615a2=new E(this['context']['locale'],_0x433c78);_0x2615a2['bind']('length')['to'](_0x433c78),_0x2615a2['bind']('isDirty')['to'](_0x433c78,'isDirty',_0x433c78,'length',(_0x5950a6,_0x475751)=>_0x5950a6||!_0x475751),_0x2615a2['bind']('isActive')['to'](_0x433c78),_0x2615a2['type']='comment';const _0x4623bd=new T({'view':_0x2615a2,'target':_0x56a39b,'type':'comment','isVisible':!_0x98d0f6['archivedAt']&&!!('function'==typeof _0x56a39b?_0x56a39b():_0x56a39b)});return _0x433c78['on']('escape',()=>{_0x4623bd['fire']('escape');}),this['_bindAnnotationToEditors'](_0x433c78,_0x4623bd),_0x3e7693['add'](_0x4623bd),_0x4623bd;}['_bindAnnotationToEditors'](_0x2f7b6c,_0x139cdd){this['listenTo'](_0x2f7b6c,'editorReady',(_0x546a50,_0x440c46)=>{const _0x4a55ea=_0x440c46['ui']['view']['body']['bodyCollectionContainer'];_0x139cdd['focusableElements']['add'](_0x4a55ea),this['context']instanceof _0xa9deac&&this['context']['ui']['focusTracker']['add'](_0x4a55ea);},{'priority':'highest'}),this['listenTo'](_0x2f7b6c,'editorDestroyed',(_0x4770ae,_0x28c10a)=>{const _0x384ddd=_0x28c10a['ui']['view']['body']['bodyCollectionContainer'];_0x139cdd['focusableElements']['has'](_0x384ddd)&&_0x139cdd['focusableElements']['remove'](_0x384ddd),this['context']instanceof _0xa9deac&&this['context']['ui']['focusTracker']['remove'](_0x384ddd);});}['_unbindEditors'](_0x467f7e){this['stopListening'](_0x467f7e,'editorReady'),this['stopListening'](_0x467f7e,'editorDestroyed');}['_createCommentThreadView'](_0x1aecaa){const _0x2fb5b0=this['context']['plugins']['get'](it),{config:_0x1cad47,locale:_0x250247}=this['context'],_0x522e4c=pt(_0x1cad47['get']('locale'),_0x250247);return new(0x0,(_0x1cad47['get']('comments'))['CommentThreadView'])(_0x250247,_0x1aecaa,_0x2fb5b0['me'],{'editorConfig':{..._0x1cad47['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1cad47['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1cad47['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1cad47['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1cad47['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x522e4c,'CommentView':_0x1cad47['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0xfeab6b,channelId:_0x2263f8,resolvedAt:_0x45b751,resolvedBy:_0x5c0f80,isFromAdapter:_0x6e5c7c}){if(!this['hasCommentThread'](_0xfeab6b))throw new _0x1851d4('commentsrepository-missing-comment-thread',null,{'threadId':_0xfeab6b});const _0x224a33=this['getCommentThread'](_0xfeab6b);if(_0x224a33['isResolved'])throw new _0x1851d4('commentsrepository-resolved-comment-thread',null,{'threadId':_0xfeab6b});const _0x4c9fa8=this['context']['plugins']['get'](it);if(_0x224a33['resolvedBy']=_0x4c9fa8['getUser'](_0x5c0f80),_0x224a33['resolvedAt']=_0x45b751,_0x6e5c7c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1f1344=this['context']['plugins']['get']('PendingActions'),_0x28a2ee=_0x1f1344['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2263f8,'threadId':_0xfeab6b})['then'](({resolvedAt:_0x5b8d0a,resolvedBy:_0xd87b75})=>{_0x1f1344['remove'](_0x28a2ee),_0x224a33['resolvedBy']['id']!==_0xd87b75&&(_0x224a33['resolvedBy']=_0x4c9fa8['getUser'](_0xd87b75)),_0x224a33['resolvedAt']=_0x5b8d0a;})['catch'](_0x14c33d=>{throw console['error'](_0x14c33d),new _0x1851d4('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x59d15e,channelId:_0x16c7dd,isFromAdapter:_0x517e4a}){if(!this['hasCommentThread'](_0x59d15e))throw new _0x1851d4('commentsrepository-missing-comment-thread',null,{'threadId':_0x59d15e});const _0x30ed81=this['getCommentThread'](_0x59d15e);if(!_0x30ed81['isResolved'])throw new _0x1851d4('commentsrepository-reopen-comment-thread',null,{'threadId':_0x59d15e});if(_0x30ed81['resolvedBy']=null,_0x30ed81['resolvedAt']=null,_0x517e4a||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x1efd71=this['context']['plugins']['get']('PendingActions'),_0x55aa14=_0x1efd71['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x16c7dd,'threadId':_0x59d15e})['then'](()=>_0x1efd71['remove'](_0x55aa14))['catch'](_0x2b64d5=>{throw console['error'](_0x2b64d5),new _0x1851d4('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x153484,isFromAdapter:_0x5379e0}){const _0x1333ac=this['getCommentThread'](_0x153484);if(!_0x1333ac)throw new _0x1851d4('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x153484),this['_threads']['delete'](_0x153484),!_0x1333ac['isSubmitted']||_0x5379e0||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5de456=this['context']['plugins']['get']('PendingActions'),{channelId:_0x28b305}=_0x1333ac,_0x2764cb=_0x5de456['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x28b305,'threadId':_0x153484})['then'](()=>_0x5de456['remove'](_0x2764cb))['catch'](_0x985541=>{throw console['error'](_0x985541),new _0x1851d4('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0xe6366f,unlinkedAt:_0x2ca2d2,context:_0x37b771,attributes:_0x297643,isFromAdapter:_0x2714de}){if('string'!=typeof _0xe6366f)throw new _0x1851d4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xe6366f});if(!this['hasCommentThread'](_0xe6366f))throw new _0x1851d4('commentsrepository-missing-comment-thread',null,{'threadId':_0xe6366f});const _0x720123=this['getCommentThread'](_0xe6366f);let _0x1acf8f=!0x1;if(void 0x0!==_0x37b771&&_0x720123['context']!==_0x37b771&&(_0x720123['context']=_0x37b771,_0x1acf8f=!0x0),void 0x0!==_0x2ca2d2&&_0x720123['unlinkedAt']!==_0x2ca2d2&&(_0x720123['unlinkedAt']=_0x2ca2d2,_0x1acf8f=!0x0),_0x297643&&!At(_0x297643,_0x720123['attributes'])&&(_0x720123['attributes']=_0x297643,_0x1acf8f=!0x0),!_0x1acf8f)return Promise['resolve']();if(!_0x720123['isSubmitted']||_0x2714de||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3f8da3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1a20bd}=_0x720123,_0x4d0f9d=_0x3f8da3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1a20bd,'threadId':_0xe6366f,'context':_0x37b771,'unlinkedAt':_0x2ca2d2,'attributes':_0x297643})['then'](()=>_0x3f8da3['remove'](_0x4d0f9d))['catch'](_0x125a79=>{throw console['error'](_0x125a79),new _0x1851d4('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x5e6aae){const _0x498ea0=this['context']['plugins']['get'](y),_0x2296fd=this['getCommentThread'](_0x5e6aae);if(_0x2296fd['_isAttached']=!0x1,this['_threadToController']['has'](_0x2296fd)){const _0x26e8c5=this['_threadToController']['get'](_0x2296fd),_0x37707b=_0x26e8c5['view'],_0x173f74=_0x498ea0['getByInnerView'](_0x37707b);this['_threadToController']['delete'](_0x2296fd),this['_viewToController']['delete'](_0x37707b),_0x173f74&&_0x498ea0['remove'](_0x173f74),_0x26e8c5['destroy'](),_0x37707b['destroy']()['then'](()=>{this['_unbindEditors'](_0x37707b);});}}['_updateActiveAnnotation']({threadId:_0x25b507,resolvedAt:_0x590608,unlinkedAt:_0x15e7c2}){const _0x3c9267=!!_0x590608,_0x18179f=this['context']['plugins']['get'](y),_0x446939=this['getCommentThread'](_0x25b507);if(this['_threadToController']['has'](_0x446939)){const _0x4cd75c=this['_threadToController']['get'](_0x446939)['view'],_0x498e4b=_0x18179f['getByInnerView'](_0x4cd75c);_0x498e4b&&(_0x3c9267&&_0x18179f['_removeActiveAnnotation'](_0x498e4b),_0x15e7c2?_0x498e4b['isVisible']=!0x1:_0x498e4b['refreshVisibility']());}}['_getExternalAuthor'](_0x2373c3){const _0x18317f=this['context']['plugins']['get'](it),_0x3da900=It('external:'+_0x2373c3),_0x25f95a=_0x18317f['getUser'](_0x3da900);return _0x25f95a||_0x18317f['addUser']({'id':_0x3da900,'name':_0x2373c3});}['_createNewComment']({threadId:_0x2df972,commentId:_0x50446a=_0x3c34a1(),content:_0x5cc07b,authorId:_0x121734,createdAt:_0x2609b7,attributes:_0x4a4121}){if('string'!=typeof _0x50446a)throw new _0x1851d4('commentsrepository-invalid-commentid');if('string'!=typeof _0x121734)throw new _0x1851d4('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5cc07b||!_0x5cc07b['trim']())throw new _0x1851d4('commentsrepository-invalid-comment-content');const _0x39e36b=this['context']['plugins']['get'](it)['getUser'](_0x121734);if(!_0x39e36b)throw new _0x1851d4('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x121734});let _0x2a1d96=null,_0x5d3d8e=_0x2609b7;return _0x4a4121?.['@external']&&(_0x2a1d96=this['_getExternalAuthor'](_0x4a4121['@external']['authorName']),_0x5d3d8e=new Date(_0x4a4121['@external']['createdAt'])),new wi(this,{'threadId':_0x2df972,'id':_0x50446a,'author':_0x2a1d96||_0x39e36b,'creator':_0x39e36b,'content':_0x5cc07b,'createdAt':_0x2609b7,'authoredAt':_0x5d3d8e,'attributes':_0x4a4121});}['_addComment'](_0x3c4243){let {threadId:_0x4b7211,content:_0x52ffae,attributes:_0x4bbf94,isFromAdapter:_0x4467b0}=_0x3c4243;const _0x2ee08e=this['getCommentThread'](_0x3c4243['threadId']);if(!_0x2ee08e)throw new _0x1851d4('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4aced2=this['_createNewComment'](_0x3c4243),{id:_0x402ccf}=_0x4aced2;if(_0x2ee08e['_add'](_0x4aced2),_0x4467b0||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2ee08e['isSubmitted'])return Promise['resolve']();const _0x46a22a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x19757d}=_0x2ee08e,_0xcbabb=_0x46a22a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4bbf94||(_0x4bbf94={}),this['adapter']['addComment']({'channelId':_0x19757d,'threadId':_0x4b7211,'commentId':_0x402ccf,'content':_0x52ffae,'attributes':_0x4bbf94})['then'](_0x3bd249=>{_0x46a22a['remove'](_0xcbabb),_0x3bd249&&this['_updateComment']({'channelId':_0x19757d,'threadId':_0x4b7211,'commentId':_0x402ccf,'createdAt':_0x3bd249['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4d8421=>{throw console['error'](_0x4d8421),new _0x1851d4('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4329f3,commentId:_0x4c1f5e,content:_0x42c209,createdAt:_0x742af1,attributes:_0x842564,isFromAdapter:_0x270fb8}){if(void 0x0!==_0x42c209&&('string'!=typeof _0x42c209||!_0x42c209['trim']()['length']))throw new _0x1851d4('commentsrepository-update-comment-invalid-content');const _0xa21425=this['getCommentThread'](_0x4329f3),_0x1faded=_0xa21425['getComment'](_0x4c1f5e);if(!_0x1faded)throw new _0x1851d4('commentsrepository-update-missing-comment',this);let _0x9b3966=!0x1;if(_0x42c209&&_0x42c209!==_0x1faded['content']&&(_0x1faded['isEditable']||_0x270fb8)&&(_0x1faded['content']=_0x42c209,_0x9b3966=!0x0),_0x742af1&&_0x742af1!==_0x1faded['createdAt']&&(_0x1faded['createdAt']=_0x742af1,_0x1faded['attributes']&&_0x1faded['attributes']['@external']||(_0x1faded['authoredAt']=_0x742af1),_0x9b3966=!0x0),_0x842564&&!At(_0x842564,_0x1faded['attributes'])&&(_0x1faded['attributes']=_0x842564,_0x9b3966=!0x0),!_0x9b3966)return Promise['resolve']();if(_0xa21425['fire']('commentUpdated'),_0x270fb8||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x1bb149=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5aa0d5}=this['getCommentThread'](_0x1faded['threadId']),_0x388780=_0x1bb149['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5aa0d5,'threadId':_0x4329f3,'commentId':_0x4c1f5e,'content':_0x42c209,'attributes':_0x842564})['then'](()=>_0x1bb149['remove'](_0x388780))['catch'](_0x1e23b7=>{throw console['error'](_0x1e23b7),new _0x1851d4('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0xdd9277,commentId:_0x10db90,isFromAdapter:_0x1c5928}){const _0x2cf9d8=this['getCommentThread'](_0xdd9277),_0x44d983=_0x2cf9d8['getComment'](_0x10db90);if(!_0x44d983)throw new _0x1851d4('commentsrepository-remove-missing-comment',this);if(_0x2cf9d8['_remove'](_0x44d983),_0x1c5928||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x47de57=this['context']['plugins']['get']('PendingActions'),{channelId:_0x88c4ab}=_0x2cf9d8,_0x38377c=_0x47de57['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x88c4ab,'threadId':_0xdd9277,'commentId':_0x10db90})['then'](()=>_0x47de57['remove'](_0x38377c))['catch'](_0x3b0396=>{throw console['error'](_0x3b0396),new _0x1851d4('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x10cdcb(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x459adc,_0x50025b){super();const _0x230048=_0x50025b['isResolvable'];this['channelId']=_0x50025b['channelId'],this['id']=_0x50025b['id'],this['comments']=new _0x9d8aa2(),this['_repository']=_0x459adc,this['_isAttached']=!0x1,this['_isSubmitted']=_0x50025b['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x459adc,'_permissions',_0x459adc,'_readOnlyChannels',()=>_0x459adc['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x459adc,'_permissions',()=>_0x459adc['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x459adc,'_permissions',()=>{const _0x19003e=_0x459adc['getPermissions'](this['channelId']);return _0x19003e['write']||_0x19003e['admin'];}),this['bind']('isResolvable')['to'](_0x459adc,'_permissions',()=>_0x230048&&_0x459adc['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x50025b['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x5061c0,_0x1a1153)=>_0x5061c0?_0x1a1153?_0x5061c0<_0x1a1153?_0x5061c0:_0x1a1153:_0x5061c0:_0x1a1153),this['set']('unlinkedAt',_0x50025b['unlinkedAt']||null),this['set']('resolvedAt',_0x50025b['resolvedAt']||null),this['set']('resolvedBy',_0x50025b['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4aecf3=>!!_0x4aecf3),this['set']('attributes',_0x50025b['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x1840bd,_0x5e802b)=>_0x1840bd+_0x5e802b['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x4ae629,id:_0x4c8d8c}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x4ae629),{'channelId':_0x4ae629,'threadId':_0x4c8d8c});}['setUnlinkedAt'](_0x8c26c2){this['_update']({'unlinkedAt':_0x8c26c2});}['resolve']({resolvedAt:_0x4e3baf=new Date(),resolvedBy:_0x25712f='',isFromAdapter:_0x59b467=!0x1}={}){const _0x27b258=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x128a80,id:_0x44b7ba}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x128a80),{'channelId':_0x128a80,'threadId':_0x44b7ba,'resolvedAt':_0x4e3baf,'resolvedBy':_0x25712f||_0x27b258['id'],'isFromAdapter':_0x59b467});}['reopen']({isFromAdapter:_0x1cfb31=!0x1}={}){const {channelId:_0x3c5011,id:_0x2d3a09}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x3c5011),{'channelId':_0x3c5011,'threadId':_0x2d3a09,'isFromAdapter':_0x1cfb31});}['setContext'](_0x2b945f){this['context']||this['_update']({'context':_0x2b945f});}['setAttribute'](_0x2b6e28,_0x2c4b64){const _0x15546f=wt(this['attributes']);yt(_0x15546f,_0x2b6e28,_0x2c4b64),this['_update']({'attributes':_0x15546f});}['removeAttribute'](_0x5addd8){const _0x353bc5=wt(this['attributes']);Ct(_0x353bc5,_0x5addd8),this['_update']({'attributes':_0x353bc5});}['remove']({isFromAdapter:_0x2c74b1=!0x1}={}){const {channelId:_0x386583,id:_0x3c6bde}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x386583),{'channelId':_0x386583,'threadId':_0x3c6bde,'isFromAdapter':_0x2c74b1});}['attachTo'](_0x52ab01){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x52ab01});}['addComment'](_0x23ffad){const {channelId:_0x4d94cc,id:_0x22ebcf}=this;this['_repository']['fire'](Nt('addComment',_0x4d94cc,_0x22ebcf),Object['assign']({'channelId':_0x4d94cc,'threadId':_0x22ebcf},_0x23ffad));}['getComment'](_0x4a39b0){if('string'!=typeof _0x4a39b0)throw new _0x1851d4('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x4a39b0});return this['comments']['get'](_0x4a39b0);}['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'](_0x32a450=>_0x32a450['toJSON']()),'attributes':this['attributes']};}['_add'](_0x25ad18){return this['listenTo'](_0x25ad18,'change:authoredAt',()=>{const _0x2d4af9=this['_findOptimalIndex'](_0x25ad18),_0xee1d3e=this['comments'];_0x2d4af9-0x1!=_0xee1d3e['getIndex'](_0x25ad18)&&_0x2d4af9+0x1!=_0xee1d3e['getIndex'](_0x25ad18)&&(this['_remove'](_0x25ad18),this['_add'](_0x25ad18));}),this['comments']['add'](_0x25ad18,this['_findOptimalIndex'](_0x25ad18));}['_update'](_0x3ea7c6){const {channelId:_0x153245,id:_0x2ba084}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x153245),{..._0x3ea7c6,'channelId':_0x153245,'threadId':_0x2ba084});}['_remove'](_0x8c2204){return this['stopListening'](_0x8c2204),_0x8c2204['destroy'](),this['comments']['remove'](_0x8c2204);}['_findOptimalIndex'](_0x2580d0){const _0x2e60b7=this['comments']['find'](_0x48fea4=>new Date(_0x48fea4['authoredAt'])['getTime']()>new Date(_0x2580d0['authoredAt'])['getTime']());return _0x2e60b7?this['comments']['getIndex'](_0x2e60b7):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x10cdcb(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x2b6793,_0x4b7859){super();const _0x2d303b=_0x2b6793['context']['plugins']['get'](it)['me'],_0x31bef5=_0x2b6793['getCommentThread'](_0x4b7859['threadId']),_0x1f198e=0x0===_0x31bef5['comments']['length'],_0xd6008d=_0x2d303b===_0x4b7859['author'];this['id']=_0x4b7859['id'],this['threadId']=_0x4b7859['threadId'],this['author']=_0x4b7859['author'],this['creator']=_0x4b7859['creator'],this['isExternal']=Boolean(_0x4b7859['attributes']&&_0x4b7859['attributes']['@external']),this['set']('content',_0x4b7859['content']),this['createdAt']=_0x4b7859['createdAt']||new Date(),this['set']('authoredAt',_0x4b7859['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x31bef5,'resolvedAt'),this['set']('attributes',_0x4b7859['attributes']||{}),this['bind']('isEditable')['to'](_0x2b6793,'_permissions',()=>{const _0x369b4c=_0x2b6793['getPermissions'](_0x31bef5['channelId'])['write'],_0x53894d=_0x2b6793['getPermissions'](_0x31bef5['channelId'])['modifyAll'];return _0xd6008d&&_0x369b4c||!_0xd6008d&&_0x53894d;}),this['bind']('isRemovable')['to'](_0x31bef5,'isRemovable',_0x2b6793,'_permissions',_0x198ad4=>{const _0x2b45e2=_0x2b6793['getPermissions'](_0x31bef5['channelId'])['write'],_0x497a09=_0x2b6793['getPermissions'](_0x31bef5['channelId'])['modifyAll'];return _0xd6008d&&_0x2b45e2||_0x198ad4&&_0x1f198e||!_0xd6008d&&_0x497a09&&!_0x1f198e;}),this['bind']('isReadOnly')['to'](_0x31bef5,'isReadOnly'),this['_repository']=_0x2b6793;}get['weight'](){return Math['max'](function(_0x34e9b1){const _0x4a8ddb=document['createElement']('div');return _0x4a8ddb['innerHTML']=_0x34e9b1,_0x4a8ddb['textContent']['length'];}(this['content']),0xc8);}['update'](_0x3f21b8){const {threadId:_0x4105d0,id:_0xad664d}=this;if(!this['_repository']['hasCommentThread'](_0x4105d0))throw new _0x1851d4('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x209e86}=this['_repository']['getCommentThread'](_0x4105d0);this['_repository']['fire'](Nt('updateComment',_0x209e86,_0x4105d0),{'channelId':_0x209e86,'threadId':_0x4105d0,'commentId':_0xad664d,..._0x3f21b8});}['setAttribute'](_0x15815b,_0x2a0074){const _0x2cf02a=wt(this['attributes']);yt(_0x2cf02a,_0x15815b,_0x2a0074),this['update']({'attributes':_0x2cf02a});}['removeAttribute'](_0x13c007){const _0x74da46=wt(this['attributes']);Ct(_0x74da46,_0x13c007),this['update']({'attributes':_0x74da46});}['remove'](_0x1ca7d2={}){if(!_0x1ca7d2['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x44b025,id:_0x28f2df}=this;if(!this['_repository']['hasCommentThread'](_0x44b025))throw new _0x1851d4('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xdb5cfb}=this['_repository']['getCommentThread'](_0x44b025);this['_repository']['fire'](Nt('removeComment',_0xdb5cfb,_0x44b025),{'channelId':_0xdb5cfb,'threadId':_0x44b025,'commentId':_0x28f2df,..._0x1ca7d2});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x412b63,..._0x235357){for(const _0x3dcbee of _0x235357)void 0x0!==_0x3dcbee&&(_0x412b63+=':'+String(_0x3dcbee));return _0x412b63;}class ot extends _0x26a29c{constructor(_0x43755d){super(_0x43755d),this['set']('hasContent',!0x1);}['refresh'](){const _0x401ba1=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x37ec0b of _0x401ba1['getRanges']())if(this['_hasContent'](_0x37ec0b))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x12eca7=_0x3c34a1(),ranges:_0x38116f,comment:_0x5e2591}={}){const _0x11652f=this['editor']['model'],_0x439228=_0x38116f??Array['from'](_0x11652f['document']['selection']['getRanges']()),_0x332930=[];for(const _0x52d166 of _0x439228)this['_hasContent'](_0x52d166)&&_0x332930['push'](this['_trimToContent'](_0x52d166));if(!_0x332930['length'])throw new _0x1851d4('addcommentthreadcommand-incorrect-ranges',null);_0x5e2591&&this['_createCommentThread'](_0x12eca7,_0x5e2591),this['_createMarkersFromRanges'](_0x12eca7,_0x332930,!!_0x5e2591);}['_createMarkersFromRanges'](_0x172551,_0x56c6b5,_0x5e82d0){this['editor']['model']['change'](_0x3fe0a9=>{for(const _0x1fcdd6 of _0x56c6b5){const _0x5d2336=_0x3c34a1()['substr'](0x1,0x5),_0x1adebe='comment:'+_0x172551+':'+_0x5d2336;_0x3fe0a9['addMarker'](_0x1adebe,{'range':_0x1fcdd6,'usingOperation':_0x5e82d0,'affectsData':_0x5e82d0});}});}['_createCommentThread'](_0x1fb4d8,_0x69b7ed){const _0x162154=this['editor']['plugins']['get']('CommentsRepository'),_0x571106=this['editor']['config']['get']('collaboration.channelId'),_0x4e5e1d=this['editor']['plugins']['get']('Users')['me'];if(!_0x4e5e1d)throw new _0x1851d4('addcommentthreadcommand-user-not-found',null);_0x162154['addCommentThread']({'threadId':_0x1fb4d8,'channelId':_0x571106,'comments':[{'authorId':_0x4e5e1d['id'],'content':_0x69b7ed,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x42569d){for(const _0x54fe5a of _0x42569d['getItems']())if(this['_itemIsContent'](_0x54fe5a))return!0x0;return!0x1;}['_itemIsContent'](_0x476419){return _0x476419['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x476419)&&!_0x476419['is']('element','tableCell');}['_trimToContent'](_0x1e7df9){const _0x2cff8b=_0x49036b=>!this['_itemIsContent'](_0x49036b['item']),_0x45b87e=_0x1e7df9['start']['getLastMatchingPosition'](_0x2cff8b),_0xcf737c=_0x1e7df9['end']['getLastMatchingPosition'](_0x2cff8b,{'direction':'backward'});return this['editor']['model']['createRange'](_0x45b87e,_0xcf737c);}}class b extends _0x47f434{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x548bdb){super(_0x548bdb),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3dba5f=this['editor'],_0x17ccf8=_0x3dba5f['model']['document']['selection'],_0xda1bde=_0x460b6c(()=>this['refreshSelectedViews'](),0xa);_0x17ccf8['on']('change:range',(_0x341bf4,_0x111e71)=>{_0x111e71['directChange']&&(_0xda1bde['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3dba5f['editing']['view']['document'],'change:isFocused',(_0x2eaabd,_0x2728e9,_0x5d51b2)=>{_0x5d51b2&&_0xda1bde();}),this['listenTo'](_0x3dba5f['ui']['focusTracker'],'change:isFocused',(_0x343c31,_0x33dab1,_0x4a5ec8)=>{_0x4a5ec8||this['fire']('blur',{'isAnnotationTracked':_0x20bac1=>this['_editorAnnotationsData']['has'](_0x20bac1['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3f6ce2){if(this['_editorAnnotations']['has'](_0x3f6ce2['view']))return;this['_editorAnnotations']['add'](_0x3f6ce2['view']),this['editor']['ui']['focusTracker']['add'](_0x3f6ce2['view']['element']);const _0x34265a=this['editor']['plugins']['get'](y);this['listenTo'](_0x34265a['collection'],'remove',(_0x2e4199,_0x247bd2)=>{this['editor']['ui']['focusTracker']['remove'](_0x247bd2['view']['element']),this['_editorAnnotations']['delete'](_0x247bd2['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xb055fc){if('function'!=typeof _0xb055fc)throw new _0x1851d4('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xb055fc);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1e47a4,annotations:_0x3f41c3}){const _0x23ad1a=[],_0x33b2fc=this['editor']['model']['document']['selection'],_0x579a85=Array['from'](_0x33b2fc['getRanges']());for(const [_0x20f13d,_0x1bc236]of this['_editorAnnotationsData']){const _0x3edf13=_0xdddada(_0x1bc236),_0x549c71=_0x3f41c3['getByInnerView'](_0x20f13d);_0x3edf13&&_0x549c71&&_0x23ad1a['push']({'annotation':_0x549c71,'range':_0x3edf13});}function _0xdddada(_0x54e0a9){for(const _0x34b0b0 of _0x54e0a9)for(const _0x2e603a of _0x579a85)if(_0x34b0b0['containsRange'](_0x2e603a,!_0x33b2fc['isCollapsed']))return _0x34b0b0;return null;}return _0x23ad1a['sort']((_0x209c96,_0x3fa3db)=>{const _0x3c282f=_0x209c96['range'],_0x5dea25=_0x3fa3db['range'];if(!_0x3c282f['isEqual'](_0x5dea25)){if(_0x3c282f['containsRange'](_0x5dea25,!0x0))return 0x1;if(_0x5dea25['containsRange'](_0x3c282f,!0x0))return-0x1;}return _0x209c96['annotation']==_0x1e47a4?-0x1:_0x3fa3db['annotation']==_0x1e47a4?0x1:0x0;})['map'](_0x3acf72=>_0x3acf72['annotation']);}get['_editorAnnotationsData'](){const _0x3d2a5a=new Map();for(const _0x33c878 of Array['from'](this['_dataCollectors']))for(const [_0x3f348b,_0x562e56]of _0x33c878())_0x3d2a5a['set'](_0x3f348b,_0x562e56);return _0x3d2a5a;}}class st extends _0x47f434{['afterInit'](){const _0x3e2213=this['editor'];if(!_0x3e2213['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3e2213['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x47f434{constructor(_0x4f3603){super(_0x4f3603),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x532c4d=this['editor'],_0x1c88e1=_0x532c4d['commands']['get']('importWord'),_0x10672d=_0x532c4d['plugins']['get'](it);_0x1c88e1&&(_0x1c88e1['on']('execute',(_0x3a7afd,[,_0x6fcbff])=>{_0x6fcbff['collaboration_features']={'comments':!0x0,'user_id':_0x10672d['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x1c88e1,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x14f767,_0x596823){const {comment_threads:_0x23aab5}=_0x596823;_0x23aab5&&_0x23aab5['forEach'](({thread_id:_0x27e335,comments:_0x470407,is_resolved:_0x4f4626})=>{const _0x54f0f8=new Date(),_0x1e1a04=_0x470407['map'](({author:_0x4a11c4,content:_0x559b10,created_at:_0x5306be})=>({'content':_0x559b10,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x54f0f8,'attributes':{'@external':{'authorName':_0x4a11c4,'createdAt':_0x5306be?new Date(_0x5306be):new Date(),'source':'importWord'}}})),_0x4b70ba=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x4b70ba,'threadId':_0x27e335,'comments':_0x1e1a04,'resolvedAt':_0x4f4626?_0x54f0f8:null});});}}class at extends _0x47f434{constructor(_0x47c3ea){super(_0x47c3ea),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x48538a=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x48538a,'contentInsertion',(_0x4e096c,_0x562298)=>this['_removeMarkersWithoutThreads'](_0x562298['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xcf24fb){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xcf24fb;const _0x36de58=this['editor']['plugins']['get']('CommentsRepository');for(const _0x845f37 of _0xcf24fb['keys']()){const [_0x328174,_0x55dbb8]=_0x845f37['split'](':');'comment'!=_0x328174||_0x36de58['hasCommentThread'](_0x55dbb8)||_0xcf24fb['delete'](_0x845f37);}return _0xcf24fb;}['_registerMarkerInClipboardPipeline'](){const _0x37ff1e=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xa0290f=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xa0290f&&_0x37ff1e['_registerMarkerToCopy']('comment',_0xa0290f);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x52cb4c){switch(_0x52cb4c){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x4df94d){const _0x34ee69=_0x4df94d['split'](':');return{'group':_0x34ee69[0x0],'id':_0x34ee69[0x1],'part':_0x34ee69[0x2]};}class ut extends _0x47f434{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4bdd3b,_0x4a7b3a)=>{if(!_0x4a7b3a['options']['showCommentHighlights'])return null;if(_0x4a7b3a['options']['ignoreResolvedComments']){const {id:_0x59e172}=ft(_0x4bdd3b['markerName']),_0xbaabf6=this['editor']['plugins']['get'](o);if(_0xbaabf6['getCommentThread'](_0x59e172)?.['isResolved']&&_0x4bdd3b['item'])return _0x4a7b3a['consumable']['consume'](_0x4bdd3b['item'],'addMarker:'+_0x4bdd3b['markerName']),_0x4a7b3a['consumable']['consume'](_0x4bdd3b['item'],'removeMarker:'+_0x4bdd3b['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x42c1f0=>{_0x42c1f0['on']('addMarker:comment',(_0x2e7827,_0x1a745b,_0x3ec970)=>{if(!_0x3ec970['options']['showCommentHighlights'])return;const _0x418b32=_0x1a745b['item'];if(!_0x418b32)return;const _0x3bc176=_0x3ec970['mapper']['toViewElement'](_0x418b32);this['editor']['model']['schema']['isObject'](_0x418b32)&&_0x3bc176&&!_0x3bc176['getCustomProperty']('widget')&&_0x3bc176['is']('containerElement')&&_0x51b430(_0x3bc176,_0x3ec970['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2dbaa2,{writer:_0x14a03a,options:_0x2cfddb})=>{if(!_0x2cfddb['showCommentHighlights'])return null;const _0x30f7e0=_0x14a03a['createContainerElement']('div'),_0xc11910=_0x14a03a['createEmptyElement']('hr');return _0x14a03a['addClass']('ck-horizontal-line',_0x30f7e0),_0x14a03a['insert'](_0x14a03a['createPositionAt'](_0x30f7e0,0x0),_0xc11910),_0x30f7e0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x51b1c6,{writer:_0x29adaf,options:_0x1e92ed})=>{if(!_0x1e92ed['showCommentHighlights'])return null;const _0x3d8612=_0x29adaf['createContainerElement']('span'),_0x394f46=_0x29adaf['createEmptyElement']('img');return _0x29adaf['addClass']('image-inline',_0x3d8612),_0x29adaf['insert'](_0x29adaf['createPositionAt'](_0x3d8612,0x0),_0x394f46),_0x3d8612;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x1d4427,{writer:_0x3ff6cd,options:_0x10a3d5})=>{if(_0x10a3d5['showCommentHighlights'])return _0x3ff6cd['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x567103,_0x387257,_0x2828ac)=>{_0x2828ac['options']['showCommentHighlights']&&_0x567103['stop']();},{'priority':'high'});}}class r extends _0x47f434{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ec720){super(_0x4ec720),this['set']('isThreadsLoadingPaused',!0x0),_0x4ec720['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4f4db0,_0x189e05,_0x1b69a8,_0x2dc8e2)=>{const _0x4ecc5a=_0x4ec720['plugins']['get'](o),_0xa817fa=_0x1b69a8?ft(_0x1b69a8)['id']:null;_0x4ec720['model']['change'](()=>{if(_0xa817fa){const _0x372cd8=this['getAllMarkersForId'](_0xa817fa);for(const _0x4be069 of _0x372cd8)_0x4ec720['editing']['reconvertMarker'](_0x4be069);}if(_0x2dc8e2){const {id:_0x439948}=ft(_0x2dc8e2),_0x5ca641=_0x4ecc5a['getCommentThread'](_0x439948);if(_0x5ca641&&_0x5ca641['unlinkedAt'])return;if(_0x5ca641&&!_0x5ca641['isAttached'])return;const _0x316265=this['getAllMarkersForId'](_0x439948);for(const _0x2eb896 of _0x316265)_0x4ec720['editing']['reconvertMarker'](_0x2eb896);}}),_0xa817fa&&this['scrollToThreadMarker'](_0xa817fa);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x1af586=this['editor'],_0x394242=_0x1af586['plugins']['get'](o),_0x114da5=_0x1af586['config']['get']('collaboration.channelId'),_0x3bb50b=_0x394242['getCommentThreads']()['filter'](_0x3527fd=>_0x3527fd['channelId']!==_0x114da5);_0x1af586['commands']['add']('addCommentThread',new ot(_0x1af586)),this['listenTo'](_0x1af586,'change:isReadOnly',(_0x1370d8,_0x3da5e9,_0x2a3fd9)=>{_0x394242['switchReadOnly'](_0x2a3fd9,_0x1af586['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x394242,dt('addCommentThread',_0x114da5),(_0x25be24,{threadId:_0x48316d})=>{const _0x4db4d4=this['editor']['plugins']['get'](o)['getCommentThread'](_0x48316d);_0x4db4d4?.['unlinkedAt']&&this['_attachArchivedThread'](_0x48316d);}),this['listenTo'](_0x394242,dt('removeCommentThread',_0x114da5),(_0x110300,{threadId:_0x20a733})=>{_0x1af586['model']['enqueueChange']({'isUndoable':!0x1},_0xb9cd0c=>{const _0x5b54d3=this['getAllMarkersForId'](_0x20a733);for(const _0x5ad395 of _0x5b54d3)_0xb9cd0c['removeMarker'](_0x5ad395);});}),this['listenTo'](_0x394242,dt('resolveCommentThread',_0x114da5),(_0x195fa0,{threadId:_0x460942})=>{(this['_reconvertMarkers'](_0x460942),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x460942)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x394242,dt('reopenCommentThread',_0x114da5),(_0x5a7d4c,{threadId:_0x12b2fc})=>{this['_reconvertMarkers'](_0x12b2fc);},{'priority':'low'}),this['listenTo'](_0x394242,dt('addComment',_0x114da5),(_0x10cc8d,{threadId:_0x278b2b,isFromAdapter:_0x1b82a2})=>{const _0x42ff93=this['getAllMarkersForId'](_0x278b2b);if(_0x1b82a2||0x0==_0x42ff93['length']||!_0x394242['hasCommentThread'](_0x278b2b))return;0x1===_0x394242['getCommentThread'](_0x278b2b)['length']&&_0x1af586['model']['enqueueChange']({'isUndoable':!0x1},_0x3c1f0a=>{for(const _0x5bc91d of _0x42ff93)_0x3c1f0a['updateMarker'](_0x5bc91d,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x3bb50b);}['afterInit'](){!async function(_0x359227){const _0x277666=_0x261ba7([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x30eea2=0x73460ab3,_0x51a9eb=0x73417023^_0x30eea2,_0x7e84ae=window[_0x261ba7([0x44,0x61,0x74,0x65])][_0x261ba7([0x6e,0x6f,0x77])](),_0x4017d9=_0x359227[_0x261ba7([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x2f520b=new window[(_0x261ba7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3fc98e=>{_0x4017d9[_0x261ba7([0x6f,0x6e,0x63,0x65])](_0x261ba7([0x72,0x65,0x61,0x64,0x79]),_0x3fc98e);}),_0x40b1f8={[_0x261ba7([0x6b,0x74,0x79])]:_0x261ba7([0x45,0x43]),[_0x261ba7([0x75,0x73,0x65])]:_0x261ba7([0x73,0x69,0x67]),[_0x261ba7([0x63,0x72,0x76])]:_0x261ba7([0x50,0x2d,0x32,0x35,0x36]),[_0x261ba7([0x78])]:_0x261ba7([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]),[_0x261ba7([0x79])]:_0x261ba7([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]),[_0x261ba7([0x61,0x6c,0x67])]:_0x261ba7([0x45,0x53,0x32,0x35,0x36])},_0x250db9=_0x4017d9[_0x261ba7([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x261ba7([0x67,0x65,0x74])](_0x261ba7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2413b5(){let _0x476d3a,_0x1da06d=null,_0x16bb52=null;try{if(_0x250db9==_0x261ba7([0x47,0x50,0x4c]))return _0x261ba7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x476d3a=_0x54a860(),!_0x476d3a)return _0x261ba7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x476d3a[_0x261ba7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x16bb52=_0x5bcfdd(_0x476d3a[_0x261ba7([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x476d3a[_0x261ba7([0x6a,0x74,0x69])])),await _0x160617()?_0x219dd5()?_0x526b0c()?_0x261ba7([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x40d65e()?(_0x476d3a[_0x261ba7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x261ba7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1da06d=_0x523fb3(_0x261ba7([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x476d3a[_0x261ba7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x261ba7([0x74,0x72,0x69,0x61,0x6c])&&(_0x1da06d=_0x523fb3(_0x261ba7([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x41000c()):_0x261ba7([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x261ba7([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x261ba7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x261ba7([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x526b0c(){const _0xaaa9e8=[_0x261ba7([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x261ba7([0x74,0x72,0x69,0x61,0x6c])][_0x261ba7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x476d3a[_0x261ba7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x7e84ae/0x3e8:0xe10*_0x51a9eb;return _0x476d3a[_0x261ba7([0x65,0x78,0x70])]<_0xaaa9e8;}function _0x219dd5(){const _0x46c447=_0x476d3a[_0x261ba7([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x46c447)return!0x1;if(_0x46c447[_0x261ba7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x261ba7([0x2a])))return!0x0;if(_0x46c447[_0x261ba7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x261ba7([0x43,0x4d,0x54])))return!0x0;if(_0x46c447[_0x261ba7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x261ba7([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x5a5741())return!0x0;if(_0x46c447[_0x261ba7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x261ba7([0x52,0x43,0x4d,0x54]))){if(_0x513163())return!0x0;if(_0x39d467()||_0x3ccd98())return!0x0;}return!0x1;}function _0x40d65e(){const _0x29bcf5=_0x476d3a[_0x261ba7([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x29bcf5||0x0==_0x29bcf5[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x37e966}=new URL(window[_0x261ba7([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x29bcf5[_0x261ba7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x37e966))return!0x0;const _0x15d544=_0x37e966[_0x261ba7([0x73,0x70,0x6c,0x69,0x74])](_0x261ba7([0x2e]));return _0x29bcf5[_0x261ba7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x2da816=>_0x2da816[_0x261ba7([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x261ba7([0x2a])))[_0x261ba7([0x6d,0x61,0x70])](_0x143348=>_0x143348[_0x261ba7([0x73,0x70,0x6c,0x69,0x74])](_0x261ba7([0x2e])))[_0x261ba7([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x577f63=>_0x577f63[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x15d544[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x261ba7([0x6d,0x61,0x70])](_0x3fd588=>Array(_0x15d544[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3fd588[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x261ba7([0x66,0x69,0x6c,0x6c])](_0x3fd588[0x0]===_0x261ba7([0x2a])?_0x261ba7([0x2a]):'')[_0x261ba7([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3fd588))[_0x261ba7([0x73,0x6f,0x6d,0x65])](_0x5514d8=>_0x15d544[_0x261ba7([0x65,0x76,0x65,0x72,0x79])]((_0x2cb379,_0x160e6f)=>_0x5514d8[_0x160e6f]===_0x2cb379||_0x5514d8[_0x160e6f]===_0x261ba7([0x2a])));}function _0x41000c(){return _0x1da06d&&_0x16bb52?new window[(_0x261ba7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x46eaff,_0x2d6ed2)=>{_0x1da06d[_0x261ba7([0x74,0x68,0x65,0x6e])](_0x46eaff,_0x2d6ed2),_0x16bb52[_0x261ba7([0x74,0x68,0x65,0x6e])](_0xbf49a=>{_0xbf49a!=_0x261ba7([0x56,0x61,0x6c,0x69,0x64])&&_0x46eaff(_0xbf49a);},_0x2d6ed2);}):_0x1da06d||_0x16bb52||_0x261ba7([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5bcfdd(_0x3cebaf,_0xbd9a10){return new window[(_0x261ba7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1a403f=>{if(_0x384cd0())return _0x1a403f(_0x261ba7([0x56,0x61,0x6c,0x69,0x64]));_0x51ed2b(),_0x4017d9[_0x261ba7([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x261ba7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xcc5d80=!0x1;const _0x12a1fc=_0x3c34a1();function _0x355648(_0x4a5e5d){return!!_0x4a5e5d&&(typeof _0x4a5e5d===_0x261ba7([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4a5e5d===_0x261ba7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4a5e5d[_0x261ba7([0x74,0x68,0x65,0x6e])]===_0x261ba7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4a5e5d[_0x261ba7([0x63,0x61,0x74,0x63,0x68])]===_0x261ba7([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x254184(_0x8ee5df){_0x33f752(_0x8ee5df)[_0x261ba7([0x74,0x68,0x65,0x6e])](_0x17d7c3=>{if(!_0x17d7c3||_0x17d7c3[_0x261ba7([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x261ba7([0x6f,0x6b]))return _0x261ba7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1e918c(_0x5ef469(_0x12a1fc+_0xbd9a10))!=_0x17d7c3[_0x261ba7([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x261ba7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x261ba7([0x56,0x61,0x6c,0x69,0x64]);})[_0x261ba7([0x74,0x68,0x65,0x6e])](_0x5c290e=>(_0x58d1f0(),_0x5c290e),()=>{const _0x351820=_0x13f967();return null==_0x351820?(_0x58d1f0(),_0x261ba7([0x56,0x61,0x6c,0x69,0x64])):_0x261ba7(_0x7e84ae-_0x351820>(0x574a8eb3^_0x30eea2)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x261ba7([0x74,0x68,0x65,0x6e])](_0x1a403f)[_0x261ba7([0x63,0x61,0x74,0x63,0x68])](()=>{_0x1a403f(_0x261ba7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x504049=0x7370e433^_0x30eea2;function _0x58d1f0(){const _0x4cff07=_0x261ba7([0x6c,0x6c,0x63,0x74,0x2d])+_0x1e918c(_0x5ef469(_0x3cebaf)),_0x57543f=_0x4253b4(_0x1e918c(window[_0x261ba7([0x4d,0x61,0x74,0x68])][_0x261ba7([0x63,0x65,0x69,0x6c])](_0x7e84ae/_0x504049)));window[_0x261ba7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x261ba7([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4cff07,_0x57543f);}function _0x13f967(){const _0x5afd33=_0x261ba7([0x6c,0x6c,0x63,0x74,0x2d])+_0x1e918c(_0x5ef469(_0x3cebaf)),_0x4954af=window[_0x261ba7([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x261ba7([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5afd33);return _0x4954af?window[_0x261ba7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4253b4(_0x4954af),0x10)*_0x504049:null;}function _0x33f752(_0x390712){return new window[(_0x261ba7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1ee741,_0x38dd57)=>{_0x390712[_0x261ba7([0x74,0x68,0x65,0x6e])](_0x1ee741,_0x38dd57),window[_0x261ba7([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x38dd57,0x7347de73^_0x30eea2);});}}_0x4017d9[_0x261ba7([0x6f,0x6e])](_0x261ba7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x94f5b6,_0x4efd67)=>{if(_0x4efd67[0x0]!=_0x3cebaf)return _0x1a403f(_0x261ba7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x4efd67[0x1]={..._0x4efd67[0x1],[_0x261ba7([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x12a1fc};},{[_0x261ba7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x261ba7([0x68,0x69,0x67,0x68])}),_0x4017d9[_0x261ba7([0x6f,0x6e])](_0x261ba7([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x551970=>{_0x355648(_0x551970[_0x261ba7([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xcc5d80=!0x0,_0x254184(_0x551970[_0x261ba7([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x261ba7([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x261ba7([0x6c,0x6f,0x77])}),_0x2f520b[_0x261ba7([0x74,0x68,0x65,0x6e])](()=>{_0xcc5d80||_0x1a403f(_0x261ba7([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x384cd0(){return _0x4017d9[_0x261ba7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x261ba7([0x76,0x69,0x65,0x77])][_0x261ba7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x261ba7([0x61,0x75,0x74,0x6f]);}function _0x51ed2b(){_0x4017d9[_0x261ba7([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x261ba7([0x76,0x69,0x65,0x77])][_0x261ba7([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x261ba7([0x61,0x75,0x74,0x6f]);}}function _0x523fb3(_0x517773){const _0x2bf7e1=[new window[(_0x261ba7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x390ca5=>setTimeout(_0x390ca5,0x734f347f^_0x30eea2)),_0x2f520b[_0x261ba7([0x74,0x68,0x65,0x6e])](()=>new window[(_0x261ba7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2093fa=>{let _0x2bac66=0x0;_0x4017d9[_0x261ba7([0x6d,0x6f,0x64,0x65,0x6c])][_0x261ba7([0x6f,0x6e])](_0x261ba7([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x5233a8,_0x4b1a52)=>{_0x4b1a52[0x0][_0x261ba7([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2bac66++,_0x2bac66==(0x73460b4b^_0x30eea2)&&(_0x2093fa(),_0x5233a8[_0x261ba7([0x6f,0x66,0x66])]());});}))];return window[_0x261ba7([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x261ba7([0x72,0x61,0x63,0x65])](_0x2bf7e1)[_0x261ba7([0x74,0x68,0x65,0x6e])](()=>_0x517773);}async function _0x221d93(){await _0x2f520b,_0x4017d9[_0x261ba7([0x6d,0x6f,0x64,0x65,0x6c])][_0x261ba7([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x1a9c87,_0x4017d9[_0x261ba7([0x6d,0x6f,0x64,0x65,0x6c])][_0x261ba7([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x1a9c87,_0x4017d9[_0x261ba7([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x261ba7([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5a5741(){return window[_0x261ba7([0x67,0x6c,0x6f,0x62])]&&window[_0x261ba7([0x67,0x6c,0x6f,0x62])][_0x261ba7([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x513163(){return _0x257e9a(_0x261ba7([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1af1c2(_0x261ba7([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x261ba7([0x73,0x74,0x61,0x74,0x65])]==_0x261ba7([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x39d467(){return _0x257e9a(_0x261ba7([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 _0x3ccd98(){return _0x257e9a(_0x261ba7([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0xc35128(_0x48b1fd){const _0x429e87=_0x1ba25b();_0x4017d9[_0x429e87]=_0x261ba7([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x48b1fd,_0x48b1fd!=_0x261ba7([0x56,0x61,0x6c,0x69,0x64])&&_0x221d93();}function _0x1ba25b(){const _0x3d790f=window[_0x261ba7([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x261ba7([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x261ba7([0x6e,0x6f,0x77])]())[_0x261ba7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x261ba7([0x2e]),'');let _0x2d9c43=_0x261ba7([0x4b]);for(let _0x449ea0=0x0;_0x449ea0<_0x3d790f[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x449ea0+=0x2){let _0x310394=window[_0x261ba7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3d790f[_0x261ba7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x449ea0,_0x449ea0+0x2));_0x310394>=_0x277666[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x310394-=_0x277666[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x2d9c43+=_0x277666[_0x310394];}return _0x2d9c43;}function _0x54a860(){const _0x526625=_0x250db9[_0x261ba7([0x73,0x70,0x6c,0x69,0x74])](_0x261ba7([0x2e]));if(0x3!=_0x526625[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x370a60(_0x526625[0x1]);function _0x370a60(_0x706505){const _0x4c1573=_0x41ee81(_0x706505);return _0x4c1573&&_0x1eaba1()?_0x4c1573:null;function _0x1eaba1(){const _0x187aae=_0x4c1573[_0x261ba7([0x6a,0x74,0x69])],_0x35eb6f=window[_0x261ba7([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x187aae[_0x261ba7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x187aae[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x26dec4={..._0x4c1573,[_0x261ba7([0x6a,0x74,0x69])]:_0x187aae[_0x261ba7([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x187aae[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x26dec4[_0x261ba7([0x76,0x63])],_0x5ef469(_0x26dec4)==_0x35eb6f;}}}async function _0x160617(){let _0x10e6f4=!0x0;try{const _0x15b43e=_0x250db9[_0x261ba7([0x73,0x70,0x6c,0x69,0x74])](_0x261ba7([0x2e])),[_0x417f3f,_0x52b8de,_0x4f2bd1]=_0x15b43e;return _0x51d837(_0x417f3f),await _0x3c3e91(_0x417f3f,_0x52b8de,_0x4f2bd1),_0x10e6f4;}catch{return!0x1;}function _0x51d837(_0x3a0859){const _0x25db6f=_0x41ee81(_0x3a0859);_0x25db6f&&_0x25db6f[_0x261ba7([0x61,0x6c,0x67])]==_0x261ba7([0x45,0x53,0x32,0x35,0x36])||(_0x10e6f4=!0x1);}async function _0x3c3e91(_0x43b8e6,_0x506df0,_0x7fe15a){const _0x556804=window[_0x261ba7([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x261ba7([0x66,0x72,0x6f,0x6d])](_0x351f7f(_0x7fe15a),_0x24f928=>_0x24f928[_0x261ba7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x17b9d6=new window[(_0x261ba7([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x261ba7([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x43b8e6+_0x261ba7([0x2e])+_0x506df0),_0x3a6d51=window[_0x261ba7([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x261ba7([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x3a6d51)return;const _0x2d6aa6=await _0x3a6d51[_0x261ba7([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x261ba7([0x6a,0x77,0x6b]),_0x40b1f8,{[_0x261ba7([0x6e,0x61,0x6d,0x65])]:_0x261ba7([0x45,0x43,0x44,0x53,0x41]),[_0x261ba7([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x261ba7([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x261ba7([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x3a6d51[_0x261ba7([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x261ba7([0x6e,0x61,0x6d,0x65])]:_0x261ba7([0x45,0x43,0x44,0x53,0x41]),[_0x261ba7([0x68,0x61,0x73,0x68])]:{[_0x261ba7([0x6e,0x61,0x6d,0x65])]:_0x261ba7([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2d6aa6,_0x556804,_0x17b9d6)||(_0x10e6f4=!0x1);}}function _0x41ee81(_0x598d6b){return _0x598d6b[_0x261ba7([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x261ba7([0x65,0x79]))?JSON[_0x261ba7([0x70,0x61,0x72,0x73,0x65])](_0x351f7f(_0x598d6b)):null;}function _0x351f7f(_0x151bb7){return window[_0x261ba7([0x61,0x74,0x6f,0x62])](_0x151bb7[_0x261ba7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x261ba7([0x2b]))[_0x261ba7([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x261ba7([0x2f])));}function _0x5ef469(_0x2b6614){let _0x3b8ea1=0x1505;function _0x22f18f(_0x265d31){for(let _0xbdda5f=0x0;_0xbdda5f<_0x265d31[_0x261ba7([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0xbdda5f++){const _0x245730=_0x265d31[_0x261ba7([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0xbdda5f);_0x3b8ea1=(_0x3b8ea1<<0x5)+_0x3b8ea1+_0x245730,_0x3b8ea1&=_0x3b8ea1;}}function _0x3b5349(_0x3da918){Array[_0x261ba7([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3da918)?_0x3da918[_0x261ba7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3b5349):_0x3da918&&typeof _0x3da918==_0x261ba7([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x261ba7([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3da918)[_0x261ba7([0x73,0x6f,0x72,0x74])]()[_0x261ba7([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x411bca,_0x17cef0])=>{_0x22f18f(_0x411bca),_0x3b5349(_0x17cef0);}):_0x22f18f(window[_0x261ba7([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3da918));}return _0x3b5349(_0x2b6614),_0x3b8ea1>>>0x0;}function _0x1e918c(_0x534c74){return _0x534c74[_0x261ba7([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x261ba7([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x261ba7([0x30]));}function _0x4253b4(_0x3eb3c4){return _0x3eb3c4[_0x261ba7([0x73,0x70,0x6c,0x69,0x74])]('')[_0x261ba7([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x261ba7([0x6a,0x6f,0x69,0x6e])]('');}function _0x257e9a(_0x279465){return _0x4017d9[_0x261ba7([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x261ba7([0x68,0x61,0x73])](_0x279465);}function _0x1af1c2(_0x5d2f3a){return _0x4017d9[_0x261ba7([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x261ba7([0x67,0x65,0x74])](_0x5d2f3a);}function _0x1a9c87(){}function _0x261ba7(_0x78274b){return _0x78274b['map'](_0x23975=>String['fromCharCode'](_0x23975))['join']('');}_0xc35128(await _0x2413b5());}(this);}['destroy'](){const _0x3ffb31=this['editor']['plugins']['get'](o),_0x3a6e11=this['editor']['config']['get']('collaboration.channelId');for(const _0x2719aa of _0x3ffb31['getCommentThreads']({'channelId':_0x3a6e11}))_0x3ffb31['_detachCommentThread'](_0x2719aa['id']),_0x3ffb31['_threads']['delete'](_0x2719aa['id']);super['destroy']();}['hasMarkerForId'](_0x2bff62){return this['getAllMarkersForId'](_0x2bff62)['length']>0x0;}['getAllMarkersForId'](_0x3a5ab5){const _0x11c1b8=[];for(const _0x455108 of this['editor']['model']['markers'])_0x455108['name']['startsWith']('comment:'+_0x3a5ab5)&&_0x11c1b8['push'](_0x455108);return _0x11c1b8;}['scrollToThreadMarker'](_0x15220b){setTimeout(()=>{const _0x5a5363=this['_getTargetForId'](_0x15220b);if(!_0x5a5363)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x15220b&&nt({'target':_0x5a5363[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1f5ea1){this['editor']['model']['change'](()=>{for(const _0x54343e of this['getAllMarkersForId'](_0x1f5ea1))this['editor']['editing']['reconvertMarker'](_0x54343e);});}['_attachArchivedThread'](_0x2a69ee){const _0x51d6c6=this['editor']['plugins']['get'](o),_0xf31831=this['editor']['plugins']['get'](b),_0x328651=_0x51d6c6['getCommentThread'](_0x2a69ee);if(!_0x328651['isAttached']){const _0x120163=_0x328651['attachTo'](()=>this['_getTargetForId'](_0x328651['id']));_0xf31831['registerAnnotation'](_0x120163),_0x328651['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2a1447=this['editor'],_0x50bf16=_0x2a1447['plugins']['get'](it);_0x2a1447['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3ec8d2,_0x4461fb)=>{const {id:_0x1ab8db}=ft(_0x3ec8d2['markerName']),_0x57e231=_0x2a1447['plugins']['get'](o)['getCommentThread'](_0x1ab8db),_0x429c98=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x1ab8db;let _0x132f2d;if(_0x57e231&&_0x57e231['isResolved']&&!_0x429c98&&_0x3ec8d2['item'])return _0x4461fb['consumable']['consume'](_0x3ec8d2['item'],'addMarker:'+_0x3ec8d2['markerName']),_0x4461fb['consumable']['consume'](_0x3ec8d2['item'],'removeMarker:'+_0x3ec8d2['markerName']),null;const _0x1078fd=['ck-comment-marker'];return _0x429c98&&_0x1078fd['push']('ck-comment-marker--active'),_0x132f2d=_0x57e231?.['length']?_0x57e231['comments']['first']['author']['id']:_0x50bf16['me']['id'],{'classes':_0x1078fd,'attributes':{'data-comment':_0x1ab8db,'data-author-id':_0x132f2d}};}}),_0x2a1447['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x20a55c,{options:_0x3da7f7})=>{if(_0x3da7f7['showCommentHighlights'])return null;const _0x302ad7=_0x2a1447['plugins']['get'](o),_0x485137=_0x2a1447['model']['markers']['get'](_0x20a55c),{id:_0x1f9ea1,part:_0x654d41}=ft(_0x20a55c);return _0x485137&&!_0x485137['affectsData']||_0x3da7f7['ignoreResolvedComments']&&_0x302ad7['getCommentThread'](_0x1f9ea1)?.['isResolved']?null:{'group':'comment','name':_0x654d41?_0x1f9ea1+':'+_0x654d41:_0x1f9ea1};}}),_0x2a1447['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1dd8a8,{writer:_0x293ec5})=>_0x293ec5['createElement']('$marker',{'data-name':'comment:'+_0x1dd8a8['getAttribute']('id')})}),_0x2a1447['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x410baa=this['editor'],_0x28b3f6=_0x410baa['plugins']['get'](o),_0x373f46=new Set(),_0x43fae6=new Set();_0x410baa['model']['document']['registerPostFixer'](_0x43e9af=>{let _0x5131f7=!0x1;for(const {name:_0x3b6317,data:_0x1c8822}of _0x410baa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x163845,id:_0x4cdef9}=ft(_0x3b6317);let _0x50cf3e=_0x1c8822['newRange'];if('comment'!==_0x163845||!_0x50cf3e)continue;const _0xb917f4='$graveyard'===_0x50cf3e['root']['rootName'];_0xb917f4||(_0x50cf3e=ht(_0x50cf3e,_0x410baa['model']),!_0x50cf3e||_0x50cf3e['isCollapsed']||!_0x1c8822['newRange']||_0x50cf3e['isEqual'](_0x1c8822['newRange']))?_0x410baa['model']['hasContent'](_0x50cf3e)&&!_0xb917f4?this['isThreadsLoadingPaused']?_0x373f46['add'](_0x3b6317):this['_handleThreadMarker'](_0x3b6317,_0x4cdef9):(_0x43fae6['add'](_0x3b6317),_0x373f46['delete'](_0x3b6317),_0x43e9af['removeMarker'](_0x3b6317),_0x5131f7=!0x0):(_0x43e9af['updateMarker'](_0x3b6317,{'range':_0x50cf3e}),_0x5131f7=!0x0);}return _0x5131f7;}),this['on']('change:isThreadsLoadingPaused',(_0x4a1a4a,_0x3e2c72,_0xdc3e56)=>{if(!_0xdc3e56&&_0x373f46['size'])for(const _0x29bda8 of _0x373f46){const {id:_0x33c0ce}=ft(_0x29bda8);_0x373f46['delete'](_0x29bda8),_0x410baa['model']['markers']['get'](_0x29bda8)&&this['_handleThreadMarker'](_0x29bda8,_0x33c0ce);}}),this['listenTo'](_0x410baa['model']['document'],'change',()=>{for(const {name:_0x57deb0,data:{newRange:_0x1328e0}}of _0x410baa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x2b2d20,id:_0x770858}=ft(_0x57deb0);if('comment'!==_0x2b2d20)continue;const _0x95501b=_0x28b3f6['getCommentThread'](_0x770858),_0x459472=this['hasMarkerForId'](_0x770858);_0x95501b&&(!_0x95501b['_hasTargetInContent']&&_0x1328e0&&_0x410baa['editing']['view']['once']('render',()=>{const _0x590f3e=_0x410baa['plugins']['get'](y),_0x3b5572=_0x28b3f6['_threadToController']['get'](_0x95501b)['view'];_0x590f3e['getByInnerView'](_0x3b5572)['refreshVisibility']();},{'priority':'low'}),_0x95501b['_hasTargetInContent']=_0x459472||!!_0x1328e0),_0x1328e0||(_0x43fae6['add'](_0x57deb0),_0x373f46['delete'](_0x57deb0));}for(const _0x4d32e2 of _0x43fae6){const {id:_0x476278}=ft(_0x4d32e2),_0x3b101a=_0x28b3f6['getCommentThread'](_0x476278);if(_0x373f46['delete'](_0x4d32e2),!_0x3b101a)continue;const _0xe4a54e=this['hasMarkerForId'](_0x476278);_0xe4a54e||_0x3b101a['isSubmitted']?_0xe4a54e||_0x3b101a['unlinkedAt']||_0x3b101a['setUnlinkedAt'](new Date()):_0x3b101a['remove']();}_0x43fae6['clear']();});}['_handleInitialThreads'](_0x5ec2b0){_0x5ec2b0['forEach'](_0x3e9b56=>{_0x3e9b56['unlinkedAt']&&this['_attachArchivedThread'](_0x3e9b56['id']);});}['_getTargetForId'](_0x5acb6b){const _0xd7fe0d=this['editor'],_0x4b1aea=this['getAllMarkersForId'](_0x5acb6b);return et(_0xd7fe0d['editing'],_0x4b1aea);}['_getTextContext'](_0x52909d){const _0x1df3c=this['getAllMarkersForId'](_0x52909d);let _0x35c96b='',_0xc53f59=!0x1;for(const _0x2776be of _0x1df3c){const _0x114fa9=_0x2776be['getRange']();for(const _0x48da0a of Array['from'](_0x114fa9['getItems']()))_0x48da0a['is']('$textProxy')?(_0x35c96b&&_0xc53f59&&(_0x35c96b+='\x20',_0xc53f59=!0x1),_0x35c96b+=_0x48da0a['data']):_0xc53f59=!0x0;_0xc53f59=!0x0;}return _0x35c96b['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3a9b78,_0x21b817){const _0x1d375a=this['editor'],_0x2d8d97=_0x1d375a['plugins']['get'](o);let _0x5dde6a=_0x2d8d97['getCommentThread'](_0x21b817);const _0x413ad2=_0x1d375a['config']['get']('collaboration.channelId'),_0x22d9ba=_0x1d375a['plugins']['get'](b);if(_0x5dde6a&&(_0x5dde6a['unlinkedAt']&&_0x5dde6a['setUnlinkedAt'](null),_0x5dde6a['isAttached']))return _0x5dde6a;return!this['getAllMarkersForId'](_0x21b817)[0x0]['managedUsingOperations']?_0x1d375a['editing']['view']['once']('render',()=>{if(_0x2d8d97['getCommentThread'](_0x21b817))return;const _0x196331=_0x1d375a['plugins']['get'](y);_0x5dde6a=_0x2d8d97['openNewCommentThread']({'channelId':_0x413ad2,'threadId':_0x21b817,'target':()=>this['_getTargetForId'](_0x21b817),'context':{'type':'text','value':this['_getTextContext'](_0x21b817)}});const _0x6a15dd=_0x2d8d97['_threadToController']['get'](_0x5dde6a)['view'],_0x2ed3da=_0x196331['getByInnerView'](_0x6a15dd);_0x2ed3da&&_0x22d9ba['registerAnnotation'](_0x2ed3da);},{'priority':'low'}):_0x2d8d97['fetchCommentThread']({'channelId':_0x413ad2,'threadId':_0x21b817})['then'](_0xc0cbf6=>{if('destroyed'!==_0x1d375a['state']){if(_0x5dde6a=_0xc0cbf6,_0x5dde6a&&!_0x5dde6a['isAttached']){const _0x300240=_0x5dde6a['attachTo'](()=>this['_getTargetForId'](_0x21b817));_0x22d9ba['registerAnnotation'](_0x300240),_0x5dde6a['isResolved']&&this['_reconvertMarkers'](_0x21b817);}else{if(!_0x5dde6a){const _0x51f95b=this['getAllMarkersForId'](_0x21b817);_0x1d375a['model']['change'](_0x4f26ba=>{for(const _0x11131e of _0x51f95b)_0x4f26ba['removeMarker'](_0x11131e);});}}}}),_0x5dde6a;}['_handleThreadMarker'](_0x4dd9da,_0x8f53db){const _0x3902ae=this['_attachMarkerToThread'](_0x4dd9da,_0x8f53db);_0x3902ae&&!_0x3902ae['context']&&_0x3902ae['setContext']({'type':'text','value':this['_getTextContext'](_0x8f53db)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3dcae7=this['editor'];rt(_0x3dcae7['model'],({left:_0x499077,entered:_0x55e26d})=>{for(const _0xa28773 of _0x499077)if(mt(_0xa28773)){_0x3dcae7['ui']['ariaLiveAnnouncer']['announce'](N(_0x3dcae7['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1be480 of _0x55e26d)if(mt(_0x1be480)){_0x3dcae7['ui']['ariaLiveAnnouncer']['announce'](N(_0x3dcae7['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x20efa6)));break;}});}}function dt(_0x18c1f6,_0x5c1696){return _0x5c1696?_0x18c1f6+':'+_0x5c1696:_0x18c1f6;}function ht(_0x5e5b08,_0x36fbde){const _0x1b8db7=_0x36fbde['schema'],_0x336016=_0x36fbde['createRange'](_0x5e5b08['start']);for(const _0x408f9c of _0x5e5b08['getWalker']()){const {type:_0x3aea6c,item:_0x510ac1,nextPosition:_0x12a89e}=_0x408f9c;if('text'===_0x3aea6c||_0x1b8db7['isObject'](_0x510ac1)){const _0x1971a6=_0x36fbde['createPositionBefore'](_0x510ac1);_0x336016['isCollapsed']&&(_0x336016['start']=_0x1971a6),_0x336016['end']=_0x12a89e;}}return _0x336016;}function mt(_0x2ff039){return'comment'===ft(_0x2ff039['name'])['group'];}class s extends _0x47f434{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0xd60eb6=this['editor'],_0x3952d9=_0xd60eb6['plugins']['get'](o),_0x5a4023=_0xd60eb6['plugins']['get'](r),_0x6074d5=_0xd60eb6['plugins']['get'](y),_0x4f38c5=_0xd60eb6['plugins']['get'](b);_0xd60eb6['ui']['componentFactory']['add']('comment',()=>{const _0x595906=this['_createUIButton'](_0x3ee916);return _0x595906['tooltip']=!0x0,_0x595906;}),_0xd60eb6['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x174a4a)),_0x4f38c5['addSourceCollector'](()=>{const _0xda2a4=[];for(const [_0x3cd2d9,_0x253306]of _0x3952d9['_threadToController']){const _0x310a77=_0x5a4023['getAllMarkersForId'](_0x3cd2d9['id']),_0x58cc7e=_0x310a77['map'](_0x3b3544=>_0x3b3544['getRange']());_0x310a77['length']>0x0&&_0xda2a4['push']([_0x253306['view'],_0x58cc7e]);}return _0xda2a4;}),this['listenTo'](_0x6074d5,'change:activeAnnotations',(_0x16319e,_0x4a7d1a,_0x2c10bf)=>{const _0x389b5a=Array['from'](_0x2c10bf)['map'](_0x4cd02c=>_0x4cd02c['innerView'])['find'](_0x2228a0=>_0x3952d9['_viewToController']['has'](_0x2228a0));if(!_0x389b5a)return void(_0x5a4023['activeMarker']=null);const _0x477b12=_0x3952d9['_viewToController']['get'](_0x389b5a)['model']['id'],_0x40231c='comment:'+_0x477b12;_0x477b12&&_0x5a4023['hasMarkerForId'](_0x477b12)?_0x5a4023['activeMarker']=_0x40231c:_0x5a4023['activeMarker']&&(_0x5a4023['activeMarker']=null);}),this['listenTo'](_0x3952d9,'removeCommentThread',(_0x79c360,{threadId:_0x57a10d,isFromAdapter:_0x38df53})=>{!_0x38df53&&_0xd60eb6['ui']['focusTracker']['isFocused']&&_0x5a4023['hasMarkerForId'](_0x57a10d)&&_0xd60eb6['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x3952d9,'addComment',(_0x5614d2,{threadId:_0x58a9b8,isFromAdapter:_0x212de9})=>{if(_0x212de9||!_0x5a4023['hasMarkerForId'](_0x58a9b8)||!_0x3952d9['hasCommentThread'](_0x58a9b8))return;0x1===_0x3952d9['getCommentThread'](_0x58a9b8)['length']&&(_0xd60eb6['editing']['view']['focus'](),_0x5614d2['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3aa645=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5b4197;for(const _0x562763 in _0x3aa645){const _0x133e94=_0x562763,_0x3b32eb=_0x3aa645[_0x133e94];if('commentsLicenseKeyValid'==_0x3b32eb||'commentsLicenseKeyInvalid'==_0x3b32eb||'commentsLicenseKeyExpired'==_0x3b32eb||'commentsLicenseKeyDomainLimit'==_0x3b32eb||'commentsLicenseKeyNotAllowed'==_0x3b32eb||'commentsLicenseKeyEvaluationLimit'==_0x3b32eb||'commentsLicenseKeyTrialLimit'==_0x3b32eb||'commentsLicenseKeyUsageLimit'==_0x3b32eb){delete _0x3aa645[_0x133e94],_0x5b4197=_0x3b32eb,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x5b4197&&_0x3aa645['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x5b4197&&_0x3aa645['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x5b4197&&_0x3aa645['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x5b4197&&_0x3aa645['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x5b4197&&_0x3aa645['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x5b4197&&_0x3aa645['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x5b4197&&_0x3aa645['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4c0c40){const _0x1c148d=this['editor'],_0x36cf13=new _0x4c0c40(_0x1c148d['locale']),_0x5bb21c=_0x1c148d['commands']['get']('addCommentThread');return _0x36cf13['set']({'label':N(_0x1c148d['locale'],'Comment'),'icon':_0x1568a7}),_0x36cf13['bind']('isEnabled')['to'](_0x5bb21c,'isEnabled',_0x5bb21c,'hasContent',(_0x5182bc,_0x45c7d0)=>_0x5182bc&&_0x45c7d0),this['listenTo'](_0x36cf13,'execute',()=>{_0x5bb21c['execute']();}),_0x36cf13;}}class i extends _0x47f434{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x211be8){super(_0x211be8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1599c4,_0x217c2c,_0x55d3d2)=>{_0x55d3d2?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x27522b,_0x6d4320]of this['editor']['commands'])_0x6d4320['affectsData']&&'addCommentThread'!==_0x27522b&&_0x6d4320['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x197ebf=this['editor']['editing']['view']['document'];this['listenTo'](_0x197ebf,'cut',_0x1812be=>_0x1812be['stop'](),{'priority':'highest'}),this['listenTo'](_0x197ebf,'clipboardInput',_0x2ab095=>_0x2ab095['stop'](),{'priority':'highest'}),this['listenTo'](_0x197ebf,'delete',_0x3f5afe=>_0x3f5afe['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2f26a9,_0x228cb1]of this['editor']['commands'])_0x228cb1['affectsData']&&'addCommentThread'!==_0x2f26a9&&_0x228cb1['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x4e6226{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x171a31){super(_0x171a31),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x75c983=this['context']['plugins']['get'](y);this['listenTo'](_0x75c983,'_activateAnnotation',(_0x38d23d,_0x584f8b)=>{for(const _0x55a004 of this['activeUIs']){const _0x1b4f48=this['_uis']['get'](_0x55a004);(0x0,this['uisData']['get'](_0x55a004)['filter'])(_0x584f8b)&&_0x1b4f48['setActiveAnnotation'](_0x584f8b);}}),this['listenTo'](_0x75c983,'_deactivateAllAnnotations',()=>{for(const _0x386761 of this['activeUIs']){this['_uis']['get'](_0x386761)['setActiveAnnotation'](null);}}),this['listenTo'](_0x75c983['_visibleAnnotations'],'add',(_0x2ee226,_0x150ccd)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x150ccd);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4d71b4){return this['activeUIs']['has'](_0x4d71b4);}['activate'](_0x50efe0,_0x26459d=this['defaultFilter']){const _0xae2b0b=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x50efe0))throw new _0x1851d4('annotationsuis-missing-ui',this,{'uiName':_0x50efe0});this['isActive'](_0x50efe0)&&this['deactivate'](_0x50efe0),this['activeUIs']['add'](_0x50efe0);const _0x49fbc4=new S();v({'source':_0xae2b0b['_visibleAnnotations'],'target':_0x49fbc4,'filter':_0x26459d}),this['uisData']['set'](_0x50efe0,{'collection':_0x49fbc4,'filter':_0x26459d});const _0x5ea445=this['_uis']['get'](_0x50efe0);_0x5ea445['attach'](_0x49fbc4),this['listenTo'](_0x5ea445,'change:activeAnnotation',(_0x1cfea4,_0x254553,_0x34af4d,_0x154a0c)=>{_0x154a0c&&_0xae2b0b['_removeActiveAnnotation'](_0x154a0c),_0x34af4d&&_0xae2b0b['_addActiveAnnotation'](_0x34af4d);});}['deactivate'](_0x31eda0){if(this['activeUIs']['delete'](_0x31eda0),!this['_uis']['has'](_0x31eda0))throw new _0x1851d4('annotationsuis-missing-ui',this,{'uiName':_0x31eda0});const _0x5d182a=this['_uis']['get'](_0x31eda0);_0x5d182a['detach'](),this['stopListening'](_0x5d182a),this['uisData']['get'](_0x31eda0)['collection']['destroy'](),this['uisData']['delete'](_0x31eda0);}['switchTo'](_0xac1eeb){if(!this['_uis']['has'](_0xac1eeb))throw new _0x1851d4('annotationsuis-missing-ui',this,{'uiName':_0xac1eeb});const _0x54654f=this['context']['plugins']['get'](y),_0x1490f8=Array['from'](_0x54654f['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xac1eeb);const _0x45f04a=this['_uis']['get'](_0xac1eeb);_0x45f04a['setActiveAnnotation'](_0x1490f8),_0x45f04a['_setSelectedAnnotations']&&_0x1490f8&&_0x45f04a['_setSelectedAnnotations']([_0x1490f8]);}['deactivateAll'](){for(const _0x356bce of this['activeUIs'])this['deactivate'](_0x356bce);}['register'](_0x2abcd4,_0x28e79c){if(this['_uis']['has'](_0x2abcd4))throw new _0x1851d4('annotationsuis-register-already-registered');if('function'!=typeof _0x28e79c['attach']||'function'!=typeof _0x28e79c['detach']||'function'!=typeof _0x28e79c['setActiveAnnotation'])throw new _0x1851d4('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2abcd4,_0x28e79c);}['refilterAnnotations'](){const _0x23747f=this['context']['plugins']['get'](y)['collection'],_0x383516=new Map(),_0x125125=Array['from'](this['activeUIs']);for(const _0x3dc1a5 of this['activeUIs']){const _0x5d0f8d=this['uisData']['get'](_0x3dc1a5)['collection'];for(const _0x26d183 of _0x5d0f8d)_0x383516['set'](_0x26d183,_0x3dc1a5);}for(const _0xa9d09d of _0x23747f){const _0x52a871=_0x383516['get'](_0xa9d09d);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xa9d09d);const _0x39b148=_0x125125['find'](_0x583cef=>this['uisData']['get'](_0x583cef)['filter'](_0xa9d09d));_0x52a871!==_0x39b148&&(_0x52a871&&this['uisData']['get'](_0x52a871)['collection']['remove'](_0xa9d09d),_0x39b148&&this['uisData']['get'](_0x39b148)['collection']['add'](_0xa9d09d));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x10247a){const _0x17ddf8=[];for(const _0x15e4c5 of this['activeUIs']){(0x0,this['uisData']['get'](_0x15e4c5)['filter'])(_0x10247a)&&_0x17ddf8['push'](_0x15e4c5);}if(_0x17ddf8['length']>0x1)throw new _0x1851d4('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x17ddf8,'annotationType':_0x10247a['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x16222f){super(_0x16222f);const _0x32269e=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 _0x14acaa(),this['focusCycler']=new _0x1f65eb({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x32269e['to']('class')],'style':{'minHeight':_0x32269e['to']('minHeight',_0x41f84b=>'number'==typeof _0x41f84b?_i(_0x41f84b+0xa):null)},'dir':_0x16222f['uiLanguageDirection'],'role':'application','aria-label':N(_0x16222f,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x16222f,'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',_0x33ae14=>{this['_updateItemPositionInFocusables'](_0x33ae14['source']);}),this['list']['forEach'](_0x377a20=>{this['focusTracker']['add'](_0x377a20['element']),this['_updateItemPositionInFocusables'](_0x377a20);}),this['list']['on']('change',(_0x3ee74c,_0x5ad093)=>{for(const _0x2789dc of _0x5ad093['removed'])this['focusTracker']['remove'](_0x2789dc['element']),this['focusables']['remove'](_0x2789dc);for(const _0x2e4dec of _0x5ad093['added'])this['focusTracker']['add'](_0x2e4dec['element']),this['_updateItemPositionInFocusables'](_0x2e4dec);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x1aebc9){const _0x2265c1=this['focusables']['getIndex'](_0x1aebc9);let _0x29e005,_0xcadd78;for(const _0x1dc249 of this['focusables'])if(_0x1aebc9['top']<_0x1dc249['top']){_0x29e005=_0x1dc249;break;}if(_0xcadd78=_0x29e005?this['focusables']['getIndex'](_0x29e005):this['focusables']['length'],-0x1!==_0x2265c1){if(_0x2265c1===_0xcadd78-0x1)return;this['focusables']['remove'](_0x1aebc9),_0xcadd78=_0x29e005?this['focusables']['getIndex'](_0x29e005):this['focusables']['length'];}this['focusables']['add'](_0x1aebc9,_0xcadd78);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5ee8a8){super(_0x5ee8a8),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x21c6fe,_0x4d926e)=>_0x21c6fe+_0x4d926e),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x26fa61=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x26fa61['to']('isAnimationDisabled',_0x35aa3b=>_0x35aa3b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x26fa61['to']('top',_0x35227f=>Ot(_0x35227f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x2de45a=this['element']['clientHeight'];_0x2de45a&&(this['height']=_0x2de45a);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4e6226{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x525c90){super(_0x525c90),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 _0x5da8c4=this['context']['config']['get']('sidebar.container');_0x5da8c4&&this['setContainer'](_0x5da8c4);}['setContainer'](_0x32118a){if(!g(_0x32118a))throw new _0x1851d4('sidebar-setcontainer-invalid-element');this['container']=_0x32118a;}['_attachToContainer']({viewClass:_0x142284='',spaceBetweenItems:_0x3b41b2=0x19}={}){if(!g(this['container']))throw new _0x1851d4('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x142284,this['_spaceBetweenItems']=_0x3b41b2;}['rearrange']({removedAnnotation:_0x347a0c,previousAnnotation:_0x145847,nextAnnotation:_0x5077bf}){const _0x527ac1=this['getSidebarItemView'](_0x347a0c);this['view']['list']['remove'](_0x527ac1),this['_destroySidebarItemView'](_0x347a0c),_0x145847&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x145847)),_0x5077bf&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5077bf)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x1b7204,activatedAnnotation:_0x5769a2,disableAnimationOnActivatedAnnotation:_0x5bcc99}){if(this['_activeAnnotation']=_0x5769a2,_0x1b7204){_0x1b7204['isActive']=!0x1;const _0x35a5b8=this['getSidebarItemView'](_0x1b7204);_0x35a5b8&&_0x5bcc99&&(_0x35a5b8['isAnimationDisabled']=!0x1);}if(_0x5769a2){const _0x1e3dc9=this['getSidebarItemView'](_0x5769a2);_0x1e3dc9&&(_0x5769a2['isActive']=!0x0,_0x5bcc99&&(_0x1e3dc9['isAnimationDisabled']=!0x0,_0x1e3dc9['top']+=0x1),this['_alignToTargetRect'](_0x1e3dc9));}}['_detachFromContainer'](_0x37fa31){if(this['view']['element']['remove'](),_0x37fa31){for(const _0x52904f of _0x37fa31)this['_destroySidebarItemView'](_0x52904f);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x227856,_0x1ed5af){_0x1ed5af||(_0x1ed5af=_0x227856['view']);const _0x4912c8=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x4912c8,_0x227856),this['_annotationToSidebarItemView']['set'](_0x227856,_0x4912c8),_0x4912c8['content']['add'](_0x1ed5af),this['listenTo'](_0x227856['view'],'change:targetRect',(_0x35ae06,_0x286d0e,_0xc01611)=>{const _0x1e5984=this['_getTargetTop'](_0x227856,_0xc01611);_0x4912c8['_targetTop']!=_0x1e5984&&(_0x4912c8['_targetTop']=_0x1e5984,this['_setItemTop'](_0x4912c8,_0x1e5984));}),this['listenTo'](_0x4912c8,'change:top',()=>{this['_recalculate'](_0x4912c8,'top');}),this['listenTo'](_0x4912c8,'change:bottom',()=>{this['_recalculate'](_0x4912c8,'bottom');}),this['_alignToTargetRect'](_0x4912c8);const _0x106afc=this['_getItemBefore'](_0x4912c8);if(_0x106afc)this['_alignAfterItem'](_0x106afc,_0x4912c8)||this['_alignToTargetRect'](_0x4912c8);else this['_alignToTargetRect'](_0x4912c8);return this['_updateLastItem'](),this['view']['list']['add'](_0x4912c8),_0x4912c8;}['_alignForTopChange'](_0x2e70f6){if(!_0x2e70f6['content']['length'])return;const _0x319ac0=this['_getItemBefore'](_0x2e70f6);if(!_0x319ac0)return;const _0x54df38=this['_sidebarItemViewToAnnotation']['get'](_0x319ac0),_0x3cff6c=this['_activeAnnotation'];_0x3cff6c&&_0x3cff6c===_0x54df38?this['_alignAfterItem'](_0x319ac0,_0x2e70f6):this['_alignBeforeItem'](_0x2e70f6,_0x319ac0);}['_alignForBottomChange'](_0x18e1f6){if(!_0x18e1f6['content']['length'])return;const _0x185218=this['_getItemAfter'](_0x18e1f6);if(!_0x185218)return;const _0x1b1911=this['_sidebarItemViewToAnnotation']['get'](_0x185218),_0x5067e4=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x1b5ce1=this['_activeAnnotation'];_0x1b5ce1&&_0x1b5ce1===_0x1b1911&&_0x5067e4?(this['_alignBeforeItem'](_0x185218,_0x18e1f6),this['_alignAfterItem'](_0x18e1f6,_0x185218)):_0x1b5ce1&&_0x1b5ce1===_0x1b1911?this['_alignBeforeItem'](_0x185218,_0x18e1f6):this['_alignAfterItem'](_0x18e1f6,_0x185218);}['_recalculate'](_0x2e9829,_0x2f3e63){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x495bfe,changedProp:_0x42c542}of this['_recalculateBuffer'])'top'===_0x42c542?this['_alignForTopChange'](_0x495bfe):this['_alignForBottomChange'](_0x495bfe);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2e9829,'changedProp':_0x2f3e63});}['getSidebarItemView'](_0x57ad91){return this['_annotationToSidebarItemView']['get'](_0x57ad91);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x270ab4){const _0x401d49=this['getSidebarItemView'](_0x270ab4);this['stopListening'](_0x401d49),this['stopListening'](_0x270ab4['view']),_0x401d49['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x270ab4),this['_sidebarItemViewToAnnotation']['delete'](_0x401d49);}['_createSidebarView'](){const _0x58984f=new H(this['context']['locale']);return _0x58984f['render'](),this['on']('change:_lastItem',(_0x5683d2,_0x55c118,_0x437362,_0xcda2ff)=>{_0xcda2ff&&_0x58984f['unbind']('minHeight'),_0x437362?_0x58984f['bind']('minHeight')['to'](_0x437362,'bottom'):_0x58984f['minHeight']=null;}),_0x58984f;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x2b9a1e){const _0x5b85b7=this['_sidebarItemViewToAnnotation']['get'](_0x2b9a1e),_0x2356c2=_0x5b85b7&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5b85b7)-0x1);return _0x2356c2&&this['getSidebarItemView'](_0x2356c2)||null;}['_getItemAfter'](_0x57f791){const _0x268aa1=this['_sidebarItemViewToAnnotation']['get'](_0x57f791),_0x5023a1=_0x268aa1&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x268aa1)+0x1);return _0x5023a1&&this['getSidebarItemView'](_0x5023a1)||null;}['_alignBeforeItem'](_0x3e7027,_0x1621a4){_0x3e7027['updateHeight']();const _0x8708a7=G(_0x1621a4['bottom']+this['_spaceBetweenItems'],_0x3e7027['top']);return!!_0x8708a7&&(this['_setItemTop'](_0x1621a4,_0x1621a4['top']-_0x8708a7),!0x0);}['_alignAfterItem'](_0xaa7577,_0x10350f){_0xaa7577['updateHeight']();const _0x2fcf13=G(_0xaa7577['bottom']+this['_spaceBetweenItems'],_0x10350f['top']);return!!_0x2fcf13&&(this['_setItemTop'](_0x10350f,_0x10350f['top']+_0x2fcf13,!0x1),!0x0);}['_alignToTargetRect'](_0x37afc5){const _0xaff225=this['_sidebarItemViewToAnnotation']['get'](_0x37afc5);if(!_0xaff225||!_0xaff225['target']||!_0xaff225['targetRect'])return;const _0x3ef674=this['_getTargetTop'](_0xaff225,_0xaff225['targetRect']);this['_setItemTop'](_0x37afc5,_0x3ef674);}['_getTargetTop'](_0x4ec37e,_0x1d5053){if(null===_0x1d5053)return 0x0;if(_0x4ec37e['target']instanceof _0x8bd8aa)return _0x1d5053['top'];{const _0x3c17c7=new _0x8bd8aa(this['view']['element'])['top'];return _0x1d5053['top']-_0x3c17c7;}}['_setItemTop'](_0x5e98b1,_0x461ff9,_0x41af83=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x41af83&&(_0x461ff9=Math['max'](_0x461ff9,this['_getMaxAvailableTop'](_0x5e98b1))),_0x5e98b1['top']=_0x461ff9;}['_getMaxAvailableTop'](_0x1be2db){let _0x52c19f=this['_getItemBefore'](_0x1be2db),_0x30938a=0x0;for(;_0x52c19f;)_0x52c19f['updateHeight'](),_0x30938a+=this['_spaceBetweenItems']+_0x52c19f['height'],_0x52c19f=this['_getItemBefore'](_0x52c19f);return _0x30938a;}}function G(_0xc01f1e,_0x3e001b){return Math['max'](_0xc01f1e-_0x3e001b,0x0);}function g(_0x341bf6){return null!==_0x341bf6&&'object'==typeof _0x341bf6&&0x1===_0x341bf6['nodeType'];}class e extends _0x4e6226{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c5c70){super(_0x2c5c70),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x9d8aa2(),this['_refreshPositioningDebounced']=_0x460b6c(()=>{_0x2c5c70['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2983e9=this['context']['plugins']['get'](j),_0x427333=this['context']['plugins']['get'](z);_0x2983e9['register']('wideSidebar',this),_0x427333['container']&&_0x2983e9['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x470262){if(_0x470262===this['activeAnnotation'])return;const _0xa9d3fe=this['context']['plugins']['get'](z);_0xa9d3fe['_activeAnnotation']=_0x470262;const _0x1e566a=this['activeAnnotation'];_0xa9d3fe['refresh']({'blurredAnnotation':_0x1e566a,'activatedAnnotation':_0x470262}),this['activeAnnotation']=_0x470262;}['attach'](_0x4d64be){this['annotations']=_0x4d64be;const _0x56e4c1=this['context']['plugins']['get'](z);if(_0x56e4c1['_annotations']=_0x4d64be,this['isAttached'])throw new _0x1851d4('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x56e4c1,'set:container',()=>{this['detach'](),this['listenTo'](_0x56e4c1,'change:container',_0xfdd061=>{_0xfdd061['off'](),this['attach'](_0x4d64be);});}),_0x56e4c1['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x1d21c4=_0x2e668b=>{_0x2e668b['updateTargetRect'](),_0x56e4c1['addAnnotation'](_0x2e668b);};for(const _0xf1d28f of _0x4d64be)_0x1d21c4(_0xf1d28f);this['listenTo'](_0x4d64be,'add',(_0x4ad6d7,_0x47af66)=>{_0x1d21c4(_0x47af66);}),this['listenTo'](_0x4d64be,'remove',(_0x57b727,_0x32ca50,_0x41791c)=>{_0x56e4c1['rearrange']({'removedAnnotation':_0x32ca50,'previousAnnotation':_0x4d64be['get'](_0x41791c-0x1),'nextAnnotation':_0x4d64be['get'](_0x41791c+0x1)}),_0x32ca50===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4d64be,'focus',(_0x17e56a,_0x3aa7ae)=>{this['setActiveAnnotation'](_0x3aa7ae);}),this['listenTo'](_0x4d64be,'blur',()=>{this['setActiveAnnotation'](null);});const _0x386b4e=this['context']instanceof _0x3cada9?this['context']['editors']:new _0x9d8aa2([this['context']]);for(const _0x5a8d16 of _0x386b4e)this['_integrateWithEditorAnnotations'](_0x5a8d16);this['listenTo'](_0x386b4e,'add',(_0xaf1b17,_0x2d38e3)=>{this['listenTo'](_0x2d38e3,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x2d38e3);});}),this['listenTo'](_0x386b4e,'remove',(_0x43c85a,_0x19a0dd)=>{_0x19a0dd['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x19a0dd['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x1851d4('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3753bd=this['context']['plugins']['get'](z);_0x3753bd['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3753bd),this['stopListening'](this['annotations']),this['context']instanceof _0x3cada9&&this['stopListening'](this['context']['editors']);for(const _0x3b28f4 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3b28f4);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5d3b84){if(!_0x5d3b84['plugins']['has']('EditorAnnotations'))return;const _0x3d2fe9=_0x5d3b84['plugins']['get']('EditorAnnotations'),_0x576999=()=>{const _0x12fd3c=_0x3d2fe9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x12fd3c[0x0]||null);};this['listenTo'](_0x3d2fe9,'refresh',_0x576999),this['listenTo'](_0x3d2fe9,'blur',(_0x406f74,{isAnnotationTracked:_0x42593f})=>{this['activeAnnotation']&&_0x42593f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3d2fe9,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x10d1bf=>{_0x3d2fe9['hasDomSelection']()&&(_0x576999(),_0x10d1bf['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3d2fe9);}['_destroyEditorAnnotationsIntegration'](_0x445ee3){this['stopListening'](_0x445ee3),this['_editorAnnotations']['remove'](_0x445ee3);}}class C extends _0x3ee916{['counterView'];constructor(_0x7d90e6){super(_0x7d90e6);const _0x205da6=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x131f8b,_0x5c3269)=>_0x131f8b?'...':_0x5c3269['toString']()),this['set']('annotationType',''),this['icon']=_0x1568a7,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x205da6['to']('annotationType',_0x206eb8=>'ck-annotation-counter__badge--'+_0x206eb8),_0x205da6['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x205da6['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4e6226{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x171107){super(_0x171107),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3c1f6f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x9d8aa2(),this['_refreshPositioningDebounced']=_0x460b6c(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x225b52(this['context']['locale']),this['balloonPanelView']=new _0x32a398(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xda9f39){this['annotations']=_0xda9f39;const _0x22ca40=this['context']['plugins']['get'](z),_0x4fda7f=this['balloonPanelView'];if(_0x22ca40['_annotations']=_0xda9f39,this['isAttached'])throw new _0x1851d4('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x22ca40,'set:container',()=>{this['detach'](),this['listenTo'](_0x22ca40,'change:container',_0x47ff77=>{_0x47ff77['off'](),this['attach'](_0xda9f39);});}),_0x22ca40['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x55c19b=_0x76bf27=>{const _0x40a06d=new C(this['context']['locale']);_0x22ca40['addAnnotation'](_0x76bf27,_0x40a06d),this['_annotationToNarrowView']['set'](_0x76bf27,_0x40a06d),_0x40a06d['bind']('isDirty','annotationType','number')['to'](_0x76bf27['view'],'isDirty','type','length'),_0x40a06d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x4fda7f['content']['first']!==_0x76bf27['view']?(this['_showBalloon'](_0x76bf27),_0x76bf27['view']['element']['focus'](),this['setActiveAnnotation'](_0x76bf27)):this['setActiveAnnotation'](null);});};for(const _0x2ab594 of _0xda9f39)_0x55c19b(_0x2ab594);this['listenTo'](_0xda9f39,'add',(_0x35c0f7,_0x1d7439)=>{_0x55c19b(_0x1d7439);}),this['listenTo'](_0xda9f39,'remove',(_0x4a83ae,_0x551ef5,_0x216ded)=>{this['_annotationToNarrowView']['get'](_0x551ef5)['destroy'](),this['_annotationToNarrowView']['delete'](_0x551ef5),_0x22ca40['rearrange']({'removedAnnotation':_0x551ef5,'previousAnnotation':_0xda9f39['get'](_0x216ded-0x1),'nextAnnotation':_0xda9f39['get'](_0x216ded+0x1)}),_0x551ef5===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xda9f39,'focus',(_0x43c9af,_0x993cb2)=>{this['setActiveAnnotation'](_0x993cb2);}),this['listenTo'](_0xda9f39,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x42d8e9,_0x2c942c)=>{_0x2c942c['keyCode']===_0x5571fc['esc']&&_0x4fda7f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x4fda7f['content']['first']),this['_hideBalloon'](),_0x2c942c['stopPropagation'](),_0x2c942c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2c76fd,_0x8d14f7)=>{const _0x3bbabc=_0x8d14f7['target'];_0x4fda7f['isVisible']&&_0x4fda7f['element']['contains'](_0x3bbabc)||_0x22ca40['view']['element']['contains'](_0x3bbabc)||_0x2c76fd['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3f2fba=>_0x3f2fba['contains'](_0x3bbabc))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x5c1b7a=this['context']instanceof _0x3cada9?this['context']['editors']:new _0x9d8aa2([this['context']]);for(const _0x7bb301 of _0x5c1b7a)this['_integrateWithEditorAnnotations'](_0x7bb301);this['listenTo'](_0x5c1b7a,'add',(_0x54891d,_0x58d333)=>{this['listenTo'](_0x58d333,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x58d333);});}),this['listenTo'](_0x5c1b7a,'remove',(_0x8abbbc,_0x1deaa4)=>{_0x1deaa4['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1deaa4['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x21fade){if(_0x21fade===this['activeAnnotation'])return;const _0x44ef24=this['context']['plugins']['get'](z);if(_0x44ef24['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x21fade,'disableAnimationOnActivatedAnnotation':!0x0}),_0x21fade)_0x44ef24['getSidebarItemView'](_0x21fade)?this['_showBalloon'](_0x21fade):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x21fade;}['detach'](){if(!this['isAttached'])throw new _0x1851d4('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5800e4=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0xfc13f9=>_0xfc13f9['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5800e4['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3cada9&&this['stopListening'](this['context']['editors']);for(const _0x3d13cd of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x3d13cd);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'](_0x1bc0e4){if(!_0x1bc0e4['plugins']['has']('EditorAnnotations'))return;const _0x23ffb4=_0x1bc0e4['plugins']['get']('EditorAnnotations'),_0x2bb980=this['context']['plugins']['get'](z),_0x1d41fb=this['annotations'],_0x407db2=this['balloonPanelView'],_0x437a9b=()=>{const _0x3ca439=_0x23ffb4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3ca439),this['setActiveAnnotation'](_0x3ca439[0x0]||null);};this['listenTo'](_0x23ffb4,'refresh',_0x437a9b),this['listenTo'](_0x23ffb4,'blur',(_0xfc4c19,{isAnnotationTracked:_0x5598b7})=>{this['activeAnnotation']&&_0x5598b7(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x23ffb4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1d41fb,'blur',_0x14448d=>{_0x23ffb4['hasDomSelection']()&&_0x14448d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x52788c,_0x4ca85d)=>{const _0x45e4cf=_0x4ca85d['target'];_0x407db2['isVisible']&&_0x407db2['element']['contains'](_0x45e4cf)||_0x2bb980['view']['element']['contains'](_0x45e4cf)||this['activeAnnotation']&&_0x23ffb4['hasDomSelection']()&&(_0x437a9b(),_0x52788c['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x23ffb4);}['_destroyEditorAnnotationsIntegration'](_0x1278e9){_0x1278e9&&(this['stopListening'](_0x1278e9),this['_editorAnnotations']['remove'](_0x1278e9));}['_setSelectedAnnotations'](_0x19c0e1){for(const _0x1367c4 of this['_selectedAnnotations'])_0x19c0e1['includes'](_0x1367c4)||this['_manuallyClosedAnnotationViews']['delete'](_0x1367c4['view']);this['_selectedAnnotations']=_0x19c0e1;}['_refreshPositioning'](){const _0x40144d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x40144d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xfc1e33){if(this['_manuallyClosedAnnotationViews']['has'](_0xfc1e33['view']))return;const _0x250e64=this['balloonPanelView']['content']['first'];_0x250e64!==_0xfc1e33['view']?(_0x250e64&&this['_detachListeners'](_0x250e64),this['_attachListeners'](_0xfc1e33['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xfc1e33['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x50e251=this['balloonPanelView']['content']['first'],_0x155371=_0x50e251&&this['annotations']['getByView'](_0x50e251);if(!_0x155371||!this['_annotationToNarrowView']['has'](_0x155371))return;const _0x5249de=this['_annotationToNarrowView']['get'](_0x155371)['element'],_0x2a3e83=(function(){const _0x217215=_0x32a398['defaultPositions'];return[_0x217215['southArrowNorthEast'],_0x217215['northArrowSouthEast'],_0x217215['southArrowNorth'],_0x217215['northArrowSouth'],_0x217215['southArrowNorthWest'],_0x217215['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5249de,'positions':_0x2a3e83});}['_hideBalloon'](){const _0x3711a0=this['balloonPanelView'],_0x596b39=_0x3711a0['content']['first'];_0x596b39&&(this['_detachListeners'](_0x596b39),_0x3711a0['unpin'](),_0x3711a0['content']['clear']());}['_attachListeners'](_0x9efb87){this['listenTo'](_0x9efb87,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x9efb87,'Esc',(_0xd3d2c7,_0x16951d)=>{this['_manuallyClosedAnnotationViews']['add'](_0x9efb87),this['_hideBalloon'](),_0x16951d();});}['_detachListeners'](_0x2ec8e9){this['stopListening'](_0x2ec8e9);}}class c extends _0x47f434{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x226e1c,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x170063){super(_0x170063),_0x170063['editing']['view']['addObserver'](_0xc33936),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x170063['plugins']['get'](_0x226e1c),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x1ab1e4=this['editor']['plugins']['get'](j);_0x1ab1e4['context']===this['editor']&&(_0x1ab1e4['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x45ecd7,_0x230685)=>{const _0x3ab29d=this['_balloon'];if(this['isAttached']&&_0x3ab29d['visibleView']){const _0x2f4a3d=this['annotations']['getByView'](_0x3ab29d['visibleView']);_0x2f4a3d&&this['_closeAnnotation'](_0x2f4a3d),_0x230685();}}));}['afterInit'](){const _0x4318dc=this['editor']['plugins']['get'](j);_0x4318dc['context']===this['editor']&&(_0x4318dc['hasActive']()||_0x4318dc['switchTo']('inline'));}['setActiveAnnotation'](_0x5ddeaf){_0x5ddeaf!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5ddeaf&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5ddeaf)&&this['_addAnnotationToBalloon'](_0x5ddeaf,!0x0),_0x5ddeaf['isActive']=!0x0),_0x5ddeaf||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5ddeaf);}['attach'](_0x13b2fc){this['annotations']=_0x13b2fc;const _0x59b9fd=this['editor']['plugins']['get'](j),_0x27d2a5=this['_balloon'];if(this['isAttached'])throw new _0x1851d4('inlineannotations-attach-already-attached',this);if(_0x59b9fd['context']!==this['editor'])throw new _0x1851d4('inlineannotations-not-allowed-with-context',this);const _0xec86e9=this['editor']['plugins']['get'](b);this['listenTo'](_0xec86e9,'refresh',()=>{const _0x3aa175=_0xec86e9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3623b5,_0x251c84;!this['_forceRefresh']&&(_0x3623b5=_0x3aa175,_0x251c84=this['_selectedAnnotations'],_0x3623b5['length']===_0x251c84['length']&&_0x3623b5['every'](_0x47feb4=>_0x251c84['includes'](_0x47feb4)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3aa175),this['setActiveAnnotation'](_0x3aa175[0x0]||null));}),this['listenTo'](_0xec86e9,'blur',(_0x39c0a2,{isAnnotationTracked:_0x39538d})=>{this['activeAnnotation']&&_0x39538d(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x52c70e,_0x1443fa,_0x421c6a)=>{_0x421c6a||this['setActiveAnnotation'](null);}),this['listenTo'](_0x13b2fc,'remove',(_0x15f196,_0x240b8f)=>{this['_removeAnnotationFromBalloon'](_0x240b8f),_0x240b8f===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x27d2a5,'change:visibleView',(_0x2893d5,_0x3611f5,_0x1333fd,_0x28135d)=>{_0x28135d&&this['stopListening'](_0x28135d);const _0x5709f3=_0x13b2fc['getByView'](_0x1333fd);_0x1333fd&&_0x5709f3&&(this['listenTo'](_0x1333fd,'change:height',()=>{_0x27d2a5['updatePosition']();}),this['listenTo'](_0x1333fd,'Esc',()=>{this['_closeAnnotation'](_0x5709f3),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5709f3&&this['setActiveAnnotation'](_0x5709f3));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x27d2a5['visibleView']&&(_0x13b2fc['getByView'](_0x27d2a5['visibleView'])&&_0x27d2a5['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 _0x1851d4('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x49747d of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x49747d);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x186bc8){for(const _0x3829ab of this['_selectedAnnotations'])_0x186bc8['includes'](_0x3829ab)||this['_manuallyClosed']['delete'](_0x3829ab);for(const _0x17a94c of this['annotations'])_0x186bc8['includes'](_0x17a94c)||this['_removeAnnotationFromBalloon'](_0x17a94c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x250a0f of _0x186bc8)this['_addAnnotationToBalloon'](_0x250a0f);}this['_selectedAnnotations']=_0x186bc8;}['_addAnnotationToBalloon'](_0xab1229,_0x151894=!0x1){this['_manuallyClosed']['has'](_0xab1229)||(this['_addedAnnotations']['has'](_0xab1229)||this['_balloon']['hasView'](_0xab1229['view'])||(this['_addedAnnotations']['add'](_0xab1229),this['_balloon']['add']({'stackId':_0xab1229['view']['id'],'view':_0xab1229['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xab1229)}})),_0x151894&&this['_balloon']['showStack'](_0xab1229['view']['id']));}['_getBalloonTargetForAnnotation'](_0xf594b9){const _0x5ee346=_0xf594b9['target'],_0x30c5a4=this['editor']['editing']['view'],_0x39c0de=_0x30c5a4['document']['selection']['getFirstRange'](),_0x1de2f0=_0x30c5a4['domConverter']['viewRangeToDom'](_0x39c0de);if(_0x1de2f0['collapse'](!0x0),_0x5ee346){if(_0x5ee346 instanceof _0x8bd8aa)return _0x5ee346;let _0x4082cf=[];for(const _0x46c9cc of _0x5ee346)_0x4082cf['push'](...F(_0x46c9cc['getClientRects']()));_0x4082cf=function(_0x3a65ce){const _0x2a3e01=[];let _0x3256ce=_0x3a65ce[0x0];for(let _0x6e0408=0x1;_0x6e0408<_0x3a65ce['length'];_0x6e0408++)P(_0x3256ce,_0x3a65ce[_0x6e0408])?_0x3256ce['width']+=_0x3a65ce[_0x6e0408]['width']:(_0x2a3e01['push'](_0x3256ce),_0x3256ce=_0x3a65ce[_0x6e0408]);return _0x2a3e01['push'](_0x3256ce),_0x2a3e01;}(_0x4082cf);const _0x179890=_0x1de2f0['getBoundingClientRect']();return _0x4082cf['find'](_0x4b111a=>_0x4b111a['top']<=_0x179890['top']&&_0x4b111a['bottom']>=_0x179890['bottom']&&_0x4b111a['left']<=_0x179890['left']&&_0x4b111a['right']>=_0x179890['right'])||_0x4082cf[0x0];}return _0xf594b9['targetRect']||_0x1de2f0;}['_removeAnnotationFromBalloon'](_0x28e01b){this['_addedAnnotations']['has'](_0x28e01b)&&this['_balloon']['hasView'](_0x28e01b['view'])&&(this['_addedAnnotations']['delete'](_0x28e01b),this['_balloon']['remove'](_0x28e01b['view']));}['_closeAnnotation'](_0x2d3744){this['_manuallyClosed']['add'](_0x2d3744),this['_removeAnnotationFromBalloon'](_0x2d3744);}}function F(_0x34807f){return Array['from'](_0x34807f)['map'](DOMRect['fromRect']);}function P(_0x392c50,_0x263a13){return _0x392c50['top']===_0x263a13['top']&&_0x392c50['bottom']===_0x263a13['bottom']&&_0x392c50['right']===_0x263a13['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1ede02,_0x1eb3ee){super(_0x1ede02),this['set']('isEmpty',!_0x1eb3ee['length']),this['focusTracker']=new _0x14acaa(),this['_annotationViews']=_0x1eb3ee,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x1f65eb({'focusables':_0x1eb3ee,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1eb3ee,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1eb3ee,'remove',(_0xd273f9,_0x29181)=>{_0x29181['isActive']&&this['focus'](),_0x1eb3ee['length']||(this['isEmpty']=!0x0);});const _0x133559=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1ede02,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1eb3ee},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x133559['if']('isEmpty','ck-hidden',_0x234bc1=>!_0x234bc1)]},'children':[{'text':N(_0x1ede02,'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 _0x5ad933 of this['_annotationViews'])this['focusTracker']['add'](_0x5ad933['element']);this['_annotationViews']['on']('change',(_0x35243a,{added:_0x57e445,removed:_0x5516a2})=>{for(const _0x41595c of _0x57e445)this['focusTracker']['add'](_0x41595c['element']);for(const _0x34d786 of _0x5516a2)this['focusTracker']['remove'](_0x34d786['element']);});}}class p extends _0x4e6226{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x791237){super(_0x791237),this['archivedThreads']=new _0x9d8aa2();}['init'](){const _0x78d658=this['context'],_0x311806=_0x78d658['plugins']['get'](o),_0x4fe613=_0x78d658['plugins']['get'](y);this['listenTo'](_0x311806,'addCommentThread',(_0x106694,{threadId:_0x46b1d2})=>{const _0x497fa5=_0x311806['getCommentThread'](_0x46b1d2);_0x497fa5['archivedAt']&&this['archivedThreads']['add'](_0x497fa5,this['_calculatePosition'](_0x497fa5['archivedAt'])),this['listenTo'](_0x497fa5,'change:archivedAt',(_0x399c50,_0x39c709,_0x5c99d3)=>{_0x5c99d3?this['archivedThreads']['has'](_0x497fa5)||this['archivedThreads']['add'](_0x497fa5,this['_calculatePosition'](_0x497fa5['archivedAt'])):this['archivedThreads']['has'](_0x497fa5)&&this['archivedThreads']['remove'](_0x497fa5);});}),this['listenTo'](_0x311806,'removeCommentThread',(_0x515705,{threadId:_0x3a5b26})=>{const _0x1d2171=_0x311806['getCommentThread'](_0x3a5b26);this['stopListening'](_0x1d2171),this['archivedThreads']['has'](_0x1d2171)&&this['archivedThreads']['remove'](_0x1d2171);},{'priority':'highest'}),this['listenTo'](_0x4fe613['collection'],'focus',(_0x2f277d,_0x5b7f4f)=>{_0x5b7f4f['isVisible']||(_0x5b7f4f['isActive']=!0x0,_0x4fe613['activate'](_0x5b7f4f));});}['_calculatePosition'](_0x578a65){const _0x1f56fd=[...this['archivedThreads']]['findIndex'](_0x5cb1b5=>_0x5cb1b5['archivedAt']<_0x578a65);return _0x1f56fd>-0x1?_0x1f56fd:this['archivedThreads']['length'];}}class a extends _0x47f434{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x322339];}constructor(_0x5e241e){super(_0x5e241e),this['annotationViews']=new _0x4e362f(),this['_pendingThreads']=[];}['init'](){const _0x92ee5b=this['editor'],_0x1d2d1c=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x92ee5b['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3ee916,!0x0)),_0x92ee5b['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x1aa50e=this['_createCommentsArchiveButton'](_0x174a4a);return _0x1aa50e['set']({'role':'menuitemcheckbox'}),_0x1aa50e;});const _0x55fefb=_0x92ee5b['plugins']['get'](p),_0x2bbba6=_0x92ee5b['plugins']['get']('Annotations'),_0x610ef2=_0x92ee5b['plugins']['get']('CommentsRepository');_0x55fefb['archivedThreads']['forEach'](_0x3b9ed4=>{this['_handleNewThread'](_0x3b9ed4);}),this['listenTo'](_0x55fefb['archivedThreads'],'add',(_0x3146f6,_0x12dd85)=>{this['_handleNewThread'](_0x12dd85);}),this['listenTo'](_0x2bbba6['collection'],'add',(_0x520888,_0x118420)=>{const _0x225192=this['_pendingThreads']['find'](_0x273fc9=>{const _0x32b17b=_0x610ef2['_threadToController']['get'](_0x273fc9);return _0x32b17b&&_0x118420['innerView']===_0x32b17b['view'];});if(_0x225192){const _0x1e35e2=this['_calculatePosition'](_0x225192['archivedAt']);this['_addAnnotationToArchive'](_0x118420,_0x1e35e2),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x225192),0x1);}}),this['listenTo'](_0x55fefb['archivedThreads'],'remove',(_0x2f5833,_0x27a053)=>{const _0x467147=_0x92ee5b['config']['get']('collaboration.channelId');if(!_0x467147||_0x27a053['channelId']===_0x467147){if(this['_pendingThreads']['includes'](_0x27a053))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x27a053),0x1);else{const _0x2d74e7=_0x610ef2['_threadToController']['get'](_0x27a053),_0x53aa3e=_0x2bbba6['getByInnerView'](_0x2d74e7['view']);this['annotationViews']['remove'](_0x53aa3e['view']),this['stopListening'](_0x53aa3e),this['stopListening'](_0x53aa3e['focusableElements']);}}}),this['listenTo'](_0x2bbba6['collection'],'add',(_0x530497,_0x3c568a)=>{this['listenTo'](_0x3c568a,'escape',_0x1d2d1c);}),this['listenTo'](_0x2bbba6['collection'],'remove',(_0x2657e2,_0x1d9f1f)=>{this['stopListening'](_0x1d9f1f,'escape',_0x1d2d1c);});}['_addAnnotationToArchive'](_0x3bbd36,_0x53f991){this['listenTo'](_0x3bbd36,'set:isVisible',_0xe2db56=>{_0xe2db56['return']=!0x1,_0xe2db56['stop']();}),this['annotationViews']['add'](_0x3bbd36['view'],_0x53f991);}['_handleNewThread'](_0x486c5c){const _0x455291=this['editor']['plugins']['get']('CommentsRepository'),_0x276b0c=this['editor']['plugins']['get']('Annotations'),_0x4dcf1b=this['editor']['config']['get']('collaboration.channelId');if(!_0x4dcf1b||_0x486c5c['channelId']===_0x4dcf1b){const _0x42d48b=_0x455291['_threadToController']['get'](_0x486c5c);if(!_0x42d48b)return void this['_pendingThreads']['push'](_0x486c5c);const _0x5ab57f=this['_calculatePosition'](_0x486c5c['archivedAt']),_0x71dd51=_0x276b0c['getByInnerView'](_0x42d48b['view']);_0x71dd51['isVisible']&&_0x276b0c['_visibleAnnotations']['remove'](_0x71dd51),this['_addAnnotationToArchive'](_0x71dd51,_0x5ab57f);}}['_calculatePosition'](_0xfe1735){const _0x1a9ac1=this['editor']['config']['get']('collaboration.channelId'),_0xfc0f8d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x53113e=>_0x53113e['channelId']===_0x1a9ac1)['findIndex'](_0x454523=>_0x454523['archivedAt']<_0xfe1735);return _0xfc0f8d<0x0||_0xfc0f8d>this['annotationViews']['length']?this['annotationViews']['length']:_0xfc0f8d-0x1;}['_toggleDialog'](){const _0x17e8d8=this['editor'],_0x4449d6=_0x17e8d8['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x17e8d8['locale'],this['annotationViews'])),'commentsArchive'===_0x4449d6['id']?_0x4449d6['hide']():_0x4449d6['show']({'id':'commentsArchive','title':N(_0x17e8d8['locale'],'COMMENTS_ARCHIVE'),'icon':_0x91df9c,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x36a5c2['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x33d741,_0x1389d6=!0x1){const _0x5d7824=this['editor']['locale'],_0x4ba2fe=this['editor']['plugins']['get']('Dialog'),_0x363ae9=new _0x33d741(_0x5d7824);return _0x363ae9['bind']('isEnabled')['to'](this,'isEnabled'),_0x363ae9['bind']('isOn')['to'](_0x4ba2fe,'id',_0x4cde50=>'commentsArchive'===_0x4cde50),_0x363ae9['set']({'label':N(_0x5d7824,'COMMENTS_ARCHIVE'),'icon':_0x91df9c,'isToggleable':!0x0}),_0x1389d6&&(_0x363ae9['tooltip']=!0x0),this['listenTo'](_0x363ae9,'execute',()=>this['_toggleDialog']()),_0x363ae9;}['_hideDialogOnAnnotationEscape']=_0x5ebc3a=>{const _0x4fdcba=_0x5ebc3a['source'];if(!this['annotationViews']['has'](_0x4fdcba['view']))return;const _0x2bf93f=this['editor']['plugins']['get']('Dialog');_0x2bf93f['isOpen']&&'commentsArchive'===_0x2bf93f['id']&&(_0x2bf93f['hide'](),_0x5ebc3a['stop']());};}class gi extends _0x47f434{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|