@ckeditor/ckeditor5-comments 46.0.0-alpha.8 → 46.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +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(_0x213574={}){function _0x7eed12(_0x21fe2c){return _0x21fe2c['map'](_0x655f1d=>String['fromCharCode'](_0x655f1d))['join']('');}(_0x213574=Object['assign']({},_0x213574))['plugins']||(_0x213574['plugins']=Qt['defaultPlugins']),super(_0x213574),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[_0x7eed12([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x7eed12([0x76,0x69,0x65,0x77])][_0x7eed12([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x7eed12([0x61,0x75,0x74,0x6f]),this[_0x7eed12([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x7eed12([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x7eed12([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x7eed12([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x7eed12([0x6f,0x6b])});}['create'](){const _0x4262d4=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4262d4))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x547b91=>{const _0x576861=this['model']['document']['getRoot'](),_0x54f6e8=_0x576861&&_0x576861['getChild'](_0x576861['childCount']-0x1);_0x547b91['setSelection'](_0x54f6e8,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0xd3d49a=this['editing']['view'],_0x5db9e5=_0xd3d49a['document']['getRoot'](),_0x1e80f4=_0x5db9e5['getChild'](0x0);_0x5db9e5['childCount']>0x1||!_0x1e80f4||'p'!=_0x1e80f4['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0xd3d49a,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x1e80f4['placeholder']=this['placeholder']),St({'view':_0xd3d49a,'element':_0x1e80f4,'keepOnFocus':!0x0}),this['placeholderElement']=_0x1e80f4);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x46fccc,_0x54afa5={}){super(_0x46fccc),this['editor']=null,this['_editorConfig']=_0x54afa5,this['set']('value',_0x54afa5['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x46fccc,'Reply...')),this['set']('submitLabel',N(_0x46fccc,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x34c795(),this['focusCycler']=new _0x230040({'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',(_0x2728e5,_0x34c73c)=>{this['cancelButtonView']['fire']('execute'),_0x34c73c();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5e87f0,_0x5212f9)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x5212f9());}),this['on']('submit',(_0xbfe02a,_0x36ba51)=>{_0x36ba51['length']>0xfde8?(alert(N(_0x46fccc,'TOO_LONG_COMMENT_ALERT',[_0x36ba51['length'],0xfde8])),_0xbfe02a['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 _0x54da1a=this['editor'];this['element']['insertBefore'](_0x54da1a['ui']['element'],this['element']['firstChild']),_0x54da1a['model']['document']['on']('change',()=>this['value']=_0x54da1a['getData']()),_0x54da1a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x54da1a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x5b0b9b){-0x1===_0x5b0b9b?(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:_0x28439a}=this,_0xc2e46c=new _0x4cc9f4(_0x28439a);return _0xc2e46c['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0xc2e46c['withText']=!0x0,_0xc2e46c['bind']('label')['to'](this,'submitLabel'),_0xc2e46c['on']('execute',()=>{this['fire']('submit',this['value']);}),_0xc2e46c['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x2125f5,_0x23ce49)=>!_0x23ce49&&!!_0x2125f5['trim']()),_0xc2e46c;}['_createCancelButton'](){const {locale:_0x1ce9b}=this,_0x5e4d46=new _0x4cc9f4(_0x1ce9b);return _0x5e4d46['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x5e4d46['label']=N(_0x1ce9b,'Cancel'),_0x5e4d46['withText']=!0x0,_0x5e4d46['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x5e4d46;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3301b8=>{this['focusTracker']['add'](_0x3301b8['element']);}),this['focusables']['on']('change',(_0x13ac12,_0xef00dc)=>{for(const _0x384785 of Array['from'](_0xef00dc['added'])['reverse']())this['focusTracker']['add'](_0x384785['element']);});}}class ie extends kt{constructor(_0x5cb777,_0x4338bc,_0x50f1f9){super(_0x5cb777),this['commentInputView']=new es(_0x5cb777,_0x50f1f9),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x297c8c,_0x3791ae)=>_0x297c8c||!!_0x3791ae),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 _0x54cc69(_0x5cb777,_0x4338bc),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'](_0x516f35){this['commentInputView']['focus'](_0x516f35);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x2ae627,_0x2d2e34)=>{const {submitButtonView:_0x3ca2e1,cancelButtonView:_0x200c3b,editor:_0x39aad1}=this['commentInputView'];[_0x3ca2e1['element'],_0x200c3b['element'],_0x39aad1?_0x39aad1['editing']['view']['getDomRoot']():null]['filter'](_0x51fc8f=>_0x51fc8f)['some'](_0x290ec6=>_0x290ec6['contains'](_0x2d2e34['target']))||(this['focus'](),_0x2d2e34['preventDefault']());});}}class os extends kt{constructor(_0x167b1f){super(_0x167b1f);const _0x42d07e=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x42d07e['to']('count',_0x279e7e=>N(_0x167b1f,'NUMBER_OF_COMMENTS',_0x279e7e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x52bf51,_0x4c4e29,_0x5a17e7){super(_0x52bf51);const _0x5650e0=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x4c4e29['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x4c4e29,this['_config']=_0x5a17e7,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1a8040=>this['commentViews']['map'](_0x1ce1f7=>_0x1ce1f7['element'])['includes'](_0x1a8040['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x52bf51),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x35157c=>_0x35157c-this['_config']['maxCommentsWhenCollapsed']);for(const _0x31948c of _0x4c4e29['comments'])this['_handleNewCommentModel'](_0x31948c);this['_handleInfoComment'](),this['listenTo'](_0x4c4e29['comments'],'add',(_0x171d7f,_0x45f6d1)=>{const _0x8a30d6=this['_calculatePosition'](_0x45f6d1);this['length']++,this['_handleNewCommentModel'](_0x45f6d1,_0x8a30d6),this['refreshVisibleViews']();}),this['listenTo'](_0x4c4e29['comments'],'remove',(_0x5d543c,_0x598b97)=>{this['length']--,this['_handleRemoveCommentModel'](_0x598b97),this['refreshVisibleViews']();}),this['listenTo'](_0x4c4e29,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x4c4e29,'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',_0x5650e0['if']('length','ck-hidden',_0x255db3=>!_0x255db3)],'aria-label':N(_0x52bf51,'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'](_0x135f18){-0x1===_0x135f18?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x59eba0 of this['commentViews'])_0x59eba0['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x266c0a,_0x569c2f){const _0x2f9dc8=new this['_config']['CommentView'](this['locale'],_0x266c0a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2f9dc8['viewUid']=_0x266c0a['id'],_0x2f9dc8['delegate']('removeComment')['to'](this),_0x2f9dc8['delegate']('updateComment')['to'](this),_0x2f9dc8['delegate']('resolveCommentThread')['to'](this),_0x2f9dc8['delegate']('editorReady')['to'](this),_0x2f9dc8['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2f9dc8,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2f9dc8,_0x569c2f);}['_calculatePosition'](_0x142540){const _0x3d2051=this['_model']['_findOptimalIndex'](_0x142540);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x142540['authoredAt']?_0x3d2051-0x1:_0x3d2051:_0x3d2051-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x431cdf={'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'],_0x431cdf,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x431cdf));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5847ec){const _0x549e0d=this['commentViews']['remove'](_0x5847ec['id']);this['stopListening'](_0x549e0d),_0x549e0d['isEditMode']&&this['_updateHasDirtyComment'](),_0x549e0d['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x931953=>_0x931953['isEditMode']);}['_rearrangeCollapse'](){const _0x3f8d65=function(_0x1fc3f9){const _0x52e418=new _0x4550ea();for(const _0x3966d7 of _0x1fc3f9)_0x52e418['add'](_0x3966d7);return _0x52e418;}(this['commentViews']),_0x48a9a6=this['_collapsedCommentsView']['count'];for(let _0x16ee85=0x1;_0x16ee85<=_0x48a9a6;_0x16ee85++)_0x3f8d65['remove'](0x1);for(const _0x2775d5 of _0x3f8d65)_0x2775d5['collapse']();_0x48a9a6>0x0&&_0x3f8d65['add'](this['_collapsedCommentsView'],0x1),rs(_0x27fecb(Array['from'](this['visibleViews']),Array['from'](_0x3f8d65)),this['visibleViews'],_0x3f8d65);}['_rearrangeExpand'](){rs(_0x27fecb(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1e36b1 of this['visibleViews'])_0x1e36b1['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x395999=>{this['focusTracker']['add'](_0x395999['element']),this['keystrokes']['listenTo'](_0x395999['element']);}),this['commentViews']['on']('change',(_0x33356e,_0xc85242)=>{for(const _0x55e5d8 of _0xc85242['removed'])this['focusTracker']['remove'](_0x55e5d8['element']),this['keystrokes']['stopListening'](_0x55e5d8['element']);for(const _0xb6ba0d of Array['from'](_0xc85242['added'])['reverse']())this['focusTracker']['add'](_0xb6ba0d['element']),this['keystrokes']['listenTo'](_0xb6ba0d['element']);});}}function rs(_0xa027a3,_0x5a39ad,_0x3293c8){let _0x2c45d2=0x0;for(const _0x490648 of _0xa027a3)switch(_0x490648){case'insert':_0x5a39ad['add'](_0x3293c8['get'](_0x2c45d2),_0x2c45d2),_0x2c45d2++;break;case'delete':_0x5a39ad['remove'](_0x2c45d2);break;case'equal':_0x2c45d2++;}}class oe extends kt{constructor(_0x24dbd3){super(_0x24dbd3);const _0x63be8c=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x63be8c['to']('contextValue',_0x429591=>N(_0x24dbd3,'THREAD_CONTEXT_LABEL',_0x429591)),'tabindex':-0x1},'children':[{'text':_0x63be8c['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x44670f,_0x3c0f29){super(_0x44670f);const _0x27c6af=this['bindTemplate'];this['_model']=_0x3c0f29,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x110acc=>!!_0x110acc),this['bind']('contextValue')['to'](this['_model'],'context',_0x190673=>_0x190673&&_0x190673['value']?this['_trimContextValue'](_0x190673['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',_0x27c6af['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 _0x450c38=new _0x4cc9f4(this['locale']);return _0x450c38['label']=N(this['locale'],'Reopen'),_0x450c38['tooltip']=N(this['locale'],'Reopen'),_0x450c38['icon']=_0x41ae24,_0x450c38['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x35daa8=>!_0x35daa8),_0x450c38['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x23728f,_0x2d9c9d)=>_0x23728f&&_0x2d9c9d),_0x450c38['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x450c38;}['_trimContextValue'](_0x30ed6f){if(_0x30ed6f['length']<0x96)return _0x30ed6f;const _0x3cb9b8=_0x30ed6f['lastIndexOf']('\x20',0x93);return _0x30ed6f['substring'](0x0,_0x3cb9b8>-0x1?_0x3cb9b8:0x93)+'...';}['_attachContextActions'](){const _0x9c79a4=this['element']['querySelector']('.ck-context'),_0x2d3270=_0x9c79a4['querySelector']('.ck-context__value');this['listenTo'](_0x9c79a4,'mouseenter',()=>{_0x2d3270['offsetWidth']<_0x2d3270['scrollWidth']&&_0x9c79a4['classList']['add']('overlay');}),this['listenTo'](_0x9c79a4,'mouseleave',()=>{_0x9c79a4['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x373bdc of this['focusables'])this['focusTracker']['add'](_0x373bdc['element']),this['keystrokes']['listenTo'](_0x373bdc['element']);}['_createContextView'](){const _0x38b546=new oe(this['locale']);return _0x38b546['bind']('contextValue')['to'](this),_0x38b546;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1c5595,_0x50e15d,_0xd8985e,_0x4ef892){super(_0x1c5595),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x50e15d,this['_localUser']=_0xd8985e,this['_config']=_0x4ef892,this['commentThreadHeaderView']=new Xt(_0x1c5595,_0x50e15d),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x1c5595,N(_0x1c5595,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x1c5595,_0x50e15d,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4ef892)),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',(_0x29415d,_0x4eb96f)=>_0x29415d||!!_0x4eb96f),this['bind']('isUnlinked')['to'](_0x50e15d,'unlinkedAt',_0x1d9814=>!!_0x1d9814),this['bind']('ariaLabel')['to'](this,'length',_0x33a302=>{const _0x4099e3=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x33a302,_0x4099e3]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x34c795(),this['keystrokes']=new jt(),this['focusCycler']=new _0x230040({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x5309d9=>_0x5309d9['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 _0x52da04=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x511fec=_0x52da04['commentInputView'];return _0x52da04['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x511fec,'value',(_0x1909e1,_0x1355e9,_0x17f3aa,_0x5272d3,_0x4feb0c)=>!!_0x4feb0c||!!_0x5272d3&&_0x17f3aa&&!_0x1355e9||_0x1909e1&&_0x17f3aa&&!_0x1355e9),_0x511fec['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x24728a,_0x1af88c,_0x177baf)=>{let _0x126ea0;return _0x126ea0=_0x177baf&&_0x1af88c?'Reply\x20to\x20reopen\x20discussion...':_0x24728a?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x126ea0);}),_0x511fec['bind']('submitLabel')['to'](this,'length',_0x1bbce3=>N(this['locale'],_0x1bbce3?'Reply':'Comment')),_0x511fec['on']('submit',(_0x44d8f8,_0x2781e3)=>{this['fire']('addComment',_0x2781e3),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x511fec['on']('cancel',()=>{this['focus']();}),_0x511fec['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x511fec['on']('cancel',_0x5b2a4b=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5b2a4b['stop']());}),this['on']('change:isActive',(_0x53f833,_0x57a88d,_0x48f16b)=>{_0x48f16b||this['length']||_0x511fec['value']||this['fire']('removeCommentThread');}),_0x52da04;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x166ad1(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x46ec71,target:_0x12c1ad,type:_0x442fc0,isVisible:_0x173073=!0x0}){super(),this['view']=_0x46ec71,this['view']['element']||this['view']['render'](),this['_type']=_0x442fc0,this['_target']=_0x12c1ad,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4550ea([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1410fe,_0x49e086)=>{this['view']['focusTracker']['add'](_0x49e086);}),this['focusableElements']['on']('remove',(_0x1df2f4,_0x30cc21)=>{this['view']['focusTracker']['remove'](_0x30cc21);}),this['set']('isVisible',_0x173073);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x473625=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x473625),_0x473625;}get['targetRect'](){const _0x53ce1c=this['target'];if(null===_0x53ce1c)return null;if(_0x53ce1c instanceof _0x415c3c)return _0x53ce1c;const _0x41d6c8=_0x53ce1c['filter'](_0x684f=>function(_0x30d3ff){const _0x3f7090=_0x30d3ff['offsetParent'];if(_0x3f7090)return!0x0;const _0x4b3b60=_0x30d3ff['getClientRects']()['item'](0x0);return!!_0x4b3b60;}(_0x684f));return 0x0===_0x41d6c8['length']?null:new _0x415c3c(_0x41d6c8[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x4193bb){this['view']['isActive']=_0x4193bb,this['view']['mainView']['isActive']=_0x4193bb;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3fd04f){if(!(null===_0x3fd04f||_0x3fd04f instanceof _0x415c3c||Array['isArray'](_0x3fd04f)&&_0x3fd04f['every'](_0x244f21=>fi(_0x244f21))))throw new _0x160abe('annotation-invalid-target',null,{'target':_0x3fd04f});}['_getNormalizedTarget'](){const _0x46c256='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x46c256)?[_0x46c256]:_0x46c256;}}function fi(_0x5a84e1){return null!==_0x5a84e1&&'object'==typeof _0x5a84e1&&'nodeType'in _0x5a84e1&&0x1===_0x5a84e1['nodeType'];}class S extends _0x4550ea{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x4391d7=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x34c795(),this['_focusTracker']['on']('change:isFocused',(_0x8d033a,_0xf89188,_0x5f07b3)=>{_0x5f07b3||this['fire']('blur');});for(const _0xe5c56e of _0x4391d7)this['add'](_0xe5c56e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x361c41){if(this['has'](_0x361c41))throw new _0x160abe('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x361c41['innerView'],_0x361c41),this['_viewToAnnotation']['set'](_0x361c41['view'],_0x361c41);for(const _0x27f46b of _0x361c41['focusableElements'])this['_focusTracker']['add'](_0x27f46b);this['listenTo'](_0x361c41['focusableElements'],'add',(_0x5e672b,_0x189475)=>{this['_focusTracker']['add'](_0x189475);}),this['listenTo'](_0x361c41['focusableElements'],'remove',(_0xfdc352,_0x1da963)=>{this['_focusTracker']['remove'](_0x1da963);}),this['listenTo'](_0x361c41['view']['focusTracker'],'change:isFocused',(_0x1036aa,_0x232c14,_0x2ebedd)=>{_0x2ebedd&&this['fire']('focus',_0x361c41);}),_0x361c41['updateTargetRect']();const _0x1c468e=this['_getOrderInContent'](_0x361c41['view']['targetRect']);return super['add'](_0x361c41,_0x1c468e);}['remove'](_0x3aa9e1){if(!this['has'](_0x3aa9e1))throw new _0x160abe('annotationcollection-not-existing-item',null);this['stopListening'](_0x3aa9e1['view']['focusTracker']),this['stopListening'](_0x3aa9e1['focusableElements']);for(const _0x2ec576 of _0x3aa9e1['focusableElements'])this['_focusTracker']['remove'](_0x2ec576);return this['_viewToAnnotation']['delete'](_0x3aa9e1['view']),this['_innerViewToAnnotation']['delete'](_0x3aa9e1['innerView']),super['remove'](_0x3aa9e1);}['getByInnerView'](_0x5edc88){return this['_innerViewToAnnotation']['get'](_0x5edc88);}['getByView'](_0x2106ee){return this['_viewToAnnotation']['get'](_0x2106ee);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1cd0e0 of this)_0x1cd0e0['updateTargetRect']();this['_sort']();}['_sort'](){const _0x410d34=Array['from'](this)['sort']((_0x27a4e9,_0x58911e)=>w(_0x27a4e9['view']['targetRect'],_0x58911e['view']['targetRect']));for(let _0x205a5a=_0x410d34['length']-0x1;_0x205a5a>0x0;_0x205a5a--){const _0x16ca42=_0x410d34[_0x205a5a];_0x205a5a!==this['getIndex'](_0x16ca42)&&(this['remove'](_0x16ca42),this['add'](_0x16ca42));}}['_getOrderInContent'](_0x707393){let _0x168933=0x0;if(!_0x707393)return this['length'];for(const _0x44d4cc of this){const _0x14321a=_0x44d4cc['view']['targetRect'];if(_0x14321a){if(w(_0x707393,_0x14321a)<0x0)return _0x168933;_0x168933++;}}return _0x168933;}}function v({source:_0x1d0462,target:_0x294bc4,filter:_0xdeb797}){for(const _0x2c47c5 of _0x1d0462)_0xdeb797(_0x2c47c5)&&_0x294bc4['add'](_0x2c47c5);_0x294bc4['listenTo'](_0x1d0462,'add',(_0x42e9f0,_0x22ce2a)=>{_0xdeb797(_0x22ce2a)&&_0x294bc4['add'](_0x22ce2a);}),_0x294bc4['listenTo'](_0x1d0462,'remove',(_0x4ecac9,_0x3b0f8c)=>{_0x294bc4['has'](_0x3b0f8c)&&_0x294bc4['remove'](_0x3b0f8c);});}function w(_0x4e02c1,_0x20c38c){if(null===_0x4e02c1&&null===_0x20c38c)return 0x0;if(null===_0x4e02c1)return-0x1;if(null===_0x20c38c)return 0x1;const _0x4a6d84=_0x4e02c1['top']-_0x20c38c['top'];return 0x0==_0x4a6d84?_0x4e02c1['left']-_0x20c38c['left']:_0x4a6d84;}class y extends _0x3f106c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xf4bc0c){if(super(_0xf4bc0c),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0xf4bc0c instanceof _0x4bc0e5){const _0x3ddd6a=_0xf4bc0c['locale'];_0xf4bc0c['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x3ddd6a,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4a581f){this['collection']['add'](_0x4a581f);}['remove'](_0x3dbdd4){this['collection']['remove'](_0x3dbdd4),_0x3dbdd4['destroy']();}['refreshVisibility'](){for(const _0x3b6c03 of this['collection'])_0x3b6c03['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5ee3e6){return this['collection']['getByInnerView'](_0x5ee3e6);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3b3f6f of this['collection'])_0x3b3f6f['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x595a83){this['fire']('_activateAnnotation',_0x595a83);}['createAnnotation'](_0x495eeb){return new T(_0x495eeb);}['createAnnotationView'](_0x5bd808,_0x353b19){return new E(_0x5bd808,_0x353b19);}['_addActiveAnnotation'](_0xfd6e5){const _0x13b1be=new Set(this['activeAnnotations']);_0x13b1be['add'](_0xfd6e5),this['activeAnnotations']=_0x13b1be;}['_removeActiveAnnotation'](_0x183067){const _0x21a6f5=new Set(this['activeAnnotations']);_0x21a6f5['delete'](_0x183067),this['activeAnnotations']=_0x21a6f5;}['_bindAnnotationsToVisibleAnnotations'](){const _0x2f3fa3=this['collection'],_0x9da377=this['_visibleAnnotations'];function _0x3bc53e(_0x409ef2){const _0x3c97cb=_0x409ef2['source'];_0x3c97cb['isVisible']&&!_0x9da377['has'](_0x3c97cb)?_0x9da377['add'](_0x3c97cb):!_0x3c97cb['isVisible']&&_0x9da377['has'](_0x3c97cb)&&_0x9da377['remove'](_0x3c97cb),_0x3c97cb['view']['focusTracker']['remove'](_0x3c97cb['view']['element']),_0x3c97cb['view']['focusTracker']['add'](_0x3c97cb['view']['element']);}this['listenTo'](_0x2f3fa3,'add',(_0x432dd5,_0x24a18a)=>{_0x24a18a['isVisible']&&_0x9da377['add'](_0x24a18a),this['listenTo'](_0x24a18a,'change:isVisible',_0x3bc53e);}),this['listenTo'](_0x2f3fa3,'remove',(_0x220ff2,_0x52183c)=>{_0x9da377['has'](_0x52183c)&&_0x9da377['remove'](_0x52183c),this['stopListening'](_0x52183c,'change:isVisible',_0x3bc53e);});}['_setupEnterAnnotationKeystroke'](){const _0x2f2194=_0x12aaf9=>{_0x12aaf9['on']('ready',()=>{_0x12aaf9['keystrokes']['set'](_0x5f5a8d,(_0x300439,_0x11b32f)=>{const _0x2ed0e1=_0x31f99c(this['activeAnnotations']['values']());_0x2ed0e1&&(_0x2ed0e1['view']['focus'](),_0x11b32f());});});};this['context']instanceof _0x4bc0e5?_0x2f2194(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x526887,_0x50615e)=>{_0x2f2194(_0x50615e);});}['_setupEscapeAnnotationHandling'](){const _0x7dbfbe=_0x561675=>{const _0x2e1479=_0x561675['source'],_0xde24d8=[];let _0xa60435;if(Array['isArray'](_0x2e1479['target'])){_0xa60435=_0x2e1479['target'][0x0],this['context']instanceof _0x4bc0e5?_0xde24d8['push'](this['context']):this['context']['editors']&&_0xde24d8['push'](...this['context']['editors']);for(const _0x12689b of _0xde24d8)for(const _0x4ceaae of _0x12689b['editing']['view']['domRoots']['values']())if(_0x4ceaae['contains'](_0xa60435))return void _0x12689b['editing']['view']['focus']();_0xa60435['focus']();}};this['listenTo'](this['collection'],'add',(_0x2a9246,_0x27d8c7)=>{this['listenTo'](_0x27d8c7,'escape',_0x7dbfbe,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3eaa0f,_0x1e79f8)=>{this['stopListening'](_0x1e79f8,'escape',_0x7dbfbe);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x3f106c{['_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(_0xa30a1a){super(_0xa30a1a),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x153805=this['context']['config'];_0x153805['define']('comments.maxCommentsWhenCollapsed',0x2),_0x153805['define']('comments.maxThreadTotalWeight',0x1f4),_0x153805['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x153805['define']('comments.CommentThreadView',vt),_0x153805['define']('comments.CommentView',gt),_0x153805['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x29f05c=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3d6c03,_0x12df76)=>this['_addCommentThread'](_0x12df76)),this['on']('submitCommentThread',(_0x17cf2f,_0xacc20c)=>this['_submitCommentThread'](_0xacc20c)),this['on']('resolveCommentThread',(_0x398637,_0x35d481)=>this['_resolveCommentThread'](_0x35d481)),this['on']('resolveCommentThread',(_0x224d8a,_0x4cabd6)=>this['_updateActiveAnnotation'](_0x4cabd6),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x18e861,_0x226edf)=>this['_reopenCommentThread'](_0x226edf)),this['on']('reopenCommentThread',(_0x41320f,_0x27f2a2)=>this['_updateActiveAnnotation'](_0x27f2a2),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1fab84,_0x172761)=>this['_removeCommentThread'](_0x172761)),this['on']('updateCommentThread',(_0x48564b,_0x57793e)=>this['_updateCommentThread'](_0x57793e)),this['on']('updateCommentThread',(_0xeae559,_0xa3083f)=>this['_updateActiveAnnotation'](_0xa3083f),{'priority':'lowest'}),this['on']('addComment',(_0x57b1b7,_0x37f703)=>this['_addComment'](_0x37f703)),this['on']('updateComment',(_0x21b819,_0x53987b)=>this['_updateComment'](_0x53987b)),this['on']('removeComment',(_0x4f2515,_0x3d80d9)=>this['_removeComment'](_0x3d80d9)),this['on']('addComment',(_0x3552a1,{threadId:_0x29be3a,isFromAdapter:_0x579ff7})=>{if(_0x579ff7)return;const _0x49769d=this['getCommentThread'](_0x29be3a),_0x8001ff=_0x49769d&&this['_threadToController']['get'](_0x49769d);_0x8001ff&&_0x8001ff['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x29f05c,'change:activeAnnotations',(_0x2b49db,_0x5c39b5,_0x33ae63)=>{const _0x43bee8=Array['from'](_0x33ae63)['map'](_0x16c689=>this['_viewToController']['get'](_0x16c689['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x43bee8?_0x43bee8['model']:null;});}set['adapter'](_0xfb7064){if(this['_adapter'])throw new _0x160abe('commentsrepository-adapter-already-set');this['_adapter']=_0xfb7064;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x45cdd2=Tt,threadId:_0x258a3b=_0x27956d(),comments:_0x2365dd=[],unlinkedAt:_0x359c45=null,resolvedAt:_0x12ea61=null,resolvedBy:_0x39b751=null,target:_0x6c3150=null,context:_0x3acfd7=null,attributes:_0x29119b={},isResolvable:_0x13e529=!0x0,isSubmitted:_0x399e35=!0x1,isFromAdapter:_0x44a0ad=!0x1}={}){return this['fire'](bt('addCommentThread',_0x45cdd2),{'channelId':_0x45cdd2,'threadId':_0x258a3b,'comments':_0x2365dd,'unlinkedAt':_0x359c45,'resolvedAt':_0x12ea61,'resolvedBy':_0x39b751,'target':_0x6c3150,'context':_0x3acfd7,'attributes':_0x29119b,'isFromAdapter':_0x44a0ad,'isResolvable':_0x13e529,'isSubmitted':_0x399e35}),this['getCommentThread'](_0x258a3b);}['openNewCommentThread']({channelId:_0x226897=Tt,threadId:_0x384e9a=_0x27956d(),target:_0x216420,context:_0x1fd435=null,isResolvable:_0x308479=!0x0}){if(this['_readOnlyChannels']['has'](_0x226897)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x216420)throw new _0x160abe('commentsrepository-missing-target');const _0x91a2a3=this['addCommentThread']({'channelId':_0x226897,'threadId':_0x384e9a,'target':_0x216420,'context':_0x1fd435,'isResolvable':_0x308479});if(!_0x91a2a3)return null;const _0x3b98dc=this['_threadToController']['get'](_0x91a2a3),_0x5f5282=_0x3b98dc['view']['commentThreadInputView']['commentInputView'],_0x2d304a=this['context']['plugins']['get'](y),_0x4de514=_0x2d304a['getByInnerView'](_0x3b98dc['view']);return _0x2d304a['activate'](_0x4de514),_0x5f5282['once']('editorReady',()=>_0x5f5282['focus']()),_0x91a2a3;}['hasCommentThread'](_0x3d248c){if('string'!=typeof _0x3d248c)throw new _0x160abe('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3d248c);}['updateCommentThread']({channelId:_0x40d02f=Tt,threadId:_0x47bc93,context:_0x21cc20,unlinkedAt:_0x38d264,attributes:_0x168236,isFromAdapter:_0x14bcd4=!0x1}){return this['fire'](bt('updateCommentThread',_0x40d02f),{'channelId':_0x40d02f,'threadId':_0x47bc93,'context':_0x21cc20,'unlinkedAt':_0x38d264,'attributes':_0x168236,'isFromAdapter':_0x14bcd4}),this['getCommentThread'](_0x47bc93);}['getCommentThread'](_0x456f4d){if('string'!=typeof _0x456f4d)throw new _0x160abe('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x456f4d);}['fetchCommentThread']({channelId:_0x59a867,threadId:_0x4a65d1}={}){const _0x5d7888=this['getCommentThread'](_0x4a65d1);if(_0x5d7888)return Promise['resolve'](_0x5d7888);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x160abe('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x59a867,'threadId':_0x4a65d1})['then'](_0x2a3c3b=>this['hasCommentThread'](_0x4a65d1)?this['getCommentThread'](_0x4a65d1):_0x2a3c3b?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x59a867},_0x2a3c3b)):void 0x0)['catch'](_0x31445e=>{throw console['error'](_0x31445e),new _0x160abe('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x344ca7,skipNotAttached:_0xa0e035=!0x1,skipEmpty:_0x1a2364=!0x1,toJSON:_0x3d6694=!0x1}={}){const _0x16b16f=[];for(const _0x130bc0 of this['_threads']['values']())_0x344ca7&&_0x130bc0['channelId']!==_0x344ca7||_0xa0e035&&!_0x130bc0['isAttached']||_0x1a2364&&0x0===_0x130bc0['length']||_0x16b16f['push'](_0x130bc0);return _0x3d6694?_0x16b16f['map'](_0x44cb56=>_0x44cb56['toJSON']()):_0x16b16f;}['getAnnotationForCommentThread'](_0x43910e){const _0x33b07c=this['_threadToController']['get'](_0x43910e);if(!_0x33b07c)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x33b07c['view'])||null;}['getCommentThreadForAnnotation'](_0x1716d1){const _0x1b23c2=this['_viewToController']['get'](_0x1716d1['innerView']);return _0x1b23c2?_0x1b23c2['model']:null;}['setActiveCommentThread'](_0x74087a){const _0x36bede=this['context']['plugins']['get'](y);if(!_0x74087a)return void(this['activeCommentThread']&&_0x36bede['deactivateAll']());const _0x5d306a=this['getCommentThread'](_0x74087a);if(!_0x5d306a)throw new _0x160abe('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x74087a});if(!this['_threadToController']['has'](_0x5d306a))throw new _0x160abe('commentsrepository-active-not-attached',null,{'threadId':_0x74087a});const _0x3b43a9=_0x36bede['getByInnerView'](this['_threadToController']['get'](_0x5d306a)['view']);_0x36bede['activate'](_0x3b43a9);}['switchReadOnly'](_0x36f9ca,_0x4a3ed8){_0x36f9ca?this['_readOnlyChannels']['add'](_0x4a3ed8):this['_readOnlyChannels']['delete'](_0x4a3ed8),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4f4490){return this['_readOnlyChannels']['has'](_0x4f4490)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x143330,_0x4ba4e0){return new yt(_0x143330,_0x4ba4e0);}['setPermissions'](_0x52a354,_0x3b8a5c=Tt){this['_permissions']['set'](_0x3b8a5c,_0x52a354),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xd4ad09=Tt){return this['_permissions']['has'](_0xd4ad09)?this['_permissions']['get'](_0xd4ad09):_t;}['_addCommentThread']({channelId:_0x33848b,threadId:_0x29c883,comments:_0x548965,unlinkedAt:_0x551207,resolvedAt:_0x4542f0,resolvedBy:_0x241a4d,target:_0x308d81,context:_0x57d643,attributes:_0x5c80b5,isFromAdapter:_0x2e5fef,isResolvable:_0x4be2c7,isSubmitted:_0x1bc8b9}){if('string'!=typeof _0x29c883)throw new _0x160abe('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x29c883});if(this['hasCommentThread'](_0x29c883))throw new _0x160abe('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x29c883});const _0x481767=new pi(this,{'channelId':_0x33848b,'id':_0x29c883,'context':_0x57d643,'attributes':_0x5c80b5,'unlinkedAt':_0x551207,'resolvedAt':_0x4542f0,'resolvedBy':_0x241a4d?this['context']['plugins']['get'](it)['getUser'](_0x241a4d):null,'isResolvable':_0x4be2c7,'isSubmitted':_0x1bc8b9||_0x2e5fef});this['_threads']['set'](_0x29c883,_0x481767);for(const _0x103a85 of _0x548965)_0x481767['_add'](this['_createNewComment']({'threadId':_0x29c883,..._0x103a85}));return _0x308d81&&_0x481767['attachTo'](_0x308d81),_0x2e5fef||!_0x481767['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x33848b,'threadId':_0x29c883});}['_submitCommentThread']({channelId:_0x3d702f,threadId:_0x22c637}){if(!this['hasCommentThread'](_0x22c637))throw new _0x160abe('commentsrepository-missing-comment-thread',this);const _0xd86813=this['getCommentThread'](_0x22c637);if(_0xd86813['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x22473b,comments:_0x5d7e5a,resolvedAt:_0x573f83,resolvedBy:_0xc374fa,context:_0x1a26ca,attributes:_0x4bde46}=_0xd86813,_0x55c1f1=this['context']['plugins']['get']('PendingActions'),_0x5437ad=_0x55c1f1['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x3d702f,'threadId':_0x22473b,'comments':_0x5d7e5a['map'](_0x2bd44e=>_0x2bd44e['toJSON']()),'resolvedAt':_0x573f83,'resolvedBy':_0xc374fa?_0xc374fa['id']:_0xc374fa,'context':_0x1a26ca,'attributes':_0x4bde46})['then'](({comments:_0x318037})=>{_0x55c1f1['remove'](_0x5437ad);for(const _0x20a07d of _0x318037)this['_updateComment']({'channelId':_0x3d702f,'threadId':_0x22c637,'commentId':_0x20a07d['commentId'],'createdAt':_0x20a07d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x199c7e=>{throw console['error'](_0x199c7e),new _0x160abe('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x34ee6b,target:_0x3cce47}){const _0x1a215e=this['getCommentThread'](_0x34ee6b);if(!_0x1a215e)throw new _0x160abe('commentsrepository-attach-missing-comment-thread',this);const _0x53ac33=this['context']['plugins']['get']('PendingActions'),_0x5120db=this['context']['plugins']['get'](y),_0x3a344d=this['_createCommentThreadView'](_0x1a215e),_0x2593f8=new yt(_0x1a215e,_0x3a344d);let _0xe347d4=null;_0x3a344d['on']('change:isDirty',(_0x17e588,_0x7c9083,_0x57184e)=>{_0x57184e?_0xe347d4=_0x53ac33['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0xe347d4&&(_0x53ac33['remove'](_0xe347d4),_0xe347d4=null);}),this['_threadToController']['set'](_0x1a215e,_0x2593f8),this['_viewToController']['set'](_0x3a344d,_0x2593f8);const _0x508332=new E(this['context']['locale'],_0x3a344d);_0x508332['bind']('length')['to'](_0x3a344d),_0x508332['bind']('isDirty')['to'](_0x3a344d,'isDirty',_0x3a344d,'length',(_0x55a60a,_0xc578c5)=>_0x55a60a||!_0xc578c5),_0x508332['bind']('isActive')['to'](_0x3a344d),_0x508332['type']='comment';const _0x75441c=new T({'view':_0x508332,'target':_0x3cce47,'type':'comment','isVisible':!_0x1a215e['archivedAt']});return _0x3a344d['on']('escape',()=>{_0x75441c['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3a344d,_0x75441c),_0x5120db['add'](_0x75441c),_0x75441c;}['_bindAnnotationToEditors'](_0x9da26,_0x11dc29){this['listenTo'](_0x9da26,'editorReady',(_0x1c7250,_0x3d2e50)=>{const _0x52aff3=_0x3d2e50['ui']['view']['body']['bodyCollectionContainer'];_0x11dc29['focusableElements']['add'](_0x52aff3),this['context']instanceof _0x4bc0e5&&this['context']['ui']['focusTracker']['add'](_0x52aff3);},{'priority':'highest'}),this['listenTo'](_0x9da26,'editorDestroyed',(_0x14c181,_0x15be99)=>{const _0x2cefb5=_0x15be99['ui']['view']['body']['bodyCollectionContainer'];_0x11dc29['focusableElements']['has'](_0x2cefb5)&&_0x11dc29['focusableElements']['remove'](_0x2cefb5),this['context']instanceof _0x4bc0e5&&this['context']['ui']['focusTracker']['remove'](_0x2cefb5);});}['_unbindEditors'](_0x515361){this['stopListening'](_0x515361,'editorReady'),this['stopListening'](_0x515361,'editorDestroyed');}['_createCommentThreadView'](_0x36221a){const _0x347cce=this['context']['plugins']['get'](it),{config:_0x57b277,locale:_0x4495b3}=this['context'],_0x1bda99=lt(_0x57b277['get']('locale'),_0x4495b3);return new(0x0,(_0x57b277['get']('comments'))['CommentThreadView'])(_0x4495b3,_0x36221a,_0x347cce['me'],{'editorConfig':{..._0x57b277['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x57b277['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x57b277['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x57b277['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x57b277['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x1bda99,'CommentView':_0x57b277['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3bf402,channelId:_0x383675,resolvedAt:_0x12cb1a,resolvedBy:_0x20882e,isFromAdapter:_0x50dfa1}){if(!this['hasCommentThread'](_0x3bf402))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x3bf402});const _0x4d88c7=this['getCommentThread'](_0x3bf402);if(_0x4d88c7['isResolved'])throw new _0x160abe('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3bf402});const _0x4868ce=this['context']['plugins']['get'](it);if(_0x4d88c7['resolvedBy']=_0x4868ce['getUser'](_0x20882e),_0x4d88c7['resolvedAt']=_0x12cb1a,_0x50dfa1||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x4cf654=this['context']['plugins']['get']('PendingActions'),_0x31050b=_0x4cf654['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x383675,'threadId':_0x3bf402})['then'](({resolvedAt:_0x3eb9e2,resolvedBy:_0xec1844})=>{_0x4cf654['remove'](_0x31050b),_0x4d88c7['resolvedBy']['id']!==_0xec1844&&(_0x4d88c7['resolvedBy']=_0x4868ce['getUser'](_0xec1844)),_0x4d88c7['resolvedAt']=_0x3eb9e2;})['catch'](_0x55366b=>{throw console['error'](_0x55366b),new _0x160abe('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x59a51f,channelId:_0xccd330,isFromAdapter:_0x55ddb9}){if(!this['hasCommentThread'](_0x59a51f))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x59a51f});const _0x50710e=this['getCommentThread'](_0x59a51f);if(!_0x50710e['isResolved'])throw new _0x160abe('commentsrepository-reopen-comment-thread',null,{'threadId':_0x59a51f});if(_0x50710e['resolvedBy']=null,_0x50710e['resolvedAt']=null,_0x55ddb9||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0xd53c6=this['context']['plugins']['get']('PendingActions'),_0x376f16=_0xd53c6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xccd330,'threadId':_0x59a51f})['then'](()=>_0xd53c6['remove'](_0x376f16))['catch'](_0x149aef=>{throw console['error'](_0x149aef),new _0x160abe('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5da39b,isFromAdapter:_0x813e61}){const _0x9bcbb0=this['getCommentThread'](_0x5da39b);if(!_0x9bcbb0)throw new _0x160abe('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5da39b),this['_threads']['delete'](_0x5da39b),!_0x9bcbb0['isSubmitted']||_0x813e61||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1d6e8b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x45c7c7}=_0x9bcbb0,_0x35b747=_0x1d6e8b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x45c7c7,'threadId':_0x5da39b})['then'](()=>_0x1d6e8b['remove'](_0x35b747))['catch'](_0x410a0c=>{throw console['error'](_0x410a0c),new _0x160abe('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2245f9,unlinkedAt:_0x165a0f,context:_0x1edadf,attributes:_0xc4a684,isFromAdapter:_0x5e9777}){if('string'!=typeof _0x2245f9)throw new _0x160abe('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2245f9});if(!this['hasCommentThread'](_0x2245f9))throw new _0x160abe('commentsrepository-missing-comment-thread',null,{'threadId':_0x2245f9});const _0x1b7487=this['getCommentThread'](_0x2245f9);let _0x300ffb=!0x1;if(void 0x0!==_0x1edadf&&_0x1b7487['context']!==_0x1edadf&&(_0x1b7487['context']=_0x1edadf,_0x300ffb=!0x0),void 0x0!==_0x165a0f&&_0x1b7487['unlinkedAt']!==_0x165a0f&&(_0x1b7487['unlinkedAt']=_0x165a0f,_0x300ffb=!0x0),_0xc4a684&&!wt(_0xc4a684,_0x1b7487['attributes'])&&(_0x1b7487['attributes']=_0xc4a684,_0x300ffb=!0x0),!_0x300ffb)return Promise['resolve']();if(!_0x1b7487['isSubmitted']||_0x5e9777||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x483f6a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1535f8}=_0x1b7487,_0x18fec0=_0x483f6a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x1535f8,'threadId':_0x2245f9,'context':_0x1edadf,'unlinkedAt':_0x165a0f,'attributes':_0xc4a684})['then'](()=>_0x483f6a['remove'](_0x18fec0))['catch'](_0x66f279=>{throw console['error'](_0x66f279),new _0x160abe('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x343d56){const _0x2d4809=this['context']['plugins']['get'](y),_0x15a035=this['getCommentThread'](_0x343d56);if(_0x15a035['_isAttached']=!0x1,this['_threadToController']['has'](_0x15a035)){const _0x28c5e2=this['_threadToController']['get'](_0x15a035),_0x5c93fa=_0x28c5e2['view'],_0x144a21=_0x2d4809['getByInnerView'](_0x5c93fa);this['_threadToController']['delete'](_0x15a035),this['_viewToController']['delete'](_0x5c93fa),_0x144a21&&_0x2d4809['remove'](_0x144a21),_0x28c5e2['destroy'](),_0x5c93fa['destroy']()['then'](()=>{this['_unbindEditors'](_0x5c93fa);});}}['_updateActiveAnnotation']({threadId:_0x5d50c7,resolvedAt:_0x4f7823,unlinkedAt:_0x550878}){const _0x1cb243=!!_0x4f7823,_0x2e4571=this['context']['plugins']['get'](y),_0x3548a8=this['getCommentThread'](_0x5d50c7);if(this['_threadToController']['has'](_0x3548a8)){const _0x42ebd6=this['_threadToController']['get'](_0x3548a8)['view'],_0x59e5b4=_0x2e4571['getByInnerView'](_0x42ebd6);_0x59e5b4&&(_0x1cb243&&_0x2e4571['_removeActiveAnnotation'](_0x59e5b4),_0x550878?_0x59e5b4['isVisible']=!0x1:_0x59e5b4['refreshVisibility']());}}['_getExternalAuthor'](_0x4c0e97){const _0x2d569c=this['context']['plugins']['get'](it),_0x515c73=pt('external:'+_0x4c0e97),_0x331b7a=_0x2d569c['getUser'](_0x515c73);return _0x331b7a||_0x2d569c['addUser']({'id':_0x515c73,'name':_0x4c0e97});}['_createNewComment']({threadId:_0x331e19,commentId:_0x735a5=_0x27956d(),content:_0x182f33,authorId:_0x522ad9,createdAt:_0x18f313,attributes:_0x2de2ba}){if('string'!=typeof _0x735a5)throw new _0x160abe('commentsrepository-invalid-commentid');if('string'!=typeof _0x522ad9)throw new _0x160abe('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x182f33||!_0x182f33['trim']())throw new _0x160abe('commentsrepository-invalid-comment-content');const _0xf0b7ba=this['context']['plugins']['get'](it)['getUser'](_0x522ad9);if(!_0xf0b7ba)throw new _0x160abe('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x522ad9});let _0x50221d=null,_0x5f8388=_0x18f313;return _0x2de2ba?.['@external']&&(_0x50221d=this['_getExternalAuthor'](_0x2de2ba['@external']['authorName']),_0x5f8388=new Date(_0x2de2ba['@external']['createdAt'])),new wi(this,{'threadId':_0x331e19,'id':_0x735a5,'author':_0x50221d||_0xf0b7ba,'creator':_0xf0b7ba,'content':_0x182f33,'createdAt':_0x18f313,'authoredAt':_0x5f8388,'attributes':_0x2de2ba});}['_addComment'](_0x431950){let {threadId:_0x26e1d1,content:_0xc311ff,attributes:_0x5e9453,isFromAdapter:_0x561571}=_0x431950;const _0x9957e4=this['getCommentThread'](_0x431950['threadId']);if(!_0x9957e4)throw new _0x160abe('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x230bab=this['_createNewComment'](_0x431950),{id:_0xb5e12b}=_0x230bab;if(_0x9957e4['_add'](_0x230bab),_0x561571||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x9957e4['isSubmitted'])return Promise['resolve']();const _0x59bef9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x233ff3}=_0x9957e4,_0x34ccf2=_0x59bef9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5e9453||(_0x5e9453={}),this['adapter']['addComment']({'channelId':_0x233ff3,'threadId':_0x26e1d1,'commentId':_0xb5e12b,'content':_0xc311ff,'attributes':_0x5e9453})['then'](_0x26874b=>{_0x59bef9['remove'](_0x34ccf2),_0x26874b&&this['_updateComment']({'channelId':_0x233ff3,'threadId':_0x26e1d1,'commentId':_0xb5e12b,'createdAt':_0x26874b['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x321cda=>{throw console['error'](_0x321cda),new _0x160abe('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x23fc5d,commentId:_0x2efeaa,content:_0x2cba83,createdAt:_0x14392a,attributes:_0x30af2c,isFromAdapter:_0x1a96dc}){if(void 0x0!==_0x2cba83&&('string'!=typeof _0x2cba83||!_0x2cba83['trim']()['length']))throw new _0x160abe('commentsrepository-update-comment-invalid-content');const _0x6afa0e=this['getCommentThread'](_0x23fc5d),_0x4d0eb0=_0x6afa0e['getComment'](_0x2efeaa);if(!_0x4d0eb0)throw new _0x160abe('commentsrepository-update-missing-comment',this);let _0x337d0c=!0x1;if(_0x2cba83&&_0x2cba83!==_0x4d0eb0['content']&&(_0x4d0eb0['isEditable']||_0x1a96dc)&&(_0x4d0eb0['content']=_0x2cba83,_0x337d0c=!0x0),_0x14392a&&_0x14392a!==_0x4d0eb0['createdAt']&&(_0x4d0eb0['createdAt']=_0x14392a,_0x4d0eb0['attributes']&&_0x4d0eb0['attributes']['@external']||(_0x4d0eb0['authoredAt']=_0x14392a),_0x337d0c=!0x0),_0x30af2c&&!wt(_0x30af2c,_0x4d0eb0['attributes'])&&(_0x4d0eb0['attributes']=_0x30af2c,_0x337d0c=!0x0),!_0x337d0c)return Promise['resolve']();if(_0x6afa0e['fire']('commentUpdated'),_0x1a96dc||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x588f26=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1ffeb8}=this['getCommentThread'](_0x4d0eb0['threadId']),_0x37c15f=_0x588f26['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x1ffeb8,'threadId':_0x23fc5d,'commentId':_0x2efeaa,'content':_0x2cba83,'attributes':_0x30af2c})['then'](()=>_0x588f26['remove'](_0x37c15f))['catch'](_0x157d4c=>{throw console['error'](_0x157d4c),new _0x160abe('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x49f3ea,commentId:_0x341ae5,isFromAdapter:_0x58b768}){const _0x59bf41=this['getCommentThread'](_0x49f3ea),_0x3c119d=_0x59bf41['getComment'](_0x341ae5);if(!_0x3c119d)throw new _0x160abe('commentsrepository-remove-missing-comment',this);if(_0x59bf41['_remove'](_0x3c119d),_0x58b768||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x9219b8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2a7459}=_0x59bf41,_0xcdb0e=_0x9219b8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2a7459,'threadId':_0x49f3ea,'commentId':_0x341ae5})['then'](()=>_0x9219b8['remove'](_0xcdb0e))['catch'](_0x5f28e1=>{throw console['error'](_0x5f28e1),new _0x160abe('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x166ad1(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x106719,_0x3c5a0a){super();const _0x14983b=_0x106719['context']['plugins']['get'](it)['me'],_0x383fe8=_0x106719['getCommentThread'](_0x3c5a0a['threadId']),_0x1e6837=0x0===_0x383fe8['comments']['length'],_0x234cb1=_0x14983b===_0x3c5a0a['author'];this['id']=_0x3c5a0a['id'],this['threadId']=_0x3c5a0a['threadId'],this['author']=_0x3c5a0a['author'],this['creator']=_0x3c5a0a['creator'],this['isExternal']=Boolean(_0x3c5a0a['attributes']&&_0x3c5a0a['attributes']['@external']),this['set']('content',_0x3c5a0a['content']),this['createdAt']=_0x3c5a0a['createdAt']||new Date(),this['set']('authoredAt',_0x3c5a0a['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x383fe8,'resolvedAt'),this['set']('attributes',_0x3c5a0a['attributes']||{}),this['bind']('isEditable')['to'](_0x106719,'_permissions',()=>{const _0x42836a=_0x106719['getPermissions'](_0x383fe8['channelId'])['write'],_0x3c45cb=_0x106719['getPermissions'](_0x383fe8['channelId'])['modifyAll'];return _0x234cb1&&_0x42836a||!_0x234cb1&&_0x3c45cb;}),this['bind']('isRemovable')['to'](_0x383fe8,'isRemovable',_0x106719,'_permissions',_0x55e3d4=>{const _0x4cd755=_0x106719['getPermissions'](_0x383fe8['channelId'])['write'],_0x5271f2=_0x106719['getPermissions'](_0x383fe8['channelId'])['modifyAll'];return _0x234cb1&&_0x4cd755||_0x55e3d4&&_0x1e6837||!_0x234cb1&&_0x5271f2&&!_0x1e6837;}),this['bind']('isReadOnly')['to'](_0x383fe8,'isReadOnly'),this['_repository']=_0x106719;}get['weight'](){return Math['max'](function(_0x4df7db){const _0x4bad11=document['createElement']('div');return _0x4bad11['innerHTML']=_0x4df7db,_0x4bad11['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1a4cf7){const {threadId:_0x44d43b,id:_0x519ec5}=this;if(!this['_repository']['hasCommentThread'](_0x44d43b))throw new _0x160abe('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x595816}=this['_repository']['getCommentThread'](_0x44d43b);this['_repository']['fire'](bt('updateComment',_0x595816,_0x44d43b),{'channelId':_0x595816,'threadId':_0x44d43b,'commentId':_0x519ec5,..._0x1a4cf7});}['setAttribute'](_0x4a6a15,_0x531af2){const _0xa6c81a=It(this['attributes']);At(_0xa6c81a,_0x4a6a15,_0x531af2),this['update']({'attributes':_0xa6c81a});}['removeAttribute'](_0x81e2ac){const _0x13e629=It(this['attributes']);Ct(_0x13e629,_0x81e2ac),this['update']({'attributes':_0x13e629});}['remove'](_0x139e14={}){if(!_0x139e14['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x43d6f7,id:_0x19db07}=this;if(!this['_repository']['hasCommentThread'](_0x43d6f7))throw new _0x160abe('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x4c5293}=this['_repository']['getCommentThread'](_0x43d6f7);this['_repository']['fire'](bt('removeComment',_0x4c5293,_0x43d6f7),{'channelId':_0x4c5293,'threadId':_0x43d6f7,'commentId':_0x19db07,..._0x139e14});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0xd44174,..._0x27cb4c){for(const _0x318ea1 of _0x27cb4c)void 0x0!==_0x318ea1&&(_0xd44174+=':'+String(_0x318ea1));return _0xd44174;}class rt extends _0x7f5ae3{constructor(_0x3d58da){super(_0x3d58da),this['set']('hasContent',!0x1);}['refresh'](){const _0x1c05cd=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x26c5a1 of _0x1c05cd['getRanges']())if(this['_hasContent'](_0x26c5a1))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x2b9108=_0x27956d(),ranges:_0x3187b4,comment:_0x4cd547}={}){const _0x170259=this['editor']['model'],_0x4e7dc6=_0x3187b4??Array['from'](_0x170259['document']['selection']['getRanges']()),_0x1040c4=[];for(const _0x37ce89 of _0x4e7dc6)this['_hasContent'](_0x37ce89)&&_0x1040c4['push'](this['_trimToContent'](_0x37ce89));if(!_0x1040c4['length'])throw new _0x160abe('addcommentthreadcommand-incorrect-ranges',null);_0x4cd547&&this['_createCommentThread'](_0x2b9108,_0x4cd547),this['_createMarkersFromRanges'](_0x2b9108,_0x1040c4,!!_0x4cd547);}['_createMarkersFromRanges'](_0x1119fc,_0x563bfe,_0xa5912d){this['editor']['model']['change'](_0x333423=>{for(const _0xe0b2 of _0x563bfe){const _0x201f38=_0x27956d()['substr'](0x1,0x5),_0x173c9c='comment:'+_0x1119fc+':'+_0x201f38;_0x333423['addMarker'](_0x173c9c,{'range':_0xe0b2,'usingOperation':_0xa5912d,'affectsData':_0xa5912d});}});}['_createCommentThread'](_0x51ac54,_0x361a51){const _0x24f8b4=this['editor']['plugins']['get']('CommentsRepository'),_0x96a359=this['editor']['config']['get']('collaboration.channelId'),_0x2df272=this['editor']['plugins']['get']('Users')['me'];if(!_0x2df272)throw new _0x160abe('addcommentthreadcommand-user-not-found',null);_0x24f8b4['addCommentThread']({'threadId':_0x51ac54,'channelId':_0x96a359,'comments':[{'authorId':_0x2df272['id'],'content':_0x361a51,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x1b0cfe){for(const _0x3f96d1 of _0x1b0cfe['getItems']())if(this['_itemIsContent'](_0x3f96d1))return!0x0;return!0x1;}['_itemIsContent'](_0xdd2019){return _0xdd2019['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0xdd2019)&&!_0xdd2019['is']('element','tableCell');}['_trimToContent'](_0x4a5ca2){const _0x58254f=_0x5bcb91=>!this['_itemIsContent'](_0x5bcb91['item']),_0x5c85d3=_0x4a5ca2['start']['getLastMatchingPosition'](_0x58254f),_0x26c94e=_0x4a5ca2['end']['getLastMatchingPosition'](_0x58254f,{'direction':'backward'});return this['editor']['model']['createRange'](_0x5c85d3,_0x26c94e);}}class b extends _0x1a45c0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3911c4){super(_0x3911c4),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2121af=this['editor'],_0x3868c7=_0x2121af['model']['document']['selection'],_0x278c8e=_0x35cf6e(()=>this['refreshSelectedViews'](),0xa);_0x3868c7['on']('change:range',(_0x474145,_0x36bace)=>{_0x36bace['directChange']&&(_0x278c8e['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2121af['editing']['view']['document'],'change:isFocused',(_0x2bd9fc,_0x51fbf9,_0x2837fc)=>{_0x2837fc&&_0x278c8e();}),this['listenTo'](_0x2121af['ui']['focusTracker'],'change:isFocused',(_0x355242,_0x65cf49,_0x9cdbd5)=>{_0x9cdbd5||_0x2121af['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x574f86=>this['_editorAnnotationsData']['has'](_0x574f86['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3c8996){if(this['_editorAnnotations']['has'](_0x3c8996['view']))return;this['_editorAnnotations']['add'](_0x3c8996['view']),this['editor']['ui']['focusTracker']['add'](_0x3c8996['view']['element']);const _0x165ef7=this['editor']['plugins']['get'](y);this['listenTo'](_0x165ef7['collection'],'remove',(_0x10acb8,_0x2a5ee3)=>{this['editor']['ui']['focusTracker']['remove'](_0x2a5ee3['view']['element']),this['_editorAnnotations']['delete'](_0x2a5ee3['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x395ed7){if('function'!=typeof _0x395ed7)throw new _0x160abe('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x395ed7);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1e8f07,annotations:_0x298828}){const _0x1d0bb3=[],_0x1e6ae9=this['editor']['model']['document']['selection'],_0x4b375e=Array['from'](_0x1e6ae9['getRanges']());for(const [_0x4782f0,_0x566793]of this['_editorAnnotationsData']){const _0x2ff8c1=_0x9277c5(_0x566793),_0x200c0a=_0x298828['getByInnerView'](_0x4782f0);_0x2ff8c1&&_0x200c0a&&_0x1d0bb3['push']({'annotation':_0x200c0a,'range':_0x2ff8c1});}function _0x9277c5(_0x157a0b){for(const _0x2c76e4 of _0x157a0b)for(const _0x51da6e of _0x4b375e)if(_0x2c76e4['containsRange'](_0x51da6e,!_0x1e6ae9['isCollapsed']))return _0x2c76e4;return null;}return _0x1d0bb3['sort']((_0x56b2f9,_0x44242e)=>{const _0x2b3b7a=_0x56b2f9['range'],_0xf6b5e1=_0x44242e['range'];if(!_0x2b3b7a['isEqual'](_0xf6b5e1)){if(_0x2b3b7a['containsRange'](_0xf6b5e1,!0x0))return 0x1;if(_0xf6b5e1['containsRange'](_0x2b3b7a,!0x0))return-0x1;}return _0x56b2f9['annotation']==_0x1e8f07?-0x1:_0x44242e['annotation']==_0x1e8f07?0x1:0x0;})['map'](_0x51c81f=>_0x51c81f['annotation']);}get['_editorAnnotationsData'](){const _0x10c2ba=new Map();for(const _0x9fd0aa of Array['from'](this['_dataCollectors']))for(const [_0x3a81bb,_0x419e8e]of _0x9fd0aa())_0x10c2ba['set'](_0x3a81bb,_0x419e8e);return _0x10c2ba;}}class st extends _0x1a45c0{['afterInit'](){const _0x304166=this['editor'];if(!_0x304166['plugins']['has']('RestrictedEditingModeEditing'))return;_0x304166['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x1a45c0{constructor(_0xb730c0){super(_0xb730c0),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x1b96fa=this['editor'],_0x166969=_0x1b96fa['commands']['get']('importWord'),_0x2c61f2=_0x1b96fa['plugins']['get'](it);_0x166969&&(_0x166969['on']('execute',(_0x3ecdd9,[,_0x572f20])=>{_0x572f20['collaboration_features']={'comments':!0x0,'user_id':_0x2c61f2['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x166969,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x29364f,_0x54bec8){const {comment_threads:_0x5ee849}=_0x54bec8;_0x5ee849&&_0x5ee849['forEach'](({thread_id:_0x196c57,comments:_0x4af727,is_resolved:_0x6e8a4f})=>{const _0xac6175=new Date(),_0x3f77b6=_0x4af727['map'](({author:_0x378be3,content:_0x269d15,created_at:_0x582ca0})=>({'content':_0x269d15,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0xac6175,'attributes':{'@external':{'authorName':_0x378be3,'createdAt':_0x582ca0?new Date(_0x582ca0):new Date(),'source':'importWord'}}})),_0x7e1193=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x7e1193,'threadId':_0x196c57,'comments':_0x3f77b6,'resolvedAt':_0x6e8a4f?_0xac6175:null});});}}class at extends _0x1a45c0{constructor(_0x1b5e81){super(_0x1b5e81),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x110a03=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x110a03,'contentInsertion',(_0x4e29c8,_0x57d9d6)=>this['_removeMarkersWithoutThreads'](_0x57d9d6['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3deae3){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3deae3;const _0x800fcb=this['editor']['plugins']['get']('CommentsRepository');for(const _0x394e57 of _0x3deae3['keys']()){const [_0xdfc4f3,_0x484322]=_0x394e57['split'](':');'comment'!=_0xdfc4f3||_0x800fcb['hasCommentThread'](_0x484322)||_0x3deae3['delete'](_0x394e57);}return _0x3deae3;}['_registerMarkerInClipboardPipeline'](){const _0x5b2c66=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x3d8e6b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x3d8e6b&&_0x5b2c66['_registerMarkerToCopy']('comment',_0x3d8e6b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1227f3){switch(_0x1227f3){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 _0x1a45c0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2abdbc,_0x4c6f98)=>{if(!_0x4c6f98['options']['showCommentHighlights'])return null;if(_0x4c6f98['options']['ignoreResolvedComments']){const {id:_0x1f2c50}=er(_0x2abdbc['markerName']),_0x190284=this['editor']['plugins']['get'](o);if(_0x190284['getCommentThread'](_0x1f2c50)?.['isResolved']&&_0x2abdbc['item'])return _0x4c6f98['consumable']['consume'](_0x2abdbc['item'],'addMarker:'+_0x2abdbc['markerName']),_0x4c6f98['consumable']['consume'](_0x2abdbc['item'],'removeMarker:'+_0x2abdbc['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4b06e0=>{_0x4b06e0['on']('addMarker:comment',(_0x385761,_0x10f91c,_0x10db72)=>{if(!_0x10db72['options']['showCommentHighlights'])return;const _0x3c040a=_0x10f91c['item'];if(!_0x3c040a)return;const _0x137960=_0x10db72['mapper']['toViewElement'](_0x3c040a);this['editor']['model']['schema']['isObject'](_0x3c040a)&&_0x137960&&!_0x137960['getCustomProperty']('widget')&&_0x137960['is']('containerElement')&&_0x58281d(_0x137960,_0x10db72['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x5341aa,{writer:_0x3caeb7,options:_0x2a2762})=>{if(!_0x2a2762['showCommentHighlights'])return null;const _0x59d5e0=_0x3caeb7['createContainerElement']('div'),_0x62fa93=_0x3caeb7['createEmptyElement']('hr');return _0x3caeb7['addClass']('ck-horizontal-line',_0x59d5e0),_0x3caeb7['insert'](_0x3caeb7['createPositionAt'](_0x59d5e0,0x0),_0x62fa93),_0x59d5e0;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x30b2ec,{writer:_0x2ebb40,options:_0x309480})=>{if(!_0x309480['showCommentHighlights'])return null;const _0x5c2796=_0x2ebb40['createContainerElement']('span'),_0x3e3fcf=_0x2ebb40['createEmptyElement']('img');return _0x2ebb40['addClass']('image-inline',_0x5c2796),_0x2ebb40['insert'](_0x2ebb40['createPositionAt'](_0x5c2796,0x0),_0x3e3fcf),_0x5c2796;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x513438,{writer:_0xec3ffa,options:_0x28a1a2})=>{if(_0x28a1a2['showCommentHighlights'])return _0xec3ffa['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x56f999,_0x4a3c5e,_0x5f191c)=>{_0x5f191c['options']['showCommentHighlights']&&_0x56f999['stop']();},{'priority':'high'});}}class r extends _0x1a45c0{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(_0x1af408){super(_0x1af408),this['set']('isThreadsLoadingPaused',!0x0),_0x1af408['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x400147,_0x310ff1,_0xe8c3d3,_0x114193)=>{const _0x71f224=_0x1af408['plugins']['get'](o),_0x5404fb=_0xe8c3d3?er(_0xe8c3d3)['id']:null;_0x1af408['model']['change'](()=>{if(_0x5404fb){const _0x5d47da=this['getAllMarkersForId'](_0x5404fb);for(const _0x2ba14c of _0x5d47da)_0x1af408['editing']['reconvertMarker'](_0x2ba14c);}if(_0x114193){const {id:_0x539dbc}=er(_0x114193),_0x528fa2=_0x71f224['getCommentThread'](_0x539dbc);if(_0x528fa2&&_0x528fa2['unlinkedAt'])return;if(_0x528fa2&&!_0x528fa2['isAttached'])return;const _0x39766a=this['getAllMarkersForId'](_0x539dbc);for(const _0x35ef10 of _0x39766a)_0x1af408['editing']['reconvertMarker'](_0x35ef10);}}),_0x5404fb&&this['scrollToThreadMarker'](_0x5404fb);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2a6ee2=this['editor'],_0x11d490=_0x2a6ee2['plugins']['get'](o),_0x48a62f=_0x2a6ee2['config']['get']('collaboration.channelId'),_0x49719e=_0x11d490['getCommentThreads']()['filter'](_0x21f7ae=>_0x21f7ae['channelId']!==_0x48a62f);_0x2a6ee2['commands']['add']('addCommentThread',new rt(_0x2a6ee2)),this['listenTo'](_0x2a6ee2,'change:isReadOnly',(_0x10815f,_0x416f13,_0x31aeea)=>{_0x11d490['switchReadOnly'](_0x31aeea,_0x2a6ee2['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x11d490,ft('addCommentThread',_0x48a62f),(_0x14c461,{threadId:_0x3da422})=>{const _0x2513ae=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3da422);_0x2513ae?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3da422);}),this['listenTo'](_0x11d490,ft('removeCommentThread',_0x48a62f),(_0x48023a,{threadId:_0x1dac36})=>{_0x2a6ee2['model']['enqueueChange']({'isUndoable':!0x1},_0x5dc1d9=>{const _0x134c9d=this['getAllMarkersForId'](_0x1dac36);for(const _0x7b8fa5 of _0x134c9d)_0x5dc1d9['removeMarker'](_0x7b8fa5);});}),this['listenTo'](_0x11d490,ft('resolveCommentThread',_0x48a62f),(_0x561efa,{threadId:_0x1541bc})=>{(this['_reconvertMarkers'](_0x1541bc),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x1541bc)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x11d490,ft('reopenCommentThread',_0x48a62f),(_0xe250e1,{threadId:_0x16a416})=>{this['_reconvertMarkers'](_0x16a416);},{'priority':'low'}),this['listenTo'](_0x11d490,ft('addComment',_0x48a62f),(_0x5f0aed,{threadId:_0x56bb68,isFromAdapter:_0x54ad23})=>{const _0x557e49=this['getAllMarkersForId'](_0x56bb68);if(_0x54ad23||0x0==_0x557e49['length']||!_0x11d490['hasCommentThread'](_0x56bb68))return;0x1===_0x11d490['getCommentThread'](_0x56bb68)['length']&&_0x2a6ee2['model']['enqueueChange']({'isUndoable':!0x1},_0x2440ca=>{for(const _0xa0007b of _0x557e49)_0x2440ca['updateMarker'](_0xa0007b,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x49719e);}['afterInit'](){!async function(_0x240a97){const _0x3b2583=_0x4c4d1d([0x6e,0x56,0x4f,0x38,0x66,0x61,0x41,0x58,0x33,0x4e,0x45,0x35,0x54,0x4c,0x49,0x37,0x73,0x6a,0x69,0x4d,0x78,0x71,0x51,0x43,0x31,0x50,0x53,0x79,0x62,0x74,0x75,0x77,0x67,0x72,0x32,0x36,0x39,0x68,0x30,0x48,0x57,0x47,0x4a,0x64,0x55,0x42,0x7a,0x34,0x6f,0x44,0x6c,0x63,0x6d,0x70,0x76,0x52,0x46,0x4b,0x5a,0x65,0x59,0x6b]),_0x3b6e6f=0x2f488976,_0x470cfe=0x2f4fe466^_0x3b6e6f,_0x206bfd=window[_0x4c4d1d([0x44,0x61,0x74,0x65])][_0x4c4d1d([0x6e,0x6f,0x77])](),_0xc00643=_0x240a97[_0x4c4d1d([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x53824e=new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x493125=>{_0xc00643[_0x4c4d1d([0x6f,0x6e,0x63,0x65])](_0x4c4d1d([0x72,0x65,0x61,0x64,0x79]),_0x493125);}),_0x2abc32={[_0x4c4d1d([0x6b,0x74,0x79])]:_0x4c4d1d([0x45,0x43]),[_0x4c4d1d([0x75,0x73,0x65])]:_0x4c4d1d([0x73,0x69,0x67]),[_0x4c4d1d([0x63,0x72,0x76])]:_0x4c4d1d([0x50,0x2d,0x32,0x35,0x36]),[_0x4c4d1d([0x78])]:_0x4c4d1d([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]),[_0x4c4d1d([0x79])]:_0x4c4d1d([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]),[_0x4c4d1d([0x61,0x6c,0x67])]:_0x4c4d1d([0x45,0x53,0x32,0x35,0x36])},_0x2d3c30=_0xc00643[_0x4c4d1d([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x4c4d1d([0x67,0x65,0x74])](_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x52b14e(){let _0x32fb05,_0x21ba5a=null,_0xcb2f3e=null;try{if(_0x2d3c30==_0x4c4d1d([0x47,0x50,0x4c]))return _0x4c4d1d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x32fb05=_0x84a47d(),!_0x32fb05)return _0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x32fb05[_0x4c4d1d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xcb2f3e=_0x48955e(_0x32fb05[_0x4c4d1d([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x32fb05[_0x4c4d1d([0x6a,0x74,0x69])])),await _0x4de8c3()?_0x5c92d5()?_0x4bea2f()?_0x4c4d1d([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x449438()?(_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c4d1d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x21ba5a=_0x5bd172(_0x4c4d1d([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x4c4d1d([0x74,0x72,0x69,0x61,0x6c])&&(_0x21ba5a=_0x5bd172(_0x4c4d1d([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5b16dd()):_0x4c4d1d([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x4c4d1d([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x4c4d1d([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4bea2f(){const _0x9b6caa=[_0x4c4d1d([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x4c4d1d([0x74,0x72,0x69,0x61,0x6c])][_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x206bfd/0x3e8:0xe10*_0x470cfe;return _0x32fb05[_0x4c4d1d([0x65,0x78,0x70])]<_0x9b6caa;}function _0x5c92d5(){const _0x167b8d=_0x32fb05[_0x4c4d1d([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x167b8d)return!0x1;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x2a])))return!0x0;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x43,0x4d,0x54])))return!0x0;if(_0x167b8d[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x52,0x43,0x4d,0x54]))){if(_0x14bab2())return!0x0;if(_0x75976c()||_0x36389c())return!0x0;}return!0x1;}function _0x449438(){const _0x593f00=_0x32fb05[_0x4c4d1d([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x593f00||0x0==_0x593f00[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x2bd16b}=new URL(window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x593f00[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2bd16b))return!0x0;const _0x211ad2=_0x2bd16b[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e]));return _0x593f00[_0x4c4d1d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xf718b5=>_0xf718b5[_0x4c4d1d([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4c4d1d([0x2a])))[_0x4c4d1d([0x6d,0x61,0x70])](_0x356252=>_0x356252[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e])))[_0x4c4d1d([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1a9f5e=>_0x1a9f5e[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x211ad2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c4d1d([0x6d,0x61,0x70])](_0x395c4b=>Array(_0x211ad2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x395c4b[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x4c4d1d([0x66,0x69,0x6c,0x6c])](_0x395c4b[0x0]===_0x4c4d1d([0x2a])?_0x4c4d1d([0x2a]):'')[_0x4c4d1d([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x395c4b))[_0x4c4d1d([0x73,0x6f,0x6d,0x65])](_0x1127d9=>_0x211ad2[_0x4c4d1d([0x65,0x76,0x65,0x72,0x79])]((_0x4b5649,_0x25997f)=>_0x1127d9[_0x25997f]===_0x4b5649||_0x1127d9[_0x25997f]===_0x4c4d1d([0x2a])));}function _0x5b16dd(){return _0x21ba5a&&_0xcb2f3e?new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x524285,_0x3dc15a)=>{_0x21ba5a[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x524285,_0x3dc15a),_0xcb2f3e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x2f5958=>{_0x2f5958!=_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])&&_0x524285(_0x2f5958);},_0x3dc15a);}):_0x21ba5a||_0xcb2f3e||_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]);}}function _0x48955e(_0x363d29,_0x307756){return new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x10e4db=>{if(_0x57fde1())return _0x10e4db(_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]));_0x44cbf8(),_0xc00643[_0x4c4d1d([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xa06a92=!0x1;const _0x54de26=_0x27956d();function _0x1146e6(_0x54241d){return!!_0x54241d&&(typeof _0x54241d===_0x4c4d1d([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x54241d===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x54241d[_0x4c4d1d([0x74,0x68,0x65,0x6e])]===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x54241d[_0x4c4d1d([0x63,0x61,0x74,0x63,0x68])]===_0x4c4d1d([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1475f2(_0x2efc75){_0x2ce6d8(_0x2efc75)[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x33b383=>{if(!_0x33b383||_0x33b383[_0x4c4d1d([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x4c4d1d([0x6f,0x6b]))return _0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x511ca0(_0x8790f(_0x54de26+_0x307756))!=_0x33b383[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64]);})[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x4bfc15=>(_0x54800e(),_0x4bfc15),()=>{const _0x1022ea=_0x5327c7();return null==_0x1022ea?(_0x54800e(),_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])):_0x4c4d1d(_0x206bfd-_0x1022ea>(0xb440d76^_0x3b6e6f)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x10e4db)[_0x4c4d1d([0x63,0x61,0x74,0x63,0x68])](()=>{_0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0xe9d9a5=0x2f7e67f6^_0x3b6e6f;function _0x54800e(){const _0x3f8298=_0x4c4d1d([0x6c,0x6c,0x63,0x74,0x2d])+_0x511ca0(_0x8790f(_0x363d29)),_0x45f967=_0x36df06(_0x511ca0(window[_0x4c4d1d([0x4d,0x61,0x74,0x68])][_0x4c4d1d([0x63,0x65,0x69,0x6c])](_0x206bfd/_0xe9d9a5)));window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c4d1d([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3f8298,_0x45f967);}function _0x5327c7(){const _0xcd74fb=_0x4c4d1d([0x6c,0x6c,0x63,0x74,0x2d])+_0x511ca0(_0x8790f(_0x363d29)),_0x554a62=window[_0x4c4d1d([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x4c4d1d([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xcd74fb);return _0x554a62?window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x36df06(_0x554a62),0x10)*_0xe9d9a5:null;}function _0x2ce6d8(_0x402e98){return new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x329657,_0x4dd7be)=>{_0x402e98[_0x4c4d1d([0x74,0x68,0x65,0x6e])](_0x329657,_0x4dd7be),window[_0x4c4d1d([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4dd7be,0x2f495db6^_0x3b6e6f);});}}_0xc00643[_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x244408,_0x5bd347)=>{if(_0x5bd347[0x0]!=_0x363d29)return _0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5bd347[0x1]={..._0x5bd347[0x1],[_0x4c4d1d([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x54de26};},{[_0x4c4d1d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c4d1d([0x68,0x69,0x67,0x68])}),_0xc00643[_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x469e04=>{_0x1146e6(_0x469e04[_0x4c4d1d([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xa06a92=!0x0,_0x1475f2(_0x469e04[_0x4c4d1d([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x4c4d1d([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x4c4d1d([0x6c,0x6f,0x77])}),_0x53824e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>{_0xa06a92||_0x10e4db(_0x4c4d1d([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x57fde1(){return _0xc00643[_0x4c4d1d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c4d1d([0x76,0x69,0x65,0x77])][_0x4c4d1d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x4c4d1d([0x61,0x75,0x74,0x6f]);}function _0x44cbf8(){_0xc00643[_0x4c4d1d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x4c4d1d([0x76,0x69,0x65,0x77])][_0x4c4d1d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x4c4d1d([0x61,0x75,0x74,0x6f]);}}function _0x5bd172(_0x8c0cc4){const _0x216a4a=[new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x248079=>setTimeout(_0x248079,0x2f41b7ba^_0x3b6e6f)),_0x53824e[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>new window[(_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5f1b58=>{let _0x123d09=0x0;_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x6f,0x6e])](_0x4c4d1d([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x484181,_0x45811e)=>{_0x45811e[0x0][_0x4c4d1d([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x123d09++,_0x123d09==(0x2f48888e^_0x3b6e6f)&&(_0x5f1b58(),_0x484181[_0x4c4d1d([0x6f,0x66,0x66])]());});}))];return window[_0x4c4d1d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x4c4d1d([0x72,0x61,0x63,0x65])](_0x216a4a)[_0x4c4d1d([0x74,0x68,0x65,0x6e])](()=>_0x8c0cc4);}async function _0x25e341(){await _0x53824e,_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16138c,_0xc00643[_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c])][_0x4c4d1d([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16138c,_0xc00643[_0x4c4d1d([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x4c4d1d([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x14bab2(){return _0x302f85(_0x4c4d1d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x43bf14(_0x4c4d1d([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x4c4d1d([0x73,0x74,0x61,0x74,0x65])]==_0x4c4d1d([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x75976c(){return _0x302f85(_0x4c4d1d([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 _0x36389c(){return _0x302f85(_0x4c4d1d([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4e34a9(_0x6b2b1c){const _0x4f533f=_0x2a0ea8();_0xc00643[_0x4f533f]=_0x4c4d1d([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x6b2b1c,_0x6b2b1c!=_0x4c4d1d([0x56,0x61,0x6c,0x69,0x64])&&_0x25e341();}function _0x2a0ea8(){const _0xb943f8=window[_0x4c4d1d([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x4c4d1d([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x4c4d1d([0x6e,0x6f,0x77])]())[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x4c4d1d([0x2e]),'');let _0x5718fe=_0x4c4d1d([0x6e]);for(let _0x1ebb2b=0x0;_0x1ebb2b<_0xb943f8[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ebb2b+=0x2){let _0x20bb59=window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xb943f8[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ebb2b,_0x1ebb2b+0x2));_0x20bb59>=_0x3b2583[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x20bb59-=_0x3b2583[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x5718fe+=_0x3b2583[_0x20bb59];}return _0x5718fe;}function _0x84a47d(){const _0x1e5efe=_0x2d3c30[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e]));if(0x3!=_0x1e5efe[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x271be0(_0x1e5efe[0x1]);function _0x271be0(_0x4df98a){const _0x5da874=_0x4859dc(_0x4df98a);return _0x5da874&&_0x5a2ece()?_0x5da874:null;function _0x5a2ece(){const _0xd461b2=_0x5da874[_0x4c4d1d([0x6a,0x74,0x69])],_0x3c0c52=window[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0xd461b2[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0xd461b2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x96d32={..._0x5da874,[_0x4c4d1d([0x6a,0x74,0x69])]:_0xd461b2[_0x4c4d1d([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0xd461b2[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x96d32[_0x4c4d1d([0x76,0x63])],_0x8790f(_0x96d32)==_0x3c0c52;}}}async function _0x4de8c3(){let _0x264675=!0x0;try{const _0x2ca999=_0x2d3c30[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])](_0x4c4d1d([0x2e])),[_0x5386cd,_0x1b5a45,_0x5a81ff]=_0x2ca999;return _0x12a0fc(_0x5386cd),await _0xc2458a(_0x5386cd,_0x1b5a45,_0x5a81ff),_0x264675;}catch{return!0x1;}function _0x12a0fc(_0x21a29b){const _0xba8dd5=_0x4859dc(_0x21a29b);_0xba8dd5&&_0xba8dd5[_0x4c4d1d([0x61,0x6c,0x67])]==_0x4c4d1d([0x45,0x53,0x32,0x35,0x36])||(_0x264675=!0x1);}async function _0xc2458a(_0x5da7b,_0xefde93,_0x343bd8){const _0x4a93d9=window[_0x4c4d1d([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x4c4d1d([0x66,0x72,0x6f,0x6d])](_0x5b66e9(_0x343bd8),_0x33818d=>_0x33818d[_0x4c4d1d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1fe51c=new window[(_0x4c4d1d([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x4c4d1d([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x5da7b+_0x4c4d1d([0x2e])+_0xefde93),_0x1c0b70=window[_0x4c4d1d([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x4c4d1d([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x1c0b70)return;const _0x48c4d3=await _0x1c0b70[_0x4c4d1d([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x4c4d1d([0x6a,0x77,0x6b]),_0x2abc32,{[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x45,0x43,0x44,0x53,0x41]),[_0x4c4d1d([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x4c4d1d([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x1c0b70[_0x4c4d1d([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x45,0x43,0x44,0x53,0x41]),[_0x4c4d1d([0x68,0x61,0x73,0x68])]:{[_0x4c4d1d([0x6e,0x61,0x6d,0x65])]:_0x4c4d1d([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x48c4d3,_0x4a93d9,_0x1fe51c)||(_0x264675=!0x1);}}function _0x4859dc(_0x5a20f5){return _0x5a20f5[_0x4c4d1d([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x4c4d1d([0x65,0x79]))?JSON[_0x4c4d1d([0x70,0x61,0x72,0x73,0x65])](_0x5b66e9(_0x5a20f5)):null;}function _0x5b66e9(_0x54d892){return window[_0x4c4d1d([0x61,0x74,0x6f,0x62])](_0x54d892[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x4c4d1d([0x2b]))[_0x4c4d1d([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x4c4d1d([0x2f])));}function _0x8790f(_0x224cbf){let _0x3cad6f=0x1505;function _0x27fd5c(_0x506dab){for(let _0x3950b1=0x0;_0x3950b1<_0x506dab[_0x4c4d1d([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x3950b1++){const _0xe78ef7=_0x506dab[_0x4c4d1d([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x3950b1);_0x3cad6f=(_0x3cad6f<<0x5)+_0x3cad6f+_0xe78ef7,_0x3cad6f&=_0x3cad6f;}}function _0x1d4be5(_0x43b322){Array[_0x4c4d1d([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x43b322)?_0x43b322[_0x4c4d1d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1d4be5):_0x43b322&&typeof _0x43b322==_0x4c4d1d([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x4c4d1d([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x43b322)[_0x4c4d1d([0x73,0x6f,0x72,0x74])]()[_0x4c4d1d([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x533de7,_0x303abb])=>{_0x27fd5c(_0x533de7),_0x1d4be5(_0x303abb);}):_0x27fd5c(window[_0x4c4d1d([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x43b322));}return _0x1d4be5(_0x224cbf),_0x3cad6f>>>0x0;}function _0x511ca0(_0x91f1e2){return _0x91f1e2[_0x4c4d1d([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x4c4d1d([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x4c4d1d([0x30]));}function _0x36df06(_0x595add){return _0x595add[_0x4c4d1d([0x73,0x70,0x6c,0x69,0x74])]('')[_0x4c4d1d([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x4c4d1d([0x6a,0x6f,0x69,0x6e])]('');}function _0x302f85(_0x5221e3){return _0xc00643[_0x4c4d1d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c4d1d([0x68,0x61,0x73])](_0x5221e3);}function _0x43bf14(_0x40e6a7){return _0xc00643[_0x4c4d1d([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x4c4d1d([0x67,0x65,0x74])](_0x40e6a7);}function _0x16138c(){}function _0x4c4d1d(_0x479cff){return _0x479cff['map'](_0x156bcd=>String['fromCharCode'](_0x156bcd))['join']('');}_0x4e34a9(await _0x52b14e());}(this);}['destroy'](){const _0x228137=this['editor']['plugins']['get'](o),_0x10cb61=this['editor']['config']['get']('collaboration.channelId');for(const _0x55582b of _0x228137['getCommentThreads']({'channelId':_0x10cb61}))_0x228137['_detachCommentThread'](_0x55582b['id']),_0x228137['_threads']['delete'](_0x55582b['id']);super['destroy']();}['hasMarkerForId'](_0x135ad5){return this['getAllMarkersForId'](_0x135ad5)['length']>0x0;}['getAllMarkersForId'](_0x4225aa){const _0x41125c=[];for(const _0x5acd79 of this['editor']['model']['markers'])_0x5acd79['name']['startsWith']('comment:'+_0x4225aa)&&_0x41125c['push'](_0x5acd79);return _0x41125c;}['scrollToThreadMarker'](_0xf6a942){setTimeout(()=>{const _0x29147f=this['_getTargetForId'](_0xf6a942);if(!_0x29147f)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0xf6a942&&nt({'target':_0x29147f[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x4dc60b){this['editor']['model']['change'](()=>{for(const _0x1c9360 of this['getAllMarkersForId'](_0x4dc60b))this['editor']['editing']['reconvertMarker'](_0x1c9360);});}['_attachArchivedThread'](_0x130cc3){const _0x3646e3=this['editor']['plugins']['get'](o),_0x13976d=this['editor']['plugins']['get'](b),_0x5071a1=_0x3646e3['getCommentThread'](_0x130cc3);if(!_0x5071a1['isAttached']){const _0x584a60=_0x5071a1['attachTo'](()=>this['_getTargetForId'](_0x5071a1['id']));_0x13976d['registerAnnotation'](_0x584a60),_0x5071a1['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3d92d1=this['editor'],_0x55031d=_0x3d92d1['plugins']['get'](it);_0x3d92d1['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x22de38,_0x38c922)=>{const {id:_0x54ddb7}=er(_0x22de38['markerName']),_0x37f30b=_0x3d92d1['plugins']['get'](o)['getCommentThread'](_0x54ddb7),_0x403d73=this['activeMarker']&&er(this['activeMarker'])['id']===_0x54ddb7;let _0x1f80d3;if(_0x37f30b&&_0x37f30b['isResolved']&&!_0x403d73&&_0x22de38['item'])return _0x38c922['consumable']['consume'](_0x22de38['item'],'addMarker:'+_0x22de38['markerName']),_0x38c922['consumable']['consume'](_0x22de38['item'],'removeMarker:'+_0x22de38['markerName']),null;const _0x454c2a=['ck-comment-marker'];return _0x403d73&&_0x454c2a['push']('ck-comment-marker--active'),_0x1f80d3=_0x37f30b?.['length']?_0x37f30b['comments']['first']['author']['id']:_0x55031d['me']['id'],{'classes':_0x454c2a,'attributes':{'data-comment':_0x54ddb7,'data-author-id':_0x1f80d3}};}}),_0x3d92d1['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3d1d41,{options:_0x219ffb})=>{if(_0x219ffb['showCommentHighlights'])return null;const _0x593ad1=_0x3d92d1['plugins']['get'](o),_0x33c422=_0x3d92d1['model']['markers']['get'](_0x3d1d41),{id:_0x4999b4,part:_0x53ce17}=er(_0x3d1d41);return _0x33c422&&!_0x33c422['affectsData']||_0x219ffb['ignoreResolvedComments']&&_0x593ad1['getCommentThread'](_0x4999b4)?.['isResolved']?null:{'group':'comment','name':_0x53ce17?_0x4999b4+':'+_0x53ce17:_0x4999b4};}}),_0x3d92d1['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x888dda,{writer:_0x506d39})=>_0x506d39['createElement']('$marker',{'data-name':'comment:'+_0x888dda['getAttribute']('id')})}),_0x3d92d1['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x18fe1a=this['editor'],_0x4e43d0=_0x18fe1a['plugins']['get'](o),_0x25b127=new Set(),_0x46998a=new Set();_0x18fe1a['model']['document']['registerPostFixer'](_0x5ea0b1=>{let _0x41c9d7=!0x1;for(const {name:_0x281244,data:_0x291f58}of _0x18fe1a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x35f2e1,id:_0xc834e3}=er(_0x281244);let _0x5bea70=_0x291f58['newRange'];if('comment'!==_0x35f2e1||!_0x5bea70)continue;const _0x4accbc='$graveyard'===_0x5bea70['root']['rootName'];_0x4accbc||(_0x5bea70=dt(_0x5bea70,_0x18fe1a['model']),!_0x5bea70||_0x5bea70['isCollapsed']||!_0x291f58['newRange']||_0x5bea70['isEqual'](_0x291f58['newRange']))?_0x18fe1a['model']['hasContent'](_0x5bea70)&&!_0x4accbc?this['isThreadsLoadingPaused']?_0x25b127['add'](_0x281244):this['_handleThreadMarker'](_0x281244,_0xc834e3):(_0x46998a['add'](_0x281244),_0x25b127['delete'](_0x281244),_0x5ea0b1['removeMarker'](_0x281244),_0x41c9d7=!0x0):(_0x5ea0b1['updateMarker'](_0x281244,{'range':_0x5bea70}),_0x41c9d7=!0x0);}return _0x41c9d7;}),this['on']('change:isThreadsLoadingPaused',(_0x3c093b,_0x35954e,_0x3cb644)=>{if(!_0x3cb644&&_0x25b127['size'])for(const _0x3bf870 of _0x25b127){const {id:_0x34d816}=er(_0x3bf870);_0x25b127['delete'](_0x3bf870),_0x18fe1a['model']['markers']['get'](_0x3bf870)&&this['_handleThreadMarker'](_0x3bf870,_0x34d816);}}),this['listenTo'](_0x18fe1a['model']['document'],'change',()=>{for(const {name:_0x3858d5,data:{newRange:_0x43ecdd}}of _0x18fe1a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x269248,id:_0x394ee3}=er(_0x3858d5);if('comment'!==_0x269248)continue;const _0x4a1ba1=_0x4e43d0['getCommentThread'](_0x394ee3),_0x39dde6=this['hasMarkerForId'](_0x394ee3);_0x4a1ba1&&(!_0x4a1ba1['_hasTargetInContent']&&_0x43ecdd&&_0x18fe1a['editing']['view']['once']('render',()=>{const _0x2aed22=_0x18fe1a['plugins']['get'](y),_0x22a6af=_0x4e43d0['_threadToController']['get'](_0x4a1ba1)['view'];_0x2aed22['getByInnerView'](_0x22a6af)['refreshVisibility']();},{'priority':'low'}),_0x4a1ba1['_hasTargetInContent']=_0x39dde6||!!_0x43ecdd),_0x43ecdd||(_0x46998a['add'](_0x3858d5),_0x25b127['delete'](_0x3858d5));}for(const _0x27aed5 of _0x46998a){const {id:_0x127ef3}=er(_0x27aed5),_0x3f2a63=_0x4e43d0['getCommentThread'](_0x127ef3);if(_0x25b127['delete'](_0x27aed5),!_0x3f2a63)continue;const _0x4e1f02=this['hasMarkerForId'](_0x127ef3);_0x4e1f02||_0x3f2a63['isSubmitted']?_0x4e1f02||_0x3f2a63['unlinkedAt']||_0x3f2a63['setUnlinkedAt'](new Date()):_0x3f2a63['remove']();}_0x46998a['clear']();});}['_handleInitialThreads'](_0x172902){_0x172902['forEach'](_0x543fe9=>{_0x543fe9['unlinkedAt']&&this['_attachArchivedThread'](_0x543fe9['id']);});}['_getTargetForId'](_0x9fdb70){const _0xe3b220=this['editor'],_0x4cd13b=this['getAllMarkersForId'](_0x9fdb70);return et(_0xe3b220['editing'],_0x4cd13b);}['_getTextContext'](_0x1df8c9){const _0x1512d8=this['getAllMarkersForId'](_0x1df8c9);let _0x19270e='',_0x49a9f2=!0x1;for(const _0x25cde4 of _0x1512d8){const _0x42859d=_0x25cde4['getRange']();for(const _0x530575 of Array['from'](_0x42859d['getItems']()))_0x530575['is']('$textProxy')?(_0x19270e&&_0x49a9f2&&(_0x19270e+='\x20',_0x49a9f2=!0x1),_0x19270e+=_0x530575['data']):_0x49a9f2=!0x0;_0x49a9f2=!0x0;}return _0x19270e['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x22dd1e,_0x9b49ea){const _0x64ec1a=this['editor'],_0x3c157d=_0x64ec1a['plugins']['get'](o);let _0x4618cd=_0x3c157d['getCommentThread'](_0x9b49ea);const _0x562959=_0x64ec1a['config']['get']('collaboration.channelId'),_0xbb0c9a=_0x64ec1a['plugins']['get'](b);if(_0x4618cd&&(_0x4618cd['unlinkedAt']&&_0x4618cd['setUnlinkedAt'](null),_0x4618cd['isAttached']))return _0x4618cd;return!this['getAllMarkersForId'](_0x9b49ea)[0x0]['managedUsingOperations']?_0x64ec1a['editing']['view']['once']('render',()=>{if(_0x3c157d['getCommentThread'](_0x9b49ea))return;const _0x4858b6=_0x64ec1a['plugins']['get'](y);_0x4618cd=_0x3c157d['openNewCommentThread']({'channelId':_0x562959,'threadId':_0x9b49ea,'target':()=>this['_getTargetForId'](_0x9b49ea),'context':{'type':'text','value':this['_getTextContext'](_0x9b49ea)}});const _0x55678e=_0x3c157d['_threadToController']['get'](_0x4618cd)['view'],_0x43facd=_0x4858b6['getByInnerView'](_0x55678e);_0x43facd&&_0xbb0c9a['registerAnnotation'](_0x43facd);},{'priority':'low'}):_0x3c157d['fetchCommentThread']({'channelId':_0x562959,'threadId':_0x9b49ea})['then'](_0x5a65f1=>{if('destroyed'!==_0x64ec1a['state']){if(_0x4618cd=_0x5a65f1,_0x4618cd&&!_0x4618cd['isAttached']){const _0x55a0f0=_0x4618cd['attachTo'](()=>this['_getTargetForId'](_0x9b49ea));_0xbb0c9a['registerAnnotation'](_0x55a0f0),_0x4618cd['isResolved']&&this['_reconvertMarkers'](_0x9b49ea);}else{if(!_0x4618cd){const _0x2a2b0e=this['getAllMarkersForId'](_0x9b49ea);_0x64ec1a['model']['change'](_0x2fb100=>{for(const _0x12d2a3 of _0x2a2b0e)_0x2fb100['removeMarker'](_0x12d2a3);});}}}}),_0x4618cd;}['_handleThreadMarker'](_0x215fd6,_0x3562a5){const _0x469bd5=this['_attachMarkerToThread'](_0x215fd6,_0x3562a5);_0x469bd5&&!_0x469bd5['context']&&_0x469bd5['setContext']({'type':'text','value':this['_getTextContext'](_0x3562a5)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3f7734=this['editor'];ot(_0x3f7734['model'],({left:_0x4cf9e2,entered:_0x39dcce})=>{for(const _0x9afb52 of _0x4cf9e2)if(mt(_0x9afb52)){_0x3f7734['ui']['ariaLiveAnnouncer']['announce'](N(_0x3f7734['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x13d2ae of _0x39dcce)if(mt(_0x13d2ae)){_0x3f7734['ui']['ariaLiveAnnouncer']['announce'](N(_0x3f7734['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x332df9)));break;}});}}function ft(_0x5c83c2,_0x3f1700){return _0x3f1700?_0x5c83c2+':'+_0x3f1700:_0x5c83c2;}function er(_0x5daf77){const _0x233197=_0x5daf77['split'](':');return{'group':_0x233197[0x0],'id':_0x233197[0x1],'part':_0x233197[0x2]};}function dt(_0x64cff9,_0x219c7b){const _0x5552c0=_0x219c7b['schema'],_0x3775cd=_0x219c7b['createRange'](_0x64cff9['start']);for(const _0x5e6709 of _0x64cff9['getWalker']()){const {type:_0x460d69,item:_0x26b566,nextPosition:_0x3336e2}=_0x5e6709;if('text'===_0x460d69||_0x5552c0['isObject'](_0x26b566)){const _0x350b8e=_0x219c7b['createPositionBefore'](_0x26b566);_0x3775cd['isCollapsed']&&(_0x3775cd['start']=_0x350b8e),_0x3775cd['end']=_0x3336e2;}}return _0x3775cd;}function mt(_0x72a73b){return'comment'===er(_0x72a73b['name'])['group'];}class s extends _0x1a45c0{['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 _0x3d4862=this['editor'],_0x4b8e2d=_0x3d4862['plugins']['get'](o),_0x166b8a=_0x3d4862['plugins']['get'](r),_0x1f0718=_0x3d4862['plugins']['get'](y),_0x19bef8=_0x3d4862['plugins']['get'](b);_0x3d4862['ui']['componentFactory']['add']('comment',()=>{const _0xc25317=this['_createUIButton'](_0x4cc9f4);return _0xc25317['tooltip']=!0x0,_0xc25317;}),_0x3d4862['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x353c38)),_0x19bef8['addSourceCollector'](()=>{const _0x315ea4=[];for(const [_0x156623,_0x30c3f5]of _0x4b8e2d['_threadToController']){const _0x88e67e=_0x166b8a['getAllMarkersForId'](_0x156623['id']),_0x228bb3=_0x88e67e['map'](_0x581dd2=>_0x581dd2['getRange']());_0x88e67e['length']>0x0&&_0x315ea4['push']([_0x30c3f5['view'],_0x228bb3]);}return _0x315ea4;}),this['listenTo'](_0x1f0718,'change:activeAnnotations',(_0x3f7163,_0x5c4822,_0xcbc961)=>{const _0x3ac025=Array['from'](_0xcbc961)['map'](_0x244c46=>_0x244c46['innerView'])['find'](_0xef2be=>_0x4b8e2d['_viewToController']['has'](_0xef2be));if(!_0x3ac025)return void(_0x166b8a['activeMarker']=null);const _0x439ba6=_0x4b8e2d['_viewToController']['get'](_0x3ac025)['model']['id'],_0x69f2e9='comment:'+_0x439ba6;_0x439ba6&&_0x166b8a['hasMarkerForId'](_0x439ba6)?_0x166b8a['activeMarker']=_0x69f2e9:_0x166b8a['activeMarker']&&(_0x166b8a['activeMarker']=null);}),this['listenTo'](_0x4b8e2d,'removeCommentThread',(_0x2a2a58,{threadId:_0x533149,isFromAdapter:_0x5da4f0})=>{!_0x5da4f0&&_0x3d4862['ui']['focusTracker']['isFocused']&&_0x166b8a['hasMarkerForId'](_0x533149)&&_0x3d4862['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x4b8e2d,'addComment',(_0x137a2f,{threadId:_0xccd964,isFromAdapter:_0x2fb561})=>{if(_0x2fb561||!_0x166b8a['hasMarkerForId'](_0xccd964)||!_0x4b8e2d['hasCommentThread'](_0xccd964))return;0x1===_0x4b8e2d['getCommentThread'](_0xccd964)['length']&&(_0x3d4862['editing']['view']['focus'](),_0x137a2f['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x901f3d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x27fe54;for(const _0x37f8ff in _0x901f3d){const _0x2d2b98=_0x37f8ff,_0x35b941=_0x901f3d[_0x2d2b98];if('commentsLicenseKeyValid'==_0x35b941||'commentsLicenseKeyInvalid'==_0x35b941||'commentsLicenseKeyExpired'==_0x35b941||'commentsLicenseKeyDomainLimit'==_0x35b941||'commentsLicenseKeyNotAllowed'==_0x35b941||'commentsLicenseKeyEvaluationLimit'==_0x35b941||'commentsLicenseKeyTrialLimit'==_0x35b941||'commentsLicenseKeyUsageLimit'==_0x35b941){delete _0x901f3d[_0x2d2b98],_0x27fe54=_0x35b941,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x27fe54&&_0x901f3d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x27fe54&&_0x901f3d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x27fe54&&_0x901f3d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x27fe54&&_0x901f3d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x3a57c6){const _0x3b38bc=this['editor'],_0x437183=new _0x3a57c6(_0x3b38bc['locale']),_0x9d28f9=_0x3b38bc['commands']['get']('addCommentThread');return _0x437183['set']({'label':N(_0x3b38bc['locale'],'Comment'),'icon':_0x54774b}),_0x437183['bind']('isEnabled')['to'](_0x9d28f9,'hasContent'),this['listenTo'](_0x437183,'execute',()=>{_0x9d28f9['execute']();}),_0x437183;}}class i extends _0x1a45c0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5962f3){super(_0x5962f3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x23bb4b,_0x1009a7,_0x17cfce)=>{_0x17cfce?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0xebd47,_0x522be7]of this['editor']['commands'])_0x522be7['affectsData']&&'addCommentThread'!==_0xebd47&&_0x522be7['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 _0x5e5d3e=this['editor']['editing']['view']['document'];this['listenTo'](_0x5e5d3e,'cut',_0x4e1905=>_0x4e1905['stop'](),{'priority':'highest'}),this['listenTo'](_0x5e5d3e,'clipboardInput',_0x19f4d3=>_0x19f4d3['stop'](),{'priority':'highest'}),this['listenTo'](_0x5e5d3e,'delete',_0x11ab47=>_0x11ab47['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x42777b,_0xf8e6ac]of this['editor']['commands'])_0xf8e6ac['affectsData']&&'addCommentThread'!==_0x42777b&&_0xf8e6ac['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 _0x3f106c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5f1d36){super(_0x5f1d36),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x1b05de=this['context']['plugins']['get'](y);this['listenTo'](_0x1b05de,'_activateAnnotation',(_0x37770f,_0x932ef)=>{for(const _0x1b7289 of this['activeUIs']){const _0x313ffb=this['_uis']['get'](_0x1b7289);(0x0,this['uisData']['get'](_0x1b7289)['filter'])(_0x932ef)&&_0x313ffb['setActiveAnnotation'](_0x932ef);}}),this['listenTo'](_0x1b05de,'_deactivateAllAnnotations',()=>{for(const _0x39bee8 of this['activeUIs']){this['_uis']['get'](_0x39bee8)['setActiveAnnotation'](null);}}),this['listenTo'](_0x1b05de['_visibleAnnotations'],'add',(_0x3ddb70,_0x19ec16)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x19ec16);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2df482){return this['activeUIs']['has'](_0x2df482);}['activate'](_0x291a37,_0x2ff30a=this['defaultFilter']){const _0x10b8ff=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x291a37))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0x291a37});this['isActive'](_0x291a37)&&this['deactivate'](_0x291a37),this['activeUIs']['add'](_0x291a37);const _0x213ced=new S();v({'source':_0x10b8ff['_visibleAnnotations'],'target':_0x213ced,'filter':_0x2ff30a}),this['uisData']['set'](_0x291a37,{'collection':_0x213ced,'filter':_0x2ff30a});const _0x43066c=this['_uis']['get'](_0x291a37);_0x43066c['attach'](_0x213ced),this['listenTo'](_0x43066c,'change:activeAnnotation',(_0x1e0185,_0x106ff9,_0x157830,_0x12d218)=>{_0x12d218&&_0x10b8ff['_removeActiveAnnotation'](_0x12d218),_0x157830&&_0x10b8ff['_addActiveAnnotation'](_0x157830);});}['deactivate'](_0x3fe76d){if(this['activeUIs']['delete'](_0x3fe76d),!this['_uis']['has'](_0x3fe76d))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0x3fe76d});const _0x5e5202=this['_uis']['get'](_0x3fe76d);_0x5e5202['detach'](),this['stopListening'](_0x5e5202),this['uisData']['get'](_0x3fe76d)['collection']['destroy'](),this['uisData']['delete'](_0x3fe76d);}['switchTo'](_0xfc2a2e){if(!this['_uis']['has'](_0xfc2a2e))throw new _0x160abe('annotationsuis-missing-ui',this,{'uiName':_0xfc2a2e});const _0x400fc0=this['context']['plugins']['get'](y),_0x22c7f9=Array['from'](_0x400fc0['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0xfc2a2e);const _0x5a7dbe=this['_uis']['get'](_0xfc2a2e);_0x5a7dbe['setActiveAnnotation'](_0x22c7f9),_0x5a7dbe['_setSelectedAnnotations']&&_0x22c7f9&&_0x5a7dbe['_setSelectedAnnotations']([_0x22c7f9]);}['deactivateAll'](){for(const _0x20e757 of this['activeUIs'])this['deactivate'](_0x20e757);}['register'](_0x2f8d56,_0x2079d0){if(this['_uis']['has'](_0x2f8d56))throw new _0x160abe('annotationsuis-register-already-registered');if('function'!=typeof _0x2079d0['attach']||'function'!=typeof _0x2079d0['detach']||'function'!=typeof _0x2079d0['setActiveAnnotation'])throw new _0x160abe('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2f8d56,_0x2079d0);}['refilterAnnotations'](){const _0x20d672=this['context']['plugins']['get'](y)['collection'],_0x3a96cb=new Map(),_0x188a29=Array['from'](this['activeUIs']);for(const _0x318036 of this['activeUIs']){const _0x316fb3=this['uisData']['get'](_0x318036)['collection'];for(const _0x283844 of _0x316fb3)_0x3a96cb['set'](_0x283844,_0x318036);}for(const _0x4776d9 of _0x20d672){const _0x1625f9=_0x3a96cb['get'](_0x4776d9);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4776d9);const _0x573290=_0x188a29['find'](_0x371f5e=>this['uisData']['get'](_0x371f5e)['filter'](_0x4776d9));_0x1625f9!==_0x573290&&(_0x1625f9&&this['uisData']['get'](_0x1625f9)['collection']['remove'](_0x4776d9),_0x573290&&this['uisData']['get'](_0x573290)['collection']['add'](_0x4776d9));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5cbdaa){const _0x4e6399=[];for(const _0x488676 of this['activeUIs']){(0x0,this['uisData']['get'](_0x488676)['filter'])(_0x5cbdaa)&&_0x4e6399['push'](_0x488676);}if(_0x4e6399['length']>0x1)throw new _0x160abe('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4e6399,'annotationType':_0x5cbdaa['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x29b1b2){super(_0x29b1b2),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x155a0a,_0xc98701)=>_0x155a0a+_0xc98701),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5a4261=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5a4261['to']('isAnimationDisabled',_0x184295=>_0x184295?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5a4261['to']('top',_0x218d85=>Ot(_0x218d85))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x4ae04b=this['element']['clientHeight'];_0x4ae04b&&(this['height']=_0x4ae04b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x3f106c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11a2f2){super(_0x11a2f2),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 _0x2d571e=this['context']['config']['get']('sidebar.container');_0x2d571e&&this['setContainer'](_0x2d571e);}['setContainer'](_0x24dd11){if(!g(_0x24dd11))throw new _0x160abe('sidebar-setcontainer-invalid-element');this['container']=_0x24dd11;}['_attachToContainer']({viewClass:_0x4f2584='',spaceBetweenItems:_0x1610d1=0x19}={}){if(!g(this['container']))throw new _0x160abe('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x4f2584,this['_spaceBetweenItems']=_0x1610d1;}['rearrange']({removedAnnotation:_0x3e4530,previousAnnotation:_0x43328c,nextAnnotation:_0x165b8f}){const _0x7f8b32=this['getSidebarItemView'](_0x3e4530);this['view']['list']['remove'](_0x7f8b32),this['_destroySidebarItemView'](_0x3e4530),_0x43328c&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x43328c)),_0x165b8f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x165b8f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x51f5a0,activatedAnnotation:_0x258e0b,disableAnimationOnActivatedAnnotation:_0x2313ab}){if(this['_activeAnnotation']=_0x258e0b,_0x51f5a0){_0x51f5a0['isActive']=!0x1;const _0x2e6424=this['getSidebarItemView'](_0x51f5a0);_0x2e6424&&_0x2313ab&&(_0x2e6424['isAnimationDisabled']=!0x1);}if(_0x258e0b){const _0x16da61=this['getSidebarItemView'](_0x258e0b);_0x16da61&&(_0x258e0b['isActive']=!0x0,_0x2313ab&&(_0x16da61['isAnimationDisabled']=!0x0,_0x16da61['top']+=0x1),this['_alignToTargetRect'](_0x16da61));}}['_detachFromContainer'](_0x4fc2f9){if(this['view']['element']['remove'](),_0x4fc2f9){for(const _0xe1de35 of _0x4fc2f9)this['_destroySidebarItemView'](_0xe1de35);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x28790e,_0x32a93e){_0x32a93e||(_0x32a93e=_0x28790e['view']);const _0x5406f8=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x5406f8,_0x28790e),this['_annotationToSidebarItemView']['set'](_0x28790e,_0x5406f8),_0x5406f8['content']['add'](_0x32a93e),this['listenTo'](_0x28790e['view'],'change:targetRect',(_0x359a8f,_0xf2c95b,_0x2f1e96)=>{const _0x1e99a3=this['_getTargetTop'](_0x28790e,_0x2f1e96);_0x5406f8['_targetTop']!=_0x1e99a3&&(_0x5406f8['_targetTop']=_0x1e99a3,this['_setItemTop'](_0x5406f8,_0x1e99a3));}),this['listenTo'](_0x5406f8,'change:top',()=>{this['_recalculate'](_0x5406f8,'top');}),this['listenTo'](_0x5406f8,'change:bottom',()=>{this['_recalculate'](_0x5406f8,'bottom');}),this['_alignToTargetRect'](_0x5406f8);const _0x1bf2df=this['_getItemBefore'](_0x5406f8);if(_0x1bf2df)this['_alignAfterItem'](_0x1bf2df,_0x5406f8)||this['_alignToTargetRect'](_0x5406f8);else this['_alignToTargetRect'](_0x5406f8);return this['_updateLastItem'](),this['view']['list']['add'](_0x5406f8),_0x5406f8;}['_alignForTopChange'](_0x30c743){if(!_0x30c743['content']['length'])return;const _0x4643c4=this['_getItemBefore'](_0x30c743);if(!_0x4643c4)return;const _0x16d9b1=this['_sidebarItemViewToAnnotation']['get'](_0x4643c4),_0x48861e=this['_activeAnnotation'];_0x48861e&&_0x48861e===_0x16d9b1?this['_alignAfterItem'](_0x4643c4,_0x30c743):this['_alignBeforeItem'](_0x30c743,_0x4643c4);}['_alignForBottomChange'](_0x185e21){if(!_0x185e21['content']['length'])return;const _0x25492c=this['_getItemAfter'](_0x185e21);if(!_0x25492c)return;const _0x29a402=this['_sidebarItemViewToAnnotation']['get'](_0x25492c),_0x4d70cf=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5e5b53=this['_activeAnnotation'];_0x5e5b53&&_0x5e5b53===_0x29a402&&_0x4d70cf?(this['_alignBeforeItem'](_0x25492c,_0x185e21),this['_alignAfterItem'](_0x185e21,_0x25492c)):_0x5e5b53&&_0x5e5b53===_0x29a402?this['_alignBeforeItem'](_0x25492c,_0x185e21):this['_alignAfterItem'](_0x185e21,_0x25492c);}['_recalculate'](_0x4ca6ba,_0x3a478a){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4258c2,changedProp:_0x4b0e85}of this['_recalculateBuffer'])'top'===_0x4b0e85?this['_alignForTopChange'](_0x4258c2):this['_alignForBottomChange'](_0x4258c2);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4ca6ba,'changedProp':_0x3a478a});}['getSidebarItemView'](_0xfbb4f6){return this['_annotationToSidebarItemView']['get'](_0xfbb4f6);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0xae4333){const _0x486e23=this['getSidebarItemView'](_0xae4333);this['stopListening'](_0x486e23),this['stopListening'](_0xae4333['view']),_0x486e23['destroy'](),this['_annotationToSidebarItemView']['delete'](_0xae4333),this['_sidebarItemViewToAnnotation']['delete'](_0x486e23);}['_createSidebarView'](){const _0x2952a6=new H(this['context']['locale']);return _0x2952a6['render'](),this['on']('change:_lastItem',(_0x161f94,_0x1243f4,_0x2f1c4f,_0xb0008d)=>{_0xb0008d&&_0x2952a6['unbind']('minHeight'),_0x2f1c4f?_0x2952a6['bind']('minHeight')['to'](_0x2f1c4f,'bottom'):_0x2952a6['minHeight']=null;}),_0x2952a6;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x302320){const _0xa40666=this['_sidebarItemViewToAnnotation']['get'](_0x302320),_0x1a9f21=_0xa40666&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0xa40666)-0x1);return _0x1a9f21&&this['getSidebarItemView'](_0x1a9f21)||null;}['_getItemAfter'](_0x457a99){const _0x43542a=this['_sidebarItemViewToAnnotation']['get'](_0x457a99),_0x354842=_0x43542a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x43542a)+0x1);return _0x354842&&this['getSidebarItemView'](_0x354842)||null;}['_alignBeforeItem'](_0x4e5b17,_0x1b360f){_0x4e5b17['updateHeight']();const _0x20102b=G(_0x1b360f['bottom']+this['_spaceBetweenItems'],_0x4e5b17['top']);return!!_0x20102b&&(this['_setItemTop'](_0x1b360f,_0x1b360f['top']-_0x20102b),!0x0);}['_alignAfterItem'](_0x25c4df,_0x753c4c){_0x25c4df['updateHeight']();const _0x35a906=G(_0x25c4df['bottom']+this['_spaceBetweenItems'],_0x753c4c['top']);return!!_0x35a906&&(this['_setItemTop'](_0x753c4c,_0x753c4c['top']+_0x35a906,!0x1),!0x0);}['_alignToTargetRect'](_0x2bb29d){const _0x381625=this['_sidebarItemViewToAnnotation']['get'](_0x2bb29d);if(!_0x381625||!_0x381625['target']||!_0x381625['targetRect'])return;const _0x3790e3=this['_getTargetTop'](_0x381625,_0x381625['targetRect']);this['_setItemTop'](_0x2bb29d,_0x3790e3);}['_getTargetTop'](_0x17e5a6,_0x5c6843){if(null===_0x5c6843)return 0x0;if(_0x17e5a6['target']instanceof _0x415c3c)return _0x5c6843['top'];{const _0x3b08d4=new _0x415c3c(this['view']['element'])['top'];return _0x5c6843['top']-_0x3b08d4;}}['_setItemTop'](_0x5ba453,_0x384a25,_0x9b6ce2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x9b6ce2&&(_0x384a25=Math['max'](_0x384a25,this['_getMaxAvailableTop'](_0x5ba453))),_0x5ba453['top']=_0x384a25;}['_getMaxAvailableTop'](_0x379258){let _0x67f5d3=this['_getItemBefore'](_0x379258),_0x5027b4=0x0;for(;_0x67f5d3;)_0x67f5d3['updateHeight'](),_0x5027b4+=this['_spaceBetweenItems']+_0x67f5d3['height'],_0x67f5d3=this['_getItemBefore'](_0x67f5d3);return _0x5027b4;}}function G(_0x59f623,_0x56355a){return Math['max'](_0x59f623-_0x56355a,0x0);}function g(_0x26d3c3){return null!==_0x26d3c3&&'object'==typeof _0x26d3c3&&0x1===_0x26d3c3['nodeType'];}class e extends _0x3f106c{['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(_0x1d1b8d){super(_0x1d1b8d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4550ea(),this['_refreshPositioningDebounced']=_0x35cf6e(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x396f03=this['context']['plugins']['get'](j),_0x48094d=this['context']['plugins']['get'](z);_0x396f03['register']('wideSidebar',this),_0x48094d['container']&&_0x396f03['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x50971d){if(_0x50971d===this['activeAnnotation'])return;const _0xb9485a=this['context']['plugins']['get'](z);_0xb9485a['_activeAnnotation']=_0x50971d;const _0x431511=this['activeAnnotation'];_0xb9485a['refresh']({'blurredAnnotation':_0x431511,'activatedAnnotation':_0x50971d}),this['activeAnnotation']=_0x50971d;}['attach'](_0x2725d6){this['annotations']=_0x2725d6;const _0x45ab0c=this['context']['plugins']['get'](z);if(_0x45ab0c['_annotations']=_0x2725d6,this['isAttached'])throw new _0x160abe('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x45ab0c,'set:container',()=>{this['detach'](),this['listenTo'](_0x45ab0c,'change:container',_0x16b50c=>{_0x16b50c['off'](),this['attach'](_0x2725d6);});}),_0x45ab0c['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x13c3bf=_0x3fc9e6=>{_0x3fc9e6['updateTargetRect'](),_0x45ab0c['addAnnotation'](_0x3fc9e6);};for(const _0x1d8a6c of _0x2725d6)_0x13c3bf(_0x1d8a6c);this['listenTo'](_0x2725d6,'add',(_0x4a60b9,_0x2a7d98)=>{_0x13c3bf(_0x2a7d98);}),this['listenTo'](_0x2725d6,'remove',(_0x1f8797,_0x2dc10b,_0x55e3f5)=>{_0x45ab0c['rearrange']({'removedAnnotation':_0x2dc10b,'previousAnnotation':_0x2725d6['get'](_0x55e3f5-0x1),'nextAnnotation':_0x2725d6['get'](_0x55e3f5+0x1)}),_0x2dc10b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2725d6,'focus',(_0x4223f5,_0x43c975)=>{this['setActiveAnnotation'](_0x43c975);}),this['listenTo'](_0x2725d6,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5374e6=this['context']instanceof _0x41d3ee?this['context']['editors']:new _0x4550ea([this['context']]);for(const _0x476e3a of _0x5374e6)this['_integrateWithEditorAnnotations'](_0x476e3a);this['listenTo'](_0x5374e6,'add',(_0x656b93,_0x3e9ed2)=>{this['listenTo'](_0x3e9ed2,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3e9ed2);});}),this['listenTo'](_0x5374e6,'remove',(_0x2d6f4c,_0x3dda9c)=>{_0x3dda9c['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x3dda9c['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x160abe('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x159adb=this['context']['plugins']['get'](z);_0x159adb['_detachFromContainer'](this['annotations']),this['stopListening'](_0x159adb),this['stopListening'](this['annotations']),this['context']instanceof _0x41d3ee&&this['stopListening'](this['context']['editors']);for(const _0x7c0d9a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x7c0d9a);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x4bcfa3){if(!_0x4bcfa3['plugins']['has']('EditorAnnotations'))return;const _0x5e167f=_0x4bcfa3['plugins']['get']('EditorAnnotations'),_0x839a62=()=>{const _0x2d7362=_0x5e167f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2d7362[0x0]||null);};this['listenTo'](_0x5e167f,'refresh',_0x839a62),this['listenTo'](_0x5e167f,'blur',(_0x22e700,{isAnnotationTracked:_0x22a745})=>{this['activeAnnotation']&&_0x22a745(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5e167f,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x20a6d6=>{_0x5e167f['hasDomSelection']()&&(_0x839a62(),_0x20a6d6['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x5e167f);}['_destroyEditorAnnotationsIntegration'](_0x1e4f1d){this['stopListening'](_0x1e4f1d),this['_editorAnnotations']['remove'](_0x1e4f1d);}}class C extends _0x4cc9f4{['counterView'];constructor(_0x3a73f6){super(_0x3a73f6);const _0x2270f4=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5c0afe,_0x344012)=>_0x5c0afe?'...':_0x344012['toString']()),this['set']('annotationType',''),this['icon']=_0x54774b,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x2270f4['to']('annotationType',_0x53eed6=>'ck-annotation-counter__badge--'+_0x53eed6),_0x2270f4['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x2270f4['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x3f106c{['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(_0x81a2e5){super(_0x81a2e5),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3d333e())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4550ea(),this['_refreshPositioningDebounced']=_0x35cf6e(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x394631(this['context']['locale']),this['balloonPanelView']=new _0x7586f9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x45c056){this['annotations']=_0x45c056;const _0x29eee7=this['context']['plugins']['get'](z),_0x47016a=this['balloonPanelView'];if(_0x29eee7['_annotations']=_0x45c056,this['isAttached'])throw new _0x160abe('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x29eee7,'set:container',()=>{this['detach'](),this['listenTo'](_0x29eee7,'change:container',_0x5df8e4=>{_0x5df8e4['off'](),this['attach'](_0x45c056);});}),_0x29eee7['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x50ebec=_0x873659=>{const _0x5b1f4d=new C(this['context']['locale']);_0x29eee7['addAnnotation'](_0x873659,_0x5b1f4d),this['_annotationToNarrowView']['set'](_0x873659,_0x5b1f4d),_0x5b1f4d['bind']('isDirty','annotationType','number')['to'](_0x873659['view'],'isDirty','type','length'),_0x5b1f4d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x47016a['content']['first']!==_0x873659['view']?(this['_showBalloon'](_0x873659),_0x873659['view']['element']['focus'](),this['setActiveAnnotation'](_0x873659)):this['setActiveAnnotation'](null);});};for(const _0x404445 of _0x45c056)_0x50ebec(_0x404445);this['listenTo'](_0x45c056,'add',(_0x44fdf7,_0x5d0700)=>{_0x50ebec(_0x5d0700);}),this['listenTo'](_0x45c056,'remove',(_0x4028b8,_0x51f58d,_0x534fc6)=>{this['_annotationToNarrowView']['get'](_0x51f58d)['destroy'](),this['_annotationToNarrowView']['delete'](_0x51f58d),_0x29eee7['rearrange']({'removedAnnotation':_0x51f58d,'previousAnnotation':_0x45c056['get'](_0x534fc6-0x1),'nextAnnotation':_0x45c056['get'](_0x534fc6+0x1)}),_0x51f58d===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x45c056,'focus',(_0x46d39b,_0x38d0d5)=>{this['setActiveAnnotation'](_0x38d0d5);}),this['listenTo'](_0x45c056,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x40db56,_0x1af465)=>{_0x1af465['keyCode']===_0x1fca4c['esc']&&_0x47016a['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x47016a['content']['first']),this['_hideBalloon'](),_0x1af465['stopPropagation'](),_0x1af465['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x2a8b17,_0x214b57)=>{const _0x17cde8=_0x214b57['target'];_0x47016a['isVisible']&&_0x47016a['element']['contains'](_0x17cde8)||_0x29eee7['view']['element']['contains'](_0x17cde8)||_0x2a8b17['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x10f336=>_0x10f336['contains'](_0x17cde8))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2d46ef=this['context']instanceof _0x41d3ee?this['context']['editors']:new _0x4550ea([this['context']]);for(const _0x4d0644 of _0x2d46ef)this['_integrateWithEditorAnnotations'](_0x4d0644);this['listenTo'](_0x2d46ef,'add',(_0x395d73,_0x41fdb8)=>{this['listenTo'](_0x41fdb8,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x41fdb8);});}),this['listenTo'](_0x2d46ef,'remove',(_0x1e5368,_0x5b6efa)=>{_0x5b6efa['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x5b6efa['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x403010){if(_0x403010===this['activeAnnotation'])return;const _0x30900e=this['context']['plugins']['get'](z);if(_0x30900e['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x403010,'disableAnimationOnActivatedAnnotation':!0x0}),_0x403010)_0x30900e['getSidebarItemView'](_0x403010)?this['_showBalloon'](_0x403010):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x403010;}['detach'](){if(!this['isAttached'])throw new _0x160abe('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x18a116=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x1f8335=>_0x1f8335['destroy']()),this['_annotationToNarrowView']['clear'](),_0x18a116['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x41d3ee&&this['stopListening'](this['context']['editors']);for(const _0x2eb2b2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x2eb2b2);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'](_0x4f5bd5){if(!_0x4f5bd5['plugins']['has']('EditorAnnotations'))return;const _0x338c08=_0x4f5bd5['plugins']['get']('EditorAnnotations'),_0x1a791f=this['context']['plugins']['get'](z),_0x50c7f6=this['annotations'],_0x45da88=this['balloonPanelView'],_0x4045c8=()=>{const _0x47ff9e=_0x338c08['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x47ff9e),this['setActiveAnnotation'](_0x47ff9e[0x0]||null);};this['listenTo'](_0x338c08,'refresh',_0x4045c8),this['listenTo'](_0x338c08,'blur',(_0x35efab,{isAnnotationTracked:_0x5eda12})=>{this['activeAnnotation']&&_0x5eda12(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x338c08,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x50c7f6,'blur',_0x1a087b=>{_0x338c08['hasDomSelection']()&&_0x1a087b['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0xd1a402,_0x14e413)=>{const _0x37a26e=_0x14e413['target'];_0x45da88['isVisible']&&_0x45da88['element']['contains'](_0x37a26e)||_0x1a791f['view']['element']['contains'](_0x37a26e)||this['activeAnnotation']&&_0x338c08['hasDomSelection']()&&(_0x4045c8(),_0xd1a402['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x338c08);}['_destroyEditorAnnotationsIntegration'](_0x2cef56){_0x2cef56&&(this['stopListening'](_0x2cef56),this['_editorAnnotations']['remove'](_0x2cef56));}['_setSelectedAnnotations'](_0x2fe028){for(const _0x235fc8 of this['_selectedAnnotations'])_0x2fe028['includes'](_0x235fc8)||this['_manuallyClosedAnnotationViews']['delete'](_0x235fc8['view']);this['_selectedAnnotations']=_0x2fe028;}['_refreshPositioning'](){const _0x4efa2c=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x4efa2c['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x42fafe){if(this['_manuallyClosedAnnotationViews']['has'](_0x42fafe['view']))return;const _0x5cb2b0=this['balloonPanelView']['content']['first'];_0x5cb2b0!==_0x42fafe['view']?(_0x5cb2b0&&this['_detachListeners'](_0x5cb2b0),this['_attachListeners'](_0x42fafe['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x42fafe['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x518634=this['balloonPanelView']['content']['first'],_0x4a3841=_0x518634&&this['annotations']['getByView'](_0x518634);if(!_0x4a3841||!this['_annotationToNarrowView']['has'](_0x4a3841))return;const _0x5012a5=this['_annotationToNarrowView']['get'](_0x4a3841)['element'],_0x34a118=(function(){const _0x592a6c=_0x7586f9['defaultPositions'];return[_0x592a6c['southArrowNorthEast'],_0x592a6c['northArrowSouthEast'],_0x592a6c['southArrowNorth'],_0x592a6c['northArrowSouth'],_0x592a6c['southArrowNorthWest'],_0x592a6c['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x5012a5,'positions':_0x34a118});}['_hideBalloon'](){const _0x43dc3c=this['balloonPanelView'],_0x3ed62d=_0x43dc3c['content']['first'];_0x3ed62d&&(this['_detachListeners'](_0x3ed62d),_0x43dc3c['unpin'](),_0x43dc3c['content']['clear']());}['_attachListeners'](_0x35c00f){this['listenTo'](_0x35c00f,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x35c00f,'Esc',(_0x50e665,_0x521ab8)=>{this['_manuallyClosedAnnotationViews']['add'](_0x35c00f),this['_hideBalloon'](),_0x521ab8();});}['_detachListeners'](_0xa96cf8){this['stopListening'](_0xa96cf8);}}class c extends _0x1a45c0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x5a5023,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x16efd7){super(_0x16efd7),_0x16efd7['editing']['view']['addObserver'](_0x96ebaf),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x16efd7['plugins']['get'](_0x5a5023),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x511f26=this['editor']['plugins']['get'](j);_0x511f26['context']===this['editor']&&(_0x511f26['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x7730fe,_0x25798d)=>{const _0x3d1543=this['_balloon'];if(this['isAttached']&&_0x3d1543['visibleView']){const _0x1df97c=this['annotations']['getByView'](_0x3d1543['visibleView']);_0x1df97c&&this['_closeAnnotation'](_0x1df97c),_0x25798d();}}));}['afterInit'](){const _0x5b5985=this['editor']['plugins']['get'](j);_0x5b5985['context']===this['editor']&&(_0x5b5985['hasActive']()||_0x5b5985['switchTo']('inline'));}['setActiveAnnotation'](_0x4bd8fc){_0x4bd8fc!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4bd8fc&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4bd8fc)&&this['_addAnnotationToBalloon'](_0x4bd8fc,!0x0),_0x4bd8fc['isActive']=!0x0),_0x4bd8fc||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4bd8fc);}['attach'](_0x34f63d){this['annotations']=_0x34f63d;const _0x531e39=this['editor']['plugins']['get'](j),_0x1a35f1=this['_balloon'];if(this['isAttached'])throw new _0x160abe('inlineannotations-attach-already-attached',this);if(_0x531e39['context']!==this['editor'])throw new _0x160abe('inlineannotations-not-allowed-with-context',this);const _0x166cc0=this['editor']['plugins']['get'](b);this['listenTo'](_0x166cc0,'refresh',()=>{const _0x4fcd72=_0x166cc0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1e1be2,_0x256b54;!this['_forceRefresh']&&(_0x1e1be2=_0x4fcd72,_0x256b54=this['_selectedAnnotations'],_0x1e1be2['length']===_0x256b54['length']&&_0x1e1be2['every'](_0x374dea=>_0x256b54['includes'](_0x374dea)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x4fcd72),this['setActiveAnnotation'](_0x4fcd72[0x0]||null));}),this['listenTo'](_0x166cc0,'blur',(_0x10a26b,{isAnnotationTracked:_0x348b7e})=>{this['activeAnnotation']&&_0x348b7e(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x202b35,_0x410c2c,_0x2d1090)=>{_0x2d1090||this['setActiveAnnotation'](null);}),this['listenTo'](_0x34f63d,'remove',(_0x2716bb,_0x1caf98)=>{this['_removeAnnotationFromBalloon'](_0x1caf98),_0x1caf98===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1a35f1,'change:visibleView',(_0x32cba3,_0x47a172,_0x1c9206,_0x13ff99)=>{_0x13ff99&&this['stopListening'](_0x13ff99);const _0x5d03dc=_0x34f63d['getByView'](_0x1c9206);_0x1c9206&&_0x5d03dc&&(this['listenTo'](_0x1c9206,'change:height',()=>{_0x1a35f1['updatePosition']();}),this['listenTo'](_0x1c9206,'Esc',()=>{this['_closeAnnotation'](_0x5d03dc),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x5d03dc&&this['setActiveAnnotation'](_0x5d03dc));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1a35f1['visibleView']&&(_0x34f63d['getByView'](_0x1a35f1['visibleView'])&&_0x1a35f1['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 _0x160abe('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x314fc1 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x314fc1);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x159121){for(const _0x137df2 of this['_selectedAnnotations'])_0x159121['includes'](_0x137df2)||this['_manuallyClosed']['delete'](_0x137df2);for(const _0xb85f95 of this['annotations'])_0x159121['includes'](_0xb85f95)||this['_removeAnnotationFromBalloon'](_0xb85f95);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4c15fb of _0x159121)this['_addAnnotationToBalloon'](_0x4c15fb);}this['_selectedAnnotations']=_0x159121;}['_addAnnotationToBalloon'](_0x547515,_0x7aed29=!0x1){this['_manuallyClosed']['has'](_0x547515)||(this['_addedAnnotations']['has'](_0x547515)||this['_balloon']['hasView'](_0x547515['view'])||(this['_addedAnnotations']['add'](_0x547515),this['_balloon']['add']({'stackId':_0x547515['view']['id'],'view':_0x547515['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x547515)}})),_0x7aed29&&this['_balloon']['showStack'](_0x547515['view']['id']));}['_getBalloonTargetForAnnotation'](_0x540385){const _0x45054e=_0x540385['target'],_0x240308=this['editor']['editing']['view'],_0x5d51d7=_0x240308['document']['selection']['getFirstRange'](),_0x353f34=_0x240308['domConverter']['viewRangeToDom'](_0x5d51d7);if(_0x353f34['collapse'](!0x0),_0x45054e){if(_0x45054e instanceof _0x415c3c)return _0x45054e;let _0x159f16=[];for(const _0x27ad40 of _0x45054e)_0x159f16['push'](...F(_0x27ad40['getClientRects']()));_0x159f16=function(_0x38094f){const _0x349975=[];let _0x75ce84=_0x38094f[0x0];for(let _0x305545=0x1;_0x305545<_0x38094f['length'];_0x305545++)P(_0x75ce84,_0x38094f[_0x305545])?_0x75ce84['width']+=_0x38094f[_0x305545]['width']:(_0x349975['push'](_0x75ce84),_0x75ce84=_0x38094f[_0x305545]);return _0x349975['push'](_0x75ce84),_0x349975;}(_0x159f16);const _0x22eed9=_0x353f34['getBoundingClientRect']();return _0x159f16['find'](_0x52c5b8=>_0x52c5b8['top']<=_0x22eed9['top']&&_0x52c5b8['bottom']>=_0x22eed9['bottom']&&_0x52c5b8['left']<=_0x22eed9['left']&&_0x52c5b8['right']>=_0x22eed9['right'])||_0x159f16[0x0];}return _0x540385['targetRect']||_0x353f34;}['_removeAnnotationFromBalloon'](_0x29e2dc){this['_addedAnnotations']['has'](_0x29e2dc)&&this['_balloon']['hasView'](_0x29e2dc['view'])&&(this['_addedAnnotations']['delete'](_0x29e2dc),this['_balloon']['remove'](_0x29e2dc['view']));}['_closeAnnotation'](_0x52e579){this['_manuallyClosed']['add'](_0x52e579),this['_removeAnnotationFromBalloon'](_0x52e579);}}function F(_0x5d9a7d){return Array['from'](_0x5d9a7d)['map'](DOMRect['fromRect']);}function P(_0x351b84,_0x28cf6d){return _0x351b84['top']===_0x28cf6d['top']&&_0x351b84['bottom']===_0x28cf6d['bottom']&&_0x351b84['right']===_0x28cf6d['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4ee4f9,_0x436434){super(_0x4ee4f9),this['set']('isEmpty',!_0x436434['length']),this['focusTracker']=new _0x34c795(),this['_annotationViews']=_0x436434,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x230040({'focusables':_0x436434,'focusTracker':this['focusTracker']}),this['listenTo'](_0x436434,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x436434,'remove',(_0x51ccc2,_0x306e9d)=>{_0x306e9d['isActive']&&this['focus'](),_0x436434['length']||(this['isEmpty']=!0x0);});const _0x19cdb8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x4ee4f9,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x436434},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x19cdb8['if']('isEmpty','ck-hidden',_0x23ff7d=>!_0x23ff7d)]},'children':[{'text':N(_0x4ee4f9,'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 _0x467390 of this['_annotationViews'])this['focusTracker']['add'](_0x467390['element']);this['_annotationViews']['on']('change',(_0x1450c4,{added:_0x5e53d7,removed:_0x525983})=>{for(const _0x42b51c of _0x5e53d7)this['focusTracker']['add'](_0x42b51c['element']);for(const _0x9d525d of _0x525983)this['focusTracker']['remove'](_0x9d525d['element']);});}}class p extends _0x3f106c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x5a45f2){super(_0x5a45f2),this['archivedThreads']=new _0x4550ea();}['init'](){const _0x2a1ceb=this['context'],_0x5b9f83=_0x2a1ceb['plugins']['get'](o),_0x5cc10e=_0x2a1ceb['plugins']['get'](y);this['listenTo'](_0x5b9f83,'addCommentThread',(_0x188e86,{threadId:_0x190cf5})=>{const _0x3c0a3b=_0x5b9f83['getCommentThread'](_0x190cf5);_0x3c0a3b['archivedAt']&&this['archivedThreads']['add'](_0x3c0a3b,this['_calculatePosition'](_0x3c0a3b['archivedAt'])),this['listenTo'](_0x3c0a3b,'change:archivedAt',(_0x40038f,_0x26c774,_0x305db5)=>{_0x305db5?this['archivedThreads']['has'](_0x3c0a3b)||this['archivedThreads']['add'](_0x3c0a3b,this['_calculatePosition'](_0x3c0a3b['archivedAt'])):this['archivedThreads']['has'](_0x3c0a3b)&&this['archivedThreads']['remove'](_0x3c0a3b);});}),this['listenTo'](_0x5b9f83,'removeCommentThread',(_0x526f11,{threadId:_0x2af60f})=>{const _0x547fc6=_0x5b9f83['getCommentThread'](_0x2af60f);this['stopListening'](_0x547fc6),this['archivedThreads']['has'](_0x547fc6)&&this['archivedThreads']['remove'](_0x547fc6);},{'priority':'highest'}),this['listenTo'](_0x5cc10e['collection'],'focus',(_0xcb22e6,_0x235e07)=>{_0x235e07['isVisible']||(_0x235e07['isActive']=!0x0,_0x5cc10e['activate'](_0x235e07));});}['_calculatePosition'](_0x5ade22){const _0x3dd66e=[...this['archivedThreads']]['findIndex'](_0x42da1c=>_0x42da1c['archivedAt']<_0x5ade22);return _0x3dd66e>-0x1?_0x3dd66e:this['archivedThreads']['length'];}}class a extends _0x1a45c0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3a9f1b];}constructor(_0x4066a1){super(_0x4066a1),this['annotationViews']=new _0x1bac6b(),this['_pendingThreads']=[];}['init'](){const _0x2a7e2a=this['editor'],_0x348f79=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x2a7e2a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x4cc9f4,!0x0)),_0x2a7e2a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x553904=this['_createCommentsArchiveButton'](_0x353c38);return _0x553904['set']({'role':'menuitemcheckbox'}),_0x553904;});const _0x4947f0=_0x2a7e2a['plugins']['get'](p),_0x5b2dc4=_0x2a7e2a['plugins']['get']('Annotations'),_0x37882d=_0x2a7e2a['plugins']['get']('CommentsRepository');_0x4947f0['archivedThreads']['forEach'](_0x6923ec=>{this['_handleNewThread'](_0x6923ec);}),this['listenTo'](_0x4947f0['archivedThreads'],'add',(_0x201aaf,_0x3d0284)=>{this['_handleNewThread'](_0x3d0284);}),this['listenTo'](_0x5b2dc4['collection'],'add',(_0x4b2a06,_0xa3a672)=>{const _0x356bc3=this['_pendingThreads']['find'](_0x17c5dc=>{const _0x4ccd4e=_0x37882d['_threadToController']['get'](_0x17c5dc);return _0x4ccd4e&&_0xa3a672['innerView']===_0x4ccd4e['view'];});if(_0x356bc3){const _0x2a680b=this['_calculatePosition'](_0x356bc3['archivedAt']);this['annotationViews']['add'](_0xa3a672['view'],_0x2a680b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x356bc3),0x1);}}),this['listenTo'](_0x4947f0['archivedThreads'],'remove',(_0x592535,_0x5104c1)=>{const _0x15e8ed=_0x2a7e2a['config']['get']('collaboration.channelId');if(!_0x15e8ed||_0x5104c1['channelId']===_0x15e8ed){if(this['_pendingThreads']['includes'](_0x5104c1))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5104c1),0x1);else{const _0x44e6f7=_0x37882d['_threadToController']['get'](_0x5104c1),_0x3e4488=_0x5b2dc4['getByInnerView'](_0x44e6f7['view']);this['annotationViews']['remove'](_0x3e4488['view']),this['stopListening'](_0x3e4488['focusableElements']);}}}),this['listenTo'](_0x5b2dc4['collection'],'add',(_0x71ae18,_0x3e57e9)=>{this['listenTo'](_0x3e57e9,'escape',_0x348f79);}),this['listenTo'](_0x5b2dc4['collection'],'remove',(_0xb81cd0,_0x5f43a6)=>{this['stopListening'](_0x5f43a6,'escape',_0x348f79);});}['_handleNewThread'](_0x7df8e8){const _0x2c4869=this['editor']['plugins']['get']('CommentsRepository'),_0x1dc295=this['editor']['plugins']['get']('Annotations'),_0x3c17de=this['editor']['config']['get']('collaboration.channelId');if(!_0x3c17de||_0x7df8e8['channelId']===_0x3c17de){const _0x18b321=_0x2c4869['_threadToController']['get'](_0x7df8e8);if(!_0x18b321)return void this['_pendingThreads']['push'](_0x7df8e8);const _0x3668b7=this['_calculatePosition'](_0x7df8e8['archivedAt']),_0x38c82b=_0x1dc295['getByInnerView'](_0x18b321['view']);_0x38c82b['isVisible']&&_0x1dc295['_visibleAnnotations']['remove'](_0x38c82b),this['annotationViews']['add'](_0x38c82b['view'],_0x3668b7);}}['_calculatePosition'](_0x3d316e){const _0x36a54c=this['editor']['config']['get']('collaboration.channelId'),_0x21e979=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x18fc35=>_0x18fc35['channelId']===_0x36a54c)['findIndex'](_0x5276ac=>_0x5276ac['archivedAt']<_0x3d316e);return _0x21e979<0x0||_0x21e979>this['annotationViews']['length']?this['annotationViews']['length']:_0x21e979-0x1;}['_toggleDialog'](){const _0x119bc2=this['editor'],_0x25a58f=_0x119bc2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x119bc2['locale'],this['annotationViews'])),'commentsArchive'===_0x25a58f['id']?_0x25a58f['hide']():_0x25a58f['show']({'id':'commentsArchive','title':N(_0x119bc2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x3bc011,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x23317a['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3024c1,_0x3f141f=!0x1){const _0x55147b=this['editor']['locale'],_0x346faf=this['editor']['plugins']['get']('Dialog'),_0x5eee80=new _0x3024c1(_0x55147b);return _0x5eee80['bind']('isEnabled')['to'](this,'isEnabled'),_0x5eee80['bind']('isOn')['to'](_0x346faf,'id',_0x153c27=>'commentsArchive'===_0x153c27),_0x5eee80['set']({'label':N(_0x55147b,'COMMENTS_ARCHIVE'),'icon':_0x3bc011,'isToggleable':!0x0}),_0x3f141f&&(_0x5eee80['tooltip']=!0x0),this['listenTo'](_0x5eee80,'execute',()=>this['_toggleDialog']()),_0x5eee80;}['_hideDialogOnAnnotationEscape']=_0x2ab52b=>{const _0x2aaa52=_0x2ab52b['source'];if(!this['annotationViews']['has'](_0x2aaa52['view']))return;const _0x26a34b=this['editor']['plugins']['get']('Dialog');_0x26a34b['isOpen']&&'commentsArchive'===_0x26a34b['id']&&(_0x26a34b['hide'](),_0x2ab52b['stop']());};}class gi extends _0x1a45c0{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 _0x2d455d,ContextPlugin as _0x2738de,PendingActions as ht,Command as _0x385260,Plugin as _0x5ddc0e,Context as _0x449ace}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x362d6f,uid as _0x58c8cf,KeystrokeHandler as jt,FocusTracker as _0x199d2b,diff as _0x159fc8,Collection as _0x23eb0b,Rect as _0x37570f,CKEditorError as _0x51f518,first as _0x5ae716,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x35e1dc,keyCodes as _0x5b1abd}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x5de8e0,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x21109b,trimHtml as ts,LateFocusDropdownButtonView as _0x11425f,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x542398}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as Ct,debounce as _0x40c01b}from'es-toolkit/compat';import{IconUndo as _0x4a17ef,IconCheck as _0x1299c5,IconPencil as _0x7ba0fb,IconRemoveComment as _0x37d2b3,IconThreeVerticalDots as _0x1fc351,IconAddComment as _0x224626,IconCommentsArchive as _0x314692}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x2f1de9,ButtonView as _0x49f2c7,ViewCollection as _0xae5e8b,createDropdown as _0x12ae92,ListView as _0x1a323c,focusChildOnDropdownOpen as _0x4391eb,ListItemView as _0x8512b5,MenuBarMenuListItemButtonView as _0x58cd9a,BodyCollection as _0x5a4cd6,BalloonPanelView as _0x263b66,ContextualBalloon as _0x36b0f0,Dialog as _0xeb9489,DialogViewPosition as _0xd16eae}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x5d0a9d}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0xe143ff}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x1ed711}from'@ckeditor/ckeditor5-widget/dist/index.js';class yt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x362d6f(){['model'];['view'];constructor(_0x55c334,_0x449fc9){super(),this['model']=_0x55c334,this['model']['_isAttached']=!0x0,this['view']=_0x449fc9,this['listenTo'](_0x449fc9,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x449fc9,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x449fc9,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x449fc9,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x449fc9,'addComment',(_0x5ae497,_0x159dd3)=>this['addComment'](_0x159dd3)),this['listenTo'](_0x449fc9,'updateComment',(_0x303e82,_0x546d06,_0x3e8ba5)=>this['updateComment'](_0x546d06,_0x3e8ba5)),this['listenTo'](_0x449fc9,'removeComment',(_0x43d7f9,_0x339947)=>this['removeComment'](_0x339947));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x6e2bd8){this['model']['addComment']({'content':_0x6e2bd8,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x1ebe3e,_0xf27533){this['model']['getComment'](_0x1ebe3e)['update']({'content':_0xf27533});}['removeComment'](_0x554edd){this['model']['getComment'](_0x554edd)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x49b7cb,_0x87113a,_0x2c6aaf){const t=_0x49b7cb['t'];switch(_0x87113a){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'},_0x2c6aaf);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'},_0x2c6aaf);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'},_0x2c6aaf);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'},_0x2c6aaf);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2c6aaf);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'},_0x2c6aaf);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'},_0x2c6aaf);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'},_0x2c6aaf);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(_0x2734da,_0x55873c){super(_0x2734da);const _0x5b227f=_0x58c8cf();this['main']=this['createCollection'](),this['editable']=new Vt(_0x2734da,_0x55873c,void 0x0,{'label':()=>N(_0x2734da,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2734da['uiLanguageDirection'],'lang':_0x2734da['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5b227f},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x2c5580){super(_0x2c5580),this['view']=new Rt(_0x2c5580['locale'],_0x2c5580['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0xe8dded=this['editor']['editing']['view'],_0x1c3235=this['view']['editable'],_0x515c80=_0xe8dded['document']['getRoot']();_0x1c3235['name']=_0x515c80['rootName'],this['view']['render']();const _0x7a2b1=_0x1c3235['element'];this['setEditableElement'](_0x1c3235['name'],_0x7a2b1),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xe8dded['attachDomRoot'](_0x7a2b1),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x362d6f(_0x2d455d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x28f75e={}){function _0x145755(_0x1386d6){return _0x1386d6['map'](_0x1d46c5=>String['fromCharCode'](_0x1d46c5))['join']('');}(_0x28f75e=Object['assign']({},_0x28f75e))['plugins']||(_0x28f75e['plugins']=Qt['defaultPlugins']),super(_0x28f75e),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[_0x145755([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x145755([0x76,0x69,0x65,0x77])][_0x145755([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x145755([0x61,0x75,0x74,0x6f]),this[_0x145755([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x145755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x145755([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x145755([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x145755([0x6f,0x6b])});}['create'](){const _0x5e6e29=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5e6e29))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2f37d2=>{const _0x5ef89a=this['model']['document']['getRoot'](),_0x362fbd=_0x5ef89a&&_0x5ef89a['getChild'](_0x5ef89a['childCount']-0x1);_0x2f37d2['setSelection'](_0x362fbd,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x464082=this['editing']['view'],_0x3e4c85=_0x464082['document']['getRoot'](),_0xea507f=_0x3e4c85['getChild'](0x0);_0x3e4c85['childCount']>0x1||!_0xea507f||'p'!=_0xea507f['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x464082,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xea507f['placeholder']=this['placeholder']),St({'view':_0x464082,'element':_0xea507f,'keepOnFocus':!0x0}),this['placeholderElement']=_0xea507f);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1dbf65,_0x541675={}){super(_0x1dbf65),this['editor']=null,this['_editorConfig']=_0x541675,this['set']('value',_0x541675['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x1dbf65,'Reply...')),this['set']('submitLabel',N(_0x1dbf65,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x199d2b(),this['focusCycler']=new _0x2f1de9({'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',(_0x34fbbc,_0x21e0e7)=>{this['cancelButtonView']['fire']('execute'),_0x21e0e7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x27e835,_0x36a8c1)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x36a8c1());}),this['on']('submit',(_0x308dce,_0x7adeba)=>{_0x7adeba['length']>0xfde8?(alert(N(_0x1dbf65,'TOO_LONG_COMMENT_ALERT',[_0x7adeba['length'],0xfde8])),_0x308dce['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 _0x361965=this['editor'];this['element']['insertBefore'](_0x361965['ui']['element'],this['element']['firstChild']),_0x361965['model']['document']['on']('change',()=>this['value']=_0x361965['getData']()),_0x361965['bind']('placeholder')['to'](this),this['focusables']['add'](_0x361965['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x38b789){-0x1===_0x38b789?(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:_0x296760}=this,_0x2df636=new _0x49f2c7(_0x296760);return _0x2df636['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2df636['withText']=!0x0,_0x2df636['bind']('label')['to'](this,'submitLabel'),_0x2df636['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2df636['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x240c46,_0x3292b4)=>!_0x3292b4&&!!_0x240c46['trim']()),_0x2df636;}['_createCancelButton'](){const {locale:_0x12630d}=this,_0x32aff9=new _0x49f2c7(_0x12630d);return _0x32aff9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x32aff9['label']=N(_0x12630d,'Cancel'),_0x32aff9['withText']=!0x0,_0x32aff9['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x32aff9;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1bda23=>{this['focusTracker']['add'](_0x1bda23['element']);}),this['focusables']['on']('change',(_0x4112bb,_0x47ae22)=>{for(const _0x4ec78f of Array['from'](_0x47ae22['added'])['reverse']())this['focusTracker']['add'](_0x4ec78f['element']);});}}class ie extends kt{constructor(_0x2df037,_0x243287,_0x2e8ed1){super(_0x2df037),this['commentInputView']=new es(_0x2df037,_0x2e8ed1),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3ded75,_0x51f45b)=>_0x3ded75||!!_0x51f45b),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 _0x5de8e0(_0x2df037,_0x243287),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'](_0x30c977){this['commentInputView']['focus'](_0x30c977);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5a259b,_0x455904)=>{const {submitButtonView:_0x249aaa,cancelButtonView:_0x549bc7,editor:_0x24f419}=this['commentInputView'];[_0x249aaa['element'],_0x549bc7['element'],_0x24f419?_0x24f419['editing']['view']['getDomRoot']():null]['filter'](_0x3834f1=>_0x3834f1)['some'](_0xe07cac=>_0xe07cac['contains'](_0x455904['target']))||(this['focus'](),_0x455904['preventDefault']());});}}class os extends kt{constructor(_0x576298){super(_0x576298);const _0x3e26c0=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3e26c0['to']('count',_0x5e3a85=>N(_0x576298,'NUMBER_OF_COMMENTS',_0x5e3a85))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2c604d,_0xb84121,_0x6217af){super(_0x2c604d);const _0x27b0da=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xb84121['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xb84121,this['_config']=_0x6217af,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f1de9({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x174b58=>this['commentViews']['map'](_0x2dc29e=>_0x2dc29e['element'])['includes'](_0x174b58['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x2c604d),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x18e6b2=>_0x18e6b2-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1b55e4 of _0xb84121['comments'])this['_handleNewCommentModel'](_0x1b55e4);this['_handleInfoComment'](),this['listenTo'](_0xb84121['comments'],'add',(_0x5bd343,_0x59a9bb)=>{const _0x29502a=this['_calculatePosition'](_0x59a9bb);this['length']++,this['_handleNewCommentModel'](_0x59a9bb,_0x29502a),this['refreshVisibleViews']();}),this['listenTo'](_0xb84121['comments'],'remove',(_0x28dfab,_0x4adf89)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4adf89),this['refreshVisibleViews']();}),this['listenTo'](_0xb84121,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xb84121,'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',_0x27b0da['if']('length','ck-hidden',_0x3dba85=>!_0x3dba85)],'aria-label':N(_0x2c604d,'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'](_0x6255d7){-0x1===_0x6255d7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x564f5e of this['commentViews'])_0x564f5e['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x433bf8,_0x5cc075){const _0x497406=new this['_config']['CommentView'](this['locale'],_0x433bf8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x497406['viewUid']=_0x433bf8['id'],_0x497406['delegate']('removeComment')['to'](this),_0x497406['delegate']('updateComment')['to'](this),_0x497406['delegate']('resolveCommentThread')['to'](this),_0x497406['delegate']('editorReady')['to'](this),_0x497406['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x497406,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x497406,_0x5cc075);}['_calculatePosition'](_0x5a32fa){const _0x1bf155=this['_model']['_findOptimalIndex'](_0x5a32fa);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5a32fa['authoredAt']?_0x1bf155-0x1:_0x1bf155:_0x1bf155-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5344f2={'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'],_0x5344f2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5344f2));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3f3870){const _0x16d8c3=this['commentViews']['remove'](_0x3f3870['id']);this['stopListening'](_0x16d8c3),_0x16d8c3['isEditMode']&&this['_updateHasDirtyComment'](),_0x16d8c3['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5cc5d9=>_0x5cc5d9['isEditMode']);}['_rearrangeCollapse'](){const _0x1c002a=function(_0x248877){const _0x5680a5=new _0x23eb0b();for(const _0x1a4c63 of _0x248877)_0x5680a5['add'](_0x1a4c63);return _0x5680a5;}(this['commentViews']),_0x1ad8f3=this['_collapsedCommentsView']['count'];for(let _0x4a7d7c=0x1;_0x4a7d7c<=_0x1ad8f3;_0x4a7d7c++)_0x1c002a['remove'](0x1);for(const _0x3422ba of _0x1c002a)_0x3422ba['collapse']();_0x1ad8f3>0x0&&_0x1c002a['add'](this['_collapsedCommentsView'],0x1),rs(_0x159fc8(Array['from'](this['visibleViews']),Array['from'](_0x1c002a)),this['visibleViews'],_0x1c002a);}['_rearrangeExpand'](){rs(_0x159fc8(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3b1939 of this['visibleViews'])_0x3b1939['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5dd4f2=>{this['focusTracker']['add'](_0x5dd4f2['element']),this['keystrokes']['listenTo'](_0x5dd4f2['element']);}),this['commentViews']['on']('change',(_0x526207,_0x1563b2)=>{for(const _0x1d3d94 of _0x1563b2['removed'])this['focusTracker']['remove'](_0x1d3d94['element']),this['keystrokes']['stopListening'](_0x1d3d94['element']);for(const _0x3b067f of Array['from'](_0x1563b2['added'])['reverse']())this['focusTracker']['add'](_0x3b067f['element']),this['keystrokes']['listenTo'](_0x3b067f['element']);});}}function rs(_0x2310fd,_0x26b676,_0x1afbec){let _0x2af8bc=0x0;for(const _0x9d6cea of _0x2310fd)switch(_0x9d6cea){case'insert':_0x26b676['add'](_0x1afbec['get'](_0x2af8bc),_0x2af8bc),_0x2af8bc++;break;case'delete':_0x26b676['remove'](_0x2af8bc);break;case'equal':_0x2af8bc++;}}class oe extends kt{constructor(_0x34ca81){super(_0x34ca81);const _0x455fa2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x455fa2['to']('contextValue',_0x34cc5d=>N(_0x34ca81,'THREAD_CONTEXT_LABEL',_0x34cc5d)),'tabindex':-0x1},'children':[{'text':_0x455fa2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5512ee,_0x2dc581){super(_0x5512ee);const _0x5ed35c=this['bindTemplate'];this['_model']=_0x2dc581,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x7659d8=>!!_0x7659d8),this['bind']('contextValue')['to'](this['_model'],'context',_0x1dd0ac=>_0x1dd0ac&&_0x1dd0ac['value']?this['_trimContextValue'](_0x1dd0ac['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',_0x5ed35c['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 _0x298ccb=new _0x49f2c7(this['locale']);return _0x298ccb['label']=N(this['locale'],'Reopen'),_0x298ccb['tooltip']=N(this['locale'],'Reopen'),_0x298ccb['icon']=_0x4a17ef,_0x298ccb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4713fb=>!_0x4713fb),_0x298ccb['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x35aa24,_0x21f43d)=>_0x35aa24&&_0x21f43d),_0x298ccb['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x298ccb;}['_trimContextValue'](_0x40ef82){if(_0x40ef82['length']<0x96)return _0x40ef82;const _0x45ed53=_0x40ef82['lastIndexOf']('\x20',0x93);return _0x40ef82['substring'](0x0,_0x45ed53>-0x1?_0x45ed53:0x93)+'...';}['_attachContextActions'](){const _0x340967=this['element']['querySelector']('.ck-context'),_0x58f9fe=_0x340967['querySelector']('.ck-context__value');this['listenTo'](_0x340967,'mouseenter',()=>{_0x58f9fe['offsetWidth']<_0x58f9fe['scrollWidth']&&_0x340967['classList']['add']('overlay');}),this['listenTo'](_0x340967,'mouseleave',()=>{_0x340967['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3bd157 of this['focusables'])this['focusTracker']['add'](_0x3bd157['element']),this['keystrokes']['listenTo'](_0x3bd157['element']);}['_createContextView'](){const _0x16228f=new oe(this['locale']);return _0x16228f['bind']('contextValue')['to'](this),_0x16228f;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2eabb3,_0x33d820,_0x355ca5,_0x373df7){super(_0x2eabb3),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x33d820,this['_localUser']=_0x355ca5,this['_config']=_0x373df7,this['commentThreadHeaderView']=new Xt(_0x2eabb3,_0x33d820),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x2eabb3,N(_0x2eabb3,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2eabb3,_0x33d820,Object['assign']({'CommentView':this['_config']['CommentView']},_0x373df7)),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',(_0x423559,_0x23bfcd)=>_0x423559||!!_0x23bfcd),this['bind']('isUnlinked')['to'](_0x33d820,'unlinkedAt',_0x302e37=>!!_0x302e37),this['bind']('ariaLabel')['to'](this,'length',_0x30a5d5=>{const _0x240d6e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x30a5d5,_0x240d6e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e48e4=>_0x3e48e4['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 _0x2ccb96=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x585086=_0x2ccb96['commentInputView'];return _0x2ccb96['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x585086,'value',(_0x25d42e,_0x309e4f,_0x440391,_0x4e609f,_0x253879)=>!!_0x253879||!!_0x4e609f&&_0x440391&&!_0x309e4f||_0x25d42e&&_0x440391&&!_0x309e4f),_0x585086['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3ba7f2,_0x578048,_0x22261e)=>{let _0x2a2593;return _0x2a2593=_0x22261e&&_0x578048?'Reply\x20to\x20reopen\x20discussion...':_0x3ba7f2?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x2a2593);}),_0x585086['bind']('submitLabel')['to'](this,'length',_0x4dc962=>N(this['locale'],_0x4dc962?'Reply':'Comment')),_0x585086['on']('submit',(_0x32f1f9,_0x22b74f)=>{this['fire']('addComment',_0x22b74f),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x585086['on']('cancel',()=>{this['focus']();}),_0x585086['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x585086['on']('cancel',_0x24be22=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x24be22['stop']());}),this['on']('change:isActive',(_0x330d66,_0xb9c603,_0x5c7b94)=>{_0x5c7b94||this['length']||_0x585086['value']||this['fire']('removeCommentThread');}),_0x2ccb96;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4397f7,_0x3b760a,_0x476ee8,_0x1c3dec){super(_0x4397f7,_0x3b760a,_0x476ee8,_0x1c3dec),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4397f7,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2749f2,_0x4d298a,_0x10fc14)=>{_0x10fc14||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5039d3,_0x2c888e,_0x381ec8)=>{_0x381ec8&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4d3e8b=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4d3e8b['if']('isActive','ck-thread--active'),_0x4d3e8b['if']('isUnlinked','ck-thread--unlinked'),_0x4d3e8b['if']('isConfirm','ck-thread--remove-confirmation'),_0x4d3e8b['to']('actionIndicator',_0xd81804=>_0xd81804?'ck-thread--'+_0xd81804:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4d3e8b['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 _0x4b160d of this['commentsListView']['commentViews'])_0x4b160d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x31beec}=this,_0x1cde10=this['commentsListView']['commentViews']['get'](0x0);_0x1cde10===this['_boundFirstCommentView']||_0x1cde10['isSystemComment']||(this['_boundFirstCommentView']=_0x1cde10,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1cde10,'actionIndicator',_0x36ec44=>'remove'===_0x36ec44?'remove':null),_0x1cde10['placeholder']=N(_0x31beec,'Write\x20a\x20comment...'),_0x1cde10['removeButton']['on']('execute',_0x5d6f13=>{_0x5d6f13['stop'](),this['showConfirm'](N(_0x31beec,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1cde10['focus']();}),_0x1cde10['actionBar']['add'](this['resolveButton'],0x0),_0x1cde10['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5c39de=new _0x21109b(this['locale']);return _0x5c39de['label']=N(this['locale'],'Resolve'),_0x5c39de['tooltip']=N(this['locale'],'Resolve'),_0x5c39de['icon']=_0x1299c5,_0x5c39de['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5c39de['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3780ba=>!_0x3780ba),_0x5c39de['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x383af2,_0x4ed226)=>_0x383af2&&!_0x4ed226),_0x5c39de['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5c39de;}['_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(_0x22d4dd){super(_0x22d4dd),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x40de0a,_0xc0d152,_0x31be35)=>{this['element']['innerHTML']=_0x31be35;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x513146,_0x1f321d,_0x53ae8f){super(_0x513146),this['_model']=_0x1f321d,this['_config']=_0x53ae8f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1f321d,'content',_0x1f321d,'authoredAt',(_0x239219,_0x5585e9)=>N(_0x513146,'COMMENT_ARIA_LABEL',[_0x1f321d['author']['name'],_0x53ae8f['formatDateTime'](_0x5585e9),new DOMParser()['parseFromString'](_0x239219,'text/html')['body']['textContent'],_0x1f321d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x513146,N(_0x513146,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xae5e8b(),this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x377930=>_0x377930['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 _0x3b54e5=new is(this['locale']);return _0x3b54e5['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xd7df45,_0x5931ba)=>_0x5931ba?ts(_0xd7df45,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xd7df45),_0x3b54e5;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x27c718=new es(this['locale'],this['_config']['editorConfig']);return _0x27c718['value']=this['_model']['content'],_0x27c718['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x27c718['submitLabel']=N(this['locale'],'Save'),_0x27c718['on']('submit',(_0x14a44c,_0x1bf5ac)=>{this['fire']('updateComment',this['_model']['id'],_0x1bf5ac),this['switchToDisplayMode'](),this['focus']();}),_0x27c718['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x27c718['once']('editorReady',()=>{_0x27c718['focus']();}),_0x27c718['createEditor'](),_0x27c718['delegate']('editorReady')['to'](this),_0x27c718['delegate']('editorDestroyed')['to'](this),_0x27c718;}['_setupKeyboardNavigation'](){const _0x15ea07=this['element'];this['keystrokes']['listenTo'](_0x15ea07);for(const _0x4c56a8 of this['focusables'])this['focusTracker']['add'](_0x4c56a8['element']),this['keystrokes']['listenTo'](_0x4c56a8['element']);this['focusables']['on']('change',(_0x51a01d,_0x19ee70)=>{for(const _0x3c297c of _0x19ee70['removed'])this['focusTracker']['remove'](_0x3c297c['element']),this['keystrokes']['stopListening'](_0x3c297c['element']);for(const _0x8c85a9 of _0x19ee70['added'])this['focusTracker']['add'](_0x8c85a9['element']),this['keystrokes']['listenTo'](_0x8c85a9['element']);}),this['keystrokes']['set']('enter',(_0x228b7f,_0x19c401)=>{_0x15ea07===_0x228b7f['target']&&(this['focusCycler']['focusFirst'](),_0x19c401());}),this['keystrokes']['set']('esc',(_0x4f27fd,_0x47f078)=>{_0x15ea07!==_0x4f27fd['target']&&(this['focus'](),_0x47f078());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x18595a,_0xbfce03,_0x5c3863){super(_0x18595a,_0xbfce03,_0x5c3863),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x18595a,'Reply...')),this['bind']('authoredAt')['to'](_0xbfce03),this['bind']('resolvedAt')['to'](_0xbfce03),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 _0x5de8e0(_0x18595a,_0xbfce03['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xbfce03,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x460cc5=this['bindTemplate'],_0x83f579=[{'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':_0x460cc5['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x460cc5['to']('authoredAt',_0x5debba=>this['_config']['formatDateTime'](_0x5debba))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x460cc5['if']('isEditMode','ck-comment__actions--hidden'),_0x460cc5['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']&&_0x83f579['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x460cc5['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x460cc5['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x460cc5['if']('isEditMode','ck-comment--edit'),_0x460cc5['if']('isSystemComment','ck-comment--info'),_0x460cc5['to']('actionIndicator',_0x15bfa3=>_0x15bfa3?'ck-comment--'+_0x15bfa3:'')],'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':_0x83f579}]}]};}['_createEditButton'](){const _0x349885=new _0x49f2c7(this['locale']);return _0x349885['label']=N(this['locale'],'Edit'),_0x349885['icon']=_0x7ba0fb,_0x349885['withText']=!0x0,_0x349885['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x349885['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x142603=>!_0x142603),_0x349885['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x349885['on']('execute',()=>this['switchToEditMode']()),_0x349885;}['_createRemoveButton'](){const _0x33cd48=new _0x49f2c7(this['locale']);return _0x33cd48['label']=N(this['locale'],'Remove'),_0x33cd48['icon']=_0x37d2b3,_0x33cd48['withText']=!0x0,_0x33cd48['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x33cd48['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x51cb4e=>!_0x51cb4e),_0x33cd48['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x33cd48['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x33cd48;}['_createDropdown'](){const _0x30eb6f=_0x12ae92(this['locale'],_0x11425f),_0x2bab78=_0x30eb6f['panelView']['children'],_0x1a5f1e=new _0x1a323c(this['locale']),_0x4ec3e0=_0x30eb6f['bindTemplate'];_0x4391eb(_0x30eb6f,()=>this['items']['find'](_0x46180d=>_0x46180d['isVisible'])),_0x30eb6f['extendTemplate']({'attributes':{'class':[_0x4ec3e0['if']('isVisible','ck-hidden',_0x1300c5=>!_0x1300c5)]}});const _0x409b4c=(_0x7a7d61,_0x3bec6d=-0x1)=>{const _0xc7c31f=new _0x8512b5(this['locale']);_0xc7c31f['children']['add'](_0x7a7d61);const _0x5a6b19=_0x3bec6d>-0x1?_0x3bec6d:_0x1a5f1e['items']['length'];_0x1a5f1e['items']['add'](_0xc7c31f,_0x5a6b19);const _0x31638d=Array['from'](this['items']);_0x30eb6f['unbind']('isEnabled','isVisible'),_0x30eb6f['bind']('isEnabled')['toMany'](_0x31638d,'isEnabled',(..._0xab3846)=>_0xab3846['some'](_0x462681=>_0x462681)),_0x30eb6f['bind']('isVisible')['toMany'](_0x31638d,'isVisible',(..._0x21ebde)=>_0x21ebde['some'](_0x3cbe18=>_0x3cbe18));};_0x30eb6f['panelPosition']='sw',_0x30eb6f['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x1fc351});for(const _0x455ac0 of this['items'])_0x409b4c(_0x455ac0);return _0x2bab78['add'](_0x1a5f1e),_0x30eb6f['listenTo'](this['items'],'add',(_0x312499,_0x1e4048,_0x38fde6)=>{_0x409b4c(_0x1e4048,_0x38fde6);}),_0x30eb6f['listenTo'](this['items'],'remove',(_0x3ca9b1,_0x100cc4,_0x5a1082)=>{_0x1a5f1e['items']['remove'](_0x5a1082);}),_0x30eb6f;}['_attachActions'](_0x8c2ce0,_0x136065){const _0x2008a2=_0x8c2ce0&&_0x8c2ce0['element'];_0x2008a2&&(this['listenTo'](_0x2008a2,'mouseenter',()=>this['actionIndicator']=_0x136065),this['listenTo'](_0x2008a2,'focus',()=>this['actionIndicator']=_0x136065),this['listenTo'](_0x2008a2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2008a2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x149edf=super['_createCommentInputView']();return _0x149edf['bind']('placeholder')['to'](this),_0x149edf;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x404d18){const _0x3df5c6=Dt(_0x404d18,0x1e),_0x57af1d=new MutationObserver(_0x14376c=>{for(const _0x4999c4 of _0x14376c)('attributes'==_0x4999c4['type']&&'class'==_0x4999c4['attributeName']||'childList'==_0x4999c4['type']||'characterData'==_0x4999c4['type'])&&_0x3df5c6();});return{'attach'(_0x1f41f9){_0x57af1d['observe'](_0x1f41f9,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x57af1d['disconnect'](),_0x3df5c6['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2ae51c,_0x4c0900){super(_0x2ae51c),this['id']=_0x58c8cf(),this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x9be2f9,_0x16f996)=>this['fire']('Esc',_0x16f996)),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'](_0x4c0900),this['mainView']=_0x4c0900;const _0x256399=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x256399['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 _0x5972a3=this['element']['clientHeight'];_0x5972a3&&(this['height']=_0x5972a3);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x362d6f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xabb344,target:_0x57123e,type:_0x10a661,isVisible:_0x584b63=!0x0}){super(),this['view']=_0xabb344,this['view']['element']||this['view']['render'](),this['_type']=_0x10a661,this['_target']=_0x57123e,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x23eb0b([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x24ad5c,_0x3b342d)=>{this['view']['focusTracker']['add'](_0x3b342d);}),this['focusableElements']['on']('remove',(_0x5869bf,_0x58eb43)=>{this['view']['focusTracker']['remove'](_0x58eb43);}),this['set']('isVisible',_0x584b63);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2d1b8a=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2d1b8a),_0x2d1b8a;}get['targetRect'](){const _0x2b8eb0=this['target'];if(null===_0x2b8eb0)return null;if(_0x2b8eb0 instanceof _0x37570f)return _0x2b8eb0;const _0x41c2c2=_0x2b8eb0['filter'](_0x4eb7a6=>function(_0x4bea57){const _0x1b3db3=_0x4bea57['offsetParent'];if(_0x1b3db3)return!0x0;const _0x5a825f=_0x4bea57['getClientRects']()['item'](0x0);return!!_0x5a825f;}(_0x4eb7a6));return 0x0===_0x41c2c2['length']?null:new _0x37570f(_0x41c2c2[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x66ba35){this['view']['isActive']=_0x66ba35,this['view']['mainView']['isActive']=_0x66ba35;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3a5d36){if(!(null===_0x3a5d36||_0x3a5d36 instanceof _0x37570f||Array['isArray'](_0x3a5d36)&&_0x3a5d36['every'](_0x113c26=>fi(_0x113c26))))throw new _0x51f518('annotation-invalid-target',null,{'target':_0x3a5d36});}['_getNormalizedTarget'](){const _0x1897b8='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x1897b8)?[_0x1897b8]:_0x1897b8;}}function fi(_0x181e43){return null!==_0x181e43&&'object'==typeof _0x181e43&&'nodeType'in _0x181e43&&0x1===_0x181e43['nodeType'];}class S extends _0x23eb0b{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x51f360=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x199d2b(),this['_focusTracker']['on']('change:isFocused',(_0x45ffad,_0xc44ef7,_0x75255e)=>{_0x75255e||this['fire']('blur');});for(const _0x44814e of _0x51f360)this['add'](_0x44814e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4aeb69){if(this['has'](_0x4aeb69))throw new _0x51f518('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4aeb69['innerView'],_0x4aeb69),this['_viewToAnnotation']['set'](_0x4aeb69['view'],_0x4aeb69);for(const _0x4e42e5 of _0x4aeb69['focusableElements'])this['_focusTracker']['add'](_0x4e42e5);this['listenTo'](_0x4aeb69['focusableElements'],'add',(_0x41ce78,_0x16bdff)=>{this['_focusTracker']['add'](_0x16bdff);}),this['listenTo'](_0x4aeb69['focusableElements'],'remove',(_0x8aef8b,_0x16583f)=>{this['_focusTracker']['remove'](_0x16583f);}),this['listenTo'](_0x4aeb69['view']['focusTracker'],'change:isFocused',(_0x1b7dec,_0x12c2de,_0xada6d5)=>{_0xada6d5&&this['fire']('focus',_0x4aeb69);}),_0x4aeb69['updateTargetRect']();const _0x55ce2e=this['_getOrderInContent'](_0x4aeb69['view']['targetRect']);return super['add'](_0x4aeb69,_0x55ce2e);}['remove'](_0x50b277){if(!this['has'](_0x50b277))throw new _0x51f518('annotationcollection-not-existing-item',null);this['stopListening'](_0x50b277['view']['focusTracker']),this['stopListening'](_0x50b277['focusableElements']);for(const _0x556a16 of _0x50b277['focusableElements'])this['_focusTracker']['remove'](_0x556a16);return this['_viewToAnnotation']['delete'](_0x50b277['view']),this['_innerViewToAnnotation']['delete'](_0x50b277['innerView']),super['remove'](_0x50b277);}['getByInnerView'](_0x2e5f43){return this['_innerViewToAnnotation']['get'](_0x2e5f43);}['getByView'](_0x308293){return this['_viewToAnnotation']['get'](_0x308293);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x36b66a of this)_0x36b66a['updateTargetRect']();this['_sort']();}['_sort'](){const _0x8347e4=Array['from'](this)['sort']((_0x1037ef,_0x16f600)=>w(_0x1037ef['view']['targetRect'],_0x16f600['view']['targetRect']));for(let _0x11727c=_0x8347e4['length']-0x1;_0x11727c>0x0;_0x11727c--){const _0x46ff38=_0x8347e4[_0x11727c];_0x11727c!==this['getIndex'](_0x46ff38)&&(this['remove'](_0x46ff38),this['add'](_0x46ff38));}}['_getOrderInContent'](_0x477153){let _0xd802ce=0x0;if(!_0x477153)return this['length'];for(const _0x35654e of this){const _0x2c0828=_0x35654e['view']['targetRect'];if(_0x2c0828){if(w(_0x477153,_0x2c0828)<0x0)return _0xd802ce;_0xd802ce++;}}return _0xd802ce;}}function v({source:_0xc92d1,target:_0x2b7dfc,filter:_0x8044f3}){for(const _0x289e54 of _0xc92d1)_0x8044f3(_0x289e54)&&_0x2b7dfc['add'](_0x289e54);_0x2b7dfc['listenTo'](_0xc92d1,'add',(_0x9c451d,_0x1648ec)=>{_0x8044f3(_0x1648ec)&&_0x2b7dfc['add'](_0x1648ec);}),_0x2b7dfc['listenTo'](_0xc92d1,'remove',(_0x1497bf,_0x34f95b)=>{_0x2b7dfc['has'](_0x34f95b)&&_0x2b7dfc['remove'](_0x34f95b);});}function w(_0x3706bc,_0x9e6a65){if(null===_0x3706bc&&null===_0x9e6a65)return 0x0;if(null===_0x3706bc)return-0x1;if(null===_0x9e6a65)return 0x1;const _0x48a7f6=_0x3706bc['top']-_0x9e6a65['top'];return 0x0==_0x48a7f6?_0x3706bc['left']-_0x9e6a65['left']:_0x48a7f6;}class y extends _0x2738de{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c1819){if(super(_0x1c1819),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1c1819 instanceof _0x2d455d){const _0x3184f2=_0x1c1819['locale'];_0x1c1819['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x558bff){this['collection']['add'](_0x558bff);}['remove'](_0x8a65c4){this['collection']['remove'](_0x8a65c4),_0x8a65c4['destroy']();}['refreshVisibility'](){for(const _0x3cd316 of this['collection'])_0x3cd316['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3457a6){return this['collection']['getByInnerView'](_0x3457a6);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x14cc2e of this['collection'])_0x14cc2e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x45995d){this['fire']('_activateAnnotation',_0x45995d);}['createAnnotation'](_0x3e1ec7){return new T(_0x3e1ec7);}['createAnnotationView'](_0x59f401,_0x108475){return new E(_0x59f401,_0x108475);}['_addActiveAnnotation'](_0x35ab62){const _0x1d7b61=new Set(this['activeAnnotations']);_0x1d7b61['add'](_0x35ab62),this['activeAnnotations']=_0x1d7b61;}['_removeActiveAnnotation'](_0x17ba59){const _0x39fff0=new Set(this['activeAnnotations']);_0x39fff0['delete'](_0x17ba59),this['activeAnnotations']=_0x39fff0;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1a2c3e=this['collection'],_0x34640a=this['_visibleAnnotations'];function _0x377b0b(_0x59485b){const _0x503e66=_0x59485b['source'];_0x503e66['isVisible']&&!_0x34640a['has'](_0x503e66)?_0x34640a['add'](_0x503e66):!_0x503e66['isVisible']&&_0x34640a['has'](_0x503e66)&&_0x34640a['remove'](_0x503e66),_0x503e66['view']['focusTracker']['remove'](_0x503e66['view']['element']),_0x503e66['view']['focusTracker']['add'](_0x503e66['view']['element']);}this['listenTo'](_0x1a2c3e,'add',(_0x5853e2,_0x1d2c4b)=>{_0x1d2c4b['isVisible']&&_0x34640a['add'](_0x1d2c4b),this['listenTo'](_0x1d2c4b,'change:isVisible',_0x377b0b);}),this['listenTo'](_0x1a2c3e,'remove',(_0x35eb37,_0x11da15)=>{_0x34640a['has'](_0x11da15)&&_0x34640a['remove'](_0x11da15),this['stopListening'](_0x11da15,'change:isVisible',_0x377b0b);});}['_setupEnterAnnotationKeystroke'](){const _0x5ef4d7=_0x203300=>{_0x203300['on']('ready',()=>{_0x203300['keystrokes']['set'](_0xe143ff,(_0x21f83c,_0x1cc960)=>{const _0x13c99b=_0x5ae716(this['activeAnnotations']['values']());_0x13c99b&&(_0x13c99b['view']['focus'](),_0x1cc960());});});};this['context']instanceof _0x2d455d?_0x5ef4d7(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1dd5b1,_0x49977a)=>{_0x5ef4d7(_0x49977a);});}['_setupEscapeAnnotationHandling'](){const _0x540509=_0x2b4260=>{const _0x527fe6=_0x2b4260['source'],_0x257217=[];let _0x4cc4fe;if(Array['isArray'](_0x527fe6['target'])){_0x4cc4fe=_0x527fe6['target'][0x0],this['context']instanceof _0x2d455d?_0x257217['push'](this['context']):this['context']['editors']&&_0x257217['push'](...this['context']['editors']);for(const _0x1bad81 of _0x257217)for(const _0x58a2f5 of _0x1bad81['editing']['view']['domRoots']['values']())if(_0x58a2f5['contains'](_0x4cc4fe))return void _0x1bad81['editing']['view']['focus']();_0x4cc4fe['focus']();}};this['listenTo'](this['collection'],'add',(_0x434e27,_0x5a5748)=>{this['listenTo'](_0x5a5748,'escape',_0x540509,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1c7268,_0xa3732d)=>{this['stopListening'](_0xa3732d,'escape',_0x540509);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2738de{['_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(_0x2189fb){super(_0x2189fb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xf8db43=this['context']['config'];_0xf8db43['define']('comments.maxCommentsWhenCollapsed',0x2),_0xf8db43['define']('comments.maxThreadTotalWeight',0x1f4),_0xf8db43['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xf8db43['define']('comments.CommentThreadView',vt),_0xf8db43['define']('comments.CommentView',gt),_0xf8db43['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4637ff=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x25f8f4,_0xfdf477)=>this['_addCommentThread'](_0xfdf477)),this['on']('submitCommentThread',(_0x27e6e7,_0x398aec)=>this['_submitCommentThread'](_0x398aec)),this['on']('resolveCommentThread',(_0x21a241,_0x23e40e)=>this['_resolveCommentThread'](_0x23e40e)),this['on']('resolveCommentThread',(_0x45f8fd,_0x1e5ab3)=>this['_updateActiveAnnotation'](_0x1e5ab3),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2e693d,_0x488f7d)=>this['_reopenCommentThread'](_0x488f7d)),this['on']('reopenCommentThread',(_0x5acf4f,_0x38be5e)=>this['_updateActiveAnnotation'](_0x38be5e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x352133,_0x13696f)=>this['_removeCommentThread'](_0x13696f)),this['on']('updateCommentThread',(_0x478c79,_0x377d2c)=>this['_updateCommentThread'](_0x377d2c)),this['on']('updateCommentThread',(_0x49e647,_0x5222e4)=>this['_updateActiveAnnotation'](_0x5222e4),{'priority':'lowest'}),this['on']('addComment',(_0x113143,_0x51fa46)=>this['_addComment'](_0x51fa46)),this['on']('updateComment',(_0x44aa4e,_0x139b07)=>this['_updateComment'](_0x139b07)),this['on']('removeComment',(_0x44d111,_0x35077b)=>this['_removeComment'](_0x35077b)),this['on']('addComment',(_0x4aaa47,{threadId:_0xe666bc,isFromAdapter:_0x323405})=>{if(_0x323405)return;const _0x52afb2=this['getCommentThread'](_0xe666bc),_0x133432=_0x52afb2&&this['_threadToController']['get'](_0x52afb2);_0x133432&&_0x133432['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4637ff,'change:activeAnnotations',(_0xa43b36,_0x43fad2,_0x5acfed)=>{const _0xabab52=Array['from'](_0x5acfed)['map'](_0x2df9a3=>this['_viewToController']['get'](_0x2df9a3['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xabab52?_0xabab52['model']:null;});}set['adapter'](_0x52bb22){if(this['_adapter'])throw new _0x51f518('commentsrepository-adapter-already-set');this['_adapter']=_0x52bb22;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x14100c=Tt,threadId:_0x3da65b=_0x58c8cf(),comments:_0x36aaf3=[],unlinkedAt:_0x48c557=null,resolvedAt:_0xad02d2=null,resolvedBy:_0x16e0f0=null,target:_0x965374=null,context:_0x519099=null,attributes:_0x3d2bcb={},isResolvable:_0x31ef28=!0x0,isSubmitted:_0x5dd40d=!0x1,isFromAdapter:_0x5b8f79=!0x1}={}){return this['fire'](bt('addCommentThread',_0x14100c),{'channelId':_0x14100c,'threadId':_0x3da65b,'comments':_0x36aaf3,'unlinkedAt':_0x48c557,'resolvedAt':_0xad02d2,'resolvedBy':_0x16e0f0,'target':_0x965374,'context':_0x519099,'attributes':_0x3d2bcb,'isFromAdapter':_0x5b8f79,'isResolvable':_0x31ef28,'isSubmitted':_0x5dd40d}),this['getCommentThread'](_0x3da65b);}['openNewCommentThread']({channelId:_0x41a9d0=Tt,threadId:_0x1402f3=_0x58c8cf(),target:_0x422eaf,context:_0x13ac01=null,isResolvable:_0x2edff3=!0x0}){if(this['_readOnlyChannels']['has'](_0x41a9d0)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x422eaf)throw new _0x51f518('commentsrepository-missing-target');const _0x29b16e=this['addCommentThread']({'channelId':_0x41a9d0,'threadId':_0x1402f3,'target':_0x422eaf,'context':_0x13ac01,'isResolvable':_0x2edff3});if(!_0x29b16e)return null;const _0x241c18=this['_threadToController']['get'](_0x29b16e),_0x2a6222=_0x241c18['view']['commentThreadInputView']['commentInputView'],_0x55fb24=this['context']['plugins']['get'](y),_0x10d919=_0x55fb24['getByInnerView'](_0x241c18['view']);return _0x55fb24['activate'](_0x10d919),_0x2a6222['once']('editorReady',()=>_0x2a6222['focus']()),_0x29b16e;}['hasCommentThread'](_0x25a29d){if('string'!=typeof _0x25a29d)throw new _0x51f518('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x25a29d);}['updateCommentThread']({channelId:_0x233296=Tt,threadId:_0x2e2fd1,context:_0x35dd7d,unlinkedAt:_0x537293,attributes:_0x45ac67,isFromAdapter:_0x23e0cb=!0x1}){return this['fire'](bt('updateCommentThread',_0x233296),{'channelId':_0x233296,'threadId':_0x2e2fd1,'context':_0x35dd7d,'unlinkedAt':_0x537293,'attributes':_0x45ac67,'isFromAdapter':_0x23e0cb}),this['getCommentThread'](_0x2e2fd1);}['getCommentThread'](_0x2c8a31){if('string'!=typeof _0x2c8a31)throw new _0x51f518('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2c8a31);}['fetchCommentThread']({channelId:_0x4bc493,threadId:_0x5bacd2}={}){const _0x4a2731=this['getCommentThread'](_0x5bacd2);if(_0x4a2731)return Promise['resolve'](_0x4a2731);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x51f518('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4bc493,'threadId':_0x5bacd2})['then'](_0x15a5c5=>this['hasCommentThread'](_0x5bacd2)?this['getCommentThread'](_0x5bacd2):_0x15a5c5?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4bc493},_0x15a5c5)):void 0x0)['catch'](_0x3372d7=>{throw console['error'](_0x3372d7),new _0x51f518('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x199d77,skipNotAttached:_0xb09ee7=!0x1,skipEmpty:_0x512340=!0x1,toJSON:_0x1d01f8=!0x1}={}){const _0x14ddd4=[];for(const _0x14997b of this['_threads']['values']())_0x199d77&&_0x14997b['channelId']!==_0x199d77||_0xb09ee7&&!_0x14997b['isAttached']||_0x512340&&0x0===_0x14997b['length']||_0x14ddd4['push'](_0x14997b);return _0x1d01f8?_0x14ddd4['map'](_0x472cb1=>_0x472cb1['toJSON']()):_0x14ddd4;}['getAnnotationForCommentThread'](_0x186709){const _0x271c18=this['_threadToController']['get'](_0x186709);if(!_0x271c18)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x271c18['view'])||null;}['getCommentThreadForAnnotation'](_0x2b14c9){const _0xcafdc4=this['_viewToController']['get'](_0x2b14c9['innerView']);return _0xcafdc4?_0xcafdc4['model']:null;}['setActiveCommentThread'](_0x556939){const _0x1c7b7c=this['context']['plugins']['get'](y);if(!_0x556939)return void(this['activeCommentThread']&&_0x1c7b7c['deactivateAll']());const _0xf2d589=this['getCommentThread'](_0x556939);if(!_0xf2d589)throw new _0x51f518('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x556939});if(!this['_threadToController']['has'](_0xf2d589))throw new _0x51f518('commentsrepository-active-not-attached',null,{'threadId':_0x556939});const _0x37e671=_0x1c7b7c['getByInnerView'](this['_threadToController']['get'](_0xf2d589)['view']);_0x1c7b7c['activate'](_0x37e671);}['switchReadOnly'](_0x4f8c3f,_0x1e69a2){_0x4f8c3f?this['_readOnlyChannels']['add'](_0x1e69a2):this['_readOnlyChannels']['delete'](_0x1e69a2),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x57b83a){return this['_readOnlyChannels']['has'](_0x57b83a)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x28507a,_0x172478){return new yt(_0x28507a,_0x172478);}['setPermissions'](_0x140b3d,_0x151f65=Tt){this['_permissions']['set'](_0x151f65,_0x140b3d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4cf6cf=Tt){return this['_permissions']['has'](_0x4cf6cf)?this['_permissions']['get'](_0x4cf6cf):_t;}['_addCommentThread']({channelId:_0x8dac15,threadId:_0x589079,comments:_0x18c7f6,unlinkedAt:_0x157a04,resolvedAt:_0x20a5c8,resolvedBy:_0x48f571,target:_0x53e29c,context:_0x44a01a,attributes:_0x1e5443,isFromAdapter:_0x4db917,isResolvable:_0x13e2cb,isSubmitted:_0x1b175b}){if('string'!=typeof _0x589079)throw new _0x51f518('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x589079});if(this['hasCommentThread'](_0x589079))throw new _0x51f518('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x589079});const _0x182c66=new pi(this,{'channelId':_0x8dac15,'id':_0x589079,'context':_0x44a01a,'attributes':_0x1e5443,'unlinkedAt':_0x157a04,'resolvedAt':_0x20a5c8,'resolvedBy':_0x48f571?this['context']['plugins']['get'](it)['getUser'](_0x48f571):null,'isResolvable':_0x13e2cb,'isSubmitted':_0x1b175b||_0x4db917});this['_threads']['set'](_0x589079,_0x182c66);for(const _0x243f40 of _0x18c7f6)_0x182c66['_add'](this['_createNewComment']({'threadId':_0x589079,..._0x243f40}));return _0x53e29c&&_0x182c66['attachTo'](_0x53e29c),_0x4db917||!_0x182c66['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x8dac15,'threadId':_0x589079});}['_submitCommentThread']({channelId:_0x4b989b,threadId:_0x62ce9e}){if(!this['hasCommentThread'](_0x62ce9e))throw new _0x51f518('commentsrepository-missing-comment-thread',this);const _0x1ba518=this['getCommentThread'](_0x62ce9e);if(_0x1ba518['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2751f7,comments:_0x52c8b4,resolvedAt:_0x6a4f04,resolvedBy:_0xe23ab,context:_0x537735,attributes:_0xbf8b16}=_0x1ba518,_0x165c5a=this['context']['plugins']['get']('PendingActions'),_0x469060=_0x165c5a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4b989b,'threadId':_0x2751f7,'comments':_0x52c8b4['map'](_0x55f4cd=>_0x55f4cd['toJSON']()),'resolvedAt':_0x6a4f04,'resolvedBy':_0xe23ab?_0xe23ab['id']:_0xe23ab,'context':_0x537735,'attributes':_0xbf8b16})['then'](({comments:_0x306793})=>{_0x165c5a['remove'](_0x469060);for(const _0x8f6322 of _0x306793)this['_updateComment']({'channelId':_0x4b989b,'threadId':_0x62ce9e,'commentId':_0x8f6322['commentId'],'createdAt':_0x8f6322['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x555493=>{throw console['error'](_0x555493),new _0x51f518('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x37518d,target:_0x4dbde1}){const _0xcc32d2=this['getCommentThread'](_0x37518d);if(!_0xcc32d2)throw new _0x51f518('commentsrepository-attach-missing-comment-thread',this);const _0x1420df=this['context']['plugins']['get']('PendingActions'),_0x197b6f=this['context']['plugins']['get'](y),_0x590010=this['_createCommentThreadView'](_0xcc32d2),_0x3e52ca=new yt(_0xcc32d2,_0x590010);let _0x184341=null;_0x590010['on']('change:isDirty',(_0x278e51,_0x23d752,_0x2b068a)=>{_0x2b068a?_0x184341=_0x1420df['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x184341&&(_0x1420df['remove'](_0x184341),_0x184341=null);}),this['_threadToController']['set'](_0xcc32d2,_0x3e52ca),this['_viewToController']['set'](_0x590010,_0x3e52ca);const _0x473377=new E(this['context']['locale'],_0x590010);_0x473377['bind']('length')['to'](_0x590010),_0x473377['bind']('isDirty')['to'](_0x590010,'isDirty',_0x590010,'length',(_0x13872e,_0x1e4a6e)=>_0x13872e||!_0x1e4a6e),_0x473377['bind']('isActive')['to'](_0x590010),_0x473377['type']='comment';const _0x476453=new T({'view':_0x473377,'target':_0x4dbde1,'type':'comment','isVisible':!_0xcc32d2['archivedAt']});return _0x590010['on']('escape',()=>{_0x476453['fire']('escape');}),this['_bindAnnotationToEditors'](_0x590010,_0x476453),_0x197b6f['add'](_0x476453),_0x476453;}['_bindAnnotationToEditors'](_0x205bc0,_0x345069){this['listenTo'](_0x205bc0,'editorReady',(_0xd91161,_0x86fc62)=>{const _0x12fd99=_0x86fc62['ui']['view']['body']['bodyCollectionContainer'];_0x345069['focusableElements']['add'](_0x12fd99),this['context']instanceof _0x2d455d&&this['context']['ui']['focusTracker']['add'](_0x12fd99);},{'priority':'highest'}),this['listenTo'](_0x205bc0,'editorDestroyed',(_0x49cd39,_0x34f75c)=>{const _0x1d16a6=_0x34f75c['ui']['view']['body']['bodyCollectionContainer'];_0x345069['focusableElements']['has'](_0x1d16a6)&&_0x345069['focusableElements']['remove'](_0x1d16a6),this['context']instanceof _0x2d455d&&this['context']['ui']['focusTracker']['remove'](_0x1d16a6);});}['_unbindEditors'](_0x42135e){this['stopListening'](_0x42135e,'editorReady'),this['stopListening'](_0x42135e,'editorDestroyed');}['_createCommentThreadView'](_0x3f5f0a){const _0x41bbb2=this['context']['plugins']['get'](it),{config:_0x4e4c48,locale:_0x5cb05d}=this['context'],_0x227378=lt(_0x4e4c48['get']('locale'),_0x5cb05d);return new(0x0,(_0x4e4c48['get']('comments'))['CommentThreadView'])(_0x5cb05d,_0x3f5f0a,_0x41bbb2['me'],{'editorConfig':{..._0x4e4c48['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4e4c48['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4e4c48['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4e4c48['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4e4c48['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x227378,'CommentView':_0x4e4c48['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28a9f7,channelId:_0x2cc95a,resolvedAt:_0x4e05dd,resolvedBy:_0x3db949,isFromAdapter:_0x3505c9}){if(!this['hasCommentThread'](_0x28a9f7))throw new _0x51f518('commentsrepository-missing-comment-thread',null,{'threadId':_0x28a9f7});const _0x10ad1f=this['getCommentThread'](_0x28a9f7);if(_0x10ad1f['isResolved'])throw new _0x51f518('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28a9f7});const _0x5d6dc7=this['context']['plugins']['get'](it);if(_0x10ad1f['resolvedBy']=_0x5d6dc7['getUser'](_0x3db949),_0x10ad1f['resolvedAt']=_0x4e05dd,_0x3505c9||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2844e4=this['context']['plugins']['get']('PendingActions'),_0x24bbec=_0x2844e4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2cc95a,'threadId':_0x28a9f7})['then'](({resolvedAt:_0x433caf,resolvedBy:_0x2eb714})=>{_0x2844e4['remove'](_0x24bbec),_0x10ad1f['resolvedBy']['id']!==_0x2eb714&&(_0x10ad1f['resolvedBy']=_0x5d6dc7['getUser'](_0x2eb714)),_0x10ad1f['resolvedAt']=_0x433caf;})['catch'](_0x50d21a=>{throw console['error'](_0x50d21a),new _0x51f518('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x592403,channelId:_0x2777a8,isFromAdapter:_0x43a70c}){if(!this['hasCommentThread'](_0x592403))throw new _0x51f518('commentsrepository-missing-comment-thread',null,{'threadId':_0x592403});const _0x5ab5be=this['getCommentThread'](_0x592403);if(!_0x5ab5be['isResolved'])throw new _0x51f518('commentsrepository-reopen-comment-thread',null,{'threadId':_0x592403});if(_0x5ab5be['resolvedBy']=null,_0x5ab5be['resolvedAt']=null,_0x43a70c||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5cec97=this['context']['plugins']['get']('PendingActions'),_0x405989=_0x5cec97['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2777a8,'threadId':_0x592403})['then'](()=>_0x5cec97['remove'](_0x405989))['catch'](_0x3305f1=>{throw console['error'](_0x3305f1),new _0x51f518('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5b3339,isFromAdapter:_0x368ed6}){const _0x45776b=this['getCommentThread'](_0x5b3339);if(!_0x45776b)throw new _0x51f518('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5b3339),this['_threads']['delete'](_0x5b3339),!_0x45776b['isSubmitted']||_0x368ed6||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x523e56=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3412e2}=_0x45776b,_0x3c6f94=_0x523e56['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3412e2,'threadId':_0x5b3339})['then'](()=>_0x523e56['remove'](_0x3c6f94))['catch'](_0x15e113=>{throw console['error'](_0x15e113),new _0x51f518('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x21b4f1,unlinkedAt:_0x36cf82,context:_0x2239ac,attributes:_0x1489ac,isFromAdapter:_0x3c3d10}){if('string'!=typeof _0x21b4f1)throw new _0x51f518('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x21b4f1});if(!this['hasCommentThread'](_0x21b4f1))throw new _0x51f518('commentsrepository-missing-comment-thread',null,{'threadId':_0x21b4f1});const _0x5e9681=this['getCommentThread'](_0x21b4f1);let _0x5d2966=!0x1;if(void 0x0!==_0x2239ac&&_0x5e9681['context']!==_0x2239ac&&(_0x5e9681['context']=_0x2239ac,_0x5d2966=!0x0),void 0x0!==_0x36cf82&&_0x5e9681['unlinkedAt']!==_0x36cf82&&(_0x5e9681['unlinkedAt']=_0x36cf82,_0x5d2966=!0x0),_0x1489ac&&!wt(_0x1489ac,_0x5e9681['attributes'])&&(_0x5e9681['attributes']=_0x1489ac,_0x5d2966=!0x0),!_0x5d2966)return Promise['resolve']();if(!_0x5e9681['isSubmitted']||_0x3c3d10||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5732a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x180ad2}=_0x5e9681,_0x37a235=_0x5732a8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x180ad2,'threadId':_0x21b4f1,'context':_0x2239ac,'unlinkedAt':_0x36cf82,'attributes':_0x1489ac})['then'](()=>_0x5732a8['remove'](_0x37a235))['catch'](_0x27e801=>{throw console['error'](_0x27e801),new _0x51f518('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4cec05){const _0x28b78f=this['context']['plugins']['get'](y),_0x1577b1=this['getCommentThread'](_0x4cec05);if(_0x1577b1['_isAttached']=!0x1,this['_threadToController']['has'](_0x1577b1)){const _0x427069=this['_threadToController']['get'](_0x1577b1),_0x4b5f8d=_0x427069['view'],_0xa718e8=_0x28b78f['getByInnerView'](_0x4b5f8d);this['_threadToController']['delete'](_0x1577b1),this['_viewToController']['delete'](_0x4b5f8d),_0xa718e8&&_0x28b78f['remove'](_0xa718e8),_0x427069['destroy'](),_0x4b5f8d['destroy']()['then'](()=>{this['_unbindEditors'](_0x4b5f8d);});}}['_updateActiveAnnotation']({threadId:_0x1d27a0,resolvedAt:_0x941e35,unlinkedAt:_0x37d818}){const _0x58fcc3=!!_0x941e35,_0x141303=this['context']['plugins']['get'](y),_0x37ec62=this['getCommentThread'](_0x1d27a0);if(this['_threadToController']['has'](_0x37ec62)){const _0xd141f8=this['_threadToController']['get'](_0x37ec62)['view'],_0x3fbe15=_0x141303['getByInnerView'](_0xd141f8);_0x3fbe15&&(_0x58fcc3&&_0x141303['_removeActiveAnnotation'](_0x3fbe15),_0x37d818?_0x3fbe15['isVisible']=!0x1:_0x3fbe15['refreshVisibility']());}}['_getExternalAuthor'](_0x2f46f8){const _0x394c9d=this['context']['plugins']['get'](it),_0x73c7eb=pt('external:'+_0x2f46f8),_0x2fdb3f=_0x394c9d['getUser'](_0x73c7eb);return _0x2fdb3f||_0x394c9d['addUser']({'id':_0x73c7eb,'name':_0x2f46f8});}['_createNewComment']({threadId:_0x2007bc,commentId:_0x215293=_0x58c8cf(),content:_0x1ad48d,authorId:_0x16fb5f,createdAt:_0x4494be,attributes:_0x1f8c0f}){if('string'!=typeof _0x215293)throw new _0x51f518('commentsrepository-invalid-commentid');if('string'!=typeof _0x16fb5f)throw new _0x51f518('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1ad48d||!_0x1ad48d['trim']())throw new _0x51f518('commentsrepository-invalid-comment-content');const _0x2629d5=this['context']['plugins']['get'](it)['getUser'](_0x16fb5f);if(!_0x2629d5)throw new _0x51f518('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x16fb5f});let _0xe07fec=null,_0x123150=_0x4494be;return _0x1f8c0f?.['@external']&&(_0xe07fec=this['_getExternalAuthor'](_0x1f8c0f['@external']['authorName']),_0x123150=new Date(_0x1f8c0f['@external']['createdAt'])),new wi(this,{'threadId':_0x2007bc,'id':_0x215293,'author':_0xe07fec||_0x2629d5,'creator':_0x2629d5,'content':_0x1ad48d,'createdAt':_0x4494be,'authoredAt':_0x123150,'attributes':_0x1f8c0f});}['_addComment'](_0x22f843){let {threadId:_0x524e26,content:_0x151f1c,attributes:_0x3f7499,isFromAdapter:_0x3cefed}=_0x22f843;const _0x13e2d0=this['getCommentThread'](_0x22f843['threadId']);if(!_0x13e2d0)throw new _0x51f518('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x58c2c2=this['_createNewComment'](_0x22f843),{id:_0x1e3c40}=_0x58c2c2;if(_0x13e2d0['_add'](_0x58c2c2),_0x3cefed||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x13e2d0['isSubmitted'])return Promise['resolve']();const _0x32bd43=this['context']['plugins']['get']('PendingActions'),{channelId:_0x398e5c}=_0x13e2d0,_0xb9c047=_0x32bd43['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3f7499||(_0x3f7499={}),this['adapter']['addComment']({'channelId':_0x398e5c,'threadId':_0x524e26,'commentId':_0x1e3c40,'content':_0x151f1c,'attributes':_0x3f7499})['then'](_0x21cd52=>{_0x32bd43['remove'](_0xb9c047),_0x21cd52&&this['_updateComment']({'channelId':_0x398e5c,'threadId':_0x524e26,'commentId':_0x1e3c40,'createdAt':_0x21cd52['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3b93ac=>{throw console['error'](_0x3b93ac),new _0x51f518('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x200dc9,commentId:_0x486670,content:_0x26f6fb,createdAt:_0x3d9c7e,attributes:_0x18908f,isFromAdapter:_0xb0198c}){if(void 0x0!==_0x26f6fb&&('string'!=typeof _0x26f6fb||!_0x26f6fb['trim']()['length']))throw new _0x51f518('commentsrepository-update-comment-invalid-content');const _0x2332a8=this['getCommentThread'](_0x200dc9),_0x36f97e=_0x2332a8['getComment'](_0x486670);if(!_0x36f97e)throw new _0x51f518('commentsrepository-update-missing-comment',this);let _0x598dc7=!0x1;if(_0x26f6fb&&_0x26f6fb!==_0x36f97e['content']&&(_0x36f97e['isEditable']||_0xb0198c)&&(_0x36f97e['content']=_0x26f6fb,_0x598dc7=!0x0),_0x3d9c7e&&_0x3d9c7e!==_0x36f97e['createdAt']&&(_0x36f97e['createdAt']=_0x3d9c7e,_0x36f97e['attributes']&&_0x36f97e['attributes']['@external']||(_0x36f97e['authoredAt']=_0x3d9c7e),_0x598dc7=!0x0),_0x18908f&&!wt(_0x18908f,_0x36f97e['attributes'])&&(_0x36f97e['attributes']=_0x18908f,_0x598dc7=!0x0),!_0x598dc7)return Promise['resolve']();if(_0x2332a8['fire']('commentUpdated'),_0xb0198c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4108f4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x56b1c6}=this['getCommentThread'](_0x36f97e['threadId']),_0xa16045=_0x4108f4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x56b1c6,'threadId':_0x200dc9,'commentId':_0x486670,'content':_0x26f6fb,'attributes':_0x18908f})['then'](()=>_0x4108f4['remove'](_0xa16045))['catch'](_0x514714=>{throw console['error'](_0x514714),new _0x51f518('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x9ca79c,commentId:_0x31180a,isFromAdapter:_0x14516d}){const _0x230c98=this['getCommentThread'](_0x9ca79c),_0x53e93b=_0x230c98['getComment'](_0x31180a);if(!_0x53e93b)throw new _0x51f518('commentsrepository-remove-missing-comment',this);if(_0x230c98['_remove'](_0x53e93b),_0x14516d||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3bd3a4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x57a541}=_0x230c98,_0x2383b0=_0x3bd3a4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x57a541,'threadId':_0x9ca79c,'commentId':_0x31180a})['then'](()=>_0x3bd3a4['remove'](_0x2383b0))['catch'](_0x115f1e=>{throw console['error'](_0x115f1e),new _0x51f518('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x362d6f(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x50ba7e,_0x41a1be){super();const _0x29b2c6=_0x41a1be['isResolvable'];this['channelId']=_0x41a1be['channelId'],this['id']=_0x41a1be['id'],this['comments']=new _0x23eb0b(),this['_repository']=_0x50ba7e,this['_isAttached']=!0x1,this['_isSubmitted']=_0x41a1be['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x50ba7e,'_permissions',_0x50ba7e,'_readOnlyChannels',()=>_0x50ba7e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x50ba7e,'_permissions',()=>_0x50ba7e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x50ba7e,'_permissions',()=>{const _0x200de3=_0x50ba7e['getPermissions'](this['channelId']);return _0x200de3['write']||_0x200de3['admin'];}),this['bind']('isResolvable')['to'](_0x50ba7e,'_permissions',()=>_0x29b2c6&&_0x50ba7e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x41a1be['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x334b79,_0x141efd)=>_0x334b79?_0x141efd?_0x334b79<_0x141efd?_0x334b79:_0x141efd:_0x334b79:_0x141efd),this['set']('unlinkedAt',_0x41a1be['unlinkedAt']||null),this['set']('resolvedAt',_0x41a1be['resolvedAt']||null),this['set']('resolvedBy',_0x41a1be['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1dd1e5=>!!_0x1dd1e5),this['set']('attributes',_0x41a1be['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x5c2755,_0x63ebe8)=>_0x5c2755+_0x63ebe8['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x480c81,id:_0x44efe0}=this;this['_repository']['fire'](bt('submitCommentThread',_0x480c81),{'channelId':_0x480c81,'threadId':_0x44efe0});}['setUnlinkedAt'](_0x2721f5){this['_update']({'unlinkedAt':_0x2721f5});}['resolve']({resolvedAt:_0x2a02b3=new Date(),resolvedBy:_0x35c720=null,isFromAdapter:_0x56988d=!0x1}={}){const _0x546c68=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x371f5d,id:_0x1787f4}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x371f5d),{'channelId':_0x371f5d,'threadId':_0x1787f4,'resolvedAt':_0x2a02b3,'resolvedBy':_0x35c720||_0x546c68['id'],'isFromAdapter':_0x56988d});}['reopen']({isFromAdapter:_0xeea769=!0x1}={}){const {channelId:_0x4e9bdb,id:_0x48a812}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x4e9bdb),{'channelId':_0x4e9bdb,'threadId':_0x48a812,'isFromAdapter':_0xeea769});}['setContext'](_0x5c0421){this['context']||this['_update']({'context':_0x5c0421});}['setAttribute'](_0x227e25,_0x2b9e4b){const _0x1fd333=It(this['attributes']);At(_0x1fd333,_0x227e25,_0x2b9e4b),this['_update']({'attributes':_0x1fd333});}['removeAttribute'](_0x3e5810){const _0x6d999a=It(this['attributes']);Ct(_0x6d999a,_0x3e5810),this['_update']({'attributes':_0x6d999a});}['remove']({isFromAdapter:_0x4634d0=!0x1}={}){const {channelId:_0x5e6b59,id:_0x51e3e1}=this;this['_repository']['fire'](bt('removeCommentThread',_0x5e6b59),{'channelId':_0x5e6b59,'threadId':_0x51e3e1,'isFromAdapter':_0x4634d0});}['attachTo'](_0x362751){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x362751});}['addComment'](_0x1a1d2a){const {channelId:_0x40c82c,id:_0x55b699}=this;this['_repository']['fire'](bt('addComment',_0x40c82c,_0x55b699),Object['assign']({'channelId':_0x40c82c,'threadId':_0x55b699},_0x1a1d2a));}['getComment'](_0x23abb2){if('string'!=typeof _0x23abb2)throw new _0x51f518('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x23abb2});return this['comments']['get'](_0x23abb2);}['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'](_0x58674c=>_0x58674c['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2c2fd5){return this['listenTo'](_0x2c2fd5,'change:authoredAt',()=>{const _0x6bbbf3=this['_findOptimalIndex'](_0x2c2fd5),_0x39363e=this['comments'];_0x6bbbf3-0x1!=_0x39363e['getIndex'](_0x2c2fd5)&&_0x6bbbf3+0x1!=_0x39363e['getIndex'](_0x2c2fd5)&&(this['_remove'](_0x2c2fd5),this['_add'](_0x2c2fd5));}),this['comments']['add'](_0x2c2fd5,this['_findOptimalIndex'](_0x2c2fd5));}['_update'](_0x406971){const {channelId:_0x3f1016,id:_0x4d51d4}=this;this['_repository']['fire'](bt('updateCommentThread',_0x3f1016),{..._0x406971,'channelId':_0x3f1016,'threadId':_0x4d51d4});}['_remove'](_0x2e1a2f){return this['stopListening'](_0x2e1a2f),_0x2e1a2f['destroy'](),this['comments']['remove'](_0x2e1a2f);}['_findOptimalIndex'](_0x49f395){const _0x4bf8f4=this['comments']['find'](_0x5f4976=>new Date(_0x5f4976['authoredAt'])['getTime']()>new Date(_0x49f395['authoredAt'])['getTime']());return _0x4bf8f4?this['comments']['getIndex'](_0x4bf8f4):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x362d6f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4e8fa2,_0x32d484){super();const _0x10952d=_0x4e8fa2['context']['plugins']['get'](it)['me'],_0x412984=_0x4e8fa2['getCommentThread'](_0x32d484['threadId']),_0x5da2e4=0x0===_0x412984['comments']['length'],_0x5a3147=_0x10952d===_0x32d484['author'];this['id']=_0x32d484['id'],this['threadId']=_0x32d484['threadId'],this['author']=_0x32d484['author'],this['creator']=_0x32d484['creator'],this['isExternal']=Boolean(_0x32d484['attributes']&&_0x32d484['attributes']['@external']),this['set']('content',_0x32d484['content']),this['createdAt']=_0x32d484['createdAt']||new Date(),this['set']('authoredAt',_0x32d484['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x412984,'resolvedAt'),this['set']('attributes',_0x32d484['attributes']||{}),this['bind']('isEditable')['to'](_0x4e8fa2,'_permissions',()=>{const _0x37d08a=_0x4e8fa2['getPermissions'](_0x412984['channelId'])['write'],_0x27010a=_0x4e8fa2['getPermissions'](_0x412984['channelId'])['modifyAll'];return _0x5a3147&&_0x37d08a||!_0x5a3147&&_0x27010a;}),this['bind']('isRemovable')['to'](_0x412984,'isRemovable',_0x4e8fa2,'_permissions',_0x226f3e=>{const _0xa20f0b=_0x4e8fa2['getPermissions'](_0x412984['channelId'])['write'],_0x23c255=_0x4e8fa2['getPermissions'](_0x412984['channelId'])['modifyAll'];return _0x5a3147&&_0xa20f0b||_0x226f3e&&_0x5da2e4||!_0x5a3147&&_0x23c255&&!_0x5da2e4;}),this['bind']('isReadOnly')['to'](_0x412984,'isReadOnly'),this['_repository']=_0x4e8fa2;}get['weight'](){return Math['max'](function(_0xd1b2b8){const _0xaa5db1=document['createElement']('div');return _0xaa5db1['innerHTML']=_0xd1b2b8,_0xaa5db1['textContent']['length'];}(this['content']),0xc8);}['update'](_0x14cfd0){const {threadId:_0x5210ab,id:_0x5f4090}=this;if(!this['_repository']['hasCommentThread'](_0x5210ab))throw new _0x51f518('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xdff328}=this['_repository']['getCommentThread'](_0x5210ab);this['_repository']['fire'](bt('updateComment',_0xdff328,_0x5210ab),{'channelId':_0xdff328,'threadId':_0x5210ab,'commentId':_0x5f4090,..._0x14cfd0});}['setAttribute'](_0x5188fa,_0x2b1154){const _0x3d7d3e=It(this['attributes']);At(_0x3d7d3e,_0x5188fa,_0x2b1154),this['update']({'attributes':_0x3d7d3e});}['removeAttribute'](_0x3a9d76){const _0x9df87=It(this['attributes']);Ct(_0x9df87,_0x3a9d76),this['update']({'attributes':_0x9df87});}['remove'](_0x436dc5={}){if(!_0x436dc5['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1c4007,id:_0x5d37e4}=this;if(!this['_repository']['hasCommentThread'](_0x1c4007))throw new _0x51f518('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x231feb}=this['_repository']['getCommentThread'](_0x1c4007);this['_repository']['fire'](bt('removeComment',_0x231feb,_0x1c4007),{'channelId':_0x231feb,'threadId':_0x1c4007,'commentId':_0x5d37e4,..._0x436dc5});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x51397c,..._0x1634d0){for(const _0x33d089 of _0x1634d0)void 0x0!==_0x33d089&&(_0x51397c+=':'+String(_0x33d089));return _0x51397c;}class rt extends _0x385260{constructor(_0xdd72f4){super(_0xdd72f4),this['set']('hasContent',!0x1);}['refresh'](){const _0x22d640=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x49be42 of _0x22d640['getRanges']())if(this['_hasContent'](_0x49be42))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x256035=_0x58c8cf(),ranges:_0x13255a,comment:_0x473fb7}={}){const _0x45d5ba=this['editor']['model'],_0x466a08=_0x13255a??Array['from'](_0x45d5ba['document']['selection']['getRanges']()),_0xad719c=[];for(const _0xad5a5b of _0x466a08)this['_hasContent'](_0xad5a5b)&&_0xad719c['push'](this['_trimToContent'](_0xad5a5b));if(!_0xad719c['length'])throw new _0x51f518('addcommentthreadcommand-incorrect-ranges',null);_0x473fb7&&this['_createCommentThread'](_0x256035,_0x473fb7),this['_createMarkersFromRanges'](_0x256035,_0xad719c,!!_0x473fb7);}['_createMarkersFromRanges'](_0x4fc3d8,_0x3f6665,_0x1a2615){this['editor']['model']['change'](_0x44ae27=>{for(const _0x28c806 of _0x3f6665){const _0x3e30b9=_0x58c8cf()['substr'](0x1,0x5),_0x4b665b='comment:'+_0x4fc3d8+':'+_0x3e30b9;_0x44ae27['addMarker'](_0x4b665b,{'range':_0x28c806,'usingOperation':_0x1a2615,'affectsData':_0x1a2615});}});}['_createCommentThread'](_0x38feaa,_0x5170fd){const _0x54d5e0=this['editor']['plugins']['get']('CommentsRepository'),_0x4248c8=this['editor']['config']['get']('collaboration.channelId'),_0x5c6b83=this['editor']['plugins']['get']('Users')['me'];if(!_0x5c6b83)throw new _0x51f518('addcommentthreadcommand-user-not-found',null);_0x54d5e0['addCommentThread']({'threadId':_0x38feaa,'channelId':_0x4248c8,'comments':[{'authorId':_0x5c6b83['id'],'content':_0x5170fd,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x186d1c){for(const _0x59a508 of _0x186d1c['getItems']())if(this['_itemIsContent'](_0x59a508))return!0x0;return!0x1;}['_itemIsContent'](_0x487b60){return _0x487b60['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x487b60)&&!_0x487b60['is']('element','tableCell');}['_trimToContent'](_0x31fc19){const _0x573390=_0x564c19=>!this['_itemIsContent'](_0x564c19['item']),_0x53b99f=_0x31fc19['start']['getLastMatchingPosition'](_0x573390),_0x4f71f4=_0x31fc19['end']['getLastMatchingPosition'](_0x573390,{'direction':'backward'});return this['editor']['model']['createRange'](_0x53b99f,_0x4f71f4);}}class b extends _0x5ddc0e{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3847cf){super(_0x3847cf),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x324714=this['editor'],_0x430c82=_0x324714['model']['document']['selection'],_0x4b9c63=_0x40c01b(()=>this['refreshSelectedViews'](),0xa);_0x430c82['on']('change:range',(_0x374627,_0x533f65)=>{_0x533f65['directChange']&&(_0x4b9c63['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x324714['editing']['view']['document'],'change:isFocused',(_0x5e2fda,_0x2e6bfd,_0x1784b4)=>{_0x1784b4&&_0x4b9c63();}),this['listenTo'](_0x324714['ui']['focusTracker'],'change:isFocused',(_0x5d60b5,_0xc6d935,_0x3e3024)=>{_0x3e3024||_0x324714['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x24cfc4=>this['_editorAnnotationsData']['has'](_0x24cfc4['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x31ae3e){if(this['_editorAnnotations']['has'](_0x31ae3e['view']))return;this['_editorAnnotations']['add'](_0x31ae3e['view']),this['editor']['ui']['focusTracker']['add'](_0x31ae3e['view']['element']);const _0x39266d=this['editor']['plugins']['get'](y);this['listenTo'](_0x39266d['collection'],'remove',(_0x54920b,_0x671cd9)=>{this['editor']['ui']['focusTracker']['remove'](_0x671cd9['view']['element']),this['_editorAnnotations']['delete'](_0x671cd9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x53a6af){if('function'!=typeof _0x53a6af)throw new _0x51f518('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x53a6af);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x195a8e,annotations:_0x1e63cc}){const _0x592b2f=[],_0x206b50=this['editor']['model']['document']['selection'],_0x2b24b8=Array['from'](_0x206b50['getRanges']());for(const [_0x513bd6,_0x1eec19]of this['_editorAnnotationsData']){const _0x468c38=_0x44737b(_0x1eec19),_0xa1bbe4=_0x1e63cc['getByInnerView'](_0x513bd6);_0x468c38&&_0xa1bbe4&&_0x592b2f['push']({'annotation':_0xa1bbe4,'range':_0x468c38});}function _0x44737b(_0x4ef1f5){for(const _0x106bb0 of _0x4ef1f5)for(const _0x2debab of _0x2b24b8)if(_0x106bb0['containsRange'](_0x2debab,!_0x206b50['isCollapsed']))return _0x106bb0;return null;}return _0x592b2f['sort']((_0x284866,_0x547594)=>{const _0x300178=_0x284866['range'],_0x496c71=_0x547594['range'];if(!_0x300178['isEqual'](_0x496c71)){if(_0x300178['containsRange'](_0x496c71,!0x0))return 0x1;if(_0x496c71['containsRange'](_0x300178,!0x0))return-0x1;}return _0x284866['annotation']==_0x195a8e?-0x1:_0x547594['annotation']==_0x195a8e?0x1:0x0;})['map'](_0xcdeb=>_0xcdeb['annotation']);}get['_editorAnnotationsData'](){const _0x264c0e=new Map();for(const _0x327545 of Array['from'](this['_dataCollectors']))for(const [_0x36009e,_0x4f41b7]of _0x327545())_0x264c0e['set'](_0x36009e,_0x4f41b7);return _0x264c0e;}}class st extends _0x5ddc0e{['afterInit'](){const _0x2c2896=this['editor'];if(!_0x2c2896['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2c2896['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x5ddc0e{constructor(_0x51369d){super(_0x51369d),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x166a06=this['editor'],_0x396bd6=_0x166a06['commands']['get']('importWord'),_0x29d884=_0x166a06['plugins']['get'](it);_0x396bd6&&(_0x396bd6['on']('execute',(_0x341d22,[,_0x4b308])=>{_0x4b308['collaboration_features']={'comments':!0x0,'user_id':_0x29d884['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x396bd6,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xcfee6f,_0x1925d4){const {comment_threads:_0x3daaf3}=_0x1925d4;_0x3daaf3&&_0x3daaf3['forEach'](({thread_id:_0x5268bf,comments:_0x21a5f9,is_resolved:_0x16f429})=>{const _0x44bcd8=new Date(),_0x3eaaff=_0x21a5f9['map'](({author:_0x14dbb0,content:_0x3fccec,created_at:_0x24d4dc})=>({'content':_0x3fccec,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x44bcd8,'attributes':{'@external':{'authorName':_0x14dbb0,'createdAt':_0x24d4dc?new Date(_0x24d4dc):new Date(),'source':'importWord'}}})),_0x3c7bbc=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3c7bbc,'threadId':_0x5268bf,'comments':_0x3eaaff,'resolvedAt':_0x16f429?_0x44bcd8:null});});}}class at extends _0x5ddc0e{constructor(_0x41b2bc){super(_0x41b2bc),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2898d9=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2898d9,'contentInsertion',(_0x1f9f66,_0x15af22)=>this['_removeMarkersWithoutThreads'](_0x15af22['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x270462){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x270462;const _0x3abb2a=this['editor']['plugins']['get']('CommentsRepository');for(const _0x25dd26 of _0x270462['keys']()){const [_0x4ff46c,_0x555ec3]=_0x25dd26['split'](':');'comment'!=_0x4ff46c||_0x3abb2a['hasCommentThread'](_0x555ec3)||_0x270462['delete'](_0x25dd26);}return _0x270462;}['_registerMarkerInClipboardPipeline'](){const _0x337261=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1cc82b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1cc82b&&_0x337261['_registerMarkerToCopy']('comment',_0x1cc82b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1ce9c3){switch(_0x1ce9c3){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 _0x5ddc0e{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x376a85,_0x57ac3f)=>{if(!_0x57ac3f['options']['showCommentHighlights'])return null;if(_0x57ac3f['options']['ignoreResolvedComments']){const {id:_0xd1c525}=er(_0x376a85['markerName']),_0x508c3=this['editor']['plugins']['get'](o);if(_0x508c3['getCommentThread'](_0xd1c525)?.['isResolved']&&_0x376a85['item'])return _0x57ac3f['consumable']['consume'](_0x376a85['item'],'addMarker:'+_0x376a85['markerName']),_0x57ac3f['consumable']['consume'](_0x376a85['item'],'removeMarker:'+_0x376a85['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x29dc18=>{_0x29dc18['on']('addMarker:comment',(_0x3a56c3,_0x4a3c65,_0x547f6d)=>{if(!_0x547f6d['options']['showCommentHighlights'])return;const _0x2e5e22=_0x4a3c65['item'];if(!_0x2e5e22)return;const _0x3d4160=_0x547f6d['mapper']['toViewElement'](_0x2e5e22);this['editor']['model']['schema']['isObject'](_0x2e5e22)&&_0x3d4160&&!_0x3d4160['getCustomProperty']('widget')&&_0x3d4160['is']('containerElement')&&_0x1ed711(_0x3d4160,_0x547f6d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x50f8a8,{writer:_0x196be9,options:_0x337882})=>{if(!_0x337882['showCommentHighlights'])return null;const _0x1a8205=_0x196be9['createContainerElement']('div'),_0x2e0e01=_0x196be9['createEmptyElement']('hr');return _0x196be9['addClass']('ck-horizontal-line',_0x1a8205),_0x196be9['insert'](_0x196be9['createPositionAt'](_0x1a8205,0x0),_0x2e0e01),_0x1a8205;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x990a11,{writer:_0x2aa6ef,options:_0x3c5404})=>{if(!_0x3c5404['showCommentHighlights'])return null;const _0xb6619c=_0x2aa6ef['createContainerElement']('span'),_0x1ab03f=_0x2aa6ef['createEmptyElement']('img');return _0x2aa6ef['addClass']('image-inline',_0xb6619c),_0x2aa6ef['insert'](_0x2aa6ef['createPositionAt'](_0xb6619c,0x0),_0x1ab03f),_0xb6619c;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xddd8d2,{writer:_0x5d8df4,options:_0x3e7143})=>{if(_0x3e7143['showCommentHighlights'])return _0x5d8df4['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x272a84,_0x444675,_0x4cc4eb)=>{_0x4cc4eb['options']['showCommentHighlights']&&_0x272a84['stop']();},{'priority':'high'});}}class r extends _0x5ddc0e{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(_0x229b8b){super(_0x229b8b),this['set']('isThreadsLoadingPaused',!0x0),_0x229b8b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5b062f,_0x9f4b7,_0x171ba9,_0x2169cc)=>{const _0x4067ce=_0x229b8b['plugins']['get'](o),_0x534dae=_0x171ba9?er(_0x171ba9)['id']:null;_0x229b8b['model']['change'](()=>{if(_0x534dae){const _0x41ed87=this['getAllMarkersForId'](_0x534dae);for(const _0x3d3f78 of _0x41ed87)_0x229b8b['editing']['reconvertMarker'](_0x3d3f78);}if(_0x2169cc){const {id:_0x4daffc}=er(_0x2169cc),_0x404ec7=_0x4067ce['getCommentThread'](_0x4daffc);if(_0x404ec7&&_0x404ec7['unlinkedAt'])return;if(_0x404ec7&&!_0x404ec7['isAttached'])return;const _0x3f336c=this['getAllMarkersForId'](_0x4daffc);for(const _0x2d40eb of _0x3f336c)_0x229b8b['editing']['reconvertMarker'](_0x2d40eb);}}),_0x534dae&&this['scrollToThreadMarker'](_0x534dae);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x45a649=this['editor'],_0x3c926b=_0x45a649['plugins']['get'](o),_0x499e0f=_0x45a649['config']['get']('collaboration.channelId'),_0x5341cf=_0x3c926b['getCommentThreads']()['filter'](_0x20bcd6=>_0x20bcd6['channelId']!==_0x499e0f);_0x45a649['commands']['add']('addCommentThread',new rt(_0x45a649)),this['listenTo'](_0x45a649,'change:isReadOnly',(_0x5d732b,_0x9de9d4,_0x32c57a)=>{_0x3c926b['switchReadOnly'](_0x32c57a,_0x45a649['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3c926b,ft('addCommentThread',_0x499e0f),(_0x4a1bde,{threadId:_0x2c5783})=>{const _0x347925=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2c5783);_0x347925?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2c5783);}),this['listenTo'](_0x3c926b,ft('removeCommentThread',_0x499e0f),(_0x2839c0,{threadId:_0x2c3365})=>{_0x45a649['model']['enqueueChange']({'isUndoable':!0x1},_0x466da6=>{const _0x15c9c6=this['getAllMarkersForId'](_0x2c3365);for(const _0x4e2f4c of _0x15c9c6)_0x466da6['removeMarker'](_0x4e2f4c);});}),this['listenTo'](_0x3c926b,ft('resolveCommentThread',_0x499e0f),(_0xd9bede,{threadId:_0x4381c5})=>{(this['_reconvertMarkers'](_0x4381c5),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x4381c5)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3c926b,ft('reopenCommentThread',_0x499e0f),(_0x4c1b05,{threadId:_0xd0dbcb})=>{this['_reconvertMarkers'](_0xd0dbcb);},{'priority':'low'}),this['listenTo'](_0x3c926b,ft('addComment',_0x499e0f),(_0x13a172,{threadId:_0x5db627,isFromAdapter:_0x23ec00})=>{const _0x31124a=this['getAllMarkersForId'](_0x5db627);if(_0x23ec00||0x0==_0x31124a['length']||!_0x3c926b['hasCommentThread'](_0x5db627))return;0x1===_0x3c926b['getCommentThread'](_0x5db627)['length']&&_0x45a649['model']['enqueueChange']({'isUndoable':!0x1},_0x1f54e8=>{for(const _0x5af790 of _0x31124a)_0x1f54e8['updateMarker'](_0x5af790,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5341cf);}['afterInit'](){!async function(_0x2c96e8){const _0x5292e8=_0x8769d0([0x6c,0x6d,0x53,0x66,0x30,0x6a,0x63,0x70,0x4b,0x78,0x73,0x57,0x37,0x59,0x35,0x45,0x34,0x43,0x4a,0x56,0x55,0x75,0x4d,0x47,0x5a,0x6f,0x76,0x38,0x79,0x7a,0x49,0x72,0x54,0x36,0x67,0x42,0x50,0x48,0x71,0x6e,0x51,0x69,0x65,0x64,0x39,0x4f,0x6b,0x77,0x58,0x74,0x31,0x44,0x52,0x33,0x32,0x62,0x46,0x4e,0x68,0x41,0x61,0x4c]),_0x9c0446=0x2030433b,_0x590306=0x20372e2b^_0x9c0446,_0x4fbf79=window[_0x8769d0([0x44,0x61,0x74,0x65])][_0x8769d0([0x6e,0x6f,0x77])](),_0x2080c3=_0x2c96e8[_0x8769d0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x17520a=new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38a7a1=>{_0x2080c3[_0x8769d0([0x6f,0x6e,0x63,0x65])](_0x8769d0([0x72,0x65,0x61,0x64,0x79]),_0x38a7a1);}),_0x13216c={[_0x8769d0([0x6b,0x74,0x79])]:_0x8769d0([0x45,0x43]),[_0x8769d0([0x75,0x73,0x65])]:_0x8769d0([0x73,0x69,0x67]),[_0x8769d0([0x63,0x72,0x76])]:_0x8769d0([0x50,0x2d,0x32,0x35,0x36]),[_0x8769d0([0x78])]:_0x8769d0([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]),[_0x8769d0([0x79])]:_0x8769d0([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]),[_0x8769d0([0x61,0x6c,0x67])]:_0x8769d0([0x45,0x53,0x32,0x35,0x36])},_0x3da15d=_0x2080c3[_0x8769d0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x8769d0([0x67,0x65,0x74])](_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3a0cab(){let _0x33ff57,_0x4dc9d1=null,_0xd2896e=null;try{if(_0x3da15d==_0x8769d0([0x47,0x50,0x4c]))return _0x8769d0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x33ff57=_0x2687ef(),!_0x33ff57)return _0x8769d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x33ff57[_0x8769d0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xd2896e=_0x5d93cf(_0x33ff57[_0x8769d0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x33ff57[_0x8769d0([0x6a,0x74,0x69])])),await _0x463720()?_0x4e6b85()?_0x34ff4e()?_0x8769d0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x557918()?(_0x33ff57[_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x8769d0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4dc9d1=_0x49b38d(_0x8769d0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x33ff57[_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x8769d0([0x74,0x72,0x69,0x61,0x6c])&&(_0x4dc9d1=_0x49b38d(_0x8769d0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5cd136()):_0x8769d0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x8769d0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x8769d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x8769d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x34ff4e(){const _0x12e002=[_0x8769d0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x8769d0([0x74,0x72,0x69,0x61,0x6c])][_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33ff57[_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4fbf79/0x3e8:0xe10*_0x590306;return _0x33ff57[_0x8769d0([0x65,0x78,0x70])]<_0x12e002;}function _0x4e6b85(){const _0x37c1f3=_0x33ff57[_0x8769d0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x37c1f3)return!0x1;if(_0x37c1f3[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8769d0([0x2a])))return!0x0;if(_0x37c1f3[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8769d0([0x43,0x4d,0x54])))return!0x0;if(_0x37c1f3[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8769d0([0x52,0x43,0x4d,0x54]))){if(_0x20e5c0())return!0x0;if(_0x4a0039()||_0x3911ec())return!0x0;}return!0x1;}function _0x557918(){const _0x151a37=_0x33ff57[_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x151a37||0x0==_0x151a37[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3f6e84}=new URL(window[_0x8769d0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x151a37[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f6e84))return!0x0;const _0x3bac7b=_0x3f6e84[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])](_0x8769d0([0x2e]));return _0x151a37[_0x8769d0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4f4091=>_0x4f4091[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8769d0([0x2a])))[_0x8769d0([0x6d,0x61,0x70])](_0x2291f1=>_0x2291f1[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])](_0x8769d0([0x2e])))[_0x8769d0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x570720=>_0x570720[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3bac7b[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x8769d0([0x6d,0x61,0x70])](_0x46f3fc=>Array(_0x3bac7b[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x46f3fc[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x8769d0([0x66,0x69,0x6c,0x6c])](_0x46f3fc[0x0]===_0x8769d0([0x2a])?_0x8769d0([0x2a]):'')[_0x8769d0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x46f3fc))[_0x8769d0([0x73,0x6f,0x6d,0x65])](_0x2ec2ce=>_0x3bac7b[_0x8769d0([0x65,0x76,0x65,0x72,0x79])]((_0x24a95c,_0x13cb5e)=>_0x2ec2ce[_0x13cb5e]===_0x24a95c||_0x2ec2ce[_0x13cb5e]===_0x8769d0([0x2a])));}function _0x5cd136(){return _0x4dc9d1&&_0xd2896e?new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x53945b,_0x38f39b)=>{_0x4dc9d1[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x53945b,_0x38f39b),_0xd2896e[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x26c883=>{_0x26c883!=_0x8769d0([0x56,0x61,0x6c,0x69,0x64])&&_0x53945b(_0x26c883);},_0x38f39b);}):_0x4dc9d1||_0xd2896e||_0x8769d0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5d93cf(_0x417fc8,_0x433fe9){return new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x496af1=>{if(_0x3eccea())return _0x496af1(_0x8769d0([0x56,0x61,0x6c,0x69,0x64]));_0x53e749(),_0x2080c3[_0x8769d0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x8769d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2ece2b=!0x1;const _0x459455=_0x58c8cf();function _0x4ea45f(_0x384439){return!!_0x384439&&(typeof _0x384439===_0x8769d0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x384439===_0x8769d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x384439[_0x8769d0([0x74,0x68,0x65,0x6e])]===_0x8769d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x384439[_0x8769d0([0x63,0x61,0x74,0x63,0x68])]===_0x8769d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x161ced(_0x2672af){_0x2eea4d(_0x2672af)[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x89dbb1=>{if(!_0x89dbb1||_0x89dbb1[_0x8769d0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x8769d0([0x6f,0x6b]))return _0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x37d816(_0x349d99(_0x459455+_0x433fe9))!=_0x89dbb1[_0x8769d0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x8769d0([0x56,0x61,0x6c,0x69,0x64]);})[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x5a4fc4=>(_0x1ed2fb(),_0x5a4fc4),()=>{const _0x25c1e3=_0x4a8717();return null==_0x25c1e3?(_0x1ed2fb(),_0x8769d0([0x56,0x61,0x6c,0x69,0x64])):_0x8769d0(_0x4fbf79-_0x25c1e3>(0x43cc73b^_0x9c0446)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x496af1)[_0x8769d0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x496af1(_0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x58ee05=0x2006adbb^_0x9c0446;function _0x1ed2fb(){const _0x7babf=_0x8769d0([0x6c,0x6c,0x63,0x74,0x2d])+_0x37d816(_0x349d99(_0x417fc8)),_0x1ef440=_0x5d6554(_0x37d816(window[_0x8769d0([0x4d,0x61,0x74,0x68])][_0x8769d0([0x63,0x65,0x69,0x6c])](_0x4fbf79/_0x58ee05)));window[_0x8769d0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x8769d0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x7babf,_0x1ef440);}function _0x4a8717(){const _0x446609=_0x8769d0([0x6c,0x6c,0x63,0x74,0x2d])+_0x37d816(_0x349d99(_0x417fc8)),_0x44a7bc=window[_0x8769d0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x8769d0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x446609);return _0x44a7bc?window[_0x8769d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d6554(_0x44a7bc),0x10)*_0x58ee05:null;}function _0x2eea4d(_0x4ae8b7){return new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x464a52,_0x4f4dc6)=>{_0x4ae8b7[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x464a52,_0x4f4dc6),window[_0x8769d0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4f4dc6,0x203197fb^_0x9c0446);});}}_0x2080c3[_0x8769d0([0x6f,0x6e])](_0x8769d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3e9012,_0x1735b8)=>{if(_0x1735b8[0x0]!=_0x417fc8)return _0x496af1(_0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1735b8[0x1]={..._0x1735b8[0x1],[_0x8769d0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x459455};},{[_0x8769d0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x8769d0([0x68,0x69,0x67,0x68])}),_0x2080c3[_0x8769d0([0x6f,0x6e])](_0x8769d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x45e4ea=>{_0x4ea45f(_0x45e4ea[_0x8769d0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2ece2b=!0x0,_0x161ced(_0x45e4ea[_0x8769d0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x8769d0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x8769d0([0x6c,0x6f,0x77])}),_0x17520a[_0x8769d0([0x74,0x68,0x65,0x6e])](()=>{_0x2ece2b||_0x496af1(_0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3eccea(){return _0x2080c3[_0x8769d0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x8769d0([0x76,0x69,0x65,0x77])][_0x8769d0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x8769d0([0x61,0x75,0x74,0x6f]);}function _0x53e749(){_0x2080c3[_0x8769d0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x8769d0([0x76,0x69,0x65,0x77])][_0x8769d0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x8769d0([0x61,0x75,0x74,0x6f]);}}function _0x49b38d(_0x58dcd2){const _0x84fca4=[new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x362ce3=>setTimeout(_0x362ce3,0x20397df7^_0x9c0446)),_0x17520a[_0x8769d0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc13033=>{let _0x42947c=0x0;_0x2080c3[_0x8769d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x8769d0([0x6f,0x6e])](_0x8769d0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1efca4,_0x2f0409)=>{_0x2f0409[0x0][_0x8769d0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x42947c++,_0x42947c==(0x203042c3^_0x9c0446)&&(_0xc13033(),_0x1efca4[_0x8769d0([0x6f,0x66,0x66])]());});}))];return window[_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x8769d0([0x72,0x61,0x63,0x65])](_0x84fca4)[_0x8769d0([0x74,0x68,0x65,0x6e])](()=>_0x58dcd2);}async function _0x227d3d(){await _0x17520a,_0x2080c3[_0x8769d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x8769d0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5557ed,_0x2080c3[_0x8769d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x8769d0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5557ed,_0x2080c3[_0x8769d0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x8769d0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x20e5c0(){return _0x14b4ba(_0x8769d0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x547a36(_0x8769d0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x8769d0([0x73,0x74,0x61,0x74,0x65])]==_0x8769d0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4a0039(){return _0x14b4ba(_0x8769d0([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 _0x3911ec(){return _0x14b4ba(_0x8769d0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5059ce(_0x533e47){const _0x1986ca=_0x5d1513();_0x2080c3[_0x1986ca]=_0x8769d0([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x533e47,_0x533e47!=_0x8769d0([0x56,0x61,0x6c,0x69,0x64])&&_0x227d3d();}function _0x5d1513(){const _0x1a8613=window[_0x8769d0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x8769d0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x8769d0([0x6e,0x6f,0x77])]())[_0x8769d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x8769d0([0x2e]),'');let _0x183d06=_0x8769d0([0x6c]);for(let _0x410f05=0x0;_0x410f05<_0x1a8613[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x410f05+=0x2){let _0x4450c5=window[_0x8769d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1a8613[_0x8769d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x410f05,_0x410f05+0x2));_0x4450c5>=_0x5292e8[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4450c5-=_0x5292e8[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x183d06+=_0x5292e8[_0x4450c5];}return _0x183d06;}function _0x2687ef(){const _0x379929=_0x3da15d[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])](_0x8769d0([0x2e]));if(0x3!=_0x379929[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1a4d33(_0x379929[0x1]);function _0x1a4d33(_0x36f10d){const _0xb8a7de=_0x2c3507(_0x36f10d);return _0xb8a7de&&_0x21d112()?_0xb8a7de:null;function _0x21d112(){const _0x2129d7=_0xb8a7de[_0x8769d0([0x6a,0x74,0x69])],_0x351654=window[_0x8769d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2129d7[_0x8769d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2129d7[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5d9d2e={..._0xb8a7de,[_0x8769d0([0x6a,0x74,0x69])]:_0x2129d7[_0x8769d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2129d7[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5d9d2e[_0x8769d0([0x76,0x63])],_0x349d99(_0x5d9d2e)==_0x351654;}}}async function _0x463720(){let _0x397b17=!0x0;try{const _0x148d73=_0x3da15d[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])](_0x8769d0([0x2e])),[_0x15b71e,_0x29d24f,_0x257684]=_0x148d73;return _0x3b4fcd(_0x15b71e),await _0x2e76f1(_0x15b71e,_0x29d24f,_0x257684),_0x397b17;}catch{return!0x1;}function _0x3b4fcd(_0x1d178d){const _0x34417b=_0x2c3507(_0x1d178d);_0x34417b&&_0x34417b[_0x8769d0([0x61,0x6c,0x67])]==_0x8769d0([0x45,0x53,0x32,0x35,0x36])||(_0x397b17=!0x1);}async function _0x2e76f1(_0x8a4be1,_0x2f1f18,_0x239a9d){const _0xaee6a7=window[_0x8769d0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x8769d0([0x66,0x72,0x6f,0x6d])](_0x3e35ba(_0x239a9d),_0x542eef=>_0x542eef[_0x8769d0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xbd1051=new window[(_0x8769d0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x8769d0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x8a4be1+_0x8769d0([0x2e])+_0x2f1f18),_0x5ac101=window[_0x8769d0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x8769d0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5ac101)return;const _0x5a296a=await _0x5ac101[_0x8769d0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x8769d0([0x6a,0x77,0x6b]),_0x13216c,{[_0x8769d0([0x6e,0x61,0x6d,0x65])]:_0x8769d0([0x45,0x43,0x44,0x53,0x41]),[_0x8769d0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x8769d0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x8769d0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5ac101[_0x8769d0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x8769d0([0x6e,0x61,0x6d,0x65])]:_0x8769d0([0x45,0x43,0x44,0x53,0x41]),[_0x8769d0([0x68,0x61,0x73,0x68])]:{[_0x8769d0([0x6e,0x61,0x6d,0x65])]:_0x8769d0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5a296a,_0xaee6a7,_0xbd1051)||(_0x397b17=!0x1);}}function _0x2c3507(_0x317eb1){return _0x317eb1[_0x8769d0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x8769d0([0x65,0x79]))?JSON[_0x8769d0([0x70,0x61,0x72,0x73,0x65])](_0x3e35ba(_0x317eb1)):null;}function _0x3e35ba(_0x2e78d8){return window[_0x8769d0([0x61,0x74,0x6f,0x62])](_0x2e78d8[_0x8769d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x8769d0([0x2b]))[_0x8769d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x8769d0([0x2f])));}function _0x349d99(_0x27df9a){let _0x3b1f67=0x1505;function _0x1af135(_0x33efc5){for(let _0x4d990d=0x0;_0x4d990d<_0x33efc5[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d990d++){const _0x4185d5=_0x33efc5[_0x8769d0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d990d);_0x3b1f67=(_0x3b1f67<<0x5)+_0x3b1f67+_0x4185d5,_0x3b1f67&=_0x3b1f67;}}function _0x4d39ab(_0x2253ff){Array[_0x8769d0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2253ff)?_0x2253ff[_0x8769d0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4d39ab):_0x2253ff&&typeof _0x2253ff==_0x8769d0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x8769d0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2253ff)[_0x8769d0([0x73,0x6f,0x72,0x74])]()[_0x8769d0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1531cf,_0x31342b])=>{_0x1af135(_0x1531cf),_0x4d39ab(_0x31342b);}):_0x1af135(window[_0x8769d0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2253ff));}return _0x4d39ab(_0x27df9a),_0x3b1f67>>>0x0;}function _0x37d816(_0x558d18){return _0x558d18[_0x8769d0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x8769d0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x8769d0([0x30]));}function _0x5d6554(_0x4dc589){return _0x4dc589[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x8769d0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x8769d0([0x6a,0x6f,0x69,0x6e])]('');}function _0x14b4ba(_0x41d27e){return _0x2080c3[_0x8769d0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x8769d0([0x68,0x61,0x73])](_0x41d27e);}function _0x547a36(_0x3151f0){return _0x2080c3[_0x8769d0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x8769d0([0x67,0x65,0x74])](_0x3151f0);}function _0x5557ed(){}function _0x8769d0(_0x577fa4){return _0x577fa4['map'](_0x281635=>String['fromCharCode'](_0x281635))['join']('');}_0x5059ce(await _0x3a0cab());}(this);}['destroy'](){const _0x553793=this['editor']['plugins']['get'](o),_0x371ae=this['editor']['config']['get']('collaboration.channelId');for(const _0x709a86 of _0x553793['getCommentThreads']({'channelId':_0x371ae}))_0x553793['_detachCommentThread'](_0x709a86['id']),_0x553793['_threads']['delete'](_0x709a86['id']);super['destroy']();}['hasMarkerForId'](_0x4f4123){return this['getAllMarkersForId'](_0x4f4123)['length']>0x0;}['getAllMarkersForId'](_0x3424df){const _0x51fa5a=[];for(const _0x41f3e1 of this['editor']['model']['markers'])_0x41f3e1['name']['startsWith']('comment:'+_0x3424df)&&_0x51fa5a['push'](_0x41f3e1);return _0x51fa5a;}['scrollToThreadMarker'](_0x3ab682){setTimeout(()=>{const _0x3a3261=this['_getTargetForId'](_0x3ab682);if(!_0x3a3261)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x3ab682&&nt({'target':_0x3a3261[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x445119){this['editor']['model']['change'](()=>{for(const _0x36de90 of this['getAllMarkersForId'](_0x445119))this['editor']['editing']['reconvertMarker'](_0x36de90);});}['_attachArchivedThread'](_0x54a7a1){const _0x3bf04d=this['editor']['plugins']['get'](o),_0x42af9d=this['editor']['plugins']['get'](b),_0x307114=_0x3bf04d['getCommentThread'](_0x54a7a1);if(!_0x307114['isAttached']){const _0x11fb8f=_0x307114['attachTo'](()=>this['_getTargetForId'](_0x307114['id']));_0x42af9d['registerAnnotation'](_0x11fb8f),_0x307114['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2f1917=this['editor'],_0x21ec8a=_0x2f1917['plugins']['get'](it);_0x2f1917['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x233fec,_0x4de716)=>{const {id:_0x31c7e3}=er(_0x233fec['markerName']),_0x4a515c=_0x2f1917['plugins']['get'](o)['getCommentThread'](_0x31c7e3),_0x3297bd=this['activeMarker']&&er(this['activeMarker'])['id']===_0x31c7e3;let _0xdac5cb;if(_0x4a515c&&_0x4a515c['isResolved']&&!_0x3297bd&&_0x233fec['item'])return _0x4de716['consumable']['consume'](_0x233fec['item'],'addMarker:'+_0x233fec['markerName']),_0x4de716['consumable']['consume'](_0x233fec['item'],'removeMarker:'+_0x233fec['markerName']),null;const _0x331781=['ck-comment-marker'];return _0x3297bd&&_0x331781['push']('ck-comment-marker--active'),_0xdac5cb=_0x4a515c?.['length']?_0x4a515c['comments']['first']['author']['id']:_0x21ec8a['me']['id'],{'classes':_0x331781,'attributes':{'data-comment':_0x31c7e3,'data-author-id':_0xdac5cb}};}}),_0x2f1917['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3f1b47,{options:_0x160373})=>{if(_0x160373['showCommentHighlights'])return null;const _0x23efd7=_0x2f1917['plugins']['get'](o),_0x4b0afc=_0x2f1917['model']['markers']['get'](_0x3f1b47),{id:_0x4e9192,part:_0x103a93}=er(_0x3f1b47);return _0x4b0afc&&!_0x4b0afc['affectsData']||_0x160373['ignoreResolvedComments']&&_0x23efd7['getCommentThread'](_0x4e9192)?.['isResolved']?null:{'group':'comment','name':_0x103a93?_0x4e9192+':'+_0x103a93:_0x4e9192};}}),_0x2f1917['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3b0742,{writer:_0x2347a6})=>_0x2347a6['createElement']('$marker',{'data-name':'comment:'+_0x3b0742['getAttribute']('id')})}),_0x2f1917['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5160fa=this['editor'],_0x41c4e5=_0x5160fa['plugins']['get'](o),_0x461cc6=new Set(),_0x45c90c=new Set();_0x5160fa['model']['document']['registerPostFixer'](_0xb8027f=>{let _0x5057e3=!0x1;for(const {name:_0x561ce8,data:_0x572eaa}of _0x5160fa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5164a3,id:_0x2be4ae}=er(_0x561ce8);let _0x3178da=_0x572eaa['newRange'];if('comment'!==_0x5164a3||!_0x3178da)continue;const _0x11c945='$graveyard'===_0x3178da['root']['rootName'];_0x11c945||(_0x3178da=dt(_0x3178da,_0x5160fa['model']),!_0x3178da||_0x3178da['isCollapsed']||!_0x572eaa['newRange']||_0x3178da['isEqual'](_0x572eaa['newRange']))?_0x5160fa['model']['hasContent'](_0x3178da)&&!_0x11c945?this['isThreadsLoadingPaused']?_0x461cc6['add'](_0x561ce8):this['_handleThreadMarker'](_0x561ce8,_0x2be4ae):(_0x45c90c['add'](_0x561ce8),_0x461cc6['delete'](_0x561ce8),_0xb8027f['removeMarker'](_0x561ce8),_0x5057e3=!0x0):(_0xb8027f['updateMarker'](_0x561ce8,{'range':_0x3178da}),_0x5057e3=!0x0);}return _0x5057e3;}),this['on']('change:isThreadsLoadingPaused',(_0x36977b,_0x437df4,_0x4fca1e)=>{if(!_0x4fca1e&&_0x461cc6['size'])for(const _0x3821dc of _0x461cc6){const {id:_0x579bf7}=er(_0x3821dc);_0x461cc6['delete'](_0x3821dc),_0x5160fa['model']['markers']['get'](_0x3821dc)&&this['_handleThreadMarker'](_0x3821dc,_0x579bf7);}}),this['listenTo'](_0x5160fa['model']['document'],'change',()=>{for(const {name:_0x5d234d,data:{newRange:_0x32d64d}}of _0x5160fa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x12628b,id:_0x5ad395}=er(_0x5d234d);if('comment'!==_0x12628b)continue;const _0x22323d=_0x41c4e5['getCommentThread'](_0x5ad395),_0x1bd1b6=this['hasMarkerForId'](_0x5ad395);_0x22323d&&(!_0x22323d['_hasTargetInContent']&&_0x32d64d&&_0x5160fa['editing']['view']['once']('render',()=>{const _0x12e0e7=_0x5160fa['plugins']['get'](y),_0x261a34=_0x41c4e5['_threadToController']['get'](_0x22323d)['view'];_0x12e0e7['getByInnerView'](_0x261a34)['refreshVisibility']();},{'priority':'low'}),_0x22323d['_hasTargetInContent']=_0x1bd1b6||!!_0x32d64d),_0x32d64d||(_0x45c90c['add'](_0x5d234d),_0x461cc6['delete'](_0x5d234d));}for(const _0x4c4e62 of _0x45c90c){const {id:_0x5ef329}=er(_0x4c4e62),_0x480c9f=_0x41c4e5['getCommentThread'](_0x5ef329);if(_0x461cc6['delete'](_0x4c4e62),!_0x480c9f)continue;const _0x4f9df6=this['hasMarkerForId'](_0x5ef329);_0x4f9df6||_0x480c9f['isSubmitted']?_0x4f9df6||_0x480c9f['unlinkedAt']||_0x480c9f['setUnlinkedAt'](new Date()):_0x480c9f['remove']();}_0x45c90c['clear']();});}['_handleInitialThreads'](_0x20058a){_0x20058a['forEach'](_0x593457=>{_0x593457['unlinkedAt']&&this['_attachArchivedThread'](_0x593457['id']);});}['_getTargetForId'](_0x227c6b){const _0x384d02=this['editor'],_0x447811=this['getAllMarkersForId'](_0x227c6b);return et(_0x384d02['editing'],_0x447811);}['_getTextContext'](_0x369105){const _0x1aeea8=this['getAllMarkersForId'](_0x369105);let _0x48e9a0='',_0x58713d=!0x1;for(const _0x65a878 of _0x1aeea8){const _0x9814fe=_0x65a878['getRange']();for(const _0xa286e9 of Array['from'](_0x9814fe['getItems']()))_0xa286e9['is']('$textProxy')?(_0x48e9a0&&_0x58713d&&(_0x48e9a0+='\x20',_0x58713d=!0x1),_0x48e9a0+=_0xa286e9['data']):_0x58713d=!0x0;_0x58713d=!0x0;}return _0x48e9a0['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3810fc,_0x574ccb){const _0x25bfbf=this['editor'],_0x981908=_0x25bfbf['plugins']['get'](o);let _0x53b707=_0x981908['getCommentThread'](_0x574ccb);const _0x137f73=_0x25bfbf['config']['get']('collaboration.channelId'),_0x5228db=_0x25bfbf['plugins']['get'](b);if(_0x53b707&&(_0x53b707['unlinkedAt']&&_0x53b707['setUnlinkedAt'](null),_0x53b707['isAttached']))return _0x53b707;return!this['getAllMarkersForId'](_0x574ccb)[0x0]['managedUsingOperations']?_0x25bfbf['editing']['view']['once']('render',()=>{if(_0x981908['getCommentThread'](_0x574ccb))return;const _0x59e9b7=_0x25bfbf['plugins']['get'](y);_0x53b707=_0x981908['openNewCommentThread']({'channelId':_0x137f73,'threadId':_0x574ccb,'target':()=>this['_getTargetForId'](_0x574ccb),'context':{'type':'text','value':this['_getTextContext'](_0x574ccb)}});const _0x15e980=_0x981908['_threadToController']['get'](_0x53b707)['view'],_0x4a6d93=_0x59e9b7['getByInnerView'](_0x15e980);_0x4a6d93&&_0x5228db['registerAnnotation'](_0x4a6d93);},{'priority':'low'}):_0x981908['fetchCommentThread']({'channelId':_0x137f73,'threadId':_0x574ccb})['then'](_0x1714c1=>{if('destroyed'!==_0x25bfbf['state']){if(_0x53b707=_0x1714c1,_0x53b707&&!_0x53b707['isAttached']){const _0x541939=_0x53b707['attachTo'](()=>this['_getTargetForId'](_0x574ccb));_0x5228db['registerAnnotation'](_0x541939),_0x53b707['isResolved']&&this['_reconvertMarkers'](_0x574ccb);}else{if(!_0x53b707){const _0x28bb9f=this['getAllMarkersForId'](_0x574ccb);_0x25bfbf['model']['change'](_0x25fce5=>{for(const _0x160ec6 of _0x28bb9f)_0x25fce5['removeMarker'](_0x160ec6);});}}}}),_0x53b707;}['_handleThreadMarker'](_0x1ab02b,_0x2b3d9a){const _0x5f1828=this['_attachMarkerToThread'](_0x1ab02b,_0x2b3d9a);_0x5f1828&&!_0x5f1828['context']&&_0x5f1828['setContext']({'type':'text','value':this['_getTextContext'](_0x2b3d9a)});}['_initAriaMarkerChangeAnnouncements'](){const _0xdbec2d=this['editor'];ot(_0xdbec2d['model'],({left:_0x117f19,entered:_0x28d507})=>{for(const _0x197242 of _0x117f19)if(mt(_0x197242)){_0xdbec2d['ui']['ariaLiveAnnouncer']['announce'](N(_0xdbec2d['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x229da9 of _0x28d507)if(mt(_0x229da9)){_0xdbec2d['ui']['ariaLiveAnnouncer']['announce'](N(_0xdbec2d['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x542398)));break;}});}}function ft(_0x3b2f35,_0xc50819){return _0xc50819?_0x3b2f35+':'+_0xc50819:_0x3b2f35;}function er(_0x26783c){const _0x3107fb=_0x26783c['split'](':');return{'group':_0x3107fb[0x0],'id':_0x3107fb[0x1],'part':_0x3107fb[0x2]};}function dt(_0x958c0a,_0x538dbe){const _0x1480c5=_0x538dbe['schema'],_0xa25b31=_0x538dbe['createRange'](_0x958c0a['start']);for(const _0x28be6d of _0x958c0a['getWalker']()){const {type:_0x3aaf04,item:_0x4d409a,nextPosition:_0x223b2a}=_0x28be6d;if('text'===_0x3aaf04||_0x1480c5['isObject'](_0x4d409a)){const _0x54c743=_0x538dbe['createPositionBefore'](_0x4d409a);_0xa25b31['isCollapsed']&&(_0xa25b31['start']=_0x54c743),_0xa25b31['end']=_0x223b2a;}}return _0xa25b31;}function mt(_0x22c7dc){return'comment'===er(_0x22c7dc['name'])['group'];}class s extends _0x5ddc0e{['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 _0x2b07c4=this['editor'],_0x41da01=_0x2b07c4['plugins']['get'](o),_0x5a5c48=_0x2b07c4['plugins']['get'](r),_0x574a9a=_0x2b07c4['plugins']['get'](y),_0x197228=_0x2b07c4['plugins']['get'](b);_0x2b07c4['ui']['componentFactory']['add']('comment',()=>{const _0x298b7b=this['_createUIButton'](_0x49f2c7);return _0x298b7b['tooltip']=!0x0,_0x298b7b;}),_0x2b07c4['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x58cd9a)),_0x197228['addSourceCollector'](()=>{const _0x6b0486=[];for(const [_0x2fd8af,_0x2df56b]of _0x41da01['_threadToController']){const _0x58765c=_0x5a5c48['getAllMarkersForId'](_0x2fd8af['id']),_0x52dafc=_0x58765c['map'](_0x82ee64=>_0x82ee64['getRange']());_0x58765c['length']>0x0&&_0x6b0486['push']([_0x2df56b['view'],_0x52dafc]);}return _0x6b0486;}),this['listenTo'](_0x574a9a,'change:activeAnnotations',(_0x157580,_0x58b561,_0xf11d6b)=>{const _0x9e212f=Array['from'](_0xf11d6b)['map'](_0x53693a=>_0x53693a['innerView'])['find'](_0x2229e2=>_0x41da01['_viewToController']['has'](_0x2229e2));if(!_0x9e212f)return void(_0x5a5c48['activeMarker']=null);const _0x585d14=_0x41da01['_viewToController']['get'](_0x9e212f)['model']['id'],_0x2a803f='comment:'+_0x585d14;_0x585d14&&_0x5a5c48['hasMarkerForId'](_0x585d14)?_0x5a5c48['activeMarker']=_0x2a803f:_0x5a5c48['activeMarker']&&(_0x5a5c48['activeMarker']=null);}),this['listenTo'](_0x41da01,'removeCommentThread',(_0x2b7882,{threadId:_0x4ca2b6,isFromAdapter:_0x8081dd})=>{!_0x8081dd&&_0x2b07c4['ui']['focusTracker']['isFocused']&&_0x5a5c48['hasMarkerForId'](_0x4ca2b6)&&_0x2b07c4['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x41da01,'addComment',(_0x147879,{threadId:_0x5cf2a0,isFromAdapter:_0x3d2b43})=>{if(_0x3d2b43||!_0x5a5c48['hasMarkerForId'](_0x5cf2a0)||!_0x41da01['hasCommentThread'](_0x5cf2a0))return;0x1===_0x41da01['getCommentThread'](_0x5cf2a0)['length']&&(_0x2b07c4['editing']['view']['focus'](),_0x147879['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x472d29=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x49ecc9;for(const _0x1bb05b in _0x472d29){const _0x405d60=_0x1bb05b,_0x5708b0=_0x472d29[_0x405d60];if('commentsLicenseKeyValid'==_0x5708b0||'commentsLicenseKeyInvalid'==_0x5708b0||'commentsLicenseKeyExpired'==_0x5708b0||'commentsLicenseKeyDomainLimit'==_0x5708b0||'commentsLicenseKeyNotAllowed'==_0x5708b0||'commentsLicenseKeyEvaluationLimit'==_0x5708b0||'commentsLicenseKeyTrialLimit'==_0x5708b0||'commentsLicenseKeyUsageLimit'==_0x5708b0){delete _0x472d29[_0x405d60],_0x49ecc9=_0x5708b0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x49ecc9&&_0x472d29['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x49ecc9&&_0x472d29['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x49ecc9&&_0x472d29['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x49ecc9&&_0x472d29['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x49ecc9&&_0x472d29['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x49ecc9&&_0x472d29['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x49ecc9&&_0x472d29['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4b41ec){const _0x215e3e=this['editor'],_0x2f7f2a=new _0x4b41ec(_0x215e3e['locale']),_0x139d38=_0x215e3e['commands']['get']('addCommentThread');return _0x2f7f2a['set']({'label':N(_0x215e3e['locale'],'Comment'),'icon':_0x224626}),_0x2f7f2a['bind']('isEnabled')['to'](_0x139d38,'hasContent'),this['listenTo'](_0x2f7f2a,'execute',()=>{_0x139d38['execute']();}),_0x2f7f2a;}}class i extends _0x5ddc0e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x419518){super(_0x419518),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1e6f7f,_0xa67aee,_0x22b27f)=>{_0x22b27f?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x15bf29,_0x462656]of this['editor']['commands'])_0x462656['affectsData']&&'addCommentThread'!==_0x15bf29&&_0x462656['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 _0x4f1353=this['editor']['editing']['view']['document'];this['listenTo'](_0x4f1353,'cut',_0x1f75dc=>_0x1f75dc['stop'](),{'priority':'highest'}),this['listenTo'](_0x4f1353,'clipboardInput',_0x573d61=>_0x573d61['stop'](),{'priority':'highest'}),this['listenTo'](_0x4f1353,'delete',_0x449eb2=>_0x449eb2['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x48422d,_0x53dcb8]of this['editor']['commands'])_0x53dcb8['affectsData']&&'addCommentThread'!==_0x48422d&&_0x53dcb8['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 _0x2738de{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1980b4){super(_0x1980b4),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x345a75=this['context']['plugins']['get'](y);this['listenTo'](_0x345a75,'_activateAnnotation',(_0x275177,_0xfb94c7)=>{for(const _0x3c1743 of this['activeUIs']){const _0x3361e4=this['_uis']['get'](_0x3c1743);(0x0,this['uisData']['get'](_0x3c1743)['filter'])(_0xfb94c7)&&_0x3361e4['setActiveAnnotation'](_0xfb94c7);}}),this['listenTo'](_0x345a75,'_deactivateAllAnnotations',()=>{for(const _0x308d8a of this['activeUIs']){this['_uis']['get'](_0x308d8a)['setActiveAnnotation'](null);}}),this['listenTo'](_0x345a75['_visibleAnnotations'],'add',(_0x2c4fb7,_0x55da1b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x55da1b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x545043){return this['activeUIs']['has'](_0x545043);}['activate'](_0x584242,_0x4c599f=this['defaultFilter']){const _0x2bd424=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x584242))throw new _0x51f518('annotationsuis-missing-ui',this,{'uiName':_0x584242});this['isActive'](_0x584242)&&this['deactivate'](_0x584242),this['activeUIs']['add'](_0x584242);const _0x2db359=new S();v({'source':_0x2bd424['_visibleAnnotations'],'target':_0x2db359,'filter':_0x4c599f}),this['uisData']['set'](_0x584242,{'collection':_0x2db359,'filter':_0x4c599f});const _0x2735d4=this['_uis']['get'](_0x584242);_0x2735d4['attach'](_0x2db359),this['listenTo'](_0x2735d4,'change:activeAnnotation',(_0x2cbc73,_0xf3a79f,_0x506373,_0x13c333)=>{_0x13c333&&_0x2bd424['_removeActiveAnnotation'](_0x13c333),_0x506373&&_0x2bd424['_addActiveAnnotation'](_0x506373);});}['deactivate'](_0x4bf071){if(this['activeUIs']['delete'](_0x4bf071),!this['_uis']['has'](_0x4bf071))throw new _0x51f518('annotationsuis-missing-ui',this,{'uiName':_0x4bf071});const _0x4c1232=this['_uis']['get'](_0x4bf071);_0x4c1232['detach'](),this['stopListening'](_0x4c1232),this['uisData']['get'](_0x4bf071)['collection']['destroy'](),this['uisData']['delete'](_0x4bf071);}['switchTo'](_0x49bbb3){if(!this['_uis']['has'](_0x49bbb3))throw new _0x51f518('annotationsuis-missing-ui',this,{'uiName':_0x49bbb3});const _0x278dbc=this['context']['plugins']['get'](y),_0x1d0d02=Array['from'](_0x278dbc['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x49bbb3);const _0x5c9cb5=this['_uis']['get'](_0x49bbb3);_0x5c9cb5['setActiveAnnotation'](_0x1d0d02),_0x5c9cb5['_setSelectedAnnotations']&&_0x1d0d02&&_0x5c9cb5['_setSelectedAnnotations']([_0x1d0d02]);}['deactivateAll'](){for(const _0x31cf25 of this['activeUIs'])this['deactivate'](_0x31cf25);}['register'](_0xc39679,_0x2344b4){if(this['_uis']['has'](_0xc39679))throw new _0x51f518('annotationsuis-register-already-registered');if('function'!=typeof _0x2344b4['attach']||'function'!=typeof _0x2344b4['detach']||'function'!=typeof _0x2344b4['setActiveAnnotation'])throw new _0x51f518('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xc39679,_0x2344b4);}['refilterAnnotations'](){const _0x1eb502=this['context']['plugins']['get'](y)['collection'],_0x5a360d=new Map(),_0x54266e=Array['from'](this['activeUIs']);for(const _0x2881ba of this['activeUIs']){const _0xbb872c=this['uisData']['get'](_0x2881ba)['collection'];for(const _0x3ac367 of _0xbb872c)_0x5a360d['set'](_0x3ac367,_0x2881ba);}for(const _0x1253f2 of _0x1eb502){const _0x2f7d47=_0x5a360d['get'](_0x1253f2);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1253f2);const _0x8f8b67=_0x54266e['find'](_0x1e80b3=>this['uisData']['get'](_0x1e80b3)['filter'](_0x1253f2));_0x2f7d47!==_0x8f8b67&&(_0x2f7d47&&this['uisData']['get'](_0x2f7d47)['collection']['remove'](_0x1253f2),_0x8f8b67&&this['uisData']['get'](_0x8f8b67)['collection']['add'](_0x1253f2));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1ba032){const _0x31fa6e=[];for(const _0x129ed2 of this['activeUIs']){(0x0,this['uisData']['get'](_0x129ed2)['filter'])(_0x1ba032)&&_0x31fa6e['push'](_0x129ed2);}if(_0x31fa6e['length']>0x1)throw new _0x51f518('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x31fa6e,'annotationType':_0x1ba032['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1aa6c2){super(_0x1aa6c2);const _0x41ea3f=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 _0x199d2b(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x41ea3f['to']('class')],'style':{'minHeight':_0x41ea3f['to']('minHeight',_0x4b42f3=>'number'==typeof _0x4b42f3?_i(_0x4b42f3+0xa):null)},'dir':_0x1aa6c2['uiLanguageDirection'],'role':'application','aria-label':N(_0x1aa6c2,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x1aa6c2,'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',_0x468115=>{this['_updateItemPositionInFocusables'](_0x468115['source']);}),this['list']['forEach'](_0x22883c=>{this['focusTracker']['add'](_0x22883c['element']),this['_updateItemPositionInFocusables'](_0x22883c);}),this['list']['on']('change',(_0x18e67c,_0x146198)=>{for(const _0x4bf144 of _0x146198['removed'])this['focusTracker']['remove'](_0x4bf144['element']),this['focusables']['remove'](_0x4bf144);for(const _0x53a56e of _0x146198['added'])this['focusTracker']['add'](_0x53a56e['element']),this['_updateItemPositionInFocusables'](_0x53a56e);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5017c4){const _0x4dedce=this['focusables']['getIndex'](_0x5017c4);let _0x1d24f0,_0x2ac519;for(const _0x320e70 of this['focusables'])if(_0x5017c4['top']<_0x320e70['top']){_0x1d24f0=_0x320e70;break;}if(_0x2ac519=_0x1d24f0?this['focusables']['getIndex'](_0x1d24f0):this['focusables']['length'],-0x1!==_0x4dedce){if(_0x4dedce===_0x2ac519-0x1)return;this['focusables']['remove'](_0x5017c4),_0x2ac519=_0x1d24f0?this['focusables']['getIndex'](_0x1d24f0):this['focusables']['length'];}this['focusables']['add'](_0x5017c4,_0x2ac519);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x168556){super(_0x168556),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5c1f3e,_0x238cf6)=>_0x5c1f3e+_0x238cf6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x136284=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x136284['to']('isAnimationDisabled',_0x7ca701=>_0x7ca701?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x136284['to']('top',_0x1eaf56=>Ot(_0x1eaf56))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x304394=this['element']['clientHeight'];_0x304394&&(this['height']=_0x304394);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2738de{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x91ea16){super(_0x91ea16),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 _0x481fa4=this['context']['config']['get']('sidebar.container');_0x481fa4&&this['setContainer'](_0x481fa4);}['setContainer'](_0xe7c09f){if(!g(_0xe7c09f))throw new _0x51f518('sidebar-setcontainer-invalid-element');this['container']=_0xe7c09f;}['_attachToContainer']({viewClass:_0x2b695d='',spaceBetweenItems:_0xdc8d4d=0x19}={}){if(!g(this['container']))throw new _0x51f518('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2b695d,this['_spaceBetweenItems']=_0xdc8d4d;}['rearrange']({removedAnnotation:_0x2b89b3,previousAnnotation:_0x7eecc4,nextAnnotation:_0x554e9e}){const _0x21deff=this['getSidebarItemView'](_0x2b89b3);this['view']['list']['remove'](_0x21deff),this['_destroySidebarItemView'](_0x2b89b3),_0x7eecc4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x7eecc4)),_0x554e9e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x554e9e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x55c752,activatedAnnotation:_0x5189ea,disableAnimationOnActivatedAnnotation:_0x21aa9e}){if(this['_activeAnnotation']=_0x5189ea,_0x55c752){_0x55c752['isActive']=!0x1;const _0x13a66a=this['getSidebarItemView'](_0x55c752);_0x13a66a&&_0x21aa9e&&(_0x13a66a['isAnimationDisabled']=!0x1);}if(_0x5189ea){const _0xf139=this['getSidebarItemView'](_0x5189ea);_0xf139&&(_0x5189ea['isActive']=!0x0,_0x21aa9e&&(_0xf139['isAnimationDisabled']=!0x0,_0xf139['top']+=0x1),this['_alignToTargetRect'](_0xf139));}}['_detachFromContainer'](_0x22660d){if(this['view']['element']['remove'](),_0x22660d){for(const _0x2d9524 of _0x22660d)this['_destroySidebarItemView'](_0x2d9524);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x59cc3c,_0x427a9a){_0x427a9a||(_0x427a9a=_0x59cc3c['view']);const _0x3bbeac=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3bbeac,_0x59cc3c),this['_annotationToSidebarItemView']['set'](_0x59cc3c,_0x3bbeac),_0x3bbeac['content']['add'](_0x427a9a),this['listenTo'](_0x59cc3c['view'],'change:targetRect',(_0x510b6f,_0x401eb3,_0x315e2a)=>{const _0x316a6e=this['_getTargetTop'](_0x59cc3c,_0x315e2a);_0x3bbeac['_targetTop']!=_0x316a6e&&(_0x3bbeac['_targetTop']=_0x316a6e,this['_setItemTop'](_0x3bbeac,_0x316a6e));}),this['listenTo'](_0x3bbeac,'change:top',()=>{this['_recalculate'](_0x3bbeac,'top');}),this['listenTo'](_0x3bbeac,'change:bottom',()=>{this['_recalculate'](_0x3bbeac,'bottom');}),this['_alignToTargetRect'](_0x3bbeac);const _0x27963b=this['_getItemBefore'](_0x3bbeac);if(_0x27963b)this['_alignAfterItem'](_0x27963b,_0x3bbeac)||this['_alignToTargetRect'](_0x3bbeac);else this['_alignToTargetRect'](_0x3bbeac);return this['_updateLastItem'](),this['view']['list']['add'](_0x3bbeac),_0x3bbeac;}['_alignForTopChange'](_0x59a134){if(!_0x59a134['content']['length'])return;const _0x304bb0=this['_getItemBefore'](_0x59a134);if(!_0x304bb0)return;const _0x3011d9=this['_sidebarItemViewToAnnotation']['get'](_0x304bb0),_0x4d9ab6=this['_activeAnnotation'];_0x4d9ab6&&_0x4d9ab6===_0x3011d9?this['_alignAfterItem'](_0x304bb0,_0x59a134):this['_alignBeforeItem'](_0x59a134,_0x304bb0);}['_alignForBottomChange'](_0x31331a){if(!_0x31331a['content']['length'])return;const _0x34907f=this['_getItemAfter'](_0x31331a);if(!_0x34907f)return;const _0x83f92c=this['_sidebarItemViewToAnnotation']['get'](_0x34907f),_0x4abb15=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5811cc=this['_activeAnnotation'];_0x5811cc&&_0x5811cc===_0x83f92c&&_0x4abb15?(this['_alignBeforeItem'](_0x34907f,_0x31331a),this['_alignAfterItem'](_0x31331a,_0x34907f)):_0x5811cc&&_0x5811cc===_0x83f92c?this['_alignBeforeItem'](_0x34907f,_0x31331a):this['_alignAfterItem'](_0x31331a,_0x34907f);}['_recalculate'](_0x2269a4,_0x39350b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4d0d5c,changedProp:_0x1870b4}of this['_recalculateBuffer'])'top'===_0x1870b4?this['_alignForTopChange'](_0x4d0d5c):this['_alignForBottomChange'](_0x4d0d5c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2269a4,'changedProp':_0x39350b});}['getSidebarItemView'](_0xd1a1e2){return this['_annotationToSidebarItemView']['get'](_0xd1a1e2);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4bd34e){const _0x4a3417=this['getSidebarItemView'](_0x4bd34e);this['stopListening'](_0x4a3417),this['stopListening'](_0x4bd34e['view']),_0x4a3417['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4bd34e),this['_sidebarItemViewToAnnotation']['delete'](_0x4a3417);}['_createSidebarView'](){const _0x5b4ad8=new H(this['context']['locale']);return _0x5b4ad8['render'](),this['on']('change:_lastItem',(_0x42eb7b,_0x243722,_0x18de49,_0x21f530)=>{_0x21f530&&_0x5b4ad8['unbind']('minHeight'),_0x18de49?_0x5b4ad8['bind']('minHeight')['to'](_0x18de49,'bottom'):_0x5b4ad8['minHeight']=null;}),_0x5b4ad8;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x511eb3){const _0x2da19c=this['_sidebarItemViewToAnnotation']['get'](_0x511eb3),_0x5991b1=_0x2da19c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2da19c)-0x1);return _0x5991b1&&this['getSidebarItemView'](_0x5991b1)||null;}['_getItemAfter'](_0x15bd39){const _0x59d6a6=this['_sidebarItemViewToAnnotation']['get'](_0x15bd39),_0x62749=_0x59d6a6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x59d6a6)+0x1);return _0x62749&&this['getSidebarItemView'](_0x62749)||null;}['_alignBeforeItem'](_0x1575ae,_0x219c89){_0x1575ae['updateHeight']();const _0x37fa05=G(_0x219c89['bottom']+this['_spaceBetweenItems'],_0x1575ae['top']);return!!_0x37fa05&&(this['_setItemTop'](_0x219c89,_0x219c89['top']-_0x37fa05),!0x0);}['_alignAfterItem'](_0x282f9a,_0x384329){_0x282f9a['updateHeight']();const _0x34b18e=G(_0x282f9a['bottom']+this['_spaceBetweenItems'],_0x384329['top']);return!!_0x34b18e&&(this['_setItemTop'](_0x384329,_0x384329['top']+_0x34b18e,!0x1),!0x0);}['_alignToTargetRect'](_0x121035){const _0x70ea72=this['_sidebarItemViewToAnnotation']['get'](_0x121035);if(!_0x70ea72||!_0x70ea72['target']||!_0x70ea72['targetRect'])return;const _0x41bf60=this['_getTargetTop'](_0x70ea72,_0x70ea72['targetRect']);this['_setItemTop'](_0x121035,_0x41bf60);}['_getTargetTop'](_0x392428,_0x123474){if(null===_0x123474)return 0x0;if(_0x392428['target']instanceof _0x37570f)return _0x123474['top'];{const _0x145394=new _0x37570f(this['view']['element'])['top'];return _0x123474['top']-_0x145394;}}['_setItemTop'](_0x30fd14,_0x2dca40,_0x8b63ba=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x8b63ba&&(_0x2dca40=Math['max'](_0x2dca40,this['_getMaxAvailableTop'](_0x30fd14))),_0x30fd14['top']=_0x2dca40;}['_getMaxAvailableTop'](_0x57cf66){let _0x5cbc5a=this['_getItemBefore'](_0x57cf66),_0x58b2c1=0x0;for(;_0x5cbc5a;)_0x5cbc5a['updateHeight'](),_0x58b2c1+=this['_spaceBetweenItems']+_0x5cbc5a['height'],_0x5cbc5a=this['_getItemBefore'](_0x5cbc5a);return _0x58b2c1;}}function G(_0x235b5a,_0x43e792){return Math['max'](_0x235b5a-_0x43e792,0x0);}function g(_0x21dea4){return null!==_0x21dea4&&'object'==typeof _0x21dea4&&0x1===_0x21dea4['nodeType'];}class e extends _0x2738de{['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(_0x19d2f2){super(_0x19d2f2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x23eb0b(),this['_refreshPositioningDebounced']=_0x40c01b(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1ee65b=this['context']['plugins']['get'](j),_0x9be416=this['context']['plugins']['get'](z);_0x1ee65b['register']('wideSidebar',this),_0x9be416['container']&&_0x1ee65b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x40a9e1){if(_0x40a9e1===this['activeAnnotation'])return;const _0x2a06b6=this['context']['plugins']['get'](z);_0x2a06b6['_activeAnnotation']=_0x40a9e1;const _0x3a907a=this['activeAnnotation'];_0x2a06b6['refresh']({'blurredAnnotation':_0x3a907a,'activatedAnnotation':_0x40a9e1}),this['activeAnnotation']=_0x40a9e1;}['attach'](_0x57ae0e){this['annotations']=_0x57ae0e;const _0x42ce9d=this['context']['plugins']['get'](z);if(_0x42ce9d['_annotations']=_0x57ae0e,this['isAttached'])throw new _0x51f518('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x42ce9d,'set:container',()=>{this['detach'](),this['listenTo'](_0x42ce9d,'change:container',_0x221cfd=>{_0x221cfd['off'](),this['attach'](_0x57ae0e);});}),_0x42ce9d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2af16a=_0x494b58=>{_0x494b58['updateTargetRect'](),_0x42ce9d['addAnnotation'](_0x494b58);};for(const _0x5b5577 of _0x57ae0e)_0x2af16a(_0x5b5577);this['listenTo'](_0x57ae0e,'add',(_0x4684f7,_0x38bc89)=>{_0x2af16a(_0x38bc89);}),this['listenTo'](_0x57ae0e,'remove',(_0x187e55,_0x13d93e,_0x5d1e52)=>{_0x42ce9d['rearrange']({'removedAnnotation':_0x13d93e,'previousAnnotation':_0x57ae0e['get'](_0x5d1e52-0x1),'nextAnnotation':_0x57ae0e['get'](_0x5d1e52+0x1)}),_0x13d93e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x57ae0e,'focus',(_0x43e283,_0x11a4d6)=>{this['setActiveAnnotation'](_0x11a4d6);}),this['listenTo'](_0x57ae0e,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1e0b70=this['context']instanceof _0x449ace?this['context']['editors']:new _0x23eb0b([this['context']]);for(const _0xbf8a79 of _0x1e0b70)this['_integrateWithEditorAnnotations'](_0xbf8a79);this['listenTo'](_0x1e0b70,'add',(_0x3f0169,_0x11d864)=>{this['listenTo'](_0x11d864,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x11d864);});}),this['listenTo'](_0x1e0b70,'remove',(_0x2d289e,_0x14266d)=>{_0x14266d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x14266d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x51f518('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x50a3f4=this['context']['plugins']['get'](z);_0x50a3f4['_detachFromContainer'](this['annotations']),this['stopListening'](_0x50a3f4),this['stopListening'](this['annotations']),this['context']instanceof _0x449ace&&this['stopListening'](this['context']['editors']);for(const _0x37671e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x37671e);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x40cc8f){if(!_0x40cc8f['plugins']['has']('EditorAnnotations'))return;const _0x61134c=_0x40cc8f['plugins']['get']('EditorAnnotations'),_0xb5f293=()=>{const _0x1fb19e=_0x61134c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1fb19e[0x0]||null);};this['listenTo'](_0x61134c,'refresh',_0xb5f293),this['listenTo'](_0x61134c,'blur',(_0x7a4414,{isAnnotationTracked:_0x121cd1})=>{this['activeAnnotation']&&_0x121cd1(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x61134c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x10c46a=>{_0x61134c['hasDomSelection']()&&(_0xb5f293(),_0x10c46a['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x61134c);}['_destroyEditorAnnotationsIntegration'](_0x58a2f1){this['stopListening'](_0x58a2f1),this['_editorAnnotations']['remove'](_0x58a2f1);}}class C extends _0x49f2c7{['counterView'];constructor(_0x93d430){super(_0x93d430);const _0x202c79=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x7b783d,_0x2c27d9)=>_0x7b783d?'...':_0x2c27d9['toString']()),this['set']('annotationType',''),this['icon']=_0x224626,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x202c79['to']('annotationType',_0x5d4f51=>'ck-annotation-counter__badge--'+_0x5d4f51),_0x202c79['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x202c79['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2738de{['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(_0x1aa0a4){super(_0x1aa0a4),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x35e1dc())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x23eb0b(),this['_refreshPositioningDebounced']=_0x40c01b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5a4cd6(this['context']['locale']),this['balloonPanelView']=new _0x263b66(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3160f5){this['annotations']=_0x3160f5;const _0x4e64ea=this['context']['plugins']['get'](z),_0x23dea4=this['balloonPanelView'];if(_0x4e64ea['_annotations']=_0x3160f5,this['isAttached'])throw new _0x51f518('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4e64ea,'set:container',()=>{this['detach'](),this['listenTo'](_0x4e64ea,'change:container',_0x1d5c06=>{_0x1d5c06['off'](),this['attach'](_0x3160f5);});}),_0x4e64ea['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x523cc7=_0x2ced47=>{const _0x1a8396=new C(this['context']['locale']);_0x4e64ea['addAnnotation'](_0x2ced47,_0x1a8396),this['_annotationToNarrowView']['set'](_0x2ced47,_0x1a8396),_0x1a8396['bind']('isDirty','annotationType','number')['to'](_0x2ced47['view'],'isDirty','type','length'),_0x1a8396['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x23dea4['content']['first']!==_0x2ced47['view']?(this['_showBalloon'](_0x2ced47),_0x2ced47['view']['element']['focus'](),this['setActiveAnnotation'](_0x2ced47)):this['setActiveAnnotation'](null);});};for(const _0xc30771 of _0x3160f5)_0x523cc7(_0xc30771);this['listenTo'](_0x3160f5,'add',(_0x128043,_0x2804be)=>{_0x523cc7(_0x2804be);}),this['listenTo'](_0x3160f5,'remove',(_0x4235c3,_0x1244aa,_0x3e93e3)=>{this['_annotationToNarrowView']['get'](_0x1244aa)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1244aa),_0x4e64ea['rearrange']({'removedAnnotation':_0x1244aa,'previousAnnotation':_0x3160f5['get'](_0x3e93e3-0x1),'nextAnnotation':_0x3160f5['get'](_0x3e93e3+0x1)}),_0x1244aa===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3160f5,'focus',(_0x17118c,_0x50ec33)=>{this['setActiveAnnotation'](_0x50ec33);}),this['listenTo'](_0x3160f5,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x51f116,_0x5446da)=>{_0x5446da['keyCode']===_0x5b1abd['esc']&&_0x23dea4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x23dea4['content']['first']),this['_hideBalloon'](),_0x5446da['stopPropagation'](),_0x5446da['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x573407,_0x33ba9d)=>{const _0x11efec=_0x33ba9d['target'];_0x23dea4['isVisible']&&_0x23dea4['element']['contains'](_0x11efec)||_0x4e64ea['view']['element']['contains'](_0x11efec)||_0x573407['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x505ade=>_0x505ade['contains'](_0x11efec))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1a5037=this['context']instanceof _0x449ace?this['context']['editors']:new _0x23eb0b([this['context']]);for(const _0x408cd3 of _0x1a5037)this['_integrateWithEditorAnnotations'](_0x408cd3);this['listenTo'](_0x1a5037,'add',(_0xe0af6,_0x323d2f)=>{this['listenTo'](_0x323d2f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x323d2f);});}),this['listenTo'](_0x1a5037,'remove',(_0x2e8b41,_0x37c440)=>{_0x37c440['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x37c440['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5c56d){if(_0x5c56d===this['activeAnnotation'])return;const _0x7d38ae=this['context']['plugins']['get'](z);if(_0x7d38ae['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5c56d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5c56d)_0x7d38ae['getSidebarItemView'](_0x5c56d)?this['_showBalloon'](_0x5c56d):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5c56d;}['detach'](){if(!this['isAttached'])throw new _0x51f518('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2b6160=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x58432f=>_0x58432f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2b6160['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x449ace&&this['stopListening'](this['context']['editors']);for(const _0x27ba04 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x27ba04);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'](_0x9a0120){if(!_0x9a0120['plugins']['has']('EditorAnnotations'))return;const _0x36d79c=_0x9a0120['plugins']['get']('EditorAnnotations'),_0x142e00=this['context']['plugins']['get'](z),_0x20e074=this['annotations'],_0xf316ab=this['balloonPanelView'],_0x4c158f=()=>{const _0x180c28=_0x36d79c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x180c28),this['setActiveAnnotation'](_0x180c28[0x0]||null);};this['listenTo'](_0x36d79c,'refresh',_0x4c158f),this['listenTo'](_0x36d79c,'blur',(_0x157131,{isAnnotationTracked:_0x9fa5cc})=>{this['activeAnnotation']&&_0x9fa5cc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x36d79c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x20e074,'blur',_0x3acfd7=>{_0x36d79c['hasDomSelection']()&&_0x3acfd7['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4dbc78,_0x3215e5)=>{const _0x5a909b=_0x3215e5['target'];_0xf316ab['isVisible']&&_0xf316ab['element']['contains'](_0x5a909b)||_0x142e00['view']['element']['contains'](_0x5a909b)||this['activeAnnotation']&&_0x36d79c['hasDomSelection']()&&(_0x4c158f(),_0x4dbc78['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x36d79c);}['_destroyEditorAnnotationsIntegration'](_0xbfba6c){_0xbfba6c&&(this['stopListening'](_0xbfba6c),this['_editorAnnotations']['remove'](_0xbfba6c));}['_setSelectedAnnotations'](_0x1d9655){for(const _0x17f5fe of this['_selectedAnnotations'])_0x1d9655['includes'](_0x17f5fe)||this['_manuallyClosedAnnotationViews']['delete'](_0x17f5fe['view']);this['_selectedAnnotations']=_0x1d9655;}['_refreshPositioning'](){const _0x1b06c8=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x1b06c8['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1b07c9){if(this['_manuallyClosedAnnotationViews']['has'](_0x1b07c9['view']))return;const _0x2c670d=this['balloonPanelView']['content']['first'];_0x2c670d!==_0x1b07c9['view']?(_0x2c670d&&this['_detachListeners'](_0x2c670d),this['_attachListeners'](_0x1b07c9['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1b07c9['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x35998b=this['balloonPanelView']['content']['first'],_0x3e6677=_0x35998b&&this['annotations']['getByView'](_0x35998b);if(!_0x3e6677||!this['_annotationToNarrowView']['has'](_0x3e6677))return;const _0x34c641=this['_annotationToNarrowView']['get'](_0x3e6677)['element'],_0x23d4f1=(function(){const _0x30cb2d=_0x263b66['defaultPositions'];return[_0x30cb2d['southArrowNorthEast'],_0x30cb2d['northArrowSouthEast'],_0x30cb2d['southArrowNorth'],_0x30cb2d['northArrowSouth'],_0x30cb2d['southArrowNorthWest'],_0x30cb2d['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x34c641,'positions':_0x23d4f1});}['_hideBalloon'](){const _0x592a55=this['balloonPanelView'],_0x3b490c=_0x592a55['content']['first'];_0x3b490c&&(this['_detachListeners'](_0x3b490c),_0x592a55['unpin'](),_0x592a55['content']['clear']());}['_attachListeners'](_0x299963){this['listenTo'](_0x299963,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x299963,'Esc',(_0x41c5b9,_0x30abca)=>{this['_manuallyClosedAnnotationViews']['add'](_0x299963),this['_hideBalloon'](),_0x30abca();});}['_detachListeners'](_0x328d32){this['stopListening'](_0x328d32);}}class c extends _0x5ddc0e{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x36b0f0,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x161f30){super(_0x161f30),_0x161f30['editing']['view']['addObserver'](_0x5d0a9d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x161f30['plugins']['get'](_0x36b0f0),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x13f758=this['editor']['plugins']['get'](j);_0x13f758['context']===this['editor']&&(_0x13f758['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x77bd22,_0x25c8a0)=>{const _0x2716b3=this['_balloon'];if(this['isAttached']&&_0x2716b3['visibleView']){const _0x54cbd3=this['annotations']['getByView'](_0x2716b3['visibleView']);_0x54cbd3&&this['_closeAnnotation'](_0x54cbd3),_0x25c8a0();}}));}['afterInit'](){const _0x42e82d=this['editor']['plugins']['get'](j);_0x42e82d['context']===this['editor']&&(_0x42e82d['hasActive']()||_0x42e82d['switchTo']('inline'));}['setActiveAnnotation'](_0x33b479){_0x33b479!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x33b479&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x33b479)&&this['_addAnnotationToBalloon'](_0x33b479,!0x0),_0x33b479['isActive']=!0x0),_0x33b479||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x33b479);}['attach'](_0x163189){this['annotations']=_0x163189;const _0x94de34=this['editor']['plugins']['get'](j),_0x5525d7=this['_balloon'];if(this['isAttached'])throw new _0x51f518('inlineannotations-attach-already-attached',this);if(_0x94de34['context']!==this['editor'])throw new _0x51f518('inlineannotations-not-allowed-with-context',this);const _0x4242e2=this['editor']['plugins']['get'](b);this['listenTo'](_0x4242e2,'refresh',()=>{const _0x158829=_0x4242e2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4a25c2,_0x3176a9;!this['_forceRefresh']&&(_0x4a25c2=_0x158829,_0x3176a9=this['_selectedAnnotations'],_0x4a25c2['length']===_0x3176a9['length']&&_0x4a25c2['every'](_0x44de80=>_0x3176a9['includes'](_0x44de80)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x158829),this['setActiveAnnotation'](_0x158829[0x0]||null));}),this['listenTo'](_0x4242e2,'blur',(_0x105ac9,{isAnnotationTracked:_0x57185b})=>{this['activeAnnotation']&&_0x57185b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5aeb61,_0x2b00d9,_0x1fa878)=>{_0x1fa878||this['setActiveAnnotation'](null);}),this['listenTo'](_0x163189,'remove',(_0x569988,_0x43f348)=>{this['_removeAnnotationFromBalloon'](_0x43f348),_0x43f348===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5525d7,'change:visibleView',(_0x462f89,_0x2e9227,_0x2ff1ac,_0x5585e6)=>{_0x5585e6&&this['stopListening'](_0x5585e6);const _0x50e2dd=_0x163189['getByView'](_0x2ff1ac);_0x2ff1ac&&_0x50e2dd&&(this['listenTo'](_0x2ff1ac,'change:height',()=>{_0x5525d7['updatePosition']();}),this['listenTo'](_0x2ff1ac,'Esc',()=>{this['_closeAnnotation'](_0x50e2dd),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x50e2dd&&this['setActiveAnnotation'](_0x50e2dd));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5525d7['visibleView']&&(_0x163189['getByView'](_0x5525d7['visibleView'])&&_0x5525d7['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 _0x51f518('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3e7444 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3e7444);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xc0c724){for(const _0x3c7c41 of this['_selectedAnnotations'])_0xc0c724['includes'](_0x3c7c41)||this['_manuallyClosed']['delete'](_0x3c7c41);for(const _0x4ad342 of this['annotations'])_0xc0c724['includes'](_0x4ad342)||this['_removeAnnotationFromBalloon'](_0x4ad342);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5e3651 of _0xc0c724)this['_addAnnotationToBalloon'](_0x5e3651);}this['_selectedAnnotations']=_0xc0c724;}['_addAnnotationToBalloon'](_0x24bb88,_0x9b1630=!0x1){this['_manuallyClosed']['has'](_0x24bb88)||(this['_addedAnnotations']['has'](_0x24bb88)||this['_balloon']['hasView'](_0x24bb88['view'])||(this['_addedAnnotations']['add'](_0x24bb88),this['_balloon']['add']({'stackId':_0x24bb88['view']['id'],'view':_0x24bb88['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x24bb88)}})),_0x9b1630&&this['_balloon']['showStack'](_0x24bb88['view']['id']));}['_getBalloonTargetForAnnotation'](_0x33ef18){const _0x5bd83c=_0x33ef18['target'],_0x365ade=this['editor']['editing']['view'],_0x5f36c6=_0x365ade['document']['selection']['getFirstRange'](),_0x1c61ec=_0x365ade['domConverter']['viewRangeToDom'](_0x5f36c6);if(_0x1c61ec['collapse'](!0x0),_0x5bd83c){if(_0x5bd83c instanceof _0x37570f)return _0x5bd83c;let _0xdcd681=[];for(const _0x4a5333 of _0x5bd83c)_0xdcd681['push'](...F(_0x4a5333['getClientRects']()));_0xdcd681=function(_0x3a1457){const _0x5d92e1=[];let _0xf6950e=_0x3a1457[0x0];for(let _0x41e1b9=0x1;_0x41e1b9<_0x3a1457['length'];_0x41e1b9++)P(_0xf6950e,_0x3a1457[_0x41e1b9])?_0xf6950e['width']+=_0x3a1457[_0x41e1b9]['width']:(_0x5d92e1['push'](_0xf6950e),_0xf6950e=_0x3a1457[_0x41e1b9]);return _0x5d92e1['push'](_0xf6950e),_0x5d92e1;}(_0xdcd681);const _0x405339=_0x1c61ec['getBoundingClientRect']();return _0xdcd681['find'](_0x23d6a1=>_0x23d6a1['top']<=_0x405339['top']&&_0x23d6a1['bottom']>=_0x405339['bottom']&&_0x23d6a1['left']<=_0x405339['left']&&_0x23d6a1['right']>=_0x405339['right'])||_0xdcd681[0x0];}return _0x33ef18['targetRect']||_0x1c61ec;}['_removeAnnotationFromBalloon'](_0xb74736){this['_addedAnnotations']['has'](_0xb74736)&&this['_balloon']['hasView'](_0xb74736['view'])&&(this['_addedAnnotations']['delete'](_0xb74736),this['_balloon']['remove'](_0xb74736['view']));}['_closeAnnotation'](_0x2dfef3){this['_manuallyClosed']['add'](_0x2dfef3),this['_removeAnnotationFromBalloon'](_0x2dfef3);}}function F(_0x233a0e){return Array['from'](_0x233a0e)['map'](DOMRect['fromRect']);}function P(_0x3aecec,_0x17396b){return _0x3aecec['top']===_0x17396b['top']&&_0x3aecec['bottom']===_0x17396b['bottom']&&_0x3aecec['right']===_0x17396b['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5f080c,_0x523549){super(_0x5f080c),this['set']('isEmpty',!_0x523549['length']),this['focusTracker']=new _0x199d2b(),this['_annotationViews']=_0x523549,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2f1de9({'focusables':_0x523549,'focusTracker':this['focusTracker']}),this['listenTo'](_0x523549,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x523549,'remove',(_0xcaabda,_0x2e9918)=>{_0x2e9918['isActive']&&this['focus'](),_0x523549['length']||(this['isEmpty']=!0x0);});const _0x14040a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x5f080c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x523549},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x14040a['if']('isEmpty','ck-hidden',_0x280020=>!_0x280020)]},'children':[{'text':N(_0x5f080c,'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 _0xe7d42c of this['_annotationViews'])this['focusTracker']['add'](_0xe7d42c['element']);this['_annotationViews']['on']('change',(_0x384ea5,{added:_0x5e6563,removed:_0x159f72})=>{for(const _0x151136 of _0x5e6563)this['focusTracker']['add'](_0x151136['element']);for(const _0x4ab2fe of _0x159f72)this['focusTracker']['remove'](_0x4ab2fe['element']);});}}class p extends _0x2738de{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4181d5){super(_0x4181d5),this['archivedThreads']=new _0x23eb0b();}['init'](){const _0x31bc35=this['context'],_0x4c5987=_0x31bc35['plugins']['get'](o),_0x139372=_0x31bc35['plugins']['get'](y);this['listenTo'](_0x4c5987,'addCommentThread',(_0x2d9912,{threadId:_0x1150a2})=>{const _0x273917=_0x4c5987['getCommentThread'](_0x1150a2);_0x273917['archivedAt']&&this['archivedThreads']['add'](_0x273917,this['_calculatePosition'](_0x273917['archivedAt'])),this['listenTo'](_0x273917,'change:archivedAt',(_0x1264c2,_0x2d7bb3,_0x3200e3)=>{_0x3200e3?this['archivedThreads']['has'](_0x273917)||this['archivedThreads']['add'](_0x273917,this['_calculatePosition'](_0x273917['archivedAt'])):this['archivedThreads']['has'](_0x273917)&&this['archivedThreads']['remove'](_0x273917);});}),this['listenTo'](_0x4c5987,'removeCommentThread',(_0x59afa8,{threadId:_0x21708f})=>{const _0x3060a5=_0x4c5987['getCommentThread'](_0x21708f);this['stopListening'](_0x3060a5),this['archivedThreads']['has'](_0x3060a5)&&this['archivedThreads']['remove'](_0x3060a5);},{'priority':'highest'}),this['listenTo'](_0x139372['collection'],'focus',(_0x5324c7,_0x4a6794)=>{_0x4a6794['isVisible']||(_0x4a6794['isActive']=!0x0,_0x139372['activate'](_0x4a6794));});}['_calculatePosition'](_0x3f0625){const _0xa99d10=[...this['archivedThreads']]['findIndex'](_0x2b45b1=>_0x2b45b1['archivedAt']<_0x3f0625);return _0xa99d10>-0x1?_0xa99d10:this['archivedThreads']['length'];}}class a extends _0x5ddc0e{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0xeb9489];}constructor(_0x1de69d){super(_0x1de69d),this['annotationViews']=new _0xae5e8b(),this['_pendingThreads']=[];}['init'](){const _0xac178a=this['editor'],_0x19a937=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xac178a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x49f2c7,!0x0)),_0xac178a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x506166=this['_createCommentsArchiveButton'](_0x58cd9a);return _0x506166['set']({'role':'menuitemcheckbox'}),_0x506166;});const _0x10fd63=_0xac178a['plugins']['get'](p),_0x521eb6=_0xac178a['plugins']['get']('Annotations'),_0x3e56a3=_0xac178a['plugins']['get']('CommentsRepository');_0x10fd63['archivedThreads']['forEach'](_0x56ffad=>{this['_handleNewThread'](_0x56ffad);}),this['listenTo'](_0x10fd63['archivedThreads'],'add',(_0xf14f9f,_0x3b16b1)=>{this['_handleNewThread'](_0x3b16b1);}),this['listenTo'](_0x521eb6['collection'],'add',(_0x48c00d,_0x4ecc08)=>{const _0x460226=this['_pendingThreads']['find'](_0x4ccea9=>{const _0x5c43dc=_0x3e56a3['_threadToController']['get'](_0x4ccea9);return _0x5c43dc&&_0x4ecc08['innerView']===_0x5c43dc['view'];});if(_0x460226){const _0x3ae710=this['_calculatePosition'](_0x460226['archivedAt']);this['annotationViews']['add'](_0x4ecc08['view'],_0x3ae710),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x460226),0x1);}}),this['listenTo'](_0x10fd63['archivedThreads'],'remove',(_0x49e375,_0x400b78)=>{const _0x2ce5e8=_0xac178a['config']['get']('collaboration.channelId');if(!_0x2ce5e8||_0x400b78['channelId']===_0x2ce5e8){if(this['_pendingThreads']['includes'](_0x400b78))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x400b78),0x1);else{const _0x3eb78e=_0x3e56a3['_threadToController']['get'](_0x400b78),_0x5998af=_0x521eb6['getByInnerView'](_0x3eb78e['view']);this['annotationViews']['remove'](_0x5998af['view']),this['stopListening'](_0x5998af['focusableElements']);}}}),this['listenTo'](_0x521eb6['collection'],'add',(_0x485cb6,_0x5a072a)=>{this['listenTo'](_0x5a072a,'escape',_0x19a937);}),this['listenTo'](_0x521eb6['collection'],'remove',(_0x876d1f,_0x36d9c9)=>{this['stopListening'](_0x36d9c9,'escape',_0x19a937);});}['_handleNewThread'](_0x965e9e){const _0x20a949=this['editor']['plugins']['get']('CommentsRepository'),_0x454d49=this['editor']['plugins']['get']('Annotations'),_0x499a77=this['editor']['config']['get']('collaboration.channelId');if(!_0x499a77||_0x965e9e['channelId']===_0x499a77){const _0x357fbe=_0x20a949['_threadToController']['get'](_0x965e9e);if(!_0x357fbe)return void this['_pendingThreads']['push'](_0x965e9e);const _0x261180=this['_calculatePosition'](_0x965e9e['archivedAt']),_0x234f43=_0x454d49['getByInnerView'](_0x357fbe['view']);_0x234f43['isVisible']&&_0x454d49['_visibleAnnotations']['remove'](_0x234f43),this['annotationViews']['add'](_0x234f43['view'],_0x261180);}}['_calculatePosition'](_0x5df100){const _0x3e39cb=this['editor']['config']['get']('collaboration.channelId'),_0x1e8964=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2c32ab=>_0x2c32ab['channelId']===_0x3e39cb)['findIndex'](_0x4393d3=>_0x4393d3['archivedAt']<_0x5df100);return _0x1e8964<0x0||_0x1e8964>this['annotationViews']['length']?this['annotationViews']['length']:_0x1e8964-0x1;}['_toggleDialog'](){const _0x54d8e2=this['editor'],_0x1db34f=_0x54d8e2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x54d8e2['locale'],this['annotationViews'])),'commentsArchive'===_0x1db34f['id']?_0x1db34f['hide']():_0x1db34f['show']({'id':'commentsArchive','title':N(_0x54d8e2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x314692,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xd16eae['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4cb7b7,_0x563f50=!0x1){const _0xccbd10=this['editor']['locale'],_0x51be16=this['editor']['plugins']['get']('Dialog'),_0x55f8fc=new _0x4cb7b7(_0xccbd10);return _0x55f8fc['bind']('isEnabled')['to'](this,'isEnabled'),_0x55f8fc['bind']('isOn')['to'](_0x51be16,'id',_0x57d12d=>'commentsArchive'===_0x57d12d),_0x55f8fc['set']({'label':N(_0xccbd10,'COMMENTS_ARCHIVE'),'icon':_0x314692,'isToggleable':!0x0}),_0x563f50&&(_0x55f8fc['tooltip']=!0x0),this['listenTo'](_0x55f8fc,'execute',()=>this['_toggleDialog']()),_0x55f8fc;}['_hideDialogOnAnnotationEscape']=_0x37476c=>{const _0x1c2293=_0x37476c['source'];if(!this['annotationViews']['has'](_0x1c2293['view']))return;const _0x4a8b37=this['editor']['plugins']['get']('Dialog');_0x4a8b37['isOpen']&&'commentsArchive'===_0x4a8b37['id']&&(_0x4a8b37['hide'](),_0x37476c['stop']());};}class gi extends _0x5ddc0e{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};
|