@ckeditor/ckeditor5-comments 46.0.1-alpha.0 → 46.0.1-alpha.10
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/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x2e4ece={}){function _0x10ab79(_0x368f8e){return _0x368f8e['map'](_0x41a9e7=>String['fromCharCode'](_0x41a9e7))['join']('');}(_0x2e4ece=Object['assign']({},_0x2e4ece))['plugins']||(_0x2e4ece['plugins']=Rt['defaultPlugins']),super(_0x2e4ece),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[_0x10ab79([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x10ab79([0x76,0x69,0x65,0x77])][_0x10ab79([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x10ab79([0x61,0x75,0x74,0x6f]),this[_0x10ab79([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x10ab79([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x10ab79([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x10ab79([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x10ab79([0x6f,0x6b])});}['create'](){const _0x16ead5=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x16ead5))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x26218a=>{const _0x2866c4=this['model']['document']['getRoot'](),_0x24ed98=_0x2866c4&&_0x2866c4['getChild'](_0x2866c4['childCount']-0x1);_0x26218a['setSelection'](_0x24ed98,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x21cec5=this['editing']['view'],_0x24f440=_0x21cec5['document']['getRoot'](),_0x3a76c1=_0x24f440['getChild'](0x0);_0x24f440['childCount']>0x1||!_0x3a76c1||'p'!=_0x3a76c1['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x21cec5,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3a76c1['placeholder']=this['placeholder']),St({'view':_0x21cec5,'element':_0x3a76c1,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3a76c1);}}class os extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x305d13,_0x180fbc={}){super(_0x305d13),this['editor']=null,this['_editorConfig']=_0x180fbc,this['set']('value',_0x180fbc['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x305d13,'Reply...')),this['set']('submitLabel',N(_0x305d13,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x2070b8(),this['focusCycler']=new _0x2a7d1c({'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',(_0x54c86e,_0x2e4592)=>{this['cancelButtonView']['fire']('execute'),_0x2e4592();}),this['keystrokes']['set']('Ctrl+Enter',(_0x5a995d,_0x36955f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x36955f());}),this['on']('submit',(_0x955834,_0x392b76)=>{_0x392b76['length']>0xfde8?(alert(N(_0x305d13,'TOO_LONG_COMMENT_ALERT',[_0x392b76['length'],0xfde8])),_0x955834['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x262b02=this['editor'];this['element']['insertBefore'](_0x262b02['ui']['element'],this['element']['firstChild']),_0x262b02['model']['document']['on']('change',()=>this['value']=_0x262b02['getData']()),_0x262b02['bind']('placeholder')['to'](this),this['focusables']['add'](_0x262b02['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x1fd375){-0x1===_0x1fd375?(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:_0x531bc2}=this,_0x565551=new _0x52b512(_0x531bc2);return _0x565551['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x565551['withText']=!0x0,_0x565551['bind']('label')['to'](this,'submitLabel'),_0x565551['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x565551['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4d82bd,_0x41b88b)=>!_0x41b88b&&!!_0x4d82bd['trim']()),_0x565551;}['_createCancelButton'](){const {locale:_0x508219}=this,_0x19c348=new _0x52b512(_0x508219);return _0x19c348['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x19c348['label']=N(_0x508219,'Cancel'),_0x19c348['withText']=!0x0,_0x19c348['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x19c348;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x1b3ea2=>{this['focusTracker']['add'](_0x1b3ea2['element']);}),this['focusables']['on']('change',(_0x115db6,_0x23a2d6)=>{for(const _0x18dda4 of Array['from'](_0x23a2d6['added'])['reverse']())this['focusTracker']['add'](_0x18dda4['element']);});}}class ie extends kt{constructor(_0x5d5ddf,_0x3eb6e5,_0x3f12bb){super(_0x5d5ddf),this['commentInputView']=new os(_0x5d5ddf,_0x3f12bb),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x381453,_0x102b9a)=>_0x381453||!!_0x102b9a),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 _0x1890da(_0x5d5ddf,_0x3eb6e5),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'](_0x430373){this['commentInputView']['focus'](_0x430373);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x5ad5a8,_0x1c1808)=>{const {submitButtonView:_0x6f7fe9,cancelButtonView:_0x493273,editor:_0x31c3dd}=this['commentInputView'];[_0x6f7fe9['element'],_0x493273['element'],_0x31c3dd?_0x31c3dd['editing']['view']['getDomRoot']():null]['filter'](_0x57b22a=>_0x57b22a)['some'](_0x34f3ab=>_0x34f3ab['contains'](_0x1c1808['target']))||(this['focus'](),_0x1c1808['preventDefault']());});}}class rs extends kt{constructor(_0x177193){super(_0x177193);const _0x4db56d=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x4db56d['to']('count',_0x153996=>N(_0x177193,'NUMBER_OF_COMMENTS',_0x153996))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x178e04,_0x753887,_0x15c326){super(_0x178e04);const _0x581778=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x753887['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x753887,this['_config']=_0x15c326,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x2070b8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2a7d1c({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4bdd57=>this['commentViews']['map'](_0x5f0dc0=>_0x5f0dc0['element'])['includes'](_0x4bdd57['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x178e04),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x2688cc=>_0x2688cc-this['_config']['maxCommentsWhenCollapsed']);for(const _0x12708d of _0x753887['comments'])this['_handleNewCommentModel'](_0x12708d);this['_handleInfoComment'](),this['listenTo'](_0x753887['comments'],'add',(_0xd921b3,_0x3e827a)=>{const _0x548c4e=this['_calculatePosition'](_0x3e827a);this['length']++,this['_handleNewCommentModel'](_0x3e827a,_0x548c4e),this['refreshVisibleViews']();}),this['listenTo'](_0x753887['comments'],'remove',(_0x2b6ed2,_0x335e17)=>{this['length']--,this['_handleRemoveCommentModel'](_0x335e17),this['refreshVisibleViews']();}),this['listenTo'](_0x753887,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x753887,'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',_0x581778['if']('length','ck-hidden',_0x2dd171=>!_0x2dd171)],'aria-label':N(_0x178e04,'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'](_0x984cb5){-0x1===_0x984cb5?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x42be17 of this['commentViews'])_0x42be17['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x3a082f,_0x2d9e3c){const _0x31ee06=new this['_config']['CommentView'](this['locale'],_0x3a082f,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x31ee06['viewUid']=_0x3a082f['id'],_0x31ee06['delegate']('removeComment')['to'](this),_0x31ee06['delegate']('updateComment')['to'](this),_0x31ee06['delegate']('resolveCommentThread')['to'](this),_0x31ee06['delegate']('editorReady')['to'](this),_0x31ee06['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x31ee06,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x31ee06,_0x2d9e3c);}['_calculatePosition'](_0x47d7e3){const _0x17d9ae=this['_model']['_findOptimalIndex'](_0x47d7e3);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x47d7e3['authoredAt']?_0x17d9ae-0x1:_0x17d9ae:_0x17d9ae-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x35ff3a={'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'],_0x35ff3a,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x35ff3a));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x268aa2){const _0x31463f=this['commentViews']['remove'](_0x268aa2['id']);this['stopListening'](_0x31463f),_0x31463f['isEditMode']&&this['_updateHasDirtyComment'](),_0x31463f['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x7428ff=>_0x7428ff['isEditMode']);}['_rearrangeCollapse'](){const _0x12cb33=function(_0x1ca8d3){const _0x53cdec=new _0x3c8425();for(const _0x1a5ea3 of _0x1ca8d3)_0x53cdec['add'](_0x1a5ea3);return _0x53cdec;}(this['commentViews']),_0x41a493=this['_collapsedCommentsView']['count'];for(let _0x47f002=0x1;_0x47f002<=_0x41a493;_0x47f002++)_0x12cb33['remove'](0x1);for(const _0x376358 of _0x12cb33)_0x376358['collapse']();_0x41a493>0x0&&_0x12cb33['add'](this['_collapsedCommentsView'],0x1),ns(_0x340879(Array['from'](this['visibleViews']),Array['from'](_0x12cb33)),this['visibleViews'],_0x12cb33);}['_rearrangeExpand'](){ns(_0x340879(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1c6fea of this['visibleViews'])_0x1c6fea['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1bcd17=>{this['focusTracker']['add'](_0x1bcd17['element']),this['keystrokes']['listenTo'](_0x1bcd17['element']);}),this['commentViews']['on']('change',(_0x331c38,_0x227660)=>{for(const _0x4afcf2 of _0x227660['removed'])this['focusTracker']['remove'](_0x4afcf2['element']),this['keystrokes']['stopListening'](_0x4afcf2['element']);for(const _0x1222d6 of Array['from'](_0x227660['added'])['reverse']())this['focusTracker']['add'](_0x1222d6['element']),this['keystrokes']['listenTo'](_0x1222d6['element']);});}}function ns(_0xd2b50a,_0x2c30bd,_0x267acb){let _0x246327=0x0;for(const _0x32fa2b of _0xd2b50a)switch(_0x32fa2b){case'insert':_0x2c30bd['add'](_0x267acb['get'](_0x246327),_0x246327),_0x246327++;break;case'delete':_0x2c30bd['remove'](_0x246327);break;case'equal':_0x246327++;}}class oe extends kt{constructor(_0x43f154){super(_0x43f154);const _0x1e7e54=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x1e7e54['to']('contextValue',_0x451aa9=>N(_0x43f154,'THREAD_CONTEXT_LABEL',_0x451aa9)),'tabindex':-0x1},'children':[{'text':_0x1e7e54['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x1b7bd9,_0x5a4d3a){super(_0x1b7bd9);const _0x50a429=this['bindTemplate'];this['_model']=_0x5a4d3a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x2070b8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2a7d1c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x88c955=>!!_0x88c955),this['bind']('contextValue')['to'](this['_model'],'context',_0x4b4624=>_0x4b4624&&_0x4b4624['value']?this['_trimContextValue'](_0x4b4624['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',_0x50a429['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 _0x137a82=new _0x52b512(this['locale']);return _0x137a82['label']=N(this['locale'],'Reopen'),_0x137a82['tooltip']=N(this['locale'],'Reopen'),_0x137a82['icon']=_0x4eb55b,_0x137a82['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x28b171=>!_0x28b171),_0x137a82['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3a5bd9,_0x4d28ec)=>_0x3a5bd9&&_0x4d28ec),_0x137a82['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x137a82;}['_trimContextValue'](_0xbcea4b){if(_0xbcea4b['length']<0x96)return _0xbcea4b;const _0x34a097=_0xbcea4b['lastIndexOf']('\x20',0x93);return _0xbcea4b['substring'](0x0,_0x34a097>-0x1?_0x34a097:0x93)+'...';}['_attachContextActions'](){const _0x454961=this['element']['querySelector']('.ck-context'),_0x4b557b=_0x454961['querySelector']('.ck-context__value');this['listenTo'](_0x454961,'mouseenter',()=>{_0x4b557b['offsetWidth']<_0x4b557b['scrollWidth']&&_0x454961['classList']['add']('overlay');}),this['listenTo'](_0x454961,'mouseleave',()=>{_0x454961['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5791d7 of this['focusables'])this['focusTracker']['add'](_0x5791d7['element']),this['keystrokes']['listenTo'](_0x5791d7['element']);}['_createContextView'](){const _0x1a5e71=new oe(this['locale']);return _0x1a5e71['bind']('contextValue')['to'](this),_0x1a5e71;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x2783c5,_0x1a9b8c,_0x4886cc,_0xfa9379){super(_0x2783c5),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x1a9b8c,this['_localUser']=_0x4886cc,this['_config']=_0xfa9379,this['commentThreadHeaderView']=new Yt(_0x2783c5,_0x1a9b8c),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x2783c5,N(_0x2783c5,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x2783c5,_0x1a9b8c,Object['assign']({'CommentView':this['_config']['CommentView']},_0xfa9379)),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',(_0x4bde17,_0x4c671f)=>_0x4bde17||!!_0x4c671f),this['bind']('isUnlinked')['to'](_0x1a9b8c,'unlinkedAt',_0xc0c1fe=>!!_0xc0c1fe),this['bind']('ariaLabel')['to'](this,'length',_0x5eb08d=>{const _0x525dce=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x5eb08d,_0x525dce]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x2070b8(),this['keystrokes']=new jt(),this['focusCycler']=new _0x2a7d1c({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0xeb248b=>_0xeb248b['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0xf6d0ae=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x24ffd4=_0xf6d0ae['commentInputView'];return _0xf6d0ae['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x24ffd4,'value',(_0xd9277f,_0x12f200,_0x5b7c7c,_0x29055c,_0x38cb96)=>!!_0x38cb96||!!_0x29055c&&_0x5b7c7c&&!_0x12f200||_0xd9277f&&_0x5b7c7c&&!_0x12f200),_0x24ffd4['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x5b3922,_0x287d98,_0x4ed0fc)=>{let _0x3292f4;return _0x3292f4=_0x4ed0fc&&_0x287d98?'Reply\x20to\x20reopen\x20discussion...':_0x5b3922?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x3292f4);}),_0x24ffd4['bind']('submitLabel')['to'](this,'length',_0x51daf9=>N(this['locale'],_0x51daf9?'Reply':'Comment')),_0x24ffd4['on']('submit',(_0x5a3624,_0x60ab9)=>{this['fire']('addComment',_0x60ab9),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x24ffd4['on']('cancel',()=>{this['focus']();}),_0x24ffd4['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x24ffd4['on']('cancel',_0x2f015d=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x2f015d['stop']());}),this['on']('change:isActive',(_0x54b49b,_0x30f744,_0x1e5065)=>{_0x1e5065||this['length']||_0x24ffd4['value']||this['fire']('removeCommentThread');}),_0xf6d0ae;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x2f2a56(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0xdf716d,target:_0x12c71d,type:_0x19389e,isVisible:_0x3d07ad=!0x0}){super(),this['view']=_0xdf716d,this['view']['element']||this['view']['render'](),this['_type']=_0x19389e,this['_target']=_0x12c71d,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3c8425([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x28b294,_0x58c36c)=>{this['view']['focusTracker']['add'](_0x58c36c);}),this['focusableElements']['on']('remove',(_0x2b6459,_0x2b3434)=>{this['view']['focusTracker']['remove'](_0x2b3434);}),this['set']('isVisible',_0x3d07ad);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x3814e5=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x3814e5),_0x3814e5;}get['targetRect'](){const _0x6fd0bd=this['target'];if(null===_0x6fd0bd)return null;if(_0x6fd0bd instanceof _0x3e90cd)return _0x6fd0bd;const _0x41f67e=_0x6fd0bd['filter'](_0x5a31b3=>function(_0x5135b6){const _0x58a66e=_0x5135b6['offsetParent'];if(_0x58a66e)return!0x0;const _0x4ef429=_0x5135b6['getClientRects']()['item'](0x0);return!!_0x4ef429;}(_0x5a31b3));return 0x0===_0x41f67e['length']?null:new _0x3e90cd(_0x41f67e[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x424bc6){this['view']['isActive']=_0x424bc6,this['view']['mainView']['isActive']=_0x424bc6;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x164685){if(!(null===_0x164685||_0x164685 instanceof _0x3e90cd||Array['isArray'](_0x164685)&&_0x164685['every'](_0x5d0554=>fi(_0x5d0554))))throw new _0xb7f752('annotation-invalid-target',null,{'target':_0x164685});}['_getNormalizedTarget'](){const _0x40b54d='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x40b54d)?[_0x40b54d]:_0x40b54d;}}function fi(_0x41a2c6){return null!==_0x41a2c6&&'object'==typeof _0x41a2c6&&'nodeType'in _0x41a2c6&&0x1===_0x41a2c6['nodeType'];}class S extends _0x3c8425{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0xe753ac=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x2070b8(),this['_focusTracker']['on']('change:isFocused',(_0xeaaefe,_0xa2a37b,_0x51435e)=>{_0x51435e||this['fire']('blur');});for(const _0x568a5f of _0xe753ac)this['add'](_0x568a5f);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x41ea17){if(this['has'](_0x41ea17))throw new _0xb7f752('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x41ea17['innerView'],_0x41ea17),this['_viewToAnnotation']['set'](_0x41ea17['view'],_0x41ea17);for(const _0x6dbfe4 of _0x41ea17['focusableElements'])this['_focusTracker']['add'](_0x6dbfe4);this['listenTo'](_0x41ea17['focusableElements'],'add',(_0x450d11,_0x1f3fa8)=>{this['_focusTracker']['add'](_0x1f3fa8);}),this['listenTo'](_0x41ea17['focusableElements'],'remove',(_0x445103,_0x34b099)=>{this['_focusTracker']['remove'](_0x34b099);}),this['listenTo'](_0x41ea17['view']['focusTracker'],'change:isFocused',(_0x404372,_0x454d14,_0x1cefae)=>{_0x1cefae&&this['fire']('focus',_0x41ea17);}),_0x41ea17['updateTargetRect']();const _0x4d37ed=this['_getOrderInContent'](_0x41ea17['view']['targetRect']);return super['add'](_0x41ea17,_0x4d37ed);}['remove'](_0x28b210){if(!this['has'](_0x28b210))throw new _0xb7f752('annotationcollection-not-existing-item',null);this['stopListening'](_0x28b210['view']['focusTracker']),this['stopListening'](_0x28b210['focusableElements']);for(const _0x3bd565 of _0x28b210['focusableElements'])this['_focusTracker']['remove'](_0x3bd565);return this['_viewToAnnotation']['delete'](_0x28b210['view']),this['_innerViewToAnnotation']['delete'](_0x28b210['innerView']),super['remove'](_0x28b210);}['getByInnerView'](_0x266020){return this['_innerViewToAnnotation']['get'](_0x266020);}['getByView'](_0x4822b2){return this['_viewToAnnotation']['get'](_0x4822b2);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x577817 of this)_0x577817['updateTargetRect']();this['_sort']();}['_sort'](){const _0x1e28b2=Array['from'](this)['sort']((_0x39bb92,_0x28542d)=>w(_0x39bb92['view']['targetRect'],_0x28542d['view']['targetRect']));for(let _0x1a9ee2=_0x1e28b2['length']-0x1;_0x1a9ee2>0x0;_0x1a9ee2--){const _0x426020=_0x1e28b2[_0x1a9ee2];_0x1a9ee2!==this['getIndex'](_0x426020)&&(this['remove'](_0x426020),this['add'](_0x426020));}}['_getOrderInContent'](_0x45d755){let _0x567cc3=0x0;if(!_0x45d755)return this['length'];for(const _0x567639 of this){const _0x2879f0=_0x567639['view']['targetRect'];if(_0x2879f0){if(w(_0x45d755,_0x2879f0)<0x0)return _0x567cc3;_0x567cc3++;}}return _0x567cc3;}}function v({source:_0x357b30,target:_0x403724,filter:_0x415850}){for(const _0xfbc212 of _0x357b30)_0x415850(_0xfbc212)&&_0x403724['add'](_0xfbc212);_0x403724['listenTo'](_0x357b30,'add',(_0x536452,_0x4de14b)=>{_0x415850(_0x4de14b)&&_0x403724['add'](_0x4de14b);}),_0x403724['listenTo'](_0x357b30,'remove',(_0x2549e8,_0x6b6d6a)=>{_0x403724['has'](_0x6b6d6a)&&_0x403724['remove'](_0x6b6d6a);});}function w(_0x5e9817,_0x115ce2){if(null===_0x5e9817&&null===_0x115ce2)return 0x0;if(null===_0x5e9817)return-0x1;if(null===_0x115ce2)return 0x1;const _0x4adad5=_0x5e9817['top']-_0x115ce2['top'];return 0x0==_0x4adad5?_0x5e9817['left']-_0x115ce2['left']:_0x4adad5;}class y extends _0x6c42d0{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2807c7){if(super(_0x2807c7),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2807c7 instanceof _0x2e71ba){const _0x26aa92=_0x2807c7['locale'];_0x2807c7['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x26aa92,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x26aa92,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x26aa92,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x26aa92,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x26aa92,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x26aa92,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x26aa92,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x51ce98){this['collection']['add'](_0x51ce98);}['remove'](_0x52d31d){this['collection']['remove'](_0x52d31d),_0x52d31d['destroy']();}['refreshVisibility'](){for(const _0x1c4df2 of this['collection'])_0x1c4df2['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x4e3fa0){return this['collection']['getByInnerView'](_0x4e3fa0);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0xde9ef2 of this['collection'])_0xde9ef2['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x20733e){this['fire']('_activateAnnotation',_0x20733e);}['createAnnotation'](_0x1dc0da){return new T(_0x1dc0da);}['createAnnotationView'](_0x1a1c45,_0x1782d8){return new E(_0x1a1c45,_0x1782d8);}['_addActiveAnnotation'](_0x2fe885){const _0x362c6b=new Set(this['activeAnnotations']);_0x362c6b['add'](_0x2fe885),this['activeAnnotations']=_0x362c6b;}['_removeActiveAnnotation'](_0x44822a){const _0x362920=new Set(this['activeAnnotations']);_0x362920['delete'](_0x44822a),this['activeAnnotations']=_0x362920;}['_bindAnnotationsToVisibleAnnotations'](){const _0x361f0b=this['collection'],_0x56b1e3=this['_visibleAnnotations'];function _0x1bae0c(_0x196579){const _0x14b86b=_0x196579['source'];_0x14b86b['isVisible']&&!_0x56b1e3['has'](_0x14b86b)?_0x56b1e3['add'](_0x14b86b):!_0x14b86b['isVisible']&&_0x56b1e3['has'](_0x14b86b)&&_0x56b1e3['remove'](_0x14b86b),_0x14b86b['view']['focusTracker']['remove'](_0x14b86b['view']['element']),_0x14b86b['view']['focusTracker']['add'](_0x14b86b['view']['element']);}this['listenTo'](_0x361f0b,'add',(_0xfd5178,_0x5d3f57)=>{_0x5d3f57['isVisible']&&_0x56b1e3['add'](_0x5d3f57),this['listenTo'](_0x5d3f57,'change:isVisible',_0x1bae0c);}),this['listenTo'](_0x361f0b,'remove',(_0x51e1f2,_0x279479)=>{_0x56b1e3['has'](_0x279479)&&_0x56b1e3['remove'](_0x279479),this['stopListening'](_0x279479,'change:isVisible',_0x1bae0c);});}['_setupEnterAnnotationKeystroke'](){const _0x1cf7e7=_0x5920ba=>{_0x5920ba['on']('ready',()=>{_0x5920ba['keystrokes']['set'](_0x492559,(_0x1786b5,_0x485855)=>{const _0x4f7d6b=_0x318935(this['activeAnnotations']['values']());_0x4f7d6b&&(_0x4f7d6b['view']['focus'](),_0x485855());});});};this['context']instanceof _0x2e71ba?_0x1cf7e7(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x276c49,_0x272faa)=>{_0x1cf7e7(_0x272faa);});}['_setupEscapeAnnotationHandling'](){const _0x44289a=_0xdb395a=>{const _0x28a2b2=_0xdb395a['source'],_0x296304=[];let _0x3f9356;if(Array['isArray'](_0x28a2b2['target'])){_0x3f9356=_0x28a2b2['target'][0x0],this['context']instanceof _0x2e71ba?_0x296304['push'](this['context']):this['context']['editors']&&_0x296304['push'](...this['context']['editors']);for(const _0xa2aa75 of _0x296304)for(const _0x4886a4 of _0xa2aa75['editing']['view']['domRoots']['values']())if(_0x4886a4['contains'](_0x3f9356))return void _0xa2aa75['editing']['view']['focus']();_0x3f9356['focus']();}};this['listenTo'](this['collection'],'add',(_0xed2ede,_0x14635d)=>{this['listenTo'](_0x14635d,'escape',_0x44289a,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4414e7,_0x424107)=>{this['stopListening'](_0x424107,'escape',_0x44289a);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x6c42d0{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1ef2e1){super(_0x1ef2e1),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x2d289c=this['context']['config'];_0x2d289c['define']('comments.maxCommentsWhenCollapsed',0x2),_0x2d289c['define']('comments.maxThreadTotalWeight',0x1f4),_0x2d289c['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x2d289c['define']('comments.CommentThreadView',gt),_0x2d289c['define']('comments.CommentView',Tt),_0x2d289c['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x11805a=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x38a766,_0x54634c)=>this['_addCommentThread'](_0x54634c)),this['on']('submitCommentThread',(_0x298a70,_0x385732)=>this['_submitCommentThread'](_0x385732)),this['on']('resolveCommentThread',(_0x33e85d,_0x166d31)=>this['_resolveCommentThread'](_0x166d31)),this['on']('resolveCommentThread',(_0x12ed8f,_0x3e1a13)=>this['_updateActiveAnnotation'](_0x3e1a13),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x2b6e33,_0x36df2a)=>this['_reopenCommentThread'](_0x36df2a)),this['on']('reopenCommentThread',(_0x400c80,_0x45c664)=>this['_updateActiveAnnotation'](_0x45c664),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5a4d1a,_0x33eeb1)=>this['_removeCommentThread'](_0x33eeb1)),this['on']('updateCommentThread',(_0x5bee1d,_0x3df071)=>this['_updateCommentThread'](_0x3df071)),this['on']('updateCommentThread',(_0xe0d7f2,_0x2c1fc1)=>this['_updateActiveAnnotation'](_0x2c1fc1),{'priority':'lowest'}),this['on']('addComment',(_0x21baf7,_0xd430dc)=>this['_addComment'](_0xd430dc)),this['on']('updateComment',(_0x388a01,_0x129731)=>this['_updateComment'](_0x129731)),this['on']('removeComment',(_0x57b1eb,_0xd797de)=>this['_removeComment'](_0xd797de)),this['on']('addComment',(_0x1793b5,{threadId:_0x36aaec,isFromAdapter:_0x444f1d})=>{if(_0x444f1d)return;const _0x442902=this['getCommentThread'](_0x36aaec),_0xcafa02=_0x442902&&this['_threadToController']['get'](_0x442902);_0xcafa02&&_0xcafa02['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x11805a,'change:activeAnnotations',(_0x63b6a7,_0xd9765a,_0x3ae964)=>{const _0x5bb0a7=Array['from'](_0x3ae964)['map'](_0x5c46a4=>this['_viewToController']['get'](_0x5c46a4['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x5bb0a7?_0x5bb0a7['model']:null;});}set['adapter'](_0x414a4a){if(this['_adapter'])throw new _0xb7f752('commentsrepository-adapter-already-set');this['_adapter']=_0x414a4a;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3ef977=_t,threadId:_0x3fafaf=_0x17bd5b(),comments:_0x5bb903=[],unlinkedAt:_0x300df8=null,resolvedAt:_0x1c7c4b=null,resolvedBy:_0x145cd9=null,target:_0x508d74=null,context:_0x269efb=null,attributes:_0x5bb70c={},isResolvable:_0x5a6499=!0x0,isSubmitted:_0x2e2c33=!0x1,isFromAdapter:_0x441fad=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x3ef977),{'channelId':_0x3ef977,'threadId':_0x3fafaf,'comments':_0x5bb903,'unlinkedAt':_0x300df8,'resolvedAt':_0x1c7c4b,'resolvedBy':_0x145cd9,'target':_0x508d74,'context':_0x269efb,'attributes':_0x5bb70c,'isFromAdapter':_0x441fad,'isResolvable':_0x5a6499,'isSubmitted':_0x2e2c33}),this['getCommentThread'](_0x3fafaf);}['openNewCommentThread']({channelId:_0x41f1d9=_t,threadId:_0x3126de=_0x17bd5b(),target:_0x25f069,context:_0x30e90d=null,isResolvable:_0x7f30dc=!0x0}){if(this['_readOnlyChannels']['has'](_0x41f1d9)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x25f069)throw new _0xb7f752('commentsrepository-missing-target');const _0x4c60ee=this['addCommentThread']({'channelId':_0x41f1d9,'threadId':_0x3126de,'target':_0x25f069,'context':_0x30e90d,'isResolvable':_0x7f30dc});if(!_0x4c60ee)return null;const _0x4c9af9=this['_threadToController']['get'](_0x4c60ee),_0x5f235c=_0x4c9af9['view']['commentThreadInputView']['commentInputView'],_0x162b85=this['context']['plugins']['get'](y),_0x49d89e=_0x162b85['getByInnerView'](_0x4c9af9['view']);return _0x162b85['activate'](_0x49d89e),_0x5f235c['once']('editorReady',()=>_0x5f235c['focus']()),_0x4c60ee;}['hasCommentThread'](_0x3b2a74){if('string'!=typeof _0x3b2a74)throw new _0xb7f752('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x3b2a74);}['updateCommentThread']({channelId:_0x2a653f=_t,threadId:_0x5bc7b0,context:_0x3401d5,unlinkedAt:_0x3db89c,attributes:_0x44a2e6,isFromAdapter:_0x18088b=!0x1}){return this['fire'](Nt('updateCommentThread',_0x2a653f),{'channelId':_0x2a653f,'threadId':_0x5bc7b0,'context':_0x3401d5,'unlinkedAt':_0x3db89c,'attributes':_0x44a2e6,'isFromAdapter':_0x18088b}),this['getCommentThread'](_0x5bc7b0);}['getCommentThread'](_0x4dcb22){if('string'!=typeof _0x4dcb22)throw new _0xb7f752('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4dcb22);}['fetchCommentThread']({channelId:_0x12e3db,threadId:_0xd08e73}={}){const _0x3cebd8=this['getCommentThread'](_0xd08e73);if(_0x3cebd8)return Promise['resolve'](_0x3cebd8);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0xb7f752('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x12e3db,'threadId':_0xd08e73})['then'](_0x59b341=>this['hasCommentThread'](_0xd08e73)?this['getCommentThread'](_0xd08e73):_0x59b341?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x12e3db},_0x59b341)):void 0x0)['catch'](_0x206fbd=>{throw console['error'](_0x206fbd),new _0xb7f752('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x1d3690,skipNotAttached:_0x48fbe3=!0x1,skipEmpty:_0x28ff26=!0x1,toJSON:_0x23a8db=!0x1}={}){const _0x231b33=[];for(const _0x1e6581 of this['_threads']['values']())_0x1d3690&&_0x1e6581['channelId']!==_0x1d3690||_0x48fbe3&&!_0x1e6581['isAttached']||_0x28ff26&&0x0===_0x1e6581['length']||_0x231b33['push'](_0x1e6581);return _0x23a8db?_0x231b33['map'](_0x1a1977=>_0x1a1977['toJSON']()):_0x231b33;}['getAnnotationForCommentThread'](_0x337030){const _0x20e589=this['_threadToController']['get'](_0x337030);if(!_0x20e589)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x20e589['view'])||null;}['getCommentThreadForAnnotation'](_0x30c71f){const _0x182759=this['_viewToController']['get'](_0x30c71f['innerView']);return _0x182759?_0x182759['model']:null;}['setActiveCommentThread'](_0x7c75e){const _0x53b2a2=this['context']['plugins']['get'](y);if(!_0x7c75e)return void(this['activeCommentThread']&&_0x53b2a2['deactivateAll']());const _0x9c6b5d=this['getCommentThread'](_0x7c75e);if(!_0x9c6b5d)throw new _0xb7f752('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x7c75e});if(!this['_threadToController']['has'](_0x9c6b5d))throw new _0xb7f752('commentsrepository-active-not-attached',null,{'threadId':_0x7c75e});const _0x3ca6f9=_0x53b2a2['getByInnerView'](this['_threadToController']['get'](_0x9c6b5d)['view']);_0x53b2a2['activate'](_0x3ca6f9);}['switchReadOnly'](_0x29ad93,_0x27446a){_0x29ad93?this['_readOnlyChannels']['add'](_0x27446a):this['_readOnlyChannels']['delete'](_0x27446a),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4afab6){return this['_readOnlyChannels']['has'](_0x4afab6)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x1579f4,_0x4f01cf){return new vt(_0x1579f4,_0x4f01cf);}['setPermissions'](_0x35151d,_0x191e74=_t){this['_permissions']['set'](_0x191e74,_0x35151d),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x6670d9=_t){return this['_permissions']['has'](_0x6670d9)?this['_permissions']['get'](_0x6670d9):bt;}['_addCommentThread']({channelId:_0x35fad2,threadId:_0x348e2a,comments:_0x51aa0,unlinkedAt:_0x33b546,resolvedAt:_0x18985b,resolvedBy:_0x2c99ba,target:_0x4e67bd,context:_0x288eb2,attributes:_0x19d1c3,isFromAdapter:_0xfc961e,isResolvable:_0x31b8b7,isSubmitted:_0xd3ad15}){if('string'!=typeof _0x348e2a)throw new _0xb7f752('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x348e2a});if(this['hasCommentThread'](_0x348e2a))throw new _0xb7f752('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x348e2a});const _0x4d5b26=new pi(this,{'channelId':_0x35fad2,'id':_0x348e2a,'context':_0x288eb2,'attributes':_0x19d1c3,'unlinkedAt':_0x33b546,'resolvedAt':_0x18985b,'resolvedBy':_0x2c99ba?this['context']['plugins']['get'](it)['getUser'](_0x2c99ba):null,'isResolvable':_0x31b8b7,'isSubmitted':_0xd3ad15||_0xfc961e});this['_threads']['set'](_0x348e2a,_0x4d5b26);for(const _0x295a24 of _0x51aa0)_0x4d5b26['_add'](this['_createNewComment']({'threadId':_0x348e2a,..._0x295a24}));return _0x4e67bd&&_0x4d5b26['attachTo'](_0x4e67bd),_0xfc961e||!_0x4d5b26['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x35fad2,'threadId':_0x348e2a});}['_submitCommentThread']({channelId:_0x58a731,threadId:_0x12a4a7}){if(!this['hasCommentThread'](_0x12a4a7))throw new _0xb7f752('commentsrepository-missing-comment-thread',this);const _0x3c2049=this['getCommentThread'](_0x12a4a7);if(_0x3c2049['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x24aa4f,comments:_0x4aee0d,resolvedAt:_0x4e09c2,resolvedBy:_0x389ce0,context:_0x14376f,attributes:_0x45470f}=_0x3c2049,_0x31d0d4=this['context']['plugins']['get']('PendingActions'),_0x3c1380=_0x31d0d4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x58a731,'threadId':_0x24aa4f,'comments':_0x4aee0d['map'](_0x159310=>_0x159310['toJSON']()),'resolvedAt':_0x4e09c2,'resolvedBy':_0x389ce0?_0x389ce0['id']:_0x389ce0,'context':_0x14376f,'attributes':_0x45470f})['then'](({comments:_0x3c01d5})=>{_0x31d0d4['remove'](_0x3c1380);for(const _0x4838aa of _0x3c01d5)this['_updateComment']({'channelId':_0x58a731,'threadId':_0x12a4a7,'commentId':_0x4838aa['commentId'],'createdAt':_0x4838aa['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2603c8=>{throw console['error'](_0x2603c8),new _0xb7f752('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x556ebf,target:_0x8d9fd2}){const _0x23c25d=this['getCommentThread'](_0x556ebf);if(!_0x23c25d)throw new _0xb7f752('commentsrepository-attach-missing-comment-thread',this);const _0x1b5ffc=this['context']['plugins']['get']('PendingActions'),_0x52e444=this['context']['plugins']['get'](y),_0x432bed=this['_createCommentThreadView'](_0x23c25d),_0x3e74d7=new vt(_0x23c25d,_0x432bed);let _0x545c1f=null;_0x432bed['on']('change:isDirty',(_0x4ddcac,_0x34a469,_0x20b35e)=>{_0x20b35e?_0x545c1f=_0x1b5ffc['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x545c1f&&(_0x1b5ffc['remove'](_0x545c1f),_0x545c1f=null);}),this['_threadToController']['set'](_0x23c25d,_0x3e74d7),this['_viewToController']['set'](_0x432bed,_0x3e74d7);const _0x16cf82=new E(this['context']['locale'],_0x432bed);_0x16cf82['bind']('length')['to'](_0x432bed),_0x16cf82['bind']('isDirty')['to'](_0x432bed,'isDirty',_0x432bed,'length',(_0x95f3f0,_0x151bd2)=>_0x95f3f0||!_0x151bd2),_0x16cf82['bind']('isActive')['to'](_0x432bed),_0x16cf82['type']='comment';const _0x5be337=new T({'view':_0x16cf82,'target':_0x8d9fd2,'type':'comment','isVisible':!_0x23c25d['archivedAt']&&!!('function'==typeof _0x8d9fd2?_0x8d9fd2():_0x8d9fd2)});return _0x432bed['on']('escape',()=>{_0x5be337['fire']('escape');}),this['_bindAnnotationToEditors'](_0x432bed,_0x5be337),_0x52e444['add'](_0x5be337),_0x5be337;}['_bindAnnotationToEditors'](_0x367933,_0x35f83d){this['listenTo'](_0x367933,'editorReady',(_0xcc6e58,_0x2252e1)=>{const _0x163e78=_0x2252e1['ui']['view']['body']['bodyCollectionContainer'];_0x35f83d['focusableElements']['add'](_0x163e78),this['context']instanceof _0x2e71ba&&this['context']['ui']['focusTracker']['add'](_0x163e78);},{'priority':'highest'}),this['listenTo'](_0x367933,'editorDestroyed',(_0x110d23,_0x4ff099)=>{const _0x596ae9=_0x4ff099['ui']['view']['body']['bodyCollectionContainer'];_0x35f83d['focusableElements']['has'](_0x596ae9)&&_0x35f83d['focusableElements']['remove'](_0x596ae9),this['context']instanceof _0x2e71ba&&this['context']['ui']['focusTracker']['remove'](_0x596ae9);});}['_unbindEditors'](_0x45ff34){this['stopListening'](_0x45ff34,'editorReady'),this['stopListening'](_0x45ff34,'editorDestroyed');}['_createCommentThreadView'](_0x55aa42){const _0x484283=this['context']['plugins']['get'](it),{config:_0x795d3e,locale:_0x3bf6d2}=this['context'],_0x2e8c25=pt(_0x795d3e['get']('locale'),_0x3bf6d2);return new(0x0,(_0x795d3e['get']('comments'))['CommentThreadView'])(_0x3bf6d2,_0x55aa42,_0x484283['me'],{'editorConfig':{..._0x795d3e['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x795d3e['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x795d3e['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x795d3e['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x795d3e['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2e8c25,'CommentView':_0x795d3e['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x3ac673,channelId:_0x349b4e,resolvedAt:_0x1020ae,resolvedBy:_0x3b9549,isFromAdapter:_0x3c22db}){if(!this['hasCommentThread'](_0x3ac673))throw new _0xb7f752('commentsrepository-missing-comment-thread',null,{'threadId':_0x3ac673});const _0x261e31=this['getCommentThread'](_0x3ac673);if(_0x261e31['isResolved'])throw new _0xb7f752('commentsrepository-resolved-comment-thread',null,{'threadId':_0x3ac673});const _0x48bd1b=this['context']['plugins']['get'](it);if(_0x261e31['resolvedBy']=_0x48bd1b['getUser'](_0x3b9549),_0x261e31['resolvedAt']=_0x1020ae,_0x3c22db||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5aaa5d=this['context']['plugins']['get']('PendingActions'),_0x45e481=_0x5aaa5d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x349b4e,'threadId':_0x3ac673})['then'](({resolvedAt:_0x5da1e1,resolvedBy:_0x426f45})=>{_0x5aaa5d['remove'](_0x45e481),_0x261e31['resolvedBy']['id']!==_0x426f45&&(_0x261e31['resolvedBy']=_0x48bd1b['getUser'](_0x426f45)),_0x261e31['resolvedAt']=_0x5da1e1;})['catch'](_0x1262a0=>{throw console['error'](_0x1262a0),new _0xb7f752('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x402286,channelId:_0x2c5819,isFromAdapter:_0x408e97}){if(!this['hasCommentThread'](_0x402286))throw new _0xb7f752('commentsrepository-missing-comment-thread',null,{'threadId':_0x402286});const _0x385a4=this['getCommentThread'](_0x402286);if(!_0x385a4['isResolved'])throw new _0xb7f752('commentsrepository-reopen-comment-thread',null,{'threadId':_0x402286});if(_0x385a4['resolvedBy']=null,_0x385a4['resolvedAt']=null,_0x408e97||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x174d8d=this['context']['plugins']['get']('PendingActions'),_0x157e6f=_0x174d8d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x2c5819,'threadId':_0x402286})['then'](()=>_0x174d8d['remove'](_0x157e6f))['catch'](_0x2af9cc=>{throw console['error'](_0x2af9cc),new _0xb7f752('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x47e65f,isFromAdapter:_0x4378c6}){const _0x5baa74=this['getCommentThread'](_0x47e65f);if(!_0x5baa74)throw new _0xb7f752('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x47e65f),this['_threads']['delete'](_0x47e65f),!_0x5baa74['isSubmitted']||_0x4378c6||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x2c0b20=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2ecfa6}=_0x5baa74,_0x10548f=_0x2c0b20['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x2ecfa6,'threadId':_0x47e65f})['then'](()=>_0x2c0b20['remove'](_0x10548f))['catch'](_0x507f17=>{throw console['error'](_0x507f17),new _0xb7f752('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0xfc2187,unlinkedAt:_0x4efc5a,context:_0x195db2,attributes:_0x4ba6ce,isFromAdapter:_0x1fcdac}){if('string'!=typeof _0xfc2187)throw new _0xb7f752('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0xfc2187});if(!this['hasCommentThread'](_0xfc2187))throw new _0xb7f752('commentsrepository-missing-comment-thread',null,{'threadId':_0xfc2187});const _0x5b856c=this['getCommentThread'](_0xfc2187);let _0x17747a=!0x1;if(void 0x0!==_0x195db2&&_0x5b856c['context']!==_0x195db2&&(_0x5b856c['context']=_0x195db2,_0x17747a=!0x0),void 0x0!==_0x4efc5a&&_0x5b856c['unlinkedAt']!==_0x4efc5a&&(_0x5b856c['unlinkedAt']=_0x4efc5a,_0x17747a=!0x0),_0x4ba6ce&&!At(_0x4ba6ce,_0x5b856c['attributes'])&&(_0x5b856c['attributes']=_0x4ba6ce,_0x17747a=!0x0),!_0x17747a)return Promise['resolve']();if(!_0x5b856c['isSubmitted']||_0x1fcdac||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x374aa9=this['context']['plugins']['get']('PendingActions'),{channelId:_0x304090}=_0x5b856c,_0x4b6075=_0x374aa9['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x304090,'threadId':_0xfc2187,'context':_0x195db2,'unlinkedAt':_0x4efc5a,'attributes':_0x4ba6ce})['then'](()=>_0x374aa9['remove'](_0x4b6075))['catch'](_0x50c7de=>{throw console['error'](_0x50c7de),new _0xb7f752('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x2138c7){const _0x2665ae=this['context']['plugins']['get'](y),_0x5651b6=this['getCommentThread'](_0x2138c7);if(_0x5651b6['_isAttached']=!0x1,this['_threadToController']['has'](_0x5651b6)){const _0x4ccbbd=this['_threadToController']['get'](_0x5651b6),_0x4dcf8e=_0x4ccbbd['view'],_0x35a166=_0x2665ae['getByInnerView'](_0x4dcf8e);this['_threadToController']['delete'](_0x5651b6),this['_viewToController']['delete'](_0x4dcf8e),_0x35a166&&_0x2665ae['remove'](_0x35a166),_0x4ccbbd['destroy'](),_0x4dcf8e['destroy']()['then'](()=>{this['_unbindEditors'](_0x4dcf8e);});}}['_updateActiveAnnotation']({threadId:_0x1853a1,resolvedAt:_0x7b0d4f,unlinkedAt:_0x455610}){const _0xfdd8eb=!!_0x7b0d4f,_0x4e0f4d=this['context']['plugins']['get'](y),_0x3d3eba=this['getCommentThread'](_0x1853a1);if(this['_threadToController']['has'](_0x3d3eba)){const _0x4db92a=this['_threadToController']['get'](_0x3d3eba)['view'],_0x60020=_0x4e0f4d['getByInnerView'](_0x4db92a);_0x60020&&(_0xfdd8eb&&_0x4e0f4d['_removeActiveAnnotation'](_0x60020),_0x455610?_0x60020['isVisible']=!0x1:_0x60020['refreshVisibility']());}}['_getExternalAuthor'](_0x1c1cfe){const _0x5cbe71=this['context']['plugins']['get'](it),_0x3b0c95=It('external:'+_0x1c1cfe),_0x5be1b9=_0x5cbe71['getUser'](_0x3b0c95);return _0x5be1b9||_0x5cbe71['addUser']({'id':_0x3b0c95,'name':_0x1c1cfe});}['_createNewComment']({threadId:_0x21e040,commentId:_0x38776d=_0x17bd5b(),content:_0x310779,authorId:_0x50eed7,createdAt:_0x2d1f2b,attributes:_0x50db9e}){if('string'!=typeof _0x38776d)throw new _0xb7f752('commentsrepository-invalid-commentid');if('string'!=typeof _0x50eed7)throw new _0xb7f752('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x310779||!_0x310779['trim']())throw new _0xb7f752('commentsrepository-invalid-comment-content');const _0x1fbabc=this['context']['plugins']['get'](it)['getUser'](_0x50eed7);if(!_0x1fbabc)throw new _0xb7f752('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x50eed7});let _0x298a2b=null,_0x1878e4=_0x2d1f2b;return _0x50db9e?.['@external']&&(_0x298a2b=this['_getExternalAuthor'](_0x50db9e['@external']['authorName']),_0x1878e4=new Date(_0x50db9e['@external']['createdAt'])),new wi(this,{'threadId':_0x21e040,'id':_0x38776d,'author':_0x298a2b||_0x1fbabc,'creator':_0x1fbabc,'content':_0x310779,'createdAt':_0x2d1f2b,'authoredAt':_0x1878e4,'attributes':_0x50db9e});}['_addComment'](_0x328e0d){let {threadId:_0x272c83,content:_0x557ec2,attributes:_0x258aed,isFromAdapter:_0x3ff5b8}=_0x328e0d;const _0x47edfe=this['getCommentThread'](_0x328e0d['threadId']);if(!_0x47edfe)throw new _0xb7f752('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4e486d=this['_createNewComment'](_0x328e0d),{id:_0x5c4039}=_0x4e486d;if(_0x47edfe['_add'](_0x4e486d),_0x3ff5b8||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x47edfe['isSubmitted'])return Promise['resolve']();const _0x36b52d=this['context']['plugins']['get']('PendingActions'),{channelId:_0x29d822}=_0x47edfe,_0x1c5251=_0x36b52d['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x258aed||(_0x258aed={}),this['adapter']['addComment']({'channelId':_0x29d822,'threadId':_0x272c83,'commentId':_0x5c4039,'content':_0x557ec2,'attributes':_0x258aed})['then'](_0x366650=>{_0x36b52d['remove'](_0x1c5251),_0x366650&&this['_updateComment']({'channelId':_0x29d822,'threadId':_0x272c83,'commentId':_0x5c4039,'createdAt':_0x366650['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x4b1fe1=>{throw console['error'](_0x4b1fe1),new _0xb7f752('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x575b08,commentId:_0x4863d7,content:_0x46e42a,createdAt:_0x3f1f51,attributes:_0x7bd84c,isFromAdapter:_0x5451c1}){if(void 0x0!==_0x46e42a&&('string'!=typeof _0x46e42a||!_0x46e42a['trim']()['length']))throw new _0xb7f752('commentsrepository-update-comment-invalid-content');const _0x45f79e=this['getCommentThread'](_0x575b08),_0x1bfdc1=_0x45f79e['getComment'](_0x4863d7);if(!_0x1bfdc1)throw new _0xb7f752('commentsrepository-update-missing-comment',this);let _0x38f046=!0x1;if(_0x46e42a&&_0x46e42a!==_0x1bfdc1['content']&&(_0x1bfdc1['isEditable']||_0x5451c1)&&(_0x1bfdc1['content']=_0x46e42a,_0x38f046=!0x0),_0x3f1f51&&_0x3f1f51!==_0x1bfdc1['createdAt']&&(_0x1bfdc1['createdAt']=_0x3f1f51,_0x1bfdc1['attributes']&&_0x1bfdc1['attributes']['@external']||(_0x1bfdc1['authoredAt']=_0x3f1f51),_0x38f046=!0x0),_0x7bd84c&&!At(_0x7bd84c,_0x1bfdc1['attributes'])&&(_0x1bfdc1['attributes']=_0x7bd84c,_0x38f046=!0x0),!_0x38f046)return Promise['resolve']();if(_0x45f79e['fire']('commentUpdated'),_0x5451c1||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x639f5e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x13cc0c}=this['getCommentThread'](_0x1bfdc1['threadId']),_0x10b78e=_0x639f5e['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x13cc0c,'threadId':_0x575b08,'commentId':_0x4863d7,'content':_0x46e42a,'attributes':_0x7bd84c})['then'](()=>_0x639f5e['remove'](_0x10b78e))['catch'](_0xb78c02=>{throw console['error'](_0xb78c02),new _0xb7f752('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x107efc,commentId:_0x1fb62b,isFromAdapter:_0x314e0e}){const _0x14e5c6=this['getCommentThread'](_0x107efc),_0x2ef18b=_0x14e5c6['getComment'](_0x1fb62b);if(!_0x2ef18b)throw new _0xb7f752('commentsrepository-remove-missing-comment',this);if(_0x14e5c6['_remove'](_0x2ef18b),_0x314e0e||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0xc69f88=this['context']['plugins']['get']('PendingActions'),{channelId:_0x42d0e4}=_0x14e5c6,_0x4df09d=_0xc69f88['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x42d0e4,'threadId':_0x107efc,'commentId':_0x1fb62b})['then'](()=>_0xc69f88['remove'](_0x4df09d))['catch'](_0x56fea9=>{throw console['error'](_0x56fea9),new _0xb7f752('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x2f2a56(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x17eeaa,_0x29c6e1){super();const _0x2e869c=_0x17eeaa['context']['plugins']['get'](it)['me'],_0x16dd94=_0x17eeaa['getCommentThread'](_0x29c6e1['threadId']),_0xc454cd=0x0===_0x16dd94['comments']['length'],_0x1c7aa4=_0x2e869c===_0x29c6e1['author'];this['id']=_0x29c6e1['id'],this['threadId']=_0x29c6e1['threadId'],this['author']=_0x29c6e1['author'],this['creator']=_0x29c6e1['creator'],this['isExternal']=Boolean(_0x29c6e1['attributes']&&_0x29c6e1['attributes']['@external']),this['set']('content',_0x29c6e1['content']),this['createdAt']=_0x29c6e1['createdAt']||new Date(),this['set']('authoredAt',_0x29c6e1['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x16dd94,'resolvedAt'),this['set']('attributes',_0x29c6e1['attributes']||{}),this['bind']('isEditable')['to'](_0x17eeaa,'_permissions',()=>{const _0x4077a4=_0x17eeaa['getPermissions'](_0x16dd94['channelId'])['write'],_0x14bc82=_0x17eeaa['getPermissions'](_0x16dd94['channelId'])['modifyAll'];return _0x1c7aa4&&_0x4077a4||!_0x1c7aa4&&_0x14bc82;}),this['bind']('isRemovable')['to'](_0x16dd94,'isRemovable',_0x17eeaa,'_permissions',_0x163c31=>{const _0x9fd4e2=_0x17eeaa['getPermissions'](_0x16dd94['channelId'])['write'],_0x48ae9b=_0x17eeaa['getPermissions'](_0x16dd94['channelId'])['modifyAll'];return _0x1c7aa4&&_0x9fd4e2||_0x163c31&&_0xc454cd||!_0x1c7aa4&&_0x48ae9b&&!_0xc454cd;}),this['bind']('isReadOnly')['to'](_0x16dd94,'isReadOnly'),this['_repository']=_0x17eeaa;}get['weight'](){return Math['max'](function(_0xb0a7f7){const _0x2daf1b=document['createElement']('div');return _0x2daf1b['innerHTML']=_0xb0a7f7,_0x2daf1b['textContent']['length'];}(this['content']),0xc8);}['update'](_0x378e21){const {threadId:_0xb384a8,id:_0x3a931f}=this;if(!this['_repository']['hasCommentThread'](_0xb384a8))throw new _0xb7f752('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x43d65f}=this['_repository']['getCommentThread'](_0xb384a8);this['_repository']['fire'](Nt('updateComment',_0x43d65f,_0xb384a8),{'channelId':_0x43d65f,'threadId':_0xb384a8,'commentId':_0x3a931f,..._0x378e21});}['setAttribute'](_0x4beddc,_0x2709ea){const _0x2160a4=wt(this['attributes']);yt(_0x2160a4,_0x4beddc,_0x2709ea),this['update']({'attributes':_0x2160a4});}['removeAttribute'](_0x16095e){const _0x525209=wt(this['attributes']);Ct(_0x525209,_0x16095e),this['update']({'attributes':_0x525209});}['remove'](_0x4c5d75={}){if(!_0x4c5d75['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x2df451,id:_0x2d6ff7}=this;if(!this['_repository']['hasCommentThread'](_0x2df451))throw new _0xb7f752('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x1abf85}=this['_repository']['getCommentThread'](_0x2df451);this['_repository']['fire'](Nt('removeComment',_0x1abf85,_0x2df451),{'channelId':_0x1abf85,'threadId':_0x2df451,'commentId':_0x2d6ff7,..._0x4c5d75});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x5d18ba,..._0x3b1940){for(const _0x2cc113 of _0x3b1940)void 0x0!==_0x2cc113&&(_0x5d18ba+=':'+String(_0x2cc113));return _0x5d18ba;}class ot extends _0x3a2e74{constructor(_0x34886e){super(_0x34886e),this['set']('hasContent',!0x1);}['refresh'](){const _0x5ed1b1=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x421264 of _0x5ed1b1['getRanges']())if(this['_hasContent'](_0x421264))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x56e0e1=_0x17bd5b(),ranges:_0x4b7f1d,comment:_0x4e6814}={}){const _0x31bd9a=this['editor']['model'],_0x57ab2b=_0x4b7f1d??Array['from'](_0x31bd9a['document']['selection']['getRanges']()),_0x43a95d=[];for(const _0x54bb97 of _0x57ab2b)this['_hasContent'](_0x54bb97)&&_0x43a95d['push'](this['_trimToContent'](_0x54bb97));if(!_0x43a95d['length'])throw new _0xb7f752('addcommentthreadcommand-incorrect-ranges',null);_0x4e6814&&this['_createCommentThread'](_0x56e0e1,_0x4e6814),this['_createMarkersFromRanges'](_0x56e0e1,_0x43a95d,!!_0x4e6814);}['_createMarkersFromRanges'](_0x149286,_0x5bd795,_0x229a7d){this['editor']['model']['change'](_0x37f737=>{for(const _0x2cc52c of _0x5bd795){const _0x5609b6=_0x17bd5b()['substr'](0x1,0x5),_0x39570d='comment:'+_0x149286+':'+_0x5609b6;_0x37f737['addMarker'](_0x39570d,{'range':_0x2cc52c,'usingOperation':_0x229a7d,'affectsData':_0x229a7d});}});}['_createCommentThread'](_0x1241ee,_0x11e71d){const _0x1ca7a3=this['editor']['plugins']['get']('CommentsRepository'),_0x388f58=this['editor']['config']['get']('collaboration.channelId'),_0x1d2118=this['editor']['plugins']['get']('Users')['me'];if(!_0x1d2118)throw new _0xb7f752('addcommentthreadcommand-user-not-found',null);_0x1ca7a3['addCommentThread']({'threadId':_0x1241ee,'channelId':_0x388f58,'comments':[{'authorId':_0x1d2118['id'],'content':_0x11e71d,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x154189){for(const _0xbe704 of _0x154189['getItems']())if(this['_itemIsContent'](_0xbe704))return!0x0;return!0x1;}['_itemIsContent'](_0x51f47f){return _0x51f47f['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x51f47f)&&!_0x51f47f['is']('element','tableCell');}['_trimToContent'](_0x4eaf93){const _0x4b70ea=_0x5ad897=>!this['_itemIsContent'](_0x5ad897['item']),_0x4a921c=_0x4eaf93['start']['getLastMatchingPosition'](_0x4b70ea),_0x3e41c0=_0x4eaf93['end']['getLastMatchingPosition'](_0x4b70ea,{'direction':'backward'});return this['editor']['model']['createRange'](_0x4a921c,_0x3e41c0);}}class b extends _0x48bfeb{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x7fc9d1){super(_0x7fc9d1),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x1780f5=this['editor'],_0xeee8a5=_0x1780f5['model']['document']['selection'],_0x422807=_0x1cef12(()=>this['refreshSelectedViews'](),0xa);_0xeee8a5['on']('change:range',(_0x2f6060,_0x12ffad)=>{_0x12ffad['directChange']&&(_0x422807['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x1780f5['editing']['view']['document'],'change:isFocused',(_0x5da0dd,_0x411158,_0x1cc437)=>{_0x1cc437&&_0x422807();}),this['listenTo'](_0x1780f5['ui']['focusTracker'],'change:isFocused',(_0x5236e0,_0x149378,_0x55068d)=>{_0x55068d||this['fire']('blur',{'isAnnotationTracked':_0x50a6b6=>this['_editorAnnotationsData']['has'](_0x50a6b6['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x444707){if(this['_editorAnnotations']['has'](_0x444707['view']))return;this['_editorAnnotations']['add'](_0x444707['view']),this['editor']['ui']['focusTracker']['add'](_0x444707['view']['element']);const _0x2fa861=this['editor']['plugins']['get'](y);this['listenTo'](_0x2fa861['collection'],'remove',(_0x31eac2,_0x40dfaf)=>{this['editor']['ui']['focusTracker']['remove'](_0x40dfaf['view']['element']),this['_editorAnnotations']['delete'](_0x40dfaf['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x185910){if('function'!=typeof _0x185910)throw new _0xb7f752('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x185910);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x4a3e60,annotations:_0x2b89c3}){const _0x1f5309=[],_0x117019=this['editor']['model']['document']['selection'],_0xa57126=Array['from'](_0x117019['getRanges']());for(const [_0x5477ef,_0x492521]of this['_editorAnnotationsData']){const _0x53e99e=_0x1937e6(_0x492521),_0x613c60=_0x2b89c3['getByInnerView'](_0x5477ef);_0x53e99e&&_0x613c60&&_0x1f5309['push']({'annotation':_0x613c60,'range':_0x53e99e});}function _0x1937e6(_0x3995c0){for(const _0x20cce0 of _0x3995c0)for(const _0x6bede0 of _0xa57126)if(_0x20cce0['containsRange'](_0x6bede0,!_0x117019['isCollapsed']))return _0x20cce0;return null;}return _0x1f5309['sort']((_0x24b337,_0x2119f4)=>{const _0x530483=_0x24b337['range'],_0x26e614=_0x2119f4['range'];if(!_0x530483['isEqual'](_0x26e614)){if(_0x530483['containsRange'](_0x26e614,!0x0))return 0x1;if(_0x26e614['containsRange'](_0x530483,!0x0))return-0x1;}return _0x24b337['annotation']==_0x4a3e60?-0x1:_0x2119f4['annotation']==_0x4a3e60?0x1:0x0;})['map'](_0x140597=>_0x140597['annotation']);}get['_editorAnnotationsData'](){const _0x446884=new Map();for(const _0x185d58 of Array['from'](this['_dataCollectors']))for(const [_0x181875,_0x5a1a6d]of _0x185d58())_0x446884['set'](_0x181875,_0x5a1a6d);return _0x446884;}}class st extends _0x48bfeb{['afterInit'](){const _0x19ca06=this['editor'];if(!_0x19ca06['plugins']['has']('RestrictedEditingModeEditing'))return;_0x19ca06['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x48bfeb{constructor(_0x1f8ea0){super(_0x1f8ea0),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x4412d5=this['editor'],_0x4f451b=_0x4412d5['commands']['get']('importWord'),_0x12c82f=_0x4412d5['plugins']['get'](it);_0x4f451b&&(_0x4f451b['on']('execute',(_0x4f32d8,[,_0xbe0679])=>{_0xbe0679['collaboration_features']={'comments':!0x0,'user_id':_0x12c82f['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x4f451b,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x404aae,_0x2e08b4){const {comment_threads:_0x293516}=_0x2e08b4;_0x293516&&_0x293516['forEach'](({thread_id:_0x31f36f,comments:_0x4ae6ea,is_resolved:_0x14e8d6})=>{const _0x4bf05a=new Date(),_0x55a8b1=_0x4ae6ea['map'](({author:_0x380148,content:_0x559359,created_at:_0x3b7466})=>({'content':_0x559359,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4bf05a,'attributes':{'@external':{'authorName':_0x380148,'createdAt':_0x3b7466?new Date(_0x3b7466):new Date(),'source':'importWord'}}})),_0x1e5227=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x1e5227,'threadId':_0x31f36f,'comments':_0x55a8b1,'resolvedAt':_0x14e8d6?_0x4bf05a:null});});}}class at extends _0x48bfeb{constructor(_0x53afdd){super(_0x53afdd),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x39cbcd=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x39cbcd,'contentInsertion',(_0xeeb085,_0x4d8b29)=>this['_removeMarkersWithoutThreads'](_0x4d8b29['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x33608c){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x33608c;const _0x1d99db=this['editor']['plugins']['get']('CommentsRepository');for(const _0x36829f of _0x33608c['keys']()){const [_0x5a69b4,_0x116f95]=_0x36829f['split'](':');'comment'!=_0x5a69b4||_0x1d99db['hasCommentThread'](_0x116f95)||_0x33608c['delete'](_0x36829f);}return _0x33608c;}['_registerMarkerInClipboardPipeline'](){const _0x34cbb=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x28c86c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x28c86c&&_0x34cbb['_registerMarkerToCopy']('comment',_0x28c86c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x79e595){switch(_0x79e595){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x45f3e2){const _0x5497d7=_0x45f3e2['split'](':');return{'group':_0x5497d7[0x0],'id':_0x5497d7[0x1],'part':_0x5497d7[0x2]};}class ut extends _0x48bfeb{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x4bc494,_0x53030e)=>{if(!_0x53030e['options']['showCommentHighlights'])return null;if(_0x53030e['options']['ignoreResolvedComments']){const {id:_0x24cf8d}=ft(_0x4bc494['markerName']),_0x3d2e13=this['editor']['plugins']['get'](o);if(_0x3d2e13['getCommentThread'](_0x24cf8d)?.['isResolved']&&_0x4bc494['item'])return _0x53030e['consumable']['consume'](_0x4bc494['item'],'addMarker:'+_0x4bc494['markerName']),_0x53030e['consumable']['consume'](_0x4bc494['item'],'removeMarker:'+_0x4bc494['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x25bd6d=>{_0x25bd6d['on']('addMarker:comment',(_0x1e9af6,_0x541963,_0x136d1b)=>{if(!_0x136d1b['options']['showCommentHighlights'])return;const _0x8ae155=_0x541963['item'];if(!_0x8ae155)return;const _0x4935c9=_0x136d1b['mapper']['toViewElement'](_0x8ae155);this['editor']['model']['schema']['isObject'](_0x8ae155)&&_0x4935c9&&!_0x4935c9['getCustomProperty']('widget')&&_0x4935c9['is']('containerElement')&&_0x32126f(_0x4935c9,_0x136d1b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2fb567,{writer:_0x651565,options:_0x490702})=>{if(!_0x490702['showCommentHighlights'])return null;const _0x475006=_0x651565['createContainerElement']('div'),_0x594d4a=_0x651565['createEmptyElement']('hr');return _0x651565['addClass']('ck-horizontal-line',_0x475006),_0x651565['insert'](_0x651565['createPositionAt'](_0x475006,0x0),_0x594d4a),_0x475006;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x1f8383,{writer:_0x3bbcf3,options:_0x170fd1})=>{if(!_0x170fd1['showCommentHighlights'])return null;const _0x5b3513=_0x3bbcf3['createContainerElement']('span'),_0x11b2ad=_0x3bbcf3['createEmptyElement']('img');return _0x3bbcf3['addClass']('image-inline',_0x5b3513),_0x3bbcf3['insert'](_0x3bbcf3['createPositionAt'](_0x5b3513,0x0),_0x11b2ad),_0x5b3513;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0xadcb8d,{writer:_0x386fe,options:_0x166072})=>{if(_0x166072['showCommentHighlights'])return _0x386fe['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x50ba19,_0x574681,_0x5d9951)=>{_0x5d9951['options']['showCommentHighlights']&&_0x50ba19['stop']();},{'priority':'high'});}}class r extends _0x48bfeb{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(_0x4c1cf9){super(_0x4c1cf9),this['set']('isThreadsLoadingPaused',!0x0),_0x4c1cf9['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3b4036,_0x3bdff7,_0x402a74,_0x440607)=>{const _0x2a7047=_0x4c1cf9['plugins']['get'](o),_0x743607=_0x402a74?ft(_0x402a74)['id']:null;_0x4c1cf9['model']['change'](()=>{if(_0x743607){const _0x4ad405=this['getAllMarkersForId'](_0x743607);for(const _0x2ca8db of _0x4ad405)_0x4c1cf9['editing']['reconvertMarker'](_0x2ca8db);}if(_0x440607){const {id:_0x26e4bc}=ft(_0x440607),_0x8d1011=_0x2a7047['getCommentThread'](_0x26e4bc);if(_0x8d1011&&_0x8d1011['unlinkedAt'])return;if(_0x8d1011&&!_0x8d1011['isAttached'])return;const _0x5775f2=this['getAllMarkersForId'](_0x26e4bc);for(const _0x34d86b of _0x5775f2)_0x4c1cf9['editing']['reconvertMarker'](_0x34d86b);}}),_0x743607&&this['scrollToThreadMarker'](_0x743607);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x20bdfa=this['editor'],_0x4d7661=_0x20bdfa['plugins']['get'](o),_0x29f265=_0x20bdfa['config']['get']('collaboration.channelId'),_0x5e8ab7=_0x4d7661['getCommentThreads']()['filter'](_0x3ead70=>_0x3ead70['channelId']!==_0x29f265);_0x20bdfa['commands']['add']('addCommentThread',new ot(_0x20bdfa)),this['listenTo'](_0x20bdfa,'change:isReadOnly',(_0x1a59ed,_0x29a936,_0x523487)=>{_0x4d7661['switchReadOnly'](_0x523487,_0x20bdfa['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4d7661,dt('addCommentThread',_0x29f265),(_0x50a428,{threadId:_0xab47d4})=>{const _0x3b6fdd=this['editor']['plugins']['get'](o)['getCommentThread'](_0xab47d4);_0x3b6fdd?.['unlinkedAt']&&this['_attachArchivedThread'](_0xab47d4);}),this['listenTo'](_0x4d7661,dt('removeCommentThread',_0x29f265),(_0x3c10d9,{threadId:_0x3310ff})=>{_0x20bdfa['model']['enqueueChange']({'isUndoable':!0x1},_0x5838df=>{const _0x1cfcf0=this['getAllMarkersForId'](_0x3310ff);for(const _0x16904d of _0x1cfcf0)_0x5838df['removeMarker'](_0x16904d);});}),this['listenTo'](_0x4d7661,dt('resolveCommentThread',_0x29f265),(_0x5e56b4,{threadId:_0x5446c7})=>{(this['_reconvertMarkers'](_0x5446c7),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5446c7)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4d7661,dt('reopenCommentThread',_0x29f265),(_0x110004,{threadId:_0x3fd52e})=>{this['_reconvertMarkers'](_0x3fd52e);},{'priority':'low'}),this['listenTo'](_0x4d7661,dt('addComment',_0x29f265),(_0x2f176e,{threadId:_0x305024,isFromAdapter:_0x944a0d})=>{const _0x507ce4=this['getAllMarkersForId'](_0x305024);if(_0x944a0d||0x0==_0x507ce4['length']||!_0x4d7661['hasCommentThread'](_0x305024))return;0x1===_0x4d7661['getCommentThread'](_0x305024)['length']&&_0x20bdfa['model']['enqueueChange']({'isUndoable':!0x1},_0x2352b3=>{for(const _0x2f70f5 of _0x507ce4)_0x2352b3['updateMarker'](_0x2f70f5,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5e8ab7);}['afterInit'](){!async function(_0xb2026a){const _0x5ced0d=_0x3abd67([0x77,0x48,0x6b,0x68,0x54,0x4c,0x30,0x62,0x6c,0x50,0x63,0x71,0x64,0x78,0x6e,0x31,0x74,0x44,0x41,0x4a,0x55,0x42,0x4d,0x37,0x36,0x4f,0x46,0x43,0x61,0x47,0x79,0x6d,0x65,0x35,0x45,0x34,0x6a,0x59,0x7a,0x73,0x39,0x67,0x38,0x69,0x75,0x33,0x58,0x66,0x49,0x53,0x57,0x56,0x52,0x4e,0x5a,0x51,0x70,0x76,0x6f,0x4b,0x72,0x32]),_0x1a8ac5=0x47373529,_0x19640d=0x47305a21^_0x1a8ac5,_0x150852=window[_0x3abd67([0x44,0x61,0x74,0x65])][_0x3abd67([0x6e,0x6f,0x77])](),_0x262b48=_0xb2026a[_0x3abd67([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x5a6a74=new window[(_0x3abd67([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x543f52=>{_0x262b48[_0x3abd67([0x6f,0x6e,0x63,0x65])](_0x3abd67([0x72,0x65,0x61,0x64,0x79]),_0x543f52);}),_0x1242ed={[_0x3abd67([0x6b,0x74,0x79])]:_0x3abd67([0x45,0x43]),[_0x3abd67([0x75,0x73,0x65])]:_0x3abd67([0x73,0x69,0x67]),[_0x3abd67([0x63,0x72,0x76])]:_0x3abd67([0x50,0x2d,0x32,0x35,0x36]),[_0x3abd67([0x78])]:_0x3abd67([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]),[_0x3abd67([0x79])]:_0x3abd67([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]),[_0x3abd67([0x61,0x6c,0x67])]:_0x3abd67([0x45,0x53,0x32,0x35,0x36])},_0x589003=_0x262b48[_0x3abd67([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3abd67([0x67,0x65,0x74])](_0x3abd67([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x5e6484(){let _0x51d541,_0x24c207=null,_0xf386ac=null;try{if(_0x589003==_0x3abd67([0x47,0x50,0x4c]))return _0x3abd67([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x51d541=_0x3daf56(),!_0x51d541)return _0x3abd67([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x51d541[_0x3abd67([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0xf386ac=_0xf15357(_0x51d541[_0x3abd67([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x51d541[_0x3abd67([0x6a,0x74,0x69])])),await _0x54b958()?_0x39de5c()?_0x16344e()?_0x3abd67([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x47aeea()?(_0x51d541[_0x3abd67([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3abd67([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x24c207=_0x31ffc0(_0x3abd67([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x51d541[_0x3abd67([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3abd67([0x74,0x72,0x69,0x61,0x6c])&&(_0x24c207=_0x31ffc0(_0x3abd67([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x18f1ff()):_0x3abd67([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3abd67([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3abd67([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3abd67([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x16344e(){const _0x227afc=[_0x3abd67([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3abd67([0x74,0x72,0x69,0x61,0x6c])][_0x3abd67([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x51d541[_0x3abd67([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x150852/0x3e8:0xe10*_0x19640d;return _0x51d541[_0x3abd67([0x65,0x78,0x70])]<_0x227afc;}function _0x39de5c(){const _0x11cf99=_0x51d541[_0x3abd67([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x11cf99)return!0x1;if(_0x11cf99[_0x3abd67([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3abd67([0x2a])))return!0x0;if(_0x11cf99[_0x3abd67([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3abd67([0x43,0x4d,0x54])))return!0x0;if(_0x11cf99[_0x3abd67([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3abd67([0x52,0x43,0x4d,0x54]))){if(_0x316309())return!0x0;if(_0xa35d75()||_0x588eb9())return!0x0;}return!0x1;}function _0x47aeea(){const _0x3c6b8b=_0x51d541[_0x3abd67([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3c6b8b||0x0==_0x3c6b8b[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3a8499}=new URL(window[_0x3abd67([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3c6b8b[_0x3abd67([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3a8499))return!0x0;const _0x3f7558=_0x3a8499[_0x3abd67([0x73,0x70,0x6c,0x69,0x74])](_0x3abd67([0x2e]));return _0x3c6b8b[_0x3abd67([0x66,0x69,0x6c,0x74,0x65,0x72])](_0xc5a364=>_0xc5a364[_0x3abd67([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3abd67([0x2a])))[_0x3abd67([0x6d,0x61,0x70])](_0x23a3b2=>_0x23a3b2[_0x3abd67([0x73,0x70,0x6c,0x69,0x74])](_0x3abd67([0x2e])))[_0x3abd67([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x189578=>_0x189578[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3f7558[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3abd67([0x6d,0x61,0x70])](_0x2df4a2=>Array(_0x3f7558[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x2df4a2[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3abd67([0x66,0x69,0x6c,0x6c])](_0x2df4a2[0x0]===_0x3abd67([0x2a])?_0x3abd67([0x2a]):'')[_0x3abd67([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x2df4a2))[_0x3abd67([0x73,0x6f,0x6d,0x65])](_0xcadf2e=>_0x3f7558[_0x3abd67([0x65,0x76,0x65,0x72,0x79])]((_0x29ee4f,_0x4749de)=>_0xcadf2e[_0x4749de]===_0x29ee4f||_0xcadf2e[_0x4749de]===_0x3abd67([0x2a])));}function _0x18f1ff(){return _0x24c207&&_0xf386ac?new window[(_0x3abd67([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x459d1b,_0x484c7a)=>{_0x24c207[_0x3abd67([0x74,0x68,0x65,0x6e])](_0x459d1b,_0x484c7a),_0xf386ac[_0x3abd67([0x74,0x68,0x65,0x6e])](_0x276fa1=>{_0x276fa1!=_0x3abd67([0x56,0x61,0x6c,0x69,0x64])&&_0x459d1b(_0x276fa1);},_0x484c7a);}):_0x24c207||_0xf386ac||_0x3abd67([0x56,0x61,0x6c,0x69,0x64]);}}function _0xf15357(_0x34f1f4,_0x3a4b6b){return new window[(_0x3abd67([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5a8e83=>{if(_0x18e2ce())return _0x5a8e83(_0x3abd67([0x56,0x61,0x6c,0x69,0x64]));_0x18acfd(),_0x262b48[_0x3abd67([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3abd67([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3665b6=!0x1;const _0x224249=_0x17bd5b();function _0x451b6f(_0x4f1ccc){return!!_0x4f1ccc&&(typeof _0x4f1ccc===_0x3abd67([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x4f1ccc===_0x3abd67([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x4f1ccc[_0x3abd67([0x74,0x68,0x65,0x6e])]===_0x3abd67([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x4f1ccc[_0x3abd67([0x63,0x61,0x74,0x63,0x68])]===_0x3abd67([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x1676ad(_0x68bc13){_0x29fff5(_0x68bc13)[_0x3abd67([0x74,0x68,0x65,0x6e])](_0x1a266=>{if(!_0x1a266||_0x1a266[_0x3abd67([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3abd67([0x6f,0x6b]))return _0x3abd67([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x485a96(_0xb12289(_0x224249+_0x3a4b6b))!=_0x1a266[_0x3abd67([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3abd67([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3abd67([0x56,0x61,0x6c,0x69,0x64]);})[_0x3abd67([0x74,0x68,0x65,0x6e])](_0x2e0989=>(_0x5a4efa(),_0x2e0989),()=>{const _0x28d945=_0x48ac49();return null==_0x28d945?(_0x5a4efa(),_0x3abd67([0x56,0x61,0x6c,0x69,0x64])):_0x3abd67(_0x150852-_0x28d945>(0x633bb129^_0x1a8ac5)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3abd67([0x74,0x68,0x65,0x6e])](_0x5a8e83)[_0x3abd67([0x63,0x61,0x74,0x63,0x68])](()=>{_0x5a8e83(_0x3abd67([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x4e16d3=0x4701dba9^_0x1a8ac5;function _0x5a4efa(){const _0x77fae1=_0x3abd67([0x6c,0x6c,0x63,0x74,0x2d])+_0x485a96(_0xb12289(_0x34f1f4)),_0x51f5b5=_0x1ad11c(_0x485a96(window[_0x3abd67([0x4d,0x61,0x74,0x68])][_0x3abd67([0x63,0x65,0x69,0x6c])](_0x150852/_0x4e16d3)));window[_0x3abd67([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3abd67([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x77fae1,_0x51f5b5);}function _0x48ac49(){const _0x34f3e9=_0x3abd67([0x6c,0x6c,0x63,0x74,0x2d])+_0x485a96(_0xb12289(_0x34f1f4)),_0x4b57f4=window[_0x3abd67([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3abd67([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x34f3e9);return _0x4b57f4?window[_0x3abd67([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ad11c(_0x4b57f4),0x10)*_0x4e16d3:null;}function _0x29fff5(_0x2fc699){return new window[(_0x3abd67([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x169635,_0xe559ba)=>{_0x2fc699[_0x3abd67([0x74,0x68,0x65,0x6e])](_0x169635,_0xe559ba),window[_0x3abd67([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0xe559ba,0x4736e1e9^_0x1a8ac5);});}}_0x262b48[_0x3abd67([0x6f,0x6e])](_0x3abd67([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x906122,_0x5afa4c)=>{if(_0x5afa4c[0x0]!=_0x34f1f4)return _0x5a8e83(_0x3abd67([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x5afa4c[0x1]={..._0x5afa4c[0x1],[_0x3abd67([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x224249};},{[_0x3abd67([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3abd67([0x68,0x69,0x67,0x68])}),_0x262b48[_0x3abd67([0x6f,0x6e])](_0x3abd67([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x64a84a=>{_0x451b6f(_0x64a84a[_0x3abd67([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3665b6=!0x0,_0x1676ad(_0x64a84a[_0x3abd67([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3abd67([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3abd67([0x6c,0x6f,0x77])}),_0x5a6a74[_0x3abd67([0x74,0x68,0x65,0x6e])](()=>{_0x3665b6||_0x5a8e83(_0x3abd67([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x18e2ce(){return _0x262b48[_0x3abd67([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3abd67([0x76,0x69,0x65,0x77])][_0x3abd67([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3abd67([0x61,0x75,0x74,0x6f]);}function _0x18acfd(){_0x262b48[_0x3abd67([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3abd67([0x76,0x69,0x65,0x77])][_0x3abd67([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3abd67([0x61,0x75,0x74,0x6f]);}}function _0x31ffc0(_0x1c79de){const _0x571f64=[new window[(_0x3abd67([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x33b40b=>setTimeout(_0x33b40b,0x473e0be5^_0x1a8ac5)),_0x5a6a74[_0x3abd67([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3abd67([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1d09da=>{let _0x59b6ba=0x0;_0x262b48[_0x3abd67([0x6d,0x6f,0x64,0x65,0x6c])][_0x3abd67([0x6f,0x6e])](_0x3abd67([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x50f861,_0x47d645)=>{_0x47d645[0x0][_0x3abd67([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x59b6ba++,_0x59b6ba==(0x473734d1^_0x1a8ac5)&&(_0x1d09da(),_0x50f861[_0x3abd67([0x6f,0x66,0x66])]());});}))];return window[_0x3abd67([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3abd67([0x72,0x61,0x63,0x65])](_0x571f64)[_0x3abd67([0x74,0x68,0x65,0x6e])](()=>_0x1c79de);}async function _0x1a9b5a(){await _0x5a6a74,_0x262b48[_0x3abd67([0x6d,0x6f,0x64,0x65,0x6c])][_0x3abd67([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x20df72,_0x262b48[_0x3abd67([0x6d,0x6f,0x64,0x65,0x6c])][_0x3abd67([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x20df72,_0x262b48[_0x3abd67([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3abd67([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x316309(){return _0x50388c(_0x3abd67([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x5b7124(_0x3abd67([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3abd67([0x73,0x74,0x61,0x74,0x65])]==_0x3abd67([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xa35d75(){return _0x50388c(_0x3abd67([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 _0x588eb9(){return _0x50388c(_0x3abd67([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4b7f7d(_0x514bb0){const _0x51b1ed=_0x2977d1();_0x262b48[_0x51b1ed]=_0x3abd67([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x514bb0,_0x514bb0!=_0x3abd67([0x56,0x61,0x6c,0x69,0x64])&&_0x1a9b5a();}function _0x2977d1(){const _0x136f0e=window[_0x3abd67([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3abd67([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3abd67([0x6e,0x6f,0x77])]())[_0x3abd67([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3abd67([0x2e]),'');let _0x45985e=_0x3abd67([0x77]);for(let _0x40d6aa=0x0;_0x40d6aa<_0x136f0e[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x40d6aa+=0x2){let _0x2b181e=window[_0x3abd67([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x136f0e[_0x3abd67([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x40d6aa,_0x40d6aa+0x2));_0x2b181e>=_0x5ced0d[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2b181e-=_0x5ced0d[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x45985e+=_0x5ced0d[_0x2b181e];}return _0x45985e;}function _0x3daf56(){const _0xf90c2c=_0x589003[_0x3abd67([0x73,0x70,0x6c,0x69,0x74])](_0x3abd67([0x2e]));if(0x3!=_0xf90c2c[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x57ceb8(_0xf90c2c[0x1]);function _0x57ceb8(_0x434038){const _0x4bcef5=_0x3065d3(_0x434038);return _0x4bcef5&&_0xeaccbb()?_0x4bcef5:null;function _0xeaccbb(){const _0x2d092d=_0x4bcef5[_0x3abd67([0x6a,0x74,0x69])],_0x2730eb=window[_0x3abd67([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x2d092d[_0x3abd67([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2d092d[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x317098={..._0x4bcef5,[_0x3abd67([0x6a,0x74,0x69])]:_0x2d092d[_0x3abd67([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x2d092d[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x317098[_0x3abd67([0x76,0x63])],_0xb12289(_0x317098)==_0x2730eb;}}}async function _0x54b958(){let _0x38a204=!0x0;try{const _0x584727=_0x589003[_0x3abd67([0x73,0x70,0x6c,0x69,0x74])](_0x3abd67([0x2e])),[_0x25fd92,_0x17555f,_0xae4e62]=_0x584727;return _0x54f683(_0x25fd92),await _0x45c6b0(_0x25fd92,_0x17555f,_0xae4e62),_0x38a204;}catch{return!0x1;}function _0x54f683(_0x7b22f6){const _0x527e18=_0x3065d3(_0x7b22f6);_0x527e18&&_0x527e18[_0x3abd67([0x61,0x6c,0x67])]==_0x3abd67([0x45,0x53,0x32,0x35,0x36])||(_0x38a204=!0x1);}async function _0x45c6b0(_0x52a3f1,_0x2b8a25,_0x196c79){const _0x105f25=window[_0x3abd67([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3abd67([0x66,0x72,0x6f,0x6d])](_0x9afdf1(_0x196c79),_0x1946fd=>_0x1946fd[_0x3abd67([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x5f4479=new window[(_0x3abd67([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3abd67([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x52a3f1+_0x3abd67([0x2e])+_0x2b8a25),_0xd1238e=window[_0x3abd67([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3abd67([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xd1238e)return;const _0x2170b0=await _0xd1238e[_0x3abd67([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3abd67([0x6a,0x77,0x6b]),_0x1242ed,{[_0x3abd67([0x6e,0x61,0x6d,0x65])]:_0x3abd67([0x45,0x43,0x44,0x53,0x41]),[_0x3abd67([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3abd67([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3abd67([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xd1238e[_0x3abd67([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3abd67([0x6e,0x61,0x6d,0x65])]:_0x3abd67([0x45,0x43,0x44,0x53,0x41]),[_0x3abd67([0x68,0x61,0x73,0x68])]:{[_0x3abd67([0x6e,0x61,0x6d,0x65])]:_0x3abd67([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x2170b0,_0x105f25,_0x5f4479)||(_0x38a204=!0x1);}}function _0x3065d3(_0x519a14){return _0x519a14[_0x3abd67([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3abd67([0x65,0x79]))?JSON[_0x3abd67([0x70,0x61,0x72,0x73,0x65])](_0x9afdf1(_0x519a14)):null;}function _0x9afdf1(_0x70efb3){return window[_0x3abd67([0x61,0x74,0x6f,0x62])](_0x70efb3[_0x3abd67([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3abd67([0x2b]))[_0x3abd67([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3abd67([0x2f])));}function _0xb12289(_0x17430a){let _0x30ce84=0x1505;function _0x3c21e0(_0x4d0c8a){for(let _0x1ed1cc=0x0;_0x1ed1cc<_0x4d0c8a[_0x3abd67([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1ed1cc++){const _0x2ea4a9=_0x4d0c8a[_0x3abd67([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1ed1cc);_0x30ce84=(_0x30ce84<<0x5)+_0x30ce84+_0x2ea4a9,_0x30ce84&=_0x30ce84;}}function _0x3b7611(_0x10c9fb){Array[_0x3abd67([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x10c9fb)?_0x10c9fb[_0x3abd67([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x3b7611):_0x10c9fb&&typeof _0x10c9fb==_0x3abd67([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3abd67([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x10c9fb)[_0x3abd67([0x73,0x6f,0x72,0x74])]()[_0x3abd67([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5a0a75,_0x1b1c81])=>{_0x3c21e0(_0x5a0a75),_0x3b7611(_0x1b1c81);}):_0x3c21e0(window[_0x3abd67([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x10c9fb));}return _0x3b7611(_0x17430a),_0x30ce84>>>0x0;}function _0x485a96(_0x10c91f){return _0x10c91f[_0x3abd67([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3abd67([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3abd67([0x30]));}function _0x1ad11c(_0x4ad117){return _0x4ad117[_0x3abd67([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3abd67([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3abd67([0x6a,0x6f,0x69,0x6e])]('');}function _0x50388c(_0x32fcf8){return _0x262b48[_0x3abd67([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3abd67([0x68,0x61,0x73])](_0x32fcf8);}function _0x5b7124(_0x207375){return _0x262b48[_0x3abd67([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3abd67([0x67,0x65,0x74])](_0x207375);}function _0x20df72(){}function _0x3abd67(_0x493513){return _0x493513['map'](_0xc5e95d=>String['fromCharCode'](_0xc5e95d))['join']('');}_0x4b7f7d(await _0x5e6484());}(this);}['destroy'](){const _0x1b95dc=this['editor']['plugins']['get'](o),_0x4e53bd=this['editor']['config']['get']('collaboration.channelId');for(const _0x51d775 of _0x1b95dc['getCommentThreads']({'channelId':_0x4e53bd}))_0x1b95dc['_detachCommentThread'](_0x51d775['id']),_0x1b95dc['_threads']['delete'](_0x51d775['id']);super['destroy']();}['hasMarkerForId'](_0x36687f){return this['getAllMarkersForId'](_0x36687f)['length']>0x0;}['getAllMarkersForId'](_0x33a2b4){const _0x37b48e=[];for(const _0x1723c0 of this['editor']['model']['markers'])_0x1723c0['name']['startsWith']('comment:'+_0x33a2b4)&&_0x37b48e['push'](_0x1723c0);return _0x37b48e;}['scrollToThreadMarker'](_0x5d5013){setTimeout(()=>{const _0x39da48=this['_getTargetForId'](_0x5d5013);if(!_0x39da48)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5d5013&&nt({'target':_0x39da48[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x18c29e){this['editor']['model']['change'](()=>{for(const _0x4bfad4 of this['getAllMarkersForId'](_0x18c29e))this['editor']['editing']['reconvertMarker'](_0x4bfad4);});}['_attachArchivedThread'](_0x24b7a0){const _0x38df84=this['editor']['plugins']['get'](o),_0x5136f2=this['editor']['plugins']['get'](b),_0x38040f=_0x38df84['getCommentThread'](_0x24b7a0);if(!_0x38040f['isAttached']){const _0x415bcf=_0x38040f['attachTo'](()=>this['_getTargetForId'](_0x38040f['id']));_0x5136f2['registerAnnotation'](_0x415bcf),_0x38040f['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x1b4709=this['editor'],_0x192d1a=_0x1b4709['plugins']['get'](it);_0x1b4709['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x48fab2,_0x4987dc)=>{const {id:_0x2a5077}=ft(_0x48fab2['markerName']),_0x25c57f=_0x1b4709['plugins']['get'](o)['getCommentThread'](_0x2a5077),_0x1db771=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x2a5077;let _0x472854;if(_0x25c57f&&_0x25c57f['isResolved']&&!_0x1db771&&_0x48fab2['item'])return _0x4987dc['consumable']['consume'](_0x48fab2['item'],'addMarker:'+_0x48fab2['markerName']),_0x4987dc['consumable']['consume'](_0x48fab2['item'],'removeMarker:'+_0x48fab2['markerName']),null;const _0x55f7b6=['ck-comment-marker'];return _0x1db771&&_0x55f7b6['push']('ck-comment-marker--active'),_0x472854=_0x25c57f?.['length']?_0x25c57f['comments']['first']['author']['id']:_0x192d1a['me']['id'],{'classes':_0x55f7b6,'attributes':{'data-comment':_0x2a5077,'data-author-id':_0x472854}};}}),_0x1b4709['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0xda8277,{options:_0x565c5d})=>{if(_0x565c5d['showCommentHighlights'])return null;const _0x3548d4=_0x1b4709['plugins']['get'](o),_0xcbb4d0=_0x1b4709['model']['markers']['get'](_0xda8277),{id:_0x86562b,part:_0x1b5e68}=ft(_0xda8277);return _0xcbb4d0&&!_0xcbb4d0['affectsData']||_0x565c5d['ignoreResolvedComments']&&_0x3548d4['getCommentThread'](_0x86562b)?.['isResolved']?null:{'group':'comment','name':_0x1b5e68?_0x86562b+':'+_0x1b5e68:_0x86562b};}}),_0x1b4709['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x433e4d,{writer:_0x2e1f0d})=>_0x2e1f0d['createElement']('$marker',{'data-name':'comment:'+_0x433e4d['getAttribute']('id')})}),_0x1b4709['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4c632d=this['editor'],_0x6711e6=_0x4c632d['plugins']['get'](o),_0x518f70=new Set(),_0x446fec=new Set();_0x4c632d['model']['document']['registerPostFixer'](_0x4585b2=>{let _0x5d15f1=!0x1;for(const {name:_0x2ef4c9,data:_0x3a3470}of _0x4c632d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x3c0bd8,id:_0x1024b7}=ft(_0x2ef4c9);let _0x1fb179=_0x3a3470['newRange'];if('comment'!==_0x3c0bd8||!_0x1fb179)continue;const _0x1efc60='$graveyard'===_0x1fb179['root']['rootName'];_0x1efc60||(_0x1fb179=ht(_0x1fb179,_0x4c632d['model']),!_0x1fb179||_0x1fb179['isCollapsed']||!_0x3a3470['newRange']||_0x1fb179['isEqual'](_0x3a3470['newRange']))?_0x4c632d['model']['hasContent'](_0x1fb179)&&!_0x1efc60?this['isThreadsLoadingPaused']?_0x518f70['add'](_0x2ef4c9):this['_handleThreadMarker'](_0x2ef4c9,_0x1024b7):(_0x446fec['add'](_0x2ef4c9),_0x518f70['delete'](_0x2ef4c9),_0x4585b2['removeMarker'](_0x2ef4c9),_0x5d15f1=!0x0):(_0x4585b2['updateMarker'](_0x2ef4c9,{'range':_0x1fb179}),_0x5d15f1=!0x0);}return _0x5d15f1;}),this['on']('change:isThreadsLoadingPaused',(_0x43845,_0x51bdf0,_0x1a3e40)=>{if(!_0x1a3e40&&_0x518f70['size'])for(const _0x5ac250 of _0x518f70){const {id:_0x440185}=ft(_0x5ac250);_0x518f70['delete'](_0x5ac250),_0x4c632d['model']['markers']['get'](_0x5ac250)&&this['_handleThreadMarker'](_0x5ac250,_0x440185);}}),this['listenTo'](_0x4c632d['model']['document'],'change',()=>{for(const {name:_0x4d2261,data:{newRange:_0x34a4d5}}of _0x4c632d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x43bfbb,id:_0x537336}=ft(_0x4d2261);if('comment'!==_0x43bfbb)continue;const _0x1b7343=_0x6711e6['getCommentThread'](_0x537336),_0x19ef23=this['hasMarkerForId'](_0x537336);_0x1b7343&&(!_0x1b7343['_hasTargetInContent']&&_0x34a4d5&&_0x4c632d['editing']['view']['once']('render',()=>{const _0x299e26=_0x4c632d['plugins']['get'](y),_0x3044e4=_0x6711e6['_threadToController']['get'](_0x1b7343)['view'];_0x299e26['getByInnerView'](_0x3044e4)['refreshVisibility']();},{'priority':'low'}),_0x1b7343['_hasTargetInContent']=_0x19ef23||!!_0x34a4d5),_0x34a4d5||(_0x446fec['add'](_0x4d2261),_0x518f70['delete'](_0x4d2261));}for(const _0x96ccd7 of _0x446fec){const {id:_0x1b211d}=ft(_0x96ccd7),_0x4a8c5e=_0x6711e6['getCommentThread'](_0x1b211d);if(_0x518f70['delete'](_0x96ccd7),!_0x4a8c5e)continue;const _0x4007c7=this['hasMarkerForId'](_0x1b211d);_0x4007c7||_0x4a8c5e['isSubmitted']?_0x4007c7||_0x4a8c5e['unlinkedAt']||_0x4a8c5e['setUnlinkedAt'](new Date()):_0x4a8c5e['remove']();}_0x446fec['clear']();});}['_handleInitialThreads'](_0x16ef1c){_0x16ef1c['forEach'](_0x1c79c3=>{_0x1c79c3['unlinkedAt']&&this['_attachArchivedThread'](_0x1c79c3['id']);});}['_getTargetForId'](_0x3b97dc){const _0x4ec5c4=this['editor'],_0x51f77a=this['getAllMarkersForId'](_0x3b97dc);return et(_0x4ec5c4['editing'],_0x51f77a);}['_getTextContext'](_0x5d5fec){const _0x515b75=this['getAllMarkersForId'](_0x5d5fec);let _0x38824='',_0x3e17a7=!0x1;for(const _0x994119 of _0x515b75){const _0x1a1726=_0x994119['getRange']();for(const _0x2e12ae of Array['from'](_0x1a1726['getItems']()))_0x2e12ae['is']('$textProxy')?(_0x38824&&_0x3e17a7&&(_0x38824+='\x20',_0x3e17a7=!0x1),_0x38824+=_0x2e12ae['data']):_0x3e17a7=!0x0;_0x3e17a7=!0x0;}return _0x38824['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x3cdad3,_0x3cf2bf){const _0x26cfdd=this['editor'],_0x2a3861=_0x26cfdd['plugins']['get'](o);let _0x395eb9=_0x2a3861['getCommentThread'](_0x3cf2bf);const _0x4b8f3b=_0x26cfdd['config']['get']('collaboration.channelId'),_0x16d519=_0x26cfdd['plugins']['get'](b);if(_0x395eb9&&(_0x395eb9['unlinkedAt']&&_0x395eb9['setUnlinkedAt'](null),_0x395eb9['isAttached']))return _0x395eb9;return!this['getAllMarkersForId'](_0x3cf2bf)[0x0]['managedUsingOperations']?_0x26cfdd['editing']['view']['once']('render',()=>{if(_0x2a3861['getCommentThread'](_0x3cf2bf))return;const _0x1da4f9=_0x26cfdd['plugins']['get'](y);_0x395eb9=_0x2a3861['openNewCommentThread']({'channelId':_0x4b8f3b,'threadId':_0x3cf2bf,'target':()=>this['_getTargetForId'](_0x3cf2bf),'context':{'type':'text','value':this['_getTextContext'](_0x3cf2bf)}});const _0x1f7c46=_0x2a3861['_threadToController']['get'](_0x395eb9)['view'],_0x4cf30b=_0x1da4f9['getByInnerView'](_0x1f7c46);_0x4cf30b&&_0x16d519['registerAnnotation'](_0x4cf30b);},{'priority':'low'}):_0x2a3861['fetchCommentThread']({'channelId':_0x4b8f3b,'threadId':_0x3cf2bf})['then'](_0x35c350=>{if('destroyed'!==_0x26cfdd['state']){if(_0x395eb9=_0x35c350,_0x395eb9&&!_0x395eb9['isAttached']){const _0x2e4f34=_0x395eb9['attachTo'](()=>this['_getTargetForId'](_0x3cf2bf));_0x16d519['registerAnnotation'](_0x2e4f34),_0x395eb9['isResolved']&&this['_reconvertMarkers'](_0x3cf2bf);}else{if(!_0x395eb9){const _0x394843=this['getAllMarkersForId'](_0x3cf2bf);_0x26cfdd['model']['change'](_0x3b9168=>{for(const _0x2fb34b of _0x394843)_0x3b9168['removeMarker'](_0x2fb34b);});}}}}),_0x395eb9;}['_handleThreadMarker'](_0x517437,_0x5aa83a){const _0x5d7011=this['_attachMarkerToThread'](_0x517437,_0x5aa83a);_0x5d7011&&!_0x5d7011['context']&&_0x5d7011['setContext']({'type':'text','value':this['_getTextContext'](_0x5aa83a)});}['_initAriaMarkerChangeAnnouncements'](){const _0x456e09=this['editor'];rt(_0x456e09['model'],({left:_0x137f59,entered:_0x405e81})=>{for(const _0x29b4cf of _0x137f59)if(mt(_0x29b4cf)){_0x456e09['ui']['ariaLiveAnnouncer']['announce'](N(_0x456e09['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x37a081 of _0x405e81)if(mt(_0x37a081)){_0x456e09['ui']['ariaLiveAnnouncer']['announce'](N(_0x456e09['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x309bde)));break;}});}}function dt(_0x311907,_0x335cc0){return _0x335cc0?_0x311907+':'+_0x335cc0:_0x311907;}function ht(_0x400ece,_0x25ed5b){const _0x3fab96=_0x25ed5b['schema'],_0x47b39b=_0x25ed5b['createRange'](_0x400ece['start']);for(const _0x40889f of _0x400ece['getWalker']()){const {type:_0x4adeef,item:_0x5bc81d,nextPosition:_0x4b87e0}=_0x40889f;if('text'===_0x4adeef||_0x3fab96['isObject'](_0x5bc81d)){const _0x148b4b=_0x25ed5b['createPositionBefore'](_0x5bc81d);_0x47b39b['isCollapsed']&&(_0x47b39b['start']=_0x148b4b),_0x47b39b['end']=_0x4b87e0;}}return _0x47b39b;}function mt(_0x4936a3){return'comment'===ft(_0x4936a3['name'])['group'];}class s extends _0x48bfeb{['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 _0x1e8082=this['editor'],_0xa9f72a=_0x1e8082['plugins']['get'](o),_0x2c5eed=_0x1e8082['plugins']['get'](r),_0x4d818e=_0x1e8082['plugins']['get'](y),_0xdd15be=_0x1e8082['plugins']['get'](b);_0x1e8082['ui']['componentFactory']['add']('comment',()=>{const _0x852942=this['_createUIButton'](_0x52b512);return _0x852942['tooltip']=!0x0,_0x852942;}),_0x1e8082['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x13493c)),_0xdd15be['addSourceCollector'](()=>{const _0x36cf55=[];for(const [_0x31a048,_0x58e718]of _0xa9f72a['_threadToController']){const _0x200b2b=_0x2c5eed['getAllMarkersForId'](_0x31a048['id']),_0x2cae83=_0x200b2b['map'](_0x157418=>_0x157418['getRange']());_0x200b2b['length']>0x0&&_0x36cf55['push']([_0x58e718['view'],_0x2cae83]);}return _0x36cf55;}),this['listenTo'](_0x4d818e,'change:activeAnnotations',(_0x24be5d,_0xe024cf,_0x238b8c)=>{const _0x279247=Array['from'](_0x238b8c)['map'](_0x2ef01d=>_0x2ef01d['innerView'])['find'](_0x17f8d2=>_0xa9f72a['_viewToController']['has'](_0x17f8d2));if(!_0x279247)return void(_0x2c5eed['activeMarker']=null);const _0x36f3b9=_0xa9f72a['_viewToController']['get'](_0x279247)['model']['id'],_0x112fe3='comment:'+_0x36f3b9;_0x36f3b9&&_0x2c5eed['hasMarkerForId'](_0x36f3b9)?_0x2c5eed['activeMarker']=_0x112fe3:_0x2c5eed['activeMarker']&&(_0x2c5eed['activeMarker']=null);}),this['listenTo'](_0xa9f72a,'removeCommentThread',(_0x416c37,{threadId:_0x5b38f0,isFromAdapter:_0x3bad2e})=>{!_0x3bad2e&&_0x1e8082['ui']['focusTracker']['isFocused']&&_0x2c5eed['hasMarkerForId'](_0x5b38f0)&&_0x1e8082['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0xa9f72a,'addComment',(_0x42756a,{threadId:_0x57e42f,isFromAdapter:_0x4d399c})=>{if(_0x4d399c||!_0x2c5eed['hasMarkerForId'](_0x57e42f)||!_0xa9f72a['hasCommentThread'](_0x57e42f))return;0x1===_0xa9f72a['getCommentThread'](_0x57e42f)['length']&&(_0x1e8082['editing']['view']['focus'](),_0x42756a['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3afb3d=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x16858;for(const _0x18b82b in _0x3afb3d){const _0x391296=_0x18b82b,_0x5160de=_0x3afb3d[_0x391296];if('commentsLicenseKeyValid'==_0x5160de||'commentsLicenseKeyInvalid'==_0x5160de||'commentsLicenseKeyExpired'==_0x5160de||'commentsLicenseKeyDomainLimit'==_0x5160de||'commentsLicenseKeyNotAllowed'==_0x5160de||'commentsLicenseKeyEvaluationLimit'==_0x5160de||'commentsLicenseKeyTrialLimit'==_0x5160de||'commentsLicenseKeyUsageLimit'==_0x5160de){delete _0x3afb3d[_0x391296],_0x16858=_0x5160de,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x16858&&_0x3afb3d['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x16858&&_0x3afb3d['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x16858&&_0x3afb3d['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x16858&&_0x3afb3d['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x16858&&_0x3afb3d['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x16858&&_0x3afb3d['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x16858&&_0x3afb3d['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x39d7e3){const _0x266b19=this['editor'],_0x5bfee3=new _0x39d7e3(_0x266b19['locale']),_0xd7246e=_0x266b19['commands']['get']('addCommentThread');return _0x5bfee3['set']({'label':N(_0x266b19['locale'],'Comment'),'icon':_0x2dc142}),_0x5bfee3['bind']('isEnabled')['to'](_0xd7246e,'hasContent'),this['listenTo'](_0x5bfee3,'execute',()=>{_0xd7246e['execute']();}),_0x5bfee3;}}class i extends _0x48bfeb{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2b5ed6){super(_0x2b5ed6),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x5b6e00,_0x958f58,_0xf04a74)=>{_0xf04a74?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x2daa4a,_0x46a620]of this['editor']['commands'])_0x46a620['affectsData']&&'addCommentThread'!==_0x2daa4a&&_0x46a620['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 _0x498fe3=this['editor']['editing']['view']['document'];this['listenTo'](_0x498fe3,'cut',_0x510a79=>_0x510a79['stop'](),{'priority':'highest'}),this['listenTo'](_0x498fe3,'clipboardInput',_0x564be2=>_0x564be2['stop'](),{'priority':'highest'}),this['listenTo'](_0x498fe3,'delete',_0x352ba7=>_0x352ba7['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x17af1a,_0x5aebe6]of this['editor']['commands'])_0x5aebe6['affectsData']&&'addCommentThread'!==_0x17af1a&&_0x5aebe6['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 _0x6c42d0{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x16ede7){super(_0x16ede7),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4723d0=this['context']['plugins']['get'](y);this['listenTo'](_0x4723d0,'_activateAnnotation',(_0x47a94a,_0x105e10)=>{for(const _0x347923 of this['activeUIs']){const _0x553892=this['_uis']['get'](_0x347923);(0x0,this['uisData']['get'](_0x347923)['filter'])(_0x105e10)&&_0x553892['setActiveAnnotation'](_0x105e10);}}),this['listenTo'](_0x4723d0,'_deactivateAllAnnotations',()=>{for(const _0x15ce3e of this['activeUIs']){this['_uis']['get'](_0x15ce3e)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4723d0['_visibleAnnotations'],'add',(_0x296be9,_0x43c47e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x43c47e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x127139){return this['activeUIs']['has'](_0x127139);}['activate'](_0x1fed50,_0x524fef=this['defaultFilter']){const _0x36373d=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x1fed50))throw new _0xb7f752('annotationsuis-missing-ui',this,{'uiName':_0x1fed50});this['isActive'](_0x1fed50)&&this['deactivate'](_0x1fed50),this['activeUIs']['add'](_0x1fed50);const _0x5aa06b=new S();v({'source':_0x36373d['_visibleAnnotations'],'target':_0x5aa06b,'filter':_0x524fef}),this['uisData']['set'](_0x1fed50,{'collection':_0x5aa06b,'filter':_0x524fef});const _0x4dc7d8=this['_uis']['get'](_0x1fed50);_0x4dc7d8['attach'](_0x5aa06b),this['listenTo'](_0x4dc7d8,'change:activeAnnotation',(_0x26c0a0,_0x599791,_0x27e699,_0x45f7c0)=>{_0x45f7c0&&_0x36373d['_removeActiveAnnotation'](_0x45f7c0),_0x27e699&&_0x36373d['_addActiveAnnotation'](_0x27e699);});}['deactivate'](_0x279fe3){if(this['activeUIs']['delete'](_0x279fe3),!this['_uis']['has'](_0x279fe3))throw new _0xb7f752('annotationsuis-missing-ui',this,{'uiName':_0x279fe3});const _0x2543f1=this['_uis']['get'](_0x279fe3);_0x2543f1['detach'](),this['stopListening'](_0x2543f1),this['uisData']['get'](_0x279fe3)['collection']['destroy'](),this['uisData']['delete'](_0x279fe3);}['switchTo'](_0x194ee6){if(!this['_uis']['has'](_0x194ee6))throw new _0xb7f752('annotationsuis-missing-ui',this,{'uiName':_0x194ee6});const _0x34f539=this['context']['plugins']['get'](y),_0x20341f=Array['from'](_0x34f539['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x194ee6);const _0x2ceaa7=this['_uis']['get'](_0x194ee6);_0x2ceaa7['setActiveAnnotation'](_0x20341f),_0x2ceaa7['_setSelectedAnnotations']&&_0x20341f&&_0x2ceaa7['_setSelectedAnnotations']([_0x20341f]);}['deactivateAll'](){for(const _0x15a16c of this['activeUIs'])this['deactivate'](_0x15a16c);}['register'](_0x36cb82,_0x14006b){if(this['_uis']['has'](_0x36cb82))throw new _0xb7f752('annotationsuis-register-already-registered');if('function'!=typeof _0x14006b['attach']||'function'!=typeof _0x14006b['detach']||'function'!=typeof _0x14006b['setActiveAnnotation'])throw new _0xb7f752('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x36cb82,_0x14006b);}['refilterAnnotations'](){const _0x30c39c=this['context']['plugins']['get'](y)['collection'],_0x33b175=new Map(),_0x47736a=Array['from'](this['activeUIs']);for(const _0x5c1939 of this['activeUIs']){const _0x5d9143=this['uisData']['get'](_0x5c1939)['collection'];for(const _0x259a73 of _0x5d9143)_0x33b175['set'](_0x259a73,_0x5c1939);}for(const _0x50d2ab of _0x30c39c){const _0x5a83fb=_0x33b175['get'](_0x50d2ab);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x50d2ab);const _0x1acc52=_0x47736a['find'](_0xb9f8ea=>this['uisData']['get'](_0xb9f8ea)['filter'](_0x50d2ab));_0x5a83fb!==_0x1acc52&&(_0x5a83fb&&this['uisData']['get'](_0x5a83fb)['collection']['remove'](_0x50d2ab),_0x1acc52&&this['uisData']['get'](_0x1acc52)['collection']['add'](_0x50d2ab));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x45fe94){const _0x4f9d76=[];for(const _0x4448a6 of this['activeUIs']){(0x0,this['uisData']['get'](_0x4448a6)['filter'])(_0x45fe94)&&_0x4f9d76['push'](_0x4448a6);}if(_0x4f9d76['length']>0x1)throw new _0xb7f752('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x4f9d76,'annotationType':_0x45fe94['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x41b266){super(_0x41b266),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x929a08,_0x4f1d36)=>_0x929a08+_0x4f1d36),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x100e2a=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x100e2a['to']('isAnimationDisabled',_0x3b5ae4=>_0x3b5ae4?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x100e2a['to']('top',_0x123093=>Ot(_0x123093))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x22354b=this['element']['clientHeight'];_0x22354b&&(this['height']=_0x22354b);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x6c42d0{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1f8d21){super(_0x1f8d21),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 _0xb91a44=this['context']['config']['get']('sidebar.container');_0xb91a44&&this['setContainer'](_0xb91a44);}['setContainer'](_0x3cd6c3){if(!g(_0x3cd6c3))throw new _0xb7f752('sidebar-setcontainer-invalid-element');this['container']=_0x3cd6c3;}['_attachToContainer']({viewClass:_0xb7e22a='',spaceBetweenItems:_0x1f1ac2=0x19}={}){if(!g(this['container']))throw new _0xb7f752('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0xb7e22a,this['_spaceBetweenItems']=_0x1f1ac2;}['rearrange']({removedAnnotation:_0x91e417,previousAnnotation:_0x3d7927,nextAnnotation:_0x580408}){const _0x11b3a1=this['getSidebarItemView'](_0x91e417);this['view']['list']['remove'](_0x11b3a1),this['_destroySidebarItemView'](_0x91e417),_0x3d7927&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x3d7927)),_0x580408&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x580408)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4eecfc,activatedAnnotation:_0x2e4eb5,disableAnimationOnActivatedAnnotation:_0x55f2fc}){if(this['_activeAnnotation']=_0x2e4eb5,_0x4eecfc){_0x4eecfc['isActive']=!0x1;const _0x4c4314=this['getSidebarItemView'](_0x4eecfc);_0x4c4314&&_0x55f2fc&&(_0x4c4314['isAnimationDisabled']=!0x1);}if(_0x2e4eb5){const _0x10a4fe=this['getSidebarItemView'](_0x2e4eb5);_0x10a4fe&&(_0x2e4eb5['isActive']=!0x0,_0x55f2fc&&(_0x10a4fe['isAnimationDisabled']=!0x0,_0x10a4fe['top']+=0x1),this['_alignToTargetRect'](_0x10a4fe));}}['_detachFromContainer'](_0xc74591){if(this['view']['element']['remove'](),_0xc74591){for(const _0x119df5 of _0xc74591)this['_destroySidebarItemView'](_0x119df5);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x217f49,_0xb53339){_0xb53339||(_0xb53339=_0x217f49['view']);const _0x53af6d=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x53af6d,_0x217f49),this['_annotationToSidebarItemView']['set'](_0x217f49,_0x53af6d),_0x53af6d['content']['add'](_0xb53339),this['listenTo'](_0x217f49['view'],'change:targetRect',(_0x3f5fcd,_0x1a6fa9,_0x19097c)=>{const _0x31f51b=this['_getTargetTop'](_0x217f49,_0x19097c);_0x53af6d['_targetTop']!=_0x31f51b&&(_0x53af6d['_targetTop']=_0x31f51b,this['_setItemTop'](_0x53af6d,_0x31f51b));}),this['listenTo'](_0x53af6d,'change:top',()=>{this['_recalculate'](_0x53af6d,'top');}),this['listenTo'](_0x53af6d,'change:bottom',()=>{this['_recalculate'](_0x53af6d,'bottom');}),this['_alignToTargetRect'](_0x53af6d);const _0x250c09=this['_getItemBefore'](_0x53af6d);if(_0x250c09)this['_alignAfterItem'](_0x250c09,_0x53af6d)||this['_alignToTargetRect'](_0x53af6d);else this['_alignToTargetRect'](_0x53af6d);return this['_updateLastItem'](),this['view']['list']['add'](_0x53af6d),_0x53af6d;}['_alignForTopChange'](_0x3b6452){if(!_0x3b6452['content']['length'])return;const _0x305d6e=this['_getItemBefore'](_0x3b6452);if(!_0x305d6e)return;const _0x36d907=this['_sidebarItemViewToAnnotation']['get'](_0x305d6e),_0xf89d93=this['_activeAnnotation'];_0xf89d93&&_0xf89d93===_0x36d907?this['_alignAfterItem'](_0x305d6e,_0x3b6452):this['_alignBeforeItem'](_0x3b6452,_0x305d6e);}['_alignForBottomChange'](_0x8cfc4e){if(!_0x8cfc4e['content']['length'])return;const _0x2a69b9=this['_getItemAfter'](_0x8cfc4e);if(!_0x2a69b9)return;const _0x21df3d=this['_sidebarItemViewToAnnotation']['get'](_0x2a69b9),_0xbdffac=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x3618b8=this['_activeAnnotation'];_0x3618b8&&_0x3618b8===_0x21df3d&&_0xbdffac?(this['_alignBeforeItem'](_0x2a69b9,_0x8cfc4e),this['_alignAfterItem'](_0x8cfc4e,_0x2a69b9)):_0x3618b8&&_0x3618b8===_0x21df3d?this['_alignBeforeItem'](_0x2a69b9,_0x8cfc4e):this['_alignAfterItem'](_0x8cfc4e,_0x2a69b9);}['_recalculate'](_0x20a58c,_0x12a957){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x3e96b3,changedProp:_0x3c5e41}of this['_recalculateBuffer'])'top'===_0x3c5e41?this['_alignForTopChange'](_0x3e96b3):this['_alignForBottomChange'](_0x3e96b3);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x20a58c,'changedProp':_0x12a957});}['getSidebarItemView'](_0x31836b){return this['_annotationToSidebarItemView']['get'](_0x31836b);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x49ffde){const _0x3e160a=this['getSidebarItemView'](_0x49ffde);this['stopListening'](_0x3e160a),this['stopListening'](_0x49ffde['view']),_0x3e160a['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x49ffde),this['_sidebarItemViewToAnnotation']['delete'](_0x3e160a);}['_createSidebarView'](){const _0x4060c5=new H(this['context']['locale']);return _0x4060c5['render'](),this['on']('change:_lastItem',(_0x510fed,_0x32615d,_0x7990c9,_0x32baca)=>{_0x32baca&&_0x4060c5['unbind']('minHeight'),_0x7990c9?_0x4060c5['bind']('minHeight')['to'](_0x7990c9,'bottom'):_0x4060c5['minHeight']=null;}),_0x4060c5;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x367d2d){const _0x5e55b4=this['_sidebarItemViewToAnnotation']['get'](_0x367d2d),_0x4dd4f1=_0x5e55b4&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5e55b4)-0x1);return _0x4dd4f1&&this['getSidebarItemView'](_0x4dd4f1)||null;}['_getItemAfter'](_0x236251){const _0x2d2e99=this['_sidebarItemViewToAnnotation']['get'](_0x236251),_0x5776d4=_0x2d2e99&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2d2e99)+0x1);return _0x5776d4&&this['getSidebarItemView'](_0x5776d4)||null;}['_alignBeforeItem'](_0x3d6a97,_0x3b0b52){_0x3d6a97['updateHeight']();const _0x242d34=G(_0x3b0b52['bottom']+this['_spaceBetweenItems'],_0x3d6a97['top']);return!!_0x242d34&&(this['_setItemTop'](_0x3b0b52,_0x3b0b52['top']-_0x242d34),!0x0);}['_alignAfterItem'](_0x10058d,_0x5a3f88){_0x10058d['updateHeight']();const _0x2f81fb=G(_0x10058d['bottom']+this['_spaceBetweenItems'],_0x5a3f88['top']);return!!_0x2f81fb&&(this['_setItemTop'](_0x5a3f88,_0x5a3f88['top']+_0x2f81fb,!0x1),!0x0);}['_alignToTargetRect'](_0x53f1b3){const _0x3af62c=this['_sidebarItemViewToAnnotation']['get'](_0x53f1b3);if(!_0x3af62c||!_0x3af62c['target']||!_0x3af62c['targetRect'])return;const _0x3d73f2=this['_getTargetTop'](_0x3af62c,_0x3af62c['targetRect']);this['_setItemTop'](_0x53f1b3,_0x3d73f2);}['_getTargetTop'](_0x20aa49,_0x5e517c){if(null===_0x5e517c)return 0x0;if(_0x20aa49['target']instanceof _0x3e90cd)return _0x5e517c['top'];{const _0x476985=new _0x3e90cd(this['view']['element'])['top'];return _0x5e517c['top']-_0x476985;}}['_setItemTop'](_0x4b07d6,_0x5ba6f3,_0x28b00d=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x28b00d&&(_0x5ba6f3=Math['max'](_0x5ba6f3,this['_getMaxAvailableTop'](_0x4b07d6))),_0x4b07d6['top']=_0x5ba6f3;}['_getMaxAvailableTop'](_0xf5387f){let _0x4eafa1=this['_getItemBefore'](_0xf5387f),_0x47edd1=0x0;for(;_0x4eafa1;)_0x4eafa1['updateHeight'](),_0x47edd1+=this['_spaceBetweenItems']+_0x4eafa1['height'],_0x4eafa1=this['_getItemBefore'](_0x4eafa1);return _0x47edd1;}}function G(_0x3a5164,_0x1bf241){return Math['max'](_0x3a5164-_0x1bf241,0x0);}function g(_0x29b657){return null!==_0x29b657&&'object'==typeof _0x29b657&&0x1===_0x29b657['nodeType'];}class e extends _0x6c42d0{['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(_0x40f6e6){super(_0x40f6e6),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3c8425(),this['_refreshPositioningDebounced']=_0x1cef12(()=>{_0x40f6e6['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3bda57=this['context']['plugins']['get'](j),_0x594146=this['context']['plugins']['get'](z);_0x3bda57['register']('wideSidebar',this),_0x594146['container']&&_0x3bda57['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x571f4a){if(_0x571f4a===this['activeAnnotation'])return;const _0x28ba4a=this['context']['plugins']['get'](z);_0x28ba4a['_activeAnnotation']=_0x571f4a;const _0x157c88=this['activeAnnotation'];_0x28ba4a['refresh']({'blurredAnnotation':_0x157c88,'activatedAnnotation':_0x571f4a}),this['activeAnnotation']=_0x571f4a;}['attach'](_0x559c67){this['annotations']=_0x559c67;const _0x223518=this['context']['plugins']['get'](z);if(_0x223518['_annotations']=_0x559c67,this['isAttached'])throw new _0xb7f752('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x223518,'set:container',()=>{this['detach'](),this['listenTo'](_0x223518,'change:container',_0x5e32e2=>{_0x5e32e2['off'](),this['attach'](_0x559c67);});}),_0x223518['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x28ff85=_0x54b049=>{_0x54b049['updateTargetRect'](),_0x223518['addAnnotation'](_0x54b049);};for(const _0x5a5462 of _0x559c67)_0x28ff85(_0x5a5462);this['listenTo'](_0x559c67,'add',(_0x247a0f,_0x42841a)=>{_0x28ff85(_0x42841a);}),this['listenTo'](_0x559c67,'remove',(_0xbfa592,_0x7adcc9,_0x807d4a)=>{_0x223518['rearrange']({'removedAnnotation':_0x7adcc9,'previousAnnotation':_0x559c67['get'](_0x807d4a-0x1),'nextAnnotation':_0x559c67['get'](_0x807d4a+0x1)}),_0x7adcc9===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x559c67,'focus',(_0x15194d,_0x52fdfe)=>{this['setActiveAnnotation'](_0x52fdfe);}),this['listenTo'](_0x559c67,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2a9a59=this['context']instanceof _0x2f39eb?this['context']['editors']:new _0x3c8425([this['context']]);for(const _0x50002a of _0x2a9a59)this['_integrateWithEditorAnnotations'](_0x50002a);this['listenTo'](_0x2a9a59,'add',(_0x2405f2,_0x4dad81)=>{this['listenTo'](_0x4dad81,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x4dad81);});}),this['listenTo'](_0x2a9a59,'remove',(_0x241d69,_0x165457)=>{_0x165457['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x165457['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0xb7f752('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x47a00d=this['context']['plugins']['get'](z);_0x47a00d['_detachFromContainer'](this['annotations']),this['stopListening'](_0x47a00d),this['stopListening'](this['annotations']),this['context']instanceof _0x2f39eb&&this['stopListening'](this['context']['editors']);for(const _0x7cc0e7 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x7cc0e7);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x541a80){if(!_0x541a80['plugins']['has']('EditorAnnotations'))return;const _0x57c3ab=_0x541a80['plugins']['get']('EditorAnnotations'),_0x524ee5=()=>{const _0x3e0e78=_0x57c3ab['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3e0e78[0x0]||null);};this['listenTo'](_0x57c3ab,'refresh',_0x524ee5),this['listenTo'](_0x57c3ab,'blur',(_0xa7d131,{isAnnotationTracked:_0x30ad81})=>{this['activeAnnotation']&&_0x30ad81(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x57c3ab,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x13a6e1=>{_0x57c3ab['hasDomSelection']()&&(_0x524ee5(),_0x13a6e1['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x57c3ab);}['_destroyEditorAnnotationsIntegration'](_0x569f9a){this['stopListening'](_0x569f9a),this['_editorAnnotations']['remove'](_0x569f9a);}}class C extends _0x52b512{['counterView'];constructor(_0x15543c){super(_0x15543c);const _0x9c1e54=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x379a84,_0x35c4ba)=>_0x379a84?'...':_0x35c4ba['toString']()),this['set']('annotationType',''),this['icon']=_0x2dc142,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x9c1e54['to']('annotationType',_0x27f041=>'ck-annotation-counter__badge--'+_0x27f041),_0x9c1e54['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x9c1e54['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x6c42d0{['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(_0x243e83){super(_0x243e83),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0xa43367())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3c8425(),this['_refreshPositioningDebounced']=_0x1cef12(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x23aa9b(this['context']['locale']),this['balloonPanelView']=new _0x3f2722(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x40a394){this['annotations']=_0x40a394;const _0x481931=this['context']['plugins']['get'](z),_0x3800db=this['balloonPanelView'];if(_0x481931['_annotations']=_0x40a394,this['isAttached'])throw new _0xb7f752('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x481931,'set:container',()=>{this['detach'](),this['listenTo'](_0x481931,'change:container',_0x304126=>{_0x304126['off'](),this['attach'](_0x40a394);});}),_0x481931['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x367de5=_0x49c2a4=>{const _0x1bf1bf=new C(this['context']['locale']);_0x481931['addAnnotation'](_0x49c2a4,_0x1bf1bf),this['_annotationToNarrowView']['set'](_0x49c2a4,_0x1bf1bf),_0x1bf1bf['bind']('isDirty','annotationType','number')['to'](_0x49c2a4['view'],'isDirty','type','length'),_0x1bf1bf['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x3800db['content']['first']!==_0x49c2a4['view']?(this['_showBalloon'](_0x49c2a4),_0x49c2a4['view']['element']['focus'](),this['setActiveAnnotation'](_0x49c2a4)):this['setActiveAnnotation'](null);});};for(const _0x1fe18c of _0x40a394)_0x367de5(_0x1fe18c);this['listenTo'](_0x40a394,'add',(_0x320875,_0x1d453d)=>{_0x367de5(_0x1d453d);}),this['listenTo'](_0x40a394,'remove',(_0x123eea,_0x40a15e,_0x455c94)=>{this['_annotationToNarrowView']['get'](_0x40a15e)['destroy'](),this['_annotationToNarrowView']['delete'](_0x40a15e),_0x481931['rearrange']({'removedAnnotation':_0x40a15e,'previousAnnotation':_0x40a394['get'](_0x455c94-0x1),'nextAnnotation':_0x40a394['get'](_0x455c94+0x1)}),_0x40a15e===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x40a394,'focus',(_0xd3d174,_0x15cd9c)=>{this['setActiveAnnotation'](_0x15cd9c);}),this['listenTo'](_0x40a394,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x459b87,_0x6db4d8)=>{_0x6db4d8['keyCode']===_0x39b8ef['esc']&&_0x3800db['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x3800db['content']['first']),this['_hideBalloon'](),_0x6db4d8['stopPropagation'](),_0x6db4d8['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x19ac50,_0x34886)=>{const _0x24b231=_0x34886['target'];_0x3800db['isVisible']&&_0x3800db['element']['contains'](_0x24b231)||_0x481931['view']['element']['contains'](_0x24b231)||_0x19ac50['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x4d1e6d=>_0x4d1e6d['contains'](_0x24b231))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0xcd4e89=this['context']instanceof _0x2f39eb?this['context']['editors']:new _0x3c8425([this['context']]);for(const _0x3c3bc2 of _0xcd4e89)this['_integrateWithEditorAnnotations'](_0x3c3bc2);this['listenTo'](_0xcd4e89,'add',(_0x4e355f,_0x1af819)=>{this['listenTo'](_0x1af819,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1af819);});}),this['listenTo'](_0xcd4e89,'remove',(_0x3200b9,_0x4aebe8)=>{_0x4aebe8['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4aebe8['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x28eb0e){if(_0x28eb0e===this['activeAnnotation'])return;const _0x22ec2c=this['context']['plugins']['get'](z);if(_0x22ec2c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x28eb0e,'disableAnimationOnActivatedAnnotation':!0x0}),_0x28eb0e)_0x22ec2c['getSidebarItemView'](_0x28eb0e)?this['_showBalloon'](_0x28eb0e):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x28eb0e;}['detach'](){if(!this['isAttached'])throw new _0xb7f752('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x12ed2e=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x390618=>_0x390618['destroy']()),this['_annotationToNarrowView']['clear'](),_0x12ed2e['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2f39eb&&this['stopListening'](this['context']['editors']);for(const _0x25da06 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x25da06);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'](_0x1aef64){if(!_0x1aef64['plugins']['has']('EditorAnnotations'))return;const _0x4be8e1=_0x1aef64['plugins']['get']('EditorAnnotations'),_0x5d59df=this['context']['plugins']['get'](z),_0x1a0fa2=this['annotations'],_0x1859f8=this['balloonPanelView'],_0x104ff0=()=>{const _0x2c92f0=_0x4be8e1['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2c92f0),this['setActiveAnnotation'](_0x2c92f0[0x0]||null);};this['listenTo'](_0x4be8e1,'refresh',_0x104ff0),this['listenTo'](_0x4be8e1,'blur',(_0x4d5545,{isAnnotationTracked:_0x4225b3})=>{this['activeAnnotation']&&_0x4225b3(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4be8e1,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x1a0fa2,'blur',_0x467000=>{_0x4be8e1['hasDomSelection']()&&_0x467000['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x49d177,_0x45b930)=>{const _0x46e899=_0x45b930['target'];_0x1859f8['isVisible']&&_0x1859f8['element']['contains'](_0x46e899)||_0x5d59df['view']['element']['contains'](_0x46e899)||this['activeAnnotation']&&_0x4be8e1['hasDomSelection']()&&(_0x104ff0(),_0x49d177['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4be8e1);}['_destroyEditorAnnotationsIntegration'](_0xf183c6){_0xf183c6&&(this['stopListening'](_0xf183c6),this['_editorAnnotations']['remove'](_0xf183c6));}['_setSelectedAnnotations'](_0x67fa2b){for(const _0x23c0a6 of this['_selectedAnnotations'])_0x67fa2b['includes'](_0x23c0a6)||this['_manuallyClosedAnnotationViews']['delete'](_0x23c0a6['view']);this['_selectedAnnotations']=_0x67fa2b;}['_refreshPositioning'](){const _0x311a5b=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x311a5b['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x2ad1bb){if(this['_manuallyClosedAnnotationViews']['has'](_0x2ad1bb['view']))return;const _0x4b1368=this['balloonPanelView']['content']['first'];_0x4b1368!==_0x2ad1bb['view']?(_0x4b1368&&this['_detachListeners'](_0x4b1368),this['_attachListeners'](_0x2ad1bb['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x2ad1bb['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x81fc4d=this['balloonPanelView']['content']['first'],_0x1b9a2a=_0x81fc4d&&this['annotations']['getByView'](_0x81fc4d);if(!_0x1b9a2a||!this['_annotationToNarrowView']['has'](_0x1b9a2a))return;const _0x570939=this['_annotationToNarrowView']['get'](_0x1b9a2a)['element'],_0x1dd64a=(function(){const _0x494dae=_0x3f2722['defaultPositions'];return[_0x494dae['southArrowNorthEast'],_0x494dae['northArrowSouthEast'],_0x494dae['southArrowNorth'],_0x494dae['northArrowSouth'],_0x494dae['southArrowNorthWest'],_0x494dae['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x570939,'positions':_0x1dd64a});}['_hideBalloon'](){const _0xc08cf7=this['balloonPanelView'],_0x36b6de=_0xc08cf7['content']['first'];_0x36b6de&&(this['_detachListeners'](_0x36b6de),_0xc08cf7['unpin'](),_0xc08cf7['content']['clear']());}['_attachListeners'](_0x213837){this['listenTo'](_0x213837,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x213837,'Esc',(_0x2903c9,_0x381711)=>{this['_manuallyClosedAnnotationViews']['add'](_0x213837),this['_hideBalloon'](),_0x381711();});}['_detachListeners'](_0x515f9f){this['stopListening'](_0x515f9f);}}class c extends _0x48bfeb{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x1a8a04,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x477b4c){super(_0x477b4c),_0x477b4c['editing']['view']['addObserver'](_0x584d78),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x477b4c['plugins']['get'](_0x1a8a04),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x406a04=this['editor']['plugins']['get'](j);_0x406a04['context']===this['editor']&&(_0x406a04['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x535cd8,_0x2949da)=>{const _0x25edb0=this['_balloon'];if(this['isAttached']&&_0x25edb0['visibleView']){const _0x18a5f0=this['annotations']['getByView'](_0x25edb0['visibleView']);_0x18a5f0&&this['_closeAnnotation'](_0x18a5f0),_0x2949da();}}));}['afterInit'](){const _0x2342bf=this['editor']['plugins']['get'](j);_0x2342bf['context']===this['editor']&&(_0x2342bf['hasActive']()||_0x2342bf['switchTo']('inline'));}['setActiveAnnotation'](_0x17b14c){_0x17b14c!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x17b14c&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x17b14c)&&this['_addAnnotationToBalloon'](_0x17b14c,!0x0),_0x17b14c['isActive']=!0x0),_0x17b14c||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x17b14c);}['attach'](_0x40f455){this['annotations']=_0x40f455;const _0xad2e71=this['editor']['plugins']['get'](j),_0x498182=this['_balloon'];if(this['isAttached'])throw new _0xb7f752('inlineannotations-attach-already-attached',this);if(_0xad2e71['context']!==this['editor'])throw new _0xb7f752('inlineannotations-not-allowed-with-context',this);const _0x185619=this['editor']['plugins']['get'](b);this['listenTo'](_0x185619,'refresh',()=>{const _0x12ab09=_0x185619['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x2f3da9,_0x26498f;!this['_forceRefresh']&&(_0x2f3da9=_0x12ab09,_0x26498f=this['_selectedAnnotations'],_0x2f3da9['length']===_0x26498f['length']&&_0x2f3da9['every'](_0x55a18e=>_0x26498f['includes'](_0x55a18e)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x12ab09),this['setActiveAnnotation'](_0x12ab09[0x0]||null));}),this['listenTo'](_0x185619,'blur',(_0x178acd,{isAnnotationTracked:_0x3c8af9})=>{this['activeAnnotation']&&_0x3c8af9(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x34a15d,_0x22abc0,_0x315572)=>{_0x315572||this['setActiveAnnotation'](null);}),this['listenTo'](_0x40f455,'remove',(_0x126c08,_0x503f8e)=>{this['_removeAnnotationFromBalloon'](_0x503f8e),_0x503f8e===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x498182,'change:visibleView',(_0x9bffe1,_0x5eeb15,_0x4f342c,_0x22e866)=>{_0x22e866&&this['stopListening'](_0x22e866);const _0xf32a92=_0x40f455['getByView'](_0x4f342c);_0x4f342c&&_0xf32a92&&(this['listenTo'](_0x4f342c,'change:height',()=>{_0x498182['updatePosition']();}),this['listenTo'](_0x4f342c,'Esc',()=>{this['_closeAnnotation'](_0xf32a92),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0xf32a92&&this['setActiveAnnotation'](_0xf32a92));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x498182['visibleView']&&(_0x40f455['getByView'](_0x498182['visibleView'])&&_0x498182['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 _0xb7f752('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0xfecb22 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0xfecb22);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x514700){for(const _0x3d2290 of this['_selectedAnnotations'])_0x514700['includes'](_0x3d2290)||this['_manuallyClosed']['delete'](_0x3d2290);for(const _0x3da9ef of this['annotations'])_0x514700['includes'](_0x3da9ef)||this['_removeAnnotationFromBalloon'](_0x3da9ef);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x432271 of _0x514700)this['_addAnnotationToBalloon'](_0x432271);}this['_selectedAnnotations']=_0x514700;}['_addAnnotationToBalloon'](_0x44e8de,_0x20706a=!0x1){this['_manuallyClosed']['has'](_0x44e8de)||(this['_addedAnnotations']['has'](_0x44e8de)||this['_balloon']['hasView'](_0x44e8de['view'])||(this['_addedAnnotations']['add'](_0x44e8de),this['_balloon']['add']({'stackId':_0x44e8de['view']['id'],'view':_0x44e8de['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x44e8de)}})),_0x20706a&&this['_balloon']['showStack'](_0x44e8de['view']['id']));}['_getBalloonTargetForAnnotation'](_0xf9a756){const _0x5b72a5=_0xf9a756['target'],_0x4ff2e5=this['editor']['editing']['view'],_0x5e8477=_0x4ff2e5['document']['selection']['getFirstRange'](),_0x1db26b=_0x4ff2e5['domConverter']['viewRangeToDom'](_0x5e8477);if(_0x1db26b['collapse'](!0x0),_0x5b72a5){if(_0x5b72a5 instanceof _0x3e90cd)return _0x5b72a5;let _0x2c9013=[];for(const _0x29ea80 of _0x5b72a5)_0x2c9013['push'](...F(_0x29ea80['getClientRects']()));_0x2c9013=function(_0x16828a){const _0x1d39a5=[];let _0x57be6a=_0x16828a[0x0];for(let _0x5a21b2=0x1;_0x5a21b2<_0x16828a['length'];_0x5a21b2++)P(_0x57be6a,_0x16828a[_0x5a21b2])?_0x57be6a['width']+=_0x16828a[_0x5a21b2]['width']:(_0x1d39a5['push'](_0x57be6a),_0x57be6a=_0x16828a[_0x5a21b2]);return _0x1d39a5['push'](_0x57be6a),_0x1d39a5;}(_0x2c9013);const _0x36546b=_0x1db26b['getBoundingClientRect']();return _0x2c9013['find'](_0x14a990=>_0x14a990['top']<=_0x36546b['top']&&_0x14a990['bottom']>=_0x36546b['bottom']&&_0x14a990['left']<=_0x36546b['left']&&_0x14a990['right']>=_0x36546b['right'])||_0x2c9013[0x0];}return _0xf9a756['targetRect']||_0x1db26b;}['_removeAnnotationFromBalloon'](_0x28bd9f){this['_addedAnnotations']['has'](_0x28bd9f)&&this['_balloon']['hasView'](_0x28bd9f['view'])&&(this['_addedAnnotations']['delete'](_0x28bd9f),this['_balloon']['remove'](_0x28bd9f['view']));}['_closeAnnotation'](_0x40d6d8){this['_manuallyClosed']['add'](_0x40d6d8),this['_removeAnnotationFromBalloon'](_0x40d6d8);}}function F(_0x3174ad){return Array['from'](_0x3174ad)['map'](DOMRect['fromRect']);}function P(_0x5070cc,_0x4fa880){return _0x5070cc['top']===_0x4fa880['top']&&_0x5070cc['bottom']===_0x4fa880['bottom']&&_0x5070cc['right']===_0x4fa880['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x136f76,_0x33a133){super(_0x136f76),this['set']('isEmpty',!_0x33a133['length']),this['focusTracker']=new _0x2070b8(),this['_annotationViews']=_0x33a133,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x2a7d1c({'focusables':_0x33a133,'focusTracker':this['focusTracker']}),this['listenTo'](_0x33a133,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x33a133,'remove',(_0x415701,_0xb4c49b)=>{_0xb4c49b['isActive']&&this['focus'](),_0x33a133['length']||(this['isEmpty']=!0x0);});const _0x4b4834=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x136f76,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x33a133},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x4b4834['if']('isEmpty','ck-hidden',_0x5ab4ec=>!_0x5ab4ec)]},'children':[{'text':N(_0x136f76,'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 _0x1579a9 of this['_annotationViews'])this['focusTracker']['add'](_0x1579a9['element']);this['_annotationViews']['on']('change',(_0x5352b0,{added:_0x3adfd6,removed:_0x1e1654})=>{for(const _0x2a68fb of _0x3adfd6)this['focusTracker']['add'](_0x2a68fb['element']);for(const _0x3af033 of _0x1e1654)this['focusTracker']['remove'](_0x3af033['element']);});}}class p extends _0x6c42d0{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x446431){super(_0x446431),this['archivedThreads']=new _0x3c8425();}['init'](){const _0x308912=this['context'],_0x3cd0f9=_0x308912['plugins']['get'](o),_0x25176b=_0x308912['plugins']['get'](y);this['listenTo'](_0x3cd0f9,'addCommentThread',(_0x43f024,{threadId:_0x4f1945})=>{const _0x56557d=_0x3cd0f9['getCommentThread'](_0x4f1945);_0x56557d['archivedAt']&&this['archivedThreads']['add'](_0x56557d,this['_calculatePosition'](_0x56557d['archivedAt'])),this['listenTo'](_0x56557d,'change:archivedAt',(_0x4d76a7,_0x5ed03e,_0x5df5eb)=>{_0x5df5eb?this['archivedThreads']['has'](_0x56557d)||this['archivedThreads']['add'](_0x56557d,this['_calculatePosition'](_0x56557d['archivedAt'])):this['archivedThreads']['has'](_0x56557d)&&this['archivedThreads']['remove'](_0x56557d);});}),this['listenTo'](_0x3cd0f9,'removeCommentThread',(_0x28ad95,{threadId:_0x4dc260})=>{const _0x8151e2=_0x3cd0f9['getCommentThread'](_0x4dc260);this['stopListening'](_0x8151e2),this['archivedThreads']['has'](_0x8151e2)&&this['archivedThreads']['remove'](_0x8151e2);},{'priority':'highest'}),this['listenTo'](_0x25176b['collection'],'focus',(_0x5d6597,_0x3ace29)=>{_0x3ace29['isVisible']||(_0x3ace29['isActive']=!0x0,_0x25176b['activate'](_0x3ace29));});}['_calculatePosition'](_0xb836a8){const _0x4e01b3=[...this['archivedThreads']]['findIndex'](_0x50e02b=>_0x50e02b['archivedAt']<_0xb836a8);return _0x4e01b3>-0x1?_0x4e01b3:this['archivedThreads']['length'];}}class a extends _0x48bfeb{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x3c6c5d];}constructor(_0x266241){super(_0x266241),this['annotationViews']=new _0x20b7d7(),this['_pendingThreads']=[];}['init'](){const _0x145b1e=this['editor'],_0x592253=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x145b1e['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x52b512,!0x0)),_0x145b1e['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0xa952e=this['_createCommentsArchiveButton'](_0x13493c);return _0xa952e['set']({'role':'menuitemcheckbox'}),_0xa952e;});const _0x415a01=_0x145b1e['plugins']['get'](p),_0x5d5605=_0x145b1e['plugins']['get']('Annotations'),_0x4c5705=_0x145b1e['plugins']['get']('CommentsRepository');_0x415a01['archivedThreads']['forEach'](_0x5ca2e0=>{this['_handleNewThread'](_0x5ca2e0);}),this['listenTo'](_0x415a01['archivedThreads'],'add',(_0x570dce,_0xfc0d0a)=>{this['_handleNewThread'](_0xfc0d0a);}),this['listenTo'](_0x5d5605['collection'],'add',(_0xcf08b8,_0x18db34)=>{const _0x558bff=this['_pendingThreads']['find'](_0x44eab4=>{const _0x20ac82=_0x4c5705['_threadToController']['get'](_0x44eab4);return _0x20ac82&&_0x18db34['innerView']===_0x20ac82['view'];});if(_0x558bff){const _0x1beed1=this['_calculatePosition'](_0x558bff['archivedAt']);this['annotationViews']['add'](_0x18db34['view'],_0x1beed1),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x558bff),0x1);}}),this['listenTo'](_0x415a01['archivedThreads'],'remove',(_0x2887d9,_0x238c3c)=>{const _0x588556=_0x145b1e['config']['get']('collaboration.channelId');if(!_0x588556||_0x238c3c['channelId']===_0x588556){if(this['_pendingThreads']['includes'](_0x238c3c))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x238c3c),0x1);else{const _0x3eacf5=_0x4c5705['_threadToController']['get'](_0x238c3c),_0x1cecd1=_0x5d5605['getByInnerView'](_0x3eacf5['view']);this['annotationViews']['remove'](_0x1cecd1['view']),this['stopListening'](_0x1cecd1['focusableElements']);}}}),this['listenTo'](_0x5d5605['collection'],'add',(_0x12e8a4,_0x41ef86)=>{this['listenTo'](_0x41ef86,'escape',_0x592253);}),this['listenTo'](_0x5d5605['collection'],'remove',(_0x436a38,_0x56d3c9)=>{this['stopListening'](_0x56d3c9,'escape',_0x592253);});}['_handleNewThread'](_0x46702b){const _0x148613=this['editor']['plugins']['get']('CommentsRepository'),_0x228134=this['editor']['plugins']['get']('Annotations'),_0x25acc1=this['editor']['config']['get']('collaboration.channelId');if(!_0x25acc1||_0x46702b['channelId']===_0x25acc1){const _0x2f26bd=_0x148613['_threadToController']['get'](_0x46702b);if(!_0x2f26bd)return void this['_pendingThreads']['push'](_0x46702b);const _0x2ae9ee=this['_calculatePosition'](_0x46702b['archivedAt']),_0x5e163b=_0x228134['getByInnerView'](_0x2f26bd['view']);_0x5e163b['isVisible']&&_0x228134['_visibleAnnotations']['remove'](_0x5e163b),this['annotationViews']['add'](_0x5e163b['view'],_0x2ae9ee);}}['_calculatePosition'](_0x531267){const _0x286c98=this['editor']['config']['get']('collaboration.channelId'),_0xed6f86=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x4fba3e=>_0x4fba3e['channelId']===_0x286c98)['findIndex'](_0x35f10f=>_0x35f10f['archivedAt']<_0x531267);return _0xed6f86<0x0||_0xed6f86>this['annotationViews']['length']?this['annotationViews']['length']:_0xed6f86-0x1;}['_toggleDialog'](){const _0x32bed2=this['editor'],_0x49f5cc=_0x32bed2['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x32bed2['locale'],this['annotationViews'])),'commentsArchive'===_0x49f5cc['id']?_0x49f5cc['hide']():_0x49f5cc['show']({'id':'commentsArchive','title':N(_0x32bed2['locale'],'COMMENTS_ARCHIVE'),'icon':_0x23771b,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x4ff308['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x3fb4e1,_0x46fe35=!0x1){const _0xf8a6a4=this['editor']['locale'],_0x59f38b=this['editor']['plugins']['get']('Dialog'),_0xf0a73f=new _0x3fb4e1(_0xf8a6a4);return _0xf0a73f['bind']('isEnabled')['to'](this,'isEnabled'),_0xf0a73f['bind']('isOn')['to'](_0x59f38b,'id',_0x324acc=>'commentsArchive'===_0x324acc),_0xf0a73f['set']({'label':N(_0xf8a6a4,'COMMENTS_ARCHIVE'),'icon':_0x23771b,'isToggleable':!0x0}),_0x46fe35&&(_0xf0a73f['tooltip']=!0x0),this['listenTo'](_0xf0a73f,'execute',()=>this['_toggleDialog']()),_0xf0a73f;}['_hideDialogOnAnnotationEscape']=_0x52c0e6=>{const _0x56a7e5=_0x52c0e6['source'];if(!this['annotationViews']['has'](_0x56a7e5['view']))return;const _0xa47832=this['editor']['plugins']['get']('Dialog');_0xa47832['isOpen']&&'commentsArchive'===_0xa47832['id']&&(_0xa47832['hide'](),_0x52c0e6['stop']());};}class gi extends _0x48bfeb{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x4bc116,ContextPlugin as _0x233d6c,PendingActions as lt,Command as _0x4767a3,Plugin as _0x369f89,Context as _0xfa5877}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0xc146ee,uid as _0x14e8de,KeystrokeHandler as Et,FocusTracker as _0x4d6aaa,diff as _0x408359,Collection as _0x717f3a,Rect as _0x5199db,CKEditorError as _0x53bd93,first as _0x186871,priorities as jt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x131473,keyCodes as _0x47c1fd}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x4d02d1,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x1a1e3b,trimHtml as _0x5d2391,LateFocusDropdownButtonView as _0x57b99d,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x1a0347}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x4eaf0d}from'es-toolkit/compat';import{IconUndo as _0x3a1128,IconCheck as _0x8cd7ec,IconPencil as _0x232ade,IconRemoveComment as _0x98440c,IconThreeVerticalDots as _0x44ff5f,IconAddComment as _0x3f02ea,IconCommentsArchive as _0x4cd35c}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as xt,FocusCycler as _0x169d91,ButtonView as _0x528043,ViewCollection as _0x50b2a9,createDropdown as _0x4285f7,ListView as _0x5430e6,focusChildOnDropdownOpen as _0x19ec69,ListItemView as _0x46dc41,MenuBarMenuListItemButtonView as _0x4cb2be,BodyCollection as _0x3ae690,BalloonPanelView as _0x5547e8,ContextualBalloon as _0x2878d2,Dialog as _0x46d5e2,DialogViewPosition as _0x3abbff}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as qt,enableViewPlaceholder as St,MouseObserver as _0xe25f58}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as zt,ClipboardMarkersUtils as Pt,ClipboardPipeline as kt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Bt,ShiftEnter as Gt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Jt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Kt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Lt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Mt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x4e758c}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x420e56}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0xc146ee(){['model'];['view'];constructor(_0x199f41,_0x3adc7f){super(),this['model']=_0x199f41,this['model']['_isAttached']=!0x0,this['view']=_0x3adc7f,this['listenTo'](_0x3adc7f,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x3adc7f,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x3adc7f,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x3adc7f,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x3adc7f,'addComment',(_0x5cf29f,_0x115133)=>this['addComment'](_0x115133)),this['listenTo'](_0x3adc7f,'updateComment',(_0x132897,_0x476899,_0x569005)=>this['updateComment'](_0x476899,_0x569005)),this['listenTo'](_0x3adc7f,'removeComment',(_0x9c63f3,_0x3e0c07)=>this['removeComment'](_0x3e0c07));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0xb777e1){this['model']['addComment']({'content':_0xb777e1,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x3d8b80,_0x563871){this['model']['getComment'](_0x3d8b80)['update']({'content':_0x563871});}['removeComment'](_0x436bf0){this['model']['getComment'](_0x436bf0)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x2d55b2,_0x206e69,_0x430e57){const t=_0x2d55b2['t'];switch(_0x206e69){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'},_0x430e57);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'},_0x430e57);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'},_0x430e57);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'},_0x430e57);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x430e57);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'},_0x430e57);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'},_0x430e57);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'},_0x430e57);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 Wt extends Xt{['main'];['editable'];constructor(_0x4c5710,_0x33647a){super(_0x4c5710);const _0x44f26d=_0x14e8de();this['main']=this['createCollection'](),this['editable']=new $t(_0x4c5710,_0x33647a,void 0x0,{'label':()=>N(_0x4c5710,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4c5710['uiLanguageDirection'],'lang':_0x4c5710['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x44f26d},'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(_0x54c474){super(_0x54c474),this['view']=new Wt(_0x54c474['locale'],_0x54c474['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x5f214a=this['editor']['editing']['view'],_0x2e12fe=this['view']['editable'],_0x49b232=_0x5f214a['document']['getRoot']();_0x2e12fe['name']=_0x49b232['rootName'],this['view']['render']();const _0x2dcdc1=_0x2e12fe['element'];this['setEditableElement'](_0x2e12fe['name'],_0x2dcdc1),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x5f214a['attachDomRoot'](_0x2dcdc1),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[zt,Bt,Gt,Jt,Kt,Lt,Mt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0xc146ee(_0x4bc116){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x74cc63={}){function _0x5d3567(_0x2a8e0b){return _0x2a8e0b['map'](_0x5238d3=>String['fromCharCode'](_0x5238d3))['join']('');}(_0x74cc63=Object['assign']({},_0x74cc63))['plugins']||(_0x74cc63['plugins']=Rt['defaultPlugins']),super(_0x74cc63),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[_0x5d3567([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x5d3567([0x76,0x69,0x65,0x77])][_0x5d3567([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x5d3567([0x61,0x75,0x74,0x6f]),this[_0x5d3567([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x5d3567([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x5d3567([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x5d3567([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x5d3567([0x6f,0x6b])});}['create'](){const _0x4e175c=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x4e175c))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x35a6e0=>{const _0x80f297=this['model']['document']['getRoot'](),_0x3908e0=_0x80f297&&_0x80f297['getChild'](_0x80f297['childCount']-0x1);_0x35a6e0['setSelection'](_0x3908e0,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x2a1f18=this['editing']['view'],_0x19f323=_0x2a1f18['document']['getRoot'](),_0x4daf3a=_0x19f323['getChild'](0x0);_0x19f323['childCount']>0x1||!_0x4daf3a||'p'!=_0x4daf3a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(qt(_0x2a1f18,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4daf3a['placeholder']=this['placeholder']),St({'view':_0x2a1f18,'element':_0x4daf3a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4daf3a);}}class os extends xt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x49e8e8,_0x87b17c={}){super(_0x49e8e8),this['editor']=null,this['_editorConfig']=_0x87b17c,this['set']('value',_0x87b17c['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x49e8e8,'Reply...')),this['set']('submitLabel',N(_0x49e8e8,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new Et(),this['focusTracker']=new _0x4d6aaa(),this['focusCycler']=new _0x169d91({'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',(_0x4e9dd9,_0x1ee0c5)=>{this['cancelButtonView']['fire']('execute'),_0x1ee0c5();}),this['keystrokes']['set']('Ctrl+Enter',(_0x27b16a,_0x4ed63a)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x4ed63a());}),this['on']('submit',(_0x3effa1,_0xdda2d9)=>{_0xdda2d9['length']>0xfde8?(alert(N(_0x49e8e8,'TOO_LONG_COMMENT_ALERT',[_0xdda2d9['length'],0xfde8])),_0x3effa1['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new Rt(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x4aa2ac=this['editor'];this['element']['insertBefore'](_0x4aa2ac['ui']['element'],this['element']['firstChild']),_0x4aa2ac['model']['document']['on']('change',()=>this['value']=_0x4aa2ac['getData']()),_0x4aa2ac['bind']('placeholder')['to'](this),this['focusables']['add'](_0x4aa2ac['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x33d725){-0x1===_0x33d725?(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:_0x46ecf3}=this,_0x100869=new _0x528043(_0x46ecf3);return _0x100869['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x100869['withText']=!0x0,_0x100869['bind']('label')['to'](this,'submitLabel'),_0x100869['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x100869['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x3339bd,_0x126c12)=>!_0x126c12&&!!_0x3339bd['trim']()),_0x100869;}['_createCancelButton'](){const {locale:_0x2db314}=this,_0x14d083=new _0x528043(_0x2db314);return _0x14d083['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x14d083['label']=N(_0x2db314,'Cancel'),_0x14d083['withText']=!0x0,_0x14d083['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x14d083;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x10f059=>{this['focusTracker']['add'](_0x10f059['element']);}),this['focusables']['on']('change',(_0x1b6b3e,_0x1d1f31)=>{for(const _0x1f3961 of Array['from'](_0x1d1f31['added'])['reverse']())this['focusTracker']['add'](_0x1f3961['element']);});}}class ie extends xt{constructor(_0xe86984,_0x206463,_0x1821d){super(_0xe86984),this['commentInputView']=new os(_0xe86984,_0x1821d),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x46881c,_0x2a5df3)=>_0x46881c||!!_0x2a5df3),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 _0x4d02d1(_0xe86984,_0x206463),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'](_0x5b4993){this['commentInputView']['focus'](_0x5b4993);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x47dba4,_0x2df5bb)=>{const {submitButtonView:_0x3c4fab,cancelButtonView:_0x58fa16,editor:_0x55e0c1}=this['commentInputView'];[_0x3c4fab['element'],_0x58fa16['element'],_0x55e0c1?_0x55e0c1['editing']['view']['getDomRoot']():null]['filter'](_0x506369=>_0x506369)['some'](_0x21fd19=>_0x21fd19['contains'](_0x2df5bb['target']))||(this['focus'](),_0x2df5bb['preventDefault']());});}}class rs extends xt{constructor(_0x2c029b){super(_0x2c029b);const _0x44881f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x44881f['to']('count',_0x3a4c94=>N(_0x2c029b,'NUMBER_OF_COMMENTS',_0x3a4c94))}]});}}class te extends xt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x25e1aa,_0x39e7eb,_0x57aac1){super(_0x25e1aa);const _0x50b3e6=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x39e7eb['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x39e7eb,this['_config']=_0x57aac1,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x4d6aaa(),this['keystrokes']=new Et(),this['focusCycler']=new _0x169d91({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x419315=>this['commentViews']['map'](_0x2f0882=>_0x2f0882['element'])['includes'](_0x419315['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x25e1aa),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x5b1120=>_0x5b1120-this['_config']['maxCommentsWhenCollapsed']);for(const _0x158546 of _0x39e7eb['comments'])this['_handleNewCommentModel'](_0x158546);this['_handleInfoComment'](),this['listenTo'](_0x39e7eb['comments'],'add',(_0x20eef0,_0x2e5fc5)=>{const _0x3f4ee1=this['_calculatePosition'](_0x2e5fc5);this['length']++,this['_handleNewCommentModel'](_0x2e5fc5,_0x3f4ee1),this['refreshVisibleViews']();}),this['listenTo'](_0x39e7eb['comments'],'remove',(_0x305c1f,_0x1972ec)=>{this['length']--,this['_handleRemoveCommentModel'](_0x1972ec),this['refreshVisibleViews']();}),this['listenTo'](_0x39e7eb,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x39e7eb,'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',_0x50b3e6['if']('length','ck-hidden',_0x309bab=>!_0x309bab)],'aria-label':N(_0x25e1aa,'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'](_0x3b518c){-0x1===_0x3b518c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x2782ca of this['commentViews'])_0x2782ca['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x13a540,_0x3f3435){const _0x556395=new this['_config']['CommentView'](this['locale'],_0x13a540,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x556395['viewUid']=_0x13a540['id'],_0x556395['delegate']('removeComment')['to'](this),_0x556395['delegate']('updateComment')['to'](this),_0x556395['delegate']('resolveCommentThread')['to'](this),_0x556395['delegate']('editorReady')['to'](this),_0x556395['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x556395,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x556395,_0x3f3435);}['_calculatePosition'](_0x1422bf){const _0x1de627=this['_model']['_findOptimalIndex'](_0x1422bf);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x1422bf['authoredAt']?_0x1de627-0x1:_0x1de627:_0x1de627-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x1faf53={'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'],_0x1faf53,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x1faf53));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x465719){const _0x132288=this['commentViews']['remove'](_0x465719['id']);this['stopListening'](_0x132288),_0x132288['isEditMode']&&this['_updateHasDirtyComment'](),_0x132288['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x52928c=>_0x52928c['isEditMode']);}['_rearrangeCollapse'](){const _0x2fce59=function(_0x38dfb8){const _0x482998=new _0x717f3a();for(const _0x32c708 of _0x38dfb8)_0x482998['add'](_0x32c708);return _0x482998;}(this['commentViews']),_0x7565ae=this['_collapsedCommentsView']['count'];for(let _0x3fd0ac=0x1;_0x3fd0ac<=_0x7565ae;_0x3fd0ac++)_0x2fce59['remove'](0x1);for(const _0x3a3b5b of _0x2fce59)_0x3a3b5b['collapse']();_0x7565ae>0x0&&_0x2fce59['add'](this['_collapsedCommentsView'],0x1),ns(_0x408359(Array['from'](this['visibleViews']),Array['from'](_0x2fce59)),this['visibleViews'],_0x2fce59);}['_rearrangeExpand'](){ns(_0x408359(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x1b2723 of this['visibleViews'])_0x1b2723['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x1c9f20=>{this['focusTracker']['add'](_0x1c9f20['element']),this['keystrokes']['listenTo'](_0x1c9f20['element']);}),this['commentViews']['on']('change',(_0x3000e7,_0x4cefe7)=>{for(const _0x42464 of _0x4cefe7['removed'])this['focusTracker']['remove'](_0x42464['element']),this['keystrokes']['stopListening'](_0x42464['element']);for(const _0x38db49 of Array['from'](_0x4cefe7['added'])['reverse']())this['focusTracker']['add'](_0x38db49['element']),this['keystrokes']['listenTo'](_0x38db49['element']);});}}function ns(_0x1e9e24,_0x5727da,_0x3eeaed){let _0xf272d4=0x0;for(const _0x24b094 of _0x1e9e24)switch(_0x24b094){case'insert':_0x5727da['add'](_0x3eeaed['get'](_0xf272d4),_0xf272d4),_0xf272d4++;break;case'delete':_0x5727da['remove'](_0xf272d4);break;case'equal':_0xf272d4++;}}class oe extends xt{constructor(_0x289fff){super(_0x289fff);const _0x3c3e12=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x3c3e12['to']('contextValue',_0x2b62ce=>N(_0x289fff,'THREAD_CONTEXT_LABEL',_0x2b62ce)),'tabindex':-0x1},'children':[{'text':_0x3c3e12['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends xt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x168697,_0x48305a){super(_0x168697);const _0xb7d75d=this['bindTemplate'];this['_model']=_0x48305a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x4d6aaa(),this['keystrokes']=new Et(),this['focusCycler']=new _0x169d91({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x15e411=>!!_0x15e411),this['bind']('contextValue')['to'](this['_model'],'context',_0x9c8344=>_0x9c8344&&_0x9c8344['value']?this['_trimContextValue'](_0x9c8344['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',_0xb7d75d['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 _0x6fc933=new _0x528043(this['locale']);return _0x6fc933['label']=N(this['locale'],'Reopen'),_0x6fc933['tooltip']=N(this['locale'],'Reopen'),_0x6fc933['icon']=_0x3a1128,_0x6fc933['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1ed049=>!_0x1ed049),_0x6fc933['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x3d98c5,_0x436902)=>_0x3d98c5&&_0x436902),_0x6fc933['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x6fc933;}['_trimContextValue'](_0x594b84){if(_0x594b84['length']<0x96)return _0x594b84;const _0x610f9e=_0x594b84['lastIndexOf']('\x20',0x93);return _0x594b84['substring'](0x0,_0x610f9e>-0x1?_0x610f9e:0x93)+'...';}['_attachContextActions'](){const _0x396f96=this['element']['querySelector']('.ck-context'),_0x10c923=_0x396f96['querySelector']('.ck-context__value');this['listenTo'](_0x396f96,'mouseenter',()=>{_0x10c923['offsetWidth']<_0x10c923['scrollWidth']&&_0x396f96['classList']['add']('overlay');}),this['listenTo'](_0x396f96,'mouseleave',()=>{_0x396f96['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x1ff866 of this['focusables'])this['focusTracker']['add'](_0x1ff866['element']),this['keystrokes']['listenTo'](_0x1ff866['element']);}['_createContextView'](){const _0x19daa5=new oe(this['locale']);return _0x19daa5['bind']('contextValue')['to'](this),_0x19daa5;}}class si extends xt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5be2b7,_0xda838e,_0x2b2aa2,_0x33b496){super(_0x5be2b7),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xda838e,this['_localUser']=_0x2b2aa2,this['_config']=_0x33b496,this['commentThreadHeaderView']=new Yt(_0x5be2b7,_0xda838e),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x5be2b7,N(_0x5be2b7,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x5be2b7,_0xda838e,Object['assign']({'CommentView':this['_config']['CommentView']},_0x33b496)),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',(_0x4673e8,_0x17d5dc)=>_0x4673e8||!!_0x17d5dc),this['bind']('isUnlinked')['to'](_0xda838e,'unlinkedAt',_0x1b6d30=>!!_0x1b6d30),this['bind']('ariaLabel')['to'](this,'length',_0x2ec56d=>{const _0x2548ac=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x2ec56d,_0x2548ac]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x4d6aaa(),this['keystrokes']=new Et(),this['focusCycler']=new _0x169d91({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3c3f85=>_0x3c3f85['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),ts(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1355ed=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1b618e=_0x1355ed['commentInputView'];return _0x1355ed['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1b618e,'value',(_0x3f0038,_0x1a05b2,_0x47d722,_0x27f955,_0x378748)=>!!_0x378748||!!_0x27f955&&_0x47d722&&!_0x1a05b2||_0x3f0038&&_0x47d722&&!_0x1a05b2),_0x1b618e['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x570f25,_0x29d6f2,_0x37a654)=>{let _0x24ab7e;return _0x24ab7e=_0x37a654&&_0x29d6f2?'Reply\x20to\x20reopen\x20discussion...':_0x570f25?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x24ab7e);}),_0x1b618e['bind']('submitLabel')['to'](this,'length',_0x32fffe=>N(this['locale'],_0x32fffe?'Reply':'Comment')),_0x1b618e['on']('submit',(_0x4f1398,_0x36437c)=>{this['fire']('addComment',_0x36437c),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1b618e['on']('cancel',()=>{this['focus']();}),_0x1b618e['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1b618e['on']('cancel',_0x1537b5=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1537b5['stop']());}),this['on']('change:isActive',(_0x4a3b4b,_0x57fadf,_0x5689de)=>{_0x5689de||this['length']||_0x1b618e['value']||this['fire']('removeCommentThread');}),_0x1355ed;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x29609a,_0xb9b90b,_0x3aeea6,_0x4f0c0c){super(_0x29609a,_0xb9b90b,_0x3aeea6,_0x4f0c0c),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x29609a,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x574bb5,_0x1b307a,_0x3bb907)=>{_0x3bb907||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x448994,_0x833c84,_0x32fcbf)=>{_0x32fcbf&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x3a3a7c=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x3a3a7c['if']('isActive','ck-thread--active'),_0x3a3a7c['if']('isUnlinked','ck-thread--unlinked'),_0x3a3a7c['if']('isConfirm','ck-thread--remove-confirmation'),_0x3a3a7c['to']('actionIndicator',_0x34a20c=>_0x34a20c?'ck-thread--'+_0x34a20c:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x3a3a7c['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 _0x1ac45a of this['commentsListView']['commentViews'])_0x1ac45a['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x4b072a}=this,_0x202070=this['commentsListView']['commentViews']['get'](0x0);_0x202070===this['_boundFirstCommentView']||_0x202070['isSystemComment']||(this['_boundFirstCommentView']=_0x202070,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0x202070,'actionIndicator',_0x223519=>'remove'===_0x223519?'remove':null),_0x202070['placeholder']=N(_0x4b072a,'Write\x20a\x20comment...'),_0x202070['removeButton']['on']('execute',_0x5ead53=>{_0x5ead53['stop'](),this['showConfirm'](N(_0x4b072a,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0x202070['focus']();}),_0x202070['actionBar']['add'](this['resolveButton'],0x0),_0x202070['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x531da7=new _0x1a1e3b(this['locale']);return _0x531da7['label']=N(this['locale'],'Resolve'),_0x531da7['tooltip']=N(this['locale'],'Resolve'),_0x531da7['icon']=_0x8cd7ec,_0x531da7['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x531da7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5eb9c7=>!_0x5eb9c7),_0x531da7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x456e23,_0x211c53)=>_0x456e23&&!_0x211c53),_0x531da7['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x531da7;}['_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 es extends xt{constructor(_0x7598b9){super(_0x7598b9),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x73091d,_0x14580c,_0x16d839)=>{this['element']['innerHTML']=_0x16d839;}),this['element']['innerHTML']=this['content'];}}class di extends xt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x518dc1,_0x585e56,_0x47e5da){super(_0x518dc1),this['_model']=_0x585e56,this['_config']=_0x47e5da,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x585e56,'content',_0x585e56,'authoredAt',(_0x4a6267,_0x2f1a77)=>N(_0x518dc1,'COMMENT_ARIA_LABEL',[_0x585e56['author']['name'],_0x47e5da['formatDateTime'](_0x2f1a77),new DOMParser()['parseFromString'](_0x4a6267,'text/html')['body']['textContent'],_0x585e56['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x518dc1,N(_0x518dc1,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x50b2a9(),this['focusTracker']=new _0x4d6aaa(),this['keystrokes']=new Et(),this['focusCycler']=new _0x169d91({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4bc976=>_0x4bc976['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 _0x4226ec=new es(this['locale']);return _0x4226ec['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x2342e3,_0x5586ec)=>_0x5586ec?_0x5d2391(_0x2342e3,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x2342e3),_0x4226ec;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x46d6bd=new os(this['locale'],this['_config']['editorConfig']);return _0x46d6bd['value']=this['_model']['content'],_0x46d6bd['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x46d6bd['submitLabel']=N(this['locale'],'Save'),_0x46d6bd['on']('submit',(_0x397e8a,_0x13d76d)=>{this['fire']('updateComment',this['_model']['id'],_0x13d76d),this['switchToDisplayMode'](),this['focus']();}),_0x46d6bd['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x46d6bd['once']('editorReady',()=>{_0x46d6bd['focus']();}),_0x46d6bd['createEditor'](),_0x46d6bd['delegate']('editorReady')['to'](this),_0x46d6bd['delegate']('editorDestroyed')['to'](this),_0x46d6bd;}['_setupKeyboardNavigation'](){const _0x2843f0=this['element'];this['keystrokes']['listenTo'](_0x2843f0);for(const _0x5f4cce of this['focusables'])this['focusTracker']['add'](_0x5f4cce['element']),this['keystrokes']['listenTo'](_0x5f4cce['element']);this['focusables']['on']('change',(_0x5a8124,_0x2e2b60)=>{for(const _0x174937 of _0x2e2b60['removed'])this['focusTracker']['remove'](_0x174937['element']),this['keystrokes']['stopListening'](_0x174937['element']);for(const _0x4bd41f of _0x2e2b60['added'])this['focusTracker']['add'](_0x4bd41f['element']),this['keystrokes']['listenTo'](_0x4bd41f['element']);}),this['keystrokes']['set']('enter',(_0x562fba,_0x39e0f6)=>{_0x2843f0===_0x562fba['target']&&(this['focusCycler']['focusFirst'](),_0x39e0f6());}),this['keystrokes']['set']('esc',(_0x161a16,_0x42a735)=>{_0x2843f0!==_0x161a16['target']&&(this['focus'](),_0x42a735());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0xb83807,_0xd834b5,_0x5b479f){super(_0xb83807,_0xd834b5,_0x5b479f),this['set']('actionIndicator',null),this['set']('placeholder',N(_0xb83807,'Reply...')),this['bind']('authoredAt')['to'](_0xd834b5),this['bind']('resolvedAt')['to'](_0xd834b5),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 _0x4d02d1(_0xb83807,_0xd834b5['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0xd834b5,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x53563f=this['bindTemplate'],_0xd1ae18=[{'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':_0x53563f['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x53563f['to']('authoredAt',_0x3ef775=>this['_config']['formatDateTime'](_0x3ef775))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x53563f['if']('isEditMode','ck-comment__actions--hidden'),_0x53563f['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']&&_0xd1ae18['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x53563f['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x53563f['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x53563f['if']('isEditMode','ck-comment--edit'),_0x53563f['if']('isSystemComment','ck-comment--info'),_0x53563f['to']('actionIndicator',_0x1fd1d0=>_0x1fd1d0?'ck-comment--'+_0x1fd1d0:'')],'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':_0xd1ae18}]}]};}['_createEditButton'](){const _0x40cc85=new _0x528043(this['locale']);return _0x40cc85['label']=N(this['locale'],'Edit'),_0x40cc85['icon']=_0x232ade,_0x40cc85['withText']=!0x0,_0x40cc85['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x40cc85['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x803221=>!_0x803221),_0x40cc85['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x40cc85['on']('execute',()=>this['switchToEditMode']()),_0x40cc85;}['_createRemoveButton'](){const _0x2f26fa=new _0x528043(this['locale']);return _0x2f26fa['label']=N(this['locale'],'Remove'),_0x2f26fa['icon']=_0x98440c,_0x2f26fa['withText']=!0x0,_0x2f26fa['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x2f26fa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x5834d1=>!_0x5834d1),_0x2f26fa['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x2f26fa['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x2f26fa;}['_createDropdown'](){const _0x2a0c5d=_0x4285f7(this['locale'],_0x57b99d),_0x4918fe=_0x2a0c5d['panelView']['children'],_0x2901c4=new _0x5430e6(this['locale']),_0x313363=_0x2a0c5d['bindTemplate'];_0x19ec69(_0x2a0c5d,()=>this['items']['find'](_0x168fd6=>_0x168fd6['isVisible'])),_0x2a0c5d['extendTemplate']({'attributes':{'class':[_0x313363['if']('isVisible','ck-hidden',_0x8e098b=>!_0x8e098b)]}});const _0xefe914=(_0x1139e1,_0x171951=-0x1)=>{const _0x55a022=new _0x46dc41(this['locale']);_0x55a022['children']['add'](_0x1139e1);const _0x49a96c=_0x171951>-0x1?_0x171951:_0x2901c4['items']['length'];_0x2901c4['items']['add'](_0x55a022,_0x49a96c);const _0xdc1b45=Array['from'](this['items']);_0x2a0c5d['unbind']('isEnabled','isVisible'),_0x2a0c5d['bind']('isEnabled')['toMany'](_0xdc1b45,'isEnabled',(..._0x2ddeb7)=>_0x2ddeb7['some'](_0x1b0486=>_0x1b0486)),_0x2a0c5d['bind']('isVisible')['toMany'](_0xdc1b45,'isVisible',(..._0x58842f)=>_0x58842f['some'](_0x2a34ff=>_0x2a34ff));};_0x2a0c5d['panelPosition']='sw',_0x2a0c5d['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x44ff5f});for(const _0x20ecae of this['items'])_0xefe914(_0x20ecae);return _0x4918fe['add'](_0x2901c4),_0x2a0c5d['listenTo'](this['items'],'add',(_0x50ec8d,_0x2c5e37,_0x4df6b1)=>{_0xefe914(_0x2c5e37,_0x4df6b1);}),_0x2a0c5d['listenTo'](this['items'],'remove',(_0xff2850,_0x3d2476,_0x4eee19)=>{_0x2901c4['items']['remove'](_0x4eee19);}),_0x2a0c5d;}['_attachActions'](_0x262db4,_0x560df2){const _0x43c3fa=_0x262db4&&_0x262db4['element'];_0x43c3fa&&(this['listenTo'](_0x43c3fa,'mouseenter',()=>this['actionIndicator']=_0x560df2),this['listenTo'](_0x43c3fa,'focus',()=>this['actionIndicator']=_0x560df2),this['listenTo'](_0x43c3fa,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x43c3fa,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x58270e=super['_createCommentInputView']();return _0x58270e['bind']('placeholder')['to'](this),_0x58270e;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Vt(_0x2d9a8c){const _0x64e013=Dt(_0x2d9a8c,0x1e),_0x26c0b6=new MutationObserver(_0x1d12ca=>{for(const _0x179d82 of _0x1d12ca)('attributes'==_0x179d82['type']&&'class'==_0x179d82['attributeName']||'childList'==_0x179d82['type']||'characterData'==_0x179d82['type'])&&_0x64e013();});return{'attach'(_0x300a9a){_0x26c0b6['observe'](_0x300a9a,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x26c0b6['disconnect'](),_0x64e013['cancel']();}};}class E extends xt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x1e2864,_0x40e069){super(_0x1e2864),this['id']=_0x14e8de(),this['focusTracker']=new _0x4d6aaa(),this['keystrokes']=new Et(),this['keystrokes']['set']('Esc',(_0xc5c915,_0x1a4964)=>this['fire']('Esc',_0x1a4964)),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']=Vt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x40e069),this['mainView']=_0x40e069;const _0x4e81a9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x4e81a9['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 _0x44f4ef=this['element']['clientHeight'];_0x44f4ef&&(this['height']=_0x44f4ef);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0xc146ee(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x492c21,target:_0x2c8f16,type:_0x2a9660,isVisible:_0x12a309=!0x0}){super(),this['view']=_0x492c21,this['view']['element']||this['view']['render'](),this['_type']=_0x2a9660,this['_target']=_0x2c8f16,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x717f3a([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x293006,_0x72313a)=>{this['view']['focusTracker']['add'](_0x72313a);}),this['focusableElements']['on']('remove',(_0x37e1fe,_0x57a265)=>{this['view']['focusTracker']['remove'](_0x57a265);}),this['set']('isVisible',_0x12a309);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x2850d9=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x2850d9),_0x2850d9;}get['targetRect'](){const _0x5f3e57=this['target'];if(null===_0x5f3e57)return null;if(_0x5f3e57 instanceof _0x5199db)return _0x5f3e57;const _0x32caaa=_0x5f3e57['filter'](_0xad1432=>function(_0x565ce0){const _0x1e00b4=_0x565ce0['offsetParent'];if(_0x1e00b4)return!0x0;const _0x124ceb=_0x565ce0['getClientRects']()['item'](0x0);return!!_0x124ceb;}(_0xad1432));return 0x0===_0x32caaa['length']?null:new _0x5199db(_0x32caaa[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0xb01674){this['view']['isActive']=_0xb01674,this['view']['mainView']['isActive']=_0xb01674;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x334669){if(!(null===_0x334669||_0x334669 instanceof _0x5199db||Array['isArray'](_0x334669)&&_0x334669['every'](_0x12acc4=>fi(_0x12acc4))))throw new _0x53bd93('annotation-invalid-target',null,{'target':_0x334669});}['_getNormalizedTarget'](){const _0x50c4cf='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x50c4cf)?[_0x50c4cf]:_0x50c4cf;}}function fi(_0x334603){return null!==_0x334603&&'object'==typeof _0x334603&&'nodeType'in _0x334603&&0x1===_0x334603['nodeType'];}class S extends _0x717f3a{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x550c81=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x4d6aaa(),this['_focusTracker']['on']('change:isFocused',(_0xdaf659,_0x2abb49,_0x5601b8)=>{_0x5601b8||this['fire']('blur');});for(const _0x37cfb5 of _0x550c81)this['add'](_0x37cfb5);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x29e7e1){if(this['has'](_0x29e7e1))throw new _0x53bd93('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x29e7e1['innerView'],_0x29e7e1),this['_viewToAnnotation']['set'](_0x29e7e1['view'],_0x29e7e1);for(const _0x509ceb of _0x29e7e1['focusableElements'])this['_focusTracker']['add'](_0x509ceb);this['listenTo'](_0x29e7e1['focusableElements'],'add',(_0x2905e5,_0x5f443a)=>{this['_focusTracker']['add'](_0x5f443a);}),this['listenTo'](_0x29e7e1['focusableElements'],'remove',(_0x2dbdeb,_0x1959dc)=>{this['_focusTracker']['remove'](_0x1959dc);}),this['listenTo'](_0x29e7e1['view']['focusTracker'],'change:isFocused',(_0x198dea,_0xe1b92e,_0x37e683)=>{_0x37e683&&this['fire']('focus',_0x29e7e1);}),_0x29e7e1['updateTargetRect']();const _0x993ab2=this['_getOrderInContent'](_0x29e7e1['view']['targetRect']);return super['add'](_0x29e7e1,_0x993ab2);}['remove'](_0x39a19b){if(!this['has'](_0x39a19b))throw new _0x53bd93('annotationcollection-not-existing-item',null);this['stopListening'](_0x39a19b['view']['focusTracker']),this['stopListening'](_0x39a19b['focusableElements']);for(const _0xbe9672 of _0x39a19b['focusableElements'])this['_focusTracker']['remove'](_0xbe9672);return this['_viewToAnnotation']['delete'](_0x39a19b['view']),this['_innerViewToAnnotation']['delete'](_0x39a19b['innerView']),super['remove'](_0x39a19b);}['getByInnerView'](_0x3c7b5a){return this['_innerViewToAnnotation']['get'](_0x3c7b5a);}['getByView'](_0x4d8e79){return this['_viewToAnnotation']['get'](_0x4d8e79);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x17a3f9 of this)_0x17a3f9['updateTargetRect']();this['_sort']();}['_sort'](){const _0x30f7c4=Array['from'](this)['sort']((_0x2d3482,_0x2ba9b7)=>w(_0x2d3482['view']['targetRect'],_0x2ba9b7['view']['targetRect']));for(let _0x1c284f=_0x30f7c4['length']-0x1;_0x1c284f>0x0;_0x1c284f--){const _0x12b443=_0x30f7c4[_0x1c284f];_0x1c284f!==this['getIndex'](_0x12b443)&&(this['remove'](_0x12b443),this['add'](_0x12b443));}}['_getOrderInContent'](_0x12937f){let _0x5d0faa=0x0;if(!_0x12937f)return this['length'];for(const _0x1e3640 of this){const _0x6c9170=_0x1e3640['view']['targetRect'];if(_0x6c9170){if(w(_0x12937f,_0x6c9170)<0x0)return _0x5d0faa;_0x5d0faa++;}}return _0x5d0faa;}}function v({source:_0x52972d,target:_0x2ad5df,filter:_0x344927}){for(const _0x1564dd of _0x52972d)_0x344927(_0x1564dd)&&_0x2ad5df['add'](_0x1564dd);_0x2ad5df['listenTo'](_0x52972d,'add',(_0x41741c,_0x45d258)=>{_0x344927(_0x45d258)&&_0x2ad5df['add'](_0x45d258);}),_0x2ad5df['listenTo'](_0x52972d,'remove',(_0x26e042,_0x17e7e7)=>{_0x2ad5df['has'](_0x17e7e7)&&_0x2ad5df['remove'](_0x17e7e7);});}function w(_0x274f75,_0x45841e){if(null===_0x274f75&&null===_0x45841e)return 0x0;if(null===_0x274f75)return-0x1;if(null===_0x45841e)return 0x1;const _0x5649e1=_0x274f75['top']-_0x45841e['top'];return 0x0==_0x5649e1?_0x274f75['left']-_0x45841e['left']:_0x5649e1;}class y extends _0x233d6c{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2cd84f){if(super(_0x2cd84f),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2cd84f instanceof _0x4bc116){const _0x1a7069=_0x2cd84f['locale'];_0x2cd84f['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x1a7069,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x1a7069,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x1a7069,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x1a7069,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x1a7069,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x1a7069,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x1a7069,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x2f125b){this['collection']['add'](_0x2f125b);}['remove'](_0x208cb1){this['collection']['remove'](_0x208cb1),_0x208cb1['destroy']();}['refreshVisibility'](){for(const _0x287485 of this['collection'])_0x287485['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x1ece4f){return this['collection']['getByInnerView'](_0x1ece4f);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3c4acc of this['collection'])_0x3c4acc['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x47ab44){this['fire']('_activateAnnotation',_0x47ab44);}['createAnnotation'](_0x283daf){return new T(_0x283daf);}['createAnnotationView'](_0x21875f,_0x4ee169){return new E(_0x21875f,_0x4ee169);}['_addActiveAnnotation'](_0x278286){const _0x5ea751=new Set(this['activeAnnotations']);_0x5ea751['add'](_0x278286),this['activeAnnotations']=_0x5ea751;}['_removeActiveAnnotation'](_0x58a3bd){const _0x50db23=new Set(this['activeAnnotations']);_0x50db23['delete'](_0x58a3bd),this['activeAnnotations']=_0x50db23;}['_bindAnnotationsToVisibleAnnotations'](){const _0x31a277=this['collection'],_0x3d7dd8=this['_visibleAnnotations'];function _0x34fb5c(_0x4a4b1f){const _0x42d6b3=_0x4a4b1f['source'];_0x42d6b3['isVisible']&&!_0x3d7dd8['has'](_0x42d6b3)?_0x3d7dd8['add'](_0x42d6b3):!_0x42d6b3['isVisible']&&_0x3d7dd8['has'](_0x42d6b3)&&_0x3d7dd8['remove'](_0x42d6b3),_0x42d6b3['view']['focusTracker']['remove'](_0x42d6b3['view']['element']),_0x42d6b3['view']['focusTracker']['add'](_0x42d6b3['view']['element']);}this['listenTo'](_0x31a277,'add',(_0x16a282,_0x4612d7)=>{_0x4612d7['isVisible']&&_0x3d7dd8['add'](_0x4612d7),this['listenTo'](_0x4612d7,'change:isVisible',_0x34fb5c);}),this['listenTo'](_0x31a277,'remove',(_0x5bc2e8,_0x36c1a8)=>{_0x3d7dd8['has'](_0x36c1a8)&&_0x3d7dd8['remove'](_0x36c1a8),this['stopListening'](_0x36c1a8,'change:isVisible',_0x34fb5c);});}['_setupEnterAnnotationKeystroke'](){const _0x50a566=_0x2286a4=>{_0x2286a4['on']('ready',()=>{_0x2286a4['keystrokes']['set'](_0x4e758c,(_0x10077e,_0x2bfc8c)=>{const _0x4857b2=_0x186871(this['activeAnnotations']['values']());_0x4857b2&&(_0x4857b2['view']['focus'](),_0x2bfc8c());});});};this['context']instanceof _0x4bc116?_0x50a566(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x9fdf33,_0x50a10d)=>{_0x50a566(_0x50a10d);});}['_setupEscapeAnnotationHandling'](){const _0x3ad285=_0x3c6bcd=>{const _0x590908=_0x3c6bcd['source'],_0x5efb43=[];let _0x3c69af;if(Array['isArray'](_0x590908['target'])){_0x3c69af=_0x590908['target'][0x0],this['context']instanceof _0x4bc116?_0x5efb43['push'](this['context']):this['context']['editors']&&_0x5efb43['push'](...this['context']['editors']);for(const _0x4a65bc of _0x5efb43)for(const _0x361f6d of _0x4a65bc['editing']['view']['domRoots']['values']())if(_0x361f6d['contains'](_0x3c69af))return void _0x4a65bc['editing']['view']['focus']();_0x3c69af['focus']();}};this['listenTo'](this['collection'],'add',(_0x2eef5a,_0xfe9f4f)=>{this['listenTo'](_0xfe9f4f,'escape',_0x3ad285,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x351ce6,_0x33449c)=>{this['stopListening'](_0x33449c,'escape',_0x3ad285);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x233d6c{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51ebf1){super(_0x51ebf1),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x4078dd=this['context']['config'];_0x4078dd['define']('comments.maxCommentsWhenCollapsed',0x2),_0x4078dd['define']('comments.maxThreadTotalWeight',0x1f4),_0x4078dd['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x4078dd['define']('comments.CommentThreadView',gt),_0x4078dd['define']('comments.CommentView',Tt),_0x4078dd['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x10e920=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x46512a,_0x4ac55a)=>this['_addCommentThread'](_0x4ac55a)),this['on']('submitCommentThread',(_0x186b39,_0x8fd263)=>this['_submitCommentThread'](_0x8fd263)),this['on']('resolveCommentThread',(_0x5d8b2e,_0x29a40e)=>this['_resolveCommentThread'](_0x29a40e)),this['on']('resolveCommentThread',(_0x298fe4,_0xab3956)=>this['_updateActiveAnnotation'](_0xab3956),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x378495,_0x53405b)=>this['_reopenCommentThread'](_0x53405b)),this['on']('reopenCommentThread',(_0x36fb1a,_0x3b5678)=>this['_updateActiveAnnotation'](_0x3b5678),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x1536c3,_0x2514d6)=>this['_removeCommentThread'](_0x2514d6)),this['on']('updateCommentThread',(_0xcb121e,_0x5ccd54)=>this['_updateCommentThread'](_0x5ccd54)),this['on']('updateCommentThread',(_0x1a2be9,_0x312a7b)=>this['_updateActiveAnnotation'](_0x312a7b),{'priority':'lowest'}),this['on']('addComment',(_0x52f2b4,_0x22b225)=>this['_addComment'](_0x22b225)),this['on']('updateComment',(_0x2705e2,_0xfcba64)=>this['_updateComment'](_0xfcba64)),this['on']('removeComment',(_0x31382f,_0x54f4bc)=>this['_removeComment'](_0x54f4bc)),this['on']('addComment',(_0x4cfb33,{threadId:_0x1c6e30,isFromAdapter:_0x4fcbba})=>{if(_0x4fcbba)return;const _0x37fd9c=this['getCommentThread'](_0x1c6e30),_0x40fd78=_0x37fd9c&&this['_threadToController']['get'](_0x37fd9c);_0x40fd78&&_0x40fd78['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x10e920,'change:activeAnnotations',(_0x55b7c0,_0x2f943f,_0x4e9957)=>{const _0x44d0b4=Array['from'](_0x4e9957)['map'](_0x570775=>this['_viewToController']['get'](_0x570775['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x44d0b4?_0x44d0b4['model']:null;});}set['adapter'](_0x1ee10d){if(this['_adapter'])throw new _0x53bd93('commentsrepository-adapter-already-set');this['_adapter']=_0x1ee10d;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x552538=_t,threadId:_0x3872ae=_0x14e8de(),comments:_0x47d0ad=[],unlinkedAt:_0x176aaf=null,resolvedAt:_0x16cf03=null,resolvedBy:_0x3c445f=null,target:_0x3ec950=null,context:_0x48bebb=null,attributes:_0x542411={},isResolvable:_0x3597d1=!0x0,isSubmitted:_0x1ed92e=!0x1,isFromAdapter:_0x25bcf7=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x552538),{'channelId':_0x552538,'threadId':_0x3872ae,'comments':_0x47d0ad,'unlinkedAt':_0x176aaf,'resolvedAt':_0x16cf03,'resolvedBy':_0x3c445f,'target':_0x3ec950,'context':_0x48bebb,'attributes':_0x542411,'isFromAdapter':_0x25bcf7,'isResolvable':_0x3597d1,'isSubmitted':_0x1ed92e}),this['getCommentThread'](_0x3872ae);}['openNewCommentThread']({channelId:_0x1ece69=_t,threadId:_0xa0c652=_0x14e8de(),target:_0x39d7cd,context:_0x346432=null,isResolvable:_0xa18520=!0x0}){if(this['_readOnlyChannels']['has'](_0x1ece69)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x39d7cd)throw new _0x53bd93('commentsrepository-missing-target');const _0x369890=this['addCommentThread']({'channelId':_0x1ece69,'threadId':_0xa0c652,'target':_0x39d7cd,'context':_0x346432,'isResolvable':_0xa18520});if(!_0x369890)return null;const _0x1cd640=this['_threadToController']['get'](_0x369890),_0x4eb584=_0x1cd640['view']['commentThreadInputView']['commentInputView'],_0x2c488b=this['context']['plugins']['get'](y),_0xa8421e=_0x2c488b['getByInnerView'](_0x1cd640['view']);return _0x2c488b['activate'](_0xa8421e),_0x4eb584['once']('editorReady',()=>_0x4eb584['focus']()),_0x369890;}['hasCommentThread'](_0x2df7fd){if('string'!=typeof _0x2df7fd)throw new _0x53bd93('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x2df7fd);}['updateCommentThread']({channelId:_0xf55424=_t,threadId:_0x4e43cb,context:_0x183284,unlinkedAt:_0x7a60c1,attributes:_0x518a01,isFromAdapter:_0x4d9a3d=!0x1}){return this['fire'](Nt('updateCommentThread',_0xf55424),{'channelId':_0xf55424,'threadId':_0x4e43cb,'context':_0x183284,'unlinkedAt':_0x7a60c1,'attributes':_0x518a01,'isFromAdapter':_0x4d9a3d}),this['getCommentThread'](_0x4e43cb);}['getCommentThread'](_0x2353eb){if('string'!=typeof _0x2353eb)throw new _0x53bd93('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x2353eb);}['fetchCommentThread']({channelId:_0x3dcc0f,threadId:_0x3b6f1a}={}){const _0x46ba35=this['getCommentThread'](_0x3b6f1a);if(_0x46ba35)return Promise['resolve'](_0x46ba35);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x53bd93('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x3dcc0f,'threadId':_0x3b6f1a})['then'](_0x17fcdc=>this['hasCommentThread'](_0x3b6f1a)?this['getCommentThread'](_0x3b6f1a):_0x17fcdc?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x3dcc0f},_0x17fcdc)):void 0x0)['catch'](_0x10289f=>{throw console['error'](_0x10289f),new _0x53bd93('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x26e635,skipNotAttached:_0x549783=!0x1,skipEmpty:_0x5b8fe9=!0x1,toJSON:_0x296458=!0x1}={}){const _0xd20a72=[];for(const _0x18ccb9 of this['_threads']['values']())_0x26e635&&_0x18ccb9['channelId']!==_0x26e635||_0x549783&&!_0x18ccb9['isAttached']||_0x5b8fe9&&0x0===_0x18ccb9['length']||_0xd20a72['push'](_0x18ccb9);return _0x296458?_0xd20a72['map'](_0x1cf179=>_0x1cf179['toJSON']()):_0xd20a72;}['getAnnotationForCommentThread'](_0x109f9e){const _0x342abb=this['_threadToController']['get'](_0x109f9e);if(!_0x342abb)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x342abb['view'])||null;}['getCommentThreadForAnnotation'](_0x4993d8){const _0x4bcee8=this['_viewToController']['get'](_0x4993d8['innerView']);return _0x4bcee8?_0x4bcee8['model']:null;}['setActiveCommentThread'](_0x28d600){const _0x556293=this['context']['plugins']['get'](y);if(!_0x28d600)return void(this['activeCommentThread']&&_0x556293['deactivateAll']());const _0x13815c=this['getCommentThread'](_0x28d600);if(!_0x13815c)throw new _0x53bd93('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x28d600});if(!this['_threadToController']['has'](_0x13815c))throw new _0x53bd93('commentsrepository-active-not-attached',null,{'threadId':_0x28d600});const _0x55a1b9=_0x556293['getByInnerView'](this['_threadToController']['get'](_0x13815c)['view']);_0x556293['activate'](_0x55a1b9);}['switchReadOnly'](_0x553548,_0x422b4f){_0x553548?this['_readOnlyChannels']['add'](_0x422b4f):this['_readOnlyChannels']['delete'](_0x422b4f),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x2830e5){return this['_readOnlyChannels']['has'](_0x2830e5)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x5aab15,_0x33ce3b){return new vt(_0x5aab15,_0x33ce3b);}['setPermissions'](_0x36a955,_0x1e1101=_t){this['_permissions']['set'](_0x1e1101,_0x36a955),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0xabf0e7=_t){return this['_permissions']['has'](_0xabf0e7)?this['_permissions']['get'](_0xabf0e7):bt;}['_addCommentThread']({channelId:_0x584969,threadId:_0x40e741,comments:_0x4a2880,unlinkedAt:_0x5e4619,resolvedAt:_0x587265,resolvedBy:_0x4f0199,target:_0x14d69c,context:_0x507c07,attributes:_0x2929a6,isFromAdapter:_0x244153,isResolvable:_0x30c7a7,isSubmitted:_0x3ec007}){if('string'!=typeof _0x40e741)throw new _0x53bd93('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x40e741});if(this['hasCommentThread'](_0x40e741))throw new _0x53bd93('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x40e741});const _0x43433c=new pi(this,{'channelId':_0x584969,'id':_0x40e741,'context':_0x507c07,'attributes':_0x2929a6,'unlinkedAt':_0x5e4619,'resolvedAt':_0x587265,'resolvedBy':_0x4f0199?this['context']['plugins']['get'](it)['getUser'](_0x4f0199):null,'isResolvable':_0x30c7a7,'isSubmitted':_0x3ec007||_0x244153});this['_threads']['set'](_0x40e741,_0x43433c);for(const _0x2c61eb of _0x4a2880)_0x43433c['_add'](this['_createNewComment']({'threadId':_0x40e741,..._0x2c61eb}));return _0x14d69c&&_0x43433c['attachTo'](_0x14d69c),_0x244153||!_0x43433c['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x584969,'threadId':_0x40e741});}['_submitCommentThread']({channelId:_0x181d3f,threadId:_0x3bdcb2}){if(!this['hasCommentThread'](_0x3bdcb2))throw new _0x53bd93('commentsrepository-missing-comment-thread',this);const _0x440c1c=this['getCommentThread'](_0x3bdcb2);if(_0x440c1c['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5bc5ad,comments:_0x1d9b12,resolvedAt:_0x83cdf2,resolvedBy:_0x36c17a,context:_0x4b95c7,attributes:_0x3ad2f2}=_0x440c1c,_0x5a07be=this['context']['plugins']['get']('PendingActions'),_0x28e93c=_0x5a07be['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x181d3f,'threadId':_0x5bc5ad,'comments':_0x1d9b12['map'](_0x473ea3=>_0x473ea3['toJSON']()),'resolvedAt':_0x83cdf2,'resolvedBy':_0x36c17a?_0x36c17a['id']:_0x36c17a,'context':_0x4b95c7,'attributes':_0x3ad2f2})['then'](({comments:_0x353c95})=>{_0x5a07be['remove'](_0x28e93c);for(const _0x26d995 of _0x353c95)this['_updateComment']({'channelId':_0x181d3f,'threadId':_0x3bdcb2,'commentId':_0x26d995['commentId'],'createdAt':_0x26d995['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x39ed39=>{throw console['error'](_0x39ed39),new _0x53bd93('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x5cb187,target:_0x391002}){const _0xa0db96=this['getCommentThread'](_0x5cb187);if(!_0xa0db96)throw new _0x53bd93('commentsrepository-attach-missing-comment-thread',this);const _0x314472=this['context']['plugins']['get']('PendingActions'),_0x302447=this['context']['plugins']['get'](y),_0x4a86bb=this['_createCommentThreadView'](_0xa0db96),_0xb38b5f=new vt(_0xa0db96,_0x4a86bb);let _0x4c5c5b=null;_0x4a86bb['on']('change:isDirty',(_0x480ec0,_0x2f9e1f,_0x40a607)=>{_0x40a607?_0x4c5c5b=_0x314472['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4c5c5b&&(_0x314472['remove'](_0x4c5c5b),_0x4c5c5b=null);}),this['_threadToController']['set'](_0xa0db96,_0xb38b5f),this['_viewToController']['set'](_0x4a86bb,_0xb38b5f);const _0x339f8e=new E(this['context']['locale'],_0x4a86bb);_0x339f8e['bind']('length')['to'](_0x4a86bb),_0x339f8e['bind']('isDirty')['to'](_0x4a86bb,'isDirty',_0x4a86bb,'length',(_0x2ec73f,_0x85ff19)=>_0x2ec73f||!_0x85ff19),_0x339f8e['bind']('isActive')['to'](_0x4a86bb),_0x339f8e['type']='comment';const _0x10731d=new T({'view':_0x339f8e,'target':_0x391002,'type':'comment','isVisible':!_0xa0db96['archivedAt']&&!!('function'==typeof _0x391002?_0x391002():_0x391002)});return _0x4a86bb['on']('escape',()=>{_0x10731d['fire']('escape');}),this['_bindAnnotationToEditors'](_0x4a86bb,_0x10731d),_0x302447['add'](_0x10731d),_0x10731d;}['_bindAnnotationToEditors'](_0x599ad2,_0x41e83){this['listenTo'](_0x599ad2,'editorReady',(_0x1cd5e9,_0xb640de)=>{const _0x42e89b=_0xb640de['ui']['view']['body']['bodyCollectionContainer'];_0x41e83['focusableElements']['add'](_0x42e89b),this['context']instanceof _0x4bc116&&this['context']['ui']['focusTracker']['add'](_0x42e89b);},{'priority':'highest'}),this['listenTo'](_0x599ad2,'editorDestroyed',(_0x2c0367,_0x150bf5)=>{const _0x1b615b=_0x150bf5['ui']['view']['body']['bodyCollectionContainer'];_0x41e83['focusableElements']['has'](_0x1b615b)&&_0x41e83['focusableElements']['remove'](_0x1b615b),this['context']instanceof _0x4bc116&&this['context']['ui']['focusTracker']['remove'](_0x1b615b);});}['_unbindEditors'](_0x287077){this['stopListening'](_0x287077,'editorReady'),this['stopListening'](_0x287077,'editorDestroyed');}['_createCommentThreadView'](_0x205323){const _0xdeeb30=this['context']['plugins']['get'](it),{config:_0x300d19,locale:_0x58230c}=this['context'],_0x16041d=pt(_0x300d19['get']('locale'),_0x58230c);return new(0x0,(_0x300d19['get']('comments'))['CommentThreadView'])(_0x58230c,_0x205323,_0xdeeb30['me'],{'editorConfig':{..._0x300d19['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x300d19['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x300d19['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x300d19['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x300d19['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x16041d,'CommentView':_0x300d19['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2f95f7,channelId:_0x495e9e,resolvedAt:_0x4575dc,resolvedBy:_0xedbed2,isFromAdapter:_0x54c958}){if(!this['hasCommentThread'](_0x2f95f7))throw new _0x53bd93('commentsrepository-missing-comment-thread',null,{'threadId':_0x2f95f7});const _0x3d043b=this['getCommentThread'](_0x2f95f7);if(_0x3d043b['isResolved'])throw new _0x53bd93('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2f95f7});const _0x1fbd1e=this['context']['plugins']['get'](it);if(_0x3d043b['resolvedBy']=_0x1fbd1e['getUser'](_0xedbed2),_0x3d043b['resolvedAt']=_0x4575dc,_0x54c958||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x5c0822=this['context']['plugins']['get']('PendingActions'),_0x3caf9e=_0x5c0822['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x495e9e,'threadId':_0x2f95f7})['then'](({resolvedAt:_0x106ad6,resolvedBy:_0x591cc9})=>{_0x5c0822['remove'](_0x3caf9e),_0x3d043b['resolvedBy']['id']!==_0x591cc9&&(_0x3d043b['resolvedBy']=_0x1fbd1e['getUser'](_0x591cc9)),_0x3d043b['resolvedAt']=_0x106ad6;})['catch'](_0x24c0f7=>{throw console['error'](_0x24c0f7),new _0x53bd93('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x192ee8,channelId:_0x5d58ae,isFromAdapter:_0x600fcb}){if(!this['hasCommentThread'](_0x192ee8))throw new _0x53bd93('commentsrepository-missing-comment-thread',null,{'threadId':_0x192ee8});const _0x4e5c7b=this['getCommentThread'](_0x192ee8);if(!_0x4e5c7b['isResolved'])throw new _0x53bd93('commentsrepository-reopen-comment-thread',null,{'threadId':_0x192ee8});if(_0x4e5c7b['resolvedBy']=null,_0x4e5c7b['resolvedAt']=null,_0x600fcb||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2b4b7f=this['context']['plugins']['get']('PendingActions'),_0x3adff7=_0x2b4b7f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5d58ae,'threadId':_0x192ee8})['then'](()=>_0x2b4b7f['remove'](_0x3adff7))['catch'](_0x480bc2=>{throw console['error'](_0x480bc2),new _0x53bd93('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2b23ba,isFromAdapter:_0x2c2b6a}){const _0x4b56e1=this['getCommentThread'](_0x2b23ba);if(!_0x4b56e1)throw new _0x53bd93('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2b23ba),this['_threads']['delete'](_0x2b23ba),!_0x4b56e1['isSubmitted']||_0x2c2b6a||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x1462f2=this['context']['plugins']['get']('PendingActions'),{channelId:_0x595abe}=_0x4b56e1,_0x45dcba=_0x1462f2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x595abe,'threadId':_0x2b23ba})['then'](()=>_0x1462f2['remove'](_0x45dcba))['catch'](_0x5d77f9=>{throw console['error'](_0x5d77f9),new _0x53bd93('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x2b71fe,unlinkedAt:_0x52a9cb,context:_0x79ea15,attributes:_0xaccb44,isFromAdapter:_0x4b14e7}){if('string'!=typeof _0x2b71fe)throw new _0x53bd93('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x2b71fe});if(!this['hasCommentThread'](_0x2b71fe))throw new _0x53bd93('commentsrepository-missing-comment-thread',null,{'threadId':_0x2b71fe});const _0x21bee2=this['getCommentThread'](_0x2b71fe);let _0x4a294c=!0x1;if(void 0x0!==_0x79ea15&&_0x21bee2['context']!==_0x79ea15&&(_0x21bee2['context']=_0x79ea15,_0x4a294c=!0x0),void 0x0!==_0x52a9cb&&_0x21bee2['unlinkedAt']!==_0x52a9cb&&(_0x21bee2['unlinkedAt']=_0x52a9cb,_0x4a294c=!0x0),_0xaccb44&&!At(_0xaccb44,_0x21bee2['attributes'])&&(_0x21bee2['attributes']=_0xaccb44,_0x4a294c=!0x0),!_0x4a294c)return Promise['resolve']();if(!_0x21bee2['isSubmitted']||_0x4b14e7||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2908d0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2c01d6}=_0x21bee2,_0x5dd243=_0x2908d0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2c01d6,'threadId':_0x2b71fe,'context':_0x79ea15,'unlinkedAt':_0x52a9cb,'attributes':_0xaccb44})['then'](()=>_0x2908d0['remove'](_0x5dd243))['catch'](_0x21eedc=>{throw console['error'](_0x21eedc),new _0x53bd93('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x1c3f95){const _0x437575=this['context']['plugins']['get'](y),_0x395875=this['getCommentThread'](_0x1c3f95);if(_0x395875['_isAttached']=!0x1,this['_threadToController']['has'](_0x395875)){const _0x804bdd=this['_threadToController']['get'](_0x395875),_0x436ecc=_0x804bdd['view'],_0x484a24=_0x437575['getByInnerView'](_0x436ecc);this['_threadToController']['delete'](_0x395875),this['_viewToController']['delete'](_0x436ecc),_0x484a24&&_0x437575['remove'](_0x484a24),_0x804bdd['destroy'](),_0x436ecc['destroy']()['then'](()=>{this['_unbindEditors'](_0x436ecc);});}}['_updateActiveAnnotation']({threadId:_0x44f943,resolvedAt:_0x52685d,unlinkedAt:_0x146b2f}){const _0x28e310=!!_0x52685d,_0x448a04=this['context']['plugins']['get'](y),_0x512eb6=this['getCommentThread'](_0x44f943);if(this['_threadToController']['has'](_0x512eb6)){const _0x55919e=this['_threadToController']['get'](_0x512eb6)['view'],_0x2435c9=_0x448a04['getByInnerView'](_0x55919e);_0x2435c9&&(_0x28e310&&_0x448a04['_removeActiveAnnotation'](_0x2435c9),_0x146b2f?_0x2435c9['isVisible']=!0x1:_0x2435c9['refreshVisibility']());}}['_getExternalAuthor'](_0x119ea2){const _0x2f9ae5=this['context']['plugins']['get'](it),_0x2bfd24=It('external:'+_0x119ea2),_0x2eb075=_0x2f9ae5['getUser'](_0x2bfd24);return _0x2eb075||_0x2f9ae5['addUser']({'id':_0x2bfd24,'name':_0x119ea2});}['_createNewComment']({threadId:_0xfc8fb6,commentId:_0x222470=_0x14e8de(),content:_0x28aa3c,authorId:_0x159237,createdAt:_0x358aae,attributes:_0x127325}){if('string'!=typeof _0x222470)throw new _0x53bd93('commentsrepository-invalid-commentid');if('string'!=typeof _0x159237)throw new _0x53bd93('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x28aa3c||!_0x28aa3c['trim']())throw new _0x53bd93('commentsrepository-invalid-comment-content');const _0x4cfa20=this['context']['plugins']['get'](it)['getUser'](_0x159237);if(!_0x4cfa20)throw new _0x53bd93('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x159237});let _0xfefd52=null,_0x52d717=_0x358aae;return _0x127325?.['@external']&&(_0xfefd52=this['_getExternalAuthor'](_0x127325['@external']['authorName']),_0x52d717=new Date(_0x127325['@external']['createdAt'])),new wi(this,{'threadId':_0xfc8fb6,'id':_0x222470,'author':_0xfefd52||_0x4cfa20,'creator':_0x4cfa20,'content':_0x28aa3c,'createdAt':_0x358aae,'authoredAt':_0x52d717,'attributes':_0x127325});}['_addComment'](_0x48f332){let {threadId:_0x20f6d0,content:_0x5074f4,attributes:_0x44147a,isFromAdapter:_0x49fe39}=_0x48f332;const _0x5b5dce=this['getCommentThread'](_0x48f332['threadId']);if(!_0x5b5dce)throw new _0x53bd93('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x13428f=this['_createNewComment'](_0x48f332),{id:_0x1a2e9f}=_0x13428f;if(_0x5b5dce['_add'](_0x13428f),_0x49fe39||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x5b5dce['isSubmitted'])return Promise['resolve']();const _0x503919=this['context']['plugins']['get']('PendingActions'),{channelId:_0x49f70b}=_0x5b5dce,_0x278b40=_0x503919['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x44147a||(_0x44147a={}),this['adapter']['addComment']({'channelId':_0x49f70b,'threadId':_0x20f6d0,'commentId':_0x1a2e9f,'content':_0x5074f4,'attributes':_0x44147a})['then'](_0x49f59e=>{_0x503919['remove'](_0x278b40),_0x49f59e&&this['_updateComment']({'channelId':_0x49f70b,'threadId':_0x20f6d0,'commentId':_0x1a2e9f,'createdAt':_0x49f59e['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x20aa7c=>{throw console['error'](_0x20aa7c),new _0x53bd93('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x4656a4,commentId:_0x239157,content:_0x2559d4,createdAt:_0x24b60b,attributes:_0x3ddf66,isFromAdapter:_0x5e46c9}){if(void 0x0!==_0x2559d4&&('string'!=typeof _0x2559d4||!_0x2559d4['trim']()['length']))throw new _0x53bd93('commentsrepository-update-comment-invalid-content');const _0x57439f=this['getCommentThread'](_0x4656a4),_0x56a29c=_0x57439f['getComment'](_0x239157);if(!_0x56a29c)throw new _0x53bd93('commentsrepository-update-missing-comment',this);let _0x5c1649=!0x1;if(_0x2559d4&&_0x2559d4!==_0x56a29c['content']&&(_0x56a29c['isEditable']||_0x5e46c9)&&(_0x56a29c['content']=_0x2559d4,_0x5c1649=!0x0),_0x24b60b&&_0x24b60b!==_0x56a29c['createdAt']&&(_0x56a29c['createdAt']=_0x24b60b,_0x56a29c['attributes']&&_0x56a29c['attributes']['@external']||(_0x56a29c['authoredAt']=_0x24b60b),_0x5c1649=!0x0),_0x3ddf66&&!At(_0x3ddf66,_0x56a29c['attributes'])&&(_0x56a29c['attributes']=_0x3ddf66,_0x5c1649=!0x0),!_0x5c1649)return Promise['resolve']();if(_0x57439f['fire']('commentUpdated'),_0x5e46c9||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x3224f2=this['context']['plugins']['get']('PendingActions'),{channelId:_0xc099}=this['getCommentThread'](_0x56a29c['threadId']),_0x973675=_0x3224f2['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0xc099,'threadId':_0x4656a4,'commentId':_0x239157,'content':_0x2559d4,'attributes':_0x3ddf66})['then'](()=>_0x3224f2['remove'](_0x973675))['catch'](_0x2a45e9=>{throw console['error'](_0x2a45e9),new _0x53bd93('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x426ac3,commentId:_0x1157c4,isFromAdapter:_0x56e8cc}){const _0x16f33c=this['getCommentThread'](_0x426ac3),_0x1c638a=_0x16f33c['getComment'](_0x1157c4);if(!_0x1c638a)throw new _0x53bd93('commentsrepository-remove-missing-comment',this);if(_0x16f33c['_remove'](_0x1c638a),_0x56e8cc||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x2c2c23=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3fc0d8}=_0x16f33c,_0x122a9f=_0x2c2c23['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3fc0d8,'threadId':_0x426ac3,'commentId':_0x1157c4})['then'](()=>_0x2c2c23['remove'](_0x122a9f))['catch'](_0x254efe=>{throw console['error'](_0x254efe),new _0x53bd93('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0xc146ee(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x30ac86,_0x110ee6){super();const _0x418b7f=_0x110ee6['isResolvable'];this['channelId']=_0x110ee6['channelId'],this['id']=_0x110ee6['id'],this['comments']=new _0x717f3a(),this['_repository']=_0x30ac86,this['_isAttached']=!0x1,this['_isSubmitted']=_0x110ee6['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x30ac86,'_permissions',_0x30ac86,'_readOnlyChannels',()=>_0x30ac86['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x30ac86,'_permissions',()=>_0x30ac86['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x30ac86,'_permissions',()=>{const _0x3a624f=_0x30ac86['getPermissions'](this['channelId']);return _0x3a624f['write']||_0x3a624f['admin'];}),this['bind']('isResolvable')['to'](_0x30ac86,'_permissions',()=>_0x418b7f&&_0x30ac86['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x110ee6['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x2838d5,_0x36027b)=>_0x2838d5?_0x36027b?_0x2838d5<_0x36027b?_0x2838d5:_0x36027b:_0x2838d5:_0x36027b),this['set']('unlinkedAt',_0x110ee6['unlinkedAt']||null),this['set']('resolvedAt',_0x110ee6['resolvedAt']||null),this['set']('resolvedBy',_0x110ee6['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0x34c201=>!!_0x34c201),this['set']('attributes',_0x110ee6['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x47de06,_0x4b19e2)=>_0x47de06+_0x4b19e2['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x503a73,id:_0x17948b}=this;this['_repository']['fire'](Nt('submitCommentThread',_0x503a73),{'channelId':_0x503a73,'threadId':_0x17948b});}['setUnlinkedAt'](_0x57e39e){this['_update']({'unlinkedAt':_0x57e39e});}['resolve']({resolvedAt:_0x405804=new Date(),resolvedBy:_0x489a9d=null,isFromAdapter:_0x1def80=!0x1}={}){const _0x160102=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0xea70c9,id:_0x65d90a}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0xea70c9),{'channelId':_0xea70c9,'threadId':_0x65d90a,'resolvedAt':_0x405804,'resolvedBy':_0x489a9d||_0x160102['id'],'isFromAdapter':_0x1def80});}['reopen']({isFromAdapter:_0x10a465=!0x1}={}){const {channelId:_0x1bc146,id:_0x21f8d3}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x1bc146),{'channelId':_0x1bc146,'threadId':_0x21f8d3,'isFromAdapter':_0x10a465});}['setContext'](_0x5e521c){this['context']||this['_update']({'context':_0x5e521c});}['setAttribute'](_0x517a6d,_0x8f888a){const _0xfdb5bb=wt(this['attributes']);yt(_0xfdb5bb,_0x517a6d,_0x8f888a),this['_update']({'attributes':_0xfdb5bb});}['removeAttribute'](_0x51cb87){const _0x59e457=wt(this['attributes']);Ct(_0x59e457,_0x51cb87),this['_update']({'attributes':_0x59e457});}['remove']({isFromAdapter:_0x3ca49f=!0x1}={}){const {channelId:_0x420ebf,id:_0x493ebb}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x420ebf),{'channelId':_0x420ebf,'threadId':_0x493ebb,'isFromAdapter':_0x3ca49f});}['attachTo'](_0x100666){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x100666});}['addComment'](_0x3f3dda){const {channelId:_0x44610f,id:_0x347ea4}=this;this['_repository']['fire'](Nt('addComment',_0x44610f,_0x347ea4),Object['assign']({'channelId':_0x44610f,'threadId':_0x347ea4},_0x3f3dda));}['getComment'](_0xdd05c5){if('string'!=typeof _0xdd05c5)throw new _0x53bd93('commentsrepository-get-comment-invalid-id',null,{'commentId':_0xdd05c5});return this['comments']['get'](_0xdd05c5);}['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'](_0x113042=>_0x113042['toJSON']()),'attributes':this['attributes']};}['_add'](_0x3e7789){return this['listenTo'](_0x3e7789,'change:authoredAt',()=>{const _0x3998de=this['_findOptimalIndex'](_0x3e7789),_0x26294c=this['comments'];_0x3998de-0x1!=_0x26294c['getIndex'](_0x3e7789)&&_0x3998de+0x1!=_0x26294c['getIndex'](_0x3e7789)&&(this['_remove'](_0x3e7789),this['_add'](_0x3e7789));}),this['comments']['add'](_0x3e7789,this['_findOptimalIndex'](_0x3e7789));}['_update'](_0x548704){const {channelId:_0x423949,id:_0x5003a9}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x423949),{..._0x548704,'channelId':_0x423949,'threadId':_0x5003a9});}['_remove'](_0x2865cf){return this['stopListening'](_0x2865cf),_0x2865cf['destroy'](),this['comments']['remove'](_0x2865cf);}['_findOptimalIndex'](_0x3a939a){const _0x29b986=this['comments']['find'](_0x3feb56=>new Date(_0x3feb56['authoredAt'])['getTime']()>new Date(_0x3a939a['authoredAt'])['getTime']());return _0x29b986?this['comments']['getIndex'](_0x29b986):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0xc146ee(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x544961,_0x421b99){super();const _0x688651=_0x544961['context']['plugins']['get'](it)['me'],_0x422fe1=_0x544961['getCommentThread'](_0x421b99['threadId']),_0x36a1f8=0x0===_0x422fe1['comments']['length'],_0x3a7251=_0x688651===_0x421b99['author'];this['id']=_0x421b99['id'],this['threadId']=_0x421b99['threadId'],this['author']=_0x421b99['author'],this['creator']=_0x421b99['creator'],this['isExternal']=Boolean(_0x421b99['attributes']&&_0x421b99['attributes']['@external']),this['set']('content',_0x421b99['content']),this['createdAt']=_0x421b99['createdAt']||new Date(),this['set']('authoredAt',_0x421b99['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x422fe1,'resolvedAt'),this['set']('attributes',_0x421b99['attributes']||{}),this['bind']('isEditable')['to'](_0x544961,'_permissions',()=>{const _0x38b12d=_0x544961['getPermissions'](_0x422fe1['channelId'])['write'],_0x10f44c=_0x544961['getPermissions'](_0x422fe1['channelId'])['modifyAll'];return _0x3a7251&&_0x38b12d||!_0x3a7251&&_0x10f44c;}),this['bind']('isRemovable')['to'](_0x422fe1,'isRemovable',_0x544961,'_permissions',_0x5d9b92=>{const _0x4d3f65=_0x544961['getPermissions'](_0x422fe1['channelId'])['write'],_0x54a575=_0x544961['getPermissions'](_0x422fe1['channelId'])['modifyAll'];return _0x3a7251&&_0x4d3f65||_0x5d9b92&&_0x36a1f8||!_0x3a7251&&_0x54a575&&!_0x36a1f8;}),this['bind']('isReadOnly')['to'](_0x422fe1,'isReadOnly'),this['_repository']=_0x544961;}get['weight'](){return Math['max'](function(_0x3f2d08){const _0x2eab5c=document['createElement']('div');return _0x2eab5c['innerHTML']=_0x3f2d08,_0x2eab5c['textContent']['length'];}(this['content']),0xc8);}['update'](_0x1ac49d){const {threadId:_0x54ee80,id:_0x40ea12}=this;if(!this['_repository']['hasCommentThread'](_0x54ee80))throw new _0x53bd93('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x229c9c}=this['_repository']['getCommentThread'](_0x54ee80);this['_repository']['fire'](Nt('updateComment',_0x229c9c,_0x54ee80),{'channelId':_0x229c9c,'threadId':_0x54ee80,'commentId':_0x40ea12,..._0x1ac49d});}['setAttribute'](_0x4b3bfb,_0x1b28d1){const _0x4abff0=wt(this['attributes']);yt(_0x4abff0,_0x4b3bfb,_0x1b28d1),this['update']({'attributes':_0x4abff0});}['removeAttribute'](_0x4c0648){const _0x52932f=wt(this['attributes']);Ct(_0x52932f,_0x4c0648),this['update']({'attributes':_0x52932f});}['remove'](_0x33093b={}){if(!_0x33093b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x100627,id:_0x3aeddf}=this;if(!this['_repository']['hasCommentThread'](_0x100627))throw new _0x53bd93('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x363db0}=this['_repository']['getCommentThread'](_0x100627);this['_repository']['fire'](Nt('removeComment',_0x363db0,_0x100627),{'channelId':_0x363db0,'threadId':_0x100627,'commentId':_0x3aeddf,..._0x33093b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0xbaa797,..._0x2733c4){for(const _0x4e1a87 of _0x2733c4)void 0x0!==_0x4e1a87&&(_0xbaa797+=':'+String(_0x4e1a87));return _0xbaa797;}class ot extends _0x4767a3{constructor(_0x12c559){super(_0x12c559),this['set']('hasContent',!0x1);}['refresh'](){const _0x449100=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x1655e8 of _0x449100['getRanges']())if(this['_hasContent'](_0x1655e8))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x44f301=_0x14e8de(),ranges:_0x1dda61,comment:_0x28f6c8}={}){const _0x4a81a5=this['editor']['model'],_0x465f4f=_0x1dda61??Array['from'](_0x4a81a5['document']['selection']['getRanges']()),_0x204aac=[];for(const _0x115386 of _0x465f4f)this['_hasContent'](_0x115386)&&_0x204aac['push'](this['_trimToContent'](_0x115386));if(!_0x204aac['length'])throw new _0x53bd93('addcommentthreadcommand-incorrect-ranges',null);_0x28f6c8&&this['_createCommentThread'](_0x44f301,_0x28f6c8),this['_createMarkersFromRanges'](_0x44f301,_0x204aac,!!_0x28f6c8);}['_createMarkersFromRanges'](_0x4c356d,_0x415d10,_0x59c8a3){this['editor']['model']['change'](_0x33bd19=>{for(const _0x34dd78 of _0x415d10){const _0x4ef12e=_0x14e8de()['substr'](0x1,0x5),_0x85e04f='comment:'+_0x4c356d+':'+_0x4ef12e;_0x33bd19['addMarker'](_0x85e04f,{'range':_0x34dd78,'usingOperation':_0x59c8a3,'affectsData':_0x59c8a3});}});}['_createCommentThread'](_0x4db010,_0x1d83e4){const _0x21e049=this['editor']['plugins']['get']('CommentsRepository'),_0x42c306=this['editor']['config']['get']('collaboration.channelId'),_0x539d1c=this['editor']['plugins']['get']('Users')['me'];if(!_0x539d1c)throw new _0x53bd93('addcommentthreadcommand-user-not-found',null);_0x21e049['addCommentThread']({'threadId':_0x4db010,'channelId':_0x42c306,'comments':[{'authorId':_0x539d1c['id'],'content':_0x1d83e4,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x4b6479){for(const _0x52dffc of _0x4b6479['getItems']())if(this['_itemIsContent'](_0x52dffc))return!0x0;return!0x1;}['_itemIsContent'](_0x4e97dc){return _0x4e97dc['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4e97dc)&&!_0x4e97dc['is']('element','tableCell');}['_trimToContent'](_0x3daa02){const _0x25f9b5=_0x1ac637=>!this['_itemIsContent'](_0x1ac637['item']),_0x48131c=_0x3daa02['start']['getLastMatchingPosition'](_0x25f9b5),_0x4fdfdf=_0x3daa02['end']['getLastMatchingPosition'](_0x25f9b5,{'direction':'backward'});return this['editor']['model']['createRange'](_0x48131c,_0x4fdfdf);}}class b extends _0x369f89{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x426a64){super(_0x426a64),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x41ad50=this['editor'],_0x3be5d6=_0x41ad50['model']['document']['selection'],_0x537597=_0x4eaf0d(()=>this['refreshSelectedViews'](),0xa);_0x3be5d6['on']('change:range',(_0x4ef4b5,_0x2fdefa)=>{_0x2fdefa['directChange']&&(_0x537597['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x41ad50['editing']['view']['document'],'change:isFocused',(_0x1f5a5a,_0x1c6d56,_0x280356)=>{_0x280356&&_0x537597();}),this['listenTo'](_0x41ad50['ui']['focusTracker'],'change:isFocused',(_0x6cd8da,_0x4aa004,_0x3cb772)=>{_0x3cb772||this['fire']('blur',{'isAnnotationTracked':_0xf90d29=>this['_editorAnnotationsData']['has'](_0xf90d29['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0xea42ea){if(this['_editorAnnotations']['has'](_0xea42ea['view']))return;this['_editorAnnotations']['add'](_0xea42ea['view']),this['editor']['ui']['focusTracker']['add'](_0xea42ea['view']['element']);const _0x5f42ff=this['editor']['plugins']['get'](y);this['listenTo'](_0x5f42ff['collection'],'remove',(_0x5575c9,_0x27e30b)=>{this['editor']['ui']['focusTracker']['remove'](_0x27e30b['view']['element']),this['_editorAnnotations']['delete'](_0x27e30b['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4b8319){if('function'!=typeof _0x4b8319)throw new _0x53bd93('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4b8319);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x85155c,annotations:_0x3edd67}){const _0x386b4c=[],_0x5264c8=this['editor']['model']['document']['selection'],_0x5ca672=Array['from'](_0x5264c8['getRanges']());for(const [_0x2979c4,_0x10d9e1]of this['_editorAnnotationsData']){const _0x244109=_0x4d71b4(_0x10d9e1),_0xa3643e=_0x3edd67['getByInnerView'](_0x2979c4);_0x244109&&_0xa3643e&&_0x386b4c['push']({'annotation':_0xa3643e,'range':_0x244109});}function _0x4d71b4(_0x56cd53){for(const _0x3c56c9 of _0x56cd53)for(const _0x593fdd of _0x5ca672)if(_0x3c56c9['containsRange'](_0x593fdd,!_0x5264c8['isCollapsed']))return _0x3c56c9;return null;}return _0x386b4c['sort']((_0x36fd24,_0xd88d98)=>{const _0x2b3ea1=_0x36fd24['range'],_0x480b72=_0xd88d98['range'];if(!_0x2b3ea1['isEqual'](_0x480b72)){if(_0x2b3ea1['containsRange'](_0x480b72,!0x0))return 0x1;if(_0x480b72['containsRange'](_0x2b3ea1,!0x0))return-0x1;}return _0x36fd24['annotation']==_0x85155c?-0x1:_0xd88d98['annotation']==_0x85155c?0x1:0x0;})['map'](_0x5f46d7=>_0x5f46d7['annotation']);}get['_editorAnnotationsData'](){const _0x5376aa=new Map();for(const _0x4c12cb of Array['from'](this['_dataCollectors']))for(const [_0x366fdf,_0x54be44]of _0x4c12cb())_0x5376aa['set'](_0x366fdf,_0x54be44);return _0x5376aa;}}class st extends _0x369f89{['afterInit'](){const _0x5a7eed=this['editor'];if(!_0x5a7eed['plugins']['has']('RestrictedEditingModeEditing'))return;_0x5a7eed['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x369f89{constructor(_0x1c5bf2){super(_0x1c5bf2),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x436d4f=this['editor'],_0x32b43b=_0x436d4f['commands']['get']('importWord'),_0xcc763=_0x436d4f['plugins']['get'](it);_0x32b43b&&(_0x32b43b['on']('execute',(_0x2cfd02,[,_0x3434b1])=>{_0x3434b1['collaboration_features']={'comments':!0x0,'user_id':_0xcc763['me']['id']};},{'priority':jt['high']+0xa}),this['listenTo'](_0x32b43b,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5d04e6,_0xb8c924){const {comment_threads:_0x20653a}=_0xb8c924;_0x20653a&&_0x20653a['forEach'](({thread_id:_0x2d5790,comments:_0x25e3d7,is_resolved:_0x1da4b2})=>{const _0x292b30=new Date(),_0x408114=_0x25e3d7['map'](({author:_0x30f86c,content:_0x1d5171,created_at:_0x38e40e})=>({'content':_0x1d5171,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x292b30,'attributes':{'@external':{'authorName':_0x30f86c,'createdAt':_0x38e40e?new Date(_0x38e40e):new Date(),'source':'importWord'}}})),_0x14c431=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x14c431,'threadId':_0x2d5790,'comments':_0x408114,'resolvedAt':_0x1da4b2?_0x292b30:null});});}}class at extends _0x369f89{constructor(_0x33093e){super(_0x33093e),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Pt,kt];}['afterInit'](){const _0x5ef265=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x5ef265,'contentInsertion',(_0x2f6b63,_0x4d202b)=>this['_removeMarkersWithoutThreads'](_0x4d202b['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x50aee6){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x50aee6;const _0x2c96b1=this['editor']['plugins']['get']('CommentsRepository');for(const _0x2936f3 of _0x50aee6['keys']()){const [_0x7c5dd1,_0x4958b9]=_0x2936f3['split'](':');'comment'!=_0x7c5dd1||_0x2c96b1['hasCommentThread'](_0x4958b9)||_0x50aee6['delete'](_0x2936f3);}return _0x50aee6;}['_registerMarkerInClipboardPipeline'](){const _0x424342=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x5f35b5=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x5f35b5&&_0x424342['_registerMarkerToCopy']('comment',_0x5f35b5);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x405e6e){switch(_0x405e6e){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x4687c3){const _0x553c6c=_0x4687c3['split'](':');return{'group':_0x553c6c[0x0],'id':_0x553c6c[0x1],'part':_0x553c6c[0x2]};}class ut extends _0x369f89{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x18d9b7,_0x3d3e96)=>{if(!_0x3d3e96['options']['showCommentHighlights'])return null;if(_0x3d3e96['options']['ignoreResolvedComments']){const {id:_0x273504}=ft(_0x18d9b7['markerName']),_0x23c1c1=this['editor']['plugins']['get'](o);if(_0x23c1c1['getCommentThread'](_0x273504)?.['isResolved']&&_0x18d9b7['item'])return _0x3d3e96['consumable']['consume'](_0x18d9b7['item'],'addMarker:'+_0x18d9b7['markerName']),_0x3d3e96['consumable']['consume'](_0x18d9b7['item'],'removeMarker:'+_0x18d9b7['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x1b2724=>{_0x1b2724['on']('addMarker:comment',(_0x2b0a2a,_0x3a6118,_0x27b200)=>{if(!_0x27b200['options']['showCommentHighlights'])return;const _0x18605e=_0x3a6118['item'];if(!_0x18605e)return;const _0x40f010=_0x27b200['mapper']['toViewElement'](_0x18605e);this['editor']['model']['schema']['isObject'](_0x18605e)&&_0x40f010&&!_0x40f010['getCustomProperty']('widget')&&_0x40f010['is']('containerElement')&&_0x420e56(_0x40f010,_0x27b200['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x2b2425,{writer:_0x5d96b3,options:_0xce9a88})=>{if(!_0xce9a88['showCommentHighlights'])return null;const _0x53a1e8=_0x5d96b3['createContainerElement']('div'),_0x2f93da=_0x5d96b3['createEmptyElement']('hr');return _0x5d96b3['addClass']('ck-horizontal-line',_0x53a1e8),_0x5d96b3['insert'](_0x5d96b3['createPositionAt'](_0x53a1e8,0x0),_0x2f93da),_0x53a1e8;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x49a16c,{writer:_0xad879c,options:_0x4f0875})=>{if(!_0x4f0875['showCommentHighlights'])return null;const _0x30a5ae=_0xad879c['createContainerElement']('span'),_0x499111=_0xad879c['createEmptyElement']('img');return _0xad879c['addClass']('image-inline',_0x30a5ae),_0xad879c['insert'](_0xad879c['createPositionAt'](_0x30a5ae,0x0),_0x499111),_0x30a5ae;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x43cfb4,{writer:_0x24fce4,options:_0x5bf28b})=>{if(_0x5bf28b['showCommentHighlights'])return _0x24fce4['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x2c9d47,_0x3b2310,_0xedf863)=>{_0xedf863['options']['showCommentHighlights']&&_0x2c9d47['stop']();},{'priority':'high'});}}class r extends _0x369f89{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(_0x58da9c){super(_0x58da9c),this['set']('isThreadsLoadingPaused',!0x0),_0x58da9c['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x5dff5b,_0x5d0d0b,_0x1196e4,_0x56cbd7)=>{const _0x3703f5=_0x58da9c['plugins']['get'](o),_0x1ff6bf=_0x1196e4?ft(_0x1196e4)['id']:null;_0x58da9c['model']['change'](()=>{if(_0x1ff6bf){const _0x34759d=this['getAllMarkersForId'](_0x1ff6bf);for(const _0x4c220a of _0x34759d)_0x58da9c['editing']['reconvertMarker'](_0x4c220a);}if(_0x56cbd7){const {id:_0x2f6982}=ft(_0x56cbd7),_0xd95d2b=_0x3703f5['getCommentThread'](_0x2f6982);if(_0xd95d2b&&_0xd95d2b['unlinkedAt'])return;if(_0xd95d2b&&!_0xd95d2b['isAttached'])return;const _0x1aa028=this['getAllMarkersForId'](_0x2f6982);for(const _0x519fe6 of _0x1aa028)_0x58da9c['editing']['reconvertMarker'](_0x519fe6);}}),_0x1ff6bf&&this['scrollToThreadMarker'](_0x1ff6bf);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x2dc63c=this['editor'],_0x1b23ef=_0x2dc63c['plugins']['get'](o),_0x5d9d3b=_0x2dc63c['config']['get']('collaboration.channelId'),_0x508f5d=_0x1b23ef['getCommentThreads']()['filter'](_0x3c1715=>_0x3c1715['channelId']!==_0x5d9d3b);_0x2dc63c['commands']['add']('addCommentThread',new ot(_0x2dc63c)),this['listenTo'](_0x2dc63c,'change:isReadOnly',(_0x200c9a,_0x56a064,_0x1067d8)=>{_0x1b23ef['switchReadOnly'](_0x1067d8,_0x2dc63c['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1b23ef,dt('addCommentThread',_0x5d9d3b),(_0x3fe5e0,{threadId:_0x8f1b0c})=>{const _0x268c8c=this['editor']['plugins']['get'](o)['getCommentThread'](_0x8f1b0c);_0x268c8c?.['unlinkedAt']&&this['_attachArchivedThread'](_0x8f1b0c);}),this['listenTo'](_0x1b23ef,dt('removeCommentThread',_0x5d9d3b),(_0x412ab0,{threadId:_0xda15f3})=>{_0x2dc63c['model']['enqueueChange']({'isUndoable':!0x1},_0xa37a95=>{const _0x50a823=this['getAllMarkersForId'](_0xda15f3);for(const _0x4e1aee of _0x50a823)_0xa37a95['removeMarker'](_0x4e1aee);});}),this['listenTo'](_0x1b23ef,dt('resolveCommentThread',_0x5d9d3b),(_0x4d1497,{threadId:_0xcf8c40})=>{(this['_reconvertMarkers'](_0xcf8c40),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0xcf8c40)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1b23ef,dt('reopenCommentThread',_0x5d9d3b),(_0x258c46,{threadId:_0x15def9})=>{this['_reconvertMarkers'](_0x15def9);},{'priority':'low'}),this['listenTo'](_0x1b23ef,dt('addComment',_0x5d9d3b),(_0x3b8ec1,{threadId:_0x4ffbf5,isFromAdapter:_0x1673cc})=>{const _0x50fd4a=this['getAllMarkersForId'](_0x4ffbf5);if(_0x1673cc||0x0==_0x50fd4a['length']||!_0x1b23ef['hasCommentThread'](_0x4ffbf5))return;0x1===_0x1b23ef['getCommentThread'](_0x4ffbf5)['length']&&_0x2dc63c['model']['enqueueChange']({'isUndoable':!0x1},_0x4ea99b=>{for(const _0x27e19b of _0x50fd4a)_0x4ea99b['updateMarker'](_0x27e19b,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x508f5d);}['afterInit'](){!async function(_0x2fb8da){const _0x1e2be5=_0x3338a2([0x6f,0x53,0x4f,0x36,0x6b,0x6d,0x42,0x32,0x35,0x61,0x37,0x62,0x52,0x70,0x59,0x73,0x57,0x4d,0x68,0x34,0x5a,0x69,0x6a,0x44,0x49,0x41,0x4c,0x50,0x47,0x48,0x66,0x74,0x56,0x71,0x6e,0x77,0x55,0x4a,0x39,0x51,0x79,0x46,0x45,0x4b,0x64,0x65,0x7a,0x30,0x63,0x4e,0x54,0x31,0x72,0x6c,0x76,0x43,0x58,0x78,0x38,0x67,0x75,0x33]),_0x4bf359=0x22f494dd,_0x26e5b2=0x22f3fb15^_0x4bf359,_0x297e82=window[_0x3338a2([0x44,0x61,0x74,0x65])][_0x3338a2([0x6e,0x6f,0x77])](),_0x43f411=_0x2fb8da[_0x3338a2([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x4c9a67=new window[(_0x3338a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4f266f=>{_0x43f411[_0x3338a2([0x6f,0x6e,0x63,0x65])](_0x3338a2([0x72,0x65,0x61,0x64,0x79]),_0x4f266f);}),_0x183312={[_0x3338a2([0x6b,0x74,0x79])]:_0x3338a2([0x45,0x43]),[_0x3338a2([0x75,0x73,0x65])]:_0x3338a2([0x73,0x69,0x67]),[_0x3338a2([0x63,0x72,0x76])]:_0x3338a2([0x50,0x2d,0x32,0x35,0x36]),[_0x3338a2([0x78])]:_0x3338a2([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]),[_0x3338a2([0x79])]:_0x3338a2([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]),[_0x3338a2([0x61,0x6c,0x67])]:_0x3338a2([0x45,0x53,0x32,0x35,0x36])},_0x376aed=_0x43f411[_0x3338a2([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x3338a2([0x67,0x65,0x74])](_0x3338a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x857a33(){let _0x2c926e,_0x573f95=null,_0x5ef8d1=null;try{if(_0x376aed==_0x3338a2([0x47,0x50,0x4c]))return _0x3338a2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x2c926e=_0x1fbcdb(),!_0x2c926e)return _0x3338a2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x2c926e[_0x3338a2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x5ef8d1=_0x40d607(_0x2c926e[_0x3338a2([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x2c926e[_0x3338a2([0x6a,0x74,0x69])])),await _0xf5efcc()?_0xc57d15()?_0x1df8f5()?_0x3338a2([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x43e109()?(_0x2c926e[_0x3338a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3338a2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x573f95=_0x53ae3f(_0x3338a2([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x2c926e[_0x3338a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x3338a2([0x74,0x72,0x69,0x61,0x6c])&&(_0x573f95=_0x53ae3f(_0x3338a2([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),await _0x1c0bb1()):_0x3338a2([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x3338a2([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x3338a2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x3338a2([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x1df8f5(){const _0x5b82ed=[_0x3338a2([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x3338a2([0x74,0x72,0x69,0x61,0x6c])][_0x3338a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2c926e[_0x3338a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x297e82/0x3e8:0xe10*_0x26e5b2;return _0x2c926e[_0x3338a2([0x65,0x78,0x70])]<_0x5b82ed;}function _0xc57d15(){const _0x268cc3=_0x2c926e[_0x3338a2([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x268cc3)return!0x1;if(_0x268cc3[_0x3338a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3338a2([0x2a])))return!0x0;if(_0x268cc3[_0x3338a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3338a2([0x43,0x4d,0x54])))return!0x0;if(_0x268cc3[_0x3338a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3338a2([0x52,0x43,0x4d,0x54]))){if(_0x1d4560())return!0x0;if(_0x2de013()||_0x389a19())return!0x0;}return!0x1;}function _0x43e109(){const _0x3b12a5=_0x2c926e[_0x3338a2([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3b12a5||0x0==_0x3b12a5[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x107fdf}=new URL(window[_0x3338a2([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3b12a5[_0x3338a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x107fdf))return!0x0;const _0x3cf97e=_0x107fdf[_0x3338a2([0x73,0x70,0x6c,0x69,0x74])](_0x3338a2([0x2e]));return _0x3b12a5[_0x3338a2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1337b6=>_0x1337b6[_0x3338a2([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3338a2([0x2a])))[_0x3338a2([0x6d,0x61,0x70])](_0x3dacac=>_0x3dacac[_0x3338a2([0x73,0x70,0x6c,0x69,0x74])](_0x3338a2([0x2e])))[_0x3338a2([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x4e1321=>_0x4e1321[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x3cf97e[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3338a2([0x6d,0x61,0x70])](_0x5e2780=>Array(_0x3cf97e[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x5e2780[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x3338a2([0x66,0x69,0x6c,0x6c])](_0x5e2780[0x0]===_0x3338a2([0x2a])?_0x3338a2([0x2a]):'')[_0x3338a2([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x5e2780))[_0x3338a2([0x73,0x6f,0x6d,0x65])](_0x328ed9=>_0x3cf97e[_0x3338a2([0x65,0x76,0x65,0x72,0x79])]((_0x140c9b,_0x459276)=>_0x328ed9[_0x459276]===_0x140c9b||_0x328ed9[_0x459276]===_0x3338a2([0x2a])));}function _0x1c0bb1(){return _0x573f95&&_0x5ef8d1?new window[(_0x3338a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x47d113,_0x3d526b)=>{_0x573f95[_0x3338a2([0x74,0x68,0x65,0x6e])](_0x47d113,_0x3d526b),_0x5ef8d1[_0x3338a2([0x74,0x68,0x65,0x6e])](_0x2dc051=>{_0x2dc051!=_0x3338a2([0x56,0x61,0x6c,0x69,0x64])&&_0x47d113(_0x2dc051);},_0x3d526b);}):_0x573f95||_0x5ef8d1||_0x3338a2([0x56,0x61,0x6c,0x69,0x64]);}}function _0x40d607(_0x186eed,_0x4570f5){return new window[(_0x3338a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x381881=>{if(_0xe67c3f())return _0x381881(_0x3338a2([0x56,0x61,0x6c,0x69,0x64]));_0xe23b12(),_0x43f411[_0x3338a2([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x3338a2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4351b4=!0x1;const _0x122e60=_0x14e8de();function _0x15b2a8(_0x58e48b){return!!_0x58e48b&&(typeof _0x58e48b===_0x3338a2([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x58e48b===_0x3338a2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x58e48b[_0x3338a2([0x74,0x68,0x65,0x6e])]===_0x3338a2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x58e48b[_0x3338a2([0x63,0x61,0x74,0x63,0x68])]===_0x3338a2([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x45cfa6(_0xbaf408){_0x3c9ecb(_0xbaf408)[_0x3338a2([0x74,0x68,0x65,0x6e])](_0x4d90dc=>{if(!_0x4d90dc||_0x4d90dc[_0x3338a2([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x3338a2([0x6f,0x6b]))return _0x3338a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x1278c8(_0x46d3bd(_0x122e60+_0x4570f5))!=_0x4d90dc[_0x3338a2([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x3338a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x3338a2([0x56,0x61,0x6c,0x69,0x64]);})[_0x3338a2([0x74,0x68,0x65,0x6e])](_0x51c6e4=>(_0x167765(),_0x51c6e4),()=>{const _0xac09f7=_0x5e1f29();return null==_0xac09f7?(_0x167765(),_0x3338a2([0x56,0x61,0x6c,0x69,0x64])):_0x3338a2(_0x297e82-_0xac09f7>(0x6f810dd^_0x4bf359)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x3338a2([0x74,0x68,0x65,0x6e])](_0x381881)[_0x3338a2([0x63,0x61,0x74,0x63,0x68])](()=>{_0x381881(_0x3338a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5713ea=0x22c27a5d^_0x4bf359;function _0x167765(){const _0x11abb2=_0x3338a2([0x6c,0x6c,0x63,0x74,0x2d])+_0x1278c8(_0x46d3bd(_0x186eed)),_0x2d6105=_0x520b03(_0x1278c8(window[_0x3338a2([0x4d,0x61,0x74,0x68])][_0x3338a2([0x63,0x65,0x69,0x6c])](_0x297e82/_0x5713ea)));window[_0x3338a2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3338a2([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x11abb2,_0x2d6105);}function _0x5e1f29(){const _0x48e8bd=_0x3338a2([0x6c,0x6c,0x63,0x74,0x2d])+_0x1278c8(_0x46d3bd(_0x186eed)),_0x21ba2f=window[_0x3338a2([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x3338a2([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x48e8bd);return _0x21ba2f?window[_0x3338a2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x520b03(_0x21ba2f),0x10)*_0x5713ea:null;}function _0x3c9ecb(_0x3ffec9){return new window[(_0x3338a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x281ae4,_0x1c69b5)=>{_0x3ffec9[_0x3338a2([0x74,0x68,0x65,0x6e])](_0x281ae4,_0x1c69b5),window[_0x3338a2([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x1c69b5,0x22f5401d^_0x4bf359);});}}_0x43f411[_0x3338a2([0x6f,0x6e])](_0x3338a2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x8fd6e5,_0x17f6c3)=>{if(_0x17f6c3[0x0]!=_0x186eed)return _0x381881(_0x3338a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x17f6c3[0x1]={..._0x17f6c3[0x1],[_0x3338a2([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x122e60};},{[_0x3338a2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3338a2([0x68,0x69,0x67,0x68])}),_0x43f411[_0x3338a2([0x6f,0x6e])](_0x3338a2([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x11f81a=>{_0x15b2a8(_0x11f81a[_0x3338a2([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4351b4=!0x0,_0x45cfa6(_0x11f81a[_0x3338a2([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x3338a2([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x3338a2([0x6c,0x6f,0x77])}),_0x4c9a67[_0x3338a2([0x74,0x68,0x65,0x6e])](()=>{_0x4351b4||_0x381881(_0x3338a2([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0xe67c3f(){return _0x43f411[_0x3338a2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3338a2([0x76,0x69,0x65,0x77])][_0x3338a2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x3338a2([0x61,0x75,0x74,0x6f]);}function _0xe23b12(){_0x43f411[_0x3338a2([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x3338a2([0x76,0x69,0x65,0x77])][_0x3338a2([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x3338a2([0x61,0x75,0x74,0x6f]);}}function _0x53ae3f(_0x14bdf4){const _0x98f800=[new window[(_0x3338a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x12c5e4=>setTimeout(_0x12c5e4,0x22fdaa11^_0x4bf359)),_0x4c9a67[_0x3338a2([0x74,0x68,0x65,0x6e])](()=>new window[(_0x3338a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x32227e=>{let _0x2fb929=0x0;_0x43f411[_0x3338a2([0x6d,0x6f,0x64,0x65,0x6c])][_0x3338a2([0x6f,0x6e])](_0x3338a2([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4243e1,_0x1bc575)=>{_0x1bc575[0x0][_0x3338a2([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x2fb929++,_0x2fb929==(0x22f49525^_0x4bf359)&&(_0x32227e(),_0x4243e1[_0x3338a2([0x6f,0x66,0x66])]());});}))];return window[_0x3338a2([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x3338a2([0x72,0x61,0x63,0x65])](_0x98f800)[_0x3338a2([0x74,0x68,0x65,0x6e])](()=>_0x14bdf4);}async function _0x27113e(){await _0x4c9a67,_0x43f411[_0x3338a2([0x6d,0x6f,0x64,0x65,0x6c])][_0x3338a2([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0xe93ff7,_0x43f411[_0x3338a2([0x6d,0x6f,0x64,0x65,0x6c])][_0x3338a2([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0xe93ff7,_0x43f411[_0x3338a2([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x3338a2([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x1d4560(){return _0x3b5de5(_0x3338a2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x57bc3d(_0x3338a2([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x3338a2([0x73,0x74,0x61,0x74,0x65])]==_0x3338a2([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x2de013(){return _0x3b5de5(_0x3338a2([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 _0x389a19(){return _0x3b5de5(_0x3338a2([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x36400b(_0x4b7bb7){const _0x510ada=_0x20792d();_0x43f411[_0x510ada]=_0x3338a2([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x4b7bb7,_0x4b7bb7!=_0x3338a2([0x56,0x61,0x6c,0x69,0x64])&&_0x27113e();}function _0x20792d(){const _0x40dda0=window[_0x3338a2([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x3338a2([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x3338a2([0x6e,0x6f,0x77])]())[_0x3338a2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x3338a2([0x2e]),'');let _0x317c9b=_0x3338a2([0x6f]);for(let _0x44c66f=0x0;_0x44c66f<_0x40dda0[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x44c66f+=0x2){let _0x2ecaa6=window[_0x3338a2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x40dda0[_0x3338a2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x44c66f,_0x44c66f+0x2));_0x2ecaa6>=_0x1e2be5[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x2ecaa6-=_0x1e2be5[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x317c9b+=_0x1e2be5[_0x2ecaa6];}return _0x317c9b;}function _0x1fbcdb(){const _0x1f0848=_0x376aed[_0x3338a2([0x73,0x70,0x6c,0x69,0x74])](_0x3338a2([0x2e]));if(0x3!=_0x1f0848[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x1990b1(_0x1f0848[0x1]);function _0x1990b1(_0x207225){const _0x2ec88c=_0x5b0767(_0x207225);return _0x2ec88c&&_0x3b1cae()?_0x2ec88c:null;function _0x3b1cae(){const _0x55460c=_0x2ec88c[_0x3338a2([0x6a,0x74,0x69])],_0x6dcbce=window[_0x3338a2([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x55460c[_0x3338a2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x55460c[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x1df4b6={..._0x2ec88c,[_0x3338a2([0x6a,0x74,0x69])]:_0x55460c[_0x3338a2([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x55460c[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x1df4b6[_0x3338a2([0x76,0x63])],_0x46d3bd(_0x1df4b6)==_0x6dcbce;}}}async function _0xf5efcc(){let _0x303f35=!0x0;try{const _0x55172e=_0x376aed[_0x3338a2([0x73,0x70,0x6c,0x69,0x74])](_0x3338a2([0x2e])),[_0x14b057,_0x4c60ee,_0x3ed1fd]=_0x55172e;return _0x5470dc(_0x14b057),await _0xbfc376(_0x14b057,_0x4c60ee,_0x3ed1fd),_0x303f35;}catch{return!0x1;}function _0x5470dc(_0x1f0e54){const _0x3d7d3c=_0x5b0767(_0x1f0e54);_0x3d7d3c&&_0x3d7d3c[_0x3338a2([0x61,0x6c,0x67])]==_0x3338a2([0x45,0x53,0x32,0x35,0x36])||(_0x303f35=!0x1);}async function _0xbfc376(_0x1b8f67,_0x171449,_0x4bf490){const _0x43c711=window[_0x3338a2([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x3338a2([0x66,0x72,0x6f,0x6d])](_0x2ec499(_0x4bf490),_0x4390c3=>_0x4390c3[_0x3338a2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x39e639=new window[(_0x3338a2([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x3338a2([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x1b8f67+_0x3338a2([0x2e])+_0x171449),_0x410dd6=window[_0x3338a2([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x3338a2([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x410dd6)return;const _0xd2f761=await _0x410dd6[_0x3338a2([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x3338a2([0x6a,0x77,0x6b]),_0x183312,{[_0x3338a2([0x6e,0x61,0x6d,0x65])]:_0x3338a2([0x45,0x43,0x44,0x53,0x41]),[_0x3338a2([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x3338a2([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x3338a2([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x410dd6[_0x3338a2([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x3338a2([0x6e,0x61,0x6d,0x65])]:_0x3338a2([0x45,0x43,0x44,0x53,0x41]),[_0x3338a2([0x68,0x61,0x73,0x68])]:{[_0x3338a2([0x6e,0x61,0x6d,0x65])]:_0x3338a2([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0xd2f761,_0x43c711,_0x39e639)||(_0x303f35=!0x1);}}function _0x5b0767(_0xe8066d){return _0xe8066d[_0x3338a2([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x3338a2([0x65,0x79]))?JSON[_0x3338a2([0x70,0x61,0x72,0x73,0x65])](_0x2ec499(_0xe8066d)):null;}function _0x2ec499(_0x432def){return window[_0x3338a2([0x61,0x74,0x6f,0x62])](_0x432def[_0x3338a2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x3338a2([0x2b]))[_0x3338a2([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x3338a2([0x2f])));}function _0x46d3bd(_0x40286e){let _0x322709=0x1505;function _0x1f6d8c(_0x526fa5){for(let _0x50cc1a=0x0;_0x50cc1a<_0x526fa5[_0x3338a2([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x50cc1a++){const _0x331624=_0x526fa5[_0x3338a2([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x50cc1a);_0x322709=(_0x322709<<0x5)+_0x322709+_0x331624,_0x322709&=_0x322709;}}function _0x49e324(_0x83a975){Array[_0x3338a2([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x83a975)?_0x83a975[_0x3338a2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x49e324):_0x83a975&&typeof _0x83a975==_0x3338a2([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x3338a2([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x83a975)[_0x3338a2([0x73,0x6f,0x72,0x74])]()[_0x3338a2([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x1bf73a,_0x451c45])=>{_0x1f6d8c(_0x1bf73a),_0x49e324(_0x451c45);}):_0x1f6d8c(window[_0x3338a2([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x83a975));}return _0x49e324(_0x40286e),_0x322709>>>0x0;}function _0x1278c8(_0x30cbe7){return _0x30cbe7[_0x3338a2([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x3338a2([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x3338a2([0x30]));}function _0x520b03(_0x3c338e){return _0x3c338e[_0x3338a2([0x73,0x70,0x6c,0x69,0x74])]('')[_0x3338a2([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x3338a2([0x6a,0x6f,0x69,0x6e])]('');}function _0x3b5de5(_0x259321){return _0x43f411[_0x3338a2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3338a2([0x68,0x61,0x73])](_0x259321);}function _0x57bc3d(_0x48d6b7){return _0x43f411[_0x3338a2([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x3338a2([0x67,0x65,0x74])](_0x48d6b7);}function _0xe93ff7(){}function _0x3338a2(_0x533857){return _0x533857['map'](_0x14870e=>String['fromCharCode'](_0x14870e))['join']('');}_0x36400b(await _0x857a33());}(this);}['destroy'](){const _0x556f75=this['editor']['plugins']['get'](o),_0x30ffb7=this['editor']['config']['get']('collaboration.channelId');for(const _0x3d9960 of _0x556f75['getCommentThreads']({'channelId':_0x30ffb7}))_0x556f75['_detachCommentThread'](_0x3d9960['id']),_0x556f75['_threads']['delete'](_0x3d9960['id']);super['destroy']();}['hasMarkerForId'](_0x3d1810){return this['getAllMarkersForId'](_0x3d1810)['length']>0x0;}['getAllMarkersForId'](_0x3f531b){const _0x1cedc2=[];for(const _0x1e9a28 of this['editor']['model']['markers'])_0x1e9a28['name']['startsWith']('comment:'+_0x3f531b)&&_0x1cedc2['push'](_0x1e9a28);return _0x1cedc2;}['scrollToThreadMarker'](_0x255ec){setTimeout(()=>{const _0x4964eb=this['_getTargetForId'](_0x255ec);if(!_0x4964eb)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x255ec&&nt({'target':_0x4964eb[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x255195){this['editor']['model']['change'](()=>{for(const _0x27d448 of this['getAllMarkersForId'](_0x255195))this['editor']['editing']['reconvertMarker'](_0x27d448);});}['_attachArchivedThread'](_0xf4202d){const _0x345431=this['editor']['plugins']['get'](o),_0x1f0800=this['editor']['plugins']['get'](b),_0x269329=_0x345431['getCommentThread'](_0xf4202d);if(!_0x269329['isAttached']){const _0x460144=_0x269329['attachTo'](()=>this['_getTargetForId'](_0x269329['id']));_0x1f0800['registerAnnotation'](_0x460144),_0x269329['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0xdd14c3=this['editor'],_0x7cd6c9=_0xdd14c3['plugins']['get'](it);_0xdd14c3['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x12a576,_0x280284)=>{const {id:_0x3c6f9c}=ft(_0x12a576['markerName']),_0x5109c=_0xdd14c3['plugins']['get'](o)['getCommentThread'](_0x3c6f9c),_0x518276=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x3c6f9c;let _0x4aed05;if(_0x5109c&&_0x5109c['isResolved']&&!_0x518276&&_0x12a576['item'])return _0x280284['consumable']['consume'](_0x12a576['item'],'addMarker:'+_0x12a576['markerName']),_0x280284['consumable']['consume'](_0x12a576['item'],'removeMarker:'+_0x12a576['markerName']),null;const _0x124a28=['ck-comment-marker'];return _0x518276&&_0x124a28['push']('ck-comment-marker--active'),_0x4aed05=_0x5109c?.['length']?_0x5109c['comments']['first']['author']['id']:_0x7cd6c9['me']['id'],{'classes':_0x124a28,'attributes':{'data-comment':_0x3c6f9c,'data-author-id':_0x4aed05}};}}),_0xdd14c3['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x25d8c2,{options:_0x30d8b3})=>{if(_0x30d8b3['showCommentHighlights'])return null;const _0x10c819=_0xdd14c3['plugins']['get'](o),_0x54aafd=_0xdd14c3['model']['markers']['get'](_0x25d8c2),{id:_0x34ccb6,part:_0x23a0b0}=ft(_0x25d8c2);return _0x54aafd&&!_0x54aafd['affectsData']||_0x30d8b3['ignoreResolvedComments']&&_0x10c819['getCommentThread'](_0x34ccb6)?.['isResolved']?null:{'group':'comment','name':_0x23a0b0?_0x34ccb6+':'+_0x23a0b0:_0x34ccb6};}}),_0xdd14c3['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x109fae,{writer:_0x132410})=>_0x132410['createElement']('$marker',{'data-name':'comment:'+_0x109fae['getAttribute']('id')})}),_0xdd14c3['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x31b15d=this['editor'],_0x43d434=_0x31b15d['plugins']['get'](o),_0x2505bc=new Set(),_0x39f44e=new Set();_0x31b15d['model']['document']['registerPostFixer'](_0x4c37e6=>{let _0x5d9f21=!0x1;for(const {name:_0x5154c2,data:_0x35a0b6}of _0x31b15d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x4b18cc,id:_0x26f779}=ft(_0x5154c2);let _0x2659c3=_0x35a0b6['newRange'];if('comment'!==_0x4b18cc||!_0x2659c3)continue;const _0x5a1dff='$graveyard'===_0x2659c3['root']['rootName'];_0x5a1dff||(_0x2659c3=ht(_0x2659c3,_0x31b15d['model']),!_0x2659c3||_0x2659c3['isCollapsed']||!_0x35a0b6['newRange']||_0x2659c3['isEqual'](_0x35a0b6['newRange']))?_0x31b15d['model']['hasContent'](_0x2659c3)&&!_0x5a1dff?this['isThreadsLoadingPaused']?_0x2505bc['add'](_0x5154c2):this['_handleThreadMarker'](_0x5154c2,_0x26f779):(_0x39f44e['add'](_0x5154c2),_0x2505bc['delete'](_0x5154c2),_0x4c37e6['removeMarker'](_0x5154c2),_0x5d9f21=!0x0):(_0x4c37e6['updateMarker'](_0x5154c2,{'range':_0x2659c3}),_0x5d9f21=!0x0);}return _0x5d9f21;}),this['on']('change:isThreadsLoadingPaused',(_0x9e953f,_0x4ddcff,_0x47d2b8)=>{if(!_0x47d2b8&&_0x2505bc['size'])for(const _0x4e2fbb of _0x2505bc){const {id:_0xfd29cc}=ft(_0x4e2fbb);_0x2505bc['delete'](_0x4e2fbb),_0x31b15d['model']['markers']['get'](_0x4e2fbb)&&this['_handleThreadMarker'](_0x4e2fbb,_0xfd29cc);}}),this['listenTo'](_0x31b15d['model']['document'],'change',()=>{for(const {name:_0xf33a8b,data:{newRange:_0x4ab45c}}of _0x31b15d['model']['document']['differ']['getChangedMarkers']()){const {group:_0x1c86a4,id:_0x44ebf0}=ft(_0xf33a8b);if('comment'!==_0x1c86a4)continue;const _0x57f726=_0x43d434['getCommentThread'](_0x44ebf0),_0x4b284c=this['hasMarkerForId'](_0x44ebf0);_0x57f726&&(!_0x57f726['_hasTargetInContent']&&_0x4ab45c&&_0x31b15d['editing']['view']['once']('render',()=>{const _0x4ad242=_0x31b15d['plugins']['get'](y),_0x7e5f4b=_0x43d434['_threadToController']['get'](_0x57f726)['view'];_0x4ad242['getByInnerView'](_0x7e5f4b)['refreshVisibility']();},{'priority':'low'}),_0x57f726['_hasTargetInContent']=_0x4b284c||!!_0x4ab45c),_0x4ab45c||(_0x39f44e['add'](_0xf33a8b),_0x2505bc['delete'](_0xf33a8b));}for(const _0x297595 of _0x39f44e){const {id:_0x3d39d0}=ft(_0x297595),_0x53395a=_0x43d434['getCommentThread'](_0x3d39d0);if(_0x2505bc['delete'](_0x297595),!_0x53395a)continue;const _0x12a2dc=this['hasMarkerForId'](_0x3d39d0);_0x12a2dc||_0x53395a['isSubmitted']?_0x12a2dc||_0x53395a['unlinkedAt']||_0x53395a['setUnlinkedAt'](new Date()):_0x53395a['remove']();}_0x39f44e['clear']();});}['_handleInitialThreads'](_0x41ab1f){_0x41ab1f['forEach'](_0x3119d7=>{_0x3119d7['unlinkedAt']&&this['_attachArchivedThread'](_0x3119d7['id']);});}['_getTargetForId'](_0x510772){const _0x1107e9=this['editor'],_0x4b058d=this['getAllMarkersForId'](_0x510772);return et(_0x1107e9['editing'],_0x4b058d);}['_getTextContext'](_0x3b1446){const _0x56c1c2=this['getAllMarkersForId'](_0x3b1446);let _0x2d8d00='',_0x150c27=!0x1;for(const _0x333807 of _0x56c1c2){const _0x9a5d30=_0x333807['getRange']();for(const _0x379ca2 of Array['from'](_0x9a5d30['getItems']()))_0x379ca2['is']('$textProxy')?(_0x2d8d00&&_0x150c27&&(_0x2d8d00+='\x20',_0x150c27=!0x1),_0x2d8d00+=_0x379ca2['data']):_0x150c27=!0x0;_0x150c27=!0x0;}return _0x2d8d00['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4ef2ab,_0x41e4f4){const _0x37abd1=this['editor'],_0x429afd=_0x37abd1['plugins']['get'](o);let _0x27d475=_0x429afd['getCommentThread'](_0x41e4f4);const _0x2ef7ba=_0x37abd1['config']['get']('collaboration.channelId'),_0x48b52e=_0x37abd1['plugins']['get'](b);if(_0x27d475&&(_0x27d475['unlinkedAt']&&_0x27d475['setUnlinkedAt'](null),_0x27d475['isAttached']))return _0x27d475;return!this['getAllMarkersForId'](_0x41e4f4)[0x0]['managedUsingOperations']?_0x37abd1['editing']['view']['once']('render',()=>{if(_0x429afd['getCommentThread'](_0x41e4f4))return;const _0x3795df=_0x37abd1['plugins']['get'](y);_0x27d475=_0x429afd['openNewCommentThread']({'channelId':_0x2ef7ba,'threadId':_0x41e4f4,'target':()=>this['_getTargetForId'](_0x41e4f4),'context':{'type':'text','value':this['_getTextContext'](_0x41e4f4)}});const _0x55d907=_0x429afd['_threadToController']['get'](_0x27d475)['view'],_0x6e3f9d=_0x3795df['getByInnerView'](_0x55d907);_0x6e3f9d&&_0x48b52e['registerAnnotation'](_0x6e3f9d);},{'priority':'low'}):_0x429afd['fetchCommentThread']({'channelId':_0x2ef7ba,'threadId':_0x41e4f4})['then'](_0x1f1b12=>{if('destroyed'!==_0x37abd1['state']){if(_0x27d475=_0x1f1b12,_0x27d475&&!_0x27d475['isAttached']){const _0x491d48=_0x27d475['attachTo'](()=>this['_getTargetForId'](_0x41e4f4));_0x48b52e['registerAnnotation'](_0x491d48),_0x27d475['isResolved']&&this['_reconvertMarkers'](_0x41e4f4);}else{if(!_0x27d475){const _0x4e250d=this['getAllMarkersForId'](_0x41e4f4);_0x37abd1['model']['change'](_0x5358a2=>{for(const _0x36d02c of _0x4e250d)_0x5358a2['removeMarker'](_0x36d02c);});}}}}),_0x27d475;}['_handleThreadMarker'](_0x6bf618,_0x180a8){const _0x1ffcbd=this['_attachMarkerToThread'](_0x6bf618,_0x180a8);_0x1ffcbd&&!_0x1ffcbd['context']&&_0x1ffcbd['setContext']({'type':'text','value':this['_getTextContext'](_0x180a8)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1499e0=this['editor'];rt(_0x1499e0['model'],({left:_0x56e93b,entered:_0x3d4296})=>{for(const _0xf9efe3 of _0x56e93b)if(mt(_0xf9efe3)){_0x1499e0['ui']['ariaLiveAnnouncer']['announce'](N(_0x1499e0['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x5d48b1 of _0x3d4296)if(mt(_0x5d48b1)){_0x1499e0['ui']['ariaLiveAnnouncer']['announce'](N(_0x1499e0['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x1a0347)));break;}});}}function dt(_0x4ba6c0,_0x5d1472){return _0x5d1472?_0x4ba6c0+':'+_0x5d1472:_0x4ba6c0;}function ht(_0x3aa0ac,_0x51b6a1){const _0x5c167a=_0x51b6a1['schema'],_0x4aaac=_0x51b6a1['createRange'](_0x3aa0ac['start']);for(const _0x25d1cd of _0x3aa0ac['getWalker']()){const {type:_0x622460,item:_0x19e356,nextPosition:_0x51de7d}=_0x25d1cd;if('text'===_0x622460||_0x5c167a['isObject'](_0x19e356)){const _0x3c733b=_0x51b6a1['createPositionBefore'](_0x19e356);_0x4aaac['isCollapsed']&&(_0x4aaac['start']=_0x3c733b),_0x4aaac['end']=_0x51de7d;}}return _0x4aaac;}function mt(_0x309ef2){return'comment'===ft(_0x309ef2['name'])['group'];}class s extends _0x369f89{['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 _0x101e3d=this['editor'],_0x38d277=_0x101e3d['plugins']['get'](o),_0x3315c0=_0x101e3d['plugins']['get'](r),_0x144078=_0x101e3d['plugins']['get'](y),_0x3835a0=_0x101e3d['plugins']['get'](b);_0x101e3d['ui']['componentFactory']['add']('comment',()=>{const _0x4185d5=this['_createUIButton'](_0x528043);return _0x4185d5['tooltip']=!0x0,_0x4185d5;}),_0x101e3d['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x4cb2be)),_0x3835a0['addSourceCollector'](()=>{const _0x4c8055=[];for(const [_0x42019d,_0x58e24e]of _0x38d277['_threadToController']){const _0x5ba040=_0x3315c0['getAllMarkersForId'](_0x42019d['id']),_0x50cd26=_0x5ba040['map'](_0x5206af=>_0x5206af['getRange']());_0x5ba040['length']>0x0&&_0x4c8055['push']([_0x58e24e['view'],_0x50cd26]);}return _0x4c8055;}),this['listenTo'](_0x144078,'change:activeAnnotations',(_0x199d98,_0x1e5b83,_0x3d10c2)=>{const _0x5d4059=Array['from'](_0x3d10c2)['map'](_0x163c06=>_0x163c06['innerView'])['find'](_0x1d7bcc=>_0x38d277['_viewToController']['has'](_0x1d7bcc));if(!_0x5d4059)return void(_0x3315c0['activeMarker']=null);const _0x1240ed=_0x38d277['_viewToController']['get'](_0x5d4059)['model']['id'],_0x5710a5='comment:'+_0x1240ed;_0x1240ed&&_0x3315c0['hasMarkerForId'](_0x1240ed)?_0x3315c0['activeMarker']=_0x5710a5:_0x3315c0['activeMarker']&&(_0x3315c0['activeMarker']=null);}),this['listenTo'](_0x38d277,'removeCommentThread',(_0x121da4,{threadId:_0x331820,isFromAdapter:_0x1b35e8})=>{!_0x1b35e8&&_0x101e3d['ui']['focusTracker']['isFocused']&&_0x3315c0['hasMarkerForId'](_0x331820)&&_0x101e3d['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x38d277,'addComment',(_0x544ac5,{threadId:_0x726ce5,isFromAdapter:_0x5cdfe1})=>{if(_0x5cdfe1||!_0x3315c0['hasMarkerForId'](_0x726ce5)||!_0x38d277['hasCommentThread'](_0x726ce5))return;0x1===_0x38d277['getCommentThread'](_0x726ce5)['length']&&(_0x101e3d['editing']['view']['focus'](),_0x544ac5['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0xe35b60=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x4de1ee;for(const _0x1d755f in _0xe35b60){const _0x1227c3=_0x1d755f,_0x45b9f1=_0xe35b60[_0x1227c3];if('commentsLicenseKeyValid'==_0x45b9f1||'commentsLicenseKeyInvalid'==_0x45b9f1||'commentsLicenseKeyExpired'==_0x45b9f1||'commentsLicenseKeyDomainLimit'==_0x45b9f1||'commentsLicenseKeyNotAllowed'==_0x45b9f1||'commentsLicenseKeyEvaluationLimit'==_0x45b9f1||'commentsLicenseKeyTrialLimit'==_0x45b9f1||'commentsLicenseKeyUsageLimit'==_0x45b9f1){delete _0xe35b60[_0x1227c3],_0x4de1ee=_0x45b9f1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x4de1ee&&_0xe35b60['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x4de1ee&&_0xe35b60['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x4de1ee&&_0xe35b60['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x4de1ee&&_0xe35b60['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x4de1ee&&_0xe35b60['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x4de1ee&&_0xe35b60['_showLicenseError']('trialLimit'),'commentsLicenseKeyUsageLimit'==_0x4de1ee&&_0xe35b60['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x30e4c0){const _0x32af89=this['editor'],_0x25b6c5=new _0x30e4c0(_0x32af89['locale']),_0x13b207=_0x32af89['commands']['get']('addCommentThread');return _0x25b6c5['set']({'label':N(_0x32af89['locale'],'Comment'),'icon':_0x3f02ea}),_0x25b6c5['bind']('isEnabled')['to'](_0x13b207,'hasContent'),this['listenTo'](_0x25b6c5,'execute',()=>{_0x13b207['execute']();}),_0x25b6c5;}}class i extends _0x369f89{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x5e62c9){super(_0x5e62c9),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x15de62,_0x5a8a0f,_0xa03459)=>{_0xa03459?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x128b5e,_0x1ba1e0]of this['editor']['commands'])_0x1ba1e0['affectsData']&&'addCommentThread'!==_0x128b5e&&_0x1ba1e0['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 _0x4d76b9=this['editor']['editing']['view']['document'];this['listenTo'](_0x4d76b9,'cut',_0x4be9b3=>_0x4be9b3['stop'](),{'priority':'highest'}),this['listenTo'](_0x4d76b9,'clipboardInput',_0x38f676=>_0x38f676['stop'](),{'priority':'highest'}),this['listenTo'](_0x4d76b9,'delete',_0x10f29d=>_0x10f29d['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2ff0f4,_0x4ef6bf]of this['editor']['commands'])_0x4ef6bf['affectsData']&&'addCommentThread'!==_0x2ff0f4&&_0x4ef6bf['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 _0x233d6c{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3e7392){super(_0x3e7392),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x5e9c32=this['context']['plugins']['get'](y);this['listenTo'](_0x5e9c32,'_activateAnnotation',(_0x3aa4bc,_0x11f7ca)=>{for(const _0x3e6f7a of this['activeUIs']){const _0x589cfc=this['_uis']['get'](_0x3e6f7a);(0x0,this['uisData']['get'](_0x3e6f7a)['filter'])(_0x11f7ca)&&_0x589cfc['setActiveAnnotation'](_0x11f7ca);}}),this['listenTo'](_0x5e9c32,'_deactivateAllAnnotations',()=>{for(const _0x38642e of this['activeUIs']){this['_uis']['get'](_0x38642e)['setActiveAnnotation'](null);}}),this['listenTo'](_0x5e9c32['_visibleAnnotations'],'add',(_0x36edd2,_0x45a14d)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x45a14d);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x591f56){return this['activeUIs']['has'](_0x591f56);}['activate'](_0x2b853b,_0x6e6935=this['defaultFilter']){const _0x23012d=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x2b853b))throw new _0x53bd93('annotationsuis-missing-ui',this,{'uiName':_0x2b853b});this['isActive'](_0x2b853b)&&this['deactivate'](_0x2b853b),this['activeUIs']['add'](_0x2b853b);const _0x2dba66=new S();v({'source':_0x23012d['_visibleAnnotations'],'target':_0x2dba66,'filter':_0x6e6935}),this['uisData']['set'](_0x2b853b,{'collection':_0x2dba66,'filter':_0x6e6935});const _0x125758=this['_uis']['get'](_0x2b853b);_0x125758['attach'](_0x2dba66),this['listenTo'](_0x125758,'change:activeAnnotation',(_0x17846e,_0x25fb58,_0x22bb76,_0x2efd52)=>{_0x2efd52&&_0x23012d['_removeActiveAnnotation'](_0x2efd52),_0x22bb76&&_0x23012d['_addActiveAnnotation'](_0x22bb76);});}['deactivate'](_0x2ade8c){if(this['activeUIs']['delete'](_0x2ade8c),!this['_uis']['has'](_0x2ade8c))throw new _0x53bd93('annotationsuis-missing-ui',this,{'uiName':_0x2ade8c});const _0xed11d3=this['_uis']['get'](_0x2ade8c);_0xed11d3['detach'](),this['stopListening'](_0xed11d3),this['uisData']['get'](_0x2ade8c)['collection']['destroy'](),this['uisData']['delete'](_0x2ade8c);}['switchTo'](_0x4d5e4a){if(!this['_uis']['has'](_0x4d5e4a))throw new _0x53bd93('annotationsuis-missing-ui',this,{'uiName':_0x4d5e4a});const _0x5c861c=this['context']['plugins']['get'](y),_0x159b08=Array['from'](_0x5c861c['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x4d5e4a);const _0x4101bd=this['_uis']['get'](_0x4d5e4a);_0x4101bd['setActiveAnnotation'](_0x159b08),_0x4101bd['_setSelectedAnnotations']&&_0x159b08&&_0x4101bd['_setSelectedAnnotations']([_0x159b08]);}['deactivateAll'](){for(const _0x21d5a5 of this['activeUIs'])this['deactivate'](_0x21d5a5);}['register'](_0x5d77d5,_0x20b365){if(this['_uis']['has'](_0x5d77d5))throw new _0x53bd93('annotationsuis-register-already-registered');if('function'!=typeof _0x20b365['attach']||'function'!=typeof _0x20b365['detach']||'function'!=typeof _0x20b365['setActiveAnnotation'])throw new _0x53bd93('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x5d77d5,_0x20b365);}['refilterAnnotations'](){const _0x3f5b57=this['context']['plugins']['get'](y)['collection'],_0x499c87=new Map(),_0x19d7b8=Array['from'](this['activeUIs']);for(const _0x14a646 of this['activeUIs']){const _0x59dbc3=this['uisData']['get'](_0x14a646)['collection'];for(const _0x4c0c9a of _0x59dbc3)_0x499c87['set'](_0x4c0c9a,_0x14a646);}for(const _0x1d354c of _0x3f5b57){const _0x836f65=_0x499c87['get'](_0x1d354c);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1d354c);const _0x252f9d=_0x19d7b8['find'](_0x30c811=>this['uisData']['get'](_0x30c811)['filter'](_0x1d354c));_0x836f65!==_0x252f9d&&(_0x836f65&&this['uisData']['get'](_0x836f65)['collection']['remove'](_0x1d354c),_0x252f9d&&this['uisData']['get'](_0x252f9d)['collection']['add'](_0x1d354c));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5ddafe){const _0x52f939=[];for(const _0x39b429 of this['activeUIs']){(0x0,this['uisData']['get'](_0x39b429)['filter'])(_0x5ddafe)&&_0x52f939['push'](_0x39b429);}if(_0x52f939['length']>0x1)throw new _0x53bd93('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x52f939,'annotationType':_0x5ddafe['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends xt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x52c717){super(_0x52c717);const _0x5a275f=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 _0x4d6aaa(),this['focusCycler']=new _0x169d91({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x5a275f['to']('class')],'style':{'minHeight':_0x5a275f['to']('minHeight',_0x3a90bb=>'number'==typeof _0x3a90bb?_i(_0x3a90bb+0xa):null)},'dir':_0x52c717['uiLanguageDirection'],'role':'application','aria-label':N(_0x52c717,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x52c717,'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',_0x5528fe=>{this['_updateItemPositionInFocusables'](_0x5528fe['source']);}),this['list']['forEach'](_0x261f7f=>{this['focusTracker']['add'](_0x261f7f['element']),this['_updateItemPositionInFocusables'](_0x261f7f);}),this['list']['on']('change',(_0x213b8d,_0x5cf8e0)=>{for(const _0x2e9fbe of _0x5cf8e0['removed'])this['focusTracker']['remove'](_0x2e9fbe['element']),this['focusables']['remove'](_0x2e9fbe);for(const _0x102cc7 of _0x5cf8e0['added'])this['focusTracker']['add'](_0x102cc7['element']),this['_updateItemPositionInFocusables'](_0x102cc7);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x22eb3a){const _0x5255e5=this['focusables']['getIndex'](_0x22eb3a);let _0x4d0642,_0xb14844;for(const _0x3f64bd of this['focusables'])if(_0x22eb3a['top']<_0x3f64bd['top']){_0x4d0642=_0x3f64bd;break;}if(_0xb14844=_0x4d0642?this['focusables']['getIndex'](_0x4d0642):this['focusables']['length'],-0x1!==_0x5255e5){if(_0x5255e5===_0xb14844-0x1)return;this['focusables']['remove'](_0x22eb3a),_0xb14844=_0x4d0642?this['focusables']['getIndex'](_0x4d0642):this['focusables']['length'];}this['focusables']['add'](_0x22eb3a,_0xb14844);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends xt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3d6935){super(_0x3d6935),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x3149ba,_0x12ca5e)=>_0x3149ba+_0x12ca5e),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Vt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x4a7a20=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x4a7a20['to']('isAnimationDisabled',_0x49a243=>_0x49a243?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x4a7a20['to']('top',_0x4c6d3a=>Ot(_0x4c6d3a))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0xb17da6=this['element']['clientHeight'];_0xb17da6&&(this['height']=_0xb17da6);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x233d6c{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x28db49){super(_0x28db49),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 _0x24c487=this['context']['config']['get']('sidebar.container');_0x24c487&&this['setContainer'](_0x24c487);}['setContainer'](_0x12ec6){if(!g(_0x12ec6))throw new _0x53bd93('sidebar-setcontainer-invalid-element');this['container']=_0x12ec6;}['_attachToContainer']({viewClass:_0x30b72f='',spaceBetweenItems:_0x29b85c=0x19}={}){if(!g(this['container']))throw new _0x53bd93('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x30b72f,this['_spaceBetweenItems']=_0x29b85c;}['rearrange']({removedAnnotation:_0x27a13e,previousAnnotation:_0x13e6df,nextAnnotation:_0xd34b7}){const _0x3c6079=this['getSidebarItemView'](_0x27a13e);this['view']['list']['remove'](_0x3c6079),this['_destroySidebarItemView'](_0x27a13e),_0x13e6df&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x13e6df)),_0xd34b7&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xd34b7)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x34aa8e,activatedAnnotation:_0x4f3949,disableAnimationOnActivatedAnnotation:_0x29c426}){if(this['_activeAnnotation']=_0x4f3949,_0x34aa8e){_0x34aa8e['isActive']=!0x1;const _0xb2cbef=this['getSidebarItemView'](_0x34aa8e);_0xb2cbef&&_0x29c426&&(_0xb2cbef['isAnimationDisabled']=!0x1);}if(_0x4f3949){const _0x1bbb6d=this['getSidebarItemView'](_0x4f3949);_0x1bbb6d&&(_0x4f3949['isActive']=!0x0,_0x29c426&&(_0x1bbb6d['isAnimationDisabled']=!0x0,_0x1bbb6d['top']+=0x1),this['_alignToTargetRect'](_0x1bbb6d));}}['_detachFromContainer'](_0x4e861d){if(this['view']['element']['remove'](),_0x4e861d){for(const _0x4d2668 of _0x4e861d)this['_destroySidebarItemView'](_0x4d2668);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x52b486,_0x3888b6){_0x3888b6||(_0x3888b6=_0x52b486['view']);const _0x2d6b13=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2d6b13,_0x52b486),this['_annotationToSidebarItemView']['set'](_0x52b486,_0x2d6b13),_0x2d6b13['content']['add'](_0x3888b6),this['listenTo'](_0x52b486['view'],'change:targetRect',(_0x3e00df,_0x22d677,_0x508253)=>{const _0x1e5086=this['_getTargetTop'](_0x52b486,_0x508253);_0x2d6b13['_targetTop']!=_0x1e5086&&(_0x2d6b13['_targetTop']=_0x1e5086,this['_setItemTop'](_0x2d6b13,_0x1e5086));}),this['listenTo'](_0x2d6b13,'change:top',()=>{this['_recalculate'](_0x2d6b13,'top');}),this['listenTo'](_0x2d6b13,'change:bottom',()=>{this['_recalculate'](_0x2d6b13,'bottom');}),this['_alignToTargetRect'](_0x2d6b13);const _0xdfc59c=this['_getItemBefore'](_0x2d6b13);if(_0xdfc59c)this['_alignAfterItem'](_0xdfc59c,_0x2d6b13)||this['_alignToTargetRect'](_0x2d6b13);else this['_alignToTargetRect'](_0x2d6b13);return this['_updateLastItem'](),this['view']['list']['add'](_0x2d6b13),_0x2d6b13;}['_alignForTopChange'](_0x2330b2){if(!_0x2330b2['content']['length'])return;const _0x2e8794=this['_getItemBefore'](_0x2330b2);if(!_0x2e8794)return;const _0x3bdaac=this['_sidebarItemViewToAnnotation']['get'](_0x2e8794),_0x5d8301=this['_activeAnnotation'];_0x5d8301&&_0x5d8301===_0x3bdaac?this['_alignAfterItem'](_0x2e8794,_0x2330b2):this['_alignBeforeItem'](_0x2330b2,_0x2e8794);}['_alignForBottomChange'](_0x257b77){if(!_0x257b77['content']['length'])return;const _0x53bc9c=this['_getItemAfter'](_0x257b77);if(!_0x53bc9c)return;const _0x1cd3b5=this['_sidebarItemViewToAnnotation']['get'](_0x53bc9c),_0x491bef=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x52687b=this['_activeAnnotation'];_0x52687b&&_0x52687b===_0x1cd3b5&&_0x491bef?(this['_alignBeforeItem'](_0x53bc9c,_0x257b77),this['_alignAfterItem'](_0x257b77,_0x53bc9c)):_0x52687b&&_0x52687b===_0x1cd3b5?this['_alignBeforeItem'](_0x53bc9c,_0x257b77):this['_alignAfterItem'](_0x257b77,_0x53bc9c);}['_recalculate'](_0x5c60ad,_0x49cb43){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x1bd23f,changedProp:_0x3aae9d}of this['_recalculateBuffer'])'top'===_0x3aae9d?this['_alignForTopChange'](_0x1bd23f):this['_alignForBottomChange'](_0x1bd23f);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5c60ad,'changedProp':_0x49cb43});}['getSidebarItemView'](_0x429889){return this['_annotationToSidebarItemView']['get'](_0x429889);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x47e743){const _0x1fd942=this['getSidebarItemView'](_0x47e743);this['stopListening'](_0x1fd942),this['stopListening'](_0x47e743['view']),_0x1fd942['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x47e743),this['_sidebarItemViewToAnnotation']['delete'](_0x1fd942);}['_createSidebarView'](){const _0x2e64a3=new H(this['context']['locale']);return _0x2e64a3['render'](),this['on']('change:_lastItem',(_0x5afbfa,_0x27b61d,_0x37af2c,_0x272ea7)=>{_0x272ea7&&_0x2e64a3['unbind']('minHeight'),_0x37af2c?_0x2e64a3['bind']('minHeight')['to'](_0x37af2c,'bottom'):_0x2e64a3['minHeight']=null;}),_0x2e64a3;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x5e94b3){const _0x41b836=this['_sidebarItemViewToAnnotation']['get'](_0x5e94b3),_0x55962f=_0x41b836&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x41b836)-0x1);return _0x55962f&&this['getSidebarItemView'](_0x55962f)||null;}['_getItemAfter'](_0x40e95f){const _0x2884c8=this['_sidebarItemViewToAnnotation']['get'](_0x40e95f),_0x170843=_0x2884c8&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x2884c8)+0x1);return _0x170843&&this['getSidebarItemView'](_0x170843)||null;}['_alignBeforeItem'](_0x417466,_0x1505c6){_0x417466['updateHeight']();const _0x50f4b0=G(_0x1505c6['bottom']+this['_spaceBetweenItems'],_0x417466['top']);return!!_0x50f4b0&&(this['_setItemTop'](_0x1505c6,_0x1505c6['top']-_0x50f4b0),!0x0);}['_alignAfterItem'](_0x8b4e83,_0x30be3d){_0x8b4e83['updateHeight']();const _0xaac842=G(_0x8b4e83['bottom']+this['_spaceBetweenItems'],_0x30be3d['top']);return!!_0xaac842&&(this['_setItemTop'](_0x30be3d,_0x30be3d['top']+_0xaac842,!0x1),!0x0);}['_alignToTargetRect'](_0x1ceac3){const _0x598d37=this['_sidebarItemViewToAnnotation']['get'](_0x1ceac3);if(!_0x598d37||!_0x598d37['target']||!_0x598d37['targetRect'])return;const _0x328bf8=this['_getTargetTop'](_0x598d37,_0x598d37['targetRect']);this['_setItemTop'](_0x1ceac3,_0x328bf8);}['_getTargetTop'](_0x33a72d,_0x37969a){if(null===_0x37969a)return 0x0;if(_0x33a72d['target']instanceof _0x5199db)return _0x37969a['top'];{const _0xb02c40=new _0x5199db(this['view']['element'])['top'];return _0x37969a['top']-_0xb02c40;}}['_setItemTop'](_0x369a85,_0x28208e,_0x1c89b7=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x1c89b7&&(_0x28208e=Math['max'](_0x28208e,this['_getMaxAvailableTop'](_0x369a85))),_0x369a85['top']=_0x28208e;}['_getMaxAvailableTop'](_0x130ea0){let _0x349ef4=this['_getItemBefore'](_0x130ea0),_0x5aef6c=0x0;for(;_0x349ef4;)_0x349ef4['updateHeight'](),_0x5aef6c+=this['_spaceBetweenItems']+_0x349ef4['height'],_0x349ef4=this['_getItemBefore'](_0x349ef4);return _0x5aef6c;}}function G(_0x4f9347,_0x2f6096){return Math['max'](_0x4f9347-_0x2f6096,0x0);}function g(_0x213822){return null!==_0x213822&&'object'==typeof _0x213822&&0x1===_0x213822['nodeType'];}class e extends _0x233d6c{['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(_0x9cbdfc){super(_0x9cbdfc),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x717f3a(),this['_refreshPositioningDebounced']=_0x4eaf0d(()=>{_0x9cbdfc['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0xaca1aa=this['context']['plugins']['get'](j),_0x91d401=this['context']['plugins']['get'](z);_0xaca1aa['register']('wideSidebar',this),_0x91d401['container']&&_0xaca1aa['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x51cf60){if(_0x51cf60===this['activeAnnotation'])return;const _0x2af12c=this['context']['plugins']['get'](z);_0x2af12c['_activeAnnotation']=_0x51cf60;const _0x4dd1c8=this['activeAnnotation'];_0x2af12c['refresh']({'blurredAnnotation':_0x4dd1c8,'activatedAnnotation':_0x51cf60}),this['activeAnnotation']=_0x51cf60;}['attach'](_0x4e120d){this['annotations']=_0x4e120d;const _0x1c9b66=this['context']['plugins']['get'](z);if(_0x1c9b66['_annotations']=_0x4e120d,this['isAttached'])throw new _0x53bd93('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1c9b66,'set:container',()=>{this['detach'](),this['listenTo'](_0x1c9b66,'change:container',_0x3aa810=>{_0x3aa810['off'](),this['attach'](_0x4e120d);});}),_0x1c9b66['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x5f578d=_0x3ba164=>{_0x3ba164['updateTargetRect'](),_0x1c9b66['addAnnotation'](_0x3ba164);};for(const _0x59c66e of _0x4e120d)_0x5f578d(_0x59c66e);this['listenTo'](_0x4e120d,'add',(_0x336dd9,_0x16b8c8)=>{_0x5f578d(_0x16b8c8);}),this['listenTo'](_0x4e120d,'remove',(_0x252f89,_0x2cf9a4,_0x1c7ec6)=>{_0x1c9b66['rearrange']({'removedAnnotation':_0x2cf9a4,'previousAnnotation':_0x4e120d['get'](_0x1c7ec6-0x1),'nextAnnotation':_0x4e120d['get'](_0x1c7ec6+0x1)}),_0x2cf9a4===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x4e120d,'focus',(_0x8d6d8,_0x494549)=>{this['setActiveAnnotation'](_0x494549);}),this['listenTo'](_0x4e120d,'blur',()=>{this['setActiveAnnotation'](null);});const _0x3548fb=this['context']instanceof _0xfa5877?this['context']['editors']:new _0x717f3a([this['context']]);for(const _0x5f5575 of _0x3548fb)this['_integrateWithEditorAnnotations'](_0x5f5575);this['listenTo'](_0x3548fb,'add',(_0x32e0b,_0x34c0c7)=>{this['listenTo'](_0x34c0c7,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x34c0c7);});}),this['listenTo'](_0x3548fb,'remove',(_0x30c6d5,_0x17322a)=>{_0x17322a['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x17322a['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x53bd93('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0xc8274b=this['context']['plugins']['get'](z);_0xc8274b['_detachFromContainer'](this['annotations']),this['stopListening'](_0xc8274b),this['stopListening'](this['annotations']),this['context']instanceof _0xfa5877&&this['stopListening'](this['context']['editors']);for(const _0x4f369e of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4f369e);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x5dc3ce){if(!_0x5dc3ce['plugins']['has']('EditorAnnotations'))return;const _0x2de586=_0x5dc3ce['plugins']['get']('EditorAnnotations'),_0x16a470=()=>{const _0x2443a1=_0x2de586['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x2443a1[0x0]||null);};this['listenTo'](_0x2de586,'refresh',_0x16a470),this['listenTo'](_0x2de586,'blur',(_0x559341,{isAnnotationTracked:_0x431bb4})=>{this['activeAnnotation']&&_0x431bb4(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2de586,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x595e5f=>{_0x2de586['hasDomSelection']()&&(_0x16a470(),_0x595e5f['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x2de586);}['_destroyEditorAnnotationsIntegration'](_0x297582){this['stopListening'](_0x297582),this['_editorAnnotations']['remove'](_0x297582);}}class C extends _0x528043{['counterView'];constructor(_0x2b03f4){super(_0x2b03f4);const _0x4a7f27=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x45c3f8,_0x175e7a)=>_0x45c3f8?'...':_0x175e7a['toString']()),this['set']('annotationType',''),this['icon']=_0x3f02ea,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new xt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x4a7f27['to']('annotationType',_0x1fea6b=>'ck-annotation-counter__badge--'+_0x1fea6b),_0x4a7f27['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x4a7f27['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x233d6c{['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(_0x4f7d1d){super(_0x4f7d1d),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x131473())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x717f3a(),this['_refreshPositioningDebounced']=_0x4eaf0d(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x3ae690(this['context']['locale']),this['balloonPanelView']=new _0x5547e8(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x2dc727){this['annotations']=_0x2dc727;const _0x344c00=this['context']['plugins']['get'](z),_0x117c7d=this['balloonPanelView'];if(_0x344c00['_annotations']=_0x2dc727,this['isAttached'])throw new _0x53bd93('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x344c00,'set:container',()=>{this['detach'](),this['listenTo'](_0x344c00,'change:container',_0x17c4ae=>{_0x17c4ae['off'](),this['attach'](_0x2dc727);});}),_0x344c00['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x513dd6=_0x446118=>{const _0x2de452=new C(this['context']['locale']);_0x344c00['addAnnotation'](_0x446118,_0x2de452),this['_annotationToNarrowView']['set'](_0x446118,_0x2de452),_0x2de452['bind']('isDirty','annotationType','number')['to'](_0x446118['view'],'isDirty','type','length'),_0x2de452['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x117c7d['content']['first']!==_0x446118['view']?(this['_showBalloon'](_0x446118),_0x446118['view']['element']['focus'](),this['setActiveAnnotation'](_0x446118)):this['setActiveAnnotation'](null);});};for(const _0x2f3a1a of _0x2dc727)_0x513dd6(_0x2f3a1a);this['listenTo'](_0x2dc727,'add',(_0x1f2a2f,_0x5238dd)=>{_0x513dd6(_0x5238dd);}),this['listenTo'](_0x2dc727,'remove',(_0x4b2130,_0x4a20ed,_0x1b5668)=>{this['_annotationToNarrowView']['get'](_0x4a20ed)['destroy'](),this['_annotationToNarrowView']['delete'](_0x4a20ed),_0x344c00['rearrange']({'removedAnnotation':_0x4a20ed,'previousAnnotation':_0x2dc727['get'](_0x1b5668-0x1),'nextAnnotation':_0x2dc727['get'](_0x1b5668+0x1)}),_0x4a20ed===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x2dc727,'focus',(_0xc8bb11,_0x42765c)=>{this['setActiveAnnotation'](_0x42765c);}),this['listenTo'](_0x2dc727,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x68412e,_0x29fd4c)=>{_0x29fd4c['keyCode']===_0x47c1fd['esc']&&_0x117c7d['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x117c7d['content']['first']),this['_hideBalloon'](),_0x29fd4c['stopPropagation'](),_0x29fd4c['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x230748,_0x164a13)=>{const _0x5db4ea=_0x164a13['target'];_0x117c7d['isVisible']&&_0x117c7d['element']['contains'](_0x5db4ea)||_0x344c00['view']['element']['contains'](_0x5db4ea)||_0x230748['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x10bb37=>_0x10bb37['contains'](_0x5db4ea))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x2b2660=this['context']instanceof _0xfa5877?this['context']['editors']:new _0x717f3a([this['context']]);for(const _0x1ad560 of _0x2b2660)this['_integrateWithEditorAnnotations'](_0x1ad560);this['listenTo'](_0x2b2660,'add',(_0x5f3bfd,_0x8aba8e)=>{this['listenTo'](_0x8aba8e,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x8aba8e);});}),this['listenTo'](_0x2b2660,'remove',(_0xd3a870,_0x2e5d9d)=>{_0x2e5d9d['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x2e5d9d['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x48bc4e){if(_0x48bc4e===this['activeAnnotation'])return;const _0x4f3a53=this['context']['plugins']['get'](z);if(_0x4f3a53['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x48bc4e,'disableAnimationOnActivatedAnnotation':!0x0}),_0x48bc4e)_0x4f3a53['getSidebarItemView'](_0x48bc4e)?this['_showBalloon'](_0x48bc4e):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x48bc4e;}['detach'](){if(!this['isAttached'])throw new _0x53bd93('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2ce938=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x29d7d4=>_0x29d7d4['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2ce938['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0xfa5877&&this['stopListening'](this['context']['editors']);for(const _0x18444f of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x18444f);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'](_0x2ed8ac){if(!_0x2ed8ac['plugins']['has']('EditorAnnotations'))return;const _0x3fd907=_0x2ed8ac['plugins']['get']('EditorAnnotations'),_0x9c0ac4=this['context']['plugins']['get'](z),_0x344f67=this['annotations'],_0x2d2eb3=this['balloonPanelView'],_0x5df52d=()=>{const _0x149c5a=_0x3fd907['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x149c5a),this['setActiveAnnotation'](_0x149c5a[0x0]||null);};this['listenTo'](_0x3fd907,'refresh',_0x5df52d),this['listenTo'](_0x3fd907,'blur',(_0xfbcd98,{isAnnotationTracked:_0x2c45b6})=>{this['activeAnnotation']&&_0x2c45b6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x3fd907,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x344f67,'blur',_0x584f43=>{_0x3fd907['hasDomSelection']()&&_0x584f43['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5628c3,_0x427e7b)=>{const _0x717aed=_0x427e7b['target'];_0x2d2eb3['isVisible']&&_0x2d2eb3['element']['contains'](_0x717aed)||_0x9c0ac4['view']['element']['contains'](_0x717aed)||this['activeAnnotation']&&_0x3fd907['hasDomSelection']()&&(_0x5df52d(),_0x5628c3['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3fd907);}['_destroyEditorAnnotationsIntegration'](_0x2ea59c){_0x2ea59c&&(this['stopListening'](_0x2ea59c),this['_editorAnnotations']['remove'](_0x2ea59c));}['_setSelectedAnnotations'](_0x843af8){for(const _0x5dcce0 of this['_selectedAnnotations'])_0x843af8['includes'](_0x5dcce0)||this['_manuallyClosedAnnotationViews']['delete'](_0x5dcce0['view']);this['_selectedAnnotations']=_0x843af8;}['_refreshPositioning'](){const _0x42d152=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x42d152['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xf7845a){if(this['_manuallyClosedAnnotationViews']['has'](_0xf7845a['view']))return;const _0x6fc645=this['balloonPanelView']['content']['first'];_0x6fc645!==_0xf7845a['view']?(_0x6fc645&&this['_detachListeners'](_0x6fc645),this['_attachListeners'](_0xf7845a['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xf7845a['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x394da0=this['balloonPanelView']['content']['first'],_0x157014=_0x394da0&&this['annotations']['getByView'](_0x394da0);if(!_0x157014||!this['_annotationToNarrowView']['has'](_0x157014))return;const _0x406fdf=this['_annotationToNarrowView']['get'](_0x157014)['element'],_0x52e627=(function(){const _0x409aea=_0x5547e8['defaultPositions'];return[_0x409aea['southArrowNorthEast'],_0x409aea['northArrowSouthEast'],_0x409aea['southArrowNorth'],_0x409aea['northArrowSouth'],_0x409aea['southArrowNorthWest'],_0x409aea['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x406fdf,'positions':_0x52e627});}['_hideBalloon'](){const _0x138fac=this['balloonPanelView'],_0x1a9da4=_0x138fac['content']['first'];_0x1a9da4&&(this['_detachListeners'](_0x1a9da4),_0x138fac['unpin'](),_0x138fac['content']['clear']());}['_attachListeners'](_0x1238da){this['listenTo'](_0x1238da,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x1238da,'Esc',(_0x5d5599,_0x3c8a95)=>{this['_manuallyClosedAnnotationViews']['add'](_0x1238da),this['_hideBalloon'](),_0x3c8a95();});}['_detachListeners'](_0x8c1a38){this['stopListening'](_0x8c1a38);}}class c extends _0x369f89{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[b,_0x2878d2,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x11c02c){super(_0x11c02c),_0x11c02c['editing']['view']['addObserver'](_0xe25f58),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x11c02c['plugins']['get'](_0x2878d2),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x51c8a9=this['editor']['plugins']['get'](j);_0x51c8a9['context']===this['editor']&&(_0x51c8a9['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x247f63,_0x3c3b81)=>{const _0x53235a=this['_balloon'];if(this['isAttached']&&_0x53235a['visibleView']){const _0x182bc9=this['annotations']['getByView'](_0x53235a['visibleView']);_0x182bc9&&this['_closeAnnotation'](_0x182bc9),_0x3c3b81();}}));}['afterInit'](){const _0x25241d=this['editor']['plugins']['get'](j);_0x25241d['context']===this['editor']&&(_0x25241d['hasActive']()||_0x25241d['switchTo']('inline'));}['setActiveAnnotation'](_0x4420c9){_0x4420c9!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4420c9&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4420c9)&&this['_addAnnotationToBalloon'](_0x4420c9,!0x0),_0x4420c9['isActive']=!0x0),_0x4420c9||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4420c9);}['attach'](_0x3f9e6d){this['annotations']=_0x3f9e6d;const _0x2c740f=this['editor']['plugins']['get'](j),_0x1afd6a=this['_balloon'];if(this['isAttached'])throw new _0x53bd93('inlineannotations-attach-already-attached',this);if(_0x2c740f['context']!==this['editor'])throw new _0x53bd93('inlineannotations-not-allowed-with-context',this);const _0x2364f8=this['editor']['plugins']['get'](b);this['listenTo'](_0x2364f8,'refresh',()=>{const _0x458892=_0x2364f8['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x1ef393,_0x4f28fc;!this['_forceRefresh']&&(_0x1ef393=_0x458892,_0x4f28fc=this['_selectedAnnotations'],_0x1ef393['length']===_0x4f28fc['length']&&_0x1ef393['every'](_0x155857=>_0x4f28fc['includes'](_0x155857)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x458892),this['setActiveAnnotation'](_0x458892[0x0]||null));}),this['listenTo'](_0x2364f8,'blur',(_0x478616,{isAnnotationTracked:_0x1d3c67})=>{this['activeAnnotation']&&_0x1d3c67(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0xaa10a8,_0xa092fc,_0x4a9864)=>{_0x4a9864||this['setActiveAnnotation'](null);}),this['listenTo'](_0x3f9e6d,'remove',(_0x273841,_0x3ff3d)=>{this['_removeAnnotationFromBalloon'](_0x3ff3d),_0x3ff3d===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1afd6a,'change:visibleView',(_0x5b23a1,_0x2f8975,_0x37d7b5,_0xe73d6f)=>{_0xe73d6f&&this['stopListening'](_0xe73d6f);const _0x3efe44=_0x3f9e6d['getByView'](_0x37d7b5);_0x37d7b5&&_0x3efe44&&(this['listenTo'](_0x37d7b5,'change:height',()=>{_0x1afd6a['updatePosition']();}),this['listenTo'](_0x37d7b5,'Esc',()=>{this['_closeAnnotation'](_0x3efe44),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3efe44&&this['setActiveAnnotation'](_0x3efe44));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1afd6a['visibleView']&&(_0x3f9e6d['getByView'](_0x1afd6a['visibleView'])&&_0x1afd6a['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 _0x53bd93('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x1c9116 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x1c9116);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x5c32ab){for(const _0x365c3e of this['_selectedAnnotations'])_0x5c32ab['includes'](_0x365c3e)||this['_manuallyClosed']['delete'](_0x365c3e);for(const _0x57d4cf of this['annotations'])_0x5c32ab['includes'](_0x57d4cf)||this['_removeAnnotationFromBalloon'](_0x57d4cf);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x416b04 of _0x5c32ab)this['_addAnnotationToBalloon'](_0x416b04);}this['_selectedAnnotations']=_0x5c32ab;}['_addAnnotationToBalloon'](_0x595f79,_0x5c59c6=!0x1){this['_manuallyClosed']['has'](_0x595f79)||(this['_addedAnnotations']['has'](_0x595f79)||this['_balloon']['hasView'](_0x595f79['view'])||(this['_addedAnnotations']['add'](_0x595f79),this['_balloon']['add']({'stackId':_0x595f79['view']['id'],'view':_0x595f79['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x595f79)}})),_0x5c59c6&&this['_balloon']['showStack'](_0x595f79['view']['id']));}['_getBalloonTargetForAnnotation'](_0x39ebc7){const _0x9e7218=_0x39ebc7['target'],_0x1bb09d=this['editor']['editing']['view'],_0x1bae6b=_0x1bb09d['document']['selection']['getFirstRange'](),_0x3d1358=_0x1bb09d['domConverter']['viewRangeToDom'](_0x1bae6b);if(_0x3d1358['collapse'](!0x0),_0x9e7218){if(_0x9e7218 instanceof _0x5199db)return _0x9e7218;let _0x447ebb=[];for(const _0x323a51 of _0x9e7218)_0x447ebb['push'](...F(_0x323a51['getClientRects']()));_0x447ebb=function(_0xd635ed){const _0x5db184=[];let _0x21dd41=_0xd635ed[0x0];for(let _0x9eb488=0x1;_0x9eb488<_0xd635ed['length'];_0x9eb488++)P(_0x21dd41,_0xd635ed[_0x9eb488])?_0x21dd41['width']+=_0xd635ed[_0x9eb488]['width']:(_0x5db184['push'](_0x21dd41),_0x21dd41=_0xd635ed[_0x9eb488]);return _0x5db184['push'](_0x21dd41),_0x5db184;}(_0x447ebb);const _0x4b37aa=_0x3d1358['getBoundingClientRect']();return _0x447ebb['find'](_0x4fd70c=>_0x4fd70c['top']<=_0x4b37aa['top']&&_0x4fd70c['bottom']>=_0x4b37aa['bottom']&&_0x4fd70c['left']<=_0x4b37aa['left']&&_0x4fd70c['right']>=_0x4b37aa['right'])||_0x447ebb[0x0];}return _0x39ebc7['targetRect']||_0x3d1358;}['_removeAnnotationFromBalloon'](_0xdf063d){this['_addedAnnotations']['has'](_0xdf063d)&&this['_balloon']['hasView'](_0xdf063d['view'])&&(this['_addedAnnotations']['delete'](_0xdf063d),this['_balloon']['remove'](_0xdf063d['view']));}['_closeAnnotation'](_0x133029){this['_manuallyClosed']['add'](_0x133029),this['_removeAnnotationFromBalloon'](_0x133029);}}function F(_0x22e558){return Array['from'](_0x22e558)['map'](DOMRect['fromRect']);}function P(_0x455705,_0x5c0140){return _0x455705['top']===_0x5c0140['top']&&_0x455705['bottom']===_0x5c0140['bottom']&&_0x455705['right']===_0x5c0140['left'];}class Z extends xt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x55b6dc,_0x5dab07){super(_0x55b6dc),this['set']('isEmpty',!_0x5dab07['length']),this['focusTracker']=new _0x4d6aaa(),this['_annotationViews']=_0x5dab07,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x169d91({'focusables':_0x5dab07,'focusTracker':this['focusTracker']}),this['listenTo'](_0x5dab07,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x5dab07,'remove',(_0x5beba2,_0x517664)=>{_0x517664['isActive']&&this['focus'](),_0x5dab07['length']||(this['isEmpty']=!0x0);});const _0x1c281b=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x55b6dc,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x5dab07},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1c281b['if']('isEmpty','ck-hidden',_0x3fa82b=>!_0x3fa82b)]},'children':[{'text':N(_0x55b6dc,'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 _0x3bc2ad of this['_annotationViews'])this['focusTracker']['add'](_0x3bc2ad['element']);this['_annotationViews']['on']('change',(_0x213433,{added:_0x47e1f8,removed:_0x2c7018})=>{for(const _0x19de2e of _0x47e1f8)this['focusTracker']['add'](_0x19de2e['element']);for(const _0x32be8b of _0x2c7018)this['focusTracker']['remove'](_0x32be8b['element']);});}}class p extends _0x233d6c{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x88f984){super(_0x88f984),this['archivedThreads']=new _0x717f3a();}['init'](){const _0x3aafc2=this['context'],_0x252c55=_0x3aafc2['plugins']['get'](o),_0x16ab23=_0x3aafc2['plugins']['get'](y);this['listenTo'](_0x252c55,'addCommentThread',(_0x16e361,{threadId:_0x2e782c})=>{const _0x2a0870=_0x252c55['getCommentThread'](_0x2e782c);_0x2a0870['archivedAt']&&this['archivedThreads']['add'](_0x2a0870,this['_calculatePosition'](_0x2a0870['archivedAt'])),this['listenTo'](_0x2a0870,'change:archivedAt',(_0x1aa02d,_0x5f3a8d,_0x12078e)=>{_0x12078e?this['archivedThreads']['has'](_0x2a0870)||this['archivedThreads']['add'](_0x2a0870,this['_calculatePosition'](_0x2a0870['archivedAt'])):this['archivedThreads']['has'](_0x2a0870)&&this['archivedThreads']['remove'](_0x2a0870);});}),this['listenTo'](_0x252c55,'removeCommentThread',(_0x51bd46,{threadId:_0x24160c})=>{const _0x399d34=_0x252c55['getCommentThread'](_0x24160c);this['stopListening'](_0x399d34),this['archivedThreads']['has'](_0x399d34)&&this['archivedThreads']['remove'](_0x399d34);},{'priority':'highest'}),this['listenTo'](_0x16ab23['collection'],'focus',(_0x296101,_0xfb1bb7)=>{_0xfb1bb7['isVisible']||(_0xfb1bb7['isActive']=!0x0,_0x16ab23['activate'](_0xfb1bb7));});}['_calculatePosition'](_0x158a62){const _0x2379d2=[...this['archivedThreads']]['findIndex'](_0xfcd8e7=>_0xfcd8e7['archivedAt']<_0x158a62);return _0x2379d2>-0x1?_0x2379d2:this['archivedThreads']['length'];}}class a extends _0x369f89{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x46d5e2];}constructor(_0x49261a){super(_0x49261a),this['annotationViews']=new _0x50b2a9(),this['_pendingThreads']=[];}['init'](){const _0x3e0110=this['editor'],_0x165f47=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x3e0110['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x528043,!0x0)),_0x3e0110['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x5d8823=this['_createCommentsArchiveButton'](_0x4cb2be);return _0x5d8823['set']({'role':'menuitemcheckbox'}),_0x5d8823;});const _0x5a7485=_0x3e0110['plugins']['get'](p),_0x5419d8=_0x3e0110['plugins']['get']('Annotations'),_0x42e4df=_0x3e0110['plugins']['get']('CommentsRepository');_0x5a7485['archivedThreads']['forEach'](_0x3c4d63=>{this['_handleNewThread'](_0x3c4d63);}),this['listenTo'](_0x5a7485['archivedThreads'],'add',(_0x2ece9e,_0x3cff92)=>{this['_handleNewThread'](_0x3cff92);}),this['listenTo'](_0x5419d8['collection'],'add',(_0x4eae12,_0x57cd2b)=>{const _0xa49f78=this['_pendingThreads']['find'](_0x524a10=>{const _0x33a0de=_0x42e4df['_threadToController']['get'](_0x524a10);return _0x33a0de&&_0x57cd2b['innerView']===_0x33a0de['view'];});if(_0xa49f78){const _0x15bdd3=this['_calculatePosition'](_0xa49f78['archivedAt']);this['annotationViews']['add'](_0x57cd2b['view'],_0x15bdd3),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xa49f78),0x1);}}),this['listenTo'](_0x5a7485['archivedThreads'],'remove',(_0x2adeba,_0x5ba1f9)=>{const _0x276fc8=_0x3e0110['config']['get']('collaboration.channelId');if(!_0x276fc8||_0x5ba1f9['channelId']===_0x276fc8){if(this['_pendingThreads']['includes'](_0x5ba1f9))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5ba1f9),0x1);else{const _0x505f6a=_0x42e4df['_threadToController']['get'](_0x5ba1f9),_0x4beaed=_0x5419d8['getByInnerView'](_0x505f6a['view']);this['annotationViews']['remove'](_0x4beaed['view']),this['stopListening'](_0x4beaed['focusableElements']);}}}),this['listenTo'](_0x5419d8['collection'],'add',(_0x480701,_0x1e8dc2)=>{this['listenTo'](_0x1e8dc2,'escape',_0x165f47);}),this['listenTo'](_0x5419d8['collection'],'remove',(_0x3577ce,_0x5b866d)=>{this['stopListening'](_0x5b866d,'escape',_0x165f47);});}['_handleNewThread'](_0x4b96e3){const _0x55772b=this['editor']['plugins']['get']('CommentsRepository'),_0x27c45c=this['editor']['plugins']['get']('Annotations'),_0x5b1d90=this['editor']['config']['get']('collaboration.channelId');if(!_0x5b1d90||_0x4b96e3['channelId']===_0x5b1d90){const _0x5e9818=_0x55772b['_threadToController']['get'](_0x4b96e3);if(!_0x5e9818)return void this['_pendingThreads']['push'](_0x4b96e3);const _0x5a88a1=this['_calculatePosition'](_0x4b96e3['archivedAt']),_0x2e6348=_0x27c45c['getByInnerView'](_0x5e9818['view']);_0x2e6348['isVisible']&&_0x27c45c['_visibleAnnotations']['remove'](_0x2e6348),this['annotationViews']['add'](_0x2e6348['view'],_0x5a88a1);}}['_calculatePosition'](_0x28dc8d){const _0x2216c8=this['editor']['config']['get']('collaboration.channelId'),_0x228f2b=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x5931c9=>_0x5931c9['channelId']===_0x2216c8)['findIndex'](_0x3ae4ad=>_0x3ae4ad['archivedAt']<_0x28dc8d);return _0x228f2b<0x0||_0x228f2b>this['annotationViews']['length']?this['annotationViews']['length']:_0x228f2b-0x1;}['_toggleDialog'](){const _0x3a1ccc=this['editor'],_0xe4585d=_0x3a1ccc['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x3a1ccc['locale'],this['annotationViews'])),'commentsArchive'===_0xe4585d['id']?_0xe4585d['hide']():_0xe4585d['show']({'id':'commentsArchive','title':N(_0x3a1ccc['locale'],'COMMENTS_ARCHIVE'),'icon':_0x4cd35c,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x3abbff['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x32a741,_0x3012be=!0x1){const _0x36b404=this['editor']['locale'],_0x26f48b=this['editor']['plugins']['get']('Dialog'),_0x493728=new _0x32a741(_0x36b404);return _0x493728['bind']('isEnabled')['to'](this,'isEnabled'),_0x493728['bind']('isOn')['to'](_0x26f48b,'id',_0x59928d=>'commentsArchive'===_0x59928d),_0x493728['set']({'label':N(_0x36b404,'COMMENTS_ARCHIVE'),'icon':_0x4cd35c,'isToggleable':!0x0}),_0x3012be&&(_0x493728['tooltip']=!0x0),this['listenTo'](_0x493728,'execute',()=>this['_toggleDialog']()),_0x493728;}['_hideDialogOnAnnotationEscape']=_0x2bd202=>{const _0x1afd9f=_0x2bd202['source'];if(!this['annotationViews']['has'](_0x1afd9f['view']))return;const _0x28d1d5=this['editor']['plugins']['get']('Dialog');_0x28d1d5['isOpen']&&'commentsArchive'===_0x28d1d5['id']&&(_0x28d1d5['hide'](),_0x2bd202['stop']());};}class gi extends _0x369f89{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|