@ckeditor/ckeditor5-comments 46.0.0-alpha.3 → 46.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index-editor.css +12 -1
- package/dist/index.css +22 -2
- 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/theme/annotation.css +2 -2
- package/theme/comment.css +14 -0
- package/theme/commentinput.css +6 -0
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x4a4f59={}){function _0x44b098(_0x5d22e3){return _0x5d22e3['map'](_0x45cdf0=>String['fromCharCode'](_0x45cdf0))['join']('');}(_0x4a4f59=Object['assign']({},_0x4a4f59))['plugins']||(_0x4a4f59['plugins']=Qt['defaultPlugins']),super(_0x4a4f59),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[_0x44b098([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x44b098([0x76,0x69,0x65,0x77])][_0x44b098([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x44b098([0x61,0x75,0x74,0x6f]),this[_0x44b098([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x44b098([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x44b098([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x44b098([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x44b098([0x6f,0x6b])});}['create'](){const _0x4c53ef=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4c53ef))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x30690=>{const _0x1f8291=this['model']['document']['getRoot'](),_0xd5146d=_0x1f8291&&_0x1f8291['getChild'](_0x1f8291['childCount']-0x1);_0x30690['setSelection'](_0xd5146d,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x1accce=this['editing']['view'],_0x228212=_0x1accce['document']['getRoot'](),_0x4f78a9=_0x228212['getChild'](0x0);_0x228212['childCount']>0x1||!_0x4f78a9||'p'!=_0x4f78a9['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x1accce,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4f78a9['placeholder']=this['placeholder']),St({'view':_0x1accce,'element':_0x4f78a9,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4f78a9);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x30d1e3,_0x257214={}){super(_0x30d1e3),this['editor']=null,this['_editorConfig']=_0x257214,this['set']('value',_0x257214['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x30d1e3,'Reply...')),this['set']('submitLabel',N(_0x30d1e3,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x3c3dac(),this['focusCycler']=new _0x449cde({'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',(_0xdac9c1,_0x2fbbef)=>{this['cancelButtonView']['fire']('execute'),_0x2fbbef();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4f6640,_0x373fb4)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x373fb4());}),this['on']('submit',(_0x533bc9,_0xb3505e)=>{_0xb3505e['length']>0xfde8?(alert(N(_0x30d1e3,'TOO_LONG_COMMENT_ALERT',[_0xb3505e['length'],0xfde8])),_0x533bc9['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 _0xd9439c=this['editor'];this['element']['insertBefore'](_0xd9439c['ui']['element'],this['element']['firstChild']),_0xd9439c['model']['document']['on']('change',()=>this['value']=_0xd9439c['getData']()),_0xd9439c['bind']('placeholder')['to'](this),this['focusables']['add'](_0xd9439c['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x2dcbfe){-0x1===_0x2dcbfe?(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:_0x589966}=this,_0x3a53fc=new _0x3d9446(_0x589966);return _0x3a53fc['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3a53fc['withText']=!0x0,_0x3a53fc['bind']('label')['to'](this,'submitLabel'),_0x3a53fc['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3a53fc['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x43780b,_0xe656e1)=>!_0xe656e1&&!!_0x43780b['trim']()),_0x3a53fc;}['_createCancelButton'](){const {locale:_0x385e59}=this,_0x1abbec=new _0x3d9446(_0x385e59);return _0x1abbec['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1abbec['label']=N(_0x385e59,'Cancel'),_0x1abbec['withText']=!0x0,_0x1abbec['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1abbec;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2c2135=>{this['focusTracker']['add'](_0x2c2135['element']);}),this['focusables']['on']('change',(_0xb042e3,_0xfb87ef)=>{for(const _0x51b78c of Array['from'](_0xfb87ef['added'])['reverse']())this['focusTracker']['add'](_0x51b78c['element']);});}}class ie extends kt{constructor(_0x53228a,_0x598e8c,_0x8c2252){super(_0x53228a),this['commentInputView']=new es(_0x53228a,_0x8c2252),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x2004dd,_0x7a7908)=>_0x2004dd||!!_0x7a7908),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 _0x398673(_0x53228a,_0x598e8c),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'](_0x5ec7f8){this['commentInputView']['focus'](_0x5ec7f8);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3d7d52,_0xcb802f)=>{const {submitButtonView:_0x1a7ec6,cancelButtonView:_0xb2e120,editor:_0x59b2e3}=this['commentInputView'];[_0x1a7ec6['element'],_0xb2e120['element'],_0x59b2e3?_0x59b2e3['editing']['view']['getDomRoot']():null]['filter'](_0x2f7939=>_0x2f7939)['some'](_0x10717f=>_0x10717f['contains'](_0xcb802f['target']))||(this['focus'](),_0xcb802f['preventDefault']());});}}class os extends kt{constructor(_0x15dc2f){super(_0x15dc2f);const _0x2b8b71=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2b8b71['to']('count',_0x45531e=>N(_0x15dc2f,'NUMBER_OF_COMMENTS',_0x45531e))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x32cf34,_0x312f8a,_0x122e63){super(_0x32cf34);const _0x49060f=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x312f8a['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x312f8a,this['_config']=_0x122e63,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x3c3dac(),this['keystrokes']=new jt(),this['focusCycler']=new _0x449cde({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1f5a98=>this['commentViews']['map'](_0x50ddd3=>_0x50ddd3['element'])['includes'](_0x1f5a98['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x32cf34),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x28a916=>_0x28a916-this['_config']['maxCommentsWhenCollapsed']);for(const _0x54322e of _0x312f8a['comments'])this['_handleNewCommentModel'](_0x54322e);this['_handleInfoComment'](),this['listenTo'](_0x312f8a['comments'],'add',(_0x47c075,_0x22cece)=>{const _0x5c6bb4=this['_calculatePosition'](_0x22cece);this['length']++,this['_handleNewCommentModel'](_0x22cece,_0x5c6bb4),this['refreshVisibleViews']();}),this['listenTo'](_0x312f8a['comments'],'remove',(_0x15c98b,_0x563ba4)=>{this['length']--,this['_handleRemoveCommentModel'](_0x563ba4),this['refreshVisibleViews']();}),this['listenTo'](_0x312f8a,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x312f8a,'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',_0x49060f['if']('length','ck-hidden',_0x195be7=>!_0x195be7)],'aria-label':N(_0x32cf34,'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'](_0x537f1b){-0x1===_0x537f1b?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x238b7a of this['commentViews'])_0x238b7a['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x475080,_0x3e36dc){const _0x3df5d1=new this['_config']['CommentView'](this['locale'],_0x475080,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x3df5d1['viewUid']=_0x475080['id'],_0x3df5d1['delegate']('removeComment')['to'](this),_0x3df5d1['delegate']('updateComment')['to'](this),_0x3df5d1['delegate']('resolveCommentThread')['to'](this),_0x3df5d1['delegate']('editorReady')['to'](this),_0x3df5d1['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x3df5d1,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x3df5d1,_0x3e36dc);}['_calculatePosition'](_0x1ac86d){const _0x3ee57c=this['_model']['_findOptimalIndex'](_0x1ac86d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1ac86d['authoredAt']?_0x3ee57c-0x1:_0x3ee57c:_0x3ee57c-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x35fbc9={'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'],_0x35fbc9,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x35fbc9));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x55fee1){const _0x2812eb=this['commentViews']['remove'](_0x55fee1['id']);this['stopListening'](_0x2812eb),_0x2812eb['isEditMode']&&this['_updateHasDirtyComment'](),_0x2812eb['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2ac23f=>_0x2ac23f['isEditMode']);}['_rearrangeCollapse'](){const _0x3b3b50=function(_0x35c99f){const _0x6fa457=new _0x359f73();for(const _0x1a9706 of _0x35c99f)_0x6fa457['add'](_0x1a9706);return _0x6fa457;}(this['commentViews']),_0x1a4d8d=this['_collapsedCommentsView']['count'];for(let _0x330296=0x1;_0x330296<=_0x1a4d8d;_0x330296++)_0x3b3b50['remove'](0x1);for(const _0x128b5f of _0x3b3b50)_0x128b5f['collapse']();_0x1a4d8d>0x0&&_0x3b3b50['add'](this['_collapsedCommentsView'],0x1),rs(_0x56f66b(Array['from'](this['visibleViews']),Array['from'](_0x3b3b50)),this['visibleViews'],_0x3b3b50);}['_rearrangeExpand'](){rs(_0x56f66b(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x4e55f1 of this['visibleViews'])_0x4e55f1['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x3d47ed=>{this['focusTracker']['add'](_0x3d47ed['element']),this['keystrokes']['listenTo'](_0x3d47ed['element']);}),this['commentViews']['on']('change',(_0x4d93b1,_0x2af943)=>{for(const _0x19f13d of _0x2af943['removed'])this['focusTracker']['remove'](_0x19f13d['element']),this['keystrokes']['stopListening'](_0x19f13d['element']);for(const _0x528a9b of Array['from'](_0x2af943['added'])['reverse']())this['focusTracker']['add'](_0x528a9b['element']),this['keystrokes']['listenTo'](_0x528a9b['element']);});}}function rs(_0xf594a8,_0x27b921,_0x1b66ac){let _0x3e3bac=0x0;for(const _0x5e577c of _0xf594a8)switch(_0x5e577c){case'insert':_0x27b921['add'](_0x1b66ac['get'](_0x3e3bac),_0x3e3bac),_0x3e3bac++;break;case'delete':_0x27b921['remove'](_0x3e3bac);break;case'equal':_0x3e3bac++;}}class oe extends kt{constructor(_0x44f7d9){super(_0x44f7d9);const _0x37f676=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x37f676['to']('contextValue',_0x4b3f8a=>N(_0x44f7d9,'THREAD_CONTEXT_LABEL',_0x4b3f8a)),'tabindex':-0x1},'children':[{'text':_0x37f676['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x434ffd,_0x46ee95){super(_0x434ffd);const _0x50264b=this['bindTemplate'];this['_model']=_0x46ee95,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x3c3dac(),this['keystrokes']=new jt(),this['focusCycler']=new _0x449cde({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x46ee89=>!!_0x46ee89),this['bind']('contextValue')['to'](this['_model'],'context',_0x535303=>_0x535303&&_0x535303['value']?this['_trimContextValue'](_0x535303['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',_0x50264b['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 _0x15406c=new _0x3d9446(this['locale']);return _0x15406c['label']=N(this['locale'],'Reopen'),_0x15406c['tooltip']=N(this['locale'],'Reopen'),_0x15406c['icon']=_0x41467f,_0x15406c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x43ef73=>!_0x43ef73),_0x15406c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x571c63,_0x146ccf)=>_0x571c63&&_0x146ccf),_0x15406c['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x15406c;}['_trimContextValue'](_0x22aa1d){if(_0x22aa1d['length']<0x96)return _0x22aa1d;const _0x2bbfd2=_0x22aa1d['lastIndexOf']('\x20',0x93);return _0x22aa1d['substring'](0x0,_0x2bbfd2>-0x1?_0x2bbfd2:0x93)+'...';}['_attachContextActions'](){const _0x300d40=this['element']['querySelector']('.ck-context'),_0x2e4718=_0x300d40['querySelector']('.ck-context__value');this['listenTo'](_0x300d40,'mouseenter',()=>{_0x2e4718['offsetWidth']<_0x2e4718['scrollWidth']&&_0x300d40['classList']['add']('overlay');}),this['listenTo'](_0x300d40,'mouseleave',()=>{_0x300d40['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5e04d1 of this['focusables'])this['focusTracker']['add'](_0x5e04d1['element']),this['keystrokes']['listenTo'](_0x5e04d1['element']);}['_createContextView'](){const _0x2b5c85=new oe(this['locale']);return _0x2b5c85['bind']('contextValue')['to'](this),_0x2b5c85;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x32f9b0,_0x48a059,_0x319c65,_0x4d4d15){super(_0x32f9b0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x48a059,this['_localUser']=_0x319c65,this['_config']=_0x4d4d15,this['commentThreadHeaderView']=new Xt(_0x32f9b0,_0x48a059),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x32f9b0,N(_0x32f9b0,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x32f9b0,_0x48a059,Object['assign']({'CommentView':this['_config']['CommentView']},_0x4d4d15)),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',(_0x14436b,_0x5e28a7)=>_0x14436b||!!_0x5e28a7),this['bind']('isUnlinked')['to'](_0x48a059,'unlinkedAt',_0x4adf8a=>!!_0x4adf8a),this['bind']('ariaLabel')['to'](this,'length',_0x2a583f=>{const _0x54dd25=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2a583f,_0x54dd25]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x3c3dac(),this['keystrokes']=new jt(),this['focusCycler']=new _0x449cde({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x270e9d=>_0x270e9d['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 _0x7910d5=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x205e2d=_0x7910d5['commentInputView'];return _0x7910d5['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x205e2d,'value',(_0xce505,_0x6099f3,_0x154fc4,_0x2c3dd4,_0x1f7d72)=>!!_0x1f7d72||!!_0x2c3dd4&&_0x154fc4&&!_0x6099f3||_0xce505&&_0x154fc4&&!_0x6099f3),_0x205e2d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0xf44203,_0x2b00da,_0x442d55)=>{let _0x53e52b;return _0x53e52b=_0x442d55&&_0x2b00da?'Reply\x20to\x20reopen\x20discussion...':_0xf44203?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x53e52b);}),_0x205e2d['bind']('submitLabel')['to'](this,'length',_0x3fa44a=>N(this['locale'],_0x3fa44a?'Reply':'Comment')),_0x205e2d['on']('submit',(_0x902cb,_0x8be67f)=>{this['fire']('addComment',_0x8be67f),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x205e2d['on']('cancel',()=>{this['focus']();}),_0x205e2d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x205e2d['on']('cancel',_0x1f83d6=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1f83d6['stop']());}),this['on']('change:isActive',(_0x2e15fa,_0x40adae,_0x1125b9)=>{_0x1125b9||this['length']||_0x205e2d['value']||this['fire']('removeCommentThread');}),_0x7910d5;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x182a7b(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x35c9c9,target:_0xdba14b,type:_0x1afe13,isVisible:_0x64025e=!0x0}){super(),this['view']=_0x35c9c9,this['view']['element']||this['view']['render'](),this['_type']=_0x1afe13,this['_target']=_0xdba14b,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x359f73([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3e4bea,_0x583d28)=>{this['view']['focusTracker']['add'](_0x583d28);}),this['focusableElements']['on']('remove',(_0x5ef85d,_0x52abfc)=>{this['view']['focusTracker']['remove'](_0x52abfc);}),this['set']('isVisible',_0x64025e);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x39a72f=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x39a72f),_0x39a72f;}get['targetRect'](){const _0x19a688=this['target'];if(null===_0x19a688)return null;if(_0x19a688 instanceof _0x2791cb)return _0x19a688;const _0x12042d=_0x19a688['filter'](_0x1d7682=>function(_0x1d8c19){const _0x4c5f14=_0x1d8c19['offsetParent'];if(_0x4c5f14)return!0x0;const _0x2c02ec=_0x1d8c19['getClientRects']()['item'](0x0);return!!_0x2c02ec;}(_0x1d7682));return 0x0===_0x12042d['length']?null:new _0x2791cb(_0x12042d[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x2200d6){this['view']['isActive']=_0x2200d6,this['view']['mainView']['isActive']=_0x2200d6;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x272881){if(!(null===_0x272881||_0x272881 instanceof _0x2791cb||Array['isArray'](_0x272881)&&_0x272881['every'](_0xa51cf1=>fi(_0xa51cf1))))throw new _0x590e41('annotation-invalid-target',null,{'target':_0x272881});}['_getNormalizedTarget'](){const _0xc64651='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0xc64651)?[_0xc64651]:_0xc64651;}}function fi(_0x3fbf1d){return null!==_0x3fbf1d&&'object'==typeof _0x3fbf1d&&'nodeType'in _0x3fbf1d&&0x1===_0x3fbf1d['nodeType'];}class S extends _0x359f73{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x396682=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x3c3dac(),this['_focusTracker']['on']('change:isFocused',(_0x1358ce,_0x1cfb36,_0x38884c)=>{_0x38884c||this['fire']('blur');});for(const _0x16f87e of _0x396682)this['add'](_0x16f87e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x23735d){if(this['has'](_0x23735d))throw new _0x590e41('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x23735d['innerView'],_0x23735d),this['_viewToAnnotation']['set'](_0x23735d['view'],_0x23735d);for(const _0xbcedc3 of _0x23735d['focusableElements'])this['_focusTracker']['add'](_0xbcedc3);this['listenTo'](_0x23735d['focusableElements'],'add',(_0x16b1da,_0x1c981a)=>{this['_focusTracker']['add'](_0x1c981a);}),this['listenTo'](_0x23735d['focusableElements'],'remove',(_0x3512f7,_0x4a24be)=>{this['_focusTracker']['remove'](_0x4a24be);}),this['listenTo'](_0x23735d['view']['focusTracker'],'change:isFocused',(_0x2eb806,_0x29effc,_0x242ab2)=>{_0x242ab2&&this['fire']('focus',_0x23735d);}),_0x23735d['updateTargetRect']();const _0x42ae43=this['_getOrderInContent'](_0x23735d['view']['targetRect']);return super['add'](_0x23735d,_0x42ae43);}['remove'](_0x5f2114){if(!this['has'](_0x5f2114))throw new _0x590e41('annotationcollection-not-existing-item',null);this['stopListening'](_0x5f2114['view']['focusTracker']),this['stopListening'](_0x5f2114['focusableElements']);for(const _0x2d9b70 of _0x5f2114['focusableElements'])this['_focusTracker']['remove'](_0x2d9b70);return this['_viewToAnnotation']['delete'](_0x5f2114['view']),this['_innerViewToAnnotation']['delete'](_0x5f2114['innerView']),super['remove'](_0x5f2114);}['getByInnerView'](_0x371059){return this['_innerViewToAnnotation']['get'](_0x371059);}['getByView'](_0x103ffc){return this['_viewToAnnotation']['get'](_0x103ffc);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x17905e of this)_0x17905e['updateTargetRect']();this['_sort']();}['_sort'](){const _0x9cc272=Array['from'](this)['sort']((_0x454c57,_0x5eb4ab)=>w(_0x454c57['view']['targetRect'],_0x5eb4ab['view']['targetRect']));for(let _0x274a5f=_0x9cc272['length']-0x1;_0x274a5f>0x0;_0x274a5f--){const _0x4d11a9=_0x9cc272[_0x274a5f];_0x274a5f!==this['getIndex'](_0x4d11a9)&&(this['remove'](_0x4d11a9),this['add'](_0x4d11a9));}}['_getOrderInContent'](_0x50d808){let _0x574521=0x0;if(!_0x50d808)return this['length'];for(const _0x1a3950 of this){const _0x2a3386=_0x1a3950['view']['targetRect'];if(_0x2a3386){if(w(_0x50d808,_0x2a3386)<0x0)return _0x574521;_0x574521++;}}return _0x574521;}}function v({source:_0xf6929,target:_0x5a422f,filter:_0x3aaa57}){for(const _0x5643b5 of _0xf6929)_0x3aaa57(_0x5643b5)&&_0x5a422f['add'](_0x5643b5);_0x5a422f['listenTo'](_0xf6929,'add',(_0x34d881,_0x58b07c)=>{_0x3aaa57(_0x58b07c)&&_0x5a422f['add'](_0x58b07c);}),_0x5a422f['listenTo'](_0xf6929,'remove',(_0x452c59,_0x468cee)=>{_0x5a422f['has'](_0x468cee)&&_0x5a422f['remove'](_0x468cee);});}function w(_0x34299b,_0x124e8d){if(null===_0x34299b&&null===_0x124e8d)return 0x0;if(null===_0x34299b)return-0x1;if(null===_0x124e8d)return 0x1;const _0x5782b3=_0x34299b['top']-_0x124e8d['top'];return 0x0==_0x5782b3?_0x34299b['left']-_0x124e8d['left']:_0x5782b3;}class y extends _0x33445d{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x47f8ab){if(super(_0x47f8ab),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x47f8ab instanceof _0xa240b6){const _0x2b4bfb=_0x47f8ab['locale'];_0x47f8ab['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x2b4bfb,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x2b4bfb,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x2b4bfb,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x2b4bfb,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x2b4bfb,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x2b4bfb,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x2b4bfb,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x316361){this['collection']['add'](_0x316361);}['remove'](_0x431eed){this['collection']['remove'](_0x431eed),_0x431eed['destroy']();}['refreshVisibility'](){for(const _0x1ed63d of this['collection'])_0x1ed63d['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x590dbb){return this['collection']['getByInnerView'](_0x590dbb);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x92204a of this['collection'])_0x92204a['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x5dddaf){this['fire']('_activateAnnotation',_0x5dddaf);}['createAnnotation'](_0x5333db){return new T(_0x5333db);}['createAnnotationView'](_0x46924a,_0x579e50){return new E(_0x46924a,_0x579e50);}['_addActiveAnnotation'](_0x45836f){const _0x558791=new Set(this['activeAnnotations']);_0x558791['add'](_0x45836f),this['activeAnnotations']=_0x558791;}['_removeActiveAnnotation'](_0x384b34){const _0x10aff1=new Set(this['activeAnnotations']);_0x10aff1['delete'](_0x384b34),this['activeAnnotations']=_0x10aff1;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3e6bc2=this['collection'],_0xd2c561=this['_visibleAnnotations'];function _0x5030bf(_0x2c77d4){const _0x18a14d=_0x2c77d4['source'];_0x18a14d['isVisible']&&!_0xd2c561['has'](_0x18a14d)?_0xd2c561['add'](_0x18a14d):!_0x18a14d['isVisible']&&_0xd2c561['has'](_0x18a14d)&&_0xd2c561['remove'](_0x18a14d),_0x18a14d['view']['focusTracker']['remove'](_0x18a14d['view']['element']),_0x18a14d['view']['focusTracker']['add'](_0x18a14d['view']['element']);}this['listenTo'](_0x3e6bc2,'add',(_0x690fc9,_0x59b224)=>{_0x59b224['isVisible']&&_0xd2c561['add'](_0x59b224),this['listenTo'](_0x59b224,'change:isVisible',_0x5030bf);}),this['listenTo'](_0x3e6bc2,'remove',(_0x368deb,_0x2dcbfb)=>{_0xd2c561['has'](_0x2dcbfb)&&_0xd2c561['remove'](_0x2dcbfb),this['stopListening'](_0x2dcbfb,'change:isVisible',_0x5030bf);});}['_setupEnterAnnotationKeystroke'](){const _0x111b97=_0x22a156=>{_0x22a156['on']('ready',()=>{_0x22a156['keystrokes']['set'](_0x798bb8,(_0x1cefe6,_0x50b9de)=>{const _0x35ed8d=_0x599dc2(this['activeAnnotations']['values']());_0x35ed8d&&(_0x35ed8d['view']['focus'](),_0x50b9de());});});};this['context']instanceof _0xa240b6?_0x111b97(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x499dfc,_0x5da083)=>{_0x111b97(_0x5da083);});}['_setupEscapeAnnotationHandling'](){const _0x48d257=_0x2d0419=>{const _0x2388b6=_0x2d0419['source'],_0x11dcd8=[];let _0x3ad876;if(Array['isArray'](_0x2388b6['target'])){_0x3ad876=_0x2388b6['target'][0x0],this['context']instanceof _0xa240b6?_0x11dcd8['push'](this['context']):this['context']['editors']&&_0x11dcd8['push'](...this['context']['editors']);for(const _0x5f167d of _0x11dcd8)for(const _0x26fb36 of _0x5f167d['editing']['view']['domRoots']['values']())if(_0x26fb36['contains'](_0x3ad876))return void _0x5f167d['editing']['view']['focus']();_0x3ad876['focus']();}};this['listenTo'](this['collection'],'add',(_0x1503b5,_0x50d71e)=>{this['listenTo'](_0x50d71e,'escape',_0x48d257,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x10336b,_0x870450)=>{this['stopListening'](_0x870450,'escape',_0x48d257);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x33445d{['_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(_0x34cb70){super(_0x34cb70),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x58b947=this['context']['config'];_0x58b947['define']('comments.maxCommentsWhenCollapsed',0x2),_0x58b947['define']('comments.maxThreadTotalWeight',0x1f4),_0x58b947['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x58b947['define']('comments.CommentThreadView',vt),_0x58b947['define']('comments.CommentView',gt),_0x58b947['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x22b59f=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x42ad8a,_0x3df79a)=>this['_addCommentThread'](_0x3df79a)),this['on']('submitCommentThread',(_0x235b3d,_0x28df48)=>this['_submitCommentThread'](_0x28df48)),this['on']('resolveCommentThread',(_0x53edd7,_0x2a86d8)=>this['_resolveCommentThread'](_0x2a86d8)),this['on']('resolveCommentThread',(_0x523b7f,_0x5a0cdb)=>this['_updateActiveAnnotation'](_0x5a0cdb),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x4b9492,_0x408f06)=>this['_reopenCommentThread'](_0x408f06)),this['on']('reopenCommentThread',(_0x846bbd,_0x10161a)=>this['_updateActiveAnnotation'](_0x10161a),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x51e117,_0x184d21)=>this['_removeCommentThread'](_0x184d21)),this['on']('updateCommentThread',(_0x206f4c,_0x3a523b)=>this['_updateCommentThread'](_0x3a523b)),this['on']('updateCommentThread',(_0x2d9753,_0x32cd69)=>this['_updateActiveAnnotation'](_0x32cd69),{'priority':'lowest'}),this['on']('addComment',(_0x3263ce,_0x507d33)=>this['_addComment'](_0x507d33)),this['on']('updateComment',(_0x4cffd2,_0x5bef31)=>this['_updateComment'](_0x5bef31)),this['on']('removeComment',(_0x29af96,_0x107998)=>this['_removeComment'](_0x107998)),this['on']('addComment',(_0x4111aa,{threadId:_0x756dff,isFromAdapter:_0x3fed70})=>{if(_0x3fed70)return;const _0x134b0c=this['getCommentThread'](_0x756dff),_0x1ae8f1=_0x134b0c&&this['_threadToController']['get'](_0x134b0c);_0x1ae8f1&&_0x1ae8f1['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x22b59f,'change:activeAnnotations',(_0x17f647,_0x28732b,_0x34fef9)=>{const _0x3edda9=Array['from'](_0x34fef9)['map'](_0x1fbcb8=>this['_viewToController']['get'](_0x1fbcb8['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x3edda9?_0x3edda9['model']:null;});}set['adapter'](_0x3adf1f){if(this['_adapter'])throw new _0x590e41('commentsrepository-adapter-already-set');this['_adapter']=_0x3adf1f;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x46e73d=Tt,threadId:_0x456092=_0x146186(),comments:_0x471ad8=[],unlinkedAt:_0x1756ce=null,resolvedAt:_0x5d088d=null,resolvedBy:_0x43e4ab=null,target:_0x1fd232=null,context:_0x247bdd=null,attributes:_0x38387e={},isResolvable:_0x20bc79=!0x0,isSubmitted:_0x5d485b=!0x1,isFromAdapter:_0x4db282=!0x1}={}){return this['fire'](bt('addCommentThread',_0x46e73d),{'channelId':_0x46e73d,'threadId':_0x456092,'comments':_0x471ad8,'unlinkedAt':_0x1756ce,'resolvedAt':_0x5d088d,'resolvedBy':_0x43e4ab,'target':_0x1fd232,'context':_0x247bdd,'attributes':_0x38387e,'isFromAdapter':_0x4db282,'isResolvable':_0x20bc79,'isSubmitted':_0x5d485b}),this['getCommentThread'](_0x456092);}['openNewCommentThread']({channelId:_0x98ed59=Tt,threadId:_0x4612cb=_0x146186(),target:_0x2d3c9d,context:_0xaa1b2=null,isResolvable:_0x48852c=!0x0}){if(this['_readOnlyChannels']['has'](_0x98ed59)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2d3c9d)throw new _0x590e41('commentsrepository-missing-target');const _0x599947=this['addCommentThread']({'channelId':_0x98ed59,'threadId':_0x4612cb,'target':_0x2d3c9d,'context':_0xaa1b2,'isResolvable':_0x48852c});if(!_0x599947)return null;const _0x34bfe6=this['_threadToController']['get'](_0x599947),_0x26fd2d=_0x34bfe6['view']['commentThreadInputView']['commentInputView'],_0x421cd8=this['context']['plugins']['get'](y),_0x235a02=_0x421cd8['getByInnerView'](_0x34bfe6['view']);return _0x421cd8['activate'](_0x235a02),_0x26fd2d['once']('editorReady',()=>_0x26fd2d['focus']()),_0x599947;}['hasCommentThread'](_0x3aa7c2){if('string'!=typeof _0x3aa7c2)throw new _0x590e41('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3aa7c2);}['updateCommentThread']({channelId:_0x2d4508=Tt,threadId:_0x5b65cd,context:_0x5248d3,unlinkedAt:_0x3974bd,attributes:_0x3d800f,isFromAdapter:_0x5be02e=!0x1}){return this['fire'](bt('updateCommentThread',_0x2d4508),{'channelId':_0x2d4508,'threadId':_0x5b65cd,'context':_0x5248d3,'unlinkedAt':_0x3974bd,'attributes':_0x3d800f,'isFromAdapter':_0x5be02e}),this['getCommentThread'](_0x5b65cd);}['getCommentThread'](_0x22dcfa){if('string'!=typeof _0x22dcfa)throw new _0x590e41('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x22dcfa);}['fetchCommentThread']({channelId:_0x882dca,threadId:_0x31dcd0}={}){const _0x2c946e=this['getCommentThread'](_0x31dcd0);if(_0x2c946e)return Promise['resolve'](_0x2c946e);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x590e41('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x882dca,'threadId':_0x31dcd0})['then'](_0x1760ac=>this['hasCommentThread'](_0x31dcd0)?this['getCommentThread'](_0x31dcd0):_0x1760ac?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x882dca},_0x1760ac)):void 0x0)['catch'](_0x15a90a=>{throw console['error'](_0x15a90a),new _0x590e41('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x28f0ac,skipNotAttached:_0x517f21=!0x1,skipEmpty:_0x56457f=!0x1,toJSON:_0x2b92ea=!0x1}={}){const _0x37c001=[];for(const _0xd12cac of this['_threads']['values']())_0x28f0ac&&_0xd12cac['channelId']!==_0x28f0ac||_0x517f21&&!_0xd12cac['isAttached']||_0x56457f&&0x0===_0xd12cac['length']||_0x37c001['push'](_0xd12cac);return _0x2b92ea?_0x37c001['map'](_0x2da71e=>_0x2da71e['toJSON']()):_0x37c001;}['getAnnotationForCommentThread'](_0x4c8177){const _0x4867c8=this['_threadToController']['get'](_0x4c8177);if(!_0x4867c8)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x4867c8['view'])||null;}['getCommentThreadForAnnotation'](_0x5264d9){const _0x210e5a=this['_viewToController']['get'](_0x5264d9['innerView']);return _0x210e5a?_0x210e5a['model']:null;}['setActiveCommentThread'](_0x40a252){const _0x4eba9d=this['context']['plugins']['get'](y);if(!_0x40a252)return void(this['activeCommentThread']&&_0x4eba9d['deactivateAll']());const _0x57dd57=this['getCommentThread'](_0x40a252);if(!_0x57dd57)throw new _0x590e41('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x40a252});if(!this['_threadToController']['has'](_0x57dd57))throw new _0x590e41('commentsrepository-active-not-attached',null,{'threadId':_0x40a252});const _0x3f7972=_0x4eba9d['getByInnerView'](this['_threadToController']['get'](_0x57dd57)['view']);_0x4eba9d['activate'](_0x3f7972);}['switchReadOnly'](_0x6a9b00,_0x571305){_0x6a9b00?this['_readOnlyChannels']['add'](_0x571305):this['_readOnlyChannels']['delete'](_0x571305),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x21dcbd){return this['_readOnlyChannels']['has'](_0x21dcbd)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x2b73a0,_0x340a62){return new yt(_0x2b73a0,_0x340a62);}['setPermissions'](_0x41d078,_0x3c5098=Tt){this['_permissions']['set'](_0x3c5098,_0x41d078),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x428018=Tt){return this['_permissions']['has'](_0x428018)?this['_permissions']['get'](_0x428018):_t;}['_addCommentThread']({channelId:_0x316bcf,threadId:_0xa75e5e,comments:_0x3e31df,unlinkedAt:_0x2505d0,resolvedAt:_0x104fde,resolvedBy:_0x5b4b1e,target:_0x3b019d,context:_0x2490ae,attributes:_0x5ca556,isFromAdapter:_0x2a8af5,isResolvable:_0x34ccc6,isSubmitted:_0x18d1c9}){if('string'!=typeof _0xa75e5e)throw new _0x590e41('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xa75e5e});if(this['hasCommentThread'](_0xa75e5e))throw new _0x590e41('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0xa75e5e});const _0x39cab4=new pi(this,{'channelId':_0x316bcf,'id':_0xa75e5e,'context':_0x2490ae,'attributes':_0x5ca556,'unlinkedAt':_0x2505d0,'resolvedAt':_0x104fde,'resolvedBy':_0x5b4b1e?this['context']['plugins']['get'](it)['getUser'](_0x5b4b1e):null,'isResolvable':_0x34ccc6,'isSubmitted':_0x18d1c9||_0x2a8af5});this['_threads']['set'](_0xa75e5e,_0x39cab4);for(const _0xc4ca9d of _0x3e31df)_0x39cab4['_add'](this['_createNewComment']({'threadId':_0xa75e5e,..._0xc4ca9d}));return _0x3b019d&&_0x39cab4['attachTo'](_0x3b019d),_0x2a8af5||!_0x39cab4['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x316bcf,'threadId':_0xa75e5e});}['_submitCommentThread']({channelId:_0x157215,threadId:_0x43e7d1}){if(!this['hasCommentThread'](_0x43e7d1))throw new _0x590e41('commentsrepository-missing-comment-thread',this);const _0x4b3caf=this['getCommentThread'](_0x43e7d1);if(_0x4b3caf['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x12501d,comments:_0x605f37,resolvedAt:_0x138f80,resolvedBy:_0x4d6189,context:_0x476b1c,attributes:_0x4b0fc8}=_0x4b3caf,_0x297ce0=this['context']['plugins']['get']('PendingActions'),_0x3e7361=_0x297ce0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x157215,'threadId':_0x12501d,'comments':_0x605f37['map'](_0x1cf7f4=>_0x1cf7f4['toJSON']()),'resolvedAt':_0x138f80,'resolvedBy':_0x4d6189?_0x4d6189['id']:_0x4d6189,'context':_0x476b1c,'attributes':_0x4b0fc8})['then'](({comments:_0x22d7d0})=>{_0x297ce0['remove'](_0x3e7361);for(const _0x33c198 of _0x22d7d0)this['_updateComment']({'channelId':_0x157215,'threadId':_0x43e7d1,'commentId':_0x33c198['commentId'],'createdAt':_0x33c198['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x56e6cf=>{throw console['error'](_0x56e6cf),new _0x590e41('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x56e531,target:_0x5efc3b}){const _0x16846d=this['getCommentThread'](_0x56e531);if(!_0x16846d)throw new _0x590e41('commentsrepository-attach-missing-comment-thread',this);const _0x4c4d84=this['context']['plugins']['get']('PendingActions'),_0x297c70=this['context']['plugins']['get'](y),_0xf12e35=this['_createCommentThreadView'](_0x16846d),_0x31a463=new yt(_0x16846d,_0xf12e35);let _0x2a21ef=null;_0xf12e35['on']('change:isDirty',(_0x4f25d7,_0x3459d5,_0x361631)=>{_0x361631?_0x2a21ef=_0x4c4d84['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2a21ef&&(_0x4c4d84['remove'](_0x2a21ef),_0x2a21ef=null);}),this['_threadToController']['set'](_0x16846d,_0x31a463),this['_viewToController']['set'](_0xf12e35,_0x31a463);const _0x545309=new E(this['context']['locale'],_0xf12e35);_0x545309['bind']('length')['to'](_0xf12e35),_0x545309['bind']('isDirty')['to'](_0xf12e35,'isDirty',_0xf12e35,'length',(_0x197d92,_0x5c20fc)=>_0x197d92||!_0x5c20fc),_0x545309['bind']('isActive')['to'](_0xf12e35),_0x545309['type']='comment';const _0x13c586=new T({'view':_0x545309,'target':_0x5efc3b,'type':'comment','isVisible':!_0x16846d['archivedAt']});return _0xf12e35['on']('escape',()=>{_0x13c586['fire']('escape');}),this['_bindAnnotationToEditors'](_0xf12e35,_0x13c586),_0x297c70['add'](_0x13c586),_0x13c586;}['_bindAnnotationToEditors'](_0x22b0f4,_0x334a29){this['listenTo'](_0x22b0f4,'editorReady',(_0x303038,_0x53ede7)=>{const _0xc14c80=_0x53ede7['ui']['view']['body']['bodyCollectionContainer'];_0x334a29['focusableElements']['add'](_0xc14c80),this['context']instanceof _0xa240b6&&this['context']['ui']['focusTracker']['add'](_0xc14c80);},{'priority':'highest'}),this['listenTo'](_0x22b0f4,'editorDestroyed',(_0x587af0,_0x11a86c)=>{const _0x5b3396=_0x11a86c['ui']['view']['body']['bodyCollectionContainer'];_0x334a29['focusableElements']['has'](_0x5b3396)&&_0x334a29['focusableElements']['remove'](_0x5b3396),this['context']instanceof _0xa240b6&&this['context']['ui']['focusTracker']['remove'](_0x5b3396);});}['_unbindEditors'](_0x5f36de){this['stopListening'](_0x5f36de,'editorReady'),this['stopListening'](_0x5f36de,'editorDestroyed');}['_createCommentThreadView'](_0x26896d){const _0x41b6cc=this['context']['plugins']['get'](it),{config:_0x45c4d9,locale:_0x4338f6}=this['context'],_0x4baae3=lt(_0x45c4d9['get']('locale'),_0x4338f6);return new(0x0,(_0x45c4d9['get']('comments'))['CommentThreadView'])(_0x4338f6,_0x26896d,_0x41b6cc['me'],{'editorConfig':{..._0x45c4d9['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x45c4d9['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x45c4d9['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x45c4d9['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x45c4d9['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x4baae3,'CommentView':_0x45c4d9['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3fe1ca,channelId:_0x43259b,resolvedAt:_0x19c2a7,resolvedBy:_0x50f64e,isFromAdapter:_0x5811e4}){if(!this['hasCommentThread'](_0x3fe1ca))throw new _0x590e41('commentsrepository-missing-comment-thread',null,{'threadId':_0x3fe1ca});const _0x551acb=this['getCommentThread'](_0x3fe1ca);if(_0x551acb['isResolved'])throw new _0x590e41('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3fe1ca});const _0x2e1435=this['context']['plugins']['get'](it);if(_0x551acb['resolvedBy']=_0x2e1435['getUser'](_0x50f64e),_0x551acb['resolvedAt']=_0x19c2a7,_0x5811e4||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x6ae400=this['context']['plugins']['get']('PendingActions'),_0x1fe8c8=_0x6ae400['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x43259b,'threadId':_0x3fe1ca})['then'](({resolvedAt:_0x31d2c3,resolvedBy:_0x4a4112})=>{_0x6ae400['remove'](_0x1fe8c8),_0x551acb['resolvedBy']['id']!==_0x4a4112&&(_0x551acb['resolvedBy']=_0x2e1435['getUser'](_0x4a4112)),_0x551acb['resolvedAt']=_0x31d2c3;})['catch'](_0x394ece=>{throw console['error'](_0x394ece),new _0x590e41('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x42c456,channelId:_0x4a670b,isFromAdapter:_0x1a0651}){if(!this['hasCommentThread'](_0x42c456))throw new _0x590e41('commentsrepository-missing-comment-thread',null,{'threadId':_0x42c456});const _0x1ba347=this['getCommentThread'](_0x42c456);if(!_0x1ba347['isResolved'])throw new _0x590e41('commentsrepository-reopen-comment-thread',null,{'threadId':_0x42c456});if(_0x1ba347['resolvedBy']=null,_0x1ba347['resolvedAt']=null,_0x1a0651||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2d7118=this['context']['plugins']['get']('PendingActions'),_0x9af747=_0x2d7118['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x4a670b,'threadId':_0x42c456})['then'](()=>_0x2d7118['remove'](_0x9af747))['catch'](_0x419b36=>{throw console['error'](_0x419b36),new _0x590e41('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x422e1c,isFromAdapter:_0x33d1ec}){const _0x5b937a=this['getCommentThread'](_0x422e1c);if(!_0x5b937a)throw new _0x590e41('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x422e1c),this['_threads']['delete'](_0x422e1c),!_0x5b937a['isSubmitted']||_0x33d1ec||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3b5594=this['context']['plugins']['get']('PendingActions'),{channelId:_0x56705c}=_0x5b937a,_0x5f2111=_0x3b5594['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x56705c,'threadId':_0x422e1c})['then'](()=>_0x3b5594['remove'](_0x5f2111))['catch'](_0x305f8d=>{throw console['error'](_0x305f8d),new _0x590e41('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x77318c,unlinkedAt:_0x17301a,context:_0x1dd373,attributes:_0x23e10b,isFromAdapter:_0x4e75ec}){if('string'!=typeof _0x77318c)throw new _0x590e41('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x77318c});if(!this['hasCommentThread'](_0x77318c))throw new _0x590e41('commentsrepository-missing-comment-thread',null,{'threadId':_0x77318c});const _0x105410=this['getCommentThread'](_0x77318c);let _0x2cd7fa=!0x1;if(void 0x0!==_0x1dd373&&_0x105410['context']!==_0x1dd373&&(_0x105410['context']=_0x1dd373,_0x2cd7fa=!0x0),void 0x0!==_0x17301a&&_0x105410['unlinkedAt']!==_0x17301a&&(_0x105410['unlinkedAt']=_0x17301a,_0x2cd7fa=!0x0),_0x23e10b&&!wt(_0x23e10b,_0x105410['attributes'])&&(_0x105410['attributes']=_0x23e10b,_0x2cd7fa=!0x0),!_0x2cd7fa)return Promise['resolve']();if(!_0x105410['isSubmitted']||_0x4e75ec||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xd55e5a=this['context']['plugins']['get']('PendingActions'),{channelId:_0x485e60}=_0x105410,_0x3e0141=_0xd55e5a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x485e60,'threadId':_0x77318c,'context':_0x1dd373,'unlinkedAt':_0x17301a,'attributes':_0x23e10b})['then'](()=>_0xd55e5a['remove'](_0x3e0141))['catch'](_0x47c132=>{throw console['error'](_0x47c132),new _0x590e41('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x557a57){const _0x2b2989=this['context']['plugins']['get'](y),_0x55a2e8=this['getCommentThread'](_0x557a57);if(_0x55a2e8['_isAttached']=!0x1,this['_threadToController']['has'](_0x55a2e8)){const _0x1b376a=this['_threadToController']['get'](_0x55a2e8),_0x57f4c1=_0x1b376a['view'],_0x5eda58=_0x2b2989['getByInnerView'](_0x57f4c1);this['_threadToController']['delete'](_0x55a2e8),this['_viewToController']['delete'](_0x57f4c1),_0x5eda58&&_0x2b2989['remove'](_0x5eda58),_0x1b376a['destroy'](),_0x57f4c1['destroy']()['then'](()=>{this['_unbindEditors'](_0x57f4c1);});}}['_updateActiveAnnotation']({threadId:_0x5a63db,resolvedAt:_0x158a1f,unlinkedAt:_0x1d7cb7}){const _0x247063=!!_0x158a1f,_0x303042=this['context']['plugins']['get'](y),_0x4c30bb=this['getCommentThread'](_0x5a63db);if(this['_threadToController']['has'](_0x4c30bb)){const _0x46db62=this['_threadToController']['get'](_0x4c30bb)['view'],_0x37efb7=_0x303042['getByInnerView'](_0x46db62);_0x37efb7&&(_0x247063&&_0x303042['_removeActiveAnnotation'](_0x37efb7),_0x1d7cb7?_0x37efb7['isVisible']=!0x1:_0x37efb7['refreshVisibility']());}}['_getExternalAuthor'](_0xd2696a){const _0x2ff688=this['context']['plugins']['get'](it),_0x2674ba=pt('external:'+_0xd2696a),_0x49595f=_0x2ff688['getUser'](_0x2674ba);return _0x49595f||_0x2ff688['addUser']({'id':_0x2674ba,'name':_0xd2696a});}['_createNewComment']({threadId:_0x57bff7,commentId:_0x45f166=_0x146186(),content:_0x573cf1,authorId:_0x284a01,createdAt:_0x56e1c2,attributes:_0x1e55f8}){if('string'!=typeof _0x45f166)throw new _0x590e41('commentsrepository-invalid-commentid');if('string'!=typeof _0x284a01)throw new _0x590e41('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x573cf1||!_0x573cf1['trim']())throw new _0x590e41('commentsrepository-invalid-comment-content');const _0x3d35c6=this['context']['plugins']['get'](it)['getUser'](_0x284a01);if(!_0x3d35c6)throw new _0x590e41('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x284a01});let _0x6714bb=null,_0x51d6ea=_0x56e1c2;return _0x1e55f8?.['@external']&&(_0x6714bb=this['_getExternalAuthor'](_0x1e55f8['@external']['authorName']),_0x51d6ea=new Date(_0x1e55f8['@external']['createdAt'])),new wi(this,{'threadId':_0x57bff7,'id':_0x45f166,'author':_0x6714bb||_0x3d35c6,'creator':_0x3d35c6,'content':_0x573cf1,'createdAt':_0x56e1c2,'authoredAt':_0x51d6ea,'attributes':_0x1e55f8});}['_addComment'](_0x59ca97){let {threadId:_0x46454f,content:_0x21b273,attributes:_0x4e85e5,isFromAdapter:_0x16d314}=_0x59ca97;const _0x4e549f=this['getCommentThread'](_0x59ca97['threadId']);if(!_0x4e549f)throw new _0x590e41('commentsrepository-add-comment-to-missing-comment-thread',this);const _0xb14244=this['_createNewComment'](_0x59ca97),{id:_0x52103b}=_0xb14244;if(_0x4e549f['_add'](_0xb14244),_0x16d314||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x4e549f['isSubmitted'])return Promise['resolve']();const _0x23f783=this['context']['plugins']['get']('PendingActions'),{channelId:_0x30088a}=_0x4e549f,_0x2334b5=_0x23f783['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x4e85e5||(_0x4e85e5={}),this['adapter']['addComment']({'channelId':_0x30088a,'threadId':_0x46454f,'commentId':_0x52103b,'content':_0x21b273,'attributes':_0x4e85e5})['then'](_0x2a76d5=>{_0x23f783['remove'](_0x2334b5),_0x2a76d5&&this['_updateComment']({'channelId':_0x30088a,'threadId':_0x46454f,'commentId':_0x52103b,'createdAt':_0x2a76d5['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x436225=>{throw console['error'](_0x436225),new _0x590e41('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x39dcb9,commentId:_0x330d8c,content:_0x24aad3,createdAt:_0x3fc1b1,attributes:_0x414edd,isFromAdapter:_0x2f9fb6}){if(void 0x0!==_0x24aad3&&('string'!=typeof _0x24aad3||!_0x24aad3['trim']()['length']))throw new _0x590e41('commentsrepository-update-comment-invalid-content');const _0x1894d2=this['getCommentThread'](_0x39dcb9),_0x4335bf=_0x1894d2['getComment'](_0x330d8c);if(!_0x4335bf)throw new _0x590e41('commentsrepository-update-missing-comment',this);let _0x5062df=!0x1;if(_0x24aad3&&_0x24aad3!==_0x4335bf['content']&&(_0x4335bf['isEditable']||_0x2f9fb6)&&(_0x4335bf['content']=_0x24aad3,_0x5062df=!0x0),_0x3fc1b1&&_0x3fc1b1!==_0x4335bf['createdAt']&&(_0x4335bf['createdAt']=_0x3fc1b1,_0x4335bf['attributes']&&_0x4335bf['attributes']['@external']||(_0x4335bf['authoredAt']=_0x3fc1b1),_0x5062df=!0x0),_0x414edd&&!wt(_0x414edd,_0x4335bf['attributes'])&&(_0x4335bf['attributes']=_0x414edd,_0x5062df=!0x0),!_0x5062df)return Promise['resolve']();if(_0x1894d2['fire']('commentUpdated'),_0x2f9fb6||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x2a7baa=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3dbc9a}=this['getCommentThread'](_0x4335bf['threadId']),_0x4be8c0=_0x2a7baa['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x3dbc9a,'threadId':_0x39dcb9,'commentId':_0x330d8c,'content':_0x24aad3,'attributes':_0x414edd})['then'](()=>_0x2a7baa['remove'](_0x4be8c0))['catch'](_0x3319bb=>{throw console['error'](_0x3319bb),new _0x590e41('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x18c201,commentId:_0x382b4e,isFromAdapter:_0x398840}){const _0x3ff35d=this['getCommentThread'](_0x18c201),_0x11f0ef=_0x3ff35d['getComment'](_0x382b4e);if(!_0x11f0ef)throw new _0x590e41('commentsrepository-remove-missing-comment',this);if(_0x3ff35d['_remove'](_0x11f0ef),_0x398840||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x33032=this['context']['plugins']['get']('PendingActions'),{channelId:_0x442aed}=_0x3ff35d,_0x45244e=_0x33032['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x442aed,'threadId':_0x18c201,'commentId':_0x382b4e})['then'](()=>_0x33032['remove'](_0x45244e))['catch'](_0x480f2c=>{throw console['error'](_0x480f2c),new _0x590e41('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x182a7b(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x10a10b,_0x297805){super();const _0x37e96e=_0x10a10b['context']['plugins']['get'](it)['me'],_0x315ad7=_0x10a10b['getCommentThread'](_0x297805['threadId']),_0x28bef4=0x0===_0x315ad7['comments']['length'],_0xb2962=_0x37e96e===_0x297805['author'];this['id']=_0x297805['id'],this['threadId']=_0x297805['threadId'],this['author']=_0x297805['author'],this['creator']=_0x297805['creator'],this['isExternal']=Boolean(_0x297805['attributes']&&_0x297805['attributes']['@external']),this['set']('content',_0x297805['content']),this['createdAt']=_0x297805['createdAt']||new Date(),this['set']('authoredAt',_0x297805['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x315ad7,'resolvedAt'),this['set']('attributes',_0x297805['attributes']||{}),this['bind']('isEditable')['to'](_0x10a10b,'_permissions',()=>{const _0x17e7c1=_0x10a10b['getPermissions'](_0x315ad7['channelId'])['write'],_0x116234=_0x10a10b['getPermissions'](_0x315ad7['channelId'])['modifyAll'];return _0xb2962&&_0x17e7c1||!_0xb2962&&_0x116234;}),this['bind']('isRemovable')['to'](_0x315ad7,'isRemovable',_0x10a10b,'_permissions',_0x220448=>{const _0xa23d13=_0x10a10b['getPermissions'](_0x315ad7['channelId'])['write'],_0x4609b7=_0x10a10b['getPermissions'](_0x315ad7['channelId'])['modifyAll'];return _0xb2962&&_0xa23d13||_0x220448&&_0x28bef4||!_0xb2962&&_0x4609b7&&!_0x28bef4;}),this['bind']('isReadOnly')['to'](_0x315ad7,'isReadOnly'),this['_repository']=_0x10a10b;}get['weight'](){return Math['max'](function(_0xfcf085){const _0x44ebe6=document['createElement']('div');return _0x44ebe6['innerHTML']=_0xfcf085,_0x44ebe6['textContent']['length'];}(this['content']),0xc8);}['update'](_0xcb0274){const {threadId:_0x130a29,id:_0x8b61a6}=this;if(!this['_repository']['hasCommentThread'](_0x130a29))throw new _0x590e41('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x9db085}=this['_repository']['getCommentThread'](_0x130a29);this['_repository']['fire'](bt('updateComment',_0x9db085,_0x130a29),{'channelId':_0x9db085,'threadId':_0x130a29,'commentId':_0x8b61a6,..._0xcb0274});}['setAttribute'](_0x248eb4,_0x4480d2){const _0x5aad65=It(this['attributes']);At(_0x5aad65,_0x248eb4,_0x4480d2),this['update']({'attributes':_0x5aad65});}['removeAttribute'](_0x31bf6e){const _0x7430cc=It(this['attributes']);Ct(_0x7430cc,_0x31bf6e),this['update']({'attributes':_0x7430cc});}['remove'](_0x17bbb4={}){if(!_0x17bbb4['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x140ed7,id:_0x1c1961}=this;if(!this['_repository']['hasCommentThread'](_0x140ed7))throw new _0x590e41('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x3f10c2}=this['_repository']['getCommentThread'](_0x140ed7);this['_repository']['fire'](bt('removeComment',_0x3f10c2,_0x140ed7),{'channelId':_0x3f10c2,'threadId':_0x140ed7,'commentId':_0x1c1961,..._0x17bbb4});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x510eff,..._0x3a8531){for(const _0xceb31d of _0x3a8531)void 0x0!==_0xceb31d&&(_0x510eff+=':'+String(_0xceb31d));return _0x510eff;}class rt extends _0x8d9745{constructor(_0x1edfa8){super(_0x1edfa8),this['set']('hasContent',!0x1);}['refresh'](){const _0x4bc3e2=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x31e4b7 of _0x4bc3e2['getRanges']())if(this['_hasContent'](_0x31e4b7))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x3d3b8c=_0x146186(),ranges:_0x1ee965,comment:_0x2ad361}={}){const _0x4dab52=this['editor']['model'],_0x19e5f6=_0x1ee965??Array['from'](_0x4dab52['document']['selection']['getRanges']()),_0x60d50d=[];for(const _0x43e1f2 of _0x19e5f6)this['_hasContent'](_0x43e1f2)&&_0x60d50d['push'](this['_trimToContent'](_0x43e1f2));if(!_0x60d50d['length'])throw new _0x590e41('addcommentthreadcommand-incorrect-ranges',null);_0x2ad361&&this['_createCommentThread'](_0x3d3b8c,_0x2ad361),this['_createMarkersFromRanges'](_0x3d3b8c,_0x60d50d,!!_0x2ad361);}['_createMarkersFromRanges'](_0x2620b8,_0x4e0826,_0x3366ce){this['editor']['model']['change'](_0x174c89=>{for(const _0x49d472 of _0x4e0826){const _0xf48760=_0x146186()['substr'](0x1,0x5),_0x341de7='comment:'+_0x2620b8+':'+_0xf48760;_0x174c89['addMarker'](_0x341de7,{'range':_0x49d472,'usingOperation':_0x3366ce,'affectsData':_0x3366ce});}});}['_createCommentThread'](_0x39a153,_0x99d83d){const _0x220107=this['editor']['plugins']['get']('CommentsRepository'),_0x355fad=this['editor']['config']['get']('collaboration.channelId'),_0x39b2cf=this['editor']['plugins']['get']('Users')['me'];if(!_0x39b2cf)throw new _0x590e41('addcommentthreadcommand-user-not-found',null);_0x220107['addCommentThread']({'threadId':_0x39a153,'channelId':_0x355fad,'comments':[{'authorId':_0x39b2cf['id'],'content':_0x99d83d,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x5cef56){for(const _0x2f6d06 of _0x5cef56['getItems']())if(this['_itemIsContent'](_0x2f6d06))return!0x0;return!0x1;}['_itemIsContent'](_0x4f678a){return _0x4f678a['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4f678a)&&!_0x4f678a['is']('element','tableCell');}['_trimToContent'](_0x1bdd13){const _0x1c89a4=_0x359468=>!this['_itemIsContent'](_0x359468['item']),_0x4cc97f=_0x1bdd13['start']['getLastMatchingPosition'](_0x1c89a4),_0x426614=_0x1bdd13['end']['getLastMatchingPosition'](_0x1c89a4,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4cc97f,_0x426614);}}class b extends _0x5b353c{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x40b688){super(_0x40b688),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4d873c=this['editor'],_0x578456=_0x4d873c['model']['document']['selection'],_0x23bdfd=_0x3c6eac(()=>this['refreshSelectedViews'](),0xa);_0x578456['on']('change:range',(_0x2713fc,_0x1e4f06)=>{_0x1e4f06['directChange']&&(_0x23bdfd['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4d873c['editing']['view']['document'],'change:isFocused',(_0x5afef4,_0x3d17b0,_0x5de1d5)=>{_0x5de1d5&&_0x23bdfd();}),this['listenTo'](_0x4d873c['ui']['focusTracker'],'change:isFocused',(_0x13bd1c,_0x1ff7ef,_0x3b95ef)=>{_0x3b95ef||_0x4d873c['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x4632d7=>this['_editorAnnotationsData']['has'](_0x4632d7['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x5f51b2){if(this['_editorAnnotations']['has'](_0x5f51b2['view']))return;this['_editorAnnotations']['add'](_0x5f51b2['view']),this['editor']['ui']['focusTracker']['add'](_0x5f51b2['view']['element']);const _0x301776=this['editor']['plugins']['get'](y);this['listenTo'](_0x301776['collection'],'remove',(_0x2e46f0,_0x4e7567)=>{this['editor']['ui']['focusTracker']['remove'](_0x4e7567['view']['element']),this['_editorAnnotations']['delete'](_0x4e7567['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x332036){if('function'!=typeof _0x332036)throw new _0x590e41('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x332036);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2f4211,annotations:_0x434e31}){const _0xf3b128=[],_0x522b42=this['editor']['model']['document']['selection'],_0x38fc05=Array['from'](_0x522b42['getRanges']());for(const [_0x444484,_0x36c645]of this['_editorAnnotationsData']){const _0x789841=_0x64e9f9(_0x36c645),_0x531762=_0x434e31['getByInnerView'](_0x444484);_0x789841&&_0x531762&&_0xf3b128['push']({'annotation':_0x531762,'range':_0x789841});}function _0x64e9f9(_0x5ab85b){for(const _0x2627e6 of _0x5ab85b)for(const _0x4d5bac of _0x38fc05)if(_0x2627e6['containsRange'](_0x4d5bac,!_0x522b42['isCollapsed']))return _0x2627e6;return null;}return _0xf3b128['sort']((_0x3aa43a,_0x51b0f4)=>{const _0x40e6a2=_0x3aa43a['range'],_0x40bfea=_0x51b0f4['range'];if(!_0x40e6a2['isEqual'](_0x40bfea)){if(_0x40e6a2['containsRange'](_0x40bfea,!0x0))return 0x1;if(_0x40bfea['containsRange'](_0x40e6a2,!0x0))return-0x1;}return _0x3aa43a['annotation']==_0x2f4211?-0x1:_0x51b0f4['annotation']==_0x2f4211?0x1:0x0;})['map'](_0x51908a=>_0x51908a['annotation']);}get['_editorAnnotationsData'](){const _0x5dc042=new Map();for(const _0x5460c3 of Array['from'](this['_dataCollectors']))for(const [_0x73d5f9,_0x480953]of _0x5460c3())_0x5dc042['set'](_0x73d5f9,_0x480953);return _0x5dc042;}}class st extends _0x5b353c{['afterInit'](){const _0x126f5c=this['editor'];if(!_0x126f5c['plugins']['has']('RestrictedEditingModeEditing'))return;_0x126f5c['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x5b353c{constructor(_0xcea2fd){super(_0xcea2fd),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2aa1a7=this['editor'],_0x578791=_0x2aa1a7['commands']['get']('importWord'),_0x3d250d=_0x2aa1a7['plugins']['get'](it);_0x578791&&(_0x578791['on']('execute',(_0x4387f3,[,_0x4ea496])=>{_0x4ea496['collaboration_features']={'comments':!0x0,'user_id':_0x3d250d['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x578791,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xebd1a4,_0xc4efdb){const {comment_threads:_0x2ef55a}=_0xc4efdb;_0x2ef55a&&_0x2ef55a['forEach'](({thread_id:_0x48c8e8,comments:_0x176928,is_resolved:_0x4db383})=>{const _0x2824c5=new Date(),_0x5ac805=_0x176928['map'](({author:_0x56475f,content:_0x1145f5,created_at:_0x4a74bf})=>({'content':_0x1145f5,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x2824c5,'attributes':{'@external':{'authorName':_0x56475f,'createdAt':_0x4a74bf?new Date(_0x4a74bf):new Date(),'source':'importWord'}}})),_0x3a3921=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3a3921,'threadId':_0x48c8e8,'comments':_0x5ac805,'resolvedAt':_0x4db383?_0x2824c5:null});});}}class at extends _0x5b353c{constructor(_0x5e4fa7){super(_0x5e4fa7),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x45ef54=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x45ef54,'contentInsertion',(_0x356887,_0x5acafe)=>this['_removeMarkersWithoutThreads'](_0x5acafe['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x3363de){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x3363de;const _0x2d14f9=this['editor']['plugins']['get']('CommentsRepository');for(const _0x5925c5 of _0x3363de['keys']()){const [_0x3744fa,_0x3eed72]=_0x5925c5['split'](':');'comment'!=_0x3744fa||_0x2d14f9['hasCommentThread'](_0x3eed72)||_0x3363de['delete'](_0x5925c5);}return _0x3363de;}['_registerMarkerInClipboardPipeline'](){const _0x5f47f2=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2f4888=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2f4888&&_0x5f47f2['_registerMarkerToCopy']('comment',_0x2f4888);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1c4806){switch(_0x1c4806){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 _0x5b353c{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x17f544,_0x3c7b46)=>{if(!_0x3c7b46['options']['showCommentHighlights'])return null;if(_0x3c7b46['options']['ignoreResolvedComments']){const {id:_0x52205f}=er(_0x17f544['markerName']),_0x35aa59=this['editor']['plugins']['get'](o);if(_0x35aa59['getCommentThread'](_0x52205f)?.['isResolved']&&_0x17f544['item'])return _0x3c7b46['consumable']['consume'](_0x17f544['item'],'addMarker:'+_0x17f544['markerName']),_0x3c7b46['consumable']['consume'](_0x17f544['item'],'removeMarker:'+_0x17f544['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0xbd2195=>{_0xbd2195['on']('addMarker:comment',(_0x253822,_0x5186aa,_0x69c3e1)=>{if(!_0x69c3e1['options']['showCommentHighlights'])return;const _0x392449=_0x5186aa['item'];if(!_0x392449)return;const _0xd5044d=_0x69c3e1['mapper']['toViewElement'](_0x392449);this['editor']['model']['schema']['isObject'](_0x392449)&&_0xd5044d&&!_0xd5044d['getCustomProperty']('widget')&&_0xd5044d['is']('containerElement')&&_0x591aef(_0xd5044d,_0x69c3e1['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x250518,{writer:_0x35f89a,options:_0x5edb87})=>{if(!_0x5edb87['showCommentHighlights'])return null;const _0x416ab1=_0x35f89a['createContainerElement']('div'),_0x1af3f8=_0x35f89a['createEmptyElement']('hr');return _0x35f89a['addClass']('ck-horizontal-line',_0x416ab1),_0x35f89a['insert'](_0x35f89a['createPositionAt'](_0x416ab1,0x0),_0x1af3f8),_0x416ab1;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0xf0d400,{writer:_0x42bc13,options:_0x570381})=>{if(!_0x570381['showCommentHighlights'])return null;const _0x3cf1a5=_0x42bc13['createContainerElement']('span'),_0xf6cd7a=_0x42bc13['createEmptyElement']('img');return _0x42bc13['addClass']('image-inline',_0x3cf1a5),_0x42bc13['insert'](_0x42bc13['createPositionAt'](_0x3cf1a5,0x0),_0xf6cd7a),_0x3cf1a5;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x15fda5,{writer:_0x35c3e5,options:_0x5a8729})=>{if(_0x5a8729['showCommentHighlights'])return _0x35c3e5['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x664034,_0x4cd97d,_0x1eabdb)=>{_0x1eabdb['options']['showCommentHighlights']&&_0x664034['stop']();},{'priority':'high'});}}class r extends _0x5b353c{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(_0x311810){super(_0x311810),this['set']('isThreadsLoadingPaused',!0x0),_0x311810['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x1751da,_0x225840,_0x4e88bd,_0x54f2bc)=>{const _0x2d8a1e=_0x311810['plugins']['get'](o),_0x5310a3=_0x4e88bd?er(_0x4e88bd)['id']:null;_0x311810['model']['change'](()=>{if(_0x5310a3){const _0x260cc9=this['getAllMarkersForId'](_0x5310a3);for(const _0x330e21 of _0x260cc9)_0x311810['editing']['reconvertMarker'](_0x330e21);}if(_0x54f2bc){const {id:_0x4a9033}=er(_0x54f2bc),_0x2e104a=_0x2d8a1e['getCommentThread'](_0x4a9033);if(_0x2e104a&&_0x2e104a['unlinkedAt'])return;if(_0x2e104a&&!_0x2e104a['isAttached'])return;const _0x2c54cc=this['getAllMarkersForId'](_0x4a9033);for(const _0x39c7f7 of _0x2c54cc)_0x311810['editing']['reconvertMarker'](_0x39c7f7);}}),_0x5310a3&&this['scrollToThreadMarker'](_0x5310a3);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x23a603=this['editor'],_0x15256b=_0x23a603['plugins']['get'](o),_0x1ac573=_0x23a603['config']['get']('collaboration.channelId'),_0x45f689=_0x15256b['getCommentThreads']()['filter'](_0x110690=>_0x110690['channelId']!==_0x1ac573);_0x23a603['commands']['add']('addCommentThread',new rt(_0x23a603)),this['listenTo'](_0x23a603,'change:isReadOnly',(_0x2d7e73,_0x48783f,_0xb19afe)=>{_0x15256b['switchReadOnly'](_0xb19afe,_0x23a603['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x15256b,ft('addCommentThread',_0x1ac573),(_0x503171,{threadId:_0x3a0751})=>{const _0x569df4=this['editor']['plugins']['get'](o)['getCommentThread'](_0x3a0751);_0x569df4?.['unlinkedAt']&&this['_attachArchivedThread'](_0x3a0751);}),this['listenTo'](_0x15256b,ft('removeCommentThread',_0x1ac573),(_0x3f6ae0,{threadId:_0x54b623})=>{_0x23a603['model']['enqueueChange']({'isUndoable':!0x1},_0x6b79de=>{const _0x2c8a89=this['getAllMarkersForId'](_0x54b623);for(const _0x34aeea of _0x2c8a89)_0x6b79de['removeMarker'](_0x34aeea);});}),this['listenTo'](_0x15256b,ft('resolveCommentThread',_0x1ac573),(_0xb477ea,{threadId:_0x24be85})=>{(this['_reconvertMarkers'](_0x24be85),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x24be85)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x15256b,ft('reopenCommentThread',_0x1ac573),(_0x356c39,{threadId:_0x24ea11})=>{this['_reconvertMarkers'](_0x24ea11);},{'priority':'low'}),this['listenTo'](_0x15256b,ft('addComment',_0x1ac573),(_0x1f0547,{threadId:_0x50c433,isFromAdapter:_0x20f2fb})=>{const _0x28481f=this['getAllMarkersForId'](_0x50c433);if(_0x20f2fb||0x0==_0x28481f['length']||!_0x15256b['hasCommentThread'](_0x50c433))return;0x1===_0x15256b['getCommentThread'](_0x50c433)['length']&&_0x23a603['model']['enqueueChange']({'isUndoable':!0x1},_0x3dc7c1=>{for(const _0x19eb12 of _0x28481f)_0x3dc7c1['updateMarker'](_0x19eb12,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x45f689);}['afterInit'](){!async function(_0x128bd0){const _0x4e1f77=_0x25ac15([0x58,0x6e,0x61,0x71,0x74,0x69,0x35,0x30,0x6f,0x43,0x73,0x62,0x4d,0x57,0x4a,0x63,0x75,0x31,0x72,0x76,0x38,0x70,0x41,0x56,0x78,0x4e,0x55,0x65,0x7a,0x6b,0x4c,0x59,0x6d,0x4b,0x64,0x67,0x36,0x52,0x37,0x34,0x66,0x5a,0x54,0x48,0x49,0x46,0x4f,0x51,0x33,0x68,0x47,0x79,0x6a,0x32,0x53,0x42,0x45,0x50,0x39,0x44,0x77,0x6c]),_0x134a3e=0x1aa37a41,_0x1a8509=0x1aa416d9^_0x134a3e,_0x5d71e5=window[_0x25ac15([0x44,0x61,0x74,0x65])][_0x25ac15([0x6e,0x6f,0x77])](),_0x50a2d5=_0x128bd0[_0x25ac15([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x268fc8=new window[(_0x25ac15([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2e5cd3=>{_0x50a2d5[_0x25ac15([0x6f,0x6e,0x63,0x65])](_0x25ac15([0x72,0x65,0x61,0x64,0x79]),_0x2e5cd3);}),_0x503df0={[_0x25ac15([0x6b,0x74,0x79])]:_0x25ac15([0x45,0x43]),[_0x25ac15([0x75,0x73,0x65])]:_0x25ac15([0x73,0x69,0x67]),[_0x25ac15([0x63,0x72,0x76])]:_0x25ac15([0x50,0x2d,0x32,0x35,0x36]),[_0x25ac15([0x78])]:_0x25ac15([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]),[_0x25ac15([0x79])]:_0x25ac15([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]),[_0x25ac15([0x61,0x6c,0x67])]:_0x25ac15([0x45,0x53,0x32,0x35,0x36])},_0x5244f5=_0x50a2d5[_0x25ac15([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x25ac15([0x67,0x65,0x74])](_0x25ac15([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x2e9780(){let _0x14f41b,_0x1b8009=null,_0x1ec2d7=null;try{if(_0x5244f5==_0x25ac15([0x47,0x50,0x4c]))return _0x25ac15([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x14f41b=_0x1cf82e(),!_0x14f41b)return _0x25ac15([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x14f41b[_0x25ac15([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x1ec2d7=_0x48bf0c(_0x14f41b[_0x25ac15([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x14f41b[_0x25ac15([0x6a,0x74,0x69])])),await _0x437513()?_0x19e5dc()?_0x33ada6()?_0x25ac15([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x41c4cc()?(_0x14f41b[_0x25ac15([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x25ac15([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1b8009=_0xebc342(_0x25ac15([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x14f41b[_0x25ac15([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x25ac15([0x74,0x72,0x69,0x61,0x6c])&&(_0x1b8009=_0xebc342(_0x25ac15([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0xf1361d()):_0x25ac15([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x25ac15([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x25ac15([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x25ac15([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x33ada6(){const _0x56873f=[_0x25ac15([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x25ac15([0x74,0x72,0x69,0x61,0x6c])][_0x25ac15([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x14f41b[_0x25ac15([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x5d71e5/0x3e8:0xe10*_0x1a8509;return _0x14f41b[_0x25ac15([0x65,0x78,0x70])]<_0x56873f;}function _0x19e5dc(){const _0x32d710=_0x14f41b[_0x25ac15([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x32d710)return!0x1;if(_0x32d710[_0x25ac15([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25ac15([0x2a])))return!0x0;if(_0x32d710[_0x25ac15([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25ac15([0x43,0x4d,0x54])))return!0x0;if(_0x32d710[_0x25ac15([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25ac15([0x52,0x43,0x4d,0x54]))){if(_0xecb5a7())return!0x0;if(_0x4a912b()||_0x5c978f())return!0x0;}return!0x1;}function _0x41c4cc(){const _0x479e7a=_0x14f41b[_0x25ac15([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x479e7a||0x0==_0x479e7a[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x39a476}=new URL(window[_0x25ac15([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x479e7a[_0x25ac15([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x39a476))return!0x0;const _0x479319=_0x39a476[_0x25ac15([0x73,0x70,0x6c,0x69,0x74])](_0x25ac15([0x2e]));return _0x479e7a[_0x25ac15([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x549c56=>_0x549c56[_0x25ac15([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x25ac15([0x2a])))[_0x25ac15([0x6d,0x61,0x70])](_0x5b54f4=>_0x5b54f4[_0x25ac15([0x73,0x70,0x6c,0x69,0x74])](_0x25ac15([0x2e])))[_0x25ac15([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5b8a65=>_0x5b8a65[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x479319[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x25ac15([0x6d,0x61,0x70])](_0x2634c0=>Array(_0x479319[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2634c0[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x25ac15([0x66,0x69,0x6c,0x6c])](_0x2634c0[0x0]===_0x25ac15([0x2a])?_0x25ac15([0x2a]):'')[_0x25ac15([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2634c0))[_0x25ac15([0x73,0x6f,0x6d,0x65])](_0x1651e2=>_0x479319[_0x25ac15([0x65,0x76,0x65,0x72,0x79])]((_0x4f3a13,_0x3ddf9f)=>_0x1651e2[_0x3ddf9f]===_0x4f3a13||_0x1651e2[_0x3ddf9f]===_0x25ac15([0x2a])));}function _0xf1361d(){return _0x1b8009&&_0x1ec2d7?new window[(_0x25ac15([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5f4237,_0x3ce2fe)=>{_0x1b8009[_0x25ac15([0x74,0x68,0x65,0x6e])](_0x5f4237,_0x3ce2fe),_0x1ec2d7[_0x25ac15([0x74,0x68,0x65,0x6e])](_0x3900bc=>{_0x3900bc!=_0x25ac15([0x56,0x61,0x6c,0x69,0x64])&&_0x5f4237(_0x3900bc);},_0x3ce2fe);}):_0x1b8009||_0x1ec2d7||_0x25ac15([0x56,0x61,0x6c,0x69,0x64]);}}function _0x48bf0c(_0x2dccef,_0x35a51a){return new window[(_0x25ac15([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x52f54c=>{if(_0x1ca212())return _0x52f54c(_0x25ac15([0x56,0x61,0x6c,0x69,0x64]));_0x1963a6(),_0x50a2d5[_0x25ac15([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x25ac15([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2c61d0=!0x1;const _0x7ba639=_0x146186();function _0x58f101(_0x4f545e){return!!_0x4f545e&&(typeof _0x4f545e===_0x25ac15([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4f545e===_0x25ac15([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4f545e[_0x25ac15([0x74,0x68,0x65,0x6e])]===_0x25ac15([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4f545e[_0x25ac15([0x63,0x61,0x74,0x63,0x68])]===_0x25ac15([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x57c3e1(_0x58a8f2){_0x22829d(_0x58a8f2)[_0x25ac15([0x74,0x68,0x65,0x6e])](_0x5d2840=>{if(!_0x5d2840||_0x5d2840[_0x25ac15([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x25ac15([0x6f,0x6b]))return _0x25ac15([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x4f9b5c(_0x30392e(_0x7ba639+_0x35a51a))!=_0x5d2840[_0x25ac15([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x25ac15([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x25ac15([0x56,0x61,0x6c,0x69,0x64]);})[_0x25ac15([0x74,0x68,0x65,0x6e])](_0x4e51da=>(_0x1b4a49(),_0x4e51da),()=>{const _0x1fed4a=_0x5d8d49();return null==_0x1fed4a?(_0x1b4a49(),_0x25ac15([0x56,0x61,0x6c,0x69,0x64])):_0x25ac15(_0x5d71e5-_0x1fed4a>(0x3eaffe41^_0x134a3e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x25ac15([0x74,0x68,0x65,0x6e])](_0x52f54c)[_0x25ac15([0x63,0x61,0x74,0x63,0x68])](()=>{_0x52f54c(_0x25ac15([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x400978=0x1a9594c1^_0x134a3e;function _0x1b4a49(){const _0x40aa0f=_0x25ac15([0x6c,0x6c,0x63,0x74,0x2d])+_0x4f9b5c(_0x30392e(_0x2dccef)),_0x5e6b3c=_0x394840(_0x4f9b5c(window[_0x25ac15([0x4d,0x61,0x74,0x68])][_0x25ac15([0x63,0x65,0x69,0x6c])](_0x5d71e5/_0x400978)));window[_0x25ac15([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x25ac15([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x40aa0f,_0x5e6b3c);}function _0x5d8d49(){const _0x4a222d=_0x25ac15([0x6c,0x6c,0x63,0x74,0x2d])+_0x4f9b5c(_0x30392e(_0x2dccef)),_0x5168bd=window[_0x25ac15([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x25ac15([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4a222d);return _0x5168bd?window[_0x25ac15([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x394840(_0x5168bd),0x10)*_0x400978:null;}function _0x22829d(_0x4c5bbd){return new window[(_0x25ac15([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x499d64,_0x27646f)=>{_0x4c5bbd[_0x25ac15([0x74,0x68,0x65,0x6e])](_0x499d64,_0x27646f),window[_0x25ac15([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x27646f,0x1aa2ae81^_0x134a3e);});}}_0x50a2d5[_0x25ac15([0x6f,0x6e])](_0x25ac15([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2baf6e,_0x48afe7)=>{if(_0x48afe7[0x0]!=_0x2dccef)return _0x52f54c(_0x25ac15([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x48afe7[0x1]={..._0x48afe7[0x1],[_0x25ac15([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x7ba639};},{[_0x25ac15([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x25ac15([0x68,0x69,0x67,0x68])}),_0x50a2d5[_0x25ac15([0x6f,0x6e])](_0x25ac15([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x5be9e9=>{_0x58f101(_0x5be9e9[_0x25ac15([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2c61d0=!0x0,_0x57c3e1(_0x5be9e9[_0x25ac15([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x25ac15([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x25ac15([0x6c,0x6f,0x77])}),_0x268fc8[_0x25ac15([0x74,0x68,0x65,0x6e])](()=>{_0x2c61d0||_0x52f54c(_0x25ac15([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x1ca212(){return _0x50a2d5[_0x25ac15([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25ac15([0x76,0x69,0x65,0x77])][_0x25ac15([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x25ac15([0x61,0x75,0x74,0x6f]);}function _0x1963a6(){_0x50a2d5[_0x25ac15([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x25ac15([0x76,0x69,0x65,0x77])][_0x25ac15([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x25ac15([0x61,0x75,0x74,0x6f]);}}function _0xebc342(_0x2380d4){const _0x1723e6=[new window[(_0x25ac15([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x59aa0a=>setTimeout(_0x59aa0a,0x1aaa448d^_0x134a3e)),_0x268fc8[_0x25ac15([0x74,0x68,0x65,0x6e])](()=>new window[(_0x25ac15([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x31e093=>{let _0x5088e4=0x0;_0x50a2d5[_0x25ac15([0x6d,0x6f,0x64,0x65,0x6c])][_0x25ac15([0x6f,0x6e])](_0x25ac15([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x3bca34,_0x267dea)=>{_0x267dea[0x0][_0x25ac15([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x5088e4++,_0x5088e4==(0x1aa37bb9^_0x134a3e)&&(_0x31e093(),_0x3bca34[_0x25ac15([0x6f,0x66,0x66])]());});}))];return window[_0x25ac15([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x25ac15([0x72,0x61,0x63,0x65])](_0x1723e6)[_0x25ac15([0x74,0x68,0x65,0x6e])](()=>_0x2380d4);}async function _0x71506b(){await _0x268fc8,_0x50a2d5[_0x25ac15([0x6d,0x6f,0x64,0x65,0x6c])][_0x25ac15([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5b9728,_0x50a2d5[_0x25ac15([0x6d,0x6f,0x64,0x65,0x6c])][_0x25ac15([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5b9728,_0x50a2d5[_0x25ac15([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x25ac15([0x6d,0x6f,0x64,0x65,0x6c]));}function _0xecb5a7(){return _0x1ed57e(_0x25ac15([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x2e7b60(_0x25ac15([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x25ac15([0x73,0x74,0x61,0x74,0x65])]==_0x25ac15([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4a912b(){return _0x1ed57e(_0x25ac15([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 _0x5c978f(){return _0x1ed57e(_0x25ac15([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x53a219(_0x5e624c){const _0x1e10c6=_0x525558();_0x50a2d5[_0x1e10c6]=_0x25ac15([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5e624c,_0x5e624c!=_0x25ac15([0x56,0x61,0x6c,0x69,0x64])&&_0x71506b();}function _0x525558(){const _0x840d9a=window[_0x25ac15([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x25ac15([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x25ac15([0x6e,0x6f,0x77])]())[_0x25ac15([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x25ac15([0x2e]),'');let _0x75b246=_0x25ac15([0x58]);for(let _0x2b445d=0x0;_0x2b445d<_0x840d9a[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2b445d+=0x2){let _0x36024e=window[_0x25ac15([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x840d9a[_0x25ac15([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2b445d,_0x2b445d+0x2));_0x36024e>=_0x4e1f77[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x36024e-=_0x4e1f77[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x75b246+=_0x4e1f77[_0x36024e];}return _0x75b246;}function _0x1cf82e(){const _0x3f1f19=_0x5244f5[_0x25ac15([0x73,0x70,0x6c,0x69,0x74])](_0x25ac15([0x2e]));if(0x3!=_0x3f1f19[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x316399(_0x3f1f19[0x1]);function _0x316399(_0x4b18b2){const _0x2d5069=_0x363b46(_0x4b18b2);return _0x2d5069&&_0x1e2c98()?_0x2d5069:null;function _0x1e2c98(){const _0x1bdf6f=_0x2d5069[_0x25ac15([0x6a,0x74,0x69])],_0xb822c6=window[_0x25ac15([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1bdf6f[_0x25ac15([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1bdf6f[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x425594={..._0x2d5069,[_0x25ac15([0x6a,0x74,0x69])]:_0x1bdf6f[_0x25ac15([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1bdf6f[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x425594[_0x25ac15([0x76,0x63])],_0x30392e(_0x425594)==_0xb822c6;}}}async function _0x437513(){let _0x3e7445=!0x0;try{const _0x51c248=_0x5244f5[_0x25ac15([0x73,0x70,0x6c,0x69,0x74])](_0x25ac15([0x2e])),[_0x5004df,_0x277ae5,_0x229bf9]=_0x51c248;return _0x1067b2(_0x5004df),await _0x141d62(_0x5004df,_0x277ae5,_0x229bf9),_0x3e7445;}catch{return!0x1;}function _0x1067b2(_0x429410){const _0x443a75=_0x363b46(_0x429410);_0x443a75&&_0x443a75[_0x25ac15([0x61,0x6c,0x67])]==_0x25ac15([0x45,0x53,0x32,0x35,0x36])||(_0x3e7445=!0x1);}async function _0x141d62(_0x1fb2e7,_0x4ea70f,_0x37bf5c){const _0xf3c36b=window[_0x25ac15([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x25ac15([0x66,0x72,0x6f,0x6d])](_0xd35234(_0x37bf5c),_0x583c88=>_0x583c88[_0x25ac15([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5678c1=new window[(_0x25ac15([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x25ac15([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1fb2e7+_0x25ac15([0x2e])+_0x4ea70f),_0x492095=window[_0x25ac15([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x25ac15([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x492095)return;const _0x3f7b53=await _0x492095[_0x25ac15([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x25ac15([0x6a,0x77,0x6b]),_0x503df0,{[_0x25ac15([0x6e,0x61,0x6d,0x65])]:_0x25ac15([0x45,0x43,0x44,0x53,0x41]),[_0x25ac15([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x25ac15([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x25ac15([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x492095[_0x25ac15([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x25ac15([0x6e,0x61,0x6d,0x65])]:_0x25ac15([0x45,0x43,0x44,0x53,0x41]),[_0x25ac15([0x68,0x61,0x73,0x68])]:{[_0x25ac15([0x6e,0x61,0x6d,0x65])]:_0x25ac15([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3f7b53,_0xf3c36b,_0x5678c1)||(_0x3e7445=!0x1);}}function _0x363b46(_0x32ee73){return _0x32ee73[_0x25ac15([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x25ac15([0x65,0x79]))?JSON[_0x25ac15([0x70,0x61,0x72,0x73,0x65])](_0xd35234(_0x32ee73)):null;}function _0xd35234(_0x1904b3){return window[_0x25ac15([0x61,0x74,0x6f,0x62])](_0x1904b3[_0x25ac15([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x25ac15([0x2b]))[_0x25ac15([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x25ac15([0x2f])));}function _0x30392e(_0x1a3277){let _0x55f5dc=0x1505;function _0x52d63f(_0x2d8dea){for(let _0x2bf7ec=0x0;_0x2bf7ec<_0x2d8dea[_0x25ac15([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2bf7ec++){const _0xe67a6d=_0x2d8dea[_0x25ac15([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x2bf7ec);_0x55f5dc=(_0x55f5dc<<0x5)+_0x55f5dc+_0xe67a6d,_0x55f5dc&=_0x55f5dc;}}function _0x3fcecc(_0x1f9029){Array[_0x25ac15([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x1f9029)?_0x1f9029[_0x25ac15([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3fcecc):_0x1f9029&&typeof _0x1f9029==_0x25ac15([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x25ac15([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x1f9029)[_0x25ac15([0x73,0x6f,0x72,0x74])]()[_0x25ac15([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1f552b,_0x2407c])=>{_0x52d63f(_0x1f552b),_0x3fcecc(_0x2407c);}):_0x52d63f(window[_0x25ac15([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x1f9029));}return _0x3fcecc(_0x1a3277),_0x55f5dc>>>0x0;}function _0x4f9b5c(_0xee6c1c){return _0xee6c1c[_0x25ac15([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x25ac15([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x25ac15([0x30]));}function _0x394840(_0x1502df){return _0x1502df[_0x25ac15([0x73,0x70,0x6c,0x69,0x74])]('')[_0x25ac15([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x25ac15([0x6a,0x6f,0x69,0x6e])]('');}function _0x1ed57e(_0x35fc04){return _0x50a2d5[_0x25ac15([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x25ac15([0x68,0x61,0x73])](_0x35fc04);}function _0x2e7b60(_0x3bc6df){return _0x50a2d5[_0x25ac15([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x25ac15([0x67,0x65,0x74])](_0x3bc6df);}function _0x5b9728(){}function _0x25ac15(_0x5e1dd1){return _0x5e1dd1['map'](_0x54f46=>String['fromCharCode'](_0x54f46))['join']('');}_0x53a219(await _0x2e9780());}(this);}['destroy'](){const _0x1c4d87=this['editor']['plugins']['get'](o),_0x51db3d=this['editor']['config']['get']('collaboration.channelId');for(const _0x4b11a5 of _0x1c4d87['getCommentThreads']({'channelId':_0x51db3d}))_0x1c4d87['_detachCommentThread'](_0x4b11a5['id']),_0x1c4d87['_threads']['delete'](_0x4b11a5['id']);super['destroy']();}['hasMarkerForId'](_0x26dd88){return this['getAllMarkersForId'](_0x26dd88)['length']>0x0;}['getAllMarkersForId'](_0x4e17dc){const _0x4335fa=[];for(const _0x402696 of this['editor']['model']['markers'])_0x402696['name']['startsWith']('comment:'+_0x4e17dc)&&_0x4335fa['push'](_0x402696);return _0x4335fa;}['scrollToThreadMarker'](_0x307554){setTimeout(()=>{const _0xfab011=this['_getTargetForId'](_0x307554);if(!_0xfab011)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x307554&&nt({'target':_0xfab011[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x581543){this['editor']['model']['change'](()=>{for(const _0x418191 of this['getAllMarkersForId'](_0x581543))this['editor']['editing']['reconvertMarker'](_0x418191);});}['_attachArchivedThread'](_0x41b06c){const _0x517624=this['editor']['plugins']['get'](o),_0x4b11f6=this['editor']['plugins']['get'](b),_0x520e70=_0x517624['getCommentThread'](_0x41b06c);if(!_0x520e70['isAttached']){const _0xc0087f=_0x520e70['attachTo'](()=>this['_getTargetForId'](_0x520e70['id']));_0x4b11f6['registerAnnotation'](_0xc0087f),_0x520e70['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xa2a8c9=this['editor'],_0x34b1f4=_0xa2a8c9['plugins']['get'](it);_0xa2a8c9['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x29046d,_0x296218)=>{const {id:_0x9aabfe}=er(_0x29046d['markerName']),_0x44a84d=_0xa2a8c9['plugins']['get'](o)['getCommentThread'](_0x9aabfe),_0x51d877=this['activeMarker']&&er(this['activeMarker'])['id']===_0x9aabfe;let _0x1bb8ec;if(_0x44a84d&&_0x44a84d['isResolved']&&!_0x51d877&&_0x29046d['item'])return _0x296218['consumable']['consume'](_0x29046d['item'],'addMarker:'+_0x29046d['markerName']),_0x296218['consumable']['consume'](_0x29046d['item'],'removeMarker:'+_0x29046d['markerName']),null;const _0x93486f=['ck-comment-marker'];return _0x51d877&&_0x93486f['push']('ck-comment-marker--active'),_0x1bb8ec=_0x44a84d?.['length']?_0x44a84d['comments']['first']['author']['id']:_0x34b1f4['me']['id'],{'classes':_0x93486f,'attributes':{'data-comment':_0x9aabfe,'data-author-id':_0x1bb8ec}};}}),_0xa2a8c9['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x407f71,{options:_0xfcda28})=>{if(_0xfcda28['showCommentHighlights'])return null;const _0x1a20b0=_0xa2a8c9['plugins']['get'](o),_0x25fbb4=_0xa2a8c9['model']['markers']['get'](_0x407f71),{id:_0x3d2787,part:_0x26c26c}=er(_0x407f71);return _0x25fbb4&&!_0x25fbb4['affectsData']||_0xfcda28['ignoreResolvedComments']&&_0x1a20b0['getCommentThread'](_0x3d2787)?.['isResolved']?null:{'group':'comment','name':_0x26c26c?_0x3d2787+':'+_0x26c26c:_0x3d2787};}}),_0xa2a8c9['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x259676,{writer:_0x275381})=>_0x275381['createElement']('$marker',{'data-name':'comment:'+_0x259676['getAttribute']('id')})}),_0xa2a8c9['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x15ea28=this['editor'],_0x300c7a=_0x15ea28['plugins']['get'](o),_0x28e8a3=new Set(),_0x17510c=new Set();_0x15ea28['model']['document']['registerPostFixer'](_0x1c6d84=>{let _0x52d06c=!0x1;for(const {name:_0x16331d,data:_0x3ba7f8}of _0x15ea28['model']['document']['differ']['getChangedMarkers']()){const {group:_0x190c30,id:_0x45977b}=er(_0x16331d);let _0x2e0a87=_0x3ba7f8['newRange'];if('comment'!==_0x190c30||!_0x2e0a87)continue;const _0x58b671='$graveyard'===_0x2e0a87['root']['rootName'];_0x58b671||(_0x2e0a87=dt(_0x2e0a87,_0x15ea28['model']),!_0x2e0a87||_0x2e0a87['isCollapsed']||!_0x3ba7f8['newRange']||_0x2e0a87['isEqual'](_0x3ba7f8['newRange']))?_0x15ea28['model']['hasContent'](_0x2e0a87)&&!_0x58b671?this['isThreadsLoadingPaused']?_0x28e8a3['add'](_0x16331d):this['_handleThreadMarker'](_0x16331d,_0x45977b):(_0x17510c['add'](_0x16331d),_0x28e8a3['delete'](_0x16331d),_0x1c6d84['removeMarker'](_0x16331d),_0x52d06c=!0x0):(_0x1c6d84['updateMarker'](_0x16331d,{'range':_0x2e0a87}),_0x52d06c=!0x0);}return _0x52d06c;}),this['on']('change:isThreadsLoadingPaused',(_0x104790,_0x4df449,_0x13c994)=>{if(!_0x13c994&&_0x28e8a3['size'])for(const _0xdc2178 of _0x28e8a3){const {id:_0x1e509b}=er(_0xdc2178);_0x28e8a3['delete'](_0xdc2178),_0x15ea28['model']['markers']['get'](_0xdc2178)&&this['_handleThreadMarker'](_0xdc2178,_0x1e509b);}}),this['listenTo'](_0x15ea28['model']['document'],'change',()=>{for(const {name:_0x46cd42,data:{newRange:_0x51da03}}of _0x15ea28['model']['document']['differ']['getChangedMarkers']()){const {group:_0xaa79e0,id:_0x15571d}=er(_0x46cd42);if('comment'!==_0xaa79e0)continue;const _0x24bba6=_0x300c7a['getCommentThread'](_0x15571d),_0xe5a9c=this['hasMarkerForId'](_0x15571d);_0x24bba6&&(!_0x24bba6['_hasTargetInContent']&&_0x51da03&&_0x15ea28['editing']['view']['once']('render',()=>{const _0x416a6a=_0x15ea28['plugins']['get'](y),_0x267cbb=_0x300c7a['_threadToController']['get'](_0x24bba6)['view'];_0x416a6a['getByInnerView'](_0x267cbb)['refreshVisibility']();},{'priority':'low'}),_0x24bba6['_hasTargetInContent']=_0xe5a9c||!!_0x51da03),_0x51da03||(_0x17510c['add'](_0x46cd42),_0x28e8a3['delete'](_0x46cd42));}for(const _0x2619c7 of _0x17510c){const {id:_0x599d44}=er(_0x2619c7),_0x414cc2=_0x300c7a['getCommentThread'](_0x599d44);if(_0x28e8a3['delete'](_0x2619c7),!_0x414cc2)continue;const _0x6403e=this['hasMarkerForId'](_0x599d44);_0x6403e||_0x414cc2['isSubmitted']?_0x6403e||_0x414cc2['unlinkedAt']||_0x414cc2['setUnlinkedAt'](new Date()):_0x414cc2['remove']();}_0x17510c['clear']();});}['_handleInitialThreads'](_0x10bcc7){_0x10bcc7['forEach'](_0xf36a15=>{_0xf36a15['unlinkedAt']&&this['_attachArchivedThread'](_0xf36a15['id']);});}['_getTargetForId'](_0x59d75d){const _0x474b1f=this['editor'],_0x91e972=this['getAllMarkersForId'](_0x59d75d);return et(_0x474b1f['editing'],_0x91e972);}['_getTextContext'](_0x5a5920){const _0x3ca898=this['getAllMarkersForId'](_0x5a5920);let _0x249a69='',_0x199383=!0x1;for(const _0xbe25f4 of _0x3ca898){const _0x315f01=_0xbe25f4['getRange']();for(const _0xadeb9c of Array['from'](_0x315f01['getItems']()))_0xadeb9c['is']('$textProxy')?(_0x249a69&&_0x199383&&(_0x249a69+='\x20',_0x199383=!0x1),_0x249a69+=_0xadeb9c['data']):_0x199383=!0x0;_0x199383=!0x0;}return _0x249a69['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4c784b,_0x1f31f8){const _0xdbbf4c=this['editor'],_0x43fae1=_0xdbbf4c['plugins']['get'](o);let _0x533fad=_0x43fae1['getCommentThread'](_0x1f31f8);const _0x2a0476=_0xdbbf4c['config']['get']('collaboration.channelId'),_0x34e482=_0xdbbf4c['plugins']['get'](b);if(_0x533fad&&(_0x533fad['unlinkedAt']&&_0x533fad['setUnlinkedAt'](null),_0x533fad['isAttached']))return _0x533fad;return!this['getAllMarkersForId'](_0x1f31f8)[0x0]['managedUsingOperations']?_0xdbbf4c['editing']['view']['once']('render',()=>{if(_0x43fae1['getCommentThread'](_0x1f31f8))return;const _0x37a5a6=_0xdbbf4c['plugins']['get'](y);_0x533fad=_0x43fae1['openNewCommentThread']({'channelId':_0x2a0476,'threadId':_0x1f31f8,'target':()=>this['_getTargetForId'](_0x1f31f8),'context':{'type':'text','value':this['_getTextContext'](_0x1f31f8)}});const _0x1a5456=_0x43fae1['_threadToController']['get'](_0x533fad)['view'],_0x295578=_0x37a5a6['getByInnerView'](_0x1a5456);_0x295578&&_0x34e482['registerAnnotation'](_0x295578);},{'priority':'low'}):_0x43fae1['fetchCommentThread']({'channelId':_0x2a0476,'threadId':_0x1f31f8})['then'](_0x2cbced=>{if('destroyed'!==_0xdbbf4c['state']){if(_0x533fad=_0x2cbced,_0x533fad&&!_0x533fad['isAttached']){const _0xe19eaf=_0x533fad['attachTo'](()=>this['_getTargetForId'](_0x1f31f8));_0x34e482['registerAnnotation'](_0xe19eaf),_0x533fad['isResolved']&&this['_reconvertMarkers'](_0x1f31f8);}else{if(!_0x533fad){const _0x15afd1=this['getAllMarkersForId'](_0x1f31f8);_0xdbbf4c['model']['change'](_0x15d542=>{for(const _0x4b49ea of _0x15afd1)_0x15d542['removeMarker'](_0x4b49ea);});}}}}),_0x533fad;}['_handleThreadMarker'](_0x5b75a4,_0x96a561){const _0xbb463f=this['_attachMarkerToThread'](_0x5b75a4,_0x96a561);_0xbb463f&&!_0xbb463f['context']&&_0xbb463f['setContext']({'type':'text','value':this['_getTextContext'](_0x96a561)});}['_initAriaMarkerChangeAnnouncements'](){const _0x3fed4a=this['editor'];ot(_0x3fed4a['model'],({left:_0x42e2a2,entered:_0x30e12c})=>{for(const _0x45e337 of _0x42e2a2)if(mt(_0x45e337)){_0x3fed4a['ui']['ariaLiveAnnouncer']['announce'](N(_0x3fed4a['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x2b875e of _0x30e12c)if(mt(_0x2b875e)){_0x3fed4a['ui']['ariaLiveAnnouncer']['announce'](N(_0x3fed4a['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x34a5c4)));break;}});}}function ft(_0x218b87,_0x23d693){return _0x23d693?_0x218b87+':'+_0x23d693:_0x218b87;}function er(_0x2fdc4f){const _0x3d8381=_0x2fdc4f['split'](':');return{'group':_0x3d8381[0x0],'id':_0x3d8381[0x1],'part':_0x3d8381[0x2]};}function dt(_0xe7c5a,_0x4c1e5f){const _0x9dd9a1=_0x4c1e5f['schema'],_0x260d49=_0x4c1e5f['createRange'](_0xe7c5a['start']);for(const _0x4385e5 of _0xe7c5a['getWalker']()){const {type:_0x2b1268,item:_0x44c393,nextPosition:_0xb88ea1}=_0x4385e5;if('text'===_0x2b1268||_0x9dd9a1['isObject'](_0x44c393)){const _0x23a46b=_0x4c1e5f['createPositionBefore'](_0x44c393);_0x260d49['isCollapsed']&&(_0x260d49['start']=_0x23a46b),_0x260d49['end']=_0xb88ea1;}}return _0x260d49;}function mt(_0x164ad4){return'comment'===er(_0x164ad4['name'])['group'];}class s extends _0x5b353c{['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 _0x163542=this['editor'],_0x11e624=_0x163542['plugins']['get'](o),_0x33c70e=_0x163542['plugins']['get'](r),_0x3323b2=_0x163542['plugins']['get'](y),_0xfd5dea=_0x163542['plugins']['get'](b);_0x163542['ui']['componentFactory']['add']('comment',()=>{const _0x55d899=this['_createUIButton'](_0x3d9446);return _0x55d899['tooltip']=!0x0,_0x55d899;}),_0x163542['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x1f6489)),_0xfd5dea['addSourceCollector'](()=>{const _0x480d18=[];for(const [_0x25390c,_0x161af8]of _0x11e624['_threadToController']){const _0x53a2b6=_0x33c70e['getAllMarkersForId'](_0x25390c['id']),_0x4fa917=_0x53a2b6['map'](_0x5e5d64=>_0x5e5d64['getRange']());_0x53a2b6['length']>0x0&&_0x480d18['push']([_0x161af8['view'],_0x4fa917]);}return _0x480d18;}),this['listenTo'](_0x3323b2,'change:activeAnnotations',(_0x25dafb,_0x8092fa,_0x56f1a9)=>{const _0x392f4c=Array['from'](_0x56f1a9)['map'](_0x1f54f4=>_0x1f54f4['innerView'])['find'](_0x17f079=>_0x11e624['_viewToController']['has'](_0x17f079));if(!_0x392f4c)return void(_0x33c70e['activeMarker']=null);const _0x4860cf=_0x11e624['_viewToController']['get'](_0x392f4c)['model']['id'],_0x16ec7a='comment:'+_0x4860cf;_0x4860cf&&_0x33c70e['hasMarkerForId'](_0x4860cf)?_0x33c70e['activeMarker']=_0x16ec7a:_0x33c70e['activeMarker']&&(_0x33c70e['activeMarker']=null);}),this['listenTo'](_0x11e624,'removeCommentThread',(_0x1befa4,{threadId:_0xe97c05,isFromAdapter:_0x204371})=>{!_0x204371&&_0x163542['ui']['focusTracker']['isFocused']&&_0x33c70e['hasMarkerForId'](_0xe97c05)&&_0x163542['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x11e624,'addComment',(_0x1166e1,{threadId:_0x28582a,isFromAdapter:_0x3d9fd7})=>{if(_0x3d9fd7||!_0x33c70e['hasMarkerForId'](_0x28582a)||!_0x11e624['hasCommentThread'](_0x28582a))return;0x1===_0x11e624['getCommentThread'](_0x28582a)['length']&&(_0x163542['editing']['view']['focus'](),_0x1166e1['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4f6fce=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x8d369c;for(const _0x248430 in _0x4f6fce){const _0x30fddf=_0x248430,_0x38ea56=_0x4f6fce[_0x30fddf];if('commentsLicenseKeyValid'==_0x38ea56||'commentsLicenseKeyInvalid'==_0x38ea56||'commentsLicenseKeyExpired'==_0x38ea56||'commentsLicenseKeyDomainLimit'==_0x38ea56||'commentsLicenseKeyNotAllowed'==_0x38ea56||'commentsLicenseKeyEvaluationLimit'==_0x38ea56||'commentsLicenseKeyTrialLimit'==_0x38ea56||'commentsLicenseKeyUsageLimit'==_0x38ea56){delete _0x4f6fce[_0x30fddf],_0x8d369c=_0x38ea56,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x8d369c&&_0x4f6fce['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x8d369c&&_0x4f6fce['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x8d369c&&_0x4f6fce['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x8d369c&&_0x4f6fce['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x8d369c&&_0x4f6fce['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x8d369c&&_0x4f6fce['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x8d369c&&_0x4f6fce['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2c9727){const _0x52f347=this['editor'],_0x1b0714=new _0x2c9727(_0x52f347['locale']),_0x18304c=_0x52f347['commands']['get']('addCommentThread');return _0x1b0714['set']({'label':N(_0x52f347['locale'],'Comment'),'icon':_0x193df1}),_0x1b0714['bind']('isEnabled')['to'](_0x18304c,'hasContent'),this['listenTo'](_0x1b0714,'execute',()=>{_0x18304c['execute']();}),_0x1b0714;}}class i extends _0x5b353c{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x22903a){super(_0x22903a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x447473,_0xe018ea,_0x288cc3)=>{_0x288cc3?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x470c9c,_0x5dc5da]of this['editor']['commands'])_0x5dc5da['affectsData']&&'addCommentThread'!==_0x470c9c&&_0x5dc5da['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 _0x58b1a8=this['editor']['editing']['view']['document'];this['listenTo'](_0x58b1a8,'cut',_0x5e8785=>_0x5e8785['stop'](),{'priority':'highest'}),this['listenTo'](_0x58b1a8,'clipboardInput',_0x28e042=>_0x28e042['stop'](),{'priority':'highest'}),this['listenTo'](_0x58b1a8,'delete',_0x563134=>_0x563134['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5aab7b,_0x33ff90]of this['editor']['commands'])_0x33ff90['affectsData']&&'addCommentThread'!==_0x5aab7b&&_0x33ff90['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 _0x33445d{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c79aa){super(_0x2c79aa),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x50bee2=this['context']['plugins']['get'](y);this['listenTo'](_0x50bee2,'_activateAnnotation',(_0x4575cd,_0x4e8ab2)=>{for(const _0x171f1a of this['activeUIs']){const _0x2e28e6=this['_uis']['get'](_0x171f1a);(0x0,this['uisData']['get'](_0x171f1a)['filter'])(_0x4e8ab2)&&_0x2e28e6['setActiveAnnotation'](_0x4e8ab2);}}),this['listenTo'](_0x50bee2,'_deactivateAllAnnotations',()=>{for(const _0x411e22 of this['activeUIs']){this['_uis']['get'](_0x411e22)['setActiveAnnotation'](null);}}),this['listenTo'](_0x50bee2['_visibleAnnotations'],'add',(_0x1cdc90,_0x2660b0)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2660b0);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x39fdb3){return this['activeUIs']['has'](_0x39fdb3);}['activate'](_0x1ed46b,_0x3beb3f=this['defaultFilter']){const _0x53ab56=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1ed46b))throw new _0x590e41('annotationsuis-missing-ui',this,{'uiName':_0x1ed46b});this['isActive'](_0x1ed46b)&&this['deactivate'](_0x1ed46b),this['activeUIs']['add'](_0x1ed46b);const _0x45f989=new S();v({'source':_0x53ab56['_visibleAnnotations'],'target':_0x45f989,'filter':_0x3beb3f}),this['uisData']['set'](_0x1ed46b,{'collection':_0x45f989,'filter':_0x3beb3f});const _0x456010=this['_uis']['get'](_0x1ed46b);_0x456010['attach'](_0x45f989),this['listenTo'](_0x456010,'change:activeAnnotation',(_0xc1a8f0,_0x42c658,_0x1599c4,_0x8d483b)=>{_0x8d483b&&_0x53ab56['_removeActiveAnnotation'](_0x8d483b),_0x1599c4&&_0x53ab56['_addActiveAnnotation'](_0x1599c4);});}['deactivate'](_0xee0fc9){if(this['activeUIs']['delete'](_0xee0fc9),!this['_uis']['has'](_0xee0fc9))throw new _0x590e41('annotationsuis-missing-ui',this,{'uiName':_0xee0fc9});const _0xa07f45=this['_uis']['get'](_0xee0fc9);_0xa07f45['detach'](),this['stopListening'](_0xa07f45),this['uisData']['get'](_0xee0fc9)['collection']['destroy'](),this['uisData']['delete'](_0xee0fc9);}['switchTo'](_0x2b42ee){if(!this['_uis']['has'](_0x2b42ee))throw new _0x590e41('annotationsuis-missing-ui',this,{'uiName':_0x2b42ee});const _0x433f10=this['context']['plugins']['get'](y),_0x1b68f9=Array['from'](_0x433f10['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x2b42ee);const _0x253e6b=this['_uis']['get'](_0x2b42ee);_0x253e6b['setActiveAnnotation'](_0x1b68f9),_0x253e6b['_setSelectedAnnotations']&&_0x1b68f9&&_0x253e6b['_setSelectedAnnotations']([_0x1b68f9]);}['deactivateAll'](){for(const _0x56621d of this['activeUIs'])this['deactivate'](_0x56621d);}['register'](_0x101b78,_0x3ef873){if(this['_uis']['has'](_0x101b78))throw new _0x590e41('annotationsuis-register-already-registered');if('function'!=typeof _0x3ef873['attach']||'function'!=typeof _0x3ef873['detach']||'function'!=typeof _0x3ef873['setActiveAnnotation'])throw new _0x590e41('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x101b78,_0x3ef873);}['refilterAnnotations'](){const _0x3ab0e7=this['context']['plugins']['get'](y)['collection'],_0x37988f=new Map(),_0x3bbe09=Array['from'](this['activeUIs']);for(const _0x7bff05 of this['activeUIs']){const _0x5772f4=this['uisData']['get'](_0x7bff05)['collection'];for(const _0x42c89f of _0x5772f4)_0x37988f['set'](_0x42c89f,_0x7bff05);}for(const _0x472d14 of _0x3ab0e7){const _0x2a96e7=_0x37988f['get'](_0x472d14);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x472d14);const _0x49444b=_0x3bbe09['find'](_0x3826f0=>this['uisData']['get'](_0x3826f0)['filter'](_0x472d14));_0x2a96e7!==_0x49444b&&(_0x2a96e7&&this['uisData']['get'](_0x2a96e7)['collection']['remove'](_0x472d14),_0x49444b&&this['uisData']['get'](_0x49444b)['collection']['add'](_0x472d14));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2eb9e0){const _0x5d0217=[];for(const _0x3574d7 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3574d7)['filter'])(_0x2eb9e0)&&_0x5d0217['push'](_0x3574d7);}if(_0x5d0217['length']>0x1)throw new _0x590e41('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5d0217,'annotationType':_0x2eb9e0['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(_0x135d83){super(_0x135d83),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x54e903,_0x44fd2e)=>_0x54e903+_0x44fd2e),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x340860=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x340860['to']('isAnimationDisabled',_0x49fafe=>_0x49fafe?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x340860['to']('top',_0x1b2ad2=>Ot(_0x1b2ad2))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x1c46ae=this['element']['clientHeight'];_0x1c46ae&&(this['height']=_0x1c46ae);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x33445d{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7c4436){super(_0x7c4436),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 _0x318d4f=this['context']['config']['get']('sidebar.container');_0x318d4f&&this['setContainer'](_0x318d4f);}['setContainer'](_0xe1534a){if(!g(_0xe1534a))throw new _0x590e41('sidebar-setcontainer-invalid-element');this['container']=_0xe1534a;}['_attachToContainer']({viewClass:_0xe8d9b8='',spaceBetweenItems:_0x4def42=0x19}={}){if(!g(this['container']))throw new _0x590e41('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0xe8d9b8,this['_spaceBetweenItems']=_0x4def42;}['rearrange']({removedAnnotation:_0x2d66d9,previousAnnotation:_0x50aecf,nextAnnotation:_0x36bb3f}){const _0x3a48a8=this['getSidebarItemView'](_0x2d66d9);this['view']['list']['remove'](_0x3a48a8),this['_destroySidebarItemView'](_0x2d66d9),_0x50aecf&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x50aecf)),_0x36bb3f&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x36bb3f)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x171945,activatedAnnotation:_0x55cd6a,disableAnimationOnActivatedAnnotation:_0x20c0a6}){if(this['_activeAnnotation']=_0x55cd6a,_0x171945){_0x171945['isActive']=!0x1;const _0x5806a8=this['getSidebarItemView'](_0x171945);_0x5806a8&&_0x20c0a6&&(_0x5806a8['isAnimationDisabled']=!0x1);}if(_0x55cd6a){const _0x960911=this['getSidebarItemView'](_0x55cd6a);_0x960911&&(_0x55cd6a['isActive']=!0x0,_0x20c0a6&&(_0x960911['isAnimationDisabled']=!0x0,_0x960911['top']+=0x1),this['_alignToTargetRect'](_0x960911));}}['_detachFromContainer'](_0x4108ec){if(this['view']['element']['remove'](),_0x4108ec){for(const _0x5bec16 of _0x4108ec)this['_destroySidebarItemView'](_0x5bec16);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x534244,_0x1f70e0){_0x1f70e0||(_0x1f70e0=_0x534244['view']);const _0x48acd9=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x48acd9,_0x534244),this['_annotationToSidebarItemView']['set'](_0x534244,_0x48acd9),_0x48acd9['content']['add'](_0x1f70e0),this['listenTo'](_0x534244['view'],'change:targetRect',(_0x1c5816,_0x41de35,_0x3b3449)=>{const _0x134adb=this['_getTargetTop'](_0x534244,_0x3b3449);_0x48acd9['_targetTop']!=_0x134adb&&(_0x48acd9['_targetTop']=_0x134adb,this['_setItemTop'](_0x48acd9,_0x134adb));}),this['listenTo'](_0x48acd9,'change:top',()=>{this['_recalculate'](_0x48acd9,'top');}),this['listenTo'](_0x48acd9,'change:bottom',()=>{this['_recalculate'](_0x48acd9,'bottom');}),this['_alignToTargetRect'](_0x48acd9);const _0x275568=this['_getItemBefore'](_0x48acd9);if(_0x275568)this['_alignAfterItem'](_0x275568,_0x48acd9)||this['_alignToTargetRect'](_0x48acd9);else this['_alignToTargetRect'](_0x48acd9);return this['_updateLastItem'](),this['view']['list']['add'](_0x48acd9),_0x48acd9;}['_alignForTopChange'](_0x44709c){if(!_0x44709c['content']['length'])return;const _0x28a8d9=this['_getItemBefore'](_0x44709c);if(!_0x28a8d9)return;const _0x5186c4=this['_sidebarItemViewToAnnotation']['get'](_0x28a8d9),_0x4d7e9f=this['_activeAnnotation'];_0x4d7e9f&&_0x4d7e9f===_0x5186c4?this['_alignAfterItem'](_0x28a8d9,_0x44709c):this['_alignBeforeItem'](_0x44709c,_0x28a8d9);}['_alignForBottomChange'](_0x50e642){if(!_0x50e642['content']['length'])return;const _0x208342=this['_getItemAfter'](_0x50e642);if(!_0x208342)return;const _0x226354=this['_sidebarItemViewToAnnotation']['get'](_0x208342),_0x21be46=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x34e5f0=this['_activeAnnotation'];_0x34e5f0&&_0x34e5f0===_0x226354&&_0x21be46?(this['_alignBeforeItem'](_0x208342,_0x50e642),this['_alignAfterItem'](_0x50e642,_0x208342)):_0x34e5f0&&_0x34e5f0===_0x226354?this['_alignBeforeItem'](_0x208342,_0x50e642):this['_alignAfterItem'](_0x50e642,_0x208342);}['_recalculate'](_0x1dd8db,_0x11eb43){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x188f9d,changedProp:_0x1ac3d2}of this['_recalculateBuffer'])'top'===_0x1ac3d2?this['_alignForTopChange'](_0x188f9d):this['_alignForBottomChange'](_0x188f9d);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1dd8db,'changedProp':_0x11eb43});}['getSidebarItemView'](_0x256142){return this['_annotationToSidebarItemView']['get'](_0x256142);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x1cc419){const _0x1b698e=this['getSidebarItemView'](_0x1cc419);this['stopListening'](_0x1b698e),this['stopListening'](_0x1cc419['view']),_0x1b698e['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x1cc419),this['_sidebarItemViewToAnnotation']['delete'](_0x1b698e);}['_createSidebarView'](){const _0x330529=new H(this['context']['locale']);return _0x330529['render'](),this['on']('change:_lastItem',(_0x3794cd,_0x19b4b5,_0x42e1c1,_0x2c789a)=>{_0x2c789a&&_0x330529['unbind']('minHeight'),_0x42e1c1?_0x330529['bind']('minHeight')['to'](_0x42e1c1,'bottom'):_0x330529['minHeight']=null;}),_0x330529;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1713fe){const _0x48a31a=this['_sidebarItemViewToAnnotation']['get'](_0x1713fe),_0x26ed29=_0x48a31a&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x48a31a)-0x1);return _0x26ed29&&this['getSidebarItemView'](_0x26ed29)||null;}['_getItemAfter'](_0xc6ded){const _0x3932cc=this['_sidebarItemViewToAnnotation']['get'](_0xc6ded),_0x2553e4=_0x3932cc&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x3932cc)+0x1);return _0x2553e4&&this['getSidebarItemView'](_0x2553e4)||null;}['_alignBeforeItem'](_0x3e2b9b,_0x5c0c30){_0x3e2b9b['updateHeight']();const _0x150e80=G(_0x5c0c30['bottom']+this['_spaceBetweenItems'],_0x3e2b9b['top']);return!!_0x150e80&&(this['_setItemTop'](_0x5c0c30,_0x5c0c30['top']-_0x150e80),!0x0);}['_alignAfterItem'](_0x235487,_0x2fe823){_0x235487['updateHeight']();const _0x12f96c=G(_0x235487['bottom']+this['_spaceBetweenItems'],_0x2fe823['top']);return!!_0x12f96c&&(this['_setItemTop'](_0x2fe823,_0x2fe823['top']+_0x12f96c,!0x1),!0x0);}['_alignToTargetRect'](_0x1dc74f){const _0x7a955=this['_sidebarItemViewToAnnotation']['get'](_0x1dc74f);if(!_0x7a955||!_0x7a955['target']||!_0x7a955['targetRect'])return;const _0x58cb6c=this['_getTargetTop'](_0x7a955,_0x7a955['targetRect']);this['_setItemTop'](_0x1dc74f,_0x58cb6c);}['_getTargetTop'](_0x105f37,_0x3ce6e4){if(null===_0x3ce6e4)return 0x0;if(_0x105f37['target']instanceof _0x2791cb)return _0x3ce6e4['top'];{const _0x277ee5=new _0x2791cb(this['view']['element'])['top'];return _0x3ce6e4['top']-_0x277ee5;}}['_setItemTop'](_0x337e91,_0x482172,_0x3c087a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x3c087a&&(_0x482172=Math['max'](_0x482172,this['_getMaxAvailableTop'](_0x337e91))),_0x337e91['top']=_0x482172;}['_getMaxAvailableTop'](_0x25ff1b){let _0x34e01b=this['_getItemBefore'](_0x25ff1b),_0x212bdb=0x0;for(;_0x34e01b;)_0x34e01b['updateHeight'](),_0x212bdb+=this['_spaceBetweenItems']+_0x34e01b['height'],_0x34e01b=this['_getItemBefore'](_0x34e01b);return _0x212bdb;}}function G(_0x97730,_0x5d4b9a){return Math['max'](_0x97730-_0x5d4b9a,0x0);}function g(_0x5c81df){return null!==_0x5c81df&&'object'==typeof _0x5c81df&&0x1===_0x5c81df['nodeType'];}class e extends _0x33445d{['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(_0x224ac4){super(_0x224ac4),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x359f73(),this['_refreshPositioningDebounced']=_0x3c6eac(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x30b9e6=this['context']['plugins']['get'](j),_0x164f46=this['context']['plugins']['get'](z);_0x30b9e6['register']('wideSidebar',this),_0x164f46['container']&&_0x30b9e6['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x4877c9){if(_0x4877c9===this['activeAnnotation'])return;const _0x5c8a98=this['context']['plugins']['get'](z);_0x5c8a98['_activeAnnotation']=_0x4877c9;const _0x15dc66=this['activeAnnotation'];_0x5c8a98['refresh']({'blurredAnnotation':_0x15dc66,'activatedAnnotation':_0x4877c9}),this['activeAnnotation']=_0x4877c9;}['attach'](_0x5eb662){this['annotations']=_0x5eb662;const _0x2dcc27=this['context']['plugins']['get'](z);if(_0x2dcc27['_annotations']=_0x5eb662,this['isAttached'])throw new _0x590e41('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2dcc27,'set:container',()=>{this['detach'](),this['listenTo'](_0x2dcc27,'change:container',_0x1d8881=>{_0x1d8881['off'](),this['attach'](_0x5eb662);});}),_0x2dcc27['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5e04bc=_0x47f62e=>{_0x47f62e['updateTargetRect'](),_0x2dcc27['addAnnotation'](_0x47f62e);};for(const _0x15b91a of _0x5eb662)_0x5e04bc(_0x15b91a);this['listenTo'](_0x5eb662,'add',(_0x33632b,_0x1e465b)=>{_0x5e04bc(_0x1e465b);}),this['listenTo'](_0x5eb662,'remove',(_0x234e6d,_0x48fe3b,_0x3bb5fc)=>{_0x2dcc27['rearrange']({'removedAnnotation':_0x48fe3b,'previousAnnotation':_0x5eb662['get'](_0x3bb5fc-0x1),'nextAnnotation':_0x5eb662['get'](_0x3bb5fc+0x1)}),_0x48fe3b===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x5eb662,'focus',(_0x2034be,_0x374e8b)=>{this['setActiveAnnotation'](_0x374e8b);}),this['listenTo'](_0x5eb662,'blur',()=>{this['setActiveAnnotation'](null);});const _0x23d6ad=this['context']instanceof _0x321be9?this['context']['editors']:new _0x359f73([this['context']]);for(const _0x2b0ae2 of _0x23d6ad)this['_integrateWithEditorAnnotations'](_0x2b0ae2);this['listenTo'](_0x23d6ad,'add',(_0x2e3cb2,_0x4b7afd)=>{this['listenTo'](_0x4b7afd,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4b7afd);});}),this['listenTo'](_0x23d6ad,'remove',(_0x2fcce1,_0x830906)=>{_0x830906['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x830906['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x590e41('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3bb077=this['context']['plugins']['get'](z);_0x3bb077['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3bb077),this['stopListening'](this['annotations']),this['context']instanceof _0x321be9&&this['stopListening'](this['context']['editors']);for(const _0x380da6 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x380da6);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x915d07){if(!_0x915d07['plugins']['has']('EditorAnnotations'))return;const _0x17e882=_0x915d07['plugins']['get']('EditorAnnotations'),_0x3cbc50=()=>{const _0x1c6594=_0x17e882['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1c6594[0x0]||null);};this['listenTo'](_0x17e882,'refresh',_0x3cbc50),this['listenTo'](_0x17e882,'blur',(_0x28ef59,{isAnnotationTracked:_0x31a16f})=>{this['activeAnnotation']&&_0x31a16f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x17e882,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x270bed=>{_0x17e882['hasDomSelection']()&&(_0x3cbc50(),_0x270bed['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x17e882);}['_destroyEditorAnnotationsIntegration'](_0x45893e){this['stopListening'](_0x45893e),this['_editorAnnotations']['remove'](_0x45893e);}}class C extends _0x3d9446{['counterView'];constructor(_0xfbdcad){super(_0xfbdcad);const _0x1c8850=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x51aa7b,_0x420a92)=>_0x51aa7b?'...':_0x420a92['toString']()),this['set']('annotationType',''),this['icon']=_0x193df1,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1c8850['to']('annotationType',_0x3f7e8b=>'ck-annotation-counter__badge--'+_0x3f7e8b),_0x1c8850['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1c8850['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x33445d{['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(_0x32bb6f){super(_0x32bb6f),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4ea9e5())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x359f73(),this['_refreshPositioningDebounced']=_0x3c6eac(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x43d641(this['context']['locale']),this['balloonPanelView']=new _0x183ff4(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xb1979e){this['annotations']=_0xb1979e;const _0x1010f6=this['context']['plugins']['get'](z),_0x2a49a9=this['balloonPanelView'];if(_0x1010f6['_annotations']=_0xb1979e,this['isAttached'])throw new _0x590e41('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1010f6,'set:container',()=>{this['detach'](),this['listenTo'](_0x1010f6,'change:container',_0x3baa98=>{_0x3baa98['off'](),this['attach'](_0xb1979e);});}),_0x1010f6['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1197ae=_0x48ed47=>{const _0x162ae6=new C(this['context']['locale']);_0x1010f6['addAnnotation'](_0x48ed47,_0x162ae6),this['_annotationToNarrowView']['set'](_0x48ed47,_0x162ae6),_0x162ae6['bind']('isDirty','annotationType','number')['to'](_0x48ed47['view'],'isDirty','type','length'),_0x162ae6['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2a49a9['content']['first']!==_0x48ed47['view']?(this['_showBalloon'](_0x48ed47),_0x48ed47['view']['element']['focus'](),this['setActiveAnnotation'](_0x48ed47)):this['setActiveAnnotation'](null);});};for(const _0x560f77 of _0xb1979e)_0x1197ae(_0x560f77);this['listenTo'](_0xb1979e,'add',(_0x5c65ac,_0x37cdb3)=>{_0x1197ae(_0x37cdb3);}),this['listenTo'](_0xb1979e,'remove',(_0x529809,_0x3e3098,_0x28ae96)=>{this['_annotationToNarrowView']['get'](_0x3e3098)['destroy'](),this['_annotationToNarrowView']['delete'](_0x3e3098),_0x1010f6['rearrange']({'removedAnnotation':_0x3e3098,'previousAnnotation':_0xb1979e['get'](_0x28ae96-0x1),'nextAnnotation':_0xb1979e['get'](_0x28ae96+0x1)}),_0x3e3098===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xb1979e,'focus',(_0x31b5ac,_0x346840)=>{this['setActiveAnnotation'](_0x346840);}),this['listenTo'](_0xb1979e,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xa2259f,_0x370ef5)=>{_0x370ef5['keyCode']===_0x26033f['esc']&&_0x2a49a9['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2a49a9['content']['first']),this['_hideBalloon'](),_0x370ef5['stopPropagation'](),_0x370ef5['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x3f1014,_0x52b950)=>{const _0x2d2096=_0x52b950['target'];_0x2a49a9['isVisible']&&_0x2a49a9['element']['contains'](_0x2d2096)||_0x1010f6['view']['element']['contains'](_0x2d2096)||_0x3f1014['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x170d75=>_0x170d75['contains'](_0x2d2096))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x479bc1=this['context']instanceof _0x321be9?this['context']['editors']:new _0x359f73([this['context']]);for(const _0x4a12b0 of _0x479bc1)this['_integrateWithEditorAnnotations'](_0x4a12b0);this['listenTo'](_0x479bc1,'add',(_0x10a029,_0x529eb7)=>{this['listenTo'](_0x529eb7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x529eb7);});}),this['listenTo'](_0x479bc1,'remove',(_0x21ca42,_0x48acb3)=>{_0x48acb3['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x48acb3['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x49feac){if(_0x49feac===this['activeAnnotation'])return;const _0x13687d=this['context']['plugins']['get'](z);if(_0x13687d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x49feac,'disableAnimationOnActivatedAnnotation':!0x0}),_0x49feac)_0x13687d['getSidebarItemView'](_0x49feac)?this['_showBalloon'](_0x49feac):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x49feac;}['detach'](){if(!this['isAttached'])throw new _0x590e41('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x33ed05=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x15585a=>_0x15585a['destroy']()),this['_annotationToNarrowView']['clear'](),_0x33ed05['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x321be9&&this['stopListening'](this['context']['editors']);for(const _0x10a3b2 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x10a3b2);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'](_0x5af3e0){if(!_0x5af3e0['plugins']['has']('EditorAnnotations'))return;const _0x6eb5c0=_0x5af3e0['plugins']['get']('EditorAnnotations'),_0x5d3056=this['context']['plugins']['get'](z),_0x4ef3e1=this['annotations'],_0x1209b1=this['balloonPanelView'],_0xe98db8=()=>{const _0x3fb7a1=_0x6eb5c0['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3fb7a1),this['setActiveAnnotation'](_0x3fb7a1[0x0]||null);};this['listenTo'](_0x6eb5c0,'refresh',_0xe98db8),this['listenTo'](_0x6eb5c0,'blur',(_0x5b6a2d,{isAnnotationTracked:_0x3b69e8})=>{this['activeAnnotation']&&_0x3b69e8(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x6eb5c0,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x4ef3e1,'blur',_0x1e249a=>{_0x6eb5c0['hasDomSelection']()&&_0x1e249a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5ca56d,_0x2717d4)=>{const _0x55c4cf=_0x2717d4['target'];_0x1209b1['isVisible']&&_0x1209b1['element']['contains'](_0x55c4cf)||_0x5d3056['view']['element']['contains'](_0x55c4cf)||this['activeAnnotation']&&_0x6eb5c0['hasDomSelection']()&&(_0xe98db8(),_0x5ca56d['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x6eb5c0);}['_destroyEditorAnnotationsIntegration'](_0x472f6e){_0x472f6e&&(this['stopListening'](_0x472f6e),this['_editorAnnotations']['remove'](_0x472f6e));}['_setSelectedAnnotations'](_0x9ee47){for(const _0xc30a02 of this['_selectedAnnotations'])_0x9ee47['includes'](_0xc30a02)||this['_manuallyClosedAnnotationViews']['delete'](_0xc30a02['view']);this['_selectedAnnotations']=_0x9ee47;}['_refreshPositioning'](){const _0x3ae4a2=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x3ae4a2['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2a69a3){if(this['_manuallyClosedAnnotationViews']['has'](_0x2a69a3['view']))return;const _0x1e7347=this['balloonPanelView']['content']['first'];_0x1e7347!==_0x2a69a3['view']?(_0x1e7347&&this['_detachListeners'](_0x1e7347),this['_attachListeners'](_0x2a69a3['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2a69a3['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x546c36=this['balloonPanelView']['content']['first'],_0x1bbe3f=_0x546c36&&this['annotations']['getByView'](_0x546c36);if(!_0x1bbe3f||!this['_annotationToNarrowView']['has'](_0x1bbe3f))return;const _0x7b26a8=this['_annotationToNarrowView']['get'](_0x1bbe3f)['element'],_0x1bf47a=(function(){const _0x3a2298=_0x183ff4['defaultPositions'];return[_0x3a2298['southArrowNorthEast'],_0x3a2298['northArrowSouthEast'],_0x3a2298['southArrowNorth'],_0x3a2298['northArrowSouth'],_0x3a2298['southArrowNorthWest'],_0x3a2298['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x7b26a8,'positions':_0x1bf47a});}['_hideBalloon'](){const _0x164cda=this['balloonPanelView'],_0x2946c3=_0x164cda['content']['first'];_0x2946c3&&(this['_detachListeners'](_0x2946c3),_0x164cda['unpin'](),_0x164cda['content']['clear']());}['_attachListeners'](_0x18f740){this['listenTo'](_0x18f740,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x18f740,'Esc',(_0x40a13a,_0x588df8)=>{this['_manuallyClosedAnnotationViews']['add'](_0x18f740),this['_hideBalloon'](),_0x588df8();});}['_detachListeners'](_0x2db437){this['stopListening'](_0x2db437);}}class c extends _0x5b353c{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x4968a3,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x522c12){super(_0x522c12),_0x522c12['editing']['view']['addObserver'](_0x504a68),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x522c12['plugins']['get'](_0x4968a3),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x577aac=this['editor']['plugins']['get'](j);_0x577aac['context']===this['editor']&&(_0x577aac['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x27db39,_0x47abad)=>{const _0x5c6dca=this['_balloon'];if(this['isAttached']&&_0x5c6dca['visibleView']){const _0x1a6885=this['annotations']['getByView'](_0x5c6dca['visibleView']);_0x1a6885&&this['_closeAnnotation'](_0x1a6885),_0x47abad();}}));}['afterInit'](){const _0x536427=this['editor']['plugins']['get'](j);_0x536427['context']===this['editor']&&(_0x536427['hasActive']()||_0x536427['switchTo']('inline'));}['setActiveAnnotation'](_0x417f44){_0x417f44!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x417f44&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x417f44)&&this['_addAnnotationToBalloon'](_0x417f44,!0x0),_0x417f44['isActive']=!0x0),_0x417f44||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x417f44);}['attach'](_0x52147d){this['annotations']=_0x52147d;const _0x294ffe=this['editor']['plugins']['get'](j),_0x4e1aa8=this['_balloon'];if(this['isAttached'])throw new _0x590e41('inlineannotations-attach-already-attached',this);if(_0x294ffe['context']!==this['editor'])throw new _0x590e41('inlineannotations-not-allowed-with-context',this);const _0x41b1f9=this['editor']['plugins']['get'](b);this['listenTo'](_0x41b1f9,'refresh',()=>{const _0x136c8e=_0x41b1f9['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3b20cc,_0x1d1293;!this['_forceRefresh']&&(_0x3b20cc=_0x136c8e,_0x1d1293=this['_selectedAnnotations'],_0x3b20cc['length']===_0x1d1293['length']&&_0x3b20cc['every'](_0x52fa80=>_0x1d1293['includes'](_0x52fa80)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x136c8e),this['setActiveAnnotation'](_0x136c8e[0x0]||null));}),this['listenTo'](_0x41b1f9,'blur',(_0x4fff52,{isAnnotationTracked:_0x4e2f0a})=>{this['activeAnnotation']&&_0x4e2f0a(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x30a361,_0x5d37f0,_0x52bae6)=>{_0x52bae6||this['setActiveAnnotation'](null);}),this['listenTo'](_0x52147d,'remove',(_0x481918,_0x4b89d1)=>{this['_removeAnnotationFromBalloon'](_0x4b89d1),_0x4b89d1===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4e1aa8,'change:visibleView',(_0xe08404,_0x5c57cf,_0x5f17b6,_0x439d0b)=>{_0x439d0b&&this['stopListening'](_0x439d0b);const _0x559230=_0x52147d['getByView'](_0x5f17b6);_0x5f17b6&&_0x559230&&(this['listenTo'](_0x5f17b6,'change:height',()=>{_0x4e1aa8['updatePosition']();}),this['listenTo'](_0x5f17b6,'Esc',()=>{this['_closeAnnotation'](_0x559230),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x559230&&this['setActiveAnnotation'](_0x559230));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4e1aa8['visibleView']&&(_0x52147d['getByView'](_0x4e1aa8['visibleView'])&&_0x4e1aa8['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 _0x590e41('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x4424c7 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x4424c7);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x49e1fc){for(const _0x16fc47 of this['_selectedAnnotations'])_0x49e1fc['includes'](_0x16fc47)||this['_manuallyClosed']['delete'](_0x16fc47);for(const _0xecbb56 of this['annotations'])_0x49e1fc['includes'](_0xecbb56)||this['_removeAnnotationFromBalloon'](_0xecbb56);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x58bcc2 of _0x49e1fc)this['_addAnnotationToBalloon'](_0x58bcc2);}this['_selectedAnnotations']=_0x49e1fc;}['_addAnnotationToBalloon'](_0x33550b,_0x3a047d=!0x1){this['_manuallyClosed']['has'](_0x33550b)||(this['_addedAnnotations']['has'](_0x33550b)||this['_balloon']['hasView'](_0x33550b['view'])||(this['_addedAnnotations']['add'](_0x33550b),this['_balloon']['add']({'stackId':_0x33550b['view']['id'],'view':_0x33550b['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x33550b)}})),_0x3a047d&&this['_balloon']['showStack'](_0x33550b['view']['id']));}['_getBalloonTargetForAnnotation'](_0xcf140d){const _0x25524e=_0xcf140d['target'],_0x5886e6=this['editor']['editing']['view'],_0x13a27c=_0x5886e6['document']['selection']['getFirstRange'](),_0x3ad4cc=_0x5886e6['domConverter']['viewRangeToDom'](_0x13a27c);if(_0x3ad4cc['collapse'](!0x0),_0x25524e){if(_0x25524e instanceof _0x2791cb)return _0x25524e;let _0x3f1563=[];for(const _0x2779c5 of _0x25524e)_0x3f1563['push'](...F(_0x2779c5['getClientRects']()));_0x3f1563=function(_0x254107){const _0x103719=[];let _0x25ea28=_0x254107[0x0];for(let _0x10bb5e=0x1;_0x10bb5e<_0x254107['length'];_0x10bb5e++)P(_0x25ea28,_0x254107[_0x10bb5e])?_0x25ea28['width']+=_0x254107[_0x10bb5e]['width']:(_0x103719['push'](_0x25ea28),_0x25ea28=_0x254107[_0x10bb5e]);return _0x103719['push'](_0x25ea28),_0x103719;}(_0x3f1563);const _0x1fe306=_0x3ad4cc['getBoundingClientRect']();return _0x3f1563['find'](_0x2fff97=>_0x2fff97['top']<=_0x1fe306['top']&&_0x2fff97['bottom']>=_0x1fe306['bottom']&&_0x2fff97['left']<=_0x1fe306['left']&&_0x2fff97['right']>=_0x1fe306['right'])||_0x3f1563[0x0];}return _0xcf140d['targetRect']||_0x3ad4cc;}['_removeAnnotationFromBalloon'](_0x23d4e5){this['_addedAnnotations']['has'](_0x23d4e5)&&this['_balloon']['hasView'](_0x23d4e5['view'])&&(this['_addedAnnotations']['delete'](_0x23d4e5),this['_balloon']['remove'](_0x23d4e5['view']));}['_closeAnnotation'](_0xc2c4b3){this['_manuallyClosed']['add'](_0xc2c4b3),this['_removeAnnotationFromBalloon'](_0xc2c4b3);}}function F(_0x5a7757){return Array['from'](_0x5a7757)['map'](DOMRect['fromRect']);}function P(_0x14a13c,_0x2126c5){return _0x14a13c['top']===_0x2126c5['top']&&_0x14a13c['bottom']===_0x2126c5['bottom']&&_0x14a13c['right']===_0x2126c5['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x18e24d,_0x4163b2){super(_0x18e24d),this['set']('isEmpty',!_0x4163b2['length']),this['focusTracker']=new _0x3c3dac(),this['_annotationViews']=_0x4163b2,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x449cde({'focusables':_0x4163b2,'focusTracker':this['focusTracker']}),this['listenTo'](_0x4163b2,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x4163b2,'remove',(_0x44918c,_0x5bc11b)=>{_0x5bc11b['isActive']&&this['focus'](),_0x4163b2['length']||(this['isEmpty']=!0x0);});const _0x1699c0=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x18e24d,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x4163b2},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1699c0['if']('isEmpty','ck-hidden',_0x47c15c=>!_0x47c15c)]},'children':[{'text':N(_0x18e24d,'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 _0x49acc3 of this['_annotationViews'])this['focusTracker']['add'](_0x49acc3['element']);this['_annotationViews']['on']('change',(_0x4f22d6,{added:_0x7fc098,removed:_0xda8b85})=>{for(const _0x8e9b23 of _0x7fc098)this['focusTracker']['add'](_0x8e9b23['element']);for(const _0x57aeca of _0xda8b85)this['focusTracker']['remove'](_0x57aeca['element']);});}}class p extends _0x33445d{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x6448e9){super(_0x6448e9),this['archivedThreads']=new _0x359f73();}['init'](){const _0x2dcd0b=this['context'],_0x4ebac7=_0x2dcd0b['plugins']['get'](o),_0x2ce9ff=_0x2dcd0b['plugins']['get'](y);this['listenTo'](_0x4ebac7,'addCommentThread',(_0x3b43b9,{threadId:_0x247974})=>{const _0x5f4f23=_0x4ebac7['getCommentThread'](_0x247974);_0x5f4f23['archivedAt']&&this['archivedThreads']['add'](_0x5f4f23,this['_calculatePosition'](_0x5f4f23['archivedAt'])),this['listenTo'](_0x5f4f23,'change:archivedAt',(_0x491450,_0x299669,_0x170739)=>{_0x170739?this['archivedThreads']['has'](_0x5f4f23)||this['archivedThreads']['add'](_0x5f4f23,this['_calculatePosition'](_0x5f4f23['archivedAt'])):this['archivedThreads']['has'](_0x5f4f23)&&this['archivedThreads']['remove'](_0x5f4f23);});}),this['listenTo'](_0x4ebac7,'removeCommentThread',(_0x347071,{threadId:_0x3a3cb3})=>{const _0x44f82a=_0x4ebac7['getCommentThread'](_0x3a3cb3);this['stopListening'](_0x44f82a),this['archivedThreads']['has'](_0x44f82a)&&this['archivedThreads']['remove'](_0x44f82a);},{'priority':'highest'}),this['listenTo'](_0x2ce9ff['collection'],'focus',(_0x2db693,_0x71bee1)=>{_0x71bee1['isVisible']||(_0x71bee1['isActive']=!0x0,_0x2ce9ff['activate'](_0x71bee1));});}['_calculatePosition'](_0x7fb025){const _0x3c0e62=[...this['archivedThreads']]['findIndex'](_0x3a44e7=>_0x3a44e7['archivedAt']<_0x7fb025);return _0x3c0e62>-0x1?_0x3c0e62:this['archivedThreads']['length'];}}class a extends _0x5b353c{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3ec997];}constructor(_0x4af2f5){super(_0x4af2f5),this['annotationViews']=new _0x29d793(),this['_pendingThreads']=[];}['init'](){const _0x206bbc=this['editor'],_0x4ffe53=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x206bbc['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x3d9446,!0x0)),_0x206bbc['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x528002=this['_createCommentsArchiveButton'](_0x1f6489);return _0x528002['set']({'role':'menuitemcheckbox'}),_0x528002;});const _0x3bfd01=_0x206bbc['plugins']['get'](p),_0x27b218=_0x206bbc['plugins']['get']('Annotations'),_0x3a720e=_0x206bbc['plugins']['get']('CommentsRepository');_0x3bfd01['archivedThreads']['forEach'](_0x5ba032=>{this['_handleNewThread'](_0x5ba032);}),this['listenTo'](_0x3bfd01['archivedThreads'],'add',(_0x3e4401,_0x52e3b0)=>{this['_handleNewThread'](_0x52e3b0);}),this['listenTo'](_0x27b218['collection'],'add',(_0x6a389b,_0x9cbcc7)=>{const _0x26be44=this['_pendingThreads']['find'](_0x4d291c=>{const _0x1e1a0a=_0x3a720e['_threadToController']['get'](_0x4d291c);return _0x1e1a0a&&_0x9cbcc7['innerView']===_0x1e1a0a['view'];});if(_0x26be44){const _0x1c352b=this['_calculatePosition'](_0x26be44['archivedAt']);this['annotationViews']['add'](_0x9cbcc7['view'],_0x1c352b),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x26be44),0x1);}}),this['listenTo'](_0x3bfd01['archivedThreads'],'remove',(_0x48a326,_0x30f543)=>{const _0x5db055=_0x206bbc['config']['get']('collaboration.channelId');if(!_0x5db055||_0x30f543['channelId']===_0x5db055){if(this['_pendingThreads']['includes'](_0x30f543))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x30f543),0x1);else{const _0x5958f4=_0x3a720e['_threadToController']['get'](_0x30f543),_0x4de1a7=_0x27b218['getByInnerView'](_0x5958f4['view']);this['annotationViews']['remove'](_0x4de1a7['view']),this['stopListening'](_0x4de1a7['focusableElements']);}}}),this['listenTo'](_0x27b218['collection'],'add',(_0x3f3b23,_0x114750)=>{this['listenTo'](_0x114750,'escape',_0x4ffe53);}),this['listenTo'](_0x27b218['collection'],'remove',(_0x502f4,_0x37fa90)=>{this['stopListening'](_0x37fa90,'escape',_0x4ffe53);});}['_handleNewThread'](_0x312b5d){const _0x1a9539=this['editor']['plugins']['get']('CommentsRepository'),_0x422117=this['editor']['plugins']['get']('Annotations'),_0x222066=this['editor']['config']['get']('collaboration.channelId');if(!_0x222066||_0x312b5d['channelId']===_0x222066){const _0xff11d1=_0x1a9539['_threadToController']['get'](_0x312b5d);if(!_0xff11d1)return void this['_pendingThreads']['push'](_0x312b5d);const _0x1ee6a6=this['_calculatePosition'](_0x312b5d['archivedAt']),_0x4e8110=_0x422117['getByInnerView'](_0xff11d1['view']);_0x4e8110['isVisible']&&_0x422117['_visibleAnnotations']['remove'](_0x4e8110),this['annotationViews']['add'](_0x4e8110['view'],_0x1ee6a6);}}['_calculatePosition'](_0x28042a){const _0x4ed008=this['editor']['config']['get']('collaboration.channelId'),_0x38cab4=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x1ebcd1=>_0x1ebcd1['channelId']===_0x4ed008)['findIndex'](_0x36f39b=>_0x36f39b['archivedAt']<_0x28042a);return _0x38cab4<0x0||_0x38cab4>this['annotationViews']['length']?this['annotationViews']['length']:_0x38cab4-0x1;}['_toggleDialog'](){const _0x3b79a7=this['editor'],_0x1ffd22=_0x3b79a7['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x3b79a7['locale'],this['annotationViews'])),'commentsArchive'===_0x1ffd22['id']?_0x1ffd22['hide']():_0x1ffd22['show']({'id':'commentsArchive','title':N(_0x3b79a7['locale'],'COMMENTS_ARCHIVE'),'icon':_0x2cb3c9,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2ea051['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x521119,_0x47050a=!0x1){const _0x444a24=this['editor']['locale'],_0x55ba1d=this['editor']['plugins']['get']('Dialog'),_0x201023=new _0x521119(_0x444a24);return _0x201023['bind']('isEnabled')['to'](this,'isEnabled'),_0x201023['bind']('isOn')['to'](_0x55ba1d,'id',_0x2e7df0=>'commentsArchive'===_0x2e7df0),_0x201023['set']({'label':N(_0x444a24,'COMMENTS_ARCHIVE'),'icon':_0x2cb3c9,'isToggleable':!0x0}),_0x47050a&&(_0x201023['tooltip']=!0x0),this['listenTo'](_0x201023,'execute',()=>this['_toggleDialog']()),_0x201023;}['_hideDialogOnAnnotationEscape']=_0x5a6a67=>{const _0x51bd8f=_0x5a6a67['source'];if(!this['annotationViews']['has'](_0x51bd8f['view']))return;const _0x3d6709=this['editor']['plugins']['get']('Dialog');_0x3d6709['isOpen']&&'commentsArchive'===_0x3d6709['id']&&(_0x3d6709['hide'](),_0x5a6a67['stop']());};}class gi extends _0x5b353c{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 _0xfd0b6d,ContextPlugin as _0x6da988,PendingActions as ht,Command as _0x211dce,Plugin as _0x15d9b0,Context as _0x25b120}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x525196,uid as _0x348f70,KeystrokeHandler as jt,FocusTracker as _0x2b83b1,diff as _0x3226a8,Collection as _0x5b9636,Rect as _0x2315c3,CKEditorError as _0x1f0298,first as _0x4bc66a,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x4f4f12,keyCodes as _0x6195a0}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x3d2d44,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x553560,trimHtml as ts,LateFocusDropdownButtonView as _0x2ecc7c,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x3d0eb6}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as Ct,debounce as _0x721014}from'es-toolkit/compat';import{IconUndo as _0x43eba0,IconCheck as _0x28bedd,IconPencil as _0x354abe,IconRemoveComment as _0x3fdadd,IconThreeVerticalDots as _0x37bd34,IconAddComment as _0x1406a2,IconCommentsArchive as _0x31b9c7}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x4a1f00,ButtonView as _0x43a6f1,ViewCollection as _0x15fda6,createDropdown as _0x150f28,ListView as _0x28c543,focusChildOnDropdownOpen as _0x4c4ec0,ListItemView as _0x4d9652,MenuBarMenuListItemButtonView as _0x42a00d,BodyCollection as _0xfa9d62,BalloonPanelView as _0xe1d81d,ContextualBalloon as _0x324b7e,Dialog as _0xd8f5f5,DialogViewPosition as _0x1a8773}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x485918}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 _0x405e7b}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x446e36}from'@ckeditor/ckeditor5-widget/dist/index.js';class yt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x525196(){['model'];['view'];constructor(_0x2f531c,_0x1c1a2a){super(),this['model']=_0x2f531c,this['model']['_isAttached']=!0x0,this['view']=_0x1c1a2a,this['listenTo'](_0x1c1a2a,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x1c1a2a,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x1c1a2a,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x1c1a2a,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x1c1a2a,'addComment',(_0x4cfc95,_0x518755)=>this['addComment'](_0x518755)),this['listenTo'](_0x1c1a2a,'updateComment',(_0x712fbb,_0x510234,_0x34c8b0)=>this['updateComment'](_0x510234,_0x34c8b0)),this['listenTo'](_0x1c1a2a,'removeComment',(_0xb18e1b,_0x47d764)=>this['removeComment'](_0x47d764));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x424fa7){this['model']['addComment']({'content':_0x424fa7,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x13e022,_0x468164){this['model']['getComment'](_0x13e022)['update']({'content':_0x468164});}['removeComment'](_0x21e7db){this['model']['getComment'](_0x21e7db)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x5bc129,_0x339b7a,_0x41ede3){const t=_0x5bc129['t'];switch(_0x339b7a){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'},_0x41ede3);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'},_0x41ede3);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'},_0x41ede3);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'},_0x41ede3);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x41ede3);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'},_0x41ede3);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'},_0x41ede3);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'},_0x41ede3);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(_0x1ce00a,_0x3574a3){super(_0x1ce00a);const _0x2876ab=_0x348f70();this['main']=this['createCollection'](),this['editable']=new Vt(_0x1ce00a,_0x3574a3,void 0x0,{'label':()=>N(_0x1ce00a,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1ce00a['uiLanguageDirection'],'lang':_0x1ce00a['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x2876ab},'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(_0x1d25f8){super(_0x1d25f8),this['view']=new Rt(_0x1d25f8['locale'],_0x1d25f8['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x227d3a=this['editor']['editing']['view'],_0x413bb1=this['view']['editable'],_0x375222=_0x227d3a['document']['getRoot']();_0x413bb1['name']=_0x375222['rootName'],this['view']['render']();const _0x231040=_0x413bb1['element'];this['setEditableElement'](_0x413bb1['name'],_0x231040),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x227d3a['attachDomRoot'](_0x231040),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x525196(_0xfd0b6d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x4ef63f={}){function _0x41f41b(_0x58b740){return _0x58b740['map'](_0xd2ad2e=>String['fromCharCode'](_0xd2ad2e))['join']('');}(_0x4ef63f=Object['assign']({},_0x4ef63f))['plugins']||(_0x4ef63f['plugins']=Qt['defaultPlugins']),super(_0x4ef63f),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[_0x41f41b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x41f41b([0x76,0x69,0x65,0x77])][_0x41f41b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x41f41b([0x61,0x75,0x74,0x6f]),this[_0x41f41b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x41f41b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x41f41b([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x41f41b([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x41f41b([0x6f,0x6b])});}['create'](){const _0xa22276=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0xa22276))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2e6076=>{const _0x24fd9f=this['model']['document']['getRoot'](),_0x2bec87=_0x24fd9f&&_0x24fd9f['getChild'](_0x24fd9f['childCount']-0x1);_0x2e6076['setSelection'](_0x2bec87,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x30a9ad=this['editing']['view'],_0x466273=_0x30a9ad['document']['getRoot'](),_0x4564f0=_0x466273['getChild'](0x0);_0x466273['childCount']>0x1||!_0x4564f0||'p'!=_0x4564f0['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x30a9ad,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4564f0['placeholder']=this['placeholder']),St({'view':_0x30a9ad,'element':_0x4564f0,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4564f0);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x3ac68d,_0x1c472f={}){super(_0x3ac68d),this['editor']=null,this['_editorConfig']=_0x1c472f,this['set']('value',_0x1c472f['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x3ac68d,'Reply...')),this['set']('submitLabel',N(_0x3ac68d,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x2b83b1(),this['focusCycler']=new _0x4a1f00({'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',(_0x5eeca5,_0x21b773)=>{this['cancelButtonView']['fire']('execute'),_0x21b773();}),this['keystrokes']['set']('Ctrl+Enter',(_0x2b77db,_0x2e20a2)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x2e20a2());}),this['on']('submit',(_0x19f41e,_0x4c1263)=>{_0x4c1263['length']>0xfde8?(alert(N(_0x3ac68d,'TOO_LONG_COMMENT_ALERT',[_0x4c1263['length'],0xfde8])),_0x19f41e['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 _0x416eac=this['editor'];this['element']['insertBefore'](_0x416eac['ui']['element'],this['element']['firstChild']),_0x416eac['model']['document']['on']('change',()=>this['value']=_0x416eac['getData']()),_0x416eac['bind']('placeholder')['to'](this),this['focusables']['add'](_0x416eac['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3e877f){-0x1===_0x3e877f?(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:_0x464591}=this,_0x4445fd=new _0x43a6f1(_0x464591);return _0x4445fd['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4445fd['withText']=!0x0,_0x4445fd['bind']('label')['to'](this,'submitLabel'),_0x4445fd['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4445fd['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x1de36f,_0xb485ba)=>!_0xb485ba&&!!_0x1de36f['trim']()),_0x4445fd;}['_createCancelButton'](){const {locale:_0x505587}=this,_0x21e752=new _0x43a6f1(_0x505587);return _0x21e752['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x21e752['label']=N(_0x505587,'Cancel'),_0x21e752['withText']=!0x0,_0x21e752['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x21e752;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x2ffb6c=>{this['focusTracker']['add'](_0x2ffb6c['element']);}),this['focusables']['on']('change',(_0x521584,_0x3f8bf2)=>{for(const _0x4d2cda of Array['from'](_0x3f8bf2['added'])['reverse']())this['focusTracker']['add'](_0x4d2cda['element']);});}}class ie extends kt{constructor(_0x3e4c87,_0x41a095,_0x3834a0){super(_0x3e4c87),this['commentInputView']=new es(_0x3e4c87,_0x3834a0),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x38e892,_0x4da5a4)=>_0x38e892||!!_0x4da5a4),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 _0x3d2d44(_0x3e4c87,_0x41a095),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'](_0x10ffe7){this['commentInputView']['focus'](_0x10ffe7);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xc838ed,_0x3c1a51)=>{const {submitButtonView:_0x510752,cancelButtonView:_0x4af237,editor:_0x46ab26}=this['commentInputView'];[_0x510752['element'],_0x4af237['element'],_0x46ab26?_0x46ab26['editing']['view']['getDomRoot']():null]['filter'](_0x1a1631=>_0x1a1631)['some'](_0x5de1ee=>_0x5de1ee['contains'](_0x3c1a51['target']))||(this['focus'](),_0x3c1a51['preventDefault']());});}}class os extends kt{constructor(_0x212f5e){super(_0x212f5e);const _0x411975=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x411975['to']('count',_0x1c69c6=>N(_0x212f5e,'NUMBER_OF_COMMENTS',_0x1c69c6))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x5989aa,_0x2f1eac,_0x5a3ed6){super(_0x5989aa);const _0x13d7ed=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2f1eac['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2f1eac,this['_config']=_0x5a3ed6,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2b83b1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a1f00({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x436ad9=>this['commentViews']['map'](_0x3107cd=>_0x3107cd['element'])['includes'](_0x436ad9['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x5989aa),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x460e27=>_0x460e27-this['_config']['maxCommentsWhenCollapsed']);for(const _0x9b3a1e of _0x2f1eac['comments'])this['_handleNewCommentModel'](_0x9b3a1e);this['_handleInfoComment'](),this['listenTo'](_0x2f1eac['comments'],'add',(_0xb683b8,_0x2bae2d)=>{const _0x3f13cd=this['_calculatePosition'](_0x2bae2d);this['length']++,this['_handleNewCommentModel'](_0x2bae2d,_0x3f13cd),this['refreshVisibleViews']();}),this['listenTo'](_0x2f1eac['comments'],'remove',(_0x1a42aa,_0x142db9)=>{this['length']--,this['_handleRemoveCommentModel'](_0x142db9),this['refreshVisibleViews']();}),this['listenTo'](_0x2f1eac,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2f1eac,'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',_0x13d7ed['if']('length','ck-hidden',_0x365765=>!_0x365765)],'aria-label':N(_0x5989aa,'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'](_0x52185f){-0x1===_0x52185f?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xfbf304 of this['commentViews'])_0xfbf304['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x4a6829,_0x4fdb9e){const _0x5f4c3d=new this['_config']['CommentView'](this['locale'],_0x4a6829,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x5f4c3d['viewUid']=_0x4a6829['id'],_0x5f4c3d['delegate']('removeComment')['to'](this),_0x5f4c3d['delegate']('updateComment')['to'](this),_0x5f4c3d['delegate']('resolveCommentThread')['to'](this),_0x5f4c3d['delegate']('editorReady')['to'](this),_0x5f4c3d['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x5f4c3d,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x5f4c3d,_0x4fdb9e);}['_calculatePosition'](_0x566d19){const _0x3b1de2=this['_model']['_findOptimalIndex'](_0x566d19);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x566d19['authoredAt']?_0x3b1de2-0x1:_0x3b1de2:_0x3b1de2-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x342dfb={'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'],_0x342dfb,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x342dfb));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x57e29d){const _0x2c2231=this['commentViews']['remove'](_0x57e29d['id']);this['stopListening'](_0x2c2231),_0x2c2231['isEditMode']&&this['_updateHasDirtyComment'](),_0x2c2231['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2819ba=>_0x2819ba['isEditMode']);}['_rearrangeCollapse'](){const _0xa24247=function(_0x38a09f){const _0x21c2f7=new _0x5b9636();for(const _0x587f53 of _0x38a09f)_0x21c2f7['add'](_0x587f53);return _0x21c2f7;}(this['commentViews']),_0xf2c2a=this['_collapsedCommentsView']['count'];for(let _0x282574=0x1;_0x282574<=_0xf2c2a;_0x282574++)_0xa24247['remove'](0x1);for(const _0x18291f of _0xa24247)_0x18291f['collapse']();_0xf2c2a>0x0&&_0xa24247['add'](this['_collapsedCommentsView'],0x1),rs(_0x3226a8(Array['from'](this['visibleViews']),Array['from'](_0xa24247)),this['visibleViews'],_0xa24247);}['_rearrangeExpand'](){rs(_0x3226a8(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x5bc763 of this['visibleViews'])_0x5bc763['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x8119d4=>{this['focusTracker']['add'](_0x8119d4['element']),this['keystrokes']['listenTo'](_0x8119d4['element']);}),this['commentViews']['on']('change',(_0x489f32,_0x100951)=>{for(const _0x357d76 of _0x100951['removed'])this['focusTracker']['remove'](_0x357d76['element']),this['keystrokes']['stopListening'](_0x357d76['element']);for(const _0x2e3060 of Array['from'](_0x100951['added'])['reverse']())this['focusTracker']['add'](_0x2e3060['element']),this['keystrokes']['listenTo'](_0x2e3060['element']);});}}function rs(_0x1c6ea7,_0x36c354,_0x286b4a){let _0x5ed7df=0x0;for(const _0xc3ea17 of _0x1c6ea7)switch(_0xc3ea17){case'insert':_0x36c354['add'](_0x286b4a['get'](_0x5ed7df),_0x5ed7df),_0x5ed7df++;break;case'delete':_0x36c354['remove'](_0x5ed7df);break;case'equal':_0x5ed7df++;}}class oe extends kt{constructor(_0xdc602){super(_0xdc602);const _0x405c46=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x405c46['to']('contextValue',_0x553526=>N(_0xdc602,'THREAD_CONTEXT_LABEL',_0x553526)),'tabindex':-0x1},'children':[{'text':_0x405c46['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x29fcff,_0x238e7b){super(_0x29fcff);const _0x5198d1=this['bindTemplate'];this['_model']=_0x238e7b,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2b83b1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a1f00({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x12217c=>!!_0x12217c),this['bind']('contextValue')['to'](this['_model'],'context',_0xac2c52=>_0xac2c52&&_0xac2c52['value']?this['_trimContextValue'](_0xac2c52['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',_0x5198d1['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 _0x50e4b3=new _0x43a6f1(this['locale']);return _0x50e4b3['label']=N(this['locale'],'Reopen'),_0x50e4b3['tooltip']=N(this['locale'],'Reopen'),_0x50e4b3['icon']=_0x43eba0,_0x50e4b3['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x293a03=>!_0x293a03),_0x50e4b3['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3e32f6,_0x1c024e)=>_0x3e32f6&&_0x1c024e),_0x50e4b3['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x50e4b3;}['_trimContextValue'](_0x31acba){if(_0x31acba['length']<0x96)return _0x31acba;const _0x3204f1=_0x31acba['lastIndexOf']('\x20',0x93);return _0x31acba['substring'](0x0,_0x3204f1>-0x1?_0x3204f1:0x93)+'...';}['_attachContextActions'](){const _0x20bbf5=this['element']['querySelector']('.ck-context'),_0x27d037=_0x20bbf5['querySelector']('.ck-context__value');this['listenTo'](_0x20bbf5,'mouseenter',()=>{_0x27d037['offsetWidth']<_0x27d037['scrollWidth']&&_0x20bbf5['classList']['add']('overlay');}),this['listenTo'](_0x20bbf5,'mouseleave',()=>{_0x20bbf5['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x50ae1c of this['focusables'])this['focusTracker']['add'](_0x50ae1c['element']),this['keystrokes']['listenTo'](_0x50ae1c['element']);}['_createContextView'](){const _0x4bfd02=new oe(this['locale']);return _0x4bfd02['bind']('contextValue')['to'](this),_0x4bfd02;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x349732,_0x3b7af9,_0x806850,_0x1af8ed){super(_0x349732),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3b7af9,this['_localUser']=_0x806850,this['_config']=_0x1af8ed,this['commentThreadHeaderView']=new Xt(_0x349732,_0x3b7af9),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x349732,N(_0x349732,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x349732,_0x3b7af9,Object['assign']({'CommentView':this['_config']['CommentView']},_0x1af8ed)),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',(_0x46368c,_0x260e61)=>_0x46368c||!!_0x260e61),this['bind']('isUnlinked')['to'](_0x3b7af9,'unlinkedAt',_0x158edf=>!!_0x158edf),this['bind']('ariaLabel')['to'](this,'length',_0x3eb391=>{const _0x129c94=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x3eb391,_0x129c94]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2b83b1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a1f00({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3a4a67=>_0x3a4a67['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 _0x4b73bc=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x3c2ca1=_0x4b73bc['commentInputView'];return _0x4b73bc['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x3c2ca1,'value',(_0xe7ebc4,_0x35b51f,_0x593f18,_0x5767fb,_0x21c887)=>!!_0x21c887||!!_0x5767fb&&_0x593f18&&!_0x35b51f||_0xe7ebc4&&_0x593f18&&!_0x35b51f),_0x3c2ca1['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4f4de4,_0x873191,_0x19e96a)=>{let _0x5497bb;return _0x5497bb=_0x19e96a&&_0x873191?'Reply\x20to\x20reopen\x20discussion...':_0x4f4de4?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5497bb);}),_0x3c2ca1['bind']('submitLabel')['to'](this,'length',_0x46c435=>N(this['locale'],_0x46c435?'Reply':'Comment')),_0x3c2ca1['on']('submit',(_0x56d93b,_0x86a484)=>{this['fire']('addComment',_0x86a484),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x3c2ca1['on']('cancel',()=>{this['focus']();}),_0x3c2ca1['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x3c2ca1['on']('cancel',_0x5da627=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5da627['stop']());}),this['on']('change:isActive',(_0x3e391c,_0x43d0af,_0x86c917)=>{_0x86c917||this['length']||_0x3c2ca1['value']||this['fire']('removeCommentThread');}),_0x4b73bc;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x238be7,_0x58d5b2,_0x36591d,_0x5d9b22){super(_0x238be7,_0x58d5b2,_0x36591d,_0x5d9b22),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x238be7,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2ec347,_0x2cf17a,_0x3f973f)=>{_0x3f973f||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1995b8,_0x31264e,_0x19b0c3)=>{_0x19b0c3&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x2851bd=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x2851bd['if']('isActive','ck-thread--active'),_0x2851bd['if']('isUnlinked','ck-thread--unlinked'),_0x2851bd['if']('isConfirm','ck-thread--remove-confirmation'),_0x2851bd['to']('actionIndicator',_0x452e07=>_0x452e07?'ck-thread--'+_0x452e07:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x2851bd['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 _0x3701af of this['commentsListView']['commentViews'])_0x3701af['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x9d2a87}=this,_0x54fa40=this['commentsListView']['commentViews']['get'](0x0);_0x54fa40===this['_boundFirstCommentView']||_0x54fa40['isSystemComment']||(this['_boundFirstCommentView']=_0x54fa40,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x54fa40,'actionIndicator',_0x3a0502=>'remove'===_0x3a0502?'remove':null),_0x54fa40['placeholder']=N(_0x9d2a87,'Write\x20a\x20comment...'),_0x54fa40['removeButton']['on']('execute',_0x522873=>{_0x522873['stop'](),this['showConfirm'](N(_0x9d2a87,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x54fa40['focus']();}),_0x54fa40['actionBar']['add'](this['resolveButton'],0x0),_0x54fa40['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x50f278=new _0x553560(this['locale']);return _0x50f278['label']=N(this['locale'],'Resolve'),_0x50f278['tooltip']=N(this['locale'],'Resolve'),_0x50f278['icon']=_0x28bedd,_0x50f278['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x50f278['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3ccc49=>!_0x3ccc49),_0x50f278['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x16c578,_0x111eb2)=>_0x16c578&&!_0x111eb2),_0x50f278['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x50f278;}['_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(_0x4aa1c5){super(_0x4aa1c5),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x33936a,_0x319b93,_0x418cd3)=>{this['element']['innerHTML']=_0x418cd3;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x2925d6,_0x1e18e6,_0x4b8ebc){super(_0x2925d6),this['_model']=_0x1e18e6,this['_config']=_0x4b8ebc,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1e18e6,'content',_0x1e18e6,'authoredAt',(_0x44c8ab,_0xe7461)=>N(_0x2925d6,'COMMENT_ARIA_LABEL',[_0x1e18e6['author']['name'],_0x4b8ebc['formatDateTime'](_0xe7461),new DOMParser()['parseFromString'](_0x44c8ab,'text/html')['body']['textContent'],_0x1e18e6['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x2925d6,N(_0x2925d6,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x15fda6(),this['focusTracker']=new _0x2b83b1(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4a1f00({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x1c8354=>_0x1c8354['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 _0x4efdff=new is(this['locale']);return _0x4efdff['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x59b116,_0x275ad3)=>_0x275ad3?ts(_0x59b116,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x59b116),_0x4efdff;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x4e6558=new es(this['locale'],this['_config']['editorConfig']);return _0x4e6558['value']=this['_model']['content'],_0x4e6558['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x4e6558['submitLabel']=N(this['locale'],'Save'),_0x4e6558['on']('submit',(_0x11eadf,_0x289b67)=>{this['fire']('updateComment',this['_model']['id'],_0x289b67),this['switchToDisplayMode'](),this['focus']();}),_0x4e6558['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x4e6558['once']('editorReady',()=>{_0x4e6558['focus']();}),_0x4e6558['createEditor'](),_0x4e6558['delegate']('editorReady')['to'](this),_0x4e6558['delegate']('editorDestroyed')['to'](this),_0x4e6558;}['_setupKeyboardNavigation'](){const _0x273654=this['element'];this['keystrokes']['listenTo'](_0x273654);for(const _0x3816c7 of this['focusables'])this['focusTracker']['add'](_0x3816c7['element']),this['keystrokes']['listenTo'](_0x3816c7['element']);this['focusables']['on']('change',(_0x375a9a,_0x4bdad4)=>{for(const _0x14873a of _0x4bdad4['removed'])this['focusTracker']['remove'](_0x14873a['element']),this['keystrokes']['stopListening'](_0x14873a['element']);for(const _0x57f760 of _0x4bdad4['added'])this['focusTracker']['add'](_0x57f760['element']),this['keystrokes']['listenTo'](_0x57f760['element']);}),this['keystrokes']['set']('enter',(_0x67167b,_0x16100c)=>{_0x273654===_0x67167b['target']&&(this['focusCycler']['focusFirst'](),_0x16100c());}),this['keystrokes']['set']('esc',(_0x453a5f,_0x467a1f)=>{_0x273654!==_0x453a5f['target']&&(this['focus'](),_0x467a1f());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x1c90e4,_0x2f1818,_0x1073b5){super(_0x1c90e4,_0x2f1818,_0x1073b5),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x1c90e4,'Reply...')),this['bind']('authoredAt')['to'](_0x2f1818),this['bind']('resolvedAt')['to'](_0x2f1818),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 _0x3d2d44(_0x1c90e4,_0x2f1818['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2f1818,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x3bc31a=this['bindTemplate'],_0xe01804=[{'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':_0x3bc31a['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x3bc31a['to']('authoredAt',_0x4e822e=>this['_config']['formatDateTime'](_0x4e822e))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x3bc31a['if']('isEditMode','ck-comment__actions--hidden'),_0x3bc31a['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']&&_0xe01804['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x3bc31a['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x3bc31a['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x3bc31a['if']('isEditMode','ck-comment--edit'),_0x3bc31a['if']('isSystemComment','ck-comment--info'),_0x3bc31a['to']('actionIndicator',_0xe3983=>_0xe3983?'ck-comment--'+_0xe3983:'')],'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':_0xe01804}]}]};}['_createEditButton'](){const _0x5d21f2=new _0x43a6f1(this['locale']);return _0x5d21f2['label']=N(this['locale'],'Edit'),_0x5d21f2['icon']=_0x354abe,_0x5d21f2['withText']=!0x0,_0x5d21f2['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x5d21f2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4d0483=>!_0x4d0483),_0x5d21f2['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x5d21f2['on']('execute',()=>this['switchToEditMode']()),_0x5d21f2;}['_createRemoveButton'](){const _0xb8d0bd=new _0x43a6f1(this['locale']);return _0xb8d0bd['label']=N(this['locale'],'Remove'),_0xb8d0bd['icon']=_0x3fdadd,_0xb8d0bd['withText']=!0x0,_0xb8d0bd['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0xb8d0bd['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x2fddf1=>!_0x2fddf1),_0xb8d0bd['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0xb8d0bd['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0xb8d0bd;}['_createDropdown'](){const _0xb943b1=_0x150f28(this['locale'],_0x2ecc7c),_0x3bc57e=_0xb943b1['panelView']['children'],_0x56f376=new _0x28c543(this['locale']),_0x337614=_0xb943b1['bindTemplate'];_0x4c4ec0(_0xb943b1,()=>this['items']['find'](_0x24e92b=>_0x24e92b['isVisible'])),_0xb943b1['extendTemplate']({'attributes':{'class':[_0x337614['if']('isVisible','ck-hidden',_0x1fb3a8=>!_0x1fb3a8)]}});const _0xad91bd=(_0x2484f9,_0x6e0f23=-0x1)=>{const _0x17870a=new _0x4d9652(this['locale']);_0x17870a['children']['add'](_0x2484f9);const _0x407853=_0x6e0f23>-0x1?_0x6e0f23:_0x56f376['items']['length'];_0x56f376['items']['add'](_0x17870a,_0x407853);const _0x4a54c0=Array['from'](this['items']);_0xb943b1['unbind']('isEnabled','isVisible'),_0xb943b1['bind']('isEnabled')['toMany'](_0x4a54c0,'isEnabled',(..._0x5c5e4d)=>_0x5c5e4d['some'](_0x4968f7=>_0x4968f7)),_0xb943b1['bind']('isVisible')['toMany'](_0x4a54c0,'isVisible',(..._0x18aaf1)=>_0x18aaf1['some'](_0x222792=>_0x222792));};_0xb943b1['panelPosition']='sw',_0xb943b1['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x37bd34});for(const _0x36071e of this['items'])_0xad91bd(_0x36071e);return _0x3bc57e['add'](_0x56f376),_0xb943b1['listenTo'](this['items'],'add',(_0x3594f2,_0xb4b428,_0x23ed8a)=>{_0xad91bd(_0xb4b428,_0x23ed8a);}),_0xb943b1['listenTo'](this['items'],'remove',(_0x1cbe36,_0x1512c9,_0x36134e)=>{_0x56f376['items']['remove'](_0x36134e);}),_0xb943b1;}['_attachActions'](_0xd96bc0,_0x41482d){const _0x4ebe4a=_0xd96bc0&&_0xd96bc0['element'];_0x4ebe4a&&(this['listenTo'](_0x4ebe4a,'mouseenter',()=>this['actionIndicator']=_0x41482d),this['listenTo'](_0x4ebe4a,'focus',()=>this['actionIndicator']=_0x41482d),this['listenTo'](_0x4ebe4a,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x4ebe4a,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x31c907=super['_createCommentInputView']();return _0x31c907['bind']('placeholder')['to'](this),_0x31c907;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x5dd880){const _0x32e749=Dt(_0x5dd880,0x1e),_0x3bd8a6=new MutationObserver(_0x4ef12f=>{for(const _0x507043 of _0x4ef12f)('attributes'==_0x507043['type']&&'class'==_0x507043['attributeName']||'childList'==_0x507043['type']||'characterData'==_0x507043['type'])&&_0x32e749();});return{'attach'(_0x277a50){_0x3bd8a6['observe'](_0x277a50,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x3bd8a6['disconnect'](),_0x32e749['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x32ec62,_0x46ee7a){super(_0x32ec62),this['id']=_0x348f70(),this['focusTracker']=new _0x2b83b1(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x2804a6,_0xcbf9a0)=>this['fire']('Esc',_0xcbf9a0)),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'](_0x46ee7a),this['mainView']=_0x46ee7a;const _0x544ab8=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x544ab8['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 _0x3673df=this['element']['clientHeight'];_0x3673df&&(this['height']=_0x3673df);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x525196(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x58e881,target:_0xd7c180,type:_0x2f5a7b,isVisible:_0x162767=!0x0}){super(),this['view']=_0x58e881,this['view']['element']||this['view']['render'](),this['_type']=_0x2f5a7b,this['_target']=_0xd7c180,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x5b9636([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x3fd2ba,_0x16aaa3)=>{this['view']['focusTracker']['add'](_0x16aaa3);}),this['focusableElements']['on']('remove',(_0x95778a,_0x569c05)=>{this['view']['focusTracker']['remove'](_0x569c05);}),this['set']('isVisible',_0x162767);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xc1066b=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0xc1066b),_0xc1066b;}get['targetRect'](){const _0x5a5060=this['target'];if(null===_0x5a5060)return null;if(_0x5a5060 instanceof _0x2315c3)return _0x5a5060;const _0x4bbdde=_0x5a5060['filter'](_0x3b9bbb=>function(_0x114ad6){const _0x414294=_0x114ad6['offsetParent'];if(_0x414294)return!0x0;const _0xb2e32a=_0x114ad6['getClientRects']()['item'](0x0);return!!_0xb2e32a;}(_0x3b9bbb));return 0x0===_0x4bbdde['length']?null:new _0x2315c3(_0x4bbdde[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x209003){this['view']['isActive']=_0x209003,this['view']['mainView']['isActive']=_0x209003;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2201ec){if(!(null===_0x2201ec||_0x2201ec instanceof _0x2315c3||Array['isArray'](_0x2201ec)&&_0x2201ec['every'](_0x54fd74=>fi(_0x54fd74))))throw new _0x1f0298('annotation-invalid-target',null,{'target':_0x2201ec});}['_getNormalizedTarget'](){const _0x2d7f0e='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x2d7f0e)?[_0x2d7f0e]:_0x2d7f0e;}}function fi(_0x50a750){return null!==_0x50a750&&'object'==typeof _0x50a750&&'nodeType'in _0x50a750&&0x1===_0x50a750['nodeType'];}class S extends _0x5b9636{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x25e15e=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2b83b1(),this['_focusTracker']['on']('change:isFocused',(_0x2eacfe,_0xbd8466,_0x2cc49d)=>{_0x2cc49d||this['fire']('blur');});for(const _0x3aad58 of _0x25e15e)this['add'](_0x3aad58);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x2e95ac){if(this['has'](_0x2e95ac))throw new _0x1f0298('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x2e95ac['innerView'],_0x2e95ac),this['_viewToAnnotation']['set'](_0x2e95ac['view'],_0x2e95ac);for(const _0x59a1ad of _0x2e95ac['focusableElements'])this['_focusTracker']['add'](_0x59a1ad);this['listenTo'](_0x2e95ac['focusableElements'],'add',(_0x3fc2a9,_0x2dde8d)=>{this['_focusTracker']['add'](_0x2dde8d);}),this['listenTo'](_0x2e95ac['focusableElements'],'remove',(_0x379ea7,_0x803006)=>{this['_focusTracker']['remove'](_0x803006);}),this['listenTo'](_0x2e95ac['view']['focusTracker'],'change:isFocused',(_0x8412b0,_0x4441df,_0x84b458)=>{_0x84b458&&this['fire']('focus',_0x2e95ac);}),_0x2e95ac['updateTargetRect']();const _0x23fa18=this['_getOrderInContent'](_0x2e95ac['view']['targetRect']);return super['add'](_0x2e95ac,_0x23fa18);}['remove'](_0x40fa14){if(!this['has'](_0x40fa14))throw new _0x1f0298('annotationcollection-not-existing-item',null);this['stopListening'](_0x40fa14['view']['focusTracker']),this['stopListening'](_0x40fa14['focusableElements']);for(const _0x58169 of _0x40fa14['focusableElements'])this['_focusTracker']['remove'](_0x58169);return this['_viewToAnnotation']['delete'](_0x40fa14['view']),this['_innerViewToAnnotation']['delete'](_0x40fa14['innerView']),super['remove'](_0x40fa14);}['getByInnerView'](_0x28f55f){return this['_innerViewToAnnotation']['get'](_0x28f55f);}['getByView'](_0xe17506){return this['_viewToAnnotation']['get'](_0xe17506);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1c67f6 of this)_0x1c67f6['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2a412a=Array['from'](this)['sort']((_0xfcf3b9,_0x850ec3)=>w(_0xfcf3b9['view']['targetRect'],_0x850ec3['view']['targetRect']));for(let _0x21521f=_0x2a412a['length']-0x1;_0x21521f>0x0;_0x21521f--){const _0x100cd5=_0x2a412a[_0x21521f];_0x21521f!==this['getIndex'](_0x100cd5)&&(this['remove'](_0x100cd5),this['add'](_0x100cd5));}}['_getOrderInContent'](_0x4bac4c){let _0x6c98a4=0x0;if(!_0x4bac4c)return this['length'];for(const _0x4edde8 of this){const _0x3b3ef6=_0x4edde8['view']['targetRect'];if(_0x3b3ef6){if(w(_0x4bac4c,_0x3b3ef6)<0x0)return _0x6c98a4;_0x6c98a4++;}}return _0x6c98a4;}}function v({source:_0x52f323,target:_0x5ba844,filter:_0x45fa3c}){for(const _0x1a3fe2 of _0x52f323)_0x45fa3c(_0x1a3fe2)&&_0x5ba844['add'](_0x1a3fe2);_0x5ba844['listenTo'](_0x52f323,'add',(_0x344e21,_0x2cdfb1)=>{_0x45fa3c(_0x2cdfb1)&&_0x5ba844['add'](_0x2cdfb1);}),_0x5ba844['listenTo'](_0x52f323,'remove',(_0x33f378,_0x21fefa)=>{_0x5ba844['has'](_0x21fefa)&&_0x5ba844['remove'](_0x21fefa);});}function w(_0x38670d,_0x2cae7a){if(null===_0x38670d&&null===_0x2cae7a)return 0x0;if(null===_0x38670d)return-0x1;if(null===_0x2cae7a)return 0x1;const _0x7e6803=_0x38670d['top']-_0x2cae7a['top'];return 0x0==_0x7e6803?_0x38670d['left']-_0x2cae7a['left']:_0x7e6803;}class y extends _0x6da988{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x425ae1){if(super(_0x425ae1),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x425ae1 instanceof _0xfd0b6d){const _0x2f3047=_0x425ae1['locale'];_0x425ae1['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x2f3047,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x2f3047,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x2f3047,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x2f3047,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x2f3047,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x2f3047,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x2f3047,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x325bea){this['collection']['add'](_0x325bea);}['remove'](_0x371793){this['collection']['remove'](_0x371793),_0x371793['destroy']();}['refreshVisibility'](){for(const _0x5c531e of this['collection'])_0x5c531e['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x219523){return this['collection']['getByInnerView'](_0x219523);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x14e52d of this['collection'])_0x14e52d['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x484f39){this['fire']('_activateAnnotation',_0x484f39);}['createAnnotation'](_0x33c9e3){return new T(_0x33c9e3);}['createAnnotationView'](_0x4b7611,_0x57f704){return new E(_0x4b7611,_0x57f704);}['_addActiveAnnotation'](_0x3fa1d9){const _0x89b234=new Set(this['activeAnnotations']);_0x89b234['add'](_0x3fa1d9),this['activeAnnotations']=_0x89b234;}['_removeActiveAnnotation'](_0x5a917f){const _0x3b0ec6=new Set(this['activeAnnotations']);_0x3b0ec6['delete'](_0x5a917f),this['activeAnnotations']=_0x3b0ec6;}['_bindAnnotationsToVisibleAnnotations'](){const _0x22a727=this['collection'],_0x3b26e3=this['_visibleAnnotations'];function _0x2a4b87(_0x165f18){const _0x84194=_0x165f18['source'];_0x84194['isVisible']&&!_0x3b26e3['has'](_0x84194)?_0x3b26e3['add'](_0x84194):!_0x84194['isVisible']&&_0x3b26e3['has'](_0x84194)&&_0x3b26e3['remove'](_0x84194),_0x84194['view']['focusTracker']['remove'](_0x84194['view']['element']),_0x84194['view']['focusTracker']['add'](_0x84194['view']['element']);}this['listenTo'](_0x22a727,'add',(_0x290966,_0xe2de4d)=>{_0xe2de4d['isVisible']&&_0x3b26e3['add'](_0xe2de4d),this['listenTo'](_0xe2de4d,'change:isVisible',_0x2a4b87);}),this['listenTo'](_0x22a727,'remove',(_0x1954f9,_0xe8df77)=>{_0x3b26e3['has'](_0xe8df77)&&_0x3b26e3['remove'](_0xe8df77),this['stopListening'](_0xe8df77,'change:isVisible',_0x2a4b87);});}['_setupEnterAnnotationKeystroke'](){const _0x510ecf=_0x113738=>{_0x113738['on']('ready',()=>{_0x113738['keystrokes']['set'](_0x405e7b,(_0x34622f,_0x1992b6)=>{const _0x560a90=_0x4bc66a(this['activeAnnotations']['values']());_0x560a90&&(_0x560a90['view']['focus'](),_0x1992b6());});});};this['context']instanceof _0xfd0b6d?_0x510ecf(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2beea7,_0x27744f)=>{_0x510ecf(_0x27744f);});}['_setupEscapeAnnotationHandling'](){const _0x359e97=_0x30a0e9=>{const _0x5376f7=_0x30a0e9['source'],_0x32cccb=[];let _0x13598d;if(Array['isArray'](_0x5376f7['target'])){_0x13598d=_0x5376f7['target'][0x0],this['context']instanceof _0xfd0b6d?_0x32cccb['push'](this['context']):this['context']['editors']&&_0x32cccb['push'](...this['context']['editors']);for(const _0x4e1527 of _0x32cccb)for(const _0x476716 of _0x4e1527['editing']['view']['domRoots']['values']())if(_0x476716['contains'](_0x13598d))return void _0x4e1527['editing']['view']['focus']();_0x13598d['focus']();}};this['listenTo'](this['collection'],'add',(_0x575627,_0x16dae3)=>{this['listenTo'](_0x16dae3,'escape',_0x359e97,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x35e806,_0xb3b4d0)=>{this['stopListening'](_0xb3b4d0,'escape',_0x359e97);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x6da988{['_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(_0x39aa6e){super(_0x39aa6e),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x18fd06=this['context']['config'];_0x18fd06['define']('comments.maxCommentsWhenCollapsed',0x2),_0x18fd06['define']('comments.maxThreadTotalWeight',0x1f4),_0x18fd06['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x18fd06['define']('comments.CommentThreadView',vt),_0x18fd06['define']('comments.CommentView',gt),_0x18fd06['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x16be35=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x42fe36,_0x56bdde)=>this['_addCommentThread'](_0x56bdde)),this['on']('submitCommentThread',(_0x39f6c0,_0x1de67c)=>this['_submitCommentThread'](_0x1de67c)),this['on']('resolveCommentThread',(_0x4cc765,_0x4fcefc)=>this['_resolveCommentThread'](_0x4fcefc)),this['on']('resolveCommentThread',(_0x152c58,_0x2061d6)=>this['_updateActiveAnnotation'](_0x2061d6),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x110f50,_0x40051b)=>this['_reopenCommentThread'](_0x40051b)),this['on']('reopenCommentThread',(_0x12d217,_0x4f5d34)=>this['_updateActiveAnnotation'](_0x4f5d34),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x3cc0d1,_0x4de590)=>this['_removeCommentThread'](_0x4de590)),this['on']('updateCommentThread',(_0x4855c5,_0xf6804b)=>this['_updateCommentThread'](_0xf6804b)),this['on']('updateCommentThread',(_0xbd1202,_0x5514df)=>this['_updateActiveAnnotation'](_0x5514df),{'priority':'lowest'}),this['on']('addComment',(_0x356305,_0x3e14ef)=>this['_addComment'](_0x3e14ef)),this['on']('updateComment',(_0x367342,_0x2a85a9)=>this['_updateComment'](_0x2a85a9)),this['on']('removeComment',(_0x44dc18,_0x4f5cc5)=>this['_removeComment'](_0x4f5cc5)),this['on']('addComment',(_0x275c93,{threadId:_0x307f50,isFromAdapter:_0xa6f132})=>{if(_0xa6f132)return;const _0x4bb84b=this['getCommentThread'](_0x307f50),_0xe2d129=_0x4bb84b&&this['_threadToController']['get'](_0x4bb84b);_0xe2d129&&_0xe2d129['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x16be35,'change:activeAnnotations',(_0x1799b8,_0x217dcf,_0x4823bd)=>{const _0x4abce2=Array['from'](_0x4823bd)['map'](_0x3bdfb6=>this['_viewToController']['get'](_0x3bdfb6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4abce2?_0x4abce2['model']:null;});}set['adapter'](_0x5003c9){if(this['_adapter'])throw new _0x1f0298('commentsrepository-adapter-already-set');this['_adapter']=_0x5003c9;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3c7b1f=Tt,threadId:_0x36465d=_0x348f70(),comments:_0x249dcc=[],unlinkedAt:_0x23b2eb=null,resolvedAt:_0x2551bb=null,resolvedBy:_0x578354=null,target:_0x45197c=null,context:_0x4e725e=null,attributes:_0x88e70e={},isResolvable:_0x511f30=!0x0,isSubmitted:_0x97d92d=!0x1,isFromAdapter:_0x1740c9=!0x1}={}){return this['fire'](bt('addCommentThread',_0x3c7b1f),{'channelId':_0x3c7b1f,'threadId':_0x36465d,'comments':_0x249dcc,'unlinkedAt':_0x23b2eb,'resolvedAt':_0x2551bb,'resolvedBy':_0x578354,'target':_0x45197c,'context':_0x4e725e,'attributes':_0x88e70e,'isFromAdapter':_0x1740c9,'isResolvable':_0x511f30,'isSubmitted':_0x97d92d}),this['getCommentThread'](_0x36465d);}['openNewCommentThread']({channelId:_0x59615b=Tt,threadId:_0x32d2a3=_0x348f70(),target:_0x18a69d,context:_0x5d45d8=null,isResolvable:_0x2e45df=!0x0}){if(this['_readOnlyChannels']['has'](_0x59615b)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x18a69d)throw new _0x1f0298('commentsrepository-missing-target');const _0x547270=this['addCommentThread']({'channelId':_0x59615b,'threadId':_0x32d2a3,'target':_0x18a69d,'context':_0x5d45d8,'isResolvable':_0x2e45df});if(!_0x547270)return null;const _0xa5bfa1=this['_threadToController']['get'](_0x547270),_0x454101=_0xa5bfa1['view']['commentThreadInputView']['commentInputView'],_0x38c70b=this['context']['plugins']['get'](y),_0x8c833f=_0x38c70b['getByInnerView'](_0xa5bfa1['view']);return _0x38c70b['activate'](_0x8c833f),_0x454101['once']('editorReady',()=>_0x454101['focus']()),_0x547270;}['hasCommentThread'](_0x518d8d){if('string'!=typeof _0x518d8d)throw new _0x1f0298('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x518d8d);}['updateCommentThread']({channelId:_0x4904b7=Tt,threadId:_0x185d83,context:_0x2eed2d,unlinkedAt:_0x44fb5d,attributes:_0x408010,isFromAdapter:_0x4494a9=!0x1}){return this['fire'](bt('updateCommentThread',_0x4904b7),{'channelId':_0x4904b7,'threadId':_0x185d83,'context':_0x2eed2d,'unlinkedAt':_0x44fb5d,'attributes':_0x408010,'isFromAdapter':_0x4494a9}),this['getCommentThread'](_0x185d83);}['getCommentThread'](_0x5afcba){if('string'!=typeof _0x5afcba)throw new _0x1f0298('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5afcba);}['fetchCommentThread']({channelId:_0x1e30d9,threadId:_0x444393}={}){const _0x25c6e2=this['getCommentThread'](_0x444393);if(_0x25c6e2)return Promise['resolve'](_0x25c6e2);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x1f0298('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x1e30d9,'threadId':_0x444393})['then'](_0x11bc90=>this['hasCommentThread'](_0x444393)?this['getCommentThread'](_0x444393):_0x11bc90?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x1e30d9},_0x11bc90)):void 0x0)['catch'](_0x230c55=>{throw console['error'](_0x230c55),new _0x1f0298('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x509246,skipNotAttached:_0x325b5d=!0x1,skipEmpty:_0x177735=!0x1,toJSON:_0x19b47e=!0x1}={}){const _0x527ae2=[];for(const _0x1747bc of this['_threads']['values']())_0x509246&&_0x1747bc['channelId']!==_0x509246||_0x325b5d&&!_0x1747bc['isAttached']||_0x177735&&0x0===_0x1747bc['length']||_0x527ae2['push'](_0x1747bc);return _0x19b47e?_0x527ae2['map'](_0x49c84f=>_0x49c84f['toJSON']()):_0x527ae2;}['getAnnotationForCommentThread'](_0x1838f8){const _0x2a0c68=this['_threadToController']['get'](_0x1838f8);if(!_0x2a0c68)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x2a0c68['view'])||null;}['getCommentThreadForAnnotation'](_0x5f3f23){const _0x5bd266=this['_viewToController']['get'](_0x5f3f23['innerView']);return _0x5bd266?_0x5bd266['model']:null;}['setActiveCommentThread'](_0x4bc817){const _0x280d9e=this['context']['plugins']['get'](y);if(!_0x4bc817)return void(this['activeCommentThread']&&_0x280d9e['deactivateAll']());const _0x25c196=this['getCommentThread'](_0x4bc817);if(!_0x25c196)throw new _0x1f0298('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4bc817});if(!this['_threadToController']['has'](_0x25c196))throw new _0x1f0298('commentsrepository-active-not-attached',null,{'threadId':_0x4bc817});const _0x38d7bf=_0x280d9e['getByInnerView'](this['_threadToController']['get'](_0x25c196)['view']);_0x280d9e['activate'](_0x38d7bf);}['switchReadOnly'](_0x166953,_0x1c47ce){_0x166953?this['_readOnlyChannels']['add'](_0x1c47ce):this['_readOnlyChannels']['delete'](_0x1c47ce),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x30936a){return this['_readOnlyChannels']['has'](_0x30936a)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x184713,_0xcf8523){return new yt(_0x184713,_0xcf8523);}['setPermissions'](_0x182d95,_0x49694c=Tt){this['_permissions']['set'](_0x49694c,_0x182d95),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x1c873c=Tt){return this['_permissions']['has'](_0x1c873c)?this['_permissions']['get'](_0x1c873c):_t;}['_addCommentThread']({channelId:_0x249df0,threadId:_0x1f6117,comments:_0x5de848,unlinkedAt:_0x3aa4ac,resolvedAt:_0x2bb7d0,resolvedBy:_0x5be85b,target:_0x4bd04d,context:_0x5a8a73,attributes:_0x1d3031,isFromAdapter:_0x374b23,isResolvable:_0xde3b31,isSubmitted:_0x355889}){if('string'!=typeof _0x1f6117)throw new _0x1f0298('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1f6117});if(this['hasCommentThread'](_0x1f6117))throw new _0x1f0298('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x1f6117});const _0x30c85b=new pi(this,{'channelId':_0x249df0,'id':_0x1f6117,'context':_0x5a8a73,'attributes':_0x1d3031,'unlinkedAt':_0x3aa4ac,'resolvedAt':_0x2bb7d0,'resolvedBy':_0x5be85b?this['context']['plugins']['get'](it)['getUser'](_0x5be85b):null,'isResolvable':_0xde3b31,'isSubmitted':_0x355889||_0x374b23});this['_threads']['set'](_0x1f6117,_0x30c85b);for(const _0x327bf3 of _0x5de848)_0x30c85b['_add'](this['_createNewComment']({'threadId':_0x1f6117,..._0x327bf3}));return _0x4bd04d&&_0x30c85b['attachTo'](_0x4bd04d),_0x374b23||!_0x30c85b['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x249df0,'threadId':_0x1f6117});}['_submitCommentThread']({channelId:_0x1c0240,threadId:_0x3be63e}){if(!this['hasCommentThread'](_0x3be63e))throw new _0x1f0298('commentsrepository-missing-comment-thread',this);const _0x133c69=this['getCommentThread'](_0x3be63e);if(_0x133c69['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x13232c,comments:_0x10636c,resolvedAt:_0x5b7263,resolvedBy:_0x355285,context:_0x501e0b,attributes:_0x51c9ec}=_0x133c69,_0x9716db=this['context']['plugins']['get']('PendingActions'),_0x31394f=_0x9716db['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1c0240,'threadId':_0x13232c,'comments':_0x10636c['map'](_0xccea0d=>_0xccea0d['toJSON']()),'resolvedAt':_0x5b7263,'resolvedBy':_0x355285?_0x355285['id']:_0x355285,'context':_0x501e0b,'attributes':_0x51c9ec})['then'](({comments:_0x513112})=>{_0x9716db['remove'](_0x31394f);for(const _0x25caa7 of _0x513112)this['_updateComment']({'channelId':_0x1c0240,'threadId':_0x3be63e,'commentId':_0x25caa7['commentId'],'createdAt':_0x25caa7['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x30ac3f=>{throw console['error'](_0x30ac3f),new _0x1f0298('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x23ad18,target:_0x1fd916}){const _0x53b611=this['getCommentThread'](_0x23ad18);if(!_0x53b611)throw new _0x1f0298('commentsrepository-attach-missing-comment-thread',this);const _0x2f14fb=this['context']['plugins']['get']('PendingActions'),_0x9c1663=this['context']['plugins']['get'](y),_0x460012=this['_createCommentThreadView'](_0x53b611),_0x4e547d=new yt(_0x53b611,_0x460012);let _0x5d7535=null;_0x460012['on']('change:isDirty',(_0x35bdf1,_0x189c18,_0x14038c)=>{_0x14038c?_0x5d7535=_0x2f14fb['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x5d7535&&(_0x2f14fb['remove'](_0x5d7535),_0x5d7535=null);}),this['_threadToController']['set'](_0x53b611,_0x4e547d),this['_viewToController']['set'](_0x460012,_0x4e547d);const _0x6f132f=new E(this['context']['locale'],_0x460012);_0x6f132f['bind']('length')['to'](_0x460012),_0x6f132f['bind']('isDirty')['to'](_0x460012,'isDirty',_0x460012,'length',(_0x15e2db,_0x15efc1)=>_0x15e2db||!_0x15efc1),_0x6f132f['bind']('isActive')['to'](_0x460012),_0x6f132f['type']='comment';const _0x48966b=new T({'view':_0x6f132f,'target':_0x1fd916,'type':'comment','isVisible':!_0x53b611['archivedAt']});return _0x460012['on']('escape',()=>{_0x48966b['fire']('escape');}),this['_bindAnnotationToEditors'](_0x460012,_0x48966b),_0x9c1663['add'](_0x48966b),_0x48966b;}['_bindAnnotationToEditors'](_0x139e6f,_0x570982){this['listenTo'](_0x139e6f,'editorReady',(_0x3183aa,_0x5c0c33)=>{const _0x209363=_0x5c0c33['ui']['view']['body']['bodyCollectionContainer'];_0x570982['focusableElements']['add'](_0x209363),this['context']instanceof _0xfd0b6d&&this['context']['ui']['focusTracker']['add'](_0x209363);},{'priority':'highest'}),this['listenTo'](_0x139e6f,'editorDestroyed',(_0x60f5f5,_0x56a335)=>{const _0x3dded9=_0x56a335['ui']['view']['body']['bodyCollectionContainer'];_0x570982['focusableElements']['has'](_0x3dded9)&&_0x570982['focusableElements']['remove'](_0x3dded9),this['context']instanceof _0xfd0b6d&&this['context']['ui']['focusTracker']['remove'](_0x3dded9);});}['_unbindEditors'](_0x2cbfba){this['stopListening'](_0x2cbfba,'editorReady'),this['stopListening'](_0x2cbfba,'editorDestroyed');}['_createCommentThreadView'](_0x326b43){const _0x1eba1b=this['context']['plugins']['get'](it),{config:_0xedaaf3,locale:_0x37f924}=this['context'],_0x37af66=lt(_0xedaaf3['get']('locale'),_0x37f924);return new(0x0,(_0xedaaf3['get']('comments'))['CommentThreadView'])(_0x37f924,_0x326b43,_0x1eba1b['me'],{'editorConfig':{..._0xedaaf3['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xedaaf3['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xedaaf3['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xedaaf3['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xedaaf3['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x37af66,'CommentView':_0xedaaf3['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3a11b2,channelId:_0x337e7c,resolvedAt:_0x5749d9,resolvedBy:_0x5ea6df,isFromAdapter:_0x44ac6c}){if(!this['hasCommentThread'](_0x3a11b2))throw new _0x1f0298('commentsrepository-missing-comment-thread',null,{'threadId':_0x3a11b2});const _0x3eb860=this['getCommentThread'](_0x3a11b2);if(_0x3eb860['isResolved'])throw new _0x1f0298('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3a11b2});const _0x8f9628=this['context']['plugins']['get'](it);if(_0x3eb860['resolvedBy']=_0x8f9628['getUser'](_0x5ea6df),_0x3eb860['resolvedAt']=_0x5749d9,_0x44ac6c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3f454a=this['context']['plugins']['get']('PendingActions'),_0x5bce16=_0x3f454a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x337e7c,'threadId':_0x3a11b2})['then'](({resolvedAt:_0x460e04,resolvedBy:_0x2bff79})=>{_0x3f454a['remove'](_0x5bce16),_0x3eb860['resolvedBy']['id']!==_0x2bff79&&(_0x3eb860['resolvedBy']=_0x8f9628['getUser'](_0x2bff79)),_0x3eb860['resolvedAt']=_0x460e04;})['catch'](_0x571d4f=>{throw console['error'](_0x571d4f),new _0x1f0298('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x1330b6,channelId:_0xbfe332,isFromAdapter:_0xd680be}){if(!this['hasCommentThread'](_0x1330b6))throw new _0x1f0298('commentsrepository-missing-comment-thread',null,{'threadId':_0x1330b6});const _0x1dd7a1=this['getCommentThread'](_0x1330b6);if(!_0x1dd7a1['isResolved'])throw new _0x1f0298('commentsrepository-reopen-comment-thread',null,{'threadId':_0x1330b6});if(_0x1dd7a1['resolvedBy']=null,_0x1dd7a1['resolvedAt']=null,_0xd680be||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x3c0460=this['context']['plugins']['get']('PendingActions'),_0x1b1513=_0x3c0460['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0xbfe332,'threadId':_0x1330b6})['then'](()=>_0x3c0460['remove'](_0x1b1513))['catch'](_0x4fe2f4=>{throw console['error'](_0x4fe2f4),new _0x1f0298('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x33dc74,isFromAdapter:_0x201b8f}){const _0x54f853=this['getCommentThread'](_0x33dc74);if(!_0x54f853)throw new _0x1f0298('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x33dc74),this['_threads']['delete'](_0x33dc74),!_0x54f853['isSubmitted']||_0x201b8f||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x15c97f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3d5a8f}=_0x54f853,_0x3f5a67=_0x15c97f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3d5a8f,'threadId':_0x33dc74})['then'](()=>_0x15c97f['remove'](_0x3f5a67))['catch'](_0x2cef6c=>{throw console['error'](_0x2cef6c),new _0x1f0298('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x19e635,unlinkedAt:_0x3dd136,context:_0x23cd6b,attributes:_0x1ba46a,isFromAdapter:_0x179438}){if('string'!=typeof _0x19e635)throw new _0x1f0298('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x19e635});if(!this['hasCommentThread'](_0x19e635))throw new _0x1f0298('commentsrepository-missing-comment-thread',null,{'threadId':_0x19e635});const _0xaf7f14=this['getCommentThread'](_0x19e635);let _0x4793f5=!0x1;if(void 0x0!==_0x23cd6b&&_0xaf7f14['context']!==_0x23cd6b&&(_0xaf7f14['context']=_0x23cd6b,_0x4793f5=!0x0),void 0x0!==_0x3dd136&&_0xaf7f14['unlinkedAt']!==_0x3dd136&&(_0xaf7f14['unlinkedAt']=_0x3dd136,_0x4793f5=!0x0),_0x1ba46a&&!wt(_0x1ba46a,_0xaf7f14['attributes'])&&(_0xaf7f14['attributes']=_0x1ba46a,_0x4793f5=!0x0),!_0x4793f5)return Promise['resolve']();if(!_0xaf7f14['isSubmitted']||_0x179438||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x165315=this['context']['plugins']['get']('PendingActions'),{channelId:_0x344f28}=_0xaf7f14,_0x43af60=_0x165315['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x344f28,'threadId':_0x19e635,'context':_0x23cd6b,'unlinkedAt':_0x3dd136,'attributes':_0x1ba46a})['then'](()=>_0x165315['remove'](_0x43af60))['catch'](_0x4fe567=>{throw console['error'](_0x4fe567),new _0x1f0298('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2a20c9){const _0x1db8d8=this['context']['plugins']['get'](y),_0x51f691=this['getCommentThread'](_0x2a20c9);if(_0x51f691['_isAttached']=!0x1,this['_threadToController']['has'](_0x51f691)){const _0x25b98f=this['_threadToController']['get'](_0x51f691),_0x2c49b5=_0x25b98f['view'],_0x19cc16=_0x1db8d8['getByInnerView'](_0x2c49b5);this['_threadToController']['delete'](_0x51f691),this['_viewToController']['delete'](_0x2c49b5),_0x19cc16&&_0x1db8d8['remove'](_0x19cc16),_0x25b98f['destroy'](),_0x2c49b5['destroy']()['then'](()=>{this['_unbindEditors'](_0x2c49b5);});}}['_updateActiveAnnotation']({threadId:_0x3032dc,resolvedAt:_0x207c54,unlinkedAt:_0x9047}){const _0x4c192b=!!_0x207c54,_0xa3d554=this['context']['plugins']['get'](y),_0x4686ae=this['getCommentThread'](_0x3032dc);if(this['_threadToController']['has'](_0x4686ae)){const _0x4a80ee=this['_threadToController']['get'](_0x4686ae)['view'],_0xd32be5=_0xa3d554['getByInnerView'](_0x4a80ee);_0xd32be5&&(_0x4c192b&&_0xa3d554['_removeActiveAnnotation'](_0xd32be5),_0x9047?_0xd32be5['isVisible']=!0x1:_0xd32be5['refreshVisibility']());}}['_getExternalAuthor'](_0x3cbbec){const _0x1b5a18=this['context']['plugins']['get'](it),_0x1018df=pt('external:'+_0x3cbbec),_0x28dbdc=_0x1b5a18['getUser'](_0x1018df);return _0x28dbdc||_0x1b5a18['addUser']({'id':_0x1018df,'name':_0x3cbbec});}['_createNewComment']({threadId:_0x1315fc,commentId:_0x1ef3eb=_0x348f70(),content:_0x2148ef,authorId:_0x50f350,createdAt:_0x4c672b,attributes:_0x4bec76}){if('string'!=typeof _0x1ef3eb)throw new _0x1f0298('commentsrepository-invalid-commentid');if('string'!=typeof _0x50f350)throw new _0x1f0298('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x2148ef||!_0x2148ef['trim']())throw new _0x1f0298('commentsrepository-invalid-comment-content');const _0x555adb=this['context']['plugins']['get'](it)['getUser'](_0x50f350);if(!_0x555adb)throw new _0x1f0298('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x50f350});let _0x23c7b9=null,_0x56f60e=_0x4c672b;return _0x4bec76?.['@external']&&(_0x23c7b9=this['_getExternalAuthor'](_0x4bec76['@external']['authorName']),_0x56f60e=new Date(_0x4bec76['@external']['createdAt'])),new wi(this,{'threadId':_0x1315fc,'id':_0x1ef3eb,'author':_0x23c7b9||_0x555adb,'creator':_0x555adb,'content':_0x2148ef,'createdAt':_0x4c672b,'authoredAt':_0x56f60e,'attributes':_0x4bec76});}['_addComment'](_0x332863){let {threadId:_0x3c3fcb,content:_0x466f68,attributes:_0xf1fbd,isFromAdapter:_0x4f7026}=_0x332863;const _0x31d528=this['getCommentThread'](_0x332863['threadId']);if(!_0x31d528)throw new _0x1f0298('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x7621af=this['_createNewComment'](_0x332863),{id:_0x57f4d6}=_0x7621af;if(_0x31d528['_add'](_0x7621af),_0x4f7026||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x31d528['isSubmitted'])return Promise['resolve']();const _0x25b3e6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x159b4f}=_0x31d528,_0x12256e=_0x25b3e6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0xf1fbd||(_0xf1fbd={}),this['adapter']['addComment']({'channelId':_0x159b4f,'threadId':_0x3c3fcb,'commentId':_0x57f4d6,'content':_0x466f68,'attributes':_0xf1fbd})['then'](_0x25622f=>{_0x25b3e6['remove'](_0x12256e),_0x25622f&&this['_updateComment']({'channelId':_0x159b4f,'threadId':_0x3c3fcb,'commentId':_0x57f4d6,'createdAt':_0x25622f['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x411c34=>{throw console['error'](_0x411c34),new _0x1f0298('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x584160,commentId:_0x530826,content:_0x28ddb1,createdAt:_0x456f61,attributes:_0x43404e,isFromAdapter:_0x1f163b}){if(void 0x0!==_0x28ddb1&&('string'!=typeof _0x28ddb1||!_0x28ddb1['trim']()['length']))throw new _0x1f0298('commentsrepository-update-comment-invalid-content');const _0x4c6ec2=this['getCommentThread'](_0x584160),_0x359e19=_0x4c6ec2['getComment'](_0x530826);if(!_0x359e19)throw new _0x1f0298('commentsrepository-update-missing-comment',this);let _0x4a320b=!0x1;if(_0x28ddb1&&_0x28ddb1!==_0x359e19['content']&&(_0x359e19['isEditable']||_0x1f163b)&&(_0x359e19['content']=_0x28ddb1,_0x4a320b=!0x0),_0x456f61&&_0x456f61!==_0x359e19['createdAt']&&(_0x359e19['createdAt']=_0x456f61,_0x359e19['attributes']&&_0x359e19['attributes']['@external']||(_0x359e19['authoredAt']=_0x456f61),_0x4a320b=!0x0),_0x43404e&&!wt(_0x43404e,_0x359e19['attributes'])&&(_0x359e19['attributes']=_0x43404e,_0x4a320b=!0x0),!_0x4a320b)return Promise['resolve']();if(_0x4c6ec2['fire']('commentUpdated'),_0x1f163b||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x89c3f5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44ea21}=this['getCommentThread'](_0x359e19['threadId']),_0x3eebe8=_0x89c3f5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x44ea21,'threadId':_0x584160,'commentId':_0x530826,'content':_0x28ddb1,'attributes':_0x43404e})['then'](()=>_0x89c3f5['remove'](_0x3eebe8))['catch'](_0x2e3116=>{throw console['error'](_0x2e3116),new _0x1f0298('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x2db25a,commentId:_0x14faf9,isFromAdapter:_0x19be9b}){const _0x17a973=this['getCommentThread'](_0x2db25a),_0x8fa168=_0x17a973['getComment'](_0x14faf9);if(!_0x8fa168)throw new _0x1f0298('commentsrepository-remove-missing-comment',this);if(_0x17a973['_remove'](_0x8fa168),_0x19be9b||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3ad532=this['context']['plugins']['get']('PendingActions'),{channelId:_0xa19cdd}=_0x17a973,_0x4c6d14=_0x3ad532['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xa19cdd,'threadId':_0x2db25a,'commentId':_0x14faf9})['then'](()=>_0x3ad532['remove'](_0x4c6d14))['catch'](_0x20c418=>{throw console['error'](_0x20c418),new _0x1f0298('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x525196(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x4a344c,_0x4c144e){super();const _0x128beb=_0x4c144e['isResolvable'];this['channelId']=_0x4c144e['channelId'],this['id']=_0x4c144e['id'],this['comments']=new _0x5b9636(),this['_repository']=_0x4a344c,this['_isAttached']=!0x1,this['_isSubmitted']=_0x4c144e['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x4a344c,'_permissions',_0x4a344c,'_readOnlyChannels',()=>_0x4a344c['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x4a344c,'_permissions',()=>_0x4a344c['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x4a344c,'_permissions',()=>{const _0x45f3a1=_0x4a344c['getPermissions'](this['channelId']);return _0x45f3a1['write']||_0x45f3a1['admin'];}),this['bind']('isResolvable')['to'](_0x4a344c,'_permissions',()=>_0x128beb&&_0x4a344c['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x4c144e['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x496686,_0x1761e1)=>_0x496686?_0x1761e1?_0x496686<_0x1761e1?_0x496686:_0x1761e1:_0x496686:_0x1761e1),this['set']('unlinkedAt',_0x4c144e['unlinkedAt']||null),this['set']('resolvedAt',_0x4c144e['resolvedAt']||null),this['set']('resolvedBy',_0x4c144e['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x48437b=>!!_0x48437b),this['set']('attributes',_0x4c144e['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x1f00b2,_0x2019b0)=>_0x1f00b2+_0x2019b0['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x24f439,id:_0x20e745}=this;this['_repository']['fire'](bt('submitCommentThread',_0x24f439),{'channelId':_0x24f439,'threadId':_0x20e745});}['setUnlinkedAt'](_0x575d2d){this['_update']({'unlinkedAt':_0x575d2d});}['resolve']({resolvedAt:_0x100def=new Date(),resolvedBy:_0x432a9a=null,isFromAdapter:_0xd0c1b0=!0x1}={}){const _0x5430da=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x49db41,id:_0x53e8c2}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x49db41),{'channelId':_0x49db41,'threadId':_0x53e8c2,'resolvedAt':_0x100def,'resolvedBy':_0x432a9a||_0x5430da['id'],'isFromAdapter':_0xd0c1b0});}['reopen']({isFromAdapter:_0x1b635a=!0x1}={}){const {channelId:_0x3f5496,id:_0x14a1ea}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x3f5496),{'channelId':_0x3f5496,'threadId':_0x14a1ea,'isFromAdapter':_0x1b635a});}['setContext'](_0x23c40c){this['context']||this['_update']({'context':_0x23c40c});}['setAttribute'](_0x48d577,_0x4da16a){const _0x1796f7=It(this['attributes']);At(_0x1796f7,_0x48d577,_0x4da16a),this['_update']({'attributes':_0x1796f7});}['removeAttribute'](_0x1cce4b){const _0x51e444=It(this['attributes']);Ct(_0x51e444,_0x1cce4b),this['_update']({'attributes':_0x51e444});}['remove']({isFromAdapter:_0x9a73e8=!0x1}={}){const {channelId:_0x50f101,id:_0x546c48}=this;this['_repository']['fire'](bt('removeCommentThread',_0x50f101),{'channelId':_0x50f101,'threadId':_0x546c48,'isFromAdapter':_0x9a73e8});}['attachTo'](_0xd37971){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0xd37971});}['addComment'](_0x3a09f3){const {channelId:_0x172902,id:_0x2ed944}=this;this['_repository']['fire'](bt('addComment',_0x172902,_0x2ed944),Object['assign']({'channelId':_0x172902,'threadId':_0x2ed944},_0x3a09f3));}['getComment'](_0x539795){if('string'!=typeof _0x539795)throw new _0x1f0298('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x539795});return this['comments']['get'](_0x539795);}['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'](_0x5b86a5=>_0x5b86a5['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2810b3){return this['listenTo'](_0x2810b3,'change:authoredAt',()=>{const _0x5c67f5=this['_findOptimalIndex'](_0x2810b3),_0x4b2598=this['comments'];_0x5c67f5-0x1!=_0x4b2598['getIndex'](_0x2810b3)&&_0x5c67f5+0x1!=_0x4b2598['getIndex'](_0x2810b3)&&(this['_remove'](_0x2810b3),this['_add'](_0x2810b3));}),this['comments']['add'](_0x2810b3,this['_findOptimalIndex'](_0x2810b3));}['_update'](_0x30c607){const {channelId:_0x16aa48,id:_0x4af066}=this;this['_repository']['fire'](bt('updateCommentThread',_0x16aa48),{..._0x30c607,'channelId':_0x16aa48,'threadId':_0x4af066});}['_remove'](_0x30eb5f){return this['stopListening'](_0x30eb5f),_0x30eb5f['destroy'](),this['comments']['remove'](_0x30eb5f);}['_findOptimalIndex'](_0x5a08bc){const _0x128677=this['comments']['find'](_0xc950d2=>new Date(_0xc950d2['authoredAt'])['getTime']()>new Date(_0x5a08bc['authoredAt'])['getTime']());return _0x128677?this['comments']['getIndex'](_0x128677):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x525196(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1f4903,_0x1c17ca){super();const _0x4fea59=_0x1f4903['context']['plugins']['get'](it)['me'],_0x4b3e9c=_0x1f4903['getCommentThread'](_0x1c17ca['threadId']),_0x1497d8=0x0===_0x4b3e9c['comments']['length'],_0x2fe742=_0x4fea59===_0x1c17ca['author'];this['id']=_0x1c17ca['id'],this['threadId']=_0x1c17ca['threadId'],this['author']=_0x1c17ca['author'],this['creator']=_0x1c17ca['creator'],this['isExternal']=Boolean(_0x1c17ca['attributes']&&_0x1c17ca['attributes']['@external']),this['set']('content',_0x1c17ca['content']),this['createdAt']=_0x1c17ca['createdAt']||new Date(),this['set']('authoredAt',_0x1c17ca['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4b3e9c,'resolvedAt'),this['set']('attributes',_0x1c17ca['attributes']||{}),this['bind']('isEditable')['to'](_0x1f4903,'_permissions',()=>{const _0xd6d00=_0x1f4903['getPermissions'](_0x4b3e9c['channelId'])['write'],_0x218e89=_0x1f4903['getPermissions'](_0x4b3e9c['channelId'])['modifyAll'];return _0x2fe742&&_0xd6d00||!_0x2fe742&&_0x218e89;}),this['bind']('isRemovable')['to'](_0x4b3e9c,'isRemovable',_0x1f4903,'_permissions',_0x199469=>{const _0xd6c478=_0x1f4903['getPermissions'](_0x4b3e9c['channelId'])['write'],_0x535584=_0x1f4903['getPermissions'](_0x4b3e9c['channelId'])['modifyAll'];return _0x2fe742&&_0xd6c478||_0x199469&&_0x1497d8||!_0x2fe742&&_0x535584&&!_0x1497d8;}),this['bind']('isReadOnly')['to'](_0x4b3e9c,'isReadOnly'),this['_repository']=_0x1f4903;}get['weight'](){return Math['max'](function(_0x59230d){const _0x3ebf0b=document['createElement']('div');return _0x3ebf0b['innerHTML']=_0x59230d,_0x3ebf0b['textContent']['length'];}(this['content']),0xc8);}['update'](_0x5368c3){const {threadId:_0x58da9d,id:_0x2ad88c}=this;if(!this['_repository']['hasCommentThread'](_0x58da9d))throw new _0x1f0298('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x518581}=this['_repository']['getCommentThread'](_0x58da9d);this['_repository']['fire'](bt('updateComment',_0x518581,_0x58da9d),{'channelId':_0x518581,'threadId':_0x58da9d,'commentId':_0x2ad88c,..._0x5368c3});}['setAttribute'](_0x3c4489,_0x491090){const _0x475aa0=It(this['attributes']);At(_0x475aa0,_0x3c4489,_0x491090),this['update']({'attributes':_0x475aa0});}['removeAttribute'](_0x4de4b3){const _0x35bb8b=It(this['attributes']);Ct(_0x35bb8b,_0x4de4b3),this['update']({'attributes':_0x35bb8b});}['remove'](_0xdb8e07={}){if(!_0xdb8e07['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x50eae0,id:_0x2d918f}=this;if(!this['_repository']['hasCommentThread'](_0x50eae0))throw new _0x1f0298('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x2533cd}=this['_repository']['getCommentThread'](_0x50eae0);this['_repository']['fire'](bt('removeComment',_0x2533cd,_0x50eae0),{'channelId':_0x2533cd,'threadId':_0x50eae0,'commentId':_0x2d918f,..._0xdb8e07});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x738b9,..._0x2e714f){for(const _0x4e673d of _0x2e714f)void 0x0!==_0x4e673d&&(_0x738b9+=':'+String(_0x4e673d));return _0x738b9;}class rt extends _0x211dce{constructor(_0x1443d3){super(_0x1443d3),this['set']('hasContent',!0x1);}['refresh'](){const _0x591af0=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0xf75b19 of _0x591af0['getRanges']())if(this['_hasContent'](_0xf75b19))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5cb9f4=_0x348f70(),ranges:_0x3ac579,comment:_0x21a28e}={}){const _0x4df7e4=this['editor']['model'],_0x59457a=_0x3ac579??Array['from'](_0x4df7e4['document']['selection']['getRanges']()),_0x1f94a1=[];for(const _0x405ee7 of _0x59457a)this['_hasContent'](_0x405ee7)&&_0x1f94a1['push'](this['_trimToContent'](_0x405ee7));if(!_0x1f94a1['length'])throw new _0x1f0298('addcommentthreadcommand-incorrect-ranges',null);_0x21a28e&&this['_createCommentThread'](_0x5cb9f4,_0x21a28e),this['_createMarkersFromRanges'](_0x5cb9f4,_0x1f94a1,!!_0x21a28e);}['_createMarkersFromRanges'](_0x281b05,_0x219c3c,_0x1e41b0){this['editor']['model']['change'](_0x1181a0=>{for(const _0x204424 of _0x219c3c){const _0x5024c7=_0x348f70()['substr'](0x1,0x5),_0x247c55='comment:'+_0x281b05+':'+_0x5024c7;_0x1181a0['addMarker'](_0x247c55,{'range':_0x204424,'usingOperation':_0x1e41b0,'affectsData':_0x1e41b0});}});}['_createCommentThread'](_0xe20cba,_0x214fdb){const _0x4daf92=this['editor']['plugins']['get']('CommentsRepository'),_0xe833a2=this['editor']['config']['get']('collaboration.channelId'),_0x586b37=this['editor']['plugins']['get']('Users')['me'];if(!_0x586b37)throw new _0x1f0298('addcommentthreadcommand-user-not-found',null);_0x4daf92['addCommentThread']({'threadId':_0xe20cba,'channelId':_0xe833a2,'comments':[{'authorId':_0x586b37['id'],'content':_0x214fdb,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x121e72){for(const _0x41c01d of _0x121e72['getItems']())if(this['_itemIsContent'](_0x41c01d))return!0x0;return!0x1;}['_itemIsContent'](_0x412e02){return _0x412e02['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x412e02)&&!_0x412e02['is']('element','tableCell');}['_trimToContent'](_0x1ebc30){const _0x4389aa=_0x2cc59a=>!this['_itemIsContent'](_0x2cc59a['item']),_0x42c494=_0x1ebc30['start']['getLastMatchingPosition'](_0x4389aa),_0x4a42a9=_0x1ebc30['end']['getLastMatchingPosition'](_0x4389aa,{'direction':'backward'});return this['editor']['model']['createRange'](_0x42c494,_0x4a42a9);}}class b extends _0x15d9b0{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x58a117){super(_0x58a117),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x2cc3b7=this['editor'],_0x178f84=_0x2cc3b7['model']['document']['selection'],_0x108c4e=_0x721014(()=>this['refreshSelectedViews'](),0xa);_0x178f84['on']('change:range',(_0x5b1534,_0x998e44)=>{_0x998e44['directChange']&&(_0x108c4e['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x2cc3b7['editing']['view']['document'],'change:isFocused',(_0x2b2a5c,_0x1df3b8,_0x7362d5)=>{_0x7362d5&&_0x108c4e();}),this['listenTo'](_0x2cc3b7['ui']['focusTracker'],'change:isFocused',(_0x4f1792,_0x134c18,_0x51d634)=>{_0x51d634||_0x2cc3b7['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x1f3329=>this['_editorAnnotationsData']['has'](_0x1f3329['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x2d4438){if(this['_editorAnnotations']['has'](_0x2d4438['view']))return;this['_editorAnnotations']['add'](_0x2d4438['view']),this['editor']['ui']['focusTracker']['add'](_0x2d4438['view']['element']);const _0x1ecf99=this['editor']['plugins']['get'](y);this['listenTo'](_0x1ecf99['collection'],'remove',(_0x3a24ad,_0x31df40)=>{this['editor']['ui']['focusTracker']['remove'](_0x31df40['view']['element']),this['_editorAnnotations']['delete'](_0x31df40['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x162146){if('function'!=typeof _0x162146)throw new _0x1f0298('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x162146);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4fcee4,annotations:_0x29e136}){const _0x39777e=[],_0xf4d688=this['editor']['model']['document']['selection'],_0xd0761b=Array['from'](_0xf4d688['getRanges']());for(const [_0x611290,_0x17745e]of this['_editorAnnotationsData']){const _0x2ddf32=_0x3213ac(_0x17745e),_0x198ddc=_0x29e136['getByInnerView'](_0x611290);_0x2ddf32&&_0x198ddc&&_0x39777e['push']({'annotation':_0x198ddc,'range':_0x2ddf32});}function _0x3213ac(_0x1e55ab){for(const _0x1dda13 of _0x1e55ab)for(const _0x487575 of _0xd0761b)if(_0x1dda13['containsRange'](_0x487575,!_0xf4d688['isCollapsed']))return _0x1dda13;return null;}return _0x39777e['sort']((_0x4d93ce,_0x3e2c12)=>{const _0x3a1d04=_0x4d93ce['range'],_0x2233a6=_0x3e2c12['range'];if(!_0x3a1d04['isEqual'](_0x2233a6)){if(_0x3a1d04['containsRange'](_0x2233a6,!0x0))return 0x1;if(_0x2233a6['containsRange'](_0x3a1d04,!0x0))return-0x1;}return _0x4d93ce['annotation']==_0x4fcee4?-0x1:_0x3e2c12['annotation']==_0x4fcee4?0x1:0x0;})['map'](_0x546908=>_0x546908['annotation']);}get['_editorAnnotationsData'](){const _0x2476c6=new Map();for(const _0x3f9168 of Array['from'](this['_dataCollectors']))for(const [_0x253e2a,_0x29845d]of _0x3f9168())_0x2476c6['set'](_0x253e2a,_0x29845d);return _0x2476c6;}}class st extends _0x15d9b0{['afterInit'](){const _0x154651=this['editor'];if(!_0x154651['plugins']['has']('RestrictedEditingModeEditing'))return;_0x154651['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x15d9b0{constructor(_0x3e7c79){super(_0x3e7c79),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x474644=this['editor'],_0x2d09d2=_0x474644['commands']['get']('importWord'),_0x19505c=_0x474644['plugins']['get'](it);_0x2d09d2&&(_0x2d09d2['on']('execute',(_0x54cf8c,[,_0x40fc5a])=>{_0x40fc5a['collaboration_features']={'comments':!0x0,'user_id':_0x19505c['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x2d09d2,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2a8396,_0x3473ab){const {comment_threads:_0x42941b}=_0x3473ab;_0x42941b&&_0x42941b['forEach'](({thread_id:_0x38e286,comments:_0x38baf6,is_resolved:_0x728c2b})=>{const _0x282ad4=new Date(),_0x5b9477=_0x38baf6['map'](({author:_0x32ea90,content:_0x3d2f78,created_at:_0x7d84ca})=>({'content':_0x3d2f78,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x282ad4,'attributes':{'@external':{'authorName':_0x32ea90,'createdAt':_0x7d84ca?new Date(_0x7d84ca):new Date(),'source':'importWord'}}})),_0x5913bd=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x5913bd,'threadId':_0x38e286,'comments':_0x5b9477,'resolvedAt':_0x728c2b?_0x282ad4:null});});}}class at extends _0x15d9b0{constructor(_0x84e528){super(_0x84e528),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x12b607=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x12b607,'contentInsertion',(_0x3bb089,_0x523050)=>this['_removeMarkersWithoutThreads'](_0x523050['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x4afc35){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x4afc35;const _0x5549c0=this['editor']['plugins']['get']('CommentsRepository');for(const _0xc8f405 of _0x4afc35['keys']()){const [_0x930138,_0x440ea6]=_0xc8f405['split'](':');'comment'!=_0x930138||_0x5549c0['hasCommentThread'](_0x440ea6)||_0x4afc35['delete'](_0xc8f405);}return _0x4afc35;}['_registerMarkerInClipboardPipeline'](){const _0xea9211=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x4a1629=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x4a1629&&_0xea9211['_registerMarkerToCopy']('comment',_0x4a1629);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x5942b2){switch(_0x5942b2){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 _0x15d9b0{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4591cc,_0x5d87b5)=>{if(!_0x5d87b5['options']['showCommentHighlights'])return null;if(_0x5d87b5['options']['ignoreResolvedComments']){const {id:_0x3f2d9f}=er(_0x4591cc['markerName']),_0xb341ac=this['editor']['plugins']['get'](o);if(_0xb341ac['getCommentThread'](_0x3f2d9f)?.['isResolved']&&_0x4591cc['item'])return _0x5d87b5['consumable']['consume'](_0x4591cc['item'],'addMarker:'+_0x4591cc['markerName']),_0x5d87b5['consumable']['consume'](_0x4591cc['item'],'removeMarker:'+_0x4591cc['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x4e8638=>{_0x4e8638['on']('addMarker:comment',(_0x2a0952,_0x1618c0,_0x33aba8)=>{if(!_0x33aba8['options']['showCommentHighlights'])return;const _0x277686=_0x1618c0['item'];if(!_0x277686)return;const _0x2ec379=_0x33aba8['mapper']['toViewElement'](_0x277686);this['editor']['model']['schema']['isObject'](_0x277686)&&_0x2ec379&&!_0x2ec379['getCustomProperty']('widget')&&_0x2ec379['is']('containerElement')&&_0x446e36(_0x2ec379,_0x33aba8['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x450374,{writer:_0x6a36ec,options:_0x5684d4})=>{if(!_0x5684d4['showCommentHighlights'])return null;const _0x237e3e=_0x6a36ec['createContainerElement']('div'),_0x5d50fb=_0x6a36ec['createEmptyElement']('hr');return _0x6a36ec['addClass']('ck-horizontal-line',_0x237e3e),_0x6a36ec['insert'](_0x6a36ec['createPositionAt'](_0x237e3e,0x0),_0x5d50fb),_0x237e3e;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x4a90a9,{writer:_0x3174e8,options:_0x17fcc3})=>{if(!_0x17fcc3['showCommentHighlights'])return null;const _0x3edec5=_0x3174e8['createContainerElement']('span'),_0x37c808=_0x3174e8['createEmptyElement']('img');return _0x3174e8['addClass']('image-inline',_0x3edec5),_0x3174e8['insert'](_0x3174e8['createPositionAt'](_0x3edec5,0x0),_0x37c808),_0x3edec5;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x20059e,{writer:_0x3e3440,options:_0x25b116})=>{if(_0x25b116['showCommentHighlights'])return _0x3e3440['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x3f5f06,_0x1086fd,_0xab8778)=>{_0xab8778['options']['showCommentHighlights']&&_0x3f5f06['stop']();},{'priority':'high'});}}class r extends _0x15d9b0{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(_0xa67fde){super(_0xa67fde),this['set']('isThreadsLoadingPaused',!0x0),_0xa67fde['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2015a1,_0xdd5a75,_0x122bac,_0x3a14ec)=>{const _0x4c2c36=_0xa67fde['plugins']['get'](o),_0xd6a237=_0x122bac?er(_0x122bac)['id']:null;_0xa67fde['model']['change'](()=>{if(_0xd6a237){const _0x50a447=this['getAllMarkersForId'](_0xd6a237);for(const _0x1d0736 of _0x50a447)_0xa67fde['editing']['reconvertMarker'](_0x1d0736);}if(_0x3a14ec){const {id:_0x5d644c}=er(_0x3a14ec),_0x198ec2=_0x4c2c36['getCommentThread'](_0x5d644c);if(_0x198ec2&&_0x198ec2['unlinkedAt'])return;if(_0x198ec2&&!_0x198ec2['isAttached'])return;const _0x3a5dfd=this['getAllMarkersForId'](_0x5d644c);for(const _0x394016 of _0x3a5dfd)_0xa67fde['editing']['reconvertMarker'](_0x394016);}}),_0xd6a237&&this['scrollToThreadMarker'](_0xd6a237);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x32e9b8=this['editor'],_0x1b19d0=_0x32e9b8['plugins']['get'](o),_0x2a27e1=_0x32e9b8['config']['get']('collaboration.channelId'),_0x49d667=_0x1b19d0['getCommentThreads']()['filter'](_0x13ee5d=>_0x13ee5d['channelId']!==_0x2a27e1);_0x32e9b8['commands']['add']('addCommentThread',new rt(_0x32e9b8)),this['listenTo'](_0x32e9b8,'change:isReadOnly',(_0x1d75dd,_0xd43ee9,_0x2728c2)=>{_0x1b19d0['switchReadOnly'](_0x2728c2,_0x32e9b8['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1b19d0,ft('addCommentThread',_0x2a27e1),(_0x2e4696,{threadId:_0x2b06d1})=>{const _0x5b722f=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2b06d1);_0x5b722f?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2b06d1);}),this['listenTo'](_0x1b19d0,ft('removeCommentThread',_0x2a27e1),(_0x4c267c,{threadId:_0x4cb283})=>{_0x32e9b8['model']['enqueueChange']({'isUndoable':!0x1},_0x49b090=>{const _0xae84ac=this['getAllMarkersForId'](_0x4cb283);for(const _0x16b99e of _0xae84ac)_0x49b090['removeMarker'](_0x16b99e);});}),this['listenTo'](_0x1b19d0,ft('resolveCommentThread',_0x2a27e1),(_0x20590a,{threadId:_0x4e05a9})=>{(this['_reconvertMarkers'](_0x4e05a9),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x4e05a9)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1b19d0,ft('reopenCommentThread',_0x2a27e1),(_0x5c51b3,{threadId:_0x3678c7})=>{this['_reconvertMarkers'](_0x3678c7);},{'priority':'low'}),this['listenTo'](_0x1b19d0,ft('addComment',_0x2a27e1),(_0x25982c,{threadId:_0x5d8088,isFromAdapter:_0x1cd6e0})=>{const _0x1fed2d=this['getAllMarkersForId'](_0x5d8088);if(_0x1cd6e0||0x0==_0x1fed2d['length']||!_0x1b19d0['hasCommentThread'](_0x5d8088))return;0x1===_0x1b19d0['getCommentThread'](_0x5d8088)['length']&&_0x32e9b8['model']['enqueueChange']({'isUndoable':!0x1},_0x43699e=>{for(const _0xfc489c of _0x1fed2d)_0x43699e['updateMarker'](_0xfc489c,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x49d667);}['afterInit'](){!async function(_0x20bf01){const _0x248f31=_0x5b481e([0x44,0x66,0x62,0x47,0x4c,0x53,0x65,0x70,0x4e,0x68,0x36,0x57,0x31,0x4b,0x75,0x71,0x4a,0x35,0x74,0x30,0x6e,0x6d,0x73,0x7a,0x43,0x41,0x56,0x55,0x72,0x6b,0x49,0x32,0x6a,0x5a,0x69,0x67,0x42,0x61,0x46,0x6f,0x34,0x51,0x4d,0x59,0x6c,0x76,0x50,0x78,0x52,0x48,0x54,0x45,0x58,0x38,0x4f,0x63,0x79,0x39,0x33,0x37,0x77,0x64]),_0x3c54df=0x5dff5f33,_0x51247f=0x5df83383^_0x3c54df,_0x42e1ba=window[_0x5b481e([0x44,0x61,0x74,0x65])][_0x5b481e([0x6e,0x6f,0x77])](),_0x1a50d3=_0x20bf01[_0x5b481e([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x11d3f2=new window[(_0x5b481e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1f2193=>{_0x1a50d3[_0x5b481e([0x6f,0x6e,0x63,0x65])](_0x5b481e([0x72,0x65,0x61,0x64,0x79]),_0x1f2193);}),_0x5d4ac8={[_0x5b481e([0x6b,0x74,0x79])]:_0x5b481e([0x45,0x43]),[_0x5b481e([0x75,0x73,0x65])]:_0x5b481e([0x73,0x69,0x67]),[_0x5b481e([0x63,0x72,0x76])]:_0x5b481e([0x50,0x2d,0x32,0x35,0x36]),[_0x5b481e([0x78])]:_0x5b481e([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]),[_0x5b481e([0x79])]:_0x5b481e([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]),[_0x5b481e([0x61,0x6c,0x67])]:_0x5b481e([0x45,0x53,0x32,0x35,0x36])},_0x559568=_0x1a50d3[_0x5b481e([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x5b481e([0x67,0x65,0x74])](_0x5b481e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x15b0ae(){let _0x1f1de8,_0x2bff22=null,_0x33c314=null;try{if(_0x559568==_0x5b481e([0x47,0x50,0x4c]))return _0x5b481e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x1f1de8=_0x38a491(),!_0x1f1de8)return _0x5b481e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x1f1de8[_0x5b481e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x33c314=_0x2f94b5(_0x1f1de8[_0x5b481e([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x1f1de8[_0x5b481e([0x6a,0x74,0x69])])),await _0x479a69()?_0x2b143f()?_0x541aa3()?_0x5b481e([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x422a41()?(_0x1f1de8[_0x5b481e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5b481e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2bff22=_0x19b671(_0x5b481e([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x1f1de8[_0x5b481e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x5b481e([0x74,0x72,0x69,0x61,0x6c])&&(_0x2bff22=_0x19b671(_0x5b481e([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x3fd922()):_0x5b481e([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x5b481e([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x5b481e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x5b481e([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x541aa3(){const _0x165aeb=[_0x5b481e([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x5b481e([0x74,0x72,0x69,0x61,0x6c])][_0x5b481e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x1f1de8[_0x5b481e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x42e1ba/0x3e8:0xe10*_0x51247f;return _0x1f1de8[_0x5b481e([0x65,0x78,0x70])]<_0x165aeb;}function _0x2b143f(){const _0x24c50d=_0x1f1de8[_0x5b481e([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x24c50d)return!0x1;if(_0x24c50d[_0x5b481e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b481e([0x2a])))return!0x0;if(_0x24c50d[_0x5b481e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b481e([0x43,0x4d,0x54])))return!0x0;if(_0x24c50d[_0x5b481e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b481e([0x52,0x43,0x4d,0x54]))){if(_0x5a0eb1())return!0x0;if(_0x2a427b()||_0x4f35b6())return!0x0;}return!0x1;}function _0x422a41(){const _0x4cec26=_0x1f1de8[_0x5b481e([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4cec26||0x0==_0x4cec26[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5e3d1c}=new URL(window[_0x5b481e([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4cec26[_0x5b481e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5e3d1c))return!0x0;const _0x1d43db=_0x5e3d1c[_0x5b481e([0x73,0x70,0x6c,0x69,0x74])](_0x5b481e([0x2e]));return _0x4cec26[_0x5b481e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x533146=>_0x533146[_0x5b481e([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5b481e([0x2a])))[_0x5b481e([0x6d,0x61,0x70])](_0x54ee4b=>_0x54ee4b[_0x5b481e([0x73,0x70,0x6c,0x69,0x74])](_0x5b481e([0x2e])))[_0x5b481e([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5338b7=>_0x5338b7[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x1d43db[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5b481e([0x6d,0x61,0x70])](_0x1aa68f=>Array(_0x1d43db[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1aa68f[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x5b481e([0x66,0x69,0x6c,0x6c])](_0x1aa68f[0x0]===_0x5b481e([0x2a])?_0x5b481e([0x2a]):'')[_0x5b481e([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1aa68f))[_0x5b481e([0x73,0x6f,0x6d,0x65])](_0xff4710=>_0x1d43db[_0x5b481e([0x65,0x76,0x65,0x72,0x79])]((_0x13e646,_0x60304d)=>_0xff4710[_0x60304d]===_0x13e646||_0xff4710[_0x60304d]===_0x5b481e([0x2a])));}function _0x3fd922(){return _0x2bff22&&_0x33c314?new window[(_0x5b481e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x38c89f,_0x72bdcc)=>{_0x2bff22[_0x5b481e([0x74,0x68,0x65,0x6e])](_0x38c89f,_0x72bdcc),_0x33c314[_0x5b481e([0x74,0x68,0x65,0x6e])](_0x819b7e=>{_0x819b7e!=_0x5b481e([0x56,0x61,0x6c,0x69,0x64])&&_0x38c89f(_0x819b7e);},_0x72bdcc);}):_0x2bff22||_0x33c314||_0x5b481e([0x56,0x61,0x6c,0x69,0x64]);}}function _0x2f94b5(_0x453b0c,_0x2cc2b9){return new window[(_0x5b481e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x15db3f=>{if(_0x4d7c70())return _0x15db3f(_0x5b481e([0x56,0x61,0x6c,0x69,0x64]));_0x2f715f(),_0x1a50d3[_0x5b481e([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x5b481e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0xe9a5bb=!0x1;const _0x22f720=_0x348f70();function _0x4edf97(_0x234c77){return!!_0x234c77&&(typeof _0x234c77===_0x5b481e([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x234c77===_0x5b481e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x234c77[_0x5b481e([0x74,0x68,0x65,0x6e])]===_0x5b481e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x234c77[_0x5b481e([0x63,0x61,0x74,0x63,0x68])]===_0x5b481e([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x4d0257(_0x507413){_0xa04796(_0x507413)[_0x5b481e([0x74,0x68,0x65,0x6e])](_0x4f79d7=>{if(!_0x4f79d7||_0x4f79d7[_0x5b481e([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x5b481e([0x6f,0x6b]))return _0x5b481e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x48693c(_0x222877(_0x22f720+_0x2cc2b9))!=_0x4f79d7[_0x5b481e([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x5b481e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x5b481e([0x56,0x61,0x6c,0x69,0x64]);})[_0x5b481e([0x74,0x68,0x65,0x6e])](_0x50d970=>(_0x2bba7f(),_0x50d970),()=>{const _0x12d9a8=_0x4fdc0f();return null==_0x12d9a8?(_0x2bba7f(),_0x5b481e([0x56,0x61,0x6c,0x69,0x64])):_0x5b481e(_0x42e1ba-_0x12d9a8>(0x79f3db33^_0x3c54df)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x5b481e([0x74,0x68,0x65,0x6e])](_0x15db3f)[_0x5b481e([0x63,0x61,0x74,0x63,0x68])](()=>{_0x15db3f(_0x5b481e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x51ff27=0x5dc9b1b3^_0x3c54df;function _0x2bba7f(){const _0x23822f=_0x5b481e([0x6c,0x6c,0x63,0x74,0x2d])+_0x48693c(_0x222877(_0x453b0c)),_0x51c9b2=_0x358235(_0x48693c(window[_0x5b481e([0x4d,0x61,0x74,0x68])][_0x5b481e([0x63,0x65,0x69,0x6c])](_0x42e1ba/_0x51ff27)));window[_0x5b481e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b481e([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x23822f,_0x51c9b2);}function _0x4fdc0f(){const _0xfe1ec7=_0x5b481e([0x6c,0x6c,0x63,0x74,0x2d])+_0x48693c(_0x222877(_0x453b0c)),_0x5a2791=window[_0x5b481e([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x5b481e([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xfe1ec7);return _0x5a2791?window[_0x5b481e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x358235(_0x5a2791),0x10)*_0x51ff27:null;}function _0xa04796(_0x107d47){return new window[(_0x5b481e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2a0d98,_0x1ec38e)=>{_0x107d47[_0x5b481e([0x74,0x68,0x65,0x6e])](_0x2a0d98,_0x1ec38e),window[_0x5b481e([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1ec38e,0x5dfe8bf3^_0x3c54df);});}}_0x1a50d3[_0x5b481e([0x6f,0x6e])](_0x5b481e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x425e3d,_0x22545b)=>{if(_0x22545b[0x0]!=_0x453b0c)return _0x15db3f(_0x5b481e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x22545b[0x1]={..._0x22545b[0x1],[_0x5b481e([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x22f720};},{[_0x5b481e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b481e([0x68,0x69,0x67,0x68])}),_0x1a50d3[_0x5b481e([0x6f,0x6e])](_0x5b481e([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x189a01=>{_0x4edf97(_0x189a01[_0x5b481e([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0xe9a5bb=!0x0,_0x4d0257(_0x189a01[_0x5b481e([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x5b481e([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x5b481e([0x6c,0x6f,0x77])}),_0x11d3f2[_0x5b481e([0x74,0x68,0x65,0x6e])](()=>{_0xe9a5bb||_0x15db3f(_0x5b481e([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x4d7c70(){return _0x1a50d3[_0x5b481e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b481e([0x76,0x69,0x65,0x77])][_0x5b481e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x5b481e([0x61,0x75,0x74,0x6f]);}function _0x2f715f(){_0x1a50d3[_0x5b481e([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5b481e([0x76,0x69,0x65,0x77])][_0x5b481e([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5b481e([0x61,0x75,0x74,0x6f]);}}function _0x19b671(_0x2b26e7){const _0x20968a=[new window[(_0x5b481e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x21c750=>setTimeout(_0x21c750,0x5df661ff^_0x3c54df)),_0x11d3f2[_0x5b481e([0x74,0x68,0x65,0x6e])](()=>new window[(_0x5b481e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x381067=>{let _0x4f3c6c=0x0;_0x1a50d3[_0x5b481e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b481e([0x6f,0x6e])](_0x5b481e([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x366fc1,_0x1ea491)=>{_0x1ea491[0x0][_0x5b481e([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x4f3c6c++,_0x4f3c6c==(0x5dff5ecb^_0x3c54df)&&(_0x381067(),_0x366fc1[_0x5b481e([0x6f,0x66,0x66])]());});}))];return window[_0x5b481e([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5b481e([0x72,0x61,0x63,0x65])](_0x20968a)[_0x5b481e([0x74,0x68,0x65,0x6e])](()=>_0x2b26e7);}async function _0x25a779(){await _0x11d3f2,_0x1a50d3[_0x5b481e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b481e([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x3a0d17,_0x1a50d3[_0x5b481e([0x6d,0x6f,0x64,0x65,0x6c])][_0x5b481e([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x3a0d17,_0x1a50d3[_0x5b481e([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x5b481e([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x5a0eb1(){return _0x2777b4(_0x5b481e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x36470e(_0x5b481e([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x5b481e([0x73,0x74,0x61,0x74,0x65])]==_0x5b481e([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2a427b(){return _0x2777b4(_0x5b481e([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 _0x4f35b6(){return _0x2777b4(_0x5b481e([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x31eafd(_0x27e288){const _0x56457=_0x40f2ba();_0x1a50d3[_0x56457]=_0x5b481e([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x27e288,_0x27e288!=_0x5b481e([0x56,0x61,0x6c,0x69,0x64])&&_0x25a779();}function _0x40f2ba(){const _0x5e48f4=window[_0x5b481e([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x5b481e([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x5b481e([0x6e,0x6f,0x77])]())[_0x5b481e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x5b481e([0x2e]),'');let _0x433b59=_0x5b481e([0x44]);for(let _0x4b46d8=0x0;_0x4b46d8<_0x5e48f4[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4b46d8+=0x2){let _0x4fdac7=window[_0x5b481e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5e48f4[_0x5b481e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x4b46d8,_0x4b46d8+0x2));_0x4fdac7>=_0x248f31[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4fdac7-=_0x248f31[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x433b59+=_0x248f31[_0x4fdac7];}return _0x433b59;}function _0x38a491(){const _0x317824=_0x559568[_0x5b481e([0x73,0x70,0x6c,0x69,0x74])](_0x5b481e([0x2e]));if(0x3!=_0x317824[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1f8f4d(_0x317824[0x1]);function _0x1f8f4d(_0x2ef88a){const _0x27bb3a=_0x119984(_0x2ef88a);return _0x27bb3a&&_0x793ac3()?_0x27bb3a:null;function _0x793ac3(){const _0x2021c2=_0x27bb3a[_0x5b481e([0x6a,0x74,0x69])],_0x572512=window[_0x5b481e([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2021c2[_0x5b481e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2021c2[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x450736={..._0x27bb3a,[_0x5b481e([0x6a,0x74,0x69])]:_0x2021c2[_0x5b481e([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2021c2[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x450736[_0x5b481e([0x76,0x63])],_0x222877(_0x450736)==_0x572512;}}}async function _0x479a69(){let _0x5ebeeb=!0x0;try{const _0x4f7925=_0x559568[_0x5b481e([0x73,0x70,0x6c,0x69,0x74])](_0x5b481e([0x2e])),[_0x1d2374,_0x239948,_0x4089c1]=_0x4f7925;return _0xf42179(_0x1d2374),await _0xb8c697(_0x1d2374,_0x239948,_0x4089c1),_0x5ebeeb;}catch{return!0x1;}function _0xf42179(_0x191d97){const _0x66803b=_0x119984(_0x191d97);_0x66803b&&_0x66803b[_0x5b481e([0x61,0x6c,0x67])]==_0x5b481e([0x45,0x53,0x32,0x35,0x36])||(_0x5ebeeb=!0x1);}async function _0xb8c697(_0x2888a3,_0x4c8add,_0x89ab66){const _0xb3cc98=window[_0x5b481e([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x5b481e([0x66,0x72,0x6f,0x6d])](_0x45a298(_0x89ab66),_0x4b1460=>_0x4b1460[_0x5b481e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x88c2d1=new window[(_0x5b481e([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x5b481e([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x2888a3+_0x5b481e([0x2e])+_0x4c8add),_0x20907b=window[_0x5b481e([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x5b481e([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x20907b)return;const _0x3c8485=await _0x20907b[_0x5b481e([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x5b481e([0x6a,0x77,0x6b]),_0x5d4ac8,{[_0x5b481e([0x6e,0x61,0x6d,0x65])]:_0x5b481e([0x45,0x43,0x44,0x53,0x41]),[_0x5b481e([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x5b481e([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x5b481e([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x20907b[_0x5b481e([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x5b481e([0x6e,0x61,0x6d,0x65])]:_0x5b481e([0x45,0x43,0x44,0x53,0x41]),[_0x5b481e([0x68,0x61,0x73,0x68])]:{[_0x5b481e([0x6e,0x61,0x6d,0x65])]:_0x5b481e([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x3c8485,_0xb3cc98,_0x88c2d1)||(_0x5ebeeb=!0x1);}}function _0x119984(_0x3c7818){return _0x3c7818[_0x5b481e([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x5b481e([0x65,0x79]))?JSON[_0x5b481e([0x70,0x61,0x72,0x73,0x65])](_0x45a298(_0x3c7818)):null;}function _0x45a298(_0x47d113){return window[_0x5b481e([0x61,0x74,0x6f,0x62])](_0x47d113[_0x5b481e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x5b481e([0x2b]))[_0x5b481e([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x5b481e([0x2f])));}function _0x222877(_0x35239e){let _0x56473f=0x1505;function _0x40391c(_0x142924){for(let _0x289fbe=0x0;_0x289fbe<_0x142924[_0x5b481e([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x289fbe++){const _0x11b838=_0x142924[_0x5b481e([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x289fbe);_0x56473f=(_0x56473f<<0x5)+_0x56473f+_0x11b838,_0x56473f&=_0x56473f;}}function _0x1a8272(_0xcad52b){Array[_0x5b481e([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xcad52b)?_0xcad52b[_0x5b481e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x1a8272):_0xcad52b&&typeof _0xcad52b==_0x5b481e([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x5b481e([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xcad52b)[_0x5b481e([0x73,0x6f,0x72,0x74])]()[_0x5b481e([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1a3993,_0x56d0a1])=>{_0x40391c(_0x1a3993),_0x1a8272(_0x56d0a1);}):_0x40391c(window[_0x5b481e([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xcad52b));}return _0x1a8272(_0x35239e),_0x56473f>>>0x0;}function _0x48693c(_0x4a7537){return _0x4a7537[_0x5b481e([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x5b481e([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x5b481e([0x30]));}function _0x358235(_0x145782){return _0x145782[_0x5b481e([0x73,0x70,0x6c,0x69,0x74])]('')[_0x5b481e([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x5b481e([0x6a,0x6f,0x69,0x6e])]('');}function _0x2777b4(_0x3a0c7b){return _0x1a50d3[_0x5b481e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5b481e([0x68,0x61,0x73])](_0x3a0c7b);}function _0x36470e(_0x35c33f){return _0x1a50d3[_0x5b481e([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x5b481e([0x67,0x65,0x74])](_0x35c33f);}function _0x3a0d17(){}function _0x5b481e(_0xe93bb3){return _0xe93bb3['map'](_0x134827=>String['fromCharCode'](_0x134827))['join']('');}_0x31eafd(await _0x15b0ae());}(this);}['destroy'](){const _0x2d14c5=this['editor']['plugins']['get'](o),_0x3aeacf=this['editor']['config']['get']('collaboration.channelId');for(const _0x39ef3e of _0x2d14c5['getCommentThreads']({'channelId':_0x3aeacf}))_0x2d14c5['_detachCommentThread'](_0x39ef3e['id']),_0x2d14c5['_threads']['delete'](_0x39ef3e['id']);super['destroy']();}['hasMarkerForId'](_0x1397d4){return this['getAllMarkersForId'](_0x1397d4)['length']>0x0;}['getAllMarkersForId'](_0x209122){const _0x3803c3=[];for(const _0x51c474 of this['editor']['model']['markers'])_0x51c474['name']['startsWith']('comment:'+_0x209122)&&_0x3803c3['push'](_0x51c474);return _0x3803c3;}['scrollToThreadMarker'](_0x48c3c3){setTimeout(()=>{const _0x43421f=this['_getTargetForId'](_0x48c3c3);if(!_0x43421f)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x48c3c3&&nt({'target':_0x43421f[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5e85cc){this['editor']['model']['change'](()=>{for(const _0x5263b3 of this['getAllMarkersForId'](_0x5e85cc))this['editor']['editing']['reconvertMarker'](_0x5263b3);});}['_attachArchivedThread'](_0x3e246c){const _0x3457cc=this['editor']['plugins']['get'](o),_0x466dee=this['editor']['plugins']['get'](b),_0x473776=_0x3457cc['getCommentThread'](_0x3e246c);if(!_0x473776['isAttached']){const _0x3619ce=_0x473776['attachTo'](()=>this['_getTargetForId'](_0x473776['id']));_0x466dee['registerAnnotation'](_0x3619ce),_0x473776['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1a5959=this['editor'],_0x4a08a3=_0x1a5959['plugins']['get'](it);_0x1a5959['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x3d1714,_0x57f002)=>{const {id:_0x18a61c}=er(_0x3d1714['markerName']),_0x1e9bf2=_0x1a5959['plugins']['get'](o)['getCommentThread'](_0x18a61c),_0x1e8a3b=this['activeMarker']&&er(this['activeMarker'])['id']===_0x18a61c;let _0x53339d;if(_0x1e9bf2&&_0x1e9bf2['isResolved']&&!_0x1e8a3b&&_0x3d1714['item'])return _0x57f002['consumable']['consume'](_0x3d1714['item'],'addMarker:'+_0x3d1714['markerName']),_0x57f002['consumable']['consume'](_0x3d1714['item'],'removeMarker:'+_0x3d1714['markerName']),null;const _0x46f091=['ck-comment-marker'];return _0x1e8a3b&&_0x46f091['push']('ck-comment-marker--active'),_0x53339d=_0x1e9bf2?.['length']?_0x1e9bf2['comments']['first']['author']['id']:_0x4a08a3['me']['id'],{'classes':_0x46f091,'attributes':{'data-comment':_0x18a61c,'data-author-id':_0x53339d}};}}),_0x1a5959['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3fea9a,{options:_0x37dde})=>{if(_0x37dde['showCommentHighlights'])return null;const _0x2eab55=_0x1a5959['plugins']['get'](o),_0x2c273e=_0x1a5959['model']['markers']['get'](_0x3fea9a),{id:_0x5c2d08,part:_0x5b4054}=er(_0x3fea9a);return _0x2c273e&&!_0x2c273e['affectsData']||_0x37dde['ignoreResolvedComments']&&_0x2eab55['getCommentThread'](_0x5c2d08)?.['isResolved']?null:{'group':'comment','name':_0x5b4054?_0x5c2d08+':'+_0x5b4054:_0x5c2d08};}}),_0x1a5959['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x6696e8,{writer:_0x1e6f48})=>_0x1e6f48['createElement']('$marker',{'data-name':'comment:'+_0x6696e8['getAttribute']('id')})}),_0x1a5959['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x13c6aa=this['editor'],_0x340d0c=_0x13c6aa['plugins']['get'](o),_0x43a8b1=new Set(),_0xbbf1f9=new Set();_0x13c6aa['model']['document']['registerPostFixer'](_0x4d65e8=>{let _0x1a5488=!0x1;for(const {name:_0x53fc83,data:_0x16803b}of _0x13c6aa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x815dbb,id:_0x102c96}=er(_0x53fc83);let _0x5f1e0e=_0x16803b['newRange'];if('comment'!==_0x815dbb||!_0x5f1e0e)continue;const _0x1bd65c='$graveyard'===_0x5f1e0e['root']['rootName'];_0x1bd65c||(_0x5f1e0e=dt(_0x5f1e0e,_0x13c6aa['model']),!_0x5f1e0e||_0x5f1e0e['isCollapsed']||!_0x16803b['newRange']||_0x5f1e0e['isEqual'](_0x16803b['newRange']))?_0x13c6aa['model']['hasContent'](_0x5f1e0e)&&!_0x1bd65c?this['isThreadsLoadingPaused']?_0x43a8b1['add'](_0x53fc83):this['_handleThreadMarker'](_0x53fc83,_0x102c96):(_0xbbf1f9['add'](_0x53fc83),_0x43a8b1['delete'](_0x53fc83),_0x4d65e8['removeMarker'](_0x53fc83),_0x1a5488=!0x0):(_0x4d65e8['updateMarker'](_0x53fc83,{'range':_0x5f1e0e}),_0x1a5488=!0x0);}return _0x1a5488;}),this['on']('change:isThreadsLoadingPaused',(_0x4e0f18,_0x1c7bcf,_0x463783)=>{if(!_0x463783&&_0x43a8b1['size'])for(const _0x5634ed of _0x43a8b1){const {id:_0x4c8f83}=er(_0x5634ed);_0x43a8b1['delete'](_0x5634ed),_0x13c6aa['model']['markers']['get'](_0x5634ed)&&this['_handleThreadMarker'](_0x5634ed,_0x4c8f83);}}),this['listenTo'](_0x13c6aa['model']['document'],'change',()=>{for(const {name:_0x21b27a,data:{newRange:_0x841087}}of _0x13c6aa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x26fb53,id:_0x148995}=er(_0x21b27a);if('comment'!==_0x26fb53)continue;const _0x24eecf=_0x340d0c['getCommentThread'](_0x148995),_0x475416=this['hasMarkerForId'](_0x148995);_0x24eecf&&(!_0x24eecf['_hasTargetInContent']&&_0x841087&&_0x13c6aa['editing']['view']['once']('render',()=>{const _0x5869e4=_0x13c6aa['plugins']['get'](y),_0x32da45=_0x340d0c['_threadToController']['get'](_0x24eecf)['view'];_0x5869e4['getByInnerView'](_0x32da45)['refreshVisibility']();},{'priority':'low'}),_0x24eecf['_hasTargetInContent']=_0x475416||!!_0x841087),_0x841087||(_0xbbf1f9['add'](_0x21b27a),_0x43a8b1['delete'](_0x21b27a));}for(const _0x36c7d0 of _0xbbf1f9){const {id:_0x209eb1}=er(_0x36c7d0),_0xd0577d=_0x340d0c['getCommentThread'](_0x209eb1);if(_0x43a8b1['delete'](_0x36c7d0),!_0xd0577d)continue;const _0xde31d8=this['hasMarkerForId'](_0x209eb1);_0xde31d8||_0xd0577d['isSubmitted']?_0xde31d8||_0xd0577d['unlinkedAt']||_0xd0577d['setUnlinkedAt'](new Date()):_0xd0577d['remove']();}_0xbbf1f9['clear']();});}['_handleInitialThreads'](_0x5160e4){_0x5160e4['forEach'](_0x4749b2=>{_0x4749b2['unlinkedAt']&&this['_attachArchivedThread'](_0x4749b2['id']);});}['_getTargetForId'](_0x4cc932){const _0x2a529a=this['editor'],_0x3afb9c=this['getAllMarkersForId'](_0x4cc932);return et(_0x2a529a['editing'],_0x3afb9c);}['_getTextContext'](_0x2ed146){const _0x2bfeff=this['getAllMarkersForId'](_0x2ed146);let _0x478f07='',_0x13cf3d=!0x1;for(const _0x1914fc of _0x2bfeff){const _0x2d31b6=_0x1914fc['getRange']();for(const _0x231914 of Array['from'](_0x2d31b6['getItems']()))_0x231914['is']('$textProxy')?(_0x478f07&&_0x13cf3d&&(_0x478f07+='\x20',_0x13cf3d=!0x1),_0x478f07+=_0x231914['data']):_0x13cf3d=!0x0;_0x13cf3d=!0x0;}return _0x478f07['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x226ba0,_0x445853){const _0x1c497c=this['editor'],_0x524f1f=_0x1c497c['plugins']['get'](o);let _0x4bf7ab=_0x524f1f['getCommentThread'](_0x445853);const _0xf39556=_0x1c497c['config']['get']('collaboration.channelId'),_0x14d61c=_0x1c497c['plugins']['get'](b);if(_0x4bf7ab&&(_0x4bf7ab['unlinkedAt']&&_0x4bf7ab['setUnlinkedAt'](null),_0x4bf7ab['isAttached']))return _0x4bf7ab;return!this['getAllMarkersForId'](_0x445853)[0x0]['managedUsingOperations']?_0x1c497c['editing']['view']['once']('render',()=>{if(_0x524f1f['getCommentThread'](_0x445853))return;const _0x5277a6=_0x1c497c['plugins']['get'](y);_0x4bf7ab=_0x524f1f['openNewCommentThread']({'channelId':_0xf39556,'threadId':_0x445853,'target':()=>this['_getTargetForId'](_0x445853),'context':{'type':'text','value':this['_getTextContext'](_0x445853)}});const _0x2446fa=_0x524f1f['_threadToController']['get'](_0x4bf7ab)['view'],_0x3509cf=_0x5277a6['getByInnerView'](_0x2446fa);_0x3509cf&&_0x14d61c['registerAnnotation'](_0x3509cf);},{'priority':'low'}):_0x524f1f['fetchCommentThread']({'channelId':_0xf39556,'threadId':_0x445853})['then'](_0x1c99b0=>{if('destroyed'!==_0x1c497c['state']){if(_0x4bf7ab=_0x1c99b0,_0x4bf7ab&&!_0x4bf7ab['isAttached']){const _0x299527=_0x4bf7ab['attachTo'](()=>this['_getTargetForId'](_0x445853));_0x14d61c['registerAnnotation'](_0x299527),_0x4bf7ab['isResolved']&&this['_reconvertMarkers'](_0x445853);}else{if(!_0x4bf7ab){const _0x1fdcad=this['getAllMarkersForId'](_0x445853);_0x1c497c['model']['change'](_0x35b70f=>{for(const _0x19da2d of _0x1fdcad)_0x35b70f['removeMarker'](_0x19da2d);});}}}}),_0x4bf7ab;}['_handleThreadMarker'](_0x35a703,_0x4a9e01){const _0x20c496=this['_attachMarkerToThread'](_0x35a703,_0x4a9e01);_0x20c496&&!_0x20c496['context']&&_0x20c496['setContext']({'type':'text','value':this['_getTextContext'](_0x4a9e01)});}['_initAriaMarkerChangeAnnouncements'](){const _0x815e38=this['editor'];ot(_0x815e38['model'],({left:_0x45acfb,entered:_0x36368a})=>{for(const _0x2b8512 of _0x45acfb)if(mt(_0x2b8512)){_0x815e38['ui']['ariaLiveAnnouncer']['announce'](N(_0x815e38['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x19b9ce of _0x36368a)if(mt(_0x19b9ce)){_0x815e38['ui']['ariaLiveAnnouncer']['announce'](N(_0x815e38['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x3d0eb6)));break;}});}}function ft(_0x1687b2,_0x344194){return _0x344194?_0x1687b2+':'+_0x344194:_0x1687b2;}function er(_0x3f0410){const _0x5940f9=_0x3f0410['split'](':');return{'group':_0x5940f9[0x0],'id':_0x5940f9[0x1],'part':_0x5940f9[0x2]};}function dt(_0x3173c5,_0x460744){const _0x5b97ee=_0x460744['schema'],_0x3050c0=_0x460744['createRange'](_0x3173c5['start']);for(const _0x280879 of _0x3173c5['getWalker']()){const {type:_0x53ebf6,item:_0x326c22,nextPosition:_0x4b8085}=_0x280879;if('text'===_0x53ebf6||_0x5b97ee['isObject'](_0x326c22)){const _0x26fa9b=_0x460744['createPositionBefore'](_0x326c22);_0x3050c0['isCollapsed']&&(_0x3050c0['start']=_0x26fa9b),_0x3050c0['end']=_0x4b8085;}}return _0x3050c0;}function mt(_0x3b5982){return'comment'===er(_0x3b5982['name'])['group'];}class s extends _0x15d9b0{['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 _0x456787=this['editor'],_0xb0b719=_0x456787['plugins']['get'](o),_0x2e5a98=_0x456787['plugins']['get'](r),_0x4483ba=_0x456787['plugins']['get'](y),_0x4994aa=_0x456787['plugins']['get'](b);_0x456787['ui']['componentFactory']['add']('comment',()=>{const _0x452c8c=this['_createUIButton'](_0x43a6f1);return _0x452c8c['tooltip']=!0x0,_0x452c8c;}),_0x456787['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x42a00d)),_0x4994aa['addSourceCollector'](()=>{const _0x4fe8cd=[];for(const [_0x460244,_0x8f0d6d]of _0xb0b719['_threadToController']){const _0x463158=_0x2e5a98['getAllMarkersForId'](_0x460244['id']),_0x5435da=_0x463158['map'](_0x47823e=>_0x47823e['getRange']());_0x463158['length']>0x0&&_0x4fe8cd['push']([_0x8f0d6d['view'],_0x5435da]);}return _0x4fe8cd;}),this['listenTo'](_0x4483ba,'change:activeAnnotations',(_0x2f1919,_0x1375ba,_0x11d101)=>{const _0x1341cf=Array['from'](_0x11d101)['map'](_0x1f5fb4=>_0x1f5fb4['innerView'])['find'](_0x58c112=>_0xb0b719['_viewToController']['has'](_0x58c112));if(!_0x1341cf)return void(_0x2e5a98['activeMarker']=null);const _0x156d7d=_0xb0b719['_viewToController']['get'](_0x1341cf)['model']['id'],_0x17d3f0='comment:'+_0x156d7d;_0x156d7d&&_0x2e5a98['hasMarkerForId'](_0x156d7d)?_0x2e5a98['activeMarker']=_0x17d3f0:_0x2e5a98['activeMarker']&&(_0x2e5a98['activeMarker']=null);}),this['listenTo'](_0xb0b719,'removeCommentThread',(_0x11f124,{threadId:_0x369dc7,isFromAdapter:_0x52b666})=>{!_0x52b666&&_0x456787['ui']['focusTracker']['isFocused']&&_0x2e5a98['hasMarkerForId'](_0x369dc7)&&_0x456787['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xb0b719,'addComment',(_0x1546c9,{threadId:_0x5537a9,isFromAdapter:_0xec27f})=>{if(_0xec27f||!_0x2e5a98['hasMarkerForId'](_0x5537a9)||!_0xb0b719['hasCommentThread'](_0x5537a9))return;0x1===_0xb0b719['getCommentThread'](_0x5537a9)['length']&&(_0x456787['editing']['view']['focus'](),_0x1546c9['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x229cbf=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x23e359;for(const _0x45ec32 in _0x229cbf){const _0x13993c=_0x45ec32,_0x30cd18=_0x229cbf[_0x13993c];if('commentsLicenseKeyValid'==_0x30cd18||'commentsLicenseKeyInvalid'==_0x30cd18||'commentsLicenseKeyExpired'==_0x30cd18||'commentsLicenseKeyDomainLimit'==_0x30cd18||'commentsLicenseKeyNotAllowed'==_0x30cd18||'commentsLicenseKeyEvaluationLimit'==_0x30cd18||'commentsLicenseKeyTrialLimit'==_0x30cd18||'commentsLicenseKeyUsageLimit'==_0x30cd18){delete _0x229cbf[_0x13993c],_0x23e359=_0x30cd18,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x23e359&&_0x229cbf['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x23e359&&_0x229cbf['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x23e359&&_0x229cbf['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x23e359&&_0x229cbf['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x23e359&&_0x229cbf['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x23e359&&_0x229cbf['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x23e359&&_0x229cbf['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x222833){const _0x38aa47=this['editor'],_0x90f7a=new _0x222833(_0x38aa47['locale']),_0x8df613=_0x38aa47['commands']['get']('addCommentThread');return _0x90f7a['set']({'label':N(_0x38aa47['locale'],'Comment'),'icon':_0x1406a2}),_0x90f7a['bind']('isEnabled')['to'](_0x8df613,'hasContent'),this['listenTo'](_0x90f7a,'execute',()=>{_0x8df613['execute']();}),_0x90f7a;}}class i extends _0x15d9b0{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5e7fd8){super(_0x5e7fd8),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5c436a,_0x3ad6c6,_0x37edd6)=>{_0x37edd6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x35bc6,_0x3c67d1]of this['editor']['commands'])_0x3c67d1['affectsData']&&'addCommentThread'!==_0x35bc6&&_0x3c67d1['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 _0x574869=this['editor']['editing']['view']['document'];this['listenTo'](_0x574869,'cut',_0x30b6af=>_0x30b6af['stop'](),{'priority':'highest'}),this['listenTo'](_0x574869,'clipboardInput',_0x313152=>_0x313152['stop'](),{'priority':'highest'}),this['listenTo'](_0x574869,'delete',_0x2da65f=>_0x2da65f['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x3468fb,_0x33ee40]of this['editor']['commands'])_0x33ee40['affectsData']&&'addCommentThread'!==_0x3468fb&&_0x33ee40['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 _0x6da988{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19d71d){super(_0x19d71d),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x388b8d=this['context']['plugins']['get'](y);this['listenTo'](_0x388b8d,'_activateAnnotation',(_0x5ce734,_0x2a720a)=>{for(const _0x2cce6b of this['activeUIs']){const _0x307c17=this['_uis']['get'](_0x2cce6b);(0x0,this['uisData']['get'](_0x2cce6b)['filter'])(_0x2a720a)&&_0x307c17['setActiveAnnotation'](_0x2a720a);}}),this['listenTo'](_0x388b8d,'_deactivateAllAnnotations',()=>{for(const _0x18aacd of this['activeUIs']){this['_uis']['get'](_0x18aacd)['setActiveAnnotation'](null);}}),this['listenTo'](_0x388b8d['_visibleAnnotations'],'add',(_0x1ebef8,_0x1f4dc1)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1f4dc1);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2e13fb){return this['activeUIs']['has'](_0x2e13fb);}['activate'](_0x6aeb76,_0x2340c4=this['defaultFilter']){const _0x53bd5e=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x6aeb76))throw new _0x1f0298('annotationsuis-missing-ui',this,{'uiName':_0x6aeb76});this['isActive'](_0x6aeb76)&&this['deactivate'](_0x6aeb76),this['activeUIs']['add'](_0x6aeb76);const _0x5a3ea3=new S();v({'source':_0x53bd5e['_visibleAnnotations'],'target':_0x5a3ea3,'filter':_0x2340c4}),this['uisData']['set'](_0x6aeb76,{'collection':_0x5a3ea3,'filter':_0x2340c4});const _0xfe0281=this['_uis']['get'](_0x6aeb76);_0xfe0281['attach'](_0x5a3ea3),this['listenTo'](_0xfe0281,'change:activeAnnotation',(_0x4203ae,_0x249647,_0x9b55cf,_0x3f7695)=>{_0x3f7695&&_0x53bd5e['_removeActiveAnnotation'](_0x3f7695),_0x9b55cf&&_0x53bd5e['_addActiveAnnotation'](_0x9b55cf);});}['deactivate'](_0x4465e4){if(this['activeUIs']['delete'](_0x4465e4),!this['_uis']['has'](_0x4465e4))throw new _0x1f0298('annotationsuis-missing-ui',this,{'uiName':_0x4465e4});const _0x3be90e=this['_uis']['get'](_0x4465e4);_0x3be90e['detach'](),this['stopListening'](_0x3be90e),this['uisData']['get'](_0x4465e4)['collection']['destroy'](),this['uisData']['delete'](_0x4465e4);}['switchTo'](_0x4e1294){if(!this['_uis']['has'](_0x4e1294))throw new _0x1f0298('annotationsuis-missing-ui',this,{'uiName':_0x4e1294});const _0x1a333d=this['context']['plugins']['get'](y),_0x1454dc=Array['from'](_0x1a333d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4e1294);const _0x252f08=this['_uis']['get'](_0x4e1294);_0x252f08['setActiveAnnotation'](_0x1454dc),_0x252f08['_setSelectedAnnotations']&&_0x1454dc&&_0x252f08['_setSelectedAnnotations']([_0x1454dc]);}['deactivateAll'](){for(const _0x1fbc88 of this['activeUIs'])this['deactivate'](_0x1fbc88);}['register'](_0x7cbf3a,_0x4ee075){if(this['_uis']['has'](_0x7cbf3a))throw new _0x1f0298('annotationsuis-register-already-registered');if('function'!=typeof _0x4ee075['attach']||'function'!=typeof _0x4ee075['detach']||'function'!=typeof _0x4ee075['setActiveAnnotation'])throw new _0x1f0298('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x7cbf3a,_0x4ee075);}['refilterAnnotations'](){const _0x256767=this['context']['plugins']['get'](y)['collection'],_0x1594e0=new Map(),_0x216db7=Array['from'](this['activeUIs']);for(const _0x1624b6 of this['activeUIs']){const _0x545ac=this['uisData']['get'](_0x1624b6)['collection'];for(const _0x3173ec of _0x545ac)_0x1594e0['set'](_0x3173ec,_0x1624b6);}for(const _0xdc729e of _0x256767){const _0x5ae9ce=_0x1594e0['get'](_0xdc729e);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xdc729e);const _0x49b835=_0x216db7['find'](_0x58363a=>this['uisData']['get'](_0x58363a)['filter'](_0xdc729e));_0x5ae9ce!==_0x49b835&&(_0x5ae9ce&&this['uisData']['get'](_0x5ae9ce)['collection']['remove'](_0xdc729e),_0x49b835&&this['uisData']['get'](_0x49b835)['collection']['add'](_0xdc729e));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x28f630){const _0x5108da=[];for(const _0x2182e9 of this['activeUIs']){(0x0,this['uisData']['get'](_0x2182e9)['filter'])(_0x28f630)&&_0x5108da['push'](_0x2182e9);}if(_0x5108da['length']>0x1)throw new _0x1f0298('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x5108da,'annotationType':_0x28f630['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1d50de){super(_0x1d50de);const _0x46a991=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 _0x2b83b1(),this['focusCycler']=new _0x4a1f00({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x46a991['to']('class')],'style':{'minHeight':_0x46a991['to']('minHeight',_0x3aaad7=>'number'==typeof _0x3aaad7?_i(_0x3aaad7+0xa):null)},'dir':_0x1d50de['uiLanguageDirection'],'role':'application','aria-label':N(_0x1d50de,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x1d50de,'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',_0x25f367=>{this['_updateItemPositionInFocusables'](_0x25f367['source']);}),this['list']['forEach'](_0x5c01e0=>{this['focusTracker']['add'](_0x5c01e0['element']),this['_updateItemPositionInFocusables'](_0x5c01e0);}),this['list']['on']('change',(_0x3450cf,_0xffe313)=>{for(const _0x4c1b56 of _0xffe313['removed'])this['focusTracker']['remove'](_0x4c1b56['element']),this['focusables']['remove'](_0x4c1b56);for(const _0x5cd06f of _0xffe313['added'])this['focusTracker']['add'](_0x5cd06f['element']),this['_updateItemPositionInFocusables'](_0x5cd06f);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x253948){const _0x43a8b6=this['focusables']['getIndex'](_0x253948);let _0x1ea9a9,_0x45d917;for(const _0x27c37f of this['focusables'])if(_0x253948['top']<_0x27c37f['top']){_0x1ea9a9=_0x27c37f;break;}if(_0x45d917=_0x1ea9a9?this['focusables']['getIndex'](_0x1ea9a9):this['focusables']['length'],-0x1!==_0x43a8b6){if(_0x43a8b6===_0x45d917-0x1)return;this['focusables']['remove'](_0x253948),_0x45d917=_0x1ea9a9?this['focusables']['getIndex'](_0x1ea9a9):this['focusables']['length'];}this['focusables']['add'](_0x253948,_0x45d917);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5d06a1){super(_0x5d06a1),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x591cac,_0x534555)=>_0x591cac+_0x534555),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x2de026=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x2de026['to']('isAnimationDisabled',_0x134b57=>_0x134b57?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x2de026['to']('top',_0x5ada27=>Ot(_0x5ada27))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x42f6cd=this['element']['clientHeight'];_0x42f6cd&&(this['height']=_0x42f6cd);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x6da988{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5b05fa){super(_0x5b05fa),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 _0x6340c0=this['context']['config']['get']('sidebar.container');_0x6340c0&&this['setContainer'](_0x6340c0);}['setContainer'](_0x3fc6c8){if(!g(_0x3fc6c8))throw new _0x1f0298('sidebar-setcontainer-invalid-element');this['container']=_0x3fc6c8;}['_attachToContainer']({viewClass:_0x291cbe='',spaceBetweenItems:_0x219ae4=0x19}={}){if(!g(this['container']))throw new _0x1f0298('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x291cbe,this['_spaceBetweenItems']=_0x219ae4;}['rearrange']({removedAnnotation:_0x459c20,previousAnnotation:_0x5e6de7,nextAnnotation:_0x4466ca}){const _0x9d6c7e=this['getSidebarItemView'](_0x459c20);this['view']['list']['remove'](_0x9d6c7e),this['_destroySidebarItemView'](_0x459c20),_0x5e6de7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5e6de7)),_0x4466ca&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x4466ca)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x47aec8,activatedAnnotation:_0x4416eb,disableAnimationOnActivatedAnnotation:_0x243dbe}){if(this['_activeAnnotation']=_0x4416eb,_0x47aec8){_0x47aec8['isActive']=!0x1;const _0x44c893=this['getSidebarItemView'](_0x47aec8);_0x44c893&&_0x243dbe&&(_0x44c893['isAnimationDisabled']=!0x1);}if(_0x4416eb){const _0x5a51e2=this['getSidebarItemView'](_0x4416eb);_0x5a51e2&&(_0x4416eb['isActive']=!0x0,_0x243dbe&&(_0x5a51e2['isAnimationDisabled']=!0x0,_0x5a51e2['top']+=0x1),this['_alignToTargetRect'](_0x5a51e2));}}['_detachFromContainer'](_0x2aa964){if(this['view']['element']['remove'](),_0x2aa964){for(const _0x575caf of _0x2aa964)this['_destroySidebarItemView'](_0x575caf);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x5d81ac,_0x46bc39){_0x46bc39||(_0x46bc39=_0x5d81ac['view']);const _0x581d5b=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x581d5b,_0x5d81ac),this['_annotationToSidebarItemView']['set'](_0x5d81ac,_0x581d5b),_0x581d5b['content']['add'](_0x46bc39),this['listenTo'](_0x5d81ac['view'],'change:targetRect',(_0x3a25aa,_0x4122f9,_0x4c5c28)=>{const _0x531314=this['_getTargetTop'](_0x5d81ac,_0x4c5c28);_0x581d5b['_targetTop']!=_0x531314&&(_0x581d5b['_targetTop']=_0x531314,this['_setItemTop'](_0x581d5b,_0x531314));}),this['listenTo'](_0x581d5b,'change:top',()=>{this['_recalculate'](_0x581d5b,'top');}),this['listenTo'](_0x581d5b,'change:bottom',()=>{this['_recalculate'](_0x581d5b,'bottom');}),this['_alignToTargetRect'](_0x581d5b);const _0x6a22eb=this['_getItemBefore'](_0x581d5b);if(_0x6a22eb)this['_alignAfterItem'](_0x6a22eb,_0x581d5b)||this['_alignToTargetRect'](_0x581d5b);else this['_alignToTargetRect'](_0x581d5b);return this['_updateLastItem'](),this['view']['list']['add'](_0x581d5b),_0x581d5b;}['_alignForTopChange'](_0x3e87d7){if(!_0x3e87d7['content']['length'])return;const _0x18a537=this['_getItemBefore'](_0x3e87d7);if(!_0x18a537)return;const _0x3d2b2e=this['_sidebarItemViewToAnnotation']['get'](_0x18a537),_0x3c3e96=this['_activeAnnotation'];_0x3c3e96&&_0x3c3e96===_0x3d2b2e?this['_alignAfterItem'](_0x18a537,_0x3e87d7):this['_alignBeforeItem'](_0x3e87d7,_0x18a537);}['_alignForBottomChange'](_0x38e7cc){if(!_0x38e7cc['content']['length'])return;const _0x1b964f=this['_getItemAfter'](_0x38e7cc);if(!_0x1b964f)return;const _0x50be3f=this['_sidebarItemViewToAnnotation']['get'](_0x1b964f),_0xf54572=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x505b48=this['_activeAnnotation'];_0x505b48&&_0x505b48===_0x50be3f&&_0xf54572?(this['_alignBeforeItem'](_0x1b964f,_0x38e7cc),this['_alignAfterItem'](_0x38e7cc,_0x1b964f)):_0x505b48&&_0x505b48===_0x50be3f?this['_alignBeforeItem'](_0x1b964f,_0x38e7cc):this['_alignAfterItem'](_0x38e7cc,_0x1b964f);}['_recalculate'](_0x17774b,_0x55550c){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4c3dbf,changedProp:_0x2b8d21}of this['_recalculateBuffer'])'top'===_0x2b8d21?this['_alignForTopChange'](_0x4c3dbf):this['_alignForBottomChange'](_0x4c3dbf);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x17774b,'changedProp':_0x55550c});}['getSidebarItemView'](_0x226cea){return this['_annotationToSidebarItemView']['get'](_0x226cea);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x345b41){const _0x5aa522=this['getSidebarItemView'](_0x345b41);this['stopListening'](_0x5aa522),this['stopListening'](_0x345b41['view']),_0x5aa522['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x345b41),this['_sidebarItemViewToAnnotation']['delete'](_0x5aa522);}['_createSidebarView'](){const _0x4905c8=new H(this['context']['locale']);return _0x4905c8['render'](),this['on']('change:_lastItem',(_0x446430,_0x5292b1,_0x2fce40,_0x317aac)=>{_0x317aac&&_0x4905c8['unbind']('minHeight'),_0x2fce40?_0x4905c8['bind']('minHeight')['to'](_0x2fce40,'bottom'):_0x4905c8['minHeight']=null;}),_0x4905c8;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x1cdf03){const _0x13f118=this['_sidebarItemViewToAnnotation']['get'](_0x1cdf03),_0x4ed1a6=_0x13f118&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x13f118)-0x1);return _0x4ed1a6&&this['getSidebarItemView'](_0x4ed1a6)||null;}['_getItemAfter'](_0x1e4996){const _0x33aec9=this['_sidebarItemViewToAnnotation']['get'](_0x1e4996),_0x3ec0c3=_0x33aec9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x33aec9)+0x1);return _0x3ec0c3&&this['getSidebarItemView'](_0x3ec0c3)||null;}['_alignBeforeItem'](_0x525692,_0x1f0565){_0x525692['updateHeight']();const _0x5a229c=G(_0x1f0565['bottom']+this['_spaceBetweenItems'],_0x525692['top']);return!!_0x5a229c&&(this['_setItemTop'](_0x1f0565,_0x1f0565['top']-_0x5a229c),!0x0);}['_alignAfterItem'](_0x1aba2d,_0x5e5168){_0x1aba2d['updateHeight']();const _0x206e10=G(_0x1aba2d['bottom']+this['_spaceBetweenItems'],_0x5e5168['top']);return!!_0x206e10&&(this['_setItemTop'](_0x5e5168,_0x5e5168['top']+_0x206e10,!0x1),!0x0);}['_alignToTargetRect'](_0x4a1ca7){const _0x32e2ba=this['_sidebarItemViewToAnnotation']['get'](_0x4a1ca7);if(!_0x32e2ba||!_0x32e2ba['target']||!_0x32e2ba['targetRect'])return;const _0x5f3e1c=this['_getTargetTop'](_0x32e2ba,_0x32e2ba['targetRect']);this['_setItemTop'](_0x4a1ca7,_0x5f3e1c);}['_getTargetTop'](_0x24c923,_0x121a10){if(null===_0x121a10)return 0x0;if(_0x24c923['target']instanceof _0x2315c3)return _0x121a10['top'];{const _0x252633=new _0x2315c3(this['view']['element'])['top'];return _0x121a10['top']-_0x252633;}}['_setItemTop'](_0x4b91f8,_0x4037c9,_0x368f1a=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x368f1a&&(_0x4037c9=Math['max'](_0x4037c9,this['_getMaxAvailableTop'](_0x4b91f8))),_0x4b91f8['top']=_0x4037c9;}['_getMaxAvailableTop'](_0x93a583){let _0x5a703e=this['_getItemBefore'](_0x93a583),_0x2a00b7=0x0;for(;_0x5a703e;)_0x5a703e['updateHeight'](),_0x2a00b7+=this['_spaceBetweenItems']+_0x5a703e['height'],_0x5a703e=this['_getItemBefore'](_0x5a703e);return _0x2a00b7;}}function G(_0x7f2d9,_0x323792){return Math['max'](_0x7f2d9-_0x323792,0x0);}function g(_0x435abd){return null!==_0x435abd&&'object'==typeof _0x435abd&&0x1===_0x435abd['nodeType'];}class e extends _0x6da988{['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(_0x551ef9){super(_0x551ef9),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x5b9636(),this['_refreshPositioningDebounced']=_0x721014(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x27b727=this['context']['plugins']['get'](j),_0x1974e9=this['context']['plugins']['get'](z);_0x27b727['register']('wideSidebar',this),_0x1974e9['container']&&_0x27b727['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x127e04){if(_0x127e04===this['activeAnnotation'])return;const _0x570f6f=this['context']['plugins']['get'](z);_0x570f6f['_activeAnnotation']=_0x127e04;const _0x1f018c=this['activeAnnotation'];_0x570f6f['refresh']({'blurredAnnotation':_0x1f018c,'activatedAnnotation':_0x127e04}),this['activeAnnotation']=_0x127e04;}['attach'](_0xd4de4){this['annotations']=_0xd4de4;const _0x552da6=this['context']['plugins']['get'](z);if(_0x552da6['_annotations']=_0xd4de4,this['isAttached'])throw new _0x1f0298('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x552da6,'set:container',()=>{this['detach'](),this['listenTo'](_0x552da6,'change:container',_0x394555=>{_0x394555['off'](),this['attach'](_0xd4de4);});}),_0x552da6['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x487c72=_0x2dd2b3=>{_0x2dd2b3['updateTargetRect'](),_0x552da6['addAnnotation'](_0x2dd2b3);};for(const _0x2abd31 of _0xd4de4)_0x487c72(_0x2abd31);this['listenTo'](_0xd4de4,'add',(_0x5c34c6,_0x42e77d)=>{_0x487c72(_0x42e77d);}),this['listenTo'](_0xd4de4,'remove',(_0x21a8d0,_0x56f3bb,_0x3153b0)=>{_0x552da6['rearrange']({'removedAnnotation':_0x56f3bb,'previousAnnotation':_0xd4de4['get'](_0x3153b0-0x1),'nextAnnotation':_0xd4de4['get'](_0x3153b0+0x1)}),_0x56f3bb===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0xd4de4,'focus',(_0xb91a0e,_0x1b70fb)=>{this['setActiveAnnotation'](_0x1b70fb);}),this['listenTo'](_0xd4de4,'blur',()=>{this['setActiveAnnotation'](null);});const _0x23eb1e=this['context']instanceof _0x25b120?this['context']['editors']:new _0x5b9636([this['context']]);for(const _0x23ad80 of _0x23eb1e)this['_integrateWithEditorAnnotations'](_0x23ad80);this['listenTo'](_0x23eb1e,'add',(_0x187bda,_0x1737ec)=>{this['listenTo'](_0x1737ec,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1737ec);});}),this['listenTo'](_0x23eb1e,'remove',(_0x2b0726,_0x1bffea)=>{_0x1bffea['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1bffea['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x1f0298('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4b1a47=this['context']['plugins']['get'](z);_0x4b1a47['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4b1a47),this['stopListening'](this['annotations']),this['context']instanceof _0x25b120&&this['stopListening'](this['context']['editors']);for(const _0x365116 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x365116);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x103c8c){if(!_0x103c8c['plugins']['has']('EditorAnnotations'))return;const _0x13ca6d=_0x103c8c['plugins']['get']('EditorAnnotations'),_0x245e5a=()=>{const _0x1c628c=_0x13ca6d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1c628c[0x0]||null);};this['listenTo'](_0x13ca6d,'refresh',_0x245e5a),this['listenTo'](_0x13ca6d,'blur',(_0x2b120b,{isAnnotationTracked:_0x3e4a08})=>{this['activeAnnotation']&&_0x3e4a08(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x13ca6d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0xf1c895=>{_0x13ca6d['hasDomSelection']()&&(_0x245e5a(),_0xf1c895['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x13ca6d);}['_destroyEditorAnnotationsIntegration'](_0x2b6a94){this['stopListening'](_0x2b6a94),this['_editorAnnotations']['remove'](_0x2b6a94);}}class C extends _0x43a6f1{['counterView'];constructor(_0x393f6f){super(_0x393f6f);const _0x303057=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x1ce578,_0x11492e)=>_0x1ce578?'...':_0x11492e['toString']()),this['set']('annotationType',''),this['icon']=_0x1406a2,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x303057['to']('annotationType',_0x1ea899=>'ck-annotation-counter__badge--'+_0x1ea899),_0x303057['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x303057['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x6da988{['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(_0x1161aa){super(_0x1161aa),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x4f4f12())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x5b9636(),this['_refreshPositioningDebounced']=_0x721014(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0xfa9d62(this['context']['locale']),this['balloonPanelView']=new _0xe1d81d(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xe1c8c6){this['annotations']=_0xe1c8c6;const _0x2ee4dd=this['context']['plugins']['get'](z),_0x5ed637=this['balloonPanelView'];if(_0x2ee4dd['_annotations']=_0xe1c8c6,this['isAttached'])throw new _0x1f0298('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2ee4dd,'set:container',()=>{this['detach'](),this['listenTo'](_0x2ee4dd,'change:container',_0x11407e=>{_0x11407e['off'](),this['attach'](_0xe1c8c6);});}),_0x2ee4dd['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x558706=_0x9c0a88=>{const _0xd2522d=new C(this['context']['locale']);_0x2ee4dd['addAnnotation'](_0x9c0a88,_0xd2522d),this['_annotationToNarrowView']['set'](_0x9c0a88,_0xd2522d),_0xd2522d['bind']('isDirty','annotationType','number')['to'](_0x9c0a88['view'],'isDirty','type','length'),_0xd2522d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x5ed637['content']['first']!==_0x9c0a88['view']?(this['_showBalloon'](_0x9c0a88),_0x9c0a88['view']['element']['focus'](),this['setActiveAnnotation'](_0x9c0a88)):this['setActiveAnnotation'](null);});};for(const _0x5474d3 of _0xe1c8c6)_0x558706(_0x5474d3);this['listenTo'](_0xe1c8c6,'add',(_0x36a63c,_0x112e4c)=>{_0x558706(_0x112e4c);}),this['listenTo'](_0xe1c8c6,'remove',(_0x4d519c,_0x2cbc9c,_0x393370)=>{this['_annotationToNarrowView']['get'](_0x2cbc9c)['destroy'](),this['_annotationToNarrowView']['delete'](_0x2cbc9c),_0x2ee4dd['rearrange']({'removedAnnotation':_0x2cbc9c,'previousAnnotation':_0xe1c8c6['get'](_0x393370-0x1),'nextAnnotation':_0xe1c8c6['get'](_0x393370+0x1)}),_0x2cbc9c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xe1c8c6,'focus',(_0x403028,_0x3dfc90)=>{this['setActiveAnnotation'](_0x3dfc90);}),this['listenTo'](_0xe1c8c6,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x46749e,_0x108775)=>{_0x108775['keyCode']===_0x6195a0['esc']&&_0x5ed637['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x5ed637['content']['first']),this['_hideBalloon'](),_0x108775['stopPropagation'](),_0x108775['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x174fcf,_0x39beee)=>{const _0x2248b9=_0x39beee['target'];_0x5ed637['isVisible']&&_0x5ed637['element']['contains'](_0x2248b9)||_0x2ee4dd['view']['element']['contains'](_0x2248b9)||_0x174fcf['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x344389=>_0x344389['contains'](_0x2248b9))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x26ca52=this['context']instanceof _0x25b120?this['context']['editors']:new _0x5b9636([this['context']]);for(const _0x3f24bb of _0x26ca52)this['_integrateWithEditorAnnotations'](_0x3f24bb);this['listenTo'](_0x26ca52,'add',(_0x26ef49,_0x12bd2f)=>{this['listenTo'](_0x12bd2f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x12bd2f);});}),this['listenTo'](_0x26ca52,'remove',(_0x57768e,_0xda476)=>{_0xda476['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xda476['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x542c5d){if(_0x542c5d===this['activeAnnotation'])return;const _0x54e286=this['context']['plugins']['get'](z);if(_0x54e286['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x542c5d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x542c5d)_0x54e286['getSidebarItemView'](_0x542c5d)?this['_showBalloon'](_0x542c5d):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x542c5d;}['detach'](){if(!this['isAttached'])throw new _0x1f0298('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x16a7f1=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5235da=>_0x5235da['destroy']()),this['_annotationToNarrowView']['clear'](),_0x16a7f1['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x25b120&&this['stopListening'](this['context']['editors']);for(const _0x69aa9f of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x69aa9f);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'](_0x1ef822){if(!_0x1ef822['plugins']['has']('EditorAnnotations'))return;const _0x3602e5=_0x1ef822['plugins']['get']('EditorAnnotations'),_0x2f188d=this['context']['plugins']['get'](z),_0x1f361b=this['annotations'],_0x40ad4e=this['balloonPanelView'],_0x3f8ac1=()=>{const _0x3e7acc=_0x3602e5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x3e7acc),this['setActiveAnnotation'](_0x3e7acc[0x0]||null);};this['listenTo'](_0x3602e5,'refresh',_0x3f8ac1),this['listenTo'](_0x3602e5,'blur',(_0x308171,{isAnnotationTracked:_0x544f63})=>{this['activeAnnotation']&&_0x544f63(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3602e5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1f361b,'blur',_0x34e28f=>{_0x3602e5['hasDomSelection']()&&_0x34e28f['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2ac1e3,_0x8b8304)=>{const _0xbdc443=_0x8b8304['target'];_0x40ad4e['isVisible']&&_0x40ad4e['element']['contains'](_0xbdc443)||_0x2f188d['view']['element']['contains'](_0xbdc443)||this['activeAnnotation']&&_0x3602e5['hasDomSelection']()&&(_0x3f8ac1(),_0x2ac1e3['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3602e5);}['_destroyEditorAnnotationsIntegration'](_0x194e07){_0x194e07&&(this['stopListening'](_0x194e07),this['_editorAnnotations']['remove'](_0x194e07));}['_setSelectedAnnotations'](_0x4f3a85){for(const _0x51c25b of this['_selectedAnnotations'])_0x4f3a85['includes'](_0x51c25b)||this['_manuallyClosedAnnotationViews']['delete'](_0x51c25b['view']);this['_selectedAnnotations']=_0x4f3a85;}['_refreshPositioning'](){const _0x326270=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x326270['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x4c0fc8){if(this['_manuallyClosedAnnotationViews']['has'](_0x4c0fc8['view']))return;const _0x2e9fd5=this['balloonPanelView']['content']['first'];_0x2e9fd5!==_0x4c0fc8['view']?(_0x2e9fd5&&this['_detachListeners'](_0x2e9fd5),this['_attachListeners'](_0x4c0fc8['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x4c0fc8['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x13c42e=this['balloonPanelView']['content']['first'],_0x4715da=_0x13c42e&&this['annotations']['getByView'](_0x13c42e);if(!_0x4715da||!this['_annotationToNarrowView']['has'](_0x4715da))return;const _0x374849=this['_annotationToNarrowView']['get'](_0x4715da)['element'],_0x2137df=(function(){const _0x19fd8a=_0xe1d81d['defaultPositions'];return[_0x19fd8a['southArrowNorthEast'],_0x19fd8a['northArrowSouthEast'],_0x19fd8a['southArrowNorth'],_0x19fd8a['northArrowSouth'],_0x19fd8a['southArrowNorthWest'],_0x19fd8a['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x374849,'positions':_0x2137df});}['_hideBalloon'](){const _0x540b9d=this['balloonPanelView'],_0x555b69=_0x540b9d['content']['first'];_0x555b69&&(this['_detachListeners'](_0x555b69),_0x540b9d['unpin'](),_0x540b9d['content']['clear']());}['_attachListeners'](_0x4607a8){this['listenTo'](_0x4607a8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4607a8,'Esc',(_0x91fa4e,_0x4722dc)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4607a8),this['_hideBalloon'](),_0x4722dc();});}['_detachListeners'](_0x179da7){this['stopListening'](_0x179da7);}}class c extends _0x15d9b0{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x324b7e,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x12e6ff){super(_0x12e6ff),_0x12e6ff['editing']['view']['addObserver'](_0x485918),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x12e6ff['plugins']['get'](_0x324b7e),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x51d9cc=this['editor']['plugins']['get'](j);_0x51d9cc['context']===this['editor']&&(_0x51d9cc['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x49327b,_0x323126)=>{const _0xd08fa1=this['_balloon'];if(this['isAttached']&&_0xd08fa1['visibleView']){const _0x1e31f5=this['annotations']['getByView'](_0xd08fa1['visibleView']);_0x1e31f5&&this['_closeAnnotation'](_0x1e31f5),_0x323126();}}));}['afterInit'](){const _0x4b642d=this['editor']['plugins']['get'](j);_0x4b642d['context']===this['editor']&&(_0x4b642d['hasActive']()||_0x4b642d['switchTo']('inline'));}['setActiveAnnotation'](_0x2eda6b){_0x2eda6b!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2eda6b&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2eda6b)&&this['_addAnnotationToBalloon'](_0x2eda6b,!0x0),_0x2eda6b['isActive']=!0x0),_0x2eda6b||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2eda6b);}['attach'](_0x41add){this['annotations']=_0x41add;const _0x234b91=this['editor']['plugins']['get'](j),_0x5d852a=this['_balloon'];if(this['isAttached'])throw new _0x1f0298('inlineannotations-attach-already-attached',this);if(_0x234b91['context']!==this['editor'])throw new _0x1f0298('inlineannotations-not-allowed-with-context',this);const _0x541265=this['editor']['plugins']['get'](b);this['listenTo'](_0x541265,'refresh',()=>{const _0xdcdac4=_0x541265['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x26a357,_0x16e332;!this['_forceRefresh']&&(_0x26a357=_0xdcdac4,_0x16e332=this['_selectedAnnotations'],_0x26a357['length']===_0x16e332['length']&&_0x26a357['every'](_0x7e1a20=>_0x16e332['includes'](_0x7e1a20)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xdcdac4),this['setActiveAnnotation'](_0xdcdac4[0x0]||null));}),this['listenTo'](_0x541265,'blur',(_0x35eed7,{isAnnotationTracked:_0x1f4a9f})=>{this['activeAnnotation']&&_0x1f4a9f(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x1840ee,_0xd64611,_0x5ba67f)=>{_0x5ba67f||this['setActiveAnnotation'](null);}),this['listenTo'](_0x41add,'remove',(_0x424407,_0x386de3)=>{this['_removeAnnotationFromBalloon'](_0x386de3),_0x386de3===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5d852a,'change:visibleView',(_0x52bd2d,_0x5ab8f8,_0x17e91e,_0x3c8f29)=>{_0x3c8f29&&this['stopListening'](_0x3c8f29);const _0xf5be62=_0x41add['getByView'](_0x17e91e);_0x17e91e&&_0xf5be62&&(this['listenTo'](_0x17e91e,'change:height',()=>{_0x5d852a['updatePosition']();}),this['listenTo'](_0x17e91e,'Esc',()=>{this['_closeAnnotation'](_0xf5be62),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xf5be62&&this['setActiveAnnotation'](_0xf5be62));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5d852a['visibleView']&&(_0x41add['getByView'](_0x5d852a['visibleView'])&&_0x5d852a['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 _0x1f0298('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x5407dc of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x5407dc);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x120643){for(const _0xe51d1e of this['_selectedAnnotations'])_0x120643['includes'](_0xe51d1e)||this['_manuallyClosed']['delete'](_0xe51d1e);for(const _0x1fae62 of this['annotations'])_0x120643['includes'](_0x1fae62)||this['_removeAnnotationFromBalloon'](_0x1fae62);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1210e7 of _0x120643)this['_addAnnotationToBalloon'](_0x1210e7);}this['_selectedAnnotations']=_0x120643;}['_addAnnotationToBalloon'](_0x3ef07a,_0x482fab=!0x1){this['_manuallyClosed']['has'](_0x3ef07a)||(this['_addedAnnotations']['has'](_0x3ef07a)||this['_balloon']['hasView'](_0x3ef07a['view'])||(this['_addedAnnotations']['add'](_0x3ef07a),this['_balloon']['add']({'stackId':_0x3ef07a['view']['id'],'view':_0x3ef07a['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3ef07a)}})),_0x482fab&&this['_balloon']['showStack'](_0x3ef07a['view']['id']));}['_getBalloonTargetForAnnotation'](_0x25850c){const _0x53780f=_0x25850c['target'],_0x1239f0=this['editor']['editing']['view'],_0x170e56=_0x1239f0['document']['selection']['getFirstRange'](),_0x5e5a59=_0x1239f0['domConverter']['viewRangeToDom'](_0x170e56);if(_0x5e5a59['collapse'](!0x0),_0x53780f){if(_0x53780f instanceof _0x2315c3)return _0x53780f;let _0x33db73=[];for(const _0x4f5901 of _0x53780f)_0x33db73['push'](...F(_0x4f5901['getClientRects']()));_0x33db73=function(_0x38256a){const _0xbaa299=[];let _0x5d0ef9=_0x38256a[0x0];for(let _0xfcb55e=0x1;_0xfcb55e<_0x38256a['length'];_0xfcb55e++)P(_0x5d0ef9,_0x38256a[_0xfcb55e])?_0x5d0ef9['width']+=_0x38256a[_0xfcb55e]['width']:(_0xbaa299['push'](_0x5d0ef9),_0x5d0ef9=_0x38256a[_0xfcb55e]);return _0xbaa299['push'](_0x5d0ef9),_0xbaa299;}(_0x33db73);const _0x229b06=_0x5e5a59['getBoundingClientRect']();return _0x33db73['find'](_0x142e63=>_0x142e63['top']<=_0x229b06['top']&&_0x142e63['bottom']>=_0x229b06['bottom']&&_0x142e63['left']<=_0x229b06['left']&&_0x142e63['right']>=_0x229b06['right'])||_0x33db73[0x0];}return _0x25850c['targetRect']||_0x5e5a59;}['_removeAnnotationFromBalloon'](_0x11aa12){this['_addedAnnotations']['has'](_0x11aa12)&&this['_balloon']['hasView'](_0x11aa12['view'])&&(this['_addedAnnotations']['delete'](_0x11aa12),this['_balloon']['remove'](_0x11aa12['view']));}['_closeAnnotation'](_0x5a8cbf){this['_manuallyClosed']['add'](_0x5a8cbf),this['_removeAnnotationFromBalloon'](_0x5a8cbf);}}function F(_0x12e5ea){return Array['from'](_0x12e5ea)['map'](DOMRect['fromRect']);}function P(_0x52a26f,_0x3a6695){return _0x52a26f['top']===_0x3a6695['top']&&_0x52a26f['bottom']===_0x3a6695['bottom']&&_0x52a26f['right']===_0x3a6695['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5b8afd,_0x1e5ea3){super(_0x5b8afd),this['set']('isEmpty',!_0x1e5ea3['length']),this['focusTracker']=new _0x2b83b1(),this['_annotationViews']=_0x1e5ea3,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4a1f00({'focusables':_0x1e5ea3,'focusTracker':this['focusTracker']}),this['listenTo'](_0x1e5ea3,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x1e5ea3,'remove',(_0x3d566a,_0xd653fa)=>{_0xd653fa['isActive']&&this['focus'](),_0x1e5ea3['length']||(this['isEmpty']=!0x0);});const _0xd41eff=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x5b8afd,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x1e5ea3},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0xd41eff['if']('isEmpty','ck-hidden',_0x1f736a=>!_0x1f736a)]},'children':[{'text':N(_0x5b8afd,'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 _0x4957f7 of this['_annotationViews'])this['focusTracker']['add'](_0x4957f7['element']);this['_annotationViews']['on']('change',(_0x5571b0,{added:_0x385400,removed:_0xbf1e14})=>{for(const _0xf31761 of _0x385400)this['focusTracker']['add'](_0xf31761['element']);for(const _0x4ee486 of _0xbf1e14)this['focusTracker']['remove'](_0x4ee486['element']);});}}class p extends _0x6da988{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x142267){super(_0x142267),this['archivedThreads']=new _0x5b9636();}['init'](){const _0x5f70e5=this['context'],_0x1ab77e=_0x5f70e5['plugins']['get'](o),_0x1bad84=_0x5f70e5['plugins']['get'](y);this['listenTo'](_0x1ab77e,'addCommentThread',(_0x4fcdbe,{threadId:_0x234a13})=>{const _0x168497=_0x1ab77e['getCommentThread'](_0x234a13);_0x168497['archivedAt']&&this['archivedThreads']['add'](_0x168497,this['_calculatePosition'](_0x168497['archivedAt'])),this['listenTo'](_0x168497,'change:archivedAt',(_0x412ecb,_0x1f9494,_0x3e4f07)=>{_0x3e4f07?this['archivedThreads']['has'](_0x168497)||this['archivedThreads']['add'](_0x168497,this['_calculatePosition'](_0x168497['archivedAt'])):this['archivedThreads']['has'](_0x168497)&&this['archivedThreads']['remove'](_0x168497);});}),this['listenTo'](_0x1ab77e,'removeCommentThread',(_0x2eafe0,{threadId:_0x45ef44})=>{const _0x4bc873=_0x1ab77e['getCommentThread'](_0x45ef44);this['stopListening'](_0x4bc873),this['archivedThreads']['has'](_0x4bc873)&&this['archivedThreads']['remove'](_0x4bc873);},{'priority':'highest'}),this['listenTo'](_0x1bad84['collection'],'focus',(_0xe1856d,_0x11cb89)=>{_0x11cb89['isVisible']||(_0x11cb89['isActive']=!0x0,_0x1bad84['activate'](_0x11cb89));});}['_calculatePosition'](_0x1f9ff4){const _0x2c3467=[...this['archivedThreads']]['findIndex'](_0x2e378d=>_0x2e378d['archivedAt']<_0x1f9ff4);return _0x2c3467>-0x1?_0x2c3467:this['archivedThreads']['length'];}}class a extends _0x15d9b0{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0xd8f5f5];}constructor(_0x351058){super(_0x351058),this['annotationViews']=new _0x15fda6(),this['_pendingThreads']=[];}['init'](){const _0x1b0fbb=this['editor'],_0x38e175=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1b0fbb['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x43a6f1,!0x0)),_0x1b0fbb['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x492bbe=this['_createCommentsArchiveButton'](_0x42a00d);return _0x492bbe['set']({'role':'menuitemcheckbox'}),_0x492bbe;});const _0xad3d39=_0x1b0fbb['plugins']['get'](p),_0xe353c4=_0x1b0fbb['plugins']['get']('Annotations'),_0x1ec037=_0x1b0fbb['plugins']['get']('CommentsRepository');_0xad3d39['archivedThreads']['forEach'](_0x34a9cb=>{this['_handleNewThread'](_0x34a9cb);}),this['listenTo'](_0xad3d39['archivedThreads'],'add',(_0x13dee9,_0x4dd417)=>{this['_handleNewThread'](_0x4dd417);}),this['listenTo'](_0xe353c4['collection'],'add',(_0x48b41a,_0x40bced)=>{const _0x18f501=this['_pendingThreads']['find'](_0x1c92be=>{const _0x591b6f=_0x1ec037['_threadToController']['get'](_0x1c92be);return _0x591b6f&&_0x40bced['innerView']===_0x591b6f['view'];});if(_0x18f501){const _0x17054e=this['_calculatePosition'](_0x18f501['archivedAt']);this['annotationViews']['add'](_0x40bced['view'],_0x17054e),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x18f501),0x1);}}),this['listenTo'](_0xad3d39['archivedThreads'],'remove',(_0x435a82,_0x1d320b)=>{const _0x3065d1=_0x1b0fbb['config']['get']('collaboration.channelId');if(!_0x3065d1||_0x1d320b['channelId']===_0x3065d1){if(this['_pendingThreads']['includes'](_0x1d320b))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1d320b),0x1);else{const _0x1e57f5=_0x1ec037['_threadToController']['get'](_0x1d320b),_0xe70676=_0xe353c4['getByInnerView'](_0x1e57f5['view']);this['annotationViews']['remove'](_0xe70676['view']),this['stopListening'](_0xe70676['focusableElements']);}}}),this['listenTo'](_0xe353c4['collection'],'add',(_0x248af5,_0x18bf19)=>{this['listenTo'](_0x18bf19,'escape',_0x38e175);}),this['listenTo'](_0xe353c4['collection'],'remove',(_0x53ea55,_0x42a22b)=>{this['stopListening'](_0x42a22b,'escape',_0x38e175);});}['_handleNewThread'](_0xd68bb3){const _0x3cabba=this['editor']['plugins']['get']('CommentsRepository'),_0x23912c=this['editor']['plugins']['get']('Annotations'),_0xde0e11=this['editor']['config']['get']('collaboration.channelId');if(!_0xde0e11||_0xd68bb3['channelId']===_0xde0e11){const _0x3dcfa7=_0x3cabba['_threadToController']['get'](_0xd68bb3);if(!_0x3dcfa7)return void this['_pendingThreads']['push'](_0xd68bb3);const _0x439386=this['_calculatePosition'](_0xd68bb3['archivedAt']),_0x56469e=_0x23912c['getByInnerView'](_0x3dcfa7['view']);_0x56469e['isVisible']&&_0x23912c['_visibleAnnotations']['remove'](_0x56469e),this['annotationViews']['add'](_0x56469e['view'],_0x439386);}}['_calculatePosition'](_0x3658a8){const _0x177bd8=this['editor']['config']['get']('collaboration.channelId'),_0x530b24=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x14612b=>_0x14612b['channelId']===_0x177bd8)['findIndex'](_0x5231a4=>_0x5231a4['archivedAt']<_0x3658a8);return _0x530b24<0x0||_0x530b24>this['annotationViews']['length']?this['annotationViews']['length']:_0x530b24-0x1;}['_toggleDialog'](){const _0x49fa0d=this['editor'],_0x54678d=_0x49fa0d['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x49fa0d['locale'],this['annotationViews'])),'commentsArchive'===_0x54678d['id']?_0x54678d['hide']():_0x54678d['show']({'id':'commentsArchive','title':N(_0x49fa0d['locale'],'COMMENTS_ARCHIVE'),'icon':_0x31b9c7,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x1a8773['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x29ddf8,_0x3dc904=!0x1){const _0x24ce6c=this['editor']['locale'],_0x55cc36=this['editor']['plugins']['get']('Dialog'),_0x340c22=new _0x29ddf8(_0x24ce6c);return _0x340c22['bind']('isEnabled')['to'](this,'isEnabled'),_0x340c22['bind']('isOn')['to'](_0x55cc36,'id',_0x2d28ef=>'commentsArchive'===_0x2d28ef),_0x340c22['set']({'label':N(_0x24ce6c,'COMMENTS_ARCHIVE'),'icon':_0x31b9c7,'isToggleable':!0x0}),_0x3dc904&&(_0x340c22['tooltip']=!0x0),this['listenTo'](_0x340c22,'execute',()=>this['_toggleDialog']()),_0x340c22;}['_hideDialogOnAnnotationEscape']=_0x2b0027=>{const _0x52cf79=_0x2b0027['source'];if(!this['annotationViews']['has'](_0x52cf79['view']))return;const _0x34f8c2=this['editor']['plugins']['get']('Dialog');_0x34f8c2['isOpen']&&'commentsArchive'===_0x34f8c2['id']&&(_0x34f8c2['hide'](),_0x2b0027['stop']());};}class gi extends _0x15d9b0{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};
|