@ckeditor/ckeditor5-comments 47.5.0-alpha.6 → 47.5.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/build/comments.js +1 -1
- package/dist/index.js +11 -11
- package/dist/translations/af.js +1 -1
- package/dist/translations/af.umd.js +1 -1
- package/dist/translations/ar.js +1 -1
- package/dist/translations/ar.umd.js +1 -1
- package/dist/translations/ast.js +1 -1
- package/dist/translations/ast.umd.js +1 -1
- package/dist/translations/az.js +1 -1
- package/dist/translations/az.umd.js +1 -1
- package/dist/translations/be.js +1 -1
- package/dist/translations/be.umd.js +1 -1
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bg.umd.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/bn.umd.js +1 -1
- package/dist/translations/bs.js +1 -1
- package/dist/translations/bs.umd.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/ca.umd.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/cs.umd.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/da.umd.js +1 -1
- package/dist/translations/de-ch.js +1 -1
- package/dist/translations/de-ch.umd.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/de.umd.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/el.umd.js +1 -1
- package/dist/translations/en-au.js +1 -1
- package/dist/translations/en-au.umd.js +1 -1
- package/dist/translations/en-gb.js +1 -1
- package/dist/translations/en-gb.umd.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/en.umd.js +1 -1
- package/dist/translations/eo.js +1 -1
- package/dist/translations/eo.umd.js +1 -1
- package/dist/translations/es-co.js +1 -1
- package/dist/translations/es-co.umd.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/es.umd.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/et.umd.js +1 -1
- package/dist/translations/eu.js +1 -1
- package/dist/translations/eu.umd.js +1 -1
- package/dist/translations/fa.js +1 -1
- package/dist/translations/fa.umd.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fi.umd.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/fr.umd.js +1 -1
- package/dist/translations/gl.js +1 -1
- package/dist/translations/gl.umd.js +1 -1
- package/dist/translations/gu.js +1 -1
- package/dist/translations/gu.umd.js +1 -1
- package/dist/translations/he.js +1 -1
- package/dist/translations/he.umd.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hi.umd.js +1 -1
- package/dist/translations/hr.js +1 -1
- package/dist/translations/hr.umd.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/hu.umd.js +1 -1
- package/dist/translations/hy.js +1 -1
- package/dist/translations/hy.umd.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/id.umd.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/it.umd.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ja.umd.js +1 -1
- package/dist/translations/jv.js +1 -1
- package/dist/translations/jv.umd.js +1 -1
- package/dist/translations/kk.js +1 -1
- package/dist/translations/kk.umd.js +1 -1
- package/dist/translations/km.js +1 -1
- package/dist/translations/km.umd.js +1 -1
- package/dist/translations/kn.js +1 -1
- package/dist/translations/kn.umd.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/ko.umd.js +1 -1
- package/dist/translations/ku.js +1 -1
- package/dist/translations/ku.umd.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/lt.umd.js +1 -1
- package/dist/translations/lv.js +1 -1
- package/dist/translations/lv.umd.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/ms.umd.js +1 -1
- package/dist/translations/nb.js +1 -1
- package/dist/translations/nb.umd.js +1 -1
- package/dist/translations/ne.js +1 -1
- package/dist/translations/ne.umd.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/nl.umd.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/no.umd.js +1 -1
- package/dist/translations/oc.js +1 -1
- package/dist/translations/oc.umd.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pl.umd.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt-br.umd.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/pt.umd.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ro.umd.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/ru.umd.js +1 -1
- package/dist/translations/si.js +1 -1
- package/dist/translations/si.umd.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sk.umd.js +1 -1
- package/dist/translations/sl.js +1 -1
- package/dist/translations/sl.umd.js +1 -1
- package/dist/translations/sq.js +1 -1
- package/dist/translations/sq.umd.js +1 -1
- package/dist/translations/sr-latn.js +1 -1
- package/dist/translations/sr-latn.umd.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sr.umd.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/sv.umd.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/th.umd.js +1 -1
- package/dist/translations/ti.js +1 -1
- package/dist/translations/ti.umd.js +1 -1
- package/dist/translations/tk.js +1 -1
- package/dist/translations/tk.umd.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/tr.umd.js +1 -1
- package/dist/translations/tt.js +1 -1
- package/dist/translations/tt.umd.js +1 -1
- package/dist/translations/ug.js +1 -1
- package/dist/translations/ug.umd.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/uk.umd.js +1 -1
- package/dist/translations/ur.js +1 -1
- package/dist/translations/ur.umd.js +1 -1
- package/dist/translations/uz.js +1 -1
- package/dist/translations/uz.umd.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/vi.umd.js +1 -1
- package/dist/translations/zh-cn.js +1 -1
- package/dist/translations/zh-cn.umd.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/translations/zh.umd.js +1 -1
- package/package.json +19 -19
- package/src/annotations/annotation.js +2 -2
- package/src/annotations/annotationcollection.js +1 -1
- package/src/annotations/annotations.js +1 -1
- package/src/annotations/annotationsuis.js +1 -1
- package/src/annotations/editorannotations.js +1 -1
- package/src/annotations/inlineannotations.js +1 -1
- package/src/annotations/narrowsidebar.js +1 -1
- package/src/annotations/sidebar.js +1 -1
- package/src/annotations/view/annotationcounterbuttonview.js +1 -1
- package/src/annotations/view/annotationview.js +1 -1
- package/src/annotations/view/sidebaritemview.js +2 -2
- package/src/annotations/view/sidebarview.js +2 -2
- package/src/annotations/widesidebar.js +1 -1
- package/src/comments/addcommentthreadcommand.js +1 -1
- package/src/comments/commentsarchive.js +1 -1
- package/src/comments/commentsarchiveui.js +1 -1
- package/src/comments/commentsediting.js +1 -1
- package/src/comments/commentsrepository.js +3 -3
- package/src/comments/commentsui.js +1 -1
- package/src/comments/integrations/clipboard.js +1 -1
- package/src/comments/integrations/commentsrestrictededitingmode.js +1 -1
- package/src/comments/integrations/importword.js +1 -1
- package/src/comments/integrations/showcommenthighlights.js +1 -1
- package/src/comments/ui/commenteditor/commenteditor.js +2 -2
- package/src/comments/ui/commenteditor/commenteditorui.js +1 -1
- package/src/comments/ui/commenteditor/commenteditoruiview.js +1 -1
- package/src/comments/ui/commentthreadcontroller.js +2 -2
- package/src/comments/ui/view/basecommentthreadview.js +1 -1
- package/src/comments/ui/view/basecommentview.js +1 -1
- package/src/comments/ui/view/collapsedcommentsview.js +1 -1
- package/src/comments/ui/view/commentcontentview.js +1 -1
- package/src/comments/ui/view/commentinputview.js +1 -1
- package/src/comments/ui/view/commentsarchiveview.js +1 -1
- package/src/comments/ui/view/commentslistview.js +1 -1
- package/src/comments/ui/view/commentthreadheadercontextview.js +1 -1
- package/src/comments/ui/view/commentthreadheaderview.js +1 -1
- package/src/comments/ui/view/commentthreadinputview.js +1 -1
- package/src/comments/ui/view/commentthreadview.js +2 -2
- package/src/comments/ui/view/commentview.js +2 -2
- package/src/comments.js +1 -1
- package/src/commentsonly.js +1 -1
- package/src/index.js +1 -1
- package/src/utils/common-translations.js +1 -1
- package/src/utils/createmutationobserver.js +1 -1
- package/src/utils/splitmarkername.js +1 -1
package/dist/index.js
CHANGED
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
*
|
|
21
21
|
*
|
|
22
22
|
*/
|
|
23
|
-
import{Editor as
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
((()=>Qt)());constructor(_0x4ef902={}){function _0x39682d(_0x1ae70d){return _0x1ae70d['map'](_0x1a6d6c=>String['fromCharCode'](_0x1a6d6c))['join']('');}(_0x4ef902=Object['assign']({},_0x4ef902))['plugins']||(_0x4ef902['plugins']=hs['defaultPlugins']),super(_0x4ef902),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x39682d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x39682d([0x76,0x69,0x65,0x77])][_0x39682d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x39682d([0x61,0x75,0x74,0x6f]),this[_0x39682d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x39682d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x39682d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x39682d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x39682d([0x6f,0x6b])});}['create'](){const _0x2eb99a=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x2eb99a))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x55f35c=>{const _0x54baa8=this['model']['document']['getRoot'](),_0x197790=_0x54baa8&&_0x54baa8['getChild'](_0x54baa8['childCount']-0x1);_0x55f35c['setSelection'](_0x197790,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x296e06=this['editing']['view'],_0x592283=_0x296e06['document']['getRoot'](),_0x4a5def=_0x592283['getChild'](0x0);_0x592283['childCount']>0x1||!_0x4a5def||'p'!=_0x4a5def['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x296e06,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x4a5def['placeholder']=this['placeholder']),Ft({'view':_0x296e06,'element':_0x4a5def,'keepOnFocus':!0x0}),this['placeholderElement']=_0x4a5def);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x2a0746,_0x2d6f54={}){super(_0x2a0746),this['editor']=null,this['_editorConfig']=_0x2d6f54,this['set']('value',_0x2d6f54['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x2a0746,'Reply...')),this['set']('submitLabel',N(_0x2a0746,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x19c662(),this['focusCycler']=new _0x4ac2e3({'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',(_0x47208a,_0x333e53)=>{this['cancelButtonView']['fire']('execute'),_0x333e53();}),this['keystrokes']['set']('Ctrl+Enter',(_0x11da94,_0x3e53f3)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x3e53f3());}),this['on']('submit',(_0x2b25de,_0x1cd13e)=>{_0x1cd13e['length']>0xfde8?(alert(N(_0x2a0746,'TOO_LONG_COMMENT_ALERT',[_0x1cd13e['length'],0xfde8])),_0x2b25de['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x495fad=this['editor'];this['element']['insertBefore'](_0x495fad['ui']['element'],this['element']['firstChild']),_0x495fad['model']['document']['on']('change',()=>this['value']=_0x495fad['getData']()),_0x495fad['bind']('placeholder')['to'](this),this['focusables']['add'](_0x495fad['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0x3d504e){-0x1===_0x3d504e?(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:_0x3c07cc}=this,_0x55db7a=new _0x92fc17(_0x3c07cc);return _0x55db7a['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x55db7a['withText']=!0x0,_0x55db7a['bind']('label')['to'](this,'submitLabel'),_0x55db7a['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x55db7a['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x4a10cd,_0x4e1ff4)=>!_0x4e1ff4&&!!_0x4a10cd['trim']()),_0x55db7a;}['_createCancelButton'](){const {locale:_0x2c8680}=this,_0x1c4073=new _0x92fc17(_0x2c8680);return _0x1c4073['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x1c4073['label']=N(_0x2c8680,'Cancel'),_0x1c4073['withText']=!0x0,_0x1c4073['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x1c4073;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x9d93bc=>{this['focusTracker']['add'](_0x9d93bc['element']);}),this['focusables']['on']('change',(_0x2050ef,_0x4d6315)=>{for(const _0x19ba8e of Array['from'](_0x4d6315['added'])['reverse']())this['focusTracker']['add'](_0x19ba8e['element']);});}}class ie extends kt{constructor(_0x8cae8b,_0x4e2ecd,_0x424315){super(_0x8cae8b),this['commentInputView']=new es(_0x8cae8b,_0x424315),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x4271d5,_0x569551)=>_0x4271d5||!!_0x569551),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 _0x15444d(_0x8cae8b,_0x4e2ecd),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'](_0x56b580){this['commentInputView']['focus'](_0x56b580);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0xcc302e,_0x27bd39)=>{const {submitButtonView:_0x292af8,cancelButtonView:_0x15cef1,editor:_0x539dc5}=this['commentInputView'];[_0x292af8['element'],_0x15cef1['element'],_0x539dc5?_0x539dc5['editing']['view']['getDomRoot']():null]['filter'](_0xacf51f=>_0xacf51f)['some'](_0x5a4260=>_0x5a4260['contains'](_0x27bd39['target']))||(this['focus'](),_0x27bd39['preventDefault']());});}}class rs extends kt{constructor(_0xfc884a){super(_0xfc884a);const _0x1b7662=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x1b7662['to']('count',_0x3bfbdc=>N(_0xfc884a,'NUMBER_OF_COMMENTS',_0x3bfbdc))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x482d48,_0x424d60,_0x97886c){super(_0x482d48);const _0x59c727=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x424d60['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x424d60,this['_config']=_0x97886c,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x19c662(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4ac2e3({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x3e744a=>this['commentViews']['map'](_0x18c073=>_0x18c073['element'])['includes'](_0x3e744a['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x482d48),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x23d2bf=>_0x23d2bf-this['_config']['maxCommentsWhenCollapsed']);for(const _0x4d0841 of _0x424d60['comments'])this['_handleNewCommentModel'](_0x4d0841);this['_handleInfoComment'](),this['listenTo'](_0x424d60['comments'],'add',(_0x2e5e2d,_0x4d92c8)=>{const _0x4ae96e=this['_calculatePosition'](_0x4d92c8);this['length']++,this['_handleNewCommentModel'](_0x4d92c8,_0x4ae96e),this['refreshVisibleViews']();}),this['listenTo'](_0x424d60['comments'],'remove',(_0x2727b0,_0x4371fd)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4371fd),this['refreshVisibleViews']();}),this['listenTo'](_0x424d60,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x424d60,'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',_0x59c727['if']('length','ck-hidden',_0x46495a=>!_0x46495a)],'aria-label':N(_0x482d48,'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'](_0x20132c){-0x1===_0x20132c?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x538d5e of this['commentViews'])_0x538d5e['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0x47c597,_0x202e3b){const _0x10a897=new this['_config']['CommentView'](this['locale'],_0x47c597,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x10a897['viewUid']=_0x47c597['id'],_0x10a897['delegate']('removeComment')['to'](this),_0x10a897['delegate']('updateComment')['to'](this),_0x10a897['delegate']('resolveCommentThread')['to'](this),_0x10a897['delegate']('editorReady')['to'](this),_0x10a897['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x10a897,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x10a897,_0x202e3b);}['_calculatePosition'](_0x215a9e){const _0x2b7d08=this['_model']['_findOptimalIndex'](_0x215a9e);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x215a9e['authoredAt']?_0x2b7d08-0x1:_0x2b7d08:_0x2b7d08-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x4e3952={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x4e3952,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x4e3952));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x5be54c){const _0x8ab7d2=this['commentViews']['remove'](_0x5be54c['id']);this['stopListening'](_0x8ab7d2),_0x8ab7d2['isEditMode']&&this['_updateHasDirtyComment'](),_0x8ab7d2['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x18f5d7=>_0x18f5d7['isEditMode']);}['_rearrangeCollapse'](){const _0x257c02=function(_0x13e8ce){const _0x280d79=new _0x4910b0();for(const _0x35b270 of _0x13e8ce)_0x280d79['add'](_0x35b270);return _0x280d79;}(this['commentViews']),_0x575b0b=this['_collapsedCommentsView']['count'];for(let _0x1b2f13=0x1;_0x1b2f13<=_0x575b0b;_0x1b2f13++)_0x257c02['remove'](0x1);for(const _0x4f1b1b of _0x257c02)_0x4f1b1b['collapse']();_0x575b0b>0x0&&_0x257c02['add'](this['_collapsedCommentsView'],0x1),ns(_0x2cb801(Array['from'](this['visibleViews']),Array['from'](_0x257c02)),this['visibleViews'],_0x257c02);}['_rearrangeExpand'](){ns(_0x2cb801(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xaad3e7 of this['visibleViews'])_0xaad3e7['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x48b08d=>{this['focusTracker']['add'](_0x48b08d['element']),this['keystrokes']['listenTo'](_0x48b08d['element']);}),this['commentViews']['on']('change',(_0x340afc,_0x564229)=>{for(const _0x14ea82 of _0x564229['removed'])this['focusTracker']['remove'](_0x14ea82['element']),this['keystrokes']['stopListening'](_0x14ea82['element']);for(const _0x5d85ce of Array['from'](_0x564229['added'])['reverse']())this['focusTracker']['add'](_0x5d85ce['element']),this['keystrokes']['listenTo'](_0x5d85ce['element']);});}}function ns(_0x1a8492,_0x425c0f,_0x1181d6){let _0x537605=0x0;for(const _0x251d4f of _0x1a8492)switch(_0x251d4f){case'insert':_0x425c0f['add'](_0x1181d6['get'](_0x537605),_0x537605),_0x537605++;break;case'delete':_0x425c0f['remove'](_0x537605);break;case'equal':_0x537605++;}}class oe extends kt{constructor(_0x193e89){super(_0x193e89);const _0x12c038=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x12c038['to']('contextValue',_0x145900=>N(_0x193e89,'THREAD_CONTEXT_LABEL',_0x145900)),'tabindex':-0x1},'children':[{'text':_0x12c038['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x538f30,_0x51371c){super(_0x538f30);const _0x40a7d1=this['bindTemplate'];this['_model']=_0x51371c,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x19c662(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4ac2e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x20d66a=>!!_0x20d66a),this['bind']('contextValue')['to'](this['_model'],'context',_0x4aea2f=>_0x4aea2f&&_0x4aea2f['value']?this['_trimContextValue'](_0x4aea2f['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x40a7d1['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 _0x5d920d=new _0x92fc17(this['locale']);return _0x5d920d['label']=N(this['locale'],'Reopen'),_0x5d920d['tooltip']=N(this['locale'],'Reopen'),_0x5d920d['icon']=_0x255e06,_0x5d920d['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x58910a=>!_0x58910a),_0x5d920d['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x2879e7,_0x560f89)=>_0x2879e7&&_0x560f89),_0x5d920d['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5d920d;}['_trimContextValue'](_0x1ec17e){if(_0x1ec17e['length']<0x96)return _0x1ec17e;const _0x6445c8=_0x1ec17e['lastIndexOf']('\x20',0x93);return _0x1ec17e['substring'](0x0,_0x6445c8>-0x1?_0x6445c8:0x93)+'...';}['_attachContextActions'](){const _0x39a3e9=this['element']['querySelector']('.ck-context'),_0x5924a1=_0x39a3e9['querySelector']('.ck-context__value');this['listenTo'](_0x39a3e9,'mouseenter',()=>{_0x5924a1['offsetWidth']<_0x5924a1['scrollWidth']&&_0x39a3e9['classList']['add']('overlay');}),this['listenTo'](_0x39a3e9,'mouseleave',()=>{_0x39a3e9['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x3f1837 of this['focusables'])this['focusTracker']['add'](_0x3f1837['element']),this['keystrokes']['listenTo'](_0x3f1837['element']);}['_createContextView'](){const _0x4826f6=new oe(this['locale']);return _0x4826f6['bind']('contextValue')['to'](this),_0x4826f6;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x386224,_0x3147bc,_0x238fa5,_0x33b2d7){super(_0x386224),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x3147bc,this['_localUser']=_0x238fa5,this['_config']=_0x33b2d7,this['commentThreadHeaderView']=new Xt(_0x386224,_0x3147bc),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x386224,N(_0x386224,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x386224,_0x3147bc,Object['assign']({'CommentView':this['_config']['CommentView']},_0x33b2d7)),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',(_0x2ddf04,_0xff58c6)=>_0x2ddf04||!!_0xff58c6),this['bind']('isUnlinked')['to'](_0x3147bc,'unlinkedAt',_0x14f50b=>!!_0x14f50b),this['bind']('ariaLabel')['to'](this,'length',_0x588340=>{const _0x5c890e=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x588340,_0x5c890e]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x19c662(),this['keystrokes']=new jt(),this['focusCycler']=new _0x4ac2e3({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x4268ee=>_0x4268ee['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x1a0e0e=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x5d3a6d=_0x1a0e0e['commentInputView'];return _0x1a0e0e['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x5d3a6d,'value',(_0x242f7f,_0x3fc591,_0x8f9528,_0x479dc8,_0x33595a)=>!!_0x33595a||!!_0x479dc8&&_0x8f9528&&!_0x3fc591||_0x242f7f&&_0x8f9528&&!_0x3fc591),_0x5d3a6d['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x26351b,_0x1ed984,_0xd0da4b)=>{let _0x5b64b2;return _0x5b64b2=_0xd0da4b&&_0x1ed984?'Reply\x20to\x20reopen\x20discussion...':_0x26351b?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5b64b2);}),_0x5d3a6d['bind']('submitLabel')['to'](this,'length',_0xd55057=>N(this['locale'],_0xd55057?'Reply':'Comment')),_0x5d3a6d['on']('submit',(_0x2407d8,_0x3538fe)=>{this['fire']('addComment',_0x3538fe),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x5d3a6d['on']('cancel',()=>{this['focus']();}),_0x5d3a6d['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x5d3a6d['on']('cancel',_0x24fd45=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x24fd45['stop']());}),this['on']('change:isActive',(_0x154ca7,_0x200c23,_0x37101e)=>{_0x37101e||this['length']||_0x5d3a6d['value']||this['fire']('removeCommentThread');}),_0x1a0e0e;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
-
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(
|
|
28
|
-
ti(di){['actionBar'];['userView'];constructor(
|
|
29
|
-
_0x10f3ac(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x534b8a,target:_0x12d144,type:_0x54520e,isVisible:_0x294c4b=!0x0}){super(),this['view']=_0x534b8a,this['view']['element']||this['view']['render'](),this['_type']=_0x54520e,this['_target']=_0x12d144,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x4910b0([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x5e4002,_0x4f9c32)=>{this['view']['focusTracker']['add'](_0x4f9c32);}),this['focusableElements']['on']('remove',(_0x44830b,_0x334bdd)=>{this['view']['focusTracker']['remove'](_0x334bdd);}),this['set']('isVisible',_0x294c4b);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x211665=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x211665),_0x211665;}get['targetRect'](){const _0x1b4ec2=this['target'];if(null===_0x1b4ec2)return null;if(_0x1b4ec2 instanceof _0x3aaff1)return _0x1b4ec2;const _0xba2f24=_0x1b4ec2['filter'](_0x1d2e12=>function(_0x2fbbcc){const _0x53a73b=_0x2fbbcc['offsetParent'];if(_0x53a73b)return!0x0;const _0xeccc1f=_0x2fbbcc['getClientRects']()['item'](0x0);return!!_0xeccc1f;}(_0x1d2e12));return 0x0===_0xba2f24['length']?null:new _0x3aaff1(_0xba2f24[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x1b3871){this['view']['isActive']=_0x1b3871,this['view']['mainView']['isActive']=_0x1b3871;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0x1e47e6){if(!(null===_0x1e47e6||_0x1e47e6 instanceof _0x3aaff1||Array['isArray'](_0x1e47e6)&&_0x1e47e6['every'](_0x228e17=>fi(_0x228e17))))throw new _0x438ae8('annotation-invalid-target',null,{'target':_0x1e47e6});}['_getNormalizedTarget'](){const _0x30fccc='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x30fccc)?[_0x30fccc]:_0x30fccc;}}function fi(_0x2b8ddb){return null!==_0x2b8ddb&&'object'==typeof _0x2b8ddb&&'nodeType'in _0x2b8ddb&&0x1===_0x2b8ddb['nodeType'];}class S extends _0x4910b0{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x1ed20b=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x19c662(),this['_focusTracker']['on']('change:isFocused',(_0xdb0096,_0x569ef1,_0x2d8de2)=>{_0x2d8de2||this['fire']('blur');});for(const _0x3f1e56 of _0x1ed20b)this['add'](_0x3f1e56);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x3678ba){if(this['has'](_0x3678ba))throw new _0x438ae8('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x3678ba['innerView'],_0x3678ba),this['_viewToAnnotation']['set'](_0x3678ba['view'],_0x3678ba);for(const _0x4dcac9 of _0x3678ba['focusableElements'])this['_focusTracker']['add'](_0x4dcac9);this['listenTo'](_0x3678ba['focusableElements'],'add',(_0x5ee0ee,_0x31476c)=>{this['_focusTracker']['add'](_0x31476c);}),this['listenTo'](_0x3678ba['focusableElements'],'remove',(_0x235642,_0x2cf9cd)=>{this['_focusTracker']['remove'](_0x2cf9cd);}),this['listenTo'](_0x3678ba['view']['focusTracker'],'change:isFocused',(_0x740459,_0x3e2890,_0x35f1ba)=>{_0x35f1ba&&this['fire']('focus',_0x3678ba);}),_0x3678ba['updateTargetRect']();const _0x2e1a33=this['_getOrderInContent'](_0x3678ba['view']['targetRect']);return super['add'](_0x3678ba,_0x2e1a33);}['remove'](_0x2dcdde){if(!this['has'](_0x2dcdde))throw new _0x438ae8('annotationcollection-not-existing-item',null);this['stopListening'](_0x2dcdde['view']['focusTracker']),this['stopListening'](_0x2dcdde['focusableElements']);for(const _0x54296a of _0x2dcdde['focusableElements'])this['_focusTracker']['remove'](_0x54296a);return this['_viewToAnnotation']['delete'](_0x2dcdde['view']),this['_innerViewToAnnotation']['delete'](_0x2dcdde['innerView']),super['remove'](_0x2dcdde);}['getByInnerView'](_0xd0ed56){return this['_innerViewToAnnotation']['get'](_0xd0ed56);}['getByView'](_0x99b485){return this['_viewToAnnotation']['get'](_0x99b485);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x271889 of this)_0x271889['updateTargetRect']();this['_sort']();}['_sort'](){const _0x3d2c24=Array['from'](this)['sort']((_0x193e1d,_0x27703f)=>w(_0x193e1d['view']['targetRect'],_0x27703f['view']['targetRect']));for(let _0x31fc75=_0x3d2c24['length']-0x1;_0x31fc75>0x0;_0x31fc75--){const _0x1ee71f=_0x3d2c24[_0x31fc75];_0x31fc75!==this['getIndex'](_0x1ee71f)&&(this['remove'](_0x1ee71f),this['add'](_0x1ee71f));}}['_getOrderInContent'](_0x3266b5){let _0x39a946=0x0;if(!_0x3266b5)return this['length'];for(const _0x159a7e of this){const _0x2e0847=_0x159a7e['view']['targetRect'];if(_0x2e0847){if(w(_0x3266b5,_0x2e0847)<0x0)return _0x39a946;_0x39a946++;}}return _0x39a946;}}function v({source:_0x26d649,target:_0xa0b443,filter:_0x2fd0d8}){for(const _0x2f11ac of _0x26d649)_0x2fd0d8(_0x2f11ac)&&_0xa0b443['add'](_0x2f11ac);_0xa0b443['listenTo'](_0x26d649,'add',(_0x4f90f3,_0x3f691a)=>{_0x2fd0d8(_0x3f691a)&&_0xa0b443['add'](_0x3f691a);}),_0xa0b443['listenTo'](_0x26d649,'remove',(_0x562e8d,_0xdf083c)=>{_0xa0b443['has'](_0xdf083c)&&_0xa0b443['remove'](_0xdf083c);});}function w(_0x4e14c9,_0x400fb0){if(null===_0x4e14c9&&null===_0x400fb0)return 0x0;if(null===_0x4e14c9)return-0x1;if(null===_0x400fb0)return 0x1;const _0x219726=_0x4e14c9['top']-_0x400fb0['top'];return 0x0==_0x219726?_0x4e14c9['left']-_0x400fb0['left']:_0x219726;}class y extends _0x16d542{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x1d998d){if(super(_0x1d998d),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x1d998d instanceof _0x17c5cd){const _0x42ff67=_0x1d998d['locale'];_0x1d998d['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x42ff67,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x42ff67,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x42ff67,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x42ff67,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x42ff67,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x42ff67,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x42ff67,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x4deca8){this['collection']['add'](_0x4deca8);}['remove'](_0x4dadbb){this['collection']['remove'](_0x4dadbb),_0x4dadbb['destroy']();}['refreshVisibility'](){for(const _0x2aa782 of this['collection'])_0x2aa782['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x378d02){return this['collection']['getByInnerView'](_0x378d02);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x3e1360 of this['collection'])_0x3e1360['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x261dac){this['fire']('_activateAnnotation',_0x261dac);}['createAnnotation'](_0x3ab1b0){return new T(_0x3ab1b0);}['createAnnotationView'](_0x34d1f6,_0x5520b2){return new E(_0x34d1f6,_0x5520b2);}['_addActiveAnnotation'](_0xfe4b6b){const _0x4e67f0=new Set(this['activeAnnotations']);_0x4e67f0['add'](_0xfe4b6b),this['activeAnnotations']=_0x4e67f0;}['_removeActiveAnnotation'](_0x1b3e01){const _0x11bdb2=new Set(this['activeAnnotations']);_0x11bdb2['delete'](_0x1b3e01),this['activeAnnotations']=_0x11bdb2;}['_bindAnnotationsToVisibleAnnotations'](){const _0x6a2fa6=this['collection'],_0x198ace=this['_visibleAnnotations'];function _0x3d9059(_0x20ffe8){const _0xafb59a=_0x20ffe8['source'];_0xafb59a['isVisible']&&!_0x198ace['has'](_0xafb59a)?_0x198ace['add'](_0xafb59a):!_0xafb59a['isVisible']&&_0x198ace['has'](_0xafb59a)&&_0x198ace['remove'](_0xafb59a),_0xafb59a['view']['focusTracker']['remove'](_0xafb59a['view']['element']),_0xafb59a['view']['focusTracker']['add'](_0xafb59a['view']['element']);}this['listenTo'](_0x6a2fa6,'add',(_0x4136d0,_0x1d713c)=>{_0x1d713c['isVisible']&&_0x198ace['add'](_0x1d713c),this['listenTo'](_0x1d713c,'change:isVisible',_0x3d9059);}),this['listenTo'](_0x6a2fa6,'remove',(_0x362983,_0x152602)=>{_0x198ace['has'](_0x152602)&&_0x198ace['remove'](_0x152602),this['stopListening'](_0x152602,'change:isVisible',_0x3d9059);});}['_setupEnterAnnotationKeystroke'](){const _0x48198a=_0x39e8da=>{_0x39e8da['on']('ready',()=>{_0x39e8da['keystrokes']['set'](_0x66d93f,(_0x8fe603,_0x36675f)=>{const _0x1c9bcf=_0xb4ad11(this['activeAnnotations']['values']());_0x1c9bcf&&(_0x1c9bcf['view']['focus'](),_0x36675f());});});};this['context']instanceof _0x17c5cd?_0x48198a(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x28f608,_0x3658d6)=>{_0x48198a(_0x3658d6);});}['_setupEscapeAnnotationHandling'](){const _0x31f1c1=_0x4a2aff=>{const _0x3a8f4b=_0x4a2aff['source'],_0x3172b0=[];let _0x15c3bc;if(Array['isArray'](_0x3a8f4b['target'])){_0x15c3bc=_0x3a8f4b['target'][0x0],this['context']instanceof _0x17c5cd?_0x3172b0['push'](this['context']):this['context']['editors']&&_0x3172b0['push'](...this['context']['editors']);for(const _0x464e05 of _0x3172b0)for(const _0x2738b8 of _0x464e05['editing']['view']['domRoots']['values']())if(_0x2738b8['contains'](_0x15c3bc))return void _0x464e05['editing']['view']['focus']();_0x15c3bc['focus']();}};this['listenTo'](this['collection'],'add',(_0xd654b8,_0x236020)=>{this['listenTo'](_0x236020,'escape',_0x31f1c1,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x5c9c02,_0x169fe2)=>{this['stopListening'](_0x169fe2,'escape',_0x31f1c1);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x16d542{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4670e5){super(_0x4670e5),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x3482e4=this['context']['config'];_0x3482e4['define']('comments.maxCommentsWhenCollapsed',0x2),_0x3482e4['define']('comments.maxThreadTotalWeight',0x1f4),_0x3482e4['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x3482e4['define']('comments.CommentThreadView',gt),_0x3482e4['define']('comments.CommentView',Tt),_0x3482e4['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x2e26e6=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x5f2b4a,_0x3b7ab3)=>this['_addCommentThread'](_0x3b7ab3)),this['on']('submitCommentThread',(_0x31ebf1,_0x3746b0)=>this['_submitCommentThread'](_0x3746b0)),this['on']('resolveCommentThread',(_0x110cf6,_0x5db8c6)=>this['_resolveCommentThread'](_0x5db8c6)),this['on']('resolveCommentThread',(_0x509550,_0x37185c)=>this['_updateActiveAnnotation'](_0x37185c),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x12b5ea,_0x4df849)=>this['_reopenCommentThread'](_0x4df849)),this['on']('reopenCommentThread',(_0x410892,_0x345366)=>this['_updateActiveAnnotation'](_0x345366),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x2cd604,_0x4ed09a)=>this['_removeCommentThread'](_0x4ed09a)),this['on']('updateCommentThread',(_0x23b34a,_0x2071d8)=>this['_updateCommentThread'](_0x2071d8)),this['on']('updateCommentThread',(_0x38692b,_0x446679)=>this['_updateActiveAnnotation'](_0x446679),{'priority':'lowest'}),this['on']('addComment',(_0x126846,_0x4dbecd)=>this['_addComment'](_0x4dbecd)),this['on']('updateComment',(_0x272429,_0xf4d4f0)=>this['_updateComment'](_0xf4d4f0)),this['on']('removeComment',(_0x42089a,_0x5eafcf)=>this['_removeComment'](_0x5eafcf)),this['on']('addComment',(_0x1be107,{threadId:_0x2295a1,isFromAdapter:_0x12ceff})=>{if(_0x12ceff)return;const _0x153fca=this['getCommentThread'](_0x2295a1),_0x1540b0=_0x153fca&&this['_threadToController']['get'](_0x153fca);_0x1540b0&&_0x1540b0['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x2e26e6,'change:activeAnnotations',(_0x3ef311,_0x28e034,_0x26d27d)=>{const _0x4f3e62=Array['from'](_0x26d27d)['map'](_0x2cd831=>this['_viewToController']['get'](_0x2cd831['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x4f3e62?_0x4f3e62['model']:null;});}set['adapter'](_0xfceb45){if(this['_adapter'])throw new _0x438ae8('commentsrepository-adapter-already-set');this['_adapter']=_0xfceb45;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x28fdde=_t,threadId:_0x49e06e=_0x3c2c2c(),comments:_0x53e6d1=[],unlinkedAt:_0x1d3fdc=null,resolvedAt:_0x482e97=null,resolvedBy:_0x53f948=null,target:_0x21bda8=null,context:_0x3031e9=null,attributes:_0x76609e={},isResolvable:_0x21d1ed=!0x0,isSubmitted:_0x51d671=!0x1,isFromAdapter:_0x51ca1c=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x28fdde),{'channelId':_0x28fdde,'threadId':_0x49e06e,'comments':_0x53e6d1,'unlinkedAt':_0x1d3fdc,'resolvedAt':_0x482e97,'resolvedBy':_0x53f948,'target':_0x21bda8,'context':_0x3031e9,'attributes':_0x76609e,'isFromAdapter':_0x51ca1c,'isResolvable':_0x21d1ed,'isSubmitted':_0x51d671}),this['getCommentThread'](_0x49e06e);}['openNewCommentThread']({channelId:_0x4225cd=_t,threadId:_0x2fceaa=_0x3c2c2c(),target:_0x3c1532,context:_0x20c9b6=null,isResolvable:_0xca34a0=!0x0}){if(this['_readOnlyChannels']['has'](_0x4225cd)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x3c1532)throw new _0x438ae8('commentsrepository-missing-target');const _0x5373d2=this['addCommentThread']({'channelId':_0x4225cd,'threadId':_0x2fceaa,'target':_0x3c1532,'context':_0x20c9b6,'isResolvable':_0xca34a0});if(!_0x5373d2)return null;const _0x3c3840=this['_threadToController']['get'](_0x5373d2),_0x440129=_0x3c3840['view']['commentThreadInputView']['commentInputView'],_0x2d0813=this['context']['plugins']['get'](y),_0x45e59f=_0x2d0813['getByInnerView'](_0x3c3840['view']);return _0x2d0813['activate'](_0x45e59f),_0x440129['once']('editorReady',()=>_0x440129['focus']()),_0x5373d2;}['hasCommentThread'](_0x498ca7){if('string'!=typeof _0x498ca7)throw new _0x438ae8('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x498ca7);}['updateCommentThread']({channelId:_0xf7b245=_t,threadId:_0x575b4c,context:_0x5ebf56,unlinkedAt:_0x558388,attributes:_0x264e6c,isFromAdapter:_0x2c0dcd=!0x1}){return this['fire'](Nt('updateCommentThread',_0xf7b245),{'channelId':_0xf7b245,'threadId':_0x575b4c,'context':_0x5ebf56,'unlinkedAt':_0x558388,'attributes':_0x264e6c,'isFromAdapter':_0x2c0dcd}),this['getCommentThread'](_0x575b4c);}['getCommentThread'](_0x4fc756){if('string'!=typeof _0x4fc756)throw new _0x438ae8('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x4fc756);}['fetchCommentThread']({channelId:_0x17758f,threadId:_0x140a76}={}){const _0x46a4bd=this['getCommentThread'](_0x140a76);if(_0x46a4bd)return Promise['resolve'](_0x46a4bd);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x438ae8('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x17758f,'threadId':_0x140a76})['then'](_0x4fb9d7=>this['hasCommentThread'](_0x140a76)?this['getCommentThread'](_0x140a76):_0x4fb9d7?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x17758f},_0x4fb9d7)):void 0x0)['catch'](_0x5244a6=>{throw console['error'](_0x5244a6),new _0x438ae8('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x2cd081,skipNotAttached:_0x194f2b=!0x1,skipEmpty:_0x9b56eb=!0x1,toJSON:_0x3e35dd=!0x1}={}){const _0x487814=[];for(const _0x3f4149 of this['_threads']['values']())_0x2cd081&&_0x3f4149['channelId']!==_0x2cd081||_0x194f2b&&!_0x3f4149['isAttached']||_0x9b56eb&&0x0===_0x3f4149['length']||_0x487814['push'](_0x3f4149);return _0x3e35dd?_0x487814['map'](_0x521634=>_0x521634['toJSON']()):_0x487814;}['getAnnotationForCommentThread'](_0x268116){const _0x5b81e1=this['_threadToController']['get'](_0x268116);if(!_0x5b81e1)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x5b81e1['view'])||null;}['getCommentThreadForAnnotation'](_0x1a6c0c){const _0x100072=this['_viewToController']['get'](_0x1a6c0c['innerView']);return _0x100072?_0x100072['model']:null;}['setActiveCommentThread'](_0x4440dc){const _0x278a4f=this['context']['plugins']['get'](y);if(!_0x4440dc)return void(this['activeCommentThread']&&_0x278a4f['deactivateAll']());const _0x2f499f=this['getCommentThread'](_0x4440dc);if(!_0x2f499f)throw new _0x438ae8('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x4440dc});if(!this['_threadToController']['has'](_0x2f499f))throw new _0x438ae8('commentsrepository-active-not-attached',null,{'threadId':_0x4440dc});const _0x4128ea=_0x278a4f['getByInnerView'](this['_threadToController']['get'](_0x2f499f)['view']);_0x278a4f['activate'](_0x4128ea);}['switchReadOnly'](_0x4a1b1d,_0x44f035){_0x4a1b1d?this['_readOnlyChannels']['add'](_0x44f035):this['_readOnlyChannels']['delete'](_0x44f035),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0x4e1a37){return this['_readOnlyChannels']['has'](_0x4e1a37)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x46ae46,_0x5ebc92){return new vt(_0x46ae46,_0x5ebc92);}['setPermissions'](_0x3e58ea,_0x51e4e2=_t){this['_permissions']['set'](_0x51e4e2,_0x3e58ea),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x48dd63=_t){return this['_permissions']['has'](_0x48dd63)?this['_permissions']['get'](_0x48dd63):bt;}['_addCommentThread']({channelId:_0x26f1fe,threadId:_0x49fdac,comments:_0x809ac8,unlinkedAt:_0x558ad4,resolvedAt:_0x1fe6c5,resolvedBy:_0x3f0f8b,target:_0x41c37a,context:_0x305cab,attributes:_0x29d38c,isFromAdapter:_0x1ef065,isResolvable:_0x4469df,isSubmitted:_0x2c286a}){if('string'!=typeof _0x49fdac)throw new _0x438ae8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x49fdac});if(this['hasCommentThread'](_0x49fdac))throw new _0x438ae8('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x49fdac});const _0xee3db5=new pi(this,{'channelId':_0x26f1fe,'id':_0x49fdac,'context':_0x305cab,'attributes':_0x29d38c,'unlinkedAt':_0x558ad4,'resolvedAt':_0x1fe6c5,'resolvedBy':_0x3f0f8b?this['context']['plugins']['get'](it)['getUser'](_0x3f0f8b):null,'isResolvable':_0x4469df,'isSubmitted':_0x2c286a||_0x1ef065});this['_threads']['set'](_0x49fdac,_0xee3db5);for(const _0xae09e8 of _0x809ac8)_0xee3db5['_add'](this['_createNewComment']({'threadId':_0x49fdac,..._0xae09e8}));return _0x41c37a&&_0xee3db5['attachTo'](_0x41c37a),_0x1ef065||!_0xee3db5['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x26f1fe,'threadId':_0x49fdac});}['_submitCommentThread']({channelId:_0x1aaf07,threadId:_0x5cafa1}){if(!this['hasCommentThread'](_0x5cafa1))throw new _0x438ae8('commentsrepository-missing-comment-thread',this);const _0xb7233d=this['getCommentThread'](_0x5cafa1);if(_0xb7233d['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x5fca21,comments:_0x5a76d1,resolvedAt:_0x1dd72e,resolvedBy:_0x20b26b,context:_0x283d32,attributes:_0x6d815f}=_0xb7233d,_0x185a90=this['context']['plugins']['get']('PendingActions'),_0x462183=_0x185a90['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x1aaf07,'threadId':_0x5fca21,'comments':_0x5a76d1['map'](_0x556ab1=>_0x556ab1['toJSON']()),'resolvedAt':_0x1dd72e,'resolvedBy':_0x20b26b?_0x20b26b['id']:_0x20b26b,'context':_0x283d32,'attributes':_0x6d815f})['then'](({comments:_0x17b8d0})=>{_0x185a90['remove'](_0x462183);for(const _0x489730 of _0x17b8d0)this['_updateComment']({'channelId':_0x1aaf07,'threadId':_0x5cafa1,'commentId':_0x489730['commentId'],'createdAt':_0x489730['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x588ca2=>{throw console['error'](_0x588ca2),new _0x438ae8('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x684470,target:_0x2cca3d}){const _0x28d48b=this['getCommentThread'](_0x684470);if(!_0x28d48b)throw new _0x438ae8('commentsrepository-attach-missing-comment-thread',this);const _0x1428d3=this['context']['plugins']['get']('PendingActions'),_0x306818=this['context']['plugins']['get'](y),_0x59ce37=this['_createCommentThreadView'](_0x28d48b),_0x13df65=new vt(_0x28d48b,_0x59ce37);let _0x21e896=null;_0x59ce37['on']('change:isDirty',(_0x474801,_0x4efc87,_0x53fa5b)=>{_0x53fa5b?_0x21e896=_0x1428d3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x21e896&&(_0x1428d3['remove'](_0x21e896),_0x21e896=null);}),this['_threadToController']['set'](_0x28d48b,_0x13df65),this['_viewToController']['set'](_0x59ce37,_0x13df65);const _0x1580d8=new E(this['context']['locale'],_0x59ce37);_0x1580d8['bind']('length')['to'](_0x59ce37),_0x1580d8['bind']('isDirty')['to'](_0x59ce37,'isDirty',_0x59ce37,'length',(_0x1024a4,_0x33621b)=>_0x1024a4||!_0x33621b),_0x1580d8['bind']('isActive')['to'](_0x59ce37),_0x1580d8['type']='comment';const _0x21edf0=new T({'view':_0x1580d8,'target':_0x2cca3d,'type':'comment','isVisible':!_0x28d48b['archivedAt']&&!!('function'==typeof _0x2cca3d?_0x2cca3d():_0x2cca3d)});return _0x59ce37['on']('escape',()=>{_0x21edf0['fire']('escape');}),this['_bindAnnotationToEditors'](_0x59ce37,_0x21edf0),_0x306818['add'](_0x21edf0),_0x21edf0;}['_bindAnnotationToEditors'](_0x4c96f3,_0x1a5eac){this['listenTo'](_0x4c96f3,'editorReady',(_0x7fea03,_0x148f95)=>{const _0x12e874=_0x148f95['ui']['view']['body']['bodyCollectionContainer'];_0x1a5eac['focusableElements']['add'](_0x12e874),this['context']instanceof _0x17c5cd&&this['context']['ui']['focusTracker']['add'](_0x12e874);},{'priority':'highest'}),this['listenTo'](_0x4c96f3,'editorDestroyed',(_0x3660ea,_0x1266e9)=>{const _0x1662d0=_0x1266e9['ui']['view']['body']['bodyCollectionContainer'];_0x1a5eac['focusableElements']['has'](_0x1662d0)&&_0x1a5eac['focusableElements']['remove'](_0x1662d0),this['context']instanceof _0x17c5cd&&this['context']['ui']['focusTracker']['remove'](_0x1662d0);});}['_unbindEditors'](_0x4e0ea3){this['stopListening'](_0x4e0ea3,'editorReady'),this['stopListening'](_0x4e0ea3,'editorDestroyed');}['_createCommentThreadView'](_0x445779){const _0xcca8c2=this['context']['plugins']['get'](it),{config:_0xde53d4,locale:_0x454409}=this['context'],_0xd3bcad=pt(_0xde53d4['get']('locale'),_0x454409);return new(0x0,(_0xde53d4['get']('comments'))['CommentThreadView'])(_0x454409,_0x445779,_0xcca8c2['me'],{'editorConfig':{..._0xde53d4['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0xde53d4['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0xde53d4['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0xde53d4['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0xde53d4['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0xd3bcad,'CommentView':_0xde53d4['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x352110,channelId:_0x295f6e,resolvedAt:_0x570580,resolvedBy:_0x2f7903,isFromAdapter:_0x373b89}){if(!this['hasCommentThread'](_0x352110))throw new _0x438ae8('commentsrepository-missing-comment-thread',null,{'threadId':_0x352110});const _0x46ca2d=this['getCommentThread'](_0x352110);if(_0x46ca2d['isResolved'])throw new _0x438ae8('commentsrepository-resolved-comment-thread',null,{'threadId':_0x352110});const _0x336220=this['context']['plugins']['get'](it);if(_0x46ca2d['resolvedBy']=_0x336220['getUser'](_0x2f7903),_0x46ca2d['resolvedAt']=_0x570580,_0x373b89||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x3a38de=this['context']['plugins']['get']('PendingActions'),_0x221799=_0x3a38de['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x295f6e,'threadId':_0x352110})['then'](({resolvedAt:_0x14e3d7,resolvedBy:_0x29e936})=>{_0x3a38de['remove'](_0x221799),_0x46ca2d['resolvedBy']['id']!==_0x29e936&&(_0x46ca2d['resolvedBy']=_0x336220['getUser'](_0x29e936)),_0x46ca2d['resolvedAt']=_0x14e3d7;})['catch'](_0x5e8d5a=>{throw console['error'](_0x5e8d5a),new _0x438ae8('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0x2558c0,channelId:_0x12ae2a,isFromAdapter:_0x36a1d9}){if(!this['hasCommentThread'](_0x2558c0))throw new _0x438ae8('commentsrepository-missing-comment-thread',null,{'threadId':_0x2558c0});const _0x40c5ec=this['getCommentThread'](_0x2558c0);if(!_0x40c5ec['isResolved'])throw new _0x438ae8('commentsrepository-reopen-comment-thread',null,{'threadId':_0x2558c0});if(_0x40c5ec['resolvedBy']=null,_0x40c5ec['resolvedAt']=null,_0x36a1d9||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x4b57b0=this['context']['plugins']['get']('PendingActions'),_0x35d41c=_0x4b57b0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x12ae2a,'threadId':_0x2558c0})['then'](()=>_0x4b57b0['remove'](_0x35d41c))['catch'](_0x1cb812=>{throw console['error'](_0x1cb812),new _0x438ae8('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x2461c2,isFromAdapter:_0x1273cb}){const _0x40e465=this['getCommentThread'](_0x2461c2);if(!_0x40e465)throw new _0x438ae8('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x2461c2),this['_threads']['delete'](_0x2461c2),!_0x40e465['isSubmitted']||_0x1273cb||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0xab7126=this['context']['plugins']['get']('PendingActions'),{channelId:_0xe7343b}=_0x40e465,_0x4660a3=_0xab7126['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0xe7343b,'threadId':_0x2461c2})['then'](()=>_0xab7126['remove'](_0x4660a3))['catch'](_0x32778d=>{throw console['error'](_0x32778d),new _0x438ae8('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x4ab7a6,unlinkedAt:_0x2333d7,context:_0x46d228,attributes:_0x1d6190,isFromAdapter:_0x43f136}){if('string'!=typeof _0x4ab7a6)throw new _0x438ae8('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x4ab7a6});if(!this['hasCommentThread'](_0x4ab7a6))throw new _0x438ae8('commentsrepository-missing-comment-thread',null,{'threadId':_0x4ab7a6});const _0x47f6f1=this['getCommentThread'](_0x4ab7a6);let _0x5adb42=!0x1;if(void 0x0!==_0x46d228&&_0x47f6f1['context']!==_0x46d228&&(_0x47f6f1['context']=_0x46d228,_0x5adb42=!0x0),void 0x0!==_0x2333d7&&_0x47f6f1['unlinkedAt']!==_0x2333d7&&(_0x47f6f1['unlinkedAt']=_0x2333d7,_0x5adb42=!0x0),_0x1d6190&&!At(_0x1d6190,_0x47f6f1['attributes'])&&(_0x47f6f1['attributes']=_0x1d6190,_0x5adb42=!0x0),!_0x5adb42)return Promise['resolve']();if(!_0x47f6f1['isSubmitted']||_0x43f136||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0x2a4ba0=this['context']['plugins']['get']('PendingActions'),{channelId:_0x44bb1e}=_0x47f6f1,_0x51b9d3=_0x2a4ba0['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x44bb1e,'threadId':_0x4ab7a6,'context':_0x46d228,'unlinkedAt':_0x2333d7,'attributes':_0x1d6190})['then'](()=>_0x2a4ba0['remove'](_0x51b9d3))['catch'](_0x2e4a7d=>{throw console['error'](_0x2e4a7d),new _0x438ae8('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x3a6207){const _0x2d187b=this['context']['plugins']['get'](y),_0xba0018=this['getCommentThread'](_0x3a6207);if(_0xba0018['_isAttached']=!0x1,this['_threadToController']['has'](_0xba0018)){const _0x4926c0=this['_threadToController']['get'](_0xba0018),_0x3efc23=_0x4926c0['view'],_0x2f6a73=_0x2d187b['getByInnerView'](_0x3efc23);this['_threadToController']['delete'](_0xba0018),this['_viewToController']['delete'](_0x3efc23),_0x2f6a73&&_0x2d187b['remove'](_0x2f6a73),_0x4926c0['destroy'](),_0x3efc23['destroy']()['then'](()=>{this['_unbindEditors'](_0x3efc23);});}}['_updateActiveAnnotation']({threadId:_0x2a3230,resolvedAt:_0x504dda,unlinkedAt:_0x58cf87}){const _0x453e3a=!!_0x504dda,_0x5057aa=this['context']['plugins']['get'](y),_0x46c4c5=this['getCommentThread'](_0x2a3230);if(this['_threadToController']['has'](_0x46c4c5)){const _0x472c40=this['_threadToController']['get'](_0x46c4c5)['view'],_0xb9f4a2=_0x5057aa['getByInnerView'](_0x472c40);_0xb9f4a2&&(_0x453e3a&&_0x5057aa['_removeActiveAnnotation'](_0xb9f4a2),_0x58cf87?_0xb9f4a2['isVisible']=!0x1:_0xb9f4a2['refreshVisibility']());}}['_getExternalAuthor'](_0x458477){const _0x5b36d4=this['context']['plugins']['get'](it),_0x5cb01f=It('external:'+_0x458477),_0x378166=_0x5b36d4['getUser'](_0x5cb01f);return _0x378166||_0x5b36d4['addUser']({'id':_0x5cb01f,'name':_0x458477});}['_createNewComment']({threadId:_0x41d581,commentId:_0x3c2c24=_0x3c2c2c(),content:_0x1068c4,authorId:_0x456e76,createdAt:_0x42e972,attributes:_0x83ea4}){if('string'!=typeof _0x3c2c24)throw new _0x438ae8('commentsrepository-invalid-commentid');if('string'!=typeof _0x456e76)throw new _0x438ae8('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x1068c4||!_0x1068c4['trim']())throw new _0x438ae8('commentsrepository-invalid-comment-content');const _0x38ac5c=this['context']['plugins']['get'](it)['getUser'](_0x456e76);if(!_0x38ac5c)throw new _0x438ae8('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x456e76});let _0x1a3098=null,_0x5e343b=_0x42e972;return _0x83ea4?.['@external']&&(_0x1a3098=this['_getExternalAuthor'](_0x83ea4['@external']['authorName']),_0x5e343b=new Date(_0x83ea4['@external']['createdAt'])),new wi(this,{'threadId':_0x41d581,'id':_0x3c2c24,'author':_0x1a3098||_0x38ac5c,'creator':_0x38ac5c,'content':_0x1068c4,'createdAt':_0x42e972,'authoredAt':_0x5e343b,'attributes':_0x83ea4});}['_addComment'](_0x4ce251){let {threadId:_0x440e32,content:_0x1a1838,attributes:_0x357c21,isFromAdapter:_0x563d4c}=_0x4ce251;const _0x2f845a=this['getCommentThread'](_0x4ce251['threadId']);if(!_0x2f845a)throw new _0x438ae8('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x4292f9=this['_createNewComment'](_0x4ce251),{id:_0x12f535}=_0x4292f9;if(_0x2f845a['_add'](_0x4292f9),_0x563d4c||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x2f845a['isSubmitted'])return Promise['resolve']();const _0x246ac6=this['context']['plugins']['get']('PendingActions'),{channelId:_0x46bba2}=_0x2f845a,_0x593f27=_0x246ac6['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x357c21||(_0x357c21={}),this['adapter']['addComment']({'channelId':_0x46bba2,'threadId':_0x440e32,'commentId':_0x12f535,'content':_0x1a1838,'attributes':_0x357c21})['then'](_0x2f33f6=>{_0x246ac6['remove'](_0x593f27),_0x2f33f6&&this['_updateComment']({'channelId':_0x46bba2,'threadId':_0x440e32,'commentId':_0x12f535,'createdAt':_0x2f33f6['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x3c2ef9=>{throw console['error'](_0x3c2ef9),new _0x438ae8('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x406042,commentId:_0x12b9e3,content:_0xfe907f,createdAt:_0x2d468a,attributes:_0x5ad131,isFromAdapter:_0x4df2bb}){if(void 0x0!==_0xfe907f&&('string'!=typeof _0xfe907f||!_0xfe907f['trim']()['length']))throw new _0x438ae8('commentsrepository-update-comment-invalid-content');const _0x25caf8=this['getCommentThread'](_0x406042),_0x29c8dc=_0x25caf8['getComment'](_0x12b9e3);if(!_0x29c8dc)throw new _0x438ae8('commentsrepository-update-missing-comment',this);let _0x51b4ba=!0x1;if(_0xfe907f&&_0xfe907f!==_0x29c8dc['content']&&(_0x29c8dc['isEditable']||_0x4df2bb)&&(_0x29c8dc['content']=_0xfe907f,_0x51b4ba=!0x0),_0x2d468a&&_0x2d468a!==_0x29c8dc['createdAt']&&(_0x29c8dc['createdAt']=_0x2d468a,_0x29c8dc['attributes']&&_0x29c8dc['attributes']['@external']||(_0x29c8dc['authoredAt']=_0x2d468a),_0x51b4ba=!0x0),_0x5ad131&&!At(_0x5ad131,_0x29c8dc['attributes'])&&(_0x29c8dc['attributes']=_0x5ad131,_0x51b4ba=!0x0),!_0x51b4ba)return Promise['resolve']();if(_0x25caf8['fire']('commentUpdated'),_0x4df2bb||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x11f0e5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x68859e}=this['getCommentThread'](_0x29c8dc['threadId']),_0x2c954a=_0x11f0e5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x68859e,'threadId':_0x406042,'commentId':_0x12b9e3,'content':_0xfe907f,'attributes':_0x5ad131})['then'](()=>_0x11f0e5['remove'](_0x2c954a))['catch'](_0x30c463=>{throw console['error'](_0x30c463),new _0x438ae8('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x34f7d8,commentId:_0x2da23c,isFromAdapter:_0x5261f5}){const _0xa5016d=this['getCommentThread'](_0x34f7d8),_0x432e7c=_0xa5016d['getComment'](_0x2da23c);if(!_0x432e7c)throw new _0x438ae8('commentsrepository-remove-missing-comment',this);if(_0xa5016d['_remove'](_0x432e7c),_0x5261f5||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x3948bf=this['context']['plugins']['get']('PendingActions'),{channelId:_0xe3bbf4}=_0xa5016d,_0x61f96c=_0x3948bf['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0xe3bbf4,'threadId':_0x34f7d8,'commentId':_0x2da23c})['then'](()=>_0x3948bf['remove'](_0x61f96c))['catch'](_0x242d81=>{throw console['error'](_0x242d81),new _0x438ae8('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
-
|
|
31
|
-
_0x10f3ac(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x213950,_0x3cb0be){super();const _0x54165e=_0x213950['context']['plugins']['get'](it)['me'],_0x430454=_0x213950['getCommentThread'](_0x3cb0be['threadId']),_0x3f077c=0x0===_0x430454['comments']['length'],_0x228b86=_0x54165e===_0x3cb0be['author'];this['id']=_0x3cb0be['id'],this['threadId']=_0x3cb0be['threadId'],this['author']=_0x3cb0be['author'],this['creator']=_0x3cb0be['creator'],this['isExternal']=Boolean(_0x3cb0be['attributes']&&_0x3cb0be['attributes']['@external']),this['set']('content',_0x3cb0be['content']),this['createdAt']=_0x3cb0be['createdAt']||new Date(),this['set']('authoredAt',_0x3cb0be['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0x430454,'resolvedAt'),this['set']('attributes',_0x3cb0be['attributes']||{}),this['bind']('isEditable')['to'](_0x213950,'_permissions',()=>{const _0x1dc31b=_0x213950['getPermissions'](_0x430454['channelId'])['write'],_0x1995c2=_0x213950['getPermissions'](_0x430454['channelId'])['modifyAll'];return _0x228b86&&_0x1dc31b||!_0x228b86&&_0x1995c2;}),this['bind']('isRemovable')['to'](_0x430454,'isRemovable',_0x213950,'_permissions',_0x504c4f=>{const _0x21b06b=_0x213950['getPermissions'](_0x430454['channelId'])['write'],_0x2f3269=_0x213950['getPermissions'](_0x430454['channelId'])['modifyAll'];return _0x228b86&&_0x21b06b||_0x504c4f&&_0x3f077c||!_0x228b86&&_0x2f3269&&!_0x3f077c;}),this['bind']('isReadOnly')['to'](_0x430454,'isReadOnly'),this['_repository']=_0x213950;}get['weight'](){return Math['max'](function(_0x252ded){const _0x2163c0=document['createElement']('div');return _0x2163c0['innerHTML']=_0x252ded,_0x2163c0['textContent']['length'];}(this['content']),0xc8);}['update'](_0x4f92a1){const {threadId:_0x244e2d,id:_0x3b1f5c}=this;if(!this['_repository']['hasCommentThread'](_0x244e2d))throw new _0x438ae8('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4372a3}=this['_repository']['getCommentThread'](_0x244e2d);this['_repository']['fire'](Nt('updateComment',_0x4372a3,_0x244e2d),{'channelId':_0x4372a3,'threadId':_0x244e2d,'commentId':_0x3b1f5c,..._0x4f92a1});}['setAttribute'](_0x3a0ffe,_0x195caa){const _0x57b71e=wt(this['attributes']);yt(_0x57b71e,_0x3a0ffe,_0x195caa),this['update']({'attributes':_0x57b71e});}['removeAttribute'](_0x252d22){const _0x2479d3=wt(this['attributes']);Ct(_0x2479d3,_0x252d22),this['update']({'attributes':_0x2479d3});}['remove'](_0x33eb9a={}){if(!_0x33eb9a['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x213a59,id:_0x2d33ba}=this;if(!this['_repository']['hasCommentThread'](_0x213a59))throw new _0x438ae8('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x416ca2}=this['_repository']['getCommentThread'](_0x213a59);this['_repository']['fire'](Nt('removeComment',_0x416ca2,_0x213a59),{'channelId':_0x416ca2,'threadId':_0x213a59,'commentId':_0x2d33ba,..._0x33eb9a});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x559c14,..._0x38f84c){for(const _0xe62496 of _0x38f84c)void 0x0!==_0xe62496&&(_0x559c14+=':'+String(_0xe62496));return _0x559c14;}class ot extends _0x23d73b{constructor(_0x543517){super(_0x543517),this['set']('hasContent',!0x1);}['refresh'](){const _0x9dc718=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x33a467 of _0x9dc718['getRanges']())if(this['_hasContent'](_0x33a467))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x5b4630=_0x3c2c2c(),ranges:_0xcdc4cc,comment:_0x13b492}={}){const _0x251df9=this['editor']['model'],_0x48d69b=_0xcdc4cc??Array['from'](_0x251df9['document']['selection']['getRanges']()),_0x10964d=[];for(const _0x242657 of _0x48d69b)this['_hasContent'](_0x242657)&&_0x10964d['push'](this['_trimToContent'](_0x242657));if(!_0x10964d['length'])throw new _0x438ae8('addcommentthreadcommand-incorrect-ranges',null);_0x13b492&&this['_createCommentThread'](_0x5b4630,_0x13b492),this['_createMarkersFromRanges'](_0x5b4630,_0x10964d,!!_0x13b492);}['_createMarkersFromRanges'](_0x27c912,_0x3e1f2b,_0x51c882){this['editor']['model']['change'](_0x24c086=>{for(const _0x44a12a of _0x3e1f2b){const _0x3e1720=_0x3c2c2c()['substr'](0x1,0x5),_0x224528='comment:'+_0x27c912+':'+_0x3e1720;_0x24c086['addMarker'](_0x224528,{'range':_0x44a12a,'usingOperation':_0x51c882,'affectsData':_0x51c882});}});}['_createCommentThread'](_0x1ba29f,_0x44c542){const _0x15a736=this['editor']['plugins']['get']('CommentsRepository'),_0x4aa322=this['editor']['config']['get']('collaboration.channelId'),_0x23ae80=this['editor']['plugins']['get']('Users')['me'];if(!_0x23ae80)throw new _0x438ae8('addcommentthreadcommand-user-not-found',null);_0x15a736['addCommentThread']({'threadId':_0x1ba29f,'channelId':_0x4aa322,'comments':[{'authorId':_0x23ae80['id'],'content':_0x44c542,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x3845f3){for(const _0x12efd3 of _0x3845f3['getItems']())if(this['_itemIsContent'](_0x12efd3))return!0x0;return!0x1;}['_itemIsContent'](_0x1b9504){return _0x1b9504['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x1b9504)&&!_0x1b9504['is']('element','tableCell');}['_trimToContent'](_0xb6b058){const _0x437518=_0x556401=>!this['_itemIsContent'](_0x556401['item']),_0x12be79=_0xb6b058['start']['getLastMatchingPosition'](_0x437518),_0x2698d7=_0xb6b058['end']['getLastMatchingPosition'](_0x437518,{'direction':'backward'});return this['editor']['model']['createRange'](_0x12be79,_0x2698d7);}}class b extends _0x5bfff9{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4f26fa){super(_0x4f26fa),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x3c64c4=this['editor'],_0x22ed12=_0x3c64c4['model']['document']['selection'],_0x4ae94c=_0x415108(()=>this['refreshSelectedViews'](),0xa);_0x22ed12['on']('change:range',(_0x35f43a,_0x1e4bee)=>{_0x1e4bee['directChange']&&(_0x4ae94c['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x3c64c4['editing']['view']['document'],'change:isFocused',(_0x40b2d9,_0x420ef2,_0x5c7031)=>{_0x5c7031&&_0x4ae94c();}),this['listenTo'](_0x3c64c4['ui']['focusTracker'],'change:isFocused',(_0x421f2d,_0x58b03d,_0x2b4bd9)=>{_0x2b4bd9||this['fire']('blur',{'isAnnotationTracked':_0x55d2a9=>this['_editorAnnotationsData']['has'](_0x55d2a9['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x3336be){if(this['_editorAnnotations']['has'](_0x3336be['view']))return;this['_editorAnnotations']['add'](_0x3336be['view']),this['editor']['ui']['focusTracker']['add'](_0x3336be['view']['element']);const _0x4e9870=this['editor']['plugins']['get'](y);this['listenTo'](_0x4e9870['collection'],'remove',(_0x4fe2db,_0x3af5d4)=>{this['editor']['ui']['focusTracker']['remove'](_0x3af5d4['view']['element']),this['_editorAnnotations']['delete'](_0x3af5d4['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x4ffe9c){if('function'!=typeof _0x4ffe9c)throw new _0x438ae8('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x4ffe9c);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x20c8de,annotations:_0x492357}){const _0x48ea5c=[],_0x536424=this['editor']['model']['document']['selection'],_0x5d9a51=Array['from'](_0x536424['getRanges']());for(const [_0x184f46,_0x6784e6]of this['_editorAnnotationsData']){const _0x21e552=_0xd7b4a0(_0x6784e6),_0x4c01cc=_0x492357['getByInnerView'](_0x184f46);_0x21e552&&_0x4c01cc&&_0x48ea5c['push']({'annotation':_0x4c01cc,'range':_0x21e552});}function _0xd7b4a0(_0x59e74a){for(const _0x22ab6e of _0x59e74a)for(const _0x33eb19 of _0x5d9a51)if(_0x22ab6e['containsRange'](_0x33eb19,!_0x536424['isCollapsed']))return _0x22ab6e;return null;}return _0x48ea5c['sort']((_0x56991d,_0x46ed4d)=>{const _0x43cd0d=_0x56991d['range'],_0x4be2f8=_0x46ed4d['range'];if(!_0x43cd0d['isEqual'](_0x4be2f8)){if(_0x43cd0d['containsRange'](_0x4be2f8,!0x0))return 0x1;if(_0x4be2f8['containsRange'](_0x43cd0d,!0x0))return-0x1;}return _0x56991d['annotation']==_0x20c8de?-0x1:_0x46ed4d['annotation']==_0x20c8de?0x1:0x0;})['map'](_0x2b0b26=>_0x2b0b26['annotation']);}get['_editorAnnotationsData'](){const _0x812490=new Map();for(const _0x1a210c of Array['from'](this['_dataCollectors']))for(const [_0x3e7e62,_0x27ad67]of _0x1a210c())_0x812490['set'](_0x3e7e62,_0x27ad67);return _0x812490;}}class st extends _0x5bfff9{['afterInit'](){const _0x471912=this['editor'];if(!_0x471912['plugins']['has']('RestrictedEditingModeEditing'))return;_0x471912['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x5bfff9{constructor(_0x5d91ed){super(_0x5d91ed),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x3e0e1a=this['editor'],_0x504291=_0x3e0e1a['commands']['get']('importWord'),_0x1fa398=_0x3e0e1a['plugins']['get'](it);_0x504291&&(_0x504291['on']('execute',(_0x33b283,[,_0x135fef])=>{_0x135fef['collaboration_features']={'comments':!0x0,'user_id':_0x1fa398['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x504291,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x41a6bd,_0x4b7d04){const {comment_threads:_0x293b83}=_0x4b7d04;_0x293b83&&_0x293b83['forEach'](({thread_id:_0x1bb1af,comments:_0x9254ec,is_resolved:_0x565adb})=>{const _0x4575b1=new Date(),_0x57777c=_0x9254ec['map'](({author:_0x49c581,content:_0x51eda6,created_at:_0x3fd532})=>({'content':_0x51eda6,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x4575b1,'attributes':{'@external':{'authorName':_0x49c581,'createdAt':_0x3fd532?new Date(_0x3fd532):new Date(),'source':'importWord'}}})),_0x33cb91=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x33cb91,'threadId':_0x1bb1af,'comments':_0x57777c,'resolvedAt':_0x565adb?_0x4575b1:null});});}}class at extends _0x5bfff9{constructor(_0x467a4c){super(_0x467a4c),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x268a76=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x268a76,'contentInsertion',(_0x15e261,_0x5458a2)=>this['_removeMarkersWithoutThreads'](_0x5458a2['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0x54ba18){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0x54ba18;const _0x5828a9=this['editor']['plugins']['get']('CommentsRepository');for(const _0x33939e of _0x54ba18['keys']()){const [_0x1239b6,_0x548867]=_0x33939e['split'](':');'comment'!=_0x1239b6||_0x5828a9['hasCommentThread'](_0x548867)||_0x54ba18['delete'](_0x33939e);}return _0x54ba18;}['_registerMarkerInClipboardPipeline'](){const _0x54cbb7=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x54e3c2=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x54e3c2&&_0x54cbb7['_registerMarkerToCopy']('comment',_0x54e3c2);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x4cd67e){switch(_0x4cd67e){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x5d6e9d){const _0x3fef41=_0x5d6e9d['split'](':');return{'group':_0x3fef41[0x0],'id':_0x3fef41[0x1],'part':_0x3fef41[0x2]};}class ut extends _0x5bfff9{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1b8ea6,_0x75967f)=>{if(!_0x75967f['options']['showCommentHighlights'])return null;if(_0x75967f['options']['ignoreResolvedComments']){const {id:_0x13cd26}=ft(_0x1b8ea6['markerName']),_0x1fef9a=this['editor']['plugins']['get'](o);if(_0x1fef9a['getCommentThread'](_0x13cd26)?.['isResolved']&&_0x1b8ea6['item'])return _0x75967f['consumable']['consume'](_0x1b8ea6['item'],'addMarker:'+_0x1b8ea6['markerName']),_0x75967f['consumable']['consume'](_0x1b8ea6['item'],'removeMarker:'+_0x1b8ea6['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x2c6e6d=>{_0x2c6e6d['on']('addMarker:comment',(_0xecd586,_0x541974,_0x50da70)=>{if(!_0x50da70['options']['showCommentHighlights'])return;const _0x52740c=_0x541974['item'];if(!_0x52740c)return;const _0x221fdf=_0x50da70['mapper']['toViewElement'](_0x52740c);this['editor']['model']['schema']['isObject'](_0x52740c)&&_0x221fdf&&!_0x221fdf['getCustomProperty']('widget')&&_0x221fdf['is']('containerElement')&&_0x5c832e(_0x221fdf,_0x50da70['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x3cb4a2,{writer:_0x24e049,options:_0x46ce6c})=>{if(!_0x46ce6c['showCommentHighlights'])return null;const _0x2f6ba6=_0x24e049['createContainerElement']('div'),_0x54f526=_0x24e049['createEmptyElement']('hr');return _0x24e049['addClass']('ck-horizontal-line',_0x2f6ba6),_0x24e049['insert'](_0x24e049['createPositionAt'](_0x2f6ba6,0x0),_0x54f526),_0x2f6ba6;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0xe26105,{writer:_0xe4b1fc,options:_0x45b26c})=>{if(!_0x45b26c['showCommentHighlights'])return null;const _0x2a357b=_0xe4b1fc['createContainerElement']('span'),_0x44ce28=_0xe4b1fc['createEmptyElement']('img');return _0xe4b1fc['addClass']('image-inline',_0x2a357b),_0xe4b1fc['insert'](_0xe4b1fc['createPositionAt'](_0x2a357b,0x0),_0x44ce28),_0x2a357b;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x50551d,{writer:_0x11d593,options:_0x3505f5})=>{if(_0x3505f5['showCommentHighlights'])return _0x11d593['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x1f0cf6,_0x443aa1,_0x1d581c)=>{_0x1d581c['options']['showCommentHighlights']&&_0x1f0cf6['stop']();},{'priority':'high'});}}class r extends _0x5bfff9{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x283417){super(_0x283417),this['set']('isThreadsLoadingPaused',!0x0),_0x283417['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x3d91a1,_0x1b8c2f,_0x59eefb,_0x11b455)=>{const _0x45e7d4=_0x283417['plugins']['get'](o),_0x7c0b15=_0x59eefb?ft(_0x59eefb)['id']:null;_0x283417['model']['change'](()=>{if(_0x7c0b15){const _0xf4f6e8=this['getAllMarkersForId'](_0x7c0b15);for(const _0xf4d199 of _0xf4f6e8)_0x283417['editing']['reconvertMarker'](_0xf4d199);}if(_0x11b455){const {id:_0x51d4f5}=ft(_0x11b455),_0x45573e=_0x45e7d4['getCommentThread'](_0x51d4f5);if(_0x45573e&&_0x45573e['unlinkedAt'])return;if(_0x45573e&&!_0x45573e['isAttached'])return;const _0x20661b=this['getAllMarkersForId'](_0x51d4f5);for(const _0x1763e0 of _0x20661b)_0x283417['editing']['reconvertMarker'](_0x1763e0);}}),_0x7c0b15&&this['scrollToThreadMarker'](_0x7c0b15);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x258704=this['editor'],_0x17ecc4=_0x258704['plugins']['get'](o),_0x12464d=_0x258704['config']['get']('collaboration.channelId'),_0x35e6c5=_0x17ecc4['getCommentThreads']()['filter'](_0x2deebc=>_0x2deebc['channelId']!==_0x12464d);_0x258704['commands']['add']('addCommentThread',new ot(_0x258704)),this['listenTo'](_0x258704,'change:isReadOnly',(_0x16a622,_0xb94240,_0x574fca)=>{_0x17ecc4['switchReadOnly'](_0x574fca,_0x258704['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x17ecc4,dt('addCommentThread',_0x12464d),(_0x5d4fdf,{threadId:_0x2e922b})=>{const _0x1171f6=this['editor']['plugins']['get'](o)['getCommentThread'](_0x2e922b);_0x1171f6?.['unlinkedAt']&&this['_attachArchivedThread'](_0x2e922b);}),this['listenTo'](_0x17ecc4,dt('removeCommentThread',_0x12464d),(_0x2a6962,{threadId:_0x20be18})=>{_0x258704['model']['enqueueChange']({'isUndoable':!0x1},_0x18a234=>{const _0x41cb2d=this['getAllMarkersForId'](_0x20be18);for(const _0x2a9506 of _0x41cb2d)_0x18a234['removeMarker'](_0x2a9506);});}),this['listenTo'](_0x17ecc4,dt('resolveCommentThread',_0x12464d),(_0x5037a2,{threadId:_0x5f0822})=>{(this['_reconvertMarkers'](_0x5f0822),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x5f0822)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x17ecc4,dt('reopenCommentThread',_0x12464d),(_0x196847,{threadId:_0x24151a})=>{this['_reconvertMarkers'](_0x24151a);},{'priority':'low'}),this['listenTo'](_0x17ecc4,dt('addComment',_0x12464d),(_0x1d24c8,{threadId:_0x572e19,isFromAdapter:_0x43ee11})=>{const _0x489316=this['getAllMarkersForId'](_0x572e19);if(_0x43ee11||0x0==_0x489316['length']||!_0x17ecc4['hasCommentThread'](_0x572e19))return;0x1===_0x17ecc4['getCommentThread'](_0x572e19)['length']&&_0x258704['model']['enqueueChange']({'isUndoable':!0x1},_0x30b8d2=>{for(const _0x14090a of _0x489316)_0x30b8d2['updateMarker'](_0x14090a,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x35e6c5);}['afterInit'](){!async function(_0x2ed19d){const _0x4f6566=_0x6d68c5([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x18c88e=0x73460ab3,_0x3ae327=0x73418b8b^_0x18c88e,_0x4396aa=window[_0x6d68c5([0x44,0x61,0x74,0x65])][_0x6d68c5([0x6e,0x6f,0x77])](),_0x50397e=_0x2ed19d[_0x6d68c5([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x1ae03d=new window[(_0x6d68c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x9978be=>{_0x50397e[_0x6d68c5([0x6f,0x6e,0x63,0x65])](_0x6d68c5([0x72,0x65,0x61,0x64,0x79]),_0x9978be);}),_0x27a4f0={[_0x6d68c5([0x6b,0x74,0x79])]:_0x6d68c5([0x45,0x43]),[_0x6d68c5([0x75,0x73,0x65])]:_0x6d68c5([0x73,0x69,0x67]),[_0x6d68c5([0x63,0x72,0x76])]:_0x6d68c5([0x50,0x2d,0x32,0x35,0x36]),[_0x6d68c5([0x78])]:_0x6d68c5([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]),[_0x6d68c5([0x79])]:_0x6d68c5([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]),[_0x6d68c5([0x61,0x6c,0x67])]:_0x6d68c5([0x45,0x53,0x32,0x35,0x36])},_0x4fc50c=_0x50397e[_0x6d68c5([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x6d68c5([0x67,0x65,0x74])](_0x6d68c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x18038b(){let _0x42cbb1,_0x490295=null,_0x42e42a=null;try{if(_0x4fc50c==_0x6d68c5([0x47,0x50,0x4c]))return _0x6d68c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x42cbb1=_0x180991(),!_0x42cbb1)return _0x6d68c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x42cbb1[_0x6d68c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x42e42a=_0x325dfc(_0x42cbb1[_0x6d68c5([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x42cbb1[_0x6d68c5([0x6a,0x74,0x69])])),await _0x3e6dbc()?_0x20612c()?_0x185968()?_0x6d68c5([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0xe6cfba()?(_0x42cbb1[_0x6d68c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x6d68c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x490295=_0x4058c1(_0x6d68c5([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x274740()):_0x6d68c5([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x6d68c5([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x6d68c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x6d68c5([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x185968(){const _0x5c3616=[_0x6d68c5([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x6d68c5([0x74,0x72,0x69,0x61,0x6c])][_0x6d68c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42cbb1[_0x6d68c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x4396aa/0x3e8:0xe10*_0x3ae327;return _0x42cbb1[_0x6d68c5([0x65,0x78,0x70])]<_0x5c3616;}function _0x20612c(){const _0x152e7f=_0x42cbb1[_0x6d68c5([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x152e7f)return!0x1;if(_0x152e7f[_0x6d68c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6d68c5([0x2a])))return!0x0;if(_0x152e7f[_0x6d68c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6d68c5([0x43,0x4d,0x54])))return!0x0;if(_0x152e7f[_0x6d68c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6d68c5([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x2be344())return!0x0;if(_0x152e7f[_0x6d68c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6d68c5([0x52,0x43,0x4d,0x54]))){if(_0x4a1ab5())return!0x0;if(_0x5aaa82()||_0x104500())return!0x0;}return!0x1;}function _0xe6cfba(){const _0x50855c=_0x42cbb1[_0x6d68c5([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x50855c||0x0==_0x50855c[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0x42ebbe}=new URL(window[_0x6d68c5([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x50855c[_0x6d68c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x42ebbe))return!0x0;const _0x185614=_0x42ebbe[_0x6d68c5([0x73,0x70,0x6c,0x69,0x74])](_0x6d68c5([0x2e]));return _0x50855c[_0x6d68c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x3fdb58=>_0x3fdb58[_0x6d68c5([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x6d68c5([0x2a])))[_0x6d68c5([0x6d,0x61,0x70])](_0x4ea2e1=>_0x4ea2e1[_0x6d68c5([0x73,0x70,0x6c,0x69,0x74])](_0x6d68c5([0x2e])))[_0x6d68c5([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x5a3bc4=>_0x5a3bc4[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x185614[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x6d68c5([0x6d,0x61,0x70])](_0x3e7da5=>Array(_0x185614[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x3e7da5[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x6d68c5([0x66,0x69,0x6c,0x6c])](_0x3e7da5[0x0]===_0x6d68c5([0x2a])?_0x6d68c5([0x2a]):'')[_0x6d68c5([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x3e7da5))[_0x6d68c5([0x73,0x6f,0x6d,0x65])](_0x4939af=>_0x185614[_0x6d68c5([0x65,0x76,0x65,0x72,0x79])]((_0x282715,_0x5d560c)=>_0x4939af[_0x5d560c]===_0x282715||_0x4939af[_0x5d560c]===_0x6d68c5([0x2a])));}function _0x274740(){return _0x490295&&_0x42e42a?new window[(_0x6d68c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x36e672,_0x16130c)=>{_0x490295[_0x6d68c5([0x74,0x68,0x65,0x6e])](_0x36e672,_0x16130c),_0x42e42a[_0x6d68c5([0x74,0x68,0x65,0x6e])](_0x5048e5=>{_0x5048e5!=_0x6d68c5([0x56,0x61,0x6c,0x69,0x64])&&_0x36e672(_0x5048e5);},_0x16130c);}):_0x490295||_0x42e42a||_0x6d68c5([0x56,0x61,0x6c,0x69,0x64]);}}function _0x325dfc(_0x1bdad9,_0xec548){return new window[(_0x6d68c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x2b62c5=>{if(_0x261764())return _0x2b62c5(_0x6d68c5([0x56,0x61,0x6c,0x69,0x64]));_0x3232b2(),_0x50397e[_0x6d68c5([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x6d68c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x47d31d=!0x1;const _0x1e64bb=_0x3c2c2c();function _0x1474cc(_0x302442){return!!_0x302442&&(typeof _0x302442===_0x6d68c5([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0x302442===_0x6d68c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0x302442[_0x6d68c5([0x74,0x68,0x65,0x6e])]===_0x6d68c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0x302442[_0x6d68c5([0x63,0x61,0x74,0x63,0x68])]===_0x6d68c5([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x3c0635(_0x573311){_0xdc4849(_0x573311)[_0x6d68c5([0x74,0x68,0x65,0x6e])](_0x123cca=>{if(!_0x123cca||_0x123cca[_0x6d68c5([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x6d68c5([0x6f,0x6b]))return _0x6d68c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2209d4(_0x2951d6(_0x1e64bb+_0xec548))!=_0x123cca[_0x6d68c5([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x6d68c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x6d68c5([0x56,0x61,0x6c,0x69,0x64]);})[_0x6d68c5([0x74,0x68,0x65,0x6e])](_0x4ed5b7=>(_0x2bda3a(),_0x4ed5b7),()=>{const _0x4a1c32=_0x4b489a();return null==_0x4a1c32?(_0x2bda3a(),_0x6d68c5([0x56,0x61,0x6c,0x69,0x64])):_0x6d68c5(_0x4396aa-_0x4a1c32>(0x574a8eb3^_0x18c88e)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x6d68c5([0x74,0x68,0x65,0x6e])](_0x2b62c5)[_0x6d68c5([0x63,0x61,0x74,0x63,0x68])](()=>{_0x2b62c5(_0x6d68c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x5f1f6a=0x7370e433^_0x18c88e;function _0x2bda3a(){const _0x21d6c9=_0x6d68c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x2209d4(_0x2951d6(_0x1bdad9)),_0x525a68=_0x43ad19(_0x2209d4(window[_0x6d68c5([0x4d,0x61,0x74,0x68])][_0x6d68c5([0x63,0x65,0x69,0x6c])](_0x4396aa/_0x5f1f6a)));window[_0x6d68c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x6d68c5([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x21d6c9,_0x525a68);}function _0x4b489a(){const _0x3405e5=_0x6d68c5([0x6c,0x6c,0x63,0x74,0x2d])+_0x2209d4(_0x2951d6(_0x1bdad9)),_0x262234=window[_0x6d68c5([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x6d68c5([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x3405e5);return _0x262234?window[_0x6d68c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x43ad19(_0x262234),0x10)*_0x5f1f6a:null;}function _0xdc4849(_0x599c46){return new window[(_0x6d68c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5a0a5a,_0x2a34f5)=>{_0x599c46[_0x6d68c5([0x74,0x68,0x65,0x6e])](_0x5a0a5a,_0x2a34f5),window[_0x6d68c5([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x2a34f5,0x7347de73^_0x18c88e);});}}_0x50397e[_0x6d68c5([0x6f,0x6e])](_0x6d68c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x50e8c7,_0x3daf1f)=>{if(_0x3daf1f[0x0]!=_0x1bdad9)return _0x2b62c5(_0x6d68c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3daf1f[0x1]={..._0x3daf1f[0x1],[_0x6d68c5([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x1e64bb};},{[_0x6d68c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x6d68c5([0x68,0x69,0x67,0x68])}),_0x50397e[_0x6d68c5([0x6f,0x6e])](_0x6d68c5([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0x536bd5=>{_0x1474cc(_0x536bd5[_0x6d68c5([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x47d31d=!0x0,_0x3c0635(_0x536bd5[_0x6d68c5([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x6d68c5([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x6d68c5([0x6c,0x6f,0x77])}),_0x1ae03d[_0x6d68c5([0x74,0x68,0x65,0x6e])](()=>{_0x47d31d||_0x2b62c5(_0x6d68c5([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x261764(){return _0x50397e[_0x6d68c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x6d68c5([0x76,0x69,0x65,0x77])][_0x6d68c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x6d68c5([0x61,0x75,0x74,0x6f]);}function _0x3232b2(){_0x50397e[_0x6d68c5([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x6d68c5([0x76,0x69,0x65,0x77])][_0x6d68c5([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x6d68c5([0x61,0x75,0x74,0x6f]);}}function _0x4058c1(_0x6c7cb){const _0x3e9f22=[new window[(_0x6d68c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x1799cb=>setTimeout(_0x1799cb,0x734f347f^_0x18c88e)),_0x1ae03d[_0x6d68c5([0x74,0x68,0x65,0x6e])](()=>new window[(_0x6d68c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x11232c=>{let _0x527045=0x0;_0x50397e[_0x6d68c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x6d68c5([0x6f,0x6e])](_0x6d68c5([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x1260b8,_0x4b676a)=>{_0x4b676a[0x0][_0x6d68c5([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x527045++,_0x527045==(0x73460f5b^_0x18c88e)&&(_0x11232c(),_0x1260b8[_0x6d68c5([0x6f,0x66,0x66])]());});}))];return window[_0x6d68c5([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x6d68c5([0x72,0x61,0x63,0x65])](_0x3e9f22)[_0x6d68c5([0x74,0x68,0x65,0x6e])](()=>_0x6c7cb);}async function _0x3de60e(){await _0x1ae03d,_0x50397e[_0x6d68c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x6d68c5([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x16c45e,_0x50397e[_0x6d68c5([0x6d,0x6f,0x64,0x65,0x6c])][_0x6d68c5([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x16c45e,_0x50397e[_0x6d68c5([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x6d68c5([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x2be344(){return window[_0x6d68c5([0x67,0x6c,0x6f,0x62])]&&window[_0x6d68c5([0x67,0x6c,0x6f,0x62])][_0x6d68c5([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x4a1ab5(){return _0x15b094(_0x6d68c5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x1dc830(_0x6d68c5([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x6d68c5([0x73,0x74,0x61,0x74,0x65])]==_0x6d68c5([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5aaa82(){return _0x15b094(_0x6d68c5([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x104500(){return _0x15b094(_0x6d68c5([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x4f9b31(_0x3f521e){const _0x471efc=_0x5f04c3();_0x50397e[_0x471efc]=_0x6d68c5([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x3f521e,_0x3f521e!=_0x6d68c5([0x56,0x61,0x6c,0x69,0x64])&&_0x3de60e();}function _0x5f04c3(){const _0x12c050=window[_0x6d68c5([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x6d68c5([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x6d68c5([0x6e,0x6f,0x77])]())[_0x6d68c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x6d68c5([0x2e]),'');let _0x3dc0be=_0x6d68c5([0x4b]);for(let _0x2c33f0=0x0;_0x2c33f0<_0x12c050[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x2c33f0+=0x2){let _0x299932=window[_0x6d68c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x12c050[_0x6d68c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x2c33f0,_0x2c33f0+0x2));_0x299932>=_0x4f6566[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0x299932-=_0x4f6566[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x3dc0be+=_0x4f6566[_0x299932];}return _0x3dc0be;}function _0x180991(){const _0x454e05=_0x4fc50c[_0x6d68c5([0x73,0x70,0x6c,0x69,0x74])](_0x6d68c5([0x2e]));if(0x3!=_0x454e05[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x44f1be(_0x454e05[0x1]);function _0x44f1be(_0x19bb42){const _0x22aee5=_0x4a3854(_0x19bb42);return _0x22aee5&&_0x2b3f8b()?_0x22aee5:null;function _0x2b3f8b(){const _0x3b3073=_0x22aee5[_0x6d68c5([0x6a,0x74,0x69])],_0x202a50=window[_0x6d68c5([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x3b3073[_0x6d68c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x3b3073[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0x4f7ae3={..._0x22aee5,[_0x6d68c5([0x6a,0x74,0x69])]:_0x3b3073[_0x6d68c5([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x3b3073[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0x4f7ae3[_0x6d68c5([0x76,0x63])],_0x2951d6(_0x4f7ae3)==_0x202a50;}}}async function _0x3e6dbc(){let _0x284c6b=!0x0;try{const _0x381580=_0x4fc50c[_0x6d68c5([0x73,0x70,0x6c,0x69,0x74])](_0x6d68c5([0x2e])),[_0x55f5ac,_0x44d6f7,_0x51b6ca]=_0x381580;return _0x3e0b91(_0x55f5ac),await _0x218ff8(_0x55f5ac,_0x44d6f7,_0x51b6ca),_0x284c6b;}catch{return!0x1;}function _0x3e0b91(_0x519047){const _0x18bad8=_0x4a3854(_0x519047);_0x18bad8&&_0x18bad8[_0x6d68c5([0x61,0x6c,0x67])]==_0x6d68c5([0x45,0x53,0x32,0x35,0x36])||(_0x284c6b=!0x1);}async function _0x218ff8(_0x349cbd,_0x1c91bb,_0x5d4c95){const _0x21d0a3=window[_0x6d68c5([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x6d68c5([0x66,0x72,0x6f,0x6d])](_0x5836ca(_0x5d4c95),_0xc4d305=>_0xc4d305[_0x6d68c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x1179e6=new window[(_0x6d68c5([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x6d68c5([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x349cbd+_0x6d68c5([0x2e])+_0x1c91bb),_0xdace4b=window[_0x6d68c5([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x6d68c5([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0xdace4b)return;const _0x1e791b=await _0xdace4b[_0x6d68c5([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x6d68c5([0x6a,0x77,0x6b]),_0x27a4f0,{[_0x6d68c5([0x6e,0x61,0x6d,0x65])]:_0x6d68c5([0x45,0x43,0x44,0x53,0x41]),[_0x6d68c5([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x6d68c5([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x6d68c5([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0xdace4b[_0x6d68c5([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x6d68c5([0x6e,0x61,0x6d,0x65])]:_0x6d68c5([0x45,0x43,0x44,0x53,0x41]),[_0x6d68c5([0x68,0x61,0x73,0x68])]:{[_0x6d68c5([0x6e,0x61,0x6d,0x65])]:_0x6d68c5([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x1e791b,_0x21d0a3,_0x1179e6)||(_0x284c6b=!0x1);}}function _0x4a3854(_0x3ec33b){return _0x3ec33b[_0x6d68c5([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x6d68c5([0x65,0x79]))?JSON[_0x6d68c5([0x70,0x61,0x72,0x73,0x65])](_0x5836ca(_0x3ec33b)):null;}function _0x5836ca(_0x8ce25d){return window[_0x6d68c5([0x61,0x74,0x6f,0x62])](_0x8ce25d[_0x6d68c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x6d68c5([0x2b]))[_0x6d68c5([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x6d68c5([0x2f])));}function _0x2951d6(_0x3562c8){let _0x1fd0a9=0x1505;function _0x28714a(_0x236e74){for(let _0x1fa63c=0x0;_0x1fa63c<_0x236e74[_0x6d68c5([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x1fa63c++){const _0x58e93b=_0x236e74[_0x6d68c5([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x1fa63c);_0x1fd0a9=(_0x1fd0a9<<0x5)+_0x1fd0a9+_0x58e93b,_0x1fd0a9&=_0x1fd0a9;}}function _0x2a22a4(_0x2908cc){Array[_0x6d68c5([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x2908cc)?_0x2908cc[_0x6d68c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x2a22a4):_0x2908cc&&typeof _0x2908cc==_0x6d68c5([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x6d68c5([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x2908cc)[_0x6d68c5([0x73,0x6f,0x72,0x74])]()[_0x6d68c5([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0x56c123,_0x11812f])=>{_0x28714a(_0x56c123),_0x2a22a4(_0x11812f);}):_0x28714a(window[_0x6d68c5([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x2908cc));}return _0x2a22a4(_0x3562c8),_0x1fd0a9>>>0x0;}function _0x2209d4(_0x543bfd){return _0x543bfd[_0x6d68c5([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x6d68c5([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x6d68c5([0x30]));}function _0x43ad19(_0x21396a){return _0x21396a[_0x6d68c5([0x73,0x70,0x6c,0x69,0x74])]('')[_0x6d68c5([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x6d68c5([0x6a,0x6f,0x69,0x6e])]('');}function _0x15b094(_0x3c852c){return _0x50397e[_0x6d68c5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x6d68c5([0x68,0x61,0x73])](_0x3c852c);}function _0x1dc830(_0x4ea69b){return _0x50397e[_0x6d68c5([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x6d68c5([0x67,0x65,0x74])](_0x4ea69b);}function _0x16c45e(){}function _0x6d68c5(_0x2433c4){return _0x2433c4['map'](_0x55ae60=>String['fromCharCode'](_0x55ae60))['join']('');}_0x4f9b31(await _0x18038b());}(this);}['destroy'](){const _0x540952=this['editor']['plugins']['get'](o),_0x8cdd07=this['editor']['config']['get']('collaboration.channelId');for(const _0x61385c of _0x540952['getCommentThreads']({'channelId':_0x8cdd07}))_0x540952['_detachCommentThread'](_0x61385c['id']),_0x540952['_threads']['delete'](_0x61385c['id']);super['destroy']();}['hasMarkerForId'](_0x88677c){return this['getAllMarkersForId'](_0x88677c)['length']>0x0;}['getAllMarkersForId'](_0xabf276){const _0x432b07=[];for(const _0x4051bd of this['editor']['model']['markers'])_0x4051bd['name']['startsWith']('comment:'+_0xabf276)&&_0x432b07['push'](_0x4051bd);return _0x432b07;}['scrollToThreadMarker'](_0xb5101f){setTimeout(()=>{const _0x5bad57=this['_getTargetForId'](_0xb5101f);if(!_0x5bad57)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0xb5101f&&nt({'target':_0x5bad57[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x5bf6b7){this['editor']['model']['change'](()=>{for(const _0x274048 of this['getAllMarkersForId'](_0x5bf6b7))this['editor']['editing']['reconvertMarker'](_0x274048);});}['_attachArchivedThread'](_0x2237dc){const _0x3e049d=this['editor']['plugins']['get'](o),_0x33d7e6=this['editor']['plugins']['get'](b),_0x5c1d20=_0x3e049d['getCommentThread'](_0x2237dc);if(!_0x5c1d20['isAttached']){const _0x3865d1=_0x5c1d20['attachTo'](()=>this['_getTargetForId'](_0x5c1d20['id']));_0x33d7e6['registerAnnotation'](_0x3865d1),_0x5c1d20['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x391ac2=this['editor'],_0x20e020=_0x391ac2['plugins']['get'](it);_0x391ac2['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0xdbfd24,_0x2f2411)=>{const {id:_0xb128b7}=ft(_0xdbfd24['markerName']),_0x545750=_0x391ac2['plugins']['get'](o)['getCommentThread'](_0xb128b7),_0xeedffe=this['activeMarker']&&ft(this['activeMarker'])['id']===_0xb128b7;let _0x338b0f;if(_0x545750&&_0x545750['isResolved']&&!_0xeedffe&&_0xdbfd24['item'])return _0x2f2411['consumable']['consume'](_0xdbfd24['item'],'addMarker:'+_0xdbfd24['markerName']),_0x2f2411['consumable']['consume'](_0xdbfd24['item'],'removeMarker:'+_0xdbfd24['markerName']),null;const _0x2fad2e=['ck-comment-marker'];return _0xeedffe&&_0x2fad2e['push']('ck-comment-marker--active'),_0x338b0f=_0x545750?.['length']?_0x545750['comments']['first']['author']['id']:_0x20e020['me']['id'],{'classes':_0x2fad2e,'attributes':{'data-comment':_0xb128b7,'data-author-id':_0x338b0f}};}}),_0x391ac2['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x4da8ab,{options:_0x218cc7})=>{if(_0x218cc7['showCommentHighlights'])return null;const _0x3240b5=_0x391ac2['plugins']['get'](o),_0x27f157=_0x391ac2['model']['markers']['get'](_0x4da8ab),{id:_0x2c8f6c,part:_0x580168}=ft(_0x4da8ab);return _0x27f157&&!_0x27f157['affectsData']||_0x218cc7['ignoreResolvedComments']&&_0x3240b5['getCommentThread'](_0x2c8f6c)?.['isResolved']?null:{'group':'comment','name':_0x580168?_0x2c8f6c+':'+_0x580168:_0x2c8f6c};}}),_0x391ac2['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x506197,{writer:_0x156161})=>_0x156161['createElement']('$marker',{'data-name':'comment:'+_0x506197['getAttribute']('id')})}),_0x391ac2['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x4f2557=this['editor'],_0x4322e3=_0x4f2557['plugins']['get'](o),_0x4541f0=new Set(),_0x24a42f=new Set();_0x4f2557['model']['document']['registerPostFixer'](_0x2d05ad=>{let _0x2e8e79=!0x1;for(const {name:_0xa7585,data:_0x5769af}of _0x4f2557['model']['document']['differ']['getChangedMarkers']()){const {group:_0x10f68a,id:_0xa984ab}=ft(_0xa7585);let _0x3d74e3=_0x5769af['newRange'];if('comment'!==_0x10f68a||!_0x3d74e3)continue;const _0x52609b='$graveyard'===_0x3d74e3['root']['rootName'];_0x52609b||(_0x3d74e3=ht(_0x3d74e3,_0x4f2557['model']),!_0x3d74e3||_0x3d74e3['isCollapsed']||!_0x5769af['newRange']||_0x3d74e3['isEqual'](_0x5769af['newRange']))?_0x4f2557['model']['hasContent'](_0x3d74e3)&&!_0x52609b?this['isThreadsLoadingPaused']?_0x4541f0['add'](_0xa7585):this['_handleThreadMarker'](_0xa7585,_0xa984ab):(_0x24a42f['add'](_0xa7585),_0x4541f0['delete'](_0xa7585),_0x2d05ad['removeMarker'](_0xa7585),_0x2e8e79=!0x0):(_0x2d05ad['updateMarker'](_0xa7585,{'range':_0x3d74e3}),_0x2e8e79=!0x0);}return _0x2e8e79;}),this['on']('change:isThreadsLoadingPaused',(_0x58b17d,_0x32abed,_0x10f909)=>{if(!_0x10f909&&_0x4541f0['size'])for(const _0x3f9a49 of _0x4541f0){const {id:_0x226535}=ft(_0x3f9a49);_0x4541f0['delete'](_0x3f9a49),_0x4f2557['model']['markers']['get'](_0x3f9a49)&&this['_handleThreadMarker'](_0x3f9a49,_0x226535);}}),this['listenTo'](_0x4f2557['model']['document'],'change',()=>{for(const {name:_0x12c8b3,data:{newRange:_0x13d7c7}}of _0x4f2557['model']['document']['differ']['getChangedMarkers']()){const {group:_0x26afa9,id:_0x406486}=ft(_0x12c8b3);if('comment'!==_0x26afa9)continue;const _0x404846=_0x4322e3['getCommentThread'](_0x406486),_0x4638b4=this['hasMarkerForId'](_0x406486);_0x404846&&(!_0x404846['_hasTargetInContent']&&_0x13d7c7&&_0x4f2557['editing']['view']['once']('render',()=>{const _0x3bf13f=_0x4f2557['plugins']['get'](y),_0x4577f8=_0x4322e3['_threadToController']['get'](_0x404846)['view'];_0x3bf13f['getByInnerView'](_0x4577f8)['refreshVisibility']();},{'priority':'low'}),_0x404846['_hasTargetInContent']=_0x4638b4||!!_0x13d7c7),_0x13d7c7||(_0x24a42f['add'](_0x12c8b3),_0x4541f0['delete'](_0x12c8b3));}for(const _0x11b2ac of _0x24a42f){const {id:_0x14f904}=ft(_0x11b2ac),_0xf5f2ad=_0x4322e3['getCommentThread'](_0x14f904);if(_0x4541f0['delete'](_0x11b2ac),!_0xf5f2ad)continue;const _0x5ee546=this['hasMarkerForId'](_0x14f904);_0x5ee546||_0xf5f2ad['isSubmitted']?_0x5ee546||_0xf5f2ad['unlinkedAt']||_0xf5f2ad['setUnlinkedAt'](new Date()):_0xf5f2ad['remove']();}_0x24a42f['clear']();});}['_handleInitialThreads'](_0x5e0829){_0x5e0829['forEach'](_0x4ab558=>{_0x4ab558['unlinkedAt']&&this['_attachArchivedThread'](_0x4ab558['id']);});}['_getTargetForId'](_0x1d074d){const _0x3d8923=this['editor'],_0x3c99f0=this['getAllMarkersForId'](_0x1d074d);return et(_0x3d8923['editing'],_0x3c99f0);}['_getTextContext'](_0x117c81){const _0x311f19=this['getAllMarkersForId'](_0x117c81);let _0x5dd839='',_0xd7b3d8=!0x1;for(const _0xb4b32e of _0x311f19){const _0x3729d8=_0xb4b32e['getRange']();for(const _0x2ef3a9 of Array['from'](_0x3729d8['getItems']()))_0x2ef3a9['is']('$textProxy')?(_0x5dd839&&_0xd7b3d8&&(_0x5dd839+='\x20',_0xd7b3d8=!0x1),_0x5dd839+=_0x2ef3a9['data']):_0xd7b3d8=!0x0;_0xd7b3d8=!0x0;}return _0x5dd839['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x536041,_0x149c66){const _0x711340=this['editor'],_0x51aed4=_0x711340['plugins']['get'](o);let _0x4c9bab=_0x51aed4['getCommentThread'](_0x149c66);const _0x1880e2=_0x711340['config']['get']('collaboration.channelId'),_0x14366e=_0x711340['plugins']['get'](b);if(_0x4c9bab&&(_0x4c9bab['unlinkedAt']&&_0x4c9bab['setUnlinkedAt'](null),_0x4c9bab['isAttached']))return _0x4c9bab;return!this['getAllMarkersForId'](_0x149c66)[0x0]['managedUsingOperations']?_0x711340['editing']['view']['once']('render',()=>{if(_0x51aed4['getCommentThread'](_0x149c66))return;const _0x14bf11=_0x711340['plugins']['get'](y);_0x4c9bab=_0x51aed4['openNewCommentThread']({'channelId':_0x1880e2,'threadId':_0x149c66,'target':()=>this['_getTargetForId'](_0x149c66),'context':{'type':'text','value':this['_getTextContext'](_0x149c66)}});const _0x1374fa=_0x51aed4['_threadToController']['get'](_0x4c9bab)['view'],_0x448bca=_0x14bf11['getByInnerView'](_0x1374fa);_0x448bca&&_0x14366e['registerAnnotation'](_0x448bca);},{'priority':'low'}):_0x51aed4['fetchCommentThread']({'channelId':_0x1880e2,'threadId':_0x149c66})['then'](_0x48cfcb=>{if('destroyed'!==_0x711340['state']){if(_0x4c9bab=_0x48cfcb,_0x4c9bab&&!_0x4c9bab['isAttached']){const _0x434817=_0x4c9bab['attachTo'](()=>this['_getTargetForId'](_0x149c66));_0x14366e['registerAnnotation'](_0x434817),_0x4c9bab['isResolved']&&this['_reconvertMarkers'](_0x149c66);}else{if(!_0x4c9bab){const _0x5aeac1=this['getAllMarkersForId'](_0x149c66);_0x711340['model']['change'](_0x3f4c5a=>{for(const _0x2909f1 of _0x5aeac1)_0x3f4c5a['removeMarker'](_0x2909f1);});}}}}),_0x4c9bab;}['_handleThreadMarker'](_0x4e26c1,_0x260f56){const _0x42b85e=this['_attachMarkerToThread'](_0x4e26c1,_0x260f56);_0x42b85e&&!_0x42b85e['context']&&_0x42b85e['setContext']({'type':'text','value':this['_getTextContext'](_0x260f56)});}['_initAriaMarkerChangeAnnouncements'](){const _0x1411f7=this['editor'];rt(_0x1411f7['model'],({left:_0x1f8d78,entered:_0x287f21})=>{for(const _0x3f6135 of _0x1f8d78)if(mt(_0x3f6135)){_0x1411f7['ui']['ariaLiveAnnouncer']['announce'](N(_0x1411f7['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1c4391 of _0x287f21)if(mt(_0x1c4391)){_0x1411f7['ui']['ariaLiveAnnouncer']['announce'](N(_0x1411f7['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x40fa44)));break;}});}}function dt(_0x2b74ec,_0x2eb029){return _0x2eb029?_0x2b74ec+':'+_0x2eb029:_0x2b74ec;}function ht(_0x16e740,_0x26b472){const _0x177729=_0x26b472['schema'],_0x40d1ed=_0x26b472['createRange'](_0x16e740['start']);for(const _0x1abf4d of _0x16e740['getWalker']()){const {type:_0x3b047c,item:_0x2e8276,nextPosition:_0x279e24}=_0x1abf4d;if('text'===_0x3b047c||_0x177729['isObject'](_0x2e8276)){const _0x7931c1=_0x26b472['createPositionBefore'](_0x2e8276);_0x40d1ed['isCollapsed']&&(_0x40d1ed['start']=_0x7931c1),_0x40d1ed['end']=_0x279e24;}}return _0x40d1ed;}function mt(_0x21083b){return'comment'===ft(_0x21083b['name'])['group'];}class s extends _0x5bfff9{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0x54038a=this['editor'],_0x2e50e0=_0x54038a['plugins']['get'](o),_0x439ffb=_0x54038a['plugins']['get'](r),_0x4e4edb=_0x54038a['plugins']['get'](y),_0x4116e3=_0x54038a['plugins']['get'](b);_0x54038a['ui']['componentFactory']['add']('comment',()=>{const _0xf4d3e0=this['_createUIButton'](_0x92fc17);return _0xf4d3e0['tooltip']=!0x0,_0xf4d3e0;}),_0x54038a['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x580bc6)),_0x4116e3['addSourceCollector'](()=>{const _0x1790bd=[];for(const [_0x2c0319,_0x2c1860]of _0x2e50e0['_threadToController']){const _0x167792=_0x439ffb['getAllMarkersForId'](_0x2c0319['id']),_0x3b6e1d=_0x167792['map'](_0x5ca258=>_0x5ca258['getRange']());_0x167792['length']>0x0&&_0x1790bd['push']([_0x2c1860['view'],_0x3b6e1d]);}return _0x1790bd;}),this['listenTo'](_0x4e4edb,'change:activeAnnotations',(_0x3882ac,_0x3c940f,_0x532a7d)=>{const _0x280af8=Array['from'](_0x532a7d)['map'](_0x22702e=>_0x22702e['innerView'])['find'](_0xb4c200=>_0x2e50e0['_viewToController']['has'](_0xb4c200));if(!_0x280af8)return void(_0x439ffb['activeMarker']=null);const _0x2a4321=_0x2e50e0['_viewToController']['get'](_0x280af8)['model']['id'],_0x743905='comment:'+_0x2a4321;_0x2a4321&&_0x439ffb['hasMarkerForId'](_0x2a4321)?_0x439ffb['activeMarker']=_0x743905:_0x439ffb['activeMarker']&&(_0x439ffb['activeMarker']=null);}),this['listenTo'](_0x2e50e0,'removeCommentThread',(_0x447965,{threadId:_0x134a43,isFromAdapter:_0x1cb34f})=>{!_0x1cb34f&&_0x54038a['ui']['focusTracker']['isFocused']&&_0x439ffb['hasMarkerForId'](_0x134a43)&&_0x54038a['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2e50e0,'addComment',(_0x53fc10,{threadId:_0x53d5bb,isFromAdapter:_0x1493d})=>{if(_0x1493d||!_0x439ffb['hasMarkerForId'](_0x53d5bb)||!_0x2e50e0['hasCommentThread'](_0x53d5bb))return;0x1===_0x2e50e0['getCommentThread'](_0x53d5bb)['length']&&(_0x54038a['editing']['view']['focus'](),_0x53fc10['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x484861=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x5a60c7;for(const _0x1f3bea in _0x484861){const _0x56c0f3=_0x1f3bea,_0x5310e1=_0x484861[_0x56c0f3];if('commentsLicenseKeyValid'==_0x5310e1||'commentsLicenseKeyInvalid'==_0x5310e1||'commentsLicenseKeyExpired'==_0x5310e1||'commentsLicenseKeyDomainLimit'==_0x5310e1||'commentsLicenseKeyNotAllowed'==_0x5310e1||'commentsLicenseKeyEvaluationLimit'==_0x5310e1||'commentsLicenseKeyUsageLimit'==_0x5310e1){delete _0x484861[_0x56c0f3],_0x5a60c7=_0x5310e1,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x5a60c7&&_0x484861['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x5a60c7&&_0x484861['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x5a60c7&&_0x484861['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x5a60c7&&_0x484861['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x5a60c7&&_0x484861['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x5a60c7&&_0x484861['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x352271){const _0x20dcd3=this['editor'],_0x567ee9=new _0x352271(_0x20dcd3['locale']),_0x55a79b=_0x20dcd3['commands']['get']('addCommentThread');return _0x567ee9['set']({'label':N(_0x20dcd3['locale'],'Comment'),'icon':_0x33d1d5}),_0x567ee9['bind']('isEnabled')['to'](_0x55a79b,'isEnabled',_0x55a79b,'hasContent',(_0x49697a,_0x5e8f8a)=>_0x49697a&&_0x5e8f8a),this['listenTo'](_0x567ee9,'execute',()=>{_0x55a79b['execute']();}),_0x567ee9;}}class i extends _0x5bfff9{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x30639a){super(_0x30639a),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x1fd12d,_0x2db538,_0x27e437)=>{_0x27e437?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x30d958,_0x4b5060]of this['editor']['commands'])_0x4b5060['affectsData']&&'addCommentThread'!==_0x30d958&&_0x4b5060['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x15146f=this['editor']['editing']['view']['document'];this['listenTo'](_0x15146f,'cut',_0x1ff2ae=>_0x1ff2ae['stop'](),{'priority':'highest'}),this['listenTo'](_0x15146f,'clipboardInput',_0x11aec2=>_0x11aec2['stop'](),{'priority':'highest'}),this['listenTo'](_0x15146f,'delete',_0x58e35b=>_0x58e35b['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0xe834b7,_0xfc3ad3]of this['editor']['commands'])_0xfc3ad3['affectsData']&&'addCommentThread'!==_0xe834b7&&_0xfc3ad3['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x16d542{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x520d99){super(_0x520d99),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x26db5b=this['context']['plugins']['get'](y);this['listenTo'](_0x26db5b,'_activateAnnotation',(_0x3214e5,_0x2d1b9d)=>{for(const _0x325974 of this['activeUIs']){const _0x40aacb=this['_uis']['get'](_0x325974);(0x0,this['uisData']['get'](_0x325974)['filter'])(_0x2d1b9d)&&_0x40aacb['setActiveAnnotation'](_0x2d1b9d);}}),this['listenTo'](_0x26db5b,'_deactivateAllAnnotations',()=>{for(const _0x208a76 of this['activeUIs']){this['_uis']['get'](_0x208a76)['setActiveAnnotation'](null);}}),this['listenTo'](_0x26db5b['_visibleAnnotations'],'add',(_0xe9c505,_0x5a79c4)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x5a79c4);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4372f8){return this['activeUIs']['has'](_0x4372f8);}['activate'](_0x17cfbb,_0x1e119a=this['defaultFilter']){const _0x15d0d3=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x17cfbb))throw new _0x438ae8('annotationsuis-missing-ui',this,{'uiName':_0x17cfbb});this['isActive'](_0x17cfbb)&&this['deactivate'](_0x17cfbb),this['activeUIs']['add'](_0x17cfbb);const _0x2db069=new S();v({'source':_0x15d0d3['_visibleAnnotations'],'target':_0x2db069,'filter':_0x1e119a}),this['uisData']['set'](_0x17cfbb,{'collection':_0x2db069,'filter':_0x1e119a});const _0x27001d=this['_uis']['get'](_0x17cfbb);_0x27001d['attach'](_0x2db069),this['listenTo'](_0x27001d,'change:activeAnnotation',(_0x2c0810,_0x1414fd,_0x413267,_0x283bc5)=>{_0x283bc5&&_0x15d0d3['_removeActiveAnnotation'](_0x283bc5),_0x413267&&_0x15d0d3['_addActiveAnnotation'](_0x413267);});}['deactivate'](_0x49bbf9){if(this['activeUIs']['delete'](_0x49bbf9),!this['_uis']['has'](_0x49bbf9))throw new _0x438ae8('annotationsuis-missing-ui',this,{'uiName':_0x49bbf9});const _0x8a146d=this['_uis']['get'](_0x49bbf9);_0x8a146d['detach'](),this['stopListening'](_0x8a146d),this['uisData']['get'](_0x49bbf9)['collection']['destroy'](),this['uisData']['delete'](_0x49bbf9);}['switchTo'](_0x454563){if(!this['_uis']['has'](_0x454563))throw new _0x438ae8('annotationsuis-missing-ui',this,{'uiName':_0x454563});const _0x32681e=this['context']['plugins']['get'](y),_0x57157d=Array['from'](_0x32681e['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x454563);const _0x2782b1=this['_uis']['get'](_0x454563);_0x2782b1['setActiveAnnotation'](_0x57157d),_0x2782b1['_setSelectedAnnotations']&&_0x57157d&&_0x2782b1['_setSelectedAnnotations']([_0x57157d]);}['deactivateAll'](){for(const _0x4d595b of this['activeUIs'])this['deactivate'](_0x4d595b);}['register'](_0x2d972b,_0x4b039b){if(this['_uis']['has'](_0x2d972b))throw new _0x438ae8('annotationsuis-register-already-registered');if('function'!=typeof _0x4b039b['attach']||'function'!=typeof _0x4b039b['detach']||'function'!=typeof _0x4b039b['setActiveAnnotation'])throw new _0x438ae8('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x2d972b,_0x4b039b);}['refilterAnnotations'](){const _0x5d2ecb=this['context']['plugins']['get'](y)['collection'],_0x562b19=new Map(),_0x5ce87d=Array['from'](this['activeUIs']);for(const _0x2cea31 of this['activeUIs']){const _0x43c198=this['uisData']['get'](_0x2cea31)['collection'];for(const _0x3f94f6 of _0x43c198)_0x562b19['set'](_0x3f94f6,_0x2cea31);}for(const _0x41398a of _0x5d2ecb){const _0x295338=_0x562b19['get'](_0x41398a);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x41398a);const _0x302434=_0x5ce87d['find'](_0x4d1577=>this['uisData']['get'](_0x4d1577)['filter'](_0x41398a));_0x295338!==_0x302434&&(_0x295338&&this['uisData']['get'](_0x295338)['collection']['remove'](_0x41398a),_0x302434&&this['uisData']['get'](_0x302434)['collection']['add'](_0x41398a));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x1d4ece){const _0x14e30e=[];for(const _0x3d6550 of this['activeUIs']){(0x0,this['uisData']['get'](_0x3d6550)['filter'])(_0x1d4ece)&&_0x14e30e['push'](_0x3d6550);}if(_0x14e30e['length']>0x1)throw new _0x438ae8('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x14e30e,'annotationType':_0x1d4ece['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
-
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(
|
|
33
|
-
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x5a540b){super(_0x5a540b),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x4a69da,_0x295990)=>_0x4a69da+_0x295990),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x479072=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x479072['to']('isAnimationDisabled',_0x10dac8=>_0x10dac8?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x479072['to']('top',_0x35f0a5=>Ot(_0x35f0a5))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x54664=this['element']['clientHeight'];_0x54664&&(this['height']=_0x54664);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x16d542{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x215ccb){super(_0x215ccb),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 _0x33491a=this['context']['config']['get']('sidebar.container');_0x33491a&&this['setContainer'](_0x33491a);}['setContainer'](_0x418bb8){if(!g(_0x418bb8))throw new _0x438ae8('sidebar-setcontainer-invalid-element');this['container']=_0x418bb8;}['_attachToContainer']({viewClass:_0x35218b='',spaceBetweenItems:_0x326dd0=0x19}={}){if(!g(this['container']))throw new _0x438ae8('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x35218b,this['_spaceBetweenItems']=_0x326dd0;}['rearrange']({removedAnnotation:_0x41488a,previousAnnotation:_0x233c97,nextAnnotation:_0x5594dc}){const _0x2fddcc=this['getSidebarItemView'](_0x41488a);this['view']['list']['remove'](_0x2fddcc),this['_destroySidebarItemView'](_0x41488a),_0x233c97&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x233c97)),_0x5594dc&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x5594dc)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x5aec85,activatedAnnotation:_0x3f0b88,disableAnimationOnActivatedAnnotation:_0x25fd6e}){if(this['_activeAnnotation']=_0x3f0b88,_0x5aec85){_0x5aec85['isActive']=!0x1;const _0x1321ea=this['getSidebarItemView'](_0x5aec85);_0x1321ea&&_0x25fd6e&&(_0x1321ea['isAnimationDisabled']=!0x1);}if(_0x3f0b88){const _0x8f2bcc=this['getSidebarItemView'](_0x3f0b88);_0x8f2bcc&&(_0x3f0b88['isActive']=!0x0,_0x25fd6e&&(_0x8f2bcc['isAnimationDisabled']=!0x0,_0x8f2bcc['top']+=0x1),this['_alignToTargetRect'](_0x8f2bcc));}}['_detachFromContainer'](_0x47738a){if(this['view']['element']['remove'](),_0x47738a){for(const _0x117462 of _0x47738a)this['_destroySidebarItemView'](_0x117462);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x47bf8a,_0xeae132){_0xeae132||(_0xeae132=_0x47bf8a['view']);const _0x343996=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x343996,_0x47bf8a),this['_annotationToSidebarItemView']['set'](_0x47bf8a,_0x343996),_0x343996['content']['add'](_0xeae132),this['listenTo'](_0x47bf8a['view'],'change:targetRect',(_0x2ee4c9,_0x3b9ae3,_0x680cbb)=>{const _0x4c1610=this['_getTargetTop'](_0x47bf8a,_0x680cbb);_0x343996['_targetTop']!=_0x4c1610&&(_0x343996['_targetTop']=_0x4c1610,this['_setItemTop'](_0x343996,_0x4c1610));}),this['listenTo'](_0x343996,'change:top',()=>{this['_recalculate'](_0x343996,'top');}),this['listenTo'](_0x343996,'change:bottom',()=>{this['_recalculate'](_0x343996,'bottom');}),this['_alignToTargetRect'](_0x343996);const _0x5ae253=this['_getItemBefore'](_0x343996);if(_0x5ae253)this['_alignAfterItem'](_0x5ae253,_0x343996)||this['_alignToTargetRect'](_0x343996);else this['_alignToTargetRect'](_0x343996);return this['_updateLastItem'](),this['view']['list']['add'](_0x343996),_0x343996;}['_alignForTopChange'](_0x88169b){if(!_0x88169b['content']['length'])return;const _0x51ca77=this['_getItemBefore'](_0x88169b);if(!_0x51ca77)return;const _0x122b5d=this['_sidebarItemViewToAnnotation']['get'](_0x51ca77),_0x3edcdd=this['_activeAnnotation'];_0x3edcdd&&_0x3edcdd===_0x122b5d?this['_alignAfterItem'](_0x51ca77,_0x88169b):this['_alignBeforeItem'](_0x88169b,_0x51ca77);}['_alignForBottomChange'](_0x4fa021){if(!_0x4fa021['content']['length'])return;const _0x40a8ba=this['_getItemAfter'](_0x4fa021);if(!_0x40a8ba)return;const _0x2f307f=this['_sidebarItemViewToAnnotation']['get'](_0x40a8ba),_0x502d1b=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x407d99=this['_activeAnnotation'];_0x407d99&&_0x407d99===_0x2f307f&&_0x502d1b?(this['_alignBeforeItem'](_0x40a8ba,_0x4fa021),this['_alignAfterItem'](_0x4fa021,_0x40a8ba)):_0x407d99&&_0x407d99===_0x2f307f?this['_alignBeforeItem'](_0x40a8ba,_0x4fa021):this['_alignAfterItem'](_0x4fa021,_0x40a8ba);}['_recalculate'](_0x4fbd99,_0x2cdd2d){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x4e49fa,changedProp:_0x16a7dc}of this['_recalculateBuffer'])'top'===_0x16a7dc?this['_alignForTopChange'](_0x4e49fa):this['_alignForBottomChange'](_0x4e49fa);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4fbd99,'changedProp':_0x2cdd2d});}['getSidebarItemView'](_0xfddcfb){return this['_annotationToSidebarItemView']['get'](_0xfddcfb);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x279b14){const _0x2f127e=this['getSidebarItemView'](_0x279b14);this['stopListening'](_0x2f127e),this['stopListening'](_0x279b14['view']),_0x2f127e['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x279b14),this['_sidebarItemViewToAnnotation']['delete'](_0x2f127e);}['_createSidebarView'](){const _0x275762=new H(this['context']['locale']);return _0x275762['render'](),this['on']('change:_lastItem',(_0x49d9bc,_0x263b2c,_0xa1b7ac,_0x517e92)=>{_0x517e92&&_0x275762['unbind']('minHeight'),_0xa1b7ac?_0x275762['bind']('minHeight')['to'](_0xa1b7ac,'bottom'):_0x275762['minHeight']=null;}),_0x275762;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0xdecdf5){const _0x733f85=this['_sidebarItemViewToAnnotation']['get'](_0xdecdf5),_0x32f0a5=_0x733f85&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x733f85)-0x1);return _0x32f0a5&&this['getSidebarItemView'](_0x32f0a5)||null;}['_getItemAfter'](_0x11d1f3){const _0x5952e9=this['_sidebarItemViewToAnnotation']['get'](_0x11d1f3),_0x5b0afe=_0x5952e9&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5952e9)+0x1);return _0x5b0afe&&this['getSidebarItemView'](_0x5b0afe)||null;}['_alignBeforeItem'](_0x455713,_0xd97e19){_0x455713['updateHeight']();const _0x13c585=G(_0xd97e19['bottom']+this['_spaceBetweenItems'],_0x455713['top']);return!!_0x13c585&&(this['_setItemTop'](_0xd97e19,_0xd97e19['top']-_0x13c585),!0x0);}['_alignAfterItem'](_0x958452,_0x4825b6){_0x958452['updateHeight']();const _0x28424f=G(_0x958452['bottom']+this['_spaceBetweenItems'],_0x4825b6['top']);return!!_0x28424f&&(this['_setItemTop'](_0x4825b6,_0x4825b6['top']+_0x28424f,!0x1),!0x0);}['_alignToTargetRect'](_0x4af400){const _0x14dfe5=this['_sidebarItemViewToAnnotation']['get'](_0x4af400);if(!_0x14dfe5||!_0x14dfe5['target']||!_0x14dfe5['targetRect'])return;const _0x5375bb=this['_getTargetTop'](_0x14dfe5,_0x14dfe5['targetRect']);this['_setItemTop'](_0x4af400,_0x5375bb);}['_getTargetTop'](_0x22db58,_0x35056a){if(null===_0x35056a)return 0x0;if(_0x22db58['target']instanceof _0x3aaff1)return _0x35056a['top'];{const _0xff8ff1=new _0x3aaff1(this['view']['element'])['top'];return _0x35056a['top']-_0xff8ff1;}}['_setItemTop'](_0x2825cd,_0x427f18,_0x2694b2=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x2694b2&&(_0x427f18=Math['max'](_0x427f18,this['_getMaxAvailableTop'](_0x2825cd))),_0x2825cd['top']=_0x427f18;}['_getMaxAvailableTop'](_0x58ef0f){let _0x46ae12=this['_getItemBefore'](_0x58ef0f),_0xd43750=0x0;for(;_0x46ae12;)_0x46ae12['updateHeight'](),_0xd43750+=this['_spaceBetweenItems']+_0x46ae12['height'],_0x46ae12=this['_getItemBefore'](_0x46ae12);return _0xd43750;}}function G(_0x2ce4a4,_0xca3ff0){return Math['max'](_0x2ce4a4-_0xca3ff0,0x0);}function g(_0x28b393){return null!==_0x28b393&&'object'==typeof _0x28b393&&0x1===_0x28b393['nodeType'];}class e extends _0x16d542{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x51af30){super(_0x51af30),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x4910b0(),this['_refreshPositioningDebounced']=_0x415108(()=>{_0x51af30['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x46c22f=this['context']['plugins']['get'](j),_0x3002ea=this['context']['plugins']['get'](z);_0x46c22f['register']('wideSidebar',this),_0x3002ea['container']&&_0x46c22f['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x503143){if(_0x503143===this['activeAnnotation'])return;const _0xd385b9=this['context']['plugins']['get'](z);_0xd385b9['_activeAnnotation']=_0x503143;const _0x48c5b9=this['activeAnnotation'];_0xd385b9['refresh']({'blurredAnnotation':_0x48c5b9,'activatedAnnotation':_0x503143}),this['activeAnnotation']=_0x503143;}['attach'](_0x2a5245){this['annotations']=_0x2a5245;const _0x2d1985=this['context']['plugins']['get'](z);if(_0x2d1985['_annotations']=_0x2a5245,this['isAttached'])throw new _0x438ae8('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x2d1985,'set:container',()=>{this['detach'](),this['listenTo'](_0x2d1985,'change:container',_0x2d467c=>{_0x2d467c['off'](),this['attach'](_0x2a5245);});}),_0x2d1985['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x145000=_0x44edd0=>{_0x44edd0['updateTargetRect'](),_0x2d1985['addAnnotation'](_0x44edd0);};for(const _0x1d7288 of _0x2a5245)_0x145000(_0x1d7288);this['listenTo'](_0x2a5245,'add',(_0x14060b,_0x658a4f)=>{_0x145000(_0x658a4f);}),this['listenTo'](_0x2a5245,'remove',(_0xeda01d,_0x404c55,_0x364165)=>{_0x2d1985['rearrange']({'removedAnnotation':_0x404c55,'previousAnnotation':_0x2a5245['get'](_0x364165-0x1),'nextAnnotation':_0x2a5245['get'](_0x364165+0x1)}),_0x404c55===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x2a5245,'focus',(_0x211e76,_0x99194)=>{this['setActiveAnnotation'](_0x99194);}),this['listenTo'](_0x2a5245,'blur',()=>{this['setActiveAnnotation'](null);});const _0x2a60cb=this['context']instanceof _0x2c4ae6?this['context']['editors']:new _0x4910b0([this['context']]);for(const _0x1f06f5 of _0x2a60cb)this['_integrateWithEditorAnnotations'](_0x1f06f5);this['listenTo'](_0x2a60cb,'add',(_0x516550,_0x480473)=>{this['listenTo'](_0x480473,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x480473);});}),this['listenTo'](_0x2a60cb,'remove',(_0xb28e8a,_0x1c0387)=>{_0x1c0387['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1c0387['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x438ae8('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x4c7356=this['context']['plugins']['get'](z);_0x4c7356['_detachFromContainer'](this['annotations']),this['stopListening'](_0x4c7356),this['stopListening'](this['annotations']),this['context']instanceof _0x2c4ae6&&this['stopListening'](this['context']['editors']);for(const _0x1b0c6d of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x1b0c6d);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x42c735){if(!_0x42c735['plugins']['has']('EditorAnnotations'))return;const _0x39002a=_0x42c735['plugins']['get']('EditorAnnotations'),_0x151bba=()=>{const _0x3a4d5d=_0x39002a['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x3a4d5d[0x0]||null);};this['listenTo'](_0x39002a,'refresh',_0x151bba),this['listenTo'](_0x39002a,'blur',(_0x306cca,{isAnnotationTracked:_0xcd1254})=>{this['activeAnnotation']&&_0xcd1254(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x39002a,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x5b3e32=>{_0x39002a['hasDomSelection']()&&(_0x151bba(),_0x5b3e32['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x39002a);}['_destroyEditorAnnotationsIntegration'](_0x470a0b){this['stopListening'](_0x470a0b),this['_editorAnnotations']['remove'](_0x470a0b);}}class C extends _0x92fc17{['counterView'];constructor(_0x496e0d){super(_0x496e0d);const _0x1983ae=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x4c33f6,_0x3e21a)=>_0x4c33f6?'...':_0x3e21a['toString']()),this['set']('annotationType',''),this['icon']=_0x33d1d5,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x1983ae['to']('annotationType',_0x961fc5=>'ck-annotation-counter__badge--'+_0x961fc5),_0x1983ae['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x1983ae['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x16d542{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x6585c9){super(_0x6585c9),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x2943f())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x4910b0(),this['_refreshPositioningDebounced']=_0x415108(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0xbae318(this['context']['locale']),this['balloonPanelView']=new _0x56e4d9(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0xb5972d){this['annotations']=_0xb5972d;const _0x5be04b=this['context']['plugins']['get'](z),_0x45e09f=this['balloonPanelView'];if(_0x5be04b['_annotations']=_0xb5972d,this['isAttached'])throw new _0x438ae8('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x5be04b,'set:container',()=>{this['detach'](),this['listenTo'](_0x5be04b,'change:container',_0x3dcc26=>{_0x3dcc26['off'](),this['attach'](_0xb5972d);});}),_0x5be04b['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x1ebb7b=_0x4aa711=>{const _0x9c642a=new C(this['context']['locale']);_0x5be04b['addAnnotation'](_0x4aa711,_0x9c642a),this['_annotationToNarrowView']['set'](_0x4aa711,_0x9c642a),_0x9c642a['bind']('isDirty','annotationType','number')['to'](_0x4aa711['view'],'isDirty','type','length'),_0x9c642a['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x45e09f['content']['first']!==_0x4aa711['view']?(this['_showBalloon'](_0x4aa711),_0x4aa711['view']['element']['focus'](),this['setActiveAnnotation'](_0x4aa711)):this['setActiveAnnotation'](null);});};for(const _0x3659f0 of _0xb5972d)_0x1ebb7b(_0x3659f0);this['listenTo'](_0xb5972d,'add',(_0x2e8f21,_0x5a83c3)=>{_0x1ebb7b(_0x5a83c3);}),this['listenTo'](_0xb5972d,'remove',(_0x34a505,_0x392472,_0x37bc3e)=>{this['_annotationToNarrowView']['get'](_0x392472)['destroy'](),this['_annotationToNarrowView']['delete'](_0x392472),_0x5be04b['rearrange']({'removedAnnotation':_0x392472,'previousAnnotation':_0xb5972d['get'](_0x37bc3e-0x1),'nextAnnotation':_0xb5972d['get'](_0x37bc3e+0x1)}),_0x392472===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0xb5972d,'focus',(_0x105daa,_0x19f7a9)=>{this['setActiveAnnotation'](_0x19f7a9);}),this['listenTo'](_0xb5972d,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0xe958d4,_0x493a22)=>{_0x493a22['keyCode']===_0x43ec69['esc']&&_0x45e09f['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x45e09f['content']['first']),this['_hideBalloon'](),_0x493a22['stopPropagation'](),_0x493a22['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x35edb1,_0x4d234f)=>{const _0x330575=_0x4d234f['target'];_0x45e09f['isVisible']&&_0x45e09f['element']['contains'](_0x330575)||_0x5be04b['view']['element']['contains'](_0x330575)||_0x35edb1['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x93f6ba=>_0x93f6ba['contains'](_0x330575))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x520009=this['context']instanceof _0x2c4ae6?this['context']['editors']:new _0x4910b0([this['context']]);for(const _0x6c7973 of _0x520009)this['_integrateWithEditorAnnotations'](_0x6c7973);this['listenTo'](_0x520009,'add',(_0x2d7a30,_0x32f468)=>{this['listenTo'](_0x32f468,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x32f468);});}),this['listenTo'](_0x520009,'remove',(_0x5a03cf,_0x349245)=>{_0x349245['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x349245['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x5ee490){if(_0x5ee490===this['activeAnnotation'])return;const _0x310d1c=this['context']['plugins']['get'](z);if(_0x310d1c['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x5ee490,'disableAnimationOnActivatedAnnotation':!0x0}),_0x5ee490)_0x310d1c['getSidebarItemView'](_0x5ee490)?this['_showBalloon'](_0x5ee490):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x5ee490;}['detach'](){if(!this['isAttached'])throw new _0x438ae8('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x2c12b0=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2db7cb=>_0x2db7cb['destroy']()),this['_annotationToNarrowView']['clear'](),_0x2c12b0['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x2c4ae6&&this['stopListening'](this['context']['editors']);for(const _0x4de322 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x4de322);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'](_0x5a8ea1){if(!_0x5a8ea1['plugins']['has']('EditorAnnotations'))return;const _0x4c5c8d=_0x5a8ea1['plugins']['get']('EditorAnnotations'),_0x34f9d8=this['context']['plugins']['get'](z),_0x3e52c2=this['annotations'],_0x5eaf3c=this['balloonPanelView'],_0x38a9b6=()=>{const _0x18789f=_0x4c5c8d['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x18789f),this['setActiveAnnotation'](_0x18789f[0x0]||null);};this['listenTo'](_0x4c5c8d,'refresh',_0x38a9b6),this['listenTo'](_0x4c5c8d,'blur',(_0xe0e8ee,{isAnnotationTracked:_0x1d3d92})=>{this['activeAnnotation']&&_0x1d3d92(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x4c5c8d,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0x3e52c2,'blur',_0xfacd1d=>{_0x4c5c8d['hasDomSelection']()&&_0xfacd1d['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x54c1e2,_0x7c1ffa)=>{const _0x8bebc8=_0x7c1ffa['target'];_0x5eaf3c['isVisible']&&_0x5eaf3c['element']['contains'](_0x8bebc8)||_0x34f9d8['view']['element']['contains'](_0x8bebc8)||this['activeAnnotation']&&_0x4c5c8d['hasDomSelection']()&&(_0x38a9b6(),_0x54c1e2['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4c5c8d);}['_destroyEditorAnnotationsIntegration'](_0x29a063){_0x29a063&&(this['stopListening'](_0x29a063),this['_editorAnnotations']['remove'](_0x29a063));}['_setSelectedAnnotations'](_0x538ea8){for(const _0x5ea559 of this['_selectedAnnotations'])_0x538ea8['includes'](_0x5ea559)||this['_manuallyClosedAnnotationViews']['delete'](_0x5ea559['view']);this['_selectedAnnotations']=_0x538ea8;}['_refreshPositioning'](){const _0x55c06d=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x55c06d['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0x62ff83){if(this['_manuallyClosedAnnotationViews']['has'](_0x62ff83['view']))return;const _0x3ca194=this['balloonPanelView']['content']['first'];_0x3ca194!==_0x62ff83['view']?(_0x3ca194&&this['_detachListeners'](_0x3ca194),this['_attachListeners'](_0x62ff83['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0x62ff83['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x37d1f4=this['balloonPanelView']['content']['first'],_0x580aca=_0x37d1f4&&this['annotations']['getByView'](_0x37d1f4);if(!_0x580aca||!this['_annotationToNarrowView']['has'](_0x580aca))return;const _0x33b460=this['_annotationToNarrowView']['get'](_0x580aca)['element'],_0x1e6e74=(function(){const _0x327409=_0x56e4d9['defaultPositions'];return[_0x327409['southArrowNorthEast'],_0x327409['northArrowSouthEast'],_0x327409['southArrowNorth'],_0x327409['northArrowSouth'],_0x327409['southArrowNorthWest'],_0x327409['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x33b460,'positions':_0x1e6e74});}['_hideBalloon'](){const _0x342e3f=this['balloonPanelView'],_0x1e8320=_0x342e3f['content']['first'];_0x1e8320&&(this['_detachListeners'](_0x1e8320),_0x342e3f['unpin'](),_0x342e3f['content']['clear']());}['_attachListeners'](_0x120c1c){this['listenTo'](_0x120c1c,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x120c1c,'Esc',(_0x18dd8,_0x1ee5d8)=>{this['_manuallyClosedAnnotationViews']['add'](_0x120c1c),this['_hideBalloon'](),_0x1ee5d8();});}['_detachListeners'](_0x378e37){this['stopListening'](_0x378e37);}}class c extends _0x5bfff9{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x4f6bfe,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x18fb53){super(_0x18fb53),_0x18fb53['editing']['view']['addObserver'](_0x54cf02),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x18fb53['plugins']['get'](_0x4f6bfe),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x415108(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x374649=this['editor']['plugins']['get'](j);_0x374649['context']===this['editor']&&(_0x374649['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x1f97f5,_0x50d6bf)=>{const _0x5836d4=this['_balloon'];if(this['isAttached']&&_0x5836d4['visibleView']){const _0x147356=this['annotations']['getByView'](_0x5836d4['visibleView']);_0x147356&&this['_closeAnnotation'](_0x147356),_0x50d6bf();}}));}['afterInit'](){const _0x534a34=this['editor']['plugins']['get'](j);_0x534a34['context']===this['editor']&&(_0x534a34['hasActive']()||_0x534a34['switchTo']('inline'));}['setActiveAnnotation'](_0x5c7224){_0x5c7224!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x5c7224&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x5c7224)&&this['_addAnnotationToBalloon'](_0x5c7224,!0x0),_0x5c7224['isActive']=!0x0),_0x5c7224||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x5c7224);}['attach'](_0x51748b){this['annotations']=_0x51748b;const _0x1ba31b=this['editor']['plugins']['get'](j),_0x1b953b=this['_balloon'];if(this['isAttached'])throw new _0x438ae8('inlineannotations-attach-already-attached',this);if(_0x1ba31b['context']!==this['editor'])throw new _0x438ae8('inlineannotations-not-allowed-with-context',this);const _0x256bdd=this['editor']['plugins']['get'](b);this['listenTo'](_0x256bdd,'refresh',()=>{const _0x3b3b6f=_0x256bdd['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x3ee014,_0x35425e;!this['_forceRefresh']&&(_0x3ee014=_0x3b3b6f,_0x35425e=this['_selectedAnnotations'],_0x3ee014['length']===_0x35425e['length']&&_0x3ee014['every'](_0x41151e=>_0x35425e['includes'](_0x41151e)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x3b3b6f),this['setActiveAnnotation'](_0x3b3b6f[0x0]||null));}),this['listenTo'](_0x256bdd,'blur',(_0x1c11c7,{isAnnotationTracked:_0x357254})=>{this['activeAnnotation']&&_0x357254(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x256bdd,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x35a560,_0x33ab64,_0x26a828)=>{_0x26a828||this['setActiveAnnotation'](null);}),this['listenTo'](_0x51748b,'remove',(_0x36b394,_0x10c28a)=>{this['_removeAnnotationFromBalloon'](_0x10c28a),_0x10c28a===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x1b953b,'change:visibleView',(_0x3f8df1,_0x3af1db,_0x24ada5,_0xd48629)=>{_0xd48629&&this['stopListening'](_0xd48629);const _0x3482aa=_0x51748b['getByView'](_0x24ada5);_0x24ada5&&_0x3482aa&&(this['listenTo'](_0x24ada5,'change:height',()=>{_0x1b953b['updatePosition']();}),this['listenTo'](_0x24ada5,'Esc',()=>{this['_closeAnnotation'](_0x3482aa),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x3482aa&&this['setActiveAnnotation'](_0x3482aa));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x1b953b['visibleView']&&(_0x51748b['getByView'](_0x1b953b['visibleView'])&&_0x1b953b['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 _0x438ae8('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x48331c of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x48331c);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x5847fc){for(const _0x23ec20 of this['_selectedAnnotations'])_0x5847fc['includes'](_0x23ec20)||this['_manuallyClosed']['delete'](_0x23ec20);for(const _0x2cf433 of this['annotations'])_0x5847fc['includes'](_0x2cf433)||this['_removeAnnotationFromBalloon'](_0x2cf433);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x1fd776 of _0x5847fc)this['_addAnnotationToBalloon'](_0x1fd776);}this['_selectedAnnotations']=_0x5847fc;}['_addAnnotationToBalloon'](_0x5fa33,_0xca1a1=!0x1){this['_manuallyClosed']['has'](_0x5fa33)||(this['_addedAnnotations']['has'](_0x5fa33)||this['_balloon']['hasView'](_0x5fa33['view'])||(this['_addedAnnotations']['add'](_0x5fa33),this['_balloon']['add']({'stackId':_0x5fa33['view']['id'],'view':_0x5fa33['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0x5fa33)}})),_0xca1a1&&this['_balloon']['showStack'](_0x5fa33['view']['id']));}['_getBalloonTargetForAnnotation'](_0x3156a9){const _0x480e3a=_0x3156a9['target'],_0x1fcfec=this['editor']['editing']['view'],_0x21500a=_0x1fcfec['document']['selection']['getFirstRange'](),_0xa53aa1=_0x1fcfec['domConverter']['viewRangeToDom'](_0x21500a);if(_0xa53aa1['collapse'](!0x0),_0x480e3a){if(_0x480e3a instanceof _0x3aaff1)return _0x480e3a;let _0x1c938f=[];for(const _0x16c2c7 of _0x480e3a)_0x1c938f['push'](...F(_0x16c2c7['getClientRects']()));_0x1c938f=function(_0x2bccee){const _0x3c4615=[];let _0x4893fc=_0x2bccee[0x0];for(let _0x101869=0x1;_0x101869<_0x2bccee['length'];_0x101869++)P(_0x4893fc,_0x2bccee[_0x101869])?_0x4893fc['width']+=_0x2bccee[_0x101869]['width']:(_0x3c4615['push'](_0x4893fc),_0x4893fc=_0x2bccee[_0x101869]);return _0x3c4615['push'](_0x4893fc),_0x3c4615;}(_0x1c938f);const _0x282293=_0xa53aa1['getBoundingClientRect']();return _0x1c938f['find'](_0x1d7ab4=>_0x1d7ab4['top']<=_0x282293['top']&&_0x1d7ab4['bottom']>=_0x282293['bottom']&&_0x1d7ab4['left']<=_0x282293['left']&&_0x1d7ab4['right']>=_0x282293['right'])||_0x1c938f[0x0];}return _0x3156a9['targetRect']||_0xa53aa1;}['_removeAnnotationFromBalloon'](_0x6ed051){this['_addedAnnotations']['has'](_0x6ed051)&&this['_balloon']['hasView'](_0x6ed051['view'])&&(this['_addedAnnotations']['delete'](_0x6ed051),this['_balloon']['remove'](_0x6ed051['view']));}['_closeAnnotation'](_0x5adea1){this['_manuallyClosed']['add'](_0x5adea1),this['_removeAnnotationFromBalloon'](_0x5adea1);}}function F(_0x58ec38){return Array['from'](_0x58ec38)['map'](DOMRect['fromRect']);}function P(_0x1585e9,_0x122037){return _0x1585e9['top']===_0x122037['top']&&_0x1585e9['bottom']===_0x122037['bottom']&&_0x1585e9['right']===_0x122037['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x33a5aa,_0x585760){super(_0x33a5aa),this['set']('isEmpty',!_0x585760['length']),this['focusTracker']=new _0x19c662(),this['_annotationViews']=_0x585760,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x4ac2e3({'focusables':_0x585760,'focusTracker':this['focusTracker']}),this['listenTo'](_0x585760,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x585760,'remove',(_0x539236,_0x3cc420)=>{_0x3cc420['isActive']&&this['focus'](),_0x585760['length']||(this['isEmpty']=!0x0);});const _0x26fda9=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x33a5aa,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x585760},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x26fda9['if']('isEmpty','ck-hidden',_0x16c288=>!_0x16c288)]},'children':[{'text':N(_0x33a5aa,'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 _0x246302 of this['_annotationViews'])this['focusTracker']['add'](_0x246302['element']);this['_annotationViews']['on']('change',(_0x47a99a,{added:_0x3ced6e,removed:_0x5c37fb})=>{for(const _0x237c93 of _0x3ced6e)this['focusTracker']['add'](_0x237c93['element']);for(const _0x1cdc0d of _0x5c37fb)this['focusTracker']['remove'](_0x1cdc0d['element']);});}}class p extends _0x16d542{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x53167e){super(_0x53167e),this['archivedThreads']=new _0x4910b0();}['init'](){const _0x496fdc=this['context'],_0x1fa5d4=_0x496fdc['plugins']['get'](o),_0x2c5ec1=_0x496fdc['plugins']['get'](y);this['listenTo'](_0x1fa5d4,'addCommentThread',(_0x5a1fd1,{threadId:_0x314f7c})=>{const _0x18bc78=_0x1fa5d4['getCommentThread'](_0x314f7c);_0x18bc78['archivedAt']&&this['archivedThreads']['add'](_0x18bc78,this['_calculatePosition'](_0x18bc78['archivedAt'])),this['listenTo'](_0x18bc78,'change:archivedAt',(_0x3bb291,_0x12db4f,_0x2080e1)=>{_0x2080e1?this['archivedThreads']['has'](_0x18bc78)||this['archivedThreads']['add'](_0x18bc78,this['_calculatePosition'](_0x18bc78['archivedAt'])):this['archivedThreads']['has'](_0x18bc78)&&this['archivedThreads']['remove'](_0x18bc78);});}),this['listenTo'](_0x1fa5d4,'removeCommentThread',(_0x304659,{threadId:_0x56f409})=>{const _0xce0bad=_0x1fa5d4['getCommentThread'](_0x56f409);this['stopListening'](_0xce0bad),this['archivedThreads']['has'](_0xce0bad)&&this['archivedThreads']['remove'](_0xce0bad);},{'priority':'highest'}),this['listenTo'](_0x2c5ec1['collection'],'focus',(_0xc606ec,_0x34ec96)=>{_0x34ec96['isVisible']||(_0x34ec96['isActive']=!0x0,_0x2c5ec1['activate'](_0x34ec96));});}['_calculatePosition'](_0xb5b8c7){const _0x28e80b=[...this['archivedThreads']]['findIndex'](_0x355a3c=>_0x355a3c['archivedAt']<_0xb5b8c7);return _0x28e80b>-0x1?_0x28e80b:this['archivedThreads']['length'];}}class a extends _0x5bfff9{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x343263];}constructor(_0x4308d4){super(_0x4308d4),this['annotationViews']=new _0x20b218(),this['_pendingThreads']=[];}['init'](){const _0x4b0b19=this['editor'],_0x41c36f=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x4b0b19['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x92fc17,!0x0)),_0x4b0b19['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x201700=this['_createCommentsArchiveButton'](_0x580bc6);return _0x201700['set']({'role':'menuitemcheckbox'}),_0x201700;});const _0x4bcaad=_0x4b0b19['plugins']['get'](p),_0x4b60fd=_0x4b0b19['plugins']['get']('Annotations'),_0x1ec3c1=_0x4b0b19['plugins']['get']('CommentsRepository');_0x4bcaad['archivedThreads']['forEach'](_0x5b2266=>{this['_handleNewThread'](_0x5b2266);}),this['listenTo'](_0x4bcaad['archivedThreads'],'add',(_0x616110,_0x32a996)=>{this['_handleNewThread'](_0x32a996);}),this['listenTo'](_0x4b60fd['collection'],'add',(_0x3b677d,_0x18d7e9)=>{const _0x5aac22=this['_pendingThreads']['find'](_0x5aee50=>{const _0x1f41e1=_0x1ec3c1['_threadToController']['get'](_0x5aee50);return _0x1f41e1&&_0x18d7e9['innerView']===_0x1f41e1['view'];});if(_0x5aac22){const _0x1bb468=this['_calculatePosition'](_0x5aac22['archivedAt']);this['_addAnnotationToArchive'](_0x18d7e9,_0x1bb468),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x5aac22),0x1);}}),this['listenTo'](_0x4bcaad['archivedThreads'],'remove',(_0x444ca8,_0x1cb726)=>{const _0x207bdf=_0x4b0b19['config']['get']('collaboration.channelId');if(!_0x207bdf||_0x1cb726['channelId']===_0x207bdf){if(this['_pendingThreads']['includes'](_0x1cb726))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x1cb726),0x1);else{const _0x1469eb=_0x1ec3c1['_threadToController']['get'](_0x1cb726),_0x33c0a1=_0x4b60fd['getByInnerView'](_0x1469eb['view']);this['annotationViews']['remove'](_0x33c0a1['view']),this['stopListening'](_0x33c0a1),this['stopListening'](_0x33c0a1['focusableElements']);}}}),this['listenTo'](_0x4b60fd['collection'],'add',(_0x119f87,_0x1c867a)=>{this['listenTo'](_0x1c867a,'escape',_0x41c36f);}),this['listenTo'](_0x4b60fd['collection'],'remove',(_0x12c38b,_0x58ba17)=>{this['stopListening'](_0x58ba17,'escape',_0x41c36f);});}['_addAnnotationToArchive'](_0x50ad2d,_0x5b339f){this['listenTo'](_0x50ad2d,'set:isVisible',_0x3dd584=>{_0x3dd584['return']=!0x1,_0x3dd584['stop']();}),this['annotationViews']['add'](_0x50ad2d['view'],_0x5b339f);}['_handleNewThread'](_0x388999){const _0x3aa207=this['editor']['plugins']['get']('CommentsRepository'),_0x1c84d0=this['editor']['plugins']['get']('Annotations'),_0x491c48=this['editor']['config']['get']('collaboration.channelId');if(!_0x491c48||_0x388999['channelId']===_0x491c48){const _0x3baf5f=_0x3aa207['_threadToController']['get'](_0x388999);if(!_0x3baf5f)return void this['_pendingThreads']['push'](_0x388999);const _0x578af7=this['_calculatePosition'](_0x388999['archivedAt']),_0x46eff5=_0x1c84d0['getByInnerView'](_0x3baf5f['view']);_0x46eff5['isVisible']&&_0x1c84d0['_visibleAnnotations']['remove'](_0x46eff5),this['_addAnnotationToArchive'](_0x46eff5,_0x578af7);}}['_calculatePosition'](_0x412e86){const _0x107ff0=this['editor']['config']['get']('collaboration.channelId'),_0x4001eb=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x1ab874=>_0x1ab874['channelId']===_0x107ff0)['findIndex'](_0x32ce69=>_0x32ce69['archivedAt']<_0x412e86);return _0x4001eb<0x0||_0x4001eb>this['annotationViews']['length']?this['annotationViews']['length']:_0x4001eb-0x1;}['_toggleDialog'](){const _0x58e856=this['editor'],_0xc4ff91=_0x58e856['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x58e856['locale'],this['annotationViews'])),'commentsArchive'===_0xc4ff91['id']?_0xc4ff91['hide']():_0xc4ff91['show']({'id':'commentsArchive','title':N(_0x58e856['locale'],'COMMENTS_ARCHIVE'),'icon':_0x53303a,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0x21b629['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x57b84b,_0xf59141=!0x1){const _0x5901b4=this['editor']['locale'],_0x10394a=this['editor']['plugins']['get']('Dialog'),_0x147ce0=new _0x57b84b(_0x5901b4);return _0x147ce0['bind']('isEnabled')['to'](this,'isEnabled'),_0x147ce0['bind']('isOn')['to'](_0x10394a,'id',_0xd6d90c=>'commentsArchive'===_0xd6d90c),_0x147ce0['set']({'label':N(_0x5901b4,'COMMENTS_ARCHIVE'),'icon':_0x53303a,'isToggleable':!0x0}),_0xf59141&&(_0x147ce0['tooltip']=!0x0),this['listenTo'](_0x147ce0,'execute',()=>this['_toggleDialog']()),_0x147ce0;}['_hideDialogOnAnnotationEscape']=_0x2d3a54=>{const _0x49eed6=_0x2d3a54['source'];if(!this['annotationViews']['has'](_0x49eed6['view']))return;const _0x512fc4=this['editor']['plugins']['get']('Dialog');_0x512fc4['isOpen']&&'commentsArchive'===_0x512fc4['id']&&(_0x512fc4['hide'](),_0x2d3a54['stop']());};}class gi extends _0x5bfff9{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|
|
23
|
+
import{Editor as _0x1db22d,ContextPlugin as _0x1c3a7a,PendingActions as lt,Command as _0x2473d2,Plugin as _0x4e6af8,Context as _0x4d6d98}from'@ckeditor/ckeditor5-core/dist/index.js';import{ObservableMixin as _0x1201c1,uid as _0x4552d2,KeystrokeHandler as jt,FocusTracker as _0x119ecb,diff as _0x560f87,Collection as _0x7eb5c5,Rect as _0x436169,CKEditorError as _0x13348f,first as _0x186b13,priorities as Wt,scrollViewportToShowTarget as nt,getEnvKeystrokeText as tt,toUnit as Ht,DomEmitterMixin as _0x3935b2,keyCodes as _0x266af6}from'@ckeditor/ckeditor5-utils/dist/index.js';import{UserView as _0x432c69,AriaDescriptionView as Yt,setupThreadKeyboardNavigation as Zt,ConfirmMixin as ti,LateFocusButtonView as _0x10b016,trimHtml as ts,LateFocusDropdownButtonView as _0x281113,Users as it,getDateTimeFormatter as pt,hashObject as It,getAllMarkersDomElementsSorted as et,surroundingMarkersDetector as rt,FOCUS_ANNOTATION_KEYSTROKE as _0x39c788}from'ckeditor5-collaboration/dist/index.js';import{throttle as Dt,isEqual as At,cloneDeep as wt,set as yt,unset as Ct,debounce as _0x5d3d29}from'es-toolkit/compat';import{IconUndo as _0x5cccb5,IconCheck as _0x3ddff7,IconPencil as _0x57d6a5,IconRemoveComment as _0x52bd7f,IconThreeVerticalDots as _0x5a552d,IconAddComment as _0x61886d,IconCommentsArchive as _0xb693b5}from'@ckeditor/ckeditor5-icons/dist/index.js';import{EditorUIView as $t,InlineEditableUIView as Vt,EditorUI as Ut,View as kt,FocusCycler as _0x206411,ButtonView as _0x39d67e,ViewCollection as _0x42bc84,createDropdown as _0x25a7f2,ListView as _0xfa59b0,focusChildOnDropdownOpen as _0x348b07,ListItemView as _0x3923f4,MenuBarMenuListItemButtonView as _0x4dec93,BodyCollection as _0x4ce13c,BalloonPanelView as _0x1669c2,ContextualBalloon as _0x479a8f,Dialog as _0x578bd5,DialogViewPosition as _0xa729ff}from'@ckeditor/ckeditor5-ui/dist/index.js';import{disableViewPlaceholder as St,enableViewPlaceholder as Ft,MouseObserver as _0x2585d2}from'@ckeditor/ckeditor5-engine/dist/index.js';import{Clipboard as qt,ClipboardMarkersUtils as Mt,ClipboardPipeline as Pt}from'@ckeditor/ckeditor5-clipboard/dist/index.js';import{Enter as zt,ShiftEnter as Bt}from'@ckeditor/ckeditor5-enter/dist/index.js';import{SelectAll as Gt}from'@ckeditor/ckeditor5-select-all/dist/index.js';import{Typing as Jt}from'@ckeditor/ckeditor5-typing/dist/index.js';import{Undo as Kt}from'@ckeditor/ckeditor5-undo/dist/index.js';import{Paragraph as Lt}from'@ckeditor/ckeditor5-paragraph/dist/index.js';import{FOCUS_ANNOTATION_KEYSTROKE as _0x337bf3}from'@ckeditor/ckeditor5-collaboration-core/dist/index.js';import{toWidget as _0x660b85}from'@ckeditor/ckeditor5-widget/dist/index.js';class vt extends/* #__PURE__ -- @preserve */
|
|
24
|
+
_0x1201c1(){['model'];['view'];constructor(_0x2450c1,_0x10cbe6){super(),this['model']=_0x2450c1,this['model']['_isAttached']=!0x0,this['view']=_0x10cbe6,this['listenTo'](_0x10cbe6,'submitCommentThread',()=>this['submit']()),this['listenTo'](_0x10cbe6,'removeCommentThread',()=>this['remove']()),this['listenTo'](_0x10cbe6,'resolveCommentThread',()=>this['resolve']()),this['listenTo'](_0x10cbe6,'reopenCommentThread',()=>this['reopen']()),this['listenTo'](_0x10cbe6,'addComment',(_0x1767b2,_0x5989eb)=>this['addComment'](_0x5989eb)),this['listenTo'](_0x10cbe6,'updateComment',(_0x321a80,_0x4d0a52,_0x2bcb7f)=>this['updateComment'](_0x4d0a52,_0x2bcb7f)),this['listenTo'](_0x10cbe6,'removeComment',(_0x4a62dd,_0x25e362)=>this['removeComment'](_0x25e362));}['submit'](){this['model']['submit']();}['remove'](){this['model']['remove']();}['resolve'](){this['model']['isResolved']||this['model']['resolve']();}['reopen'](){this['model']['isResolved']&&this['model']['reopen']();}['addComment'](_0x1d7c5a){this['model']['addComment']({'content':_0x1d7c5a,'authorId':this['view']['_localUser']['id']});}['updateComment'](_0x185d7d,_0x1416dc){this['model']['getComment'](_0x185d7d)['update']({'content':_0x1416dc});}['removeComment'](_0x26fa06){this['model']['getComment'](_0x26fa06)['remove']();}['destroy'](){this['stopListening'](),this['model']['_isAttached']=!0x1;}}function N(_0x5105e0,_0x570465,_0x530dd8){const t=_0x5105e0['t'];switch(_0x570465){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'},_0x530dd8);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'},_0x530dd8);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'},_0x530dd8);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'},_0x530dd8);case'NUMBER_OF_COMMENTS':return t({'string':'%0\x20Comment','plural':'%0\x20Comments','id':'NUMBER_OF_COMMENTS'},_0x530dd8);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'},_0x530dd8);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'},_0x530dd8);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'},_0x530dd8);case'COMMENTS_ARCHIVE':return t({'string':'Comments\x20archive','id':'COMMENTS_ARCHIVE'});case'EMPTY_COMMENTS_ARCHIVE':return t({'string':'There\x20are\x20no\x20archived\x20comment\x20threads.','id':'EMPTY_COMMENTS_ARCHIVE'});case'COMMENTS_ARCHIVE_LIST_LABEL':return t({'string':'List\x20of\x20comments','id':'COMMENTS_ARCHIVE_LIST_LABEL'});case'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP':return t({'string':'Keystrokes\x20for\x20interacting\x20with\x20annotation\x20threads\x20(e.g.\x20comments,\x20track\x20changes\x20suggestions)','id':'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'});case'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO':return t({'string':'Move\x20focus\x20to\x20the\x20thread\x20when\x20the\x20selection\x20is\x20anchored\x20in\x20its\x20marker','id':'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'});case'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT':return t({'string':'Exit\x20the\x20annotation\x20and\x20move\x20focus\x20back\x20to\x20the\x20edited\x20content','id':'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER':return t({'string':'Browse\x20the\x20focused\x20annotation\x20thread\x20or\x20thread\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'});case'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS':return t({'string':'Move\x20across\x20internals\x20of\x20the\x20annotation\x20thread','id':'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'});case'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT':return t({'string':'Submit\x20the\x20reply\x20while\x20writing\x20a\x20comment','id':'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'});case'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS':return t({'string':'Move\x20to\x20the\x20previous\x20or\x20next\x20thread\x20in\x20the\x20annotations\x20sidebar\x20or\x20comments\x20archive','id':'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'});default:return'';}}class Rt extends $t{['main'];['editable'];constructor(_0x4ace00,_0x3556b4){super(_0x4ace00);const _0x1afe8f=_0x4552d2();this['main']=this['createCollection'](),this['editable']=new Vt(_0x4ace00,_0x3556b4,void 0x0,{'label':()=>N(_0x4ace00,'Comment\x20editor')}),this['setTemplate']({'tag':'div','attributes':{'class':['ck-reset','ck-editor','ck-rounded-corners','ck-comment__input'],'dir':_0x4ace00['uiLanguageDirection'],'lang':_0x4ace00['uiLanguage'],'aria-labelledby':'cke-editor__aria-label_'+_0x1afe8f},'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 Et extends Ut{['view'];constructor(_0x23d21c){super(_0x23d21c),this['view']=new Rt(_0x23d21c['locale'],_0x23d21c['editing']['view']);}get['element'](){return this['view']['element'];}['init'](){const _0x98b99d=this['editor']['editing']['view'],_0x43b799=this['view']['editable'],_0x4f47f1=_0x98b99d['document']['getRoot']();_0x43b799['name']=_0x4f47f1['rootName'],this['view']['render']();const _0x5969cd=_0x43b799['element'];this['setEditableElement'](_0x43b799['name'],_0x5969cd),this['view']['editable']['bind']('isFocused')['to'](this['focusTracker']),_0x98b99d['attachDomRoot'](_0x5969cd),this['fire']('ready');}['destroy'](){super['destroy'](),this['view']['destroy']();}}const Qt=[qt,zt,Bt,Gt,Jt,Kt,Lt];class hs extends/* #__PURE__ -- @preserve */
|
|
25
|
+
_0x1201c1(_0x1db22d){static ['defaultPlugins']=/* #__PURE__ -- @preserve */
|
|
26
|
+
((()=>Qt)());constructor(_0x574f88={}){function _0x124c9d(_0x200c03){return _0x200c03['map'](_0x157b9f=>String['fromCharCode'](_0x157b9f))['join']('');}(_0x574f88=Object['assign']({},_0x574f88))['plugins']||(_0x574f88['plugins']=hs['defaultPlugins']),super(_0x574f88),this['ui']=new Et(this),this['set']('placeholder',''),this['model']['document']['on']('change',()=>this['_updatePlaceholder'](),{'priority':'low'}),this['on']('change:placeholder',()=>this['_updatePlaceholder']()),this['model']['document']['createRoot'](),this[_0x124c9d([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x124c9d([0x76,0x69,0x65,0x77])][_0x124c9d([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x124c9d([0x61,0x75,0x74,0x6f]),this[_0x124c9d([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74])]=()=>window[_0x124c9d([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x124c9d([0x72,0x65,0x73,0x6f,0x6c,0x76,0x65])]({[_0x124c9d([0x73,0x74,0x61,0x74,0x75,0x73])]:_0x124c9d([0x6f,0x6b])});}['create'](){const _0x56cfb9=this['config']['get']('initialData')||'';return this['initPlugins']()['then'](()=>this['ui']['init']())['then'](()=>this['data']['init'](_0x56cfb9))['then'](()=>this['fire']('ready'));}['destroy'](){return super['destroy']()['then'](()=>this['ui']['destroy']());}['focus'](){this['model']['change'](_0x27f686=>{const _0x7db3be=this['model']['document']['getRoot'](),_0x5b7a9a=_0x7db3be&&_0x7db3be['getChild'](_0x7db3be['childCount']-0x1);_0x27f686['setSelection'](_0x5b7a9a,'end'),this['editing']['view']['focus']();});}['_updatePlaceholder'](){const _0x47a75e=this['editing']['view'],_0x5a3235=_0x47a75e['document']['getRoot'](),_0x3fc54a=_0x5a3235['getChild'](0x0);_0x5a3235['childCount']>0x1||!_0x3fc54a||'p'!=_0x3fc54a['name']?this['placeholderElement']&&this['placeholderElement']['placeholder']&&(St(_0x47a75e,this['placeholderElement']),this['placeholderElement']=void 0x0):(this['placeholder']&&(_0x3fc54a['placeholder']=this['placeholder']),Ft({'view':_0x47a75e,'element':_0x3fc54a,'keepOnFocus':!0x0}),this['placeholderElement']=_0x3fc54a);}}class es extends kt{['keystrokes'];['focusTracker'];['focusables'];['focusCycler'];['submitButtonView'];['cancelButtonView'];['_editorConfig'];constructor(_0x47638f,_0x40f7ed={}){super(_0x47638f),this['editor']=null,this['_editorConfig']=_0x40f7ed,this['set']('value',_0x40f7ed['initialData']||''),this['set']('disabledSubmit',!0x1),this['set']('showButtons',!0x0),this['set']('placeholder',N(_0x47638f,'Reply...')),this['set']('submitLabel',N(_0x47638f,'Reply')),this['submitButtonView']=this['_createSubmitButton'](),this['cancelButtonView']=this['_createCancelButton'](),this['focusables']=this['createCollection']([this['submitButtonView'],this['cancelButtonView']]),this['keystrokes']=new jt(),this['focusTracker']=new _0x119ecb(),this['focusCycler']=new _0x206411({'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',(_0x15c51a,_0x5d6546)=>{this['cancelButtonView']['fire']('execute'),_0x5d6546();}),this['keystrokes']['set']('Ctrl+Enter',(_0x27b957,_0x52d520)=>{this['submitButtonView']['isEnabled']&&(this['submitButtonView']['fire']('execute'),_0x52d520());}),this['on']('submit',(_0x313651,_0x444d7b)=>{_0x444d7b['length']>0xfde8?(alert(N(_0x47638f,'TOO_LONG_COMMENT_ALERT',[_0x444d7b['length'],0xfde8])),_0x313651['stop']()):this['editor']['setData']('');},{'priority':'high'});}['render'](){super['render'](),this['_setupKeyboardNavigation']();}['createEditor'](){return this['editor']||(this['editor']=new hs(this['_editorConfig']),this['_editorCreationPromise']=this['editor']['create']()['then'](()=>{if(this['_isDestroyed'])return;const _0x32b7f6=this['editor'];this['element']['insertBefore'](_0x32b7f6['ui']['element'],this['element']['firstChild']),_0x32b7f6['model']['document']['on']('change',()=>this['value']=_0x32b7f6['getData']()),_0x32b7f6['bind']('placeholder')['to'](this),this['focusables']['add'](_0x32b7f6['ui']['view'],0x0),this['fire']('editorReady',this['editor']);})),this['_editorCreationPromise'];}['focus'](_0xe112ca){-0x1===_0xe112ca?(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:_0xc680e2}=this,_0x4c700e=new _0x39d67e(_0xc680e2);return _0x4c700e['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--submit']}}),_0x4c700e['withText']=!0x0,_0x4c700e['bind']('label')['to'](this,'submitLabel'),_0x4c700e['on']('execute',()=>{this['fire']('submit',this['value']);}),_0x4c700e['bind']('isEnabled')['to'](this,'value',this,'disabledSubmit',(_0x3b9655,_0x395e0c)=>!_0x395e0c&&!!_0x3b9655['trim']()),_0x4c700e;}['_createCancelButton'](){const {locale:_0x48b03a}=this,_0x2f9fac=new _0x39d67e(_0x48b03a);return _0x2f9fac['extendTemplate']({'attributes':{'class':['ck-comment__input-actions--cancel']}}),_0x2f9fac['label']=N(_0x48b03a,'Cancel'),_0x2f9fac['withText']=!0x0,_0x2f9fac['on']('execute',()=>{this['editor']['setData'](''),this['fire']('cancel');}),_0x2f9fac;}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']),this['focusables']['forEach'](_0x392a88=>{this['focusTracker']['add'](_0x392a88['element']);}),this['focusables']['on']('change',(_0x38b99a,_0x316fac)=>{for(const _0x183be9 of Array['from'](_0x316fac['added'])['reverse']())this['focusTracker']['add'](_0x183be9['element']);});}}class ie extends kt{constructor(_0x1049bf,_0x4ecb12,_0x263436){super(_0x1049bf),this['commentInputView']=new es(_0x1049bf,_0x263436),this['focusCycler']=this['commentInputView']['focusCycler'],this['commentInputView']['bind']('showButtons')['to'](this['commentInputView']['focusTracker'],'isFocused',this['commentInputView'],'value',(_0x44b57b,_0x855f26)=>_0x44b57b||!!_0x855f26),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 _0x432c69(_0x1049bf,_0x4ecb12),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'](_0x3e7874){this['commentInputView']['focus'](_0x3e7874);}['_focusOnNonInteractiveMouseDown'](){this['listenTo'](this['element'],'mousedown',(_0x10e055,_0x110de5)=>{const {submitButtonView:_0x3f1bdf,cancelButtonView:_0xe7f068,editor:_0x3cc42c}=this['commentInputView'];[_0x3f1bdf['element'],_0xe7f068['element'],_0x3cc42c?_0x3cc42c['editing']['view']['getDomRoot']():null]['filter'](_0x1933e3=>_0x1933e3)['some'](_0x6b4b36=>_0x6b4b36['contains'](_0x110de5['target']))||(this['focus'](),_0x110de5['preventDefault']());});}}class rs extends kt{constructor(_0x4f30d5){super(_0x4f30d5);const _0x5e6a38=this['bindTemplate'];this['set']('count',void 0x0),this['setTemplate']({'tag':'li','attributes':{'class':'ck-thread__comment-count'},'children':[{'text':_0x5e6a38['to']('count',_0x2c9b36=>N(_0x4f30d5,'NUMBER_OF_COMMENTS',_0x2c9b36))}]});}}class te extends kt{['commentViews'];['resolvedCommentView'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];['_collapsedCommentsView'];constructor(_0x1981ae,_0x1c7c07,_0x4e45f8){super(_0x1981ae);const _0x278d77=this['bindTemplate'];this['set']('hasDirtyComment',!0x1),this['set']('length',_0x1c7c07['comments']['length']),this['set']('isActive',!0x1),this['_model']=_0x1c7c07,this['_config']=_0x4e45f8,this['commentViews']=this['createCollection'](),this['visibleViews']=this['createCollection'](),this['resolvedCommentView']=null,this['focusTracker']=new _0x119ecb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x206411({'focusables':this['commentViews'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x17c242=>this['commentViews']['map'](_0x41119e=>_0x41119e['element'])['includes'](_0x17c242['target'])},'actions':{'focusPrevious':'arrowup','focusNext':'arrowdown'}}),this['_collapsedCommentsView']=new rs(_0x1981ae),this['_collapsedCommentsView']['bind']('count')['to'](this,'length',_0x563087=>_0x563087-this['_config']['maxCommentsWhenCollapsed']);for(const _0x185cf7 of _0x1c7c07['comments'])this['_handleNewCommentModel'](_0x185cf7);this['_handleInfoComment'](),this['listenTo'](_0x1c7c07['comments'],'add',(_0x862347,_0x3f7af0)=>{const _0x1ea98c=this['_calculatePosition'](_0x3f7af0);this['length']++,this['_handleNewCommentModel'](_0x3f7af0,_0x1ea98c),this['refreshVisibleViews']();}),this['listenTo'](_0x1c7c07['comments'],'remove',(_0x3c0f3a,_0x4ee964)=>{this['length']--,this['_handleRemoveCommentModel'](_0x4ee964),this['refreshVisibleViews']();}),this['listenTo'](_0x1c7c07,'commentUpdated',()=>this['refreshVisibleViews']()),this['listenTo'](_0x1c7c07,'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',_0x278d77['if']('length','ck-hidden',_0x302a7b=>!_0x302a7b)],'aria-label':N(_0x1981ae,'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'](_0xacbd0a){-0x1===_0xacbd0a?this['focusCycler']['focusLast']():this['focusCycler']['focusFirst']();}['destroy'](){this['_collapsedCommentsView']['destroy']();for(const _0x585f4e of this['commentViews'])_0x585f4e['destroy']();super['destroy']();}['refreshVisibleViews'](){this['_shouldCollapse']?this['_rearrangeCollapse']():this['_rearrangeExpand']();}['_handleNewCommentModel'](_0xf6a5c,_0x543de3){const _0x2707a0=new this['_config']['CommentView'](this['locale'],_0xf6a5c,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig']});_0x2707a0['viewUid']=_0xf6a5c['id'],_0x2707a0['delegate']('removeComment')['to'](this),_0x2707a0['delegate']('updateComment')['to'](this),_0x2707a0['delegate']('resolveCommentThread')['to'](this),_0x2707a0['delegate']('editorReady')['to'](this),_0x2707a0['delegate']('editorDestroyed')['to'](this),this['listenTo'](_0x2707a0,'change:isEditMode',()=>this['_updateHasDirtyComment']()),this['commentViews']['add'](_0x2707a0,_0x543de3);}['_calculatePosition'](_0x26f07b){const _0x53fbe7=this['_model']['_findOptimalIndex'](_0x26f07b);return this['resolvedCommentView']?this['resolvedCommentView']['authoredAt']>_0x26f07b['authoredAt']?_0x53fbe7-0x1:_0x53fbe7:_0x53fbe7-0x1;}['_handleInfoComment'](){if(this['_model']['resolvedBy']&&this['_model']['resolvedAt']){const _0x28e9e8={'id':'resolved','author':this['_model']['resolvedBy'],'authoredAt':this['_model']['resolvedAt'],'content':N(this['locale'],'Marked\x20as\x20resolved'),'attributes':{}};this['resolvedCommentView']=new this['_config']['CommentView'](this['locale'],_0x28e9e8,{'maxCommentCharsWhenCollapsed':this['_config']['maxCommentCharsWhenCollapsed'],'formatDateTime':this['_config']['formatDateTime'],'editorConfig':this['_config']['editorConfig'],'isSystemComment':!0x0}),this['commentViews']['add'](this['resolvedCommentView'],this['_model']['_findOptimalIndex'](_0x28e9e8));}else this['resolvedCommentView']&&(this['commentViews']['remove'](this['resolvedCommentView']),this['resolvedCommentView']['destroy'](),this['resolvedCommentView']=null);this['refreshVisibleViews']();}['_handleRemoveCommentModel'](_0x3e8edb){const _0x326982=this['commentViews']['remove'](_0x3e8edb['id']);this['stopListening'](_0x326982),_0x326982['isEditMode']&&this['_updateHasDirtyComment'](),_0x326982['destroy']();}['_updateHasDirtyComment'](){this['hasDirtyComment']=Array['from'](this['commentViews'])['some'](_0x590683=>_0x590683['isEditMode']);}['_rearrangeCollapse'](){const _0x2e53e9=function(_0x18c163){const _0x29a84a=new _0x7eb5c5();for(const _0xcae96e of _0x18c163)_0x29a84a['add'](_0xcae96e);return _0x29a84a;}(this['commentViews']),_0x51c9b1=this['_collapsedCommentsView']['count'];for(let _0x2755e6=0x1;_0x2755e6<=_0x51c9b1;_0x2755e6++)_0x2e53e9['remove'](0x1);for(const _0x5acb9f of _0x2e53e9)_0x5acb9f['collapse']();_0x51c9b1>0x0&&_0x2e53e9['add'](this['_collapsedCommentsView'],0x1),ns(_0x560f87(Array['from'](this['visibleViews']),Array['from'](_0x2e53e9)),this['visibleViews'],_0x2e53e9);}['_rearrangeExpand'](){ns(_0x560f87(Array['from'](this['visibleViews']),Array['from'](this['commentViews'])),this['visibleViews'],this['commentViews']);for(const _0xe5ceba of this['visibleViews'])_0xe5ceba['expand']();}['_setupKeyboardNavigation'](){this['commentViews']['forEach'](_0x5d05b5=>{this['focusTracker']['add'](_0x5d05b5['element']),this['keystrokes']['listenTo'](_0x5d05b5['element']);}),this['commentViews']['on']('change',(_0x2d7a3b,_0x3b05aa)=>{for(const _0x283c5f of _0x3b05aa['removed'])this['focusTracker']['remove'](_0x283c5f['element']),this['keystrokes']['stopListening'](_0x283c5f['element']);for(const _0x24f441 of Array['from'](_0x3b05aa['added'])['reverse']())this['focusTracker']['add'](_0x24f441['element']),this['keystrokes']['listenTo'](_0x24f441['element']);});}}function ns(_0x85a4c6,_0xd31910,_0x33b22a){let _0x3e889f=0x0;for(const _0x316bdf of _0x85a4c6)switch(_0x316bdf){case'insert':_0xd31910['add'](_0x33b22a['get'](_0x3e889f),_0x3e889f),_0x3e889f++;break;case'delete':_0xd31910['remove'](_0x3e889f);break;case'equal':_0x3e889f++;}}class oe extends kt{constructor(_0x1d96f0){super(_0x1d96f0);const _0x33059e=this['bindTemplate'];this['set']('contextValue',''),this['setTemplate']({'tag':'span','attributes':{'class':['ck','ck-context__value'],'aria-label':_0x33059e['to']('contextValue',_0x16c4aa=>N(_0x1d96f0,'THREAD_CONTEXT_LABEL',_0x16c4aa)),'tabindex':-0x1},'children':[{'text':_0x33059e['to']('contextValue')}]});}['focus'](){this['element']['focus']();}}class Xt extends kt{['_model'];['reopenButtonView'];['contextView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x5b4c7b,_0x326ece){super(_0x5b4c7b);const _0x175d7b=this['bindTemplate'];this['_model']=_0x326ece,this['reopenButtonView']=this['_createReopenButton'](),this['contextView']=this['_createContextView'](),this['focusables']=this['createCollection']([this['contextView'],this['reopenButtonView']]),this['focusTracker']=new _0x119ecb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x206411({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}}),this['bind']('hasContext')['to'](this['_model'],'context',_0x4a53f3=>!!_0x4a53f3),this['bind']('contextValue')['to'](this['_model'],'context',_0x55258f=>_0x55258f&&_0x55258f['value']?this['_trimContextValue'](_0x55258f['value']):N(this['locale'],'Comment\x20was\x20made\x20on\x20an\x20element')),this['setTemplate']({'tag':'div','attributes':{'class':['ck-thread__header']},'children':[{'tag':'div','attributes':{'class':['ck-context-wrapper']},'children':[{'tag':'div','attributes':{'class':['ck-context',_0x175d7b['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 _0x5894e9=new _0x39d67e(this['locale']);return _0x5894e9['label']=N(this['locale'],'Reopen'),_0x5894e9['tooltip']=N(this['locale'],'Reopen'),_0x5894e9['icon']=_0x5cccb5,_0x5894e9['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x49333d=>!_0x49333d),_0x5894e9['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x22cadf,_0x516e6c)=>_0x22cadf&&_0x516e6c),_0x5894e9['on']('execute',()=>{this['fire']('reopenCommentThread',this['_model']['id']);}),_0x5894e9;}['_trimContextValue'](_0x1d2fcb){if(_0x1d2fcb['length']<0x96)return _0x1d2fcb;const _0x3f743e=_0x1d2fcb['lastIndexOf']('\x20',0x93);return _0x1d2fcb['substring'](0x0,_0x3f743e>-0x1?_0x3f743e:0x93)+'...';}['_attachContextActions'](){const _0x2ba0ff=this['element']['querySelector']('.ck-context'),_0x127083=_0x2ba0ff['querySelector']('.ck-context__value');this['listenTo'](_0x2ba0ff,'mouseenter',()=>{_0x127083['offsetWidth']<_0x127083['scrollWidth']&&_0x2ba0ff['classList']['add']('overlay');}),this['listenTo'](_0x2ba0ff,'mouseleave',()=>{_0x2ba0ff['classList']['remove']('overlay');});}['_setupKeyboardNavigation'](){this['keystrokes']['listenTo'](this['element']);for(const _0x2964e0 of this['focusables'])this['focusTracker']['add'](_0x2964e0['element']),this['keystrokes']['listenTo'](_0x2964e0['element']);}['_createContextView'](){const _0x3d0367=new oe(this['locale']);return _0x3d0367['bind']('contextValue')['to'](this),_0x3d0367;}}class si extends kt{['_model'];['_config'];['commentThreadHeaderView'];['commentThreadInputView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];constructor(_0x42775b,_0x4654de,_0x529177,_0x5a3f5e){super(_0x42775b),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['_model']=_0x4654de,this['_localUser']=_0x529177,this['_config']=_0x5a3f5e,this['commentThreadHeaderView']=new Xt(_0x42775b,_0x4654de),this['commentThreadHeaderView']['delegate']('reopenCommentThread')['to'](this),this['ariaDescriptionView']=new Yt(_0x42775b,N(_0x42775b,'COMMENT_THREAD_DESCRIPTION')),this['listenTo'](this,'reopenCommentThread',()=>{this['focus']();}),this['commentsListView']=new te(_0x42775b,_0x4654de,Object['assign']({'CommentView':this['_config']['CommentView']},_0x5a3f5e)),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',(_0x2e2673,_0x4edc89)=>_0x2e2673||!!_0x4edc89),this['bind']('isUnlinked')['to'](_0x4654de,'unlinkedAt',_0x4bcee6=>!!_0x4bcee6),this['bind']('ariaLabel')['to'](this,'length',_0x10bd24=>{const _0x187fec=this['_model']['comments']['first']?this['_model']['comments']['first']['author']['name']:this['_localUser']['name'];return N(this['locale'],'COMMENT_THREAD_LABEL',[_0x10bd24,_0x187fec]);}),this['focusables']=this['createCollection']([this['commentsListView'],this['commentThreadInputView']]),this['focusTracker']=new _0x119ecb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x206411({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x7b5d29=>_0x7b5d29['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['focus'](){this['element']['focus']();}['render'](){super['render'](),Zt(this,this['focusables']);}async['destroy'](){this['isDirty']=!0x1,this['commentsListView']['destroy'](),await this['commentThreadInputView']['destroy'](),super['destroy']();}['_createCommentThreadInputView'](){const _0x21ba40=new ie(this['locale'],this['_localUser'],this['_config']['editorConfig']),_0x32c8b5=_0x21ba40['commentInputView'];return _0x21ba40['bind']('showInput')['to'](this,'isActive',this['_model'],'isReadOnly',this['_model'],'canComment',this['_model'],'archivedAt',_0x32c8b5,'value',(_0x5f3151,_0x29b928,_0x36014f,_0x4a9482,_0x2ef337)=>!!_0x2ef337||!!_0x4a9482&&_0x36014f&&!_0x29b928||_0x5f3151&&_0x36014f&&!_0x29b928),_0x32c8b5['bind']('placeholder')['to'](this,'length',this['_model'],'isResolvable',this['_model'],'isResolved',(_0x72e2fd,_0x2f6cef,_0x52d5e9)=>{let _0x5d33c4;return _0x5d33c4=_0x52d5e9&&_0x2f6cef?'Reply\x20to\x20reopen\x20discussion...':_0x72e2fd?'Reply...':'Write\x20a\x20comment...',N(this['locale'],_0x5d33c4);}),_0x32c8b5['bind']('submitLabel')['to'](this,'length',_0x4f65c6=>N(this['locale'],_0x4f65c6?'Reply':'Comment')),_0x32c8b5['on']('submit',(_0x33a34b,_0x194aac)=>{this['fire']('addComment',_0x194aac),this['_model']['isResolved']&&this['_model']['isResolvable']&&this['fire']('reopenCommentThread',this['_model']['id']),this['_model']['isSubmitted']||this['fire']('submitCommentThread');}),_0x32c8b5['on']('cancel',()=>{this['focus']();}),_0x32c8b5['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x32c8b5['on']('cancel',_0x4acda2=>{0x0==this['length']&&(this['fire']('removeCommentThread'),_0x4acda2['stop']());}),this['on']('change:isActive',(_0x21a00f,_0x46eea9,_0x192373)=>{_0x192373||this['length']||_0x32c8b5['value']||this['fire']('removeCommentThread');}),_0x21ba40;}}class gt extends/* #__PURE__ -- @preserve */
|
|
27
|
+
ti(si){['commentThreadChildren'];['containerElement'];['resolveButton'];['_boundFirstCommentView'];constructor(_0xb5032a,_0x110846,_0x42a7ba,_0x2db45c){super(_0xb5032a,_0x110846,_0x42a7ba,_0x2db45c),this['commentThreadChildren']=this['createCollection']([this['commentsListView'],this['commentThreadInputView'],this['ariaDescriptionView']]),this['set']('actionIndicator',null),this['containerElement']=null,this['_boundFirstCommentView']=null,this['locale']=_0xb5032a,this['resolveButton']=this['_createResolveButton'](),this['setTemplate'](this['getTemplate']()),this['on']('change:isActive',(_0x37c82b,_0xece177,_0x5ca2dc)=>{_0x5ca2dc||this['_cancelAllConfirms']();}),this['listenTo'](this['_model'],'change:isReadOnly',(_0x1e98c4,_0x34402e,_0x1c7033)=>{_0x1c7033&&this['_cancelAllConfirms']();}),this['length']>0x0&&this['_bindFirstCommentView'](),this['listenTo'](this['commentsListView']['commentViews'],'add',()=>{this['_bindFirstCommentView']();});}['getTemplate'](){const _0x21d490=this['bindTemplate'];return{'tag':'div','attributes':{'class':['ck','ck-thread','ck-reset_all-excluded','ck-rounded-corners',_0x21d490['if']('isActive','ck-thread--active'),_0x21d490['if']('isUnlinked','ck-thread--unlinked'),_0x21d490['to']('actionIndicator',_0x5babc7=>_0x5babc7?'ck-thread--'+_0x5babc7:'')],'data-thread-id':this['_model']['id'],'tabindex':0x0,'role':'listitem','aria-label':_0x21d490['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 _0xbeeaf4 of this['commentsListView']['commentViews'])_0xbeeaf4['cancelConfirm']();}['_bindFirstCommentView'](){const {locale:_0x126420}=this,_0xc56059=this['commentsListView']['commentViews']['get'](0x0);_0xc56059===this['_boundFirstCommentView']||_0xc56059['isSystemComment']||(this['_boundFirstCommentView']=_0xc56059,this['unbind']('actionIndicator'),this['bind']('actionIndicator')['to'](_0xc56059,'actionIndicator',_0x55edd7=>'remove'===_0x55edd7?'remove':null),_0xc56059['placeholder']=N(_0x126420,'Write\x20a\x20comment...'),_0xc56059['removeButton']['on']('execute',_0x360853=>{_0x360853['stop'](),this['showConfirm'](N(_0x126420,'Delete\x20comment\x20thread?'),this['containerElement'])['then'](()=>{this['fire']('removeCommentThread');});},{'priority':'high'}),this['on']('removeConfirm',()=>{_0xc56059['focus']();}),_0xc56059['actionBar']['add'](this['resolveButton'],0x0),_0xc56059['focusables']['add'](this['resolveButton'],0x0));}['_createResolveButton'](){const _0x318e9c=new _0x10b016(this['locale']);return _0x318e9c['label']=N(this['locale'],'Resolve'),_0x318e9c['tooltip']=N(this['locale'],'Resolve'),_0x318e9c['icon']=_0x3ddff7,_0x318e9c['extendTemplate']({'attributes':{'class':'ck-comment--resolve'}}),_0x318e9c['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3a2284=>!_0x3a2284),_0x318e9c['bind']('isVisible')['to'](this['_model'],'isResolvable',this['_model'],'isResolved',(_0x731975,_0x5b12fb)=>_0x731975&&!_0x5b12fb),_0x318e9c['on']('execute',()=>{this['fire']('resolveCommentThread',this['_model']['id']);}),_0x318e9c;}['_updateArchivedThreadHeader'](){this['_model']['archivedAt']?this['commentThreadChildren']['has'](this['commentThreadHeaderView'])||(this['commentThreadChildren']['add'](this['commentThreadHeaderView'],0x0),this['focusables']['add'](this['commentThreadHeaderView'],0x0)):this['commentThreadChildren']['has'](this['commentThreadHeaderView'])&&(this['commentThreadChildren']['remove'](this['commentThreadHeaderView']),this['focusables']['remove'](this['commentThreadHeaderView']));}}class is extends kt{constructor(_0x4e664a){super(_0x4e664a),this['set']('content',''),this['setTemplate']({'tag':'div','attributes':{'class':['ck-content','ck-comment__content','ck-annotation__content']}});}['render'](){super['render'](),this['on']('change:content',(_0x1c5cbf,_0x21b209,_0x28c510)=>{this['element']['innerHTML']=_0x28c510;}),this['element']['innerHTML']=this['content'];}}class di extends kt{['visibleView'];['ariaDescriptionView'];['focusables'];['focusTracker'];['keystrokes'];['focusCycler'];['_model'];['_config'];constructor(_0xa4f608,_0x3b0469,_0x23df92){super(_0xa4f608),this['_model']=_0x3b0469,this['_config']=_0x23df92,this['isSystemComment']=!!this['_config']['isSystemComment'],this['set']('isEditMode',!0x1),this['set']('isCollapsed',!0x0),this['bind']('ariaLabel')['to'](_0x3b0469,'content',_0x3b0469,'authoredAt',(_0x5a7ba7,_0x564c09)=>N(_0xa4f608,'COMMENT_ARIA_LABEL',[_0x3b0469['author']['name'],_0x23df92['formatDateTime'](_0x564c09),new DOMParser()['parseFromString'](_0x5a7ba7,'text/html')['body']['textContent'],_0x3b0469['isExternal']?this['getExternalCommentNote']():''])),this['ariaDescriptionView']=new Yt(_0xa4f608,N(_0xa4f608,'COMMENT_THREAD_DESCRIPTION')),this['visibleView']=this['createCollection'](),this['visibleView']['add'](this['_createCommentContentView']()),this['focusables']=new _0x42bc84(),this['focusTracker']=new _0x119ecb(),this['keystrokes']=new jt(),this['focusCycler']=new _0x206411({'focusables':this['focusables'],'focusTracker':this['focusTracker'],'keystrokeHandler':this['keystrokes'],'keystrokeHandlerOptions':{'filter':_0x26ff00=>_0x26ff00['target']!==this['element']},'actions':{'focusPrevious':'shift+tab','focusNext':'tab'}});}['expand'](){this['isCollapsed']=!0x1;}['collapse'](){this['isEditMode']||(this['isCollapsed']=!0x0);}['focus'](){this['element']['focus']();}['render'](){super['render'](),this['_setupKeyboardNavigation']();}async['destroy'](){await this['visibleView']['get'](0x0)['destroy'](),super['destroy']();}['switchToEditMode'](){this['isEditMode']||(this['isEditMode']=!0x0,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentInputView']()));}['switchToDisplayMode'](){this['isEditMode']&&(this['isEditMode']=!0x1,this['visibleView']['remove'](0x0)['destroy'](),this['visibleView']['add'](this['_createCommentContentView']()));}['getExternalCommentNote'](){return'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_COMMENT'):N(this['locale'],'EXTERNAL_COMMENT');}['getUserViewNotificationText'](){return this['_model']['isExternal']?'importWord'===this['_model']['attributes']['@external']['source']?N(this['locale'],'EXTERNAL_IMPORT_WORD_AVATAR',this['_model']['creator']['name']):N(this['locale'],'EXTERNAL_AVATAR',this['_model']['creator']['name']):null;}['_createCommentContentView'](){const _0x224715=new is(this['locale']);return _0x224715['bind']('content')['to'](this['_model'],'content',this,'isCollapsed',(_0x40a82e,_0x150103)=>_0x150103?ts(_0x40a82e,{'limit':this['_config']['maxCommentCharsWhenCollapsed']}):_0x40a82e),_0x224715;}['_createCommentInputView'](){this['_config']['editorConfig']||(this['_config']['editorConfig']={}),this['_config']['editorConfig']['initialData']=this['_model']['content'];const _0x41cb2c=new es(this['locale'],this['_config']['editorConfig']);return _0x41cb2c['value']=this['_model']['content'],_0x41cb2c['bind']('disabledSubmit')['to'](this['_model'],'isReadOnly'),_0x41cb2c['submitLabel']=N(this['locale'],'Save'),_0x41cb2c['on']('submit',(_0x22567a,_0x21d3a3)=>{this['fire']('updateComment',this['_model']['id'],_0x21d3a3),this['switchToDisplayMode'](),this['focus']();}),_0x41cb2c['on']('cancel',()=>{this['switchToDisplayMode'](),this['focus']();}),_0x41cb2c['once']('editorReady',()=>{_0x41cb2c['focus']();}),_0x41cb2c['createEditor'](),_0x41cb2c['delegate']('editorReady')['to'](this),_0x41cb2c['delegate']('editorDestroyed')['to'](this),_0x41cb2c;}['_setupKeyboardNavigation'](){const _0x2d6ab4=this['element'];this['keystrokes']['listenTo'](_0x2d6ab4);for(const _0x15703d of this['focusables'])this['focusTracker']['add'](_0x15703d['element']),this['keystrokes']['listenTo'](_0x15703d['element']);this['focusables']['on']('change',(_0x22abef,_0x140358)=>{for(const _0x2a9c44 of _0x140358['removed'])this['focusTracker']['remove'](_0x2a9c44['element']),this['keystrokes']['stopListening'](_0x2a9c44['element']);for(const _0x139ed1 of _0x140358['added'])this['focusTracker']['add'](_0x139ed1['element']),this['keystrokes']['listenTo'](_0x139ed1['element']);}),this['keystrokes']['set']('enter',(_0x911029,_0x1b7230)=>{_0x2d6ab4===_0x911029['target']&&(this['focusCycler']['focusFirst'](),_0x1b7230());}),this['keystrokes']['set']('esc',(_0x50b0a6,_0x278d2b)=>{_0x2d6ab4!==_0x50b0a6['target']&&(this['focus'](),_0x278d2b());});}}class Tt extends/* #__PURE__ -- @preserve */
|
|
28
|
+
ti(di){['actionBar'];['userView'];constructor(_0x588d6c,_0x4ded9d,_0x4f6874){super(_0x588d6c,_0x4ded9d,_0x4f6874),this['set']('actionIndicator',null),this['set']('placeholder',N(_0x588d6c,'Reply...')),this['bind']('authoredAt')['to'](_0x4ded9d),this['bind']('resolvedAt')['to'](_0x4ded9d),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 _0x432c69(_0x588d6c,_0x4ded9d['author'],this['getUserViewNotificationText']()),this['userView']['extendTemplate']({'attributes':{'class':['ck-comment__user','ck-annotation__user'],'aria-hidden':!0x0}}),this['listenTo'](_0x4ded9d,'change:isRemovable',()=>this['cancelConfirm']()),this['setTemplate'](this['getTemplate']());}['getTemplate'](){const _0x362fc8=this['bindTemplate'],_0x5a8acd=[{'tag':'div','attributes':{'class':['ck-comment__info','ck-annotation__info']},'children':[{'tag':'span','children':[{'text':this['userView']['name']}],'attributes':{'class':['ck-comment__info-name','ck-annotation__info-name'],'data-cke-tooltip-text':this['userView']['name']}},{'tag':'time','attributes':{'datetime':_0x362fc8['to']('authoredAt'),'class':['ck-comment__info-time','ck-annotation__info-time']},'children':[{'text':_0x362fc8['to']('authoredAt',_0x562ec9=>this['_config']['formatDateTime'](_0x562ec9))}]}]},{'tag':'div','attributes':{'class':['ck-comment__actions','ck-annotation__actions',_0x362fc8['if']('isEditMode','ck-comment__actions--hidden'),_0x362fc8['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']&&_0x5a8acd['push']({'tag':'div','attributes':{'class':['ck-comment__external']},'children':[{'text':this['getExternalCommentNote']()}]}),{'tag':'li','attributes':{'class':['ck-comment__wrapper'],'tabindex':-0x1,'aria-label':_0x362fc8['to']('ariaLabel'),'aria-describedby':this['ariaDescriptionView']['id'],'role':'listitem'},'children':[{'tag':'div','attributes':{'class':['ck-comment','ck-annotation',_0x362fc8['if']('isEditMode','ck-comment--edit'),_0x362fc8['if']('isSystemComment','ck-comment--info'),_0x362fc8['to']('actionIndicator',_0x10e6c1=>_0x10e6c1?'ck-comment--'+_0x10e6c1:'')],'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':_0x5a8acd}]}]};}['_createEditButton'](){const _0x356aad=new _0x39d67e(this['locale']);return _0x356aad['label']=N(this['locale'],'Edit'),_0x356aad['icon']=_0x57d6a5,_0x356aad['withText']=!0x0,_0x356aad['extendTemplate']({'attributes':{'class':'ck-comment--edit'}}),_0x356aad['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x22d194=>!_0x22d194),_0x356aad['bind']('isVisible')['to'](this['_model'],'isEditable'),_0x356aad['on']('execute',()=>this['switchToEditMode']()),_0x356aad;}['_createRemoveButton'](){const _0x2bbf8b=new _0x39d67e(this['locale']);return _0x2bbf8b['label']=N(this['locale'],'Remove'),_0x2bbf8b['icon']=_0x52bd7f,_0x2bbf8b['withText']=!0x0,_0x2bbf8b['extendTemplate']({'attributes':{'class':'ck-comment--remove'}}),_0x2bbf8b['bind']('isEnabled')['to'](this['_model'],'isReadOnly',_0x3796ec=>!_0x3796ec),_0x2bbf8b['bind']('isVisible')['to'](this['_model'],'isRemovable'),_0x2bbf8b['on']('execute',()=>{this['showConfirm'](N(this['locale'],'Delete\x20comment?'),this['element'])['then'](()=>{this['fire']('removeComment',this['_model']['id']);});}),_0x2bbf8b;}['_createDropdown'](){const _0x2c604c=_0x25a7f2(this['locale'],_0x281113),_0x356196=_0x2c604c['panelView']['children'],_0x4d30e2=new _0xfa59b0(this['locale']),_0x583ef3=_0x2c604c['bindTemplate'];_0x348b07(_0x2c604c,()=>this['items']['find'](_0x1eb502=>_0x1eb502['isVisible'])),_0x2c604c['extendTemplate']({'attributes':{'class':[_0x583ef3['if']('isVisible','ck-hidden',_0x3cad12=>!_0x3cad12)]}});const _0x1abcd0=(_0x47d5fe,_0x1ace47=-0x1)=>{const _0x5d1820=new _0x3923f4(this['locale']);_0x5d1820['children']['add'](_0x47d5fe);const _0x38711=_0x1ace47>-0x1?_0x1ace47:_0x4d30e2['items']['length'];_0x4d30e2['items']['add'](_0x5d1820,_0x38711);const _0x531400=Array['from'](this['items']);_0x2c604c['unbind']('isEnabled','isVisible'),_0x2c604c['bind']('isEnabled')['toMany'](_0x531400,'isEnabled',(..._0x37e491)=>_0x37e491['some'](_0x24cac8=>_0x24cac8)),_0x2c604c['bind']('isVisible')['toMany'](_0x531400,'isVisible',(..._0x4887b3)=>_0x4887b3['some'](_0x1744a3=>_0x1744a3));};_0x2c604c['panelPosition']='sw',_0x2c604c['buttonView']['set']({'label':N(this['locale'],'Show\x20more\x20items'),'icon':_0x5a552d});for(const _0x5d019b of this['items'])_0x1abcd0(_0x5d019b);return _0x356196['add'](_0x4d30e2),_0x2c604c['listenTo'](this['items'],'add',(_0x4e3ad8,_0x11076f,_0x12b0b7)=>{_0x1abcd0(_0x11076f,_0x12b0b7);}),_0x2c604c['listenTo'](this['items'],'remove',(_0x44eecc,_0x20901c,_0x49c0c1)=>{_0x4d30e2['items']['remove'](_0x49c0c1);}),_0x2c604c;}['_attachActions'](_0xde980e,_0x43184c){const _0x3a1641=_0xde980e&&_0xde980e['element'];_0x3a1641&&(this['listenTo'](_0x3a1641,'mouseenter',()=>this['actionIndicator']=_0x43184c),this['listenTo'](_0x3a1641,'focus',()=>this['actionIndicator']=_0x43184c),this['listenTo'](_0x3a1641,'mouseleave',()=>this['actionIndicator']=null),this['listenTo'](_0x3a1641,'blur',()=>this['actionIndicator']=null));}['_createCommentInputView'](){const _0xb110ac=super['_createCommentInputView']();return _0xb110ac['bind']('placeholder')['to'](this),_0xb110ac;}['render'](){super['render'](),this['_attachActions'](this['editButton'],'edit'),this['_attachActions'](this['removeButton'],'remove');}}function xt(_0x1564f6){const _0x25777b=Dt(_0x1564f6,0x1e),_0x2e80fb=new MutationObserver(_0x2d458b=>{for(const _0x5e5812 of _0x2d458b)('attributes'==_0x5e5812['type']&&'class'==_0x5e5812['attributeName']||'childList'==_0x5e5812['type']||'characterData'==_0x5e5812['type'])&&_0x25777b();});return{'attach'(_0x17cf6f){_0x2e80fb['observe'](_0x17cf6f,{'attributes':!0x0,'childList':!0x0,'subtree':!0x0,'characterData':!0x0});},'detach'(){_0x2e80fb['disconnect'](),_0x25777b['cancel']();}};}class E extends kt{['focusTracker'];['id'];['keystrokes'];['content'];['mainView'];['_mutationObserver'];constructor(_0x3bf0cc,_0x184288){super(_0x3bf0cc),this['id']=_0x4552d2(),this['focusTracker']=new _0x119ecb(),this['keystrokes']=new jt(),this['keystrokes']['set']('Esc',(_0x33c861,_0x385a36)=>this['fire']('Esc',_0x385a36)),this['set']('targetRect',{'top':0x0,'right':0x0,'bottom':0x0,'left':0x0}),this['set']('height',0x0),this['set']('isActive',!0x1),this['set']('isDirty',!0x1),this['set']('length',0x0),this['set']('type',''),this['_mutationObserver']=xt(()=>this['_updateHeight']()),this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this),this['content']['add'](_0x184288),this['mainView']=_0x184288;const _0x275e55=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-annotation-wrapper','ck-rounded-corners',_0x275e55['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 _0x434786=this['element']['clientHeight'];_0x434786&&(this['height']=_0x434786);}}class T extends/* #__PURE__ -- @preserve */
|
|
29
|
+
_0x1201c1(){['view'];['focusableElements'];['_type'];['_target'];constructor({view:_0x2764ba,target:_0x4d19ad,type:_0x4466d5,isVisible:_0x3b56c3=!0x0}){super(),this['view']=_0x2764ba,this['view']['element']||this['view']['render'](),this['_type']=_0x4466d5,this['_target']=_0x4d19ad,T['_assertCorrectTarget'](this['_getNormalizedTarget']()),this['focusableElements']=new _0x7eb5c5([this['view']['element']],{'idProperty':'_id'}),this['focusableElements']['on']('add',(_0x1ddd50,_0x1b26f)=>{this['view']['focusTracker']['add'](_0x1b26f);}),this['focusableElements']['on']('remove',(_0x3ab8f3,_0x26352c)=>{this['view']['focusTracker']['remove'](_0x26352c);}),this['set']('isVisible',_0x3b56c3);}get['type'](){return'function'==typeof this['_type']?this['_type']():this['_type'];}get['innerView'](){return this['view']['mainView'];}get['target'](){const _0x554491=this['_getNormalizedTarget']();return T['_assertCorrectTarget'](_0x554491),_0x554491;}get['targetRect'](){const _0x2d5faa=this['target'];if(null===_0x2d5faa)return null;if(_0x2d5faa instanceof _0x436169)return _0x2d5faa;const _0x14cd6c=_0x2d5faa['filter'](_0x1f4ce9=>function(_0x47f04e){const _0x31c59e=_0x47f04e['offsetParent'];if(_0x31c59e)return!0x0;const _0x29e6d5=_0x47f04e['getClientRects']()['item'](0x0);return!!_0x29e6d5;}(_0x1f4ce9));return 0x0===_0x14cd6c['length']?null:new _0x436169(_0x14cd6c[0x0]['getClientRects']()['item'](0x0));}get['isActive'](){return this['view']['isActive'];}set['isActive'](_0x58c3d6){this['view']['isActive']=_0x58c3d6,this['view']['mainView']['isActive']=_0x58c3d6;}['updateTargetRect'](){this['view']['targetRect']=this['targetRect'];}['destroy'](){this['focusableElements']['stopListening'](),this['focusableElements']['clear'](),this['stopListening']();}['refreshVisibility'](){this['isVisible']=!!this['targetRect'];}static['_assertCorrectTarget'](_0xaa5a37){if(!(null===_0xaa5a37||_0xaa5a37 instanceof _0x436169||Array['isArray'](_0xaa5a37)&&_0xaa5a37['every'](_0x448741=>fi(_0x448741))))throw new _0x13348f('annotation-invalid-target',null,{'target':_0xaa5a37});}['_getNormalizedTarget'](){const _0x1c0ece='function'==typeof this['_target']?this['_target']():this['_target'];return fi(_0x1c0ece)?[_0x1c0ece]:_0x1c0ece;}}function fi(_0x5b6137){return null!==_0x5b6137&&'object'==typeof _0x5b6137&&'nodeType'in _0x5b6137&&0x1===_0x5b6137['nodeType'];}class S extends _0x7eb5c5{['_innerViewToAnnotation'];['_viewToAnnotation'];['_focusTracker'];constructor(_0x5b5fe8=[]){super(),this['_innerViewToAnnotation']=new Map(),this['_viewToAnnotation']=new Map(),this['_focusTracker']=new _0x119ecb(),this['_focusTracker']['on']('change:isFocused',(_0x296339,_0x5729e1,_0x53934f)=>{_0x53934f||this['fire']('blur');});for(const _0x3a927b of _0x5b5fe8)this['add'](_0x3a927b);}get['isFocused'](){return this['_focusTracker']['isFocused'];}['add'](_0x368f42){if(this['has'](_0x368f42))throw new _0x13348f('annotationcollection-duplicated-item',null);this['_innerViewToAnnotation']['set'](_0x368f42['innerView'],_0x368f42),this['_viewToAnnotation']['set'](_0x368f42['view'],_0x368f42);for(const _0x450fc6 of _0x368f42['focusableElements'])this['_focusTracker']['add'](_0x450fc6);this['listenTo'](_0x368f42['focusableElements'],'add',(_0x286a6a,_0x52d654)=>{this['_focusTracker']['add'](_0x52d654);}),this['listenTo'](_0x368f42['focusableElements'],'remove',(_0x16fb3a,_0x5d3df9)=>{this['_focusTracker']['remove'](_0x5d3df9);}),this['listenTo'](_0x368f42['view']['focusTracker'],'change:isFocused',(_0x5e0657,_0x17cfa5,_0x1d13e3)=>{_0x1d13e3&&this['fire']('focus',_0x368f42);}),_0x368f42['updateTargetRect']();const _0x488d31=this['_getOrderInContent'](_0x368f42['view']['targetRect']);return super['add'](_0x368f42,_0x488d31);}['remove'](_0x1c5319){if(!this['has'](_0x1c5319))throw new _0x13348f('annotationcollection-not-existing-item',null);this['stopListening'](_0x1c5319['view']['focusTracker']),this['stopListening'](_0x1c5319['focusableElements']);for(const _0x8a710 of _0x1c5319['focusableElements'])this['_focusTracker']['remove'](_0x8a710);return this['_viewToAnnotation']['delete'](_0x1c5319['view']),this['_innerViewToAnnotation']['delete'](_0x1c5319['innerView']),super['remove'](_0x1c5319);}['getByInnerView'](_0x520724){return this['_innerViewToAnnotation']['get'](_0x520724);}['getByView'](_0x16733b){return this['_viewToAnnotation']['get'](_0x16733b);}['destroy'](){super['clear'](),this['stopListening'](),this['_innerViewToAnnotation']['clear'](),this['_viewToAnnotation']['clear'](),this['_focusTracker']['destroy']();}['refreshPositioning'](){for(const _0x2b7c76 of this)_0x2b7c76['updateTargetRect']();this['_sort']();}['_sort'](){const _0x2a5279=Array['from'](this)['sort']((_0x1507bf,_0x24948f)=>w(_0x1507bf['view']['targetRect'],_0x24948f['view']['targetRect']));for(let _0x51297a=_0x2a5279['length']-0x1;_0x51297a>0x0;_0x51297a--){const _0x25fa4e=_0x2a5279[_0x51297a];_0x51297a!==this['getIndex'](_0x25fa4e)&&(this['remove'](_0x25fa4e),this['add'](_0x25fa4e));}}['_getOrderInContent'](_0x4179ea){let _0x47a9f4=0x0;if(!_0x4179ea)return this['length'];for(const _0x2d3c5f of this){const _0x1ec691=_0x2d3c5f['view']['targetRect'];if(_0x1ec691){if(w(_0x4179ea,_0x1ec691)<0x0)return _0x47a9f4;_0x47a9f4++;}}return _0x47a9f4;}}function v({source:_0x73b43d,target:_0x222e6f,filter:_0x30277b}){for(const _0x490a42 of _0x73b43d)_0x30277b(_0x490a42)&&_0x222e6f['add'](_0x490a42);_0x222e6f['listenTo'](_0x73b43d,'add',(_0x2e91f5,_0x5f0727)=>{_0x30277b(_0x5f0727)&&_0x222e6f['add'](_0x5f0727);}),_0x222e6f['listenTo'](_0x73b43d,'remove',(_0x2b4087,_0x59dc6b)=>{_0x222e6f['has'](_0x59dc6b)&&_0x222e6f['remove'](_0x59dc6b);});}function w(_0x4637a5,_0x33ac26){if(null===_0x4637a5&&null===_0x33ac26)return 0x0;if(null===_0x4637a5)return-0x1;if(null===_0x33ac26)return 0x1;const _0x34a9d5=_0x4637a5['top']-_0x33ac26['top'];return 0x0==_0x34a9d5?_0x4637a5['left']-_0x33ac26['left']:_0x34a9d5;}class y extends _0x1c3a7a{['collection'];['_visibleAnnotations'];static get['pluginName'](){return'Annotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x3ed53a){if(super(_0x3ed53a),this['collection']=new S(),this['_visibleAnnotations']=new S(),this['set']('activeAnnotations',new Set()),this['_bindAnnotationsToVisibleAnnotations'](),_0x3ed53a instanceof _0x1db22d){const _0x152a3e=_0x3ed53a['locale'];_0x3ed53a['accessibility']['addKeystrokeInfoGroup']({'id':'annotations','label':N(_0x152a3e,'ACCESSIBILITY_HELP_ANNOTATIONS_GROUP'),'keystrokes':[{'label':N(_0x152a3e,'ACCESSIBILITY_HELP_ANNOTATIONS_MOVE_TO'),'keystroke':'Ctrl+Shift+E'},{'label':N(_0x152a3e,'ACCESSIBILITY_HELP_ANNOTATIONS_EXIT'),'keystroke':'Esc'},{'label':N(_0x152a3e,'ACCESSIBILITY_HELP_ANNOTATIONS_ENTER'),'keystroke':'Enter'},{'label':N(_0x152a3e,'ACCESSIBILITY_HELP_ANNOTATIONS_BROWSE_GROUPS'),'keystroke':[['Tab'],['Shift+Tab']]},{'label':N(_0x152a3e,'ACCESSIBILITY_HELP_ANNOTATIONS_SUBMIT_COMMENT'),'keystroke':['Ctrl+Enter']},{'label':N(_0x152a3e,'ACCESSIBILITY_HELP_ANNOTATIONS_NAVIGATE_THREADS'),'keystroke':[['Arrowup'],['Arrowdown']]}]});}this['_setupEnterAnnotationKeystroke'](),this['_setupEscapeAnnotationHandling']();}['add'](_0x590ca5){this['collection']['add'](_0x590ca5);}['remove'](_0x2aecce){this['collection']['remove'](_0x2aecce),_0x2aecce['destroy']();}['refreshVisibility'](){for(const _0x4eb0c3 of this['collection'])_0x4eb0c3['refreshVisibility']();}['refreshPositioning'](){this['_visibleAnnotations']['refreshPositioning']();}['getByInnerView'](_0x5018b3){return this['collection']['getByInnerView'](_0x5018b3);}['deactivateAll'](){this['fire']('_deactivateAllAnnotations');}['destroy'](){for(const _0x35e941 of this['collection'])_0x35e941['destroy']();this['_visibleAnnotations']['destroy'](),this['collection']['destroy'](),super['destroy']();}['activate'](_0x58794c){this['fire']('_activateAnnotation',_0x58794c);}['createAnnotation'](_0x2586c7){return new T(_0x2586c7);}['createAnnotationView'](_0x374196,_0x17a58b){return new E(_0x374196,_0x17a58b);}['_addActiveAnnotation'](_0x479b6b){const _0x6b0e52=new Set(this['activeAnnotations']);_0x6b0e52['add'](_0x479b6b),this['activeAnnotations']=_0x6b0e52;}['_removeActiveAnnotation'](_0x202835){const _0x5eb921=new Set(this['activeAnnotations']);_0x5eb921['delete'](_0x202835),this['activeAnnotations']=_0x5eb921;}['_bindAnnotationsToVisibleAnnotations'](){const _0x5ddf02=this['collection'],_0x29e18c=this['_visibleAnnotations'];function _0x299988(_0x507f19){const _0x136d27=_0x507f19['source'];_0x136d27['isVisible']&&!_0x29e18c['has'](_0x136d27)?_0x29e18c['add'](_0x136d27):!_0x136d27['isVisible']&&_0x29e18c['has'](_0x136d27)&&_0x29e18c['remove'](_0x136d27),_0x136d27['view']['focusTracker']['remove'](_0x136d27['view']['element']),_0x136d27['view']['focusTracker']['add'](_0x136d27['view']['element']);}this['listenTo'](_0x5ddf02,'add',(_0x1763f8,_0x3f069e)=>{_0x3f069e['isVisible']&&_0x29e18c['add'](_0x3f069e),this['listenTo'](_0x3f069e,'change:isVisible',_0x299988);}),this['listenTo'](_0x5ddf02,'remove',(_0x11a469,_0x4ba955)=>{_0x29e18c['has'](_0x4ba955)&&_0x29e18c['remove'](_0x4ba955),this['stopListening'](_0x4ba955,'change:isVisible',_0x299988);});}['_setupEnterAnnotationKeystroke'](){const _0x563af5=_0x60ffd7=>{_0x60ffd7['on']('ready',()=>{_0x60ffd7['keystrokes']['set'](_0x337bf3,(_0x466efd,_0x5e2af5)=>{const _0x12d7d6=_0x186b13(this['activeAnnotations']['values']());_0x12d7d6&&(_0x12d7d6['view']['focus'](),_0x5e2af5());});});};this['context']instanceof _0x1db22d?_0x563af5(this['context']):this['context']['editors']&&this['context']['editors']['on']('add',(_0x4baf00,_0x23fc7f)=>{_0x563af5(_0x23fc7f);});}['_setupEscapeAnnotationHandling'](){const _0x46cead=_0x5b0954=>{const _0x242ffa=_0x5b0954['source'],_0x416850=[];let _0x150aed;if(Array['isArray'](_0x242ffa['target'])){_0x150aed=_0x242ffa['target'][0x0],this['context']instanceof _0x1db22d?_0x416850['push'](this['context']):this['context']['editors']&&_0x416850['push'](...this['context']['editors']);for(const _0x3b000b of _0x416850)for(const _0x40a540 of _0x3b000b['editing']['view']['domRoots']['values']())if(_0x40a540['contains'](_0x150aed))return void _0x3b000b['editing']['view']['focus']();_0x150aed['focus']();}};this['listenTo'](this['collection'],'add',(_0x275438,_0x59e2a3)=>{this['listenTo'](_0x59e2a3,'escape',_0x46cead,{'priority':'low'});}),this['listenTo'](this['collection'],'remove',(_0x2dc6fb,_0x363319)=>{this['stopListening'](_0x363319,'escape',_0x46cead);});}}const _t=Symbol('noChannel'),bt={'admin':!0x0,'modifyAll':!0x1,'write':!0x0,'resolve':!0x0};class o extends _0x1c3a7a{['_threads'];['_threadToController'];['_viewToController'];static get['requires'](){return[y,lt,it];}static get['pluginName'](){return'CommentsRepository';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x594eaa){super(_0x594eaa),this['_threads']=new Map(),this['_threadToController']=new Map(),this['_viewToController']=new Map(),this['set']('_readOnlyChannels',new Set()),this['set']('_permissions',new Map());const _0x46488a=this['context']['config'];_0x46488a['define']('comments.maxCommentsWhenCollapsed',0x2),_0x46488a['define']('comments.maxThreadTotalWeight',0x1f4),_0x46488a['define']('comments.maxCommentCharsWhenCollapsed',0x8c),_0x46488a['define']('comments.CommentThreadView',gt),_0x46488a['define']('comments.CommentView',Tt),_0x46488a['get']('comments.editorConfig')||console['warn']('Missing\x20comments\x20editor\x20configuration\x20(`comments.editorConfig`).\x20Default\x20configuration\x20will\x20be\x20used\x20instead.');}['init'](){const _0x30664e=this['context']['plugins']['get'](y);this['set']('activeCommentThread',null),this['on']('addCommentThread',(_0x349126,_0x75b3c0)=>this['_addCommentThread'](_0x75b3c0)),this['on']('submitCommentThread',(_0x110a1b,_0x331525)=>this['_submitCommentThread'](_0x331525)),this['on']('resolveCommentThread',(_0x174357,_0x1645bf)=>this['_resolveCommentThread'](_0x1645bf)),this['on']('resolveCommentThread',(_0x3fdce0,_0x5894ba)=>this['_updateActiveAnnotation'](_0x5894ba),{'priority':'lowest'}),this['on']('reopenCommentThread',(_0x279887,_0xe9613e)=>this['_reopenCommentThread'](_0xe9613e)),this['on']('reopenCommentThread',(_0x27680c,_0x1ad6b6)=>this['_updateActiveAnnotation'](_0x1ad6b6),{'priority':'lowest'}),this['on']('removeCommentThread',(_0x5aad3a,_0x5d684e)=>this['_removeCommentThread'](_0x5d684e)),this['on']('updateCommentThread',(_0x28020f,_0x4a94df)=>this['_updateCommentThread'](_0x4a94df)),this['on']('updateCommentThread',(_0x1dbd45,_0x3ed453)=>this['_updateActiveAnnotation'](_0x3ed453),{'priority':'lowest'}),this['on']('addComment',(_0xb9a29e,_0x4aaf9b)=>this['_addComment'](_0x4aaf9b)),this['on']('updateComment',(_0x38c557,_0x22e481)=>this['_updateComment'](_0x22e481)),this['on']('removeComment',(_0x19abdf,_0x49409e)=>this['_removeComment'](_0x49409e)),this['on']('addComment',(_0x49d6f8,{threadId:_0x47349a,isFromAdapter:_0x4d95b7})=>{if(_0x4d95b7)return;const _0x4a3fec=this['getCommentThread'](_0x47349a),_0x44e14c=_0x4a3fec&&this['_threadToController']['get'](_0x4a3fec);_0x44e14c&&_0x44e14c['view']['commentsListView']['focus'](-0x1);},{'priority':'lowest'}),this['listenTo'](_0x30664e,'change:activeAnnotations',(_0x5cebc9,_0x385320,_0xfe10c4)=>{const _0x41aa6b=Array['from'](_0xfe10c4)['map'](_0xbf5f8c=>this['_viewToController']['get'](_0xbf5f8c['innerView']))['filter'](Boolean)[0x0];this['activeCommentThread']=_0x41aa6b?_0x41aa6b['model']:null;});}set['adapter'](_0x4362c2){if(this['_adapter'])throw new _0x13348f('commentsrepository-adapter-already-set');this['_adapter']=_0x4362c2;}get['adapter'](){return this['_adapter'];}['addCommentThread']({channelId:_0x37d2cb=_t,threadId:_0x6eba2=_0x4552d2(),comments:_0x398932=[],unlinkedAt:_0x56c4f1=null,resolvedAt:_0x1207f3=null,resolvedBy:_0x171f20=null,target:_0x36127b=null,context:_0x27962f=null,attributes:_0x1f6c5b={},isResolvable:_0x476cf5=!0x0,isSubmitted:_0x5d7280=!0x1,isFromAdapter:_0x1083aa=!0x1}={}){return this['fire'](Nt('addCommentThread',_0x37d2cb),{'channelId':_0x37d2cb,'threadId':_0x6eba2,'comments':_0x398932,'unlinkedAt':_0x56c4f1,'resolvedAt':_0x1207f3,'resolvedBy':_0x171f20,'target':_0x36127b,'context':_0x27962f,'attributes':_0x1f6c5b,'isFromAdapter':_0x1083aa,'isResolvable':_0x476cf5,'isSubmitted':_0x5d7280}),this['getCommentThread'](_0x6eba2);}['openNewCommentThread']({channelId:_0x4f6a97=_t,threadId:_0x344377=_0x4552d2(),target:_0x281a0e,context:_0x358e3a=null,isResolvable:_0x2a5ebd=!0x0}){if(this['_readOnlyChannels']['has'](_0x4f6a97)||this['_readOnlyChannels']['has'](void 0x0))return null;if(!_0x281a0e)throw new _0x13348f('commentsrepository-missing-target');const _0x2e0883=this['addCommentThread']({'channelId':_0x4f6a97,'threadId':_0x344377,'target':_0x281a0e,'context':_0x358e3a,'isResolvable':_0x2a5ebd});if(!_0x2e0883)return null;const _0x3bf195=this['_threadToController']['get'](_0x2e0883),_0x5cab7e=_0x3bf195['view']['commentThreadInputView']['commentInputView'],_0x315967=this['context']['plugins']['get'](y),_0x41d18b=_0x315967['getByInnerView'](_0x3bf195['view']);return _0x315967['activate'](_0x41d18b),_0x5cab7e['once']('editorReady',()=>_0x5cab7e['focus']()),_0x2e0883;}['hasCommentThread'](_0x591c5b){if('string'!=typeof _0x591c5b)throw new _0x13348f('commentsrepository-invalid-comment-thread-id');return this['_threads']['has'](_0x591c5b);}['updateCommentThread']({channelId:_0x381326=_t,threadId:_0x51c457,context:_0x584a99,unlinkedAt:_0x5ef751,attributes:_0x588142,isFromAdapter:_0x36d1a3=!0x1}){return this['fire'](Nt('updateCommentThread',_0x381326),{'channelId':_0x381326,'threadId':_0x51c457,'context':_0x584a99,'unlinkedAt':_0x5ef751,'attributes':_0x588142,'isFromAdapter':_0x36d1a3}),this['getCommentThread'](_0x51c457);}['getCommentThread'](_0x3374e){if('string'!=typeof _0x3374e)throw new _0x13348f('commentsrepository-invalid-comment-thread-id');return this['_threads']['get'](_0x3374e);}['fetchCommentThread']({channelId:_0x511836,threadId:_0x7e92c8}={}){const _0xc12cb6=this['getCommentThread'](_0x7e92c8);if(_0xc12cb6)return Promise['resolve'](_0xc12cb6);if(!this['adapter'])return Promise['resolve'](void 0x0);if('function'!=typeof this['adapter']['getCommentThread'])throw new _0x13348f('commentsrepository-missing-thread-and-adapter-method',this['context']);return this['adapter']['getCommentThread']({'channelId':_0x511836,'threadId':_0x7e92c8})['then'](_0x1bf6fe=>this['hasCommentThread'](_0x7e92c8)?this['getCommentThread'](_0x7e92c8):_0x1bf6fe?this['addCommentThread'](Object['assign']({'isFromAdapter':!0x0,'channelId':_0x511836},_0x1bf6fe)):void 0x0)['catch'](_0x490828=>{throw console['error'](_0x490828),new _0x13348f('commentsrepository-fetch-comment-thread',this['context']);});}['getCommentThreads']({channelId:_0x4dea8c,skipNotAttached:_0x512007=!0x1,skipEmpty:_0x51bfd1=!0x1,toJSON:_0x185267=!0x1}={}){const _0x162034=[];for(const _0x450f25 of this['_threads']['values']())_0x4dea8c&&_0x450f25['channelId']!==_0x4dea8c||_0x512007&&!_0x450f25['isAttached']||_0x51bfd1&&0x0===_0x450f25['length']||_0x162034['push'](_0x450f25);return _0x185267?_0x162034['map'](_0x48912f=>_0x48912f['toJSON']()):_0x162034;}['getAnnotationForCommentThread'](_0x5b634f){const _0x6a2fc6=this['_threadToController']['get'](_0x5b634f);if(!_0x6a2fc6)return null;return this['context']['plugins']['get'](y)['getByInnerView'](_0x6a2fc6['view'])||null;}['getCommentThreadForAnnotation'](_0xeb7a8){const _0x1abf10=this['_viewToController']['get'](_0xeb7a8['innerView']);return _0x1abf10?_0x1abf10['model']:null;}['setActiveCommentThread'](_0x3f88b2){const _0x407ae6=this['context']['plugins']['get'](y);if(!_0x3f88b2)return void(this['activeCommentThread']&&_0x407ae6['deactivateAll']());const _0x153c52=this['getCommentThread'](_0x3f88b2);if(!_0x153c52)throw new _0x13348f('commentsrepository-active-missing-comment-thread',null,{'threadId':_0x3f88b2});if(!this['_threadToController']['has'](_0x153c52))throw new _0x13348f('commentsrepository-active-not-attached',null,{'threadId':_0x3f88b2});const _0x595354=_0x407ae6['getByInnerView'](this['_threadToController']['get'](_0x153c52)['view']);_0x407ae6['activate'](_0x595354);}['switchReadOnly'](_0x2a2ad5,_0x2bd910){_0x2a2ad5?this['_readOnlyChannels']['add'](_0x2bd910):this['_readOnlyChannels']['delete'](_0x2bd910),this['fire']('change:_readOnlyChannels','_readOnlyChannels',this['_readOnlyChannels'],this['_readOnlyChannels']);}['isReadOnly'](_0xe29f60){return this['_readOnlyChannels']['has'](_0xe29f60)||this['_readOnlyChannels']['has'](void 0x0);}['createCommentThreadController'](_0x3020e8,_0x11d1a6){return new vt(_0x3020e8,_0x11d1a6);}['setPermissions'](_0x196f5e,_0x1c8a17=_t){this['_permissions']['set'](_0x1c8a17,_0x196f5e),this['fire']('change:_permissions','_permissions',this['_permissions'],this['_permissions']);}['getPermissions'](_0x4155f9=_t){return this['_permissions']['has'](_0x4155f9)?this['_permissions']['get'](_0x4155f9):bt;}['_addCommentThread']({channelId:_0x3b91a1,threadId:_0x549d60,comments:_0xa387c4,unlinkedAt:_0x47f42e,resolvedAt:_0x3ba9d2,resolvedBy:_0x15e6db,target:_0x5632bc,context:_0x3e6b77,attributes:_0x4238d3,isFromAdapter:_0xdb96f,isResolvable:_0x592baa,isSubmitted:_0x25deea}){if('string'!=typeof _0x549d60)throw new _0x13348f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x549d60});if(this['hasCommentThread'](_0x549d60))throw new _0x13348f('commentsrepository-duplicated-comment-thread-id',null,{'threadId':_0x549d60});const _0x16675e=new pi(this,{'channelId':_0x3b91a1,'id':_0x549d60,'context':_0x3e6b77,'attributes':_0x4238d3,'unlinkedAt':_0x47f42e,'resolvedAt':_0x3ba9d2,'resolvedBy':_0x15e6db?this['context']['plugins']['get'](it)['getUser'](_0x15e6db):null,'isResolvable':_0x592baa,'isSubmitted':_0x25deea||_0xdb96f});this['_threads']['set'](_0x549d60,_0x16675e);for(const _0x1d5b15 of _0xa387c4)_0x16675e['_add'](this['_createNewComment']({'threadId':_0x549d60,..._0x1d5b15}));return _0x5632bc&&_0x16675e['attachTo'](_0x5632bc),_0xdb96f||!_0x16675e['length']?Promise['resolve']():this['_submitCommentThread']({'channelId':_0x3b91a1,'threadId':_0x549d60});}['_submitCommentThread']({channelId:_0x2320c3,threadId:_0x1e7abd}){if(!this['hasCommentThread'](_0x1e7abd))throw new _0x13348f('commentsrepository-missing-comment-thread',this);const _0x5ecee2=this['getCommentThread'](_0x1e7abd);if(_0x5ecee2['_isSubmitted']=!0x0,!this['adapter']||'function'!=typeof this['adapter']['addCommentThread'])return Promise['resolve']();const {id:_0x4aaaa5,comments:_0x52a836,resolvedAt:_0xc0f917,resolvedBy:_0x30b7cc,context:_0x5de80e,attributes:_0x162ce0}=_0x5ecee2,_0x286813=this['context']['plugins']['get']('PendingActions'),_0x1af846=_0x286813['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['addCommentThread']({'channelId':_0x2320c3,'threadId':_0x4aaaa5,'comments':_0x52a836['map'](_0x1582c0=>_0x1582c0['toJSON']()),'resolvedAt':_0xc0f917,'resolvedBy':_0x30b7cc?_0x30b7cc['id']:_0x30b7cc,'context':_0x5de80e,'attributes':_0x162ce0})['then'](({comments:_0x339582})=>{_0x286813['remove'](_0x1af846);for(const _0x579533 of _0x339582)this['_updateComment']({'channelId':_0x2320c3,'threadId':_0x1e7abd,'commentId':_0x579533['commentId'],'createdAt':_0x579533['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x2e37cf=>{throw console['error'](_0x2e37cf),new _0x13348f('commentsrepository-add-comment-thread-internal-error',this);});}['_attachCommentThread']({threadId:_0x419614,target:_0xe40597}){const _0x213a1b=this['getCommentThread'](_0x419614);if(!_0x213a1b)throw new _0x13348f('commentsrepository-attach-missing-comment-thread',this);const _0x3ae6c4=this['context']['plugins']['get']('PendingActions'),_0x2fff05=this['context']['plugins']['get'](y),_0x3a9068=this['_createCommentThreadView'](_0x213a1b),_0x39bfbd=new vt(_0x213a1b,_0x3a9068);let _0x2d8fbf=null;_0x3a9068['on']('change:isDirty',(_0x4442cd,_0x5687e7,_0x6d9bb2)=>{_0x6d9bb2?_0x2d8fbf=_0x3ae6c4['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD')):_0x2d8fbf&&(_0x3ae6c4['remove'](_0x2d8fbf),_0x2d8fbf=null);}),this['_threadToController']['set'](_0x213a1b,_0x39bfbd),this['_viewToController']['set'](_0x3a9068,_0x39bfbd);const _0x289881=new E(this['context']['locale'],_0x3a9068);_0x289881['bind']('length')['to'](_0x3a9068),_0x289881['bind']('isDirty')['to'](_0x3a9068,'isDirty',_0x3a9068,'length',(_0x3e9702,_0x3158b3)=>_0x3e9702||!_0x3158b3),_0x289881['bind']('isActive')['to'](_0x3a9068),_0x289881['type']='comment';const _0x3b4657=new T({'view':_0x289881,'target':_0xe40597,'type':'comment','isVisible':!_0x213a1b['archivedAt']&&!!('function'==typeof _0xe40597?_0xe40597():_0xe40597)});return _0x3a9068['on']('escape',()=>{_0x3b4657['fire']('escape');}),this['_bindAnnotationToEditors'](_0x3a9068,_0x3b4657),_0x2fff05['add'](_0x3b4657),_0x3b4657;}['_bindAnnotationToEditors'](_0x45f027,_0x52c227){this['listenTo'](_0x45f027,'editorReady',(_0x3e75cd,_0x46bf50)=>{const _0x29fce9=_0x46bf50['ui']['view']['body']['bodyCollectionContainer'];_0x52c227['focusableElements']['add'](_0x29fce9),this['context']instanceof _0x1db22d&&this['context']['ui']['focusTracker']['add'](_0x29fce9);},{'priority':'highest'}),this['listenTo'](_0x45f027,'editorDestroyed',(_0x3e0d8b,_0x241d5b)=>{const _0x2f29f1=_0x241d5b['ui']['view']['body']['bodyCollectionContainer'];_0x52c227['focusableElements']['has'](_0x2f29f1)&&_0x52c227['focusableElements']['remove'](_0x2f29f1),this['context']instanceof _0x1db22d&&this['context']['ui']['focusTracker']['remove'](_0x2f29f1);});}['_unbindEditors'](_0xb70c4e){this['stopListening'](_0xb70c4e,'editorReady'),this['stopListening'](_0xb70c4e,'editorDestroyed');}['_createCommentThreadView'](_0x2e3a89){const _0x2096d5=this['context']['plugins']['get'](it),{config:_0x321249,locale:_0xd086ce}=this['context'],_0x2d9ae7=pt(_0x321249['get']('locale'),_0xd086ce);return new(0x0,(_0x321249['get']('comments'))['CommentThreadView'])(_0xd086ce,_0x2e3a89,_0x2096d5['me'],{'editorConfig':{..._0x321249['get']('comments.editorConfig'),'licenseKey':this['context']['config']['get']('licenseKey')},'copyMarkers':_0x321249['get']('comments.copyMarkers'),'maxCommentsWhenCollapsed':_0x321249['get']('comments.maxCommentsWhenCollapsed'),'maxThreadTotalWeight':_0x321249['get']('comments.maxThreadTotalWeight'),'maxCommentCharsWhenCollapsed':_0x321249['get']('comments.maxCommentCharsWhenCollapsed'),'formatDateTime':_0x2d9ae7,'CommentView':_0x321249['get']('comments')['CommentView']});}['_resolveCommentThread']({threadId:_0x29bed3,channelId:_0x55de9a,resolvedAt:_0x194cf9,resolvedBy:_0x165f51,isFromAdapter:_0x5c52b6}){if(!this['hasCommentThread'](_0x29bed3))throw new _0x13348f('commentsrepository-missing-comment-thread',null,{'threadId':_0x29bed3});const _0x26e338=this['getCommentThread'](_0x29bed3);if(_0x26e338['isResolved'])throw new _0x13348f('commentsrepository-resolved-comment-thread',null,{'threadId':_0x29bed3});const _0x2c1e3f=this['context']['plugins']['get'](it);if(_0x26e338['resolvedBy']=_0x2c1e3f['getUser'](_0x165f51),_0x26e338['resolvedAt']=_0x194cf9,_0x5c52b6||!this['adapter']||'function'!=typeof this['adapter']['resolveCommentThread'])return Promise['resolve']();const _0x193804=this['context']['plugins']['get']('PendingActions'),_0x4821ba=_0x193804['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['resolveCommentThread']({'channelId':_0x55de9a,'threadId':_0x29bed3})['then'](({resolvedAt:_0x300a2a,resolvedBy:_0x1753d6})=>{_0x193804['remove'](_0x4821ba),_0x26e338['resolvedBy']['id']!==_0x1753d6&&(_0x26e338['resolvedBy']=_0x2c1e3f['getUser'](_0x1753d6)),_0x26e338['resolvedAt']=_0x300a2a;})['catch'](_0x1f1b32=>{throw console['error'](_0x1f1b32),new _0x13348f('commentsrepository-resolve-comment-thread-internal-error',this);});}['_reopenCommentThread']({threadId:_0xfff1a4,channelId:_0x5a7aef,isFromAdapter:_0x5eaa15}){if(!this['hasCommentThread'](_0xfff1a4))throw new _0x13348f('commentsrepository-missing-comment-thread',null,{'threadId':_0xfff1a4});const _0x2e5759=this['getCommentThread'](_0xfff1a4);if(!_0x2e5759['isResolved'])throw new _0x13348f('commentsrepository-reopen-comment-thread',null,{'threadId':_0xfff1a4});if(_0x2e5759['resolvedBy']=null,_0x2e5759['resolvedAt']=null,_0x5eaa15||!this['adapter']||'function'!=typeof this['adapter']['reopenCommentThread'])return Promise['resolve']();const _0x5a34a8=this['context']['plugins']['get']('PendingActions'),_0x4ebb74=_0x5a34a8['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['reopenCommentThread']({'channelId':_0x5a7aef,'threadId':_0xfff1a4})['then'](()=>_0x5a34a8['remove'](_0x4ebb74))['catch'](_0x3268bc=>{throw console['error'](_0x3268bc),new _0x13348f('commentsrepository-reopen-comment-thread-internal-error',this);});}['_removeCommentThread']({threadId:_0x1ec64d,isFromAdapter:_0x5a5ed7}){const _0x3695aa=this['getCommentThread'](_0x1ec64d);if(!_0x3695aa)throw new _0x13348f('commentsrepository-remove-missing-comment-thread',this);if(this['_detachCommentThread'](_0x1ec64d),this['_threads']['delete'](_0x1ec64d),!_0x3695aa['isSubmitted']||_0x5a5ed7||!this['adapter']||'function'!=typeof this['adapter']['removeCommentThread'])return Promise['resolve']();const _0x34161f=this['context']['plugins']['get']('PendingActions'),{channelId:_0x3e7e8b}=_0x3695aa,_0xc8b881=_0x34161f['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeCommentThread']({'channelId':_0x3e7e8b,'threadId':_0x1ec64d})['then'](()=>_0x34161f['remove'](_0xc8b881))['catch'](_0x4951f9=>{throw console['error'](_0x4951f9),new _0x13348f('commentsrepository-remove-comment-thread-internal-error',this);});}['_updateCommentThread']({threadId:_0x29e4a3,unlinkedAt:_0x13fce5,context:_0x31048c,attributes:_0x585aa1,isFromAdapter:_0x3b743d}){if('string'!=typeof _0x29e4a3)throw new _0x13348f('commentsrepository-invalid-comment-thread-id',null,{'threadId':_0x29e4a3});if(!this['hasCommentThread'](_0x29e4a3))throw new _0x13348f('commentsrepository-missing-comment-thread',null,{'threadId':_0x29e4a3});const _0x3ac745=this['getCommentThread'](_0x29e4a3);let _0x5360f0=!0x1;if(void 0x0!==_0x31048c&&_0x3ac745['context']!==_0x31048c&&(_0x3ac745['context']=_0x31048c,_0x5360f0=!0x0),void 0x0!==_0x13fce5&&_0x3ac745['unlinkedAt']!==_0x13fce5&&(_0x3ac745['unlinkedAt']=_0x13fce5,_0x5360f0=!0x0),_0x585aa1&&!At(_0x585aa1,_0x3ac745['attributes'])&&(_0x3ac745['attributes']=_0x585aa1,_0x5360f0=!0x0),!_0x5360f0)return Promise['resolve']();if(!_0x3ac745['isSubmitted']||_0x3b743d||!this['adapter']||'function'!=typeof this['adapter']['updateCommentThread'])return Promise['resolve']();const _0xfc9c6c=this['context']['plugins']['get']('PendingActions'),{channelId:_0x487a3c}=_0x3ac745,_0x3dbe2c=_0xfc9c6c['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateCommentThread']({'channelId':_0x487a3c,'threadId':_0x29e4a3,'context':_0x31048c,'unlinkedAt':_0x13fce5,'attributes':_0x585aa1})['then'](()=>_0xfc9c6c['remove'](_0x3dbe2c))['catch'](_0x344588=>{throw console['error'](_0x344588),new _0x13348f('commentsrepository-update-comment-thread-internal-error',this);});}['_detachCommentThread'](_0x4956fe){const _0x3459ea=this['context']['plugins']['get'](y),_0x2517bc=this['getCommentThread'](_0x4956fe);if(_0x2517bc['_isAttached']=!0x1,this['_threadToController']['has'](_0x2517bc)){const _0x453c4b=this['_threadToController']['get'](_0x2517bc),_0x5e7cc1=_0x453c4b['view'],_0x2cb8ce=_0x3459ea['getByInnerView'](_0x5e7cc1);this['_threadToController']['delete'](_0x2517bc),this['_viewToController']['delete'](_0x5e7cc1),_0x2cb8ce&&_0x3459ea['remove'](_0x2cb8ce),_0x453c4b['destroy'](),_0x5e7cc1['destroy']()['then'](()=>{this['_unbindEditors'](_0x5e7cc1);});}}['_updateActiveAnnotation']({threadId:_0x136789,resolvedAt:_0x197fd4,unlinkedAt:_0x115dd8}){const _0x4ab147=!!_0x197fd4,_0x1baf60=this['context']['plugins']['get'](y),_0x1ca8d1=this['getCommentThread'](_0x136789);if(this['_threadToController']['has'](_0x1ca8d1)){const _0x559a89=this['_threadToController']['get'](_0x1ca8d1)['view'],_0x1e4a08=_0x1baf60['getByInnerView'](_0x559a89);_0x1e4a08&&(_0x4ab147&&_0x1baf60['_removeActiveAnnotation'](_0x1e4a08),_0x115dd8?_0x1e4a08['isVisible']=!0x1:_0x1e4a08['refreshVisibility']());}}['_getExternalAuthor'](_0x1269f2){const _0x1fb3c5=this['context']['plugins']['get'](it),_0x4236a8=It('external:'+_0x1269f2),_0x2224dd=_0x1fb3c5['getUser'](_0x4236a8);return _0x2224dd||_0x1fb3c5['addUser']({'id':_0x4236a8,'name':_0x1269f2});}['_createNewComment']({threadId:_0x4243d9,commentId:_0x57ca8d=_0x4552d2(),content:_0x20c85a,authorId:_0x5f0e4e,createdAt:_0x446d94,attributes:_0x589029}){if('string'!=typeof _0x57ca8d)throw new _0x13348f('commentsrepository-invalid-commentid');if('string'!=typeof _0x5f0e4e)throw new _0x13348f('commentsrepository-invalid-comment-authorid');if('string'!=typeof _0x20c85a||!_0x20c85a['trim']())throw new _0x13348f('commentsrepository-invalid-comment-content');const _0x2bd760=this['context']['plugins']['get'](it)['getUser'](_0x5f0e4e);if(!_0x2bd760)throw new _0x13348f('commentsrepository-add-comment-user-not-exists',null,{'authorId':_0x5f0e4e});let _0x576437=null,_0x32633c=_0x446d94;return _0x589029?.['@external']&&(_0x576437=this['_getExternalAuthor'](_0x589029['@external']['authorName']),_0x32633c=new Date(_0x589029['@external']['createdAt'])),new wi(this,{'threadId':_0x4243d9,'id':_0x57ca8d,'author':_0x576437||_0x2bd760,'creator':_0x2bd760,'content':_0x20c85a,'createdAt':_0x446d94,'authoredAt':_0x32633c,'attributes':_0x589029});}['_addComment'](_0x181568){let {threadId:_0x13f092,content:_0x17e786,attributes:_0x3d3573,isFromAdapter:_0x2c0610}=_0x181568;const _0x33b547=this['getCommentThread'](_0x181568['threadId']);if(!_0x33b547)throw new _0x13348f('commentsrepository-add-comment-to-missing-comment-thread',this);const _0x51aa1c=this['_createNewComment'](_0x181568),{id:_0x60dffc}=_0x51aa1c;if(_0x33b547['_add'](_0x51aa1c),_0x2c0610||!this['adapter']||'function'!=typeof this['adapter']['addComment']||!_0x33b547['isSubmitted'])return Promise['resolve']();const _0x567cb5=this['context']['plugins']['get']('PendingActions'),{channelId:_0x2c1823}=_0x33b547,_0x14ac08=_0x567cb5['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return _0x3d3573||(_0x3d3573={}),this['adapter']['addComment']({'channelId':_0x2c1823,'threadId':_0x13f092,'commentId':_0x60dffc,'content':_0x17e786,'attributes':_0x3d3573})['then'](_0x2e9920=>{_0x567cb5['remove'](_0x14ac08),_0x2e9920&&this['_updateComment']({'channelId':_0x2c1823,'threadId':_0x13f092,'commentId':_0x60dffc,'createdAt':_0x2e9920['createdAt'],'isFromAdapter':!0x0});})['catch'](_0x48f242=>{throw console['error'](_0x48f242),new _0x13348f('commentsrepository-add-comment-internal-error',this);});}['_updateComment']({threadId:_0x2d1827,commentId:_0xd5f60c,content:_0x3f6d1f,createdAt:_0x52b053,attributes:_0x2e4d0c,isFromAdapter:_0x9dc651}){if(void 0x0!==_0x3f6d1f&&('string'!=typeof _0x3f6d1f||!_0x3f6d1f['trim']()['length']))throw new _0x13348f('commentsrepository-update-comment-invalid-content');const _0x22b9f6=this['getCommentThread'](_0x2d1827),_0x449963=_0x22b9f6['getComment'](_0xd5f60c);if(!_0x449963)throw new _0x13348f('commentsrepository-update-missing-comment',this);let _0x40993b=!0x1;if(_0x3f6d1f&&_0x3f6d1f!==_0x449963['content']&&(_0x449963['isEditable']||_0x9dc651)&&(_0x449963['content']=_0x3f6d1f,_0x40993b=!0x0),_0x52b053&&_0x52b053!==_0x449963['createdAt']&&(_0x449963['createdAt']=_0x52b053,_0x449963['attributes']&&_0x449963['attributes']['@external']||(_0x449963['authoredAt']=_0x52b053),_0x40993b=!0x0),_0x2e4d0c&&!At(_0x2e4d0c,_0x449963['attributes'])&&(_0x449963['attributes']=_0x2e4d0c,_0x40993b=!0x0),!_0x40993b)return Promise['resolve']();if(_0x22b9f6['fire']('commentUpdated'),_0x9dc651||!this['adapter']||'function'!=typeof this['adapter']['updateComment'])return Promise['resolve']();const _0x5a3610=this['context']['plugins']['get']('PendingActions'),{channelId:_0x54ad07}=this['getCommentThread'](_0x449963['threadId']),_0x38c175=_0x5a3610['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['updateComment']({'channelId':_0x54ad07,'threadId':_0x2d1827,'commentId':_0xd5f60c,'content':_0x3f6d1f,'attributes':_0x2e4d0c})['then'](()=>_0x5a3610['remove'](_0x38c175))['catch'](_0x4d2774=>{throw console['error'](_0x4d2774),new _0x13348f('commentsrepository-update-comment-internal-error',this);});}['_removeComment']({threadId:_0x552464,commentId:_0xd4065,isFromAdapter:_0x3d32e7}){const _0x169937=this['getCommentThread'](_0x552464),_0xcdbe6a=_0x169937['getComment'](_0xd4065);if(!_0xcdbe6a)throw new _0x13348f('commentsrepository-remove-missing-comment',this);if(_0x169937['_remove'](_0xcdbe6a),_0x3d32e7||!this['adapter']||'function'!=typeof this['adapter']['removeComment'])return Promise['resolve']();const _0x4b43b3=this['context']['plugins']['get']('PendingActions'),{channelId:_0x5f560c}=_0x169937,_0x75cdeb=_0x4b43b3['add'](N(this['context']['locale'],'PENDING_ACTION_COMMENT_THREAD'));return this['adapter']['removeComment']({'channelId':_0x5f560c,'threadId':_0x552464,'commentId':_0xd4065})['then'](()=>_0x4b43b3['remove'](_0x75cdeb))['catch'](_0x3106f2=>{throw console['error'](_0x3106f2),new _0x13348f('commentsrepository-remove-comment-internal-error',this);});}}class pi extends/* #__PURE__ -- @preserve */
|
|
30
|
+
_0x1201c1(){['channelId'];['id'];['_isAttached'];['_isSubmitted'];['comments'];['_repository'];constructor(_0x23b763,_0x90b47c){super();const _0x2280c6=_0x90b47c['isResolvable'];this['channelId']=_0x90b47c['channelId'],this['id']=_0x90b47c['id'],this['comments']=new _0x7eb5c5(),this['_repository']=_0x23b763,this['_isAttached']=!0x1,this['_isSubmitted']=_0x90b47c['isSubmitted'],this['set']('_hasTargetInContent',!0x0),this['bind']('isReadOnly')['to'](_0x23b763,'_permissions',_0x23b763,'_readOnlyChannels',()=>_0x23b763['isReadOnly'](this['channelId'])),this['bind']('isRemovable')['to'](_0x23b763,'_permissions',()=>_0x23b763['getPermissions'](this['channelId'])['admin']),this['bind']('canComment')['to'](_0x23b763,'_permissions',()=>{const _0x44f0b1=_0x23b763['getPermissions'](this['channelId']);return _0x44f0b1['write']||_0x44f0b1['admin'];}),this['bind']('isResolvable')['to'](_0x23b763,'_permissions',()=>_0x2280c6&&_0x23b763['getPermissions'](this['channelId'])['resolve']),this['set']('context',_0x90b47c['context']),this['bind']('archivedAt')['to'](this,'resolvedAt',this,'unlinkedAt',(_0x7388eb,_0x461edb)=>_0x7388eb?_0x461edb?_0x7388eb<_0x461edb?_0x7388eb:_0x461edb:_0x7388eb:_0x461edb),this['set']('unlinkedAt',_0x90b47c['unlinkedAt']||null),this['set']('resolvedAt',_0x90b47c['resolvedAt']||null),this['set']('resolvedBy',_0x90b47c['resolvedBy']||null),this['bind']('isResolved')['to'](this,'resolvedAt',_0xb18084=>!!_0xb18084),this['set']('attributes',_0x90b47c['attributes']||{});}get['weight'](){return Array['from'](this['comments'])['reduce']((_0x1fe00d,_0x1906f4)=>_0x1fe00d+_0x1906f4['weight'],0x0);}get['length'](){return this['comments']['length'];}get['isAttached'](){return this['_isAttached'];}get['isSubmitted'](){return this['_isSubmitted'];}['submit'](){const {channelId:_0xe2462e,id:_0x3f8ec4}=this;this['_repository']['fire'](Nt('submitCommentThread',_0xe2462e),{'channelId':_0xe2462e,'threadId':_0x3f8ec4});}['setUnlinkedAt'](_0x4080d1){this['_update']({'unlinkedAt':_0x4080d1});}['resolve']({resolvedAt:_0x18bb37=new Date(),resolvedBy:_0x50f503='',isFromAdapter:_0x18358f=!0x1}={}){const _0x3caca4=this['_repository']['context']['plugins']['get'](it)['me'],{channelId:_0x141878,id:_0x551e32}=this;this['_repository']['fire'](Nt('resolveCommentThread',_0x141878),{'channelId':_0x141878,'threadId':_0x551e32,'resolvedAt':_0x18bb37,'resolvedBy':_0x50f503||_0x3caca4['id'],'isFromAdapter':_0x18358f});}['reopen']({isFromAdapter:_0x16349c=!0x1}={}){const {channelId:_0x4d243c,id:_0x5f2447}=this;this['_repository']['fire'](Nt('reopenCommentThread',_0x4d243c),{'channelId':_0x4d243c,'threadId':_0x5f2447,'isFromAdapter':_0x16349c});}['setContext'](_0x1ee47c){this['context']||this['_update']({'context':_0x1ee47c});}['setAttribute'](_0x11858c,_0x58ff99){const _0x12ee2f=wt(this['attributes']);yt(_0x12ee2f,_0x11858c,_0x58ff99),this['_update']({'attributes':_0x12ee2f});}['removeAttribute'](_0x5ad3d0){const _0xfcff50=wt(this['attributes']);Ct(_0xfcff50,_0x5ad3d0),this['_update']({'attributes':_0xfcff50});}['remove']({isFromAdapter:_0x4755ec=!0x1}={}){const {channelId:_0x511ef2,id:_0x5b25d4}=this;this['_repository']['fire'](Nt('removeCommentThread',_0x511ef2),{'channelId':_0x511ef2,'threadId':_0x5b25d4,'isFromAdapter':_0x4755ec});}['attachTo'](_0x11eedb){return this['_repository']['_attachCommentThread']({'threadId':this['id'],'target':_0x11eedb});}['addComment'](_0x45dd34){const {channelId:_0x181447,id:_0x26a89e}=this;this['_repository']['fire'](Nt('addComment',_0x181447,_0x26a89e),Object['assign']({'channelId':_0x181447,'threadId':_0x26a89e},_0x45dd34));}['getComment'](_0x17209a){if('string'!=typeof _0x17209a)throw new _0x13348f('commentsrepository-get-comment-invalid-id',null,{'commentId':_0x17209a});return this['comments']['get'](_0x17209a);}['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'](_0x40cfd9=>_0x40cfd9['toJSON']()),'attributes':this['attributes']};}['_add'](_0x259aa7){return this['listenTo'](_0x259aa7,'change:authoredAt',()=>{const _0x5fc72b=this['_findOptimalIndex'](_0x259aa7),_0x5a1e44=this['comments'];_0x5fc72b-0x1!=_0x5a1e44['getIndex'](_0x259aa7)&&_0x5fc72b+0x1!=_0x5a1e44['getIndex'](_0x259aa7)&&(this['_remove'](_0x259aa7),this['_add'](_0x259aa7));}),this['comments']['add'](_0x259aa7,this['_findOptimalIndex'](_0x259aa7));}['_update'](_0x3e1a37){const {channelId:_0x100648,id:_0x5bd9c6}=this;this['_repository']['fire'](Nt('updateCommentThread',_0x100648),{..._0x3e1a37,'channelId':_0x100648,'threadId':_0x5bd9c6});}['_remove'](_0x714225){return this['stopListening'](_0x714225),_0x714225['destroy'](),this['comments']['remove'](_0x714225);}['_findOptimalIndex'](_0xadef27){const _0x18747a=this['comments']['find'](_0x4dbbd2=>new Date(_0x4dbbd2['authoredAt'])['getTime']()>new Date(_0xadef27['authoredAt'])['getTime']());return _0x18747a?this['comments']['getIndex'](_0x18747a):this['length'];}}class wi extends/* #__PURE__ -- @preserve */
|
|
31
|
+
_0x1201c1(){['id'];['threadId'];['author'];['creator'];['isExternal'];['createdAt'];['_repository'];constructor(_0x263aa7,_0x19b8be){super();const _0x13d077=_0x263aa7['context']['plugins']['get'](it)['me'],_0xc714f7=_0x263aa7['getCommentThread'](_0x19b8be['threadId']),_0x29c285=0x0===_0xc714f7['comments']['length'],_0x2770b6=_0x13d077===_0x19b8be['author'];this['id']=_0x19b8be['id'],this['threadId']=_0x19b8be['threadId'],this['author']=_0x19b8be['author'],this['creator']=_0x19b8be['creator'],this['isExternal']=Boolean(_0x19b8be['attributes']&&_0x19b8be['attributes']['@external']),this['set']('content',_0x19b8be['content']),this['createdAt']=_0x19b8be['createdAt']||new Date(),this['set']('authoredAt',_0x19b8be['authoredAt']||new Date()),this['bind']('resolvedAt')['to'](_0xc714f7,'resolvedAt'),this['set']('attributes',_0x19b8be['attributes']||{}),this['bind']('isEditable')['to'](_0x263aa7,'_permissions',()=>{const _0x3aea68=_0x263aa7['getPermissions'](_0xc714f7['channelId'])['write'],_0x10b6a5=_0x263aa7['getPermissions'](_0xc714f7['channelId'])['modifyAll'];return _0x2770b6&&_0x3aea68||!_0x2770b6&&_0x10b6a5;}),this['bind']('isRemovable')['to'](_0xc714f7,'isRemovable',_0x263aa7,'_permissions',_0x2f2fd2=>{const _0x3d7516=_0x263aa7['getPermissions'](_0xc714f7['channelId'])['write'],_0x12caa5=_0x263aa7['getPermissions'](_0xc714f7['channelId'])['modifyAll'];return _0x2770b6&&_0x3d7516||_0x2f2fd2&&_0x29c285||!_0x2770b6&&_0x12caa5&&!_0x29c285;}),this['bind']('isReadOnly')['to'](_0xc714f7,'isReadOnly'),this['_repository']=_0x263aa7;}get['weight'](){return Math['max'](function(_0x279f58){const _0x228601=document['createElement']('div');return _0x228601['innerHTML']=_0x279f58,_0x228601['textContent']['length'];}(this['content']),0xc8);}['update'](_0x15c5b3){const {threadId:_0x536f24,id:_0x29bfb0}=this;if(!this['_repository']['hasCommentThread'](_0x536f24))throw new _0x13348f('commentsrepository-update-comment-missing-comment-thread',this);const {channelId:_0x4bdeaf}=this['_repository']['getCommentThread'](_0x536f24);this['_repository']['fire'](Nt('updateComment',_0x4bdeaf,_0x536f24),{'channelId':_0x4bdeaf,'threadId':_0x536f24,'commentId':_0x29bfb0,..._0x15c5b3});}['setAttribute'](_0x16b141,_0x5a614a){const _0xcd7acf=wt(this['attributes']);yt(_0xcd7acf,_0x16b141,_0x5a614a),this['update']({'attributes':_0xcd7acf});}['removeAttribute'](_0x211f67){const _0x18732e=wt(this['attributes']);Ct(_0x18732e,_0x211f67),this['update']({'attributes':_0x18732e});}['remove'](_0x11b71b={}){if(!_0x11b71b['isFromAdapter']&&!this['isRemovable'])return;const {threadId:_0x34e654,id:_0x38aad2}=this;if(!this['_repository']['hasCommentThread'](_0x34e654))throw new _0x13348f('commentsrepository-remove-comment-missing-comment-thread',this);const {channelId:_0x169283}=this['_repository']['getCommentThread'](_0x34e654);this['_repository']['fire'](Nt('removeComment',_0x169283,_0x34e654),{'channelId':_0x169283,'threadId':_0x34e654,'commentId':_0x38aad2,..._0x11b71b});}['toJSON'](){return{'commentId':this['id'],'content':this['content'],'createdAt':this['createdAt'],'authorId':this['creator']['id'],'attributes':this['attributes']};}['destroy'](){this['stopListening']();}}function Nt(_0x1c3d70,..._0x2ce2cd){for(const _0x251b2a of _0x2ce2cd)void 0x0!==_0x251b2a&&(_0x1c3d70+=':'+String(_0x251b2a));return _0x1c3d70;}class ot extends _0x2473d2{constructor(_0x11ec34){super(_0x11ec34),this['set']('hasContent',!0x1);}['refresh'](){const _0x5b9247=this['editor']['model']['document']['selection'];this['isEnabled']=!0x0,this['hasContent']=!0x1;for(const _0x2219a7 of _0x5b9247['getRanges']())if(this['_hasContent'](_0x2219a7))return void(this['hasContent']=!0x0);}['execute']({threadId:_0x27e3a0=_0x4552d2(),ranges:_0x398603,comment:_0xd7c92a}={}){const _0x19be78=this['editor']['model'],_0x51a5c5=_0x398603??Array['from'](_0x19be78['document']['selection']['getRanges']()),_0x3f022d=[];for(const _0x4d7999 of _0x51a5c5)this['_hasContent'](_0x4d7999)&&_0x3f022d['push'](this['_trimToContent'](_0x4d7999));if(!_0x3f022d['length'])throw new _0x13348f('addcommentthreadcommand-incorrect-ranges',null);_0xd7c92a&&this['_createCommentThread'](_0x27e3a0,_0xd7c92a),this['_createMarkersFromRanges'](_0x27e3a0,_0x3f022d,!!_0xd7c92a);}['_createMarkersFromRanges'](_0x23db8f,_0x3ce6ad,_0x588ba5){this['editor']['model']['change'](_0x429ecd=>{for(const _0x3b2e2d of _0x3ce6ad){const _0x5048a5=_0x4552d2()['substr'](0x1,0x5),_0x2eb9c4='comment:'+_0x23db8f+':'+_0x5048a5;_0x429ecd['addMarker'](_0x2eb9c4,{'range':_0x3b2e2d,'usingOperation':_0x588ba5,'affectsData':_0x588ba5});}});}['_createCommentThread'](_0x5e0df7,_0x1470f2){const _0x568bd8=this['editor']['plugins']['get']('CommentsRepository'),_0x21bc7c=this['editor']['config']['get']('collaboration.channelId'),_0x1eed81=this['editor']['plugins']['get']('Users')['me'];if(!_0x1eed81)throw new _0x13348f('addcommentthreadcommand-user-not-found',null);_0x568bd8['addCommentThread']({'threadId':_0x5e0df7,'channelId':_0x21bc7c,'comments':[{'authorId':_0x1eed81['id'],'content':_0x1470f2,'createdAt':new Date(),'attributes':{}}]});}['_hasContent'](_0x6c10ca){for(const _0x409e3d of _0x6c10ca['getItems']())if(this['_itemIsContent'](_0x409e3d))return!0x0;return!0x1;}['_itemIsContent'](_0x4c904d){return _0x4c904d['is']('$textProxy')||this['editor']['model']['schema']['isObject'](_0x4c904d)&&!_0x4c904d['is']('element','tableCell');}['_trimToContent'](_0x331eb4){const _0x1e5e7b=_0x2da737=>!this['_itemIsContent'](_0x2da737['item']),_0x17c48e=_0x331eb4['start']['getLastMatchingPosition'](_0x1e5e7b),_0xd6cda8=_0x331eb4['end']['getLastMatchingPosition'](_0x1e5e7b,{'direction':'backward'});return this['editor']['model']['createRange'](_0x17c48e,_0xd6cda8);}}class b extends _0x4e6af8{['_dataCollectors'];['_editorAnnotations'];static get['requires'](){return[y];}static get['pluginName'](){return'EditorAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xd316a8){super(_0xd316a8),this['_dataCollectors']=new Set(),this['_editorAnnotations']=new Set();}['init'](){const _0x4ce230=this['editor'],_0x4367b0=_0x4ce230['model']['document']['selection'],_0x26fef9=_0x5d3d29(()=>this['refreshSelectedViews'](),0xa);_0x4367b0['on']('change:range',(_0x58b193,_0x300481)=>{_0x300481['directChange']&&(_0x26fef9['cancel'](),this['refreshSelectedViews']());}),this['listenTo'](_0x4ce230['editing']['view']['document'],'change:isFocused',(_0x5c484f,_0x1fba97,_0x47f824)=>{_0x47f824&&_0x26fef9();}),this['listenTo'](_0x4ce230['ui']['focusTracker'],'change:isFocused',(_0x1d7e32,_0x510ea9,_0x265a1e)=>{_0x265a1e||this['fire']('blur',{'isAnnotationTracked':_0x2eade0=>this['_editorAnnotationsData']['has'](_0x2eade0['innerView'])});}),this['listenTo'](this['editor']['ui'],'update',()=>this['fire']('uiUpdate'));}['registerAnnotation'](_0x421661){if(this['_editorAnnotations']['has'](_0x421661['view']))return;this['_editorAnnotations']['add'](_0x421661['view']),this['editor']['ui']['focusTracker']['add'](_0x421661['view']['element']);const _0x2753ec=this['editor']['plugins']['get'](y);this['listenTo'](_0x2753ec['collection'],'remove',(_0x19aa98,_0x16efb9)=>{this['editor']['ui']['focusTracker']['remove'](_0x16efb9['view']['element']),this['_editorAnnotations']['delete'](_0x16efb9['view']);});}['hasDomSelection'](){return this['editor']['editing']['view']['hasDomSelection'];}['addSourceCollector'](_0x11070e){if('function'!=typeof _0x11070e)throw new _0x13348f('editorannotations-invalid-source-callback');this['_dataCollectors']['add'](_0x11070e);}['refreshSelectedViews'](){this['fire']('refresh');}['getOrderedSelectedAnnotations']({activeAnnotation:_0x58cf99,annotations:_0x3f208d}){const _0x2bed0c=[],_0xf5cff5=this['editor']['model']['document']['selection'],_0x3ff78e=Array['from'](_0xf5cff5['getRanges']());for(const [_0x22065e,_0x1ba3b1]of this['_editorAnnotationsData']){const _0x531cca=_0x4138a2(_0x1ba3b1),_0x50f50c=_0x3f208d['getByInnerView'](_0x22065e);_0x531cca&&_0x50f50c&&_0x2bed0c['push']({'annotation':_0x50f50c,'range':_0x531cca});}function _0x4138a2(_0x35e9e5){for(const _0x5ef173 of _0x35e9e5)for(const _0xe61484 of _0x3ff78e)if(_0x5ef173['containsRange'](_0xe61484,!_0xf5cff5['isCollapsed']))return _0x5ef173;return null;}return _0x2bed0c['sort']((_0xdc3bc2,_0x294d1f)=>{const _0x459685=_0xdc3bc2['range'],_0x405071=_0x294d1f['range'];if(!_0x459685['isEqual'](_0x405071)){if(_0x459685['containsRange'](_0x405071,!0x0))return 0x1;if(_0x405071['containsRange'](_0x459685,!0x0))return-0x1;}return _0xdc3bc2['annotation']==_0x58cf99?-0x1:_0x294d1f['annotation']==_0x58cf99?0x1:0x0;})['map'](_0x21200c=>_0x21200c['annotation']);}get['_editorAnnotationsData'](){const _0x1954ff=new Map();for(const _0x5df383 of Array['from'](this['_dataCollectors']))for(const [_0x24e680,_0x3f9b3e]of _0x5df383())_0x1954ff['set'](_0x24e680,_0x3f9b3e);return _0x1954ff;}}class st extends _0x4e6af8{['afterInit'](){const _0x35ce18=this['editor'];if(!_0x35ce18['plugins']['has']('RestrictedEditingModeEditing'))return;_0x35ce18['plugins']['get']('RestrictedEditingModeEditing')['enableCommand']('addCommentThread');}}class ct extends _0x4e6af8{constructor(_0x1158d8){super(_0x1158d8),this['editor']['config']['define']('importWord.formatting.comments','basic');}['afterInit'](){const _0x11ef48=this['editor'],_0x3a19ef=_0x11ef48['commands']['get']('importWord'),_0x41e1ed=_0x11ef48['plugins']['get'](it);_0x3a19ef&&(_0x3a19ef['on']('execute',(_0x83bfad,[,_0x414e5f])=>{_0x414e5f['collaboration_features']={'comments':!0x0,'user_id':_0x41e1ed['me']['id']};},{'priority':Wt['high']+0xa}),this['listenTo'](_0x3a19ef,'dataInsert',this['_handleImportedData']));}['_handleImportedData'](_0x5446d5,_0x5cd6ec){const {comment_threads:_0xafa0d8}=_0x5cd6ec;_0xafa0d8&&_0xafa0d8['forEach'](({thread_id:_0x100bfc,comments:_0x2f2afb,is_resolved:_0x3cc749})=>{const _0x672c17=new Date(),_0x10ac8b=_0x2f2afb['map'](({author:_0x199923,content:_0x6ba265,created_at:_0x7421ef})=>({'content':_0x6ba265,'authorId':this['editor']['plugins']['get'](it)['me']['id'],'createdAt':_0x672c17,'attributes':{'@external':{'authorName':_0x199923,'createdAt':_0x7421ef?new Date(_0x7421ef):new Date(),'source':'importWord'}}})),_0x3731d7=this['editor']['config']['get']('collaboration.channelId');this['editor']['plugins']['get'](o)['addCommentThread']({'channelId':_0x3731d7,'threadId':_0x100bfc,'comments':_0x10ac8b,'resolvedAt':_0x3cc749?_0x672c17:null});});}}class at extends _0x4e6af8{constructor(_0x2f1ce0){super(_0x2f1ce0),this['editor']['config']['define']('comments.copyMarkers','default');}static get['requires'](){return[Mt,Pt];}['afterInit'](){const _0x436fce=this['editor']['plugins']['get']('ClipboardPipeline');this['_registerMarkerInClipboardPipeline'](),this['listenTo'](_0x436fce,'contentInsertion',(_0x59fe9c,_0x917f5d)=>this['_removeMarkersWithoutThreads'](_0x917f5d['content']['markers']),{'priority':'highest'});}['_removeMarkersWithoutThreads'](_0xcdf445){if(!this['editor']['plugins']['has']('CommentsRepository'))return _0xcdf445;const _0x1c2cbd=this['editor']['plugins']['get']('CommentsRepository');for(const _0x365956 of _0xcdf445['keys']()){const [_0x598e05,_0x410f8e]=_0x365956['split'](':');'comment'!=_0x598e05||_0x1c2cbd['hasCommentThread'](_0x410f8e)||_0xcdf445['delete'](_0x365956);}return _0xcdf445;}['_registerMarkerInClipboardPipeline'](){const _0x26eb6d=this['editor']['plugins']['get']('ClipboardMarkersUtils'),_0x56257c=this['_mapCommentsCopyConfigToRegisterConfiguration'](this['editor']['config']['get']('comments.copyMarkers'));_0x56257c&&_0x26eb6d['_registerMarkerToCopy']('comment',_0x56257c);}['_mapCommentsCopyConfigToRegisterConfiguration'](_0x1a3b3a){switch(_0x1a3b3a){case'always':return{'allowedActions':'all','copyPartiallySelected':!0x1,'duplicateOnPaste':!0x0};case'default':return{'allowedActions':['cut','dragstart'],'copyPartiallySelected':!0x1,'duplicateOnPaste':!0x1};default:return null;}}}function ft(_0x2ac85e){const _0x31c21a=_0x2ac85e['split'](':');return{'group':_0x31c21a[0x0],'id':_0x31c21a[0x1],'part':_0x31c21a[0x2]};}class ut extends _0x4e6af8{['init'](){this['overrideMarkerConverters'](),this['overrideHorizontalRuleConverter'](),this['overrideImageInlineConverter'](),this['overrideMediaEmbedConverter']();}['overrideMarkerConverters'](){this['editor']['conversion']['for']('dataDowncast')['markerToHighlight']({'model':'comment','view':(_0x1d5099,_0x1c2f2c)=>{if(!_0x1c2f2c['options']['showCommentHighlights'])return null;if(_0x1c2f2c['options']['ignoreResolvedComments']){const {id:_0x30d49e}=ft(_0x1d5099['markerName']),_0x25f963=this['editor']['plugins']['get'](o);if(_0x25f963['getCommentThread'](_0x30d49e)?.['isResolved']&&_0x1d5099['item'])return _0x1c2f2c['consumable']['consume'](_0x1d5099['item'],'addMarker:'+_0x1d5099['markerName']),_0x1c2f2c['consumable']['consume'](_0x1d5099['item'],'removeMarker:'+_0x1d5099['markerName']),null;}return{'classes':['ck-comment-marker']};}}),this['editor']['conversion']['for']('dataDowncast')['add'](_0x5e3b07=>{_0x5e3b07['on']('addMarker:comment',(_0x5a767c,_0x35cd2a,_0x28155b)=>{if(!_0x28155b['options']['showCommentHighlights'])return;const _0x2978a2=_0x35cd2a['item'];if(!_0x2978a2)return;const _0x28f3a8=_0x28155b['mapper']['toViewElement'](_0x2978a2);this['editor']['model']['schema']['isObject'](_0x2978a2)&&_0x28f3a8&&!_0x28f3a8['getCustomProperty']('widget')&&_0x28f3a8['is']('containerElement')&&_0x660b85(_0x28f3a8,_0x28155b['writer']);},{'priority':'high'});});}['overrideHorizontalRuleConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'horizontalLine','view':(_0x4a5c24,{writer:_0x3879a5,options:_0xb0f25e})=>{if(!_0xb0f25e['showCommentHighlights'])return null;const _0x14872d=_0x3879a5['createContainerElement']('div'),_0x386c5a=_0x3879a5['createEmptyElement']('hr');return _0x3879a5['addClass']('ck-horizontal-line',_0x14872d),_0x3879a5['insert'](_0x3879a5['createPositionAt'](_0x14872d,0x0),_0x386c5a),_0x14872d;},'converterPriority':'high'});}['overrideImageInlineConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToStructure']({'model':'imageInline','view':(_0x239284,{writer:_0x5535f1,options:_0x15aff5})=>{if(!_0x15aff5['showCommentHighlights'])return null;const _0x52d9bb=_0x5535f1['createContainerElement']('span'),_0x29c233=_0x5535f1['createEmptyElement']('img');return _0x5535f1['addClass']('image-inline',_0x52d9bb),_0x5535f1['insert'](_0x5535f1['createPositionAt'](_0x52d9bb,0x0),_0x29c233),_0x52d9bb;},'converterPriority':'high'});}['overrideMediaEmbedConverter'](){this['editor']['conversion']['for']('dataDowncast')['elementToElement']({'model':'media','view':(_0x4dcb14,{writer:_0xfe5b6,options:_0x2845d9})=>{if(_0x2845d9['showCommentHighlights'])return _0xfe5b6['createEmptyElement']('div');},'converterPriority':'high'}),this['editor']['data']['downcastDispatcher']['on']('attribute:url:media',(_0x43ae88,_0x259727,_0x430497)=>{_0x430497['options']['showCommentHighlights']&&_0x43ae88['stop']();},{'priority':'high'});}}class r extends _0x4e6af8{static get['requires'](){return[o,b,it,st,ct,at,ut];}static get['pluginName'](){return'CommentsEditing';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0xe741f7){super(_0xe741f7),this['set']('isThreadsLoadingPaused',!0x0),_0xe741f7['data']['once']('ready',()=>this['isThreadsLoadingPaused']=!0x1),this['set']('activeMarker',null),this['on']('change:activeMarker',(_0x2e3a5a,_0x39ccc3,_0x19e54d,_0x146e6f)=>{const _0x31dea6=_0xe741f7['plugins']['get'](o),_0xde112e=_0x19e54d?ft(_0x19e54d)['id']:null;_0xe741f7['model']['change'](()=>{if(_0xde112e){const _0x240758=this['getAllMarkersForId'](_0xde112e);for(const _0x3e9002 of _0x240758)_0xe741f7['editing']['reconvertMarker'](_0x3e9002);}if(_0x146e6f){const {id:_0x3ab43a}=ft(_0x146e6f),_0x18084e=_0x31dea6['getCommentThread'](_0x3ab43a);if(_0x18084e&&_0x18084e['unlinkedAt'])return;if(_0x18084e&&!_0x18084e['isAttached'])return;const _0x5656ec=this['getAllMarkersForId'](_0x3ab43a);for(const _0x24efd6 of _0x5656ec)_0xe741f7['editing']['reconvertMarker'](_0x24efd6);}}),_0xde112e&&this['scrollToThreadMarker'](_0xde112e);}),this['_initAriaMarkerChangeAnnouncements']();}['init'](){const _0x331724=this['editor'],_0x599b79=_0x331724['plugins']['get'](o),_0x4224bd=_0x331724['config']['get']('collaboration.channelId'),_0x5313f1=_0x599b79['getCommentThreads']()['filter'](_0x4ce083=>_0x4ce083['channelId']!==_0x4224bd);_0x331724['commands']['add']('addCommentThread',new ot(_0x331724)),this['listenTo'](_0x331724,'change:isReadOnly',(_0x5ec75b,_0x4a9b29,_0x32b5c5)=>{_0x599b79['switchReadOnly'](_0x32b5c5,_0x331724['config']['get']('collaboration.channelId'));}),this['listenTo'](_0x599b79,dt('addCommentThread',_0x4224bd),(_0x5652b4,{threadId:_0x20cbef})=>{const _0x4d2c9d=this['editor']['plugins']['get'](o)['getCommentThread'](_0x20cbef);_0x4d2c9d?.['unlinkedAt']&&this['_attachArchivedThread'](_0x20cbef);}),this['listenTo'](_0x599b79,dt('removeCommentThread',_0x4224bd),(_0x191e37,{threadId:_0x3ed752})=>{_0x331724['model']['enqueueChange']({'isUndoable':!0x1},_0x1e0f78=>{const _0x593a4a=this['getAllMarkersForId'](_0x3ed752);for(const _0x5e1200 of _0x593a4a)_0x1e0f78['removeMarker'](_0x5e1200);});}),this['listenTo'](_0x599b79,dt('resolveCommentThread',_0x4224bd),(_0xdbb53f,{threadId:_0x114a2d})=>{(this['_reconvertMarkers'](_0x114a2d),this['editor']['editing']['view']['hasDomSelection'])&&(this['editor']['plugins']['get'](o)['getCommentThread'](_0x114a2d)['unlinkedAt']||this['editor']['editing']['view']['focus']());},{'priority':'low'}),this['listenTo'](_0x599b79,dt('reopenCommentThread',_0x4224bd),(_0x17a53b,{threadId:_0x58c491})=>{this['_reconvertMarkers'](_0x58c491);},{'priority':'low'}),this['listenTo'](_0x599b79,dt('addComment',_0x4224bd),(_0x26ac50,{threadId:_0x2b600c,isFromAdapter:_0x5b1cde})=>{const _0x556460=this['getAllMarkersForId'](_0x2b600c);if(_0x5b1cde||0x0==_0x556460['length']||!_0x599b79['hasCommentThread'](_0x2b600c))return;0x1===_0x599b79['getCommentThread'](_0x2b600c)['length']&&_0x331724['model']['enqueueChange']({'isUndoable':!0x1},_0xca5310=>{for(const _0x1cb286 of _0x556460)_0xca5310['updateMarker'](_0x1cb286,{'usingOperation':!0x0,'affectsData':!0x0});});},{'priority':'low'}),this['_initializeMarkerConverters'](),this['_handleMarkerAddAndRemove'](),this['_handleInitialThreads'](_0x5313f1);}['afterInit'](){!async function(_0x50fc8d){const _0x45fac3=_0x15c2cb([0x4b,0x70,0x4f,0x42,0x4a,0x47,0x4e,0x53,0x45,0x67,0x71,0x43,0x79,0x66,0x56,0x46,0x31,0x6b,0x5a,0x38,0x6c,0x62,0x6e,0x52,0x6a,0x4d,0x37,0x65,0x49,0x7a,0x41,0x73,0x44,0x51,0x48,0x77,0x39,0x61,0x54,0x68,0x75,0x36,0x72,0x63,0x59,0x69,0x30,0x35,0x55,0x6d,0x50,0x4c,0x34,0x64,0x33,0x58,0x32,0x57,0x6f,0x74,0x76,0x78]),_0x428fea=0x73460ab3,_0x1463de=0x73418bdb^_0x428fea,_0x108ac1=window[_0x15c2cb([0x44,0x61,0x74,0x65])][_0x15c2cb([0x6e,0x6f,0x77])](),_0xd68e01=_0x50fc8d[_0x15c2cb([0x65,0x64,0x69,0x74,0x6f,0x72])],_0x50db76=new window[(_0x15c2cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4a1256=>{_0xd68e01[_0x15c2cb([0x6f,0x6e,0x63,0x65])](_0x15c2cb([0x72,0x65,0x61,0x64,0x79]),_0x4a1256);}),_0x445bf3={[_0x15c2cb([0x6b,0x74,0x79])]:_0x15c2cb([0x45,0x43]),[_0x15c2cb([0x75,0x73,0x65])]:_0x15c2cb([0x73,0x69,0x67]),[_0x15c2cb([0x63,0x72,0x76])]:_0x15c2cb([0x50,0x2d,0x32,0x35,0x36]),[_0x15c2cb([0x78])]:_0x15c2cb([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]),[_0x15c2cb([0x79])]:_0x15c2cb([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]),[_0x15c2cb([0x61,0x6c,0x67])]:_0x15c2cb([0x45,0x53,0x32,0x35,0x36])},_0x25753e=_0xd68e01[_0x15c2cb([0x63,0x6f,0x6e,0x66,0x69,0x67])][_0x15c2cb([0x67,0x65,0x74])](_0x15c2cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79]));async function _0x12a000(){let _0x38709c,_0x2710ce=null,_0x3f0c07=null;try{if(_0x25753e==_0x15c2cb([0x47,0x50,0x4c]))return _0x15c2cb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]);if(_0x38709c=_0x54992e(),!_0x38709c)return _0x15c2cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);return _0x38709c[_0x15c2cb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])]&&(_0x3f0c07=_0x3dabc2(_0x38709c[_0x15c2cb([0x75,0x73,0x61,0x67,0x65,0x45,0x6e,0x64,0x70,0x6f,0x69,0x6e,0x74])],_0x38709c[_0x15c2cb([0x6a,0x74,0x69])])),await _0x58d62d()?_0x742419()?_0x4487a9()?_0x15c2cb([0x45,0x78,0x70,0x69,0x72,0x65,0x64]):_0x342bd9()?(_0x38709c[_0x15c2cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])]==_0x15c2cb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e])&&(_0x2710ce=_0x386169(_0x15c2cb([0x45,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4c,0x69,0x6d,0x69,0x74]))),await _0x8e4d69()):_0x15c2cb([0x44,0x6f,0x6d,0x61,0x69,0x6e,0x4c,0x69,0x6d,0x69,0x74]):_0x15c2cb([0x4e,0x6f,0x74,0x41,0x6c,0x6c,0x6f,0x77,0x65,0x64]):_0x15c2cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}catch{return _0x15c2cb([0x49,0x6e,0x76,0x61,0x6c,0x69,0x64]);}function _0x4487a9(){const _0x2d10f6=[_0x15c2cb([0x65,0x76,0x61,0x6c,0x75,0x61,0x74,0x69,0x6f,0x6e]),_0x15c2cb([0x74,0x72,0x69,0x61,0x6c])][_0x15c2cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x38709c[_0x15c2cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x54,0x79,0x70,0x65])])?_0x108ac1/0x3e8:0xe10*_0x1463de;return _0x38709c[_0x15c2cb([0x65,0x78,0x70])]<_0x2d10f6;}function _0x742419(){const _0x444047=_0x38709c[_0x15c2cb([0x66,0x65,0x61,0x74,0x75,0x72,0x65,0x73])];if(!_0x444047)return!0x1;if(_0x444047[_0x15c2cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15c2cb([0x2a])))return!0x0;if(_0x444047[_0x15c2cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15c2cb([0x43,0x4d,0x54])))return!0x0;if(_0x444047[_0x15c2cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15c2cb([0x54,0x52,0x49,0x4c,0x49,0x55,0x4d]))&&_0x54c939())return!0x0;if(_0x444047[_0x15c2cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15c2cb([0x52,0x43,0x4d,0x54]))){if(_0x47c225())return!0x0;if(_0x5178ff()||_0x41d934())return!0x0;}return!0x1;}function _0x342bd9(){const _0x285073=_0x38709c[_0x15c2cb([0x6c,0x69,0x63,0x65,0x6e,0x73,0x65,0x64,0x48,0x6f,0x73,0x74,0x73])];if(!_0x285073||0x0==_0x285073[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return!0x0;const {hostname:_0xff1ede}=new URL(window[_0x15c2cb([0x6c,0x6f,0x63,0x61,0x74,0x69,0x6f,0x6e])]['href']);if(_0x285073[_0x15c2cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0xff1ede))return!0x0;const _0x4270eb=_0xff1ede[_0x15c2cb([0x73,0x70,0x6c,0x69,0x74])](_0x15c2cb([0x2e]));return _0x285073[_0x15c2cb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x1af407=>_0x1af407[_0x15c2cb([0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,0x73])](_0x15c2cb([0x2a])))[_0x15c2cb([0x6d,0x61,0x70])](_0x15a4ea=>_0x15a4ea[_0x15c2cb([0x73,0x70,0x6c,0x69,0x74])](_0x15c2cb([0x2e])))[_0x15c2cb([0x66,0x69,0x6c,0x74,0x65,0x72])](_0x170e9f=>_0x170e9f[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]<=_0x4270eb[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x15c2cb([0x6d,0x61,0x70])](_0x1538c4=>Array(_0x4270eb[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-_0x1538c4[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])[_0x15c2cb([0x66,0x69,0x6c,0x6c])](_0x1538c4[0x0]===_0x15c2cb([0x2a])?_0x15c2cb([0x2a]):'')[_0x15c2cb([0x63,0x6f,0x6e,0x63,0x61,0x74])](_0x1538c4))[_0x15c2cb([0x73,0x6f,0x6d,0x65])](_0x3e6f75=>_0x4270eb[_0x15c2cb([0x65,0x76,0x65,0x72,0x79])]((_0x3cdb95,_0x9633c)=>_0x3e6f75[_0x9633c]===_0x3cdb95||_0x3e6f75[_0x9633c]===_0x15c2cb([0x2a])));}function _0x8e4d69(){return _0x2710ce&&_0x3f0c07?new window[(_0x15c2cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x26d319,_0x3625cf)=>{_0x2710ce[_0x15c2cb([0x74,0x68,0x65,0x6e])](_0x26d319,_0x3625cf),_0x3f0c07[_0x15c2cb([0x74,0x68,0x65,0x6e])](_0x4fb5a4=>{_0x4fb5a4!=_0x15c2cb([0x56,0x61,0x6c,0x69,0x64])&&_0x26d319(_0x4fb5a4);},_0x3625cf);}):_0x2710ce||_0x3f0c07||_0x15c2cb([0x56,0x61,0x6c,0x69,0x64]);}}function _0x3dabc2(_0x191a90,_0x2c807b){return new window[(_0x15c2cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x4bd78a=>{if(_0x110c18())return _0x4bd78a(_0x15c2cb([0x56,0x61,0x6c,0x69,0x64]));_0x434957(),_0xd68e01[_0x15c2cb([0x64,0x65,0x63,0x6f,0x72,0x61,0x74,0x65])](_0x15c2cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]));let _0x3f720d=!0x1;const _0x26238a=_0x4552d2();function _0xbad6b4(_0xf3e76b){return!!_0xf3e76b&&(typeof _0xf3e76b===_0x15c2cb([0x6f,0x62,0x6a,0x65,0x63,0x74])||typeof _0xf3e76b===_0x15c2cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]))&&typeof _0xf3e76b[_0x15c2cb([0x74,0x68,0x65,0x6e])]===_0x15c2cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e])&&typeof _0xf3e76b[_0x15c2cb([0x63,0x61,0x74,0x63,0x68])]===_0x15c2cb([0x66,0x75,0x6e,0x63,0x74,0x69,0x6f,0x6e]);}function _0x5da3cb(_0x5aa526){_0x2526ff(_0x5aa526)[_0x15c2cb([0x74,0x68,0x65,0x6e])](_0x14bd58=>{if(!_0x14bd58||_0x14bd58[_0x15c2cb([0x73,0x74,0x61,0x74,0x75,0x73])]!=_0x15c2cb([0x6f,0x6b]))return _0x15c2cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]);return _0x2c5401(_0x1fb581(_0x26238a+_0x2c807b))!=_0x14bd58[_0x15c2cb([0x76,0x65,0x72,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e])]?_0x15c2cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]):_0x15c2cb([0x56,0x61,0x6c,0x69,0x64]);})[_0x15c2cb([0x74,0x68,0x65,0x6e])](_0x19166c=>(_0x268745(),_0x19166c),()=>{const _0x262dc7=_0x2eee81();return null==_0x262dc7?(_0x268745(),_0x15c2cb([0x56,0x61,0x6c,0x69,0x64])):_0x15c2cb(_0x108ac1-_0x262dc7>(0x574a8eb3^_0x428fea)?[0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]:[0x56,0x61,0x6c,0x69,0x64]);})[_0x15c2cb([0x74,0x68,0x65,0x6e])](_0x4bd78a)[_0x15c2cb([0x63,0x61,0x74,0x63,0x68])](()=>{_0x4bd78a(_0x15c2cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});const _0x218cca=0x7370e433^_0x428fea;function _0x268745(){const _0x57b768=_0x15c2cb([0x6c,0x6c,0x63,0x74,0x2d])+_0x2c5401(_0x1fb581(_0x191a90)),_0x268280=_0x11e662(_0x2c5401(window[_0x15c2cb([0x4d,0x61,0x74,0x68])][_0x15c2cb([0x63,0x65,0x69,0x6c])](_0x108ac1/_0x218cca)));window[_0x15c2cb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x15c2cb([0x73,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x57b768,_0x268280);}function _0x2eee81(){const _0x486f98=_0x15c2cb([0x6c,0x6c,0x63,0x74,0x2d])+_0x2c5401(_0x1fb581(_0x191a90)),_0x583cf4=window[_0x15c2cb([0x6c,0x6f,0x63,0x61,0x6c,0x53,0x74,0x6f,0x72,0x61,0x67,0x65])][_0x15c2cb([0x67,0x65,0x74,0x49,0x74,0x65,0x6d])](_0x486f98);return _0x583cf4?window[_0x15c2cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x11e662(_0x583cf4),0x10)*_0x218cca:null;}function _0x2526ff(_0x3c276b){return new window[(_0x15c2cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))]((_0x5f0103,_0x454c95)=>{_0x3c276b[_0x15c2cb([0x74,0x68,0x65,0x6e])](_0x5f0103,_0x454c95),window[_0x15c2cb([0x73,0x65,0x74,0x54,0x69,0x6d,0x65,0x6f,0x75,0x74])](_0x454c95,0x7347de73^_0x428fea);});}}_0xd68e01[_0x15c2cb([0x6f,0x6e])](_0x15c2cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),(_0x2eadac,_0x3e8f9c)=>{if(_0x3e8f9c[0x0]!=_0x191a90)return _0x4bd78a(_0x15c2cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));_0x3e8f9c[0x1]={..._0x3e8f9c[0x1],[_0x15c2cb([0x72,0x65,0x71,0x75,0x65,0x73,0x74,0x49,0x64])]:_0x26238a};},{[_0x15c2cb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x15c2cb([0x68,0x69,0x67,0x68])}),_0xd68e01[_0x15c2cb([0x6f,0x6e])](_0x15c2cb([0x5f,0x73,0x65,0x6e,0x64,0x55,0x73,0x61,0x67,0x65,0x52,0x65,0x71,0x75,0x65,0x73,0x74]),_0xafae6=>{_0xbad6b4(_0xafae6[_0x15c2cb([0x72,0x65,0x74,0x75,0x72,0x6e])])&&(_0x3f720d=!0x0,_0x5da3cb(_0xafae6[_0x15c2cb([0x72,0x65,0x74,0x75,0x72,0x6e])]));},{[_0x15c2cb([0x70,0x72,0x69,0x6f,0x72,0x69,0x74,0x79])]:_0x15c2cb([0x6c,0x6f,0x77])}),_0x50db76[_0x15c2cb([0x74,0x68,0x65,0x6e])](()=>{_0x3f720d||_0x4bd78a(_0x15c2cb([0x55,0x73,0x61,0x67,0x65,0x4c,0x69,0x6d,0x69,0x74]));});});function _0x110c18(){return _0xd68e01[_0x15c2cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15c2cb([0x76,0x69,0x65,0x77])][_0x15c2cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]==_0x15c2cb([0x61,0x75,0x74,0x6f]);}function _0x434957(){_0xd68e01[_0x15c2cb([0x65,0x64,0x69,0x74,0x69,0x6e,0x67])][_0x15c2cb([0x76,0x69,0x65,0x77])][_0x15c2cb([0x5f,0x6f,0x76,0x65,0x72,0x6c,0x61,0x79,0x4d,0x6f,0x64,0x65,0x48,0x69,0x6e,0x74])]=_0x15c2cb([0x61,0x75,0x74,0x6f]);}}function _0x386169(_0x1e2bed){const _0x953c=[new window[(_0x15c2cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x3bb9ad=>setTimeout(_0x3bb9ad,0x734f347f^_0x428fea)),_0x50db76[_0x15c2cb([0x74,0x68,0x65,0x6e])](()=>new window[(_0x15c2cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65]))](_0x26d0fd=>{let _0x50f927=0x0;_0xd68e01[_0x15c2cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x15c2cb([0x6f,0x6e])](_0x15c2cb([0x61,0x70,0x70,0x6c,0x79,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e]),(_0x410863,_0x4836a9)=>{_0x4836a9[0x0][_0x15c2cb([0x69,0x73,0x44,0x6f,0x63,0x75,0x6d,0x65,0x6e,0x74,0x4f,0x70,0x65,0x72,0x61,0x74,0x69,0x6f,0x6e])]&&_0x50f927++,_0x50f927==(0x73460f5b^_0x428fea)&&(_0x26d0fd(),_0x410863[_0x15c2cb([0x6f,0x66,0x66])]());});}))];return window[_0x15c2cb([0x50,0x72,0x6f,0x6d,0x69,0x73,0x65])][_0x15c2cb([0x72,0x61,0x63,0x65])](_0x953c)[_0x15c2cb([0x74,0x68,0x65,0x6e])](()=>_0x1e2bed);}async function _0x584339(){await _0x50db76,_0xd68e01[_0x15c2cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x15c2cb([0x63,0x68,0x61,0x6e,0x67,0x65])]=_0x37d233,_0xd68e01[_0x15c2cb([0x6d,0x6f,0x64,0x65,0x6c])][_0x15c2cb([0x65,0x6e,0x71,0x75,0x65,0x75,0x65,0x43,0x68,0x61,0x6e,0x67,0x65])]=_0x37d233,_0xd68e01[_0x15c2cb([0x65,0x6e,0x61,0x62,0x6c,0x65,0x52,0x65,0x61,0x64,0x4f,0x6e,0x6c,0x79,0x4d,0x6f,0x64,0x65])](_0x15c2cb([0x6d,0x6f,0x64,0x65,0x6c]));}function _0x54c939(){return window[_0x15c2cb([0x67,0x6c,0x6f,0x62])]&&window[_0x15c2cb([0x67,0x6c,0x6f,0x62])][_0x15c2cb([0x74,0x72,0x69,0x6c,0x69,0x75,0x6d,0x56,0x65,0x72,0x73,0x69,0x6f,0x6e])];}function _0x47c225(){return _0x2ac50b(_0x15c2cb([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))&&_0x52a304(_0x15c2cb([0x57,0x65,0x62,0x53,0x6f,0x63,0x6b,0x65,0x74,0x47,0x61,0x74,0x65,0x77,0x61,0x79]))[_0x15c2cb([0x73,0x74,0x61,0x74,0x65])]==_0x15c2cb([0x63,0x6f,0x6e,0x6e,0x65,0x63,0x74,0x65,0x64]);}function _0x5178ff(){return _0x2ac50b(_0x15c2cb([0x52,0x65,0x76,0x69,0x73,0x69,0x6f,0x6e,0x56,0x69,0x65,0x77,0x65,0x72,0x49,0x6e,0x74,0x65,0x67,0x72,0x61,0x74,0x69,0x6f,0x6e]));}function _0x41d934(){return _0x2ac50b(_0x15c2cb([0x54,0x72,0x61,0x63,0x6b,0x43,0x68,0x61,0x6e,0x67,0x65,0x73,0x44,0x61,0x74,0x61,0x47,0x65,0x74,0x74,0x65,0x72]));}function _0x5e14a4(_0x5e4b1e){const _0x3c371f=_0x3d22e1();_0xd68e01[_0x3c371f]=_0x15c2cb([0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0x73,0x4c,0x69,0x63,0x65,0x6e,0x73,0x65,0x4b,0x65,0x79])+_0x5e4b1e,_0x5e4b1e!=_0x15c2cb([0x56,0x61,0x6c,0x69,0x64])&&_0x584339();}function _0x3d22e1(){const _0x21faa8=window[_0x15c2cb([0x53,0x74,0x72,0x69,0x6e,0x67])](window[_0x15c2cb([0x70,0x65,0x72,0x66,0x6f,0x72,0x6d,0x61,0x6e,0x63,0x65])][_0x15c2cb([0x6e,0x6f,0x77])]())[_0x15c2cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](_0x15c2cb([0x2e]),'');let _0x163069=_0x15c2cb([0x4b]);for(let _0x20b264=0x0;_0x20b264<_0x21faa8[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x20b264+=0x2){let _0xbb208a=window[_0x15c2cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x21faa8[_0x15c2cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x20b264,_0x20b264+0x2));_0xbb208a>=_0x45fac3[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]&&(_0xbb208a-=_0x45fac3[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]),_0x163069+=_0x45fac3[_0xbb208a];}return _0x163069;}function _0x54992e(){const _0x2c306a=_0x25753e[_0x15c2cb([0x73,0x70,0x6c,0x69,0x74])](_0x15c2cb([0x2e]));if(0x3!=_0x2c306a[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])])return null;return _0x3641d9(_0x2c306a[0x1]);function _0x3641d9(_0x3501db){const _0x163b49=_0x1464fb(_0x3501db);return _0x163b49&&_0x547a34()?_0x163b49:null;function _0x547a34(){const _0x271d08=_0x163b49[_0x15c2cb([0x6a,0x74,0x69])],_0x1a16b0=window[_0x15c2cb([0x70,0x61,0x72,0x73,0x65,0x49,0x6e,0x74])](_0x271d08[_0x15c2cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](_0x271d08[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8),0x10),_0xc2ae75={..._0x163b49,[_0x15c2cb([0x6a,0x74,0x69])]:_0x271d08[_0x15c2cb([0x73,0x75,0x62,0x73,0x74,0x72,0x69,0x6e,0x67])](0x0,_0x271d08[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])]-0x8)};return delete _0xc2ae75[_0x15c2cb([0x76,0x63])],_0x1fb581(_0xc2ae75)==_0x1a16b0;}}}async function _0x58d62d(){let _0x1b1077=!0x0;try{const _0x48dd0b=_0x25753e[_0x15c2cb([0x73,0x70,0x6c,0x69,0x74])](_0x15c2cb([0x2e])),[_0x34c998,_0x462602,_0x36db5d]=_0x48dd0b;return _0x3623cf(_0x34c998),await _0x33ca32(_0x34c998,_0x462602,_0x36db5d),_0x1b1077;}catch{return!0x1;}function _0x3623cf(_0x4225fc){const _0x2b702e=_0x1464fb(_0x4225fc);_0x2b702e&&_0x2b702e[_0x15c2cb([0x61,0x6c,0x67])]==_0x15c2cb([0x45,0x53,0x32,0x35,0x36])||(_0x1b1077=!0x1);}async function _0x33ca32(_0x200c8d,_0x3dcb65,_0x281cc6){const _0x369172=window[_0x15c2cb([0x55,0x69,0x6e,0x74,0x38,0x41,0x72,0x72,0x61,0x79])][_0x15c2cb([0x66,0x72,0x6f,0x6d])](_0x544690(_0x281cc6),_0x344661=>_0x344661[_0x15c2cb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](0x0)),_0x212cac=new window[(_0x15c2cb([0x54,0x65,0x78,0x74,0x45,0x6e,0x63,0x6f,0x64,0x65,0x72]))]()[_0x15c2cb([0x65,0x6e,0x63,0x6f,0x64,0x65])](_0x200c8d+_0x15c2cb([0x2e])+_0x3dcb65),_0x389f30=window[_0x15c2cb([0x63,0x72,0x79,0x70,0x74,0x6f])][_0x15c2cb([0x73,0x75,0x62,0x74,0x6c,0x65])];if(!_0x389f30)return;const _0x5ecb38=await _0x389f30[_0x15c2cb([0x69,0x6d,0x70,0x6f,0x72,0x74,0x4b,0x65,0x79])](_0x15c2cb([0x6a,0x77,0x6b]),_0x445bf3,{[_0x15c2cb([0x6e,0x61,0x6d,0x65])]:_0x15c2cb([0x45,0x43,0x44,0x53,0x41]),[_0x15c2cb([0x6e,0x61,0x6d,0x65,0x64,0x43,0x75,0x72,0x76,0x65])]:_0x15c2cb([0x50,0x2d,0x32,0x35,0x36])},!0x1,[_0x15c2cb([0x76,0x65,0x72,0x69,0x66,0x79])]);await _0x389f30[_0x15c2cb([0x76,0x65,0x72,0x69,0x66,0x79])]({[_0x15c2cb([0x6e,0x61,0x6d,0x65])]:_0x15c2cb([0x45,0x43,0x44,0x53,0x41]),[_0x15c2cb([0x68,0x61,0x73,0x68])]:{[_0x15c2cb([0x6e,0x61,0x6d,0x65])]:_0x15c2cb([0x53,0x48,0x41,0x2d,0x32,0x35,0x36])}},_0x5ecb38,_0x369172,_0x212cac)||(_0x1b1077=!0x1);}}function _0x1464fb(_0xa4c22b){return _0xa4c22b[_0x15c2cb([0x73,0x74,0x61,0x72,0x74,0x73,0x57,0x69,0x74,0x68])](_0x15c2cb([0x65,0x79]))?JSON[_0x15c2cb([0x70,0x61,0x72,0x73,0x65])](_0x544690(_0xa4c22b)):null;}function _0x544690(_0x159f0a){return window[_0x15c2cb([0x61,0x74,0x6f,0x62])](_0x159f0a[_0x15c2cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/-/g,_0x15c2cb([0x2b]))[_0x15c2cb([0x72,0x65,0x70,0x6c,0x61,0x63,0x65])](/_/g,_0x15c2cb([0x2f])));}function _0x1fb581(_0x3a91ce){let _0x128b32=0x1505;function _0x203982(_0x3401c7){for(let _0x524376=0x0;_0x524376<_0x3401c7[_0x15c2cb([0x6c,0x65,0x6e,0x67,0x74,0x68])];_0x524376++){const _0x13a1d3=_0x3401c7[_0x15c2cb([0x63,0x68,0x61,0x72,0x43,0x6f,0x64,0x65,0x41,0x74])](_0x524376);_0x128b32=(_0x128b32<<0x5)+_0x128b32+_0x13a1d3,_0x128b32&=_0x128b32;}}function _0x48e7d6(_0x259f2c){Array[_0x15c2cb([0x69,0x73,0x41,0x72,0x72,0x61,0x79])](_0x259f2c)?_0x259f2c[_0x15c2cb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](_0x48e7d6):_0x259f2c&&typeof _0x259f2c==_0x15c2cb([0x6f,0x62,0x6a,0x65,0x63,0x74])?Object[_0x15c2cb([0x65,0x6e,0x74,0x72,0x69,0x65,0x73])](_0x259f2c)[_0x15c2cb([0x73,0x6f,0x72,0x74])]()[_0x15c2cb([0x66,0x6f,0x72,0x45,0x61,0x63,0x68])](([_0xefdacc,_0x2413c5])=>{_0x203982(_0xefdacc),_0x48e7d6(_0x2413c5);}):_0x203982(window[_0x15c2cb([0x53,0x74,0x72,0x69,0x6e,0x67])](_0x259f2c));}return _0x48e7d6(_0x3a91ce),_0x128b32>>>0x0;}function _0x2c5401(_0x2421e9){return _0x2421e9[_0x15c2cb([0x74,0x6f,0x53,0x74,0x72,0x69,0x6e,0x67])](0x10)[_0x15c2cb([0x70,0x61,0x64,0x53,0x74,0x61,0x72,0x74])](0x8,_0x15c2cb([0x30]));}function _0x11e662(_0x49373d){return _0x49373d[_0x15c2cb([0x73,0x70,0x6c,0x69,0x74])]('')[_0x15c2cb([0x72,0x65,0x76,0x65,0x72,0x73,0x65])]()[_0x15c2cb([0x6a,0x6f,0x69,0x6e])]('');}function _0x2ac50b(_0x471a99){return _0xd68e01[_0x15c2cb([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x15c2cb([0x68,0x61,0x73])](_0x471a99);}function _0x52a304(_0x2e8991){return _0xd68e01[_0x15c2cb([0x70,0x6c,0x75,0x67,0x69,0x6e,0x73])][_0x15c2cb([0x67,0x65,0x74])](_0x2e8991);}function _0x37d233(){}function _0x15c2cb(_0x4d2bb8){return _0x4d2bb8['map'](_0x613e34=>String['fromCharCode'](_0x613e34))['join']('');}_0x5e14a4(await _0x12a000());}(this);}['destroy'](){const _0x2f751c=this['editor']['plugins']['get'](o),_0x42e9be=this['editor']['config']['get']('collaboration.channelId');for(const _0x3104eb of _0x2f751c['getCommentThreads']({'channelId':_0x42e9be}))_0x2f751c['_detachCommentThread'](_0x3104eb['id']),_0x2f751c['_threads']['delete'](_0x3104eb['id']);super['destroy']();}['hasMarkerForId'](_0x4339ab){return this['getAllMarkersForId'](_0x4339ab)['length']>0x0;}['getAllMarkersForId'](_0x2b9ebe){const _0x95d2cc=[];for(const _0x136a27 of this['editor']['model']['markers'])_0x136a27['name']['startsWith']('comment:'+_0x2b9ebe)&&_0x95d2cc['push'](_0x136a27);return _0x95d2cc;}['scrollToThreadMarker'](_0x5e255a){setTimeout(()=>{const _0x473e4d=this['_getTargetForId'](_0x5e255a);if(!_0x473e4d)return;this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5e255a&&nt({'target':_0x473e4d[0x0],'viewportOffset':0x64,'alignToTop':!0x0});},0x32);}['_reconvertMarkers'](_0x2bae87){this['editor']['model']['change'](()=>{for(const _0x115c56 of this['getAllMarkersForId'](_0x2bae87))this['editor']['editing']['reconvertMarker'](_0x115c56);});}['_attachArchivedThread'](_0xbc799b){const _0x1b03cf=this['editor']['plugins']['get'](o),_0x573351=this['editor']['plugins']['get'](b),_0x25f325=_0x1b03cf['getCommentThread'](_0xbc799b);if(!_0x25f325['isAttached']){const _0x3b5219=_0x25f325['attachTo'](()=>this['_getTargetForId'](_0x25f325['id']));_0x573351['registerAnnotation'](_0x3b5219),_0x25f325['_hasTargetInContent']=!0x1;}}['_initializeMarkerConverters'](){const _0x30e0a=this['editor'],_0x257b93=_0x30e0a['plugins']['get'](it);_0x30e0a['conversion']['for']('editingDowncast')['markerToHighlight']({'model':'comment','view':(_0x2f18b3,_0x2a4f6f)=>{const {id:_0x5a193d}=ft(_0x2f18b3['markerName']),_0x56ac17=_0x30e0a['plugins']['get'](o)['getCommentThread'](_0x5a193d),_0x1736a7=this['activeMarker']&&ft(this['activeMarker'])['id']===_0x5a193d;let _0x580d1d;if(_0x56ac17&&_0x56ac17['isResolved']&&!_0x1736a7&&_0x2f18b3['item'])return _0x2a4f6f['consumable']['consume'](_0x2f18b3['item'],'addMarker:'+_0x2f18b3['markerName']),_0x2a4f6f['consumable']['consume'](_0x2f18b3['item'],'removeMarker:'+_0x2f18b3['markerName']),null;const _0x3cc1b9=['ck-comment-marker'];return _0x1736a7&&_0x3cc1b9['push']('ck-comment-marker--active'),_0x580d1d=_0x56ac17?.['length']?_0x56ac17['comments']['first']['author']['id']:_0x257b93['me']['id'],{'classes':_0x3cc1b9,'attributes':{'data-comment':_0x5a193d,'data-author-id':_0x580d1d}};}}),_0x30e0a['conversion']['for']('dataDowncast')['markerToData']({'model':'comment','view':(_0x324d28,{options:_0x477177})=>{if(_0x477177['showCommentHighlights'])return null;const _0x69a827=_0x30e0a['plugins']['get'](o),_0xb570cf=_0x30e0a['model']['markers']['get'](_0x324d28),{id:_0xb3fa3c,part:_0x5647e4}=ft(_0x324d28);return _0xb570cf&&!_0xb570cf['affectsData']||_0x477177['ignoreResolvedComments']&&_0x69a827['getCommentThread'](_0xb3fa3c)?.['isResolved']?null:{'group':'comment','name':_0x5647e4?_0xb3fa3c+':'+_0x5647e4:_0xb3fa3c};}}),_0x30e0a['conversion']['for']('upcast')['elementToElement']({'view':{'name':'comment','attributes':{'id':/^\w/}},'model':(_0x134a20,{writer:_0x46ab57})=>_0x46ab57['createElement']('$marker',{'data-name':'comment:'+_0x134a20['getAttribute']('id')})}),_0x30e0a['conversion']['for']('upcast')['dataToMarker']({'view':'comment'});}['_handleMarkerAddAndRemove'](){const _0x442b4a=this['editor'],_0x2a9b37=_0x442b4a['plugins']['get'](o),_0x25d000=new Set(),_0x10975e=new Set();_0x442b4a['model']['document']['registerPostFixer'](_0xbc4582=>{let _0x5467d3=!0x1;for(const {name:_0x1fe6f6,data:_0x5e0706}of _0x442b4a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x32fb2c,id:_0xe8485d}=ft(_0x1fe6f6);let _0x35bfc2=_0x5e0706['newRange'];if('comment'!==_0x32fb2c||!_0x35bfc2)continue;const _0x972e63='$graveyard'===_0x35bfc2['root']['rootName'];_0x972e63||(_0x35bfc2=ht(_0x35bfc2,_0x442b4a['model']),!_0x35bfc2||_0x35bfc2['isCollapsed']||!_0x5e0706['newRange']||_0x35bfc2['isEqual'](_0x5e0706['newRange']))?_0x442b4a['model']['hasContent'](_0x35bfc2)&&!_0x972e63?this['isThreadsLoadingPaused']?_0x25d000['add'](_0x1fe6f6):this['_handleThreadMarker'](_0x1fe6f6,_0xe8485d):(_0x10975e['add'](_0x1fe6f6),_0x25d000['delete'](_0x1fe6f6),_0xbc4582['removeMarker'](_0x1fe6f6),_0x5467d3=!0x0):(_0xbc4582['updateMarker'](_0x1fe6f6,{'range':_0x35bfc2}),_0x5467d3=!0x0);}return _0x5467d3;}),this['on']('change:isThreadsLoadingPaused',(_0xf3f2b2,_0x223d82,_0x35f3b9)=>{if(!_0x35f3b9&&_0x25d000['size'])for(const _0x31aac4 of _0x25d000){const {id:_0x26691a}=ft(_0x31aac4);_0x25d000['delete'](_0x31aac4),_0x442b4a['model']['markers']['get'](_0x31aac4)&&this['_handleThreadMarker'](_0x31aac4,_0x26691a);}}),this['listenTo'](_0x442b4a['model']['document'],'change',()=>{for(const {name:_0x3dfd1b,data:{newRange:_0x23d6b1}}of _0x442b4a['model']['document']['differ']['getChangedMarkers']()){const {group:_0x19b96f,id:_0x4155cc}=ft(_0x3dfd1b);if('comment'!==_0x19b96f)continue;const _0x1d170c=_0x2a9b37['getCommentThread'](_0x4155cc),_0x227081=this['hasMarkerForId'](_0x4155cc);_0x1d170c&&(!_0x1d170c['_hasTargetInContent']&&_0x23d6b1&&_0x442b4a['editing']['view']['once']('render',()=>{const _0x3178ce=_0x442b4a['plugins']['get'](y),_0x115fac=_0x2a9b37['_threadToController']['get'](_0x1d170c)['view'];_0x3178ce['getByInnerView'](_0x115fac)['refreshVisibility']();},{'priority':'low'}),_0x1d170c['_hasTargetInContent']=_0x227081||!!_0x23d6b1),_0x23d6b1||(_0x10975e['add'](_0x3dfd1b),_0x25d000['delete'](_0x3dfd1b));}for(const _0x2f15ae of _0x10975e){const {id:_0x57b4e4}=ft(_0x2f15ae),_0x5843e4=_0x2a9b37['getCommentThread'](_0x57b4e4);if(_0x25d000['delete'](_0x2f15ae),!_0x5843e4)continue;const _0x299266=this['hasMarkerForId'](_0x57b4e4);_0x299266||_0x5843e4['isSubmitted']?_0x299266||_0x5843e4['unlinkedAt']||_0x5843e4['setUnlinkedAt'](new Date()):_0x5843e4['remove']();}_0x10975e['clear']();});}['_handleInitialThreads'](_0x261ad1){_0x261ad1['forEach'](_0x287f13=>{_0x287f13['unlinkedAt']&&this['_attachArchivedThread'](_0x287f13['id']);});}['_getTargetForId'](_0x37e48c){const _0x562fc2=this['editor'],_0x4c8cb8=this['getAllMarkersForId'](_0x37e48c);return et(_0x562fc2['editing'],_0x4c8cb8);}['_getTextContext'](_0x12e3d1){const _0x2e0c39=this['getAllMarkersForId'](_0x12e3d1);let _0x4f5148='',_0x49c770=!0x1;for(const _0x9f6c1 of _0x2e0c39){const _0xcfa07c=_0x9f6c1['getRange']();for(const _0xce090d of Array['from'](_0xcfa07c['getItems']()))_0xce090d['is']('$textProxy')?(_0x4f5148&&_0x49c770&&(_0x4f5148+='\x20',_0x49c770=!0x1),_0x4f5148+=_0xce090d['data']):_0x49c770=!0x0;_0x49c770=!0x0;}return _0x4f5148['substring'](0x0,0x96);}['_attachMarkerToThread'](_0x4b6bf7,_0x22b39d){const _0x3936e8=this['editor'],_0x107a2b=_0x3936e8['plugins']['get'](o);let _0x423b19=_0x107a2b['getCommentThread'](_0x22b39d);const _0x59a452=_0x3936e8['config']['get']('collaboration.channelId'),_0x194df6=_0x3936e8['plugins']['get'](b);if(_0x423b19&&(_0x423b19['unlinkedAt']&&_0x423b19['setUnlinkedAt'](null),_0x423b19['isAttached']))return _0x423b19;return!this['getAllMarkersForId'](_0x22b39d)[0x0]['managedUsingOperations']?_0x3936e8['editing']['view']['once']('render',()=>{if(_0x107a2b['getCommentThread'](_0x22b39d))return;const _0x58ff31=_0x3936e8['plugins']['get'](y);_0x423b19=_0x107a2b['openNewCommentThread']({'channelId':_0x59a452,'threadId':_0x22b39d,'target':()=>this['_getTargetForId'](_0x22b39d),'context':{'type':'text','value':this['_getTextContext'](_0x22b39d)}});const _0x135953=_0x107a2b['_threadToController']['get'](_0x423b19)['view'],_0xe1832c=_0x58ff31['getByInnerView'](_0x135953);_0xe1832c&&_0x194df6['registerAnnotation'](_0xe1832c);},{'priority':'low'}):_0x107a2b['fetchCommentThread']({'channelId':_0x59a452,'threadId':_0x22b39d})['then'](_0x7375ff=>{if('destroyed'!==_0x3936e8['state']){if(_0x423b19=_0x7375ff,_0x423b19&&!_0x423b19['isAttached']){const _0x2cb934=_0x423b19['attachTo'](()=>this['_getTargetForId'](_0x22b39d));_0x194df6['registerAnnotation'](_0x2cb934),_0x423b19['isResolved']&&this['_reconvertMarkers'](_0x22b39d);}else{if(!_0x423b19){const _0xe95e43=this['getAllMarkersForId'](_0x22b39d);_0x3936e8['model']['change'](_0x421620=>{for(const _0x132c72 of _0xe95e43)_0x421620['removeMarker'](_0x132c72);});}}}}),_0x423b19;}['_handleThreadMarker'](_0x14d1f4,_0x41fa1c){const _0x33aa78=this['_attachMarkerToThread'](_0x14d1f4,_0x41fa1c);_0x33aa78&&!_0x33aa78['context']&&_0x33aa78['setContext']({'type':'text','value':this['_getTextContext'](_0x41fa1c)});}['_initAriaMarkerChangeAnnouncements'](){const _0xe3c49c=this['editor'];rt(_0xe3c49c['model'],({left:_0x3696b0,entered:_0x47963c})=>{for(const _0x48f78b of _0x3696b0)if(mt(_0x48f78b)){_0xe3c49c['ui']['ariaLiveAnnouncer']['announce'](N(_0xe3c49c['locale'],'LEAVE_COMMENT_ANNOUNCEMENT'));break;}for(const _0x1ac3fb of _0x47963c)if(mt(_0x1ac3fb)){_0xe3c49c['ui']['ariaLiveAnnouncer']['announce'](N(_0xe3c49c['locale'],'ENTER_COMMENT_ANNOUNCEMENT',tt(_0x39c788)));break;}});}}function dt(_0x1a35fd,_0x589597){return _0x589597?_0x1a35fd+':'+_0x589597:_0x1a35fd;}function ht(_0x4e3779,_0x17393a){const _0x4cfb72=_0x17393a['schema'],_0x34d10c=_0x17393a['createRange'](_0x4e3779['start']);for(const _0x3da8f5 of _0x4e3779['getWalker']()){const {type:_0x4379da,item:_0xc07899,nextPosition:_0x504f02}=_0x3da8f5;if('text'===_0x4379da||_0x4cfb72['isObject'](_0xc07899)){const _0x627495=_0x17393a['createPositionBefore'](_0xc07899);_0x34d10c['isCollapsed']&&(_0x34d10c['start']=_0x627495),_0x34d10c['end']=_0x504f02;}}return _0x34d10c;}function mt(_0x5aa749){return'comment'===ft(_0x5aa749['name'])['group'];}class s extends _0x4e6af8{['licenseKey'];['_licenseKeyCheckInterval'];static get['pluginName'](){return'CommentsUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,r,b,y];}get['CommentsListView'](){return te;}get['CommentThreadInputView'](){return ie;}['init'](){const _0xda0fe5=this['editor'],_0x2ff9d1=_0xda0fe5['plugins']['get'](o),_0x40455a=_0xda0fe5['plugins']['get'](r),_0x2e0686=_0xda0fe5['plugins']['get'](y),_0xeba9af=_0xda0fe5['plugins']['get'](b);_0xda0fe5['ui']['componentFactory']['add']('comment',()=>{const _0x17eb3e=this['_createUIButton'](_0x39d67e);return _0x17eb3e['tooltip']=!0x0,_0x17eb3e;}),_0xda0fe5['ui']['componentFactory']['add']('menuBar:comment',()=>this['_createUIButton'](_0x4dec93)),_0xeba9af['addSourceCollector'](()=>{const _0x105394=[];for(const [_0xa2c102,_0x318ee9]of _0x2ff9d1['_threadToController']){const _0x56c10b=_0x40455a['getAllMarkersForId'](_0xa2c102['id']),_0xf890b9=_0x56c10b['map'](_0x1353c7=>_0x1353c7['getRange']());_0x56c10b['length']>0x0&&_0x105394['push']([_0x318ee9['view'],_0xf890b9]);}return _0x105394;}),this['listenTo'](_0x2e0686,'change:activeAnnotations',(_0x12c114,_0x419200,_0x191d21)=>{const _0x534c92=Array['from'](_0x191d21)['map'](_0x2ab07c=>_0x2ab07c['innerView'])['find'](_0x237d19=>_0x2ff9d1['_viewToController']['has'](_0x237d19));if(!_0x534c92)return void(_0x40455a['activeMarker']=null);const _0x2c4162=_0x2ff9d1['_viewToController']['get'](_0x534c92)['model']['id'],_0x57654f='comment:'+_0x2c4162;_0x2c4162&&_0x40455a['hasMarkerForId'](_0x2c4162)?_0x40455a['activeMarker']=_0x57654f:_0x40455a['activeMarker']&&(_0x40455a['activeMarker']=null);}),this['listenTo'](_0x2ff9d1,'removeCommentThread',(_0x2e51d6,{threadId:_0x5c0f3d,isFromAdapter:_0x425048})=>{!_0x425048&&_0xda0fe5['ui']['focusTracker']['isFocused']&&_0x40455a['hasMarkerForId'](_0x5c0f3d)&&_0xda0fe5['editing']['view']['focus']();},{'priority':'highest'}),this['listenTo'](_0x2ff9d1,'addComment',(_0x497056,{threadId:_0x491249,isFromAdapter:_0x11cf7a})=>{if(_0x11cf7a||!_0x40455a['hasMarkerForId'](_0x491249)||!_0x2ff9d1['hasCommentThread'](_0x491249))return;0x1===_0x2ff9d1['getCommentThread'](_0x491249)['length']&&(_0xda0fe5['editing']['view']['focus'](),_0x497056['stop']());},{'priority':'low'}),this['licenseKey']=this['editor']['config']['get']('licenseKey');const _0x4c7445=this['editor'];this['_licenseKeyCheckInterval']=setInterval(()=>{let _0x3fea36;for(const _0xb40108 in _0x4c7445){const _0x52c126=_0xb40108,_0x4cafea=_0x4c7445[_0x52c126];if('commentsLicenseKeyValid'==_0x4cafea||'commentsLicenseKeyInvalid'==_0x4cafea||'commentsLicenseKeyExpired'==_0x4cafea||'commentsLicenseKeyDomainLimit'==_0x4cafea||'commentsLicenseKeyNotAllowed'==_0x4cafea||'commentsLicenseKeyEvaluationLimit'==_0x4cafea||'commentsLicenseKeyUsageLimit'==_0x4cafea){delete _0x4c7445[_0x52c126],_0x3fea36=_0x4cafea,clearInterval(this['_licenseKeyCheckInterval']),this['_licenseKeyCheckInterval']=void 0x0;break;}}'commentsLicenseKeyInvalid'==_0x3fea36&&_0x4c7445['_showLicenseError']('invalid'),'commentsLicenseKeyExpired'==_0x3fea36&&_0x4c7445['_showLicenseError']('expired'),'commentsLicenseKeyDomainLimit'==_0x3fea36&&_0x4c7445['_showLicenseError']('domainLimit'),'commentsLicenseKeyNotAllowed'==_0x3fea36&&_0x4c7445['_showLicenseError']('featureNotAllowed','Comments'),'commentsLicenseKeyEvaluationLimit'==_0x3fea36&&_0x4c7445['_showLicenseError']('evaluationLimit'),'commentsLicenseKeyUsageLimit'==_0x3fea36&&_0x4c7445['_showLicenseError']('usageLimit');},0x3e8);}['destroy'](){super['destroy'](),this['_licenseKeyCheckInterval']&&clearInterval(this['_licenseKeyCheckInterval']);}['_createUIButton'](_0x77f079){const _0x2dc3d3=this['editor'],_0x142dc4=new _0x77f079(_0x2dc3d3['locale']),_0x5f5a51=_0x2dc3d3['commands']['get']('addCommentThread');return _0x142dc4['set']({'label':N(_0x2dc3d3['locale'],'Comment'),'icon':_0x61886d}),_0x142dc4['bind']('isEnabled')['to'](_0x5f5a51,'isEnabled',_0x5f5a51,'hasContent',(_0x4c98f4,_0x40d0dd)=>_0x4c98f4&&_0x40d0dd),this['listenTo'](_0x142dc4,'execute',()=>{_0x5f5a51['execute']();}),_0x142dc4;}}class i extends _0x4e6af8{static get['pluginName'](){return'CommentsOnly';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[r];}constructor(_0x2ff148){super(_0x2ff148),this['set']('isEnabled',!0x1),this['on']('change:isEnabled',(_0x2f3cc8,_0x189353,_0x5ef5c6)=>{_0x5ef5c6?this['_enableCommentsOnlyMode']():this['_disableCommentsOnlyMode']();});}['afterInit'](){!this['isEnabled']&&this['editor']['config']['get']('commentsOnly')&&(this['isEnabled']=!0x0);}['_enableCommentsOnlyMode'](){for(const [_0x52114e,_0x2a4ffb]of this['editor']['commands'])_0x2a4ffb['affectsData']&&'addCommentThread'!==_0x52114e&&_0x2a4ffb['forceDisabled']('commentsOnlyMode');(this['editor']['plugins']['has']('DragDrop')&&this['editor']['plugins']['get']('DragDrop')['forceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('RevisionTracker'))&&this['editor']['plugins']['get']('RevisionTracker')['forceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['forceDisabled']('commentsOnlyMode');this['editor']['commands']['get']('editSource')?.['forceDisabled']('commentsOnlyMode');const _0x263805=this['editor']['editing']['view']['document'];this['listenTo'](_0x263805,'cut',_0x845fc4=>_0x845fc4['stop'](),{'priority':'highest'}),this['listenTo'](_0x263805,'clipboardInput',_0x4316e2=>_0x4316e2['stop'](),{'priority':'highest'}),this['listenTo'](_0x263805,'delete',_0x1bf188=>_0x1bf188['stop'](),{'priority':'highest'});}['_disableCommentsOnlyMode'](){for(const [_0x2726a5,_0x2b8cf9]of this['editor']['commands'])_0x2b8cf9['affectsData']&&'addCommentThread'!==_0x2726a5&&_0x2b8cf9['clearForceDisabled']('commentsOnlyMode');this['editor']['plugins']['has']('RevisionTracker')&&this['editor']['plugins']['get']('RevisionTracker')['clearForceDisabled']('commentsOnlyMode'),this['editor']['plugins']['has']('SourceEditing')&&this['editor']['plugins']['get']('SourceEditing')['clearForceDisabled']('commentsOnlyMode'),this['editor']['commands']['get']('editSource')?.['clearForceDisabled']('commentsOnlyMode'),this['stopListening'](this['editor']['editing']['view']['document']);}}class j extends _0x1c3a7a{['activeUIs'];['uisData'];['_uis'];static get['requires'](){return[y];}static get['pluginName'](){return'AnnotationsUIs';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4ee7d8){super(_0x4ee7d8),this['activeUIs']=new Set(),this['_uis']=new Map(),this['uisData']=new Map();}['init'](){const _0x4dc7dc=this['context']['plugins']['get'](y);this['listenTo'](_0x4dc7dc,'_activateAnnotation',(_0x49548a,_0x5e4a74)=>{for(const _0x3ea2bd of this['activeUIs']){const _0x14fc68=this['_uis']['get'](_0x3ea2bd);(0x0,this['uisData']['get'](_0x3ea2bd)['filter'])(_0x5e4a74)&&_0x14fc68['setActiveAnnotation'](_0x5e4a74);}}),this['listenTo'](_0x4dc7dc,'_deactivateAllAnnotations',()=>{for(const _0xa28353 of this['activeUIs']){this['_uis']['get'](_0xa28353)['setActiveAnnotation'](null);}}),this['listenTo'](_0x4dc7dc['_visibleAnnotations'],'add',(_0x286c07,_0x2dfc8e)=>{this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x2dfc8e);});}['hasActive'](){return this['activeUIs']['size']>0x0;}['isActive'](_0x4a3226){return this['activeUIs']['has'](_0x4a3226);}['activate'](_0x5f0f35,_0x469b26=this['defaultFilter']){const _0x43bee0=this['context']['plugins']['get'](y);if(!this['_uis']['has'](_0x5f0f35))throw new _0x13348f('annotationsuis-missing-ui',this,{'uiName':_0x5f0f35});this['isActive'](_0x5f0f35)&&this['deactivate'](_0x5f0f35),this['activeUIs']['add'](_0x5f0f35);const _0x56f128=new S();v({'source':_0x43bee0['_visibleAnnotations'],'target':_0x56f128,'filter':_0x469b26}),this['uisData']['set'](_0x5f0f35,{'collection':_0x56f128,'filter':_0x469b26});const _0x31d406=this['_uis']['get'](_0x5f0f35);_0x31d406['attach'](_0x56f128),this['listenTo'](_0x31d406,'change:activeAnnotation',(_0x23ee6d,_0x9baa86,_0xbe70f8,_0x2ad5cf)=>{_0x2ad5cf&&_0x43bee0['_removeActiveAnnotation'](_0x2ad5cf),_0xbe70f8&&_0x43bee0['_addActiveAnnotation'](_0xbe70f8);});}['deactivate'](_0x364734){if(this['activeUIs']['delete'](_0x364734),!this['_uis']['has'](_0x364734))throw new _0x13348f('annotationsuis-missing-ui',this,{'uiName':_0x364734});const _0x3fc5ce=this['_uis']['get'](_0x364734);_0x3fc5ce['detach'](),this['stopListening'](_0x3fc5ce),this['uisData']['get'](_0x364734)['collection']['destroy'](),this['uisData']['delete'](_0x364734);}['switchTo'](_0x3efc1d){if(!this['_uis']['has'](_0x3efc1d))throw new _0x13348f('annotationsuis-missing-ui',this,{'uiName':_0x3efc1d});const _0x5246dd=this['context']['plugins']['get'](y),_0x2279e3=Array['from'](_0x5246dd['activeAnnotations'])[0x0]||null;this['deactivateAll'](),this['activate'](_0x3efc1d);const _0x3686ab=this['_uis']['get'](_0x3efc1d);_0x3686ab['setActiveAnnotation'](_0x2279e3),_0x3686ab['_setSelectedAnnotations']&&_0x2279e3&&_0x3686ab['_setSelectedAnnotations']([_0x2279e3]);}['deactivateAll'](){for(const _0x36a9a6 of this['activeUIs'])this['deactivate'](_0x36a9a6);}['register'](_0x21f0ae,_0x4823d0){if(this['_uis']['has'](_0x21f0ae))throw new _0x13348f('annotationsuis-register-already-registered');if('function'!=typeof _0x4823d0['attach']||'function'!=typeof _0x4823d0['detach']||'function'!=typeof _0x4823d0['setActiveAnnotation'])throw new _0x13348f('annotationsuis-register-invalid-interface',null);this['_uis']['set'](_0x21f0ae,_0x4823d0);}['refilterAnnotations'](){const _0x5d9c11=this['context']['plugins']['get'](y)['collection'],_0x24f788=new Map(),_0x30c638=Array['from'](this['activeUIs']);for(const _0x39da22 of this['activeUIs']){const _0x10db17=this['uisData']['get'](_0x39da22)['collection'];for(const _0x2d69df of _0x10db17)_0x24f788['set'](_0x2d69df,_0x39da22);}for(const _0x3d6837 of _0x5d9c11){const _0x84bfb=_0x24f788['get'](_0x3d6837);this['_assertAnnotationDoesNotBelongToMultipleUIs'](_0x3d6837);const _0x22b2f5=_0x30c638['find'](_0x3856fc=>this['uisData']['get'](_0x3856fc)['filter'](_0x3d6837));_0x84bfb!==_0x22b2f5&&(_0x84bfb&&this['uisData']['get'](_0x84bfb)['collection']['remove'](_0x3d6837),_0x22b2f5&&this['uisData']['get'](_0x22b2f5)['collection']['add'](_0x3d6837));}}['destroy'](){this['deactivateAll'](),super['destroy']();}['defaultFilter'](){return!0x0;}['_assertAnnotationDoesNotBelongToMultipleUIs'](_0xe13216){const _0x3cebf2=[];for(const _0x529add of this['activeUIs']){(0x0,this['uisData']['get'](_0x529add)['filter'])(_0xe13216)&&_0x3cebf2['push'](_0x529add);}if(_0x3cebf2['length']>0x1)throw new _0x13348f('annotationsuis-annotation-mismatch',null,{'matchedUIs':_0x3cebf2,'annotationType':_0xe13216['type']});}}const _i=/* #__PURE__ -- @preserve */
|
|
32
|
+
Ht('px');class H extends kt{['list'];['focusables'];['focusTracker'];['focusCycler'];constructor(_0x88c8f1){super(_0x88c8f1);const _0x1f1879=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 _0x119ecb(),this['focusCycler']=new _0x206411({'focusables':this['focusables'],'focusTracker':this['focusTracker']}),this['setTemplate']({'tag':'div','attributes':{'class':['ck','ck-sidebar','ck-reset',_0x1f1879['to']('class')],'style':{'minHeight':_0x1f1879['to']('minHeight',_0x7d29c6=>'number'==typeof _0x7d29c6?_i(_0x7d29c6+0xa):null)},'dir':_0x88c8f1['uiLanguageDirection'],'role':'application','aria-label':N(_0x88c8f1,'Annotations\x20sidebar'),'tabindex':0x0},'children':[{'tag':'div','attributes':{'role':'list','aria-label':N(_0x88c8f1,'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',_0xa8bd46=>{this['_updateItemPositionInFocusables'](_0xa8bd46['source']);}),this['list']['forEach'](_0x16fd57=>{this['focusTracker']['add'](_0x16fd57['element']),this['_updateItemPositionInFocusables'](_0x16fd57);}),this['list']['on']('change',(_0x2e20ba,_0x978465)=>{for(const _0x30d02d of _0x978465['removed'])this['focusTracker']['remove'](_0x30d02d['element']),this['focusables']['remove'](_0x30d02d);for(const _0x193a5b of _0x978465['added'])this['focusTracker']['add'](_0x193a5b['element']),this['_updateItemPositionInFocusables'](_0x193a5b);}),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['listenTo'](this['element'],'focus',()=>{this['focus']();});}['_updateItemPositionInFocusables'](_0x30cd4f){const _0x6356f7=this['focusables']['getIndex'](_0x30cd4f);let _0x1954e5,_0x4149af;for(const _0x1abaab of this['focusables'])if(_0x30cd4f['top']<_0x1abaab['top']){_0x1954e5=_0x1abaab;break;}if(_0x4149af=_0x1954e5?this['focusables']['getIndex'](_0x1954e5):this['focusables']['length'],-0x1!==_0x6356f7){if(_0x6356f7===_0x4149af-0x1)return;this['focusables']['remove'](_0x30cd4f),_0x4149af=_0x1954e5?this['focusables']['getIndex'](_0x1954e5):this['focusables']['length'];}this['focusables']['add'](_0x30cd4f,_0x4149af);}}const Ot=/* #__PURE__ -- @preserve */
|
|
33
|
+
Ht('px');class R extends kt{['content'];['_targetTop'];['_mutationObserver'];constructor(_0x1e84c3){super(_0x1e84c3),this['set']('top',0x0),this['set']('height',0x0),this['bind']('bottom')['to'](this,'top',this,'height',(_0x2d6369,_0x454f6d)=>_0x2d6369+_0x454f6d),this['set']('isAnimationDisabled',!0x1),this['_mutationObserver']=xt(()=>this['updateHeight']()),this['_targetTop']=null,this['content']=this['createCollection'](),this['content']['delegate']('arrowup','arrowdown')['to'](this);const _0x583376=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'class':['ck-sidebar-item',_0x583376['to']('isAnimationDisabled',_0x363f28=>_0x363f28?'ck-sidebar-item--no-animation':'')],'style':{'top':_0x583376['to']('top',_0x11cc52=>Ot(_0x11cc52))},'role':'presentation'},'children':this['content']});}['render'](){super['render'](),this['_mutationObserver']['attach'](this['element']);}['focus'](){this['content']['first']&&this['content']['first']['focus']();}['updateHeight'](){const _0x56fe91=this['element']['clientHeight'];_0x56fe91&&(this['height']=_0x56fe91);}['destroy'](){this['content']['clear'](),this['_mutationObserver']['detach'](),super['destroy']();}}class z extends _0x1c3a7a{['view'];['_activeAnnotation'];['_annotations'];['_spaceBetweenItems'];['_sidebarItemViewToAnnotation'];['_annotationToSidebarItemView'];['_recalculateBuffer'];static get['pluginName'](){return'Sidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x555dca){super(_0x555dca),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 _0x2582ea=this['context']['config']['get']('sidebar.container');_0x2582ea&&this['setContainer'](_0x2582ea);}['setContainer'](_0x529f76){if(!g(_0x529f76))throw new _0x13348f('sidebar-setcontainer-invalid-element');this['container']=_0x529f76;}['_attachToContainer']({viewClass:_0x5c8bc8='',spaceBetweenItems:_0x5e4cb1=0x19}={}){if(!g(this['container']))throw new _0x13348f('sidebar-attachtocontainer-missing-container',this);this['container']['appendChild'](this['view']['element']),this['view']['class']=_0x5c8bc8,this['_spaceBetweenItems']=_0x5e4cb1;}['rearrange']({removedAnnotation:_0x2db2ec,previousAnnotation:_0x37c301,nextAnnotation:_0x1ce95b}){const _0x267f88=this['getSidebarItemView'](_0x2db2ec);this['view']['list']['remove'](_0x267f88),this['_destroySidebarItemView'](_0x2db2ec),_0x37c301&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x37c301)),_0x1ce95b&&this['_alignToTargetRect'](this['getSidebarItemView'](_0x1ce95b)),this['_updateLastItem']();}['refresh']({blurredAnnotation:_0x2eca4f,activatedAnnotation:_0x5670d8,disableAnimationOnActivatedAnnotation:_0x5ebb4e}){if(this['_activeAnnotation']=_0x5670d8,_0x2eca4f){_0x2eca4f['isActive']=!0x1;const _0x23690d=this['getSidebarItemView'](_0x2eca4f);_0x23690d&&_0x5ebb4e&&(_0x23690d['isAnimationDisabled']=!0x1);}if(_0x5670d8){const _0x13a626=this['getSidebarItemView'](_0x5670d8);_0x13a626&&(_0x5670d8['isActive']=!0x0,_0x5ebb4e&&(_0x13a626['isAnimationDisabled']=!0x0,_0x13a626['top']+=0x1),this['_alignToTargetRect'](_0x13a626));}}['_detachFromContainer'](_0x593779){if(this['view']['element']['remove'](),_0x593779){for(const _0x310b96 of _0x593779)this['_destroySidebarItemView'](_0x310b96);}this['view']['list']['clear'](),this['view']['class']='',this['_lastItem']=null;}['addAnnotation'](_0x563230,_0x423293){_0x423293||(_0x423293=_0x563230['view']);const _0x233ead=new R(this['context']['locale']);this['_sidebarItemViewToAnnotation']['set'](_0x233ead,_0x563230),this['_annotationToSidebarItemView']['set'](_0x563230,_0x233ead),_0x233ead['content']['add'](_0x423293),this['listenTo'](_0x563230['view'],'change:targetRect',(_0x3db761,_0x997a43,_0x436973)=>{const _0x3df30e=this['_getTargetTop'](_0x563230,_0x436973);_0x233ead['_targetTop']!=_0x3df30e&&(_0x233ead['_targetTop']=_0x3df30e,this['_setItemTop'](_0x233ead,_0x3df30e));}),this['listenTo'](_0x233ead,'change:top',()=>{this['_recalculate'](_0x233ead,'top');}),this['listenTo'](_0x233ead,'change:bottom',()=>{this['_recalculate'](_0x233ead,'bottom');}),this['_alignToTargetRect'](_0x233ead);const _0x4a5fdf=this['_getItemBefore'](_0x233ead);if(_0x4a5fdf)this['_alignAfterItem'](_0x4a5fdf,_0x233ead)||this['_alignToTargetRect'](_0x233ead);else this['_alignToTargetRect'](_0x233ead);return this['_updateLastItem'](),this['view']['list']['add'](_0x233ead),_0x233ead;}['_alignForTopChange'](_0x2f71fe){if(!_0x2f71fe['content']['length'])return;const _0x473109=this['_getItemBefore'](_0x2f71fe);if(!_0x473109)return;const _0xeda6ba=this['_sidebarItemViewToAnnotation']['get'](_0x473109),_0x5cdc2c=this['_activeAnnotation'];_0x5cdc2c&&_0x5cdc2c===_0xeda6ba?this['_alignAfterItem'](_0x473109,_0x2f71fe):this['_alignBeforeItem'](_0x2f71fe,_0x473109);}['_alignForBottomChange'](_0x50437d){if(!_0x50437d['content']['length'])return;const _0x2c8282=this['_getItemAfter'](_0x50437d);if(!_0x2c8282)return;const _0x47d146=this['_sidebarItemViewToAnnotation']['get'](_0x2c8282),_0x568b13=this['context']['config']['get']('sidebar.preventScrollOutOfView'),_0x4b993f=this['_activeAnnotation'];_0x4b993f&&_0x4b993f===_0x47d146&&_0x568b13?(this['_alignBeforeItem'](_0x2c8282,_0x50437d),this['_alignAfterItem'](_0x50437d,_0x2c8282)):_0x4b993f&&_0x4b993f===_0x47d146?this['_alignBeforeItem'](_0x2c8282,_0x50437d):this['_alignAfterItem'](_0x50437d,_0x2c8282);}['_recalculate'](_0x4eedff,_0x455546){0x0===this['_recalculateBuffer']['length']&&setTimeout(()=>{for(const {sidebarItemView:_0x2ffe36,changedProp:_0x55ce3f}of this['_recalculateBuffer'])'top'===_0x55ce3f?this['_alignForTopChange'](_0x2ffe36):this['_alignForBottomChange'](_0x2ffe36);this['_recalculateBuffer']=[];},0xa),this['_recalculateBuffer']['push']({'sidebarItemView':_0x4eedff,'changedProp':_0x455546});}['getSidebarItemView'](_0x45492d){return this['_annotationToSidebarItemView']['get'](_0x45492d);}['destroy'](){this['stopListening'](),this['view']['destroy']();}['_destroySidebarItemView'](_0x56eb9b){const _0x7035c6=this['getSidebarItemView'](_0x56eb9b);this['stopListening'](_0x7035c6),this['stopListening'](_0x56eb9b['view']),_0x7035c6['destroy'](),this['_annotationToSidebarItemView']['delete'](_0x56eb9b),this['_sidebarItemViewToAnnotation']['delete'](_0x7035c6);}['_createSidebarView'](){const _0x217e87=new H(this['context']['locale']);return _0x217e87['render'](),this['on']('change:_lastItem',(_0x15b807,_0x331c9e,_0x192f93,_0x2999d6)=>{_0x2999d6&&_0x217e87['unbind']('minHeight'),_0x192f93?_0x217e87['bind']('minHeight')['to'](_0x192f93,'bottom'):_0x217e87['minHeight']=null;}),_0x217e87;}['_updateLastItem'](){this['_lastItem']=this['_annotations']?.['last']?this['getSidebarItemView'](this['_annotations']['last']):null;}['_getItemBefore'](_0x57a14f){const _0x5a3b80=this['_sidebarItemViewToAnnotation']['get'](_0x57a14f),_0x3c2ce2=_0x5a3b80&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x5a3b80)-0x1);return _0x3c2ce2&&this['getSidebarItemView'](_0x3c2ce2)||null;}['_getItemAfter'](_0x52040f){const _0x53068f=this['_sidebarItemViewToAnnotation']['get'](_0x52040f),_0x570bd9=_0x53068f&&this['_annotations']?.['get'](this['_annotations']['getIndex'](_0x53068f)+0x1);return _0x570bd9&&this['getSidebarItemView'](_0x570bd9)||null;}['_alignBeforeItem'](_0x1900b8,_0x5db61c){_0x1900b8['updateHeight']();const _0x17595d=G(_0x5db61c['bottom']+this['_spaceBetweenItems'],_0x1900b8['top']);return!!_0x17595d&&(this['_setItemTop'](_0x5db61c,_0x5db61c['top']-_0x17595d),!0x0);}['_alignAfterItem'](_0x1e46e6,_0x3a1f0d){_0x1e46e6['updateHeight']();const _0x34772f=G(_0x1e46e6['bottom']+this['_spaceBetweenItems'],_0x3a1f0d['top']);return!!_0x34772f&&(this['_setItemTop'](_0x3a1f0d,_0x3a1f0d['top']+_0x34772f,!0x1),!0x0);}['_alignToTargetRect'](_0x5d48af){const _0x162f9a=this['_sidebarItemViewToAnnotation']['get'](_0x5d48af);if(!_0x162f9a||!_0x162f9a['target']||!_0x162f9a['targetRect'])return;const _0x5f3451=this['_getTargetTop'](_0x162f9a,_0x162f9a['targetRect']);this['_setItemTop'](_0x5d48af,_0x5f3451);}['_getTargetTop'](_0x318901,_0x145eb1){if(null===_0x145eb1)return 0x0;if(_0x318901['target']instanceof _0x436169)return _0x145eb1['top'];{const _0x403506=new _0x436169(this['view']['element'])['top'];return _0x145eb1['top']-_0x403506;}}['_setItemTop'](_0x4aec82,_0x237dd0,_0x223897=this['context']['config']['get']('sidebar.preventScrollOutOfView')){_0x223897&&(_0x237dd0=Math['max'](_0x237dd0,this['_getMaxAvailableTop'](_0x4aec82))),_0x4aec82['top']=_0x237dd0;}['_getMaxAvailableTop'](_0x137e7d){let _0x5996ca=this['_getItemBefore'](_0x137e7d),_0xb73c4b=0x0;for(;_0x5996ca;)_0x5996ca['updateHeight'](),_0xb73c4b+=this['_spaceBetweenItems']+_0x5996ca['height'],_0x5996ca=this['_getItemBefore'](_0x5996ca);return _0xb73c4b;}}function G(_0x5009f2,_0x205d11){return Math['max'](_0x5009f2-_0x205d11,0x0);}function g(_0x51497b){return null!==_0x51497b&&'object'==typeof _0x51497b&&0x1===_0x51497b['nodeType'];}class e extends _0x1c3a7a{['isAttached'];['annotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'WideSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x46d500){super(_0x46d500),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_editorAnnotations']=new _0x7eb5c5(),this['_refreshPositioningDebounced']=_0x5d3d29(()=>{_0x46d500['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){const _0x8912a4=this['context']['plugins']['get'](j),_0x17b995=this['context']['plugins']['get'](z);_0x8912a4['register']('wideSidebar',this),_0x17b995['container']&&_0x8912a4['switchTo']('wideSidebar');}['setActiveAnnotation'](_0x47e6c4){if(_0x47e6c4===this['activeAnnotation'])return;const _0x49295c=this['context']['plugins']['get'](z);_0x49295c['_activeAnnotation']=_0x47e6c4;const _0x170714=this['activeAnnotation'];_0x49295c['refresh']({'blurredAnnotation':_0x170714,'activatedAnnotation':_0x47e6c4}),this['activeAnnotation']=_0x47e6c4;}['attach'](_0x53da4c){this['annotations']=_0x53da4c;const _0x55ec2b=this['context']['plugins']['get'](z);if(_0x55ec2b['_annotations']=_0x53da4c,this['isAttached'])throw new _0x13348f('widesidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x55ec2b,'set:container',()=>{this['detach'](),this['listenTo'](_0x55ec2b,'change:container',_0x3c9ba9=>{_0x3c9ba9['off'](),this['attach'](_0x53da4c);});}),_0x55ec2b['_attachToContainer']({'viewClass':'ck-sidebar--wide'});const _0x472db7=_0x4fc463=>{_0x4fc463['updateTargetRect'](),_0x55ec2b['addAnnotation'](_0x4fc463);};for(const _0x17036f of _0x53da4c)_0x472db7(_0x17036f);this['listenTo'](_0x53da4c,'add',(_0x14dee7,_0x3fcdff)=>{_0x472db7(_0x3fcdff);}),this['listenTo'](_0x53da4c,'remove',(_0x19bc4b,_0x32d0c0,_0x1a7d31)=>{_0x55ec2b['rearrange']({'removedAnnotation':_0x32d0c0,'previousAnnotation':_0x53da4c['get'](_0x1a7d31-0x1),'nextAnnotation':_0x53da4c['get'](_0x1a7d31+0x1)}),_0x32d0c0===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'high'}),this['listenTo'](_0x53da4c,'focus',(_0xe109ca,_0x4c052d)=>{this['setActiveAnnotation'](_0x4c052d);}),this['listenTo'](_0x53da4c,'blur',()=>{this['setActiveAnnotation'](null);});const _0x5b07bb=this['context']instanceof _0x4d6d98?this['context']['editors']:new _0x7eb5c5([this['context']]);for(const _0x4ab44a of _0x5b07bb)this['_integrateWithEditorAnnotations'](_0x4ab44a);this['listenTo'](_0x5b07bb,'add',(_0x51c6e1,_0x1c291a)=>{this['listenTo'](_0x1c291a,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x1c291a);});}),this['listenTo'](_0x5b07bb,'remove',(_0x1368d5,_0x1aaa56)=>{_0x1aaa56['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x1aaa56['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning']();}['detach'](){if(!this['isAttached'])throw new _0x13348f('widesidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x98b0dd=this['context']['plugins']['get'](z);_0x98b0dd['_detachFromContainer'](this['annotations']),this['stopListening'](_0x98b0dd),this['stopListening'](this['annotations']),this['context']instanceof _0x4d6d98&&this['stopListening'](this['context']['editors']);for(const _0x50aaa7 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x50aaa7);window['removeEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioningDebounced']['cancel'](),this['activeAnnotation']=null,this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach']();}['_integrateWithEditorAnnotations'](_0x2e8890){if(!_0x2e8890['plugins']['has']('EditorAnnotations'))return;const _0x4ff2f2=_0x2e8890['plugins']['get']('EditorAnnotations'),_0x52fe22=()=>{const _0x10a445=_0x4ff2f2['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['setActiveAnnotation'](_0x10a445[0x0]||null);};this['listenTo'](_0x4ff2f2,'refresh',_0x52fe22),this['listenTo'](_0x4ff2f2,'blur',(_0x1c5bd3,{isAnnotationTracked:_0x59a4e8})=>{this['activeAnnotation']&&_0x59a4e8(this['activeAnnotation'])&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x4ff2f2,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](this['annotations'],'blur',_0x139f50=>{_0x4ff2f2['hasDomSelection']()&&(_0x52fe22(),_0x139f50['stop']());},{'priority':'high'}),this['_editorAnnotations']['add'](_0x4ff2f2);}['_destroyEditorAnnotationsIntegration'](_0x3ea809){this['stopListening'](_0x3ea809),this['_editorAnnotations']['remove'](_0x3ea809);}}class C extends _0x39d67e{['counterView'];constructor(_0x34606d){super(_0x34606d);const _0x148725=this['bindTemplate'];this['set']('isDirty',!0x1),this['set']('number',0x0),this['bind']('_badge')['to'](this,'isDirty',this,'number',(_0x5beeee,_0xa1b43c)=>_0x5beeee?'...':_0xa1b43c['toString']()),this['set']('annotationType',''),this['icon']=_0x61886d,this['extendTemplate']({'attributes':{'class':['ck-annotation-counter']}}),this['counterView']=new kt(),this['counterView']['setTemplate']({'tag':'span','attributes':{'class':['ck-annotation-counter__badge',_0x148725['to']('annotationType',_0x55dfc6=>'ck-annotation-counter__badge--'+_0x55dfc6),_0x148725['if']('isDirty','ck-annotation-counter__badge--edit-mode')]},'children':[{'text':_0x148725['to']('_badge')}]}),this['children']['add'](this['counterView']);}}class n extends _0x1c3a7a{['isAttached'];['annotations'];['_manuallyClosedAnnotationViews'];['_domEmitter'];['_annotationToNarrowView'];['_selectedAnnotations'];['_editorAnnotations'];['_refreshPositioningDebounced'];static get['requires'](){return[z,j];}static get['pluginName'](){return'NarrowSidebar';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x6294e9){super(_0x6294e9),this['isAttached']=!0x1,this['_manuallyClosedAnnotationViews']=new Set(),this['_domEmitter']=new(_0x3935b2())(),this['_annotationToNarrowView']=new Map(),this['set']('activeAnnotation',null),this['annotations']=null,this['_selectedAnnotations']=[],this['_editorAnnotations']=new _0x7eb5c5(),this['_refreshPositioningDebounced']=_0x5d3d29(()=>{this['_refreshPositioning']();},0xfa,{'leading':!0x1});}['init'](){this['context']['plugins']['get'](j)['register']('narrowSidebar',this),this['bodyCollection']=new _0x4ce13c(this['context']['locale']),this['balloonPanelView']=new _0x1669c2(this['context']['locale']),this['bodyCollection']['attachToDom'](),this['bodyCollection']['add'](this['balloonPanelView']);}['attach'](_0x30c6c0){this['annotations']=_0x30c6c0;const _0x3bf3f4=this['context']['plugins']['get'](z),_0x1d7ff8=this['balloonPanelView'];if(_0x3bf3f4['_annotations']=_0x30c6c0,this['isAttached'])throw new _0x13348f('narrowsidebar-attach-already-attached',this);this['isAttached']=!0x0,this['listenTo'](_0x3bf3f4,'set:container',()=>{this['detach'](),this['listenTo'](_0x3bf3f4,'change:container',_0x1bb231=>{_0x1bb231['off'](),this['attach'](_0x30c6c0);});}),_0x3bf3f4['_attachToContainer']({'viewClass':'ck-sidebar--narrow','spaceBetweenItems':0x5});const _0x4153b7=_0x2fdd6c=>{const _0x16831d=new C(this['context']['locale']);_0x3bf3f4['addAnnotation'](_0x2fdd6c,_0x16831d),this['_annotationToNarrowView']['set'](_0x2fdd6c,_0x16831d),_0x16831d['bind']('isDirty','annotationType','number')['to'](_0x2fdd6c['view'],'isDirty','type','length'),_0x16831d['on']('execute',()=>{this['_manuallyClosedAnnotationViews']['clear'](),_0x1d7ff8['content']['first']!==_0x2fdd6c['view']?(this['_showBalloon'](_0x2fdd6c),_0x2fdd6c['view']['element']['focus'](),this['setActiveAnnotation'](_0x2fdd6c)):this['setActiveAnnotation'](null);});};for(const _0xd08faf of _0x30c6c0)_0x4153b7(_0xd08faf);this['listenTo'](_0x30c6c0,'add',(_0x5593b6,_0x573f52)=>{_0x4153b7(_0x573f52);}),this['listenTo'](_0x30c6c0,'remove',(_0x577621,_0x28a6e1,_0x3cdde8)=>{this['_annotationToNarrowView']['get'](_0x28a6e1)['destroy'](),this['_annotationToNarrowView']['delete'](_0x28a6e1),_0x3bf3f4['rearrange']({'removedAnnotation':_0x28a6e1,'previousAnnotation':_0x30c6c0['get'](_0x3cdde8-0x1),'nextAnnotation':_0x30c6c0['get'](_0x3cdde8+0x1)}),_0x28a6e1===this['activeAnnotation']&&this['setActiveAnnotation'](null);},{'priority':'low'}),this['listenTo'](_0x30c6c0,'focus',(_0x32d738,_0x2abcdd)=>{this['setActiveAnnotation'](_0x2abcdd);}),this['listenTo'](_0x30c6c0,'blur',()=>{this['setActiveAnnotation'](null);}),this['_domEmitter']['listenTo'](document,'keydown',(_0x146d9e,_0x5e8b1e)=>{_0x5e8b1e['keyCode']===_0x266af6['esc']&&_0x1d7ff8['isVisible']&&(this['_manuallyClosedAnnotationViews']['add'](_0x1d7ff8['content']['first']),this['_hideBalloon'](),_0x5e8b1e['stopPropagation'](),_0x5e8b1e['preventDefault']());}),this['_domEmitter']['listenTo'](document,'mousedown',(_0x369138,_0x3a43cb)=>{const _0x250865=_0x3a43cb['target'];_0x1d7ff8['isVisible']&&_0x1d7ff8['element']['contains'](_0x250865)||_0x3bf3f4['view']['element']['contains'](_0x250865)||_0x369138['preventClosingBalloon']||this['activeAnnotation']&&this['activeAnnotation']['focusableElements']['find'](_0x2b2078=>_0x2b2078['contains'](_0x250865))||(this['_manuallyClosedAnnotationViews']['clear'](),this['_hideBalloon'](),this['setActiveAnnotation'](null));});const _0x20ed14=this['context']instanceof _0x4d6d98?this['context']['editors']:new _0x7eb5c5([this['context']]);for(const _0x24fa76 of _0x20ed14)this['_integrateWithEditorAnnotations'](_0x24fa76);this['listenTo'](_0x20ed14,'add',(_0x2df62a,_0x14de08)=>{this['listenTo'](_0x14de08,'ready',()=>{this['_integrateWithEditorAnnotations'](_0x14de08);});}),this['listenTo'](_0x20ed14,'remove',(_0x4830f2,_0x21ca41)=>{_0x21ca41['plugins']['has']('EditorAnnotations')&&this['_destroyEditorAnnotationsIntegration'](_0x21ca41['plugins']['get']('EditorAnnotations'));}),window['addEventListener']('resize',this['_refreshPositioningDebounced']),this['_refreshPositioning']();}['setActiveAnnotation'](_0x8a56a5){if(_0x8a56a5===this['activeAnnotation'])return;const _0x3ee05d=this['context']['plugins']['get'](z);if(_0x3ee05d['refresh']({'blurredAnnotation':this['activeAnnotation'],'activatedAnnotation':_0x8a56a5,'disableAnimationOnActivatedAnnotation':!0x0}),_0x8a56a5)_0x3ee05d['getSidebarItemView'](_0x8a56a5)?this['_showBalloon'](_0x8a56a5):this['_hideBalloon']();else this['_hideBalloon']();this['activeAnnotation']=_0x8a56a5;}['detach'](){if(!this['isAttached'])throw new _0x13348f('narrowsidebar-detach-not-attached',this);this['setActiveAnnotation'](null);const _0x72c026=this['context']['plugins']['get'](z);this['_hideBalloon'](),Array['from'](this['_annotationToNarrowView']['values'](),_0x2b9970=>_0x2b9970['destroy']()),this['_annotationToNarrowView']['clear'](),_0x72c026['_detachFromContainer'](this['annotations']),this['stopListening'](),this['_domEmitter']['stopListening'](),this['context']instanceof _0x4d6d98&&this['stopListening'](this['context']['editors']);for(const _0x219f98 of Array['from'](this['_editorAnnotations']))this['_destroyEditorAnnotationsIntegration'](_0x219f98);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'](_0x575e52){if(!_0x575e52['plugins']['has']('EditorAnnotations'))return;const _0x1fbeae=_0x575e52['plugins']['get']('EditorAnnotations'),_0x53836c=this['context']['plugins']['get'](z),_0xeb48ba=this['annotations'],_0xcce384=this['balloonPanelView'],_0x33f698=()=>{const _0x2ac212=_0x1fbeae['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});this['_setSelectedAnnotations'](_0x2ac212),this['setActiveAnnotation'](_0x2ac212[0x0]||null);};this['listenTo'](_0x1fbeae,'refresh',_0x33f698),this['listenTo'](_0x1fbeae,'blur',(_0x59f7c5,{isAnnotationTracked:_0x56d6c8})=>{this['activeAnnotation']&&_0x56d6c8(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x1fbeae,'uiUpdate',()=>{this['_refreshPositioningDebounced']();}),this['listenTo'](_0xeb48ba,'blur',_0x5ecb25=>{_0x1fbeae['hasDomSelection']()&&_0x5ecb25['stop']();},{'priority':'high'}),this['listenTo'](this['_domEmitter'],'mousedown',(_0x46fec7,_0x315555)=>{const _0x5d44f9=_0x315555['target'];_0xcce384['isVisible']&&_0xcce384['element']['contains'](_0x5d44f9)||_0x53836c['view']['element']['contains'](_0x5d44f9)||this['activeAnnotation']&&_0x1fbeae['hasDomSelection']()&&(_0x33f698(),_0x46fec7['preventClosingBalloon']=!0x0);},{'priority':'high'}),this['_editorAnnotations']['add'](_0x1fbeae);}['_destroyEditorAnnotationsIntegration'](_0x351617){_0x351617&&(this['stopListening'](_0x351617),this['_editorAnnotations']['remove'](_0x351617));}['_setSelectedAnnotations'](_0x58aca9){for(const _0x4b748b of this['_selectedAnnotations'])_0x58aca9['includes'](_0x4b748b)||this['_manuallyClosedAnnotationViews']['delete'](_0x4b748b['view']);this['_selectedAnnotations']=_0x58aca9;}['_refreshPositioning'](){const _0x5c9011=this['balloonPanelView'];this['context']['plugins']['get']('Annotations')['refreshVisibility'](),this['annotations']['refreshPositioning'](),_0x5c9011['isVisible']&&this['_updateBalloonPosition']();}['_showBalloon'](_0xba7773){if(this['_manuallyClosedAnnotationViews']['has'](_0xba7773['view']))return;const _0x154198=this['balloonPanelView']['content']['first'];_0x154198!==_0xba7773['view']?(_0x154198&&this['_detachListeners'](_0x154198),this['_attachListeners'](_0xba7773['view']),this['balloonPanelView']['content']['clear'](),this['balloonPanelView']['content']['add'](_0xba7773['view']),this['_updateBalloonPosition']()):this['_updateBalloonPosition']();}['_updateBalloonPosition'](){const _0x31b1ee=this['balloonPanelView']['content']['first'],_0x350b88=_0x31b1ee&&this['annotations']['getByView'](_0x31b1ee);if(!_0x350b88||!this['_annotationToNarrowView']['has'](_0x350b88))return;const _0x55bb40=this['_annotationToNarrowView']['get'](_0x350b88)['element'],_0x4230b3=(function(){const _0x5116fc=_0x1669c2['defaultPositions'];return[_0x5116fc['southArrowNorthEast'],_0x5116fc['northArrowSouthEast'],_0x5116fc['southArrowNorth'],_0x5116fc['northArrowSouth'],_0x5116fc['southArrowNorthWest'],_0x5116fc['northArrowSouthWest']];}());this['balloonPanelView']['pin']({'target':_0x55bb40,'positions':_0x4230b3});}['_hideBalloon'](){const _0x8398fb=this['balloonPanelView'],_0x2ecb7b=_0x8398fb['content']['first'];_0x2ecb7b&&(this['_detachListeners'](_0x2ecb7b),_0x8398fb['unpin'](),_0x8398fb['content']['clear']());}['_attachListeners'](_0x4d9706){this['listenTo'](_0x4d9706,'change:height',()=>this['_updateBalloonPosition']()),this['listenTo'](_0x4d9706,'Esc',(_0x16a403,_0x13c1e7)=>{this['_manuallyClosedAnnotationViews']['add'](_0x4d9706),this['_hideBalloon'](),_0x13c1e7();});}['_detachListeners'](_0x353d49){this['stopListening'](_0x353d49);}}class c extends _0x4e6af8{['isAttached'];['annotations'];['_manuallyClosed'];['_balloon'];['_addedAnnotations'];['_selectedAnnotations'];['_forceRefresh'];['_refreshVisibilityDebounced'];static get['requires'](){return[b,_0x479a8f,j];}static get['pluginName'](){return'InlineAnnotations';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}constructor(_0x4a21f9){super(_0x4a21f9),_0x4a21f9['editing']['view']['addObserver'](_0x2585d2),this['isAttached']=!0x1,this['set']('activeAnnotation',null),this['annotations']=null,this['_manuallyClosed']=new Set(),this['_balloon']=_0x4a21f9['plugins']['get'](_0x479a8f),this['_addedAnnotations']=new Set(),this['_selectedAnnotations']=[],this['_forceRefresh']=!0x1,this['_refreshVisibilityDebounced']=_0x5d3d29(()=>{this['editor']['plugins']['get']('Annotations')['refreshVisibility']();},0xfa,{'leading':!0x1});}['init'](){const _0x415029=this['editor']['plugins']['get'](j);_0x415029['context']===this['editor']&&(_0x415029['register']('inline',this),this['editor']['keystrokes']['set']('Esc',(_0x2e7b4b,_0x12cdc4)=>{const _0x27f8b6=this['_balloon'];if(this['isAttached']&&_0x27f8b6['visibleView']){const _0x36fab6=this['annotations']['getByView'](_0x27f8b6['visibleView']);_0x36fab6&&this['_closeAnnotation'](_0x36fab6),_0x12cdc4();}}));}['afterInit'](){const _0x306af7=this['editor']['plugins']['get'](j);_0x306af7['context']===this['editor']&&(_0x306af7['hasActive']()||_0x306af7['switchTo']('inline'));}['setActiveAnnotation'](_0x2ab0fb){_0x2ab0fb!==this['activeAnnotation']&&(this['activeAnnotation']&&(this['activeAnnotation']['isActive']=!0x1),_0x2ab0fb&&this['editor']['ui']['focusTracker']['isFocused']&&(this['annotations']['has'](_0x2ab0fb)&&this['_addAnnotationToBalloon'](_0x2ab0fb,!0x0),_0x2ab0fb['isActive']=!0x0),_0x2ab0fb||this['_setSelectedAnnotations']([]),this['activeAnnotation']=_0x2ab0fb);}['attach'](_0x5e5ff1){this['annotations']=_0x5e5ff1;const _0x400959=this['editor']['plugins']['get'](j),_0x2f5936=this['_balloon'];if(this['isAttached'])throw new _0x13348f('inlineannotations-attach-already-attached',this);if(_0x400959['context']!==this['editor'])throw new _0x13348f('inlineannotations-not-allowed-with-context',this);const _0x16ed2c=this['editor']['plugins']['get'](b);this['listenTo'](_0x16ed2c,'refresh',()=>{const _0x43df74=_0x16ed2c['getOrderedSelectedAnnotations']({'annotations':this['annotations'],'activeAnnotation':this['activeAnnotation']});var _0x397a33,_0x4eb5b9;!this['_forceRefresh']&&(_0x397a33=_0x43df74,_0x4eb5b9=this['_selectedAnnotations'],_0x397a33['length']===_0x4eb5b9['length']&&_0x397a33['every'](_0x45865d=>_0x4eb5b9['includes'](_0x45865d)))||(this['_forceRefresh']=!0x1,this['_setSelectedAnnotations'](_0x43df74),this['setActiveAnnotation'](_0x43df74[0x0]||null));}),this['listenTo'](_0x16ed2c,'blur',(_0x530bfe,{isAnnotationTracked:_0x29f75c})=>{this['activeAnnotation']&&_0x29f75c(this['activeAnnotation'])&&(this['_setSelectedAnnotations']([]),this['setActiveAnnotation'](null));}),this['listenTo'](_0x16ed2c,'uiUpdate',()=>{this['_refreshVisibilityDebounced']();}),this['listenTo'](this['editor']['ui']['focusTracker'],'change:isFocused',(_0x3961c1,_0x60bdc8,_0x23f3a8)=>{_0x23f3a8||this['setActiveAnnotation'](null);}),this['listenTo'](_0x5e5ff1,'remove',(_0x30865b,_0x371782)=>{this['_removeAnnotationFromBalloon'](_0x371782),_0x371782===this['activeAnnotation']&&this['setActiveAnnotation'](null);}),this['listenTo'](_0x2f5936,'change:visibleView',(_0x183ccc,_0x3844e6,_0x20a944,_0x1fb55d)=>{_0x1fb55d&&this['stopListening'](_0x1fb55d);const _0x503826=_0x5e5ff1['getByView'](_0x20a944);_0x20a944&&_0x503826&&(this['listenTo'](_0x20a944,'change:height',()=>{_0x2f5936['updatePosition']();}),this['listenTo'](_0x20a944,'Esc',()=>{this['_closeAnnotation'](_0x503826),this['editor']['editing']['view']['focus']();}),this['activeAnnotation']!==_0x503826&&this['setActiveAnnotation'](_0x503826));}),this['listenTo'](this['editor']['ui'],'update',()=>{_0x2f5936['visibleView']&&(_0x5e5ff1['getByView'](_0x2f5936['visibleView'])&&_0x2f5936['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 _0x13348f('inlineannotations-detach-not-attached',this);this['setActiveAnnotation'](null);for(const _0x52a2b1 of this['_addedAnnotations'])this['_removeAnnotationFromBalloon'](_0x52a2b1);this['_refreshVisibilityDebounced']['cancel'](),this['stopListening'](),this['isAttached']=!0x1,this['annotations']=null;}['destroy'](){this['isAttached']&&this['detach'](),this['_refreshVisibilityDebounced']['cancel']();}['_setSelectedAnnotations'](_0x4a4f4f){for(const _0x3e798d of this['_selectedAnnotations'])_0x4a4f4f['includes'](_0x3e798d)||this['_manuallyClosed']['delete'](_0x3e798d);for(const _0x386514 of this['annotations'])_0x4a4f4f['includes'](_0x386514)||this['_removeAnnotationFromBalloon'](_0x386514);if(this['editor']['ui']['focusTracker']['isFocused']){for(const _0x28f99e of _0x4a4f4f)this['_addAnnotationToBalloon'](_0x28f99e);}this['_selectedAnnotations']=_0x4a4f4f;}['_addAnnotationToBalloon'](_0xd2b598,_0x31ed59=!0x1){this['_manuallyClosed']['has'](_0xd2b598)||(this['_addedAnnotations']['has'](_0xd2b598)||this['_balloon']['hasView'](_0xd2b598['view'])||(this['_addedAnnotations']['add'](_0xd2b598),this['_balloon']['add']({'stackId':_0xd2b598['view']['id'],'view':_0xd2b598['view'],'position':{'target':()=>this['_getBalloonTargetForAnnotation'](_0xd2b598)}})),_0x31ed59&&this['_balloon']['showStack'](_0xd2b598['view']['id']));}['_getBalloonTargetForAnnotation'](_0x3c3e7f){const _0x247268=_0x3c3e7f['target'],_0x133be5=this['editor']['editing']['view'],_0x482c4a=_0x133be5['document']['selection']['getFirstRange'](),_0x2a9897=_0x133be5['domConverter']['viewRangeToDom'](_0x482c4a);if(_0x2a9897['collapse'](!0x0),_0x247268){if(_0x247268 instanceof _0x436169)return _0x247268;let _0x271c9f=[];for(const _0x50137e of _0x247268)_0x271c9f['push'](...F(_0x50137e['getClientRects']()));_0x271c9f=function(_0x5996e4){const _0x311f53=[];let _0x180103=_0x5996e4[0x0];for(let _0x2f4e68=0x1;_0x2f4e68<_0x5996e4['length'];_0x2f4e68++)P(_0x180103,_0x5996e4[_0x2f4e68])?_0x180103['width']+=_0x5996e4[_0x2f4e68]['width']:(_0x311f53['push'](_0x180103),_0x180103=_0x5996e4[_0x2f4e68]);return _0x311f53['push'](_0x180103),_0x311f53;}(_0x271c9f);const _0x2ba806=_0x2a9897['getBoundingClientRect']();return _0x271c9f['find'](_0x1b13ec=>_0x1b13ec['top']<=_0x2ba806['top']&&_0x1b13ec['bottom']>=_0x2ba806['bottom']&&_0x1b13ec['left']<=_0x2ba806['left']&&_0x1b13ec['right']>=_0x2ba806['right'])||_0x271c9f[0x0];}return _0x3c3e7f['targetRect']||_0x2a9897;}['_removeAnnotationFromBalloon'](_0x2aca91){this['_addedAnnotations']['has'](_0x2aca91)&&this['_balloon']['hasView'](_0x2aca91['view'])&&(this['_addedAnnotations']['delete'](_0x2aca91),this['_balloon']['remove'](_0x2aca91['view']));}['_closeAnnotation'](_0x1a4023){this['_manuallyClosed']['add'](_0x1a4023),this['_removeAnnotationFromBalloon'](_0x1a4023);}}function F(_0x22d78b){return Array['from'](_0x22d78b)['map'](DOMRect['fromRect']);}function P(_0x490046,_0x17d47a){return _0x490046['top']===_0x17d47a['top']&&_0x490046['bottom']===_0x17d47a['bottom']&&_0x490046['right']===_0x17d47a['left'];}class Z extends kt{['focusTracker'];['focusCycler'];['_annotationViews'];constructor(_0x2b7922,_0x43cf64){super(_0x2b7922),this['set']('isEmpty',!_0x43cf64['length']),this['focusTracker']=new _0x119ecb(),this['_annotationViews']=_0x43cf64,this['_annotationViews']['delegate']('arrowup','arrowdown')['to'](this),this['on']('arrowup',()=>{this['focusCycler']['focusPrevious']();}),this['on']('arrowdown',()=>{this['focusCycler']['focusNext']();}),this['focusCycler']=new _0x206411({'focusables':_0x43cf64,'focusTracker':this['focusTracker']}),this['listenTo'](_0x43cf64,'add',()=>{this['isEmpty']=!0x1;}),this['listenTo'](_0x43cf64,'remove',(_0xd266ab,_0x1215c7)=>{_0x1215c7['isActive']&&this['focus'](),_0x43cf64['length']||(this['isEmpty']=!0x0);});const _0x2482be=this['bindTemplate'];this['setTemplate']({'tag':'div','attributes':{'dir':'auto','class':['ck','ck-comments-archive'],'tabindex':-0x1,'role':'list','aria-label':N(_0x2b7922,'COMMENTS_ARCHIVE_LIST_LABEL')},'children':[{'tag':'div','attributes':{'class':['ck-comments-archive__content'],'role':'presentation'},'children':[{'tag':'div','attributes':{'role':'presentation'},'children':_0x43cf64},{'tag':'p','attributes':{'class':['ck-comments-archive__info',_0x2482be['if']('isEmpty','ck-hidden',_0x296dd3=>!_0x296dd3)]},'children':[{'text':N(_0x2b7922,'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 _0x5cb20a of this['_annotationViews'])this['focusTracker']['add'](_0x5cb20a['element']);this['_annotationViews']['on']('change',(_0x392c5e,{added:_0x1d9e4c,removed:_0x530cf7})=>{for(const _0x3e710c of _0x1d9e4c)this['focusTracker']['add'](_0x3e710c['element']);for(const _0x3869fd of _0x530cf7)this['focusTracker']['remove'](_0x3869fd['element']);});}}class p extends _0x1c3a7a{static get['pluginName'](){return'CommentsArchive';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[o,y];}constructor(_0x488f3e){super(_0x488f3e),this['archivedThreads']=new _0x7eb5c5();}['init'](){const _0x1d1c5f=this['context'],_0x1de003=_0x1d1c5f['plugins']['get'](o),_0xb1cfdc=_0x1d1c5f['plugins']['get'](y);this['listenTo'](_0x1de003,'addCommentThread',(_0x2027f8,{threadId:_0x4d5074})=>{const _0x3d5fa3=_0x1de003['getCommentThread'](_0x4d5074);_0x3d5fa3['archivedAt']&&this['archivedThreads']['add'](_0x3d5fa3,this['_calculatePosition'](_0x3d5fa3['archivedAt'])),this['listenTo'](_0x3d5fa3,'change:archivedAt',(_0x566f6b,_0x557c0d,_0x5dfd01)=>{_0x5dfd01?this['archivedThreads']['has'](_0x3d5fa3)||this['archivedThreads']['add'](_0x3d5fa3,this['_calculatePosition'](_0x3d5fa3['archivedAt'])):this['archivedThreads']['has'](_0x3d5fa3)&&this['archivedThreads']['remove'](_0x3d5fa3);});}),this['listenTo'](_0x1de003,'removeCommentThread',(_0x5daef3,{threadId:_0x578e90})=>{const _0x6a3170=_0x1de003['getCommentThread'](_0x578e90);this['stopListening'](_0x6a3170),this['archivedThreads']['has'](_0x6a3170)&&this['archivedThreads']['remove'](_0x6a3170);},{'priority':'highest'}),this['listenTo'](_0xb1cfdc['collection'],'focus',(_0x3fc9ee,_0x1b1025)=>{_0x1b1025['isVisible']||(_0x1b1025['isActive']=!0x0,_0xb1cfdc['activate'](_0x1b1025));});}['_calculatePosition'](_0x4a8cb9){const _0x113cff=[...this['archivedThreads']]['findIndex'](_0x31e53b=>_0x31e53b['archivedAt']<_0x4a8cb9);return _0x113cff>-0x1?_0x113cff:this['archivedThreads']['length'];}}class a extends _0x4e6af8{['commentsArchiveView'];['annotationViews'];['_pendingThreads'];static get['pluginName'](){return'CommentsArchiveUI';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}static get['requires'](){return[p,_0x578bd5];}constructor(_0x283b53){super(_0x283b53),this['annotationViews']=new _0x42bc84(),this['_pendingThreads']=[];}['init'](){const _0x31ca77=this['editor'],_0x162580=this['_hideDialogOnAnnotationEscape']['bind'](this);_0x31ca77['ui']['componentFactory']['add']('commentsArchive',()=>this['_createCommentsArchiveButton'](_0x39d67e,!0x0)),_0x31ca77['ui']['componentFactory']['add']('menuBar:commentsArchive',()=>{const _0x471f23=this['_createCommentsArchiveButton'](_0x4dec93);return _0x471f23['set']({'role':'menuitemcheckbox'}),_0x471f23;});const _0x29019a=_0x31ca77['plugins']['get'](p),_0x13d287=_0x31ca77['plugins']['get']('Annotations'),_0x53fce6=_0x31ca77['plugins']['get']('CommentsRepository');_0x29019a['archivedThreads']['forEach'](_0x520d10=>{this['_handleNewThread'](_0x520d10);}),this['listenTo'](_0x29019a['archivedThreads'],'add',(_0x3c51ba,_0x945728)=>{this['_handleNewThread'](_0x945728);}),this['listenTo'](_0x13d287['collection'],'add',(_0x5b3f01,_0x56de02)=>{const _0x324ec1=this['_pendingThreads']['find'](_0x83237a=>{const _0x3368b9=_0x53fce6['_threadToController']['get'](_0x83237a);return _0x3368b9&&_0x56de02['innerView']===_0x3368b9['view'];});if(_0x324ec1){const _0x5e72ba=this['_calculatePosition'](_0x324ec1['archivedAt']);this['_addAnnotationToArchive'](_0x56de02,_0x5e72ba),this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x324ec1),0x1);}}),this['listenTo'](_0x29019a['archivedThreads'],'remove',(_0xb7aaee,_0x514608)=>{const _0x65b4d3=_0x31ca77['config']['get']('collaboration.channelId');if(!_0x65b4d3||_0x514608['channelId']===_0x65b4d3){if(this['_pendingThreads']['includes'](_0x514608))this['_pendingThreads']['splice'](this['_pendingThreads']['indexOf'](_0x514608),0x1);else{const _0x516c2c=_0x53fce6['_threadToController']['get'](_0x514608),_0x32d900=_0x13d287['getByInnerView'](_0x516c2c['view']);this['annotationViews']['remove'](_0x32d900['view']),this['stopListening'](_0x32d900),this['stopListening'](_0x32d900['focusableElements']);}}}),this['listenTo'](_0x13d287['collection'],'add',(_0x172446,_0x5b6174)=>{this['listenTo'](_0x5b6174,'escape',_0x162580);}),this['listenTo'](_0x13d287['collection'],'remove',(_0x2af214,_0xebd067)=>{this['stopListening'](_0xebd067,'escape',_0x162580);});}['_addAnnotationToArchive'](_0x40bac,_0x4b1d1d){this['listenTo'](_0x40bac,'set:isVisible',_0x519da3=>{_0x519da3['return']=!0x1,_0x519da3['stop']();}),this['annotationViews']['add'](_0x40bac['view'],_0x4b1d1d);}['_handleNewThread'](_0x4423f5){const _0x1fc15c=this['editor']['plugins']['get']('CommentsRepository'),_0x5c4c31=this['editor']['plugins']['get']('Annotations'),_0x3ffdac=this['editor']['config']['get']('collaboration.channelId');if(!_0x3ffdac||_0x4423f5['channelId']===_0x3ffdac){const _0x5dd798=_0x1fc15c['_threadToController']['get'](_0x4423f5);if(!_0x5dd798)return void this['_pendingThreads']['push'](_0x4423f5);const _0x17af9d=this['_calculatePosition'](_0x4423f5['archivedAt']),_0x37c648=_0x5c4c31['getByInnerView'](_0x5dd798['view']);_0x37c648['isVisible']&&_0x5c4c31['_visibleAnnotations']['remove'](_0x37c648),this['_addAnnotationToArchive'](_0x37c648,_0x17af9d);}}['_calculatePosition'](_0x1cf759){const _0x3bc661=this['editor']['config']['get']('collaboration.channelId'),_0xbf2efb=[...this['editor']['plugins']['get'](p)['archivedThreads']]['filter'](_0x392cd4=>_0x392cd4['channelId']===_0x3bc661)['findIndex'](_0xfbe9e9=>_0xfbe9e9['archivedAt']<_0x1cf759);return _0xbf2efb<0x0||_0xbf2efb>this['annotationViews']['length']?this['annotationViews']['length']:_0xbf2efb-0x1;}['_toggleDialog'](){const _0x4c3164=this['editor'],_0x401dc4=_0x4c3164['plugins']['get']('Dialog');this['commentsArchiveView']||(this['commentsArchiveView']=new Z(_0x4c3164['locale'],this['annotationViews'])),'commentsArchive'===_0x401dc4['id']?_0x401dc4['hide']():_0x401dc4['show']({'id':'commentsArchive','title':N(_0x4c3164['locale'],'COMMENTS_ARCHIVE'),'icon':_0xb693b5,'hasCloseButton':!0x0,'content':this['commentsArchiveView'],'position':_0xa729ff['EDITOR_TOP_SIDE']});}['_createCommentsArchiveButton'](_0x51778a,_0x2a2454=!0x1){const _0x746195=this['editor']['locale'],_0x18d77b=this['editor']['plugins']['get']('Dialog'),_0x42cc0c=new _0x51778a(_0x746195);return _0x42cc0c['bind']('isEnabled')['to'](this,'isEnabled'),_0x42cc0c['bind']('isOn')['to'](_0x18d77b,'id',_0x2a9c75=>'commentsArchive'===_0x2a9c75),_0x42cc0c['set']({'label':N(_0x746195,'COMMENTS_ARCHIVE'),'icon':_0xb693b5,'isToggleable':!0x0}),_0x2a2454&&(_0x42cc0c['tooltip']=!0x0),this['listenTo'](_0x42cc0c,'execute',()=>this['_toggleDialog']()),_0x42cc0c;}['_hideDialogOnAnnotationEscape']=_0xe705a1=>{const _0xf73e5b=_0xe705a1['source'];if(!this['annotationViews']['has'](_0xf73e5b['view']))return;const _0x18c773=this['editor']['plugins']['get']('Dialog');_0x18c773['isOpen']&&'commentsArchive'===_0x18c773['id']&&(_0x18c773['hide'](),_0xe705a1['stop']());};}class gi extends _0x4e6af8{static get['requires'](){return[o,r,s,p,a,i,e,n,c];}static get['pluginName'](){return'Comments';}static get['isOfficialPlugin'](){return!0x0;}static get['isPremiumPlugin'](){return!0x0;}}export{ot as AddCommentThreadCommand,T as Annotation,S as AnnotationCollection,C as AnnotationCounterButtonView,E as AnnotationView,y as Annotations,R as AnnotationsSidebarItemView,H as AnnotationsSidebarView,j as AnnotationsUIs,si as BaseCommentThreadView,di as BaseCommentView,wi as Comment,pi as CommentThread,vt as CommentThreadController,ie as CommentThreadInputView,gt as CommentThreadView,Tt as CommentView,gi as Comments,p as CommentsArchive,a as CommentsArchiveUI,r as CommentsEditing,te as CommentsListView,i as CommentsOnly,o as CommentsRepository,s as CommentsUI,b as EditorAnnotations,c as InlineAnnotations,n as NarrowSidebar,z as Sidebar,e as WideSidebar,v as bindAnnotationCollections};
|