@ckeditor/ckeditor5-comments 44.0.0-alpha.6 → 44.0.0-alpha.8
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/LICENSE.md +7 -7
- package/README.md +9 -5
- package/build/comments.js +1 -1
- package/dist/index.js +9 -9
- 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/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 +15 -15
- 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 +1 -1
- package/src/annotations/view/sidebarview.js +1 -1
- 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/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x3ecc2a={}){function _0x2cb2bf(_0x186354){return _0x186354['map'](_0x21ac42=>String['fromCharCode'](_0x21ac42))['join']('');}(_0x3ecc2a=Object['assign']({},_0x3ecc2a))['plugins']||(_0x3ecc2a['plugins']=Rt['defaultPlugins']),super(_0x3ecc2a),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x2cb2bf([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2cb2bf([0x76,0x69,0x65,0x77])][_0x2cb2bf([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2cb2bf([0x61,0x75,0x74,0x6f]),this[_0x2cb2bf([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x2cb2bf([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2cb2bf([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x2cb2bf([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x2cb2bf([0x6f,0x6b])});}['create'](){const _0x51381b=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x51381b))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x16dcd1=>{const _0x260f4d=this['model']['document']['getRoot'](),_0x58e608=_0x260f4d&&_0x260f4d['getChild'](_0x260f4d['childCount']-0x1);_0x16dcd1['setSelection'](_0x58e608,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x45abae=this['editing']['view'],_0x2e335a=_0x45abae['document']['getRoot'](),_0xa4841c=_0x2e335a['getChild'](0x0);_0x2e335a['childCount']>0x1||!_0xa4841c||'p'!=_0xa4841c['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(zt(_0x45abae,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0xa4841c['placeholder']=this['placeholder']),St({'view':_0x45abae,'element':_0xa4841c,'keepOnFocus':!0x0}),this['placeholderElement']=_0xa4841c);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x103f37,_0x119f78={}){super(_0x103f37),this['editor']=null,this['_editorConfig']=_0x119f78,this['set']('value',_0x119f78['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',S(_0x103f37,'Reply...')),this['set']('submitLabel',S(_0x103f37,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x35dbc6(),this['focusCycler']=new Ft({'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',(_0xbe389a,_0x3c7527)=>{this['cancelButtonView']['fire']('execute'),_0x3c7527();}),this['keystrokes']['set']('Ctrl+Enter',(_0x47da38,_0x24250f)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x24250f());}),this['on']('submit',(_0x2d049c,_0x592ea7)=>{_0x592ea7['length']>0xfde8?(alert(S(_0x103f37,'TOO_LONG_COMMENT_ALERT',[_0x592ea7['length'],0xfde8])),_0x2d049c['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 _0x3e0b13=this['editor'];this['element']['insertBefore'](_0x3e0b13['ui']['element'],this['element']['firstChild']),_0x3e0b13['model']['document']['on']('change',()=>this['value']=_0x3e0b13['getData']()),_0x3e0b13['bind']('placeholder')['to'](this),this['focusables']['add'](_0x3e0b13['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x166836){-0x1===_0x166836?(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:_0x21d3e6}=this,_0x3c4388=new _0x6ad9e9(_0x21d3e6);return _0x3c4388['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x3c4388['withText']=!0x0,_0x3c4388['bind']('label')['to'](this,'submitLabel'),_0x3c4388['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x3c4388['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x5e61c5,_0x3265be)=>!_0x3265be&&!!_0x5e61c5['trim']()),_0x3c4388;}['_createCancelButton'](){const {locale:_0x36709a}=this,_0x4a3d26=new _0x6ad9e9(_0x36709a);return _0x4a3d26['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x4a3d26['label']=S(_0x36709a,'Cancel'),_0x4a3d26['withText']=!0x0,_0x4a3d26['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x4a3d26;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x3f78a7=>{this['focusTracker']['add'](_0x3f78a7['element']);}),this['focusables']['on']('change',(_0x2c7113,_0x291398)=>{for(const _0x3f7521 of Array['from'](_0x291398['added'])['reverse']())this['focusTracker']['add'](_0x3f7521['element']);});}}class ie extends kt{constructor(_0xf66856,_0x3e1e46,_0x3f79c8){super(_0xf66856),this['commentInputView']=new hs(_0xf66856,_0x3f79c8),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x403db4,_0x285194)=>_0x403db4||!!_0x285194),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 _0x4f5e2d(_0xf66856,_0x3e1e46),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'](_0x5c6582){this['commentInputView']['focus'](_0x5c6582);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x4cafdc,_0x2a156c)=>{const {submitButtonView:_0x1f3cb3,cancelButtonView:_0x4eb33a,editor:_0x261b49}=this['commentInputView'];[_0x1f3cb3['element'],_0x4eb33a['element'],_0x261b49?_0x261b49['editing']['view']['getDomRoot']():null]['filter'](_0x45e8ac=>_0x45e8ac)['some'](_0x273d3b=>_0x273d3b['contains'](_0x2a156c['target']))||(this['focus'](),_0x2a156c['preventDefault']());});}}class cs extends kt{constructor(_0x3b10ae){super(_0x3b10ae);const _0x2f4699=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x2f4699['to']('count',_0x231c61=>S(_0x3b10ae,'NUMBER_OF_COMMENTS',_0x231c61))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x3682d5,_0x501f32,_0x550099){super(_0x3682d5);const _0x30ff50=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x501f32['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x501f32,this['_config']=_0x550099,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x35dbc6(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x42b2da=>this['commentViews']['map'](_0x277864=>_0x277864['element'])['includes'](_0x42b2da['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x3682d5),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x25a9be=>_0x25a9be-this['_config']['maxCommentsWhenCollapsed']);for(const _0x149691 of _0x501f32['comments'])this['_handleNewCommentModel'](_0x149691);this['_handleInfoComment'](),this['listenTo'](_0x501f32['comments'],'add',(_0x1c2a0b,_0x91a404)=>{const _0x3567c4=this['_calculatePosition'](_0x91a404);this['length']++,this['_handleNewCommentModel'](_0x91a404,_0x3567c4),this['refreshVisibleViews']();}),this['listenTo'](_0x501f32['comments'],'remove',(_0xba67a1,_0x2c0498)=>{this['length']--,this['_handleRemoveCommentModel'](_0x2c0498),this['refreshVisibleViews']();}),this['listenTo'](_0x501f32,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x501f32,'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',_0x30ff50['if']('length','ck-hidden',_0x2ae4a7=>!_0x2ae4a7)],'aria-label':S(_0x3682d5,'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'](_0x60d7ac){-0x1===_0x60d7ac?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0xed5dab of this['commentViews'])_0xed5dab['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x130952,_0x308523){const _0x1b6c13=new this['_config']['CommentView'](this['locale'],_0x130952,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x1b6c13['viewUid']=_0x130952['id'],_0x1b6c13['delegate']('removeComment')['to'](this),_0x1b6c13['delegate']('updateComment')['to'](this),_0x1b6c13['delegate']('resolveCommentThread')['to'](this),_0x1b6c13['delegate']('editorReady')['to'](this),_0x1b6c13['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x1b6c13,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x1b6c13,_0x308523);}['_calculatePosition'](_0x21c261){const _0x36b7fb=this['_model']['_findOptimalIndex'](_0x21c261);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x21c261['authoredAt']?_0x36b7fb-0x1:_0x36b7fb:_0x36b7fb-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x58876e={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':S(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x58876e,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x58876e));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x12059d){const _0xc2432c=this['commentViews']['remove'](_0x12059d['id']);this['stopListening'](_0xc2432c),_0xc2432c['isEditMode']&&this['_updateHasDirtyComment'](),_0xc2432c['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x1cc42b=>_0x1cc42b['isEditMode']);}['_rearrangeCollapse'](){const _0xce4d75=function(_0x2d62d4){const _0x14de48=new _0x37f3a3();for(const _0xf64ac7 of _0x2d62d4)_0x14de48['add'](_0xf64ac7);return _0x14de48;}(this['commentViews']),_0x7d297f=this['_collapsedCommentsView']['count'];for(let _0x54de66=0x1;_0x54de66<=_0x7d297f;_0x54de66++)_0xce4d75['remove'](0x1);for(const _0x107a32 of _0xce4d75)_0x107a32['collapse']();_0x7d297f>0x0&&_0xce4d75['add'](this['_collapsedCommentsView'],0x1),ns(_0x4f9fa3(Array['from'](this['visibleViews']),Array['from'](_0xce4d75)),this['visibleViews'],_0xce4d75);}['_rearrangeExpand'](){ns(_0x4f9fa3(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x50e74f of this['visibleViews'])_0x50e74f['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x266ac1=>{this['focusTracker']['add'](_0x266ac1['element']),this['keystrokes']['listenTo'](_0x266ac1['element']);}),this['commentViews']['on']('change',(_0x5dee45,_0x20c6ed)=>{for(const _0x3d0e96 of _0x20c6ed['removed'])this['focusTracker']['remove'](_0x3d0e96['element']),this['keystrokes']['stopListening'](_0x3d0e96['element']);for(const _0x316027 of Array['from'](_0x20c6ed['added'])['reverse']())this['focusTracker']['add'](_0x316027['element']),this['keystrokes']['listenTo'](_0x316027['element']);});}}function ns(_0x159401,_0x3ab29d,_0x5cf1e7){let _0x2e1cb2=0x0;for(const _0x456eb0 of _0x159401)switch(_0x456eb0){case'insert':_0x3ab29d['add'](_0x5cf1e7['get'](_0x2e1cb2),_0x2e1cb2),_0x2e1cb2++;break;case'delete':_0x3ab29d['remove'](_0x2e1cb2);break;case'equal':_0x2e1cb2++;}}class as extends kt{constructor(_0xb98ecf){super(_0xb98ecf);const _0x4a18fe=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x4a18fe['to']('contextValue',_0x5cbf3f=>S(_0xb98ecf,'THREAD_CONTEXT_LABEL',_0x5cbf3f)),'tabindex':-0x1},'children':[{'text':_0x4a18fe['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3c9aab,_0x457e5a){super(_0x3c9aab);const _0x2e1623=this['bindTemplate'];this['_model']=_0x457e5a,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x35dbc6(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x1f7824=>!!_0x1f7824),this['bind']('contextValue')['to'](this['_model'],'context',_0x276bee=>_0x276bee&&_0x276bee['value']?this['_trimContextValue'](_0x276bee['value']):S(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',_0x2e1623['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 _0xcbaaa7=new _0x6ad9e9(this['locale']);return _0xcbaaa7['label']=S(this['locale'],'Reopen'),_0xcbaaa7['tooltip']=S(this['locale'],'Reopen'),_0xcbaaa7['icon']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22m5.042\x209.367\x202.189\x201.837a.75.75\x200\x200\x201-.965\x201.149l-3.788-3.18a.747.747\x200\x200\x201-.21-.284.75.75\x200\x200\x201\x20.17-.945L6.23\x204.762a.75.75\x200\x201\x201\x20.964\x201.15L4.863\x207.866h8.917A.75.75\x200\x200\x201\x2014\x207.9a4\x204\x200\x201\x201-1.477\x207.718l.344-1.489a2.5\x202.5\x200\x201\x200\x201.094-4.73l.008-.032H5.042z\x22/></svg>',_0xcbaaa7['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x209ae6=>!_0x209ae6),_0xcbaaa7['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2d33d8,_0x2845ee)=>_0x2d33d8&&_0x2845ee),_0xcbaaa7['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0xcbaaa7;}['_trimContextValue'](_0x3c3a21){if(_0x3c3a21['length']<0x96)return _0x3c3a21;const _0x5b6964=_0x3c3a21['lastIndexOf']('\x20',0x93);return _0x3c3a21['substring'](0x0,_0x5b6964>-0x1?_0x5b6964:0x93)+'...';}['_attachContextActions'](){const _0xea9fa3=this['element']['querySelector']('.ck-context'),_0x471712=_0xea9fa3['querySelector']('.ck-context__value');this['listenTo'](_0xea9fa3,'mouseenter',()=>{_0x471712['offsetWidth']<_0x471712['scrollWidth']&&_0xea9fa3['classList']['add']('overlay');}),this['listenTo'](_0xea9fa3,'mouseleave',()=>{_0xea9fa3['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x5bac1b of this['focusables'])this['focusTracker']['add'](_0x5bac1b['element']),this['keystrokes']['listenTo'](_0x5bac1b['element']);}['_createContextView'](){const _0x39e592=new as(this['locale']);return _0x39e592['bind']('contextValue')['to'](this),_0x39e592;}}class ss extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x3d2521,_0x3328,_0xf6c4ab,_0x44cd0b){super(_0x3d2521),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3328,this['_localUser']=_0xf6c4ab,this['_config']=_0x44cd0b,this['commentThreadHeaderView']=new Yt(_0x3d2521,_0x3328),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x3d2521,S(_0x3d2521,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x3d2521,_0x3328,Object['assign']({'CommentView':this['_config']['CommentView']},_0x44cd0b)),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',(_0x4e2cf8,_0x528d25)=>_0x4e2cf8||!!_0x528d25),this['bind']('isUnlinked')['to'](_0x3328,'unlinkedAt',_0x2ff57b=>!!_0x2ff57b),this['bind']('ariaLabel')['to'](this,'length',_0x54a3f2=>{const _0x3edf83=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return S(this['locale'],'COMMENT_THREAD_LABEL',[_0x54a3f2,_0x3edf83]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x35dbc6(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x66da9f=>_0x66da9f['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 _0x2b6edb=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x183156=_0x2b6edb['commentInputView'];return _0x2b6edb['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x183156,'value',(_0x47fd70,_0xce0323,_0x2ff1d2,_0x226b84,_0x543651)=>!!_0x543651||!!_0x226b84&&_0x2ff1d2&&!_0xce0323||_0x47fd70&&_0x2ff1d2&&!_0xce0323),_0x183156['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x1977bc,_0x3498e8,_0x510c90)=>{let _0x50093e;return _0x50093e=_0x510c90&&_0x3498e8?'Reply\x20to\x20reopen\x20discussion...':_0x1977bc?'Reply...':'Write\x20a\x20comment...',S(this['locale'],_0x50093e);}),_0x183156['bind']('submitLabel')['to'](this,'length',_0x2ac85b=>S(this['locale'],_0x2ac85b?'Reply':'Comment')),_0x183156['on']('submit',(_0x47cb6c,_0x2e0a96)=>{this['fire']('addComment',_0x2e0a96),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x183156['on']('cancel',()=>{this['focus']();}),_0x183156['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x183156['on']('cancel',_0x1d9ce4=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x1d9ce4['stop']());}),this['on']('change:isActive',(_0x1eea80,_0x1582f8,_0x5d44ed)=>{_0x5d44ed||this['length']||_0x183156['value']||this['fire']('removeCommentThread');}),_0x2b6edb;}}class Ct extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(ss){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(os){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x34d1d5(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x45ea33,target:_0x296b04,type:_0x5cb1cb,isVisible:_0x38d609=!0x0}){super(),this['view']=_0x45ea33,this['view']['element']||this['view']['render'](),this['_type']=_0x5cb1cb,this['_target']=_0x296b04,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x37f3a3([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5d1b02,_0x44a1cb)=>{this['view']['focusTracker']['add'](_0x44a1cb);}),this['focusableElements']['on']('remove',(_0x42569d,_0x12c0b5)=>{this['view']['focusTracker']['remove'](_0x12c0b5);}),this['set']('isVisible',_0x38d609);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x4397a9=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x4397a9),_0x4397a9;}get['targetRect'](){const _0x11a3d4=this['target'];if(null===_0x11a3d4)return null;if(_0x11a3d4 instanceof _0x59f6c8)return _0x11a3d4;const _0x1b2005=_0x11a3d4['filter'](_0x15294f=>function(_0x105daf){const _0x4b64a2=_0x105daf['offsetParent'];if(_0x4b64a2)return!0x0;const _0x193175=_0x105daf['getClientRects']()['item'](0x0);return!!_0x193175;}(_0x15294f));return 0x0===_0x1b2005['length']?null:new _0x59f6c8(_0x1b2005[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5ce4df){this['view']['isActive']=_0x5ce4df,this['view']['mainView']['isActive']=_0x5ce4df;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x2ecfb0){if(!(null===_0x2ecfb0||_0x2ecfb0 instanceof _0x59f6c8||Array['isArray'](_0x2ecfb0)&&_0x2ecfb0['every'](_0x16696a=>ne(_0x16696a))))throw new _0x3648c2('annotation-invalid-target',null,{'target':_0x2ecfb0});}['_getNormalizedTarget'](){const _0x3a1920='function'==typeof this['_target']?this['_target']():this['_target'];return ne(_0x3a1920)?[_0x3a1920]:_0x3a1920;}}function ne(_0x2ce018){return null!==_0x2ce018&&'object'==typeof _0x2ce018&&'nodeType'in _0x2ce018&&0x1===_0x2ce018['nodeType'];}class x extends _0x37f3a3{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x30c9ca=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x35dbc6(),this['_focusTracker']['on']('change:isFocused',(_0x361ea5,_0x1ebe97,_0x242bdf)=>{_0x242bdf||this['fire']('blur');});for(const _0x4d0a3e of _0x30c9ca)this['add'](_0x4d0a3e);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x1305a3){if(this['has'](_0x1305a3))throw new _0x3648c2('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x1305a3['innerView'],_0x1305a3),this['_viewToAnnotation']['set'](_0x1305a3['view'],_0x1305a3);for(const _0x51bfe1 of _0x1305a3['focusableElements'])this['_focusTracker']['add'](_0x51bfe1);this['listenTo'](_0x1305a3['focusableElements'],'add',(_0x53a51b,_0x59e977)=>{this['_focusTracker']['add'](_0x59e977);}),this['listenTo'](_0x1305a3['focusableElements'],'remove',(_0xc2738a,_0x3c44b7)=>{this['_focusTracker']['remove'](_0x3c44b7);}),this['listenTo'](_0x1305a3['view']['focusTracker'],'change:isFocused',(_0x169669,_0x566bbc,_0x2016b2)=>{_0x2016b2&&this['fire']('focus',_0x1305a3);}),_0x1305a3['updateTargetRect']();const _0x2dded8=this['_getOrderInContent'](_0x1305a3['view']['targetRect']);return super['add'](_0x1305a3,_0x2dded8);}['remove'](_0x53093d){if(!this['has'](_0x53093d))throw new _0x3648c2('annotationcollection-not-existing-item',null);this['stopListening'](_0x53093d['view']['focusTracker']),this['stopListening'](_0x53093d['focusableElements']);for(const _0x287017 of _0x53093d['focusableElements'])this['_focusTracker']['remove'](_0x287017);return this['_viewToAnnotation']['delete'](_0x53093d['view']),this['_innerViewToAnnotation']['delete'](_0x53093d['innerView']),super['remove'](_0x53093d);}['getByInnerView'](_0x1e1708){return this['_innerViewToAnnotation']['get'](_0x1e1708);}['getByView'](_0x5dcdc2){return this['_viewToAnnotation']['get'](_0x5dcdc2);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x3ccfd7 of this)_0x3ccfd7['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3c049a=Array['from'](this)['sort']((_0x35393b,_0x2c9672)=>v(_0x35393b['view']['targetRect'],_0x2c9672['view']['targetRect']));for(let _0x212d7d=_0x3c049a['length']-0x1;_0x212d7d>0x0;_0x212d7d--){const _0x24889b=_0x3c049a[_0x212d7d];_0x212d7d!==this['getIndex'](_0x24889b)&&(this['remove'](_0x24889b),this['add'](_0x24889b));}}['_getOrderInContent'](_0x6de00e){let _0xba3575=0x0;if(!_0x6de00e)return this['length'];for(const _0x44e414 of this){const _0x91ecc9=_0x44e414['view']['targetRect'];if(_0x91ecc9){if(v(_0x6de00e,_0x91ecc9)<0x0)return _0xba3575;_0xba3575++;}}return _0xba3575;}}function v(_0x225da8,_0x494175){if(null===_0x225da8&&null===_0x494175)return 0x0;if(null===_0x225da8)return-0x1;if(null===_0x494175)return 0x1;const _0x524694=_0x225da8['top']-_0x494175['top'];return 0x0==_0x524694?_0x225da8['left']-_0x494175['left']:_0x524694;}class N extends _0xe30f87{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ae1b3){if(super(_0x3ae1b3),this['collection']=new x(),this['_visibleAnnotations']=new x(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3ae1b3 instanceof _0x298dba){const _0x4ccebb=_0x3ae1b3['locale'];_0x3ae1b3['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':S(_0x4ccebb,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':S(_0x4ccebb,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':S(_0x4ccebb,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':S(_0x4ccebb,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':S(_0x4ccebb,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':S(_0x4ccebb,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':S(_0x4ccebb,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x34f844){this['collection']['add'](_0x34f844);}['remove'](_0x459c5f){this['collection']['remove'](_0x459c5f),_0x459c5f['destroy']();}['refreshVisibility'](){for(const _0x9b9b9f of this['collection'])_0x9b9b9f['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x6f7d27){return this['collection']['getByInnerView'](_0x6f7d27);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x4dac57 of this['collection'])_0x4dac57['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0xf06835){this['fire']('_activateAnnotation',_0xf06835);}['createAnnotation'](_0x5dd6f4){return new d(_0x5dd6f4);}['createAnnotationView'](_0x39d961,_0xca0f59){return new T(_0x39d961,_0xca0f59);}['_addActiveAnnotation'](_0x13f25f){const _0x5d2f20=new Set(this['activeAnnotations']);_0x5d2f20['add'](_0x13f25f),this['activeAnnotations']=_0x5d2f20;}['_removeActiveAnnotation'](_0x1b4d1a){const _0x34ffef=new Set(this['activeAnnotations']);_0x34ffef['delete'](_0x1b4d1a),this['activeAnnotations']=_0x34ffef;}['_bindAnnotationsToVisibleAnnotations'](){const _0x30a438=this['collection'],_0x632a83=this['_visibleAnnotations'];function _0xe72d36(_0x134833){const _0x2ce218=_0x134833['source'];_0x2ce218['isVisible']&&!_0x632a83['has'](_0x2ce218)?_0x632a83['add'](_0x2ce218):!_0x2ce218['isVisible']&&_0x632a83['has'](_0x2ce218)&&_0x632a83['remove'](_0x2ce218),_0x2ce218['view']['focusTracker']['remove'](_0x2ce218['view']['element']),_0x2ce218['view']['focusTracker']['add'](_0x2ce218['view']['element']);}this['listenTo'](_0x30a438,'add',(_0x4567ae,_0x39f24b)=>{_0x39f24b['isVisible']&&_0x632a83['add'](_0x39f24b),this['listenTo'](_0x39f24b,'change:isVisible',_0xe72d36);}),this['listenTo'](_0x30a438,'remove',(_0x4d5c4d,_0x36785a)=>{_0x632a83['has'](_0x36785a)&&_0x632a83['remove'](_0x36785a),this['stopListening'](_0x36785a,'change:isVisible',_0xe72d36);});}['_setupEnterAnnotationKeystroke'](){const _0x50a45f=_0x21bee8=>{_0x21bee8['on']('ready',()=>{_0x21bee8['keystrokes']['set'](_0x571455,(_0x3a375f,_0x1256c0)=>{const _0x579749=_0x571fc1(this['activeAnnotations']['values']());_0x579749&&(_0x579749['view']['focus'](),_0x1256c0());});});};this['context']instanceof _0x298dba?_0x50a45f(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x2fedc1,_0xd97a8f)=>{_0x50a45f(_0xd97a8f);});}['_setupEscapeAnnotationHandling'](){const _0x1d9b19=_0xb69172=>{const _0x55fd08=_0xb69172['source'],_0x37e617=[];let _0x1fa136;if(Array['isArray'](_0x55fd08['target'])){_0x1fa136=_0x55fd08['target'][0x0],this['context']instanceof _0x298dba?_0x37e617['push'](this['context']):this['context']['editors']&&_0x37e617['push'](...this['context']['editors']);for(const _0x106d42 of _0x37e617)for(const _0x2bfe57 of _0x106d42['editing']['view']['domRoots']['values']())if(_0x2bfe57['contains'](_0x1fa136))return void _0x106d42['editing']['view']['focus']();_0x1fa136['focus']();}};this['listenTo'](this['collection'],'add',(_0x568581,_0x3ef1d8)=>{this['listenTo'](_0x3ef1d8,'escape',_0x1d9b19,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x4ad701,_0x5587d4)=>{this['stopListening'](_0x5587d4,'escape',_0x1d9b19);});}}const gt=Symbol('noChannel'),Tt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0xe30f87{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[N,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2d5078){super(_0x2d5078),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x348048=this['context']['config'];_0x348048['define']('comments.maxCommentsWhenCollapsed',0x2),_0x348048['define']('comments.maxThreadTotalWeight',0x1f4),_0x348048['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x348048['define']('comments.CommentThreadView',Ct),_0x348048['define']('comments.CommentView',vt),_0x348048['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x527427=this['context']['plugins']['get'](N);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x90a2a8,_0x534044)=>this['_addCommentThread'](_0x534044)),this['on']('submitCommentThread',(_0x49a8fe,_0x1f27d5)=>this['_submitCommentThread'](_0x1f27d5)),this['on']('resolveCommentThread',(_0x5492a3,_0x370c1f)=>this['_resolveCommentThread'](_0x370c1f)),this['on']('resolveCommentThread',(_0x3f50cc,_0x26dab6)=>this['_updateActiveAnnotation'](_0x26dab6),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x537535,_0xc4ea20)=>this['_reopenCommentThread'](_0xc4ea20)),this['on']('reopenCommentThread',(_0x25a7a9,_0x7ef341)=>this['_updateActiveAnnotation'](_0x7ef341),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x52a50c,_0x925da1)=>this['_removeCommentThread'](_0x925da1)),this['on']('updateCommentThread',(_0xa85f9d,_0x43a142)=>this['_updateCommentThread'](_0x43a142)),this['on']('updateCommentThread',(_0x1f6cd9,_0x2535fc)=>this['_updateActiveAnnotation'](_0x2535fc),{'priority':'lowest'}),this['on']('addComment',(_0x41d89e,_0x286075)=>this['_addComment'](_0x286075)),this['on']('updateComment',(_0x3e9189,_0x5049a2)=>this['_updateComment'](_0x5049a2)),this['on']('removeComment',(_0x2980ac,_0x1f5295)=>this['_removeComment'](_0x1f5295)),this['on']('addComment',(_0x31a257,{threadId:_0x26b38e,isFromAdapter:_0x480443})=>{if(_0x480443)return;const _0xe9dc04=this['getCommentThread'](_0x26b38e),_0x127bb8=_0xe9dc04&&this['_threadToController']['get'](_0xe9dc04);_0x127bb8&&_0x127bb8['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x527427,'change:activeAnnotations',(_0x4ba539,_0x42fa0d,_0x5ebca7)=>{const _0x577c98=Array['from'](_0x5ebca7)['map'](_0x4bceb6=>this['_viewToController']['get'](_0x4bceb6['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x577c98?_0x577c98['model']:null;});}set['adapter'](_0x3d91d9){if(this['_adapter'])throw new _0x3648c2('commentsrepository-adapter-already-set');this['_adapter']=_0x3d91d9;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x3ca85e=gt,threadId:_0x5dd7bb=_0x14c3a1(),comments:_0x4a2f5e=[],unlinkedAt:_0x5ba757=null,resolvedAt:_0x14438b=null,resolvedBy:_0x2b5ca9=null,target:_0x9e4787=null,context:_0x227c4f=null,attributes:_0x331fca={},isResolvable:_0x60f198=!0x0,isSubmitted:_0x2c264b=!0x1,isFromAdapter:_0x367838=!0x1}={}){return this['fire'](_t('addCommentThread',_0x3ca85e),{'channelId':_0x3ca85e,'threadId':_0x5dd7bb,'comments':_0x4a2f5e,'unlinkedAt':_0x5ba757,'resolvedAt':_0x14438b,'resolvedBy':_0x2b5ca9,'target':_0x9e4787,'context':_0x227c4f,'attributes':_0x331fca,'isFromAdapter':_0x367838,'isResolvable':_0x60f198,'isSubmitted':_0x2c264b}),this['getCommentThread'](_0x5dd7bb);}['openNewCommentThread']({channelId:_0x1c0575=gt,threadId:_0x4c3948=_0x14c3a1(),target:_0x220997,context:_0x4f0984=null,isResolvable:_0x4a2a17=!0x0}){if(this['_readOnlyChannels']['has'](_0x1c0575)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x220997)throw new _0x3648c2('commentsrepository-missing-target');const _0x305f2b=this['addCommentThread']({'channelId':_0x1c0575,'threadId':_0x4c3948,'target':_0x220997,'context':_0x4f0984,'isResolvable':_0x4a2a17});if(!_0x305f2b)return null;const _0x2dc1ca=this['_threadToController']['get'](_0x305f2b),_0x2558ec=_0x2dc1ca['view']['commentThreadInputView']['commentInputView'],_0x4ae233=this['context']['plugins']['get'](N),_0x204478=_0x4ae233['getByInnerView'](_0x2dc1ca['view']);return _0x4ae233['activate'](_0x204478),_0x2558ec['once']('editorReady',()=>_0x2558ec['focus']()),_0x305f2b;}['hasCommentThread'](_0x5001a1){if('string'!=typeof _0x5001a1)throw new _0x3648c2('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x5001a1);}['updateCommentThread']({channelId:_0x1b3708=gt,threadId:_0x38a8a4,context:_0x106ba3,unlinkedAt:_0x48ab0d,attributes:_0x31bc84,isFromAdapter:_0x3f899b=!0x1}){return this['fire'](_t('updateCommentThread',_0x1b3708),{'channelId':_0x1b3708,'threadId':_0x38a8a4,'context':_0x106ba3,'unlinkedAt':_0x48ab0d,'attributes':_0x31bc84,'isFromAdapter':_0x3f899b}),this['getCommentThread'](_0x38a8a4);}['getCommentThread'](_0x1ca0cd){if('string'!=typeof _0x1ca0cd)throw new _0x3648c2('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1ca0cd);}['fetchCommentThread']({channelId:_0xda3668,threadId:_0x55d27d}={}){const _0x29c9ce=this['getCommentThread'](_0x55d27d);if(_0x29c9ce)return Promise['resolve'](_0x29c9ce);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x3648c2('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0xda3668,'threadId':_0x55d27d})['then'](_0x100e90=>this['hasCommentThread'](_0x55d27d)?this['getCommentThread'](_0x55d27d):_0x100e90?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0xda3668},_0x100e90)):void 0x0)['catch'](_0x539b77=>{throw console['error'](_0x539b77),new _0x3648c2('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x28aafc,skipNotAttached:_0x52c75e=!0x1,skipEmpty:_0x5217a1=!0x1,toJSON:_0x1e9ace=!0x1}={}){const _0x558dcf=[];for(const _0x3b0ff1 of this['_threads']['values']())_0x28aafc&&_0x3b0ff1['channelId']!==_0x28aafc||_0x52c75e&&!_0x3b0ff1['isAttached']||_0x5217a1&&0x0===_0x3b0ff1['length']||_0x558dcf['push'](_0x3b0ff1);return _0x1e9ace?_0x558dcf['map'](_0x3b2957=>_0x3b2957['toJSON']()):_0x558dcf;}['setActiveCommentThread'](_0x43df06){const _0x9ce6b2=this['context']['plugins']['get'](N);if(!_0x43df06)return void(this['activeCommentThread']&&_0x9ce6b2['deactivateAll']());const _0x42eb53=this['getCommentThread'](_0x43df06);if(!_0x42eb53)throw new _0x3648c2('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x43df06});if(!this['_threadToController']['has'](_0x42eb53))throw new _0x3648c2('commentsrepository-active-not-attached',null,{'threadId':_0x43df06});const _0x691c6d=_0x9ce6b2['getByInnerView'](this['_threadToController']['get'](_0x42eb53)['view']);_0x9ce6b2['activate'](_0x691c6d);}['switchReadOnly'](_0x121336,_0x501fa2){_0x121336?this['_readOnlyChannels']['add'](_0x501fa2):this['_readOnlyChannels']['delete'](_0x501fa2),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x38ec29){return this['_readOnlyChannels']['has'](_0x38ec29)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x38027e,_0x124c3d){return new yt(_0x38027e,_0x124c3d);}['setPermissions'](_0x55dc90,_0x26e2a5=gt){this['_permissions']['set'](_0x26e2a5,_0x55dc90),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x2549f5=gt){return this['_permissions']['has'](_0x2549f5)?this['_permissions']['get'](_0x2549f5):Tt;}['_addCommentThread']({channelId:_0x5df96b,threadId:_0x4a00e0,comments:_0x167a0c,unlinkedAt:_0x2e364e,resolvedAt:_0xcc4743,resolvedBy:_0x5828e3,target:_0x370a30,context:_0x5bb692,attributes:_0x317d56,isFromAdapter:_0x425136,isResolvable:_0x2a2dac,isSubmitted:_0x1ef089}){if('string'!=typeof _0x4a00e0)throw new _0x3648c2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4a00e0});if(this['hasCommentThread'](_0x4a00e0))throw new _0x3648c2('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x4a00e0});const _0x142f2d=new oe(this,{'channelId':_0x5df96b,'id':_0x4a00e0,'context':_0x5bb692,'attributes':_0x317d56,'unlinkedAt':_0x2e364e,'resolvedAt':_0xcc4743,'resolvedBy':_0x5828e3?this['context']['plugins']['get'](it)['getUser'](_0x5828e3):null,'isResolvable':_0x2a2dac,'isSubmitted':_0x1ef089||_0x425136});this['_threads']['set'](_0x4a00e0,_0x142f2d);for(const _0x47ae26 of _0x167a0c)_0x142f2d['_add'](this['_createNewComment']({'threadId':_0x4a00e0,..._0x47ae26}));return _0x370a30&&_0x142f2d['attachTo'](_0x370a30),_0x425136||!_0x142f2d['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x5df96b,'threadId':_0x4a00e0});}['_submitCommentThread']({channelId:_0x5a4aec,threadId:_0x233420}){if(!this['hasCommentThread'](_0x233420))throw new _0x3648c2('commentsrepository-missing-comment-thread',this);const _0x582aa6=this['getCommentThread'](_0x233420);if(_0x582aa6['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x3581e9,comments:_0x439d23,resolvedAt:_0xad1920,resolvedBy:_0x209e67,context:_0x27d08b,attributes:_0x3cab21}=_0x582aa6,_0x145822=this['context']['plugins']['get']('PendingActions'),_0x4ad5f8=_0x145822['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x5a4aec,'threadId':_0x3581e9,'comments':_0x439d23['map'](_0x268618=>_0x268618['toJSON']()),'resolvedAt':_0xad1920,'resolvedBy':_0x209e67?_0x209e67['id']:_0x209e67,'context':_0x27d08b,'attributes':_0x3cab21})['then'](({comments:_0x72ec5a})=>{_0x145822['remove'](_0x4ad5f8);for(const _0x38d9c7 of _0x72ec5a)this['_updateComment']({'channelId':_0x5a4aec,'threadId':_0x233420,'commentId':_0x38d9c7['commentId'],'createdAt':_0x38d9c7['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x317c8e=>{throw console['error'](_0x317c8e),new _0x3648c2('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0xecdc21,target:_0x3137ce}){const _0x195e42=this['getCommentThread'](_0xecdc21);if(!_0x195e42)throw new _0x3648c2('commentsrepository-attach-missing-comment-thread',this);const _0x398d2d=this['context']['plugins']['get']('PendingActions'),_0x4503e7=this['context']['plugins']['get'](N),_0x141231=this['_createCommentThreadView'](_0x195e42),_0x53ca3e=new yt(_0x195e42,_0x141231);let _0x4499b3=null;_0x141231['on']('change:isDirty',(_0x297ba5,_0x3a06f5,_0x5dca65)=>{_0x5dca65?_0x4499b3=_0x398d2d['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x4499b3&&(_0x398d2d['remove'](_0x4499b3),_0x4499b3=null);}),this['_threadToController']['set'](_0x195e42,_0x53ca3e),this['_viewToController']['set'](_0x141231,_0x53ca3e);const _0x461b7a=new T(this['context']['locale'],_0x141231);_0x461b7a['bind']('length')['to'](_0x141231),_0x461b7a['bind']('isDirty')['to'](_0x141231,'isDirty',_0x141231,'length',(_0x254cc3,_0x498a07)=>_0x254cc3||!_0x498a07),_0x461b7a['bind']('isActive')['to'](_0x141231),_0x461b7a['type']='comment';const _0x328742=new d({'view':_0x461b7a,'target':_0x3137ce,'type':'comment','isVisible':!_0x195e42['isResolved']});return _0x141231['on']('escape',()=>{_0x328742['fire']('escape');}),this['_bindAnnotationToEditors'](_0x141231,_0x328742),_0x4503e7['add'](_0x328742),_0x328742;}['_bindAnnotationToEditors'](_0x3a73c1,_0x1ef8bb){this['listenTo'](_0x3a73c1,'editorReady',(_0x51f626,_0xf8587f)=>{const _0x13bb3e=_0xf8587f['ui']['view']['body']['bodyCollectionContainer'];_0x1ef8bb['focusableElements']['add'](_0x13bb3e),this['context']instanceof _0x298dba&&this['context']['ui']['focusTracker']['add'](_0x13bb3e);},{'priority':'highest'}),this['listenTo'](_0x3a73c1,'editorDestroyed',(_0x590be2,_0x2ba36c)=>{const _0x3a30a7=_0x2ba36c['ui']['view']['body']['bodyCollectionContainer'];_0x1ef8bb['focusableElements']['has'](_0x3a30a7)&&_0x1ef8bb['focusableElements']['remove'](_0x3a30a7),this['context']instanceof _0x298dba&&this['context']['ui']['focusTracker']['remove'](_0x3a30a7);});}['_unbindEditors'](_0x401ab1){this['stopListening'](_0x401ab1,'editorReady'),this['stopListening'](_0x401ab1,'editorDestroyed');}['_createCommentThreadView'](_0x36ce4d){const _0x16b2cb=this['context']['plugins']['get'](it),{config:_0x1242dc,locale:_0x4cb073}=this['context'],_0x5b3768=mt(_0x1242dc['get']('locale'));return new(0x0,(_0x1242dc['get']('comments'))['CommentThreadView'])(_0x4cb073,_0x36ce4d,_0x16b2cb['me'],{'editorConfig':{..._0x1242dc['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x1242dc['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x1242dc['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x1242dc['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x1242dc['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5b3768,'CommentView':_0x1242dc['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x28bc69,channelId:_0x3c60e6,resolvedAt:_0x3e7b63,resolvedBy:_0x4833a2,isFromAdapter:_0x21082f}){if(!this['hasCommentThread'](_0x28bc69))throw new _0x3648c2('commentsrepository-missing-comment-thread',null,{'threadId':_0x28bc69});const _0x440840=this['getCommentThread'](_0x28bc69);if(_0x440840['isResolved'])throw new _0x3648c2('commentsrepository-resolved-comment-thread',null,{'threadId':_0x28bc69});const _0x3e40e9=this['context']['plugins']['get'](it);if(_0x440840['resolvedBy']=_0x3e40e9['getUser'](_0x4833a2),_0x440840['resolvedAt']=_0x3e7b63,_0x21082f||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x366d58=this['context']['plugins']['get']('PendingActions'),_0x28933e=_0x366d58['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x3c60e6,'threadId':_0x28bc69})['then'](({resolvedAt:_0x4f6690,resolvedBy:_0x37e90f})=>{_0x366d58['remove'](_0x28933e),_0x440840['resolvedBy']['id']!==_0x37e90f&&(_0x440840['resolvedBy']=_0x3e40e9['getUser'](_0x37e90f)),_0x440840['resolvedAt']=_0x4f6690;})['catch'](_0x200bda=>{throw console['error'](_0x200bda),new _0x3648c2('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3d29ad,channelId:_0x1d42ec,isFromAdapter:_0x101840}){if(!this['hasCommentThread'](_0x3d29ad))throw new _0x3648c2('commentsrepository-missing-comment-thread',null,{'threadId':_0x3d29ad});const _0x15b619=this['getCommentThread'](_0x3d29ad);if(!_0x15b619['isResolved'])throw new _0x3648c2('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3d29ad});if(_0x15b619['resolvedBy']=null,_0x15b619['resolvedAt']=null,_0x101840||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x49772b=this['context']['plugins']['get']('PendingActions'),_0x18837c=_0x49772b['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1d42ec,'threadId':_0x3d29ad})['then'](()=>_0x49772b['remove'](_0x18837c))['catch'](_0x385318=>{throw console['error'](_0x385318),new _0x3648c2('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x312ade,isFromAdapter:_0x100ebc}){const _0x6399a3=this['getCommentThread'](_0x312ade);if(!_0x6399a3)throw new _0x3648c2('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x312ade),this['_threads']['delete'](_0x312ade),!_0x6399a3['isSubmitted']||_0x100ebc||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xa3efad=this['context']['plugins']['get']('PendingActions'),{channelId:_0x1decfd}=_0x6399a3,_0x3f31d9=_0xa3efad['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x1decfd,'threadId':_0x312ade})['then'](()=>_0xa3efad['remove'](_0x3f31d9))['catch'](_0xffc136=>{throw console['error'](_0xffc136),new _0x3648c2('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x5758d6,unlinkedAt:_0x1fcdff,context:_0x26af57,attributes:_0x357cda,isFromAdapter:_0x15905a}){if('string'!=typeof _0x5758d6)throw new _0x3648c2('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x5758d6});if(!this['hasCommentThread'](_0x5758d6))throw new _0x3648c2('commentsrepository-missing-comment-thread',null,{'threadId':_0x5758d6});const _0x4e3496=this['getCommentThread'](_0x5758d6);let _0x59973b=!0x1;if(void 0x0!==_0x26af57&&_0x4e3496['context']!==_0x26af57&&(_0x4e3496['context']=_0x26af57,_0x59973b=!0x0),void 0x0!==_0x1fcdff&&_0x4e3496['unlinkedAt']!==_0x1fcdff&&(_0x4e3496['unlinkedAt']=_0x1fcdff,_0x59973b=!0x0),_0x357cda&&!It(_0x357cda,_0x4e3496['attributes'])&&(_0x4e3496['attributes']=_0x357cda,_0x59973b=!0x0),!_0x59973b)return Promise['resolve']();if(!_0x4e3496['isSubmitted']||_0x15905a||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x4a29e0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2ae395}=_0x4e3496,_0x345262=_0x4a29e0['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x2ae395,'threadId':_0x5758d6,'context':_0x26af57,'unlinkedAt':_0x1fcdff,'attributes':_0x357cda})['then'](()=>_0x4a29e0['remove'](_0x345262))['catch'](_0x57a555=>{throw console['error'](_0x57a555),new _0x3648c2('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x43193b){const _0x1d1d63=this['context']['plugins']['get'](N),_0x141bcb=this['getCommentThread'](_0x43193b);if(this['_threadToController']['has'](_0x141bcb)){const _0x1ddb4e=this['_threadToController']['get'](_0x141bcb),_0x1ab6bb=_0x1ddb4e['view'],_0x6231cd=_0x1d1d63['getByInnerView'](_0x1ab6bb);this['_threadToController']['delete'](_0x141bcb),this['_viewToController']['delete'](_0x1ab6bb),_0x6231cd&&_0x1d1d63['remove'](_0x6231cd),_0x1ddb4e['destroy'](),_0x1ab6bb['destroy']()['then'](()=>{this['_unbindEditors'](_0x1ab6bb);});}}['_updateActiveAnnotation']({threadId:_0x214ce0,resolvedAt:_0x15ea9a}){const _0x2a7311=!!_0x15ea9a,_0x5c26e1=this['context']['plugins']['get'](N),_0x3a2b52=this['getCommentThread'](_0x214ce0);if(this['_threadToController']['has'](_0x3a2b52)){const _0x37f2f6=this['_threadToController']['get'](_0x3a2b52)['view'],_0x4f9a2f=_0x5c26e1['getByInnerView'](_0x37f2f6);_0x4f9a2f&&(_0x2a7311&&_0x5c26e1['_removeActiveAnnotation'](_0x4f9a2f),_0x4f9a2f['refreshVisibility']());}}['_getExternalAuthor'](_0x2110d3){const _0x43293a=this['context']['plugins']['get'](it),_0x4f567d=lt('external:'+_0x2110d3),_0x376772=_0x43293a['getUser'](_0x4f567d);return _0x376772||_0x43293a['addUser']({'id':_0x4f567d,'name':_0x2110d3});}['_createNewComment']({threadId:_0x48647e,commentId:_0x1b632c=_0x14c3a1(),content:_0x3e5ebf,authorId:_0xbf5bb1,createdAt:_0x1e5ee3,attributes:_0x1fdaec}){if('string'!=typeof _0x1b632c)throw new _0x3648c2('commentsrepository-invalid-commentid');if('string'!=typeof _0xbf5bb1)throw new _0x3648c2('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x3e5ebf||!_0x3e5ebf['trim']())throw new _0x3648c2('commentsrepository-invalid-comment-content');const _0x18bb70=this['context']['plugins']['get'](it)['getUser'](_0xbf5bb1);if(!_0x18bb70)throw new _0x3648c2('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0xbf5bb1});let _0x37a084=null,_0x46653=_0x1e5ee3;return _0x1fdaec&&_0x1fdaec['@external']&&(_0x37a084=this['_getExternalAuthor'](_0x1fdaec['@external']['authorName']),_0x46653=new Date(_0x1fdaec['@external']['createdAt'])),new re(this,{'threadId':_0x48647e,'id':_0x1b632c,'author':_0x37a084||_0x18bb70,'creator':_0x18bb70,'content':_0x3e5ebf,'createdAt':_0x1e5ee3,'authoredAt':_0x46653,'attributes':_0x1fdaec});}['_addComment'](_0x2df07c){let {threadId:_0x165a7f,content:_0x3d9326,attributes:_0x5cbf32,isFromAdapter:_0x4567f9}=_0x2df07c;const _0x543284=this['getCommentThread'](_0x2df07c['threadId']);if(!_0x543284)throw new _0x3648c2('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x2f3973=this['_createNewComment'](_0x2df07c),{id:_0x9d68b3}=_0x2f3973;if(_0x543284['_add'](_0x2f3973),_0x4567f9||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x543284['isSubmitted'])return Promise['resolve']();const _0x4c549f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3be3a6}=_0x543284,_0x4bf10b=_0x4c549f['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x5cbf32||(_0x5cbf32={}),this['adapter']['addComment']({'channelId':_0x3be3a6,'threadId':_0x165a7f,'commentId':_0x9d68b3,'content':_0x3d9326,'attributes':_0x5cbf32})['then'](_0x5043ac=>{_0x4c549f['remove'](_0x4bf10b),_0x5043ac&&this['_updateComment']({'channelId':_0x3be3a6,'threadId':_0x165a7f,'commentId':_0x9d68b3,'createdAt':_0x5043ac['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x179fa7=>{throw console['error'](_0x179fa7),new _0x3648c2('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x506d72,commentId:_0x2112e5,content:_0x56478e,createdAt:_0x837e73,attributes:_0x5806a7,isFromAdapter:_0x1d0230}){if(void 0x0!==_0x56478e&&('string'!=typeof _0x56478e||!_0x56478e['trim']()['length']))throw new _0x3648c2('commentsrepository-update-comment-invalid-content');const _0x91fb38=this['getCommentThread'](_0x506d72),_0xd84b11=_0x91fb38['getComment'](_0x2112e5);if(!_0xd84b11)throw new _0x3648c2('commentsrepository-update-missing-comment',this);let _0x33c448=!0x1;if(_0x56478e&&_0x56478e!==_0xd84b11['content']&&(_0xd84b11['isEditable']||_0x1d0230)&&(_0xd84b11['content']=_0x56478e,_0x33c448=!0x0),_0x837e73&&_0x837e73!==_0xd84b11['createdAt']&&(_0xd84b11['createdAt']=_0x837e73,_0xd84b11['attributes']&&_0xd84b11['attributes']['@external']||(_0xd84b11['authoredAt']=_0x837e73),_0x33c448=!0x0),_0x5806a7&&!It(_0x5806a7,_0xd84b11['attributes'])&&(_0xd84b11['attributes']=_0x5806a7,_0x33c448=!0x0),!_0x33c448)return Promise['resolve']();if(_0x91fb38['fire']('commentUpdated'),_0x1d0230||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x54fa77=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5abc96}=this['getCommentThread'](_0xd84b11['threadId']),_0x1a4552=_0x54fa77['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x5abc96,'threadId':_0x506d72,'commentId':_0x2112e5,'content':_0x56478e,'attributes':_0x5806a7})['then'](()=>_0x54fa77['remove'](_0x1a4552))['catch'](_0x1ed2f3=>{throw console['error'](_0x1ed2f3),new _0x3648c2('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x29487e,commentId:_0x3eb02b,isFromAdapter:_0x4800cb}){const _0x404847=this['getCommentThread'](_0x29487e),_0x15f32f=_0x404847['getComment'](_0x3eb02b);if(!_0x15f32f)throw new _0x3648c2('commentsrepository-remove-missing-comment',this);if(_0x404847['_remove'](_0x15f32f),_0x4800cb||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x351392=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3eb3ff}=_0x404847,_0x5c1291=_0x351392['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3eb3ff,'threadId':_0x29487e,'commentId':_0x3eb02b})['then'](()=>_0x351392['remove'](_0x5c1291))['catch'](_0x470605=>{throw console['error'](_0x470605),new _0x3648c2('commentsrepository-remove-comment-internal-error',this);});}}class oe extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x34d1d5(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x5251b0,_0x516f61){super();const _0x358c6e=_0x5251b0['context']['plugins']['get'](it)['me'],_0x84c1e2=_0x5251b0['getCommentThread'](_0x516f61['threadId']),_0x50170e=0x0===_0x84c1e2['comments']['length'],_0x5707b2=_0x358c6e===_0x516f61['author'];this['id']=_0x516f61['id'],this['threadId']=_0x516f61['threadId'],this['author']=_0x516f61['author'],this['creator']=_0x516f61['creator'],this['isExternal']=Boolean(_0x516f61['attributes']&&_0x516f61['attributes']['@external']),this['set']('content',_0x516f61['content']),this['createdAt']=_0x516f61['createdAt']||new Date(),this['set']('authoredAt',_0x516f61['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x84c1e2,'resolvedAt'),this['set']('attributes',_0x516f61['attributes']||{}),this['bind']('isEditable')['to'](_0x5251b0,'_permissions',()=>{const _0x4e48d4=_0x5251b0['getPermissions'](_0x84c1e2['channelId'])['write'],_0x587f63=_0x5251b0['getPermissions'](_0x84c1e2['channelId'])['modifyAll'];return _0x5707b2&&_0x4e48d4||!_0x5707b2&&_0x587f63;}),this['bind']('isRemovable')['to'](_0x84c1e2,'isRemovable',_0x5251b0,'_permissions',_0x4d360d=>{const _0xcc737b=_0x5251b0['getPermissions'](_0x84c1e2['channelId'])['write'],_0xfa2035=_0x5251b0['getPermissions'](_0x84c1e2['channelId'])['modifyAll'];return _0x5707b2&&_0xcc737b||_0x4d360d&&_0x50170e||!_0x5707b2&&_0xfa2035&&!_0x50170e;}),this['bind']('isReadOnly')['to'](_0x84c1e2,'isReadOnly'),this['_repository']=_0x5251b0;}get['weight'](){return Math['max'](function(_0x2c33ca){const _0x2cf170=document['createElement']('div');return _0x2cf170['innerHTML']=_0x2c33ca,_0x2cf170['textContent']['length'];}(this['content']),0xc8);}['update'](_0x207fcf){const {threadId:_0x371d9b,id:_0x4391bd}=this;if(!this['_repository']['hasCommentThread'](_0x371d9b))throw new _0x3648c2('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x3e2c85}=this['_repository']['getCommentThread'](_0x371d9b);this['_repository']['fire'](_t('updateComment',_0x3e2c85,_0x371d9b),{'channelId':_0x3e2c85,'threadId':_0x371d9b,'commentId':_0x4391bd,..._0x207fcf});}['setAttribute'](_0x4646c2,_0x1af8c6){const _0x222290=pt(this['attributes']);wt(_0x222290,_0x4646c2,_0x1af8c6),this['update']({'attributes':_0x222290});}['removeAttribute'](_0x333afb){const _0xba51c7=pt(this['attributes']);At(_0xba51c7,_0x333afb),this['update']({'attributes':_0xba51c7});}['remove'](_0x44b919={}){if(!_0x44b919['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x36e13d,id:_0x124836}=this;if(!this['_repository']['hasCommentThread'](_0x36e13d))throw new _0x3648c2('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x20aa00}=this['_repository']['getCommentThread'](_0x36e13d);this['_repository']['fire'](_t('removeComment',_0x20aa00,_0x36e13d),{'channelId':_0x20aa00,'threadId':_0x36e13d,'commentId':_0x124836,..._0x44b919});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function _t(_0x3b7862,..._0x32b705){for(const _0x2692a5 of _0x32b705)void 0x0!==_0x2692a5&&(_0x3b7862+=':'+String(_0x2692a5));return _0x3b7862;}class J extends _0x3d2bf9{['refresh'](){const _0x520ce4=this['editor']['model']['document']['selection'];for(const _0xb41997 of _0x520ce4['getRanges']())if(this['_hasContent'](_0xb41997))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x22ec70=_0x14c3a1()}={}){const _0xded215=this['editor']['model'],_0xe4bbff=[];for(const _0x1294df of _0xded215['document']['selection']['getRanges']())this['_hasContent'](_0x1294df)&&_0xe4bbff['push'](this['_trimToContent'](_0x1294df));_0xded215['change'](_0x21894d=>{for(const _0x2b9024 of _0xe4bbff){const _0x2fd7f1=_0x14c3a1()['substr'](0x1,0x5),_0x54f8be='comment:'+_0x22ec70+':'+_0x2fd7f1;_0x21894d['addMarker'](_0x54f8be,{'range':_0x2b9024,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x59f719){for(const _0x1f2c47 of _0x59f719['getItems']())if(this['_itemIsContent'](_0x1f2c47))return!0x0;return!0x1;}['_itemIsContent'](_0x5a5efa){return _0x5a5efa['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5a5efa)&&!_0x5a5efa['is']('element','tableCell');}['_trimToContent'](_0x3f9afc){const _0x23292e=_0x3b8e7f=>!this['_itemIsContent'](_0x3b8e7f['item']),_0x501663=_0x3f9afc['start']['getLastMatchingPosition'](_0x23292e),_0xbb615=_0x3f9afc['end']['getLastMatchingPosition'](_0x23292e,{'direction':'backward'});return this['editor']['model']['createRange'](_0x501663,_0xbb615);}}class P extends _0x534d76{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[N];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5cffa2){super(_0x5cffa2),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4dcf90=this['editor'],_0x1dccd7=_0x4dcf90['model']['document']['selection'],_0x116bee=_0x432163(()=>this['refreshSelectedViews'](),0xa);_0x1dccd7['on']('change:range',(_0x3538d8,_0x32607d)=>{_0x32607d['directChange']&&(_0x116bee['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4dcf90['editing']['view']['document'],'change:isFocused',(_0x53bd2e,_0x1a3d56,_0x400678)=>{_0x400678&&_0x116bee();}),this['listenTo'](_0x4dcf90['ui']['focusTracker'],'change:isFocused',(_0x5c0445,_0x451afc,_0x3a0985)=>{_0x3a0985||_0x4dcf90['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x30ff2c=>this['_editorAnnotationsData']['has'](_0x30ff2c['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3c5fbf){if(this['_editorAnnotations']['has'](_0x3c5fbf['view']))return;this['_editorAnnotations']['add'](_0x3c5fbf['view']),this['editor']['ui']['focusTracker']['add'](_0x3c5fbf['view']['element']);const _0x4fa94d=this['editor']['plugins']['get'](N);this['listenTo'](_0x4fa94d['collection'],'remove',(_0x4b4e36,_0x260d3c)=>{this['editor']['ui']['focusTracker']['remove'](_0x260d3c['view']['element']),this['_editorAnnotations']['delete'](_0x260d3c['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x38f5b9){if('function'!=typeof _0x38f5b9)throw new _0x3648c2('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x38f5b9);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x1196f7,annotations:_0x5c5520}){const _0xb2dbfb=[],_0x5f2426=this['editor']['model']['document']['selection'],_0x4a6b51=Array['from'](_0x5f2426['getRanges']());for(const [_0x14ad4a,_0x2f11d8]of this['_editorAnnotationsData']){const _0x1f2911=_0x1cc593(_0x2f11d8),_0x144509=_0x5c5520['getByInnerView'](_0x14ad4a);_0x1f2911&&_0x144509&&_0xb2dbfb['push']({'annotation':_0x144509,'range':_0x1f2911});}function _0x1cc593(_0x4b13eb){for(const _0x3c1ff9 of _0x4b13eb)for(const _0x12b4c0 of _0x4a6b51)if(_0x3c1ff9['containsRange'](_0x12b4c0,!_0x5f2426['isCollapsed']))return _0x3c1ff9;return null;}return _0xb2dbfb['sort']((_0x3192bb,_0x18183c)=>{const _0x519dde=_0x3192bb['range'],_0x16a4d7=_0x18183c['range'];if(!_0x519dde['isEqual'](_0x16a4d7)){if(_0x519dde['containsRange'](_0x16a4d7,!0x0))return 0x1;if(_0x16a4d7['containsRange'](_0x519dde,!0x0))return-0x1;}return _0x3192bb['annotation']==_0x1196f7?-0x1:_0x18183c['annotation']==_0x1196f7?0x1:0x0;})['map'](_0x5732b3=>_0x5732b3['annotation']);}get['_editorAnnotationsData'](){const _0x5376ad=new Map();for(const _0x31d0e9 of Array['from'](this['_dataCollectors']))for(const [_0x5a1823,_0x246f1f]of _0x31d0e9())_0x5376ad['set'](_0x5a1823,_0x246f1f);return _0x5376ad;}}class st extends _0x534d76{['afterInit'](){const _0x31c283=this['editor'];if(!_0x31c283['plugins']['has']('RestrictedEditingModeEditing'))return;_0x31c283['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x534d76{constructor(_0x251ea9){super(_0x251ea9),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x36bede=this['editor'],_0x5f482e=_0x36bede['commands']['get']('importWord'),_0x2253f6=_0x36bede['plugins']['get'](it);_0x5f482e&&(_0x5f482e['on']('execute',(_0x2aa3b5,[,_0x462f69])=>{_0x462f69['collaboration_features']={'comments':!0x0,'user_id':_0x2253f6['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x5f482e,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x1e2f25,_0xd33fb3){const {comment_threads:_0x144f82}=_0xd33fb3;_0x144f82&&_0x144f82['forEach'](({thread_id:_0x330f6f,comments:_0x3ca64d,is_resolved:_0x4ba3ed})=>{const _0x41afec=new Date(),_0x5d396c=_0x3ca64d['map'](({author:_0x512666,content:_0x500124,created_at:_0x813802})=>({'content':_0x500124,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x41afec,'attributes':{'@external':{'authorName':_0x512666,'createdAt':_0x813802?new Date(_0x813802):new Date(),'source':'importWord'}}})),_0x239ea0=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x239ea0,'threadId':_0x330f6f,'comments':_0x5d396c,'resolvedAt':_0x4ba3ed?_0x41afec:null});});}}class at extends _0x534d76{constructor(_0x15938d){super(_0x15938d),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x1cf55f=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x1cf55f,'contentInsertion',(_0x3e3c61,_0x1d80a0)=>this['_removeMarkersWithoutThreads'](_0x1d80a0['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xeef5f1){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xeef5f1;const _0x1236e5=this['editor']['plugins']['get']('CommentsRepository');for(const _0x552b34 of _0xeef5f1['keys']()){const [_0x1abfc2,_0x1a4c22]=_0x552b34['split'](':');'comment'!=_0x1abfc2||_0x1236e5['hasCommentThread'](_0x1a4c22)||_0xeef5f1['delete'](_0x552b34);}return _0xeef5f1;}['_registerMarkerInClipboardPipeline'](){const _0x225e17=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x48fb59=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x48fb59&&_0x225e17['_registerMarkerToCopy']('comment',_0x48fb59);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1ceb8b){switch(_0x1ceb8b){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class r extends _0x534d76{static get['requires'](){return[o,P,it,st,ct,at];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x333b89){super(_0x333b89),this['set']('isThreadsLoadingPaused',!0x0),_0x333b89['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x103302,_0x1a5c0f,_0x5d2dc7,_0x44e697)=>{const _0xb377f8=_0x5d2dc7?he(_0x5d2dc7)['id']:null;if(_0x333b89['model']['change'](()=>{if(_0xb377f8){const _0x3c3b5e=this['getAllMarkersForId'](_0xb377f8);for(const _0x1df4e5 of _0x3c3b5e)_0x333b89['editing']['reconvertMarker'](_0x1df4e5);}if(_0x44e697){const {id:_0x154673}=he(_0x44e697),_0x4c3864=this['getAllMarkersForId'](_0x154673);for(const _0x4fc41e of _0x4c3864)_0x333b89['editing']['reconvertMarker'](_0x4fc41e);}}),_0xb377f8){const _0x55efe7=_0x333b89['plugins']['get'](o)['getCommentThread'](_0xb377f8);_0x55efe7&&_0x55efe7['isResolved']&&this['scrollToThreadMarker'](_0xb377f8);}}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x6c4055=this['editor'],_0x1626b8=_0x6c4055['plugins']['get'](o),_0x4d5ad9=_0x6c4055['config']['get']('collaboration.channelId');_0x6c4055['commands']['add']('addCommentThread',new J(_0x6c4055)),this['listenTo'](_0x6c4055,'change:isReadOnly',(_0x3e1760,_0x5e7f01,_0x101659)=>{_0x1626b8['switchReadOnly'](_0x101659,_0x6c4055['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x1626b8,ut('addCommentThread',_0x4d5ad9),(_0x1a2b28,{threadId:_0xedc434})=>{const _0x54a776=this['editor']['plugins']['get'](o)['getCommentThread'](_0xedc434);_0x54a776&&_0x54a776['unlinkedAt']&&this['_attachArchivedThread'](_0xedc434);}),this['listenTo'](_0x1626b8,ut('removeCommentThread',_0x4d5ad9),(_0x2ae955,{threadId:_0x5ec6d3})=>{_0x6c4055['model']['enqueueChange']({'isUndoable':!0x1},_0x22b1f7=>{const _0x5cbf84=this['getAllMarkersForId'](_0x5ec6d3);for(const _0x532d0f of _0x5cbf84)_0x22b1f7['removeMarker'](_0x532d0f);});}),this['listenTo'](_0x1626b8,ut('resolveCommentThread',_0x4d5ad9),(_0xda0836,{threadId:_0x42ad1e})=>{(this['_reconvertMarkers'](_0x42ad1e),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x42ad1e)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x1626b8,ut('reopenCommentThread',_0x4d5ad9),(_0x3e4a99,{threadId:_0x3a59e3})=>{this['_reconvertMarkers'](_0x3a59e3);},{'priority':'low'}),this['listenTo'](_0x1626b8,ut('addComment',_0x4d5ad9),(_0x387385,{threadId:_0x5702f3,isFromAdapter:_0x1cbca6})=>{const _0xcc758d=this['getAllMarkersForId'](_0x5702f3);if(_0x1cbca6||0x0==_0xcc758d['length']||!_0x1626b8['hasCommentThread'](_0x5702f3))return;0x1===_0x1626b8['getCommentThread'](_0x5702f3)['length']&&_0x6c4055['model']['enqueueChange']({'isUndoable':!0x1},_0x264494=>{for(const _0x54febd of _0xcc758d)_0x264494['updateMarker'](_0x54febd,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove']();}['afterInit'](){!async function(_0xe6229){const _0xb9547=_0x2b03bb([0x31,0x58,0x4b,0x46,0x41,0x7a,0x38,0x76,0x6d,0x77,0x4f,0x59,0x50,0x48,0x39,0x57,0x53,0x5a,0x56,0x34,0x4c,0x72,0x71,0x4d,0x69,0x70,0x6e,0x54,0x32,0x6c,0x62,0x65,0x78,0x30,0x6f,0x6a,0x52,0x66,0x73,0x55,0x6b,0x33,0x44,0x63,0x74,0x51,0x35,0x68,0x64,0x36,0x42,0x43,0x4a,0x47,0x49,0x75,0x45,0x37,0x61,0x67,0x4e,0x79]),_0xc97f41=0xe2a83a4,_0x54a903=0xe2dd45c^_0xc97f41,_0x38a752=window[_0x2b03bb([0x44,0x61,0x74,0x65])][_0x2b03bb([0x6e,0x6f,0x77])](),_0x41e94=_0xe6229[_0x2b03bb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x3af710=new window[(_0x2b03bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x42a20f=>{_0x41e94[_0x2b03bb([0x6f,0x6e,0x63,0x65])](_0x2b03bb([0x72,0x65,0x61,0x64,0x79]),_0x42a20f);}),_0xd57593={[_0x2b03bb([0x6b,0x74,0x79])]:_0x2b03bb([0x45,0x43]),[_0x2b03bb([0x75,0x73,0x65])]:_0x2b03bb([0x73,0x69,0x67]),[_0x2b03bb([0x63,0x72,0x76])]:_0x2b03bb([0x50,0x2d,0x32,0x35,0x36]),[_0x2b03bb([0x78])]:_0x2b03bb([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]),[_0x2b03bb([0x79])]:_0x2b03bb([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]),[_0x2b03bb([0x61,0x6c,0x67])]:_0x2b03bb([0x45,0x53,0x32,0x35,0x36])},_0x40cb5f=_0x41e94[_0x2b03bb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x2b03bb([0x67,0x65,0x74])](_0x2b03bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x4c389b(){let _0x328568,_0xca81de=null,_0x38e9c1=null;try{if(_0x40cb5f==_0x2b03bb([0x47,0x50,0x4c]))return _0x2b03bb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x328568=_0x5ee3f0(),!_0x328568)return _0x2b03bb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x328568[_0x2b03bb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x38e9c1=_0x438f87(_0x328568[_0x2b03bb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x328568[_0x2b03bb([0x6a,0x74,0x69])])),await _0x7cb2ef()?_0x4b7502()?_0x39f2ce()?_0x2b03bb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x347a29()?(_0x328568[_0x2b03bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2b03bb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0xca81de=_0xe9fd3d(_0x2b03bb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x328568[_0x2b03bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2b03bb([0x74,0x72,0x69,0x61,0x6c])&&(_0xca81de=_0xe9fd3d(_0x2b03bb([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x328568[_0x2b03bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x2b03bb([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0xca81de=_0xe9fd3d(_0x2b03bb([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x4f6cc3()):_0x2b03bb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x2b03bb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x2b03bb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0xd25baa){return _0x2b03bb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x39f2ce(){const _0x1e04d5=[_0x2b03bb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x2b03bb([0x74,0x72,0x69,0x61,0x6c])][_0x2b03bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x328568[_0x2b03bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x38a752/0x3e8:0xe10*_0x54a903;return _0x328568[_0x2b03bb([0x65,0x78,0x70])]<_0x1e04d5;}function _0x4b7502(){const _0x35bc54=_0x328568[_0x2b03bb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x35bc54&&(!!_0x35bc54[_0x2b03bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b03bb([0x2a]))||(!!_0x35bc54[_0x2b03bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b03bb([0x43,0x4d,0x54]))||!(!_0x35bc54[_0x2b03bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b03bb([0x52,0x43,0x4d,0x54]))||!_0x55e144())));}function _0x347a29(){const _0x3fffda=_0x328568[_0x2b03bb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x3fffda||0x0==_0x3fffda[_0x2b03bb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x3c0093}=new URL(window[_0x2b03bb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x3fffda[_0x2b03bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x3c0093))return!0x0;const _0x2cb0eb=_0x3c0093[_0x2b03bb([0x73,0x70,0x6c,0x69,0x74])](_0x2b03bb([0x2e]));return _0x3fffda[_0x2b03bb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x11b1d3=>_0x11b1d3[_0x2b03bb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x2b03bb([0x2a])))[_0x2b03bb([0x6d,0x61,0x70])](_0x259af3=>_0x259af3[_0x2b03bb([0x73,0x70,0x6c,0x69,0x74])](_0x2b03bb([0x2e])))[_0x2b03bb([0x73,0x6f,0x6d,0x65])](_0x13384b=>_0x2cb0eb[_0x2b03bb([0x65,0x76,0x65,0x72,0x79])]((_0x47b640,_0xc07565)=>_0x13384b[_0xc07565]===_0x47b640||_0x13384b[_0xc07565]===_0x2b03bb([0x2a])));}function _0x4f6cc3(){return _0xca81de&&_0x38e9c1?new window[(_0x2b03bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x2a03b7,_0x315f3e)=>{_0xca81de[_0x2b03bb([0x74,0x68,0x65,0x6e])](_0x2a03b7,_0x315f3e),_0x38e9c1[_0x2b03bb([0x74,0x68,0x65,0x6e])](_0x172548=>{_0x172548!=_0x2b03bb([0x56,0x61,0x6c,0x69,0x64])&&_0x2a03b7(_0x172548);},_0x315f3e);}):_0xca81de||_0x38e9c1||_0x2b03bb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x438f87(_0x576add,_0x3f49d2){return new window[(_0x2b03bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2c9d85=>{if(_0x3997f7())return _0x2c9d85(_0x2b03bb([0x56,0x61,0x6c,0x69,0x64]));_0x32a612(),_0x41e94[_0x2b03bb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x2b03bb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x18981f=!0x1;const _0x2f0e85=_0x14c3a1();function _0x41d425(_0x1f16fe){return!!_0x1f16fe&&(typeof _0x1f16fe===_0x2b03bb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x1f16fe===_0x2b03bb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x1f16fe[_0x2b03bb([0x74,0x68,0x65,0x6e])]===_0x2b03bb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x1f16fe[_0x2b03bb([0x63,0x61,0x74,0x63,0x68])]===_0x2b03bb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x7a9667(_0x207beb){_0x5a7d87(_0x207beb)[_0x2b03bb([0x74,0x68,0x65,0x6e])](_0x5f3bd9=>{if(!_0x5f3bd9||_0x5f3bd9[_0x2b03bb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x2b03bb([0x6f,0x6b]))return _0x2b03bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x210214(_0x3cad71(_0x2f0e85+_0x3f49d2))!=_0x5f3bd9[_0x2b03bb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x2b03bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x2b03bb([0x56,0x61,0x6c,0x69,0x64]);})[_0x2b03bb([0x74,0x68,0x65,0x6e])](_0x1ced1c=>(_0x5413c5(),_0x1ced1c),()=>{const _0x1ad988=_0x2a02d2();return null==_0x1ad988?(_0x5413c5(),_0x2b03bb([0x56,0x61,0x6c,0x69,0x64])):_0x2b03bb(_0x38a752-_0x1ad988>(0x2a2607a4^_0xc97f41)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x2b03bb([0x74,0x68,0x65,0x6e])](_0x2c9d85)[_0x2b03bb([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2c9d85(_0x2b03bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x26308c=0xe1c6d24^_0xc97f41;function _0x5413c5(){const _0x326a0d=_0x2b03bb([0x6c,0x6c,0x63,0x74,0x2d])+_0x210214(_0x3cad71(_0x576add)),_0x4c130a=_0x5b9073(_0x210214(window[_0x2b03bb([0x4d,0x61,0x74,0x68])][_0x2b03bb([0x63,0x65,0x69,0x6c])](_0x38a752/_0x26308c)));window[_0x2b03bb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2b03bb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x326a0d,_0x4c130a);}function _0x2a02d2(){const _0xd336c5=_0x2b03bb([0x6c,0x6c,0x63,0x74,0x2d])+_0x210214(_0x3cad71(_0x576add)),_0x4d0749=window[_0x2b03bb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x2b03bb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0xd336c5);return _0x4d0749?window[_0x2b03bb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x5b9073(_0x4d0749),0x10)*_0x26308c:null;}function _0x5a7d87(_0x4eaf5c){return new window[(_0x2b03bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x507f41,_0x25afd8)=>{_0x4eaf5c[_0x2b03bb([0x74,0x68,0x65,0x6e])](_0x507f41,_0x25afd8),window[_0x2b03bb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x25afd8,0xe2b5764^_0xc97f41);});}}_0x41e94[_0x2b03bb([0x6f,0x6e])](_0x2b03bb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x34d000,_0x1960f6)=>{if(_0x1960f6[0x0]!=_0x576add)return _0x2c9d85(_0x2b03bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1960f6[0x1]={..._0x1960f6[0x1],[_0x2b03bb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x2f0e85};},{[_0x2b03bb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2b03bb([0x68,0x69,0x67,0x68])}),_0x41e94[_0x2b03bb([0x6f,0x6e])](_0x2b03bb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x415c05=>{_0x41d425(_0x415c05[_0x2b03bb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x18981f=!0x0,_0x7a9667(_0x415c05[_0x2b03bb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x2b03bb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x2b03bb([0x6c,0x6f,0x77])}),_0x3af710[_0x2b03bb([0x74,0x68,0x65,0x6e])](()=>{_0x18981f||_0x2c9d85(_0x2b03bb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3997f7(){return _0x41e94[_0x2b03bb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b03bb([0x76,0x69,0x65,0x77])][_0x2b03bb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x2b03bb([0x61,0x75,0x74,0x6f]);}function _0x32a612(){_0x41e94[_0x2b03bb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x2b03bb([0x76,0x69,0x65,0x77])][_0x2b03bb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x2b03bb([0x61,0x75,0x74,0x6f]);}}function _0xe9fd3d(_0xe61675){const _0x14d2ad=[new window[(_0x2b03bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4d2531=>setTimeout(_0x4d2531,0xe23bd68^_0xc97f41)),_0x3af710[_0x2b03bb([0x74,0x68,0x65,0x6e])](()=>new window[(_0x2b03bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x6cdf8d=>{let _0x1ca984=0x0;_0x41e94[_0x2b03bb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b03bb([0x6f,0x6e])](_0x2b03bb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x4db2ca,_0x648cf8)=>{_0x648cf8[0x0][_0x2b03bb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x1ca984++,_0x1ca984==(0xe2a825c^_0xc97f41)&&(_0x6cdf8d(),_0x4db2ca[_0x2b03bb([0x6f,0x66,0x66])]());});}))];return window[_0x2b03bb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x2b03bb([0x72,0x61,0x63,0x65])](_0x14d2ad)[_0x2b03bb([0x74,0x68,0x65,0x6e])](()=>_0xe61675);}async function _0x5c8f76(){await _0x3af710,_0x41e94[_0x2b03bb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b03bb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x2ac021,_0x41e94[_0x2b03bb([0x6d,0x6f,0x64,0x65,0x6c])][_0x2b03bb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x2ac021,_0x41e94[_0x2b03bb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x2b03bb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x55e144(){return _0x43152e(_0x2b03bb([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x31c5a8(_0x2b03bb([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x2b03bb([0x73,0x74,0x61,0x74,0x65])]==_0x2b03bb([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0xd3d48f(_0x40f05c){const _0x41c1f4=_0xa2df8b();_0x41e94[_0x41c1f4]=_0x2b03bb([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x40f05c,_0x40f05c!=_0x2b03bb([0x56,0x61,0x6c,0x69,0x64])&&_0x5c8f76();}function _0xa2df8b(){const _0x57d014=window[_0x2b03bb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x2b03bb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x2b03bb([0x6e,0x6f,0x77])]())[_0x2b03bb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x2b03bb([0x2e]),'');let _0x1c7644=_0x2b03bb([0x58]);for(let _0x1b2fb2=0x0;_0x1b2fb2<_0x57d014[_0x2b03bb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1b2fb2+=0x2){let _0x445db5=window[_0x2b03bb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x57d014[_0x2b03bb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1b2fb2,_0x1b2fb2+0x2));_0x445db5>=_0xb9547[_0x2b03bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x445db5-=_0xb9547[_0x2b03bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x1c7644+=_0xb9547[_0x445db5];}return _0x1c7644;}function _0x5ee3f0(){const _0x20bbf2=_0x40cb5f[_0x2b03bb([0x73,0x70,0x6c,0x69,0x74])](_0x2b03bb([0x2e]));if(0x3!=_0x20bbf2[_0x2b03bb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x107d16(_0x20bbf2[0x1]);function _0x107d16(_0x614d11){const _0x523135=_0x51e4a9(_0x614d11);return _0x523135&&_0x1fed36()?_0x523135:null;function _0x1fed36(){const _0x1ad46c=_0x523135[_0x2b03bb([0x6a,0x74,0x69])],_0x515531=window[_0x2b03bb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1ad46c[_0x2b03bb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x1ad46c[_0x2b03bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x25c5d4={..._0x523135,[_0x2b03bb([0x6a,0x74,0x69])]:_0x1ad46c[_0x2b03bb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x1ad46c[_0x2b03bb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x25c5d4[_0x2b03bb([0x76,0x63])],_0x3cad71(_0x25c5d4)==_0x515531;}}}async function _0x7cb2ef(){let _0x4f6ff6=!0x0;try{const _0x158cea=_0x40cb5f[_0x2b03bb([0x73,0x70,0x6c,0x69,0x74])](_0x2b03bb([0x2e])),[_0x10acd4,_0x593816,_0x93dced]=_0x158cea;return _0x238557(_0x10acd4),await _0x43e98e(_0x10acd4,_0x593816,_0x93dced),_0x4f6ff6;}catch(_0x304fd0){return!0x1;}function _0x238557(_0x724235){const _0x283a64=_0x51e4a9(_0x724235);_0x283a64&&_0x283a64[_0x2b03bb([0x61,0x6c,0x67])]==_0x2b03bb([0x45,0x53,0x32,0x35,0x36])||(_0x4f6ff6=!0x1);}async function _0x43e98e(_0x50b16e,_0x37e8cc,_0x1db3e2){const _0x258634=window[_0x2b03bb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x2b03bb([0x66,0x72,0x6f,0x6d])](_0x177fa9(_0x1db3e2),_0x2a73da=>_0x2a73da[_0x2b03bb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0xc371d4=new window[(_0x2b03bb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x2b03bb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x50b16e+_0x2b03bb([0x2e])+_0x37e8cc),_0x4ad85e=window[_0x2b03bb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x2b03bb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x4ad85e)return;const _0x1010fc=await _0x4ad85e[_0x2b03bb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x2b03bb([0x6a,0x77,0x6b]),_0xd57593,{[_0x2b03bb([0x6e,0x61,0x6d,0x65])]:_0x2b03bb([0x45,0x43,0x44,0x53,0x41]),[_0x2b03bb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x2b03bb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x2b03bb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x4ad85e[_0x2b03bb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x2b03bb([0x6e,0x61,0x6d,0x65])]:_0x2b03bb([0x45,0x43,0x44,0x53,0x41]),[_0x2b03bb([0x68,0x61,0x73,0x68])]:{[_0x2b03bb([0x6e,0x61,0x6d,0x65])]:_0x2b03bb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1010fc,_0x258634,_0xc371d4)||(_0x4f6ff6=!0x1);}}function _0x51e4a9(_0x16026b){return _0x16026b[_0x2b03bb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x2b03bb([0x65,0x79]))?JSON[_0x2b03bb([0x70,0x61,0x72,0x73,0x65])](_0x177fa9(_0x16026b)):null;}function _0x177fa9(_0x55b362){return window[_0x2b03bb([0x61,0x74,0x6f,0x62])](_0x55b362[_0x2b03bb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x2b03bb([0x2b]))[_0x2b03bb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x2b03bb([0x2f])));}function _0x3cad71(_0x182884){let _0x33f078=0x1505;function _0xf8efdb(_0x17df90){for(let _0x1f84eb=0x0;_0x1f84eb<_0x17df90[_0x2b03bb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1f84eb++){const _0x4ee394=_0x17df90[_0x2b03bb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1f84eb);_0x33f078=(_0x33f078<<0x5)+_0x33f078+_0x4ee394,_0x33f078&=_0x33f078;}}function _0xd36296(_0x11eb2d){Array[_0x2b03bb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x11eb2d)?_0x11eb2d[_0x2b03bb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0xd36296):_0x11eb2d&&typeof _0x11eb2d==_0x2b03bb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x2b03bb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x11eb2d)[_0x2b03bb([0x73,0x6f,0x72,0x74])]()[_0x2b03bb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x9a7a6b,_0x5aa56d])=>{_0xf8efdb(_0x9a7a6b),_0xd36296(_0x5aa56d);}):_0xf8efdb(window[_0x2b03bb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x11eb2d));}return _0xd36296(_0x182884),_0x33f078>>>0x0;}function _0x210214(_0x3514d1){return _0x3514d1[_0x2b03bb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x2b03bb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x2b03bb([0x30]));}function _0x5b9073(_0x228f45){return _0x228f45[_0x2b03bb([0x73,0x70,0x6c,0x69,0x74])]('')[_0x2b03bb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x2b03bb([0x6a,0x6f,0x69,0x6e])]('');}function _0x43152e(_0xf99818){return _0x41e94[_0x2b03bb([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2b03bb([0x68,0x61,0x73])](_0xf99818);}function _0x31c5a8(_0x2fab99){return _0x41e94[_0x2b03bb([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x2b03bb([0x67,0x65,0x74])](_0x2fab99);}function _0x2ac021(){}function _0x2b03bb(_0x2577d4){return _0x2577d4['map'](_0x4f5a27=>String['fromCharCode'](_0x4f5a27))['join']('');}_0xd3d48f(await _0x4c389b());}(this);}['destroy'](){const _0x136f12=this['editor']['plugins']['get'](o),_0x46573e=this['editor']['config']['get']('collaboration.channelId');for(const _0x4a2afc of _0x136f12['getCommentThreads']({'channelId':_0x46573e}))_0x136f12['_detachCommentThread'](_0x4a2afc['id']),_0x136f12['_threads']['delete'](_0x4a2afc['id']);super['destroy']();}['hasMarkerForId'](_0x25445b){return this['getAllMarkersForId'](_0x25445b)['length']>0x0;}['getAllMarkersForId'](_0x3c6ec3){const _0x598deb=[];for(const _0x5cb7cc of this['editor']['model']['markers'])_0x5cb7cc['name']['startsWith']('comment:'+_0x3c6ec3)&&_0x598deb['push'](_0x5cb7cc);return _0x598deb;}['scrollToThreadMarker'](_0x343dfb){const _0x1f6014=this['_getTargetForId'](_0x343dfb);_0x1f6014&&setTimeout(()=>{this['activeMarker']&&he(this['activeMarker'])['id']===_0x343dfb&&rt({'target':_0x1f6014[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5553ff){this['editor']['model']['change'](()=>{for(const _0x35aa55 of this['getAllMarkersForId'](_0x5553ff))this['editor']['editing']['reconvertMarker'](_0x35aa55);});}['_attachArchivedThread'](_0x390e9f){const _0x378794=this['editor']['plugins']['get'](o),_0x4fbb36=this['editor']['plugins']['get'](P),_0x31d458=_0x378794['getCommentThread'](_0x390e9f);if(!_0x31d458['isAttached']){const _0x3ae0a6=_0x31d458['attachTo'](()=>this['_getTargetForId'](_0x31d458['id']));_0x4fbb36['registerAnnotation'](_0x3ae0a6),_0x31d458['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x3b7be8=this['editor'],_0x236ee0=_0x3b7be8['plugins']['get'](it);_0x3b7be8['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1cea95,_0x3b5421)=>{const {id:_0x3d029d}=he(_0x1cea95['markerName']),_0x19f1bc=_0x3b7be8['plugins']['get'](o)['getCommentThread'](_0x3d029d),_0x40f481=this['activeMarker']&&he(this['activeMarker'])['id']===_0x3d029d;let _0x282bb3;if(_0x19f1bc&&_0x19f1bc['isResolved']&&!_0x40f481&&_0x1cea95['item'])return _0x3b5421['consumable']['consume'](_0x1cea95['item'],'addMarker:'+_0x1cea95['markerName']),_0x3b5421['consumable']['consume'](_0x1cea95['item'],'removeMarker:'+_0x1cea95['markerName']),null;const _0x83f628=['ck-comment-marker'];return _0x40f481&&_0x83f628['push']('ck-comment-marker--active'),_0x282bb3=_0x19f1bc&&_0x19f1bc['length']?_0x19f1bc['comments']['first']['author']['id']:_0x236ee0['me']['id'],{'classes':_0x83f628,'attributes':{'data-comment':_0x3d029d,'data-author-id':_0x282bb3}};}}),_0x3b7be8['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x3fc149,{options:_0xfb43d9})=>{const _0x31c222=_0x3b7be8['plugins']['get'](o),_0x4859a1=_0x3b7be8['model']['markers']['get'](_0x3fc149),{id:_0x126ee5,part:_0x316e58}=he(_0x3fc149);if(_0x4859a1&&!_0x4859a1['affectsData'])return null;if(_0xfb43d9['ignoreResolvedComments']){const _0x3309b4=_0x31c222['getCommentThread'](_0x126ee5);if(_0x3309b4&&_0x3309b4['isResolved'])return null;}return{'group':'comment','name':_0x316e58?_0x126ee5+':'+_0x316e58:_0x126ee5};}}),_0x3b7be8['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x5bd809,{writer:_0x289568})=>_0x289568['createElement']('$marker',{'data-name':'comment:'+_0x5bd809['getAttribute']('id')})}),_0x3b7be8['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x240dfe=this['editor'],_0x47550b=_0x240dfe['plugins']['get'](o),_0x98af96=new Set(),_0x454ebe=new Set();_0x240dfe['model']['document']['registerPostFixer'](_0x1b09a2=>{let _0x35716c=!0x1;for(const {name:_0x51686b,data:_0xfef6da}of _0x240dfe['model']['document']['differ']['getChangedMarkers']()){const {group:_0x5af416,id:_0x18a852}=he(_0x51686b);let _0x3988e0=_0xfef6da['newRange'];if('comment'!==_0x5af416||!_0x3988e0)continue;const _0x4a1ca9='$graveyard'===_0x3988e0['root']['rootName'];_0x4a1ca9||(_0x3988e0=ft(_0x3988e0,_0x240dfe['model']),!_0x3988e0||_0x3988e0['isCollapsed']||!_0xfef6da['newRange']||_0x3988e0['isEqual'](_0xfef6da['newRange']))?_0x240dfe['model']['hasContent'](_0x3988e0)&&!_0x4a1ca9?this['isThreadsLoadingPaused']?_0x98af96['add'](_0x51686b):this['_handleThreadMarker'](_0x51686b,_0x18a852):(_0x454ebe['add'](_0x51686b),_0x98af96['delete'](_0x51686b),_0x1b09a2['removeMarker'](_0x51686b),_0x35716c=!0x0):(_0x1b09a2['updateMarker'](_0x51686b,{'range':_0x3988e0}),_0x35716c=!0x0);}return _0x35716c;}),this['on']('change:isThreadsLoadingPaused',(_0x515f37,_0x4f90cf,_0x4c6f43)=>{if(!_0x4c6f43&&_0x98af96['size'])for(const _0x25f5f2 of _0x98af96){const {id:_0x10926c}=he(_0x25f5f2);_0x98af96['delete'](_0x25f5f2),_0x240dfe['model']['markers']['get'](_0x25f5f2)&&this['_handleThreadMarker'](_0x25f5f2,_0x10926c);}}),this['listenTo'](_0x240dfe['model']['document'],'change',(_0x3151d3,_0x16a638)=>{for(const {name:_0x1bcae7,data:{newRange:_0x3dfff1}}of _0x240dfe['model']['document']['differ']['getChangedMarkers']()){const {group:_0x40a38e,id:_0x388e8a}=he(_0x1bcae7);if('comment'!==_0x40a38e)continue;const _0x55393c=_0x47550b['getCommentThread'](_0x388e8a),_0x304584=this['hasMarkerForId'](_0x388e8a);_0x55393c&&(!_0x55393c['_hasTargetInContent']&&_0x3dfff1&&_0x240dfe['editing']['view']['once']('render',()=>{const _0x35d745=_0x240dfe['plugins']['get'](N),_0x4eb102=_0x47550b['_threadToController']['get'](_0x55393c)['view'];_0x35d745['getByInnerView'](_0x4eb102)['refreshVisibility']();},{'priority':'low'}),_0x55393c['_hasTargetInContent']=_0x304584||!!_0x3dfff1),_0x3dfff1||(_0x454ebe['add'](_0x1bcae7),_0x98af96['delete'](_0x1bcae7));}if(_0x16a638['isLocal'])for(const _0x5ef12f of _0x454ebe){const {id:_0x430513}=he(_0x5ef12f),_0x428697=_0x47550b['getCommentThread'](_0x430513),_0x1f0292=this['hasMarkerForId'](_0x430513);_0x98af96['delete'](_0x5ef12f),!_0x428697||_0x1f0292||_0x428697['unlinkedAt']||_0x428697['setUnlinkedAt'](new Date());}_0x454ebe['clear']();});}['_getTargetForId'](_0xfa6142){const _0x20ba10=this['editor'],_0x199393=this['getAllMarkersForId'](_0xfa6142);return et(_0x20ba10['editing'],_0x199393);}['_getTextContext'](_0x81182c){const _0x2595c0=this['getAllMarkersForId'](_0x81182c);let _0x3c529d='',_0x3501e4=!0x1;for(const _0x1dbcf5 of _0x2595c0){const _0x33c6c3=_0x1dbcf5['getRange']();for(const _0x37795d of Array['from'](_0x33c6c3['getItems']()))_0x37795d['is']('$textProxy')?(_0x3c529d&&_0x3501e4&&(_0x3c529d+='\x20',_0x3501e4=!0x1),_0x3c529d+=_0x37795d['data']):_0x3501e4=!0x0;_0x3501e4=!0x0;}return _0x3c529d['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x5a1c52,_0x2d1cee){const _0x14464d=this['editor'],_0xe099d2=_0x14464d['plugins']['get'](o);let _0x7294ff=_0xe099d2['getCommentThread'](_0x2d1cee);const _0x515102=_0x14464d['config']['get']('collaboration.channelId'),_0x314baa=_0x14464d['plugins']['get'](P);if(_0x7294ff&&(_0x7294ff['unlinkedAt']&&_0x7294ff['setUnlinkedAt'](null),_0x7294ff['isAttached']))return _0x7294ff;return!this['getAllMarkersForId'](_0x2d1cee)[0x0]['managedUsingOperations']?_0x14464d['editing']['view']['once']('render',()=>{if(_0xe099d2['getCommentThread'](_0x2d1cee))return;const _0x119c7a=_0x14464d['plugins']['get'](N);_0x7294ff=_0xe099d2['openNewCommentThread']({'channelId':_0x515102,'threadId':_0x2d1cee,'target':()=>this['_getTargetForId'](_0x2d1cee),'context':{'type':'text','value':this['_getTextContext'](_0x2d1cee)}});const _0x5ad076=_0xe099d2['_threadToController']['get'](_0x7294ff)['view'],_0x72bc4f=_0x119c7a['getByInnerView'](_0x5ad076);_0x72bc4f&&_0x314baa['registerAnnotation'](_0x72bc4f);},{'priority':'low'}):_0xe099d2['fetchCommentThread']({'channelId':_0x515102,'threadId':_0x2d1cee})['then'](_0xd8fdd7=>{if('destroyed'!==_0x14464d['state']){if(_0x7294ff=_0xd8fdd7,_0x7294ff&&!_0x7294ff['isAttached']){const _0x81e430=_0x7294ff['attachTo'](()=>this['_getTargetForId'](_0x2d1cee));_0x314baa['registerAnnotation'](_0x81e430),_0x7294ff['isResolved']&&this['_reconvertMarkers'](_0x2d1cee);}else{if(!_0x7294ff){const _0x34d4bf=this['getAllMarkersForId'](_0x2d1cee);_0x14464d['model']['change'](_0x201a9a=>{for(const _0x40369 of _0x34d4bf)_0x201a9a['removeMarker'](_0x40369);});}}}}),_0x7294ff;}['_handleThreadMarker'](_0x43d681,_0x581d59){const _0x410159=this['_attachMarkerToThread'](_0x43d681,_0x581d59);_0x410159&&!_0x410159['context']&&_0x410159['setContext']({'type':'text','value':this['_getTextContext'](_0x581d59)});}['_initAriaMarkerChangeAnnouncements'](){const _0x508f8e=this['editor'];ot(_0x508f8e['model'],({left:_0x3994cc,entered:_0x4cd11e})=>{for(const _0x4e0973 of _0x3994cc)if(dt(_0x4e0973)){_0x508f8e['ui']['ariaLiveAnnouncer']['announce'](S(_0x508f8e['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x244eaa of _0x4cd11e)if(dt(_0x244eaa)){_0x508f8e['ui']['ariaLiveAnnouncer']['announce'](S(_0x508f8e['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x208c70)));break;}});}}function ut(_0x501972,_0x5bbd72){return _0x5bbd72?_0x501972+':'+_0x5bbd72:_0x501972;}function he(_0x5c14bb){const _0x11111d=_0x5c14bb['split'](':');return{'group':_0x11111d[0x0],'id':_0x11111d[0x1],'part':_0x11111d[0x2]};}function ft(_0x38e564,_0x523421){const _0x2401fe=_0x523421['schema'],_0x10a154=_0x523421['createRange'](_0x38e564['start']);for(const _0x5c778f of _0x38e564['getWalker']()){const {type:_0x12bfab,item:_0x5185b8,nextPosition:_0x4b63d1}=_0x5c778f;if('text'===_0x12bfab||_0x2401fe['isObject'](_0x5185b8)){const _0x5366fc=_0x523421['createPositionBefore'](_0x5185b8);_0x10a154['isCollapsed']&&(_0x10a154['start']=_0x5366fc),_0x10a154['end']=_0x4b63d1;}}return _0x10a154;}function dt(_0x21687a){return'comment'===he(_0x21687a['name'])['group'];}var xt='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M4\x201.5h12A3.5\x203.5\x200\x200\x201\x2019.5\x205v8l-.005.192a3.5\x203.5\x200\x200\x201-2.927\x203.262l-.062.008v1.813a1.5\x201.5\x200\x200\x201-2.193\x201.33l-.371-.193-.38-.212a13.452\x2013.452\x200\x200\x201-3.271-2.63l-.062-.07H4A3.5\x203.5\x200\x200\x201\x20.5\x2013V5A3.5\x203.5\x200\x200\x201\x204\x201.5ZM4\x203a2\x202\x200\x200\x200-2\x202v8a2\x202\x200\x200\x200\x202\x202h6.924a11.917\x2011.917\x200\x200\x200\x203.71\x203.081l.372.194v-3.268L14.962\x2015H16a2\x202\x200\x200\x200\x202-2V5a2\x202\x200\x200\x200-2-2H4Z\x22/><path\x20d=\x22M9.75\x205a.75.75\x200\x200\x200-.75.75v2.5H6.5a.75.75\x200\x200\x200\x200\x201.5H9v2.5a.75.75\x200\x200\x200\x201.5\x200v-2.5H13a.75.75\x200\x200\x200\x200-1.5h-2.5v-2.5A.75.75\x200\x200\x200\x209.75\x205Z\x22/></svg>\x0a';class i extends _0x534d76{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,N];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x3ca622=this['editor'],_0x2f595f=_0x3ca622['plugins']['get'](o),_0x45aa7a=_0x3ca622['plugins']['get'](r),_0x1cf89c=_0x3ca622['plugins']['get'](N),_0xec9196=_0x3ca622['plugins']['get'](P);_0x3ca622['ui']['componentFactory']['add']('comment',()=>{const _0x4c48b6=this['_createUIButton'](_0x6ad9e9);return _0x4c48b6['tooltip']=!0x0,_0x4c48b6;}),_0x3ca622['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x40bbf4)),_0xec9196['addSourceCollector'](()=>{const _0x5729f7=[];for(const [_0x1c2efe,_0x1dba41]of _0x2f595f['_threadToController']){const _0x3fb7a8=_0x45aa7a['getAllMarkersForId'](_0x1c2efe['id']),_0x3284d0=_0x3fb7a8['map'](_0x37585a=>_0x37585a['getRange']());_0x3fb7a8['length']>0x0&&_0x5729f7['push']([_0x1dba41['view'],_0x3284d0]);}return _0x5729f7;}),this['listenTo'](_0x1cf89c,'change:activeAnnotations',(_0xba6fa2,_0x1f8090,_0x59e022)=>{const _0xf574d8=Array['from'](_0x59e022)['map'](_0x3eb20c=>_0x3eb20c['innerView'])['find'](_0x44929e=>_0x2f595f['_viewToController']['has'](_0x44929e));if(!_0xf574d8)return void(_0x45aa7a['activeMarker']=null);const _0x12495f=_0x2f595f['_viewToController']['get'](_0xf574d8)['model']['id'],_0x586391='comment:'+_0x12495f;_0x12495f&&_0x45aa7a['hasMarkerForId'](_0x12495f)?_0x45aa7a['activeMarker']=_0x586391:_0x45aa7a['activeMarker']&&(_0x45aa7a['activeMarker']=null);}),this['listenTo'](_0x2f595f,'removeCommentThread',(_0x66516a,{threadId:_0x2485f6,isFromAdapter:_0x4e7d9e})=>{!_0x4e7d9e&&_0x3ca622['ui']['focusTracker']['isFocused']&&_0x45aa7a['hasMarkerForId'](_0x2485f6)&&_0x3ca622['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2f595f,'addComment',(_0x341d67,{threadId:_0x13ed25,isFromAdapter:_0x1524c9})=>{if(_0x1524c9||!_0x45aa7a['hasMarkerForId'](_0x13ed25)||!_0x2f595f['hasCommentThread'](_0x13ed25))return;0x1===_0x2f595f['getCommentThread'](_0x13ed25)['length']&&(_0x3ca622['editing']['view']['focus'](),_0x341d67['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x1ac692=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x1bae66;for(const _0x28ed73 in _0x1ac692){const _0x18c5e7=_0x28ed73,_0x5dacf0=_0x1ac692[_0x18c5e7];if('commentsLicenseKeyValid'==_0x5dacf0||'commentsLicenseKeyInvalid'==_0x5dacf0||'commentsLicenseKeyExpired'==_0x5dacf0||'commentsLicenseKeyDomainLimit'==_0x5dacf0||'commentsLicenseKeyNotAllowed'==_0x5dacf0||'commentsLicenseKeyEvaluationLimit'==_0x5dacf0||'commentsLicenseKeyTrialLimit'==_0x5dacf0||'commentsLicenseKeyDevelopmentLimit'==_0x5dacf0||'commentsLicenseKeyUsageLimit'==_0x5dacf0){delete _0x1ac692[_0x18c5e7],_0x1bae66=_0x5dacf0,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x1bae66&&_0x1ac692['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x1bae66&&_0x1ac692['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x1bae66&&_0x1ac692['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x1bae66&&_0x1ac692['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x1bae66&&_0x1ac692['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x1bae66&&_0x1ac692['_showLicenseError']('trialLimit'),'commentsLicenseKeyDevelopmentLimit'==_0x1bae66&&_0x1ac692['_showLicenseError']('developmentLimit'),'commentsLicenseKeyUsageLimit'==_0x1bae66&&_0x1ac692['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x400bf3){const _0x448cf7=this['editor'],_0xc4cc00=new _0x400bf3(_0x448cf7['locale']),_0x106a06=_0x448cf7['commands']['get']('addCommentThread');return _0xc4cc00['set']({'label':S(_0x448cf7['locale'],'Comment'),'icon':xt}),_0xc4cc00['bind']('isEnabled')['to'](_0x106a06),this['listenTo'](_0xc4cc00,'execute',()=>_0x106a06['execute']()),_0xc4cc00;}}class s extends _0x534d76{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x26800e){super(_0x26800e),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1442bf,_0x218ed2,_0x572a43)=>{_0x572a43?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x3caf98,_0x285018]of this['editor']['commands'])_0x285018['affectsData']&&'addCommentThread'!==_0x3caf98&&_0x285018['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode');const _0x40dcea=this['editor']['editing']['view']['document'];this['listenTo'](_0x40dcea,'cut',_0x3ef4ae=>_0x3ef4ae['stop'](),{'priority':'highest'}),this['listenTo'](_0x40dcea,'clipboardInput',_0x43a98f=>_0x43a98f['stop'](),{'priority':'highest'}),this['listenTo'](_0x40dcea,'delete',_0x583193=>_0x583193['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x5dcea9,_0x38364f]of this['editor']['commands'])_0x38364f['affectsData']&&'addCommentThread'!==_0x5dcea9&&_0x38364f['clearForceDisabled']('commentsOnlyMode');this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0xe30f87{['activeUIs'];['_uis'];['_uisData'];static get['requires'](){return[N];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x16b5a8){super(_0x16b5a8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['_uisData']=new Map();}['init'](){const _0x13fb31=this['context']['plugins']['get'](N);this['listenTo'](_0x13fb31,'_activateAnnotation',(_0x42f6b2,_0x18bdcf)=>{for(const _0x49021c of this['activeUIs']){const _0x4bbffb=this['_uis']['get'](_0x49021c);(0x0,this['_uisData']['get'](_0x49021c)['filter'])(_0x18bdcf)&&_0x4bbffb['setActiveAnnotation'](_0x18bdcf);}}),this['listenTo'](_0x13fb31,'_deactivateAllAnnotations',()=>{for(const _0x4cd34c of this['activeUIs']){this['_uis']['get'](_0x4cd34c)['setActiveAnnotation'](null);}}),this['listenTo'](_0x13fb31['_visibleAnnotations'],'add',(_0x4880f2,_0x557bf1)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x557bf1);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x3f43b9){return this['activeUIs']['has'](_0x3f43b9);}['activate'](_0x26fa45,_0x22f054=()=>!0x0){const _0x25df56=this['context']['plugins']['get'](N);if(!this['_uis']['has'](_0x26fa45))throw new _0x3648c2('annotationsuis-missing-ui',this,{'uiName':_0x26fa45});this['isActive'](_0x26fa45)&&this['deactivate'](_0x26fa45),this['activeUIs']['add'](_0x26fa45);const _0x192f96=new x();!function({source:_0x45ea39,target:_0x54fa24,filter:_0x2d6147}){for(const _0x2169bb of _0x45ea39)_0x2d6147(_0x2169bb)&&_0x54fa24['add'](_0x2169bb);_0x54fa24['listenTo'](_0x45ea39,'add',(_0x690138,_0x59004c)=>{_0x2d6147(_0x59004c)&&_0x54fa24['add'](_0x59004c);}),_0x54fa24['listenTo'](_0x45ea39,'remove',(_0x1f4bc3,_0x7624a9)=>{_0x54fa24['has'](_0x7624a9)&&_0x54fa24['remove'](_0x7624a9);});}({'source':_0x25df56['_visibleAnnotations'],'target':_0x192f96,'filter':_0x22f054}),this['_uisData']['set'](_0x26fa45,{'collection':_0x192f96,'filter':_0x22f054});const _0x40d5ec=this['_uis']['get'](_0x26fa45);_0x40d5ec['attach'](_0x192f96),this['listenTo'](_0x40d5ec,'change:activeAnnotation',(_0x2bb684,_0x83153f,_0x3757c3,_0x4c01b0)=>{_0x4c01b0&&_0x25df56['_removeActiveAnnotation'](_0x4c01b0),_0x3757c3&&_0x25df56['_addActiveAnnotation'](_0x3757c3);});}['deactivate'](_0x428078){if(this['activeUIs']['delete'](_0x428078),!this['_uis']['has'](_0x428078))throw new _0x3648c2('annotationsuis-missing-ui',this,{'uiName':_0x428078});const _0x1589a8=this['_uis']['get'](_0x428078);_0x1589a8['detach'](),this['stopListening'](_0x1589a8),this['_uisData']['get'](_0x428078)['collection']['destroy'](),this['_uisData']['delete'](_0x428078);}['switchTo'](_0x17992b){if(!this['_uis']['has'](_0x17992b))throw new _0x3648c2('annotationsuis-missing-ui',this,{'uiName':_0x17992b});const _0x4e5e5d=this['context']['plugins']['get'](N),_0x2412ea=Array['from'](_0x4e5e5d['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x17992b);const _0x23e570=this['_uis']['get'](_0x17992b);_0x23e570['setActiveAnnotation'](_0x2412ea),_0x23e570['_setSelectedAnnotations']&&_0x2412ea&&_0x23e570['_setSelectedAnnotations']([_0x2412ea]);}['deactivateAll'](){for(const _0x36e416 of this['activeUIs'])this['deactivate'](_0x36e416);}['register'](_0x19b165,_0x168969){if(this['_uis']['has'](_0x19b165))throw new _0x3648c2('annotationsuis-register-already-registered');if('function'!=typeof _0x168969['attach']||'function'!=typeof _0x168969['detach']||'function'!=typeof _0x168969['setActiveAnnotation'])throw new _0x3648c2('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x19b165,_0x168969);}['refilterAnnotations'](){const _0xa540cb=this['context']['plugins']['get'](N)['collection'],_0x966f2=new Map(),_0x37fca0=Array['from'](this['activeUIs']);for(const _0x1bb40f of this['activeUIs']){const _0x109ab2=this['_uisData']['get'](_0x1bb40f)['collection'];for(const _0x9d4094 of _0x109ab2)_0x966f2['set'](_0x9d4094,_0x1bb40f);}for(const _0x443c8a of _0xa540cb){const _0x31ac7f=_0x966f2['get'](_0x443c8a);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x443c8a);const _0x132cd4=_0x37fca0['find'](_0x36d5cd=>this['_uisData']['get'](_0x36d5cd)['filter'](_0x443c8a));_0x31ac7f!==_0x132cd4&&(_0x31ac7f&&this['_uisData']['get'](_0x31ac7f)['collection']['remove'](_0x443c8a),_0x132cd4&&this['_uisData']['get'](_0x132cd4)['collection']['add'](_0x443c8a));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x47169e){const _0x2f17dd=[];for(const _0x1658aa of this['activeUIs']){(0x0,this['_uisData']['get'](_0x1658aa)['filter'])(_0x47169e)&&_0x2f17dd['push'](_0x1658aa);}if(_0x2f17dd['length']>0x1)throw new _0x3648c2('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x2f17dd,'annotationType':_0x47169e['type']});}}const ae=Ht('px');class V extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5129ee){super(_0x5129ee);const _0x1fc379=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 _0x35dbc6(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1fc379['to']('class')],'style':{'minHeight':_0x1fc379['to']('minHeight',_0x116690=>'number'==typeof _0x116690?ae(_0x116690+0xa):null)},'dir':_0x5129ee['uiLanguageDirection'],'role':'application','aria-label':S(_0x5129ee,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':S(_0x5129ee,'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',_0x1f11ad=>{this['_updateItemPositionInFocusables'](_0x1f11ad['source']);}),this['list']['forEach'](_0x36b859=>{this['focusTracker']['add'](_0x36b859['element']),this['_updateItemPositionInFocusables'](_0x36b859);}),this['list']['on']('change',(_0xf3f7d7,_0xc49c92)=>{for(const _0x15aaa7 of _0xc49c92['removed'])this['focusTracker']['remove'](_0x15aaa7['element']),this['focusables']['remove'](_0x15aaa7);for(const _0x320961 of _0xc49c92['added'])this['focusTracker']['add'](_0x320961['element']),this['_updateItemPositionInFocusables'](_0x320961);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x467c8a){const _0x5205cc=this['focusables']['getIndex'](_0x467c8a);let _0x43b342,_0x261107;for(const _0x4cc905 of this['focusables'])if(_0x467c8a['top']<_0x4cc905['top']){_0x43b342=_0x4cc905;break;}if(_0x261107=_0x43b342?this['focusables']['getIndex'](_0x43b342):this['focusables']['length'],-0x1!==_0x5205cc){if(_0x5205cc===_0x261107-0x1)return;this['focusables']['remove'](_0x467c8a),_0x261107=_0x43b342?this['focusables']['getIndex'](_0x43b342):this['focusables']['length'];}this['focusables']['add'](_0x467c8a,_0x261107);}}const qt=Ht('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x3ccd6c){super(_0x3ccd6c),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x935fd8,_0xe4957e)=>_0x935fd8+_0xe4957e),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Dt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x5dd457=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x5dd457['to']('isAnimationDisabled',_0x4dcd51=>_0x4dcd51?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x5dd457['to']('top',_0x12e0c3=>qt(_0x12e0c3))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x328d64=this['element']['clientHeight'];_0x328d64&&(this['height']=_0x328d64);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0xe30f87{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2947dd){super(_0x2947dd),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 _0x157ccb=this['context']['config']['get']('sidebar.container');_0x157ccb&&this['setContainer'](_0x157ccb);}['setContainer'](_0x5c3f71){if(!y(_0x5c3f71))throw new _0x3648c2('sidebar-setcontainer-invalid-element');this['container']=_0x5c3f71;}['_attachToContainer']({viewClass:_0x2a77aa='',spaceBetweenItems:_0x2106cb=0x19}={}){if(!y(this['container']))throw new _0x3648c2('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x2a77aa,this['_spaceBetweenItems']=_0x2106cb;}['rearrange']({removedAnnotation:_0x308c74,previousAnnotation:_0x17cb99,nextAnnotation:_0xe277aa}){const _0x57fd1a=this['getSidebarItemView'](_0x308c74);this['view']['list']['remove'](_0x57fd1a),this['_destroySidebarItemView'](_0x308c74),_0x17cb99&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x17cb99)),_0xe277aa&&this['_alignToTargetRect'](this['getSidebarItemView'](_0xe277aa)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x4b47c0,activatedAnnotation:_0x5d7d03,disableAnimationOnActivatedAnnotation:_0x9a585e}){if(this['_activeAnnotation']=_0x5d7d03,_0x4b47c0){_0x4b47c0['isActive']=!0x1;const _0x64b74b=this['getSidebarItemView'](_0x4b47c0);_0x64b74b&&_0x9a585e&&(_0x64b74b['isAnimationDisabled']=!0x1);}if(_0x5d7d03){const _0x231e57=this['getSidebarItemView'](_0x5d7d03);_0x231e57&&(_0x5d7d03['isActive']=!0x0,_0x9a585e&&(_0x231e57['isAnimationDisabled']=!0x0,_0x231e57['top']+=0x1),this['_alignToTargetRect'](_0x231e57));}}['_detachFromContainer'](_0x24b21f){if(this['view']['element']['remove'](),_0x24b21f){for(const _0x1fb449 of _0x24b21f)this['_destroySidebarItemView'](_0x1fb449);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x4692a0,_0x34e319){_0x34e319||(_0x34e319=_0x4692a0['view']);const _0x865c8a=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x865c8a,_0x4692a0),this['_annotationToSidebarItemView']['set'](_0x4692a0,_0x865c8a),_0x865c8a['content']['add'](_0x34e319),this['listenTo'](_0x4692a0['view'],'change:targetRect',(_0x2e6270,_0x38ec3b,_0x8440ba)=>{const _0x5a6e6e=this['_getTargetTop'](_0x4692a0,_0x8440ba);_0x865c8a['_targetTop']!=_0x5a6e6e&&(_0x865c8a['_targetTop']=_0x5a6e6e,this['_setItemTop'](_0x865c8a,_0x5a6e6e));}),this['listenTo'](_0x865c8a,'change:top',()=>{this['_recalculate'](_0x865c8a,'top');}),this['listenTo'](_0x865c8a,'change:bottom',()=>{this['_recalculate'](_0x865c8a,'bottom');}),this['_alignToTargetRect'](_0x865c8a);const _0x10b03b=this['_getItemBefore'](_0x865c8a);if(_0x10b03b)this['_alignAfterItem'](_0x10b03b,_0x865c8a)||this['_alignToTargetRect'](_0x865c8a);else this['_alignToTargetRect'](_0x865c8a);return this['_updateLastItem'](),this['view']['list']['add'](_0x865c8a),_0x865c8a;}['_alignForTopChange'](_0x2ccb2){if(!_0x2ccb2['content']['length'])return;const _0x1d33b2=this['_getItemBefore'](_0x2ccb2);if(!_0x1d33b2)return;const _0x4d2dc9=this['_sidebarItemViewToAnnotation']['get'](_0x1d33b2),_0x34c5ac=this['_activeAnnotation'];_0x34c5ac&&_0x34c5ac===_0x4d2dc9?this['_alignAfterItem'](_0x1d33b2,_0x2ccb2):this['_alignBeforeItem'](_0x2ccb2,_0x1d33b2);}['_alignForBottomChange'](_0x17fb83){if(!_0x17fb83['content']['length'])return;const _0x4314d1=this['_getItemAfter'](_0x17fb83);if(!_0x4314d1)return;const _0x508bcf=this['_sidebarItemViewToAnnotation']['get'](_0x4314d1),_0x2b6cea=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x11d953=this['_activeAnnotation'];_0x11d953&&_0x11d953===_0x508bcf&&_0x2b6cea?(this['_alignBeforeItem'](_0x4314d1,_0x17fb83),this['_alignAfterItem'](_0x17fb83,_0x4314d1)):_0x11d953&&_0x11d953===_0x508bcf?this['_alignBeforeItem'](_0x4314d1,_0x17fb83):this['_alignAfterItem'](_0x17fb83,_0x4314d1);}['_recalculate'](_0x5a80d1,_0x1dda8b){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2b8c7a,changedProp:_0x342bf5}of this['_recalculateBuffer'])'top'===_0x342bf5?this['_alignForTopChange'](_0x2b8c7a):this['_alignForBottomChange'](_0x2b8c7a);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x5a80d1,'changedProp':_0x1dda8b});}['getSidebarItemView'](_0x14fd3e){return this['_annotationToSidebarItemView']['get'](_0x14fd3e);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x4c1b28){const _0x4eaf6f=this['getSidebarItemView'](_0x4c1b28);this['stopListening'](_0x4eaf6f),this['stopListening'](_0x4c1b28['view']),_0x4eaf6f['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x4c1b28),this['_sidebarItemViewToAnnotation']['delete'](_0x4eaf6f);}['_createSidebarView'](){const _0x29c569=new V(this['context']['locale']);return _0x29c569['render'](),this['on']('change:_lastItem',(_0x2a637a,_0x5ebc71,_0xb05c18,_0x5917ab)=>{_0x5917ab&&_0x29c569['unbind']('minHeight'),_0xb05c18?_0x29c569['bind']('minHeight')['to'](_0xb05c18,'bottom'):_0x29c569['minHeight']=null;}),_0x29c569;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x70cf63){const _0x17e0c6=this['_sidebarItemViewToAnnotation']['get'](_0x70cf63),_0xeab93a=_0x17e0c6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x17e0c6)-0x1);return _0xeab93a&&this['getSidebarItemView'](_0xeab93a)||null;}['_getItemAfter'](_0xba5fbb){const _0x18f28f=this['_sidebarItemViewToAnnotation']['get'](_0xba5fbb),_0x5d2626=_0x18f28f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x18f28f)+0x1);return _0x5d2626&&this['getSidebarItemView'](_0x5d2626)||null;}['_alignBeforeItem'](_0x2c22b4,_0x52b1b6){_0x2c22b4['updateHeight']();const _0x28418b=R(_0x52b1b6['bottom']+this['_spaceBetweenItems'],_0x2c22b4['top']);return!!_0x28418b&&(this['_setItemTop'](_0x52b1b6,_0x52b1b6['top']-_0x28418b),!0x0);}['_alignAfterItem'](_0x592a87,_0x4cbd28){_0x592a87['updateHeight']();const _0xcaf723=R(_0x592a87['bottom']+this['_spaceBetweenItems'],_0x4cbd28['top']);return!!_0xcaf723&&(this['_setItemTop'](_0x4cbd28,_0x4cbd28['top']+_0xcaf723,!0x1),!0x0);}['_alignToTargetRect'](_0x2edc59){const _0x205801=this['_sidebarItemViewToAnnotation']['get'](_0x2edc59);if(!_0x205801||!_0x205801['target']||!_0x205801['targetRect'])return;const _0x51c6c3=this['_getTargetTop'](_0x205801,_0x205801['targetRect']);this['_setItemTop'](_0x2edc59,_0x51c6c3);}['_getTargetTop'](_0x285422,_0x5d174e){if(null===_0x5d174e)return 0x0;if(_0x285422['target']instanceof _0x59f6c8)return _0x5d174e['top'];{const _0x18710f=new _0x59f6c8(this['view']['element'])['top'];return _0x5d174e['top']-_0x18710f;}}['_setItemTop'](_0x3c11ef,_0x227355,_0xf9ef88=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0xf9ef88&&(_0x227355=Math['max'](_0x227355,this['_getMaxAvailableTop'](_0x3c11ef))),_0x3c11ef['top']=_0x227355;}['_getMaxAvailableTop'](_0x40645f){let _0x4468d4=this['_getItemBefore'](_0x40645f),_0x1a15e2=0x0;for(;_0x4468d4;)_0x4468d4['updateHeight'](),_0x1a15e2+=this['_spaceBetweenItems']+_0x4468d4['height'],_0x4468d4=this['_getItemBefore'](_0x4468d4);return _0x1a15e2;}}function R(_0x20b553,_0x1febe8){return Math['max'](_0x20b553-_0x1febe8,0x0);}function y(_0x3b1981){return null!==_0x3b1981&&'object'==typeof _0x3b1981&&0x1===_0x3b1981['nodeType'];}class e extends _0xe30f87{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1aca4f){super(_0x1aca4f),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x37f3a3(),this['_refreshPositioningDebounced']=_0x432163(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x20721e=this['context']['plugins']['get'](M),_0x48ef40=this['context']['plugins']['get'](z);_0x20721e['register']('wideSidebar',this),_0x48ef40['container']&&_0x20721e['switchTo']('wideSidebar');}['setActiveAnnotation'](_0xdea5f8){if(_0xdea5f8===this['activeAnnotation'])return;const _0x4fd0d3=this['context']['plugins']['get'](z);_0x4fd0d3['_activeAnnotation']=_0xdea5f8;const _0x279aa2=this['activeAnnotation'];this['activeAnnotation']=_0xdea5f8,_0x4fd0d3['refresh']({'blurredAnnotation':_0x279aa2,'activatedAnnotation':this['activeAnnotation']});}['attach'](_0x516027){this['annotations']=_0x516027;const _0x685a01=this['context']['plugins']['get'](z);if(_0x685a01['_annotations']=_0x516027,this['isAttached'])throw new _0x3648c2('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x685a01,'set:container',()=>{this['detach'](),this['listenTo'](_0x685a01,'change:container',_0x1f8ffb=>{_0x1f8ffb['off'](),this['attach'](_0x516027);});}),_0x685a01['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x3f8239=_0x3d9e15=>{_0x3d9e15['updateTargetRect'](),_0x685a01['addAnnotation'](_0x3d9e15);};for(const _0x3bf51b of _0x516027)_0x3f8239(_0x3bf51b);this['listenTo'](_0x516027,'add',(_0x55b211,_0xe1c2a9)=>{_0x3f8239(_0xe1c2a9);}),this['listenTo'](_0x516027,'remove',(_0x15eb09,_0x370085,_0x57b0e1)=>{_0x685a01['rearrange']({'removedAnnotation':_0x370085,'previousAnnotation':_0x516027['get'](_0x57b0e1-0x1),'nextAnnotation':_0x516027['get'](_0x57b0e1+0x1)}),_0x370085===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x516027,'focus',(_0x264107,_0x3b5bac)=>{this['setActiveAnnotation'](_0x3b5bac);}),this['listenTo'](_0x516027,'blur',()=>{this['setActiveAnnotation'](null);});const _0x13185c=this['context']instanceof _0x3e3a1f?this['context']['editors']:new _0x37f3a3([this['context']]);for(const _0x2a829a of _0x13185c)this['_integrateWithEditorAnnotations'](_0x2a829a);this['listenTo'](_0x13185c,'add',(_0x211832,_0x3bf511)=>{this['listenTo'](_0x3bf511,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x3bf511);});}),this['listenTo'](_0x13185c,'remove',(_0x5dbc71,_0x6260da)=>{_0x6260da['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x6260da['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x3648c2('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x26c03d=this['context']['plugins']['get'](z);_0x26c03d['_detachFromContainer'](this['annotations']),this['stopListening'](_0x26c03d),this['stopListening'](this['annotations']),this['context']instanceof _0x3e3a1f&&this['stopListening'](this['context']['editors']);for(const _0x5207d0 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5207d0);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0xc0cbc8){if(!_0xc0cbc8['plugins']['has']('EditorAnnotations'))return;const _0x3e651e=_0xc0cbc8['plugins']['get']('EditorAnnotations'),_0x1d4f97=()=>{const _0x545b2f=_0x3e651e['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x545b2f[0x0]||null);};this['listenTo'](_0x3e651e,'refresh',_0x1d4f97),this['listenTo'](_0x3e651e,'blur',(_0x157207,{isAnnotationTracked:_0x7be32f})=>{this['activeAnnotation']&&_0x7be32f(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x3e651e,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4f9b0d=>{_0x3e651e['hasDomSelection']()&&(_0x1d4f97(),_0x4f9b0d['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x3e651e);}['_destroyEditorAnnotationsIntegration'](_0x456dc0){this['stopListening'](_0x456dc0),this['_editorAnnotations']['remove'](_0x456dc0);}}class D extends _0x6ad9e9{['counterView'];constructor(_0x4561e0){super(_0x4561e0);const _0x59b877=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x32326e,_0x1021e6)=>_0x32326e?'...':_0x1021e6['toString']()),this['set']('annotationType',''),this['icon']=xt,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x59b877['to']('annotationType',_0x13399f=>'ck-annotation-counter__badge--'+_0x13399f),_0x59b877['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x59b877['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0xe30f87{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5d1e1c){super(_0x5d1e1c),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x3d0110),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x37f3a3(),this['_refreshPositioningDebounced']=_0x432163(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x954b70(this['context']['locale']),this['balloonPanelView']=new _0x15f2d5(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1bfecc){this['annotations']=_0x1bfecc;const _0x1238fb=this['context']['plugins']['get'](z),_0x53b678=this['balloonPanelView'];if(_0x1238fb['_annotations']=_0x1bfecc,this['isAttached'])throw new _0x3648c2('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x1238fb,'set:container',()=>{this['detach'](),this['listenTo'](_0x1238fb,'change:container',_0x4d6875=>{_0x4d6875['off'](),this['attach'](_0x1bfecc);});}),_0x1238fb['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x3d9190=_0xfe9dcf=>{const _0xcaebac=new D(this['context']['locale']);_0x1238fb['addAnnotation'](_0xfe9dcf,_0xcaebac),this['_annotationToNarrowView']['set'](_0xfe9dcf,_0xcaebac),_0xcaebac['bind']('isDirty','annotationType','number')['to'](_0xfe9dcf['view'],'isDirty','type','length'),_0xcaebac['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x53b678['content']['first']!==_0xfe9dcf['view']?(this['_showBalloon'](_0xfe9dcf),_0xfe9dcf['view']['element']['focus'](),this['setActiveAnnotation'](_0xfe9dcf)):this['setActiveAnnotation'](null);});};for(const _0x5a47dc of _0x1bfecc)_0x3d9190(_0x5a47dc);this['listenTo'](_0x1bfecc,'add',(_0x1fa7d9,_0x5d234f)=>{_0x3d9190(_0x5d234f);}),this['listenTo'](_0x1bfecc,'remove',(_0x8935fc,_0x79b148,_0x207481)=>{this['_annotationToNarrowView']['get'](_0x79b148)['destroy'](),this['_annotationToNarrowView']['delete'](_0x79b148),_0x1238fb['rearrange']({'removedAnnotation':_0x79b148,'previousAnnotation':_0x1bfecc['get'](_0x207481-0x1),'nextAnnotation':_0x1bfecc['get'](_0x207481+0x1)}),_0x79b148===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1bfecc,'focus',(_0xaeefd8,_0x3b737a)=>{this['setActiveAnnotation'](_0x3b737a);}),this['listenTo'](_0x1bfecc,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x3c7179,_0x49ca41)=>{_0x49ca41['keyCode']===_0x2f8cfb['esc']&&_0x53b678['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x53b678['content']['first']),this['_hideBalloon'](),_0x49ca41['stopPropagation'](),_0x49ca41['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x13fefb,_0x1aa50f)=>{const _0x40041=_0x1aa50f['target'];_0x53b678['isVisible']&&_0x53b678['element']['contains'](_0x40041)||_0x1238fb['view']['element']['contains'](_0x40041)||_0x13fefb['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x19494f=>_0x19494f['contains'](_0x40041))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x337b19=this['context']instanceof _0x3e3a1f?this['context']['editors']:new _0x37f3a3([this['context']]);for(const _0x522c97 of _0x337b19)this['_integrateWithEditorAnnotations'](_0x522c97);this['listenTo'](_0x337b19,'add',(_0x3929bb,_0x17c645)=>{this['listenTo'](_0x17c645,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x17c645);});}),this['listenTo'](_0x337b19,'remove',(_0x565180,_0x1ea487)=>{_0x1ea487['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1ea487['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x51909e){if(_0x51909e===this['activeAnnotation'])return;const _0x15383f=this['context']['plugins']['get'](z);if(_0x15383f['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x51909e,'disableAnimationOnActivatedAnnotation':!0x0}),_0x51909e)_0x15383f['getSidebarItemView'](_0x51909e)?this['_showBalloon'](_0x51909e):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x51909e;}['detach'](){if(!this['isAttached'])throw new _0x3648c2('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x417d14=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x517dcb=>_0x517dcb['destroy']()),this['_annotationToNarrowView']['clear'](),_0x417d14['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x3e3a1f&&this['stopListening'](this['context']['editors']);for(const _0x760a4a of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x760a4a);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'](_0x5d967d){if(!_0x5d967d['plugins']['has']('EditorAnnotations'))return;const _0x373ef4=_0x5d967d['plugins']['get']('EditorAnnotations'),_0x2e95ea=this['context']['plugins']['get'](z),_0xd61940=this['annotations'],_0x4b5640=this['balloonPanelView'],_0x4d1701=()=>{const _0x403f18=_0x373ef4['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x403f18),this['setActiveAnnotation'](_0x403f18[0x0]||null);};this['listenTo'](_0x373ef4,'refresh',_0x4d1701),this['listenTo'](_0x373ef4,'blur',(_0x48422f,{isAnnotationTracked:_0x3286e1})=>{this['activeAnnotation']&&_0x3286e1(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x373ef4,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xd61940,'blur',_0x4a763a=>{_0x373ef4['hasDomSelection']()&&_0x4a763a['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x2f7513,_0x23cb37)=>{const _0x786055=_0x23cb37['target'];_0x4b5640['isVisible']&&_0x4b5640['element']['contains'](_0x786055)||_0x2e95ea['view']['element']['contains'](_0x786055)||this['activeAnnotation']&&_0x373ef4['hasDomSelection']()&&(_0x4d1701(),_0x2f7513['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x373ef4);}['_destroyEditorAnnotationsIntegration'](_0x1442fc){_0x1442fc&&(this['stopListening'](_0x1442fc),this['_editorAnnotations']['remove'](_0x1442fc));}['_setSelectedAnnotations'](_0x30d8a9){for(const _0xcab81b of this['_selectedAnnotations'])_0x30d8a9['includes'](_0xcab81b)||this['_manuallyClosedAnnotationViews']['delete'](_0xcab81b['view']);this['_selectedAnnotations']=_0x30d8a9;}['_refreshPositioning'](){const _0x7a844f=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x7a844f['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x35db06){if(this['_manuallyClosedAnnotationViews']['has'](_0x35db06['view']))return;const _0x13f305=this['balloonPanelView']['content']['first'];_0x13f305!==_0x35db06['view']?(_0x13f305&&this['_detachListeners'](_0x13f305),this['_attachListeners'](_0x35db06['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x35db06['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x1a3b4f=this['balloonPanelView']['content']['first'],_0x1e73a7=_0x1a3b4f&&this['annotations']['getByView'](_0x1a3b4f);if(!_0x1e73a7||!this['_annotationToNarrowView']['has'](_0x1e73a7))return;const _0x58ac33=this['_annotationToNarrowView']['get'](_0x1e73a7)['element'],_0x5a1848=(function(){const _0x1dff73=_0x15f2d5['defaultPositions'];return[_0x1dff73['southArrowNorthEast'],_0x1dff73['northArrowSouthEast'],_0x1dff73['southArrowNorth'],_0x1dff73['northArrowSouth'],_0x1dff73['southArrowNorthWest'],_0x1dff73['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x58ac33,'positions':_0x5a1848});}['_hideBalloon'](){const _0x10d2ad=this['balloonPanelView'],_0x3fac06=_0x10d2ad['content']['first'];_0x3fac06&&(this['_detachListeners'](_0x3fac06),_0x10d2ad['unpin'](),_0x10d2ad['content']['clear']());}['_attachListeners'](_0x53a54e){this['listenTo'](_0x53a54e,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x53a54e,'Esc',(_0x3a6776,_0x2948fd)=>{this['_manuallyClosedAnnotationViews']['add'](_0x53a54e),this['_hideBalloon'](),_0x2948fd();});}['_detachListeners'](_0x42f6fa){this['stopListening'](_0x42f6fa);}}class c extends _0x534d76{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x16be95,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x167705){super(_0x167705),_0x167705['editing']['view']['addObserver'](_0x41c502),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x167705['plugins']['get'](_0x16be95),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x5951a3=this['editor']['plugins']['get'](M);_0x5951a3['context']===this['editor']&&(_0x5951a3['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x8ed129,_0x427878)=>{const _0x347941=this['_balloon'];if(this['isAttached']&&_0x347941['visibleView']){const _0x14a92c=this['annotations']['getByView'](_0x347941['visibleView']);_0x14a92c&&this['_closeAnnotation'](_0x14a92c),_0x427878();}}));}['afterInit'](){const _0x1165bc=this['editor']['plugins']['get'](M);_0x1165bc['context']===this['editor']&&(_0x1165bc['hasActive']()||_0x1165bc['switchTo']('inline'));}['setActiveAnnotation'](_0x36bf1c){_0x36bf1c!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x36bf1c&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x36bf1c)&&this['_addAnnotationToBalloon'](_0x36bf1c,!0x0),_0x36bf1c['isActive']=!0x0),_0x36bf1c||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x36bf1c);}['attach'](_0x1a1f0a){this['annotations']=_0x1a1f0a;const _0x5190bc=this['editor']['plugins']['get'](M),_0x4dbb20=this['_balloon'];if(this['isAttached'])throw new _0x3648c2('inlineannotations-attach-already-attached',this);if(_0x5190bc['context']!==this['editor'])throw new _0x3648c2('inlineannotations-not-allowed-with-context',this);const _0x12433f=this['editor']['plugins']['get'](P);this['listenTo'](_0x12433f,'refresh',()=>{const _0x43ab4b=_0x12433f['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4d4d43,_0x3e5097;!this['_forceRefresh']&&(_0x4d4d43=_0x43ab4b,_0x3e5097=this['_selectedAnnotations'],_0x4d4d43['length']===_0x3e5097['length']&&_0x4d4d43['every'](_0x54dcaa=>_0x3e5097['includes'](_0x54dcaa)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x43ab4b),this['setActiveAnnotation'](_0x43ab4b[0x0]||null));}),this['listenTo'](_0x12433f,'blur',(_0x513b12,{isAnnotationTracked:_0x20bfb5})=>{this['activeAnnotation']&&_0x20bfb5(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x232ea9,_0x41de09,_0x269d2b)=>{_0x269d2b||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1a1f0a,'remove',(_0x4f340c,_0x28ab59)=>{this['_removeAnnotationFromBalloon'](_0x28ab59),_0x28ab59===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4dbb20,'change:visibleView',(_0x24f20a,_0xd8ffe9,_0x21cd1c,_0x4f4315)=>{_0x4f4315&&this['stopListening'](_0x4f4315);const _0x143a86=_0x1a1f0a['getByView'](_0x21cd1c);_0x21cd1c&&_0x143a86&&(this['listenTo'](_0x21cd1c,'change:height',()=>{_0x4dbb20['updatePosition']();}),this['listenTo'](_0x21cd1c,'Esc',()=>{this['_closeAnnotation'](_0x143a86),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x143a86&&this['setActiveAnnotation'](_0x143a86));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x4dbb20['visibleView']&&(_0x1a1f0a['getByView'](_0x4dbb20['visibleView'])&&_0x4dbb20['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 _0x3648c2('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x15e7fc of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x15e7fc);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x163b37){for(const _0x3a4ae3 of this['_selectedAnnotations'])_0x163b37['includes'](_0x3a4ae3)||this['_manuallyClosed']['delete'](_0x3a4ae3);for(const _0xbd2f6c of this['annotations'])_0x163b37['includes'](_0xbd2f6c)||this['_removeAnnotationFromBalloon'](_0xbd2f6c);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x32c5a4 of _0x163b37)this['_addAnnotationToBalloon'](_0x32c5a4);}this['_selectedAnnotations']=_0x163b37;}['_addAnnotationToBalloon'](_0x543921,_0x49eafb=!0x1){this['_manuallyClosed']['has'](_0x543921)||(this['_addedAnnotations']['has'](_0x543921)||this['_balloon']['hasView'](_0x543921['view'])||(this['_addedAnnotations']['add'](_0x543921),this['_balloon']['add']({'stackId':_0x543921['view']['id'],'view':_0x543921['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x543921)}})),_0x49eafb&&this['_balloon']['showStack'](_0x543921['view']['id']));}['_getBalloonTargetForAnnotation'](_0x2a267d){const _0x39e65c=_0x2a267d['target'],_0x222a3b=this['editor']['editing']['view'],_0xcd3f89=_0x222a3b['document']['selection']['getFirstRange'](),_0x3e1686=_0x222a3b['domConverter']['viewRangeToDom'](_0xcd3f89);if(_0x3e1686['collapse'](!0x0),_0x39e65c){if(_0x39e65c instanceof _0x59f6c8)return _0x39e65c;let _0x5058c8=[];for(const _0x10b142 of _0x39e65c)_0x5058c8['push'](...(_0x46a144=_0x10b142['getClientRects'](),Array['from'](_0x46a144)['map'](DOMRect['fromRect'])));_0x5058c8=function(_0xe7bd23){const _0x1ec394=[];let _0x434351=_0xe7bd23[0x0];for(let _0x129c8d=0x1;_0x129c8d<_0xe7bd23['length'];_0x129c8d++)b(_0x434351,_0xe7bd23[_0x129c8d])?_0x434351['width']+=_0xe7bd23[_0x129c8d]['width']:(_0x1ec394['push'](_0x434351),_0x434351=_0xe7bd23[_0x129c8d]);return _0x1ec394['push'](_0x434351),_0x1ec394;}(_0x5058c8);const _0x14919d=_0x3e1686['getBoundingClientRect']();return _0x5058c8['find'](_0x4c2879=>_0x4c2879['top']<=_0x14919d['top']&&_0x4c2879['bottom']>=_0x14919d['bottom']&&_0x4c2879['left']<=_0x14919d['left']&&_0x4c2879['right']>=_0x14919d['right'])||_0x5058c8[0x0];}var _0x46a144;return _0x2a267d['targetRect']||_0x3e1686;}['_removeAnnotationFromBalloon'](_0xb367f){this['_addedAnnotations']['has'](_0xb367f)&&this['_balloon']['hasView'](_0xb367f['view'])&&(this['_addedAnnotations']['delete'](_0xb367f),this['_balloon']['remove'](_0xb367f['view']));}['_closeAnnotation'](_0x1b05a7){this['_manuallyClosed']['add'](_0x1b05a7),this['_removeAnnotationFromBalloon'](_0x1b05a7);}}function b(_0x53c2e3,_0x5ba1e4){return _0x53c2e3['top']===_0x5ba1e4['top']&&_0x53c2e3['bottom']===_0x5ba1e4['bottom']&&_0x53c2e3['right']===_0x5ba1e4['left'];}var Z='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M14\x203.5A3.5\x203.5\x200\x200\x201\x2017.5\x207v6l-.005.192a3.501\x203.501\x200\x200\x201-2.927\x203.262l-.062.008v1.813a1.5\x201.5\x200\x200\x201-2.193\x201.33l-.37-.193-.38-.212a13.452\x2013.452\x200\x200\x201-3.272-2.63l-.062-.07-4.729-.046a3.5\x203.5\x200\x200\x201-3.5-3.5v-6a3.5\x203.5\x200\x200\x201\x203.5-3.5L14\x203.5ZM3.5\x204.954a2\x202\x200\x200\x200-2\x202v6a2\x202\x200\x200\x200\x202\x202L8.924\x2015a11.917\x2011.917\x200\x200\x200\x203.71\x203.081l.372.194v-3.268L12.962\x2015H14a2\x202\x200\x200\x200\x202-2V7a2\x202\x200\x200\x200-2-2L3.5\x204.954Z\x22/><path\x20d=\x22M16.5.5h-10a3.5\x203.5\x200\x200\x200-3.162\x202h1.84A2\x202\x200\x200\x201\x206.5\x202h10a2\x202\x200\x200\x201\x202\x202v8.873a3.502\x203.502\x200\x200\x200\x201.495-2.681L20\x2010V4A3.5\x203.5\x200\x200\x200\x2016.5.5Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M12.013\x207.453a.75.75\x200\x200\x201\x20.034\x201.06l-3.75\x204a.75.75\x200\x200\x201-1.045.048l-2.25-2a.75.75\x200\x200\x201\x20.996-1.122l1.704\x201.515\x203.25-3.467a.75.75\x200\x200\x201\x201.061-.034Z\x22/></svg>\x0a';class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x3f6028,_0x24b66b){super(_0x3f6028),this['set']('isEmpty',!_0x24b66b['length']),this['focusTracker']=new _0x35dbc6(),this['_annotationViews']=_0x24b66b,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new Ft({'focusables':_0x24b66b,'focusTracker':this['focusTracker']}),this['listenTo'](_0x24b66b,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x24b66b,'remove',(_0x5feac,_0x57c0ef)=>{_0x57c0ef['isActive']&&this['focus'](),_0x24b66b['length']||(this['isEmpty']=!0x0);});const _0x1d0c63=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':S(_0x3f6028,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x24b66b},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x1d0c63['if']('isEmpty','ck-hidden',_0x17a026=>!_0x17a026)]},'children':[{'text':S(_0x3f6028,'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 _0x267a09 of this['_annotationViews'])this['focusTracker']['add'](_0x267a09['element']);this['_annotationViews']['on']('change',(_0x3d7bb4,{added:_0x3bd4d6,removed:_0x5d5dc3})=>{for(const _0x439278 of _0x3bd4d6)this['focusTracker']['add'](_0x439278['element']);for(const _0x7cdad7 of _0x5d5dc3)this['focusTracker']['remove'](_0x7cdad7['element']);});}}class f extends _0xe30f87{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,N];}constructor(_0x2c5d31){super(_0x2c5d31),this['archivedThreads']=new _0x37f3a3();}['init'](){const _0x1bf490=this['context'],_0x32b05a=_0x1bf490['plugins']['get'](o),_0x2e426d=_0x1bf490['plugins']['get'](N);this['listenTo'](_0x32b05a,'addCommentThread',(_0x5b804b,{threadId:_0x987011})=>{const _0x1ea04c=_0x32b05a['getCommentThread'](_0x987011);_0x1ea04c['archivedAt']&&this['archivedThreads']['add'](_0x1ea04c,this['_calculatePosition'](_0x1ea04c['archivedAt'])),this['listenTo'](_0x1ea04c,'change:archivedAt',(_0x386ac1,_0x45713c,_0x161000)=>{_0x161000?this['archivedThreads']['has'](_0x1ea04c)||this['archivedThreads']['add'](_0x1ea04c,this['_calculatePosition'](_0x1ea04c['archivedAt'])):this['archivedThreads']['has'](_0x1ea04c)&&this['archivedThreads']['remove'](_0x1ea04c);});}),this['listenTo'](_0x32b05a,'removeCommentThread',(_0x579b22,{threadId:_0x1ba54b})=>{const _0x20fcf0=_0x32b05a['getCommentThread'](_0x1ba54b);this['stopListening'](_0x20fcf0),this['archivedThreads']['has'](_0x20fcf0)&&this['archivedThreads']['remove'](_0x20fcf0);},{'priority':'highest'}),this['listenTo'](_0x2e426d['collection'],'focus',(_0x1e3385,_0x4b93c8)=>{_0x4b93c8['isVisible']||(_0x4b93c8['isActive']=!0x0,_0x2e426d['activate'](_0x4b93c8));});}['_calculatePosition'](_0x27cb7e){const _0x408c62=[...this['archivedThreads']]['findIndex'](_0x37a95b=>_0x37a95b['archivedAt']<_0x27cb7e);return _0x408c62>-0x1?_0x408c62:this['archivedThreads']['length'];}}class a extends _0x534d76{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0x258754];}constructor(_0x34a156){super(_0x34a156),this['annotationViews']=new _0x211a3a(),this['_pendingThreads']=[];}['init'](){const _0x181344=this['editor'],_0x373fc4=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x181344['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x6ad9e9,!0x0)),_0x181344['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x260637=this['_createCommentsArchiveButton'](_0x40bbf4);return _0x260637['set']({'role':'menuitemcheckbox'}),_0x260637;});const _0x30828d=_0x181344['plugins']['get'](f),_0x486362=_0x181344['plugins']['get']('Annotations'),_0x6bed7b=_0x181344['plugins']['get']('CommentsRepository');this['listenTo'](_0x30828d['archivedThreads'],'add',(_0x510afa,_0x185dad)=>{const _0x5c2329=_0x181344['config']['get']('collaboration.channelId');if(!_0x5c2329||_0x185dad['channelId']===_0x5c2329){const _0x4dc00e=_0x6bed7b['_threadToController']['get'](_0x185dad);if(!_0x4dc00e)return void this['_pendingThreads']['push'](_0x185dad);const _0x16e665=this['_calculatePosition'](_0x185dad['archivedAt']),_0x21490f=_0x486362['getByInnerView'](_0x4dc00e['view']);_0x21490f['isVisible']&&_0x486362['_visibleAnnotations']['remove'](_0x21490f),this['annotationViews']['add'](_0x21490f['view'],_0x16e665);}}),this['listenTo'](_0x486362['collection'],'add',(_0x29d71f,_0xa2a263)=>{const _0xb88c01=this['_pendingThreads']['find'](_0x5651ae=>{const _0x51bb60=_0x6bed7b['_threadToController']['get'](_0x5651ae);return _0x51bb60&&_0xa2a263['innerView']===_0x51bb60['view'];});if(_0xb88c01){const _0x2d2077=this['_calculatePosition'](_0xb88c01['archivedAt']);this['annotationViews']['add'](_0xa2a263['view'],_0x2d2077),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0xb88c01),0x1);}}),this['listenTo'](_0x30828d['archivedThreads'],'remove',(_0x135f32,_0x70f596)=>{const _0x3c7412=_0x181344['config']['get']('collaboration.channelId');if(!_0x3c7412||_0x70f596['channelId']===_0x3c7412){const _0x3449ce=_0x6bed7b['_threadToController']['get'](_0x70f596),_0x3ed360=_0x486362['getByInnerView'](_0x3449ce['view']);this['annotationViews']['remove'](_0x3ed360['view']),this['stopListening'](_0x3ed360['focusableElements']);}}),this['listenTo'](_0x486362['collection'],'add',(_0xa71d59,_0x260f08)=>{this['listenTo'](_0x260f08,'escape',_0x373fc4);}),this['listenTo'](_0x486362['collection'],'remove',(_0x217c7a,_0x382467)=>{this['stopListening'](_0x382467,'escape',_0x373fc4);});}['_calculatePosition'](_0x4bb512){const _0x5699a1=this['editor']['config']['get']('collaboration.channelId'),_0x13c980=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x413be5=>_0x413be5['channelId']===_0x5699a1)['findIndex'](_0x37f7dd=>_0x37f7dd['archivedAt']<_0x4bb512);return _0x13c980<0x0||_0x13c980>this['annotationViews']['length']?this['annotationViews']['length']:_0x13c980-0x1;}['_toggleDialog'](){const _0x4e961a=this['editor'],_0x817a9e=_0x4e961a['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x4e961a['locale'],this['annotationViews'])),'commentsArchive'===_0x817a9e['id']?_0x817a9e['hide']():_0x817a9e['show']({'id':'commentsArchive','title':S(_0x4e961a['locale'],'COMMENTS_ARCHIVE'),'icon':Z,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x2bb36c['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x465b44,_0x328c5c=!0x1){const _0x597abd=this['editor']['locale'],_0x1def48=this['editor']['plugins']['get']('Dialog'),_0x1bc1fb=new _0x465b44(_0x597abd);return _0x1bc1fb['bind']('isEnabled')['to'](this,'isEnabled'),_0x1bc1fb['bind']('isOn')['to'](_0x1def48,'id',_0x4b1173=>'commentsArchive'===_0x4b1173),_0x1bc1fb['set']({'label':S(_0x597abd,'COMMENTS_ARCHIVE'),'icon':Z,'isToggleable':!0x0}),_0x328c5c&&(_0x1bc1fb['tooltip']=!0x0),this['listenTo'](_0x1bc1fb,'execute',()=>this['_toggleDialog']()),_0x1bc1fb;}['_hideDialogOnAnnotationEscape']=_0x5f1eac=>{const _0x4a6f1f=_0x5f1eac['source'];if(!this['annotationViews']['has'](_0x4a6f1f['view']))return;const _0x3742d4=this['editor']['plugins']['get']('Dialog');_0x3742d4['isOpen']&&'commentsArchive'===_0x3742d4['id']&&(_0x3742d4['hide'](),_0x5f1eac['stop']());};}class p extends _0x534d76{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,x as AnnotationCollection,T as AnnotationView,N as Annotations,M as AnnotationsUIs,ss as BaseCommentThreadView,os as BaseCommentView,re as Comment,oe as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,Ct as CommentThreadView,vt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,e as WideSidebar};
|
|
23
|
+
import{Editor as _0x190e00,icons as _0x58d4b3,ContextPlugin as _0x4fba92,PendingActions as ht,Command as _0x11308d,Plugin as _0x44cf24,Context as _0x17bfab}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x570f76,uid as _0xcaced0,KeystrokeHandler as jt,FocusTracker as _0x42b9d5,diff as _0x3ce627,Collection as _0x3a2226,Rect as _0x4c5767,CKEditorError as _0x358429,first as _0x54d675,priorities as Wt,scrollViewportToShowTarget as rt,getEnvKeystrokeText as nt,toUnit as Ht,DomEmitterMixin as _0x92e931,keyCodes as _0x2aed5e}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x5a74dc,AriaDescriptionView as Zt,setupThreadKeyboardNavigation as ts,ConfirmMixin as ti,LateFocusButtonView as _0x2d48b1,trimHtml as _0x448b88,LateFocusDropdownButtonView as _0x437739,Users as it,getDateTimeFormatter as mt,hashObject as lt,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as ot,FOCUS_ANNOTATION_KEYSTROKE as _0x30a9d8}from'ckeditor5-collaboration/dist/index.js';import{throttle as bt,isEqual as It,cloneDeep as pt,set as wt,unset as At,debounce as _0x4da05a}from'lodash-es';import{EditorUIView as Xt,InlineEditableUIView as $t,EditorUI as Ut,View as kt,FocusCycler as Ft,ButtonView as _0xaf61aa,ViewCollection as _0xabf670,createDropdown as _0x193930,ListView as _0x133e4e,focusChildOnDropdownOpen as _0x517071,ListItemView as _0x2f18f7,MenuBarMenuListItemButtonView as _0x5a2278,BodyCollection as _0x578c2b,BalloonPanelView as _0x4336a9,ContextualBalloon as _0x130aae,Dialog as _0xd8596e,DialogViewPosition as _0x52df4d}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disablePlaceholder as zt,enablePlaceholder as St,MouseObserver as _0xce54ba}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as Bt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as Et,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 Nt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x343776}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';class yt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x570f76(){['model'];['view'];constructor(_0x3735dc,_0x2989cc){super(),this['model']=_0x3735dc,this['model']['_isAttached']=!0x0,this['view']=_0x2989cc,this['listenTo'](_0x2989cc,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x2989cc,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x2989cc,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x2989cc,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x2989cc,'addComment',(_0x40f61e,_0x2cb832)=>this['addComment'](_0x2cb832)),this['listenTo'](_0x2989cc,'updateComment',(_0x331c7a,_0x210318,_0x1f4d2)=>this['updateComment'](_0x210318,_0x1f4d2)),this['listenTo'](_0x2989cc,'removeComment',(_0x2ba182,_0x3748c1)=>this['removeComment'](_0x3748c1));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x311dff){this['model']['addComment']({'content':_0x311dff,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x35942e,_0x1afc9f){this['model']['getComment'](_0x35942e)['update']({'content':_0x1afc9f});}['removeComment'](_0x569c40){this['model']['getComment'](_0x569c40)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function S(_0x3a46d2,_0x4fdfcd,_0x1941f1){const t=_0x3a46d2['t'];switch(_0x4fdfcd){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'},_0x1941f1);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'},_0x1941f1);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'},_0x1941f1);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'},_0x1941f1);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x1941f1);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'},_0x1941f1);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'},_0x1941f1);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'},_0x1941f1);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 Vt extends Xt{['main'];['editable'];constructor(_0x1fc718,_0x1983e1){super(_0x1fc718);const _0x23a719=_0xcaced0();this['main']=this['createCollection'](),this['editable']=new $t(_0x1fc718,_0x1983e1,void 0x0,{'label':()=>S(_0x1fc718,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x1fc718['uiLanguageDirection'],'lang':_0x1fc718['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x23a719},'children':[{'tag':'div','attributes':{'class':'ck-editor__main','role':'presentation'},'children':this['main']}]});}['render'](){super['render'](),this['main']['add'](this['editable']);}['focus'](){this['editable']['element']['focus']();}}class Ot extends Ut{['view'];constructor(_0x4f184b){super(_0x4f184b),this['view']=new Vt(_0x4f184b['locale'],_0x4f184b['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0xa5f9d1=this['editor']['editing']['view'],_0x507be9=this['view']['editable'],_0x2194bc=_0xa5f9d1['document']['getRoot']();_0x507be9['name']=_0x2194bc['rootName'],this['view']['render']();const _0x3fedb6=_0x507be9['element'];this['setEditableElement'](_0x507be9['name'],_0x3fedb6),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0xa5f9d1['attachDomRoot'](_0x3fedb6),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[Bt,Et,Gt,Jt,Kt,Lt,Nt];class Rt extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x570f76(_0x190e00){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x223b62={}){function _0xf8cf31(_0x2ed67a){return _0x2ed67a['map'](_0x158ae6=>String['fromCharCode'](_0x158ae6))['join']('');}(_0x223b62=Object['assign']({},_0x223b62))['plugins']||(_0x223b62['plugins']=Rt['defaultPlugins']),super(_0x223b62),this['ui']=new Ot(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0xf8cf31([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xf8cf31([0x76,0x69,0x65,0x77])][_0xf8cf31([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xf8cf31([0x61,0x75,0x74,0x6f]),this[_0xf8cf31([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0xf8cf31([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xf8cf31([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0xf8cf31([0x73,0x74,0x61,0x74,0x75,0x73])]:_0xf8cf31([0x6f,0x6b])});}['create'](){const _0x1b6b3e=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x1b6b3e))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x3faff5=>{const _0x51ee59=this['model']['document']['getRoot'](),_0x569746=_0x51ee59&&_0x51ee59['getChild'](_0x51ee59['childCount']-0x1);_0x3faff5['setSelection'](_0x569746,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x3bef88=this['editing']['view'],_0x18c5eb=_0x3bef88['document']['getRoot'](),_0x537aed=_0x18c5eb['getChild'](0x0);_0x18c5eb['childCount']>0x1||!_0x537aed||'p'!=_0x537aed['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(zt(_0x3bef88,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x537aed['placeholder']=this['placeholder']),St({'view':_0x3bef88,'element':_0x537aed,'keepOnFocus':!0x0}),this['placeholderElement']=_0x537aed);}}class hs extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x29fc3f,_0x1a59e4={}){super(_0x29fc3f),this['editor']=null,this['_editorConfig']=_0x1a59e4,this['set']('value',_0x1a59e4['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',S(_0x29fc3f,'Reply...')),this['set']('submitLabel',S(_0x29fc3f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x42b9d5(),this['focusCycler']=new Ft({'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',(_0x4c6274,_0x391e0e)=>{this['cancelButtonView']['fire']('execute'),_0x391e0e();}),this['keystrokes']['set']('Ctrl+Enter',(_0x49bc2d,_0x37bc87)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x37bc87());}),this['on']('submit',(_0x4d39ee,_0x65d61d)=>{_0x65d61d['length']>0xfde8?(alert(S(_0x29fc3f,'TOO_LONG_COMMENT_ALERT',[_0x65d61d['length'],0xfde8])),_0x4d39ee['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 _0x183913=this['editor'];this['element']['insertBefore'](_0x183913['ui']['element'],this['element']['firstChild']),_0x183913['model']['document']['on']('change',()=>this['value']=_0x183913['getData']()),_0x183913['bind']('placeholder')['to'](this),this['focusables']['add'](_0x183913['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x390f4a){-0x1===_0x390f4a?(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:_0x4df040}=this,_0x48336f=new _0xaf61aa(_0x4df040);return _0x48336f['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x48336f['withText']=!0x0,_0x48336f['bind']('label')['to'](this,'submitLabel'),_0x48336f['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x48336f['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x3101a2,_0x517deb)=>!_0x517deb&&!!_0x3101a2['trim']()),_0x48336f;}['_createCancelButton'](){const {locale:_0x4a6078}=this,_0x2e1fc4=new _0xaf61aa(_0x4a6078);return _0x2e1fc4['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2e1fc4['label']=S(_0x4a6078,'Cancel'),_0x2e1fc4['withText']=!0x0,_0x2e1fc4['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2e1fc4;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0xb22570=>{this['focusTracker']['add'](_0xb22570['element']);}),this['focusables']['on']('change',(_0x17553a,_0x4be282)=>{for(const _0x44d6 of Array['from'](_0x4be282['added'])['reverse']())this['focusTracker']['add'](_0x44d6['element']);});}}class ie extends kt{constructor(_0x7e6b2c,_0x1af9e5,_0x32d5aa){super(_0x7e6b2c),this['commentInputView']=new hs(_0x7e6b2c,_0x32d5aa),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4a1f7e,_0x25960c)=>_0x4a1f7e||!!_0x25960c),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 _0x5a74dc(_0x7e6b2c,_0x1af9e5),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'](_0x4f09c1){this['commentInputView']['focus'](_0x4f09c1);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x3fb3ce,_0x12732e)=>{const {submitButtonView:_0x500f48,cancelButtonView:_0x513491,editor:_0x15fc1c}=this['commentInputView'];[_0x500f48['element'],_0x513491['element'],_0x15fc1c?_0x15fc1c['editing']['view']['getDomRoot']():null]['filter'](_0x3a375b=>_0x3a375b)['some'](_0x13e92c=>_0x13e92c['contains'](_0x12732e['target']))||(this['focus'](),_0x12732e['preventDefault']());});}}class cs extends kt{constructor(_0x4286eb){super(_0x4286eb);const _0x3b434f=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x3b434f['to']('count',_0x312624=>S(_0x4286eb,'NUMBER_OF_COMMENTS',_0x312624))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x90265f,_0x2a87a0,_0x286ba7){super(_0x90265f);const _0xcbb37=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x2a87a0['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x2a87a0,this['_config']=_0x286ba7,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x42b9d5(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3ff38b=>this['commentViews']['map'](_0x29cbc8=>_0x29cbc8['element'])['includes'](_0x3ff38b['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new cs(_0x90265f),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x28428a=>_0x28428a-this['_config']['maxCommentsWhenCollapsed']);for(const _0x5e49c8 of _0x2a87a0['comments'])this['_handleNewCommentModel'](_0x5e49c8);this['_handleInfoComment'](),this['listenTo'](_0x2a87a0['comments'],'add',(_0x39d926,_0x528811)=>{const _0x58b318=this['_calculatePosition'](_0x528811);this['length']++,this['_handleNewCommentModel'](_0x528811,_0x58b318),this['refreshVisibleViews']();}),this['listenTo'](_0x2a87a0['comments'],'remove',(_0x189e6b,_0x4e92e0)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4e92e0),this['refreshVisibleViews']();}),this['listenTo'](_0x2a87a0,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x2a87a0,'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',_0xcbb37['if']('length','ck-hidden',_0x3641f1=>!_0x3641f1)],'aria-label':S(_0x90265f,'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'](_0x3adf85){-0x1===_0x3adf85?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x3621e5 of this['commentViews'])_0x3621e5['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x1f74b7,_0x25c190){const _0x390bdf=new this['_config']['CommentView'](this['locale'],_0x1f74b7,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x390bdf['viewUid']=_0x1f74b7['id'],_0x390bdf['delegate']('removeComment')['to'](this),_0x390bdf['delegate']('updateComment')['to'](this),_0x390bdf['delegate']('resolveCommentThread')['to'](this),_0x390bdf['delegate']('editorReady')['to'](this),_0x390bdf['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x390bdf,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x390bdf,_0x25c190);}['_calculatePosition'](_0x324669){const _0x57feff=this['_model']['_findOptimalIndex'](_0x324669);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x324669['authoredAt']?_0x57feff-0x1:_0x57feff:_0x57feff-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x3f9020={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':S(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x3f9020,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x3f9020));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x26f871){const _0x526187=this['commentViews']['remove'](_0x26f871['id']);this['stopListening'](_0x526187),_0x526187['isEditMode']&&this['_updateHasDirtyComment'](),_0x526187['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x2dd3b2=>_0x2dd3b2['isEditMode']);}['_rearrangeCollapse'](){const _0x47fe5e=function(_0x283908){const _0x2dff4d=new _0x3a2226();for(const _0x34a079 of _0x283908)_0x2dff4d['add'](_0x34a079);return _0x2dff4d;}(this['commentViews']),_0x23b58f=this['_collapsedCommentsView']['count'];for(let _0x5a6cde=0x1;_0x5a6cde<=_0x23b58f;_0x5a6cde++)_0x47fe5e['remove'](0x1);for(const _0x1467dc of _0x47fe5e)_0x1467dc['collapse']();_0x23b58f>0x0&&_0x47fe5e['add'](this['_collapsedCommentsView'],0x1),ns(_0x3ce627(Array['from'](this['visibleViews']),Array['from'](_0x47fe5e)),this['visibleViews'],_0x47fe5e);}['_rearrangeExpand'](){ns(_0x3ce627(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0x3172d2 of this['visibleViews'])_0x3172d2['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5da315=>{this['focusTracker']['add'](_0x5da315['element']),this['keystrokes']['listenTo'](_0x5da315['element']);}),this['commentViews']['on']('change',(_0x77c967,_0x3c98f8)=>{for(const _0x3e292e of _0x3c98f8['removed'])this['focusTracker']['remove'](_0x3e292e['element']),this['keystrokes']['stopListening'](_0x3e292e['element']);for(const _0x1b9970 of Array['from'](_0x3c98f8['added'])['reverse']())this['focusTracker']['add'](_0x1b9970['element']),this['keystrokes']['listenTo'](_0x1b9970['element']);});}}function ns(_0x56ff95,_0x539a7d,_0x5327c3){let _0x431ecf=0x0;for(const _0x1e1f4f of _0x56ff95)switch(_0x1e1f4f){case'insert':_0x539a7d['add'](_0x5327c3['get'](_0x431ecf),_0x431ecf),_0x431ecf++;break;case'delete':_0x539a7d['remove'](_0x431ecf);break;case'equal':_0x431ecf++;}}class as extends kt{constructor(_0x144d7e){super(_0x144d7e);const _0x202faf=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x202faf['to']('contextValue',_0x298a3c=>S(_0x144d7e,'THREAD_CONTEXT_LABEL',_0x298a3c)),'tabindex':-0x1},'children':[{'text':_0x202faf['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Yt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0xa498c6,_0x1f6685){super(_0xa498c6);const _0xc79da8=this['bindTemplate'];this['_model']=_0x1f6685,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x42b9d5(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0xe8d99=>!!_0xe8d99),this['bind']('contextValue')['to'](this['_model'],'context',_0x214ad0=>_0x214ad0&&_0x214ad0['value']?this['_trimContextValue'](_0x214ad0['value']):S(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',_0xc79da8['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 _0x2d49ba=new _0xaf61aa(this['locale']);return _0x2d49ba['label']=S(this['locale'],'Reopen'),_0x2d49ba['tooltip']=S(this['locale'],'Reopen'),_0x2d49ba['icon']='<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22m5.042\x209.367\x202.189\x201.837a.75.75\x200\x200\x201-.965\x201.149l-3.788-3.18a.747.747\x200\x200\x201-.21-.284.75.75\x200\x200\x201\x20.17-.945L6.23\x204.762a.75.75\x200\x201\x201\x20.964\x201.15L4.863\x207.866h8.917A.75.75\x200\x200\x201\x2014\x207.9a4\x204\x200\x201\x201-1.477\x207.718l.344-1.489a2.5\x202.5\x200\x201\x200\x201.094-4.73l.008-.032H5.042z\x22/></svg>',_0x2d49ba['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x4891f4=>!_0x4891f4),_0x2d49ba['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x112d56,_0x1658df)=>_0x112d56&&_0x1658df),_0x2d49ba['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x2d49ba;}['_trimContextValue'](_0x2aa3c7){if(_0x2aa3c7['length']<0x96)return _0x2aa3c7;const _0x2604d7=_0x2aa3c7['lastIndexOf']('\x20',0x93);return _0x2aa3c7['substring'](0x0,_0x2604d7>-0x1?_0x2604d7:0x93)+'...';}['_attachContextActions'](){const _0x1e61ec=this['element']['querySelector']('.ck-context'),_0x742411=_0x1e61ec['querySelector']('.ck-context__value');this['listenTo'](_0x1e61ec,'mouseenter',()=>{_0x742411['offsetWidth']<_0x742411['scrollWidth']&&_0x1e61ec['classList']['add']('overlay');}),this['listenTo'](_0x1e61ec,'mouseleave',()=>{_0x1e61ec['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x396f4b of this['focusables'])this['focusTracker']['add'](_0x396f4b['element']),this['keystrokes']['listenTo'](_0x396f4b['element']);}['_createContextView'](){const _0x3fe807=new as(this['locale']);return _0x3fe807['bind']('contextValue')['to'](this),_0x3fe807;}}class ss extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x414d5f,_0xc04abe,_0x18e0c6,_0x51f92b){super(_0x414d5f),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0xc04abe,this['_localUser']=_0x18e0c6,this['_config']=_0x51f92b,this['commentThreadHeaderView']=new Yt(_0x414d5f,_0xc04abe),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Zt(_0x414d5f,S(_0x414d5f,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x414d5f,_0xc04abe,Object['assign']({'CommentView':this['_config']['CommentView']},_0x51f92b)),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',(_0x460b55,_0x1d1eb2)=>_0x460b55||!!_0x1d1eb2),this['bind']('isUnlinked')['to'](_0xc04abe,'unlinkedAt',_0x261666=>!!_0x261666),this['bind']('ariaLabel')['to'](this,'length',_0x18ef88=>{const _0x216161=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return S(this['locale'],'COMMENT_THREAD_LABEL',[_0x18ef88,_0x216161]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x42b9d5(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x376d70=>_0x376d70['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 _0x3f2e4b=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x1e4633=_0x3f2e4b['commentInputView'];return _0x3f2e4b['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x1e4633,'value',(_0x1034c1,_0x594cfb,_0xe7f515,_0x2ea03a,_0x5b6daf)=>!!_0x5b6daf||!!_0x2ea03a&&_0xe7f515&&!_0x594cfb||_0x1034c1&&_0xe7f515&&!_0x594cfb),_0x1e4633['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x40ff60,_0x1bff5a,_0x59a41f)=>{let _0xd5e290;return _0xd5e290=_0x59a41f&&_0x1bff5a?'Reply\x20to\x20reopen\x20discussion...':_0x40ff60?'Reply...':'Write\x20a\x20comment...',S(this['locale'],_0xd5e290);}),_0x1e4633['bind']('submitLabel')['to'](this,'length',_0x4d6907=>S(this['locale'],_0x4d6907?'Reply':'Comment')),_0x1e4633['on']('submit',(_0x11c6e8,_0x361788)=>{this['fire']('addComment',_0x361788),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x1e4633['on']('cancel',()=>{this['focus']();}),_0x1e4633['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x1e4633['on']('cancel',_0x32e29f=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x32e29f['stop']());}),this['on']('change:isActive',(_0x36c105,_0x245a25,_0x34f77b)=>{_0x34f77b||this['length']||_0x1e4633['value']||this['fire']('removeCommentThread');}),_0x3f2e4b;}}class Ct extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(ss){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0x56ebdc,_0xd8dd3f,_0x2d2be6,_0x4de863){super(_0x56ebdc,_0xd8dd3f,_0x2d2be6,_0x4de863),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0x56ebdc,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x31b4cb,_0x2ed123,_0xafca58)=>{_0xafca58||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x5365e5,_0xa3b591,_0x5db2cc)=>{_0x5db2cc&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x4844e1=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x4844e1['if']('isActive','ck-thread--active'),_0x4844e1['if']('isUnlinked','ck-thread--unlinked'),_0x4844e1['if']('isConfirm','ck-thread--remove-confirmation'),_0x4844e1['to']('actionIndicator',_0x4d8a66=>_0x4d8a66?'ck-thread--'+_0x4d8a66:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x4844e1['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 _0xe552cf of this['commentsListView']['commentViews'])_0xe552cf['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x3da1ad}=this,_0xf08683=this['commentsListView']['commentViews']['get'](0x0);_0xf08683===this['_boundFirstCommentView']||_0xf08683['isSystemComment']||(this['_boundFirstCommentView']=_0xf08683,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0xf08683,'actionIndicator',_0x45ff1d=>'remove'===_0x45ff1d?'remove':null),_0xf08683['placeholder']=S(_0x3da1ad,'Write\x20a\x20comment...'),_0xf08683['removeButton']['on']('execute',_0x489216=>{_0x489216['stop'](),this['showConfirm'](S(_0x3da1ad,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0xf08683['focus']();}),_0xf08683['actionBar']['add'](this['resolveButton'],0x0),_0xf08683['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x1ababa=new _0x2d48b1(this['locale']);return _0x1ababa['label']=S(this['locale'],'Resolve'),_0x1ababa['tooltip']=S(this['locale'],'Resolve'),_0x1ababa['icon']=_0x58d4b3['check'],_0x1ababa['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x1ababa['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x284108=>!_0x284108),_0x1ababa['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x4f7012,_0x1b146a)=>_0x4f7012&&!_0x1b146a),_0x1ababa['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x1ababa;}['_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 kt{constructor(_0x4799c4){super(_0x4799c4),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x484dd1,_0x59f5d1,_0x21d511)=>{this['element']['innerHTML']=_0x21d511;}),this['element']['innerHTML']=this['content'];}}class os extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0x32d931,_0x15a0f8,_0xfe0133){super(_0x32d931),this['_model']=_0x15a0f8,this['_config']=_0xfe0133,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x15a0f8,'content',_0x15a0f8,'authoredAt',(_0x10cf0b,_0x3cd8f3)=>S(_0x32d931,'COMMENT_ARIA_LABEL',[_0x15a0f8['author']['name'],_0xfe0133['formatDateTime'](_0x3cd8f3),new DOMParser()['parseFromString'](_0x10cf0b,'text/html')['body']['textContent'],_0x15a0f8['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Zt(_0x32d931,S(_0x32d931,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0xabf670(),this['focusTracker']=new _0x42b9d5(),this['keystrokes']=new jt(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x157ccf=>_0x157ccf['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']?S(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):S(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?S(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):S(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x5878d4=new es(this['locale']);return _0x5878d4['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x26610d,_0x36305b)=>_0x36305b?_0x448b88(_0x26610d,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x26610d),_0x5878d4;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x535778=new hs(this['locale'],this['_config']['editorConfig']);return _0x535778['value']=this['_model']['content'],_0x535778['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x535778['submitLabel']=S(this['locale'],'Save'),_0x535778['on']('submit',(_0x1501a6,_0xf63153)=>{this['fire']('updateComment',this['_model']['id'],_0xf63153),this['switchToDisplayMode'](),this['focus']();}),_0x535778['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x535778['once']('editorReady',()=>{_0x535778['focus']();}),_0x535778['createEditor'](),_0x535778['delegate']('editorReady')['to'](this),_0x535778['delegate']('editorDestroyed')['to'](this),_0x535778;}['_setupKeyboardNavigation'](){const _0x225522=this['element'];this['keystrokes']['listenTo'](_0x225522);for(const _0x56f441 of this['focusables'])this['focusTracker']['add'](_0x56f441['element']),this['keystrokes']['listenTo'](_0x56f441['element']);this['focusables']['on']('change',(_0x34290e,_0x264093)=>{for(const _0xccf76d of _0x264093['removed'])this['focusTracker']['remove'](_0xccf76d['element']),this['keystrokes']['stopListening'](_0xccf76d['element']);for(const _0x52fc2a of _0x264093['added'])this['focusTracker']['add'](_0x52fc2a['element']),this['keystrokes']['listenTo'](_0x52fc2a['element']);}),this['keystrokes']['set']('enter',(_0x1cf89d,_0x477a82)=>{_0x225522===_0x1cf89d['target']&&(this['focusCycler']['focusFirst'](),_0x477a82());}),this['keystrokes']['set']('esc',(_0x197c28,_0x30e08e)=>{_0x225522!==_0x197c28['target']&&(this['focus'](),_0x30e08e());});}}class vt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(os){['actionBar'];['userView'];constructor(_0x19bf18,_0x2c6e84,_0x2aba87){super(_0x19bf18,_0x2c6e84,_0x2aba87),this['set']('actionIndicator',null),this['set']('placeholder',S(_0x19bf18,'Reply...')),this['bind']('authoredAt')['to'](_0x2c6e84),this['bind']('resolvedAt')['to'](_0x2c6e84),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 _0x5a74dc(_0x19bf18,_0x2c6e84['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x2c6e84,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x1470ca=this['bindTemplate'],_0x244282=[{'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']}},{'tag':'time','attributes':{'datetime':_0x1470ca['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x1470ca['to']('authoredAt',_0x358015=>this['_config']['formatDateTime'](_0x358015))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x1470ca['if']('isEditMode','ck-comment__actions--hidden'),_0x1470ca['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']&&_0x244282['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper',_0x1470ca['if']('isConfirm','ck-comment--remove-confirmation')],'tabindex':-0x1,'aria-label':_0x1470ca['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x1470ca['if']('isEditMode','ck-comment--edit'),_0x1470ca['if']('isSystemComment','ck-comment--info'),_0x1470ca['to']('actionIndicator',_0x5b9bee=>_0x5b9bee?'ck-comment--'+_0x5b9bee:'')],'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':_0x244282}]}]};}['_createEditButton'](){const _0x509420=new _0xaf61aa(this['locale']);return _0x509420['label']=S(this['locale'],'Edit'),_0x509420['icon']=_0x58d4b3['pencil'],_0x509420['withText']=!0x0,_0x509420['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x509420['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x1d3129=>!_0x1d3129),_0x509420['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x509420['on']('execute',()=>this['switchToEditMode']()),_0x509420;}['_createRemoveButton'](){const _0x48cdf2=new _0xaf61aa(this['locale']);return _0x48cdf2['label']=S(this['locale'],'Remove'),_0x48cdf2['icon']='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M5.2\x207h9.2c.6\x200\x201\x20.4\x201\x201v9.9c0\x20.5-.4\x201-1\x201H5.2a1\x201\x200\x200\x201-1-1V8c0-.6.4-1\x201-1zm1\x201.5c-.3\x200-.5.2-.5.5v8c0\x20.3.2.5.5.5h.5c.2\x200\x20.5-.2.5-.5V9c0-.3-.3-.5-.5-.5h-.5zm3.2\x200c-.2\x200-.5.2-.5.5v8c0\x20.3.3.5.5.5h.5c.3\x200\x20.5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.4zm3.5\x200c-.2\x200-.5.2-.5.5v8c0\x20.3.3.5.5.5h.5c.3\x200\x20.5-.2.5-.5V9c0-.3-.2-.5-.5-.5h-.5zm-1.4-7.1H8.3L6.5\x203.6H3.8c-.5\x200-.7.3-.7.8s.2.7.7.7h12c.6\x200\x20.9-.2.9-.7\x200-.5-.3-.8-1-.8h-2.4l-1.8-2.2z\x22/></svg>\x0a',_0x48cdf2['withText']=!0x0,_0x48cdf2['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x48cdf2['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3eba4c=>!_0x3eba4c),_0x48cdf2['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x48cdf2['on']('execute',()=>{this['showConfirm'](S(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x48cdf2;}['_createDropdown'](){const _0x54f447=_0x193930(this['locale'],_0x437739),_0x4ef54d=_0x54f447['panelView']['children'],_0x335753=new _0x133e4e(this['locale']),_0x624d26=_0x54f447['bindTemplate'];_0x517071(_0x54f447,()=>this['items']['find'](_0x2a2187=>_0x2a2187['isVisible'])),_0x54f447['extendTemplate']({'attributes':{'class':[_0x624d26['if']('isVisible','ck-hidden',_0x38983a=>!_0x38983a)]}});const _0x4d5137=(_0x154410,_0x5b5b92=-0x1)=>{const _0x555119=new _0x2f18f7(this['locale']);_0x555119['children']['add'](_0x154410);const _0x2a7d0d=_0x5b5b92>-0x1?_0x5b5b92:_0x335753['items']['length'];_0x335753['items']['add'](_0x555119,_0x2a7d0d);const _0x3d05be=Array['from'](this['items']);_0x54f447['unbind']('isEnabled','isVisible'),_0x54f447['bind']('isEnabled')['toMany'](_0x3d05be,'isEnabled',(..._0x521bea)=>_0x521bea['some'](_0xf1280e=>_0xf1280e)),_0x54f447['bind']('isVisible')['toMany'](_0x3d05be,'isVisible',(..._0x47c423)=>_0x47c423['some'](_0x1b6cf2=>_0x1b6cf2));};_0x54f447['panelPosition']='sw',_0x54f447['buttonView']['set']({'label':S(this['locale'],'Show\x20more\x20items'),'icon':_0x58d4b3['threeVerticalDots']});for(const _0x2cc455 of this['items'])_0x4d5137(_0x2cc455);return _0x4ef54d['add'](_0x335753),_0x54f447['listenTo'](this['items'],'add',(_0x39b9ad,_0xd479fc,_0x2446ae)=>{_0x4d5137(_0xd479fc,_0x2446ae);}),_0x54f447['listenTo'](this['items'],'remove',(_0x1a7d8e,_0x4c553c,_0x5dba9f)=>{_0x335753['items']['remove'](_0x5dba9f);}),_0x54f447;}['_attachActions'](_0x11f113,_0x4ca4d7){const _0x1065a7=_0x11f113&&_0x11f113['element'];_0x1065a7&&(this['listenTo'](_0x1065a7,'mouseenter',()=>this['actionIndicator']=_0x4ca4d7),this['listenTo'](_0x1065a7,'focus',()=>this['actionIndicator']=_0x4ca4d7),this['listenTo'](_0x1065a7,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x1065a7,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0x42d7b2=super['_createCommentInputView']();return _0x42d7b2['bind']('placeholder')['to'](this),_0x42d7b2;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function Dt(_0x38fbaa){const _0x5ea4c2=bt(_0x38fbaa,0x1e),_0x21a226=new MutationObserver(_0x1ebc9a=>{for(const _0x2861fc of _0x1ebc9a)('attributes'==_0x2861fc['type']&&'class'==_0x2861fc['attributeName']||'childList'==_0x2861fc['type']||'characterData'==_0x2861fc['type'])&&_0x5ea4c2();});return{'attach'(_0x54e2eb){_0x21a226['observe'](_0x54e2eb,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x21a226['disconnect'](),_0x5ea4c2['cancel']();}};}class T extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3f0804,_0x4dec1b){super(_0x3f0804),this['id']=_0xcaced0(),this['focusTracker']=new _0x42b9d5(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0xcc31a2,_0x48f554)=>this['fire']('Esc',_0x48f554)),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']=Dt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x4dec1b),this['mainView']=_0x4dec1b;const _0x529cf5=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x529cf5['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 _0x4f1bb2=this['element']['clientHeight'];_0x4f1bb2&&(this['height']=_0x4f1bb2);}}class d extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x570f76(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2ebf36,target:_0x133012,type:_0x468963,isVisible:_0x4ef6df=!0x0}){super(),this['view']=_0x2ebf36,this['view']['element']||this['view']['render'](),this['_type']=_0x468963,this['_target']=_0x133012,d['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x3a2226([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x103bec,_0xb3ac5e)=>{this['view']['focusTracker']['add'](_0xb3ac5e);}),this['focusableElements']['on']('remove',(_0x1eb818,_0x269775)=>{this['view']['focusTracker']['remove'](_0x269775);}),this['set']('isVisible',_0x4ef6df);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x47809a=this['_getNormalizedTarget']();return d['_assertCorrectTarget'](_0x47809a),_0x47809a;}get['targetRect'](){const _0x3781bf=this['target'];if(null===_0x3781bf)return null;if(_0x3781bf instanceof _0x4c5767)return _0x3781bf;const _0x3d47bb=_0x3781bf['filter'](_0x460b4f=>function(_0x47a8f8){const _0x1114da=_0x47a8f8['offsetParent'];if(_0x1114da)return!0x0;const _0x4363b2=_0x47a8f8['getClientRects']()['item'](0x0);return!!_0x4363b2;}(_0x460b4f));return 0x0===_0x3d47bb['length']?null:new _0x4c5767(_0x3d47bb[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x5dae80){this['view']['isActive']=_0x5dae80,this['view']['mainView']['isActive']=_0x5dae80;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x18fd0b){if(!(null===_0x18fd0b||_0x18fd0b instanceof _0x4c5767||Array['isArray'](_0x18fd0b)&&_0x18fd0b['every'](_0x204938=>ne(_0x204938))))throw new _0x358429('annotation-invalid-target',null,{'target':_0x18fd0b});}['_getNormalizedTarget'](){const _0x58f8d0='function'==typeof this['_target']?this['_target']():this['_target'];return ne(_0x58f8d0)?[_0x58f8d0]:_0x58f8d0;}}function ne(_0x2d848f){return null!==_0x2d848f&&'object'==typeof _0x2d848f&&'nodeType'in _0x2d848f&&0x1===_0x2d848f['nodeType'];}class x extends _0x3a2226{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x3516b8=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x42b9d5(),this['_focusTracker']['on']('change:isFocused',(_0x27d344,_0x453e62,_0x2c170f)=>{_0x2c170f||this['fire']('blur');});for(const _0x59b950 of _0x3516b8)this['add'](_0x59b950);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x140034){if(this['has'](_0x140034))throw new _0x358429('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x140034['innerView'],_0x140034),this['_viewToAnnotation']['set'](_0x140034['view'],_0x140034);for(const _0x52a8c7 of _0x140034['focusableElements'])this['_focusTracker']['add'](_0x52a8c7);this['listenTo'](_0x140034['focusableElements'],'add',(_0xb3c371,_0x424d66)=>{this['_focusTracker']['add'](_0x424d66);}),this['listenTo'](_0x140034['focusableElements'],'remove',(_0x40f2cc,_0x1e1a9c)=>{this['_focusTracker']['remove'](_0x1e1a9c);}),this['listenTo'](_0x140034['view']['focusTracker'],'change:isFocused',(_0x209eff,_0x5dc498,_0x52511a)=>{_0x52511a&&this['fire']('focus',_0x140034);}),_0x140034['updateTargetRect']();const _0x333dcf=this['_getOrderInContent'](_0x140034['view']['targetRect']);return super['add'](_0x140034,_0x333dcf);}['remove'](_0x20876e){if(!this['has'](_0x20876e))throw new _0x358429('annotationcollection-not-existing-item',null);this['stopListening'](_0x20876e['view']['focusTracker']),this['stopListening'](_0x20876e['focusableElements']);for(const _0x4b5863 of _0x20876e['focusableElements'])this['_focusTracker']['remove'](_0x4b5863);return this['_viewToAnnotation']['delete'](_0x20876e['view']),this['_innerViewToAnnotation']['delete'](_0x20876e['innerView']),super['remove'](_0x20876e);}['getByInnerView'](_0x2e01f6){return this['_innerViewToAnnotation']['get'](_0x2e01f6);}['getByView'](_0x5f13ae){return this['_viewToAnnotation']['get'](_0x5f13ae);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x1814d2 of this)_0x1814d2['updateTargetRect']();this['_sort']();}['_sort'](){const _0x8e5434=Array['from'](this)['sort']((_0x49ffbb,_0x5a58cb)=>v(_0x49ffbb['view']['targetRect'],_0x5a58cb['view']['targetRect']));for(let _0x113453=_0x8e5434['length']-0x1;_0x113453>0x0;_0x113453--){const _0x34cc00=_0x8e5434[_0x113453];_0x113453!==this['getIndex'](_0x34cc00)&&(this['remove'](_0x34cc00),this['add'](_0x34cc00));}}['_getOrderInContent'](_0x3ac0d6){let _0x1b95de=0x0;if(!_0x3ac0d6)return this['length'];for(const _0x356f19 of this){const _0x35742a=_0x356f19['view']['targetRect'];if(_0x35742a){if(v(_0x3ac0d6,_0x35742a)<0x0)return _0x1b95de;_0x1b95de++;}}return _0x1b95de;}}function v(_0x439334,_0x1a0090){if(null===_0x439334&&null===_0x1a0090)return 0x0;if(null===_0x439334)return-0x1;if(null===_0x1a0090)return 0x1;const _0x5cd9f1=_0x439334['top']-_0x1a0090['top'];return 0x0==_0x5cd9f1?_0x439334['left']-_0x1a0090['left']:_0x5cd9f1;}class N extends _0x4fba92{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x2ee959){if(super(_0x2ee959),this['collection']=new x(),this['_visibleAnnotations']=new x(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x2ee959 instanceof _0x190e00){const _0x5c7ab4=_0x2ee959['locale'];_0x2ee959['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':S(_0x5c7ab4,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':S(_0x5c7ab4,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':S(_0x5c7ab4,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':S(_0x5c7ab4,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':S(_0x5c7ab4,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':S(_0x5c7ab4,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':S(_0x5c7ab4,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x590d6c){this['collection']['add'](_0x590d6c);}['remove'](_0x553dd9){this['collection']['remove'](_0x553dd9),_0x553dd9['destroy']();}['refreshVisibility'](){for(const _0x1d466e of this['collection'])_0x1d466e['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x110ea5){return this['collection']['getByInnerView'](_0x110ea5);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x2b6dcc of this['collection'])_0x2b6dcc['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x4fb46c){this['fire']('_activateAnnotation',_0x4fb46c);}['createAnnotation'](_0x55eaf5){return new d(_0x55eaf5);}['createAnnotationView'](_0x5f12b1,_0x5f0fe7){return new T(_0x5f12b1,_0x5f0fe7);}['_addActiveAnnotation'](_0x4e3a30){const _0x410321=new Set(this['activeAnnotations']);_0x410321['add'](_0x4e3a30),this['activeAnnotations']=_0x410321;}['_removeActiveAnnotation'](_0x4d3692){const _0x5acee0=new Set(this['activeAnnotations']);_0x5acee0['delete'](_0x4d3692),this['activeAnnotations']=_0x5acee0;}['_bindAnnotationsToVisibleAnnotations'](){const _0x385b49=this['collection'],_0x439b80=this['_visibleAnnotations'];function _0x151c94(_0x52ecd8){const _0x17f3f1=_0x52ecd8['source'];_0x17f3f1['isVisible']&&!_0x439b80['has'](_0x17f3f1)?_0x439b80['add'](_0x17f3f1):!_0x17f3f1['isVisible']&&_0x439b80['has'](_0x17f3f1)&&_0x439b80['remove'](_0x17f3f1),_0x17f3f1['view']['focusTracker']['remove'](_0x17f3f1['view']['element']),_0x17f3f1['view']['focusTracker']['add'](_0x17f3f1['view']['element']);}this['listenTo'](_0x385b49,'add',(_0x2ce2e8,_0x2cf351)=>{_0x2cf351['isVisible']&&_0x439b80['add'](_0x2cf351),this['listenTo'](_0x2cf351,'change:isVisible',_0x151c94);}),this['listenTo'](_0x385b49,'remove',(_0x32262d,_0x2cde9f)=>{_0x439b80['has'](_0x2cde9f)&&_0x439b80['remove'](_0x2cde9f),this['stopListening'](_0x2cde9f,'change:isVisible',_0x151c94);});}['_setupEnterAnnotationKeystroke'](){const _0x28dc2c=_0x3f2abe=>{_0x3f2abe['on']('ready',()=>{_0x3f2abe['keystrokes']['set'](_0x343776,(_0x3e7f70,_0x2e924a)=>{const _0x5ac76f=_0x54d675(this['activeAnnotations']['values']());_0x5ac76f&&(_0x5ac76f['view']['focus'](),_0x2e924a());});});};this['context']instanceof _0x190e00?_0x28dc2c(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x58b4e2,_0x145fe6)=>{_0x28dc2c(_0x145fe6);});}['_setupEscapeAnnotationHandling'](){const _0x2028ed=_0x411a61=>{const _0x3af54e=_0x411a61['source'],_0x133460=[];let _0x3d0023;if(Array['isArray'](_0x3af54e['target'])){_0x3d0023=_0x3af54e['target'][0x0],this['context']instanceof _0x190e00?_0x133460['push'](this['context']):this['context']['editors']&&_0x133460['push'](...this['context']['editors']);for(const _0xea492e of _0x133460)for(const _0x2296bc of _0xea492e['editing']['view']['domRoots']['values']())if(_0x2296bc['contains'](_0x3d0023))return void _0xea492e['editing']['view']['focus']();_0x3d0023['focus']();}};this['listenTo'](this['collection'],'add',(_0x207816,_0x1336e4)=>{this['listenTo'](_0x1336e4,'escape',_0x2028ed,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x17d207,_0x37f3d4)=>{this['stopListening'](_0x37f3d4,'escape',_0x2028ed);});}}const gt=Symbol('noChannel'),Tt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x4fba92{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[N,ht,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x5cc494){super(_0x5cc494),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x411b24=this['context']['config'];_0x411b24['define']('comments.maxCommentsWhenCollapsed',0x2),_0x411b24['define']('comments.maxThreadTotalWeight',0x1f4),_0x411b24['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x411b24['define']('comments.CommentThreadView',Ct),_0x411b24['define']('comments.CommentView',vt),_0x411b24['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x859614=this['context']['plugins']['get'](N);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x3f2fa9,_0x299387)=>this['_addCommentThread'](_0x299387)),this['on']('submitCommentThread',(_0x56aecd,_0x59c42a)=>this['_submitCommentThread'](_0x59c42a)),this['on']('resolveCommentThread',(_0x13fac2,_0x34f8e7)=>this['_resolveCommentThread'](_0x34f8e7)),this['on']('resolveCommentThread',(_0x2b3ae7,_0x3422ef)=>this['_updateActiveAnnotation'](_0x3422ef),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x390099,_0x1bfa22)=>this['_reopenCommentThread'](_0x1bfa22)),this['on']('reopenCommentThread',(_0x42e382,_0x1f267f)=>this['_updateActiveAnnotation'](_0x1f267f),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x65244b,_0x46e1d2)=>this['_removeCommentThread'](_0x46e1d2)),this['on']('updateCommentThread',(_0x5a05c4,_0x2063f5)=>this['_updateCommentThread'](_0x2063f5)),this['on']('updateCommentThread',(_0x5b4402,_0x3a2112)=>this['_updateActiveAnnotation'](_0x3a2112),{'priority':'lowest'}),this['on']('addComment',(_0x55aff3,_0x5bcf66)=>this['_addComment'](_0x5bcf66)),this['on']('updateComment',(_0x144025,_0x47dc17)=>this['_updateComment'](_0x47dc17)),this['on']('removeComment',(_0x2aae6d,_0x2934c9)=>this['_removeComment'](_0x2934c9)),this['on']('addComment',(_0x106a8c,{threadId:_0x39d184,isFromAdapter:_0x112436})=>{if(_0x112436)return;const _0x35247a=this['getCommentThread'](_0x39d184),_0x397955=_0x35247a&&this['_threadToController']['get'](_0x35247a);_0x397955&&_0x397955['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x859614,'change:activeAnnotations',(_0xf51a52,_0x298645,_0x4f896f)=>{const _0x47f898=Array['from'](_0x4f896f)['map'](_0x23c059=>this['_viewToController']['get'](_0x23c059['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x47f898?_0x47f898['model']:null;});}set['adapter'](_0x1e2310){if(this['_adapter'])throw new _0x358429('commentsrepository-adapter-already-set');this['_adapter']=_0x1e2310;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x56d257=gt,threadId:_0x3c1801=_0xcaced0(),comments:_0x40a46a=[],unlinkedAt:_0x1ca148=null,resolvedAt:_0x1d2349=null,resolvedBy:_0x23573c=null,target:_0x24bf01=null,context:_0x393e67=null,attributes:_0x159576={},isResolvable:_0x57e066=!0x0,isSubmitted:_0x36b28d=!0x1,isFromAdapter:_0x1c3bd9=!0x1}={}){return this['fire'](_t('addCommentThread',_0x56d257),{'channelId':_0x56d257,'threadId':_0x3c1801,'comments':_0x40a46a,'unlinkedAt':_0x1ca148,'resolvedAt':_0x1d2349,'resolvedBy':_0x23573c,'target':_0x24bf01,'context':_0x393e67,'attributes':_0x159576,'isFromAdapter':_0x1c3bd9,'isResolvable':_0x57e066,'isSubmitted':_0x36b28d}),this['getCommentThread'](_0x3c1801);}['openNewCommentThread']({channelId:_0x5394a9=gt,threadId:_0x270d3a=_0xcaced0(),target:_0x2aa878,context:_0x4279be=null,isResolvable:_0x139676=!0x0}){if(this['_readOnlyChannels']['has'](_0x5394a9)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x2aa878)throw new _0x358429('commentsrepository-missing-target');const _0x59280c=this['addCommentThread']({'channelId':_0x5394a9,'threadId':_0x270d3a,'target':_0x2aa878,'context':_0x4279be,'isResolvable':_0x139676});if(!_0x59280c)return null;const _0x4efc2a=this['_threadToController']['get'](_0x59280c),_0x2a1d0e=_0x4efc2a['view']['commentThreadInputView']['commentInputView'],_0x1e470d=this['context']['plugins']['get'](N),_0x39877c=_0x1e470d['getByInnerView'](_0x4efc2a['view']);return _0x1e470d['activate'](_0x39877c),_0x2a1d0e['once']('editorReady',()=>_0x2a1d0e['focus']()),_0x59280c;}['hasCommentThread'](_0x4a622c){if('string'!=typeof _0x4a622c)throw new _0x358429('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x4a622c);}['updateCommentThread']({channelId:_0x1041f9=gt,threadId:_0x455a4a,context:_0x2bfcc1,unlinkedAt:_0x2918af,attributes:_0xd927a9,isFromAdapter:_0x259661=!0x1}){return this['fire'](_t('updateCommentThread',_0x1041f9),{'channelId':_0x1041f9,'threadId':_0x455a4a,'context':_0x2bfcc1,'unlinkedAt':_0x2918af,'attributes':_0xd927a9,'isFromAdapter':_0x259661}),this['getCommentThread'](_0x455a4a);}['getCommentThread'](_0x1bdf09){if('string'!=typeof _0x1bdf09)throw new _0x358429('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x1bdf09);}['fetchCommentThread']({channelId:_0xa6467f,threadId:_0x47f168}={}){const _0x50f0a2=this['getCommentThread'](_0x47f168);if(_0x50f0a2)return Promise['resolve'](_0x50f0a2);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x358429('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0xa6467f,'threadId':_0x47f168})['then'](_0x12d315=>this['hasCommentThread'](_0x47f168)?this['getCommentThread'](_0x47f168):_0x12d315?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0xa6467f},_0x12d315)):void 0x0)['catch'](_0xcc5ade=>{throw console['error'](_0xcc5ade),new _0x358429('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x425ee9,skipNotAttached:_0x4f13d0=!0x1,skipEmpty:_0xd70be8=!0x1,toJSON:_0x324b9c=!0x1}={}){const _0x1e0d17=[];for(const _0x1727e4 of this['_threads']['values']())_0x425ee9&&_0x1727e4['channelId']!==_0x425ee9||_0x4f13d0&&!_0x1727e4['isAttached']||_0xd70be8&&0x0===_0x1727e4['length']||_0x1e0d17['push'](_0x1727e4);return _0x324b9c?_0x1e0d17['map'](_0x42382a=>_0x42382a['toJSON']()):_0x1e0d17;}['setActiveCommentThread'](_0x59f5ca){const _0x2f55c9=this['context']['plugins']['get'](N);if(!_0x59f5ca)return void(this['activeCommentThread']&&_0x2f55c9['deactivateAll']());const _0x4b6c25=this['getCommentThread'](_0x59f5ca);if(!_0x4b6c25)throw new _0x358429('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x59f5ca});if(!this['_threadToController']['has'](_0x4b6c25))throw new _0x358429('commentsrepository-active-not-attached',null,{'threadId':_0x59f5ca});const _0x1d1d37=_0x2f55c9['getByInnerView'](this['_threadToController']['get'](_0x4b6c25)['view']);_0x2f55c9['activate'](_0x1d1d37);}['switchReadOnly'](_0x85efca,_0x520bf5){_0x85efca?this['_readOnlyChannels']['add'](_0x520bf5):this['_readOnlyChannels']['delete'](_0x520bf5),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x56ea12){return this['_readOnlyChannels']['has'](_0x56ea12)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x27a375,_0x51558f){return new yt(_0x27a375,_0x51558f);}['setPermissions'](_0x48f5b2,_0x5564ed=gt){this['_permissions']['set'](_0x5564ed,_0x48f5b2),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x5a018f=gt){return this['_permissions']['has'](_0x5a018f)?this['_permissions']['get'](_0x5a018f):Tt;}['_addCommentThread']({channelId:_0x1d7671,threadId:_0x3ee3b5,comments:_0xea21b7,unlinkedAt:_0x270bbc,resolvedAt:_0x346675,resolvedBy:_0x1c3b90,target:_0x3dc66b,context:_0x254551,attributes:_0xebf223,isFromAdapter:_0x1d2417,isResolvable:_0x2fd27a,isSubmitted:_0xccc1a6}){if('string'!=typeof _0x3ee3b5)throw new _0x358429('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x3ee3b5});if(this['hasCommentThread'](_0x3ee3b5))throw new _0x358429('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x3ee3b5});const _0x2c91fe=new oe(this,{'channelId':_0x1d7671,'id':_0x3ee3b5,'context':_0x254551,'attributes':_0xebf223,'unlinkedAt':_0x270bbc,'resolvedAt':_0x346675,'resolvedBy':_0x1c3b90?this['context']['plugins']['get'](it)['getUser'](_0x1c3b90):null,'isResolvable':_0x2fd27a,'isSubmitted':_0xccc1a6||_0x1d2417});this['_threads']['set'](_0x3ee3b5,_0x2c91fe);for(const _0x568293 of _0xea21b7)_0x2c91fe['_add'](this['_createNewComment']({'threadId':_0x3ee3b5,..._0x568293}));return _0x3dc66b&&_0x2c91fe['attachTo'](_0x3dc66b),_0x1d2417||!_0x2c91fe['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x1d7671,'threadId':_0x3ee3b5});}['_submitCommentThread']({channelId:_0x10a642,threadId:_0x31afab}){if(!this['hasCommentThread'](_0x31afab))throw new _0x358429('commentsrepository-missing-comment-thread',this);const _0x149ad0=this['getCommentThread'](_0x31afab);if(_0x149ad0['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5dab92,comments:_0x4c31ee,resolvedAt:_0x5b921b,resolvedBy:_0x2f101f,context:_0x1347e5,attributes:_0x452a8f}=_0x149ad0,_0x3d1921=this['context']['plugins']['get']('PendingActions'),_0x10b744=_0x3d1921['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x10a642,'threadId':_0x5dab92,'comments':_0x4c31ee['map'](_0x212815=>_0x212815['toJSON']()),'resolvedAt':_0x5b921b,'resolvedBy':_0x2f101f?_0x2f101f['id']:_0x2f101f,'context':_0x1347e5,'attributes':_0x452a8f})['then'](({comments:_0x1a357b})=>{_0x3d1921['remove'](_0x10b744);for(const _0x1e72e2 of _0x1a357b)this['_updateComment']({'channelId':_0x10a642,'threadId':_0x31afab,'commentId':_0x1e72e2['commentId'],'createdAt':_0x1e72e2['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5d4aca=>{throw console['error'](_0x5d4aca),new _0x358429('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x4791fb,target:_0x379a06}){const _0x3a8218=this['getCommentThread'](_0x4791fb);if(!_0x3a8218)throw new _0x358429('commentsrepository-attach-missing-comment-thread',this);const _0x404f11=this['context']['plugins']['get']('PendingActions'),_0x926555=this['context']['plugins']['get'](N),_0x37ac1f=this['_createCommentThreadView'](_0x3a8218),_0x492763=new yt(_0x3a8218,_0x37ac1f);let _0x1a522f=null;_0x37ac1f['on']('change:isDirty',(_0x5203b3,_0xa1b9e5,_0x507071)=>{_0x507071?_0x1a522f=_0x404f11['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x1a522f&&(_0x404f11['remove'](_0x1a522f),_0x1a522f=null);}),this['_threadToController']['set'](_0x3a8218,_0x492763),this['_viewToController']['set'](_0x37ac1f,_0x492763);const _0x454d65=new T(this['context']['locale'],_0x37ac1f);_0x454d65['bind']('length')['to'](_0x37ac1f),_0x454d65['bind']('isDirty')['to'](_0x37ac1f,'isDirty',_0x37ac1f,'length',(_0x1dac05,_0x37428a)=>_0x1dac05||!_0x37428a),_0x454d65['bind']('isActive')['to'](_0x37ac1f),_0x454d65['type']='comment';const _0x439525=new d({'view':_0x454d65,'target':_0x379a06,'type':'comment','isVisible':!_0x3a8218['isResolved']});return _0x37ac1f['on']('escape',()=>{_0x439525['fire']('escape');}),this['_bindAnnotationToEditors'](_0x37ac1f,_0x439525),_0x926555['add'](_0x439525),_0x439525;}['_bindAnnotationToEditors'](_0x27e32a,_0x5efb68){this['listenTo'](_0x27e32a,'editorReady',(_0x5a4b41,_0x44697d)=>{const _0x2b06b6=_0x44697d['ui']['view']['body']['bodyCollectionContainer'];_0x5efb68['focusableElements']['add'](_0x2b06b6),this['context']instanceof _0x190e00&&this['context']['ui']['focusTracker']['add'](_0x2b06b6);},{'priority':'highest'}),this['listenTo'](_0x27e32a,'editorDestroyed',(_0x28911c,_0x1e65a3)=>{const _0x2087c3=_0x1e65a3['ui']['view']['body']['bodyCollectionContainer'];_0x5efb68['focusableElements']['has'](_0x2087c3)&&_0x5efb68['focusableElements']['remove'](_0x2087c3),this['context']instanceof _0x190e00&&this['context']['ui']['focusTracker']['remove'](_0x2087c3);});}['_unbindEditors'](_0x3314ed){this['stopListening'](_0x3314ed,'editorReady'),this['stopListening'](_0x3314ed,'editorDestroyed');}['_createCommentThreadView'](_0x4a9aa8){const _0x4bcb5d=this['context']['plugins']['get'](it),{config:_0x4df7b8,locale:_0x557340}=this['context'],_0x5144f1=mt(_0x4df7b8['get']('locale'));return new(0x0,(_0x4df7b8['get']('comments'))['CommentThreadView'])(_0x557340,_0x4a9aa8,_0x4bcb5d['me'],{'editorConfig':{..._0x4df7b8['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x4df7b8['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x4df7b8['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x4df7b8['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x4df7b8['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x5144f1,'CommentView':_0x4df7b8['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x2e23e4,channelId:_0x52d110,resolvedAt:_0x444961,resolvedBy:_0x5c8f26,isFromAdapter:_0x2a266c}){if(!this['hasCommentThread'](_0x2e23e4))throw new _0x358429('commentsrepository-missing-comment-thread',null,{'threadId':_0x2e23e4});const _0x47fefe=this['getCommentThread'](_0x2e23e4);if(_0x47fefe['isResolved'])throw new _0x358429('commentsrepository-resolved-comment-thread',null,{'threadId':_0x2e23e4});const _0x2d2dba=this['context']['plugins']['get'](it);if(_0x47fefe['resolvedBy']=_0x2d2dba['getUser'](_0x5c8f26),_0x47fefe['resolvedAt']=_0x444961,_0x2a266c||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x532f98=this['context']['plugins']['get']('PendingActions'),_0x5a8aec=_0x532f98['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x52d110,'threadId':_0x2e23e4})['then'](({resolvedAt:_0x2b610d,resolvedBy:_0x3a8237})=>{_0x532f98['remove'](_0x5a8aec),_0x47fefe['resolvedBy']['id']!==_0x3a8237&&(_0x47fefe['resolvedBy']=_0x2d2dba['getUser'](_0x3a8237)),_0x47fefe['resolvedAt']=_0x2b610d;})['catch'](_0x5ca764=>{throw console['error'](_0x5ca764),new _0x358429('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x3b2c81,channelId:_0x1b28a9,isFromAdapter:_0x146681}){if(!this['hasCommentThread'](_0x3b2c81))throw new _0x358429('commentsrepository-missing-comment-thread',null,{'threadId':_0x3b2c81});const _0x3e148c=this['getCommentThread'](_0x3b2c81);if(!_0x3e148c['isResolved'])throw new _0x358429('commentsrepository-reopen-comment-thread',null,{'threadId':_0x3b2c81});if(_0x3e148c['resolvedBy']=null,_0x3e148c['resolvedAt']=null,_0x146681||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x2b9f80=this['context']['plugins']['get']('PendingActions'),_0x42bd88=_0x2b9f80['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x1b28a9,'threadId':_0x3b2c81})['then'](()=>_0x2b9f80['remove'](_0x42bd88))['catch'](_0x5a9628=>{throw console['error'](_0x5a9628),new _0x358429('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x7c1ae8,isFromAdapter:_0x151f1c}){const _0x283a57=this['getCommentThread'](_0x7c1ae8);if(!_0x283a57)throw new _0x358429('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x7c1ae8),this['_threads']['delete'](_0x7c1ae8),!_0x283a57['isSubmitted']||_0x151f1c||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x5abd61=this['context']['plugins']['get']('PendingActions'),{channelId:_0x9e1561}=_0x283a57,_0x232620=_0x5abd61['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x9e1561,'threadId':_0x7c1ae8})['then'](()=>_0x5abd61['remove'](_0x232620))['catch'](_0x1d09d8=>{throw console['error'](_0x1d09d8),new _0x358429('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x484b13,unlinkedAt:_0x15f17e,context:_0x595641,attributes:_0x1243d6,isFromAdapter:_0x277cba}){if('string'!=typeof _0x484b13)throw new _0x358429('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x484b13});if(!this['hasCommentThread'](_0x484b13))throw new _0x358429('commentsrepository-missing-comment-thread',null,{'threadId':_0x484b13});const _0x2a1dd7=this['getCommentThread'](_0x484b13);let _0x57fdc1=!0x1;if(void 0x0!==_0x595641&&_0x2a1dd7['context']!==_0x595641&&(_0x2a1dd7['context']=_0x595641,_0x57fdc1=!0x0),void 0x0!==_0x15f17e&&_0x2a1dd7['unlinkedAt']!==_0x15f17e&&(_0x2a1dd7['unlinkedAt']=_0x15f17e,_0x57fdc1=!0x0),_0x1243d6&&!It(_0x1243d6,_0x2a1dd7['attributes'])&&(_0x2a1dd7['attributes']=_0x1243d6,_0x57fdc1=!0x0),!_0x57fdc1)return Promise['resolve']();if(!_0x2a1dd7['isSubmitted']||_0x277cba||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x53b99e=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4addef}=_0x2a1dd7,_0x5047fd=_0x53b99e['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x4addef,'threadId':_0x484b13,'context':_0x595641,'unlinkedAt':_0x15f17e,'attributes':_0x1243d6})['then'](()=>_0x53b99e['remove'](_0x5047fd))['catch'](_0x347373=>{throw console['error'](_0x347373),new _0x358429('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0xcc9c08){const _0x53e663=this['context']['plugins']['get'](N),_0x48da59=this['getCommentThread'](_0xcc9c08);if(this['_threadToController']['has'](_0x48da59)){const _0x458362=this['_threadToController']['get'](_0x48da59),_0x3ec3bf=_0x458362['view'],_0x4778b5=_0x53e663['getByInnerView'](_0x3ec3bf);this['_threadToController']['delete'](_0x48da59),this['_viewToController']['delete'](_0x3ec3bf),_0x4778b5&&_0x53e663['remove'](_0x4778b5),_0x458362['destroy'](),_0x3ec3bf['destroy']()['then'](()=>{this['_unbindEditors'](_0x3ec3bf);});}}['_updateActiveAnnotation']({threadId:_0x310f4e,resolvedAt:_0x1c2d63}){const _0x29b6bb=!!_0x1c2d63,_0x511862=this['context']['plugins']['get'](N),_0x1b65da=this['getCommentThread'](_0x310f4e);if(this['_threadToController']['has'](_0x1b65da)){const _0x5784ff=this['_threadToController']['get'](_0x1b65da)['view'],_0x1faa8=_0x511862['getByInnerView'](_0x5784ff);_0x1faa8&&(_0x29b6bb&&_0x511862['_removeActiveAnnotation'](_0x1faa8),_0x1faa8['refreshVisibility']());}}['_getExternalAuthor'](_0x36b114){const _0x514822=this['context']['plugins']['get'](it),_0x375fdf=lt('external:'+_0x36b114),_0x16f719=_0x514822['getUser'](_0x375fdf);return _0x16f719||_0x514822['addUser']({'id':_0x375fdf,'name':_0x36b114});}['_createNewComment']({threadId:_0x47e6e7,commentId:_0xc0f6e=_0xcaced0(),content:_0x329911,authorId:_0x391042,createdAt:_0x435527,attributes:_0x4943d4}){if('string'!=typeof _0xc0f6e)throw new _0x358429('commentsrepository-invalid-commentid');if('string'!=typeof _0x391042)throw new _0x358429('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x329911||!_0x329911['trim']())throw new _0x358429('commentsrepository-invalid-comment-content');const _0x4c2b9c=this['context']['plugins']['get'](it)['getUser'](_0x391042);if(!_0x4c2b9c)throw new _0x358429('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x391042});let _0x2e4508=null,_0x198b10=_0x435527;return _0x4943d4&&_0x4943d4['@external']&&(_0x2e4508=this['_getExternalAuthor'](_0x4943d4['@external']['authorName']),_0x198b10=new Date(_0x4943d4['@external']['createdAt'])),new re(this,{'threadId':_0x47e6e7,'id':_0xc0f6e,'author':_0x2e4508||_0x4c2b9c,'creator':_0x4c2b9c,'content':_0x329911,'createdAt':_0x435527,'authoredAt':_0x198b10,'attributes':_0x4943d4});}['_addComment'](_0x4f82e1){let {threadId:_0x813c4,content:_0x156857,attributes:_0x2615d7,isFromAdapter:_0x5e3336}=_0x4f82e1;const _0x54d31c=this['getCommentThread'](_0x4f82e1['threadId']);if(!_0x54d31c)throw new _0x358429('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x35f085=this['_createNewComment'](_0x4f82e1),{id:_0x73008b}=_0x35f085;if(_0x54d31c['_add'](_0x35f085),_0x5e3336||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x54d31c['isSubmitted'])return Promise['resolve']();const _0x24108f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x429d84}=_0x54d31c,_0x42fc4a=_0x24108f['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x2615d7||(_0x2615d7={}),this['adapter']['addComment']({'channelId':_0x429d84,'threadId':_0x813c4,'commentId':_0x73008b,'content':_0x156857,'attributes':_0x2615d7})['then'](_0x23b710=>{_0x24108f['remove'](_0x42fc4a),_0x23b710&&this['_updateComment']({'channelId':_0x429d84,'threadId':_0x813c4,'commentId':_0x73008b,'createdAt':_0x23b710['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x5af3b1=>{throw console['error'](_0x5af3b1),new _0x358429('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x58f2a7,commentId:_0x579cdd,content:_0x3cd961,createdAt:_0x203467,attributes:_0x186c72,isFromAdapter:_0x3a3e34}){if(void 0x0!==_0x3cd961&&('string'!=typeof _0x3cd961||!_0x3cd961['trim']()['length']))throw new _0x358429('commentsrepository-update-comment-invalid-content');const _0x430713=this['getCommentThread'](_0x58f2a7),_0x22d42a=_0x430713['getComment'](_0x579cdd);if(!_0x22d42a)throw new _0x358429('commentsrepository-update-missing-comment',this);let _0x492ced=!0x1;if(_0x3cd961&&_0x3cd961!==_0x22d42a['content']&&(_0x22d42a['isEditable']||_0x3a3e34)&&(_0x22d42a['content']=_0x3cd961,_0x492ced=!0x0),_0x203467&&_0x203467!==_0x22d42a['createdAt']&&(_0x22d42a['createdAt']=_0x203467,_0x22d42a['attributes']&&_0x22d42a['attributes']['@external']||(_0x22d42a['authoredAt']=_0x203467),_0x492ced=!0x0),_0x186c72&&!It(_0x186c72,_0x22d42a['attributes'])&&(_0x22d42a['attributes']=_0x186c72,_0x492ced=!0x0),!_0x492ced)return Promise['resolve']();if(_0x430713['fire']('commentUpdated'),_0x3a3e34||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x52d028=this['context']['plugins']['get']('PendingActions'),{channelId:_0x4624a4}=this['getCommentThread'](_0x22d42a['threadId']),_0x169b1b=_0x52d028['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x4624a4,'threadId':_0x58f2a7,'commentId':_0x579cdd,'content':_0x3cd961,'attributes':_0x186c72})['then'](()=>_0x52d028['remove'](_0x169b1b))['catch'](_0x5d0165=>{throw console['error'](_0x5d0165),new _0x358429('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x56bccf,commentId:_0x2c9daa,isFromAdapter:_0x7761e}){const _0x806171=this['getCommentThread'](_0x56bccf),_0x471a5d=_0x806171['getComment'](_0x2c9daa);if(!_0x471a5d)throw new _0x358429('commentsrepository-remove-missing-comment',this);if(_0x806171['_remove'](_0x471a5d),_0x7761e||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x47ab21=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3e9cb2}=_0x806171,_0x1031bf=_0x47ab21['add'](S(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x3e9cb2,'threadId':_0x56bccf,'commentId':_0x2c9daa})['then'](()=>_0x47ab21['remove'](_0x1031bf))['catch'](_0x11ec73=>{throw console['error'](_0x11ec73),new _0x358429('commentsrepository-remove-comment-internal-error',this);});}}class oe extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x570f76(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x20aaa1,_0x34a2fb){super();const _0x203895=_0x34a2fb['isResolvable'];this['channelId']=_0x34a2fb['channelId'],this['id']=_0x34a2fb['id'],this['comments']=new _0x3a2226(),this['_repository']=_0x20aaa1,this['_isAttached']=!0x1,this['_isSubmitted']=_0x34a2fb['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x20aaa1,'_permissions',_0x20aaa1,'_readOnlyChannels',()=>_0x20aaa1['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x20aaa1,'_permissions',()=>_0x20aaa1['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x20aaa1,'_permissions',()=>{const _0x1e1441=_0x20aaa1['getPermissions'](this['channelId']);return _0x1e1441['write']||_0x1e1441['admin'];}),this['bind']('isResolvable')['to'](_0x20aaa1,'_permissions',()=>_0x203895&&_0x20aaa1['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x34a2fb['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x3c32d8,_0x8fdc8b)=>_0x3c32d8?_0x8fdc8b?_0x3c32d8<_0x8fdc8b?_0x3c32d8:_0x8fdc8b:_0x3c32d8:_0x8fdc8b),this['set']('unlinkedAt',_0x34a2fb['unlinkedAt']||null),this['set']('resolvedAt',_0x34a2fb['resolvedAt']||null),this['set']('resolvedBy',_0x34a2fb['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xb7d58a=>!!_0xb7d58a),this['set']('attributes',_0x34a2fb['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x31740a,_0x23018b)=>_0x31740a+_0x23018b['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0x4a6cd8,id:_0xad81c9}=this;this['_repository']['fire'](_t('submitCommentThread',_0x4a6cd8),{'channelId':_0x4a6cd8,'threadId':_0xad81c9});}['setUnlinkedAt'](_0x3e5fcf){this['_update']({'unlinkedAt':_0x3e5fcf});}['resolve']({resolvedAt:_0x18a036=new Date(),resolvedBy:_0x28bfd8=null,isFromAdapter:_0x57e799=!0x1}={}){const _0x213609=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x47b168,id:_0x198f6d}=this;this['_repository']['fire'](_t('resolveCommentThread',_0x47b168),{'channelId':_0x47b168,'threadId':_0x198f6d,'resolvedAt':_0x18a036,'resolvedBy':_0x28bfd8||_0x213609['id'],'isFromAdapter':_0x57e799});}['reopen']({isFromAdapter:_0x3ed9fa=!0x1}={}){const {channelId:_0x37465c,id:_0x40f3dd}=this;this['_repository']['fire'](_t('reopenCommentThread',_0x37465c),{'channelId':_0x37465c,'threadId':_0x40f3dd,'isFromAdapter':_0x3ed9fa});}['setContext'](_0x2bc1ae){this['context']||this['_update']({'context':_0x2bc1ae});}['setAttribute'](_0x11b3a1,_0x194831){const _0xc2e25b=pt(this['attributes']);wt(_0xc2e25b,_0x11b3a1,_0x194831),this['_update']({'attributes':_0xc2e25b});}['removeAttribute'](_0x4ab9e4){const _0x54aea6=pt(this['attributes']);At(_0x54aea6,_0x4ab9e4),this['_update']({'attributes':_0x54aea6});}['remove']({isFromAdapter:_0x55e903=!0x1}={}){const {channelId:_0x458c62,id:_0x3d4d55}=this;this['_repository']['fire'](_t('removeCommentThread',_0x458c62),{'channelId':_0x458c62,'threadId':_0x3d4d55,'isFromAdapter':_0x55e903});}['attachTo'](_0x58897c){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x58897c});}['addComment'](_0x472096){const {channelId:_0x16589d,id:_0x47d177}=this;this['_repository']['fire'](_t('addComment',_0x16589d,_0x47d177),Object['assign']({'channelId':_0x16589d,'threadId':_0x47d177},_0x472096));}['getComment'](_0x36b972){if('string'!=typeof _0x36b972)throw new _0x358429('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x36b972});return this['comments']['get'](_0x36b972);}['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'](_0x27156f=>_0x27156f['toJSON']()),'attributes':this['attributes']};}['_add'](_0x14426f){return this['listenTo'](_0x14426f,'change:authoredAt',()=>{const _0x9348a=this['_findOptimalIndex'](_0x14426f),_0x37caa5=this['comments'];_0x9348a-0x1!=_0x37caa5['getIndex'](_0x14426f)&&_0x9348a+0x1!=_0x37caa5['getIndex'](_0x14426f)&&(this['_remove'](_0x14426f),this['_add'](_0x14426f));}),this['comments']['add'](_0x14426f,this['_findOptimalIndex'](_0x14426f));}['_update'](_0xc03b6f){const {channelId:_0x264682,id:_0x582760}=this;this['_repository']['fire'](_t('updateCommentThread',_0x264682),{..._0xc03b6f,'channelId':_0x264682,'threadId':_0x582760});}['_remove'](_0x3c9193){return this['stopListening'](_0x3c9193),_0x3c9193['destroy'](),this['comments']['remove'](_0x3c9193);}['_findOptimalIndex'](_0x12e463){const _0x448cd8=this['comments']['find'](_0x4e96ca=>new Date(_0x4e96ca['authoredAt'])['getTime']()>new Date(_0x12e463['authoredAt'])['getTime']());return _0x448cd8?this['comments']['getIndex'](_0x448cd8):this['length'];}}class re extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x570f76(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x1edf67,_0x3eb306){super();const _0x484fcf=_0x1edf67['context']['plugins']['get'](it)['me'],_0x4a2f76=_0x1edf67['getCommentThread'](_0x3eb306['threadId']),_0x1dabd7=0x0===_0x4a2f76['comments']['length'],_0x3d4b46=_0x484fcf===_0x3eb306['author'];this['id']=_0x3eb306['id'],this['threadId']=_0x3eb306['threadId'],this['author']=_0x3eb306['author'],this['creator']=_0x3eb306['creator'],this['isExternal']=Boolean(_0x3eb306['attributes']&&_0x3eb306['attributes']['@external']),this['set']('content',_0x3eb306['content']),this['createdAt']=_0x3eb306['createdAt']||new Date(),this['set']('authoredAt',_0x3eb306['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x4a2f76,'resolvedAt'),this['set']('attributes',_0x3eb306['attributes']||{}),this['bind']('isEditable')['to'](_0x1edf67,'_permissions',()=>{const _0x1a349f=_0x1edf67['getPermissions'](_0x4a2f76['channelId'])['write'],_0x19547b=_0x1edf67['getPermissions'](_0x4a2f76['channelId'])['modifyAll'];return _0x3d4b46&&_0x1a349f||!_0x3d4b46&&_0x19547b;}),this['bind']('isRemovable')['to'](_0x4a2f76,'isRemovable',_0x1edf67,'_permissions',_0x58cc7a=>{const _0x5ffca5=_0x1edf67['getPermissions'](_0x4a2f76['channelId'])['write'],_0x529e50=_0x1edf67['getPermissions'](_0x4a2f76['channelId'])['modifyAll'];return _0x3d4b46&&_0x5ffca5||_0x58cc7a&&_0x1dabd7||!_0x3d4b46&&_0x529e50&&!_0x1dabd7;}),this['bind']('isReadOnly')['to'](_0x4a2f76,'isReadOnly'),this['_repository']=_0x1edf67;}get['weight'](){return Math['max'](function(_0x21e26c){const _0x17a4f7=document['createElement']('div');return _0x17a4f7['innerHTML']=_0x21e26c,_0x17a4f7['textContent']['length'];}(this['content']),0xc8);}['update'](_0x572c63){const {threadId:_0x5c4b35,id:_0x528de7}=this;if(!this['_repository']['hasCommentThread'](_0x5c4b35))throw new _0x358429('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x5b69bb}=this['_repository']['getCommentThread'](_0x5c4b35);this['_repository']['fire'](_t('updateComment',_0x5b69bb,_0x5c4b35),{'channelId':_0x5b69bb,'threadId':_0x5c4b35,'commentId':_0x528de7,..._0x572c63});}['setAttribute'](_0xa6eddf,_0x3313a5){const _0xc4fbe6=pt(this['attributes']);wt(_0xc4fbe6,_0xa6eddf,_0x3313a5),this['update']({'attributes':_0xc4fbe6});}['removeAttribute'](_0x2ee2f1){const _0x391616=pt(this['attributes']);At(_0x391616,_0x2ee2f1),this['update']({'attributes':_0x391616});}['remove'](_0x3410e5={}){if(!_0x3410e5['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x440be4,id:_0x32d4b1}=this;if(!this['_repository']['hasCommentThread'](_0x440be4))throw new _0x358429('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0xde4cd2}=this['_repository']['getCommentThread'](_0x440be4);this['_repository']['fire'](_t('removeComment',_0xde4cd2,_0x440be4),{'channelId':_0xde4cd2,'threadId':_0x440be4,'commentId':_0x32d4b1,..._0x3410e5});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function _t(_0x35b53a,..._0x34d83a){for(const _0x159e07 of _0x34d83a)void 0x0!==_0x159e07&&(_0x35b53a+=':'+String(_0x159e07));return _0x35b53a;}class J extends _0x11308d{['refresh'](){const _0x8c7fc9=this['editor']['model']['document']['selection'];for(const _0x7753ce of _0x8c7fc9['getRanges']())if(this['_hasContent'](_0x7753ce))return void(this['isEnabled']=!0x0);this['isEnabled']=!0x1;}['execute']({threadId:_0x359e36=_0xcaced0()}={}){const _0xd868fb=this['editor']['model'],_0x401401=[];for(const _0x230aa3 of _0xd868fb['document']['selection']['getRanges']())this['_hasContent'](_0x230aa3)&&_0x401401['push'](this['_trimToContent'](_0x230aa3));_0xd868fb['change'](_0x356e9c=>{for(const _0x2be678 of _0x401401){const _0x2cff71=_0xcaced0()['substr'](0x1,0x5),_0x3d787c='comment:'+_0x359e36+':'+_0x2cff71;_0x356e9c['addMarker'](_0x3d787c,{'range':_0x2be678,'usingOperation':!0x1,'affectsData':!0x1});}});}['_hasContent'](_0x55bd11){for(const _0x21e745 of _0x55bd11['getItems']())if(this['_itemIsContent'](_0x21e745))return!0x0;return!0x1;}['_itemIsContent'](_0x5d9f2e){return _0x5d9f2e['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x5d9f2e)&&!_0x5d9f2e['is']('element','tableCell');}['_trimToContent'](_0x18a3f8){const _0x59c409=_0x1eabd8=>!this['_itemIsContent'](_0x1eabd8['item']),_0x56b4db=_0x18a3f8['start']['getLastMatchingPosition'](_0x59c409),_0x1374cb=_0x18a3f8['end']['getLastMatchingPosition'](_0x59c409,{'direction':'backward'});return this['editor']['model']['createRange'](_0x56b4db,_0x1374cb);}}class P extends _0x44cf24{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[N];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x238139){super(_0x238139),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3bdc96=this['editor'],_0x223598=_0x3bdc96['model']['document']['selection'],_0x244807=_0x4da05a(()=>this['refreshSelectedViews'](),0xa);_0x223598['on']('change:range',(_0x3e0d9e,_0x55cf8e)=>{_0x55cf8e['directChange']&&(_0x244807['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3bdc96['editing']['view']['document'],'change:isFocused',(_0x4eb150,_0x1bb99e,_0x42a9fb)=>{_0x42a9fb&&_0x244807();}),this['listenTo'](_0x3bdc96['ui']['focusTracker'],'change:isFocused',(_0x2e999f,_0x2b4f7e,_0x32f883)=>{_0x32f883||_0x3bdc96['isReadOnly']||this['fire']('blur',{'isAnnotationTracked':_0x4e030f=>this['_editorAnnotationsData']['has'](_0x4e030f['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x15809e){if(this['_editorAnnotations']['has'](_0x15809e['view']))return;this['_editorAnnotations']['add'](_0x15809e['view']),this['editor']['ui']['focusTracker']['add'](_0x15809e['view']['element']);const _0x4af975=this['editor']['plugins']['get'](N);this['listenTo'](_0x4af975['collection'],'remove',(_0x2af01b,_0x123891)=>{this['editor']['ui']['focusTracker']['remove'](_0x123891['view']['element']),this['_editorAnnotations']['delete'](_0x123891['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x59f8da){if('function'!=typeof _0x59f8da)throw new _0x358429('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x59f8da);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x2523a7,annotations:_0x63d969}){const _0x539470=[],_0x55f55a=this['editor']['model']['document']['selection'],_0x995c77=Array['from'](_0x55f55a['getRanges']());for(const [_0x5a234d,_0x56d2ac]of this['_editorAnnotationsData']){const _0x59e072=_0x3fbf8f(_0x56d2ac),_0x177cea=_0x63d969['getByInnerView'](_0x5a234d);_0x59e072&&_0x177cea&&_0x539470['push']({'annotation':_0x177cea,'range':_0x59e072});}function _0x3fbf8f(_0x417322){for(const _0x5693a0 of _0x417322)for(const _0x53a413 of _0x995c77)if(_0x5693a0['containsRange'](_0x53a413,!_0x55f55a['isCollapsed']))return _0x5693a0;return null;}return _0x539470['sort']((_0x50b649,_0x14ac9c)=>{const _0x14db16=_0x50b649['range'],_0x5769cb=_0x14ac9c['range'];if(!_0x14db16['isEqual'](_0x5769cb)){if(_0x14db16['containsRange'](_0x5769cb,!0x0))return 0x1;if(_0x5769cb['containsRange'](_0x14db16,!0x0))return-0x1;}return _0x50b649['annotation']==_0x2523a7?-0x1:_0x14ac9c['annotation']==_0x2523a7?0x1:0x0;})['map'](_0xed9290=>_0xed9290['annotation']);}get['_editorAnnotationsData'](){const _0x22aac4=new Map();for(const _0xbe28ee of Array['from'](this['_dataCollectors']))for(const [_0x510732,_0x5c48f5]of _0xbe28ee())_0x22aac4['set'](_0x510732,_0x5c48f5);return _0x22aac4;}}class st extends _0x44cf24{['afterInit'](){const _0x15e50d=this['editor'];if(!_0x15e50d['plugins']['has']('RestrictedEditingModeEditing'))return;_0x15e50d['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x44cf24{constructor(_0x331597){super(_0x331597),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x46affb=this['editor'],_0x56a5bb=_0x46affb['commands']['get']('importWord'),_0x2bf4df=_0x46affb['plugins']['get'](it);_0x56a5bb&&(_0x56a5bb['on']('execute',(_0x1a6a94,[,_0x6b34ac])=>{_0x6b34ac['collaboration_features']={'comments':!0x0,'user_id':_0x2bf4df['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x56a5bb,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x2d08fd,_0x14643d){const {comment_threads:_0x1ebb21}=_0x14643d;_0x1ebb21&&_0x1ebb21['forEach'](({thread_id:_0x360221,comments:_0x2acc5e,is_resolved:_0x119cd0})=>{const _0x262a36=new Date(),_0x2f906d=_0x2acc5e['map'](({author:_0x1a4066,content:_0x3eb45d,created_at:_0x23f54e})=>({'content':_0x3eb45d,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x262a36,'attributes':{'@external':{'authorName':_0x1a4066,'createdAt':_0x23f54e?new Date(_0x23f54e):new Date(),'source':'importWord'}}})),_0x18e97f=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x18e97f,'threadId':_0x360221,'comments':_0x2f906d,'resolvedAt':_0x119cd0?_0x262a36:null});});}}class at extends _0x44cf24{constructor(_0x35c9ee){super(_0x35c9ee),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x224c9e=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x224c9e,'contentInsertion',(_0x34987d,_0x240440)=>this['_removeMarkersWithoutThreads'](_0x240440['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x401692){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x401692;const _0x145563=this['editor']['plugins']['get']('CommentsRepository');for(const _0x49c340 of _0x401692['keys']()){const [_0x291564,_0x301e11]=_0x49c340['split'](':');'comment'!=_0x291564||_0x145563['hasCommentThread'](_0x301e11)||_0x401692['delete'](_0x49c340);}return _0x401692;}['_registerMarkerInClipboardPipeline'](){const _0x304041=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x358848=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x358848&&_0x304041['_registerMarkerToCopy']('comment',_0x358848);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x46013f){switch(_0x46013f){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}class r extends _0x44cf24{static get['requires'](){return[o,P,it,st,ct,at];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3f6a5f){super(_0x3f6a5f),this['set']('isThreadsLoadingPaused',!0x0),_0x3f6a5f['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x12430e,_0x5a71f8,_0x5c0ecb,_0x2eec78)=>{const _0x15cc20=_0x5c0ecb?he(_0x5c0ecb)['id']:null;if(_0x3f6a5f['model']['change'](()=>{if(_0x15cc20){const _0x119e64=this['getAllMarkersForId'](_0x15cc20);for(const _0x175824 of _0x119e64)_0x3f6a5f['editing']['reconvertMarker'](_0x175824);}if(_0x2eec78){const {id:_0x39e866}=he(_0x2eec78),_0x251537=this['getAllMarkersForId'](_0x39e866);for(const _0x2ba913 of _0x251537)_0x3f6a5f['editing']['reconvertMarker'](_0x2ba913);}}),_0x15cc20){const _0x1fad51=_0x3f6a5f['plugins']['get'](o)['getCommentThread'](_0x15cc20);_0x1fad51&&_0x1fad51['isResolved']&&this['scrollToThreadMarker'](_0x15cc20);}}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0xea5518=this['editor'],_0x4271a4=_0xea5518['plugins']['get'](o),_0xb4c9ba=_0xea5518['config']['get']('collaboration.channelId');_0xea5518['commands']['add']('addCommentThread',new J(_0xea5518)),this['listenTo'](_0xea5518,'change:isReadOnly',(_0x1f8ebe,_0x304f0c,_0x4c57c0)=>{_0x4271a4['switchReadOnly'](_0x4c57c0,_0xea5518['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x4271a4,ut('addCommentThread',_0xb4c9ba),(_0x403926,{threadId:_0x284fbf})=>{const _0x349663=this['editor']['plugins']['get'](o)['getCommentThread'](_0x284fbf);_0x349663&&_0x349663['unlinkedAt']&&this['_attachArchivedThread'](_0x284fbf);}),this['listenTo'](_0x4271a4,ut('removeCommentThread',_0xb4c9ba),(_0x1f4f9b,{threadId:_0xa33e8a})=>{_0xea5518['model']['enqueueChange']({'isUndoable':!0x1},_0x391f0e=>{const _0x1d4703=this['getAllMarkersForId'](_0xa33e8a);for(const _0x38ac4b of _0x1d4703)_0x391f0e['removeMarker'](_0x38ac4b);});}),this['listenTo'](_0x4271a4,ut('resolveCommentThread',_0xb4c9ba),(_0x5c4eff,{threadId:_0x4320f5})=>{(this['_reconvertMarkers'](_0x4320f5),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x4320f5)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x4271a4,ut('reopenCommentThread',_0xb4c9ba),(_0x3ab77e,{threadId:_0x502cd8})=>{this['_reconvertMarkers'](_0x502cd8);},{'priority':'low'}),this['listenTo'](_0x4271a4,ut('addComment',_0xb4c9ba),(_0x6e0476,{threadId:_0x1e774e,isFromAdapter:_0x4a159f})=>{const _0x1f01a0=this['getAllMarkersForId'](_0x1e774e);if(_0x4a159f||0x0==_0x1f01a0['length']||!_0x4271a4['hasCommentThread'](_0x1e774e))return;0x1===_0x4271a4['getCommentThread'](_0x1e774e)['length']&&_0xea5518['model']['enqueueChange']({'isUndoable':!0x1},_0x4ab1a1=>{for(const _0x395c96 of _0x1f01a0)_0x4ab1a1['updateMarker'](_0x395c96,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove']();}['afterInit'](){!async function(_0x449be5){const _0x17eb8d=_0xc45584([0x6b,0x53,0x7a,0x6e,0x5a,0x69,0x54,0x52,0x75,0x74,0x4c,0x44,0x6c,0x36,0x67,0x59,0x38,0x51,0x65,0x62,0x4a,0x6f,0x76,0x6a,0x31,0x39,0x4e,0x43,0x37,0x77,0x6d,0x4d,0x35,0x56,0x58,0x57,0x30,0x63,0x32,0x55,0x72,0x68,0x4f,0x71,0x42,0x61,0x49,0x41,0x45,0x79,0x70,0x47,0x33,0x48,0x4b,0x73,0x78,0x64,0x50,0x34,0x66,0x46]),_0x28d7bb=0x61eb8b9,_0x598091=0x619e091^_0x28d7bb,_0x657840=window[_0xc45584([0x44,0x61,0x74,0x65])][_0xc45584([0x6e,0x6f,0x77])](),_0x2d550c=_0x449be5[_0xc45584([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x57bdd1=new window[(_0xc45584([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2f6a2f=>{_0x2d550c[_0xc45584([0x6f,0x6e,0x63,0x65])](_0xc45584([0x72,0x65,0x61,0x64,0x79]),_0x2f6a2f);}),_0x41ecfb={[_0xc45584([0x6b,0x74,0x79])]:_0xc45584([0x45,0x43]),[_0xc45584([0x75,0x73,0x65])]:_0xc45584([0x73,0x69,0x67]),[_0xc45584([0x63,0x72,0x76])]:_0xc45584([0x50,0x2d,0x32,0x35,0x36]),[_0xc45584([0x78])]:_0xc45584([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]),[_0xc45584([0x79])]:_0xc45584([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]),[_0xc45584([0x61,0x6c,0x67])]:_0xc45584([0x45,0x53,0x32,0x35,0x36])},_0x141a7f=_0x2d550c[_0xc45584([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0xc45584([0x67,0x65,0x74])](_0xc45584([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x11cdf8(){let _0x4ebb32,_0x207127=null,_0x2280e2=null;try{if(_0x141a7f==_0xc45584([0x47,0x50,0x4c]))return _0xc45584([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x4ebb32=_0x9a5499(),!_0x4ebb32)return _0xc45584([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x4ebb32[_0xc45584([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x2280e2=_0x583a39(_0x4ebb32[_0xc45584([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x4ebb32[_0xc45584([0x6a,0x74,0x69])])),await _0x2f027d()?_0x2aa2c8()?_0x311964()?_0xc45584([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x5f1a0f()?(_0x4ebb32[_0xc45584([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xc45584([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x207127=_0x49f662(_0xc45584([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),_0x4ebb32[_0xc45584([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xc45584([0x74,0x72,0x69,0x61,0x6c])&&(_0x207127=_0x49f662(_0xc45584([0x54,0x72,0x69,0x61,0x6c,0x4c,0x69,0x6d,0x69,0x74]))),_0x4ebb32[_0xc45584([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0xc45584([0x64,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74])&&(_0x207127=_0x49f662(_0xc45584([0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x4c,0x69,0x6d,0x69,0x74]))),await _0x306ccf()):_0xc45584([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0xc45584([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0xc45584([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch(_0x59ba92){return _0xc45584([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x311964(){const _0x3c9d3b=[_0xc45584([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0xc45584([0x74,0x72,0x69,0x61,0x6c])][_0xc45584([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4ebb32[_0xc45584([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x657840/0x3e8:0xe10*_0x598091;return _0x4ebb32[_0xc45584([0x65,0x78,0x70])]<_0x3c9d3b;}function _0x2aa2c8(){const _0x3ee695=_0x4ebb32[_0xc45584([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];return!!_0x3ee695&&(!!_0x3ee695[_0xc45584([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc45584([0x2a]))||(!!_0x3ee695[_0xc45584([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc45584([0x43,0x4d,0x54]))||!(!_0x3ee695[_0xc45584([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc45584([0x52,0x43,0x4d,0x54]))||!_0x2af88f())));}function _0x5f1a0f(){const _0x39c64f=_0x4ebb32[_0xc45584([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x39c64f||0x0==_0x39c64f[_0xc45584([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x4bbdb0}=new URL(window[_0xc45584([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x39c64f[_0xc45584([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x4bbdb0))return!0x0;const _0x446bda=_0x4bbdb0[_0xc45584([0x73,0x70,0x6c,0x69,0x74])](_0xc45584([0x2e]));return _0x39c64f[_0xc45584([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x6edb1c=>_0x6edb1c[_0xc45584([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xc45584([0x2a])))[_0xc45584([0x6d,0x61,0x70])](_0x46c4f8=>_0x46c4f8[_0xc45584([0x73,0x70,0x6c,0x69,0x74])](_0xc45584([0x2e])))[_0xc45584([0x73,0x6f,0x6d,0x65])](_0x542a79=>_0x446bda[_0xc45584([0x65,0x76,0x65,0x72,0x79])]((_0x4b894e,_0x59bc55)=>_0x542a79[_0x59bc55]===_0x4b894e||_0x542a79[_0x59bc55]===_0xc45584([0x2a])));}function _0x306ccf(){return _0x207127&&_0x2280e2?new window[(_0xc45584([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x1b861c,_0x4aa69c)=>{_0x207127[_0xc45584([0x74,0x68,0x65,0x6e])](_0x1b861c,_0x4aa69c),_0x2280e2[_0xc45584([0x74,0x68,0x65,0x6e])](_0x5cbe13=>{_0x5cbe13!=_0xc45584([0x56,0x61,0x6c,0x69,0x64])&&_0x1b861c(_0x5cbe13);},_0x4aa69c);}):_0x207127||_0x2280e2||_0xc45584([0x56,0x61,0x6c,0x69,0x64]);}}function _0x583a39(_0x35f8bf,_0x231711){return new window[(_0xc45584([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3d8737=>{if(_0x3d2e8d())return _0x3d8737(_0xc45584([0x56,0x61,0x6c,0x69,0x64]));_0x519830(),_0x2d550c[_0xc45584([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0xc45584([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x4d615f=!0x1;const _0x54d5cd=_0xcaced0();function _0x25b3b3(_0x353d89){return!!_0x353d89&&(typeof _0x353d89===_0xc45584([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x353d89===_0xc45584([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x353d89[_0xc45584([0x74,0x68,0x65,0x6e])]===_0xc45584([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x353d89[_0xc45584([0x63,0x61,0x74,0x63,0x68])]===_0xc45584([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x580c3d(_0x4098c9){_0x3e4c0f(_0x4098c9)[_0xc45584([0x74,0x68,0x65,0x6e])](_0x1109bc=>{if(!_0x1109bc||_0x1109bc[_0xc45584([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0xc45584([0x6f,0x6b]))return _0xc45584([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x50055c(_0x27baee(_0x54d5cd+_0x231711))!=_0x1109bc[_0xc45584([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0xc45584([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0xc45584([0x56,0x61,0x6c,0x69,0x64]);})[_0xc45584([0x74,0x68,0x65,0x6e])](_0x10d6b5=>(_0xa9c437(),_0x10d6b5),()=>{const _0xc672a=_0x76ab43();return null==_0xc672a?(_0xa9c437(),_0xc45584([0x56,0x61,0x6c,0x69,0x64])):_0xc45584(_0x657840-_0xc672a>(0x22123cb9^_0x28d7bb)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0xc45584([0x74,0x68,0x65,0x6e])](_0x3d8737)[_0xc45584([0x63,0x61,0x74,0x63,0x68])](()=>{_0x3d8737(_0xc45584([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x444526=0x6285639^_0x28d7bb;function _0xa9c437(){const _0x5c116c=_0xc45584([0x6c,0x6c,0x63,0x74,0x2d])+_0x50055c(_0x27baee(_0x35f8bf)),_0x3ebb7a=_0x1f2714(_0x50055c(window[_0xc45584([0x4d,0x61,0x74,0x68])][_0xc45584([0x63,0x65,0x69,0x6c])](_0x657840/_0x444526)));window[_0xc45584([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xc45584([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x5c116c,_0x3ebb7a);}function _0x76ab43(){const _0x2bae0a=_0xc45584([0x6c,0x6c,0x63,0x74,0x2d])+_0x50055c(_0x27baee(_0x35f8bf)),_0x2955eb=window[_0xc45584([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0xc45584([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x2bae0a);return _0x2955eb?window[_0xc45584([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x1f2714(_0x2955eb),0x10)*_0x444526:null;}function _0x3e4c0f(_0x35d951){return new window[(_0xc45584([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x227bb1,_0x518596)=>{_0x35d951[_0xc45584([0x74,0x68,0x65,0x6e])](_0x227bb1,_0x518596),window[_0xc45584([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x518596,0x61f6c79^_0x28d7bb);});}}_0x2d550c[_0xc45584([0x6f,0x6e])](_0xc45584([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x571180,_0x1977a6)=>{if(_0x1977a6[0x0]!=_0x35f8bf)return _0x3d8737(_0xc45584([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x1977a6[0x1]={..._0x1977a6[0x1],[_0xc45584([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x54d5cd};},{[_0xc45584([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xc45584([0x68,0x69,0x67,0x68])}),_0x2d550c[_0xc45584([0x6f,0x6e])](_0xc45584([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x2b8372=>{_0x25b3b3(_0x2b8372[_0xc45584([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x4d615f=!0x0,_0x580c3d(_0x2b8372[_0xc45584([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0xc45584([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0xc45584([0x6c,0x6f,0x77])}),_0x57bdd1[_0xc45584([0x74,0x68,0x65,0x6e])](()=>{_0x4d615f||_0x3d8737(_0xc45584([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x3d2e8d(){return _0x2d550c[_0xc45584([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xc45584([0x76,0x69,0x65,0x77])][_0xc45584([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0xc45584([0x61,0x75,0x74,0x6f]);}function _0x519830(){_0x2d550c[_0xc45584([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0xc45584([0x76,0x69,0x65,0x77])][_0xc45584([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0xc45584([0x61,0x75,0x74,0x6f]);}}function _0x49f662(_0xab79e8){const _0x45a734=[new window[(_0xc45584([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x5474f5=>setTimeout(_0x5474f5,0x6178675^_0x28d7bb)),_0x57bdd1[_0xc45584([0x74,0x68,0x65,0x6e])](()=>new window[(_0xc45584([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x50238b=>{let _0xc0bc19=0x0;_0x2d550c[_0xc45584([0x6d,0x6f,0x64,0x65,0x6c])][_0xc45584([0x6f,0x6e])](_0xc45584([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x584050,_0x461cf3)=>{_0x461cf3[0x0][_0xc45584([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0xc0bc19++,_0xc0bc19==(0x61eb941^_0x28d7bb)&&(_0x50238b(),_0x584050[_0xc45584([0x6f,0x66,0x66])]());});}))];return window[_0xc45584([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0xc45584([0x72,0x61,0x63,0x65])](_0x45a734)[_0xc45584([0x74,0x68,0x65,0x6e])](()=>_0xab79e8);}async function _0x3b6904(){await _0x57bdd1,_0x2d550c[_0xc45584([0x6d,0x6f,0x64,0x65,0x6c])][_0xc45584([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x9beab,_0x2d550c[_0xc45584([0x6d,0x6f,0x64,0x65,0x6c])][_0xc45584([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x9beab,_0x2d550c[_0xc45584([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0xc45584([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2af88f(){return _0x572278(_0xc45584([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1ba36a(_0xc45584([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0xc45584([0x73,0x74,0x61,0x74,0x65])]==_0xc45584([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x4a1688(_0x2921c9){const _0x143366=_0x5740c4();_0x2d550c[_0x143366]=_0xc45584([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x2921c9,_0x2921c9!=_0xc45584([0x56,0x61,0x6c,0x69,0x64])&&_0x3b6904();}function _0x5740c4(){const _0x12a5e6=window[_0xc45584([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0xc45584([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0xc45584([0x6e,0x6f,0x77])]())[_0xc45584([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0xc45584([0x2e]),'');let _0x3b8c34=_0xc45584([0x6b]);for(let _0x25bd2d=0x0;_0x25bd2d<_0x12a5e6[_0xc45584([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x25bd2d+=0x2){let _0x4d1d04=window[_0xc45584([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x12a5e6[_0xc45584([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x25bd2d,_0x25bd2d+0x2));_0x4d1d04>=_0x17eb8d[_0xc45584([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x4d1d04-=_0x17eb8d[_0xc45584([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3b8c34+=_0x17eb8d[_0x4d1d04];}return _0x3b8c34;}function _0x9a5499(){const _0x79c316=_0x141a7f[_0xc45584([0x73,0x70,0x6c,0x69,0x74])](_0xc45584([0x2e]));if(0x3!=_0x79c316[_0xc45584([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x26559f(_0x79c316[0x1]);function _0x26559f(_0x37b70f){const _0x18e837=_0x217f71(_0x37b70f);return _0x18e837&&_0x4f0ffa()?_0x18e837:null;function _0x4f0ffa(){const _0x514f92=_0x18e837[_0xc45584([0x6a,0x74,0x69])],_0x181e5c=window[_0xc45584([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x514f92[_0xc45584([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x514f92[_0xc45584([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x493a88={..._0x18e837,[_0xc45584([0x6a,0x74,0x69])]:_0x514f92[_0xc45584([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x514f92[_0xc45584([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x493a88[_0xc45584([0x76,0x63])],_0x27baee(_0x493a88)==_0x181e5c;}}}async function _0x2f027d(){let _0x4ea846=!0x0;try{const _0xf19c8e=_0x141a7f[_0xc45584([0x73,0x70,0x6c,0x69,0x74])](_0xc45584([0x2e])),[_0x353b2f,_0x1fd38a,_0x41bc61]=_0xf19c8e;return _0x597d07(_0x353b2f),await _0x58f11d(_0x353b2f,_0x1fd38a,_0x41bc61),_0x4ea846;}catch(_0x40fdc1){return!0x1;}function _0x597d07(_0xe315c7){const _0x1d0ab8=_0x217f71(_0xe315c7);_0x1d0ab8&&_0x1d0ab8[_0xc45584([0x61,0x6c,0x67])]==_0xc45584([0x45,0x53,0x32,0x35,0x36])||(_0x4ea846=!0x1);}async function _0x58f11d(_0x397fdd,_0x567ea3,_0x476b99){const _0x8e315d=window[_0xc45584([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0xc45584([0x66,0x72,0x6f,0x6d])](_0xe652f0(_0x476b99),_0x5ae123=>_0x5ae123[_0xc45584([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x182f59=new window[(_0xc45584([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0xc45584([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x397fdd+_0xc45584([0x2e])+_0x567ea3),_0x125eb4=window[_0xc45584([0x63,0x72,0x79,0x70,0x74,0x6f])][_0xc45584([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x125eb4)return;const _0x32c334=await _0x125eb4[_0xc45584([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0xc45584([0x6a,0x77,0x6b]),_0x41ecfb,{[_0xc45584([0x6e,0x61,0x6d,0x65])]:_0xc45584([0x45,0x43,0x44,0x53,0x41]),[_0xc45584([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0xc45584([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0xc45584([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x125eb4[_0xc45584([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0xc45584([0x6e,0x61,0x6d,0x65])]:_0xc45584([0x45,0x43,0x44,0x53,0x41]),[_0xc45584([0x68,0x61,0x73,0x68])]:{[_0xc45584([0x6e,0x61,0x6d,0x65])]:_0xc45584([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x32c334,_0x8e315d,_0x182f59)||(_0x4ea846=!0x1);}}function _0x217f71(_0x3f8436){return _0x3f8436[_0xc45584([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0xc45584([0x65,0x79]))?JSON[_0xc45584([0x70,0x61,0x72,0x73,0x65])](_0xe652f0(_0x3f8436)):null;}function _0xe652f0(_0x26a042){return window[_0xc45584([0x61,0x74,0x6f,0x62])](_0x26a042[_0xc45584([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0xc45584([0x2b]))[_0xc45584([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0xc45584([0x2f])));}function _0x27baee(_0x4f84d8){let _0x387594=0x1505;function _0x338360(_0x263a41){for(let _0x146ba2=0x0;_0x146ba2<_0x263a41[_0xc45584([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x146ba2++){const _0x2ad393=_0x263a41[_0xc45584([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x146ba2);_0x387594=(_0x387594<<0x5)+_0x387594+_0x2ad393,_0x387594&=_0x387594;}}function _0x2cea1d(_0xfa5365){Array[_0xc45584([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0xfa5365)?_0xfa5365[_0xc45584([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2cea1d):_0xfa5365&&typeof _0xfa5365==_0xc45584([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0xc45584([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0xfa5365)[_0xc45584([0x73,0x6f,0x72,0x74])]()[_0xc45584([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x5487e0,_0x5170b8])=>{_0x338360(_0x5487e0),_0x2cea1d(_0x5170b8);}):_0x338360(window[_0xc45584([0x53,0x74,0x72,0x69,0x6e,0x67])](_0xfa5365));}return _0x2cea1d(_0x4f84d8),_0x387594>>>0x0;}function _0x50055c(_0x1d1f45){return _0x1d1f45[_0xc45584([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0xc45584([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0xc45584([0x30]));}function _0x1f2714(_0x5f0d29){return _0x5f0d29[_0xc45584([0x73,0x70,0x6c,0x69,0x74])]('')[_0xc45584([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0xc45584([0x6a,0x6f,0x69,0x6e])]('');}function _0x572278(_0x12c71e){return _0x2d550c[_0xc45584([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xc45584([0x68,0x61,0x73])](_0x12c71e);}function _0x1ba36a(_0x4fb6f4){return _0x2d550c[_0xc45584([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0xc45584([0x67,0x65,0x74])](_0x4fb6f4);}function _0x9beab(){}function _0xc45584(_0x22c4ed){return _0x22c4ed['map'](_0x499fb6=>String['fromCharCode'](_0x499fb6))['join']('');}_0x4a1688(await _0x11cdf8());}(this);}['destroy'](){const _0x1c9411=this['editor']['plugins']['get'](o),_0x551a64=this['editor']['config']['get']('collaboration.channelId');for(const _0x1d1817 of _0x1c9411['getCommentThreads']({'channelId':_0x551a64}))_0x1c9411['_detachCommentThread'](_0x1d1817['id']),_0x1c9411['_threads']['delete'](_0x1d1817['id']);super['destroy']();}['hasMarkerForId'](_0x50b07a){return this['getAllMarkersForId'](_0x50b07a)['length']>0x0;}['getAllMarkersForId'](_0x3ff209){const _0x2d3627=[];for(const _0xfb874 of this['editor']['model']['markers'])_0xfb874['name']['startsWith']('comment:'+_0x3ff209)&&_0x2d3627['push'](_0xfb874);return _0x2d3627;}['scrollToThreadMarker'](_0x2722f8){const _0x9dae54=this['_getTargetForId'](_0x2722f8);_0x9dae54&&setTimeout(()=>{this['activeMarker']&&he(this['activeMarker'])['id']===_0x2722f8&&rt({'target':_0x9dae54[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x545757){this['editor']['model']['change'](()=>{for(const _0x4cc697 of this['getAllMarkersForId'](_0x545757))this['editor']['editing']['reconvertMarker'](_0x4cc697);});}['_attachArchivedThread'](_0x1c7001){const _0x298d83=this['editor']['plugins']['get'](o),_0x2363fa=this['editor']['plugins']['get'](P),_0x23894b=_0x298d83['getCommentThread'](_0x1c7001);if(!_0x23894b['isAttached']){const _0xe86a12=_0x23894b['attachTo'](()=>this['_getTargetForId'](_0x23894b['id']));_0x2363fa['registerAnnotation'](_0xe86a12),_0x23894b['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x31a834=this['editor'],_0x358047=_0x31a834['plugins']['get'](it);_0x31a834['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x1cbb24,_0x426a0f)=>{const {id:_0x14dce6}=he(_0x1cbb24['markerName']),_0x3b4a7b=_0x31a834['plugins']['get'](o)['getCommentThread'](_0x14dce6),_0x5bd138=this['activeMarker']&&he(this['activeMarker'])['id']===_0x14dce6;let _0x3f5a06;if(_0x3b4a7b&&_0x3b4a7b['isResolved']&&!_0x5bd138&&_0x1cbb24['item'])return _0x426a0f['consumable']['consume'](_0x1cbb24['item'],'addMarker:'+_0x1cbb24['markerName']),_0x426a0f['consumable']['consume'](_0x1cbb24['item'],'removeMarker:'+_0x1cbb24['markerName']),null;const _0x2ff36b=['ck-comment-marker'];return _0x5bd138&&_0x2ff36b['push']('ck-comment-marker--active'),_0x3f5a06=_0x3b4a7b&&_0x3b4a7b['length']?_0x3b4a7b['comments']['first']['author']['id']:_0x358047['me']['id'],{'classes':_0x2ff36b,'attributes':{'data-comment':_0x14dce6,'data-author-id':_0x3f5a06}};}}),_0x31a834['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x52971b,{options:_0x4799c5})=>{const _0x46a2d5=_0x31a834['plugins']['get'](o),_0x2d1197=_0x31a834['model']['markers']['get'](_0x52971b),{id:_0x4951cd,part:_0x3ad07e}=he(_0x52971b);if(_0x2d1197&&!_0x2d1197['affectsData'])return null;if(_0x4799c5['ignoreResolvedComments']){const _0x39ae4e=_0x46a2d5['getCommentThread'](_0x4951cd);if(_0x39ae4e&&_0x39ae4e['isResolved'])return null;}return{'group':'comment','name':_0x3ad07e?_0x4951cd+':'+_0x3ad07e:_0x4951cd};}}),_0x31a834['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x2548a3,{writer:_0x1a9d8b})=>_0x1a9d8b['createElement']('$marker',{'data-name':'comment:'+_0x2548a3['getAttribute']('id')})}),_0x31a834['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x185d80=this['editor'],_0x32afb3=_0x185d80['plugins']['get'](o),_0x638e2e=new Set(),_0x1cf687=new Set();_0x185d80['model']['document']['registerPostFixer'](_0x3bcc2d=>{let _0x4e519c=!0x1;for(const {name:_0x152184,data:_0x1899b2}of _0x185d80['model']['document']['differ']['getChangedMarkers']()){const {group:_0x467963,id:_0xf3e7bc}=he(_0x152184);let _0x296668=_0x1899b2['newRange'];if('comment'!==_0x467963||!_0x296668)continue;const _0x522f91='$graveyard'===_0x296668['root']['rootName'];_0x522f91||(_0x296668=ft(_0x296668,_0x185d80['model']),!_0x296668||_0x296668['isCollapsed']||!_0x1899b2['newRange']||_0x296668['isEqual'](_0x1899b2['newRange']))?_0x185d80['model']['hasContent'](_0x296668)&&!_0x522f91?this['isThreadsLoadingPaused']?_0x638e2e['add'](_0x152184):this['_handleThreadMarker'](_0x152184,_0xf3e7bc):(_0x1cf687['add'](_0x152184),_0x638e2e['delete'](_0x152184),_0x3bcc2d['removeMarker'](_0x152184),_0x4e519c=!0x0):(_0x3bcc2d['updateMarker'](_0x152184,{'range':_0x296668}),_0x4e519c=!0x0);}return _0x4e519c;}),this['on']('change:isThreadsLoadingPaused',(_0x38c334,_0x26b944,_0x1153e4)=>{if(!_0x1153e4&&_0x638e2e['size'])for(const _0xd08be3 of _0x638e2e){const {id:_0x767b2a}=he(_0xd08be3);_0x638e2e['delete'](_0xd08be3),_0x185d80['model']['markers']['get'](_0xd08be3)&&this['_handleThreadMarker'](_0xd08be3,_0x767b2a);}}),this['listenTo'](_0x185d80['model']['document'],'change',(_0x181449,_0x212c38)=>{for(const {name:_0x183e85,data:{newRange:_0x45020f}}of _0x185d80['model']['document']['differ']['getChangedMarkers']()){const {group:_0x366861,id:_0x3b460a}=he(_0x183e85);if('comment'!==_0x366861)continue;const _0x2d4d04=_0x32afb3['getCommentThread'](_0x3b460a),_0xc95c15=this['hasMarkerForId'](_0x3b460a);_0x2d4d04&&(!_0x2d4d04['_hasTargetInContent']&&_0x45020f&&_0x185d80['editing']['view']['once']('render',()=>{const _0x43d411=_0x185d80['plugins']['get'](N),_0x16a91a=_0x32afb3['_threadToController']['get'](_0x2d4d04)['view'];_0x43d411['getByInnerView'](_0x16a91a)['refreshVisibility']();},{'priority':'low'}),_0x2d4d04['_hasTargetInContent']=_0xc95c15||!!_0x45020f),_0x45020f||(_0x1cf687['add'](_0x183e85),_0x638e2e['delete'](_0x183e85));}if(_0x212c38['isLocal'])for(const _0x4918a1 of _0x1cf687){const {id:_0x101f51}=he(_0x4918a1),_0x5afb8c=_0x32afb3['getCommentThread'](_0x101f51),_0x1a223d=this['hasMarkerForId'](_0x101f51);_0x638e2e['delete'](_0x4918a1),!_0x5afb8c||_0x1a223d||_0x5afb8c['unlinkedAt']||_0x5afb8c['setUnlinkedAt'](new Date());}_0x1cf687['clear']();});}['_getTargetForId'](_0x306400){const _0x5f540a=this['editor'],_0x3af819=this['getAllMarkersForId'](_0x306400);return et(_0x5f540a['editing'],_0x3af819);}['_getTextContext'](_0x5b06b2){const _0xa6f83f=this['getAllMarkersForId'](_0x5b06b2);let _0x13cffc='',_0x100a56=!0x1;for(const _0x5bfa2d of _0xa6f83f){const _0x114ee7=_0x5bfa2d['getRange']();for(const _0x26b40e of Array['from'](_0x114ee7['getItems']()))_0x26b40e['is']('$textProxy')?(_0x13cffc&&_0x100a56&&(_0x13cffc+='\x20',_0x100a56=!0x1),_0x13cffc+=_0x26b40e['data']):_0x100a56=!0x0;_0x100a56=!0x0;}return _0x13cffc['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x35f674,_0xe957c7){const _0x2e4950=this['editor'],_0x18744f=_0x2e4950['plugins']['get'](o);let _0x2ba62c=_0x18744f['getCommentThread'](_0xe957c7);const _0x282704=_0x2e4950['config']['get']('collaboration.channelId'),_0x7d96bc=_0x2e4950['plugins']['get'](P);if(_0x2ba62c&&(_0x2ba62c['unlinkedAt']&&_0x2ba62c['setUnlinkedAt'](null),_0x2ba62c['isAttached']))return _0x2ba62c;return!this['getAllMarkersForId'](_0xe957c7)[0x0]['managedUsingOperations']?_0x2e4950['editing']['view']['once']('render',()=>{if(_0x18744f['getCommentThread'](_0xe957c7))return;const _0x5d3c74=_0x2e4950['plugins']['get'](N);_0x2ba62c=_0x18744f['openNewCommentThread']({'channelId':_0x282704,'threadId':_0xe957c7,'target':()=>this['_getTargetForId'](_0xe957c7),'context':{'type':'text','value':this['_getTextContext'](_0xe957c7)}});const _0x36b8e8=_0x18744f['_threadToController']['get'](_0x2ba62c)['view'],_0x15c743=_0x5d3c74['getByInnerView'](_0x36b8e8);_0x15c743&&_0x7d96bc['registerAnnotation'](_0x15c743);},{'priority':'low'}):_0x18744f['fetchCommentThread']({'channelId':_0x282704,'threadId':_0xe957c7})['then'](_0x3d9f1a=>{if('destroyed'!==_0x2e4950['state']){if(_0x2ba62c=_0x3d9f1a,_0x2ba62c&&!_0x2ba62c['isAttached']){const _0x134b37=_0x2ba62c['attachTo'](()=>this['_getTargetForId'](_0xe957c7));_0x7d96bc['registerAnnotation'](_0x134b37),_0x2ba62c['isResolved']&&this['_reconvertMarkers'](_0xe957c7);}else{if(!_0x2ba62c){const _0x2625bd=this['getAllMarkersForId'](_0xe957c7);_0x2e4950['model']['change'](_0x279271=>{for(const _0x4568ab of _0x2625bd)_0x279271['removeMarker'](_0x4568ab);});}}}}),_0x2ba62c;}['_handleThreadMarker'](_0x3aeb00,_0x2bc5cc){const _0x1f1e67=this['_attachMarkerToThread'](_0x3aeb00,_0x2bc5cc);_0x1f1e67&&!_0x1f1e67['context']&&_0x1f1e67['setContext']({'type':'text','value':this['_getTextContext'](_0x2bc5cc)});}['_initAriaMarkerChangeAnnouncements'](){const _0x28bdbf=this['editor'];ot(_0x28bdbf['model'],({left:_0x5e31fd,entered:_0x15d78c})=>{for(const _0x21afee of _0x5e31fd)if(dt(_0x21afee)){_0x28bdbf['ui']['ariaLiveAnnouncer']['announce'](S(_0x28bdbf['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x216d6b of _0x15d78c)if(dt(_0x216d6b)){_0x28bdbf['ui']['ariaLiveAnnouncer']['announce'](S(_0x28bdbf['locale'],'ENTER_COMMENT_ANNOUNCEMENT',nt(_0x30a9d8)));break;}});}}function ut(_0x260966,_0x1a73c2){return _0x1a73c2?_0x260966+':'+_0x1a73c2:_0x260966;}function he(_0xb821bd){const _0x4ee496=_0xb821bd['split'](':');return{'group':_0x4ee496[0x0],'id':_0x4ee496[0x1],'part':_0x4ee496[0x2]};}function ft(_0xd4e7ee,_0x11a3dd){const _0x3784ed=_0x11a3dd['schema'],_0xeccb7b=_0x11a3dd['createRange'](_0xd4e7ee['start']);for(const _0x319664 of _0xd4e7ee['getWalker']()){const {type:_0x27170c,item:_0x447bd6,nextPosition:_0x1e8504}=_0x319664;if('text'===_0x27170c||_0x3784ed['isObject'](_0x447bd6)){const _0x5a317a=_0x11a3dd['createPositionBefore'](_0x447bd6);_0xeccb7b['isCollapsed']&&(_0xeccb7b['start']=_0x5a317a),_0xeccb7b['end']=_0x1e8504;}}return _0xeccb7b;}function dt(_0x48da08){return'comment'===he(_0x48da08['name'])['group'];}var xt='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20d=\x22M4\x201.5h12A3.5\x203.5\x200\x200\x201\x2019.5\x205v8l-.005.192a3.5\x203.5\x200\x200\x201-2.927\x203.262l-.062.008v1.813a1.5\x201.5\x200\x200\x201-2.193\x201.33l-.371-.193-.38-.212a13.452\x2013.452\x200\x200\x201-3.271-2.63l-.062-.07H4A3.5\x203.5\x200\x200\x201\x20.5\x2013V5A3.5\x203.5\x200\x200\x201\x204\x201.5ZM4\x203a2\x202\x200\x200\x200-2\x202v8a2\x202\x200\x200\x200\x202\x202h6.924a11.917\x2011.917\x200\x200\x200\x203.71\x203.081l.372.194v-3.268L14.962\x2015H16a2\x202\x200\x200\x200\x202-2V5a2\x202\x200\x200\x200-2-2H4Z\x22/><path\x20d=\x22M9.75\x205a.75.75\x200\x200\x200-.75.75v2.5H6.5a.75.75\x200\x200\x200\x200\x201.5H9v2.5a.75.75\x200\x200\x200\x201.5\x200v-2.5H13a.75.75\x200\x200\x200\x200-1.5h-2.5v-2.5A.75.75\x200\x200\x200\x209.75\x205Z\x22/></svg>\x0a';class i extends _0x44cf24{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,P,N];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x43c33b=this['editor'],_0x2d091a=_0x43c33b['plugins']['get'](o),_0x270a15=_0x43c33b['plugins']['get'](r),_0x3cefa7=_0x43c33b['plugins']['get'](N),_0x5330a2=_0x43c33b['plugins']['get'](P);_0x43c33b['ui']['componentFactory']['add']('comment',()=>{const _0x2f5521=this['_createUIButton'](_0xaf61aa);return _0x2f5521['tooltip']=!0x0,_0x2f5521;}),_0x43c33b['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x5a2278)),_0x5330a2['addSourceCollector'](()=>{const _0x45b300=[];for(const [_0x187439,_0x2c815c]of _0x2d091a['_threadToController']){const _0x149b4d=_0x270a15['getAllMarkersForId'](_0x187439['id']),_0x22981d=_0x149b4d['map'](_0x137f30=>_0x137f30['getRange']());_0x149b4d['length']>0x0&&_0x45b300['push']([_0x2c815c['view'],_0x22981d]);}return _0x45b300;}),this['listenTo'](_0x3cefa7,'change:activeAnnotations',(_0x5d4fd5,_0x5dde0a,_0x43e24a)=>{const _0x97090a=Array['from'](_0x43e24a)['map'](_0x1d3ee5=>_0x1d3ee5['innerView'])['find'](_0x599e28=>_0x2d091a['_viewToController']['has'](_0x599e28));if(!_0x97090a)return void(_0x270a15['activeMarker']=null);const _0x91a77e=_0x2d091a['_viewToController']['get'](_0x97090a)['model']['id'],_0x3aad70='comment:'+_0x91a77e;_0x91a77e&&_0x270a15['hasMarkerForId'](_0x91a77e)?_0x270a15['activeMarker']=_0x3aad70:_0x270a15['activeMarker']&&(_0x270a15['activeMarker']=null);}),this['listenTo'](_0x2d091a,'removeCommentThread',(_0x35c202,{threadId:_0x35dd87,isFromAdapter:_0x41953f})=>{!_0x41953f&&_0x43c33b['ui']['focusTracker']['isFocused']&&_0x270a15['hasMarkerForId'](_0x35dd87)&&_0x43c33b['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2d091a,'addComment',(_0x1ca36b,{threadId:_0x1951ac,isFromAdapter:_0x29a4f3})=>{if(_0x29a4f3||!_0x270a15['hasMarkerForId'](_0x1951ac)||!_0x2d091a['hasCommentThread'](_0x1951ac))return;0x1===_0x2d091a['getCommentThread'](_0x1951ac)['length']&&(_0x43c33b['editing']['view']['focus'](),_0x1ca36b['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x3e9e85=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x552778;for(const _0x3fa77b in _0x3e9e85){const _0x4d7ab1=_0x3fa77b,_0x50466a=_0x3e9e85[_0x4d7ab1];if('commentsLicenseKeyValid'==_0x50466a||'commentsLicenseKeyInvalid'==_0x50466a||'commentsLicenseKeyExpired'==_0x50466a||'commentsLicenseKeyDomainLimit'==_0x50466a||'commentsLicenseKeyNotAllowed'==_0x50466a||'commentsLicenseKeyEvaluationLimit'==_0x50466a||'commentsLicenseKeyTrialLimit'==_0x50466a||'commentsLicenseKeyDevelopmentLimit'==_0x50466a||'commentsLicenseKeyUsageLimit'==_0x50466a){delete _0x3e9e85[_0x4d7ab1],_0x552778=_0x50466a,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x552778&&_0x3e9e85['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x552778&&_0x3e9e85['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x552778&&_0x3e9e85['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x552778&&_0x3e9e85['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x552778&&_0x3e9e85['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyTrialLimit'==_0x552778&&_0x3e9e85['_showLicenseError']('trialLimit'),'commentsLicenseKeyDevelopmentLimit'==_0x552778&&_0x3e9e85['_showLicenseError']('developmentLimit'),'commentsLicenseKeyUsageLimit'==_0x552778&&_0x3e9e85['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x21429c){const _0x15ba52=this['editor'],_0x5dfda9=new _0x21429c(_0x15ba52['locale']),_0x2416c6=_0x15ba52['commands']['get']('addCommentThread');return _0x5dfda9['set']({'label':S(_0x15ba52['locale'],'Comment'),'icon':xt}),_0x5dfda9['bind']('isEnabled')['to'](_0x2416c6),this['listenTo'](_0x5dfda9,'execute',()=>_0x2416c6['execute']()),_0x5dfda9;}}class s extends _0x44cf24{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x236228){super(_0x236228),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1c511e,_0x408037,_0x16f16)=>{_0x16f16?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x1442f6,_0x419ced]of this['editor']['commands'])_0x419ced['affectsData']&&'addCommentThread'!==_0x1442f6&&_0x419ced['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode');const _0xd4bf1f=this['editor']['editing']['view']['document'];this['listenTo'](_0xd4bf1f,'cut',_0x442e2f=>_0x442e2f['stop'](),{'priority':'highest'}),this['listenTo'](_0xd4bf1f,'clipboardInput',_0x5624cb=>_0x5624cb['stop'](),{'priority':'highest'}),this['listenTo'](_0xd4bf1f,'delete',_0xda96cb=>_0xda96cb['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x352843,_0x2a5fcb]of this['editor']['commands'])_0x2a5fcb['affectsData']&&'addCommentThread'!==_0x352843&&_0x2a5fcb['clearForceDisabled']('commentsOnlyMode');this['stopListening'](this['editor']['editing']['view']['document']);}}class M extends _0x4fba92{['activeUIs'];['_uis'];['_uisData'];static get['requires'](){return[N];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x35ec49){super(_0x35ec49),this['activeUIs']=new Set(),this['_uis']=new Map(),this['_uisData']=new Map();}['init'](){const _0xb9ec94=this['context']['plugins']['get'](N);this['listenTo'](_0xb9ec94,'_activateAnnotation',(_0x507997,_0x4769a0)=>{for(const _0x14d7c4 of this['activeUIs']){const _0x207838=this['_uis']['get'](_0x14d7c4);(0x0,this['_uisData']['get'](_0x14d7c4)['filter'])(_0x4769a0)&&_0x207838['setActiveAnnotation'](_0x4769a0);}}),this['listenTo'](_0xb9ec94,'_deactivateAllAnnotations',()=>{for(const _0x44d0c1 of this['activeUIs']){this['_uis']['get'](_0x44d0c1)['setActiveAnnotation'](null);}}),this['listenTo'](_0xb9ec94['_visibleAnnotations'],'add',(_0x1e267b,_0x530555)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x530555);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4ec185){return this['activeUIs']['has'](_0x4ec185);}['activate'](_0x364ca5,_0x40c7e5=()=>!0x0){const _0xde4fdf=this['context']['plugins']['get'](N);if(!this['_uis']['has'](_0x364ca5))throw new _0x358429('annotationsuis-missing-ui',this,{'uiName':_0x364ca5});this['isActive'](_0x364ca5)&&this['deactivate'](_0x364ca5),this['activeUIs']['add'](_0x364ca5);const _0xa4d902=new x();!function({source:_0x16307c,target:_0x10fa9a,filter:_0x394be1}){for(const _0x4e5cfc of _0x16307c)_0x394be1(_0x4e5cfc)&&_0x10fa9a['add'](_0x4e5cfc);_0x10fa9a['listenTo'](_0x16307c,'add',(_0x15710e,_0xb4237d)=>{_0x394be1(_0xb4237d)&&_0x10fa9a['add'](_0xb4237d);}),_0x10fa9a['listenTo'](_0x16307c,'remove',(_0x5e52f1,_0x5920b4)=>{_0x10fa9a['has'](_0x5920b4)&&_0x10fa9a['remove'](_0x5920b4);});}({'source':_0xde4fdf['_visibleAnnotations'],'target':_0xa4d902,'filter':_0x40c7e5}),this['_uisData']['set'](_0x364ca5,{'collection':_0xa4d902,'filter':_0x40c7e5});const _0x5ab9a3=this['_uis']['get'](_0x364ca5);_0x5ab9a3['attach'](_0xa4d902),this['listenTo'](_0x5ab9a3,'change:activeAnnotation',(_0x5e205,_0x3c8368,_0x49c34d,_0xbaa96e)=>{_0xbaa96e&&_0xde4fdf['_removeActiveAnnotation'](_0xbaa96e),_0x49c34d&&_0xde4fdf['_addActiveAnnotation'](_0x49c34d);});}['deactivate'](_0x393388){if(this['activeUIs']['delete'](_0x393388),!this['_uis']['has'](_0x393388))throw new _0x358429('annotationsuis-missing-ui',this,{'uiName':_0x393388});const _0x497382=this['_uis']['get'](_0x393388);_0x497382['detach'](),this['stopListening'](_0x497382),this['_uisData']['get'](_0x393388)['collection']['destroy'](),this['_uisData']['delete'](_0x393388);}['switchTo'](_0x55b39f){if(!this['_uis']['has'](_0x55b39f))throw new _0x358429('annotationsuis-missing-ui',this,{'uiName':_0x55b39f});const _0x300e05=this['context']['plugins']['get'](N),_0x3c4fb4=Array['from'](_0x300e05['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x55b39f);const _0x2f52e2=this['_uis']['get'](_0x55b39f);_0x2f52e2['setActiveAnnotation'](_0x3c4fb4),_0x2f52e2['_setSelectedAnnotations']&&_0x3c4fb4&&_0x2f52e2['_setSelectedAnnotations']([_0x3c4fb4]);}['deactivateAll'](){for(const _0xabdcca of this['activeUIs'])this['deactivate'](_0xabdcca);}['register'](_0x25686c,_0x144dd7){if(this['_uis']['has'](_0x25686c))throw new _0x358429('annotationsuis-register-already-registered');if('function'!=typeof _0x144dd7['attach']||'function'!=typeof _0x144dd7['detach']||'function'!=typeof _0x144dd7['setActiveAnnotation'])throw new _0x358429('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x25686c,_0x144dd7);}['refilterAnnotations'](){const _0x32e32a=this['context']['plugins']['get'](N)['collection'],_0x58ec0a=new Map(),_0x1ae9cd=Array['from'](this['activeUIs']);for(const _0x4a795a of this['activeUIs']){const _0x16b81a=this['_uisData']['get'](_0x4a795a)['collection'];for(const _0xf7706e of _0x16b81a)_0x58ec0a['set'](_0xf7706e,_0x4a795a);}for(const _0x1f0a35 of _0x32e32a){const _0x4cceef=_0x58ec0a['get'](_0x1f0a35);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1f0a35);const _0x48870a=_0x1ae9cd['find'](_0x59f7b6=>this['_uisData']['get'](_0x59f7b6)['filter'](_0x1f0a35));_0x4cceef!==_0x48870a&&(_0x4cceef&&this['_uisData']['get'](_0x4cceef)['collection']['remove'](_0x1f0a35),_0x48870a&&this['_uisData']['get'](_0x48870a)['collection']['add'](_0x1f0a35));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x554161){const _0x12e8d1=[];for(const _0x21c38f of this['activeUIs']){(0x0,this['_uisData']['get'](_0x21c38f)['filter'])(_0x554161)&&_0x12e8d1['push'](_0x21c38f);}if(_0x12e8d1['length']>0x1)throw new _0x358429('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x12e8d1,'annotationType':_0x554161['type']});}}const ae=Ht('px');class V extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x5338e7){super(_0x5338e7);const _0x4c8827=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 _0x42b9d5(),this['focusCycler']=new Ft({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x4c8827['to']('class')],'style':{'minHeight':_0x4c8827['to']('minHeight',_0xc15697=>'number'==typeof _0xc15697?ae(_0xc15697+0xa):null)},'dir':_0x5338e7['uiLanguageDirection'],'role':'application','aria-label':S(_0x5338e7,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':S(_0x5338e7,'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',_0x9de1fc=>{this['_updateItemPositionInFocusables'](_0x9de1fc['source']);}),this['list']['forEach'](_0x25c64b=>{this['focusTracker']['add'](_0x25c64b['element']),this['_updateItemPositionInFocusables'](_0x25c64b);}),this['list']['on']('change',(_0x48b195,_0x2a81e7)=>{for(const _0x5b76b7 of _0x2a81e7['removed'])this['focusTracker']['remove'](_0x5b76b7['element']),this['focusables']['remove'](_0x5b76b7);for(const _0x71b9b1 of _0x2a81e7['added'])this['focusTracker']['add'](_0x71b9b1['element']),this['_updateItemPositionInFocusables'](_0x71b9b1);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x30ebb8){const _0x2692b8=this['focusables']['getIndex'](_0x30ebb8);let _0x41bd62,_0x3547b6;for(const _0x46c5f8 of this['focusables'])if(_0x30ebb8['top']<_0x46c5f8['top']){_0x41bd62=_0x46c5f8;break;}if(_0x3547b6=_0x41bd62?this['focusables']['getIndex'](_0x41bd62):this['focusables']['length'],-0x1!==_0x2692b8){if(_0x2692b8===_0x3547b6-0x1)return;this['focusables']['remove'](_0x30ebb8),_0x3547b6=_0x41bd62?this['focusables']['getIndex'](_0x41bd62):this['focusables']['length'];}this['focusables']['add'](_0x30ebb8,_0x3547b6);}}const qt=Ht('px');class H extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x375ba8){super(_0x375ba8),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x30b55d,_0x87e781)=>_0x30b55d+_0x87e781),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=Dt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x490112=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x490112['to']('isAnimationDisabled',_0x51224c=>_0x51224c?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x490112['to']('top',_0x24fe16=>qt(_0x24fe16))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x338fa1=this['element']['clientHeight'];_0x338fa1&&(this['height']=_0x338fa1);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x4fba92{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4fe29b){super(_0x4fe29b),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 _0x5d3f88=this['context']['config']['get']('sidebar.container');_0x5d3f88&&this['setContainer'](_0x5d3f88);}['setContainer'](_0x243b3f){if(!y(_0x243b3f))throw new _0x358429('sidebar-setcontainer-invalid-element');this['container']=_0x243b3f;}['_attachToContainer']({viewClass:_0x27eb94='',spaceBetweenItems:_0xda3203=0x19}={}){if(!y(this['container']))throw new _0x358429('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x27eb94,this['_spaceBetweenItems']=_0xda3203;}['rearrange']({removedAnnotation:_0x1f08ad,previousAnnotation:_0x32d79d,nextAnnotation:_0x246f99}){const _0x3fdd9c=this['getSidebarItemView'](_0x1f08ad);this['view']['list']['remove'](_0x3fdd9c),this['_destroySidebarItemView'](_0x1f08ad),_0x32d79d&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x32d79d)),_0x246f99&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x246f99)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x31afef,activatedAnnotation:_0x5848bd,disableAnimationOnActivatedAnnotation:_0x352016}){if(this['_activeAnnotation']=_0x5848bd,_0x31afef){_0x31afef['isActive']=!0x1;const _0x2ce01e=this['getSidebarItemView'](_0x31afef);_0x2ce01e&&_0x352016&&(_0x2ce01e['isAnimationDisabled']=!0x1);}if(_0x5848bd){const _0xc92178=this['getSidebarItemView'](_0x5848bd);_0xc92178&&(_0x5848bd['isActive']=!0x0,_0x352016&&(_0xc92178['isAnimationDisabled']=!0x0,_0xc92178['top']+=0x1),this['_alignToTargetRect'](_0xc92178));}}['_detachFromContainer'](_0x168bd6){if(this['view']['element']['remove'](),_0x168bd6){for(const _0x61d4b9 of _0x168bd6)this['_destroySidebarItemView'](_0x61d4b9);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x56b541,_0x2d5d46){_0x2d5d46||(_0x2d5d46=_0x56b541['view']);const _0x2d2bc6=new H(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x2d2bc6,_0x56b541),this['_annotationToSidebarItemView']['set'](_0x56b541,_0x2d2bc6),_0x2d2bc6['content']['add'](_0x2d5d46),this['listenTo'](_0x56b541['view'],'change:targetRect',(_0x2d4d59,_0x3f76e5,_0x8406b1)=>{const _0x3a2b58=this['_getTargetTop'](_0x56b541,_0x8406b1);_0x2d2bc6['_targetTop']!=_0x3a2b58&&(_0x2d2bc6['_targetTop']=_0x3a2b58,this['_setItemTop'](_0x2d2bc6,_0x3a2b58));}),this['listenTo'](_0x2d2bc6,'change:top',()=>{this['_recalculate'](_0x2d2bc6,'top');}),this['listenTo'](_0x2d2bc6,'change:bottom',()=>{this['_recalculate'](_0x2d2bc6,'bottom');}),this['_alignToTargetRect'](_0x2d2bc6);const _0x3005eb=this['_getItemBefore'](_0x2d2bc6);if(_0x3005eb)this['_alignAfterItem'](_0x3005eb,_0x2d2bc6)||this['_alignToTargetRect'](_0x2d2bc6);else this['_alignToTargetRect'](_0x2d2bc6);return this['_updateLastItem'](),this['view']['list']['add'](_0x2d2bc6),_0x2d2bc6;}['_alignForTopChange'](_0x26804a){if(!_0x26804a['content']['length'])return;const _0x1b6e42=this['_getItemBefore'](_0x26804a);if(!_0x1b6e42)return;const _0x21cc9a=this['_sidebarItemViewToAnnotation']['get'](_0x1b6e42),_0x4c6bc1=this['_activeAnnotation'];_0x4c6bc1&&_0x4c6bc1===_0x21cc9a?this['_alignAfterItem'](_0x1b6e42,_0x26804a):this['_alignBeforeItem'](_0x26804a,_0x1b6e42);}['_alignForBottomChange'](_0x4bcc48){if(!_0x4bcc48['content']['length'])return;const _0x2c9373=this['_getItemAfter'](_0x4bcc48);if(!_0x2c9373)return;const _0x11a062=this['_sidebarItemViewToAnnotation']['get'](_0x2c9373),_0x543f95=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x5e686c=this['_activeAnnotation'];_0x5e686c&&_0x5e686c===_0x11a062&&_0x543f95?(this['_alignBeforeItem'](_0x2c9373,_0x4bcc48),this['_alignAfterItem'](_0x4bcc48,_0x2c9373)):_0x5e686c&&_0x5e686c===_0x11a062?this['_alignBeforeItem'](_0x2c9373,_0x4bcc48):this['_alignAfterItem'](_0x4bcc48,_0x2c9373);}['_recalculate'](_0x1f9202,_0x3c5f47){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x31066e,changedProp:_0x247492}of this['_recalculateBuffer'])'top'===_0x247492?this['_alignForTopChange'](_0x31066e):this['_alignForBottomChange'](_0x31066e);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x1f9202,'changedProp':_0x3c5f47});}['getSidebarItemView'](_0x6345e){return this['_annotationToSidebarItemView']['get'](_0x6345e);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x457827){const _0xfc4a48=this['getSidebarItemView'](_0x457827);this['stopListening'](_0xfc4a48),this['stopListening'](_0x457827['view']),_0xfc4a48['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x457827),this['_sidebarItemViewToAnnotation']['delete'](_0xfc4a48);}['_createSidebarView'](){const _0x475927=new V(this['context']['locale']);return _0x475927['render'](),this['on']('change:_lastItem',(_0x2d37ef,_0x110812,_0x574286,_0x19521b)=>{_0x19521b&&_0x475927['unbind']('minHeight'),_0x574286?_0x475927['bind']('minHeight')['to'](_0x574286,'bottom'):_0x475927['minHeight']=null;}),_0x475927;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x4853aa){const _0x5787c6=this['_sidebarItemViewToAnnotation']['get'](_0x4853aa),_0x3106f6=_0x5787c6&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5787c6)-0x1);return _0x3106f6&&this['getSidebarItemView'](_0x3106f6)||null;}['_getItemAfter'](_0x263fd1){const _0x410bf5=this['_sidebarItemViewToAnnotation']['get'](_0x263fd1),_0x393509=_0x410bf5&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x410bf5)+0x1);return _0x393509&&this['getSidebarItemView'](_0x393509)||null;}['_alignBeforeItem'](_0xb288eb,_0xde21ce){_0xb288eb['updateHeight']();const _0x105ee7=R(_0xde21ce['bottom']+this['_spaceBetweenItems'],_0xb288eb['top']);return!!_0x105ee7&&(this['_setItemTop'](_0xde21ce,_0xde21ce['top']-_0x105ee7),!0x0);}['_alignAfterItem'](_0x5c43f3,_0x439c5c){_0x5c43f3['updateHeight']();const _0xb1cdda=R(_0x5c43f3['bottom']+this['_spaceBetweenItems'],_0x439c5c['top']);return!!_0xb1cdda&&(this['_setItemTop'](_0x439c5c,_0x439c5c['top']+_0xb1cdda,!0x1),!0x0);}['_alignToTargetRect'](_0x7e0816){const _0x575d3b=this['_sidebarItemViewToAnnotation']['get'](_0x7e0816);if(!_0x575d3b||!_0x575d3b['target']||!_0x575d3b['targetRect'])return;const _0x31a92b=this['_getTargetTop'](_0x575d3b,_0x575d3b['targetRect']);this['_setItemTop'](_0x7e0816,_0x31a92b);}['_getTargetTop'](_0x363672,_0x880150){if(null===_0x880150)return 0x0;if(_0x363672['target']instanceof _0x4c5767)return _0x880150['top'];{const _0x21a0b5=new _0x4c5767(this['view']['element'])['top'];return _0x880150['top']-_0x21a0b5;}}['_setItemTop'](_0x5bfce9,_0x23ea60,_0x4d45f1=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x4d45f1&&(_0x23ea60=Math['max'](_0x23ea60,this['_getMaxAvailableTop'](_0x5bfce9))),_0x5bfce9['top']=_0x23ea60;}['_getMaxAvailableTop'](_0x1da15a){let _0x4e5b1d=this['_getItemBefore'](_0x1da15a),_0x490f72=0x0;for(;_0x4e5b1d;)_0x4e5b1d['updateHeight'](),_0x490f72+=this['_spaceBetweenItems']+_0x4e5b1d['height'],_0x4e5b1d=this['_getItemBefore'](_0x4e5b1d);return _0x490f72;}}function R(_0xdd3775,_0x42057b){return Math['max'](_0xdd3775-_0x42057b,0x0);}function y(_0x5a20f8){return null!==_0x5a20f8&&'object'==typeof _0x5a20f8&&0x1===_0x5a20f8['nodeType'];}class e extends _0x4fba92{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f40fb){super(_0x4f40fb),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x3a2226(),this['_refreshPositioningDebounced']=_0x4da05a(()=>{this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x3557bd=this['context']['plugins']['get'](M),_0x45170e=this['context']['plugins']['get'](z);_0x3557bd['register']('wideSidebar',this),_0x45170e['container']&&_0x3557bd['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x5af688){if(_0x5af688===this['activeAnnotation'])return;const _0x5cbc10=this['context']['plugins']['get'](z);_0x5cbc10['_activeAnnotation']=_0x5af688;const _0x4eea5d=this['activeAnnotation'];this['activeAnnotation']=_0x5af688,_0x5cbc10['refresh']({'blurredAnnotation':_0x4eea5d,'activatedAnnotation':this['activeAnnotation']});}['attach'](_0x48212e){this['annotations']=_0x48212e;const _0xfcd469=this['context']['plugins']['get'](z);if(_0xfcd469['_annotations']=_0x48212e,this['isAttached'])throw new _0x358429('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0xfcd469,'set:container',()=>{this['detach'](),this['listenTo'](_0xfcd469,'change:container',_0xcbaa0a=>{_0xcbaa0a['off'](),this['attach'](_0x48212e);});}),_0xfcd469['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x20f2ef=_0x3543f4=>{_0x3543f4['updateTargetRect'](),_0xfcd469['addAnnotation'](_0x3543f4);};for(const _0x520622 of _0x48212e)_0x20f2ef(_0x520622);this['listenTo'](_0x48212e,'add',(_0x86a086,_0x4171f6)=>{_0x20f2ef(_0x4171f6);}),this['listenTo'](_0x48212e,'remove',(_0x364451,_0x1616df,_0x425253)=>{_0xfcd469['rearrange']({'removedAnnotation':_0x1616df,'previousAnnotation':_0x48212e['get'](_0x425253-0x1),'nextAnnotation':_0x48212e['get'](_0x425253+0x1)}),_0x1616df===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x48212e,'focus',(_0x2f4da7,_0x4cda99)=>{this['setActiveAnnotation'](_0x4cda99);}),this['listenTo'](_0x48212e,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5373b7=this['context']instanceof _0x17bfab?this['context']['editors']:new _0x3a2226([this['context']]);for(const _0x4bade8 of _0x5373b7)this['_integrateWithEditorAnnotations'](_0x4bade8);this['listenTo'](_0x5373b7,'add',(_0x1b15a9,_0x431ef9)=>{this['listenTo'](_0x431ef9,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x431ef9);});}),this['listenTo'](_0x5373b7,'remove',(_0x23c0a2,_0x4b10d0)=>{_0x4b10d0['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4b10d0['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x358429('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x5dc6bf=this['context']['plugins']['get'](z);_0x5dc6bf['_detachFromContainer'](this['annotations']),this['stopListening'](_0x5dc6bf),this['stopListening'](this['annotations']),this['context']instanceof _0x17bfab&&this['stopListening'](this['context']['editors']);for(const _0x5a2fd4 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x5a2fd4);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x41056f){if(!_0x41056f['plugins']['has']('EditorAnnotations'))return;const _0x286cdd=_0x41056f['plugins']['get']('EditorAnnotations'),_0x315fee=()=>{const _0x26e104=_0x286cdd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x26e104[0x0]||null);};this['listenTo'](_0x286cdd,'refresh',_0x315fee),this['listenTo'](_0x286cdd,'blur',(_0xc654b8,{isAnnotationTracked:_0x1cf23d})=>{this['activeAnnotation']&&_0x1cf23d(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x286cdd,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x4742f=>{_0x286cdd['hasDomSelection']()&&(_0x315fee(),_0x4742f['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x286cdd);}['_destroyEditorAnnotationsIntegration'](_0x1d0101){this['stopListening'](_0x1d0101),this['_editorAnnotations']['remove'](_0x1d0101);}}class D extends _0xaf61aa{['counterView'];constructor(_0x59c647){super(_0x59c647);const _0x1eaf4d=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4761d5,_0x2d203b)=>_0x4761d5?'...':_0x2d203b['toString']()),this['set']('annotationType',''),this['icon']=xt,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1eaf4d['to']('annotationType',_0x4846cf=>'ck-annotation-counter__badge--'+_0x4846cf),_0x1eaf4d['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1eaf4d['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x4fba92{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,M];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x416871){super(_0x416871),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=Object['create'](_0x92e931),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x3a2226(),this['_refreshPositioningDebounced']=_0x4da05a(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](M)['register']('narrowSidebar',this),this['bodyCollection']=new _0x578c2b(this['context']['locale']),this['balloonPanelView']=new _0x4336a9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x1a324a){this['annotations']=_0x1a324a;const _0x4accd0=this['context']['plugins']['get'](z),_0x2fcb27=this['balloonPanelView'];if(_0x4accd0['_annotations']=_0x1a324a,this['isAttached'])throw new _0x358429('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x4accd0,'set:container',()=>{this['detach'](),this['listenTo'](_0x4accd0,'change:container',_0x40f1a4=>{_0x40f1a4['off'](),this['attach'](_0x1a324a);});}),_0x4accd0['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x11bdd6=_0x39f583=>{const _0x59addb=new D(this['context']['locale']);_0x4accd0['addAnnotation'](_0x39f583,_0x59addb),this['_annotationToNarrowView']['set'](_0x39f583,_0x59addb),_0x59addb['bind']('isDirty','annotationType','number')['to'](_0x39f583['view'],'isDirty','type','length'),_0x59addb['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x2fcb27['content']['first']!==_0x39f583['view']?(this['_showBalloon'](_0x39f583),_0x39f583['view']['element']['focus'](),this['setActiveAnnotation'](_0x39f583)):this['setActiveAnnotation'](null);});};for(const _0x13db8b of _0x1a324a)_0x11bdd6(_0x13db8b);this['listenTo'](_0x1a324a,'add',(_0x216e04,_0x5d7fd4)=>{_0x11bdd6(_0x5d7fd4);}),this['listenTo'](_0x1a324a,'remove',(_0x1d2c19,_0x56d14c,_0x33ef14)=>{this['_annotationToNarrowView']['get'](_0x56d14c)['destroy'](),this['_annotationToNarrowView']['delete'](_0x56d14c),_0x4accd0['rearrange']({'removedAnnotation':_0x56d14c,'previousAnnotation':_0x1a324a['get'](_0x33ef14-0x1),'nextAnnotation':_0x1a324a['get'](_0x33ef14+0x1)}),_0x56d14c===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x1a324a,'focus',(_0x2e67d9,_0x4be5f3)=>{this['setActiveAnnotation'](_0x4be5f3);}),this['listenTo'](_0x1a324a,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x471717,_0x4d5ed0)=>{_0x4d5ed0['keyCode']===_0x2aed5e['esc']&&_0x2fcb27['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x2fcb27['content']['first']),this['_hideBalloon'](),_0x4d5ed0['stopPropagation'](),_0x4d5ed0['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x5dd12d,_0x320ccb)=>{const _0xa3e0bd=_0x320ccb['target'];_0x2fcb27['isVisible']&&_0x2fcb27['element']['contains'](_0xa3e0bd)||_0x4accd0['view']['element']['contains'](_0xa3e0bd)||_0x5dd12d['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x562410=>_0x562410['contains'](_0xa3e0bd))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x1cfffb=this['context']instanceof _0x17bfab?this['context']['editors']:new _0x3a2226([this['context']]);for(const _0x2f23a5 of _0x1cfffb)this['_integrateWithEditorAnnotations'](_0x2f23a5);this['listenTo'](_0x1cfffb,'add',(_0xb6ffca,_0x164017)=>{this['listenTo'](_0x164017,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x164017);});}),this['listenTo'](_0x1cfffb,'remove',(_0x4b7cd3,_0x4d8130)=>{_0x4d8130['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x4d8130['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x16eb02){if(_0x16eb02===this['activeAnnotation'])return;const _0x38ace8=this['context']['plugins']['get'](z);if(_0x38ace8['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x16eb02,'disableAnimationOnActivatedAnnotation':!0x0}),_0x16eb02)_0x38ace8['getSidebarItemView'](_0x16eb02)?this['_showBalloon'](_0x16eb02):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x16eb02;}['detach'](){if(!this['isAttached'])throw new _0x358429('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x10cb14=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x5b6074=>_0x5b6074['destroy']()),this['_annotationToNarrowView']['clear'](),_0x10cb14['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x17bfab&&this['stopListening'](this['context']['editors']);for(const _0x7ca945 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x7ca945);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'](_0x53b583){if(!_0x53b583['plugins']['has']('EditorAnnotations'))return;const _0x331caa=_0x53b583['plugins']['get']('EditorAnnotations'),_0x5e15d3=this['context']['plugins']['get'](z),_0x3a94d9=this['annotations'],_0x1938b5=this['balloonPanelView'],_0x6f1f3b=()=>{const _0xd06569=_0x331caa['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0xd06569),this['setActiveAnnotation'](_0xd06569[0x0]||null);};this['listenTo'](_0x331caa,'refresh',_0x6f1f3b),this['listenTo'](_0x331caa,'blur',(_0x200c69,{isAnnotationTracked:_0x2c2a34})=>{this['activeAnnotation']&&_0x2c2a34(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x331caa,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3a94d9,'blur',_0x410eaf=>{_0x331caa['hasDomSelection']()&&_0x410eaf['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x5164fa,_0x415235)=>{const _0x3c25f8=_0x415235['target'];_0x1938b5['isVisible']&&_0x1938b5['element']['contains'](_0x3c25f8)||_0x5e15d3['view']['element']['contains'](_0x3c25f8)||this['activeAnnotation']&&_0x331caa['hasDomSelection']()&&(_0x6f1f3b(),_0x5164fa['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x331caa);}['_destroyEditorAnnotationsIntegration'](_0x16da65){_0x16da65&&(this['stopListening'](_0x16da65),this['_editorAnnotations']['remove'](_0x16da65));}['_setSelectedAnnotations'](_0x11deba){for(const _0x1dc7f6 of this['_selectedAnnotations'])_0x11deba['includes'](_0x1dc7f6)||this['_manuallyClosedAnnotationViews']['delete'](_0x1dc7f6['view']);this['_selectedAnnotations']=_0x11deba;}['_refreshPositioning'](){const _0x110147=this['balloonPanelView'];this['annotations']['refreshPositioning'](),_0x110147['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x5bc55b){if(this['_manuallyClosedAnnotationViews']['has'](_0x5bc55b['view']))return;const _0x8d76cd=this['balloonPanelView']['content']['first'];_0x8d76cd!==_0x5bc55b['view']?(_0x8d76cd&&this['_detachListeners'](_0x8d76cd),this['_attachListeners'](_0x5bc55b['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x5bc55b['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x4e55d7=this['balloonPanelView']['content']['first'],_0x3457c5=_0x4e55d7&&this['annotations']['getByView'](_0x4e55d7);if(!_0x3457c5||!this['_annotationToNarrowView']['has'](_0x3457c5))return;const _0x1a7ae3=this['_annotationToNarrowView']['get'](_0x3457c5)['element'],_0x131c37=(function(){const _0x50803f=_0x4336a9['defaultPositions'];return[_0x50803f['southArrowNorthEast'],_0x50803f['northArrowSouthEast'],_0x50803f['southArrowNorth'],_0x50803f['northArrowSouth'],_0x50803f['southArrowNorthWest'],_0x50803f['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x1a7ae3,'positions':_0x131c37});}['_hideBalloon'](){const _0x3bc01c=this['balloonPanelView'],_0x3ddddc=_0x3bc01c['content']['first'];_0x3ddddc&&(this['_detachListeners'](_0x3ddddc),_0x3bc01c['unpin'](),_0x3bc01c['content']['clear']());}['_attachListeners'](_0x5721f8){this['listenTo'](_0x5721f8,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x5721f8,'Esc',(_0x227e52,_0x13e2c8)=>{this['_manuallyClosedAnnotationViews']['add'](_0x5721f8),this['_hideBalloon'](),_0x13e2c8();});}['_detachListeners'](_0xd6cf16){this['stopListening'](_0xd6cf16);}}class c extends _0x44cf24{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];static get['requires'](){return[P,_0x130aae,M];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x370be7){super(_0x370be7),_0x370be7['editing']['view']['addObserver'](_0xce54ba),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x370be7['plugins']['get'](_0x130aae),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1;}['init'](){const _0x13ffd8=this['editor']['plugins']['get'](M);_0x13ffd8['context']===this['editor']&&(_0x13ffd8['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x408210,_0x55e3e1)=>{const _0x5c1506=this['_balloon'];if(this['isAttached']&&_0x5c1506['visibleView']){const _0x3e6786=this['annotations']['getByView'](_0x5c1506['visibleView']);_0x3e6786&&this['_closeAnnotation'](_0x3e6786),_0x55e3e1();}}));}['afterInit'](){const _0x994ec8=this['editor']['plugins']['get'](M);_0x994ec8['context']===this['editor']&&(_0x994ec8['hasActive']()||_0x994ec8['switchTo']('inline'));}['setActiveAnnotation'](_0x4a8faf){_0x4a8faf!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x4a8faf&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x4a8faf)&&this['_addAnnotationToBalloon'](_0x4a8faf,!0x0),_0x4a8faf['isActive']=!0x0),_0x4a8faf||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x4a8faf);}['attach'](_0x1e5b4e){this['annotations']=_0x1e5b4e;const _0x2921d0=this['editor']['plugins']['get'](M),_0x136d8b=this['_balloon'];if(this['isAttached'])throw new _0x358429('inlineannotations-attach-already-attached',this);if(_0x2921d0['context']!==this['editor'])throw new _0x358429('inlineannotations-not-allowed-with-context',this);const _0x5a6710=this['editor']['plugins']['get'](P);this['listenTo'](_0x5a6710,'refresh',()=>{const _0x2dfada=_0x5a6710['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x4a6e0c,_0x2ea2f8;!this['_forceRefresh']&&(_0x4a6e0c=_0x2dfada,_0x2ea2f8=this['_selectedAnnotations'],_0x4a6e0c['length']===_0x2ea2f8['length']&&_0x4a6e0c['every'](_0x5664c9=>_0x2ea2f8['includes'](_0x5664c9)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x2dfada),this['setActiveAnnotation'](_0x2dfada[0x0]||null));}),this['listenTo'](_0x5a6710,'blur',(_0x3b5119,{isAnnotationTracked:_0xad19e6})=>{this['activeAnnotation']&&_0xad19e6(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x566500,_0x4487e8,_0x108c14)=>{_0x108c14||this['setActiveAnnotation'](null);}),this['listenTo'](_0x1e5b4e,'remove',(_0x3f5619,_0x197517)=>{this['_removeAnnotationFromBalloon'](_0x197517),_0x197517===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x136d8b,'change:visibleView',(_0x37d415,_0x25bf2f,_0x19eb01,_0x43bcc0)=>{_0x43bcc0&&this['stopListening'](_0x43bcc0);const _0x1b822b=_0x1e5b4e['getByView'](_0x19eb01);_0x19eb01&&_0x1b822b&&(this['listenTo'](_0x19eb01,'change:height',()=>{_0x136d8b['updatePosition']();}),this['listenTo'](_0x19eb01,'Esc',()=>{this['_closeAnnotation'](_0x1b822b),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x1b822b&&this['setActiveAnnotation'](_0x1b822b));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x136d8b['visibleView']&&(_0x1e5b4e['getByView'](_0x136d8b['visibleView'])&&_0x136d8b['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 _0x358429('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x22859e of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x22859e);this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_setSelectedAnnotations'](_0x59c8ce){for(const _0x254c8d of this['_selectedAnnotations'])_0x59c8ce['includes'](_0x254c8d)||this['_manuallyClosed']['delete'](_0x254c8d);for(const _0x5849a6 of this['annotations'])_0x59c8ce['includes'](_0x5849a6)||this['_removeAnnotationFromBalloon'](_0x5849a6);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x4e350e of _0x59c8ce)this['_addAnnotationToBalloon'](_0x4e350e);}this['_selectedAnnotations']=_0x59c8ce;}['_addAnnotationToBalloon'](_0x2d505f,_0x1c1748=!0x1){this['_manuallyClosed']['has'](_0x2d505f)||(this['_addedAnnotations']['has'](_0x2d505f)||this['_balloon']['hasView'](_0x2d505f['view'])||(this['_addedAnnotations']['add'](_0x2d505f),this['_balloon']['add']({'stackId':_0x2d505f['view']['id'],'view':_0x2d505f['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x2d505f)}})),_0x1c1748&&this['_balloon']['showStack'](_0x2d505f['view']['id']));}['_getBalloonTargetForAnnotation'](_0x339003){const _0x4365bd=_0x339003['target'],_0x4ff380=this['editor']['editing']['view'],_0x495314=_0x4ff380['document']['selection']['getFirstRange'](),_0x1dbd9d=_0x4ff380['domConverter']['viewRangeToDom'](_0x495314);if(_0x1dbd9d['collapse'](!0x0),_0x4365bd){if(_0x4365bd instanceof _0x4c5767)return _0x4365bd;let _0x56df88=[];for(const _0x447990 of _0x4365bd)_0x56df88['push'](...(_0x2053bd=_0x447990['getClientRects'](),Array['from'](_0x2053bd)['map'](DOMRect['fromRect'])));_0x56df88=function(_0x450728){const _0x13328d=[];let _0x1f1510=_0x450728[0x0];for(let _0xf08a88=0x1;_0xf08a88<_0x450728['length'];_0xf08a88++)b(_0x1f1510,_0x450728[_0xf08a88])?_0x1f1510['width']+=_0x450728[_0xf08a88]['width']:(_0x13328d['push'](_0x1f1510),_0x1f1510=_0x450728[_0xf08a88]);return _0x13328d['push'](_0x1f1510),_0x13328d;}(_0x56df88);const _0x3713fd=_0x1dbd9d['getBoundingClientRect']();return _0x56df88['find'](_0x7e6589=>_0x7e6589['top']<=_0x3713fd['top']&&_0x7e6589['bottom']>=_0x3713fd['bottom']&&_0x7e6589['left']<=_0x3713fd['left']&&_0x7e6589['right']>=_0x3713fd['right'])||_0x56df88[0x0];}var _0x2053bd;return _0x339003['targetRect']||_0x1dbd9d;}['_removeAnnotationFromBalloon'](_0x5e1b6f){this['_addedAnnotations']['has'](_0x5e1b6f)&&this['_balloon']['hasView'](_0x5e1b6f['view'])&&(this['_addedAnnotations']['delete'](_0x5e1b6f),this['_balloon']['remove'](_0x5e1b6f['view']));}['_closeAnnotation'](_0x4d77c3){this['_manuallyClosed']['add'](_0x4d77c3),this['_removeAnnotationFromBalloon'](_0x4d77c3);}}function b(_0x5c2a8b,_0x22deac){return _0x5c2a8b['top']===_0x22deac['top']&&_0x5c2a8b['bottom']===_0x22deac['bottom']&&_0x5c2a8b['right']===_0x22deac['left'];}var Z='<!--\x0a\x0a\x20What\x20you\x27re\x20currently\x20looking\x20at\x20is\x20the\x20source\x20code\x20of\x20a\x20legally\x20protected,\x20proprietary\x20software.\x0a\x20CKEditor\x205\x20Collaboration\x20is\x20licensed\x20under\x20a\x20commercial\x20license\x20and\x20protected\x20by\x20copyright\x20law.\x20Where\x20not\x20otherwise\x20indicated,\x0a\x20all\x20CKEditor\x205\x20Collaboration\x20content\x20is\x20authored\x20by\x20CKSource\x20engineers\x20and\x20consists\x20of\x20CKSource-owned\x20intellectual\x20property.\x0a\x0a\x20Copyright\x20(c)\x202003-2024,\x20CKSource\x20Holding\x20sp.\x20z\x20o.o.\x20All\x20rights\x20reserved.\x0a\x0a!-->\x0a\x0a<svg\x20viewBox=\x220\x200\x2020\x2020\x22\x20xmlns=\x22http://www.w3.org/2000/svg\x22><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M14\x203.5A3.5\x203.5\x200\x200\x201\x2017.5\x207v6l-.005.192a3.501\x203.501\x200\x200\x201-2.927\x203.262l-.062.008v1.813a1.5\x201.5\x200\x200\x201-2.193\x201.33l-.37-.193-.38-.212a13.452\x2013.452\x200\x200\x201-3.272-2.63l-.062-.07-4.729-.046a3.5\x203.5\x200\x200\x201-3.5-3.5v-6a3.5\x203.5\x200\x200\x201\x203.5-3.5L14\x203.5ZM3.5\x204.954a2\x202\x200\x200\x200-2\x202v6a2\x202\x200\x200\x200\x202\x202L8.924\x2015a11.917\x2011.917\x200\x200\x200\x203.71\x203.081l.372.194v-3.268L12.962\x2015H14a2\x202\x200\x200\x200\x202-2V7a2\x202\x200\x200\x200-2-2L3.5\x204.954Z\x22/><path\x20d=\x22M16.5.5h-10a3.5\x203.5\x200\x200\x200-3.162\x202h1.84A2\x202\x200\x200\x201\x206.5\x202h10a2\x202\x200\x200\x201\x202\x202v8.873a3.502\x203.502\x200\x200\x200\x201.495-2.681L20\x2010V4A3.5\x203.5\x200\x200\x200\x2016.5.5Z\x22/><path\x20clip-rule=\x22evenodd\x22\x20d=\x22M12.013\x207.453a.75.75\x200\x200\x201\x20.034\x201.06l-3.75\x204a.75.75\x200\x200\x201-1.045.048l-2.25-2a.75.75\x200\x200\x201\x20.996-1.122l1.704\x201.515\x203.25-3.467a.75.75\x200\x200\x201\x201.061-.034Z\x22/></svg>\x0a';class tt extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x4acc2f,_0x277607){super(_0x4acc2f),this['set']('isEmpty',!_0x277607['length']),this['focusTracker']=new _0x42b9d5(),this['_annotationViews']=_0x277607,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new Ft({'focusables':_0x277607,'focusTracker':this['focusTracker']}),this['listenTo'](_0x277607,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x277607,'remove',(_0x3eb575,_0x328d39)=>{_0x328d39['isActive']&&this['focus'](),_0x277607['length']||(this['isEmpty']=!0x0);});const _0x3587cd=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':S(_0x4acc2f,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x277607},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x3587cd['if']('isEmpty','ck-hidden',_0x108ca6=>!_0x108ca6)]},'children':[{'text':S(_0x4acc2f,'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 _0x40e8e7 of this['_annotationViews'])this['focusTracker']['add'](_0x40e8e7['element']);this['_annotationViews']['on']('change',(_0x5a1a80,{added:_0x3ae285,removed:_0x5467c4})=>{for(const _0x23b20d of _0x3ae285)this['focusTracker']['add'](_0x23b20d['element']);for(const _0x30b549 of _0x5467c4)this['focusTracker']['remove'](_0x30b549['element']);});}}class f extends _0x4fba92{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,N];}constructor(_0x2b0966){super(_0x2b0966),this['archivedThreads']=new _0x3a2226();}['init'](){const _0x458538=this['context'],_0x40a43c=_0x458538['plugins']['get'](o),_0x4890cd=_0x458538['plugins']['get'](N);this['listenTo'](_0x40a43c,'addCommentThread',(_0x23c72e,{threadId:_0x29fbc1})=>{const _0x2236e6=_0x40a43c['getCommentThread'](_0x29fbc1);_0x2236e6['archivedAt']&&this['archivedThreads']['add'](_0x2236e6,this['_calculatePosition'](_0x2236e6['archivedAt'])),this['listenTo'](_0x2236e6,'change:archivedAt',(_0x2c684f,_0x2da555,_0x5c85c2)=>{_0x5c85c2?this['archivedThreads']['has'](_0x2236e6)||this['archivedThreads']['add'](_0x2236e6,this['_calculatePosition'](_0x2236e6['archivedAt'])):this['archivedThreads']['has'](_0x2236e6)&&this['archivedThreads']['remove'](_0x2236e6);});}),this['listenTo'](_0x40a43c,'removeCommentThread',(_0x340c78,{threadId:_0x59f3da})=>{const _0x15c8cb=_0x40a43c['getCommentThread'](_0x59f3da);this['stopListening'](_0x15c8cb),this['archivedThreads']['has'](_0x15c8cb)&&this['archivedThreads']['remove'](_0x15c8cb);},{'priority':'highest'}),this['listenTo'](_0x4890cd['collection'],'focus',(_0x38deca,_0x471002)=>{_0x471002['isVisible']||(_0x471002['isActive']=!0x0,_0x4890cd['activate'](_0x471002));});}['_calculatePosition'](_0x4223cf){const _0x48b9b9=[...this['archivedThreads']]['findIndex'](_0x1c4dc6=>_0x1c4dc6['archivedAt']<_0x4223cf);return _0x48b9b9>-0x1?_0x48b9b9:this['archivedThreads']['length'];}}class a extends _0x44cf24{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[f,_0xd8596e];}constructor(_0x11f6bc){super(_0x11f6bc),this['annotationViews']=new _0xabf670(),this['_pendingThreads']=[];}['init'](){const _0x1b1116=this['editor'],_0x510871=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x1b1116['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0xaf61aa,!0x0)),_0x1b1116['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x3b3cf0=this['_createCommentsArchiveButton'](_0x5a2278);return _0x3b3cf0['set']({'role':'menuitemcheckbox'}),_0x3b3cf0;});const _0x385265=_0x1b1116['plugins']['get'](f),_0x515be2=_0x1b1116['plugins']['get']('Annotations'),_0x2ac1e7=_0x1b1116['plugins']['get']('CommentsRepository');this['listenTo'](_0x385265['archivedThreads'],'add',(_0x41cfb6,_0x45bd49)=>{const _0x6f758c=_0x1b1116['config']['get']('collaboration.channelId');if(!_0x6f758c||_0x45bd49['channelId']===_0x6f758c){const _0x3b7bfe=_0x2ac1e7['_threadToController']['get'](_0x45bd49);if(!_0x3b7bfe)return void this['_pendingThreads']['push'](_0x45bd49);const _0x2b2546=this['_calculatePosition'](_0x45bd49['archivedAt']),_0x9789ec=_0x515be2['getByInnerView'](_0x3b7bfe['view']);_0x9789ec['isVisible']&&_0x515be2['_visibleAnnotations']['remove'](_0x9789ec),this['annotationViews']['add'](_0x9789ec['view'],_0x2b2546);}}),this['listenTo'](_0x515be2['collection'],'add',(_0x433c17,_0x327159)=>{const _0x300b64=this['_pendingThreads']['find'](_0x5441f9=>{const _0x940dab=_0x2ac1e7['_threadToController']['get'](_0x5441f9);return _0x940dab&&_0x327159['innerView']===_0x940dab['view'];});if(_0x300b64){const _0x3f5df7=this['_calculatePosition'](_0x300b64['archivedAt']);this['annotationViews']['add'](_0x327159['view'],_0x3f5df7),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x300b64),0x1);}}),this['listenTo'](_0x385265['archivedThreads'],'remove',(_0x35265b,_0x44013d)=>{const _0xc639ef=_0x1b1116['config']['get']('collaboration.channelId');if(!_0xc639ef||_0x44013d['channelId']===_0xc639ef){const _0x3f02c1=_0x2ac1e7['_threadToController']['get'](_0x44013d),_0x46054e=_0x515be2['getByInnerView'](_0x3f02c1['view']);this['annotationViews']['remove'](_0x46054e['view']),this['stopListening'](_0x46054e['focusableElements']);}}),this['listenTo'](_0x515be2['collection'],'add',(_0x41ee1e,_0x528e91)=>{this['listenTo'](_0x528e91,'escape',_0x510871);}),this['listenTo'](_0x515be2['collection'],'remove',(_0x4e4d99,_0x260600)=>{this['stopListening'](_0x260600,'escape',_0x510871);});}['_calculatePosition'](_0x515f89){const _0xc02a0f=this['editor']['config']['get']('collaboration.channelId'),_0x732e04=[...this['editor']['plugins']['get'](f)['archivedThreads']]['filter'](_0x360ac0=>_0x360ac0['channelId']===_0xc02a0f)['findIndex'](_0x54b9be=>_0x54b9be['archivedAt']<_0x515f89);return _0x732e04<0x0||_0x732e04>this['annotationViews']['length']?this['annotationViews']['length']:_0x732e04-0x1;}['_toggleDialog'](){const _0x493431=this['editor'],_0x5e6cab=_0x493431['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new tt(_0x493431['locale'],this['annotationViews'])),'commentsArchive'===_0x5e6cab['id']?_0x5e6cab['hide']():_0x5e6cab['show']({'id':'commentsArchive','title':S(_0x493431['locale'],'COMMENTS_ARCHIVE'),'icon':Z,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x52df4d['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x46b9ae,_0x18c4fa=!0x1){const _0x4afd9c=this['editor']['locale'],_0x18e6d0=this['editor']['plugins']['get']('Dialog'),_0x52c4ab=new _0x46b9ae(_0x4afd9c);return _0x52c4ab['bind']('isEnabled')['to'](this,'isEnabled'),_0x52c4ab['bind']('isOn')['to'](_0x18e6d0,'id',_0x29f640=>'commentsArchive'===_0x29f640),_0x52c4ab['set']({'label':S(_0x4afd9c,'COMMENTS_ARCHIVE'),'icon':Z,'isToggleable':!0x0}),_0x18c4fa&&(_0x52c4ab['tooltip']=!0x0),this['listenTo'](_0x52c4ab,'execute',()=>this['_toggleDialog']()),_0x52c4ab;}['_hideDialogOnAnnotationEscape']=_0x152d1e=>{const _0x5e34be=_0x152d1e['source'];if(!this['annotationViews']['has'](_0x5e34be['view']))return;const _0x3d8eb9=this['editor']['plugins']['get']('Dialog');_0x3d8eb9['isOpen']&&'commentsArchive'===_0x3d8eb9['id']&&(_0x3d8eb9['hide'](),_0x152d1e['stop']());};}class p extends _0x44cf24{static get['requires'](){return[o,r,i,f,a,s,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{d as Annotation,x as AnnotationCollection,T as AnnotationView,N as Annotations,M as AnnotationsUIs,ss as BaseCommentThreadView,os as BaseCommentView,re as Comment,oe as CommentThread,yt as CommentThreadController,ie as CommentThreadInputView,Ct as CommentThreadView,vt as CommentView,p as Comments,f as CommentsArchive,a as CommentsArchiveUI,te as CommentsListView,s as CommentsOnly,o as CommentsRepository,i as CommentsUI,P as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,e as WideSidebar};
|