@ckeditor/ckeditor5-comments 46.0.0-alpha.7 → 46.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +18 -18
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Nt)());constructor(_0x2de22a={}){function _0x2f9bec(_0x58bb15){return _0x58bb15['map'](_0x3a3e41=>String['fromCharCode'](_0x3a3e41))['join']('');}(_0x2de22a=Object['assign']({},_0x2de22a))['plugins']||(_0x2de22a['plugins']=Qt['defaultPlugins']),super(_0x2de22a),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[_0x2f9bec([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2f9bec([0x76,0x69,0x65,0x77])][_0x2f9bec([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2f9bec([0x61,0x75,0x74,0x6f]),this[_0x2f9bec([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2f9bec([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2f9bec([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2f9bec([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2f9bec([0x6f,0x6b])});}['create'](){const _0x6c1cc0=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x6c1cc0))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x131354=>{const _0x2ecd4c=this['model']['document']['getRoot'](),_0x3d5c1e=_0x2ecd4c&&_0x2ecd4c['getChild'](_0x2ecd4c['childCount']-0x1);_0x131354['setSelection'](_0x3d5c1e,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x182847=this['editing']['view'],_0x2add2f=_0x182847['document']['getRoot'](),_0x325280=_0x2add2f['getChild'](0x0);_0x2add2f['childCount']>0x1||!_0x325280||'p'!=_0x325280['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x182847,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x325280['placeholder']=this['placeholder']),St({'view':_0x182847,'element':_0x325280,'keepOnFocus':!0x0}),this['placeholderElement']=_0x325280);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x14f2a0,_0x203c2b={}){super(_0x14f2a0),this['editor']=null,this['_editorConfig']=_0x203c2b,this['set']('value',_0x203c2b['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x14f2a0,'Reply...')),this['set']('submitLabel',N(_0x14f2a0,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x1c22e6(),this['focusCycler']=new _0x11c5b9({'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',(_0x218f38,_0x2bb8c1)=>{this['cancelButtonView']['fire']('execute'),_0x2bb8c1();}),this['keystrokes']['set']('Ctrl+Enter',(_0x4ec173,_0x41b85b)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x41b85b());}),this['on']('submit',(_0x1156a3,_0x454890)=>{_0x454890['length']>0xfde8?(alert(N(_0x14f2a0,'TOO_LONG_COMMENT_ALERT',[_0x454890['length'],0xfde8])),_0x1156a3['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 _0x59b19a=this['editor'];this['element']['insertBefore'](_0x59b19a['ui']['element'],this['element']['firstChild']),_0x59b19a['model']['document']['on']('change',()=>this['value']=_0x59b19a['getData']()),_0x59b19a['bind']('placeholder')['to'](this),this['focusables']['add'](_0x59b19a['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1a241d){-0x1===_0x1a241d?(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:_0x576a1b}=this,_0x5dc17d=new _0x488b97(_0x576a1b);return _0x5dc17d['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x5dc17d['withText']=!0x0,_0x5dc17d['bind']('label')['to'](this,'submitLabel'),_0x5dc17d['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x5dc17d['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x134fc6,_0x16d2b9)=>!_0x16d2b9&&!!_0x134fc6['trim']()),_0x5dc17d;}['_createCancelButton'](){const {locale:_0x1d5a90}=this,_0x13cc08=new _0x488b97(_0x1d5a90);return _0x13cc08['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x13cc08['label']=N(_0x1d5a90,'Cancel'),_0x13cc08['withText']=!0x0,_0x13cc08['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x13cc08;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x13fd16=>{this['focusTracker']['add'](_0x13fd16['element']);}),this['focusables']['on']('change',(_0x27147b,_0x3ccb6e)=>{for(const _0xe6c678 of Array['from'](_0x3ccb6e['added'])['reverse']())this['focusTracker']['add'](_0xe6c678['element']);});}}class ie extends kt{constructor(_0x274e91,_0x317226,_0x4f3ee6){super(_0x274e91),this['commentInputView']=new es(_0x274e91,_0x4f3ee6),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x1b34ac,_0x1ebf33)=>_0x1b34ac||!!_0x1ebf33),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 _0xf34004(_0x274e91,_0x317226),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'](_0xbcf19b){this['commentInputView']['focus'](_0xbcf19b);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x21a374,_0xc46806)=>{const {submitButtonView:_0xdcaf50,cancelButtonView:_0x14a6af,editor:_0xf695f2}=this['commentInputView'];[_0xdcaf50['element'],_0x14a6af['element'],_0xf695f2?_0xf695f2['editing']['view']['getDomRoot']():null]['filter'](_0x346100=>_0x346100)['some'](_0x243a4b=>_0x243a4b['contains'](_0xc46806['target']))||(this['focus'](),_0xc46806['preventDefault']());});}}class os extends kt{constructor(_0x2132f2){super(_0x2132f2);const _0x2758e7=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2758e7['to']('count',_0x39db51=>N(_0x2132f2,'NUMBER_OF_COMMENTS',_0x39db51))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0xfa4c23,_0x477d76,_0x289636){super(_0xfa4c23);const _0x23ceb3=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x477d76['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x477d76,this['_config']=_0x289636,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x1c22e6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11c5b9({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x436189=>this['commentViews']['map'](_0x2e7b3c=>_0x2e7b3c['element'])['includes'](_0x436189['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0xfa4c23),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x218fda=>_0x218fda-this['_config']['maxCommentsWhenCollapsed']);for(const _0xc9f6a5 of _0x477d76['comments'])this['_handleNewCommentModel'](_0xc9f6a5);this['_handleInfoComment'](),this['listenTo'](_0x477d76['comments'],'add',(_0x2b350c,_0x2989f9)=>{const _0x1abff3=this['_calculatePosition'](_0x2989f9);this['length']++,this['_handleNewCommentModel'](_0x2989f9,_0x1abff3),this['refreshVisibleViews']();}),this['listenTo'](_0x477d76['comments'],'remove',(_0x30ebdf,_0x592bec)=>{this['length']--,this['_handleRemoveCommentModel'](_0x592bec),this['refreshVisibleViews']();}),this['listenTo'](_0x477d76,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x477d76,'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',_0x23ceb3['if']('length','ck-hidden',_0x3742d2=>!_0x3742d2)],'aria-label':N(_0xfa4c23,'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'](_0x35fe6c){-0x1===_0x35fe6c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x51a7ed of this['commentViews'])_0x51a7ed['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x588c61,_0x150c5d){const _0x1682a0=new this['_config']['CommentView'](this['locale'],_0x588c61,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1682a0['viewUid']=_0x588c61['id'],_0x1682a0['delegate']('removeComment')['to'](this),_0x1682a0['delegate']('updateComment')['to'](this),_0x1682a0['delegate']('resolveCommentThread')['to'](this),_0x1682a0['delegate']('editorReady')['to'](this),_0x1682a0['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1682a0,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1682a0,_0x150c5d);}['_calculatePosition'](_0x2a000d){const _0x54c6d3=this['_model']['_findOptimalIndex'](_0x2a000d);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x2a000d['authoredAt']?_0x54c6d3-0x1:_0x54c6d3:_0x54c6d3-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3a51e5={'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'],_0x3a51e5,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3a51e5));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3478b4){const _0x575450=this['commentViews']['remove'](_0x3478b4['id']);this['stopListening'](_0x575450),_0x575450['isEditMode']&&this['_updateHasDirtyComment'](),_0x575450['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2ea892=>_0x2ea892['isEditMode']);}['_rearrangeCollapse'](){const _0x4126a5=function(_0x6aacbb){const _0x5d05ab=new _0x1392af();for(const _0x33e7e7 of _0x6aacbb)_0x5d05ab['add'](_0x33e7e7);return _0x5d05ab;}(this['commentViews']),_0x395b5c=this['_collapsedCommentsView']['count'];for(let _0x16adab=0x1;_0x16adab<=_0x395b5c;_0x16adab++)_0x4126a5['remove'](0x1);for(const _0x116496 of _0x4126a5)_0x116496['collapse']();_0x395b5c>0x0&&_0x4126a5['add'](this['_collapsedCommentsView'],0x1),rs(_0x34b6c6(Array['from'](this['visibleViews']),Array['from'](_0x4126a5)),this['visibleViews'],_0x4126a5);}['_rearrangeExpand'](){rs(_0x34b6c6(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x39a231 of this['visibleViews'])_0x39a231['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x31c4cb=>{this['focusTracker']['add'](_0x31c4cb['element']),this['keystrokes']['listenTo'](_0x31c4cb['element']);}),this['commentViews']['on']('change',(_0x31c025,_0x32d1f8)=>{for(const _0x266ccf of _0x32d1f8['removed'])this['focusTracker']['remove'](_0x266ccf['element']),this['keystrokes']['stopListening'](_0x266ccf['element']);for(const _0x4a62be of Array['from'](_0x32d1f8['added'])['reverse']())this['focusTracker']['add'](_0x4a62be['element']),this['keystrokes']['listenTo'](_0x4a62be['element']);});}}function rs(_0x2d5feb,_0x3d532c,_0xba833e){let _0x13b6ea=0x0;for(const _0x269f3e of _0x2d5feb)switch(_0x269f3e){case'insert':_0x3d532c['add'](_0xba833e['get'](_0x13b6ea),_0x13b6ea),_0x13b6ea++;break;case'delete':_0x3d532c['remove'](_0x13b6ea);break;case'equal':_0x13b6ea++;}}class oe extends kt{constructor(_0x24aea5){super(_0x24aea5);const _0x442020=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x442020['to']('contextValue',_0x390118=>N(_0x24aea5,'THREAD_CONTEXT_LABEL',_0x390118)),'tabindex':-0x1},'children':[{'text':_0x442020['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xf0bcc8,_0x102f7a){super(_0xf0bcc8);const _0x811f01=this['bindTemplate'];this['_model']=_0x102f7a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x1c22e6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11c5b9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xc2d6c1=>!!_0xc2d6c1),this['bind']('contextValue')['to'](this['_model'],'context',_0x353f72=>_0x353f72&&_0x353f72['value']?this['_trimContextValue'](_0x353f72['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',_0x811f01['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 _0x498574=new _0x488b97(this['locale']);return _0x498574['label']=N(this['locale'],'Reopen'),_0x498574['tooltip']=N(this['locale'],'Reopen'),_0x498574['icon']=_0x45680a,_0x498574['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3b151d=>!_0x3b151d),_0x498574['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x268c8d,_0x1ec357)=>_0x268c8d&&_0x1ec357),_0x498574['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x498574;}['_trimContextValue'](_0x410181){if(_0x410181['length']<0x96)return _0x410181;const _0x18e64b=_0x410181['lastIndexOf']('\x20',0x93);return _0x410181['substring'](0x0,_0x18e64b>-0x1?_0x18e64b:0x93)+'...';}['_attachContextActions'](){const _0x1fe3ac=this['element']['querySelector']('.ck-context'),_0x119c75=_0x1fe3ac['querySelector']('.ck-context__value');this['listenTo'](_0x1fe3ac,'mouseenter',()=>{_0x119c75['offsetWidth']<_0x119c75['scrollWidth']&&_0x1fe3ac['classList']['add']('overlay');}),this['listenTo'](_0x1fe3ac,'mouseleave',()=>{_0x1fe3ac['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5e6fe7 of this['focusables'])this['focusTracker']['add'](_0x5e6fe7['element']),this['keystrokes']['listenTo'](_0x5e6fe7['element']);}['_createContextView'](){const _0x2b8b0d=new oe(this['locale']);return _0x2b8b0d['bind']('contextValue')['to'](this),_0x2b8b0d;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x337813,_0x454d0e,_0x5d6b4b,_0x24369d){super(_0x337813),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x454d0e,this['_localUser']=_0x5d6b4b,this['_config']=_0x24369d,this['commentThreadHeaderView']=new Xt(_0x337813,_0x454d0e),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x337813,N(_0x337813,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x337813,_0x454d0e,Object['assign']({'CommentView':this['_config']['CommentView']},_0x24369d)),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',(_0x2a3100,_0x4a882e)=>_0x2a3100||!!_0x4a882e),this['bind']('isUnlinked')['to'](_0x454d0e,'unlinkedAt',_0x460df8=>!!_0x460df8),this['bind']('ariaLabel')['to'](this,'length',_0x351ff2=>{const _0x5cf8aa=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x351ff2,_0x5cf8aa]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x1c22e6(),this['keystrokes']=new jt(),this['focusCycler']=new _0x11c5b9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x50535c=>_0x50535c['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 _0x4a1b38=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x309a66=_0x4a1b38['commentInputView'];return _0x4a1b38['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x309a66,'value',(_0x527e2a,_0x404d88,_0x19bea8,_0x184a2d,_0x4e2efa)=>!!_0x4e2efa||!!_0x184a2d&&_0x19bea8&&!_0x404d88||_0x527e2a&&_0x19bea8&&!_0x404d88),_0x309a66['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1d27f9,_0x42fe3a,_0x2ca962)=>{let _0x5f0a40;return _0x5f0a40=_0x2ca962&&_0x42fe3a?'Reply\x20to\x20reopen\x20discussion...':_0x1d27f9?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5f0a40);}),_0x309a66['bind']('submitLabel')['to'](this,'length',_0x5cfe1e=>N(this['locale'],_0x5cfe1e?'Reply':'Comment')),_0x309a66['on']('submit',(_0x12093c,_0x1543e9)=>{this['fire']('addComment',_0x1543e9),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x309a66['on']('cancel',()=>{this['focus']();}),_0x309a66['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x309a66['on']('cancel',_0x5b00e1=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x5b00e1['stop']());}),this['on']('change:isActive',(_0x1cdf7c,_0x586c21,_0x26dc70)=>{_0x26dc70||this['length']||_0x309a66['value']||this['fire']('removeCommentThread');}),_0x4a1b38;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x279178(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x1e8b5b,target:_0x45ebb8,type:_0x582f03,isVisible:_0x42d6a7=!0x0}){super(),this['view']=_0x1e8b5b,this['view']['element']||this['view']['render'](),this['_type']=_0x582f03,this['_target']=_0x45ebb8,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x1392af([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x19cb51,_0xe83639)=>{this['view']['focusTracker']['add'](_0xe83639);}),this['focusableElements']['on']('remove',(_0xdd63c,_0x44f817)=>{this['view']['focusTracker']['remove'](_0x44f817);}),this['set']('isVisible',_0x42d6a7);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0xb7b526=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0xb7b526),_0xb7b526;}get['targetRect'](){const _0x128b5e=this['target'];if(null===_0x128b5e)return null;if(_0x128b5e instanceof _0x81943)return _0x128b5e;const _0x3fb63b=_0x128b5e['filter'](_0x34c04d=>function(_0x393a03){const _0x51e1b3=_0x393a03['offsetParent'];if(_0x51e1b3)return!0x0;const _0x2db161=_0x393a03['getClientRects']()['item'](0x0);return!!_0x2db161;}(_0x34c04d));return 0x0===_0x3fb63b['length']?null:new _0x81943(_0x3fb63b[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x50bd7d){this['view']['isActive']=_0x50bd7d,this['view']['mainView']['isActive']=_0x50bd7d;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x320681){if(!(null===_0x320681||_0x320681 instanceof _0x81943||Array['isArray'](_0x320681)&&_0x320681['every'](_0x4fd82c=>fi(_0x4fd82c))))throw new _0x347fe4('annotation-invalid-target',null,{'target':_0x320681});}['_getNormalizedTarget'](){const _0x21cdb4='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x21cdb4)?[_0x21cdb4]:_0x21cdb4;}}function fi(_0x1e2ae7){return null!==_0x1e2ae7&&'object'==typeof _0x1e2ae7&&'nodeType'in _0x1e2ae7&&0x1===_0x1e2ae7['nodeType'];}class S extends _0x1392af{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x31a18d=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x1c22e6(),this['_focusTracker']['on']('change:isFocused',(_0x266388,_0x53620c,_0xa5693b)=>{_0xa5693b||this['fire']('blur');});for(const _0xacf26e of _0x31a18d)this['add'](_0xacf26e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4d805a){if(this['has'](_0x4d805a))throw new _0x347fe4('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4d805a['innerView'],_0x4d805a),this['_viewToAnnotation']['set'](_0x4d805a['view'],_0x4d805a);for(const _0x167fe8 of _0x4d805a['focusableElements'])this['_focusTracker']['add'](_0x167fe8);this['listenTo'](_0x4d805a['focusableElements'],'add',(_0x33eded,_0x34b917)=>{this['_focusTracker']['add'](_0x34b917);}),this['listenTo'](_0x4d805a['focusableElements'],'remove',(_0x487690,_0x28972f)=>{this['_focusTracker']['remove'](_0x28972f);}),this['listenTo'](_0x4d805a['view']['focusTracker'],'change:isFocused',(_0x1dac85,_0x382ecc,_0x514f79)=>{_0x514f79&&this['fire']('focus',_0x4d805a);}),_0x4d805a['updateTargetRect']();const _0x4ce772=this['_getOrderInContent'](_0x4d805a['view']['targetRect']);return super['add'](_0x4d805a,_0x4ce772);}['remove'](_0x25d1b0){if(!this['has'](_0x25d1b0))throw new _0x347fe4('annotationcollection-not-existing-item',null);this['stopListening'](_0x25d1b0['view']['focusTracker']),this['stopListening'](_0x25d1b0['focusableElements']);for(const _0x13f4f8 of _0x25d1b0['focusableElements'])this['_focusTracker']['remove'](_0x13f4f8);return this['_viewToAnnotation']['delete'](_0x25d1b0['view']),this['_innerViewToAnnotation']['delete'](_0x25d1b0['innerView']),super['remove'](_0x25d1b0);}['getByInnerView'](_0xddd71){return this['_innerViewToAnnotation']['get'](_0xddd71);}['getByView'](_0x5de2e8){return this['_viewToAnnotation']['get'](_0x5de2e8);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x48400a of this)_0x48400a['updateTargetRect']();this['_sort']();}['_sort'](){const _0x4fd751=Array['from'](this)['sort']((_0x1f8c9d,_0x38ddee)=>w(_0x1f8c9d['view']['targetRect'],_0x38ddee['view']['targetRect']));for(let _0x4d9b8b=_0x4fd751['length']-0x1;_0x4d9b8b>0x0;_0x4d9b8b--){const _0x3f8c64=_0x4fd751[_0x4d9b8b];_0x4d9b8b!==this['getIndex'](_0x3f8c64)&&(this['remove'](_0x3f8c64),this['add'](_0x3f8c64));}}['_getOrderInContent'](_0x4044fa){let _0x1de634=0x0;if(!_0x4044fa)return this['length'];for(const _0x24b596 of this){const _0x39a618=_0x24b596['view']['targetRect'];if(_0x39a618){if(w(_0x4044fa,_0x39a618)<0x0)return _0x1de634;_0x1de634++;}}return _0x1de634;}}function v({source:_0x202305,target:_0x6997a8,filter:_0x13a6ad}){for(const _0x1b2cd5 of _0x202305)_0x13a6ad(_0x1b2cd5)&&_0x6997a8['add'](_0x1b2cd5);_0x6997a8['listenTo'](_0x202305,'add',(_0x35f08d,_0x18016a)=>{_0x13a6ad(_0x18016a)&&_0x6997a8['add'](_0x18016a);}),_0x6997a8['listenTo'](_0x202305,'remove',(_0x1e4438,_0x3e86c4)=>{_0x6997a8['has'](_0x3e86c4)&&_0x6997a8['remove'](_0x3e86c4);});}function w(_0x4ca767,_0x2b8606){if(null===_0x4ca767&&null===_0x2b8606)return 0x0;if(null===_0x4ca767)return-0x1;if(null===_0x2b8606)return 0x1;const _0x944fa3=_0x4ca767['top']-_0x2b8606['top'];return 0x0==_0x944fa3?_0x4ca767['left']-_0x2b8606['left']:_0x944fa3;}class y extends _0x2ec86c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e0870){if(super(_0x3e0870),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3e0870 instanceof _0x556455){const _0x24afa5=_0x3e0870['locale'];_0x3e0870['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x24afa5,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2c0d8c){this['collection']['add'](_0x2c0d8c);}['remove'](_0x357f07){this['collection']['remove'](_0x357f07),_0x357f07['destroy']();}['refreshVisibility'](){for(const _0x426fad of this['collection'])_0x426fad['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x229c83){return this['collection']['getByInnerView'](_0x229c83);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x417eee of this['collection'])_0x417eee['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x2abbb1){this['fire']('_activateAnnotation',_0x2abbb1);}['createAnnotation'](_0x9967ba){return new T(_0x9967ba);}['createAnnotationView'](_0x4b08d3,_0xefcac8){return new E(_0x4b08d3,_0xefcac8);}['_addActiveAnnotation'](_0x30a535){const _0x64a034=new Set(this['activeAnnotations']);_0x64a034['add'](_0x30a535),this['activeAnnotations']=_0x64a034;}['_removeActiveAnnotation'](_0x570674){const _0x27f1e8=new Set(this['activeAnnotations']);_0x27f1e8['delete'](_0x570674),this['activeAnnotations']=_0x27f1e8;}['_bindAnnotationsToVisibleAnnotations'](){const _0x3935a3=this['collection'],_0x43bf22=this['_visibleAnnotations'];function _0x416776(_0x4ecdbe){const _0x1cb80e=_0x4ecdbe['source'];_0x1cb80e['isVisible']&&!_0x43bf22['has'](_0x1cb80e)?_0x43bf22['add'](_0x1cb80e):!_0x1cb80e['isVisible']&&_0x43bf22['has'](_0x1cb80e)&&_0x43bf22['remove'](_0x1cb80e),_0x1cb80e['view']['focusTracker']['remove'](_0x1cb80e['view']['element']),_0x1cb80e['view']['focusTracker']['add'](_0x1cb80e['view']['element']);}this['listenTo'](_0x3935a3,'add',(_0x1f49ad,_0x56bd26)=>{_0x56bd26['isVisible']&&_0x43bf22['add'](_0x56bd26),this['listenTo'](_0x56bd26,'change:isVisible',_0x416776);}),this['listenTo'](_0x3935a3,'remove',(_0x1cda28,_0x196e37)=>{_0x43bf22['has'](_0x196e37)&&_0x43bf22['remove'](_0x196e37),this['stopListening'](_0x196e37,'change:isVisible',_0x416776);});}['_setupEnterAnnotationKeystroke'](){const _0x2d2d5c=_0x42c41c=>{_0x42c41c['on']('ready',()=>{_0x42c41c['keystrokes']['set'](_0x2a5449,(_0xc663b7,_0x1a2944)=>{const _0x9f8a1e=_0x41ec0b(this['activeAnnotations']['values']());_0x9f8a1e&&(_0x9f8a1e['view']['focus'](),_0x1a2944());});});};this['context']instanceof _0x556455?_0x2d2d5c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2f1e19,_0x2709ee)=>{_0x2d2d5c(_0x2709ee);});}['_setupEscapeAnnotationHandling'](){const _0x599f6e=_0x4f0be8=>{const _0x3db382=_0x4f0be8['source'],_0x426147=[];let _0x45069f;if(Array['isArray'](_0x3db382['target'])){_0x45069f=_0x3db382['target'][0x0],this['context']instanceof _0x556455?_0x426147['push'](this['context']):this['context']['editors']&&_0x426147['push'](...this['context']['editors']);for(const _0x2e65ec of _0x426147)for(const _0x87b1b9 of _0x2e65ec['editing']['view']['domRoots']['values']())if(_0x87b1b9['contains'](_0x45069f))return void _0x2e65ec['editing']['view']['focus']();_0x45069f['focus']();}};this['listenTo'](this['collection'],'add',(_0x2b9421,_0x286cb6)=>{this['listenTo'](_0x286cb6,'escape',_0x599f6e,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x3c9e3b,_0x181b78)=>{this['stopListening'](_0x181b78,'escape',_0x599f6e);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2ec86c{['_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(_0x558200){super(_0x558200),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x52d1b3=this['context']['config'];_0x52d1b3['define']('comments.maxCommentsWhenCollapsed',0x2),_0x52d1b3['define']('comments.maxThreadTotalWeight',0x1f4),_0x52d1b3['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x52d1b3['define']('comments.CommentThreadView',vt),_0x52d1b3['define']('comments.CommentView',gt),_0x52d1b3['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x48f90a=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3a11b7,_0x5649cf)=>this['_addCommentThread'](_0x5649cf)),this['on']('submitCommentThread',(_0x54b49a,_0x49bb87)=>this['_submitCommentThread'](_0x49bb87)),this['on']('resolveCommentThread',(_0xac19a9,_0x43a9c0)=>this['_resolveCommentThread'](_0x43a9c0)),this['on']('resolveCommentThread',(_0xc0dbc0,_0xd34995)=>this['_updateActiveAnnotation'](_0xd34995),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x1c257b,_0x579f89)=>this['_reopenCommentThread'](_0x579f89)),this['on']('reopenCommentThread',(_0x42a9e9,_0x2602f1)=>this['_updateActiveAnnotation'](_0x2602f1),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x4df0d0,_0x230676)=>this['_removeCommentThread'](_0x230676)),this['on']('updateCommentThread',(_0x31a83d,_0x138c52)=>this['_updateCommentThread'](_0x138c52)),this['on']('updateCommentThread',(_0x59fb7e,_0x590d58)=>this['_updateActiveAnnotation'](_0x590d58),{'priority':'lowest'}),this['on']('addComment',(_0x3a7419,_0x26ff1b)=>this['_addComment'](_0x26ff1b)),this['on']('updateComment',(_0x4d47e1,_0x521270)=>this['_updateComment'](_0x521270)),this['on']('removeComment',(_0x2d2ae3,_0xa39d2e)=>this['_removeComment'](_0xa39d2e)),this['on']('addComment',(_0x3ddba0,{threadId:_0x50b741,isFromAdapter:_0x1f43a0})=>{if(_0x1f43a0)return;const _0x391f10=this['getCommentThread'](_0x50b741),_0x28254a=_0x391f10&&this['_threadToController']['get'](_0x391f10);_0x28254a&&_0x28254a['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x48f90a,'change:activeAnnotations',(_0x2f89c3,_0x591383,_0xec6630)=>{const _0x52cd0c=Array['from'](_0xec6630)['map'](_0x83bfb6=>this['_viewToController']['get'](_0x83bfb6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x52cd0c?_0x52cd0c['model']:null;});}set['adapter'](_0x465d34){if(this['_adapter'])throw new _0x347fe4('commentsrepository-adapter-already-set');this['_adapter']=_0x465d34;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x2dbcb6=Tt,threadId:_0x201e36=_0x3cd367(),comments:_0x4a66cb=[],unlinkedAt:_0x1cfeb6=null,resolvedAt:_0x5a33e7=null,resolvedBy:_0x19906a=null,target:_0x494be2=null,context:_0xe83ea=null,attributes:_0xf25c5f={},isResolvable:_0x52a318=!0x0,isSubmitted:_0x3eb23f=!0x1,isFromAdapter:_0x31190b=!0x1}={}){return this['fire'](bt('addCommentThread',_0x2dbcb6),{'channelId':_0x2dbcb6,'threadId':_0x201e36,'comments':_0x4a66cb,'unlinkedAt':_0x1cfeb6,'resolvedAt':_0x5a33e7,'resolvedBy':_0x19906a,'target':_0x494be2,'context':_0xe83ea,'attributes':_0xf25c5f,'isFromAdapter':_0x31190b,'isResolvable':_0x52a318,'isSubmitted':_0x3eb23f}),this['getCommentThread'](_0x201e36);}['openNewCommentThread']({channelId:_0x34b081=Tt,threadId:_0x4243f6=_0x3cd367(),target:_0x1a4948,context:_0x562924=null,isResolvable:_0x2899f0=!0x0}){if(this['_readOnlyChannels']['has'](_0x34b081)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x1a4948)throw new _0x347fe4('commentsrepository-missing-target');const _0x3df66f=this['addCommentThread']({'channelId':_0x34b081,'threadId':_0x4243f6,'target':_0x1a4948,'context':_0x562924,'isResolvable':_0x2899f0});if(!_0x3df66f)return null;const _0x2a5b6d=this['_threadToController']['get'](_0x3df66f),_0xee221d=_0x2a5b6d['view']['commentThreadInputView']['commentInputView'],_0x426bd1=this['context']['plugins']['get'](y),_0x1e016e=_0x426bd1['getByInnerView'](_0x2a5b6d['view']);return _0x426bd1['activate'](_0x1e016e),_0xee221d['once']('editorReady',()=>_0xee221d['focus']()),_0x3df66f;}['hasCommentThread'](_0x4cd139){if('string'!=typeof _0x4cd139)throw new _0x347fe4('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4cd139);}['updateCommentThread']({channelId:_0x5a1221=Tt,threadId:_0x39c27a,context:_0x3ac4c8,unlinkedAt:_0x4fed13,attributes:_0x1214af,isFromAdapter:_0x12d763=!0x1}){return this['fire'](bt('updateCommentThread',_0x5a1221),{'channelId':_0x5a1221,'threadId':_0x39c27a,'context':_0x3ac4c8,'unlinkedAt':_0x4fed13,'attributes':_0x1214af,'isFromAdapter':_0x12d763}),this['getCommentThread'](_0x39c27a);}['getCommentThread'](_0x5492d9){if('string'!=typeof _0x5492d9)throw new _0x347fe4('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x5492d9);}['fetchCommentThread']({channelId:_0x5964ee,threadId:_0x39baa4}={}){const _0x31b3ed=this['getCommentThread'](_0x39baa4);if(_0x31b3ed)return Promise['resolve'](_0x31b3ed);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x347fe4('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x5964ee,'threadId':_0x39baa4})['then'](_0x358513=>this['hasCommentThread'](_0x39baa4)?this['getCommentThread'](_0x39baa4):_0x358513?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x5964ee},_0x358513)):void 0x0)['catch'](_0x320fd2=>{throw console['error'](_0x320fd2),new _0x347fe4('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4b0119,skipNotAttached:_0xc443ad=!0x1,skipEmpty:_0x4c4573=!0x1,toJSON:_0x1f7f77=!0x1}={}){const _0x5869df=[];for(const _0x126885 of this['_threads']['values']())_0x4b0119&&_0x126885['channelId']!==_0x4b0119||_0xc443ad&&!_0x126885['isAttached']||_0x4c4573&&0x0===_0x126885['length']||_0x5869df['push'](_0x126885);return _0x1f7f77?_0x5869df['map'](_0x46674d=>_0x46674d['toJSON']()):_0x5869df;}['getAnnotationForCommentThread'](_0x3b7bf5){const _0x5ae1d6=this['_threadToController']['get'](_0x3b7bf5);if(!_0x5ae1d6)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x5ae1d6['view'])||null;}['getCommentThreadForAnnotation'](_0x38bef1){const _0x1ecfef=this['_viewToController']['get'](_0x38bef1['innerView']);return _0x1ecfef?_0x1ecfef['model']:null;}['setActiveCommentThread'](_0x3ac2b4){const _0x360330=this['context']['plugins']['get'](y);if(!_0x3ac2b4)return void(this['activeCommentThread']&&_0x360330['deactivateAll']());const _0x4694cb=this['getCommentThread'](_0x3ac2b4);if(!_0x4694cb)throw new _0x347fe4('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3ac2b4});if(!this['_threadToController']['has'](_0x4694cb))throw new _0x347fe4('commentsrepository-active-not-attached',null,{'threadId':_0x3ac2b4});const _0x3d7e8d=_0x360330['getByInnerView'](this['_threadToController']['get'](_0x4694cb)['view']);_0x360330['activate'](_0x3d7e8d);}['switchReadOnly'](_0x3da386,_0x4467dd){_0x3da386?this['_readOnlyChannels']['add'](_0x4467dd):this['_readOnlyChannels']['delete'](_0x4467dd),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x5f008f){return this['_readOnlyChannels']['has'](_0x5f008f)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1cd6c6,_0x2b8c5b){return new yt(_0x1cd6c6,_0x2b8c5b);}['setPermissions'](_0x4fa654,_0x372a53=Tt){this['_permissions']['set'](_0x372a53,_0x4fa654),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x3073af=Tt){return this['_permissions']['has'](_0x3073af)?this['_permissions']['get'](_0x3073af):_t;}['_addCommentThread']({channelId:_0x2986df,threadId:_0x3a8893,comments:_0x14b24b,unlinkedAt:_0x3743e4,resolvedAt:_0x4ea3c5,resolvedBy:_0x7bff0c,target:_0x490171,context:_0xe61c8d,attributes:_0x32d439,isFromAdapter:_0x2770ec,isResolvable:_0x144bef,isSubmitted:_0x4f1d28}){if('string'!=typeof _0x3a8893)throw new _0x347fe4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3a8893});if(this['hasCommentThread'](_0x3a8893))throw new _0x347fe4('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3a8893});const _0x119ac7=new pi(this,{'channelId':_0x2986df,'id':_0x3a8893,'context':_0xe61c8d,'attributes':_0x32d439,'unlinkedAt':_0x3743e4,'resolvedAt':_0x4ea3c5,'resolvedBy':_0x7bff0c?this['context']['plugins']['get'](it)['getUser'](_0x7bff0c):null,'isResolvable':_0x144bef,'isSubmitted':_0x4f1d28||_0x2770ec});this['_threads']['set'](_0x3a8893,_0x119ac7);for(const _0x2ff80f of _0x14b24b)_0x119ac7['_add'](this['_createNewComment']({'threadId':_0x3a8893,..._0x2ff80f}));return _0x490171&&_0x119ac7['attachTo'](_0x490171),_0x2770ec||!_0x119ac7['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x2986df,'threadId':_0x3a8893});}['_submitCommentThread']({channelId:_0x28ab22,threadId:_0x19bf35}){if(!this['hasCommentThread'](_0x19bf35))throw new _0x347fe4('commentsrepository-missing-comment-thread',this);const _0x55bf65=this['getCommentThread'](_0x19bf35);if(_0x55bf65['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4f61ff,comments:_0x13e132,resolvedAt:_0x23a226,resolvedBy:_0x206d9b,context:_0x48d120,attributes:_0x34dc95}=_0x55bf65,_0x4f993f=this['context']['plugins']['get']('PendingActions'),_0x57b47f=_0x4f993f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x28ab22,'threadId':_0x4f61ff,'comments':_0x13e132['map'](_0x25b090=>_0x25b090['toJSON']()),'resolvedAt':_0x23a226,'resolvedBy':_0x206d9b?_0x206d9b['id']:_0x206d9b,'context':_0x48d120,'attributes':_0x34dc95})['then'](({comments:_0x22b9c2})=>{_0x4f993f['remove'](_0x57b47f);for(const _0x28020d of _0x22b9c2)this['_updateComment']({'channelId':_0x28ab22,'threadId':_0x19bf35,'commentId':_0x28020d['commentId'],'createdAt':_0x28020d['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x34aa11=>{throw console['error'](_0x34aa11),new _0x347fe4('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x3ac31b,target:_0x266f7f}){const _0x543e31=this['getCommentThread'](_0x3ac31b);if(!_0x543e31)throw new _0x347fe4('commentsrepository-attach-missing-comment-thread',this);const _0x5e732c=this['context']['plugins']['get']('PendingActions'),_0x4c636e=this['context']['plugins']['get'](y),_0x1d8648=this['_createCommentThreadView'](_0x543e31),_0x2b6ad2=new yt(_0x543e31,_0x1d8648);let _0x1d0f9e=null;_0x1d8648['on']('change:isDirty',(_0x3a6ea3,_0x322219,_0xeee0af)=>{_0xeee0af?_0x1d0f9e=_0x5e732c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1d0f9e&&(_0x5e732c['remove'](_0x1d0f9e),_0x1d0f9e=null);}),this['_threadToController']['set'](_0x543e31,_0x2b6ad2),this['_viewToController']['set'](_0x1d8648,_0x2b6ad2);const _0x943f1e=new E(this['context']['locale'],_0x1d8648);_0x943f1e['bind']('length')['to'](_0x1d8648),_0x943f1e['bind']('isDirty')['to'](_0x1d8648,'isDirty',_0x1d8648,'length',(_0x7a67de,_0x2f7860)=>_0x7a67de||!_0x2f7860),_0x943f1e['bind']('isActive')['to'](_0x1d8648),_0x943f1e['type']='comment';const _0x114814=new T({'view':_0x943f1e,'target':_0x266f7f,'type':'comment','isVisible':!_0x543e31['archivedAt']});return _0x1d8648['on']('escape',()=>{_0x114814['fire']('escape');}),this['_bindAnnotationToEditors'](_0x1d8648,_0x114814),_0x4c636e['add'](_0x114814),_0x114814;}['_bindAnnotationToEditors'](_0x559742,_0x1bfc49){this['listenTo'](_0x559742,'editorReady',(_0x496ccd,_0x4028ed)=>{const _0x560b88=_0x4028ed['ui']['view']['body']['bodyCollectionContainer'];_0x1bfc49['focusableElements']['add'](_0x560b88),this['context']instanceof _0x556455&&this['context']['ui']['focusTracker']['add'](_0x560b88);},{'priority':'highest'}),this['listenTo'](_0x559742,'editorDestroyed',(_0xfaec91,_0x1b9d00)=>{const _0x5d75f0=_0x1b9d00['ui']['view']['body']['bodyCollectionContainer'];_0x1bfc49['focusableElements']['has'](_0x5d75f0)&&_0x1bfc49['focusableElements']['remove'](_0x5d75f0),this['context']instanceof _0x556455&&this['context']['ui']['focusTracker']['remove'](_0x5d75f0);});}['_unbindEditors'](_0x782dc5){this['stopListening'](_0x782dc5,'editorReady'),this['stopListening'](_0x782dc5,'editorDestroyed');}['_createCommentThreadView'](_0x30dbdb){const _0x552448=this['context']['plugins']['get'](it),{config:_0x555b90,locale:_0x24108d}=this['context'],_0xe4da57=lt(_0x555b90['get']('locale'),_0x24108d);return new(0x0,(_0x555b90['get']('comments'))['CommentThreadView'])(_0x24108d,_0x30dbdb,_0x552448['me'],{'editorConfig':{..._0x555b90['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x555b90['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x555b90['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x555b90['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x555b90['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xe4da57,'CommentView':_0x555b90['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x36bc59,channelId:_0x170578,resolvedAt:_0x3e7bdb,resolvedBy:_0x2b58d1,isFromAdapter:_0x1bcd63}){if(!this['hasCommentThread'](_0x36bc59))throw new _0x347fe4('commentsrepository-missing-comment-thread',null,{'threadId':_0x36bc59});const _0x20ca44=this['getCommentThread'](_0x36bc59);if(_0x20ca44['isResolved'])throw new _0x347fe4('commentsrepository-resolved-comment-thread',null,{'threadId':_0x36bc59});const _0x3664af=this['context']['plugins']['get'](it);if(_0x20ca44['resolvedBy']=_0x3664af['getUser'](_0x2b58d1),_0x20ca44['resolvedAt']=_0x3e7bdb,_0x1bcd63||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5594b9=this['context']['plugins']['get']('PendingActions'),_0x3c92f2=_0x5594b9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x170578,'threadId':_0x36bc59})['then'](({resolvedAt:_0x1efc8,resolvedBy:_0x37775b})=>{_0x5594b9['remove'](_0x3c92f2),_0x20ca44['resolvedBy']['id']!==_0x37775b&&(_0x20ca44['resolvedBy']=_0x3664af['getUser'](_0x37775b)),_0x20ca44['resolvedAt']=_0x1efc8;})['catch'](_0x1b9a4b=>{throw console['error'](_0x1b9a4b),new _0x347fe4('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x171e2a,channelId:_0x1801d0,isFromAdapter:_0x3826c0}){if(!this['hasCommentThread'](_0x171e2a))throw new _0x347fe4('commentsrepository-missing-comment-thread',null,{'threadId':_0x171e2a});const _0x14e249=this['getCommentThread'](_0x171e2a);if(!_0x14e249['isResolved'])throw new _0x347fe4('commentsrepository-reopen-comment-thread',null,{'threadId':_0x171e2a});if(_0x14e249['resolvedBy']=null,_0x14e249['resolvedAt']=null,_0x3826c0||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x33a297=this['context']['plugins']['get']('PendingActions'),_0x39224c=_0x33a297['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1801d0,'threadId':_0x171e2a})['then'](()=>_0x33a297['remove'](_0x39224c))['catch'](_0x33d58d=>{throw console['error'](_0x33d58d),new _0x347fe4('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x41288a,isFromAdapter:_0x374e72}){const _0x543be9=this['getCommentThread'](_0x41288a);if(!_0x543be9)throw new _0x347fe4('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x41288a),this['_threads']['delete'](_0x41288a),!_0x543be9['isSubmitted']||_0x374e72||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x3198d5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4717a1}=_0x543be9,_0x3ddbca=_0x3198d5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x4717a1,'threadId':_0x41288a})['then'](()=>_0x3198d5['remove'](_0x3ddbca))['catch'](_0x2e8c03=>{throw console['error'](_0x2e8c03),new _0x347fe4('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x1f2415,unlinkedAt:_0x111be3,context:_0x523e8b,attributes:_0x1332af,isFromAdapter:_0x2dd690}){if('string'!=typeof _0x1f2415)throw new _0x347fe4('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x1f2415});if(!this['hasCommentThread'](_0x1f2415))throw new _0x347fe4('commentsrepository-missing-comment-thread',null,{'threadId':_0x1f2415});const _0x2d39ba=this['getCommentThread'](_0x1f2415);let _0x27a245=!0x1;if(void 0x0!==_0x523e8b&&_0x2d39ba['context']!==_0x523e8b&&(_0x2d39ba['context']=_0x523e8b,_0x27a245=!0x0),void 0x0!==_0x111be3&&_0x2d39ba['unlinkedAt']!==_0x111be3&&(_0x2d39ba['unlinkedAt']=_0x111be3,_0x27a245=!0x0),_0x1332af&&!wt(_0x1332af,_0x2d39ba['attributes'])&&(_0x2d39ba['attributes']=_0x1332af,_0x27a245=!0x0),!_0x27a245)return Promise['resolve']();if(!_0x2d39ba['isSubmitted']||_0x2dd690||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x94d0f2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x535f1d}=_0x2d39ba,_0x346320=_0x94d0f2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x535f1d,'threadId':_0x1f2415,'context':_0x523e8b,'unlinkedAt':_0x111be3,'attributes':_0x1332af})['then'](()=>_0x94d0f2['remove'](_0x346320))['catch'](_0x35d403=>{throw console['error'](_0x35d403),new _0x347fe4('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x463bde){const _0xd98e4c=this['context']['plugins']['get'](y),_0x5e664a=this['getCommentThread'](_0x463bde);if(_0x5e664a['_isAttached']=!0x1,this['_threadToController']['has'](_0x5e664a)){const _0xa198c5=this['_threadToController']['get'](_0x5e664a),_0x4bee3f=_0xa198c5['view'],_0x5acef2=_0xd98e4c['getByInnerView'](_0x4bee3f);this['_threadToController']['delete'](_0x5e664a),this['_viewToController']['delete'](_0x4bee3f),_0x5acef2&&_0xd98e4c['remove'](_0x5acef2),_0xa198c5['destroy'](),_0x4bee3f['destroy']()['then'](()=>{this['_unbindEditors'](_0x4bee3f);});}}['_updateActiveAnnotation']({threadId:_0x6e7794,resolvedAt:_0x3a13c3,unlinkedAt:_0x50f405}){const _0x2fe86c=!!_0x3a13c3,_0x31d0f4=this['context']['plugins']['get'](y),_0x2e970b=this['getCommentThread'](_0x6e7794);if(this['_threadToController']['has'](_0x2e970b)){const _0x54fc3a=this['_threadToController']['get'](_0x2e970b)['view'],_0x40faca=_0x31d0f4['getByInnerView'](_0x54fc3a);_0x40faca&&(_0x2fe86c&&_0x31d0f4['_removeActiveAnnotation'](_0x40faca),_0x50f405?_0x40faca['isVisible']=!0x1:_0x40faca['refreshVisibility']());}}['_getExternalAuthor'](_0x3dc60d){const _0x4044ec=this['context']['plugins']['get'](it),_0x2db773=pt('external:'+_0x3dc60d),_0x4fdd10=_0x4044ec['getUser'](_0x2db773);return _0x4fdd10||_0x4044ec['addUser']({'id':_0x2db773,'name':_0x3dc60d});}['_createNewComment']({threadId:_0x2f13cb,commentId:_0x5ee66f=_0x3cd367(),content:_0x5c4378,authorId:_0x31f81e,createdAt:_0x242e92,attributes:_0x5d2cd7}){if('string'!=typeof _0x5ee66f)throw new _0x347fe4('commentsrepository-invalid-commentid');if('string'!=typeof _0x31f81e)throw new _0x347fe4('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x5c4378||!_0x5c4378['trim']())throw new _0x347fe4('commentsrepository-invalid-comment-content');const _0x3c4a33=this['context']['plugins']['get'](it)['getUser'](_0x31f81e);if(!_0x3c4a33)throw new _0x347fe4('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x31f81e});let _0xe12839=null,_0xa9d85a=_0x242e92;return _0x5d2cd7?.['@external']&&(_0xe12839=this['_getExternalAuthor'](_0x5d2cd7['@external']['authorName']),_0xa9d85a=new Date(_0x5d2cd7['@external']['createdAt'])),new wi(this,{'threadId':_0x2f13cb,'id':_0x5ee66f,'author':_0xe12839||_0x3c4a33,'creator':_0x3c4a33,'content':_0x5c4378,'createdAt':_0x242e92,'authoredAt':_0xa9d85a,'attributes':_0x5d2cd7});}['_addComment'](_0x46baec){let {threadId:_0x23bf78,content:_0x5ef8b0,attributes:_0x44fcef,isFromAdapter:_0x5cd045}=_0x46baec;const _0x1f4426=this['getCommentThread'](_0x46baec['threadId']);if(!_0x1f4426)throw new _0x347fe4('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x19d6e0=this['_createNewComment'](_0x46baec),{id:_0x276f53}=_0x19d6e0;if(_0x1f4426['_add'](_0x19d6e0),_0x5cd045||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x1f4426['isSubmitted'])return Promise['resolve']();const _0xe5cac=this['context']['plugins']['get']('PendingActions'),{channelId:_0x229d23}=_0x1f4426,_0x823c24=_0xe5cac['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x44fcef||(_0x44fcef={}),this['adapter']['addComment']({'channelId':_0x229d23,'threadId':_0x23bf78,'commentId':_0x276f53,'content':_0x5ef8b0,'attributes':_0x44fcef})['then'](_0x4c4d81=>{_0xe5cac['remove'](_0x823c24),_0x4c4d81&&this['_updateComment']({'channelId':_0x229d23,'threadId':_0x23bf78,'commentId':_0x276f53,'createdAt':_0x4c4d81['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x188b64=>{throw console['error'](_0x188b64),new _0x347fe4('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x352a09,commentId:_0x165c35,content:_0xe4e82a,createdAt:_0xe2c5d7,attributes:_0x910b,isFromAdapter:_0x116c31}){if(void 0x0!==_0xe4e82a&&('string'!=typeof _0xe4e82a||!_0xe4e82a['trim']()['length']))throw new _0x347fe4('commentsrepository-update-comment-invalid-content');const _0x245814=this['getCommentThread'](_0x352a09),_0x5f0341=_0x245814['getComment'](_0x165c35);if(!_0x5f0341)throw new _0x347fe4('commentsrepository-update-missing-comment',this);let _0x6c591b=!0x1;if(_0xe4e82a&&_0xe4e82a!==_0x5f0341['content']&&(_0x5f0341['isEditable']||_0x116c31)&&(_0x5f0341['content']=_0xe4e82a,_0x6c591b=!0x0),_0xe2c5d7&&_0xe2c5d7!==_0x5f0341['createdAt']&&(_0x5f0341['createdAt']=_0xe2c5d7,_0x5f0341['attributes']&&_0x5f0341['attributes']['@external']||(_0x5f0341['authoredAt']=_0xe2c5d7),_0x6c591b=!0x0),_0x910b&&!wt(_0x910b,_0x5f0341['attributes'])&&(_0x5f0341['attributes']=_0x910b,_0x6c591b=!0x0),!_0x6c591b)return Promise['resolve']();if(_0x245814['fire']('commentUpdated'),_0x116c31||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x48798b=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4914ef}=this['getCommentThread'](_0x5f0341['threadId']),_0x4177ab=_0x48798b['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4914ef,'threadId':_0x352a09,'commentId':_0x165c35,'content':_0xe4e82a,'attributes':_0x910b})['then'](()=>_0x48798b['remove'](_0x4177ab))['catch'](_0x3c1b14=>{throw console['error'](_0x3c1b14),new _0x347fe4('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x57bead,commentId:_0x5d1629,isFromAdapter:_0x4bccd8}){const _0x4d579b=this['getCommentThread'](_0x57bead),_0x5aed7f=_0x4d579b['getComment'](_0x5d1629);if(!_0x5aed7f)throw new _0x347fe4('commentsrepository-remove-missing-comment',this);if(_0x4d579b['_remove'](_0x5aed7f),_0x4bccd8||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3bc12e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2658b3}=_0x4d579b,_0x31e037=_0x3bc12e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x2658b3,'threadId':_0x57bead,'commentId':_0x5d1629})['then'](()=>_0x3bc12e['remove'](_0x31e037))['catch'](_0x22243e=>{throw console['error'](_0x22243e),new _0x347fe4('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x279178(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1b9113,_0x9e9e9c){super();const _0x1534a0=_0x1b9113['context']['plugins']['get'](it)['me'],_0x47a0f7=_0x1b9113['getCommentThread'](_0x9e9e9c['threadId']),_0x4257ea=0x0===_0x47a0f7['comments']['length'],_0x18d549=_0x1534a0===_0x9e9e9c['author'];this['id']=_0x9e9e9c['id'],this['threadId']=_0x9e9e9c['threadId'],this['author']=_0x9e9e9c['author'],this['creator']=_0x9e9e9c['creator'],this['isExternal']=Boolean(_0x9e9e9c['attributes']&&_0x9e9e9c['attributes']['@external']),this['set']('content',_0x9e9e9c['content']),this['createdAt']=_0x9e9e9c['createdAt']||new Date(),this['set']('authoredAt',_0x9e9e9c['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x47a0f7,'resolvedAt'),this['set']('attributes',_0x9e9e9c['attributes']||{}),this['bind']('isEditable')['to'](_0x1b9113,'_permissions',()=>{const _0x1cb71b=_0x1b9113['getPermissions'](_0x47a0f7['channelId'])['write'],_0x1c5432=_0x1b9113['getPermissions'](_0x47a0f7['channelId'])['modifyAll'];return _0x18d549&&_0x1cb71b||!_0x18d549&&_0x1c5432;}),this['bind']('isRemovable')['to'](_0x47a0f7,'isRemovable',_0x1b9113,'_permissions',_0xe17aac=>{const _0x427062=_0x1b9113['getPermissions'](_0x47a0f7['channelId'])['write'],_0x3b7ac1=_0x1b9113['getPermissions'](_0x47a0f7['channelId'])['modifyAll'];return _0x18d549&&_0x427062||_0xe17aac&&_0x4257ea||!_0x18d549&&_0x3b7ac1&&!_0x4257ea;}),this['bind']('isReadOnly')['to'](_0x47a0f7,'isReadOnly'),this['_repository']=_0x1b9113;}get['weight'](){return Math['max'](function(_0x4b4e1d){const _0x5372e9=document['createElement']('div');return _0x5372e9['innerHTML']=_0x4b4e1d,_0x5372e9['textContent']['length'];}(this['content']),0xc8);}['update'](_0x162f3a){const {threadId:_0x5ca670,id:_0x1f2ce7}=this;if(!this['_repository']['hasCommentThread'](_0x5ca670))throw new _0x347fe4('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5dcb93}=this['_repository']['getCommentThread'](_0x5ca670);this['_repository']['fire'](bt('updateComment',_0x5dcb93,_0x5ca670),{'channelId':_0x5dcb93,'threadId':_0x5ca670,'commentId':_0x1f2ce7,..._0x162f3a});}['setAttribute'](_0x4e7ce5,_0x331f61){const _0x15219e=It(this['attributes']);At(_0x15219e,_0x4e7ce5,_0x331f61),this['update']({'attributes':_0x15219e});}['removeAttribute'](_0x6760b3){const _0x40acdf=It(this['attributes']);Ct(_0x40acdf,_0x6760b3),this['update']({'attributes':_0x40acdf});}['remove'](_0x5b812c={}){if(!_0x5b812c['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2a28b9,id:_0x522cde}=this;if(!this['_repository']['hasCommentThread'](_0x2a28b9))throw new _0x347fe4('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x287593}=this['_repository']['getCommentThread'](_0x2a28b9);this['_repository']['fire'](bt('removeComment',_0x287593,_0x2a28b9),{'channelId':_0x287593,'threadId':_0x2a28b9,'commentId':_0x522cde,..._0x5b812c});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x4d650c,..._0x36dbd6){for(const _0xcaaf80 of _0x36dbd6)void 0x0!==_0xcaaf80&&(_0x4d650c+=':'+String(_0xcaaf80));return _0x4d650c;}class rt extends _0x557c6a{constructor(_0x23fc3d){super(_0x23fc3d),this['set']('hasContent',!0x1);}['refresh'](){const _0x4dcab6=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x3f4356 of _0x4dcab6['getRanges']())if(this['_hasContent'](_0x3f4356))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x18e124=_0x3cd367(),ranges:_0x56099d,comment:_0x4f33e1}={}){const _0x136a18=this['editor']['model'],_0x548888=_0x56099d??Array['from'](_0x136a18['document']['selection']['getRanges']()),_0x24e982=[];for(const _0x24dcc3 of _0x548888)this['_hasContent'](_0x24dcc3)&&_0x24e982['push'](this['_trimToContent'](_0x24dcc3));if(!_0x24e982['length'])throw new _0x347fe4('addcommentthreadcommand-incorrect-ranges',null);_0x4f33e1&&this['_createCommentThread'](_0x18e124,_0x4f33e1),this['_createMarkersFromRanges'](_0x18e124,_0x24e982,!!_0x4f33e1);}['_createMarkersFromRanges'](_0x1437d1,_0xbbb4f1,_0x2b029e){this['editor']['model']['change'](_0x47b708=>{for(const _0x363870 of _0xbbb4f1){const _0x65dc7c=_0x3cd367()['substr'](0x1,0x5),_0x54ef62='comment:'+_0x1437d1+':'+_0x65dc7c;_0x47b708['addMarker'](_0x54ef62,{'range':_0x363870,'usingOperation':_0x2b029e,'affectsData':_0x2b029e});}});}['_createCommentThread'](_0x3cfb03,_0x122bd1){const _0x327c9b=this['editor']['plugins']['get']('CommentsRepository'),_0x154f67=this['editor']['config']['get']('collaboration.channelId'),_0x598561=this['editor']['plugins']['get']('Users')['me'];if(!_0x598561)throw new _0x347fe4('addcommentthreadcommand-user-not-found',null);_0x327c9b['addCommentThread']({'threadId':_0x3cfb03,'channelId':_0x154f67,'comments':[{'authorId':_0x598561['id'],'content':_0x122bd1,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x234270){for(const _0x5c5f81 of _0x234270['getItems']())if(this['_itemIsContent'](_0x5c5f81))return!0x0;return!0x1;}['_itemIsContent'](_0x291008){return _0x291008['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x291008)&&!_0x291008['is']('element','tableCell');}['_trimToContent'](_0x149ea9){const _0x352338=_0x80872d=>!this['_itemIsContent'](_0x80872d['item']),_0x3c1877=_0x149ea9['start']['getLastMatchingPosition'](_0x352338),_0x2b2095=_0x149ea9['end']['getLastMatchingPosition'](_0x352338,{'direction':'backward'});return this['editor']['model']['createRange'](_0x3c1877,_0x2b2095);}}class b extends _0x329b6e{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x31dcb3){super(_0x31dcb3),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x57a6cf=this['editor'],_0x5b58fc=_0x57a6cf['model']['document']['selection'],_0x2bdfa9=_0x465268(()=>this['refreshSelectedViews'](),0xa);_0x5b58fc['on']('change:range',(_0x23d6fc,_0x440123)=>{_0x440123['directChange']&&(_0x2bdfa9['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x57a6cf['editing']['view']['document'],'change:isFocused',(_0x9162cf,_0x36428b,_0x2450dc)=>{_0x2450dc&&_0x2bdfa9();}),this['listenTo'](_0x57a6cf['ui']['focusTracker'],'change:isFocused',(_0x4113fd,_0x412702,_0x55da95)=>{_0x55da95||_0x57a6cf['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x2e05fd=>this['_editorAnnotationsData']['has'](_0x2e05fd['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x33df26){if(this['_editorAnnotations']['has'](_0x33df26['view']))return;this['_editorAnnotations']['add'](_0x33df26['view']),this['editor']['ui']['focusTracker']['add'](_0x33df26['view']['element']);const _0x4d4925=this['editor']['plugins']['get'](y);this['listenTo'](_0x4d4925['collection'],'remove',(_0x59c386,_0x54dbe6)=>{this['editor']['ui']['focusTracker']['remove'](_0x54dbe6['view']['element']),this['_editorAnnotations']['delete'](_0x54dbe6['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0xcbdce8){if('function'!=typeof _0xcbdce8)throw new _0x347fe4('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0xcbdce8);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x3e5677,annotations:_0x52f0d4}){const _0x276f82=[],_0x4b8ee4=this['editor']['model']['document']['selection'],_0x5f38d8=Array['from'](_0x4b8ee4['getRanges']());for(const [_0x5e6c80,_0x135744]of this['_editorAnnotationsData']){const _0x4c6446=_0x33ee2a(_0x135744),_0x53d4ba=_0x52f0d4['getByInnerView'](_0x5e6c80);_0x4c6446&&_0x53d4ba&&_0x276f82['push']({'annotation':_0x53d4ba,'range':_0x4c6446});}function _0x33ee2a(_0x5bb467){for(const _0x1e8246 of _0x5bb467)for(const _0x37fb69 of _0x5f38d8)if(_0x1e8246['containsRange'](_0x37fb69,!_0x4b8ee4['isCollapsed']))return _0x1e8246;return null;}return _0x276f82['sort']((_0x2f7824,_0x336b20)=>{const _0x3e9e8c=_0x2f7824['range'],_0x1d4210=_0x336b20['range'];if(!_0x3e9e8c['isEqual'](_0x1d4210)){if(_0x3e9e8c['containsRange'](_0x1d4210,!0x0))return 0x1;if(_0x1d4210['containsRange'](_0x3e9e8c,!0x0))return-0x1;}return _0x2f7824['annotation']==_0x3e5677?-0x1:_0x336b20['annotation']==_0x3e5677?0x1:0x0;})['map'](_0x1a4467=>_0x1a4467['annotation']);}get['_editorAnnotationsData'](){const _0x4e243c=new Map();for(const _0x4d32b7 of Array['from'](this['_dataCollectors']))for(const [_0x100a15,_0x3b7dd9]of _0x4d32b7())_0x4e243c['set'](_0x100a15,_0x3b7dd9);return _0x4e243c;}}class st extends _0x329b6e{['afterInit'](){const _0x3c7ad6=this['editor'];if(!_0x3c7ad6['plugins']['has']('RestrictedEditingModeEditing'))return;_0x3c7ad6['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x329b6e{constructor(_0x225d6a){super(_0x225d6a),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x2ab9d8=this['editor'],_0x5a1c60=_0x2ab9d8['commands']['get']('importWord'),_0x3a1dcd=_0x2ab9d8['plugins']['get'](it);_0x5a1c60&&(_0x5a1c60['on']('execute',(_0x53e30d,[,_0x1ee8e0])=>{_0x1ee8e0['collaboration_features']={'comments':!0x0,'user_id':_0x3a1dcd['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5a1c60,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5c2677,_0x39406a){const {comment_threads:_0x5777e8}=_0x39406a;_0x5777e8&&_0x5777e8['forEach'](({thread_id:_0x1f0481,comments:_0x291434,is_resolved:_0x15efc7})=>{const _0x277098=new Date(),_0x4a9ac6=_0x291434['map'](({author:_0x16fd5c,content:_0x48de9a,created_at:_0x53cb3f})=>({'content':_0x48de9a,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x277098,'attributes':{'@external':{'authorName':_0x16fd5c,'createdAt':_0x53cb3f?new Date(_0x53cb3f):new Date(),'source':'importWord'}}})),_0xec41b3=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0xec41b3,'threadId':_0x1f0481,'comments':_0x4a9ac6,'resolvedAt':_0x15efc7?_0x277098:null});});}}class at extends _0x329b6e{constructor(_0xc3d272){super(_0xc3d272),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x4353b5=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x4353b5,'contentInsertion',(_0x2de483,_0x11e631)=>this['_removeMarkersWithoutThreads'](_0x11e631['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x5364e2){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x5364e2;const _0x176b52=this['editor']['plugins']['get']('CommentsRepository');for(const _0x174a43 of _0x5364e2['keys']()){const [_0x4a5ed4,_0x911a0]=_0x174a43['split'](':');'comment'!=_0x4a5ed4||_0x176b52['hasCommentThread'](_0x911a0)||_0x5364e2['delete'](_0x174a43);}return _0x5364e2;}['_registerMarkerInClipboardPipeline'](){const _0x2c9a4d=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x2fba50=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x2fba50&&_0x2c9a4d['_registerMarkerToCopy']('comment',_0x2fba50);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x307a72){switch(_0x307a72){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 _0x329b6e{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x2af9cd,_0x344cd5)=>{if(!_0x344cd5['options']['showCommentHighlights'])return null;if(_0x344cd5['options']['ignoreResolvedComments']){const {id:_0x182b6c}=er(_0x2af9cd['markerName']),_0x5274e0=this['editor']['plugins']['get'](o);if(_0x5274e0['getCommentThread'](_0x182b6c)?.['isResolved']&&_0x2af9cd['item'])return _0x344cd5['consumable']['consume'](_0x2af9cd['item'],'addMarker:'+_0x2af9cd['markerName']),_0x344cd5['consumable']['consume'](_0x2af9cd['item'],'removeMarker:'+_0x2af9cd['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x3c5ca9=>{_0x3c5ca9['on']('addMarker:comment',(_0x1f5144,_0x1c0225,_0x52ce9b)=>{if(!_0x52ce9b['options']['showCommentHighlights'])return;const _0x3cf1dd=_0x1c0225['item'];if(!_0x3cf1dd)return;const _0x52bd45=_0x52ce9b['mapper']['toViewElement'](_0x3cf1dd);this['editor']['model']['schema']['isObject'](_0x3cf1dd)&&_0x52bd45&&!_0x52bd45['getCustomProperty']('widget')&&_0x52bd45['is']('containerElement')&&_0x1fc28a(_0x52bd45,_0x52ce9b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x27b4a8,{writer:_0x28cb29,options:_0x493dff})=>{if(!_0x493dff['showCommentHighlights'])return null;const _0x25f5f7=_0x28cb29['createContainerElement']('div'),_0x188ab2=_0x28cb29['createEmptyElement']('hr');return _0x28cb29['addClass']('ck-horizontal-line',_0x25f5f7),_0x28cb29['insert'](_0x28cb29['createPositionAt'](_0x25f5f7,0x0),_0x188ab2),_0x25f5f7;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x3b56b2,{writer:_0x5c5143,options:_0x59d1ce})=>{if(!_0x59d1ce['showCommentHighlights'])return null;const _0x3c3ab6=_0x5c5143['createContainerElement']('span'),_0x4fba02=_0x5c5143['createEmptyElement']('img');return _0x5c5143['addClass']('image-inline',_0x3c3ab6),_0x5c5143['insert'](_0x5c5143['createPositionAt'](_0x3c3ab6,0x0),_0x4fba02),_0x3c3ab6;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xabf4ce,{writer:_0x153a51,options:_0x987ebd})=>{if(_0x987ebd['showCommentHighlights'])return _0x153a51['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x5b822f,_0x57f90a,_0x277346)=>{_0x277346['options']['showCommentHighlights']&&_0x5b822f['stop']();},{'priority':'high'});}}class r extends _0x329b6e{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(_0x2e34af){super(_0x2e34af),this['set']('isThreadsLoadingPaused',!0x0),_0x2e34af['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x23db6c,_0x193f28,_0x7cfea3,_0x3ee1f9)=>{const _0x3d6a12=_0x2e34af['plugins']['get'](o),_0x55f16b=_0x7cfea3?er(_0x7cfea3)['id']:null;_0x2e34af['model']['change'](()=>{if(_0x55f16b){const _0x258166=this['getAllMarkersForId'](_0x55f16b);for(const _0x277a37 of _0x258166)_0x2e34af['editing']['reconvertMarker'](_0x277a37);}if(_0x3ee1f9){const {id:_0x1dbafa}=er(_0x3ee1f9),_0x119912=_0x3d6a12['getCommentThread'](_0x1dbafa);if(_0x119912&&_0x119912['unlinkedAt'])return;if(_0x119912&&!_0x119912['isAttached'])return;const _0x3f326c=this['getAllMarkersForId'](_0x1dbafa);for(const _0x187e18 of _0x3f326c)_0x2e34af['editing']['reconvertMarker'](_0x187e18);}}),_0x55f16b&&this['scrollToThreadMarker'](_0x55f16b);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x278140=this['editor'],_0x54a01e=_0x278140['plugins']['get'](o),_0xfcbd4a=_0x278140['config']['get']('collaboration.channelId'),_0x5a7b9e=_0x54a01e['getCommentThreads']()['filter'](_0x58855d=>_0x58855d['channelId']!==_0xfcbd4a);_0x278140['commands']['add']('addCommentThread',new rt(_0x278140)),this['listenTo'](_0x278140,'change:isReadOnly',(_0x137e10,_0x29afb1,_0x3ad053)=>{_0x54a01e['switchReadOnly'](_0x3ad053,_0x278140['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x54a01e,ft('addCommentThread',_0xfcbd4a),(_0x909cef,{threadId:_0x4dcb6b})=>{const _0x149fa1=this['editor']['plugins']['get'](o)['getCommentThread'](_0x4dcb6b);_0x149fa1?.['unlinkedAt']&&this['_attachArchivedThread'](_0x4dcb6b);}),this['listenTo'](_0x54a01e,ft('removeCommentThread',_0xfcbd4a),(_0x354cf7,{threadId:_0xaba62f})=>{_0x278140['model']['enqueueChange']({'isUndoable':!0x1},_0x4a32eb=>{const _0x1d3af3=this['getAllMarkersForId'](_0xaba62f);for(const _0x57cdca of _0x1d3af3)_0x4a32eb['removeMarker'](_0x57cdca);});}),this['listenTo'](_0x54a01e,ft('resolveCommentThread',_0xfcbd4a),(_0x58fb7d,{threadId:_0x36c208})=>{(this['_reconvertMarkers'](_0x36c208),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x36c208)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x54a01e,ft('reopenCommentThread',_0xfcbd4a),(_0x11c77b,{threadId:_0x13c450})=>{this['_reconvertMarkers'](_0x13c450);},{'priority':'low'}),this['listenTo'](_0x54a01e,ft('addComment',_0xfcbd4a),(_0xcbabc4,{threadId:_0x398e1f,isFromAdapter:_0x1bccc7})=>{const _0x2e824d=this['getAllMarkersForId'](_0x398e1f);if(_0x1bccc7||0x0==_0x2e824d['length']||!_0x54a01e['hasCommentThread'](_0x398e1f))return;0x1===_0x54a01e['getCommentThread'](_0x398e1f)['length']&&_0x278140['model']['enqueueChange']({'isUndoable':!0x1},_0x373e09=>{for(const _0x258029 of _0x2e824d)_0x373e09['updateMarker'](_0x258029,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5a7b9e);}['afterInit'](){!async function(_0x1f2494){const _0x2c3d87=_0x439e8b([0x53,0x32,0x6d,0x4f,0x4c,0x78,0x30,0x61,0x46,0x48,0x4d,0x76,0x35,0x34,0x38,0x58,0x47,0x55,0x45,0x6b,0x57,0x33,0x68,0x6f,0x69,0x6a,0x67,0x51,0x36,0x52,0x77,0x79,0x50,0x56,0x41,0x54,0x42,0x75,0x31,0x5a,0x4a,0x63,0x72,0x64,0x37,0x59,0x66,0x43,0x6c,0x74,0x7a,0x73,0x6e,0x71,0x4b,0x49,0x39,0x62,0x44,0x70,0x65,0x4e]),_0x5c28c5=0x354ed699,_0x50f62e=0x3549ba61^_0x5c28c5,_0x1f1888=window[_0x439e8b([0x44,0x61,0x74,0x65])][_0x439e8b([0x6e,0x6f,0x77])](),_0x238c47=_0x1f2494[_0x439e8b([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1648ca=new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xb22859=>{_0x238c47[_0x439e8b([0x6f,0x6e,0x63,0x65])](_0x439e8b([0x72,0x65,0x61,0x64,0x79]),_0xb22859);}),_0x6809eb={[_0x439e8b([0x6b,0x74,0x79])]:_0x439e8b([0x45,0x43]),[_0x439e8b([0x75,0x73,0x65])]:_0x439e8b([0x73,0x69,0x67]),[_0x439e8b([0x63,0x72,0x76])]:_0x439e8b([0x50,0x2d,0x32,0x35,0x36]),[_0x439e8b([0x78])]:_0x439e8b([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]),[_0x439e8b([0x79])]:_0x439e8b([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]),[_0x439e8b([0x61,0x6c,0x67])]:_0x439e8b([0x45,0x53,0x32,0x35,0x36])},_0xcbe886=_0x238c47[_0x439e8b([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x439e8b([0x67,0x65,0x74])](_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x37e263(){let _0xbf638d,_0x1d9775=null,_0x302ac3=null;try{if(_0xcbe886==_0x439e8b([0x47,0x50,0x4c]))return _0x439e8b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0xbf638d=_0x44c799(),!_0xbf638d)return _0x439e8b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0xbf638d[_0x439e8b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x302ac3=_0x306606(_0xbf638d[_0x439e8b([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0xbf638d[_0x439e8b([0x6a,0x74,0x69])])),await _0x571d69()?_0x3c6235()?_0x38e06a()?_0x439e8b([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x40872f()?(_0xbf638d[_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x439e8b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x1d9775=_0xadbe43(_0x439e8b([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0xbf638d[_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x439e8b([0x74,0x72,0x69,0x61,0x6c])&&(_0x1d9775=_0xadbe43(_0x439e8b([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5718eb()):_0x439e8b([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x439e8b([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x439e8b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x439e8b([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x38e06a(){const _0x2b748f=[_0x439e8b([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x439e8b([0x74,0x72,0x69,0x61,0x6c])][_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xbf638d[_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x1f1888/0x3e8:0xe10*_0x50f62e;return _0xbf638d[_0x439e8b([0x65,0x78,0x70])]<_0x2b748f;}function _0x3c6235(){const _0x24148e=_0xbf638d[_0x439e8b([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x24148e)return!0x1;if(_0x24148e[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x439e8b([0x2a])))return!0x0;if(_0x24148e[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x439e8b([0x43,0x4d,0x54])))return!0x0;if(_0x24148e[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x439e8b([0x52,0x43,0x4d,0x54]))){if(_0x338090())return!0x0;if(_0x3610fb()||_0x7e089f())return!0x0;}return!0x1;}function _0x40872f(){const _0x4e60a7=_0xbf638d[_0x439e8b([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x4e60a7||0x0==_0x4e60a7[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x5476ab}=new URL(window[_0x439e8b([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x4e60a7[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x5476ab))return!0x0;const _0x499f31=_0x5476ab[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])](_0x439e8b([0x2e]));return _0x4e60a7[_0x439e8b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x8c46dd=>_0x8c46dd[_0x439e8b([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x439e8b([0x2a])))[_0x439e8b([0x6d,0x61,0x70])](_0x4a2ce4=>_0x4a2ce4[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])](_0x439e8b([0x2e])))[_0x439e8b([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x58ff65=>_0x58ff65[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x499f31[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x439e8b([0x6d,0x61,0x70])](_0x1e3232=>Array(_0x499f31[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1e3232[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x439e8b([0x66,0x69,0x6c,0x6c])](_0x1e3232[0x0]===_0x439e8b([0x2a])?_0x439e8b([0x2a]):'')[_0x439e8b([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1e3232))[_0x439e8b([0x73,0x6f,0x6d,0x65])](_0x2747a4=>_0x499f31[_0x439e8b([0x65,0x76,0x65,0x72,0x79])]((_0x38b9f,_0x33da62)=>_0x2747a4[_0x33da62]===_0x38b9f||_0x2747a4[_0x33da62]===_0x439e8b([0x2a])));}function _0x5718eb(){return _0x1d9775&&_0x302ac3?new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x4f2cb9,_0x223278)=>{_0x1d9775[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x4f2cb9,_0x223278),_0x302ac3[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x90a3b2=>{_0x90a3b2!=_0x439e8b([0x56,0x61,0x6c,0x69,0x64])&&_0x4f2cb9(_0x90a3b2);},_0x223278);}):_0x1d9775||_0x302ac3||_0x439e8b([0x56,0x61,0x6c,0x69,0x64]);}}function _0x306606(_0x188d23,_0x137044){return new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5011b7=>{if(_0x3ae157())return _0x5011b7(_0x439e8b([0x56,0x61,0x6c,0x69,0x64]));_0x2beac8(),_0x238c47[_0x439e8b([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x439e8b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3153a6=!0x1;const _0x3389f2=_0x3cd367();function _0x35de73(_0x138546){return!!_0x138546&&(typeof _0x138546===_0x439e8b([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x138546===_0x439e8b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x138546[_0x439e8b([0x74,0x68,0x65,0x6e])]===_0x439e8b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x138546[_0x439e8b([0x63,0x61,0x74,0x63,0x68])]===_0x439e8b([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x34f00e(_0x529dc8){_0x352b2a(_0x529dc8)[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x500231=>{if(!_0x500231||_0x500231[_0x439e8b([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x439e8b([0x6f,0x6b]))return _0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x7c9c83(_0xe48b0b(_0x3389f2+_0x137044))!=_0x500231[_0x439e8b([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x439e8b([0x56,0x61,0x6c,0x69,0x64]);})[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x28f598=>(_0x8ee64c(),_0x28f598),()=>{const _0x53d667=_0x4c2270();return null==_0x53d667?(_0x8ee64c(),_0x439e8b([0x56,0x61,0x6c,0x69,0x64])):_0x439e8b(_0x1f1888-_0x53d667>(0x11425299^_0x5c28c5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x5011b7)[_0x439e8b([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5011b7(_0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x390097=0x35783819^_0x5c28c5;function _0x8ee64c(){const _0x4e02dd=_0x439e8b([0x6c,0x6c,0x63,0x74,0x2d])+_0x7c9c83(_0xe48b0b(_0x188d23)),_0x48cc30=_0x5a8795(_0x7c9c83(window[_0x439e8b([0x4d,0x61,0x74,0x68])][_0x439e8b([0x63,0x65,0x69,0x6c])](_0x1f1888/_0x390097)));window[_0x439e8b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x439e8b([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x4e02dd,_0x48cc30);}function _0x4c2270(){const _0x411f10=_0x439e8b([0x6c,0x6c,0x63,0x74,0x2d])+_0x7c9c83(_0xe48b0b(_0x188d23)),_0x5744e1=window[_0x439e8b([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x439e8b([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x411f10);return _0x5744e1?window[_0x439e8b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5a8795(_0x5744e1),0x10)*_0x390097:null;}function _0x352b2a(_0xbbe22a){return new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x3490d0,_0x441bd5)=>{_0xbbe22a[_0x439e8b([0x74,0x68,0x65,0x6e])](_0x3490d0,_0x441bd5),window[_0x439e8b([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x441bd5,0x354f0259^_0x5c28c5);});}}_0x238c47[_0x439e8b([0x6f,0x6e])](_0x439e8b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x49ed52,_0x2093f9)=>{if(_0x2093f9[0x0]!=_0x188d23)return _0x5011b7(_0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x2093f9[0x1]={..._0x2093f9[0x1],[_0x439e8b([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x3389f2};},{[_0x439e8b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x439e8b([0x68,0x69,0x67,0x68])}),_0x238c47[_0x439e8b([0x6f,0x6e])](_0x439e8b([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x666ed3=>{_0x35de73(_0x666ed3[_0x439e8b([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3153a6=!0x0,_0x34f00e(_0x666ed3[_0x439e8b([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x439e8b([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x439e8b([0x6c,0x6f,0x77])}),_0x1648ca[_0x439e8b([0x74,0x68,0x65,0x6e])](()=>{_0x3153a6||_0x5011b7(_0x439e8b([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3ae157(){return _0x238c47[_0x439e8b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x439e8b([0x76,0x69,0x65,0x77])][_0x439e8b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x439e8b([0x61,0x75,0x74,0x6f]);}function _0x2beac8(){_0x238c47[_0x439e8b([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x439e8b([0x76,0x69,0x65,0x77])][_0x439e8b([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x439e8b([0x61,0x75,0x74,0x6f]);}}function _0xadbe43(_0x2652ad){const _0x548740=[new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x681d77=>setTimeout(_0x681d77,0x3547e855^_0x5c28c5)),_0x1648ca[_0x439e8b([0x74,0x68,0x65,0x6e])](()=>new window[(_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x20d6e1=>{let _0x34d93b=0x0;_0x238c47[_0x439e8b([0x6d,0x6f,0x64,0x65,0x6c])][_0x439e8b([0x6f,0x6e])](_0x439e8b([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4edf22,_0x5024e3)=>{_0x5024e3[0x0][_0x439e8b([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x34d93b++,_0x34d93b==(0x354ed761^_0x5c28c5)&&(_0x20d6e1(),_0x4edf22[_0x439e8b([0x6f,0x66,0x66])]());});}))];return window[_0x439e8b([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x439e8b([0x72,0x61,0x63,0x65])](_0x548740)[_0x439e8b([0x74,0x68,0x65,0x6e])](()=>_0x2652ad);}async function _0x1c866c(){await _0x1648ca,_0x238c47[_0x439e8b([0x6d,0x6f,0x64,0x65,0x6c])][_0x439e8b([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xeb43f9,_0x238c47[_0x439e8b([0x6d,0x6f,0x64,0x65,0x6c])][_0x439e8b([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xeb43f9,_0x238c47[_0x439e8b([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x439e8b([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x338090(){return _0x2b203e(_0x439e8b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x418b5c(_0x439e8b([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x439e8b([0x73,0x74,0x61,0x74,0x65])]==_0x439e8b([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x3610fb(){return _0x2b203e(_0x439e8b([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 _0x7e089f(){return _0x2b203e(_0x439e8b([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x129edf(_0x236d98){const _0x431a6d=_0x3d0ef7();_0x238c47[_0x431a6d]=_0x439e8b([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x236d98,_0x236d98!=_0x439e8b([0x56,0x61,0x6c,0x69,0x64])&&_0x1c866c();}function _0x3d0ef7(){const _0x4960ed=window[_0x439e8b([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x439e8b([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x439e8b([0x6e,0x6f,0x77])]())[_0x439e8b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x439e8b([0x2e]),'');let _0x21c9ba=_0x439e8b([0x53]);for(let _0x57043e=0x0;_0x57043e<_0x4960ed[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x57043e+=0x2){let _0x56d9df=window[_0x439e8b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x4960ed[_0x439e8b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x57043e,_0x57043e+0x2));_0x56d9df>=_0x2c3d87[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x56d9df-=_0x2c3d87[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x21c9ba+=_0x2c3d87[_0x56d9df];}return _0x21c9ba;}function _0x44c799(){const _0x1387e3=_0xcbe886[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])](_0x439e8b([0x2e]));if(0x3!=_0x1387e3[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x2fc227(_0x1387e3[0x1]);function _0x2fc227(_0x4fb2cd){const _0x3bb089=_0x48c731(_0x4fb2cd);return _0x3bb089&&_0x3f9099()?_0x3bb089:null;function _0x3f9099(){const _0x3ba348=_0x3bb089[_0x439e8b([0x6a,0x74,0x69])],_0x424673=window[_0x439e8b([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3ba348[_0x439e8b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3ba348[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x215f14={..._0x3bb089,[_0x439e8b([0x6a,0x74,0x69])]:_0x3ba348[_0x439e8b([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3ba348[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x215f14[_0x439e8b([0x76,0x63])],_0xe48b0b(_0x215f14)==_0x424673;}}}async function _0x571d69(){let _0x3d891c=!0x0;try{const _0x45b2a7=_0xcbe886[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])](_0x439e8b([0x2e])),[_0x1a9b95,_0xc724fd,_0x3a450b]=_0x45b2a7;return _0x3074a7(_0x1a9b95),await _0x3e1e7b(_0x1a9b95,_0xc724fd,_0x3a450b),_0x3d891c;}catch{return!0x1;}function _0x3074a7(_0x25fa44){const _0x9d1083=_0x48c731(_0x25fa44);_0x9d1083&&_0x9d1083[_0x439e8b([0x61,0x6c,0x67])]==_0x439e8b([0x45,0x53,0x32,0x35,0x36])||(_0x3d891c=!0x1);}async function _0x3e1e7b(_0x20b9ec,_0x4f83ff,_0x1e4a4f){const _0x2c546c=window[_0x439e8b([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x439e8b([0x66,0x72,0x6f,0x6d])](_0x4a763e(_0x1e4a4f),_0x3107ce=>_0x3107ce[_0x439e8b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1e8d10=new window[(_0x439e8b([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x439e8b([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x20b9ec+_0x439e8b([0x2e])+_0x4f83ff),_0xb03ee4=window[_0x439e8b([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x439e8b([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xb03ee4)return;const _0x40364f=await _0xb03ee4[_0x439e8b([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x439e8b([0x6a,0x77,0x6b]),_0x6809eb,{[_0x439e8b([0x6e,0x61,0x6d,0x65])]:_0x439e8b([0x45,0x43,0x44,0x53,0x41]),[_0x439e8b([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x439e8b([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x439e8b([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xb03ee4[_0x439e8b([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x439e8b([0x6e,0x61,0x6d,0x65])]:_0x439e8b([0x45,0x43,0x44,0x53,0x41]),[_0x439e8b([0x68,0x61,0x73,0x68])]:{[_0x439e8b([0x6e,0x61,0x6d,0x65])]:_0x439e8b([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x40364f,_0x2c546c,_0x1e8d10)||(_0x3d891c=!0x1);}}function _0x48c731(_0x2c9f58){return _0x2c9f58[_0x439e8b([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x439e8b([0x65,0x79]))?JSON[_0x439e8b([0x70,0x61,0x72,0x73,0x65])](_0x4a763e(_0x2c9f58)):null;}function _0x4a763e(_0x3ad52d){return window[_0x439e8b([0x61,0x74,0x6f,0x62])](_0x3ad52d[_0x439e8b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x439e8b([0x2b]))[_0x439e8b([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x439e8b([0x2f])));}function _0xe48b0b(_0x462cb7){let _0x273a61=0x1505;function _0x3b23cd(_0x1300bb){for(let _0x194bad=0x0;_0x194bad<_0x1300bb[_0x439e8b([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x194bad++){const _0x353843=_0x1300bb[_0x439e8b([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x194bad);_0x273a61=(_0x273a61<<0x5)+_0x273a61+_0x353843,_0x273a61&=_0x273a61;}}function _0x357087(_0x3f14db){Array[_0x439e8b([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x3f14db)?_0x3f14db[_0x439e8b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x357087):_0x3f14db&&typeof _0x3f14db==_0x439e8b([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x439e8b([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x3f14db)[_0x439e8b([0x73,0x6f,0x72,0x74])]()[_0x439e8b([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x36af1d,_0x387403])=>{_0x3b23cd(_0x36af1d),_0x357087(_0x387403);}):_0x3b23cd(window[_0x439e8b([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x3f14db));}return _0x357087(_0x462cb7),_0x273a61>>>0x0;}function _0x7c9c83(_0x468878){return _0x468878[_0x439e8b([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x439e8b([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x439e8b([0x30]));}function _0x5a8795(_0x10b532){return _0x10b532[_0x439e8b([0x73,0x70,0x6c,0x69,0x74])]('')[_0x439e8b([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x439e8b([0x6a,0x6f,0x69,0x6e])]('');}function _0x2b203e(_0x3b7c9d){return _0x238c47[_0x439e8b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x439e8b([0x68,0x61,0x73])](_0x3b7c9d);}function _0x418b5c(_0x19bffd){return _0x238c47[_0x439e8b([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x439e8b([0x67,0x65,0x74])](_0x19bffd);}function _0xeb43f9(){}function _0x439e8b(_0x3072b1){return _0x3072b1['map'](_0x3a2791=>String['fromCharCode'](_0x3a2791))['join']('');}_0x129edf(await _0x37e263());}(this);}['destroy'](){const _0x1f5a12=this['editor']['plugins']['get'](o),_0x1120d7=this['editor']['config']['get']('collaboration.channelId');for(const _0x1782af of _0x1f5a12['getCommentThreads']({'channelId':_0x1120d7}))_0x1f5a12['_detachCommentThread'](_0x1782af['id']),_0x1f5a12['_threads']['delete'](_0x1782af['id']);super['destroy']();}['hasMarkerForId'](_0x32aad0){return this['getAllMarkersForId'](_0x32aad0)['length']>0x0;}['getAllMarkersForId'](_0x5e9d17){const _0x4589b5=[];for(const _0x51914e of this['editor']['model']['markers'])_0x51914e['name']['startsWith']('comment:'+_0x5e9d17)&&_0x4589b5['push'](_0x51914e);return _0x4589b5;}['scrollToThreadMarker'](_0x534891){setTimeout(()=>{const _0x2790dd=this['_getTargetForId'](_0x534891);if(!_0x2790dd)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x534891&&nt({'target':_0x2790dd[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x281c79){this['editor']['model']['change'](()=>{for(const _0x6ddcb0 of this['getAllMarkersForId'](_0x281c79))this['editor']['editing']['reconvertMarker'](_0x6ddcb0);});}['_attachArchivedThread'](_0x3cfe16){const _0x5e0ee2=this['editor']['plugins']['get'](o),_0x59b481=this['editor']['plugins']['get'](b),_0xacdf97=_0x5e0ee2['getCommentThread'](_0x3cfe16);if(!_0xacdf97['isAttached']){const _0x22f1b9=_0xacdf97['attachTo'](()=>this['_getTargetForId'](_0xacdf97['id']));_0x59b481['registerAnnotation'](_0x22f1b9),_0xacdf97['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x14c728=this['editor'],_0xc7f860=_0x14c728['plugins']['get'](it);_0x14c728['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xb79d05,_0x5b6e7f)=>{const {id:_0x566ebd}=er(_0xb79d05['markerName']),_0xa4064a=_0x14c728['plugins']['get'](o)['getCommentThread'](_0x566ebd),_0x12d3d8=this['activeMarker']&&er(this['activeMarker'])['id']===_0x566ebd;let _0x34388c;if(_0xa4064a&&_0xa4064a['isResolved']&&!_0x12d3d8&&_0xb79d05['item'])return _0x5b6e7f['consumable']['consume'](_0xb79d05['item'],'addMarker:'+_0xb79d05['markerName']),_0x5b6e7f['consumable']['consume'](_0xb79d05['item'],'removeMarker:'+_0xb79d05['markerName']),null;const _0xcc98c2=['ck-comment-marker'];return _0x12d3d8&&_0xcc98c2['push']('ck-comment-marker--active'),_0x34388c=_0xa4064a?.['length']?_0xa4064a['comments']['first']['author']['id']:_0xc7f860['me']['id'],{'classes':_0xcc98c2,'attributes':{'data-comment':_0x566ebd,'data-author-id':_0x34388c}};}}),_0x14c728['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x1d010c,{options:_0x31909e})=>{if(_0x31909e['showCommentHighlights'])return null;const _0x24f6e9=_0x14c728['plugins']['get'](o),_0x202a0e=_0x14c728['model']['markers']['get'](_0x1d010c),{id:_0x30191b,part:_0x274866}=er(_0x1d010c);return _0x202a0e&&!_0x202a0e['affectsData']||_0x31909e['ignoreResolvedComments']&&_0x24f6e9['getCommentThread'](_0x30191b)?.['isResolved']?null:{'group':'comment','name':_0x274866?_0x30191b+':'+_0x274866:_0x30191b};}}),_0x14c728['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x208530,{writer:_0x279ef2})=>_0x279ef2['createElement']('$marker',{'data-name':'comment:'+_0x208530['getAttribute']('id')})}),_0x14c728['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x591bf7=this['editor'],_0x2f6d0a=_0x591bf7['plugins']['get'](o),_0x1ffe57=new Set(),_0x327eea=new Set();_0x591bf7['model']['document']['registerPostFixer'](_0x3156cd=>{let _0x34fa33=!0x1;for(const {name:_0x3d1cfc,data:_0x1ef418}of _0x591bf7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3d83d3,id:_0xe2dad3}=er(_0x3d1cfc);let _0x401b25=_0x1ef418['newRange'];if('comment'!==_0x3d83d3||!_0x401b25)continue;const _0x32b65e='$graveyard'===_0x401b25['root']['rootName'];_0x32b65e||(_0x401b25=dt(_0x401b25,_0x591bf7['model']),!_0x401b25||_0x401b25['isCollapsed']||!_0x1ef418['newRange']||_0x401b25['isEqual'](_0x1ef418['newRange']))?_0x591bf7['model']['hasContent'](_0x401b25)&&!_0x32b65e?this['isThreadsLoadingPaused']?_0x1ffe57['add'](_0x3d1cfc):this['_handleThreadMarker'](_0x3d1cfc,_0xe2dad3):(_0x327eea['add'](_0x3d1cfc),_0x1ffe57['delete'](_0x3d1cfc),_0x3156cd['removeMarker'](_0x3d1cfc),_0x34fa33=!0x0):(_0x3156cd['updateMarker'](_0x3d1cfc,{'range':_0x401b25}),_0x34fa33=!0x0);}return _0x34fa33;}),this['on']('change:isThreadsLoadingPaused',(_0x597743,_0x59e09b,_0x35c528)=>{if(!_0x35c528&&_0x1ffe57['size'])for(const _0x26e354 of _0x1ffe57){const {id:_0x5a60f5}=er(_0x26e354);_0x1ffe57['delete'](_0x26e354),_0x591bf7['model']['markers']['get'](_0x26e354)&&this['_handleThreadMarker'](_0x26e354,_0x5a60f5);}}),this['listenTo'](_0x591bf7['model']['document'],'change',()=>{for(const {name:_0x2e2358,data:{newRange:_0x9ef290}}of _0x591bf7['model']['document']['differ']['getChangedMarkers']()){const {group:_0x784937,id:_0xfc600c}=er(_0x2e2358);if('comment'!==_0x784937)continue;const _0x2a5424=_0x2f6d0a['getCommentThread'](_0xfc600c),_0x4c94e0=this['hasMarkerForId'](_0xfc600c);_0x2a5424&&(!_0x2a5424['_hasTargetInContent']&&_0x9ef290&&_0x591bf7['editing']['view']['once']('render',()=>{const _0x5a85a3=_0x591bf7['plugins']['get'](y),_0x26e5fa=_0x2f6d0a['_threadToController']['get'](_0x2a5424)['view'];_0x5a85a3['getByInnerView'](_0x26e5fa)['refreshVisibility']();},{'priority':'low'}),_0x2a5424['_hasTargetInContent']=_0x4c94e0||!!_0x9ef290),_0x9ef290||(_0x327eea['add'](_0x2e2358),_0x1ffe57['delete'](_0x2e2358));}for(const _0x42f622 of _0x327eea){const {id:_0x3e7300}=er(_0x42f622),_0x588191=_0x2f6d0a['getCommentThread'](_0x3e7300);if(_0x1ffe57['delete'](_0x42f622),!_0x588191)continue;const _0x54d73f=this['hasMarkerForId'](_0x3e7300);_0x54d73f||_0x588191['isSubmitted']?_0x54d73f||_0x588191['unlinkedAt']||_0x588191['setUnlinkedAt'](new Date()):_0x588191['remove']();}_0x327eea['clear']();});}['_handleInitialThreads'](_0xdea3cf){_0xdea3cf['forEach'](_0x2220e2=>{_0x2220e2['unlinkedAt']&&this['_attachArchivedThread'](_0x2220e2['id']);});}['_getTargetForId'](_0x2a5e62){const _0x35faa8=this['editor'],_0xb60a8a=this['getAllMarkersForId'](_0x2a5e62);return et(_0x35faa8['editing'],_0xb60a8a);}['_getTextContext'](_0x438a7c){const _0x39b0e9=this['getAllMarkersForId'](_0x438a7c);let _0x344e5a='',_0x5525a0=!0x1;for(const _0x1e801f of _0x39b0e9){const _0xc8ef80=_0x1e801f['getRange']();for(const _0x461c11 of Array['from'](_0xc8ef80['getItems']()))_0x461c11['is']('$textProxy')?(_0x344e5a&&_0x5525a0&&(_0x344e5a+='\x20',_0x5525a0=!0x1),_0x344e5a+=_0x461c11['data']):_0x5525a0=!0x0;_0x5525a0=!0x0;}return _0x344e5a['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3712ab,_0x382054){const _0x3259bc=this['editor'],_0x5bb5dc=_0x3259bc['plugins']['get'](o);let _0x4fc140=_0x5bb5dc['getCommentThread'](_0x382054);const _0x6dee2f=_0x3259bc['config']['get']('collaboration.channelId'),_0x1ae778=_0x3259bc['plugins']['get'](b);if(_0x4fc140&&(_0x4fc140['unlinkedAt']&&_0x4fc140['setUnlinkedAt'](null),_0x4fc140['isAttached']))return _0x4fc140;return!this['getAllMarkersForId'](_0x382054)[0x0]['managedUsingOperations']?_0x3259bc['editing']['view']['once']('render',()=>{if(_0x5bb5dc['getCommentThread'](_0x382054))return;const _0x55016f=_0x3259bc['plugins']['get'](y);_0x4fc140=_0x5bb5dc['openNewCommentThread']({'channelId':_0x6dee2f,'threadId':_0x382054,'target':()=>this['_getTargetForId'](_0x382054),'context':{'type':'text','value':this['_getTextContext'](_0x382054)}});const _0x105bb2=_0x5bb5dc['_threadToController']['get'](_0x4fc140)['view'],_0xc1f15=_0x55016f['getByInnerView'](_0x105bb2);_0xc1f15&&_0x1ae778['registerAnnotation'](_0xc1f15);},{'priority':'low'}):_0x5bb5dc['fetchCommentThread']({'channelId':_0x6dee2f,'threadId':_0x382054})['then'](_0x20c386=>{if('destroyed'!==_0x3259bc['state']){if(_0x4fc140=_0x20c386,_0x4fc140&&!_0x4fc140['isAttached']){const _0x59f250=_0x4fc140['attachTo'](()=>this['_getTargetForId'](_0x382054));_0x1ae778['registerAnnotation'](_0x59f250),_0x4fc140['isResolved']&&this['_reconvertMarkers'](_0x382054);}else{if(!_0x4fc140){const _0x2af15d=this['getAllMarkersForId'](_0x382054);_0x3259bc['model']['change'](_0x15019b=>{for(const _0x88c51c of _0x2af15d)_0x15019b['removeMarker'](_0x88c51c);});}}}}),_0x4fc140;}['_handleThreadMarker'](_0xd72e09,_0x43e13c){const _0x4c3aba=this['_attachMarkerToThread'](_0xd72e09,_0x43e13c);_0x4c3aba&&!_0x4c3aba['context']&&_0x4c3aba['setContext']({'type':'text','value':this['_getTextContext'](_0x43e13c)});}['_initAriaMarkerChangeAnnouncements'](){const _0x629267=this['editor'];ot(_0x629267['model'],({left:_0x519eab,entered:_0x24f47f})=>{for(const _0x5319ec of _0x519eab)if(mt(_0x5319ec)){_0x629267['ui']['ariaLiveAnnouncer']['announce'](N(_0x629267['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x494bd3 of _0x24f47f)if(mt(_0x494bd3)){_0x629267['ui']['ariaLiveAnnouncer']['announce'](N(_0x629267['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x29ad06)));break;}});}}function ft(_0xc4d28,_0x3da5c7){return _0x3da5c7?_0xc4d28+':'+_0x3da5c7:_0xc4d28;}function er(_0x5285c4){const _0x4cd670=_0x5285c4['split'](':');return{'group':_0x4cd670[0x0],'id':_0x4cd670[0x1],'part':_0x4cd670[0x2]};}function dt(_0x1e12a2,_0x2860cc){const _0xe74342=_0x2860cc['schema'],_0x165b3c=_0x2860cc['createRange'](_0x1e12a2['start']);for(const _0x2d8dde of _0x1e12a2['getWalker']()){const {type:_0x3d9a73,item:_0x3c2853,nextPosition:_0x8e58bc}=_0x2d8dde;if('text'===_0x3d9a73||_0xe74342['isObject'](_0x3c2853)){const _0x1b6df0=_0x2860cc['createPositionBefore'](_0x3c2853);_0x165b3c['isCollapsed']&&(_0x165b3c['start']=_0x1b6df0),_0x165b3c['end']=_0x8e58bc;}}return _0x165b3c;}function mt(_0x33af7d){return'comment'===er(_0x33af7d['name'])['group'];}class s extends _0x329b6e{['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 _0x236b41=this['editor'],_0x206469=_0x236b41['plugins']['get'](o),_0x139280=_0x236b41['plugins']['get'](r),_0x151eb2=_0x236b41['plugins']['get'](y),_0xa0653f=_0x236b41['plugins']['get'](b);_0x236b41['ui']['componentFactory']['add']('comment',()=>{const _0x30e4ea=this['_createUIButton'](_0x488b97);return _0x30e4ea['tooltip']=!0x0,_0x30e4ea;}),_0x236b41['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5d24e6)),_0xa0653f['addSourceCollector'](()=>{const _0x261a00=[];for(const [_0x350ac6,_0x5117c3]of _0x206469['_threadToController']){const _0x9af5f7=_0x139280['getAllMarkersForId'](_0x350ac6['id']),_0x29fca7=_0x9af5f7['map'](_0x4095ab=>_0x4095ab['getRange']());_0x9af5f7['length']>0x0&&_0x261a00['push']([_0x5117c3['view'],_0x29fca7]);}return _0x261a00;}),this['listenTo'](_0x151eb2,'change:activeAnnotations',(_0x2ded52,_0x127bfa,_0x3743cd)=>{const _0x5410e8=Array['from'](_0x3743cd)['map'](_0xea8e40=>_0xea8e40['innerView'])['find'](_0x20d86e=>_0x206469['_viewToController']['has'](_0x20d86e));if(!_0x5410e8)return void(_0x139280['activeMarker']=null);const _0x5e63e1=_0x206469['_viewToController']['get'](_0x5410e8)['model']['id'],_0x50d82e='comment:'+_0x5e63e1;_0x5e63e1&&_0x139280['hasMarkerForId'](_0x5e63e1)?_0x139280['activeMarker']=_0x50d82e:_0x139280['activeMarker']&&(_0x139280['activeMarker']=null);}),this['listenTo'](_0x206469,'removeCommentThread',(_0x1ece46,{threadId:_0x33009a,isFromAdapter:_0x10250c})=>{!_0x10250c&&_0x236b41['ui']['focusTracker']['isFocused']&&_0x139280['hasMarkerForId'](_0x33009a)&&_0x236b41['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x206469,'addComment',(_0x20a1ec,{threadId:_0x414be9,isFromAdapter:_0x3a2c75})=>{if(_0x3a2c75||!_0x139280['hasMarkerForId'](_0x414be9)||!_0x206469['hasCommentThread'](_0x414be9))return;0x1===_0x206469['getCommentThread'](_0x414be9)['length']&&(_0x236b41['editing']['view']['focus'](),_0x20a1ec['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x67897b=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x48fad4;for(const _0x24f8db in _0x67897b){const _0x3b1851=_0x24f8db,_0x137013=_0x67897b[_0x3b1851];if('commentsLicenseKeyValid'==_0x137013||'commentsLicenseKeyInvalid'==_0x137013||'commentsLicenseKeyExpired'==_0x137013||'commentsLicenseKeyDomainLimit'==_0x137013||'commentsLicenseKeyNotAllowed'==_0x137013||'commentsLicenseKeyEvaluationLimit'==_0x137013||'commentsLicenseKeyTrialLimit'==_0x137013||'commentsLicenseKeyUsageLimit'==_0x137013){delete _0x67897b[_0x3b1851],_0x48fad4=_0x137013,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x48fad4&&_0x67897b['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x48fad4&&_0x67897b['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x48fad4&&_0x67897b['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x48fad4&&_0x67897b['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x48fad4&&_0x67897b['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x48fad4&&_0x67897b['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x48fad4&&_0x67897b['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x2beaab){const _0x2e4043=this['editor'],_0x30b8f2=new _0x2beaab(_0x2e4043['locale']),_0x5d71c6=_0x2e4043['commands']['get']('addCommentThread');return _0x30b8f2['set']({'label':N(_0x2e4043['locale'],'Comment'),'icon':_0x2c05f7}),_0x30b8f2['bind']('isEnabled')['to'](_0x5d71c6,'hasContent'),this['listenTo'](_0x30b8f2,'execute',()=>{_0x5d71c6['execute']();}),_0x30b8f2;}}class i extends _0x329b6e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2fc8b3){super(_0x2fc8b3),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x538587,_0xd6eb65,_0x1ac4a6)=>{_0x1ac4a6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1a0f3c,_0x262342]of this['editor']['commands'])_0x262342['affectsData']&&'addCommentThread'!==_0x1a0f3c&&_0x262342['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 _0x1febe2=this['editor']['editing']['view']['document'];this['listenTo'](_0x1febe2,'cut',_0x55455d=>_0x55455d['stop'](),{'priority':'highest'}),this['listenTo'](_0x1febe2,'clipboardInput',_0x5b1de2=>_0x5b1de2['stop'](),{'priority':'highest'}),this['listenTo'](_0x1febe2,'delete',_0x51fde8=>_0x51fde8['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x8d0c57,_0x4caf99]of this['editor']['commands'])_0x4caf99['affectsData']&&'addCommentThread'!==_0x8d0c57&&_0x4caf99['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 _0x2ec86c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2c9a33){super(_0x2c9a33),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0xba4ebb=this['context']['plugins']['get'](y);this['listenTo'](_0xba4ebb,'_activateAnnotation',(_0x3cebde,_0x295be2)=>{for(const _0x3acefd of this['activeUIs']){const _0x572b5b=this['_uis']['get'](_0x3acefd);(0x0,this['uisData']['get'](_0x3acefd)['filter'])(_0x295be2)&&_0x572b5b['setActiveAnnotation'](_0x295be2);}}),this['listenTo'](_0xba4ebb,'_deactivateAllAnnotations',()=>{for(const _0x35d4cc of this['activeUIs']){this['_uis']['get'](_0x35d4cc)['setActiveAnnotation'](null);}}),this['listenTo'](_0xba4ebb['_visibleAnnotations'],'add',(_0x1660a1,_0xf10d0a)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xf10d0a);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x2d023c){return this['activeUIs']['has'](_0x2d023c);}['activate'](_0x284d0e,_0xea115b=this['defaultFilter']){const _0x30c3b8=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x284d0e))throw new _0x347fe4('annotationsuis-missing-ui',this,{'uiName':_0x284d0e});this['isActive'](_0x284d0e)&&this['deactivate'](_0x284d0e),this['activeUIs']['add'](_0x284d0e);const _0x4108bf=new S();v({'source':_0x30c3b8['_visibleAnnotations'],'target':_0x4108bf,'filter':_0xea115b}),this['uisData']['set'](_0x284d0e,{'collection':_0x4108bf,'filter':_0xea115b});const _0x5bee50=this['_uis']['get'](_0x284d0e);_0x5bee50['attach'](_0x4108bf),this['listenTo'](_0x5bee50,'change:activeAnnotation',(_0x4a12f8,_0x255796,_0x123fb0,_0x466067)=>{_0x466067&&_0x30c3b8['_removeActiveAnnotation'](_0x466067),_0x123fb0&&_0x30c3b8['_addActiveAnnotation'](_0x123fb0);});}['deactivate'](_0x39b46e){if(this['activeUIs']['delete'](_0x39b46e),!this['_uis']['has'](_0x39b46e))throw new _0x347fe4('annotationsuis-missing-ui',this,{'uiName':_0x39b46e});const _0x15db55=this['_uis']['get'](_0x39b46e);_0x15db55['detach'](),this['stopListening'](_0x15db55),this['uisData']['get'](_0x39b46e)['collection']['destroy'](),this['uisData']['delete'](_0x39b46e);}['switchTo'](_0x339a24){if(!this['_uis']['has'](_0x339a24))throw new _0x347fe4('annotationsuis-missing-ui',this,{'uiName':_0x339a24});const _0x2ffa74=this['context']['plugins']['get'](y),_0x40ef06=Array['from'](_0x2ffa74['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x339a24);const _0x5bd871=this['_uis']['get'](_0x339a24);_0x5bd871['setActiveAnnotation'](_0x40ef06),_0x5bd871['_setSelectedAnnotations']&&_0x40ef06&&_0x5bd871['_setSelectedAnnotations']([_0x40ef06]);}['deactivateAll'](){for(const _0x3fea3d of this['activeUIs'])this['deactivate'](_0x3fea3d);}['register'](_0x3d2a1d,_0x24eaa8){if(this['_uis']['has'](_0x3d2a1d))throw new _0x347fe4('annotationsuis-register-already-registered');if('function'!=typeof _0x24eaa8['attach']||'function'!=typeof _0x24eaa8['detach']||'function'!=typeof _0x24eaa8['setActiveAnnotation'])throw new _0x347fe4('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x3d2a1d,_0x24eaa8);}['refilterAnnotations'](){const _0x2b4427=this['context']['plugins']['get'](y)['collection'],_0x39ac13=new Map(),_0x34e5e8=Array['from'](this['activeUIs']);for(const _0x1891fd of this['activeUIs']){const _0x1ac84e=this['uisData']['get'](_0x1891fd)['collection'];for(const _0x1b7617 of _0x1ac84e)_0x39ac13['set'](_0x1b7617,_0x1891fd);}for(const _0x28d751 of _0x2b4427){const _0x12f709=_0x39ac13['get'](_0x28d751);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x28d751);const _0x3b5d99=_0x34e5e8['find'](_0x545d60=>this['uisData']['get'](_0x545d60)['filter'](_0x28d751));_0x12f709!==_0x3b5d99&&(_0x12f709&&this['uisData']['get'](_0x12f709)['collection']['remove'](_0x28d751),_0x3b5d99&&this['uisData']['get'](_0x3b5d99)['collection']['add'](_0x28d751));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x4b2b9e){const _0x157417=[];for(const _0x3d8ac4 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3d8ac4)['filter'])(_0x4b2b9e)&&_0x157417['push'](_0x3d8ac4);}if(_0x157417['length']>0x1)throw new _0x347fe4('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x157417,'annotationType':_0x4b2b9e['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(_0x595169){super(_0x595169),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x155752,_0x2b9ba4)=>_0x155752+_0x2b9ba4),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x8d4df6=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x8d4df6['to']('isAnimationDisabled',_0x3047d2=>_0x3047d2?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x8d4df6['to']('top',_0x41dd16=>Ot(_0x41dd16))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x469196=this['element']['clientHeight'];_0x469196&&(this['height']=_0x469196);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2ec86c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x505764){super(_0x505764),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 _0x3052cc=this['context']['config']['get']('sidebar.container');_0x3052cc&&this['setContainer'](_0x3052cc);}['setContainer'](_0x3cb52b){if(!g(_0x3cb52b))throw new _0x347fe4('sidebar-setcontainer-invalid-element');this['container']=_0x3cb52b;}['_attachToContainer']({viewClass:_0x542e45='',spaceBetweenItems:_0x125340=0x19}={}){if(!g(this['container']))throw new _0x347fe4('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x542e45,this['_spaceBetweenItems']=_0x125340;}['rearrange']({removedAnnotation:_0x482e39,previousAnnotation:_0x2be9f5,nextAnnotation:_0x247b5e}){const _0x59a210=this['getSidebarItemView'](_0x482e39);this['view']['list']['remove'](_0x59a210),this['_destroySidebarItemView'](_0x482e39),_0x2be9f5&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x2be9f5)),_0x247b5e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x247b5e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x259b2f,activatedAnnotation:_0x43d7d0,disableAnimationOnActivatedAnnotation:_0x36cf45}){if(this['_activeAnnotation']=_0x43d7d0,_0x259b2f){_0x259b2f['isActive']=!0x1;const _0x3adb2e=this['getSidebarItemView'](_0x259b2f);_0x3adb2e&&_0x36cf45&&(_0x3adb2e['isAnimationDisabled']=!0x1);}if(_0x43d7d0){const _0x144fb5=this['getSidebarItemView'](_0x43d7d0);_0x144fb5&&(_0x43d7d0['isActive']=!0x0,_0x36cf45&&(_0x144fb5['isAnimationDisabled']=!0x0,_0x144fb5['top']+=0x1),this['_alignToTargetRect'](_0x144fb5));}}['_detachFromContainer'](_0x3530ba){if(this['view']['element']['remove'](),_0x3530ba){for(const _0x414588 of _0x3530ba)this['_destroySidebarItemView'](_0x414588);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x42a2d7,_0x301bfd){_0x301bfd||(_0x301bfd=_0x42a2d7['view']);const _0x321936=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x321936,_0x42a2d7),this['_annotationToSidebarItemView']['set'](_0x42a2d7,_0x321936),_0x321936['content']['add'](_0x301bfd),this['listenTo'](_0x42a2d7['view'],'change:targetRect',(_0x335eeb,_0x131a14,_0xaa3ee0)=>{const _0x5038a7=this['_getTargetTop'](_0x42a2d7,_0xaa3ee0);_0x321936['_targetTop']!=_0x5038a7&&(_0x321936['_targetTop']=_0x5038a7,this['_setItemTop'](_0x321936,_0x5038a7));}),this['listenTo'](_0x321936,'change:top',()=>{this['_recalculate'](_0x321936,'top');}),this['listenTo'](_0x321936,'change:bottom',()=>{this['_recalculate'](_0x321936,'bottom');}),this['_alignToTargetRect'](_0x321936);const _0x171830=this['_getItemBefore'](_0x321936);if(_0x171830)this['_alignAfterItem'](_0x171830,_0x321936)||this['_alignToTargetRect'](_0x321936);else this['_alignToTargetRect'](_0x321936);return this['_updateLastItem'](),this['view']['list']['add'](_0x321936),_0x321936;}['_alignForTopChange'](_0x47e5d3){if(!_0x47e5d3['content']['length'])return;const _0x27c243=this['_getItemBefore'](_0x47e5d3);if(!_0x27c243)return;const _0x294dba=this['_sidebarItemViewToAnnotation']['get'](_0x27c243),_0xd28903=this['_activeAnnotation'];_0xd28903&&_0xd28903===_0x294dba?this['_alignAfterItem'](_0x27c243,_0x47e5d3):this['_alignBeforeItem'](_0x47e5d3,_0x27c243);}['_alignForBottomChange'](_0x548c27){if(!_0x548c27['content']['length'])return;const _0x905799=this['_getItemAfter'](_0x548c27);if(!_0x905799)return;const _0x2bc314=this['_sidebarItemViewToAnnotation']['get'](_0x905799),_0x1e3a2f=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3293cb=this['_activeAnnotation'];_0x3293cb&&_0x3293cb===_0x2bc314&&_0x1e3a2f?(this['_alignBeforeItem'](_0x905799,_0x548c27),this['_alignAfterItem'](_0x548c27,_0x905799)):_0x3293cb&&_0x3293cb===_0x2bc314?this['_alignBeforeItem'](_0x905799,_0x548c27):this['_alignAfterItem'](_0x548c27,_0x905799);}['_recalculate'](_0x468312,_0x11bbfc){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x18bdad,changedProp:_0x9c5afc}of this['_recalculateBuffer'])'top'===_0x9c5afc?this['_alignForTopChange'](_0x18bdad):this['_alignForBottomChange'](_0x18bdad);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x468312,'changedProp':_0x11bbfc});}['getSidebarItemView'](_0x2c295f){return this['_annotationToSidebarItemView']['get'](_0x2c295f);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x22b5ef){const _0x235cf9=this['getSidebarItemView'](_0x22b5ef);this['stopListening'](_0x235cf9),this['stopListening'](_0x22b5ef['view']),_0x235cf9['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x22b5ef),this['_sidebarItemViewToAnnotation']['delete'](_0x235cf9);}['_createSidebarView'](){const _0x1440be=new H(this['context']['locale']);return _0x1440be['render'](),this['on']('change:_lastItem',(_0x4b7b19,_0x3ac2aa,_0x152cc0,_0x2b9b8b)=>{_0x2b9b8b&&_0x1440be['unbind']('minHeight'),_0x152cc0?_0x1440be['bind']('minHeight')['to'](_0x152cc0,'bottom'):_0x1440be['minHeight']=null;}),_0x1440be;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x32ab15){const _0x283e6b=this['_sidebarItemViewToAnnotation']['get'](_0x32ab15),_0x5935a8=_0x283e6b&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x283e6b)-0x1);return _0x5935a8&&this['getSidebarItemView'](_0x5935a8)||null;}['_getItemAfter'](_0x240c1b){const _0x367ae4=this['_sidebarItemViewToAnnotation']['get'](_0x240c1b),_0x2da69a=_0x367ae4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x367ae4)+0x1);return _0x2da69a&&this['getSidebarItemView'](_0x2da69a)||null;}['_alignBeforeItem'](_0x436441,_0x351249){_0x436441['updateHeight']();const _0x45bd0a=G(_0x351249['bottom']+this['_spaceBetweenItems'],_0x436441['top']);return!!_0x45bd0a&&(this['_setItemTop'](_0x351249,_0x351249['top']-_0x45bd0a),!0x0);}['_alignAfterItem'](_0x399ee7,_0x88e38f){_0x399ee7['updateHeight']();const _0x2f26c7=G(_0x399ee7['bottom']+this['_spaceBetweenItems'],_0x88e38f['top']);return!!_0x2f26c7&&(this['_setItemTop'](_0x88e38f,_0x88e38f['top']+_0x2f26c7,!0x1),!0x0);}['_alignToTargetRect'](_0x43b968){const _0x4da82a=this['_sidebarItemViewToAnnotation']['get'](_0x43b968);if(!_0x4da82a||!_0x4da82a['target']||!_0x4da82a['targetRect'])return;const _0xca05a7=this['_getTargetTop'](_0x4da82a,_0x4da82a['targetRect']);this['_setItemTop'](_0x43b968,_0xca05a7);}['_getTargetTop'](_0x56a7ca,_0x3b7b19){if(null===_0x3b7b19)return 0x0;if(_0x56a7ca['target']instanceof _0x81943)return _0x3b7b19['top'];{const _0x33bd32=new _0x81943(this['view']['element'])['top'];return _0x3b7b19['top']-_0x33bd32;}}['_setItemTop'](_0x379047,_0x244dec,_0x1301a4=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1301a4&&(_0x244dec=Math['max'](_0x244dec,this['_getMaxAvailableTop'](_0x379047))),_0x379047['top']=_0x244dec;}['_getMaxAvailableTop'](_0x750ec4){let _0x5066ed=this['_getItemBefore'](_0x750ec4),_0x426148=0x0;for(;_0x5066ed;)_0x5066ed['updateHeight'](),_0x426148+=this['_spaceBetweenItems']+_0x5066ed['height'],_0x5066ed=this['_getItemBefore'](_0x5066ed);return _0x426148;}}function G(_0x2df656,_0x490dd8){return Math['max'](_0x2df656-_0x490dd8,0x0);}function g(_0x5cc833){return null!==_0x5cc833&&'object'==typeof _0x5cc833&&0x1===_0x5cc833['nodeType'];}class e extends _0x2ec86c{['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(_0x103ccc){super(_0x103ccc),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x1392af(),this['_refreshPositioningDebounced']=_0x465268(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x426d31=this['context']['plugins']['get'](j),_0x1ca648=this['context']['plugins']['get'](z);_0x426d31['register']('wideSidebar',this),_0x1ca648['container']&&_0x426d31['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x1cbd50){if(_0x1cbd50===this['activeAnnotation'])return;const _0x11caf7=this['context']['plugins']['get'](z);_0x11caf7['_activeAnnotation']=_0x1cbd50;const _0x8c1f79=this['activeAnnotation'];_0x11caf7['refresh']({'blurredAnnotation':_0x8c1f79,'activatedAnnotation':_0x1cbd50}),this['activeAnnotation']=_0x1cbd50;}['attach'](_0x423c07){this['annotations']=_0x423c07;const _0xeb3a53=this['context']['plugins']['get'](z);if(_0xeb3a53['_annotations']=_0x423c07,this['isAttached'])throw new _0x347fe4('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xeb3a53,'set:container',()=>{this['detach'](),this['listenTo'](_0xeb3a53,'change:container',_0x254762=>{_0x254762['off'](),this['attach'](_0x423c07);});}),_0xeb3a53['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x221adb=_0x52227c=>{_0x52227c['updateTargetRect'](),_0xeb3a53['addAnnotation'](_0x52227c);};for(const _0x3a7830 of _0x423c07)_0x221adb(_0x3a7830);this['listenTo'](_0x423c07,'add',(_0x944acc,_0xd101bb)=>{_0x221adb(_0xd101bb);}),this['listenTo'](_0x423c07,'remove',(_0x2c9a79,_0x284c80,_0x908bb8)=>{_0xeb3a53['rearrange']({'removedAnnotation':_0x284c80,'previousAnnotation':_0x423c07['get'](_0x908bb8-0x1),'nextAnnotation':_0x423c07['get'](_0x908bb8+0x1)}),_0x284c80===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x423c07,'focus',(_0x20ab65,_0x3d380e)=>{this['setActiveAnnotation'](_0x3d380e);}),this['listenTo'](_0x423c07,'blur',()=>{this['setActiveAnnotation'](null);});const _0x451e58=this['context']instanceof _0x385f51?this['context']['editors']:new _0x1392af([this['context']]);for(const _0x2f5442 of _0x451e58)this['_integrateWithEditorAnnotations'](_0x2f5442);this['listenTo'](_0x451e58,'add',(_0x3b3a78,_0x1153e1)=>{this['listenTo'](_0x1153e1,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1153e1);});}),this['listenTo'](_0x451e58,'remove',(_0x1dc08,_0xf82c25)=>{_0xf82c25['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0xf82c25['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x347fe4('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x3e1f83=this['context']['plugins']['get'](z);_0x3e1f83['_detachFromContainer'](this['annotations']),this['stopListening'](_0x3e1f83),this['stopListening'](this['annotations']),this['context']instanceof _0x385f51&&this['stopListening'](this['context']['editors']);for(const _0x5044e9 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5044e9);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x1790d4){if(!_0x1790d4['plugins']['has']('EditorAnnotations'))return;const _0xe00ab2=_0x1790d4['plugins']['get']('EditorAnnotations'),_0x533cad=()=>{const _0x1ca1e7=_0xe00ab2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1ca1e7[0x0]||null);};this['listenTo'](_0xe00ab2,'refresh',_0x533cad),this['listenTo'](_0xe00ab2,'blur',(_0x3a761e,{isAnnotationTracked:_0x4a8c4e})=>{this['activeAnnotation']&&_0x4a8c4e(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0xe00ab2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4f3604=>{_0xe00ab2['hasDomSelection']()&&(_0x533cad(),_0x4f3604['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0xe00ab2);}['_destroyEditorAnnotationsIntegration'](_0x10c45a){this['stopListening'](_0x10c45a),this['_editorAnnotations']['remove'](_0x10c45a);}}class C extends _0x488b97{['counterView'];constructor(_0x1d563b){super(_0x1d563b);const _0x540a22=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x3a0fcd,_0x6c79f7)=>_0x3a0fcd?'...':_0x6c79f7['toString']()),this['set']('annotationType',''),this['icon']=_0x2c05f7,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x540a22['to']('annotationType',_0x157f29=>'ck-annotation-counter__badge--'+_0x157f29),_0x540a22['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x540a22['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2ec86c{['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(_0x48819c){super(_0x48819c),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x44d67b())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x1392af(),this['_refreshPositioningDebounced']=_0x465268(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5d1d61(this['context']['locale']),this['balloonPanelView']=new _0x48dfaf(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x328cbd){this['annotations']=_0x328cbd;const _0x47742f=this['context']['plugins']['get'](z),_0xe79486=this['balloonPanelView'];if(_0x47742f['_annotations']=_0x328cbd,this['isAttached'])throw new _0x347fe4('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x47742f,'set:container',()=>{this['detach'](),this['listenTo'](_0x47742f,'change:container',_0x4b44dc=>{_0x4b44dc['off'](),this['attach'](_0x328cbd);});}),_0x47742f['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x2ca862=_0x1e3b5b=>{const _0x2ba5d5=new C(this['context']['locale']);_0x47742f['addAnnotation'](_0x1e3b5b,_0x2ba5d5),this['_annotationToNarrowView']['set'](_0x1e3b5b,_0x2ba5d5),_0x2ba5d5['bind']('isDirty','annotationType','number')['to'](_0x1e3b5b['view'],'isDirty','type','length'),_0x2ba5d5['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0xe79486['content']['first']!==_0x1e3b5b['view']?(this['_showBalloon'](_0x1e3b5b),_0x1e3b5b['view']['element']['focus'](),this['setActiveAnnotation'](_0x1e3b5b)):this['setActiveAnnotation'](null);});};for(const _0x5bb324 of _0x328cbd)_0x2ca862(_0x5bb324);this['listenTo'](_0x328cbd,'add',(_0x304ed4,_0x19d39d)=>{_0x2ca862(_0x19d39d);}),this['listenTo'](_0x328cbd,'remove',(_0x67b9a4,_0x480eb7,_0x536a1e)=>{this['_annotationToNarrowView']['get'](_0x480eb7)['destroy'](),this['_annotationToNarrowView']['delete'](_0x480eb7),_0x47742f['rearrange']({'removedAnnotation':_0x480eb7,'previousAnnotation':_0x328cbd['get'](_0x536a1e-0x1),'nextAnnotation':_0x328cbd['get'](_0x536a1e+0x1)}),_0x480eb7===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x328cbd,'focus',(_0x27a5f0,_0x3564f2)=>{this['setActiveAnnotation'](_0x3564f2);}),this['listenTo'](_0x328cbd,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x27bd9c,_0x1a9262)=>{_0x1a9262['keyCode']===_0x23a2b3['esc']&&_0xe79486['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0xe79486['content']['first']),this['_hideBalloon'](),_0x1a9262['stopPropagation'](),_0x1a9262['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x574b1f,_0x4c679e)=>{const _0xa4606e=_0x4c679e['target'];_0xe79486['isVisible']&&_0xe79486['element']['contains'](_0xa4606e)||_0x47742f['view']['element']['contains'](_0xa4606e)||_0x574b1f['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x3bb33e=>_0x3bb33e['contains'](_0xa4606e))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x8f02ae=this['context']instanceof _0x385f51?this['context']['editors']:new _0x1392af([this['context']]);for(const _0x5820e8 of _0x8f02ae)this['_integrateWithEditorAnnotations'](_0x5820e8);this['listenTo'](_0x8f02ae,'add',(_0x3797cf,_0x3d912a)=>{this['listenTo'](_0x3d912a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3d912a);});}),this['listenTo'](_0x8f02ae,'remove',(_0x4a77ed,_0x4e11c7)=>{_0x4e11c7['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4e11c7['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x2ce00a){if(_0x2ce00a===this['activeAnnotation'])return;const _0x29226b=this['context']['plugins']['get'](z);if(_0x29226b['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x2ce00a,'disableAnimationOnActivatedAnnotation':!0x0}),_0x2ce00a)_0x29226b['getSidebarItemView'](_0x2ce00a)?this['_showBalloon'](_0x2ce00a):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x2ce00a;}['detach'](){if(!this['isAttached'])throw new _0x347fe4('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5bdb01=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x57acaf=>_0x57acaf['destroy']()),this['_annotationToNarrowView']['clear'](),_0x5bdb01['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x385f51&&this['stopListening'](this['context']['editors']);for(const _0x4c21a3 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4c21a3);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'](_0x48d253){if(!_0x48d253['plugins']['has']('EditorAnnotations'))return;const _0x9eda5=_0x48d253['plugins']['get']('EditorAnnotations'),_0x332ca6=this['context']['plugins']['get'](z),_0x2600af=this['annotations'],_0x41effd=this['balloonPanelView'],_0x883f3e=()=>{const _0x4b504f=_0x9eda5['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x4b504f),this['setActiveAnnotation'](_0x4b504f[0x0]||null);};this['listenTo'](_0x9eda5,'refresh',_0x883f3e),this['listenTo'](_0x9eda5,'blur',(_0x5a37d6,{isAnnotationTracked:_0x1af4bd})=>{this['activeAnnotation']&&_0x1af4bd(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x9eda5,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x2600af,'blur',_0x162314=>{_0x9eda5['hasDomSelection']()&&_0x162314['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x12b3b5,_0x465b4d)=>{const _0x1d1ae3=_0x465b4d['target'];_0x41effd['isVisible']&&_0x41effd['element']['contains'](_0x1d1ae3)||_0x332ca6['view']['element']['contains'](_0x1d1ae3)||this['activeAnnotation']&&_0x9eda5['hasDomSelection']()&&(_0x883f3e(),_0x12b3b5['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x9eda5);}['_destroyEditorAnnotationsIntegration'](_0x2f3f98){_0x2f3f98&&(this['stopListening'](_0x2f3f98),this['_editorAnnotations']['remove'](_0x2f3f98));}['_setSelectedAnnotations'](_0x546585){for(const _0x31bab0 of this['_selectedAnnotations'])_0x546585['includes'](_0x31bab0)||this['_manuallyClosedAnnotationViews']['delete'](_0x31bab0['view']);this['_selectedAnnotations']=_0x546585;}['_refreshPositioning'](){const _0x2cbe12=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x2cbe12['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x3f10d7){if(this['_manuallyClosedAnnotationViews']['has'](_0x3f10d7['view']))return;const _0x393bd4=this['balloonPanelView']['content']['first'];_0x393bd4!==_0x3f10d7['view']?(_0x393bd4&&this['_detachListeners'](_0x393bd4),this['_attachListeners'](_0x3f10d7['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x3f10d7['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x31bf6e=this['balloonPanelView']['content']['first'],_0x3e1421=_0x31bf6e&&this['annotations']['getByView'](_0x31bf6e);if(!_0x3e1421||!this['_annotationToNarrowView']['has'](_0x3e1421))return;const _0x2b0bcc=this['_annotationToNarrowView']['get'](_0x3e1421)['element'],_0x2455c5=(function(){const _0x1db76e=_0x48dfaf['defaultPositions'];return[_0x1db76e['southArrowNorthEast'],_0x1db76e['northArrowSouthEast'],_0x1db76e['southArrowNorth'],_0x1db76e['northArrowSouth'],_0x1db76e['southArrowNorthWest'],_0x1db76e['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x2b0bcc,'positions':_0x2455c5});}['_hideBalloon'](){const _0x418cf8=this['balloonPanelView'],_0x5a93b3=_0x418cf8['content']['first'];_0x5a93b3&&(this['_detachListeners'](_0x5a93b3),_0x418cf8['unpin'](),_0x418cf8['content']['clear']());}['_attachListeners'](_0x3d845b){this['listenTo'](_0x3d845b,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x3d845b,'Esc',(_0x4675b2,_0x14864e)=>{this['_manuallyClosedAnnotationViews']['add'](_0x3d845b),this['_hideBalloon'](),_0x14864e();});}['_detachListeners'](_0x3d635d){this['stopListening'](_0x3d635d);}}class c extends _0x329b6e{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x513a27,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x578892){super(_0x578892),_0x578892['editing']['view']['addObserver'](_0x2aa71a),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x578892['plugins']['get'](_0x513a27),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x325190=this['editor']['plugins']['get'](j);_0x325190['context']===this['editor']&&(_0x325190['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x9006f,_0x68db1e)=>{const _0xe5e4f2=this['_balloon'];if(this['isAttached']&&_0xe5e4f2['visibleView']){const _0x3b8770=this['annotations']['getByView'](_0xe5e4f2['visibleView']);_0x3b8770&&this['_closeAnnotation'](_0x3b8770),_0x68db1e();}}));}['afterInit'](){const _0x227bc6=this['editor']['plugins']['get'](j);_0x227bc6['context']===this['editor']&&(_0x227bc6['hasActive']()||_0x227bc6['switchTo']('inline'));}['setActiveAnnotation'](_0xc24fd4){_0xc24fd4!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0xc24fd4&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0xc24fd4)&&this['_addAnnotationToBalloon'](_0xc24fd4,!0x0),_0xc24fd4['isActive']=!0x0),_0xc24fd4||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0xc24fd4);}['attach'](_0x589372){this['annotations']=_0x589372;const _0x19ca8d=this['editor']['plugins']['get'](j),_0x59a86a=this['_balloon'];if(this['isAttached'])throw new _0x347fe4('inlineannotations-attach-already-attached',this);if(_0x19ca8d['context']!==this['editor'])throw new _0x347fe4('inlineannotations-not-allowed-with-context',this);const _0x2d5e5e=this['editor']['plugins']['get'](b);this['listenTo'](_0x2d5e5e,'refresh',()=>{const _0xe6a98c=_0x2d5e5e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x189c17,_0x217f93;!this['_forceRefresh']&&(_0x189c17=_0xe6a98c,_0x217f93=this['_selectedAnnotations'],_0x189c17['length']===_0x217f93['length']&&_0x189c17['every'](_0x2de5c1=>_0x217f93['includes'](_0x2de5c1)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0xe6a98c),this['setActiveAnnotation'](_0xe6a98c[0x0]||null));}),this['listenTo'](_0x2d5e5e,'blur',(_0x8c1bb7,{isAnnotationTracked:_0xd49946})=>{this['activeAnnotation']&&_0xd49946(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x2ca4e9,_0x29c4be,_0x139c74)=>{_0x139c74||this['setActiveAnnotation'](null);}),this['listenTo'](_0x589372,'remove',(_0x2ca76e,_0x502839)=>{this['_removeAnnotationFromBalloon'](_0x502839),_0x502839===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x59a86a,'change:visibleView',(_0x104e39,_0x11061d,_0x26c419,_0x528687)=>{_0x528687&&this['stopListening'](_0x528687);const _0xec124e=_0x589372['getByView'](_0x26c419);_0x26c419&&_0xec124e&&(this['listenTo'](_0x26c419,'change:height',()=>{_0x59a86a['updatePosition']();}),this['listenTo'](_0x26c419,'Esc',()=>{this['_closeAnnotation'](_0xec124e),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xec124e&&this['setActiveAnnotation'](_0xec124e));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x59a86a['visibleView']&&(_0x589372['getByView'](_0x59a86a['visibleView'])&&_0x59a86a['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 _0x347fe4('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x50a132 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x50a132);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x5a8652){for(const _0x2ae433 of this['_selectedAnnotations'])_0x5a8652['includes'](_0x2ae433)||this['_manuallyClosed']['delete'](_0x2ae433);for(const _0x1ed194 of this['annotations'])_0x5a8652['includes'](_0x1ed194)||this['_removeAnnotationFromBalloon'](_0x1ed194);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x178c79 of _0x5a8652)this['_addAnnotationToBalloon'](_0x178c79);}this['_selectedAnnotations']=_0x5a8652;}['_addAnnotationToBalloon'](_0x3544d5,_0x48025a=!0x1){this['_manuallyClosed']['has'](_0x3544d5)||(this['_addedAnnotations']['has'](_0x3544d5)||this['_balloon']['hasView'](_0x3544d5['view'])||(this['_addedAnnotations']['add'](_0x3544d5),this['_balloon']['add']({'stackId':_0x3544d5['view']['id'],'view':_0x3544d5['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x3544d5)}})),_0x48025a&&this['_balloon']['showStack'](_0x3544d5['view']['id']));}['_getBalloonTargetForAnnotation'](_0x3708dc){const _0x4b87f9=_0x3708dc['target'],_0x5b8756=this['editor']['editing']['view'],_0x48a9f4=_0x5b8756['document']['selection']['getFirstRange'](),_0x33560c=_0x5b8756['domConverter']['viewRangeToDom'](_0x48a9f4);if(_0x33560c['collapse'](!0x0),_0x4b87f9){if(_0x4b87f9 instanceof _0x81943)return _0x4b87f9;let _0x29d14a=[];for(const _0x3172fd of _0x4b87f9)_0x29d14a['push'](...F(_0x3172fd['getClientRects']()));_0x29d14a=function(_0x461c3f){const _0x32faf0=[];let _0x51e788=_0x461c3f[0x0];for(let _0x47c122=0x1;_0x47c122<_0x461c3f['length'];_0x47c122++)P(_0x51e788,_0x461c3f[_0x47c122])?_0x51e788['width']+=_0x461c3f[_0x47c122]['width']:(_0x32faf0['push'](_0x51e788),_0x51e788=_0x461c3f[_0x47c122]);return _0x32faf0['push'](_0x51e788),_0x32faf0;}(_0x29d14a);const _0x193110=_0x33560c['getBoundingClientRect']();return _0x29d14a['find'](_0x3060c9=>_0x3060c9['top']<=_0x193110['top']&&_0x3060c9['bottom']>=_0x193110['bottom']&&_0x3060c9['left']<=_0x193110['left']&&_0x3060c9['right']>=_0x193110['right'])||_0x29d14a[0x0];}return _0x3708dc['targetRect']||_0x33560c;}['_removeAnnotationFromBalloon'](_0x2f0a81){this['_addedAnnotations']['has'](_0x2f0a81)&&this['_balloon']['hasView'](_0x2f0a81['view'])&&(this['_addedAnnotations']['delete'](_0x2f0a81),this['_balloon']['remove'](_0x2f0a81['view']));}['_closeAnnotation'](_0x40f30d){this['_manuallyClosed']['add'](_0x40f30d),this['_removeAnnotationFromBalloon'](_0x40f30d);}}function F(_0x37c448){return Array['from'](_0x37c448)['map'](DOMRect['fromRect']);}function P(_0x678c78,_0x55576e){return _0x678c78['top']===_0x55576e['top']&&_0x678c78['bottom']===_0x55576e['bottom']&&_0x678c78['right']===_0x55576e['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5cdead,_0x429c63){super(_0x5cdead),this['set']('isEmpty',!_0x429c63['length']),this['focusTracker']=new _0x1c22e6(),this['_annotationViews']=_0x429c63,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x11c5b9({'focusables':_0x429c63,'focusTracker':this['focusTracker']}),this['listenTo'](_0x429c63,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x429c63,'remove',(_0x2e0093,_0x38d977)=>{_0x38d977['isActive']&&this['focus'](),_0x429c63['length']||(this['isEmpty']=!0x0);});const _0x15ae9d=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x5cdead,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x429c63},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x15ae9d['if']('isEmpty','ck-hidden',_0x20a0a2=>!_0x20a0a2)]},'children':[{'text':N(_0x5cdead,'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 _0x33ae52 of this['_annotationViews'])this['focusTracker']['add'](_0x33ae52['element']);this['_annotationViews']['on']('change',(_0x520ce2,{added:_0x5cd15e,removed:_0x6d64bd})=>{for(const _0x265b84 of _0x5cd15e)this['focusTracker']['add'](_0x265b84['element']);for(const _0x3c29fa of _0x6d64bd)this['focusTracker']['remove'](_0x3c29fa['element']);});}}class p extends _0x2ec86c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x17c7f7){super(_0x17c7f7),this['archivedThreads']=new _0x1392af();}['init'](){const _0x5ecb35=this['context'],_0x1da9fc=_0x5ecb35['plugins']['get'](o),_0x33c49b=_0x5ecb35['plugins']['get'](y);this['listenTo'](_0x1da9fc,'addCommentThread',(_0x5c069f,{threadId:_0x47c8e8})=>{const _0x125195=_0x1da9fc['getCommentThread'](_0x47c8e8);_0x125195['archivedAt']&&this['archivedThreads']['add'](_0x125195,this['_calculatePosition'](_0x125195['archivedAt'])),this['listenTo'](_0x125195,'change:archivedAt',(_0x569929,_0x3002c2,_0xc7060a)=>{_0xc7060a?this['archivedThreads']['has'](_0x125195)||this['archivedThreads']['add'](_0x125195,this['_calculatePosition'](_0x125195['archivedAt'])):this['archivedThreads']['has'](_0x125195)&&this['archivedThreads']['remove'](_0x125195);});}),this['listenTo'](_0x1da9fc,'removeCommentThread',(_0x3ea126,{threadId:_0x1f7732})=>{const _0x3d068a=_0x1da9fc['getCommentThread'](_0x1f7732);this['stopListening'](_0x3d068a),this['archivedThreads']['has'](_0x3d068a)&&this['archivedThreads']['remove'](_0x3d068a);},{'priority':'highest'}),this['listenTo'](_0x33c49b['collection'],'focus',(_0x3adacd,_0x15a7c3)=>{_0x15a7c3['isVisible']||(_0x15a7c3['isActive']=!0x0,_0x33c49b['activate'](_0x15a7c3));});}['_calculatePosition'](_0x981461){const _0xfe92ec=[...this['archivedThreads']]['findIndex'](_0x24c56d=>_0x24c56d['archivedAt']<_0x981461);return _0xfe92ec>-0x1?_0xfe92ec:this['archivedThreads']['length'];}}class a extends _0x329b6e{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x1501c1];}constructor(_0x48d09c){super(_0x48d09c),this['annotationViews']=new _0xae4f8e(),this['_pendingThreads']=[];}['init'](){const _0x22398e=this['editor'],_0x36e211=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x22398e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x488b97,!0x0)),_0x22398e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3b6ab4=this['_createCommentsArchiveButton'](_0x5d24e6);return _0x3b6ab4['set']({'role':'menuitemcheckbox'}),_0x3b6ab4;});const _0x2a2d90=_0x22398e['plugins']['get'](p),_0xe383a0=_0x22398e['plugins']['get']('Annotations'),_0x4d1b78=_0x22398e['plugins']['get']('CommentsRepository');_0x2a2d90['archivedThreads']['forEach'](_0x24ce06=>{this['_handleNewThread'](_0x24ce06);}),this['listenTo'](_0x2a2d90['archivedThreads'],'add',(_0x22d072,_0x84f1e9)=>{this['_handleNewThread'](_0x84f1e9);}),this['listenTo'](_0xe383a0['collection'],'add',(_0x505713,_0x231389)=>{const _0x2ee5fb=this['_pendingThreads']['find'](_0x2218c2=>{const _0xd9d2b9=_0x4d1b78['_threadToController']['get'](_0x2218c2);return _0xd9d2b9&&_0x231389['innerView']===_0xd9d2b9['view'];});if(_0x2ee5fb){const _0x389fa5=this['_calculatePosition'](_0x2ee5fb['archivedAt']);this['annotationViews']['add'](_0x231389['view'],_0x389fa5),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x2ee5fb),0x1);}}),this['listenTo'](_0x2a2d90['archivedThreads'],'remove',(_0x2d822a,_0x3e44f5)=>{const _0x1381b5=_0x22398e['config']['get']('collaboration.channelId');if(!_0x1381b5||_0x3e44f5['channelId']===_0x1381b5){if(this['_pendingThreads']['includes'](_0x3e44f5))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x3e44f5),0x1);else{const _0xf409ee=_0x4d1b78['_threadToController']['get'](_0x3e44f5),_0x44abe6=_0xe383a0['getByInnerView'](_0xf409ee['view']);this['annotationViews']['remove'](_0x44abe6['view']),this['stopListening'](_0x44abe6['focusableElements']);}}}),this['listenTo'](_0xe383a0['collection'],'add',(_0x1a1e80,_0x39f98b)=>{this['listenTo'](_0x39f98b,'escape',_0x36e211);}),this['listenTo'](_0xe383a0['collection'],'remove',(_0x21b7a3,_0x2d93d2)=>{this['stopListening'](_0x2d93d2,'escape',_0x36e211);});}['_handleNewThread'](_0x2c8e26){const _0xe78a98=this['editor']['plugins']['get']('CommentsRepository'),_0x53217e=this['editor']['plugins']['get']('Annotations'),_0x509ee5=this['editor']['config']['get']('collaboration.channelId');if(!_0x509ee5||_0x2c8e26['channelId']===_0x509ee5){const _0x349e80=_0xe78a98['_threadToController']['get'](_0x2c8e26);if(!_0x349e80)return void this['_pendingThreads']['push'](_0x2c8e26);const _0x4ef72c=this['_calculatePosition'](_0x2c8e26['archivedAt']),_0x111b44=_0x53217e['getByInnerView'](_0x349e80['view']);_0x111b44['isVisible']&&_0x53217e['_visibleAnnotations']['remove'](_0x111b44),this['annotationViews']['add'](_0x111b44['view'],_0x4ef72c);}}['_calculatePosition'](_0x5c4fef){const _0x34de5f=this['editor']['config']['get']('collaboration.channelId'),_0x43f4e2=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x17a041=>_0x17a041['channelId']===_0x34de5f)['findIndex'](_0x5efe63=>_0x5efe63['archivedAt']<_0x5c4fef);return _0x43f4e2<0x0||_0x43f4e2>this['annotationViews']['length']?this['annotationViews']['length']:_0x43f4e2-0x1;}['_toggleDialog'](){const _0x19dbca=this['editor'],_0x2a7c0e=_0x19dbca['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x19dbca['locale'],this['annotationViews'])),'commentsArchive'===_0x2a7c0e['id']?_0x2a7c0e['hide']():_0x2a7c0e['show']({'id':'commentsArchive','title':N(_0x19dbca['locale'],'COMMENTS_ARCHIVE'),'icon':_0x430f4a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3a3406['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3375de,_0x4185c8=!0x1){const _0x18dc53=this['editor']['locale'],_0xb6be39=this['editor']['plugins']['get']('Dialog'),_0x448b3f=new _0x3375de(_0x18dc53);return _0x448b3f['bind']('isEnabled')['to'](this,'isEnabled'),_0x448b3f['bind']('isOn')['to'](_0xb6be39,'id',_0x1d6224=>'commentsArchive'===_0x1d6224),_0x448b3f['set']({'label':N(_0x18dc53,'COMMENTS_ARCHIVE'),'icon':_0x430f4a,'isToggleable':!0x0}),_0x4185c8&&(_0x448b3f['tooltip']=!0x0),this['listenTo'](_0x448b3f,'execute',()=>this['_toggleDialog']()),_0x448b3f;}['_hideDialogOnAnnotationEscape']=_0x3bcc96=>{const _0x5a21da=_0x3bcc96['source'];if(!this['annotationViews']['has'](_0x5a21da['view']))return;const _0x221487=this['editor']['plugins']['get']('Dialog');_0x221487['isOpen']&&'commentsArchive'===_0x221487['id']&&(_0x221487['hide'](),_0x3bcc96['stop']());};}class gi extends _0x329b6e{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x2d455d,ContextPlugin as _0x2738de,PendingActions as ht,Command as _0x385260,Plugin as _0x5ddc0e,Context as _0x449ace}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x362d6f,uid as _0x58c8cf,KeystrokeHandler as jt,FocusTracker as _0x199d2b,diff as _0x159fc8,Collection as _0x23eb0b,Rect as _0x37570f,CKEditorError as _0x51f518,first as _0x5ae716,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x35e1dc,keyCodes as _0x5b1abd}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x5de8e0,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x21109b,trimHtml as ts,LateFocusDropdownButtonView as _0x11425f,Users as it,getDateTimeFormatter as lt,hashObject as pt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x542398}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as wt,cloneDeep as It,set as At,unset as Ct,debounce as _0x40c01b}from'es-toolkit/compat';import{IconUndo as _0x4a17ef,IconCheck as _0x1299c5,IconPencil as _0x7ba0fb,IconRemoveComment as _0x37d2b3,IconThreeVerticalDots as _0x1fc351,IconAddComment as _0x224626,IconCommentsArchive as _0x314692}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x2f1de9,ButtonView as _0x49f2c7,ViewCollection as _0xae5e8b,createDropdown as _0x12ae92,ListView as _0x1a323c,focusChildOnDropdownOpen as _0x4391eb,ListItemView as _0x8512b5,MenuBarMenuListItemButtonView as _0x58cd9a,BodyCollection as _0x5a4cd6,BalloonPanelView as _0x263b66,ContextualBalloon as _0x36b0f0,Dialog as _0xeb9489,DialogViewPosition as _0xd16eae}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0x5d0a9d}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Et}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0xe143ff}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x1ed711}from'@ckeditor/ckeditor5-widget/dist/index.js';class yt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x362d6f(){['model'];['view'];constructor(_0x55c334,_0x449fc9){super(),this['model']=_0x55c334,this['model']['_isAttached']=!0x0,this['view']=_0x449fc9,this['listenTo'](_0x449fc9,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x449fc9,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x449fc9,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x449fc9,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x449fc9,'addComment',(_0x5ae497,_0x159dd3)=>this['addComment'](_0x159dd3)),this['listenTo'](_0x449fc9,'updateComment',(_0x303e82,_0x546d06,_0x3e8ba5)=>this['updateComment'](_0x546d06,_0x3e8ba5)),this['listenTo'](_0x449fc9,'removeComment',(_0x43d7f9,_0x339947)=>this['removeComment'](_0x339947));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x6e2bd8){this['model']['addComment']({'content':_0x6e2bd8,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x1ebe3e,_0xf27533){this['model']['getComment'](_0x1ebe3e)['update']({'content':_0xf27533});}['removeComment'](_0x554edd){this['model']['getComment'](_0x554edd)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x49b7cb,_0x87113a,_0x2c6aaf){const t=_0x49b7cb['t'];switch(_0x87113a){case'PENDING_ACTION_COMMENT_THREAD':return t({'string':'Unsaved\x20change\x20in\x20comment\x20thread.','id':'PENDING_ACTION_COMMENT_THREAD'});case'Comment':return t('Comment');case'Reply...':return t('Reply...');case'Reply\x20to\x20reopen\x20discussion...':return t('Reply\x20to\x20reopen\x20discussion...');case'Write\x20a\x20comment...':return t('Write\x20a\x20comment...');case'Comment\x20was\x20made\x20on\x20an\x20element':return t('Comment\x20was\x20made\x20on\x20an\x20element');case'Comment\x20editor':return t('Comment\x20editor');case'Delete\x20comment\x20thread?':return t('Delete\x20comment\x20thread?');case'Delete\x20comment?':return t('Delete\x20comment?');case'Marked\x20as\x20resolved':return t('Marked\x20as\x20resolved');case'Show\x20more\x20items':return t('Show\x20more\x20items');case'Cancel':return t('Cancel');case'Edit':return t('Edit');case'Resolve':return t('Resolve');case'Reopen':return t('Reopen');case'Remove':return t('Remove');case'Reply':return t('Reply');case'Save':return t('Save');case'Annotations\x20sidebar':return t('Annotations\x20sidebar');case'Annotations\x20list':return t('Annotations\x20list');case'Thread\x20comments':return t('Thread\x20comments');case'THREAD_CONTEXT_LABEL':return t({'string':'Thread\x20context:\x20%0','id':'THREAD_CONTEXT_LABEL'},_0x2c6aaf);case'COMMENT_THREAD_LABEL':return t({'string':'Comment\x20thread\x20by\x20%1.\x20%1\x20reply.','plural':'Comment\x20thread\x20by\x20%1.\x20%0\x20replies.','id':'COMMENT_THREAD_LABEL'},_0x2c6aaf);case'COMMENT_THREAD_DESCRIPTION':return t({'string':'Press\x20Enter\x20for\x20more\x20options.\x20Press\x20Escape\x20to\x20exit.','id':'COMMENT_THREAD_DESCRIPTION'});case'COMMENT_ARIA_LABEL':return t({'string':'Comment\x20by\x20%0.\x20Created\x20on\x20%1.\x20%2.\x20%3','id':'COMMENT_ARIA_LABEL'},_0x2c6aaf);case'LEAVE_COMMENT_ANNOUNCEMENT':return t({'string':'Leaving\x20a\x20content\x20with\x20comments.','id':'LEAVE_COMMENT_ANNOUNCEMENT'});case'ENTER_COMMENT_ANNOUNCEMENT':return t({'string':'Entering\x20a\x20content\x20with\x20comments.\x20Press\x20%0\x20to\x20go\x20to\x20the\x20discussion.','id':'ENTER_COMMENT_ANNOUNCEMENT'},_0x2c6aaf);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x2c6aaf);case'TOO_LONG_COMMENT_ALERT':return t({'string':'Comment\x20content\x20is\x20too\x20long.\x20Your\x20comment\x20has\x20%0\x20characters\x20but\x20the\x20limit\x20is\x20%1\x20characters.','id':'TOO_LONG_COMMENT_ALERT'},_0x2c6aaf);case'EXTERNAL_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20external\x20source.','id':'EXTERNAL_COMMENT'});case'EXTERNAL_IMPORT_WORD_COMMENT':return t({'string':'This\x20comment\x20comes\x20from\x20an\x20imported\x20Word\x20file.','id':'EXTERNAL_IMPORT_WORD_COMMENT'});case'EXTERNAL_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20external\x20source\x20(added\x20by\x20%0)','id':'EXTERNAL_AVATAR'},_0x2c6aaf);case'EXTERNAL_IMPORT_WORD_AVATAR':return t({'string':'Displayed\x20author\x20name\x20comes\x20from\x20a\x20Word\x20document\x20imported\x20by\x20%0','id':'EXTERNAL_IMPORT_WORD_AVATAR'},_0x2c6aaf);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x2734da,_0x55873c){super(_0x2734da);const _0x5b227f=_0x58c8cf();this['main']=this['createCollection'](),this['editable']=new Vt(_0x2734da,_0x55873c,void 0x0,{'label':()=>N(_0x2734da,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x2734da['uiLanguageDirection'],'lang':_0x2734da['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x5b227f},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ft extends Ut{['view'];constructor(_0x2c5580){super(_0x2c5580),this['view']=new Rt(_0x2c5580['locale'],_0x2c5580['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0xe8dded=this['editor']['editing']['view'],_0x1c3235=this['view']['editable'],_0x515c80=_0xe8dded['document']['getRoot']();_0x1c3235['name']=_0x515c80['rootName'],this['view']['render']();const _0x7a2b1=_0x1c3235['element'];this['setEditableElement'](_0x1c3235['name'],_0x7a2b1),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xe8dded['attachDomRoot'](_0x7a2b1),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Nt=[zt,Bt,Et,Gt,Jt,Kt,Lt];class Qt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x362d6f(_0x2d455d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Nt)());constructor(_0x28f75e={}){function _0x145755(_0x1386d6){return _0x1386d6['map'](_0x1d46c5=>String['fromCharCode'](_0x1d46c5))['join']('');}(_0x28f75e=Object['assign']({},_0x28f75e))['plugins']||(_0x28f75e['plugins']=Qt['defaultPlugins']),super(_0x28f75e),this['ui']=new Ft(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x145755([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x145755([0x76,0x69,0x65,0x77])][_0x145755([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x145755([0x61,0x75,0x74,0x6f]),this[_0x145755([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x145755([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x145755([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x145755([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x145755([0x6f,0x6b])});}['create'](){const _0x5e6e29=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x5e6e29))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x2f37d2=>{const _0x5ef89a=this['model']['document']['getRoot'](),_0x362fbd=_0x5ef89a&&_0x5ef89a['getChild'](_0x5ef89a['childCount']-0x1);_0x2f37d2['setSelection'](_0x362fbd,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x464082=this['editing']['view'],_0x3e4c85=_0x464082['document']['getRoot'](),_0xea507f=_0x3e4c85['getChild'](0x0);_0x3e4c85['childCount']>0x1||!_0xea507f||'p'!=_0xea507f['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x464082,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xea507f['placeholder']=this['placeholder']),St({'view':_0x464082,'element':_0xea507f,'keepOnFocus':!0x0}),this['placeholderElement']=_0xea507f);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x1dbf65,_0x541675={}){super(_0x1dbf65),this['editor']=null,this['_editorConfig']=_0x541675,this['set']('value',_0x541675['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x1dbf65,'Reply...')),this['set']('submitLabel',N(_0x1dbf65,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x199d2b(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-comment__input-actions',this['bindTemplate']['if']('showButtons','ck-comment__input-actions--active')]},'children':[this['submitButtonView'],this['cancelButtonView']]}]}),this['keystrokes']['set']('Esc',(_0x34fbbc,_0x21e0e7)=>{this['cancelButtonView']['fire']('execute'),_0x21e0e7();}),this['keystrokes']['set']('Ctrl+Enter',(_0x27e835,_0x36a8c1)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x36a8c1());}),this['on']('submit',(_0x308dce,_0x7adeba)=>{_0x7adeba['length']>0xfde8?(alert(N(_0x1dbf65,'TOO_LONG_COMMENT_ALERT',[_0x7adeba['length'],0xfde8])),_0x308dce['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Qt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x361965=this['editor'];this['element']['insertBefore'](_0x361965['ui']['element'],this['element']['firstChild']),_0x361965['model']['document']['on']('change',()=>this['value']=_0x361965['getData']()),_0x361965['bind']('placeholder')['to'](this),this['focusables']['add'](_0x361965['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x38b789){-0x1===_0x38b789?(this['focusCycler']['focusFirst'](),this['focusCycler']['focusLast']()):this['focusCycler']['focusFirst']();}async['destroy'](){this['_isDestroyed']||(this['_isDestroyed']=!0x0,this['editor']&&(await this['_editorCreationPromise'],await this['editor']['destroy'](),this['fire']('editorDestroyed',this['editor'])),await super['destroy']());}['_createSubmitButton'](){const {locale:_0x296760}=this,_0x2df636=new _0x49f2c7(_0x296760);return _0x2df636['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x2df636['withText']=!0x0,_0x2df636['bind']('label')['to'](this,'submitLabel'),_0x2df636['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x2df636['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x240c46,_0x3292b4)=>!_0x3292b4&&!!_0x240c46['trim']()),_0x2df636;}['_createCancelButton'](){const {locale:_0x12630d}=this,_0x32aff9=new _0x49f2c7(_0x12630d);return _0x32aff9['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x32aff9['label']=N(_0x12630d,'Cancel'),_0x32aff9['withText']=!0x0,_0x32aff9['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x32aff9;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1bda23=>{this['focusTracker']['add'](_0x1bda23['element']);}),this['focusables']['on']('change',(_0x4112bb,_0x47ae22)=>{for(const _0x4ec78f of Array['from'](_0x47ae22['added'])['reverse']())this['focusTracker']['add'](_0x4ec78f['element']);});}}class ie extends kt{constructor(_0x2df037,_0x243287,_0x2e8ed1){super(_0x2df037),this['commentInputView']=new es(_0x2df037,_0x2e8ed1),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x3ded75,_0x51f45b)=>_0x3ded75||!!_0x51f45b),this['set']('showInput',!0x1),this['on']('change:showInput',()=>{this['showInput']&&!this['commentInputView']['editor']&&this['commentInputView']['createEditor']();}),this['commentInputView']['delegate']('editorReady')['to'](this),this['commentInputView']['delegate']('editorDestroyed')['to'](this),this['userView']=new _0x5de8e0(_0x2df037,_0x243287),this['userView']['extendTemplate']({'attributes':{'class':'ck-thread__user','aria-hidden':!0x0}}),this['commentInputView']['extendTemplate']({'attributes':{'class':'ck-thread__input'}}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-comment__input-container',this['bindTemplate']['if']('showInput','ck-comment__input-container--active')]},'children':[this['userView'],this['commentInputView']]});}['render'](){super['render'](),this['_focusOnNonInteractiveMouseDown']();}['destroy'](){return this['commentInputView']['destroy']()['then'](()=>super['destroy']());}['focus'](_0x30c977){this['commentInputView']['focus'](_0x30c977);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5a259b,_0x455904)=>{const {submitButtonView:_0x249aaa,cancelButtonView:_0x549bc7,editor:_0x24f419}=this['commentInputView'];[_0x249aaa['element'],_0x549bc7['element'],_0x24f419?_0x24f419['editing']['view']['getDomRoot']():null]['filter'](_0x3834f1=>_0x3834f1)['some'](_0xe07cac=>_0xe07cac['contains'](_0x455904['target']))||(this['focus'](),_0x455904['preventDefault']());});}}class os extends kt{constructor(_0x576298){super(_0x576298);const _0x3e26c0=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3e26c0['to']('count',_0x5e3a85=>N(_0x576298,'NUMBER_OF_COMMENTS',_0x5e3a85))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x2c604d,_0xb84121,_0x6217af){super(_0x2c604d);const _0x27b0da=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0xb84121['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0xb84121,this['_config']=_0x6217af,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f1de9({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x174b58=>this['commentViews']['map'](_0x2dc29e=>_0x2dc29e['element'])['includes'](_0x174b58['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new os(_0x2c604d),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x18e6b2=>_0x18e6b2-this['_config']['maxCommentsWhenCollapsed']);for(const _0x1b55e4 of _0xb84121['comments'])this['_handleNewCommentModel'](_0x1b55e4);this['_handleInfoComment'](),this['listenTo'](_0xb84121['comments'],'add',(_0x5bd343,_0x59a9bb)=>{const _0x29502a=this['_calculatePosition'](_0x59a9bb);this['length']++,this['_handleNewCommentModel'](_0x59a9bb,_0x29502a),this['refreshVisibleViews']();}),this['listenTo'](_0xb84121['comments'],'remove',(_0x28dfab,_0x4adf89)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4adf89),this['refreshVisibleViews']();}),this['listenTo'](_0xb84121,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0xb84121,'change:isResolved',()=>this['_handleInfoComment']()),this['on']('change:isActive',()=>this['refreshVisibleViews']()),this['on']('change:hasDirtyComment',()=>this['refreshVisibleViews']()),this['setTemplate']({'tag':'ul','attributes':{'class':['ck-thread__comments',_0x27b0da['if']('length','ck-hidden',_0x3dba85=>!_0x3dba85)],'aria-label':N(_0x2c604d,'Thread\x20comments')},'children':this['visibleViews']});}get['_shouldCollapse'](){return this['_model']['weight']>this['_config']['maxThreadTotalWeight']&&!this['isActive']&&!this['hasDirtyComment'];}['render'](){super['render'](),this['refreshVisibleViews'](),this['_setupKeyboardNavigation']();}['focus'](_0x6255d7){-0x1===_0x6255d7?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x564f5e of this['commentViews'])_0x564f5e['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x433bf8,_0x5cc075){const _0x497406=new this['_config']['CommentView'](this['locale'],_0x433bf8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x497406['viewUid']=_0x433bf8['id'],_0x497406['delegate']('removeComment')['to'](this),_0x497406['delegate']('updateComment')['to'](this),_0x497406['delegate']('resolveCommentThread')['to'](this),_0x497406['delegate']('editorReady')['to'](this),_0x497406['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x497406,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x497406,_0x5cc075);}['_calculatePosition'](_0x5a32fa){const _0x1bf155=this['_model']['_findOptimalIndex'](_0x5a32fa);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x5a32fa['authoredAt']?_0x1bf155-0x1:_0x1bf155:_0x1bf155-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x5344f2={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x5344f2,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x5344f2));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3f3870){const _0x16d8c3=this['commentViews']['remove'](_0x3f3870['id']);this['stopListening'](_0x16d8c3),_0x16d8c3['isEditMode']&&this['_updateHasDirtyComment'](),_0x16d8c3['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x5cc5d9=>_0x5cc5d9['isEditMode']);}['_rearrangeCollapse'](){const _0x1c002a=function(_0x248877){const _0x5680a5=new _0x23eb0b();for(const _0x1a4c63 of _0x248877)_0x5680a5['add'](_0x1a4c63);return _0x5680a5;}(this['commentViews']),_0x1ad8f3=this['_collapsedCommentsView']['count'];for(let _0x4a7d7c=0x1;_0x4a7d7c<=_0x1ad8f3;_0x4a7d7c++)_0x1c002a['remove'](0x1);for(const _0x3422ba of _0x1c002a)_0x3422ba['collapse']();_0x1ad8f3>0x0&&_0x1c002a['add'](this['_collapsedCommentsView'],0x1),rs(_0x159fc8(Array['from'](this['visibleViews']),Array['from'](_0x1c002a)),this['visibleViews'],_0x1c002a);}['_rearrangeExpand'](){rs(_0x159fc8(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3b1939 of this['visibleViews'])_0x3b1939['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5dd4f2=>{this['focusTracker']['add'](_0x5dd4f2['element']),this['keystrokes']['listenTo'](_0x5dd4f2['element']);}),this['commentViews']['on']('change',(_0x526207,_0x1563b2)=>{for(const _0x1d3d94 of _0x1563b2['removed'])this['focusTracker']['remove'](_0x1d3d94['element']),this['keystrokes']['stopListening'](_0x1d3d94['element']);for(const _0x3b067f of Array['from'](_0x1563b2['added'])['reverse']())this['focusTracker']['add'](_0x3b067f['element']),this['keystrokes']['listenTo'](_0x3b067f['element']);});}}function rs(_0x2310fd,_0x26b676,_0x1afbec){let _0x2af8bc=0x0;for(const _0x9d6cea of _0x2310fd)switch(_0x9d6cea){case'insert':_0x26b676['add'](_0x1afbec['get'](_0x2af8bc),_0x2af8bc),_0x2af8bc++;break;case'delete':_0x26b676['remove'](_0x2af8bc);break;case'equal':_0x2af8bc++;}}class oe extends kt{constructor(_0x34ca81){super(_0x34ca81);const _0x455fa2=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x455fa2['to']('contextValue',_0x34cc5d=>N(_0x34ca81,'THREAD_CONTEXT_LABEL',_0x34cc5d)),'tabindex':-0x1},'children':[{'text':_0x455fa2['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5512ee,_0x2dc581){super(_0x5512ee);const _0x5ed35c=this['bindTemplate'];this['_model']=_0x2dc581,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x7659d8=>!!_0x7659d8),this['bind']('contextValue')['to'](this['_model'],'context',_0x1dd0ac=>_0x1dd0ac&&_0x1dd0ac['value']?this['_trimContextValue'](_0x1dd0ac['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x5ed35c['if']('hasContext','ck-context--quotes')]},'children':[this['contextView']]}]},{'tag':'div','attributes':{'class':['ck-annotation__actions']},'children':[this['reopenButtonView']]}]});}['render'](){super['render'](),this['_attachContextActions'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_createReopenButton'](){const _0x298ccb=new _0x49f2c7(this['locale']);return _0x298ccb['label']=N(this['locale'],'Reopen'),_0x298ccb['tooltip']=N(this['locale'],'Reopen'),_0x298ccb['icon']=_0x4a17ef,_0x298ccb['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4713fb=>!_0x4713fb),_0x298ccb['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x35aa24,_0x21f43d)=>_0x35aa24&&_0x21f43d),_0x298ccb['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x298ccb;}['_trimContextValue'](_0x40ef82){if(_0x40ef82['length']<0x96)return _0x40ef82;const _0x45ed53=_0x40ef82['lastIndexOf']('\x20',0x93);return _0x40ef82['substring'](0x0,_0x45ed53>-0x1?_0x45ed53:0x93)+'...';}['_attachContextActions'](){const _0x340967=this['element']['querySelector']('.ck-context'),_0x58f9fe=_0x340967['querySelector']('.ck-context__value');this['listenTo'](_0x340967,'mouseenter',()=>{_0x58f9fe['offsetWidth']<_0x58f9fe['scrollWidth']&&_0x340967['classList']['add']('overlay');}),this['listenTo'](_0x340967,'mouseleave',()=>{_0x340967['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3bd157 of this['focusables'])this['focusTracker']['add'](_0x3bd157['element']),this['keystrokes']['listenTo'](_0x3bd157['element']);}['_createContextView'](){const _0x16228f=new oe(this['locale']);return _0x16228f['bind']('contextValue')['to'](this),_0x16228f;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2eabb3,_0x33d820,_0x355ca5,_0x373df7){super(_0x2eabb3),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x33d820,this['_localUser']=_0x355ca5,this['_config']=_0x373df7,this['commentThreadHeaderView']=new Xt(_0x2eabb3,_0x33d820),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x2eabb3,N(_0x2eabb3,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2eabb3,_0x33d820,Object['assign']({'CommentView':this['_config']['CommentView']},_0x373df7)),this['commentsListView']['delegate']('removeComment')['to'](this),this['commentsListView']['delegate']('updateComment')['to'](this),this['commentsListView']['delegate']('resolveCommentThread')['to'](this),this['commentsListView']['delegate']('editorReady')['to'](this),this['commentsListView']['delegate']('editorDestroyed')['to'](this),this['commentsListView']['bind']('isActive')['to'](this),this['listenTo'](this,'resolveCommentThread',()=>{this['focus']();}),this['set']('length',this['commentsListView']['length']),this['bind']('length')['to'](this['commentsListView'],'length'),this['commentThreadInputView']=this['_createCommentThreadInputView'](),this['commentThreadInputView']['delegate']('editorReady')['to'](this),this['commentThreadInputView']['delegate']('editorDestroyed')['to'](this),this['on']('removeComment',()=>this['focus']()),this['bind']('isDirty')['to'](this['commentsListView'],'hasDirtyComment',this['commentThreadInputView']['commentInputView'],'value',(_0x423559,_0x23bfcd)=>_0x423559||!!_0x23bfcd),this['bind']('isUnlinked')['to'](_0x33d820,'unlinkedAt',_0x302e37=>!!_0x302e37),this['bind']('ariaLabel')['to'](this,'length',_0x30a5d5=>{const _0x240d6e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x30a5d5,_0x240d6e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e48e4=>_0x3e48e4['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x2ccb96=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x585086=_0x2ccb96['commentInputView'];return _0x2ccb96['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x585086,'value',(_0x25d42e,_0x309e4f,_0x440391,_0x4e609f,_0x253879)=>!!_0x253879||!!_0x4e609f&&_0x440391&&!_0x309e4f||_0x25d42e&&_0x440391&&!_0x309e4f),_0x585086['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3ba7f2,_0x578048,_0x22261e)=>{let _0x2a2593;return _0x2a2593=_0x22261e&&_0x578048?'Reply\x20to\x20reopen\x20discussion...':_0x3ba7f2?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x2a2593);}),_0x585086['bind']('submitLabel')['to'](this,'length',_0x4dc962=>N(this['locale'],_0x4dc962?'Reply':'Comment')),_0x585086['on']('submit',(_0x32f1f9,_0x22b74f)=>{this['fire']('addComment',_0x22b74f),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x585086['on']('cancel',()=>{this['focus']();}),_0x585086['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x585086['on']('cancel',_0x24be22=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x24be22['stop']());}),this['on']('change:isActive',(_0x330d66,_0xb9c603,_0x5c7b94)=>{_0x5c7b94||this['length']||_0x585086['value']||this['fire']('removeCommentThread');}),_0x2ccb96;}}class vt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x4397f7,_0x3b760a,_0x476ee8,_0x1c3dec){super(_0x4397f7,_0x3b760a,_0x476ee8,_0x1c3dec),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x4397f7,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x2749f2,_0x4d298a,_0x10fc14)=>{_0x10fc14||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5039d3,_0x2c888e,_0x381ec8)=>{_0x381ec8&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4d3e8b=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4d3e8b['if']('isActive','ck-thread--active'),_0x4d3e8b['if']('isUnlinked','ck-thread--unlinked'),_0x4d3e8b['if']('isConfirm','ck-thread--remove-confirmation'),_0x4d3e8b['to']('actionIndicator',_0xd81804=>_0xd81804?'ck-thread--'+_0xd81804:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4d3e8b['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id']},'children':[{'tag':'div','attributes':{'class':'ck-thread__container'},'children':this['commentThreadChildren']}]};}['render'](){super['render'](),this['containerElement']=this['element']['querySelector']('.ck-thread__container'),this['_model']['on']('change:archivedAt',()=>{this['_updateArchivedThreadHeader']();}),this['_updateArchivedThreadHeader']();}['_cancelAllConfirms'](){this['cancelConfirm']();for(const _0x4b160d of this['commentsListView']['commentViews'])_0x4b160d['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x31beec}=this,_0x1cde10=this['commentsListView']['commentViews']['get'](0x0);_0x1cde10===this['_boundFirstCommentView']||_0x1cde10['isSystemComment']||(this['_boundFirstCommentView']=_0x1cde10,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x1cde10,'actionIndicator',_0x36ec44=>'remove'===_0x36ec44?'remove':null),_0x1cde10['placeholder']=N(_0x31beec,'Write\x20a\x20comment...'),_0x1cde10['removeButton']['on']('execute',_0x5d6f13=>{_0x5d6f13['stop'](),this['showConfirm'](N(_0x31beec,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x1cde10['focus']();}),_0x1cde10['actionBar']['add'](this['resolveButton'],0x0),_0x1cde10['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x5c39de=new _0x21109b(this['locale']);return _0x5c39de['label']=N(this['locale'],'Resolve'),_0x5c39de['tooltip']=N(this['locale'],'Resolve'),_0x5c39de['icon']=_0x1299c5,_0x5c39de['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x5c39de['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3780ba=>!_0x3780ba),_0x5c39de['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x383af2,_0x4ed226)=>_0x383af2&&!_0x4ed226),_0x5c39de['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x5c39de;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x22d4dd){super(_0x22d4dd),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x40de0a,_0xc0d152,_0x31be35)=>{this['element']['innerHTML']=_0x31be35;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x513146,_0x1f321d,_0x53ae8f){super(_0x513146),this['_model']=_0x1f321d,this['_config']=_0x53ae8f,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x1f321d,'content',_0x1f321d,'authoredAt',(_0x239219,_0x5585e9)=>N(_0x513146,'COMMENT_ARIA_LABEL',[_0x1f321d['author']['name'],_0x53ae8f['formatDateTime'](_0x5585e9),new DOMParser()['parseFromString'](_0x239219,'text/html')['body']['textContent'],_0x1f321d['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0x513146,N(_0x513146,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xae5e8b(),this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x377930=>_0x377930['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x3b54e5=new is(this['locale']);return _0x3b54e5['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0xd7df45,_0x5931ba)=>_0x5931ba?ts(_0xd7df45,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0xd7df45),_0x3b54e5;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x27c718=new es(this['locale'],this['_config']['editorConfig']);return _0x27c718['value']=this['_model']['content'],_0x27c718['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x27c718['submitLabel']=N(this['locale'],'Save'),_0x27c718['on']('submit',(_0x14a44c,_0x1bf5ac)=>{this['fire']('updateComment',this['_model']['id'],_0x1bf5ac),this['switchToDisplayMode'](),this['focus']();}),_0x27c718['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x27c718['once']('editorReady',()=>{_0x27c718['focus']();}),_0x27c718['createEditor'](),_0x27c718['delegate']('editorReady')['to'](this),_0x27c718['delegate']('editorDestroyed')['to'](this),_0x27c718;}['_setupKeyboardNavigation'](){const _0x15ea07=this['element'];this['keystrokes']['listenTo'](_0x15ea07);for(const _0x4c56a8 of this['focusables'])this['focusTracker']['add'](_0x4c56a8['element']),this['keystrokes']['listenTo'](_0x4c56a8['element']);this['focusables']['on']('change',(_0x51a01d,_0x19ee70)=>{for(const _0x3c297c of _0x19ee70['removed'])this['focusTracker']['remove'](_0x3c297c['element']),this['keystrokes']['stopListening'](_0x3c297c['element']);for(const _0x8c85a9 of _0x19ee70['added'])this['focusTracker']['add'](_0x8c85a9['element']),this['keystrokes']['listenTo'](_0x8c85a9['element']);}),this['keystrokes']['set']('enter',(_0x228b7f,_0x19c401)=>{_0x15ea07===_0x228b7f['target']&&(this['focusCycler']['focusFirst'](),_0x19c401());}),this['keystrokes']['set']('esc',(_0x4f27fd,_0x47f078)=>{_0x15ea07!==_0x4f27fd['target']&&(this['focus'](),_0x47f078());});}}class gt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x18595a,_0xbfce03,_0x5c3863){super(_0x18595a,_0xbfce03,_0x5c3863),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x18595a,'Reply...')),this['bind']('authoredAt')['to'](_0xbfce03),this['bind']('resolvedAt')['to'](_0xbfce03),this['actionBar']=this['createCollection'](),this['isSystemComment']||(this['editButton']=this['_createEditButton'](),this['removeButton']=this['_createRemoveButton'](),this['items']=this['createCollection'](),this['items']['addMany']([this['editButton'],this['removeButton']]),this['dropdown']=this['_createDropdown'](),this['actionBar']['add'](this['dropdown']),this['focusables']['add'](this['dropdown'])),this['userView']=new _0x5de8e0(_0x18595a,_0xbfce03['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xbfce03,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x460cc5=this['bindTemplate'],_0x83f579=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x460cc5['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x460cc5['to']('authoredAt',_0x5debba=>this['_config']['formatDateTime'](_0x5debba))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x460cc5['if']('isEditMode','ck-comment__actions--hidden'),_0x460cc5['if']('isEditMode','ck-annotation__actions--hidden')]},'children':this['actionBar']},{'tag':'div','attributes':{'class':['ck-annotation__content-wrapper']},'children':this['visibleView']},this['ariaDescriptionView']];return this['_model']['isExternal']&&_0x83f579['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x460cc5['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x460cc5['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x460cc5['if']('isEditMode','ck-comment--edit'),_0x460cc5['if']('isSystemComment','ck-comment--info'),_0x460cc5['to']('actionIndicator',_0x15bfa3=>_0x15bfa3?'ck-comment--'+_0x15bfa3:'')],'data-author-id':this['_model']['author']['id'],'data-comment-id':this['_model']['id'],'role':'group'},'children':[this['userView'],{'tag':'div','attributes':{'class':['ck-comment__main','ck-annotation__main']},'children':_0x83f579}]}]};}['_createEditButton'](){const _0x349885=new _0x49f2c7(this['locale']);return _0x349885['label']=N(this['locale'],'Edit'),_0x349885['icon']=_0x7ba0fb,_0x349885['withText']=!0x0,_0x349885['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x349885['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x142603=>!_0x142603),_0x349885['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x349885['on']('execute',()=>this['switchToEditMode']()),_0x349885;}['_createRemoveButton'](){const _0x33cd48=new _0x49f2c7(this['locale']);return _0x33cd48['label']=N(this['locale'],'Remove'),_0x33cd48['icon']=_0x37d2b3,_0x33cd48['withText']=!0x0,_0x33cd48['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x33cd48['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x51cb4e=>!_0x51cb4e),_0x33cd48['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x33cd48['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x33cd48;}['_createDropdown'](){const _0x30eb6f=_0x12ae92(this['locale'],_0x11425f),_0x2bab78=_0x30eb6f['panelView']['children'],_0x1a5f1e=new _0x1a323c(this['locale']),_0x4ec3e0=_0x30eb6f['bindTemplate'];_0x4391eb(_0x30eb6f,()=>this['items']['find'](_0x46180d=>_0x46180d['isVisible'])),_0x30eb6f['extendTemplate']({'attributes':{'class':[_0x4ec3e0['if']('isVisible','ck-hidden',_0x1300c5=>!_0x1300c5)]}});const _0x409b4c=(_0x7a7d61,_0x3bec6d=-0x1)=>{const _0xc7c31f=new _0x8512b5(this['locale']);_0xc7c31f['children']['add'](_0x7a7d61);const _0x5a6b19=_0x3bec6d>-0x1?_0x3bec6d:_0x1a5f1e['items']['length'];_0x1a5f1e['items']['add'](_0xc7c31f,_0x5a6b19);const _0x31638d=Array['from'](this['items']);_0x30eb6f['unbind']('isEnabled','isVisible'),_0x30eb6f['bind']('isEnabled')['toMany'](_0x31638d,'isEnabled',(..._0xab3846)=>_0xab3846['some'](_0x462681=>_0x462681)),_0x30eb6f['bind']('isVisible')['toMany'](_0x31638d,'isVisible',(..._0x21ebde)=>_0x21ebde['some'](_0x3cbe18=>_0x3cbe18));};_0x30eb6f['panelPosition']='sw',_0x30eb6f['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x1fc351});for(const _0x455ac0 of this['items'])_0x409b4c(_0x455ac0);return _0x2bab78['add'](_0x1a5f1e),_0x30eb6f['listenTo'](this['items'],'add',(_0x312499,_0x1e4048,_0x38fde6)=>{_0x409b4c(_0x1e4048,_0x38fde6);}),_0x30eb6f['listenTo'](this['items'],'remove',(_0x3ca9b1,_0x100cc4,_0x5a1082)=>{_0x1a5f1e['items']['remove'](_0x5a1082);}),_0x30eb6f;}['_attachActions'](_0x8c2ce0,_0x136065){const _0x2008a2=_0x8c2ce0&&_0x8c2ce0['element'];_0x2008a2&&(this['listenTo'](_0x2008a2,'mouseenter',()=>this['actionIndicator']=_0x136065),this['listenTo'](_0x2008a2,'focus',()=>this['actionIndicator']=_0x136065),this['listenTo'](_0x2008a2,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x2008a2,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x149edf=super['_createCommentInputView']();return _0x149edf['bind']('placeholder')['to'](this),_0x149edf;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x404d18){const _0x3df5c6=Dt(_0x404d18,0x1e),_0x57af1d=new MutationObserver(_0x14376c=>{for(const _0x4999c4 of _0x14376c)('attributes'==_0x4999c4['type']&&'class'==_0x4999c4['attributeName']||'childList'==_0x4999c4['type']||'characterData'==_0x4999c4['type'])&&_0x3df5c6();});return{'attach'(_0x1f41f9){_0x57af1d['observe'](_0x1f41f9,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x57af1d['disconnect'](),_0x3df5c6['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x2ae51c,_0x4c0900){super(_0x2ae51c),this['id']=_0x58c8cf(),this['focusTracker']=new _0x199d2b(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x9be2f9,_0x16f996)=>this['fire']('Esc',_0x16f996)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4c0900),this['mainView']=_0x4c0900;const _0x256399=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x256399['if']('isActive','ck-annotation-wrapper--active')],'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['focusTracker']['add'](this['element']),this['keystrokes']['listenTo'](this['element']),this['_mutationObserver']['attach'](this['element']);}['destroy'](){this['content']['clear'](),this['keystrokes']['destroy'](),this['focusTracker']['destroy'](),this['_mutationObserver']['detach'](),super['destroy']();}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['_updateHeight'](){const _0x5972a3=this['element']['clientHeight'];_0x5972a3&&(this['height']=_0x5972a3);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x362d6f(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xabb344,target:_0x57123e,type:_0x10a661,isVisible:_0x584b63=!0x0}){super(),this['view']=_0xabb344,this['view']['element']||this['view']['render'](),this['_type']=_0x10a661,this['_target']=_0x57123e,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x23eb0b([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x24ad5c,_0x3b342d)=>{this['view']['focusTracker']['add'](_0x3b342d);}),this['focusableElements']['on']('remove',(_0x5869bf,_0x58eb43)=>{this['view']['focusTracker']['remove'](_0x58eb43);}),this['set']('isVisible',_0x584b63);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2d1b8a=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2d1b8a),_0x2d1b8a;}get['targetRect'](){const _0x2b8eb0=this['target'];if(null===_0x2b8eb0)return null;if(_0x2b8eb0 instanceof _0x37570f)return _0x2b8eb0;const _0x41c2c2=_0x2b8eb0['filter'](_0x4eb7a6=>function(_0x4bea57){const _0x1b3db3=_0x4bea57['offsetParent'];if(_0x1b3db3)return!0x0;const _0x5a825f=_0x4bea57['getClientRects']()['item'](0x0);return!!_0x5a825f;}(_0x4eb7a6));return 0x0===_0x41c2c2['length']?null:new _0x37570f(_0x41c2c2[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x66ba35){this['view']['isActive']=_0x66ba35,this['view']['mainView']['isActive']=_0x66ba35;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x3a5d36){if(!(null===_0x3a5d36||_0x3a5d36 instanceof _0x37570f||Array['isArray'](_0x3a5d36)&&_0x3a5d36['every'](_0x113c26=>fi(_0x113c26))))throw new _0x51f518('annotation-invalid-target',null,{'target':_0x3a5d36});}['_getNormalizedTarget'](){const _0x1897b8='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x1897b8)?[_0x1897b8]:_0x1897b8;}}function fi(_0x181e43){return null!==_0x181e43&&'object'==typeof _0x181e43&&'nodeType'in _0x181e43&&0x1===_0x181e43['nodeType'];}class S extends _0x23eb0b{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x51f360=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x199d2b(),this['_focusTracker']['on']('change:isFocused',(_0x45ffad,_0xc44ef7,_0x75255e)=>{_0x75255e||this['fire']('blur');});for(const _0x44814e of _0x51f360)this['add'](_0x44814e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x4aeb69){if(this['has'](_0x4aeb69))throw new _0x51f518('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x4aeb69['innerView'],_0x4aeb69),this['_viewToAnnotation']['set'](_0x4aeb69['view'],_0x4aeb69);for(const _0x4e42e5 of _0x4aeb69['focusableElements'])this['_focusTracker']['add'](_0x4e42e5);this['listenTo'](_0x4aeb69['focusableElements'],'add',(_0x41ce78,_0x16bdff)=>{this['_focusTracker']['add'](_0x16bdff);}),this['listenTo'](_0x4aeb69['focusableElements'],'remove',(_0x8aef8b,_0x16583f)=>{this['_focusTracker']['remove'](_0x16583f);}),this['listenTo'](_0x4aeb69['view']['focusTracker'],'change:isFocused',(_0x1b7dec,_0x12c2de,_0xada6d5)=>{_0xada6d5&&this['fire']('focus',_0x4aeb69);}),_0x4aeb69['updateTargetRect']();const _0x55ce2e=this['_getOrderInContent'](_0x4aeb69['view']['targetRect']);return super['add'](_0x4aeb69,_0x55ce2e);}['remove'](_0x50b277){if(!this['has'](_0x50b277))throw new _0x51f518('annotationcollection-not-existing-item',null);this['stopListening'](_0x50b277['view']['focusTracker']),this['stopListening'](_0x50b277['focusableElements']);for(const _0x556a16 of _0x50b277['focusableElements'])this['_focusTracker']['remove'](_0x556a16);return this['_viewToAnnotation']['delete'](_0x50b277['view']),this['_innerViewToAnnotation']['delete'](_0x50b277['innerView']),super['remove'](_0x50b277);}['getByInnerView'](_0x2e5f43){return this['_innerViewToAnnotation']['get'](_0x2e5f43);}['getByView'](_0x308293){return this['_viewToAnnotation']['get'](_0x308293);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x36b66a of this)_0x36b66a['updateTargetRect']();this['_sort']();}['_sort'](){const _0x8347e4=Array['from'](this)['sort']((_0x1037ef,_0x16f600)=>w(_0x1037ef['view']['targetRect'],_0x16f600['view']['targetRect']));for(let _0x11727c=_0x8347e4['length']-0x1;_0x11727c>0x0;_0x11727c--){const _0x46ff38=_0x8347e4[_0x11727c];_0x11727c!==this['getIndex'](_0x46ff38)&&(this['remove'](_0x46ff38),this['add'](_0x46ff38));}}['_getOrderInContent'](_0x477153){let _0xd802ce=0x0;if(!_0x477153)return this['length'];for(const _0x35654e of this){const _0x2c0828=_0x35654e['view']['targetRect'];if(_0x2c0828){if(w(_0x477153,_0x2c0828)<0x0)return _0xd802ce;_0xd802ce++;}}return _0xd802ce;}}function v({source:_0xc92d1,target:_0x2b7dfc,filter:_0x8044f3}){for(const _0x289e54 of _0xc92d1)_0x8044f3(_0x289e54)&&_0x2b7dfc['add'](_0x289e54);_0x2b7dfc['listenTo'](_0xc92d1,'add',(_0x9c451d,_0x1648ec)=>{_0x8044f3(_0x1648ec)&&_0x2b7dfc['add'](_0x1648ec);}),_0x2b7dfc['listenTo'](_0xc92d1,'remove',(_0x1497bf,_0x34f95b)=>{_0x2b7dfc['has'](_0x34f95b)&&_0x2b7dfc['remove'](_0x34f95b);});}function w(_0x3706bc,_0x9e6a65){if(null===_0x3706bc&&null===_0x9e6a65)return 0x0;if(null===_0x3706bc)return-0x1;if(null===_0x9e6a65)return 0x1;const _0x48a7f6=_0x3706bc['top']-_0x9e6a65['top'];return 0x0==_0x48a7f6?_0x3706bc['left']-_0x9e6a65['left']:_0x48a7f6;}class y extends _0x2738de{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1c1819){if(super(_0x1c1819),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1c1819 instanceof _0x2d455d){const _0x3184f2=_0x1c1819['locale'];_0x1c1819['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x3184f2,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x558bff){this['collection']['add'](_0x558bff);}['remove'](_0x8a65c4){this['collection']['remove'](_0x8a65c4),_0x8a65c4['destroy']();}['refreshVisibility'](){for(const _0x3cd316 of this['collection'])_0x3cd316['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x3457a6){return this['collection']['getByInnerView'](_0x3457a6);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x14cc2e of this['collection'])_0x14cc2e['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x45995d){this['fire']('_activateAnnotation',_0x45995d);}['createAnnotation'](_0x3e1ec7){return new T(_0x3e1ec7);}['createAnnotationView'](_0x59f401,_0x108475){return new E(_0x59f401,_0x108475);}['_addActiveAnnotation'](_0x35ab62){const _0x1d7b61=new Set(this['activeAnnotations']);_0x1d7b61['add'](_0x35ab62),this['activeAnnotations']=_0x1d7b61;}['_removeActiveAnnotation'](_0x17ba59){const _0x39fff0=new Set(this['activeAnnotations']);_0x39fff0['delete'](_0x17ba59),this['activeAnnotations']=_0x39fff0;}['_bindAnnotationsToVisibleAnnotations'](){const _0x1a2c3e=this['collection'],_0x34640a=this['_visibleAnnotations'];function _0x377b0b(_0x59485b){const _0x503e66=_0x59485b['source'];_0x503e66['isVisible']&&!_0x34640a['has'](_0x503e66)?_0x34640a['add'](_0x503e66):!_0x503e66['isVisible']&&_0x34640a['has'](_0x503e66)&&_0x34640a['remove'](_0x503e66),_0x503e66['view']['focusTracker']['remove'](_0x503e66['view']['element']),_0x503e66['view']['focusTracker']['add'](_0x503e66['view']['element']);}this['listenTo'](_0x1a2c3e,'add',(_0x5853e2,_0x1d2c4b)=>{_0x1d2c4b['isVisible']&&_0x34640a['add'](_0x1d2c4b),this['listenTo'](_0x1d2c4b,'change:isVisible',_0x377b0b);}),this['listenTo'](_0x1a2c3e,'remove',(_0x35eb37,_0x11da15)=>{_0x34640a['has'](_0x11da15)&&_0x34640a['remove'](_0x11da15),this['stopListening'](_0x11da15,'change:isVisible',_0x377b0b);});}['_setupEnterAnnotationKeystroke'](){const _0x5ef4d7=_0x203300=>{_0x203300['on']('ready',()=>{_0x203300['keystrokes']['set'](_0xe143ff,(_0x21f83c,_0x1cc960)=>{const _0x13c99b=_0x5ae716(this['activeAnnotations']['values']());_0x13c99b&&(_0x13c99b['view']['focus'](),_0x1cc960());});});};this['context']instanceof _0x2d455d?_0x5ef4d7(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x1dd5b1,_0x49977a)=>{_0x5ef4d7(_0x49977a);});}['_setupEscapeAnnotationHandling'](){const _0x540509=_0x2b4260=>{const _0x527fe6=_0x2b4260['source'],_0x257217=[];let _0x4cc4fe;if(Array['isArray'](_0x527fe6['target'])){_0x4cc4fe=_0x527fe6['target'][0x0],this['context']instanceof _0x2d455d?_0x257217['push'](this['context']):this['context']['editors']&&_0x257217['push'](...this['context']['editors']);for(const _0x1bad81 of _0x257217)for(const _0x58a2f5 of _0x1bad81['editing']['view']['domRoots']['values']())if(_0x58a2f5['contains'](_0x4cc4fe))return void _0x1bad81['editing']['view']['focus']();_0x4cc4fe['focus']();}};this['listenTo'](this['collection'],'add',(_0x434e27,_0x5a5748)=>{this['listenTo'](_0x5a5748,'escape',_0x540509,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x1c7268,_0xa3732d)=>{this['stopListening'](_0xa3732d,'escape',_0x540509);});}}const Tt=Symbol('noChannel'),_t={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x2738de{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2189fb){super(_0x2189fb),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0xf8db43=this['context']['config'];_0xf8db43['define']('comments.maxCommentsWhenCollapsed',0x2),_0xf8db43['define']('comments.maxThreadTotalWeight',0x1f4),_0xf8db43['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0xf8db43['define']('comments.CommentThreadView',vt),_0xf8db43['define']('comments.CommentView',gt),_0xf8db43['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x4637ff=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x25f8f4,_0xfdf477)=>this['_addCommentThread'](_0xfdf477)),this['on']('submitCommentThread',(_0x27e6e7,_0x398aec)=>this['_submitCommentThread'](_0x398aec)),this['on']('resolveCommentThread',(_0x21a241,_0x23e40e)=>this['_resolveCommentThread'](_0x23e40e)),this['on']('resolveCommentThread',(_0x45f8fd,_0x1e5ab3)=>this['_updateActiveAnnotation'](_0x1e5ab3),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2e693d,_0x488f7d)=>this['_reopenCommentThread'](_0x488f7d)),this['on']('reopenCommentThread',(_0x5acf4f,_0x38be5e)=>this['_updateActiveAnnotation'](_0x38be5e),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x352133,_0x13696f)=>this['_removeCommentThread'](_0x13696f)),this['on']('updateCommentThread',(_0x478c79,_0x377d2c)=>this['_updateCommentThread'](_0x377d2c)),this['on']('updateCommentThread',(_0x49e647,_0x5222e4)=>this['_updateActiveAnnotation'](_0x5222e4),{'priority':'lowest'}),this['on']('addComment',(_0x113143,_0x51fa46)=>this['_addComment'](_0x51fa46)),this['on']('updateComment',(_0x44aa4e,_0x139b07)=>this['_updateComment'](_0x139b07)),this['on']('removeComment',(_0x44d111,_0x35077b)=>this['_removeComment'](_0x35077b)),this['on']('addComment',(_0x4aaa47,{threadId:_0xe666bc,isFromAdapter:_0x323405})=>{if(_0x323405)return;const _0x52afb2=this['getCommentThread'](_0xe666bc),_0x133432=_0x52afb2&&this['_threadToController']['get'](_0x52afb2);_0x133432&&_0x133432['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x4637ff,'change:activeAnnotations',(_0xa43b36,_0x43fad2,_0x5acfed)=>{const _0xabab52=Array['from'](_0x5acfed)['map'](_0x2df9a3=>this['_viewToController']['get'](_0x2df9a3['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0xabab52?_0xabab52['model']:null;});}set['adapter'](_0x52bb22){if(this['_adapter'])throw new _0x51f518('commentsrepository-adapter-already-set');this['_adapter']=_0x52bb22;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x14100c=Tt,threadId:_0x3da65b=_0x58c8cf(),comments:_0x36aaf3=[],unlinkedAt:_0x48c557=null,resolvedAt:_0xad02d2=null,resolvedBy:_0x16e0f0=null,target:_0x965374=null,context:_0x519099=null,attributes:_0x3d2bcb={},isResolvable:_0x31ef28=!0x0,isSubmitted:_0x5dd40d=!0x1,isFromAdapter:_0x5b8f79=!0x1}={}){return this['fire'](bt('addCommentThread',_0x14100c),{'channelId':_0x14100c,'threadId':_0x3da65b,'comments':_0x36aaf3,'unlinkedAt':_0x48c557,'resolvedAt':_0xad02d2,'resolvedBy':_0x16e0f0,'target':_0x965374,'context':_0x519099,'attributes':_0x3d2bcb,'isFromAdapter':_0x5b8f79,'isResolvable':_0x31ef28,'isSubmitted':_0x5dd40d}),this['getCommentThread'](_0x3da65b);}['openNewCommentThread']({channelId:_0x41a9d0=Tt,threadId:_0x1402f3=_0x58c8cf(),target:_0x422eaf,context:_0x13ac01=null,isResolvable:_0x2edff3=!0x0}){if(this['_readOnlyChannels']['has'](_0x41a9d0)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x422eaf)throw new _0x51f518('commentsrepository-missing-target');const _0x29b16e=this['addCommentThread']({'channelId':_0x41a9d0,'threadId':_0x1402f3,'target':_0x422eaf,'context':_0x13ac01,'isResolvable':_0x2edff3});if(!_0x29b16e)return null;const _0x241c18=this['_threadToController']['get'](_0x29b16e),_0x2a6222=_0x241c18['view']['commentThreadInputView']['commentInputView'],_0x55fb24=this['context']['plugins']['get'](y),_0x10d919=_0x55fb24['getByInnerView'](_0x241c18['view']);return _0x55fb24['activate'](_0x10d919),_0x2a6222['once']('editorReady',()=>_0x2a6222['focus']()),_0x29b16e;}['hasCommentThread'](_0x25a29d){if('string'!=typeof _0x25a29d)throw new _0x51f518('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x25a29d);}['updateCommentThread']({channelId:_0x233296=Tt,threadId:_0x2e2fd1,context:_0x35dd7d,unlinkedAt:_0x537293,attributes:_0x45ac67,isFromAdapter:_0x23e0cb=!0x1}){return this['fire'](bt('updateCommentThread',_0x233296),{'channelId':_0x233296,'threadId':_0x2e2fd1,'context':_0x35dd7d,'unlinkedAt':_0x537293,'attributes':_0x45ac67,'isFromAdapter':_0x23e0cb}),this['getCommentThread'](_0x2e2fd1);}['getCommentThread'](_0x2c8a31){if('string'!=typeof _0x2c8a31)throw new _0x51f518('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2c8a31);}['fetchCommentThread']({channelId:_0x4bc493,threadId:_0x5bacd2}={}){const _0x4a2731=this['getCommentThread'](_0x5bacd2);if(_0x4a2731)return Promise['resolve'](_0x4a2731);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x51f518('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x4bc493,'threadId':_0x5bacd2})['then'](_0x15a5c5=>this['hasCommentThread'](_0x5bacd2)?this['getCommentThread'](_0x5bacd2):_0x15a5c5?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x4bc493},_0x15a5c5)):void 0x0)['catch'](_0x3372d7=>{throw console['error'](_0x3372d7),new _0x51f518('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x199d77,skipNotAttached:_0xb09ee7=!0x1,skipEmpty:_0x512340=!0x1,toJSON:_0x1d01f8=!0x1}={}){const _0x14ddd4=[];for(const _0x14997b of this['_threads']['values']())_0x199d77&&_0x14997b['channelId']!==_0x199d77||_0xb09ee7&&!_0x14997b['isAttached']||_0x512340&&0x0===_0x14997b['length']||_0x14ddd4['push'](_0x14997b);return _0x1d01f8?_0x14ddd4['map'](_0x472cb1=>_0x472cb1['toJSON']()):_0x14ddd4;}['getAnnotationForCommentThread'](_0x186709){const _0x271c18=this['_threadToController']['get'](_0x186709);if(!_0x271c18)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x271c18['view'])||null;}['getCommentThreadForAnnotation'](_0x2b14c9){const _0xcafdc4=this['_viewToController']['get'](_0x2b14c9['innerView']);return _0xcafdc4?_0xcafdc4['model']:null;}['setActiveCommentThread'](_0x556939){const _0x1c7b7c=this['context']['plugins']['get'](y);if(!_0x556939)return void(this['activeCommentThread']&&_0x1c7b7c['deactivateAll']());const _0xf2d589=this['getCommentThread'](_0x556939);if(!_0xf2d589)throw new _0x51f518('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x556939});if(!this['_threadToController']['has'](_0xf2d589))throw new _0x51f518('commentsrepository-active-not-attached',null,{'threadId':_0x556939});const _0x37e671=_0x1c7b7c['getByInnerView'](this['_threadToController']['get'](_0xf2d589)['view']);_0x1c7b7c['activate'](_0x37e671);}['switchReadOnly'](_0x4f8c3f,_0x1e69a2){_0x4f8c3f?this['_readOnlyChannels']['add'](_0x1e69a2):this['_readOnlyChannels']['delete'](_0x1e69a2),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x57b83a){return this['_readOnlyChannels']['has'](_0x57b83a)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x28507a,_0x172478){return new yt(_0x28507a,_0x172478);}['setPermissions'](_0x140b3d,_0x151f65=Tt){this['_permissions']['set'](_0x151f65,_0x140b3d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4cf6cf=Tt){return this['_permissions']['has'](_0x4cf6cf)?this['_permissions']['get'](_0x4cf6cf):_t;}['_addCommentThread']({channelId:_0x8dac15,threadId:_0x589079,comments:_0x18c7f6,unlinkedAt:_0x157a04,resolvedAt:_0x20a5c8,resolvedBy:_0x48f571,target:_0x53e29c,context:_0x44a01a,attributes:_0x1e5443,isFromAdapter:_0x4db917,isResolvable:_0x13e2cb,isSubmitted:_0x1b175b}){if('string'!=typeof _0x589079)throw new _0x51f518('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x589079});if(this['hasCommentThread'](_0x589079))throw new _0x51f518('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x589079});const _0x182c66=new pi(this,{'channelId':_0x8dac15,'id':_0x589079,'context':_0x44a01a,'attributes':_0x1e5443,'unlinkedAt':_0x157a04,'resolvedAt':_0x20a5c8,'resolvedBy':_0x48f571?this['context']['plugins']['get'](it)['getUser'](_0x48f571):null,'isResolvable':_0x13e2cb,'isSubmitted':_0x1b175b||_0x4db917});this['_threads']['set'](_0x589079,_0x182c66);for(const _0x243f40 of _0x18c7f6)_0x182c66['_add'](this['_createNewComment']({'threadId':_0x589079,..._0x243f40}));return _0x53e29c&&_0x182c66['attachTo'](_0x53e29c),_0x4db917||!_0x182c66['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x8dac15,'threadId':_0x589079});}['_submitCommentThread']({channelId:_0x4b989b,threadId:_0x62ce9e}){if(!this['hasCommentThread'](_0x62ce9e))throw new _0x51f518('commentsrepository-missing-comment-thread',this);const _0x1ba518=this['getCommentThread'](_0x62ce9e);if(_0x1ba518['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x2751f7,comments:_0x52c8b4,resolvedAt:_0x6a4f04,resolvedBy:_0xe23ab,context:_0x537735,attributes:_0xbf8b16}=_0x1ba518,_0x165c5a=this['context']['plugins']['get']('PendingActions'),_0x469060=_0x165c5a['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x4b989b,'threadId':_0x2751f7,'comments':_0x52c8b4['map'](_0x55f4cd=>_0x55f4cd['toJSON']()),'resolvedAt':_0x6a4f04,'resolvedBy':_0xe23ab?_0xe23ab['id']:_0xe23ab,'context':_0x537735,'attributes':_0xbf8b16})['then'](({comments:_0x306793})=>{_0x165c5a['remove'](_0x469060);for(const _0x8f6322 of _0x306793)this['_updateComment']({'channelId':_0x4b989b,'threadId':_0x62ce9e,'commentId':_0x8f6322['commentId'],'createdAt':_0x8f6322['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x555493=>{throw console['error'](_0x555493),new _0x51f518('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x37518d,target:_0x4dbde1}){const _0xcc32d2=this['getCommentThread'](_0x37518d);if(!_0xcc32d2)throw new _0x51f518('commentsrepository-attach-missing-comment-thread',this);const _0x1420df=this['context']['plugins']['get']('PendingActions'),_0x197b6f=this['context']['plugins']['get'](y),_0x590010=this['_createCommentThreadView'](_0xcc32d2),_0x3e52ca=new yt(_0xcc32d2,_0x590010);let _0x184341=null;_0x590010['on']('change:isDirty',(_0x278e51,_0x23d752,_0x2b068a)=>{_0x2b068a?_0x184341=_0x1420df['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x184341&&(_0x1420df['remove'](_0x184341),_0x184341=null);}),this['_threadToController']['set'](_0xcc32d2,_0x3e52ca),this['_viewToController']['set'](_0x590010,_0x3e52ca);const _0x473377=new E(this['context']['locale'],_0x590010);_0x473377['bind']('length')['to'](_0x590010),_0x473377['bind']('isDirty')['to'](_0x590010,'isDirty',_0x590010,'length',(_0x13872e,_0x1e4a6e)=>_0x13872e||!_0x1e4a6e),_0x473377['bind']('isActive')['to'](_0x590010),_0x473377['type']='comment';const _0x476453=new T({'view':_0x473377,'target':_0x4dbde1,'type':'comment','isVisible':!_0xcc32d2['archivedAt']});return _0x590010['on']('escape',()=>{_0x476453['fire']('escape');}),this['_bindAnnotationToEditors'](_0x590010,_0x476453),_0x197b6f['add'](_0x476453),_0x476453;}['_bindAnnotationToEditors'](_0x205bc0,_0x345069){this['listenTo'](_0x205bc0,'editorReady',(_0xd91161,_0x86fc62)=>{const _0x12fd99=_0x86fc62['ui']['view']['body']['bodyCollectionContainer'];_0x345069['focusableElements']['add'](_0x12fd99),this['context']instanceof _0x2d455d&&this['context']['ui']['focusTracker']['add'](_0x12fd99);},{'priority':'highest'}),this['listenTo'](_0x205bc0,'editorDestroyed',(_0x49cd39,_0x34f75c)=>{const _0x1d16a6=_0x34f75c['ui']['view']['body']['bodyCollectionContainer'];_0x345069['focusableElements']['has'](_0x1d16a6)&&_0x345069['focusableElements']['remove'](_0x1d16a6),this['context']instanceof _0x2d455d&&this['context']['ui']['focusTracker']['remove'](_0x1d16a6);});}['_unbindEditors'](_0x42135e){this['stopListening'](_0x42135e,'editorReady'),this['stopListening'](_0x42135e,'editorDestroyed');}['_createCommentThreadView'](_0x3f5f0a){const _0x41bbb2=this['context']['plugins']['get'](it),{config:_0x4e4c48,locale:_0x5cb05d}=this['context'],_0x227378=lt(_0x4e4c48['get']('locale'),_0x5cb05d);return new(0x0,(_0x4e4c48['get']('comments'))['CommentThreadView'])(_0x5cb05d,_0x3f5f0a,_0x41bbb2['me'],{'editorConfig':{..._0x4e4c48['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4e4c48['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4e4c48['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4e4c48['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4e4c48['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x227378,'CommentView':_0x4e4c48['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28a9f7,channelId:_0x2cc95a,resolvedAt:_0x4e05dd,resolvedBy:_0x3db949,isFromAdapter:_0x3505c9}){if(!this['hasCommentThread'](_0x28a9f7))throw new _0x51f518('commentsrepository-missing-comment-thread',null,{'threadId':_0x28a9f7});const _0x10ad1f=this['getCommentThread'](_0x28a9f7);if(_0x10ad1f['isResolved'])throw new _0x51f518('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28a9f7});const _0x5d6dc7=this['context']['plugins']['get'](it);if(_0x10ad1f['resolvedBy']=_0x5d6dc7['getUser'](_0x3db949),_0x10ad1f['resolvedAt']=_0x4e05dd,_0x3505c9||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x2844e4=this['context']['plugins']['get']('PendingActions'),_0x24bbec=_0x2844e4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x2cc95a,'threadId':_0x28a9f7})['then'](({resolvedAt:_0x433caf,resolvedBy:_0x2eb714})=>{_0x2844e4['remove'](_0x24bbec),_0x10ad1f['resolvedBy']['id']!==_0x2eb714&&(_0x10ad1f['resolvedBy']=_0x5d6dc7['getUser'](_0x2eb714)),_0x10ad1f['resolvedAt']=_0x433caf;})['catch'](_0x50d21a=>{throw console['error'](_0x50d21a),new _0x51f518('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x592403,channelId:_0x2777a8,isFromAdapter:_0x43a70c}){if(!this['hasCommentThread'](_0x592403))throw new _0x51f518('commentsrepository-missing-comment-thread',null,{'threadId':_0x592403});const _0x5ab5be=this['getCommentThread'](_0x592403);if(!_0x5ab5be['isResolved'])throw new _0x51f518('commentsrepository-reopen-comment-thread',null,{'threadId':_0x592403});if(_0x5ab5be['resolvedBy']=null,_0x5ab5be['resolvedAt']=null,_0x43a70c||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5cec97=this['context']['plugins']['get']('PendingActions'),_0x405989=_0x5cec97['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2777a8,'threadId':_0x592403})['then'](()=>_0x5cec97['remove'](_0x405989))['catch'](_0x3305f1=>{throw console['error'](_0x3305f1),new _0x51f518('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x5b3339,isFromAdapter:_0x368ed6}){const _0x45776b=this['getCommentThread'](_0x5b3339);if(!_0x45776b)throw new _0x51f518('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x5b3339),this['_threads']['delete'](_0x5b3339),!_0x45776b['isSubmitted']||_0x368ed6||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x523e56=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3412e2}=_0x45776b,_0x3c6f94=_0x523e56['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3412e2,'threadId':_0x5b3339})['then'](()=>_0x523e56['remove'](_0x3c6f94))['catch'](_0x15e113=>{throw console['error'](_0x15e113),new _0x51f518('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x21b4f1,unlinkedAt:_0x36cf82,context:_0x2239ac,attributes:_0x1489ac,isFromAdapter:_0x3c3d10}){if('string'!=typeof _0x21b4f1)throw new _0x51f518('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x21b4f1});if(!this['hasCommentThread'](_0x21b4f1))throw new _0x51f518('commentsrepository-missing-comment-thread',null,{'threadId':_0x21b4f1});const _0x5e9681=this['getCommentThread'](_0x21b4f1);let _0x5d2966=!0x1;if(void 0x0!==_0x2239ac&&_0x5e9681['context']!==_0x2239ac&&(_0x5e9681['context']=_0x2239ac,_0x5d2966=!0x0),void 0x0!==_0x36cf82&&_0x5e9681['unlinkedAt']!==_0x36cf82&&(_0x5e9681['unlinkedAt']=_0x36cf82,_0x5d2966=!0x0),_0x1489ac&&!wt(_0x1489ac,_0x5e9681['attributes'])&&(_0x5e9681['attributes']=_0x1489ac,_0x5d2966=!0x0),!_0x5d2966)return Promise['resolve']();if(!_0x5e9681['isSubmitted']||_0x3c3d10||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x5732a8=this['context']['plugins']['get']('PendingActions'),{channelId:_0x180ad2}=_0x5e9681,_0x37a235=_0x5732a8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x180ad2,'threadId':_0x21b4f1,'context':_0x2239ac,'unlinkedAt':_0x36cf82,'attributes':_0x1489ac})['then'](()=>_0x5732a8['remove'](_0x37a235))['catch'](_0x27e801=>{throw console['error'](_0x27e801),new _0x51f518('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4cec05){const _0x28b78f=this['context']['plugins']['get'](y),_0x1577b1=this['getCommentThread'](_0x4cec05);if(_0x1577b1['_isAttached']=!0x1,this['_threadToController']['has'](_0x1577b1)){const _0x427069=this['_threadToController']['get'](_0x1577b1),_0x4b5f8d=_0x427069['view'],_0xa718e8=_0x28b78f['getByInnerView'](_0x4b5f8d);this['_threadToController']['delete'](_0x1577b1),this['_viewToController']['delete'](_0x4b5f8d),_0xa718e8&&_0x28b78f['remove'](_0xa718e8),_0x427069['destroy'](),_0x4b5f8d['destroy']()['then'](()=>{this['_unbindEditors'](_0x4b5f8d);});}}['_updateActiveAnnotation']({threadId:_0x1d27a0,resolvedAt:_0x941e35,unlinkedAt:_0x37d818}){const _0x58fcc3=!!_0x941e35,_0x141303=this['context']['plugins']['get'](y),_0x37ec62=this['getCommentThread'](_0x1d27a0);if(this['_threadToController']['has'](_0x37ec62)){const _0xd141f8=this['_threadToController']['get'](_0x37ec62)['view'],_0x3fbe15=_0x141303['getByInnerView'](_0xd141f8);_0x3fbe15&&(_0x58fcc3&&_0x141303['_removeActiveAnnotation'](_0x3fbe15),_0x37d818?_0x3fbe15['isVisible']=!0x1:_0x3fbe15['refreshVisibility']());}}['_getExternalAuthor'](_0x2f46f8){const _0x394c9d=this['context']['plugins']['get'](it),_0x73c7eb=pt('external:'+_0x2f46f8),_0x2fdb3f=_0x394c9d['getUser'](_0x73c7eb);return _0x2fdb3f||_0x394c9d['addUser']({'id':_0x73c7eb,'name':_0x2f46f8});}['_createNewComment']({threadId:_0x2007bc,commentId:_0x215293=_0x58c8cf(),content:_0x1ad48d,authorId:_0x16fb5f,createdAt:_0x4494be,attributes:_0x1f8c0f}){if('string'!=typeof _0x215293)throw new _0x51f518('commentsrepository-invalid-commentid');if('string'!=typeof _0x16fb5f)throw new _0x51f518('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1ad48d||!_0x1ad48d['trim']())throw new _0x51f518('commentsrepository-invalid-comment-content');const _0x2629d5=this['context']['plugins']['get'](it)['getUser'](_0x16fb5f);if(!_0x2629d5)throw new _0x51f518('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x16fb5f});let _0xe07fec=null,_0x123150=_0x4494be;return _0x1f8c0f?.['@external']&&(_0xe07fec=this['_getExternalAuthor'](_0x1f8c0f['@external']['authorName']),_0x123150=new Date(_0x1f8c0f['@external']['createdAt'])),new wi(this,{'threadId':_0x2007bc,'id':_0x215293,'author':_0xe07fec||_0x2629d5,'creator':_0x2629d5,'content':_0x1ad48d,'createdAt':_0x4494be,'authoredAt':_0x123150,'attributes':_0x1f8c0f});}['_addComment'](_0x22f843){let {threadId:_0x524e26,content:_0x151f1c,attributes:_0x3f7499,isFromAdapter:_0x3cefed}=_0x22f843;const _0x13e2d0=this['getCommentThread'](_0x22f843['threadId']);if(!_0x13e2d0)throw new _0x51f518('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x58c2c2=this['_createNewComment'](_0x22f843),{id:_0x1e3c40}=_0x58c2c2;if(_0x13e2d0['_add'](_0x58c2c2),_0x3cefed||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x13e2d0['isSubmitted'])return Promise['resolve']();const _0x32bd43=this['context']['plugins']['get']('PendingActions'),{channelId:_0x398e5c}=_0x13e2d0,_0xb9c047=_0x32bd43['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3f7499||(_0x3f7499={}),this['adapter']['addComment']({'channelId':_0x398e5c,'threadId':_0x524e26,'commentId':_0x1e3c40,'content':_0x151f1c,'attributes':_0x3f7499})['then'](_0x21cd52=>{_0x32bd43['remove'](_0xb9c047),_0x21cd52&&this['_updateComment']({'channelId':_0x398e5c,'threadId':_0x524e26,'commentId':_0x1e3c40,'createdAt':_0x21cd52['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3b93ac=>{throw console['error'](_0x3b93ac),new _0x51f518('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x200dc9,commentId:_0x486670,content:_0x26f6fb,createdAt:_0x3d9c7e,attributes:_0x18908f,isFromAdapter:_0xb0198c}){if(void 0x0!==_0x26f6fb&&('string'!=typeof _0x26f6fb||!_0x26f6fb['trim']()['length']))throw new _0x51f518('commentsrepository-update-comment-invalid-content');const _0x2332a8=this['getCommentThread'](_0x200dc9),_0x36f97e=_0x2332a8['getComment'](_0x486670);if(!_0x36f97e)throw new _0x51f518('commentsrepository-update-missing-comment',this);let _0x598dc7=!0x1;if(_0x26f6fb&&_0x26f6fb!==_0x36f97e['content']&&(_0x36f97e['isEditable']||_0xb0198c)&&(_0x36f97e['content']=_0x26f6fb,_0x598dc7=!0x0),_0x3d9c7e&&_0x3d9c7e!==_0x36f97e['createdAt']&&(_0x36f97e['createdAt']=_0x3d9c7e,_0x36f97e['attributes']&&_0x36f97e['attributes']['@external']||(_0x36f97e['authoredAt']=_0x3d9c7e),_0x598dc7=!0x0),_0x18908f&&!wt(_0x18908f,_0x36f97e['attributes'])&&(_0x36f97e['attributes']=_0x18908f,_0x598dc7=!0x0),!_0x598dc7)return Promise['resolve']();if(_0x2332a8['fire']('commentUpdated'),_0xb0198c||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x4108f4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x56b1c6}=this['getCommentThread'](_0x36f97e['threadId']),_0xa16045=_0x4108f4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x56b1c6,'threadId':_0x200dc9,'commentId':_0x486670,'content':_0x26f6fb,'attributes':_0x18908f})['then'](()=>_0x4108f4['remove'](_0xa16045))['catch'](_0x514714=>{throw console['error'](_0x514714),new _0x51f518('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x9ca79c,commentId:_0x31180a,isFromAdapter:_0x14516d}){const _0x230c98=this['getCommentThread'](_0x9ca79c),_0x53e93b=_0x230c98['getComment'](_0x31180a);if(!_0x53e93b)throw new _0x51f518('commentsrepository-remove-missing-comment',this);if(_0x230c98['_remove'](_0x53e93b),_0x14516d||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3bd3a4=this['context']['plugins']['get']('PendingActions'),{channelId:_0x57a541}=_0x230c98,_0x2383b0=_0x3bd3a4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x57a541,'threadId':_0x9ca79c,'commentId':_0x31180a})['then'](()=>_0x3bd3a4['remove'](_0x2383b0))['catch'](_0x115f1e=>{throw console['error'](_0x115f1e),new _0x51f518('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x362d6f(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x50ba7e,_0x41a1be){super();const _0x29b2c6=_0x41a1be['isResolvable'];this['channelId']=_0x41a1be['channelId'],this['id']=_0x41a1be['id'],this['comments']=new _0x23eb0b(),this['_repository']=_0x50ba7e,this['_isAttached']=!0x1,this['_isSubmitted']=_0x41a1be['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x50ba7e,'_permissions',_0x50ba7e,'_readOnlyChannels',()=>_0x50ba7e['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x50ba7e,'_permissions',()=>_0x50ba7e['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x50ba7e,'_permissions',()=>{const _0x200de3=_0x50ba7e['getPermissions'](this['channelId']);return _0x200de3['write']||_0x200de3['admin'];}),this['bind']('isResolvable')['to'](_0x50ba7e,'_permissions',()=>_0x29b2c6&&_0x50ba7e['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x41a1be['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x334b79,_0x141efd)=>_0x334b79?_0x141efd?_0x334b79<_0x141efd?_0x334b79:_0x141efd:_0x334b79:_0x141efd),this['set']('unlinkedAt',_0x41a1be['unlinkedAt']||null),this['set']('resolvedAt',_0x41a1be['resolvedAt']||null),this['set']('resolvedBy',_0x41a1be['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x1dd1e5=>!!_0x1dd1e5),this['set']('attributes',_0x41a1be['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x5c2755,_0x63ebe8)=>_0x5c2755+_0x63ebe8['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x480c81,id:_0x44efe0}=this;this['_repository']['fire'](bt('submitCommentThread',_0x480c81),{'channelId':_0x480c81,'threadId':_0x44efe0});}['setUnlinkedAt'](_0x2721f5){this['_update']({'unlinkedAt':_0x2721f5});}['resolve']({resolvedAt:_0x2a02b3=new Date(),resolvedBy:_0x35c720=null,isFromAdapter:_0x56988d=!0x1}={}){const _0x546c68=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x371f5d,id:_0x1787f4}=this;this['_repository']['fire'](bt('resolveCommentThread',_0x371f5d),{'channelId':_0x371f5d,'threadId':_0x1787f4,'resolvedAt':_0x2a02b3,'resolvedBy':_0x35c720||_0x546c68['id'],'isFromAdapter':_0x56988d});}['reopen']({isFromAdapter:_0xeea769=!0x1}={}){const {channelId:_0x4e9bdb,id:_0x48a812}=this;this['_repository']['fire'](bt('reopenCommentThread',_0x4e9bdb),{'channelId':_0x4e9bdb,'threadId':_0x48a812,'isFromAdapter':_0xeea769});}['setContext'](_0x5c0421){this['context']||this['_update']({'context':_0x5c0421});}['setAttribute'](_0x227e25,_0x2b9e4b){const _0x1fd333=It(this['attributes']);At(_0x1fd333,_0x227e25,_0x2b9e4b),this['_update']({'attributes':_0x1fd333});}['removeAttribute'](_0x3e5810){const _0x6d999a=It(this['attributes']);Ct(_0x6d999a,_0x3e5810),this['_update']({'attributes':_0x6d999a});}['remove']({isFromAdapter:_0x4634d0=!0x1}={}){const {channelId:_0x5e6b59,id:_0x51e3e1}=this;this['_repository']['fire'](bt('removeCommentThread',_0x5e6b59),{'channelId':_0x5e6b59,'threadId':_0x51e3e1,'isFromAdapter':_0x4634d0});}['attachTo'](_0x362751){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x362751});}['addComment'](_0x1a1d2a){const {channelId:_0x40c82c,id:_0x55b699}=this;this['_repository']['fire'](bt('addComment',_0x40c82c,_0x55b699),Object['assign']({'channelId':_0x40c82c,'threadId':_0x55b699},_0x1a1d2a));}['getComment'](_0x23abb2){if('string'!=typeof _0x23abb2)throw new _0x51f518('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x23abb2});return this['comments']['get'](_0x23abb2);}['toJSON'](){return{'threadId':this['id'],'context':this['context'],'unlinkedAt':this['unlinkedAt'],'resolvedAt':this['resolvedAt'],'resolvedBy':this['resolvedBy']?this['resolvedBy']['id']:null,'archivedAt':this['archivedAt'],'comments':this['comments']['map'](_0x58674c=>_0x58674c['toJSON']()),'attributes':this['attributes']};}['_add'](_0x2c2fd5){return this['listenTo'](_0x2c2fd5,'change:authoredAt',()=>{const _0x6bbbf3=this['_findOptimalIndex'](_0x2c2fd5),_0x39363e=this['comments'];_0x6bbbf3-0x1!=_0x39363e['getIndex'](_0x2c2fd5)&&_0x6bbbf3+0x1!=_0x39363e['getIndex'](_0x2c2fd5)&&(this['_remove'](_0x2c2fd5),this['_add'](_0x2c2fd5));}),this['comments']['add'](_0x2c2fd5,this['_findOptimalIndex'](_0x2c2fd5));}['_update'](_0x406971){const {channelId:_0x3f1016,id:_0x4d51d4}=this;this['_repository']['fire'](bt('updateCommentThread',_0x3f1016),{..._0x406971,'channelId':_0x3f1016,'threadId':_0x4d51d4});}['_remove'](_0x2e1a2f){return this['stopListening'](_0x2e1a2f),_0x2e1a2f['destroy'](),this['comments']['remove'](_0x2e1a2f);}['_findOptimalIndex'](_0x49f395){const _0x4bf8f4=this['comments']['find'](_0x5f4976=>new Date(_0x5f4976['authoredAt'])['getTime']()>new Date(_0x49f395['authoredAt'])['getTime']());return _0x4bf8f4?this['comments']['getIndex'](_0x4bf8f4):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x362d6f(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x4e8fa2,_0x32d484){super();const _0x10952d=_0x4e8fa2['context']['plugins']['get'](it)['me'],_0x412984=_0x4e8fa2['getCommentThread'](_0x32d484['threadId']),_0x5da2e4=0x0===_0x412984['comments']['length'],_0x5a3147=_0x10952d===_0x32d484['author'];this['id']=_0x32d484['id'],this['threadId']=_0x32d484['threadId'],this['author']=_0x32d484['author'],this['creator']=_0x32d484['creator'],this['isExternal']=Boolean(_0x32d484['attributes']&&_0x32d484['attributes']['@external']),this['set']('content',_0x32d484['content']),this['createdAt']=_0x32d484['createdAt']||new Date(),this['set']('authoredAt',_0x32d484['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x412984,'resolvedAt'),this['set']('attributes',_0x32d484['attributes']||{}),this['bind']('isEditable')['to'](_0x4e8fa2,'_permissions',()=>{const _0x37d08a=_0x4e8fa2['getPermissions'](_0x412984['channelId'])['write'],_0x27010a=_0x4e8fa2['getPermissions'](_0x412984['channelId'])['modifyAll'];return _0x5a3147&&_0x37d08a||!_0x5a3147&&_0x27010a;}),this['bind']('isRemovable')['to'](_0x412984,'isRemovable',_0x4e8fa2,'_permissions',_0x226f3e=>{const _0xa20f0b=_0x4e8fa2['getPermissions'](_0x412984['channelId'])['write'],_0x23c255=_0x4e8fa2['getPermissions'](_0x412984['channelId'])['modifyAll'];return _0x5a3147&&_0xa20f0b||_0x226f3e&&_0x5da2e4||!_0x5a3147&&_0x23c255&&!_0x5da2e4;}),this['bind']('isReadOnly')['to'](_0x412984,'isReadOnly'),this['_repository']=_0x4e8fa2;}get['weight'](){return Math['max'](function(_0xd1b2b8){const _0xaa5db1=document['createElement']('div');return _0xaa5db1['innerHTML']=_0xd1b2b8,_0xaa5db1['textContent']['length'];}(this['content']),0xc8);}['update'](_0x14cfd0){const {threadId:_0x5210ab,id:_0x5f4090}=this;if(!this['_repository']['hasCommentThread'](_0x5210ab))throw new _0x51f518('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0xdff328}=this['_repository']['getCommentThread'](_0x5210ab);this['_repository']['fire'](bt('updateComment',_0xdff328,_0x5210ab),{'channelId':_0xdff328,'threadId':_0x5210ab,'commentId':_0x5f4090,..._0x14cfd0});}['setAttribute'](_0x5188fa,_0x2b1154){const _0x3d7d3e=It(this['attributes']);At(_0x3d7d3e,_0x5188fa,_0x2b1154),this['update']({'attributes':_0x3d7d3e});}['removeAttribute'](_0x3a9d76){const _0x9df87=It(this['attributes']);Ct(_0x9df87,_0x3a9d76),this['update']({'attributes':_0x9df87});}['remove'](_0x436dc5={}){if(!_0x436dc5['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x1c4007,id:_0x5d37e4}=this;if(!this['_repository']['hasCommentThread'](_0x1c4007))throw new _0x51f518('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x231feb}=this['_repository']['getCommentThread'](_0x1c4007);this['_repository']['fire'](bt('removeComment',_0x231feb,_0x1c4007),{'channelId':_0x231feb,'threadId':_0x1c4007,'commentId':_0x5d37e4,..._0x436dc5});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function bt(_0x51397c,..._0x1634d0){for(const _0x33d089 of _0x1634d0)void 0x0!==_0x33d089&&(_0x51397c+=':'+String(_0x33d089));return _0x51397c;}class rt extends _0x385260{constructor(_0xdd72f4){super(_0xdd72f4),this['set']('hasContent',!0x1);}['refresh'](){const _0x22d640=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x49be42 of _0x22d640['getRanges']())if(this['_hasContent'](_0x49be42))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x256035=_0x58c8cf(),ranges:_0x13255a,comment:_0x473fb7}={}){const _0x45d5ba=this['editor']['model'],_0x466a08=_0x13255a??Array['from'](_0x45d5ba['document']['selection']['getRanges']()),_0xad719c=[];for(const _0xad5a5b of _0x466a08)this['_hasContent'](_0xad5a5b)&&_0xad719c['push'](this['_trimToContent'](_0xad5a5b));if(!_0xad719c['length'])throw new _0x51f518('addcommentthreadcommand-incorrect-ranges',null);_0x473fb7&&this['_createCommentThread'](_0x256035,_0x473fb7),this['_createMarkersFromRanges'](_0x256035,_0xad719c,!!_0x473fb7);}['_createMarkersFromRanges'](_0x4fc3d8,_0x3f6665,_0x1a2615){this['editor']['model']['change'](_0x44ae27=>{for(const _0x28c806 of _0x3f6665){const _0x3e30b9=_0x58c8cf()['substr'](0x1,0x5),_0x4b665b='comment:'+_0x4fc3d8+':'+_0x3e30b9;_0x44ae27['addMarker'](_0x4b665b,{'range':_0x28c806,'usingOperation':_0x1a2615,'affectsData':_0x1a2615});}});}['_createCommentThread'](_0x38feaa,_0x5170fd){const _0x54d5e0=this['editor']['plugins']['get']('CommentsRepository'),_0x4248c8=this['editor']['config']['get']('collaboration.channelId'),_0x5c6b83=this['editor']['plugins']['get']('Users')['me'];if(!_0x5c6b83)throw new _0x51f518('addcommentthreadcommand-user-not-found',null);_0x54d5e0['addCommentThread']({'threadId':_0x38feaa,'channelId':_0x4248c8,'comments':[{'authorId':_0x5c6b83['id'],'content':_0x5170fd,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x186d1c){for(const _0x59a508 of _0x186d1c['getItems']())if(this['_itemIsContent'](_0x59a508))return!0x0;return!0x1;}['_itemIsContent'](_0x487b60){return _0x487b60['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x487b60)&&!_0x487b60['is']('element','tableCell');}['_trimToContent'](_0x31fc19){const _0x573390=_0x564c19=>!this['_itemIsContent'](_0x564c19['item']),_0x53b99f=_0x31fc19['start']['getLastMatchingPosition'](_0x573390),_0x4f71f4=_0x31fc19['end']['getLastMatchingPosition'](_0x573390,{'direction':'backward'});return this['editor']['model']['createRange'](_0x53b99f,_0x4f71f4);}}class b extends _0x5ddc0e{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3847cf){super(_0x3847cf),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x324714=this['editor'],_0x430c82=_0x324714['model']['document']['selection'],_0x4b9c63=_0x40c01b(()=>this['refreshSelectedViews'](),0xa);_0x430c82['on']('change:range',(_0x374627,_0x533f65)=>{_0x533f65['directChange']&&(_0x4b9c63['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x324714['editing']['view']['document'],'change:isFocused',(_0x5e2fda,_0x2e6bfd,_0x1784b4)=>{_0x1784b4&&_0x4b9c63();}),this['listenTo'](_0x324714['ui']['focusTracker'],'change:isFocused',(_0x5d60b5,_0xc6d935,_0x3e3024)=>{_0x3e3024||_0x324714['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x24cfc4=>this['_editorAnnotationsData']['has'](_0x24cfc4['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x31ae3e){if(this['_editorAnnotations']['has'](_0x31ae3e['view']))return;this['_editorAnnotations']['add'](_0x31ae3e['view']),this['editor']['ui']['focusTracker']['add'](_0x31ae3e['view']['element']);const _0x39266d=this['editor']['plugins']['get'](y);this['listenTo'](_0x39266d['collection'],'remove',(_0x54920b,_0x671cd9)=>{this['editor']['ui']['focusTracker']['remove'](_0x671cd9['view']['element']),this['_editorAnnotations']['delete'](_0x671cd9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x53a6af){if('function'!=typeof _0x53a6af)throw new _0x51f518('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x53a6af);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x195a8e,annotations:_0x1e63cc}){const _0x592b2f=[],_0x206b50=this['editor']['model']['document']['selection'],_0x2b24b8=Array['from'](_0x206b50['getRanges']());for(const [_0x513bd6,_0x1eec19]of this['_editorAnnotationsData']){const _0x468c38=_0x44737b(_0x1eec19),_0xa1bbe4=_0x1e63cc['getByInnerView'](_0x513bd6);_0x468c38&&_0xa1bbe4&&_0x592b2f['push']({'annotation':_0xa1bbe4,'range':_0x468c38});}function _0x44737b(_0x4ef1f5){for(const _0x106bb0 of _0x4ef1f5)for(const _0x2debab of _0x2b24b8)if(_0x106bb0['containsRange'](_0x2debab,!_0x206b50['isCollapsed']))return _0x106bb0;return null;}return _0x592b2f['sort']((_0x284866,_0x547594)=>{const _0x300178=_0x284866['range'],_0x496c71=_0x547594['range'];if(!_0x300178['isEqual'](_0x496c71)){if(_0x300178['containsRange'](_0x496c71,!0x0))return 0x1;if(_0x496c71['containsRange'](_0x300178,!0x0))return-0x1;}return _0x284866['annotation']==_0x195a8e?-0x1:_0x547594['annotation']==_0x195a8e?0x1:0x0;})['map'](_0xcdeb=>_0xcdeb['annotation']);}get['_editorAnnotationsData'](){const _0x264c0e=new Map();for(const _0x327545 of Array['from'](this['_dataCollectors']))for(const [_0x36009e,_0x4f41b7]of _0x327545())_0x264c0e['set'](_0x36009e,_0x4f41b7);return _0x264c0e;}}class st extends _0x5ddc0e{['afterInit'](){const _0x2c2896=this['editor'];if(!_0x2c2896['plugins']['has']('RestrictedEditingModeEditing'))return;_0x2c2896['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x5ddc0e{constructor(_0x51369d){super(_0x51369d),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x166a06=this['editor'],_0x396bd6=_0x166a06['commands']['get']('importWord'),_0x29d884=_0x166a06['plugins']['get'](it);_0x396bd6&&(_0x396bd6['on']('execute',(_0x341d22,[,_0x4b308])=>{_0x4b308['collaboration_features']={'comments':!0x0,'user_id':_0x29d884['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x396bd6,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0xcfee6f,_0x1925d4){const {comment_threads:_0x3daaf3}=_0x1925d4;_0x3daaf3&&_0x3daaf3['forEach'](({thread_id:_0x5268bf,comments:_0x21a5f9,is_resolved:_0x16f429})=>{const _0x44bcd8=new Date(),_0x3eaaff=_0x21a5f9['map'](({author:_0x14dbb0,content:_0x3fccec,created_at:_0x24d4dc})=>({'content':_0x3fccec,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x44bcd8,'attributes':{'@external':{'authorName':_0x14dbb0,'createdAt':_0x24d4dc?new Date(_0x24d4dc):new Date(),'source':'importWord'}}})),_0x3c7bbc=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3c7bbc,'threadId':_0x5268bf,'comments':_0x3eaaff,'resolvedAt':_0x16f429?_0x44bcd8:null});});}}class at extends _0x5ddc0e{constructor(_0x41b2bc){super(_0x41b2bc),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x2898d9=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x2898d9,'contentInsertion',(_0x1f9f66,_0x15af22)=>this['_removeMarkersWithoutThreads'](_0x15af22['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x270462){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x270462;const _0x3abb2a=this['editor']['plugins']['get']('CommentsRepository');for(const _0x25dd26 of _0x270462['keys']()){const [_0x4ff46c,_0x555ec3]=_0x25dd26['split'](':');'comment'!=_0x4ff46c||_0x3abb2a['hasCommentThread'](_0x555ec3)||_0x270462['delete'](_0x25dd26);}return _0x270462;}['_registerMarkerInClipboardPipeline'](){const _0x337261=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x1cc82b=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x1cc82b&&_0x337261['_registerMarkerToCopy']('comment',_0x1cc82b);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1ce9c3){switch(_0x1ce9c3){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class ut extends _0x5ddc0e{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x376a85,_0x57ac3f)=>{if(!_0x57ac3f['options']['showCommentHighlights'])return null;if(_0x57ac3f['options']['ignoreResolvedComments']){const {id:_0xd1c525}=er(_0x376a85['markerName']),_0x508c3=this['editor']['plugins']['get'](o);if(_0x508c3['getCommentThread'](_0xd1c525)?.['isResolved']&&_0x376a85['item'])return _0x57ac3f['consumable']['consume'](_0x376a85['item'],'addMarker:'+_0x376a85['markerName']),_0x57ac3f['consumable']['consume'](_0x376a85['item'],'removeMarker:'+_0x376a85['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x29dc18=>{_0x29dc18['on']('addMarker:comment',(_0x3a56c3,_0x4a3c65,_0x547f6d)=>{if(!_0x547f6d['options']['showCommentHighlights'])return;const _0x2e5e22=_0x4a3c65['item'];if(!_0x2e5e22)return;const _0x3d4160=_0x547f6d['mapper']['toViewElement'](_0x2e5e22);this['editor']['model']['schema']['isObject'](_0x2e5e22)&&_0x3d4160&&!_0x3d4160['getCustomProperty']('widget')&&_0x3d4160['is']('containerElement')&&_0x1ed711(_0x3d4160,_0x547f6d['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x50f8a8,{writer:_0x196be9,options:_0x337882})=>{if(!_0x337882['showCommentHighlights'])return null;const _0x1a8205=_0x196be9['createContainerElement']('div'),_0x2e0e01=_0x196be9['createEmptyElement']('hr');return _0x196be9['addClass']('ck-horizontal-line',_0x1a8205),_0x196be9['insert'](_0x196be9['createPositionAt'](_0x1a8205,0x0),_0x2e0e01),_0x1a8205;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x990a11,{writer:_0x2aa6ef,options:_0x3c5404})=>{if(!_0x3c5404['showCommentHighlights'])return null;const _0xb6619c=_0x2aa6ef['createContainerElement']('span'),_0x1ab03f=_0x2aa6ef['createEmptyElement']('img');return _0x2aa6ef['addClass']('image-inline',_0xb6619c),_0x2aa6ef['insert'](_0x2aa6ef['createPositionAt'](_0xb6619c,0x0),_0x1ab03f),_0xb6619c;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xddd8d2,{writer:_0x5d8df4,options:_0x3e7143})=>{if(_0x3e7143['showCommentHighlights'])return _0x5d8df4['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x272a84,_0x444675,_0x4cc4eb)=>{_0x4cc4eb['options']['showCommentHighlights']&&_0x272a84['stop']();},{'priority':'high'});}}class r extends _0x5ddc0e{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x229b8b){super(_0x229b8b),this['set']('isThreadsLoadingPaused',!0x0),_0x229b8b['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5b062f,_0x9f4b7,_0x171ba9,_0x2169cc)=>{const _0x4067ce=_0x229b8b['plugins']['get'](o),_0x534dae=_0x171ba9?er(_0x171ba9)['id']:null;_0x229b8b['model']['change'](()=>{if(_0x534dae){const _0x41ed87=this['getAllMarkersForId'](_0x534dae);for(const _0x3d3f78 of _0x41ed87)_0x229b8b['editing']['reconvertMarker'](_0x3d3f78);}if(_0x2169cc){const {id:_0x4daffc}=er(_0x2169cc),_0x404ec7=_0x4067ce['getCommentThread'](_0x4daffc);if(_0x404ec7&&_0x404ec7['unlinkedAt'])return;if(_0x404ec7&&!_0x404ec7['isAttached'])return;const _0x3f336c=this['getAllMarkersForId'](_0x4daffc);for(const _0x2d40eb of _0x3f336c)_0x229b8b['editing']['reconvertMarker'](_0x2d40eb);}}),_0x534dae&&this['scrollToThreadMarker'](_0x534dae);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x45a649=this['editor'],_0x3c926b=_0x45a649['plugins']['get'](o),_0x499e0f=_0x45a649['config']['get']('collaboration.channelId'),_0x5341cf=_0x3c926b['getCommentThreads']()['filter'](_0x20bcd6=>_0x20bcd6['channelId']!==_0x499e0f);_0x45a649['commands']['add']('addCommentThread',new rt(_0x45a649)),this['listenTo'](_0x45a649,'change:isReadOnly',(_0x5d732b,_0x9de9d4,_0x32c57a)=>{_0x3c926b['switchReadOnly'](_0x32c57a,_0x45a649['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x3c926b,ft('addCommentThread',_0x499e0f),(_0x4a1bde,{threadId:_0x2c5783})=>{const _0x347925=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2c5783);_0x347925?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2c5783);}),this['listenTo'](_0x3c926b,ft('removeCommentThread',_0x499e0f),(_0x2839c0,{threadId:_0x2c3365})=>{_0x45a649['model']['enqueueChange']({'isUndoable':!0x1},_0x466da6=>{const _0x15c9c6=this['getAllMarkersForId'](_0x2c3365);for(const _0x4e2f4c of _0x15c9c6)_0x466da6['removeMarker'](_0x4e2f4c);});}),this['listenTo'](_0x3c926b,ft('resolveCommentThread',_0x499e0f),(_0xd9bede,{threadId:_0x4381c5})=>{(this['_reconvertMarkers'](_0x4381c5),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x4381c5)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x3c926b,ft('reopenCommentThread',_0x499e0f),(_0x4c1b05,{threadId:_0xd0dbcb})=>{this['_reconvertMarkers'](_0xd0dbcb);},{'priority':'low'}),this['listenTo'](_0x3c926b,ft('addComment',_0x499e0f),(_0x13a172,{threadId:_0x5db627,isFromAdapter:_0x23ec00})=>{const _0x31124a=this['getAllMarkersForId'](_0x5db627);if(_0x23ec00||0x0==_0x31124a['length']||!_0x3c926b['hasCommentThread'](_0x5db627))return;0x1===_0x3c926b['getCommentThread'](_0x5db627)['length']&&_0x45a649['model']['enqueueChange']({'isUndoable':!0x1},_0x1f54e8=>{for(const _0x5af790 of _0x31124a)_0x1f54e8['updateMarker'](_0x5af790,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5341cf);}['afterInit'](){!async function(_0x2c96e8){const _0x5292e8=_0x8769d0([0x6c,0x6d,0x53,0x66,0x30,0x6a,0x63,0x70,0x4b,0x78,0x73,0x57,0x37,0x59,0x35,0x45,0x34,0x43,0x4a,0x56,0x55,0x75,0x4d,0x47,0x5a,0x6f,0x76,0x38,0x79,0x7a,0x49,0x72,0x54,0x36,0x67,0x42,0x50,0x48,0x71,0x6e,0x51,0x69,0x65,0x64,0x39,0x4f,0x6b,0x77,0x58,0x74,0x31,0x44,0x52,0x33,0x32,0x62,0x46,0x4e,0x68,0x41,0x61,0x4c]),_0x9c0446=0x2030433b,_0x590306=0x20372e2b^_0x9c0446,_0x4fbf79=window[_0x8769d0([0x44,0x61,0x74,0x65])][_0x8769d0([0x6e,0x6f,0x77])](),_0x2080c3=_0x2c96e8[_0x8769d0([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x17520a=new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x38a7a1=>{_0x2080c3[_0x8769d0([0x6f,0x6e,0x63,0x65])](_0x8769d0([0x72,0x65,0x61,0x64,0x79]),_0x38a7a1);}),_0x13216c={[_0x8769d0([0x6b,0x74,0x79])]:_0x8769d0([0x45,0x43]),[_0x8769d0([0x75,0x73,0x65])]:_0x8769d0([0x73,0x69,0x67]),[_0x8769d0([0x63,0x72,0x76])]:_0x8769d0([0x50,0x2d,0x32,0x35,0x36]),[_0x8769d0([0x78])]:_0x8769d0([0x69,0x43,0x6a,0x4f,0x43,0x76,0x44,0x46,0x49,0x36,0x6c,0x51,0x48,0x48,0x54,0x31,0x38,0x6a,0x56,0x77,0x52,0x66,0x6b,0x66,0x48,0x51,0x32,0x61,0x5f,0x4d,0x79,0x6d,0x54,0x33,0x35,0x4c,0x51,0x56,0x6f,0x46,0x53,0x41,0x49]),[_0x8769d0([0x79])]:_0x8769d0([0x6b,0x58,0x49,0x79,0x4a,0x34,0x65,0x76,0x74,0x43,0x45,0x46,0x52,0x6d,0x78,0x4b,0x53,0x55,0x70,0x4b,0x39,0x66,0x44,0x57,0x34,0x35,0x39,0x76,0x58,0x4f,0x76,0x56,0x72,0x68,0x66,0x36,0x75,0x51,0x41,0x65,0x4f,0x69,0x6f]),[_0x8769d0([0x61,0x6c,0x67])]:_0x8769d0([0x45,0x53,0x32,0x35,0x36])},_0x3da15d=_0x2080c3[_0x8769d0([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x8769d0([0x67,0x65,0x74])](_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x3a0cab(){let _0x33ff57,_0x4dc9d1=null,_0xd2896e=null;try{if(_0x3da15d==_0x8769d0([0x47,0x50,0x4c]))return _0x8769d0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x33ff57=_0x2687ef(),!_0x33ff57)return _0x8769d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x33ff57[_0x8769d0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xd2896e=_0x5d93cf(_0x33ff57[_0x8769d0([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x33ff57[_0x8769d0([0x6a,0x74,0x69])])),await _0x463720()?_0x4e6b85()?_0x34ff4e()?_0x8769d0([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x557918()?(_0x33ff57[_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x8769d0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x4dc9d1=_0x49b38d(_0x8769d0([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x33ff57[_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x8769d0([0x74,0x72,0x69,0x61,0x6c])&&(_0x4dc9d1=_0x49b38d(_0x8769d0([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x5cd136()):_0x8769d0([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x8769d0([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x8769d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x8769d0([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x34ff4e(){const _0x12e002=[_0x8769d0([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x8769d0([0x74,0x72,0x69,0x61,0x6c])][_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x33ff57[_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4fbf79/0x3e8:0xe10*_0x590306;return _0x33ff57[_0x8769d0([0x65,0x78,0x70])]<_0x12e002;}function _0x4e6b85(){const _0x37c1f3=_0x33ff57[_0x8769d0([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x37c1f3)return!0x1;if(_0x37c1f3[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8769d0([0x2a])))return!0x0;if(_0x37c1f3[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8769d0([0x43,0x4d,0x54])))return!0x0;if(_0x37c1f3[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8769d0([0x52,0x43,0x4d,0x54]))){if(_0x20e5c0())return!0x0;if(_0x4a0039()||_0x3911ec())return!0x0;}return!0x1;}function _0x557918(){const _0x151a37=_0x33ff57[_0x8769d0([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x151a37||0x0==_0x151a37[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3f6e84}=new URL(window[_0x8769d0([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x151a37[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3f6e84))return!0x0;const _0x3bac7b=_0x3f6e84[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])](_0x8769d0([0x2e]));return _0x151a37[_0x8769d0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4f4091=>_0x4f4091[_0x8769d0([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x8769d0([0x2a])))[_0x8769d0([0x6d,0x61,0x70])](_0x2291f1=>_0x2291f1[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])](_0x8769d0([0x2e])))[_0x8769d0([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x570720=>_0x570720[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3bac7b[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x8769d0([0x6d,0x61,0x70])](_0x46f3fc=>Array(_0x3bac7b[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x46f3fc[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x8769d0([0x66,0x69,0x6c,0x6c])](_0x46f3fc[0x0]===_0x8769d0([0x2a])?_0x8769d0([0x2a]):'')[_0x8769d0([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x46f3fc))[_0x8769d0([0x73,0x6f,0x6d,0x65])](_0x2ec2ce=>_0x3bac7b[_0x8769d0([0x65,0x76,0x65,0x72,0x79])]((_0x24a95c,_0x13cb5e)=>_0x2ec2ce[_0x13cb5e]===_0x24a95c||_0x2ec2ce[_0x13cb5e]===_0x8769d0([0x2a])));}function _0x5cd136(){return _0x4dc9d1&&_0xd2896e?new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x53945b,_0x38f39b)=>{_0x4dc9d1[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x53945b,_0x38f39b),_0xd2896e[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x26c883=>{_0x26c883!=_0x8769d0([0x56,0x61,0x6c,0x69,0x64])&&_0x53945b(_0x26c883);},_0x38f39b);}):_0x4dc9d1||_0xd2896e||_0x8769d0([0x56,0x61,0x6c,0x69,0x64]);}}function _0x5d93cf(_0x417fc8,_0x433fe9){return new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x496af1=>{if(_0x3eccea())return _0x496af1(_0x8769d0([0x56,0x61,0x6c,0x69,0x64]));_0x53e749(),_0x2080c3[_0x8769d0([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x8769d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x2ece2b=!0x1;const _0x459455=_0x58c8cf();function _0x4ea45f(_0x384439){return!!_0x384439&&(typeof _0x384439===_0x8769d0([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x384439===_0x8769d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x384439[_0x8769d0([0x74,0x68,0x65,0x6e])]===_0x8769d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x384439[_0x8769d0([0x63,0x61,0x74,0x63,0x68])]===_0x8769d0([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x161ced(_0x2672af){_0x2eea4d(_0x2672af)[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x89dbb1=>{if(!_0x89dbb1||_0x89dbb1[_0x8769d0([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x8769d0([0x6f,0x6b]))return _0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x37d816(_0x349d99(_0x459455+_0x433fe9))!=_0x89dbb1[_0x8769d0([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x8769d0([0x56,0x61,0x6c,0x69,0x64]);})[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x5a4fc4=>(_0x1ed2fb(),_0x5a4fc4),()=>{const _0x25c1e3=_0x4a8717();return null==_0x25c1e3?(_0x1ed2fb(),_0x8769d0([0x56,0x61,0x6c,0x69,0x64])):_0x8769d0(_0x4fbf79-_0x25c1e3>(0x43cc73b^_0x9c0446)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x496af1)[_0x8769d0([0x63,0x61,0x74,0x63,0x68])](()=>{_0x496af1(_0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x58ee05=0x2006adbb^_0x9c0446;function _0x1ed2fb(){const _0x7babf=_0x8769d0([0x6c,0x6c,0x63,0x74,0x2d])+_0x37d816(_0x349d99(_0x417fc8)),_0x1ef440=_0x5d6554(_0x37d816(window[_0x8769d0([0x4d,0x61,0x74,0x68])][_0x8769d0([0x63,0x65,0x69,0x6c])](_0x4fbf79/_0x58ee05)));window[_0x8769d0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x8769d0([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x7babf,_0x1ef440);}function _0x4a8717(){const _0x446609=_0x8769d0([0x6c,0x6c,0x63,0x74,0x2d])+_0x37d816(_0x349d99(_0x417fc8)),_0x44a7bc=window[_0x8769d0([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x8769d0([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x446609);return _0x44a7bc?window[_0x8769d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5d6554(_0x44a7bc),0x10)*_0x58ee05:null;}function _0x2eea4d(_0x4ae8b7){return new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x464a52,_0x4f4dc6)=>{_0x4ae8b7[_0x8769d0([0x74,0x68,0x65,0x6e])](_0x464a52,_0x4f4dc6),window[_0x8769d0([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x4f4dc6,0x203197fb^_0x9c0446);});}}_0x2080c3[_0x8769d0([0x6f,0x6e])](_0x8769d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x3e9012,_0x1735b8)=>{if(_0x1735b8[0x0]!=_0x417fc8)return _0x496af1(_0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1735b8[0x1]={..._0x1735b8[0x1],[_0x8769d0([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x459455};},{[_0x8769d0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x8769d0([0x68,0x69,0x67,0x68])}),_0x2080c3[_0x8769d0([0x6f,0x6e])](_0x8769d0([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x45e4ea=>{_0x4ea45f(_0x45e4ea[_0x8769d0([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x2ece2b=!0x0,_0x161ced(_0x45e4ea[_0x8769d0([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x8769d0([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x8769d0([0x6c,0x6f,0x77])}),_0x17520a[_0x8769d0([0x74,0x68,0x65,0x6e])](()=>{_0x2ece2b||_0x496af1(_0x8769d0([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3eccea(){return _0x2080c3[_0x8769d0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x8769d0([0x76,0x69,0x65,0x77])][_0x8769d0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x8769d0([0x61,0x75,0x74,0x6f]);}function _0x53e749(){_0x2080c3[_0x8769d0([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x8769d0([0x76,0x69,0x65,0x77])][_0x8769d0([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x8769d0([0x61,0x75,0x74,0x6f]);}}function _0x49b38d(_0x58dcd2){const _0x84fca4=[new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x362ce3=>setTimeout(_0x362ce3,0x20397df7^_0x9c0446)),_0x17520a[_0x8769d0([0x74,0x68,0x65,0x6e])](()=>new window[(_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0xc13033=>{let _0x42947c=0x0;_0x2080c3[_0x8769d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x8769d0([0x6f,0x6e])](_0x8769d0([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1efca4,_0x2f0409)=>{_0x2f0409[0x0][_0x8769d0([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x42947c++,_0x42947c==(0x203042c3^_0x9c0446)&&(_0xc13033(),_0x1efca4[_0x8769d0([0x6f,0x66,0x66])]());});}))];return window[_0x8769d0([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x8769d0([0x72,0x61,0x63,0x65])](_0x84fca4)[_0x8769d0([0x74,0x68,0x65,0x6e])](()=>_0x58dcd2);}async function _0x227d3d(){await _0x17520a,_0x2080c3[_0x8769d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x8769d0([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x5557ed,_0x2080c3[_0x8769d0([0x6d,0x6f,0x64,0x65,0x6c])][_0x8769d0([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x5557ed,_0x2080c3[_0x8769d0([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x8769d0([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x20e5c0(){return _0x14b4ba(_0x8769d0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x547a36(_0x8769d0([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x8769d0([0x73,0x74,0x61,0x74,0x65])]==_0x8769d0([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4a0039(){return _0x14b4ba(_0x8769d0([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x3911ec(){return _0x14b4ba(_0x8769d0([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5059ce(_0x533e47){const _0x1986ca=_0x5d1513();_0x2080c3[_0x1986ca]=_0x8769d0([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x533e47,_0x533e47!=_0x8769d0([0x56,0x61,0x6c,0x69,0x64])&&_0x227d3d();}function _0x5d1513(){const _0x1a8613=window[_0x8769d0([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x8769d0([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x8769d0([0x6e,0x6f,0x77])]())[_0x8769d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x8769d0([0x2e]),'');let _0x183d06=_0x8769d0([0x6c]);for(let _0x410f05=0x0;_0x410f05<_0x1a8613[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x410f05+=0x2){let _0x4450c5=window[_0x8769d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1a8613[_0x8769d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x410f05,_0x410f05+0x2));_0x4450c5>=_0x5292e8[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4450c5-=_0x5292e8[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x183d06+=_0x5292e8[_0x4450c5];}return _0x183d06;}function _0x2687ef(){const _0x379929=_0x3da15d[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])](_0x8769d0([0x2e]));if(0x3!=_0x379929[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1a4d33(_0x379929[0x1]);function _0x1a4d33(_0x36f10d){const _0xb8a7de=_0x2c3507(_0x36f10d);return _0xb8a7de&&_0x21d112()?_0xb8a7de:null;function _0x21d112(){const _0x2129d7=_0xb8a7de[_0x8769d0([0x6a,0x74,0x69])],_0x351654=window[_0x8769d0([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2129d7[_0x8769d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2129d7[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x5d9d2e={..._0xb8a7de,[_0x8769d0([0x6a,0x74,0x69])]:_0x2129d7[_0x8769d0([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2129d7[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x5d9d2e[_0x8769d0([0x76,0x63])],_0x349d99(_0x5d9d2e)==_0x351654;}}}async function _0x463720(){let _0x397b17=!0x0;try{const _0x148d73=_0x3da15d[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])](_0x8769d0([0x2e])),[_0x15b71e,_0x29d24f,_0x257684]=_0x148d73;return _0x3b4fcd(_0x15b71e),await _0x2e76f1(_0x15b71e,_0x29d24f,_0x257684),_0x397b17;}catch{return!0x1;}function _0x3b4fcd(_0x1d178d){const _0x34417b=_0x2c3507(_0x1d178d);_0x34417b&&_0x34417b[_0x8769d0([0x61,0x6c,0x67])]==_0x8769d0([0x45,0x53,0x32,0x35,0x36])||(_0x397b17=!0x1);}async function _0x2e76f1(_0x8a4be1,_0x2f1f18,_0x239a9d){const _0xaee6a7=window[_0x8769d0([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x8769d0([0x66,0x72,0x6f,0x6d])](_0x3e35ba(_0x239a9d),_0x542eef=>_0x542eef[_0x8769d0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xbd1051=new window[(_0x8769d0([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x8769d0([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x8a4be1+_0x8769d0([0x2e])+_0x2f1f18),_0x5ac101=window[_0x8769d0([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x8769d0([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x5ac101)return;const _0x5a296a=await _0x5ac101[_0x8769d0([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x8769d0([0x6a,0x77,0x6b]),_0x13216c,{[_0x8769d0([0x6e,0x61,0x6d,0x65])]:_0x8769d0([0x45,0x43,0x44,0x53,0x41]),[_0x8769d0([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x8769d0([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x8769d0([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x5ac101[_0x8769d0([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x8769d0([0x6e,0x61,0x6d,0x65])]:_0x8769d0([0x45,0x43,0x44,0x53,0x41]),[_0x8769d0([0x68,0x61,0x73,0x68])]:{[_0x8769d0([0x6e,0x61,0x6d,0x65])]:_0x8769d0([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5a296a,_0xaee6a7,_0xbd1051)||(_0x397b17=!0x1);}}function _0x2c3507(_0x317eb1){return _0x317eb1[_0x8769d0([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x8769d0([0x65,0x79]))?JSON[_0x8769d0([0x70,0x61,0x72,0x73,0x65])](_0x3e35ba(_0x317eb1)):null;}function _0x3e35ba(_0x2e78d8){return window[_0x8769d0([0x61,0x74,0x6f,0x62])](_0x2e78d8[_0x8769d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x8769d0([0x2b]))[_0x8769d0([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x8769d0([0x2f])));}function _0x349d99(_0x27df9a){let _0x3b1f67=0x1505;function _0x1af135(_0x33efc5){for(let _0x4d990d=0x0;_0x4d990d<_0x33efc5[_0x8769d0([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x4d990d++){const _0x4185d5=_0x33efc5[_0x8769d0([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x4d990d);_0x3b1f67=(_0x3b1f67<<0x5)+_0x3b1f67+_0x4185d5,_0x3b1f67&=_0x3b1f67;}}function _0x4d39ab(_0x2253ff){Array[_0x8769d0([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2253ff)?_0x2253ff[_0x8769d0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x4d39ab):_0x2253ff&&typeof _0x2253ff==_0x8769d0([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x8769d0([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2253ff)[_0x8769d0([0x73,0x6f,0x72,0x74])]()[_0x8769d0([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1531cf,_0x31342b])=>{_0x1af135(_0x1531cf),_0x4d39ab(_0x31342b);}):_0x1af135(window[_0x8769d0([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2253ff));}return _0x4d39ab(_0x27df9a),_0x3b1f67>>>0x0;}function _0x37d816(_0x558d18){return _0x558d18[_0x8769d0([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x8769d0([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x8769d0([0x30]));}function _0x5d6554(_0x4dc589){return _0x4dc589[_0x8769d0([0x73,0x70,0x6c,0x69,0x74])]('')[_0x8769d0([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x8769d0([0x6a,0x6f,0x69,0x6e])]('');}function _0x14b4ba(_0x41d27e){return _0x2080c3[_0x8769d0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x8769d0([0x68,0x61,0x73])](_0x41d27e);}function _0x547a36(_0x3151f0){return _0x2080c3[_0x8769d0([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x8769d0([0x67,0x65,0x74])](_0x3151f0);}function _0x5557ed(){}function _0x8769d0(_0x577fa4){return _0x577fa4['map'](_0x281635=>String['fromCharCode'](_0x281635))['join']('');}_0x5059ce(await _0x3a0cab());}(this);}['destroy'](){const _0x553793=this['editor']['plugins']['get'](o),_0x371ae=this['editor']['config']['get']('collaboration.channelId');for(const _0x709a86 of _0x553793['getCommentThreads']({'channelId':_0x371ae}))_0x553793['_detachCommentThread'](_0x709a86['id']),_0x553793['_threads']['delete'](_0x709a86['id']);super['destroy']();}['hasMarkerForId'](_0x4f4123){return this['getAllMarkersForId'](_0x4f4123)['length']>0x0;}['getAllMarkersForId'](_0x3424df){const _0x51fa5a=[];for(const _0x41f3e1 of this['editor']['model']['markers'])_0x41f3e1['name']['startsWith']('comment:'+_0x3424df)&&_0x51fa5a['push'](_0x41f3e1);return _0x51fa5a;}['scrollToThreadMarker'](_0x3ab682){setTimeout(()=>{const _0x3a3261=this['_getTargetForId'](_0x3ab682);if(!_0x3a3261)return;this['activeMarker']&&er(this['activeMarker'])['id']===_0x3ab682&&nt({'target':_0x3a3261[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x445119){this['editor']['model']['change'](()=>{for(const _0x36de90 of this['getAllMarkersForId'](_0x445119))this['editor']['editing']['reconvertMarker'](_0x36de90);});}['_attachArchivedThread'](_0x54a7a1){const _0x3bf04d=this['editor']['plugins']['get'](o),_0x42af9d=this['editor']['plugins']['get'](b),_0x307114=_0x3bf04d['getCommentThread'](_0x54a7a1);if(!_0x307114['isAttached']){const _0x11fb8f=_0x307114['attachTo'](()=>this['_getTargetForId'](_0x307114['id']));_0x42af9d['registerAnnotation'](_0x11fb8f),_0x307114['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x2f1917=this['editor'],_0x21ec8a=_0x2f1917['plugins']['get'](it);_0x2f1917['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x233fec,_0x4de716)=>{const {id:_0x31c7e3}=er(_0x233fec['markerName']),_0x4a515c=_0x2f1917['plugins']['get'](o)['getCommentThread'](_0x31c7e3),_0x3297bd=this['activeMarker']&&er(this['activeMarker'])['id']===_0x31c7e3;let _0xdac5cb;if(_0x4a515c&&_0x4a515c['isResolved']&&!_0x3297bd&&_0x233fec['item'])return _0x4de716['consumable']['consume'](_0x233fec['item'],'addMarker:'+_0x233fec['markerName']),_0x4de716['consumable']['consume'](_0x233fec['item'],'removeMarker:'+_0x233fec['markerName']),null;const _0x331781=['ck-comment-marker'];return _0x3297bd&&_0x331781['push']('ck-comment-marker--active'),_0xdac5cb=_0x4a515c?.['length']?_0x4a515c['comments']['first']['author']['id']:_0x21ec8a['me']['id'],{'classes':_0x331781,'attributes':{'data-comment':_0x31c7e3,'data-author-id':_0xdac5cb}};}}),_0x2f1917['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3f1b47,{options:_0x160373})=>{if(_0x160373['showCommentHighlights'])return null;const _0x23efd7=_0x2f1917['plugins']['get'](o),_0x4b0afc=_0x2f1917['model']['markers']['get'](_0x3f1b47),{id:_0x4e9192,part:_0x103a93}=er(_0x3f1b47);return _0x4b0afc&&!_0x4b0afc['affectsData']||_0x160373['ignoreResolvedComments']&&_0x23efd7['getCommentThread'](_0x4e9192)?.['isResolved']?null:{'group':'comment','name':_0x103a93?_0x4e9192+':'+_0x103a93:_0x4e9192};}}),_0x2f1917['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x3b0742,{writer:_0x2347a6})=>_0x2347a6['createElement']('$marker',{'data-name':'comment:'+_0x3b0742['getAttribute']('id')})}),_0x2f1917['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x5160fa=this['editor'],_0x41c4e5=_0x5160fa['plugins']['get'](o),_0x461cc6=new Set(),_0x45c90c=new Set();_0x5160fa['model']['document']['registerPostFixer'](_0xb8027f=>{let _0x5057e3=!0x1;for(const {name:_0x561ce8,data:_0x572eaa}of _0x5160fa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5164a3,id:_0x2be4ae}=er(_0x561ce8);let _0x3178da=_0x572eaa['newRange'];if('comment'!==_0x5164a3||!_0x3178da)continue;const _0x11c945='$graveyard'===_0x3178da['root']['rootName'];_0x11c945||(_0x3178da=dt(_0x3178da,_0x5160fa['model']),!_0x3178da||_0x3178da['isCollapsed']||!_0x572eaa['newRange']||_0x3178da['isEqual'](_0x572eaa['newRange']))?_0x5160fa['model']['hasContent'](_0x3178da)&&!_0x11c945?this['isThreadsLoadingPaused']?_0x461cc6['add'](_0x561ce8):this['_handleThreadMarker'](_0x561ce8,_0x2be4ae):(_0x45c90c['add'](_0x561ce8),_0x461cc6['delete'](_0x561ce8),_0xb8027f['removeMarker'](_0x561ce8),_0x5057e3=!0x0):(_0xb8027f['updateMarker'](_0x561ce8,{'range':_0x3178da}),_0x5057e3=!0x0);}return _0x5057e3;}),this['on']('change:isThreadsLoadingPaused',(_0x36977b,_0x437df4,_0x4fca1e)=>{if(!_0x4fca1e&&_0x461cc6['size'])for(const _0x3821dc of _0x461cc6){const {id:_0x579bf7}=er(_0x3821dc);_0x461cc6['delete'](_0x3821dc),_0x5160fa['model']['markers']['get'](_0x3821dc)&&this['_handleThreadMarker'](_0x3821dc,_0x579bf7);}}),this['listenTo'](_0x5160fa['model']['document'],'change',()=>{for(const {name:_0x5d234d,data:{newRange:_0x32d64d}}of _0x5160fa['model']['document']['differ']['getChangedMarkers']()){const {group:_0x12628b,id:_0x5ad395}=er(_0x5d234d);if('comment'!==_0x12628b)continue;const _0x22323d=_0x41c4e5['getCommentThread'](_0x5ad395),_0x1bd1b6=this['hasMarkerForId'](_0x5ad395);_0x22323d&&(!_0x22323d['_hasTargetInContent']&&_0x32d64d&&_0x5160fa['editing']['view']['once']('render',()=>{const _0x12e0e7=_0x5160fa['plugins']['get'](y),_0x261a34=_0x41c4e5['_threadToController']['get'](_0x22323d)['view'];_0x12e0e7['getByInnerView'](_0x261a34)['refreshVisibility']();},{'priority':'low'}),_0x22323d['_hasTargetInContent']=_0x1bd1b6||!!_0x32d64d),_0x32d64d||(_0x45c90c['add'](_0x5d234d),_0x461cc6['delete'](_0x5d234d));}for(const _0x4c4e62 of _0x45c90c){const {id:_0x5ef329}=er(_0x4c4e62),_0x480c9f=_0x41c4e5['getCommentThread'](_0x5ef329);if(_0x461cc6['delete'](_0x4c4e62),!_0x480c9f)continue;const _0x4f9df6=this['hasMarkerForId'](_0x5ef329);_0x4f9df6||_0x480c9f['isSubmitted']?_0x4f9df6||_0x480c9f['unlinkedAt']||_0x480c9f['setUnlinkedAt'](new Date()):_0x480c9f['remove']();}_0x45c90c['clear']();});}['_handleInitialThreads'](_0x20058a){_0x20058a['forEach'](_0x593457=>{_0x593457['unlinkedAt']&&this['_attachArchivedThread'](_0x593457['id']);});}['_getTargetForId'](_0x227c6b){const _0x384d02=this['editor'],_0x447811=this['getAllMarkersForId'](_0x227c6b);return et(_0x384d02['editing'],_0x447811);}['_getTextContext'](_0x369105){const _0x1aeea8=this['getAllMarkersForId'](_0x369105);let _0x48e9a0='',_0x58713d=!0x1;for(const _0x65a878 of _0x1aeea8){const _0x9814fe=_0x65a878['getRange']();for(const _0xa286e9 of Array['from'](_0x9814fe['getItems']()))_0xa286e9['is']('$textProxy')?(_0x48e9a0&&_0x58713d&&(_0x48e9a0+='\x20',_0x58713d=!0x1),_0x48e9a0+=_0xa286e9['data']):_0x58713d=!0x0;_0x58713d=!0x0;}return _0x48e9a0['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3810fc,_0x574ccb){const _0x25bfbf=this['editor'],_0x981908=_0x25bfbf['plugins']['get'](o);let _0x53b707=_0x981908['getCommentThread'](_0x574ccb);const _0x137f73=_0x25bfbf['config']['get']('collaboration.channelId'),_0x5228db=_0x25bfbf['plugins']['get'](b);if(_0x53b707&&(_0x53b707['unlinkedAt']&&_0x53b707['setUnlinkedAt'](null),_0x53b707['isAttached']))return _0x53b707;return!this['getAllMarkersForId'](_0x574ccb)[0x0]['managedUsingOperations']?_0x25bfbf['editing']['view']['once']('render',()=>{if(_0x981908['getCommentThread'](_0x574ccb))return;const _0x59e9b7=_0x25bfbf['plugins']['get'](y);_0x53b707=_0x981908['openNewCommentThread']({'channelId':_0x137f73,'threadId':_0x574ccb,'target':()=>this['_getTargetForId'](_0x574ccb),'context':{'type':'text','value':this['_getTextContext'](_0x574ccb)}});const _0x15e980=_0x981908['_threadToController']['get'](_0x53b707)['view'],_0x4a6d93=_0x59e9b7['getByInnerView'](_0x15e980);_0x4a6d93&&_0x5228db['registerAnnotation'](_0x4a6d93);},{'priority':'low'}):_0x981908['fetchCommentThread']({'channelId':_0x137f73,'threadId':_0x574ccb})['then'](_0x1714c1=>{if('destroyed'!==_0x25bfbf['state']){if(_0x53b707=_0x1714c1,_0x53b707&&!_0x53b707['isAttached']){const _0x541939=_0x53b707['attachTo'](()=>this['_getTargetForId'](_0x574ccb));_0x5228db['registerAnnotation'](_0x541939),_0x53b707['isResolved']&&this['_reconvertMarkers'](_0x574ccb);}else{if(!_0x53b707){const _0x28bb9f=this['getAllMarkersForId'](_0x574ccb);_0x25bfbf['model']['change'](_0x25fce5=>{for(const _0x160ec6 of _0x28bb9f)_0x25fce5['removeMarker'](_0x160ec6);});}}}}),_0x53b707;}['_handleThreadMarker'](_0x1ab02b,_0x2b3d9a){const _0x5f1828=this['_attachMarkerToThread'](_0x1ab02b,_0x2b3d9a);_0x5f1828&&!_0x5f1828['context']&&_0x5f1828['setContext']({'type':'text','value':this['_getTextContext'](_0x2b3d9a)});}['_initAriaMarkerChangeAnnouncements'](){const _0xdbec2d=this['editor'];ot(_0xdbec2d['model'],({left:_0x117f19,entered:_0x28d507})=>{for(const _0x197242 of _0x117f19)if(mt(_0x197242)){_0xdbec2d['ui']['ariaLiveAnnouncer']['announce'](N(_0xdbec2d['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x229da9 of _0x28d507)if(mt(_0x229da9)){_0xdbec2d['ui']['ariaLiveAnnouncer']['announce'](N(_0xdbec2d['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x542398)));break;}});}}function ft(_0x3b2f35,_0xc50819){return _0xc50819?_0x3b2f35+':'+_0xc50819:_0x3b2f35;}function er(_0x26783c){const _0x3107fb=_0x26783c['split'](':');return{'group':_0x3107fb[0x0],'id':_0x3107fb[0x1],'part':_0x3107fb[0x2]};}function dt(_0x958c0a,_0x538dbe){const _0x1480c5=_0x538dbe['schema'],_0xa25b31=_0x538dbe['createRange'](_0x958c0a['start']);for(const _0x28be6d of _0x958c0a['getWalker']()){const {type:_0x3aaf04,item:_0x4d409a,nextPosition:_0x223b2a}=_0x28be6d;if('text'===_0x3aaf04||_0x1480c5['isObject'](_0x4d409a)){const _0x54c743=_0x538dbe['createPositionBefore'](_0x4d409a);_0xa25b31['isCollapsed']&&(_0xa25b31['start']=_0x54c743),_0xa25b31['end']=_0x223b2a;}}return _0xa25b31;}function mt(_0x22c7dc){return'comment'===er(_0x22c7dc['name'])['group'];}class s extends _0x5ddc0e{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x2b07c4=this['editor'],_0x41da01=_0x2b07c4['plugins']['get'](o),_0x5a5c48=_0x2b07c4['plugins']['get'](r),_0x574a9a=_0x2b07c4['plugins']['get'](y),_0x197228=_0x2b07c4['plugins']['get'](b);_0x2b07c4['ui']['componentFactory']['add']('comment',()=>{const _0x298b7b=this['_createUIButton'](_0x49f2c7);return _0x298b7b['tooltip']=!0x0,_0x298b7b;}),_0x2b07c4['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x58cd9a)),_0x197228['addSourceCollector'](()=>{const _0x6b0486=[];for(const [_0x2fd8af,_0x2df56b]of _0x41da01['_threadToController']){const _0x58765c=_0x5a5c48['getAllMarkersForId'](_0x2fd8af['id']),_0x52dafc=_0x58765c['map'](_0x82ee64=>_0x82ee64['getRange']());_0x58765c['length']>0x0&&_0x6b0486['push']([_0x2df56b['view'],_0x52dafc]);}return _0x6b0486;}),this['listenTo'](_0x574a9a,'change:activeAnnotations',(_0x157580,_0x58b561,_0xf11d6b)=>{const _0x9e212f=Array['from'](_0xf11d6b)['map'](_0x53693a=>_0x53693a['innerView'])['find'](_0x2229e2=>_0x41da01['_viewToController']['has'](_0x2229e2));if(!_0x9e212f)return void(_0x5a5c48['activeMarker']=null);const _0x585d14=_0x41da01['_viewToController']['get'](_0x9e212f)['model']['id'],_0x2a803f='comment:'+_0x585d14;_0x585d14&&_0x5a5c48['hasMarkerForId'](_0x585d14)?_0x5a5c48['activeMarker']=_0x2a803f:_0x5a5c48['activeMarker']&&(_0x5a5c48['activeMarker']=null);}),this['listenTo'](_0x41da01,'removeCommentThread',(_0x2b7882,{threadId:_0x4ca2b6,isFromAdapter:_0x8081dd})=>{!_0x8081dd&&_0x2b07c4['ui']['focusTracker']['isFocused']&&_0x5a5c48['hasMarkerForId'](_0x4ca2b6)&&_0x2b07c4['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x41da01,'addComment',(_0x147879,{threadId:_0x5cf2a0,isFromAdapter:_0x3d2b43})=>{if(_0x3d2b43||!_0x5a5c48['hasMarkerForId'](_0x5cf2a0)||!_0x41da01['hasCommentThread'](_0x5cf2a0))return;0x1===_0x41da01['getCommentThread'](_0x5cf2a0)['length']&&(_0x2b07c4['editing']['view']['focus'](),_0x147879['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x472d29=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x49ecc9;for(const _0x1bb05b in _0x472d29){const _0x405d60=_0x1bb05b,_0x5708b0=_0x472d29[_0x405d60];if('commentsLicenseKeyValid'==_0x5708b0||'commentsLicenseKeyInvalid'==_0x5708b0||'commentsLicenseKeyExpired'==_0x5708b0||'commentsLicenseKeyDomainLimit'==_0x5708b0||'commentsLicenseKeyNotAllowed'==_0x5708b0||'commentsLicenseKeyEvaluationLimit'==_0x5708b0||'commentsLicenseKeyTrialLimit'==_0x5708b0||'commentsLicenseKeyUsageLimit'==_0x5708b0){delete _0x472d29[_0x405d60],_0x49ecc9=_0x5708b0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x49ecc9&&_0x472d29['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x49ecc9&&_0x472d29['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x49ecc9&&_0x472d29['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x49ecc9&&_0x472d29['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x49ecc9&&_0x472d29['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x49ecc9&&_0x472d29['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x49ecc9&&_0x472d29['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x4b41ec){const _0x215e3e=this['editor'],_0x2f7f2a=new _0x4b41ec(_0x215e3e['locale']),_0x139d38=_0x215e3e['commands']['get']('addCommentThread');return _0x2f7f2a['set']({'label':N(_0x215e3e['locale'],'Comment'),'icon':_0x224626}),_0x2f7f2a['bind']('isEnabled')['to'](_0x139d38,'hasContent'),this['listenTo'](_0x2f7f2a,'execute',()=>{_0x139d38['execute']();}),_0x2f7f2a;}}class i extends _0x5ddc0e{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x419518){super(_0x419518),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1e6f7f,_0xa67aee,_0x22b27f)=>{_0x22b27f?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x15bf29,_0x462656]of this['editor']['commands'])_0x462656['affectsData']&&'addCommentThread'!==_0x15bf29&&_0x462656['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing'))&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x4f1353=this['editor']['editing']['view']['document'];this['listenTo'](_0x4f1353,'cut',_0x1f75dc=>_0x1f75dc['stop'](),{'priority':'highest'}),this['listenTo'](_0x4f1353,'clipboardInput',_0x573d61=>_0x573d61['stop'](),{'priority':'highest'}),this['listenTo'](_0x4f1353,'delete',_0x449eb2=>_0x449eb2['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x48422d,_0x53dcb8]of this['editor']['commands'])_0x53dcb8['affectsData']&&'addCommentThread'!==_0x48422d&&_0x53dcb8['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x2738de{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1980b4){super(_0x1980b4),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x345a75=this['context']['plugins']['get'](y);this['listenTo'](_0x345a75,'_activateAnnotation',(_0x275177,_0xfb94c7)=>{for(const _0x3c1743 of this['activeUIs']){const _0x3361e4=this['_uis']['get'](_0x3c1743);(0x0,this['uisData']['get'](_0x3c1743)['filter'])(_0xfb94c7)&&_0x3361e4['setActiveAnnotation'](_0xfb94c7);}}),this['listenTo'](_0x345a75,'_deactivateAllAnnotations',()=>{for(const _0x308d8a of this['activeUIs']){this['_uis']['get'](_0x308d8a)['setActiveAnnotation'](null);}}),this['listenTo'](_0x345a75['_visibleAnnotations'],'add',(_0x2c4fb7,_0x55da1b)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x55da1b);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x545043){return this['activeUIs']['has'](_0x545043);}['activate'](_0x584242,_0x4c599f=this['defaultFilter']){const _0x2bd424=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x584242))throw new _0x51f518('annotationsuis-missing-ui',this,{'uiName':_0x584242});this['isActive'](_0x584242)&&this['deactivate'](_0x584242),this['activeUIs']['add'](_0x584242);const _0x2db359=new S();v({'source':_0x2bd424['_visibleAnnotations'],'target':_0x2db359,'filter':_0x4c599f}),this['uisData']['set'](_0x584242,{'collection':_0x2db359,'filter':_0x4c599f});const _0x2735d4=this['_uis']['get'](_0x584242);_0x2735d4['attach'](_0x2db359),this['listenTo'](_0x2735d4,'change:activeAnnotation',(_0x2cbc73,_0xf3a79f,_0x506373,_0x13c333)=>{_0x13c333&&_0x2bd424['_removeActiveAnnotation'](_0x13c333),_0x506373&&_0x2bd424['_addActiveAnnotation'](_0x506373);});}['deactivate'](_0x4bf071){if(this['activeUIs']['delete'](_0x4bf071),!this['_uis']['has'](_0x4bf071))throw new _0x51f518('annotationsuis-missing-ui',this,{'uiName':_0x4bf071});const _0x4c1232=this['_uis']['get'](_0x4bf071);_0x4c1232['detach'](),this['stopListening'](_0x4c1232),this['uisData']['get'](_0x4bf071)['collection']['destroy'](),this['uisData']['delete'](_0x4bf071);}['switchTo'](_0x49bbb3){if(!this['_uis']['has'](_0x49bbb3))throw new _0x51f518('annotationsuis-missing-ui',this,{'uiName':_0x49bbb3});const _0x278dbc=this['context']['plugins']['get'](y),_0x1d0d02=Array['from'](_0x278dbc['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x49bbb3);const _0x5c9cb5=this['_uis']['get'](_0x49bbb3);_0x5c9cb5['setActiveAnnotation'](_0x1d0d02),_0x5c9cb5['_setSelectedAnnotations']&&_0x1d0d02&&_0x5c9cb5['_setSelectedAnnotations']([_0x1d0d02]);}['deactivateAll'](){for(const _0x31cf25 of this['activeUIs'])this['deactivate'](_0x31cf25);}['register'](_0xc39679,_0x2344b4){if(this['_uis']['has'](_0xc39679))throw new _0x51f518('annotationsuis-register-already-registered');if('function'!=typeof _0x2344b4['attach']||'function'!=typeof _0x2344b4['detach']||'function'!=typeof _0x2344b4['setActiveAnnotation'])throw new _0x51f518('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0xc39679,_0x2344b4);}['refilterAnnotations'](){const _0x1eb502=this['context']['plugins']['get'](y)['collection'],_0x5a360d=new Map(),_0x54266e=Array['from'](this['activeUIs']);for(const _0x2881ba of this['activeUIs']){const _0xbb872c=this['uisData']['get'](_0x2881ba)['collection'];for(const _0x3ac367 of _0xbb872c)_0x5a360d['set'](_0x3ac367,_0x2881ba);}for(const _0x1253f2 of _0x1eb502){const _0x2f7d47=_0x5a360d['get'](_0x1253f2);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1253f2);const _0x8f8b67=_0x54266e['find'](_0x1e80b3=>this['uisData']['get'](_0x1e80b3)['filter'](_0x1253f2));_0x2f7d47!==_0x8f8b67&&(_0x2f7d47&&this['uisData']['get'](_0x2f7d47)['collection']['remove'](_0x1253f2),_0x8f8b67&&this['uisData']['get'](_0x8f8b67)['collection']['add'](_0x1253f2));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1ba032){const _0x31fa6e=[];for(const _0x129ed2 of this['activeUIs']){(0x0,this['uisData']['get'](_0x129ed2)['filter'])(_0x1ba032)&&_0x31fa6e['push'](_0x129ed2);}if(_0x31fa6e['length']>0x1)throw new _0x51f518('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x31fa6e,'annotationType':_0x1ba032['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x1aa6c2){super(_0x1aa6c2);const _0x41ea3f=this['bindTemplate'];this['set']('minHeight',0x0),this['set']('class',''),this['list']=this['createCollection'](),this['focusables']=this['createCollection'](),this['list']['delegate']('arrowup','arrowdown')['to'](this),this['focusTracker']=new _0x199d2b(),this['focusCycler']=new _0x2f1de9({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x41ea3f['to']('class')],'style':{'minHeight':_0x41ea3f['to']('minHeight',_0x4b42f3=>'number'==typeof _0x4b42f3?_i(_0x4b42f3+0xa):null)},'dir':_0x1aa6c2['uiLanguageDirection'],'role':'application','aria-label':N(_0x1aa6c2,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x1aa6c2,'Annotations\x20list')},'children':this['list']}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['focus'](){this['focusCycler']['focusFirst']();}['_setupKeyboardNavigation'](){this['list']['delegate']('change:top')['to'](this),this['on']('change:top',_0x468115=>{this['_updateItemPositionInFocusables'](_0x468115['source']);}),this['list']['forEach'](_0x22883c=>{this['focusTracker']['add'](_0x22883c['element']),this['_updateItemPositionInFocusables'](_0x22883c);}),this['list']['on']('change',(_0x18e67c,_0x146198)=>{for(const _0x4bf144 of _0x146198['removed'])this['focusTracker']['remove'](_0x4bf144['element']),this['focusables']['remove'](_0x4bf144);for(const _0x53a56e of _0x146198['added'])this['focusTracker']['add'](_0x53a56e['element']),this['_updateItemPositionInFocusables'](_0x53a56e);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x5017c4){const _0x4dedce=this['focusables']['getIndex'](_0x5017c4);let _0x1d24f0,_0x2ac519;for(const _0x320e70 of this['focusables'])if(_0x5017c4['top']<_0x320e70['top']){_0x1d24f0=_0x320e70;break;}if(_0x2ac519=_0x1d24f0?this['focusables']['getIndex'](_0x1d24f0):this['focusables']['length'],-0x1!==_0x4dedce){if(_0x4dedce===_0x2ac519-0x1)return;this['focusables']['remove'](_0x5017c4),_0x2ac519=_0x1d24f0?this['focusables']['getIndex'](_0x1d24f0):this['focusables']['length'];}this['focusables']['add'](_0x5017c4,_0x2ac519);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x168556){super(_0x168556),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x5c1f3e,_0x238cf6)=>_0x5c1f3e+_0x238cf6),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x136284=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x136284['to']('isAnimationDisabled',_0x7ca701=>_0x7ca701?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x136284['to']('top',_0x1eaf56=>Ot(_0x1eaf56))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x304394=this['element']['clientHeight'];_0x304394&&(this['height']=_0x304394);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x2738de{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x91ea16){super(_0x91ea16),this['set']('_lastItem',void 0x0),this['view']=this['_createSidebarView'](),this['set']('container',null),this['_spaceBetweenItems']=0x19,this['_sidebarItemViewToAnnotation']=new Map(),this['_annotationToSidebarItemView']=new Map(),this['context']['config']['define']('sidebar.preventScrollOutOfView',!0x1),this['_annotations']=null,this['_activeAnnotation']=null,this['_recalculateBuffer']=[];}['init'](){const _0x481fa4=this['context']['config']['get']('sidebar.container');_0x481fa4&&this['setContainer'](_0x481fa4);}['setContainer'](_0xe7c09f){if(!g(_0xe7c09f))throw new _0x51f518('sidebar-setcontainer-invalid-element');this['container']=_0xe7c09f;}['_attachToContainer']({viewClass:_0x2b695d='',spaceBetweenItems:_0xdc8d4d=0x19}={}){if(!g(this['container']))throw new _0x51f518('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2b695d,this['_spaceBetweenItems']=_0xdc8d4d;}['rearrange']({removedAnnotation:_0x2b89b3,previousAnnotation:_0x7eecc4,nextAnnotation:_0x554e9e}){const _0x21deff=this['getSidebarItemView'](_0x2b89b3);this['view']['list']['remove'](_0x21deff),this['_destroySidebarItemView'](_0x2b89b3),_0x7eecc4&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x7eecc4)),_0x554e9e&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x554e9e)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x55c752,activatedAnnotation:_0x5189ea,disableAnimationOnActivatedAnnotation:_0x21aa9e}){if(this['_activeAnnotation']=_0x5189ea,_0x55c752){_0x55c752['isActive']=!0x1;const _0x13a66a=this['getSidebarItemView'](_0x55c752);_0x13a66a&&_0x21aa9e&&(_0x13a66a['isAnimationDisabled']=!0x1);}if(_0x5189ea){const _0xf139=this['getSidebarItemView'](_0x5189ea);_0xf139&&(_0x5189ea['isActive']=!0x0,_0x21aa9e&&(_0xf139['isAnimationDisabled']=!0x0,_0xf139['top']+=0x1),this['_alignToTargetRect'](_0xf139));}}['_detachFromContainer'](_0x22660d){if(this['view']['element']['remove'](),_0x22660d){for(const _0x2d9524 of _0x22660d)this['_destroySidebarItemView'](_0x2d9524);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x59cc3c,_0x427a9a){_0x427a9a||(_0x427a9a=_0x59cc3c['view']);const _0x3bbeac=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x3bbeac,_0x59cc3c),this['_annotationToSidebarItemView']['set'](_0x59cc3c,_0x3bbeac),_0x3bbeac['content']['add'](_0x427a9a),this['listenTo'](_0x59cc3c['view'],'change:targetRect',(_0x510b6f,_0x401eb3,_0x315e2a)=>{const _0x316a6e=this['_getTargetTop'](_0x59cc3c,_0x315e2a);_0x3bbeac['_targetTop']!=_0x316a6e&&(_0x3bbeac['_targetTop']=_0x316a6e,this['_setItemTop'](_0x3bbeac,_0x316a6e));}),this['listenTo'](_0x3bbeac,'change:top',()=>{this['_recalculate'](_0x3bbeac,'top');}),this['listenTo'](_0x3bbeac,'change:bottom',()=>{this['_recalculate'](_0x3bbeac,'bottom');}),this['_alignToTargetRect'](_0x3bbeac);const _0x27963b=this['_getItemBefore'](_0x3bbeac);if(_0x27963b)this['_alignAfterItem'](_0x27963b,_0x3bbeac)||this['_alignToTargetRect'](_0x3bbeac);else this['_alignToTargetRect'](_0x3bbeac);return this['_updateLastItem'](),this['view']['list']['add'](_0x3bbeac),_0x3bbeac;}['_alignForTopChange'](_0x59a134){if(!_0x59a134['content']['length'])return;const _0x304bb0=this['_getItemBefore'](_0x59a134);if(!_0x304bb0)return;const _0x3011d9=this['_sidebarItemViewToAnnotation']['get'](_0x304bb0),_0x4d9ab6=this['_activeAnnotation'];_0x4d9ab6&&_0x4d9ab6===_0x3011d9?this['_alignAfterItem'](_0x304bb0,_0x59a134):this['_alignBeforeItem'](_0x59a134,_0x304bb0);}['_alignForBottomChange'](_0x31331a){if(!_0x31331a['content']['length'])return;const _0x34907f=this['_getItemAfter'](_0x31331a);if(!_0x34907f)return;const _0x83f92c=this['_sidebarItemViewToAnnotation']['get'](_0x34907f),_0x4abb15=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5811cc=this['_activeAnnotation'];_0x5811cc&&_0x5811cc===_0x83f92c&&_0x4abb15?(this['_alignBeforeItem'](_0x34907f,_0x31331a),this['_alignAfterItem'](_0x31331a,_0x34907f)):_0x5811cc&&_0x5811cc===_0x83f92c?this['_alignBeforeItem'](_0x34907f,_0x31331a):this['_alignAfterItem'](_0x31331a,_0x34907f);}['_recalculate'](_0x2269a4,_0x39350b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4d0d5c,changedProp:_0x1870b4}of this['_recalculateBuffer'])'top'===_0x1870b4?this['_alignForTopChange'](_0x4d0d5c):this['_alignForBottomChange'](_0x4d0d5c);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x2269a4,'changedProp':_0x39350b});}['getSidebarItemView'](_0xd1a1e2){return this['_annotationToSidebarItemView']['get'](_0xd1a1e2);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4bd34e){const _0x4a3417=this['getSidebarItemView'](_0x4bd34e);this['stopListening'](_0x4a3417),this['stopListening'](_0x4bd34e['view']),_0x4a3417['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4bd34e),this['_sidebarItemViewToAnnotation']['delete'](_0x4a3417);}['_createSidebarView'](){const _0x5b4ad8=new H(this['context']['locale']);return _0x5b4ad8['render'](),this['on']('change:_lastItem',(_0x42eb7b,_0x243722,_0x18de49,_0x21f530)=>{_0x21f530&&_0x5b4ad8['unbind']('minHeight'),_0x18de49?_0x5b4ad8['bind']('minHeight')['to'](_0x18de49,'bottom'):_0x5b4ad8['minHeight']=null;}),_0x5b4ad8;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x511eb3){const _0x2da19c=this['_sidebarItemViewToAnnotation']['get'](_0x511eb3),_0x5991b1=_0x2da19c&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2da19c)-0x1);return _0x5991b1&&this['getSidebarItemView'](_0x5991b1)||null;}['_getItemAfter'](_0x15bd39){const _0x59d6a6=this['_sidebarItemViewToAnnotation']['get'](_0x15bd39),_0x62749=_0x59d6a6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x59d6a6)+0x1);return _0x62749&&this['getSidebarItemView'](_0x62749)||null;}['_alignBeforeItem'](_0x1575ae,_0x219c89){_0x1575ae['updateHeight']();const _0x37fa05=G(_0x219c89['bottom']+this['_spaceBetweenItems'],_0x1575ae['top']);return!!_0x37fa05&&(this['_setItemTop'](_0x219c89,_0x219c89['top']-_0x37fa05),!0x0);}['_alignAfterItem'](_0x282f9a,_0x384329){_0x282f9a['updateHeight']();const _0x34b18e=G(_0x282f9a['bottom']+this['_spaceBetweenItems'],_0x384329['top']);return!!_0x34b18e&&(this['_setItemTop'](_0x384329,_0x384329['top']+_0x34b18e,!0x1),!0x0);}['_alignToTargetRect'](_0x121035){const _0x70ea72=this['_sidebarItemViewToAnnotation']['get'](_0x121035);if(!_0x70ea72||!_0x70ea72['target']||!_0x70ea72['targetRect'])return;const _0x41bf60=this['_getTargetTop'](_0x70ea72,_0x70ea72['targetRect']);this['_setItemTop'](_0x121035,_0x41bf60);}['_getTargetTop'](_0x392428,_0x123474){if(null===_0x123474)return 0x0;if(_0x392428['target']instanceof _0x37570f)return _0x123474['top'];{const _0x145394=new _0x37570f(this['view']['element'])['top'];return _0x123474['top']-_0x145394;}}['_setItemTop'](_0x30fd14,_0x2dca40,_0x8b63ba=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x8b63ba&&(_0x2dca40=Math['max'](_0x2dca40,this['_getMaxAvailableTop'](_0x30fd14))),_0x30fd14['top']=_0x2dca40;}['_getMaxAvailableTop'](_0x57cf66){let _0x5cbc5a=this['_getItemBefore'](_0x57cf66),_0x58b2c1=0x0;for(;_0x5cbc5a;)_0x5cbc5a['updateHeight'](),_0x58b2c1+=this['_spaceBetweenItems']+_0x5cbc5a['height'],_0x5cbc5a=this['_getItemBefore'](_0x5cbc5a);return _0x58b2c1;}}function G(_0x235b5a,_0x43e792){return Math['max'](_0x235b5a-_0x43e792,0x0);}function g(_0x21dea4){return null!==_0x21dea4&&'object'==typeof _0x21dea4&&0x1===_0x21dea4['nodeType'];}class e extends _0x2738de{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x19d2f2){super(_0x19d2f2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x23eb0b(),this['_refreshPositioningDebounced']=_0x40c01b(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x1ee65b=this['context']['plugins']['get'](j),_0x9be416=this['context']['plugins']['get'](z);_0x1ee65b['register']('wideSidebar',this),_0x9be416['container']&&_0x1ee65b['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x40a9e1){if(_0x40a9e1===this['activeAnnotation'])return;const _0x2a06b6=this['context']['plugins']['get'](z);_0x2a06b6['_activeAnnotation']=_0x40a9e1;const _0x3a907a=this['activeAnnotation'];_0x2a06b6['refresh']({'blurredAnnotation':_0x3a907a,'activatedAnnotation':_0x40a9e1}),this['activeAnnotation']=_0x40a9e1;}['attach'](_0x57ae0e){this['annotations']=_0x57ae0e;const _0x42ce9d=this['context']['plugins']['get'](z);if(_0x42ce9d['_annotations']=_0x57ae0e,this['isAttached'])throw new _0x51f518('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x42ce9d,'set:container',()=>{this['detach'](),this['listenTo'](_0x42ce9d,'change:container',_0x221cfd=>{_0x221cfd['off'](),this['attach'](_0x57ae0e);});}),_0x42ce9d['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x2af16a=_0x494b58=>{_0x494b58['updateTargetRect'](),_0x42ce9d['addAnnotation'](_0x494b58);};for(const _0x5b5577 of _0x57ae0e)_0x2af16a(_0x5b5577);this['listenTo'](_0x57ae0e,'add',(_0x4684f7,_0x38bc89)=>{_0x2af16a(_0x38bc89);}),this['listenTo'](_0x57ae0e,'remove',(_0x187e55,_0x13d93e,_0x5d1e52)=>{_0x42ce9d['rearrange']({'removedAnnotation':_0x13d93e,'previousAnnotation':_0x57ae0e['get'](_0x5d1e52-0x1),'nextAnnotation':_0x57ae0e['get'](_0x5d1e52+0x1)}),_0x13d93e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x57ae0e,'focus',(_0x43e283,_0x11a4d6)=>{this['setActiveAnnotation'](_0x11a4d6);}),this['listenTo'](_0x57ae0e,'blur',()=>{this['setActiveAnnotation'](null);});const _0x1e0b70=this['context']instanceof _0x449ace?this['context']['editors']:new _0x23eb0b([this['context']]);for(const _0xbf8a79 of _0x1e0b70)this['_integrateWithEditorAnnotations'](_0xbf8a79);this['listenTo'](_0x1e0b70,'add',(_0x3f0169,_0x11d864)=>{this['listenTo'](_0x11d864,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x11d864);});}),this['listenTo'](_0x1e0b70,'remove',(_0x2d289e,_0x14266d)=>{_0x14266d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x14266d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x51f518('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x50a3f4=this['context']['plugins']['get'](z);_0x50a3f4['_detachFromContainer'](this['annotations']),this['stopListening'](_0x50a3f4),this['stopListening'](this['annotations']),this['context']instanceof _0x449ace&&this['stopListening'](this['context']['editors']);for(const _0x37671e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x37671e);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x40cc8f){if(!_0x40cc8f['plugins']['has']('EditorAnnotations'))return;const _0x61134c=_0x40cc8f['plugins']['get']('EditorAnnotations'),_0xb5f293=()=>{const _0x1fb19e=_0x61134c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x1fb19e[0x0]||null);};this['listenTo'](_0x61134c,'refresh',_0xb5f293),this['listenTo'](_0x61134c,'blur',(_0x7a4414,{isAnnotationTracked:_0x121cd1})=>{this['activeAnnotation']&&_0x121cd1(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x61134c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x10c46a=>{_0x61134c['hasDomSelection']()&&(_0xb5f293(),_0x10c46a['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x61134c);}['_destroyEditorAnnotationsIntegration'](_0x58a2f1){this['stopListening'](_0x58a2f1),this['_editorAnnotations']['remove'](_0x58a2f1);}}class C extends _0x49f2c7{['counterView'];constructor(_0x93d430){super(_0x93d430);const _0x202c79=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x7b783d,_0x2c27d9)=>_0x7b783d?'...':_0x2c27d9['toString']()),this['set']('annotationType',''),this['icon']=_0x224626,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x202c79['to']('annotationType',_0x5d4f51=>'ck-annotation-counter__badge--'+_0x5d4f51),_0x202c79['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x202c79['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x2738de{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1aa0a4){super(_0x1aa0a4),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x35e1dc())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x23eb0b(),this['_refreshPositioningDebounced']=_0x40c01b(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x5a4cd6(this['context']['locale']),this['balloonPanelView']=new _0x263b66(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x3160f5){this['annotations']=_0x3160f5;const _0x4e64ea=this['context']['plugins']['get'](z),_0x23dea4=this['balloonPanelView'];if(_0x4e64ea['_annotations']=_0x3160f5,this['isAttached'])throw new _0x51f518('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4e64ea,'set:container',()=>{this['detach'](),this['listenTo'](_0x4e64ea,'change:container',_0x1d5c06=>{_0x1d5c06['off'](),this['attach'](_0x3160f5);});}),_0x4e64ea['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x523cc7=_0x2ced47=>{const _0x1a8396=new C(this['context']['locale']);_0x4e64ea['addAnnotation'](_0x2ced47,_0x1a8396),this['_annotationToNarrowView']['set'](_0x2ced47,_0x1a8396),_0x1a8396['bind']('isDirty','annotationType','number')['to'](_0x2ced47['view'],'isDirty','type','length'),_0x1a8396['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x23dea4['content']['first']!==_0x2ced47['view']?(this['_showBalloon'](_0x2ced47),_0x2ced47['view']['element']['focus'](),this['setActiveAnnotation'](_0x2ced47)):this['setActiveAnnotation'](null);});};for(const _0xc30771 of _0x3160f5)_0x523cc7(_0xc30771);this['listenTo'](_0x3160f5,'add',(_0x128043,_0x2804be)=>{_0x523cc7(_0x2804be);}),this['listenTo'](_0x3160f5,'remove',(_0x4235c3,_0x1244aa,_0x3e93e3)=>{this['_annotationToNarrowView']['get'](_0x1244aa)['destroy'](),this['_annotationToNarrowView']['delete'](_0x1244aa),_0x4e64ea['rearrange']({'removedAnnotation':_0x1244aa,'previousAnnotation':_0x3160f5['get'](_0x3e93e3-0x1),'nextAnnotation':_0x3160f5['get'](_0x3e93e3+0x1)}),_0x1244aa===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x3160f5,'focus',(_0x17118c,_0x50ec33)=>{this['setActiveAnnotation'](_0x50ec33);}),this['listenTo'](_0x3160f5,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x51f116,_0x5446da)=>{_0x5446da['keyCode']===_0x5b1abd['esc']&&_0x23dea4['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x23dea4['content']['first']),this['_hideBalloon'](),_0x5446da['stopPropagation'](),_0x5446da['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x573407,_0x33ba9d)=>{const _0x11efec=_0x33ba9d['target'];_0x23dea4['isVisible']&&_0x23dea4['element']['contains'](_0x11efec)||_0x4e64ea['view']['element']['contains'](_0x11efec)||_0x573407['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x505ade=>_0x505ade['contains'](_0x11efec))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1a5037=this['context']instanceof _0x449ace?this['context']['editors']:new _0x23eb0b([this['context']]);for(const _0x408cd3 of _0x1a5037)this['_integrateWithEditorAnnotations'](_0x408cd3);this['listenTo'](_0x1a5037,'add',(_0xe0af6,_0x323d2f)=>{this['listenTo'](_0x323d2f,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x323d2f);});}),this['listenTo'](_0x1a5037,'remove',(_0x2e8b41,_0x37c440)=>{_0x37c440['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x37c440['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5c56d){if(_0x5c56d===this['activeAnnotation'])return;const _0x7d38ae=this['context']['plugins']['get'](z);if(_0x7d38ae['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5c56d,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5c56d)_0x7d38ae['getSidebarItemView'](_0x5c56d)?this['_showBalloon'](_0x5c56d):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5c56d;}['detach'](){if(!this['isAttached'])throw new _0x51f518('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2b6160=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x58432f=>_0x58432f['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2b6160['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x449ace&&this['stopListening'](this['context']['editors']);for(const _0x27ba04 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x27ba04);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['_selectedAnnotations']=[],this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['bodyCollection']['detachFromDom']();}['_integrateWithEditorAnnotations'](_0x9a0120){if(!_0x9a0120['plugins']['has']('EditorAnnotations'))return;const _0x36d79c=_0x9a0120['plugins']['get']('EditorAnnotations'),_0x142e00=this['context']['plugins']['get'](z),_0x20e074=this['annotations'],_0xf316ab=this['balloonPanelView'],_0x4c158f=()=>{const _0x180c28=_0x36d79c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x180c28),this['setActiveAnnotation'](_0x180c28[0x0]||null);};this['listenTo'](_0x36d79c,'refresh',_0x4c158f),this['listenTo'](_0x36d79c,'blur',(_0x157131,{isAnnotationTracked:_0x9fa5cc})=>{this['activeAnnotation']&&_0x9fa5cc(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x36d79c,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x20e074,'blur',_0x3acfd7=>{_0x36d79c['hasDomSelection']()&&_0x3acfd7['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x4dbc78,_0x3215e5)=>{const _0x5a909b=_0x3215e5['target'];_0xf316ab['isVisible']&&_0xf316ab['element']['contains'](_0x5a909b)||_0x142e00['view']['element']['contains'](_0x5a909b)||this['activeAnnotation']&&_0x36d79c['hasDomSelection']()&&(_0x4c158f(),_0x4dbc78['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x36d79c);}['_destroyEditorAnnotationsIntegration'](_0xbfba6c){_0xbfba6c&&(this['stopListening'](_0xbfba6c),this['_editorAnnotations']['remove'](_0xbfba6c));}['_setSelectedAnnotations'](_0x1d9655){for(const _0x17f5fe of this['_selectedAnnotations'])_0x1d9655['includes'](_0x17f5fe)||this['_manuallyClosedAnnotationViews']['delete'](_0x17f5fe['view']);this['_selectedAnnotations']=_0x1d9655;}['_refreshPositioning'](){const _0x1b06c8=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x1b06c8['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x1b07c9){if(this['_manuallyClosedAnnotationViews']['has'](_0x1b07c9['view']))return;const _0x2c670d=this['balloonPanelView']['content']['first'];_0x2c670d!==_0x1b07c9['view']?(_0x2c670d&&this['_detachListeners'](_0x2c670d),this['_attachListeners'](_0x1b07c9['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x1b07c9['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x35998b=this['balloonPanelView']['content']['first'],_0x3e6677=_0x35998b&&this['annotations']['getByView'](_0x35998b);if(!_0x3e6677||!this['_annotationToNarrowView']['has'](_0x3e6677))return;const _0x34c641=this['_annotationToNarrowView']['get'](_0x3e6677)['element'],_0x23d4f1=(function(){const _0x30cb2d=_0x263b66['defaultPositions'];return[_0x30cb2d['southArrowNorthEast'],_0x30cb2d['northArrowSouthEast'],_0x30cb2d['southArrowNorth'],_0x30cb2d['northArrowSouth'],_0x30cb2d['southArrowNorthWest'],_0x30cb2d['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x34c641,'positions':_0x23d4f1});}['_hideBalloon'](){const _0x592a55=this['balloonPanelView'],_0x3b490c=_0x592a55['content']['first'];_0x3b490c&&(this['_detachListeners'](_0x3b490c),_0x592a55['unpin'](),_0x592a55['content']['clear']());}['_attachListeners'](_0x299963){this['listenTo'](_0x299963,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x299963,'Esc',(_0x41c5b9,_0x30abca)=>{this['_manuallyClosedAnnotationViews']['add'](_0x299963),this['_hideBalloon'](),_0x30abca();});}['_detachListeners'](_0x328d32){this['stopListening'](_0x328d32);}}class c extends _0x5ddc0e{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x36b0f0,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x161f30){super(_0x161f30),_0x161f30['editing']['view']['addObserver'](_0x5d0a9d),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x161f30['plugins']['get'](_0x36b0f0),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x13f758=this['editor']['plugins']['get'](j);_0x13f758['context']===this['editor']&&(_0x13f758['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x77bd22,_0x25c8a0)=>{const _0x2716b3=this['_balloon'];if(this['isAttached']&&_0x2716b3['visibleView']){const _0x54cbd3=this['annotations']['getByView'](_0x2716b3['visibleView']);_0x54cbd3&&this['_closeAnnotation'](_0x54cbd3),_0x25c8a0();}}));}['afterInit'](){const _0x42e82d=this['editor']['plugins']['get'](j);_0x42e82d['context']===this['editor']&&(_0x42e82d['hasActive']()||_0x42e82d['switchTo']('inline'));}['setActiveAnnotation'](_0x33b479){_0x33b479!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x33b479&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x33b479)&&this['_addAnnotationToBalloon'](_0x33b479,!0x0),_0x33b479['isActive']=!0x0),_0x33b479||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x33b479);}['attach'](_0x163189){this['annotations']=_0x163189;const _0x94de34=this['editor']['plugins']['get'](j),_0x5525d7=this['_balloon'];if(this['isAttached'])throw new _0x51f518('inlineannotations-attach-already-attached',this);if(_0x94de34['context']!==this['editor'])throw new _0x51f518('inlineannotations-not-allowed-with-context',this);const _0x4242e2=this['editor']['plugins']['get'](b);this['listenTo'](_0x4242e2,'refresh',()=>{const _0x158829=_0x4242e2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4a25c2,_0x3176a9;!this['_forceRefresh']&&(_0x4a25c2=_0x158829,_0x3176a9=this['_selectedAnnotations'],_0x4a25c2['length']===_0x3176a9['length']&&_0x4a25c2['every'](_0x44de80=>_0x3176a9['includes'](_0x44de80)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x158829),this['setActiveAnnotation'](_0x158829[0x0]||null));}),this['listenTo'](_0x4242e2,'blur',(_0x105ac9,{isAnnotationTracked:_0x57185b})=>{this['activeAnnotation']&&_0x57185b(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x5aeb61,_0x2b00d9,_0x1fa878)=>{_0x1fa878||this['setActiveAnnotation'](null);}),this['listenTo'](_0x163189,'remove',(_0x569988,_0x43f348)=>{this['_removeAnnotationFromBalloon'](_0x43f348),_0x43f348===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x5525d7,'change:visibleView',(_0x462f89,_0x2e9227,_0x2ff1ac,_0x5585e6)=>{_0x5585e6&&this['stopListening'](_0x5585e6);const _0x50e2dd=_0x163189['getByView'](_0x2ff1ac);_0x2ff1ac&&_0x50e2dd&&(this['listenTo'](_0x2ff1ac,'change:height',()=>{_0x5525d7['updatePosition']();}),this['listenTo'](_0x2ff1ac,'Esc',()=>{this['_closeAnnotation'](_0x50e2dd),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x50e2dd&&this['setActiveAnnotation'](_0x50e2dd));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x5525d7['visibleView']&&(_0x163189['getByView'](_0x5525d7['visibleView'])&&_0x5525d7['updatePosition']());}),this['listenTo'](this['editor']['editing']['view']['document'],'mousedown',()=>{this['_forceRefresh']=!0x0,this['_manuallyClosed']['clear']();}),this['editor']['editing']['view']['document']['selection']['editableElement']&&this['editor']['editing']['view']['focus'](),this['isAttached']=!0x0;}['detach'](){if(!this['isAttached'])throw new _0x51f518('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x3e7444 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x3e7444);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0xc0c724){for(const _0x3c7c41 of this['_selectedAnnotations'])_0xc0c724['includes'](_0x3c7c41)||this['_manuallyClosed']['delete'](_0x3c7c41);for(const _0x4ad342 of this['annotations'])_0xc0c724['includes'](_0x4ad342)||this['_removeAnnotationFromBalloon'](_0x4ad342);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x5e3651 of _0xc0c724)this['_addAnnotationToBalloon'](_0x5e3651);}this['_selectedAnnotations']=_0xc0c724;}['_addAnnotationToBalloon'](_0x24bb88,_0x9b1630=!0x1){this['_manuallyClosed']['has'](_0x24bb88)||(this['_addedAnnotations']['has'](_0x24bb88)||this['_balloon']['hasView'](_0x24bb88['view'])||(this['_addedAnnotations']['add'](_0x24bb88),this['_balloon']['add']({'stackId':_0x24bb88['view']['id'],'view':_0x24bb88['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x24bb88)}})),_0x9b1630&&this['_balloon']['showStack'](_0x24bb88['view']['id']));}['_getBalloonTargetForAnnotation'](_0x33ef18){const _0x5bd83c=_0x33ef18['target'],_0x365ade=this['editor']['editing']['view'],_0x5f36c6=_0x365ade['document']['selection']['getFirstRange'](),_0x1c61ec=_0x365ade['domConverter']['viewRangeToDom'](_0x5f36c6);if(_0x1c61ec['collapse'](!0x0),_0x5bd83c){if(_0x5bd83c instanceof _0x37570f)return _0x5bd83c;let _0xdcd681=[];for(const _0x4a5333 of _0x5bd83c)_0xdcd681['push'](...F(_0x4a5333['getClientRects']()));_0xdcd681=function(_0x3a1457){const _0x5d92e1=[];let _0xf6950e=_0x3a1457[0x0];for(let _0x41e1b9=0x1;_0x41e1b9<_0x3a1457['length'];_0x41e1b9++)P(_0xf6950e,_0x3a1457[_0x41e1b9])?_0xf6950e['width']+=_0x3a1457[_0x41e1b9]['width']:(_0x5d92e1['push'](_0xf6950e),_0xf6950e=_0x3a1457[_0x41e1b9]);return _0x5d92e1['push'](_0xf6950e),_0x5d92e1;}(_0xdcd681);const _0x405339=_0x1c61ec['getBoundingClientRect']();return _0xdcd681['find'](_0x23d6a1=>_0x23d6a1['top']<=_0x405339['top']&&_0x23d6a1['bottom']>=_0x405339['bottom']&&_0x23d6a1['left']<=_0x405339['left']&&_0x23d6a1['right']>=_0x405339['right'])||_0xdcd681[0x0];}return _0x33ef18['targetRect']||_0x1c61ec;}['_removeAnnotationFromBalloon'](_0xb74736){this['_addedAnnotations']['has'](_0xb74736)&&this['_balloon']['hasView'](_0xb74736['view'])&&(this['_addedAnnotations']['delete'](_0xb74736),this['_balloon']['remove'](_0xb74736['view']));}['_closeAnnotation'](_0x2dfef3){this['_manuallyClosed']['add'](_0x2dfef3),this['_removeAnnotationFromBalloon'](_0x2dfef3);}}function F(_0x233a0e){return Array['from'](_0x233a0e)['map'](DOMRect['fromRect']);}function P(_0x3aecec,_0x17396b){return _0x3aecec['top']===_0x17396b['top']&&_0x3aecec['bottom']===_0x17396b['bottom']&&_0x3aecec['right']===_0x17396b['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x5f080c,_0x523549){super(_0x5f080c),this['set']('isEmpty',!_0x523549['length']),this['focusTracker']=new _0x199d2b(),this['_annotationViews']=_0x523549,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2f1de9({'focusables':_0x523549,'focusTracker':this['focusTracker']}),this['listenTo'](_0x523549,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x523549,'remove',(_0xcaabda,_0x2e9918)=>{_0x2e9918['isActive']&&this['focus'](),_0x523549['length']||(this['isEmpty']=!0x0);});const _0x14040a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x5f080c,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x523549},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x14040a['if']('isEmpty','ck-hidden',_0x280020=>!_0x280020)]},'children':[{'text':N(_0x5f080c,'EMPTY_COMMENTS_ARCHIVE')}]}]}]});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['destroy'](){super['destroy'](),this['focusTracker']['destroy']();}['focus'](){this['focusCycler']['first']?this['focusCycler']['focusFirst']():this['element']['focus']();}['_setupKeyboardNavigation'](){for(const _0xe7d42c of this['_annotationViews'])this['focusTracker']['add'](_0xe7d42c['element']);this['_annotationViews']['on']('change',(_0x384ea5,{added:_0x5e6563,removed:_0x159f72})=>{for(const _0x151136 of _0x5e6563)this['focusTracker']['add'](_0x151136['element']);for(const _0x4ab2fe of _0x159f72)this['focusTracker']['remove'](_0x4ab2fe['element']);});}}class p extends _0x2738de{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x4181d5){super(_0x4181d5),this['archivedThreads']=new _0x23eb0b();}['init'](){const _0x31bc35=this['context'],_0x4c5987=_0x31bc35['plugins']['get'](o),_0x139372=_0x31bc35['plugins']['get'](y);this['listenTo'](_0x4c5987,'addCommentThread',(_0x2d9912,{threadId:_0x1150a2})=>{const _0x273917=_0x4c5987['getCommentThread'](_0x1150a2);_0x273917['archivedAt']&&this['archivedThreads']['add'](_0x273917,this['_calculatePosition'](_0x273917['archivedAt'])),this['listenTo'](_0x273917,'change:archivedAt',(_0x1264c2,_0x2d7bb3,_0x3200e3)=>{_0x3200e3?this['archivedThreads']['has'](_0x273917)||this['archivedThreads']['add'](_0x273917,this['_calculatePosition'](_0x273917['archivedAt'])):this['archivedThreads']['has'](_0x273917)&&this['archivedThreads']['remove'](_0x273917);});}),this['listenTo'](_0x4c5987,'removeCommentThread',(_0x59afa8,{threadId:_0x21708f})=>{const _0x3060a5=_0x4c5987['getCommentThread'](_0x21708f);this['stopListening'](_0x3060a5),this['archivedThreads']['has'](_0x3060a5)&&this['archivedThreads']['remove'](_0x3060a5);},{'priority':'highest'}),this['listenTo'](_0x139372['collection'],'focus',(_0x5324c7,_0x4a6794)=>{_0x4a6794['isVisible']||(_0x4a6794['isActive']=!0x0,_0x139372['activate'](_0x4a6794));});}['_calculatePosition'](_0x3f0625){const _0xa99d10=[...this['archivedThreads']]['findIndex'](_0x2b45b1=>_0x2b45b1['archivedAt']<_0x3f0625);return _0xa99d10>-0x1?_0xa99d10:this['archivedThreads']['length'];}}class a extends _0x5ddc0e{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0xeb9489];}constructor(_0x1de69d){super(_0x1de69d),this['annotationViews']=new _0xae5e8b(),this['_pendingThreads']=[];}['init'](){const _0xac178a=this['editor'],_0x19a937=this['_hideDialogOnAnnotationEscape']['bind'](this);_0xac178a['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x49f2c7,!0x0)),_0xac178a['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x506166=this['_createCommentsArchiveButton'](_0x58cd9a);return _0x506166['set']({'role':'menuitemcheckbox'}),_0x506166;});const _0x10fd63=_0xac178a['plugins']['get'](p),_0x521eb6=_0xac178a['plugins']['get']('Annotations'),_0x3e56a3=_0xac178a['plugins']['get']('CommentsRepository');_0x10fd63['archivedThreads']['forEach'](_0x56ffad=>{this['_handleNewThread'](_0x56ffad);}),this['listenTo'](_0x10fd63['archivedThreads'],'add',(_0xf14f9f,_0x3b16b1)=>{this['_handleNewThread'](_0x3b16b1);}),this['listenTo'](_0x521eb6['collection'],'add',(_0x48c00d,_0x4ecc08)=>{const _0x460226=this['_pendingThreads']['find'](_0x4ccea9=>{const _0x5c43dc=_0x3e56a3['_threadToController']['get'](_0x4ccea9);return _0x5c43dc&&_0x4ecc08['innerView']===_0x5c43dc['view'];});if(_0x460226){const _0x3ae710=this['_calculatePosition'](_0x460226['archivedAt']);this['annotationViews']['add'](_0x4ecc08['view'],_0x3ae710),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x460226),0x1);}}),this['listenTo'](_0x10fd63['archivedThreads'],'remove',(_0x49e375,_0x400b78)=>{const _0x2ce5e8=_0xac178a['config']['get']('collaboration.channelId');if(!_0x2ce5e8||_0x400b78['channelId']===_0x2ce5e8){if(this['_pendingThreads']['includes'](_0x400b78))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x400b78),0x1);else{const _0x3eb78e=_0x3e56a3['_threadToController']['get'](_0x400b78),_0x5998af=_0x521eb6['getByInnerView'](_0x3eb78e['view']);this['annotationViews']['remove'](_0x5998af['view']),this['stopListening'](_0x5998af['focusableElements']);}}}),this['listenTo'](_0x521eb6['collection'],'add',(_0x485cb6,_0x5a072a)=>{this['listenTo'](_0x5a072a,'escape',_0x19a937);}),this['listenTo'](_0x521eb6['collection'],'remove',(_0x876d1f,_0x36d9c9)=>{this['stopListening'](_0x36d9c9,'escape',_0x19a937);});}['_handleNewThread'](_0x965e9e){const _0x20a949=this['editor']['plugins']['get']('CommentsRepository'),_0x454d49=this['editor']['plugins']['get']('Annotations'),_0x499a77=this['editor']['config']['get']('collaboration.channelId');if(!_0x499a77||_0x965e9e['channelId']===_0x499a77){const _0x357fbe=_0x20a949['_threadToController']['get'](_0x965e9e);if(!_0x357fbe)return void this['_pendingThreads']['push'](_0x965e9e);const _0x261180=this['_calculatePosition'](_0x965e9e['archivedAt']),_0x234f43=_0x454d49['getByInnerView'](_0x357fbe['view']);_0x234f43['isVisible']&&_0x454d49['_visibleAnnotations']['remove'](_0x234f43),this['annotationViews']['add'](_0x234f43['view'],_0x261180);}}['_calculatePosition'](_0x5df100){const _0x3e39cb=this['editor']['config']['get']('collaboration.channelId'),_0x1e8964=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x2c32ab=>_0x2c32ab['channelId']===_0x3e39cb)['findIndex'](_0x4393d3=>_0x4393d3['archivedAt']<_0x5df100);return _0x1e8964<0x0||_0x1e8964>this['annotationViews']['length']?this['annotationViews']['length']:_0x1e8964-0x1;}['_toggleDialog'](){const _0x54d8e2=this['editor'],_0x1db34f=_0x54d8e2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x54d8e2['locale'],this['annotationViews'])),'commentsArchive'===_0x1db34f['id']?_0x1db34f['hide']():_0x1db34f['show']({'id':'commentsArchive','title':N(_0x54d8e2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x314692,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xd16eae['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x4cb7b7,_0x563f50=!0x1){const _0xccbd10=this['editor']['locale'],_0x51be16=this['editor']['plugins']['get']('Dialog'),_0x55f8fc=new _0x4cb7b7(_0xccbd10);return _0x55f8fc['bind']('isEnabled')['to'](this,'isEnabled'),_0x55f8fc['bind']('isOn')['to'](_0x51be16,'id',_0x57d12d=>'commentsArchive'===_0x57d12d),_0x55f8fc['set']({'label':N(_0xccbd10,'COMMENTS_ARCHIVE'),'icon':_0x314692,'isToggleable':!0x0}),_0x563f50&&(_0x55f8fc['tooltip']=!0x0),this['listenTo'](_0x55f8fc,'execute',()=>this['_toggleDialog']()),_0x55f8fc;}['_hideDialogOnAnnotationEscape']=_0x37476c=>{const _0x1c2293=_0x37476c['source'];if(!this['annotationViews']['has'](_0x1c2293['view']))return;const _0x4a8b37=this['editor']['plugins']['get']('Dialog');_0x4a8b37['isOpen']&&'commentsArchive'===_0x4a8b37['id']&&(_0x4a8b37['hide'](),_0x37476c['stop']());};}class gi extends _0x5ddc0e{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{rt as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,vt as CommentThreadView,gt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|