@ckeditor/ckeditor5-comments 46.0.0-alpha.1 → 46.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x4f0645={}){function _0x2f11e2(_0x53304c){return _0x53304c['map'](_0x4e4bab=>String['fromCharCode'](_0x4e4bab))['join']('');}(_0x4f0645=Object['assign']({},_0x4f0645))['plugins']||(_0x4f0645['plugins']=Qt['defaultPlugins']),super(_0x4f0645),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2f11e2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f11e2([0x76,0x69,0x65,0x77])][_0x2f11e2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2f11e2([0x61,0x75,0x74,0x6f]),this[_0x2f11e2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2f11e2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2f11e2([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2f11e2([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2f11e2([0x6f,0x6b])});}['create'](){const _0x8f4ac7=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x8f4ac7))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x505078=>{const _0x12287c=this['model']['document']['getRoot'](),_0x59a9b9=_0x12287c&&_0x12287c['getChild'](_0x12287c['childCount']-0x1);_0x505078['setSelection'](_0x59a9b9,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x53d8de=this['editing']['view'],_0x131ccf=_0x53d8de['document']['getRoot'](),_0x1338fe=_0x131ccf['getChild'](0x0);_0x131ccf['childCount']>0x1||!_0x1338fe||'p'!=_0x1338fe['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x53d8de,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1338fe['placeholder']=this['placeholder']),St({'view':_0x53d8de,'element':_0x1338fe,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1338fe);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x49abf0,_0xbd2630={}){super(_0x49abf0),this['editor']=null,this['_editorConfig']=_0xbd2630,this['set']('value',_0xbd2630['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x49abf0,'Reply...')),this['set']('submitLabel',N(_0x49abf0,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x4cfdf8(),this['focusCycler']=new _0x59c832({'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',(_0x3d3d61,_0x46a8a2)=>{this['cancelButtonView']['fire']('execute'),_0x46a8a2();}),this['keystrokes']['set']('Ctrl+Enter',(_0x32f964,_0x430e2f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x430e2f());}),this['on']('submit',(_0xd30500,_0x5a7bf3)=>{_0x5a7bf3['length']>0xfde8?(alert(N(_0x49abf0,'TOO_LONG_COMMENT_ALERT',[_0x5a7bf3['length'],0xfde8])),_0xd30500['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x5cc662=this['editor'];this['element']['insertBefore'](_0x5cc662['ui']['element'],this['element']['firstChild']),_0x5cc662['model']['document']['on']('change',()=>this['value']=_0x5cc662['getData']()),_0x5cc662['bind']('placeholder')['to'](this),this['focusables']['add'](_0x5cc662['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2a04e2){-0x1===_0x2a04e2?(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:_0x57be77}=this,_0x480dc1=new _0x50efaa(_0x57be77);return _0x480dc1['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x480dc1['withText']=!0x0,_0x480dc1['bind']('label')['to'](this,'submitLabel'),_0x480dc1['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x480dc1['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x43d6b2,_0x3733e5)=>!_0x3733e5&&!!_0x43d6b2['trim']()),_0x480dc1;}['_createCancelButton'](){const {locale:_0x8394e7}=this,_0xefc372=new _0x50efaa(_0x8394e7);return _0xefc372['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0xefc372['label']=N(_0x8394e7,'Cancel'),_0xefc372['withText']=!0x0,_0xefc372['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0xefc372;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x16ef0e=>{this['focusTracker']['add'](_0x16ef0e['element']);}),this['focusables']['on']('change',(_0xc5dd08,_0x4046e1)=>{for(const _0x46c97b of Array['from'](_0x4046e1['added'])['reverse']())this['focusTracker']['add'](_0x46c97b['element']);});}}class ie extends kt{constructor(_0x1a0575,_0x7903d0,_0xdde378){super(_0x1a0575),this['commentInputView']=new es(_0x1a0575,_0xdde378),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x5238dc,_0x45c362)=>_0x5238dc||!!_0x45c362),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 _0x4daedd(_0x1a0575,_0x7903d0),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'](_0x3976fb){this['commentInputView']['focus'](_0x3976fb);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x197984,_0x2b4843)=>{const {submitButtonView:_0x125fbf,cancelButtonView:_0x37c7b3,editor:_0x221a5f}=this['commentInputView'];[_0x125fbf['element'],_0x37c7b3['element'],_0x221a5f?_0x221a5f['editing']['view']['getDomRoot']():null]['filter'](_0x5bbd37=>_0x5bbd37)['some'](_0x4d140c=>_0x4d140c['contains'](_0x2b4843['target']))||(this['focus'](),_0x2b4843['preventDefault']());});}}class os extends kt{constructor(_0x593346){super(_0x593346);const _0x382568=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x382568['to']('count',_0x6c6f80=>N(_0x593346,'NUMBER_OF_COMMENTS',_0x6c6f80))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3e6eec,_0x16faae,_0x1dcbd7){super(_0x3e6eec);const _0x12f7bb=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x16faae['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x16faae,this['_config']=_0x1dcbd7,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4cfdf8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x59c832({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x2983ba=>this['commentViews']['map'](_0x5c6a87=>_0x5c6a87['element'])['includes'](_0x2983ba['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x3e6eec),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x561890=>_0x561890-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5a481f of _0x16faae['comments'])this['_handleNewCommentModel'](_0x5a481f);this['_handleInfoComment'](),this['listenTo'](_0x16faae['comments'],'add',(_0x5e6105,_0x388257)=>{const _0x48cdd8=this['_calculatePosition'](_0x388257);this['length']++,this['_handleNewCommentModel'](_0x388257,_0x48cdd8),this['refreshVisibleViews']();}),this['listenTo'](_0x16faae['comments'],'remove',(_0x567558,_0x19839a)=>{this['length']--,this['_handleRemoveCommentModel'](_0x19839a),this['refreshVisibleViews']();}),this['listenTo'](_0x16faae,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x16faae,'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',_0x12f7bb['if']('length','ck-hidden',_0x2d4b32=>!_0x2d4b32)],'aria-label':N(_0x3e6eec,'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'](_0xfc9d1){-0x1===_0xfc9d1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x4bbc2b of this['commentViews'])_0x4bbc2b['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x47a7aa,_0x167f8d){const _0x3d8c5a=new this['_config']['CommentView'](this['locale'],_0x47a7aa,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3d8c5a['viewUid']=_0x47a7aa['id'],_0x3d8c5a['delegate']('removeComment')['to'](this),_0x3d8c5a['delegate']('updateComment')['to'](this),_0x3d8c5a['delegate']('resolveCommentThread')['to'](this),_0x3d8c5a['delegate']('editorReady')['to'](this),_0x3d8c5a['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3d8c5a,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3d8c5a,_0x167f8d);}['_calculatePosition'](_0x43eac3){const _0x18d815=this['_model']['_findOptimalIndex'](_0x43eac3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x43eac3['authoredAt']?_0x18d815-0x1:_0x18d815:_0x18d815-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x11fe8c={'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'],_0x11fe8c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x11fe8c));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x161fbe){const _0x38588a=this['commentViews']['remove'](_0x161fbe['id']);this['stopListening'](_0x38588a),_0x38588a['isEditMode']&&this['_updateHasDirtyComment'](),_0x38588a['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x3d0cd5=>_0x3d0cd5['isEditMode']);}['_rearrangeCollapse'](){const _0x4c7b77=function(_0x18e671){const _0x40199a=new _0x364175();for(const _0x32744b of _0x18e671)_0x40199a['add'](_0x32744b);return _0x40199a;}(this['commentViews']),_0x2d403b=this['_collapsedCommentsView']['count'];for(let _0x3097f0=0x1;_0x3097f0<=_0x2d403b;_0x3097f0++)_0x4c7b77['remove'](0x1);for(const _0x5a656c of _0x4c7b77)_0x5a656c['collapse']();_0x2d403b>0x0&&_0x4c7b77['add'](this['_collapsedCommentsView'],0x1),rs(_0x30600f(Array['from'](this['visibleViews']),Array['from'](_0x4c7b77)),this['visibleViews'],_0x4c7b77);}['_rearrangeExpand'](){rs(_0x30600f(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x571214 of this['visibleViews'])_0x571214['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1bbb9a=>{this['focusTracker']['add'](_0x1bbb9a['element']),this['keystrokes']['listenTo'](_0x1bbb9a['element']);}),this['commentViews']['on']('change',(_0x251892,_0x4671bc)=>{for(const _0x4119ec of _0x4671bc['removed'])this['focusTracker']['remove'](_0x4119ec['element']),this['keystrokes']['stopListening'](_0x4119ec['element']);for(const _0x5a78e3 of Array['from'](_0x4671bc['added'])['reverse']())this['focusTracker']['add'](_0x5a78e3['element']),this['keystrokes']['listenTo'](_0x5a78e3['element']);});}}function rs(_0x1494d1,_0x38860b,_0x4c0f59){let _0x9ba6aa=0x0;for(const _0x559b6e of _0x1494d1)switch(_0x559b6e){case'insert':_0x38860b['add'](_0x4c0f59['get'](_0x9ba6aa),_0x9ba6aa),_0x9ba6aa++;break;case'delete':_0x38860b['remove'](_0x9ba6aa);break;case'equal':_0x9ba6aa++;}}class oe extends kt{constructor(_0x395f9f){super(_0x395f9f);const _0x3b8227=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3b8227['to']('contextValue',_0x3abf70=>N(_0x395f9f,'THREAD_CONTEXT_LABEL',_0x3abf70)),'tabindex':-0x1},'children':[{'text':_0x3b8227['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x96f08a,_0x48171a){super(_0x96f08a);const _0x156430=this['bindTemplate'];this['_model']=_0x48171a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4cfdf8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x59c832({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x93bc52=>!!_0x93bc52),this['bind']('contextValue')['to'](this['_model'],'context',_0x1f2d75=>_0x1f2d75&&_0x1f2d75['value']?this['_trimContextValue'](_0x1f2d75['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',_0x156430['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 _0x546ed9=new _0x50efaa(this['locale']);return _0x546ed9['label']=N(this['locale'],'Reopen'),_0x546ed9['tooltip']=N(this['locale'],'Reopen'),_0x546ed9['icon']=_0x46a965,_0x546ed9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xf83966=>!_0xf83966),_0x546ed9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x530105,_0x27bc55)=>_0x530105&&_0x27bc55),_0x546ed9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x546ed9;}['_trimContextValue'](_0x3e7030){if(_0x3e7030['length']<0x96)return _0x3e7030;const _0x16434f=_0x3e7030['lastIndexOf']('\x20',0x93);return _0x3e7030['substring'](0x0,_0x16434f>-0x1?_0x16434f:0x93)+'...';}['_attachContextActions'](){const _0x8c5e80=this['element']['querySelector']('.ck-context'),_0x14e018=_0x8c5e80['querySelector']('.ck-context__value');this['listenTo'](_0x8c5e80,'mouseenter',()=>{_0x14e018['offsetWidth']<_0x14e018['scrollWidth']&&_0x8c5e80['classList']['add']('overlay');}),this['listenTo'](_0x8c5e80,'mouseleave',()=>{_0x8c5e80['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x53c8ef of this['focusables'])this['focusTracker']['add'](_0x53c8ef['element']),this['keystrokes']['listenTo'](_0x53c8ef['element']);}['_createContextView'](){const _0x3191ef=new oe(this['locale']);return _0x3191ef['bind']('contextValue')['to'](this),_0x3191ef;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5a48a8,_0x56ef36,_0x554dcd,_0x15033a){super(_0x5a48a8),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x56ef36,this['_localUser']=_0x554dcd,this['_config']=_0x15033a,this['commentThreadHeaderView']=new Xt(_0x5a48a8,_0x56ef36),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x5a48a8,N(_0x5a48a8,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5a48a8,_0x56ef36,Object['assign']({'CommentView':this['_config']['CommentView']},_0x15033a)),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',(_0x1194f6,_0x4f2ad9)=>_0x1194f6||!!_0x4f2ad9),this['bind']('isUnlinked')['to'](_0x56ef36,'unlinkedAt',_0x41bae5=>!!_0x41bae5),this['bind']('ariaLabel')['to'](this,'length',_0x437805=>{const _0x4428e6=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x437805,_0x4428e6]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4cfdf8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x59c832({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xbabe67=>_0xbabe67['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 _0x56369f=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3cf538=_0x56369f['commentInputView'];return _0x56369f['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3cf538,'value',(_0x255125,_0x8da042,_0x498161,_0xb6da2f,_0x2fa75e)=>!!_0x2fa75e||!!_0xb6da2f&&_0x498161&&!_0x8da042||_0x255125&&_0x498161&&!_0x8da042),_0x3cf538['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1baf74,_0x307bd3,_0x2b1f43)=>{let _0x69f9b5;return _0x69f9b5=_0x2b1f43&&_0x307bd3?'Reply\x20to\x20reopen\x20discussion...':_0x1baf74?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x69f9b5);}),_0x3cf538['bind']('submitLabel')['to'](this,'length',_0x355ad7=>N(this['locale'],_0x355ad7?'Reply':'Comment')),_0x3cf538['on']('submit',(_0x398245,_0x410c7f)=>{this['fire']('addComment',_0x410c7f),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3cf538['on']('cancel',()=>{this['focus']();}),_0x3cf538['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3cf538['on']('cancel',_0x1eb954=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1eb954['stop']());}),this['on']('change:isActive',(_0x383357,_0x1d6a34,_0x213312)=>{_0x213312||this['length']||_0x3cf538['value']||this['fire']('removeCommentThread');}),_0x56369f;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x52a59c(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1af789,target:_0x5da76c,type:_0x4e2a13,isVisible:_0x2a1576=!0x0}){super(),this['view']=_0x1af789,this['view']['element']||this['view']['render'](),this['_type']=_0x4e2a13,this['_target']=_0x5da76c,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x364175([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x254e5b,_0x2ccb64)=>{this['view']['focusTracker']['add'](_0x2ccb64);}),this['focusableElements']['on']('remove',(_0x35ef83,_0x460a2b)=>{this['view']['focusTracker']['remove'](_0x460a2b);}),this['set']('isVisible',_0x2a1576);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x34ff5d=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x34ff5d),_0x34ff5d;}get['targetRect'](){const _0x53de7d=this['target'];if(null===_0x53de7d)return null;if(_0x53de7d instanceof _0x56aaf6)return _0x53de7d;const _0x43438c=_0x53de7d['filter'](_0x2b682e=>function(_0x2a2a56){const _0x1154e9=_0x2a2a56['offsetParent'];if(_0x1154e9)return!0x0;const _0x17ce8c=_0x2a2a56['getClientRects']()['item'](0x0);return!!_0x17ce8c;}(_0x2b682e));return 0x0===_0x43438c['length']?null:new _0x56aaf6(_0x43438c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x498074){this['view']['isActive']=_0x498074,this['view']['mainView']['isActive']=_0x498074;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x49a083){if(!(null===_0x49a083||_0x49a083 instanceof _0x56aaf6||Array['isArray'](_0x49a083)&&_0x49a083['every'](_0x19e54e=>fi(_0x19e54e))))throw new _0x441c59('annotation-invalid-target',null,{'target':_0x49a083});}['_getNormalizedTarget'](){const _0x37e056='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x37e056)?[_0x37e056]:_0x37e056;}}function fi(_0x40bf66){return null!==_0x40bf66&&'object'==typeof _0x40bf66&&'nodeType'in _0x40bf66&&0x1===_0x40bf66['nodeType'];}class S extends _0x364175{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x2af975=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4cfdf8(),this['_focusTracker']['on']('change:isFocused',(_0x7a92cb,_0x180251,_0x502e7a)=>{_0x502e7a||this['fire']('blur');});for(const _0x393c25 of _0x2af975)this['add'](_0x393c25);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x791b96){if(this['has'](_0x791b96))throw new _0x441c59('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x791b96['innerView'],_0x791b96),this['_viewToAnnotation']['set'](_0x791b96['view'],_0x791b96);for(const _0x636acd of _0x791b96['focusableElements'])this['_focusTracker']['add'](_0x636acd);this['listenTo'](_0x791b96['focusableElements'],'add',(_0x1de85f,_0x23fa1f)=>{this['_focusTracker']['add'](_0x23fa1f);}),this['listenTo'](_0x791b96['focusableElements'],'remove',(_0x254d1f,_0x18660a)=>{this['_focusTracker']['remove'](_0x18660a);}),this['listenTo'](_0x791b96['view']['focusTracker'],'change:isFocused',(_0x1019ad,_0x20af89,_0x199b7c)=>{_0x199b7c&&this['fire']('focus',_0x791b96);}),_0x791b96['updateTargetRect']();const _0x9529e2=this['_getOrderInContent'](_0x791b96['view']['targetRect']);return super['add'](_0x791b96,_0x9529e2);}['remove'](_0x1789b0){if(!this['has'](_0x1789b0))throw new _0x441c59('annotationcollection-not-existing-item',null);this['stopListening'](_0x1789b0['view']['focusTracker']),this['stopListening'](_0x1789b0['focusableElements']);for(const _0x52ec5f of _0x1789b0['focusableElements'])this['_focusTracker']['remove'](_0x52ec5f);return this['_viewToAnnotation']['delete'](_0x1789b0['view']),this['_innerViewToAnnotation']['delete'](_0x1789b0['innerView']),super['remove'](_0x1789b0);}['getByInnerView'](_0x3546e2){return this['_innerViewToAnnotation']['get'](_0x3546e2);}['getByView'](_0x278632){return this['_viewToAnnotation']['get'](_0x278632);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2c77b4 of this)_0x2c77b4['updateTargetRect']();this['_sort']();}['_sort'](){const _0x54a61e=Array['from'](this)['sort']((_0x2038e0,_0x15fb28)=>w(_0x2038e0['view']['targetRect'],_0x15fb28['view']['targetRect']));for(let _0x1e6d96=_0x54a61e['length']-0x1;_0x1e6d96>0x0;_0x1e6d96--){const _0x2d9264=_0x54a61e[_0x1e6d96];_0x1e6d96!==this['getIndex'](_0x2d9264)&&(this['remove'](_0x2d9264),this['add'](_0x2d9264));}}['_getOrderInContent'](_0xe3af2b){let _0x3114d0=0x0;if(!_0xe3af2b)return this['length'];for(const _0x15e9fb of this){const _0x2f4b09=_0x15e9fb['view']['targetRect'];if(_0x2f4b09){if(w(_0xe3af2b,_0x2f4b09)<0x0)return _0x3114d0;_0x3114d0++;}}return _0x3114d0;}}function v({source:_0x4af40d,target:_0x253b05,filter:_0x13e9e7}){for(const _0x1f0c89 of _0x4af40d)_0x13e9e7(_0x1f0c89)&&_0x253b05['add'](_0x1f0c89);_0x253b05['listenTo'](_0x4af40d,'add',(_0x411a7c,_0x2c4769)=>{_0x13e9e7(_0x2c4769)&&_0x253b05['add'](_0x2c4769);}),_0x253b05['listenTo'](_0x4af40d,'remove',(_0x16176f,_0x3f7593)=>{_0x253b05['has'](_0x3f7593)&&_0x253b05['remove'](_0x3f7593);});}function w(_0x5dd9d3,_0xf5f46d){if(null===_0x5dd9d3&&null===_0xf5f46d)return 0x0;if(null===_0x5dd9d3)return-0x1;if(null===_0xf5f46d)return 0x1;const _0x587e3e=_0x5dd9d3['top']-_0xf5f46d['top'];return 0x0==_0x587e3e?_0x5dd9d3['left']-_0xf5f46d['left']:_0x587e3e;}class y extends _0x42791b{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f4f6e){if(super(_0x5f4f6e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x5f4f6e instanceof _0x53a597){const _0x5951ef=_0x5f4f6e['locale'];_0x5f4f6e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x5951ef,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4aed3f){this['collection']['add'](_0x4aed3f);}['remove'](_0x1b5094){this['collection']['remove'](_0x1b5094),_0x1b5094['destroy']();}['refreshVisibility'](){for(const _0x4af1d2 of this['collection'])_0x4af1d2['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5a25cb){return this['collection']['getByInnerView'](_0x5a25cb);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x569f26 of this['collection'])_0x569f26['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4f31f6){this['fire']('_activateAnnotation',_0x4f31f6);}['createAnnotation'](_0xb48d60){return new T(_0xb48d60);}['createAnnotationView'](_0x1c82c6,_0x1465d7){return new E(_0x1c82c6,_0x1465d7);}['_addActiveAnnotation'](_0x1a15fc){const _0x4f4e3f=new Set(this['activeAnnotations']);_0x4f4e3f['add'](_0x1a15fc),this['activeAnnotations']=_0x4f4e3f;}['_removeActiveAnnotation'](_0x703f3c){const _0x2cc97e=new Set(this['activeAnnotations']);_0x2cc97e['delete'](_0x703f3c),this['activeAnnotations']=_0x2cc97e;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1b26c7=this['collection'],_0x2f2e72=this['_visibleAnnotations'];function _0x64c450(_0x505b7f){const _0x3a5608=_0x505b7f['source'];_0x3a5608['isVisible']&&!_0x2f2e72['has'](_0x3a5608)?_0x2f2e72['add'](_0x3a5608):!_0x3a5608['isVisible']&&_0x2f2e72['has'](_0x3a5608)&&_0x2f2e72['remove'](_0x3a5608),_0x3a5608['view']['focusTracker']['remove'](_0x3a5608['view']['element']),_0x3a5608['view']['focusTracker']['add'](_0x3a5608['view']['element']);}this['listenTo'](_0x1b26c7,'add',(_0x5600d3,_0x1074df)=>{_0x1074df['isVisible']&&_0x2f2e72['add'](_0x1074df),this['listenTo'](_0x1074df,'change:isVisible',_0x64c450);}),this['listenTo'](_0x1b26c7,'remove',(_0x1a01fb,_0x59fa72)=>{_0x2f2e72['has'](_0x59fa72)&&_0x2f2e72['remove'](_0x59fa72),this['stopListening'](_0x59fa72,'change:isVisible',_0x64c450);});}['_setupEnterAnnotationKeystroke'](){const _0x312977=_0x2f5676=>{_0x2f5676['on']('ready',()=>{_0x2f5676['keystrokes']['set'](_0x470e0b,(_0x3bb8ee,_0x20d733)=>{const _0x4fd701=_0x40d693(this['activeAnnotations']['values']());_0x4fd701&&(_0x4fd701['view']['focus'](),_0x20d733());});});};this['context']instanceof _0x53a597?_0x312977(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x59eb08,_0x320a44)=>{_0x312977(_0x320a44);});}['_setupEscapeAnnotationHandling'](){const _0x414387=_0x91e21=>{const _0x467b8b=_0x91e21['source'],_0x43b188=[];let _0x150f9f;if(Array['isArray'](_0x467b8b['target'])){_0x150f9f=_0x467b8b['target'][0x0],this['context']instanceof _0x53a597?_0x43b188['push'](this['context']):this['context']['editors']&&_0x43b188['push'](...this['context']['editors']);for(const _0x30004b of _0x43b188)for(const _0x4240ca of _0x30004b['editing']['view']['domRoots']['values']())if(_0x4240ca['contains'](_0x150f9f))return void _0x30004b['editing']['view']['focus']();_0x150f9f['focus']();}};this['listenTo'](this['collection'],'add',(_0x2ce313,_0x3aed4d)=>{this['listenTo'](_0x3aed4d,'escape',_0x414387,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x525b47,_0x2bf4b5)=>{this['stopListening'](_0x2bf4b5,'escape',_0x414387);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x42791b{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x186adf){super(_0x186adf),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x22df39=this['context']['config'];_0x22df39['define']('comments.maxCommentsWhenCollapsed',0x2),_0x22df39['define']('comments.maxThreadTotalWeight',0x1f4),_0x22df39['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x22df39['define']('comments.CommentThreadView',vt),_0x22df39['define']('comments.CommentView',gt),_0x22df39['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x290a00=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x8ed936,_0x6fd69b)=>this['_addCommentThread'](_0x6fd69b)),this['on']('submitCommentThread',(_0x67b882,_0xaf55a2)=>this['_submitCommentThread'](_0xaf55a2)),this['on']('resolveCommentThread',(_0x27549d,_0x2d4e0c)=>this['_resolveCommentThread'](_0x2d4e0c)),this['on']('resolveCommentThread',(_0x91afa5,_0x1f5b72)=>this['_updateActiveAnnotation'](_0x1f5b72),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x55e57c,_0x10bf56)=>this['_reopenCommentThread'](_0x10bf56)),this['on']('reopenCommentThread',(_0x365dba,_0x1785a4)=>this['_updateActiveAnnotation'](_0x1785a4),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x572b1d,_0x426a54)=>this['_removeCommentThread'](_0x426a54)),this['on']('updateCommentThread',(_0x2082d0,_0x482cef)=>this['_updateCommentThread'](_0x482cef)),this['on']('updateCommentThread',(_0x3397b6,_0x3221ba)=>this['_updateActiveAnnotation'](_0x3221ba),{'priority':'lowest'}),this['on']('addComment',(_0x42ae27,_0x112c68)=>this['_addComment'](_0x112c68)),this['on']('updateComment',(_0x37f67b,_0x271e13)=>this['_updateComment'](_0x271e13)),this['on']('removeComment',(_0x372d64,_0x1dea3b)=>this['_removeComment'](_0x1dea3b)),this['on']('addComment',(_0x1fbd21,{threadId:_0x33e441,isFromAdapter:_0x3e15f0})=>{if(_0x3e15f0)return;const _0x199df2=this['getCommentThread'](_0x33e441),_0x598e9f=_0x199df2&&this['_threadToController']['get'](_0x199df2);_0x598e9f&&_0x598e9f['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x290a00,'change:activeAnnotations',(_0x2b6639,_0x5ad781,_0x2c786c)=>{const _0x4965d9=Array['from'](_0x2c786c)['map'](_0x36400c=>this['_viewToController']['get'](_0x36400c['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4965d9?_0x4965d9['model']:null;});}set['adapter'](_0x56839c){if(this['_adapter'])throw new _0x441c59('commentsrepository-adapter-already-set');this['_adapter']=_0x56839c;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x4a8b49=Tt,threadId:_0x2ca499=_0x50d72b(),comments:_0x17888c=[],unlinkedAt:_0x22fc29=null,resolvedAt:_0x1c0963=null,resolvedBy:_0x5d887b=null,target:_0xb34402=null,context:_0x595af5=null,attributes:_0x546228={},isResolvable:_0x45aa49=!0x0,isSubmitted:_0x53a2bf=!0x1,isFromAdapter:_0xf834b8=!0x1}={}){return this['fire'](bt('addCommentThread',_0x4a8b49),{'channelId':_0x4a8b49,'threadId':_0x2ca499,'comments':_0x17888c,'unlinkedAt':_0x22fc29,'resolvedAt':_0x1c0963,'resolvedBy':_0x5d887b,'target':_0xb34402,'context':_0x595af5,'attributes':_0x546228,'isFromAdapter':_0xf834b8,'isResolvable':_0x45aa49,'isSubmitted':_0x53a2bf}),this['getCommentThread'](_0x2ca499);}['openNewCommentThread']({channelId:_0x54183a=Tt,threadId:_0x2751e4=_0x50d72b(),target:_0x165b7f,context:_0x172112=null,isResolvable:_0x373a7f=!0x0}){if(this['_readOnlyChannels']['has'](_0x54183a)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x165b7f)throw new _0x441c59('commentsrepository-missing-target');const _0x3c47b3=this['addCommentThread']({'channelId':_0x54183a,'threadId':_0x2751e4,'target':_0x165b7f,'context':_0x172112,'isResolvable':_0x373a7f});if(!_0x3c47b3)return null;const _0x51b0e6=this['_threadToController']['get'](_0x3c47b3),_0x289ab2=_0x51b0e6['view']['commentThreadInputView']['commentInputView'],_0x26fa32=this['context']['plugins']['get'](y),_0x112e12=_0x26fa32['getByInnerView'](_0x51b0e6['view']);return _0x26fa32['activate'](_0x112e12),_0x289ab2['once']('editorReady',()=>_0x289ab2['focus']()),_0x3c47b3;}['hasCommentThread'](_0x23f210){if('string'!=typeof _0x23f210)throw new _0x441c59('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x23f210);}['updateCommentThread']({channelId:_0x451463=Tt,threadId:_0x1ded53,context:_0x2b404b,unlinkedAt:_0x45d4a8,attributes:_0x4003c7,isFromAdapter:_0x2a9963=!0x1}){return this['fire'](bt('updateCommentThread',_0x451463),{'channelId':_0x451463,'threadId':_0x1ded53,'context':_0x2b404b,'unlinkedAt':_0x45d4a8,'attributes':_0x4003c7,'isFromAdapter':_0x2a9963}),this['getCommentThread'](_0x1ded53);}['getCommentThread'](_0x4072f7){if('string'!=typeof _0x4072f7)throw new _0x441c59('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4072f7);}['fetchCommentThread']({channelId:_0x3c2e73,threadId:_0x44d3b8}={}){const _0x59ce1b=this['getCommentThread'](_0x44d3b8);if(_0x59ce1b)return Promise['resolve'](_0x59ce1b);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x441c59('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3c2e73,'threadId':_0x44d3b8})['then'](_0x2c0303=>this['hasCommentThread'](_0x44d3b8)?this['getCommentThread'](_0x44d3b8):_0x2c0303?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3c2e73},_0x2c0303)):void 0x0)['catch'](_0x2672b3=>{throw console['error'](_0x2672b3),new _0x441c59('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x422d9d,skipNotAttached:_0xa90116=!0x1,skipEmpty:_0x240346=!0x1,toJSON:_0x4b9678=!0x1}={}){const _0x53604a=[];for(const _0x4b6cc of this['_threads']['values']())_0x422d9d&&_0x4b6cc['channelId']!==_0x422d9d||_0xa90116&&!_0x4b6cc['isAttached']||_0x240346&&0x0===_0x4b6cc['length']||_0x53604a['push'](_0x4b6cc);return _0x4b9678?_0x53604a['map'](_0x3b4ec9=>_0x3b4ec9['toJSON']()):_0x53604a;}['getAnnotationForCommentThread'](_0x4bb7cf){const _0x2e879d=this['_threadToController']['get'](_0x4bb7cf);if(!_0x2e879d)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2e879d['view'])||null;}['getCommentThreadForAnnotation'](_0x563480){const _0xa9ec68=this['_viewToController']['get'](_0x563480['innerView']);return _0xa9ec68?_0xa9ec68['model']:null;}['setActiveCommentThread'](_0x203812){const _0xf3f74=this['context']['plugins']['get'](y);if(!_0x203812)return void(this['activeCommentThread']&&_0xf3f74['deactivateAll']());const _0x30d002=this['getCommentThread'](_0x203812);if(!_0x30d002)throw new _0x441c59('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x203812});if(!this['_threadToController']['has'](_0x30d002))throw new _0x441c59('commentsrepository-active-not-attached',null,{'threadId':_0x203812});const _0x3d98a0=_0xf3f74['getByInnerView'](this['_threadToController']['get'](_0x30d002)['view']);_0xf3f74['activate'](_0x3d98a0);}['switchReadOnly'](_0x5f02ff,_0x2b22c3){_0x5f02ff?this['_readOnlyChannels']['add'](_0x2b22c3):this['_readOnlyChannels']['delete'](_0x2b22c3),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x172d21){return this['_readOnlyChannels']['has'](_0x172d21)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1b6582,_0x406e43){return new yt(_0x1b6582,_0x406e43);}['setPermissions'](_0x2e9d4d,_0x3f0ea9=Tt){this['_permissions']['set'](_0x3f0ea9,_0x2e9d4d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x388ad2=Tt){return this['_permissions']['has'](_0x388ad2)?this['_permissions']['get'](_0x388ad2):_t;}['_addCommentThread']({channelId:_0x6f7c33,threadId:_0x595735,comments:_0x2cb62e,unlinkedAt:_0x426f95,resolvedAt:_0x7b9903,resolvedBy:_0x544305,target:_0x3070ab,context:_0x4f8b2b,attributes:_0x48439c,isFromAdapter:_0x17fcd2,isResolvable:_0x226854,isSubmitted:_0x45d389}){if('string'!=typeof _0x595735)throw new _0x441c59('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x595735});if(this['hasCommentThread'](_0x595735))throw new _0x441c59('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x595735});const _0x6fe06d=new pi(this,{'channelId':_0x6f7c33,'id':_0x595735,'context':_0x4f8b2b,'attributes':_0x48439c,'unlinkedAt':_0x426f95,'resolvedAt':_0x7b9903,'resolvedBy':_0x544305?this['context']['plugins']['get'](it)['getUser'](_0x544305):null,'isResolvable':_0x226854,'isSubmitted':_0x45d389||_0x17fcd2});this['_threads']['set'](_0x595735,_0x6fe06d);for(const _0x2af7f4 of _0x2cb62e)_0x6fe06d['_add'](this['_createNewComment']({'threadId':_0x595735,..._0x2af7f4}));return _0x3070ab&&_0x6fe06d['attachTo'](_0x3070ab),_0x17fcd2||!_0x6fe06d['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x6f7c33,'threadId':_0x595735});}['_submitCommentThread']({channelId:_0x4d0efe,threadId:_0x573eae}){if(!this['hasCommentThread'](_0x573eae))throw new _0x441c59('commentsrepository-missing-comment-thread',this);const _0x53d790=this['getCommentThread'](_0x573eae);if(_0x53d790['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x754dfb,comments:_0x559feb,resolvedAt:_0x2a53ca,resolvedBy:_0x33da31,context:_0x13edb0,attributes:_0x5b5ff8}=_0x53d790,_0x46f3ea=this['context']['plugins']['get']('PendingActions'),_0x7db77=_0x46f3ea['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4d0efe,'threadId':_0x754dfb,'comments':_0x559feb['map'](_0x10117f=>_0x10117f['toJSON']()),'resolvedAt':_0x2a53ca,'resolvedBy':_0x33da31?_0x33da31['id']:_0x33da31,'context':_0x13edb0,'attributes':_0x5b5ff8})['then'](({comments:_0x469d85})=>{_0x46f3ea['remove'](_0x7db77);for(const _0xbc17d of _0x469d85)this['_updateComment']({'channelId':_0x4d0efe,'threadId':_0x573eae,'commentId':_0xbc17d['commentId'],'createdAt':_0xbc17d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x1860fe=>{throw console['error'](_0x1860fe),new _0x441c59('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x1b3627,target:_0xf24a6f}){const _0x31ecc2=this['getCommentThread'](_0x1b3627);if(!_0x31ecc2)throw new _0x441c59('commentsrepository-attach-missing-comment-thread',this);const _0x514e85=this['context']['plugins']['get']('PendingActions'),_0x59ed42=this['context']['plugins']['get'](y),_0xf8ee8a=this['_createCommentThreadView'](_0x31ecc2),_0x370167=new yt(_0x31ecc2,_0xf8ee8a);let _0x22c099=null;_0xf8ee8a['on']('change:isDirty',(_0x1299f4,_0x13fa2f,_0x2c972d)=>{_0x2c972d?_0x22c099=_0x514e85['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x22c099&&(_0x514e85['remove'](_0x22c099),_0x22c099=null);}),this['_threadToController']['set'](_0x31ecc2,_0x370167),this['_viewToController']['set'](_0xf8ee8a,_0x370167);const _0x20b542=new E(this['context']['locale'],_0xf8ee8a);_0x20b542['bind']('length')['to'](_0xf8ee8a),_0x20b542['bind']('isDirty')['to'](_0xf8ee8a,'isDirty',_0xf8ee8a,'length',(_0x19ad8a,_0x1c9a1a)=>_0x19ad8a||!_0x1c9a1a),_0x20b542['bind']('isActive')['to'](_0xf8ee8a),_0x20b542['type']='comment';const _0x3d208f=new T({'view':_0x20b542,'target':_0xf24a6f,'type':'comment','isVisible':!_0x31ecc2['archivedAt']});return _0xf8ee8a['on']('escape',()=>{_0x3d208f['fire']('escape');}),this['_bindAnnotationToEditors'](_0xf8ee8a,_0x3d208f),_0x59ed42['add'](_0x3d208f),_0x3d208f;}['_bindAnnotationToEditors'](_0x3c8a14,_0x487d2e){this['listenTo'](_0x3c8a14,'editorReady',(_0x210289,_0x5b7e50)=>{const _0x32550e=_0x5b7e50['ui']['view']['body']['bodyCollectionContainer'];_0x487d2e['focusableElements']['add'](_0x32550e),this['context']instanceof _0x53a597&&this['context']['ui']['focusTracker']['add'](_0x32550e);},{'priority':'highest'}),this['listenTo'](_0x3c8a14,'editorDestroyed',(_0x516dfb,_0x4d6fd1)=>{const _0xdc9f20=_0x4d6fd1['ui']['view']['body']['bodyCollectionContainer'];_0x487d2e['focusableElements']['has'](_0xdc9f20)&&_0x487d2e['focusableElements']['remove'](_0xdc9f20),this['context']instanceof _0x53a597&&this['context']['ui']['focusTracker']['remove'](_0xdc9f20);});}['_unbindEditors'](_0x3e711c){this['stopListening'](_0x3e711c,'editorReady'),this['stopListening'](_0x3e711c,'editorDestroyed');}['_createCommentThreadView'](_0x3b8103){const _0xfda31a=this['context']['plugins']['get'](it),{config:_0x311821,locale:_0x4b63c3}=this['context'],_0xccbb20=lt(_0x311821['get']('locale'),_0x4b63c3);return new(0x0,(_0x311821['get']('comments'))['CommentThreadView'])(_0x4b63c3,_0x3b8103,_0xfda31a['me'],{'editorConfig':{..._0x311821['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x311821['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x311821['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x311821['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x311821['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xccbb20,'CommentView':_0x311821['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x272e72,channelId:_0x4ae172,resolvedAt:_0x5bfc44,resolvedBy:_0x342083,isFromAdapter:_0x445cfe}){if(!this['hasCommentThread'](_0x272e72))throw new _0x441c59('commentsrepository-missing-comment-thread',null,{'threadId':_0x272e72});const _0x5bcb60=this['getCommentThread'](_0x272e72);if(_0x5bcb60['isResolved'])throw new _0x441c59('commentsrepository-resolved-comment-thread',null,{'threadId':_0x272e72});const _0x11b202=this['context']['plugins']['get'](it);if(_0x5bcb60['resolvedBy']=_0x11b202['getUser'](_0x342083),_0x5bcb60['resolvedAt']=_0x5bfc44,_0x445cfe||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5ea621=this['context']['plugins']['get']('PendingActions'),_0x24ac73=_0x5ea621['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x4ae172,'threadId':_0x272e72})['then'](({resolvedAt:_0x530031,resolvedBy:_0x3a6196})=>{_0x5ea621['remove'](_0x24ac73),_0x5bcb60['resolvedBy']['id']!==_0x3a6196&&(_0x5bcb60['resolvedBy']=_0x11b202['getUser'](_0x3a6196)),_0x5bcb60['resolvedAt']=_0x530031;})['catch'](_0xf97da9=>{throw console['error'](_0xf97da9),new _0x441c59('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x4d8982,channelId:_0x5b66fc,isFromAdapter:_0x54b0ff}){if(!this['hasCommentThread'](_0x4d8982))throw new _0x441c59('commentsrepository-missing-comment-thread',null,{'threadId':_0x4d8982});const _0x1a726c=this['getCommentThread'](_0x4d8982);if(!_0x1a726c['isResolved'])throw new _0x441c59('commentsrepository-reopen-comment-thread',null,{'threadId':_0x4d8982});if(_0x1a726c['resolvedBy']=null,_0x1a726c['resolvedAt']=null,_0x54b0ff||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3d0f9e=this['context']['plugins']['get']('PendingActions'),_0x5a61a9=_0x3d0f9e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5b66fc,'threadId':_0x4d8982})['then'](()=>_0x3d0f9e['remove'](_0x5a61a9))['catch'](_0x287fd2=>{throw console['error'](_0x287fd2),new _0x441c59('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x96aa2e,isFromAdapter:_0x5938f3}){const _0x271169=this['getCommentThread'](_0x96aa2e);if(!_0x271169)throw new _0x441c59('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x96aa2e),this['_threads']['delete'](_0x96aa2e),!_0x271169['isSubmitted']||_0x5938f3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4bc311=this['context']['plugins']['get']('PendingActions'),{channelId:_0xd89f04}=_0x271169,_0x3d032c=_0x4bc311['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xd89f04,'threadId':_0x96aa2e})['then'](()=>_0x4bc311['remove'](_0x3d032c))['catch'](_0x20ca5f=>{throw console['error'](_0x20ca5f),new _0x441c59('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x3cb742,unlinkedAt:_0x4a994d,context:_0xf4319c,attributes:_0x4c2b1e,isFromAdapter:_0x411686}){if('string'!=typeof _0x3cb742)throw new _0x441c59('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3cb742});if(!this['hasCommentThread'](_0x3cb742))throw new _0x441c59('commentsrepository-missing-comment-thread',null,{'threadId':_0x3cb742});const _0x3d9b88=this['getCommentThread'](_0x3cb742);let _0x47779b=!0x1;if(void 0x0!==_0xf4319c&&_0x3d9b88['context']!==_0xf4319c&&(_0x3d9b88['context']=_0xf4319c,_0x47779b=!0x0),void 0x0!==_0x4a994d&&_0x3d9b88['unlinkedAt']!==_0x4a994d&&(_0x3d9b88['unlinkedAt']=_0x4a994d,_0x47779b=!0x0),_0x4c2b1e&&!wt(_0x4c2b1e,_0x3d9b88['attributes'])&&(_0x3d9b88['attributes']=_0x4c2b1e,_0x47779b=!0x0),!_0x47779b)return Promise['resolve']();if(!_0x3d9b88['isSubmitted']||_0x411686||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x1ac822=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4a6fce}=_0x3d9b88,_0x59b439=_0x1ac822['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4a6fce,'threadId':_0x3cb742,'context':_0xf4319c,'unlinkedAt':_0x4a994d,'attributes':_0x4c2b1e})['then'](()=>_0x1ac822['remove'](_0x59b439))['catch'](_0x4c122b=>{throw console['error'](_0x4c122b),new _0x441c59('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2fb0ae){const _0x2229c0=this['context']['plugins']['get'](y),_0x548f6b=this['getCommentThread'](_0x2fb0ae);if(_0x548f6b['_isAttached']=!0x1,this['_threadToController']['has'](_0x548f6b)){const _0x2ad009=this['_threadToController']['get'](_0x548f6b),_0x29f2e6=_0x2ad009['view'],_0xbb03c=_0x2229c0['getByInnerView'](_0x29f2e6);this['_threadToController']['delete'](_0x548f6b),this['_viewToController']['delete'](_0x29f2e6),_0xbb03c&&_0x2229c0['remove'](_0xbb03c),_0x2ad009['destroy'](),_0x29f2e6['destroy']()['then'](()=>{this['_unbindEditors'](_0x29f2e6);});}}['_updateActiveAnnotation']({threadId:_0xf0b2e8,resolvedAt:_0x4f9d60,unlinkedAt:_0x473ae5}){const _0x57b596=!!_0x4f9d60,_0x53abe6=this['context']['plugins']['get'](y),_0x43af81=this['getCommentThread'](_0xf0b2e8);if(this['_threadToController']['has'](_0x43af81)){const _0x2e8b6c=this['_threadToController']['get'](_0x43af81)['view'],_0x437ad8=_0x53abe6['getByInnerView'](_0x2e8b6c);_0x437ad8&&(_0x57b596&&_0x53abe6['_removeActiveAnnotation'](_0x437ad8),_0x473ae5?_0x437ad8['isVisible']=!0x1:_0x437ad8['refreshVisibility']());}}['_getExternalAuthor'](_0x142b98){const _0x3ba10a=this['context']['plugins']['get'](it),_0x4c481f=pt('external:'+_0x142b98),_0x4c317b=_0x3ba10a['getUser'](_0x4c481f);return _0x4c317b||_0x3ba10a['addUser']({'id':_0x4c481f,'name':_0x142b98});}['_createNewComment']({threadId:_0x1a1d35,commentId:_0x3372ca=_0x50d72b(),content:_0xd4cb23,authorId:_0x4c99c2,createdAt:_0x40c5f0,attributes:_0x5d49f7}){if('string'!=typeof _0x3372ca)throw new _0x441c59('commentsrepository-invalid-commentid');if('string'!=typeof _0x4c99c2)throw new _0x441c59('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0xd4cb23||!_0xd4cb23['trim']())throw new _0x441c59('commentsrepository-invalid-comment-content');const _0x726b59=this['context']['plugins']['get'](it)['getUser'](_0x4c99c2);if(!_0x726b59)throw new _0x441c59('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x4c99c2});let _0x422c14=null,_0x5d8888=_0x40c5f0;return _0x5d49f7?.['@external']&&(_0x422c14=this['_getExternalAuthor'](_0x5d49f7['@external']['authorName']),_0x5d8888=new Date(_0x5d49f7['@external']['createdAt'])),new wi(this,{'threadId':_0x1a1d35,'id':_0x3372ca,'author':_0x422c14||_0x726b59,'creator':_0x726b59,'content':_0xd4cb23,'createdAt':_0x40c5f0,'authoredAt':_0x5d8888,'attributes':_0x5d49f7});}['_addComment'](_0x3ef254){let {threadId:_0x45d88a,content:_0x133fa6,attributes:_0x34eac8,isFromAdapter:_0x196d78}=_0x3ef254;const _0x256fc1=this['getCommentThread'](_0x3ef254['threadId']);if(!_0x256fc1)throw new _0x441c59('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4a8c75=this['_createNewComment'](_0x3ef254),{id:_0x518c06}=_0x4a8c75;if(_0x256fc1['_add'](_0x4a8c75),_0x196d78||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x256fc1['isSubmitted'])return Promise['resolve']();const _0x53a5d4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3b0a6c}=_0x256fc1,_0x26b630=_0x53a5d4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x34eac8||(_0x34eac8={}),this['adapter']['addComment']({'channelId':_0x3b0a6c,'threadId':_0x45d88a,'commentId':_0x518c06,'content':_0x133fa6,'attributes':_0x34eac8})['then'](_0x424abd=>{_0x53a5d4['remove'](_0x26b630),_0x424abd&&this['_updateComment']({'channelId':_0x3b0a6c,'threadId':_0x45d88a,'commentId':_0x518c06,'createdAt':_0x424abd['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x55c089=>{throw console['error'](_0x55c089),new _0x441c59('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x5e55c2,commentId:_0xe96607,content:_0x4494ea,createdAt:_0x27fc9b,attributes:_0x1ba72e,isFromAdapter:_0x2542db}){if(void 0x0!==_0x4494ea&&('string'!=typeof _0x4494ea||!_0x4494ea['trim']()['length']))throw new _0x441c59('commentsrepository-update-comment-invalid-content');const _0xae4584=this['getCommentThread'](_0x5e55c2),_0x571143=_0xae4584['getComment'](_0xe96607);if(!_0x571143)throw new _0x441c59('commentsrepository-update-missing-comment',this);let _0x4faa57=!0x1;if(_0x4494ea&&_0x4494ea!==_0x571143['content']&&(_0x571143['isEditable']||_0x2542db)&&(_0x571143['content']=_0x4494ea,_0x4faa57=!0x0),_0x27fc9b&&_0x27fc9b!==_0x571143['createdAt']&&(_0x571143['createdAt']=_0x27fc9b,_0x571143['attributes']&&_0x571143['attributes']['@external']||(_0x571143['authoredAt']=_0x27fc9b),_0x4faa57=!0x0),_0x1ba72e&&!wt(_0x1ba72e,_0x571143['attributes'])&&(_0x571143['attributes']=_0x1ba72e,_0x4faa57=!0x0),!_0x4faa57)return Promise['resolve']();if(_0xae4584['fire']('commentUpdated'),_0x2542db||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x455542=this['context']['plugins']['get']('PendingActions'),{channelId:_0x58a764}=this['getCommentThread'](_0x571143['threadId']),_0x446bf8=_0x455542['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x58a764,'threadId':_0x5e55c2,'commentId':_0xe96607,'content':_0x4494ea,'attributes':_0x1ba72e})['then'](()=>_0x455542['remove'](_0x446bf8))['catch'](_0x53f9cb=>{throw console['error'](_0x53f9cb),new _0x441c59('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x189b0d,commentId:_0x1b2373,isFromAdapter:_0x4752a5}){const _0x3e48a9=this['getCommentThread'](_0x189b0d),_0x458052=_0x3e48a9['getComment'](_0x1b2373);if(!_0x458052)throw new _0x441c59('commentsrepository-remove-missing-comment',this);if(_0x3e48a9['_remove'](_0x458052),_0x4752a5||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xf8ffe=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1e2cec}=_0x3e48a9,_0x548168=_0xf8ffe['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x1e2cec,'threadId':_0x189b0d,'commentId':_0x1b2373})['then'](()=>_0xf8ffe['remove'](_0x548168))['catch'](_0x1e9eb6=>{throw console['error'](_0x1e9eb6),new _0x441c59('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x52a59c(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5d8b6a,_0x238612){super();const _0x2c6e48=_0x5d8b6a['context']['plugins']['get'](it)['me'],_0x300c1c=_0x5d8b6a['getCommentThread'](_0x238612['threadId']),_0xe62f59=0x0===_0x300c1c['comments']['length'],_0x1ba783=_0x2c6e48===_0x238612['author'];this['id']=_0x238612['id'],this['threadId']=_0x238612['threadId'],this['author']=_0x238612['author'],this['creator']=_0x238612['creator'],this['isExternal']=Boolean(_0x238612['attributes']&&_0x238612['attributes']['@external']),this['set']('content',_0x238612['content']),this['createdAt']=_0x238612['createdAt']||new Date(),this['set']('authoredAt',_0x238612['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x300c1c,'resolvedAt'),this['set']('attributes',_0x238612['attributes']||{}),this['bind']('isEditable')['to'](_0x5d8b6a,'_permissions',()=>{const _0x5a0349=_0x5d8b6a['getPermissions'](_0x300c1c['channelId'])['write'],_0xfab857=_0x5d8b6a['getPermissions'](_0x300c1c['channelId'])['modifyAll'];return _0x1ba783&&_0x5a0349||!_0x1ba783&&_0xfab857;}),this['bind']('isRemovable')['to'](_0x300c1c,'isRemovable',_0x5d8b6a,'_permissions',_0x2d631f=>{const _0x2ff756=_0x5d8b6a['getPermissions'](_0x300c1c['channelId'])['write'],_0x187abb=_0x5d8b6a['getPermissions'](_0x300c1c['channelId'])['modifyAll'];return _0x1ba783&&_0x2ff756||_0x2d631f&&_0xe62f59||!_0x1ba783&&_0x187abb&&!_0xe62f59;}),this['bind']('isReadOnly')['to'](_0x300c1c,'isReadOnly'),this['_repository']=_0x5d8b6a;}get['weight'](){return Math['max'](function(_0x380f3f){const _0x2fb563=document['createElement']('div');return _0x2fb563['innerHTML']=_0x380f3f,_0x2fb563['textContent']['length'];}(this['content']),0xc8);}['update'](_0x2d80a9){const {threadId:_0x88f7af,id:_0x53837d}=this;if(!this['_repository']['hasCommentThread'](_0x88f7af))throw new _0x441c59('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5b1e36}=this['_repository']['getCommentThread'](_0x88f7af);this['_repository']['fire'](bt('updateComment',_0x5b1e36,_0x88f7af),{'channelId':_0x5b1e36,'threadId':_0x88f7af,'commentId':_0x53837d,..._0x2d80a9});}['setAttribute'](_0x1f46e9,_0x49450b){const _0x515877=It(this['attributes']);At(_0x515877,_0x1f46e9,_0x49450b),this['update']({'attributes':_0x515877});}['removeAttribute'](_0x1ed052){const _0x317906=It(this['attributes']);Ct(_0x317906,_0x1ed052),this['update']({'attributes':_0x317906});}['remove'](_0x53fd79={}){if(!_0x53fd79['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x15458a,id:_0x5cee46}=this;if(!this['_repository']['hasCommentThread'](_0x15458a))throw new _0x441c59('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x44ddcc}=this['_repository']['getCommentThread'](_0x15458a);this['_repository']['fire'](bt('removeComment',_0x44ddcc,_0x15458a),{'channelId':_0x44ddcc,'threadId':_0x15458a,'commentId':_0x5cee46,..._0x53fd79});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x302984,..._0x103969){for(const _0x16d532 of _0x103969)void 0x0!==_0x16d532&&(_0x302984+=':'+String(_0x16d532));return _0x302984;}class rt extends _0x3a648c{constructor(_0x2f7fa7){super(_0x2f7fa7),this['set']('hasContent',!0x1);}['refresh'](){const _0x28b693=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x4493b0 of _0x28b693['getRanges']())if(this['_hasContent'](_0x4493b0))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x90237b=_0x50d72b(),ranges:_0x4411b3,comment:_0x2b0d11}={}){const _0x356d4d=this['editor']['model'],_0x3bd79f=_0x4411b3??Array['from'](_0x356d4d['document']['selection']['getRanges']()),_0x1938ee=[];for(const _0x3f7241 of _0x3bd79f)this['_hasContent'](_0x3f7241)&&_0x1938ee['push'](this['_trimToContent'](_0x3f7241));if(!_0x1938ee['length'])throw new _0x441c59('addcommentthreadcommand-incorrect-ranges',null);_0x2b0d11&&this['_createCommentThread'](_0x90237b,_0x2b0d11),this['_createMarkersFromRanges'](_0x90237b,_0x1938ee,!!_0x2b0d11);}['_createMarkersFromRanges'](_0x83bee3,_0x193736,_0x5c7dbe){this['editor']['model']['change'](_0x3ae3be=>{for(const _0x2348d5 of _0x193736){const _0x3eba22=_0x50d72b()['substr'](0x1,0x5),_0x1c37af='comment:'+_0x83bee3+':'+_0x3eba22;_0x3ae3be['addMarker'](_0x1c37af,{'range':_0x2348d5,'usingOperation':_0x5c7dbe,'affectsData':_0x5c7dbe});}});}['_createCommentThread'](_0x55f576,_0x2aba78){const _0x392b1c=this['editor']['plugins']['get']('CommentsRepository'),_0x4065bf=this['editor']['config']['get']('collaboration.channelId'),_0x54da41=this['editor']['plugins']['get']('Users')['me'];if(!_0x54da41)throw new _0x441c59('addcommentthreadcommand-user-not-found',null);_0x392b1c['addCommentThread']({'threadId':_0x55f576,'channelId':_0x4065bf,'comments':[{'authorId':_0x54da41['id'],'content':_0x2aba78,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1928cc){for(const _0x547e43 of _0x1928cc['getItems']())if(this['_itemIsContent'](_0x547e43))return!0x0;return!0x1;}['_itemIsContent'](_0x33df63){return _0x33df63['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x33df63)&&!_0x33df63['is']('element','tableCell');}['_trimToContent'](_0x32265a){const _0x13dba7=_0x5670af=>!this['_itemIsContent'](_0x5670af['item']),_0x33e552=_0x32265a['start']['getLastMatchingPosition'](_0x13dba7),_0x2b834c=_0x32265a['end']['getLastMatchingPosition'](_0x13dba7,{'direction':'backward'});return this['editor']['model']['createRange'](_0x33e552,_0x2b834c);}}class b extends _0x3a30de{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xaffd30){super(_0xaffd30),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x30d0f9=this['editor'],_0x25a3b5=_0x30d0f9['model']['document']['selection'],_0x257143=_0x5510df(()=>this['refreshSelectedViews'](),0xa);_0x25a3b5['on']('change:range',(_0x87996b,_0xc129)=>{_0xc129['directChange']&&(_0x257143['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x30d0f9['editing']['view']['document'],'change:isFocused',(_0x51acdb,_0x23f994,_0x577154)=>{_0x577154&&_0x257143();}),this['listenTo'](_0x30d0f9['ui']['focusTracker'],'change:isFocused',(_0x2eb4c4,_0x2bb9b7,_0x2f6857)=>{_0x2f6857||_0x30d0f9['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x18d07a=>this['_editorAnnotationsData']['has'](_0x18d07a['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x414389){if(this['_editorAnnotations']['has'](_0x414389['view']))return;this['_editorAnnotations']['add'](_0x414389['view']),this['editor']['ui']['focusTracker']['add'](_0x414389['view']['element']);const _0x370790=this['editor']['plugins']['get'](y);this['listenTo'](_0x370790['collection'],'remove',(_0x260ffa,_0x2e5291)=>{this['editor']['ui']['focusTracker']['remove'](_0x2e5291['view']['element']),this['_editorAnnotations']['delete'](_0x2e5291['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x32d4d9){if('function'!=typeof _0x32d4d9)throw new _0x441c59('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x32d4d9);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2db2c6,annotations:_0xd5abc}){const _0x34da3e=[],_0x157da5=this['editor']['model']['document']['selection'],_0xbc4ac6=Array['from'](_0x157da5['getRanges']());for(const [_0x335d95,_0x4bf5f7]of this['_editorAnnotationsData']){const _0x3b291a=_0x520534(_0x4bf5f7),_0x549e8c=_0xd5abc['getByInnerView'](_0x335d95);_0x3b291a&&_0x549e8c&&_0x34da3e['push']({'annotation':_0x549e8c,'range':_0x3b291a});}function _0x520534(_0x238926){for(const _0x571e9f of _0x238926)for(const _0x482976 of _0xbc4ac6)if(_0x571e9f['containsRange'](_0x482976,!_0x157da5['isCollapsed']))return _0x571e9f;return null;}return _0x34da3e['sort']((_0x5245f3,_0x18b60c)=>{const _0x24484c=_0x5245f3['range'],_0x17765c=_0x18b60c['range'];if(!_0x24484c['isEqual'](_0x17765c)){if(_0x24484c['containsRange'](_0x17765c,!0x0))return 0x1;if(_0x17765c['containsRange'](_0x24484c,!0x0))return-0x1;}return _0x5245f3['annotation']==_0x2db2c6?-0x1:_0x18b60c['annotation']==_0x2db2c6?0x1:0x0;})['map'](_0x3d0e57=>_0x3d0e57['annotation']);}get['_editorAnnotationsData'](){const _0x47b41c=new Map();for(const _0x415d3c of Array['from'](this['_dataCollectors']))for(const [_0x156214,_0x103bf5]of _0x415d3c())_0x47b41c['set'](_0x156214,_0x103bf5);return _0x47b41c;}}class st extends _0x3a30de{['afterInit'](){const _0x40f904=this['editor'];if(!_0x40f904['plugins']['has']('RestrictedEditingModeEditing'))return;_0x40f904['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x3a30de{constructor(_0x200d26){super(_0x200d26),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0xe9ca2a=this['editor'],_0x5df6aa=_0xe9ca2a['commands']['get']('importWord'),_0xd6881e=_0xe9ca2a['plugins']['get'](it);_0x5df6aa&&(_0x5df6aa['on']('execute',(_0x1641e8,[,_0x14ff74])=>{_0x14ff74['collaboration_features']={'comments':!0x0,'user_id':_0xd6881e['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5df6aa,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x131bb3,_0x327d58){const {comment_threads:_0x3d353e}=_0x327d58;_0x3d353e&&_0x3d353e['forEach'](({thread_id:_0xce835a,comments:_0x49e9f2,is_resolved:_0x25d327})=>{const _0x37a741=new Date(),_0x2f1655=_0x49e9f2['map'](({author:_0x417da7,content:_0x257dfa,created_at:_0x2f7ee1})=>({'content':_0x257dfa,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x37a741,'attributes':{'@external':{'authorName':_0x417da7,'createdAt':_0x2f7ee1?new Date(_0x2f7ee1):new Date(),'source':'importWord'}}})),_0x20b91f=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x20b91f,'threadId':_0xce835a,'comments':_0x2f1655,'resolvedAt':_0x25d327?_0x37a741:null});});}}class at extends _0x3a30de{constructor(_0x47365b){super(_0x47365b),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2586df=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2586df,'contentInsertion',(_0x653ed8,_0x51a249)=>this['_removeMarkersWithoutThreads'](_0x51a249['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x439f98){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x439f98;const _0x1abadd=this['editor']['plugins']['get']('CommentsRepository');for(const _0x171a22 of _0x439f98['keys']()){const [_0x318402,_0x154592]=_0x171a22['split'](':');'comment'!=_0x318402||_0x1abadd['hasCommentThread'](_0x154592)||_0x439f98['delete'](_0x171a22);}return _0x439f98;}['_registerMarkerInClipboardPipeline'](){const _0x3fbe0d=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0xc360c5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0xc360c5&&_0x3fbe0d['_registerMarkerToCopy']('comment',_0xc360c5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4091eb){switch(_0x4091eb){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x3a30de{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x3f737a,_0x24a57f)=>{if(!_0x24a57f['options']['showCommentHighlights'])return null;if(_0x24a57f['options']['ignoreResolvedComments']){const {id:_0xa7dcc0}=er(_0x3f737a['markerName']),_0x35843d=this['editor']['plugins']['get'](o);if(_0x35843d['getCommentThread'](_0xa7dcc0)?.['isResolved']&&_0x3f737a['item'])return _0x24a57f['consumable']['consume'](_0x3f737a['item'],'addMarker:'+_0x3f737a['markerName']),_0x24a57f['consumable']['consume'](_0x3f737a['item'],'removeMarker:'+_0x3f737a['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xe57e6b=>{_0xe57e6b['on']('addMarker:comment',(_0x449494,_0x331b1e,_0x1bb31a)=>{if(!_0x1bb31a['options']['showCommentHighlights'])return;const _0xfdf3d=_0x331b1e['item'];if(!_0xfdf3d)return;const _0x5c0c7b=_0x1bb31a['mapper']['toViewElement'](_0xfdf3d);this['editor']['model']['schema']['isObject'](_0xfdf3d)&&_0x5c0c7b&&!_0x5c0c7b['getCustomProperty']('widget')&&_0x5c0c7b['is']('containerElement')&&_0x2e0659(_0x5c0c7b,_0x1bb31a['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x80a854,{writer:_0x59e19c,options:_0x214b81})=>{if(!_0x214b81['showCommentHighlights'])return null;const _0x594b99=_0x59e19c['createContainerElement']('div'),_0x235e10=_0x59e19c['createEmptyElement']('hr');return _0x59e19c['addClass']('ck-horizontal-line',_0x594b99),_0x59e19c['insert'](_0x59e19c['createPositionAt'](_0x594b99,0x0),_0x235e10),_0x594b99;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4f6f7e,{writer:_0x2cbc4f,options:_0x3f4748})=>{if(!_0x3f4748['showCommentHighlights'])return null;const _0x401c40=_0x2cbc4f['createContainerElement']('span'),_0x1f00b3=_0x2cbc4f['createEmptyElement']('img');return _0x2cbc4f['addClass']('image-inline',_0x401c40),_0x2cbc4f['insert'](_0x2cbc4f['createPositionAt'](_0x401c40,0x0),_0x1f00b3),_0x401c40;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x424e2,{writer:_0x3dc634,options:_0x39eff0})=>{if(_0x39eff0['showCommentHighlights'])return _0x3dc634['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x131faf,_0x109988,_0x18cf1f)=>{_0x18cf1f['options']['showCommentHighlights']&&_0x131faf['stop']();},{'priority':'high'});}}class r extends _0x3a30de{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(_0x545931){super(_0x545931),this['set']('isThreadsLoadingPaused',!0x0),_0x545931['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x493ae7,_0x1e542a,_0xcfdd0f,_0x3ae055)=>{const _0x2c40fe=_0x545931['plugins']['get'](o),_0x421e8d=_0xcfdd0f?er(_0xcfdd0f)['id']:null;_0x545931['model']['change'](()=>{if(_0x421e8d){const _0x538249=this['getAllMarkersForId'](_0x421e8d);for(const _0x18bd85 of _0x538249)_0x545931['editing']['reconvertMarker'](_0x18bd85);}if(_0x3ae055){const {id:_0x4c4a3c}=er(_0x3ae055),_0x16f29d=_0x2c40fe['getCommentThread'](_0x4c4a3c);if(_0x16f29d&&_0x16f29d['unlinkedAt'])return;if(_0x16f29d&&!_0x16f29d['isAttached'])return;const _0x56ffbb=this['getAllMarkersForId'](_0x4c4a3c);for(const _0x47bec2 of _0x56ffbb)_0x545931['editing']['reconvertMarker'](_0x47bec2);}}),_0x421e8d&&this['scrollToThreadMarker'](_0x421e8d);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x14271f=this['editor'],_0x42909b=_0x14271f['plugins']['get'](o),_0x59339b=_0x14271f['config']['get']('collaboration.channelId'),_0x1ff7c2=_0x42909b['getCommentThreads']()['filter'](_0x1d63bf=>_0x1d63bf['channelId']!==_0x59339b);_0x14271f['commands']['add']('addCommentThread',new rt(_0x14271f)),this['listenTo'](_0x14271f,'change:isReadOnly',(_0x5e7afa,_0x449848,_0x5d44a7)=>{_0x42909b['switchReadOnly'](_0x5d44a7,_0x14271f['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x42909b,ft('addCommentThread',_0x59339b),(_0x256c89,{threadId:_0x40cf77})=>{const _0x1191ac=this['editor']['plugins']['get'](o)['getCommentThread'](_0x40cf77);_0x1191ac?.['unlinkedAt']&&this['_attachArchivedThread'](_0x40cf77);}),this['listenTo'](_0x42909b,ft('removeCommentThread',_0x59339b),(_0x1c596b,{threadId:_0x133b32})=>{_0x14271f['model']['enqueueChange']({'isUndoable':!0x1},_0x4483ec=>{const _0x1b805a=this['getAllMarkersForId'](_0x133b32);for(const _0x205059 of _0x1b805a)_0x4483ec['removeMarker'](_0x205059);});}),this['listenTo'](_0x42909b,ft('resolveCommentThread',_0x59339b),(_0x440ee7,{threadId:_0x599f34})=>{(this['_reconvertMarkers'](_0x599f34),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x599f34)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x42909b,ft('reopenCommentThread',_0x59339b),(_0x3ebe8e,{threadId:_0x1d7d64})=>{this['_reconvertMarkers'](_0x1d7d64);},{'priority':'low'}),this['listenTo'](_0x42909b,ft('addComment',_0x59339b),(_0x585517,{threadId:_0x21fe4f,isFromAdapter:_0x14a085})=>{const _0x24d2fc=this['getAllMarkersForId'](_0x21fe4f);if(_0x14a085||0x0==_0x24d2fc['length']||!_0x42909b['hasCommentThread'](_0x21fe4f))return;0x1===_0x42909b['getCommentThread'](_0x21fe4f)['length']&&_0x14271f['model']['enqueueChange']({'isUndoable':!0x1},_0x177183=>{for(const _0x12b2bc of _0x24d2fc)_0x177183['updateMarker'](_0x12b2bc,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x1ff7c2);}['afterInit'](){!async function(_0x26f13b){const _0x401766=_0x5c2aa5([0x38,0x58,0x41,0x32,0x37,0x4f,0x44,0x43,0x36,0x4d,0x46,0x79,0x6a,0x68,0x72,0x45,0x66,0x53,0x56,0x48,0x75,0x65,0x42,0x4c,0x49,0x31,0x55,0x73,0x63,0x35,0x33,0x4e,0x61,0x39,0x78,0x69,0x70,0x47,0x71,0x6d,0x77,0x6b,0x57,0x7a,0x76,0x64,0x34,0x6e,0x59,0x5a,0x67,0x6c,0x30,0x54,0x6f,0x51,0x74,0x52,0x50,0x62,0x4b,0x4a]),_0x51e52f=0x7e7a3181,_0x5ecd2f=0x7e7d5de9^_0x51e52f,_0x56b22b=window[_0x5c2aa5([0x44,0x61,0x74,0x65])][_0x5c2aa5([0x6e,0x6f,0x77])](),_0x4385eb=_0x26f13b[_0x5c2aa5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x7cf2e1=new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x243c9b=>{_0x4385eb[_0x5c2aa5([0x6f,0x6e,0x63,0x65])](_0x5c2aa5([0x72,0x65,0x61,0x64,0x79]),_0x243c9b);}),_0x17450e={[_0x5c2aa5([0x6b,0x74,0x79])]:_0x5c2aa5([0x45,0x43]),[_0x5c2aa5([0x75,0x73,0x65])]:_0x5c2aa5([0x73,0x69,0x67]),[_0x5c2aa5([0x63,0x72,0x76])]:_0x5c2aa5([0x50,0x2d,0x32,0x35,0x36]),[_0x5c2aa5([0x78])]:_0x5c2aa5([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]),[_0x5c2aa5([0x79])]:_0x5c2aa5([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]),[_0x5c2aa5([0x61,0x6c,0x67])]:_0x5c2aa5([0x45,0x53,0x32,0x35,0x36])},_0x1e0db9=_0x4385eb[_0x5c2aa5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5c2aa5([0x67,0x65,0x74])](_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x16d6b2(){let _0x4ec1a3,_0x351e86=null,_0x26fa7c=null;try{if(_0x1e0db9==_0x5c2aa5([0x47,0x50,0x4c]))return _0x5c2aa5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4ec1a3=_0xdaa122(),!_0x4ec1a3)return _0x5c2aa5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4ec1a3[_0x5c2aa5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x26fa7c=_0xf66baf(_0x4ec1a3[_0x5c2aa5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4ec1a3[_0x5c2aa5([0x6a,0x74,0x69])])),await _0x52de4d()?_0x1adcc4()?_0x1b8ba9()?_0x5c2aa5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x4b8c54()?(_0x4ec1a3[_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5c2aa5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x351e86=_0x5ae29c(_0x5c2aa5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4ec1a3[_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5c2aa5([0x74,0x72,0x69,0x61,0x6c])&&(_0x351e86=_0x5ae29c(_0x5c2aa5([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x57ee08()):_0x5c2aa5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5c2aa5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5c2aa5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5c2aa5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1b8ba9(){const _0x249951=[_0x5c2aa5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5c2aa5([0x74,0x72,0x69,0x61,0x6c])][_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ec1a3[_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x56b22b/0x3e8:0xe10*_0x5ecd2f;return _0x4ec1a3[_0x5c2aa5([0x65,0x78,0x70])]<_0x249951;}function _0x1adcc4(){const _0x328ddf=_0x4ec1a3[_0x5c2aa5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x328ddf)return!0x1;if(_0x328ddf[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2aa5([0x2a])))return!0x0;if(_0x328ddf[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2aa5([0x43,0x4d,0x54])))return!0x0;if(_0x328ddf[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2aa5([0x52,0x43,0x4d,0x54]))){if(_0xf4b7ac())return!0x0;if(_0x2e4ed5()||_0x5ed329())return!0x0;}return!0x1;}function _0x4b8c54(){const _0x49876e=_0x4ec1a3[_0x5c2aa5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x49876e||0x0==_0x49876e[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2a3904}=new URL(window[_0x5c2aa5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x49876e[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2a3904))return!0x0;const _0x30dbb6=_0x2a3904[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])](_0x5c2aa5([0x2e]));return _0x49876e[_0x5c2aa5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x21d374=>_0x21d374[_0x5c2aa5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5c2aa5([0x2a])))[_0x5c2aa5([0x6d,0x61,0x70])](_0x5c0e06=>_0x5c0e06[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])](_0x5c2aa5([0x2e])))[_0x5c2aa5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x15a128=>_0x15a128[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x30dbb6[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5c2aa5([0x6d,0x61,0x70])](_0x354ba3=>Array(_0x30dbb6[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x354ba3[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5c2aa5([0x66,0x69,0x6c,0x6c])](_0x354ba3[0x0]===_0x5c2aa5([0x2a])?_0x5c2aa5([0x2a]):'')[_0x5c2aa5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x354ba3))[_0x5c2aa5([0x73,0x6f,0x6d,0x65])](_0xeb5577=>_0x30dbb6[_0x5c2aa5([0x65,0x76,0x65,0x72,0x79])]((_0x3ae04f,_0x2f17bd)=>_0xeb5577[_0x2f17bd]===_0x3ae04f||_0xeb5577[_0x2f17bd]===_0x5c2aa5([0x2a])));}function _0x57ee08(){return _0x351e86&&_0x26fa7c?new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3d8fc9,_0x15a50d)=>{_0x351e86[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x3d8fc9,_0x15a50d),_0x26fa7c[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x1e1824=>{_0x1e1824!=_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64])&&_0x3d8fc9(_0x1e1824);},_0x15a50d);}):_0x351e86||_0x26fa7c||_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf66baf(_0x43ae90,_0x2068f7){return new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x489e1e=>{if(_0x3a4e16())return _0x489e1e(_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64]));_0x247a3e(),_0x4385eb[_0x5c2aa5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5c2aa5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x159749=!0x1;const _0x38ca0b=_0x50d72b();function _0x18d332(_0x6d967b){return!!_0x6d967b&&(typeof _0x6d967b===_0x5c2aa5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x6d967b===_0x5c2aa5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x6d967b[_0x5c2aa5([0x74,0x68,0x65,0x6e])]===_0x5c2aa5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x6d967b[_0x5c2aa5([0x63,0x61,0x74,0x63,0x68])]===_0x5c2aa5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x387734(_0x881265){_0x5a12cc(_0x881265)[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x2253c3=>{if(!_0x2253c3||_0x2253c3[_0x5c2aa5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5c2aa5([0x6f,0x6b]))return _0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0xec59e5(_0x589c82(_0x38ca0b+_0x2068f7))!=_0x2253c3[_0x5c2aa5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64]);})[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x54abdf=>(_0x4e2462(),_0x54abdf),()=>{const _0x49d4f7=_0x2f0028();return null==_0x49d4f7?(_0x4e2462(),_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64])):_0x5c2aa5(_0x56b22b-_0x49d4f7>(0x5a76b581^_0x51e52f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x489e1e)[_0x5c2aa5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x489e1e(_0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x1f6fb7=0x7e4cdf01^_0x51e52f;function _0x4e2462(){const _0x289cc8=_0x5c2aa5([0x6c,0x6c,0x63,0x74,0x2d])+_0xec59e5(_0x589c82(_0x43ae90)),_0x370adf=_0x263d64(_0xec59e5(window[_0x5c2aa5([0x4d,0x61,0x74,0x68])][_0x5c2aa5([0x63,0x65,0x69,0x6c])](_0x56b22b/_0x1f6fb7)));window[_0x5c2aa5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5c2aa5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x289cc8,_0x370adf);}function _0x2f0028(){const _0x5676d2=_0x5c2aa5([0x6c,0x6c,0x63,0x74,0x2d])+_0xec59e5(_0x589c82(_0x43ae90)),_0x3489ce=window[_0x5c2aa5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5c2aa5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5676d2);return _0x3489ce?window[_0x5c2aa5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x263d64(_0x3489ce),0x10)*_0x1f6fb7:null;}function _0x5a12cc(_0xc841c6){return new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1404f7,_0x4969b2)=>{_0xc841c6[_0x5c2aa5([0x74,0x68,0x65,0x6e])](_0x1404f7,_0x4969b2),window[_0x5c2aa5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4969b2,0x7e7be541^_0x51e52f);});}}_0x4385eb[_0x5c2aa5([0x6f,0x6e])](_0x5c2aa5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x43675d,_0x32b3e2)=>{if(_0x32b3e2[0x0]!=_0x43ae90)return _0x489e1e(_0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x32b3e2[0x1]={..._0x32b3e2[0x1],[_0x5c2aa5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x38ca0b};},{[_0x5c2aa5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5c2aa5([0x68,0x69,0x67,0x68])}),_0x4385eb[_0x5c2aa5([0x6f,0x6e])](_0x5c2aa5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x23b9e4=>{_0x18d332(_0x23b9e4[_0x5c2aa5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x159749=!0x0,_0x387734(_0x23b9e4[_0x5c2aa5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5c2aa5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5c2aa5([0x6c,0x6f,0x77])}),_0x7cf2e1[_0x5c2aa5([0x74,0x68,0x65,0x6e])](()=>{_0x159749||_0x489e1e(_0x5c2aa5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3a4e16(){return _0x4385eb[_0x5c2aa5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5c2aa5([0x76,0x69,0x65,0x77])][_0x5c2aa5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5c2aa5([0x61,0x75,0x74,0x6f]);}function _0x247a3e(){_0x4385eb[_0x5c2aa5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5c2aa5([0x76,0x69,0x65,0x77])][_0x5c2aa5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5c2aa5([0x61,0x75,0x74,0x6f]);}}function _0x5ae29c(_0xbaac3f){const _0xa454e6=[new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5d2010=>setTimeout(_0x5d2010,0x7e730f4d^_0x51e52f)),_0x7cf2e1[_0x5c2aa5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x24c1cf=>{let _0xc0a94f=0x0;_0x4385eb[_0x5c2aa5([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c2aa5([0x6f,0x6e])](_0x5c2aa5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3b634f,_0x83ef50)=>{_0x83ef50[0x0][_0x5c2aa5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xc0a94f++,_0xc0a94f==(0x7e7a3079^_0x51e52f)&&(_0x24c1cf(),_0x3b634f[_0x5c2aa5([0x6f,0x66,0x66])]());});}))];return window[_0x5c2aa5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5c2aa5([0x72,0x61,0x63,0x65])](_0xa454e6)[_0x5c2aa5([0x74,0x68,0x65,0x6e])](()=>_0xbaac3f);}async function _0x10b7d3(){await _0x7cf2e1,_0x4385eb[_0x5c2aa5([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c2aa5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x302a0d,_0x4385eb[_0x5c2aa5([0x6d,0x6f,0x64,0x65,0x6c])][_0x5c2aa5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x302a0d,_0x4385eb[_0x5c2aa5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5c2aa5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xf4b7ac(){return _0x2b52d2(_0x5c2aa5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x38137d(_0x5c2aa5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5c2aa5([0x73,0x74,0x61,0x74,0x65])]==_0x5c2aa5([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2e4ed5(){return _0x2b52d2(_0x5c2aa5([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 _0x5ed329(){return _0x2b52d2(_0x5c2aa5([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x1612e6(_0x4132af){const _0x4195a8=_0x39530d();_0x4385eb[_0x4195a8]=_0x5c2aa5([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4132af,_0x4132af!=_0x5c2aa5([0x56,0x61,0x6c,0x69,0x64])&&_0x10b7d3();}function _0x39530d(){const _0x134aa5=window[_0x5c2aa5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5c2aa5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5c2aa5([0x6e,0x6f,0x77])]())[_0x5c2aa5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5c2aa5([0x2e]),'');let _0x21a01e=_0x5c2aa5([0x58]);for(let _0x5e3ba1=0x0;_0x5e3ba1<_0x134aa5[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x5e3ba1+=0x2){let _0x10ff72=window[_0x5c2aa5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x134aa5[_0x5c2aa5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5e3ba1,_0x5e3ba1+0x2));_0x10ff72>=_0x401766[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x10ff72-=_0x401766[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x21a01e+=_0x401766[_0x10ff72];}return _0x21a01e;}function _0xdaa122(){const _0x49aa92=_0x1e0db9[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])](_0x5c2aa5([0x2e]));if(0x3!=_0x49aa92[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x551a5c(_0x49aa92[0x1]);function _0x551a5c(_0x57b9e0){const _0x16cac9=_0x1177c6(_0x57b9e0);return _0x16cac9&&_0x4fd1ec()?_0x16cac9:null;function _0x4fd1ec(){const _0x5aa97e=_0x16cac9[_0x5c2aa5([0x6a,0x74,0x69])],_0x46e2e2=window[_0x5c2aa5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5aa97e[_0x5c2aa5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x5aa97e[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x197521={..._0x16cac9,[_0x5c2aa5([0x6a,0x74,0x69])]:_0x5aa97e[_0x5c2aa5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x5aa97e[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x197521[_0x5c2aa5([0x76,0x63])],_0x589c82(_0x197521)==_0x46e2e2;}}}async function _0x52de4d(){let _0x50ee69=!0x0;try{const _0x561ee8=_0x1e0db9[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])](_0x5c2aa5([0x2e])),[_0x18a76a,_0x257fbe,_0x1f0975]=_0x561ee8;return _0x13bb22(_0x18a76a),await _0x3f5bdf(_0x18a76a,_0x257fbe,_0x1f0975),_0x50ee69;}catch{return!0x1;}function _0x13bb22(_0x30b601){const _0x1d66c2=_0x1177c6(_0x30b601);_0x1d66c2&&_0x1d66c2[_0x5c2aa5([0x61,0x6c,0x67])]==_0x5c2aa5([0x45,0x53,0x32,0x35,0x36])||(_0x50ee69=!0x1);}async function _0x3f5bdf(_0x33a1df,_0xdf1822,_0x55475f){const _0x263198=window[_0x5c2aa5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5c2aa5([0x66,0x72,0x6f,0x6d])](_0x11282e(_0x55475f),_0x599d44=>_0x599d44[_0x5c2aa5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x38156c=new window[(_0x5c2aa5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5c2aa5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x33a1df+_0x5c2aa5([0x2e])+_0xdf1822),_0x99c090=window[_0x5c2aa5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5c2aa5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x99c090)return;const _0x33b30b=await _0x99c090[_0x5c2aa5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5c2aa5([0x6a,0x77,0x6b]),_0x17450e,{[_0x5c2aa5([0x6e,0x61,0x6d,0x65])]:_0x5c2aa5([0x45,0x43,0x44,0x53,0x41]),[_0x5c2aa5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5c2aa5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5c2aa5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x99c090[_0x5c2aa5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5c2aa5([0x6e,0x61,0x6d,0x65])]:_0x5c2aa5([0x45,0x43,0x44,0x53,0x41]),[_0x5c2aa5([0x68,0x61,0x73,0x68])]:{[_0x5c2aa5([0x6e,0x61,0x6d,0x65])]:_0x5c2aa5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x33b30b,_0x263198,_0x38156c)||(_0x50ee69=!0x1);}}function _0x1177c6(_0x55734b){return _0x55734b[_0x5c2aa5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5c2aa5([0x65,0x79]))?JSON[_0x5c2aa5([0x70,0x61,0x72,0x73,0x65])](_0x11282e(_0x55734b)):null;}function _0x11282e(_0x5570be){return window[_0x5c2aa5([0x61,0x74,0x6f,0x62])](_0x5570be[_0x5c2aa5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5c2aa5([0x2b]))[_0x5c2aa5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5c2aa5([0x2f])));}function _0x589c82(_0x5f5030){let _0x224e6c=0x1505;function _0x3065d7(_0x580a4e){for(let _0x290ea5=0x0;_0x290ea5<_0x580a4e[_0x5c2aa5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x290ea5++){const _0x5aa7db=_0x580a4e[_0x5c2aa5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x290ea5);_0x224e6c=(_0x224e6c<<0x5)+_0x224e6c+_0x5aa7db,_0x224e6c&=_0x224e6c;}}function _0x22f40e(_0x4a90d9){Array[_0x5c2aa5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x4a90d9)?_0x4a90d9[_0x5c2aa5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x22f40e):_0x4a90d9&&typeof _0x4a90d9==_0x5c2aa5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5c2aa5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x4a90d9)[_0x5c2aa5([0x73,0x6f,0x72,0x74])]()[_0x5c2aa5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x539ee0,_0x184f1f])=>{_0x3065d7(_0x539ee0),_0x22f40e(_0x184f1f);}):_0x3065d7(window[_0x5c2aa5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x4a90d9));}return _0x22f40e(_0x5f5030),_0x224e6c>>>0x0;}function _0xec59e5(_0x3541f4){return _0x3541f4[_0x5c2aa5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5c2aa5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5c2aa5([0x30]));}function _0x263d64(_0x1f6e28){return _0x1f6e28[_0x5c2aa5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5c2aa5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5c2aa5([0x6a,0x6f,0x69,0x6e])]('');}function _0x2b52d2(_0x5c9fe3){return _0x4385eb[_0x5c2aa5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5c2aa5([0x68,0x61,0x73])](_0x5c9fe3);}function _0x38137d(_0x561358){return _0x4385eb[_0x5c2aa5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5c2aa5([0x67,0x65,0x74])](_0x561358);}function _0x302a0d(){}function _0x5c2aa5(_0xc4ebb4){return _0xc4ebb4['map'](_0x5a0685=>String['fromCharCode'](_0x5a0685))['join']('');}_0x1612e6(await _0x16d6b2());}(this);}['destroy'](){const _0x959949=this['editor']['plugins']['get'](o),_0x58182c=this['editor']['config']['get']('collaboration.channelId');for(const _0x240919 of _0x959949['getCommentThreads']({'channelId':_0x58182c}))_0x959949['_detachCommentThread'](_0x240919['id']),_0x959949['_threads']['delete'](_0x240919['id']);super['destroy']();}['hasMarkerForId'](_0x1480d4){return this['getAllMarkersForId'](_0x1480d4)['length']>0x0;}['getAllMarkersForId'](_0x2c8e10){const _0x28e517=[];for(const _0x4b6b57 of this['editor']['model']['markers'])_0x4b6b57['name']['startsWith']('comment:'+_0x2c8e10)&&_0x28e517['push'](_0x4b6b57);return _0x28e517;}['scrollToThreadMarker'](_0xf1758d){setTimeout(()=>{const _0x33bf81=this['_getTargetForId'](_0xf1758d);if(!_0x33bf81)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0xf1758d&&nt({'target':_0x33bf81[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x24c9a9){this['editor']['model']['change'](()=>{for(const _0x1ecc8d of this['getAllMarkersForId'](_0x24c9a9))this['editor']['editing']['reconvertMarker'](_0x1ecc8d);});}['_attachArchivedThread'](_0x5ace8d){const _0x3da3a4=this['editor']['plugins']['get'](o),_0x1b04db=this['editor']['plugins']['get'](b),_0x964ccf=_0x3da3a4['getCommentThread'](_0x5ace8d);if(!_0x964ccf['isAttached']){const _0x356cda=_0x964ccf['attachTo'](()=>this['_getTargetForId'](_0x964ccf['id']));_0x1b04db['registerAnnotation'](_0x356cda),_0x964ccf['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x5314cb=this['editor'],_0x203d83=_0x5314cb['plugins']['get'](it);_0x5314cb['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1499f0,_0x29edd1)=>{const {id:_0x3cf9c1}=er(_0x1499f0['markerName']),_0x483f48=_0x5314cb['plugins']['get'](o)['getCommentThread'](_0x3cf9c1),_0x523fa8=this['activeMarker']&&er(this['activeMarker'])['id']===_0x3cf9c1;let _0x4c6fbd;if(_0x483f48&&_0x483f48['isResolved']&&!_0x523fa8&&_0x1499f0['item'])return _0x29edd1['consumable']['consume'](_0x1499f0['item'],'addMarker:'+_0x1499f0['markerName']),_0x29edd1['consumable']['consume'](_0x1499f0['item'],'removeMarker:'+_0x1499f0['markerName']),null;const _0x182996=['ck-comment-marker'];return _0x523fa8&&_0x182996['push']('ck-comment-marker--active'),_0x4c6fbd=_0x483f48?.['length']?_0x483f48['comments']['first']['author']['id']:_0x203d83['me']['id'],{'classes':_0x182996,'attributes':{'data-comment':_0x3cf9c1,'data-author-id':_0x4c6fbd}};}}),_0x5314cb['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x51146e,{options:_0x17834f})=>{if(_0x17834f['showCommentHighlights'])return null;const _0x53bb66=_0x5314cb['plugins']['get'](o),_0x3968be=_0x5314cb['model']['markers']['get'](_0x51146e),{id:_0x405b53,part:_0x5f0b80}=er(_0x51146e);return _0x3968be&&!_0x3968be['affectsData']||_0x17834f['ignoreResolvedComments']&&_0x53bb66['getCommentThread'](_0x405b53)?.['isResolved']?null:{'group':'comment','name':_0x5f0b80?_0x405b53+':'+_0x5f0b80:_0x405b53};}}),_0x5314cb['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x1cdeea,{writer:_0x27d2bb})=>_0x27d2bb['createElement']('$marker',{'data-name':'comment:'+_0x1cdeea['getAttribute']('id')})}),_0x5314cb['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5b0906=this['editor'],_0x533993=_0x5b0906['plugins']['get'](o),_0x458c82=new Set(),_0x51e590=new Set();_0x5b0906['model']['document']['registerPostFixer'](_0x1d16b7=>{let _0x7d0537=!0x1;for(const {name:_0x3e5e2e,data:_0x28734e}of _0x5b0906['model']['document']['differ']['getChangedMarkers']()){const {group:_0x49615b,id:_0x42003c}=er(_0x3e5e2e);let _0xa05b28=_0x28734e['newRange'];if('comment'!==_0x49615b||!_0xa05b28)continue;const _0x5ebc02='$graveyard'===_0xa05b28['root']['rootName'];_0x5ebc02||(_0xa05b28=dt(_0xa05b28,_0x5b0906['model']),!_0xa05b28||_0xa05b28['isCollapsed']||!_0x28734e['newRange']||_0xa05b28['isEqual'](_0x28734e['newRange']))?_0x5b0906['model']['hasContent'](_0xa05b28)&&!_0x5ebc02?this['isThreadsLoadingPaused']?_0x458c82['add'](_0x3e5e2e):this['_handleThreadMarker'](_0x3e5e2e,_0x42003c):(_0x51e590['add'](_0x3e5e2e),_0x458c82['delete'](_0x3e5e2e),_0x1d16b7['removeMarker'](_0x3e5e2e),_0x7d0537=!0x0):(_0x1d16b7['updateMarker'](_0x3e5e2e,{'range':_0xa05b28}),_0x7d0537=!0x0);}return _0x7d0537;}),this['on']('change:isThreadsLoadingPaused',(_0x5d4ba7,_0x3dc1fb,_0x3342aa)=>{if(!_0x3342aa&&_0x458c82['size'])for(const _0x57f7a7 of _0x458c82){const {id:_0x464057}=er(_0x57f7a7);_0x458c82['delete'](_0x57f7a7),_0x5b0906['model']['markers']['get'](_0x57f7a7)&&this['_handleThreadMarker'](_0x57f7a7,_0x464057);}}),this['listenTo'](_0x5b0906['model']['document'],'change',()=>{for(const {name:_0x2a86f5,data:{newRange:_0x1d34f3}}of _0x5b0906['model']['document']['differ']['getChangedMarkers']()){const {group:_0x563222,id:_0x491a39}=er(_0x2a86f5);if('comment'!==_0x563222)continue;const _0x581582=_0x533993['getCommentThread'](_0x491a39),_0x3f9198=this['hasMarkerForId'](_0x491a39);_0x581582&&(!_0x581582['_hasTargetInContent']&&_0x1d34f3&&_0x5b0906['editing']['view']['once']('render',()=>{const _0x1355cd=_0x5b0906['plugins']['get'](y),_0x5402ba=_0x533993['_threadToController']['get'](_0x581582)['view'];_0x1355cd['getByInnerView'](_0x5402ba)['refreshVisibility']();},{'priority':'low'}),_0x581582['_hasTargetInContent']=_0x3f9198||!!_0x1d34f3),_0x1d34f3||(_0x51e590['add'](_0x2a86f5),_0x458c82['delete'](_0x2a86f5));}for(const _0x5d48a4 of _0x51e590){const {id:_0x2d1701}=er(_0x5d48a4),_0x41cdf2=_0x533993['getCommentThread'](_0x2d1701);if(_0x458c82['delete'](_0x5d48a4),!_0x41cdf2)continue;const _0x507a71=this['hasMarkerForId'](_0x2d1701);_0x507a71||_0x41cdf2['isSubmitted']?_0x507a71||_0x41cdf2['unlinkedAt']||_0x41cdf2['setUnlinkedAt'](new Date()):_0x41cdf2['remove']();}_0x51e590['clear']();});}['_handleInitialThreads'](_0x157d7d){_0x157d7d['forEach'](_0x29d638=>{_0x29d638['unlinkedAt']&&this['_attachArchivedThread'](_0x29d638['id']);});}['_getTargetForId'](_0x3671a0){const _0x5d78f6=this['editor'],_0x5057b0=this['getAllMarkersForId'](_0x3671a0);return et(_0x5d78f6['editing'],_0x5057b0);}['_getTextContext'](_0x1c1c83){const _0x384eba=this['getAllMarkersForId'](_0x1c1c83);let _0xf502d7='',_0x2994df=!0x1;for(const _0x2a1f19 of _0x384eba){const _0x3f5d21=_0x2a1f19['getRange']();for(const _0xcbbdaf of Array['from'](_0x3f5d21['getItems']()))_0xcbbdaf['is']('$textProxy')?(_0xf502d7&&_0x2994df&&(_0xf502d7+='\x20',_0x2994df=!0x1),_0xf502d7+=_0xcbbdaf['data']):_0x2994df=!0x0;_0x2994df=!0x0;}return _0xf502d7['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4f46be,_0x356bca){const _0x561401=this['editor'],_0x518623=_0x561401['plugins']['get'](o);let _0x264de5=_0x518623['getCommentThread'](_0x356bca);const _0x2225b6=_0x561401['config']['get']('collaboration.channelId'),_0x38c3f5=_0x561401['plugins']['get'](b);if(_0x264de5&&(_0x264de5['unlinkedAt']&&_0x264de5['setUnlinkedAt'](null),_0x264de5['isAttached']))return _0x264de5;return!this['getAllMarkersForId'](_0x356bca)[0x0]['managedUsingOperations']?_0x561401['editing']['view']['once']('render',()=>{if(_0x518623['getCommentThread'](_0x356bca))return;const _0x546324=_0x561401['plugins']['get'](y);_0x264de5=_0x518623['openNewCommentThread']({'channelId':_0x2225b6,'threadId':_0x356bca,'target':()=>this['_getTargetForId'](_0x356bca),'context':{'type':'text','value':this['_getTextContext'](_0x356bca)}});const _0x1019b3=_0x518623['_threadToController']['get'](_0x264de5)['view'],_0x48cbe4=_0x546324['getByInnerView'](_0x1019b3);_0x48cbe4&&_0x38c3f5['registerAnnotation'](_0x48cbe4);},{'priority':'low'}):_0x518623['fetchCommentThread']({'channelId':_0x2225b6,'threadId':_0x356bca})['then'](_0x5298de=>{if('destroyed'!==_0x561401['state']){if(_0x264de5=_0x5298de,_0x264de5&&!_0x264de5['isAttached']){const _0x437e19=_0x264de5['attachTo'](()=>this['_getTargetForId'](_0x356bca));_0x38c3f5['registerAnnotation'](_0x437e19),_0x264de5['isResolved']&&this['_reconvertMarkers'](_0x356bca);}else{if(!_0x264de5){const _0x53c267=this['getAllMarkersForId'](_0x356bca);_0x561401['model']['change'](_0x488937=>{for(const _0x4d3ba0 of _0x53c267)_0x488937['removeMarker'](_0x4d3ba0);});}}}}),_0x264de5;}['_handleThreadMarker'](_0x46ce34,_0x497878){const _0x52ff4c=this['_attachMarkerToThread'](_0x46ce34,_0x497878);_0x52ff4c&&!_0x52ff4c['context']&&_0x52ff4c['setContext']({'type':'text','value':this['_getTextContext'](_0x497878)});}['_initAriaMarkerChangeAnnouncements'](){const _0x4bc092=this['editor'];ot(_0x4bc092['model'],({left:_0x94f558,entered:_0x54cbfe})=>{for(const _0x3a8001 of _0x94f558)if(mt(_0x3a8001)){_0x4bc092['ui']['ariaLiveAnnouncer']['announce'](N(_0x4bc092['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x4cde91 of _0x54cbfe)if(mt(_0x4cde91)){_0x4bc092['ui']['ariaLiveAnnouncer']['announce'](N(_0x4bc092['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1851f4)));break;}});}}function ft(_0x317ea2,_0x3551b7){return _0x3551b7?_0x317ea2+':'+_0x3551b7:_0x317ea2;}function er(_0xfd4749){const _0x7d7088=_0xfd4749['split'](':');return{'group':_0x7d7088[0x0],'id':_0x7d7088[0x1],'part':_0x7d7088[0x2]};}function dt(_0x4e7979,_0x4ab3bb){const _0x1cf192=_0x4ab3bb['schema'],_0x15093a=_0x4ab3bb['createRange'](_0x4e7979['start']);for(const _0x175e43 of _0x4e7979['getWalker']()){const {type:_0x271f74,item:_0x60cb86,nextPosition:_0x139042}=_0x175e43;if('text'===_0x271f74||_0x1cf192['isObject'](_0x60cb86)){const _0x46d14f=_0x4ab3bb['createPositionBefore'](_0x60cb86);_0x15093a['isCollapsed']&&(_0x15093a['start']=_0x46d14f),_0x15093a['end']=_0x139042;}}return _0x15093a;}function mt(_0x1be1d4){return'comment'===er(_0x1be1d4['name'])['group'];}class s extends _0x3a30de{['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 _0x24c93f=this['editor'],_0x49edf1=_0x24c93f['plugins']['get'](o),_0x1b48a0=_0x24c93f['plugins']['get'](r),_0x12c1db=_0x24c93f['plugins']['get'](y),_0x1c3317=_0x24c93f['plugins']['get'](b);_0x24c93f['ui']['componentFactory']['add']('comment',()=>{const _0x518658=this['_createUIButton'](_0x50efaa);return _0x518658['tooltip']=!0x0,_0x518658;}),_0x24c93f['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x17389d)),_0x1c3317['addSourceCollector'](()=>{const _0x5e812a=[];for(const [_0x263e25,_0x1ac456]of _0x49edf1['_threadToController']){const _0x541d12=_0x1b48a0['getAllMarkersForId'](_0x263e25['id']),_0x130dba=_0x541d12['map'](_0x4606f4=>_0x4606f4['getRange']());_0x541d12['length']>0x0&&_0x5e812a['push']([_0x1ac456['view'],_0x130dba]);}return _0x5e812a;}),this['listenTo'](_0x12c1db,'change:activeAnnotations',(_0x262149,_0x4bc1bf,_0xbbc1d2)=>{const _0x57a86b=Array['from'](_0xbbc1d2)['map'](_0x5c62e8=>_0x5c62e8['innerView'])['find'](_0x1b6800=>_0x49edf1['_viewToController']['has'](_0x1b6800));if(!_0x57a86b)return void(_0x1b48a0['activeMarker']=null);const _0x341705=_0x49edf1['_viewToController']['get'](_0x57a86b)['model']['id'],_0x3a178c='comment:'+_0x341705;_0x341705&&_0x1b48a0['hasMarkerForId'](_0x341705)?_0x1b48a0['activeMarker']=_0x3a178c:_0x1b48a0['activeMarker']&&(_0x1b48a0['activeMarker']=null);}),this['listenTo'](_0x49edf1,'removeCommentThread',(_0x4ee7f1,{threadId:_0x15b33f,isFromAdapter:_0x5590f6})=>{!_0x5590f6&&_0x24c93f['ui']['focusTracker']['isFocused']&&_0x1b48a0['hasMarkerForId'](_0x15b33f)&&_0x24c93f['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x49edf1,'addComment',(_0x1804aa,{threadId:_0x24d235,isFromAdapter:_0x331e42})=>{if(_0x331e42||!_0x1b48a0['hasMarkerForId'](_0x24d235)||!_0x49edf1['hasCommentThread'](_0x24d235))return;0x1===_0x49edf1['getCommentThread'](_0x24d235)['length']&&(_0x24c93f['editing']['view']['focus'](),_0x1804aa['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x32abb5=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x45258f;for(const _0x3cc91b in _0x32abb5){const _0x52d621=_0x3cc91b,_0x4af948=_0x32abb5[_0x52d621];if('commentsLicenseKeyValid'==_0x4af948||'commentsLicenseKeyInvalid'==_0x4af948||'commentsLicenseKeyExpired'==_0x4af948||'commentsLicenseKeyDomainLimit'==_0x4af948||'commentsLicenseKeyNotAllowed'==_0x4af948||'commentsLicenseKeyEvaluationLimit'==_0x4af948||'commentsLicenseKeyTrialLimit'==_0x4af948||'commentsLicenseKeyUsageLimit'==_0x4af948){delete _0x32abb5[_0x52d621],_0x45258f=_0x4af948,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x45258f&&_0x32abb5['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x45258f&&_0x32abb5['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x45258f&&_0x32abb5['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x45258f&&_0x32abb5['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x45258f&&_0x32abb5['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x45258f&&_0x32abb5['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x45258f&&_0x32abb5['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x1e9d94){const _0x2435d0=this['editor'],_0x2eaa2a=new _0x1e9d94(_0x2435d0['locale']),_0x715f97=_0x2435d0['commands']['get']('addCommentThread');return _0x2eaa2a['set']({'label':N(_0x2435d0['locale'],'Comment'),'icon':_0x47f152}),_0x2eaa2a['bind']('isEnabled')['to'](_0x715f97,'hasContent'),this['listenTo'](_0x2eaa2a,'execute',()=>{_0x715f97['execute']();}),_0x2eaa2a;}}class i extends _0x3a30de{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0xd225be){super(_0xd225be),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1eb78e,_0x16a4fd,_0x4adc1a)=>{_0x4adc1a?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2f91be,_0x36498d]of this['editor']['commands'])_0x36498d['affectsData']&&'addCommentThread'!==_0x2f91be&&_0x36498d['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x10f4b8=this['editor']['editing']['view']['document'];this['listenTo'](_0x10f4b8,'cut',_0x288836=>_0x288836['stop'](),{'priority':'highest'}),this['listenTo'](_0x10f4b8,'clipboardInput',_0x23b8f5=>_0x23b8f5['stop'](),{'priority':'highest'}),this['listenTo'](_0x10f4b8,'delete',_0x284035=>_0x284035['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3ae35c,_0x549e2c]of this['editor']['commands'])_0x549e2c['affectsData']&&'addCommentThread'!==_0x3ae35c&&_0x549e2c['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 _0x42791b{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46fdab){super(_0x46fdab),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1d52f5=this['context']['plugins']['get'](y);this['listenTo'](_0x1d52f5,'_activateAnnotation',(_0x2ed97c,_0x20a50c)=>{for(const _0x3ba1e5 of this['activeUIs']){const _0x59f2c8=this['_uis']['get'](_0x3ba1e5);(0x0,this['uisData']['get'](_0x3ba1e5)['filter'])(_0x20a50c)&&_0x59f2c8['setActiveAnnotation'](_0x20a50c);}}),this['listenTo'](_0x1d52f5,'_deactivateAllAnnotations',()=>{for(const _0xf7ee87 of this['activeUIs']){this['_uis']['get'](_0xf7ee87)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1d52f5['_visibleAnnotations'],'add',(_0x8cb58c,_0x59de4e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x59de4e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x261ff8){return this['activeUIs']['has'](_0x261ff8);}['activate'](_0xd44c12,_0x2949d8=this['defaultFilter']){const _0x115f12=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0xd44c12))throw new _0x441c59('annotationsuis-missing-ui',this,{'uiName':_0xd44c12});this['isActive'](_0xd44c12)&&this['deactivate'](_0xd44c12),this['activeUIs']['add'](_0xd44c12);const _0x47530c=new S();v({'source':_0x115f12['_visibleAnnotations'],'target':_0x47530c,'filter':_0x2949d8}),this['uisData']['set'](_0xd44c12,{'collection':_0x47530c,'filter':_0x2949d8});const _0x50a668=this['_uis']['get'](_0xd44c12);_0x50a668['attach'](_0x47530c),this['listenTo'](_0x50a668,'change:activeAnnotation',(_0x577335,_0x393bd5,_0x387b2e,_0x3ea41e)=>{_0x3ea41e&&_0x115f12['_removeActiveAnnotation'](_0x3ea41e),_0x387b2e&&_0x115f12['_addActiveAnnotation'](_0x387b2e);});}['deactivate'](_0x4a9321){if(this['activeUIs']['delete'](_0x4a9321),!this['_uis']['has'](_0x4a9321))throw new _0x441c59('annotationsuis-missing-ui',this,{'uiName':_0x4a9321});const _0x59371a=this['_uis']['get'](_0x4a9321);_0x59371a['detach'](),this['stopListening'](_0x59371a),this['uisData']['get'](_0x4a9321)['collection']['destroy'](),this['uisData']['delete'](_0x4a9321);}['switchTo'](_0x3f90b5){if(!this['_uis']['has'](_0x3f90b5))throw new _0x441c59('annotationsuis-missing-ui',this,{'uiName':_0x3f90b5});const _0x4501e4=this['context']['plugins']['get'](y),_0x22cc8e=Array['from'](_0x4501e4['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3f90b5);const _0xf3b574=this['_uis']['get'](_0x3f90b5);_0xf3b574['setActiveAnnotation'](_0x22cc8e),_0xf3b574['_setSelectedAnnotations']&&_0x22cc8e&&_0xf3b574['_setSelectedAnnotations']([_0x22cc8e]);}['deactivateAll'](){for(const _0x1a0ed5 of this['activeUIs'])this['deactivate'](_0x1a0ed5);}['register'](_0x964a88,_0x1367e7){if(this['_uis']['has'](_0x964a88))throw new _0x441c59('annotationsuis-register-already-registered');if('function'!=typeof _0x1367e7['attach']||'function'!=typeof _0x1367e7['detach']||'function'!=typeof _0x1367e7['setActiveAnnotation'])throw new _0x441c59('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x964a88,_0x1367e7);}['refilterAnnotations'](){const _0x43facc=this['context']['plugins']['get'](y)['collection'],_0x543324=new Map(),_0x5f2bb6=Array['from'](this['activeUIs']);for(const _0x2c0f32 of this['activeUIs']){const _0x1acbf1=this['uisData']['get'](_0x2c0f32)['collection'];for(const _0x144827 of _0x1acbf1)_0x543324['set'](_0x144827,_0x2c0f32);}for(const _0x3a37d6 of _0x43facc){const _0xd594b4=_0x543324['get'](_0x3a37d6);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3a37d6);const _0x5c69c3=_0x5f2bb6['find'](_0x38bb93=>this['uisData']['get'](_0x38bb93)['filter'](_0x3a37d6));_0xd594b4!==_0x5c69c3&&(_0xd594b4&&this['uisData']['get'](_0xd594b4)['collection']['remove'](_0x3a37d6),_0x5c69c3&&this['uisData']['get'](_0x5c69c3)['collection']['add'](_0x3a37d6));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x516f21){const _0x26f109=[];for(const _0x1b0064 of this['activeUIs']){(0x0,this['uisData']['get'](_0x1b0064)['filter'])(_0x516f21)&&_0x26f109['push'](_0x1b0064);}if(_0x26f109['length']>0x1)throw new _0x441c59('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x26f109,'annotationType':_0x516f21['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x145224){super(_0x145224),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5a42ba,_0x33433f)=>_0x5a42ba+_0x33433f),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x44b030=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x44b030['to']('isAnimationDisabled',_0x79cd5f=>_0x79cd5f?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x44b030['to']('top',_0x3dc28a=>Ot(_0x3dc28a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x6d8b18=this['element']['clientHeight'];_0x6d8b18&&(this['height']=_0x6d8b18);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x42791b{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1020ca){super(_0x1020ca),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 _0x4d76e8=this['context']['config']['get']('sidebar.container');_0x4d76e8&&this['setContainer'](_0x4d76e8);}['setContainer'](_0x1b8e56){if(!g(_0x1b8e56))throw new _0x441c59('sidebar-setcontainer-invalid-element');this['container']=_0x1b8e56;}['_attachToContainer']({viewClass:_0x5c905e='',spaceBetweenItems:_0x2d6535=0x19}={}){if(!g(this['container']))throw new _0x441c59('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5c905e,this['_spaceBetweenItems']=_0x2d6535;}['rearrange']({removedAnnotation:_0x5f062b,previousAnnotation:_0x3cf6c4,nextAnnotation:_0x4f6421}){const _0x4fb5eb=this['getSidebarItemView'](_0x5f062b);this['view']['list']['remove'](_0x4fb5eb),this['_destroySidebarItemView'](_0x5f062b),_0x3cf6c4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3cf6c4)),_0x4f6421&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4f6421)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x53df69,activatedAnnotation:_0xcb616a,disableAnimationOnActivatedAnnotation:_0xad82d3}){if(this['_activeAnnotation']=_0xcb616a,_0x53df69){_0x53df69['isActive']=!0x1;const _0x3a2b01=this['getSidebarItemView'](_0x53df69);_0x3a2b01&&_0xad82d3&&(_0x3a2b01['isAnimationDisabled']=!0x1);}if(_0xcb616a){const _0xfe6cb7=this['getSidebarItemView'](_0xcb616a);_0xfe6cb7&&(_0xcb616a['isActive']=!0x0,_0xad82d3&&(_0xfe6cb7['isAnimationDisabled']=!0x0,_0xfe6cb7['top']+=0x1),this['_alignToTargetRect'](_0xfe6cb7));}}['_detachFromContainer'](_0x42c3e6){if(this['view']['element']['remove'](),_0x42c3e6){for(const _0x2e9341 of _0x42c3e6)this['_destroySidebarItemView'](_0x2e9341);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x165fb1,_0x21c789){_0x21c789||(_0x21c789=_0x165fb1['view']);const _0x326697=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x326697,_0x165fb1),this['_annotationToSidebarItemView']['set'](_0x165fb1,_0x326697),_0x326697['content']['add'](_0x21c789),this['listenTo'](_0x165fb1['view'],'change:targetRect',(_0x46283f,_0x292bc0,_0x216ee)=>{const _0x31a675=this['_getTargetTop'](_0x165fb1,_0x216ee);_0x326697['_targetTop']!=_0x31a675&&(_0x326697['_targetTop']=_0x31a675,this['_setItemTop'](_0x326697,_0x31a675));}),this['listenTo'](_0x326697,'change:top',()=>{this['_recalculate'](_0x326697,'top');}),this['listenTo'](_0x326697,'change:bottom',()=>{this['_recalculate'](_0x326697,'bottom');}),this['_alignToTargetRect'](_0x326697);const _0xe2b313=this['_getItemBefore'](_0x326697);if(_0xe2b313)this['_alignAfterItem'](_0xe2b313,_0x326697)||this['_alignToTargetRect'](_0x326697);else this['_alignToTargetRect'](_0x326697);return this['_updateLastItem'](),this['view']['list']['add'](_0x326697),_0x326697;}['_alignForTopChange'](_0x49c7f2){if(!_0x49c7f2['content']['length'])return;const _0x404c5a=this['_getItemBefore'](_0x49c7f2);if(!_0x404c5a)return;const _0x400aa0=this['_sidebarItemViewToAnnotation']['get'](_0x404c5a),_0x23164a=this['_activeAnnotation'];_0x23164a&&_0x23164a===_0x400aa0?this['_alignAfterItem'](_0x404c5a,_0x49c7f2):this['_alignBeforeItem'](_0x49c7f2,_0x404c5a);}['_alignForBottomChange'](_0x2c55b5){if(!_0x2c55b5['content']['length'])return;const _0x3922e8=this['_getItemAfter'](_0x2c55b5);if(!_0x3922e8)return;const _0x14a038=this['_sidebarItemViewToAnnotation']['get'](_0x3922e8),_0xcce87d=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x56f669=this['_activeAnnotation'];_0x56f669&&_0x56f669===_0x14a038&&_0xcce87d?(this['_alignBeforeItem'](_0x3922e8,_0x2c55b5),this['_alignAfterItem'](_0x2c55b5,_0x3922e8)):_0x56f669&&_0x56f669===_0x14a038?this['_alignBeforeItem'](_0x3922e8,_0x2c55b5):this['_alignAfterItem'](_0x2c55b5,_0x3922e8);}['_recalculate'](_0x4fd0e5,_0x2caaf4){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x183a10,changedProp:_0x7d5a65}of this['_recalculateBuffer'])'top'===_0x7d5a65?this['_alignForTopChange'](_0x183a10):this['_alignForBottomChange'](_0x183a10);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4fd0e5,'changedProp':_0x2caaf4});}['getSidebarItemView'](_0x31fdb3){return this['_annotationToSidebarItemView']['get'](_0x31fdb3);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x410e3b){const _0x1f8175=this['getSidebarItemView'](_0x410e3b);this['stopListening'](_0x1f8175),this['stopListening'](_0x410e3b['view']),_0x1f8175['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x410e3b),this['_sidebarItemViewToAnnotation']['delete'](_0x1f8175);}['_createSidebarView'](){const _0x157ac1=new H(this['context']['locale']);return _0x157ac1['render'](),this['on']('change:_lastItem',(_0x1bb444,_0x50e9a8,_0x461383,_0x3d7694)=>{_0x3d7694&&_0x157ac1['unbind']('minHeight'),_0x461383?_0x157ac1['bind']('minHeight')['to'](_0x461383,'bottom'):_0x157ac1['minHeight']=null;}),_0x157ac1;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4ec285){const _0x3ff8ea=this['_sidebarItemViewToAnnotation']['get'](_0x4ec285),_0x28f0c7=_0x3ff8ea&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3ff8ea)-0x1);return _0x28f0c7&&this['getSidebarItemView'](_0x28f0c7)||null;}['_getItemAfter'](_0x121859){const _0x54eae6=this['_sidebarItemViewToAnnotation']['get'](_0x121859),_0x35871f=_0x54eae6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x54eae6)+0x1);return _0x35871f&&this['getSidebarItemView'](_0x35871f)||null;}['_alignBeforeItem'](_0x5682ba,_0x3f4d26){_0x5682ba['updateHeight']();const _0x2c6cf5=G(_0x3f4d26['bottom']+this['_spaceBetweenItems'],_0x5682ba['top']);return!!_0x2c6cf5&&(this['_setItemTop'](_0x3f4d26,_0x3f4d26['top']-_0x2c6cf5),!0x0);}['_alignAfterItem'](_0x266c7c,_0x25d8aa){_0x266c7c['updateHeight']();const _0x5d3665=G(_0x266c7c['bottom']+this['_spaceBetweenItems'],_0x25d8aa['top']);return!!_0x5d3665&&(this['_setItemTop'](_0x25d8aa,_0x25d8aa['top']+_0x5d3665,!0x1),!0x0);}['_alignToTargetRect'](_0x443df1){const _0x37edcc=this['_sidebarItemViewToAnnotation']['get'](_0x443df1);if(!_0x37edcc||!_0x37edcc['target']||!_0x37edcc['targetRect'])return;const _0x3ecc8a=this['_getTargetTop'](_0x37edcc,_0x37edcc['targetRect']);this['_setItemTop'](_0x443df1,_0x3ecc8a);}['_getTargetTop'](_0x11d54c,_0x572984){if(null===_0x572984)return 0x0;if(_0x11d54c['target']instanceof _0x56aaf6)return _0x572984['top'];{const _0x3061c3=new _0x56aaf6(this['view']['element'])['top'];return _0x572984['top']-_0x3061c3;}}['_setItemTop'](_0x31e447,_0x1a3f8c,_0x5f413f=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5f413f&&(_0x1a3f8c=Math['max'](_0x1a3f8c,this['_getMaxAvailableTop'](_0x31e447))),_0x31e447['top']=_0x1a3f8c;}['_getMaxAvailableTop'](_0x39cdbd){let _0xf5babe=this['_getItemBefore'](_0x39cdbd),_0x168dcf=0x0;for(;_0xf5babe;)_0xf5babe['updateHeight'](),_0x168dcf+=this['_spaceBetweenItems']+_0xf5babe['height'],_0xf5babe=this['_getItemBefore'](_0xf5babe);return _0x168dcf;}}function G(_0x5cc8a3,_0x2a9d72){return Math['max'](_0x5cc8a3-_0x2a9d72,0x0);}function g(_0x45ff84){return null!==_0x45ff84&&'object'==typeof _0x45ff84&&0x1===_0x45ff84['nodeType'];}class e extends _0x42791b{['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(_0x621783){super(_0x621783),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x364175(),this['_refreshPositioningDebounced']=_0x5510df(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x2c9a7e=this['context']['plugins']['get'](j),_0x2d2f2c=this['context']['plugins']['get'](z);_0x2c9a7e['register']('wideSidebar',this),_0x2d2f2c['container']&&_0x2c9a7e['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x3f46ca){if(_0x3f46ca===this['activeAnnotation'])return;const _0x2c0c3c=this['context']['plugins']['get'](z);_0x2c0c3c['_activeAnnotation']=_0x3f46ca;const _0x36e8c4=this['activeAnnotation'];_0x2c0c3c['refresh']({'blurredAnnotation':_0x36e8c4,'activatedAnnotation':_0x3f46ca}),this['activeAnnotation']=_0x3f46ca;}['attach'](_0x1e9869){this['annotations']=_0x1e9869;const _0x306d02=this['context']['plugins']['get'](z);if(_0x306d02['_annotations']=_0x1e9869,this['isAttached'])throw new _0x441c59('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x306d02,'set:container',()=>{this['detach'](),this['listenTo'](_0x306d02,'change:container',_0x1a4882=>{_0x1a4882['off'](),this['attach'](_0x1e9869);});}),_0x306d02['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x405516=_0x220ca8=>{_0x220ca8['updateTargetRect'](),_0x306d02['addAnnotation'](_0x220ca8);};for(const _0x5349c5 of _0x1e9869)_0x405516(_0x5349c5);this['listenTo'](_0x1e9869,'add',(_0x13eaad,_0x32ced5)=>{_0x405516(_0x32ced5);}),this['listenTo'](_0x1e9869,'remove',(_0x51499d,_0x597534,_0x1c1e44)=>{_0x306d02['rearrange']({'removedAnnotation':_0x597534,'previousAnnotation':_0x1e9869['get'](_0x1c1e44-0x1),'nextAnnotation':_0x1e9869['get'](_0x1c1e44+0x1)}),_0x597534===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x1e9869,'focus',(_0x21872b,_0x16b99f)=>{this['setActiveAnnotation'](_0x16b99f);}),this['listenTo'](_0x1e9869,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2b9220=this['context']instanceof _0xe14280?this['context']['editors']:new _0x364175([this['context']]);for(const _0x2afc70 of _0x2b9220)this['_integrateWithEditorAnnotations'](_0x2afc70);this['listenTo'](_0x2b9220,'add',(_0x3041ce,_0x4f78d0)=>{this['listenTo'](_0x4f78d0,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4f78d0);});}),this['listenTo'](_0x2b9220,'remove',(_0x4b6c56,_0x1ee7c7)=>{_0x1ee7c7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1ee7c7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x441c59('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xc7bd31=this['context']['plugins']['get'](z);_0xc7bd31['_detachFromContainer'](this['annotations']),this['stopListening'](_0xc7bd31),this['stopListening'](this['annotations']),this['context']instanceof _0xe14280&&this['stopListening'](this['context']['editors']);for(const _0x2e6a8 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2e6a8);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x33b1a8){if(!_0x33b1a8['plugins']['has']('EditorAnnotations'))return;const _0x2e4520=_0x33b1a8['plugins']['get']('EditorAnnotations'),_0x59520b=()=>{const _0x56fa09=_0x2e4520['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x56fa09[0x0]||null);};this['listenTo'](_0x2e4520,'refresh',_0x59520b),this['listenTo'](_0x2e4520,'blur',(_0x225a32,{isAnnotationTracked:_0x40c0d4})=>{this['activeAnnotation']&&_0x40c0d4(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2e4520,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xc2a6d4=>{_0x2e4520['hasDomSelection']()&&(_0x59520b(),_0xc2a6d4['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2e4520);}['_destroyEditorAnnotationsIntegration'](_0x55e85f){this['stopListening'](_0x55e85f),this['_editorAnnotations']['remove'](_0x55e85f);}}class C extends _0x50efaa{['counterView'];constructor(_0x4be117){super(_0x4be117);const _0xa6d62b=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x38f1e0,_0x3ec506)=>_0x38f1e0?'...':_0x3ec506['toString']()),this['set']('annotationType',''),this['icon']=_0x47f152,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0xa6d62b['to']('annotationType',_0x511e21=>'ck-annotation-counter__badge--'+_0x511e21),_0xa6d62b['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0xa6d62b['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x42791b{['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(_0x1b3408){super(_0x1b3408),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x57119a())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x364175(),this['_refreshPositioningDebounced']=_0x5510df(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x46ec89(this['context']['locale']),this['balloonPanelView']=new _0x15b8ea(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x477cba){this['annotations']=_0x477cba;const _0x288a78=this['context']['plugins']['get'](z),_0x55dcd1=this['balloonPanelView'];if(_0x288a78['_annotations']=_0x477cba,this['isAttached'])throw new _0x441c59('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x288a78,'set:container',()=>{this['detach'](),this['listenTo'](_0x288a78,'change:container',_0x5780e9=>{_0x5780e9['off'](),this['attach'](_0x477cba);});}),_0x288a78['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1bee57=_0x1874aa=>{const _0xfe8d7a=new C(this['context']['locale']);_0x288a78['addAnnotation'](_0x1874aa,_0xfe8d7a),this['_annotationToNarrowView']['set'](_0x1874aa,_0xfe8d7a),_0xfe8d7a['bind']('isDirty','annotationType','number')['to'](_0x1874aa['view'],'isDirty','type','length'),_0xfe8d7a['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x55dcd1['content']['first']!==_0x1874aa['view']?(this['_showBalloon'](_0x1874aa),_0x1874aa['view']['element']['focus'](),this['setActiveAnnotation'](_0x1874aa)):this['setActiveAnnotation'](null);});};for(const _0x568f37 of _0x477cba)_0x1bee57(_0x568f37);this['listenTo'](_0x477cba,'add',(_0x4cb447,_0x2c02ac)=>{_0x1bee57(_0x2c02ac);}),this['listenTo'](_0x477cba,'remove',(_0x1461ae,_0x3f7e50,_0x5888f1)=>{this['_annotationToNarrowView']['get'](_0x3f7e50)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3f7e50),_0x288a78['rearrange']({'removedAnnotation':_0x3f7e50,'previousAnnotation':_0x477cba['get'](_0x5888f1-0x1),'nextAnnotation':_0x477cba['get'](_0x5888f1+0x1)}),_0x3f7e50===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x477cba,'focus',(_0x7a5de6,_0xcbc1)=>{this['setActiveAnnotation'](_0xcbc1);}),this['listenTo'](_0x477cba,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x4864d1,_0x1f5823)=>{_0x1f5823['keyCode']===_0x465a8c['esc']&&_0x55dcd1['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x55dcd1['content']['first']),this['_hideBalloon'](),_0x1f5823['stopPropagation'](),_0x1f5823['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x359f2d,_0x90e5fe)=>{const _0xbd5670=_0x90e5fe['target'];_0x55dcd1['isVisible']&&_0x55dcd1['element']['contains'](_0xbd5670)||_0x288a78['view']['element']['contains'](_0xbd5670)||_0x359f2d['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x35dc3f=>_0x35dc3f['contains'](_0xbd5670))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x259c76=this['context']instanceof _0xe14280?this['context']['editors']:new _0x364175([this['context']]);for(const _0x5e86eb of _0x259c76)this['_integrateWithEditorAnnotations'](_0x5e86eb);this['listenTo'](_0x259c76,'add',(_0x3f4b16,_0x59c6e4)=>{this['listenTo'](_0x59c6e4,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x59c6e4);});}),this['listenTo'](_0x259c76,'remove',(_0x430955,_0x26b7a1)=>{_0x26b7a1['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x26b7a1['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x13a5c2){if(_0x13a5c2===this['activeAnnotation'])return;const _0x1a22d8=this['context']['plugins']['get'](z);if(_0x1a22d8['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x13a5c2,'disableAnimationOnActivatedAnnotation':!0x0}),_0x13a5c2)_0x1a22d8['getSidebarItemView'](_0x13a5c2)?this['_showBalloon'](_0x13a5c2):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x13a5c2;}['detach'](){if(!this['isAttached'])throw new _0x441c59('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x131ca1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5e15fd=>_0x5e15fd['destroy']()),this['_annotationToNarrowView']['clear'](),_0x131ca1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xe14280&&this['stopListening'](this['context']['editors']);for(const _0x532a61 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x532a61);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'](_0x11a426){if(!_0x11a426['plugins']['has']('EditorAnnotations'))return;const _0x555960=_0x11a426['plugins']['get']('EditorAnnotations'),_0x3e2378=this['context']['plugins']['get'](z),_0xff5f0d=this['annotations'],_0x4315a5=this['balloonPanelView'],_0x293d5a=()=>{const _0x47673b=_0x555960['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x47673b),this['setActiveAnnotation'](_0x47673b[0x0]||null);};this['listenTo'](_0x555960,'refresh',_0x293d5a),this['listenTo'](_0x555960,'blur',(_0x55bd7d,{isAnnotationTracked:_0x621323})=>{this['activeAnnotation']&&_0x621323(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x555960,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xff5f0d,'blur',_0x50d2f0=>{_0x555960['hasDomSelection']()&&_0x50d2f0['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xbe01e1,_0x721263)=>{const _0x51e94d=_0x721263['target'];_0x4315a5['isVisible']&&_0x4315a5['element']['contains'](_0x51e94d)||_0x3e2378['view']['element']['contains'](_0x51e94d)||this['activeAnnotation']&&_0x555960['hasDomSelection']()&&(_0x293d5a(),_0xbe01e1['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x555960);}['_destroyEditorAnnotationsIntegration'](_0x1b6da4){_0x1b6da4&&(this['stopListening'](_0x1b6da4),this['_editorAnnotations']['remove'](_0x1b6da4));}['_setSelectedAnnotations'](_0x13e394){for(const _0x5d5263 of this['_selectedAnnotations'])_0x13e394['includes'](_0x5d5263)||this['_manuallyClosedAnnotationViews']['delete'](_0x5d5263['view']);this['_selectedAnnotations']=_0x13e394;}['_refreshPositioning'](){const _0x429594=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x429594['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5e5f67){if(this['_manuallyClosedAnnotationViews']['has'](_0x5e5f67['view']))return;const _0x5f5493=this['balloonPanelView']['content']['first'];_0x5f5493!==_0x5e5f67['view']?(_0x5f5493&&this['_detachListeners'](_0x5f5493),this['_attachListeners'](_0x5e5f67['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5e5f67['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x2172d6=this['balloonPanelView']['content']['first'],_0x77485c=_0x2172d6&&this['annotations']['getByView'](_0x2172d6);if(!_0x77485c||!this['_annotationToNarrowView']['has'](_0x77485c))return;const _0x113500=this['_annotationToNarrowView']['get'](_0x77485c)['element'],_0x597e5b=(function(){const _0x145cb7=_0x15b8ea['defaultPositions'];return[_0x145cb7['southArrowNorthEast'],_0x145cb7['northArrowSouthEast'],_0x145cb7['southArrowNorth'],_0x145cb7['northArrowSouth'],_0x145cb7['southArrowNorthWest'],_0x145cb7['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x113500,'positions':_0x597e5b});}['_hideBalloon'](){const _0x527b4d=this['balloonPanelView'],_0x2ebc04=_0x527b4d['content']['first'];_0x2ebc04&&(this['_detachListeners'](_0x2ebc04),_0x527b4d['unpin'](),_0x527b4d['content']['clear']());}['_attachListeners'](_0x1f8d8f){this['listenTo'](_0x1f8d8f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1f8d8f,'Esc',(_0x3565ee,_0x2c0528)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1f8d8f),this['_hideBalloon'](),_0x2c0528();});}['_detachListeners'](_0x45aaa9){this['stopListening'](_0x45aaa9);}}class c extends _0x3a30de{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x45ef95,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x23212c){super(_0x23212c),_0x23212c['editing']['view']['addObserver'](_0x17a1e9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x23212c['plugins']['get'](_0x45ef95),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x21e471=this['editor']['plugins']['get'](j);_0x21e471['context']===this['editor']&&(_0x21e471['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x299038,_0x27ac93)=>{const _0x44cd5f=this['_balloon'];if(this['isAttached']&&_0x44cd5f['visibleView']){const _0x5a0b53=this['annotations']['getByView'](_0x44cd5f['visibleView']);_0x5a0b53&&this['_closeAnnotation'](_0x5a0b53),_0x27ac93();}}));}['afterInit'](){const _0x45ccf2=this['editor']['plugins']['get'](j);_0x45ccf2['context']===this['editor']&&(_0x45ccf2['hasActive']()||_0x45ccf2['switchTo']('inline'));}['setActiveAnnotation'](_0x74fdbe){_0x74fdbe!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x74fdbe&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x74fdbe)&&this['_addAnnotationToBalloon'](_0x74fdbe,!0x0),_0x74fdbe['isActive']=!0x0),_0x74fdbe||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x74fdbe);}['attach'](_0xe35a2a){this['annotations']=_0xe35a2a;const _0x4cd00e=this['editor']['plugins']['get'](j),_0x144783=this['_balloon'];if(this['isAttached'])throw new _0x441c59('inlineannotations-attach-already-attached',this);if(_0x4cd00e['context']!==this['editor'])throw new _0x441c59('inlineannotations-not-allowed-with-context',this);const _0x4c41fa=this['editor']['plugins']['get'](b);this['listenTo'](_0x4c41fa,'refresh',()=>{const _0x293a2b=_0x4c41fa['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x24c3d0,_0x50ebe6;!this['_forceRefresh']&&(_0x24c3d0=_0x293a2b,_0x50ebe6=this['_selectedAnnotations'],_0x24c3d0['length']===_0x50ebe6['length']&&_0x24c3d0['every'](_0x4fe6c8=>_0x50ebe6['includes'](_0x4fe6c8)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x293a2b),this['setActiveAnnotation'](_0x293a2b[0x0]||null));}),this['listenTo'](_0x4c41fa,'blur',(_0x1a904e,{isAnnotationTracked:_0x4f398e})=>{this['activeAnnotation']&&_0x4f398e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x4027f1,_0x17f31d,_0x260665)=>{_0x260665||this['setActiveAnnotation'](null);}),this['listenTo'](_0xe35a2a,'remove',(_0x48dbb6,_0x13e414)=>{this['_removeAnnotationFromBalloon'](_0x13e414),_0x13e414===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x144783,'change:visibleView',(_0x14203c,_0x5a1eac,_0x17905a,_0x538a10)=>{_0x538a10&&this['stopListening'](_0x538a10);const _0xc64582=_0xe35a2a['getByView'](_0x17905a);_0x17905a&&_0xc64582&&(this['listenTo'](_0x17905a,'change:height',()=>{_0x144783['updatePosition']();}),this['listenTo'](_0x17905a,'Esc',()=>{this['_closeAnnotation'](_0xc64582),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xc64582&&this['setActiveAnnotation'](_0xc64582));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x144783['visibleView']&&(_0xe35a2a['getByView'](_0x144783['visibleView'])&&_0x144783['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 _0x441c59('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x28c488 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x28c488);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x3340c3){for(const _0x15a374 of this['_selectedAnnotations'])_0x3340c3['includes'](_0x15a374)||this['_manuallyClosed']['delete'](_0x15a374);for(const _0x3da51e of this['annotations'])_0x3340c3['includes'](_0x3da51e)||this['_removeAnnotationFromBalloon'](_0x3da51e);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x461173 of _0x3340c3)this['_addAnnotationToBalloon'](_0x461173);}this['_selectedAnnotations']=_0x3340c3;}['_addAnnotationToBalloon'](_0x1f7490,_0x3c82ee=!0x1){this['_manuallyClosed']['has'](_0x1f7490)||(this['_addedAnnotations']['has'](_0x1f7490)||this['_balloon']['hasView'](_0x1f7490['view'])||(this['_addedAnnotations']['add'](_0x1f7490),this['_balloon']['add']({'stackId':_0x1f7490['view']['id'],'view':_0x1f7490['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x1f7490)}})),_0x3c82ee&&this['_balloon']['showStack'](_0x1f7490['view']['id']));}['_getBalloonTargetForAnnotation'](_0xfa9f41){const _0x474fa3=_0xfa9f41['target'],_0x2a8ac2=this['editor']['editing']['view'],_0x2ebb18=_0x2a8ac2['document']['selection']['getFirstRange'](),_0x5a53cd=_0x2a8ac2['domConverter']['viewRangeToDom'](_0x2ebb18);if(_0x5a53cd['collapse'](!0x0),_0x474fa3){if(_0x474fa3 instanceof _0x56aaf6)return _0x474fa3;let _0x3a0a46=[];for(const _0x4ec7ad of _0x474fa3)_0x3a0a46['push'](...F(_0x4ec7ad['getClientRects']()));_0x3a0a46=function(_0xf070f2){const _0x1f863f=[];let _0x568f7a=_0xf070f2[0x0];for(let _0x4b3987=0x1;_0x4b3987<_0xf070f2['length'];_0x4b3987++)P(_0x568f7a,_0xf070f2[_0x4b3987])?_0x568f7a['width']+=_0xf070f2[_0x4b3987]['width']:(_0x1f863f['push'](_0x568f7a),_0x568f7a=_0xf070f2[_0x4b3987]);return _0x1f863f['push'](_0x568f7a),_0x1f863f;}(_0x3a0a46);const _0x7dfcb6=_0x5a53cd['getBoundingClientRect']();return _0x3a0a46['find'](_0x385588=>_0x385588['top']<=_0x7dfcb6['top']&&_0x385588['bottom']>=_0x7dfcb6['bottom']&&_0x385588['left']<=_0x7dfcb6['left']&&_0x385588['right']>=_0x7dfcb6['right'])||_0x3a0a46[0x0];}return _0xfa9f41['targetRect']||_0x5a53cd;}['_removeAnnotationFromBalloon'](_0x310cbb){this['_addedAnnotations']['has'](_0x310cbb)&&this['_balloon']['hasView'](_0x310cbb['view'])&&(this['_addedAnnotations']['delete'](_0x310cbb),this['_balloon']['remove'](_0x310cbb['view']));}['_closeAnnotation'](_0x441422){this['_manuallyClosed']['add'](_0x441422),this['_removeAnnotationFromBalloon'](_0x441422);}}function F(_0xc2b08e){return Array['from'](_0xc2b08e)['map'](DOMRect['fromRect']);}function P(_0x27f7a2,_0x5a9839){return _0x27f7a2['top']===_0x5a9839['top']&&_0x27f7a2['bottom']===_0x5a9839['bottom']&&_0x27f7a2['right']===_0x5a9839['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x461f32,_0x369c23){super(_0x461f32),this['set']('isEmpty',!_0x369c23['length']),this['focusTracker']=new _0x4cfdf8(),this['_annotationViews']=_0x369c23,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x59c832({'focusables':_0x369c23,'focusTracker':this['focusTracker']}),this['listenTo'](_0x369c23,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x369c23,'remove',(_0x115198,_0x16e8b8)=>{_0x16e8b8['isActive']&&this['focus'](),_0x369c23['length']||(this['isEmpty']=!0x0);});const _0x50a333=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x461f32,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x369c23},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x50a333['if']('isEmpty','ck-hidden',_0x286753=>!_0x286753)]},'children':[{'text':N(_0x461f32,'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 _0x408a4d of this['_annotationViews'])this['focusTracker']['add'](_0x408a4d['element']);this['_annotationViews']['on']('change',(_0x46c07a,{added:_0x3be8d4,removed:_0x49f9c5})=>{for(const _0x85c89a of _0x3be8d4)this['focusTracker']['add'](_0x85c89a['element']);for(const _0x57b758 of _0x49f9c5)this['focusTracker']['remove'](_0x57b758['element']);});}}class p extends _0x42791b{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5cc76e){super(_0x5cc76e),this['archivedThreads']=new _0x364175();}['init'](){const _0x2f6a65=this['context'],_0x4f36c7=_0x2f6a65['plugins']['get'](o),_0xe5d142=_0x2f6a65['plugins']['get'](y);this['listenTo'](_0x4f36c7,'addCommentThread',(_0x43471e,{threadId:_0x586d5d})=>{const _0x581208=_0x4f36c7['getCommentThread'](_0x586d5d);_0x581208['archivedAt']&&this['archivedThreads']['add'](_0x581208,this['_calculatePosition'](_0x581208['archivedAt'])),this['listenTo'](_0x581208,'change:archivedAt',(_0x33e493,_0x452df7,_0x2bcd18)=>{_0x2bcd18?this['archivedThreads']['has'](_0x581208)||this['archivedThreads']['add'](_0x581208,this['_calculatePosition'](_0x581208['archivedAt'])):this['archivedThreads']['has'](_0x581208)&&this['archivedThreads']['remove'](_0x581208);});}),this['listenTo'](_0x4f36c7,'removeCommentThread',(_0x45bc33,{threadId:_0x19c1db})=>{const _0x48b87e=_0x4f36c7['getCommentThread'](_0x19c1db);this['stopListening'](_0x48b87e),this['archivedThreads']['has'](_0x48b87e)&&this['archivedThreads']['remove'](_0x48b87e);},{'priority':'highest'}),this['listenTo'](_0xe5d142['collection'],'focus',(_0x430ec3,_0xabed21)=>{_0xabed21['isVisible']||(_0xabed21['isActive']=!0x0,_0xe5d142['activate'](_0xabed21));});}['_calculatePosition'](_0xf41ab6){const _0xdcfc85=[...this['archivedThreads']]['findIndex'](_0x3a6946=>_0x3a6946['archivedAt']<_0xf41ab6);return _0xdcfc85>-0x1?_0xdcfc85:this['archivedThreads']['length'];}}class a extends _0x3a30de{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x5adb31];}constructor(_0x46bd84){super(_0x46bd84),this['annotationViews']=new _0x33ceff(),this['_pendingThreads']=[];}['init'](){const _0x459f6c=this['editor'],_0x3921d8=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x459f6c['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x50efaa,!0x0)),_0x459f6c['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5d69de=this['_createCommentsArchiveButton'](_0x17389d);return _0x5d69de['set']({'role':'menuitemcheckbox'}),_0x5d69de;});const _0x32fd71=_0x459f6c['plugins']['get'](p),_0x4a34d8=_0x459f6c['plugins']['get']('Annotations'),_0x4f5c53=_0x459f6c['plugins']['get']('CommentsRepository');_0x32fd71['archivedThreads']['forEach'](_0x3739c2=>{this['_handleNewThread'](_0x3739c2);}),this['listenTo'](_0x32fd71['archivedThreads'],'add',(_0x44382f,_0x403909)=>{this['_handleNewThread'](_0x403909);}),this['listenTo'](_0x4a34d8['collection'],'add',(_0x2674a7,_0x4a0009)=>{const _0x593560=this['_pendingThreads']['find'](_0x29706d=>{const _0x5ca2e2=_0x4f5c53['_threadToController']['get'](_0x29706d);return _0x5ca2e2&&_0x4a0009['innerView']===_0x5ca2e2['view'];});if(_0x593560){const _0x5f1ebd=this['_calculatePosition'](_0x593560['archivedAt']);this['annotationViews']['add'](_0x4a0009['view'],_0x5f1ebd),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x593560),0x1);}}),this['listenTo'](_0x32fd71['archivedThreads'],'remove',(_0x15eed5,_0x4c4f71)=>{const _0x2c3b9b=_0x459f6c['config']['get']('collaboration.channelId');if(!_0x2c3b9b||_0x4c4f71['channelId']===_0x2c3b9b){if(this['_pendingThreads']['includes'](_0x4c4f71))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4c4f71),0x1);else{const _0x5a3cca=_0x4f5c53['_threadToController']['get'](_0x4c4f71),_0x35a737=_0x4a34d8['getByInnerView'](_0x5a3cca['view']);this['annotationViews']['remove'](_0x35a737['view']),this['stopListening'](_0x35a737['focusableElements']);}}}),this['listenTo'](_0x4a34d8['collection'],'add',(_0x2f62a1,_0x59f216)=>{this['listenTo'](_0x59f216,'escape',_0x3921d8);}),this['listenTo'](_0x4a34d8['collection'],'remove',(_0x4e9f4c,_0x50a1d2)=>{this['stopListening'](_0x50a1d2,'escape',_0x3921d8);});}['_handleNewThread'](_0x315d69){const _0x4aea47=this['editor']['plugins']['get']('CommentsRepository'),_0x130954=this['editor']['plugins']['get']('Annotations'),_0x282270=this['editor']['config']['get']('collaboration.channelId');if(!_0x282270||_0x315d69['channelId']===_0x282270){const _0x457303=_0x4aea47['_threadToController']['get'](_0x315d69);if(!_0x457303)return void this['_pendingThreads']['push'](_0x315d69);const _0x29b631=this['_calculatePosition'](_0x315d69['archivedAt']),_0x3f8ab7=_0x130954['getByInnerView'](_0x457303['view']);_0x3f8ab7['isVisible']&&_0x130954['_visibleAnnotations']['remove'](_0x3f8ab7),this['annotationViews']['add'](_0x3f8ab7['view'],_0x29b631);}}['_calculatePosition'](_0x101a93){const _0x497635=this['editor']['config']['get']('collaboration.channelId'),_0x5c186d=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4a1cb4=>_0x4a1cb4['channelId']===_0x497635)['findIndex'](_0x1eae3c=>_0x1eae3c['archivedAt']<_0x101a93);return _0x5c186d<0x0||_0x5c186d>this['annotationViews']['length']?this['annotationViews']['length']:_0x5c186d-0x1;}['_toggleDialog'](){const _0x26ccdc=this['editor'],_0x59e3ef=_0x26ccdc['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x26ccdc['locale'],this['annotationViews'])),'commentsArchive'===_0x59e3ef['id']?_0x59e3ef['hide']():_0x59e3ef['show']({'id':'commentsArchive','title':N(_0x26ccdc['locale'],'COMMENTS_ARCHIVE'),'icon':_0x234f73,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x152236['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0xd0948,_0x53b975=!0x1){const _0x4ac2ca=this['editor']['locale'],_0x742c78=this['editor']['plugins']['get']('Dialog'),_0xede50a=new _0xd0948(_0x4ac2ca);return _0xede50a['bind']('isEnabled')['to'](this,'isEnabled'),_0xede50a['bind']('isOn')['to'](_0x742c78,'id',_0xd3ad30=>'commentsArchive'===_0xd3ad30),_0xede50a['set']({'label':N(_0x4ac2ca,'COMMENTS_ARCHIVE'),'icon':_0x234f73,'isToggleable':!0x0}),_0x53b975&&(_0xede50a['tooltip']=!0x0),this['listenTo'](_0xede50a,'execute',()=>this['_toggleDialog']()),_0xede50a;}['_hideDialogOnAnnotationEscape']=_0xa056f1=>{const _0x69216e=_0xa056f1['source'];if(!this['annotationViews']['has'](_0x69216e['view']))return;const _0x1a7d88=this['editor']['plugins']['get']('Dialog');_0x1a7d88['isOpen']&&'commentsArchive'===_0x1a7d88['id']&&(_0x1a7d88['hide'](),_0xa056f1['stop']());};}class gi extends _0x3a30de{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{rt 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,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,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 _0x131402,ContextPlugin as _0x3e7d33,PendingActions as lt,Command as _0x127f8e,Plugin as _0x12c5b0,Context as _0x35cd01}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x4dfcbe,uid as _0x59c6e8,KeystrokeHandler as jt,FocusTracker as _0x2908b5,diff as _0x36720d,Collection as _0x5f19bf,Rect as _0x8a9a03,CKEditorError as _0x1a89d7,first as _0x19993d,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as Dt,DomEmitterMixin as _0x56375c,keyCodes as _0x2c9b65}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x2962cb,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x1b51f6,trimHtml as ts,LateFocusDropdownButtonView as _0x137105,Users as st,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as it,surroundingMarkersDetector as et,FOCUS_ANNOTATION_KEYSTROKE as _0x499ba6}from'ckeditor5-collaboration/dist/index.js';import{throttle as _0x56310f,isEqual as At,cloneDeep as wt,set as Ct,unset as yt,debounce as _0x533f2f}from'es-toolkit/compat';import{IconUndo as _0x19a488,IconCheck as _0x15387a,IconPencil as _0x210a7b,IconRemoveComment as _0x28c67e,IconThreeVerticalDots as _0x2d73fa,IconAddComment as _0x3d9dd9,IconCommentsArchive as _0x3268de}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x65e88,ButtonView as _0x256289,ViewCollection as _0x354fab,createDropdown as _0x152f64,ListView as _0x59d53d,focusChildOnDropdownOpen as _0x35a72e,ListItemView as _0x152a29,MenuBarMenuListItemButtonView as _0x5439bf,BodyCollection as _0x3f9d39,BalloonPanelView as _0x2d9178,ContextualBalloon as _0x1d966f,Dialog as _0x3296c1,DialogViewPosition as _0x5291d3}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x40b919}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Et}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Gt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Jt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Kt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x5959b2}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x3da143}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x4dfcbe(){['model'];['view'];constructor(_0x4f292f,_0x1f170d){super(),this['model']=_0x4f292f,this['model']['_isAttached']=!0x0,this['view']=_0x1f170d,this['listenTo'](_0x1f170d,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1f170d,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1f170d,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1f170d,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1f170d,'addComment',(_0x2daa80,_0xd788f2)=>this['addComment'](_0xd788f2)),this['listenTo'](_0x1f170d,'updateComment',(_0x2e82a4,_0x398616,_0x1156d4)=>this['updateComment'](_0x398616,_0x1156d4)),this['listenTo'](_0x1f170d,'removeComment',(_0x3db95b,_0x3700da)=>this['removeComment'](_0x3700da));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0xeb29bb){this['model']['addComment']({'content':_0xeb29bb,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x35880e,_0x26ea26){this['model']['getComment'](_0x35880e)['update']({'content':_0x26ea26});}['removeComment'](_0x2412cc){this['model']['getComment'](_0x2412cc)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x2fad6f,_0x3634d0,_0x24a4d1){const t=_0x2fad6f['t'];switch(_0x3634d0){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'},_0x24a4d1);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'},_0x24a4d1);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'},_0x24a4d1);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'},_0x24a4d1);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x24a4d1);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'},_0x24a4d1);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'},_0x24a4d1);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'},_0x24a4d1);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(_0x36ae2f,_0x235bbc){super(_0x36ae2f);const _0x319396=_0x59c6e8();this['main']=this['createCollection'](),this['editable']=new Vt(_0x36ae2f,_0x235bbc,void 0x0,{'label':()=>N(_0x36ae2f,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x36ae2f['uiLanguageDirection'],'lang':_0x36ae2f['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x319396},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Ut{['view'];constructor(_0x4b07cf){super(_0x4b07cf),this['view']=new Rt(_0x4b07cf['locale'],_0x4b07cf['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x3b4f21=this['editor']['editing']['view'],_0x132019=this['view']['editable'],_0xba4f34=_0x3b4f21['document']['getRoot']();_0x132019['name']=_0xba4f34['rootName'],this['view']['render']();const _0x1346f8=_0x132019['element'];this['setEditableElement'](_0x132019['name'],_0x1346f8),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x3b4f21['attachDomRoot'](_0x1346f8),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Lt=[qt,zt,Bt,Et,Gt,Jt,Kt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x4dfcbe(_0x131402){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Lt)());constructor(_0x3ce164={}){function _0x4bc69d(_0x5d17b5){return _0x5d17b5['map'](_0x271aa7=>String['fromCharCode'](_0x271aa7))['join']('');}(_0x3ce164=Object['assign']({},_0x3ce164))['plugins']||(_0x3ce164['plugins']=Qt['defaultPlugins']),super(_0x3ce164),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x4bc69d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4bc69d([0x76,0x69,0x65,0x77])][_0x4bc69d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4bc69d([0x61,0x75,0x74,0x6f]),this[_0x4bc69d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x4bc69d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4bc69d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x4bc69d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x4bc69d([0x6f,0x6b])});}['create'](){const _0x1f0364=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x1f0364))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0xaadfe3=>{const _0x7302bb=this['model']['document']['getRoot'](),_0x11cf98=_0x7302bb&&_0x7302bb['getChild'](_0x7302bb['childCount']-0x1);_0xaadfe3['setSelection'](_0x11cf98,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2c618f=this['editing']['view'],_0x355759=_0x2c618f['document']['getRoot'](),_0x5df686=_0x355759['getChild'](0x0);_0x355759['childCount']>0x1||!_0x5df686||'p'!=_0x5df686['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x2c618f,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x5df686['placeholder']=this['placeholder']),Ft({'view':_0x2c618f,'element':_0x5df686,'keepOnFocus':!0x0}),this['placeholderElement']=_0x5df686);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x30d622,_0x1d0e1b={}){super(_0x30d622),this['editor']=null,this['_editorConfig']=_0x1d0e1b,this['set']('value',_0x1d0e1b['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x30d622,'Reply...')),this['set']('submitLabel',N(_0x30d622,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x2908b5(),this['focusCycler']=new _0x65e88({'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',(_0x3f72f9,_0x3e3d26)=>{this['cancelButtonView']['fire']('execute'),_0x3e3d26();}),this['keystrokes']['set']('Ctrl+Enter',(_0x47992f,_0xc0272a)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0xc0272a());}),this['on']('submit',(_0x4f186e,_0x551567)=>{_0x551567['length']>0xfde8?(alert(N(_0x30d622,'TOO_LONG_COMMENT_ALERT',[_0x551567['length'],0xfde8])),_0x4f186e['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x37dcd1=this['editor'];this['element']['insertBefore'](_0x37dcd1['ui']['element'],this['element']['firstChild']),_0x37dcd1['model']['document']['on']('change',()=>this['value']=_0x37dcd1['getData']()),_0x37dcd1['bind']('placeholder')['to'](this),this['focusables']['add'](_0x37dcd1['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x4822cc){-0x1===_0x4822cc?(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:_0x70bbf9}=this,_0x326bb7=new _0x256289(_0x70bbf9);return _0x326bb7['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x326bb7['withText']=!0x0,_0x326bb7['bind']('label')['to'](this,'submitLabel'),_0x326bb7['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x326bb7['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1babc5,_0x3649db)=>!_0x3649db&&!!_0x1babc5['trim']()),_0x326bb7;}['_createCancelButton'](){const {locale:_0x460e38}=this,_0x1d16e9=new _0x256289(_0x460e38);return _0x1d16e9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1d16e9['label']=N(_0x460e38,'Cancel'),_0x1d16e9['withText']=!0x0,_0x1d16e9['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1d16e9;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x5c8b8b=>{this['focusTracker']['add'](_0x5c8b8b['element']);}),this['focusables']['on']('change',(_0x1a0eef,_0x5369bf)=>{for(const _0x28d530 of Array['from'](_0x5369bf['added'])['reverse']())this['focusTracker']['add'](_0x28d530['element']);});}}class ie extends kt{constructor(_0xd7737a,_0x40653b,_0x1b011a){super(_0xd7737a),this['commentInputView']=new es(_0xd7737a,_0x1b011a),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3b9f43,_0x2171d9)=>_0x3b9f43||!!_0x2171d9),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 _0x2962cb(_0xd7737a,_0x40653b),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'](_0x4ea1c0){this['commentInputView']['focus'](_0x4ea1c0);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x171320,_0xcf9690)=>{const {submitButtonView:_0x4a47c3,cancelButtonView:_0x5c28fc,editor:_0x303d70}=this['commentInputView'];[_0x4a47c3['element'],_0x5c28fc['element'],_0x303d70?_0x303d70['editing']['view']['getDomRoot']():null]['filter'](_0x53f3a5=>_0x53f3a5)['some'](_0x1d7fbd=>_0x1d7fbd['contains'](_0xcf9690['target']))||(this['focus'](),_0xcf9690['preventDefault']());});}}class os extends kt{constructor(_0x2adc3b){super(_0x2adc3b);const _0x3a4887=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3a4887['to']('count',_0x5dba6a=>N(_0x2adc3b,'NUMBER_OF_COMMENTS',_0x5dba6a))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3ab40e,_0x1a3b5e,_0x15c130){super(_0x3ab40e);const _0xe6d325=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1a3b5e['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1a3b5e,this['_config']=_0x15c130,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2908b5(),this['keystrokes']=new jt(),this['focusCycler']=new _0x65e88({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x227254=>this['commentViews']['map'](_0x326a62=>_0x326a62['element'])['includes'](_0x227254['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x3ab40e),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x55d5f8=>_0x55d5f8-this['_config']['maxCommentsWhenCollapsed']);for(const _0x2ba6df of _0x1a3b5e['comments'])this['_handleNewCommentModel'](_0x2ba6df);this['_handleInfoComment'](),this['listenTo'](_0x1a3b5e['comments'],'add',(_0x4032a2,_0x4c416c)=>{const _0x3b8cac=this['_calculatePosition'](_0x4c416c);this['length']++,this['_handleNewCommentModel'](_0x4c416c,_0x3b8cac),this['refreshVisibleViews']();}),this['listenTo'](_0x1a3b5e['comments'],'remove',(_0x53fc31,_0x334206)=>{this['length']--,this['_handleRemoveCommentModel'](_0x334206),this['refreshVisibleViews']();}),this['listenTo'](_0x1a3b5e,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1a3b5e,'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',_0xe6d325['if']('length','ck-hidden',_0x33a56e=>!_0x33a56e)],'aria-label':N(_0x3ab40e,'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'](_0x3f58f1){-0x1===_0x3f58f1?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x12b59a of this['commentViews'])_0x12b59a['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1666db,_0x2f4fb1){const _0x2ae786=new this['_config']['CommentView'](this['locale'],_0x1666db,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2ae786['viewUid']=_0x1666db['id'],_0x2ae786['delegate']('removeComment')['to'](this),_0x2ae786['delegate']('updateComment')['to'](this),_0x2ae786['delegate']('resolveCommentThread')['to'](this),_0x2ae786['delegate']('editorReady')['to'](this),_0x2ae786['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2ae786,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2ae786,_0x2f4fb1);}['_calculatePosition'](_0x5ed4a3){const _0x62484c=this['_model']['_findOptimalIndex'](_0x5ed4a3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5ed4a3['authoredAt']?_0x62484c-0x1:_0x62484c:_0x62484c-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1109a0={'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'],_0x1109a0,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1109a0));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x37591a){const _0x557b28=this['commentViews']['remove'](_0x37591a['id']);this['stopListening'](_0x557b28),_0x557b28['isEditMode']&&this['_updateHasDirtyComment'](),_0x557b28['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5f0297=>_0x5f0297['isEditMode']);}['_rearrangeCollapse'](){const _0x573ecd=function(_0x16fcf4){const _0x6873ef=new _0x5f19bf();for(const _0x335477 of _0x16fcf4)_0x6873ef['add'](_0x335477);return _0x6873ef;}(this['commentViews']),_0x26dfe3=this['_collapsedCommentsView']['count'];for(let _0x1a6767=0x1;_0x1a6767<=_0x26dfe3;_0x1a6767++)_0x573ecd['remove'](0x1);for(const _0x3f9928 of _0x573ecd)_0x3f9928['collapse']();_0x26dfe3>0x0&&_0x573ecd['add'](this['_collapsedCommentsView'],0x1),rs(_0x36720d(Array['from'](this['visibleViews']),Array['from'](_0x573ecd)),this['visibleViews'],_0x573ecd);}['_rearrangeExpand'](){rs(_0x36720d(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x59f51d of this['visibleViews'])_0x59f51d['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x3f87a9=>{this['focusTracker']['add'](_0x3f87a9['element']),this['keystrokes']['listenTo'](_0x3f87a9['element']);}),this['commentViews']['on']('change',(_0x12bac1,_0x474873)=>{for(const _0x1364fa of _0x474873['removed'])this['focusTracker']['remove'](_0x1364fa['element']),this['keystrokes']['stopListening'](_0x1364fa['element']);for(const _0x17c259 of Array['from'](_0x474873['added'])['reverse']())this['focusTracker']['add'](_0x17c259['element']),this['keystrokes']['listenTo'](_0x17c259['element']);});}}function rs(_0x28cad5,_0xc4406d,_0x223739){let _0x344736=0x0;for(const _0x230edd of _0x28cad5)switch(_0x230edd){case'insert':_0xc4406d['add'](_0x223739['get'](_0x344736),_0x344736),_0x344736++;break;case'delete':_0xc4406d['remove'](_0x344736);break;case'equal':_0x344736++;}}class oe extends kt{constructor(_0x1de8b2){super(_0x1de8b2);const _0x4ed908=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4ed908['to']('contextValue',_0xe1971b=>N(_0x1de8b2,'THREAD_CONTEXT_LABEL',_0xe1971b)),'tabindex':-0x1},'children':[{'text':_0x4ed908['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3ed9b6,_0x40e799){super(_0x3ed9b6);const _0x546064=this['bindTemplate'];this['_model']=_0x40e799,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2908b5(),this['keystrokes']=new jt(),this['focusCycler']=new _0x65e88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1bb61d=>!!_0x1bb61d),this['bind']('contextValue')['to'](this['_model'],'context',_0x596c75=>_0x596c75&&_0x596c75['value']?this['_trimContextValue'](_0x596c75['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',_0x546064['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 _0x5d220e=new _0x256289(this['locale']);return _0x5d220e['label']=N(this['locale'],'Reopen'),_0x5d220e['tooltip']=N(this['locale'],'Reopen'),_0x5d220e['icon']=_0x19a488,_0x5d220e['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5d212e=>!_0x5d212e),_0x5d220e['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5478bf,_0x311bc7)=>_0x5478bf&&_0x311bc7),_0x5d220e['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5d220e;}['_trimContextValue'](_0x40a868){if(_0x40a868['length']<0x96)return _0x40a868;const _0x49aa13=_0x40a868['lastIndexOf']('\x20',0x93);return _0x40a868['substring'](0x0,_0x49aa13>-0x1?_0x49aa13:0x93)+'...';}['_attachContextActions'](){const _0x82683a=this['element']['querySelector']('.ck-context'),_0x13dad1=_0x82683a['querySelector']('.ck-context__value');this['listenTo'](_0x82683a,'mouseenter',()=>{_0x13dad1['offsetWidth']<_0x13dad1['scrollWidth']&&_0x82683a['classList']['add']('overlay');}),this['listenTo'](_0x82683a,'mouseleave',()=>{_0x82683a['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x6d4442 of this['focusables'])this['focusTracker']['add'](_0x6d4442['element']),this['keystrokes']['listenTo'](_0x6d4442['element']);}['_createContextView'](){const _0x32faee=new oe(this['locale']);return _0x32faee['bind']('contextValue')['to'](this),_0x32faee;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x26a105,_0x4517fb,_0x210223,_0xadfa2d){super(_0x26a105),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x4517fb,this['_localUser']=_0x210223,this['_config']=_0xadfa2d,this['commentThreadHeaderView']=new Xt(_0x26a105,_0x4517fb),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x26a105,N(_0x26a105,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x26a105,_0x4517fb,Object['assign']({'CommentView':this['_config']['CommentView']},_0xadfa2d)),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',(_0x900469,_0x13e898)=>_0x900469||!!_0x13e898),this['bind']('isUnlinked')['to'](_0x4517fb,'unlinkedAt',_0x2533cd=>!!_0x2533cd),this['bind']('ariaLabel')['to'](this,'length',_0x5bbb3f=>{const _0x10facd=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x5bbb3f,_0x10facd]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2908b5(),this['keystrokes']=new jt(),this['focusCycler']=new _0x65e88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x51cd83=>_0x51cd83['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 _0x5cee96=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x235bb6=_0x5cee96['commentInputView'];return _0x5cee96['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x235bb6,'value',(_0x2c1611,_0x3faa90,_0x241dab,_0x5895bc,_0x459586)=>!!_0x459586||!!_0x5895bc&&_0x241dab&&!_0x3faa90||_0x2c1611&&_0x241dab&&!_0x3faa90),_0x235bb6['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5ab755,_0x25a29c,_0x464915)=>{let _0x209a9a;return _0x209a9a=_0x464915&&_0x25a29c?'Reply\x20to\x20reopen\x20discussion...':_0x5ab755?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x209a9a);}),_0x235bb6['bind']('submitLabel')['to'](this,'length',_0x57dbbc=>N(this['locale'],_0x57dbbc?'Reply':'Comment')),_0x235bb6['on']('submit',(_0x30778a,_0x30898c)=>{this['fire']('addComment',_0x30898c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x235bb6['on']('cancel',()=>{this['focus']();}),_0x235bb6['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x235bb6['on']('cancel',_0x35b969=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x35b969['stop']());}),this['on']('change:isActive',(_0x16c1a2,_0x2bf8af,_0x7dafb3)=>{_0x7dafb3||this['length']||_0x235bb6['value']||this['fire']('removeCommentThread');}),_0x5cee96;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x658c0,_0x10f928,_0x3eb533,_0x4ddef8){super(_0x658c0,_0x10f928,_0x3eb533,_0x4ddef8),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x658c0,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x35d3d1,_0x1dc7b9,_0x5ee956)=>{_0x5ee956||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1ffff0,_0x40282b,_0xb8daac)=>{_0xb8daac&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0xd95bf1=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0xd95bf1['if']('isActive','ck-thread--active'),_0xd95bf1['if']('isUnlinked','ck-thread--unlinked'),_0xd95bf1['if']('isConfirm','ck-thread--remove-confirmation'),_0xd95bf1['to']('actionIndicator',_0x3d129c=>_0x3d129c?'ck-thread--'+_0x3d129c:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0xd95bf1['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 _0x2565f0 of this['commentsListView']['commentViews'])_0x2565f0['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x41696b}=this,_0x423e21=this['commentsListView']['commentViews']['get'](0x0);_0x423e21===this['_boundFirstCommentView']||_0x423e21['isSystemComment']||(this['_boundFirstCommentView']=_0x423e21,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x423e21,'actionIndicator',_0x3076fd=>'remove'===_0x3076fd?'remove':null),_0x423e21['placeholder']=N(_0x41696b,'Write\x20a\x20comment...'),_0x423e21['removeButton']['on']('execute',_0x2c2b0a=>{_0x2c2b0a['stop'](),this['showConfirm'](N(_0x41696b,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x423e21['focus']();}),_0x423e21['actionBar']['add'](this['resolveButton'],0x0),_0x423e21['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x443b85=new _0x1b51f6(this['locale']);return _0x443b85['label']=N(this['locale'],'Resolve'),_0x443b85['tooltip']=N(this['locale'],'Resolve'),_0x443b85['icon']=_0x15387a,_0x443b85['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x443b85['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0xa586c2=>!_0xa586c2),_0x443b85['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5bbaf6,_0x3045b1)=>_0x5bbaf6&&!_0x3045b1),_0x443b85['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x443b85;}['_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(_0x23dd7a){super(_0x23dd7a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x23216b,_0x16446e,_0x2fbb60)=>{this['element']['innerHTML']=_0x2fbb60;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x20ab4d,_0x414b8b,_0x57afef){super(_0x20ab4d),this['_model']=_0x414b8b,this['_config']=_0x57afef,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x414b8b,'content',_0x414b8b,'authoredAt',(_0x26be16,_0x30636d)=>N(_0x20ab4d,'COMMENT_ARIA_LABEL',[_0x414b8b['author']['name'],_0x57afef['formatDateTime'](_0x30636d),new DOMParser()['parseFromString'](_0x26be16,'text/html')['body']['textContent'],_0x414b8b['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x20ab4d,N(_0x20ab4d,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x354fab(),this['focusTracker']=new _0x2908b5(),this['keystrokes']=new jt(),this['focusCycler']=new _0x65e88({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x500a83=>_0x500a83['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 _0x14b1fd=new is(this['locale']);return _0x14b1fd['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x156ba8,_0x514fd2)=>_0x514fd2?ts(_0x156ba8,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x156ba8),_0x14b1fd;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x570c55=new es(this['locale'],this['_config']['editorConfig']);return _0x570c55['value']=this['_model']['content'],_0x570c55['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x570c55['submitLabel']=N(this['locale'],'Save'),_0x570c55['on']('submit',(_0x299831,_0x184a80)=>{this['fire']('updateComment',this['_model']['id'],_0x184a80),this['switchToDisplayMode'](),this['focus']();}),_0x570c55['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x570c55['once']('editorReady',()=>{_0x570c55['focus']();}),_0x570c55['createEditor'](),_0x570c55['delegate']('editorReady')['to'](this),_0x570c55['delegate']('editorDestroyed')['to'](this),_0x570c55;}['_setupKeyboardNavigation'](){const _0x44bf05=this['element'];this['keystrokes']['listenTo'](_0x44bf05);for(const _0x41a6cd of this['focusables'])this['focusTracker']['add'](_0x41a6cd['element']),this['keystrokes']['listenTo'](_0x41a6cd['element']);this['focusables']['on']('change',(_0x219892,_0x246bfc)=>{for(const _0x48925b of _0x246bfc['removed'])this['focusTracker']['remove'](_0x48925b['element']),this['keystrokes']['stopListening'](_0x48925b['element']);for(const _0x5733b9 of _0x246bfc['added'])this['focusTracker']['add'](_0x5733b9['element']),this['keystrokes']['listenTo'](_0x5733b9['element']);}),this['keystrokes']['set']('enter',(_0x34f924,_0x4c17f3)=>{_0x44bf05===_0x34f924['target']&&(this['focusCycler']['focusFirst'](),_0x4c17f3());}),this['keystrokes']['set']('esc',(_0x544aac,_0x546f22)=>{_0x44bf05!==_0x544aac['target']&&(this['focus'](),_0x546f22());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x183c61,_0x58d377,_0x3afbcc){super(_0x183c61,_0x58d377,_0x3afbcc),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x183c61,'Reply...')),this['bind']('authoredAt')['to'](_0x58d377),this['bind']('resolvedAt')['to'](_0x58d377),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 _0x2962cb(_0x183c61,_0x58d377['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x58d377,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x2c700e=this['bindTemplate'],_0x2ceeff=[{'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':_0x2c700e['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x2c700e['to']('authoredAt',_0x44d1c3=>this['_config']['formatDateTime'](_0x44d1c3))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x2c700e['if']('isEditMode','ck-comment__actions--hidden'),_0x2c700e['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']&&_0x2ceeff['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x2c700e['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x2c700e['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x2c700e['if']('isEditMode','ck-comment--edit'),_0x2c700e['if']('isSystemComment','ck-comment--info'),_0x2c700e['to']('actionIndicator',_0x441004=>_0x441004?'ck-comment--'+_0x441004:'')],'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':_0x2ceeff}]}]};}['_createEditButton'](){const _0x1465f4=new _0x256289(this['locale']);return _0x1465f4['label']=N(this['locale'],'Edit'),_0x1465f4['icon']=_0x210a7b,_0x1465f4['withText']=!0x0,_0x1465f4['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x1465f4['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3e04be=>!_0x3e04be),_0x1465f4['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x1465f4['on']('execute',()=>this['switchToEditMode']()),_0x1465f4;}['_createRemoveButton'](){const _0x5014f1=new _0x256289(this['locale']);return _0x5014f1['label']=N(this['locale'],'Remove'),_0x5014f1['icon']=_0x28c67e,_0x5014f1['withText']=!0x0,_0x5014f1['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x5014f1['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x478812=>!_0x478812),_0x5014f1['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x5014f1['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x5014f1;}['_createDropdown'](){const _0x425685=_0x152f64(this['locale'],_0x137105),_0x24eb23=_0x425685['panelView']['children'],_0x29aeb1=new _0x59d53d(this['locale']),_0xf3c1e0=_0x425685['bindTemplate'];_0x35a72e(_0x425685,()=>this['items']['find'](_0x430148=>_0x430148['isVisible'])),_0x425685['extendTemplate']({'attributes':{'class':[_0xf3c1e0['if']('isVisible','ck-hidden',_0x5cd1ad=>!_0x5cd1ad)]}});const _0xcc449f=(_0x4ceae3,_0x3ba054=-0x1)=>{const _0x20014a=new _0x152a29(this['locale']);_0x20014a['children']['add'](_0x4ceae3);const _0x21968f=_0x3ba054>-0x1?_0x3ba054:_0x29aeb1['items']['length'];_0x29aeb1['items']['add'](_0x20014a,_0x21968f);const _0x14f205=Array['from'](this['items']);_0x425685['unbind']('isEnabled','isVisible'),_0x425685['bind']('isEnabled')['toMany'](_0x14f205,'isEnabled',(..._0x57890d)=>_0x57890d['some'](_0x585f3c=>_0x585f3c)),_0x425685['bind']('isVisible')['toMany'](_0x14f205,'isVisible',(..._0x17447d)=>_0x17447d['some'](_0x5bbd0e=>_0x5bbd0e));};_0x425685['panelPosition']='sw',_0x425685['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x2d73fa});for(const _0x5dd7c8 of this['items'])_0xcc449f(_0x5dd7c8);return _0x24eb23['add'](_0x29aeb1),_0x425685['listenTo'](this['items'],'add',(_0x5add11,_0x4771ce,_0x3b12bc)=>{_0xcc449f(_0x4771ce,_0x3b12bc);}),_0x425685['listenTo'](this['items'],'remove',(_0x3fa27c,_0x14a62a,_0x59cc5f)=>{_0x29aeb1['items']['remove'](_0x59cc5f);}),_0x425685;}['_attachActions'](_0x4eada9,_0x2dc0a0){const _0x226f6d=_0x4eada9&&_0x4eada9['element'];_0x226f6d&&(this['listenTo'](_0x226f6d,'mouseenter',()=>this['actionIndicator']=_0x2dc0a0),this['listenTo'](_0x226f6d,'focus',()=>this['actionIndicator']=_0x2dc0a0),this['listenTo'](_0x226f6d,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x226f6d,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x15120f=super['_createCommentInputView']();return _0x15120f['bind']('placeholder')['to'](this),_0x15120f;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0xe7f70a){const _0x4ae9e2=_0x56310f(_0xe7f70a,0x1e),_0x205703=new MutationObserver(_0x3da79f=>{for(const _0x172400 of _0x3da79f)('attributes'==_0x172400['type']&&'class'==_0x172400['attributeName']||'childList'==_0x172400['type']||'characterData'==_0x172400['type'])&&_0x4ae9e2();});return{'attach'(_0x3f664f){_0x205703['observe'](_0x3f664f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x205703['disconnect'](),_0x4ae9e2['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x32d85b,_0x1f1f93){super(_0x32d85b),this['id']=_0x59c6e8(),this['focusTracker']=new _0x2908b5(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x274690,_0x8763cb)=>this['fire']('Esc',_0x8763cb)),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'](_0x1f1f93),this['mainView']=_0x1f1f93;const _0x40ac2f=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x40ac2f['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 _0xceb65c=this['element']['clientHeight'];_0xceb65c&&(this['height']=_0xceb65c);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x4dfcbe(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1e0600,target:_0x1859f4,type:_0x3a43e4,isVisible:_0x54ea0c=!0x0}){super(),this['view']=_0x1e0600,this['view']['element']||this['view']['render'](),this['_type']=_0x3a43e4,this['_target']=_0x1859f4,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5f19bf([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x2a16ee,_0x20a4b2)=>{this['view']['focusTracker']['add'](_0x20a4b2);}),this['focusableElements']['on']('remove',(_0x40732e,_0x5bbab2)=>{this['view']['focusTracker']['remove'](_0x5bbab2);}),this['set']('isVisible',_0x54ea0c);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x8ceee0=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x8ceee0),_0x8ceee0;}get['targetRect'](){const _0x13989e=this['target'];if(null===_0x13989e)return null;if(_0x13989e instanceof _0x8a9a03)return _0x13989e;const _0x3d387f=_0x13989e['filter'](_0x46d473=>function(_0x3df4d9){const _0x1f4d8f=_0x3df4d9['offsetParent'];if(_0x1f4d8f)return!0x0;const _0x10f615=_0x3df4d9['getClientRects']()['item'](0x0);return!!_0x10f615;}(_0x46d473));return 0x0===_0x3d387f['length']?null:new _0x8a9a03(_0x3d387f[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x350900){this['view']['isActive']=_0x350900,this['view']['mainView']['isActive']=_0x350900;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x1af0e3){if(!(null===_0x1af0e3||_0x1af0e3 instanceof _0x8a9a03||Array['isArray'](_0x1af0e3)&&_0x1af0e3['every'](_0x16efd6=>fi(_0x16efd6))))throw new _0x1a89d7('annotation-invalid-target',null,{'target':_0x1af0e3});}['_getNormalizedTarget'](){const _0x2b1ef1='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x2b1ef1)?[_0x2b1ef1]:_0x2b1ef1;}}function fi(_0x15fd8c){return null!==_0x15fd8c&&'object'==typeof _0x15fd8c&&'nodeType'in _0x15fd8c&&0x1===_0x15fd8c['nodeType'];}class S extends _0x5f19bf{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0xe2a294=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2908b5(),this['_focusTracker']['on']('change:isFocused',(_0x4838ea,_0x57e160,_0x2c6085)=>{_0x2c6085||this['fire']('blur');});for(const _0x10bc9e of _0xe2a294)this['add'](_0x10bc9e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2d9914){if(this['has'](_0x2d9914))throw new _0x1a89d7('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2d9914['innerView'],_0x2d9914),this['_viewToAnnotation']['set'](_0x2d9914['view'],_0x2d9914);for(const _0x3fa429 of _0x2d9914['focusableElements'])this['_focusTracker']['add'](_0x3fa429);this['listenTo'](_0x2d9914['focusableElements'],'add',(_0x486638,_0x1736ed)=>{this['_focusTracker']['add'](_0x1736ed);}),this['listenTo'](_0x2d9914['focusableElements'],'remove',(_0x2745d4,_0x2924af)=>{this['_focusTracker']['remove'](_0x2924af);}),this['listenTo'](_0x2d9914['view']['focusTracker'],'change:isFocused',(_0x5274a2,_0x4088ff,_0x286e41)=>{_0x286e41&&this['fire']('focus',_0x2d9914);}),_0x2d9914['updateTargetRect']();const _0x1afd92=this['_getOrderInContent'](_0x2d9914['view']['targetRect']);return super['add'](_0x2d9914,_0x1afd92);}['remove'](_0x5b6757){if(!this['has'](_0x5b6757))throw new _0x1a89d7('annotationcollection-not-existing-item',null);this['stopListening'](_0x5b6757['view']['focusTracker']),this['stopListening'](_0x5b6757['focusableElements']);for(const _0x4e9dfa of _0x5b6757['focusableElements'])this['_focusTracker']['remove'](_0x4e9dfa);return this['_viewToAnnotation']['delete'](_0x5b6757['view']),this['_innerViewToAnnotation']['delete'](_0x5b6757['innerView']),super['remove'](_0x5b6757);}['getByInnerView'](_0x4028eb){return this['_innerViewToAnnotation']['get'](_0x4028eb);}['getByView'](_0x48552a){return this['_viewToAnnotation']['get'](_0x48552a);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3f913d of this)_0x3f913d['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4f32cd=Array['from'](this)['sort']((_0x571adb,_0x14f8f5)=>w(_0x571adb['view']['targetRect'],_0x14f8f5['view']['targetRect']));for(let _0x36a676=_0x4f32cd['length']-0x1;_0x36a676>0x0;_0x36a676--){const _0x35a88e=_0x4f32cd[_0x36a676];_0x36a676!==this['getIndex'](_0x35a88e)&&(this['remove'](_0x35a88e),this['add'](_0x35a88e));}}['_getOrderInContent'](_0x400657){let _0x484bb0=0x0;if(!_0x400657)return this['length'];for(const _0x174a54 of this){const _0x62599f=_0x174a54['view']['targetRect'];if(_0x62599f){if(w(_0x400657,_0x62599f)<0x0)return _0x484bb0;_0x484bb0++;}}return _0x484bb0;}}function v({source:_0x1bf2ee,target:_0x586f2e,filter:_0x45df1f}){for(const _0x5fe44a of _0x1bf2ee)_0x45df1f(_0x5fe44a)&&_0x586f2e['add'](_0x5fe44a);_0x586f2e['listenTo'](_0x1bf2ee,'add',(_0x327845,_0x28e98f)=>{_0x45df1f(_0x28e98f)&&_0x586f2e['add'](_0x28e98f);}),_0x586f2e['listenTo'](_0x1bf2ee,'remove',(_0x20652f,_0x1e4c4c)=>{_0x586f2e['has'](_0x1e4c4c)&&_0x586f2e['remove'](_0x1e4c4c);});}function w(_0x5368a4,_0x448376){if(null===_0x5368a4&&null===_0x448376)return 0x0;if(null===_0x5368a4)return-0x1;if(null===_0x448376)return 0x1;const _0x5c0457=_0x5368a4['top']-_0x448376['top'];return 0x0==_0x5c0457?_0x5368a4['left']-_0x448376['left']:_0x5c0457;}class y extends _0x3e7d33{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x34186e){if(super(_0x34186e),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x34186e instanceof _0x131402){const _0x1879a5=_0x34186e['locale'];_0x34186e['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x1879a5,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x1879a5,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x1879a5,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x1879a5,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x1879a5,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x1879a5,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x1879a5,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x639cbb){this['collection']['add'](_0x639cbb);}['remove'](_0x236ee0){this['collection']['remove'](_0x236ee0),_0x236ee0['destroy']();}['refreshVisibility'](){for(const _0x233021 of this['collection'])_0x233021['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x31c282){return this['collection']['getByInnerView'](_0x31c282);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x21a518 of this['collection'])_0x21a518['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x44e65b){this['fire']('_activateAnnotation',_0x44e65b);}['createAnnotation'](_0x141a1b){return new T(_0x141a1b);}['createAnnotationView'](_0x42f7cf,_0x35548d){return new E(_0x42f7cf,_0x35548d);}['_addActiveAnnotation'](_0x324d7f){const _0x1f1c6b=new Set(this['activeAnnotations']);_0x1f1c6b['add'](_0x324d7f),this['activeAnnotations']=_0x1f1c6b;}['_removeActiveAnnotation'](_0x37af22){const _0x1cb6ac=new Set(this['activeAnnotations']);_0x1cb6ac['delete'](_0x37af22),this['activeAnnotations']=_0x1cb6ac;}['_bindAnnotationsToVisibleAnnotations'](){const _0x329bc2=this['collection'],_0x12cc80=this['_visibleAnnotations'];function _0x5a26db(_0x3626cd){const _0xda8d61=_0x3626cd['source'];_0xda8d61['isVisible']&&!_0x12cc80['has'](_0xda8d61)?_0x12cc80['add'](_0xda8d61):!_0xda8d61['isVisible']&&_0x12cc80['has'](_0xda8d61)&&_0x12cc80['remove'](_0xda8d61),_0xda8d61['view']['focusTracker']['remove'](_0xda8d61['view']['element']),_0xda8d61['view']['focusTracker']['add'](_0xda8d61['view']['element']);}this['listenTo'](_0x329bc2,'add',(_0x3a4515,_0x5c64e6)=>{_0x5c64e6['isVisible']&&_0x12cc80['add'](_0x5c64e6),this['listenTo'](_0x5c64e6,'change:isVisible',_0x5a26db);}),this['listenTo'](_0x329bc2,'remove',(_0x4f6933,_0x19b536)=>{_0x12cc80['has'](_0x19b536)&&_0x12cc80['remove'](_0x19b536),this['stopListening'](_0x19b536,'change:isVisible',_0x5a26db);});}['_setupEnterAnnotationKeystroke'](){const _0x473a33=_0x66214f=>{_0x66214f['on']('ready',()=>{_0x66214f['keystrokes']['set'](_0x5959b2,(_0x22f411,_0x1c87e8)=>{const _0x1b4303=_0x19993d(this['activeAnnotations']['values']());_0x1b4303&&(_0x1b4303['view']['focus'](),_0x1c87e8());});});};this['context']instanceof _0x131402?_0x473a33(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0xb6d683,_0x5b6e79)=>{_0x473a33(_0x5b6e79);});}['_setupEscapeAnnotationHandling'](){const _0x2ebf65=_0x2741e6=>{const _0x2b3910=_0x2741e6['source'],_0xb41b84=[];let _0x2f3b8f;if(Array['isArray'](_0x2b3910['target'])){_0x2f3b8f=_0x2b3910['target'][0x0],this['context']instanceof _0x131402?_0xb41b84['push'](this['context']):this['context']['editors']&&_0xb41b84['push'](...this['context']['editors']);for(const _0x3014eb of _0xb41b84)for(const _0x522a45 of _0x3014eb['editing']['view']['domRoots']['values']())if(_0x522a45['contains'](_0x2f3b8f))return void _0x3014eb['editing']['view']['focus']();_0x2f3b8f['focus']();}};this['listenTo'](this['collection'],'add',(_0x55b411,_0x50c629)=>{this['listenTo'](_0x50c629,'escape',_0x2ebf65,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x487753,_0x1ee0fb)=>{this['stopListening'](_0x1ee0fb,'escape',_0x2ebf65);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3e7d33{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,st];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2eecad){super(_0x2eecad),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x343176=this['context']['config'];_0x343176['define']('comments.maxCommentsWhenCollapsed',0x2),_0x343176['define']('comments.maxThreadTotalWeight',0x1f4),_0x343176['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x343176['define']('comments.CommentThreadView',gt),_0x343176['define']('comments.CommentView',Tt),_0x343176['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x30cf8a=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x4253a6,_0x77fd58)=>this['_addCommentThread'](_0x77fd58)),this['on']('submitCommentThread',(_0x4c1290,_0x393f33)=>this['_submitCommentThread'](_0x393f33)),this['on']('resolveCommentThread',(_0x3c16f2,_0xd18aab)=>this['_resolveCommentThread'](_0xd18aab)),this['on']('resolveCommentThread',(_0x288a17,_0x21b446)=>this['_updateActiveAnnotation'](_0x21b446),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x29c11f,_0x1d230d)=>this['_reopenCommentThread'](_0x1d230d)),this['on']('reopenCommentThread',(_0x5b7cdc,_0x1d483c)=>this['_updateActiveAnnotation'](_0x1d483c),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1b973e,_0x4bf291)=>this['_removeCommentThread'](_0x4bf291)),this['on']('updateCommentThread',(_0x152327,_0x462db4)=>this['_updateCommentThread'](_0x462db4)),this['on']('updateCommentThread',(_0x350a20,_0x7ef7ed)=>this['_updateActiveAnnotation'](_0x7ef7ed),{'priority':'lowest'}),this['on']('addComment',(_0x1c972b,_0x1eeef3)=>this['_addComment'](_0x1eeef3)),this['on']('updateComment',(_0x5b7054,_0x1ba563)=>this['_updateComment'](_0x1ba563)),this['on']('removeComment',(_0x450db0,_0x1a7e6a)=>this['_removeComment'](_0x1a7e6a)),this['on']('addComment',(_0x2aba06,{threadId:_0xbc7249,isFromAdapter:_0x1db8a0})=>{if(_0x1db8a0)return;const _0xcd8df1=this['getCommentThread'](_0xbc7249),_0x517aef=_0xcd8df1&&this['_threadToController']['get'](_0xcd8df1);_0x517aef&&_0x517aef['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x30cf8a,'change:activeAnnotations',(_0x191cef,_0x8fce5b,_0x2eb3c8)=>{const _0x12d3e6=Array['from'](_0x2eb3c8)['map'](_0x2724fb=>this['_viewToController']['get'](_0x2724fb['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x12d3e6?_0x12d3e6['model']:null;});}set['adapter'](_0x3fff73){if(this['_adapter'])throw new _0x1a89d7('commentsrepository-adapter-already-set');this['_adapter']=_0x3fff73;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2fe6c1=_t,threadId:_0x4a46f0=_0x59c6e8(),comments:_0x312516=[],unlinkedAt:_0x179024=null,resolvedAt:_0x431f9b=null,resolvedBy:_0x4cd9cf=null,target:_0x5bd101=null,context:_0x3fa661=null,attributes:_0x59622f={},isResolvable:_0x115b41=!0x0,isSubmitted:_0x56c885=!0x1,isFromAdapter:_0xe35791=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x2fe6c1),{'channelId':_0x2fe6c1,'threadId':_0x4a46f0,'comments':_0x312516,'unlinkedAt':_0x179024,'resolvedAt':_0x431f9b,'resolvedBy':_0x4cd9cf,'target':_0x5bd101,'context':_0x3fa661,'attributes':_0x59622f,'isFromAdapter':_0xe35791,'isResolvable':_0x115b41,'isSubmitted':_0x56c885}),this['getCommentThread'](_0x4a46f0);}['openNewCommentThread']({channelId:_0x22111d=_t,threadId:_0x575e32=_0x59c6e8(),target:_0x1f774a,context:_0x1b9cba=null,isResolvable:_0x102ab5=!0x0}){if(this['_readOnlyChannels']['has'](_0x22111d)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1f774a)throw new _0x1a89d7('commentsrepository-missing-target');const _0x45ae5f=this['addCommentThread']({'channelId':_0x22111d,'threadId':_0x575e32,'target':_0x1f774a,'context':_0x1b9cba,'isResolvable':_0x102ab5});if(!_0x45ae5f)return null;const _0x145660=this['_threadToController']['get'](_0x45ae5f),_0x53e01a=_0x145660['view']['commentThreadInputView']['commentInputView'],_0x133a29=this['context']['plugins']['get'](y),_0x2900dc=_0x133a29['getByInnerView'](_0x145660['view']);return _0x133a29['activate'](_0x2900dc),_0x53e01a['once']('editorReady',()=>_0x53e01a['focus']()),_0x45ae5f;}['hasCommentThread'](_0x2c89ad){if('string'!=typeof _0x2c89ad)throw new _0x1a89d7('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2c89ad);}['updateCommentThread']({channelId:_0x11c7d5=_t,threadId:_0x1bfbdc,context:_0x57b12e,unlinkedAt:_0xb5c8fb,attributes:_0x302b62,isFromAdapter:_0x4f8676=!0x1}){return this['fire'](Nt('updateCommentThread',_0x11c7d5),{'channelId':_0x11c7d5,'threadId':_0x1bfbdc,'context':_0x57b12e,'unlinkedAt':_0xb5c8fb,'attributes':_0x302b62,'isFromAdapter':_0x4f8676}),this['getCommentThread'](_0x1bfbdc);}['getCommentThread'](_0x208584){if('string'!=typeof _0x208584)throw new _0x1a89d7('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x208584);}['fetchCommentThread']({channelId:_0x1d0bf5,threadId:_0x3f78a4}={}){const _0x7106a6=this['getCommentThread'](_0x3f78a4);if(_0x7106a6)return Promise['resolve'](_0x7106a6);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x1a89d7('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1d0bf5,'threadId':_0x3f78a4})['then'](_0x538b19=>this['hasCommentThread'](_0x3f78a4)?this['getCommentThread'](_0x3f78a4):_0x538b19?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1d0bf5},_0x538b19)):void 0x0)['catch'](_0x3a5092=>{throw console['error'](_0x3a5092),new _0x1a89d7('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x31ab8e,skipNotAttached:_0x5a10d2=!0x1,skipEmpty:_0x2b8d78=!0x1,toJSON:_0x50c593=!0x1}={}){const _0x4e9c05=[];for(const _0x78a2ab of this['_threads']['values']())_0x31ab8e&&_0x78a2ab['channelId']!==_0x31ab8e||_0x5a10d2&&!_0x78a2ab['isAttached']||_0x2b8d78&&0x0===_0x78a2ab['length']||_0x4e9c05['push'](_0x78a2ab);return _0x50c593?_0x4e9c05['map'](_0x49c8bc=>_0x49c8bc['toJSON']()):_0x4e9c05;}['getAnnotationForCommentThread'](_0x22a91d){const _0x429f5c=this['_threadToController']['get'](_0x22a91d);if(!_0x429f5c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x429f5c['view'])||null;}['getCommentThreadForAnnotation'](_0x336463){const _0x34961e=this['_viewToController']['get'](_0x336463['innerView']);return _0x34961e?_0x34961e['model']:null;}['setActiveCommentThread'](_0x370ae9){const _0x209683=this['context']['plugins']['get'](y);if(!_0x370ae9)return void(this['activeCommentThread']&&_0x209683['deactivateAll']());const _0xd07cbc=this['getCommentThread'](_0x370ae9);if(!_0xd07cbc)throw new _0x1a89d7('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x370ae9});if(!this['_threadToController']['has'](_0xd07cbc))throw new _0x1a89d7('commentsrepository-active-not-attached',null,{'threadId':_0x370ae9});const _0x24a4d3=_0x209683['getByInnerView'](this['_threadToController']['get'](_0xd07cbc)['view']);_0x209683['activate'](_0x24a4d3);}['switchReadOnly'](_0x54df22,_0x43ddfb){_0x54df22?this['_readOnlyChannels']['add'](_0x43ddfb):this['_readOnlyChannels']['delete'](_0x43ddfb),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x39e8b5){return this['_readOnlyChannels']['has'](_0x39e8b5)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2cbcf7,_0x560834){return new vt(_0x2cbcf7,_0x560834);}['setPermissions'](_0x16f0d2,_0x2f9e1f=_t){this['_permissions']['set'](_0x2f9e1f,_0x16f0d2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xd84a71=_t){return this['_permissions']['has'](_0xd84a71)?this['_permissions']['get'](_0xd84a71):bt;}['_addCommentThread']({channelId:_0x6cd6a,threadId:_0x553370,comments:_0x5c3065,unlinkedAt:_0x1528cb,resolvedAt:_0x820f70,resolvedBy:_0xf0bf6e,target:_0x66801d,context:_0x57b622,attributes:_0xe067f1,isFromAdapter:_0x52f3e8,isResolvable:_0x51cbb1,isSubmitted:_0x3f0d9f}){if('string'!=typeof _0x553370)throw new _0x1a89d7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x553370});if(this['hasCommentThread'](_0x553370))throw new _0x1a89d7('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x553370});const _0x296763=new pi(this,{'channelId':_0x6cd6a,'id':_0x553370,'context':_0x57b622,'attributes':_0xe067f1,'unlinkedAt':_0x1528cb,'resolvedAt':_0x820f70,'resolvedBy':_0xf0bf6e?this['context']['plugins']['get'](st)['getUser'](_0xf0bf6e):null,'isResolvable':_0x51cbb1,'isSubmitted':_0x3f0d9f||_0x52f3e8});this['_threads']['set'](_0x553370,_0x296763);for(const _0x2d2522 of _0x5c3065)_0x296763['_add'](this['_createNewComment']({'threadId':_0x553370,..._0x2d2522}));return _0x66801d&&_0x296763['attachTo'](_0x66801d),_0x52f3e8||!_0x296763['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x6cd6a,'threadId':_0x553370});}['_submitCommentThread']({channelId:_0x38b5ea,threadId:_0x7ccd0c}){if(!this['hasCommentThread'](_0x7ccd0c))throw new _0x1a89d7('commentsrepository-missing-comment-thread',this);const _0x30f6e0=this['getCommentThread'](_0x7ccd0c);if(_0x30f6e0['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x59db7f,comments:_0x3333df,resolvedAt:_0x264007,resolvedBy:_0x551230,context:_0x57178a,attributes:_0x3db8b2}=_0x30f6e0,_0x394fd7=this['context']['plugins']['get']('PendingActions'),_0x54db1f=_0x394fd7['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x38b5ea,'threadId':_0x59db7f,'comments':_0x3333df['map'](_0x355290=>_0x355290['toJSON']()),'resolvedAt':_0x264007,'resolvedBy':_0x551230?_0x551230['id']:_0x551230,'context':_0x57178a,'attributes':_0x3db8b2})['then'](({comments:_0x195743})=>{_0x394fd7['remove'](_0x54db1f);for(const _0x3ec45e of _0x195743)this['_updateComment']({'channelId':_0x38b5ea,'threadId':_0x7ccd0c,'commentId':_0x3ec45e['commentId'],'createdAt':_0x3ec45e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4ce3de=>{throw console['error'](_0x4ce3de),new _0x1a89d7('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x550596,target:_0x34b772}){const _0x316011=this['getCommentThread'](_0x550596);if(!_0x316011)throw new _0x1a89d7('commentsrepository-attach-missing-comment-thread',this);const _0x2e079d=this['context']['plugins']['get']('PendingActions'),_0xc2bb23=this['context']['plugins']['get'](y),_0x5611a7=this['_createCommentThreadView'](_0x316011),_0x205951=new vt(_0x316011,_0x5611a7);let _0xa36c9f=null;_0x5611a7['on']('change:isDirty',(_0x3d909e,_0x575296,_0x2f6332)=>{_0x2f6332?_0xa36c9f=_0x2e079d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xa36c9f&&(_0x2e079d['remove'](_0xa36c9f),_0xa36c9f=null);}),this['_threadToController']['set'](_0x316011,_0x205951),this['_viewToController']['set'](_0x5611a7,_0x205951);const _0x19f22f=new E(this['context']['locale'],_0x5611a7);_0x19f22f['bind']('length')['to'](_0x5611a7),_0x19f22f['bind']('isDirty')['to'](_0x5611a7,'isDirty',_0x5611a7,'length',(_0x3881f3,_0x3515dc)=>_0x3881f3||!_0x3515dc),_0x19f22f['bind']('isActive')['to'](_0x5611a7),_0x19f22f['type']='comment';const _0x62fd47=new T({'view':_0x19f22f,'target':_0x34b772,'type':'comment','isVisible':!_0x316011['archivedAt']});return _0x5611a7['on']('escape',()=>{_0x62fd47['fire']('escape');}),this['_bindAnnotationToEditors'](_0x5611a7,_0x62fd47),_0xc2bb23['add'](_0x62fd47),_0x62fd47;}['_bindAnnotationToEditors'](_0x1b5441,_0x4a5a63){this['listenTo'](_0x1b5441,'editorReady',(_0x40c5f5,_0x100114)=>{const _0x378bf2=_0x100114['ui']['view']['body']['bodyCollectionContainer'];_0x4a5a63['focusableElements']['add'](_0x378bf2),this['context']instanceof _0x131402&&this['context']['ui']['focusTracker']['add'](_0x378bf2);},{'priority':'highest'}),this['listenTo'](_0x1b5441,'editorDestroyed',(_0x282d06,_0x182791)=>{const _0x3a4526=_0x182791['ui']['view']['body']['bodyCollectionContainer'];_0x4a5a63['focusableElements']['has'](_0x3a4526)&&_0x4a5a63['focusableElements']['remove'](_0x3a4526),this['context']instanceof _0x131402&&this['context']['ui']['focusTracker']['remove'](_0x3a4526);});}['_unbindEditors'](_0x34ba5e){this['stopListening'](_0x34ba5e,'editorReady'),this['stopListening'](_0x34ba5e,'editorDestroyed');}['_createCommentThreadView'](_0x495342){const _0x11a0e1=this['context']['plugins']['get'](st),{config:_0x3b3030,locale:_0x35158}=this['context'],_0x497e83=pt(_0x3b3030['get']('locale'),_0x35158);return new(0x0,(_0x3b3030['get']('comments'))['CommentThreadView'])(_0x35158,_0x495342,_0x11a0e1['me'],{'editorConfig':{..._0x3b3030['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x3b3030['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x3b3030['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x3b3030['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x3b3030['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x497e83,'CommentView':_0x3b3030['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x5f782,channelId:_0x50917f,resolvedAt:_0x4d7530,resolvedBy:_0x5cb559,isFromAdapter:_0x540883}){if(!this['hasCommentThread'](_0x5f782))throw new _0x1a89d7('commentsrepository-missing-comment-thread',null,{'threadId':_0x5f782});const _0xa6e189=this['getCommentThread'](_0x5f782);if(_0xa6e189['isResolved'])throw new _0x1a89d7('commentsrepository-resolved-comment-thread',null,{'threadId':_0x5f782});const _0x2be762=this['context']['plugins']['get'](st);if(_0xa6e189['resolvedBy']=_0x2be762['getUser'](_0x5cb559),_0xa6e189['resolvedAt']=_0x4d7530,_0x540883||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x1f4d19=this['context']['plugins']['get']('PendingActions'),_0x579b92=_0x1f4d19['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x50917f,'threadId':_0x5f782})['then'](({resolvedAt:_0x4eb7e4,resolvedBy:_0x1647f3})=>{_0x1f4d19['remove'](_0x579b92),_0xa6e189['resolvedBy']['id']!==_0x1647f3&&(_0xa6e189['resolvedBy']=_0x2be762['getUser'](_0x1647f3)),_0xa6e189['resolvedAt']=_0x4eb7e4;})['catch'](_0x25796c=>{throw console['error'](_0x25796c),new _0x1a89d7('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x494aab,channelId:_0x27f4e0,isFromAdapter:_0x2e9800}){if(!this['hasCommentThread'](_0x494aab))throw new _0x1a89d7('commentsrepository-missing-comment-thread',null,{'threadId':_0x494aab});const _0x3c0189=this['getCommentThread'](_0x494aab);if(!_0x3c0189['isResolved'])throw new _0x1a89d7('commentsrepository-reopen-comment-thread',null,{'threadId':_0x494aab});if(_0x3c0189['resolvedBy']=null,_0x3c0189['resolvedAt']=null,_0x2e9800||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x48145b=this['context']['plugins']['get']('PendingActions'),_0x5d21bb=_0x48145b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x27f4e0,'threadId':_0x494aab})['then'](()=>_0x48145b['remove'](_0x5d21bb))['catch'](_0x3830f6=>{throw console['error'](_0x3830f6),new _0x1a89d7('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x3003ea,isFromAdapter:_0x2092b3}){const _0x49690f=this['getCommentThread'](_0x3003ea);if(!_0x49690f)throw new _0x1a89d7('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x3003ea),this['_threads']['delete'](_0x3003ea),!_0x49690f['isSubmitted']||_0x2092b3||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x4254f5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x342bfe}=_0x49690f,_0x5ade75=_0x4254f5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x342bfe,'threadId':_0x3003ea})['then'](()=>_0x4254f5['remove'](_0x5ade75))['catch'](_0x1c7407=>{throw console['error'](_0x1c7407),new _0x1a89d7('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5427d1,unlinkedAt:_0x223643,context:_0xcde7c5,attributes:_0x3abc2f,isFromAdapter:_0x44fbd6}){if('string'!=typeof _0x5427d1)throw new _0x1a89d7('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5427d1});if(!this['hasCommentThread'](_0x5427d1))throw new _0x1a89d7('commentsrepository-missing-comment-thread',null,{'threadId':_0x5427d1});const _0x1de04a=this['getCommentThread'](_0x5427d1);let _0x30c04b=!0x1;if(void 0x0!==_0xcde7c5&&_0x1de04a['context']!==_0xcde7c5&&(_0x1de04a['context']=_0xcde7c5,_0x30c04b=!0x0),void 0x0!==_0x223643&&_0x1de04a['unlinkedAt']!==_0x223643&&(_0x1de04a['unlinkedAt']=_0x223643,_0x30c04b=!0x0),_0x3abc2f&&!At(_0x3abc2f,_0x1de04a['attributes'])&&(_0x1de04a['attributes']=_0x3abc2f,_0x30c04b=!0x0),!_0x30c04b)return Promise['resolve']();if(!_0x1de04a['isSubmitted']||_0x44fbd6||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x3b271e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3e6bda}=_0x1de04a,_0x1d7440=_0x3b271e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x3e6bda,'threadId':_0x5427d1,'context':_0xcde7c5,'unlinkedAt':_0x223643,'attributes':_0x3abc2f})['then'](()=>_0x3b271e['remove'](_0x1d7440))['catch'](_0x45da23=>{throw console['error'](_0x45da23),new _0x1a89d7('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1fd4a3){const _0x5211ce=this['context']['plugins']['get'](y),_0x3c5d13=this['getCommentThread'](_0x1fd4a3);if(_0x3c5d13['_isAttached']=!0x1,this['_threadToController']['has'](_0x3c5d13)){const _0x1eb784=this['_threadToController']['get'](_0x3c5d13),_0x131664=_0x1eb784['view'],_0x43f1e2=_0x5211ce['getByInnerView'](_0x131664);this['_threadToController']['delete'](_0x3c5d13),this['_viewToController']['delete'](_0x131664),_0x43f1e2&&_0x5211ce['remove'](_0x43f1e2),_0x1eb784['destroy'](),_0x131664['destroy']()['then'](()=>{this['_unbindEditors'](_0x131664);});}}['_updateActiveAnnotation']({threadId:_0x61b463,resolvedAt:_0x30d8f4,unlinkedAt:_0xea2d5b}){const _0x23a9da=!!_0x30d8f4,_0x1c806b=this['context']['plugins']['get'](y),_0x1cb413=this['getCommentThread'](_0x61b463);if(this['_threadToController']['has'](_0x1cb413)){const _0x3a2575=this['_threadToController']['get'](_0x1cb413)['view'],_0x5e2616=_0x1c806b['getByInnerView'](_0x3a2575);_0x5e2616&&(_0x23a9da&&_0x1c806b['_removeActiveAnnotation'](_0x5e2616),_0xea2d5b?_0x5e2616['isVisible']=!0x1:_0x5e2616['refreshVisibility']());}}['_getExternalAuthor'](_0x308f05){const _0x21f95d=this['context']['plugins']['get'](st),_0x357c08=It('external:'+_0x308f05),_0x313ad2=_0x21f95d['getUser'](_0x357c08);return _0x313ad2||_0x21f95d['addUser']({'id':_0x357c08,'name':_0x308f05});}['_createNewComment']({threadId:_0x2b70e3,commentId:_0x35f5b9=_0x59c6e8(),content:_0x412f8e,authorId:_0x17780b,createdAt:_0x3ecb50,attributes:_0x21ee52}){if('string'!=typeof _0x35f5b9)throw new _0x1a89d7('commentsrepository-invalid-commentid');if('string'!=typeof _0x17780b)throw new _0x1a89d7('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x412f8e||!_0x412f8e['trim']())throw new _0x1a89d7('commentsrepository-invalid-comment-content');const _0x1eb3a8=this['context']['plugins']['get'](st)['getUser'](_0x17780b);if(!_0x1eb3a8)throw new _0x1a89d7('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x17780b});let _0x1f2c71=null,_0x5e8c44=_0x3ecb50;return _0x21ee52?.['@external']&&(_0x1f2c71=this['_getExternalAuthor'](_0x21ee52['@external']['authorName']),_0x5e8c44=new Date(_0x21ee52['@external']['createdAt'])),new wi(this,{'threadId':_0x2b70e3,'id':_0x35f5b9,'author':_0x1f2c71||_0x1eb3a8,'creator':_0x1eb3a8,'content':_0x412f8e,'createdAt':_0x3ecb50,'authoredAt':_0x5e8c44,'attributes':_0x21ee52});}['_addComment'](_0x49c1ef){let {threadId:_0x56d370,content:_0x5c3e97,attributes:_0x3fc7f4,isFromAdapter:_0x122b5c}=_0x49c1ef;const _0x12ed45=this['getCommentThread'](_0x49c1ef['threadId']);if(!_0x12ed45)throw new _0x1a89d7('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x376bfa=this['_createNewComment'](_0x49c1ef),{id:_0x48a75c}=_0x376bfa;if(_0x12ed45['_add'](_0x376bfa),_0x122b5c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x12ed45['isSubmitted'])return Promise['resolve']();const _0x2c18f6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ffd7d}=_0x12ed45,_0x4e3c90=_0x2c18f6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3fc7f4||(_0x3fc7f4={}),this['adapter']['addComment']({'channelId':_0x1ffd7d,'threadId':_0x56d370,'commentId':_0x48a75c,'content':_0x5c3e97,'attributes':_0x3fc7f4})['then'](_0x4a5007=>{_0x2c18f6['remove'](_0x4e3c90),_0x4a5007&&this['_updateComment']({'channelId':_0x1ffd7d,'threadId':_0x56d370,'commentId':_0x48a75c,'createdAt':_0x4a5007['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x41b18b=>{throw console['error'](_0x41b18b),new _0x1a89d7('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x1aa90c,commentId:_0x3979e3,content:_0x5b03c1,createdAt:_0x2005c5,attributes:_0x249d39,isFromAdapter:_0x30355d}){if(void 0x0!==_0x5b03c1&&('string'!=typeof _0x5b03c1||!_0x5b03c1['trim']()['length']))throw new _0x1a89d7('commentsrepository-update-comment-invalid-content');const _0x31b067=this['getCommentThread'](_0x1aa90c),_0x130788=_0x31b067['getComment'](_0x3979e3);if(!_0x130788)throw new _0x1a89d7('commentsrepository-update-missing-comment',this);let _0x1b446b=!0x1;if(_0x5b03c1&&_0x5b03c1!==_0x130788['content']&&(_0x130788['isEditable']||_0x30355d)&&(_0x130788['content']=_0x5b03c1,_0x1b446b=!0x0),_0x2005c5&&_0x2005c5!==_0x130788['createdAt']&&(_0x130788['createdAt']=_0x2005c5,_0x130788['attributes']&&_0x130788['attributes']['@external']||(_0x130788['authoredAt']=_0x2005c5),_0x1b446b=!0x0),_0x249d39&&!At(_0x249d39,_0x130788['attributes'])&&(_0x130788['attributes']=_0x249d39,_0x1b446b=!0x0),!_0x1b446b)return Promise['resolve']();if(_0x31b067['fire']('commentUpdated'),_0x30355d||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x208645=this['context']['plugins']['get']('PendingActions'),{channelId:_0x213f85}=this['getCommentThread'](_0x130788['threadId']),_0x3013cc=_0x208645['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x213f85,'threadId':_0x1aa90c,'commentId':_0x3979e3,'content':_0x5b03c1,'attributes':_0x249d39})['then'](()=>_0x208645['remove'](_0x3013cc))['catch'](_0x4576bc=>{throw console['error'](_0x4576bc),new _0x1a89d7('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x419192,commentId:_0x49dde7,isFromAdapter:_0x5b029f}){const _0x3e0e8d=this['getCommentThread'](_0x419192),_0x2ee267=_0x3e0e8d['getComment'](_0x49dde7);if(!_0x2ee267)throw new _0x1a89d7('commentsrepository-remove-missing-comment',this);if(_0x3e0e8d['_remove'](_0x2ee267),_0x5b029f||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x58a972=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3a1cd2}=_0x3e0e8d,_0x3aa82f=_0x58a972['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3a1cd2,'threadId':_0x419192,'commentId':_0x49dde7})['then'](()=>_0x58a972['remove'](_0x3aa82f))['catch'](_0xa00e5a=>{throw console['error'](_0xa00e5a),new _0x1a89d7('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x4dfcbe(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0xc9a169,_0x269ccb){super();const _0x5424bb=_0x269ccb['isResolvable'];this['channelId']=_0x269ccb['channelId'],this['id']=_0x269ccb['id'],this['comments']=new _0x5f19bf(),this['_repository']=_0xc9a169,this['_isAttached']=!0x1,this['_isSubmitted']=_0x269ccb['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0xc9a169,'_permissions',_0xc9a169,'_readOnlyChannels',()=>_0xc9a169['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0xc9a169,'_permissions',()=>_0xc9a169['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0xc9a169,'_permissions',()=>{const _0x1fdb99=_0xc9a169['getPermissions'](this['channelId']);return _0x1fdb99['write']||_0x1fdb99['admin'];}),this['bind']('isResolvable')['to'](_0xc9a169,'_permissions',()=>_0x5424bb&&_0xc9a169['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x269ccb['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x429321,_0x4b4a25)=>_0x429321?_0x4b4a25?_0x429321<_0x4b4a25?_0x429321:_0x4b4a25:_0x429321:_0x4b4a25),this['set']('unlinkedAt',_0x269ccb['unlinkedAt']||null),this['set']('resolvedAt',_0x269ccb['resolvedAt']||null),this['set']('resolvedBy',_0x269ccb['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x4ffe65=>!!_0x4ffe65),this['set']('attributes',_0x269ccb['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x34f971,_0x4711e4)=>_0x34f971+_0x4711e4['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x5c7db8,id:_0x5ea79a}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x5c7db8),{'channelId':_0x5c7db8,'threadId':_0x5ea79a});}['setUnlinkedAt'](_0x2b4e6b){this['_update']({'unlinkedAt':_0x2b4e6b});}['resolve']({resolvedAt:_0x349d36=new Date(),resolvedBy:_0x109a77=null,isFromAdapter:_0x415a0f=!0x1}={}){const _0x3a868c=this['_repository']['context']['plugins']['get'](st)['me'],{channelId:_0x5e777,id:_0x2f9a09}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x5e777),{'channelId':_0x5e777,'threadId':_0x2f9a09,'resolvedAt':_0x349d36,'resolvedBy':_0x109a77||_0x3a868c['id'],'isFromAdapter':_0x415a0f});}['reopen']({isFromAdapter:_0x194982=!0x1}={}){const {channelId:_0x432ec8,id:_0x1279c4}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x432ec8),{'channelId':_0x432ec8,'threadId':_0x1279c4,'isFromAdapter':_0x194982});}['setContext'](_0xe701d9){this['context']||this['_update']({'context':_0xe701d9});}['setAttribute'](_0x11c082,_0x1891f9){const _0x555e49=wt(this['attributes']);Ct(_0x555e49,_0x11c082,_0x1891f9),this['_update']({'attributes':_0x555e49});}['removeAttribute'](_0x13b23d){const _0x16cfe5=wt(this['attributes']);yt(_0x16cfe5,_0x13b23d),this['_update']({'attributes':_0x16cfe5});}['remove']({isFromAdapter:_0x2c32af=!0x1}={}){const {channelId:_0x4a35e4,id:_0x4af0a5}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x4a35e4),{'channelId':_0x4a35e4,'threadId':_0x4af0a5,'isFromAdapter':_0x2c32af});}['attachTo'](_0x255f41){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x255f41});}['addComment'](_0x369a5d){const {channelId:_0x35ac00,id:_0x38dd1d}=this;this['_repository']['fire'](Nt('addComment',_0x35ac00,_0x38dd1d),Object['assign']({'channelId':_0x35ac00,'threadId':_0x38dd1d},_0x369a5d));}['getComment'](_0x5a6f3f){if('string'!=typeof _0x5a6f3f)throw new _0x1a89d7('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x5a6f3f});return this['comments']['get'](_0x5a6f3f);}['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'](_0x1d66db=>_0x1d66db['toJSON']()),'attributes':this['attributes']};}['_add'](_0x14c32d){return this['listenTo'](_0x14c32d,'change:authoredAt',()=>{const _0x91a793=this['_findOptimalIndex'](_0x14c32d),_0x5dbca5=this['comments'];_0x91a793-0x1!=_0x5dbca5['getIndex'](_0x14c32d)&&_0x91a793+0x1!=_0x5dbca5['getIndex'](_0x14c32d)&&(this['_remove'](_0x14c32d),this['_add'](_0x14c32d));}),this['comments']['add'](_0x14c32d,this['_findOptimalIndex'](_0x14c32d));}['_update'](_0x350c93){const {channelId:_0x5eedbb,id:_0x3b1d4e}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x5eedbb),{..._0x350c93,'channelId':_0x5eedbb,'threadId':_0x3b1d4e});}['_remove'](_0x850285){return this['stopListening'](_0x850285),_0x850285['destroy'](),this['comments']['remove'](_0x850285);}['_findOptimalIndex'](_0x245d50){const _0x5ad071=this['comments']['find'](_0xfc8512=>new Date(_0xfc8512['authoredAt'])['getTime']()>new Date(_0x245d50['authoredAt'])['getTime']());return _0x5ad071?this['comments']['getIndex'](_0x5ad071):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x4dfcbe(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x8f33ba,_0x3fdc58){super();const _0x5f0064=_0x8f33ba['context']['plugins']['get'](st)['me'],_0x294f5b=_0x8f33ba['getCommentThread'](_0x3fdc58['threadId']),_0x4af76f=0x0===_0x294f5b['comments']['length'],_0x2bd8f5=_0x5f0064===_0x3fdc58['author'];this['id']=_0x3fdc58['id'],this['threadId']=_0x3fdc58['threadId'],this['author']=_0x3fdc58['author'],this['creator']=_0x3fdc58['creator'],this['isExternal']=Boolean(_0x3fdc58['attributes']&&_0x3fdc58['attributes']['@external']),this['set']('content',_0x3fdc58['content']),this['createdAt']=_0x3fdc58['createdAt']||new Date(),this['set']('authoredAt',_0x3fdc58['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x294f5b,'resolvedAt'),this['set']('attributes',_0x3fdc58['attributes']||{}),this['bind']('isEditable')['to'](_0x8f33ba,'_permissions',()=>{const _0x59ed7a=_0x8f33ba['getPermissions'](_0x294f5b['channelId'])['write'],_0xb5c3bc=_0x8f33ba['getPermissions'](_0x294f5b['channelId'])['modifyAll'];return _0x2bd8f5&&_0x59ed7a||!_0x2bd8f5&&_0xb5c3bc;}),this['bind']('isRemovable')['to'](_0x294f5b,'isRemovable',_0x8f33ba,'_permissions',_0x2d1b92=>{const _0x314485=_0x8f33ba['getPermissions'](_0x294f5b['channelId'])['write'],_0x309770=_0x8f33ba['getPermissions'](_0x294f5b['channelId'])['modifyAll'];return _0x2bd8f5&&_0x314485||_0x2d1b92&&_0x4af76f||!_0x2bd8f5&&_0x309770&&!_0x4af76f;}),this['bind']('isReadOnly')['to'](_0x294f5b,'isReadOnly'),this['_repository']=_0x8f33ba;}get['weight'](){return Math['max'](function(_0x47e492){const _0x2fe4aa=document['createElement']('div');return _0x2fe4aa['innerHTML']=_0x47e492,_0x2fe4aa['textContent']['length'];}(this['content']),0xc8);}['update'](_0x13eb02){const {threadId:_0x1b20d5,id:_0x2bb032}=this;if(!this['_repository']['hasCommentThread'](_0x1b20d5))throw new _0x1a89d7('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5da10f}=this['_repository']['getCommentThread'](_0x1b20d5);this['_repository']['fire'](Nt('updateComment',_0x5da10f,_0x1b20d5),{'channelId':_0x5da10f,'threadId':_0x1b20d5,'commentId':_0x2bb032,..._0x13eb02});}['setAttribute'](_0x3eab2e,_0x3202f7){const _0x579216=wt(this['attributes']);Ct(_0x579216,_0x3eab2e,_0x3202f7),this['update']({'attributes':_0x579216});}['removeAttribute'](_0x73f7e7){const _0x5a3529=wt(this['attributes']);yt(_0x5a3529,_0x73f7e7),this['update']({'attributes':_0x5a3529});}['remove'](_0x524e3b={}){if(!_0x524e3b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x558b9d,id:_0x95f434}=this;if(!this['_repository']['hasCommentThread'](_0x558b9d))throw new _0x1a89d7('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1fd2b3}=this['_repository']['getCommentThread'](_0x558b9d);this['_repository']['fire'](Nt('removeComment',_0x1fd2b3,_0x558b9d),{'channelId':_0x1fd2b3,'threadId':_0x558b9d,'commentId':_0x95f434,..._0x524e3b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x5d9b76,..._0x244708){for(const _0xa6bd72 of _0x244708)void 0x0!==_0xa6bd72&&(_0x5d9b76+=':'+String(_0xa6bd72));return _0x5d9b76;}class ot extends _0x127f8e{constructor(_0x25f7e8){super(_0x25f7e8),this['set']('hasContent',!0x1);}['refresh'](){const _0x5afc0a=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x109c10 of _0x5afc0a['getRanges']())if(this['_hasContent'](_0x109c10))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x470ab4=_0x59c6e8(),ranges:_0x5c5a29,comment:_0xcbb208}={}){const _0x2d4de9=this['editor']['model'],_0x425ba3=_0x5c5a29??Array['from'](_0x2d4de9['document']['selection']['getRanges']()),_0x1d0388=[];for(const _0x164dd0 of _0x425ba3)this['_hasContent'](_0x164dd0)&&_0x1d0388['push'](this['_trimToContent'](_0x164dd0));if(!_0x1d0388['length'])throw new _0x1a89d7('addcommentthreadcommand-incorrect-ranges',null);_0xcbb208&&this['_createCommentThread'](_0x470ab4,_0xcbb208),this['_createMarkersFromRanges'](_0x470ab4,_0x1d0388,!!_0xcbb208);}['_createMarkersFromRanges'](_0x1db79c,_0x39a2a1,_0x3b5396){this['editor']['model']['change'](_0x420c35=>{for(const _0x18db89 of _0x39a2a1){const _0x1224be=_0x59c6e8()['substr'](0x1,0x5),_0x1a494a='comment:'+_0x1db79c+':'+_0x1224be;_0x420c35['addMarker'](_0x1a494a,{'range':_0x18db89,'usingOperation':_0x3b5396,'affectsData':_0x3b5396});}});}['_createCommentThread'](_0x36602e,_0x1aaa59){const _0x37f2e5=this['editor']['plugins']['get']('CommentsRepository'),_0x50bda7=this['editor']['config']['get']('collaboration.channelId'),_0x1131df=this['editor']['plugins']['get']('Users')['me'];if(!_0x1131df)throw new _0x1a89d7('addcommentthreadcommand-user-not-found',null);_0x37f2e5['addCommentThread']({'threadId':_0x36602e,'channelId':_0x50bda7,'comments':[{'authorId':_0x1131df['id'],'content':_0x1aaa59,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x2e43dc){for(const _0x330765 of _0x2e43dc['getItems']())if(this['_itemIsContent'](_0x330765))return!0x0;return!0x1;}['_itemIsContent'](_0x36b2f5){return _0x36b2f5['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x36b2f5)&&!_0x36b2f5['is']('element','tableCell');}['_trimToContent'](_0x2d7dcd){const _0x47fcba=_0x3325b8=>!this['_itemIsContent'](_0x3325b8['item']),_0x472bbb=_0x2d7dcd['start']['getLastMatchingPosition'](_0x47fcba),_0x2f37cf=_0x2d7dcd['end']['getLastMatchingPosition'](_0x47fcba,{'direction':'backward'});return this['editor']['model']['createRange'](_0x472bbb,_0x2f37cf);}}class b extends _0x12c5b0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x49349c){super(_0x49349c),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x104c61=this['editor'],_0x5b06bb=_0x104c61['model']['document']['selection'],_0x4b1b71=_0x533f2f(()=>this['refreshSelectedViews'](),0xa);_0x5b06bb['on']('change:range',(_0x404f24,_0x247f15)=>{_0x247f15['directChange']&&(_0x4b1b71['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x104c61['editing']['view']['document'],'change:isFocused',(_0x501c92,_0x3aedf4,_0x23bd06)=>{_0x23bd06&&_0x4b1b71();}),this['listenTo'](_0x104c61['ui']['focusTracker'],'change:isFocused',(_0xb052e7,_0x2579ac,_0x4445b5)=>{_0x4445b5||_0x104c61['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x93d74=>this['_editorAnnotationsData']['has'](_0x93d74['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x53ce1e){if(this['_editorAnnotations']['has'](_0x53ce1e['view']))return;this['_editorAnnotations']['add'](_0x53ce1e['view']),this['editor']['ui']['focusTracker']['add'](_0x53ce1e['view']['element']);const _0x4e91df=this['editor']['plugins']['get'](y);this['listenTo'](_0x4e91df['collection'],'remove',(_0x2c1baa,_0x201aa9)=>{this['editor']['ui']['focusTracker']['remove'](_0x201aa9['view']['element']),this['_editorAnnotations']['delete'](_0x201aa9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x1b6693){if('function'!=typeof _0x1b6693)throw new _0x1a89d7('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x1b6693);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1b6af0,annotations:_0x14b12d}){const _0x27bf98=[],_0x1e0988=this['editor']['model']['document']['selection'],_0x9dec42=Array['from'](_0x1e0988['getRanges']());for(const [_0x59bbb6,_0x5b393e]of this['_editorAnnotationsData']){const _0x2159c8=_0x547033(_0x5b393e),_0x245913=_0x14b12d['getByInnerView'](_0x59bbb6);_0x2159c8&&_0x245913&&_0x27bf98['push']({'annotation':_0x245913,'range':_0x2159c8});}function _0x547033(_0xa571d2){for(const _0x258c37 of _0xa571d2)for(const _0x14b5fe of _0x9dec42)if(_0x258c37['containsRange'](_0x14b5fe,!_0x1e0988['isCollapsed']))return _0x258c37;return null;}return _0x27bf98['sort']((_0x30c97e,_0x2abc65)=>{const _0x193479=_0x30c97e['range'],_0x115b16=_0x2abc65['range'];if(!_0x193479['isEqual'](_0x115b16)){if(_0x193479['containsRange'](_0x115b16,!0x0))return 0x1;if(_0x115b16['containsRange'](_0x193479,!0x0))return-0x1;}return _0x30c97e['annotation']==_0x1b6af0?-0x1:_0x2abc65['annotation']==_0x1b6af0?0x1:0x0;})['map'](_0x1cc655=>_0x1cc655['annotation']);}get['_editorAnnotationsData'](){const _0x4441c6=new Map();for(const _0x48d28c of Array['from'](this['_dataCollectors']))for(const [_0x52713d,_0x5f1029]of _0x48d28c())_0x4441c6['set'](_0x52713d,_0x5f1029);return _0x4441c6;}}class ct extends _0x12c5b0{['afterInit'](){const _0x37a9dd=this['editor'];if(!_0x37a9dd['plugins']['has']('RestrictedEditingModeEditing'))return;_0x37a9dd['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class at extends _0x12c5b0{constructor(_0x217057){super(_0x217057),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x375621=this['editor'],_0x47d013=_0x375621['commands']['get']('importWord'),_0x1d3188=_0x375621['plugins']['get'](st);_0x47d013&&(_0x47d013['on']('execute',(_0xa84adc,[,_0x59ad87])=>{_0x59ad87['collaboration_features']={'comments':!0x0,'user_id':_0x1d3188['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x47d013,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2d27e2,_0x558202){const {comment_threads:_0x594c63}=_0x558202;_0x594c63&&_0x594c63['forEach'](({thread_id:_0x118cbc,comments:_0x45cf48,is_resolved:_0x46bb09})=>{const _0x33720d=new Date(),_0x513f1b=_0x45cf48['map'](({author:_0x1a0ac1,content:_0x481848,created_at:_0x14f6fc})=>({'content':_0x481848,'authorId':this['editor']['plugins']['get'](st)['me']['id'],'createdAt':_0x33720d,'attributes':{'@external':{'authorName':_0x1a0ac1,'createdAt':_0x14f6fc?new Date(_0x14f6fc):new Date(),'source':'importWord'}}})),_0x132354=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x132354,'threadId':_0x118cbc,'comments':_0x513f1b,'resolvedAt':_0x46bb09?_0x33720d:null});});}}class ut extends _0x12c5b0{constructor(_0x6a7c61){super(_0x6a7c61),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1e8476=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1e8476,'contentInsertion',(_0x3223b1,_0x483f20)=>this['_removeMarkersWithoutThreads'](_0x483f20['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x266546){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x266546;const _0x382aa3=this['editor']['plugins']['get']('CommentsRepository');for(const _0x53576c of _0x266546['keys']()){const [_0x76b10c,_0x178da0]=_0x53576c['split'](':');'comment'!=_0x76b10c||_0x382aa3['hasCommentThread'](_0x178da0)||_0x266546['delete'](_0x53576c);}return _0x266546;}['_registerMarkerInClipboardPipeline'](){const _0x5770d3=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x24053d=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x24053d&&_0x5770d3['_registerMarkerToCopy']('comment',_0x24053d);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x385213){switch(_0x385213){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ft extends _0x12c5b0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2844e1,_0x5d0643)=>{if(!_0x5d0643['options']['showCommentHighlights'])return null;if(_0x5d0643['options']['ignoreResolvedComments']){const {id:_0x50f5d8}=er(_0x2844e1['markerName']),_0x44a354=this['editor']['plugins']['get'](o);if(_0x44a354['getCommentThread'](_0x50f5d8)?.['isResolved']&&_0x2844e1['item'])return _0x5d0643['consumable']['consume'](_0x2844e1['item'],'addMarker:'+_0x2844e1['markerName']),_0x5d0643['consumable']['consume'](_0x2844e1['item'],'removeMarker:'+_0x2844e1['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x9944fa=>{_0x9944fa['on']('addMarker:comment',(_0x13650b,_0x515390,_0x27e667)=>{if(!_0x27e667['options']['showCommentHighlights'])return;const _0x65ed30=_0x515390['item'];if(!_0x65ed30)return;const _0x260ca3=_0x27e667['mapper']['toViewElement'](_0x65ed30);this['editor']['model']['schema']['isObject'](_0x65ed30)&&_0x260ca3&&!_0x260ca3['getCustomProperty']('widget')&&_0x260ca3['is']('containerElement')&&_0x3da143(_0x260ca3,_0x27e667['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4f0811,{writer:_0x1ddac7,options:_0x58e45c})=>{if(!_0x58e45c['showCommentHighlights'])return null;const _0x4163ec=_0x1ddac7['createContainerElement']('div'),_0x2e3b27=_0x1ddac7['createEmptyElement']('hr');return _0x1ddac7['addClass']('ck-horizontal-line',_0x4163ec),_0x1ddac7['insert'](_0x1ddac7['createPositionAt'](_0x4163ec,0x0),_0x2e3b27),_0x4163ec;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x5ef3dc,{writer:_0x64f368,options:_0x2125ce})=>{if(!_0x2125ce['showCommentHighlights'])return null;const _0x5e8aa9=_0x64f368['createContainerElement']('span'),_0x4291f6=_0x64f368['createEmptyElement']('img');return _0x64f368['addClass']('image-inline',_0x5e8aa9),_0x64f368['insert'](_0x64f368['createPositionAt'](_0x5e8aa9,0x0),_0x4291f6),_0x5e8aa9;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x44249f,{writer:_0x1656f5,options:_0x11429a})=>{if(_0x11429a['showCommentHighlights'])return _0x1656f5['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x56f34f,_0x574cae,_0x399b0e)=>{_0x399b0e['options']['showCommentHighlights']&&_0x56f34f['stop']();},{'priority':'high'});}}class r extends _0x12c5b0{static get['requires'](){return[o,b,st,ct,at,ut,ft];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x20d777){super(_0x20d777),this['set']('isThreadsLoadingPaused',!0x0),_0x20d777['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x4bbd3d,_0x5776a7,_0x13b488,_0x5cf147)=>{const _0x36018a=_0x20d777['plugins']['get'](o),_0x32a9cd=_0x13b488?er(_0x13b488)['id']:null;_0x20d777['model']['change'](()=>{if(_0x32a9cd){const _0x44b1c5=this['getAllMarkersForId'](_0x32a9cd);for(const _0x3d0693 of _0x44b1c5)_0x20d777['editing']['reconvertMarker'](_0x3d0693);}if(_0x5cf147){const {id:_0xf3f745}=er(_0x5cf147),_0x179bbd=_0x36018a['getCommentThread'](_0xf3f745);if(_0x179bbd&&_0x179bbd['unlinkedAt'])return;if(_0x179bbd&&!_0x179bbd['isAttached'])return;const _0x10e12b=this['getAllMarkersForId'](_0xf3f745);for(const _0x38e2b5 of _0x10e12b)_0x20d777['editing']['reconvertMarker'](_0x38e2b5);}}),_0x32a9cd&&this['scrollToThreadMarker'](_0x32a9cd);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2681fe=this['editor'],_0x8b2f76=_0x2681fe['plugins']['get'](o),_0x1d34b5=_0x2681fe['config']['get']('collaboration.channelId'),_0x41a0cc=_0x8b2f76['getCommentThreads']()['filter'](_0x1a69e0=>_0x1a69e0['channelId']!==_0x1d34b5);_0x2681fe['commands']['add']('addCommentThread',new ot(_0x2681fe)),this['listenTo'](_0x2681fe,'change:isReadOnly',(_0xe00c66,_0x1a078c,_0x52773a)=>{_0x8b2f76['switchReadOnly'](_0x52773a,_0x2681fe['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x8b2f76,dt('addCommentThread',_0x1d34b5),(_0x179d30,{threadId:_0x4cb076})=>{const _0x9dd021=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4cb076);_0x9dd021?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4cb076);}),this['listenTo'](_0x8b2f76,dt('removeCommentThread',_0x1d34b5),(_0x8ae3c5,{threadId:_0x1dee01})=>{_0x2681fe['model']['enqueueChange']({'isUndoable':!0x1},_0x337856=>{const _0x295926=this['getAllMarkersForId'](_0x1dee01);for(const _0x2cbcbc of _0x295926)_0x337856['removeMarker'](_0x2cbcbc);});}),this['listenTo'](_0x8b2f76,dt('resolveCommentThread',_0x1d34b5),(_0x4156d8,{threadId:_0x28bed5})=>{(this['_reconvertMarkers'](_0x28bed5),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x28bed5)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x8b2f76,dt('reopenCommentThread',_0x1d34b5),(_0x29043e,{threadId:_0x581b9f})=>{this['_reconvertMarkers'](_0x581b9f);},{'priority':'low'}),this['listenTo'](_0x8b2f76,dt('addComment',_0x1d34b5),(_0x3cf355,{threadId:_0x53119b,isFromAdapter:_0x4c52e4})=>{const _0xe89ca=this['getAllMarkersForId'](_0x53119b);if(_0x4c52e4||0x0==_0xe89ca['length']||!_0x8b2f76['hasCommentThread'](_0x53119b))return;0x1===_0x8b2f76['getCommentThread'](_0x53119b)['length']&&_0x2681fe['model']['enqueueChange']({'isUndoable':!0x1},_0x21ffd5=>{for(const _0x1b0368 of _0xe89ca)_0x21ffd5['updateMarker'](_0x1b0368,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x41a0cc);}['afterInit'](){!async function(_0x3e2a38){const _0x40138a=_0x59c850([0x7a,0x32,0x4c,0x37,0x61,0x62,0x31,0x34,0x50,0x6a,0x79,0x35,0x4a,0x5a,0x6f,0x71,0x76,0x64,0x41,0x30,0x4e,0x59,0x6e,0x47,0x67,0x63,0x4d,0x72,0x4b,0x66,0x33,0x68,0x54,0x56,0x48,0x74,0x36,0x58,0x38,0x51,0x69,0x6b,0x53,0x6d,0x42,0x70,0x45,0x57,0x55,0x77,0x52,0x49,0x43,0x78,0x44,0x4f,0x46,0x39,0x75,0x73,0x6c,0x65]),_0x41bc3f=0x7785dddb,_0x53674c=0x7782b15b^_0x41bc3f,_0x1ac534=window[_0x59c850([0x44,0x61,0x74,0x65])][_0x59c850([0x6e,0x6f,0x77])](),_0x3eee00=_0x3e2a38[_0x59c850([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3ef8e3=new window[(_0x59c850([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x18c7b2=>{_0x3eee00[_0x59c850([0x6f,0x6e,0x63,0x65])](_0x59c850([0x72,0x65,0x61,0x64,0x79]),_0x18c7b2);}),_0x4d0ce9={[_0x59c850([0x6b,0x74,0x79])]:_0x59c850([0x45,0x43]),[_0x59c850([0x75,0x73,0x65])]:_0x59c850([0x73,0x69,0x67]),[_0x59c850([0x63,0x72,0x76])]:_0x59c850([0x50,0x2d,0x32,0x35,0x36]),[_0x59c850([0x78])]:_0x59c850([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]),[_0x59c850([0x79])]:_0x59c850([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]),[_0x59c850([0x61,0x6c,0x67])]:_0x59c850([0x45,0x53,0x32,0x35,0x36])},_0x3daf71=_0x3eee00[_0x59c850([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x59c850([0x67,0x65,0x74])](_0x59c850([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2be651(){let _0xc18ab1,_0x87079a=null,_0x47e2bc=null;try{if(_0x3daf71==_0x59c850([0x47,0x50,0x4c]))return _0x59c850([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xc18ab1=_0x371be3(),!_0xc18ab1)return _0x59c850([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xc18ab1[_0x59c850([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x47e2bc=_0x439b1a(_0xc18ab1[_0x59c850([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xc18ab1[_0x59c850([0x6a,0x74,0x69])])),await _0x3e4061()?_0x3bfcc8()?_0x10cbd0()?_0x59c850([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x32a332()?(_0xc18ab1[_0x59c850([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59c850([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x87079a=_0x3d1241(_0x59c850([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xc18ab1[_0x59c850([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x59c850([0x74,0x72,0x69,0x61,0x6c])&&(_0x87079a=_0x3d1241(_0x59c850([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x30ee3b()):_0x59c850([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x59c850([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x59c850([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x59c850([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x10cbd0(){const _0x127d25=[_0x59c850([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x59c850([0x74,0x72,0x69,0x61,0x6c])][_0x59c850([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc18ab1[_0x59c850([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1ac534/0x3e8:0xe10*_0x53674c;return _0xc18ab1[_0x59c850([0x65,0x78,0x70])]<_0x127d25;}function _0x3bfcc8(){const _0x1931f=_0xc18ab1[_0x59c850([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x1931f)return!0x1;if(_0x1931f[_0x59c850([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59c850([0x2a])))return!0x0;if(_0x1931f[_0x59c850([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59c850([0x43,0x4d,0x54])))return!0x0;if(_0x1931f[_0x59c850([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59c850([0x52,0x43,0x4d,0x54]))){if(_0x5e5f2d())return!0x0;if(_0x305345()||_0x2e1005())return!0x0;}return!0x1;}function _0x32a332(){const _0x2cc114=_0xc18ab1[_0x59c850([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x2cc114||0x0==_0x2cc114[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xd604c5}=new URL(window[_0x59c850([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x2cc114[_0x59c850([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xd604c5))return!0x0;const _0x2ff8cf=_0xd604c5[_0x59c850([0x73,0x70,0x6c,0x69,0x74])](_0x59c850([0x2e]));return _0x2cc114[_0x59c850([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x34b85a=>_0x34b85a[_0x59c850([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x59c850([0x2a])))[_0x59c850([0x6d,0x61,0x70])](_0x353da6=>_0x353da6[_0x59c850([0x73,0x70,0x6c,0x69,0x74])](_0x59c850([0x2e])))[_0x59c850([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x14fa8d=>_0x14fa8d[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x2ff8cf[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x59c850([0x6d,0x61,0x70])](_0x2d66d7=>Array(_0x2ff8cf[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2d66d7[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x59c850([0x66,0x69,0x6c,0x6c])](_0x2d66d7[0x0]===_0x59c850([0x2a])?_0x59c850([0x2a]):'')[_0x59c850([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2d66d7))[_0x59c850([0x73,0x6f,0x6d,0x65])](_0x244a90=>_0x2ff8cf[_0x59c850([0x65,0x76,0x65,0x72,0x79])]((_0x2b8e29,_0x3bf840)=>_0x244a90[_0x3bf840]===_0x2b8e29||_0x244a90[_0x3bf840]===_0x59c850([0x2a])));}function _0x30ee3b(){return _0x87079a&&_0x47e2bc?new window[(_0x59c850([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x6352de,_0x5119b3)=>{_0x87079a[_0x59c850([0x74,0x68,0x65,0x6e])](_0x6352de,_0x5119b3),_0x47e2bc[_0x59c850([0x74,0x68,0x65,0x6e])](_0x3d516b=>{_0x3d516b!=_0x59c850([0x56,0x61,0x6c,0x69,0x64])&&_0x6352de(_0x3d516b);},_0x5119b3);}):_0x87079a||_0x47e2bc||_0x59c850([0x56,0x61,0x6c,0x69,0x64]);}}function _0x439b1a(_0x352f66,_0x5b4293){return new window[(_0x59c850([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2ab24f=>{if(_0x4c35f9())return _0x2ab24f(_0x59c850([0x56,0x61,0x6c,0x69,0x64]));_0x2e8953(),_0x3eee00[_0x59c850([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x59c850([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xf09e0d=!0x1;const _0x440e86=_0x59c6e8();function _0x265e92(_0x35bbba){return!!_0x35bbba&&(typeof _0x35bbba===_0x59c850([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x35bbba===_0x59c850([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x35bbba[_0x59c850([0x74,0x68,0x65,0x6e])]===_0x59c850([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x35bbba[_0x59c850([0x63,0x61,0x74,0x63,0x68])]===_0x59c850([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x21f45d(_0x59aeba){_0x26463c(_0x59aeba)[_0x59c850([0x74,0x68,0x65,0x6e])](_0x49e212=>{if(!_0x49e212||_0x49e212[_0x59c850([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x59c850([0x6f,0x6b]))return _0x59c850([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x430cfd(_0x740243(_0x440e86+_0x5b4293))!=_0x49e212[_0x59c850([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x59c850([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x59c850([0x56,0x61,0x6c,0x69,0x64]);})[_0x59c850([0x74,0x68,0x65,0x6e])](_0xcef5bc=>(_0x4129d9(),_0xcef5bc),()=>{const _0x1f0b5a=_0x3bdaf9();return null==_0x1f0b5a?(_0x4129d9(),_0x59c850([0x56,0x61,0x6c,0x69,0x64])):_0x59c850(_0x1ac534-_0x1f0b5a>(0x538959db^_0x41bc3f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x59c850([0x74,0x68,0x65,0x6e])](_0x2ab24f)[_0x59c850([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2ab24f(_0x59c850([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x3240e6=0x77b3335b^_0x41bc3f;function _0x4129d9(){const _0x2c134c=_0x59c850([0x6c,0x6c,0x63,0x74,0x2d])+_0x430cfd(_0x740243(_0x352f66)),_0x1a1a12=_0x403e59(_0x430cfd(window[_0x59c850([0x4d,0x61,0x74,0x68])][_0x59c850([0x63,0x65,0x69,0x6c])](_0x1ac534/_0x3240e6)));window[_0x59c850([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59c850([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2c134c,_0x1a1a12);}function _0x3bdaf9(){const _0x12f8ad=_0x59c850([0x6c,0x6c,0x63,0x74,0x2d])+_0x430cfd(_0x740243(_0x352f66)),_0x31e602=window[_0x59c850([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x59c850([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x12f8ad);return _0x31e602?window[_0x59c850([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x403e59(_0x31e602),0x10)*_0x3240e6:null;}function _0x26463c(_0x3d9502){return new window[(_0x59c850([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x54b063,_0x3c9187)=>{_0x3d9502[_0x59c850([0x74,0x68,0x65,0x6e])](_0x54b063,_0x3c9187),window[_0x59c850([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x3c9187,0x7784091b^_0x41bc3f);});}}_0x3eee00[_0x59c850([0x6f,0x6e])](_0x59c850([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x5a4fb5,_0x5e89ba)=>{if(_0x5e89ba[0x0]!=_0x352f66)return _0x2ab24f(_0x59c850([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5e89ba[0x1]={..._0x5e89ba[0x1],[_0x59c850([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x440e86};},{[_0x59c850([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59c850([0x68,0x69,0x67,0x68])}),_0x3eee00[_0x59c850([0x6f,0x6e])](_0x59c850([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x61525=>{_0x265e92(_0x61525[_0x59c850([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xf09e0d=!0x0,_0x21f45d(_0x61525[_0x59c850([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x59c850([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x59c850([0x6c,0x6f,0x77])}),_0x3ef8e3[_0x59c850([0x74,0x68,0x65,0x6e])](()=>{_0xf09e0d||_0x2ab24f(_0x59c850([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4c35f9(){return _0x3eee00[_0x59c850([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59c850([0x76,0x69,0x65,0x77])][_0x59c850([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x59c850([0x61,0x75,0x74,0x6f]);}function _0x2e8953(){_0x3eee00[_0x59c850([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x59c850([0x76,0x69,0x65,0x77])][_0x59c850([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x59c850([0x61,0x75,0x74,0x6f]);}}function _0x3d1241(_0x1077ec){const _0x44b997=[new window[(_0x59c850([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x462e5c=>setTimeout(_0x462e5c,0x778ce317^_0x41bc3f)),_0x3ef8e3[_0x59c850([0x74,0x68,0x65,0x6e])](()=>new window[(_0x59c850([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x366939=>{let _0x1b3458=0x0;_0x3eee00[_0x59c850([0x6d,0x6f,0x64,0x65,0x6c])][_0x59c850([0x6f,0x6e])](_0x59c850([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0xd3f4ae,_0x4d7ba8)=>{_0x4d7ba8[0x0][_0x59c850([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1b3458++,_0x1b3458==(0x7785dc23^_0x41bc3f)&&(_0x366939(),_0xd3f4ae[_0x59c850([0x6f,0x66,0x66])]());});}))];return window[_0x59c850([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x59c850([0x72,0x61,0x63,0x65])](_0x44b997)[_0x59c850([0x74,0x68,0x65,0x6e])](()=>_0x1077ec);}async function _0x36f2fa(){await _0x3ef8e3,_0x3eee00[_0x59c850([0x6d,0x6f,0x64,0x65,0x6c])][_0x59c850([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2fe875,_0x3eee00[_0x59c850([0x6d,0x6f,0x64,0x65,0x6c])][_0x59c850([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2fe875,_0x3eee00[_0x59c850([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x59c850([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5e5f2d(){return _0x29320e(_0x59c850([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x41b6e4(_0x59c850([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x59c850([0x73,0x74,0x61,0x74,0x65])]==_0x59c850([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x305345(){return _0x29320e(_0x59c850([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 _0x2e1005(){return _0x29320e(_0x59c850([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x54ef06(_0x53c58a){const _0x3ef01b=_0x667d45();_0x3eee00[_0x3ef01b]=_0x59c850([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x53c58a,_0x53c58a!=_0x59c850([0x56,0x61,0x6c,0x69,0x64])&&_0x36f2fa();}function _0x667d45(){const _0x19ee4d=window[_0x59c850([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x59c850([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x59c850([0x6e,0x6f,0x77])]())[_0x59c850([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x59c850([0x2e]),'');let _0x55562d=_0x59c850([0x7a]);for(let _0x33b926=0x0;_0x33b926<_0x19ee4d[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x33b926+=0x2){let _0x1d96b2=window[_0x59c850([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x19ee4d[_0x59c850([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x33b926,_0x33b926+0x2));_0x1d96b2>=_0x40138a[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x1d96b2-=_0x40138a[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x55562d+=_0x40138a[_0x1d96b2];}return _0x55562d;}function _0x371be3(){const _0x592c45=_0x3daf71[_0x59c850([0x73,0x70,0x6c,0x69,0x74])](_0x59c850([0x2e]));if(0x3!=_0x592c45[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x457e8f(_0x592c45[0x1]);function _0x457e8f(_0x47bb79){const _0x1e90b2=_0x53b1a6(_0x47bb79);return _0x1e90b2&&_0xa69482()?_0x1e90b2:null;function _0xa69482(){const _0x44dd61=_0x1e90b2[_0x59c850([0x6a,0x74,0x69])],_0x3ae028=window[_0x59c850([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x44dd61[_0x59c850([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x44dd61[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x193a6c={..._0x1e90b2,[_0x59c850([0x6a,0x74,0x69])]:_0x44dd61[_0x59c850([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x44dd61[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x193a6c[_0x59c850([0x76,0x63])],_0x740243(_0x193a6c)==_0x3ae028;}}}async function _0x3e4061(){let _0x1737ea=!0x0;try{const _0x191460=_0x3daf71[_0x59c850([0x73,0x70,0x6c,0x69,0x74])](_0x59c850([0x2e])),[_0xcc9bd6,_0x41ceb1,_0x39acf3]=_0x191460;return _0x598376(_0xcc9bd6),await _0x438137(_0xcc9bd6,_0x41ceb1,_0x39acf3),_0x1737ea;}catch{return!0x1;}function _0x598376(_0x4bd2aa){const _0xe3e4b7=_0x53b1a6(_0x4bd2aa);_0xe3e4b7&&_0xe3e4b7[_0x59c850([0x61,0x6c,0x67])]==_0x59c850([0x45,0x53,0x32,0x35,0x36])||(_0x1737ea=!0x1);}async function _0x438137(_0x113389,_0x9ae353,_0x558fda){const _0x35e4eb=window[_0x59c850([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x59c850([0x66,0x72,0x6f,0x6d])](_0x5bc626(_0x558fda),_0x3f8207=>_0x3f8207[_0x59c850([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x4f54e0=new window[(_0x59c850([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x59c850([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x113389+_0x59c850([0x2e])+_0x9ae353),_0x2c2fed=window[_0x59c850([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x59c850([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x2c2fed)return;const _0x3183da=await _0x2c2fed[_0x59c850([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x59c850([0x6a,0x77,0x6b]),_0x4d0ce9,{[_0x59c850([0x6e,0x61,0x6d,0x65])]:_0x59c850([0x45,0x43,0x44,0x53,0x41]),[_0x59c850([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x59c850([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x59c850([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x2c2fed[_0x59c850([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x59c850([0x6e,0x61,0x6d,0x65])]:_0x59c850([0x45,0x43,0x44,0x53,0x41]),[_0x59c850([0x68,0x61,0x73,0x68])]:{[_0x59c850([0x6e,0x61,0x6d,0x65])]:_0x59c850([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3183da,_0x35e4eb,_0x4f54e0)||(_0x1737ea=!0x1);}}function _0x53b1a6(_0x12d4bf){return _0x12d4bf[_0x59c850([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x59c850([0x65,0x79]))?JSON[_0x59c850([0x70,0x61,0x72,0x73,0x65])](_0x5bc626(_0x12d4bf)):null;}function _0x5bc626(_0xb66a11){return window[_0x59c850([0x61,0x74,0x6f,0x62])](_0xb66a11[_0x59c850([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x59c850([0x2b]))[_0x59c850([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x59c850([0x2f])));}function _0x740243(_0xd20a52){let _0x45d77f=0x1505;function _0x55807a(_0x58b3eb){for(let _0x409609=0x0;_0x409609<_0x58b3eb[_0x59c850([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x409609++){const _0x4a1649=_0x58b3eb[_0x59c850([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x409609);_0x45d77f=(_0x45d77f<<0x5)+_0x45d77f+_0x4a1649,_0x45d77f&=_0x45d77f;}}function _0x4e009b(_0x5a5afd){Array[_0x59c850([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x5a5afd)?_0x5a5afd[_0x59c850([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4e009b):_0x5a5afd&&typeof _0x5a5afd==_0x59c850([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x59c850([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x5a5afd)[_0x59c850([0x73,0x6f,0x72,0x74])]()[_0x59c850([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x276d9b,_0x38af6b])=>{_0x55807a(_0x276d9b),_0x4e009b(_0x38af6b);}):_0x55807a(window[_0x59c850([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x5a5afd));}return _0x4e009b(_0xd20a52),_0x45d77f>>>0x0;}function _0x430cfd(_0x1ba220){return _0x1ba220[_0x59c850([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x59c850([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x59c850([0x30]));}function _0x403e59(_0x2a14e0){return _0x2a14e0[_0x59c850([0x73,0x70,0x6c,0x69,0x74])]('')[_0x59c850([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x59c850([0x6a,0x6f,0x69,0x6e])]('');}function _0x29320e(_0x530cf8){return _0x3eee00[_0x59c850([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x59c850([0x68,0x61,0x73])](_0x530cf8);}function _0x41b6e4(_0xa20f3a){return _0x3eee00[_0x59c850([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x59c850([0x67,0x65,0x74])](_0xa20f3a);}function _0x2fe875(){}function _0x59c850(_0x472763){return _0x472763['map'](_0x4d6d33=>String['fromCharCode'](_0x4d6d33))['join']('');}_0x54ef06(await _0x2be651());}(this);}['destroy'](){const _0x237107=this['editor']['plugins']['get'](o),_0x33653c=this['editor']['config']['get']('collaboration.channelId');for(const _0x12ae63 of _0x237107['getCommentThreads']({'channelId':_0x33653c}))_0x237107['_detachCommentThread'](_0x12ae63['id']),_0x237107['_threads']['delete'](_0x12ae63['id']);super['destroy']();}['hasMarkerForId'](_0xe7d2e3){return this['getAllMarkersForId'](_0xe7d2e3)['length']>0x0;}['getAllMarkersForId'](_0x58ae6f){const _0x536920=[];for(const _0x7d3686 of this['editor']['model']['markers'])_0x7d3686['name']['startsWith']('comment:'+_0x58ae6f)&&_0x536920['push'](_0x7d3686);return _0x536920;}['scrollToThreadMarker'](_0x34c125){setTimeout(()=>{const _0x2ce6d8=this['_getTargetForId'](_0x34c125);if(!_0x2ce6d8)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x34c125&&rt({'target':_0x2ce6d8[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x1a9d8c){this['editor']['model']['change'](()=>{for(const _0x2cfc1c of this['getAllMarkersForId'](_0x1a9d8c))this['editor']['editing']['reconvertMarker'](_0x2cfc1c);});}['_attachArchivedThread'](_0x346a3a){const _0x3d563e=this['editor']['plugins']['get'](o),_0xebf00c=this['editor']['plugins']['get'](b),_0x1a09e3=_0x3d563e['getCommentThread'](_0x346a3a);if(!_0x1a09e3['isAttached']){const _0x231b9e=_0x1a09e3['attachTo'](()=>this['_getTargetForId'](_0x1a09e3['id']));_0xebf00c['registerAnnotation'](_0x231b9e),_0x1a09e3['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x11d967=this['editor'],_0x2efbde=_0x11d967['plugins']['get'](st);_0x11d967['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x41c91a,_0x25ccff)=>{const {id:_0x5c9b0e}=er(_0x41c91a['markerName']),_0x43efac=_0x11d967['plugins']['get'](o)['getCommentThread'](_0x5c9b0e),_0x378b6f=this['activeMarker']&&er(this['activeMarker'])['id']===_0x5c9b0e;let _0x47a57f;if(_0x43efac&&_0x43efac['isResolved']&&!_0x378b6f&&_0x41c91a['item'])return _0x25ccff['consumable']['consume'](_0x41c91a['item'],'addMarker:'+_0x41c91a['markerName']),_0x25ccff['consumable']['consume'](_0x41c91a['item'],'removeMarker:'+_0x41c91a['markerName']),null;const _0x559335=['ck-comment-marker'];return _0x378b6f&&_0x559335['push']('ck-comment-marker--active'),_0x47a57f=_0x43efac?.['length']?_0x43efac['comments']['first']['author']['id']:_0x2efbde['me']['id'],{'classes':_0x559335,'attributes':{'data-comment':_0x5c9b0e,'data-author-id':_0x47a57f}};}}),_0x11d967['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x5e8d10,{options:_0x54ecf8})=>{if(_0x54ecf8['showCommentHighlights'])return null;const _0x187cd5=_0x11d967['plugins']['get'](o),_0x9196aa=_0x11d967['model']['markers']['get'](_0x5e8d10),{id:_0x3fd254,part:_0x8cf51f}=er(_0x5e8d10);return _0x9196aa&&!_0x9196aa['affectsData']||_0x54ecf8['ignoreResolvedComments']&&_0x187cd5['getCommentThread'](_0x3fd254)?.['isResolved']?null:{'group':'comment','name':_0x8cf51f?_0x3fd254+':'+_0x8cf51f:_0x3fd254};}}),_0x11d967['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x16d7f2,{writer:_0x27f189})=>_0x27f189['createElement']('$marker',{'data-name':'comment:'+_0x16d7f2['getAttribute']('id')})}),_0x11d967['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x37668d=this['editor'],_0x1e2d89=_0x37668d['plugins']['get'](o),_0x32f4dc=new Set(),_0x4c29ff=new Set();_0x37668d['model']['document']['registerPostFixer'](_0x241a97=>{let _0x39dec8=!0x1;for(const {name:_0x567ff8,data:_0x359bb1}of _0x37668d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x33b80c,id:_0x4ed352}=er(_0x567ff8);let _0x38f43b=_0x359bb1['newRange'];if('comment'!==_0x33b80c||!_0x38f43b)continue;const _0x466f64='$graveyard'===_0x38f43b['root']['rootName'];_0x466f64||(_0x38f43b=mt(_0x38f43b,_0x37668d['model']),!_0x38f43b||_0x38f43b['isCollapsed']||!_0x359bb1['newRange']||_0x38f43b['isEqual'](_0x359bb1['newRange']))?_0x37668d['model']['hasContent'](_0x38f43b)&&!_0x466f64?this['isThreadsLoadingPaused']?_0x32f4dc['add'](_0x567ff8):this['_handleThreadMarker'](_0x567ff8,_0x4ed352):(_0x4c29ff['add'](_0x567ff8),_0x32f4dc['delete'](_0x567ff8),_0x241a97['removeMarker'](_0x567ff8),_0x39dec8=!0x0):(_0x241a97['updateMarker'](_0x567ff8,{'range':_0x38f43b}),_0x39dec8=!0x0);}return _0x39dec8;}),this['on']('change:isThreadsLoadingPaused',(_0xa8550,_0x93a351,_0x32b2ef)=>{if(!_0x32b2ef&&_0x32f4dc['size'])for(const _0x58cd1f of _0x32f4dc){const {id:_0x1e3d9e}=er(_0x58cd1f);_0x32f4dc['delete'](_0x58cd1f),_0x37668d['model']['markers']['get'](_0x58cd1f)&&this['_handleThreadMarker'](_0x58cd1f,_0x1e3d9e);}}),this['listenTo'](_0x37668d['model']['document'],'change',()=>{for(const {name:_0x1f7eb6,data:{newRange:_0x140920}}of _0x37668d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4c8167,id:_0x239be6}=er(_0x1f7eb6);if('comment'!==_0x4c8167)continue;const _0x2a6454=_0x1e2d89['getCommentThread'](_0x239be6),_0x1d1c99=this['hasMarkerForId'](_0x239be6);_0x2a6454&&(!_0x2a6454['_hasTargetInContent']&&_0x140920&&_0x37668d['editing']['view']['once']('render',()=>{const _0x416e44=_0x37668d['plugins']['get'](y),_0x35a6f5=_0x1e2d89['_threadToController']['get'](_0x2a6454)['view'];_0x416e44['getByInnerView'](_0x35a6f5)['refreshVisibility']();},{'priority':'low'}),_0x2a6454['_hasTargetInContent']=_0x1d1c99||!!_0x140920),_0x140920||(_0x4c29ff['add'](_0x1f7eb6),_0x32f4dc['delete'](_0x1f7eb6));}for(const _0x662380 of _0x4c29ff){const {id:_0x23244a}=er(_0x662380),_0x446a54=_0x1e2d89['getCommentThread'](_0x23244a);if(_0x32f4dc['delete'](_0x662380),!_0x446a54)continue;const _0x4e791a=this['hasMarkerForId'](_0x23244a);_0x4e791a||_0x446a54['isSubmitted']?_0x4e791a||_0x446a54['unlinkedAt']||_0x446a54['setUnlinkedAt'](new Date()):_0x446a54['remove']();}_0x4c29ff['clear']();});}['_handleInitialThreads'](_0x51a214){_0x51a214['forEach'](_0x5b6008=>{_0x5b6008['unlinkedAt']&&this['_attachArchivedThread'](_0x5b6008['id']);});}['_getTargetForId'](_0x27532d){const _0x2c54dd=this['editor'],_0xe41e75=this['getAllMarkersForId'](_0x27532d);return it(_0x2c54dd['editing'],_0xe41e75);}['_getTextContext'](_0x36fa5a){const _0x4fcf91=this['getAllMarkersForId'](_0x36fa5a);let _0x5c3919='',_0x220af2=!0x1;for(const _0x2a63fa of _0x4fcf91){const _0x94c113=_0x2a63fa['getRange']();for(const _0x4fab9e of Array['from'](_0x94c113['getItems']()))_0x4fab9e['is']('$textProxy')?(_0x5c3919&&_0x220af2&&(_0x5c3919+='\x20',_0x220af2=!0x1),_0x5c3919+=_0x4fab9e['data']):_0x220af2=!0x0;_0x220af2=!0x0;}return _0x5c3919['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x1da107,_0x28d9e4){const _0x44096b=this['editor'],_0x4ee142=_0x44096b['plugins']['get'](o);let _0x47aa73=_0x4ee142['getCommentThread'](_0x28d9e4);const _0x2b8d2b=_0x44096b['config']['get']('collaboration.channelId'),_0x564891=_0x44096b['plugins']['get'](b);if(_0x47aa73&&(_0x47aa73['unlinkedAt']&&_0x47aa73['setUnlinkedAt'](null),_0x47aa73['isAttached']))return _0x47aa73;return!this['getAllMarkersForId'](_0x28d9e4)[0x0]['managedUsingOperations']?_0x44096b['editing']['view']['once']('render',()=>{if(_0x4ee142['getCommentThread'](_0x28d9e4))return;const _0x56fbf3=_0x44096b['plugins']['get'](y);_0x47aa73=_0x4ee142['openNewCommentThread']({'channelId':_0x2b8d2b,'threadId':_0x28d9e4,'target':()=>this['_getTargetForId'](_0x28d9e4),'context':{'type':'text','value':this['_getTextContext'](_0x28d9e4)}});const _0x2ffcd5=_0x4ee142['_threadToController']['get'](_0x47aa73)['view'],_0x42a6db=_0x56fbf3['getByInnerView'](_0x2ffcd5);_0x42a6db&&_0x564891['registerAnnotation'](_0x42a6db);},{'priority':'low'}):_0x4ee142['fetchCommentThread']({'channelId':_0x2b8d2b,'threadId':_0x28d9e4})['then'](_0x395bcc=>{if('destroyed'!==_0x44096b['state']){if(_0x47aa73=_0x395bcc,_0x47aa73&&!_0x47aa73['isAttached']){const _0x5d9171=_0x47aa73['attachTo'](()=>this['_getTargetForId'](_0x28d9e4));_0x564891['registerAnnotation'](_0x5d9171),_0x47aa73['isResolved']&&this['_reconvertMarkers'](_0x28d9e4);}else{if(!_0x47aa73){const _0x118f4b=this['getAllMarkersForId'](_0x28d9e4);_0x44096b['model']['change'](_0x1e93ef=>{for(const _0x1d21b3 of _0x118f4b)_0x1e93ef['removeMarker'](_0x1d21b3);});}}}}),_0x47aa73;}['_handleThreadMarker'](_0x329055,_0x285906){const _0x5d2aee=this['_attachMarkerToThread'](_0x329055,_0x285906);_0x5d2aee&&!_0x5d2aee['context']&&_0x5d2aee['setContext']({'type':'text','value':this['_getTextContext'](_0x285906)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1d4943=this['editor'];et(_0x1d4943['model'],({left:_0x7f4b02,entered:_0x5b5ce6})=>{for(const _0x52442e of _0x7f4b02)if(ht(_0x52442e)){_0x1d4943['ui']['ariaLiveAnnouncer']['announce'](N(_0x1d4943['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x3754c8 of _0x5b5ce6)if(ht(_0x3754c8)){_0x1d4943['ui']['ariaLiveAnnouncer']['announce'](N(_0x1d4943['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x499ba6)));break;}});}}function dt(_0x2fbd73,_0x4774ec){return _0x4774ec?_0x2fbd73+':'+_0x4774ec:_0x2fbd73;}function er(_0x4dffeb){const _0x2d6222=_0x4dffeb['split'](':');return{'group':_0x2d6222[0x0],'id':_0x2d6222[0x1],'part':_0x2d6222[0x2]};}function mt(_0x1293fb,_0x38be8e){const _0x5e126d=_0x38be8e['schema'],_0x3c0171=_0x38be8e['createRange'](_0x1293fb['start']);for(const _0x3a1c94 of _0x1293fb['getWalker']()){const {type:_0x286bc2,item:_0x2a50eb,nextPosition:_0x9e1a3f}=_0x3a1c94;if('text'===_0x286bc2||_0x5e126d['isObject'](_0x2a50eb)){const _0x10899d=_0x38be8e['createPositionBefore'](_0x2a50eb);_0x3c0171['isCollapsed']&&(_0x3c0171['start']=_0x10899d),_0x3c0171['end']=_0x9e1a3f;}}return _0x3c0171;}function ht(_0x23f360){return'comment'===er(_0x23f360['name'])['group'];}class s extends _0x12c5b0{['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 _0x4819e8=this['editor'],_0x4eb111=_0x4819e8['plugins']['get'](o),_0x5d422d=_0x4819e8['plugins']['get'](r),_0x1648b4=_0x4819e8['plugins']['get'](y),_0x242e59=_0x4819e8['plugins']['get'](b);_0x4819e8['ui']['componentFactory']['add']('comment',()=>{const _0x5cb41a=this['_createUIButton'](_0x256289);return _0x5cb41a['tooltip']=!0x0,_0x5cb41a;}),_0x4819e8['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5439bf)),_0x242e59['addSourceCollector'](()=>{const _0x59b051=[];for(const [_0x2b0a0d,_0x26917a]of _0x4eb111['_threadToController']){const _0x34f538=_0x5d422d['getAllMarkersForId'](_0x2b0a0d['id']),_0x8c61dd=_0x34f538['map'](_0x4951e9=>_0x4951e9['getRange']());_0x34f538['length']>0x0&&_0x59b051['push']([_0x26917a['view'],_0x8c61dd]);}return _0x59b051;}),this['listenTo'](_0x1648b4,'change:activeAnnotations',(_0x5527d4,_0x5a48d9,_0x55a06c)=>{const _0x15f7b0=Array['from'](_0x55a06c)['map'](_0x2a5d22=>_0x2a5d22['innerView'])['find'](_0x268a5d=>_0x4eb111['_viewToController']['has'](_0x268a5d));if(!_0x15f7b0)return void(_0x5d422d['activeMarker']=null);const _0x22eed9=_0x4eb111['_viewToController']['get'](_0x15f7b0)['model']['id'],_0x1c3d76='comment:'+_0x22eed9;_0x22eed9&&_0x5d422d['hasMarkerForId'](_0x22eed9)?_0x5d422d['activeMarker']=_0x1c3d76:_0x5d422d['activeMarker']&&(_0x5d422d['activeMarker']=null);}),this['listenTo'](_0x4eb111,'removeCommentThread',(_0x497987,{threadId:_0x4d6ed3,isFromAdapter:_0x446457})=>{!_0x446457&&_0x4819e8['ui']['focusTracker']['isFocused']&&_0x5d422d['hasMarkerForId'](_0x4d6ed3)&&_0x4819e8['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4eb111,'addComment',(_0x432e37,{threadId:_0x766ce5,isFromAdapter:_0x257797})=>{if(_0x257797||!_0x5d422d['hasMarkerForId'](_0x766ce5)||!_0x4eb111['hasCommentThread'](_0x766ce5))return;0x1===_0x4eb111['getCommentThread'](_0x766ce5)['length']&&(_0x4819e8['editing']['view']['focus'](),_0x432e37['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x2c3866=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1bba1d;for(const _0x492f40 in _0x2c3866){const _0x55c8e4=_0x492f40,_0x2481bc=_0x2c3866[_0x55c8e4];if('commentsLicenseKeyValid'==_0x2481bc||'commentsLicenseKeyInvalid'==_0x2481bc||'commentsLicenseKeyExpired'==_0x2481bc||'commentsLicenseKeyDomainLimit'==_0x2481bc||'commentsLicenseKeyNotAllowed'==_0x2481bc||'commentsLicenseKeyEvaluationLimit'==_0x2481bc||'commentsLicenseKeyTrialLimit'==_0x2481bc||'commentsLicenseKeyUsageLimit'==_0x2481bc){delete _0x2c3866[_0x55c8e4],_0x1bba1d=_0x2481bc,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1bba1d&&_0x2c3866['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1bba1d&&_0x2c3866['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1bba1d&&_0x2c3866['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1bba1d&&_0x2c3866['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1bba1d&&_0x2c3866['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1bba1d&&_0x2c3866['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x1bba1d&&_0x2c3866['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x566ef5){const _0x43c9ef=this['editor'],_0x4c6b02=new _0x566ef5(_0x43c9ef['locale']),_0x433699=_0x43c9ef['commands']['get']('addCommentThread');return _0x4c6b02['set']({'label':N(_0x43c9ef['locale'],'Comment'),'icon':_0x3d9dd9}),_0x4c6b02['bind']('isEnabled')['to'](_0x433699,'hasContent'),this['listenTo'](_0x4c6b02,'execute',()=>{_0x433699['execute']();}),_0x4c6b02;}}class i extends _0x12c5b0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x534444){super(_0x534444),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x319c5d,_0x29af36,_0x7a800a)=>{_0x7a800a?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x23b877,_0x4eb1ba]of this['editor']['commands'])_0x4eb1ba['affectsData']&&'addCommentThread'!==_0x23b877&&_0x4eb1ba['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4b36b4=this['editor']['editing']['view']['document'];this['listenTo'](_0x4b36b4,'cut',_0x2eba2b=>_0x2eba2b['stop'](),{'priority':'highest'}),this['listenTo'](_0x4b36b4,'clipboardInput',_0x5bc817=>_0x5bc817['stop'](),{'priority':'highest'}),this['listenTo'](_0x4b36b4,'delete',_0x4097bb=>_0x4097bb['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3fcec3,_0x1e18a1]of this['editor']['commands'])_0x1e18a1['affectsData']&&'addCommentThread'!==_0x3fcec3&&_0x1e18a1['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 _0x3e7d33{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x52befd){super(_0x52befd),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x3bfda9=this['context']['plugins']['get'](y);this['listenTo'](_0x3bfda9,'_activateAnnotation',(_0x2904ce,_0x45f178)=>{for(const _0xa4dbbd of this['activeUIs']){const _0x402031=this['_uis']['get'](_0xa4dbbd);(0x0,this['uisData']['get'](_0xa4dbbd)['filter'])(_0x45f178)&&_0x402031['setActiveAnnotation'](_0x45f178);}}),this['listenTo'](_0x3bfda9,'_deactivateAllAnnotations',()=>{for(const _0x121201 of this['activeUIs']){this['_uis']['get'](_0x121201)['setActiveAnnotation'](null);}}),this['listenTo'](_0x3bfda9['_visibleAnnotations'],'add',(_0x43e55c,_0x90e4d7)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x90e4d7);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4464e9){return this['activeUIs']['has'](_0x4464e9);}['activate'](_0x453e2a,_0x71c50f=this['defaultFilter']){const _0x48edef=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x453e2a))throw new _0x1a89d7('annotationsuis-missing-ui',this,{'uiName':_0x453e2a});this['isActive'](_0x453e2a)&&this['deactivate'](_0x453e2a),this['activeUIs']['add'](_0x453e2a);const _0x4ae9fa=new S();v({'source':_0x48edef['_visibleAnnotations'],'target':_0x4ae9fa,'filter':_0x71c50f}),this['uisData']['set'](_0x453e2a,{'collection':_0x4ae9fa,'filter':_0x71c50f});const _0x3c70b3=this['_uis']['get'](_0x453e2a);_0x3c70b3['attach'](_0x4ae9fa),this['listenTo'](_0x3c70b3,'change:activeAnnotation',(_0x750457,_0x5e3ce8,_0x3aee5e,_0x53886b)=>{_0x53886b&&_0x48edef['_removeActiveAnnotation'](_0x53886b),_0x3aee5e&&_0x48edef['_addActiveAnnotation'](_0x3aee5e);});}['deactivate'](_0x373400){if(this['activeUIs']['delete'](_0x373400),!this['_uis']['has'](_0x373400))throw new _0x1a89d7('annotationsuis-missing-ui',this,{'uiName':_0x373400});const _0x5847d0=this['_uis']['get'](_0x373400);_0x5847d0['detach'](),this['stopListening'](_0x5847d0),this['uisData']['get'](_0x373400)['collection']['destroy'](),this['uisData']['delete'](_0x373400);}['switchTo'](_0x338c29){if(!this['_uis']['has'](_0x338c29))throw new _0x1a89d7('annotationsuis-missing-ui',this,{'uiName':_0x338c29});const _0x49c6c8=this['context']['plugins']['get'](y),_0x21cd19=Array['from'](_0x49c6c8['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x338c29);const _0x1acc6b=this['_uis']['get'](_0x338c29);_0x1acc6b['setActiveAnnotation'](_0x21cd19),_0x1acc6b['_setSelectedAnnotations']&&_0x21cd19&&_0x1acc6b['_setSelectedAnnotations']([_0x21cd19]);}['deactivateAll'](){for(const _0xb94252 of this['activeUIs'])this['deactivate'](_0xb94252);}['register'](_0x2d436c,_0x3c198f){if(this['_uis']['has'](_0x2d436c))throw new _0x1a89d7('annotationsuis-register-already-registered');if('function'!=typeof _0x3c198f['attach']||'function'!=typeof _0x3c198f['detach']||'function'!=typeof _0x3c198f['setActiveAnnotation'])throw new _0x1a89d7('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2d436c,_0x3c198f);}['refilterAnnotations'](){const _0x4f1bc8=this['context']['plugins']['get'](y)['collection'],_0x3d88cc=new Map(),_0x39a029=Array['from'](this['activeUIs']);for(const _0x35480a of this['activeUIs']){const _0x2597e5=this['uisData']['get'](_0x35480a)['collection'];for(const _0x5d4712 of _0x2597e5)_0x3d88cc['set'](_0x5d4712,_0x35480a);}for(const _0x359be9 of _0x4f1bc8){const _0x1eb9cc=_0x3d88cc['get'](_0x359be9);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x359be9);const _0x4f7953=_0x39a029['find'](_0x34405d=>this['uisData']['get'](_0x34405d)['filter'](_0x359be9));_0x1eb9cc!==_0x4f7953&&(_0x1eb9cc&&this['uisData']['get'](_0x1eb9cc)['collection']['remove'](_0x359be9),_0x4f7953&&this['uisData']['get'](_0x4f7953)['collection']['add'](_0x359be9));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x54e65d){const _0x26de95=[];for(const _0x2f9100 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2f9100)['filter'])(_0x54e65d)&&_0x26de95['push'](_0x2f9100);}if(_0x26de95['length']>0x1)throw new _0x1a89d7('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x26de95,'annotationType':_0x54e65d['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Dt('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x4ee8bb){super(_0x4ee8bb);const _0x359fca=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 _0x2908b5(),this['focusCycler']=new _0x65e88({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x359fca['to']('class')],'style':{'minHeight':_0x359fca['to']('minHeight',_0xd315b2=>'number'==typeof _0xd315b2?_i(_0xd315b2+0xa):null)},'dir':_0x4ee8bb['uiLanguageDirection'],'role':'application','aria-label':N(_0x4ee8bb,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x4ee8bb,'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',_0x4e8403=>{this['_updateItemPositionInFocusables'](_0x4e8403['source']);}),this['list']['forEach'](_0x1175a4=>{this['focusTracker']['add'](_0x1175a4['element']),this['_updateItemPositionInFocusables'](_0x1175a4);}),this['list']['on']('change',(_0x9778cf,_0x52b9f3)=>{for(const _0x3e9fe1 of _0x52b9f3['removed'])this['focusTracker']['remove'](_0x3e9fe1['element']),this['focusables']['remove'](_0x3e9fe1);for(const _0x519204 of _0x52b9f3['added'])this['focusTracker']['add'](_0x519204['element']),this['_updateItemPositionInFocusables'](_0x519204);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5d310d){const _0x3c0da6=this['focusables']['getIndex'](_0x5d310d);let _0x1c303b,_0x58dc9b;for(const _0x540c52 of this['focusables'])if(_0x5d310d['top']<_0x540c52['top']){_0x1c303b=_0x540c52;break;}if(_0x58dc9b=_0x1c303b?this['focusables']['getIndex'](_0x1c303b):this['focusables']['length'],-0x1!==_0x3c0da6){if(_0x3c0da6===_0x58dc9b-0x1)return;this['focusables']['remove'](_0x5d310d),_0x58dc9b=_0x1c303b?this['focusables']['getIndex'](_0x1c303b):this['focusables']['length'];}this['focusables']['add'](_0x5d310d,_0x58dc9b);}}const Ht=/* #__PURE__ -- @preserve */
|
|
33
|
+
Dt('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5449a9){super(_0x5449a9),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x406c0c,_0x520edb)=>_0x406c0c+_0x520edb),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x332e56=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x332e56['to']('isAnimationDisabled',_0x3acd0b=>_0x3acd0b?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x332e56['to']('top',_0x160a3f=>Ht(_0x160a3f))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x359be8=this['element']['clientHeight'];_0x359be8&&(this['height']=_0x359be8);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3e7d33{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x38db21){super(_0x38db21),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 _0x1eaeaf=this['context']['config']['get']('sidebar.container');_0x1eaeaf&&this['setContainer'](_0x1eaeaf);}['setContainer'](_0x3d805c){if(!g(_0x3d805c))throw new _0x1a89d7('sidebar-setcontainer-invalid-element');this['container']=_0x3d805c;}['_attachToContainer']({viewClass:_0x55c06a='',spaceBetweenItems:_0x5055d0=0x19}={}){if(!g(this['container']))throw new _0x1a89d7('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x55c06a,this['_spaceBetweenItems']=_0x5055d0;}['rearrange']({removedAnnotation:_0x1dd445,previousAnnotation:_0x5d2d54,nextAnnotation:_0x1f53b2}){const _0x327aa3=this['getSidebarItemView'](_0x1dd445);this['view']['list']['remove'](_0x327aa3),this['_destroySidebarItemView'](_0x1dd445),_0x5d2d54&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5d2d54)),_0x1f53b2&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1f53b2)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0xd47ee5,activatedAnnotation:_0x3f432d,disableAnimationOnActivatedAnnotation:_0x81fcee}){if(this['_activeAnnotation']=_0x3f432d,_0xd47ee5){_0xd47ee5['isActive']=!0x1;const _0x342e4d=this['getSidebarItemView'](_0xd47ee5);_0x342e4d&&_0x81fcee&&(_0x342e4d['isAnimationDisabled']=!0x1);}if(_0x3f432d){const _0x135036=this['getSidebarItemView'](_0x3f432d);_0x135036&&(_0x3f432d['isActive']=!0x0,_0x81fcee&&(_0x135036['isAnimationDisabled']=!0x0,_0x135036['top']+=0x1),this['_alignToTargetRect'](_0x135036));}}['_detachFromContainer'](_0x1bfce9){if(this['view']['element']['remove'](),_0x1bfce9){for(const _0x77c7f5 of _0x1bfce9)this['_destroySidebarItemView'](_0x77c7f5);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x25d6e2,_0x1d2544){_0x1d2544||(_0x1d2544=_0x25d6e2['view']);const _0x3aa67d=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3aa67d,_0x25d6e2),this['_annotationToSidebarItemView']['set'](_0x25d6e2,_0x3aa67d),_0x3aa67d['content']['add'](_0x1d2544),this['listenTo'](_0x25d6e2['view'],'change:targetRect',(_0x54bec3,_0x1f3e0a,_0x24086b)=>{const _0x4c5324=this['_getTargetTop'](_0x25d6e2,_0x24086b);_0x3aa67d['_targetTop']!=_0x4c5324&&(_0x3aa67d['_targetTop']=_0x4c5324,this['_setItemTop'](_0x3aa67d,_0x4c5324));}),this['listenTo'](_0x3aa67d,'change:top',()=>{this['_recalculate'](_0x3aa67d,'top');}),this['listenTo'](_0x3aa67d,'change:bottom',()=>{this['_recalculate'](_0x3aa67d,'bottom');}),this['_alignToTargetRect'](_0x3aa67d);const _0x6e4c9a=this['_getItemBefore'](_0x3aa67d);if(_0x6e4c9a)this['_alignAfterItem'](_0x6e4c9a,_0x3aa67d)||this['_alignToTargetRect'](_0x3aa67d);else this['_alignToTargetRect'](_0x3aa67d);return this['_updateLastItem'](),this['view']['list']['add'](_0x3aa67d),_0x3aa67d;}['_alignForTopChange'](_0x38e1d6){if(!_0x38e1d6['content']['length'])return;const _0x46c98a=this['_getItemBefore'](_0x38e1d6);if(!_0x46c98a)return;const _0x18f8f4=this['_sidebarItemViewToAnnotation']['get'](_0x46c98a),_0x13b000=this['_activeAnnotation'];_0x13b000&&_0x13b000===_0x18f8f4?this['_alignAfterItem'](_0x46c98a,_0x38e1d6):this['_alignBeforeItem'](_0x38e1d6,_0x46c98a);}['_alignForBottomChange'](_0x55917f){if(!_0x55917f['content']['length'])return;const _0x306d22=this['_getItemAfter'](_0x55917f);if(!_0x306d22)return;const _0x54bfb4=this['_sidebarItemViewToAnnotation']['get'](_0x306d22),_0x3c82c4=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x44e614=this['_activeAnnotation'];_0x44e614&&_0x44e614===_0x54bfb4&&_0x3c82c4?(this['_alignBeforeItem'](_0x306d22,_0x55917f),this['_alignAfterItem'](_0x55917f,_0x306d22)):_0x44e614&&_0x44e614===_0x54bfb4?this['_alignBeforeItem'](_0x306d22,_0x55917f):this['_alignAfterItem'](_0x55917f,_0x306d22);}['_recalculate'](_0x7d7b7,_0x3f63ab){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x469d23,changedProp:_0x23adc8}of this['_recalculateBuffer'])'top'===_0x23adc8?this['_alignForTopChange'](_0x469d23):this['_alignForBottomChange'](_0x469d23);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x7d7b7,'changedProp':_0x3f63ab});}['getSidebarItemView'](_0x1de8ba){return this['_annotationToSidebarItemView']['get'](_0x1de8ba);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x2b11e6){const _0x1848d8=this['getSidebarItemView'](_0x2b11e6);this['stopListening'](_0x1848d8),this['stopListening'](_0x2b11e6['view']),_0x1848d8['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x2b11e6),this['_sidebarItemViewToAnnotation']['delete'](_0x1848d8);}['_createSidebarView'](){const _0x33b506=new H(this['context']['locale']);return _0x33b506['render'](),this['on']('change:_lastItem',(_0x222a0f,_0x4f4d54,_0x3bdf2f,_0x489d)=>{_0x489d&&_0x33b506['unbind']('minHeight'),_0x3bdf2f?_0x33b506['bind']('minHeight')['to'](_0x3bdf2f,'bottom'):_0x33b506['minHeight']=null;}),_0x33b506;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x11d78e){const _0x2c3fe3=this['_sidebarItemViewToAnnotation']['get'](_0x11d78e),_0x17838d=_0x2c3fe3&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2c3fe3)-0x1);return _0x17838d&&this['getSidebarItemView'](_0x17838d)||null;}['_getItemAfter'](_0xe8c7de){const _0xd44fc=this['_sidebarItemViewToAnnotation']['get'](_0xe8c7de),_0x15b727=_0xd44fc&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xd44fc)+0x1);return _0x15b727&&this['getSidebarItemView'](_0x15b727)||null;}['_alignBeforeItem'](_0x3c5977,_0x5808c1){_0x3c5977['updateHeight']();const _0x41c51a=G(_0x5808c1['bottom']+this['_spaceBetweenItems'],_0x3c5977['top']);return!!_0x41c51a&&(this['_setItemTop'](_0x5808c1,_0x5808c1['top']-_0x41c51a),!0x0);}['_alignAfterItem'](_0x313b9c,_0x57bfcf){_0x313b9c['updateHeight']();const _0x5ef47e=G(_0x313b9c['bottom']+this['_spaceBetweenItems'],_0x57bfcf['top']);return!!_0x5ef47e&&(this['_setItemTop'](_0x57bfcf,_0x57bfcf['top']+_0x5ef47e,!0x1),!0x0);}['_alignToTargetRect'](_0x5485c4){const _0x48ac3f=this['_sidebarItemViewToAnnotation']['get'](_0x5485c4);if(!_0x48ac3f||!_0x48ac3f['target']||!_0x48ac3f['targetRect'])return;const _0x48093f=this['_getTargetTop'](_0x48ac3f,_0x48ac3f['targetRect']);this['_setItemTop'](_0x5485c4,_0x48093f);}['_getTargetTop'](_0x264880,_0x10c14a){if(null===_0x10c14a)return 0x0;if(_0x264880['target']instanceof _0x8a9a03)return _0x10c14a['top'];{const _0x305b48=new _0x8a9a03(this['view']['element'])['top'];return _0x10c14a['top']-_0x305b48;}}['_setItemTop'](_0x46fc55,_0x5598f7,_0x5a9d0e=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x5a9d0e&&(_0x5598f7=Math['max'](_0x5598f7,this['_getMaxAvailableTop'](_0x46fc55))),_0x46fc55['top']=_0x5598f7;}['_getMaxAvailableTop'](_0x22f3f9){let _0x4e49e0=this['_getItemBefore'](_0x22f3f9),_0x4de00f=0x0;for(;_0x4e49e0;)_0x4e49e0['updateHeight'](),_0x4de00f+=this['_spaceBetweenItems']+_0x4e49e0['height'],_0x4e49e0=this['_getItemBefore'](_0x4e49e0);return _0x4de00f;}}function G(_0x2d8e26,_0x3174d3){return Math['max'](_0x2d8e26-_0x3174d3,0x0);}function g(_0x18b867){return null!==_0x18b867&&'object'==typeof _0x18b867&&0x1===_0x18b867['nodeType'];}class e extends _0x3e7d33{['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(_0xa208a6){super(_0xa208a6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5f19bf(),this['_refreshPositioningDebounced']=_0x533f2f(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x4eebff=this['context']['plugins']['get'](j),_0x9743f7=this['context']['plugins']['get'](z);_0x4eebff['register']('wideSidebar',this),_0x9743f7['container']&&_0x4eebff['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x475d1e){if(_0x475d1e===this['activeAnnotation'])return;const _0x169551=this['context']['plugins']['get'](z);_0x169551['_activeAnnotation']=_0x475d1e;const _0x501b00=this['activeAnnotation'];_0x169551['refresh']({'blurredAnnotation':_0x501b00,'activatedAnnotation':_0x475d1e}),this['activeAnnotation']=_0x475d1e;}['attach'](_0x294867){this['annotations']=_0x294867;const _0x3334df=this['context']['plugins']['get'](z);if(_0x3334df['_annotations']=_0x294867,this['isAttached'])throw new _0x1a89d7('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3334df,'set:container',()=>{this['detach'](),this['listenTo'](_0x3334df,'change:container',_0x20abac=>{_0x20abac['off'](),this['attach'](_0x294867);});}),_0x3334df['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x299f0c=_0x5026da=>{_0x5026da['updateTargetRect'](),_0x3334df['addAnnotation'](_0x5026da);};for(const _0x20369c of _0x294867)_0x299f0c(_0x20369c);this['listenTo'](_0x294867,'add',(_0x295e05,_0x248e9e)=>{_0x299f0c(_0x248e9e);}),this['listenTo'](_0x294867,'remove',(_0x5360f8,_0x5b7a88,_0x30ea5a)=>{_0x3334df['rearrange']({'removedAnnotation':_0x5b7a88,'previousAnnotation':_0x294867['get'](_0x30ea5a-0x1),'nextAnnotation':_0x294867['get'](_0x30ea5a+0x1)}),_0x5b7a88===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x294867,'focus',(_0x512a17,_0x3d7ac1)=>{this['setActiveAnnotation'](_0x3d7ac1);}),this['listenTo'](_0x294867,'blur',()=>{this['setActiveAnnotation'](null);});const _0x22f7e5=this['context']instanceof _0x35cd01?this['context']['editors']:new _0x5f19bf([this['context']]);for(const _0x3ae3d6 of _0x22f7e5)this['_integrateWithEditorAnnotations'](_0x3ae3d6);this['listenTo'](_0x22f7e5,'add',(_0x5777a6,_0x1f3ee8)=>{this['listenTo'](_0x1f3ee8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1f3ee8);});}),this['listenTo'](_0x22f7e5,'remove',(_0x2a6cb1,_0x2cf814)=>{_0x2cf814['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2cf814['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x1a89d7('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x595051=this['context']['plugins']['get'](z);_0x595051['_detachFromContainer'](this['annotations']),this['stopListening'](_0x595051),this['stopListening'](this['annotations']),this['context']instanceof _0x35cd01&&this['stopListening'](this['context']['editors']);for(const _0x4e5676 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4e5676);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x885d82){if(!_0x885d82['plugins']['has']('EditorAnnotations'))return;const _0x49622f=_0x885d82['plugins']['get']('EditorAnnotations'),_0x368c49=()=>{const _0x2be5b3=_0x49622f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2be5b3[0x0]||null);};this['listenTo'](_0x49622f,'refresh',_0x368c49),this['listenTo'](_0x49622f,'blur',(_0x2564f6,{isAnnotationTracked:_0x5430af})=>{this['activeAnnotation']&&_0x5430af(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x49622f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5144ba=>{_0x49622f['hasDomSelection']()&&(_0x368c49(),_0x5144ba['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x49622f);}['_destroyEditorAnnotationsIntegration'](_0x36cac8){this['stopListening'](_0x36cac8),this['_editorAnnotations']['remove'](_0x36cac8);}}class C extends _0x256289{['counterView'];constructor(_0x1f0213){super(_0x1f0213);const _0x10c9ad=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x276e04,_0x14ca2c)=>_0x276e04?'...':_0x14ca2c['toString']()),this['set']('annotationType',''),this['icon']=_0x3d9dd9,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x10c9ad['to']('annotationType',_0x278d04=>'ck-annotation-counter__badge--'+_0x278d04),_0x10c9ad['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x10c9ad['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3e7d33{['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(_0x517595){super(_0x517595),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x56375c())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5f19bf(),this['_refreshPositioningDebounced']=_0x533f2f(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3f9d39(this['context']['locale']),this['balloonPanelView']=new _0x2d9178(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2c2e16){this['annotations']=_0x2c2e16;const _0x5bbd1c=this['context']['plugins']['get'](z),_0x19e04c=this['balloonPanelView'];if(_0x5bbd1c['_annotations']=_0x2c2e16,this['isAttached'])throw new _0x1a89d7('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5bbd1c,'set:container',()=>{this['detach'](),this['listenTo'](_0x5bbd1c,'change:container',_0x3a29a2=>{_0x3a29a2['off'](),this['attach'](_0x2c2e16);});}),_0x5bbd1c['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x42e315=_0x142231=>{const _0x531835=new C(this['context']['locale']);_0x5bbd1c['addAnnotation'](_0x142231,_0x531835),this['_annotationToNarrowView']['set'](_0x142231,_0x531835),_0x531835['bind']('isDirty','annotationType','number')['to'](_0x142231['view'],'isDirty','type','length'),_0x531835['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x19e04c['content']['first']!==_0x142231['view']?(this['_showBalloon'](_0x142231),_0x142231['view']['element']['focus'](),this['setActiveAnnotation'](_0x142231)):this['setActiveAnnotation'](null);});};for(const _0x100962 of _0x2c2e16)_0x42e315(_0x100962);this['listenTo'](_0x2c2e16,'add',(_0x3e7c83,_0x34af15)=>{_0x42e315(_0x34af15);}),this['listenTo'](_0x2c2e16,'remove',(_0x3933a0,_0x42a725,_0x413431)=>{this['_annotationToNarrowView']['get'](_0x42a725)['destroy'](),this['_annotationToNarrowView']['delete'](_0x42a725),_0x5bbd1c['rearrange']({'removedAnnotation':_0x42a725,'previousAnnotation':_0x2c2e16['get'](_0x413431-0x1),'nextAnnotation':_0x2c2e16['get'](_0x413431+0x1)}),_0x42a725===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2c2e16,'focus',(_0x27fdd8,_0x214602)=>{this['setActiveAnnotation'](_0x214602);}),this['listenTo'](_0x2c2e16,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x20a533,_0x1ad062)=>{_0x1ad062['keyCode']===_0x2c9b65['esc']&&_0x19e04c['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x19e04c['content']['first']),this['_hideBalloon'](),_0x1ad062['stopPropagation'](),_0x1ad062['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x201489,_0x1f5615)=>{const _0x19ef03=_0x1f5615['target'];_0x19e04c['isVisible']&&_0x19e04c['element']['contains'](_0x19ef03)||_0x5bbd1c['view']['element']['contains'](_0x19ef03)||_0x201489['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x55d62a=>_0x55d62a['contains'](_0x19ef03))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x4653c5=this['context']instanceof _0x35cd01?this['context']['editors']:new _0x5f19bf([this['context']]);for(const _0x14a61b of _0x4653c5)this['_integrateWithEditorAnnotations'](_0x14a61b);this['listenTo'](_0x4653c5,'add',(_0x3ef0ec,_0x373ff7)=>{this['listenTo'](_0x373ff7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x373ff7);});}),this['listenTo'](_0x4653c5,'remove',(_0x34a5de,_0x4a513d)=>{_0x4a513d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4a513d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x3b6fb9){if(_0x3b6fb9===this['activeAnnotation'])return;const _0x4efbf4=this['context']['plugins']['get'](z);if(_0x4efbf4['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x3b6fb9,'disableAnimationOnActivatedAnnotation':!0x0}),_0x3b6fb9)_0x4efbf4['getSidebarItemView'](_0x3b6fb9)?this['_showBalloon'](_0x3b6fb9):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x3b6fb9;}['detach'](){if(!this['isAttached'])throw new _0x1a89d7('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x9960e8=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x446c43=>_0x446c43['destroy']()),this['_annotationToNarrowView']['clear'](),_0x9960e8['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x35cd01&&this['stopListening'](this['context']['editors']);for(const _0x4043fa of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4043fa);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'](_0x430993){if(!_0x430993['plugins']['has']('EditorAnnotations'))return;const _0x484817=_0x430993['plugins']['get']('EditorAnnotations'),_0x229dce=this['context']['plugins']['get'](z),_0x4915e7=this['annotations'],_0x4b5dd1=this['balloonPanelView'],_0x3356f8=()=>{const _0x350ef9=_0x484817['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x350ef9),this['setActiveAnnotation'](_0x350ef9[0x0]||null);};this['listenTo'](_0x484817,'refresh',_0x3356f8),this['listenTo'](_0x484817,'blur',(_0x5ed999,{isAnnotationTracked:_0x5b0d49})=>{this['activeAnnotation']&&_0x5b0d49(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x484817,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4915e7,'blur',_0x538a96=>{_0x484817['hasDomSelection']()&&_0x538a96['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x3d7381,_0x22e61a)=>{const _0xe8433a=_0x22e61a['target'];_0x4b5dd1['isVisible']&&_0x4b5dd1['element']['contains'](_0xe8433a)||_0x229dce['view']['element']['contains'](_0xe8433a)||this['activeAnnotation']&&_0x484817['hasDomSelection']()&&(_0x3356f8(),_0x3d7381['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x484817);}['_destroyEditorAnnotationsIntegration'](_0x2ace9e){_0x2ace9e&&(this['stopListening'](_0x2ace9e),this['_editorAnnotations']['remove'](_0x2ace9e));}['_setSelectedAnnotations'](_0x5d5a3a){for(const _0x4482c6 of this['_selectedAnnotations'])_0x5d5a3a['includes'](_0x4482c6)||this['_manuallyClosedAnnotationViews']['delete'](_0x4482c6['view']);this['_selectedAnnotations']=_0x5d5a3a;}['_refreshPositioning'](){const _0x1c1a46=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x1c1a46['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x320a80){if(this['_manuallyClosedAnnotationViews']['has'](_0x320a80['view']))return;const _0xe2a924=this['balloonPanelView']['content']['first'];_0xe2a924!==_0x320a80['view']?(_0xe2a924&&this['_detachListeners'](_0xe2a924),this['_attachListeners'](_0x320a80['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x320a80['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x227c2f=this['balloonPanelView']['content']['first'],_0x448b6d=_0x227c2f&&this['annotations']['getByView'](_0x227c2f);if(!_0x448b6d||!this['_annotationToNarrowView']['has'](_0x448b6d))return;const _0x51d981=this['_annotationToNarrowView']['get'](_0x448b6d)['element'],_0x454d2c=(function(){const _0x5b84bc=_0x2d9178['defaultPositions'];return[_0x5b84bc['southArrowNorthEast'],_0x5b84bc['northArrowSouthEast'],_0x5b84bc['southArrowNorth'],_0x5b84bc['northArrowSouth'],_0x5b84bc['southArrowNorthWest'],_0x5b84bc['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x51d981,'positions':_0x454d2c});}['_hideBalloon'](){const _0x5123aa=this['balloonPanelView'],_0x359c14=_0x5123aa['content']['first'];_0x359c14&&(this['_detachListeners'](_0x359c14),_0x5123aa['unpin'](),_0x5123aa['content']['clear']());}['_attachListeners'](_0x30a242){this['listenTo'](_0x30a242,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x30a242,'Esc',(_0x58f791,_0x18adab)=>{this['_manuallyClosedAnnotationViews']['add'](_0x30a242),this['_hideBalloon'](),_0x18adab();});}['_detachListeners'](_0xfd721d){this['stopListening'](_0xfd721d);}}class c extends _0x12c5b0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x1d966f,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4073c9){super(_0x4073c9),_0x4073c9['editing']['view']['addObserver'](_0x40b919),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4073c9['plugins']['get'](_0x1d966f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x298816=this['editor']['plugins']['get'](j);_0x298816['context']===this['editor']&&(_0x298816['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x116b9f,_0x4ffc46)=>{const _0x590112=this['_balloon'];if(this['isAttached']&&_0x590112['visibleView']){const _0x4eeb39=this['annotations']['getByView'](_0x590112['visibleView']);_0x4eeb39&&this['_closeAnnotation'](_0x4eeb39),_0x4ffc46();}}));}['afterInit'](){const _0x488098=this['editor']['plugins']['get'](j);_0x488098['context']===this['editor']&&(_0x488098['hasActive']()||_0x488098['switchTo']('inline'));}['setActiveAnnotation'](_0x5dc033){_0x5dc033!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5dc033&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5dc033)&&this['_addAnnotationToBalloon'](_0x5dc033,!0x0),_0x5dc033['isActive']=!0x0),_0x5dc033||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5dc033);}['attach'](_0x1e2cee){this['annotations']=_0x1e2cee;const _0x4048dd=this['editor']['plugins']['get'](j),_0x586025=this['_balloon'];if(this['isAttached'])throw new _0x1a89d7('inlineannotations-attach-already-attached',this);if(_0x4048dd['context']!==this['editor'])throw new _0x1a89d7('inlineannotations-not-allowed-with-context',this);const _0x41a3d4=this['editor']['plugins']['get'](b);this['listenTo'](_0x41a3d4,'refresh',()=>{const _0x469738=_0x41a3d4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x963e8,_0x3dff01;!this['_forceRefresh']&&(_0x963e8=_0x469738,_0x3dff01=this['_selectedAnnotations'],_0x963e8['length']===_0x3dff01['length']&&_0x963e8['every'](_0xdd5113=>_0x3dff01['includes'](_0xdd5113)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x469738),this['setActiveAnnotation'](_0x469738[0x0]||null));}),this['listenTo'](_0x41a3d4,'blur',(_0x4014e4,{isAnnotationTracked:_0x175b34})=>{this['activeAnnotation']&&_0x175b34(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x604c29,_0x2ab3c3,_0x4817e9)=>{_0x4817e9||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1e2cee,'remove',(_0x1d52e2,_0x55e99e)=>{this['_removeAnnotationFromBalloon'](_0x55e99e),_0x55e99e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x586025,'change:visibleView',(_0x46c606,_0x17cbe1,_0x1760b9,_0x265399)=>{_0x265399&&this['stopListening'](_0x265399);const _0x376482=_0x1e2cee['getByView'](_0x1760b9);_0x1760b9&&_0x376482&&(this['listenTo'](_0x1760b9,'change:height',()=>{_0x586025['updatePosition']();}),this['listenTo'](_0x1760b9,'Esc',()=>{this['_closeAnnotation'](_0x376482),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x376482&&this['setActiveAnnotation'](_0x376482));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x586025['visibleView']&&(_0x1e2cee['getByView'](_0x586025['visibleView'])&&_0x586025['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 _0x1a89d7('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x18345a of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x18345a);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x19dca5){for(const _0x21fab3 of this['_selectedAnnotations'])_0x19dca5['includes'](_0x21fab3)||this['_manuallyClosed']['delete'](_0x21fab3);for(const _0x1b03e4 of this['annotations'])_0x19dca5['includes'](_0x1b03e4)||this['_removeAnnotationFromBalloon'](_0x1b03e4);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x45b27d of _0x19dca5)this['_addAnnotationToBalloon'](_0x45b27d);}this['_selectedAnnotations']=_0x19dca5;}['_addAnnotationToBalloon'](_0x4960b9,_0x27bce4=!0x1){this['_manuallyClosed']['has'](_0x4960b9)||(this['_addedAnnotations']['has'](_0x4960b9)||this['_balloon']['hasView'](_0x4960b9['view'])||(this['_addedAnnotations']['add'](_0x4960b9),this['_balloon']['add']({'stackId':_0x4960b9['view']['id'],'view':_0x4960b9['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x4960b9)}})),_0x27bce4&&this['_balloon']['showStack'](_0x4960b9['view']['id']));}['_getBalloonTargetForAnnotation'](_0x61c938){const _0x403ce6=_0x61c938['target'],_0x5c18ff=this['editor']['editing']['view'],_0x4ac3c0=_0x5c18ff['document']['selection']['getFirstRange'](),_0x6d1a85=_0x5c18ff['domConverter']['viewRangeToDom'](_0x4ac3c0);if(_0x6d1a85['collapse'](!0x0),_0x403ce6){if(_0x403ce6 instanceof _0x8a9a03)return _0x403ce6;let _0x42e130=[];for(const _0x81efdb of _0x403ce6)_0x42e130['push'](...F(_0x81efdb['getClientRects']()));_0x42e130=function(_0xb8256d){const _0x576240=[];let _0x343888=_0xb8256d[0x0];for(let _0x5d2cd5=0x1;_0x5d2cd5<_0xb8256d['length'];_0x5d2cd5++)P(_0x343888,_0xb8256d[_0x5d2cd5])?_0x343888['width']+=_0xb8256d[_0x5d2cd5]['width']:(_0x576240['push'](_0x343888),_0x343888=_0xb8256d[_0x5d2cd5]);return _0x576240['push'](_0x343888),_0x576240;}(_0x42e130);const _0x42e500=_0x6d1a85['getBoundingClientRect']();return _0x42e130['find'](_0x42d8c=>_0x42d8c['top']<=_0x42e500['top']&&_0x42d8c['bottom']>=_0x42e500['bottom']&&_0x42d8c['left']<=_0x42e500['left']&&_0x42d8c['right']>=_0x42e500['right'])||_0x42e130[0x0];}return _0x61c938['targetRect']||_0x6d1a85;}['_removeAnnotationFromBalloon'](_0x259040){this['_addedAnnotations']['has'](_0x259040)&&this['_balloon']['hasView'](_0x259040['view'])&&(this['_addedAnnotations']['delete'](_0x259040),this['_balloon']['remove'](_0x259040['view']));}['_closeAnnotation'](_0x531ef5){this['_manuallyClosed']['add'](_0x531ef5),this['_removeAnnotationFromBalloon'](_0x531ef5);}}function F(_0x2aca53){return Array['from'](_0x2aca53)['map'](DOMRect['fromRect']);}function P(_0x4096df,_0x3a8e99){return _0x4096df['top']===_0x3a8e99['top']&&_0x4096df['bottom']===_0x3a8e99['bottom']&&_0x4096df['right']===_0x3a8e99['left'];}class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x1cd001,_0x11730e){super(_0x1cd001),this['set']('isEmpty',!_0x11730e['length']),this['focusTracker']=new _0x2908b5(),this['_annotationViews']=_0x11730e,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x65e88({'focusables':_0x11730e,'focusTracker':this['focusTracker']}),this['listenTo'](_0x11730e,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x11730e,'remove',(_0x3cd564,_0x49be1a)=>{_0x49be1a['isActive']&&this['focus'](),_0x11730e['length']||(this['isEmpty']=!0x0);});const _0x4adf67=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x1cd001,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x11730e},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4adf67['if']('isEmpty','ck-hidden',_0x53fa22=>!_0x53fa22)]},'children':[{'text':N(_0x1cd001,'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 _0x498e68 of this['_annotationViews'])this['focusTracker']['add'](_0x498e68['element']);this['_annotationViews']['on']('change',(_0x780f86,{added:_0x41605b,removed:_0x24351d})=>{for(const _0x34bbbb of _0x41605b)this['focusTracker']['add'](_0x34bbbb['element']);for(const _0x4b56d3 of _0x24351d)this['focusTracker']['remove'](_0x4b56d3['element']);});}}class p extends _0x3e7d33{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5c2dfe){super(_0x5c2dfe),this['archivedThreads']=new _0x5f19bf();}['init'](){const _0x598d11=this['context'],_0x37a935=_0x598d11['plugins']['get'](o),_0x353b4e=_0x598d11['plugins']['get'](y);this['listenTo'](_0x37a935,'addCommentThread',(_0x1a869d,{threadId:_0x18b7cc})=>{const _0x30ae2f=_0x37a935['getCommentThread'](_0x18b7cc);_0x30ae2f['archivedAt']&&this['archivedThreads']['add'](_0x30ae2f,this['_calculatePosition'](_0x30ae2f['archivedAt'])),this['listenTo'](_0x30ae2f,'change:archivedAt',(_0x4c57df,_0x300167,_0x365784)=>{_0x365784?this['archivedThreads']['has'](_0x30ae2f)||this['archivedThreads']['add'](_0x30ae2f,this['_calculatePosition'](_0x30ae2f['archivedAt'])):this['archivedThreads']['has'](_0x30ae2f)&&this['archivedThreads']['remove'](_0x30ae2f);});}),this['listenTo'](_0x37a935,'removeCommentThread',(_0x10896c,{threadId:_0x23a432})=>{const _0x1a7390=_0x37a935['getCommentThread'](_0x23a432);this['stopListening'](_0x1a7390),this['archivedThreads']['has'](_0x1a7390)&&this['archivedThreads']['remove'](_0x1a7390);},{'priority':'highest'}),this['listenTo'](_0x353b4e['collection'],'focus',(_0xaaef4b,_0x26d340)=>{_0x26d340['isVisible']||(_0x26d340['isActive']=!0x0,_0x353b4e['activate'](_0x26d340));});}['_calculatePosition'](_0x4e31c6){const _0x519e35=[...this['archivedThreads']]['findIndex'](_0x3d3e8b=>_0x3d3e8b['archivedAt']<_0x4e31c6);return _0x519e35>-0x1?_0x519e35:this['archivedThreads']['length'];}}class a extends _0x12c5b0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3296c1];}constructor(_0x2440a9){super(_0x2440a9),this['annotationViews']=new _0x354fab(),this['_pendingThreads']=[];}['init'](){const _0x370ffb=this['editor'],_0x4a88b7=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x370ffb['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x256289,!0x0)),_0x370ffb['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5c1c8b=this['_createCommentsArchiveButton'](_0x5439bf);return _0x5c1c8b['set']({'role':'menuitemcheckbox'}),_0x5c1c8b;});const _0x44f25a=_0x370ffb['plugins']['get'](p),_0x41873c=_0x370ffb['plugins']['get']('Annotations'),_0x2149a6=_0x370ffb['plugins']['get']('CommentsRepository');_0x44f25a['archivedThreads']['forEach'](_0x176bfa=>{this['_handleNewThread'](_0x176bfa);}),this['listenTo'](_0x44f25a['archivedThreads'],'add',(_0x281071,_0x2b6996)=>{this['_handleNewThread'](_0x2b6996);}),this['listenTo'](_0x41873c['collection'],'add',(_0x3b0aab,_0x172fc6)=>{const _0x54f98a=this['_pendingThreads']['find'](_0x89ac42=>{const _0x42fd20=_0x2149a6['_threadToController']['get'](_0x89ac42);return _0x42fd20&&_0x172fc6['innerView']===_0x42fd20['view'];});if(_0x54f98a){const _0x231f51=this['_calculatePosition'](_0x54f98a['archivedAt']);this['annotationViews']['add'](_0x172fc6['view'],_0x231f51),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x54f98a),0x1);}}),this['listenTo'](_0x44f25a['archivedThreads'],'remove',(_0x136b71,_0x4ee89e)=>{const _0x1c0642=_0x370ffb['config']['get']('collaboration.channelId');if(!_0x1c0642||_0x4ee89e['channelId']===_0x1c0642){if(this['_pendingThreads']['includes'](_0x4ee89e))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x4ee89e),0x1);else{const _0x24dd8d=_0x2149a6['_threadToController']['get'](_0x4ee89e),_0x4709a7=_0x41873c['getByInnerView'](_0x24dd8d['view']);this['annotationViews']['remove'](_0x4709a7['view']),this['stopListening'](_0x4709a7['focusableElements']);}}}),this['listenTo'](_0x41873c['collection'],'add',(_0x337f7d,_0x11674c)=>{this['listenTo'](_0x11674c,'escape',_0x4a88b7);}),this['listenTo'](_0x41873c['collection'],'remove',(_0x36a73d,_0xf6db11)=>{this['stopListening'](_0xf6db11,'escape',_0x4a88b7);});}['_handleNewThread'](_0x423add){const _0x85d221=this['editor']['plugins']['get']('CommentsRepository'),_0x2000dd=this['editor']['plugins']['get']('Annotations'),_0x89c367=this['editor']['config']['get']('collaboration.channelId');if(!_0x89c367||_0x423add['channelId']===_0x89c367){const _0x21d832=_0x85d221['_threadToController']['get'](_0x423add);if(!_0x21d832)return void this['_pendingThreads']['push'](_0x423add);const _0x3238d8=this['_calculatePosition'](_0x423add['archivedAt']),_0xf332d6=_0x2000dd['getByInnerView'](_0x21d832['view']);_0xf332d6['isVisible']&&_0x2000dd['_visibleAnnotations']['remove'](_0xf332d6),this['annotationViews']['add'](_0xf332d6['view'],_0x3238d8);}}['_calculatePosition'](_0x551d60){const _0x26b7ff=this['editor']['config']['get']('collaboration.channelId'),_0x8b538f=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x30c984=>_0x30c984['channelId']===_0x26b7ff)['findIndex'](_0x5cce63=>_0x5cce63['archivedAt']<_0x551d60);return _0x8b538f<0x0||_0x8b538f>this['annotationViews']['length']?this['annotationViews']['length']:_0x8b538f-0x1;}['_toggleDialog'](){const _0x5b7920=this['editor'],_0x5050a9=_0x5b7920['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x5b7920['locale'],this['annotationViews'])),'commentsArchive'===_0x5050a9['id']?_0x5050a9['hide']():_0x5050a9['show']({'id':'commentsArchive','title':N(_0x5b7920['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3268de,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x5291d3['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x2c6b38,_0x1a8def=!0x1){const _0x28f10e=this['editor']['locale'],_0x5511ca=this['editor']['plugins']['get']('Dialog'),_0x354d62=new _0x2c6b38(_0x28f10e);return _0x354d62['bind']('isEnabled')['to'](this,'isEnabled'),_0x354d62['bind']('isOn')['to'](_0x5511ca,'id',_0x794692=>'commentsArchive'===_0x794692),_0x354d62['set']({'label':N(_0x28f10e,'COMMENTS_ARCHIVE'),'icon':_0x3268de,'isToggleable':!0x0}),_0x1a8def&&(_0x354d62['tooltip']=!0x0),this['listenTo'](_0x354d62,'execute',()=>this['_toggleDialog']()),_0x354d62;}['_hideDialogOnAnnotationEscape']=_0x496f65=>{const _0x2d3276=_0x496f65['source'];if(!this['annotationViews']['has'](_0x2d3276['view']))return;const _0x36050e=this['editor']['plugins']['get']('Dialog');_0x36050e['isOpen']&&'commentsArchive'===_0x36050e['id']&&(_0x36050e['hide'](),_0x496f65['stop']());};}class gi extends _0x12c5b0{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,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};
|